(window.webpackJsonp=window.webpackJsonp||[]).push([[4],[function(module,exports,__webpack_require__){"use strict";var angular=__webpack_require__(7);angular.lowercase=angular.$$lowercase,module.exports=angular.module("app.common",[])},,,,,,function(module,exports,__webpack_require__){"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},__importDefault=function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});var app_1=__importDefault(__webpack_require__(0)),lodash_1=__importDefault(__webpack_require__(5));__webpack_require__(354),app_1.default.service("httpService",["commonService","$rootScope","Upload","$q",function(commonService,$rootScope,Upload,$q){var errMsg="failure.unknown",promises={},results={};this.getUrlPrefix=function(){return"/action"},this.expandUrl=function(url){for(var args=[],i=1;i0?level:1,tagIdList:tagId>0?[tagId]:null,docTypeId:helpers_1.default.validUuid(documentTypeUuid)?documentTypeUuid:null,resourceStatusEnumList:Array.isArray(resourceStatusEnum)?resourceStatusEnum:[resourceStatusEnum],loadFields:loadFields};return httpService.post("/documents",params).then(function(data){return data.details})},this.list=function(filter){return httpService.post("/documentsAllVersions",filter).then(function(data){return data.details})},this.listPublic=function(filter){return httpService.post("/documents/public",filter).then(function(data){return data.details})};var searchInfoContent=void 0;this.searchInfo=function(){return searchInfoContent?$rootScope.resolveObject(searchInfoContent):this.listPublic({documentTypeName:"Klaustukai",pageSize:99,resourceStatusEnum:"ACTIVE",loadFields:!0}).then(function(response){return searchInfoContent=response.list})},this.loadDocuments=function(filter){return httpService.post("/documents",filter).then(function(data){return data.details})},this.loadDocumentsByTag=function(tagId,page,pageSize,loadFields){return lodash_1.default.isUndefined(loadFields)&&(loadFields=!1),httpService.get("/documents/tag/{tagId}/{page}/{pageSize}/{loadFields}",tagId,page,pageSize,loadFields).then(function(operation){return operation.details})},this.loadDocumentsByTagList=function(tagList,page,pageSize,loadFields,orderBy,isInt){lodash_1.default.isUndefined(loadFields)&&(loadFields=!1);var tagListCsv="";return lodash_1.default.isEmpty(tagList)||lodash_1.default.isUndefined(tagList)||(tagListCsv=tagList.join(",")),lodash_1.default.isUndefined(orderBy)&&(orderBy=""),lodash_1.default.isUndefined(isInt)&&(isInt=!1),httpService.get("/documents/tag/{page}/{pageSize}/{loadFields}?tags={tagListCsv}&orderBy={orderBy}&isInt={isInt}",page,pageSize,loadFields,tagListCsv,orderBy,isInt).then(function(operation){return operation.details})},this.loadDocumentsByParent=function(versionId){return httpService.get("/documents/parent/{versionId}",versionId).then(function(data){return data.details})},this.listDocumentFieldsByDocTypeName=function(fieldListByDocTypeNameDetails){return httpService.post("/documents/doctypename",fieldListByDocTypeNameDetails).then(function(data){return data.details})},this.listDocumentFieldsByDocTypeNames=function(fieldListByDocTypeNameDetails){return httpService.post("/documents/doctypenames",fieldListByDocTypeNameDetails).then(function(data){return data.details})},this.loadDocumentsByStructureFieldLink=function(structureFieldId,display,localeEnum,parentDocumentId,searchAllLevels){return lodash_1.default.isUndefined(parentDocumentId)&&(parentDocumentId=0),lodash_1.default.isUndefined(searchAllLevels)&&(searchAllLevels=!1),httpService.get("/documents/structurefield/link/{structureFieldId}/{value}/{localeEnum}/{parentDocumentId}/{searchAllLevels}",structureFieldId,display,localeEnum,parentDocumentId,searchAllLevels).then(function(data){return data.details})},this.loadDocumentsByStructureFieldLinkType=function(structureFieldId,type,display,localeEnum){return httpService.get("/documents/structurefield/linkType/{structureFieldId}/{value}/{localeEnum}",structureFieldId,display,localeEnum).then(function(operation){return operation.list})},this.saveDocument=function(document){return httpService.post("/document",document).then(function(data){return data.details})},this.deleteDocument=function(documentId){return httpService.delete("/document/{documentId}",documentId)},this.getDocumentByVersionId=function(versionId){return httpService.get("/document/version/{versionId}",versionId).then(function(data){return data.details})},this.getDocumentByUuid=function(documentUuid){return httpService.get("/document/{documentUuid}",documentUuid).then(function(data){return data.details})},this.getDocumentByResourceId=function(resourceId){return console.error("documentService.getDocumentByResourceId - deprecated"),httpService.get("/document/resource/{resourceId}",resourceId)},this.getNewDocument=function(documentTypeUuid,levelId,parentDocumentUuid,orderNumber){return levelId=levelId||0,httpService.get("/document/new?documentTypeUuid={documentTypeUuid}&levelId={levelId}&parentDocumentUuid={parentDocumentUuid}",documentTypeUuid,levelId,parentDocumentUuid||"").then(function(data){console.log("this.getNewDocument -> data",data);var documentDetails=data.details;return orderNumber&&(documentDetails.orderNumber=orderNumber),function(document){if(["LKŽ kartotekų Pateikėjai","LKŽ kartotekų Užrašytojai","Vietovardžių kartotekos Pateikėjai","Vietovardžių kartotekos Užrašytojai","Tarmių kartotekos Užrašytojai"].includes(lodash_1.default.get(document,"type.name"))){var field=lodash_1.default.find(document.fieldList,{structureField:{name:"Rodomas viešai"}});field&&(field.value.stringValue=!0)}return document}(documentDetails)})},this.getNewDocumentByDocTypeName=function(documentTypeName,levelId,parentVersionId){return lodash_1.default.isEmpty(levelId)&&(levelId=0),lodash_1.default.isEmpty(parentVersionId)&&(parentVersionId=0),httpService.get("/document/new/name/{levelId}/{parentDocumentId}?documentTypeName={documentTypeName}",levelId,parentVersionId,documentTypeName).then(function(data){return data.details})},this.getSingletonDocument=function(documentTypeName){var params={documentTypeName:documentTypeName};return httpService.get("/document/singleton/",params).then(function(data){return data.details})},this.getDocumentStatuses=function(){var deferred=$q.defer();return deferred.resolve(["ACTIVE","PUBLIC"]),deferred.promise},this.loadVersionList=function(versionId){return httpService.get("/document/versions/{versionId}",versionId).then(function(data){return data.details})},this.listDocumentByDocTypeNameAndParentDocId=function(fieldListByDocTypeNameAndParentDocIdDetails){return httpService.post("/documents/doctypenameandparentdocId",fieldListByDocTypeNameAndParentDocIdDetails).then(function(data){return data.details})},this.getFieldDownloadLink=function(fieldId){return $rootScope.getAppPath()+httpService.expandUrl("/document/download/{fieldId}",fieldId)},this.getHomeDocument=function(){return httpService.get("/document/home").then(function(data){return data.details})}}])},function(module,exports,__webpack_require__){"use strict";Promise.resolve().then(function(){var __WEBPACK_AMD_REQUIRE_ARRAY__=[__webpack_require__(0),__webpack_require__(1),__webpack_require__(6)];(function(app,_){app.service("menuService",["httpService","$q","$timeout",function(httpService,$q,$timeout){var menuService={},defaultMenu={};menuService.getDefaultMenu=function(){return defaultMenu},menuService.setDefaultMenu=function(menu){defaultMenu=menu},menuService.menuBySiteAndName=function(siteName,name){return httpService.get("/menu/bysite/{siteName}/{name}",siteName,name)},menuService.list=function(filter){return httpService.post("/menus",filter).then(function(data){return data.details})},menuService.get=function(uuid,viewType){return void 0==viewType&&(viewType=0),httpService.get("/menu/{menuUuid}?viewType={viewType}",uuid,viewType).then(function(data){return data.details})},menuService.save=function(menu){return httpService.put("/menu",menu).then(function(data){return data.details})},menuService.delete=function(uuid){return httpService.delete("/menu/{uuid}",uuid)};var editMenuNameFn=[];menuService.getEditMenuName=function(defaultName){return editMenuNameFn.length>0?editMenuNameFn[0].fn():defaultName},menuService.setEditMenuNameFn=function($scope,fn){editMenuNameFn.push({fn:fn,scope:$scope}),$scope.$on("$destroy",function(event){var currentScope=event.currentScope;for(var i in editMenuNameFn){var fn=editMenuNameFn[i];if(fn.scope==currentScope){editMenuNameFn.splice(i,1);break}}})};var menus={},promises={};menuService.getMenu=function(siteName,name){var key=siteName+name;if(_.isEmpty(menus[key]))return _.isEmpty(promises[key])&&(promises[key]=this.menuBySiteAndName(siteName,name),promises[key].then(function(data){return menus[key]=angular.copy(data),delete promises[key],function loadStateToMenuMapping(name,menu){menu.moduleDetails&&menu.moduleDetails.state&&(stateToMenuMapping[name]=stateToMenuMapping[name]||{},stateToMenuMapping[name][menu.moduleDetails.state]=menu);for(var index in menu.children)loadStateToMenuMapping(name,menu.children[index])}(name,data.details),data})),promises[key];var deferred=$q.defer();return deferred.resolve(menus[key]),deferred.promise},menuService.newMenu=function(menu){return{number:1,index:0,nameTranslationList:[],descriptionList:[],roleList:[],moduleDetails:{id:""}}};var stateToMenuMapping={};return menuService.getStateToMenuMapping=function(name){return stateToMenuMapping[name]},menuService.getFlatMenu=function(siteName,menu){return menuService.getMenu(siteName,menu).then(function(response){var menu=response.details,flatMenu=[menu];return function flatChildren(menu){angular.forEach(menu.children,function(child){flatMenu.push(child),flatChildren(child)})}(menu),flatMenu})},menuService}])}).apply(null,__WEBPACK_AMD_REQUIRE_ARRAY__)}).catch(__webpack_require__.oe)},,function(module,exports,__webpack_require__){"use strict";var __importDefault=function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});var app_1=__importDefault(__webpack_require__(0));__webpack_require__(6),__webpack_require__(108),app_1.default.service("userService",["$rootScope","httpService","$cookies","cacheableService",function($rootScope,httpService,$cookies,cacheableService){this.getUser=function(refresh){return refresh&&cacheableService.clearCache(httpService.get,"/user"),cacheableService.getCached(httpService.get,"/user").then(function(data){return data.details})},this.logout=function(){httpService.post("/user/logout").finally(function(){$cookies.remove("SESSION"),window.location="/"})},this.saveSelf=function(details){return"SITE"===details.userType?details.type=".SiteUserDetails":details.type=".ClientUserDetails",httpService.put("/user/self",details).then(function(data){return data.details})},this.save=function(userDetails,assignGroups){return assignGroups=void 0!=assignGroups&&assignGroups,httpService.put("/user?assignGroups={assignGroups}",userDetails,assignGroups).then(function(data){return data.details})},this.saveClientUser=function(clientUserDetails){return httpService.put("/user/client",clientUserDetails).then(function(data){return data.details})},this.list=function(userSearch){return httpService.post("/users",userSearch).then(function(data){return data.details})},this.listClients=function(userSearch){return httpService.post("/users/client",userSearch).then(function(data){return data.details})},this.listByUsername=function(userSearch){return httpService.post("/users/username",userSearch).then(function(data){return data.details})},this.getClient=function(uuid){return httpService.post("/client/{uuid}",uuid).then(function(data){return data.details})},this.listSimple=function(userSearch){return httpService.post("/simpleUsers",userSearch).then(function(data){return data.details})},this.changeUserStatus=function(uuid,status){return httpService.post("/user/{userUuid}/status/{status}",null,uuid,status)},this.delete=function(uuid){return httpService.delete("/user/{userUuid}",uuid)},this.get=function(uuid){if(void 0==uuid||function(s){return/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(s)}(uuid))return httpService.get("/user/{userUuid}",uuid).then(function(data){return data.details})},this.getClientUser=function(uuid){return httpService.get("/user/client/{userUuid}",uuid).then(function(data){return data.details})},this.getSimple=function(uuid){return httpService.get("/simpleUser/{userUuid}",uuid).then(function(data){return data.details})},this.edit=function(userDetails){return httpService.post("/user",userDetails).then(function(data){return data.details})},this.confirmRegistration=function(password,token){return httpService.post("/user/registration/confirm/{token}",password,token).then(function(data){return data.details})},this.confirmEmail=function(token){return httpService.get("/user/email/{token}",token)},this.changePassword=function(password){return httpService.post("/user/password",password)},this.resetPasswordInit=function(email){return httpService.post("/user/password/reset/init?email={email}",null,email)},this.resetPassword=function(token,password){return httpService.post("/user/password/reset/{token}",password,token)},this.clientUser={import:function(fileContent){return httpService.post("/client/import",fileContent).then(function(data){return data.details})}},this.siteUser={list:function(filter){return httpService.post("/users/site",filter).then(function(data){return data.details})}},this.representative={get:function(uuid){return httpService.get("/representative/{representativeUuid}",uuid).then(function(data){return data.details})},save:function(details){return httpService.put("/representative",details).then(function(data){return data.details})},saveSelf:function(details){return httpService.put("/representative/self",details).then(function(data){return data.details})},list:function(filter){return httpService.post("/representatives",filter).then(function(data){return data.details})}},this.idp={list:function(filter){return httpService.post("/identity/users",filter).then(function(data){return data})},save:function(details){return httpService.put("/identity/users",[details]).then(function(data){return data.details[0]})}}}])},function(module,exports,__webpack_require__){"use strict";(function($){var __importDefault=function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});var app_1=__importDefault(__webpack_require__(0)),underscore_1=__importDefault(__webpack_require__(1));__webpack_require__(13),app_1.default.factory("documentUtils",["$rootScope","documentService","$sce","$filter","settings",function($rootScope,documentService,$sce,$filter,settings){var fieldIndex=0,FIELD_DEPENDENCIES={"Punkte gyvena nuo metų":{field:"Punkte gyvena",value:"nuo"}};return{markFields:markFields,markDocument:function(document){return markFields(document.fieldList),document},resetDocumentIds:function(document){null!=document&&(document.versionId=null,document.version=null,resetFieldIds(document.fieldList));return document},repeatField:repeatField,unmarkDocument:function(doc){var document=angular.copy(doc);return function unmarkFields(fieldList){if(void 0!==fieldList&&null!==fieldList)for(var i=0;i]*?)align=["](.*?)["]([^>]*?>)/gm,'$1style="text-align: $2;"$3')})}var repeatable=field.structureField.repeatable;!0===repeatable&&(field.repeatField=function(){return repeatField(this,fieldList)}),field.deleteField=function(){deleteField(this,fieldList)},field.index=fieldIndex++,markFields(field.fieldList)}}function resetValueIds(valueList){if(null!=valueList)for(var i=0;i1e3;)bytes/=1e3,unitIndex++;return bytes+" "+["B","KB","MB","GB","TB"][unitIndex]},initCheckboxes:function(scope,listName){scope.select_all={checked:!1},scope.$watch("select_all.checked",function(newVal){for(var i in scope[listName])scope[listName][i].checked=newVal})},getSelected:function(list){var selected=[];for(var i in list)list[i].checked&&selected.push(list[i]);return selected},validDecimal:function(precision,scale){var validIntRegexp=new RegExp("^[0-9]{1,"+precision+"}$"),validFloatRegexp=scale>0?new RegExp("^[0-9]{1,"+precision+"}\\.[0-9]{1,"+scale+"}$"):validIntRegexp;return function(value){return void 0===value||""===value||(validIntRegexp.test(value)||validFloatRegexp.test(value))}},largestRemainderRound:function(numbers,desiredTotal){for(var result=numbers.map(function(number,index){return{floor:Math.floor(number),remainder:function(number){return(number-Math.floor(number)).toFixed(4)}(number),index:index}}).sort(function(a,b){return b.remainder-a.remainder}),delta=desiredTotal-result.reduce(function(sum,current){return sum+current.floor},0),i=0;i0&&(encoded+="=".repeat(4-encoded.length%4)),resolve(encoded)},reader.onerror=function(error){return reject(error)},reader.readAsDataURL(file)})},toByteArray:function(file){return new Promise(function(resolve,reject){var reader=new FileReader;reader.onload=function(event){var contents=event.target.result,bytes=new Uint8Array(contents);resolve(bytes)},reader.onerror=function(error){return reject(error)},reader.readAsArrayBuffer(file)})},newUuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(c){var r=16*Math.random()|0;return("x"==c?r:3&r|8).toString(16)})},serializeObjectIntoUrlParams:function(object){return _.chain(object).pick(function(value,key){return value}).map(function(value,key){return key+"="+value})._wrapped.join("&")},sortByLocale:function(list,mapper,ignoreCase,fullText){ignoreCase=void 0===ignoreCase||ignoreCase;var sortFunction=function(a,b){var collator=new Intl.Collator("lt",{});if(ignoreCase?(a=(a||"").toString().toLowerCase(),b=(b||"").toString().toLowerCase()):(a=(a||"").toString(),b=(b||"").toString()),fullText)return collator.compare(a,b);for(var length=Math.min(a.length,b.length),i=0;ib.length?1:-1};return list.slice().sort(function(a,b){return mapper?sortFunction(mapper(a),mapper(b)):sortFunction(a,b)})},htmlEntitiesToString:function(str){return(str||"").replace(/&#\d+;/gm,function(s){return String.fromCharCode(s.match(/\d+/gm)[0])})}}}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},,,,,,,,,,,function(module,exports,__webpack_require__){"use strict";Promise.resolve().then(function(){var __WEBPACK_AMD_REQUIRE_ARRAY__=[__webpack_require__(0),__webpack_require__(1)];(function(app,_){app.factory("notifyService",["$rootScope",function($rootScope){var listenForEvent=function(name,scope,callback){var handler=$rootScope.$on(name,callback);scope.$on("$destroy",handler)},invokeEvent=function(){var args=[];args.push.apply(args,arguments);$rootScope.$emit.apply($rootScope,args)};return{languageChangedEvent:function($scope,callback){listenForEvent("language-change-event",$scope,callback)},languageChange:function(newLanguage){invokeEvent("language-change-event",newLanguage)},goBackEvent:function($scope,callback){listenForEvent("go-back-event",$scope,callback)},goBack:function(){var listener=_.find($rootScope.$$listeners["go-back-event"],function(listener){return!!listener});$rootScope.$$listeners["go-back-event"]&&listener?invokeEvent("go-back-event"):$rootScope.router.navigateBack()}}}])}).apply(null,__WEBPACK_AMD_REQUIRE_ARRAY__)}).catch(__webpack_require__.oe)},function(module,exports,__webpack_require__){"use strict";Promise.resolve().then(function(){var __WEBPACK_AMD_REQUIRE_ARRAY__=[__webpack_require__(0),__webpack_require__(1),__webpack_require__(6)];(function(app,_){app.service("userGroupService",["httpService",function(httpService){this.list=function(userGroupFilter,rolesNotToList){return httpService.post("/userGroups",userGroupFilter).then(function(data){return data.details.userGroupDetailsList=_.filter(data.details.userGroupDetailsList,function(userGroup){return!_.contains(rolesNotToList,userGroup.name)}),data.details})},this.assign=function(userGroupUuid,userUuid){return httpService.post("/userGroup/assign/{userGroupUuid}/{userUuid}",null,userGroupUuid,userUuid)},this.unAssign=function(userGroupUuid,userUuid){return httpService.post("/userGroup/unassign/{userGroupUuid}/{userUuid}",null,userGroupUuid,userUuid)},this.delete=function(userGroupUuid){return httpService.delete("/userGroup/{userGroupUuid}",userGroupUuid)},this.get=function(userGroupUuid){return httpService.get("/userGroup/{userGroupUuid}",userGroupUuid).then(function(data){return data.details})},this.getByName=function(userGroupName){return httpService.get("/userGroup/name/{userGroupName}",userGroupName).then(function(data){return data.details})},this.save=function(userGroupDetails){return httpService.post("/userGroup",userGroupDetails).then(function(data){return data.details})}}])}).apply(null,__WEBPACK_AMD_REQUIRE_ARRAY__)}).catch(__webpack_require__.oe)},,,,,,,,,,,,,,,,function(module,exports,__webpack_require__){"use strict";Promise.resolve().then(function(){var __WEBPACK_AMD_REQUIRE_ARRAY__=[__webpack_require__(0),__webpack_require__(1)];(function(app){app.service("fileService",["httpService","$rootScope",function(httpService,$rootScope){this.listFilesAndFolders=function(path){return httpService.get("/file-explorer/files?path={path}",path).then(function(operation){return operation.details})},this.uploadFile=function(path,file){return httpService.upload("/file-explorer/file?path={path}",file,path)},this.downloadFile=function(fileUuid,fileName){var url=httpService.getUrlPrefix()+"/repository/{repositoryUuid}?name={name}".uriExpand(fileUuid,fileName);$rootScope.downloadFile(url,fileName)},this.addFolder=function(path,name){return httpService.put("/file-explorer/folder?path={path}&name={name}",null,path,name)},this.delete=function(path,name){return httpService.delete("/file-explorer/file?path={path}&name={name}",path,name)},this.cleanup=function(){return httpService.post("/file/clean")}}])}).apply(null,__WEBPACK_AMD_REQUIRE_ARRAY__)}).catch(__webpack_require__.oe),Promise.resolve().then(function(){var __WEBPACK_AMD_REQUIRE_ARRAY__=[__webpack_require__(0),__webpack_require__(1)];(function(app,_){app.service("bigFileService",["httpService",function(httpService){this.init=function(fileUploadDetails){return httpService.post("/file",fileUploadDetails).then(function(data){return data.details})},this.fileSliceAdd=function(slice,fileUploadId,sliceNo){return httpService.post("/file/slice/{fileUploadId}/{sliceNo}",slice,fileUploadId,sliceNo).then(function(data){return data.details})},this.repositoryList=function(parentFolderUuid,additionalPath,fileUUIDArray){return parentFolderUuid=_.isEmpty(parentFolderUuid)?"":parentFolderUuid,additionalPath=_.isEmpty(additionalPath)?"":additionalPath,fileUUIDArray=_.isEmpty(fileUUIDArray)?"":fileUUIDArray,httpService.get("/repositories?parentFolderUuid={parentFolderUuid}&additionalPath={additionalPath}&fileUUIDArray={fileUUIDArray}",parentFolderUuid,additionalPath,fileUUIDArray).then(function(data){return data.details})},this.repositoryListPublic=function(fileUUIDArray){return fileUUIDArray=_.isEmpty(fileUUIDArray)?"":fileUUIDArray,httpService.get("/repositories/public?fileUUIDArray={fileUUIDArray}",fileUUIDArray).then(function(data){return data.details})},this.repositoryGet=function(parentFolderUuid,additionalPath){return parentFolderUuid=_.isEmpty(parentFolderUuid)?"":parentFolderUuid,additionalPath=_.isEmpty(additionalPath)?"":additionalPath,httpService.get("/repository?parentFolderUuid={parentFolderUuid}&additionalPath={additionalPath}",parentFolderUuid,additionalPath).then(function(data){return data.details})},this.repositoryDelete=function(repositoryUuid){return httpService.delete("/repository/{repositoryUuid}",repositoryUuid).then(function(data){return data.details})},this.repositoryCopy=function(source,destination){return httpService.post("/repository/e/copy",{target:source,destination:destination}).then(function(data){return data.details})},this.fileDownload=function(uuid,name){var url=httpService.getUrlPrefix()+"/repository/{repositoryUuid}?name={name}".uriExpand(uuid,name);window.open(url)},this.fileUrl=function(uuid,name){return window.origin+httpService.getUrlPrefix()+"/repository/{repositoryUuid}?name={name}".uriExpand(uuid,name)},this.relativeFileUrl=function(uuid,name){return httpService.getUrlPrefix()+"/repository/{repositoryUuid}?name={name}".uriExpand(uuid,name)}}])}).apply(null,__WEBPACK_AMD_REQUIRE_ARRAY__)}).catch(__webpack_require__.oe)},,,,,,,,,,function(module,exports,__webpack_require__){"use strict";Promise.resolve().then(function(){var __WEBPACK_AMD_REQUIRE_ARRAY__=[__webpack_require__(0),__webpack_require__(1)];(function(app,_){app.service("documentTypeService",["httpService",function(httpService){this.loadDocumentTypes=function(filter){return httpService.post("/document/types",filter).then(function(data){return data.details})},this.loadDocumentTypesByName=function(name){return httpService.get("/document/types/{name}",name).then(function(data){return data.details})},this.loadDocumentTypesClassificator=function(filter){return httpService.post("/document/types/classificator",filter).then(function(data){return data.details})},this.getDocumentTypeByName=function(name){var params={name:name};return httpService.get("/document/type",params).then(function(data){return data.details})},this.getDocumentType=function(documentTypeUuid){return httpService.get("/document/type/{documentTypeUuid}",documentTypeUuid).then(function(data){return data.details})},this.saveDocumentType=function(documentType){return httpService.put("/document/type",documentType).then(function(data){return data.details})},this.deleteDocumentType=function(documentTypeUuid){return httpService.delete("/document/type/{documentTypeUuid}",documentTypeUuid)},this.getNewDocumentType=function(){return{uuid:null,name:null,versionable:!1,structureId:null}}}])}).apply(null,__WEBPACK_AMD_REQUIRE_ARRAY__)}).catch(__webpack_require__.oe)},,,,,,,,,function(module,exports,__webpack_require__){"use strict";Promise.resolve().then(function(){var __WEBPACK_AMD_REQUIRE_ARRAY__=[__webpack_require__(0),__webpack_require__(1),__webpack_require__(6)];(function(app,_){app.service("enumService",["httpService","cacheableService",function(httpService,cacheableService){var srv=this;srv.listEnums=function(enumName){return cacheableService.getCached(httpService.get,"/enums/{enum}",enumName).then(function(data){return data.details})},srv.populateEnums=function(name,dst){srv.listEnums(name).then(function(data){dst.length=0,dst.push.apply(dst,data)})}}])}).apply(null,__WEBPACK_AMD_REQUIRE_ARRAY__)}).catch(__webpack_require__.oe)},,function(module,exports,__webpack_require__){"use strict";Promise.resolve().then(function(){var __WEBPACK_AMD_REQUIRE_ARRAY__=[__webpack_require__(0),__webpack_require__(1),__webpack_require__(6)];(function(app,_){app.service("recordProposalService",["httpService",function(httpService){this.list=function(recordProposalFilter){return httpService.post("/recordProposal",recordProposalFilter).then(function(data){return data.details})},this.listPublic=function(recordProposalFilter){return httpService.post("/recordProposalPublic",recordProposalFilter).then(function(data){return data.details})},this.save=function(recordProposalDetails){return httpService.put("/recordProposal",recordProposalDetails).then(function(data){return data.details})},this.savePublic=function(recordProposalDetails){return httpService.put("/recordProposalPublic",recordProposalDetails).then(function(data){return data.details})},this.savePublicIllustrated=function(recordProposalDetails,file){return httpService.upload("/recordProposalPublicIllustrated",file,{details:recordProposalDetails}).then(function(data){return data.details})},this.get=function(uuid){return httpService.get("/recordProposal/{uuid}",uuid).then(function(data){return data.details})},this.getPublic=function(uuid){return httpService.get("/recordProposalPublic/{uuid}",uuid).then(function(data){return data.details})}}])}).apply(null,__WEBPACK_AMD_REQUIRE_ARRAY__)}).catch(__webpack_require__.oe)},,,,,,,,,,,,,,function(module,exports,__webpack_require__){"use strict";Promise.resolve().then(function(){var __WEBPACK_AMD_REQUIRE_ARRAY__=[__webpack_require__(0),__webpack_require__(6)];(function(app){app.service("loginTypeService",["httpService",function(httpService){this.list=function(page,pageSize){return httpService.get("/logintypes/{page}/{pageSize}",page,pageSize).then(function(operation){return operation.details})},this.get=function(id){return httpService.get("/logintype/{id}",id).then(function(operation){return operation.details})},this.delete=function(id){return httpService.delete("/logintype/{id}",id)},this.save=function(loginType){return httpService.post("/logintype",loginType)},this.setUserLoginTypeStatus=function(loginTypeEnum,userId,enabled){return httpService.post("/user/{userId}/loginType/{loginTypeEnum}/{enabled}",null,userId,loginTypeEnum,enabled)}}])}).apply(null,__WEBPACK_AMD_REQUIRE_ARRAY__)}).catch(__webpack_require__.oe)},function(module,exports,__webpack_require__){"use strict";var __importDefault=function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});var app_1=__importDefault(__webpack_require__(0)),lodash_1=__importDefault(__webpack_require__(5));app_1.default.service("documentTagResolverService",["productService",function(productService){var contentValuePath="fieldList[0].value.valueList[0].value",tagHandlers={"{{lkz_pagr_kart_sk}}":getRecordPublishedCount.bind(this,"lkz_card_main"),"{{lkz_papild_kart_sk}}":getRecordPublishedCount.bind(this,"lkz_card_additional"),"{{lkz_tarm_kart_sk}}":getRecordPublishedCount.bind(this,"lkz_card_dialect"),"{{vietov_kart_sk}}":getRecordPublishedCount.bind(this,"toponyms"),"{{vietov_zodyn_sk}}":getRecordPublishedCount.bind(this,"toponym_vocabulary")};function getRecordPublishedCount(vocabName){return productService.vocabularyStructure.getByName(vocabName).then(function(vocabularyStructure){var searchFilter={page:1,pageSize:1,vocabularyUuid:vocabularyStructure.uuid};return productService.vocabularyRecord.listPublic(searchFilter)}).then(function(data){return data.totalElements})}this.resolveTags=function(documents){var tags={};if(!documents||!documents.forEach)return documents;documents.forEach(function(document){var value=lodash_1.default.get(document,contentValuePath);value&&Object.keys(tagHandlers).forEach(function(key){value.includes(key)&&(tags[key]="")})});var promises=Object.keys(tags).map(function(key){return tagHandlers[key]().then(function(value){return tags[key]=value},function(value){return console.error("Failed to get "+key+":",value)})});return Promise.allSettled(promises).then(function(){return documents.forEach(function(document){var value=lodash_1.default.get(document,contentValuePath);value&&(Object.keys(tags).forEach(function(key){value=value.replaceAll(key,tags[key])}),lodash_1.default.set(document,contentValuePath,value))}),documents})}}])},function(module,exports){module.exports='
\n
\n
\n
\n
\n
\n\n