graphdb-workbench 3.1.1-TR3 → 3.2.0-TR1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -0
- package/dist/10142.f47cd2aec05492fce7ce.bundle.js +2 -0
- package/dist/10142.f47cd2aec05492fce7ce.bundle.js.map +1 -0
- package/dist/10406.52677950658780fd8859.bundle.js +2 -0
- package/dist/{10406.7fed4b667b0d2813b305.bundle.js.map → 10406.52677950658780fd8859.bundle.js.map} +1 -1
- package/dist/12358.2061f29dc113149946a3.bundle.js +3 -0
- package/dist/12358.2061f29dc113149946a3.bundle.js.map +1 -0
- package/dist/{12396.6a14b6f5e2006b200818.bundle.js → 12396.4c26c8da50c790b0f39a.bundle.js} +2 -2
- package/dist/{12396.6a14b6f5e2006b200818.bundle.js.map → 12396.4c26c8da50c790b0f39a.bundle.js.map} +1 -1
- package/dist/14874.d6973a34188c0335fa12.bundle.js +2 -0
- package/dist/14874.d6973a34188c0335fa12.bundle.js.map +1 -0
- package/dist/{15535.a192d8a2d5f76b626c81.bundle.js → 15535.ce8d657c04f3401b9539.bundle.js} +2 -2
- package/dist/{15535.a192d8a2d5f76b626c81.bundle.js.map → 15535.ce8d657c04f3401b9539.bundle.js.map} +1 -1
- package/dist/{16162.9cfcb9db05b9cef9ef2c.bundle.js → 16162.8f482628d1b34d41d496.bundle.js} +2 -2
- package/dist/{16162.9cfcb9db05b9cef9ef2c.bundle.js.map → 16162.8f482628d1b34d41d496.bundle.js.map} +1 -1
- package/dist/{18961.d83ba5fd0855f3cfa7d7.bundle.js → 18961.c6505525fb0491b48f8b.bundle.js} +2 -2
- package/dist/{18961.d83ba5fd0855f3cfa7d7.bundle.js.map → 18961.c6505525fb0491b48f8b.bundle.js.map} +1 -1
- package/dist/19968.fdb823f9a12e11a633ec.bundle.js +2 -0
- package/dist/19968.fdb823f9a12e11a633ec.bundle.js.map +1 -0
- package/dist/{20287.8922d85f31b5c32871fa.bundle.js → 20287.c42f9d1d913c36e46931.bundle.js} +2 -2
- package/dist/{20287.8922d85f31b5c32871fa.bundle.js.map → 20287.c42f9d1d913c36e46931.bundle.js.map} +1 -1
- package/dist/20694.70b6e390d6397249c72d.bundle.js.map +1 -1
- package/dist/{21136.56c47558cdf33e965b38.bundle.js → 21136.199caea09a1c9ad90393.bundle.js} +2 -2
- package/dist/{21136.56c47558cdf33e965b38.bundle.js.map → 21136.199caea09a1c9ad90393.bundle.js.map} +1 -1
- package/dist/{21142.93c830c0610f98d282df.bundle.js → 21142.b690e00c8884fddb2bb3.bundle.js} +2 -2
- package/dist/{21142.93c830c0610f98d282df.bundle.js.map → 21142.b690e00c8884fddb2bb3.bundle.js.map} +1 -1
- package/dist/{21170.40b856a0c1059be48ff7.bundle.js → 21170.d5e3041241741d21080c.bundle.js} +2 -2
- package/dist/{21170.40b856a0c1059be48ff7.bundle.js.map → 21170.d5e3041241741d21080c.bundle.js.map} +1 -1
- package/dist/{21195.96a947771170a900d9e0.bundle.js → 21195.267abc9d42b711d0f17a.bundle.js} +2 -2
- package/dist/{21195.96a947771170a900d9e0.bundle.js.map → 21195.267abc9d42b711d0f17a.bundle.js.map} +1 -1
- package/dist/{25747.ce7c2a7b48934c1426d2.bundle.js → 25747.4e00941ec221c4d6ce8f.bundle.js} +2 -2
- package/dist/{25747.ce7c2a7b48934c1426d2.bundle.js.map → 25747.4e00941ec221c4d6ce8f.bundle.js.map} +1 -1
- package/dist/{27580.0ef093964518f35c5118.bundle.js → 27580.f71ebbc69dd1c7785ef3.bundle.js} +2 -2
- package/dist/{27580.0ef093964518f35c5118.bundle.js.map → 27580.f71ebbc69dd1c7785ef3.bundle.js.map} +1 -1
- package/dist/28050.8ca1fa760c892bfc5466.bundle.js +2 -0
- package/dist/28050.8ca1fa760c892bfc5466.bundle.js.map +1 -0
- package/dist/{31636.43cac2fcf593e3258dc8.bundle.js → 31636.e34ccc2d6f2dec577446.bundle.js} +2 -2
- package/dist/{31636.43cac2fcf593e3258dc8.bundle.js.map → 31636.e34ccc2d6f2dec577446.bundle.js.map} +1 -1
- package/dist/{32489.e369df1e7dac02c0c364.bundle.js → 32489.97fac2c3daa49b143d13.bundle.js} +2 -2
- package/dist/{32489.e369df1e7dac02c0c364.bundle.js.map → 32489.97fac2c3daa49b143d13.bundle.js.map} +1 -1
- package/dist/32534.fb6ef715bfb44761ec63.bundle.js +2 -0
- package/dist/32534.fb6ef715bfb44761ec63.bundle.js.map +1 -0
- package/dist/{34495.0330520329177233edb1.bundle.js → 34495.cfa15bda8009fa37c6ff.bundle.js} +2 -2
- package/dist/{34495.0330520329177233edb1.bundle.js.map → 34495.cfa15bda8009fa37c6ff.bundle.js.map} +1 -1
- package/dist/{38360.386e744b1359deaf4b8e.bundle.js → 38360.0a90e77042876c86b279.bundle.js} +2 -2
- package/dist/{38360.386e744b1359deaf4b8e.bundle.js.map → 38360.0a90e77042876c86b279.bundle.js.map} +1 -1
- package/dist/38412.fa86361561ffa367709f.bundle.js +2 -0
- package/dist/38412.fa86361561ffa367709f.bundle.js.map +1 -0
- package/dist/{38644.5b75d86fdb1b61a01177.bundle.js → 38644.3a0954c798ec413a3810.bundle.js} +2 -2
- package/dist/{38644.5b75d86fdb1b61a01177.bundle.js.map → 38644.3a0954c798ec413a3810.bundle.js.map} +1 -1
- package/dist/{38843.cb5377dcb4da9cb3786d.bundle.js → 38843.5ef7a063337524ce3bb2.bundle.js} +2 -2
- package/dist/{38843.cb5377dcb4da9cb3786d.bundle.js.map → 38843.5ef7a063337524ce3bb2.bundle.js.map} +1 -1
- package/dist/{39518.ae7e3b16d56939b60efc.bundle.js → 39518.4199684f3273d29d9105.bundle.js} +2 -2
- package/dist/{39518.ae7e3b16d56939b60efc.bundle.js.map → 39518.4199684f3273d29d9105.bundle.js.map} +1 -1
- package/dist/{39539.f6e6e6cde9c6f9830cf7.bundle.js → 39539.c23e4878044d73f2505b.bundle.js} +2 -2
- package/dist/{39539.f6e6e6cde9c6f9830cf7.bundle.js.map → 39539.c23e4878044d73f2505b.bundle.js.map} +1 -1
- package/dist/{39874.c2d7cab1a65e5a869e78.bundle.js → 39874.f94a5059e1ae4f4a87e9.bundle.js} +2 -2
- package/dist/39874.f94a5059e1ae4f4a87e9.bundle.js.map +1 -0
- package/dist/{41453.e741eca570ac0a4c772a.bundle.js → 41453.8bb4c783da2c5077a6e9.bundle.js} +2 -2
- package/dist/{41453.e741eca570ac0a4c772a.bundle.js.map → 41453.8bb4c783da2c5077a6e9.bundle.js.map} +1 -1
- package/dist/{42129.0ef4171ed6a1984d759c.bundle.js → 42129.f44b7b20f9cd376c6e59.bundle.js} +2 -2
- package/dist/{42129.0ef4171ed6a1984d759c.bundle.js.map → 42129.f44b7b20f9cd376c6e59.bundle.js.map} +1 -1
- package/dist/{44444.dab617ddb7622503b87c.bundle.js → 44444.ad66c8256bc5b653de1a.bundle.js} +2 -2
- package/dist/{44444.dab617ddb7622503b87c.bundle.js.map → 44444.ad66c8256bc5b653de1a.bundle.js.map} +1 -1
- package/dist/44874.5854c207bbe2c4f2438e.bundle.js +2 -0
- package/dist/44874.5854c207bbe2c4f2438e.bundle.js.map +1 -0
- package/dist/45149.2f77aa736bbfb13fd987.bundle.js +2 -0
- package/dist/45149.2f77aa736bbfb13fd987.bundle.js.map +1 -0
- package/dist/45758.6ceb731cbe0576149f31.bundle.js +2 -0
- package/dist/45758.6ceb731cbe0576149f31.bundle.js.map +1 -0
- package/dist/{46591.ac9d19fd699104a9ed9b.bundle.js → 46591.0b142aa76a8991a89848.bundle.js} +2 -2
- package/dist/46591.0b142aa76a8991a89848.bundle.js.map +1 -0
- package/dist/{55862.8ef52c24ecad5d1b335f.bundle.js → 55862.1fb5abd075ba11a7e93c.bundle.js} +2 -2
- package/dist/{55862.8ef52c24ecad5d1b335f.bundle.js.map → 55862.1fb5abd075ba11a7e93c.bundle.js.map} +1 -1
- package/dist/{58306.69f132627b7aa8a2fd8b.bundle.js → 58306.ba9545cbaee021ebcbce.bundle.js} +2 -2
- package/dist/{58306.69f132627b7aa8a2fd8b.bundle.js.map → 58306.ba9545cbaee021ebcbce.bundle.js.map} +1 -1
- package/dist/{60560.024578077d95b851beea.bundle.js → 60560.37740d97b418899a5d21.bundle.js} +2 -2
- package/dist/{60560.024578077d95b851beea.bundle.js.map → 60560.37740d97b418899a5d21.bundle.js.map} +1 -1
- package/dist/67232.e76f40f9d09e64ebb365.bundle.js.map +1 -1
- package/dist/{67888.0e199b9af05ec62b2aac.bundle.js → 67888.7d4966e0a22ba655f1b8.bundle.js} +2 -2
- package/dist/{67888.0e199b9af05ec62b2aac.bundle.js.map → 67888.7d4966e0a22ba655f1b8.bundle.js.map} +1 -1
- package/dist/{72379.90c38d8cdf911698fd58.bundle.js → 72379.bac50d0011665a85b6cd.bundle.js} +2 -2
- package/dist/{72379.90c38d8cdf911698fd58.bundle.js.map → 72379.bac50d0011665a85b6cd.bundle.js.map} +1 -1
- package/dist/{73667.6eb291069cdbfa7ee5a0.bundle.js → 73667.3dd4f377e7ef54fd8758.bundle.js} +2 -2
- package/dist/{73667.6eb291069cdbfa7ee5a0.bundle.js.map → 73667.3dd4f377e7ef54fd8758.bundle.js.map} +1 -1
- package/dist/73779.193df86f08e3a1d06d67.bundle.js +2 -0
- package/dist/73779.193df86f08e3a1d06d67.bundle.js.map +1 -0
- package/dist/{73793.0f7acda985d6954bb4f8.bundle.js → 73793.6d80d47c26ed60a587fd.bundle.js} +2 -2
- package/dist/{73793.0f7acda985d6954bb4f8.bundle.js.map → 73793.6d80d47c26ed60a587fd.bundle.js.map} +1 -1
- package/dist/{75282.e691d50bb173673e70fc.bundle.js → 75282.88819e851ed18720b275.bundle.js} +2 -2
- package/dist/{75282.e691d50bb173673e70fc.bundle.js.map → 75282.88819e851ed18720b275.bundle.js.map} +1 -1
- package/dist/{75849.ac13a455c619510af005.bundle.js → 75849.51ade15bf0074eab76f3.bundle.js} +2 -2
- package/dist/{75849.ac13a455c619510af005.bundle.js.map → 75849.51ade15bf0074eab76f3.bundle.js.map} +1 -1
- package/dist/78013.e32fade7ad42b64c8122.bundle.js +2 -0
- package/dist/78013.e32fade7ad42b64c8122.bundle.js.map +1 -0
- package/dist/{78250.93a299876bba79ebbff4.bundle.js → 78250.6db42146a120459280e4.bundle.js} +2 -2
- package/dist/{78250.93a299876bba79ebbff4.bundle.js.map → 78250.6db42146a120459280e4.bundle.js.map} +1 -1
- package/dist/{78681.e44a1eb1dce4a8a29f57.bundle.js → 78681.39694d37c0f75ea04df6.bundle.js} +2 -2
- package/dist/{78681.e44a1eb1dce4a8a29f57.bundle.js.map → 78681.39694d37c0f75ea04df6.bundle.js.map} +1 -1
- package/dist/{79329.7f5eab5efab56b8c4f3d.bundle.js → 79329.5a5cbfa466d1c62af915.bundle.js} +2 -2
- package/dist/{79329.7f5eab5efab56b8c4f3d.bundle.js.map → 79329.5a5cbfa466d1c62af915.bundle.js.map} +1 -1
- package/dist/82206.8ec983edcf675cfd4531.bundle.js +2 -0
- package/dist/82206.8ec983edcf675cfd4531.bundle.js.map +1 -0
- package/dist/82896.9aed45baf67510717c6f.bundle.js +2 -0
- package/dist/82896.9aed45baf67510717c6f.bundle.js.map +1 -0
- package/dist/{82926.eb9ca3ba256ddcf218d6.bundle.js → 82926.93dbf44f2bcccba34e9b.bundle.js} +2 -2
- package/dist/{82926.eb9ca3ba256ddcf218d6.bundle.js.map → 82926.93dbf44f2bcccba34e9b.bundle.js.map} +1 -1
- package/dist/85281.27b5a1eb8e7ac2cf8459.bundle.js +2 -0
- package/dist/85281.27b5a1eb8e7ac2cf8459.bundle.js.map +1 -0
- package/dist/{88206.fbbcf8ccd9460c579e87.bundle.js → 88206.28c337e2edbf17928836.bundle.js} +2 -2
- package/dist/88206.28c337e2edbf17928836.bundle.js.map +1 -0
- package/dist/{9062.8b631bfc91a2ae919c46.bundle.js → 9062.d9049833d076191d3e1a.bundle.js} +2 -2
- package/dist/{9062.8b631bfc91a2ae919c46.bundle.js.map → 9062.d9049833d076191d3e1a.bundle.js.map} +1 -1
- package/dist/99379.be6c85ef305af6667dc1.bundle.js +2 -0
- package/dist/99379.be6c85ef305af6667dc1.bundle.js.map +1 -0
- package/dist/{99448.4b7fc65ec6dda3d684c5.bundle.js → 99448.314018d0afb1af150ddf.bundle.js} +2 -2
- package/dist/{99448.4b7fc65ec6dda3d684c5.bundle.js.map → 99448.314018d0afb1af150ddf.bundle.js.map} +1 -1
- package/dist/api/error/error-base.d.ts +1 -1
- package/dist/api/ontotext-workbench-api.js +1 -1
- package/dist/api/ontotext-workbench-api.js.map +1 -1
- package/dist/i18n/locale-en.json +31 -0
- package/dist/i18n/locale-fr.json +31 -0
- package/dist/index.html +8 -8
- package/dist/js/angular/clustermanagement/templates/cluster-nodes-configuration.html +1 -1
- package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
- package/dist/js/angular/core/directives/dynamic-form/templates/dynamic-form.html +1 -1
- package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
- package/dist/js/angular/core/directives/shuttle-multiselect/templates/shuttle-multiselect.html +1 -1
- package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +1 -1
- package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
- package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
- package/dist/js/angular/core/templates/editable-content/editable-content.html +1 -1
- package/dist/js/angular/core/templates/markdown-content/markdown-content.html +1 -1
- package/dist/js/angular/core/templates/search-resource-input.html +1 -1
- package/dist/js/angular/graphql/templates/create-graphql-endpoint.html +4 -3
- package/dist/js/angular/graphql/templates/graphql-endpoint-management.html +1 -1
- package/dist/js/angular/graphql/templates/graphql-playground.html +1 -1
- package/dist/js/angular/graphql/templates/modal/endpoint-configuration-modal.html +1 -1
- package/dist/js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html +1 -1
- package/dist/js/angular/graphql/templates/modal/import-endpoint-definition-modal.html +1 -1
- package/dist/js/angular/security/templates/user.html +2 -2
- package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
- package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-item-detail.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-list.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-panel.html +1 -1
- package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
- package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +2 -2
- package/dist/js/angular/ttyg/templates/modal/external-integration-configuration-modal.html +1 -1
- package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
- package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
- package/dist/{legacyWorkbench.e60d05442435ec0d1bd0.js → legacyWorkbench.57fc12c172f6350ac4c5.js} +3 -3
- package/dist/{legacyWorkbench.e60d05442435ec0d1bd0.js.map → legacyWorkbench.57fc12c172f6350ac4c5.js.map} +1 -1
- package/dist/{main.400f2248f076a2d31d80.js → main.b9a83da68ffc43c91de0.js} +3 -3
- package/dist/{main.400f2248f076a2d31d80.js.map → main.b9a83da68ffc43c91de0.js.map} +1 -1
- package/dist/pages/aclmanagement.html +2 -2
- package/dist/pages/autocomplete.html +1 -1
- package/dist/pages/choose-repository-type.html +1 -1
- package/dist/pages/cluster-management/clusterInfo.html +3 -3
- package/dist/pages/create-index.html +1 -1
- package/dist/pages/dependencies.html +1 -1
- package/dist/pages/domainRangeInfo.html +2 -2
- package/dist/pages/edit.html +1 -1
- package/dist/pages/explore.html +1 -1
- package/dist/pages/export.html +1 -1
- package/dist/pages/find.html +1 -1
- package/dist/pages/graph-config/saveGraphConfig.html +8 -8
- package/dist/pages/graphs-visualizations.html +7 -7
- package/dist/pages/guides.html +1 -1
- package/dist/pages/import.html +2 -2
- package/dist/pages/jdbc-create.html +1 -1
- package/dist/pages/login.html +1 -1
- package/dist/pages/monitor/backup-and-restore.html +1 -1
- package/dist/pages/monitor/queries.html +1 -1
- package/dist/pages/monitor/resources.html +1 -1
- package/dist/pages/namespaces.html +2 -2
- package/dist/pages/plugins.html +1 -1
- package/dist/pages/rdfClassHierarchyInfo.html +7 -7
- package/dist/pages/rdfrank.html +2 -2
- package/dist/pages/repositories.html +1 -1
- package/dist/pages/repository.html +1 -1
- package/dist/pages/similarity-indexes.html +1 -1
- package/dist/pages/sparql-editor.html +1 -1
- package/dist/pages/sparql-template-create.html +1 -1
- package/dist/pages/ux-test1.html +2 -2
- package/dist/pages/webapi.html +2 -2
- package/dist/plugins.js +1 -1
- package/dist/res/swagger5/css/onto-theme.css +1 -1
- package/dist/res/swagger5/index.html +11 -11
- package/dist/shared-components/cjs/onto-cookie-consent_2.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-dialog_2.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-dropdown.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-footer_6.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-language-selector_9.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-layout.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/translate-label.cjs.entry.js +1 -1
- package/dist/shared-components/collection/components/dialogs/onto-cookie-policy-dialog/onto-cookie-policy-dialog.js +1 -1
- package/dist/shared-components/collection/components/dialogs/onto-dialog.js +1 -1
- package/dist/shared-components/collection/components/onto-cookie-consent/onto-cookie-consent.js +1 -1
- package/dist/shared-components/collection/components/onto-dropdown/onto-dropdown.js +1 -1
- package/dist/shared-components/collection/components/onto-footer/onto-footer.js +1 -1
- package/dist/shared-components/collection/components/onto-header/onto-header.js +1 -1
- package/dist/shared-components/collection/components/onto-language-selector/onto-language-selector.js +1 -1
- package/dist/shared-components/collection/components/onto-layout/onto-layout.js +1 -1
- package/dist/shared-components/collection/components/onto-navbar/navbar-model.js +1 -1
- package/dist/shared-components/collection/components/onto-navbar/navbar-service.js +1 -1
- package/dist/shared-components/collection/components/onto-operations-notification/onto-operations-notification.js +1 -1
- package/dist/shared-components/collection/components/onto-rdf-search/onto-rdf-search.js +1 -1
- package/dist/shared-components/collection/components/onto-repository-selector/onto-repository-selector.js +1 -1
- package/dist/shared-components/collection/components/onto-search-icon/onto-search-icon.js +1 -1
- package/dist/shared-components/collection/components/onto-search-resource-input/onto-search-resource-input.js +1 -1
- package/dist/shared-components/collection/components/onto-toastr/onto-toastr.js +1 -1
- package/dist/shared-components/collection/components/onto-toggle-switch/onto-toggle-switch.js +1 -1
- package/dist/shared-components/collection/components/onto-tooltip/onto-tooltip.js +1 -1
- package/dist/shared-components/collection/components/translate-label/translate-label.js +1 -1
- package/dist/shared-components/esm/onto-cookie-consent_2.entry.js +1 -1
- package/dist/shared-components/esm/onto-dialog_2.entry.js +1 -1
- package/dist/shared-components/esm/onto-dropdown.entry.js +1 -1
- package/dist/shared-components/esm/onto-footer_6.entry.js +1 -1
- package/dist/shared-components/esm/onto-language-selector_9.entry.js +1 -1
- package/dist/shared-components/esm/onto-layout.entry.js +1 -1
- package/dist/shared-components/esm/translate-label.entry.js +1 -1
- package/dist/shared-components/shared-components/p-17bac1e3.entry.js +1 -0
- package/dist/shared-components/shared-components/p-1bc2ac8e.entry.js +1 -0
- package/dist/shared-components/shared-components/p-2433b25f.entry.js +1 -0
- package/dist/shared-components/shared-components/p-25fa0ee5.entry.js +1 -0
- package/dist/shared-components/shared-components/{p-a4e82a3f.entry.js → p-6266be98.entry.js} +1 -1
- package/dist/shared-components/shared-components/{p-eed8b067.entry.js → p-91ad7f7f.entry.js} +1 -1
- package/dist/shared-components/shared-components/p-aef0b970.entry.js +1 -0
- package/dist/shared-components/shared-components/shared-components.esm.js +1 -1
- package/dist/shared-components/types/components/onto-dropdown/onto-dropdown.d.ts +2 -2
- package/dist/shared-components/types/components/onto-navbar/navbar-model.d.ts +4 -1
- package/dist/shared-components/types/components/onto-navbar/navbar-toggled-event.d.ts +1 -1
- package/dist/shared-components/types/components/onto-navbar/onto-navbar.d.ts +2 -2
- package/dist/shared-components/types/components/onto-test-context/onto-test-context.d.ts +23 -23
- package/dist/shared-components/types/components/onto-tooltip/models/onto-tooltip-configuration.d.ts +1 -2
- package/dist/shared-components/types/components.d.ts +4 -4
- package/dist/shared-components/types/models/component-event.d.ts +1 -1
- package/dist/shared-components/types/utils/function-utils.d.ts +1 -1
- package/dist/shared-components/types/utils/tooltip-util.d.ts +2 -2
- package/dist/workbench/workbench/workbenchApp.js +1 -1
- package/package.json +8 -2
- package/dist/10142.6a276ff32f58aa4d1b72.bundle.js +0 -2
- package/dist/10142.6a276ff32f58aa4d1b72.bundle.js.map +0 -1
- package/dist/10153.1532fddd43604bf408c3.bundle.js +0 -2
- package/dist/10153.1532fddd43604bf408c3.bundle.js.map +0 -1
- package/dist/10406.7fed4b667b0d2813b305.bundle.js +0 -2
- package/dist/12358.736ea9c178c92655de3a.bundle.js +0 -3
- package/dist/12358.736ea9c178c92655de3a.bundle.js.map +0 -1
- package/dist/14874.17bc671b6ff6123b9eb1.bundle.js +0 -2
- package/dist/14874.17bc671b6ff6123b9eb1.bundle.js.map +0 -1
- package/dist/28050.1359d262b2e2c497ad6d.bundle.js +0 -2
- package/dist/28050.1359d262b2e2c497ad6d.bundle.js.map +0 -1
- package/dist/32534.73081e468e918a03bd70.bundle.js +0 -2
- package/dist/32534.73081e468e918a03bd70.bundle.js.map +0 -1
- package/dist/32606.376e14770ba6e81b7159.bundle.js +0 -2
- package/dist/32606.376e14770ba6e81b7159.bundle.js.map +0 -1
- package/dist/38412.85b4c12f5ed5ffb6e4dd.bundle.js +0 -2
- package/dist/38412.85b4c12f5ed5ffb6e4dd.bundle.js.map +0 -1
- package/dist/39874.c2d7cab1a65e5a869e78.bundle.js.map +0 -1
- package/dist/44874.60bab9adf89019b35654.bundle.js +0 -2
- package/dist/44874.60bab9adf89019b35654.bundle.js.map +0 -1
- package/dist/45758.4e363b98020c3460b4ff.bundle.js +0 -2
- package/dist/45758.4e363b98020c3460b4ff.bundle.js.map +0 -1
- package/dist/46591.ac9d19fd699104a9ed9b.bundle.js.map +0 -1
- package/dist/58163.747b20ea052b22b24bd0.bundle.js +0 -2
- package/dist/58163.747b20ea052b22b24bd0.bundle.js.map +0 -1
- package/dist/73779.c4608b73b63083cb3352.bundle.js +0 -2
- package/dist/73779.c4608b73b63083cb3352.bundle.js.map +0 -1
- package/dist/82206.b3b37c3e0cc1aa18148c.bundle.js +0 -2
- package/dist/82206.b3b37c3e0cc1aa18148c.bundle.js.map +0 -1
- package/dist/85281.049ddec87de0b8b07e79.bundle.js +0 -2
- package/dist/85281.049ddec87de0b8b07e79.bundle.js.map +0 -1
- package/dist/88206.fbbcf8ccd9460c579e87.bundle.js.map +0 -1
- package/dist/99379.d5dffb14dd46150e91f9.bundle.js +0 -2
- package/dist/99379.d5dffb14dd46150e91f9.bundle.js.map +0 -1
- package/dist/shared-components/shared-components/p-106d7df8.entry.js +0 -1
- package/dist/shared-components/shared-components/p-17ce51bb.entry.js +0 -1
- package/dist/shared-components/shared-components/p-306527cc.entry.js +0 -1
- package/dist/shared-components/shared-components/p-96e87635.entry.js +0 -1
- package/dist/shared-components/shared-components/p-af359495.entry.js +0 -1
- /package/dist/{12358.736ea9c178c92655de3a.bundle.js.LICENSE.txt → 12358.2061f29dc113149946a3.bundle.js.LICENSE.txt} +0 -0
- /package/dist/{legacyWorkbench.e60d05442435ec0d1bd0.js.LICENSE.txt → legacyWorkbench.57fc12c172f6350ac4c5.js.LICENSE.txt} +0 -0
- /package/dist/{main.400f2248f076a2d31d80.js.LICENSE.txt → main.b9a83da68ffc43c91de0.js.LICENSE.txt} +0 -0
- /package/dist/shared-components/cjs/{tooltip-util-CmDLnWqH.js → tooltip-util-CnEXLMnw.js} +0 -0
- /package/dist/shared-components/esm/{tooltip-util-C1So-qrf.js → tooltip-util-BqOc8q8q.js} +0 -0
- /package/dist/shared-components/shared-components/{p-Bisudk7O.js → p-DzOPDgzQ.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
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UAAYjE,EAAAA,cAAcC,YAAYiE,eAAezF,IAAI,aACxEH,KAAKuE,0BAEb,CACAA,uBAAAA,GACI,IAAIsB,EAAIC,EAAIC,EACZ,KAAgC,QAAzBF,EAAK7F,KAAK0F,iBAA8B,IAAPG,OAAgB,EAASA,EAAGF,WAChE,OAGJ,MAAMK,EAAeC,IACjB,IAAIJ,EACJI,EAAKC,WAAalG,KAAKsF,eAAeW,EAAKV,OACd,QAAxBM,EAAKI,EAAKE,gBAA6B,IAAPN,OAAgB,EAASA,EAAGO,SAC7DH,EAAKE,SAASE,QAAQL,IAGqD,QAAlFD,EAA+B,QAAzBD,EAAK9F,KAAK0F,iBAA8B,IAAPI,OAAgB,EAASA,EAAGH,iBAA8B,IAAPI,GAAyBA,EAAGM,QAAQC,IAC3HA,EAAOC,MAAMF,QAAQL,KAGzBhG,KAAK0F,UAAUC,UAAY,IAAI3F,KAAK0F,UAAUC,UAClD,CACA,eAAI/B,GAAgB,OAAO4C,EAAAA,EAAAA,GAAWxG,KAAO,GAEjDJ,EAAWoF,MA/KW,+hB","sources":["webpack://root-config/./packages/shared-components/dist/esm/onto-layout.entry.js"],"sourcesContent":["import { r as registerInstance, h, a as Host, g as getElement } from './index-I_gcXFWK.js';\nimport { ServiceProvider, SecurityContextService, AuthenticationService, NavigationContextService, SubscriptionList, WindowService, EventService, EventName, LocalStorageSubscriptionHandlerService, getPathName } from '@ontotext/workbench-api';\n\nfunction debounce(func, wait = 300) {\n let timer;\n return (...args) => {\n clearTimeout(timer);\n timer = setTimeout(() => func.apply(this, args), wait);\n };\n}\n\nconst RESPONSIVE_BREAKPOINTS = {\n MD: 768};\n/**\n * The width of the window in pixels at which the navbar should collapse.\n */\nconst WINDOW_WIDTH_FOR_COLLAPSED_NAVBAR = RESPONSIVE_BREAKPOINTS.MD;\n\nconst ontoLayoutCss = \":host{display:block;height:100%}.wb-layout{display:grid;grid-template-columns:15rem minmax(200px, 1fr);grid-template-rows:auto 1fr auto;grid-template-areas:\\\"nav header\\\" \\\"nav main\\\" \\\"nav footer\\\";min-height:100vh;margin:0}.wb-layout.expanded{grid-template-columns:4.375rem 1fr}.wb-layout nav{grid-area:nav}.wb-layout header{grid-area:header}.wb-layout main{grid-area:main}.wb-layout main .main-container{margin-left:0}.wb-layout .default-slot-wrapper{display:none}.wb-layout footer{grid-area:footer}.wb-header{position:sticky;top:0;z-index:999}\";\n\nconst OntoLayout = class {\n // ========================\n // Lifecycle methods\n // ========================\n constructor(hostRef) {\n registerInstance(this, hostRef);\n // ========================\n // Services\n // ========================\n this.securityContextService = ServiceProvider.get(SecurityContextService);\n this.authenticationService = ServiceProvider.get(AuthenticationService);\n this.navigationContextService = ServiceProvider.get(NavigationContextService);\n this.isLowResolution = false;\n this.hasPermission = true;\n this.showHeader = this.isAuthenticatedFully();\n // ========================\n // Private\n // ========================\n /**\n * List of subscriptions to manage component lifecycle\n * */\n this.subscriptions = new SubscriptionList();\n this.isNavbarCollapsed = false;\n this.windowResizeObserver = debounce(() => this.windowResizeHandler(), 50);\n WindowService.getWindow().addEventListener(\"storage\", this.handleStorageChange);\n }\n componentDidLoad() {\n this.windowResizeHandler();\n }\n connectedCallback() {\n this.subscribeToSecurityChanges();\n this.updateVisibility();\n // Subscribing here, because after a disconnectedCallback the connectedCallback is called, instead of componentDidLoad or constructor\n this.subscriptions.add(this.securityContextService.onRestrictedPagesChanged((restrictedPages) => this.setPermission(restrictedPages)));\n this.subscriptions.add(ServiceProvider.get(EventService).subscribe(EventName.NAVIGATION_END, (navigationEndPayload) => {\n this.navigationContextService.updatePreviousRoute(navigationEndPayload.oldUrl);\n this.setPermission(this.securityContextService.getRestrictedPages());\n }));\n this.setPermission(this.securityContextService.getRestrictedPages());\n }\n /**\n * Lifecycle method called when the component is about to be removed from the DOM.\n * Unsubscribes from all subscriptions to prevent memory leaks.\n */\n disconnectedCallback() {\n this.subscriptions.unsubscribeAll();\n }\n render() {\n return (h(Host, { key: '8ac7b898ae52fb40814ae664c1666ac3d05e3263', class: \"wb-layout\" }, h(\"div\", { key: '2672ccbf6b5f17a25cca8e4db244705ac0fc333d', class: \"default-slot-wrapper\" }, h(\"slot\", { key: '24543fc3c526950e944dc4e37e4ed559fae1c389', name: \"default\" })), h(\"header\", { key: 'a67d6e4932aae82b474d70d220415cea271ffeb9', class: \"wb-header\" }, this.showHeader && h(\"onto-header\", { key: '8bb74bfea276d89824ead02609e80c070582d35e' })), h(\"nav\", { key: 'e5f83abdc3d6f1d89d9e6e2f83b7c6a62bc22389', class: \"wb-navbar\" }, h(\"onto-navbar\", { key: '2265c999b7650d255f28efd07b1f9977b7a9498f', ref: this.assignNavbarRef(), \"navbar-collapsed\": this.isLowResolution })), this.hasPermission ? (h(\"div\", { class: 'main-slot-wrapper' }, h(\"slot\", { name: \"main\" }))) : (h(\"onto-permission-banner\", null)), h(\"footer\", { key: '016c8d0c9c1de47b9c4ccf64a0f717ee67f4fcbc', class: \"wb-footer\" }, h(\"onto-footer\", { key: '90787f7d2c4cf1840ae3048d4b60f4f7c1ea948f' })), h(\"onto-tooltip\", { key: '329f4cf1b14442c59da0125bc8b607185d402134' }), h(\"onto-toastr\", { key: '615db8b9c70a90521ff393c5f98ff1d0c2f511b4' })));\n }\n // ========================\n // Event Listeners\n // ========================\n /**\n * Event listener for the navbar toggled event. The layout needs to respond properly when the navbar is toggled in\n * order to fit the content.\n * @param event\n */\n onNavbarToggled(event) {\n this.isNavbarCollapsed = event.detail.payload;\n if (this.isNavbarCollapsed) {\n this.hostElement.classList.add('expanded');\n }\n else {\n this.hostElement.classList.remove('expanded');\n }\n }\n /**\n * Event listener for window resize event. We need to handle this in order to allow the navbar to collapse when the\n * window is resized.\n */\n onResize() {\n this.windowResizeObserver();\n }\n // ========================\n // Handlers\n // ========================\n windowResizeHandler() {\n this.isLowResolution = WindowService.getWindow().innerWidth <= WINDOW_WIDTH_FOR_COLLAPSED_NAVBAR;\n if (!this.isLowResolution && !this.isNavbarCollapsed) {\n this.hostElement.classList.remove('expanded');\n }\n else {\n this.hostElement.classList.add('expanded');\n }\n }\n handleStorageChange(event) {\n const service = ServiceProvider.get(LocalStorageSubscriptionHandlerService);\n service.handleStorageChange(event);\n }\n // ========================\n // Security & Permissions\n // ========================\n subscribeToSecurityChanges() {\n const securityContextService = ServiceProvider.get(SecurityContextService);\n this.subscriptions.add(securityContextService.onAuthenticatedUserChanged((authenticatedUser) => {\n this.authenticatedUser = authenticatedUser;\n this.updateVisibility();\n }));\n this.subscriptions.add(securityContextService.onSecurityConfigChanged((securityConfig) => {\n this.securityConfig = securityConfig;\n this.updateVisibility();\n }));\n this.subscriptions.add(ServiceProvider.get(EventService).subscribe(EventName.LOGOUT, () => {\n this.setNavbarItemVisibility();\n this.updateVisibility();\n }));\n this.subscriptions.add(securityContextService.onAuthTokenChanged(() => {\n this.setNavbarItemVisibility();\n this.updateVisibility();\n }));\n }\n setPermission(permissions) {\n if (permissions) {\n const path = getPathName();\n this.hasPermission = !permissions.isRestricted(path);\n }\n else {\n // If the permissions are undefined, the user can access the url\n this.hasPermission = true;\n }\n const mainContent = document.querySelector('.wb-layout main');\n if (mainContent) {\n mainContent.style.display = this.hasPermission ? 'block' : 'none';\n }\n }\n updateVisibility() {\n if (!this.authenticationService.isSecurityEnabled()) {\n this.showHeader = true;\n }\n else {\n this.showHeader = this.authenticationService.isLoggedIn() || this.authenticationService.hasFreeAccess();\n }\n }\n isAuthenticatedFully() {\n const authService = ServiceProvider.get(AuthenticationService);\n return !authService.isSecurityEnabled() || authService.isLoggedIn() || authService.hasFreeAccess();\n }\n shouldShowMenu(role) {\n return this.isAuthenticatedFully()\n && ServiceProvider.get(AuthenticationService).hasRole(role);\n }\n // ========================\n // Navbar logic\n // ========================\n assignNavbarRef() {\n return (navbar) => {\n this.navbarRef = navbar;\n this.navbarRef.menuItems = WindowService.getWindow().PluginRegistry.get('main.menu');\n this.setNavbarItemVisibility();\n };\n }\n setNavbarItemVisibility() {\n var _a, _b, _c;\n if (!((_a = this.navbarRef) === null || _a === void 0 ? void 0 : _a.menuItems)) {\n return;\n }\n // recursively check for children and set their shouldShow property\n const processItem = (item) => {\n var _a;\n item.shouldShow = this.shouldShowMenu(item.role);\n if ((_a = item.children) === null || _a === void 0 ? void 0 : _a.length) {\n item.children.forEach(processItem);\n }\n };\n (_c = (_b = this.navbarRef) === null || _b === void 0 ? void 0 : _b.menuItems) === null || _c === void 0 ? void 0 : _c.forEach(plugin => {\n plugin.items.forEach(processItem);\n });\n // Update the reference to trigger a re-render\n this.navbarRef.menuItems = [...this.navbarRef.menuItems];\n }\n get hostElement() { return getElement(this); }\n};\nOntoLayout.style = ontoLayoutCss;\n\nexport { OntoLayout as onto_layout };\n"],"names":["OntoLayout","constructor","hostRef","registerInstance","this","securityContextService","ServiceProvider","get","SecurityContextService","authenticationService","AuthenticationService","navigationContextService","NavigationContextService","isLowResolution","hasPermission","showHeader","isAuthenticatedFully","subscriptions","SubscriptionList","isNavbarCollapsed","windowResizeObserver","func","wait","timer","args","clearTimeout","setTimeout","apply","debounce","windowResizeHandler","WindowService","getWindow","addEventListener","handleStorageChange","componentDidLoad","connectedCallback","subscribeToSecurityChanges","updateVisibility","add","onRestrictedPagesChanged","restrictedPages","setPermission","EventService","subscribe","EventName","NAVIGATION_END","navigationEndPayload","updatePreviousRoute","oldUrl","getRestrictedPages","disconnectedCallback","unsubscribeAll","render","h","Host","key","class","name","ref","assignNavbarRef","onNavbarToggled","event","detail","payload","hostElement","classList","remove","onResize","innerWidth","LocalStorageSubscriptionHandlerService","onAuthenticatedUserChanged","authenticatedUser","onSecurityConfigChanged","securityConfig","LOGOUT","setNavbarItemVisibility","onAuthTokenChanged","permissions","path","getPathName","isRestricted","mainContent","document","querySelector","style","display","isSecurityEnabled","isLoggedIn","hasFreeAccess","authService","shouldShowMenu","role","hasRole","navbar","navbarRef","menuItems","PluginRegistry","_a","_b","_c","processItem","item","shouldShow","children","length","forEach","plugin","items","getElement"],"sourceRoot":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export const __webpack_id__=44874;export const __webpack_ids__=[44874,49539,71920];export const __webpack_modules__={44874:(e,t,n)=>{n.r(t);var a=n(38940),E=n(71920);function A(e,t,n,A){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/agent-select-menu.html",scope:{},link:n=>{n.agentOptionsList=[],n.selectedAgent=void 0,n.onAgentSelected=(a,o)=>{if(!o.isCompatible)return a.stopPropagation(),void a.preventDefault();if(_(o),n.selectedAgent=o,e.selectAgent(o),o.isRepositoryDeleted){const n=t.instant("ttyg.agent.agent_select_menu.configure_agent_modal.title"),a=t.instant("ttyg.agent.agent_select_menu.configure_agent_modal.body");A.openConfirmation(n,a,()=>e.emit(E.TTYGEventName.EDIT_AGENT,o))}};const _=e=>{n.agentOptionsList.forEach(t=>{t.selected=t.data.agent===e})},o=[];o.push(e.onAgentsListChanged(e=>{var t;t=e,n.agentOptionsList=t.agents.map(e=>new a.SelectMenuOptionsModel({value:e.id,label:e.name,data:{agent:e}}))})),o.push(e.subscribe(E.TTYGEventName.AGENT_DELETED,t=>{n.selectedAgent&&n.selectedAgent.id===t.id&&(n.selectedAgent.isDeleted=!0,e.selectAgent(n.selectedAgent))})),o.push(e.onSelectedAgentChanged(e=>{_(e),n.selectedAgent=e})),n.$on("$destroy",()=>{o.forEach(e=>e())})}}}angular.module("graphdb.framework.ttyg.directives.agent-select-menu",[]).directive("agentSelectMenu",A),A.$inject=["TTYGContextService","$translate","$sce","ModalService"]},71920:(e,t,n)=>{n.r(t),n.d(t,{TTYGEventName:()=>A});var a=n(98980);function E(e){let t,n,E,_,o,T={},i=!1;const s=()=>(0,a.cloneDeep)(t),c=()=>(0,a.cloneDeep)(n),C=e=>{n=(0,a.cloneDeep)(e),p(A.CHAT_LIST_UPDATED,c())},d=()=>(0,a.cloneDeep)(E),l=()=>(0,a.cloneDeep)(_),g=()=>(0,a.cloneDeep)(T),D=e=>!!T[e],r=()=>i,p=(t,n)=>{e.emitSync(t,(0,a.cloneDeep)(n))},S=(t,n)=>e.subscribeSync(t,e=>n(e));return{resetContext:()=>{t=void 0,n=void 0,E=void 0,_=void 0,T={},o=void 0,i=!1},emit:p,subscribe:S,getChats:c,updateChats:C,addChat:e=>{n.appendChat(e),C(n)},replaceChat:(e,t)=>{n.replaceChat(e,t),C(n)},onChatsListChanged:e=>(n&&angular.isFunction(e)&&e(c()),S(A.CHAT_LIST_UPDATED,t=>e(t))),getSelectedChat:d,selectChat:e=>{E&&E.id===e.id||(E=(0,a.cloneDeep)(e),p(A.SELECT_CHAT,d()))},deselectChat:()=>{E=void 0,p(A.SELECT_CHAT,d())},deleteChat:e=>{n.deleteChat(e),C(n)},onSelectedChatChanged:e=>(angular.isFunction(e)&&e(d()),S(A.SELECT_CHAT,t=>e(t))),updateSelectedChat:e=>{E&&E.id&&e&&E.id!==e.id||(E=(0,a.cloneDeep)(e),p(A.SELECTED_CHAT_UPDATED,d()))},onSelectedChatUpdated:e=>(E&&angular.isFunction(e)&&e(d()),S(A.SELECTED_CHAT_UPDATED,t=>e(t))),onLastMessageReceived:e=>(E&&angular.isFunction(e)&&e(d()),S(A.LAST_MESSAGE_RECEIVED,t=>e(t))),updateAgents:e=>{t=(0,a.cloneDeep)(e),p(A.AGENT_LIST_UPDATED,s())},onAgentsListChanged:e=>(t&&angular.isFunction(e)&&e(s()),S(A.AGENT_LIST_UPDATED,t=>e(t))),getAgents:s,getAgent:e=>{if(t)return(0,a.cloneDeep)(t.getAgent(e))},selectAgent:e=>{_=(0,a.cloneDeep)(e),p(A.AGENT_SELECTED,l())},getSelectedAgent:l,onSelectedAgentChanged:e=>(_&&angular.isFunction(e)&&e(l()),S(A.AGENT_SELECTED,t=>e(t))),getDefaultAgent:()=>(0,a.cloneDeep)(o),setDefaultAgent:e=>{o=e},setCanModifyAgent:e=>{i=(0,a.cloneDeep)(e),p(A.CAN_MODIFY_AGENT_UPDATED,r())},getCanModifyAgent:r,onCanUpdateAgentUpdated:e=>(angular.isFunction(e)&&e(r()),S(A.CAN_MODIFY_AGENT_UPDATED,t=>e(t))),hasExplainResponse:D,toggleExplainResponse:e=>{D(e)&&(T[e].expanded=!T[e].expanded,p(A.EXPLAIN_RESPONSE_CACHE_UPDATED,g()))},getExplainResponse:e=>(0,a.cloneDeep)(T[e]),addExplainResponseCache:e=>{T[e.answerId]=(0,a.cloneDeep)(e),p(A.EXPLAIN_RESPONSE_CACHE_UPDATED,g())},onExplainResponseCacheUpdated:e=>(angular.isFunction(e)&&e(g()),S(A.EXPLAIN_RESPONSE_CACHE_UPDATED,t=>e(t)))}}angular.module("graphdb.framework.ttyg.services.ttygcontext",[]).factory("TTYGContextService",E),E.$inject=["EventEmitterService","TTYGService"];const A={CREATE_CHAT:"createChat",CREATE_CHAT_SUCCESSFUL:"chatCreated",CREATE_CHAT_FAILURE:"chatCreationFailed",RENAME_CHAT:"renameChat",RENAME_CHAT_SUCCESSFUL:"chatRenamed",RENAME_CHAT_FAILURE:"chatRenamedFailure",SELECT_CHAT:"selectChat",SELECTED_CHAT_UPDATED:"selectChatUpdated",LAST_MESSAGE_RECEIVED:"lastMessageReceived",DELETING_CHAT:"deletingChat",DELETE_CHAT:"deleteChat",DELETE_CHAT_SUCCESSFUL:"chatDeleted",DELETE_CHAT_FAILURE:"chatDeletedFailure",CHAT_EXPORT:"chatExport",CHAT_EXPORT_SUCCESSFUL:"chatExportSuccess",CHAT_EXPORT_FAILURE:"chatExportFailure",CHAT_LIST_UPDATED:"chatListUpdated",ASK_QUESTION:"askQuestion",ASK_QUESTION_FAILURE:"askQuestionFailure",CONTINUE_CHAT_RUN:"continueChatRun",LOAD_CHATS:"loadChats",LOAD_CHAT_SUCCESSFUL:"loadChatSuccess",LOAD_CHAT_FAILURE:"loadChatFailure",AGENT_LIST_UPDATED:"agentListUpdated",OPEN_AGENT_SETTINGS:"openAgentSettings",EDIT_AGENT:"editAgent",CLONE_AGENT:"cloneAgent",DELETE_AGENT:"deleteAgent",AGENT_DELETED:"agentDeleted",DELETING_AGENT:"deletingAgent",AGENT_SELECTED:"agentSelected",GO_TO_CREATE_SIMILARITY_VIEW:"goToCreateSimilarityView",GO_TO_CONNECTORS_VIEW:"goToConnectorsView",GO_TO_AUTOCOMPLETE_INDEX_VIEW:"goToAutocompleteIndexView",EXPLAIN_RESPONSE:"explainResponse",EXPLAIN_RESPONSE_CACHE_UPDATED:"explainResponseCacheUpdated",GO_TO_SPARQL_EDITOR:"openQueryInSparqlEditor",CAN_MODIFY_AGENT_UPDATED:"canModifyAgentUpdated"}}};
|
|
2
|
-
//# sourceMappingURL=44874.60bab9adf89019b35654.bundle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"44874.60bab9adf89019b35654.bundle.js","mappings":"sKAYA,SAASA,EAAyBC,EAAoBC,EAAYC,EAAMC,GACpE,MAAO,CACHC,SAAU,IACVC,YAAa,mDACbC,MAAO,CACP,EACAC,KAAOC,IAMHA,EAAOC,iBAAmB,GAM1BD,EAAOE,mBAAgBC,EAevBH,EAAOI,gBAAkB,CAACC,EAAQC,KAC9B,IAAKA,EAAMC,aAKP,OAFAF,EAAOG,uBACPH,EAAOI,iBAMX,GAHAC,EAAeJ,GACfN,EAAOE,cAAgBI,EACvBd,EAAmBmB,YAAYL,GAC3BA,EAAMM,oBAAqB,CAC3B,MAAMC,EAAQpB,EAAWqB,QAAQ,4DAC3BC,EAAiBtB,EAAWqB,QAAQ,2DAC1CnB,EAAaqB,iBAAiBH,EAAOE,EACjC,IAAMvB,EAAmByB,KAAKC,EAAAA,cAAcC,WAAYb,GAEhE,GAWJ,MAAMI,EAAkBJ,IACpBN,EAAOC,iBAAiBmB,QAASC,IAC7BA,EAAYC,SAAWD,EAAYE,KAAKjB,QAAUA,KAsDpDkB,EAAgB,GAMtBA,EAAcC,KAAKjC,EAAmBkC,oBApDVC,IA8BIC,QA7BLD,EA8BvB3B,EAAOC,iBAAmB2B,EAAgBD,OAAOE,IAAKvB,GAC3C,IAAIwB,EAAAA,uBAAuB,CAC9BC,MAAOzB,EAAM0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M5B,EAAgB,CAIzB8F,YAAa,aAKbC,uBAAwB,cAKxBC,oBAAqB,qBAErBC,YAAa,aACbC,uBAAwB,cACxBC,oBAAqB,qBAKrBnC,YAAa,aAKbM,sBAAuB,oBAKvBG,sBAAuB,sBAMvB2B,cAAe,eAKfC,YAAa,aAKbC,uBAAwB,cASxBC,oBAAqB,qBAErBC,YAAa,aACbC,uBAAwB,oBACxBC,oBAAqB,oBACrBhE,kBAAmB,kBAKnBiE,aAAc,cAKdC,qBAAsB,qBAKtBC,kBAAmB,kBAKnBC,WAAY,YACZC,qBAAsB,kBACtBC,kBAAmB,kBAEnBrC,mBAAoB,mBAMpBsC,oBAAqB,oBAKrBhH,WAAY,YAKZiH,YAAa,aAKbC,aAAc,cAKdjG,cAAe,eAMfkG,eAAgB,gBAKhBtC,eAAgB,gBAKhBuC,6BAA8B,2BAK9BC,sBAAuB,qBAKvBC,8BAA+B,4BAK/BC,iBAAkB,kBAKlBjC,+BAAgC,8BAKhCkC,oBAAqB,0BAErBtC,yBAA0B,wB","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/directives/agent-select-menu.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/services/ttyg-context.service.js"],"sourcesContent":["import {SelectMenuOptionsModel} from \"../../models/form-fields\";\nimport {TTYGEventName} from \"../services/ttyg-context.service\";\n\nconst modules = [\n];\n\nangular\n .module('graphdb.framework.ttyg.directives.agent-select-menu', modules)\n .directive('agentSelectMenu', AgentSelectMenuComponent);\n\nAgentSelectMenuComponent.$inject = ['TTYGContextService', '$translate', '$sce', 'ModalService'];\n\nfunction AgentSelectMenuComponent(TTYGContextService, $translate, $sce, ModalService) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/ttyg/templates/agent-select-menu.html',\n scope: {\n },\n link: ($scope) => {\n\n // =========================\n // Public variables\n // =========================\n\n $scope.agentOptionsList = [];\n\n /**\n * Selected agent ID.\n * @type {AgentModel|undefined}\n */\n $scope.selectedAgent = undefined;\n\n // =========================\n // Private variables\n // =========================\n\n // =========================\n // Public functions\n // =========================\n\n /**\n * Handles the agent selection.\n * @param {Event} $event - The DOM event triggered by the selection.\n * @param {AgentModel} agent - The selected agent instance.\n */\n $scope.onAgentSelected = ($event, agent) => {\n if (!agent.isCompatible) {\n // Prevents the dropdown from closing if the selected agent is not compatible\n // by stopping event propagation and preventing the default action.\n $event.stopPropagation();\n $event.preventDefault();\n return;\n }\n markAsSelected(agent);\n $scope.selectedAgent = agent;\n TTYGContextService.selectAgent(agent);\n if (agent.isRepositoryDeleted) {\n const title = $translate.instant('ttyg.agent.agent_select_menu.configure_agent_modal.title');\n const confirmMessage = $translate.instant('ttyg.agent.agent_select_menu.configure_agent_modal.body');\n ModalService.openConfirmation(title, confirmMessage,\n () => TTYGContextService.emit(TTYGEventName.EDIT_AGENT, agent)\n );\n }\n };\n\n // =========================\n // Private functions\n // =========================\n\n /**\n * Marks the given agent as selected and deselects the rest.\n * @param {AgentModel} agent\n */\n const markAsSelected = (agent) => {\n $scope.agentOptionsList.forEach((agentOption) => {\n agentOption.selected = agentOption.data.agent === agent;\n });\n };\n\n /**\n * Handles the agent list change event.\n * @param {AgentListModel} agents\n */\n const onAgentListChanged = (agents) => {\n buildAgentOptionsModel(agents);\n };\n\n /**\n * Handles the agent deleted event.\n * @param {AgentModel} deletedAgent - the deleted agent\n */\n const onAgentDeleted = (deletedAgent) => {\n if ($scope.selectedAgent && $scope.selectedAgent.id === deletedAgent.id) {\n $scope.selectedAgent.isDeleted = true;\n TTYGContextService.selectAgent($scope.selectedAgent);\n }\n };\n\n /**\n * Handles the selection of an agent. When an agent is selected by the user from this menu, the agent is then\n * saved in the local storage. When the TTYG view is initialized, the selected agent is retrieved from the\n * local and its details loaded through the API. Then this component is updated to reflect the selected agent.\n * @param {AgentModel} agent\n */\n const onSelectedAgentChanged = (agent) => {\n markAsSelected(agent);\n $scope.selectedAgent = agent;\n };\n\n /**\n * Builds the agent options model which is used to display the agents in the select menu.\n * @param {AgentListModel} agentsListModel\n */\n const buildAgentOptionsModel = (agentsListModel) => {\n $scope.agentOptionsList = agentsListModel.agents.map((agent) => {\n return new SelectMenuOptionsModel({\n value: agent.id,\n label: agent.name,\n data: {\n agent: agent\n }\n });\n });\n };\n\n // =========================\n // Subscriptions\n // =========================\n\n const subscriptions = [];\n\n const removeAllSubscribers = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n subscriptions.push(TTYGContextService.onAgentsListChanged(onAgentListChanged));\n subscriptions.push(TTYGContextService.subscribe(TTYGEventName.AGENT_DELETED, onAgentDeleted));\n subscriptions.push(TTYGContextService.onSelectedAgentChanged(onSelectedAgentChanged));\n // Deregister the watcher when the scope/directive is destroyed\n $scope.$on('$destroy', removeAllSubscribers);\n\n // =========================\n // Initialization\n // =========================\n\n function initialize() {\n // buildAgentOptionsModel();\n }\n initialize();\n }\n };\n}\n","import {cloneDeep} from 'lodash';\n\nangular\n .module('graphdb.framework.ttyg.services.ttygcontext', [])\n .factory('TTYGContextService', TTYGContextService);\n\nTTYGContextService.$inject = ['EventEmitterService', 'TTYGService'];\n\nfunction TTYGContextService(EventEmitterService) {\n\n /**\n * The list of agents.\n * @type {AgentListModel}\n * @private\n */\n let _agents = undefined;\n\n /**\n * The ChatsListModel.\n * @type {ChatsListModel}\n * @private\n */\n let _chats = undefined;\n\n /**\n * The currently selected in the UI chat which is used for conversation.\n * @type {ChatModel|undefined}\n * @private\n */\n let _selectedChat = undefined;\n\n /**\n * The currently selected in the UI agent which is used for conversation.\n * @type {AgentModel|undefined}\n * @private\n */\n let _selectedAgent = undefined;\n\n /**\n * Stores information about loaded explain responses.\n * The key is the answer ID, and the value is an instance of {@see ExplainResponseModel} that holds the explanation message.\n *\n * @type {{[key: string]: ExplainResponseModel}}\n */\n let _explainCache = {};\n\n /**\n * The default agent values.\n * @type {AgentModel|undefined}\n * @private\n */\n let _defaultAgent = undefined;\n\n let _canModifyAgent = false;\n\n const resetContext = () => {\n _agents = undefined;\n _chats = undefined;\n _selectedChat = undefined;\n _selectedAgent = undefined;\n _explainCache = {};\n _defaultAgent = undefined;\n _canModifyAgent = false;\n };\n\n /**\n * @return {Promise<AgentModel>}\n */\n const getDefaultAgent = () => {\n return cloneDeep(_defaultAgent);\n };\n\n const setDefaultAgent = (agent) => {\n _defaultAgent = agent;\n };\n\n /**\n * @return {AgentListModel}\n */\n const getAgents = () => {\n return cloneDeep(_agents);\n };\n\n const getAgent = (agentId) => {\n if (_agents) {\n return cloneDeep(_agents.getAgent(agentId));\n }\n };\n\n /**\n * @return {ChatsListModel}\n */\n const getChats = () => {\n return cloneDeep(_chats);\n };\n\n /**\n * @param {ChatsListModel} chats\n */\n const updateChats = (chats) => {\n _chats = cloneDeep(chats);\n emit(TTYGEventName.CHAT_LIST_UPDATED, getChats());\n };\n\n /**\n * Deletes the chat with the provided <code>chatId</code>.\n * @param {ChatModel} chat\n */\n const deleteChat = (chat) => {\n _chats.deleteChat(chat);\n updateChats(_chats);\n };\n\n const addChat = (newChat) => {\n _chats.appendChat(newChat);\n updateChats(_chats);\n };\n\n const replaceChat = (newChat, oldChat) => {\n _chats.replaceChat(newChat, oldChat);\n updateChats(_chats);\n };\n\n /** Subscribes to the 'chatListUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onChatsListChanged = (callback) => {\n if (_chats && angular.isFunction(callback)) {\n callback(getChats());\n }\n return subscribe(TTYGEventName.CHAT_LIST_UPDATED, (chats) => callback(chats));\n };\n\n /**\n * @return {ChatModel}\n */\n const getSelectedChat = () => {\n return cloneDeep(_selectedChat);\n };\n\n /**\n * Updates the selected chat with the provided <code>selectedChat</code> and emits the 'selectChat' event\n * to notify listeners that a new chat has been selected.\n *\n * @param {ChatModel} selectedChat - The chat object to select.\n */\n const selectChat = (selectedChat) => {\n if (!_selectedChat || _selectedChat.id !== selectedChat.id) {\n _selectedChat = cloneDeep(selectedChat);\n emit(TTYGEventName.SELECT_CHAT, getSelectedChat());\n }\n };\n\n const deselectChat = () => {\n _selectedChat = undefined;\n emit(TTYGEventName.SELECT_CHAT, getSelectedChat());\n };\n\n /**\n * Subscribes to the 'selectChat' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onSelectedChatChanged = (callback) => {\n if (angular.isFunction(callback)) {\n callback(getSelectedChat());\n }\n return subscribe(TTYGEventName.SELECT_CHAT, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * Updates the selected chat and emits the 'selectChatUpdated' event to notify listeners that a property\n * of the selected chat has changed.\n *\n * If the ID of the passed chat differs from the current selected chat, no action will occur.\n *\n * The selected chat can be updated through {@link TTYGContextService#selectChat}.\n *\n * @param {ChatModel} chat - The chat object that is being updated.\n */\n const updateSelectedChat = (chat) => {\n if (!_selectedChat || !_selectedChat.id || !chat || _selectedChat.id === chat.id) {\n _selectedChat = cloneDeep(chat);\n emit(TTYGEventName.SELECTED_CHAT_UPDATED, getSelectedChat());\n }\n };\n\n /** Subscribes to the 'selectChat' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onSelectedChatUpdated = (callback) => {\n if (_selectedChat && angular.isFunction(callback)) {\n callback(getSelectedChat());\n }\n return subscribe(TTYGEventName.SELECTED_CHAT_UPDATED, (selectedChat) => callback(selectedChat));\n };\n\n /** Subscribes to the 'lastMessageReceived' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onLastMessageReceived = (callback) => {\n if (_selectedChat && angular.isFunction(callback)) {\n callback(getSelectedChat());\n }\n return subscribe(TTYGEventName.LAST_MESSAGE_RECEIVED, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * @param {AgentListModel} agents\n */\n const updateAgents = (agents) => {\n _agents = cloneDeep(agents);\n emit(TTYGEventName.AGENT_LIST_UPDATED, getAgents());\n };\n\n /**\n * Subscribes to the 'agentListUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onAgentsListChanged = (callback) => {\n if (_agents && angular.isFunction(callback)) {\n callback(getAgents());\n }\n return subscribe(TTYGEventName.AGENT_LIST_UPDATED, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * @return {AgentModel}\n */\n const getSelectedAgent = () => {\n return cloneDeep(_selectedAgent);\n };\n\n /**\n * Updates the selected agent with the provided <code>selectedAgent</code> and emits the 'agentSelected' event\n * to notify listeners that a new agent has been selected.\n *\n * @param {AgentModel} selectedAgent - The instance of selected agent.\n */\n const selectAgent = (selectedAgent) => {\n _selectedAgent = cloneDeep(selectedAgent);\n emit(TTYGEventName.AGENT_SELECTED, getSelectedAgent());\n };\n\n const _getExplainResponseCache = () => {\n return cloneDeep(_explainCache);\n };\n\n /**\n * Gets the explain response.\n * @param {string} answerId\n * @return {ExplainResponseModel}\n */\n const getExplainResponse = (answerId) => {\n return cloneDeep(_explainCache[answerId]);\n };\n\n /**\n * Adds the <code>explainResponse</code> into the explain response cache.\n *\n * @param {ExplainResponseModel} explainResponse\n */\n const addExplainResponseCache = (explainResponse) => {\n _explainCache[explainResponse.answerId] = cloneDeep(explainResponse);\n emit(TTYGEventName.EXPLAIN_RESPONSE_CACHE_UPDATED, _getExplainResponseCache());\n };\n\n const hasExplainResponse = (answerId) => {\n return !!_explainCache[answerId];\n };\n\n const toggleExplainResponse = (answerId) => {\n if (hasExplainResponse(answerId)) {\n _explainCache[answerId].expanded = !_explainCache[answerId].expanded;\n emit(TTYGEventName.EXPLAIN_RESPONSE_CACHE_UPDATED, _getExplainResponseCache());\n }\n };\n\n /**\n * Subscribes to the 'explainResponseCacheUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onExplainResponseCacheUpdated = (callback) => {\n if (angular.isFunction(callback)) {\n callback(_getExplainResponseCache());\n }\n return subscribe(TTYGEventName.EXPLAIN_RESPONSE_CACHE_UPDATED, (explainResponses) => callback(explainResponses));\n };\n\n /**\n * Subscribes to the 'agentSelected' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onSelectedAgentChanged = (callback) => {\n if (_selectedAgent && angular.isFunction(callback)) {\n callback(getSelectedAgent());\n }\n return subscribe(TTYGEventName.AGENT_SELECTED, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * Updates the \"canModifyAgent\" flag and emits the 'canModifyAgentUpdated' event to notify listeners that the canModifyAgent flag is changed.\n *\n * @param {boolean} canModifyAgent\n */\n const setCanModifyAgent = (canModifyAgent) => {\n _canModifyAgent = cloneDeep(canModifyAgent);\n emit(TTYGEventName.CAN_MODIFY_AGENT_UPDATED, getCanModifyAgent());\n };\n\n const getCanModifyAgent = () => {\n return _canModifyAgent;\n };\n\n /**\n * Subscribes to the 'canModifyAgentUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onCanUpdateAgentUpdated = (callback) => {\n if (angular.isFunction(callback)) {\n callback(getCanModifyAgent());\n }\n return subscribe(TTYGEventName.CAN_MODIFY_AGENT_UPDATED, (canModifyAgent) => callback(canModifyAgent));\n };\n\n /**\n * Emits an event with a deep-cloned payload using the EventEmitterService.\n *\n * @param {string} tTYGEventName - The name of the event to emit. It must be a value from {@link TTYGEventName}.\n * @param {*} payload - The data to emit with the event. The payload is deep-cloned before emission.\n */\n const emit = (tTYGEventName, payload) => {\n EventEmitterService.emitSync(tTYGEventName, cloneDeep(payload));\n };\n\n /**\n * Subscribes to an event with the specified callback using the EventEmitterService.\n *\n * @param {string} tTYGEventName - The name of the event to subscribe to. It must be a value from {@link TTYGEventName}.\n * @param {function} callback - The function to call when the event is emitted.\n * @return {function} - Returns a function that can be called to unsubscribe from the event.\n */\n const subscribe = (tTYGEventName, callback) => {\n return EventEmitterService.subscribeSync(tTYGEventName, (payload) => callback(payload));\n };\n\n return {\n resetContext,\n emit,\n subscribe,\n // chats\n getChats,\n updateChats,\n addChat,\n replaceChat,\n onChatsListChanged,\n getSelectedChat,\n selectChat,\n deselectChat,\n deleteChat,\n onSelectedChatChanged,\n updateSelectedChat,\n onSelectedChatUpdated,\n onLastMessageReceived,\n // agents\n updateAgents,\n onAgentsListChanged,\n getAgents,\n getAgent,\n selectAgent,\n getSelectedAgent,\n onSelectedAgentChanged,\n getDefaultAgent,\n setDefaultAgent,\n setCanModifyAgent,\n getCanModifyAgent,\n onCanUpdateAgentUpdated,\n // chat explain\n hasExplainResponse,\n toggleExplainResponse,\n getExplainResponse,\n addExplainResponseCache,\n onExplainResponseCacheUpdated\n };\n}\n\nexport const TTYGEventName = {\n /**\n * Emitting the \"createChat\" event triggers a backend request to create a new chat.\n */\n CREATE_CHAT: 'createChat',\n\n /**\n * This event is emitted when a chat is successfully created.\n */\n CREATE_CHAT_SUCCESSFUL: 'chatCreated',\n\n /**\n * This event is emitted when the creation of a chat fails.\n */\n CREATE_CHAT_FAILURE: 'chatCreationFailed',\n\n RENAME_CHAT: 'renameChat',\n RENAME_CHAT_SUCCESSFUL: 'chatRenamed',\n RENAME_CHAT_FAILURE: 'chatRenamedFailure',\n\n /**\n * Emitting the \"selectChat\" event when the selected chat has been changed.\n */\n SELECT_CHAT: 'selectChat',\n\n /**\n * Emitting the \"selectChatUpdated\" event when the selected chat has been updated.\n */\n SELECTED_CHAT_UPDATED: 'selectChatUpdated',\n\n /**\n * Emitting the \"lastMessageReceived\" event when the final answer message has been received.\n */\n LAST_MESSAGE_RECEIVED: 'lastMessageReceived',\n\n /**\n * This event will be emitted when the chat delete request is in progress. The payload will contain the chat ID\n * and a boolean indicating if the deletion is in progress.\n */\n DELETING_CHAT: 'deletingChat',\n\n /**\n * This event will be emitted when the delete chat process is triggered but before the chat delete request is sent.\n */\n DELETE_CHAT: 'deleteChat',\n\n /**\n * This event will be emitted when the chat was successfully deleted.\n */\n DELETE_CHAT_SUCCESSFUL: 'chatDeleted',\n\n /**\n * This event will be emitted when the attempt to answer the question fails.\n */\n\n /**\n * This event is emitted when the deletion of a chat fails.\n */\n DELETE_CHAT_FAILURE: 'chatDeletedFailure',\n\n CHAT_EXPORT: 'chatExport',\n CHAT_EXPORT_SUCCESSFUL: 'chatExportSuccess',\n CHAT_EXPORT_FAILURE: 'chatExportFailure',\n CHAT_LIST_UPDATED: 'chatListUpdated',\n\n /**\n * Emitting the \"askQuestion\" event triggers a request to the backend to retrieve an answer to a question.\n */\n ASK_QUESTION: 'askQuestion',\n\n /**\n * This event will be emitted when the attempt to answer the question fails.\n */\n ASK_QUESTION_FAILURE: 'askQuestionFailure',\n\n /**\n * Emitting the \"continueChatRun\" event triggers a request to the backend to retrieve more remaining answers from the same chat run.\n */\n CONTINUE_CHAT_RUN: 'continueChatRun',\n\n /**\n * Emitting the \"loadChats\" event will trigger an action to loads all chats from backend server.\n */\n LOAD_CHATS: 'loadChats',\n LOAD_CHAT_SUCCESSFUL: 'loadChatSuccess',\n LOAD_CHAT_FAILURE: 'loadChatFailure',\n\n AGENT_LIST_UPDATED: 'agentListUpdated',\n\n /**\n * This event will be emitted when the create agent process is triggered through the UI but before the agent create\n * request is sent. This is used to open the agent settings dialog.\n */\n OPEN_AGENT_SETTINGS: 'openAgentSettings',\n\n /**\n * This event will be emitted when an agent needs to be edited.\n */\n EDIT_AGENT: 'editAgent',\n\n /**\n * This event will be emitted when an agent needs to be cloned.\n */\n CLONE_AGENT: 'cloneAgent',\n\n /**\n * This event will be emitted when the delete agent process is triggered but before the agent delete request is sent.\n */\n DELETE_AGENT: 'deleteAgent',\n\n /**\n * This event will be emitted when the agent was successfully deleted.\n */\n AGENT_DELETED: 'agentDeleted',\n\n /**\n * This event will be emitted when the agent delete request is in progress. The payload will contain the agent ID\n * and a boolean indicating if the deletion is in progress.\n */\n DELETING_AGENT: 'deletingAgent',\n\n /**\n * This event will be emitted when an agent is selected by the user through the UI.\n */\n AGENT_SELECTED: 'agentSelected',\n\n /**\n * This event will trigger the opening of the similarity view.\n */\n GO_TO_CREATE_SIMILARITY_VIEW: \"goToCreateSimilarityView\",\n\n /**\n * This event will trigger the opening of the connectors view.\n */\n GO_TO_CONNECTORS_VIEW: \"goToConnectorsView\",\n\n /**\n * This event will trigger the opening of the \"Autocomplete index\" view.\n */\n GO_TO_AUTOCOMPLETE_INDEX_VIEW: \"goToAutocompleteIndexView\",\n\n /**\n * This event will trigger fetching a new explanation of how the answer was generated.\n */\n EXPLAIN_RESPONSE: \"explainResponse\",\n\n /**\n * This event will be emitted when the cache with explain responses changed.\n */\n EXPLAIN_RESPONSE_CACHE_UPDATED: \"explainResponseCacheUpdated\",\n\n /**\n * This event will trigger the opening of the sparql view.\n */\n GO_TO_SPARQL_EDITOR: \"openQueryInSparqlEditor\",\n\n CAN_MODIFY_AGENT_UPDATED: \"canModifyAgentUpdated\",\n};\n"],"names":["AgentSelectMenuComponent","TTYGContextService","$translate","$sce","ModalService","restrict","templateUrl","scope","link","$scope","agentOptionsList","selectedAgent","undefined","onAgentSelected","$event","agent","isCompatible","stopPropagation","preventDefault","markAsSelected","selectAgent","isRepositoryDeleted","title","instant","confirmMessage","openConfirmation","emit","TTYGEventName","EDIT_AGENT","forEach","agentOption","selected","data","subscriptions","push","onAgentsListChanged","agents","agentsListModel","map","SelectMenuOptionsModel","value","id","label","name","subscribe","AGENT_DELETED","deletedAgent","isDeleted","onSelectedAgentChanged","$on","removeAllSubscribers","subscription","angular","module","directive","$inject","EventEmitterService","_agents","_chats","_selectedChat","_selectedAgent","_defaultAgent","_explainCache","_canModifyAgent","getAgents","cloneDeep","getChats","updateChats","chats","CHAT_LIST_UPDATED","getSelectedChat","getSelectedAgent","_getExplainResponseCache","hasExplainResponse","answerId","getCanModifyAgent","tTYGEventName","payload","emitSync","callback","subscribeSync","resetContext","addChat","newChat","appendChat","replaceChat","oldChat","onChatsListChanged","isFunction","selectChat","selectedChat","SELECT_CHAT","deselectChat","deleteChat","chat","onSelectedChatChanged","updateSelectedChat","SELECTED_CHAT_UPDATED","onSelectedChatUpdated","onLastMessageReceived","LAST_MESSAGE_RECEIVED","updateAgents","AGENT_LIST_UPDATED","getAgent","agentId","AGENT_SELECTED","getDefaultAgent","setDefaultAgent","setCanModifyAgent","canModifyAgent","CAN_MODIFY_AGENT_UPDATED","onCanUpdateAgentUpdated","toggleExplainResponse","expanded","EXPLAIN_RESPONSE_CACHE_UPDATED","getExplainResponse","addExplainResponseCache","explainResponse","onExplainResponseCacheUpdated","explainResponses","factory","CREATE_CHAT","CREATE_CHAT_SUCCESSFUL","CREATE_CHAT_FAILURE","RENAME_CHAT","RENAME_CHAT_SUCCESSFUL","RENAME_CHAT_FAILURE","DELETING_CHAT","DELETE_CHAT","DELETE_CHAT_SUCCESSFUL","DELETE_CHAT_FAILURE","CHAT_EXPORT","CHAT_EXPORT_SUCCESSFUL","CHAT_EXPORT_FAILURE","ASK_QUESTION","ASK_QUESTION_FAILURE","CONTINUE_CHAT_RUN","LOAD_CHATS","LOAD_CHAT_SUCCESSFUL","LOAD_CHAT_FAILURE","OPEN_AGENT_SETTINGS","CLONE_AGENT","DELETE_AGENT","DELETING_AGENT","GO_TO_CREATE_SIMILARITY_VIEW","GO_TO_CONNECTORS_VIEW","GO_TO_AUTOCOMPLETE_INDEX_VIEW","EXPLAIN_RESPONSE","GO_TO_SPARQL_EDITOR"],"sourceRoot":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export const __webpack_id__=45758;export const __webpack_ids__=[45758];export const __webpack_modules__={45758:(e,t,n)=>{n.r(t),n.d(t,{translate_label:()=>r});var a=n(87848),s=n(77050);n(57154);const r=class{constructor(e){(0,a.r)(this,e),this.translationParameters=[]}connectedCallback(){this.unsubscribeTranslationChanged=s.T.onTranslate(this.labelKey,this.translationParameters,e=>this.translatedLabel=e)}disconnectedCallback(){this.unsubscribeTranslationChanged&&this.unsubscribeTranslationChanged()}render(){return(0,a.h)(a.a,{key:"379e2bf98a702473ef9753bde148d608f2b27509"},this.translatedLabel)}};r.style=":host{display:inline}"},77050:(e,t,n)=>{n.d(t,{T:()=>i,s:()=>s});var a=n(57154);function s(e){const t=document.createElement("textarea");return t.innerHTML=e,t.value}class r{constructor(){this.languageContextService=a.ServiceProvider.get(a.LanguageContextService),this.translationChangedObservers={},this.defaultBundle=this.languageContextService.getDefaultBundle(),this.subscribeToBundleChange()}onTranslate(e,t=[],n=()=>{}){this.translationChangedObservers[e]=this.translationChangedObservers[e]||[];const a={parameters:t,callback:n};return this.translationChangedObservers[e].push(a),n(this.translate(e,t)),()=>{const t=this.translationChangedObservers[e].indexOf(a);-1!==t&&this.translationChangedObservers[e].splice(t,1)}}translate(e,t){return this.translateInLocale(e,t)}translateInLocale(e,t){let n=this.translateFromBundle(this.currentBundle,e);return n||(n=this.translateFromBundle(this.defaultBundle,e)),n?(n=this.applyParameters(n,t),s(n)):(console.warn(`Missing translation for key: [${e}]`),e)}translateFromBundle(e,t){if(!e)return;let n=e[t];return"string"!=typeof n&&(n=this.translateAsJsonObject(e,t)),n}translateAsJsonObject(e,t){let n=t.split(".");return this.getTranslation(e,n)}getTranslation(e,t){if(!t||!e)return;const n=e[t.splice(0,1)[0]];return 0===t.length?n:"string"!=typeof n?t.length>0?this.getTranslation(n,t):n:void 0}applyParameters(e,t){return t?t.reduce((e,t)=>r.replaceAll(e,t),e):e}static replaceAll(e,t){return t?e.split(`{{${t.key}}}`).join(t.value):e}notifyTranslationsChanged(){Object.keys(this.translationChangedObservers).forEach(e=>{(this.translationChangedObservers[e]||[]).forEach(t=>t.callback(this.translate(e,t.parameters)))})}subscribeToBundleChange(){this.languageChangeSubscription=this.languageContextService.onLanguageBundleChanged(e=>{e&&(this.currentBundle=e,this.notifyTranslationsChanged())})}destroy(){this.languageChangeSubscription&&this.languageChangeSubscription()}}const i=new r}};
|
|
2
|
-
//# sourceMappingURL=45758.4e363b98020c3460b4ff.bundle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"45758.4e363b98020c3460b4ff.bundle.js","mappings":"kMAIA,MAEMA,EAAiB,MACnBC,WAAAA,C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,KAAKiE,4BACLjE,KAAKiE,4BAEb,EAEJ,MAAM7D,EAAqB,IAAIiB,C","sources":["webpack://root-config/./packages/shared-components/dist/esm/translate-label.entry.js","webpack://root-config/./packages/shared-components/dist/esm/translation.service-Hf6024E7.js"],"sourcesContent":["import { r as registerInstance, h, a as Host } from './index-I_gcXFWK.js';\nimport { T as TranslationService } from './translation.service-Hf6024E7.js';\nimport '@ontotext/workbench-api';\n\nconst translateLabelCss = \":host{display:inline}\";\n\nconst TranslateLabel = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n /**\n * Represents an array of translation parameters.\n */\n this.translationParameters = [];\n }\n connectedCallback() {\n this.unsubscribeTranslationChanged = TranslationService.onTranslate(this.labelKey, this.translationParameters, (translatedLabel) => this.translatedLabel = translatedLabel);\n }\n disconnectedCallback() {\n this.unsubscribeTranslationChanged && this.unsubscribeTranslationChanged();\n }\n render() {\n return (h(Host, { key: '379e2bf98a702473ef9753bde148d608f2b27509' }, this.translatedLabel));\n }\n};\nTranslateLabel.style = translateLabelCss;\n\nexport { TranslateLabel as translate_label };\n","import { ServiceProvider, LanguageContextService } from '@ontotext/workbench-api';\n\nfunction sanitizeHTML(html) {\n const element = document.createElement('textarea');\n element.innerHTML = html;\n return element.value;\n}\n\n/**\n * Service responsible for translation operations in the component.\n */\nclass TranslationServiceClassDefinition {\n constructor() {\n this.languageContextService = ServiceProvider.get(LanguageContextService);\n this.translationChangedObservers = {};\n // log with background color\n this.defaultBundle = this.languageContextService.getDefaultBundle();\n this.subscribeToBundleChange();\n }\n /**\n * Translates the <code>messageLabelKey</code> with <code>translationParameter</code> and call <code>translationCallback</code> with translation of current language.\n * The <code>translationCallback</code> is called upon subscription and whenever the selected language is changed.\n *\n * @param messageLabelKey - The label key for the translation.\n * @param translationParameter - Parameters, if needed, for translation.\n * @param translationCallback - A function to be called when translating the `messageLabelKey`.\n * @returns A function that, when called, unsubscribes the provided callback from further translation updates.\n */\n onTranslate(messageLabelKey, translationParameter = [], translationCallback = () => { }) {\n this.translationChangedObservers[messageLabelKey] = this.translationChangedObservers[messageLabelKey] || [];\n const observer = { parameters: translationParameter, callback: translationCallback };\n this.translationChangedObservers[messageLabelKey].push(observer);\n translationCallback(this.translate(messageLabelKey, translationParameter));\n return () => {\n const index = this.translationChangedObservers[messageLabelKey].indexOf(observer);\n if (index !== -1) {\n this.translationChangedObservers[messageLabelKey].splice(index, 1);\n }\n };\n }\n /**\n * Translates the provided key using the currently selected language by applying the parameters if\n * provided.\n * @param key The key for the label which needs to be translated.\n * @param parameters Optional parameters which to be applied during the translation.\n */\n translate(key, parameters) {\n return this.translateInLocale(key, parameters);\n }\n /**\n * Translates a given key into the specified locale. If parameters are provided,\n * they will be applied to the translation.\n *\n * @param key - The translation key, which can be dot-separated for nested translations.\n * @param parameters - Optional parameters to be substituted into the translation string.\n * @returns The translated string with parameters applied if available, or the key itself if not found.\n */\n translateInLocale(key, parameters) {\n // Attempt to retrieve the translation from the specified locale's bundle.\n let translation = this.translateFromBundle(this.currentBundle, key);\n // If not found, fall back to the default language bundle.\n if (!translation) {\n translation = this.translateFromBundle(this.defaultBundle, key);\n }\n // If translation was found, apply any parameters provided and return the result.\n if (translation) {\n translation = this.applyParameters(translation, parameters);\n return sanitizeHTML(translation);\n }\n console.warn(`Missing translation for key: [${key}]`);\n return key;\n }\n /**\n * Retrieves a translation from a specified translation bundle using the given key.\n * If the key represents a nested JSON path, it attempts to resolve the key as such.\n *\n * @param bundle - The translation bundle for the specified locale.\n * @param key - The key to translate, which may be a simple key or dot-separated for nested keys.\n * @returns The translation string if found, or `undefined` if not available.\n */\n translateFromBundle(bundle, key) {\n if (!bundle) {\n return undefined;\n }\n // Try to retrieve the translation directly if it is defined as a whole string,\n // for instance as \"some_function.btn.label\".\n let translation = bundle[key];\n // If not found, attempt to retrieve the translation if it is defined as a JSON object.\n if (typeof translation !== 'string') {\n translation = this.translateAsJsonObject(bundle, key);\n }\n return translation;\n }\n /**\n * Resolves a nested translation key by treating it as a path in a JSON object.\n * For example, if the key is \"some.key.path\", this method will navigate through\n * the JSON object structure to retrieve the value at that path.\n *\n * @param bundle - The translation bundle containing nested keys.\n * @param key - The dot-separated key representing the path to the translation.\n * @returns The translation string if found, or `undefined` if the path does not exist.\n */\n translateAsJsonObject(bundle, key) {\n let path = key.split('.');\n return this.getTranslation(bundle, path);\n }\n /**\n * Recursively navigates through a JSON object based on a path array to retrieve\n * a translation string. Each element in the path array represents a nested key.\n *\n * @param jsonObject - The current JSON object or nested object being searched.\n * @param path - An array representing the path to the translation, where each element is a key.\n * @returns The translation string if found, or `undefined` if the path does not exist.\n */\n getTranslation(jsonObject, path) {\n // Stop the recursion if path or reach the inner element\n if (!path || !jsonObject) {\n return undefined;\n }\n const jsonOrTranslation = jsonObject[path.splice(0, 1)[0]];\n if (path.length === 0) {\n return jsonOrTranslation;\n }\n if (typeof jsonOrTranslation !== 'string') {\n // continue if the inner element is not reached.\n if (path.length > 0) {\n return this.getTranslation(jsonOrTranslation, path);\n }\n return jsonOrTranslation;\n }\n return undefined;\n }\n applyParameters(translation, parameters) {\n if (parameters) {\n return parameters.reduce(\n // replace all occurrence of parameter key with parameter value.\n (translation, parameter) => TranslationServiceClassDefinition.replaceAll(translation, parameter), translation);\n }\n return translation;\n }\n static replaceAll(translation, parameter) {\n return parameter ? translation.split(`{{${parameter.key}}}`).join(parameter.value) : translation;\n }\n notifyTranslationsChanged() {\n Object.keys(this.translationChangedObservers).forEach((eventName) => {\n const observers = this.translationChangedObservers[eventName] || [];\n observers.forEach((observer) => observer.callback(this.translate(eventName, observer.parameters)));\n });\n }\n subscribeToBundleChange() {\n this.languageChangeSubscription = this.languageContextService.onLanguageBundleChanged((bundle) => {\n if (bundle) {\n this.currentBundle = bundle;\n this.notifyTranslationsChanged();\n }\n });\n }\n destroy() {\n if (this.languageChangeSubscription) {\n this.languageChangeSubscription();\n }\n }\n}\nconst TranslationService = new TranslationServiceClassDefinition();\n\nexport { TranslationService as T, sanitizeHTML as s };\n"],"names":["TranslateLabel","constructor","hostRef","registerInstance","this","translationParameters","connectedCallback","unsubscribeTranslationChanged","TranslationService","onTranslate","labelKey","translatedLabel","disconnectedCallback","render","h","Host","key","style","sanitizeHTML","html","element","document","createElement","innerHTML","value","TranslationServiceClassDefinition","languageContextService","ServiceProvider","get","LanguageContextService","translationChangedObservers","defaultBundle","getDefaultBundle","subscribeToBundleChange","messageLabelKey","translationParameter","translationCallback","observer","parameters","callback","push","translate","index","indexOf","splice","translateInLocale","translation","translateFromBundle","currentBundle","applyParameters","console","warn","bundle","translateAsJsonObject","path","split","getTranslation","jsonObject","jsonOrTranslation","length","reduce","parameter","replaceAll","join","notifyTranslationsChanged","Object","keys","forEach","eventName","languageChangeSubscription","onLanguageBundleChanged","destroy"],"sourceRoot":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"46591.ac9d19fd699104a9ed9b.bundle.js","mappings":"qKA0BA,SAASA,EAAqCC,EAAQC,EAAmBC,EAAaC,GAElFH,EAAOI,mBAAqBA,EAAAA,mBAC5BJ,EAAOK,uBAAyBA,EAAAA,uBAChCL,EAAOM,SAAWH,EAAKI,eAKvBP,EAAOO,eAAiBJ,EAAKI,eAAiB,IAAIC,EAAAA,oBAAoB,IAAIL,EAAKI,iBAAmB,IAAIC,EAAAA,oBACtGR,EAAOS,QAAU,8CAA8CP,EAAYQ,sBAE3EV,EAAOW,GAAK,KACJX,EAAOY,mBAAmBC,WAAab,EAAOY,mBAAmBE,UAGrEb,EAAkBc,MAAMf,EAAOO,iBAGnCP,EAAOgB,OAAS,KACZf,EAAkBgB,QAAQ,WAG9BjB,EAAOkB,sBAAwB,KACvB,CAACd,EAAAA,mBAAmBe,QAASf,EAAAA,mBAAmBgB,QAAQC,SAASrB,EAAOO,eAAee,cACvFtB,EAAOO,eAAegB,SAAWlB,EAAAA,uBAAuBmB,MAExDxB,EAAOO,eAAegB,SAAWlB,EAAAA,uBAAuBoB,KAGpE,C,SAjDAC,QAAQC,OAAO,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AU,CAAC,SAAU,aAS1C0L,EAAkB1L,QAAU,CAAC,aAAc,SAAU,SAAU,gBAAiB,YAAa,WAAY,SAAU,eAC/G,0BAA2B,cA6O/BoP,EAAuBpP,QAAU,CAAC,SAAU,oBAAqB,0BAA2B,OAAQ,SAAU,aAAc,cAAe,YA0B3I0P,EAAmB1P,QAAU,CAAC,aAAc,SAAU,eAAgB,SAAU,gBAAiB,YAAa,eAAgB,0BAC1H,aAAc,wB,wCC/rBlBH,QACKC,OAAO,iDAHI,IAIXyR,UAAU,cAEf,WACI,MAAO,CACHC,SAAU,IACVC,QAAS,UACTC,KAAM,SAAUC,EAAO/E,EAASgF,EAAMC,GAClCA,EAAKC,YAAYC,SAAW,SAAUC,EAAYC,GAE9C,GAAIJ,EAAKK,SAASD,GACd,MAA2B,UAApBL,EAAKO,WAGhB,IAAKlR,EAAAA,SAASC,WAAW+Q,GACrB,OAAO,EAGX,GAAIL,EAAKtQ,UAAYL,EAAAA,SAASI,eAAe4Q,EAAWL,EAAKtQ,SACzD,OAAO,EAGX,GAAIsQ,EAAKQ,gBAAiB,CACtB,MAAM5Q,EAAoBoQ,EAAKQ,gBAAgBC,MAAM,KACrD,IAAKpR,EAAAA,SAASM,mBAAmB0Q,EAAWzQ,GACxC,OAAO,CAEf,CACA,OAAO,CACX,CACJ,EAER,E","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/repositories/controllers/manage-remote-location-dialog.controller.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/repositories/repository.constants.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/utils/url-utils.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/repositories/controllers.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/validate-url.directive.js"],"sourcesContent":["import {RemoteLocationAuthType, RemoteLocationModel, RemoteLocationType} from \"../../models/repository/remote-location.model\";\nimport 'angular/core/directives/validate-url.directive';\n\nconst modules = [\n 'graphdb.framework.core.directives.validate-url'\n];\n\nangular.module('graphdb.framework.repositories.controllers.manage-remote-location-dialog', modules)\n .controller('ManageRemoteLocationDialogController', ManageRemoteLocationDialogController);\n\nManageRemoteLocationDialogController.$inject = ['$scope', '$uibModalInstance', 'productInfo', 'data'];\n\n/**\n * Controller for managing the remote location dialog, which handles both creation and editing of remote locations.\n *\n * @param {Object} $scope\n * @param {Object} $uibModalInstance\n * @param {Object} productInfo\n * @param {Object} data - Data passed to the dialog:\n * - If `data.remoteLocation` is provided, the dialog is in edit mode\n * and the remote location object is initialized with the provided data.\n * - If `data.remoteLocation` is not provided, the dialog is in create mode\n * and a new `RemoteLocationModel` instance is initialized.\n *\n * @constructor\n */\nfunction ManageRemoteLocationDialogController($scope, $uibModalInstance, productInfo, data) {\n\n $scope.RemoteLocationType = RemoteLocationType;\n $scope.RemoteLocationAuthType = RemoteLocationAuthType;\n $scope.isEdit = !!data.remoteLocation;\n\n /**\n * @type {RemoteLocationModel}\n */\n $scope.remoteLocation = data.remoteLocation ? new RemoteLocationModel({...data.remoteLocation}) : new RemoteLocationModel();\n $scope.docBase = `https://graphdb.ontotext.com/documentation/${productInfo.productShortVersion}`;\n\n $scope.ok = () => {\n if ($scope.remoteLocationForm.$pristine || $scope.remoteLocationForm.$invalid) {\n return;\n }\n $uibModalInstance.close($scope.remoteLocation);\n };\n\n $scope.cancel = () => {\n $uibModalInstance.dismiss('cancel');\n };\n\n $scope.onLocationTypeChanged = () => {\n if ([RemoteLocationType.ONTOPIC, RemoteLocationType.SPARQL].includes($scope.remoteLocation.locationType)) {\n $scope.remoteLocation.authType = RemoteLocationAuthType.BASIC;\n } else {\n $scope.remoteLocation.authType = RemoteLocationAuthType.NONE;\n }\n }\n}\n","export const STATIC_RULESETS = [\n {id: 'empty', name: 'No inference'},\n {id: 'rdfs-optimized', name: 'RDFS (Optimized)'},\n {id: 'rdfs', name: 'RDFS'},\n {id: 'rdfsplus-optimized', name: 'RDFS-Plus (Optimized)'},\n {id: 'owl-horst-optimized', name: 'OWL-Horst (Optimized)'},\n {id: 'owl-horst', name: 'OWL-Horst'},\n {id: 'owl2-ql-optimized', name: 'OWL2-QL (Optimized)'},\n {id: 'owl2-ql', name: 'OWL2-QL'},\n {id: 'owl-max-optimized', name: 'OWL-Max (Optimized)'},\n {id: 'owl-max', name: 'OWL-Max'},\n {id: 'owl2-rl-optimized', name: 'OWL2-RL (Optimized)'},\n {id: 'owl2-rl', name: 'OWL2-RL'},\n\n];\n\nexport const REPOSITORY_TYPES = {graphdbRepo: 'graphdb', free: 'free', eeWorker: 'worker', eeMaster: 'master', ontop: 'ontop', se: 'se', fedx: 'fedx'};\nexport const FILENAME_PATTERN = new RegExp('^[a-zA-Z0-9-_]+$');\nexport const NUMBER_PATTERN = new RegExp('^[0-9]+$');\n","const httpRegex = /^(h|ht|htt|http|https|http:|https:|http:\\/|https:\\/|http:\\/\\/|https:\\/\\/|https?:\\/\\/[\\S]*)$/i;\nconst ftpRegex = /^(f|ft|ftp|ftps|ftp:|ftps:|ftp:\\/|ftps:\\/|ftp:\\/\\/|ftps:\\/\\/[\\S]*)$/i;\n\n\n/**\n * Utilities for URL manipulation, validation, etc.\n */\nexport class UrlUtils {\n /**\n * Validates whether the given string is a valid URL or a partial URL that follows the rules.\n *\n * @param {string} url - The URL string to validate.\n * @return {boolean} True if the URL is valid or a valid partial URL, false otherwise.\n */\n static isValidUrl(url) {\n return httpRegex.test(url) || ftpRegex.test(url);\n }\n\n /**\n * Checks if the URL contains an excluded substring.\n *\n * @param {string} url - The URL string to check.\n * @param {string} exclude - The substring to exclude.\n * @return {boolean} True if the URL does not contain the substring, false if it does.\n */\n static doesNotContain(url, exclude) {\n return !new RegExp(exclude).test(url);\n }\n\n /**\n * Checks if the URL uses an excluded protocol.\n *\n * @param {string} url - The URL string to check.\n * @param {Array<string>} excludedProtocols - The protocols to exclude.\n * @return {boolean} True if the URL does not use the excluded protocols, false if it does.\n */\n static doesNotUseProtocol(url, excludedProtocols) {\n const protocolPattern = new RegExp('^(' + excludedProtocols.join('|') + ')://', 'i');\n return !protocolPattern.test(url);\n }\n}\n","import {\n FILENAME_PATTERN,\n NUMBER_PATTERN,\n REPOSITORY_TYPES,\n STATIC_RULESETS\n} from \"./repository.constants\";\nimport {decodeHTML} from \"../../../app\";\nimport './controllers/manage-remote-location-dialog.controller';\nimport {RemoteLocationType} from \"../models/repository/remote-location.model\";\n\nconst ENTITY_INDEX_SIZE_MIN = 10000;\n\nexport const getFileName = function (path) {\n let lastIdx = path.lastIndexOf('/');\n if (lastIdx === -1) {\n lastIdx = path.lastIndexOf('\\\\');\n }\n let name = path;\n if (lastIdx !== -1) {\n name = name.substring(lastIdx + 1);\n }\n return name;\n};\n\nconst parseNumberParamsIfNeeded = function (params) {\n if (!params) {\n return;\n }\n\n Object.keys(params).forEach(key => {\n const param = params[key];\n if (param && typeof param.value === 'string') {\n const possibleNumber = parseFloat(params[key].value);\n if (!isNaN(possibleNumber) && numberParamToErrorKey[key]) {\n params[key].value = Number.isInteger(possibleNumber) ? parseInt(param.value, 10) : possibleNumber;\n // internal prop to indicate number value and save extra checks\n param.isNumber = true;\n }\n }\n });\n};\n\nconst parseMemberParamIfNeeded = function (param) {\n if (param && param.member) {\n param.member.value = [];\n }\n};\n\nconst getShaclOptionsClass = function () {\n const optionsModule = document.getElementById('shaclOptions');\n\n if (optionsModule) {\n const isAriaExpanded = optionsModule.getAttribute('aria-expanded');\n if (isAriaExpanded && isAriaExpanded === 'true') {\n return 'fa fa-angle-down';\n }\n }\n return 'fa fa-angle-right';\n};\n\nconst numberParamToErrorKey = {\n queryLimitResults: 'invalid.query.limit',\n queryTimeout: 'invalid.query.timeout',\n validationResultsLimitTotal: 'invalid.validation.results.limit.total',\n validationResultsLimitPerConstraint: 'invalid.validation.results.limit.per.constraint',\n joinWorkerThreads: 'invalid.join.worker.threads',\n leftJoinWorkerThreads: 'invalid.left.join.worker.threads',\n unionWorkerThreads: 'invalid.union.worker.threads',\n boundJoinBlockSize: 'invalid.bound.join.block.size',\n entityIndexSize: 'invalid.entity.index.size',\n};\n\nconst getNumberFormatError = function (params, $translate) {\n if (!params) {\n return '';\n }\n\n const errorEntry = Object.keys(params).find((key) => {\n const param = params[key];\n return param.isNumber && !NUMBER_PATTERN.test(param.value);\n });\n\n return errorEntry && numberParamToErrorKey[errorEntry]\n ? $translate.instant(numberParamToErrorKey[errorEntry])\n : '';\n};\n\nconst getDocBase = function (productInfo) {\n return `https://graphdb.ontotext.com/documentation/${productInfo.productShortVersion}`;\n};\nconst filterLocations = function (result) {\n return result.filter((location) => location.isGraphDBLocation() && !location.errorMsg && !location.degradedReason);\n};\n\n/**\n * Gets the remote locations that are error free, without degraded reason and is not of type Ontopic\n * @param {*} $repositories the repositories service\n * @return {[] | Promise} returns the locations as array or a promise of the array\n */\nconst getFilteredLocations = function ($repositories) {\n // Don't allow the user to create repository on location with error or degradeded reason\n return $repositories.getLocations().then((locations) => filterLocations(locations));\n};\n\nconst modules = [\n 'ngCookies',\n 'ui.bootstrap',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.utils.localstorageadapter',\n 'toastr',\n 'ngFileUpload',\n 'graphdb.framework.repositories.controllers.manage-remote-location-dialog',\n];\n\nangular.module('graphdb.framework.repositories.controllers', modules)\n .controller('LocationsAndRepositoriesCtrl', LocationsAndRepositoriesCtrl)\n .controller('AddLocationCtrl', AddLocationCtrl)\n .controller('EditLocationCtrl', EditLocationCtrl)\n .controller('ChooseRepositoryCtrl', ChooseRepositoryCtrl)\n .controller('AddRepositoryCtrl', AddRepositoryCtrl)\n .controller('EditRepositoryCtrl', EditRepositoryCtrl)\n .controller('EditRepositoryFileCtrl', EditRepositoryFileCtrl)\n .controller('UploadRepositoryConfigCtrl', UploadRepositoryConfigCtrl);\n\nLocationsAndRepositoriesCtrl.$inject = ['$scope', '$rootScope', '$uibModal', 'toastr', '$repositories', 'ModalService', 'AuthTokenService', 'LocationsRestService',\n 'LocalStorageAdapter', '$interval', '$translate', '$q', 'GuidesService'];\n\nfunction LocationsAndRepositoriesCtrl($scope, $rootScope, $uibModal, toastr, $repositories, ModalService, AuthTokenService, LocationsRestService,\n LocalStorageAdapter, $interval, $translate, $q, GuidesService) {\n\n $scope.RemoteLocationType = RemoteLocationType;\n $scope.loader = true;\n /**\n * @type {RemoteLocationModel[]}\n */\n $scope.locations = [];\n\n $scope.isLocationInactive = function (location) {\n return !location.active || !$scope.hasActiveLocation();\n };\n\n const getLocationsAbortRequestPromise = $q.defer();\n //Get locations\n function getLocations() {\n return $repositories.getLocations(getLocationsAbortRequestPromise)\n .then((locations) => {\n $scope.locations = locations;\n return locations;\n })\n .finally(() => $scope.loader = false);\n }\n\n $scope.getLocalLocation = (local, locationType) => {\n const remoteLocationModel = $scope.locations.filter((location) => {\n let locationTypeCheck = true;\n if (locationType) {\n locationTypeCheck = location.locationType === locationType;\n }\n return locationTypeCheck && location.local === local;\n });\n return remoteLocationModel;\n };\n\n $scope.hasAnyRemoteLocation = (local, locationTypes) => {\n return locationTypes.some((locationType) => $scope.getLocalLocation(local, locationType).length > 0);\n };\n\n $scope.hasActiveLocation = function () {\n return $repositories.hasActiveLocation();\n };\n\n $scope.getActiveLocation = function () {\n return $repositories.getActiveLocation();\n };\n\n $scope.getLocationError = function () {\n return $repositories.getLocationError();\n };\n\n $scope.getDegradedReason = function () {\n return $repositories.getDegradedReason();\n };\n\n $scope.getRepositories = function () {\n return $repositories.getRepositories();\n };\n\n $scope.isRepoActive = function (repo) {\n return $repositories.isRepoActive(repo);\n };\n\n //Delete location\n $scope.deleteLocation = function (uri) {\n ModalService.openSimpleModal({\n title: $translate.instant('location.confirm.detach'),\n message: $translate.instant('location.confirm.detach.warning', {uri: uri}),\n warning: true\n }).result\n .then(function () {\n $scope.loader = true;\n $repositories.deleteLocation(uri).finally(() => getLocations());\n });\n };\n\n //Add new location\n $scope.addLocationHttp = function (dataAddLocation) {\n $scope.loader = true;\n LocationsRestService.addLocation(dataAddLocation)\n .success(function () {\n //Reload locations and repositories\n $repositories.init();\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n })\n .finally(() => getLocations());\n };\n\n $scope.addLocation = () => {\n $scope.openRemoteLocationDialog();\n };\n\n $scope.editLocation = (remoteLocation) => {\n if (remoteLocation.locationType === undefined) {\n // for backward compatibility. The old instances this property not exist so we assume it is GraphDB instance.\n remoteLocation.locationType = RemoteLocationType.GRAPH_DB;\n }\n $scope.openRemoteLocationDialog(remoteLocation);\n };\n\n /**\n * Opens the location dialog.\n * @param {RemoteLocationModel} remoteLocation (optional) If a location is passed, the dialog will open for editing; otherwise, it will open for registering a new one.\n */\n $scope.openRemoteLocationDialog = (remoteLocation) => {\n $uibModal.open({\n templateUrl: 'js/angular/repositories/templates/manage-remote-location-dialog.template.html',\n windowClass: 'addLocationDialog',\n controller: 'ManageRemoteLocationDialogController',\n resolve: {\n data: () => {\n return {\n remoteLocation\n };\n }\n }\n }).result.then((dataAddLocation) => {\n if (remoteLocation) {\n $scope.editLocationHttp(dataAddLocation);\n } else {\n $scope.addLocationHttp(dataAddLocation);\n }\n });\n };\n\n //Edit location\n $scope.editLocationHttp = function (dataEditLocation) {\n $scope.loader = true;\n LocationsRestService.editLocation(dataEditLocation)\n .success(function () {\n //Reload locations and repositories\n $repositories.init();\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n })\n .finally(() => getLocations());\n };\n\n //Change repository\n $scope.setRepository = function (repo) {\n $repositories.setRepository(repo);\n };\n\n //Delete repository\n $scope.deleteRepository = function (repository) {\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm.delete'),\n message: decodeHTML($translate.instant('delete.repo.warning.msg', {repositoryId: repository.id})),\n warning: true\n }).result\n .then(function () {\n $scope.loader = true;\n $repositories.deleteRepository(repository)\n .finally(() => {\n getLocations();\n $scope.loader = false;\n });\n removeCachedGraphsOnDelete(repository);\n });\n };\n\n $scope.restartRepository = function (repository) {\n ModalService.openSimpleModal({\n title: $translate.instant('confirm.restart.repo'),\n message: decodeHTML($translate.instant('confirm.restart.repo.warning.msg', {repositoryId: repository.id})),\n warning: true\n }).result\n .then(function () {\n $scope.loader = true;\n $repositories.restartRepository(repository).finally(() => getLocations());\n });\n };\n\n $scope.toggleDefaultRepository = function (repositoryId) {\n if ($scope.getDefaultRepository() === repositoryId) {\n // unset\n $repositories.setDefaultRepository(null);\n } else {\n // set\n $repositories.setDefaultRepository(repositoryId);\n }\n };\n\n $scope.getDefaultRepository = function () {\n return $repositories.getDefaultRepository();\n };\n\n /* Unused, data urls don't behave well in all browsers, avoid them when possible\n $scope.getRepoTurtleConfig = function (repository) {\n function downloadRepoConfig(repoTurtleConfig, repository) {\n $('.download-turtle-config')\n .mouseup(function () {\n $(this)\n .attr('href', repoTurtleConfig)\n .attr('download', repository.id + '-config.ttl')\n });\n }\n\n $repositories.getRepositoryTurtleConfig(repository)\n .success(function (response) {\n var repoTurtleConfigDownload = 'data:application/octet-stream;charset=utf-8;base64,'\n + btoa(unescape(encodeURIComponent(response)));\n downloadRepoConfig(repoTurtleConfigDownload, repository);\n })\n .error(function () {\n toastr.error('Error getting repository configuration for '' + repository.id + ''');\n });\n };\n */\n\n $scope.getRepositoryDownloadLink = function (repository) {\n let url = `rest/repositories/${repository.id}${(repository.type === REPOSITORY_TYPES.ontop ? '/download-zip'\n : '/download-ttl')}?location=${repository.location}`;\n const token = AuthTokenService.getAuthToken();\n if (token) {\n url = `${url}&authToken=${encodeURIComponent(token)}`;\n }\n return url;\n };\n\n ///Copy to clipboard popover options\n $scope.copyToClipboard = function (uri) {\n ModalService.openCopyToClipboardModal(uri);\n };\n\n $scope.fromFile = function () {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/templates/modal/upload-repository-config.html',\n controller: 'UploadRepositoryConfigCtrl'\n });\n modalInstance.result.then(function () {\n $repositories.init();\n });\n };\n\n //Delete repository\n $scope.openActiveLocationSettings = function () {\n $uibModal.open({\n templateUrl: 'js/angular/settings/modal/location-settings.html',\n controller: 'ActiveLocationSettingsCtrl'\n });\n };\n\n getLocations();\n const timer = $interval(function () {\n if (GuidesService.isActive() && !$rootScope.guidePaused) {\n // Don't refresh list while a guide is active\n return;\n }\n\n // Update repositories state\n $repositories.initQuick();\n getLocations();\n }, 5000);\n\n $scope.$on('$destroy', function () {\n $interval.cancel(timer);\n // If there is a getLocations request in progress, abort it so the service can properly clear flags\n if (getLocationsAbortRequestPromise) {\n getLocationsAbortRequestPromise.resolve();\n }\n });\n\n function removeCachedGraphsOnDelete(repo) {\n const cashedDependenciesGraphPrefix = `dependencies-selectedGraph-${repo.id}`;\n const cashedClassHierarchyGraphPrefix = `classHierarchy-selectedGraph-${repo.id}`;\n angular.forEach(LocalStorageAdapter.keys(), function (key) {\n // remove everything but the hide prefixes setting, it should always persist\n if (key.startsWith(cashedClassHierarchyGraphPrefix) || key.startsWith(cashedDependenciesGraphPrefix)) {\n LocalStorageAdapter.remove(key);\n }\n });\n }\n\n $scope.getRepositoriesFromLocation = function (locationId) {\n return $repositories.getRepositoriesFromLocation(locationId);\n };\n}\n\nUploadRepositoryConfigCtrl.$inject = ['$scope', '$uibModalInstance', 'Upload', 'toastr', '$translate'];\n\nfunction UploadRepositoryConfigCtrl($scope, $uibModalInstance, Upload, toastr, $translate) {\n $scope.upload = function (files) {\n if (files && files.length) {\n $scope.uploadFile = files[0];\n }\n };\n $scope.ok = function () {\n if ($scope.uploadFile) {\n $scope.uploadFileLoader = true;\n Upload.upload({\n url: 'rest/repositories',\n method: 'POST',\n data: {config: $scope.uploadFile}\n })\n .success(function () {\n $scope.uploadFileLoader = false;\n $uibModalInstance.close();\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.uploadFileLoader = false;\n });\n }\n };\n $scope.cancel = function () {\n $uibModalInstance.dismiss('cancel');\n };\n}\n\nAddLocationCtrl.$inject = ['$scope', '$uibModalInstance', 'toastr', 'productInfo', '$translate'];\n\nfunction AddLocationCtrl($scope, $uibModalInstance, toastr, productInfo, $translate) {\n\n $scope.newLocation = {\n 'uri': '',\n 'authType': 'none',\n 'username': '',\n 'password': '',\n 'active': false\n };\n $scope.docBase = getDocBase(productInfo);\n\n $scope.isValidLocation = function () {\n return ($scope.newLocation.uri.length < 6 ||\n $scope.newLocation.uri.indexOf('http:') === 0 || $scope.newLocation.uri.indexOf('https:') === 0)\n && $scope.newLocation.uri.indexOf('/repositories') <= -1;\n };\n\n $scope.ok = function () {\n if (!$scope.newLocation) {\n toastr.error($translate.instant('location.cannot.be.empty.error'));\n return;\n }\n $uibModalInstance.close($scope.newLocation);\n };\n\n $scope.cancel = function () {\n $uibModalInstance.dismiss('cancel');\n };\n}\n\nEditLocationCtrl.$inject = ['$scope', '$uibModalInstance', 'location', 'productInfo'];\n\nfunction EditLocationCtrl($scope, $uibModalInstance, location, productInfo) {\n\n $scope.editedLocation = _.cloneDeep(location);\n $scope.docBase = getDocBase(productInfo);\n\n $scope.ok = function () {\n $uibModalInstance.close($scope.editedLocation);\n };\n\n $scope.cancel = function () {\n $uibModalInstance.dismiss('cancel');\n };\n}\n\nChooseRepositoryCtrl.$inject = ['$scope', '$location'];\n\nfunction ChooseRepositoryCtrl($scope, $location) {\n $scope.repositoryTypes = REPOSITORY_TYPES;\n $scope.chooseRepositoryType = function (repoType) {\n $location.path(`${$location.path()}/${repoType}`);\n };\n}\n\nAddRepositoryCtrl.$inject = ['$rootScope', '$scope', 'toastr', '$repositories', '$location', '$timeout', 'Upload', '$routeParams',\n 'RepositoriesRestService', '$translate'];\n\nfunction AddRepositoryCtrl($rootScope, $scope, toastr, $repositories, $location, $timeout, Upload, $routeParams, RepositoriesRestService, $translate) {\n $scope.rulesets = STATIC_RULESETS.slice();\n $scope.repositoryTypes = REPOSITORY_TYPES;\n $scope.params = $routeParams;\n $scope.repositoryType = $routeParams.repositoryType;\n $scope.enable = true;\n $scope.entityIndexSizeMin = ENTITY_INDEX_SIZE_MIN;\n\n $scope.loader = true;\n $scope.pageTitle = $translate.instant('view.create.repo.title');\n $scope.repositoryInfo = {\n id: '',\n params: {},\n title: '',\n type: '',\n location: ''\n };\n\n getFilteredLocations($repositories)\n .then((locations) => {\n $scope.locations = locations;\n });\n\n $scope.changedLocation = function () {\n $scope.$broadcast('changedLocation');\n };\n\n function isValidEERepository(repositoryType) {\n return $scope.isEnterprise() && (repositoryType === REPOSITORY_TYPES.graphdbRepo);\n }\n\n function isValidSERepository(repositoryType) {\n return !$scope.isFreeEdition() && !$scope.isEnterprise() && repositoryType === REPOSITORY_TYPES.graphdbRepo;\n }\n\n function isValidFRRepository(repositoryType) {\n return $scope.isFreeEdition() && repositoryType === REPOSITORY_TYPES.graphdbRepo;\n }\n\n function isValidOntopRepository(repositoryType) {\n return repositoryType === REPOSITORY_TYPES.ontop;\n }\n\n function isValidFedXRepository(repositoryType) {\n return repositoryType === REPOSITORY_TYPES.fedx;\n }\n\n function isRepositoryTypeValid(repositoryType) {\n return isValidEERepository(repositoryType) || isValidSERepository(repositoryType)\n || isValidFRRepository(repositoryType) || isValidOntopRepository(repositoryType)\n || isValidFedXRepository(repositoryType);\n }\n\n function setPageTitle(repositoryType) {\n switch (repositoryType) {\n case REPOSITORY_TYPES.graphdbRepo:\n $scope.pageTitle = $translate.instant('view.create.repo.title', {repoType: 'GraphDB'});\n break;\n case REPOSITORY_TYPES.ontop:\n $scope.pageTitle = $translate.instant('view.create.repo.title', {repoType: 'Ontop Virtual SPARQL'});\n break;\n case REPOSITORY_TYPES.fedx:\n $scope.pageTitle = $translate.instant('view.create.repo.title', {repoType: 'FedX Virtual SPARQL'});\n break;\n }\n }\n\n $scope.getConfig = function (repoType) {\n RepositoriesRestService.getRepositoryConfiguration(repoType).then(function (resp) {\n const data = resp.data;\n $scope.repositoryInfo.params = data.params;\n $scope.repositoryInfo.type = data.type;\n parseNumberParamsIfNeeded($scope.repositoryInfo.params);\n parseMemberParamIfNeeded($scope.repositoryInfo.params);\n $scope.loader = false;\n // The clean way is the \"autofocus\" attribute and we use it but it doesn't seem to\n // work in all browsers because of the way dynamic content is handled so give it another\n // try here.\n $timeout(function () {\n // Focus the ID field\n angular.element(document).find('#id').focus();\n }, 50);\n }).catch(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n };\n\n if ($scope.repositoryType && isRepositoryTypeValid($scope.repositoryType)) {\n $scope.repositoryInfo.type = $scope.repositoryType;\n $scope.getConfig($scope.repositoryType);\n setPageTitle($scope.repositoryType);\n } else {\n $location.path('/repository/create');\n }\n\n $scope.hasActiveLocation = function () {\n return $repositories.hasActiveLocation();\n };\n\n $scope.activeLocation = function () {\n return $repositories.getActiveLocation();\n };\n\n let isInvalidPieFile = false;\n $scope.uploadRuleset = function (files) {\n if (files && files.length) {\n $scope.uploadFile = files[0];\n $scope.uploadFileLoader = true;\n Upload.upload({\n url: 'rest/repositories/ruleset/upload',\n data: {ruleset: $scope.uploadFile, location: $scope.repositoryInfo.location}\n }).progress(function (evt) {\n /*\t\t\t\t\t\tvar progressPercentage = parseInt(100.0 * evt.loaded / evt.total);\n console.log('progress: ' + progressPercentage + '% ' + evt.config.file.name);*/\n }).success(function (data) {\n if (!data.success) {\n toastr.error(data.errorMessage);\n isInvalidPieFile = true;\n $scope.uploadFile = '';\n } else {\n isInvalidPieFile = false;\n const fileName = $scope.uploadFile.name;\n const newValue = {id: data.fileLocation, name: 'Custom: ' + fileName};\n if ($scope.rulesetPie) {\n // file was previously uploaded\n $scope.rulesets[0] = newValue;\n } else {\n // file uploaded for the first time\n $scope.rulesets.unshift(newValue);\n }\n $scope.rulesetPie = data.fileLocation;\n $scope.rulesetPieFile = fileName;\n $scope.repositoryInfo.params.ruleset.value = $scope.rulesetPie;\n }\n $scope.uploadFileLoader = false;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.uploadFile = '';\n $scope.uploadFileLoader = false;\n isInvalidPieFile = true;\n });\n }\n };\n\n $scope.noMembersError = function () {\n toastr.error($translate.instant('fedx.create.repo.no.members.warning'));\n };\n\n $scope.goBackToPreviousLocation = function () {\n if (angular.isDefined($routeParams.previous)) {\n delete $location.$$search.previous;\n $location.path('/');\n } else {\n $location.path('/repository');\n }\n };\n\n $scope.createRepoHttp = function () {\n $scope.loader = true;\n RepositoriesRestService.createRepository($scope.repositoryInfo)\n .then(function () {\n toastr.success($translate.instant('created.repo.success.msg', {repoId: $scope.repositoryInfo.id}));\n return $repositories.init();\n })\n .then(() => $scope.goBackToPreviousLocation())\n .catch(function (error) {\n const msg = getError(error.data);\n toastr.error(msg, $translate.instant('common.error'));\n })\n .finally(() => {\n $scope.loader = false;\n });\n };\n\n $scope.createRepo = function () {\n if (!$scope.repositoryInfo.id) {\n toastr.error($translate.instant('empty.repoid.warning'));\n return;\n }\n\n $scope.isInvalidRepoName = !FILENAME_PATTERN.test($scope.repositoryInfo.id);\n $scope.isInvalidEntityIndexSizeMin = $scope.repositoryInfo.params.entityIndexSize?.value < ENTITY_INDEX_SIZE_MIN;\n const numberFormatError = getNumberFormatError($scope.repositoryInfo.params, $translate);\n\n if (isInvalidPieFile) {\n toastr.error($translate.instant('invalid.ruleset.file.error'));\n } else if ($scope.isInvalidRepoName) {\n toastr.error($translate.instant('wrong.repo.name.error'));\n } else if ($scope.repositoryType === \"fedx\" && $scope.repositoryInfo.params.member.value.length === 0) {\n $scope.noMembersError();\n } else if (numberFormatError) {\n toastr.error(numberFormatError);\n } else if ($scope.isInvalidEntityIndexSizeMin){\n toastr.error($translate.instant('repo.error.entityIndex.min'));\n } else {\n $scope.createRepoHttp();\n }\n };\n\n $scope.rulesetWarning = function () {\n const pp = $scope.repositoryInfo.params;\n if (pp === undefined || pp.ruleset === undefined || pp.disableSameAs === undefined) {\n return '';\n }\n\n if (pp.ruleset.value.indexOf('owl') === 0 && pp.disableSameAs.value === 'true') {\n return $translate.instant('repoTooltips.rulesetWarnings.needsSameAs');\n } else if (pp.ruleset.value.indexOf('rdfs') === 0 && pp.disableSameAs.value === 'false') {\n return $translate.instant('repoTooltips.rulesetWarnings.doesntNeedSameAs');\n } else if (pp.ruleset.value === $scope.rulesetPie) {\n return $translate.instant('repoTooltips.rulesetWarnings.customRuleset');\n } else {\n return '';\n }\n };\n\n $scope.getShaclOptionsClass = function () {\n return getShaclOptionsClass();\n };\n //TODO - check if repositoryID exist\n\n // Request auto-focus of the ID input when creating a repo (but not when editing)\n $scope.autofocusId = 'autofocus';\n\n const languageChangedSubscription = $rootScope.$on('$translateChangeSuccess', () => {\n setPageTitle($scope.repositoryType);\n });\n $scope.$on('$destroy', () => {\n languageChangedSubscription();\n });\n}\n\nEditRepositoryFileCtrl.$inject = ['$scope', '$uibModalInstance', 'RepositoriesRestService', 'file', 'toastr', '$translate', 'dialogTitle', 'location'];\n\nfunction EditRepositoryFileCtrl($scope, $uibModalInstance, RepositoriesRestService, file, toastr, $translate, dialogTitle, location) {\n\n $scope.dialogTitle = dialogTitle ? dialogTitle : $translate.instant('update.file.content.header');\n if (file) {\n RepositoriesRestService.getRepositoryFileContent(file, location).success(function (data) {\n $scope.fileContent = data;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n });\n }\n\n $scope.ok = function () {\n $uibModalInstance.close({\n content: $scope.fileContent,\n fileLocation: file\n });\n };\n\n $scope.cancel = function () {\n $uibModalInstance.dismiss('cancel');\n };\n}\n\nEditRepositoryCtrl.$inject = ['$rootScope', '$scope', '$routeParams', 'toastr', '$repositories', '$location', 'ModalService', 'RepositoriesRestService',\n '$translate', 'MonitoringRestService'];\n\nfunction EditRepositoryCtrl($rootScope, $scope, $routeParams, toastr, $repositories, $location, ModalService, RepositoriesRestService, $translate, MonitoringRestService) {\n\n $scope.rulesets = STATIC_RULESETS.slice();\n $scope.repositoryTypes = REPOSITORY_TYPES;\n $scope.entityIndexSizeMin = ENTITY_INDEX_SIZE_MIN;\n\n $scope.editRepoPage = true;\n $scope.canEditRepoId = false;\n $scope.isRepoInCluster = true;\n $scope.params = $routeParams;\n $scope.loader = true;\n $scope.repositoryInfo = {};\n $scope.repositoryInfo.id = $scope.params.repositoryId;\n $scope.repositoryInfo.location = $scope.params.location;\n $scope.repositoryInfo.restartRequested = false;\n $scope.repositoryType = '';\n $scope.saveRepoId = $scope.params.repositoryId;\n $scope.pageTitle = $translate.instant('view.edit.repo.title', {repositoryId: $scope.params.repositoryId});\n $scope.hasActiveLocation = function () {\n return $repositories.hasActiveLocation();\n };\n\n const loadRepositoryData = () => {\n return getFilteredLocations($repositories).then((locations) => {\n $scope.locations = locations;\n return RepositoriesRestService.getRepository($scope.repositoryInfo);\n });\n };\n\n const initView = (repositoryInfoResponse) => {\n const repositoryInfo = repositoryInfoResponse.data;\n if (angular.isDefined(repositoryInfo.params.ruleset)) {\n let ifRulesetExists = false;\n angular.forEach($scope.rulesets, function (item) {\n if (item.id === repositoryInfo.params.ruleset.value) {\n ifRulesetExists = true;\n }\n });\n if (repositoryInfo.params.ruleset && !ifRulesetExists) {\n const name = getFileName(repositoryInfo.params.ruleset.value);\n $scope.rulesets.unshift({id: repositoryInfo.params.ruleset.value, name: 'Custom: ' + name});\n }\n }\n $scope.repositoryInfo = repositoryInfo;\n $scope.setRepositoryType(repositoryInfo.type);\n parseNumberParamsIfNeeded($scope.repositoryInfo.params);\n $scope.repositoryInfo.saveId = $scope.saveRepoId;\n $scope.loader = false;\n };\n\n $scope.$watch($scope.hasActiveLocation, function () {\n if ($scope.hasActiveLocation) {\n // Should get locations before getting repository info\n let repositoryInfoResponse;\n loadRepositoryData().then((repositoryInfo) => {\n repositoryInfoResponse = repositoryInfo;\n return MonitoringRestService.monitorActiveOperations($scope.repositoryInfo.id);\n }).then((monitoringResponse) => {\n $scope.isRepoInCluster = monitoringResponse.hasClusterOperation();\n }).catch((error) => {\n if (!repositoryInfoResponse) {\n $scope.repositoryInfo = undefined;\n return Promise.reject(error);\n }\n // the monitoring request failed, but we can still continue\n return Promise.resolve();\n }).then(() => {\n initView(repositoryInfoResponse);\n }).catch((response) => {\n const data = response.data;\n const status = response.status;\n const repositoryId = $routeParams.repositoryId;\n let toastrMsg;\n\n if (status === 404 && repositoryId !== 'system') {\n toastrMsg = decodeHTML($translate.instant('edit.repo.error.not.exists', {repositoryId}));\n } else if (status === 404 && repositoryId === 'system') {\n toastrMsg = decodeHTML($translate.instant('edit.system.repo.warning'));\n } else {\n toastrMsg = getError(data);\n }\n\n toastr.error(toastrMsg, $translate.instant('common.error'), {allowHtml: true});\n\n if (status === 404) {\n setTimeout(function () {\n $scope.loader = false;\n $location.path('repository');\n }, 1000);\n } else {\n $scope.loader = false;\n }\n });\n }\n });\n\n $scope.setRepositoryType = function (type) {\n $scope.repositoryType = type;\n };\n\n $scope.noMembersError = function () {\n toastr.error($translate.instant('fedx.create.repo.no.members.warning'));\n };\n\n $scope.editRepoHttp = function () {\n $scope.loader = true;\n RepositoriesRestService.editRepository($scope.repositoryInfo.saveId, $scope.repositoryInfo)\n .success(function () {\n toastr.success($translate.instant('edit.repo.success.msg', {saveId: $scope.repositoryInfo.saveId}));\n $repositories.init().finally(() => $scope.goBackToPreviousLocation());\n if ($scope.repositoryInfo.saveId === $scope.repositoryInfo.id && $scope.repositoryInfo.restartRequested) {\n $repositories.restartRepository($scope.repositoryInfo);\n }\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n };\n\n $scope.editRepository = function () {\n $scope.isInvalidRepoName = !FILENAME_PATTERN.test($scope.repositoryInfo.id);\n $scope.isInvalidEntityIndexSizeMin = $scope.repositoryInfo.params.entityIndexSize?.value < ENTITY_INDEX_SIZE_MIN;\n const numberFormatError = getNumberFormatError($scope.repositoryInfo.params, $translate);\n let modalMsg = decodeHTML($translate.instant('edit.repo.save.changes.msg', {repoId: $scope.repositoryInfo.id}));\n if ($scope.repositoryInfo.saveId !== $scope.repositoryInfo.id) {\n modalMsg += decodeHTML($translate.instant('edit.repo.rename.changes.msg'));\n } else if ($scope.repositoryInfo.restartRequested) {\n modalMsg += decodeHTML($translate.instant('edit.repo.restart.requested.msg'));\n } else {\n modalMsg += decodeHTML($translate.instant('edit.repo.restart.needed.msg'));\n }\n if ($scope.isInvalidRepoName) {\n toastr.error($translate.instant('wrong.repo.name.error'));\n } else if ($scope.repositoryType === \"fedx\" && $scope.repositoryInfo.params.member.value.length === 0) {\n $scope.noMembersError();\n } else if (numberFormatError) {\n toastr.error(numberFormatError);\n } else if ($scope.isInvalidEntityIndexSizeMin){\n toastr.error($translate.instant('repo.error.entityIndex.min'));\n } else {\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm.save'),\n message: modalMsg,\n warning: true\n }).result\n .then(function () {\n $scope.editRepoHttp();\n });\n }\n };\n\n $scope.editRepositoryId = function () {\n let msg = decodeHTML($translate.instant('edit.repo.id.warning.msg'));\n\n ModalService.openSimpleModal({\n title: $translate.instant('confirm.enable.edit'),\n message: msg,\n warning: true\n }).result.then(function () {\n $scope.canEditRepoId = true;\n });\n };\n\n $scope.goBackToPreviousLocation = function () {\n if (angular.isDefined($routeParams.previous)) {\n delete $location.$$search.previous;\n $location.path('/');\n } else {\n $location.path('/repository');\n }\n };\n\n $scope.getShaclOptionsClass = function () {\n return getShaclOptionsClass();\n };\n\n const languageChangedSubscription = $rootScope.$on('$translateChangeSuccess', () => {\n $scope.pageTitle = $translate.instant('view.edit.repo.title', {repositoryId: $scope.params.repositoryId});\n });\n $scope.$on('$destroy', () => {\n languageChangedSubscription();\n });\n}\n","/**\n * @ngdoc directive\n * @name validateUrl\n * @module graphdb.framework.core.directives.validate-url\n * @restrict A\n *\n * @description\n * This directive validates the URL input field based on a specified pattern.\n * It ensures that the input URL adheres to standard URL formats and provides\n * visual feedback to the user if the URL is invalid.\n *\n * The directive can also be configured to exclude certain substrings or protocols from valid URLs,\n * and to control whether empty input values are considered valid.\n *\n * @example\n * <pre>\n * <form name=\"myForm\">\n * <!-- Basic URL validation -->\n * <input type=\"text\" name=\"urlField\" ng-model=\"url\" validate-url/>\n * <div ng-show=\"myForm.urlField.$error.validUrl\">\n * Invalid URL format.\n * </div>\n *\n * <!-- URL validation excluding a specific substring -->\n * <input type=\"text\" name=\"urlFieldWithExclusion\" ng-model=\"url\" validate-url exclude=\"/repositories\"/>\n * <div ng-show=\"myForm.urlFieldWithExclusion.$error.validUrl\">\n * Invalid URL format or contains excluded substring.\n * </div>\n *\n * <!-- URL validation excluding a specific protocol -->\n * <input type=\"text\" name=\"urlFieldWithProtocolExclusion\" ng-model=\"url\" validate-url exclude-protocol=\"ftp\"/>\n * <div ng-show=\"myForm.urlFieldWithProtocolExclusion.$error.validUrl\">\n * Invalid URL format or uses an excluded protocol.\n * </div>\n *\n * <!-- URL validation that does not allow empty values -->\n * <input type=\"text\" name=\"urlFieldNoEmpty\" ng-model=\"url\" validate-url allow-empty=\"false\"/>\n * <div ng-show=\"myForm.urlFieldNoEmpty.$error.validUrl\">\n * Invalid URL format or empty value not allowed.\n * </div>\n *\n * <!-- URL validation with both substring and protocol exclusions, and empty values not allowed -->\n * <input type=\"text\" name=\"urlFieldFullValidation\" ng-model=\"url\" validate-url exclude=\"/repositories\" exclude-protocol=\"ftp\" allow-empty=\"false\"/>\n * <div ng-show=\"myForm.urlFieldFullValidation.$error.validUrl\">\n * Invalid URL format, contains excluded substring, uses an excluded protocol, or empty value not allowed.\n * </div>\n * </form>\n * </pre>\n *\n * @usage\n * This directive can be added as an attribute to any input field where URL validation is required.\n * It will automatically validate the input value.\n *\n * Optional attributes:\n * - `exclude`: A string specifying a substring that must not be present in the URL.\n * - `exclude-protocol`: A comma-separated list of protocols (e.g., `ftp,http`) that must not be used in the URL.\n * - `allow-empty`: A boolean attribute (`true` by default). If set to `false`, empty values are considered invalid.\n */\n\nimport {UrlUtils} from \"../../utils/url-utils\";\n\nconst modules = [];\n\nangular\n .module('graphdb.framework.core.directives.validate-url', modules)\n .directive('validateUrl', validateUrl);\n\nfunction validateUrl() {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function (scope, element, attr, ctrl) {\n ctrl.$validators.validUrl = function (modelValue, viewValue) {\n // Check if empty values should be allowed\n if (ctrl.$isEmpty(viewValue)) {\n return attr.allowEmpty !== 'false';\n }\n\n if (!UrlUtils.isValidUrl(viewValue)) {\n return false;\n }\n\n if (attr.exclude && !UrlUtils.doesNotContain(viewValue, attr.exclude)) {\n return false;\n }\n\n if (attr.excludeProtocol) {\n const excludedProtocols = attr.excludeProtocol.split(',');\n if (!UrlUtils.doesNotUseProtocol(viewValue, excludedProtocols)) {\n return false;\n }\n }\n return true;\n };\n }\n };\n}\n"],"names":["ManageRemoteLocationDialogController","$scope","$uibModalInstance","productInfo","data","RemoteLocationType","RemoteLocationAuthType","isEdit","remoteLocation","RemoteLocationModel","docBase","productShortVersion","ok","remoteLocationForm","$pristine","$invalid","close","cancel","dismiss","onLocationTypeChanged","ONTOPIC","SPARQL","includes","locationType","authType","BASIC","NONE","angular","module","controller","$inject","STATIC_RULESETS","id","name","REPOSITORY_TYPES","graphdbRepo","free","eeWorker","eeMaster","ontop","se","fedx","FILENAME_PATTERN","RegExp","NUMBER_PATTERN","httpRegex","ftpRegex","UrlUtils","isValidUrl","url","test","doesNotContain","exclude","doesNotUseProtocol","excludedProtocols","join","ENTITY_INDEX_SIZE_MIN","getFileName","path","lastIdx","lastIndexOf","substring","parseNumberParamsIfNeeded","params","Object","keys","forEach","key","param","value","possibleNumber","parseFloat","isNaN","numberParamToErrorKey","Number","isInteger","parseInt","isNumber","getShaclOptionsClass","optionsModule","document","getElementById","isAriaExpanded","getAttribute","queryLimitResults","queryTimeout","validationResultsLimitTotal","validationResultsLimitPerConstraint","joinWorkerThreads","leftJoinWorkerThreads","unionWorkerThreads","boundJoinBlockSize","entityIndexSize","getNumberFormatError","$translate","errorEntry","find","instant","getDocBase","getFilteredLocations","$repositories","getLocations","then","locations","filter","location","isGraphDBLocation","errorMsg","degradedReason","LocationsAndRepositoriesCtrl","$rootScope","$uibModal","toastr","ModalService","AuthTokenService","LocationsRestService","LocalStorageAdapter","$interval","$q","GuidesService","loader","isLocationInactive","active","hasActiveLocation","getLocationsAbortRequestPromise","defer","finally","getLocalLocation","local","locationTypeCheck","hasAnyRemoteLocation","locationTypes","some","length","getActiveLocation","getLocationError","getDegradedReason","getRepositories","isRepoActive","repo","deleteLocation","uri","openSimpleModal","title","message","warning","result","addLocationHttp","dataAddLocation","addLocation","success","init","error","msg","getError","openRemoteLocationDialog","editLocation","undefined","GRAPH_DB","open","templateUrl","windowClass","resolve","editLocationHttp","dataEditLocation","setRepository","deleteRepository","repository","decodeHTML","repositoryId","cashedDependenciesGraphPrefix","cashedClassHierarchyGraphPrefix","startsWith","remove","removeCachedGraphsOnDelete","restartRepository","toggleDefaultRepository","getDefaultRepository","setDefaultRepository","getRepositoryDownloadLink","type","token","getAuthToken","encodeURIComponent","copyToClipboard","openCopyToClipboardModal","fromFile","openActiveLocationSettings","timer","isActive","guidePaused","initQuick","$on","getRepositoriesFromLocation","locationId","UploadRepositoryConfigCtrl","Upload","upload","files","uploadFile","uploadFileLoader","method","config","AddLocationCtrl","newLocation","isValidLocation","indexOf","EditLocationCtrl","editedLocation","_","cloneDeep","ChooseRepositoryCtrl","$location","repositoryTypes","chooseRepositoryType","repoType","AddRepositoryCtrl","$timeout","$routeParams","RepositoriesRestService","setPageTitle","repositoryType","pageTitle","rulesets","slice","enable","entityIndexSizeMin","repositoryInfo","changedLocation","$broadcast","getConfig","getRepositoryConfiguration","resp","member","element","focus","catch","isEnterprise","isValidEERepository","isFreeEdition","isValidSERepository","isValidFRRepository","isValidOntopRepository","isValidFedXRepository","activeLocation","isInvalidPieFile","uploadRuleset","ruleset","progress","evt","fileName","newValue","fileLocation","rulesetPie","unshift","rulesetPieFile","errorMessage","noMembersError","goBackToPreviousLocation","isDefined","previous","$$search","createRepoHttp","createRepository","repoId","createRepo","isInvalidRepoName","isInvalidEntityIndexSizeMin","numberFormatError","rulesetWarning","pp","disableSameAs","autofocusId","languageChangedSubscription","EditRepositoryFileCtrl","file","dialogTitle","getRepositoryFileContent","fileContent","content","EditRepositoryCtrl","MonitoringRestService","editRepoPage","canEditRepoId","isRepoInCluster","restartRequested","saveRepoId","$watch","repositoryInfoResponse","getRepository","monitorActiveOperations","monitoringResponse","hasClusterOperation","Promise","reject","ifRulesetExists","item","setRepositoryType","saveId","initView","response","status","toastrMsg","allowHtml","setTimeout","editRepoHttp","editRepository","modalMsg","editRepositoryId","directive","restrict","require","link","scope","attr","ctrl","$validators","validUrl","modelValue","viewValue","$isEmpty","allowEmpty","excludeProtocol","split"],"sourceRoot":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export const __webpack_id__=58163;export const __webpack_ids__=[58163];export const __webpack_modules__={37792:(t,e,n)=>{n.d(e,{T:()=>ne});var r=n(44123);class i{constructor(){this.hideOnClick=!1,this.interactive=!0,this.appendTo=()=>document.body,this.trigger="manual",this.allowHTML=!0,this.theme="onto-tooltip",this.onShow=()=>document.querySelectorAll(".jfk-tooltip").forEach(t=>t.classList.add("hidden")),this.onHide=()=>document.querySelectorAll(".jfk-tooltip").forEach(t=>t.classList.remove("hidden"))}setHideOnClick(t){return this.hideOnClick=t,this}setContent(t){return this.content=t,this}setTrigger(t){return this.trigger=t||"manual",this}setPlacement(t){return this.placement=t||r.O.RIGHT,this}setAllowHTML(t){return this.allowHTML=t,this}setTheme(t){return this.theme=t||"onto-tooltip",this}setAppendTo(t){return this.appendTo=this.getAppendToTarget(t),this}getAppendToTarget(t){return"parent"===t?t:()=>document.body}}var o="top",a="bottom",s="right",c="left",u="auto",p=[o,a,s,c],f="start",l="end",d="viewport",h="popper",m=p.reduce(function(t,e){return t.concat([e+"-"+f,e+"-"+l])},[]),v=[].concat(p,[u]).reduce(function(t,e){return t.concat([e,e+"-"+f,e+"-"+l])},[]),g=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function b(t){return t?(t.nodeName||"").toLowerCase():null}function y(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function w(t){return t instanceof y(t).Element||t instanceof Element}function x(t){return t instanceof y(t).HTMLElement||t instanceof HTMLElement}function O(t){return"undefined"!=typeof ShadowRoot&&(t instanceof y(t).ShadowRoot||t instanceof ShadowRoot)}var T={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},r=e.attributes[t]||{},i=e.elements[t];x(i)&&b(i)&&(Object.assign(i.style,n),Object.keys(r).forEach(function(t){var e=r[t];!1===e?i.removeAttribute(t):i.setAttribute(t,!0===e?"":e)}))})},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(t){var r=e.elements[t],i=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce(function(t,e){return t[e]="",t},{});x(r)&&b(r)&&(Object.assign(r.style,o),Object.keys(i).forEach(function(t){r.removeAttribute(t)}))})}},requires:["computeStyles"]};function A(t){return t.split("-")[0]}var E=Math.max,C=Math.min,L=Math.round;function j(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function D(){return!/^((?!chrome|android).)*safari/i.test(j())}function k(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var r=t.getBoundingClientRect(),i=1,o=1;e&&x(t)&&(i=t.offsetWidth>0&&L(r.width)/t.offsetWidth||1,o=t.offsetHeight>0&&L(r.height)/t.offsetHeight||1);var a=(w(t)?y(t):window).visualViewport,s=!D()&&n,c=(r.left+(s&&a?a.offsetLeft:0))/i,u=(r.top+(s&&a?a.offsetTop:0))/o,p=r.width/i,f=r.height/o;return{width:p,height:f,top:u,right:c+p,bottom:u+f,left:c,x:c,y:u}}function S(t){var e=k(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function M(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&O(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function _(t){return y(t).getComputedStyle(t)}function P(t){return["table","td","th"].indexOf(b(t))>=0}function R(t){return((w(t)?t.ownerDocument:t.document)||window.document).documentElement}function B(t){return"html"===b(t)?t:t.assignedSlot||t.parentNode||(O(t)?t.host:null)||R(t)}function H(t){return x(t)&&"fixed"!==_(t).position?t.offsetParent:null}function I(t){for(var e=y(t),n=H(t);n&&P(n)&&"static"===_(n).position;)n=H(n);return n&&("html"===b(n)||"body"===b(n)&&"static"===_(n).position)?e:n||function(t){var e=/firefox/i.test(j());if(/Trident/i.test(j())&&x(t)&&"fixed"===_(t).position)return null;var n=B(t);for(O(n)&&(n=n.host);x(n)&&["html","body"].indexOf(b(n))<0;){var r=_(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||e&&"filter"===r.willChange||e&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(t)||e}function N(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function V(t,e,n){return E(t,C(e,n))}function W(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function q(t,e){return e.reduce(function(e,n){return e[n]=t,e},{})}var U={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,r=t.name,i=t.options,u=n.elements.arrow,f=n.modifiersData.popperOffsets,l=A(n.placement),d=N(l),h=[c,s].indexOf(l)>=0?"height":"width";if(u&&f){var m=function(t,e){return W("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:q(t,p))}(i.padding,n),v=S(u),g="y"===d?o:c,b="y"===d?a:s,y=n.rects.reference[h]+n.rects.reference[d]-f[d]-n.rects.popper[h],w=f[d]-n.rects.reference[d],x=I(u),O=x?"y"===d?x.clientHeight||0:x.clientWidth||0:0,T=y/2-w/2,E=m[g],C=O-v[h]-m[b],L=O/2-v[h]/2+T,j=V(E,L,C),D=d;n.modifiersData[r]=((e={})[D]=j,e.centerOffset=j-L,e)}},effect:function(t){var e=t.state,n=t.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=e.elements.popper.querySelector(r)))&&M(e.elements.popper,r)&&(e.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function F(t){return t.split("-")[1]}var $={top:"auto",right:"auto",bottom:"auto",left:"auto"};function z(t){var e,n=t.popper,r=t.popperRect,i=t.placement,u=t.variation,p=t.offsets,f=t.position,d=t.gpuAcceleration,h=t.adaptive,m=t.roundOffsets,v=t.isFixed,g=p.x,b=void 0===g?0:g,w=p.y,x=void 0===w?0:w,O="function"==typeof m?m({x:b,y:x}):{x:b,y:x};b=O.x,x=O.y;var T=p.hasOwnProperty("x"),A=p.hasOwnProperty("y"),E=c,C=o,j=window;if(h){var D=I(n),k="clientHeight",S="clientWidth";D===y(n)&&"static"!==_(D=R(n)).position&&"absolute"===f&&(k="scrollHeight",S="scrollWidth"),(i===o||(i===c||i===s)&&u===l)&&(C=a,x-=(v&&D===j&&j.visualViewport?j.visualViewport.height:D[k])-r.height,x*=d?1:-1),i!==c&&(i!==o&&i!==a||u!==l)||(E=s,b-=(v&&D===j&&j.visualViewport?j.visualViewport.width:D[S])-r.width,b*=d?1:-1)}var M,P=Object.assign({position:f},h&&$),B=!0===m?function(t,e){var n=t.x,r=t.y,i=e.devicePixelRatio||1;return{x:L(n*i)/i||0,y:L(r*i)/i||0}}({x:b,y:x},y(n)):{x:b,y:x};return b=B.x,x=B.y,d?Object.assign({},P,((M={})[C]=A?"0":"",M[E]=T?"0":"",M.transform=(j.devicePixelRatio||1)<=1?"translate("+b+"px, "+x+"px)":"translate3d("+b+"px, "+x+"px, 0)",M)):Object.assign({},P,((e={})[C]=A?x+"px":"",e[E]=T?b+"px":"",e.transform="",e))}var G={passive:!0},J={left:"right",right:"left",bottom:"top",top:"bottom"};function X(t){return t.replace(/left|right|bottom|top/g,function(t){return J[t]})}var Y={start:"end",end:"start"};function K(t){return t.replace(/start|end/g,function(t){return Y[t]})}function Q(t){var e=y(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Z(t){return k(R(t)).left+Q(t).scrollLeft}function tt(t){var e=_(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function et(t){return["html","body","#document"].indexOf(b(t))>=0?t.ownerDocument.body:x(t)&&tt(t)?t:et(B(t))}function nt(t,e){var n;void 0===e&&(e=[]);var r=et(t),i=r===(null==(n=t.ownerDocument)?void 0:n.body),o=y(r),a=i?[o].concat(o.visualViewport||[],tt(r)?r:[]):r,s=e.concat(a);return i?s:s.concat(nt(B(a)))}function rt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function it(t,e,n){return e===d?rt(function(t,e){var n=y(t),r=R(t),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,c=0;if(i){o=i.width,a=i.height;var u=D();(u||!u&&"fixed"===e)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:s+Z(t),y:c}}(t,n)):w(e)?function(t,e){var n=k(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):rt(function(t){var e,n=R(t),r=Q(t),i=null==(e=t.ownerDocument)?void 0:e.body,o=E(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=E(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+Z(t),c=-r.scrollTop;return"rtl"===_(i||n).direction&&(s+=E(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:c}}(R(t)))}function ot(t){var e,n=t.reference,r=t.element,i=t.placement,u=i?A(i):null,p=i?F(i):null,d=n.x+n.width/2-r.width/2,h=n.y+n.height/2-r.height/2;switch(u){case o:e={x:d,y:n.y-r.height};break;case a:e={x:d,y:n.y+n.height};break;case s:e={x:n.x+n.width,y:h};break;case c:e={x:n.x-r.width,y:h};break;default:e={x:n.x,y:n.y}}var m=u?N(u):null;if(null!=m){var v="y"===m?"height":"width";switch(p){case f:e[m]=e[m]-(n[v]/2-r[v]/2);break;case l:e[m]=e[m]+(n[v]/2-r[v]/2)}}return e}function at(t,e){void 0===e&&(e={});var n=e,r=n.placement,i=void 0===r?t.placement:r,c=n.strategy,u=void 0===c?t.strategy:c,f=n.boundary,l=void 0===f?"clippingParents":f,m=n.rootBoundary,v=void 0===m?d:m,g=n.elementContext,y=void 0===g?h:g,O=n.altBoundary,T=void 0!==O&&O,A=n.padding,L=void 0===A?0:A,j=W("number"!=typeof L?L:q(L,p)),D=y===h?"reference":h,S=t.rects.popper,P=t.elements[T?D:y],H=function(t,e,n,r){var i="clippingParents"===e?function(t){var e=nt(B(t)),n=["absolute","fixed"].indexOf(_(t).position)>=0&&x(t)?I(t):t;return w(n)?e.filter(function(t){return w(t)&&M(t,n)&&"body"!==b(t)}):[]}(t):[].concat(e),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(e,n){var i=it(t,n,r);return e.top=E(i.top,e.top),e.right=C(i.right,e.right),e.bottom=C(i.bottom,e.bottom),e.left=E(i.left,e.left),e},it(t,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(w(P)?P:P.contextElement||R(t.elements.popper),l,v,u),N=k(t.elements.reference),V=ot({reference:N,element:S,placement:i}),U=rt(Object.assign({},S,V)),F=y===h?U:N,$={top:H.top-F.top+j.top,bottom:F.bottom-H.bottom+j.bottom,left:H.left-F.left+j.left,right:F.right-H.right+j.right},z=t.modifiersData.offset;if(y===h&&z){var G=z[i];Object.keys($).forEach(function(t){var e=[s,a].indexOf(t)>=0?1:-1,n=[o,a].indexOf(t)>=0?"y":"x";$[t]+=G[n]*e})}return $}function st(t,e){void 0===e&&(e={});var n=e,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,u=void 0===c?v:c,f=F(r),l=f?s?m:m.filter(function(t){return F(t)===f}):p,d=l.filter(function(t){return u.indexOf(t)>=0});0===d.length&&(d=l);var h=d.reduce(function(e,n){return e[n]=at(t,{placement:n,boundary:i,rootBoundary:o,padding:a})[A(n)],e},{});return Object.keys(h).sort(function(t,e){return h[t]-h[e]})}var ct={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,p=void 0===i||i,l=n.altAxis,d=void 0===l||l,h=n.fallbackPlacements,m=n.padding,v=n.boundary,g=n.rootBoundary,b=n.altBoundary,y=n.flipVariations,w=void 0===y||y,x=n.allowedAutoPlacements,O=e.options.placement,T=A(O),E=h||(T!==O&&w?function(t){if(A(t)===u)return[];var e=X(t);return[K(t),e,K(e)]}(O):[X(O)]),C=[O].concat(E).reduce(function(t,n){return t.concat(A(n)===u?st(e,{placement:n,boundary:v,rootBoundary:g,padding:m,flipVariations:w,allowedAutoPlacements:x}):n)},[]),L=e.rects.reference,j=e.rects.popper,D=new Map,k=!0,S=C[0],M=0;M<C.length;M++){var _=C[M],P=A(_),R=F(_)===f,B=[o,a].indexOf(P)>=0,H=B?"width":"height",I=at(e,{placement:_,boundary:v,rootBoundary:g,altBoundary:b,padding:m}),N=B?R?s:c:R?a:o;L[H]>j[H]&&(N=X(N));var V=X(N),W=[];if(p&&W.push(I[P]<=0),d&&W.push(I[N]<=0,I[V]<=0),W.every(function(t){return t})){S=_,k=!1;break}D.set(_,W)}if(k)for(var q=function(t){var e=C.find(function(e){var n=D.get(e);if(n)return n.slice(0,t).every(function(t){return t})});if(e)return S=e,"break"},U=w?3:1;U>0&&"break"!==q(U);U--);e.placement!==S&&(e.modifiersData[r]._skip=!0,e.placement=S,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function ut(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function pt(t){return[o,s,a,c].some(function(e){return t[e]>=0})}function ft(t,e,n){void 0===n&&(n=!1);var r,i,o=x(e),a=x(e)&&function(t){var e=t.getBoundingClientRect(),n=L(e.width)/t.offsetWidth||1,r=L(e.height)/t.offsetHeight||1;return 1!==n||1!==r}(e),s=R(e),c=k(t,a,n),u={scrollLeft:0,scrollTop:0},p={x:0,y:0};return(o||!o&&!n)&&(("body"!==b(e)||tt(s))&&(u=(r=e)!==y(r)&&x(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:Q(r)),x(e)?((p=k(e,!0)).x+=e.clientLeft,p.y+=e.clientTop):s&&(p.x=Z(s))),{x:c.left+u.scrollLeft-p.x,y:c.top+u.scrollTop-p.y,width:c.width,height:c.height}}function lt(t){var e=new Map,n=new Set,r=[];function i(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!n.has(t)){var r=e.get(t);r&&i(r)}}),r.push(t)}return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){n.has(t.name)||i(t)}),r}var dt={placement:"bottom",modifiers:[],strategy:"absolute"};function ht(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(t){return!(t&&"function"==typeof t.getBoundingClientRect)})}function mt(t){void 0===t&&(t={});var e=t,n=e.defaultModifiers,r=void 0===n?[]:n,i=e.defaultOptions,o=void 0===i?dt:i;return function(t,e,n){void 0===n&&(n=o);var i,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},dt,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},c=[],u=!1,p={state:s,setOptions:function(n){var i="function"==typeof n?n(s.options):n;f(),s.options=Object.assign({},o,s.options,i),s.scrollParents={reference:w(t)?nt(t):t.contextElement?nt(t.contextElement):[],popper:nt(e)};var a,u,l=function(t){var e=lt(t);return g.reduce(function(t,n){return t.concat(e.filter(function(t){return t.phase===n}))},[])}((a=[].concat(r,s.options.modifiers),u=a.reduce(function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t},{}),Object.keys(u).map(function(t){return u[t]})));return s.orderedModifiers=l.filter(function(t){return t.enabled}),s.orderedModifiers.forEach(function(t){var e=t.name,n=t.options,r=void 0===n?{}:n,i=t.effect;if("function"==typeof i){var o=i({state:s,name:e,instance:p,options:r});c.push(o||function(){})}}),p.update()},forceUpdate:function(){if(!u){var t=s.elements,e=t.reference,n=t.popper;if(ht(e,n)){s.rects={reference:ft(e,I(n),"fixed"===s.options.strategy),popper:S(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(t){return s.modifiersData[t.name]=Object.assign({},t.data)});for(var r=0;r<s.orderedModifiers.length;r++)if(!0!==s.reset){var i=s.orderedModifiers[r],o=i.fn,a=i.options,c=void 0===a?{}:a,f=i.name;"function"==typeof o&&(s=o({state:s,options:c,name:f,instance:p})||s)}else s.reset=!1,r=-1}}},update:(i=function(){return new Promise(function(t){p.forceUpdate(),t(s)})},function(){return a||(a=new Promise(function(t){Promise.resolve().then(function(){a=void 0,t(i())})})),a}),destroy:function(){f(),u=!0}};if(!ht(t,e))return p;function f(){c.forEach(function(t){return t()}),c=[]}return p.setOptions(n).then(function(t){!u&&n.onFirstUpdate&&n.onFirstUpdate(t)}),p}}var vt=mt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,o=void 0===i||i,a=r.resize,s=void 0===a||a,c=y(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&u.forEach(function(t){t.addEventListener("scroll",n.update,G)}),s&&c.addEventListener("resize",n.update,G),function(){o&&u.forEach(function(t){t.removeEventListener("scroll",n.update,G)}),s&&c.removeEventListener("resize",n.update,G)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=ot({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,c=void 0===s||s,u={placement:A(e.placement),variation:F(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,z(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:c})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,z(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},T,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,r=t.name,i=n.offset,a=void 0===i?[0,0]:i,u=v.reduce(function(t,n){return t[n]=function(t,e,n){var r=A(t),i=[c,o].indexOf(r)>=0?-1:1,a="function"==typeof n?n(Object.assign({},e,{placement:t})):n,u=a[0],p=a[1];return u=u||0,p=(p||0)*i,[c,s].indexOf(r)>=0?{x:p,y:u}:{x:u,y:p}}(n,e.rects,a),t},{}),p=u[e.placement],f=p.x,l=p.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=f,e.modifiersData.popperOffsets.y+=l),e.modifiersData[r]=u}},ct,{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,u=void 0===i||i,p=n.altAxis,l=void 0!==p&&p,d=n.boundary,h=n.rootBoundary,m=n.altBoundary,v=n.padding,g=n.tether,b=void 0===g||g,y=n.tetherOffset,w=void 0===y?0:y,x=at(e,{boundary:d,rootBoundary:h,padding:v,altBoundary:m}),O=A(e.placement),T=F(e.placement),L=!T,j=N(O),D="x"===j?"y":"x",k=e.modifiersData.popperOffsets,M=e.rects.reference,_=e.rects.popper,P="function"==typeof w?w(Object.assign({},e.rects,{placement:e.placement})):w,R="number"==typeof P?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),B=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,H={x:0,y:0};if(k){if(u){var W,q="y"===j?o:c,U="y"===j?a:s,$="y"===j?"height":"width",z=k[j],G=z+x[q],J=z-x[U],X=b?-_[$]/2:0,Y=T===f?M[$]:_[$],K=T===f?-_[$]:-M[$],Q=e.elements.arrow,Z=b&&Q?S(Q):{width:0,height:0},tt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=tt[q],nt=tt[U],rt=V(0,M[$],Z[$]),it=L?M[$]/2-X-rt-et-R.mainAxis:Y-rt-et-R.mainAxis,ot=L?-M[$]/2+X+rt+nt+R.mainAxis:K+rt+nt+R.mainAxis,st=e.elements.arrow&&I(e.elements.arrow),ct=st?"y"===j?st.clientTop||0:st.clientLeft||0:0,ut=null!=(W=null==B?void 0:B[j])?W:0,pt=z+ot-ut,ft=V(b?C(G,z+it-ut-ct):G,z,b?E(J,pt):J);k[j]=ft,H[j]=ft-z}if(l){var lt,dt="x"===j?o:c,ht="x"===j?a:s,mt=k[D],vt="y"===D?"height":"width",gt=mt+x[dt],bt=mt-x[ht],yt=-1!==[o,c].indexOf(O),wt=null!=(lt=null==B?void 0:B[D])?lt:0,xt=yt?gt:mt-M[vt]-_[vt]-wt+R.altAxis,Ot=yt?mt+M[vt]+_[vt]-wt-R.altAxis:bt,Tt=b&&yt?function(t,e,n){var r=V(t,e,n);return r>n?n:r}(xt,mt,Ot):V(b?xt:gt,mt,b?Ot:bt);k[D]=Tt,H[D]=Tt-mt}e.modifiersData[r]=H}},requiresIfExists:["offset"]},U,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,a=at(e,{elementContext:"reference"}),s=at(e,{altBoundary:!0}),c=ut(a,r),u=ut(s,i,o),p=pt(c),f=pt(u);e.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:p,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":f})}}]}),gt="tippy-content",bt="tippy-arrow",yt="tippy-svg-arrow",wt={passive:!0,capture:!0},xt=function(){return document.body};function Ot(t,e,n){if(Array.isArray(t)){var r=t[e];return null==r?Array.isArray(n)?n[e]:n:r}return t}function Tt(t,e){var n={}.toString.call(t);return 0===n.indexOf("[object")&&n.indexOf(e+"]")>-1}function At(t,e){return"function"==typeof t?t.apply(void 0,e):t}function Et(t,e){return 0===e?t:function(r){clearTimeout(n),n=setTimeout(function(){t(r)},e)};var n}function Ct(t){return[].concat(t)}function Lt(t,e){-1===t.indexOf(e)&&t.push(e)}function jt(t){return[].slice.call(t)}function Dt(t){return Object.keys(t).reduce(function(e,n){return void 0!==t[n]&&(e[n]=t[n]),e},{})}function kt(){return document.createElement("div")}function St(t){return["Element","Fragment"].some(function(e){return Tt(t,e)})}function Mt(t,e){t.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function _t(t,e){t.forEach(function(t){t&&t.setAttribute("data-state",e)})}function Pt(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(e){t[r](e,n)})}function Rt(t,e){for(var n=e;n;){var r;if(t.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var Bt={isTouch:!1},Ht=0;function It(){Bt.isTouch||(Bt.isTouch=!0,window.performance&&document.addEventListener("mousemove",Nt))}function Nt(){var t=performance.now();t-Ht<20&&(Bt.isTouch=!1,document.removeEventListener("mousemove",Nt)),Ht=t}function Vt(){var t,e=document.activeElement;if((t=e)&&t._tippy&&t._tippy.reference===t){var n=e._tippy;e.blur&&!n.state.isVisible&&e.blur()}}var Wt=!("undefined"==typeof window||"undefined"==typeof document||!window.msCrypto),qt=Object.assign({appendTo:xt,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Ut=Object.keys(qt);function Ft(t){var e=(t.plugins||[]).reduce(function(e,n){var r,i=n.name,o=n.defaultValue;return i&&(e[i]=void 0!==t[i]?t[i]:null!=(r=qt[i])?r:o),e},{});return Object.assign({},t,e)}function $t(t,e){var n=Object.assign({},e,{content:At(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(Ft(Object.assign({},qt,{plugins:e}))):Ut).reduce(function(e,n){var r=(t.getAttribute("data-tippy-"+n)||"").trim();if(!r)return e;if("content"===n)e[n]=r;else try{e[n]=JSON.parse(r)}catch(t){e[n]=r}return e},{})}(t,e.plugins));return n.aria=Object.assign({},qt.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?e.interactive:n.aria.expanded,content:"auto"===n.aria.content?e.interactive?null:"describedby":n.aria.content},n}function zt(t,e){t.innerHTML=e}function Gt(t){var e=kt();return!0===t?e.className=bt:(e.className=yt,St(t)?e.appendChild(t):zt(e,t)),e}function Jt(t,e){St(e.content)?(zt(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?zt(t,e.content):t.textContent=e.content)}function Xt(t){var e=t.firstElementChild,n=jt(e.children);return{box:e,content:n.find(function(t){return t.classList.contains(gt)}),arrow:n.find(function(t){return t.classList.contains(bt)||t.classList.contains(yt)}),backdrop:n.find(function(t){return t.classList.contains("tippy-backdrop")})}}function Yt(t){var e=kt(),n=kt();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=kt();function i(n,r){var i=Xt(e),o=i.box,a=i.content,s=i.arrow;r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),"string"==typeof r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||Jt(a,t.props),r.arrow?s?n.arrow!==r.arrow&&(o.removeChild(s),o.appendChild(Gt(r.arrow))):o.appendChild(Gt(r.arrow)):s&&o.removeChild(s)}return r.className=gt,r.setAttribute("data-state","hidden"),Jt(r,t.props),e.appendChild(n),n.appendChild(r),i(t.props,t.props),{popper:e,onUpdate:i}}Yt.$$tippy=!0;var Kt=1,Qt=[],Zt=[];function te(t,e){var n,r,i,o,a,s,c,u,p=$t(t,Object.assign({},qt,Ft(Dt(e)))),f=!1,l=!1,d=!1,h=!1,m=[],v=Et(G,p.interactiveDebounce),g=Kt++,b=(u=p.plugins).filter(function(t,e){return u.indexOf(t)===e}),y={id:g,reference:t,popper:kt(),popperInstance:null,props:p,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:b,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(i)},setProps:function(e){if(!y.state.isDestroyed){_("onBeforeUpdate",[y,e]),$();var n=y.props,r=$t(t,Object.assign({},n,Dt(e),{ignoreAttributes:!0}));y.props=r,F(),n.interactiveDebounce!==r.interactiveDebounce&&(B(),v=Et(G,r.interactiveDebounce)),n.triggerTarget&&!r.triggerTarget?Ct(n.triggerTarget).forEach(function(t){t.removeAttribute("aria-expanded")}):r.triggerTarget&&t.removeAttribute("aria-expanded"),R(),M(),O&&O(n,r),y.popperInstance&&(K(),Z().forEach(function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})),_("onAfterUpdate",[y,e])}},setContent:function(t){y.setProps({content:t})},show:function(){var t=y.state.isVisible,e=y.state.isDestroyed,n=!y.state.isEnabled,r=Bt.isTouch&&!y.props.touch,i=Ot(y.props.duration,0,qt.duration);if(!(t||e||n||r||j().hasAttribute("disabled")||(_("onShow",[y],!1),!1===y.props.onShow(y)))){if(y.state.isVisible=!0,L()&&(x.style.visibility="visible"),M(),V(),y.state.isMounted||(x.style.transition="none"),L()){var o=k();Mt([o.box,o.content],0)}var a,c,u;s=function(){var t;if(y.state.isVisible&&!h){if(h=!0,x.style.transition=y.props.moveTransition,L()&&y.props.animation){var e=k(),n=e.box,r=e.content;Mt([n,r],i),_t([n,r],"visible")}P(),R(),Lt(Zt,y),null==(t=y.popperInstance)||t.forceUpdate(),_("onMount",[y]),y.props.animation&&L()&&function(t){q(t,function(){y.state.isShown=!0,_("onShown",[y])})}(i)}},c=y.props.appendTo,u=j(),(a=y.props.interactive&&c===xt||"parent"===c?u.parentNode:At(c,[u])).contains(x)||a.appendChild(x),y.state.isMounted=!0,K()}},hide:function(){var t=!y.state.isVisible,e=y.state.isDestroyed,n=!y.state.isEnabled,r=Ot(y.props.duration,1,qt.duration);if(!(t||e||n)&&(_("onHide",[y],!1),!1!==y.props.onHide(y))){if(y.state.isVisible=!1,y.state.isShown=!1,h=!1,f=!1,L()&&(x.style.visibility="hidden"),B(),W(),M(!0),L()){var i=k(),o=i.box,a=i.content;y.props.animation&&(Mt([o,a],r),_t([o,a],"hidden"))}P(),R(),y.props.animation?L()&&function(t,e){q(t,function(){!y.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&e()})}(r,y.unmount):y.unmount()}},hideWithInteractivity:function(t){D().addEventListener("mousemove",v),Lt(Qt,v),v(t)},enable:function(){y.state.isEnabled=!0},disable:function(){y.hide(),y.state.isEnabled=!1},unmount:function(){y.state.isVisible&&y.hide(),y.state.isMounted&&(Q(),Z().forEach(function(t){t._tippy.unmount()}),x.parentNode&&x.parentNode.removeChild(x),Zt=Zt.filter(function(t){return t!==y}),y.state.isMounted=!1,_("onHidden",[y]))},destroy:function(){y.state.isDestroyed||(y.clearDelayTimeouts(),y.unmount(),$(),delete t._tippy,y.state.isDestroyed=!0,_("onDestroy",[y]))}};if(!p.render)return y;var w=p.render(y),x=w.popper,O=w.onUpdate;x.setAttribute("data-tippy-root",""),x.id="tippy-"+y.id,y.popper=x,t._tippy=y,x._tippy=y;var T=b.map(function(t){return t.fn(y)}),A=t.hasAttribute("aria-expanded");return F(),R(),M(),_("onCreate",[y]),p.showOnCreate&&tt(),x.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),x.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&D().addEventListener("mousemove",v)}),y;function E(){var t=y.props.touch;return Array.isArray(t)?t:[t,0]}function C(){return"hold"===E()[0]}function L(){var t;return!(null==(t=y.props.render)||!t.$$tippy)}function j(){return c||t}function D(){var t,e,n=j().parentNode;return n&&null!=(e=Ct(n)[0])&&null!=(t=e.ownerDocument)&&t.body?e.ownerDocument:document}function k(){return Xt(x)}function S(t){return y.state.isMounted&&!y.state.isVisible||Bt.isTouch||o&&"focus"===o.type?0:Ot(y.props.delay,t?0:1,qt.delay)}function M(t){void 0===t&&(t=!1),x.style.pointerEvents=y.props.interactive&&!t?"":"none",x.style.zIndex=""+y.props.zIndex}function _(t,e,n){var r;void 0===n&&(n=!0),T.forEach(function(n){n[t]&&n[t].apply(n,e)}),n&&(r=y.props)[t].apply(r,e)}function P(){var e=y.props.aria;if(e.content){var n="aria-"+e.content,r=x.id;Ct(y.props.triggerTarget||t).forEach(function(t){var e=t.getAttribute(n);if(y.state.isVisible)t.setAttribute(n,e?e+" "+r:r);else{var i=e&&e.replace(r,"").trim();i?t.setAttribute(n,i):t.removeAttribute(n)}})}}function R(){!A&&y.props.aria.expanded&&Ct(y.props.triggerTarget||t).forEach(function(t){y.props.interactive?t.setAttribute("aria-expanded",y.state.isVisible&&t===j()?"true":"false"):t.removeAttribute("aria-expanded")})}function B(){D().removeEventListener("mousemove",v),Qt=Qt.filter(function(t){return t!==v})}function H(e){if(!Bt.isTouch||!d&&"mousedown"!==e.type){var n=e.composedPath&&e.composedPath()[0]||e.target;if(!y.props.interactive||!Rt(x,n)){if(Ct(y.props.triggerTarget||t).some(function(t){return Rt(t,n)})){if(Bt.isTouch)return;if(y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else _("onClickOutside",[y,e]);!0===y.props.hideOnClick&&(y.clearDelayTimeouts(),y.hide(),l=!0,setTimeout(function(){l=!1}),y.state.isMounted||W())}}}function I(){d=!0}function N(){d=!1}function V(){var t=D();t.addEventListener("mousedown",H,!0),t.addEventListener("touchend",H,wt),t.addEventListener("touchstart",N,wt),t.addEventListener("touchmove",I,wt)}function W(){var t=D();t.removeEventListener("mousedown",H,!0),t.removeEventListener("touchend",H,wt),t.removeEventListener("touchstart",N,wt),t.removeEventListener("touchmove",I,wt)}function q(t,e){var n=k().box;function r(t){t.target===n&&(Pt(n,"remove",r),e())}if(0===t)return e();Pt(n,"remove",a),Pt(n,"add",r),a=r}function U(e,n,r){void 0===r&&(r=!1),Ct(y.props.triggerTarget||t).forEach(function(t){t.addEventListener(e,n,r),m.push({node:t,eventType:e,handler:n,options:r})})}function F(){var t;C()&&(U("touchstart",z,{passive:!0}),U("touchend",J,{passive:!0})),(t=y.props.trigger,t.split(/\s+/).filter(Boolean)).forEach(function(t){if("manual"!==t)switch(U(t,z),t){case"mouseenter":U("mouseleave",J);break;case"focus":U(Wt?"focusout":"blur",X);break;case"focusin":U("focusout",X)}})}function $(){m.forEach(function(t){var e=t.node,n=t.eventType,r=t.handler,i=t.options;e.removeEventListener(n,r,i)}),m=[]}function z(t){var e,n=!1;if(y.state.isEnabled&&!Y(t)&&!l){var r="focus"===(null==(e=o)?void 0:e.type);o=t,c=t.currentTarget,R(),!y.state.isVisible&&Tt(t,"MouseEvent")&&Qt.forEach(function(e){return e(t)}),"click"===t.type&&(y.props.trigger.indexOf("mouseenter")<0||f)&&!1!==y.props.hideOnClick&&y.state.isVisible?n=!0:tt(t),"click"===t.type&&(f=!n),n&&!r&&et(t)}}function G(t){var e=t.target,n=j().contains(e)||x.contains(e);if("mousemove"!==t.type||!n){var r=Z().concat(x).map(function(t){var e,n=null==(e=t._tippy.popperInstance)?void 0:e.state;return n?{popperRect:t.getBoundingClientRect(),popperState:n,props:p}:null}).filter(Boolean);(function(t,e){var n=e.clientX,r=e.clientY;return t.every(function(t){var e=t.popperRect,i=t.popperState,o=t.props.interactiveBorder,a=i.placement.split("-")[0],s=i.modifiersData.offset;if(!s)return!0;var c="bottom"===a?s.top.y:0,u="top"===a?s.bottom.y:0,p="right"===a?s.left.x:0,f="left"===a?s.right.x:0,l=e.top-r+c>o,d=r-e.bottom-u>o,h=e.left-n+p>o,m=n-e.right-f>o;return l||d||h||m})})(r,t)&&(B(),et(t))}}function J(t){Y(t)||y.props.trigger.indexOf("click")>=0&&f||(y.props.interactive?y.hideWithInteractivity(t):et(t))}function X(t){y.props.trigger.indexOf("focusin")<0&&t.target!==j()||y.props.interactive&&t.relatedTarget&&x.contains(t.relatedTarget)||et(t)}function Y(t){return!!Bt.isTouch&&C()!==t.type.indexOf("touch")>=0}function K(){Q();var e=y.props,n=e.popperOptions,r=e.placement,i=e.offset,o=e.getReferenceClientRect,a=e.moveTransition,c=L()?Xt(x).arrow:null,u=o?{getBoundingClientRect:o,contextElement:o.contextElement||j()}:t,p=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(L()){var n=k().box;["placement","reference-hidden","escaped"].forEach(function(t){"placement"===t?n.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?n.setAttribute("data-"+t,""):n.removeAttribute("data-"+t)}),e.attributes.popper={}}}}];L()&&c&&p.push({name:"arrow",options:{element:c,padding:3}}),p.push.apply(p,(null==n?void 0:n.modifiers)||[]),y.popperInstance=vt(u,x,Object.assign({},n,{placement:r,onFirstUpdate:s,modifiers:p}))}function Q(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function Z(){return jt(x.querySelectorAll("[data-tippy-root]"))}function tt(t){y.clearDelayTimeouts(),t&&_("onTrigger",[y,t]),V();var e=S(!0),r=E(),i=r[0],o=r[1];Bt.isTouch&&"hold"===i&&o&&(e=o),e?n=setTimeout(function(){y.show()},e):y.show()}function et(t){if(y.clearDelayTimeouts(),_("onUntrigger",[y,t]),y.state.isVisible){if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&f)){var e=S(!1);e?r=setTimeout(function(){y.state.isVisible&&y.hide()},e):i=requestAnimationFrame(function(){y.hide()})}}else W()}}function ee(t,e){void 0===e&&(e={});var n=qt.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",It,wt),window.addEventListener("blur",Vt);var r,i=Object.assign({},e,{plugins:n}),o=(r=t,St(r)?[r]:function(t){return Tt(t,"NodeList")}(r)?jt(r):Array.isArray(r)?r:jt(document.querySelectorAll(r))).reduce(function(t,e){var n=e&&te(e,i);return n&&t.push(n),t},[]);return St(t)?o[0]:o}ee.defaultProps=qt,ee.setDefaultProps=function(t){Object.keys(t).forEach(function(e){qt[e]=t[e]})},ee.currentInput=Bt,Object.assign({},T,{effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow)}}),ee.setDefaultProps({render:Yt});class ne{static getTooltipInstance(t){return t._tippy}static createTooltip(t){return t.classList.add(ne.TOOLTIP_CLASS),ee(t,ne.getConfig(t))}static getOrCreateTooltipInstance(t){return ne.getTooltipInstance(t)||ne.createTooltip(t)}static getConfig(t){return(new i).setContent(t.getAttribute(ne.ATTR_CONTENT)).setTheme(t.getAttribute(ne.ATTR_THEME)).setPlacement(t.getAttribute(ne.ATTR_PLACEMENT)).setTrigger(t.getAttribute(ne.ATTR_TRIGGER)).setAppendTo(t.getAttribute(ne.ATTR_APPEND_TO))}static updateTooltipContent(t,e){const n=ne.getTooltipInstance(t);n&&""!==e&&n.setContent(e)}static destroyTooltip(t){var e;const n=ne.getTooltipInstance(t);t.classList.contains(ne.TOOLTIP_CLASS)&&n&&!(null===(e=n.state)||void 0===e?void 0:e.isDestroyed)&&n.destroy()}static getTooltipTarget(t){for(;t&&!t.getAttribute(ne.ATTR_CONTENT);)t=t.parentElement;return t}}ne.ATTR_CONTENT="tooltip-content",ne.ATTR_THEME="tooltip-theme",ne.ATTR_PLACEMENT="tooltip-placement",ne.ATTR_TRIGGER="tooltip-trigger",ne.ATTR_APPEND_TO="tooltip-append-to",ne.TOOLTIP_CLASS="onto-tooltip"},44123:(t,e,n)=>{var r;n.d(e,{O:()=>r}),function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom",t.AUTO="auto"}(r||(r={}))},77050:(t,e,n)=>{n.d(e,{T:()=>a,s:()=>i});var r=n(57154);function i(t){const e=document.createElement("textarea");return e.innerHTML=t,e.value}class o{constructor(){this.languageContextService=r.ServiceProvider.get(r.LanguageContextService),this.translationChangedObservers={},this.defaultBundle=this.languageContextService.getDefaultBundle(),this.subscribeToBundleChange()}onTranslate(t,e=[],n=()=>{}){this.translationChangedObservers[t]=this.translationChangedObservers[t]||[];const r={parameters:e,callback:n};return this.translationChangedObservers[t].push(r),n(this.translate(t,e)),()=>{const e=this.translationChangedObservers[t].indexOf(r);-1!==e&&this.translationChangedObservers[t].splice(e,1)}}translate(t,e){return this.translateInLocale(t,e)}translateInLocale(t,e){let n=this.translateFromBundle(this.currentBundle,t);return n||(n=this.translateFromBundle(this.defaultBundle,t)),n?(n=this.applyParameters(n,e),i(n)):(console.warn(`Missing translation for key: [${t}]`),t)}translateFromBundle(t,e){if(!t)return;let n=t[e];return"string"!=typeof n&&(n=this.translateAsJsonObject(t,e)),n}translateAsJsonObject(t,e){let n=e.split(".");return this.getTranslation(t,n)}getTranslation(t,e){if(!e||!t)return;const n=t[e.splice(0,1)[0]];return 0===e.length?n:"string"!=typeof n?e.length>0?this.getTranslation(n,e):n:void 0}applyParameters(t,e){return e?e.reduce((t,e)=>o.replaceAll(t,e),t):t}static replaceAll(t,e){return e?t.split(`{{${e.key}}}`).join(e.value):t}notifyTranslationsChanged(){Object.keys(this.translationChangedObservers).forEach(t=>{(this.translationChangedObservers[t]||[]).forEach(e=>e.callback(this.translate(t,e.parameters)))})}subscribeToBundleChange(){this.languageChangeSubscription=this.languageContextService.onLanguageBundleChanged(t=>{t&&(this.currentBundle=t,this.notifyTranslationsChanged())})}destroy(){this.languageChangeSubscription&&this.languageChangeSubscription()}}const a=new o}};
|
|
2
|
-
//# sourceMappingURL=58163.747b20ea052b22b24bd0.bundle.js.map
|