export const __webpack_esm_id__=48175;export const __webpack_esm_ids__=[25953,40469,48175,50656,66023,90906,92388];export const __webpack_esm_modules__={48175(e,t,s){s(40469);var i=s(50656),r=s(79069),a=s(25953);function n(e){const t=(t,s)=>e.getIndexes(t,s).then(e=>(0,i.g)(e.data));return{getIndexes:t,getIndexesAsMenuModel:(e,s)=>t(e,s).then(e=>e.map(e=>new r.rx({label:e.name,value:e.name}))),getSimilarityIndexesWithVectorFields:t=>e.getSimilarityIndexesWithVectorFields(t).then(e=>(0,a.b)(e.data))}}angular.module("graphdb.framework.core.services.similarity",["graphdb.framework.rest.similarity.service"]).factory("SimilarityService",n),n.$inject=["SimilarityRestService"]},90906(e,t,s){s.d(t,{e:()=>i});const i={CREATING:"CREATING",BUILDING:"BUILDING",BUILT:"BUILT",REBUILDING:"REBUILDING",OUTDATED:"OUTDATED",INTERRUPTED:"INTERRUPTED",OBSOLETE:"OBSOLETE",FAILED:"FAILED",isCreatingStatus:e=>i.CREATING===e,isBuildingStatus:e=>i.BUILDING===e,isBuiltStatus:e=>i.BUILT===e,isRebuildingStatus:e=>i.REBUILDING===e,isOutdatedStatus:e=>i.OUTDATED===e,isInterruptedStatus:e=>i.INTERRUPTED===e,isObsoleteStatus:e=>i.OBSOLETE===e,isFailedStatus:e=>i.FAILED===e}},92388(e,t,s){s.d(t,{K:()=>i});const i={TEXT:"text",TEXT_LITERAL:"textLiteral",PREDICATION:"predication",isTextType:e=>i.TEXT===e,isTextLiteralType:e=>i.TEXT_LITERAL===e,isPredicationType:e=>i.PREDICATION===e}},66023(e,t,s){s.d(t,{A:()=>a});var i=s(92388),r=s(90906);class a{constructor(){this.analyzer="",this.infer=!0,this.options="",this.sameAs=!0,this.searchQuery="",this.selectQuery="",this.stopList=void 0,this.name="",this.type=i.K.TEXT,this.status=void 0,this.analogicalQuery=void 0,this.inputIndex=void 0,this.isLiteralIndex=""}isTextType(){return i.K.isTextType(this.type)}isTextLiteralType(){return i.K.isTextLiteralType(this.type)}isPredicationType(){return i.K.isPredicationType(this.type)}isCreatingStatus(){return r.e.isCreatingStatus(this.status)}isBuildingStatus(){return r.e.isBuildingStatus(this.status)}isBuiltStatus(){return r.e.isBuiltStatus(this.status)}isRebuildingStatus(){return r.e.isRebuildingStatus(this.status)}isOutdatedStatus(){return r.e.isOutdatedStatus(this.status)}isInterruptedStatus(){return r.e.isInterruptedStatus(this.status)}isObsoleteStatus(){return r.e.isObsoleteStatus(this.status)}isFailedStatus(){return r.e.isFailedStatus(this.status)}}},50656(e,t,s){s.d(t,{g:()=>r});var i=s(66023);const r=e=>e.map(e=>{const t=new i.A;return t.type=e.type,t.stopList=e.stopList,t.status=e.status,t.selectQuery=e.selectQuery,t.searchQuery=e.searchQuery,t.sameAs=e.sameAs,t.options=e.options,t.name=e.name,t.infer=e.infer,t.analyzer=e.analyzer,t.analogicalQuery=e.analogicalQuery,t})},40469(){angular.module("graphdb.framework.rest.similarity.service",[]).factory("SimilarityRestService",t),t.$inject=["$http","$repositories"];const e="rest/similarity";function t(t){return{getIndexes:function(s,i){return s?t.get(e,{headers:{"X-GraphDB-Repository":s,"X-GraphDB-Repository-Location":i}}):t.get(e)},getSimilarityIndexesWithVectorFields:function(s){return t.get(`${e}/${s}/indexes`)},getSearchQueries:function(){return t.get(`${e}/config`)},rebuildIndex:function(e){return s("PUT",e.name,e.options,e.selectQuery,e.searchQuery,e.analogicalQuery,e.stopList,e.infer,e.sameAs,e.type)},deleteIndex:function(s){return t.delete(`${e}?name=${s.name}`)},createIndex:s,getSamples:function(){return t.get(`${e}/samples`)},getQuery:function(e){return t.get("rest/similarity/query",{params:{name:e.indexName,options:e.indexOptions,stopList:e.indexStopList,selectQuery:e.query,infer:e.queryInference,sameAs:e.querySameAs,type:e.viewType,analyzer:e.indexAnalyzer}})},saveSearchQuery:function(e){return t({method:"put",url:"rest/similarity/search-query",data:e})}};function s(s,i,r,a,n,u,o,l,c,d,y){return t({method:s,url:`${e}`,noCancelOnRouteChange:!0,data:{name:i,options:r,selectQuery:a,stopList:o,infer:l,sameAs:c,type:d,analyzer:y,searchQuery:n,analogicalQuery:u}})}}},25953(e,t,s){s.d(t,{b:()=>i});const i=e=>{if(!e||"object"!=typeof e)return{};const t={};return Object.entries(e).forEach(([e,s])=>{Array.isArray(s)&&(t[e]||(t[e]={}),s.forEach(s=>{if(!s||!s.similarityIndex)return;const i=s.similarityIndex,r=Array.isArray(s.connectorFields)?s.connectorFields.filter(Boolean):[];t[e][i]=r}))}),t}}};
//# sourceMappingURL=48175.2cd17a94f128caab6461.bundle.js.map