graphdb-workbench 3.3.2-TR1 → 3.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/13231.d7107e7549453805e13a.bundle.js +2 -0
- package/dist/13231.d7107e7549453805e13a.bundle.js.map +1 -0
- package/dist/{20694.a738f5634ec09369dc85.bundle.js → 20694.4becb7771236462dcc5a.bundle.js} +2 -2
- package/dist/20694.4becb7771236462dcc5a.bundle.js.map +1 -0
- package/dist/21015.ea34b563b4149ad0975e.bundle.js +2 -0
- package/dist/21015.ea34b563b4149ad0975e.bundle.js.map +1 -0
- package/dist/38644.0e8652c647a0f341abd7.bundle.js +2 -0
- package/dist/38644.0e8652c647a0f341abd7.bundle.js.map +1 -0
- package/dist/39518.4d72b74fffba395c6b2a.bundle.js +2 -0
- package/dist/{39518.2871b32c37b20075dba3.bundle.js.map → 39518.4d72b74fffba395c6b2a.bundle.js.map} +1 -1
- package/dist/39874.710e94f211579215f997.bundle.js +2 -0
- package/dist/39874.710e94f211579215f997.bundle.js.map +1 -0
- package/dist/60560.6ba1b091a34af6c00770.bundle.js +2 -0
- package/dist/60560.6ba1b091a34af6c00770.bundle.js.map +1 -0
- package/dist/67888.41803878170b6c7a5ca5.bundle.js +2 -0
- package/dist/67888.41803878170b6c7a5ca5.bundle.js.map +1 -0
- package/dist/7815.2aec5ebbcd434f5582ff.bundle.js +2 -0
- package/dist/7815.2aec5ebbcd434f5582ff.bundle.js.map +1 -0
- package/dist/78681.9e1d4e064e9e1fb5fb21.bundle.js +2 -0
- package/dist/78681.9e1d4e064e9e1fb5fb21.bundle.js.map +1 -0
- package/dist/{82926.99231caacc379c66487a.bundle.js → 82926.ce1d6bf65b09288a2b10.bundle.js} +2 -2
- package/dist/{82926.99231caacc379c66487a.bundle.js.map → 82926.ce1d6bf65b09288a2b10.bundle.js.map} +1 -1
- package/dist/94229.47dbdba202106c61dff1.bundle.js.map +1 -1
- package/dist/99448.2a87f387a8062617d893.bundle.js +2 -0
- package/dist/99448.2a87f387a8062617d893.bundle.js.map +1 -0
- package/dist/api/models/cookie/cookie-options.d.ts +17 -0
- package/dist/api/models/cookie/index.d.ts +1 -1
- package/dist/api/models/security/authenticated-user.d.ts +2 -0
- package/dist/api/models/tracking/cookie-consent.d.ts +39 -0
- package/dist/api/models/tracking/index.d.ts +1 -0
- package/dist/api/models/users/app-settings.d.ts +2 -2
- package/dist/api/ontotext-workbench-api.d.ts +3 -1
- package/dist/api/ontotext-workbench-api.js +1 -1
- package/dist/api/ontotext-workbench-api.js.map +1 -1
- package/dist/api/services/cookie/browser-cookie-store.d.ts +19 -0
- package/dist/api/services/cookie/cookie-builder.d.ts +77 -0
- package/dist/api/services/cookie/cookie-store.d.ts +16 -0
- package/dist/api/services/cookie/cookie.service.d.ts +34 -7
- package/dist/api/services/cookie/error/invalid-cookie-expiration.d.ts +8 -0
- package/dist/api/services/cookie/index.d.ts +3 -0
- package/dist/api/services/cookie/test/cookie-builder.spec.d.ts +1 -0
- package/dist/api/services/cookie/test/in-memory-cookie-store.d.ts +11 -0
- package/dist/api/services/security/auth-strategies/tests/provider-response-mocks.d.ts +2 -2
- package/dist/api/services/security/security-context.service.d.ts +6 -0
- package/dist/api/services/tracking/google-analytics-cookie.service.d.ts +50 -0
- package/dist/api/services/tracking/index.d.ts +4 -0
- package/dist/api/services/tracking/installation-cookie.service.d.ts +37 -0
- package/dist/api/services/tracking/test/tracking-storage.service.spec.d.ts +1 -0
- package/dist/api/services/tracking/test/tracking.service.spec.d.ts +1 -0
- package/dist/api/services/tracking/tracking-storage.service.d.ts +27 -0
- package/dist/api/services/tracking/tracking.service.d.ts +56 -0
- package/dist/api/services/users/response/user-response.d.ts +1 -1
- package/dist/api/services/utils/date-util.d.ts +11 -0
- package/dist/api/services/utils/index.d.ts +1 -0
- package/dist/api/services/window/window.service.d.ts +6 -0
- package/dist/assets/i18n/fr.json +1 -1
- package/dist/index.html +9 -9
- package/dist/js/angular/clustermanagement/templates/cluster-nodes-configuration.html +1 -1
- package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
- package/dist/js/angular/core/directives/dynamic-form/templates/dynamic-form.html +1 -1
- package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
- package/dist/js/angular/core/directives/shuttle-multiselect/templates/shuttle-multiselect.html +1 -1
- package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +2 -2
- package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
- package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
- package/dist/js/angular/core/templates/editable-content/editable-content.html +1 -1
- package/dist/js/angular/core/templates/markdown-content/markdown-content.html +1 -1
- package/dist/js/angular/core/templates/search-resource-input.html +1 -1
- package/dist/js/angular/graphql/templates/create-graphql-endpoint.html +2 -2
- package/dist/js/angular/graphql/templates/graphql-endpoint-management.html +1 -1
- package/dist/js/angular/graphql/templates/graphql-playground.html +2 -2
- package/dist/js/angular/graphql/templates/modal/endpoint-configuration-modal.html +1 -1
- package/dist/js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html +1 -1
- package/dist/js/angular/graphql/templates/modal/import-endpoint-definition-modal.html +1 -1
- package/dist/js/angular/security/templates/user.html +5 -2
- package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
- package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-item-detail.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-list.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-panel.html +1 -1
- package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
- package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +3 -3
- package/dist/js/angular/ttyg/templates/modal/external-integration-configuration-modal.html +1 -1
- package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
- package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
- package/dist/legacyWorkbench.40eba9e09196e1483221.js +3 -0
- package/dist/{legacyWorkbench.88e1d4d209e51c6f9b65.js.map → legacyWorkbench.40eba9e09196e1483221.js.map} +1 -1
- package/dist/license-checker-static.json +0 -7
- package/dist/{main.1be0fc11ab24b99f8800.js → main.14f083264cd64618d96a.js} +3 -3
- package/dist/main.14f083264cd64618d96a.js.map +1 -0
- package/dist/pages/aclmanagement.html +1 -1
- package/dist/pages/autocomplete.html +1 -1
- package/dist/pages/choose-repository-type.html +1 -1
- package/dist/pages/cluster-management/clusterInfo.html +3 -3
- package/dist/pages/create-index.html +1 -1
- package/dist/pages/dependencies.html +1 -1
- package/dist/pages/domainRangeInfo.html +2 -2
- package/dist/pages/edit.html +1 -1
- package/dist/pages/explore.html +1 -1
- package/dist/pages/export.html +1 -1
- package/dist/pages/find.html +1 -1
- package/dist/pages/graph-config/saveGraphConfig.html +8 -8
- package/dist/pages/graphs-visualizations.html +7 -7
- package/dist/pages/guides.html +1 -1
- package/dist/pages/home.html +1 -1
- package/dist/pages/import.html +2 -2
- package/dist/pages/jdbc-create.html +1 -1
- package/dist/pages/jdbc.html +1 -1
- package/dist/pages/monitor/backup-and-restore.html +1 -1
- package/dist/pages/monitor/queries.html +1 -1
- package/dist/pages/monitor/resources.html +1 -1
- package/dist/pages/namespaces.html +2 -2
- package/dist/pages/plugins.html +1 -1
- package/dist/pages/rdfClassHierarchyInfo.html +7 -7
- package/dist/pages/rdfrank.html +2 -2
- package/dist/pages/repositories.html +1 -1
- package/dist/pages/repository.html +1 -1
- package/dist/pages/similarity-indexes.html +1 -1
- package/dist/pages/sparql-editor.html +1 -1
- package/dist/pages/sparql-template-create.html +1 -1
- package/dist/pages/sparql-templates.html +1 -1
- package/dist/pages/ux-test1.html +2 -2
- package/dist/pages/webapi.html +2 -2
- package/dist/res/swagger5/index.html +11 -11
- package/dist/shared-components/cjs/function-utils-WB47AWpR.js +1 -0
- package/dist/shared-components/cjs/loader.cjs.js +1 -1
- package/dist/shared-components/cjs/onto-cookie-consent_2.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-dialog_2.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-footer_5.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-layout.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-test-context.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/shared-components.cjs.js +1 -1
- package/dist/shared-components/collection/components/dialogs/onto-cookie-policy-dialog/onto-cookie-policy-dialog.js +1 -1
- package/dist/shared-components/collection/components/dialogs/onto-dialog.js +1 -1
- package/dist/shared-components/collection/components/onto-cookie-consent/onto-cookie-consent.css +1 -1
- package/dist/shared-components/collection/components/onto-cookie-consent/onto-cookie-consent.js +1 -1
- package/dist/shared-components/collection/components/onto-footer/onto-footer.js +1 -1
- package/dist/shared-components/esm/function-utils-D1ZpXQQS.js +1 -0
- package/dist/shared-components/esm/loader.js +1 -1
- package/dist/shared-components/esm/onto-cookie-consent_2.entry.js +1 -1
- package/dist/shared-components/esm/onto-dialog_2.entry.js +1 -1
- package/dist/shared-components/esm/onto-footer_5.entry.js +1 -1
- package/dist/shared-components/esm/onto-layout.entry.js +1 -1
- package/dist/shared-components/esm/onto-test-context.entry.js +1 -1
- package/dist/shared-components/esm/shared-components.js +1 -1
- package/dist/shared-components/shared-components/{p-279a026b.entry.js → p-5886e663.entry.js} +1 -1
- package/dist/shared-components/shared-components/p-598d33d7.entry.js +1 -0
- package/dist/shared-components/shared-components/p-6d34b2cb.entry.js +1 -0
- package/dist/shared-components/shared-components/p-74888633.entry.js +1 -0
- package/dist/shared-components/shared-components/p-D1ZpXQQS.js +1 -0
- package/dist/shared-components/shared-components/p-b5d4081d.entry.js +1 -0
- package/dist/shared-components/shared-components/shared-components.esm.js +1 -1
- package/dist/shared-components/types/components/dialogs/onto-cookie-policy-dialog/onto-cookie-policy-dialog.d.ts +31 -7
- package/dist/shared-components/types/components/onto-cookie-consent/onto-cookie-consent.d.ts +2 -2
- package/dist/shared-components/types/components/onto-footer/onto-footer.d.ts +9 -2
- package/dist/shared-components/types/components.d.ts +17 -8
- package/dist/shared-components/types/models/dialog/dialog-handler.d.ts +4 -0
- package/package.json +1 -1
- package/dist/13231.9b625e487e6385faa36f.bundle.js +0 -2
- package/dist/13231.9b625e487e6385faa36f.bundle.js.map +0 -1
- package/dist/20694.a738f5634ec09369dc85.bundle.js.map +0 -1
- package/dist/21015.68c7c667ef64ad8e8e0d.bundle.js +0 -2
- package/dist/21015.68c7c667ef64ad8e8e0d.bundle.js.map +0 -1
- package/dist/38644.37a8cd71112da94401d9.bundle.js +0 -2
- package/dist/38644.37a8cd71112da94401d9.bundle.js.map +0 -1
- package/dist/39518.2871b32c37b20075dba3.bundle.js +0 -2
- package/dist/39874.47a6948df3520a7bf37a.bundle.js +0 -2
- package/dist/39874.47a6948df3520a7bf37a.bundle.js.map +0 -1
- package/dist/60560.275a89ab1375e91de0aa.bundle.js +0 -2
- package/dist/60560.275a89ab1375e91de0aa.bundle.js.map +0 -1
- package/dist/67888.b75d9678cf65cd82f065.bundle.js +0 -2
- package/dist/67888.b75d9678cf65cd82f065.bundle.js.map +0 -1
- package/dist/7815.f09f8d6953d2c964e04d.bundle.js +0 -2
- package/dist/7815.f09f8d6953d2c964e04d.bundle.js.map +0 -1
- package/dist/78681.0cfa1e86d4dac1b7e7e8.bundle.js +0 -2
- package/dist/78681.0cfa1e86d4dac1b7e7e8.bundle.js.map +0 -1
- package/dist/99448.272a4ba1ce8032167bea.bundle.js +0 -2
- package/dist/99448.272a4ba1ce8032167bea.bundle.js.map +0 -1
- package/dist/api/models/cookie/cookie-consent.d.ts +0 -14
- package/dist/legacyWorkbench.88e1d4d209e51c6f9b65.js +0 -3
- package/dist/main.1be0fc11ab24b99f8800.js.map +0 -1
- package/dist/shared-components/collection/models/dialog/onto-dialog.js +0 -1
- package/dist/shared-components/shared-components/p-2075209c.entry.js +0 -1
- package/dist/shared-components/shared-components/p-30e4880f.entry.js +0 -1
- package/dist/shared-components/shared-components/p-413b3789.entry.js +0 -1
- package/dist/shared-components/shared-components/p-67199a46.entry.js +0 -1
- package/dist/shared-components/types/models/dialog/onto-dialog.d.ts +0 -4
- /package/dist/{legacyWorkbench.88e1d4d209e51c6f9b65.js.LICENSE.txt → legacyWorkbench.40eba9e09196e1483221.js.LICENSE.txt} +0 -0
- /package/dist/{main.1be0fc11ab24b99f8800.js.LICENSE.txt → main.14f083264cd64618d96a.js.LICENSE.txt} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export const __webpack_esm_id__=39518;export const __webpack_esm_ids__=[14319,39518,49342,78618];export const __webpack_esm_modules__={14319(e,t,n){n.d(t,{Ds:()=>r,VH:()=>i,nj:()=>s,vH:()=>o});const r=[{id:"empty",name:"No inference"},{id:"rdfs-optimized",name:"RDFS (Optimized)"},{id:"rdfs",name:"RDFS"},{id:"rdfsplus-optimized",name:"RDFS-Plus (Optimized)"},{id:"owl-horst-optimized",name:"OWL-Horst (Optimized)"},{id:"owl-horst",name:"OWL-Horst"},{id:"owl2-ql-optimized",name:"OWL2-QL (Optimized)"},{id:"owl2-ql",name:"OWL2-QL"},{id:"owl-max-optimized",name:"OWL-Max (Optimized)"},{id:"owl-max",name:"OWL-Max"},{id:"owl2-rl-optimized",name:"OWL2-RL (Optimized)"},{id:"owl2-rl",name:"OWL2-RL"}],i={graphdbRepo:"graphdb",free:"free",eeWorker:"worker",eeMaster:"master",ontop:"ontop",se:"se",fedx:"fedx"},o=new RegExp("^[a-zA-Z0-9-_]+$"),s=new RegExp("^[0-9]+$")},19935(e,t,n){n.d(t,{A:()=>s}),n(62979);var r=n(93462);const i={dispatch:r.dispatch,pointer:r.pointer};var o=o||{};o.Text=function(){function e(e,t,n,r){n=n||10;var i=t/3;return"string"==typeof e?(i*=10/(e.substring(0,t/3).length+1.5),i+=1,e.match(/[\u0900-\u0DFF\u1100-\u11FF\u2E80-\u2EFF\u3000-\u9FFF]/)&&(i*=.6),i<n&&(i=n),Math.round(i)):(i<n&&(i=n),Math.round(i))}return{calcFontSizeRaw:e,calcFontSize:function(t,n,r,i){return e(t,n,r)+"px"},getTextWithElipsisIfNeeded:function(e,t){return"string"==typeof e&&e.length>t?e.substring(0,t-3)+"...":e}}}(),o.Transition={fadeIn:function(e,t){e.style("opacity",0).transition().duration(t).style("opacity",1)},fadeOut:function(e,t){e.style("opacity",1).transition().duration(t).style("opacity",0)}},o.Click=function(){function e(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}return{delayDblClick:function(){var t=i.dispatch("click","dblclick");return function(t,n){let r,i=1,o=arguments.length;for(;++i<o;)r=arguments[i],t[r]=e(t,n,n[r]);return t}(function(e){var n,r=null;e.on("mousedown",function(){n=i.pointer(document.body),new Date}),e.on("mouseup",function(e,o){var s,a,c;a=n,c=i.pointer(document.body),Math.sqrt(Math.pow(a[0]-c[0],2),Math.pow(a[1]-c[1],2))>5||(r?(window.clearTimeout(r),r=null,t.call("dblclick",e,e,o)):r=window.setTimeout((s=e,function(){t.call("click",s,s,o),r=null}),250))})},t,"on")}}}();const s=o},39518(e,t,n){n(82493),n(96e3),n(18148);var r=n(19935),i=n(75468),o=n(93462),s=(n(32150),n(14319)),a=n(78618),c=n(6418),l=n(72155),d=n(57154);function p(e,t,n,p,u,f,h,g,m,y,v,x,S,I,w,k,L,b,C,T,N,P){const A=(0,d.service)(d.SecurityContextService),M=(0,d.service)(d.RepositoryContextService);e.languageChanged=!1,e.propertiesObj={},e.propertiesObj.items=[],e.propertiesQueryObj={},e.propertiesQueryObj.query="",e.propertiesSearchPlaceholder=C.instant("visual.search.instance.placeholder"),e.propertiesNotFiltered=[],e.searchVisible=!1,e.nodeSelected=!1,e.queryResultsMode=!1,e.embedded=g.search().embedded,e.openedNodeInfoPanel=void 0,e.invalidLimit=!1,e.INVALID_LINKS_MSG=C.instant("sidepanel.invalid.limit.links.msg"),e.INVALID_LINKS_TOOLTIP=C.instant("sidepanel.invalid.limit.links.tooltip"),e.datasource=void 0,e.adapterContainer={adapter:{remain:!0}},e.hasInitedRepository=!1,e.defaultSettings={linksLimit:20,includeInferred:!0,sameAsState:!0,truncateNodeLabels:!0,languages:["en"],showLinksText:!0,preferredTypes:[],rejectedTypes:[],preferredPredicates:[],rejectedPredicates:["http://dbpedia.org/property/logo","http://dbpedia.org/property/hasPhotoCollection","http://dbpedia.org/property/website","http://dbpedia.org/property/homepage","http://dbpedia.org/ontology/thumbnail","http://xmlns.com/foaf/0.1/depiction","http://xmlns.com/foaf/0.1/homepage","http://xmlns.com/foaf/0.1/mbox","http://dbpedia.org/ontology/wikiPage*","http://dbpedia.org/property/wikiPage*","http://factforge.net/*"],preferredTypesOnly:!1,preferredPredicatesOnly:!1,includeSchema:!0},e.saveSettings=_.cloneDeep(e.defaultSettings),e.defaultGraphConfig={id:"default",name:"Easy graph",startMode:"search"},t.key="",e.onopen=e.onclose=()=>angular.noop(),e.goToHome=()=>{z();const{config:e,...t}=g.search();g.path("/graphs-visualizations").search(t)},e.shouldShowSettings=()=>e.configLoaded&&e.configLoaded.id===e.defaultGraphConfig.id,e.shouldDisableSameAs=()=>{const t=$("#sameAsCheck");return e.settings&&!e.settings.includeInferred&&t.prop("checked")&&(t.prop("checked",!1),e.settings.sameAsState=!1),e.settings&&!e.settings.includeInferred},e.propertiesFilterFunc=t=>t.key.toLowerCase().indexOf(e.propertiesQueryObj.query.toLowerCase())>=0,e.toggleMoreInfo=e=>{angular.element(e.currentTarget).parent().next().toggle(200),angular.element(e.currentTarget).children("span").toggleClass("ri-arrow-down-s-line").toggleClass("ri-arrow-up-s-line")},e.copyToClipboard=e=>{v.openCopyToClipboardModal(e)},e.resetSettings=()=>{e.settings=_.cloneDeep(e.defaultSettings),e.validateLinksLimit(),B()},e.changeLimit=t=>{let n=e.settings.linksLimit+t;n<1&&(n=1),n>1e3&&(n=1e3),e.settings.linksLimit=n},e.validateLinksLimit=()=>{e.invalidLimit=!s.nj.test(e.settings.linksLimit)},e.showSettings=()=>{e.showInfoPanel=!0,e.showFilter=!0,e.showNodeInfo=!1,e.showPredicates=!1,e.saveSettings?e.settings=_.cloneDeep(e.saveSettings):e.settings=_.cloneDeep(e.defaultSettings),B()},e.updateSettings=()=>{e.invalidLimit?p.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?U(e.rootNodeIri):e.queryResultsMode&&g.search().query?q(g.search().query,g.search().sameAs,g.search().inference):"query"===e.configLoaded.startMode&&X(e.configLoaded),F(),e.showInfoPanel=!1,e.showFilter=!1,I.set(w.GRAPHS_VIZ,e.saveSettings))},e.getGraphConfigs=t=>{L.getGraphConfigs().success(function(n){e.graphConfigs=n,t&&t()}).error(function(e){p.error(getError(e),C.instant("graphexplore.error.graph.configs.short.msg"))})},e.findConfigById=function(t){return t===e.defaultGraphConfig.id?e.defaultGraphConfig:$.grep(e.graphConfigs,function(e){return e.id===t})[0]},e.easyGraphSearch=t=>{e.configLoaded=e.defaultGraphConfig,e.openUri(t)},e.deleteConfig=t=>{v.openSimpleModal({title:C.instant("common.confirm"),message:C.instant("graphexplore.delete.graph",{configName:t.name}),warning:!0}).result.then(function(){L.deleteGraphConfig(t).success(function(){e.getGraphConfigs(),e.refreshSavedGraphs()}).error(function(e){p.error(getError(e),C.instant("graphexplore.error.cannot.delete.config"))})})},e.goToGraphConfig=e=>{const t={config:e.id,[d.REPOSITORY_ID_PARAM]:M.getSelectedRepository().id};j(t,{config:e}),z(),X(e)},e.replaceIRIWithPrefix=t=>{const n=e.namespaces,r=_.findLast(n,function(e){return 0===t.indexOf(e.uri)});return r?r.prefix+":"+t.substring(r.uri.length):t};const R=[];R.push(t.$on("$translateChangeSuccess",function(){e.INVALID_LINKS_MSG=C.instant("sidepanel.invalid.limit.links.msg"),e.INVALID_LINKS_TOOLTIP=C.instant("sidepanel.invalid.limit.links.tooltip"),e.propertiesSearchPlaceholder=C.instant("visual.search.instance.placeholder")})),R.push(N.onAutocompleteEnabledUpdated(t=>{e.isAutocompleteEnabled=t})),R.push(M.onSelectedRepositoryChanged(t=>{t?P.getNamespaces(t.id).then(t=>{e.repositoryNamespaces=t,e.namespaces=t.namespaces}).catch(e=>{const t=getError(e);p.error(t,C.instant("error.getting.namespaces.for.repo"))}):e.repositoryNamespaces=new c.u})),R.push(e.$on("repositoryIsSet",function(t,n){const r=n||{newRepo:!1};r.newRepo&&(e.hasInitedRepository=!1),me(!!r.newRepo),r.newRepo&&(z(),$(".graph-visualization svg").empty(),g.search().query&&(e.goToHome(),W()))})),R.push(t.$watch(()=>t.key,()=>{te=0,_.each(e.propertiesObj.items,function(e){t.key>e&&te++}),ne++})),R.push(e.$watch("propertiesObj.items",()=>{angular.isDefined(e.propertiesObj.items)&&e.propertiesObj.items.length>0&&u(function(){e.adapterContainer.adapter.reload()},500)}));let O=!1,E=0;function G(e){O&&e.stopPropagation()}document.addEventListener("keydown",G,!0),e.$on("$destroy",()=>{R.forEach(e=>e()),document.removeEventListener("keydown",G,!0),window.onpopstate=null});const j=(t,n)=>{e.embedded&&(t.embedded=!0),g.search(t),n.skipOnPopState=!0,g.state(n)},z=()=>{e.searchVisible=!1,e.nodeSelected=!1,e.configLoaded=null,e.queryResultsMode=!1,e.lastSavedGraphName=null,e.lastSavedGraphId=null,e.shared=!1,e.numberOfPinnedNodes=0,re={},ie=0},D=()=>T.isActive()?e.defaultSettings:e.saveSettings,F=()=>{D().showLinksText?o.selectAll("svg .link-wrapper text").style("display","block"):o.selectAll("svg .link-wrapper text").style("display","none")},B=()=>{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}})},U=()=>{e.rootNodeIri&&e.$broadcast("onRootNodeChange",e.rootNodeIri)},W=()=>{g.search().query?(e.searchVisible=!1,e.queryResultsMode=!0,q(g.search().query,g.search().sameAs,g.search().inference)):e.$on("onRootNodeChange",function(t,n){e.loading=!0;const r=D();angular.isDefined(n)&&(e.rootNodeIri=n,b.getInstanceNode({iri:n,config:e.configLoaded?e.configLoaded.id:e.defaultGraphConfig.id,languages:e.shouldShowSettings()?r.languages:[],includeInferred:r.includeInferred,sameAsState:r.sameAsState}).then(function(t){e.nodeSelected=!0,e.searchVisible=!1,null===t.data.types&&(t.data.types="greyColor"),ge=new he;const n=ge.addNode(t.data,de/2,pe/2);le=ce,Ee(n,!0)}).catch(function(t){e.loading=!1,p.error(getError(t),C.instant("graphexplore.error.could.not.load.graph"))}))}),g.search().uri&&e.openUri(g.search().uri,!0),g.search().saved&&k.getSavedGraph(g.search().saved).success(function(t){e.loadSavedGraph(t)}).error(function(e){const t=getError(e);p.error(t,C.instant("graphexplore.error.could.not.open"))})},q=(t,n,r)=>{const i=D(),o=void 0===n?i.sameAsState:!0===n,s=void 0===r?i.includeInferred:!0===r;e.loading=!0,b.updateGraph({query:t,linksLimit:i.linksLimit,languages:e.shouldShowSettings()?i.languages:[],includeInferred:s,sameAsState:o}).then(function(e){Re(e)},function(t){e.loading=!1,p.error(getError(t.data),C.instant("graphexplore.error.cannot.load.graph"))})},K=(e,t)=>{const n=e.split(" ");return t?[n[0],n[1],n[2]].join(">"):[n[0],n[2]].join(">")},V=e=>[e.source.iri,e.target.iri].join(">"),H=e=>{if(e.isTriple){const t=document.getElementById((0,a.hK)(K(e.iri)));if(t&&void 0!==t.__data__.x)return t.__data__.x}return e.x},Z=e=>{if(e.isTriple){const t=document.getElementById((0,a.hK)(K(e.iri)));if(t&&void 0!==t.__data__.y)return t.__data__.y}return e.y},Q=e=>{const t=e.trim().split(" ");return`<<<${t[0]}> <${t[1]}> <${t[2]}>>>`},J=e=>{const t=e.source.isTriple?K(e.source.iri,!0):e.source.iri,n=e.target.isTriple?K(e.target.iri,!0):e.target.iri;return(0,a.hK)(`${t}>${n}>marker`)},Y=(e,t)=>{const n=t.map(t=>t[e]);return t.filter((t,r)=>n.indexOf(t[e])===r)},X=t=>{e.configLoaded=t,"search"===t.startMode?e.searchVisible=!0:"node"===t.startMode&&t.startIRI?u(function(){e.openUri(t.startIRI,!0)},0):"query"===t.startMode&&t.startGraphQuery&&(e.loading=!0,L.loadGraphForConfig(t,t.startQueryIncludeInferred,D().linksLimit,t.startQuerySameAs).then(function(e){Re(e)},function(t){e.loading=!1,p.error(getError(t),C.instant("graphexplore.error.graph.load"))}))},ee=function(){var t,n;g.search().config?(t=g.search().config,n=W,t===e.defaultGraphConfig.id?X(e.defaultGraphConfig):L.getConfig(t).then(e=>{X(e),n()}).catch(e=>{p.error(getError(e),C.instant("graphexplore.error.could.not.load.config",{configId:t}))})):g.search().query||g.search().uri?(X(e.defaultGraphConfig),W()):W()};S.onpopstate=function(t){t.state&&t.state.skipOnPopState||(z(),t.state&&(t.state.config?(X(t.state.config),t.state.uri&&e.openUri(t.state.uri,!0)):t.state.savedGraph&&e.loadSavedGraph(t.state.savedGraph,!0)))},e.embedded&&(g.search().query||g.search().uri||g.search().config||g.search().saved)&&(e.noGoHome=!0);let te=0,ne=0,re={},ie=0;const oe=16,se=o.zoom().scaleExtent([.1,10]);let ae;const ce=o.zoomIdentity.translate(0,-70).scale(1);se.on("zoom",function(e){T.isActive()||(le=e.transform,ae.attr("transform",le))});let le=ce;const de=1e3,pe=1e3;let ue,fe;function he(){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?Fe(e.source):_.find(t,function(t){return t.iri===e.source}),r=e.isTripleTarget?Fe(e.target):_.find(t,function(t){return t.iri===e.target});const i={source:n,target:r,predicates:e.predicates};if(e.isTripleSource||e.isTripleTarget){const e=`${i.source.isTriple?K(i.source.iri):i.source.iri}>${i.target.isTriple?K(i.target.iri):i.target.iri}`;if(ge.tripleLinksCopy.has(e)){const t=ge.tripleLinksCopy.get(e);return t[0].predicates.push(...i.predicates),t.push(i),ge.tripleLinksCopy.set(e,t),null}ge.tripleLinksCopy.set(e,[i])}return i})}(e,t));for(const e of ge.tripleLinksCopy.keys())1===ge.tripleLinksCopy.get(e).length&&ge.tripleLinksCopy.delete(e);this.links=this.links.filter(e=>null!==e),this.computeConnectedness()};const t=function(e,t){return n(e,t).length};function n(e,t){return _.filter(t,function(t){return t.source.iri===e.iri||t.target.iri===e.iri})}this.countLinks=t,this.linksTypes=function(e,t){const r=n(e,t),i=_.map(r,function(t){return t.source.iri===e.iri?t.target.types:t.source.types});return _.uniq(_.flatten(i))},this.linksPredicates=function(e,t){const r=n(e,t),i=_.map(r,function(e){return e.predicates});return _.uniq(_.flatten(i))},this.removeTriples=function(e){const t=[];this.tripleNodes.size>0&&e.forEach(e=>{this.tripleNodes.has(e)&&(this.tripleNodes.delete(e),this.links=_.reject(this.links,function(n){const r=e.split(">"),i=K(n.source.iri),o=K(n.target.iri);if(i===e&&ge.tripleNodes.delete(o)){const e=o.split(">");t.push({source:e[0],target:e[1]})}const s=i===e||o===e||n.source.iri===r[0]&&n.target.iri===r[1];return s&&(ge.tripleLinksCopy.delete(`${i}>${o}`),ge.tripleLinksCopy.delete(`${o}>${i}`)),s}))}),t.forEach(e=>{this.links=_.reject(this.links,function(t){return t.source.iri===e.source&&t.target.iri===e.target})})},this.removeNode=function(n){const r=[];this.links=_.reject(this.links,function(e){const t=e.source.iri===n.iri||e.target.iri===n.iri;return t&&(e.target.isTriple&&r.push(K(e.target.iri)),e.source.isTriple||e.target.isTriple||r.push([e.source.iri,e.target.iri].join(">"))),t}),this.removeTriples(r);const i=this.links;this.nodes=_.reject(this.nodes,function(e){return 0===t(e,i)}),0===this.nodes.length&&(e.nodeSelected=!1),this.computeConnectedness()},this.removeNodeLeafLinks=function(e){const r=[];let i=this.links;this.links=_.reject(this.links,function(o){let s=o.source.iri===e.iri&&1===t(o.target,i)&&!o.target.isTriple||o.target.iri===e.iri&&1===t(o.source,i)&&!o.source.isTriple;if(!s){let r;if(o.source.iri!==e.iri||2!==t(o.target,i)||o.target.isTriple?o.target.iri!==e.iri||2!==t(o.source,i)||o.source.isTriple||(r=n(o.source,i)):r=n(o.target,i),!r)return!1;s=(r[0].source.iri===e.iri||r[0].target.iri)&&(r[1].source.iri===e.iri||r[1].target.iri)}return s&&(o.target.isTriple&&r.push(K(o.target.iri)),o.source.isTriple||o.target.isTriple||r.push([o.source.iri,o.target.iri].join(">"))),s}),this.removeTriples(r),i=this.links,this.nodes=_.reject(this.nodes,function(n){return 0===t(n,i)&&n.iri!==e.iri}),this.computeConnectedness()},this.addTriple=function(e,t,n){e.x=t,e.y=n,e.weight=0;const r=K(e.iri);if(this.tripleNodes.has(r)){const t=this.tripleNodes.get(r);t.push(e),this.tripleNodes.set(r,t)}else e.weight=10,this.tripleNodes.set(r,[e])},this.copyState=function(){const e=_.map(this.nodes,function(e){return{iri:e.iri,isTriple:e.isTriple,size:e.size,labels:_.cloneDeep(e.labels),types:_.cloneDeep(e.types),rdfRank:e.rdfRank,x:e.x,y:e.y,fixed:e.fixed}}),t=JSON.stringify(Array.from(this.tripleNodes.entries())),n=JSON.stringify(Array.from(this.tripleLinksCopy.entries()));return{nodes:e,links:_.map(this.links,function(e){return{source:e.source.iri,isTripleSource:e.source.isTriple,target:e.target.iri,isTripleTarget:e.target.isTriple,predicates:e.predicates}}),tripleNodes:t,tripleLinksCopy:n,colorIndex:ie,type2color:re,transform:le}},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)&&(ie=t.colorIndex,re=_.cloneDeep(t.type2color)),angular.isDefined(t.transform)&&(le=o.zoomIdentity.translate(t.transform.x,t.transform.y).scale(t.transform.k)),Te()}}e.datasource={get:function(t,n,r){return y.initLazyList(t,n,r,te,e.propertiesObj.items)},revision:function(){return ne}},e.showInfoPanel=!1;let ge=new he;function me(t){!n.getActiveRepository()||e.hasInitedRepository&&!t||(e.hasInitedRepository=!0,t||e.getGraphConfigs(ee))}e.addedTag=function(t){return t.text.indexOf(":")<0?(p.warning(C.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=f.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?p.warning(C.instant("graphexplore.absolute.prefixed.iri.option"),t):p.warning(C.instant("graphexplore.absolute.prefixed.iri"),t),!1;const r=e.text.indexOf("*");if(r>=0){if(!n)return p.warning(C.instant("graphexplore.wildcards.not.allowed"),t),!1;if(r<e.text.length-1)return p.warning(C.instant("graphexplore.wildcards.last.char"),t),!1}return!0},e.getTagClass=function(e){return e.endsWith("*")?"tag-item-wildcard":null},e.getActiveRepository=function(){return n.getActiveRepository()},e.isLicenseValid=function(){return(0,d.service)(d.LicenseContextService).getLicenseSnapshot().valid};const ye=500,ve=1.75,xe=o.scaleLinear().domain([0,9]).range(["hsl(0, 100%, 75%)","hsl(360, 90%, 82%)"]).interpolate(o.interpolateHslLong),Se=o.scaleLinear().domain([0,9]).range(["hsl(180, 50%, 75%)","hsl(540, 40%, 82%)"]).interpolate(o.interpolateHslLong);e.getColor=function(e){angular.isUndefined(re[e])&&(re[e]=ie,ie++);const t=re[e];return t>39?"#c2c2c2":t%2==0?xe(t/2):Se(t/2)};const Ie=o.forceX(de/2).strength(.005),we=o.forceY(pe/2).strength(.005),ke=o.forceSimulation().force("x",Ie).force("y",we),Le=o.select(".main-container .graph-visualization").append("svg").attr("viewBox","0 0 "+de+" "+pe).attr("preserveAspectRatio","xMidYMid meet");let be=0,Ce=0;const _e=new function(){this.state=!1,this.setLoadingState=function(e){this.state=e},this.getLoadingState=function(){return this.state},this.init=function(e,t){o.select(t).append("circle").attr("cx",function(){return e.x}).attr("cy",function(){return e.y}).attr("class","loader-container").attr("r",function(){return e.size}).style("fill","fff").style("opacity","0.7"),o.select(t).append("image").attr("xlink:href","js/angular/templates/loader/ot-loader.svg?v=3.3.2-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 Te(t){o.selectAll("svg g").remove(),o.selectAll(".d3-tip").remove(),o.selectAll(".menu-events").remove(),ae=Le.append("g").attr("class","nodes-container").attr("transform",function(){return angular.isDefined(le)&&!t?le:""});const n=(0,i.A)().attr("class","d3-tip").customPosition(function(){const e=ue.getBoundingClientRect();return{top:e.bottom+10+"px",left:e.left-30+"px"}}).html(function(t){let n="";return t.fixed&&(n+='<i class="ri-pushpin-line"></i> '),t.types.length>0?n+=t.types.map(t=>`<div> · ${e.replaceIRIWithPrefix(t)}</div>`).join(""):n+=`<i>${C.instant("visual.node.tooltip.no_types")}</i>`,n}),s=function(e){let t="";return t+=_.join(_.map(e.predicates,function(t,n){if(0===n)return Ue(t);if(n<10)return" · "+Ue(t);if(10===n){const t=function(e){return e.predicates.length-10}(e),n=t>1?t+" predicates":t+" predicate";return" · "+C.instant("graphexplore.tip.text",{textToShow:n})}}),""),t};let c,d;const f=(0,i.A)().attr("class","d3-tip").customPosition(function(e){const t=c.getBoundingClientRect(),n=function(e){const t=s(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 s(e)});let h;const g=function(){u.cancel(h),u.cancel(be),ue=null,n.hide(),Ce=u(function(){Ge()},500)};Le.call(n),Le.call(f);let m=Le.selectAll(".link"),y=Le.selectAll(".node");const v=o.forceCollide(e=>e.size+5).strength(.5),x=o.forceManyBody().strength(-300),S=o.forceCenter(de/2,pe/2);ke.nodes(ge.nodes).force("charge",x).force("collide",v).force("center",S).force("link",o.forceLink(ge.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})),ae.append("defs").selectAll("marker").data(ge.links).enter().append("marker").attr("class","arrow-marker").attr("id",function(e){return J(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"),m=ae.selectAll(".link").data(ge.links).enter().append("g").attr("class","link-wrapper").attr("id",function(e){return(0,a.hK)(V(e))}).append("line").attr("class","link").style("stroke-width",1).style("fill","transparent").style("marker-end",function(e){return`url(#${J(e)})`});const I=ae.selectAll(".link-wrapper").append("text").text(function(e){return Be(e)}).attr("class",function(e){return e.predicates.length>1||ge.tripleNodes.has(V(e))?"predicates":"predicate"}).attr("dy","-0.5em").style("text-anchor","middle").style("display",D().showLinksText?"":"none").on("mouseover",function(e,t){e.stopPropagation(),function(e,t){u.cancel(d);const n=c=e.target;u(function(){c===n&&t.predicates.length>1&&f.show(t,c)},300)}(e,t)}).on("mouseout",function(){u.cancel(d),c=null,f.hide()}).on("click",function(t,n){t.stopPropagation(),function(t,n){$e();const r=V(n);if(1===n.predicates.length&&ge.tripleNodes.has(r)){fe=null;const e=ge.tripleNodes.get(r)[0];if(Ae(e,t.currentTarget,t.button)){const t={};t.iri=e.iri,t.pred=Ue(e.iri.split(" ")[1]),ze(t)}return}!function(t){if(e.showNodeInfo=!1,e.showPredicates=t.predicates.length>1,e.showFilter=!1,e.showInfoPanel=!1,fe===t)return e.showNodeInfo=!1,e.showInfoPanel=!1,void(fe=null);fe=t,e.showPredicates&&(e.predicates=_.map(t.predicates,function(e){const n=function(e,t){const n=V(t);return ge.tripleNodes.has(n)?ge.tripleNodes.get(n).findIndex(t=>t.iri.indexOf(e)>=0):-1}(e,t),r=n>-1;return{value:Ue(e),partOfTriple:r,linkId:r?V(t):"",nodeIndex:n}}),e.showInfoPanel=!0)}(n)}(t,n)});let w,k=0,L=null,b=null;const N=function(t,n,r){const i=Array.isArray(r)?r[n]:r;ge.countLinks(t,ge.links)<=D().linksLimit?Ee(t,!1,i):p.info(C.instant("graphexplore.increase.limit"),C.instant("graphexplore.node.at.max")),e.closeInfoPanel()};function P(e,t){let n,r,i,o,s=!0;if("down"===t)n=2*e.size,r=e.size/3,i=.8,o=.3;else if("down-fixed"===t)n=2*e.size,r=e.size,i=.8,o=.66;else if("up"===t)n=e.size/3,r=2*e.size,i=.3,o=.8;else{if("fixed"!==t)return;n=e.size,i=.66,s=!1}let a=ae.selectAll(".node-wrapper").filter(function(t){return t===e}).append("text").text("").classed("icon-any pinned",!0).style("font-size",n+"px").attr("x",function(e){return e.x}).attr("y",function(e){return e.y}).attr("opacity",i);"fixed"!==t&&"down-fixed"!==t||(e.pin=a),s&&(a=a.transition().duration(1e3).style("font-size",function(){return r+"px"}).attr("opacity",o),"down-fixed"!==t&&a.remove())}const A=o.drag().subject(function(e){return e}).on("start",function(e,t){T.isActive()||0===e.sourceEvent.button&&(t.fixedBeforeDrag=t.fixed,t.isBeingDragged=!0,t.beginDragging=!0,Ge(),o.select(e.currentTarget).classed("dragging",!0),ke.alphaTarget(.3).restart())}).on("drag",function(t,n){n.isBeingDragged&&(n.fx=t.x,n.fy=t.y,n.fixed?n.beginDragging&&P(n,"fixed"):(e.numberOfPinnedNodes++,n.fixed=!0,P(n,"down-fixed")),n.pinWasFixed=!0,n.beginDragging=null)}).on("end",function(e,t){t.isBeingDragged&&(t.pinWasFixed&&(t.pinWasFixed=null,o.select(".pinned").remove()),t.isBeingDragged=!1,o.select(e.currentTarget).classed("dragging",!1)),ke.alphaTarget(0)});y=ae.selectAll(".node").data(ge.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){if(!r.isBeingDragged){u.cancel(Ce);const i=t.currentTarget;be=u(()=>{(function(t,n){return!e.showInfoPanel&&((Pe.closeIcon||Pe.expandIcon||Pe.focusIcon||Pe.copyURIIcon)&&Pe.removeIcons(),ke.alpha()<.1&&(Pe.initIcons(t,n.parentNode),ke.stop(),Ne(),!0))})(r,i)&&function(e,t){u.cancel(h);const r=ue=t.target;u(function(){ue===r&&n.show(e,ue)},300)}(r,t)},400)}}).on("mouseout",g).on("click",function(t,n){if(t.button&&0!==t.button)return;const r=t.currentTarget;if(L&&b===r)return u.cancel(L),L=null,void N(n,0,r.parentNode);b=r,g(),e.showPredicates=!1,T.isActive()||(u.cancel(L),L=u(function(){Ae(n,0,t),L=null},40+ye))}).on("touchstart",(e,t)=>function(e){k=0,w=u(function(){k<5&&Me(e),w=null},1e3)}(t)).on("touchmove",function(){k++}).on("touchend",function(){u.cancel(w),w=null}).on("contextmenu",function(t,r){t.shiftKey||(t.preventDefault(),Ge(),e.closeInfoPanel(),r.fixed?(e.numberOfPinnedNodes--,r.fixed=!1,r.fx=null,r.fy=null,P(r,"up"),ke.alpha(1).restart()):(e.numberOfPinnedNodes++,r.fixed=!0,P(r,"down")),function(e){ue&&n.show(e,ue)}(r))}).on("gdb-expand-node",(e,t)=>N(t,0,e.srcElement.parentNode)).on("gdb-show-node-info",(e,t)=>je(t)).call(A);const M=e.saveSettings.truncateNodeLabels?"hidden":"visible",R=ae.selectAll(".node-wrapper").append("foreignObject").style("pointer-events","none").style("overflow",M).attr("width",function(e){return 2*e.size*ve});ae.insert("g").attr("class","menu-events"),(t=>{t.each(function(e){e.fontSize=r.A.Text.calcFontSizeRaw(e.labels[0].label,e.size,oe,!0)}).attr("height",function(e){return 4.2*e.fontSize}).append("xhtml:div").attr("class","node-label-body").classed("truncated-label",e.saveSettings.truncateNodeLabels).style("font-size",function(e){return e.fontSize+"px"}).append("xhtml:div").html(function(e){return l.U.getText(e.labels[0].label).replaceAll("\n","<br>")})})(R),ke.on("tick",function(){m.attr("x1",function(e){return H(e.source)}).attr("y1",function(e){return Z(e.source)}).attr("x2",function(e){return H(e.target)}).attr("y2",function(e){return Z(e.target)}),I.attr("x",function(e){const t=H(e.source),n=H(e.target);return e.x=.5*(t+n)}).attr("y",function(e){const t=Z(e.source),n=Z(e.target);return e.y=.5*(t+n)}).attr("transform",function(e){return"rotate("+function(e,t){const n=H(e.source),r=Z(e.source),i=H(e.target),o=Z(e.target);if(t)return 180*Math.atan2(o-r,i-n)/Math.PI;{const e=180*Math.atan2(o-r,i-n)/Math.PI;return e<=90&&e>=-90?e:(e>0?-1:1)*(180-Math.abs(e))}}(e,e.direction)+", "+e.x+", "+e.y+")"}),y.attr("cx",function(e){return e.x}).attr("cy",function(e){return e.y}),ae.select(".node-loader").attr("x",function(e){return e.x-e.size+3}).attr("y",function(e){return e.y-e.size}),ae.select(".loader-container").attr("cx",function(e){return e.x}).attr("cy",function(e){return e.y}),R.attr("x",function(e){return e.x-e.size*ve}).attr("y",function(e){return e.y-4.2*e.fontSize/2}),o.select(".pinned").attr("x",function(e){return e.x}).attr("y",function(e){return e.y}),Ne()}),angular.isDefined(_e)&&_e.setLoadingState(!1),e.loading&&(e.loading=!1),o.selectAll(".link-wrapper").each(function(){const e=$(this).attr("id").split(">")[0],t=$(this).attr("id").split(">")[1];o.selectAll(".link").each(function(n){const r=(0,a.hK)(n.source.iri),i=(0,a.hK)(n.target.iri);if(r===t&&i===e){let e=r;e+=">",e+=i;const t=document.createTextNode(" ⟶");document.getElementById(e).lastChild.appendChild(t),n.direction="double"}})}),o.selectAll(".d3-actions-tip").remove(),ke.alpha(.3).restart()}function Ne(){t.d3alpha=ke.alpha()}const Pe=new function(){function n(e,t){return"translate("+(t.x-14+(t.size+15)*Math.cos(e*Math.PI/180-Math.PI/2))+","+(t.y-14+(t.size+15)*Math.sin(e*Math.PI/180-Math.PI/2))+")"}this.closeIcon=void 0,this.expandIcon=void 0,this.collapseIcon=void 0,this.focusIcon=void 0,this.copyURIIcon=void 0,this.actionsTip=void 0,this.removeIcons=function(){this.closeIcon.remove("g"),this.expandIcon&&this.expandIcon.remove("g"),this.collapseIcon&&this.collapseIcon.remove("g"),this.focusIcon.remove("g"),this.copyURIIcon.remove("g"),this.closeIcon=void 0,this.expandIcon=void 0,this.collapseIcon=void 0,this.focusIcon=void 0,this.copyURIIcon=void 0,this.expandedState=!1},this.expandedState=!1,this.initIcons=function(r,s){const a=(0,i.A)().attr("class","d3-tip d3-actions-tip").customPosition(function(e,t){const n=t.target.getBoundingClientRect();return{top:n.top-20+"px",left:n.right+10+"px"}}).html(function(e){return e});Le.call(a),r.isExpanded?(this.collapseIcon=o.select(".menu-events").append("g").attr("class","collapse-icon").attr("name","collapse").attr("transform",function(){return n(20,r)}),this.collapseIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.collapseIcon.append("path").attr("d","M22.67,12a.59.59,0,0,1-.53.65l-6.88.72H15.2a.59.59,0,0,1-.59-.65l.72-6.88A.58.58,0,0,1,16,5.33a.59.59,0,0,1,.53.65L16,11.11,21.3,5.79a.64.64,0,0,1,.91.91L16.89,12,22,11.49A.59.59,0,0,1,22.67,12ZM12.59,14.75l-6.75.85a.59.59,0,0,0-.51.66.58.58,0,0,0,.66.51l4.95-.62-5.2,5.2a.64.64,0,1,0,.91.91l5.2-5.2L11.23,22a.59.59,0,0,0,.51.66h.07a.59.59,0,0,0,.59-.52l.85-6.75a.59.59,0,0,0-.17-.49A.58.58,0,0,0,12.59,14.75Z").style("fill","var(--gw-primary-base)"),this.collapseIcon.on("click",function(){var e;(e=r).isExpanded=!1,ge.removeNodeLeafLinks(e),Te()}).on("mouseover",function(e){a.show(e.currentTarget.getAttribute("name"),e),u.cancel(be),u.cancel(Ce)}).on("mouseout",function(){a.hide(),Ce=u(function(){Ge()},500)})):(this.expandIcon=o.select(".menu-events").append("g").attr("class","expand-icon").attr("name","expand").attr("transform",function(){return n(20,r)}),this.expandIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.expandIcon.append("path").attr("d","M22.37,6.28l-.72,6.88a.59.59,0,0,1-.59.53H21a.59.59,0,0,1-.53-.65L21,7.9l-5.32,5.32a.64.64,0,0,1-.91-.91L20.1,7,15,7.53a.59.59,0,0,1-.12-1.18l6.88-.72a.59.59,0,0,1,.65.65ZM12.89,20.34,7.95,21l5.2-5.2a.64.64,0,0,0-.91-.91L7,20.05l.62-4.95A.59.59,0,0,0,6.48,15l-.85,6.75a.59.59,0,0,0,.59.67h.07L13,21.52a.59.59,0,1,0-.15-1.18Z").style("fill","var(--gw-primary-base)"),this.expandIcon.on("click",function(){Ee(r,!1,s)}).on("mouseover",function(e){a.show(e.currentTarget.getAttribute("name"),e),u.cancel(Ce),u.cancel(be)}).on("mouseout",function(){a.hide(),Ce=u(function(){Ge()},500)})),this.focusIcon=o.select(".menu-events").append("g").attr("class","focus-icon").attr("name","focus").attr("transform",function(){return n(20,r)}),this.focusIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.focusIcon.append("path").attr("d","M14.2,23.81a9.8,9.8,0,1,1,6.93-2.87h0A9.74,9.74,0,0,1,14.2,23.81Zm0-18.17a8.37,8.37,0,1,0,5.92,14.29h0A8.37,8.37,0,0,0,14.2,5.64Zm1.42,6.95a2,2,0,1,0,0,2.85A2,2,0,0,0,15.62,12.59Z").style("fill","var(--gw-primary-base)"),this.focusIcon.on("click",function(){t.$broadcast("onRootNodeChange",r.iri)}).on("mouseover",function(e){a.show(e.currentTarget.getAttribute("name"),e),u.cancel(Ce),u.cancel(be)}).on("mouseout",function(){a.hide(),Ce=u(function(){Ge()},500)}),this.copyURIIcon=o.select(".menu-events").append("g").attr("class","ri-links-line").attr("name","link").attr("transform",function(){return n(20,r)}),this.copyURIIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.copyURIIcon.append("path").attr("d","M 13.457031 10.164062 C 13.648438 10.164062 13.820312 10.242188 13.941406 10.363281 L 15.492188 11.859375 C 15.984375 12.332031 16.292969 12.992188 16.292969 13.714844 C 16.292969 14.441406 15.984375 15.097656 15.492188 15.574219 L 10.394531 20.496094 C 9.902344 20.972656 9.222656 21.265625 8.472656 21.265625 C 7.71875 21.265625 7.039062 20.972656 6.546875 20.496094 L 4.996094 19 C 4.507812 18.523438 4.203125 17.867188 4.203125 17.144531 C 4.203125 16.421875 4.507812 15.765625 4.996094 15.289062 L 7.542969 12.824219 C 7.667969 12.707031 7.84375 12.628906 8.035156 12.628906 C 8.417969 12.628906 8.726562 12.929688 8.726562 13.300781 C 8.726562 13.484375 8.648438 13.652344 8.523438 13.773438 L 5.976562 16.234375 C 5.738281 16.46875 5.589844 16.792969 5.589844 17.148438 C 5.589844 17.503906 5.738281 17.824219 5.976562 18.058594 L 7.527344 19.566406 C 7.773438 19.792969 8.105469 19.929688 8.472656 19.929688 C 8.835938 19.929688 9.167969 19.792969 9.414062 19.566406 L 14.511719 14.644531 C 14.753906 14.410156 14.90625 14.089844 14.90625 13.730469 C 14.90625 13.375 14.753906 13.054688 14.511719 12.820312 L 12.964844 11.324219 C 12.839844 11.203125 12.761719 11.039062 12.761719 10.855469 C 12.761719 10.488281 13.070312 10.1875 13.449219 10.1875 Z M 17.082031 3.976562 C 17.082031 3.976562 17.085938 3.976562 17.085938 3.976562 C 17.824219 3.976562 18.492188 4.261719 18.980469 4.722656 L 20.535156 6.203125 C 21.042969 6.679688 21.355469 7.34375 21.355469 8.082031 C 21.355469 8.792969 21.058594 9.441406 20.582031 9.914062 L 18.0625 12.402344 C 17.9375 12.527344 17.761719 12.605469 17.566406 12.605469 C 17.183594 12.605469 16.875 12.304688 16.875 11.9375 C 16.875 11.753906 16.949219 11.589844 17.070312 11.46875 L 19.605469 8.984375 C 19.847656 8.75 19.996094 8.429688 19.996094 8.070312 C 19.996094 7.714844 19.847656 7.394531 19.605469 7.160156 L 18.019531 5.667969 C 17.773438 5.445312 17.4375 5.304688 17.070312 5.300781 C 16.703125 5.304688 16.367188 5.453125 16.128906 5.691406 L 11.085938 10.667969 C 10.84375 10.898438 10.695312 11.222656 10.695312 11.578125 C 10.695312 11.933594 10.84375 12.257812 11.085938 12.488281 L 12.675781 13.980469 C 12.804688 14.101562 12.882812 14.273438 12.882812 14.457031 C 12.882812 14.828125 12.574219 15.128906 12.191406 15.128906 C 12.003906 15.128906 11.832031 15.054688 11.707031 14.9375 L 10.140625 13.457031 C 9.636719 12.980469 9.324219 12.316406 9.324219 11.582031 C 9.324219 10.863281 9.621094 10.214844 10.101562 9.742188 L 15.140625 4.765625 C 15.625 4.285156 16.304688 3.980469 17.054688 3.976562 Z M 17.082031 3.976562").style("fill","var(--gw-primary-base)"),this.copyURIIcon.on("click",function(){e.copyToClipboard(r.iri),Ge(),a.hide()}).on("mouseover",function(e){a.show("<div style='text-align: center;'><b>Copy to ClipBoard</b><br>"+r.iri+"</div>",e),u.cancel(Ce),u.cancel(be)}).on("mouseout",function(){a.hide(),Ce=u(function(){Ge()},500)}),this.closeIcon=o.select(".menu-events").append("g").attr("class","close-icon").attr("name","remove").attr("transform",function(){return n(20,r)}),this.closeIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.closeIcon.append("path").attr("d","M14.94,14l5.87-5.87a.66.66,0,1,0-.94-.94L14,13.06,8.13,7.19a.66.66,0,0,0-.94.94L13.06,14,7.19,19.87a.66.66,0,1,0,.94.94L14,14.94l5.87,5.87a.66.66,0,1,0,.94-.94Z").style("fill","var(--gw-primary-base)"),this.closeIcon.on("click",function(){Me(r)}).on("mouseover",function(e){a.show(e.currentTarget.getAttribute("name"),e),u.cancel(Ce),u.cancel(be)}).on("mouseout",function(){a.hide(),Ce=u(function(){Ge()},500)}),this.animateMenu(r)},this.animateMenu=function(e){const t=100,r=o.easeSin;let i=0,s=20;this.expandIcon&&this.expandIcon.transition().duration(t).style("opacity",1).ease(r).attr("transform",function(){return n(s,e)}).delay(i+=35),this.collapseIcon&&this.collapseIcon.transition().duration(t).style("opacity",1).ease(r).attr("transform",function(){return n(s,e)}).delay(i+=35),this.copyURIIcon.transition().duration(t).style("opacity",1).ease(r).attr("transform",function(){return s+=30,n(s,e)}).delay(i+=35),this.focusIcon.transition().duration(t).style("opacity",1).ease(r).attr("transform",function(){return s+=30,n(s,e)}).delay(i+=35),this.closeIcon.transition().duration(t).style("opacity",1).ease(r).attr("transform",function(){return s+=30,n(s,e)}).delay(i+=35),this.expandedState=!0}};function Ae(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?(Me(n),!1):void 0!==e.openedNodeInfoPanel&&e.openedNodeInfoPanel===n?(e.pageslideExpanded=!1,e.openedNodeInfoPanel=void 0,!1):(je(n),!0)}function Me(e){ge.removeNode(e),Te()}function Re(t){!function(t){e.nodeSelected=!0,null===t.data.types&&(t.data.types="greyColor"),ge=new he,le=ce}(t),Oe(t)}function Oe(t,n,r){let i=t.data;i=_.filter(i,function(e){return-1===_.findIndex(ge.links,function(t){return e.source===t.source.iri&&e.target===t.target.iri})});const o=[],s=ge.tripleLinksCopy.values();for(let e=0;e<ge.tripleLinksCopy.size;e++)s.next().value.forEach(e=>{o.push(e)});i=_.filter(i,function(e){return-1===_.findIndex(o,function(t){return e.source===t.source.iri&&e.target===t.target.iri})}),i=_.filter(i,function(e){return e.source!==e.target});const a=Y("iri",_.union(_.flatten(_.map(t.data,function(e){return[{iri:e.source,isTriple:e.isTripleSource},{iri:e.target,isTriple:e.isTripleTarget}]})))),c=_.map(ge.nodes,function(e){return{iri:e.iri,isTriple:Boolean(e.isTriple)}}),l=ge.tripleNodes.values();for(let e=0;e<ge.tripleNodes.size;e++)l.next().value.forEach(e=>{c.push({iri:e.iri,isTriple:e.isTriple})});const d=_.reject(a,function(e){return _.some(c,e)});if(0===d.length){const e=a.length>0?a.length-1:0;(r||0===i.length)&&p.info(C.instant("graphexplore.error.node.connections",{count:e})),ge.addAndMatchLinks(i),Te()}else{const t=[],r=[],o=D();_.forEach(d,function(n,i){t.push(b.getInstanceNode({iri:n.isTriple?Q(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}))}),h.all(t).then(function(){_.forEach(r,function(e,t){const i=2*Math.PI*t/r.length,o=(n?n.x:0)+Math.cos(i)*pe/3,s=(n?n.y:0)+Math.sin(i)*pe/3;e.isTriple?ge.addTriple(e,o,s):ge.addNode(e,o,s)}),ge.addAndMatchLinks(i),n&&(n.isExpanded=!0),Te()})}}function Ee(t,n,r){if(_e.getLoadingState())return;_e.init(t,r);const i=D(),o=t.iri;b.getInstanceNodeLinks({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){Oe(e,t,n)},function(t){const n=getError(t.data);p.error(n,C.instant("graphexplore.error.exploring.node")),e.loading=!1,_e.setLoadingState(!1)})}function Ge(){angular.isDefined(Pe)&&Pe.expandedState&&Pe.removeIcons()}function je(t){ke.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(Q(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=D();b.getProperties({iri:t.isTriple?Q(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){p.warning(getError(e.data),"Error")})}function ze(e){De("predicate","var(--gw-primary-dark)",e),De("predicates","var(--gw-primary-dark)",e);const t=document.getElementsByClassName("link");t&&_.each(t,function(t){const n=t.__data__;(n.source.iri.indexOf(e.iri)>=0||n.target.iri.indexOf(e.iri)>=0)&&(t.style.stroke="var(--gw-primary-dark)",t.style.strokeWidth=4)});const n=document.getElementsByClassName("arrow-marker");n&&_.each(n,function(t){const n=t.__data__;(n.source.iri.indexOf(e.iri)>=0||n.target.iri.indexOf(e.iri)>=0)&&(t.style.stroke="var(--gw-primary-dark)",t.__data__.target.isTriple||t.setAttribute("refX","23"))})}function De(e,t,n){const r=document.getElementsByClassName(e);r&&_.each(r,function(e){const r=e.__data__;n?((r.source.iri.indexOf(n.iri)>=0||r.target.iri.indexOf(n.iri)>=0)&&(e.style.fill=t),K(n.iri)===V(r)&&(e.textContent=n.pred,e.style.fill=t),n.oppLinkIRI&&n.oppLinkIRI===V(r)&&(e.textContent=n.oppTriplePred,e.style.fill=t)):(e.style.fill=t,e.textContent=Be(r))})}function $e(){_.each(e.predicates,function(e){const t=document.getElementById(e.linkId+e.nodeIndex);t&&(t.style.fontWeight="normal")});const t=document.getElementsByClassName("link");t&&_.each(t,function(e){e.style.stroke="#999",e.style.strokeWidth=1}),De("predicate",""),De("predicates","");const n=document.getElementsByClassName("arrow-marker");n&&_.each(n,function(e){e.style.stroke="#999",e.__data__.target.isTriple||e.setAttribute("refX","59")})}function Fe(e){const t=K(e);if(ge.tripleNodes.has(t))return ge.tripleNodes.get(t).find(t=>t.iri===e)}function Be(e){return e.predicates.length>1?e.predicates.length+" predicates":Ue(e.predicates[0])}function Ue(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=[],fe=null,u(function(){e.showInfoPanel=!1})},e.clickLink=function(t){if(ge.tripleNodes.has(t.linkId)){$e();const n=ge.tripleNodes.get(t.linkId)[t.nodeIndex];je(n),e.showPredicates=!0;const r=document.getElementById(t.linkId+t.nodeIndex);r&&(r.style.fontWeight="bold");const i={},o=ge.tripleLinksCopy.values();for(let e=0;e<ge.tripleLinksCopy.size;e++){const e=o.next().value;e.length>1&&e.every(t=>t.source.iri===n.iri?(i.iri=e[0].source.iri,t.target.isTriple&&(i.oppLinkIRI=K(t.target.iri),i.oppTriplePred=Ue(t.target.iri.split(" ")[1])),i.pred=Ue(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=K(t.source.iri),i.oppTriplePred=Ue(t.source.iri.split(" ")[1])),i.pred=Ue(n.iri.split(" ")[1]),1===t.predicates.length&&(i.linkPred=t.predicates[0]),!1))}i.iri||(i.iri=n.iri,i.pred=Ue(n.iri.split(" ")[1])),ze(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){Ge();const t=10*(e?1:-1)*Math.PI/180,n=Math.cos(t),r=Math.sin(t),i=de/2,s=pe/2;o.selectAll(".node-wrapper").each(function(e){e.x=i+(n*(e.x-i)+r*(e.y-s)),e.y=s+(-r*(e.x-i)+n*(e.y-s)),e.fixed&&(e.fx=e.x,e.fy=e.y)}),ke.alpha(1).restart()},e.openUri=function(t,n){if(!n){const n={};e.configLoaded.id!==e.defaultGraphConfig.id&&(n.config=e.configLoaded.id),n.uri=t,n[d.REPOSITORY_ID_PARAM]=M.getSelectedRepository().id,j(n,{uri:t,config:e.configLoaded})}e.$broadcast("onRootNodeChange",t)},e.saveOrUpdateGraph=function(){const t=JSON.stringify(ge.copyState()),n={id:e.lastSavedGraphId,name:e.lastSavedGraphName,data:t,shared:e.shared,repositoryId:M.getSelectedRepository().id};n.id?e.saveGraphModal("update",n):e.saveGraphModal("new",n)},e.renameSavedGraph=function(t){e.saveGraphModal("rename",{id:t.id,name:t.name,config:t.config,shared:t.shared})};e.saveGraphModal=function(t,n,r){const i=x.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}}}});E++,O=!0,i.result.then(function(t){if(t.restart)e.saveGraphModal(t.mode,t.graph,!1);else switch(t.mode){case"new":!function(t){e.configLoaded&&(t.config=e.configLoaded.id),k.addNewSavedGraph(t).success(function(n,r,i){e.lastSavedGraphName=t.name,e.lastSavedGraphId=i()["x-saved-graph-id"],e.shared=t.shared,e.refreshSavedGraphs(),p.success(C.instant("graphexplore.saved.graph",{name:t.name}))}).error(function(n,r){if(422===r)e.saveGraphModal("new",t,!0);else{const e=getError(n);p.error(e,C.instant("graphexplore.error.cannot.create.graph"))}})}(t.graph);break;case"update":case"rename":n=t.graph,k.editSavedGraph(n).success(function(){e.lastSavedGraphName=n.name,e.shared=n.shared,e.refreshSavedGraphs(),p.success(C.instant("graphexplore.saved.graph.was.edited",{name:n.name}))}).error(function(e){const t=getError(e);p.error(t,C.instant("graphexplore.error.cannot.edit"))})}var n}).finally(()=>{E--,E<=0&&(O=!1,E=0)})},e.refreshSavedGraphs=function(){k.getSavedGraphs().success(function(t){e.savedGraphs=t}).error(function(e){const t=getError(e);p.error(t,C.instant("graphexplore.error.getting.saved.graphs"))})},e.loadSavedGraph=function(t,n){t.owner?(e.lastSavedGraphName=t.name,e.lastSavedGraphId=t.id,e.shared=t.shared,e.configLoaded=e.findConfigById(t.config)):(e.lastSavedGraphName=null,e.lastSavedGraphId=null,e.shared=t.shared),e.configLoaded||(e.configLoaded=e.defaultGraphConfig);const r={...g.search(),saved:t.id,[d.REPOSITORY_ID_PARAM]:M.getSelectedRepository().id};ge.restoreState(JSON.parse(t.data)),n||j(r,{savedGraph:t})},e.copyToClipboardSavedGraph=function(t){const n=new URL(window.location.href);n.searchParams.set("saved",t.id),n.searchParams.set(d.REPOSITORY_ID_PARAM,M.getSelectedRepository().id),e.copyToClipboard(n.toString())},e.deleteSavedGraph=function(t){v.openSimpleModal({title:C.instant("common.confirm"),message:C.instant("graphexplore.confirm.delete.graph",{graphName:t.name}),warning:!0}).result.then(function(){!function(t){k.deleteSavedGraph(t).success(function(){e.refreshSavedGraphs(),p.success(C.instant("graphexplore.saved.graph.was.deleted",{name:t.name}))}).error(function(e){const t=getError(e);p.error(t,C.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(){Ge();const t=angular.isUndefined(e.numberOfPinnedNodes)||e.numberOfPinnedNodes<=0;e.numberOfPinnedNodes=0,o.selectAll(".node").each(function(n){n.fixed=t,t?(e.numberOfPinnedNodes++,n.fx=n.x,n.fy=n.y):(n.fx=null,n.fy=null)}),ke.alpha(1).restart()},$("body").on("keydown",function(t){!T.isActive()&&"input"!==t.target.nodeName&&e.nodeSelected&&(37===t.keyCode?e.rotate(!0):39===t.keyCode&&e.rotate(!1))}),e.getLiteralFromPropValue=function(e){return e.substring(e.indexOf(":")+1)};let We=!1;(()=>{if(!We){Le.append("rect").attr("width",10*de).attr("height",10*pe).attr("x",-(10*de-de)/2).attr("y",-(10*pe-pe)/2).style("fill","none").style("pointer-events","all").call(se).on("click",function(e){e.stopPropagation(),Ge(),ke.stop()});const e=e=>{e.preventDefault()};Le.node().addEventListener("wheel",e,{passive:!1}),R.push(()=>Le.node().removeEventListener("wheel",e)),We=!0}(t=>{const n=t.appSettings;e.defaultSettings.includeInferred=n.DEFAULT_INFERENCE,e.defaultSettings.sameAsState=n.DEFAULT_INFERENCE&&n.DEFAULT_SAMEAS,e.defaultSettings.includeSchema=n.DEFAULT_VIS_GRAPH_SCHEMA;const r=I.get(w.GRAPHS_VIZ);if(r&&"object"==typeof r)try{e.saveSettings=r,void 0===e.saveSettings.includeSchema&&(e.saveSettings.includeSchema=e.defaultSettings.includeSchema,e.saveSettings.rejectedPredicates=[...e.saveSettings.rejectedPredicates,...e.defaultSettings.rejectedPredicates].unique())}catch{e.saveSettings=_.cloneDeep(e.defaultSettings),I.set(w.GRAPHS_VIZ,e.saveSettings)}else e.saveSettings=_.cloneDeep(e.defaultSettings)})(A.getAuthenticatedUser()),me()})()}function u(e,t,n,r){switch(e.mode=n.mode,e.graph=_.cloneDeep(n.graph),e.graphExists=n.graphExists,e.mode){case"new":e.title=r.instant("graphexplore.create.new.graph"),e.okButtonText=r.instant("common.create.btn");break;case"update":e.title=r.instant("graphexplore.update"),e.okButtonText=r.instant("common.save.btn");break;case"rename":e.title=r.instant("graphexplore.rename"),e.okButtonText=r.instant("common.save.btn")}e.ok=function(){e.form.$valid&&(e.graph.name=i(e.graph.name),t.close({graph:e.graph,mode:e.mode}))},e.saveNew=function(){e.graph.name=i(e.graph.name)+" (new)",t.close({graph:e.graph,mode:"new",restart:!0})},e.cancel=function(){t.dismiss("cancel")};const i=e=>e.replace(/\s+/g," ").trim()}angular.module("graphdb.framework.graphexplore.controllers.graphviz",["ui.scroll.jqlite","ui.scroll","toastr","ui.bootstrap","ngTagsInput","graphdb.framework.utils.localstorageadapter","graphdb.core.services.workbench-context","graphdb.framework.core.services.rdf4j.repositories"]).controller("GraphsVisualizationsCtrl",p).controller("SaveGraphModalCtrl",u).config(["$uibTooltipProvider",function(e){e.options({appendToBody:!0})}]),p.$inject=["$scope","$rootScope","$repositories","toastr","$timeout","ClassInstanceDetailsService","$q","$location","$jwtAuth","UiScrollService","ModalService","$uibModal","$window","LocalStorageAdapter","LSKeys","SavedGraphsRestService","GraphConfigRestService","GraphDataRestService","$translate","GuidesService","WorkbenchContextService","RDF4JRepositoriesService"],u.$inject=["$scope","$uibModalInstance","data","$translate"]},62979(e,t,n){var r,i;r=[n(93462)],i=function(e){function t(e,t){return e.each(function(){var e=t.apply(this,arguments),n=select(this);for(var r in e)n.attr(r,e[r])})}function r(e,t){for(var n in t)e.attr(n,t[n]);return e}return void 0===e&&(e=n(93462)),e.selection.prototype.attrs=function(e){return("function"==typeof e?t:r)(this,e)},e.selection.prototype.moveToFront=function(){return this.each(function(){e.select(this.parentNode.appendChild(this))})},e.selection.prototype.moveToBack=function(){return this.each(function(){const e=this.parentNode.firstChild;e&&this.parentNode.insertBefore(this,e)})},e}.apply(t,r),void 0===i||(e.exports=i)},75468(e,t,n){n.d(t,{A:()=>o});var r=n(93462);const i={select:r.select,selection:r.selection},o=function(){var e=function(){return"n"},t=function(){return[0,0]},n=function(){return" "},r=u(),o=null,s=null,a=null,c=null;function l(e){var t;o="svg"===(t=(t=e).node()).tagName.toLowerCase()?t:t.ownerSVGElement,s=o.createSVGPoint(),document.body.appendChild(r)}l.show=function(){var r=Array.prototype.slice.call(arguments);r[r.length-1]instanceof SVGElement&&(a=r.pop());var i,o=n.apply(this,r),s=t.apply(this,r),u=e.apply(this,r),h=f(),g=p.length,m=document.documentElement.scrollTop||document.body.scrollTop,y=document.documentElement.scrollLeft||document.body.scrollLeft,v=c.apply(this,r);for(h.html(o).style("opacity",1).style("pointer-events","all");g--;)h.classed(p[g],!1);const x=r.filter(e=>e instanceof Event);return i=d.get(u).apply(this,x),v?Object.keys(v).forEach(function(e){h.style(e,v[e])}):h.classed(u,!0).style("top",i.top+s[0]+m+"px").style("left",i.left+s[1]+y+"px"),l},l.hide=function(){return f().style("opacity",0).style("pointer-events","none"),l},l.attr=function(e,t){if(arguments.length<2&&"string"==typeof e)return f().attr(e);var n=Array.prototype.slice.call(arguments);return i.selection.prototype.attr.apply(f(),n),l},l.style=function(e,t){if(arguments.length<2&&"string"==typeof e)return f().style(e);var n=Array.prototype.slice.call(arguments);return i.selection.prototype.style.apply(f(),n),l},l.direction=function(t){return arguments.length?(e=null==t?t:g(t),l):e},l.offset=function(e){return arguments.length?(t=null==e?e:g(e),l):t},l.html=function(e){return arguments.length?(n=null==e?e:g(e),l):n},l.customPosition=function(e){return arguments.length?(c=null==e?e:g(e),l):c},l.destroy=function(){return r&&(f().remove(),r=null),l};var d=new Map(Object.entries({n:function(e){var t=h(e);return{top:t.n.y-r.offsetHeight,left:t.n.x-r.offsetWidth/2}},s:function(e){var t=h(e);return{top:t.s.y,left:t.s.x-r.offsetWidth/2}},e:function(e){var t=h(e);return{top:t.e.y-r.offsetHeight/2,left:t.e.x}},w:function(e){var t=h(e);return{top:t.w.y-r.offsetHeight/2,left:t.w.x-r.offsetWidth}},nw:function(e){var t=h(e);return{top:t.nw.y-r.offsetHeight,left:t.nw.x-r.offsetWidth}},ne:function(e){var t=h(e);return{top:t.ne.y-r.offsetHeight,left:t.ne.x}},sw:function(e){var t=h(e);return{top:t.sw.y,left:t.sw.x-r.offsetWidth}},se:function(e){var t=h(e);return{top:t.se.y,left:t.e.x}}})),p=d.keys();function u(){var e=i.select(document.createElement("div"));return e.style("position","absolute").style("top",0).style("opacity",0).style("pointer-events","none").style("box-sizing","border-box"),e.node()}function f(){return null===r&&(r=u(),document.body.appendChild(r)),i.select(r)}function h(e){for(var t=a||e.target;void 0===t.getScreenCTM&&"undefined"===t.parentNode;)t=t.parentNode;var n={},r=t.getScreenCTM(),i=t.getBBox(),o=i.width,c=i.height,l=i.x,d=i.y;return s.x=l,s.y=d,n.nw=s.matrixTransform(r),s.x+=o,n.ne=s.matrixTransform(r),s.y+=c,n.se=s.matrixTransform(r),s.x-=o,n.sw=s.matrixTransform(r),s.y-=c/2,n.w=s.matrixTransform(r),s.x+=o,n.e=s.matrixTransform(r),s.x-=o/2,s.y-=c/2,n.n=s.matrixTransform(r),s.y+=c,n.s=s.matrixTransform(r),n}function g(e){return"function"==typeof e?e:function(){return e}}return l}},78618(e,t,n){n.d(t,{G4:()=>o,Sn:()=>s,hK:()=>i});var r=n(98980);const i=e=>e.replace(/[()']/g,""),o=e=>"string"==typeof e?"true"===e:Boolean(e),s=e=>e?(0,r.upperFirst)(e.toLowerCase()):e}};
|
|
2
|
-
//# sourceMappingURL=39518.2871b32c37b20075dba3.bundle.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export const __webpack_esm_id__=39874;export const __webpack_esm_ids__=[39874];export const __webpack_esm_modules__={39874(e,t,i){i.r(t),i.d(t,{onto_layout:()=>r});var a=i(55508),s=i(57154),n=i(79939);const r=class{constructor(e){(0,a.r)(this,e),this.authenticationService=(0,s.service)(s.AuthenticationService),this.authorizationService=(0,s.service)(s.AuthorizationService),this.navigationContextService=(0,s.service)(s.NavigationContextService),this.authStorageService=(0,s.service)(s.AuthenticationStorageService),this.runtimeConfigurationContextService=(0,s.service)(s.RuntimeConfigurationContextService),this.eventService=(0,s.service)(s.EventService),this.applicationLifecycleContextService=(0,s.service)(s.ApplicationLifecycleContextService),this.fullJwtKey=`${s.StorageKey.GLOBAL_NAMESPACE}.${this.authStorageService.NAMESPACE}.${this.authStorageService.jwtKey}`,this.fullAuthenticatedKey=`${s.StorageKey.GLOBAL_NAMESPACE}.${this.authStorageService.NAMESPACE}.${this.authStorageService.authenticatedKey}`,this.authEvents=[this.fullJwtKey,this.fullAuthenticatedKey],this.isLowResolution=!1,this.showHeader=this.isAuthenticatedFully(),this.showNavbar=!1,this.isEmbedded=!1,this.loading=!0,this.subscriptions=new s.SubscriptionList,this.isNavbarCollapsed=!1,this.handleStorageChange=e=>{(0,s.service)(s.LocalStorageSubscriptionHandlerService).handleStorageChange(e),this.handleAuthChange(e.key)},this.windowResizeObserver=function(e,t=300){let i;return(...a)=>{clearTimeout(i),i=setTimeout(()=>e.apply(this,a),t)}}(()=>this.windowResizeHandler(),50),s.WindowService.getWindow().addEventListener("storage",this.handleStorageChange)}componentDidLoad(){this.windowResizeHandler()}connectedCallback(){this.subscribeToSecurityChanges(),this.updateVisibility(),this.subscribeToNavigationEnd(),this.subscribeToRuntimeConfigurationChanges(),this.subscribeToApplicationChange()}disconnectedCallback(){this.subscriptions.unsubscribeAll()}render(){return(0,a.h)(a.a,{key:"b8cbbca1f12bf6af844e18397d2a725d6ab4e1fc",class:{"wb-layout":!0,"is-embedded":this.isEmbedded,"hide-navbar":!this.showNavbar}},(0,a.h)("div",{key:"f2e3b7a238b82536bd7605196966bd758330c521",class:"default-slot-wrapper"},(0,a.h)("slot",{key:"5d391e2f612d9aead6c07b2ef3641b961eddc504",name:"default"})),!this.isEmbedded&&(0,a.h)("header",{key:"e43c5b68d590e12b2b3e95d4c414505f1fc82abb",class:"wb-header"},this.showHeader&&(0,a.h)("onto-header",{key:"21102b279bed2dd3ee857b399683d14c5f3eaf57"})),!this.isEmbedded&&this.showNavbar&&(0,a.h)("nav",{key:"67dcbf444a30ac933ba83f86ae9f8d08fe5f995f",class:"wb-navbar"},(0,a.h)("onto-navbar",{key:"a9816369cbbac4d5b58f607be61277d6074556bd",ref:this.assignNavbarRef(),"navbar-collapsed":this.isLowResolution})),(0,a.h)("div",{key:"f3ff0e1734eecc433dc20717e0b9f2871ea40dae",class:{"main-slot-wrapper":!0,loading:this.loading}},this.loading&&(0,a.h)("div",{key:"17d9a8024d280f70ad8684e5d114c38b184b529d",class:"loader-wrapper"},(0,a.h)("onto-loader",{key:"534a5d8f89b92051822d1d7750ca56894013c142",size:96,messageText:n.T.translate("common.loading")})),(0,a.h)("slot",{key:"bcd21d932551dc6f9b9365ccbbafae690f8b7245",name:"main"})),!this.isEmbedded&&(0,a.h)("footer",{key:"9fcd224439dbb7fd35bb4c277dc343eccab40087",class:"wb-footer"},(0,a.h)("onto-footer",{key:"39d5d1c8275c527ca16aa74f6f15dc3f0cc3686c"})),(0,a.h)("onto-tooltip",{key:"6a70e6d2d67e8a9aa6b8eda66b6768735c0f6dcd"}))}onNavbarToggled(e){this.isNavbarCollapsed=e.detail.payload,this.isNavbarCollapsed?this.hostElement.classList.add("expanded"):this.hostElement.classList.remove("expanded")}onResize(){this.windowResizeObserver()}windowResizeHandler(){this.isLowResolution=s.WindowService.getWindow().innerWidth<=768,this.isLowResolution||this.isNavbarCollapsed?this.hostElement.classList.add("expanded"):this.hostElement.classList.remove("expanded")}handleAuthChange(e){var t;e&&this.authEvents.includes(e)&&(this.authStorageService.isAuthenticated()?(0,s.navigate)(null!==(t=this.navigationContextService.getPreviousRoute())&&void 0!==t?t:"./"):(0,s.navigate)("login"),s.WindowService.getWindow().location.reload())}subscribeToSecurityChanges(){const e=(0,s.service)(s.SecurityContextService);this.subscriptions.add(e.onAuthenticatedUserChanged(e=>{this.authenticatedUser=e,this.updateVisibility()})),this.subscriptions.add(e.onSecurityConfigChanged(e=>{this.securityConfig=e,this.updateVisibility()})),this.subscriptions.add(this.eventService.subscribe(s.EventName.LOGIN,()=>{this.setNavbarItemVisibility(),this.updateVisibility()})),this.subscriptions.add(this.eventService.subscribe(s.EventName.LOGOUT,()=>{this.setNavbarItemVisibility(),this.updateVisibility(),(0,s.navigate)("login")}))}subscribeToRuntimeConfigurationChanges(){this.subscriptions.add(this.runtimeConfigurationContextService.onRuntimeConfigurationChanged(e=>{var t;this.isEmbedded=null!==(t=null==e?void 0:e.isEmbedded)&&void 0!==t&&t}))}updateVisibility(){this.authenticationService.isSecurityEnabled()?(this.showHeader=this.authenticationService.isAuthenticated()||this.authorizationService.hasFreeAccess(),this.showNavbar=this.authenticationService.isAuthenticated()||this.authorizationService.hasFreeAccess()):(this.showNavbar=!0,this.showHeader=!0)}isAuthenticatedFully(){return!this.authenticationService.isSecurityEnabled()||this.authenticationService.isAuthenticated()||this.authorizationService.hasFreeAccess()}shouldShowMenu(e){return this.isAuthenticatedFully()&&this.authorizationService.hasRole(e)}assignNavbarRef(){return e=>{this.navbarRef=e,this.navbarRef&&(this.navbarRef.menuItems=s.WindowService.getWindow().PluginRegistry.get("main.menu"),this.setNavbarItemVisibility())}}setNavbarItemVisibility(){var e,t,i;if(!(null===(e=this.navbarRef)||void 0===e?void 0:e.menuItems))return;const a=e=>{var t;e.shouldShow=this.shouldShowMenu(e.role),(null===(t=e.children)||void 0===t?void 0:t.length)&&e.children.forEach(a)};null===(i=null===(t=this.navbarRef)||void 0===t?void 0:t.menuItems)||void 0===i||i.forEach(e=>{e.items.forEach(a)}),this.navbarRef.menuItems=[...this.navbarRef.menuItems]}subscribeToNavigationEnd(){this.subscriptions.add(this.eventService.subscribe(s.EventName.NAVIGATION_END,e=>{this.navigationContextService.updatePreviousRoute(e.oldUrl)}))}subscribeToApplicationChange(){this.subscriptions.add(this.applicationLifecycleContextService.onApplicationStateBeforeChange(e=>{e&&(this.loading=!0)})),this.subscriptions.add(this.applicationLifecycleContextService.onApplicationStateChange(e=>{e&&(this.loading=!1)}))}get hostElement(){return(0,a.g)(this)}};r.style=':host{display:block;height:100%}.wb-layout{display:grid;grid-template:"header header" auto "nav main" 1fr "nav footer" auto/15rem minmax(200px, 1fr);min-height:100vh;margin:0;}.wb-layout.expanded{grid-template-columns:4.375rem 1fr}.wb-layout.is-embedded{grid-template-columns:1fr;grid-template-areas:"main";padding-top:1rem}.wb-layout.hide-navbar{grid-template:"header" auto "main" 1fr "footer" auto/1fr;}.wb-layout.hide-navbar.expanded{grid-template-columns:1fr}.wb-layout main .main-container{margin-left:0}.wb-layout .main-slot-wrapper .loader-wrapper{flex-grow:1;display:flex;align-items:center;justify-content:center}.wb-layout .main-slot-wrapper.loading{display:flex;flex-direction:column}.wb-layout .main-slot-wrapper.loading .page-content{visibility:hidden}.wb-layout .default-slot-wrapper{display:none}.wb-layout .wb-header{position:sticky;top:0;z-index:999}.wb-layout nav{grid-area:nav}.wb-layout header{grid-area:header}.wb-layout main{grid-area:main}.wb-layout footer{grid-area:footer}'},79939(e,t,i){i.d(t,{L:()=>n,T:()=>o,s:()=>s});var a=i(57154);function s(e){const t=document.createElement("textarea");return t.innerHTML=e,t.value}class n{static get logger(){return a.Loggers.getLoggerInstance("SharedComponents")}}class r{constructor(){this.languageContextService=a.ServiceProvider.get(a.LanguageContextService),this.translationChangedObservers={},this.logger=n.logger,this.defaultBundle=this.languageContextService.getDefaultBundle(),this.subscribeToBundleChange()}onTranslate(e,t=[],i=()=>{}){this.translationChangedObservers[e]=this.translationChangedObservers[e]||[];const a={parameters:t,callback:i};return this.translationChangedObservers[e].push(a),i(this.translate(e,t)),()=>{const t=this.translationChangedObservers[e].indexOf(a);-1!==t&&this.translationChangedObservers[e].splice(t,1)}}translate(e,t){return this.translateInLocale(e,t)}translateInLocale(e,t){let i=this.translateFromBundle(this.currentBundle,e);return i||(i=this.translateFromBundle(this.defaultBundle,e)),i?(i=this.applyParameters(i,t),s(i)):(this.logger.warn(`Missing translation for key: [${e}]`),e)}translateFromBundle(e,t){if(!e)return;let i=e[t];return"string"!=typeof i&&(i=this.translateAsJsonObject(e,t)),i}translateAsJsonObject(e,t){let i=t.split(".");return this.getTranslation(e,i)}getTranslation(e,t){if(!t||!e)return;const i=e[t.splice(0,1)[0]];return 0===t.length?i:"string"!=typeof i?t.length>0?this.getTranslation(i,t):i:void 0}applyParameters(e,t){return t?t.reduce((e,t)=>r.replaceAll(e,t),e):e}static replaceAll(e,t){return t?e.split(`{{${t.key}}}`).join(t.value):e}notifyTranslationsChanged(){Object.keys(this.translationChangedObservers).forEach(e=>{(this.translationChangedObservers[e]||[]).forEach(t=>t.callback(this.translate(e,t.parameters)))})}subscribeToBundleChange(){this.languageChangeSubscription=this.languageContextService.onLanguageBundleChanged(e=>{e&&(this.currentBundle=e,this.notifyTranslationsChanged())})}destroy(){this.languageChangeSubscription&&this.language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AAmBJ,GAE3CI,OALX,CAQJ,CACAR,eAAAA,CAAgBH,EAAaP,GACzB,OAAIA,EACOA,EAAWmB,OAElB,CAACZ,EAAaa,IAAcjC,EAAkCkC,WAAWd,EAAaa,GAAYb,GAE/FA,CACX,CACA,iBAAOc,CAAWd,EAAaa,GAC3B,OAAOA,EAAYb,EAAYQ,MAAM,KAAKK,EAAUzI,SAAS2I,KAAKF,EAAUtC,OAASyB,CACzF,CACAgB,yBAAAA,GACIC,OAAOC,KAAKnL,KAAKiJ,6BAA6B3B,QAAS8D,KACjCpL,KAAKiJ,4BAA4BmC,IAAc,IACvD9D,QAASmC,GAAaA,EAASE,SAAS3J,KAAKsE,UAAU8G,EAAW3B,EAASC,eAE7F,CACAN,uBAAAA,GACIpJ,KAAKqL,2BAA6BrL,KAAK8I,uBAAuBwC,wBAAyBhB,IAC/EA,IACAtK,KAAKmK,cAAgBG,EACrBtK,KAAKiL,8BAGjB,CACAM,OAAAA,GACQvL,KAAKqL,4BACLrL,KAAKqL,4BAEb,EAEJ,MAAMhH,EAAqB,IAAIwE,C","sources":["webpack://root-config/./packages/shared-components/dist/esm/onto-layout.entry.js","webpack://root-config/./packages/shared-components/dist/esm/translation.service-nljGIprK.js"],"sourcesContent":["import { r as registerInstance, h, a as Host, g as getElement } from './index-CGqARDX4.js';\nimport { service, AuthenticationService, AuthorizationService, NavigationContextService, AuthenticationStorageService, RuntimeConfigurationContextService, EventService, ApplicationLifecycleContextService, StorageKey, SubscriptionList, LocalStorageSubscriptionHandlerService, WindowService, navigate, SecurityContextService, EventName } from '@ontotext/workbench-api';\nimport { T as TranslationService } from './translation.service-nljGIprK.js';\n\nfunction debounce(func, wait = 300) {\n let timer;\n return (...args) => {\n clearTimeout(timer);\n timer = setTimeout(() => func.apply(this, args), wait);\n };\n}\n\nconst RESPONSIVE_BREAKPOINTS = {\n MD: 768};\n/**\n * The width of the window in pixels at which the navbar should collapse.\n */\nconst WINDOW_WIDTH_FOR_COLLAPSED_NAVBAR = RESPONSIVE_BREAKPOINTS.MD;\n\nconst ontoLayoutCss = () => `:host{display:block;height:100%}.wb-layout{display:grid;grid-template:\"header header\" auto \"nav main\" 1fr \"nav footer\" auto/15rem minmax(200px, 1fr);min-height:100vh;margin:0;}.wb-layout.expanded{grid-template-columns:4.375rem 1fr}.wb-layout.is-embedded{grid-template-columns:1fr;grid-template-areas:\"main\";padding-top:1rem}.wb-layout.hide-navbar{grid-template:\"header\" auto \"main\" 1fr \"footer\" auto/1fr;}.wb-layout.hide-navbar.expanded{grid-template-columns:1fr}.wb-layout main .main-container{margin-left:0}.wb-layout .main-slot-wrapper .loader-wrapper{flex-grow:1;display:flex;align-items:center;justify-content:center}.wb-layout .main-slot-wrapper.loading{display:flex;flex-direction:column}.wb-layout .main-slot-wrapper.loading .page-content{visibility:hidden}.wb-layout .default-slot-wrapper{display:none}.wb-layout .wb-header{position:sticky;top:0;z-index:999}.wb-layout nav{grid-area:nav}.wb-layout header{grid-area:header}.wb-layout main{grid-area:main}.wb-layout footer{grid-area:footer}`;\n\nconst OntoLayout = class {\n // ========================\n // Lifecycle methods\n // ========================\n constructor(hostRef) {\n registerInstance(this, hostRef);\n // ========================\n // Services\n // ========================\n this.authenticationService = service(AuthenticationService);\n this.authorizationService = service(AuthorizationService);\n this.navigationContextService = service(NavigationContextService);\n this.authStorageService = service(AuthenticationStorageService);\n this.runtimeConfigurationContextService = service(RuntimeConfigurationContextService);\n this.eventService = service(EventService);\n this.applicationLifecycleContextService = service(ApplicationLifecycleContextService);\n this.fullJwtKey = `${StorageKey.GLOBAL_NAMESPACE}.${this.authStorageService.NAMESPACE}.${this.authStorageService.jwtKey}`;\n this.fullAuthenticatedKey = `${StorageKey.GLOBAL_NAMESPACE}.${this.authStorageService.NAMESPACE}.${this.authStorageService.authenticatedKey}`;\n this.authEvents = [this.fullJwtKey, this.fullAuthenticatedKey];\n this.isLowResolution = false;\n this.showHeader = this.isAuthenticatedFully();\n this.showNavbar = false;\n this.isEmbedded = false;\n this.loading = true;\n // ========================\n // Private\n // ========================\n /**\n * List of subscriptions to manage component lifecycle\n * */\n this.subscriptions = new SubscriptionList();\n this.isNavbarCollapsed = false;\n this.handleStorageChange = (event) => {\n const localStorageSubscriptionHandlerService = service(LocalStorageSubscriptionHandlerService);\n localStorageSubscriptionHandlerService.handleStorageChange(event);\n this.handleAuthChange(event.key);\n };\n this.windowResizeObserver = debounce(() => this.windowResizeHandler(), 50);\n WindowService.getWindow().addEventListener('storage', this.handleStorageChange);\n }\n componentDidLoad() {\n this.windowResizeHandler();\n }\n connectedCallback() {\n this.subscribeToSecurityChanges();\n this.updateVisibility();\n this.subscribeToNavigationEnd();\n this.subscribeToRuntimeConfigurationChanges();\n this.subscribeToApplicationChange();\n }\n /**\n * Lifecycle method called when the component is about to be removed from the DOM.\n * Unsubscribes from all subscriptions to prevent memory leaks.\n */\n disconnectedCallback() {\n this.subscriptions.unsubscribeAll();\n }\n render() {\n return (h(Host, { key: 'b8cbbca1f12bf6af844e18397d2a725d6ab4e1fc', class: {\n 'wb-layout': true,\n 'is-embedded': this.isEmbedded,\n 'hide-navbar': !this.showNavbar\n } }, h(\"div\", { key: 'f2e3b7a238b82536bd7605196966bd758330c521', class: \"default-slot-wrapper\" }, h(\"slot\", { key: '5d391e2f612d9aead6c07b2ef3641b961eddc504', name: \"default\" })), !this.isEmbedded &&\n h(\"header\", { key: 'e43c5b68d590e12b2b3e95d4c414505f1fc82abb', class: \"wb-header\" }, this.showHeader && h(\"onto-header\", { key: '21102b279bed2dd3ee857b399683d14c5f3eaf57' })), !this.isEmbedded && this.showNavbar &&\n h(\"nav\", { key: '67dcbf444a30ac933ba83f86ae9f8d08fe5f995f', class: \"wb-navbar\" }, h(\"onto-navbar\", { key: 'a9816369cbbac4d5b58f607be61277d6074556bd', ref: this.assignNavbarRef(), \"navbar-collapsed\": this.isLowResolution })), h(\"div\", { key: 'f3ff0e1734eecc433dc20717e0b9f2871ea40dae', class: { 'main-slot-wrapper': true, 'loading': this.loading } }, this.loading && h(\"div\", { key: '17d9a8024d280f70ad8684e5d114c38b184b529d', class: \"loader-wrapper\" }, h(\"onto-loader\", { key: '534a5d8f89b92051822d1d7750ca56894013c142', size: 96, messageText: TranslationService.translate('common.loading') })), h(\"slot\", { key: 'bcd21d932551dc6f9b9365ccbbafae690f8b7245', name: \"main\" })), !this.isEmbedded &&\n h(\"footer\", { key: '9fcd224439dbb7fd35bb4c277dc343eccab40087', class: \"wb-footer\" }, h(\"onto-footer\", { key: '39d5d1c8275c527ca16aa74f6f15dc3f0cc3686c' })), h(\"onto-tooltip\", { key: '6a70e6d2d67e8a9aa6b8eda66b6768735c0f6dcd' })));\n }\n // ========================\n // Event Listeners\n // ========================\n /**\n * Event listener for the navbar toggled event. The layout needs to respond properly when the navbar is toggled in\n * order to fit the content.\n * @param event\n */\n onNavbarToggled(event) {\n this.isNavbarCollapsed = event.detail.payload;\n if (this.isNavbarCollapsed) {\n this.hostElement.classList.add('expanded');\n }\n else {\n this.hostElement.classList.remove('expanded');\n }\n }\n /**\n * Event listener for window resize event. We need to handle this in order to allow the navbar to collapse when the\n * window is resized.\n */\n onResize() {\n this.windowResizeObserver();\n }\n // ========================\n // Handlers\n // ========================\n windowResizeHandler() {\n this.isLowResolution = WindowService.getWindow().innerWidth <= WINDOW_WIDTH_FOR_COLLAPSED_NAVBAR;\n if (!this.isLowResolution && !this.isNavbarCollapsed) {\n this.hostElement.classList.remove('expanded');\n }\n else {\n this.hostElement.classList.add('expanded');\n }\n }\n handleAuthChange(changedKey) {\n var _a;\n if (!changedKey) {\n return;\n }\n if (this.authEvents.includes(changedKey)) {\n const authenticated = this.authStorageService.isAuthenticated();\n if (authenticated) {\n navigate((_a = this.navigationContextService.getPreviousRoute()) !== null && _a !== void 0 ? _a : './');\n }\n else {\n navigate('login');\n }\n WindowService.getWindow().location.reload();\n }\n }\n // ========================\n // Security & Permissions\n // ========================\n subscribeToSecurityChanges() {\n const securityContextService = service(SecurityContextService);\n this.subscriptions.add(securityContextService.onAuthenticatedUserChanged((authenticatedUser) => {\n this.authenticatedUser = authenticatedUser;\n this.updateVisibility();\n }));\n this.subscriptions.add(securityContextService.onSecurityConfigChanged((securityConfig) => {\n this.securityConfig = securityConfig;\n this.updateVisibility();\n }));\n this.subscriptions.add(this.eventService.subscribe(EventName.LOGIN, () => {\n this.setNavbarItemVisibility();\n this.updateVisibility();\n }));\n this.subscriptions.add(this.eventService.subscribe(EventName.LOGOUT, () => {\n this.setNavbarItemVisibility();\n this.updateVisibility();\n navigate('login');\n }));\n }\n subscribeToRuntimeConfigurationChanges() {\n this.subscriptions.add(this.runtimeConfigurationContextService.onRuntimeConfigurationChanged((config) => {\n var _a;\n this.isEmbedded = (_a = config === null || config === void 0 ? void 0 : config.isEmbedded) !== null && _a !== void 0 ? _a : false;\n }));\n }\n updateVisibility() {\n if (!this.authenticationService.isSecurityEnabled()) {\n this.showNavbar = true;\n this.showHeader = true;\n }\n else {\n this.showHeader = this.authenticationService.isAuthenticated() || this.authorizationService.hasFreeAccess();\n this.showNavbar = this.authenticationService.isAuthenticated() || this.authorizationService.hasFreeAccess();\n }\n }\n isAuthenticatedFully() {\n return !this.authenticationService.isSecurityEnabled() || this.authenticationService.isAuthenticated() || this.authorizationService.hasFreeAccess();\n }\n shouldShowMenu(role) {\n return this.isAuthenticatedFully() && this.authorizationService.hasRole(role);\n }\n // ========================\n // Navbar logic\n // ========================\n assignNavbarRef() {\n return (navbar) => {\n this.navbarRef = navbar;\n if (!this.navbarRef) {\n return;\n }\n this.navbarRef.menuItems = WindowService.getWindow().PluginRegistry.get('main.menu');\n this.setNavbarItemVisibility();\n };\n }\n setNavbarItemVisibility() {\n var _a, _b, _c;\n if (!((_a = this.navbarRef) === null || _a === void 0 ? void 0 : _a.menuItems)) {\n return;\n }\n // recursively check for children and set their shouldShow property\n const processItem = (item) => {\n var _a;\n item.shouldShow = this.shouldShowMenu(item.role);\n if ((_a = item.children) === null || _a === void 0 ? void 0 : _a.length) {\n item.children.forEach(processItem);\n }\n };\n (_c = (_b = this.navbarRef) === null || _b === void 0 ? void 0 : _b.menuItems) === null || _c === void 0 ? void 0 : _c.forEach(plugin => {\n plugin.items.forEach(processItem);\n });\n // Update the reference to trigger a re-render\n this.navbarRef.menuItems = [...this.navbarRef.menuItems];\n }\n subscribeToNavigationEnd() {\n this.subscriptions.add(this.eventService.subscribe(EventName.NAVIGATION_END, (navigationEndPayload) => {\n this.navigationContextService.updatePreviousRoute(navigationEndPayload.oldUrl);\n }));\n }\n subscribeToApplicationChange() {\n this.subscriptions.add(this.applicationLifecycleContextService.onApplicationStateBeforeChange((state) => {\n if (state) {\n this.loading = true;\n }\n }));\n this.subscriptions.add(this.applicationLifecycleContextService.onApplicationStateChange((state) => {\n if (state) {\n this.loading = false;\n }\n }));\n }\n get hostElement() { return getElement(this); }\n};\nOntoLayout.style = ontoLayoutCss();\n\nexport { OntoLayout as onto_layout };\n","import { Loggers, ServiceProvider, LanguageContextService } from '@ontotext/workbench-api';\n\nfunction sanitizeHTML(html) {\n const element = document.createElement('textarea');\n element.innerHTML = html;\n return element.value;\n}\n\nconst MODULE_NAME = 'SharedComponents';\n/**\n * Logger for the Shared Components module.\n */\nclass LoggerProvider {\n /**\n * Gets the logger instance for the Shared Components module.\n *\n * @returns LoggerService instance for the Shared Components module\n */\n static get logger() {\n return Loggers.getLoggerInstance(MODULE_NAME);\n }\n}\n\n/**\n * Service responsible for translation operations in the component.\n */\nclass TranslationServiceClassDefinition {\n constructor() {\n this.languageContextService = ServiceProvider.get(LanguageContextService);\n this.translationChangedObservers = {};\n this.logger = LoggerProvider.logger;\n // log with background color\n this.defaultBundle = this.languageContextService.getDefaultBundle();\n this.subscribeToBundleChange();\n }\n /**\n * Translates the <code>messageLabelKey</code> with <code>translationParameter</code> and call <code>translationCallback</code> with translation of current language.\n * The <code>translationCallback</code> is called upon subscription and whenever the selected language is changed.\n *\n * @param messageLabelKey - The label key for the translation.\n * @param translationParameter - Parameters, if needed, for translation.\n * @param translationCallback - A function to be called when translating the `messageLabelKey`.\n * @returns A function that, when called, unsubscribes the provided callback from further translation updates.\n */\n onTranslate(messageLabelKey, translationParameter = [], translationCallback = () => { }) {\n this.translationChangedObservers[messageLabelKey] = this.translationChangedObservers[messageLabelKey] || [];\n const observer = { parameters: translationParameter, callback: translationCallback };\n this.translationChangedObservers[messageLabelKey].push(observer);\n translationCallback(this.translate(messageLabelKey, translationParameter));\n return () => {\n const index = this.translationChangedObservers[messageLabelKey].indexOf(observer);\n if (index !== -1) {\n this.translationChangedObservers[messageLabelKey].splice(index, 1);\n }\n };\n }\n /**\n * Translates the provided key using the currently selected language by applying the parameters if\n * provided.\n * @param key The key for the label which needs to be translated.\n * @param parameters Optional parameters which to be applied during the translation.\n */\n translate(key, parameters) {\n return this.translateInLocale(key, parameters);\n }\n /**\n * Translates a given key into the specified locale. If parameters are provided,\n * they will be applied to the translation.\n *\n * @param key - The translation key, which can be dot-separated for nested translations.\n * @param parameters - Optional parameters to be substituted into the translation string.\n * @returns The translated string with parameters applied if available, or the key itself if not found.\n */\n translateInLocale(key, parameters) {\n // Attempt to retrieve the translation from the specified locale's bundle.\n let translation = this.translateFromBundle(this.currentBundle, key);\n // If not found, fall back to the default language bundle.\n if (!translation) {\n translation = this.translateFromBundle(this.defaultBundle, key);\n }\n // If translation was found, apply any parameters provided and return the result.\n if (translation) {\n translation = this.applyParameters(translation, parameters);\n return sanitizeHTML(translation);\n }\n this.logger.warn(`Missing translation for key: [${key}]`);\n return key;\n }\n /**\n * Retrieves a translation from a specified translation bundle using the given key.\n * If the key represents a nested JSON path, it attempts to resolve the key as such.\n *\n * @param bundle - The translation bundle for the specified locale.\n * @param key - The key to translate, which may be a simple key or dot-separated for nested keys.\n * @returns The translation string if found, or `undefined` if not available.\n */\n translateFromBundle(bundle, key) {\n if (!bundle) {\n return undefined;\n }\n // Try to retrieve the translation directly if it is defined as a whole string,\n // for instance as \"some_function.btn.label\".\n let translation = bundle[key];\n // If not found, attempt to retrieve the translation if it is defined as a JSON object.\n if (typeof translation !== 'string') {\n translation = this.translateAsJsonObject(bundle, key);\n }\n return translation;\n }\n /**\n * Resolves a nested translation key by treating it as a path in a JSON object.\n * For example, if the key is \"some.key.path\", this method will navigate through\n * the JSON object structure to retrieve the value at that path.\n *\n * @param bundle - The translation bundle containing nested keys.\n * @param key - The dot-separated key representing the path to the translation.\n * @returns The translation string if found, or `undefined` if the path does not exist.\n */\n translateAsJsonObject(bundle, key) {\n let path = key.split('.');\n return this.getTranslation(bundle, path);\n }\n /**\n * Recursively navigates through a JSON object based on a path array to retrieve\n * a translation string. Each element in the path array represents a nested key.\n *\n * @param jsonObject - The current JSON object or nested object being searched.\n * @param path - An array representing the path to the translation, where each element is a key.\n * @returns The translation string if found, or `undefined` if the path does not exist.\n */\n getTranslation(jsonObject, path) {\n // Stop the recursion if path or reach the inner element\n if (!path || !jsonObject) {\n return undefined;\n }\n const jsonOrTranslation = jsonObject[path.splice(0, 1)[0]];\n if (path.length === 0) {\n return jsonOrTranslation;\n }\n if (typeof jsonOrTranslation !== 'string') {\n // continue if the inner element is not reached.\n if (path.length > 0) {\n return this.getTranslation(jsonOrTranslation, path);\n }\n return jsonOrTranslation;\n }\n return undefined;\n }\n applyParameters(translation, parameters) {\n if (parameters) {\n return parameters.reduce(\n // replace all occurrence of parameter key with parameter value.\n (translation, parameter) => TranslationServiceClassDefinition.replaceAll(translation, parameter), translation);\n }\n return translation;\n }\n static replaceAll(translation, parameter) {\n return parameter ? translation.split(`{{${parameter.key}}}`).join(parameter.value) : translation;\n }\n notifyTranslationsChanged() {\n Object.keys(this.translationChangedObservers).forEach((eventName) => {\n const observers = this.translationChangedObservers[eventName] || [];\n observers.forEach((observer) => observer.callback(this.translate(eventName, observer.parameters)));\n });\n }\n subscribeToBundleChange() {\n this.languageChangeSubscription = this.languageContextService.onLanguageBundleChanged((bundle) => {\n if (bundle) {\n this.currentBundle = bundle;\n this.notifyTranslationsChanged();\n }\n });\n }\n destroy() {\n if (this.languageChangeSubscription) {\n this.languageChangeSubscription();\n }\n }\n}\nconst TranslationService = new TranslationServiceClassDefinition();\n\nexport { LoggerProvider as L, TranslationService as T, sanitizeHTML as s };\n"],"names":["OntoLayout","constructor","hostRef","registerInstance","this","authenticationService","service","AuthenticationService","authorizationService","AuthorizationService","navigationContextService","NavigationContextService","authStorageService","AuthenticationStorageService","runtimeConfigurationContextService","RuntimeConfigurationContextService","eventService","EventService","applicationLifecycleContextService","ApplicationLifecycleContextService","fullJwtKey","StorageKey","GLOBAL_NAMESPACE","NAMESPACE","jwtKey","fullAuthenticatedKey","authenticatedKey","authEvents","isLowResolution","showHeader","isAuthenticatedFully","showNavbar","isEmbedded","loading","subscriptions","SubscriptionList","isNavbarCollapsed","handleStorageChange","event","LocalStorageSubscriptionHandlerService","handleAuthChange","key","windowResizeObserver","func","wait","timer","args","clearTimeout","setTimeout","apply","debounce","windowResizeHandler","WindowService","getWindow","addEventListener","componentDidLoad","connectedCallback","subscribeToSecurityChanges","updateVisibility","subscribeToNavigationEnd","subscribeToRuntimeConfigurationChanges","subscribeToApplicationChange","disconnectedCallback","unsubscribeAll","render","h","Host","class","name","ref","assignNavbarRef","size","messageText","TranslationService","translate","onNavbarToggled","detail","payload","hostElement","classList","add","remove","onResize","innerWidth","changedKey","_a","includes","isAuthenticated","navigate","getPreviousRoute","location","reload","securityContextService","SecurityContextService","onAuthenticatedUserChanged","authenticatedUser","onSecurityConfigChanged","securityConfig","subscribe","EventName","LOGIN","setNavbarItemVisibility","LOGOUT","onRuntimeConfigurationChanged","config","isSecurityEnabled","hasFreeAccess","shouldShowMenu","role","hasRole","navbar","navbarRef","menuItems","PluginRegistry","get","_b","_c","processItem","item","shouldShow","children","length","forEach","plugin","items","NAVIGATION_END","navigationEndPayload","updatePreviousRoute","oldUrl","onApplicationStateBeforeChange","state","onApplicationStateChange","getElement","style","sanitizeHTML","html","element","document","createElement","innerHTML","value","LoggerProvider","logger","Loggers","getLoggerInstance","TranslationServiceClassDefinition","languageContextService","ServiceProvider","LanguageContextService","translationChangedObservers","defaultBundle","getDefaultBundle","subscribeToBundleChange","onTranslate","messageLabelKey","translationParameter","translationCallback","observer","parameters","callback","push","index","indexOf","splice","translateInLocale","translation","translateFromBundle","currentBundle","applyParameters","warn","bundle","translateAsJsonObject","path","split","getTranslation","jsonObject","jsonOrTranslation","reduce","parameter","replaceAll","join","notifyTranslationsChanged","Object","keys","eventName","languageChangeSubscription","onLanguageBundleChanged","destroy"],"ignoreList":[],"sourceRoot":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export const __webpack_esm_id__=60560;export const __webpack_esm_ids__=[60560];export const __webpack_esm_modules__={60560(e,a,t){t.r(a),t.d(a,{onto_cookie_consent:()=>n,onto_cookie_policy_dialog:()=>s});var o=t(55508),c=t(79939),i=t(57154);const n=class{constructor(e){(0,o.r)(this,e),this.consentGiven=(0,o.c)(this,"consentGiven"),this.showModal=!1,this.openModal=e=>{e.preventDefault(),this.showModal=!0},this.handleConsentClick=()=>{this.consentGiven.emit()}}onDialogClose(){this.showModal=!1}render(){return(0,o.h)(o.a,{key:"dba3fc373e9ad60ada7f86d11acbe1b1ed24a92d"},(0,o.h)("div",{key:"414c970a3a4b263e8f3f5d066dc8bb22b8194c48",class:"cookie-consent-modal"},(0,o.h)("section",{key:"6a1cccadb167b301738fb6a453b7d300e93ba18b",class:"cookie-consent-content"},(0,o.h)("span",{key:"aa62410b522125feeb48eaa568a78c761e6b9596"},(0,o.h)("translate-label",{key:"0696068c1aa8738bb3ddf0e548d9140ba12609e1",labelKey:"cookie.cookie_consent"}),(0,o.h)("a",{key:"efd9792a6a424b86606b3904615c53f19a2cdb6e",id:"cookie-policy-link",href:"#",onClick:this.openModal,class:"btn btn-link p-0"},(0,o.h)("translate-label",{key:"12e95d1446f81b47c973e285ee71da5fbfa4934f",labelKey:"cookie.cookie_policy_url_label"})),"."),(0,o.h)("button",{key:"a91e7d9e7eddef1b50d82570f4211a0e1e1ae7b0",id:"accept-cookie-policy",class:"onto-btn onto-btn-primary",onClick:this.handleConsentClick},(0,o.h)("translate-label",{key:"5ca81d4f299a7b7f13ed0f77ac7d1ceaeaad318a",labelKey:"common.button.ok"})))),this.showModal&&(0,o.h)("onto-cookie-policy-dialog",{key:"e54d3f134771ff5f59a288d0d6c9949c6f59567f",dialogHandler:this}))}};var l;n.style=".cookie-consent-modal{position:fixed;bottom:0;left:0;right:0;background-color:var(--gw-dialog-background);box-shadow:0 -2px 10px rgba(0, 0, 0, 0.1);padding:20px;z-index:1050;width:100%}.cookie-consent-content{display:flex;justify-content:center;align-items:center}.cookie-consent-content button{margin-left:12px}.cookie-policy-modal{padding:24px 40px;overflow-y:auto}.cookie-policy-modal .modal-dialog{width:60% !important;max-width:60% !important}.cookie-policy-modal .title{font-size:xx-large;font-weight:bolder}.cookie-policy-modal .heading{font-size:x-large;font-weight:bolder;margin-top:12px}.cookie-policy-modal .subheading{font-size:large;font-weight:bolder;margin-top:8px}.cookie-policy-modal .text{font-size:math}",function(e){e.THIRD_PARTY="thirdParty",e.STATISTIC="statistic"}(l||(l={}));const s=class{constructor(e){(0,o.r)(this,e),this.logger=c.L.logger,this.user=i.ServiceProvider.get(i.SecurityContextService).getAuthenticatedUser(),this.securityService=i.ServiceProvider.get(i.SecurityService)}toggleChanged(e){this.setUserCookieConsent(this.updateCookieConsent(e.detail)),this.securityService.updateAuthenticatedUser(this.user.toUser()).catch(this.logger.error)}render(){var e,a;const t={dialogTitle:c.T.translate("cookie.policy.title"),onClose:()=>this.dialogHandler.onDialogClose(),modalClass:"cookie-policy-modal"},n=new i.CookieConsent(null===(a=null===(e=this.user)||void 0===e?void 0:e.appSettings)||void 0===a?void 0:a.COOKIE_CONSENT);return(0,o.h)("onto-dialog",{key:"c76529daf7d24ad06970ba3b8e7f87446daeec37",config:t},(0,o.h)("div",{key:"412c71cf9a3b8e094962a4e4299679f16394869a",slot:"body"},(0,o.h)("section",{key:"0d730d3c02ab298d66de7ab56100bc1f13d989c6"},(0,o.h)("h4",{key:"4cbcc42d566ebf8e4c7507df9b367e9caa847565"},(0,o.h)("translate-label",{key:"ceed3f8d2aa7de9b614af25c6c4cb66ac1d74869",labelKey:"cookie.policy.purpose_heading"})),(0,o.h)("p",{key:"f9a72d8c3fbc9a04ea488e6045e6d8d74d8e7265"},(0,o.h)("translate-label",{key:"046cacb46e54bc228dcb7bf3a692f9fb28798de5",labelKey:"cookie.policy.purpose_text"})),(0,o.h)("p",{key:"70bbd5c2f6d30771477b3ee6e822a8def976e050"},(0,o.h)("translate-label",{key:"cc95a3b4ea1292ea33226bfb27db8fdc8a03969a",labelKey:"cookie.policy.purpose_enterprise_text"}))),(0,o.h)("section",{key:"4340f499aaa0de9b0bd7a5b089efd93a66f864bd"},(0,o.h)("h4",{key:"c31244de543a54f52382d572c203f15c9f6bc61d"},(0,o.h)("translate-label",{key:"3193fab62ec3f9132793a3100600017c12606546",labelKey:"cookie.policy.privacy_commitment_heading"})),(0,o.h)("p",{key:"ba75b0d207a6e4423ad87317abdae05a386109cd"},(0,o.h)("translate-label",{key:"8362dabe248988373af6ffe8219ddd229b585d45",labelKey:"cookie.policy.privacy_commitment_text"})),(0,o.h)("ul",{key:"ac3a59a29d8ff17f59834734e10fa38c5891024e"},(0,o.h)("li",{key:"d8cda68c7424c76138f7da948cd522d4994cbd4f"},(0,o.h)("translate-label",{key:"9f10c3678b02c7153a3aef73e86d9fe6b4fd5557",labelKey:"cookie.policy.privacy_commitment_1"})),(0,o.h)("li",{key:"623c725c85c2706425b8f5f27750393c8b88a761"},(0,o.h)("translate-label",{key:"acdbad3cc0590aa0094ae6d0e0d5a00964291c41",labelKey:"cookie.policy.privacy_commitment_2"})))),(0,o.h)("section",{key:"aecf76c57fcfce12f1f67643a587f390b975eb95"},(0,o.h)("h4",{key:"5264365da2a50c4c24cb5a8d14dd039ff7c3f5de"},(0,o.h)("translate-label",{key:"c3b7711c0959ddcce90986b2dcc5e42e2aacedcb",labelKey:"cookie.policy.cookies_heading"})),(0,o.h)("p",{key:"92b79942b35a9e6224c95c0b955505a49cc67b00"},(0,o.h)("translate-label",{key:"86822629019ad073ef2d90899da1397a87d5796f",labelKey:"cookie.policy.cookies_text"}))),(0,o.h)("section",{key:"3ea0f6201a2d78b40045adb4aa26eb8baa382adc"},(0,o.h)("h4",{key:"b96b6a082351c803d229038c2ca7acc99294ab86"},(0,o.h)("translate-label",{key:"6aab9024ff0fd8734706bd7caec59335c3ddc7ac",labelKey:"cookie.policy.manage_cookies_heading"})),(0,o.h)("onto-toggle-switch",{key:"c97358e1147cbb36d950302ee2fc29733e088ef9",checked:null==n?void 0:n.statistic,labelKey:"cookie.policy.statistic_cookies",tooltipTranslationKey:"cookie.policy.statistic_tooltip",context:l.STATISTIC}),(0,o.h)("p",{key:"e6172a9fb3b8e1b0ab10609b1ebda7fcf350e93b"},(0,o.h)("translate-label",{key:"701fb389671ed440a1080e6e76fd1344cb4e5b6e",labelKey:"cookie.policy.statistic_text"})),(0,o.h)("onto-toggle-switch",{key:"e36a2699b2140e33288dd2cac9702d8fca6784db",checked:null==n?void 0:n.thirdParty,labelKey:"cookie.policy.third_party_cookies",tooltipTranslationKey:"cookie.policy.third_party_tooltip",context:l.THIRD_PARTY}),(0,o.h)("p",{key:"98cced78a81c9942b5f5169fee662c368192946e"},(0,o.h)("translate-label",{key:"df1ba989e1fc792fa9f56e4f9661fdb28fa55f90",labelKey:"cookie.policy.third_party_cookies_text"}))),(0,o.h)("p",{key:"a892129a7183dd84e10eb31cf5a6a1698b61b5d7"},(0,o.h)("span",{key:"c2b6a400347f2019c7647273c3d7029f0ad9b039"},(0,o.h)("translate-label",{key:"d43317f8f68615516c7a81e8aa787756bdec1205",labelKey:"cookie.policy.change_cookies"}),(0,o.h)("i",{key:"8f9efc29f7630c1d6e58fdf50241ff625fc8c7bf"}," ",(0,o.h)("translate-label",{key:"6c906a77d90237a17b5c3e1887c41b532830040d",labelKey:"menu.setup.label"})," > ",(0,o.h)("translate-label",{key:"75f59cf20cd4a1fbee4afb3388b5f341fd957613",labelKey:"menu.my.settings.label"})," > ",(0,o.h)("translate-label",{key:"352f8f0b324655e86bc9175e8c70567e34e68f2a",labelKey:"security.user.settings"})," > ",(0,o.h)("translate-label",{key:"0067f9f65859f946006115d1957337f42a805274",labelKey:"cookie.policy.change_cookies_location4"})," ")))))}updateCookieConsent(e){var a,t;const o=new i.CookieConsent(null===(t=null===(a=this.user)||void 0===a?void 0:a.appSettings)||void 0===t?void 0:t.COOKIE_CONSENT);return o[e.context]=e.checked,o.updatedAt=(new Date).getTime(),o}setUserCookieConsent(e){this.user.appSettings||(this.user.appSettings=new i.AppSettings),this.user.appSettings.COOKIE_CONSENT=e}};s.style="section h4{font-size:x-large;font-weight:bolder;margin-top:12px}"},79939(e,a,t){t.d(a,{L:()=>i,T:()=>l,s:()=>c});var o=t(57154);function c(e){const a=document.createElement("textarea");return a.innerHTML=e,a.value}class i{static get logger(){return o.Loggers.getLoggerInstance("SharedComponents")}}class n{constructor(){this.languageContextService=o.ServiceProvider.get(o.LanguageContextService),this.translationChangedObservers={},this.logger=i.logger,this.defaultBundle=this.languageContextService.getDefaultBundle(),this.subscribeToBundleChange()}onTranslate(e,a=[],t=()=>{}){this.translationChangedObservers[e]=this.translationChangedObservers[e]||[];const o={parameters:a,callback:t};return this.translationChangedObservers[e].push(o),t(this.translate(e,a)),()=>{const a=this.translationChangedObservers[e].indexOf(o);-1!==a&&this.translationChangedObservers[e].splice(a,1)}}translate(e,a){return this.translateInLocale(e,a)}translateInLocale(e,a){let t=this.translateFromBundle(this.currentBundle,e);return t||(t=this.translateFromBundle(this.defaultBundle,e)),t?(t=this.applyParameters(t,a),c(t)):(this.logger.warn(`Missing translation for key: [${e}]`),e)}translateFromBundle(e,a){if(!e)return;let t=e[a];return"string"!=typeof t&&(t=this.translateAsJsonObject(e,a)),t}translateAsJsonObject(e,a){let t=a.split(".");return this.getTranslation(e,t)}getTranslation(e,a){if(!a||!e)return;const t=e[a.splice(0,1)[0]];return 0===a.length?t:"string"!=typeof t?a.length>0?this.getTranslation(t,a):t:void 0}applyParameters(e,a){return a?a.reduce((e,a)=>n.replaceAll(e,a),e):e}static replaceAll(e,a){return a?e.split(`{{${a.key}}}`).join(a.value):e}notifyTranslationsChanged(){Object.keys(this.translationChangedObservers).forEach(e=>{(this.translationChangedObservers[e]||[]).forEach(a=>a.callback(this.translate(e,a.parameters)))})}subscribeToBundleChange(){this.languageChangeSubscription=this.languageContextService.onLanguageBundleChanged(e=>{e&&(this.currentBundle=e,this.notifyTranslationsChanged())})}destroy(){this.languageChangeSubscription&&this.languageChangeSubscription()}}const l=new n}};
|
|
2
|
-
//# sourceMappingURL=60560.275a89ab1375e91de0aa.bundle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"60560.275a89ab1375e91de0aa.bundle.js","mappings":"iPAIA,MAEMA,EAAoB,MACtBC,WAAAA,CAAYC,IACRC,EAAAA,EAAAA,GAAiBC,KAAMF,GACvBE,KAAKC,cAAeC,EAAAA,EAAAA,GAAYF,KAAM,gBAEtCA,KAAKG,WAAY,EAKjBH,KAAKI,UAAaC,IACdA,EAAMC,iBACNN,KAAKG,WAAY,GAMrBH,KAAKO,mBAAqB,KACtBP,KAAKC,aAAaO,OAE1B,CAMAC,aAAAA,GACIT,KAAKG,WAAY,CACrB,CACAO,MAAAA,GACI,OAAQC,EAAAA,EAAAA,GAAEC,EAAAA,EAAM,CAAEC,IAAK,6CAA8CF,EAAAA,EAAAA,GAAE,MAAO,CAAEE,IAAK,2CAA4CC,MAAO,yBAA0BH,EAAAA,EAAAA,GAAE,UAAW,CAAEE,IAAK,2CAA4CC,MAAO,2BAA4BH,EAAAA,EAAAA,GAAE,OAAQ,CAAEE,IAAK,6CAA8CF,EAAAA,EAAAA,GAAE,kBAAmB,CAAEE,IAAK,2CAA4CE,SAAU,2BAA4BJ,EAAAA,EAAAA,GAAE,IAAK,CAAEE,IAAK,2CAA4CG,GAAI,qBAAsBC,KAAM,IAAKC,QAASlB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,SAASgG,KAAKF,EAAUpC,OAASsB,CACzF,CACAiB,yBAAAA,GACIC,OAAOC,KAAKhH,KAAK6E,6BAA6BoC,QAASC,KACjClH,KAAK6E,4BAA4BqC,IAAc,IACvDD,QAAS5B,GAAaA,EAASE,SAASvF,KAAK6C,UAAUqE,EAAW7B,EAASC,eAE7F,CACAN,uBAAAA,GACIhF,KAAKmH,2BAA6BnH,KAAK2E,uBAAuByC,wBAAyBlB,IAC/EA,IACAlG,KAAK+F,cAAgBG,EACrBlG,KAAK8G,8BAGjB,CACAO,OAAAA,GACQrH,KAAKmH,4BACLnH,KAAKmH,4BAEb,EAEJ,MAAMvE,EAAqB,IAAI8B,C","sources":["webpack://root-config/./packages/shared-components/dist/esm/onto-cookie-consent_2.entry.js","webpack://root-config/./packages/shared-components/dist/esm/translation.service-nljGIprK.js"],"sourcesContent":["import { r as registerInstance, c as createEvent, h, a as Host } from './index-CGqARDX4.js';\nimport { L as LoggerProvider, T as TranslationService } from './translation.service-nljGIprK.js';\nimport { ServiceProvider, SecurityContextService, SecurityService, CookieConsent, AppSettings } from '@ontotext/workbench-api';\n\nconst ontoCookieConsentCss = () => `.cookie-consent-modal{position:fixed;bottom:0;left:0;right:0;background-color:var(--gw-dialog-background);box-shadow:0 -2px 10px rgba(0, 0, 0, 0.1);padding:20px;z-index:1050;width:100%}.cookie-consent-content{display:flex;justify-content:center;align-items:center}.cookie-consent-content button{margin-left:12px}.cookie-policy-modal{padding:24px 40px;overflow-y:auto}.cookie-policy-modal .modal-dialog{width:60% !important;max-width:60% !important}.cookie-policy-modal .title{font-size:xx-large;font-weight:bolder}.cookie-policy-modal .heading{font-size:x-large;font-weight:bolder;margin-top:12px}.cookie-policy-modal .subheading{font-size:large;font-weight:bolder;margin-top:8px}.cookie-policy-modal .text{font-size:math}`;\n\nconst OntoCookieConsent = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.consentGiven = createEvent(this, \"consentGiven\");\n /** State to control the visibility of the cookie policy modal */\n this.showModal = false;\n /**\n * Opens the cookie policy modal.\n * @param {Event} event - The event that triggered the modal opening.\n */\n this.openModal = (event) => {\n event.preventDefault();\n this.showModal = true;\n };\n /**\n * Handles the click event on the consent button.\n * Emits the consentGiven event.\n */\n this.handleConsentClick = () => {\n this.consentGiven.emit();\n };\n }\n /**\n * Closes the cookie policy dialog.\n * This method is called when the dialog is closed.\n */\n // eslint-disable-next-line @stencil-community/own-methods-must-be-private\n onDialogClose() {\n this.showModal = false;\n }\n render() {\n return (h(Host, { key: 'dba3fc373e9ad60ada7f86d11acbe1b1ed24a92d' }, h(\"div\", { key: '414c970a3a4b263e8f3f5d066dc8bb22b8194c48', class: \"cookie-consent-modal\" }, h(\"section\", { key: '6a1cccadb167b301738fb6a453b7d300e93ba18b', class: \"cookie-consent-content\" }, h(\"span\", { key: 'aa62410b522125feeb48eaa568a78c761e6b9596' }, h(\"translate-label\", { key: '0696068c1aa8738bb3ddf0e548d9140ba12609e1', labelKey: 'cookie.cookie_consent' }), h(\"a\", { key: 'efd9792a6a424b86606b3904615c53f19a2cdb6e', id: \"cookie-policy-link\", href: \"#\", onClick: this.openModal, class: \"btn btn-link p-0\" }, h(\"translate-label\", { key: '12e95d1446f81b47c973e285ee71da5fbfa4934f', labelKey: 'cookie.cookie_policy_url_label' })), \".\"), h(\"button\", { key: 'a91e7d9e7eddef1b50d82570f4211a0e1e1ae7b0', id: \"accept-cookie-policy\", class: \"onto-btn onto-btn-primary\", onClick: this.handleConsentClick }, h(\"translate-label\", { key: '5ca81d4f299a7b7f13ed0f77ac7d1ceaeaad318a', labelKey: 'common.button.ok' })))), this.showModal && h(\"onto-cookie-policy-dialog\", { key: 'e54d3f134771ff5f59a288d0d6c9949c6f59567f', dialogHandler: this })));\n }\n};\nOntoCookieConsent.style = ontoCookieConsentCss();\n\nconst ontoCookiePolicyDialogCss = () => `section h4{font-size:x-large;font-weight:bolder;margin-top:12px}`;\n\nvar CookieType;\n(function (CookieType) {\n CookieType[\"THIRD_PARTY\"] = \"thirdParty\";\n CookieType[\"STATISTIC\"] = \"statistic\";\n})(CookieType || (CookieType = {}));\nconst OntoCookiePolicyDialog = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.logger = LoggerProvider.logger;\n this.user = ServiceProvider.get(SecurityContextService).getAuthenticatedUser();\n this.securityService = ServiceProvider.get(SecurityService);\n }\n toggleChanged(event) {\n this.setUserCookieConsent(this.updateCookieConsent(event.detail));\n this.securityService.updateAuthenticatedUser(this.user.toUser())\n .catch(this.logger.error);\n }\n render() {\n var _a, _b;\n const config = {\n dialogTitle: TranslationService.translate('cookie.policy.title'),\n onClose: () => this.dialogHandler.onDialogClose(),\n modalClass: 'cookie-policy-modal',\n };\n const cookieConsent = new CookieConsent((_b = (_a = this.user) === null || _a === void 0 ? void 0 : _a.appSettings) === null || _b === void 0 ? void 0 : _b.COOKIE_CONSENT);\n return (h(\"onto-dialog\", { key: 'c76529daf7d24ad06970ba3b8e7f87446daeec37', config: config }, h(\"div\", { key: '412c71cf9a3b8e094962a4e4299679f16394869a', slot: 'body' }, h(\"section\", { key: '0d730d3c02ab298d66de7ab56100bc1f13d989c6' }, h(\"h4\", { key: '4cbcc42d566ebf8e4c7507df9b367e9caa847565' }, h(\"translate-label\", { key: 'ceed3f8d2aa7de9b614af25c6c4cb66ac1d74869', labelKey: 'cookie.policy.purpose_heading' })), h(\"p\", { key: 'f9a72d8c3fbc9a04ea488e6045e6d8d74d8e7265' }, h(\"translate-label\", { key: '046cacb46e54bc228dcb7bf3a692f9fb28798de5', labelKey: 'cookie.policy.purpose_text' })), h(\"p\", { key: '70bbd5c2f6d30771477b3ee6e822a8def976e050' }, h(\"translate-label\", { key: 'cc95a3b4ea1292ea33226bfb27db8fdc8a03969a', labelKey: 'cookie.policy.purpose_enterprise_text' }))), h(\"section\", { key: '4340f499aaa0de9b0bd7a5b089efd93a66f864bd' }, h(\"h4\", { key: 'c31244de543a54f52382d572c203f15c9f6bc61d' }, h(\"translate-label\", { key: '3193fab62ec3f9132793a3100600017c12606546', labelKey: 'cookie.policy.privacy_commitment_heading' })), h(\"p\", { key: 'ba75b0d207a6e4423ad87317abdae05a386109cd' }, h(\"translate-label\", { key: '8362dabe248988373af6ffe8219ddd229b585d45', labelKey: 'cookie.policy.privacy_commitment_text' })), h(\"ul\", { key: 'ac3a59a29d8ff17f59834734e10fa38c5891024e' }, h(\"li\", { key: 'd8cda68c7424c76138f7da948cd522d4994cbd4f' }, h(\"translate-label\", { key: '9f10c3678b02c7153a3aef73e86d9fe6b4fd5557', labelKey: 'cookie.policy.privacy_commitment_1' })), h(\"li\", { key: '623c725c85c2706425b8f5f27750393c8b88a761' }, h(\"translate-label\", { key: 'acdbad3cc0590aa0094ae6d0e0d5a00964291c41', labelKey: 'cookie.policy.privacy_commitment_2' })))), h(\"section\", { key: 'aecf76c57fcfce12f1f67643a587f390b975eb95' }, h(\"h4\", { key: '5264365da2a50c4c24cb5a8d14dd039ff7c3f5de' }, h(\"translate-label\", { key: 'c3b7711c0959ddcce90986b2dcc5e42e2aacedcb', labelKey: 'cookie.policy.cookies_heading' })), h(\"p\", { key: '92b79942b35a9e6224c95c0b955505a49cc67b00' }, h(\"translate-label\", { key: '86822629019ad073ef2d90899da1397a87d5796f', labelKey: 'cookie.policy.cookies_text' }))), h(\"section\", { key: '3ea0f6201a2d78b40045adb4aa26eb8baa382adc' }, h(\"h4\", { key: 'b96b6a082351c803d229038c2ca7acc99294ab86' }, h(\"translate-label\", { key: '6aab9024ff0fd8734706bd7caec59335c3ddc7ac', labelKey: 'cookie.policy.manage_cookies_heading' })), h(\"onto-toggle-switch\", { key: 'c97358e1147cbb36d950302ee2fc29733e088ef9', checked: cookieConsent === null || cookieConsent === void 0 ? void 0 : cookieConsent.statistic, labelKey: 'cookie.policy.statistic_cookies', tooltipTranslationKey: 'cookie.policy.statistic_tooltip', context: CookieType.STATISTIC }), h(\"p\", { key: 'e6172a9fb3b8e1b0ab10609b1ebda7fcf350e93b' }, h(\"translate-label\", { key: '701fb389671ed440a1080e6e76fd1344cb4e5b6e', labelKey: 'cookie.policy.statistic_text' })), h(\"onto-toggle-switch\", { key: 'e36a2699b2140e33288dd2cac9702d8fca6784db', checked: cookieConsent === null || cookieConsent === void 0 ? void 0 : cookieConsent.thirdParty, labelKey: 'cookie.policy.third_party_cookies', tooltipTranslationKey: 'cookie.policy.third_party_tooltip', context: CookieType.THIRD_PARTY }), h(\"p\", { key: '98cced78a81c9942b5f5169fee662c368192946e' }, h(\"translate-label\", { key: 'df1ba989e1fc792fa9f56e4f9661fdb28fa55f90', labelKey: 'cookie.policy.third_party_cookies_text' }))), h(\"p\", { key: 'a892129a7183dd84e10eb31cf5a6a1698b61b5d7' }, h(\"span\", { key: 'c2b6a400347f2019c7647273c3d7029f0ad9b039' }, h(\"translate-label\", { key: 'd43317f8f68615516c7a81e8aa787756bdec1205', labelKey: 'cookie.policy.change_cookies' }), h(\"i\", { key: '8f9efc29f7630c1d6e58fdf50241ff625fc8c7bf' }, \"\\u00A0\", h(\"translate-label\", { key: '6c906a77d90237a17b5c3e1887c41b532830040d', labelKey: 'menu.setup.label' }), \"\\u00A0>\\u00A0\", h(\"translate-label\", { key: '75f59cf20cd4a1fbee4afb3388b5f341fd957613', labelKey: 'menu.my.settings.label' }), \"\\u00A0>\\u00A0\", h(\"translate-label\", { key: '352f8f0b324655e86bc9175e8c70567e34e68f2a', labelKey: 'security.user.settings' }), \"\\u00A0>\\u00A0\", h(\"translate-label\", { key: '0067f9f65859f946006115d1957337f42a805274', labelKey: 'cookie.policy.change_cookies_location4' }), \"\\u00A0\"))))));\n }\n updateCookieConsent(payload) {\n var _a, _b;\n const cookieConsent = new CookieConsent((_b = (_a = this.user) === null || _a === void 0 ? void 0 : _a.appSettings) === null || _b === void 0 ? void 0 : _b.COOKIE_CONSENT);\n // Context is either 'thirdParty' or 'statistic'\n cookieConsent[payload.context] = payload.checked;\n cookieConsent.updatedAt = new Date().getTime();\n return cookieConsent;\n }\n setUserCookieConsent(cookieConsent) {\n if (!this.user.appSettings) {\n this.user.appSettings = new AppSettings();\n }\n this.user.appSettings.COOKIE_CONSENT = cookieConsent;\n }\n};\nOntoCookiePolicyDialog.style = ontoCookiePolicyDialogCss();\n\nexport { OntoCookieConsent as onto_cookie_consent, OntoCookiePolicyDialog as onto_cookie_policy_dialog };\n","import { Loggers, ServiceProvider, LanguageContextService } from '@ontotext/workbench-api';\n\nfunction sanitizeHTML(html) {\n const element = document.createElement('textarea');\n element.innerHTML = html;\n return element.value;\n}\n\nconst MODULE_NAME = 'SharedComponents';\n/**\n * Logger for the Shared Components module.\n */\nclass LoggerProvider {\n /**\n * Gets the logger instance for the Shared Components module.\n *\n * @returns LoggerService instance for the Shared Components module\n */\n static get logger() {\n return Loggers.getLoggerInstance(MODULE_NAME);\n }\n}\n\n/**\n * Service responsible for translation operations in the component.\n */\nclass TranslationServiceClassDefinition {\n constructor() {\n this.languageContextService = ServiceProvider.get(LanguageContextService);\n this.translationChangedObservers = {};\n this.logger = LoggerProvider.logger;\n // log with background color\n this.defaultBundle = this.languageContextService.getDefaultBundle();\n this.subscribeToBundleChange();\n }\n /**\n * Translates the <code>messageLabelKey</code> with <code>translationParameter</code> and call <code>translationCallback</code> with translation of current language.\n * The <code>translationCallback</code> is called upon subscription and whenever the selected language is changed.\n *\n * @param messageLabelKey - The label key for the translation.\n * @param translationParameter - Parameters, if needed, for translation.\n * @param translationCallback - A function to be called when translating the `messageLabelKey`.\n * @returns A function that, when called, unsubscribes the provided callback from further translation updates.\n */\n onTranslate(messageLabelKey, translationParameter = [], translationCallback = () => { }) {\n this.translationChangedObservers[messageLabelKey] = this.translationChangedObservers[messageLabelKey] || [];\n const observer = { parameters: translationParameter, callback: translationCallback };\n this.translationChangedObservers[messageLabelKey].push(observer);\n translationCallback(this.translate(messageLabelKey, translationParameter));\n return () => {\n const index = this.translationChangedObservers[messageLabelKey].indexOf(observer);\n if (index !== -1) {\n this.translationChangedObservers[messageLabelKey].splice(index, 1);\n }\n };\n }\n /**\n * Translates the provided key using the currently selected language by applying the parameters if\n * provided.\n * @param key The key for the label which needs to be translated.\n * @param parameters Optional parameters which to be applied during the translation.\n */\n translate(key, parameters) {\n return this.translateInLocale(key, parameters);\n }\n /**\n * Translates a given key into the specified locale. If parameters are provided,\n * they will be applied to the translation.\n *\n * @param key - The translation key, which can be dot-separated for nested translations.\n * @param parameters - Optional parameters to be substituted into the translation string.\n * @returns The translated string with parameters applied if available, or the key itself if not found.\n */\n translateInLocale(key, parameters) {\n // Attempt to retrieve the translation from the specified locale's bundle.\n let translation = this.translateFromBundle(this.currentBundle, key);\n // If not found, fall back to the default language bundle.\n if (!translation) {\n translation = this.translateFromBundle(this.defaultBundle, key);\n }\n // If translation was found, apply any parameters provided and return the result.\n if (translation) {\n translation = this.applyParameters(translation, parameters);\n return sanitizeHTML(translation);\n }\n this.logger.warn(`Missing translation for key: [${key}]`);\n return key;\n }\n /**\n * Retrieves a translation from a specified translation bundle using the given key.\n * If the key represents a nested JSON path, it attempts to resolve the key as such.\n *\n * @param bundle - The translation bundle for the specified locale.\n * @param key - The key to translate, which may be a simple key or dot-separated for nested keys.\n * @returns The translation string if found, or `undefined` if not available.\n */\n translateFromBundle(bundle, key) {\n if (!bundle) {\n return undefined;\n }\n // Try to retrieve the translation directly if it is defined as a whole string,\n // for instance as \"some_function.btn.label\".\n let translation = bundle[key];\n // If not found, attempt to retrieve the translation if it is defined as a JSON object.\n if (typeof translation !== 'string') {\n translation = this.translateAsJsonObject(bundle, key);\n }\n return translation;\n }\n /**\n * Resolves a nested translation key by treating it as a path in a JSON object.\n * For example, if the key is \"some.key.path\", this method will navigate through\n * the JSON object structure to retrieve the value at that path.\n *\n * @param bundle - The translation bundle containing nested keys.\n * @param key - The dot-separated key representing the path to the translation.\n * @returns The translation string if found, or `undefined` if the path does not exist.\n */\n translateAsJsonObject(bundle, key) {\n let path = key.split('.');\n return this.getTranslation(bundle, path);\n }\n /**\n * Recursively navigates through a JSON object based on a path array to retrieve\n * a translation string. Each element in the path array represents a nested key.\n *\n * @param jsonObject - The current JSON object or nested object being searched.\n * @param path - An array representing the path to the translation, where each element is a key.\n * @returns The translation string if found, or `undefined` if the path does not exist.\n */\n getTranslation(jsonObject, path) {\n // Stop the recursion if path or reach the inner element\n if (!path || !jsonObject) {\n return undefined;\n }\n const jsonOrTranslation = jsonObject[path.splice(0, 1)[0]];\n if (path.length === 0) {\n return jsonOrTranslation;\n }\n if (typeof jsonOrTranslation !== 'string') {\n // continue if the inner element is not reached.\n if (path.length > 0) {\n return this.getTranslation(jsonOrTranslation, path);\n }\n return jsonOrTranslation;\n }\n return undefined;\n }\n applyParameters(translation, parameters) {\n if (parameters) {\n return parameters.reduce(\n // replace all occurrence of parameter key with parameter value.\n (translation, parameter) => TranslationServiceClassDefinition.replaceAll(translation, parameter), translation);\n }\n return translation;\n }\n static replaceAll(translation, parameter) {\n return parameter ? translation.split(`{{${parameter.key}}}`).join(parameter.value) : translation;\n }\n notifyTranslationsChanged() {\n Object.keys(this.translationChangedObservers).forEach((eventName) => {\n const observers = this.translationChangedObservers[eventName] || [];\n observers.forEach((observer) => observer.callback(this.translate(eventName, observer.parameters)));\n });\n }\n subscribeToBundleChange() {\n this.languageChangeSubscription = this.languageContextService.onLanguageBundleChanged((bundle) => {\n if (bundle) {\n this.currentBundle = bundle;\n this.notifyTranslationsChanged();\n }\n });\n }\n destroy() {\n if (this.languageChangeSubscription) {\n this.languageChangeSubscription();\n }\n }\n}\nconst TranslationService = new TranslationServiceClassDefinition();\n\nexport { LoggerProvider as L, TranslationService as T, sanitizeHTML as s };\n"],"names":["OntoCookieConsent","constructor","hostRef","registerInstance","this","consentGiven","createEvent","showModal","openModal","event","preventDefault","handleConsentClick","emit","onDialogClose","render","h","Host","key","class","labelKey","id","href","onClick","dialogHandler","CookieType","style","OntoCookiePolicyDialog","logger","LoggerProvider","user","ServiceProvider","get","SecurityContextService","getAuthenticatedUser","securityService","SecurityService","toggleChanged","setUserCookieConsent","updateCookieConsent","detail","updateAuthenticatedUser","toUser","catch","error","_a","_b","config","dialogTitle","TranslationService","translate","onClose","modalClass","cookieConsent","CookieConsent","appSettings","COOKIE_CONSENT","slot","checked","statistic","tooltipTranslationKey","context","STATISTIC","thirdParty","THIRD_PARTY","payload","updatedAt","Date","getTime","AppSettings","sanitizeHTML","html","element","document","createElement","innerHTML","value","Loggers","getLoggerInstance","TranslationServiceClassDefinition","languageContextService","LanguageContextService","translationChangedObservers","defaultBundle","getDefaultBundle","subscribeToBundleChange","onTranslate","messageLabelKey","translationParameter","translationCallback","observer","parameters","callback","push","index","indexOf","splice","translateInLocale","translation","translateFromBundle","currentBundle","applyParameters","warn","bundle","translateAsJsonObject","path","split","getTranslation","jsonObject","jsonOrTranslation","length","reduce","parameter","replaceAll","join","notifyTranslationsChanged","Object","keys","forEach","eventName","languageChangeSubscription","onLanguageBundleChanged","destroy"],"ignoreList":[],"sourceRoot":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export const __webpack_esm_id__=67888;export const __webpack_esm_ids__=[9717,67888,73702,82926,96248];export const __webpack_esm_modules__={9717(){function e(e,r){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-status-info.html",scope:{resource:"="},link:o=>{const t=[];o.popoverTemplate="resourceStatusInfoTemplate.html",o.popoverIsOpen=!1,o.context=o.resource.importResource.context,o.replaceGraphs=o.resource.importResource.replaceGraphs,o.baseUrl=decodeURIComponent(o.resource.importResource.baseURI),o.forceSerial=o.resource.importResource.forceSerial,o.importedOn=o.resource.importResource.importedOn,o.parserSettings=o.resource.importResource.parserSettings,o.open=()=>{o.closeAllDialogs(),o.popoverIsOpen=!0},o.closeAllDialogs=()=>{e.$broadcast("closePopovers")},o.close=()=>{o.popoverIsOpen=!1};const s=e=>{"Escape"===e.key&&o.$apply(()=>{o.close()})};t.push(o.$on("closePopovers",o.close)),r.on("keydown",s),o.$on("$destroy",()=>{r.off("keydown",s),t.forEach(e=>e())})}}}angular.module("graphdb.framework.import.directives.import-resource-status-info",[]).directive("importResourceStatusInfo",e),e.$inject=["$rootScope","$document"]},54419(e,r,o){o(96248);var t=o(28847),s=o(78618);function i(e){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-message.html",scope:{resource:"="},link:r=>{r.ImportResourceStatus=t.I,r.toTitleCase=e=>s.Sn(e),r.showMessage=r=>{e.open({templateUrl:"js/angular/import/templates/import-resource-message-dialog.html",controller:"ImportResourceMessageDialogController",size:"lg",windowClass:"import-resource-message-dialog",backdrop:"static",resolve:{message:function(){return r?r.importResource.message:""}}})}}}}angular.module("graphdb.framework.import.directives.import-resource-message",["graphdb.framework.impex.import.controllers.import-resource-message-dialog"]).directive("importResourceMessage",i),i.$inject=["$uibModal"]},67888(e,r,o){o(82493),o(5687),o(39324),o(73702),o(82926),o(83136),o(76933),o(47195),o(56669),angular.module("graphdb.framework.impex.import",["toastr","ngRoute","ngFileUpload","ui.bootstrap","graphdb.framework.impex.import.controllers","graphdb.framework.core.services.repositories","graphdb.framework.import.directives.validate-uri","graphdb.framework.import.directives.import-progress-indicator","graphdb.framework.import.directives.import-resource-tree"])},73702(){function e(e){return{restrict:"A",require:"ngModel",link:function(r,o,t,s){s.$parsers.unshift(function(r){if(s.$setValidity("validateUri",!0),!s.$isEmpty(r)){const o=e.isValidIri(r,r.toString());s.$setValidity("validateUri",o)}return r})}}}angular.module("graphdb.framework.import.directives.validate-uri",[]).directive("validateUri",e),e.$inject=["UriUtils"]},82926(){function e(){return{link:function(e,r,o){e.$watch("file.status",function(){"IMPORTING"!==e.file.status&&"UPLOADING"!==e.file.status||!$(r).has("object").length>0&&$(r).append('<object width="'+o.size+'" height="'+o.size+'" data="js/angular/templates/loader/ot-loader.svg?v=3.3.2-TR1">{{\'common.loading\' | translate}}</object>')})}}}angular.module("graphdb.framework.import.directives.import-progress-indicator",[]).directive("ImportProgressIndicator",e),e.$inject=[]},83136(e,r,o){var t=o(28847),s=(o(54419),o(9717),o(18025)),i=o(57436),c=o(7796),a=o(56636),l=o(57154);const p={FILE:"FILE",DIRECTORY:"DIRECTORY",ALL:"ALL"},n={ALL:"ALL",NONE:"NONE",IMPORTED:"IMPORTED",NOT_IMPORTED:"NOT_IMPORTED"};function u(e,r){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-tree.html",scope:{columnKeys:"=",showTypeFilter:"=",sortBy:"=",asc:"=",onImport:"&",onImportAll:"&",onReset:"&",onRemove:"&",onStopImport:"&",onEditResource:"&"},link:(o,u,m)=>{o.resources=new i.k,o.displayResources=[],o.TYPE_FILTER_OPTIONS=p,o.filterByType=p.ALL,o.filterByFileName="",o.STATUS_OPTIONS=n,o.selectedByStatus=void 0,o.areAllDisplayedImportResourcesSelected=!1,o.areAllDisplayedImportResourcesPartialSelected=!1,o.ImportResourceStatus=t.I,o.canRemoveResource=angular.isDefined(m.onRemove),o.canResetSelectedResources=!1,o.SORTING_TYPES=s.R,o.sortAsc=!angular.isDefined(m.asc)||o.asc,o.sortedBy=o.sortBy,o.showLoader=r.getShowLoader(),o.hasSelection=!1,o.selectionChanged=e=>{e.setSelection(e.selected),I(),d(),g()},o.selectResourceWithStatus=e=>{o.selectedByStatus=e,o.resources.setSelection(!1),n.ALL===o.selectedByStatus?o.resources.setSelection(!0):n.IMPORTED===o.selectedByStatus?o.resources.selectAllWithStatus([t.I.DONE]):n.NOT_IMPORTED===o.selectedByStatus&&o.resources.selectAllWithStatus([t.I.IMPORTING,t.I.NONE,t.I.ERROR,t.I.PENDING,t.I.INTERRUPTING]),R(),d()},o.filterByTypeChanged=e=>{o.filterByType=e,R()},o.filterByFileNameChanged=e=>{o.filterByFileName=e,N(R,100)},o.onResetStatus=()=>{const e=o.resources.getAllSelected().map(e=>e.path);e.length>0&&o.onReset({resources:e})},o.resetStatus=e=>{o.onReset({resources:[e.path]})},o.onRemoveResources=()=>{const e=o.resources.getAllSelected();e&&e.length>0&&o.onRemove({resources:e})},o.removeResource=e=>{o.onRemove({resources:[e]})},o.importAll=e=>{const r=o.resources.getAllSelectedForImport();r.length>0&&o.onImportAll({selectedResources:r,withoutChangingSettings:e})},o.stopImport=e=>{o.onStopImport({resource:e})},o.sort=e=>{o.sortedBy===e?o.sortAsc=!o.sortAsc:o.sortAsc=!0,o.sortedBy=e,R()},o.editResource=e=>{o.onEditResource({resource:e})};const d=()=>{o.canResetSelectedResources=o.resources.getSelectedImportedResources()},R=()=>{o.resources.getRoot().updateSelectionState(),y(),o.displayResources=o.resources.toList().filter(A).filter(E),g(),I()},g=()=>{const e=o.resources.getAllSelectedFilesNames();o.hasSelection=e.length>0,r.updateSelectedFilesNames(e)},I=()=>{const e=o.displayResources.some(e=>!e.selected),r=o.displayResources.some(e=>e.selected);o.areAllDisplayedImportResourcesSelected=r&&!e,o.areAllDisplayedImportResourcesPartialSelected=r&&e},y=()=>{s.R.NAME===o.sortedBy?o.resources.sort(f(o.sortAsc)):s.R.SIZE===o.sortedBy?o.resources.sort(h(o.sortAsc)):s.R.MODIFIED===o.sortedBy?o.resources.sort(S(o.sortAsc)):s.R.IMPORTED===o.sortedBy?o.resources.sort(T(o.sortAsc)):s.R.CONTEXT===o.sortedBy&&o.resources.sort(v(o.sortAsc))},f=e=>(r,o)=>e?r.importResource.name.localeCompare(o.importResource.name):o.importResource.name.localeCompare(r.importResource.name),h=e=>(r,o)=>{const t=l.ByteUtils.convertToBytes(r.importResource.size),s=l.ByteUtils.convertToBytes(o.importResource.size);return e?t-s:s-t},S=e=>(r,o)=>{const t=r.importResource.modifiedOn||Number.MAX_VALUE,s=o.importResource.modifiedOn||Number.MAX_VALUE;return e?t-s:s-t},T=e=>(r,o)=>{const t=r.importResource.importedOn||Number.MAX_VALUE,s=o.importResource.importedOn||Number.MAX_VALUE;return e?t-s:s-t},v=e=>(r,o)=>e?r.importResource.context.localeCompare(o.importResource.context):o.importResource.context.localeCompare(r.importResource.context),A=e=>p.ALL===o.filterByType||(o.filterByType===p.FILE?e.isFile():o.filterByType===p.DIRECTORY&&e.isDirectory()),E=e=>!o.filterByFileName||(o.filterByType===p.DIRECTORY?e.hasTextInDirectoriesName(o.filterByFileName):o.filterByType===p.FILE?e.hasTextInFilesName(o.filterByFileName):e.hasTextInResourcesName(o.filterByFileName));let O;const N=(r,o)=>{O&&e.cancel(O),O=e(r,o)},b=[];b.push(r.onResourcesUpdated((e=[])=>{const t=c.D.USER===r.getActiveTabId();o.resources.isEmpty()?(o.resources=a.Fp.toImportResourceTree(e,t),t&&(o.sortedBy=s.R.MODIFIED)):a.Fp.mergeResourceTree(o.resources,e,t),a.Fp.calculateElementIndent(o.resources),a.Fp.setupAfterTreeInitProperties(o.resources),R(),d()})),b.push(r.onShowLoaderUpdated(e=>o.showLoader=e)),b.push(r.onActiveTabIdUpdated(()=>o.resources=new i.k)),o.$on("$destroy",()=>{b.forEach(e=>e())})}}}angular.module("graphdb.framework.import.directives.import-resource-tree",["graphdb.framework.import.directives.import-resource-message","graphdb.framework.import.directives.import-resource-status-info"]).directive("importResourceTree",u),u.$inject=["$timeout","ImportContextService"]},96248(e,r,o){var t=o(304);angular.module("graphdb.framework.impex.import.controllers.import-resource-message-dialog",[]).controller("ImportResourceMessageDialogController",i),i.$inject=["$scope","$uibModalInstance","$translate","toastr","message"];const s=t.I.logger;function i(e,r,o,t,i){e.message=i,e.close=()=>{r.dismiss()},e.copyToClipboard=()=>{navigator.clipboard.writeText(e.message).then(()=>{t.success(o.instant("import.help.messages.copied_to_clipboard")),e.close()},e=>{s.error("Could not copy text: ",e)})}}}};
|
|
2
|
-
//# sourceMappingURL=67888.b75d9678cf65cd82f065.bundle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"67888.b75d9678cf65cd82f065.bundle.js","mappings":"mJAQA,SAASA,EAAkCC,EAAYC,GACnD,MAAO,CACHC,SAAU,IACVC,YAAa,+DACbC,MAAO,CACHC,SAAU,KAEdC,KAAOC,IACH,MAAMC,EAAc,GAKpBD,EAAOE,gBAAkB,kCACzBF,EAAOG,eAAgB,EACvBH,EAAOI,QAAUJ,EAA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yF,EAAcxK,KAAKkD,EAAqBqI,qBAAqB,IAAM5M,EAAOmF,UAAY,IAAIC,EAAAA,IAO1FpF,EAAOsB,IAAI,WALkBuL,KACzBhB,EAAcpK,QAASqL,GAAiBA,QAOxD,CAvTAnL,QACKC,OAAO,2DANI,CACZ,8DACA,oEAKCC,UAAU,qBAAsBwC,GAErCA,EAA4BvC,QAAU,CAAC,WAAY,uB,4BC/BnDH,QACKC,OAAO,4EAA6E,IACpFW,WAAW,wCAAyCwK,GAEzDA,EAAsCjL,QAAU,CAAC,SAAU,oBAAqB,aAAc,SAAU,WAExG,MAAMkL,EAASC,EAAAA,EAAeD,OAE9B,SAASD,EAAsC/M,EAAQkN,EAAmBC,EAAYC,EAAQxK,GAC1F5C,EAAO4C,QAAUA,EAGjB5C,EAAOgB,MAAQ,KACXkM,EAAkBG,WAGtBrN,EAAOsN,gBAAkB,KACrBC,UAAUC,UAAUC,UAAUzN,EAAO4C,SAChC8K,KAAK,KACFN,EAAOO,QAAQR,EAAWS,QAAQ,6CAClC5N,EAAOgB,SACP6M,IACAb,EAAOc,MAAM,wBAAyBD,KAGtD,C","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/import/directives/import-resource-status-info.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/import/directives/import-resource-message.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/import/app.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/import/directives/validate-uri.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/import/directives/import-progress-indicator.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/import/directives/import-resource-tree.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/import/controllers/import-resource-message-dialog.controller.js"],"sourcesContent":["const modules = [];\n\nangular\n .module('graphdb.framework.import.directives.import-resource-status-info', modules)\n .directive('importResourceStatusInfo', importResourceStatusInfoDirective);\n\nimportResourceStatusInfoDirective.$inject = ['$rootScope', '$document'];\n\nfunction importResourceStatusInfoDirective($rootScope, $document) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/import/templates/import-resource-status-info.html',\n scope: {\n resource: '='\n },\n link: ($scope) => {\n const subscribers = [];\n\n // =========================\n // Public variables\n // =========================\n $scope.popoverTemplate = 'resourceStatusInfoTemplate.html';\n $scope.popoverIsOpen = false;\n $scope.context = $scope.resource.importResource.context;\n $scope.replaceGraphs = $scope.resource.importResource.replaceGraphs;\n $scope.baseUrl = decodeURIComponent($scope.resource.importResource.baseURI);\n $scope.forceSerial = $scope.resource.importResource.forceSerial;\n $scope.importedOn = $scope.resource.importResource.importedOn;\n $scope.parserSettings = $scope.resource.importResource.parserSettings;\n\n // =========================\n // Public functions\n // =========================\n $scope.open = () => {\n $scope.closeAllDialogs();\n $scope.popoverIsOpen = true;\n };\n\n $scope.closeAllDialogs = () => {\n $rootScope.$broadcast('closePopovers');\n };\n\n $scope.close = () => {\n $scope.popoverIsOpen = false;\n };\n\n const handleEscapeKeyPress = (event) => {\n if (event.key === 'Escape') {\n $scope.$apply(() => {\n $scope.close();\n });\n }\n };\n\n const removeAllSubscribers = () => {\n subscribers.forEach((subscriber) => subscriber());\n };\n\n // =========================\n // Subscriptions\n // =========================\n\n subscribers.push($scope.$on('closePopovers', $scope.close));\n $document.on('keydown', handleEscapeKeyPress);\n\n $scope.$on('$destroy', () => {\n $document.off('keydown', handleEscapeKeyPress);\n removeAllSubscribers();\n });\n }\n };\n}\n","import 'angular/import/controllers/import-resource-message-dialog.controller';\nimport {ImportResourceStatus} from \"../../models/import/import-resource-status\";\nimport * as stringUtils from \"../../utils/string-utils\";\n\nconst modules = ['graphdb.framework.impex.import.controllers.import-resource-message-dialog'];\n\nangular\n .module('graphdb.framework.import.directives.import-resource-message', modules)\n .directive('importResourceMessage', importResourceMessageDirective);\n\nimportResourceMessageDirective.$inject = ['$uibModal'];\n\nfunction importResourceMessageDirective($uibModal) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/import/templates/import-resource-message.html',\n scope: {\n resource: '='\n },\n link: ($scope) => {\n $scope.ImportResourceStatus = ImportResourceStatus;\n $scope.toTitleCase = (str) => stringUtils.toTitleCase(str);\n\n /**\n *\n * @param {ImportResourceTreeElement} resourceTreeElement\n */\n $scope.showMessage = (resourceTreeElement) => {\n $uibModal.open({\n templateUrl: 'js/angular/import/templates/import-resource-message-dialog.html',\n controller: 'ImportResourceMessageDialogController',\n size: 'lg',\n windowClass: 'import-resource-message-dialog',\n backdrop: 'static',\n resolve: {\n message: function () {\n return resourceTreeElement ? resourceTreeElement.importResource.message : '';\n }\n }\n });\n }\n }\n };\n}\n","import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/import/controllers/import-view.controller';\nimport 'angular/import/directives/validate-uri.directive';\nimport 'angular/import/directives/import-progress-indicator.directive';\nimport 'angular/import/directives/import-resource-tree.directive';\nimport 'angular/core/services/repositories.service';\nimport 'ng-file-upload/dist/ng-file-upload.min';\nimport 'ng-file-upload/dist/ng-file-upload-shim.min';\n\nconst modules = [\n 'toastr',\n 'ngRoute',\n 'ngFileUpload',\n 'ui.bootstrap',\n 'graphdb.framework.impex.import.controllers',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.import.directives.validate-uri',\n 'graphdb.framework.import.directives.import-progress-indicator',\n 'graphdb.framework.import.directives.import-resource-tree'\n];\n\nangular.module('graphdb.framework.impex.import', modules);\n","/**\n * This AngularJS directive validates whether an input value is a valid URI (IRI).\n *\n * @directive validateUri\n * @restrict A (Attribute)\n * @requires ngModel\n *\n * @example\n * <input type=\"text\" name=\"url\" ng-model=\"url\" validate-uri>\n */\nconst modules = [];\n\nangular\n .module('graphdb.framework.import.directives.validate-uri', modules)\n .directive('validateUri', validateUri);\n\nvalidateUri.$inject = ['UriUtils'];\n\n/**\n * @function validateUri\n * @param {UriUtils} UriUtils - Service for URI validation.\n */\nfunction validateUri(UriUtils) {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function (scope, element, attr, ctrl) {\n ctrl.$parsers.unshift(function (value) {\n ctrl.$setValidity('validateUri', true);\n if (!ctrl.$isEmpty(value)) {\n const valid = UriUtils.isValidIri(value, value.toString());\n ctrl.$setValidity('validateUri', valid);\n }\n return value;\n });\n }\n };\n}\n","const modules = [];\n\nangular\n .module('graphdb.framework.import.directives.import-progress-indicator', modules)\n .directive('ImportProgressIndicator', ImportProgressIndicator);\n\nImportProgressIndicator.$inject = [];\n\n// importDirectives.directive('filesOntoLoader',\nfunction ImportProgressIndicator() {\n return {\n link: function (scope, element, attr) {\n scope.$watch('file.status', function () {\n if (scope.file.status === 'IMPORTING' || scope.file.status === 'UPLOADING') {\n if (!$(element).has('object').length > 0) {\n $(element).append('<object width=\"' + attr.size + '\" height=\"' + attr.size + '\" data=\"js/angular/templates/loader/ot-loader.svg?v=3.3.2-TR1\">{{\\'common.loading\\' | translate}}</object>');\n }\n }\n });\n }\n };\n}\n","import {ImportResourceStatus} from \"../../models/import/import-resource-status\";\nimport 'angular/import/directives/import-resource-message.directive';\nimport 'angular/import/directives/import-resource-status-info.directive';\nimport {SortingType} from \"../../models/import/sorting-type\";\nimport {ImportResourceTreeElement} from \"../../models/import/import-resource-tree-element\";\nimport {TABS} from \"../services/import-context.service\";\nimport {ImportResourceTreeService} from \"../services/import-resource-tree.service\";\nimport {\n ByteUtils,\n} from \"@ontotext/workbench-api\";\n\nconst TYPE_FILTER_OPTIONS = {\n 'FILE': 'FILE',\n 'DIRECTORY': 'DIRECTORY',\n 'ALL': 'ALL',\n};\n\nconst STATUS_OPTIONS = {\n 'ALL': 'ALL',\n 'NONE': 'NONE',\n 'IMPORTED': 'IMPORTED',\n 'NOT_IMPORTED': 'NOT_IMPORTED',\n};\n\nconst modules = [\n 'graphdb.framework.import.directives.import-resource-message',\n 'graphdb.framework.import.directives.import-resource-status-info',\n];\n\nangular\n .module('graphdb.framework.import.directives.import-resource-tree', modules)\n .directive('importResourceTree', importResourceTreeDirective);\n\nimportResourceTreeDirective.$inject = ['$timeout', 'ImportContextService'];\n\nfunction importResourceTreeDirective($timeout, ImportContextService) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/import/templates/import-resource-tree.html',\n scope: {\n /**\n * Contains mapping of the column names to label keys. Should contain\n * keys for: name, size, imported, modified, context column names.\n */\n columnKeys: '=',\n /**\n * If the type filter buttons should be visible.\n */\n showTypeFilter: '=',\n /**\n * The default field to sort the resources by.\n */\n sortBy: '=',\n asc: '=',\n onImport: '&',\n onImportAll: '&',\n onReset: '&',\n onRemove: '&',\n onStopImport: '&',\n onEditResource: '&',\n },\n link: ($scope, element, attrs) => {\n // =========================\n // Public variables\n // =========================\n $scope.resources = new ImportResourceTreeElement();\n $scope.displayResources = [];\n $scope.TYPE_FILTER_OPTIONS = TYPE_FILTER_OPTIONS;\n $scope.filterByType = TYPE_FILTER_OPTIONS.ALL;\n $scope.filterByFileName = '';\n $scope.STATUS_OPTIONS = STATUS_OPTIONS;\n $scope.selectedByStatus = undefined;\n $scope.areAllDisplayedImportResourcesSelected = false;\n $scope.areAllDisplayedImportResourcesPartialSelected = false;\n $scope.ImportResourceStatus = ImportResourceStatus;\n $scope.canRemoveResource = angular.isDefined(attrs.onRemove);\n $scope.canResetSelectedResources = false;\n $scope.SORTING_TYPES = SortingType;\n $scope.sortAsc = angular.isDefined(attrs.asc) ? $scope.asc : true;\n $scope.sortedBy = $scope.sortBy;\n $scope.showLoader = ImportContextService.getShowLoader();\n $scope.hasSelection = false;\n\n // =========================\n // Public functions\n // =========================\n\n /**\n * Updates the selection model when a resource is selected or unselected.\n * @param {ImportResourceTreeElement} resource The resource that was selected or unselected.\n */\n $scope.selectionChanged = ((resource) => {\n resource.setSelection(resource.selected);\n updateSelectByStateDropdownModel();\n setCanResetResourcesFlag();\n updateHasSelection();\n });\n\n $scope.selectResourceWithStatus = (resourceStatus) => {\n $scope.selectedByStatus = resourceStatus;\n $scope.resources.setSelection(false);\n\n if (STATUS_OPTIONS.ALL === $scope.selectedByStatus) {\n $scope.resources.setSelection(true);\n } else if (STATUS_OPTIONS.IMPORTED === $scope.selectedByStatus) {\n $scope.resources.selectAllWithStatus([ImportResourceStatus.DONE]);\n } else if (STATUS_OPTIONS.NOT_IMPORTED === $scope.selectedByStatus) {\n $scope.resources.selectAllWithStatus([ImportResourceStatus.IMPORTING, ImportResourceStatus.NONE, ImportResourceStatus.ERROR, ImportResourceStatus.PENDING, ImportResourceStatus.INTERRUPTING]);\n }\n\n updateListedImportResources();\n setCanResetResourcesFlag();\n };\n\n $scope.filterByTypeChanged = (newType) => {\n $scope.filterByType = newType;\n updateListedImportResources();\n };\n\n $scope.filterByFileNameChanged = (filterByFileName) => {\n $scope.filterByFileName = filterByFileName;\n debounce(updateListedImportResources, 100);\n };\n\n /**\n * Resets the status of the selected resources.\n */\n $scope.onResetStatus = () => {\n const resourcesNames = $scope.resources.getAllSelected()\n .map((resource) => resource.path);\n if (resourcesNames.length > 0) {\n $scope.onReset({resources: resourcesNames});\n }\n };\n\n /**\n * Resets the status of the given resource.\n * @param {ImportResourceTreeElement} importResource\n */\n $scope.resetStatus = (importResource) => {\n $scope.onReset({resources: [importResource.path]});\n };\n\n $scope.onRemoveResources = () => {\n const selectedResources = $scope.resources.getAllSelected();\n if (selectedResources && selectedResources.length > 0) {\n $scope.onRemove({resources: selectedResources});\n }\n };\n\n $scope.removeResource = (resource) => {\n $scope.onRemove({resources: [resource]});\n };\n\n $scope.importAll = (withoutChangingSettings) => {\n const selectedResources = $scope.resources.getAllSelectedForImport();\n if (selectedResources.length > 0) {\n $scope.onImportAll({selectedResources: selectedResources, withoutChangingSettings});\n }\n };\n\n $scope.stopImport = (importResource) => {\n $scope.onStopImport({resource: importResource});\n };\n\n /**\n * Sorts resources by provided sorting type.\n * @param {SortingType} sortedBy The sorting type to use.\n */\n $scope.sort = (sortedBy) => {\n if ($scope.sortedBy === sortedBy) {\n $scope.sortAsc = !$scope.sortAsc;\n } else {\n $scope.sortAsc = true;\n }\n $scope.sortedBy = sortedBy;\n updateListedImportResources();\n };\n\n $scope.editResource = (resource) => {\n $scope.onEditResource({resource});\n };\n\n // =========================\n // Private functions\n // =========================\n\n /**\n * Sets the flag showing if any of the selected resources is already imported\n * and can have their states reset.\n */\n const setCanResetResourcesFlag = () => {\n $scope.canResetSelectedResources = $scope.resources.getSelectedImportedResources();\n };\n\n const updateListedImportResources = () => {\n $scope.resources.getRoot().updateSelectionState();\n sortResources();\n $scope.displayResources = $scope.resources.toList()\n .filter(filterByType)\n .filter(filterByName);\n\n updateHasSelection();\n updateSelectByStateDropdownModel();\n };\n\n const updateHasSelection = () => {\n const allSelectedFilesNames = $scope.resources.getAllSelectedFilesNames();\n $scope.hasSelection = allSelectedFilesNames.length > 0;\n ImportContextService.updateSelectedFilesNames(allSelectedFilesNames);\n };\n\n const updateSelectByStateDropdownModel = () => {\n const hasUnselectedDisplayedImportResource = $scope.displayResources.some((resource) => !resource.selected);\n const hasSelectedDisplayedImportResource = $scope.displayResources.some((resource) => resource.selected);\n $scope.areAllDisplayedImportResourcesSelected = hasSelectedDisplayedImportResource && !hasUnselectedDisplayedImportResource;\n $scope.areAllDisplayedImportResourcesPartialSelected = hasSelectedDisplayedImportResource && hasUnselectedDisplayedImportResource;\n };\n\n const sortResources = () => {\n if (SortingType.NAME === $scope.sortedBy) {\n $scope.resources.sort(compareByName($scope.sortAsc));\n } else if (SortingType.SIZE === $scope.sortedBy) {\n $scope.resources.sort(compareBySize($scope.sortAsc));\n } else if (SortingType.MODIFIED === $scope.sortedBy) {\n $scope.resources.sort(compareByModified($scope.sortAsc));\n } else if (SortingType.IMPORTED === $scope.sortedBy) {\n $scope.resources.sort(compareByImportedOn($scope.sortAsc));\n } else if (SortingType.CONTEXT === $scope.sortedBy) {\n $scope.resources.sort(compareByContext($scope.sortAsc));\n }\n };\n\n const compareByName = (acs) => (r1, r2) => {\n return acs ? r1.importResource.name.localeCompare(r2.importResource.name) : r2.importResource.name.localeCompare(r1.importResource.name);\n };\n\n const compareBySize = (acs) => (r1, r2) => {\n // The format of size returned by the backend has changed, but we need to keep the old format for backward compatibility.\n // Therefore, we convert the size to always be in bytes.\n const r1Size = ByteUtils.convertToBytes(r1.importResource.size);\n const r2Size = ByteUtils.convertToBytes(r2.importResource.size);\n return acs ? r1Size - r2Size : r2Size - r1Size;\n };\n\n const compareByModified = (acs) => (r1, r2) => {\n const r1ModifiedOn = r1.importResource.modifiedOn || Number.MAX_VALUE;\n const r2ModifiedOn = r2.importResource.modifiedOn || Number.MAX_VALUE;\n return acs ? r1ModifiedOn - r2ModifiedOn : r2ModifiedOn - r1ModifiedOn;\n };\n\n const compareByImportedOn = (acs) => (r1, r2) => {\n const r1ImportedOn = r1.importResource.importedOn || Number.MAX_VALUE;\n const r2ImportedOn = r2.importResource.importedOn || Number.MAX_VALUE;\n return acs ? r1ImportedOn - r2ImportedOn : r2ImportedOn - r1ImportedOn;\n };\n\n const compareByContext = (acs) => (r1, r2) => {\n return acs ? r1.importResource.context.localeCompare(r2.importResource.context) : r2.importResource.context.localeCompare(r1.importResource.context);\n };\n\n const filterByType = (resource) => {\n if (TYPE_FILTER_OPTIONS.ALL === $scope.filterByType) {\n return true;\n }\n\n if ($scope.filterByType === TYPE_FILTER_OPTIONS.FILE) {\n return resource.isFile();\n }\n\n if ($scope.filterByType === TYPE_FILTER_OPTIONS.DIRECTORY) {\n return resource.isDirectory();\n }\n\n return false;\n };\n\n const filterByName = (resource) => {\n if (!$scope.filterByFileName) {\n return true;\n }\n\n if ($scope.filterByType === TYPE_FILTER_OPTIONS.DIRECTORY) {\n return resource.hasTextInDirectoriesName($scope.filterByFileName);\n }\n\n if ($scope.filterByType === TYPE_FILTER_OPTIONS.FILE) {\n return resource.hasTextInFilesName($scope.filterByFileName);\n }\n return resource.hasTextInResourcesName($scope.filterByFileName);\n };\n\n let debounceTimeout;\n const debounce = (func, delay) => {\n // Clear previous timeout\n if (debounceTimeout) {\n $timeout.cancel(debounceTimeout);\n }\n\n // Set new timeout\n debounceTimeout = $timeout(func, delay);\n };\n\n // =========================\n // Subscription handlers\n // =========================\n\n const onResourcesUpdatedHandler = (newResources = []) => {\n const isUserImport = TABS.USER === ImportContextService.getActiveTabId();\n if ($scope.resources.isEmpty()) {\n $scope.resources = ImportResourceTreeService.toImportResourceTree(newResources, isUserImport);\n if (isUserImport) {\n $scope.sortedBy = SortingType.MODIFIED;\n }\n } else {\n ImportResourceTreeService.mergeResourceTree($scope.resources, newResources, isUserImport);\n }\n ImportResourceTreeService.calculateElementIndent($scope.resources);\n ImportResourceTreeService.setupAfterTreeInitProperties($scope.resources);\n updateListedImportResources();\n setCanResetResourcesFlag();\n };\n\n // =========================\n // Subscriptions\n // =========================\n const subscriptions = [];\n\n subscriptions.push(ImportContextService.onResourcesUpdated(onResourcesUpdatedHandler));\n subscriptions.push(ImportContextService.onShowLoaderUpdated((showLoader) => $scope.showLoader = showLoader));\n subscriptions.push(ImportContextService.onActiveTabIdUpdated(() => $scope.resources = new ImportResourceTreeElement()));\n\n const removeAllSubscribers = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n // Deregister the watcher when the scope/directive is destroyed\n $scope.$on('$destroy', removeAllSubscribers);\n },\n };\n}\n","import {LoggerProvider} from \"../../core/services/logger-provider\";\n\nangular\n .module('graphdb.framework.impex.import.controllers.import-resource-message-dialog', [])\n .controller('ImportResourceMessageDialogController', ImportResourceMessageDialogController);\n\nImportResourceMessageDialogController.$inject = ['$scope', '$uibModalInstance', '$translate', 'toastr', 'message'];\n\nconst logger = LoggerProvider.logger;\n\nfunction ImportResourceMessageDialogController($scope, $uibModalInstance, $translate, toastr, message) {\n $scope.message = message;\n\n\n $scope.close = () => {\n $uibModalInstance.dismiss();\n };\n\n $scope.copyToClipboard = () => {\n navigator.clipboard.writeText($scope.message)\n .then(() => {\n toastr.success($translate.instant('import.help.messages.copied_to_clipboard'));\n $scope.close();\n }, (err) => {\n logger.error('Could not copy text: ', err);\n });\n };\n}\n"],"names":["importResourceStatusInfoDirective","$rootScope","$document","restrict","templateUrl","scope","resource","link","$scope","subscribers","popoverTemplate","popoverIsOpen","context","importResource","replaceGraphs","baseUrl","decodeURIComponent","baseURI","forceSerial","importedOn","parserSettings","open","closeAllDialogs","$broadcast","close","handleEscapeKeyPress","event","key","$apply","push","$on","on","off","forEach","subscriber","angular","module","directive","$inject","importResourceMessageDirective","$uibModal","ImportResourceStatus","toTitleCase","str","stringUtils","showMessage","resourceTreeElement","controller","size","windowClass","backdrop","resolve","message","validateUri","UriUtils","require","element","attr","ctrl","$parsers","unshift","value","$setValidity","$isEmpty","valid","isValidIri","toString","ImportProgressIndicator","$watch","file","status","$","has","length","append","TYPE_FILTER_OPTIONS","STATUS_OPTIONS","importResourceTreeDirective","$timeout","ImportContextService","columnKeys","showTypeFilter","sortBy","asc","onImport","onImportAll","onReset","onRemove","onStopImport","onEditResource","attrs","resources","ImportResourceTreeElement","displayResources","filterByType","ALL","filterByFileName","selectedByStatus","undefined","areAllDisplayedImportResourcesSelected","areAllDisplayedImportResourcesPartialSelected","canRemoveResource","isDefined","canResetSelectedResources","SORTING_TYPES","SortingType","sortAsc","sortedBy","showLoader","getShowLoader","hasSelection","selectionChanged","setSelection","selected","updateSelectByStateDropdownModel","setCanResetResourcesFlag","updateHasSelection","selectResourceWithStatus","resourceStatus","IMPORTED","selectAllWithStatus","DONE","NOT_IMPORTED","IMPORTING","NONE","ERROR","PENDING","INTERRUPTING","updateListedImportResources","filterByTypeChanged","newType","filterByFileNameChanged","debounce","onResetStatus","resourcesNames","getAllSelected","map","path","resetStatus","onRemoveResources","selectedResources","removeResource","importAll","withoutChangingSettings","getAllSelectedForImport","stopImport","sort","editResource","getSelectedImportedResources","getRoot","updateSelectionState","sortResources","toList","filter","filterByName","allSelectedFilesNames","getAllSelectedFilesNames","updateSelectedFilesNames","hasUnselectedDisplayedImportResource","some","hasSelectedDisplayedImportResource","NAME","compareByName","SIZE","compareBySize","MODIFIED","compareByModified","compareByImportedOn","CONTEXT","compareByContext","acs","r1","r2","name","localeCompare","r1Size","ByteUtils","convertToBytes","r2Size","r1ModifiedOn","modifiedOn","Number","MAX_VALUE","r2ModifiedOn","r1ImportedOn","r2ImportedOn","FILE","isFile","DIRECTORY","isDirectory","hasTextInDirectoriesName","hasTextInFilesName","hasTextInResourcesName","debounceTimeout","func","delay","cancel","subscriptions","onResourcesUpdated","onResourcesUpdatedHandler","newResources","isUserImport","TABS","USER","getActiveTabId","isEmpty","ImportResourceTreeService","toImportResourceTree","mergeResourceTree","calculateElementIndent","setupAfterTreeInitProperties","onShowLoaderUpdated","onActiveTabIdUpdated","removeAllSubscribers","subscription","ImportResourceMessageDialogController","logger","LoggerProvider","$uibModalInstance","$translate","toastr","dismiss","copyToClipboard","navigator","clipboard","writeText","then","success","instant","err","error"],"ignoreList":[],"sourceRoot":""}
|