graphdb-workbench 3.0.2-TR1 → 3.0.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/{18.b09e14d8a204a28fb95b.bundle.js → 18.b2d04af2d60cc37a5ebe.bundle.js} +1 -1
- package/dist/{190.431c135250df34322375.bundle.js → 190.4969eb91b83aaa7cd263.bundle.js} +1 -1
- package/dist/231.909faa919088245e9988.bundle.js +1 -1
- package/dist/{29.1f79f4caa66f63bd6611.bundle.js → 29.5ec5948f2e30819e6dc8.bundle.js} +1 -1
- package/dist/{30.2125e28509307f3a225f.bundle.js → 30.a60e3c2ac0de3b37e185.bundle.js} +1 -1
- package/dist/31.7452fe0f096c31a9a1f1.bundle.js +2 -0
- package/dist/{38.79bf8cac11760d2e69be.bundle.js → 38.8819c36a5204129f3dbc.bundle.js} +1 -1
- package/dist/{41.0d8779a7af2eb26cf157.bundle.js → 41.c6545eb0ce13e63738d2.bundle.js} +1 -1
- package/dist/410.b74d59055b7cf830abe5.bundle.js +1 -1
- package/dist/416.68f6286f80654cdbe4e4.bundle.js +1 -1
- package/dist/417.70adf0a6f0571c394764.bundle.js +1 -1
- package/dist/42.baaa159c3b1e81422600.bundle.js +1 -1
- package/dist/423.6edb13ec0cf08388c947.bundle.js +1 -1
- package/dist/424.725b821051516e73783a.bundle.js +1 -1
- package/dist/425.03fcf969da1a4e92fec3.bundle.js +1 -1
- package/dist/426.aa6924f6f1192d037009.bundle.js +1 -1
- package/dist/427.5c7b72141707b841e8a3.bundle.js +1 -1
- package/dist/428.0d471ce7c68654947c04.bundle.js +1 -1
- package/dist/{44.45a26f697588279fbc60.bundle.js → 44.ec337831549cfeaab224.bundle.js} +1 -1
- package/dist/443.969280af4067a22d1a8b.bundle.js +1 -1
- package/dist/444.a5971579184b091ed392.bundle.js +1 -1
- package/dist/445.2b20cb9e68a11879f6c4.bundle.js +1 -1
- package/dist/446.fe3cf3d6e288c8c4444b.bundle.js +1 -1
- package/dist/447.d1d078921f6f28e2fa38.bundle.js +1 -1
- package/dist/448.d6c9bed6d99b8b23619f.bundle.js +1 -1
- package/dist/468.8e259940c62a68ef3055.bundle.js +1 -1
- package/dist/{48.ba4cec793ef54b1611e5.bundle.js → 48.8726b8de8055297cec7c.bundle.js} +1 -1
- package/dist/480.379bf3b338e0a3224a1f.bundle.js +1 -1
- package/dist/481.0387239b174f787e70ea.bundle.js +1 -1
- package/dist/483.c81275cb05dd78ce389f.bundle.js +1 -1
- package/dist/484.25a82c267c3a705d2a65.bundle.js +1 -1
- package/dist/485.91cbfbfd37eccde375c9.bundle.js +1 -1
- package/dist/488.a69dcce23066c0dafdf7.bundle.js +1 -1
- package/dist/489.a976085b601cccf438d4.bundle.js +1 -1
- package/dist/49.ec8921fc54aaae50ca52.bundle.js +1 -1
- package/dist/490.d3e0f3e499b5a24f6808.bundle.js +1 -1
- package/dist/491.62c185868f9d99dd5713.bundle.js +1 -1
- package/dist/50.4886e820614f9dadb147.bundle.js +1 -0
- package/dist/{54.c54ba6791e3926ebb553.bundle.js → 54.f1ed20f259011ef082b2.bundle.js} +1 -1
- package/dist/76.fc1058890354a7ee6abe.bundle.js +1 -1
- package/dist/{bundle.6c88507cb6367ac80d16.bundle.js → bundle.fc37b3e514d7594f55be.bundle.js} +3 -3
- package/dist/css/rdf-class-hierarchy.css +1 -1
- package/dist/index.html +3 -3
- package/dist/js/angular/clustermanagement/templates/cluster-nodes-configuration.html +1 -1
- package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
- package/dist/js/angular/core/directives/dynamic-form/templates/dynamic-form.html +1 -1
- package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
- package/dist/js/angular/core/directives/shuttle-multiselect/templates/shuttle-multiselect.html +1 -1
- package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +1 -1
- package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
- package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
- package/dist/js/angular/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 +1 -1
- package/dist/js/angular/graphql/templates/modal/endpoint-configuration-modal.html +1 -1
- package/dist/js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html +1 -1
- package/dist/js/angular/graphql/templates/modal/import-endpoint-definition-modal.html +1 -1
- package/dist/js/angular/security/templates/user.html +2 -2
- package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
- package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-item-detail.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-list.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-panel.html +1 -1
- package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
- package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +2 -2
- package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
- package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
- package/dist/license-checker.json +2 -2
- package/dist/pages/aclmanagement.html +2 -2
- package/dist/pages/autocomplete.html +1 -1
- package/dist/pages/choose-repository-type.html +1 -1
- package/dist/pages/cluster-management/clusterInfo.html +3 -3
- package/dist/pages/create-index.html +1 -1
- package/dist/pages/dependencies.html +1 -1
- package/dist/pages/domainRangeInfo.html +2 -2
- package/dist/pages/edit.html +1 -1
- package/dist/pages/explore.html +1 -1
- package/dist/pages/export.html +1 -1
- package/dist/pages/find.html +1 -1
- package/dist/pages/graph-config/saveGraphConfig.html +8 -8
- package/dist/pages/graphs-visualizations.html +7 -7
- package/dist/pages/guides.html +1 -1
- package/dist/pages/import.html +2 -2
- package/dist/pages/jdbc-create.html +1 -1
- package/dist/pages/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 +9 -11
- package/dist/pages/rdfrank.html +2 -2
- package/dist/pages/repositories.html +1 -1
- package/dist/pages/repository.html +1 -1
- package/dist/pages/similarity-indexes.html +1 -1
- package/dist/pages/sparql-editor.html +1 -1
- package/dist/pages/sparql-template-create.html +1 -1
- package/dist/pages/ux-test1.html +2 -2
- package/dist/pages/webapi.html +2 -2
- package/dist/res/swagger5/index.html +12 -12
- package/package.json +1 -1
- package/dist/31.e0747ab3d38bd6efa832.bundle.js +0 -2
- package/dist/50.ee3ed147b2bc2382a0a2.bundle.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[50],{304:function(e,t,n){"use strict";n.r(t);var r=n(658),a=n(684),i=n(647),o=n(648);n(15);function s(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t,n,l,c,d,u,f,h,p,y,v,g){return{restrict:"AE",template:'<div id="classChart"></div>',scope:{classHierarchyData:"=",flattenedClassNames:"=",selectedClass:"=",currentSliderValue:"=",showClassInfoPanel:"=",showExternalElements:"=",hidePrefixes:"=",currentBrowserLimit:"="},link:function(u,m,x){!function(u,m){var x,w,S=!1,C=d3.pack().size([780,780]),E=d3.scaleLinear().domain([0,4]).range(["hsl(19, 70%, 90%)","hsl(19, 70%, 50%)"]).interpolate(d3.interpolateHcl),T=d3.select("#classChart").insert("svg:svg","h2").attr("viewBox","0 0 800 800").attr("preserveAspectRatio","xMidYMid meet").on("dblclick.zoom",null);function A(){return T.append("svg:g").attrs({id:"main-group",transform:"translate(400,400)"})}function R(){return"true"===y.get(v.CLASS_HIERARCHY_HIDE_PREFIXES)}function b(){var e=o.a.Export.getCSSRules("css/rdf-class-hierarchy-labels.css?v=3.0.2");d3.selectAll("#main-group").append("defs"),$("defs").append('<style type="text/css"><![CDATA['+e+"]]></style>"),d3.selectAll("g").style("opacity",1);var t=o.a.Export.generateBase64ImageSource("#classChart svg");d3.select(this).attrs({href:t,download:"class-hierarchy-"+d.getActiveRepository()+".svg"})}u.hidePrefixes=R();var H,I,P=A();if(!u.classHierarchyData.classCount&&d.getActiveRepository()&&!d.isSystemRepository()){e.loader=!0,e.hierarchyError=!1;var k=y.get("classHierarchy-selectedGraph-".concat(d.getActiveRepository()));n.getClassHierarchyData(null!==k?k.contextID.uri:"").success((function(t,n,r){e.loader=!1,207===n&&f.warning(g.instant("graphexplore.update.diagram"),g.instant("graphexplore.repository.data.changed")),u.classHierarchyData=t,d3.select("#download-svg").on("mouseover",b)})).error((function(t){e.loader=!1,e.hierarchyError=getError(t),f.error(g.instant("graphexplore.error.request.failed",{name:p,error:getError(t)}))}))}var L,N,D,F,O,z,U,M={};function V(n,o,s,d){N&&N(),D&&D(),d3.selectAll("#main-group").remove(),P=A(),a.a.SingleChild.addPlaceholders(n,!0),(w=d3.hierarchy(n)).sum((function(e){return e.size})),L=s||w,C(w);var f,y=w.descendants();L.isInFocusTransitive=!0,a.a.SingleChild.removePlaceholders(y),a.a.SingleChild.centerNodes(y),a.a.SingleChild.makePositionsRelativeToZero(y),x||(x=Object(r.a)().attr("class","d3-tip").customPosition((function(e,t){return{top:"inherit",bottom:l.innerHeight-t.clientY+"px",right:l.innerWidth-t.clientX+"px"}})).html((function(e){return e.data.name})),T.call(x));var v=P.selectAll("circle").data(y).enter().append("g");o.doFade&&v.each((function(e){i.a.Transition.fadeIn(d3.select(this),550)}));var g,m=[],R=v.append("circle").attr("class",(function(e){return e.data.role})).attr("guide-selector",(function(e){return"class-"+e.data.name})).style("fill",(function(e){return e.children?E(e.depth):"#E0D0D0"})).each((function(e){if(e.circle=d3.select(this),e.data.name!==p){var t=e.data.name;m.push({name:t}),M[[t]]=e,e.circle.classed("rdf-class",!0),e.circle.on("mouseover",(function(t){o.noPrefixes||e.textHidden?x.show(e,t):x.hide(e)})),e.circle.on("mouseout",x.hide)}})).on("gdb-focus",(function(e,t){return I(t)})).on("gdb-zoom",(function(e,t){return Y(t)}));function b(e){d3.selectAll(".selected").classed("selected",e.selected=!1),e.circle.classed("selected",e.selected=!0),g=e}function k(){u.showClassInfoPanel=!1}m&&(m=_.uniqBy(m,"name"),u.flattenedClassNames=m);var F=i.a.Click.delayDblClick();d3.selectAll(".parent, .topLevelParent, .child, .root").call(F),I=function(e){Y(e),e.data.name===p?(k(),d3.selectAll(".selected").classed("selected",!1)):(b(e),S||(u.selectedClass=g,u.showClassInfoPanel=!0),u.$on("sidePanelClosed",(function(t){d3.selectAll(".selected").classed("selected",e.selected=!1)})))},F.on("click",(function(e,t){t.data.id&&l.history.pushState({id:t.data.id},"classHierarchyPage"+t.data.id,"hierarchy#"+t.data.id),x.hide(),I(t)})),F.on("dblclick",(function(t,r){r!==n&&(x.hide(),b(r),e.$broadcast("goToDomainRangeGraphView",g,L),t.stopPropagation())}));var $=0;T.on("wheel",(function(e){x.hide(),e.preventDefault(),e.stopPropagation();var t=(new Date).getTime();if(t-$>100){$=t;var n="";e.deltaY<=-1?n="in":e.deltaY>=1&&(n="out");var r=e.target.__data__;if(r||(r=L),"in"===n){if(r!==L){for(;r.parent&&!r.parent.isInFocusTransitive;)r=r.parent;r.depth<L.depth&&(r=L)}if(r===L&&r.children){for(var a=r.children[0],i=1;i<r.children.length;i++)r.children[i].sortingRank>a.sortingRank&&(a=r.children[i]);a.children&&(r=a)}else r.children||(r=r.parent);Y(r,!0)}else"out"===n&&(r=L.parent)&&Y(r,!0);L.data.name===p&&l.history.replaceState({id:1},"classHierarchyPage1","hierarchy#1"),B()}}));var O=P.selectAll("text").data(y).enter().append("text").attr("class",(function(e){return e.children&&e.children.length?"label":"label child-label"})).each((function(e){e.textSel=d3.select(this)}));o.noPrefixes?(O.each((function(e){var t=e.data.name.indexOf(":");e.data.name.indexOf("http://")>-1?e.noPrefixName=e.data.name:t>-1&&(e.noPrefixName=e.data.name.substring(t+1))})),O.style("font-size",(function(e){return i.a.Text.calcFontSize(e.noPrefixName,e.r)})).text((function(e){return i.a.Text.getTextWithElipsisIfNeeded(e.noPrefixName,e.r/3)}))):O.style("font-size",(function(e){return i.a.Text.calcFontSize(e.data.name,e.r)})).text((function(e){return i.a.Text.getTextWithElipsisIfNeeded(e.data.name,e.r/3)})),O.style("display",(function(e){return e.parent&&e.parent.data===L.data?(e.textHidden=this.textContent.indexOf("...")+3===this.textContent.length,null):(e.textHidden=!0,"none")})),o.doFade&&!o.keepPrevState&&O.each((function(e){i.a.Transition.fadeIn(d3.select(this),550)})),H=function(){function e(e){e&&R.each((function(t){+e===t.data.id&&I(t)}))}var n=t.hash();l.onpopstate=function(t){t.state&&e(t.state.id)},e(n)};var z=P.selectAll("circle, text");function U(e,t){var n=800/e[2];f=e,z.attr("transform",(function(t){return"translate("+(t.x-e[0])*n+","+(t.y-e[1])*n+")"})),R.attr("r",(function(e){return e.r*n})),t&&O.each((function(e){e.data.fullName!==L.data.topLevelParentUri&&L.data.topLevelParentUri!==p||(e.textSel.style("display","none"),L.children&&L.children.length?_.each(L.children,(function(e){e.textSel.style("display","inline")})):L.textSel.style("display","inline"),L.parent&&_.each(L.parent.children,(function(e){e.data.name!==L.data.name&&e.textSel.style("display","inline")})))})),O.style("font-size",(function(e){return o.noPrefixes?i.a.Text.calcFontSize(e.noPrefixName,e.r*n):i.a.Text.calcFontSize(e.data.name,e.r*n)})).text((function(e){return o.noPrefixes?i.a.Text.getTextWithElipsisIfNeeded(e.noPrefixName,e.r*n/3):i.a.Text.getTextWithElipsisIfNeeded(e.data.name,e.r*n/3)}))}function V(e){var t=2*e+20;return 2*e/t<.3&&(t=2*e+2),t}function W(e){!e.isInFocusTransitive&&e.parent&&e.parent.isInFocusTransitive?(e.textHidden=this.textContent.indexOf("...")+3===this.textContent.length,this.style.display=""):(e.textHidden=!0,this.style.display="none")}function Y(e,t){if(c((function(){u.showExternalElements=e.data.name===p})),L!==e&&(e.data.id&&l.history.replaceState({id:e.data.id},"classHierarchyPage"+e.data.id,"hierarchy#"+e.data.id),e.children||(e=e.parent,L!==e))){if(t&&(k(),d3.selectAll(".selected").classed("selected",!1)),L.parent)for(var n=L;n;)n.isInFocusTransitive=!1,n=n.parent;for(n=e;n;)n.isInFocusTransitive=!!n.children,n=n.parent;if(2*(L=e).r/(2*L.r+20)<.3||u.currentSliderValue>u.currentBrowserLimit)U([L.x,L.y,V(L.r)]),O.each((function(e){W.call(this,e)}));else d3.transition().duration(h).tween("zoom",(function(e){var t=d3.interpolateZoom(f,[L.x,L.y,V(L.r)]);return function(e){U(t(e))}})).selectAll("text").each(W)}}U([L.x,L.y,V(L.r)],d),N=u.$on("rootFocus",(function(){l.history.pushState({id:1},"classHierarchyPage1","hierarchy#1"),I(w)})),D=u.$on("classSearch",(function(e){I(e)}))}function B(){var t=u.classHierarchyData.classCount,n=y.get(v.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);(!n||n>t)&&(n=t,y.set(v.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE,n)),e.$broadcast("classCount",t,n)}window.addEventListener("resize",B),window.addEventListener("beforeunload",(function e(){window.removeEventListener("resize",B),window.removeEventListener("beforeunload",e)})),u.$watch("classHierarchyData",(function(){F&&F(),O&&O(),z&&z(),U&&U();var e=R();if(u.classHierarchyData.classCount){var t=function(e,t){var n={keepPrevState:!0,noPrefixes:R()};a=n.noPrefixes,V(r||e,n,L,!0),c((function(){y.set(v.CLASS_HIERARCHY_SWITCH_PREFIXES,t),H(),S=!1}),70)},n=function(e,n,i){if(e){y.set(v.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE,e),r={name:p,children:[]};for(var l=new Set,c=1;c<=e;c++)l.add(n[c].data.id),n[c].parent===n[0]&&r.children.push(n[c].data);if(function e(t){if(t.children){var n,r=[],a=s(t.children);try{for(a.s();!(n=a.n()).done;){var i=n.value;l.has(i.id)&&r.push($.extend({},i))}}catch(e){a.e(e)}finally{a.f()}t.children=r;var o,c=s(t.children);try{for(c.s();!(o=c.n()).done;){e(o.value)}}catch(e){c.e(e)}finally{c.f()}}}(r),i)a=angular.isUndefined(a)?R():a,V(r,{noPrefixes:a});else t(o)}};B();var r,a,i,o=_.cloneDeep(u.classHierarchyData),l=function(e){return e.descendants().sort((function(e,t){return e.data.sortingRank>t.data.sortingRank?-1:e.data.sortingRank<t.data.sortingRank||e.data.depth>t.data.depth?1:e.data.depth<t.data.depth?-1:0}))}(d3.hierarchy(o)),d=y.get(v.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);if(d)n(d,l);else{var f={doFade:!0,keepPrevState:!0,noPrefixes:R()};V(o,f),H()}F=u.$watch("hidePrefixes",(function(n){angular.isUndefined(n)||e?e=void 0:c((function(){S=!0,function(e){angular.isUndefined(e)||y.set(v.CLASS_HIERARCHY_HIDE_PREFIXES,e)}(n),t(o,!0)}),50)}),!0),O=u.$watch("currentSliderValue",(function(e){n(e,l,!0)}),!0),U=u.$on("onEnterKeypressSearchAction",(function(e){i&&I(i)})),z=u.$on("searchedClass",(function(e,t){(i=M[t.name])&&I(i)}))}}),!0)}(u)}}}angular.module("graphdb.framework.graphexplore.directives.class",["graphdb.framework.graphexplore.controllers.class","graphdb.framework.utils.localstorageadapter"]).constant("ZOOM_DURATION",500).constant("ROOT_OBJ_NAME","RDF Class Hierarchy").directive("rdfClassHierarchy",c),c.$inject=["$rootScope","$location","GraphDataRestService","$window","$timeout","$repositories","$licenseService","toastr","ZOOM_DURATION","ROOT_OBJ_NAME","LocalStorageAdapter","LSKeys","$translate"]},634:function(e,t,n){var r,a;r=[n(644)],void 0===(a=function(){function e(e,t){return e.each((function(){var e=t.apply(this,arguments),n=select(this);for(var r in e)n.attr(r,e[r])}))}function t(e,t){for(var n in t)e.attr(n,t[n]);return e}return"undefined"==typeof d3&&(d3=n(644)),d3.selection.prototype.attrs=function(n){return("function"==typeof n?e:t)(this,n)},d3.selection.prototype.moveToFront=function(){return this.each((function(){d3.select(this.parentNode.appendChild(this))}))},d3.selection.prototype.moveToBack=function(){return this.each((function(){var e=this.parentNode.firstChild;e&&this.parentNode.insertBefore(this,e)}))},d3}.apply(t,r))||(e.exports=a)},647:function(e,t,n){"use strict";n(634);var r=r||{};r.Text=function(){function e(e,t,n,r){n=n||10;var a=t/3;return"string"==typeof e?(a*=10/(e.substring(0,t/3).length+1.5),a+=1,e.match(/[\u0900-\u0DFF\u1100-\u11FF\u2E80-\u2EFF\u3000-\u9FFF]/)&&(a*=.6),a<n&&(a=n),Math.round(a)):(a<n&&(a=n),Math.round(a))}return{calcFontSizeRaw:e,calcFontSize:function(t,n,r,a){return e(t,n,r)+"px"},getTextWithElipsisIfNeeded:function(e,t){return"string"==typeof e&&e.length>t?e.substring(0,t-3)+"...":e}}}(),r.Transition={fadeIn:function(e,t){e.style("opacity",0).transition().duration(t).style("opacity",1)},fadeOut:function(e,t){e.style("opacity",1).transition().duration(t).style("opacity",0)}},r.Click=function(){var e=function(e,n){for(var r,a=1,i=arguments.length;++a<i;)e[r=arguments[a]]=t(e,n,n[r]);return e};function t(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}return{delayDblClick:function(){var t=d3.dispatch("click","dblclick");return e((function(e){var n,r=null;e.on("mousedown",(function(){n=d3.pointer(document.body),+new Date})),e.on("mouseup",(function(e,a){var i,o,s;(o=n,s=d3.pointer(document.body),Math.sqrt(Math.pow(o[0]-s[0],2),Math.pow(o[1]-s[1],2))>5)||(r?(window.clearTimeout(r),r=null,t.call("dblclick",e,e,a)):r=window.setTimeout((i=e,function(){t.call("click",i,i,a),r=null}),250))}))}),t,"on")}}}(),t.a=r},648:function(e,t,n){"use strict";n(634);var r=r||{};r.Export={getCSSRules:function(e){var t=$('link[href="'+e+'"]')[0].sheet.rules,n="";return _.each(t,(function(e){n+=e.cssText})),n},generateBase64ImageSource:function(e){e||(e="svg");var t=d3.selectAll(e).attr("version","1.1").attr("xmlns","http://www.w3.org/2000/svg").node().parentNode.innerHTML;return"data:image/svg+xml;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(t)))}},t.a=r},658:function(e,t,n){"use strict";t.a=function(){var e=function(){return"n"},t=function(){return[0,0]},n=function(){return" "},r=u(),a=null,i=null,o=null,s=null;function l(e){var t;a="svg"===(t=(t=e).node()).tagName.toLowerCase()?t:t.ownerSVGElement,i=a.createSVGPoint(),document.body.appendChild(r)}l.show=function(){var r=Array.prototype.slice.call(arguments);r[r.length-1]instanceof SVGElement&&(o=r.pop());var a,i=n.apply(this,r),u=t.apply(this,r),h=e.apply(this,r),p=f(),y=d.length,v=document.documentElement.scrollTop||document.body.scrollTop,g=document.documentElement.scrollLeft||document.body.scrollLeft,m=s.apply(this,r);for(p.html(i).style("opacity",1).style("pointer-events","all");y--;)p.classed(d[y],!1);var x=r.filter((function(e){return e instanceof Event}));return a=c.get(h).apply(this,x),m?Object.keys(m).forEach((function(e){p.style(e,m[e])})):p.classed(h,!0).style("top",a.top+u[0]+v+"px").style("left",a.left+u[1]+g+"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 d3.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 d3.selection.prototype.style.apply(f(),n),l},l.direction=function(t){return arguments.length?(e=null==t?t:p(t),l):e},l.offset=function(e){return arguments.length?(t=null==e?e:p(e),l):t},l.html=function(e){return arguments.length?(n=null==e?e:p(e),l):n},l.customPosition=function(e){return arguments.length?(s=null==e?e:p(e),l):s},l.destroy=function(){return r&&(f().remove(),r=null),l};var c=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}}})),d=c.keys();function u(){var e=d3.select(document.createElement("div"));return e.style("position","absolute").style("top",0).style("opacity",0).style("pointer-events","none").style("box-sizing","border-box"),e.node()}function f(){return null===r&&(r=u(),document.body.appendChild(r)),d3.select(r)}function h(e){for(var t=o||e.target;void 0===t.getScreenCTM&&"undefined"===t.parentNode;)t=t.parentNode;var n={},r=t.getScreenCTM(),a=t.getBBox(),s=a.width,l=a.height,c=a.x,d=a.y;return i.x=c,i.y=d,n.nw=i.matrixTransform(r),i.x+=s,n.ne=i.matrixTransform(r),i.y+=l,n.se=i.matrixTransform(r),i.x-=s,n.sw=i.matrixTransform(r),i.y-=l/2,n.w=i.matrixTransform(r),i.x+=s,n.e=i.matrixTransform(r),i.x-=s/2,i.y-=l/2,n.n=i.matrixTransform(r),i.y+=l,n.s=i.matrixTransform(r),n}function p(e){return"function"==typeof e?e:function(){return e}}return l}},684:function(e,t,n){"use strict";var r=r||{};r.SingleChild={addPlaceholders:function e(t,n){if(t.children){for(var r=0;r<t.children.length;r++)e(t.children[r]);if(1===t.children.length){var a=1.2*t.size;n&&(a=.1*t.children[0].size),t.children.push({name:"placeholder",size:a})}}},removePlaceholders:function e(t){for(var n=t.length-1;n>=0;n--){var r=t[n];"placeholder"===r.data.name?t.splice(n,1):r.children&&e(r.children)}},centerNodes:function(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.children&&1===n.children.length){var r=n.x-n.children[0].x;n.children[0].x+=r,a(n.children[0],r)}}function a(e,t){if(e.children)for(var n=0;n<e.children.length;n++)e.children[n].x+=t,a(e.children[n],t)}},makePositionsRelativeToZero:function(e){for(var t=e[0].x,n=e[0].y,r=0;r<e.length;r++){var a=e[r];a.x-=t,a.y-=n}}},t.a=r}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[54,297,305,324,325,388],{104:function(e,t,r){"use strict";r.r(t),r.d(t,"RenderingMode",(function(){return n}));var n={YASGUI:"mode-yasgui",YASQE:"mode-yasqe",YASR:"mode-yasr"}},115:function(e,t,r){"use strict";r.r(t),r.d(t,"YasqeMode",(function(){return n}));var n={WRITE:"WRITE",READ:"READ",PROTECTED:"PROTECTED"}},118:function(e,t){function r(e,t){return{showToastMessageWithDelay:function(r){return new Promise((function(n){e.success(t.instant(r)),setTimeout(n,300)}))}}}angular.module("graphdb.framework.utils.notifications",[]).factory("Notifications",r),r.$inject=["toastr","$translate"]},236:function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t,r){return t=f(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,r||[],f(e).constructor):t.apply(e,r))}function u(e){var t="function"==typeof Map?new Map:void 0;return(u=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return s(e,arguments,f(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),p(r,e)})(e)}function s(e,t,r){if(c())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&p(o,r.prototype),o}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}function p(e,t){return(p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}r.r(t),r.d(t,"SparqlTemplateError",(function(){return m}));var m=function(e){function t(){return a(this,t),l(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),r=t,n&&o(r.prototype,n),i&&o(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i}(u(Error))},237:function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function i(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.r(t),r.d(t,"DEFAULT_SPARQL_QUERY",(function(){return u})),r.d(t,"SparqlTemplateInfo",(function(){return s}));var u="PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX ex: <http://example.com#>\nDELETE {\n ?subject ex:myPredicate ?oldValue .\n} INSERT {\n ?subject ex:myPredicate ?newValue .\n} WHERE {\n ?id rdf:type ex:MyType .\n ?subject ex:isRelatedTo ?id .\n}\n",s=i((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;l(this,e),this.query=t,this.templateID=n,this.isNewTemplate=r,this.templateExist=!1,this.isValidTemplateId=!0,this.isValidQuery=!0,this.isValidQueryMode=!0}))},370:function(e,t,r){"use strict";r.r(t);r(10),r(53),r(55),r(118),r(56),r(30);var n=r(1),o=r(237),i=r(236),a=r(115),l=r(104),u=r(27);function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function p(e,t,r,n,o,i,a){e.pluginName="sparql-template",e.setPluginIsActive=function(t){e.pluginIsActive=t},e.getSparqlTemplates=function(){i.isLicenseValid()&&t.getActiveRepository()&&!t.isActiveRepoOntopType()&&!t.isActiveRepoFedXType()?r.getSparqlTemplates(t.getActiveRepository()).success((function(t){e.sparqlTemplateIds=t})).error((function(e){var t=getError(e);n.error(t,a.instant("sparql.template.get.templates.error"))})):e.sparqlTemplateIds=[]},e.$watch((function(){return t.getActiveRepository()}),(function(){e.getSparqlTemplates()})),e.deleteTemplate=function(i){o.openSimpleModal({title:a.instant("common.warning"),message:a.instant("sparql.template.delete.template.warning",{templateID:i}),warning:!0}).result.then((function(){r.deleteSparqlTemplate(i,t.getActiveRepository()).success((function(){n.success(i,a.instant("sparql.template.delete.template.success")),e.getSparqlTemplates()})).error((function(e){n.error(getError(e),a.instant("sparql.template.delete.template.failure",{templateID:i}))}))}))}}function f(e,t,r,c,p,f,m,d,y,v,g,h,b,T,w,q){e.initialQuery=o.DEFAULT_SPARQL_QUERY,e.sparqlTemplateInfo=new o.SparqlTemplateInfo(e.initialQuery),e.title="",e.saveOrUpdateExecuted=!1,e.isDirty=!1,e.language=q.getLanguage(),e.canEditActiveRepo=!1;var S=!0;e.saveTemplate=function(){e.saveOrUpdateExecuted=!0,P()||k();var t=e.sparqlTemplateInfo.isNewTemplate?I:O;Q(e.sparqlTemplateInfo).then($).then(D).then(x).then(t).then(M).catch((function(e){e instanceof i.SparqlTemplateError||console.log(e)}))},e.isTemplateIdValid=function(e){return g.isValidIri(e,e.toString())},e.markDirty=function(){e.isDirty=!0},e.markPristine=function(){e.isDirty=!1};var E=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.DEFAULT_SPARQL_QUERY;e.sparqlTemplateInfo.query=r,e.sparqlTemplateInfo.templateID=V(),e.sparqlTemplateInfo.isNewTemplate=!e.sparqlTemplateInfo.templateID,_(),e.yasguiConfig={showEditorTabs:!1,showToolbar:!1,showResultTabs:!1,showYasqeActionButtons:!1,showYasqeResizer:!1,yasqeActionButtons:u.DISABLE_YASQE_BUTTONS_CONFIGURATION,showQueryButton:!1,initialQuery:e.sparqlTemplateInfo.query,componentId:"sparql-template",prefixes:t,render:l.RenderingMode.YASQE,maxPersistentResponseSize:0,yasqeMode:e.canEditActiveRepo?a.YasqeMode.WRITE:a.YasqeMode.PROTECTED}},I=function(e){return R(e).then(A).then(j)},R=function(t){return y.getSparqlTemplates(p.getActiveRepository()).then((function(r){return t.templateExist=r.data.find((function(t){return t===e.sparqlTemplateInfo.templateID})),t})).catch((function(e){var t=getError(e);return c.error(t,b.instant("sparql.template.get.templates.error")),Promise.reject(new i.SparqlTemplateError("Failed to retrieve sparql templates."))}))},D=function(e){return U().isQueryValid().then((function(t){return e.isValidQuery=t,e.isValidQuery?e:Promise.reject(new i.SparqlTemplateError("Invalid query."))}))},P=function(){return e.sparqlTemplateInfo.isNewTemplate||e.isDirty},A=function(e){return new Promise((function(t,r){if(e.templateExist){var o=Object(n.decodeHTML)(b.instant("sparql.template.existing.template.error",{templateID:e.templateID})),a=b.instant("common.confirm.save");N(a,o,(function(){return t(e)}),(function(){return r(new i.SparqlTemplateError("Save not confirmed."))}))}else t(e)}))};function j(t){return y.createSparqlTemplate(t,p.getActiveRepository()).then((function(){return t.isNewTemplate=!1,e.markPristine(),c.success(t.templateID,b.instant("save.sparql.template.success.msg")),t})).catch((function(e){var r=getError(e);return c.error(r,b.instant("save.sparql.template.failure.msg",{templateID:t.templateID})),Promise.reject(new i.SparqlTemplateError("Failed to save the new template: ".concat(t.templateID)))}))}var O=function(t){return y.updateSparqlTemplate(t,p.getActiveRepository()).then((function(){return t.isNewTemplate=!1,e.markPristine(),c.success(e.sparqlTemplateInfo.templateID,b.instant("update.sparql.template.success.msg")),t})).catch((function(e){var r=getError(e);return c.error(r,b.instant("save.sparql.template.failure.msg",{templateID:t.templateID})),Promise.reject(new i.SparqlTemplateError("Failed to update the template: ".concat(t.templateID)))}))},$=function(e){return U().getQuery().then((function(t){return e.query=t,e}))},x=function(e){return U().getQueryMode().then((function(t){return e.isValidQueryMode="update"===t,e.isValidQueryMode?e:Promise.reject(new i.SparqlTemplateError("Query mode is not valid."))}))},Q=function(t){return new Promise((function(r,n){t.templateID?(t.isValidTemplateId=e.isTemplateIdValid(t.templateID),t.isValidTemplateId?r(t):n(new i.SparqlTemplateError("Template identifier is not valid."))):n(new i.SparqlTemplateError("A required template identifier is missing."))}))},M=function(){setTimeout((function(){k()}),1e3)},V=function(){var e=r.hash()||"";return(r.search().templateID||"")+(e?"#".concat(e):"")},_=function(){e.title=(e.sparqlTemplateInfo.templateID?b.instant("edit"):b.instant("common.create.btn"))+" "+b.instant("view.sparql.template.title")},k=function(){r.url("/sparql-templates")},C=function(t,r){e.queryIsRunning=t,e.loaderMessage=e.queryIsRunning?r:""},U=function(){return u.YasguiComponentDirectiveUtil.getOntotextYasguiElement("#query-editor")},N=function(e,t,r,n){h.openSimpleModal({title:e,message:t,warning:!0}).result.then((function(){angular.isFunction(r)&&r()}),(function(){angular.isFunction(n)&&n()}))},Y=function(){window.removeEventListener("beforeunload",F),L.forEach((function(e){return e()}))},F=function(t){e.isDirty&&(t.returnValue=!0)},L=[];L.push(e.$on("queryChanged",(function(t,r){r.dirty?e.markDirty():e.markPristine()}))),L.push(t.$on("$translateChangeSuccess",(function(){e.language=q.getLanguage(),_()}))),L.push(e.$on("$locationChangeStart",(function(t,n){if(e.isDirty){t.preventDefault();var o=b.instant("common.confirm"),i=b.instant("jdbc.warning.unsaved.changes");N(o,i,(function(){Y();var e=r.absUrl().length-r.url().length,t=n.substring(e);r.path(t)}))}else Y()}))),L.push(w.subscribe("repositoryWillChangeEvent",(function(t){return new Promise((function(r){if(e.sparqlTemplateInfo.isNewTemplate)r(t);else{var n=function(){e.isDirty=!1,k(),r(t)};if(e.isDirty){var o=b.instant("common.confirm"),i=b.instant("jdbc.warning.unsaved.changes");N(o,i,n,(function(){t.cancel=!0,r(t)}))}else n()}}))}))),L.push(e.$on("$destroy",Y)),window.addEventListener("beforeunload",F);var B=function(){var t="".concat(b.instant("common.refreshing.namespaces"),". ").concat(b.instant("common.extra.message"));C(!0,t),e.sparqlTemplateInfo.templateID=V();var r=p.getActiveRepository();e.sparqlTemplateInfo.templateID?Promise.all([p.getPrefixes(r),y.getSparqlTemplate(e.sparqlTemplateInfo.templateID,r)]).then((function(e){var t=s(e,2),r=t[0],n=t[1];return E(r,n.data)})).finally((function(){return C(!1)})):p.getPrefixes(r).then((function(e){return E(e)})).finally((function(){return C(!1)}))};L.push(e.$watch(e.getActiveRepositoryObject,(function(t){t&&(e.canEditActiveRepo=e.canWriteActiveRepo(),S?(B(),S=!1):k())})))}angular.module("graphdb.framework.sparql-template.controllers",["ui.bootstrap","graphdb.framework.core.services.repositories","graphdb.framework.rest.monitoring.service","toastr","graphdb.framework.utils.event-emitter-service"],["graphdb.framework.utils.notifications"]).controller("SparqlTemplatesCtrl",p).controller("SparqlTemplateCreateCtrl",f),p.$inject=["$scope","$repositories","SparqlTemplatesRestService","toastr","ModalService","$licenseService","$translate"],f.$inject=["$scope","$rootScope","$location","toastr","$repositories","$window","$timeout","$interval","SparqlTemplatesRestService","RDF4JRepositoriesRestService","UriUtils","ModalService","$translate","$q","EventEmitterService","$languageService"]}}]);
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[54,297,305,324,325,388],{104:function(e,t,r){"use strict";r.r(t),r.d(t,"RenderingMode",(function(){return n}));var n={YASGUI:"mode-yasgui",YASQE:"mode-yasqe",YASR:"mode-yasr"}},115:function(e,t,r){"use strict";r.r(t),r.d(t,"YasqeMode",(function(){return n}));var n={WRITE:"WRITE",READ:"READ",PROTECTED:"PROTECTED"}},118:function(e,t){function r(e,t){return{showToastMessageWithDelay:function(r){return new Promise((function(n){e.success(t.instant(r)),setTimeout(n,300)}))}}}angular.module("graphdb.framework.utils.notifications",[]).factory("Notifications",r),r.$inject=["toastr","$translate"]},236:function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t,r){return t=f(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,r||[],f(e).constructor):t.apply(e,r))}function u(e){var t="function"==typeof Map?new Map:void 0;return(u=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return s(e,arguments,f(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),p(r,e)})(e)}function s(e,t,r){if(c())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&p(o,r.prototype),o}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}function p(e,t){return(p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}r.r(t),r.d(t,"SparqlTemplateError",(function(){return m}));var m=function(e){function t(){return a(this,t),l(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),r=t,n&&o(r.prototype,n),i&&o(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i}(u(Error))},237:function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function i(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.r(t),r.d(t,"DEFAULT_SPARQL_QUERY",(function(){return u})),r.d(t,"SparqlTemplateInfo",(function(){return s}));var u="PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX ex: <http://example.com#>\nDELETE {\n ?subject ex:myPredicate ?oldValue .\n} INSERT {\n ?subject ex:myPredicate ?newValue .\n} WHERE {\n ?id rdf:type ex:MyType .\n ?subject ex:isRelatedTo ?id .\n}\n",s=i((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;l(this,e),this.query=t,this.templateID=n,this.isNewTemplate=r,this.templateExist=!1,this.isValidTemplateId=!0,this.isValidQuery=!0,this.isValidQueryMode=!0}))},370:function(e,t,r){"use strict";r.r(t);r(10),r(53),r(55),r(118),r(56),r(30);var n=r(1),o=r(237),i=r(236),a=r(115),l=r(104),u=r(27);function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function p(e,t,r,n,o,i,a){e.pluginName="sparql-template",e.setPluginIsActive=function(t){e.pluginIsActive=t},e.getSparqlTemplates=function(){i.isLicenseValid()&&t.getActiveRepository()&&!t.isActiveRepoOntopType()&&!t.isActiveRepoFedXType()?r.getSparqlTemplates(t.getActiveRepository()).success((function(t){e.sparqlTemplateIds=t})).error((function(e){var t=getError(e);n.error(t,a.instant("sparql.template.get.templates.error"))})):e.sparqlTemplateIds=[]},e.$watch((function(){return t.getActiveRepository()}),(function(){e.getSparqlTemplates()})),e.deleteTemplate=function(i){o.openSimpleModal({title:a.instant("common.warning"),message:a.instant("sparql.template.delete.template.warning",{templateID:i}),warning:!0}).result.then((function(){r.deleteSparqlTemplate(i,t.getActiveRepository()).success((function(){n.success(i,a.instant("sparql.template.delete.template.success")),e.getSparqlTemplates()})).error((function(e){n.error(getError(e),a.instant("sparql.template.delete.template.failure",{templateID:i}))}))}))}}function f(e,t,r,c,p,f,m,d,y,v,g,h,b,T,w,q){e.initialQuery=o.DEFAULT_SPARQL_QUERY,e.sparqlTemplateInfo=new o.SparqlTemplateInfo(e.initialQuery),e.title="",e.saveOrUpdateExecuted=!1,e.isDirty=!1,e.language=q.getLanguage(),e.canEditActiveRepo=!1;var S=!0;e.saveTemplate=function(){e.saveOrUpdateExecuted=!0,A()||k();var t=e.sparqlTemplateInfo.isNewTemplate?I:O;Q(e.sparqlTemplateInfo).then($).then(D).then(x).then(t).then(M).catch((function(e){e instanceof i.SparqlTemplateError||console.log(e)}))},e.isTemplateIdValid=function(e){return g.isValidIri(e,e.toString())},e.markDirty=function(){e.isDirty=!0},e.markPristine=function(){e.isDirty=!1};var E=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.DEFAULT_SPARQL_QUERY;e.sparqlTemplateInfo.query=r,e.sparqlTemplateInfo.templateID=V(),e.sparqlTemplateInfo.isNewTemplate=!e.sparqlTemplateInfo.templateID,_(),e.yasguiConfig={showEditorTabs:!1,showToolbar:!1,showResultTabs:!1,showYasqeActionButtons:!1,showYasqeResizer:!1,yasqeActionButtons:u.DISABLE_YASQE_BUTTONS_CONFIGURATION,showQueryButton:!1,initialQuery:e.sparqlTemplateInfo.query,componentId:"sparql-template",prefixes:t,render:l.RenderingMode.YASQE,maxPersistentResponseSize:0,yasqeMode:e.canEditActiveRepo?a.YasqeMode.WRITE:a.YasqeMode.READ}},I=function(e){return R(e).then(P).then(j)},R=function(t){return y.getSparqlTemplates(p.getActiveRepository()).then((function(r){return t.templateExist=r.data.find((function(t){return t===e.sparqlTemplateInfo.templateID})),t})).catch((function(e){var t=getError(e);return c.error(t,b.instant("sparql.template.get.templates.error")),Promise.reject(new i.SparqlTemplateError("Failed to retrieve sparql templates."))}))},D=function(e){return C().isQueryValid().then((function(t){return e.isValidQuery=t,e.isValidQuery?e:Promise.reject(new i.SparqlTemplateError("Invalid query."))}))},A=function(){return e.sparqlTemplateInfo.isNewTemplate||e.isDirty},P=function(e){return new Promise((function(t,r){if(e.templateExist){var o=Object(n.decodeHTML)(b.instant("sparql.template.existing.template.error",{templateID:e.templateID})),a=b.instant("common.confirm.save");N(a,o,(function(){return t(e)}),(function(){return r(new i.SparqlTemplateError("Save not confirmed."))}))}else t(e)}))};function j(t){return y.createSparqlTemplate(t,p.getActiveRepository()).then((function(){return t.isNewTemplate=!1,e.markPristine(),c.success(t.templateID,b.instant("save.sparql.template.success.msg")),t})).catch((function(e){var r=getError(e);return c.error(r,b.instant("save.sparql.template.failure.msg",{templateID:t.templateID})),Promise.reject(new i.SparqlTemplateError("Failed to save the new template: ".concat(t.templateID)))}))}var O=function(t){return y.updateSparqlTemplate(t,p.getActiveRepository()).then((function(){return t.isNewTemplate=!1,e.markPristine(),c.success(e.sparqlTemplateInfo.templateID,b.instant("update.sparql.template.success.msg")),t})).catch((function(e){var r=getError(e);return c.error(r,b.instant("save.sparql.template.failure.msg",{templateID:t.templateID})),Promise.reject(new i.SparqlTemplateError("Failed to update the template: ".concat(t.templateID)))}))},$=function(e){return C().getQuery().then((function(t){return e.query=t,e}))},x=function(e){return C().getQueryMode().then((function(t){return e.isValidQueryMode="update"===t,e.isValidQueryMode?e:Promise.reject(new i.SparqlTemplateError("Query mode is not valid."))}))},Q=function(t){return new Promise((function(r,n){t.templateID?(t.isValidTemplateId=e.isTemplateIdValid(t.templateID),t.isValidTemplateId?r(t):n(new i.SparqlTemplateError("Template identifier is not valid."))):n(new i.SparqlTemplateError("A required template identifier is missing."))}))},M=function(){setTimeout((function(){k()}),1e3)},V=function(){var e=r.hash()||"";return(r.search().templateID||"")+(e?"#".concat(e):"")},_=function(){e.title=(e.sparqlTemplateInfo.templateID?b.instant("edit"):b.instant("common.create.btn"))+" "+b.instant("view.sparql.template.title")},k=function(){r.url("/sparql-templates")},U=function(t,r){e.queryIsRunning=t,e.loaderMessage=e.queryIsRunning?r:""},C=function(){return u.YasguiComponentDirectiveUtil.getOntotextYasguiElement("#query-editor")},N=function(e,t,r,n){h.openSimpleModal({title:e,message:t,warning:!0}).result.then((function(){angular.isFunction(r)&&r()}),(function(){angular.isFunction(n)&&n()}))},Y=function(){window.removeEventListener("beforeunload",F),L.forEach((function(e){return e()}))},F=function(t){e.isDirty&&(t.returnValue=!0)},L=[];L.push(e.$on("queryChanged",(function(t,r){r.dirty?e.markDirty():e.markPristine()}))),L.push(t.$on("$translateChangeSuccess",(function(){e.language=q.getLanguage(),_()}))),L.push(e.$on("$locationChangeStart",(function(t,n){if(e.isDirty){t.preventDefault();var o=b.instant("common.confirm"),i=b.instant("jdbc.warning.unsaved.changes");N(o,i,(function(){Y();var e=r.absUrl().length-r.url().length,t=n.substring(e);r.path(t)}))}else Y()}))),L.push(w.subscribe("repositoryWillChangeEvent",(function(t){return new Promise((function(r){if(e.sparqlTemplateInfo.isNewTemplate)r(t);else{var n=function(){e.isDirty=!1,k(),r(t)};if(e.isDirty){var o=b.instant("common.confirm"),i=b.instant("jdbc.warning.unsaved.changes");N(o,i,n,(function(){t.cancel=!0,r(t)}))}else n()}}))}))),L.push(e.$on("$destroy",Y)),window.addEventListener("beforeunload",F);var B=function(){var t="".concat(b.instant("common.refreshing.namespaces"),". ").concat(b.instant("common.extra.message"));U(!0,t),e.sparqlTemplateInfo.templateID=V();var r=p.getActiveRepository();e.sparqlTemplateInfo.templateID?Promise.all([p.getPrefixes(r),y.getSparqlTemplate(e.sparqlTemplateInfo.templateID,r)]).then((function(e){var t=s(e,2),r=t[0],n=t[1];return E(r,n.data)})).finally((function(){return U(!1)})):p.getPrefixes(r).then((function(e){return E(e)})).finally((function(){return U(!1)}))};L.push(e.$watch(e.getActiveRepositoryObject,(function(t){t&&(e.canEditActiveRepo=e.canWriteActiveRepo(),S?(B(),S=!1):k())})))}angular.module("graphdb.framework.sparql-template.controllers",["ui.bootstrap","graphdb.framework.core.services.repositories","graphdb.framework.rest.monitoring.service","toastr","graphdb.framework.utils.event-emitter-service"],["graphdb.framework.utils.notifications"]).controller("SparqlTemplatesCtrl",p).controller("SparqlTemplateCreateCtrl",f),p.$inject=["$scope","$repositories","SparqlTemplatesRestService","toastr","ModalService","$licenseService","$translate"],f.$inject=["$scope","$rootScope","$location","toastr","$repositories","$window","$timeout","$interval","SparqlTemplatesRestService","RDF4JRepositoriesRestService","UriUtils","ModalService","$translate","$q","EventEmitterService","$languageService"]}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[76],{305:function(t,e,r){"use strict";r.r(e);var a=r(648),n=r(647);r(15);function o(t,e,r,o,s,i,c,l,d,u,p,f,h){return{restrict:"AE",template:'<div id="domain-range"></div>',scope:{showPredicatesInfoPanel:"=",selectedPredicate:"=",collapseEdges:"="},link:function(u){var p=l((function(){!function(u){var p=d3.select("#domain-range").append("svg").attr("viewBox","0 0 1200 600").attr("preserveAspectRatio","xMidYMid meet").on("dblclick.zoom",null),g=d3.forceSimulation(),y=d3.drag().subject((function(t){return t})).on("start",(function(t,e){g.stop(),e.fx=t.x,e.fy=t.y,d3.select(this).classed("selected",!0)})).on("end",(function(t,e){e.fx=null,e.fy=null,d3.select(this).classed("selected",!1),b?(g.alpha(.2).restart(),b=!1):g.restart()})).on("drag",(function(t,e){b=!0,g.alphaTarget(0).restart(),e.fx=t.x,e.fy=t.y})),x=p.append("defs");x.append("marker").attrs({id:"arrow",viewBox:"0 -5 10 10",refX:10,refY:0,markerUnits:"strokeWidth",markerWidth:5,markerHeight:5,orient:"auto",fill:f}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),x.append("marker").attrs({id:"collapsed-arrow",viewBox:"0 -5 10 10",refX:9,refY:0,markerUnits:"strokeWidth",markerWidth:4,markerHeight:4,orient:"auto",fill:f}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),x.append("marker").attrs({id:"arrow-loop",viewBox:"0 -5 10 10",refX:7,refY:0,markerUnits:"strokeWidth",markerWidth:5,markerHeight:5,orient:"auto",fill:f}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),d3.select("#download-svg").on("mouseover",(function(){var t=a.a.Export.getCSSRules("css/domain-range-graph.css?v=3.0.2-TR1");$("defs").append('<style type="text/css"><![CDATA['+t+"]]></style>");var e=a.a.Export.generateBase64ImageSource("#domain-range svg");d3.select(this).attrs({href:e,download:"domain-range-graph-"+r.getActiveRepository()+".svg"})})),function(){var t=d3.select(".legend-container").append("svg").attr("viewBox","0 0 "+1200/7+" "+1200/7*1.2).attr("preserveAspectRatio","xMidYMid meet");t.append("rect").attrs({width:1200/7,height:1200/7*1.2}).style("fill","rgba(235, 235, 235, 0.9)");var e=16+1200/18/2.5,r=e+1200/90;t.append("circle").attrs({class:"legend-class-node",cx:(16+e)/2,cy:30,r:1200/18/4.5}),t.append("text").attrs({x:r,y:30+1200/370}).style("font-size",1200/90/1.1+"px").text("main class node"),t.append("circle").attrs({class:"legend-object-node",cx:(16+e)/2,cy:70,r:1200/110/1.25}),t.append("text").attrs({x:r,y:30+1200/370+40}).style("font-size",1200/90/1.1+"px").text("class node"),t.append("circle").attrs({class:"legend-datatype-node",cx:(16+e)/2,cy:70+1200/45,r:1200/110/2}),t.append("text").attrs({x:r,y:99.90990990990991}).style("font-size",1200/90/1.1+"px").text("datatype node"),t.append("line").attrs({class:"property-arrow",x1:16,y1:123.33333333333334,x2:e,y2:123.33333333333334}).style("stroke-width",1.2).attr("marker-end","url("+s.absUrl()+"#arrow)"),t.append("text").attrs({x:r,y:126.57657657657658}).style("font-size",1200/90/1.1+"px").text("explicit property"),t.append("line").attrs({class:"implicit-property-arrow",x1:16,y1:150,x2:e,y2:150}).style("stroke-width",1.2).attr("marker-end","url("+s.absUrl()+"#arrow)"),t.append("text").attrs({x:r,y:150+1200/370}).style("font-size",1200/90/1.1+"px").text("implicit property"),t.append("line").attrs({class:"collapsed-property-arrow",x1:16,y1:150+1200/45,x2:e,y2:150+1200/45}).style("stroke-width",2).attr("marker-end","url("+s.absUrl()+"#collapsed-arrow)"),t.append("text").attrs({x:r,y:179.9099099099099}).style("font-size",1200/90/1.1+"px").text("collapsed property")}();var m=s.search().uri,v=s.search().name,k=s.search().collapsed;(function(t,e){o.getDomainRangeData(t,e).success((function(t,e,r){u.domainRangeGraphData=t})).error((function(t){d.error("Request for "+v+" failed!")}))})(m,k),$(window).on("popstate",(function(){i.set(c.DOMAIN_RANGE_WENT_BACK,!0)})),e.onpopstate=function(e){e.state&&t.$broadcast("changeCollapsedEdgesState",e.state.collapsed)},u.$watch("collapseEdges",(function(){angular.isUndefined(u.collapseEdges)||(i.set(c.DOMAIN_RANGE_COLLAPSE_EDGES,u.collapseEdges),"true"!==i.get(c.DOMAIN_RANGE_WENT_BACK)&&function(e){t.$broadcast("switchEdgeMode",{uri:m,name:v,collapsed:e})}(u.collapseEdges),i.remove(c.DOMAIN_RANGE_WENT_BACK))})),u.$watch("domainRangeGraphData",(function(){if(u.domainRangeGraphData){var r=function(t){t.style("stroke",f),t.style("stroke-width",2),t.attr("marker-end","url("+s.absUrl()+"#collapsed-arrow)")},a=function(){$.isEmptyObject(E)||(E.text.style("fill","black"),E.background.style("fill","#f0f0f0"))},o=function(t,e){a(),E.text=d3.select(this),E.background=d3.select(this.previousSibling),E.text.style("fill","white"),E.background.style("fill",f),l((function(){u.showPredicatesInfoPanel=!0,u.selectedPredicate=e})),t.stopPropagation()},i=_.cloneDeep(u.domainRangeGraphData),c=i.nodes,d=i.links;g.nodes(c).force("x",d3.forceX(600)).force("y",d3.forceY(300)).force("charge",d3.forceManyBody().strength(-800)).force("link",d3.forceLink(d).distance(1200/3.5));var x,k,b=p.selectAll(".link").data(d).enter().append("g"),w=0;b.each((function(t){if(t.objectPropNodeClassUri!==m)x=b.append("line").attrs({class:"link","marker-end":"url("+s.absUrl()+"#arrow)"}).style("stroke-width",1.2).each((function(t){switch(t.propertyType){case"objectLeft":t.targetRadius=1200/18;break;case"objectRight":t.targetRadius=1200/110;break;case"datatype":t.targetRadius=1200/110/2;break;default:t.targetRadius=0}var e=d3.select(this);t.targetNodeEdgeCount>1?r(e):t.implicit&&e.style("stroke-dasharray","3, 3")}));else{if(angular.isUndefined(k)){k=d3.select(this).append("path").attrs({d:"M 0 0 A "+1200/18/2+" "+1200/18/2+" 0 1 1 0 "+1200/18/2,class:"loop-link",fill:"none","marker-end":"url("+s.absUrl()+"#arrow-loop)"}).style("stroke-width",1.2)}(w+=t.targetNodeEdgeCount)>1&&r(d3.select(".loop-link"))}}));var E={};$("document").ready((function(){$("#domain-range").bind("click",a)}));var N=b.append("text").attr("class",(function(t){return t.objectPropNodeClassUri===m?"loop-link-property-name":"property-name"})).attr("dx",(function(t){return 1200/18/2*("objectLeft"===t.propertyType?1:-1)})).style("text-anchor",(function(t){return"objectLeft"===t.propertyType?"end":"start"})).style("font-size",1200/90).text((function(t){return t.targetNodeEdgeCount>1?t.targetNodeEdgeCount+" predicates":t.name}));N.each((function(t){var r=d3.select(this);/\d\spredicates/.test(r.text())?r.style("font-weight","bold").on("click",o):r.on("click",(function(t,r){e.open("resource?uri="+encodeURIComponent(r.uri),"_blank")}))}));var R=2,C=b.append("rect").attr("class",(function(t){return t.objectPropNodeClassUri!==m?"link-background":"loop-link-background"})).attr("width",(function(t){return t.calculatedWidth=this.previousSibling.getBBox().width,t.calculatedWidth+2*R})).attr("height",(function(t){return t.calculatedHeight=this.previousSibling.getBBox().height,t.calculatedHeight+R})).attr("transform",(function(t){var e=R-1200/18/2*("objectLeft"===t.propertyType?1:-1);return"objectLeft"===t.propertyType&&(e+=t.calculatedWidth),"translate(-"+e+",-"+(R+t.calculatedHeight/2)+")"})).on("click",(function(t){t.stopPropagation()})),T=p.selectAll(".node").data(c).enter().append("g"),A=T.filter((function(t){return t.objectPropClassUri!==m})).append("circle").each((function(t){var e=d3.select(this);"main"===t.classPosition?e.attrs({class:"class-node",r:1200/18}).attr("marker-end","url("+s.absUrl()+"#loop-link)"):null===t.objectPropClassName?e.attrs({class:"datatype-node",r:1200/110/2}):e.attrs({class:"object-prop-node",r:1200/110})})).call(y);d3.selectAll(".object-prop-node").on("dblclick",(function(e,r,a){u.$apply((function(){t.$broadcast("reloadDomainRangeGraphView",r,a)}))})),T.filter((function(t){return t.objectPropClassName&&t.objectPropClassUri!==m})).append("text").attr("class",(function(t){return t.classPosition+"-class-label"})).style("font-size",1200/90).text((function(t){return t.objectPropClassName})).on("click",(function(t,r){e.open("resource?uri="+encodeURIComponent(r.objectPropClassUri),"_blank")}));var L=T.select("text");p.select(".class-node").each((function(){d3.select(this.parentNode).append("text").attr("class","rdf-class-label").style("font-size",(function(t){return n.a.Text.calcFontSize(v,1200/18)})).text(v).on("click",(function(){e.open("resource?uri="+encodeURIComponent(m),"_blank")}))}));var M=p.select(".class-node + text"),U=d3.select(".class-node"),P=d3.selectAll(".loop-link-background"),j=d3.selectAll(".loop-link-property-name");if(N=d3.selectAll(".property-name"),!angular.isUndefined(k)){var O=[];P.each((function(t,e){d3.select(this);O.push({idx:e,width:t.calculatedWidth,height:t.calculatedHeight})}))}g.on("tick",(function(t){var e=8*g.alpha();function r(t){var e=t.x+1200/18*2,r=t.y-1200/18/1.9;var a=[];P.each((function(n,o){a.push(n),o<h?function(a,n){var o=$.grep(O,(function(t){return t.idx==n}));n>0&&(e+=parseFloat(n*(o[0].height/(n/1.4)))),a.attrs({transform:"rotate(270, "+t.x+","+t.y+") translate("+e+","+r+")",width:o[0].height,height:o[0].width})}(d3.select(this),o):d3.select(this).remove()})),function(t){var e;d3.select(".view-more-preds-label").style("font-weight","bold").each((function(r){r.target.allEdges=t,e=this.getComputedTextLength()})).on("click",o),d3.select(".view-more-preds-rect").attr("height",e+2*R)}(a)}x.filter((function(t){return t.objectPropNodeClassUri!==m})).attr("x1",(function(t){return t.source.x})).attr("y1",(function(t){return t.source.y})).attr("x2",(function(t){return t.targetX})).attr("y2",(function(t){return t.targetY})).each((function(t){!function(t){"objectLeft"===t.propertyType?(t.source.x-=8*e,t.source.y-=e/9):(t.target.x+=8*e,t.target.y-=e/9)}(t);var r=Math.atan2(t.target.y-t.source.y,t.target.x-t.source.x);t.targetX=t.target.x-Math.cos(r)*t.targetRadius,t.targetY=t.target.y-Math.sin(r)*t.targetRadius})),A.each((function(t){"main"!==t.classPosition||angular.isUndefined(k)||(!function(t){var e=t.x+64,r=t.y-1200/18/5.7-5;k.attr("transform","rotate(270, "+t.x+","+t.y+") translate("+e+","+r+")")}(t),function(t){function e(e,r){var a=$.grep(O,(function(t){return t.idx==r})),n=0;r>0&&(n=parseFloat(2*r*(a[0].height/1.4)));var o=t.x,s=t.y-1200/18*2.1-n;e.attrs({x:o,y:s}).moveToFront()}j.each((function(t,r){var a=d3.select(this),n=j.size()-h;n<0?e(a,r):(0==r&&!u.collapseEdges&&n>1&&(!function(t,e,r){t.classed("view-more-preds-label",!0).text(r+" predicates more ..."),null!==this.nextSibling&&e.classed("view-more-preds-rect",!0)}(a,d3.select(this.nextSibling),n),e(a,r)),r<h?e(a,r):a.remove())}))}(t),r(t)),t.objectPropClassUri!==m&&d3.select(this).attr("cx",(function(t){return"main"===t.classPosition?function(t){!window.ActiveXObject&&"ActiveXObject"in window&&(Math.log10=function(t){return Math.log(t)/Math.LN10});var e=U.attr("cx")-600,r=.5*Math.log10(Math.abs(e));return t.x+=e>0?-r:r,t.x}(t):t.x})).attr("cy",(function(t){return t.y}))})),M.attr("x",(function(t){return t.x})).attr("y",(function(t){return t.y})).moveToFront(),C.filter((function(t){return t.objectPropNodeClassUri!==m})).attr("x",(function(t){return t.target.x>t.source.x?t.source.x+(t.target.x-t.source.x)/2:t.target.x+(t.source.x-t.target.x)/2})).attr("y",(function(t){return t.target.y>t.source.y?t.source.y+(t.target.y-t.source.y)/2:t.target.y+(t.source.y-t.target.y)/2})).moveToFront(),N.attr("x",(function(t){return t.target.x>t.source.x?t.source.x+(t.target.x-t.source.x)/2:t.target.x+(t.source.x-t.target.x)/2})).attr("y",(function(t){return t.target.y>t.source.y?t.source.y+(t.target.y-t.source.y)/2:t.target.y+(t.source.y-t.target.y)/2})).moveToFront(),L.attr("x",(function(t){return"right"===t.classPosition?t.x+1200/110*1.2:t.x-1200/110*1.2})).attr("y",(function(t){return t.y})).moveToFront()}))}}));var b=!1}(u)}),50);u.$on("$destroy",(function(){l.cancel(p)}))}}}angular.module("graphdb.framework.graphexplore.directives.domainrange",["graphdb.framework.graphexplore.controllers.domainrange","graphdb.framework.utils.localstorageadapter"]).constant("ONTO_RED","var(--primary-color)").constant("ONTO_GREEN","var(--tertiary-color)").constant("ONTO_BLUE","var(--secondary-color)").constant("NON_COLLAPSED_REFLEXIVE_LINK_LIMIT",6).directive("domainRangeGraph",o),o.$inject=["$rootScope","$window","$repositories","GraphDataRestService","$location","LocalStorageAdapter","LSKeys","$timeout","toastr","ONTO_RED","ONTO_GREEN","ONTO_BLUE","NON_COLLAPSED_REFLEXIVE_LINK_LIMIT"]},634:function(t,e,r){var a,n;a=[r(644)],void 0===(n=function(){function t(t,e){return t.each((function(){var t=e.apply(this,arguments),r=select(this);for(var a in t)r.attr(a,t[a])}))}function e(t,e){for(var r in e)t.attr(r,e[r]);return t}return"undefined"==typeof d3&&(d3=r(644)),d3.selection.prototype.attrs=function(r){return("function"==typeof r?t:e)(this,r)},d3.selection.prototype.moveToFront=function(){return this.each((function(){d3.select(this.parentNode.appendChild(this))}))},d3.selection.prototype.moveToBack=function(){return this.each((function(){var t=this.parentNode.firstChild;t&&this.parentNode.insertBefore(this,t)}))},d3}.apply(e,a))||(t.exports=n)},647:function(t,e,r){"use strict";r(634);var a=a||{};a.Text=function(){function t(t,e,r,a){r=r||10;var n=e/3;return"string"==typeof t?(n*=10/(t.substring(0,e/3).length+1.5),n+=1,t.match(/[\u0900-\u0DFF\u1100-\u11FF\u2E80-\u2EFF\u3000-\u9FFF]/)&&(n*=.6),n<r&&(n=r),Math.round(n)):(n<r&&(n=r),Math.round(n))}return{calcFontSizeRaw:t,calcFontSize:function(e,r,a,n){return t(e,r,a)+"px"},getTextWithElipsisIfNeeded:function(t,e){return"string"==typeof t&&t.length>e?t.substring(0,e-3)+"...":t}}}(),a.Transition={fadeIn:function(t,e){t.style("opacity",0).transition().duration(e).style("opacity",1)},fadeOut:function(t,e){t.style("opacity",1).transition().duration(e).style("opacity",0)}},a.Click=function(){var t=function(t,r){for(var a,n=1,o=arguments.length;++n<o;)t[a=arguments[n]]=e(t,r,r[a]);return t};function e(t,e,r){return function(){var a=r.apply(e,arguments);return a===e?t:a}}return{delayDblClick:function(){var e=d3.dispatch("click","dblclick");return t((function(t){var r,a=null;t.on("mousedown",(function(){r=d3.pointer(document.body),+new Date})),t.on("mouseup",(function(t,n){var o,s,i;(s=r,i=d3.pointer(document.body),Math.sqrt(Math.pow(s[0]-i[0],2),Math.pow(s[1]-i[1],2))>5)||(a?(window.clearTimeout(a),a=null,e.call("dblclick",t,t,n)):a=window.setTimeout((o=t,function(){e.call("click",o,o,n),a=null}),250))}))}),e,"on")}}}(),e.a=a},648:function(t,e,r){"use strict";r(634);var a=a||{};a.Export={getCSSRules:function(t){var e=$('link[href="'+t+'"]')[0].sheet.rules,r="";return _.each(e,(function(t){r+=t.cssText})),r},generateBase64ImageSource:function(t){t||(t="svg");var e=d3.selectAll(t).attr("version","1.1").attr("xmlns","http://www.w3.org/2000/svg").node().parentNode.innerHTML;return"data:image/svg+xml;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(e)))}},e.a=a}}]);
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[76],{305:function(t,e,r){"use strict";r.r(e);var a=r(648),n=r(647);r(15);function o(t,e,r,o,s,i,c,l,d,u,p,f,h){return{restrict:"AE",template:'<div id="domain-range"></div>',scope:{showPredicatesInfoPanel:"=",selectedPredicate:"=",collapseEdges:"="},link:function(u){var p=l((function(){!function(u){var p=d3.select("#domain-range").append("svg").attr("viewBox","0 0 1200 600").attr("preserveAspectRatio","xMidYMid meet").on("dblclick.zoom",null),g=d3.forceSimulation(),y=d3.drag().subject((function(t){return t})).on("start",(function(t,e){g.stop(),e.fx=t.x,e.fy=t.y,d3.select(this).classed("selected",!0)})).on("end",(function(t,e){e.fx=null,e.fy=null,d3.select(this).classed("selected",!1),b?(g.alpha(.2).restart(),b=!1):g.restart()})).on("drag",(function(t,e){b=!0,g.alphaTarget(0).restart(),e.fx=t.x,e.fy=t.y})),x=p.append("defs");x.append("marker").attrs({id:"arrow",viewBox:"0 -5 10 10",refX:10,refY:0,markerUnits:"strokeWidth",markerWidth:5,markerHeight:5,orient:"auto",fill:f}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),x.append("marker").attrs({id:"collapsed-arrow",viewBox:"0 -5 10 10",refX:9,refY:0,markerUnits:"strokeWidth",markerWidth:4,markerHeight:4,orient:"auto",fill:f}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),x.append("marker").attrs({id:"arrow-loop",viewBox:"0 -5 10 10",refX:7,refY:0,markerUnits:"strokeWidth",markerWidth:5,markerHeight:5,orient:"auto",fill:f}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),d3.select("#download-svg").on("mouseover",(function(){var t=a.a.Export.getCSSRules("css/domain-range-graph.css?v=3.0.2");$("defs").append('<style type="text/css"><![CDATA['+t+"]]></style>");var e=a.a.Export.generateBase64ImageSource("#domain-range svg");d3.select(this).attrs({href:e,download:"domain-range-graph-"+r.getActiveRepository()+".svg"})})),function(){var t=d3.select(".legend-container").append("svg").attr("viewBox","0 0 "+1200/7+" "+1200/7*1.2).attr("preserveAspectRatio","xMidYMid meet");t.append("rect").attrs({width:1200/7,height:1200/7*1.2}).style("fill","rgba(235, 235, 235, 0.9)");var e=16+1200/18/2.5,r=e+1200/90;t.append("circle").attrs({class:"legend-class-node",cx:(16+e)/2,cy:30,r:1200/18/4.5}),t.append("text").attrs({x:r,y:30+1200/370}).style("font-size",1200/90/1.1+"px").text("main class node"),t.append("circle").attrs({class:"legend-object-node",cx:(16+e)/2,cy:70,r:1200/110/1.25}),t.append("text").attrs({x:r,y:30+1200/370+40}).style("font-size",1200/90/1.1+"px").text("class node"),t.append("circle").attrs({class:"legend-datatype-node",cx:(16+e)/2,cy:70+1200/45,r:1200/110/2}),t.append("text").attrs({x:r,y:99.90990990990991}).style("font-size",1200/90/1.1+"px").text("datatype node"),t.append("line").attrs({class:"property-arrow",x1:16,y1:123.33333333333334,x2:e,y2:123.33333333333334}).style("stroke-width",1.2).attr("marker-end","url("+s.absUrl()+"#arrow)"),t.append("text").attrs({x:r,y:126.57657657657658}).style("font-size",1200/90/1.1+"px").text("explicit property"),t.append("line").attrs({class:"implicit-property-arrow",x1:16,y1:150,x2:e,y2:150}).style("stroke-width",1.2).attr("marker-end","url("+s.absUrl()+"#arrow)"),t.append("text").attrs({x:r,y:150+1200/370}).style("font-size",1200/90/1.1+"px").text("implicit property"),t.append("line").attrs({class:"collapsed-property-arrow",x1:16,y1:150+1200/45,x2:e,y2:150+1200/45}).style("stroke-width",2).attr("marker-end","url("+s.absUrl()+"#collapsed-arrow)"),t.append("text").attrs({x:r,y:179.9099099099099}).style("font-size",1200/90/1.1+"px").text("collapsed property")}();var m=s.search().uri,v=s.search().name,k=s.search().collapsed;(function(t,e){o.getDomainRangeData(t,e).success((function(t,e,r){u.domainRangeGraphData=t})).error((function(t){d.error("Request for "+v+" failed!")}))})(m,k),$(window).on("popstate",(function(){i.set(c.DOMAIN_RANGE_WENT_BACK,!0)})),e.onpopstate=function(e){e.state&&t.$broadcast("changeCollapsedEdgesState",e.state.collapsed)},u.$watch("collapseEdges",(function(){angular.isUndefined(u.collapseEdges)||(i.set(c.DOMAIN_RANGE_COLLAPSE_EDGES,u.collapseEdges),"true"!==i.get(c.DOMAIN_RANGE_WENT_BACK)&&function(e){t.$broadcast("switchEdgeMode",{uri:m,name:v,collapsed:e})}(u.collapseEdges),i.remove(c.DOMAIN_RANGE_WENT_BACK))})),u.$watch("domainRangeGraphData",(function(){if(u.domainRangeGraphData){var r=function(t){t.style("stroke",f),t.style("stroke-width",2),t.attr("marker-end","url("+s.absUrl()+"#collapsed-arrow)")},a=function(){$.isEmptyObject(E)||(E.text.style("fill","black"),E.background.style("fill","#f0f0f0"))},o=function(t,e){a(),E.text=d3.select(this),E.background=d3.select(this.previousSibling),E.text.style("fill","white"),E.background.style("fill",f),l((function(){u.showPredicatesInfoPanel=!0,u.selectedPredicate=e})),t.stopPropagation()},i=_.cloneDeep(u.domainRangeGraphData),c=i.nodes,d=i.links;g.nodes(c).force("x",d3.forceX(600)).force("y",d3.forceY(300)).force("charge",d3.forceManyBody().strength(-800)).force("link",d3.forceLink(d).distance(1200/3.5));var x,k,b=p.selectAll(".link").data(d).enter().append("g"),w=0;b.each((function(t){if(t.objectPropNodeClassUri!==m)x=b.append("line").attrs({class:"link","marker-end":"url("+s.absUrl()+"#arrow)"}).style("stroke-width",1.2).each((function(t){switch(t.propertyType){case"objectLeft":t.targetRadius=1200/18;break;case"objectRight":t.targetRadius=1200/110;break;case"datatype":t.targetRadius=1200/110/2;break;default:t.targetRadius=0}var e=d3.select(this);t.targetNodeEdgeCount>1?r(e):t.implicit&&e.style("stroke-dasharray","3, 3")}));else{if(angular.isUndefined(k)){k=d3.select(this).append("path").attrs({d:"M 0 0 A "+1200/18/2+" "+1200/18/2+" 0 1 1 0 "+1200/18/2,class:"loop-link",fill:"none","marker-end":"url("+s.absUrl()+"#arrow-loop)"}).style("stroke-width",1.2)}(w+=t.targetNodeEdgeCount)>1&&r(d3.select(".loop-link"))}}));var E={};$("document").ready((function(){$("#domain-range").bind("click",a)}));var N=b.append("text").attr("class",(function(t){return t.objectPropNodeClassUri===m?"loop-link-property-name":"property-name"})).attr("dx",(function(t){return 1200/18/2*("objectLeft"===t.propertyType?1:-1)})).style("text-anchor",(function(t){return"objectLeft"===t.propertyType?"end":"start"})).style("font-size",1200/90).text((function(t){return t.targetNodeEdgeCount>1?t.targetNodeEdgeCount+" predicates":t.name}));N.each((function(t){var r=d3.select(this);/\d\spredicates/.test(r.text())?r.style("font-weight","bold").on("click",o):r.on("click",(function(t,r){e.open("resource?uri="+encodeURIComponent(r.uri),"_blank")}))}));var R=2,C=b.append("rect").attr("class",(function(t){return t.objectPropNodeClassUri!==m?"link-background":"loop-link-background"})).attr("width",(function(t){return t.calculatedWidth=this.previousSibling.getBBox().width,t.calculatedWidth+2*R})).attr("height",(function(t){return t.calculatedHeight=this.previousSibling.getBBox().height,t.calculatedHeight+R})).attr("transform",(function(t){var e=R-1200/18/2*("objectLeft"===t.propertyType?1:-1);return"objectLeft"===t.propertyType&&(e+=t.calculatedWidth),"translate(-"+e+",-"+(R+t.calculatedHeight/2)+")"})).on("click",(function(t){t.stopPropagation()})),T=p.selectAll(".node").data(c).enter().append("g"),A=T.filter((function(t){return t.objectPropClassUri!==m})).append("circle").each((function(t){var e=d3.select(this);"main"===t.classPosition?e.attrs({class:"class-node",r:1200/18}).attr("marker-end","url("+s.absUrl()+"#loop-link)"):null===t.objectPropClassName?e.attrs({class:"datatype-node",r:1200/110/2}):e.attrs({class:"object-prop-node",r:1200/110})})).call(y);d3.selectAll(".object-prop-node").on("dblclick",(function(e,r,a){u.$apply((function(){t.$broadcast("reloadDomainRangeGraphView",r,a)}))})),T.filter((function(t){return t.objectPropClassName&&t.objectPropClassUri!==m})).append("text").attr("class",(function(t){return t.classPosition+"-class-label"})).style("font-size",1200/90).text((function(t){return t.objectPropClassName})).on("click",(function(t,r){e.open("resource?uri="+encodeURIComponent(r.objectPropClassUri),"_blank")}));var L=T.select("text");p.select(".class-node").each((function(){d3.select(this.parentNode).append("text").attr("class","rdf-class-label").style("font-size",(function(t){return n.a.Text.calcFontSize(v,1200/18)})).text(v).on("click",(function(){e.open("resource?uri="+encodeURIComponent(m),"_blank")}))}));var M=p.select(".class-node + text"),U=d3.select(".class-node"),P=d3.selectAll(".loop-link-background"),j=d3.selectAll(".loop-link-property-name");if(N=d3.selectAll(".property-name"),!angular.isUndefined(k)){var O=[];P.each((function(t,e){d3.select(this);O.push({idx:e,width:t.calculatedWidth,height:t.calculatedHeight})}))}g.on("tick",(function(t){var e=8*g.alpha();function r(t){var e=t.x+1200/18*2,r=t.y-1200/18/1.9;var a=[];P.each((function(n,o){a.push(n),o<h?function(a,n){var o=$.grep(O,(function(t){return t.idx==n}));n>0&&(e+=parseFloat(n*(o[0].height/(n/1.4)))),a.attrs({transform:"rotate(270, "+t.x+","+t.y+") translate("+e+","+r+")",width:o[0].height,height:o[0].width})}(d3.select(this),o):d3.select(this).remove()})),function(t){var e;d3.select(".view-more-preds-label").style("font-weight","bold").each((function(r){r.target.allEdges=t,e=this.getComputedTextLength()})).on("click",o),d3.select(".view-more-preds-rect").attr("height",e+2*R)}(a)}x.filter((function(t){return t.objectPropNodeClassUri!==m})).attr("x1",(function(t){return t.source.x})).attr("y1",(function(t){return t.source.y})).attr("x2",(function(t){return t.targetX})).attr("y2",(function(t){return t.targetY})).each((function(t){!function(t){"objectLeft"===t.propertyType?(t.source.x-=8*e,t.source.y-=e/9):(t.target.x+=8*e,t.target.y-=e/9)}(t);var r=Math.atan2(t.target.y-t.source.y,t.target.x-t.source.x);t.targetX=t.target.x-Math.cos(r)*t.targetRadius,t.targetY=t.target.y-Math.sin(r)*t.targetRadius})),A.each((function(t){"main"!==t.classPosition||angular.isUndefined(k)||(!function(t){var e=t.x+64,r=t.y-1200/18/5.7-5;k.attr("transform","rotate(270, "+t.x+","+t.y+") translate("+e+","+r+")")}(t),function(t){function e(e,r){var a=$.grep(O,(function(t){return t.idx==r})),n=0;r>0&&(n=parseFloat(2*r*(a[0].height/1.4)));var o=t.x,s=t.y-1200/18*2.1-n;e.attrs({x:o,y:s}).moveToFront()}j.each((function(t,r){var a=d3.select(this),n=j.size()-h;n<0?e(a,r):(0==r&&!u.collapseEdges&&n>1&&(!function(t,e,r){t.classed("view-more-preds-label",!0).text(r+" predicates more ..."),null!==this.nextSibling&&e.classed("view-more-preds-rect",!0)}(a,d3.select(this.nextSibling),n),e(a,r)),r<h?e(a,r):a.remove())}))}(t),r(t)),t.objectPropClassUri!==m&&d3.select(this).attr("cx",(function(t){return"main"===t.classPosition?function(t){!window.ActiveXObject&&"ActiveXObject"in window&&(Math.log10=function(t){return Math.log(t)/Math.LN10});var e=U.attr("cx")-600,r=.5*Math.log10(Math.abs(e));return t.x+=e>0?-r:r,t.x}(t):t.x})).attr("cy",(function(t){return t.y}))})),M.attr("x",(function(t){return t.x})).attr("y",(function(t){return t.y})).moveToFront(),C.filter((function(t){return t.objectPropNodeClassUri!==m})).attr("x",(function(t){return t.target.x>t.source.x?t.source.x+(t.target.x-t.source.x)/2:t.target.x+(t.source.x-t.target.x)/2})).attr("y",(function(t){return t.target.y>t.source.y?t.source.y+(t.target.y-t.source.y)/2:t.target.y+(t.source.y-t.target.y)/2})).moveToFront(),N.attr("x",(function(t){return t.target.x>t.source.x?t.source.x+(t.target.x-t.source.x)/2:t.target.x+(t.source.x-t.target.x)/2})).attr("y",(function(t){return t.target.y>t.source.y?t.source.y+(t.target.y-t.source.y)/2:t.target.y+(t.source.y-t.target.y)/2})).moveToFront(),L.attr("x",(function(t){return"right"===t.classPosition?t.x+1200/110*1.2:t.x-1200/110*1.2})).attr("y",(function(t){return t.y})).moveToFront()}))}}));var b=!1}(u)}),50);u.$on("$destroy",(function(){l.cancel(p)}))}}}angular.module("graphdb.framework.graphexplore.directives.domainrange",["graphdb.framework.graphexplore.controllers.domainrange","graphdb.framework.utils.localstorageadapter"]).constant("ONTO_RED","var(--primary-color)").constant("ONTO_GREEN","var(--tertiary-color)").constant("ONTO_BLUE","var(--secondary-color)").constant("NON_COLLAPSED_REFLEXIVE_LINK_LIMIT",6).directive("domainRangeGraph",o),o.$inject=["$rootScope","$window","$repositories","GraphDataRestService","$location","LocalStorageAdapter","LSKeys","$timeout","toastr","ONTO_RED","ONTO_GREEN","ONTO_BLUE","NON_COLLAPSED_REFLEXIVE_LINK_LIMIT"]},634:function(t,e,r){var a,n;a=[r(644)],void 0===(n=function(){function t(t,e){return t.each((function(){var t=e.apply(this,arguments),r=select(this);for(var a in t)r.attr(a,t[a])}))}function e(t,e){for(var r in e)t.attr(r,e[r]);return t}return"undefined"==typeof d3&&(d3=r(644)),d3.selection.prototype.attrs=function(r){return("function"==typeof r?t:e)(this,r)},d3.selection.prototype.moveToFront=function(){return this.each((function(){d3.select(this.parentNode.appendChild(this))}))},d3.selection.prototype.moveToBack=function(){return this.each((function(){var t=this.parentNode.firstChild;t&&this.parentNode.insertBefore(this,t)}))},d3}.apply(e,a))||(t.exports=n)},647:function(t,e,r){"use strict";r(634);var a=a||{};a.Text=function(){function t(t,e,r,a){r=r||10;var n=e/3;return"string"==typeof t?(n*=10/(t.substring(0,e/3).length+1.5),n+=1,t.match(/[\u0900-\u0DFF\u1100-\u11FF\u2E80-\u2EFF\u3000-\u9FFF]/)&&(n*=.6),n<r&&(n=r),Math.round(n)):(n<r&&(n=r),Math.round(n))}return{calcFontSizeRaw:t,calcFontSize:function(e,r,a,n){return t(e,r,a)+"px"},getTextWithElipsisIfNeeded:function(t,e){return"string"==typeof t&&t.length>e?t.substring(0,e-3)+"...":t}}}(),a.Transition={fadeIn:function(t,e){t.style("opacity",0).transition().duration(e).style("opacity",1)},fadeOut:function(t,e){t.style("opacity",1).transition().duration(e).style("opacity",0)}},a.Click=function(){var t=function(t,r){for(var a,n=1,o=arguments.length;++n<o;)t[a=arguments[n]]=e(t,r,r[a]);return t};function e(t,e,r){return function(){var a=r.apply(e,arguments);return a===e?t:a}}return{delayDblClick:function(){var e=d3.dispatch("click","dblclick");return t((function(t){var r,a=null;t.on("mousedown",(function(){r=d3.pointer(document.body),+new Date})),t.on("mouseup",(function(t,n){var o,s,i;(s=r,i=d3.pointer(document.body),Math.sqrt(Math.pow(s[0]-i[0],2),Math.pow(s[1]-i[1],2))>5)||(a?(window.clearTimeout(a),a=null,e.call("dblclick",t,t,n)):a=window.setTimeout((o=t,function(){e.call("click",o,o,n),a=null}),250))}))}),e,"on")}}}(),e.a=a},648:function(t,e,r){"use strict";r(634);var a=a||{};a.Export={getCSSRules:function(t){var e=$('link[href="'+t+'"]')[0].sheet.rules,r="";return _.each(e,(function(t){r+=t.cssText})),r},generateBase64ImageSource:function(t){t||(t="svg");var e=d3.selectAll(t).attr("version","1.1").attr("xmlns","http://www.w3.org/2000/svg").node().parentNode.innerHTML;return"data:image/svg+xml;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(e)))}},e.a=a}}]);
|