graphdb-workbench 3.5.1-TR3 → 3.5.1

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.
Files changed (119) hide show
  1. package/dist/{31415.aba4cdda066690a2769d.bundle.js → 31415.8d180c0aaafea01d84c5.bundle.js} +2 -2
  2. package/dist/31415.8d180c0aaafea01d84c5.bundle.js.map +1 -0
  3. package/dist/3395.0a62c93740e681cddba2.bundle.js +2 -0
  4. package/dist/3395.0a62c93740e681cddba2.bundle.js.map +1 -0
  5. package/dist/{64709.d6d3d413c90077b5d0cc.bundle.js → 64709.fba061d1e333d77d2644.bundle.js} +2 -2
  6. package/dist/{64709.d6d3d413c90077b5d0cc.bundle.js.map → 64709.fba061d1e333d77d2644.bundle.js.map} +1 -1
  7. package/dist/65677.646a9ee2a63ba19c0fd3.bundle.js +2 -0
  8. package/dist/65677.646a9ee2a63ba19c0fd3.bundle.js.map +1 -0
  9. package/dist/73334.1487d58b7e885510d107.bundle.js +2 -0
  10. package/dist/73334.1487d58b7e885510d107.bundle.js.map +1 -0
  11. package/dist/80933.542ad26ccd92fdc2c05d.bundle.js +2 -0
  12. package/dist/80933.542ad26ccd92fdc2c05d.bundle.js.map +1 -0
  13. package/dist/82917.020f840fc63c2066169e.bundle.js +2 -0
  14. package/dist/{82917.c97f7cec0372ff2f6fdd.bundle.js.map → 82917.020f840fc63c2066169e.bundle.js.map} +1 -1
  15. package/dist/85698.b186c57a2d0edee24110.bundle.js +2 -0
  16. package/dist/85698.b186c57a2d0edee24110.bundle.js.map +1 -0
  17. package/dist/86099.959943bc458a7ef148e9.bundle.js +2 -0
  18. package/dist/86099.959943bc458a7ef148e9.bundle.js.map +1 -0
  19. package/dist/8981.cb785cbc13b19f924ebc.bundle.js +2 -0
  20. package/dist/8981.cb785cbc13b19f924ebc.bundle.js.map +1 -0
  21. package/dist/assets/i18n/language-config.json +1 -1
  22. package/dist/css/cluster-configuration/multi-region.css +1 -1
  23. package/dist/css/clustermanagement.css +1 -1
  24. package/dist/css/lib/ontotext-yasgui-web-component.css +1 -1
  25. package/dist/index.html +9 -9
  26. package/dist/js/angular/clustermanagement/templates/cluster-configuration/cluster-configuration.html +1 -1
  27. package/dist/js/angular/clustermanagement/templates/cluster-configuration/multi-region.html +6 -6
  28. package/dist/js/angular/clustermanagement/templates/cluster-nodes-configuration.html +1 -1
  29. package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
  30. package/dist/js/angular/core/directives/dynamic-form/templates/dynamic-form.html +1 -1
  31. package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
  32. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  33. package/dist/js/angular/core/directives/shuttle-multiselect/templates/shuttle-multiselect.html +1 -1
  34. package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +2 -2
  35. package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
  36. package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
  37. package/dist/js/angular/core/templates/editable-content/editable-content.html +1 -1
  38. package/dist/js/angular/core/templates/markdown-content/markdown-content.html +1 -1
  39. package/dist/js/angular/core/templates/search-resource-input.html +1 -1
  40. package/dist/js/angular/graphql/templates/create-graphql-endpoint.html +2 -2
  41. package/dist/js/angular/graphql/templates/graphql-endpoint-management.html +1 -1
  42. package/dist/js/angular/graphql/templates/graphql-playground.html +2 -2
  43. package/dist/js/angular/graphql/templates/modal/endpoint-configuration-modal.html +1 -1
  44. package/dist/js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html +1 -1
  45. package/dist/js/angular/graphql/templates/modal/import-endpoint-definition-modal.html +1 -1
  46. package/dist/js/angular/security/templates/user.html +2 -2
  47. package/dist/js/angular/security/templates/users.html +1 -1
  48. package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
  49. package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
  50. package/dist/js/angular/ttyg/templates/chat-item-detail.html +1 -1
  51. package/dist/js/angular/ttyg/templates/chat-list.html +1 -1
  52. package/dist/js/angular/ttyg/templates/chat-panel.html +1 -1
  53. package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
  54. package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +3 -3
  55. package/dist/js/angular/ttyg/templates/modal/external-integration-configuration-modal.html +1 -1
  56. package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
  57. package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
  58. package/dist/legacyWorkbench.22aacd4da951e43b2876.js +3 -0
  59. package/dist/{legacyWorkbench.cdb2fb6bc573f9a9b49d.js.map → legacyWorkbench.22aacd4da951e43b2876.js.map} +1 -1
  60. package/dist/license-checker.json +19 -32
  61. package/dist/{main.8dd8af071ff43504a729.js → main.3665e695a5c0d2e9b4c0.js} +3 -3
  62. package/dist/{main.8dd8af071ff43504a729.js.map → main.3665e695a5c0d2e9b4c0.js.map} +1 -1
  63. package/dist/pages/aclmanagement.html +1 -1
  64. package/dist/pages/autocomplete.html +1 -1
  65. package/dist/pages/choose-repository-type.html +1 -1
  66. package/dist/pages/cluster-management/clusterInfo.html +2 -2
  67. package/dist/pages/create-index.html +1 -1
  68. package/dist/pages/dependencies.html +1 -1
  69. package/dist/pages/domainRangeInfo.html +2 -2
  70. package/dist/pages/edit.html +1 -1
  71. package/dist/pages/explore.html +1 -1
  72. package/dist/pages/export.html +1 -1
  73. package/dist/pages/find.html +1 -1
  74. package/dist/pages/graph-config/saveGraphConfig.html +8 -8
  75. package/dist/pages/graphs-visualizations.html +7 -7
  76. package/dist/pages/guides.html +1 -1
  77. package/dist/pages/home.html +1 -1
  78. package/dist/pages/import.html +2 -2
  79. package/dist/pages/jdbc-create.html +1 -1
  80. package/dist/pages/jdbc.html +1 -1
  81. package/dist/pages/monitor/backup-and-restore.html +1 -1
  82. package/dist/pages/monitor/queries.html +1 -1
  83. package/dist/pages/monitor/resources.html +1 -1
  84. package/dist/pages/namespaces.html +2 -2
  85. package/dist/pages/plugins.html +1 -1
  86. package/dist/pages/rdfClassHierarchyInfo.html +7 -7
  87. package/dist/pages/rdfrank.html +2 -2
  88. package/dist/pages/repositories.html +1 -1
  89. package/dist/pages/repository.html +1 -1
  90. package/dist/pages/similarity-indexes.html +1 -1
  91. package/dist/pages/sparql-editor.html +1 -1
  92. package/dist/pages/sparql-template-create.html +1 -1
  93. package/dist/pages/sparql-templates.html +1 -1
  94. package/dist/pages/ux-test1.html +2 -2
  95. package/dist/pages/webapi.html +2 -2
  96. package/dist/res/swagger5/index.html +11 -11
  97. package/dist/workbench/license-checker.json +17 -17
  98. package/dist/workbench/workbench/{166.2aacf63cc15a20ef.js → 166.2447618295f9f57e.js} +1 -1
  99. package/dist/workbench/workbench/workbenchApp.js +1 -1
  100. package/package.json +1 -1
  101. package/dist/31415.aba4cdda066690a2769d.bundle.js.map +0 -1
  102. package/dist/3395.ded80bae10361d1d4573.bundle.js +0 -2
  103. package/dist/3395.ded80bae10361d1d4573.bundle.js.map +0 -1
  104. package/dist/65677.0e8ab27737300e991c60.bundle.js +0 -2
  105. package/dist/65677.0e8ab27737300e991c60.bundle.js.map +0 -1
  106. package/dist/73334.1b0e8bb637fbd1ce73ef.bundle.js +0 -2
  107. package/dist/73334.1b0e8bb637fbd1ce73ef.bundle.js.map +0 -1
  108. package/dist/80933.bd439bb6f5fad66637ac.bundle.js +0 -2
  109. package/dist/80933.bd439bb6f5fad66637ac.bundle.js.map +0 -1
  110. package/dist/82917.c97f7cec0372ff2f6fdd.bundle.js +0 -2
  111. package/dist/85698.ee9962969a310107ccf8.bundle.js +0 -2
  112. package/dist/85698.ee9962969a310107ccf8.bundle.js.map +0 -1
  113. package/dist/86099.ab3779d6538a6648b2b7.bundle.js +0 -2
  114. package/dist/86099.ab3779d6538a6648b2b7.bundle.js.map +0 -1
  115. package/dist/8981.ebd2159613630a2daf7e.bundle.js +0 -2
  116. package/dist/8981.ebd2159613630a2daf7e.bundle.js.map +0 -1
  117. package/dist/legacyWorkbench.cdb2fb6bc573f9a9b49d.js +0 -3
  118. /package/dist/{legacyWorkbench.cdb2fb6bc573f9a9b49d.js.LICENSE.txt → legacyWorkbench.22aacd4da951e43b2876.js.LICENSE.txt} +0 -0
  119. /package/dist/{main.8dd8af071ff43504a729.js.LICENSE.txt → main.3665e695a5c0d2e9b4c0.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"73334.1b0e8bb637fbd1ce73ef.bundle.js","mappings":"0JAIA,MAKMA,E,SAASC,EAAeD,OAW9B,SAASE,EAAeC,GACpB,MAAMC,EAAM,GAIZ,OAHAC,OAAOC,KAAKH,GAAMI,QAAQ,SAASC,GAC/BJ,EAAIK,KAAKC,mBAAmBF,GAAO,IAAME,mBAAmBP,EAAKK,IACrE,GACOJ,EAAIO,KAAK,IACpB,CAEA,SAASC,EAAWC,GAChB,OAAOC,EAAED,IAAIA,EAAK,SAASE,EAAOP,GAC9B,MAAO,CAACA,IAAKA,EAAKO,MAAOA,EAC7B,EACJ,CAEA,SAASC,EAAaC,EAAUC,GAC5B,OAAOJ,EAAEK,OAAOF,EAAU,SAASG,EAAKL,GACpC,GAAkB,KAAdA,EAAMP,KAA8B,KAAhBO,EAAMA,WAEvB,IAAkB,KAAdA,EAAMP,IACb,MAAM,IAAIa,MAAMH,EAAWI,QAAQ,qCAAsC,CAACP,MAAOA,EAAMA,SACpF,GAAIK,EAAIG,eAAeR,EAAMP,KAChC,MAAM,IAAIa,MAAMH,EAAWI,QAAQ,mCAAoC,CAACd,IAAKO,EAAMP,OAEnFY,EAAIL,EAAMP,KAAOO,EAAMA,KAC3B,CACA,OAAOK,CACX,EAAG,CAAC,EACR,CAEA,SAASI,EAA0BC,EAAQC,GACvC,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAQE,OAAQD,IAAK,CACrC,MAAME,EAASH,EAAQC,GACvB,GAAsB,gBAAlBE,EAAOC,OAC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AuB7F,GACnB,OAAO4B,EAAMsJ,IAAI,GAAGH,oBAAsC/K,IAC9D,EA1BIuE,aAoCJ,SAAsBvE,EAAQgL,EAAcC,GACxC,OAAID,EACOpJ,EAAMsJ,IAAI,GAAGH,qBAAuC/K,IAAU,CACjEF,QAAS,CACL,uBAAwBkL,EACxB,gCAAiCC,KAItCrJ,EAAMsJ,IAAI,GAAGH,qBAAuC/K,IAC/D,EA7CImL,eA+CJ,SAAwBnO,GACpB,OAAO4E,EAAM/B,KAAK,GAAGkL,UAA6B/N,EAAM,CACpD8C,QAAS,CACL,eAAgB,eAG5B,EACJ,C","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/externalsync/controllers.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/rest/connectors.rest.service.js"],"sourcesContent":["import 'angular/rest/rdf4j.repositories.rest.service';\nimport 'angular/rest/connectors.rest.service';\nimport {LoggerProvider} from \"../core/services/logger-provider\";\n\nconst modules = [\n 'graphdb.framework.rest.rdf4j.repositories.service',\n 'graphdb.framework.rest.connectors.service',\n];\n\nconst logger = LoggerProvider.logger;\n\nangular\n .module('graphdb.framework.externalsync.controllers', modules)\n .controller('ConnectorsCtrl', ConnectorsCtrl)\n .controller('ExtendNewConnectorCtrl', ExtendNewConnectorCtrl)\n .controller('CreateConnectorCtrl', CreateConnectorCtrl)\n .controller('CreateProgressCtrl', CreateProgressCtrl)\n .controller('DeleteConnectorCtrl', DeleteConnectorCtrl)\n .filter('ceil', ceil);\n\nfunction jsonToFormData(data) {\n const str = [];\n Object.keys(data).forEach(function(key) {\n str.push(encodeURIComponent(key) + '=' + encodeURIComponent(data[key]));\n });\n return str.join('&');\n}\n\nfunction toArrayMap(map) {\n return _.map(map, function(value, key) {\n return {key: key, value: value};\n });\n}\n\nfunction fromArrayMap(arrayMap, $translate) {\n return _.reduce(arrayMap, function(acc, value) {\n if (value.key === '' && value.value === '') {\n // empty pair, skip it\n } else if (value.key === '') {\n throw new Error($translate.instant('externalsync.empty.value.key.error', {value: value.value}));\n } else if (acc.hasOwnProperty(value.key)) {\n throw new Error($translate.instant('externalsync.duplicate.key.error', {key: value.key}));\n } else {\n acc[value.key] = value.value;\n }\n return acc;\n }, {});\n}\n\nfunction mapCreateValuesToUiValues(values, options) {\n for (let i = 0; i < options.length; i++) {\n const option = options[i];\n if (option.__type === 'StringArray') {\n if (!values[option.__name]) {\n values[option.__name] = [''];\n }\n } else if (option.__type === 'OptionArray') {\n if (!values[option.__name]) { // values has no entry for this option\n values[option.__name] = [];\n const optionEl = {};\n for (let j = 0; j < option.__childOptions.length; j++) {\n const child = option.__childOptions[j];\n if (child.__type === 'StringArray') {\n optionEl[child.__name] = [''];\n } else {\n optionEl[child.__name] = (!angular.isUndefined(child.__defaultValue) ? child.__defaultValue : '');\n }\n }\n values[option.__name].push(optionEl);\n } else { // values already has en entry for this option\n // Copies the default value for Boolean child options if no explicit value is set\n for (let j = 0; j < option.__childOptions.length; j++) {\n const child = option.__childOptions[j];\n if (child.__type === 'Boolean') {\n for (let k = 0; k < values[option.__name].length; k++) {\n const valueK = values[option.__name][k];\n if (!valueK.hasOwnProperty([child.__name]) && angular.isDefined(child.__defaultValue)) {\n valueK[child.__name] = child.__defaultValue;\n }\n }\n }\n }\n }\n } else if (option.__type === 'Map') {\n if (!values[option.__name]) {\n values[option.__name] = [];\n } else {\n values[option.__name] = toArrayMap(values[option.__name]);\n }\n } else if (option.__type === 'JsonString') {\n if (values[option.__name] && !(values[option.__name] instanceof String) && typeof values[option.__name] !== 'string') {\n values[option.__name] = angular.toJson(values[option.__name], 2);\n }\n } else {\n if (angular.isUndefined(values[option.__name])) {\n values[option.__name] = (!angular.isUndefined(option.__defaultValue) ? option.__defaultValue : '');\n }\n }\n }\n\n return values;\n}\n\nfunction _evaluateSparqlQuery(http, repository, query) {\n return http.post('repositories/' + repository, jsonToFormData({query: query}),\n {\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n 'Accept': 'application/sparql-results+json',\n 'X-GraphDB-Local-Consistency': 'updating',\n },\n });\n}\n\nfunction buildNamePrefix(prefix) {\n return prefix.substring(0, prefix.length - 1) + '/instance#';\n}\n\nfunction createConnectorQuery(name, prefix, fields, options, reportError) {\n // Returns a copy of the parameter obj sorted according to the order in options\n function sortObject(obj, options) {\n const newObject = {};\n _.each(options, function(option) {\n if (angular.isDefined(obj[option.__name])) {\n if (option.__type === 'OptionArray') {\n newObject[option.__name] = [];\n _.each(obj[option.__name], function(childOption) {\n newObject[option.__name].push(sortObject(childOption, option.__childOptions));\n });\n } else {\n newObject[option.__name] = _.cloneDeep(obj[option.__name]);\n }\n }\n });\n return newObject;\n }\n\n const fcopy = sortObject(fields, options);\n\n for (let i = 0; i < options.length; i++) {\n try {\n if (options[i].__type === 'Map') {\n fcopy[options[i].__name] = fromArrayMap(fcopy[options[i].__name], $translate);\n } else if (options[i].__type === 'JsonString') {\n fcopy[options[i].__name] = angular.fromJson(fcopy[options[i].__name]);\n }\n } catch (e) {\n reportError(options[i].__label, e.message);\n return null;\n }\n }\n\n removeEmptyValues(fcopy);\n //escapeValues(fields);\n let finalString = '';\n finalString += 'PREFIX :<' + prefix + '>\\n';\n const namePrefix = buildNamePrefix(prefix);\n finalString += 'PREFIX inst:<' + namePrefix + '>\\n';\n finalString += 'INSERT DATA {\\n';\n finalString += \"\\tinst:\" + name + \" :createConnector '''\\n\";\n finalString += angular.toJson(fcopy, 2);\n finalString += \"\\n''' .\\n}\\n\";\n finalString = finalString.replace(/\\\\/g, '\\\\\\\\\\\\');\n return finalString;\n}\n\nfunction createStatusQueryForIri(iri) {\n const statusIri = iri.replace(/\\/instance#.+$/, '#connectorStatus');\n let finalString = '';\n finalString += 'SELECT ?status {\\n';\n finalString += '\\t<' + iri + '> <' + statusIri + '> ?status';\n finalString += '\\n}';\n return finalString;\n}\n\nfunction createStatusQueryForAny(connectors) {\n const connectorIris = _.map(connectors,\n function(k) {\n return '<' + k.value + 'connectorStatus' + '>';\n }).join('|');\n\n if (connectorIris) {\n return 'SELECT ?connector ?status { ?connector ' + connectorIris + ' ?status }';\n }\n\n return null;\n}\n\nfunction repairConnectorQuery(name, prefix) {\n const namePrefix = buildNamePrefix(prefix);\n return 'PREFIX prefix:<' + prefix + '>\\n' +\n 'INSERT DATA {\\n' +\n '\\t<' + namePrefix + name + '> prefix:repairConnector \"\"\\n' +\n '}';\n}\n\nfunction deleteConnectorQuery(name, prefix, force) {\n const namePrefix = prefix.substring(0, prefix.length - 1) + \"/instance#\";\n return 'PREFIX prefix:<' + prefix + '>\\n' +\n 'INSERT DATA {\\n' +\n '\\t<' + namePrefix + name + '> prefix:dropConnector \"' + (force ? \"force\" : \"\") + '\"\\n' +\n '}';\n}\n\nfunction removeEmptyValues(data) {\n // remove empty values from array\n if (Array.isArray(data)) {\n data = _.filter(data, function(item) {\n return item !== null && (!item.trim || item.trim() !== '');\n });\n }\n // remove empty values from object values\n Object.keys(data).forEach(function(key) {\n if ((data[key] === '' || data[key] === null || data[key] === undefined) && data[key] !== false) {\n delete data[key];\n } else if (typeof data[key] === 'object') {\n data[key] = removeEmptyValues(data[key]);\n }\n });\n return data;\n}\n\nfunction parseFirstBuildingResult(results) {\n if (results.bindings) {\n for (let i = 0; i < results.bindings.length; i++) {\n try {\n const statusObject = JSON.parse(results.bindings[i].status.value);\n if (statusObject.status === 'BUILDING') {\n return {\n connector: results.bindings[i].connector.value,\n status: statusObject,\n };\n }\n } catch (e) {\n logger.error(e);\n }\n }\n }\n\n return {};\n}\n\nConnectorsCtrl.$inject = ['$scope', '$http', '$repositories', '$uibModal', 'toastr', 'ModalService', '$q', 'RDF4JRepositoriesRestService', 'ConnectorsRestService', '$translate'];\n\nfunction ConnectorsCtrl($scope, $http, $repositories, $uibModal, toastr, ModalService, $q, RDF4JRepositoriesRestService, ConnectorsRestService, $translate) {\n $scope.loader = false;\n\n $scope.controllers = [];\n\n $scope.existing = {};\n\n $scope.definitions = {};\n\n $scope.getLoaderMessage = function() {\n const timeSeconds = (Date.now() - $scope.loaderStartTime) / 1000;\n const timeHuman = $scope.getHumanReadableSeconds(timeSeconds);\n let message = '';\n if ($scope.progressMessage) {\n message = $scope.progressMessage + '... ' + timeHuman;\n } else {\n message = $translate.instant('common.running.operation', {timeHuman: timeHuman});\n }\n if ($scope.extraMessage && timeSeconds > 10) {\n message += '\\n' + $scope.extraMessage;\n }\n\n return message;\n };\n\n $scope.setLoader = function(isRunning, progressMessage, extraMessage) {\n if (isRunning) {\n $scope.loader = true;\n $scope.loaderStartTime = Date.now();\n $scope.progressMessage = progressMessage;\n $scope.extraMessage = extraMessage;\n } else {\n $scope.loader = false;\n $scope.progressMessage = '';\n $scope.extraMessage = '';\n }\n };\n\n $scope.initConnector = function(connector) {\n return ConnectorsRestService.initConnector(encodeURIComponent(connector.value))\n .then(function(res) {\n $scope.definitions[connector.key] = res.data;\n\n return ConnectorsRestService.hasConnector(encodeURIComponent(connector.value))\n .then(function(res) {\n $scope.existing[connector.key] = res.data;\n });\n });\n };\n\n $scope.getConnectors = function() {\n if (!$scope.isLicenseValid()) {\n return;\n }\n if (!$scope.canWriteActiveRepo()) {\n return;\n }\n\n $scope.setLoader(true, $translate.instant('externalsync.fetching.connectors'), $translate.instant('common.extra.message'));\n\n ConnectorsRestService.getConnectors()\n .then(function(res) {\n $scope.connectors = Object.keys(res.data).map(function(key) {\n return {key: key, value: res.data[key]};\n });\n\n $q.all(_.map($scope.connectors, function(connector) {\n return $scope.initConnector(connector);\n })).finally(function() {\n resetProgress();\n\n const query = createStatusQueryForAny($scope.connectors);\n\n if (query) {\n evaluateSparqlQuery(query)\n .then(function(res) {\n const status = parseFirstBuildingResult(res.data.results);\n if (status.connector) {\n // has a building connector, open progress indicator\n const d = status.connector.split(/#/);\n d[0] = d[0].replace(/\\/instance$/, '#');\n showProgress(d[0], d[1]);\n }\n })\n .finally(function() {\n $scope.setLoader(false);\n });\n } else {\n $scope.setLoader(false);\n }\n });\n }).catch(function(e) {\n $scope.setLoader(false);\n toastr.error(getError(e), $translate.instant('externalsync.could.not.get.connectors.error'));\n });\n\n $scope.existing = {};\n };\n\n $scope.getOptions = function(connector) {\n return $scope.definitions[connector.key];\n };\n\n $scope.isEmpty = function(value) {\n return angular.isObject(value) && Object.keys(value).length === 0;\n };\n\n $scope.toPrettyJson = function(value) {\n return angular.toJson(value, 2);\n };\n\n $scope.$watch(function() {\n return $repositories.getActiveRepository();\n }, $scope.getConnectors);\n\n $scope.$watch(function() {\n return $repositories.getActiveLocation();\n }, $scope.getConnectors);\n\n function evaluateSparqlQuery(query) {\n return _evaluateSparqlQuery($http, $repositories.getActiveRepository(), query);\n }\n\n function resetProgress(repair) {\n $scope.beingBuiltConnector = {\n percentDone: 0,\n status: {\n processedEntities: 0,\n estimatedEntities: 0,\n indexedEntities: 0,\n entitiesPerSecond: 0,\n },\n actionName: repair ? $translate.instant('externalsync.repairing') : $translate.instant('externalsync.creating'),\n waitOnRepairStartOnce: !!repair,\n eta: '-',\n inline: false,\n iri: null,\n };\n }\n\n function openProgressModal(prefix, name, repair) {\n resetProgress(repair);\n\n $.extend($scope.beingBuiltConnector, {\n iri: buildNamePrefix(prefix) + name,\n name: name,\n inline: false,\n doneCallback: function() {\n $scope.beingBuiltConnector.modalInstance.dismiss('cancel');\n },\n });\n\n $scope.beingBuiltConnector.modalInstance = $uibModal.open({\n templateUrl: 'pages/connectorProgress.html',\n controller: 'CreateProgressCtrl',\n size: 'lg',\n backdrop: 'static',\n scope: $scope,\n });\n\n return $scope.beingBuiltConnector.modalInstance;\n }\n\n function showProgress(prefix, name) {\n resetProgress();\n\n $.extend($scope.beingBuiltConnector, {\n iri: buildNamePrefix(prefix) + name,\n name: name,\n inline: true,\n doneCallback: function() {\n $scope.beingBuiltConnector.inline = false;\n },\n });\n }\n\n function executeCreate(connector, obj, errorCallback) {\n const modal = openProgressModal(connector.value, obj.name, false);\n RDF4JRepositoriesRestService.addStatements($repositories.getActiveRepository(), jsonToFormData({update: obj.query}))\n .then(function() {\n ConnectorsRestService.getConnectors().then(function() {\n ConnectorsRestService.hasConnector(encodeURIComponent(connector.value)).then(function(res) {\n $scope.existing[connector.key] = res.data;\n });\n });\n toastr.success($translate.instant('created.connector', {name: obj.name}));\n }, function(err) {\n toastr.error(getError(err));\n errorCallback();\n }).finally(function() {\n modal.dismiss('cancel');\n });\n }\n\n $scope.copyConnector = function(connector, values) {\n let newValues;\n if (!angular.isUndefined(values)) {\n newValues = _.cloneDeep(values);\n newValues.name = newValues.name + '-copy';\n }\n const modal = $uibModal.open({\n templateUrl: 'pages/createConnector.html',\n controller: 'CreateConnectorCtrl',\n size: 'lg',\n backdrop: 'static',\n resolve: {\n connector: function() {\n return connector;\n },\n values: function() {\n return angular.isUndefined(newValues) ? {name: '', values: {}} : newValues;\n },\n options: function() {\n return $scope.getOptions(connector);\n },\n },\n });\n\n modal.result.then(function(obj) {\n executeCreate(connector, obj, function() {\n obj.skipConversion = true;\n $scope.newConnector(connector, obj);\n });\n });\n };\n\n $scope.newConnector = function(connector, values) {\n const modal = $uibModal.open({\n templateUrl: 'pages/createConnector.html',\n controller: 'CreateConnectorCtrl',\n size: 'lg',\n backdrop: 'static',\n resolve: {\n connector: function() {\n return connector;\n },\n values: function() {\n return angular.isUndefined(values) ? {name: '', values: {}} : values;\n },\n options: function() {\n return $scope.getOptions(connector);\n },\n },\n });\n\n modal.result.then(function(obj) {\n executeCreate(connector, obj, function() {\n obj.skipConversion = true;\n $scope.newConnector(connector, obj);\n });\n });\n };\n\n $scope.repair = function(inst, type) {\n ModalService.openSimpleModal({\n title: $translate.instant('externalsync.confirm.repair'),\n message: $translate.instant('externalsync.repair.warning.msg'),\n warning: true,\n }).result\n .then(function() {\n const modal = openProgressModal(type.value, inst.name, true);\n\n const query = repairConnectorQuery(inst.name, type.value);\n\n RDF4JRepositoriesRestService.addStatements($repositories.getActiveRepository(), jsonToFormData({update: query}))\n .then(function() {\n ConnectorsRestService.getConnectors().then(function() {\n ConnectorsRestService.hasConnector(encodeURIComponent(type.value)).then(function(res) {\n $scope.existing[type.key] = res.data;\n });\n });\n toastr.success($translate.instant('externalsync.repair.success.msg', {name: inst.name}));\n }, function(err) {\n toastr.error(getError(err));\n }).finally(function() {\n modal.dismiss('cancel');\n });\n });\n };\n\n $scope.delete = function(inst, type) {\n const isExternal = type.key.indexOf(\"Elastic\") >= 0 || type.key.indexOf(\"Solr\") >= 0;\n\n $uibModal.open({\n templateUrl: 'js/angular/externalsync/templates/deleteConnector.html',\n controller: 'DeleteConnectorCtrl',\n resolve: {\n popoverMsg: function() {\n return isExternal ? $translate.instant('delete.connector.conditional', {type: type.key}) : '';\n },\n },\n }).result\n .then(function(force) {\n $scope.setLoader(true, $translate.instant('externalsync.delete.progress.msg', {name: inst.name}),\n $translate.instant('externalsync.extra.message.warning'));\n\n const query = deleteConnectorQuery(inst.name, type.value, force);\n RDF4JRepositoriesRestService.addStatements($repositories.getActiveRepository(), jsonToFormData({update: query}))\n .then(function() {\n ConnectorsRestService.getConnectors().then(function() {\n ConnectorsRestService.hasConnector(encodeURIComponent(type.value)).then(function(res) {\n $scope.existing[type.key] = res.data;\n });\n });\n if (force) {\n toastr.success($translate.instant('externalsync.delete.force.success.msg', {name: inst.name}));\n if (isExternal) {\n toastr.warning($translate.instant('externalsync.delete.remote.warning', {key: type.key}));\n }\n } else {\n toastr.success($translate.instant('externalsync.delete.success.msg', {name: inst.name}));\n }\n }, function(err) {\n toastr.error(getError(err));\n }).finally(function() {\n $scope.setLoader(false);\n });\n });\n };\n\n $scope.viewQuery = function(connector, inst) {\n $uibModal.open({\n templateUrl: 'pages/viewQuery.html',\n controller: 'ViewQueryCtrl',\n resolve: {\n query: function() {\n const options = $scope.getOptions(connector);\n return createConnectorQuery(inst.name, connector.value,\n mapCreateValuesToUiValues(inst.values, options), options);\n },\n },\n });\n };\n}\n\nDeleteConnectorCtrl.$inject = ['$scope', '$uibModalInstance', 'popoverMsg'];\nfunction DeleteConnectorCtrl($scope, $uibModalInstance, popoverMsg) {\n $scope.force = false;\n $scope.popoverMsg = popoverMsg;\n\n $scope.ok = function() {\n $uibModalInstance.close($scope.force);\n };\n\n $scope.cancel = function() {\n $uibModalInstance.dismiss();\n };\n}\n\nExtendNewConnectorCtrl.$inject = ['$scope', '$uibModalInstance', 'connector', '$uibModal', 'toastr'];\nfunction ExtendNewConnectorCtrl($scope, $uibModalInstance, connector, $uibModal, toastr) {\n $scope.connector = connector;\n\n $scope.addField = function(index, optionName) {\n const newField = _.cloneDeep($scope.defaultValues[optionName][0]);\n $scope.values[optionName].splice(index + 1, 0, newField);\n };\n\n $scope.addOption = function(index, array) {\n array.splice(index + 1, 0, '');\n };\n\n $scope.deleteOption = function(index, array) {\n array.splice(index, 1);\n };\n\n $scope.addMapOption = function(index, array) {\n array.splice(index + 1, 0, {key: '', value: ''});\n };\n\n $scope.deleteMapOption = function(index, array) {\n array.splice(index, 1);\n };\n\n function toQuery() {\n return createConnectorQuery($scope.name, connector.value, $scope.values, $scope.options,\n function(label, error) {\n toastr.error(error, label);\n });\n }\n\n $scope.ok = function() {\n if ($scope.form.$valid) {\n const query = toQuery();\n\n if (query) {\n $uibModalInstance.close({name: $scope.name, values: $scope.values, options: $scope.options, query: query});\n }\n }\n };\n\n $scope.viewQuery = function() {\n const query = toQuery();\n\n if (query) {\n $uibModal.open({\n templateUrl: 'pages/viewQuery.html',\n controller: 'ViewQueryCtrl',\n resolve: {\n query: function() {\n return query;\n },\n },\n });\n }\n };\n\n $scope.cancel = function() {\n $uibModalInstance.dismiss('cancel');\n };\n}\n\nCreateConnectorCtrl.$inject = ['$scope', '$controller', '$http', '$uibModalInstance', 'connector', '$uibModal', 'values', 'options'];\n\nfunction CreateConnectorCtrl($scope, $controller, $http, $uibModalInstance, connector, $uibModal, values, options) {\n angular.extend(this, $controller('ExtendNewConnectorCtrl', {\n $scope: $scope,\n $uibModalInstance: $uibModalInstance,\n connector: connector,\n $uibModal: $uibModal,\n }));\n $scope.values = values.values;\n $scope.options = options;\n $scope.name = values.name;\n if (!values.skipConversion) {\n $scope.values = mapCreateValuesToUiValues($scope.values, $scope.options);\n }\n $scope.defaultValues = _.cloneDeep($scope.values);\n}\n\n// Note that this is a fancy controller: it's used both for a modal and for a directive.\n// This means you can't rely on custom injection through resolve in the modal and the scope\n// must be shared with the main connectors controller.\nCreateProgressCtrl.$inject = ['$scope', '$interval', '$http', '$repositories', '$translate'];\n\nfunction CreateProgressCtrl($scope, $interval, $http, $repositories, $translate) {\n function evaluateSparqlQuery(query) {\n return _evaluateSparqlQuery($http, $repositories.getActiveRepository(), query);\n }\n\n function initProgress() {\n const query = createStatusQueryForIri($scope.beingBuiltConnector.iri);\n\n // reset iri value so that watch will fire again when we do something with the same connector\n $scope.beingBuiltConnector.iri = null;\n\n $scope.progressInterval = $interval(function() {\n function getFirstStatusFromResult(results) {\n if (results.bindings) {\n if (results.bindings.length > 0) {\n try {\n return JSON.parse(results.bindings[0].status.value);\n } catch (e) {\n logger.error(e);\n }\n }\n }\n\n return {};\n }\n\n evaluateSparqlQuery(query)\n .then(function(res) {\n const status = getFirstStatusFromResult(res.data.results);\n if (status.status === 'BUILDING') {\n $scope.beingBuiltConnector.status = status;\n $scope.beingBuiltConnector.percentDone = (100 * status.processedEntities / status.estimatedEntities).toFixed(0);\n $scope.beingBuiltConnector.eta = $scope.getHumanReadableSeconds(status.etaSeconds);\n $scope.beingBuiltConnector.actionName = status.repair ? $translate.instant('externalsync.repairing') : $translate.instant('externalsync.creating');\n $scope.beingBuiltConnector.waitOnRepairStartOnce = false;\n } else if (status.status === 'BUILT' && !$scope.beingBuiltConnector.waitOnRepairStartOnce) {\n // done\n $interval.cancel($scope.progressInterval);\n if ($scope.beingBuiltConnector.doneCallback) {\n $scope.beingBuiltConnector.doneCallback();\n }\n }\n });\n }, 1000);\n\n $scope.$on('$destroy', function() {\n $interval.cancel($scope.progressInterval);\n });\n }\n\n $scope.beingBuiltConnector = $scope.beingBuiltConnector || {};\n\n // for modal instance we get the iri before hand and can start progress now\n if (!$scope.beingBuiltConnector.inline && $scope.beingBuiltConnector.iri) {\n initProgress();\n }\n\n // for inline progress we need to watch for the iri value\n $scope.$watch('beingBuiltConnector.iri', function(value) {\n if ($scope.beingBuiltConnector.inline && value) {\n initProgress();\n }\n });\n}\n\nfunction ceil() {\n return function(input) {\n return Math.ceil(input);\n };\n}\n","angular\n .module('graphdb.framework.rest.connectors.service', [])\n .factory('ConnectorsRestService', ConnectorsRestService);\n\nConnectorsRestService.$inject = ['$http'];\n\nconst CONNECTORS_ENDPOINT = 'rest/connectors';\n\nfunction ConnectorsRestService($http) {\n\n return {\n getConnectors,\n initConnector,\n hasConnector,\n checkConnector\n };\n\n /**\n * Fetches all connectors for the repository with id <code>repositoryId</code> and location <code>repositoryLocation</code>.\n * If the repository ID and repository location are not provided, the values persisted in local storage will be used {@see authentication.interceptor.js}.\n *\n * @param {string | undefined} repositoryId - The repository id.\n * @param {string | undefined} repositoryLocation - The repository location.\n * @return {*} The similarity indexes for the specified repository.\n */\n function getConnectors(repositoryId, repositoryLocation) {\n if (repositoryId) {\n return $http.get(CONNECTORS_ENDPOINT, {\n headers: {\n 'X-GraphDB-Repository': repositoryId,\n 'X-GraphDB-Repository-Location': repositoryLocation\n }\n });\n }\n return $http.get(CONNECTORS_ENDPOINT);\n }\n\n function initConnector(prefix) {\n return $http.get(`${CONNECTORS_ENDPOINT}/options?prefix=${prefix}`);\n }\n\n /**\n * Fetches all connectors of a specific type defined by the prefix for the repository with id <code>repositoryId</code>\n * and location <code>repositoryLocation</code>. If the repository ID and repository location are not provided, the currently selected repository will be used.\n * @param {string} prefix\n * @param {string | undefined} repositoryId - The repository id.\n * @param {string | undefined} repositoryLocation - The repository location.\n * @return {Promise<ConnectorListModel>}\n */\n function hasConnector(prefix, repositoryId, repositoryLocation) {\n if (repositoryId) {\n return $http.get(`${CONNECTORS_ENDPOINT}/existing?prefix=${prefix}`, {\n headers: {\n 'X-GraphDB-Repository': repositoryId,\n 'X-GraphDB-Repository-Location': repositoryLocation\n }\n });\n }\n return $http.get(`${CONNECTORS_ENDPOINT}/existing?prefix=${prefix}`);\n }\n\n function checkConnector(data) {\n return $http.post(`${CONNECTORS_ENDPOINT}/check`, data, {\n headers: {\n 'Content-Type': 'text/plain'\n }\n });\n }\n}\n"],"names":["logger","LoggerProvider","jsonToFormData","data","str","Object","keys","forEach","key","push","encodeURIComponent","join","toArrayMap","map","_","value","fromArrayMap","arrayMap","$translate","reduce","acc","Error","instant","hasOwnProperty","mapCreateValuesToUiValues","values","options","i","length","option","__type","__name","j","__childOptions","child","k","valueK","angular","isDefined","__defaultValue","optionEl","isUndefined","String","toJson","_evaluateSparqlQuery","http","repository","query","post","headers","buildNamePrefix","prefix","substring","createConnectorQuery","name","fields","reportError","fcopy","sortObject","obj","newObject","each","childOption","cloneDeep","fromJson","e","__label","message","removeEmptyValues","finalString","replace","Array","isArray","filter","item","trim","undefined","ConnectorsCtrl","$scope","$http","$repositories","$uibModal","toastr","ModalService","$q","RDF4JRepositoriesRestService","ConnectorsRestService","resetProgress","repair","beingBuiltConnector","percentDone","status","processedEntities","estimatedEntities","indexedEntities","entitiesPerSecond","actionName","waitOnRepairStartOnce","eta","inline","iri","openProgressModal","$","extend","doneCallback","modalInstance","dismiss","open","templateUrl","controller","size","backdrop","scope","executeCreate","connector","errorCallback","modal","addStatements","getActiveRepository","update","then","getConnectors","hasConnector","res","existing","success","err","error","getError","finally","loader","controllers","definitions","getLoaderMessage","timeSeconds","Date","now","loaderStartTime","timeHuman","getHumanReadableSeconds","progressMessage","extraMessage","setLoader","isRunning","initConnector","isLicenseValid","canWriteActiveRepo","connectors","all","connectorIris","createStatusQueryForAny","evaluateSparqlQuery","results","bindings","statusObject","JSON","parse","parseFirstBuildingResult","d","split","catch","getOptions","isEmpty","isObject","toPrettyJson","$watch","getActiveLocation","copyConnector","newValues","resolve","result","skipConversion","newConnector","inst","type","openSimpleModal","title","warning","delete","isExternal","indexOf","popoverMsg","force","namePrefix","deleteConnectorQuery","viewQuery","DeleteConnectorCtrl","$uibModalInstance","ok","close","cancel","ExtendNewConnectorCtrl","toQuery","label","addField","index","optionName","newField","defaultValues","splice","addOption","array","deleteOption","addMapOption","deleteMapOption","form","$valid","CreateConnectorCtrl","$controller","this","CreateProgressCtrl","$interval","initProgress","statusIri","createStatusQueryForIri","progressInterval","getFirstStatusFromResult","toFixed","etaSeconds","$on","module","input","Math","ceil","$inject","factory","CONNECTORS_ENDPOINT","repositoryId","repositoryLocation","get","checkConnector"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- export const __webpack_esm_id__=80933;export const __webpack_esm_ids__=[28662,64709,78469,80933,83847];export const __webpack_esm_modules__={80933(e,r,o){o(22742),o(33136),o(41559),o(83847),o(64709),o(72953),o(75752),o(21146),o(63030),angular.module("graphdb.framework.impex.import",["toastr","ngRoute","ngFileUpload","ui.bootstrap","graphdb.framework.impex.import.controllers","graphdb.framework.core.services.repositories","graphdb.framework.import.directives.validate-uri","graphdb.framework.import.directives.import-progress-indicator","graphdb.framework.import.directives.import-resource-tree"])},78469(e,r,o){var t=o(71315);angular.module("graphdb.framework.impex.import.controllers.import-resource-message-dialog",[]).controller("ImportResourceMessageDialogController",i),i.$inject=["$scope","$uibModalInstance","$translate","toastr","message"];const s=t.I.logger;function i(e,r,o,t,i){e.message=i,e.close=()=>{r.dismiss()},e.copyToClipboard=()=>{navigator.clipboard.writeText(e.message).then(()=>{t.success(o.instant("import.help.messages.copied_to_clipboard")),e.close()},e=>{s.error("Could not copy text: ",e)})}}},64709(){function e(){return{link:function(e,r,o){e.$watch("file.status",function(){"IMPORTING"!==e.file.status&&"UPLOADING"!==e.file.status||!$(r).has("object").length>0&&$(r).append('<object width="'+o.size+'" height="'+o.size+'" data="js/angular/templates/loader/ot-loader.svg?v=3.5.1-TR3">{{\'common.loading\' | translate}}</object>')})}}}angular.module("graphdb.framework.import.directives.import-progress-indicator",[]).directive("ImportProgressIndicator",e),e.$inject=[]},60016(e,r,o){o(78469);var t=o(2998),s=o(35195);function i(e){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-message.html",scope:{resource:"="},link:r=>{r.ImportResourceStatus=t.I,r.toTitleCase=e=>s.Sn(e),r.showMessage=r=>{e.open({templateUrl:"js/angular/import/templates/import-resource-message-dialog.html",controller:"ImportResourceMessageDialogController",size:"lg",windowClass:"import-resource-message-dialog",backdrop:"static",resolve:{message:function(){return r?r.importResource.message:""}}})}}}}angular.module("graphdb.framework.import.directives.import-resource-message",["graphdb.framework.impex.import.controllers.import-resource-message-dialog"]).directive("importResourceMessage",i),i.$inject=["$uibModal"]},28662(){function e(e,r){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-status-info.html",scope:{resource:"="},link:o=>{const t=[];o.popoverTemplate="resourceStatusInfoTemplate.html",o.popoverIsOpen=!1,o.context=o.resource.importResource.context,o.replaceGraphs=o.resource.importResource.replaceGraphs,o.baseUrl=decodeURIComponent(o.resource.importResource.baseURI),o.forceSerial=o.resource.importResource.forceSerial,o.importedOn=o.resource.importResource.importedOn,o.parserSettings=o.resource.importResource.parserSettings,o.open=()=>{o.closeAllDialogs(),o.popoverIsOpen=!0},o.closeAllDialogs=()=>{e.$broadcast("closePopovers")},o.close=()=>{o.popoverIsOpen=!1};const s=e=>{"Escape"===e.key&&o.$apply(()=>{o.close()})};t.push(o.$on("closePopovers",o.close)),r.on("keydown",s),o.$on("$destroy",()=>{r.off("keydown",s),t.forEach(e=>e())})}}}angular.module("graphdb.framework.import.directives.import-resource-status-info",[]).directive("importResourceStatusInfo",e),e.$inject=["$rootScope","$document"]},72953(e,r,o){var t=o(2998),s=(o(60016),o(28662),o(66256)),i=o(71609),c=o(59601),a=o(33757),l=o(57154);const p={FILE:"FILE",DIRECTORY:"DIRECTORY",ALL:"ALL"},n={ALL:"ALL",NONE:"NONE",IMPORTED:"IMPORTED",NOT_IMPORTED:"NOT_IMPORTED"};function u(e,r){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-tree.html",scope:{columnKeys:"=",showTypeFilter:"=",sortBy:"=",asc:"=",onImport:"&",onImportAll:"&",onReset:"&",onRemove:"&",onStopImport:"&",onEditResource:"&"},link:(o,u,m)=>{o.resources=new i.k,o.displayResources=[],o.TYPE_FILTER_OPTIONS=p,o.filterByType=p.ALL,o.filterByFileName="",o.STATUS_OPTIONS=n,o.selectedByStatus=void 0,o.areAllDisplayedImportResourcesSelected=!1,o.areAllDisplayedImportResourcesPartialSelected=!1,o.ImportResourceStatus=t.I,o.canRemoveResource=angular.isDefined(m.onRemove),o.canResetSelectedResources=!1,o.SORTING_TYPES=s.R,o.sortAsc=!angular.isDefined(m.asc)||o.asc,o.sortedBy=o.sortBy,o.showLoader=r.getShowLoader(),o.hasSelection=!1,o.selectionChanged=e=>{e.setSelection(e.selected),I(),d(),g()},o.selectResourceWithStatus=e=>{o.selectedByStatus=e,o.resources.setSelection(!1),n.ALL===o.selectedByStatus?o.resources.setSelection(!0):n.IMPORTED===o.selectedByStatus?o.resources.selectAllWithStatus([t.I.DONE]):n.NOT_IMPORTED===o.selectedByStatus&&o.resources.selectAllWithStatus([t.I.IMPORTING,t.I.NONE,t.I.ERROR,t.I.PENDING,t.I.INTERRUPTING]),R(),d()},o.filterByTypeChanged=e=>{o.filterByType=e,R()},o.filterByFileNameChanged=e=>{o.filterByFileName=e,N(R,100)},o.onResetStatus=()=>{const e=o.resources.getAllSelected().map(e=>e.path);e.length>0&&o.onReset({resources:e})},o.resetStatus=e=>{o.onReset({resources:[e.path]})},o.onRemoveResources=()=>{const e=o.resources.getAllSelected();e&&e.length>0&&o.onRemove({resources:e})},o.removeResource=e=>{o.onRemove({resources:[e]})},o.importAll=e=>{const r=o.resources.getAllSelectedForImport();r.length>0&&o.onImportAll({selectedResources:r,withoutChangingSettings:e})},o.stopImport=e=>{o.onStopImport({resource:e})},o.sort=e=>{o.sortedBy===e?o.sortAsc=!o.sortAsc:o.sortAsc=!0,o.sortedBy=e,R()},o.editResource=e=>{o.onEditResource({resource:e})};const d=()=>{o.canResetSelectedResources=o.resources.getSelectedImportedResources()},R=()=>{o.resources.getRoot().updateSelectionState(),y(),o.displayResources=o.resources.toList().filter(A).filter(E),g(),I()},g=()=>{const e=o.resources.getAllSelectedFilesNames();o.hasSelection=e.length>0,r.updateSelectedFilesNames(e)},I=()=>{const e=o.displayResources.some(e=>!e.selected),r=o.displayResources.some(e=>e.selected);o.areAllDisplayedImportResourcesSelected=r&&!e,o.areAllDisplayedImportResourcesPartialSelected=r&&e},y=()=>{s.R.NAME===o.sortedBy?o.resources.sort(f(o.sortAsc)):s.R.SIZE===o.sortedBy?o.resources.sort(h(o.sortAsc)):s.R.MODIFIED===o.sortedBy?o.resources.sort(S(o.sortAsc)):s.R.IMPORTED===o.sortedBy?o.resources.sort(T(o.sortAsc)):s.R.CONTEXT===o.sortedBy&&o.resources.sort(v(o.sortAsc))},f=e=>(r,o)=>e?r.importResource.name.localeCompare(o.importResource.name):o.importResource.name.localeCompare(r.importResource.name),h=e=>(r,o)=>{const t=l.ByteUtils.convertToBytes(r.importResource.size),s=l.ByteUtils.convertToBytes(o.importResource.size);return e?t-s:s-t},S=e=>(r,o)=>{const t=r.importResource.modifiedOn||Number.MAX_VALUE,s=o.importResource.modifiedOn||Number.MAX_VALUE;return e?t-s:s-t},T=e=>(r,o)=>{const t=r.importResource.importedOn||Number.MAX_VALUE,s=o.importResource.importedOn||Number.MAX_VALUE;return e?t-s:s-t},v=e=>(r,o)=>e?r.importResource.context.localeCompare(o.importResource.context):o.importResource.context.localeCompare(r.importResource.context),A=e=>p.ALL===o.filterByType||(o.filterByType===p.FILE?e.isFile():o.filterByType===p.DIRECTORY&&e.isDirectory()),E=e=>!o.filterByFileName||(o.filterByType===p.DIRECTORY?e.hasTextInDirectoriesName(o.filterByFileName):o.filterByType===p.FILE?e.hasTextInFilesName(o.filterByFileName):e.hasTextInResourcesName(o.filterByFileName));let O;const N=(r,o)=>{O&&e.cancel(O),O=e(r,o)},b=[];b.push(r.onResourcesUpdated((e=[])=>{const t=c.D.USER===r.getActiveTabId();o.resources.isEmpty()?(o.resources=a.Fp.toImportResourceTree(e,t),t&&(o.sortedBy=s.R.MODIFIED)):a.Fp.mergeResourceTree(o.resources,e,t),a.Fp.calculateElementIndent(o.resources),a.Fp.setupAfterTreeInitProperties(o.resources),R(),d()})),b.push(r.onShowLoaderUpdated(e=>o.showLoader=e)),b.push(r.onActiveTabIdUpdated(()=>o.resources=new i.k)),o.$on("$destroy",()=>{b.forEach(e=>e())})}}}angular.module("graphdb.framework.import.directives.import-resource-tree",["graphdb.framework.import.directives.import-resource-message","graphdb.framework.import.directives.import-resource-status-info"]).directive("importResourceTree",u),u.$inject=["$timeout","ImportContextService"]},83847(){function e(e){return{restrict:"A",require:"ngModel",link:function(r,o,t,s){s.$parsers.unshift(function(r){if(s.$setValidity("validateUri",!0),!s.$isEmpty(r)){const o=e.isValidIri(r,r.toString());s.$setValidity("validateUri",o)}return r})}}}angular.module("graphdb.framework.import.directives.validate-uri",[]).directive("validateUri",e),e.$inject=["UriUtils"]}};
2
- //# sourceMappingURL=80933.bd439bb6f5fad66637ac.bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"80933.bd439bb6f5fad66637ac.bundle.js","mappings":"2OAsBAA,QAAQC,OAAO,iCAZC,CACZ,SACA,UACA,eACA,eACA,6CACA,+CACA,mDACA,gEACA,4D,8BCjBJD,QACKC,OAAO,4EAA6E,IACpFC,WAAW,wCAAyCC,GAEzDA,EAAsCC,QAAU,CAAC,SAAU,oBAAqB,aAAc,SAAU,WAExG,MAAMC,EAASC,EAAAA,EAAeD,OAE9B,SAASF,EAAsCI,EAAQC,EAAmBC,EAAYC,EAAQC,GAC1FJ,EAAOI,QAAUA,EAGjBJ,EAAOK,MAAQ,KACXJ,EAAkBK,WAGtBN,EAAOO,gBAAkB,KACrBC,UAAUC,UAAUC,UAAUV,EAAOI,SAChCO,KAAK,KACFR,EAAOS,QAAQV,EAAWW,QAAQ,6CAClCb,EAAOK,SACPS,IACAhB,EAAOiB,MAAM,wBAAyBD,KAGtD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AAU,CAAC,WAAY,uB,UCXnD,SAASuN,EAAYC,GACjB,MAAO,CACHrL,SAAU,IACVsL,QAAS,UACTrM,KAAM,SAAUC,EAAOC,EAASC,EAAMmM,GAClCA,EAAKC,SAASC,QAAQ,SAAUC,GAE5B,GADAH,EAAKI,aAAa,eAAe,IAC5BJ,EAAKK,SAASF,GAAQ,CACvB,MAAMG,EAAQR,EAASS,WAAWJ,EAAOA,EAAMK,YAC/CR,EAAKI,aAAa,cAAeE,EACrC,CACA,OAAOH,CACX,EACJ,EAER,CAzBAjO,QACKC,OAAO,mDAHI,IAIXmC,UAAU,cAAeuL,GAE9BA,EAAYvN,QAAU,CAAC,W","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/import/app.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/import/controllers/import-resource-message-dialog.controller.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/import/directives/import-progress-indicator.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/import/directives/import-resource-message.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/import/directives/import-resource-status-info.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/import/directives/import-resource-tree.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/import/directives/validate-uri.directive.js"],"sourcesContent":["import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/import/controllers/import-view.controller';\nimport 'angular/import/directives/validate-uri.directive';\nimport 'angular/import/directives/import-progress-indicator.directive';\nimport 'angular/import/directives/import-resource-tree.directive';\nimport 'angular/core/services/repositories.service';\nimport 'ng-file-upload/dist/ng-file-upload.min';\nimport 'ng-file-upload/dist/ng-file-upload-shim.min';\n\nconst modules = [\n 'toastr',\n 'ngRoute',\n 'ngFileUpload',\n 'ui.bootstrap',\n 'graphdb.framework.impex.import.controllers',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.import.directives.validate-uri',\n 'graphdb.framework.import.directives.import-progress-indicator',\n 'graphdb.framework.import.directives.import-resource-tree'\n];\n\nangular.module('graphdb.framework.impex.import', modules);\n","import {LoggerProvider} from \"../../core/services/logger-provider\";\n\nangular\n .module('graphdb.framework.impex.import.controllers.import-resource-message-dialog', [])\n .controller('ImportResourceMessageDialogController', ImportResourceMessageDialogController);\n\nImportResourceMessageDialogController.$inject = ['$scope', '$uibModalInstance', '$translate', 'toastr', 'message'];\n\nconst logger = LoggerProvider.logger;\n\nfunction ImportResourceMessageDialogController($scope, $uibModalInstance, $translate, toastr, message) {\n $scope.message = message;\n\n\n $scope.close = () => {\n $uibModalInstance.dismiss();\n };\n\n $scope.copyToClipboard = () => {\n navigator.clipboard.writeText($scope.message)\n .then(() => {\n toastr.success($translate.instant('import.help.messages.copied_to_clipboard'));\n $scope.close();\n }, (err) => {\n logger.error('Could not copy text: ', err);\n });\n };\n}\n","const modules = [];\n\nangular\n .module('graphdb.framework.import.directives.import-progress-indicator', modules)\n .directive('ImportProgressIndicator', ImportProgressIndicator);\n\nImportProgressIndicator.$inject = [];\n\n// importDirectives.directive('filesOntoLoader',\nfunction ImportProgressIndicator() {\n return {\n link: function (scope, element, attr) {\n scope.$watch('file.status', function () {\n if (scope.file.status === 'IMPORTING' || scope.file.status === 'UPLOADING') {\n if (!$(element).has('object').length > 0) {\n $(element).append('<object width=\"' + attr.size + '\" height=\"' + attr.size + '\" data=\"js/angular/templates/loader/ot-loader.svg?v=3.5.1-TR3\">{{\\'common.loading\\' | translate}}</object>');\n }\n }\n });\n }\n };\n}\n","import 'angular/import/controllers/import-resource-message-dialog.controller';\nimport {ImportResourceStatus} from \"../../models/import/import-resource-status\";\nimport * as stringUtils from \"../../utils/string-utils\";\n\nconst modules = ['graphdb.framework.impex.import.controllers.import-resource-message-dialog'];\n\nangular\n .module('graphdb.framework.import.directives.import-resource-message', modules)\n .directive('importResourceMessage', importResourceMessageDirective);\n\nimportResourceMessageDirective.$inject = ['$uibModal'];\n\nfunction importResourceMessageDirective($uibModal) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/import/templates/import-resource-message.html',\n scope: {\n resource: '='\n },\n link: ($scope) => {\n $scope.ImportResourceStatus = ImportResourceStatus;\n $scope.toTitleCase = (str) => stringUtils.toTitleCase(str);\n\n /**\n *\n * @param {ImportResourceTreeElement} resourceTreeElement\n */\n $scope.showMessage = (resourceTreeElement) => {\n $uibModal.open({\n templateUrl: 'js/angular/import/templates/import-resource-message-dialog.html',\n controller: 'ImportResourceMessageDialogController',\n size: 'lg',\n windowClass: 'import-resource-message-dialog',\n backdrop: 'static',\n resolve: {\n message: function () {\n return resourceTreeElement ? resourceTreeElement.importResource.message : '';\n }\n }\n });\n }\n }\n };\n}\n","const modules = [];\n\nangular\n .module('graphdb.framework.import.directives.import-resource-status-info', modules)\n .directive('importResourceStatusInfo', importResourceStatusInfoDirective);\n\nimportResourceStatusInfoDirective.$inject = ['$rootScope', '$document'];\n\nfunction importResourceStatusInfoDirective($rootScope, $document) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/import/templates/import-resource-status-info.html',\n scope: {\n resource: '='\n },\n link: ($scope) => {\n const subscribers = [];\n\n // =========================\n // Public variables\n // =========================\n $scope.popoverTemplate = 'resourceStatusInfoTemplate.html';\n $scope.popoverIsOpen = false;\n $scope.context = $scope.resource.importResource.context;\n $scope.replaceGraphs = $scope.resource.importResource.replaceGraphs;\n $scope.baseUrl = decodeURIComponent($scope.resource.importResource.baseURI);\n $scope.forceSerial = $scope.resource.importResource.forceSerial;\n $scope.importedOn = $scope.resource.importResource.importedOn;\n $scope.parserSettings = $scope.resource.importResource.parserSettings;\n\n // =========================\n // Public functions\n // =========================\n $scope.open = () => {\n $scope.closeAllDialogs();\n $scope.popoverIsOpen = true;\n };\n\n $scope.closeAllDialogs = () => {\n $rootScope.$broadcast('closePopovers');\n };\n\n $scope.close = () => {\n $scope.popoverIsOpen = false;\n };\n\n const handleEscapeKeyPress = (event) => {\n if (event.key === 'Escape') {\n $scope.$apply(() => {\n $scope.close();\n });\n }\n };\n\n const removeAllSubscribers = () => {\n subscribers.forEach((subscriber) => subscriber());\n };\n\n // =========================\n // Subscriptions\n // =========================\n\n subscribers.push($scope.$on('closePopovers', $scope.close));\n $document.on('keydown', handleEscapeKeyPress);\n\n $scope.$on('$destroy', () => {\n $document.off('keydown', handleEscapeKeyPress);\n removeAllSubscribers();\n });\n }\n };\n}\n","import {ImportResourceStatus} from \"../../models/import/import-resource-status\";\nimport 'angular/import/directives/import-resource-message.directive';\nimport 'angular/import/directives/import-resource-status-info.directive';\nimport {SortingType} from \"../../models/import/sorting-type\";\nimport {ImportResourceTreeElement} from \"../../models/import/import-resource-tree-element\";\nimport {TABS} from \"../services/import-context.service\";\nimport {ImportResourceTreeService} from \"../services/import-resource-tree.service\";\nimport {\n ByteUtils,\n} from \"@ontotext/workbench-api\";\n\nconst TYPE_FILTER_OPTIONS = {\n 'FILE': 'FILE',\n 'DIRECTORY': 'DIRECTORY',\n 'ALL': 'ALL',\n};\n\nconst STATUS_OPTIONS = {\n 'ALL': 'ALL',\n 'NONE': 'NONE',\n 'IMPORTED': 'IMPORTED',\n 'NOT_IMPORTED': 'NOT_IMPORTED',\n};\n\nconst modules = [\n 'graphdb.framework.import.directives.import-resource-message',\n 'graphdb.framework.import.directives.import-resource-status-info',\n];\n\nangular\n .module('graphdb.framework.import.directives.import-resource-tree', modules)\n .directive('importResourceTree', importResourceTreeDirective);\n\nimportResourceTreeDirective.$inject = ['$timeout', 'ImportContextService'];\n\nfunction importResourceTreeDirective($timeout, ImportContextService) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/import/templates/import-resource-tree.html',\n scope: {\n /**\n * Contains mapping of the column names to label keys. Should contain\n * keys for: name, size, imported, modified, context column names.\n */\n columnKeys: '=',\n /**\n * If the type filter buttons should be visible.\n */\n showTypeFilter: '=',\n /**\n * The default field to sort the resources by.\n */\n sortBy: '=',\n asc: '=',\n onImport: '&',\n onImportAll: '&',\n onReset: '&',\n onRemove: '&',\n onStopImport: '&',\n onEditResource: '&',\n },\n link: ($scope, element, attrs) => {\n // =========================\n // Public variables\n // =========================\n $scope.resources = new ImportResourceTreeElement();\n $scope.displayResources = [];\n $scope.TYPE_FILTER_OPTIONS = TYPE_FILTER_OPTIONS;\n $scope.filterByType = TYPE_FILTER_OPTIONS.ALL;\n $scope.filterByFileName = '';\n $scope.STATUS_OPTIONS = STATUS_OPTIONS;\n $scope.selectedByStatus = undefined;\n $scope.areAllDisplayedImportResourcesSelected = false;\n $scope.areAllDisplayedImportResourcesPartialSelected = false;\n $scope.ImportResourceStatus = ImportResourceStatus;\n $scope.canRemoveResource = angular.isDefined(attrs.onRemove);\n $scope.canResetSelectedResources = false;\n $scope.SORTING_TYPES = SortingType;\n $scope.sortAsc = angular.isDefined(attrs.asc) ? $scope.asc : true;\n $scope.sortedBy = $scope.sortBy;\n $scope.showLoader = ImportContextService.getShowLoader();\n $scope.hasSelection = false;\n\n // =========================\n // Public functions\n // =========================\n\n /**\n * Updates the selection model when a resource is selected or unselected.\n * @param {ImportResourceTreeElement} resource The resource that was selected or unselected.\n */\n $scope.selectionChanged = ((resource) => {\n resource.setSelection(resource.selected);\n updateSelectByStateDropdownModel();\n setCanResetResourcesFlag();\n updateHasSelection();\n });\n\n $scope.selectResourceWithStatus = (resourceStatus) => {\n $scope.selectedByStatus = resourceStatus;\n $scope.resources.setSelection(false);\n\n if (STATUS_OPTIONS.ALL === $scope.selectedByStatus) {\n $scope.resources.setSelection(true);\n } else if (STATUS_OPTIONS.IMPORTED === $scope.selectedByStatus) {\n $scope.resources.selectAllWithStatus([ImportResourceStatus.DONE]);\n } else if (STATUS_OPTIONS.NOT_IMPORTED === $scope.selectedByStatus) {\n $scope.resources.selectAllWithStatus([ImportResourceStatus.IMPORTING, ImportResourceStatus.NONE, ImportResourceStatus.ERROR, ImportResourceStatus.PENDING, ImportResourceStatus.INTERRUPTING]);\n }\n\n updateListedImportResources();\n setCanResetResourcesFlag();\n };\n\n $scope.filterByTypeChanged = (newType) => {\n $scope.filterByType = newType;\n updateListedImportResources();\n };\n\n $scope.filterByFileNameChanged = (filterByFileName) => {\n $scope.filterByFileName = filterByFileName;\n debounce(updateListedImportResources, 100);\n };\n\n /**\n * Resets the status of the selected resources.\n */\n $scope.onResetStatus = () => {\n const resourcesNames = $scope.resources.getAllSelected()\n .map((resource) => resource.path);\n if (resourcesNames.length > 0) {\n $scope.onReset({resources: resourcesNames});\n }\n };\n\n /**\n * Resets the status of the given resource.\n * @param {ImportResourceTreeElement} importResource\n */\n $scope.resetStatus = (importResource) => {\n $scope.onReset({resources: [importResource.path]});\n };\n\n $scope.onRemoveResources = () => {\n const selectedResources = $scope.resources.getAllSelected();\n if (selectedResources && selectedResources.length > 0) {\n $scope.onRemove({resources: selectedResources});\n }\n };\n\n $scope.removeResource = (resource) => {\n $scope.onRemove({resources: [resource]});\n };\n\n $scope.importAll = (withoutChangingSettings) => {\n const selectedResources = $scope.resources.getAllSelectedForImport();\n if (selectedResources.length > 0) {\n $scope.onImportAll({selectedResources: selectedResources, withoutChangingSettings});\n }\n };\n\n $scope.stopImport = (importResource) => {\n $scope.onStopImport({resource: importResource});\n };\n\n /**\n * Sorts resources by provided sorting type.\n * @param {SortingType} sortedBy The sorting type to use.\n */\n $scope.sort = (sortedBy) => {\n if ($scope.sortedBy === sortedBy) {\n $scope.sortAsc = !$scope.sortAsc;\n } else {\n $scope.sortAsc = true;\n }\n $scope.sortedBy = sortedBy;\n updateListedImportResources();\n };\n\n $scope.editResource = (resource) => {\n $scope.onEditResource({resource});\n };\n\n // =========================\n // Private functions\n // =========================\n\n /**\n * Sets the flag showing if any of the selected resources is already imported\n * and can have their states reset.\n */\n const setCanResetResourcesFlag = () => {\n $scope.canResetSelectedResources = $scope.resources.getSelectedImportedResources();\n };\n\n const updateListedImportResources = () => {\n $scope.resources.getRoot().updateSelectionState();\n sortResources();\n $scope.displayResources = $scope.resources.toList()\n .filter(filterByType)\n .filter(filterByName);\n\n updateHasSelection();\n updateSelectByStateDropdownModel();\n };\n\n const updateHasSelection = () => {\n const allSelectedFilesNames = $scope.resources.getAllSelectedFilesNames();\n $scope.hasSelection = allSelectedFilesNames.length > 0;\n ImportContextService.updateSelectedFilesNames(allSelectedFilesNames);\n };\n\n const updateSelectByStateDropdownModel = () => {\n const hasUnselectedDisplayedImportResource = $scope.displayResources.some((resource) => !resource.selected);\n const hasSelectedDisplayedImportResource = $scope.displayResources.some((resource) => resource.selected);\n $scope.areAllDisplayedImportResourcesSelected = hasSelectedDisplayedImportResource && !hasUnselectedDisplayedImportResource;\n $scope.areAllDisplayedImportResourcesPartialSelected = hasSelectedDisplayedImportResource && hasUnselectedDisplayedImportResource;\n };\n\n const sortResources = () => {\n if (SortingType.NAME === $scope.sortedBy) {\n $scope.resources.sort(compareByName($scope.sortAsc));\n } else if (SortingType.SIZE === $scope.sortedBy) {\n $scope.resources.sort(compareBySize($scope.sortAsc));\n } else if (SortingType.MODIFIED === $scope.sortedBy) {\n $scope.resources.sort(compareByModified($scope.sortAsc));\n } else if (SortingType.IMPORTED === $scope.sortedBy) {\n $scope.resources.sort(compareByImportedOn($scope.sortAsc));\n } else if (SortingType.CONTEXT === $scope.sortedBy) {\n $scope.resources.sort(compareByContext($scope.sortAsc));\n }\n };\n\n const compareByName = (acs) => (r1, r2) => {\n return acs ? r1.importResource.name.localeCompare(r2.importResource.name) : r2.importResource.name.localeCompare(r1.importResource.name);\n };\n\n const compareBySize = (acs) => (r1, r2) => {\n // The format of size returned by the backend has changed, but we need to keep the old format for backward compatibility.\n // Therefore, we convert the size to always be in bytes.\n const r1Size = ByteUtils.convertToBytes(r1.importResource.size);\n const r2Size = ByteUtils.convertToBytes(r2.importResource.size);\n return acs ? r1Size - r2Size : r2Size - r1Size;\n };\n\n const compareByModified = (acs) => (r1, r2) => {\n const r1ModifiedOn = r1.importResource.modifiedOn || Number.MAX_VALUE;\n const r2ModifiedOn = r2.importResource.modifiedOn || Number.MAX_VALUE;\n return acs ? r1ModifiedOn - r2ModifiedOn : r2ModifiedOn - r1ModifiedOn;\n };\n\n const compareByImportedOn = (acs) => (r1, r2) => {\n const r1ImportedOn = r1.importResource.importedOn || Number.MAX_VALUE;\n const r2ImportedOn = r2.importResource.importedOn || Number.MAX_VALUE;\n return acs ? r1ImportedOn - r2ImportedOn : r2ImportedOn - r1ImportedOn;\n };\n\n const compareByContext = (acs) => (r1, r2) => {\n return acs ? r1.importResource.context.localeCompare(r2.importResource.context) : r2.importResource.context.localeCompare(r1.importResource.context);\n };\n\n const filterByType = (resource) => {\n if (TYPE_FILTER_OPTIONS.ALL === $scope.filterByType) {\n return true;\n }\n\n if ($scope.filterByType === TYPE_FILTER_OPTIONS.FILE) {\n return resource.isFile();\n }\n\n if ($scope.filterByType === TYPE_FILTER_OPTIONS.DIRECTORY) {\n return resource.isDirectory();\n }\n\n return false;\n };\n\n const filterByName = (resource) => {\n if (!$scope.filterByFileName) {\n return true;\n }\n\n if ($scope.filterByType === TYPE_FILTER_OPTIONS.DIRECTORY) {\n return resource.hasTextInDirectoriesName($scope.filterByFileName);\n }\n\n if ($scope.filterByType === TYPE_FILTER_OPTIONS.FILE) {\n return resource.hasTextInFilesName($scope.filterByFileName);\n }\n return resource.hasTextInResourcesName($scope.filterByFileName);\n };\n\n let debounceTimeout;\n const debounce = (func, delay) => {\n // Clear previous timeout\n if (debounceTimeout) {\n $timeout.cancel(debounceTimeout);\n }\n\n // Set new timeout\n debounceTimeout = $timeout(func, delay);\n };\n\n // =========================\n // Subscription handlers\n // =========================\n\n const onResourcesUpdatedHandler = (newResources = []) => {\n const isUserImport = TABS.USER === ImportContextService.getActiveTabId();\n if ($scope.resources.isEmpty()) {\n $scope.resources = ImportResourceTreeService.toImportResourceTree(newResources, isUserImport);\n if (isUserImport) {\n $scope.sortedBy = SortingType.MODIFIED;\n }\n } else {\n ImportResourceTreeService.mergeResourceTree($scope.resources, newResources, isUserImport);\n }\n ImportResourceTreeService.calculateElementIndent($scope.resources);\n ImportResourceTreeService.setupAfterTreeInitProperties($scope.resources);\n updateListedImportResources();\n setCanResetResourcesFlag();\n };\n\n // =========================\n // Subscriptions\n // =========================\n const subscriptions = [];\n\n subscriptions.push(ImportContextService.onResourcesUpdated(onResourcesUpdatedHandler));\n subscriptions.push(ImportContextService.onShowLoaderUpdated((showLoader) => $scope.showLoader = showLoader));\n subscriptions.push(ImportContextService.onActiveTabIdUpdated(() => $scope.resources = new ImportResourceTreeElement()));\n\n const removeAllSubscribers = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n // Deregister the watcher when the scope/directive is destroyed\n $scope.$on('$destroy', removeAllSubscribers);\n },\n };\n}\n","/**\n * This AngularJS directive validates whether an input value is a valid URI (IRI).\n *\n * @directive validateUri\n * @restrict A (Attribute)\n * @requires ngModel\n *\n * @example\n * <input type=\"text\" name=\"url\" ng-model=\"url\" validate-uri>\n */\nconst modules = [];\n\nangular\n .module('graphdb.framework.import.directives.validate-uri', modules)\n .directive('validateUri', validateUri);\n\nvalidateUri.$inject = ['UriUtils'];\n\n/**\n * @function validateUri\n * @param {UriUtils} UriUtils - Service for URI validation.\n */\nfunction validateUri(UriUtils) {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function (scope, element, attr, ctrl) {\n ctrl.$parsers.unshift(function (value) {\n ctrl.$setValidity('validateUri', true);\n if (!ctrl.$isEmpty(value)) {\n const valid = UriUtils.isValidIri(value, value.toString());\n ctrl.$setValidity('validateUri', valid);\n }\n return value;\n });\n }\n };\n}\n"],"names":["angular","module","controller","ImportResourceMessageDialogController","$inject","logger","LoggerProvider","$scope","$uibModalInstance","$translate","toastr","message","close","dismiss","copyToClipboard","navigator","clipboard","writeText","then","success","instant","err","error","ImportProgressIndicator","link","scope","element","attr","$watch","file","status","$","has","length","append","size","directive","importResourceMessageDirective","$uibModal","restrict","templateUrl","resource","ImportResourceStatus","toTitleCase","str","stringUtils","showMessage","resourceTreeElement","open","windowClass","backdrop","resolve","importResource","importResourceStatusInfoDirective","$rootScope","$document","subscribers","popoverTemplate","popoverIsOpen","context","replaceGraphs","baseUrl","decodeURIComponent","baseURI","forceSerial","importedOn","parserSettings","closeAllDialogs","$broadcast","handleEscapeKeyPress","event","key","$apply","push","$on","on","off","forEach","subscriber","TYPE_FILTER_OPTIONS","STATUS_OPTIONS","importResourceTreeDirective","$timeout","ImportContextService","columnKeys","showTypeFilter","sortBy","asc","onImport","onImportAll","onReset","onRemove","onStopImport","onEditResource","attrs","resources","ImportResourceTreeElement","displayResources","filterByType","ALL","filterByFileName","selectedByStatus","undefined","areAllDisplayedImportResourcesSelected","areAllDisplayedImportResourcesPartialSelected","canRemoveResource","isDefined","canResetSelectedResources","SORTING_TYPES","SortingType","sortAsc","sortedBy","showLoader","getShowLoader","hasSelection","selectionChanged","setSelection","selected","updateSelectByStateDropdownModel","setCanResetResourcesFlag","updateHasSelection","selectResourceWithStatus","resourceStatus","IMPORTED","selectAllWithStatus","DONE","NOT_IMPORTED","IMPORTING","NONE","ERROR","PENDING","INTERRUPTING","updateListedImportResources","filterByTypeChanged","newType","filterByFileNameChanged","debounce","onResetStatus","resourcesNames","getAllSelected","map","path","resetStatus","onRemoveResources","selectedResources","removeResource","importAll","withoutChangingSettings","getAllSelectedForImport","stopImport","sort","editResource","getSelectedImportedResources","getRoot","updateSelectionState","sortResources","toList","filter","filterByName","allSelectedFilesNames","getAllSelectedFilesNames","updateSelectedFilesNames","hasUnselectedDisplayedImportResource","some","hasSelectedDisplayedImportResource","NAME","compareByName","SIZE","compareBySize","MODIFIED","compareByModified","compareByImportedOn","CONTEXT","compareByContext","acs","r1","r2","name","localeCompare","r1Size","ByteUtils","convertToBytes","r2Size","r1ModifiedOn","modifiedOn","Number","MAX_VALUE","r2ModifiedOn","r1ImportedOn","r2ImportedOn","FILE","isFile","DIRECTORY","isDirectory","hasTextInDirectoriesName","hasTextInFilesName","hasTextInResourcesName","debounceTimeout","func","delay","cancel","subscriptions","onResourcesUpdated","onResourcesUpdatedHandler","newResources","isUserImport","TABS","USER","getActiveTabId","isEmpty","ImportResourceTreeService","toImportResourceTree","mergeResourceTree","calculateElementIndent","setupAfterTreeInitProperties","onShowLoaderUpdated","onActiveTabIdUpdated","removeAllSubscribers","subscription","validateUri","UriUtils","require","ctrl","$parsers","unshift","value","$setValidity","$isEmpty","valid","isValidIri","toString"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- export const __webpack_esm_id__=82917;export const __webpack_esm_ids__=[22370,23359,34064,35195,37709,65875,82917,83196,95416];export const __webpack_esm_modules__={95416(e,t,n){function r(e,t){return{templateUrl:"js/angular/core/templates/markdown-content/markdown-content.html",restrict:"E",scope:{content:"@",options:"=",trusted:"@"},link:function(n,r){n.markdownContent=void 0;const i=()=>{n.content?"true"===n.trusted?(n.markdownContent=t.renderMarkdown(n.content,n.options),o()):n.markdownContent=t.renderMarkdown(n.content,n.options,!1):n.markdownContent=void 0},o=()=>{n.$evalAsync(()=>{const t=r.find(".markdown-content");e(angular.element(t).contents())(n)})};n.$watch("content",(e,t)=>{e!==t&&i()}),i()}}}n(23359),angular.module("graphdb.framework.core.directives.markdown-content",["graphdb.framework.core.services.markdown-service"]).directive("markdownContent",r),r.$inject=["$compile","MarkdownService"]},23359(e,t,n){var r=n(88480),i=n(65875),o=n(34064),s=n(71315);const a={buttonStyle:"position: absolute; top: 0; right: 0; margin-right: 24px"},c=s.I.logger;function l(e,t){const n=(0,r.A)().use(i.f).use(o.A,a);return{renderMarkdown:(s,l,d=!0)=>{try{const c=(e=>e?(0,r.A)().use(i.f,e).use(o.A,_.merge({},a,e)):n)(l).render(s);return d?e.trustAsHtml(c):e.trustAsHtml(t(c))}catch(n){return c.error("Error rendering markdown:",n),e.trustAsHtml(d?s:t(s))}}}}angular.module("graphdb.framework.core.services.markdown-service",["ngSanitize"]).service("MarkdownService",l),l.$inject=["$sce","$sanitize"]},65875(e,t,n){n.d(t,{f:()=>o});const r={buttonStyle:"position: absolute; top: 0; right: 0;",buttonClass:""};function i(e,t){return t=_.merge({},r,t),(...n)=>{const[r,i]=n,o=r[i],s=r[i].content.replaceAll('"',"&quot;").replaceAll("'","&apos;"),a=e(...n);return"fence"===o.type&&a.trim()?`<div style="position: relative">\n ${a}\n <copy-to-clipboard\n style="${t.buttonStyle}"\n class="${t.buttonClass}"\n tooltip-text="ttyg.chat_panel.btn.copy_sparql.tooltip"\n text-to-copy="${s}">\n </copy-to-clipboard>\n </div>`:a}}const o=(e,t)=>{e.renderer.rules.code_block=i(e.renderer.rules.code_block,t),e.renderer.rules.fence=i(e.renderer.rules.fence,t)}},34064(e,t,n){n.d(t,{A:()=>o});const r={buttonStyle:"position: absolute; top: 0; right: 0;",buttonClass:""};function i(e,t){return t=_.merge({},r,t),(...n)=>{const[r,i]=n,o=r[i],s=r[i].content.replaceAll('"',"&quot;").replaceAll("'","&apos;"),a=e(...n);return"fence"===o.type&&"sparql"===o.info&&a.trim()?`<div style="position: relative">\n ${a}\n <open-in-sparql-editor\n style="${t.buttonStyle}"\n class="${t.buttonClass}"\n execute-query="${t.executeQuery}"\n repository-id="${t.repositoryId}"\n query="${s}">\n </open-in-sparql-editor>\n </div>`:a}}const o=(e,t)=>{e.renderer.rules.code_block=i(e.renderer.rules.code_block,t),e.renderer.rules.fence=i(e.renderer.rules.fence,t)}},37709(e,t,n){n.d(t,{R:()=>r,e:()=>i});const r={EXTERNAL_CLICK_HANDLER:"externalClickHandler"},i={NODE_CLICK:"visgraph.click.node",EDGE_CLICK:"visgraph.click.edge"}},82917(e,t,n){n(22742),n(46547),n(15749),n(95416);var r=n(9508),i=n(82667),o=n(44482),s=(n(38473),n(83196)),a=n(35195),c=n(63581),l=n(49628),d=n(57154),p=n(37709);angular.module("graphdb.framework.graphexplore.controllers.graphviz",["ui.scroll.jqlite","ui.scroll","toastr","ui.bootstrap","ngTagsInput","graphdb.framework.utils.localstorageadapter","graphdb.core.services.workbench-context","graphdb.framework.core.services.rdf4j.repositories","graphdb.framework.core.directives.markdown-content"]).controller("GraphsVisualizationsCtrl",f).controller("SaveGraphModalCtrl",h).config(["$uibTooltipProvider",function(e){e.options({appendToBody:!0})}]),f.$inject=["$scope","$rootScope","$repositories","toastr","$timeout","ClassInstanceDetailsService","$q","$location","$jwtAuth","UiScrollService","ModalService","$uibModal","$window","LocalStorageAdapter","LSKeys","SavedGraphsRestService","GraphConfigRestService","GraphDataRestService","$translate","WorkbenchContextService","RDF4JRepositoriesService"];const u=1e3;function f(e,t,n,f,h,g,m,y,v,x,w,k,S,I,b,L,C,T,P,A,N){const M=(0,d.service)(d.SecurityContextService),R=(0,d.service)(d.RepositoryContextService),E=(0,d.service)(d.ParentWindowMessageService),O="var(--gw-focus-ring-color)",G=(0,d.service)(d.GuidesService),z=(0,d.service)(d.OntoToastrService),j=(0,d.service)(d.RuntimeConfigurationContextService);let D;const F=new Set(["lt:http://www.ontotext.com/proton/protonsys#Markdown","lt:http://ns.ontowiki.net/SysOnt/Markdown","lt:https://www.w3.org/ns/iana/media-types/text/markdown#Resource","lt:http://www.w3.org/ns/iana/media-types/text/markdown#Resource"]);e.languageChanged=!1,e.propertiesObj={},e.propertiesObj.items=[],e.propertiesQueryObj={},e.propertiesQueryObj.query="",e.propertiesSearchPlaceholder=P.instant("visual.search.instance.placeholder"),e.propertiesNotFiltered=[],e.searchVisible=!1,e.nodeSelected=!1,e.queryResultsMode=!1,e.embedded=y.search().embedded,e.visgraphOperation=y.search().visgraphOperation,e.openedNodeInfoPanel=void 0,e.linksLimit={value:100,min:1,max:u,decreaseDisabled:!1,increaseDisabled:!1,showingLimit:!1},e.invalidLimit=!1;let B=null;e.datasource=void 0,e.adapterContainer={adapter:{remain:!0}},e.hasInitedRepository=!1,e.defaultSettings={includeInferred:!0,sameAsState:!0,truncateNodeLabels:!0,languages:["en"],showLinksText:!0,preferredTypes:[],rejectedTypes:[],preferredPredicates:[],rejectedPredicates:["http://dbpedia.org/property/logo","http://dbpedia.org/property/hasPhotoCollection","http://dbpedia.org/property/website","http://dbpedia.org/property/homepage","http://dbpedia.org/ontology/thumbnail","http://xmlns.com/foaf/0.1/depiction","http://xmlns.com/foaf/0.1/homepage","http://xmlns.com/foaf/0.1/mbox","http://dbpedia.org/ontology/wikiPage*","http://dbpedia.org/property/wikiPage*","http://factforge.net/*"],preferredTypesOnly:!1,preferredPredicatesOnly:!1,includeSchema:!0},e.saveSettings=_.cloneDeep(e.defaultSettings),e.defaultGraphConfig={id:"default",name:"Easy graph",startMode:"search"},t.key="",e.predicateFilter={text:""},e.allPredicates=[],e.allReversePredicates=[],e.isMarkdownLiteral=function(e){return F.has(e)},e.onopen=e.onclose=()=>angular.noop(),e.goToHome=()=>{J();const{config:e,...t}=y.search();y.path("/graphs-visualizations").search(t)},e.filterPredicates=()=>{const t=(e.predicateFilter.text||"").toLowerCase();t?(e.predicates=(e.allPredicates||[]).filter(n=>e.splitPredicate(n.value).toLowerCase().includes(t)),e.reversePredicates=(e.allReversePredicates||[]).filter(n=>e.splitPredicate(n.value).toLowerCase().includes(t))):(e.predicates=e.allPredicates,e.reversePredicates=e.allReversePredicates)},e.shouldShowSettings=()=>e.configLoaded&&e.configLoaded.id===e.defaultGraphConfig.id,e.shouldDisableSameAs=()=>{const t=$("#sameAsCheck");return e.settings&&!e.settings.includeInferred&&t.prop("checked")&&(t.prop("checked",!1),e.settings.sameAsState=!1),e.settings&&!e.settings.includeInferred},e.propertiesFilterFunc=t=>t.key.toLowerCase().indexOf(e.propertiesQueryObj.query.toLowerCase())>=0,e.toggleMoreInfo=e=>{angular.element(e.currentTarget).parent().next().toggle(200),angular.element(e.currentTarget).children("span").toggleClass("ri-arrow-down-s-line").toggleClass("ri-arrow-up-s-line")},e.copyToClipboard=e=>{w.openCopyToClipboardModal(e)},e.resetSettings=()=>{e.settings=_.cloneDeep(e.defaultSettings),ne()};const q=t=>{void 0!==t&&(e.linksLimit.value=t),e.linksLimit.decreaseDisabled=e.linksLimit.value<=1,e.linksLimit.increaseDisabled=e.linksLimit.value>=u};e.changeLimit=t=>{let n=e.linksLimit.value+t;n<1&&(n=1),n>u&&(n=u),q(n),e.updateLinksLimit()},e.updateLinksLimit=()=>{e.invalidLimit=!s.nj.test(e.linksLimit.value),q(),W()};const W=()=>{B&&h.cancel(B),B=h(()=>{e.invalidLimit||(y.search("linksLimit",e.linksLimit.value),y.state({skipOnPopState:!0}),U())},500)};function U(){e.rootNodeIri?re(e.rootNodeIri):e.queryResultsMode&&y.search().query?oe(y.search().query,y.search().sameAs,y.search().inference):"query"===e.configLoaded.startMode&&fe(e.configLoaded)}e.showSettings=()=>{e.showInfoPanel=!0,e.showFilter=!0,e.showNodeInfo=!1,e.showPredicates=!1,e.reversePredicates=[],e.saveSettings?e.settings=_.cloneDeep(e.saveSettings):e.settings=_.cloneDeep(e.defaultSettings),ne()},e.updateSettings=()=>{e.saveSettings=e.settings,e.saveSettings.languages=_.map(e.saveSettings.languagesMap,function(e){return e.text}),e.saveSettings.preferredTypes=_.map(e.saveSettings.preferredTypesMap,function(e){return e.text}),e.saveSettings.rejectedTypes=_.map(e.saveSettings.rejectedTypesMap,function(e){return e.text}),e.saveSettings.preferredPredicates=_.map(e.saveSettings.preferredPredicatesMap,function(e){return e.text}),e.saveSettings.rejectedPredicates=_.map(e.saveSettings.rejectedPredicatesMap,function(e){return e.text}),U(),ee(),e.showInfoPanel=!1,e.showFilter=!1,I.set(b.GRAPHS_VIZ,e.saveSettings)},e.getGraphConfigs=t=>{C.getGraphConfigs().success(function(n){e.graphConfigs=n,t&&t()}).error(function(e){f.error(getError(e),P.instant("graphexplore.error.graph.configs.short.msg"))})},e.findConfigById=function(t){return t===e.defaultGraphConfig.id?e.defaultGraphConfig:$.grep(e.graphConfigs,function(e){return e.id===t})[0]},e.easyGraphSearch=t=>{e.configLoaded=e.defaultGraphConfig,e.openUri(t)},e.deleteConfig=t=>{w.openSimpleModal({title:P.instant("common.confirm"),message:P.instant("graphexplore.delete.graph",{configName:t.name}),warning:!0}).result.then(function(){C.deleteGraphConfig(t).success(function(){e.getGraphConfigs(),e.refreshSavedGraphs()}).error(function(e){f.error(getError(e),P.instant("graphexplore.error.cannot.delete.config"))})})},e.goToGraphConfig=e=>{const t={config:e.id,[d.REPOSITORY_ID_PARAM]:R.getSelectedRepository().id};X(t,{config:e}),J(),fe(e)},e.replaceIRIWithPrefix=t=>{const n=e.namespaces,r=_.findLast(n,function(e){return 0===t.indexOf(e.uri)});return r?r.prefix+":"+t.substring(r.uri.length):t};const H=[];H.push(t.$on("$translateChangeSuccess",function(){e.propertiesSearchPlaceholder=P.instant("visual.search.instance.placeholder")})),H.push(j.onThemeModeChanged(e=>{e&&($e(),Ke())},!0)),H.push(A.onAutocompleteEnabledUpdated(t=>{e.isAutocompleteEnabled=t})),H.push(R.onSelectedRepositoryChanged(t=>{t?N.getNamespaces(t.id).then(t=>{e.repositoryNamespaces=t,e.namespaces=t.namespaces}).catch(e=>{const t=getError(e);f.error(t,P.instant("error.getting.namespaces.for.repo"))}):e.repositoryNamespaces=new c.u})),H.push(e.$on("repositoryIsSet",function(t,n){const r=n||{newRepo:!1};r.newRepo&&(e.hasInitedRepository=!1),Pe(!!r.newRepo),r.newRepo&&(J(),$(".graph-visualization svg").empty(),y.search().query&&(e.goToHome(),ie()))})),H.push(t.$watch(()=>t.key,()=>{ge=0,_.each(e.propertiesObj.items,function(e){t.key>e&&ge++}),me++}));let K=!1,V=0;function Z(e){K&&e.stopPropagation()}document.addEventListener("keydown",Z,!0),e.$on("$destroy",()=>{H.forEach(e=>e()),document.removeEventListener("keydown",Z,!0),window.onpopstate=null});const Q=()=>document.querySelector(".graph-visualization"),X=(t,n)=>{e.embedded&&(t.embedded=!0),e.visgraphOperation&&(t.visgraphOperation=e.visgraphOperation),t.linksLimit=e.linksLimit.value,y.search(t),n.skipOnPopState=!0,y.state(n)},J=()=>{e.searchVisible=!1,e.nodeSelected=!1,e.configLoaded=null,e.queryResultsMode=!1,e.lastSavedGraphName=null,e.lastSavedGraphId=null,e.shared=!1,e.numberOfPinnedNodes=0,ye={},ve=0},Y=()=>G.isActive()?e.defaultSettings:e.saveSettings,ee=()=>{Y().showLinksText?o.selectAll("svg .link-wrapper text").style("display","block"):o.selectAll("svg .link-wrapper text").style("display","none")},te=t=>{t.each(function(e){e.fontSize=r.A.Text.calcFontSizeRaw(e.labels[0].label,e.size,xe,!0)}).attr("height",function(e){return 4.2*e.fontSize}).append("xhtml:div").attr("class","node-label-body").classed("truncated-label",e.saveSettings.truncateNodeLabels).style("font-size",function(e){return e.fontSize+"px"}).append("xhtml:div").html(function(e){return l.U.getText(e.labels[0].label).replaceAll("\n","<br>")})},ne=()=>{e.settings.languagesMap=_.map(e.settings.languages,function(e){return{text:e}}),e.settings.preferredTypesMap=_.map(e.settings.preferredTypes,function(e){return{text:e}}),e.settings.rejectedTypesMap=_.map(e.settings.rejectedTypes,function(e){return{text:e}}),e.settings.preferredPredicatesMap=_.map(e.settings.preferredPredicates,function(e){return{text:e}}),e.settings.rejectedPredicatesMap=_.map(e.settings.rejectedPredicates,function(e){return{text:e}})},re=()=>{e.rootNodeIri&&e.$broadcast("onRootNodeChange",e.rootNodeIri)},ie=()=>{y.search().query?(e.searchVisible=!1,e.queryResultsMode=!0,oe(y.search().query,y.search().sameAs,y.search().inference)):e.$on("onRootNodeChange",function(t,n){e.loading=!0;const r=Y();angular.isDefined(n)&&(e.rootNodeIri=n,T.getInstanceNode({iri:n,config:e.configLoaded?e.configLoaded.id:e.defaultGraphConfig.id,languages:e.shouldShowSettings()?r.languages:[],includeInferred:r.includeInferred,sameAsState:r.sameAsState}).then(function(t){e.nodeSelected=!0,e.searchVisible=!1,null===t.data.types&&(t.data.types="greyColor"),Te=new _e;const n=Te.addNode(t.data,be/2,Le/2);Ie=Se,et(n,!0)}).catch(function(t){e.loading=!1,f.error(getError(t),P.instant("graphexplore.error.could.not.load.graph"))}))}),y.search().uri&&e.openUri(y.search().uri,!0),y.search().saved&&L.getSavedGraph(y.search().saved).success(function(t){e.loadSavedGraph(t)}).error(function(e){const t=getError(e);f.error(t,P.instant("graphexplore.error.could.not.open"))})},oe=(t,n,r)=>{const i=Y(),o=void 0===n?i.sameAsState:!0===n,s=void 0===r?i.includeInferred:!0===r;e.loading=!0,T.updateGraph({query:t,linksLimit:e.linksLimit.value,languages:e.shouldShowSettings()?i.languages:[],includeInferred:s,sameAsState:o}).then(function(e){Je(e)},function(t){e.loading=!1,f.error(getError(t.data),P.instant("graphexplore.error.cannot.load.graph"))})},se=(e,t)=>{const n=e.split(" ");return t?[n[0],n[1],n[2]].join(">"):[n[0],n[2]].join(">")},ae=e=>[e.source.iri,e.target.iri].join(">"),ce=e=>{if(e.isTriple){const t=document.getElementById((0,a.hK)(se(e.iri)));if(t&&void 0!==t.__data__.x)return t.__data__.x}return e.x},le=e=>{if(e.isTriple){const t=document.getElementById((0,a.hK)(se(e.iri)));if(t&&void 0!==t.__data__.y)return t.__data__.y}return e.y},de=e=>{const t=e.trim().split(" ");return`<<<${t[0]}> <${t[1]}> <${t[2]}>>>`},pe=e=>{const t=e.source.isTriple?se(e.source.iri,!0):e.source.iri,n=e.target.isTriple?se(e.target.iri,!0):e.target.iri;return(0,a.hK)(`${t}>${n}>marker`)},ue=(e,t)=>{const n=t.map(t=>t[e]);return t.filter((t,r)=>n.indexOf(t[e])===r)},fe=t=>{e.configLoaded=t,"search"===t.startMode?e.searchVisible=!0:"node"===t.startMode&&t.startIRI?h(function(){e.openUri(t.startIRI,!0)},0):"query"===t.startMode&&t.startGraphQuery&&(e.loading=!0,C.loadGraphForConfig(t,t.startQueryIncludeInferred,e.linksLimit.value,t.startQuerySameAs).then(function(e){Je(e)},function(t){e.loading=!1,f.error(getError(t),P.instant("graphexplore.error.graph.load"))}))},he=function(){var t,n;y.search().config?(t=y.search().config,n=ie,t===e.defaultGraphConfig.id?fe(e.defaultGraphConfig):C.getConfig(t).then(e=>{fe(e),n()}).catch(e=>{f.error(getError(e),P.instant("graphexplore.error.could.not.load.config",{configId:t}))})):y.search().query||y.search().uri?(fe(e.defaultGraphConfig),ie()):ie()};S.onpopstate=function(t){t.state&&t.state.skipOnPopState||(J(),t.state&&(t.state.config?(fe(t.state.config),t.state.uri&&e.openUri(t.state.uri,!0)):t.state.savedGraph&&e.loadSavedGraph(t.state.savedGraph,!0)))},e.embedded&&(y.search().query||y.search().uri||y.search().config||y.search().saved)&&(e.noGoHome=!0);let ge=0,me=0,ye={},ve=0;const xe=16,we=o.zoom().scaleExtent([.1,10]);let ke;const Se=o.zoomIdentity.translate(100,50).scale(1);we.on("zoom",function(e){G.isScrollingAllowed()&&(Ie=e.transform,ke.attr("transform",Ie))});let Ie=Se;const be=1e3,Le=1e3;let Ce;function _e(){this.nodes=[],this.links=[],this.tripleNodes=new Map,this.tripleLinksCopy=new Map,this.addNode=function(e,t,n){return e.x=t,e.y=n,this.nodes.push(e),e},this.computeConnectedness=function(){const e={},t={};_.each(this.links,function(n){const r=n.source.iri,i=n.target.iri,o=_.min([r,i])+"|"+_.max([r,i]);t[o]||(t[o]=1,e[r]=(e[r]||0)+1,e[i]=(e[i]||0)+1)}),_.each(this.links,function(t){e[t.source.iri]>1&&e[t.target.iri]>1?t.connectedness=Math.min(5,Math.max(e[t.source.iri],e[t.target.iri])-1):t.connectedness=0})},this.addAndMatchLinks=function(e){const t=this.nodes;Array.prototype.push.apply(this.links,function(e,t){return _.map(e,function(e){let n,r;n=e.isTripleSource?ct(e.source):_.find(t,function(t){return t.iri===e.source}),r=e.isTripleTarget?ct(e.target):_.find(t,function(t){return t.iri===e.target});const i={source:n,target:r,predicates:e.predicates,rawPredicates:e.rawPredicates};if(e.isTripleSource||e.isTripleTarget){const e=`${i.source.isTriple?se(i.source.iri):i.source.iri}>${i.target.isTriple?se(i.target.iri):i.target.iri}`;if(Te.tripleLinksCopy.has(e)){const t=Te.tripleLinksCopy.get(e),n=t[0].predicates.length;t[0].predicates.push(...i.predicates),t[0].rawPredicates||(t[0].rawPredicates=new Array(n).fill(null));const r=i.rawPredicates||new Array(i.predicates.length).fill(null);return t[0].rawPredicates.push(...r),t.push(i),Te.tripleLinksCopy.set(e,t),null}Te.tripleLinksCopy.set(e,[i])}return i})}(e,t));for(const e of Te.tripleLinksCopy.keys())1===Te.tripleLinksCopy.get(e).length&&Te.tripleLinksCopy.delete(e);this.links=this.links.filter(e=>null!==e),this.computeConnectedness()};const t=function(e,t){return n(e,t).length};function n(e,t){return _.filter(t,function(t){return t.source.iri===e.iri||t.target.iri===e.iri})}this.countLinks=t,this.linksTypes=function(e,t){const r=n(e,t),i=_.map(r,function(t){return t.source.iri===e.iri?t.target.types:t.source.types});return _.uniq(_.flatten(i))},this.linksPredicates=function(e,t){const r=n(e,t),i=_.map(r,function(e){return e.predicates});return _.uniq(_.flatten(i))},this.removeTriples=function(e){const t=[];this.tripleNodes.size>0&&e.forEach(e=>{this.tripleNodes.has(e)&&(this.tripleNodes.delete(e),this.links=_.reject(this.links,function(n){const r=e.split(">"),i=se(n.source.iri),o=se(n.target.iri);if(i===e&&Te.tripleNodes.delete(o)){const e=o.split(">");t.push({source:e[0],target:e[1]})}const s=i===e||o===e||n.source.iri===r[0]&&n.target.iri===r[1];return s&&(Te.tripleLinksCopy.delete(`${i}>${o}`),Te.tripleLinksCopy.delete(`${o}>${i}`)),s}))}),t.forEach(e=>{this.links=_.reject(this.links,function(t){return t.source.iri===e.source&&t.target.iri===e.target})})},this.removeNode=function(n){const r=[];this.links=_.reject(this.links,function(e){const t=e.source.iri===n.iri||e.target.iri===n.iri;return t&&(e.target.isTriple&&r.push(se(e.target.iri)),e.source.isTriple||e.target.isTriple||r.push([e.source.iri,e.target.iri].join(">"))),t}),this.removeTriples(r);const i=this.links;this.nodes=_.reject(this.nodes,function(e){return 0===t(e,i)}),0===this.nodes.length&&(e.nodeSelected=!1),this.computeConnectedness()},this.removeNodeLeafLinks=function(e){const r=[];let i=this.links;this.links=_.reject(this.links,function(o){let s=o.source.iri===e.iri&&1===t(o.target,i)&&!o.target.isTriple||o.target.iri===e.iri&&1===t(o.source,i)&&!o.source.isTriple;if(!s){let r;if(o.source.iri!==e.iri||2!==t(o.target,i)||o.target.isTriple?o.target.iri!==e.iri||2!==t(o.source,i)||o.source.isTriple||(r=n(o.source,i)):r=n(o.target,i),!r)return!1;s=(r[0].source.iri===e.iri||r[0].target.iri)&&(r[1].source.iri===e.iri||r[1].target.iri)}return s&&(o.target.isTriple&&r.push(se(o.target.iri)),o.source.isTriple||o.target.isTriple||r.push([o.source.iri,o.target.iri].join(">"))),s}),this.removeTriples(r),i=this.links,this.nodes=_.reject(this.nodes,function(n){return 0===t(n,i)&&n.iri!==e.iri}),this.computeConnectedness()},this.addTriple=function(e,t,n){e.x=t,e.y=n,e.weight=0;const r=se(e.iri);if(this.tripleNodes.has(r)){const t=this.tripleNodes.get(r);t.push(e),this.tripleNodes.set(r,t)}else e.weight=10,this.tripleNodes.set(r,[e])},this.copyState=function(){const e=_.map(this.nodes,function(e){return{iri:e.iri,isTriple:e.isTriple,size:e.size,labels:_.cloneDeep(e.labels),types:_.cloneDeep(e.types),rdfRank:e.rdfRank,x:e.x,y:e.y,fixed:e.fixed}}),t=JSON.stringify(Array.from(this.tripleNodes.entries())),n=JSON.stringify(Array.from(this.tripleLinksCopy.entries()));return{nodes:e,links:_.map(this.links,function(e){return{source:e.source.iri,isTripleSource:e.source.isTriple,target:e.target.iri,isTripleTarget:e.target.isTriple,predicates:e.predicates,rawPredicates:e.rawPredicates}}),tripleNodes:t,tripleLinksCopy:n,colorIndex:ve,type2color:ye,transform:Ie}},this.restoreState=function(t){e.nodeSelected=!0,e.searchVisible=!1,this.nodes=_.cloneDeep(t.nodes),this.tripleNodes=t.tripleNodes?new Map(JSON.parse(t.tripleNodes)):new Map,this.links=[],this.addAndMatchLinks(t.links),this.tripleLinksCopy=t.tripleLinksCopy?new Map(JSON.parse(t.tripleLinksCopy)):new Map,_.each(this.nodes,function(t){t.fixed&&e.numberOfPinnedNodes++}),angular.isDefined(t.colorIndex)&&angular.isDefined(t.type2color)&&(ve=t.colorIndex,ye=_.cloneDeep(t.type2color)),angular.isDefined(t.transform)&&(Ie=o.zoomIdentity.translate(t.transform.x,t.transform.y).scale(t.transform.k)),Ke()}}e.datasource={get:function(t,n,r){return x.initLazyList(t,n,r,ge,e.propertiesObj.items)},revision:function(){return me}},e.showInfoPanel=!1;let Te=new _e;function Pe(t){!n.getActiveRepository()||e.hasInitedRepository&&!t||(e.hasInitedRepository=!0,t||e.getGraphConfigs(he))}e.addedTag=function(t){return t.text.indexOf(":")<0?(f.warning(P.instant("graphexplore.absolute.prefixed.iri")),null):(t.text=function(e,t){if(!/^<?(http|urn).*>?/.test(e)){const n=e.split(":"),r=n[0],i=n[1];if(!angular.isUndefined(i)){const e=g.getNamespaceUriForPrefix(t,r);if(e)return e+i}}return e}(t.text,e.namespaces),e.pageslideExpanded=!0,t)},e.validateTag=function(e,t,n){if(e.text.indexOf(":")<0)return n?f.warning(P.instant("graphexplore.absolute.prefixed.iri.option"),t):f.warning(P.instant("graphexplore.absolute.prefixed.iri"),t),!1;const r=e.text.indexOf("*");if(r>=0){if(!n)return f.warning(P.instant("graphexplore.wildcards.not.allowed"),t),!1;if(r<e.text.length-1)return f.warning(P.instant("graphexplore.wildcards.last.char"),t),!1}return!0},e.getTagClass=function(e){return e.endsWith("*")?"tag-item-wildcard":null},e.getActiveRepository=function(){return n.getActiveRepository()},e.isLicenseValid=function(){return(0,d.service)(d.LicenseContextService).getLicenseSnapshot().valid};const Ae=500,Ne=1.75,Me=getComputedStyle(document.documentElement),Re=e=>Me.getPropertyValue(e).trim();let Ee,Oe,Ge,ze;const $e=()=>{Ee=["--gw-vizgraph-node-color1-1","--gw-vizgraph-node-color2-1","--gw-vizgraph-node-color3-1"].map(Re),Oe=["--gw-vizgraph-node-color1-2","--gw-vizgraph-node-color2-2","--gw-vizgraph-node-color3-2"].map(Re),ye={},ve=0,Ge=o.interpolateRgbBasis(Ee),ze=o.interpolateRgbBasis(Oe)},je=e=>(e+e/2.6)%1;e.getColor=function(e){angular.isUndefined(ye[e])&&(ye[e]=ve,ve++);const t=ye[e];return t>39?Re("--gw-vizgraph-node-color4"):t%2==0?Ge(je(t)):ze(je(t))};const De=o.forceX(be/2).strength(.03),Fe=o.forceY(Le/2).strength(.03),Be=o.forceSimulation().velocityDecay(.6).force("x",De).force("y",Fe),qe=o.select(".main-container .graph-visualization").append("svg").attr("viewBox","0 0 "+be+" "+Le).attr("preserveAspectRatio","xMidYMid meet");let We=0,Ue=0;const He=new function(){this.state=!1,this.setLoadingState=function(e){this.state=e},this.getLoadingState=function(){return this.state},this.init=function(e,t){o.select(t).append("circle").attr("cx",function(){return e.x}).attr("cy",function(){return e.y}).attr("class","loader-container").attr("r",function(){return e.size}).style("fill","fff").style("opacity","0.7"),o.select(t).append("image").attr("xlink:href","js/angular/templates/loader/ot-loader.svg?v=3.5.1-TR3").attr("x",function(){return e.x-e.size+5}).attr("y",function(){return e.y-e.size}).attr("width",function(){return 2*e.size}).attr("height",function(){return 2*e.size}).attr("class","node-loader")}};function Ke(t){o.selectAll("svg g").remove(),o.selectAll(".d3-tip").remove(),o.selectAll(".menu-events").remove(),ke=qe.append("g").attr("class","nodes-container").attr("transform",function(){return angular.isDefined(Ie)&&!t?Ie:""});const n=(0,i.A)().attr("class","d3-tip").customPosition(function(){const e=Ce.getBoundingClientRect();return{top:e.bottom+10+"px",left:e.left-30+"px"}}).html(function(t){let n="";return t.fixed&&(n+='<i class="ri-pushpin-line"></i>&nbsp;&nbsp;'),t.types.length>0?n+=t.types.map(t=>`<div> · ${e.replaceIRIWithPrefix(t)}</div>`).join(""):n+=`<i>${P.instant("visual.node.tooltip.no_types")}</i>`,n});let r;const s=function(){h.cancel(r),h.cancel(We),Ce=null,n.hide(),Ue=h(function(){tt()},500)};qe.call(n);let c=qe.selectAll(".link"),l=qe.selectAll(".node");const u=o.forceCollide(e=>e.size+5).strength(.5),g=o.forceManyBody().strength(-300);Be.nodes(Te.nodes).force("charge",g).force("collide",u).force("link",o.forceLink(Te.links).distance(function(e){return e.source.isTriple||e.target.isTriple?0:function(e){const t=$("<span></span>"),n=e.predicates[0].split("/"),r=n[n.length-1];t.addClass("predicate-text").text(r),$("body").append(t);const i=t.width()+2*e.source.size+2*e.target.size+50;return t.remove(),.75*i}(e)+30*e.connectedness})),ke.append("defs").selectAll("marker").data(Te.links).enter().append("marker").attr("class","arrow-marker").attr("id",function(e){return pe(e)}).attr("viewBox","0 -5 10 10").attr("refX",function(e){return e.target.isTriple?11:e.target.size+11}).attr("refY",0).attr("markerWidth",10).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M0,-5L10,0L0,5 L10,0 L0, -5"),c=ke.selectAll(".link").data(Te.links).enter().append("g").attr("class","link-wrapper").attr("id",function(e){return(0,a.hK)(ae(e))}).append("line").attr("class","link").style("fill","transparent").style("marker-end",function(e){return`url(#${pe(e)})`});const m=ke.selectAll(".link-wrapper").append("text").each(function(e){e.predicateLabel=dt(e)}).text(function(e){return dt(e)}).attr("class",function(e){return e.predicates.length>1||Te.tripleNodes.has(ae(e))?"predicates":"predicate"}).attr("dy","-0.5em").style("text-anchor","middle").style("display",Y().showLinksText?"":"none").on("click",function(t,n){t.stopPropagation(),function(t,n){if(e.embedded&&e.visgraphOperation===p.R.EXTERNAL_CLICK_HANDLER)return void E.postMessage({type:p.e.EDGE_CLICK,predicates:n.predicates,source:n.source,target:n.target},d.WindowService.getReferer());at();const r=ae(n);if(1===n.predicates.length&&Te.tripleNodes.has(r)){D=null;const e=Te.tripleNodes.get(r)[0];if(Qe(e,t.currentTarget,t.button)){const t={};t.iri=e.iri,t.pred=pt(e.iri.split(" ")[1]),rt(t)}return}(function(t){e.showNodeInfo=!1,e.showFilter=!1,e.showInfoPanel=!1,e.openedNodeInfoPanel=void 0;const n=Te.links.find(function(e){return e.source.iri===t.target.iri&&e.target.iri===t.source.iri});if(e.showPredicates=t.predicates.length>=1||!!n&&n.predicates.length>0,D===t)return e.showNodeInfo=!1,e.showInfoPanel=!1,D=null,void(e.predicateFilter.text="");if(D=t,e.showPredicates){const r=new Map;t.rawPredicates&&t.rawPredicates.forEach(function(e){const t=e.split(/[/#]/).pop();r.has(t)||r.set(t,e)}),e.predicates=_.map(t.predicates,function(e){const n=lt(e,t),i=n>-1,o=e.split(/[/#]/).pop();return{value:pt(e),rawIri:r.get(o)||e,partOfTriple:i,linkId:i?ae(t):"",nodeIndex:n}}),e.allPredicates=e.predicates;const i=document.querySelector(".predicates-panel .predicates");if(i&&(i.scrollTop=0),n){const t=new Map;n.rawPredicates&&n.rawPredicates.forEach(function(e){const n=e.split(/[/#]/).pop();t.has(n)||t.set(n,e)}),e.reversePredicates=_.map(n.predicates,function(e){const r=lt(e,n),i=r>-1,o=e.split(/[/#]/).pop();return{value:pt(e),rawIri:t.get(o)||e,partOfTriple:i,linkId:i?ae(n):"",nodeIndex:r}}),e.allReversePredicates=e.reversePredicates}else e.reversePredicates=[],e.allReversePredicates=[];e.filterPredicates();const o=t=>t.labels?.length&&t.labels[0].label?t.labels[0].label:e.replaceIRIWithPrefix(t.iri);e.predicatesSource={label:o(t.source),iri:t.source.iri},e.predicatesTarget={label:o(t.target),iri:t.target.iri},e.showInfoPanel=!0,function(e){[e.source,e.target].forEach(function(e){const t=document.getElementById(e.iri)?.querySelector(".node");t&&(t.style.stroke=O,t.style.strokeWidth="3px")});const t=(0,a.hK)(ae(e)),n=document.getElementById(t);if(n){const e=n.querySelector(".link");e&&(e.style.stroke=O,e.style.strokeWidth="2.5");const t=n.querySelector(".predicate, .predicates");t&&(t.style.fill=O)}const r=document.getElementById(pe(e));r&&(r.style.stroke=O)}(t)}})(n),e.$applyAsync()}(t,n)});let y,v=0,x=null,w=null;const k=function(t,n,r){const i=Array.isArray(r)?r[n]:r;Te.countLinks(t,Te.links)<=e.linksLimit.value?et(t,!1,i):f.info(P.instant("graphexplore.increase.limit"),P.instant("graphexplore.node.at.max")),e.closeInfoPanel()};function S(e,t){let n,r,i,o,s=!0;if("down"===t)n=2*e.size,r=e.size/3,i=.8,o=.3;else if("down-fixed"===t)n=2*e.size,r=e.size,i=.8,o=.66;else if("up"===t)n=e.size/3,r=2*e.size,i=.3,o=.8;else{if("fixed"!==t)return;n=e.size,i=.66,s=!1}let a=ke.selectAll(".node-wrapper").filter(function(t){return t===e}).append("text").text("").classed("icon-any pinned",!0).style("font-size",n+"px").attr("x",function(e){return e.x}).attr("y",function(e){return e.y}).attr("opacity",i);"fixed"!==t&&"down-fixed"!==t||(e.pin=a),s&&(a=a.transition().duration(1e3).style("font-size",function(){return r+"px"}).attr("opacity",o),"down-fixed"!==t&&a.remove())}const I=o.drag().subject(function(e){return e}).on("start",function(e,t){G.isActive()||0===e.sourceEvent.button&&(t.fixedBeforeDrag=t.fixed,t.isBeingDragged=!0,t.beginDragging=!0,tt(),o.select(e.currentTarget).classed("dragging",!0),Be.alphaTarget(.3).restart())}).on("drag",function(t,n){n.isBeingDragged&&(n.fx=t.x,n.fy=t.y,n.fixed?n.beginDragging&&S(n,"fixed"):(e.numberOfPinnedNodes++,n.fixed=!0,S(n,"down-fixed")),n.pinWasFixed=!0,n.beginDragging=null)}).on("end",function(e,t){t.isBeingDragged&&(t.pinWasFixed&&(t.pinWasFixed=null,o.select(".pinned").remove()),t.isBeingDragged=!1,o.select(e.currentTarget).classed("dragging",!1)),Be.alphaTarget(0)});l=ke.selectAll(".node").data(Te.nodes).enter().append("g").attr("class","node-wrapper").attr("id",function(e){return e.iri}).append("circle").attr("class","node").attr("r",function(e){return e.size}).style("fill",function(t){return"greyColor"===t.types?"c2c2c2":e.getColor(t.types[0])}).on("mouseover",function(t,i){if(!i.isBeingDragged){h.cancel(Ue);const o=t.currentTarget;We=h(()=>{(function(t,n){return!e.showInfoPanel&&((Ze.closeIcon||Ze.expandIcon||Ze.focusIcon||Ze.copyURIIcon)&&Ze.removeIcons(),Be.alpha()<.1&&(Ze.initIcons(t,n.parentNode),Be.stop(),Ve(),!0))})(i,o)&&function(e,t){h.cancel(r);const i=Ce=t.target;h(function(){Ce===i&&n.show(e,Ce)},300)}(i,t)},400)}}).on("mouseout",s).on("click",function(t,n){if(t.button&&0!==t.button)return;const r=t.currentTarget;if(x&&w===r)return h.cancel(x),x=null,void k(n,0,r.parentNode);w=r,s(),e.showPredicates=!1,G.isActive()||(h.cancel(x),x=h(function(){Qe(n,0,t),x=null},40+Ae))}).on("touchstart",(e,t)=>function(e){v=0,y=h(function(){v<5&&Xe(e),y=null},1e3)}(t)).on("touchmove",function(){v++}).on("touchend",function(){h.cancel(y),y=null}).on("contextmenu",function(t,r){t.shiftKey||(t.preventDefault(),tt(),e.closeInfoPanel(),r.fixed?(e.numberOfPinnedNodes--,r.fixed=!1,r.fx=null,r.fy=null,S(r,"up"),Be.alpha(1).restart()):(e.numberOfPinnedNodes++,r.fixed=!0,S(r,"down")),function(e){Ce&&n.show(e,Ce)}(r))}).on("gdb-expand-node",(e,t)=>k(t,0,e.srcElement.parentNode)).on("gdb-show-node-info",(e,t)=>nt(t)).call(I);const b=e.saveSettings.truncateNodeLabels?"hidden":"visible",L=ke.selectAll(".node-wrapper").append("foreignObject").style("pointer-events","none").style("overflow",b).attr("width",function(e){return 2*e.size*Ne});ke.insert("g").attr("class","menu-events"),te(L),Be.on("tick",function(){c.attr("x1",function(e){return ce(e.source)}).attr("y1",function(e){return le(e.source)}).attr("x2",function(e){return ce(e.target)}).attr("y2",function(e){return le(e.target)}),m.each(function(e){const t=ce(e.source),n=le(e.source),r=ce(e.target),i=le(e.target);e.x=.5*(t+r),e.y=.5*(n+i);const o=180*Math.atan2(i-n,r-t)/Math.PI;e._rawAngle=o,e._normAngle=o<=90&&o>=-90?o:(o>0?-1:1)*(180-Math.abs(o))}),m.attr("x",function(e){return e.x}).attr("y",function(e){return e.y}).attr("dy",function(e){return"double"!==e.direction?"-0.5em":e._rawAngle>90||e._rawAngle<-90?"1.5em":"-0.5em"}).attr("transform",function(e){return`rotate(${e._normAngle}, ${e.x}, ${e.y})`}),m.filter(function(e){return"double"===e.direction}).text(function(e){return ot(e)}),l.attr("cx",function(e){return e.x}).attr("cy",function(e){return e.y}),ke.select(".node-loader").attr("x",function(e){return e.x-e.size+3}).attr("y",function(e){return e.y-e.size}),ke.select(".loader-container").attr("cx",function(e){return e.x}).attr("cy",function(e){return e.y}),L.attr("x",function(e){return e.x-e.size*Ne}).attr("y",function(e){return e.y-4.2*e.fontSize/2}),o.select(".pinned").attr("x",function(e){return e.x}).attr("y",function(e){return e.y}),Ve()}),angular.isDefined(He)&&He.setLoadingState(!1),e.loading&&(e.loading=!1),o.selectAll(".link-wrapper").each(function(){const e=$(this).attr("id").split(">")[0],t=$(this).attr("id").split(">")[1];o.selectAll(".link").each(function(n){const r=(0,a.hK)(n.source.iri),i=(0,a.hK)(n.target.iri);r===t&&i===e&&(n.direction="double")})}),o.selectAll(".d3-actions-tip").remove(),Be.alpha(.3).restart()}function Ve(){t.d3alpha=Be.alpha()}const Ze=new function(){function n(e,t){return"translate("+(t.x-14+(t.size+15)*Math.cos(e*Math.PI/180-Math.PI/2))+","+(t.y-14+(t.size+15)*Math.sin(e*Math.PI/180-Math.PI/2))+")"}this.closeIcon=void 0,this.expandIcon=void 0,this.collapseIcon=void 0,this.focusIcon=void 0,this.copyURIIcon=void 0,this.actionsTip=void 0,this.removeIcons=function(){this.closeIcon.remove("g"),this.expandIcon&&this.expandIcon.remove("g"),this.collapseIcon&&this.collapseIcon.remove("g"),this.focusIcon.remove("g"),this.copyURIIcon.remove("g"),this.closeIcon=void 0,this.expandIcon=void 0,this.collapseIcon=void 0,this.focusIcon=void 0,this.copyURIIcon=void 0,this.expandedState=!1},this.expandedState=!1,this.initIcons=function(r,s){const a=(0,i.A)().attr("class","d3-tip d3-actions-tip").customPosition(function(e,t){const n=t.target.getBoundingClientRect();return{top:n.top-20+"px",left:n.right+10+"px"}}).html(function(e){return e});qe.call(a),r.isExpanded?(this.collapseIcon=o.select(".menu-events").append("g").attr("class","collapse-icon").attr("name","collapse").attr("transform",function(){return n(20,r)}),this.collapseIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.collapseIcon.append("path").attr("d","M22.67,12a.59.59,0,0,1-.53.65l-6.88.72H15.2a.59.59,0,0,1-.59-.65l.72-6.88A.58.58,0,0,1,16,5.33a.59.59,0,0,1,.53.65L16,11.11,21.3,5.79a.64.64,0,0,1,.91.91L16.89,12,22,11.49A.59.59,0,0,1,22.67,12ZM12.59,14.75l-6.75.85a.59.59,0,0,0-.51.66.58.58,0,0,0,.66.51l4.95-.62-5.2,5.2a.64.64,0,1,0,.91.91l5.2-5.2L11.23,22a.59.59,0,0,0,.51.66h.07a.59.59,0,0,0,.59-.52l.85-6.75a.59.59,0,0,0-.17-.49A.58.58,0,0,0,12.59,14.75Z").style("fill","var(--gw-primary-base)"),this.collapseIcon.on("click",function(){var e;(e=r).isExpanded=!1,Te.removeNodeLeafLinks(e),Ke()}).on("mouseover",function(e){a.show(e.currentTarget.getAttribute("name"),e),h.cancel(We),h.cancel(Ue)}).on("mouseout",function(){a.hide(),Ue=h(function(){tt()},500)})):(this.expandIcon=o.select(".menu-events").append("g").attr("class","expand-icon").attr("name","expand").attr("transform",function(){return n(20,r)}),this.expandIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.expandIcon.append("path").attr("d","M22.37,6.28l-.72,6.88a.59.59,0,0,1-.59.53H21a.59.59,0,0,1-.53-.65L21,7.9l-5.32,5.32a.64.64,0,0,1-.91-.91L20.1,7,15,7.53a.59.59,0,0,1-.12-1.18l6.88-.72a.59.59,0,0,1,.65.65ZM12.89,20.34,7.95,21l5.2-5.2a.64.64,0,0,0-.91-.91L7,20.05l.62-4.95A.59.59,0,0,0,6.48,15l-.85,6.75a.59.59,0,0,0,.59.67h.07L13,21.52a.59.59,0,1,0-.15-1.18Z").style("fill","var(--gw-primary-base)"),this.expandIcon.on("click",function(){et(r,!1,s)}).on("mouseover",function(e){a.show(e.currentTarget.getAttribute("name"),e),h.cancel(Ue),h.cancel(We)}).on("mouseout",function(){a.hide(),Ue=h(function(){tt()},500)})),this.focusIcon=o.select(".menu-events").append("g").attr("class","focus-icon").attr("name","focus").attr("transform",function(){return n(20,r)}),this.focusIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.focusIcon.append("path").attr("d","M14.2,23.81a9.8,9.8,0,1,1,6.93-2.87h0A9.74,9.74,0,0,1,14.2,23.81Zm0-18.17a8.37,8.37,0,1,0,5.92,14.29h0A8.37,8.37,0,0,0,14.2,5.64Zm1.42,6.95a2,2,0,1,0,0,2.85A2,2,0,0,0,15.62,12.59Z").style("fill","var(--gw-primary-base)"),this.focusIcon.on("click",function(){t.$broadcast("onRootNodeChange",r.iri)}).on("mouseover",function(e){a.show(e.currentTarget.getAttribute("name"),e),h.cancel(Ue),h.cancel(We)}).on("mouseout",function(){a.hide(),Ue=h(function(){tt()},500)}),this.copyURIIcon=o.select(".menu-events").append("g").attr("class","ri-links-line").attr("name","link").attr("transform",function(){return n(20,r)}),this.copyURIIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.copyURIIcon.append("path").attr("d","M 13.457031 10.164062 C 13.648438 10.164062 13.820312 10.242188 13.941406 10.363281 L 15.492188 11.859375 C 15.984375 12.332031 16.292969 12.992188 16.292969 13.714844 C 16.292969 14.441406 15.984375 15.097656 15.492188 15.574219 L 10.394531 20.496094 C 9.902344 20.972656 9.222656 21.265625 8.472656 21.265625 C 7.71875 21.265625 7.039062 20.972656 6.546875 20.496094 L 4.996094 19 C 4.507812 18.523438 4.203125 17.867188 4.203125 17.144531 C 4.203125 16.421875 4.507812 15.765625 4.996094 15.289062 L 7.542969 12.824219 C 7.667969 12.707031 7.84375 12.628906 8.035156 12.628906 C 8.417969 12.628906 8.726562 12.929688 8.726562 13.300781 C 8.726562 13.484375 8.648438 13.652344 8.523438 13.773438 L 5.976562 16.234375 C 5.738281 16.46875 5.589844 16.792969 5.589844 17.148438 C 5.589844 17.503906 5.738281 17.824219 5.976562 18.058594 L 7.527344 19.566406 C 7.773438 19.792969 8.105469 19.929688 8.472656 19.929688 C 8.835938 19.929688 9.167969 19.792969 9.414062 19.566406 L 14.511719 14.644531 C 14.753906 14.410156 14.90625 14.089844 14.90625 13.730469 C 14.90625 13.375 14.753906 13.054688 14.511719 12.820312 L 12.964844 11.324219 C 12.839844 11.203125 12.761719 11.039062 12.761719 10.855469 C 12.761719 10.488281 13.070312 10.1875 13.449219 10.1875 Z M 17.082031 3.976562 C 17.082031 3.976562 17.085938 3.976562 17.085938 3.976562 C 17.824219 3.976562 18.492188 4.261719 18.980469 4.722656 L 20.535156 6.203125 C 21.042969 6.679688 21.355469 7.34375 21.355469 8.082031 C 21.355469 8.792969 21.058594 9.441406 20.582031 9.914062 L 18.0625 12.402344 C 17.9375 12.527344 17.761719 12.605469 17.566406 12.605469 C 17.183594 12.605469 16.875 12.304688 16.875 11.9375 C 16.875 11.753906 16.949219 11.589844 17.070312 11.46875 L 19.605469 8.984375 C 19.847656 8.75 19.996094 8.429688 19.996094 8.070312 C 19.996094 7.714844 19.847656 7.394531 19.605469 7.160156 L 18.019531 5.667969 C 17.773438 5.445312 17.4375 5.304688 17.070312 5.300781 C 16.703125 5.304688 16.367188 5.453125 16.128906 5.691406 L 11.085938 10.667969 C 10.84375 10.898438 10.695312 11.222656 10.695312 11.578125 C 10.695312 11.933594 10.84375 12.257812 11.085938 12.488281 L 12.675781 13.980469 C 12.804688 14.101562 12.882812 14.273438 12.882812 14.457031 C 12.882812 14.828125 12.574219 15.128906 12.191406 15.128906 C 12.003906 15.128906 11.832031 15.054688 11.707031 14.9375 L 10.140625 13.457031 C 9.636719 12.980469 9.324219 12.316406 9.324219 11.582031 C 9.324219 10.863281 9.621094 10.214844 10.101562 9.742188 L 15.140625 4.765625 C 15.625 4.285156 16.304688 3.980469 17.054688 3.976562 Z M 17.082031 3.976562").style("fill","var(--gw-primary-base)"),this.copyURIIcon.on("click",function(){e.copyToClipboard(r.iri),tt(),a.hide()}).on("mouseover",function(e){a.show("<div style='text-align: center;'><b>Copy to ClipBoard</b><br>"+r.iri+"</div>",e),h.cancel(Ue),h.cancel(We)}).on("mouseout",function(){a.hide(),Ue=h(function(){tt()},500)}),this.closeIcon=o.select(".menu-events").append("g").attr("class","close-icon").attr("name","remove").attr("transform",function(){return n(20,r)}),this.closeIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.closeIcon.append("path").attr("d","M14.94,14l5.87-5.87a.66.66,0,1,0-.94-.94L14,13.06,8.13,7.19a.66.66,0,0,0-.94.94L13.06,14,7.19,19.87a.66.66,0,1,0,.94.94L14,14.94l5.87,5.87a.66.66,0,1,0,.94-.94Z").style("fill","var(--gw-primary-base)"),this.closeIcon.on("click",function(){Xe(r)}).on("mouseover",function(e){a.show(e.currentTarget.getAttribute("name"),e),h.cancel(Ue),h.cancel(We)}).on("mouseout",function(){a.hide(),Ue=h(function(){tt()},500)}),this.animateMenu(r)},this.animateMenu=function(e){const t=100,r=o.easeSin;let i=0,s=20;this.expandIcon&&this.expandIcon.transition().duration(t).style("opacity",1).ease(r).attr("transform",function(){return n(s,e)}).delay(i+=35),this.collapseIcon&&this.collapseIcon.transition().duration(t).style("opacity",1).ease(r).attr("transform",function(){return n(s,e)}).delay(i+=35),this.copyURIIcon.transition().duration(t).style("opacity",1).ease(r).attr("transform",function(){return s+=30,n(s,e)}).delay(i+=35),this.focusIcon.transition().duration(t).style("opacity",1).ease(r).attr("transform",function(){return s+=30,n(s,e)}).delay(i+=35),this.closeIcon.transition().duration(t).style("opacity",1).ease(r).attr("transform",function(){return s+=30,n(s,e)}).delay(i+=35),this.expandedState=!0}};function Qe(n,r,i){return at(),e.showInfoPanel=!1,e.showPredicates=!1,e.showNodeInfo=!1,i.shiftKey&&(i.ctrlKey||i.metaKey)?(t.$broadcast("onRootNodeChange",n.iri),!1):i.ctrlKey||i.metaKey?(Xe(n),!1):e.embedded&&e.visgraphOperation===p.R.EXTERNAL_CLICK_HANDLER?(E.postMessage({type:p.e.NODE_CLICK,iri:n.iri,labels:n.labels,types:n.types,rdfRank:n.rdfRank,comment:n.comment},d.WindowService.getReferer()),!0):void 0!==e.openedNodeInfoPanel&&e.openedNodeInfoPanel===n?(e.closeInfoPanel(),!1):(nt(n),!0)}function Xe(e){Te.removeNode(e),Ke()}function Je(t){!function(t){e.nodeSelected=!0,null===t.data.types&&(t.data.types="greyColor"),Te=new _e,Ie=Se}(t),Ye(t)}function Ye(t,n,r){let i=t.data;i=_.filter(i,function(e){return-1===_.findIndex(Te.links,function(t){return e.source===t.source.iri&&e.target===t.target.iri})});const o=[],s=Te.tripleLinksCopy.values();for(let e=0;e<Te.tripleLinksCopy.size;e++)s.next().value.forEach(e=>{o.push(e)});i=_.filter(i,function(e){return-1===_.findIndex(o,function(t){return e.source===t.source.iri&&e.target===t.target.iri})}),i=_.filter(i,function(e){return e.source!==e.target});const a=ue("iri",_.union(_.flatten(_.map(t.data,function(e){return[{iri:e.source,isTriple:e.isTripleSource},{iri:e.target,isTriple:e.isTripleTarget}]})))),c=_.map(Te.nodes,function(e){return{iri:e.iri,isTriple:Boolean(e.isTriple)}}),l=Te.tripleNodes.values();for(let e=0;e<Te.tripleNodes.size;e++)l.next().value.forEach(e=>{c.push({iri:e.iri,isTriple:e.isTriple})});const d=_.reject(a,function(e){return _.some(c,e)});if(e.linksLimit.showingLimit=d.length===e.linksLimit.value,0===d.length){const e=a.length>0?a.length-1:0;(r||0===i.length)&&f.info(P.instant("graphexplore.error.node.connections",{count:e})),Te.addAndMatchLinks(i),Ke()}else{const t=[],r=[],o=Y();_.forEach(d,function(n,i){t.push(T.getInstanceNode({iri:n.isTriple?de(n.iri):n.iri,config:e.configLoaded.id,languages:e.shouldShowSettings()?o.languages:[],includeInferred:o.includeInferred,sameAsState:o.sameAsState}).then(function(e){r[i]=e.data}))}),m.all(t).then(function(){_.forEach(r,function(e,t){const i=2*Math.PI*t/r.length,o=(n?n.x:0)+Math.cos(i)*Le/3,s=(n?n.y:0)+Math.sin(i)*Le/3;e.isTriple?Te.addTriple(e,o,s):Te.addNode(e,o,s)}),Te.addAndMatchLinks(i),n&&(n.isExpanded=!0),Ke()})}}function et(t,n,r){if(He.getLoadingState())return;He.init(t,r);const i=Y(),o=t.iri;T.getInstanceNodeLinks({iri:o,linksLimit:e.linksLimit.value,includeInferred:i.includeInferred,config:e.configLoaded.id,preferredTypes:e.shouldShowSettings()?i.preferredTypes:[],rejectedTypes:e.shouldShowSettings()?i.rejectedTypes:[],preferredPredicates:e.shouldShowSettings()?i.preferredPredicates:[],rejectedPredicates:e.shouldShowSettings()?i.rejectedPredicates:[],preferredTypesOnly:e.shouldShowSettings()?i.preferredTypesOnly:[],preferredPredicatesOnly:e.shouldShowSettings()?i.preferredPredicatesOnly:[],languages:e.shouldShowSettings()?i.languages:[],sameAsState:i.sameAsState,includeSchema:i.includeSchema}).then(function(e){Ye(e,t,n)},function(t){const n=getError(t.data);f.error(n,P.instant("graphexplore.error.exploring.node")),e.loading=!1,He.setLoadingState(!1)})}function tt(){angular.isDefined(Ze)&&Ze.expandedState&&Ze.removeIcons()}function nt(t){Be.stop();const n=e.showInfoPanel;D=null,e.openedNodeInfoPanel=t,e.showFilter=!1,e.showPredicates=!1,e.nodeLabels=t.labels,e.nodeTypes=t.types,e.rdfRank=t.rdfRank,e.nodeIri=t.iri,e.resourceType=t.isTriple?"triple":"uri",e.encodedIri=t.isTriple?encodeURIComponent(de(t.iri)):encodeURIComponent(t.iri),function(e){const t=document.getElementById(e.iri),n=t?.querySelector(".node");n&&(n.style.stroke=O,n.style.strokeWidth="3px")}(t),e.rdfsLabel=t.labels[0].label,e.rdfsComment=t.comment,e.expanded=!1,e.propertiesQueryObj.query="",e.dataNodeKeysQuery="";const r=Y();T.getProperties({iri:t.isTriple?de(t.iri):t.iri,config:e.configLoaded.id,languages:e.shouldShowSettings()?r.languages:[],includeInferred:r.includeInferred,sameAsState:r.sameAsState,rejectedPredicates:e.shouldShowSettings()?r.rejectedPredicates:[]}).then(function(t){e.data=_.mapKeys(t.data,function(t,n){return e.replaceIRIWithPrefix(n)});const r=[];_.forEach(e.data,function(e,t){r.push({key:t,value:e})}),e.nodeImage=void 0,e.propertiesNotFiltered=r;const i=_.find(r,function(e){return"image"===e.key});i&&(e.nodeImage=i.value[0].v),e.propertiesObj.items=_.reject(r,function(e){return"image"===e.key}),e.propertiesNotFiltered=e.propertiesObj.items,e.showInfoPanel=!0,e.showNodeInfo=!0,n&&h(()=>e.adapterContainer.adapter.reload(),500)},function(e){f.warning(getError(e.data),"Error")})}function rt(e){const t=Q();st("predicate","var(--gw-primary-dark)",e),st("predicates","var(--gw-primary-dark)",e);const n=t?.getElementsByClassName("link");n&&_.each(n,function(t){const n=t.__data__;(n.source.iri.indexOf(e.iri)>=0||n.target.iri.indexOf(e.iri)>=0)&&(t.style.stroke="var(--gw-primary-dark)",t.style.strokeWidth=4)});const r=t?.getElementsByClassName("arrow-marker");r&&_.each(r,function(t){const n=t.__data__;(n.source.iri.indexOf(e.iri)>=0||n.target.iri.indexOf(e.iri)>=0)&&(t.style.stroke="var(--gw-primary-dark)",t.__data__.target.isTriple||t.setAttribute("refX","23"))})}e.toggleSidePanel=function(){e.pageslideExpanded=!e.pageslideExpanded},e.closeInfoPanel=function(){at(),e.pageslideExpanded=!1,e.openedNodeInfoPanel=void 0,e.predicates=[],e.reversePredicates=[],D=null,e.predicateFilter.text="",e.allPredicates=[],e.allReversePredicates=[],h(function(){e.showInfoPanel=!1})},e.clickLink=function(t){if(Te.tripleNodes.has(t.linkId)){at();const n=Te.tripleNodes.get(t.linkId)[t.nodeIndex];nt(n),e.showPredicates=!0;const r=document.getElementById(t.linkId+t.nodeIndex);r&&(r.style.fontWeight="bold");const i={},o=Te.tripleLinksCopy.values();for(let e=0;e<Te.tripleLinksCopy.size;e++){const e=o.next().value;e.length>1&&e.every(t=>t.source.iri===n.iri?(i.iri=e[0].source.iri,t.target.isTriple&&(i.oppLinkIRI=se(t.target.iri),i.oppTriplePred=pt(t.target.iri.split(" ")[1])),i.pred=pt(n.iri.split(" ")[1]),1===t.predicates.length&&(i.linkPred=t.predicates[0]),!1):t.target.iri!==n.iri||(i.iri=e[0].target.iri,t.source.isTriple&&(i.oppLinkIRI=se(t.source.iri),i.oppTriplePred=pt(t.source.iri.split(" ")[1])),i.pred=pt(n.iri.split(" ")[1]),1===t.predicates.length&&(i.linkPred=t.predicates[0]),!1))}i.iri||(i.iri=n.iri,i.pred=pt(n.iri.split(" ")[1])),rt(i)}};const it=()=>{z.success(P.instant("common.messages.copied_to_clipboard"))};function ot(e){const t=e.predicateLabel||dt(e);return"double"!==e.direction?t:function(e){const t=void 0===e._rawAngle?180*Math.atan2(le(e.target)-le(e.source),ce(e.target)-ce(e.source))/Math.PI:e._rawAngle;return t>90||t<-90}(e)?"⟵ "+t:t+" ⟶"}function st(e,t,n){const r=Q(),i=r?.getElementsByClassName(e);i&&_.each(i,function(e){const r=e.__data__;n?((r.source.iri.indexOf(n.iri)>=0||r.target.iri.indexOf(n.iri)>=0)&&(e.style.fill=t),se(n.iri)===ae(r)&&(e.textContent=n.pred,e.style.fill=t),n.oppLinkIRI&&n.oppLinkIRI===ae(r)&&(e.textContent=n.oppTriplePred,e.style.fill=t)):(e.style.fill=t,e.textContent=ot(r))})}function at(){const t=Q();_.each(e.predicates,function(e){const t=document.getElementById(e.linkId+e.nodeIndex);t&&(t.style.fontWeight="normal")});const n=t?.getElementsByClassName("link");n&&_.each(n,function(e){e.style.stroke="",e.style.strokeWidth=""}),st("predicate",""),st("predicates","");const r=t?.getElementsByClassName("arrow-marker");r&&_.each(r,function(e){e.style.stroke="",e.__data__.target.isTriple||e.setAttribute("refX","59")});const i=t?.getElementsByClassName("node");i&&_.each(i,function(e){e.style.stroke="",e.style.strokeWidth=""})}function ct(e){const t=se(e);if(Te.tripleNodes.has(t))return Te.tripleNodes.get(t).find(t=>t.iri===e)}function lt(e,t){const n=ae(t);return Te.tripleNodes.has(n)?Te.tripleNodes.get(n).findIndex(t=>t.iri.indexOf(e)>=0):-1}function dt(e){return e.predicates.length>1?e.predicates.length+" predicates":pt(e.predicates[0])}function pt(t){const n=e.replaceIRIWithPrefix(t);return n.length===t.length?t.split("/")[t.split("/").length-1]:n}e.copyPredicateIri=function(e,t){e.stopPropagation();const n=function(){const e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select();try{document.execCommand("copy")}catch(e){console.warn("Copy to clipboard failed.",e)}e.remove(),it()};navigator.clipboard?navigator.clipboard.writeText(t).then(it).catch(n):n()},e.splitPredicate=function(e){return e.split("/")[e.split("/").length-1]},e.getActiveRepository=function(){return n.getActiveRepository()},e.isLoadingLocation=function(){return n.isLoadingLocation()},e.hasActiveLocation=function(){return n.hasActiveLocation()},e.rotate=function(e){tt();const t=10*(e?1:-1)*Math.PI/180,n=Math.cos(t),r=Math.sin(t),i=be/2,s=Le/2;o.selectAll(".node-wrapper").each(function(e){e.x=i+(n*(e.x-i)+r*(e.y-s)),e.y=s+(-r*(e.x-i)+n*(e.y-s)),e.fixed&&(e.fx=e.x,e.fy=e.y)}),Be.alpha(1).restart()},e.openUri=function(t,n){if(!n){const n={};e.configLoaded.id!==e.defaultGraphConfig.id&&(n.config=e.configLoaded.id),n.uri=t,n[d.REPOSITORY_ID_PARAM]=R.getSelectedRepository().id,X(n,{uri:t,config:e.configLoaded})}e.$broadcast("onRootNodeChange",t)},e.saveOrUpdateGraph=function(){const t=JSON.stringify(Te.copyState()),n={id:e.lastSavedGraphId,name:e.lastSavedGraphName,data:t,shared:e.shared};n.id?e.saveGraphModal("update",n):e.saveGraphModal("new",n)},e.renameSavedGraph=function(t){e.saveGraphModal("rename",{id:t.id,name:t.name,config:t.config,shared:t.shared})};e.saveGraphModal=function(t,n,r){const i=k.open({templateUrl:"js/angular/graphexplore/templates/modal/save-graph.html",controller:"SaveGraphModalCtrl",resolve:{data:function(){return{mode:t,graph:n,graphExists:r,shared:n.shared}}}});V++,K=!0,i.result.then(function(t){if(t.restart)e.saveGraphModal(t.mode,t.graph,!1);else switch(t.mode){case"new":!function(t){e.configLoaded&&(t.config=e.configLoaded.id),L.addNewSavedGraph(t).success(function(n,r,i){e.lastSavedGraphName=t.name,e.lastSavedGraphId=i()["x-saved-graph-id"],e.shared=t.shared,e.refreshSavedGraphs(),f.success(P.instant("graphexplore.saved.graph",{name:t.name}))}).error(function(n,r){if(422===r)e.saveGraphModal("new",t,!0);else{const e=getError(n);f.error(e,P.instant("graphexplore.error.cannot.create.graph"))}})}(t.graph);break;case"update":case"rename":n=t.graph,L.editSavedGraph(n).success(function(){e.lastSavedGraphName=n.name,e.shared=n.shared,e.refreshSavedGraphs(),f.success(P.instant("graphexplore.saved.graph.was.edited",{name:n.name}))}).error(function(e){const t=getError(e);f.error(t,P.instant("graphexplore.error.cannot.edit"))})}var n}).finally(()=>{V--,V<=0&&(K=!1,V=0)})},e.refreshSavedGraphs=function(){L.getSavedGraphs().success(function(t){e.savedGraphs=t}).error(function(e){const t=getError(e);f.error(t,P.instant("graphexplore.error.getting.saved.graphs"))})},e.loadSavedGraph=function(t,n){t.owner?(e.lastSavedGraphName=t.name,e.lastSavedGraphId=t.id,e.shared=t.shared,e.configLoaded=e.findConfigById(t.config)):(e.lastSavedGraphName=null,e.lastSavedGraphId=null,e.shared=t.shared),e.configLoaded||(e.configLoaded=e.defaultGraphConfig);const r={...y.search(),saved:t.id};y.search("saved",t.id),Te.restoreState(JSON.parse(t.data)),n||X(r,{savedGraph:t})},e.copyToClipboardSavedGraph=function(t){const n=[location.protocol,"//",location.host,location.pathname,"?saved=",t.id].join("");e.copyToClipboard(n)},e.deleteSavedGraph=function(t){w.openSimpleModal({title:P.instant("common.confirm"),message:P.instant("graphexplore.confirm.delete.graph",{graphName:t.name}),warning:!0}).result.then(function(){!function(t){L.deleteSavedGraph(t).success(function(){e.refreshSavedGraphs(),f.success(P.instant("graphexplore.saved.graph.was.deleted",{name:t.name}))}).error(function(e){const t=getError(e);f.error(t,P.instant("graphexplore.error.cannot.delete"))})}(t)})},e.openIRI=function(t,n){return n.shiftKey?e.$broadcast("onRootNodeChange",t):window.open(t,"_blank"),!1},e.togglePinAllNodes=function(){tt();const t=angular.isUndefined(e.numberOfPinnedNodes)||e.numberOfPinnedNodes<=0;e.numberOfPinnedNodes=0,o.selectAll(".node").each(function(n){n.fixed=t,t?(e.numberOfPinnedNodes++,n.fx=n.x,n.fy=n.y):(n.fx=null,n.fy=null)}),Be.alpha(1).restart()},$("body").on("keydown",function(t){!G.isActive()&&"input"!==t.target.nodeName&&e.nodeSelected&&(37===t.keyCode?e.rotate(!0):39===t.keyCode&&e.rotate(!1))}),e.getLiteralFromPropValue=function(e){return e.substring(e.indexOf(":")+1)};let ut=!1;(()=>{if(!ut){qe.append("rect").attr("width",10*be).attr("height",10*Le).attr("x",-(10*be-be)/2).attr("y",-(10*Le-Le)/2).style("fill","none").style("pointer-events","all").call(we).on("click",function(e){e.stopPropagation(),tt(),Be.stop()});const e=e=>{e.preventDefault()};qe.node().addEventListener("wheel",e,{passive:!1}),H.push(()=>qe.node().removeEventListener("wheel",e)),ut=!0}(t=>{const n=t.appSettings;e.defaultSettings.includeInferred=n.DEFAULT_INFERENCE,e.defaultSettings.sameAsState=n.DEFAULT_INFERENCE&&n.DEFAULT_SAMEAS,e.defaultSettings.includeSchema=n.DEFAULT_VIS_GRAPH_SCHEMA;const r=I.get(b.GRAPHS_VIZ);if(r&&"object"==typeof r)try{e.saveSettings=r,void 0===e.saveSettings.includeSchema&&(e.saveSettings.includeSchema=e.defaultSettings.includeSchema,e.saveSettings.rejectedPredicates=[...e.saveSettings.rejectedPredicates,...e.defaultSettings.rejectedPredicates].unique())}catch{e.saveSettings=_.cloneDeep(e.defaultSettings),I.set(b.GRAPHS_VIZ,e.saveSettings)}else e.saveSettings=_.cloneDeep(e.defaultSettings)})(M.getAuthenticatedUser()),function(){const t=y.search().linksLimit;if(!t)return y.replace(),y.search("linksLimit",e.linksLimit.value),void y.state({skipOnPopState:!0});const n=Number.parseInt(t,10);if(Number.isNaN(n)||n<1||n>u)return f.error(P.instant("visual.links.invalid.limit.tooltip",{MIN_LINKS_LIMIT:1,MAX_LINKS_LIMIT:u}),P.instant("visual.links.invalid.limit.title")),y.search("linksLimit",e.linksLimit.value),void y.state({skipOnPopState:!0});q(n)}(),Pe(),$e()})()}function h(e,t,n,r){switch(e.mode=n.mode,e.graph=_.cloneDeep(n.graph),e.graphExists=n.graphExists,e.mode){case"new":e.title=r.instant("graphexplore.create.new.graph"),e.okButtonText=r.instant("common.create.btn");break;case"update":e.title=r.instant("graphexplore.update"),e.okButtonText=r.instant("common.save.btn");break;case"rename":e.title=r.instant("graphexplore.rename"),e.okButtonText=r.instant("common.save.btn")}e.ok=function(){e.form.$valid&&(e.graph.name=i(e.graph.name),t.close({graph:e.graph,mode:e.mode}))},e.saveNew=function(){e.graph.name=i(e.graph.name)+" (new)",t.close({graph:e.graph,mode:"new",restart:!0})},e.cancel=function(){t.dismiss("cancel")};const i=e=>e.replace(/\s+/g," ").trim()}h.$inject=["$scope","$uibModalInstance","data","$translate"]},83196(e,t,n){n.d(t,{Ds:()=>r,VH:()=>i,nj:()=>s,vH:()=>o});const r=[{id:"empty",name:"No inference"},{id:"rdfs-optimized",name:"RDFS (Optimized)"},{id:"rdfs",name:"RDFS"},{id:"rdfsplus-optimized",name:"RDFS-Plus (Optimized)"},{id:"owl-horst-optimized",name:"OWL-Horst (Optimized)"},{id:"owl-horst",name:"OWL-Horst"},{id:"owl2-ql-optimized",name:"OWL2-QL (Optimized)"},{id:"owl2-ql",name:"OWL2-QL"},{id:"owl-max-optimized",name:"OWL-Max (Optimized)"},{id:"owl-max",name:"OWL-Max"},{id:"owl2-rl-optimized",name:"OWL2-RL (Optimized)"},{id:"owl2-rl",name:"OWL2-RL"}],i={graphdbRepo:"graphdb",free:"free",eeWorker:"worker",eeMaster:"master",ontop:"ontop",se:"se",fedx:"fedx"},o=new RegExp("^[a-zA-Z0-9-_]+$"),s=new RegExp("^[0-9]+$")},35195(e,t,n){n.d(t,{G4:()=>o,Sn:()=>s,hK:()=>i});var r=n(22723);const i=e=>e.replace(/[()']/g,""),o=e=>"string"==typeof e?"true"===e:Boolean(e),s=e=>e?(0,r.upperFirst)(e.toLowerCase()):e},9508(e,t,n){n.d(t,{A:()=>s}),n(11014);var r=n(44482);const i={dispatch:r.dispatch,pointer:r.pointer};var o=o||{};o.Text=function(){function e(e,t,n,r){n=n||10;var i=t/3;return"string"==typeof e?(i*=10/(e.substring(0,t/3).length+1.5),i+=1,e.match(/[\u0900-\u0DFF\u1100-\u11FF\u2E80-\u2EFF\u3000-\u9FFF]/)&&(i*=.6),i<n&&(i=n),Math.round(i)):(i<n&&(i=n),Math.round(i))}return{calcFontSizeRaw:e,calcFontSize:function(t,n,r,i){return e(t,n,r)+"px"},getTextWithElipsisIfNeeded:function(e,t){return"string"==typeof e&&e.length>t?e.substring(0,t-3)+"...":e}}}(),o.Transition={fadeIn:function(e,t){e.style("opacity",0).transition().duration(t).style("opacity",1)},fadeOut:function(e,t){e.style("opacity",1).transition().duration(t).style("opacity",0)}},o.Click=function(){function e(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}return{delayDblClick:function(){var t=i.dispatch("click","dblclick");return function(t,n){let r,i=1,o=arguments.length;for(;++i<o;)r=arguments[i],t[r]=e(t,n,n[r]);return t}(function(e){var n,r=null;e.on("mousedown",function(){n=i.pointer(document.body),new Date}),e.on("mouseup",function(e,o){var s,a,c;a=n,c=i.pointer(document.body),Math.sqrt(Math.pow(a[0]-c[0],2),Math.pow(a[1]-c[1],2))>5||(r?(window.clearTimeout(r),r=null,t.call("dblclick",e,e,o)):r=window.setTimeout((s=e,function(){t.call("click",s,s,o),r=null}),250))})},t,"on")}}}();const s=o},82667(e,t,n){n.d(t,{A:()=>o});var r=n(44482);const i={select:r.select,selection:r.selection},o=function(){var e=function(){return"n"},t=function(){return[0,0]},n=function(){return" "},r=u(),o=null,s=null,a=null,c=null;function l(e){var t;o="svg"===(t=(t=e).node()).tagName.toLowerCase()?t:t.ownerSVGElement,s=o.createSVGPoint(),document.body.appendChild(r)}l.show=function(){var r=Array.prototype.slice.call(arguments);r[r.length-1]instanceof SVGElement&&(a=r.pop());var i,o=n.apply(this,r),s=t.apply(this,r),u=e.apply(this,r),h=f(),g=p.length,m=document.documentElement.scrollTop||document.body.scrollTop,y=document.documentElement.scrollLeft||document.body.scrollLeft,v=c.apply(this,r);for(h.html(o).style("opacity",1).style("pointer-events","all");g--;)h.classed(p[g],!1);const x=r.filter(e=>e instanceof Event);return i=d.get(u).apply(this,x),v?Object.keys(v).forEach(function(e){h.style(e,v[e])}):h.classed(u,!0).style("top",i.top+s[0]+m+"px").style("left",i.left+s[1]+y+"px"),l},l.hide=function(){return f().style("opacity",0).style("pointer-events","none"),l},l.attr=function(e,t){if(arguments.length<2&&"string"==typeof e)return f().attr(e);var n=Array.prototype.slice.call(arguments);return i.selection.prototype.attr.apply(f(),n),l},l.style=function(e,t){if(arguments.length<2&&"string"==typeof e)return f().style(e);var n=Array.prototype.slice.call(arguments);return i.selection.prototype.style.apply(f(),n),l},l.direction=function(t){return arguments.length?(e=null==t?t:g(t),l):e},l.offset=function(e){return arguments.length?(t=null==e?e:g(e),l):t},l.html=function(e){return arguments.length?(n=null==e?e:g(e),l):n},l.customPosition=function(e){return arguments.length?(c=null==e?e:g(e),l):c},l.destroy=function(){return r&&(f().remove(),r=null),l};var d=new Map(Object.entries({n:function(e){var t=h(e);return{top:t.n.y-r.offsetHeight,left:t.n.x-r.offsetWidth/2}},s:function(e){var t=h(e);return{top:t.s.y,left:t.s.x-r.offsetWidth/2}},e:function(e){var t=h(e);return{top:t.e.y-r.offsetHeight/2,left:t.e.x}},w:function(e){var t=h(e);return{top:t.w.y-r.offsetHeight/2,left:t.w.x-r.offsetWidth}},nw:function(e){var t=h(e);return{top:t.nw.y-r.offsetHeight,left:t.nw.x-r.offsetWidth}},ne:function(e){var t=h(e);return{top:t.ne.y-r.offsetHeight,left:t.ne.x}},sw:function(e){var t=h(e);return{top:t.sw.y,left:t.sw.x-r.offsetWidth}},se:function(e){var t=h(e);return{top:t.se.y,left:t.e.x}}})),p=d.keys();function u(){var e=i.select(document.createElement("div"));return e.style("position","absolute").style("top",0).style("opacity",0).style("pointer-events","none").style("box-sizing","border-box"),e.node()}function f(){return null===r&&(r=u(),document.body.appendChild(r)),i.select(r)}function h(e){for(var t=a||e.target;void 0===t.getScreenCTM&&"undefined"===t.parentNode;)t=t.parentNode;var n={},r=t.getScreenCTM(),i=t.getBBox(),o=i.width,c=i.height,l=i.x,d=i.y;return s.x=l,s.y=d,n.nw=s.matrixTransform(r),s.x+=o,n.ne=s.matrixTransform(r),s.y+=c,n.se=s.matrixTransform(r),s.x-=o,n.sw=s.matrixTransform(r),s.y-=c/2,n.w=s.matrixTransform(r),s.x+=o,n.e=s.matrixTransform(r),s.x-=o/2,s.y-=c/2,n.n=s.matrixTransform(r),s.y+=c,n.s=s.matrixTransform(r),n}function g(e){return"function"==typeof e?e:function(){return e}}return l}},11014(e,t,n){var r,i;r=[n(44482)],i=function(e){function t(e,t){return e.each(function(){var e=t.apply(this,arguments),n=select(this);for(var r in e)n.attr(r,e[r])})}function r(e,t){for(var n in t)e.attr(n,t[n]);return e}return void 0===e&&(e=n(44482)),e.selection.prototype.attrs=function(e){return("function"==typeof e?t:r)(this,e)},e.selection.prototype.moveToFront=function(){return this.each(function(){e.select(this.parentNode.appendChild(this))})},e.selection.prototype.moveToBack=function(){return this.each(function(){const e=this.parentNode.firstChild;e&&this.parentNode.insertBefore(this,e)})},e}.apply(t,r),void 0===i||(e.exports=i)}};
2
- //# sourceMappingURL=82917.c97f7cec0372ff2f6fdd.bundle.js.map
@@ -1,2 +0,0 @@
1
- export const __webpack_esm_id__=85698;export const __webpack_esm_ids__=[4552,33931,58325,80706,85698];export const __webpack_esm_modules__={85698(e,t,n){n(4552),n(33931);var r=n(8981),a=n(58325),o=n(57154);const i={minLen:"3",maxLen:"255"};function s(e,t,n,s,c,l,u){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-configuration/multi-region.html",scope:{clusterModel:"=",clusterConfiguration:"="},link:e=>{const g=(0,o.service)(o.AuthorizationService),_=(0,o.service)(o.AuthenticationService),d=[];e.topology=void 0,e.TopologyState=a.zB,e.isAdmin=!1,e.addingTag=!1,e.loaderTimeout=void 0,e.secondaryTag=void 0,e.TagLengthConstraints=i,e.loader=!1,e.statusLoader=!1,e.add=()=>{e.addingTag=!0},e.cancel=()=>{e.addingTag=!1},e.createTag=n=>{const r={tag:n};return O(!0),l.addCusterTag(r).then(()=>{s.success(t.instant("cluster_management.cluster_configuration_multi_region.created_tag",{tag:n}))}).catch(e=>{const n=getError(e);s.error(n,t.instant("cluster_management.cluster_configuration_multi_region.error.creating"))}).finally(()=>{e.addingTag=!1,O(!1)})},e.deleteTag=e=>{c.openSimpleModal({title:t.instant("cluster_management.cluster_configuration_multi_region.confirm.delete",{tag:e}),message:t.instant("cluster_management.cluster_configuration_multi_region.confirm.warning"),warning:!0,backdrop:"static",stopPropagation:!0}).result.then(()=>(O(!0),l.deleteClusterTag(e))).then(()=>s.success(t.instant("cluster_management.cluster_configuration_multi_region.deleted_tag",{tag:e}))).catch(e=>{if("cancel"===e||"escape key press"===e)return;const n=getError(e);s.error(n,t.instant("cluster_management.cluster_configuration_multi_region.error.deleting"))}).finally(()=>O(!1))},e.enableSecondaryMode=()=>{e.addingTag=!1;const n={title:t.instant("cluster_management.cluster_configuration_multi_region.confirm.enable_secondary"),message:t.instant("cluster_management.cluster_configuration_multi_region.confirm.enable_secondary_warning"),warning:!0,backdrop:"static",confirmButtonKey:"common.ok.btn",stopPropagation:!0};c.openSimpleModal(n).result.then(()=>m()).then(e=>(O(!0),l.enableSecondaryMode(e))).then(()=>s.success(t.instant("cluster_management.cluster_configuration_multi_region.secondary_enabled"))).catch(e=>{if("cancel"===e||"escape key press"===e)return;const n=getError(e);s.error(n,t.instant("cluster_management.cluster_configuration_multi_region.error.secondary"))}).finally(()=>O(!1))},e.disableSecondaryMode=()=>{c.openSimpleModal({title:t.instant("cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode"),message:t.instant("cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode_warning"),warning:!0,backdrop:"static",stopPropagation:!0}).result.then(()=>(O(!0),l.disableSecondaryMode())).then(()=>s.success(t.instant("cluster_management.cluster_configuration_multi_region.disabled_secondary_mode"))).catch(e=>{if("cancel"===e||"escape key press"===e)return;const n=getError(e);s.error(n,t.instant("cluster_management.cluster_configuration_multi_region.error.disabling"))}).finally(()=>O(!1))};const m=()=>{const e={title:t.instant("cluster_management.cluster_configuration_multi_region.secondary_cluster_settings"),templateUrl:"js/angular/clustermanagement/templates/modal/secondary-mode-modal.html",controller:["$scope","$uibModalInstance","config",function(e,t,n){e.rpcAddress="",e.tag="",e.title=n.title,e.onClick=e=>e.stopPropagation(),e.ok=()=>{t.close({primaryNode:e.rpcAddress,tag:e.tag})},e.cancel=()=>{t.dismiss("cancel")}}],size:"lg",warning:!0,backdrop:"static"};return c.openCustomModal(e).result},N=n=>{S(!0),l.getClusterConfig().then(t=>{e.secondaryTag=r.v9.fromJSON(t.data).secondaryTag,(t=>{const n=t.nodes.find(e=>e.nodeState===a.UY.LEADER);e.topology=n?.topologyStatus})(r.kY.fromJSON(n))}).catch(e=>{const n=getError(e);s.error(n,t.instant("cluster_management.cluster_configuration_multi_region.error.disabling"))}).finally(()=>S(!1))},O=(t,r)=>{n.cancel(e.loaderTimeout),t?(e.loaderMessage=r,e.loaderTimeout=n(()=>{e.loader=t},150)):e.loader=!1},S=(t,r)=>{n.cancel(e.loaderTimeout),t?(e.loaderMessage=r,e.loaderTimeout=n(()=>{e.statusLoader=t},150)):e.statusLoader=!1};e.$on("$destroy",function(){d.forEach(e=>e())}),e.isAdmin=_.isAuthenticated()&&g.isAdmin(),d.push(e.$watch("clusterModel",function(e,t){e!==t&&N(e)},!0)),d.push(u.onShowClusterConfigurationPanel(t=>{t||(e.addingTag=!1)})),N(e.clusterModel)}}}angular.module("graphdb.framework.clustermanagement.directives.cluster-configuration.multi-region",["graphdb.framework.core.directives.ascii-validator","graphdb.framework.core.directives.length-validator"]).directive("multiRegion",s),s.$inject=["$jwtAuth","$translate","$timeout","toastr","ModalService","ClusterRestService","ClusterViewContextService"]},4552(){angular.module("graphdb.framework.core.directives.ascii-validator",[]).directive("asciiValidator",function(){return{restrict:"A",require:"ngModel",link:function(e,t,n,r){function a(e){const t=/^[\x21-\x7E]*$/.test(e);return r.$setValidity("asciiValidator",t),e}r.$parsers.push(a),r.$formatters.push(a)}}})},33931(){angular.module("graphdb.framework.core.directives.length-validator",[]).directive("lengthValidator",function(){return{restrict:"A",require:"ngModel",link:function(e,t,n,r){function a(e){const t=n.minLength?parseInt(n.minLength,10):0,a=n.maxLength?parseInt(n.maxLength,10):1/0,o=e&&e.length>=t&&e.length<=a;return r.$setValidity("lengthValidator",o),e}r.$parsers.push(a),r.$formatters.push(a)}}})},58325(e,t,n){n.d(t,{UY:()=>r,gC:()=>o,vQ:()=>a,zB:()=>i});const r={LEADER:"LEADER",FOLLOWER:"FOLLOWER",CANDIDATE:"CANDIDATE",OUT_OF_SYNC:"OUT_OF_SYNC",NO_CONNECTION:"NO_CONNECTION",READ_ONLY:"READ_ONLY",RESTRICTED:"RESTRICTED",NO_CLUSTER:"NO_CLUSTER"},a={SEARCHING_FOR_NODE:"SEARCHING_FOR_NODE",WAITING_FOR_SNAPSHOT:"WAITING_FOR_SNAPSHOT",RECEIVING_SNAPSHOT:"RECEIVING_SNAPSHOT",APPLYING_SNAPSHOT:"APPLYING_SNAPSHOT",BUILDING_SNAPSHOT:"BUILDING_SNAPSHOT",SENDING_SNAPSHOT:"SENDING_SNAPSHOT",RECOVERY_OPERATION_FAILURE_WARNING:"RECOVERY_OPERATION_FAILURE_WARNING"},o={IN_SYNC:"IN_SYNC",OUT_OF_SYNC:"OUT_OF_SYNC",SYNCING:"SYNCING",NO_CONNECTION:"NO_CONNECTION",RECEIVING_SNAPSHOT:"RECEIVING_SNAPSHOT"},i={PRIMARY_NODE:"PRIMARY_NODE",SECONDARY_NODE:"SECONDARY_NODE"}}};
2
- //# sourceMappingURL=85698.ee9962969a310107ccf8.bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"85698.ee9962969a310107ccf8.bundle.js","mappings":"8MAUA,MAKMA,EAAuB,CACzBC,OAAQ,IACRC,OAAQ,OASZ,SAASC,EAAYC,EAAUC,EAAYC,EAAUC,EAAQC,EAAcC,EAAoBC,GAC3F,MAAO,CACHC,SAAU,IACVC,YAAa,iFACbC,MAAO,CACHC,aAAc,IACdC,qBAAsB,KAE1BC,KAAOC,IAIH,MAAMC,GAAuBC,EAAAA,EAAAA,SAAQC,EAAAA,sBAC/BC,GAAwBF,EAAAA,EAAAA,SAAQG,EAAAA,uBAChCC,EAAgB,GAQtBN,EAAOO,cAAWC,EAClBR,EAAOS,cAAgBA,EAAAA,GACvBT,EAAOU,SAAU,EACjBV,EAAOW,WAAY,EACnBX,EAAOY,mBAAgBJ,EACvBR,EAAOa,kBAAeL,EACtBR,EAAOjB,qBAAuBA,EAC9BiB,EAAOc,QAAS,EAChBd,EAAOe,cAAe,EAKtBf,EAAOgB,IAAM,KACThB,EAAOW,WAAY,GAGvBX,EAAOiB,OAAS,KACZjB,EAAOW,WAAY,GAGvBX,EAAOkB,UAAaC,IAChB,MAAMC,EAAU,CACZD,OAGJ,OADAE,GAAU,GACH7B,EAAmB8B,aAAaF,GAClCG,KAAK,KACFjC,EAAOkC,QAAQpC,EAAWqC,QAAQ,oEAAqE,CAACN,WACzGO,MAAOC,IACN,MAAMC,EAAMC,SAASF,GACrBrC,EAAOwC,MAAMF,EAAKxC,EAAWqC,QAAQ,2EACtCM,QAAQ,KACP/B,EAAOW,WAAY,EACnBU,GAAU,MAItBrB,EAAOgC,UAAab,IAChB5B,EAAa0C,gBAAgB,CACzBC,MAAO9C,EAAWqC,QAAQ,uEAAwE,CAACN,QACnGgB,QAAS/C,EAAWqC,QAAQ,yEAC5BW,SAAS,EACTC,SAAU,SACVC,iBAAiB,IAClBC,OACEhB,K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EAAQO,YAAYpB,KAAKqB,EAC7B,EAER,E,4DCvCO,MAAM/B,EAAY,CACrBC,OAAQ,SACRoC,SAAU,WACVC,UAAW,YACXC,YAAa,cACbC,cAAe,gBACfC,UAAW,YACXC,WAAY,aACZC,WAAY,cAGHC,EAAgB,CACzBC,mBAAoB,qBACpBC,qBAAsB,uBACtBC,mBAAoB,qBACpBC,kBAAmB,oBACnBC,kBAAmB,oBACnBC,iBAAkB,mBAClBC,mCAAoC,sCAG3BC,EAAY,CACrBC,QAAS,UACTd,YAAa,cACbe,QAAS,UACTd,cAAe,gBAEfO,mBAAoB,sBAGX5G,EAAgB,CACzBoH,aAAc,eACdC,eAAgB,iB","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-configuration/multi-region.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/ascii-validator.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/length-validator.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/clustermanagement/states.js"],"sourcesContent":["import 'angular/core/directives/ascii-validator.directive';\nimport 'angular/core/directives/length-validator.directive';\nimport {ClusterConfiguration, ClusterModel} from '../../../models/clustermanagement/cluster';\nimport {NodeState, TopologyState} from '../../../models/clustermanagement/states';\nimport {\n AuthorizationService,\n AuthenticationService,\n service,\n} from '@ontotext/workbench-api';\n\nconst modules = [\n 'graphdb.framework.core.directives.ascii-validator',\n 'graphdb.framework.core.directives.length-validator',\n];\n\nconst TagLengthConstraints = {\n minLen: '3',\n maxLen: '255',\n};\n\nangular\n .module('graphdb.framework.clustermanagement.directives.cluster-configuration.multi-region', modules)\n .directive('multiRegion', MultiRegion);\n\nMultiRegion.$inject = ['$jwtAuth', '$translate', '$timeout', 'toastr', 'ModalService', 'ClusterRestService', 'ClusterViewContextService'];\n\nfunction MultiRegion($jwtAuth, $translate, $timeout, toastr, ModalService, ClusterRestService, ClusterViewContextService) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/clustermanagement/templates/cluster-configuration/multi-region.html',\n scope: {\n clusterModel: '=',\n clusterConfiguration: '=',\n },\n link: ($scope) => {\n // =========================\n // Private variables\n // =========================\n const authorizationService = service(AuthorizationService);\n const authenticationService = service(AuthenticationService);\n const subscriptions = [];\n\n // =========================\n // Public variables\n // =========================\n /**\n * @type {TopologyStatus}\n */\n $scope.topology = undefined;\n $scope.TopologyState = TopologyState;\n $scope.isAdmin = false;\n $scope.addingTag = false;\n $scope.loaderTimeout = undefined;\n $scope.secondaryTag = undefined;\n $scope.TagLengthConstraints = TagLengthConstraints;\n $scope.loader = false;\n $scope.statusLoader = false;\n\n // =========================\n // Public functions\n // =========================\n $scope.add = () => {\n $scope.addingTag = true;\n };\n\n $scope.cancel = () => {\n $scope.addingTag = false;\n };\n\n $scope.createTag = (tag) => {\n const payload = {\n tag,\n };\n setLoader(true);\n return ClusterRestService.addCusterTag(payload)\n .then(() => {\n toastr.success($translate.instant('cluster_management.cluster_configuration_multi_region.created_tag', {tag}));\n }).catch((response) => {\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.creating'));\n }).finally(() => {\n $scope.addingTag = false;\n setLoader(false);\n });\n };\n\n $scope.deleteTag = (tag) => {\n ModalService.openSimpleModal({\n title: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.delete', {tag}),\n message: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.warning'),\n warning: true,\n backdrop: 'static',\n stopPropagation: true,\n }).result\n .then(() => {\n setLoader(true);\n return ClusterRestService.deleteClusterTag(tag);\n })\n .then(() => toastr.success($translate.instant('cluster_management.cluster_configuration_multi_region.deleted_tag', {tag})))\n .catch((response) => {\n if (response === 'cancel' || response === 'escape key press') {\n return;\n }\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.deleting'));\n })\n .finally(() => setLoader(false));\n };\n\n $scope.enableSecondaryMode = () => {\n $scope.addingTag = false;\n const confirmConfig = {\n title: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.enable_secondary'),\n message: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.enable_secondary_warning'),\n warning: true,\n backdrop: 'static',\n confirmButtonKey: 'common.ok.btn',\n stopPropagation: true,\n };\n\n ModalService.openSimpleModal(confirmConfig).result\n .then(() => openSecondaryModeModal())\n .then((payload) => {\n setLoader(true);\n return ClusterRestService.enableSecondaryMode(payload);\n })\n .then(() => toastr.success($translate.instant('cluster_management.cluster_configuration_multi_region.secondary_enabled')))\n .catch((response) => {\n if (response === 'cancel' || response === 'escape key press') {\n return;\n }\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.secondary'));\n })\n .finally(() => setLoader(false));\n };\n\n $scope.disableSecondaryMode = () => {\n ModalService.openSimpleModal({\n title: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode'),\n message: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode_warning'),\n warning: true,\n backdrop: 'static',\n stopPropagation: true,\n }).result\n .then(() => {\n setLoader(true);\n return ClusterRestService.disableSecondaryMode();\n })\n .then(() => toastr.success($translate.instant('cluster_management.cluster_configuration_multi_region.disabled_secondary_mode')))\n .catch((response) => {\n if (response === 'cancel' || response === 'escape key press') {\n return;\n }\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.disabling'));\n })\n .finally(() => setLoader(false));\n };\n\n // =========================\n // Private functions\n // =========================\n const setTopology = (clusterModel) => {\n const leader = clusterModel.nodes.find((node) => node.nodeState === NodeState.LEADER);\n $scope.topology = leader?.topologyStatus;\n };\n\n const openSecondaryModeModal = () => {\n const secondaryModalConfig = {\n title: $translate.instant('cluster_management.cluster_configuration_multi_region.secondary_cluster_settings'),\n templateUrl: 'js/angular/clustermanagement/templates/modal/secondary-mode-modal.html',\n controller: ['$scope', '$uibModalInstance', 'config', secondaryModeModalController],\n size: 'lg',\n warning: true,\n backdrop: 'static',\n };\n\n return ModalService.openCustomModal(secondaryModalConfig).result;\n\n // Controller for the secondary mode modal\n function secondaryModeModalController($scope, $uibModalInstance, config) {\n $scope.rpcAddress = '';\n $scope.tag = '';\n $scope.title = config.title;\n\n $scope.onClick = ($event) => $event.stopPropagation();\n $scope.ok = () => {\n $uibModalInstance.close({\n primaryNode: $scope.rpcAddress,\n tag: $scope.tag,\n });\n };\n $scope.cancel = () => {\n $uibModalInstance.dismiss('cancel');\n };\n }\n };\n\n const updateClusterData = (clusterModel) => {\n setStatusLoader(true);\n ClusterRestService.getClusterConfig()\n .then((response) => {\n $scope.secondaryTag = ClusterConfiguration.fromJSON(response.data).secondaryTag;\n setTopology(ClusterModel.fromJSON(clusterModel));\n }).catch((response) => {\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.disabling'));\n })\n .finally(() => setStatusLoader(false));\n };\n\n const handleClusterConfigurationPanelVisibility = (show) => {\n if (!show) {\n $scope.addingTag = false;\n }\n };\n\n const setLoader = (loader, message) => {\n $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderMessage = message;\n $scope.loaderTimeout = $timeout(() => {\n $scope.loader = loader;\n }, 150);\n } else {\n $scope.loader = false;\n }\n };\n\n const setStatusLoader = (loader, message) => {\n $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderMessage = message;\n $scope.loaderTimeout = $timeout(() => {\n $scope.statusLoader = loader;\n }, 150);\n } else {\n $scope.statusLoader = false;\n }\n };\n\n // =========================\n // Events and watchers\n // =========================\n const subscribeHandlers = () => {\n subscriptions.push($scope.$watch('clusterModel', function(newValue, oldValue) {\n if (newValue !== oldValue) {\n updateClusterData(newValue);\n }\n }, true));\n subscriptions.push(ClusterViewContextService.onShowClusterConfigurationPanel(handleClusterConfigurationPanelVisibility));\n };\n\n const removeAllListeners = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n $scope.$on('$destroy', function() {\n removeAllListeners();\n });\n\n // =========================\n // Initialization\n // =========================\n const init = () => {\n $scope.isAdmin = authenticationService.isAuthenticated() && authorizationService.isAdmin();\n subscribeHandlers();\n updateClusterData($scope.clusterModel);\n };\n init();\n },\n };\n}\n","/**\n * @ngdoc directive\n * @name asciiValidator\n * @restrict A\n * @module graphdb.framework.core.directives.ascii-validator\n * @description\n * A custom AngularJS directive that validates if an input string contains only printable ASCII characters,\n * excluding spaces. Printable ASCII characters range from ASCII code 33 (`!`) to ASCII code 126 (`~`).\n *\n * **Usage:**\n * ```html\n * <input type=\"text\" ng-model=\"inputText\" ascii-validator>\n * ```\n *\n * @requires ngModel\n */\nangular.module('graphdb.framework.core.directives.ascii-validator', [])\n .directive('asciiValidator', function () {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function(scope, element, attrs, ngModel) {\n function validateAscii(value) {\n // Regular expression for printable ASCII characters excluding space (ASCII codes 33-126)\n const asciiRegex = /^[\\x21-\\x7E]*$/;\n\n const isValid = asciiRegex.test(value);\n ngModel.$setValidity('asciiValidator', isValid);\n return value;\n }\n ngModel.$parsers.push(validateAscii);\n ngModel.$formatters.push(validateAscii);\n }\n };\n});\n","/**\n * @ngdoc directive\n * @name lengthValidator\n * @restrict A\n * @module graphdb.framework.core.directives.length-validator\n * @description\n * A custom AngularJS directive that validates the length of an input string.\n * The directive ensures that the string length falls within a specified range,\n * using the `min-length` and `max-length` attributes.\n *\n * If no `min-length` is provided, the minimum length is set to 0.\n * If no `max-length` is provided, the maximum length is set to Infinity.\n *\n * **Usage:**\n * ```html\n * <input type=\"text\" ng-model=\"inputText\" length-validator min-length=\"5\" max-length=\"10\">\n * ```\n *\n * @param {number} minLength (optional) The minimum length of the input string. Defaults to 0 if not provided.\n * @param {number} maxLength (optional) The maximum length of the input string. Defaults to Infinity if not provided.\n * @requires ngModel\n */\nangular.module('graphdb.framework.core.directives.length-validator', [])\n .directive('lengthValidator', function () {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function(scope, element, attrs, ngModel) {\n function validateLength(value) {\n const minLength = attrs.minLength ? parseInt(attrs.minLength, 10) : 0;\n const maxLength = attrs.maxLength ? parseInt(attrs.maxLength, 10) : Infinity;\n const isValid = value && value.length >= minLength && value.length <= maxLength;\n ngModel.$setValidity('lengthValidator', isValid);\n return value;\n }\n ngModel.$parsers.push(validateLength);\n ngModel.$formatters.push(validateLength);\n }\n };\n});\n","export const NodeState = {\n LEADER: 'LEADER',\n FOLLOWER: 'FOLLOWER',\n CANDIDATE: 'CANDIDATE',\n OUT_OF_SYNC: 'OUT_OF_SYNC',\n NO_CONNECTION: 'NO_CONNECTION',\n READ_ONLY: 'READ_ONLY',\n RESTRICTED: 'RESTRICTED',\n NO_CLUSTER: 'NO_CLUSTER'\n};\n\nexport const RecoveryState = {\n SEARCHING_FOR_NODE: 'SEARCHING_FOR_NODE',\n WAITING_FOR_SNAPSHOT: 'WAITING_FOR_SNAPSHOT',\n RECEIVING_SNAPSHOT: 'RECEIVING_SNAPSHOT',\n APPLYING_SNAPSHOT: 'APPLYING_SNAPSHOT',\n BUILDING_SNAPSHOT: 'BUILDING_SNAPSHOT',\n SENDING_SNAPSHOT: 'SENDING_SNAPSHOT',\n RECOVERY_OPERATION_FAILURE_WARNING: 'RECOVERY_OPERATION_FAILURE_WARNING'\n};\n\nexport const LinkState = {\n IN_SYNC: 'IN_SYNC',\n OUT_OF_SYNC: 'OUT_OF_SYNC',\n SYNCING: 'SYNCING',\n NO_CONNECTION: 'NO_CONNECTION',\n // complimentary state, built based on the recovery state of two nodes when one is receiving snapshot to the other\n RECEIVING_SNAPSHOT: 'RECEIVING_SNAPSHOT'\n};\n\nexport const TopologyState = {\n PRIMARY_NODE: 'PRIMARY_NODE',\n SECONDARY_NODE: 'SECONDARY_NODE'\n};\n"],"names":["TagLengthConstraints","minLen","maxLen","MultiRegion","$jwtAuth","$translate","$timeout","toastr","ModalService","ClusterRestService","ClusterViewContextService","restrict","templateUrl","scope","clusterModel","clusterConfiguration","link","$scope","authorizationService","service","AuthorizationService","authenticationService","AuthenticationService","subscriptions","topology","undefined","TopologyState","isAdmin","addingTag","loaderTimeout","secondaryTag","loader","statusLoader","add","cancel","createTag","tag","payload","setLoader","addCusterTag","then","success","instant","catch","response","msg","getError","error","finally","deleteTag","openSimpleModal","title","message","warning","backdrop","stopPropagation","result","deleteClusterTag","enableSecondaryMode","confirmConfig","confirmButtonKey","openSecondaryModeModal","disableSecondaryMode","secondaryModalConfig","controller","$uibModalInstance","config","rpcAddress","onClick","$event","ok","close","primaryNode","dismiss","size","openCustomModal","updateClusterData","setStatusLoader","getClusterConfig","ClusterConfiguration","fromJSON","data","leader","nodes","find","node","nodeState","NodeState","LEADER","topologyStatus","setTopology","ClusterModel","loaderMessage","$on","forEach","subscription","isAuthenticated","push","$watch","newValue","oldValue","onShowClusterConfigurationPanel","show","angular","module","directive","$inject","require","element","attrs","ngModel","validateAscii","value","isValid","test","$setValidity","$parsers","$formatters","validateLength","minLength","parseInt","maxLength","Infinity","length","FOLLOWER","CANDIDATE","OUT_OF_SYNC","NO_CONNECTION","READ_ONLY","RESTRICTED","NO_CLUSTER","RecoveryState","SEARCHING_FOR_NODE","WAITING_FOR_SNAPSHOT","RECEIVING_SNAPSHOT","APPLYING_SNAPSHOT","BUILDING_SNAPSHOT","SENDING_SNAPSHOT","RECOVERY_OPERATION_FAILURE_WARNING","LinkState","IN_SYNC","SYNCING","PRIMARY_NODE","SECONDARY_NODE"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- export const __webpack_esm_id__=86099;export const __webpack_esm_ids__=[86099];export const __webpack_esm_modules__={86099(e,t,n){var a=n(82667),r=n(89687),i=n(9508),s=n(44482),c=n(66886),o=(n(38473),n(57154));function l(e,t,n,l,d,h,u,f,p,g,x,m){return{restrict:"AE",template:'<div id="classChart"></div>',scope:{classHierarchyData:"=",flattenedClassNames:"=",selectedClass:"=",currentSliderValue:"=",showClassInfoPanel:"=",showExternalElements:"=",hidePrefixes:"=",currentBrowserLimit:"="},link:function(y,A,v){!function(y){let A=!1;let v,S;const C=s.pack().size([780,780]),R=s.scaleLinear().domain([0,4]).range(["hsl(19, 70%, 90%)","hsl(19, 70%, 50%)"]).interpolate(s.interpolateHcl),E=s.select("#classChart").insert("svg:svg","h2").attr("viewBox","0 0 800 800").attr("preserveAspectRatio","xMidYMid meet").on("dblclick.zoom",null);function P(){return E.append("svg:g").attrs({id:"main-group",transform:"translate(400,400)"})}function w(){return"true"===g.get(x.CLASS_HIERARCHY_HIDE_PREFIXES)}function H(){const e=c.A.Export.getCSSRules("css/rdf-class-hierarchy-labels.css?v=3.5.1-TR3");s.selectAll("#main-group").append("defs"),$("defs").append('<style type="text/css"><![CDATA['+e+"]]></style>"),s.selectAll("g").style("opacity",1);const t=c.A.Export.generateBase64ImageSource("#classChart svg");s.select(this).attrs({href:t,download:"class-hierarchy-"+h.getActiveRepository()+".svg"})}y.hidePrefixes=w();let I=P();const T=!!y.classHierarchyData?.classCount,L=h.getActiveRepository()&&!h.isSystemRepository();let k,D,N,b,F;(0,o.service)(o.LicenseContextService).onLicenseChanged(t=>{t?.valid&&!T&&L&&function(){e.loader=!0,e.hierarchyError=!1;const t=g.get(`classHierarchy-selectedGraph-${h.getActiveRepository()}`);n.getClassHierarchyData(null!==t?t.contextID.uri:"").success(function(t,n){e.loader=!1,207===n&&u.warning(m.instant("graphexplore.update.diagram"),m.instant("graphexplore.repository.data.changed")),y.classHierarchyData=t,s.select("#download-svg").on("mouseover",H)}).error(function(t){e.loader=!1,e.hierarchyError=getError(t),u.error(m.instant("graphexplore.error.request.failed",{name:p,error:getError(t)}))})}()});const O={};function z(n,c,o,h){b&&b(),F&&F(),s.selectAll("#main-group").remove(),I=P(),r.A.SingleChild.addPlaceholders(n,!0),S=s.hierarchy(n),S.sum(function(e){return e.size}),N=o||S,C(S);const u=S.descendants();let g;N.isInFocusTransitive=!0,r.A.SingleChild.removePlaceholders(u),r.A.SingleChild.centerNodes(u),r.A.SingleChild.makePositionsRelativeToZero(u),v||(v=(0,a.A)().attr("class","d3-tip").customPosition(function(e,t){return{top:"inherit",bottom:l.innerHeight-t.clientY+"px",right:l.innerWidth-t.clientX+"px"}}).html(function(e){return e.data.name}),E.call(v));const x=I.selectAll("circle").data(u).enter().append("g");c.doFade&&x.each(function(e){i.A.Transition.fadeIn(s.select(this),550)});let m=[];const w=x.append("circle").attr("class",function(e){return e.data.role}).attr("data-test",function(e){return"class-"+e.data.name}).attr("guide-selector",function(e){return"class-"+e.data.name}).style("fill",function(e){return e.children?R(e.depth):"#E0D0D0"}).each(function(e){if(e.circle=s.select(this),e.data.name!==p){const t=e.data.name;m.push({name:t}),O[[t]]=e,e.circle.classed("rdf-class",!0),e.circle.on("mouseover",function(t){c.noPrefixes||e.textHidden?v.show(e,t):v.hide(e)}),e.circle.on("mouseout",v.hide)}}).on("gdb-focus",(e,t)=>D(t)).on("gdb-zoom",(e,t)=>Z(t));let H;function T(e){s.selectAll(".selected").classed("selected",e.selected=!1),e.circle.classed("selected",e.selected=!0),H=e}function L(){y.showClassInfoPanel=!1}m&&(m=_.uniqBy(m,"name"),y.flattenedClassNames=m);const $=i.A.Click.delayDblClick();s.selectAll(".parent, .topLevelParent, .child, .root").call($),D=function(e){Z(e),e.data.name===p?(L(),s.selectAll(".selected").classed("selected",!1)):(T(e),A||(y.selectedClass=H,y.showClassInfoPanel=!0),y.$on("sidePanelClosed",function(t){s.selectAll(".selected").classed("selected",e.selected=!1)}))},$.on("click",function(e,t){t.data.id&&l.history.pushState({id:t.data.id},"classHierarchyPage"+t.data.id,"hierarchy#"+t.data.id),v.hide(),D(t)}),$.on("dblclick",function(t,a){a!==n&&(v.hide(),T(a),e.$broadcast("goToDomainRangeGraphView",H,N),t.stopPropagation())});let z=0;E.on("wheel",function(e){v.hide(),e.preventDefault(),e.stopPropagation();const t=Date.now();if(!(t-z>100))return;z=t;let n="";e.deltaY<=-1?n="in":e.deltaY>=1&&(n="out");let a=e.target.__data__;if(a||(a=N),"in"===n){if(a!==N){for(;a.parent&&!a.parent.isInFocusTransitive;)a=a.parent;a.depth<N.depth&&(a=N)}if(a===N&&a.children){let e=a.children[0];for(let t=1;t<a.children.length;t++)a.children[t].sortingRank>e.sortingRank&&(e=a.children[t]);e.children&&(a=e)}else a.children||(a=a.parent);Z(a,!0)}else"out"===n&&(a=N.parent,a&&Z(a,!0));N.data.name===p&&l.history.replaceState({id:1},"classHierarchyPage1","hierarchy#1"),U()});const Y=I.selectAll("text").data(u).enter().append("text").attr("class",function(e){return e.children&&e.children.length?"label":"label child-label"}).each(function(e){e.textSel=s.select(this)});c.noPrefixes?(Y.each(function(e){const t=e.data.name.indexOf(":");e.data.name.indexOf("http://")>-1?e.noPrefixName=e.data.name:t>-1&&(e.noPrefixName=e.data.name.substring(t+1))}),Y.style("font-size",function(e){return i.A.Text.calcFontSize(e.noPrefixName,e.r)}).text(function(e){return i.A.Text.getTextWithElipsisIfNeeded(e.noPrefixName,e.r/3)})):Y.style("font-size",function(e){return i.A.Text.calcFontSize(e.data.name,e.r)}).text(function(e){return i.A.Text.getTextWithElipsisIfNeeded(e.data.name,e.r/3)}),Y.style("display",function(e){return e.parent&&e.parent.data===N.data?(e.textHidden=this.textContent.indexOf("...")+3===this.textContent.length,null):(e.textHidden=!0,"none")}),c.doFade&&!c.keepPrevState&&Y.each(function(e){i.A.Transition.fadeIn(s.select(this),550)}),k=function(){function e(e){e&&w.each(function(t){+e===t.data.id&&D(t)})}const n=t.hash();l.onpopstate=function(t){t.state&&!t.state.skipOnPopState&&e(t.state.id)},e(n)};const B=I.selectAll("circle, text");function V(e,t){const n=800/e[2];g=e,B.attr("transform",function(t){return"translate("+(t.x-e[0])*n+","+(t.y-e[1])*n+")"}),w.attr("r",function(e){return e.r*n}),t&&Y.each(function(e){e.data.fullName!==N.data.topLevelParentUri&&N.data.topLevelParentUri!==p||(e.textSel.style("display","none"),N.children&&N.children.length?_.each(N.children,function(e){e.textSel.style("display","inline")}):N.textSel.style("display","inline"),N.parent&&_.each(N.parent.children,function(e){e.data.name!==N.data.name&&e.textSel.style("display","inline")}))}),Y.style("font-size",function(e){return c.noPrefixes?i.A.Text.calcFontSize(e.noPrefixName,e.r*n):i.A.Text.calcFontSize(e.data.name,e.r*n)}).text(function(e){return c.noPrefixes?i.A.Text.getTextWithElipsisIfNeeded(e.noPrefixName,e.r*n/3):i.A.Text.getTextWithElipsisIfNeeded(e.data.name,e.r*n/3)})}function M(e){let t=2*e+20;return 2*e/t<.3&&(t=2*e+2),t}function W(e){!e.isInFocusTransitive&&e.parent&&e.parent.isInFocusTransitive?(e.textHidden=this.textContent.indexOf("...")+3===this.textContent.length,this.style.display=""):(e.textHidden=!0,this.style.display="none")}function Z(e,t){if(d(function(){y.showExternalElements=e.data.name===p}),N===e)return;if(e.data.id&&l.history.replaceState({id:e.data.id,skipOnPopState:!0},"classHierarchyPage"+e.data.id,"hierarchy#"+e.data.id),!e.children&&(e=e.parent,N===e))return;if(t&&(L(),s.selectAll(".selected").classed("selected",!1)),N.parent){let e=N;for(;e;)e.isInFocusTransitive=!1,e=e.parent}let n=e;for(;n;)n.isInFocusTransitive=!!n.children,n=n.parent;N=e,2*N.r/(2*N.r+20)<.3||y.currentSliderValue>y.currentBrowserLimit?(V([N.x,N.y,M(N.r)]),Y.each(function(e){W.call(this,e)})):s.transition().duration(f).tween("zoom",function(e){const t=s.interpolateZoom(g,[N.x,N.y,M(N.r)]);return function(e){V(t(e))}}).selectAll("text").each(W)}V([N.x,N.y,M(N.r)],h),b=y.$on("rootFocus",function(){l.history.pushState({id:1},"classHierarchyPage1","hierarchy#1"),D(S)}),F=y.$on("classSearch",function(e){D(e)})}function U(){const t=y.classHierarchyData.classCount;let n=g.get(x.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);(!n||n>t)&&(n=t,g.set(x.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE,n)),e.$broadcast("classCount",t,n)}let Y,B,V,M;window.addEventListener("resize",U),window.addEventListener("beforeunload",function e(){window.removeEventListener("resize",U),window.removeEventListener("beforeunload",e)}),y.$watch("classHierarchyData",function(){Y&&Y(),B&&B(),V&&V(),M&&M();let e=w();if(y.classHierarchyData.classCount){U();const t=structuredClone(y.classHierarchyData);const n=s.hierarchy(t).descendants().sort(function(e,t){return e.data.sortingRank>t.data.sortingRank?-1:e.data.sortingRank<t.data.sortingRank||e.data.depth>t.data.depth?1:e.data.depth<t.data.depth?-1:0});let a,r;function i(e,t){const n={keepPrevState:!0,noPrefixes:w()};r=n.noPrefixes,z(a||e,n,N,!0),d(()=>{g.set(x.CLASS_HIERARCHY_SWITCH_PREFIXES,t),k(),A=!1},70)}function c(e,n,s){if(!e)return;g.set(x.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE,e),a={name:p,children:[]};const c=new Set;for(let t=1;t<=e;t++)c.add(n[t].data.id),n[t].parent===n[0]&&a.children.push(n[t].data);(function e(t){if(!t.children)return;const n=[];for(const e of t.children)c.has(e.id)&&n.push($.extend({},e));t.children=n;for(const n of t.children)e(n)})(a),s?(r=angular.isUndefined(r)?w():r,z(a,{noPrefixes:r})):i(t)}const o=g.get(x.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);if(o)c(o,n);else{const h={doFade:!0,keepPrevState:!0,noPrefixes:w()};z(t,h),k()}let l;Y=y.$watch("hidePrefixes",function(n){angular.isUndefined(n)||e?e=void 0:d(function(){A=!0,function(e){angular.isUndefined(e)||g.set(x.CLASS_HIERARCHY_HIDE_PREFIXES,e)}(n),i(t,!0)},50)},!0),B=y.$watch("currentSliderValue",function(e){c(e,n,!0)},!0),M=y.$on("onEnterKeypressSearchAction",function(e){l&&D(l)}),V=y.$on("searchedClass",function(e,t){l=O[t.name],l&&D(l)})}},!0)}(y)}}}angular.module("graphdb.framework.graphexplore.directives.class",["graphdb.framework.graphexplore.controllers.class","graphdb.framework.utils.localstorageadapter"]).constant("ZOOM_DURATION",500).constant("ROOT_OBJ_NAME","RDF Class Hierarchy").directive("rdfClassHierarchy",l),l.$inject=["$rootScope","$location","GraphDataRestService","$window","$timeout","$repositories","toastr","ZOOM_DURATION","ROOT_OBJ_NAME","LocalStorageAdapter","LSKeys","$translate"]},89687(e,t,n){n.d(t,{A:()=>r});var a=a||{};a.SingleChild={addPlaceholders:function e(t,n){if(t.children){for(var a=0;a<t.children.length;a++)e(t.children[a]);if(1===t.children.length){var r=1.2*t.size;n&&(r=.1*t.children[0].size),t.children.push({name:"placeholder",size:r})}}},removePlaceholders:function e(t){for(var n=t.length-1;n>=0;n--){var a=t[n];"placeholder"===a.data.name?t.splice(n,1):a.children&&e(a.children)}},centerNodes:function(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.children&&1===n.children.length){var a=n.x-n.children[0].x;n.children[0].x+=a,r(n.children[0],a)}}function r(e,t){if(e.children)for(var n=0;n<e.children.length;n++)e.children[n].x+=t,r(e.children[n],t)}},makePositionsRelativeToZero:function(e){for(var t=e[0].x,n=e[0].y,a=0;a<e.length;a++){var r=e[a];r.x-=t,r.y-=n}}};const r=a},66886(e,t,n){n.d(t,{A:()=>i}),n(11014);const a={selectAll:n(44482).selectAll};var r=r||{};r.Export={getCSSRules:function(e){const t=$('link[href="'+e+'"]')[0].sheet.rules;let n="";return _.each(t,function(e){n+=e.cssText}),n},generateBase64ImageSource:function(e){e||(e="svg");const t=a.selectAll(e).attr("version","1.1").attr("xmlns","http://www.w3.org/2000/svg").node().parentNode.innerHTML;return"data:image/svg+xml;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(t)))}};const i=r}};
2
- //# sourceMappingURL=86099.ab3779d6538a6648b2b7.bundle.js.map