graphdb-workbench 1.11.1 → 1.11.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.
Files changed (51) hide show
  1. package/dist/113.2c059fa7d06fd04149eb.bundle.js +1 -1
  2. package/dist/113.2c059fa7d06fd04149eb.bundle.js.map +1 -1
  3. package/dist/14.0c709b039159410b0b91.bundle.js +1 -1
  4. package/dist/14.0c709b039159410b0b91.bundle.js.map +1 -1
  5. package/dist/{19.6a237d6c25383747735a.bundle.js → 19.271aef502bad5f51c682.bundle.js} +2 -2
  6. package/dist/{19.6a237d6c25383747735a.bundle.js.map → 19.271aef502bad5f51c682.bundle.js.map} +1 -1
  7. package/dist/22.e85ffde858c596437b7a.bundle.js +1 -1
  8. package/dist/22.e85ffde858c596437b7a.bundle.js.map +1 -1
  9. package/dist/27.ab75434b1389b977291c.bundle.js +1 -1
  10. package/dist/27.ab75434b1389b977291c.bundle.js.map +1 -1
  11. package/dist/30.d341c7532759bc79f41a.bundle.js +1 -1
  12. package/dist/30.d341c7532759bc79f41a.bundle.js.map +1 -1
  13. package/dist/37.dcbe2e4e1f86ca2da209.bundle.js +1 -1
  14. package/dist/37.dcbe2e4e1f86ca2da209.bundle.js.map +1 -1
  15. package/dist/38.171aa543e807777b4f29.bundle.js +1 -1
  16. package/dist/38.171aa543e807777b4f29.bundle.js.map +1 -1
  17. package/dist/52.dbb58479cefc4f3ba211.bundle.js +2 -0
  18. package/dist/52.dbb58479cefc4f3ba211.bundle.js.map +1 -0
  19. package/dist/{bundle.26708524aa502d7fbb2a.bundle.js → bundle.ac70985c70f7da448f2d.bundle.js} +4 -4
  20. package/dist/{bundle.26708524aa502d7fbb2a.bundle.js.map → bundle.ac70985c70f7da448f2d.bundle.js.map} +1 -1
  21. package/dist/index.html +3 -3
  22. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  23. package/dist/pages/autocomplete.html +1 -1
  24. package/dist/pages/choose-repository-type.html +1 -1
  25. package/dist/pages/clusterInfo.html +1 -1
  26. package/dist/pages/create-index.html +4 -4
  27. package/dist/pages/dependencies.html +1 -1
  28. package/dist/pages/domainRangeInfo.html +2 -2
  29. package/dist/pages/edit.html +1 -1
  30. package/dist/pages/explore.html +1 -1
  31. package/dist/pages/export.html +1 -1
  32. package/dist/pages/find.html +1 -1
  33. package/dist/pages/graph-config/saveGraphConfig.html +11 -11
  34. package/dist/pages/graphs-visualizations.html +7 -7
  35. package/dist/pages/import.html +1 -1
  36. package/dist/pages/jdbc-create.html +5 -5
  37. package/dist/pages/monitor/queries.html +1 -1
  38. package/dist/pages/monitor/resources.html +2 -2
  39. package/dist/pages/namespaces.html +2 -2
  40. package/dist/pages/rdfClassHierarchyInfo.html +7 -7
  41. package/dist/pages/rdfrank.html +2 -2
  42. package/dist/pages/repositories.html +2 -2
  43. package/dist/pages/repository.html +2 -2
  44. package/dist/pages/similarity-indexes.html +1 -1
  45. package/dist/pages/sparql-template-create.html +5 -5
  46. package/dist/pages/sparql.html +3 -3
  47. package/dist/pages/webapi.html +2 -2
  48. package/dist/res/swagger/index.html +25 -25
  49. package/package.json +1 -1
  50. package/dist/52.ada981f774ef9f09e7a9.bundle.js +0 -2
  51. package/dist/52.ada981f774ef9f09e7a9.bundle.js.map +0 -1
@@ -1,4 +1,4 @@
1
1
  (window.webpackJsonp=window.webpackJsonp||[]).push([[19,33,46,52,105],{220:function(e,t){
2
2
  /*! Copyright (c) 2014 Hidenari Nozaki and contributors | Licensed under the MIT license */
3
- !function(e,t){"use strict";!function(e){e.module("angucomplete-alt-onto",[]).directive("angucompleteAltOnto",["$q","$parse","$http","$sce","$timeout","$templateCache","$interpolate","$rootScope",function(e,t,u,n,r,a,l,i){var o=40,F=39,s=38,c=37,d=27,g=13,p=9,f=3,h=524288,D=500,m=200,w="autocomplete-required",v="Searching...",b="No results found";function x(t,a,l,i){var x,y,S,C,$,I,R=a.find("input"),E=f,M=null,A=w,L=null,j=null,O=a[0].querySelector(".angucomplete-dropdown"),B=!1,X=null;function U(e,u){e&&("object"==typeof e?(t.uri=_(e),q({originalObject:e})):"string"==typeof e&&e.length>0?t.uri=e:console&&console.error&&console.error("Tried to set "+(u?"initial":"")+" value of angucomplete to",e,"which is an invalid value"),N(!0))}function k(e){X=null,t.hideResults(e),document.body.removeEventListener("click",k)}function z(e){return e.which?e.which:e.keyCode}function q(e){"function"==typeof t.selectedObject?t.selectedObject(e):t.selectedObject=e,N(!!e)}function _(e){return t.titleField.split(",").map((function(t){return H(e,t)})).join(" ")}function H(e,t){var u,n;if(t){u=t.split("."),n=e;for(var r=0;r<u.length;r++)n=n[u[r]]}else n=e;return n}function T(e,u){var r,a,l;if(l=new RegExp(u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i"),e)return e.match&&e.replace||(e=e.toString()),r=(a=e.match(l))?e.replace(l,'<span class="'+t.matchClass+'">'+a[0]+"</span>"):e,n.trustAsHtml(r)}function N(e){t.notEmpty=e,L=t.uri,t.fieldRequired&&i&&t.inputName&&i[t.inputName].$setValidity(A,e)}function V(e){!t.overrideSuggestions||t.selectedObject&&t.selectedObject.originalObject===t.uri||(e&&e.preventDefault(),r.cancel(M),K(),q({originalObject:t.uri}),t.clearSelected&&(t.uri=null),ee())}function W(){return a[0].querySelectorAll(".angucomplete-row")[t.currentIndex]}function Y(e){O.scrollTop=O.scrollTop+e}function J(){var e=t.results[t.currentIndex];if(t.matchClass){var u=_(e.originalObject);u=u.replace(/<b>|<\/b>/g,""),R.val(u)}else R.val(e.title)}function P(e){return function(u,n,r,a){n||r||a||!u.data||(u=u.data),t.searching=!1,ne(H(y(u),t.remoteUrlDataField),e)}}function G(e,u,n,r){0!==u&&-1!==u&&(u||n||r||(u=e.status),t.remoteUrlErrorCallback?t.remoteUrlErrorCallback(e,u,n,r):console&&console.error&&console.error("http error"))}function K(){j&&j.resolve()}function Q(n){var r={},a=t.remoteUrl+encodeuriComponent(n);t.remoteUrlRequestFormatter&&(r={params:t.remoteUrlRequestFormatter(n)},a=t.remoteUrl),t.remoteUrlRequestWithCredentials&&(r.withCredentials=!0),K(),j=e.defer(),r.timeout=j.promise,u.get(a,r).success(P(n)).error(G)}function Z(u){K(),j=e.defer(),t.remoteApiHandler(u,j.promise).then(P(u)).catch(G)}function ee(){t.showDropdown=!1,t.results=[],O&&(O.scrollTop=0)}function te(){t.showDropdown=C,t.currentIndex=t.focusFirst?0:-1,t.results=[]}function ue(e){!e||e.length<E||(t.localData?t.$apply((function(){var u;u=void 0!==t.localSearch()?t.localSearch()(e):function(e){var u,n,r,a,l=t.searchFields.split(","),i=[];for(void 0!==t.parseInput()&&(e=t.parseInput()(e)),u=0;u<t.localData.length;u++){for(n=!1,r=0;r<l.length;r++)a=H(t.localData[u],l[r])||"",n=n||a.toString().toLowerCase().indexOf(e.toString().toLowerCase())>=0;n&&(i[i.length]=t.localData[u])}return i}(e),t.searching=!1,ne(u,e)})):t.remoteApiHandler?Z(e):Q(e))}function ne(e,u){var n,r,a,l,i,o;if(e&&e.length>0)for(t.results=[],n=0;n<e.length;n++)t.titleField&&""!==t.titleField&&(l=i=_(e[n])),r="",t.descriptionField&&(r=o=H(e[n],t.descriptionField)),a="",t.imageField&&(a=H(e[n],t.imageField)),t.matchClass&&(i=T(l,u),o=T(r,u)),t.results[t.results.length]={title:i,description:o,image:a,originalObject:e[n]};else t.results=[];t.autoMatch&&1===t.results.length&&function(e,u,n){if(!n)return!1;for(var r in u)if(u[r].toLowerCase()===n.toLowerCase())return t.selectResult(e),!0;return!1}(t.results[0],{title:l,desc:r||""},t.uri)?t.showDropdown=!1:0!==t.results.length||$?t.showDropdown=!0:t.showDropdown=!1}function re(){t.localData?ne(t.localData,""):t.remoteApiHandler?Z(""):Q("")}a.on("mousedown",(function(e){e.target.id?(X=e.target.id)===t.id+"_dropdown"&&document.body.addEventListener("click",k):X=e.target.className})),t.currentIndex=t.focusFirst?0:null,t.searching=!1,S=t.$watch("initialValue",(function(e){e&&(S(),U(e,!0))})),t.$watch("fieldRequired",(function(e,u){e!==u&&(e?L&&-1!==t.currentIndex?N(!0):N(!1):i[t.inputName].$setValidity(A,!0))})),t.$on("angucomplete-alt:clearInput",(function(e,u){u&&u!==t.id||(t.uri=null,q(),N(!1),ee())})),t.$on("angucomplete-alt:changeInput",(function(e,u,n){u&&u===t.id&&U(n)})),t.onFocusHandler=function(){t.focusIn&&t.focusIn(),0!==E||t.uri&&0!==t.uri.length||(t.currentIndex=t.focusFirst?0:t.currentIndex,t.showDropdown=!0,re())},t.hideResults=function(){X&&(X===t.id+"_dropdown"||X.indexOf("angucomplete")>=0)?X=null:(x=r((function(){ee(),t.$apply((function(){t.uri&&t.uri.length>0&&R.val(t.uri)}))}),m),K(),t.focusOut&&t.focusOut(),t.overrideSuggestions&&t.uri&&t.uri.length>0&&-1===t.currentIndex&&V())},t.resetHideResults=function(){x&&r.cancel(x)},t.hoverRow=function(e){t.currentIndex=e},t.selectResult=function(e){t.matchClass&&(e.title=_(e.originalObject),"string"==typeof e.title&&(e.title=e.title.replace(/<b>|<\/b>/g,"")),e.description=H(e.originalObject,t.descriptionField)),t.clearSelected?t.uri=null:t.uri=e.title,q(e),ee()},t.inputChangeHandler=function(e){return e.length<E?(K(),ee()):0===e.length&&0===E&&(t.searching=!1,re()),t.inputChanged&&(e=t.inputChanged(e)),e},t.fieldRequiredClass&&""!==t.fieldRequiredClass&&(A=t.fieldRequiredClass),t.minlength&&""!==t.minlength&&(E=parseInt(t.minlength,10)),t.pause||(t.pause=D),t.clearSelected||(t.clearSelected=!1),t.overrideSuggestions||(t.overrideSuggestions=!1),t.fieldRequired&&i&&(t.initialValue?N(!0):N(!1)),t.inputType=l.type?l.type:"text",t.textSearching=l.textSearching?l.textSearching:v,t.textNoResults=l.textNoResults?l.textNoResults:b,C="false"!==t.textSearching,$="false"!==t.textNoResults,t.maxlength=l.maxlength?l.maxlength:h,R.on("keydown",(function(e){var u=z(e),n=null,r=null;u===g&&t.results?(t.currentIndex>=0&&t.currentIndex<t.results.length?(e.preventDefault(),t.selectResult(t.results[t.currentIndex])):(V(e),ee()),t.$apply()):u===o&&t.results?(e.preventDefault(),t.currentIndex+1<t.results.length&&t.showDropdown&&(t.$apply((function(){t.currentIndex++,J()})),B&&(n=W(),O.getBoundingClientRect().top+parseInt(getComputedStyle(O).maxHeight,10)<n.getBoundingClientRect().bottom&&Y(function(e){var t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,10)+parseInt(t.marginBottom,10)}(n))))):u===s&&t.results?(e.preventDefault(),t.currentIndex>=1?(t.$apply((function(){t.currentIndex--,J()})),B&&(r=W().getBoundingClientRect().top-(O.getBoundingClientRect().top+parseInt(getComputedStyle(O).paddingTop,10)))<0&&Y(r-1)):0===t.currentIndex&&t.$apply((function(){t.currentIndex=-1,R.val(t.uri)}))):u===p?t.results&&t.results.length>0&&t.showDropdown?-1===t.currentIndex&&t.overrideSuggestions?V():(-1===t.currentIndex&&(t.currentIndex=0),t.selectResult(t.results[t.currentIndex]),t.$digest()):t.uri&&t.uri.length>0&&V():u===d&&e.preventDefault()})),R.on("keyup",(function(e){var u=z(e);if(u!==c&&u!==F)if(u===s||u===g)e.preventDefault();else if(u===o)e.preventDefault(),!t.showDropdown&&t.uri&&t.uri.length>=E&&(te(),t.searching=!0,ue(t.uri));else if(u===d)ee(),t.$apply((function(){R.val(t.uri)}));else{if(0===E&&!t.uri)return;t.uri&&""!==t.uri?t.uri.length>=E&&(te(),M&&r.cancel(M),t.searching=!0,M=r((function(){ue(t.uri)}),t.pause)):t.showDropdown=!1,L&&L!==t.uri&&!t.clearSelected&&t.$apply((function(){q()}))}})),I="remoteUrlResponseFormatter",y=function(e){return t[I]?t[I](e):e},r((function(){var e=getComputedStyle(O);B=e.maxHeight&&"auto"===e.overflowY}))}return(a.put("/angucomplete-alt/index.html",'<div class="angucomplete-holder" ng-class="{\'angucomplete-dropdown-visible\': showDropdown}"> <input id="{{id}}_value" name="{{inputName}}" tabindex="{{fieldTabindex}}" ng-class="{\'angucomplete-input-not-empty\': notEmpty}" ng-model="uri" ng-disabled="disableInput" type="{{inputType}}" placeholder="{{placeholder}}" maxlength="{{maxlength}}" ng-focus="onFocusHandler()" class="{{inputClass}}" ng-focus="resetHideResults()" ng-blur="hideResults($event)" autocapitalize="off" autocorrect="off" autocomplete="off" ng-change="inputChangeHandler(uri)" style="overflow: hidden; padding-right: .5em;"/> <div id="{{id}}_dropdown" class="angucomplete-dropdown" ng-show="disableSuggestions && showDropdown"> <div class="angucomplete-searching" ng-show="searching" ng-bind="textSearching"></div> <div class="angucomplete-searching" ng-show="!searching && (!results || results.length == 0)" ng-bind="textNoResults"></div> <div class="angucomplete-row" ng-repeat="result in results" ng-click="selectResult(result)" ng-mouseenter="hoverRow($index)" ng-class="{\'angucomplete-selected-row\': $index == currentIndex}"> <div ng-if="imageField" class="angucomplete-image-holder"> <img ng-if="result.image && result.image != \'\'" ng-src="{{result.image}}" class="angucomplete-image"/> <div ng-if="!result.image && result.image != \'\'" class="angucomplete-image-default"></div> </div> <div class="angucomplete-title" ng-if="matchClass" ng-bind-html="result.title"></div> <div class="angucomplete-title" ng-if="!matchClass">{{ result.title }}</div> <div ng-if="matchClass && result.description && result.description != \'\'" class="angucomplete-description" ng-bind-html="result.description"></div> <div ng-if="!matchClass && result.description && result.description != \'\'" class="angucomplete-description">{{result.description}}</div> </div> </div></div>'),{restrict:"EA",require:"^?form",scope:{selectedObject:"=",disableInput:"=",disableSuggestions:"=",initialValue:"=",localData:"=",localSearch:"&",remoteUrlRequestFormatter:"=",remoteUrlRequestWithCredentials:"@",remoteUrlResponseFormatter:"=",remoteUrlErrorCallback:"=",remoteApiHandler:"=",id:"@",type:"@",placeholder:"@",remoteUrl:"@",remoteUrlDataField:"@",titleField:"@",descriptionField:"@",imageField:"@",inputClass:"@",pause:"@",searchFields:"@",minlength:"@",matchClass:"@",clearSelected:"@",overrideSuggestions:"@",fieldRequired:"=",fieldRequiredClass:"@",inputChanged:"=",autoMatch:"@",focusOut:"&",focusIn:"&",fieldTabindex:"@",inputName:"@",focusFirst:"@",parseInput:"&"},templateUrl:function(e,t){return t.templateUrl||"/angucomplete-alt/index.html"},compile:function(e){var t=l.startSymbol(),u=l.endSymbol();if("{{"!==t||"}}"!==u){var n=e.html().replace(/\{\{/g,t).replace(/\}\}/g,u);e.html(n)}return x}})}])}(window.angular)}()},30:function(e,t){let u;angular.module("graphdb.framework.utils.uriutils",[]).factory("UriUtils",(function(){return{isValidIri:function(e){return void 0!==e&&!!e.match(u)},validateRdfUri:function(e){const t=e.indexOf("<")>=0&&e.indexOf(">")>=0,u=-1===e.indexOf("<")&&-1===e.lastIndexOf(">"),n=/^<?(http|urn).*>?/.test(e)&&(t||u);let r=!1;if(n)if(e.indexOf("http")>=0){const t=e.indexOf("//");r=t>4&&e.substring(t+2).length>0}else e.indexOf("urn")>=0&&(r=e.substring(4).length>0);return n&&r}}}));try{u=new RegExp("^[a-z](?:[-a-z0-9\\+\\.])*:(?:\\/\\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}!\\$&'\\(\\)\\*\\+,;=:])*@)?(?:\\[(?:(?:(?:[0-9a-f]{1,4}:){6}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\\.(?:[0-9]|[1-9][0-9]|1[0-9][0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]|2[0-4][0-9]|25[0-5])(?:\\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|v[0-9a-f]+[-a-z0-9\\._~!\\$&'\\(\\)\\*\\+,;=:]+)\\]|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}|(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}!\\$&'\\(\\)\\*\\+,;=@])*)(?::[0-9]*)?(?:\\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@]))*)*|\\/(?:(?:(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@]))+)(?:\\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@]))*)*)?|(?:(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@]))+)(?:\\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@]))*)*|(?!(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@])))(?:\\?(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@])|[\\u{E000}-\\u{F8FF}\\u{F0000}-\\u{FFFFD}\\u{100000}-\\u{10FFFD}\\/\\?])*)?(?:#(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@])|[\\/\\?])*)?$","ui")}catch(e){u=new RegExp("^[a-z](?:[-a-z0-9\\+\\.])*:","i")}},45:function(e,t){function u(e){return{restrict:"A",scope:{min:"=",max:"="},link:function(t,u,n){const r={debounce:_.debounce,delay:100,loadDelay:10,compressor:1,min:n.fitTextMin||"inherit",max:n.fitTextMax||"inherit",calcSize:10,lines:1},a=u.parent(),l=u[0],i=l.style,o=window.getComputedStyle(u[0],null),F=u.children().length||r.lines,s="inherit"===r.min?o["font-size"]:r.min,c="inherit"===r.max?o["font-size"]:r.max,d=o["line-height"],g=o.display;let p;function f(){const e=r.calcSize*F/l.offsetWidth/F;return Math.max(Math.min(function(e){const t=parseFloat(getComputedStyle(a[0]).paddingLeft),u=parseFloat(getComputedStyle(a[0]).paddingRight);return(a[0].offsetWidth-(t+u))*e*r.compressor}(e),parseFloat(c)),parseFloat(s))}function h(){p&&e.cancel(p),p=e((function(){l.offsetHeight*l.offsetWidth!=0&&(i.fontSize=r.calcSize+"px",i.lineHeight="1",i.display="inline-block",i.fontSize=f()+"px",i.lineHeight=d,i.display=g)}),r.loadDelay)}t.$watch((function(){return[a[0].offsetWidth,u[0].offsetWidth].join("_")}),(function(){h()})),$(window).on("resize",r.debounce((function(){t.$apply(h)}),r.delay)),t.$on("$destroy",(function(){p&&e.cancel(p),$(window).off("resize")}))}}}angular.module("graphdb.framework.core.directives.fittext",[]).directive("fitText",u),u.$inject=["$timeout"]},46:function(e,t){function u(){return{transformToTrig:function(e){let t="";const u={};for(let t=0;t<e.length;t++){const n=e[t];if(void 0===n.context?n.context="":n.context=_.trim(n.context),angular.isUndefined(u[n.context])){const e=[];e.push(n),u[n.context]=e}else u[n.context].push(n)}const n=Object.keys(u);for(let e=0;e<n.length;e++){const r=n[e];t+=""===r?"\n{":"\n<"+r+"> {";const a=u[r];for(let e=0;e<a.length;e++){const u=a[e];t+="\n\t<"+u.subject+"> <"+u.predicate+"> ","uri"===u.object.type?t+="<"+u.object.value+"> .":t+='"'+u.object.value+'"'+(u.object.datatype?"^^<"+u.object.datatype+">":u.object.lang?"@"+u.object.lang:"")+" ."}t+="\n}"}return t},buildStatements:function(e,t){const u=[];if(!_.isEmpty(e.data)){const n=e.data[t],r=Object.keys(n);for(let e=0;e<r.length;e++){const a=r[e],l=n[a];for(let e=0;e<l.length;e++){const n=l[e];for(let e=0;e<n.graphs.length;e++){let r=n.graphs[e];"http://www.ontotext.com/explicit"===r&&(r=""),n.lang&&(n.datatype=""),n.datatype||(n.datatype=""),u.push({subject:t,predicate:a,object:{value:n.value,type:n.type,datatype:n.datatype,lang:n.lang},context:r})}}}}return u},getDatatypeOptions:function(){return[{value:"",label:"string"},{value:"http://www.w3.org/2001/XMLSchema#boolean",label:"boolean"},{value:"http://www.w3.org/2001/XMLSchema#decimal",label:"decimal"},{value:"http://www.w3.org/2001/XMLSchema#integer",label:"integer"},{value:"http://www.w3.org/2001/XMLSchema#double",label:"double"},{value:"http://www.w3.org/2001/XMLSchema#float",label:"float"},{value:"http://www.w3.org/2001/XMLSchema#date",label:"date"},{value:"http://www.w3.org/2001/XMLSchema#time",label:"time"},{value:"http://www.w3.org/2001/XMLSchema#dateTime",label:"date time"},{value:"http://www.w3.org/2001/XMLSchema#byte",label:"byte"},{value:"http://www.w3.org/2001/XMLSchema#short",label:"short"},{value:"http://www.w3.org/2001/XMLSchema#int",label:"int"},{value:"http://www.w3.org/2001/XMLSchema#long",label:"long"},{value:"http://www.w3.org/2001/XMLSchema#unsignedByte",label:"unsigned byte"},{value:"http://www.w3.org/2001/XMLSchema#unsignedShort",label:"unsigned short"},{value:"http://www.w3.org/2001/XMLSchema#unsignedInt",label:"unsigned int"},{value:"http://www.w3.org/2001/XMLSchema#unsignedLong",label:"unsigned long"},{value:"http://www.w3.org/2001/XMLSchema#positoveInteger",label:"positive integer"},{value:"http://www.w3.org/2001/XMLSchema#nonNegativeInteger",label:"non-negative integer"},{value:"http://www.w3.org/2001/XMLSchema#negativeInteger",label:"negative integer"},{value:"http://www.w3.org/2001/XMLSchema#nonPositiveInteger",label:"non-positive integer"},{value:"http://www.w3.org/2001/XMLSchema#gYear",label:"gYear"},{value:"http://www.w3.org/2001/XMLSchema#gMonth",label:"gMonth"},{value:"http://www.w3.org/2001/XMLSchema#gDay",label:"gDay"},{value:"http://www.w3.org/2001/XMLSchema#gYearMonth",label:"gYearMonth"},{value:"http://www.w3.org/2001/XMLSchema#gMonthDay",label:"gMonthDay"},{value:"http://www.w3.org/2001/XMLSchema#duration",label:"duration"},{value:"http://www.w3.org/2001/XMLSchema#hexBinary",label:"hex binary"},{value:"http://www.w3.org/2001/XMLSchema#base64Binary",label:"base64 binary"}]}}}angular.module("graphdb.framework.explore.services",[]).factory("StatementsService",u),u.$inject=[]},47:function(e,t,u){"use strict";u.r(t);u(30);angular.module("graphdb.framework.explore.directives",["graphdb.framework.utils.uriutils"]).directive("uri",["UriUtils",function(e){return{require:"ngModel",link:function(t,u,n,r){r.$parsers.unshift((function(t){if(!angular.isUndefined(t)&&t.length>0){const u=e.validateRdfUri(t);return r.$setValidity("searchStr",u),u?t:void 0}return r.$setValidity("searchStr",!0),t})),r.$formatters.unshift((function(t){return angular.isUndefined(t)||r.$setValidity("searchStr",e.validateRdfUri),t}))}}}])},88:function(e,t,u){"use strict";u.r(t);u(2),u(7),u(46),u(83),u(47),u(217),u(220),u(45);angular.module("graphdb.framework.explore",["ngRoute","toastr","xeditable","angucomplete-alt-onto","graphdb.framework.explore.services","graphdb.framework.explore.controllers","graphdb.framework.explore.directives","graphdb.framework.core.directives.fittext"])}}]);
4
- //# sourceMappingURL=19.6a237d6c25383747735a.bundle.js.map
3
+ !function(e,t){"use strict";!function(e){e.module("angucomplete-alt-onto",[]).directive("angucompleteAltOnto",["$q","$parse","$http","$sce","$timeout","$templateCache","$interpolate","$rootScope",function(e,t,u,n,r,a,l,i){var o=40,F=39,s=38,c=37,d=27,g=13,p=9,f=3,h=524288,D=500,m=200,w="autocomplete-required",v="Searching...",b="No results found";function x(t,a,l,i){var x,y,S,C,$,I,R=a.find("input"),E=f,M=null,A=w,L=null,j=null,O=a[0].querySelector(".angucomplete-dropdown"),B=!1,X=null;function U(e,u){e&&("object"==typeof e?(t.uri=_(e),q({originalObject:e})):"string"==typeof e&&e.length>0?t.uri=e:console&&console.error&&console.error("Tried to set "+(u?"initial":"")+" value of angucomplete to",e,"which is an invalid value"),N(!0))}function k(e){X=null,t.hideResults(e),document.body.removeEventListener("click",k)}function z(e){return e.which?e.which:e.keyCode}function q(e){"function"==typeof t.selectedObject?t.selectedObject(e):t.selectedObject=e,N(!!e)}function _(e){return t.titleField.split(",").map((function(t){return H(e,t)})).join(" ")}function H(e,t){var u,n;if(t){u=t.split("."),n=e;for(var r=0;r<u.length;r++)n=n[u[r]]}else n=e;return n}function T(e,u){var r,a,l;if(l=new RegExp(u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i"),e)return e.match&&e.replace||(e=e.toString()),r=(a=e.match(l))?e.replace(l,'<span class="'+t.matchClass+'">'+a[0]+"</span>"):e,n.trustAsHtml(r)}function N(e){t.notEmpty=e,L=t.uri,t.fieldRequired&&i&&t.inputName&&i[t.inputName].$setValidity(A,e)}function V(e){!t.overrideSuggestions||t.selectedObject&&t.selectedObject.originalObject===t.uri||(e&&e.preventDefault(),r.cancel(M),K(),q({originalObject:t.uri}),t.clearSelected&&(t.uri=null),ee())}function W(){return a[0].querySelectorAll(".angucomplete-row")[t.currentIndex]}function Y(e){O.scrollTop=O.scrollTop+e}function J(){var e=t.results[t.currentIndex];if(t.matchClass){var u=_(e.originalObject);u=u.replace(/<b>|<\/b>/g,""),R.val(u)}else R.val(e.title)}function P(e){return function(u,n,r,a){n||r||a||!u.data||(u=u.data),t.searching=!1,ne(H(y(u),t.remoteUrlDataField),e)}}function G(e,u,n,r){0!==u&&-1!==u&&(u||n||r||(u=e.status),t.remoteUrlErrorCallback?t.remoteUrlErrorCallback(e,u,n,r):console&&console.error&&console.error("http error"))}function K(){j&&j.resolve()}function Q(n){var r={},a=t.remoteUrl+encodeuriComponent(n);t.remoteUrlRequestFormatter&&(r={params:t.remoteUrlRequestFormatter(n)},a=t.remoteUrl),t.remoteUrlRequestWithCredentials&&(r.withCredentials=!0),K(),j=e.defer(),r.timeout=j.promise,u.get(a,r).success(P(n)).error(G)}function Z(u){K(),j=e.defer(),t.remoteApiHandler(u,j.promise).then(P(u)).catch(G)}function ee(){t.showDropdown=!1,t.results=[],O&&(O.scrollTop=0)}function te(){t.showDropdown=C,t.currentIndex=t.focusFirst?0:-1,t.results=[]}function ue(e){!e||e.length<E||(t.localData?t.$apply((function(){var u;u=void 0!==t.localSearch()?t.localSearch()(e):function(e){var u,n,r,a,l=t.searchFields.split(","),i=[];for(void 0!==t.parseInput()&&(e=t.parseInput()(e)),u=0;u<t.localData.length;u++){for(n=!1,r=0;r<l.length;r++)a=H(t.localData[u],l[r])||"",n=n||a.toString().toLowerCase().indexOf(e.toString().toLowerCase())>=0;n&&(i[i.length]=t.localData[u])}return i}(e),t.searching=!1,ne(u,e)})):t.remoteApiHandler?Z(e):Q(e))}function ne(e,u){var n,r,a,l,i,o;if(e&&e.length>0)for(t.results=[],n=0;n<e.length;n++)t.titleField&&""!==t.titleField&&(l=i=_(e[n])),r="",t.descriptionField&&(r=o=H(e[n],t.descriptionField)),a="",t.imageField&&(a=H(e[n],t.imageField)),t.matchClass&&(i=T(l,u),o=T(r,u)),t.results[t.results.length]={title:i,description:o,image:a,originalObject:e[n]};else t.results=[];t.autoMatch&&1===t.results.length&&function(e,u,n){if(!n)return!1;for(var r in u)if(u[r].toLowerCase()===n.toLowerCase())return t.selectResult(e),!0;return!1}(t.results[0],{title:l,desc:r||""},t.uri)?t.showDropdown=!1:0!==t.results.length||$?t.showDropdown=!0:t.showDropdown=!1}function re(){t.localData?ne(t.localData,""):t.remoteApiHandler?Z(""):Q("")}a.on("mousedown",(function(e){e.target.id?(X=e.target.id)===t.id+"_dropdown"&&document.body.addEventListener("click",k):X=e.target.className})),t.currentIndex=t.focusFirst?0:null,t.searching=!1,S=t.$watch("initialValue",(function(e){e&&(S(),U(e,!0))})),t.$watch("fieldRequired",(function(e,u){e!==u&&(e?L&&-1!==t.currentIndex?N(!0):N(!1):i[t.inputName].$setValidity(A,!0))})),t.$on("angucomplete-alt:clearInput",(function(e,u){u&&u!==t.id||(t.uri=null,q(),N(!1),ee())})),t.$on("angucomplete-alt:changeInput",(function(e,u,n){u&&u===t.id&&U(n)})),t.onFocusHandler=function(){t.focusIn&&t.focusIn(),0!==E||t.uri&&0!==t.uri.length||(t.currentIndex=t.focusFirst?0:t.currentIndex,t.showDropdown=!0,re())},t.hideResults=function(){X&&(X===t.id+"_dropdown"||X.indexOf("angucomplete")>=0)?X=null:(x=r((function(){ee(),t.$apply((function(){t.uri&&t.uri.length>0&&R.val(t.uri)}))}),m),K(),t.focusOut&&t.focusOut(),t.overrideSuggestions&&t.uri&&t.uri.length>0&&-1===t.currentIndex&&V())},t.resetHideResults=function(){x&&r.cancel(x)},t.hoverRow=function(e){t.currentIndex=e},t.selectResult=function(e){t.matchClass&&(e.title=_(e.originalObject),"string"==typeof e.title&&(e.title=e.title.replace(/<b>|<\/b>/g,"")),e.description=H(e.originalObject,t.descriptionField)),t.clearSelected?t.uri=null:t.uri=e.title,q(e),ee()},t.inputChangeHandler=function(e){return e.length<E?(K(),ee()):0===e.length&&0===E&&(t.searching=!1,re()),t.inputChanged&&(e=t.inputChanged(e)),e},t.fieldRequiredClass&&""!==t.fieldRequiredClass&&(A=t.fieldRequiredClass),t.minlength&&""!==t.minlength&&(E=parseInt(t.minlength,10)),t.pause||(t.pause=D),t.clearSelected||(t.clearSelected=!1),t.overrideSuggestions||(t.overrideSuggestions=!1),t.fieldRequired&&i&&(t.initialValue?N(!0):N(!1)),t.inputType=l.type?l.type:"text",t.textSearching=l.textSearching?l.textSearching:v,t.textNoResults=l.textNoResults?l.textNoResults:b,C="false"!==t.textSearching,$="false"!==t.textNoResults,t.maxlength=l.maxlength?l.maxlength:h,R.on("keydown",(function(e){var u=z(e),n=null,r=null;u===g&&t.results?(t.currentIndex>=0&&t.currentIndex<t.results.length?(e.preventDefault(),t.selectResult(t.results[t.currentIndex])):(V(e),ee()),t.$apply()):u===o&&t.results?(e.preventDefault(),t.currentIndex+1<t.results.length&&t.showDropdown&&(t.$apply((function(){t.currentIndex++,J()})),B&&(n=W(),O.getBoundingClientRect().top+parseInt(getComputedStyle(O).maxHeight,10)<n.getBoundingClientRect().bottom&&Y(function(e){var t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,10)+parseInt(t.marginBottom,10)}(n))))):u===s&&t.results?(e.preventDefault(),t.currentIndex>=1?(t.$apply((function(){t.currentIndex--,J()})),B&&(r=W().getBoundingClientRect().top-(O.getBoundingClientRect().top+parseInt(getComputedStyle(O).paddingTop,10)))<0&&Y(r-1)):0===t.currentIndex&&t.$apply((function(){t.currentIndex=-1,R.val(t.uri)}))):u===p?t.results&&t.results.length>0&&t.showDropdown?-1===t.currentIndex&&t.overrideSuggestions?V():(-1===t.currentIndex&&(t.currentIndex=0),t.selectResult(t.results[t.currentIndex]),t.$digest()):t.uri&&t.uri.length>0&&V():u===d&&e.preventDefault()})),R.on("keyup",(function(e){var u=z(e);if(u!==c&&u!==F)if(u===s||u===g)e.preventDefault();else if(u===o)e.preventDefault(),!t.showDropdown&&t.uri&&t.uri.length>=E&&(te(),t.searching=!0,ue(t.uri));else if(u===d)ee(),t.$apply((function(){R.val(t.uri)}));else{if(0===E&&!t.uri)return;t.uri&&""!==t.uri?t.uri.length>=E&&(te(),M&&r.cancel(M),t.searching=!0,M=r((function(){ue(t.uri)}),t.pause)):t.showDropdown=!1,L&&L!==t.uri&&!t.clearSelected&&t.$apply((function(){q()}))}})),I="remoteUrlResponseFormatter",y=function(e){return t[I]?t[I](e):e},r((function(){var e=getComputedStyle(O);B=e.maxHeight&&"auto"===e.overflowY}))}return(a.put("/angucomplete-alt/index.html",'<div class="angucomplete-holder" ng-class="{\'angucomplete-dropdown-visible\': showDropdown}"> <input id="{{id}}_value" name="{{inputName}}" tabindex="{{fieldTabindex}}" ng-class="{\'angucomplete-input-not-empty\': notEmpty}" ng-model="uri" ng-disabled="disableInput" type="{{inputType}}" placeholder="{{placeholder}}" maxlength="{{maxlength}}" ng-focus="onFocusHandler()" class="{{inputClass}}" ng-focus="resetHideResults()" ng-blur="hideResults($event)" autocapitalize="off" autocorrect="off" autocomplete="off" ng-change="inputChangeHandler(uri)" style="overflow: hidden; padding-right: .5em;"/> <div id="{{id}}_dropdown" class="angucomplete-dropdown" ng-show="disableSuggestions && showDropdown"> <div class="angucomplete-searching" ng-show="searching" ng-bind="textSearching"></div> <div class="angucomplete-searching" ng-show="!searching && (!results || results.length == 0)" ng-bind="textNoResults"></div> <div class="angucomplete-row" ng-repeat="result in results" ng-click="selectResult(result)" ng-mouseenter="hoverRow($index)" ng-class="{\'angucomplete-selected-row\': $index == currentIndex}"> <div ng-if="imageField" class="angucomplete-image-holder"> <img ng-if="result.image && result.image != \'\'" ng-src="{{result.image}}" class="angucomplete-image"/> <div ng-if="!result.image && result.image != \'\'" class="angucomplete-image-default"></div> </div> <div class="angucomplete-title" ng-if="matchClass" ng-bind-html="result.title"></div> <div class="angucomplete-title" ng-if="!matchClass">{{ result.title }}</div> <div ng-if="matchClass && result.description && result.description != \'\'" class="angucomplete-description" ng-bind-html="result.description"></div> <div ng-if="!matchClass && result.description && result.description != \'\'" class="angucomplete-description">{{result.description}}</div> </div> </div></div>'),{restrict:"EA",require:"^?form",scope:{selectedObject:"=",disableInput:"=",disableSuggestions:"=",initialValue:"=",localData:"=",localSearch:"&",remoteUrlRequestFormatter:"=",remoteUrlRequestWithCredentials:"@",remoteUrlResponseFormatter:"=",remoteUrlErrorCallback:"=",remoteApiHandler:"=",id:"@",type:"@",placeholder:"@",remoteUrl:"@",remoteUrlDataField:"@",titleField:"@",descriptionField:"@",imageField:"@",inputClass:"@",pause:"@",searchFields:"@",minlength:"@",matchClass:"@",clearSelected:"@",overrideSuggestions:"@",fieldRequired:"=",fieldRequiredClass:"@",inputChanged:"=",autoMatch:"@",focusOut:"&",focusIn:"&",fieldTabindex:"@",inputName:"@",focusFirst:"@",parseInput:"&"},templateUrl:function(e,t){return t.templateUrl||"/angucomplete-alt/index.html"},compile:function(e){var t=l.startSymbol(),u=l.endSymbol();if("{{"!==t||"}}"!==u){var n=e.html().replace(/\{\{/g,t).replace(/\}\}/g,u);e.html(n)}return x}})}])}(window.angular)}()},30:function(e,t){let u;angular.module("graphdb.framework.utils.uriutils",[]).factory("UriUtils",(function(){return{isValidIri:function(e){return void 0!==e&&!!e.match(u)},validateRdfUri:function(e){const t=e.indexOf("<")>=0&&e.indexOf(">")>=0,u=-1===e.indexOf("<")&&-1===e.lastIndexOf(">"),n=/^<?(http|urn).*>?/.test(e)&&(t||u);let r=!1;if(n)if(e.indexOf("http")>=0){const t=e.indexOf("//");r=t>4&&e.substring(t+2).length>0}else e.indexOf("urn")>=0&&(r=e.substring(4).length>0);return n&&r}}}));try{u=new RegExp("^[a-z](?:[-a-z0-9\\+\\.])*:(?:\\/\\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}!\\$&'\\(\\)\\*\\+,;=:])*@)?(?:\\[(?:(?:(?:[0-9a-f]{1,4}:){6}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|::(?:[0-9a-f]{1,4}:){5}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[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?:\\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}|(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}!\\$&'\\(\\)\\*\\+,;=@])*)(?::[0-9]*)?(?:\\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@]))*)*|\\/(?:(?:(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@]))+)(?:\\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@]))*)*)?|(?:(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@]))+)(?:\\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@]))*)*|(?!(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@])))(?:\\?(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@])|[\\u{E000}-\\u{F8FF}\\u{F0000}-\\u{FFFFD}\\u{100000}-\\u{10FFFD}\\/\\?])*)?(?:#(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\u{A0}-\\u{D7FF}\\u{F900}-\\u{FDCF}\\u{FDF0}-\\u{FFEF}\\u{10000}-\\u{1FFFD}\\u{20000}-\\u{2FFFD}\\u{30000}-\\u{3FFFD}\\u{40000}-\\u{4FFFD}\\u{50000}-\\u{5FFFD}\\u{60000}-\\u{6FFFD}\\u{70000}-\\u{7FFFD}\\u{80000}-\\u{8FFFD}\\u{90000}-\\u{9FFFD}\\u{A0000}-\\u{AFFFD}\\u{B0000}-\\u{BFFFD}\\u{C0000}-\\u{CFFFD}\\u{D0000}-\\u{DFFFD}\\u{E1000}-\\u{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@])|[\\/\\?])*)?$","ui")}catch(e){u=new RegExp("^[a-z](?:[-a-z0-9\\+\\.])*:","i")}},45:function(e,t){function u(e){return{restrict:"A",scope:{min:"=",max:"="},link:function(t,u,n){const r={debounce:_.debounce,delay:100,loadDelay:10,compressor:1,min:n.fitTextMin||"inherit",max:n.fitTextMax||"inherit",calcSize:10,lines:1},a=u.parent(),l=u[0],i=l.style,o=window.getComputedStyle(u[0],null),F=u.children().length||r.lines,s="inherit"===r.min?o["font-size"]:r.min,c="inherit"===r.max?o["font-size"]:r.max,d=o["line-height"],g=o.display;let p;function f(){const e=r.calcSize*F/l.offsetWidth/F;return Math.max(Math.min(function(e){const t=parseFloat(getComputedStyle(a[0]).paddingLeft),u=parseFloat(getComputedStyle(a[0]).paddingRight);return(a[0].offsetWidth-(t+u))*e*r.compressor}(e),parseFloat(c)),parseFloat(s))}function h(){p&&e.cancel(p),p=e((function(){l.offsetHeight*l.offsetWidth!=0&&(i.fontSize=r.calcSize+"px",i.lineHeight="1",i.display="inline-block",i.fontSize=f()+"px",i.lineHeight=d,i.display=g)}),r.loadDelay)}t.$watch((function(){return[a[0].offsetWidth,u[0].offsetWidth].join("_")}),(function(){h()})),$(window).on("resize",r.debounce((function(){t.$apply(h)}),r.delay)),t.$on("$destroy",(function(){p&&e.cancel(p),$(window).off("resize")}))}}}angular.module("graphdb.framework.core.directives.fittext",[]).directive("fitText",u),u.$inject=["$timeout"]},46:function(e,t){function u(){return{transformToTrig:function(e){let t="";const u={};for(let t=0;t<e.length;t++){const n=e[t];if(void 0===n.context?n.context="":n.context=_.trim(n.context),angular.isUndefined(u[n.context])){const e=[];e.push(n),u[n.context]=e}else u[n.context].push(n)}const n=Object.keys(u);for(let e=0;e<n.length;e++){const r=n[e];t+=""===r?"\n{":"\n<"+r+"> {";const a=u[r];for(let e=0;e<a.length;e++){const u=a[e];t+="\n\t<"+u.subject+"> <"+u.predicate+"> ","uri"===u.object.type?t+="<"+u.object.value+"> .":t+='"""'+u.object.value+'"""'+(u.object.datatype?"^^<"+u.object.datatype+">":u.object.lang?"@"+u.object.lang:"")+" ."}t+="\n}"}return t},buildStatements:function(e,t){const u=[];if(!_.isEmpty(e.data)){const n=e.data[t],r=Object.keys(n);for(let e=0;e<r.length;e++){const a=r[e],l=n[a];for(let e=0;e<l.length;e++){const n=l[e];for(let e=0;e<n.graphs.length;e++){let r=n.graphs[e];"http://www.ontotext.com/explicit"===r&&(r=""),n.lang&&(n.datatype=""),n.datatype||(n.datatype=""),u.push({subject:t,predicate:a,object:{value:n.value,type:n.type,datatype:n.datatype,lang:n.lang},context:r})}}}}return u},getDatatypeOptions:function(){return[{value:"",label:"string"},{value:"http://www.w3.org/2001/XMLSchema#boolean",label:"boolean"},{value:"http://www.w3.org/2001/XMLSchema#decimal",label:"decimal"},{value:"http://www.w3.org/2001/XMLSchema#integer",label:"integer"},{value:"http://www.w3.org/2001/XMLSchema#double",label:"double"},{value:"http://www.w3.org/2001/XMLSchema#float",label:"float"},{value:"http://www.w3.org/2001/XMLSchema#date",label:"date"},{value:"http://www.w3.org/2001/XMLSchema#time",label:"time"},{value:"http://www.w3.org/2001/XMLSchema#dateTime",label:"date time"},{value:"http://www.w3.org/2001/XMLSchema#byte",label:"byte"},{value:"http://www.w3.org/2001/XMLSchema#short",label:"short"},{value:"http://www.w3.org/2001/XMLSchema#int",label:"int"},{value:"http://www.w3.org/2001/XMLSchema#long",label:"long"},{value:"http://www.w3.org/2001/XMLSchema#unsignedByte",label:"unsigned byte"},{value:"http://www.w3.org/2001/XMLSchema#unsignedShort",label:"unsigned short"},{value:"http://www.w3.org/2001/XMLSchema#unsignedInt",label:"unsigned int"},{value:"http://www.w3.org/2001/XMLSchema#unsignedLong",label:"unsigned long"},{value:"http://www.w3.org/2001/XMLSchema#positoveInteger",label:"positive integer"},{value:"http://www.w3.org/2001/XMLSchema#nonNegativeInteger",label:"non-negative integer"},{value:"http://www.w3.org/2001/XMLSchema#negativeInteger",label:"negative integer"},{value:"http://www.w3.org/2001/XMLSchema#nonPositiveInteger",label:"non-positive integer"},{value:"http://www.w3.org/2001/XMLSchema#gYear",label:"gYear"},{value:"http://www.w3.org/2001/XMLSchema#gMonth",label:"gMonth"},{value:"http://www.w3.org/2001/XMLSchema#gDay",label:"gDay"},{value:"http://www.w3.org/2001/XMLSchema#gYearMonth",label:"gYearMonth"},{value:"http://www.w3.org/2001/XMLSchema#gMonthDay",label:"gMonthDay"},{value:"http://www.w3.org/2001/XMLSchema#duration",label:"duration"},{value:"http://www.w3.org/2001/XMLSchema#hexBinary",label:"hex binary"},{value:"http://www.w3.org/2001/XMLSchema#base64Binary",label:"base64 binary"}]}}}angular.module("graphdb.framework.explore.services",[]).factory("StatementsService",u),u.$inject=[]},47:function(e,t,u){"use strict";u.r(t);u(30);angular.module("graphdb.framework.explore.directives",["graphdb.framework.utils.uriutils"]).directive("uri",["UriUtils",function(e){return{require:"ngModel",link:function(t,u,n,r){r.$parsers.unshift((function(t){if(!angular.isUndefined(t)&&t.length>0){const u=e.validateRdfUri(t);return r.$setValidity("searchStr",u),u?t:void 0}return r.$setValidity("searchStr",!0),t})),r.$formatters.unshift((function(t){return angular.isUndefined(t)||r.$setValidity("searchStr",e.validateRdfUri),t}))}}}])},88:function(e,t,u){"use strict";u.r(t);u(2),u(7),u(46),u(83),u(47),u(217),u(220),u(45);angular.module("graphdb.framework.explore",["ngRoute","toastr","xeditable","angucomplete-alt-onto","graphdb.framework.explore.services","graphdb.framework.explore.controllers","graphdb.framework.explore.directives","graphdb.framework.core.directives.fittext"])}}]);
4
+ //# sourceMappingURL=19.271aef502bad5f51c682.bundle.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///./src/js/lib/angucomplete-alt/angucomplete-alt-onto.min.js","webpack:///./src/js/angular/utils/uri-utils.js","webpack:///./src/js/angular/core/directives/fit-text.directive.js","webpack:///./src/js/angular/explore/statements.service.js","webpack:///./src/js/angular/explore/directives.js","webpack:///./src/js/angular/explore/app.js"],"names":["root","factory","angular","module","directive","$q","$parse","$http","$sce","$timeout","$templateCache","$interpolate","$rootScope","KEY_DW","KEY_RT","KEY_UP","KEY_LF","KEY_ES","KEY_EN","KEY_TAB","MIN_LENGTH","MAX_LENGTH","PAUSE","BLUR_TIMEOUT","REQUIRED_CLASS","TEXT_SEARCHING","TEXT_NORESULTS","link","scope","elem","attrs","ctrl","hideTimer","responseFormatter","unbindInitialValue","displaySearching","displayNoResults","fn","inputField","find","minlength","searchTimer","requiredClassName","validState","httpCanceller","dd","querySelector","isScrollOn","mousedownOn","handleInputChange","newval","initial","uri","extractTitle","callOrAssign","originalObject","length","console","error","handleRequired","clickoutHandlerForDropdown","event","hideResults","document","body","removeEventListener","ie8EventNormalizer","which","keyCode","value","selectedObject","data","titleField","split","map","field","extractValue","join","obj","key","keys","result","i","findMatchString","target","str","matches","re","RegExp","replace","match","toString","matchClass","trustAsHtml","valid","notEmpty","fieldRequired","inputName","$setValidity","handleOverrideSuggestions","overrideSuggestions","preventDefault","cancel","cancelHttpRequest","clearSelected","clearResults","dropdownRow","querySelectorAll","currentIndex","dropdownScrollTopTo","offset","scrollTop","updateInputField","current","results","extractedTitle","val","title","httpSuccessCallbackGen","responseData","status","headers","config","searching","processResults","remoteUrlDataField","httpErrorCallback","errorRes","remoteUrlErrorCallback","resolve","getRemoteResults","params","url","remoteUrl","encodeuriComponent","remoteUrlRequestFormatter","remoteUrlRequestWithCredentials","withCredentials","defer","timeout","promise","get","success","getRemoteResultsWithCustomHandler","remoteApiHandler","then","catch","showDropdown","initResults","focusFirst","searchTimerComplete","localData","$apply","localSearch","s","searchFields","parseInput","toLowerCase","indexOf","getLocalResults","description","image","text","formattedText","formattedDesc","descriptionField","imageField","autoMatch","selectResult","checkExactMatch","desc","showAll","on","id","addEventListener","className","$watch","oldval","$on","elementId","onFocusHandler","focusIn","focusOut","resetHideResults","hoverRow","index","inputChangeHandler","inputChanged","fieldRequiredClass","parseInt","pause","initialValue","inputType","type","textSearching","textNoResults","maxlength","row","rowTop","getBoundingClientRect","top","getComputedStyle","maxHeight","bottom","css","offsetHeight","marginTop","marginBottom","dropdownRowOffsetHeight","paddingTop","$digest","overflowY","put","restrict","require","disableInput","disableSuggestions","remoteUrlResponseFormatter","placeholder","inputClass","fieldTabindex","templateUrl","element","compile","tElement","startSym","startSymbol","endSym","endSymbol","interpolatedHtml","html","window","iriRegExp","isValidIri","iri","undefined","validateRdfUri","hasAngleBrackets","noAngleBrackets","lastIndexOf","validProtocol","test","validPath","schemaSlashesIdx","substring","e","fitTextDirective","min","max","_","debounce","fitTextMin","fitTextMax","parent","domElem","domElemStyle","style","computed","newlines","children","lines","minFontSize","maxFontSize","lineHeight","display","resizePromise","calculate","ratio","calcSize","offsetWidth","Math","paddingLeft","parseFloat","paddingRight","compressor","getMaxFontSize","resizer","fontSize","loadDelay","$","delay","off","$inject","StatementsService","transformToTrig","statements","contexts","statement","context","trim","isUndefined","cstatement","push","ckeys","Object","j","subject","predicate","object","datatype","lang","buildStatements","res","isEmpty","graph","predicates","objects","k","graphs","getDatatypeOptions","label","UriUtils","attr","ngModel","$parsers","unshift","isValidUri","$formatters"],"mappings":";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ACT3L,KAAM,SAAUC,EAAOC,EAAM2R,EAAMC,GAG/BA,EAAQC,SAASC,SAAQ,SAAUtP,GAC/B,IAAKnE,QAAQgS,YAAY7N,IAAUA,EAAMb,OAAS,EAAG,CACjD,MAAMoQ,EAAaL,EAAS3E,eAAevK,GAE3C,OADAoP,EAAQvN,aAAa,YAAa0N,GAC3BA,EAAavP,OAAQsK,EAG5B,OADA8E,EAAQvN,aAAa,aAAa,GAC3B7B,KAKfoP,EAAQI,YAAYF,SAAQ,SAAUtP,GAIlC,OAHKnE,QAAQgS,YAAY7N,IACrBoP,EAAQvN,aAAa,YAAaqN,EAAS3E,gBAExCvK,W,gCC5BvB,uDAoBAnE,QAAQC,OAAO,4BAXC,CACZ,UACA,SACA,YACA,wBACA,qCACA,wCACA,uCACA","file":"19.6a237d6c25383747735a.bundle.js","sourcesContent":["/*\n * angucomplete-alt\n * Autocomplete directive for AngularJS\n * This is a fork of Daryl Rowland's angucomplete with some extra features.\n * By Hidenari Nozaki\n */\n\n/*! Copyright (c) 2014 Hidenari Nozaki and contributors | Licensed under the MIT license */\n\n(function (root, factory) {\n 'use strict';\n// if (typeof module !== 'undefined' && module.exports) {\n// // CommonJS\n// module.exports = factory(require('angular'));\n// } else if (typeof define === 'function' && define.amd) {\n// // AMD\n// define(['angular'], factory);\n// } else {\n// // Global Variables\n factory(root.angular);\n// }\n}(window, function (angular) {\n 'use strict';\n\n angular.module('angucomplete-alt-onto', []).directive('angucompleteAltOnto', ['$q', '$parse', '$http', '$sce', '$timeout', '$templateCache', '$interpolate', '$rootScope', function ($q, $parse, $http, $sce, $timeout, $templateCache, $interpolate, $rootScope) {\n // keyboard events\n var KEY_DW = 40;\n var KEY_RT = 39;\n var KEY_UP = 38;\n var KEY_LF = 37;\n var KEY_ES = 27;\n var KEY_EN = 13;\n var KEY_TAB = 9;\n\n var MIN_LENGTH = 3;\n var MAX_LENGTH = 524288; // the default max length per the html maxlength attribute\n var PAUSE = 500;\n var BLUR_TIMEOUT = 200;\n\n // string constants\n var REQUIRED_CLASS = 'autocomplete-required';\n var TEXT_SEARCHING = 'Searching...';\n var TEXT_NORESULTS = 'No results found';\n var TEMPLATE_URL = '/angucomplete-alt/index.html';\n\n // Set the default template for this directive\n $templateCache.put(TEMPLATE_URL,\n '<div class=\"angucomplete-holder\" ng-class=\"{\\'angucomplete-dropdown-visible\\': showDropdown}\">' +\n ' <input id=\"{{id}}_value\" name=\"{{inputName}}\" tabindex=\"{{fieldTabindex}}\" ng-class=\"{\\'angucomplete-input-not-empty\\': notEmpty}\" ng-model=\"uri\" ng-disabled=\"disableInput\" type=\"{{inputType}}\" placeholder=\"{{placeholder}}\" maxlength=\"{{maxlength}}\" ng-focus=\"onFocusHandler()\" class=\"{{inputClass}}\" ng-focus=\"resetHideResults()\" ng-blur=\"hideResults($event)\" autocapitalize=\"off\" autocorrect=\"off\" autocomplete=\"off\" ng-change=\"inputChangeHandler(uri)\" style=\"overflow: hidden; padding-right: .5em;\"/>' +\n ' <div id=\"{{id}}_dropdown\" class=\"angucomplete-dropdown\" ng-show=\"disableSuggestions && showDropdown\">' +\n ' <div class=\"angucomplete-searching\" ng-show=\"searching\" ng-bind=\"textSearching\"></div>' +\n ' <div class=\"angucomplete-searching\" ng-show=\"!searching && (!results || results.length == 0)\" ng-bind=\"textNoResults\"></div>' +\n ' <div class=\"angucomplete-row\" ng-repeat=\"result in results\" ng-click=\"selectResult(result)\" ng-mouseenter=\"hoverRow($index)\" ng-class=\"{\\'angucomplete-selected-row\\': $index == currentIndex}\">' +\n ' <div ng-if=\"imageField\" class=\"angucomplete-image-holder\">' +\n ' <img ng-if=\"result.image && result.image != \\'\\'\" ng-src=\"{{result.image}}\" class=\"angucomplete-image\"/>' +\n ' <div ng-if=\"!result.image && result.image != \\'\\'\" class=\"angucomplete-image-default\"></div>' +\n ' </div>' +\n ' <div class=\"angucomplete-title\" ng-if=\"matchClass\" ng-bind-html=\"result.title\"></div>' +\n ' <div class=\"angucomplete-title\" ng-if=\"!matchClass\">{{ result.title }}</div>' +\n ' <div ng-if=\"matchClass && result.description && result.description != \\'\\'\" class=\"angucomplete-description\" ng-bind-html=\"result.description\"></div>' +\n ' <div ng-if=\"!matchClass && result.description && result.description != \\'\\'\" class=\"angucomplete-description\">{{result.description}}</div>' +\n ' </div>' +\n ' </div>' +\n '</div>'\n );\n\n function link(scope, elem, attrs, ctrl) {\n var inputField = elem.find('input');\n var minlength = MIN_LENGTH;\n var searchTimer = null;\n var hideTimer;\n var requiredClassName = REQUIRED_CLASS;\n var responseFormatter;\n var validState = null;\n var httpCanceller = null;\n var dd = elem[0].querySelector('.angucomplete-dropdown');\n var isScrollOn = false;\n var mousedownOn = null;\n var unbindInitialValue;\n var displaySearching;\n var displayNoResults;\n\n\n elem.on('mousedown', function(event) {\n if (event.target.id) {\n mousedownOn = event.target.id;\n if (mousedownOn === scope.id + '_dropdown') {\n document.body.addEventListener('click', clickoutHandlerForDropdown);\n }\n }\n else {\n mousedownOn = event.target.className;\n }\n });\n\n scope.currentIndex = scope.focusFirst ? 0 : null;\n scope.searching = false;\n unbindInitialValue = scope.$watch('initialValue', function(newval) {\n if (newval) {\n // remove scope listener\n unbindInitialValue();\n // change input\n handleInputChange(newval, true);\n }\n });\n\n scope.$watch('fieldRequired', function(newval, oldval) {\n if (newval !== oldval) {\n if (!newval) {\n ctrl[scope.inputName].$setValidity(requiredClassName, true);\n }\n else if (!validState || scope.currentIndex === -1) {\n handleRequired(false);\n }\n else {\n handleRequired(true);\n }\n }\n });\n\n scope.$on('angucomplete-alt:clearInput', function (event, elementId) {\n if (!elementId || elementId === scope.id) {\n scope.uri = null;\n callOrAssign();\n handleRequired(false);\n clearResults();\n }\n });\n\n scope.$on('angucomplete-alt:changeInput', function (event, elementId, newval) {\n if (!!elementId && elementId === scope.id) {\n handleInputChange(newval);\n }\n });\n\n function handleInputChange(newval, initial) {\n if (newval) {\n if (typeof newval === 'object') {\n scope.uri = extractTitle(newval);\n callOrAssign({originalObject: newval});\n } else if (typeof newval === 'string' && newval.length > 0) {\n scope.uri = newval;\n } else {\n if (console && console.error) {\n console.error('Tried to set ' + (!!initial ? 'initial' : '') + ' value of angucomplete to', newval, 'which is an invalid value');\n }\n }\n\n handleRequired(true);\n }\n }\n\n // #194 dropdown list not consistent in collapsing (bug).\n function clickoutHandlerForDropdown(event) {\n mousedownOn = null;\n scope.hideResults(event);\n document.body.removeEventListener('click', clickoutHandlerForDropdown);\n }\n\n // for IE8 quirkiness about event.which\n function ie8EventNormalizer(event) {\n return event.which ? event.which : event.keyCode;\n }\n\n function callOrAssign(value) {\n if (typeof scope.selectedObject === 'function') {\n scope.selectedObject(value);\n }\n else {\n scope.selectedObject = value;\n }\n\n if (value) {\n handleRequired(true);\n }\n else {\n handleRequired(false);\n }\n }\n\n function callFunctionOrIdentity(fn) {\n return function(data) {\n return scope[fn] ? scope[fn](data) : data;\n };\n }\n\n function setInputString(str) {\n callOrAssign({originalObject: str});\n\n if (scope.clearSelected) {\n scope.uri = null;\n }\n clearResults();\n }\n\n function extractTitle(data) {\n // split title fields and run extractValue for each and join with ' '\n return scope.titleField.split(',')\n .map(function(field) {\n return extractValue(data, field);\n })\n .join(' ');\n }\n\n function extractValue(obj, key) {\n var keys, result;\n if (key) {\n keys= key.split('.');\n result = obj;\n for (var i = 0; i < keys.length; i++) {\n result = result[keys[i]];\n }\n }\n else {\n result = obj;\n }\n\n return result;\n }\n\n function findMatchString(target, str) {\n var result, matches, re;\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions\n // Escape user input to be treated as a literal string within a regular expression\n re = new RegExp(str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'), 'i');\n if (!target) { return; }\n if (!target.match || !target.replace) { target = target.toString(); }\n matches = target.match(re);\n if (matches) {\n result = target.replace(re,\n '<span class=\"'+ scope.matchClass +'\">'+ matches[0] +'</span>');\n }\n else {\n result = target;\n }\n return $sce.trustAsHtml(result);\n }\n\n function handleRequired(valid) {\n scope.notEmpty = valid;\n validState = scope.uri;\n if (scope.fieldRequired && ctrl && scope.inputName) {\n ctrl[scope.inputName].$setValidity(requiredClassName, valid);\n }\n }\n\n function keyupHandler(event) {\n var which = ie8EventNormalizer(event);\n if (which === KEY_LF || which === KEY_RT) {\n // do nothing\n return;\n }\n\n if (which === KEY_UP || which === KEY_EN) {\n event.preventDefault();\n }\n else if (which === KEY_DW) {\n event.preventDefault();\n if (!scope.showDropdown && scope.uri && scope.uri.length >= minlength) {\n initResults();\n scope.searching = true;\n searchTimerComplete(scope.uri);\n }\n }\n else if (which === KEY_ES) {\n clearResults();\n scope.$apply(function() {\n inputField.val(scope.uri);\n });\n }\n else {\n if (minlength === 0 && !scope.uri) {\n return;\n }\n\n if (!scope.uri || scope.uri === '') {\n scope.showDropdown = false;\n } else if (scope.uri.length >= minlength) {\n initResults();\n\n if (searchTimer) {\n $timeout.cancel(searchTimer);\n }\n\n scope.searching = true;\n\n searchTimer = $timeout(function() {\n searchTimerComplete(scope.uri);\n }, scope.pause);\n }\n\n if (validState && validState !== scope.uri && !scope.clearSelected) {\n scope.$apply(function() {\n callOrAssign();\n });\n }\n }\n }\n\n function handleOverrideSuggestions(event) {\n if (scope.overrideSuggestions &&\n !(scope.selectedObject && scope.selectedObject.originalObject === scope.uri)) {\n if (event) {\n event.preventDefault();\n }\n\n // cancel search timer\n $timeout.cancel(searchTimer);\n // cancel http request\n cancelHttpRequest();\n\n setInputString(scope.uri);\n }\n }\n\n function dropdownRowOffsetHeight(row) {\n var css = getComputedStyle(row);\n return row.offsetHeight +\n parseInt(css.marginTop, 10) + parseInt(css.marginBottom, 10);\n }\n\n function dropdownHeight() {\n return dd.getBoundingClientRect().top +\n parseInt(getComputedStyle(dd).maxHeight, 10);\n }\n\n function dropdownRow() {\n return elem[0].querySelectorAll('.angucomplete-row')[scope.currentIndex];\n }\n\n function dropdownRowTop() {\n return dropdownRow().getBoundingClientRect().top -\n (dd.getBoundingClientRect().top +\n parseInt(getComputedStyle(dd).paddingTop, 10));\n }\n\n function dropdownScrollTopTo(offset) {\n dd.scrollTop = dd.scrollTop + offset;\n }\n\n function updateInputField(){\n var current = scope.results[scope.currentIndex];\n if (scope.matchClass) {\n var extractedTitle = extractTitle(current.originalObject);\n extractedTitle = extractedTitle.replace(/<b>|<\\/b>/g, \"\");\n inputField.val(extractedTitle);\n }\n else {\n inputField.val(current.title);\n }\n }\n\n function keydownHandler(event) {\n var which = ie8EventNormalizer(event);\n var row = null;\n var rowTop = null;\n\n if (which === KEY_EN && scope.results) {\n if (scope.currentIndex >= 0 && scope.currentIndex < scope.results.length) {\n event.preventDefault();\n scope.selectResult(scope.results[scope.currentIndex]);\n } else {\n handleOverrideSuggestions(event);\n clearResults();\n }\n scope.$apply();\n } else if (which === KEY_DW && scope.results) {\n event.preventDefault();\n if ((scope.currentIndex + 1) < scope.results.length && scope.showDropdown) {\n scope.$apply(function() {\n scope.currentIndex ++;\n updateInputField();\n });\n\n if (isScrollOn) {\n row = dropdownRow();\n if (dropdownHeight() < row.getBoundingClientRect().bottom) {\n dropdownScrollTopTo(dropdownRowOffsetHeight(row));\n }\n }\n }\n } else if (which === KEY_UP && scope.results) {\n event.preventDefault();\n if (scope.currentIndex >= 1) {\n scope.$apply(function() {\n scope.currentIndex --;\n updateInputField();\n });\n\n if (isScrollOn) {\n rowTop = dropdownRowTop();\n if (rowTop < 0) {\n dropdownScrollTopTo(rowTop - 1);\n }\n }\n }\n else if (scope.currentIndex === 0) {\n scope.$apply(function() {\n scope.currentIndex = -1;\n inputField.val(scope.uri);\n });\n }\n } else if (which === KEY_TAB) {\n if (scope.results && scope.results.length > 0 && scope.showDropdown) {\n if (scope.currentIndex === -1 && scope.overrideSuggestions) {\n // intentionally not sending event so that it does not\n // prevent default tab behavior\n handleOverrideSuggestions();\n }\n else {\n if (scope.currentIndex === -1) {\n scope.currentIndex = 0;\n }\n scope.selectResult(scope.results[scope.currentIndex]);\n scope.$digest();\n }\n }\n else {\n // no results\n // intentionally not sending event so that it does not\n // prevent default tab behavior\n if (scope.uri && scope.uri.length > 0) {\n handleOverrideSuggestions();\n }\n }\n } else if (which === KEY_ES) {\n // This is very specific to IE10/11 #272\n // without this, IE clears the input text\n event.preventDefault();\n }\n }\n\n function httpSuccessCallbackGen(str) {\n return function(responseData, status, headers, config) {\n // normalize return obejct from promise\n if (!status && !headers && !config && responseData.data) {\n responseData = responseData.data;\n }\n scope.searching = false;\n processResults(extractValue(responseFormatter(responseData), scope.remoteUrlDataField), str);\n };\n }\n\n function httpErrorCallback(errorRes, status, headers, config) {\n // cancelled/aborted\n if (status === 0 || status === -1) { return; }\n\n // normalize return obejct from promise\n if (!status && !headers && !config) {\n status = errorRes.status;\n }\n if (scope.remoteUrlErrorCallback) {\n scope.remoteUrlErrorCallback(errorRes, status, headers, config);\n }\n else {\n if (console && console.error) {\n console.error('http error');\n }\n }\n }\n\n function cancelHttpRequest() {\n if (httpCanceller) {\n httpCanceller.resolve();\n }\n }\n\n function getRemoteResults(str) {\n var params = {},\n url = scope.remoteUrl + encodeuriComponent(str);\n if (scope.remoteUrlRequestFormatter) {\n params = {params: scope.remoteUrlRequestFormatter(str)};\n url = scope.remoteUrl;\n }\n if (!!scope.remoteUrlRequestWithCredentials) {\n params.withCredentials = true;\n }\n cancelHttpRequest();\n httpCanceller = $q.defer();\n params.timeout = httpCanceller.promise;\n $http.get(url, params)\n .success(httpSuccessCallbackGen(str))\n .error(httpErrorCallback);\n }\n\n function getRemoteResultsWithCustomHandler(str) {\n cancelHttpRequest();\n\n httpCanceller = $q.defer();\n\n scope.remoteApiHandler(str, httpCanceller.promise)\n .then(httpSuccessCallbackGen(str))\n .catch(httpErrorCallback);\n\n /* IE8 compatible\n scope.remoteApiHandler(str, httpCanceller.promise)\n ['then'](httpSuccessCallbackGen(str))\n ['catch'](httpErrorCallback);\n */\n }\n\n function clearResults() {\n scope.showDropdown = false;\n scope.results = [];\n if (dd) {\n dd.scrollTop = 0;\n }\n }\n\n function initResults() {\n scope.showDropdown = displaySearching;\n scope.currentIndex = scope.focusFirst ? 0 : -1;\n scope.results = [];\n }\n\n function getLocalResults(str) {\n var i, match, s, value,\n searchFields = scope.searchFields.split(','),\n matches = [];\n if (typeof scope.parseInput() !== 'undefined') {\n str = scope.parseInput()(str);\n }\n for (i = 0; i < scope.localData.length; i++) {\n match = false;\n\n for (s = 0; s < searchFields.length; s++) {\n value = extractValue(scope.localData[i], searchFields[s]) || '';\n match = match || (value.toString().toLowerCase().indexOf(str.toString().toLowerCase()) >= 0);\n }\n\n if (match) {\n matches[matches.length] = scope.localData[i];\n }\n }\n return matches;\n }\n\n function checkExactMatch(result, obj, str){\n if (!str) { return false; }\n for(var key in obj){\n if(obj[key].toLowerCase() === str.toLowerCase()){\n scope.selectResult(result);\n return true;\n }\n }\n return false;\n }\n\n function searchTimerComplete(str) {\n // Begin the search\n if (!str || str.length < minlength) {\n return;\n }\n if (scope.localData) {\n scope.$apply(function() {\n var matches;\n if (typeof scope.localSearch() !== 'undefined') {\n matches = scope.localSearch()(str);\n } else {\n matches = getLocalResults(str);\n }\n scope.searching = false;\n processResults(matches, str);\n });\n }\n else if (scope.remoteApiHandler) {\n getRemoteResultsWithCustomHandler(str);\n } else {\n getRemoteResults(str);\n }\n }\n\n function processResults(responseData, str) {\n var i, description, image, text, formattedText, formattedDesc;\n\n if (responseData && responseData.length > 0) {\n scope.results = [];\n\n for (i = 0; i < responseData.length; i++) {\n if (scope.titleField && scope.titleField !== '') {\n text = formattedText = extractTitle(responseData[i]);\n }\n\n description = '';\n if (scope.descriptionField) {\n description = formattedDesc = extractValue(responseData[i], scope.descriptionField);\n }\n\n image = '';\n if (scope.imageField) {\n image = extractValue(responseData[i], scope.imageField);\n }\n\n if (scope.matchClass) {\n formattedText = findMatchString(text, str);\n formattedDesc = findMatchString(description, str);\n }\n\n scope.results[scope.results.length] = {\n title: formattedText,\n description: formattedDesc,\n image: image,\n originalObject: responseData[i]\n };\n }\n\n } else {\n scope.results = [];\n }\n\n if (scope.autoMatch && scope.results.length === 1 &&\n checkExactMatch(scope.results[0],\n {title: text, desc: description || ''}, scope.uri)) {\n scope.showDropdown = false;\n } else if (scope.results.length === 0 && !displayNoResults) {\n scope.showDropdown = false;\n } else {\n scope.showDropdown = true;\n }\n }\n\n function showAll() {\n if (scope.localData) {\n processResults(scope.localData, '');\n }\n else if (scope.remoteApiHandler) {\n getRemoteResultsWithCustomHandler('');\n }\n else {\n getRemoteResults('');\n }\n }\n\n scope.onFocusHandler = function() {\n if (scope.focusIn) {\n scope.focusIn();\n }\n if (minlength === 0 && (!scope.uri || scope.uri.length === 0)) {\n scope.currentIndex = scope.focusFirst ? 0 : scope.currentIndex;\n scope.showDropdown = true;\n showAll();\n }\n };\n\n scope.hideResults = function() {\n if (mousedownOn &&\n (mousedownOn === scope.id + '_dropdown' ||\n mousedownOn.indexOf('angucomplete') >= 0)) {\n mousedownOn = null;\n }\n else {\n hideTimer = $timeout(function() {\n clearResults();\n scope.$apply(function() {\n if (scope.uri && scope.uri.length > 0) {\n inputField.val(scope.uri);\n }\n });\n }, BLUR_TIMEOUT);\n cancelHttpRequest();\n\n if (scope.focusOut) {\n scope.focusOut();\n }\n\n if (scope.overrideSuggestions) {\n if (scope.uri && scope.uri.length > 0 && scope.currentIndex === -1) {\n handleOverrideSuggestions();\n }\n }\n }\n };\n\n scope.resetHideResults = function() {\n if (hideTimer) {\n $timeout.cancel(hideTimer);\n }\n };\n\n scope.hoverRow = function(index) {\n scope.currentIndex = index;\n };\n\n scope.selectResult = function(result) {\n // Restore original values\n if (scope.matchClass) {\n result.title = extractTitle(result.originalObject);\n if (typeof result.title === \"string\") {\n result.title = result.title.replace(/<b>|<\\/b>/g, \"\");\n }\n result.description = extractValue(result.originalObject, scope.descriptionField);\n }\n\n if (scope.clearSelected) {\n scope.uri = null;\n }\n else {\n scope.uri = result.title;\n }\n callOrAssign(result);\n clearResults();\n };\n\n scope.inputChangeHandler = function(str) {\n if (str.length < minlength) {\n cancelHttpRequest();\n clearResults();\n }\n else if (str.length === 0 && minlength === 0) {\n scope.searching = false;\n showAll();\n }\n\n if (scope.inputChanged) {\n str = scope.inputChanged(str);\n }\n return str;\n };\n\n // check required\n if (scope.fieldRequiredClass && scope.fieldRequiredClass !== '') {\n requiredClassName = scope.fieldRequiredClass;\n }\n\n // check min length\n if (scope.minlength && scope.minlength !== '') {\n minlength = parseInt(scope.minlength, 10);\n }\n\n // check pause time\n if (!scope.pause) {\n scope.pause = PAUSE;\n }\n\n // check clearSelected\n if (!scope.clearSelected) {\n scope.clearSelected = false;\n }\n\n // check override suggestions\n if (!scope.overrideSuggestions) {\n scope.overrideSuggestions = false;\n }\n\n // check required field\n if (scope.fieldRequired && ctrl) {\n // check initial value, if given, set validitity to true\n if (scope.initialValue) {\n handleRequired(true);\n }\n else {\n handleRequired(false);\n }\n }\n\n scope.inputType = attrs.type ? attrs.type : 'text';\n\n // set strings for \"Searching...\" and \"No results\"\n scope.textSearching = attrs.textSearching ? attrs.textSearching : TEXT_SEARCHING;\n scope.textNoResults = attrs.textNoResults ? attrs.textNoResults : TEXT_NORESULTS;\n displaySearching = scope.textSearching === 'false' ? false : true;\n displayNoResults = scope.textNoResults === 'false' ? false : true;\n\n // set max length (default to maxlength deault from html\n scope.maxlength = attrs.maxlength ? attrs.maxlength : MAX_LENGTH;\n\n // register events\n inputField.on('keydown', keydownHandler);\n inputField.on('keyup', keyupHandler);\n\n // set response formatter\n responseFormatter = callFunctionOrIdentity('remoteUrlResponseFormatter');\n\n // set isScrollOn\n $timeout(function() {\n var css = getComputedStyle(dd);\n isScrollOn = css.maxHeight && css.overflowY === 'auto';\n });\n }\n\n return {\n restrict: 'EA',\n require: '^?form',\n scope: {\n selectedObject: '=',\n disableInput: '=',\n disableSuggestions: '=',\n initialValue: '=',\n localData: '=',\n localSearch: '&',\n remoteUrlRequestFormatter: '=',\n remoteUrlRequestWithCredentials: '@',\n remoteUrlResponseFormatter: '=',\n remoteUrlErrorCallback: '=',\n remoteApiHandler: '=',\n id: '@',\n type: '@',\n placeholder: '@',\n remoteUrl: '@',\n remoteUrlDataField: '@',\n titleField: '@',\n descriptionField: '@',\n imageField: '@',\n inputClass: '@',\n pause: '@',\n searchFields: '@',\n minlength: '@',\n matchClass: '@',\n clearSelected: '@',\n overrideSuggestions: '@',\n fieldRequired: '=',\n fieldRequiredClass: '@',\n inputChanged: '=',\n autoMatch: '@',\n focusOut: '&',\n focusIn: '&',\n fieldTabindex: '@',\n inputName: '@',\n focusFirst: '@',\n parseInput: '&'\n },\n templateUrl: function(element, attrs) {\n return attrs.templateUrl || TEMPLATE_URL;\n },\n compile: function(tElement) {\n var startSym = $interpolate.startSymbol();\n var endSym = $interpolate.endSymbol();\n if (!(startSym === '{{' && endSym === '}}')) {\n var interpolatedHtml = tElement.html()\n .replace(/\\{\\{/g, startSym)\n .replace(/\\}\\}/g, endSym);\n tElement.html(interpolatedHtml);\n }\n return link;\n }\n };\n }]);\n\n}));","angular\n .module('graphdb.framework.utils.uriutils', [])\n .factory('UriUtils', UriUtils);\n\nlet iriRegExp;\ntry {\n // Real validation but it requires a relatively new browser\n iriRegExp = new RegExp(\"^[a-z](?:[-a-z0-9\\\\+\\\\.])*:(?:\\\\/\\\\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\\\._~\\\\u{A0}-\\\\u{D7FF}\\\\u{F900}-\\\\u{FDCF}\\\\u{FDF0}-\\\\u{FFEF}\\\\u{10000}-\\\\u{1FFFD}\\\\u{20000}-\\\\u{2FFFD}\\\\u{30000}-\\\\u{3FFFD}\\\\u{40000}-\\\\u{4FFFD}\\\\u{50000}-\\\\u{5FFFD}\\\\u{60000}-\\\\u{6FFFD}\\\\u{70000}-\\\\u{7FFFD}\\\\u{80000}-\\\\u{8FFFD}\\\\u{90000}-\\\\u{9FFFD}\\\\u{A0000}-\\\\u{AFFFD}\\\\u{B0000}-\\\\u{BFFFD}\\\\u{C0000}-\\\\u{CFFFD}\\\\u{D0000}-\\\\u{DFFFD}\\\\u{E1000}-\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\\u{B0000}-\\\\u{BFFFD}\\\\u{C0000}-\\\\u{CFFFD}\\\\u{D0000}-\\\\u{DFFFD}\\\\u{E1000}-\\\\u{EFFFD}!\\\\$&'\\\\(\\\\)\\\\*\\\\+,;=:@])|[\\\\u{E000}-\\\\u{F8FF}\\\\u{F0000}-\\\\u{FFFFD}\\\\u{100000}-\\\\u{10FFFD}\\\\/\\\\?])*)?(?:#(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\\\._~\\\\u{A0}-\\\\u{D7FF}\\\\u{F900}-\\\\u{FDCF}\\\\u{FDF0}-\\\\u{FFEF}\\\\u{10000}-\\\\u{1FFFD}\\\\u{20000}-\\\\u{2FFFD}\\\\u{30000}-\\\\u{3FFFD}\\\\u{40000}-\\\\u{4FFFD}\\\\u{50000}-\\\\u{5FFFD}\\\\u{60000}-\\\\u{6FFFD}\\\\u{70000}-\\\\u{7FFFD}\\\\u{80000}-\\\\u{8FFFD}\\\\u{90000}-\\\\u{9FFFD}\\\\u{A0000}-\\\\u{AFFFD}\\\\u{B0000}-\\\\u{BFFFD}\\\\u{C0000}-\\\\u{CFFFD}\\\\u{D0000}-\\\\u{DFFFD}\\\\u{E1000}-\\\\u{EFFFD}!\\\\$&'\\\\(\\\\)\\\\*\\\\+,;=:@])|[\\\\/\\\\?])*)?$\", \"ui\");\n} catch (e) {\n // Fallback to simple validation, works in all browsers\n iriRegExp = new RegExp(\"^[a-z](?:[-a-z0-9\\\\+\\\\.])*:\", \"i\");\n}\n\nfunction UriUtils() {\n function validateRdfUri(value) {\n const hasAngleBrackets = value.indexOf(\"<\") >= 0 && value.indexOf(\">\") >= 0;\n const noAngleBrackets = value.indexOf(\"<\") === -1 && value.lastIndexOf(\">\") === -1;\n const validProtocol = /^<?(http|urn).*>?/.test(value) && (hasAngleBrackets || noAngleBrackets);\n let validPath = false;\n if (validProtocol) {\n if (value.indexOf(\"http\") >= 0) {\n const schemaSlashesIdx = value.indexOf('//');\n validPath = schemaSlashesIdx > 4\n && value.substring(schemaSlashesIdx + 2).length > 0;\n } else if (value.indexOf(\"urn\") >= 0) {\n validPath = value.substring(4).length > 0;\n }\n }\n return validProtocol && validPath;\n }\n\n function isValidIri(iri) {\n return iri !== undefined && !!iri.match(iriRegExp);\n }\n\n return {\n isValidIri: isValidIri,\n validateRdfUri: validateRdfUri\n };\n}\n","// This is a rework of the ng-FitText.js which can be found here https://github.com/patrickmarabeas/ng-FitText.js\nangular\n .module('graphdb.framework.core.directives.fittext', [])\n .directive('fitText', fitTextDirective);\n\nfitTextDirective.$inject = ['$timeout'];\n\nfunction fitTextDirective($timeout) {\n return {\n restrict: 'A',\n scope: {\n min: '=',\n max: '='\n },\n link: function (scope, element, attrs) {\n\n const config = {\n 'debounce': _.debounce,\n 'delay': 100,\n 'loadDelay': 10,\n 'compressor': 1,\n 'min': attrs.fitTextMin || 'inherit',\n 'max': attrs.fitTextMax || 'inherit',\n 'calcSize': 10,\n 'lines': 1\n };\n\n const parent = element.parent();\n const domElem = element[0];\n const domElemStyle = domElem.style;\n const computed = window.getComputedStyle(element[0], null);\n const newlines = element.children().length || config.lines;\n const minFontSize = config.min === 'inherit' ? computed['font-size'] : config.min;\n const maxFontSize = config.max === 'inherit' ? computed['font-size'] : config.max;\n const lineHeight = computed['line-height'];\n const display = computed['display'];\n let resizePromise;\n\n function calculate() {\n const ratio = (config.calcSize * newlines) / domElem.offsetWidth / newlines;\n return Math.max(Math.min(getMaxFontSize(ratio), parseFloat(maxFontSize)), parseFloat(minFontSize));\n }\n\n function getMaxFontSize(ratio) {\n const paddingLeft = parseFloat(getComputedStyle(parent[0]).paddingLeft);\n const paddingRight = parseFloat(getComputedStyle(parent[0]).paddingRight);\n\n return (parent[0].offsetWidth - (paddingLeft + paddingRight)) * ratio * config.compressor;\n }\n\n function resize() {\n if (domElem.offsetHeight * domElem.offsetWidth === 0) {\n return;\n }\n\n // Preset standard values for making the size calculation\n domElemStyle.fontSize = config.calcSize + 'px';\n domElemStyle.lineHeight = '1';\n domElemStyle.display = 'inline-block';\n\n // Set usage values\n domElemStyle.fontSize = calculate() + 'px';\n domElemStyle.lineHeight = lineHeight;\n domElemStyle.display = display;\n }\n\n function resizer() {\n if (resizePromise) {\n $timeout.cancel(resizePromise);\n }\n\n resizePromise = $timeout(function () {\n resize();\n }, config.loadDelay);\n }\n\n scope.$watch(function () {\n return [\n parent[0].offsetWidth,\n element[0].offsetWidth\n ].join('_');\n }, function () {\n resizer();\n });\n\n $(window).on('resize', config.debounce(function () {\n scope.$apply(resizer)\n }, config.delay));\n\n scope.$on('$destroy', function () {\n if (resizePromise) {\n $timeout.cancel(resizePromise);\n }\n $(window).off('resize');\n });\n }\n };\n}\n","angular\n .module('graphdb.framework.explore.services', [])\n .factory('StatementsService', StatementsService);\n\nStatementsService.$inject = [];\n\nfunction StatementsService() {\n function transformToTrig(statements) {\n let data = '';\n const contexts = {};\n\n for (let i = 0; i < statements.length; i++) {\n const statement = statements[i];\n if (statement.context === undefined) {\n statement.context = '';\n } else {\n statement.context = _.trim(statement.context);\n }\n if (angular.isUndefined(contexts[statement.context])) {\n const cstatement = [];\n cstatement.push(statement);\n contexts[statement.context] = cstatement;\n } else {\n contexts[statement.context].push(statement);\n }\n }\n\n const ckeys = Object.keys(contexts);\n for (let i = 0; i < ckeys.length; i++) {\n const key = ckeys[i];\n if (key === '') {\n data += '\\n{';\n } else {\n data += '\\n<' + key + '> {';\n }\n\n const value = contexts[key];\n for (let j = 0; j < value.length; j++) {\n const statement = value[j];\n data += '\\n\\t<' + statement.subject + '> <' + statement.predicate + '> ';\n if (statement.object.type === 'uri') {\n data += '<' + statement.object.value + '> .';\n } else {\n data += '\"' + statement.object.value + '\"' + (statement.object.datatype ? '^^<' + statement.object.datatype + '>' : (statement.object.lang ? '@' + statement.object.lang : '')) + ' .';\n }\n }\n\n data += '\\n}';\n }\n\n return data;\n }\n\n function buildStatements(res, uri) {\n const statements = [];\n if (!_.isEmpty(res.data)) {\n const graph = res.data[uri];\n const predicates = Object.keys(graph);\n for (let i = 0; i < predicates.length; i++) {\n const predicate = predicates[i];\n const objects = graph[predicate];\n for (let j = 0; j < objects.length; j++) {\n const object = objects[j];\n for (let k = 0; k < object.graphs.length; k++) {\n let context = object.graphs[k];\n if (context === 'http://www.ontotext.com/explicit') {\n // Statements in the default context are special\n context = '';\n }\n if (object.lang) {\n object.datatype = '';\n }\n if (!object.datatype) {\n object.datatype = '';\n }\n statements.push({\n subject: uri,\n predicate: predicate,\n object: {\n value: object.value,\n type: object.type,\n datatype: object.datatype,\n lang: object.lang\n },\n context: context\n });\n }\n }\n }\n }\n return statements;\n }\n\n function getDatatypeOptions() {\n return [\n {\n value: '',\n label: 'string'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#boolean',\n label: 'boolean'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#decimal',\n label: 'decimal'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#integer',\n label: 'integer'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#double',\n label: 'double'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#float',\n label: 'float'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#date',\n label: 'date'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#time',\n label: 'time'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#dateTime',\n label: 'date time'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#byte',\n label: 'byte'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#short',\n label: 'short'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#int',\n label: 'int'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#long',\n label: 'long'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#unsignedByte',\n label: 'unsigned byte'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#unsignedShort',\n label: 'unsigned short'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#unsignedInt',\n label: 'unsigned int'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#unsignedLong',\n label: 'unsigned long'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#positoveInteger',\n label: 'positive integer'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#nonNegativeInteger',\n label: 'non-negative integer'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#negativeInteger',\n label: 'negative integer'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#nonPositiveInteger',\n label: 'non-positive integer'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#gYear',\n label: 'gYear'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#gMonth',\n label: 'gMonth'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#gDay',\n label: 'gDay'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#gYearMonth',\n label: 'gYearMonth'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#gMonthDay',\n label: 'gMonthDay'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#duration',\n label: 'duration'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#hexBinary',\n label: 'hex binary'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#base64Binary',\n label: 'base64 binary'\n }\n ];\n }\n\n return {\n transformToTrig: transformToTrig,\n buildStatements: buildStatements,\n getDatatypeOptions: getDatatypeOptions\n };\n}\n","import 'angular/utils/uri-utils';\n\nconst exploreDirectives = angular.module('graphdb.framework.explore.directives', [\n 'graphdb.framework.utils.uriutils'\n]);\n\nexploreDirectives.directive('uri', ['UriUtils', function (UriUtils) {\n return {\n require: 'ngModel',\n link: function (scope, elem, attr, ngModel) {\n\n //For DOM -> model validation\n ngModel.$parsers.unshift(function (value) {\n if (!angular.isUndefined(value) && value.length > 0) {\n const isValidUri = UriUtils.validateRdfUri(value);\n ngModel.$setValidity('searchStr', isValidUri);\n return isValidUri ? value : undefined;\n } else {\n ngModel.$setValidity('searchStr', true);\n return value;\n }\n });\n\n //For model -> DOM validation\n ngModel.$formatters.unshift(function (value) {\n if (!angular.isUndefined(value)) {\n ngModel.$setValidity('searchStr', UriUtils.validateRdfUri);\n }\n return value;\n });\n }\n };\n}]);\n","import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/explore/statements.service';\nimport 'angular/explore/controllers';\nimport 'angular/explore/directives';\nimport 'angular-xeditable/dist/js/xeditable.min';\nimport 'lib/angucomplete-alt/angucomplete-alt-onto.min';\nimport 'angular/core/directives/fit-text.directive';\n\nconst modules = [\n 'ngRoute',\n 'toastr',\n 'xeditable',\n 'angucomplete-alt-onto',\n 'graphdb.framework.explore.services',\n 'graphdb.framework.explore.controllers',\n 'graphdb.framework.explore.directives',\n 'graphdb.framework.core.directives.fittext'\n];\n\nangular.module('graphdb.framework.explore', modules);\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///./src/js/lib/angucomplete-alt/angucomplete-alt-onto.min.js","webpack:///./src/js/angular/utils/uri-utils.js","webpack:///./src/js/angular/core/directives/fit-text.directive.js","webpack:///./src/js/angular/explore/statements.service.js","webpack:///./src/js/angular/explore/directives.js","webpack:///./src/js/angular/explore/app.js"],"names":["root","factory","angular","module","directive","$q","$parse","$http","$sce","$timeout","$templateCache","$interpolate","$rootScope","KEY_DW","KEY_RT","KEY_UP","KEY_LF","KEY_ES","KEY_EN","KEY_TAB","MIN_LENGTH","MAX_LENGTH","PAUSE","BLUR_TIMEOUT","REQUIRED_CLASS","TEXT_SEARCHING","TEXT_NORESULTS","link","scope","elem","attrs","ctrl","hideTimer","responseFormatter","unbindInitialValue","displaySearching","displayNoResults","fn","inputField","find","minlength","searchTimer","requiredClassName","validState","httpCanceller","dd","querySelector","isScrollOn","mousedownOn","handleInputChange","newval","initial","uri","extractTitle","callOrAssign","originalObject","length","console","error","handleRequired","clickoutHandlerForDropdown","event","hideResults","document","body","removeEventListener","ie8EventNormalizer","which","keyCode","value","selectedObject","data","titleField","split","map","field","extractValue","join","obj","key","keys","result","i","findMatchString","target","str","matches","re","RegExp","replace","match","toString","matchClass","trustAsHtml","valid","notEmpty","fieldRequired","inputName","$setValidity","handleOverrideSuggestions","overrideSuggestions","preventDefault","cancel","cancelHttpRequest","clearSelected","clearResults","dropdownRow","querySelectorAll","currentIndex","dropdownScrollTopTo","offset","scrollTop","updateInputField","current","results","extractedTitle","val","title","httpSuccessCallbackGen","responseData","status","headers","config","searching","processResults","remoteUrlDataField","httpErrorCallback","errorRes","remoteUrlErrorCallback","resolve","getRemoteResults","params","url","remoteUrl","encodeuriComponent","remoteUrlRequestFormatter","remoteUrlRequestWithCredentials","withCredentials","defer","timeout","promise","get","success","getRemoteResultsWithCustomHandler","remoteApiHandler","then","catch","showDropdown","initResults","focusFirst","searchTimerComplete","localData","$apply","localSearch","s","searchFields","parseInput","toLowerCase","indexOf","getLocalResults","description","image","text","formattedText","formattedDesc","descriptionField","imageField","autoMatch","selectResult","checkExactMatch","desc","showAll","on","id","addEventListener","className","$watch","oldval","$on","elementId","onFocusHandler","focusIn","focusOut","resetHideResults","hoverRow","index","inputChangeHandler","inputChanged","fieldRequiredClass","parseInt","pause","initialValue","inputType","type","textSearching","textNoResults","maxlength","row","rowTop","getBoundingClientRect","top","getComputedStyle","maxHeight","bottom","css","offsetHeight","marginTop","marginBottom","dropdownRowOffsetHeight","paddingTop","$digest","overflowY","put","restrict","require","disableInput","disableSuggestions","remoteUrlResponseFormatter","placeholder","inputClass","fieldTabindex","templateUrl","element","compile","tElement","startSym","startSymbol","endSym","endSymbol","interpolatedHtml","html","window","iriRegExp","isValidIri","iri","undefined","validateRdfUri","hasAngleBrackets","noAngleBrackets","lastIndexOf","validProtocol","test","validPath","schemaSlashesIdx","substring","e","fitTextDirective","min","max","_","debounce","fitTextMin","fitTextMax","parent","domElem","domElemStyle","style","computed","newlines","children","lines","minFontSize","maxFontSize","lineHeight","display","resizePromise","calculate","ratio","calcSize","offsetWidth","Math","paddingLeft","parseFloat","paddingRight","compressor","getMaxFontSize","resizer","fontSize","loadDelay","$","delay","off","$inject","StatementsService","transformToTrig","statements","contexts","statement","context","trim","isUndefined","cstatement","push","ckeys","Object","j","subject","predicate","object","datatype","lang","buildStatements","res","isEmpty","graph","predicates","objects","k","graphs","getDatatypeOptions","label","UriUtils","attr","ngModel","$parsers","unshift","isValidUri","$formatters"],"mappings":";;CASC,SAAUA,EAAMC,GACf,cAWQ,SAAUC,GAGlBA,EAAQC,OAAO,wBAAyB,IAAIC,UAAU,sBAAuB,CAAC,KAAM,SAAU,QAAS,OAAQ,WAAY,iBAAkB,eAAgB,aAAc,SAAUC,EAAIC,EAAQC,EAAOC,EAAMC,EAAUC,EAAgBC,EAAcC,GAEpP,IAAIC,EAAU,GACVC,EAAU,GACVC,EAAU,GACVC,EAAU,GACVC,EAAU,GACVC,EAAU,GACVC,EAAW,EAEXC,EAAa,EACbC,EAAa,OACbC,EAAQ,IACRC,EAAe,IAGfC,EAAiB,wBACjBC,EAAiB,eACjBC,EAAiB,mBAwBrB,SAASC,EAAKC,EAAOC,EAAMC,EAAOC,GAChC,IAGIC,EAEAC,EAMAC,EACAC,EACAC,EAoG4BC,EAjH5BC,EAAaT,EAAKU,KAAK,SACvBC,EAAYpB,EACZqB,EAAc,KAEdC,EAAoBlB,EAEpBmB,EAAa,KACbC,EAAgB,KAChBC,EAAKhB,EAAK,GAAGiB,cAAc,0BAC3BC,GAAa,EACbC,EAAc,KA0DlB,SAASC,EAAkBC,EAAQC,GAC7BD,IACoB,iBAAXA,GACTtB,EAAMwB,IAAMC,EAAaH,GACzBI,EAAa,CAACC,eAAgBL,KACH,iBAAXA,GAAuBA,EAAOM,OAAS,EACvD5B,EAAMwB,IAAMF,EAERO,SAAWA,QAAQC,OACrBD,QAAQC,MAAM,iBAAqBP,EAAU,UAAY,IAAM,4BAA6BD,EAAQ,6BAIxGS,GAAe,IAKnB,SAASC,EAA2BC,GAClCb,EAAc,KACdpB,EAAMkC,YAAYD,GAClBE,SAASC,KAAKC,oBAAoB,QAASL,GAI7C,SAASM,EAAmBL,GAC1B,OAAOA,EAAMM,MAAQN,EAAMM,MAAQN,E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0R,GAElCA,EAAkBD,QAAU,I,gCCJ5B,aAE0BxR,QAAQC,OAAO,uCAAwC,CAC7E,qCAGcC,UAAU,MAAO,CAAC,WAAY,SAAUmT,GACtD,MAAO,CACHjG,QAAS,UACT3L,KAAM,SAAUC,EAAOC,EAAM2R,EAAMC,GAG/BA,EAAQC,SAASC,SAAQ,SAAUtP,GAC/B,IAAKnE,QAAQgS,YAAY7N,IAAUA,EAAMb,OAAS,EAAG,CACjD,MAAMoQ,EAAaL,EAAS3E,eAAevK,GAE3C,OADAoP,EAAQvN,aAAa,YAAa0N,GAC3BA,EAAavP,OAAQsK,EAG5B,OADA8E,EAAQvN,aAAa,aAAa,GAC3B7B,KAKfoP,EAAQI,YAAYF,SAAQ,SAAUtP,GAIlC,OAHKnE,QAAQgS,YAAY7N,IACrBoP,EAAQvN,aAAa,YAAaqN,EAAS3E,gBAExCvK,W,gCC5BvB,uDAoBAnE,QAAQC,OAAO,4BAXC,CACZ,UACA,SACA,YACA,wBACA,qCACA,wCACA,uCACA","file":"19.271aef502bad5f51c682.bundle.js","sourcesContent":["/*\n * angucomplete-alt\n * Autocomplete directive for AngularJS\n * This is a fork of Daryl Rowland's angucomplete with some extra features.\n * By Hidenari Nozaki\n */\n\n/*! Copyright (c) 2014 Hidenari Nozaki and contributors | Licensed under the MIT license */\n\n(function (root, factory) {\n 'use strict';\n// if (typeof module !== 'undefined' && module.exports) {\n// // CommonJS\n// module.exports = factory(require('angular'));\n// } else if (typeof define === 'function' && define.amd) {\n// // AMD\n// define(['angular'], factory);\n// } else {\n// // Global Variables\n factory(root.angular);\n// }\n}(window, function (angular) {\n 'use strict';\n\n angular.module('angucomplete-alt-onto', []).directive('angucompleteAltOnto', ['$q', '$parse', '$http', '$sce', '$timeout', '$templateCache', '$interpolate', '$rootScope', function ($q, $parse, $http, $sce, $timeout, $templateCache, $interpolate, $rootScope) {\n // keyboard events\n var KEY_DW = 40;\n var KEY_RT = 39;\n var KEY_UP = 38;\n var KEY_LF = 37;\n var KEY_ES = 27;\n var KEY_EN = 13;\n var KEY_TAB = 9;\n\n var MIN_LENGTH = 3;\n var MAX_LENGTH = 524288; // the default max length per the html maxlength attribute\n var PAUSE = 500;\n var BLUR_TIMEOUT = 200;\n\n // string constants\n var REQUIRED_CLASS = 'autocomplete-required';\n var TEXT_SEARCHING = 'Searching...';\n var TEXT_NORESULTS = 'No results found';\n var TEMPLATE_URL = '/angucomplete-alt/index.html';\n\n // Set the default template for this directive\n $templateCache.put(TEMPLATE_URL,\n '<div class=\"angucomplete-holder\" ng-class=\"{\\'angucomplete-dropdown-visible\\': showDropdown}\">' +\n ' <input id=\"{{id}}_value\" name=\"{{inputName}}\" tabindex=\"{{fieldTabindex}}\" ng-class=\"{\\'angucomplete-input-not-empty\\': notEmpty}\" ng-model=\"uri\" ng-disabled=\"disableInput\" type=\"{{inputType}}\" placeholder=\"{{placeholder}}\" maxlength=\"{{maxlength}}\" ng-focus=\"onFocusHandler()\" class=\"{{inputClass}}\" ng-focus=\"resetHideResults()\" ng-blur=\"hideResults($event)\" autocapitalize=\"off\" autocorrect=\"off\" autocomplete=\"off\" ng-change=\"inputChangeHandler(uri)\" style=\"overflow: hidden; padding-right: .5em;\"/>' +\n ' <div id=\"{{id}}_dropdown\" class=\"angucomplete-dropdown\" ng-show=\"disableSuggestions && showDropdown\">' +\n ' <div class=\"angucomplete-searching\" ng-show=\"searching\" ng-bind=\"textSearching\"></div>' +\n ' <div class=\"angucomplete-searching\" ng-show=\"!searching && (!results || results.length == 0)\" ng-bind=\"textNoResults\"></div>' +\n ' <div class=\"angucomplete-row\" ng-repeat=\"result in results\" ng-click=\"selectResult(result)\" ng-mouseenter=\"hoverRow($index)\" ng-class=\"{\\'angucomplete-selected-row\\': $index == currentIndex}\">' +\n ' <div ng-if=\"imageField\" class=\"angucomplete-image-holder\">' +\n ' <img ng-if=\"result.image && result.image != \\'\\'\" ng-src=\"{{result.image}}\" class=\"angucomplete-image\"/>' +\n ' <div ng-if=\"!result.image && result.image != \\'\\'\" class=\"angucomplete-image-default\"></div>' +\n ' </div>' +\n ' <div class=\"angucomplete-title\" ng-if=\"matchClass\" ng-bind-html=\"result.title\"></div>' +\n ' <div class=\"angucomplete-title\" ng-if=\"!matchClass\">{{ result.title }}</div>' +\n ' <div ng-if=\"matchClass && result.description && result.description != \\'\\'\" class=\"angucomplete-description\" ng-bind-html=\"result.description\"></div>' +\n ' <div ng-if=\"!matchClass && result.description && result.description != \\'\\'\" class=\"angucomplete-description\">{{result.description}}</div>' +\n ' </div>' +\n ' </div>' +\n '</div>'\n );\n\n function link(scope, elem, attrs, ctrl) {\n var inputField = elem.find('input');\n var minlength = MIN_LENGTH;\n var searchTimer = null;\n var hideTimer;\n var requiredClassName = REQUIRED_CLASS;\n var responseFormatter;\n var validState = null;\n var httpCanceller = null;\n var dd = elem[0].querySelector('.angucomplete-dropdown');\n var isScrollOn = false;\n var mousedownOn = null;\n var unbindInitialValue;\n var displaySearching;\n var displayNoResults;\n\n\n elem.on('mousedown', function(event) {\n if (event.target.id) {\n mousedownOn = event.target.id;\n if (mousedownOn === scope.id + '_dropdown') {\n document.body.addEventListener('click', clickoutHandlerForDropdown);\n }\n }\n else {\n mousedownOn = event.target.className;\n }\n });\n\n scope.currentIndex = scope.focusFirst ? 0 : null;\n scope.searching = false;\n unbindInitialValue = scope.$watch('initialValue', function(newval) {\n if (newval) {\n // remove scope listener\n unbindInitialValue();\n // change input\n handleInputChange(newval, true);\n }\n });\n\n scope.$watch('fieldRequired', function(newval, oldval) {\n if (newval !== oldval) {\n if (!newval) {\n ctrl[scope.inputName].$setValidity(requiredClassName, true);\n }\n else if (!validState || scope.currentIndex === -1) {\n handleRequired(false);\n }\n else {\n handleRequired(true);\n }\n }\n });\n\n scope.$on('angucomplete-alt:clearInput', function (event, elementId) {\n if (!elementId || elementId === scope.id) {\n scope.uri = null;\n callOrAssign();\n handleRequired(false);\n clearResults();\n }\n });\n\n scope.$on('angucomplete-alt:changeInput', function (event, elementId, newval) {\n if (!!elementId && elementId === scope.id) {\n handleInputChange(newval);\n }\n });\n\n function handleInputChange(newval, initial) {\n if (newval) {\n if (typeof newval === 'object') {\n scope.uri = extractTitle(newval);\n callOrAssign({originalObject: newval});\n } else if (typeof newval === 'string' && newval.length > 0) {\n scope.uri = newval;\n } else {\n if (console && console.error) {\n console.error('Tried to set ' + (!!initial ? 'initial' : '') + ' value of angucomplete to', newval, 'which is an invalid value');\n }\n }\n\n handleRequired(true);\n }\n }\n\n // #194 dropdown list not consistent in collapsing (bug).\n function clickoutHandlerForDropdown(event) {\n mousedownOn = null;\n scope.hideResults(event);\n document.body.removeEventListener('click', clickoutHandlerForDropdown);\n }\n\n // for IE8 quirkiness about event.which\n function ie8EventNormalizer(event) {\n return event.which ? event.which : event.keyCode;\n }\n\n function callOrAssign(value) {\n if (typeof scope.selectedObject === 'function') {\n scope.selectedObject(value);\n }\n else {\n scope.selectedObject = value;\n }\n\n if (value) {\n handleRequired(true);\n }\n else {\n handleRequired(false);\n }\n }\n\n function callFunctionOrIdentity(fn) {\n return function(data) {\n return scope[fn] ? scope[fn](data) : data;\n };\n }\n\n function setInputString(str) {\n callOrAssign({originalObject: str});\n\n if (scope.clearSelected) {\n scope.uri = null;\n }\n clearResults();\n }\n\n function extractTitle(data) {\n // split title fields and run extractValue for each and join with ' '\n return scope.titleField.split(',')\n .map(function(field) {\n return extractValue(data, field);\n })\n .join(' ');\n }\n\n function extractValue(obj, key) {\n var keys, result;\n if (key) {\n keys= key.split('.');\n result = obj;\n for (var i = 0; i < keys.length; i++) {\n result = result[keys[i]];\n }\n }\n else {\n result = obj;\n }\n\n return result;\n }\n\n function findMatchString(target, str) {\n var result, matches, re;\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions\n // Escape user input to be treated as a literal string within a regular expression\n re = new RegExp(str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'), 'i');\n if (!target) { return; }\n if (!target.match || !target.replace) { target = target.toString(); }\n matches = target.match(re);\n if (matches) {\n result = target.replace(re,\n '<span class=\"'+ scope.matchClass +'\">'+ matches[0] +'</span>');\n }\n else {\n result = target;\n }\n return $sce.trustAsHtml(result);\n }\n\n function handleRequired(valid) {\n scope.notEmpty = valid;\n validState = scope.uri;\n if (scope.fieldRequired && ctrl && scope.inputName) {\n ctrl[scope.inputName].$setValidity(requiredClassName, valid);\n }\n }\n\n function keyupHandler(event) {\n var which = ie8EventNormalizer(event);\n if (which === KEY_LF || which === KEY_RT) {\n // do nothing\n return;\n }\n\n if (which === KEY_UP || which === KEY_EN) {\n event.preventDefault();\n }\n else if (which === KEY_DW) {\n event.preventDefault();\n if (!scope.showDropdown && scope.uri && scope.uri.length >= minlength) {\n initResults();\n scope.searching = true;\n searchTimerComplete(scope.uri);\n }\n }\n else if (which === KEY_ES) {\n clearResults();\n scope.$apply(function() {\n inputField.val(scope.uri);\n });\n }\n else {\n if (minlength === 0 && !scope.uri) {\n return;\n }\n\n if (!scope.uri || scope.uri === '') {\n scope.showDropdown = false;\n } else if (scope.uri.length >= minlength) {\n initResults();\n\n if (searchTimer) {\n $timeout.cancel(searchTimer);\n }\n\n scope.searching = true;\n\n searchTimer = $timeout(function() {\n searchTimerComplete(scope.uri);\n }, scope.pause);\n }\n\n if (validState && validState !== scope.uri && !scope.clearSelected) {\n scope.$apply(function() {\n callOrAssign();\n });\n }\n }\n }\n\n function handleOverrideSuggestions(event) {\n if (scope.overrideSuggestions &&\n !(scope.selectedObject && scope.selectedObject.originalObject === scope.uri)) {\n if (event) {\n event.preventDefault();\n }\n\n // cancel search timer\n $timeout.cancel(searchTimer);\n // cancel http request\n cancelHttpRequest();\n\n setInputString(scope.uri);\n }\n }\n\n function dropdownRowOffsetHeight(row) {\n var css = getComputedStyle(row);\n return row.offsetHeight +\n parseInt(css.marginTop, 10) + parseInt(css.marginBottom, 10);\n }\n\n function dropdownHeight() {\n return dd.getBoundingClientRect().top +\n parseInt(getComputedStyle(dd).maxHeight, 10);\n }\n\n function dropdownRow() {\n return elem[0].querySelectorAll('.angucomplete-row')[scope.currentIndex];\n }\n\n function dropdownRowTop() {\n return dropdownRow().getBoundingClientRect().top -\n (dd.getBoundingClientRect().top +\n parseInt(getComputedStyle(dd).paddingTop, 10));\n }\n\n function dropdownScrollTopTo(offset) {\n dd.scrollTop = dd.scrollTop + offset;\n }\n\n function updateInputField(){\n var current = scope.results[scope.currentIndex];\n if (scope.matchClass) {\n var extractedTitle = extractTitle(current.originalObject);\n extractedTitle = extractedTitle.replace(/<b>|<\\/b>/g, \"\");\n inputField.val(extractedTitle);\n }\n else {\n inputField.val(current.title);\n }\n }\n\n function keydownHandler(event) {\n var which = ie8EventNormalizer(event);\n var row = null;\n var rowTop = null;\n\n if (which === KEY_EN && scope.results) {\n if (scope.currentIndex >= 0 && scope.currentIndex < scope.results.length) {\n event.preventDefault();\n scope.selectResult(scope.results[scope.currentIndex]);\n } else {\n handleOverrideSuggestions(event);\n clearResults();\n }\n scope.$apply();\n } else if (which === KEY_DW && scope.results) {\n event.preventDefault();\n if ((scope.currentIndex + 1) < scope.results.length && scope.showDropdown) {\n scope.$apply(function() {\n scope.currentIndex ++;\n updateInputField();\n });\n\n if (isScrollOn) {\n row = dropdownRow();\n if (dropdownHeight() < row.getBoundingClientRect().bottom) {\n dropdownScrollTopTo(dropdownRowOffsetHeight(row));\n }\n }\n }\n } else if (which === KEY_UP && scope.results) {\n event.preventDefault();\n if (scope.currentIndex >= 1) {\n scope.$apply(function() {\n scope.currentIndex --;\n updateInputField();\n });\n\n if (isScrollOn) {\n rowTop = dropdownRowTop();\n if (rowTop < 0) {\n dropdownScrollTopTo(rowTop - 1);\n }\n }\n }\n else if (scope.currentIndex === 0) {\n scope.$apply(function() {\n scope.currentIndex = -1;\n inputField.val(scope.uri);\n });\n }\n } else if (which === KEY_TAB) {\n if (scope.results && scope.results.length > 0 && scope.showDropdown) {\n if (scope.currentIndex === -1 && scope.overrideSuggestions) {\n // intentionally not sending event so that it does not\n // prevent default tab behavior\n handleOverrideSuggestions();\n }\n else {\n if (scope.currentIndex === -1) {\n scope.currentIndex = 0;\n }\n scope.selectResult(scope.results[scope.currentIndex]);\n scope.$digest();\n }\n }\n else {\n // no results\n // intentionally not sending event so that it does not\n // prevent default tab behavior\n if (scope.uri && scope.uri.length > 0) {\n handleOverrideSuggestions();\n }\n }\n } else if (which === KEY_ES) {\n // This is very specific to IE10/11 #272\n // without this, IE clears the input text\n event.preventDefault();\n }\n }\n\n function httpSuccessCallbackGen(str) {\n return function(responseData, status, headers, config) {\n // normalize return obejct from promise\n if (!status && !headers && !config && responseData.data) {\n responseData = responseData.data;\n }\n scope.searching = false;\n processResults(extractValue(responseFormatter(responseData), scope.remoteUrlDataField), str);\n };\n }\n\n function httpErrorCallback(errorRes, status, headers, config) {\n // cancelled/aborted\n if (status === 0 || status === -1) { return; }\n\n // normalize return obejct from promise\n if (!status && !headers && !config) {\n status = errorRes.status;\n }\n if (scope.remoteUrlErrorCallback) {\n scope.remoteUrlErrorCallback(errorRes, status, headers, config);\n }\n else {\n if (console && console.error) {\n console.error('http error');\n }\n }\n }\n\n function cancelHttpRequest() {\n if (httpCanceller) {\n httpCanceller.resolve();\n }\n }\n\n function getRemoteResults(str) {\n var params = {},\n url = scope.remoteUrl + encodeuriComponent(str);\n if (scope.remoteUrlRequestFormatter) {\n params = {params: scope.remoteUrlRequestFormatter(str)};\n url = scope.remoteUrl;\n }\n if (!!scope.remoteUrlRequestWithCredentials) {\n params.withCredentials = true;\n }\n cancelHttpRequest();\n httpCanceller = $q.defer();\n params.timeout = httpCanceller.promise;\n $http.get(url, params)\n .success(httpSuccessCallbackGen(str))\n .error(httpErrorCallback);\n }\n\n function getRemoteResultsWithCustomHandler(str) {\n cancelHttpRequest();\n\n httpCanceller = $q.defer();\n\n scope.remoteApiHandler(str, httpCanceller.promise)\n .then(httpSuccessCallbackGen(str))\n .catch(httpErrorCallback);\n\n /* IE8 compatible\n scope.remoteApiHandler(str, httpCanceller.promise)\n ['then'](httpSuccessCallbackGen(str))\n ['catch'](httpErrorCallback);\n */\n }\n\n function clearResults() {\n scope.showDropdown = false;\n scope.results = [];\n if (dd) {\n dd.scrollTop = 0;\n }\n }\n\n function initResults() {\n scope.showDropdown = displaySearching;\n scope.currentIndex = scope.focusFirst ? 0 : -1;\n scope.results = [];\n }\n\n function getLocalResults(str) {\n var i, match, s, value,\n searchFields = scope.searchFields.split(','),\n matches = [];\n if (typeof scope.parseInput() !== 'undefined') {\n str = scope.parseInput()(str);\n }\n for (i = 0; i < scope.localData.length; i++) {\n match = false;\n\n for (s = 0; s < searchFields.length; s++) {\n value = extractValue(scope.localData[i], searchFields[s]) || '';\n match = match || (value.toString().toLowerCase().indexOf(str.toString().toLowerCase()) >= 0);\n }\n\n if (match) {\n matches[matches.length] = scope.localData[i];\n }\n }\n return matches;\n }\n\n function checkExactMatch(result, obj, str){\n if (!str) { return false; }\n for(var key in obj){\n if(obj[key].toLowerCase() === str.toLowerCase()){\n scope.selectResult(result);\n return true;\n }\n }\n return false;\n }\n\n function searchTimerComplete(str) {\n // Begin the search\n if (!str || str.length < minlength) {\n return;\n }\n if (scope.localData) {\n scope.$apply(function() {\n var matches;\n if (typeof scope.localSearch() !== 'undefined') {\n matches = scope.localSearch()(str);\n } else {\n matches = getLocalResults(str);\n }\n scope.searching = false;\n processResults(matches, str);\n });\n }\n else if (scope.remoteApiHandler) {\n getRemoteResultsWithCustomHandler(str);\n } else {\n getRemoteResults(str);\n }\n }\n\n function processResults(responseData, str) {\n var i, description, image, text, formattedText, formattedDesc;\n\n if (responseData && responseData.length > 0) {\n scope.results = [];\n\n for (i = 0; i < responseData.length; i++) {\n if (scope.titleField && scope.titleField !== '') {\n text = formattedText = extractTitle(responseData[i]);\n }\n\n description = '';\n if (scope.descriptionField) {\n description = formattedDesc = extractValue(responseData[i], scope.descriptionField);\n }\n\n image = '';\n if (scope.imageField) {\n image = extractValue(responseData[i], scope.imageField);\n }\n\n if (scope.matchClass) {\n formattedText = findMatchString(text, str);\n formattedDesc = findMatchString(description, str);\n }\n\n scope.results[scope.results.length] = {\n title: formattedText,\n description: formattedDesc,\n image: image,\n originalObject: responseData[i]\n };\n }\n\n } else {\n scope.results = [];\n }\n\n if (scope.autoMatch && scope.results.length === 1 &&\n checkExactMatch(scope.results[0],\n {title: text, desc: description || ''}, scope.uri)) {\n scope.showDropdown = false;\n } else if (scope.results.length === 0 && !displayNoResults) {\n scope.showDropdown = false;\n } else {\n scope.showDropdown = true;\n }\n }\n\n function showAll() {\n if (scope.localData) {\n processResults(scope.localData, '');\n }\n else if (scope.remoteApiHandler) {\n getRemoteResultsWithCustomHandler('');\n }\n else {\n getRemoteResults('');\n }\n }\n\n scope.onFocusHandler = function() {\n if (scope.focusIn) {\n scope.focusIn();\n }\n if (minlength === 0 && (!scope.uri || scope.uri.length === 0)) {\n scope.currentIndex = scope.focusFirst ? 0 : scope.currentIndex;\n scope.showDropdown = true;\n showAll();\n }\n };\n\n scope.hideResults = function() {\n if (mousedownOn &&\n (mousedownOn === scope.id + '_dropdown' ||\n mousedownOn.indexOf('angucomplete') >= 0)) {\n mousedownOn = null;\n }\n else {\n hideTimer = $timeout(function() {\n clearResults();\n scope.$apply(function() {\n if (scope.uri && scope.uri.length > 0) {\n inputField.val(scope.uri);\n }\n });\n }, BLUR_TIMEOUT);\n cancelHttpRequest();\n\n if (scope.focusOut) {\n scope.focusOut();\n }\n\n if (scope.overrideSuggestions) {\n if (scope.uri && scope.uri.length > 0 && scope.currentIndex === -1) {\n handleOverrideSuggestions();\n }\n }\n }\n };\n\n scope.resetHideResults = function() {\n if (hideTimer) {\n $timeout.cancel(hideTimer);\n }\n };\n\n scope.hoverRow = function(index) {\n scope.currentIndex = index;\n };\n\n scope.selectResult = function(result) {\n // Restore original values\n if (scope.matchClass) {\n result.title = extractTitle(result.originalObject);\n if (typeof result.title === \"string\") {\n result.title = result.title.replace(/<b>|<\\/b>/g, \"\");\n }\n result.description = extractValue(result.originalObject, scope.descriptionField);\n }\n\n if (scope.clearSelected) {\n scope.uri = null;\n }\n else {\n scope.uri = result.title;\n }\n callOrAssign(result);\n clearResults();\n };\n\n scope.inputChangeHandler = function(str) {\n if (str.length < minlength) {\n cancelHttpRequest();\n clearResults();\n }\n else if (str.length === 0 && minlength === 0) {\n scope.searching = false;\n showAll();\n }\n\n if (scope.inputChanged) {\n str = scope.inputChanged(str);\n }\n return str;\n };\n\n // check required\n if (scope.fieldRequiredClass && scope.fieldRequiredClass !== '') {\n requiredClassName = scope.fieldRequiredClass;\n }\n\n // check min length\n if (scope.minlength && scope.minlength !== '') {\n minlength = parseInt(scope.minlength, 10);\n }\n\n // check pause time\n if (!scope.pause) {\n scope.pause = PAUSE;\n }\n\n // check clearSelected\n if (!scope.clearSelected) {\n scope.clearSelected = false;\n }\n\n // check override suggestions\n if (!scope.overrideSuggestions) {\n scope.overrideSuggestions = false;\n }\n\n // check required field\n if (scope.fieldRequired && ctrl) {\n // check initial value, if given, set validitity to true\n if (scope.initialValue) {\n handleRequired(true);\n }\n else {\n handleRequired(false);\n }\n }\n\n scope.inputType = attrs.type ? attrs.type : 'text';\n\n // set strings for \"Searching...\" and \"No results\"\n scope.textSearching = attrs.textSearching ? attrs.textSearching : TEXT_SEARCHING;\n scope.textNoResults = attrs.textNoResults ? attrs.textNoResults : TEXT_NORESULTS;\n displaySearching = scope.textSearching === 'false' ? false : true;\n displayNoResults = scope.textNoResults === 'false' ? false : true;\n\n // set max length (default to maxlength deault from html\n scope.maxlength = attrs.maxlength ? attrs.maxlength : MAX_LENGTH;\n\n // register events\n inputField.on('keydown', keydownHandler);\n inputField.on('keyup', keyupHandler);\n\n // set response formatter\n responseFormatter = callFunctionOrIdentity('remoteUrlResponseFormatter');\n\n // set isScrollOn\n $timeout(function() {\n var css = getComputedStyle(dd);\n isScrollOn = css.maxHeight && css.overflowY === 'auto';\n });\n }\n\n return {\n restrict: 'EA',\n require: '^?form',\n scope: {\n selectedObject: '=',\n disableInput: '=',\n disableSuggestions: '=',\n initialValue: '=',\n localData: '=',\n localSearch: '&',\n remoteUrlRequestFormatter: '=',\n remoteUrlRequestWithCredentials: '@',\n remoteUrlResponseFormatter: '=',\n remoteUrlErrorCallback: '=',\n remoteApiHandler: '=',\n id: '@',\n type: '@',\n placeholder: '@',\n remoteUrl: '@',\n remoteUrlDataField: '@',\n titleField: '@',\n descriptionField: '@',\n imageField: '@',\n inputClass: '@',\n pause: '@',\n searchFields: '@',\n minlength: '@',\n matchClass: '@',\n clearSelected: '@',\n overrideSuggestions: '@',\n fieldRequired: '=',\n fieldRequiredClass: '@',\n inputChanged: '=',\n autoMatch: '@',\n focusOut: '&',\n focusIn: '&',\n fieldTabindex: '@',\n inputName: '@',\n focusFirst: '@',\n parseInput: '&'\n },\n templateUrl: function(element, attrs) {\n return attrs.templateUrl || TEMPLATE_URL;\n },\n compile: function(tElement) {\n var startSym = $interpolate.startSymbol();\n var endSym = $interpolate.endSymbol();\n if (!(startSym === '{{' && endSym === '}}')) {\n var interpolatedHtml = tElement.html()\n .replace(/\\{\\{/g, startSym)\n .replace(/\\}\\}/g, endSym);\n tElement.html(interpolatedHtml);\n }\n return link;\n }\n };\n }]);\n\n}));","angular\n .module('graphdb.framework.utils.uriutils', [])\n .factory('UriUtils', UriUtils);\n\nlet iriRegExp;\ntry {\n // Real validation but it requires a relatively new browser\n iriRegExp = new RegExp(\"^[a-z](?:[-a-z0-9\\\\+\\\\.])*:(?:\\\\/\\\\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\\\._~\\\\u{A0}-\\\\u{D7FF}\\\\u{F900}-\\\\u{FDCF}\\\\u{FDF0}-\\\\u{FFEF}\\\\u{10000}-\\\\u{1FFFD}\\\\u{20000}-\\\\u{2FFFD}\\\\u{30000}-\\\\u{3FFFD}\\\\u{40000}-\\\\u{4FFFD}\\\\u{50000}-\\\\u{5FFFD}\\\\u{60000}-\\\\u{6FFFD}\\\\u{70000}-\\\\u{7FFFD}\\\\u{80000}-\\\\u{8FFFD}\\\\u{90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5FFFD}\\\\u{60000}-\\\\u{6FFFD}\\\\u{70000}-\\\\u{7FFFD}\\\\u{80000}-\\\\u{8FFFD}\\\\u{90000}-\\\\u{9FFFD}\\\\u{A0000}-\\\\u{AFFFD}\\\\u{B0000}-\\\\u{BFFFD}\\\\u{C0000}-\\\\u{CFFFD}\\\\u{D0000}-\\\\u{DFFFD}\\\\u{E1000}-\\\\u{EFFFD}!\\\\$&'\\\\(\\\\)\\\\*\\\\+,;=:@])|[\\\\u{E000}-\\\\u{F8FF}\\\\u{F0000}-\\\\u{FFFFD}\\\\u{100000}-\\\\u{10FFFD}\\\\/\\\\?])*)?(?:#(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\\\._~\\\\u{A0}-\\\\u{D7FF}\\\\u{F900}-\\\\u{FDCF}\\\\u{FDF0}-\\\\u{FFEF}\\\\u{10000}-\\\\u{1FFFD}\\\\u{20000}-\\\\u{2FFFD}\\\\u{30000}-\\\\u{3FFFD}\\\\u{40000}-\\\\u{4FFFD}\\\\u{50000}-\\\\u{5FFFD}\\\\u{60000}-\\\\u{6FFFD}\\\\u{70000}-\\\\u{7FFFD}\\\\u{80000}-\\\\u{8FFFD}\\\\u{90000}-\\\\u{9FFFD}\\\\u{A0000}-\\\\u{AFFFD}\\\\u{B0000}-\\\\u{BFFFD}\\\\u{C0000}-\\\\u{CFFFD}\\\\u{D0000}-\\\\u{DFFFD}\\\\u{E1000}-\\\\u{EFFFD}!\\\\$&'\\\\(\\\\)\\\\*\\\\+,;=:@])|[\\\\/\\\\?])*)?$\", \"ui\");\n} catch (e) {\n // Fallback to simple validation, works in all browsers\n iriRegExp = new RegExp(\"^[a-z](?:[-a-z0-9\\\\+\\\\.])*:\", \"i\");\n}\n\nfunction UriUtils() {\n function validateRdfUri(value) {\n const hasAngleBrackets = value.indexOf(\"<\") >= 0 && value.indexOf(\">\") >= 0;\n const noAngleBrackets = value.indexOf(\"<\") === -1 && value.lastIndexOf(\">\") === -1;\n const validProtocol = /^<?(http|urn).*>?/.test(value) && (hasAngleBrackets || noAngleBrackets);\n let validPath = false;\n if (validProtocol) {\n if (value.indexOf(\"http\") >= 0) {\n const schemaSlashesIdx = value.indexOf('//');\n validPath = schemaSlashesIdx > 4\n && value.substring(schemaSlashesIdx + 2).length > 0;\n } else if (value.indexOf(\"urn\") >= 0) {\n validPath = value.substring(4).length > 0;\n }\n }\n return validProtocol && validPath;\n }\n\n function isValidIri(iri) {\n return iri !== undefined && !!iri.match(iriRegExp);\n }\n\n return {\n isValidIri: isValidIri,\n validateRdfUri: validateRdfUri\n };\n}\n","// This is a rework of the ng-FitText.js which can be found here https://github.com/patrickmarabeas/ng-FitText.js\nangular\n .module('graphdb.framework.core.directives.fittext', [])\n .directive('fitText', fitTextDirective);\n\nfitTextDirective.$inject = ['$timeout'];\n\nfunction fitTextDirective($timeout) {\n return {\n restrict: 'A',\n scope: {\n min: '=',\n max: '='\n },\n link: function (scope, element, attrs) {\n\n const config = {\n 'debounce': _.debounce,\n 'delay': 100,\n 'loadDelay': 10,\n 'compressor': 1,\n 'min': attrs.fitTextMin || 'inherit',\n 'max': attrs.fitTextMax || 'inherit',\n 'calcSize': 10,\n 'lines': 1\n };\n\n const parent = element.parent();\n const domElem = element[0];\n const domElemStyle = domElem.style;\n const computed = window.getComputedStyle(element[0], null);\n const newlines = element.children().length || config.lines;\n const minFontSize = config.min === 'inherit' ? computed['font-size'] : config.min;\n const maxFontSize = config.max === 'inherit' ? computed['font-size'] : config.max;\n const lineHeight = computed['line-height'];\n const display = computed['display'];\n let resizePromise;\n\n function calculate() {\n const ratio = (config.calcSize * newlines) / domElem.offsetWidth / newlines;\n return Math.max(Math.min(getMaxFontSize(ratio), parseFloat(maxFontSize)), parseFloat(minFontSize));\n }\n\n function getMaxFontSize(ratio) {\n const paddingLeft = parseFloat(getComputedStyle(parent[0]).paddingLeft);\n const paddingRight = parseFloat(getComputedStyle(parent[0]).paddingRight);\n\n return (parent[0].offsetWidth - (paddingLeft + paddingRight)) * ratio * config.compressor;\n }\n\n function resize() {\n if (domElem.offsetHeight * domElem.offsetWidth === 0) {\n return;\n }\n\n // Preset standard values for making the size calculation\n domElemStyle.fontSize = config.calcSize + 'px';\n domElemStyle.lineHeight = '1';\n domElemStyle.display = 'inline-block';\n\n // Set usage values\n domElemStyle.fontSize = calculate() + 'px';\n domElemStyle.lineHeight = lineHeight;\n domElemStyle.display = display;\n }\n\n function resizer() {\n if (resizePromise) {\n $timeout.cancel(resizePromise);\n }\n\n resizePromise = $timeout(function () {\n resize();\n }, config.loadDelay);\n }\n\n scope.$watch(function () {\n return [\n parent[0].offsetWidth,\n element[0].offsetWidth\n ].join('_');\n }, function () {\n resizer();\n });\n\n $(window).on('resize', config.debounce(function () {\n scope.$apply(resizer)\n }, config.delay));\n\n scope.$on('$destroy', function () {\n if (resizePromise) {\n $timeout.cancel(resizePromise);\n }\n $(window).off('resize');\n });\n }\n };\n}\n","angular\n .module('graphdb.framework.explore.services', [])\n .factory('StatementsService', StatementsService);\n\nStatementsService.$inject = [];\n\nfunction StatementsService() {\n function transformToTrig(statements) {\n let data = '';\n const contexts = {};\n\n for (let i = 0; i < statements.length; i++) {\n const statement = statements[i];\n if (statement.context === undefined) {\n statement.context = '';\n } else {\n statement.context = _.trim(statement.context);\n }\n if (angular.isUndefined(contexts[statement.context])) {\n const cstatement = [];\n cstatement.push(statement);\n contexts[statement.context] = cstatement;\n } else {\n contexts[statement.context].push(statement);\n }\n }\n\n const ckeys = Object.keys(contexts);\n for (let i = 0; i < ckeys.length; i++) {\n const key = ckeys[i];\n if (key === '') {\n data += '\\n{';\n } else {\n data += '\\n<' + key + '> {';\n }\n\n const value = contexts[key];\n for (let j = 0; j < value.length; j++) {\n const statement = value[j];\n data += '\\n\\t<' + statement.subject + '> <' + statement.predicate + '> ';\n if (statement.object.type === 'uri') {\n data += '<' + statement.object.value + '> .';\n } else {\n data += '\"\"\"' + statement.object.value + '\"\"\"' + (statement.object.datatype ? '^^<' + statement.object.datatype + '>' : (statement.object.lang ? '@' + statement.object.lang : '')) + ' .';\n }\n }\n\n data += '\\n}';\n }\n\n return data;\n }\n\n function buildStatements(res, uri) {\n const statements = [];\n if (!_.isEmpty(res.data)) {\n const graph = res.data[uri];\n const predicates = Object.keys(graph);\n for (let i = 0; i < predicates.length; i++) {\n const predicate = predicates[i];\n const objects = graph[predicate];\n for (let j = 0; j < objects.length; j++) {\n const object = objects[j];\n for (let k = 0; k < object.graphs.length; k++) {\n let context = object.graphs[k];\n if (context === 'http://www.ontotext.com/explicit') {\n // Statements in the default context are special\n context = '';\n }\n if (object.lang) {\n object.datatype = '';\n }\n if (!object.datatype) {\n object.datatype = '';\n }\n statements.push({\n subject: uri,\n predicate: predicate,\n object: {\n value: object.value,\n type: object.type,\n datatype: object.datatype,\n lang: object.lang\n },\n context: context\n });\n }\n }\n }\n }\n return statements;\n }\n\n function getDatatypeOptions() {\n return [\n {\n value: '',\n label: 'string'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#boolean',\n label: 'boolean'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#decimal',\n label: 'decimal'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#integer',\n label: 'integer'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#double',\n label: 'double'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#float',\n label: 'float'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#date',\n label: 'date'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#time',\n label: 'time'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#dateTime',\n label: 'date time'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#byte',\n label: 'byte'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#short',\n label: 'short'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#int',\n label: 'int'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#long',\n label: 'long'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#unsignedByte',\n label: 'unsigned byte'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#unsignedShort',\n label: 'unsigned short'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#unsignedInt',\n label: 'unsigned int'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#unsignedLong',\n label: 'unsigned long'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#positoveInteger',\n label: 'positive integer'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#nonNegativeInteger',\n label: 'non-negative integer'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#negativeInteger',\n label: 'negative integer'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#nonPositiveInteger',\n label: 'non-positive integer'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#gYear',\n label: 'gYear'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#gMonth',\n label: 'gMonth'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#gDay',\n label: 'gDay'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#gYearMonth',\n label: 'gYearMonth'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#gMonthDay',\n label: 'gMonthDay'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#duration',\n label: 'duration'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#hexBinary',\n label: 'hex binary'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#base64Binary',\n label: 'base64 binary'\n }\n ];\n }\n\n return {\n transformToTrig: transformToTrig,\n buildStatements: buildStatements,\n getDatatypeOptions: getDatatypeOptions\n };\n}\n","import 'angular/utils/uri-utils';\n\nconst exploreDirectives = angular.module('graphdb.framework.explore.directives', [\n 'graphdb.framework.utils.uriutils'\n]);\n\nexploreDirectives.directive('uri', ['UriUtils', function (UriUtils) {\n return {\n require: 'ngModel',\n link: function (scope, elem, attr, ngModel) {\n\n //For DOM -> model validation\n ngModel.$parsers.unshift(function (value) {\n if (!angular.isUndefined(value) && value.length > 0) {\n const isValidUri = UriUtils.validateRdfUri(value);\n ngModel.$setValidity('searchStr', isValidUri);\n return isValidUri ? value : undefined;\n } else {\n ngModel.$setValidity('searchStr', true);\n return value;\n }\n });\n\n //For model -> DOM validation\n ngModel.$formatters.unshift(function (value) {\n if (!angular.isUndefined(value)) {\n ngModel.$setValidity('searchStr', UriUtils.validateRdfUri);\n }\n return value;\n });\n }\n };\n}]);\n","import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/explore/statements.service';\nimport 'angular/explore/controllers';\nimport 'angular/explore/directives';\nimport 'angular-xeditable/dist/js/xeditable.min';\nimport 'lib/angucomplete-alt/angucomplete-alt-onto.min';\nimport 'angular/core/directives/fit-text.directive';\n\nconst modules = [\n 'ngRoute',\n 'toastr',\n 'xeditable',\n 'angucomplete-alt-onto',\n 'graphdb.framework.explore.services',\n 'graphdb.framework.explore.controllers',\n 'graphdb.framework.explore.directives',\n 'graphdb.framework.core.directives.fittext'\n];\n\nangular.module('graphdb.framework.explore', modules);\n"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[22],{206:function(e,t,n){"use strict";var r=r||{};r.Text=function(){function e(e,t,n,r){n=n||10;var i=t/3;return"string"==typeof e?(i*=10/(e.substring(0,t/3).length+1.5),i+=1,e.match(/[\u0900-\u0DFF\u1100-\u11FF\u2E80-\u2EFF\u3000-\u9FFF]/)&&(i*=.6),i<n&&(i=n),Math.round(i)):(i<n&&(i=n),Math.round(i))}return{calcFontSizeRaw:e,calcFontSize:function(t,n,r,i){return e(t,n,r)+"px"},getTextWithElipsisIfNeeded:function(e,t){return"string"==typeof e&&e.length>t?e.substring(0,t-3)+"...":e}}}(),r.Transition={fadeIn:function(e,t){e.style("opacity",0).transition().duration(t).style("opacity",1)},fadeOut:function(e,t){e.style("opacity",1).transition().duration(t).style("opacity",0)}},r.Click={delayDblClick:function(){var e=d3.dispatch("click","dblclick");return d3.rebind((function(t){var n,r=null;t.on("mousedown",(function(){n=d3.mouse(document.body),new Date})),t.on("mouseup",(function(t){var i,a;i=n,a=d3.mouse(document.body),Math.sqrt(Math.pow(i[0]-a[0],2),Math.pow(i[1]-a[1],2))>5||(r?(window.clearTimeout(r),r=null,e.dblclick(t)):r=window.setTimeout((d3.event,function(){e.click(t),r=null}),250))}))}),e,"on")}},t.a=r},207:function(e,t,n){"use strict";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(){var e=d3.selectAll("svg").attr({version:"1.1",xmlns:"http://www.w3.org/2000/svg"}).node().parentNode.innerHTML;return"data:image/svg+xml;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(e)))}},t.a=r},209:function(e,t,n){var r,i,a;i=[],void 0===(a="function"==typeof(r=function(){return function(){var e=function(){return"n"},t=function(){return[0,0]},n=function(){return" "},r=u(),i=null,a=null,o=null,s=null;function l(e){var t;i="svg"===(t=(t=e).node()).tagName.toLowerCase()?t:t.ownerSVGElement,a=i.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 i,a=n.apply(this,r),u=t.apply(this,r),h=e.apply(this,r),p=f(),v=d.length,y=document.documentElement.scrollTop||document.body.scrollTop,g=document.documentElement.scrollLeft||document.body.scrollLeft,m=s.apply(this,r);for(p.html(a).style({opacity:1,"pointer-events":"all"});v--;)p.classed(d[v],!1);return i=c.get(h).apply(this),m?p.style(m):p.classed(h,!0).style({top:i.top+u[0]+y+"px",left:i.left+u[1]+g+"px"}),l},l.hide=function(){return f().style({opacity:0,"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:d3.functor(t),l):e},l.offset=function(e){return arguments.length?(t=null==e?e:d3.functor(e),l):t},l.html=function(e){return arguments.length?(n=null==e?e:d3.functor(e),l):n},l.customPosition=function(e){return arguments.length?(s=null==e?e:d3.functor(e),l):s},l.destroy=function(){return r&&(f().remove(),r=null),l};var c=d3.map({n:function(){var e=h();return{top:e.n.y-r.offsetHeight,left:e.n.x-r.offsetWidth/2}},s:function(){var e=h();return{top:e.s.y,left:e.s.x-r.offsetWidth/2}},e:function(){var e=h();return{top:e.e.y-r.offsetHeight/2,left:e.e.x}},w:function(){var e=h();return{top:e.w.y-r.offsetHeight/2,left:e.w.x-r.offsetWidth}},nw:function(){var e=h();return{top:e.nw.y-r.offsetHeight,left:e.nw.x-r.offsetWidth}},ne:function(){var e=h();return{top:e.ne.y-r.offsetHeight,left:e.ne.x}},sw:function(){var e=h();return{top:e.sw.y,left:e.sw.x-r.offsetWidth}},se:function(){var e=h();return{top:e.se.y,left:e.e.x}}}),d=c.keys();function u(){var e=d3.select(document.createElement("div"));return e.style({position:"absolute",top:0,opacity:0,"pointer-events":"none","box-sizing":"border-box"}),e.node()}function f(){return null===r&&(r=u(),document.body.appendChild(r)),d3.select(r)}function h(){for(var e=o||d3.event.target;void 0===e.getScreenCTM&&"undefined"===e.parentNode;)e=e.parentNode;var t={},n=e.getScreenCTM(),r=e.getBBox(),i=r.width,s=r.height,l=r.x,c=r.y;return a.x=l,a.y=c,t.nw=a.matrixTransform(n),a.x+=i,t.ne=a.matrixTransform(n),a.y+=s,t.se=a.matrixTransform(n),a.x-=i,t.sw=a.matrixTransform(n),a.y-=s/2,t.w=a.matrixTransform(n),a.x+=i,t.e=a.matrixTransform(n),a.x-=i/2,a.y-=s/2,t.n=a.matrixTransform(n),a.y+=s,t.s=a.matrixTransform(n),t}return l}})?r.apply(t,i):r)||(e.exports=a)},215: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 i=1.2*t.size;n&&(i=.1*t.children[0].size),t.children.push({name:"placeholder",size:i})}}},removePlaceholders:function e(t){for(var n=t.length-1;n>=0;n--){var r=t[n];"placeholder"===r.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,i(n.children[0],r)}}function i(e,t){if(e.children)for(var n=0;n<e.children.length;n++)e.children[n].x+=t,i(e.children[n],t)}},makePositionsRelativeToZero:function(e){for(var t=e[0].x,n=e[0].y,r=0;r<e.length;r++){var i=e[r];i.x-=t,i.y-=n}}},t.a=r},59:function(e,t,n){"use strict";n.r(t);var r=n(209),i=n.n(r),a=n(215),o=n(206),s=n(207);n(4);function l(e,t,n,r,l,c,d,u,f,h,p){return{restrict:"AE",template:'<div id="classChart"></div>',scope:{classHierarchyData:"=",flattenedClassNames:"=",selectedClass:"=",currentSliderValue:"=",showClassInfoPanel:"=",showExternalElements:"=",hidePrefixes:"=",currentBrowserLimit:"="},link:function(v,y,g){!function(v,y){var g=800,m=800,x=m,w=20,S=d3.layout.pack().size([x-w,x-w]).value((function(e){return e.size})),C=d3.scale.linear().domain([0,4]).range(["hsl(19, 70%, 90%)","hsl(19, 70%, 50%)"]).interpolate(d3.interpolateHcl),E=d3.select("#classChart").insert("svg:svg","h2").attr("viewBox","0 0 "+g+" "+m).attr("preserveAspectRatio","xMidYMid meet").on("dblclick.zoom",null);function R(){return E.append("svg:g").attr({id:"main-group",transform:"translate("+g/2+","+m/2+")"})}function T(){return"true"===h.get(p.CLASS_HIERARCHY_HIDE_PREFIXES)}function A(){var e=s.a.Export.getCSSRules("css/rdf-class-hierarchy-labels.css?v=1.11.1");d3.selectAll("#main-group").append("defs"),$("defs").append('<style type="text/css"><![CDATA['+e+"]]></style>"),d3.selectAll("g").style("opacity",1);var t=s.a.Export.generateBase64ImageSource();d3.select(this).attr({href:t,download:"class-hierarchy-"+c.getActiveRepository()+".svg"})}v.hidePrefixes=T();var H,P,I=R();if(!v.classHierarchyData.classCount&&c.getActiveRepository()&&!c.isSystemRepository()){e.loader=!0,e.hierarchyError=!1;const t=h.get(`classHierarchy-selectedGraph-${c.getActiveRepository()}`);n.getClassHierarchyData(null!==t?t.contextID.uri:"").success((function(t,n,r){e.loader=!1,207===n&&d.warning("You can update the diagram by pressing the reload button.","Repository data has changed"),v.classHierarchyData=t,d3.select("#download-svg").on("mouseover",A)})).error((function(t){e.loader=!1,e.hierarchyError=getError(t),d.error("Request for "+f+" failed! "+getError(t))}))}var b,k,F,L,D,N,z,O,U={};function M(n,s,c,d){F&&F(),L&&L(),d3.selectAll("#main-group").remove(),I=R(),a.a.SingleChild.addPlaceholders(n,!0),k=c||n;var h,p=S.nodes(n);k.isInFocusTransitive=!0,a.a.SingleChild.removePlaceholders(p),a.a.SingleChild.centerNodes(p),a.a.SingleChild.makePositionsRelativeToZero(p);var y=i()().attr("class","d3-tip").customPosition((function(e){return{top:"inherit",bottom:r.innerHeight-d3.event.clientY+"px",right:r.innerWidth-d3.event.clientX+"px"}})).html((function(e){return e.name}));E.call(y);var g=I.selectAll("circle").data(p).enter().append("g");s.doFade&&g.each((function(e){o.a.Transition.fadeIn(d3.select(this),550)}));var m,T=[],A=g.append("circle").attr("class",(function(e){return e.role})).style("fill",(function(e){return e.children?C(e.depth):"#E0D0D0"})).each((function(e){if(e.circle=d3.select(this),e.name!==f){var t=e.name;T.push({name:t}),U[[t]]=e,e.circle.classed("rdf-class",!0),e.circle.on("mouseover",(function(){s.noPrefixes?y.show(e):e.textHidden?y.show(e):y.hide(e)})),e.circle.on("mouseout",y.hide)}}));function D(e){d3.selectAll(".selected").classed("selected",e.selected=!1),e.circle.classed("selected",e.selected=!0),m=e}function N(){v.showClassInfoPanel=!1}T&&(T=_.uniqBy(T,"name"),v.flattenedClassNames=T);var $=o.a.Click.delayDblClick();d3.selectAll(".parent, .topLevelParent, .child, .root").call($);P=function(e){Z(e),e.name===f?(N(),d3.selectAll(".selected").classed("selected",!1)):(D(e),v.selectedClass=m,v.showClassInfoPanel=!0,v.$on("sidePanelClosed",(function(t){d3.selectAll(".selected").classed("selected",e.selected=!1)})))},$.on("click",(function(e){e.id&&r.history.pushState({id:e.id},"classHierarchyPage"+e.id,"hierarchy#"+e.id),y.hide(),P(e)})),$.on("dblclick",(function(t){t!==n&&(y.hide(),D(t),e.$broadcast("goToDomainRangeGraphView",m,k),d3.event.stopPropagation())}));var z=0;E.on("wheel",(function(){y.hide();var e=d3.event;e.preventDefault(),e.stopPropagation();var t=(new Date).getTime();if(t-z>100){z=t;var n="";e.deltaY<=-1?n="in":e.deltaY>=1&&(n="out");var i=e.target.__data__;if(i||(i=k),"in"===n){if(i!==k){for(;i.parent&&!i.parent.isInFocusTransitive;)i=i.parent;i.depth<k.depth&&(i=k)}if(i===k&&i.children){for(var a=i.children[0],o=1;o<i.children.length;o++)i.children[o].sortingRank>a.sortingRank&&(a=i.children[o]);i=a}Z(i,!0)}else"out"===n&&(i=k.parent)&&Z(i,!0);k.name===f&&r.history.replaceState({id:1},"classHierarchyPage1","hierarchy#1"),V()}}));var O=I.selectAll("text").data(p).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)}));s.noPrefixes?(b!==n&&(O.each((function(e){var t=e.name.indexOf(":");e.name.indexOf("http://")>-1?e.noPrefixName=e.name:t>-1&&(e.noPrefixName=e.name.substring(t+1))})),b=n),O.style("font-size",(function(e){return o.a.Text.calcFontSize(e.noPrefixName,e.r)})).text((function(e){return o.a.Text.getTextWithElipsisIfNeeded(e.noPrefixName,e.r/3)}))):O.style("font-size",(function(e){return o.a.Text.calcFontSize(e.name,e.r)})).text((function(e){return o.a.Text.getTextWithElipsisIfNeeded(e.name,e.r/3)})),O.style("display",(function(e){return e.parent===n?(e.textHidden=this.textContent.indexOf("...")+3===this.textContent.length,null):(e.textHidden=!0,"none")})),s.doFade&&!s.keepPrevState&&O.each((function(e){o.a.Transition.fadeIn(d3.select(this),550)})),H=function(){function e(e){e&&A.each((function(t){e==t.id&&P(t)}))}var n=t.hash();r.onpopstate=function(t){t.state&&e(t.state.id)},e(n)};var M=I.selectAll("circle, text");function W(e,t){var n=x/e[2];h=e,M.attr("transform",(function(t){return"translate("+(t.x-e[0])*n+","+(t.y-e[1])*n+")"})),A.attr("r",(function(e){return e.r*n})),t&&O.each((function(e){e.fullName!==k.topLevelParentUri&&k.topLevelParentUri!==f||(e.textSel.style("display","none"),k.children&&k.children.length?_.each(k.children,(function(e){e.textSel.style("display","inline")})):k.textSel.style("display","inline"),k.parent&&_.each(k.parent.children,(function(e){e.name!==k.name&&e.textSel.style("display","inline")})))})),O.style("font-size",(function(e){return s.noPrefixes?o.a.Text.calcFontSize(e.noPrefixName,e.r*n):o.a.Text.calcFontSize(e.name,e.r*n)})).text((function(e){return s.noPrefixes?o.a.Text.getTextWithElipsisIfNeeded(e.noPrefixName,e.r*n/3):o.a.Text.getTextWithElipsisIfNeeded(e.name,e.r*n/3)}))}function Y(e){var t=2*e+w;return 2*e/t<.3&&(t=2*e+2),t}function B(e){!e.isInFocusTransitive&&e.parent&&e.parent.isInFocusTransitive||(e.textHidden=!0,this.style.display="none")}function G(e){!e.isInFocusTransitive&&e.parent&&e.parent.isInFocusTransitive&&(e.textHidden=this.textContent.indexOf("...")+3===this.textContent.length,this.style.display="")}function Z(e,t){if(l((function(){v.showExternalElements=e.name===f})),e.id&&r.history.replaceState({id:e.id},"classHierarchyPage"+e.id,"hierarchy#"+e.id),k!==e){if(t&&(N(),d3.selectAll(".selected").classed("selected",!1)),k.parent)for(var n=k;n;)n.isInFocusTransitive=!1,n=n.parent;for(n=e;n;)n.isInFocusTransitive=n.children,n=n.parent;if(2*(k=e).r/(2*k.r+w)<.3||v.currentSliderValue>v.currentBrowserLimit)W([k.x,k.y,Y(k.r)]),O.each((function(e){B.call(this,e),G.call(this,e)}));else d3.transition().duration(u).tween("zoom",(function(e){var t=d3.interpolateZoom(h,[k.x,k.y,Y(k.r)]);return function(e){W(t(e))}})).selectAll("text").each("start",B).each("end",G)}}W([k.x,k.y,Y(k.r)],d),F=v.$on("rootFocus",(function(){r.history.pushState({id:1},"classHierarchyPage1","hierarchy#1"),P(n)})),L=v.$on("classSearch",(function(e){P(e)}))}function V(){var t=v.classHierarchyData.classCount;let n=h.get(p.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);(!n||n>t)&&(n=t,h.set(p.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE,n)),e.$broadcast("classCount",t,n)}window.addEventListener("resize",V),window.addEventListener("beforeunload",(function e(){window.removeEventListener("resize",V),window.removeEventListener("beforeunload",e)})),v.$watch("classHierarchyData",(function(){D&&D(),N&&N(),z&&z(),O&&O();var e=T();if(v.classHierarchyData.classCount){V();var t=angular.copy(v.classHierarchyData);var n,r,i=function(e){return S.nodes(e).sort((function(e,t){return e.sortingRank>t.sortingRank?-1:e.sortingRank<t.sortingRank?1:e.depth>t.depth?1:e.depth<t.depth?-1:0}))}(t);function a(e,t){var i={keepPrevState:!0,noPrefixes:T()};r=i.noPrefixes,M(n||e,i,k,!0),l((function(){h.set(p.CLASS_HIERARCHY_SWITCH_PREFIXES,t),H()}),70)}function o(e,i,o){if(e){h.set(p.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE,e),n={name:f,children:[]};for(var s=new Set,l=1;l<=e;l++)s.add(i[l].id),i[l].parent===i[0]&&n.children.push(i[l]);if(function e(t){if(t.children){for(var n=[],r=0;r<t.children.length;r++)s.has(t.children[r].id)&&n.push($.extend({},t.children[r]));t.children=n;for(r=0;r<t.children.length;r++)e(t.children[r])}}(n),o)r=angular.isUndefined(r)?T():r,M(n,{noPrefixes:r});else a(t)}}var s,c=h.get(p.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);if(c)o(c,i);else{var d={doFade:!0,keepPrevState:!0,noPrefixes:T()};M(t,d),H()}D=v.$watch("hidePrefixes",(function(n){angular.isUndefined(n)||e?e=void 0:l((function(){!function(e){angular.isUndefined(e)||h.set(p.CLASS_HIERARCHY_HIDE_PREFIXES,e)}(n),a(t,!0)}),50)}),!0),N=v.$watch("currentSliderValue",(function(e){o(e,i,!0)}),!0),O=v.$on("onEnterKeypressSearchAction",(function(e){s&&P(s)})),z=v.$on("searchedClass",(function(e,t){(s=U[t.name])&&P(s)}))}}),!0)}(v)}}}angular.module("graphdb.framework.graphexplore.directives.class",["graphdb.framework.graphexplore.controllers.class","graphdb.framework.utils.localstorageadapter"]).constant("ZOOM_DURATION",500).constant("ROOT_OBJ_NAME","RDF Class Hierarchy").directive("rdfClassHierarchy",l),l.$inject=["$rootScope","$location","GraphDataRestService","$window","$timeout","$repositories","toastr","ZOOM_DURATION","ROOT_OBJ_NAME","LocalStorageAdapter","LSKeys"]}}]);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[22],{206:function(e,t,n){"use strict";var r=r||{};r.Text=function(){function e(e,t,n,r){n=n||10;var i=t/3;return"string"==typeof e?(i*=10/(e.substring(0,t/3).length+1.5),i+=1,e.match(/[\u0900-\u0DFF\u1100-\u11FF\u2E80-\u2EFF\u3000-\u9FFF]/)&&(i*=.6),i<n&&(i=n),Math.round(i)):(i<n&&(i=n),Math.round(i))}return{calcFontSizeRaw:e,calcFontSize:function(t,n,r,i){return e(t,n,r)+"px"},getTextWithElipsisIfNeeded:function(e,t){return"string"==typeof e&&e.length>t?e.substring(0,t-3)+"...":e}}}(),r.Transition={fadeIn:function(e,t){e.style("opacity",0).transition().duration(t).style("opacity",1)},fadeOut:function(e,t){e.style("opacity",1).transition().duration(t).style("opacity",0)}},r.Click={delayDblClick:function(){var e=d3.dispatch("click","dblclick");return d3.rebind((function(t){var n,r=null;t.on("mousedown",(function(){n=d3.mouse(document.body),new Date})),t.on("mouseup",(function(t){var i,a;i=n,a=d3.mouse(document.body),Math.sqrt(Math.pow(i[0]-a[0],2),Math.pow(i[1]-a[1],2))>5||(r?(window.clearTimeout(r),r=null,e.dblclick(t)):r=window.setTimeout((d3.event,function(){e.click(t),r=null}),250))}))}),e,"on")}},t.a=r},207:function(e,t,n){"use strict";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(){var e=d3.selectAll("svg").attr({version:"1.1",xmlns:"http://www.w3.org/2000/svg"}).node().parentNode.innerHTML;return"data:image/svg+xml;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(e)))}},t.a=r},209:function(e,t,n){var r,i,a;i=[],void 0===(a="function"==typeof(r=function(){return function(){var e=function(){return"n"},t=function(){return[0,0]},n=function(){return" "},r=u(),i=null,a=null,o=null,s=null;function l(e){var t;i="svg"===(t=(t=e).node()).tagName.toLowerCase()?t:t.ownerSVGElement,a=i.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 i,a=n.apply(this,r),u=t.apply(this,r),h=e.apply(this,r),p=f(),v=d.length,y=document.documentElement.scrollTop||document.body.scrollTop,g=document.documentElement.scrollLeft||document.body.scrollLeft,m=s.apply(this,r);for(p.html(a).style({opacity:1,"pointer-events":"all"});v--;)p.classed(d[v],!1);return i=c.get(h).apply(this),m?p.style(m):p.classed(h,!0).style({top:i.top+u[0]+y+"px",left:i.left+u[1]+g+"px"}),l},l.hide=function(){return f().style({opacity:0,"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:d3.functor(t),l):e},l.offset=function(e){return arguments.length?(t=null==e?e:d3.functor(e),l):t},l.html=function(e){return arguments.length?(n=null==e?e:d3.functor(e),l):n},l.customPosition=function(e){return arguments.length?(s=null==e?e:d3.functor(e),l):s},l.destroy=function(){return r&&(f().remove(),r=null),l};var c=d3.map({n:function(){var e=h();return{top:e.n.y-r.offsetHeight,left:e.n.x-r.offsetWidth/2}},s:function(){var e=h();return{top:e.s.y,left:e.s.x-r.offsetWidth/2}},e:function(){var e=h();return{top:e.e.y-r.offsetHeight/2,left:e.e.x}},w:function(){var e=h();return{top:e.w.y-r.offsetHeight/2,left:e.w.x-r.offsetWidth}},nw:function(){var e=h();return{top:e.nw.y-r.offsetHeight,left:e.nw.x-r.offsetWidth}},ne:function(){var e=h();return{top:e.ne.y-r.offsetHeight,left:e.ne.x}},sw:function(){var e=h();return{top:e.sw.y,left:e.sw.x-r.offsetWidth}},se:function(){var e=h();return{top:e.se.y,left:e.e.x}}}),d=c.keys();function u(){var e=d3.select(document.createElement("div"));return e.style({position:"absolute",top:0,opacity:0,"pointer-events":"none","box-sizing":"border-box"}),e.node()}function f(){return null===r&&(r=u(),document.body.appendChild(r)),d3.select(r)}function h(){for(var e=o||d3.event.target;void 0===e.getScreenCTM&&"undefined"===e.parentNode;)e=e.parentNode;var t={},n=e.getScreenCTM(),r=e.getBBox(),i=r.width,s=r.height,l=r.x,c=r.y;return a.x=l,a.y=c,t.nw=a.matrixTransform(n),a.x+=i,t.ne=a.matrixTransform(n),a.y+=s,t.se=a.matrixTransform(n),a.x-=i,t.sw=a.matrixTransform(n),a.y-=s/2,t.w=a.matrixTransform(n),a.x+=i,t.e=a.matrixTransform(n),a.x-=i/2,a.y-=s/2,t.n=a.matrixTransform(n),a.y+=s,t.s=a.matrixTransform(n),t}return l}})?r.apply(t,i):r)||(e.exports=a)},215: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 i=1.2*t.size;n&&(i=.1*t.children[0].size),t.children.push({name:"placeholder",size:i})}}},removePlaceholders:function e(t){for(var n=t.length-1;n>=0;n--){var r=t[n];"placeholder"===r.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,i(n.children[0],r)}}function i(e,t){if(e.children)for(var n=0;n<e.children.length;n++)e.children[n].x+=t,i(e.children[n],t)}},makePositionsRelativeToZero:function(e){for(var t=e[0].x,n=e[0].y,r=0;r<e.length;r++){var i=e[r];i.x-=t,i.y-=n}}},t.a=r},59:function(e,t,n){"use strict";n.r(t);var r=n(209),i=n.n(r),a=n(215),o=n(206),s=n(207);n(4);function l(e,t,n,r,l,c,d,u,f,h,p){return{restrict:"AE",template:'<div id="classChart"></div>',scope:{classHierarchyData:"=",flattenedClassNames:"=",selectedClass:"=",currentSliderValue:"=",showClassInfoPanel:"=",showExternalElements:"=",hidePrefixes:"=",currentBrowserLimit:"="},link:function(v,y,g){!function(v,y){var g=800,m=800,x=m,w=20,S=d3.layout.pack().size([x-w,x-w]).value((function(e){return e.size})),C=d3.scale.linear().domain([0,4]).range(["hsl(19, 70%, 90%)","hsl(19, 70%, 50%)"]).interpolate(d3.interpolateHcl),E=d3.select("#classChart").insert("svg:svg","h2").attr("viewBox","0 0 "+g+" "+m).attr("preserveAspectRatio","xMidYMid meet").on("dblclick.zoom",null);function R(){return E.append("svg:g").attr({id:"main-group",transform:"translate("+g/2+","+m/2+")"})}function T(){return"true"===h.get(p.CLASS_HIERARCHY_HIDE_PREFIXES)}function A(){var e=s.a.Export.getCSSRules("css/rdf-class-hierarchy-labels.css?v=1.11.2");d3.selectAll("#main-group").append("defs"),$("defs").append('<style type="text/css"><![CDATA['+e+"]]></style>"),d3.selectAll("g").style("opacity",1);var t=s.a.Export.generateBase64ImageSource();d3.select(this).attr({href:t,download:"class-hierarchy-"+c.getActiveRepository()+".svg"})}v.hidePrefixes=T();var H,P,I=R();if(!v.classHierarchyData.classCount&&c.getActiveRepository()&&!c.isSystemRepository()){e.loader=!0,e.hierarchyError=!1;const t=h.get(`classHierarchy-selectedGraph-${c.getActiveRepository()}`);n.getClassHierarchyData(null!==t?t.contextID.uri:"").success((function(t,n,r){e.loader=!1,207===n&&d.warning("You can update the diagram by pressing the reload button.","Repository data has changed"),v.classHierarchyData=t,d3.select("#download-svg").on("mouseover",A)})).error((function(t){e.loader=!1,e.hierarchyError=getError(t),d.error("Request for "+f+" failed! "+getError(t))}))}var b,k,F,L,D,N,z,O,U={};function M(n,s,c,d){F&&F(),L&&L(),d3.selectAll("#main-group").remove(),I=R(),a.a.SingleChild.addPlaceholders(n,!0),k=c||n;var h,p=S.nodes(n);k.isInFocusTransitive=!0,a.a.SingleChild.removePlaceholders(p),a.a.SingleChild.centerNodes(p),a.a.SingleChild.makePositionsRelativeToZero(p);var y=i()().attr("class","d3-tip").customPosition((function(e){return{top:"inherit",bottom:r.innerHeight-d3.event.clientY+"px",right:r.innerWidth-d3.event.clientX+"px"}})).html((function(e){return e.name}));E.call(y);var g=I.selectAll("circle").data(p).enter().append("g");s.doFade&&g.each((function(e){o.a.Transition.fadeIn(d3.select(this),550)}));var m,T=[],A=g.append("circle").attr("class",(function(e){return e.role})).style("fill",(function(e){return e.children?C(e.depth):"#E0D0D0"})).each((function(e){if(e.circle=d3.select(this),e.name!==f){var t=e.name;T.push({name:t}),U[[t]]=e,e.circle.classed("rdf-class",!0),e.circle.on("mouseover",(function(){s.noPrefixes?y.show(e):e.textHidden?y.show(e):y.hide(e)})),e.circle.on("mouseout",y.hide)}}));function D(e){d3.selectAll(".selected").classed("selected",e.selected=!1),e.circle.classed("selected",e.selected=!0),m=e}function N(){v.showClassInfoPanel=!1}T&&(T=_.uniqBy(T,"name"),v.flattenedClassNames=T);var $=o.a.Click.delayDblClick();d3.selectAll(".parent, .topLevelParent, .child, .root").call($);P=function(e){Z(e),e.name===f?(N(),d3.selectAll(".selected").classed("selected",!1)):(D(e),v.selectedClass=m,v.showClassInfoPanel=!0,v.$on("sidePanelClosed",(function(t){d3.selectAll(".selected").classed("selected",e.selected=!1)})))},$.on("click",(function(e){e.id&&r.history.pushState({id:e.id},"classHierarchyPage"+e.id,"hierarchy#"+e.id),y.hide(),P(e)})),$.on("dblclick",(function(t){t!==n&&(y.hide(),D(t),e.$broadcast("goToDomainRangeGraphView",m,k),d3.event.stopPropagation())}));var z=0;E.on("wheel",(function(){y.hide();var e=d3.event;e.preventDefault(),e.stopPropagation();var t=(new Date).getTime();if(t-z>100){z=t;var n="";e.deltaY<=-1?n="in":e.deltaY>=1&&(n="out");var i=e.target.__data__;if(i||(i=k),"in"===n){if(i!==k){for(;i.parent&&!i.parent.isInFocusTransitive;)i=i.parent;i.depth<k.depth&&(i=k)}if(i===k&&i.children){for(var a=i.children[0],o=1;o<i.children.length;o++)i.children[o].sortingRank>a.sortingRank&&(a=i.children[o]);i=a}Z(i,!0)}else"out"===n&&(i=k.parent)&&Z(i,!0);k.name===f&&r.history.replaceState({id:1},"classHierarchyPage1","hierarchy#1"),V()}}));var O=I.selectAll("text").data(p).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)}));s.noPrefixes?(b!==n&&(O.each((function(e){var t=e.name.indexOf(":");e.name.indexOf("http://")>-1?e.noPrefixName=e.name:t>-1&&(e.noPrefixName=e.name.substring(t+1))})),b=n),O.style("font-size",(function(e){return o.a.Text.calcFontSize(e.noPrefixName,e.r)})).text((function(e){return o.a.Text.getTextWithElipsisIfNeeded(e.noPrefixName,e.r/3)}))):O.style("font-size",(function(e){return o.a.Text.calcFontSize(e.name,e.r)})).text((function(e){return o.a.Text.getTextWithElipsisIfNeeded(e.name,e.r/3)})),O.style("display",(function(e){return e.parent===n?(e.textHidden=this.textContent.indexOf("...")+3===this.textContent.length,null):(e.textHidden=!0,"none")})),s.doFade&&!s.keepPrevState&&O.each((function(e){o.a.Transition.fadeIn(d3.select(this),550)})),H=function(){function e(e){e&&A.each((function(t){e==t.id&&P(t)}))}var n=t.hash();r.onpopstate=function(t){t.state&&e(t.state.id)},e(n)};var M=I.selectAll("circle, text");function W(e,t){var n=x/e[2];h=e,M.attr("transform",(function(t){return"translate("+(t.x-e[0])*n+","+(t.y-e[1])*n+")"})),A.attr("r",(function(e){return e.r*n})),t&&O.each((function(e){e.fullName!==k.topLevelParentUri&&k.topLevelParentUri!==f||(e.textSel.style("display","none"),k.children&&k.children.length?_.each(k.children,(function(e){e.textSel.style("display","inline")})):k.textSel.style("display","inline"),k.parent&&_.each(k.parent.children,(function(e){e.name!==k.name&&e.textSel.style("display","inline")})))})),O.style("font-size",(function(e){return s.noPrefixes?o.a.Text.calcFontSize(e.noPrefixName,e.r*n):o.a.Text.calcFontSize(e.name,e.r*n)})).text((function(e){return s.noPrefixes?o.a.Text.getTextWithElipsisIfNeeded(e.noPrefixName,e.r*n/3):o.a.Text.getTextWithElipsisIfNeeded(e.name,e.r*n/3)}))}function Y(e){var t=2*e+w;return 2*e/t<.3&&(t=2*e+2),t}function B(e){!e.isInFocusTransitive&&e.parent&&e.parent.isInFocusTransitive||(e.textHidden=!0,this.style.display="none")}function G(e){!e.isInFocusTransitive&&e.parent&&e.parent.isInFocusTransitive&&(e.textHidden=this.textContent.indexOf("...")+3===this.textContent.length,this.style.display="")}function Z(e,t){if(l((function(){v.showExternalElements=e.name===f})),e.id&&r.history.replaceState({id:e.id},"classHierarchyPage"+e.id,"hierarchy#"+e.id),k!==e){if(t&&(N(),d3.selectAll(".selected").classed("selected",!1)),k.parent)for(var n=k;n;)n.isInFocusTransitive=!1,n=n.parent;for(n=e;n;)n.isInFocusTransitive=n.children,n=n.parent;if(2*(k=e).r/(2*k.r+w)<.3||v.currentSliderValue>v.currentBrowserLimit)W([k.x,k.y,Y(k.r)]),O.each((function(e){B.call(this,e),G.call(this,e)}));else d3.transition().duration(u).tween("zoom",(function(e){var t=d3.interpolateZoom(h,[k.x,k.y,Y(k.r)]);return function(e){W(t(e))}})).selectAll("text").each("start",B).each("end",G)}}W([k.x,k.y,Y(k.r)],d),F=v.$on("rootFocus",(function(){r.history.pushState({id:1},"classHierarchyPage1","hierarchy#1"),P(n)})),L=v.$on("classSearch",(function(e){P(e)}))}function V(){var t=v.classHierarchyData.classCount;let n=h.get(p.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);(!n||n>t)&&(n=t,h.set(p.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE,n)),e.$broadcast("classCount",t,n)}window.addEventListener("resize",V),window.addEventListener("beforeunload",(function e(){window.removeEventListener("resize",V),window.removeEventListener("beforeunload",e)})),v.$watch("classHierarchyData",(function(){D&&D(),N&&N(),z&&z(),O&&O();var e=T();if(v.classHierarchyData.classCount){V();var t=angular.copy(v.classHierarchyData);var n,r,i=function(e){return S.nodes(e).sort((function(e,t){return e.sortingRank>t.sortingRank?-1:e.sortingRank<t.sortingRank?1:e.depth>t.depth?1:e.depth<t.depth?-1:0}))}(t);function a(e,t){var i={keepPrevState:!0,noPrefixes:T()};r=i.noPrefixes,M(n||e,i,k,!0),l((function(){h.set(p.CLASS_HIERARCHY_SWITCH_PREFIXES,t),H()}),70)}function o(e,i,o){if(e){h.set(p.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE,e),n={name:f,children:[]};for(var s=new Set,l=1;l<=e;l++)s.add(i[l].id),i[l].parent===i[0]&&n.children.push(i[l]);if(function e(t){if(t.children){for(var n=[],r=0;r<t.children.length;r++)s.has(t.children[r].id)&&n.push($.extend({},t.children[r]));t.children=n;for(r=0;r<t.children.length;r++)e(t.children[r])}}(n),o)r=angular.isUndefined(r)?T():r,M(n,{noPrefixes:r});else a(t)}}var s,c=h.get(p.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);if(c)o(c,i);else{var d={doFade:!0,keepPrevState:!0,noPrefixes:T()};M(t,d),H()}D=v.$watch("hidePrefixes",(function(n){angular.isUndefined(n)||e?e=void 0:l((function(){!function(e){angular.isUndefined(e)||h.set(p.CLASS_HIERARCHY_HIDE_PREFIXES,e)}(n),a(t,!0)}),50)}),!0),N=v.$watch("currentSliderValue",(function(e){o(e,i,!0)}),!0),O=v.$on("onEnterKeypressSearchAction",(function(e){s&&P(s)})),z=v.$on("searchedClass",(function(e,t){(s=U[t.name])&&P(s)}))}}),!0)}(v)}}}angular.module("graphdb.framework.graphexplore.directives.class",["graphdb.framework.graphexplore.controllers.class","graphdb.framework.utils.localstorageadapter"]).constant("ZOOM_DURATION",500).constant("ROOT_OBJ_NAME","RDF Class Hierarchy").directive("rdfClassHierarchy",l),l.$inject=["$rootScope","$location","GraphDataRestService","$window","$timeout","$repositories","toastr","ZOOM_DURATION","ROOT_OBJ_NAME","LocalStorageAdapter","LSKeys"]}}]);
2
2
  //# sourceMappingURL=22.e85ffde858c596437b7a.bundle.js.map