graphdb-workbench 2.5.0 → 2.5.1-TR1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/115.558ce3da00d3be87d18a.bundle.js +1 -1
  2. package/dist/14.0bb211bcdc29c6d8b3b5.bundle.js +1 -1
  3. package/dist/15.6a74adbd30b4d2930e10.bundle.js +1 -0
  4. package/dist/178.e10370553beb5c6bb839.bundle.js +1 -1
  5. package/dist/180.d37db50f3ce1b3a04a65.bundle.js +1 -1
  6. package/dist/183.a086e00d4dc3c7855611.bundle.js +1 -1
  7. package/dist/21.c981976c6528073c0a2f.bundle.js +1 -1
  8. package/dist/210.1ac38e393ca959703d4b.bundle.js +1 -1
  9. package/dist/24.9076b75f45ce0579f7be.bundle.js +1 -1
  10. package/dist/31.31b7b4bd073b82c09fda.bundle.js +1 -1
  11. package/dist/51.514a339efd6cd11db0f8.bundle.js +1 -1
  12. package/dist/52.410a7d8b4cb433fb24ca.bundle.js +1 -0
  13. package/dist/{bundle.926694af2feb5084a769.bundle.js → bundle.39b836d40f0926aeec16.bundle.js} +2 -2
  14. package/dist/index.html +3 -3
  15. package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
  16. package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
  17. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  18. package/dist/js/angular/security/templates/user.html +1 -1
  19. package/dist/license-checker.json +2 -2
  20. package/dist/pages/aclmanagement.html +1 -1
  21. package/dist/pages/autocomplete.html +1 -1
  22. package/dist/pages/choose-repository-type.html +1 -1
  23. package/dist/pages/cluster-management/clusterInfo.html +3 -3
  24. package/dist/pages/create-index.html +4 -4
  25. package/dist/pages/dependencies.html +1 -1
  26. package/dist/pages/domainRangeInfo.html +2 -2
  27. package/dist/pages/edit.html +1 -1
  28. package/dist/pages/explore.html +1 -1
  29. package/dist/pages/export.html +1 -1
  30. package/dist/pages/find.html +1 -1
  31. package/dist/pages/graph-config/saveGraphConfig.html +11 -11
  32. package/dist/pages/graphs-visualizations.html +7 -7
  33. package/dist/pages/guides.html +1 -1
  34. package/dist/pages/import.html +1 -1
  35. package/dist/pages/jdbc-create.html +5 -5
  36. package/dist/pages/monitor/backup-and-restore.html +1 -1
  37. package/dist/pages/monitor/queries.html +1 -1
  38. package/dist/pages/monitor/resources.html +1 -1
  39. package/dist/pages/namespaces.html +2 -2
  40. package/dist/pages/plugins.html +1 -1
  41. package/dist/pages/rdfClassHierarchyInfo.html +7 -7
  42. package/dist/pages/rdfrank.html +2 -2
  43. package/dist/pages/repositories.html +1 -1
  44. package/dist/pages/repository.html +1 -1
  45. package/dist/pages/similarity-indexes.html +1 -1
  46. package/dist/pages/sparql-template-create.html +5 -5
  47. package/dist/pages/sparql.html +3 -3
  48. package/dist/pages/webapi.html +2 -2
  49. package/dist/res/swagger/index.html +27 -27
  50. package/package.json +1 -1
  51. package/dist/15.35db798cdef3e654ff7e.bundle.js +0 -1
  52. package/dist/52.23ca96a9ed8d85651731.bundle.js +0 -1
@@ -1 +1 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[24,138],{105:function(e,t,n){"use strict";n.r(t);n(7);var r=n(316),i=n(318),o=(n(10),n(67));function a(e,t,n,a,s,c,l,d,u,p,f,h,g,m,y,x,v,I,S,w,k,L,C){e.languageChanged=!1,e.propertiesObj={},e.propertiesQueryObj={},e.propertiesObj.items=[],e.propertiesNotFiltered=[],e.searchVisible=!1,e.nodeSelected=!1,e.queryResultsMode=!1,e.embedded=f.search().embedded,e.openedNodeInfoPanel=void 0,e.invalidLimit=!1,e.INVALID_LINKS_MSG=L.instant("sidepanel.invalid.limit.links.msg"),e.INVALID_LINKS_TOOLTIP=L.instant("sidepanel.invalid.limit.links.tooltip"),t.$on("$translateChangeSuccess",(function(){e.INVALID_LINKS_MSG=L.instant("sidepanel.invalid.limit.links.msg"),e.INVALID_LINKS_TOOLTIP=L.instant("sidepanel.invalid.limit.links.tooltip"),e.propertiesSearchPlaceholder=L.instant("visual.search.instance.placeholder")})),e.onopen=e.onclose=()=>angular.noop(),e.embedded&&(f.search().query||f.search().uri||f.search().config||f.search().saved)&&(e.noGoHome=!0);const T={};let b=0,N=0,P={},A=0;var M,E=d3.zoom().scaleExtent([.5,10]),G=d3.zoomIdentity.translate(0,-70).scale(1);E.on("zoom",(function(e){C.isActive()||(O=e.transform,M.attr("transform",O))}));let O=G;let R,j;function z(){return C.isActive()?e.defaultSettings:e.saveSettings}function D(e){m.openCopyToClipboardModal(e)}function F(){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}}))}t.key="",T.get=function(t,n,r){return g.initLazyList(t,n,r,b,e.propertiesObj.items)},t.$watch((function(){return t.key}),(function(){b=0,_.each(e.propertiesObj.items,(function(e){t.key>e&&b++})),N++})),T.revision=function(){return N},e.datasource=T,e.adapterContainer={adapter:{remain:!0}},e.propertiesQueryObj.query="",e.propertiesSearchPlaceholder=L.instant("visual.search.instance.placeholder"),e.propertiesFilterFunc=function(t){return t.key.toLowerCase().indexOf(e.propertiesQueryObj.query.toLowerCase())>=0},e.resetState=function(){e.searchVisible=!1,e.nodeSelected=!1,e.configLoaded=null,e.queryResultsMode=!1,e.lastSavedGraphName=null,e.lastSavedGraphId=null,e.shared=!1,e.numberOfPinnedNodes=0,P={},A=0},e.pushHistory=function(t,n){e.embedded&&(t.embedded=!0),f.search(t),f.state(n)},e.goToHome=function(){e.resetState(),f.url("graphs-visualizations")},e.shouldShowSettings=function(){return e.configLoaded&&e.configLoaded.id===e.defaultGraphConfig.id},e.shouldDisableSameAs=function(){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.$watch("propertiesObj.items",(function(){angular.isDefined(e.propertiesObj.items)&&e.propertiesObj.items.length>0&&c((function(){e.adapterContainer.adapter.reload()}),500)})),e.toggleMoreInfo=function(e){angular.element(e.currentTarget).parent().next().toggle(200),angular.element(e.currentTarget).children("span").toggleClass("icon-caret-down").toggleClass("icon-caret-up")},e.copyToClipboard=D,e.defaultSettings={linksLimit:20,includeInferred:!0,sameAsState:!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),p.when(h.getPrincipal()).then(t=>function(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=v.get(I.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(t){e.saveSettings=_.cloneDeep(e.defaultSettings),v.set(I.GRAPHS_VIZ,e.saveSettings)}else e.saveSettings=_.cloneDeep(e.defaultSettings)}(t)),e.resetSettings=function(){e.settings=_.cloneDeep(e.defaultSettings),e.validateLinksLimit(),F()},e.changeLimit=function(t){let n=e.settings.linksLimit+t;n<1&&(n=1),n>1e3&&(n=1e3),e.settings.linksLimit=n},e.validateLinksLimit=function(){e.invalidLimit=!o.NUMBER_PATTERN.test(e.settings.linksLimit)},e.showSettings=function(){e.showInfoPanel=!0,e.showFilter=!0,e.showNodeInfo=!1,e.showPredicates=!1,e.saveSettings?e.settings=_.cloneDeep(e.saveSettings):e.settings=_.cloneDeep(e.defaultSettings),F()},e.reExpandNode=function(){e.rootNodeIri&&e.$broadcast("onRootNodeChange",e.rootNodeIri)};const B=function(t,n,r){const i=z(),o=void 0===n?i.sameAsState:!0===n,a=void 0===r?i.includeInferred:!0===r;e.loading=!0,l({url:"rest/explore-graph/graph",method:"POST",headers:{"Content-Type":"application/json"},data:{query:t,linksLimit:i.linksLimit,languages:e.shouldShowSettings()?i.languages:[],includeInferred:a,sameAsState:o}}).then((function(e){me(e)}),(function(t){e.loading=!1,s.error(getError(t.data),L.instant("graphexplore.error.cannot.load.graph"))}))};function U(e){return e.replace(/[()']/g,"")}function W(e,t){let n=e.split(" ");return t?[n[0],n[1],n[2]].join(">"):[n[0],n[2]].join(">")}function H(e){return[e.source.iri,e.target.iri].join(">")}function V(e){if(e.isTriple){let t=document.getElementById(U(W(e.iri)));if(t&&void 0!==t.__data__.x)return t.__data__.x}return e.x}function q(e){if(e.isTriple){let t=document.getElementById(U(W(e.iri)));if(t&&void 0!==t.__data__.y)return t.__data__.y}return e.y}function K(e){let t=e.trim().split(" ");return`<<<${t[0]}> <${t[1]}> <${t[2]}>>>`}function Z(e){return U(`${e.source.isTriple?W(e.source.iri,!0):e.source.iri}>${e.target.isTriple?W(e.target.iri,!0):e.target.iri}>marker`)}function Q(){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?Le(e.source):_.find(t,(function(t){return t.iri===e.source})),r=e.isTripleTarget?Le(e.target):_.find(t,(function(t){return t.iri===e.target}));let i={source:n,target:r,predicates:e.predicates};if(e.isTripleSource||e.isTripleTarget){let e=`${i.source.isTriple?W(i.source.iri):i.source.iri}>${i.target.isTriple?W(i.target.iri):i.target.iri}`;if(J.tripleLinksCopy.has(e)){let t=J.tripleLinksCopy.get(e);return t[0].predicates.push(...i.predicates),t.push(i),J.tripleLinksCopy.set(e,t),null}J.tripleLinksCopy.set(e,[i])}return i}))}(e,t));for(let e of J.tripleLinksCopy.keys())1===J.tripleLinksCopy.get(e).length&&J.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){let t=[];this.tripleNodes.size>0&&e.forEach(e=>{this.tripleNodes.has(e)&&(this.tripleNodes.delete(e),this.links=_.reject(this.links,(function(n){let r=e.split(">"),i=W(n.source.iri),o=W(n.target.iri);if(i===e&&J.tripleNodes.delete(o)){let e=o.split(">");t.push({source:e[0],target:e[1]})}let a=i===e||o===e||n.source.iri===r[0]&&n.target.iri===r[1];return a&&(J.tripleLinksCopy.delete(`${i}>${o}`),J.tripleLinksCopy.delete(`${o}>${i}`)),a})))}),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){let r=[];this.links=_.reject(this.links,(function(e){let t=e.source.iri===n.iri||e.target.iri===n.iri;return t&&(e.target.isTriple&&r.push(W(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){let r=[],i=this.links;this.links=_.reject(this.links,(function(o){let a=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(!a){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;a=(r[0].source.iri===e.iri||r[0].target.iri)&&(r[1].source.iri===e.iri||r[1].target.iri)}return a&&(o.target.isTriple&&r.push(W(o.target.iri)),o.source.isTriple||o.target.isTriple||r.push([o.source.iri,o.target.iri].join(">"))),a})),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;let r=W(e.iri);if(this.tripleNodes.has(r)){let 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}})),tripleNodes:t,tripleLinksCopy:n,colorIndex:A,type2color:P,transform:O}},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)&&(A=t.colorIndex,P=_.cloneDeep(t.type2color)),angular.isDefined(t.transform)&&(O=d3.zoomIdentity.translate(t.transform.x,t.transform.y).scale(t.transform.k)),ue()}}e.updateSettings=function(){e.invalidLimit?s.error(e.INVALID_LINKS_TOOLTIP,e.INVALID_LINKS_MSG):(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})),e.rootNodeIri?e.reExpandNode(e.rootNodeIri):e.queryResultsMode&&f.search().query?B(f.search().query,f.search().sameAs,f.search().inference):"query"===e.configLoaded.startMode&&e.loadGraphConfig(e.configLoaded),z().showLinksText?d3.selectAll("svg .link-wrapper text").style("display","block"):d3.selectAll("svg .link-wrapper text").style("display","none"),e.showInfoPanel=!1,e.showFilter=!1,v.set(I.GRAPHS_VIZ,e.saveSettings))},e.showInfoPanel=!1;let J=new Q;e.defaultGraphConfig={id:"default",name:"Easy graph",startMode:"search"},e.getGraphConfigs=function(t){w.getGraphConfigs().success((function(n){e.graphConfigs=n,t&&t()})).error((function(e){s.error(getError(e),L.instant("graphexplore.error.graph.configs.short.msg"))}))},e.loadConfigForId=function(t,n){t===e.defaultGraphConfig.id?e.loadGraphConfig(e.defaultGraphConfig):w.getConfig(t).success((function(t){e.loadGraphConfig(t),n()})).error((function(e){s.error(getError(e),L.instant("graphexplore.error.could.not.load.config",{configId:t}))}))},e.findConfigById=function(t){return t===e.defaultGraphConfig.id?e.defaultGraphConfig:$.grep(e.graphConfigs,(function(e){return e.id===t}))[0]},e.easyGraphSearch=function(t){e.configLoaded=e.defaultGraphConfig,e.openUri(t)},e.loadGraphConfig=function(t){e.configLoaded=t,"search"===t.startMode?e.searchVisible=!0:"node"===t.startMode&&t.startIRI?c((function(){e.openUri(t.startIRI,!0)}),0):"query"===t.startMode&&t.startGraphQuery&&(e.loading=!0,w.loadGraphForConfig(t,t.startQueryIncludeInferred,z().linksLimit,t.startQuerySameAs).then((function(e){me(e)}),(function(t){e.loading=!1,s.error(getError(t),L.instant("graphexplore.error.graph.load"))})))},e.deleteConfig=function(t){m.openSimpleModal({title:L.instant("common.confirm"),message:L.instant("graphexplore.delete.graph",{configName:t.name}),warning:!0}).result.then((function(){w.deleteGraphConfig(t).success((function(){e.getGraphConfigs(),e.refreshSavedGraphs()})).error((function(e){s.error(getError(e),L.instant("graphexplore.error.cannot.delete.config"))}))}))},e.goToGraphConfig=function(t){e.pushHistory({config:t.id},{config:t}),e.resetState(),e.loadGraphConfig(t)},x.onpopstate=function(t){e.resetState(),t.state&&(t.state.config?(e.loadGraphConfig(t.state.config),t.state.uri&&e.openUri(t.state.uri,!0)):t.state.savedGraph&&e.loadSavedGraph(t.state.savedGraph,!0))};const Y=function(){f.search().query?(e.searchVisible=!1,e.queryResultsMode=!0,B(f.search().query,f.search().sameAs,f.search().inference)):e.$on("onRootNodeChange",(function(t,n){e.loading=!0;const r=z();angular.isDefined(n)&&(e.rootNodeIri=n,l({url:"rest/explore-graph/node",method:"GET",params:{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"),J=new Q;const n=J.addNode(t.data,500,500);O=G,xe(n,!0)})).catch((function(t){e.loading=!1,s.error(getError(t),L.instant("graphexplore.error.could.not.load.graph"))})))})),f.search().uri&&e.openUri(f.search().uri,!0),f.search().saved&&S.getSavedGraph(f.search().saved).success((function(t){e.loadSavedGraph(t)})).error((function(e){const t=getError(e);s.error(t,L.instant("graphexplore.error.could.not.open"))}))},X=function(){f.search().config?e.loadConfigForId(f.search().config,Y):f.search().query||f.search().uri?(e.loadGraphConfig(e.defaultGraphConfig),Y()):Y()};function ee(t){!n.getActiveRepository()||e.hasInitedRepository&&!t||(e.hasInitedRepository=!0,t||e.getGraphConfigs(X),e.getNamespacesPromise=k.getNamespaces(e.getActiveRepository()).success((function(t){const n=_.map(t.results.bindings,(function(e){return{uri:e.namespace.value,prefix:e.prefix.value}}));e.namespaces=_.sortBy(n,(function(e){return e.uri.length})),te()})).error((function(e){s.error(getError(e),L.instant("graphexplore.error.view.will.not.work"))})))}function te(){a.isLicenseValid()&&(e.getAutocompletePromise=u.checkAutocompleteStatus())}e.replaceIRIWithPrefix=function(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},e.addedTag=function(t){return t.text.indexOf(":")<0?(s.warning(L.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=d.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?s.warning(L.instant("graphexplore.absolute.prefixed.iri.option"),t):s.warning(L.instant("graphexplore.absolute.prefixed.iri"),t),!1;const r=e.text.indexOf("*");if(r>=0){if(!n)return s.warning(L.instant("graphexplore.wildcards.not.allowed"),t),!1;if(r<e.text.length-1)return s.warning(L.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 a.isLicenseValid()},e.hasInitedRepository=!1,e.$on("autocompleteStatus",(function(){te()})),e.$on("repositoryIsSet",(function(t,n){n.newRepo&&(e.hasInitedRepository=!1),ee(n.newRepo),n.newRepo&&(e.resetState(),$(".graph-visualization svg").empty(),f.search().query&&(e.goToHome(),Y()))})),ee();const ne=d3.scaleLinear().domain([0,9]).range(["hsl(0, 100%, 75%)","hsl(360, 90%, 82%)"]).interpolate(d3.interpolateHslLong),re=d3.scaleLinear().domain([0,9]).range(["hsl(180, 50%, 75%)","hsl(540, 40%, 82%)"]).interpolate(d3.interpolateHslLong);e.getColor=function(e){angular.isUndefined(P[e])&&(P[e]=A,A++);const t=P[e];return t>39?"#c2c2c2":t%2==0?ne(t/2):re(t/2)};const ie=d3.forceX(500).strength(.005),oe=d3.forceY(500).strength(.005),ae=d3.forceSimulation().force("x",ie).force("y",oe),se=d3.select(".main-container .graph-visualization").append("svg").attr("viewBox","0 0 1000 1000").attr("preserveAspectRatio","xMidYMid meet");se.append("rect").attr("width",1e4).attr("height",1e4).attr("x",-4500).attr("y",-4500).style("fill","none").style("pointer-events","all").call(E).on("click",(function(e){e.stopPropagation(),ve(),ae.stop()}));let ce=0,le=0;const de=new function(){this.state=!1,this.setLoadingState=function(e){this.state=e},this.getLoadingState=function(){return this.state},this.init=function(e,t){d3.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"),d3.select(t).append("image").attr("xlink:href","js/angular/templates/loader/ot-loader.svg?v=2.5.0").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 ue(t){d3.selectAll("svg g").remove(),d3.selectAll(".d3-tip").remove(),d3.selectAll(".menu-events").remove(),M=se.append("g").attr("class","nodes-container").attr("transform",(function(){return angular.isDefined(O)&&!t?O:""}));const n=Object(i.a)().attr("class","d3-tip").customPosition((function(){const e=R.getBoundingClientRect();return{top:e.bottom+10+"px",left:e.left-30+"px"}})).html((function(t){let n="";return t.fixed&&(n+='<i class="icon-pin"></i>&nbsp;&nbsp;'),t.types.length>0?n+=_.join(_.map(t.types,(function(t){return e.replaceIRIWithPrefix(t)}))," · "):n+="<i>No types</i>",n})),o=function(e){let t="";return t+=_.join(_.map(e.predicates,(function(t,n){if(0===n)return Te(t);if(n<10)return" · "+Te(t);if(10===n){const t=function(e){return e.predicates.length-10}(e),n=t>1?t+" predicates":t+" predicate";return" · "+L.instant("graphexplore.tip.text",{textToShow:n})}})),""),t};let a;const l=Object(i.a)().attr("class","d3-tip").customPosition((function(e){const t=a.getBoundingClientRect(),n=function(e){const t=o(e),n=document.createElement("canvas").getContext("2d");return n.font="13px Arial",e.predicates.length<10?n.measureText(t).width:n.measureText(t).width/2}(e);return{top:t.top-30+"px",left:t.left-30+"px",width:n+"px"}})).html((function(e){return o(e)}));const d=function(){c.cancel(void 0),c.cancel(ce),R=null,n.hide(),le=c((function(){ve()}),500)};se.call(n);se.call(l);let u=se.selectAll(".link"),p=se.selectAll(".node");const f=d3.forceCollide(e=>e.size+5).strength(.5),h=d3.forceManyBody().strength(-300),g=d3.forceCenter(500,500);ae.nodes(J.nodes).force("charge",h).force("collide",f).force("center",g).force("link",d3.forceLink(J.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}))),M.append("defs").selectAll("marker").data(J.links).enter().append("marker").attr("class","arrow-marker").attr("id",(function(e){return Z(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"),u=M.selectAll(".link").data(J.links).enter().append("g").attr("class","link-wrapper").attr("id",(function(e){return U(H(e))})).append("line").attr("class","link").style("stroke-width",1).style("fill","transparent").style("marker-end",(function(e){return`url(#${Z(e)})`}));const m=M.selectAll(".link-wrapper").append("text").text((function(e){return Ce(e)})).attr("class",(function(e){return e.predicates.length>1||J.tripleNodes.has(H(e))?"predicates":"predicate"})).attr("dy","-0.5em").style("text-anchor","middle").style("display",z().showLinksText?"":"none").on("mouseover",(function(e,t){e.stopPropagation(),function(e,t){c.cancel(void 0);const n=a=e.target;c((function(){a===n&&t.predicates.length>1&&l.show(t,a)}),300)}(e,t)})).on("mouseout",(function(){c.cancel(void 0),a=null,l.hide()})).on("click",(function(t,n){t.stopPropagation(),function(t,n){ke();let r=H(n);if(1===n.predicates.length&&J.tripleNodes.has(r)){j=null;let e=J.tripleNodes.get(r)[0];if(he(e,this,t.button)){let t={};t.iri=e.iri,t.pred=Te(e.iri.split(" ")[1]),Se(t)}return}!function(t){if(e.showNodeInfo=!1,e.showPredicates=t.predicates.length>1,e.showFilter=!1,e.showInfoPanel=!1,j===t)return e.showNodeInfo=!1,e.showInfoPanel=!1,void(j=null);j=t,e.showPredicates&&(e.predicates=_.map(t.predicates,(function(e){let n=function(e,t){let n=H(t);return J.tripleNodes.has(n)?J.tripleNodes.get(n).findIndex(t=>t.iri.indexOf(e)>=0):-1}(e,t),r=n>-1;return{value:Te(e),partOfTriple:r,linkId:r?H(t):"",nodeIndex:n}})),e.showInfoPanel=!0)}(n)}(t,n)}));let y,x=0,v=null,I=null;const S=function(t,n,r){let i=r||this.parentNode;Array.isArray(r)&&(i=r[n]);J.countLinks(t,J.links)<=z().linksLimit?xe(t,!1,i):s.info(L.instant("graphexplore.increase.limit"),L.instant("graphexplore.node.at.max")),e.closeInfoPanel()};function w(e,t){let n,r,i,o,a=!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,a=!1}let s=M.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=s),a&&(s=s.transition().duration(1e3).style("font-size",(function(){return r+"px"})).attr("opacity",o),"down-fixed"!==t&&s.remove())}const k=d3.drag().subject((function(e){return e})).on("start",(function(e,t){if(C.isActive())return;0===e.sourceEvent.button&&(t.fixedBeforeDrag=t.fixed,t.isBeingDragged=!0,t.beginDragging=!0,ve(),d3.select(this).classed("dragging",!0),ae.alphaTarget(.3).restart())})).on("drag",(function(t,n){n.isBeingDragged&&(n.fx=t.x,n.fy=t.y,n.fixed?n.beginDragging&&w(n,"fixed"):(e.numberOfPinnedNodes++,n.fixed=!0,w(n,"down-fixed")),n.pinWasFixed=!0,n.beginDragging=null)})).on("end",(function(e,t){t.isBeingDragged&&(t.pinWasFixed&&(t.pinWasFixed=null,d3.select(".pinned").remove()),t.isBeingDragged=!1,d3.select(this).classed("dragging",!1));ae.alphaTarget(0)}));p=M.selectAll(".node").data(J.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,r){r.isBeingDragged||(c.cancel(le),ce=c(()=>{(function(t,n){if(e.showInfoPanel)return!1;(fe.closeIcon||fe.expandIcon||fe.focusIcon||fe.copyURIIcon)&&fe.removeIcons();if(ae.alpha()<.1)return fe.initIcons(t,n.parentNode),ae.stop(),pe(),!0;return!1})(r,this)&&function(e,t){c.cancel(void 0);const r=R=t.target;c((function(){R===r&&n.show(e,R)}),300)}(r,t)},400))})).on("mouseout",d).on("click",(function(t,n){if(t.button&&0!==t.button)return;const r=this;if(v&&I===r)return c.cancel(v),v=null,void S(n,0,r.parentNode);I=r,d(),e.showPredicates=!1,C.isActive()||(c.cancel(v),v=c((function(){he(n,r,t),v=null}),540))})).on("touchstart",(e,t)=>function(e){x=0,y=c((function(){x<5&&ge(e),y=null}),1e3)}(t)).on("touchmove",(function(){x++})).on("touchend",(function(){c.cancel(y),y=null})).on("contextmenu",(function(t,r){t.shiftKey||(t.preventDefault(),ve(),e.closeInfoPanel(),r.fixed?(e.numberOfPinnedNodes--,r.fixed=!1,r.fx=null,r.fy=null,w(r,"up"),ae.alpha(1).restart()):(e.numberOfPinnedNodes++,r.fixed=!0,w(r,"down")),function(e){R&&n.show(e,R)}(r))})).on("gdb-expand-node",(e,t)=>S(t,0,e.srcElement.parentNode)).on("gdb-show-node-info",(e,t)=>Ie(t)).call(k);const T=M.selectAll(".node-wrapper").append("foreignObject").style("pointer-events","none").attr("width",(function(e){return 2*e.size*1.75}));M.insert("g").attr("class","menu-events"),function(e){e.each((function(e){e.fontSize=r.a.Text.calcFontSizeRaw(e.labels[0].label,e.size,16,!0)})).attr("height",(function(e){return 3*e.fontSize})).append("xhtml:div").attr("class","node-label-body").style("font-size",(function(e){return e.fontSize+"px"})).append("xhtml:div").text((function(e){return e.labels[0].label})),c((function(){$(".node-label-body div").each((function(e,t){let n=t.textContent.substring(0,t.textContent.length-1);let r=0;for(;r<200&&(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)n=n.substring(0,n.length-1),t.textContent=n+"…",r++}))}),50)}(T),ae.on("tick",(function(){u.attr("x1",(function(e){return V(e.source)})).attr("y1",(function(e){return q(e.source)})).attr("x2",(function(e){return V(e.target)})).attr("y2",(function(e){return q(e.target)})),m.attr("x",(function(e){let t=V(e.source),n=V(e.target);return e.x=.5*(t+n)})).attr("y",(function(e){let t=q(e.source),n=q(e.target);return e.y=.5*(t+n)})).attr("transform",(function(e){return"rotate("+function(e,t){const n={x:V(e.source),y:q(e.source)},r={x:V(e.target),y:q(e.target)};if(t)return 180*Math.atan2(r.y-n.y,r.x-n.x)/Math.PI;{const e=180*Math.atan2(r.y-n.y,r.x-n.x)/Math.PI;return e<=90&&e>=-90?e:(e>0?-1:1)*(180-Math.abs(e))}}(e,e.direction)+", "+e.x+", "+e.y+")"})),p.attr("cx",(function(e){return e.x})).attr("cy",(function(e){return e.y})),M.select(".node-loader").attr("x",(function(e){return e.x-e.size+3})).attr("y",(function(e){return e.y-e.size})),M.select(".loader-container").attr("cx",(function(e){return e.x})).attr("cy",(function(e){return e.y})),T.attr("x",(function(e){return e.x-1.75*e.size})).attr("y",(function(e){return e.y-3*e.fontSize/2})),d3.select(".pinned").attr("x",(function(e){return e.x})).attr("y",(function(e){return e.y})),pe()})),angular.isDefined(de)&&de.setLoadingState(!1),e.loading&&(e.loading=!1),d3.selectAll(".link-wrapper").each((function(){const e=$(this).attr("id").split(">")[0],t=$(this).attr("id").split(">")[1];d3.selectAll(".link").each((function(n){let r=U(n.source.iri),i=U(n.target.iri);if(r===t&&i===e){let e=r;e+=">",e+=i;const t=document.createTextNode(" ⟶");document.getElementById(e).lastChild.appendChild(t),n.direction="double"}}))})),d3.selectAll(".d3-actions-tip").remove(),ae.alpha(.3).restart()}function pe(){t.d3alpha=ae.alpha()}const fe=new function(){function e(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(n,r){const o=Object(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}));se.call(o);n.isExpanded?(this.collapseIcon=d3.select(".menu-events").append("g").attr("class","collapse-icon").attr("name","collapse").attr("transform",(function(){return e(20,n)})),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(--primary-color)"),this.collapseIcon.on("click",(function(){var e;(e=n).isExpanded=!1,J.removeNodeLeafLinks(e),ue()})).on("mouseover",(function(e){o.show(this.getAttribute("name"),e),c.cancel(ce),c.cancel(le)})).on("mouseout",(function(){o.hide(),le=c((function(){ve()}),500)}))):(this.expandIcon=d3.select(".menu-events").append("g").attr("class","expand-icon").attr("name","expand").attr("transform",(function(){return e(20,n)})),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(--primary-color)"),this.expandIcon.on("click",(function(){xe(n,!1,r)})).on("mouseover",(function(e){o.show(this.getAttribute("name"),e),c.cancel(le),c.cancel(ce)})).on("mouseout",(function(){o.hide(),le=c((function(){ve()}),500)}))),this.focusIcon=d3.select(".menu-events").append("g").attr("class","focus-icon").attr("name","focus").attr("transform",(function(){return e(20,n)})),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(--primary-color)"),this.focusIcon.on("click",(function(){t.$broadcast("onRootNodeChange",n.iri)})).on("mouseover",(function(e){o.show(this.getAttribute("name"),e),c.cancel(le),c.cancel(ce)})).on("mouseout",(function(){o.hide(),le=c((function(){ve()}),500)})),this.copyURIIcon=d3.select(".menu-events").append("g").attr("class","icon-link").attr("name","link").attr("transform",(function(){return e(20,n)})),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(--primary-color)"),this.copyURIIcon.on("click",(function(){D(n.iri),ve(),o.hide()})).on("mouseover",(function(e){o.show("<div style='text-align: center;'><b>Copy to ClipBoard</b><br>"+n.iri+"</div>",e),c.cancel(le),c.cancel(ce)})).on("mouseout",(function(){o.hide(),le=c((function(){ve()}),500)})),this.closeIcon=d3.select(".menu-events").append("g").attr("class","close-icon").attr("name","remove").attr("transform",(function(){return e(20,n)})),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(--primary-color)"),this.closeIcon.on("click",(function(){ge(n)})).on("mouseover",(function(e){o.show(this.getAttribute("name"),e),c.cancel(le),c.cancel(ce)})).on("mouseout",(function(){o.hide(),le=c((function(){ve()}),500)})),this.animateMenu(n)},this.animateMenu=function(t){const n=d3.easeSin;let r=0;let i=20;this.expandIcon&&this.expandIcon.transition().duration(100).style("opacity",1).ease(n).attr("transform",(function(){return e(i,t)})).delay(r+=35),this.collapseIcon&&this.collapseIcon.transition().duration(100).style("opacity",1).ease(n).attr("transform",(function(){return e(i,t)})).delay(r+=35),this.copyURIIcon.transition().duration(100).style("opacity",1).ease(n).attr("transform",(function(){return i+=30,e(i,t)})).delay(r+=35),this.focusIcon.transition().duration(100).style("opacity",1).ease(n).attr("transform",(function(){return i+=30,e(i,t)})).delay(r+=35),this.closeIcon.transition().duration(100).style("opacity",1).ease(n).attr("transform",(function(){return i+=30,e(i,t)})).delay(r+=35),this.expandedState=!0}};function he(n,r,i){return 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?(ge(n),!1):void 0!==e.openedNodeInfoPanel&&e.openedNodeInfoPanel===n?(e.pageslideExpanded=!1,e.openedNodeInfoPanel=void 0,!1):(Ie(n),!0)}function ge(e){J.removeNode(e),ue()}function me(t){!function(t){e.nodeSelected=!0,null===t.data.types&&(t.data.types="greyColor"),J=new Q,O=G}(t),ye(t)}function ye(t,n,r){let i=t.data;i=_.filter(i,(function(e){return-1===_.findIndex(J.links,(function(t){return e.source===t.source.iri&&e.target===t.target.iri}))}));let o=[];const a=J.tripleLinksCopy.values();for(let e=0;e<J.tripleLinksCopy.size;e++){a.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 c=function(e,t){let n=t.map((function(t){return t[e]}));return t.filter((function(t,r){return n.indexOf(t[e])===r}))}("iri",_.union(_.flatten(_.map(t.data,(function(e){return[{iri:e.source,isTriple:e.isTripleSource},{iri:e.target,isTriple:e.isTripleTarget}]}))))),d=_.map(J.nodes,(function(e){return{iri:e.iri,isTriple:Boolean(e.isTriple)}})),u=J.tripleNodes.values();for(let e=0;e<J.tripleNodes.size;e++){u.next().value.forEach(e=>{d.push({iri:e.iri,isTriple:e.isTriple})})}const f=_.reject(c,(function(e){return _.some(d,e)}));if(0===f.length)(r||0===i.length)&&s.info(L.instant("graphexplore.error.node.connections")),J.addAndMatchLinks(i),ue();else{const t=[],r=[],o=z();_.forEach(f,(function(n,i){t.push(l({url:"rest/explore-graph/node",method:"GET",params:{iri:n.isTriple?K(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})))})),p.all(t).then((function(){_.forEach(r,(function(e,t){const i=2*Math.PI*t/r.length,o=(n?n.x:0)+1e3*Math.cos(i)/3,a=(n?n.y:0)+1e3*Math.sin(i)/3;e.isTriple?J.addTriple(e,o,a):J.addNode(e,o,a)})),J.addAndMatchLinks(i),n&&(n.isExpanded=!0),ue()}))}}function xe(t,n,r){if(de.getLoadingState())return;de.init(t,r);const i=z(),o=t.iri;l({url:"rest/explore-graph/links",method:"GET",params:{iri:o,linksLimit:i.linksLimit,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);s.error(n,L.instant("graphexplore.error.exploring.node")),e.loading=!1,de.setLoadingState(!1)}))}function ve(){angular.isDefined(fe)&&fe.expandedState&&fe.removeIcons()}function Ie(t){ae.stop(),e.openedNodeInfoPanel=t,e.showNodeInfo=!0,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(K(t.iri)):encodeURIComponent(t.iri),e.showInfoPanel=!0,e.rdfsLabel=t.labels[0].label,e.rdfsComment=t.comment,e.expanded=!1,e.propertiesQueryObj.query="",e.dataNodeKeysQuery="";const n=z();l.get("rest/explore-graph/properties",{params:{iri:t.isTriple?K(t.iri):t.iri,config:e.configLoaded.id,languages:e.shouldShowSettings()?n.languages:[],includeInferred:n.includeInferred,sameAsState:n.sameAsState,rejectedPredicates:e.shouldShowSettings()?n.rejectedPredicates:[]}}).then((function(t){e.data=_.mapKeys(t.data,(function(t,n){return e.replaceIRIWithPrefix(n)})),e.propertiesObj.items=[],_.forEach(e.data,(function(t,n){e.propertiesObj.items.push({key:n,value:t})})),e.nodeImage=void 0,e.propertiesNotFiltered=e.propertiesObj.items;const n=_.find(e.propertiesObj.items,(function(e){return"image"===e.key}));n&&(e.nodeImage=n.value[0].v),e.propertiesObj.items=_.reject(e.propertiesObj.items,(function(e){return"image"===e.key})),e.propertiesNotFiltered=e.propertiesObj.items}),(function(e){s.warning(getError(e.data),"Error")}))}function Se(e){we("predicate","var(--primary-color-dark)",e),we("predicates","var(--primary-color-dark)",e);let t=document.getElementsByClassName("link");t&&_.each(t,(function(t){let n=t.__data__;(n.source.iri.indexOf(e.iri)>=0||n.target.iri.indexOf(e.iri)>=0)&&(t.style.stroke="var(--primary-color-dark)",t.style.strokeWidth=4)}));let n=document.getElementsByClassName("arrow-marker");n&&_.each(n,(function(t){let n=t.__data__;(n.source.iri.indexOf(e.iri)>=0||n.target.iri.indexOf(e.iri)>=0)&&(t.style.stroke="var(--primary-color-dark)",t.__data__.target.isTriple||t.setAttribute("refX","23"))}))}function we(e,t,n){let r=document.getElementsByClassName(e);r&&_.each(r,(function(e){let r=e.__data__;n?((r.source.iri.indexOf(n.iri)>=0||r.target.iri.indexOf(n.iri)>=0)&&(e.style.fill=t),W(n.iri)===H(r)&&(e.textContent=n.pred,e.style.fill=t),n.oppLinkIRI&&n.oppLinkIRI===H(r)&&(e.textContent=n.oppTriplePred,e.style.fill=t)):(e.style.fill=t,e.textContent=Ce(r))}))}function ke(){_.each(e.predicates,(function(e){let t=document.getElementById(e.linkId+e.nodeIndex);t&&(t.style.fontWeight="normal")}));let t=document.getElementsByClassName("link");t&&_.each(t,(function(e){e.style.stroke="#999",e.style.strokeWidth=1})),we("predicate",""),we("predicates","");let n=document.getElementsByClassName("arrow-marker");n&&_.each(n,(function(e){e.style.stroke="#999",e.__data__.target.isTriple||e.setAttribute("refX","59")}))}function Le(e){let t=W(e);if(J.tripleNodes.has(t))return J.tripleNodes.get(t).find(t=>t.iri===e)}function Ce(e){return e.predicates.length>1?e.predicates.length+" predicates":Te(e.predicates[0])}function Te(t){const n=e.replaceIRIWithPrefix(t);return n.length===t.length?t.split("/")[t.split("/").length-1]:n}e.toggleSidePanel=function(){e.pageslideExpanded=!e.pageslideExpanded},e.closeInfoPanel=function(){e.pageslideExpanded=!1,e.openedNodeInfoPanel=void 0,e.predicates=[],j=null,c((function(){e.showInfoPanel=!1}))},e.clickLink=function(t){if(J.tripleNodes.has(t.linkId)){ke();let n=J.tripleNodes.get(t.linkId)[t.nodeIndex];Ie(n),e.showPredicates=!0;let r=document.getElementById(t.linkId+t.nodeIndex);r&&(r.style.fontWeight="bold");let i={};const o=J.tripleLinksCopy.values();for(let e=0;e<J.tripleLinksCopy.size;e++){let 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=W(t.target.iri),i.oppTriplePred=Te(t.target.iri.split(" ")[1])),i.pred=Te(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=W(t.source.iri),i.oppTriplePred=Te(t.source.iri.split(" ")[1])),i.pred=Te(n.iri.split(" ")[1]),1===t.predicates.length&&(i.linkPred=t.predicates[0]),!1))}i.iri||(i.iri=n.iri,i.pred=Te(n.iri.split(" ")[1])),Se(i)}},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){ve();const t=10*(e?1:-1)*Math.PI/180,n=Math.cos(t),r=Math.sin(t);d3.selectAll(".node-wrapper").each((function(e){e.x=n*(e.x-500)+r*(e.y-500)+500,e.y=-r*(e.x-500)+n*(e.y-500)+500,e.fixed&&(e.fx=e.x,e.fy=e.y)})),ae.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,e.pushHistory(n,{uri:t,config:e.configLoaded})}e.$broadcast("onRootNodeChange",t)},e.saveOrUpdateGraph=function(){const t=JSON.stringify(J.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})};const be=function(t){S.editSavedGraph(t).success((function(){e.lastSavedGraphName=t.name,e.shared=t.shared,e.refreshSavedGraphs(),s.success(L.instant("graphexplore.saved.graph.was.edited",{name:t.name}))})).error((function(e){const t=getError(e);s.error(t,L.instant("graphexplore.error.cannot.edit"))}))};e.saveGraphModal=function(t,n,r){y.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}}}}).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),S.addNewSavedGraph(t).success((function(n,r,i){e.lastSavedGraphName=t.name,e.lastSavedGraphId=i()["x-saved-graph-id"],e.shared=t.shared,e.refreshSavedGraphs(),s.success(L.instant("graphexplore.saved.graph",{name:t.name}))})).error((function(n,r){if(422===r)e.saveGraphModal("new",t,!0);else{const e=getError(n);s.error(e,L.instant("graphexplore.error.cannot.create.graph"))}}))}(t.graph);break;case"update":case"rename":be(t.graph)}}))},e.refreshSavedGraphs=function(){S.getSavedGraphs().success((function(t){e.savedGraphs=t})).error((function(e){const t=getError(e);s.error(t,L.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),f.url("?saved="+t.id),J.restoreState(JSON.parse(t.data)),n||e.pushHistory({saved:t.id},{savedGraph:t})},e.copyToClipboardSavedGraph=function(e){D([location.protocol,"//",location.host,location.pathname,"?saved=",e.id].join(""))},e.deleteSavedGraph=function(t){m.openSimpleModal({title:L.instant("common.confirm"),message:L.instant("graphexplore.confirm.delete.graph",{graphName:t.name}),warning:!0}).result.then((function(){!function(t){S.deleteSavedGraph(t).success((function(){e.refreshSavedGraphs(),s.success(L.instant("graphexplore.saved.graph.was.deleted",{name:t.name}))})).error((function(e){const t=getError(e);s.error(t,L.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(){ve();const t=angular.isUndefined(e.numberOfPinnedNodes)||e.numberOfPinnedNodes<=0;e.numberOfPinnedNodes=0,d3.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)})),ae.alpha(1).restart()},$("body").on("keydown",(function(t){!C.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)}}function s(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&&t.close({graph:e.graph,mode:e.mode})},e.saveNew=function(){e.graph.name=e.graph.name+" (new)",t.close({graph:e.graph,mode:"new",restart:!0})},e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.graphexplore.controllers.graphviz",["ui.scroll.jqlite","ui.scroll","toastr","ui.bootstrap","ngTagsInput","graphdb.framework.utils.localstorageadapter"]).controller("GraphsVisualizationsCtrl",a).controller("SaveGraphModalCtrl",s).config(["$uibTooltipProvider",function(e){e.options({appendToBody:!0})}]),a.$inject=["$scope","$rootScope","$repositories","$licenseService","toastr","$timeout","$http","ClassInstanceDetailsService","AutocompleteRestService","$q","$location","$jwtAuth","UiScrollService","ModalService","$uibModal","$window","LocalStorageAdapter","LSKeys","SavedGraphsRestService","GraphConfigRestService","RDF4JRepositoriesRestService","$translate","GuidesService"],s.$inject=["$scope","$uibModalInstance","data","$translate"]},309:function(e,t,n){var r,i;r=[n(313)],void 0===(i=function(){function e(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 t(e,t){for(var n in t)e.attr(n,t[n]);return e}return"undefined"==typeof d3&&(d3=n(313)),d3.selection.prototype.attrs=function(n){return("function"==typeof n?e:t)(this,n)},d3.selection.prototype.moveToFront=function(){return this.each((function(){d3.select(this.parentNode.appendChild(this))}))},d3.selection.prototype.moveToBack=function(){return this.each((function(){const e=this.parentNode.firstChild;e&&this.parentNode.insertBefore(this,e)}))},d3}.apply(t,r))||(e.exports=i)},316:function(e,t,n){"use strict";n(309);var r=r||{};r.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}}}(),r.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)}},r.Click=function(){const e=function(e,n){let r,i=1,o=arguments.length;for(;++i<o;)r=arguments[i],e[r]=t(e,n,n[r]);return e};function t(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}return{delayDblClick:function(){var t=d3.dispatch("click","dblclick");return e((function(e){var n,r=null;e.on("mousedown",(function(){n=d3.pointer(document.body),+new Date})),e.on("mouseup",(function(e,i){var o,a,s;(a=n,s=d3.pointer(document.body),Math.sqrt(Math.pow(a[0]-s[0],2),Math.pow(a[1]-s[1],2))>5)||(r?(window.clearTimeout(r),r=null,t.call("dblclick",e,e,i)):r=window.setTimeout((o=e,function(){t.call("click",o,o,i),r=null}),250))}))}),t,"on")}}}(),t.a=r},318:function(e,t,n){"use strict";t.a=function(){var e=function(){return"n"},t=function(){return[0,0]},n=function(){return" "},r=u(),i=null,o=null,a=null,s=null;function c(e){var t;i="svg"===(t=(t=e).node()).tagName.toLowerCase()?t:t.ownerSVGElement,o=i.createSVGPoint(),document.body.appendChild(r)}c.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),u=t.apply(this,r),f=e.apply(this,r),h=p(),g=d.length,m=document.documentElement.scrollTop||document.body.scrollTop,y=document.documentElement.scrollLeft||document.body.scrollLeft,x=s.apply(this,r);for(h.html(o).style("opacity",1).style("pointer-events","all");g--;)h.classed(d[g],!1);const v=r.filter(e=>e instanceof Event);return i=l.get(f).apply(this,v),x?Object.keys(x).forEach((function(e){h.style(e,x[e])})):h.classed(f,!0).style("top",i.top+u[0]+m+"px").style("left",i.left+u[1]+y+"px"),c},c.hide=function(){return p().style("opacity",0).style("pointer-events","none"),c},c.attr=function(e,t){if(arguments.length<2&&"string"==typeof e)return p().attr(e);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.attr.apply(p(),n),c},c.style=function(e,t){if(arguments.length<2&&"string"==typeof e)return p().style(e);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.style.apply(p(),n),c},c.direction=function(t){return arguments.length?(e=null==t?t:h(t),c):e},c.offset=function(e){return arguments.length?(t=null==e?e:h(e),c):t},c.html=function(e){return arguments.length?(n=null==e?e:h(e),c):n},c.customPosition=function(e){return arguments.length?(s=null==e?e:h(e),c):s},c.destroy=function(){return r&&(p().remove(),r=null),c};var l=new Map(Object.entries({n:function(e){var t=f(e);return{top:t.n.y-r.offsetHeight,left:t.n.x-r.offsetWidth/2}},s:function(e){var t=f(e);return{top:t.s.y,left:t.s.x-r.offsetWidth/2}},e:function(e){var t=f(e);return{top:t.e.y-r.offsetHeight/2,left:t.e.x}},w:function(e){var t=f(e);return{top:t.w.y-r.offsetHeight/2,left:t.w.x-r.offsetWidth}},nw:function(e){var t=f(e);return{top:t.nw.y-r.offsetHeight,left:t.nw.x-r.offsetWidth}},ne:function(e){var t=f(e);return{top:t.ne.y-r.offsetHeight,left:t.ne.x}},sw:function(e){var t=f(e);return{top:t.sw.y,left:t.sw.x-r.offsetWidth}},se:function(e){var t=f(e);return{top:t.se.y,left:t.e.x}}})),d=l.keys();function u(){var e=d3.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 p(){return null===r&&(r=u(),document.body.appendChild(r)),d3.select(r)}function f(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(),s=i.width,c=i.height,l=i.x,d=i.y;return o.x=l,o.y=d,n.nw=o.matrixTransform(r),o.x+=s,n.ne=o.matrixTransform(r),o.y+=c,n.se=o.matrixTransform(r),o.x-=s,n.sw=o.matrixTransform(r),o.y-=c/2,n.w=o.matrixTransform(r),o.x+=s,n.e=o.matrixTransform(r),o.x-=s/2,o.y-=c/2,n.n=o.matrixTransform(r),o.y+=c,n.s=o.matrixTransform(r),n}function h(e){return"function"==typeof e?e:function(){return e}}return c}},67:function(e,t,n){"use strict";n.r(t),n.d(t,"STATIC_RULESETS",(function(){return r})),n.d(t,"REPOSITORY_TYPES",(function(){return i})),n.d(t,"FILENAME_PATTERN",(function(){return o})),n.d(t,"NUMBER_PATTERN",(function(){return a}));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-_]+$"),a=new RegExp("^[0-9]+$")}}]);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[24,138],{105:function(e,t,n){"use strict";n.r(t);n(7);var r=n(316),i=n(318),o=(n(10),n(67));function a(e,t,n,a,s,c,l,d,u,p,f,h,g,m,y,x,v,I,S,w,k,L,C){e.languageChanged=!1,e.propertiesObj={},e.propertiesQueryObj={},e.propertiesObj.items=[],e.propertiesNotFiltered=[],e.searchVisible=!1,e.nodeSelected=!1,e.queryResultsMode=!1,e.embedded=f.search().embedded,e.openedNodeInfoPanel=void 0,e.invalidLimit=!1,e.INVALID_LINKS_MSG=L.instant("sidepanel.invalid.limit.links.msg"),e.INVALID_LINKS_TOOLTIP=L.instant("sidepanel.invalid.limit.links.tooltip"),t.$on("$translateChangeSuccess",(function(){e.INVALID_LINKS_MSG=L.instant("sidepanel.invalid.limit.links.msg"),e.INVALID_LINKS_TOOLTIP=L.instant("sidepanel.invalid.limit.links.tooltip"),e.propertiesSearchPlaceholder=L.instant("visual.search.instance.placeholder")})),e.onopen=e.onclose=()=>angular.noop(),e.embedded&&(f.search().query||f.search().uri||f.search().config||f.search().saved)&&(e.noGoHome=!0);const T={};let b=0,N=0,P={},A=0;var M,E=d3.zoom().scaleExtent([.5,10]),G=d3.zoomIdentity.translate(0,-70).scale(1);E.on("zoom",(function(e){C.isActive()||(O=e.transform,M.attr("transform",O))}));let O=G;let R,j;function z(){return C.isActive()?e.defaultSettings:e.saveSettings}function D(e){m.openCopyToClipboardModal(e)}function F(){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}}))}t.key="",T.get=function(t,n,r){return g.initLazyList(t,n,r,b,e.propertiesObj.items)},t.$watch((function(){return t.key}),(function(){b=0,_.each(e.propertiesObj.items,(function(e){t.key>e&&b++})),N++})),T.revision=function(){return N},e.datasource=T,e.adapterContainer={adapter:{remain:!0}},e.propertiesQueryObj.query="",e.propertiesSearchPlaceholder=L.instant("visual.search.instance.placeholder"),e.propertiesFilterFunc=function(t){return t.key.toLowerCase().indexOf(e.propertiesQueryObj.query.toLowerCase())>=0},e.resetState=function(){e.searchVisible=!1,e.nodeSelected=!1,e.configLoaded=null,e.queryResultsMode=!1,e.lastSavedGraphName=null,e.lastSavedGraphId=null,e.shared=!1,e.numberOfPinnedNodes=0,P={},A=0},e.pushHistory=function(t,n){e.embedded&&(t.embedded=!0),f.search(t),f.state(n)},e.goToHome=function(){e.resetState(),f.url("graphs-visualizations")},e.shouldShowSettings=function(){return e.configLoaded&&e.configLoaded.id===e.defaultGraphConfig.id},e.shouldDisableSameAs=function(){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.$watch("propertiesObj.items",(function(){angular.isDefined(e.propertiesObj.items)&&e.propertiesObj.items.length>0&&c((function(){e.adapterContainer.adapter.reload()}),500)})),e.toggleMoreInfo=function(e){angular.element(e.currentTarget).parent().next().toggle(200),angular.element(e.currentTarget).children("span").toggleClass("icon-caret-down").toggleClass("icon-caret-up")},e.copyToClipboard=D,e.defaultSettings={linksLimit:20,includeInferred:!0,sameAsState:!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),p.when(h.getPrincipal()).then(t=>function(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=v.get(I.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(t){e.saveSettings=_.cloneDeep(e.defaultSettings),v.set(I.GRAPHS_VIZ,e.saveSettings)}else e.saveSettings=_.cloneDeep(e.defaultSettings)}(t)),e.resetSettings=function(){e.settings=_.cloneDeep(e.defaultSettings),e.validateLinksLimit(),F()},e.changeLimit=function(t){let n=e.settings.linksLimit+t;n<1&&(n=1),n>1e3&&(n=1e3),e.settings.linksLimit=n},e.validateLinksLimit=function(){e.invalidLimit=!o.NUMBER_PATTERN.test(e.settings.linksLimit)},e.showSettings=function(){e.showInfoPanel=!0,e.showFilter=!0,e.showNodeInfo=!1,e.showPredicates=!1,e.saveSettings?e.settings=_.cloneDeep(e.saveSettings):e.settings=_.cloneDeep(e.defaultSettings),F()},e.reExpandNode=function(){e.rootNodeIri&&e.$broadcast("onRootNodeChange",e.rootNodeIri)};const B=function(t,n,r){const i=z(),o=void 0===n?i.sameAsState:!0===n,a=void 0===r?i.includeInferred:!0===r;e.loading=!0,l({url:"rest/explore-graph/graph",method:"POST",headers:{"Content-Type":"application/json"},data:{query:t,linksLimit:i.linksLimit,languages:e.shouldShowSettings()?i.languages:[],includeInferred:a,sameAsState:o}}).then((function(e){me(e)}),(function(t){e.loading=!1,s.error(getError(t.data),L.instant("graphexplore.error.cannot.load.graph"))}))};function U(e){return e.replace(/[()']/g,"")}function W(e,t){let n=e.split(" ");return t?[n[0],n[1],n[2]].join(">"):[n[0],n[2]].join(">")}function H(e){return[e.source.iri,e.target.iri].join(">")}function V(e){if(e.isTriple){let t=document.getElementById(U(W(e.iri)));if(t&&void 0!==t.__data__.x)return t.__data__.x}return e.x}function q(e){if(e.isTriple){let t=document.getElementById(U(W(e.iri)));if(t&&void 0!==t.__data__.y)return t.__data__.y}return e.y}function K(e){let t=e.trim().split(" ");return`<<<${t[0]}> <${t[1]}> <${t[2]}>>>`}function Z(e){return U(`${e.source.isTriple?W(e.source.iri,!0):e.source.iri}>${e.target.isTriple?W(e.target.iri,!0):e.target.iri}>marker`)}function Q(){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?Le(e.source):_.find(t,(function(t){return t.iri===e.source})),r=e.isTripleTarget?Le(e.target):_.find(t,(function(t){return t.iri===e.target}));let i={source:n,target:r,predicates:e.predicates};if(e.isTripleSource||e.isTripleTarget){let e=`${i.source.isTriple?W(i.source.iri):i.source.iri}>${i.target.isTriple?W(i.target.iri):i.target.iri}`;if(J.tripleLinksCopy.has(e)){let t=J.tripleLinksCopy.get(e);return t[0].predicates.push(...i.predicates),t.push(i),J.tripleLinksCopy.set(e,t),null}J.tripleLinksCopy.set(e,[i])}return i}))}(e,t));for(let e of J.tripleLinksCopy.keys())1===J.tripleLinksCopy.get(e).length&&J.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){let t=[];this.tripleNodes.size>0&&e.forEach(e=>{this.tripleNodes.has(e)&&(this.tripleNodes.delete(e),this.links=_.reject(this.links,(function(n){let r=e.split(">"),i=W(n.source.iri),o=W(n.target.iri);if(i===e&&J.tripleNodes.delete(o)){let e=o.split(">");t.push({source:e[0],target:e[1]})}let a=i===e||o===e||n.source.iri===r[0]&&n.target.iri===r[1];return a&&(J.tripleLinksCopy.delete(`${i}>${o}`),J.tripleLinksCopy.delete(`${o}>${i}`)),a})))}),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){let r=[];this.links=_.reject(this.links,(function(e){let t=e.source.iri===n.iri||e.target.iri===n.iri;return t&&(e.target.isTriple&&r.push(W(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){let r=[],i=this.links;this.links=_.reject(this.links,(function(o){let a=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(!a){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;a=(r[0].source.iri===e.iri||r[0].target.iri)&&(r[1].source.iri===e.iri||r[1].target.iri)}return a&&(o.target.isTriple&&r.push(W(o.target.iri)),o.source.isTriple||o.target.isTriple||r.push([o.source.iri,o.target.iri].join(">"))),a})),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;let r=W(e.iri);if(this.tripleNodes.has(r)){let 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}})),tripleNodes:t,tripleLinksCopy:n,colorIndex:A,type2color:P,transform:O}},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)&&(A=t.colorIndex,P=_.cloneDeep(t.type2color)),angular.isDefined(t.transform)&&(O=d3.zoomIdentity.translate(t.transform.x,t.transform.y).scale(t.transform.k)),ue()}}e.updateSettings=function(){e.invalidLimit?s.error(e.INVALID_LINKS_TOOLTIP,e.INVALID_LINKS_MSG):(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})),e.rootNodeIri?e.reExpandNode(e.rootNodeIri):e.queryResultsMode&&f.search().query?B(f.search().query,f.search().sameAs,f.search().inference):"query"===e.configLoaded.startMode&&e.loadGraphConfig(e.configLoaded),z().showLinksText?d3.selectAll("svg .link-wrapper text").style("display","block"):d3.selectAll("svg .link-wrapper text").style("display","none"),e.showInfoPanel=!1,e.showFilter=!1,v.set(I.GRAPHS_VIZ,e.saveSettings))},e.showInfoPanel=!1;let J=new Q;e.defaultGraphConfig={id:"default",name:"Easy graph",startMode:"search"},e.getGraphConfigs=function(t){w.getGraphConfigs().success((function(n){e.graphConfigs=n,t&&t()})).error((function(e){s.error(getError(e),L.instant("graphexplore.error.graph.configs.short.msg"))}))},e.loadConfigForId=function(t,n){t===e.defaultGraphConfig.id?e.loadGraphConfig(e.defaultGraphConfig):w.getConfig(t).success((function(t){e.loadGraphConfig(t),n()})).error((function(e){s.error(getError(e),L.instant("graphexplore.error.could.not.load.config",{configId:t}))}))},e.findConfigById=function(t){return t===e.defaultGraphConfig.id?e.defaultGraphConfig:$.grep(e.graphConfigs,(function(e){return e.id===t}))[0]},e.easyGraphSearch=function(t){e.configLoaded=e.defaultGraphConfig,e.openUri(t)},e.loadGraphConfig=function(t){e.configLoaded=t,"search"===t.startMode?e.searchVisible=!0:"node"===t.startMode&&t.startIRI?c((function(){e.openUri(t.startIRI,!0)}),0):"query"===t.startMode&&t.startGraphQuery&&(e.loading=!0,w.loadGraphForConfig(t,t.startQueryIncludeInferred,z().linksLimit,t.startQuerySameAs).then((function(e){me(e)}),(function(t){e.loading=!1,s.error(getError(t),L.instant("graphexplore.error.graph.load"))})))},e.deleteConfig=function(t){m.openSimpleModal({title:L.instant("common.confirm"),message:L.instant("graphexplore.delete.graph",{configName:t.name}),warning:!0}).result.then((function(){w.deleteGraphConfig(t).success((function(){e.getGraphConfigs(),e.refreshSavedGraphs()})).error((function(e){s.error(getError(e),L.instant("graphexplore.error.cannot.delete.config"))}))}))},e.goToGraphConfig=function(t){e.pushHistory({config:t.id},{config:t}),e.resetState(),e.loadGraphConfig(t)},x.onpopstate=function(t){e.resetState(),t.state&&(t.state.config?(e.loadGraphConfig(t.state.config),t.state.uri&&e.openUri(t.state.uri,!0)):t.state.savedGraph&&e.loadSavedGraph(t.state.savedGraph,!0))};const Y=function(){f.search().query?(e.searchVisible=!1,e.queryResultsMode=!0,B(f.search().query,f.search().sameAs,f.search().inference)):e.$on("onRootNodeChange",(function(t,n){e.loading=!0;const r=z();angular.isDefined(n)&&(e.rootNodeIri=n,l({url:"rest/explore-graph/node",method:"GET",params:{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"),J=new Q;const n=J.addNode(t.data,500,500);O=G,xe(n,!0)})).catch((function(t){e.loading=!1,s.error(getError(t),L.instant("graphexplore.error.could.not.load.graph"))})))})),f.search().uri&&e.openUri(f.search().uri,!0),f.search().saved&&S.getSavedGraph(f.search().saved).success((function(t){e.loadSavedGraph(t)})).error((function(e){const t=getError(e);s.error(t,L.instant("graphexplore.error.could.not.open"))}))},X=function(){f.search().config?e.loadConfigForId(f.search().config,Y):f.search().query||f.search().uri?(e.loadGraphConfig(e.defaultGraphConfig),Y()):Y()};function ee(t){!n.getActiveRepository()||e.hasInitedRepository&&!t||(e.hasInitedRepository=!0,t||e.getGraphConfigs(X),e.getNamespacesPromise=k.getNamespaces(e.getActiveRepository()).success((function(t){const n=_.map(t.results.bindings,(function(e){return{uri:e.namespace.value,prefix:e.prefix.value}}));e.namespaces=_.sortBy(n,(function(e){return e.uri.length})),te()})).error((function(e){s.error(getError(e),L.instant("graphexplore.error.view.will.not.work"))})))}function te(){a.isLicenseValid()&&(e.getAutocompletePromise=u.checkAutocompleteStatus())}e.replaceIRIWithPrefix=function(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},e.addedTag=function(t){return t.text.indexOf(":")<0?(s.warning(L.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=d.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?s.warning(L.instant("graphexplore.absolute.prefixed.iri.option"),t):s.warning(L.instant("graphexplore.absolute.prefixed.iri"),t),!1;const r=e.text.indexOf("*");if(r>=0){if(!n)return s.warning(L.instant("graphexplore.wildcards.not.allowed"),t),!1;if(r<e.text.length-1)return s.warning(L.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 a.isLicenseValid()},e.hasInitedRepository=!1,e.$on("autocompleteStatus",(function(){te()})),e.$on("repositoryIsSet",(function(t,n){n.newRepo&&(e.hasInitedRepository=!1),ee(n.newRepo),n.newRepo&&(e.resetState(),$(".graph-visualization svg").empty(),f.search().query&&(e.goToHome(),Y()))})),ee();const ne=d3.scaleLinear().domain([0,9]).range(["hsl(0, 100%, 75%)","hsl(360, 90%, 82%)"]).interpolate(d3.interpolateHslLong),re=d3.scaleLinear().domain([0,9]).range(["hsl(180, 50%, 75%)","hsl(540, 40%, 82%)"]).interpolate(d3.interpolateHslLong);e.getColor=function(e){angular.isUndefined(P[e])&&(P[e]=A,A++);const t=P[e];return t>39?"#c2c2c2":t%2==0?ne(t/2):re(t/2)};const ie=d3.forceX(500).strength(.005),oe=d3.forceY(500).strength(.005),ae=d3.forceSimulation().force("x",ie).force("y",oe),se=d3.select(".main-container .graph-visualization").append("svg").attr("viewBox","0 0 1000 1000").attr("preserveAspectRatio","xMidYMid meet");se.append("rect").attr("width",1e4).attr("height",1e4).attr("x",-4500).attr("y",-4500).style("fill","none").style("pointer-events","all").call(E).on("click",(function(e){e.stopPropagation(),ve(),ae.stop()}));let ce=0,le=0;const de=new function(){this.state=!1,this.setLoadingState=function(e){this.state=e},this.getLoadingState=function(){return this.state},this.init=function(e,t){d3.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"),d3.select(t).append("image").attr("xlink:href","js/angular/templates/loader/ot-loader.svg?v=2.5.1-TR1").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 ue(t){d3.selectAll("svg g").remove(),d3.selectAll(".d3-tip").remove(),d3.selectAll(".menu-events").remove(),M=se.append("g").attr("class","nodes-container").attr("transform",(function(){return angular.isDefined(O)&&!t?O:""}));const n=Object(i.a)().attr("class","d3-tip").customPosition((function(){const e=R.getBoundingClientRect();return{top:e.bottom+10+"px",left:e.left-30+"px"}})).html((function(t){let n="";return t.fixed&&(n+='<i class="icon-pin"></i>&nbsp;&nbsp;'),t.types.length>0?n+=_.join(_.map(t.types,(function(t){return e.replaceIRIWithPrefix(t)}))," · "):n+="<i>No types</i>",n})),o=function(e){let t="";return t+=_.join(_.map(e.predicates,(function(t,n){if(0===n)return Te(t);if(n<10)return" · "+Te(t);if(10===n){const t=function(e){return e.predicates.length-10}(e),n=t>1?t+" predicates":t+" predicate";return" · "+L.instant("graphexplore.tip.text",{textToShow:n})}})),""),t};let a;const l=Object(i.a)().attr("class","d3-tip").customPosition((function(e){const t=a.getBoundingClientRect(),n=function(e){const t=o(e),n=document.createElement("canvas").getContext("2d");return n.font="13px Arial",e.predicates.length<10?n.measureText(t).width:n.measureText(t).width/2}(e);return{top:t.top-30+"px",left:t.left-30+"px",width:n+"px"}})).html((function(e){return o(e)}));const d=function(){c.cancel(void 0),c.cancel(ce),R=null,n.hide(),le=c((function(){ve()}),500)};se.call(n);se.call(l);let u=se.selectAll(".link"),p=se.selectAll(".node");const f=d3.forceCollide(e=>e.size+5).strength(.5),h=d3.forceManyBody().strength(-300),g=d3.forceCenter(500,500);ae.nodes(J.nodes).force("charge",h).force("collide",f).force("center",g).force("link",d3.forceLink(J.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}))),M.append("defs").selectAll("marker").data(J.links).enter().append("marker").attr("class","arrow-marker").attr("id",(function(e){return Z(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"),u=M.selectAll(".link").data(J.links).enter().append("g").attr("class","link-wrapper").attr("id",(function(e){return U(H(e))})).append("line").attr("class","link").style("stroke-width",1).style("fill","transparent").style("marker-end",(function(e){return`url(#${Z(e)})`}));const m=M.selectAll(".link-wrapper").append("text").text((function(e){return Ce(e)})).attr("class",(function(e){return e.predicates.length>1||J.tripleNodes.has(H(e))?"predicates":"predicate"})).attr("dy","-0.5em").style("text-anchor","middle").style("display",z().showLinksText?"":"none").on("mouseover",(function(e,t){e.stopPropagation(),function(e,t){c.cancel(void 0);const n=a=e.target;c((function(){a===n&&t.predicates.length>1&&l.show(t,a)}),300)}(e,t)})).on("mouseout",(function(){c.cancel(void 0),a=null,l.hide()})).on("click",(function(t,n){t.stopPropagation(),function(t,n){ke();let r=H(n);if(1===n.predicates.length&&J.tripleNodes.has(r)){j=null;let e=J.tripleNodes.get(r)[0];if(he(e,this,t.button)){let t={};t.iri=e.iri,t.pred=Te(e.iri.split(" ")[1]),Se(t)}return}!function(t){if(e.showNodeInfo=!1,e.showPredicates=t.predicates.length>1,e.showFilter=!1,e.showInfoPanel=!1,j===t)return e.showNodeInfo=!1,e.showInfoPanel=!1,void(j=null);j=t,e.showPredicates&&(e.predicates=_.map(t.predicates,(function(e){let n=function(e,t){let n=H(t);return J.tripleNodes.has(n)?J.tripleNodes.get(n).findIndex(t=>t.iri.indexOf(e)>=0):-1}(e,t),r=n>-1;return{value:Te(e),partOfTriple:r,linkId:r?H(t):"",nodeIndex:n}})),e.showInfoPanel=!0)}(n)}(t,n)}));let y,x=0,v=null,I=null;const S=function(t,n,r){let i=r||this.parentNode;Array.isArray(r)&&(i=r[n]);J.countLinks(t,J.links)<=z().linksLimit?xe(t,!1,i):s.info(L.instant("graphexplore.increase.limit"),L.instant("graphexplore.node.at.max")),e.closeInfoPanel()};function w(e,t){let n,r,i,o,a=!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,a=!1}let s=M.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=s),a&&(s=s.transition().duration(1e3).style("font-size",(function(){return r+"px"})).attr("opacity",o),"down-fixed"!==t&&s.remove())}const k=d3.drag().subject((function(e){return e})).on("start",(function(e,t){if(C.isActive())return;0===e.sourceEvent.button&&(t.fixedBeforeDrag=t.fixed,t.isBeingDragged=!0,t.beginDragging=!0,ve(),d3.select(this).classed("dragging",!0),ae.alphaTarget(.3).restart())})).on("drag",(function(t,n){n.isBeingDragged&&(n.fx=t.x,n.fy=t.y,n.fixed?n.beginDragging&&w(n,"fixed"):(e.numberOfPinnedNodes++,n.fixed=!0,w(n,"down-fixed")),n.pinWasFixed=!0,n.beginDragging=null)})).on("end",(function(e,t){t.isBeingDragged&&(t.pinWasFixed&&(t.pinWasFixed=null,d3.select(".pinned").remove()),t.isBeingDragged=!1,d3.select(this).classed("dragging",!1));ae.alphaTarget(0)}));p=M.selectAll(".node").data(J.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,r){r.isBeingDragged||(c.cancel(le),ce=c(()=>{(function(t,n){if(e.showInfoPanel)return!1;(fe.closeIcon||fe.expandIcon||fe.focusIcon||fe.copyURIIcon)&&fe.removeIcons();if(ae.alpha()<.1)return fe.initIcons(t,n.parentNode),ae.stop(),pe(),!0;return!1})(r,this)&&function(e,t){c.cancel(void 0);const r=R=t.target;c((function(){R===r&&n.show(e,R)}),300)}(r,t)},400))})).on("mouseout",d).on("click",(function(t,n){if(t.button&&0!==t.button)return;const r=this;if(v&&I===r)return c.cancel(v),v=null,void S(n,0,r.parentNode);I=r,d(),e.showPredicates=!1,C.isActive()||(c.cancel(v),v=c((function(){he(n,r,t),v=null}),540))})).on("touchstart",(e,t)=>function(e){x=0,y=c((function(){x<5&&ge(e),y=null}),1e3)}(t)).on("touchmove",(function(){x++})).on("touchend",(function(){c.cancel(y),y=null})).on("contextmenu",(function(t,r){t.shiftKey||(t.preventDefault(),ve(),e.closeInfoPanel(),r.fixed?(e.numberOfPinnedNodes--,r.fixed=!1,r.fx=null,r.fy=null,w(r,"up"),ae.alpha(1).restart()):(e.numberOfPinnedNodes++,r.fixed=!0,w(r,"down")),function(e){R&&n.show(e,R)}(r))})).on("gdb-expand-node",(e,t)=>S(t,0,e.srcElement.parentNode)).on("gdb-show-node-info",(e,t)=>Ie(t)).call(k);const T=M.selectAll(".node-wrapper").append("foreignObject").style("pointer-events","none").attr("width",(function(e){return 2*e.size*1.75}));M.insert("g").attr("class","menu-events"),function(e){e.each((function(e){e.fontSize=r.a.Text.calcFontSizeRaw(e.labels[0].label,e.size,16,!0)})).attr("height",(function(e){return 3*e.fontSize})).append("xhtml:div").attr("class","node-label-body").style("font-size",(function(e){return e.fontSize+"px"})).append("xhtml:div").text((function(e){return e.labels[0].label})),c((function(){$(".node-label-body div").each((function(e,t){let n=t.textContent.substring(0,t.textContent.length-1);let r=0;for(;r<200&&(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)n=n.substring(0,n.length-1),t.textContent=n+"…",r++}))}),50)}(T),ae.on("tick",(function(){u.attr("x1",(function(e){return V(e.source)})).attr("y1",(function(e){return q(e.source)})).attr("x2",(function(e){return V(e.target)})).attr("y2",(function(e){return q(e.target)})),m.attr("x",(function(e){let t=V(e.source),n=V(e.target);return e.x=.5*(t+n)})).attr("y",(function(e){let t=q(e.source),n=q(e.target);return e.y=.5*(t+n)})).attr("transform",(function(e){return"rotate("+function(e,t){const n={x:V(e.source),y:q(e.source)},r={x:V(e.target),y:q(e.target)};if(t)return 180*Math.atan2(r.y-n.y,r.x-n.x)/Math.PI;{const e=180*Math.atan2(r.y-n.y,r.x-n.x)/Math.PI;return e<=90&&e>=-90?e:(e>0?-1:1)*(180-Math.abs(e))}}(e,e.direction)+", "+e.x+", "+e.y+")"})),p.attr("cx",(function(e){return e.x})).attr("cy",(function(e){return e.y})),M.select(".node-loader").attr("x",(function(e){return e.x-e.size+3})).attr("y",(function(e){return e.y-e.size})),M.select(".loader-container").attr("cx",(function(e){return e.x})).attr("cy",(function(e){return e.y})),T.attr("x",(function(e){return e.x-1.75*e.size})).attr("y",(function(e){return e.y-3*e.fontSize/2})),d3.select(".pinned").attr("x",(function(e){return e.x})).attr("y",(function(e){return e.y})),pe()})),angular.isDefined(de)&&de.setLoadingState(!1),e.loading&&(e.loading=!1),d3.selectAll(".link-wrapper").each((function(){const e=$(this).attr("id").split(">")[0],t=$(this).attr("id").split(">")[1];d3.selectAll(".link").each((function(n){let r=U(n.source.iri),i=U(n.target.iri);if(r===t&&i===e){let e=r;e+=">",e+=i;const t=document.createTextNode(" ⟶");document.getElementById(e).lastChild.appendChild(t),n.direction="double"}}))})),d3.selectAll(".d3-actions-tip").remove(),ae.alpha(.3).restart()}function pe(){t.d3alpha=ae.alpha()}const fe=new function(){function e(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(n,r){const o=Object(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}));se.call(o);n.isExpanded?(this.collapseIcon=d3.select(".menu-events").append("g").attr("class","collapse-icon").attr("name","collapse").attr("transform",(function(){return e(20,n)})),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(--primary-color)"),this.collapseIcon.on("click",(function(){var e;(e=n).isExpanded=!1,J.removeNodeLeafLinks(e),ue()})).on("mouseover",(function(e){o.show(this.getAttribute("name"),e),c.cancel(ce),c.cancel(le)})).on("mouseout",(function(){o.hide(),le=c((function(){ve()}),500)}))):(this.expandIcon=d3.select(".menu-events").append("g").attr("class","expand-icon").attr("name","expand").attr("transform",(function(){return e(20,n)})),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(--primary-color)"),this.expandIcon.on("click",(function(){xe(n,!1,r)})).on("mouseover",(function(e){o.show(this.getAttribute("name"),e),c.cancel(le),c.cancel(ce)})).on("mouseout",(function(){o.hide(),le=c((function(){ve()}),500)}))),this.focusIcon=d3.select(".menu-events").append("g").attr("class","focus-icon").attr("name","focus").attr("transform",(function(){return e(20,n)})),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(--primary-color)"),this.focusIcon.on("click",(function(){t.$broadcast("onRootNodeChange",n.iri)})).on("mouseover",(function(e){o.show(this.getAttribute("name"),e),c.cancel(le),c.cancel(ce)})).on("mouseout",(function(){o.hide(),le=c((function(){ve()}),500)})),this.copyURIIcon=d3.select(".menu-events").append("g").attr("class","icon-link").attr("name","link").attr("transform",(function(){return e(20,n)})),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(--primary-color)"),this.copyURIIcon.on("click",(function(){D(n.iri),ve(),o.hide()})).on("mouseover",(function(e){o.show("<div style='text-align: center;'><b>Copy to ClipBoard</b><br>"+n.iri+"</div>",e),c.cancel(le),c.cancel(ce)})).on("mouseout",(function(){o.hide(),le=c((function(){ve()}),500)})),this.closeIcon=d3.select(".menu-events").append("g").attr("class","close-icon").attr("name","remove").attr("transform",(function(){return e(20,n)})),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(--primary-color)"),this.closeIcon.on("click",(function(){ge(n)})).on("mouseover",(function(e){o.show(this.getAttribute("name"),e),c.cancel(le),c.cancel(ce)})).on("mouseout",(function(){o.hide(),le=c((function(){ve()}),500)})),this.animateMenu(n)},this.animateMenu=function(t){const n=d3.easeSin;let r=0;let i=20;this.expandIcon&&this.expandIcon.transition().duration(100).style("opacity",1).ease(n).attr("transform",(function(){return e(i,t)})).delay(r+=35),this.collapseIcon&&this.collapseIcon.transition().duration(100).style("opacity",1).ease(n).attr("transform",(function(){return e(i,t)})).delay(r+=35),this.copyURIIcon.transition().duration(100).style("opacity",1).ease(n).attr("transform",(function(){return i+=30,e(i,t)})).delay(r+=35),this.focusIcon.transition().duration(100).style("opacity",1).ease(n).attr("transform",(function(){return i+=30,e(i,t)})).delay(r+=35),this.closeIcon.transition().duration(100).style("opacity",1).ease(n).attr("transform",(function(){return i+=30,e(i,t)})).delay(r+=35),this.expandedState=!0}};function he(n,r,i){return 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?(ge(n),!1):void 0!==e.openedNodeInfoPanel&&e.openedNodeInfoPanel===n?(e.pageslideExpanded=!1,e.openedNodeInfoPanel=void 0,!1):(Ie(n),!0)}function ge(e){J.removeNode(e),ue()}function me(t){!function(t){e.nodeSelected=!0,null===t.data.types&&(t.data.types="greyColor"),J=new Q,O=G}(t),ye(t)}function ye(t,n,r){let i=t.data;i=_.filter(i,(function(e){return-1===_.findIndex(J.links,(function(t){return e.source===t.source.iri&&e.target===t.target.iri}))}));let o=[];const a=J.tripleLinksCopy.values();for(let e=0;e<J.tripleLinksCopy.size;e++){a.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 c=function(e,t){let n=t.map((function(t){return t[e]}));return t.filter((function(t,r){return n.indexOf(t[e])===r}))}("iri",_.union(_.flatten(_.map(t.data,(function(e){return[{iri:e.source,isTriple:e.isTripleSource},{iri:e.target,isTriple:e.isTripleTarget}]}))))),d=_.map(J.nodes,(function(e){return{iri:e.iri,isTriple:Boolean(e.isTriple)}})),u=J.tripleNodes.values();for(let e=0;e<J.tripleNodes.size;e++){u.next().value.forEach(e=>{d.push({iri:e.iri,isTriple:e.isTriple})})}const f=_.reject(c,(function(e){return _.some(d,e)}));if(0===f.length)(r||0===i.length)&&s.info(L.instant("graphexplore.error.node.connections")),J.addAndMatchLinks(i),ue();else{const t=[],r=[],o=z();_.forEach(f,(function(n,i){t.push(l({url:"rest/explore-graph/node",method:"GET",params:{iri:n.isTriple?K(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})))})),p.all(t).then((function(){_.forEach(r,(function(e,t){const i=2*Math.PI*t/r.length,o=(n?n.x:0)+1e3*Math.cos(i)/3,a=(n?n.y:0)+1e3*Math.sin(i)/3;e.isTriple?J.addTriple(e,o,a):J.addNode(e,o,a)})),J.addAndMatchLinks(i),n&&(n.isExpanded=!0),ue()}))}}function xe(t,n,r){if(de.getLoadingState())return;de.init(t,r);const i=z(),o=t.iri;l({url:"rest/explore-graph/links",method:"GET",params:{iri:o,linksLimit:i.linksLimit,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);s.error(n,L.instant("graphexplore.error.exploring.node")),e.loading=!1,de.setLoadingState(!1)}))}function ve(){angular.isDefined(fe)&&fe.expandedState&&fe.removeIcons()}function Ie(t){ae.stop(),e.openedNodeInfoPanel=t,e.showNodeInfo=!0,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(K(t.iri)):encodeURIComponent(t.iri),e.showInfoPanel=!0,e.rdfsLabel=t.labels[0].label,e.rdfsComment=t.comment,e.expanded=!1,e.propertiesQueryObj.query="",e.dataNodeKeysQuery="";const n=z();l.get("rest/explore-graph/properties",{params:{iri:t.isTriple?K(t.iri):t.iri,config:e.configLoaded.id,languages:e.shouldShowSettings()?n.languages:[],includeInferred:n.includeInferred,sameAsState:n.sameAsState,rejectedPredicates:e.shouldShowSettings()?n.rejectedPredicates:[]}}).then((function(t){e.data=_.mapKeys(t.data,(function(t,n){return e.replaceIRIWithPrefix(n)})),e.propertiesObj.items=[],_.forEach(e.data,(function(t,n){e.propertiesObj.items.push({key:n,value:t})})),e.nodeImage=void 0,e.propertiesNotFiltered=e.propertiesObj.items;const n=_.find(e.propertiesObj.items,(function(e){return"image"===e.key}));n&&(e.nodeImage=n.value[0].v),e.propertiesObj.items=_.reject(e.propertiesObj.items,(function(e){return"image"===e.key})),e.propertiesNotFiltered=e.propertiesObj.items}),(function(e){s.warning(getError(e.data),"Error")}))}function Se(e){we("predicate","var(--primary-color-dark)",e),we("predicates","var(--primary-color-dark)",e);let t=document.getElementsByClassName("link");t&&_.each(t,(function(t){let n=t.__data__;(n.source.iri.indexOf(e.iri)>=0||n.target.iri.indexOf(e.iri)>=0)&&(t.style.stroke="var(--primary-color-dark)",t.style.strokeWidth=4)}));let n=document.getElementsByClassName("arrow-marker");n&&_.each(n,(function(t){let n=t.__data__;(n.source.iri.indexOf(e.iri)>=0||n.target.iri.indexOf(e.iri)>=0)&&(t.style.stroke="var(--primary-color-dark)",t.__data__.target.isTriple||t.setAttribute("refX","23"))}))}function we(e,t,n){let r=document.getElementsByClassName(e);r&&_.each(r,(function(e){let r=e.__data__;n?((r.source.iri.indexOf(n.iri)>=0||r.target.iri.indexOf(n.iri)>=0)&&(e.style.fill=t),W(n.iri)===H(r)&&(e.textContent=n.pred,e.style.fill=t),n.oppLinkIRI&&n.oppLinkIRI===H(r)&&(e.textContent=n.oppTriplePred,e.style.fill=t)):(e.style.fill=t,e.textContent=Ce(r))}))}function ke(){_.each(e.predicates,(function(e){let t=document.getElementById(e.linkId+e.nodeIndex);t&&(t.style.fontWeight="normal")}));let t=document.getElementsByClassName("link");t&&_.each(t,(function(e){e.style.stroke="#999",e.style.strokeWidth=1})),we("predicate",""),we("predicates","");let n=document.getElementsByClassName("arrow-marker");n&&_.each(n,(function(e){e.style.stroke="#999",e.__data__.target.isTriple||e.setAttribute("refX","59")}))}function Le(e){let t=W(e);if(J.tripleNodes.has(t))return J.tripleNodes.get(t).find(t=>t.iri===e)}function Ce(e){return e.predicates.length>1?e.predicates.length+" predicates":Te(e.predicates[0])}function Te(t){const n=e.replaceIRIWithPrefix(t);return n.length===t.length?t.split("/")[t.split("/").length-1]:n}e.toggleSidePanel=function(){e.pageslideExpanded=!e.pageslideExpanded},e.closeInfoPanel=function(){e.pageslideExpanded=!1,e.openedNodeInfoPanel=void 0,e.predicates=[],j=null,c((function(){e.showInfoPanel=!1}))},e.clickLink=function(t){if(J.tripleNodes.has(t.linkId)){ke();let n=J.tripleNodes.get(t.linkId)[t.nodeIndex];Ie(n),e.showPredicates=!0;let r=document.getElementById(t.linkId+t.nodeIndex);r&&(r.style.fontWeight="bold");let i={};const o=J.tripleLinksCopy.values();for(let e=0;e<J.tripleLinksCopy.size;e++){let 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=W(t.target.iri),i.oppTriplePred=Te(t.target.iri.split(" ")[1])),i.pred=Te(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=W(t.source.iri),i.oppTriplePred=Te(t.source.iri.split(" ")[1])),i.pred=Te(n.iri.split(" ")[1]),1===t.predicates.length&&(i.linkPred=t.predicates[0]),!1))}i.iri||(i.iri=n.iri,i.pred=Te(n.iri.split(" ")[1])),Se(i)}},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){ve();const t=10*(e?1:-1)*Math.PI/180,n=Math.cos(t),r=Math.sin(t);d3.selectAll(".node-wrapper").each((function(e){e.x=n*(e.x-500)+r*(e.y-500)+500,e.y=-r*(e.x-500)+n*(e.y-500)+500,e.fixed&&(e.fx=e.x,e.fy=e.y)})),ae.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,e.pushHistory(n,{uri:t,config:e.configLoaded})}e.$broadcast("onRootNodeChange",t)},e.saveOrUpdateGraph=function(){const t=JSON.stringify(J.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})};const be=function(t){S.editSavedGraph(t).success((function(){e.lastSavedGraphName=t.name,e.shared=t.shared,e.refreshSavedGraphs(),s.success(L.instant("graphexplore.saved.graph.was.edited",{name:t.name}))})).error((function(e){const t=getError(e);s.error(t,L.instant("graphexplore.error.cannot.edit"))}))};e.saveGraphModal=function(t,n,r){y.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}}}}).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),S.addNewSavedGraph(t).success((function(n,r,i){e.lastSavedGraphName=t.name,e.lastSavedGraphId=i()["x-saved-graph-id"],e.shared=t.shared,e.refreshSavedGraphs(),s.success(L.instant("graphexplore.saved.graph",{name:t.name}))})).error((function(n,r){if(422===r)e.saveGraphModal("new",t,!0);else{const e=getError(n);s.error(e,L.instant("graphexplore.error.cannot.create.graph"))}}))}(t.graph);break;case"update":case"rename":be(t.graph)}}))},e.refreshSavedGraphs=function(){S.getSavedGraphs().success((function(t){e.savedGraphs=t})).error((function(e){const t=getError(e);s.error(t,L.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),f.url("?saved="+t.id),J.restoreState(JSON.parse(t.data)),n||e.pushHistory({saved:t.id},{savedGraph:t})},e.copyToClipboardSavedGraph=function(e){D([location.protocol,"//",location.host,location.pathname,"?saved=",e.id].join(""))},e.deleteSavedGraph=function(t){m.openSimpleModal({title:L.instant("common.confirm"),message:L.instant("graphexplore.confirm.delete.graph",{graphName:t.name}),warning:!0}).result.then((function(){!function(t){S.deleteSavedGraph(t).success((function(){e.refreshSavedGraphs(),s.success(L.instant("graphexplore.saved.graph.was.deleted",{name:t.name}))})).error((function(e){const t=getError(e);s.error(t,L.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(){ve();const t=angular.isUndefined(e.numberOfPinnedNodes)||e.numberOfPinnedNodes<=0;e.numberOfPinnedNodes=0,d3.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)})),ae.alpha(1).restart()},$("body").on("keydown",(function(t){!C.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)}}function s(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&&t.close({graph:e.graph,mode:e.mode})},e.saveNew=function(){e.graph.name=e.graph.name+" (new)",t.close({graph:e.graph,mode:"new",restart:!0})},e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.graphexplore.controllers.graphviz",["ui.scroll.jqlite","ui.scroll","toastr","ui.bootstrap","ngTagsInput","graphdb.framework.utils.localstorageadapter"]).controller("GraphsVisualizationsCtrl",a).controller("SaveGraphModalCtrl",s).config(["$uibTooltipProvider",function(e){e.options({appendToBody:!0})}]),a.$inject=["$scope","$rootScope","$repositories","$licenseService","toastr","$timeout","$http","ClassInstanceDetailsService","AutocompleteRestService","$q","$location","$jwtAuth","UiScrollService","ModalService","$uibModal","$window","LocalStorageAdapter","LSKeys","SavedGraphsRestService","GraphConfigRestService","RDF4JRepositoriesRestService","$translate","GuidesService"],s.$inject=["$scope","$uibModalInstance","data","$translate"]},309:function(e,t,n){var r,i;r=[n(313)],void 0===(i=function(){function e(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 t(e,t){for(var n in t)e.attr(n,t[n]);return e}return"undefined"==typeof d3&&(d3=n(313)),d3.selection.prototype.attrs=function(n){return("function"==typeof n?e:t)(this,n)},d3.selection.prototype.moveToFront=function(){return this.each((function(){d3.select(this.parentNode.appendChild(this))}))},d3.selection.prototype.moveToBack=function(){return this.each((function(){const e=this.parentNode.firstChild;e&&this.parentNode.insertBefore(this,e)}))},d3}.apply(t,r))||(e.exports=i)},316:function(e,t,n){"use strict";n(309);var r=r||{};r.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}}}(),r.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)}},r.Click=function(){const e=function(e,n){let r,i=1,o=arguments.length;for(;++i<o;)r=arguments[i],e[r]=t(e,n,n[r]);return e};function t(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}return{delayDblClick:function(){var t=d3.dispatch("click","dblclick");return e((function(e){var n,r=null;e.on("mousedown",(function(){n=d3.pointer(document.body),+new Date})),e.on("mouseup",(function(e,i){var o,a,s;(a=n,s=d3.pointer(document.body),Math.sqrt(Math.pow(a[0]-s[0],2),Math.pow(a[1]-s[1],2))>5)||(r?(window.clearTimeout(r),r=null,t.call("dblclick",e,e,i)):r=window.setTimeout((o=e,function(){t.call("click",o,o,i),r=null}),250))}))}),t,"on")}}}(),t.a=r},318:function(e,t,n){"use strict";t.a=function(){var e=function(){return"n"},t=function(){return[0,0]},n=function(){return" "},r=u(),i=null,o=null,a=null,s=null;function c(e){var t;i="svg"===(t=(t=e).node()).tagName.toLowerCase()?t:t.ownerSVGElement,o=i.createSVGPoint(),document.body.appendChild(r)}c.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),u=t.apply(this,r),f=e.apply(this,r),h=p(),g=d.length,m=document.documentElement.scrollTop||document.body.scrollTop,y=document.documentElement.scrollLeft||document.body.scrollLeft,x=s.apply(this,r);for(h.html(o).style("opacity",1).style("pointer-events","all");g--;)h.classed(d[g],!1);const v=r.filter(e=>e instanceof Event);return i=l.get(f).apply(this,v),x?Object.keys(x).forEach((function(e){h.style(e,x[e])})):h.classed(f,!0).style("top",i.top+u[0]+m+"px").style("left",i.left+u[1]+y+"px"),c},c.hide=function(){return p().style("opacity",0).style("pointer-events","none"),c},c.attr=function(e,t){if(arguments.length<2&&"string"==typeof e)return p().attr(e);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.attr.apply(p(),n),c},c.style=function(e,t){if(arguments.length<2&&"string"==typeof e)return p().style(e);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.style.apply(p(),n),c},c.direction=function(t){return arguments.length?(e=null==t?t:h(t),c):e},c.offset=function(e){return arguments.length?(t=null==e?e:h(e),c):t},c.html=function(e){return arguments.length?(n=null==e?e:h(e),c):n},c.customPosition=function(e){return arguments.length?(s=null==e?e:h(e),c):s},c.destroy=function(){return r&&(p().remove(),r=null),c};var l=new Map(Object.entries({n:function(e){var t=f(e);return{top:t.n.y-r.offsetHeight,left:t.n.x-r.offsetWidth/2}},s:function(e){var t=f(e);return{top:t.s.y,left:t.s.x-r.offsetWidth/2}},e:function(e){var t=f(e);return{top:t.e.y-r.offsetHeight/2,left:t.e.x}},w:function(e){var t=f(e);return{top:t.w.y-r.offsetHeight/2,left:t.w.x-r.offsetWidth}},nw:function(e){var t=f(e);return{top:t.nw.y-r.offsetHeight,left:t.nw.x-r.offsetWidth}},ne:function(e){var t=f(e);return{top:t.ne.y-r.offsetHeight,left:t.ne.x}},sw:function(e){var t=f(e);return{top:t.sw.y,left:t.sw.x-r.offsetWidth}},se:function(e){var t=f(e);return{top:t.se.y,left:t.e.x}}})),d=l.keys();function u(){var e=d3.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 p(){return null===r&&(r=u(),document.body.appendChild(r)),d3.select(r)}function f(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(),s=i.width,c=i.height,l=i.x,d=i.y;return o.x=l,o.y=d,n.nw=o.matrixTransform(r),o.x+=s,n.ne=o.matrixTransform(r),o.y+=c,n.se=o.matrixTransform(r),o.x-=s,n.sw=o.matrixTransform(r),o.y-=c/2,n.w=o.matrixTransform(r),o.x+=s,n.e=o.matrixTransform(r),o.x-=s/2,o.y-=c/2,n.n=o.matrixTransform(r),o.y+=c,n.s=o.matrixTransform(r),n}function h(e){return"function"==typeof e?e:function(){return e}}return c}},67:function(e,t,n){"use strict";n.r(t),n.d(t,"STATIC_RULESETS",(function(){return r})),n.d(t,"REPOSITORY_TYPES",(function(){return i})),n.d(t,"FILENAME_PATTERN",(function(){return o})),n.d(t,"NUMBER_PATTERN",(function(){return a}));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-_]+$"),a=new RegExp("^[0-9]+$")}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[31],{108:function(t,e,r){"use strict";r.r(e);var n=r(317),a=r(316);r(10);function o(t,e,r,o,s,c,i,l,d,u,p,f,h){return{restrict:"AE",template:'<div id="domain-range"></div>',scope:{showPredicatesInfoPanel:"=",selectedPredicate:"=",collapseEdges:"="},link:function(u){const p=l((function(){!function(u){var p=d3.select("#domain-range").append("svg").attr("viewBox","0 0 1200 600").attr("preserveAspectRatio","xMidYMid meet").on("dblclick.zoom",null),g=d3.forceSimulation(),y=d3.drag().subject((function(t){return t})).on("start",(function(t,e){g.stop(),e.fx=t.x,e.fy=t.y,d3.select(this).classed("selected",!0)})).on("end",(function(t,e){e.fx=null,e.fy=null,d3.select(this).classed("selected",!1),b?(g.alpha(.2).restart(),b=!1):g.restart()})).on("drag",(function(t,e){b=!0,g.alphaTarget(0).restart(),e.fx=t.x,e.fy=t.y})),x=p.append("defs");x.append("marker").attrs({id:"arrow",viewBox:"0 -5 10 10",refX:10,refY:0,markerUnits:"strokeWidth",markerWidth:5,markerHeight:5,orient:"auto",fill:f}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),x.append("marker").attrs({id:"collapsed-arrow",viewBox:"0 -5 10 10",refX:9,refY:0,markerUnits:"strokeWidth",markerWidth:4,markerHeight:4,orient:"auto",fill:f}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),x.append("marker").attrs({id:"arrow-loop",viewBox:"0 -5 10 10",refX:7,refY:0,markerUnits:"strokeWidth",markerWidth:5,markerHeight:5,orient:"auto",fill:f}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),d3.select("#download-svg").on("mouseover",(function(){var t=n.a.Export.getCSSRules("css/domain-range-graph.css?v=2.5.0");$("defs").append('<style type="text/css"><![CDATA['+t+"]]></style>");var e=n.a.Export.generateBase64ImageSource("#domain-range svg");d3.select(this).attrs({href:e,download:"domain-range-graph-"+r.getActiveRepository()+".svg"})})),function(){var t=d3.select(".legend-container").append("svg").attr("viewBox","0 0 "+1200/7+" "+1200/7*1.2).attr("preserveAspectRatio","xMidYMid meet");t.append("rect").attrs({width:1200/7,height:1200/7*1.2}).style("fill","rgba(235, 235, 235, 0.9)");var e=16+1200/18/2.5,r=e+1200/90;t.append("circle").attrs({class:"legend-class-node",cx:(16+e)/2,cy:30,r:1200/18/4.5}),t.append("text").attrs({x:r,y:30+1200/370}).style("font-size",1200/90/1.1+"px").text("main class node"),t.append("circle").attrs({class:"legend-object-node",cx:(16+e)/2,cy:70,r:1200/110/1.25}),t.append("text").attrs({x:r,y:30+1200/370+40}).style("font-size",1200/90/1.1+"px").text("class node"),t.append("circle").attrs({class:"legend-datatype-node",cx:(16+e)/2,cy:70+1200/45,r:1200/110/2}),t.append("text").attrs({x:r,y:99.90990990990991}).style("font-size",1200/90/1.1+"px").text("datatype node"),t.append("line").attrs({class:"property-arrow",x1:16,y1:123.33333333333334,x2:e,y2:123.33333333333334}).style("stroke-width",1.2).attr("marker-end","url("+s.absUrl()+"#arrow)"),t.append("text").attrs({x:r,y:126.57657657657658}).style("font-size",1200/90/1.1+"px").text("explicit property"),t.append("line").attrs({class:"implicit-property-arrow",x1:16,y1:150,x2:e,y2:150}).style("stroke-width",1.2).attr("marker-end","url("+s.absUrl()+"#arrow)"),t.append("text").attrs({x:r,y:150+1200/370}).style("font-size",1200/90/1.1+"px").text("implicit property"),t.append("line").attrs({class:"collapsed-property-arrow",x1:16,y1:150+1200/45,x2:e,y2:150+1200/45}).style("stroke-width",2).attr("marker-end","url("+s.absUrl()+"#collapsed-arrow)"),t.append("text").attrs({x:r,y:179.9099099099099}).style("font-size",1200/90/1.1+"px").text("collapsed property")}();var m=s.search().uri,v=s.search().name;const k=s.search().collapsed;(function(t,e){o.getDomainRangeData(t,e).success((function(t,e,r){u.domainRangeGraphData=t})).error((function(t){d.error("Request for "+v+" failed!")}))})(m,k),$(window).on("popstate",(function(){c.set(i.DOMAIN_RANGE_WENT_BACK,!0)})),e.onpopstate=function(e){e.state&&t.$broadcast("changeCollapsedEdgesState",e.state.collapsed)},u.$watch("collapseEdges",(function(){angular.isUndefined(u.collapseEdges)||(c.set(i.DOMAIN_RANGE_COLLAPSE_EDGES,u.collapseEdges),"true"!==c.get(i.DOMAIN_RANGE_WENT_BACK)&&function(e){t.$broadcast("switchEdgeMode",{uri:m,name:v,collapsed:e})}(u.collapseEdges),c.remove(i.DOMAIN_RANGE_WENT_BACK))})),u.$watch("domainRangeGraphData",(function(){if(u.domainRangeGraphData){var r=_.cloneDeep(u.domainRangeGraphData);const P=r.nodes,j=r.links;g.nodes(P).force("x",d3.forceX(600)).force("y",d3.forceY(300)).force("charge",d3.forceManyBody().strength(-800)).force("link",d3.forceLink(j).distance(1200/3.5));var n=p.selectAll(".link").data(j).enter().append("g");function o(t){t.style("stroke",f),t.style("stroke-width",2),t.attr("marker-end","url("+s.absUrl()+"#collapsed-arrow)")}var c,i,d=0;n.each((function(t){if(t.objectPropNodeClassUri!==m)c=n.append("line").attrs({class:"link","marker-end":"url("+s.absUrl()+"#arrow)"}).style("stroke-width",1.2).each((function(t){switch(t.propertyType){case"objectLeft":t.targetRadius=1200/18;break;case"objectRight":t.targetRadius=1200/110;break;case"datatype":t.targetRadius=1200/110/2;break;default:t.targetRadius=0}var e=d3.select(this);t.targetNodeEdgeCount>1?o(e):t.implicit&&e.style("stroke-dasharray","3, 3")}));else{if(angular.isUndefined(i)){i=d3.select(this).append("path").attrs({d:"M 0 0 A "+1200/18/2+" "+1200/18/2+" 0 1 1 0 "+1200/18/2,class:"loop-link",fill:"none","marker-end":"url("+s.absUrl()+"#arrow-loop)"}).style("stroke-width",1.2)}(d+=t.targetNodeEdgeCount)>1&&o(d3.select(".loop-link"))}}));var x={};function k(){$.isEmptyObject(x)||(x.text.style("fill","black"),x.background.style("fill","#f0f0f0"))}function b(t,e){k(),x.text=d3.select(this),x.background=d3.select(this.previousSibling),x.text.style("fill","white"),x.background.style("fill",f),l((function(){u.showPredicatesInfoPanel=!0,u.selectedPredicate=e})),t.stopPropagation()}$("document").ready((function(){$("#domain-range").bind("click",k)}));var w=n.append("text").attr("class",(function(t){return t.objectPropNodeClassUri===m?"loop-link-property-name":"property-name"})).attr("dx",(function(t){return 1200/18/2*("objectLeft"===t.propertyType?1:-1)})).style("text-anchor",(function(t){return"objectLeft"===t.propertyType?"end":"start"})).style("font-size",1200/90).text((function(t){return t.targetNodeEdgeCount>1?t.targetNodeEdgeCount+" predicates":t.name}));w.each((function(t){var r=d3.select(this);/\d\spredicates/.test(r.text())?r.style("font-weight","bold").on("click",b):r.on("click",(function(t,r){e.open("resource?uri="+encodeURIComponent(r.uri),"_blank")}))}));var E=n.append("rect").attr("class",(function(t){return t.objectPropNodeClassUri!==m?"link-background":"loop-link-background"})).attr("width",(function(t){return t.calculatedWidth=this.previousSibling.getBBox().width,t.calculatedWidth+4})).attr("height",(function(t){return t.calculatedHeight=this.previousSibling.getBBox().height,t.calculatedHeight+2})).attr("transform",(function(t){var e=2-1200/18/2*("objectLeft"===t.propertyType?1:-1);return"objectLeft"===t.propertyType&&(e+=t.calculatedWidth),"translate(-"+e+",-"+(2+t.calculatedHeight/2)+")"})).on("click",(function(t){t.stopPropagation()})),N=p.selectAll(".node").data(P).enter().append("g"),R=N.filter((function(t){return t.objectPropClassUri!==m})).append("circle").each((function(t){var e=d3.select(this);"main"===t.classPosition?e.attrs({class:"class-node",r:1200/18}).attr("marker-end","url("+s.absUrl()+"#loop-link)"):null===t.objectPropClassName?e.attrs({class:"datatype-node",r:1200/110/2}):e.attrs({class:"object-prop-node",r:1200/110})})).call(y);d3.selectAll(".object-prop-node").on("dblclick",(function(e,r,n){u.$apply((function(){t.$broadcast("reloadDomainRangeGraphView",r,n)}))})),N.filter((function(t){return t.objectPropClassName&&t.objectPropClassUri!==m})).append("text").attr("class",(function(t){return t.classPosition+"-class-label"})).style("font-size",1200/90).text((function(t){return t.objectPropClassName})).on("click",(function(t,r){e.open("resource?uri="+encodeURIComponent(r.objectPropClassUri),"_blank")}));var C=N.select("text");p.select(".class-node").each((function(){d3.select(this.parentNode).append("text").attr("class","rdf-class-label").style("font-size",(function(t){return a.a.Text.calcFontSize(v,1200/18)})).text(v).on("click",(function(){e.open("resource?uri="+encodeURIComponent(m),"_blank")}))}));var T=p.select(".class-node + text"),A=d3.select(".class-node"),L=d3.selectAll(".loop-link-background"),M=d3.selectAll(".loop-link-property-name");if(w=d3.selectAll(".property-name"),!angular.isUndefined(i)){var U=[];L.each((function(t,e){d3.select(this);U.push({idx:e,width:t.calculatedWidth,height:t.calculatedHeight})}))}g.on("tick",(function(t){var e=8*g.alpha();function r(t){var e=t.x+1200/18*2,r=t.y-1200/18/1.9;var n=[];L.each((function(a,o){n.push(a),o<h?function(n,a){var o=$.grep(U,(function(t){return t.idx==a}));a>0&&(e+=parseFloat(a*(o[0].height/(a/1.4)))),n.attrs({transform:"rotate(270, "+t.x+","+t.y+") translate("+e+","+r+")",width:o[0].height,height:o[0].width})}(d3.select(this),o):d3.select(this).remove()})),function(t){var e;d3.select(".view-more-preds-label").style("font-weight","bold").each((function(r){r.target.allEdges=t,e=this.getComputedTextLength()})).on("click",b),d3.select(".view-more-preds-rect").attr("height",e+4)}(n)}c.filter((function(t){return t.objectPropNodeClassUri!==m})).attr("x1",(function(t){return t.source.x})).attr("y1",(function(t){return t.source.y})).attr("x2",(function(t){return t.targetX})).attr("y2",(function(t){return t.targetY})).each((function(t){!function(t){"objectLeft"===t.propertyType?(t.source.x-=8*e,t.source.y-=e/9):(t.target.x+=8*e,t.target.y-=e/9)}(t);var r=Math.atan2(t.target.y-t.source.y,t.target.x-t.source.x);t.targetX=t.target.x-Math.cos(r)*t.targetRadius,t.targetY=t.target.y-Math.sin(r)*t.targetRadius})),R.each((function(t){"main"!==t.classPosition||angular.isUndefined(i)||(!function(t){var e=t.x+64,r=t.y-1200/18/5.7-5;i.attr("transform","rotate(270, "+t.x+","+t.y+") translate("+e+","+r+")")}(t),function(t){function e(e,r){var n=$.grep(U,(function(t){return t.idx==r})),a=0;r>0&&(a=parseFloat(2*r*(n[0].height/1.4)));var o=t.x,s=t.y-1200/18*2.1-a;e.attrs({x:o,y:s}).moveToFront()}M.each((function(t,r){var n=d3.select(this),a=M.size()-h;a<0?e(n,r):(0==r&&!u.collapseEdges&&a>1&&(!function(t,e,r){t.classed("view-more-preds-label",!0).text(r+" predicates more ..."),null!==this.nextSibling&&e.classed("view-more-preds-rect",!0)}(n,d3.select(this.nextSibling),a),e(n,r)),r<h?e(n,r):n.remove())}))}(t),r(t)),t.objectPropClassUri!==m&&d3.select(this).attr("cx",(function(t){return"main"===t.classPosition?function(t){!window.ActiveXObject&&"ActiveXObject"in window&&(Math.log10=function(t){return Math.log(t)/Math.LN10});var e=A.attr("cx")-600,r=.5*Math.log10(Math.abs(e));return t.x+=e>0?-r:r,t.x}(t):t.x})).attr("cy",(function(t){return t.y}))})),T.attr("x",(function(t){return t.x})).attr("y",(function(t){return t.y})).moveToFront(),E.filter((function(t){return t.objectPropNodeClassUri!==m})).attr("x",(function(t){return t.target.x>t.source.x?t.source.x+(t.target.x-t.source.x)/2:t.target.x+(t.source.x-t.target.x)/2})).attr("y",(function(t){return t.target.y>t.source.y?t.source.y+(t.target.y-t.source.y)/2:t.target.y+(t.source.y-t.target.y)/2})).moveToFront(),w.attr("x",(function(t){return t.target.x>t.source.x?t.source.x+(t.target.x-t.source.x)/2:t.target.x+(t.source.x-t.target.x)/2})).attr("y",(function(t){return t.target.y>t.source.y?t.source.y+(t.target.y-t.source.y)/2:t.target.y+(t.source.y-t.target.y)/2})).moveToFront(),C.attr("x",(function(t){return"right"===t.classPosition?t.x+1200/110*1.2:t.x-1200/110*1.2})).attr("y",(function(t){return t.y})).moveToFront()}))}}));let b=!1}(u)}),50);u.$on("$destroy",(function(){l.cancel(p)}))}}}angular.module("graphdb.framework.graphexplore.directives.domainrange",["graphdb.framework.graphexplore.controllers.domainrange","graphdb.framework.utils.localstorageadapter"]).constant("ONTO_RED","var(--primary-color)").constant("ONTO_GREEN","var(--tertiary-color)").constant("ONTO_BLUE","var(--secondary-color)").constant("NON_COLLAPSED_REFLEXIVE_LINK_LIMIT",6).directive("domainRangeGraph",o),o.$inject=["$rootScope","$window","$repositories","GraphDataRestService","$location","LocalStorageAdapter","LSKeys","$timeout","toastr","ONTO_RED","ONTO_GREEN","ONTO_BLUE","NON_COLLAPSED_REFLEXIVE_LINK_LIMIT"]},309:function(t,e,r){var n,a;n=[r(313)],void 0===(a=function(){function t(t,e){return t.each((function(){var t=e.apply(this,arguments),r=select(this);for(var n in t)r.attr(n,t[n])}))}function e(t,e){for(var r in e)t.attr(r,e[r]);return t}return"undefined"==typeof d3&&(d3=r(313)),d3.selection.prototype.attrs=function(r){return("function"==typeof r?t:e)(this,r)},d3.selection.prototype.moveToFront=function(){return this.each((function(){d3.select(this.parentNode.appendChild(this))}))},d3.selection.prototype.moveToBack=function(){return this.each((function(){const t=this.parentNode.firstChild;t&&this.parentNode.insertBefore(this,t)}))},d3}.apply(e,n))||(t.exports=a)},316:function(t,e,r){"use strict";r(309);var n=n||{};n.Text=function(){function t(t,e,r,n){r=r||10;var a=e/3;return"string"==typeof t?(a*=10/(t.substring(0,e/3).length+1.5),a+=1,t.match(/[\u0900-\u0DFF\u1100-\u11FF\u2E80-\u2EFF\u3000-\u9FFF]/)&&(a*=.6),a<r&&(a=r),Math.round(a)):(a<r&&(a=r),Math.round(a))}return{calcFontSizeRaw:t,calcFontSize:function(e,r,n,a){return t(e,r,n)+"px"},getTextWithElipsisIfNeeded:function(t,e){return"string"==typeof t&&t.length>e?t.substring(0,e-3)+"...":t}}}(),n.Transition={fadeIn:function(t,e){t.style("opacity",0).transition().duration(e).style("opacity",1)},fadeOut:function(t,e){t.style("opacity",1).transition().duration(e).style("opacity",0)}},n.Click=function(){const t=function(t,r){let n,a=1,o=arguments.length;for(;++a<o;)n=arguments[a],t[n]=e(t,r,r[n]);return t};function e(t,e,r){return function(){var n=r.apply(e,arguments);return n===e?t:n}}return{delayDblClick:function(){var e=d3.dispatch("click","dblclick");return t((function(t){var r,n=null;t.on("mousedown",(function(){r=d3.pointer(document.body),+new Date})),t.on("mouseup",(function(t,a){var o,s,c;(s=r,c=d3.pointer(document.body),Math.sqrt(Math.pow(s[0]-c[0],2),Math.pow(s[1]-c[1],2))>5)||(n?(window.clearTimeout(n),n=null,e.call("dblclick",t,t,a)):n=window.setTimeout((o=t,function(){e.call("click",o,o,a),n=null}),250))}))}),e,"on")}}}(),e.a=n},317:function(t,e,r){"use strict";r(309);var n=n||{};n.Export={getCSSRules:function(t){const e=$('link[href="'+t+'"]')[0].sheet.rules;let r="";return _.each(e,(function(t){r+=t.cssText})),r},generateBase64ImageSource:function(t){t||(t="svg");const e=d3.selectAll(t).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(e)))}},e.a=n}}]);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[31],{108:function(t,e,r){"use strict";r.r(e);var n=r(317),a=r(316);r(10);function o(t,e,r,o,s,c,i,l,d,u,p,f,h){return{restrict:"AE",template:'<div id="domain-range"></div>',scope:{showPredicatesInfoPanel:"=",selectedPredicate:"=",collapseEdges:"="},link:function(u){const p=l((function(){!function(u){var p=d3.select("#domain-range").append("svg").attr("viewBox","0 0 1200 600").attr("preserveAspectRatio","xMidYMid meet").on("dblclick.zoom",null),g=d3.forceSimulation(),y=d3.drag().subject((function(t){return t})).on("start",(function(t,e){g.stop(),e.fx=t.x,e.fy=t.y,d3.select(this).classed("selected",!0)})).on("end",(function(t,e){e.fx=null,e.fy=null,d3.select(this).classed("selected",!1),b?(g.alpha(.2).restart(),b=!1):g.restart()})).on("drag",(function(t,e){b=!0,g.alphaTarget(0).restart(),e.fx=t.x,e.fy=t.y})),x=p.append("defs");x.append("marker").attrs({id:"arrow",viewBox:"0 -5 10 10",refX:10,refY:0,markerUnits:"strokeWidth",markerWidth:5,markerHeight:5,orient:"auto",fill:f}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),x.append("marker").attrs({id:"collapsed-arrow",viewBox:"0 -5 10 10",refX:9,refY:0,markerUnits:"strokeWidth",markerWidth:4,markerHeight:4,orient:"auto",fill:f}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),x.append("marker").attrs({id:"arrow-loop",viewBox:"0 -5 10 10",refX:7,refY:0,markerUnits:"strokeWidth",markerWidth:5,markerHeight:5,orient:"auto",fill:f}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),d3.select("#download-svg").on("mouseover",(function(){var t=n.a.Export.getCSSRules("css/domain-range-graph.css?v=2.5.1-TR1");$("defs").append('<style type="text/css"><![CDATA['+t+"]]></style>");var e=n.a.Export.generateBase64ImageSource("#domain-range svg");d3.select(this).attrs({href:e,download:"domain-range-graph-"+r.getActiveRepository()+".svg"})})),function(){var t=d3.select(".legend-container").append("svg").attr("viewBox","0 0 "+1200/7+" "+1200/7*1.2).attr("preserveAspectRatio","xMidYMid meet");t.append("rect").attrs({width:1200/7,height:1200/7*1.2}).style("fill","rgba(235, 235, 235, 0.9)");var e=16+1200/18/2.5,r=e+1200/90;t.append("circle").attrs({class:"legend-class-node",cx:(16+e)/2,cy:30,r:1200/18/4.5}),t.append("text").attrs({x:r,y:30+1200/370}).style("font-size",1200/90/1.1+"px").text("main class node"),t.append("circle").attrs({class:"legend-object-node",cx:(16+e)/2,cy:70,r:1200/110/1.25}),t.append("text").attrs({x:r,y:30+1200/370+40}).style("font-size",1200/90/1.1+"px").text("class node"),t.append("circle").attrs({class:"legend-datatype-node",cx:(16+e)/2,cy:70+1200/45,r:1200/110/2}),t.append("text").attrs({x:r,y:99.90990990990991}).style("font-size",1200/90/1.1+"px").text("datatype node"),t.append("line").attrs({class:"property-arrow",x1:16,y1:123.33333333333334,x2:e,y2:123.33333333333334}).style("stroke-width",1.2).attr("marker-end","url("+s.absUrl()+"#arrow)"),t.append("text").attrs({x:r,y:126.57657657657658}).style("font-size",1200/90/1.1+"px").text("explicit property"),t.append("line").attrs({class:"implicit-property-arrow",x1:16,y1:150,x2:e,y2:150}).style("stroke-width",1.2).attr("marker-end","url("+s.absUrl()+"#arrow)"),t.append("text").attrs({x:r,y:150+1200/370}).style("font-size",1200/90/1.1+"px").text("implicit property"),t.append("line").attrs({class:"collapsed-property-arrow",x1:16,y1:150+1200/45,x2:e,y2:150+1200/45}).style("stroke-width",2).attr("marker-end","url("+s.absUrl()+"#collapsed-arrow)"),t.append("text").attrs({x:r,y:179.9099099099099}).style("font-size",1200/90/1.1+"px").text("collapsed property")}();var m=s.search().uri,v=s.search().name;const k=s.search().collapsed;(function(t,e){o.getDomainRangeData(t,e).success((function(t,e,r){u.domainRangeGraphData=t})).error((function(t){d.error("Request for "+v+" failed!")}))})(m,k),$(window).on("popstate",(function(){c.set(i.DOMAIN_RANGE_WENT_BACK,!0)})),e.onpopstate=function(e){e.state&&t.$broadcast("changeCollapsedEdgesState",e.state.collapsed)},u.$watch("collapseEdges",(function(){angular.isUndefined(u.collapseEdges)||(c.set(i.DOMAIN_RANGE_COLLAPSE_EDGES,u.collapseEdges),"true"!==c.get(i.DOMAIN_RANGE_WENT_BACK)&&function(e){t.$broadcast("switchEdgeMode",{uri:m,name:v,collapsed:e})}(u.collapseEdges),c.remove(i.DOMAIN_RANGE_WENT_BACK))})),u.$watch("domainRangeGraphData",(function(){if(u.domainRangeGraphData){var r=_.cloneDeep(u.domainRangeGraphData);const P=r.nodes,j=r.links;g.nodes(P).force("x",d3.forceX(600)).force("y",d3.forceY(300)).force("charge",d3.forceManyBody().strength(-800)).force("link",d3.forceLink(j).distance(1200/3.5));var n=p.selectAll(".link").data(j).enter().append("g");function o(t){t.style("stroke",f),t.style("stroke-width",2),t.attr("marker-end","url("+s.absUrl()+"#collapsed-arrow)")}var c,i,d=0;n.each((function(t){if(t.objectPropNodeClassUri!==m)c=n.append("line").attrs({class:"link","marker-end":"url("+s.absUrl()+"#arrow)"}).style("stroke-width",1.2).each((function(t){switch(t.propertyType){case"objectLeft":t.targetRadius=1200/18;break;case"objectRight":t.targetRadius=1200/110;break;case"datatype":t.targetRadius=1200/110/2;break;default:t.targetRadius=0}var e=d3.select(this);t.targetNodeEdgeCount>1?o(e):t.implicit&&e.style("stroke-dasharray","3, 3")}));else{if(angular.isUndefined(i)){i=d3.select(this).append("path").attrs({d:"M 0 0 A "+1200/18/2+" "+1200/18/2+" 0 1 1 0 "+1200/18/2,class:"loop-link",fill:"none","marker-end":"url("+s.absUrl()+"#arrow-loop)"}).style("stroke-width",1.2)}(d+=t.targetNodeEdgeCount)>1&&o(d3.select(".loop-link"))}}));var x={};function k(){$.isEmptyObject(x)||(x.text.style("fill","black"),x.background.style("fill","#f0f0f0"))}function b(t,e){k(),x.text=d3.select(this),x.background=d3.select(this.previousSibling),x.text.style("fill","white"),x.background.style("fill",f),l((function(){u.showPredicatesInfoPanel=!0,u.selectedPredicate=e})),t.stopPropagation()}$("document").ready((function(){$("#domain-range").bind("click",k)}));var w=n.append("text").attr("class",(function(t){return t.objectPropNodeClassUri===m?"loop-link-property-name":"property-name"})).attr("dx",(function(t){return 1200/18/2*("objectLeft"===t.propertyType?1:-1)})).style("text-anchor",(function(t){return"objectLeft"===t.propertyType?"end":"start"})).style("font-size",1200/90).text((function(t){return t.targetNodeEdgeCount>1?t.targetNodeEdgeCount+" predicates":t.name}));w.each((function(t){var r=d3.select(this);/\d\spredicates/.test(r.text())?r.style("font-weight","bold").on("click",b):r.on("click",(function(t,r){e.open("resource?uri="+encodeURIComponent(r.uri),"_blank")}))}));var E=n.append("rect").attr("class",(function(t){return t.objectPropNodeClassUri!==m?"link-background":"loop-link-background"})).attr("width",(function(t){return t.calculatedWidth=this.previousSibling.getBBox().width,t.calculatedWidth+4})).attr("height",(function(t){return t.calculatedHeight=this.previousSibling.getBBox().height,t.calculatedHeight+2})).attr("transform",(function(t){var e=2-1200/18/2*("objectLeft"===t.propertyType?1:-1);return"objectLeft"===t.propertyType&&(e+=t.calculatedWidth),"translate(-"+e+",-"+(2+t.calculatedHeight/2)+")"})).on("click",(function(t){t.stopPropagation()})),N=p.selectAll(".node").data(P).enter().append("g"),R=N.filter((function(t){return t.objectPropClassUri!==m})).append("circle").each((function(t){var e=d3.select(this);"main"===t.classPosition?e.attrs({class:"class-node",r:1200/18}).attr("marker-end","url("+s.absUrl()+"#loop-link)"):null===t.objectPropClassName?e.attrs({class:"datatype-node",r:1200/110/2}):e.attrs({class:"object-prop-node",r:1200/110})})).call(y);d3.selectAll(".object-prop-node").on("dblclick",(function(e,r,n){u.$apply((function(){t.$broadcast("reloadDomainRangeGraphView",r,n)}))})),N.filter((function(t){return t.objectPropClassName&&t.objectPropClassUri!==m})).append("text").attr("class",(function(t){return t.classPosition+"-class-label"})).style("font-size",1200/90).text((function(t){return t.objectPropClassName})).on("click",(function(t,r){e.open("resource?uri="+encodeURIComponent(r.objectPropClassUri),"_blank")}));var C=N.select("text");p.select(".class-node").each((function(){d3.select(this.parentNode).append("text").attr("class","rdf-class-label").style("font-size",(function(t){return a.a.Text.calcFontSize(v,1200/18)})).text(v).on("click",(function(){e.open("resource?uri="+encodeURIComponent(m),"_blank")}))}));var T=p.select(".class-node + text"),A=d3.select(".class-node"),L=d3.selectAll(".loop-link-background"),M=d3.selectAll(".loop-link-property-name");if(w=d3.selectAll(".property-name"),!angular.isUndefined(i)){var U=[];L.each((function(t,e){d3.select(this);U.push({idx:e,width:t.calculatedWidth,height:t.calculatedHeight})}))}g.on("tick",(function(t){var e=8*g.alpha();function r(t){var e=t.x+1200/18*2,r=t.y-1200/18/1.9;var n=[];L.each((function(a,o){n.push(a),o<h?function(n,a){var o=$.grep(U,(function(t){return t.idx==a}));a>0&&(e+=parseFloat(a*(o[0].height/(a/1.4)))),n.attrs({transform:"rotate(270, "+t.x+","+t.y+") translate("+e+","+r+")",width:o[0].height,height:o[0].width})}(d3.select(this),o):d3.select(this).remove()})),function(t){var e;d3.select(".view-more-preds-label").style("font-weight","bold").each((function(r){r.target.allEdges=t,e=this.getComputedTextLength()})).on("click",b),d3.select(".view-more-preds-rect").attr("height",e+4)}(n)}c.filter((function(t){return t.objectPropNodeClassUri!==m})).attr("x1",(function(t){return t.source.x})).attr("y1",(function(t){return t.source.y})).attr("x2",(function(t){return t.targetX})).attr("y2",(function(t){return t.targetY})).each((function(t){!function(t){"objectLeft"===t.propertyType?(t.source.x-=8*e,t.source.y-=e/9):(t.target.x+=8*e,t.target.y-=e/9)}(t);var r=Math.atan2(t.target.y-t.source.y,t.target.x-t.source.x);t.targetX=t.target.x-Math.cos(r)*t.targetRadius,t.targetY=t.target.y-Math.sin(r)*t.targetRadius})),R.each((function(t){"main"!==t.classPosition||angular.isUndefined(i)||(!function(t){var e=t.x+64,r=t.y-1200/18/5.7-5;i.attr("transform","rotate(270, "+t.x+","+t.y+") translate("+e+","+r+")")}(t),function(t){function e(e,r){var n=$.grep(U,(function(t){return t.idx==r})),a=0;r>0&&(a=parseFloat(2*r*(n[0].height/1.4)));var o=t.x,s=t.y-1200/18*2.1-a;e.attrs({x:o,y:s}).moveToFront()}M.each((function(t,r){var n=d3.select(this),a=M.size()-h;a<0?e(n,r):(0==r&&!u.collapseEdges&&a>1&&(!function(t,e,r){t.classed("view-more-preds-label",!0).text(r+" predicates more ..."),null!==this.nextSibling&&e.classed("view-more-preds-rect",!0)}(n,d3.select(this.nextSibling),a),e(n,r)),r<h?e(n,r):n.remove())}))}(t),r(t)),t.objectPropClassUri!==m&&d3.select(this).attr("cx",(function(t){return"main"===t.classPosition?function(t){!window.ActiveXObject&&"ActiveXObject"in window&&(Math.log10=function(t){return Math.log(t)/Math.LN10});var e=A.attr("cx")-600,r=.5*Math.log10(Math.abs(e));return t.x+=e>0?-r:r,t.x}(t):t.x})).attr("cy",(function(t){return t.y}))})),T.attr("x",(function(t){return t.x})).attr("y",(function(t){return t.y})).moveToFront(),E.filter((function(t){return t.objectPropNodeClassUri!==m})).attr("x",(function(t){return t.target.x>t.source.x?t.source.x+(t.target.x-t.source.x)/2:t.target.x+(t.source.x-t.target.x)/2})).attr("y",(function(t){return t.target.y>t.source.y?t.source.y+(t.target.y-t.source.y)/2:t.target.y+(t.source.y-t.target.y)/2})).moveToFront(),w.attr("x",(function(t){return t.target.x>t.source.x?t.source.x+(t.target.x-t.source.x)/2:t.target.x+(t.source.x-t.target.x)/2})).attr("y",(function(t){return t.target.y>t.source.y?t.source.y+(t.target.y-t.source.y)/2:t.target.y+(t.source.y-t.target.y)/2})).moveToFront(),C.attr("x",(function(t){return"right"===t.classPosition?t.x+1200/110*1.2:t.x-1200/110*1.2})).attr("y",(function(t){return t.y})).moveToFront()}))}}));let b=!1}(u)}),50);u.$on("$destroy",(function(){l.cancel(p)}))}}}angular.module("graphdb.framework.graphexplore.directives.domainrange",["graphdb.framework.graphexplore.controllers.domainrange","graphdb.framework.utils.localstorageadapter"]).constant("ONTO_RED","var(--primary-color)").constant("ONTO_GREEN","var(--tertiary-color)").constant("ONTO_BLUE","var(--secondary-color)").constant("NON_COLLAPSED_REFLEXIVE_LINK_LIMIT",6).directive("domainRangeGraph",o),o.$inject=["$rootScope","$window","$repositories","GraphDataRestService","$location","LocalStorageAdapter","LSKeys","$timeout","toastr","ONTO_RED","ONTO_GREEN","ONTO_BLUE","NON_COLLAPSED_REFLEXIVE_LINK_LIMIT"]},309:function(t,e,r){var n,a;n=[r(313)],void 0===(a=function(){function t(t,e){return t.each((function(){var t=e.apply(this,arguments),r=select(this);for(var n in t)r.attr(n,t[n])}))}function e(t,e){for(var r in e)t.attr(r,e[r]);return t}return"undefined"==typeof d3&&(d3=r(313)),d3.selection.prototype.attrs=function(r){return("function"==typeof r?t:e)(this,r)},d3.selection.prototype.moveToFront=function(){return this.each((function(){d3.select(this.parentNode.appendChild(this))}))},d3.selection.prototype.moveToBack=function(){return this.each((function(){const t=this.parentNode.firstChild;t&&this.parentNode.insertBefore(this,t)}))},d3}.apply(e,n))||(t.exports=a)},316:function(t,e,r){"use strict";r(309);var n=n||{};n.Text=function(){function t(t,e,r,n){r=r||10;var a=e/3;return"string"==typeof t?(a*=10/(t.substring(0,e/3).length+1.5),a+=1,t.match(/[\u0900-\u0DFF\u1100-\u11FF\u2E80-\u2EFF\u3000-\u9FFF]/)&&(a*=.6),a<r&&(a=r),Math.round(a)):(a<r&&(a=r),Math.round(a))}return{calcFontSizeRaw:t,calcFontSize:function(e,r,n,a){return t(e,r,n)+"px"},getTextWithElipsisIfNeeded:function(t,e){return"string"==typeof t&&t.length>e?t.substring(0,e-3)+"...":t}}}(),n.Transition={fadeIn:function(t,e){t.style("opacity",0).transition().duration(e).style("opacity",1)},fadeOut:function(t,e){t.style("opacity",1).transition().duration(e).style("opacity",0)}},n.Click=function(){const t=function(t,r){let n,a=1,o=arguments.length;for(;++a<o;)n=arguments[a],t[n]=e(t,r,r[n]);return t};function e(t,e,r){return function(){var n=r.apply(e,arguments);return n===e?t:n}}return{delayDblClick:function(){var e=d3.dispatch("click","dblclick");return t((function(t){var r,n=null;t.on("mousedown",(function(){r=d3.pointer(document.body),+new Date})),t.on("mouseup",(function(t,a){var o,s,c;(s=r,c=d3.pointer(document.body),Math.sqrt(Math.pow(s[0]-c[0],2),Math.pow(s[1]-c[1],2))>5)||(n?(window.clearTimeout(n),n=null,e.call("dblclick",t,t,a)):n=window.setTimeout((o=t,function(){e.call("click",o,o,a),n=null}),250))}))}),e,"on")}}}(),e.a=n},317:function(t,e,r){"use strict";r(309);var n=n||{};n.Export={getCSSRules:function(t){const e=$('link[href="'+t+'"]')[0].sheet.rules;let r="";return _.each(e,(function(t){r+=t.cssText})),r},generateBase64ImageSource:function(t){t||(t="svg");const e=d3.selectAll(t).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(e)))}},e.a=n}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[51,115],{115:function(e,r,t){"use strict";t.r(r);t(7),t(25);const i=angular.module("graphdb.framework.impex.import.directives",["graphdb.framework.utils.uriutils"]);i.directive("validateUri",["UriUtils",function(e){return{restrict:"A",require:"ngModel",link:function(r,t,i,a){a.$parsers.unshift((function(t){let i=!0;return"named"===r.target&&(i=e.isValidIri(t,t.toString())),a.$setValidity("validateUri",i),t}))}}}]),i.directive("filesTable",(function(){return{restrict:"A",templateUrl:"js/angular/import/templates/filesTable.html"}})),i.directive("filesOntoLoader",(function(){return{link:function(e,r,t){e.$watch("file.status",(function(){"IMPORTING"!==e.file.status&&"UPLOADING"!==e.file.status||!$(r).has("object").length>0&&$(r).append('<object width="'+t.size+'" height="'+t.size+'" data="js/angular/templates/loader/ot-loader.svg?v=2.5.0">{{\'common.loading\' | translate}}</object>')}))}}}))},178:function(e,r,t){"use strict";t.r(r);t(7),t(23),t(143),t(115),t(22),t(53),t(54);angular.module("graphdb.framework.impex.import",["toastr","ngRoute","ngFileUpload","ui.bootstrap","graphdb.framework.impex.import.directives","graphdb.framework.impex.import.controllers","graphdb.framework.core.services.repositories","graphdb.framework.core.directives"])}}]);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[51,115],{115:function(e,r,t){"use strict";t.r(r);t(7),t(25);const i=angular.module("graphdb.framework.impex.import.directives",["graphdb.framework.utils.uriutils"]);i.directive("validateUri",["UriUtils",function(e){return{restrict:"A",require:"ngModel",link:function(r,t,i,a){a.$parsers.unshift((function(t){let i=!0;return"named"===r.target&&(i=e.isValidIri(t,t.toString())),a.$setValidity("validateUri",i),t}))}}}]),i.directive("filesTable",(function(){return{restrict:"A",templateUrl:"js/angular/import/templates/filesTable.html"}})),i.directive("filesOntoLoader",(function(){return{link:function(e,r,t){e.$watch("file.status",(function(){"IMPORTING"!==e.file.status&&"UPLOADING"!==e.file.status||!$(r).has("object").length>0&&$(r).append('<object width="'+t.size+'" height="'+t.size+'" data="js/angular/templates/loader/ot-loader.svg?v=2.5.1-TR1">{{\'common.loading\' | translate}}</object>')}))}}}))},178:function(e,r,t){"use strict";t.r(r);t(7),t(23),t(143),t(115),t(22),t(53),t(54);angular.module("graphdb.framework.impex.import",["toastr","ngRoute","ngFileUpload","ui.bootstrap","graphdb.framework.impex.import.directives","graphdb.framework.impex.import.controllers","graphdb.framework.core.services.repositories","graphdb.framework.core.directives"])}}]);
@@ -0,0 +1 @@
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[52,163],{125:function(e,n,t){"use strict";t.r(n);t(7),t(22),t(26),t(57);function r(e,n,t,r,o,i){e.getSqlConfigurations=function(){!n.getActiveRepository()||n.isActiveRepoOntopType()||n.isActiveRepoFedXType()?e.jdbcConfigurations=[]:t.getJdbcConfigurations().success((function(n){e.jdbcConfigurations=n})).error((function(e){const n=getError(e);r.error(n,i.instant("jdbc.not.get.SQL.msg"))}))},e.$watch((function(){return n.getActiveRepository()}),(function(){e.getSqlConfigurations()})),e.deleteConfiguration=function(n){o.openSimpleModal({title:i.instant("common.warning"),message:i.instant("jdbc.delete.sql.table.warning.msg",{name:n}),warning:!0}).result.then((function(){t.deleteJdbcConfiguration(n).success((function(){e.getSqlConfigurations()})).error((function(e){r.error(getError(e),i.instant("jdbc.not.delete.sql.msg"))}))}))}}function o(e,n,t,r,o,i,s,u,c,a,l,g){e.name=n.search().name||"",e.getNamespaces=function(){w(!0,g.instant("common.refreshing.namespaces"),g.instant("common.extra.message")),u.getRepositoryNamespaces().success((function(n){const t={};n.results.bindings.forEach((function(e){t[e.prefix.value]=e.namespace.value})),e.namespaces=t})).error((function(n){e.repositoryError=getError(n)})).finally((function(){w(!1),b()}))},e.setLoader=w,e.addKnownPrefixes=h,e.page=1,e.noPadding={paddingRight:0,paddingLeft:0},e.sqlTypes=["string","iri","boolean","byte","short","int","long","float","double","decimal","date","time","timestamp","Get suggestion..."],e.currentTabConfig={},e.orientationViewMode=!0,e.currentQuery={},e.$watch((function(){return r.getActiveRepository()}),(function(e,t){e!==t&&n.path("jdbc")}));let d=null;e.goBack=function(){d=i((function(){o.history.back()}),1e3)};const f=e.$on("$locationChangeStart",(function(n){!function(n){e.currentQuery.isPristine||(confirm(g.instant("jdbc.warning.unsaved.changes"))?(window.removeEventListener("beforeunload",m),f(),i.cancel(d)):n.preventDefault())}(n)}));function m(n){e.currentQuery.isPristine||(n.returnValue=!0)}window.addEventListener("beforeunload",m),e.$on("$destroy",(function(e){window.removeEventListener("beforeunload",m),f(),i.cancel(d)}));const p={id:"1",name:"",query:"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n\n# Selects two variables to use as columns\nSELECT ?id ?label {\n ?id rdfs:label ?label\n # The following placeholder must be present in the query\n #!filter\n}",inference:!0,sameAs:!0,isNewConfiguration:!0,isPristine:!0};var y;function w(n,t,r){const o=angular.element(document.getElementById("yasr-inner"));e.queryIsRunning=n,n?(e.queryStartTime=Date.now(),e.countTimeouted=!1,e.progressMessage=t,e.extraMessage=r,o.addClass("hide")):(e.progressMessage="",e.extraMessage="",o.removeClass("hide")),null===e.$$phase&&e.$apply()}function b(){e.tabsData=[e.currentQuery];const n=e.currentQuery;e.currentQuery.query?window.editor.setValue(e.currentQuery.query):window.editor.setValue(" "),i((function(){e.currentTabConfig={},e.currentTabConfig.queryType=n.queryType,e.currentTabConfig.resultsCount=n.resultsCount,e.currentTabConfig.offset=n.offset,e.currentTabConfig.allResultsCount=n.allResultsCount,e.currentTabConfig.page=n.page,e.currentTabConfig.pageSize=n.pageSize,e.currentTabConfig.timeFinished=n.timeFinished,e.currentTabConfig.timeTook=n.timeTook,e.currentTabConfig.sizeDelta=n.sizeDelta,e.$apply()}),0),e.canWriteActiveRepo()||(window.editor.options.readOnly=!0)}function C(){e.tabsData=e.tabs=[p],e.currentQuery=_.cloneDeep(p),T(),window.editor&&(e.setQuery(e.currentQuery.query),b()),e.$watch((function(){return e.currentQuery.query}),(function(n,t){n!==t&&e.setDirty()}))}function h(){c.addKnownPrefixes(JSON.stringify(window.editor.getValue())).success((function(e){angular.isDefined(window.editor)&&angular.isDefined(e)&&e!==window.editor.getValue()&&window.editor.setValue(e)})).error((function(e){const n=getError(e);return t.error(n,g.instant("common.add.known.prefixes.error")),!0}))}function v(){S()&&s.getColumnNames(e.currentQuery.query).success((function(n){s.getColumnsTypeSuggestion(e.currentQuery.query,n).success((function(t){const r=[];_.forEach(n,(function(e){r.push({column_name:e,column_type:t[e].column_type,nullable:!0,sparql_type:t[e].sparql_type})})),e.currentQuery.columns=r,e.setDirty()})).error((function(e){t.error(getError(e),g.instant("jdbc.not.suggest.column.types"))}))})).error((function(e){t.error(getError(e),g.instant("jdbc.not.suggest.column.names"))}))}function T(){2===e.page?e.viewMode="editor":e.viewMode="none"}function Q(e,n,t,r,o){let i=t[r].value;i=i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");return"<div class = 'literal-cell'>"+("<p class='nonUri' style='border: none; background-color: transparent; padding: 0; margin: 0'>"+i+"</p>")+"</div>"}function j(){return window.editor&&"SELECT"===window.editor.getQueryType()}function q(){return S()&&function(){if(!e.currentQuery.columns||!e.currentQuery.columns.length)return t.error(g.instant("jdbc.warning.one.column.msg"),g.instant("jdbc.invalid.columns")),!1;if(e.containsUnknownColumns())return t.error(g.instant("jdbc.warning.all.column.msg"),g.instant("jdbc.invalid.columns")),!1;return!0}()}function S(){return!!j()||(t.error(g.instant("jdbc.warning.invalid.query"),g.instant("jdbc.invalid.query)")),!1)}e.resetCurrentTabConfig=function(){e.currentTabConfig={pageSize:100,page:1,allResultsCount:0,resultsCount:0,queryType:""}},e.saveTab=function(){},e.setQuery=function(e){window.editor.setValue(e||" ")},e.name?(y=e.name,s.getJdbcConfiguration(y).success((function(e){p.query=e.query,p.name=e.name,p.columns=e.columns,p.isNewConfiguration=!e.name,C()})).error((function(e){const n=getError(e);t.error(n,g.instant("jdbc.not.get.sql.msg2"))}))):C(),e.goToPage=function(n){e.page=n;const t=e.currentQuery.columns;2!==n||t&&0!==t.length||!j()||e.getColumnsSuggestions(),T()},e.save=function(){q()&&(e.currentQuery.name?e.currentQuery.isNewConfiguration?s.createNewJdbcConfiguration(e.currentQuery).success((function(){e.currentQuery.isPristine=!0,e.currentQuery.isNewConfiguration=!1,t.success(g.instant("jdbc.saved.configuration")),e.goBack()})).error((function(e){const n=getError(e);t.error(n,g.instant("jdbc.not.saved.configuration"))})):s.updateJdbcConfiguration(e.currentQuery).success((function(){e.currentQuery.isPristine=!0,e.currentQuery.isNewConfiguration=!1,t.success(g.instant("jdbc.configuration.updated")),e.goBack()})).error((function(e){const n=getError(e);t.error(n,g.instant("jdbc.not.saved.configuration"))})):t.error(g.instant("jdbc.required.configuration.name")))},e.hasPrecision=function(e){return"iri"===e||"string"===e||"decimal"===e},e.containsColumnsWithPrecision=function(n){return n&&n.some(n=>e.hasPrecision(n.column_type))},e.hasScale=function(e){return"decimal"===e},e.containsColumnsWithScale=function(n){return n&&n.some(n=>e.hasScale(n.column_type))},e.isLiteral=function(e){return"iri"!==e&&"unknown"!==e},e.containsNonLiteralColumnsOnly=function(n){return n&&n.every(n=>!e.isLiteral(n.column_type))},e.containsUnknownColumns=function(){return e.currentQuery.columns&&e.currentQuery.columns.find(e=>"unknown"===e.column_type)},$("textarea").on("paste",(function(){i((function(){h()}),0)})),e.selectColumnType=function(n,r){const o=_.find(e.currentQuery.columns,(function(e){return e.column_name===n}));"Get suggestion..."===o.column_type&&s.getColumnsTypeSuggestion(e.currentQuery.query,[n]).success((function(e){o.column_type=e[n].column_type,o.column_type===r?t.info(g.instant("jdbc.same.suggested.sql.type",{type:o.column_type}),g.instant("jdbc.suggest.sql.type"),{allowHtml:!0}):t.success(g.instant("jdbc.suggested.sql.type",{type:o.column_type}),g.instant("jdbc.suggest.sql.type"),{allowHtml:!0}),o.sparql_type=e[n].sparql_type})).error((function(e){t.error(getError(e),g.instant("jdbc.not.suggest.column.type"))})),e.setDirty()},e.getColumnsSuggestions=function(){e.currentQuery.columns&&e.currentQuery.columns.length>0?a.openSimpleModal({title:g.instant("common.warning"),message:g.instant("jdbc.warning.column.type.msg"),warning:!0}).result.then((function(){v()})):v()},e.deleteColumn=function(n,t){a.openSimpleModal({title:g.instant("common.warning"),message:g.instant("jdbc.warning.delete.column.msg",{columnName:n}),warning:!0}).result.then((function(){e.currentQuery.columns.splice(t,1),e.setDirty()}))},e.getPreview=function(){if(q()&&(e.executedQueryTab=e.currentQuery,!e.queryIsRunning)){$.ajaxSetup().headers=$.ajaxSetup().headers||{};const n=r.getActiveRepositoryObject(),o=l.getAuthToken();o&&($.ajaxSetup().headers.Authorization=o),$.ajaxSetup().headers["X-GraphDB-Repository"]=n?n.id:void 0,$.ajaxSetup().headers["X-GraphDB-Repository-Location"]=n?n.location:void 0,e.currentQuery.outputType="table",e.resetCurrentTabConfig(),w(!0,g.instant("jdbc.preview.first.rows",{name:e.name}),g.instant("common.extra.message"));const i=function(n,r,o){!function(n,r,o){n.results&&n.results.bindings&&n.results.bindings.length?(window.yasr.plugins.table.options.getCellContent=Q,e.currentTabConfig.queryType="SELECT",window.yasr.setResponse(r,o,null)):t.info(g.instant("jdbc.table.definition"),g.instant("jdbc.preview.sql"))}(n,o,r),w(!1)},u=function(e){w(!1),t.error(getError(e,0,100),g.instant("jdbc.not.show.preview"))};if(e.canWriteActiveRepo()){const n=JSON.stringify({name:e.currentQuery.name,query:e.currentQuery.query,columns:e.currentQuery.columns||[]});s.getNewSqlTablePreview(n).done(i).fail(u)}else s.getExistingSqlTablePreview(e.currentQuery.name).done(i).fail(u)}},e.setDirty=function(){e.currentQuery.isPristine=!1},e.getTypeLabel=function(e){switch(e){case"iri":return"VARCHAR: IRI";case"string":return"VARCHAR: String";default:return e.indexOf(" ")>0?e:e.toUpperCase()}}}angular.module("graphdb.framework.jdbc.controllers",["ui.bootstrap","graphdb.framework.core.services.repositories","graphdb.framework.rest.monitoring.service","toastr"],["graphdb.framework.utils.notifications"]).controller("JdbcListCtrl",r).controller("JdbcCreateCtrl",o),r.$inject=["$scope","$repositories","JdbcRestService","toastr","ModalService","$translate"],o.$inject=["$scope","$location","toastr","$repositories","$window","$timeout","JdbcRestService","RDF4JRepositoriesRestService","SparqlRestService","ModalService","AuthTokenService","$translate"]},57:function(e,n){function t(e,n){return{showToastMessageWithDelay:function(t){return new Promise(r=>{e.success(n.instant(t)),setTimeout(r,200)})}}}angular.module("graphdb.framework.utils.notifications",[]).factory("Notifications",t),t.$inject=["toastr","$translate"]}}]);