export const __webpack_esm_id__=14097;export const __webpack_esm_ids__=[2998,14097,59601];export const __webpack_esm_modules__={14097(e,t,i){var s=i(59601);function n(e,t,i){let n;e.isHelpVisible=!1,e.fileSizeLimitInfoTemplateUrl="js/angular/import/templates/fileSizeLimitInfo.html";const c=()=>{if(n.isPristine(e.activeTabId)){const t=i.getResources();e.isHelpVisible=!t||0===t.length}else e.isHelpVisible=n.isHelpVisible(e.activeTabId)};e.openTab=e=>{i.updateActiveTabId(e)},e.toggleHelp=()=>{n.setIsHelpVisible(e.activeTabId,!e.isHelpVisible),c()};const r=[];r.push(i.onActiveTabIdUpdated(i=>{e.activeTabId=i,t.hash(e.activeTabId),c()})),r.push(i.onResourcesUpdated(c)),e.$on("$destroy",()=>r.forEach(e=>e())),(()=>{n=new o;const i=t.hash()||s.D.USER;e.openTab(i),c()})()}angular.module("graphdb.framework.impex.import.controllers.tab",[]).controller("TabController",n),n.$inject=["$scope","$location","ImportContextService"];class o{constructor(){this._helpVisibility={[s.D.USER]:{isHelpVisible:void 0},[s.D.SERVER]:{isHelpVisible:void 0}}}isPristine(e){return void 0===this._helpVisibility[e].isHelpVisible}setIsHelpVisible(e,t){this._helpVisibility[e].isHelpVisible=t}isHelpVisible(e){return this._helpVisibility[e]&&this._helpVisibility[e].isHelpVisible}}},59601(e,t,i){i.d(t,{D:()=>o});var s=i(22723),n=i(2998);const o={USER:"user",SERVER:"server"};function c(e){let t=o.USER,i=[],c=[],r=[],a=!0,d=[];return{updateActiveTabId:function(i){t=i,e.emitSync("activeTabIdUpdated",u())},getActiveTabId:u,onActiveTabIdUpdated:function(t){return e.subscribeSync("activeTabIdUpdated",e=>t(e))},getFiles:m,addFile:function(t){const i=m();i.push(t),b(i),e.emitSync("fileAdded",(0,s.cloneDeep)(t))},updateFiles:b,onFilesUpdated:function(t){return e.subscribeSync("filesUpdated",e=>t(e))},getImportedResources:f,updateImportedResources:function(t){i=t,e.emitSync("importedResourcesUpdated",f()),e.emitSync("resourcesUpdated",U())},onImportedResourcesUpdated:function(t){return e.subscribeSync("importedResourcesUpdated",e=>t(e))},getResources:U,onResourcesUpdated:function(t){return e.subscribeSync("resourcesUpdated",e=>t(e))},updateShowLoader:function(t){a=t,e.emitSync("showLoaderUpdated",p())},getShowLoader:p,onShowLoaderUpdated:function(t){return e.subscribeSync("showLoaderUpdated",e=>t(e))},updateSelectedFilesNames:function(t){d=(0,s.cloneDeep)(t),e.emitSync("selectedFilesNamesUpdated",l())},getSelectedFilesNames:l,onSelectedFilesNamesUpdated:function(t){return e.subscribeSync("selectedFilesNamesUpdated",e=>t(e))},updateResourceForUpload:function(e){const t=h(),i=t.find(({name:t})=>t===e.name);i?Object.assign(i,e):t.push(e),R(t)},getResourceForUpload:function(e){return(0,s.cloneDeep)(c.find(({name:t})=>t===e))},updateResourcesForUpload:R,getResourcesForUpload:h,onResourcesForUploadChanged:function(t){return e.subscribeSync("resourcesForUploadChanged",e=>t(e))}};function l(){return(0,s.cloneDeep)(d)}function p(){return a}function u(){return t}function b(t){r=(0,s.cloneDeep)(t),e.emitSync("filesUpdated",m())}function m(){return(0,s.cloneDeep)(r)}function f(){return(0,s.cloneDeep)(i)||[]}function U(){const e=f();let t=h();const i=[],s=[];return e.forEach(({name:e})=>{const o=t.find(({name:t})=>t===e);o&&(o.status===n.I.UPLOADED?i.push(o):s.push(o))}),i.length>0&&(t=t.filter(({name:e})=>!i.some(({name:t})=>t===e)),R(t,!1)),e.filter(({name:e})=>!s.some(t=>e===t)).concat(t)}function R(t,i=!0){c=(0,s.cloneDeep)(t),e.emitSync("resourcesForUploadChanged",h()),i&&e.emitSync("resourcesUpdated",U())}function h(){return(0,s.cloneDeep)(c)||[]}}angular.module("graphdb.framework.import.services.importcontext",[]).factory("ImportContextService",c),c.$inject=["EventEmitterService"]},2998(e,t,i){i.d(t,{I:()=>s});const s={NONE:"NONE",UPLOADING:"UPLOADING",UPLOAD_ERROR:"UPLOAD_ERROR",UPLOADED:"UPLOADED",PENDING:"PENDING",IMPORTING:"IMPORTING",DONE:"DONE",ERROR:"ERROR",INTERRUPTING:"INTERRUPTING"}}};
//# sourceMappingURL=14097.fdf659af03707b8e3dee.bundle.js.map