@eo-sdk/client 9.6.2 → 9.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.js +4 -4
- package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.js.map +1 -1
- package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.min.js +1 -1
- package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.min.js.map +1 -1
- package/bundles/eo-sdk-client.umd.js +4 -5
- package/bundles/eo-sdk-client.umd.js.map +1 -1
- package/bundles/eo-sdk-client.umd.min.js +1 -1
- package/bundles/eo-sdk-client.umd.min.js.map +1 -1
- package/esm2015/app/eo-client/about-state/about-state.component.js +3 -3
- package/esm2015/app/eo-framework/media/media.component.js +2 -2
- package/esm2015/app/eo-framework/object-form/object-form/form-element-table/form-element-table.component.js +1 -2
- package/esm2015/app/eo-framework/object-form/object-form-helper.service.js +2 -2
- package/esm2015/projects/eo-sdk/core/lib/service/prepare/prepare.service.js +5 -5
- package/fesm2015/eo-sdk-client-projects-eo-sdk-core.js +4 -4
- package/fesm2015/eo-sdk-client-projects-eo-sdk-core.js.map +1 -1
- package/fesm2015/eo-sdk-client.js +4 -5
- package/fesm2015/eo-sdk-client.js.map +1 -1
- package/package.json +2 -2
- package/projects/eo-sdk/core/package.json +1 -1
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */Object.create;function Kt(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function $t(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function Zt(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat($t(arguments[t]));return e}Object.create;var Xt=function(){function e(){}return e.prototype.assert=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.group=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.groupEnd=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e}();Xt.decorators=[{type:r.Injectable}];var er=function(){function e(e,t,r,n){this.http=e,this.coreConfig=t,this.logger=r,this.config=n,this.gridDataFilter=i.map((function(e){return null==e?void 0:e.filter((function(e){return!e.__removed}))})),this.cache=new Map,this.temp=new Map,this.headers=this.setDefaultHeaders(),this.authProfile={host:"",ntlm:!0}}return e.prototype.setAuthProfile=function(e){e&&(this.headers=this.setDefaultHeaders(),this.authProfile=e,this.authProfile.auth,this.headers.delete("Authorization"))},e.prototype.setHeader=function(e,t){t&&t.length&&(this.headers=this.headers.set(e,t))},e.prototype.getHeaders=function(){return this.headers},e.prototype.getHttpOptions=function(e){return Object.assign({headers:this.getHeaders(),withCredentials:this.coreConfig.withCredentials},e)},e.prototype.getServiceBase=function(){return this.config.getUri("serviceBase")},e.prototype.getSearchBase=function(){return this.config.getUri("searchBase")},e.prototype.getContextBase=function(){return this.config.getUri("contextBase")},e.prototype.getInboxBase=function(){return this.config.getUri("inboxBase")},e.prototype.getBpmBase=function(){return this.config.getUri("bpmBase")},e.prototype.getAgentBase=function(){return this.config.getUri("agentBase")},e.prototype.getStatusBase=function(){return this.config.getUri("statusBase")},e.prototype.getIconBase=function(e){return void 0===e&&(e=""),this.getBaseWithContext(this.getServiceBase())+"/ui/icon/"+e},e.prototype.getHost=function(){return this.authProfile.host||""},e.prototype.getBaseWithContext=function(e){return(null==e?void 0:e.startsWith("/"))?this.config.getContextPath()+e:e},e.prototype.getContextPath=function(e){return this.getHost()+this.getBaseWithContext(e||this.getServiceBase())},e.prototype.get=function(e,t,r){return this.http.get(this.getContextPath(t)+e,this.getHttpOptions(r))},e.prototype.put=function(e,t,r,n){return this.http.put(this.getContextPath(r)+e,t,this.getHttpOptions(n))},e.prototype.getJson=function(e,t){return this.http.get(this.getContextPath(t)+e,this.getHttpOptions({responseType:"json"}))},e.prototype.post=function(e,t,r,n){var o=this.getContextPath(r),i=t?JSON.stringify(t):"";return this.http.post(""+o+e,i,this.getHttpOptions(n))},e.prototype.postMultiPart=function(e,t,r,n){var o=this.getContextPath(r),i=this.getHeaders();i.delete("Content-Type");var s=Object.assign({headers:i,withCredentials:this.coreConfig.withCredentials},n);return this.http.post(""+o+e,t,s)},e.prototype.del=function(e,t,r){return this.http.delete(this.getContextPath(t)+e,this.getHttpOptions(r))},e.prototype.update=function(e,t){return t.forEach((function(t){var r=t.id,n=t.item;if(r){var o=e.find((function(e){return e.id===r}));Object.assign(o,n,n?{__updated:!0}:{__removed:!0})}else n&&e.unshift(Object.assign(n,{__added:!0}))})),e},e.prototype.getViaCache=function(e){var t=this;return this.cache.has(e)?o.of(this.cache.get(e)):this.getViaTempCache(e,(function(){return t.http.get(e,{withCredentials:t.coreConfig.withCredentials,responseType:"text"}).pipe(i.tap((function(r){return t.cache.set(e,r)})))}))},e.prototype.getViaTempCache=function(e,t){var r=this;if(this.temp.has(e))return this.temp.get(e);var n=(t?t():this.get(e)).pipe(i.finalize((function(){return r.temp.delete(e)})),i.shareReplay(1));return this.temp.set(e,n),n},e.prototype.downloadContent=function(e,t,r,n){var o=e[0];if(1===e.length)if(o.content){var i=this.getServiceBase()+"/dms/"+o.content.id+"/content?type="+o.content.type+"&asdownload=true&recyclebin="+!!n;i+=t?"&rendition="+t+"&_intent=DOWNLOAD_"+t:"&_intent=DOWNLOAD",o.content.id===o.id&&(i+="&version="+o.version),this.download(i,r?o.version:null)}else this.logger.error("The provided dms object has no content",o);if(e.length>1){i=this.getServiceBase()+"/dms/batch/export";if(o.content){var s={query:{expression:Zt(e.map((function(e){return e.content.id})))},options:{rendition:""}};s.options.rendition=t?"PDF":null,this.downloadMulti(i,r?o.version:null,s)}else this.logger.error("The provided dms object has no content",o)}},e.prototype.download=function(e,t){var r=this;this.http.get(e,{observe:"response",responseType:"blob",withCredentials:this.coreConfig.withCredentials}).subscribe((function(e){me.saveAs(e.body,r.getFileNameFromHttpResponse(e,t))}))},e.prototype.downloadMulti=function(e,t,r){var n=this;this.http.post(e,r,{observe:"response",responseType:"blob",withCredentials:this.coreConfig.withCredentials}).subscribe((function(e){me.saveAs(e.body,n.getFileNameFromHttpResponse(e,t))}))},e.prototype.getFileNameFromHttpResponse=function(e,t){var r=e.headers.get("Content-Disposition")||"",n=r.match("filename\\*=UTF-8''(.*)")||r.match('filename="(.*)"'),o=n?n[1]:null,i=o?decodeURIComponent(o):"unknown",s=~i.lastIndexOf(".")?i.lastIndexOf("."):i.length;return t?i.slice(0,s)+"_v"+t+i.slice(s):i},e.prototype.setDefaultHeaders=function(){return new n.HttpHeaders({"Content-Type":"application/json","X-os-include-links":"false","X-os-include-actions":"false","X-os-sync-index":"true"})},e}();er.decorators=[{type:r.Injectable}],er.ctorParameters=function(){return[{type:n.HttpClient},{type:wt,decorators:[{type:r.Inject,args:[_t]}]},{type:Xt},{type:zt}]};var tr,rr=function(){function e(e){this.id=e.id,this.implements=e.implements?e.implements:[],this.isFolder=e.folder,this.isContextFolder=e.iscontextfolder,this.isAbstract=e.abstract,this.iconId=e.icon?e.icon.id:null,this.maxFiles=e.maxfiles,this.minFiles=e.minfiles,this.name=e.name,this.qname=e.qname,this.label=e.label,this.description=e.description,this.group=e.group?e.group.label:"",this.elements=e.elements,this.allowedcontexttypes=e.allowedcontexttypes?e.allowedcontexttypes:[],this.supertypes=e.supertypes?e.supertypes.map((function(e){return e.name})):[],this.shareable=e.shareable,this.parenttypes=this.getParentTypes(e.allowedlocations)}return e.prototype.getParentTypes=function(e){return e?e.parenttypes.map((function(e){return e.name})):[]},e}(),nr=It,or=function(){function e(e,t,r,n){var i=this;this.backend=e,this.logger=t,this.eventService=r,this.appCache=n,this.systemSource=new o.ReplaySubject,this.system$=this.systemSource.asObservable(),this.objectTypeForms=[],this.cachedRoles=[],this.eventService.on(Vt.SYSTEM_STATUS_SCHEMA_CHANGED).subscribe((function(){i.fetchSystemDefinition(i.user)}))}return Object.defineProperty(e.prototype,"system",{get:function(){return JSON.parse(JSON.stringify(this._system))},set:function(e){this._system=e},enumerable:!1,configurable:!0}),e.prototype.getObjectTypes=function(){return this.system.types},e.prototype.getObjectType=function(e){return this.system.types.find((function(t){return t.name===e}))},e.prototype.getFormElementsFromFormModel=function(e,t,r){var n=this;return this.getObjectTypeForm(e,t,r?"CONTEXT":null).pipe(i.switchMap((function(e){var t=[];return n.processFormModelElements(e,t),o.of(t)})))},e.prototype.processFormModelElements=function(e,t){var r=this;e.elements.forEach((function(e){"o2mGroup"!==e.type&&"o2mGroupStack"!==e.type?t.push(e):e.elements&&e.elements.length&&r.processFormModelElements(e,t)}))},e.prototype.implementsType=function(e,t){return e.name===t||e.implements&&-1!==e.implements.indexOf(t)},e.prototype.getCodesystem=function(e){return this.system.codesystems.find((function(t){return t.id===e||t.name===e}))},e.prototype.getObjectTypeForm=function(e,t,r){for(var n,s=this,a=0;!n&&a<this.objectTypeForms.length;)this.objectTypeForms[a].name===e&&this.objectTypeForms[a].mode===r&&this.objectTypeForms[a].situation===t&&(n=this.objectTypeForms[a]),a++;if(n)return o.of(ge.cloneDeep(n));var c="/ui/form/"+e+"?situation="+t;return c+=r?"&formmode="+r:"",this.backend.getViaTempCache(c,(function(){return s.backend.getJson(c).pipe(i.tap((function(e){return s.objectTypeForms.push(ge.cloneDeep(e))})))}))},e.prototype.getSystemDefinition=function(e){return this.user=e,this.fetchSystemDefinition(e)},e.prototype.getDefaultValue=function(e){var t;switch(e){case"CURRENT_USER":t=this.user.name;break;case"CURRENT_USER_NAME":t=this.user.title;break;case"CURRENT_DATETIME":t=new Date;break;case"CURRENT_DATE":t=nr().startOf("day").toDate();break;case"YEAR":t=nr().year();break;case"MONTH":t=nr().month()+1;break;case"DAY":t=nr().date();break;case"HOUR":t=nr().hour();break;case"MINUTE":t=nr().minute();break;case"SECOND":t=nr().second();break;case"WEEK_OF_YEAR":t=nr().isoWeek();break;case"FIRST_DAY_OF_WEEK":t=nr().startOf("isoWeek").toDate();break;case"FIRST_DAY_OF_MONTH":t=nr().startOf("month").toDate();break;case"FIRST_DAY_OF_YEAR":t=nr().startOf("year").toDate()}return t},e.prototype.fetchSystemDefinition=function(e){var t=this,r=[this.backend.getJson("/system/type/list?elements=true&basetypes=true"),this.backend.getJson("/system/cs/list?elements=true")];return o.forkJoin(r).pipe(i.catchError(Gt.catch((function(e){t.logger.error("Error fetching recent version of system definition from server.",e),t.systemSource.error("Error fetching recent version of system definition from server.")}))),i.map((function(r){t.objectTypeForms=[];var n={info:{user:e.id,locale:e.getSchemaLocale(),version:e.schema.version},locales:e.schema.supportedLocales,types:[],codesystems:[]},o=r[0];return n.types=o.map((function(e){return new rr(e)})),n.codesystems=r[1],t.system=n,t.systemSource.next(n),t.logger.debug("Fetched new version of system definition (user: "+e.id+", version: "+e.schema.version+")."),t.appCache.setItem(t.appCache.SYSTEM_DEFINITION,n).subscribe((function(){t.logger.debug("Cached recent version")}),Gt.logError(null,"Error caching recent version of system definition.")),!0})))},e.prototype.getOrganizationObjectById=function(e){return this.backend.getJson("/organization/id/"+e)},e.prototype.getOrganizationObject=function(e){return this.getOrganizationObjects([e]).pipe(i.map((function(e){return e[0]})))},e.prototype.getOrganizationObjects=function(e){var t=this,r=e.map((function(e){return t.backend.getJson("/organization/name/"+e).pipe(i.catchError((function(t){return o.of({id:e,active:!1})})))}));return o.forkJoin(r)},e.prototype.getRoles=function(){var e=this;return this.cachedRoles.length?o.of(this.cachedRoles):this.backend.get("/organization/role").pipe(i.map((function(e){return e})),i.tap((function(t){return e.cachedRoles=t})))},e}();or.decorators=[{type:r.Injectable}],or.ctorParameters=function(){return[{type:er},{type:Xt},{type:Qt},{type:Jt}]},(tr=e.Direction||(e.Direction={})).LTR="ltr",tr.RTL="rtl";var ir=function(){function t(e,t,r,n,s,a,c){this.backend=e,this.translate=t,this.logger=r,this.eventService=n,this.system=s,this.http=a,this.config=c,this.USER_FETCH_URI="/user?favorites=true&privileges=true&roles=true&deputies=true&substitutesOf=true",this.user=null,this.userSource=new o.BehaviorSubject(this.user),this.user$=this.userSource.asObservable(),this.favorites=null,this.favoritesSource=new o.BehaviorSubject(this.favorites),this.favoritesGridData$=this.favoritesSource.asObservable().pipe(i.debounceTime(100),i.filter((function(e){return e}))),this.favorites$=this.favoritesGridData$.pipe(this.backend.gridDataFilter),this.notifications=null,this.notificationsSource=new o.BehaviorSubject(this.notifications),this.recycles=null,this.recyclesSource=new o.BehaviorSubject(this.recycles),this.recyclesGridData$=this.recyclesSource.asObservable().pipe(i.debounceTime(100),i.filter((function(e){return e}))),this.recycles$=this.recyclesGridData$.pipe(this.backend.gridDataFilter),this.notificationsGridData$=this.notificationsSource.asObservable().pipe(i.debounceTime(100),i.filter((function(e){return e}))),this.notifications$=this.notificationsGridData$.pipe(this.backend.gridDataFilter)}return t.prototype.getCurrentUser=function(){return this.user},t.prototype.setPresence=function(e){var t=this;return e!==this.user.present?this.backend.put("/user?presence="+e).pipe(i.tap((function(r){t.user.present=e,t.userSource.next(t.user)}))):o.of(null)},t.prototype.delUserImage=function(e){return this.http.put(e,null)},t.prototype.setUserImage=function(e){return this.backend.put("/user/image",e)},t.prototype.setDeputies=function(e){var t=this;return this.backend.put("/user/deputy?user="+e.join("&user=")).pipe(i.tap((function(){return t.refreshCurrentUser().subscribe()})))},t.prototype.changeClientLocale=function(t){var r=this;this.user.userSettings.clientlocale=t,this.backend.put("/user/config/web",this.user.userSettings).subscribe((function(){r.logger.debug("Changed client locale to '"+t+"'"),r.translate.use(t),r.user.uiDirection=(r.config.getClientLocales().find((function(e){return e.iso===t}))||{}).dir||e.Direction.LTR,r.userSource.next(r.user),r.eventService.trigger(Vt.CLIENT_LOCALE_CHANGED,t)}))},t.prototype.changeSchemaLocale=function(e){var t=this;return this.user.schemaLocale=e,this.backend.put("/user/locale/"+this.user.schemaLocale).pipe(i.tap((function(){t.logger.debug("Changed schema locale to '"+e+"'"),t.userSource.next(t.user),t.backend.setHeader("Accept-Language",t.user.getSchemaLocale()),t.logger.debug("Loading system definition for new locale."),t.system.getSystemDefinition(t.user).subscribe(),t.eventService.trigger(Vt.SCHEMA_LOCALE_CHANGED,e)})))},t.prototype.setCurrentUser=function(t){this.user=new Yt(t),this.passwordValidationSettings=t.passwortvalidation,this.user.setImageBase(this.backend.getServiceBase()),this.backend.setHeader("Accept-Language",this.user.getSchemaLocale());var r=this.config.getClientLocales().map((function(e){return e.iso})),n=this.user.getClientLocale();-1===r.indexOf(n)&&(n=this.config.getDefaultClientLocale()),this.logger.debug("Setting client locale to '"+n+"'"),this.translate.use(n),this.user.uiDirection=(this.config.getClientLocales().find((function(e){return e.iso===n}))||{}).dir||e.Direction.LTR,this.userSource.next(this.user),this.favorites=null,this.favoritesSource.next(this.favorites),this.notifications=null,this.notificationsSource.next(this.notifications)},t.prototype.getFavorites=function(){var e=this;return this.backend.getJson("/user/favorites").pipe(i.map((function(e){return e&&e.filter((function(e){return"DMS_OBJECT"===e.favoritetype}))})),i.tap((function(t){e.favorites=t,e.favoritesSource.next(e.favorites)})))},t.prototype.updateFavorites=function(e,t,r){this.backend.update(this.favorites,r||[{id:e,item:t}])&&this.favoritesSource.next(this.favorites)},t.prototype.getNotifications=function(){var e=[this.getSubscription(),this.getResubmission()];return o.forkJoin(e)},t.prototype.getResubmission=function(){var e=this;return this.backend.getJson("/messageprovider/resubmission/list").pipe(i.tap((function(t){e.notifications=t,e.notificationsSource.next(e.notifications)})))},t.prototype.getSubscription=function(){var e=this;return this.backend.getJson("/messageprovider/subscription/list").pipe(i.tap((function(t){e.notifications=t,e.notificationsSource.next(e.notifications)})))},t.prototype.removeNotifications=function(e,t){var r,n=this;switch(t){case"SUBSCRIPTION":r="subscription";break;case"RESUBMISSION":r="resubmission";break;default:return}return this.backend.del("/messageprovider/"+r+"/"+e).pipe(i.tap((function(e){return n.updateNotifications("")})))},t.prototype.updateNotifications=function(e,t,r){this.backend.update(this.notifications,r||[{id:e,item:t}])&&this.notificationsSource.next(this.notifications)},t.prototype.getUserImageUri=function(e){return this.backend.getBaseWithContext(this.backend.getServiceBase())+"/organization/image/"+e+"?usedefault=true"},t.prototype.removeFavorite=function(e){var t=this;return this.backend.del("/user/favorite/"+e).pipe(i.tap((function(r){return t.updateFavorites(e)})))},t.prototype.createFavorite=function(e,t,r){var n=this,o=Gt.buildUri("/dms/favorite/"+e,{type:t,title:r});return this.backend.post(o,{}).pipe(i.tap((function(e){return n.getFavorites().subscribe()})))},t.prototype.removeFavoritesForTarget=function(e){var t=this;return this.backend.del("/dms/favorite/"+e).pipe(i.tap((function(r){var n=t.favorites.filter((function(t){return t.target.id===e})).map((function(e){return Object.assign({id:e.id})}));t.updateFavorites(null,null,n)})))},t.prototype.getRecycleBin=function(){var e=this;return this.backend.getJson("/user/recyclebin").pipe(i.tap((function(t){e.recycles=t,e.recyclesSource.next(e.recycles)})))},t.prototype.changeLockSetting=function(e){var t=this;return this.user.userSettings.alwayslock=e,this.backend.put("/user/config/web",this.user.userSettings).pipe(i.map((function(){t.refreshCurrentUser().subscribe()})))},t.prototype.hasPrivilege=function(e){return!!this.user.privileges.find((function(t){return t.name===e}))},t.prototype.changePassword=function(e){return this.backend.put("/user/password",e)},t.prototype.refreshCurrentUser=function(){var e=this;return this.backend.get(this.USER_FETCH_URI).pipe(i.map((function(t){return e.setCurrentUser(t)})))},t.prototype.validatePassword=function(e){return e.length<this.passwordValidationSettings.minlength?{type:"short",amount:this.passwordValidationSettings.minlength}:e.replace(/[^0-9]/g,"").length<this.passwordValidationSettings.minnumber?{type:"number",amount:this.passwordValidationSettings.minnumber}:e.replace(/[a-zA-Z0-9ß ]/g,"").length<this.passwordValidationSettings.minspecialchars?{type:"specialchars",amount:this.passwordValidationSettings.minspecialchars}:{type:"valid",amount:null}},t.prototype.changeSavedInboxFilters=function(e){var t=this;return this.user.userSettings.savedInboxFilter=e,this.backend.put("/user/config/web",this.user.userSettings).pipe(i.map((function(){t.refreshCurrentUser().subscribe()})))},t}();ir.decorators=[{type:r.Injectable}],ir.ctorParameters=function(){return[{type:er},{type:t.TranslateService},{type:Xt},{type:Qt},{type:or},{type:n.HttpClient},{type:zt}]};var sr=function(){function e(e){Object.assign(this,e)}return Object.defineProperty(e.prototype,"title",{get:function(){return this.selectedtype?this.selectedtype.label:""},enumerable:!1,configurable:!0}),e.prototype.hasContent=function(){return!!this.template||this.contentcount>0},e.prototype.getSelectedTypeObject=function(){return this.types.find((function(e){return e.selected}))},e}(),ar=function(){function e(e,t,r){this.coreConfig=e,this.http=t,this.userService=r}return e.prototype.upload=function(e,t){var r=new FormData,o=new n.HttpHeaders({"Accept-Language":this.userService.getCurrentUser().getClientLocale()});return t.forEach((function(e){return r.append("files[]",e,Gt.encodeFileName(e.name))})),this.http.post(e,r,{headers:o,withCredentials:this.coreConfig.withCredentials})},e}();ar.decorators=[{type:r.Injectable}],ar.ctorParameters=function(){return[{type:wt,decorators:[{type:r.Inject,args:[_t]}]},{type:n.HttpClient},{type:ir}]};var cr=function(){function e(e,t){this.id=e,this.type=t}return e.prototype.onUploadSuccess=function(e){return e},e.prototype.onUploadFail=function(){return{}},e}();cr.ROOT="root",cr.CONTEXT="context",cr.CONTEXT_TREE="contexttree",cr.OBJECT="object",cr.CUSTOM="custom";var ur=function(){function e(e,t){this.backend=e,this.uploadService=t,this.preparedItemsSource=new o.ReplaySubject(1),this.preparedItems$=this.preparedItemsSource.asObservable(),this.preparedItemCountSource=new o.ReplaySubject(1),this.preparedItemCount$=this.preparedItemCountSource.asObservable()}return e.prototype.refreshPreparedItemsCount=function(){this.fetchPreparedItemsCount()},e.prototype.fetchPreparedItemsCount=function(){var e=this;this.backend.getJson("/prepare/state").pipe(i.map((function(e){return e.count}))).subscribe((function(t){e.preparedItemCount=t,e.preparedItemCountSource.next(e.preparedItemCount)}))},e.prototype.createPreparedItem=function(e,t){var r=this;return this.backend.post(this.createPreparedItemPostUrl({parentId:e,childType:t||null}),{}).pipe(i.tap((function(){return r.getPreparedItems$()})))},e.prototype.updatePreparedItemIndexData=function(e,t){var r=this;return this.backend.put("/prepare/"+e,t).pipe(i.tap((function(){return r.getPreparedItems$()})))},e.prototype.createPreparedItemPostUrl=function(e){var t=e.createMany?"/prepare/createmany":"/prepare/create";return e&&(t=Gt.buildUri(t,e)),t},e.prototype.getPreparedItems$=function(e){return this.fetchPreparedItems(e).subscribe(),this.preparedItems$},e.prototype.fetchPreparedItems=function(e){var t=this,r=e?"/prepare":"/prepare?form=true";return this.backend.getJson(r).pipe(i.map((function(e){return e.map((function(e){return new sr(e)}))})),i.tap((function(){return t.fetchPreparedItemsCount()})),i.tap((function(e){return t.preparedItemsSource.next(e.sort(Gt.sortValues("created","desc")))})))},e.prototype.deletePreparedItem=function(e){var t=this;return this.backend.del("/prepare/"+e).pipe(i.tap((function(){return t.getPreparedItems$()})))},e.prototype.getPrepareRootTypes=function(){return this.backend.getViaTempCache("/prepare/types").pipe(i.map((function(e){return e.types.map((function(e){return new rr(e)}))})))},e.prototype.getPrepareChildTypes=function(e,t){var r=e?{parentId:e,withcontent:t}:{withcontent:t},n=Gt.buildUri("/prepare/types",r);return this.backend.getViaTempCache(n).pipe(i.map((function(e){return{parent:e.parent,types:e.types.map((function(e){return new rr(e)}))}})))},e.prototype.getPreviewUri=function(e,t,r){return Gt.buildUri(this.backend.getServiceBase()+"/prepare/"+e+"/content",{rendition:r,index:t})},e.prototype.updateChildType=function(e,t){return this.backend.put("/prepare/"+t+"/"+e+"?form=true&contentmeta=true").pipe(i.map((function(e){return new sr(e)})))},e.prototype.addTemplate=function(e,t){return this.backend.put("/prepare/"+e+"/template?templateid="+t).pipe(i.map((function(e){return new sr(e)})))},e.prototype.getTemplates=function(e){return this.backend.getJson("/template/list?type="+e).pipe(i.map((function(e){return e})))},e.prototype.getTemplatePreviewUri=function(e,t){return Gt.buildUri(this.backend.getServiceBase()+"/template/"+e+"/content",{rendition:t})},e.prototype.commitPreparedItem=function(e,t,r){var n=this;return this.backend.put("/prepare/"+e+"/"+t).pipe(i.mergeMap((function(){return n.backend.post("/prepare/commit/"+e,r)})),i.tap((function(){return n.getPreparedItems$()})),i.map((function(e){return e.id})))},e.prototype.uploadContent=function(e,t){var r=this.backend.getServiceBase()+"/prepare/"+e+"/content.json?form=true&contentmeta=true";return this.uploadService.upload(r,[t]).pipe()},e.prototype.uploadToTarget=function(e,t,r){var n=this,o=t.map((function(e){return e._file}));return this.uploadService.upload(this.getUploadTarget(e,r),o).pipe(i.tap((function(){return n.getPreparedItems$()})))},e.prototype.getUploadTarget=function(e,t){var r;if(e.type===cr.ROOT)r=this.backend.getServiceBase()+this.createPreparedItemPostUrl({parentId:null,createMany:!t});else if(e.type===cr.OBJECT){var n=e.referenceObject;r=this.backend.getServiceBase()+"/dms/"+n.id+"/contents?type="+n.type.name}else e.type!==cr.CONTEXT&&e.type!==cr.CONTEXT_TREE||(r=this.backend.getServiceBase()+this.createPreparedItemPostUrl({parentId:e.referenceObject.id,createMany:!t,childType:e.subFolder&&e.subFolder.data.type?e.subFolder.data.type:null}));return r},e.prototype.deletePreparedItemContent=function(e,t){var r="/prepare/"+e+"/content"+(void 0!==t?"?index="+t:"");return this.backend.del(r).pipe(i.map((function(e){return new sr(e)})))},e}();ur.decorators=[{type:r.Injectable}],ur.ctorParameters=function(){return[{type:er},{type:ar}]};var pr=It,lr=function(){function e(e){this.id=e.inboxentryid,this.title=e.title,this.description=e.description,this.type=e.type,this.sourceId=e.source?e.source.id:null,this.iconId=e.target&&e.target.icon?e.target.icon.id:null,this.accepted=e.accepted,this.isdeputy=e.isdeputy,this.duetime=e.duetime,this.received=e.receivetime,this.target=e.target}return e.prototype.isOverdue=function(){return this.duetime&&pr(this.duetime).isBefore(pr())},e}();lr.TYPE_BPM="BPM",lr.TYPE_RESUBMISSION="RESUBMISSION",lr.TYPE_SUBSCRIPTION="SUBSCRIPTION";var hr=function(){function e(e){this.backend=e,this.MAX_PAGE_SIZE=1e3,this.inboxStateSource=new o.ReplaySubject(1),this.inboxState$=this.inboxStateSource.asObservable(),this.inboxItemsSource=new o.ReplaySubject(1),this.inboxItemsGridData$=this.inboxItemsSource.asObservable(),this.inboxItems$=this.inboxItemsGridData$.pipe(this.backend.gridDataFilter)}return e.prototype.getItems=function(){var e=this;return this.getAllPages().pipe(i.map((function(e){return e.map((function(e){return new lr(e)}))})),i.tap((function(t){e.inboxItems=t,e.inboxItemsSource.next(e.inboxItems)})),i.catchError(Gt.throw((function(){return e.inboxItemsSource.next([])}))))},e.prototype.getAllPages=function(){var e=this,t=[];return this.getPage().pipe(i.expand((function(t){return t.last?o.EMPTY:e.getPage(t.pageable.pageNumber+1)})),i.tap((function(e){return t=Zt(t,e.content)})),i.skipWhile((function(e){return!e.last})),i.map((function(e){return t})))},e.prototype.getPage=function(e){return this.backend.getJson("/get?size="+this.MAX_PAGE_SIZE+"&page="+(e||0),this.backend.getInboxBase())},e.prototype.getState=function(){return this.inboxState},e.prototype.refreshInboxState=function(){this.fetchInboxState()},e.prototype.fetchInboxState=function(){var e=this;this.backend.getJson("/state",this.backend.getInboxBase()).pipe(i.map((function(e){return e}))).subscribe((function(t){e.inboxState=t,e.inboxStateSource.next(e.inboxState)}),Gt.logError(null,"Failed to fetch inbox state!"))},e.prototype.removeItem=function(e){var t=this;return this.backend.del("/"+e.id,this.backend.getInboxBase()).pipe(i.tap((function(){return t.updateInboxItems(e.id)})))},e.prototype.updateInboxItems=function(e,t,r){this.backend.update(this.inboxItems,r||[{id:e,item:t}])&&this.inboxItemsSource.next(this.inboxItems)},e.prototype.markAsRead=function(e){return this.backend.put("/read/"+e.id,this.backend.getInboxBase())},e}();hr.decorators=[{type:r.Injectable}],hr.ctorParameters=function(){return[{type:er}]};var fr,dr=function(){function e(){}return e.prototype.setCapabilities=function(e,t){return this.capabilities={bpm:e.bpm,favorites:e.favorites,followup:e.followup,subscription:e.subscription,intray:e.intray,storedqueries:e.storedqueries,recyclebin:e.recyclebin,inbox:e.bpm||e.followup||e.subscription,notifications:e.followup||e.subscription,template:e.template,sso:t||!1},this.capabilities},e.prototype.getCapabilities=function(){return this.capabilities},e.prototype.hasCapability=function(e){return this.capabilities[e]},e}();dr.decorators=[{type:r.Injectable}],dr.ctorParameters=function(){return[]};var mr=function(){function e(){return fr&&(fr=this),this.storage=this.isLocalStorageAvailable()?window.localStorage:null,fr}return e.prototype.setItem=function(e,t){if(void 0===e||void 0===t)return!1;this.storage.setItem(e,JSON.stringify(t))},e.prototype.getItem=function(e){this.isKeyDefined(e);var t=this.storage.getItem(e);return!!t&&JSON.parse(t)},e.prototype.hasItem=function(e){return this.isKeyDefined(e),null===this.storage.getItem(e)},e.prototype.removeItem=function(e){this.isKeyDefined(e),this.storage.removeItem(e)},e.prototype.clear=function(e){var t=this;return e?Object.keys(this.storage).forEach((function(r){return e(r)&&t.removeItem(r)})):this.storage.clear()},e.prototype.isKeyDefined=function(e){if(void 0===e)return!1},e.prototype.isLocalStorageAvailable=function(){try{var e=window.localStorage;return e.setItem("test","test"),e.removeItem("test"),!0}catch(e){return!1}},e}();mr.decorators=[{type:r.Injectable}],mr.ctorParameters=function(){return[]};var gr,yr=function(e){var t=this;switch(this.title=e.activityName,this.description=e.description,this.number=e.number,this.time=e.time,this.type=e.type,this.data={},e.type){case"DEADLINE_START":case"DEADLINE_FIRE":this.title=e.periodName+": "+e.description,this.description=null,this.data={periodFireTime:e.periodFireTime},this.type=e.type}e.performer&&(this.performer=[],e.performer.groups.forEach((function(e){return t.performer.push({type:"group",label:e.name})})),e.performer.roles.forEach((function(e){return t.performer.push({type:"role",label:e.name})})),e.performer.users.forEach((function(e){return t.performer.push({type:"user",label:e.lastname+", "+e.firstname+" ("+e.name+")"})}))),e.user&&(this.editor=e.user)},br=function(){function e(e){this.creatorid=e.creatorid,this.modelname=e.modelname,this.iconurl=e.iconurl,this.iconid=e.iconid,this.localizedsubject=e.subject,this.modelid=e.modelid,this.processid=e.id,this.procname=e.name,this.starttime=e.starttime,this.endtime=e.endtime,this.state=e.state}return Object.defineProperty(e.prototype,"title",{get:function(){return this.localizedsubject||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this.processid||""},enumerable:!1,configurable:!0}),e.prototype.setFile=function(e){this.file=e||[]},e}(),vr=function(){function e(e){Object.assign(this,e),this.fileEntryPermissions={add:e.isFileElemAddable||!1,remove:e.isFileElemRemovable||!1},this.actions&&this.actions.length&&(this.actions=this.actions.sort((function(e,t){return e.code-t.code})))}return e.prototype.setFile=function(e){this.file=e?e.sort((function(e,t){return e.addtime<t.addtime?-1:e.addtime>t.addtime?1:0})):[]},e}();(gr=e.ClipboardAction||(e.ClipboardAction={}))[gr.COPY=0]="COPY",gr[gr.CUT=1]="CUT";var Sr,Er=function(){function t(e,t,r,n){this.capabilities=e,this.backend=t,this.eventService=r,this.inboxService=n,this.processItemsSource=new o.ReplaySubject(1),this.processItems$=this.processItemsSource.asObservable()}return t.prototype.getProcesses=function(e){var t=this;return void 0===e&&(e=1e3),this.backend.getJson("/process/user?size="+e,this.backend.getBpmBase()).pipe(i.map((function(e){return e.content.map((function(e){return new br(e)}))})),i.tap((function(e){t.processItems=e,t.processItemsSource.next(t.processItems)})))},t.prototype.getExecutableProcesses=function(e,t,r,n,i){return this.capabilities.hasCapability("bpm")?this.executableProcesses&&t?o.of(this.executableProcesses):this.fetchExecutableProcesses(e,r,n,i):o.of([])},t.prototype.initExecutableProcesses=function(){var e=this;return this.backend.get("/bpm/process/executable").pipe(i.tap((function(t){return e.hasMainExecutableProcesses=null==t?void 0:t.length})))},t.prototype.getExecutableProcessesForDmsObjects=function(e){return this.getExecutableProcesses(e.map((function(e){return e.typeName})),!1,!0)},t.prototype.fetchExecutableProcesses=function(e,t,r,n){var o=this,s="/bpm/process/executable";return t&&(s+="?form=true&fields=true"),e&&(s+=(t?"&":"?")+"type="+e.join(",")),r&&(s+=(t||e?"&":"?")+"modelid="+r),this.backend.get(s).pipe(i.map((function(e){return e})),i.tap((function(e){n&&(t?(o.executableProcesses||(o.executableProcesses=[]),e.forEach((function(e){var t=o.executableProcesses.findIndex((function(t){return t.id===e.id}));-1===t?o.executableProcesses.push(e):o.executableProcesses[t]=e}))):o.executableProcesses=e)})))},t.prototype.getProcessFile=function(e){return this.backend.getJson("/process/"+e+"/file",this.backend.getBpmBase()).pipe(i.map((function(e){return e.content.map((function(e){return{id:e.elementid,title:e.title,description:e.description?e.description:"",iconid:e.iconid,creator:e.creator,addtime:e.addtime,type:e.type}}))})))},t.prototype.getWorkItem=function(e,t,r){var n=r||{form:!0,fields:!0},s=[this.backend.getJson(Gt.buildUri("/bpm/process/"+e+"/"+t,n)),this.getProcessFile(e)];return o.forkJoin(s).pipe(i.map((function(e){var t=new vr(e[0]);return t.setFile(e[1]),t})))},t.prototype.saveWorkItem=function(e){var t=this,r=e.id,n=e.processId,o={contents:e.file,data:e.data};return this.backend.post(Gt.buildUri("/bpm/process/"+n+"/"+r+"/save",{keeplock:!0,isautolock:!1}),o).pipe(i.mergeMap((function(){return t.getWorkItem(n,r)})))},t.prototype.forwardWorkItem=function(e,t){var r=this,n={action:t,contents:e.file,data:e.data};return this.backend.post(Gt.buildUri("/bpm/process/"+e.processId+"/"+e.id+"/save",{keeplock:!1,isautolock:!1}),n).pipe(i.tap((function(){return r.inboxService.updateInboxItems(e.id)})))},t.prototype.lockWorkItem=function(e){var t=this;return this.backend.put("/bpm/process/"+e.processId+"/"+e.id+"/lock").pipe(i.mergeMap((function(){return t.getWorkItem(e.processId,e.id)})))},t.prototype.unlockWorkItem=function(e){var t=this;return this.backend.del("/bpm/process/"+e.processId+"/"+e.id+"/lock").pipe(i.mergeMap((function(){return t.getWorkItem(e.processId,e.id)})))},t.prototype.startProcess=function(e,t,r){return this.backend.post("/bpm/process/?modelid="+e,{data:t,contents:r})},t.prototype.getProcessHistory=function(e){return this.backend.getJson("/bpm/process/"+e+"/history").pipe(i.map((function(e){return e&&e.length?e.map((function(e){return new yr(e)})):[]})))},t.prototype.removeFileElement=function(e,t,r){return this.backend.del("/process/"+e+"/file/"+r+"?activityid="+t,this.backend.getBpmBase())},t.prototype.addFileElements=function(e,t,r){var n=this,s=[];return r.forEach((function(r){s.push(n.backend.post("/process/"+e+"/file/"+r.id+"?type="+r.type.name+"&activityid="+t,{},n.backend.getBpmBase()))})),o.forkJoin(s).pipe(i.mergeMap((function(){return n.getWorkItem(e,t)})))},t.prototype.addFileElementsFromClipboard=function(t,r){if(t&&t.fileEntryPermissions.add&&r&&r.elements.length&&r.action===e.ClipboardAction.COPY){var n=void 0;if(t.file.length){var i=t.file.map((function(e){return e.id}));n=r.elements.filter((function(e){return-1===i.indexOf(e.id)}))}else n=r.elements;return this.addFileElements(t.processId,t.id,n)}return o.throwError("error")},t}();Er.decorators=[{type:r.Injectable}],Er.ctorParameters=function(){return[{type:dr},{type:er},{type:Qt},{type:hr}]},(Sr=e.SystemStatusEnum||(e.SystemStatusEnum={})).SYSTEM_STATUS_SCHEMA_CHANGED="schemaChangedOn",Sr.SYSTEM_STATUS_ORG_CHANGED="orgChangedOn",Sr.SYSTEM_STATUS_SEC_CHANGED="securityChangedOn",Sr.SYSTEM_STATUS_ACL_CHANGED="aclChangedOn",Sr.SYSTEM_STATUS_INBOX_CHANGED="inboxChangedOn";var Tr=function(){function t(e,t,r,n){var i=this;this.eventService=e,this.backend=t,this.appCache=r,this.ngZone=n,this.statusCacheKey="eo.framework.cache.system.status",this.pollingStopTrigger$=new o.Subject,this.appCache.getItem(this.statusCacheKey).subscribe((function(e){return i.currentStatus=e}))}return t.prototype.init=function(e){void 0===e&&(e=-1),e>-1&&(this.pollingStopTrigger$=new o.Subject,this.startPolling(e))},t.prototype.stop=function(){this.hasBeenStopped=!0,this.pollingStopTrigger$.next(),this.pollingStopTrigger$.complete()},t.prototype.startPolling=function(e){var t=this;this.ngZone.runOutsideAngular((function(){o.timer(0,e).pipe(i.takeUntil(t.pollingStopTrigger$)).subscribe((function(){t.ngZone.run((function(){t.eventService.trigger(Vt.SYSTEM_STATUS_INBOX_CHANGED,{})}))}))}))},t.prototype.handleStatusResult=function(e){var t=this,r=[];Object.keys(e).forEach((function(n){t.statusCheck(e,n)&&r.push({type:t.statusEvent(n),data:e})})),(r.length||this.hasBeenStopped)&&this.ngZone.run((function(){r.forEach((function(e){t.eventService.trigger(e.type,e.data)}))})),!r.length&&this.currentStatus||(this.currentStatus=e,this.appCache.setItem(this.statusCacheKey,e))},t.prototype.handleStatusError=function(e){var t=this;this.ngZone.run((function(){setTimeout((function(e){t.stop()}))}))},t.prototype.statusEvent=function(t){return Vt[Object.keys(e.SystemStatusEnum).find((function(r){return e.SystemStatusEnum[r]===t}))]},t.prototype.statusCheck=function(e,t){return this.currentStatus&&this.currentStatus[t]<e[t]},t}();Tr.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new Tr(r.ɵɵinject(Qt),r.ɵɵinject(er),r.ɵɵinject(Jt),r.ɵɵinject(r.NgZone))},token:Tr,providedIn:"root"}),Tr.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],Tr.ctorParameters=function(){return[{type:Qt},{type:er},{type:Jt},{type:r.NgZone}]};var Or=function(){function e(){}return e.isWebEnvironment=function(){return!e.isDesktopEnvironment()&&!e.isMobileEnvironment()},e.isMobileEnvironment=function(){return window.hasOwnProperty("cordova")},e.isDesktopEnvironment=function(){return window.hasOwnProperty("process")&&window.process.versions.hasOwnProperty("electron")},e}(),Cr=function(){function e(){this._cloudEnvironment=!1}return Object.defineProperty(e.prototype,"cloudEnvironment",{get:function(){return this._cloudEnvironment},set:function(e){this._cloudEnvironment=e},enumerable:!1,configurable:!0}),e.prototype.isCloud=function(){return this.cloudEnvironment},e}();Cr.decorators=[{type:r.Injectable}],Cr.ctorParameters=function(){return[]};var xr=function(){function e(e,t,r,n,i,s,a,c,u,p,l,h,f,d,m,g,y,b,v){var S=this;this.config=e,this.coreConfig=t,this.appCache=r,this.envService=n,this.http=i,this.bpmService=s,this.ngZone=a,this.location=c,this.capabilitiesService=u,this.logger=p,this.inboxService=l,this.prepareService=h,this.backend=f,this.systemService=d,this.userService=m,this.eventService=g,this.systemStatusService=y,this.storage=b,this.local=v,this.TOKEN_STORAGE_KEY="eo.auth.cloud.credentials",this.userProfileUri=this.userService.USER_FETCH_URI,this.authSource=new o.BehaviorSubject(!1),this.loggedInCacheKey="eo.user.loggedIn",this.authenticated$=this.authSource.asObservable(),this.hosts=[],this.profile={host:"",user:null,auth:null,active:!1},window.addEventListener("storage",(function(e){if(e.key===S.loggedInCacheKey){var t=JSON.parse(e.newValue).host;S.initUser(t).subscribe()}}))}return e.prototype.login=function(e,t,r){var o=this;e=e||"";var s=new FormData;s.append("username",encodeURIComponent(t)),s.append("password",encodeURIComponent(r));var a=new n.HttpHeaders({"Content-Type":"application/x-www-form-urlencoded"});return this.http.post(e+this.config.getContextPath()+"/login","username="+encodeURIComponent(t)+"&password="+encodeURIComponent(r),{headers:a,responseType:"text",withCredentials:this.coreConfig.withCredentials}).pipe(i.switchMap((function(){return o.initUser(e)})))},e.prototype.cloudLogin=function(e,t){var r=this;return o.Observable.create((function(n){var s=new o.Subject,a=e||"";r.http.get(a+"/tenant/"+t+"/loginDevice").subscribe((function(e){var c=a+"/oauth/"+t+"?user_code="+e.user_code,u=window.open(c,"auth");u&&r.ngZone.runOutsideAngular((function(){var e=setInterval((function(){u.closed&&(clearInterval(e),r.ngZone.run((function(){s.next(),s.complete()})))}),1e3)})),r.cloudLoginPollForResult(a+"/auth/info/state?device_code="+e.device_code,1e3,s).pipe(i.tap((function(e){if(e){r.cloudLoginSetHeaders(e,t);var n={tenant:t,accessToken:e};r.storage.setItem(r.TOKEN_STORAGE_KEY,n).subscribe()}})),i.switchMap((function(e){if(e)return r.initUser(a);o.throwError("not authenticated")}))).subscribe((function(e){u.close(),n.next(e),n.complete()}),(function(e){u.close(),n.error(e),n.complete()}))}),(function(e){n.error("unable to call device flow endpoint",e),n.complete()}))}))},e.prototype.cloudLoginPollForResult=function(e,t,r){var n=this;return void 0===r&&(r=new o.Subject),o.Observable.create((function(s){var a=!1,c=!1;n.ngZone.runOutsideAngular((function(){o.interval(t).pipe(i.takeUntil(r),i.switchMap((function(){return n.http.get(e).pipe(i.catchError((function(e){if(400===e.status)return o.of(e.error);o.throwError(e)})))}))).subscribe((function(e){n.ngZone.run((function(){a=!!e.access_token,c="access_denied"===e.error,a||c?(r.next(),r.complete(),s.next(a?e.access_token:null),s.complete()):"expired_token"===e.error&&o.throwError("Token expired")}))}),(function(e){n.ngZone.run((function(){s.error(e),s.complete()}))}),(function(){n.ngZone.run((function(){s.next(a),s.complete()}))}))}))}))},e.prototype.cloudLoginSetHeaders=function(e,t){this.backend.setHeader("Authorization","bearer "+e),this.backend.setHeader("X-ID-TENANT-NAME",t)},e.prototype.initUser=function(e){var t=this,r=new n.HttpHeaders({"Content-Type":"application/json"});return this.http.get(""+(e||"")+this.config.getContextPath()+"/auth/info",{headers:r,withCredentials:this.coreConfig.withCredentials}).pipe(i.switchMap((function(r){return t.gatewayInfo=r,t.envService.cloudEnvironment=t.gatewayInfo&&t.gatewayInfo.oauth2,t.isCloudEnvironment()?t.storage.getItem(t.TOKEN_STORAGE_KEY).pipe(i.switchMap((function(n){return n&&t.cloudLoginSetHeaders(n.accessToken,n.tenant),t.fetchUser(r,e)}))):t.fetchUser(r,e)})))},e.prototype.fetchUser=function(e,t){var r=this,o=new n.HttpHeaders({"Content-Type":"application/json"});return this.backend.get(this.userProfileUri,"",{headers:o,withCredentials:this.coreConfig.withCredentials}).pipe(i.switchMap((function(n){return r.profile={host:t||"",user:n.user.name,auth:null,active:!0},t&&r.addHostConfig(t),window.localStorage.setItem(r.loggedInCacheKey,JSON.stringify({userId:n.user.id,host:t})),r.initApp(n,e.ntlm)})),i.tap((function(){return r.authSource.next(r.isLoggedIn())})))},e.prototype.logout=function(e){this.authSource.next(!1),this.systemStatusService.stop(),this.profile={host:"",user:null,auth:null,active:!1},this.isCloudEnvironment()&&(this.storage.removeItem(this.TOKEN_STORAGE_KEY).subscribe(),this.coreConfig.environment.production&&Or.isWebEnvironment())?window.location.href=this.config.getContextPath()+"/logout":(e&&this.http.get(""+(this.profile.host||"")+this.config.getContextPath()+"/logout",{withCredentials:this.coreConfig.withCredentials}).subscribe(),this.backend.setAuthProfile(this.profile),this.eventService.trigger(Vt.LOGOUT))},e.prototype.isCloudEnvironment=function(){return this.gatewayInfo&&this.gatewayInfo.oauth2},e.prototype.addHostConfig=function(e){this.hosts.find((function(t){return t===e}))||this.hosts.push(e)},e.prototype.isLoggedIn=function(){return null!==this.profile.user},e.prototype.initApp=function(e,t){var r=new Yt(e);this.backend.setAuthProfile(this.profile),this.userService.setCurrentUser(e);var n=this.capabilitiesService.setCapabilities(e.capabilities,t);this.systemStatusService.init(this.config.getRaw("systemStatusUpdateInterval")),n.inbox&&this.inboxService.refreshInboxState(),n.intray&&this.prepareService.refreshPreparedItemsCount();var s=[this.bpmService.initExecutableProcesses(),this.systemService.getSystemDefinition(r)];return o.forkJoin(s).pipe(i.map((function(){return r})))},e}();xr.decorators=[{type:r.Injectable}],xr.ctorParameters=function(){return[{type:zt},{type:wt,decorators:[{type:r.Inject,args:[_t]}]},{type:Jt},{type:Cr},{type:n.HttpClient},{type:Er},{type:r.NgZone},{type:s.PlatformLocation},{type:dr},{type:Xt},{type:hr},{type:ur},{type:er},{type:or},{type:ir},{type:Qt},{type:Tr},{type:de.LocalStorage},{type:mr}]};var Ir=function(){function e(e,t,r,n,o){this.coreConfig=e,this.logger=t,this.http=r,this.configService=n,this.authService=o}return e.prototype.initialize=function(){var e=this;return new Promise((function(t,r){(Array.isArray(e.coreConfig.main)?o.forkJoin(e.coreConfig.main.map((function(t){return e.http.get(t,{withCredentials:e.coreConfig.withCredentials}).pipe(i.catchError((function(t){return e.logger.error("failed to catch config file",t),o.of({})})))}))):o.of([e.coreConfig.main])).pipe(i.map((function(e){return e.reduce((function(e,t){return Object.keys(t).forEach((function(r){return!e[r]||Array.isArray(t[r])||"object"!=typeof t[r]?e[r]=t[r]:Object.assign(e[r],t[r])})),e}),{})})),i.mergeMap((function(t){return e.configService.set(t),e.authService.initUser().pipe(i.catchError((function(e){return o.of(!0)})))}))).subscribe((function(e){t(!0)}),(function(t){e.logger.error(t),r()}))}))},e}();Ir.decorators=[{type:r.Injectable}],Ir.ctorParameters=function(){return[{type:wt,decorators:[{type:r.Inject,args:[_t]}]},{type:Xt},{type:n.HttpClient},{type:zt},{type:xr}]};var kr,_r=function(e){Object.assign(this,e)},wr=function(e){this.subscriptions=[],this.resubmissions=[],this.storageInfo=[],this.additionalvisibility=[],this.id=e.id,this.title=e.title,this.description=e.description,this.version=e.version,this.versions=e.versions,this.data=e.data,this.typeName=e.type,this.isActiveVersion=e.activeversion,this.isFinalized=e.finalized,this.isFavorite=e.favorite,this.isFolder=e.folder,this.isContextFolder=!!e.iscontextfolder,this.storageInfo=e.storageinfo,e.contents&&e.contents[0]&&(this.contentFileName=e.contents[0].path,this.contentFileSize=e.contents[0].size),e.contextfolder&&(this.contextFolder={id:e.contextfolder.id,typeName:e.contextfolder.type,title:e.contextfolder.title,description:e.contextfolder.description}),e.created&&(this.created={on:e.created.on,by:{id:e.created.by.id,title:e.created.by.title,name:e.created.by.name}}),e.modified&&(this.modified={on:e.modified.on,by:{id:e.modified.by.id,title:e.modified.by.title,name:e.modified.by.name}}),"NOT_LOCKED"!==e.lock&&e.lockinfo&&(this.lock={on:e.lockinfo.time,by:{me:"LOCKED_BY_SESSION_USER"===e.lock,other:"LOCKED_BY_OTHER_USER"===e.lock,name:e.lockinfo.username,label:e.lockinfo.usertitle}}),e.rights&&e.rights.length>0?this.rights={select:e.rights[0].privileges.select,edit:e.rights[0].privileges.edit&&!(this.lock&&this.lock.by.other),delete:e.rights[0].privileges.delete&&!(this.lock&&this.lock.by.other),finalize:e.rights[0].privileges.finalize&&!(this.lock&&this.lock.by.other),recycle:e.rights[0].privileges.recycle&&!(this.lock&&this.lock.by.other)}:this.rights={select:!1,edit:!1,delete:!1,finalize:!1,recycle:!1},e.shares&&(this.shares=e.shares),e.contentid&&(this.content={id:e.contentid,type:e.contenttype,count:e.contentcount||0,linked:e.contentid!==e.id,contents:e.contents}),e.subscriptions&&(this.subscriptions=e.subscriptions),e.resubmissions&&(this.resubmissions=e.resubmissions),e.additionalvisibility&&(this.additionalvisibility=e.additionalvisibility)},Ar=function(e){this.version=e.version,this.time=e.time,this.title=e.title,this.description=e.description,this.intent=e.intent,this.comment=e.comment,this.group=e.group,this.type=e.type,this.user=e.user,e.parameter&&(this.parameter=Object.assign(Object.assign({},e.parameter),{processId:e.parameter.procId,processName:e.parameter.procName,activityId:e.parameter.actId,activityName:e.parameter.actName}))};(kr=e.SubscriptionMode||(e.SubscriptionMode={})).ONLY_INDEX_DATA_CHANGED="META",kr.ONLY_DOCUMENT_CONTENT_CHANGED="CONTENT",kr.DMS_OBJECT_CHANGED="BOTH";var Rr=function(){function e(e,t,r){this.backend=e,this.systemService=t,this.eventService=r}return e.prototype.getDmsObject=function(e,t,r,n,o,s){var a=this,c="/dms/"+e,u={additionalvisibility:!0,subscription:"CURRENT",resubmission:"CURRENT",rights:"CURRENT",datameta:"true",contextfolder:"true",type:t,recyclebin:o,version:r,storageinfo:s,_intent:n};return this.backend.getViaTempCache(Gt.buildUri(c,u)).pipe(i.catchError(Gt.catchSkip((function(e){return 404===e.status}))),i.map((function(e){return a.resolveObjectTypes(new wr(e))})))},e.prototype.getDmsObjectByParams=function(e){return this.getDmsObject(e.id,e.type,e.version,e.intent,e.recyclebin,e.withStorageInfo)},e.prototype.resolveObjectTypes=function(e){return e.type=this.systemService.getObjectType(e.typeName),e.contextFolder&&(e.contextFolder.type=this.systemService.getObjectType(e.contextFolder.typeName)),e},e.prototype.deleteDmsObject=function(e,t,r,n){void 0===n&&(n=!1);var o="/dms/"+e,i={};return t&&t.length>0&&(i.type=t),r&&(i.harddelete=r),n&&(i.forcedelete=n),this.backend.del(Gt.buildUri(o,i))},e.prototype.getContextPath=function(e){return this.backend.get("/dms/"+e+"/context").pipe(i.map((function(e){return e.forEach((function(e){e.dmsobject=new wr(e.dmsobject)})),e})))},e.prototype.getChildren=function(e){var t=this,r="/dms/"+e.id+"/children";return this.backend.getViaTempCache(Gt.buildUri(r,{type:e.type.name})).pipe(i.map((function(e){return e.map((function(e){return t.resolveObjectTypes(new wr(e))}))})))},e.prototype.getVersions=function(e,t){var r="/dms/"+e+"/versions";return this.backend.getViaTempCache(Gt.buildUri(r,{type:t})).pipe(i.map((function(e){return new wr(e)})))},e.prototype.getAttachments=function(e){var t,r,n,s=this,a=null===(t=e.content)||void 0===t?void 0:t.type,c=(null===(r=e.content)||void 0===r?void 0:r.linked)?-1:e.version,u=null===(n=e.content)||void 0===n?void 0:n.id,p=Gt.buildUri("/dms/"+u+"/attachments",{type:a,version:c});return u?this.backend.getViaTempCache(p).pipe(i.catchError(Gt.catchSkip((function(e){return 404===e.status}))),i.map((function(e){return e.attachmentinfo&&e.attachmentinfo.attachments?e.attachmentinfo.attachments.map((function(e,t){return new _r(Object.assign(e,{id:t,previewUri:s.getAttachmentByIndex(u,t,a,c)}))})):[]}))):o.of([])},e.prototype.getAttachmentByIndex=function(e,t,r,n){var o=Gt.buildUri("/dms/"+e+"/attachments/"+t,{type:r,version:n});return this.backend.getServiceBase()+o},e.prototype.getSlide=function(e,t,r,n){return Gt.buildUri(this.backend.getServiceBase()+"/dms/"+e+"/slide",{type:t,version:r,height:n})},e.prototype.getPreview=function(e,t,r,n,o){return Gt.buildUri(this.backend.getServiceBase()+"/dms/"+e+"/content",{rendition:n,type:t,version:r,recyclebin:o})},e.prototype.updateObject=function(e,t,r,n,o){var i=Gt.buildUri("/dms/"+e,{type:r,version:n,checkreferences:o});return this.triggerUpdate({id:e,type:r,typeName:r},this.backend.put(i,t))},e.prototype.getHistory=function(e,t,r){var n="/dms/"+e+"/audit";return this.backend.getJson(Gt.buildUri(n,{type:t,recyclebin:r})).pipe(i.map((function(e){return e.audit.map((function(e){return new Ar(e)}))})))},e.prototype.restoreVersion=function(e,t,r){var n="/dms/restoreversion/"+e+"/"+t;return this.backend.post(Gt.buildUri(n,{type:r}),null)},e.prototype.restore=function(e,t,r){var n="/dms/restore/"+e+"?userid="+t;return this.backend.put(n)},e.prototype.triggerUpdate=function(e,t){var r=this;return e?t.pipe(i.mergeMap((function(){return r.getDmsObject(e.id,e.typeName)})),i.tap((function(e){return r.eventService.trigger(Vt.DMS_OBJECT_UPDATED,e)}))):t},e.prototype.removeContent=function(e){var t="/dms/"+e.id+"/content";return this.triggerUpdate(e,this.backend.del(t))},e.prototype.createDmsObject=function(e,t,r,n){var o=new FormData;r?o.append("data",new Blob([JSON.stringify(r)],{type:"application/json"})):o.append("noindexdata",""),t&&o.append("files[]",t,Gt.encodeFileName(t.name));var i="/dms/create/"+e;return n&&(i=Gt.buildUri(i,{parentId:n.id,parentType:n.type})),this.backend.postMultiPart(i,o,null,{headers:{}})},e.prototype.createSubscription=function(e,t,r,n,o,i){var s="/dms/subscription/"+e.id;return this.triggerUpdate(e,this.backend.post(Gt.buildUri(s,{subject:t,type:e.typeName,receiver:r,sendemail:n,onlyemail:o,mode:i}),{}))},e.prototype.createResubmission=function(e,t,r,n,o,i){var s="/dms/resubmission/"+e.id;return this.triggerUpdate(e,this.backend.post(Gt.buildUri(s,{subject:t,type:e.typeName,receiver:n,due:r?r.toISOString():"",sendemail:o,onlyemail:i}),{}))},e.prototype.removeSubscriptionById=function(e,t){return this.triggerUpdate(t,this.backend.del("/messageprovider/subscription/"+e))},e.prototype.removeResubmissionsById=function(e,t){return this.triggerUpdate(t,this.backend.del("/dms/resubmission/"+e))},e.prototype.updateResubmission=function(e,t,r,n,o,s){var a=this;return this.removeResubmissionsById(e.id).pipe(i.mergeMap((function(){return a.createResubmission(e,t,r,n,o,s)})))},e.prototype.setOrganizationObjectsWithReadRights=function(e,t,r,n){var o="/dms/"+t+"/share",i={shares:Zt(n.map((function(e){return{organizationobject:e,sharechildren:!0}})),r.map((function(e){return{organizationobject:e,sharechildren:!1}})))};return this.triggerUpdate(e[0],this.backend.put(o,i))},e.prototype.move=function(e,t,r,n){var o="/dms/location/"+e;return this.backend.post(Gt.buildUri(o,{type:t,parentId:r,parentType:n}),{})},e.prototype.copy=function(e,t,r,n,o){var i="/dms/copy/"+e;return this.backend.post(Gt.buildUri(i,{type:t,parentId:r,parentType:n,createcontentlink:o}),{})},e.prototype.finalize=function(e){var t="/dms/finalize/"+e.id+"?type="+e.typeName;return this.triggerUpdate(e,this.backend.put(t))},e.prototype.definalize=function(e){var t="/dms/definalize/"+e.id+"?type="+e.typeName;return this.triggerUpdate(e,this.backend.put(t))},e.prototype.createLocalCopyOfDMSObject=function(e){var t={id:e.id,title:e.title,description:e.description,version:e.version,versions:e.versions,data:e.data,type:e.typeName,activeversion:e.isActiveVersion,finalized:e.isFinalized,favorite:e.isFavorite,folder:e.isFolder,iscontextfolder:e.isContextFolder,contextfolder:e.contextFolder?{id:e.contextFolder.id,type:e.contextFolder.typeName,title:e.contextFolder.title,description:e.contextFolder.description}:null,created:e.created,modified:e.modified,lock:e.lock?e.lock.by.me?"LOCKED_BY_SESSION_USER":"LOCKED_BY_OTHER_USER":"NOT_LOCKED",lockinfo:e.lock?{username:e.lock.by.name,usertitle:e.lock.by.label,time:e.lock.on}:null,rights:[{privileges:{select:e.rights.select,edit:e.rights.edit,delete:e.rights.delete,finalize:e.rights.finalize,recycle:e.rights.recycle}}],shares:e.shares,contentid:e.content?e.content.id:null,contenttype:e.content?e.content.type:null,contentcount:e.content?e.content.count:null,contents:e.content?e.content.contents:null,subscriptions:e.subscriptions,resubmissions:e.resubmissions,additionalvisibility:e.additionalvisibility},r=new wr(t);return r.type=e.type,r},e}();Rr.decorators=[{type:r.Injectable}],Rr.ctorParameters=function(){return[{type:er},{type:or},{type:Qt}]};var Dr=function(e){function t(r){var n,o,i=e.call(this)||this;if(r){if(i.id=r.id,i.name=r.name,i.favorite=r.favorite,i.shared=r.shared,i.user=r.user,i.version=r.version,i.roles=r.roles||[],i.parameter=[],r.parameter&&r.parameter.length>0)try{for(var s=Kt(r.parameter),a=s.next();!a.done;a=s.next()){var c=a.value;try{var u=JSON.parse(c),p={qname:u.qname,type:u.type};i.parameter.push(p)}catch(e){console.error("Failed parsing stored query parameter",e)}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}}else i.id=t.ID_NEW,i.parameter=[];return i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Wt(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(t,e),Object.defineProperty(t.prototype,"title",{get:function(){return this.name||""},enumerable:!1,configurable:!0}),t.prototype.setQuery=function(e){this.term=e?e.term:"",this.types=e?e.types:[],this.contextFolderTypes=e?e.contextFolderTypes:[],this.filters=e?e.filters:[],this.suggest=!!e&&e.suggest,this.expertMode=!!e&&e.expertMode,this.scope=e?e.scope:null,this.searchMode=e?e.searchMode:"idx"},t.prototype.toPersistableStoredQuery=function(){var e=[];return this.parameter.forEach((function(t){return e.push(JSON.stringify(t))})),{id:this.id,name:this.name,favorite:this.favorite,shared:this.shared,user:this.user,version:this.version,roles:this.roles,parameter:e,query:JSON.stringify(this.getQueryJson())}},t.prototype.isNew=function(){return this.id===t.ID_NEW},t}(Nt);Dr.ID_NEW="new";var Pr=function(){function e(e,t,r){this.system=e,this.backend=t,this.config=r}return e.toRangeValue=function(e){if(e){if(e instanceof Ht)return e;if(e.hasOwnProperty("operator")&&e.hasOwnProperty("firstValue"))return new Ht(e.operator,e.firstValue,e.secondValue)}return e},e.prototype.buildQuery=function(e){var t,r,n=this;e instanceof Nt?t=e:(r="string"==typeof e?JSON.parse(e):e,(t=new Nt).term=r.term,r.filters&&Object.keys(r.filters).forEach((function(e){t.filters.push(new Bt(e,r.filters[e].o,r.filters[e].v1,r.filters[e].v2))})),r.types&&r.types.forEach((function(e){n.system.getObjectType(e)?t.types.push(n.system.getObjectType(e)):t.types.push(e)})),r.contextfoldertypes&&r.contextfoldertypes.forEach((function(e){if("sysroot"===e){var r=new rr({id:"a",folder:!0,name:"sysroot",qname:"sysroot",label:"sysroot",iscontextfolder:!0,abstract:!1,elements:[],description:"",shareable:!1,minfiles:0,maxfiles:1});t.contextFolderTypes.push(r)}else t.contextFolderTypes.push(n.system.getObjectType(e))})),t.fields=r.fields,r.options&&(t.suggest=r.options.suggest||!1,t.expertMode=r.options.expertmode||!1,t.scope=r.options.scope,t.resolveReference=null!==r.options.resolvereference?r.options.resolvereference:null===r.options.resolveReference||r.options.resolveReference,t.withContext=r.options.withcontext||r.options.withContext||!1,t.searchMode=r.options.searchmode||Nt.DEFAULT_SEARCH_MODE));return t},e.prototype.search=function(e){var t=this;return this.executeQuery(e.getQueryJson()).pipe(i.map((function(e){return t.createResultFromResponse(e)})))},e.prototype.getSearchState=function(e){return e instanceof Nt&&(e=e.getQueryJson()),delete e.name,this.executeQuery(e,!0).pipe(i.map((function(e){var t=new Lt;return t.count=e.hits.total,Object.keys(Nt.BASE_PARAMS).forEach((function(r){var n=Nt.BASE_PARAMS[r];(e.aggregations[n]?e.aggregations[n].buckets:[]).forEach((function(e){var r=e.key,o=e.doc_count,i=e.contextfoldertype;"filesize"===n&&(o=e["filter#documents"].doc_count),t.addAggregations(n,r,o,e),n===Nt.BASE_PARAMS.TYPE&&i&&i.buckets.forEach((function(e){t.addAggregations("contexttype",e.key,e.doc_count,e)}))}))})),t})))},e.prototype.getChunkedResult=function(e,t,r){var n=this,o=e.getQueryJson();o.from=t;var s="search!chunk:"+r+"!"+JSON.stringify(o);return this.backend.getViaTempCache(s,(function(){return n.executeQuery(o,!1,r).pipe(i.map((function(e){return n.createResultFromResponse(e)})))}))},e.prototype.executeQuery=function(e,t,r){var n,o=this,i=e;if(t)n="/aggregate";else{var s=r||this.config.getRaw("search.limit");n="/?size="+s}return i.options=Object.assign(Object.assign({},i.options),{tracktotalhits:this.config.getRaw("search.trackTotalHits")||!1,timezone:Gt.getTimezoneOffset()}),this.backend.getViaTempCache(n+JSON.stringify(i),(function(){return o.backend.post(n,i,o.backend.getSearchBase())}))},e.prototype.downloadCsvFromQuery=function(e){var t=this;return this.backend.post("/export",e,this.backend.getSearchBase(),{observe:"response",responseType:"blob"}).pipe(i.tap((function(e){var r=new Blob([e.body],{type:"text/csv;charset=utf-8"});me.saveAs(r,t.getFileNameFromHttpResponse(e),{autoBom:!0})})))},e.prototype.getFileNameFromHttpResponse=function(e){return(e.headers.get("Content-Disposition")||"").split("filename=")[1]},e.prototype.autocomplete=function(e){return this.backend.getJson("/autocomplete?prefix="+encodeURIComponent(e),this.backend.getSearchBase())},e.prototype.getSearchFilter=function(e,t,r){var n=[],o=this.identifySearchFilter(e,t),i=e[0].elements.find((function(e){return e.qname===t}));if(null===r)n.push(new Bt(t,Bt.OPERATOR.EQUAL,null));else if(i&&"path"===i.classification)n.push(new Bt(t,Bt.OPERATOR.MATCH,r));else if(r instanceof Ht)null!==r.firstValue&&void 0!==r.firstValue&&n.push(new Bt(t,r.operator,r.firstValue,r.secondValue,o.datetime?{time:o.withtime}:void 0));else if(!o.multiselect&&!Array.isArray(r)||o.table)if(o.table){var s=r[0];Object.keys(s).forEach((function(e){if(void 0!==s[e]){var r=t+"."+e;s[e]instanceof Ht?n.push(new Bt(r,s[e].operator,s[e].firstValue,s[e].secondValue)):n.push(new Bt(r,Array.isArray(s[e])?Bt.OPERATOR.IN:Bt.OPERATOR.EQUAL,s[e]))}}))}else n.push(new Bt(t,Bt.OPERATOR.EQUAL,r));else Array.isArray(r)&&r.length&&n.push(new Bt(t,Bt.OPERATOR.IN,r));return n},e.prototype.identifySearchFilter=function(e,t){for(var r,n=0;!r&&n<e.length;)r=e[n].elements.find((function(e){return e.qname===t})),n++;return{multiselect:this.isMultiselectSearchFilter(r),table:r&&"TABLE"===r.type,datetime:r&&"DATETIME"===r.type,withtime:r&&r.withtime}},e.prototype.isMultiselectSearchFilter=function(e){return e&&("ORGANIZATION"===e.type||"CODESYSTEM"===e.type||"STRING"===e.type&&"selector"===e.classification||"STRING"===e.type&&e.multiselect)},e.prototype.createResultFromResponse=function(e){var t=new Mt;t.suggests=e.suggest,t.fields=e.config;var r=e.hits.hits.map((function(e){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e._source),{id:e._id}),e.snippets&&{snippets:e.snippets}),e.references&&{_references:e.references}),e.context&&{context:e.context})}));return t.count=e.hits.total,t.hits=r||[],t},e.prototype.getResultFieldDefinitionConfig=function(e){return{type:1===(e.types||[]).length?e.types[0]:null,contextType:1===(e.contextFolderTypes||[]).length?e.contextFolderTypes[0]:null}},e.prototype.resolveConfigTypeNames=function(e,t){return{typeName:e?e.qname:"sysobject",contextTypeName:e&&t?t.qname:void 0}},e.prototype.fetchResultFieldDefinition=function(e,t,r){var n=this.resolveConfigTypeNames(e,t),o=n.typeName,s=n.contextTypeName,a=Gt.buildUri("/user/config/result/"+o,{contexttype:s,mode:r});return this.backend.getJson(a).pipe(i.map((function(e){return new Ut(e.elements,e.sortorder,e.grouporder,e.pinned,e.alignmentx,e.mode)})))},e.prototype.saveResultFieldDefinition=function(e,t,r,n){void 0===n&&(n=!1);var o=n?"/user/config/commonresult/":"/user/config/result/",i=this.resolveConfigTypeNames(e,t),s=i.typeName,a=i.contextTypeName,c=Gt.buildUri(o+s,{contexttype:a});return this.backend.post(c,r)},e.prototype.removeResultFieldDefinition=function(e,t){var r=this.resolveConfigTypeNames(e,t),n=r.typeName,o=r.contextTypeName,i=Gt.buildUri("/user/config/result/"+n,{contexttype:o});return this.backend.del(i)},e.prototype.filterToElementValue=function(e,t){var r=void 0;return e&&(r="NUMBER"!==t&&"DATETIME"!==t||!e.firstValue?e.firstValue:new Ht(e.operator,e.firstValue,e.secondValue)),r},e.prototype.tableFiltersToElementValue=function(e,t){var r=this,n={};return e.forEach((function(e){var o=t.find((function(t){return t.qname===e.property})).name,i=t.find((function(t){return t.qname===e.property})).type;n[o]=r.filterToElementValue(e,i)})),[n]},e}();Pr.decorators=[{type:r.Injectable}],Pr.ctorParameters=function(){return[{type:or},{type:er},{type:zt}]};var jr=function(){function e(e,t,r,n){var i=this;this.backend=e,this.system=t,this.searchService=r,this.eventService=n,this.storedQueries={queries:[]},this.storedQueriesSource=new o.BehaviorSubject(this.storedQueries),this.storedQueries$=this.storedQueriesSource.asObservable(),n.on(Vt.LOGOUT).subscribe((function(){return i.clear()}))}return e.prototype.clear=function(){this.storedQueries={queries:[]},this.storedQueriesSource.next(this.storedQueries)},e.prototype.getStoredQueries$=function(){return this.storedQueries.queries.length||this.fetchStoredQueries(),this.storedQueries$},e.prototype.refreshStoredQueries=function(){this.fetchStoredQueries()},e.prototype.fetchStoredQueries=function(){var e=this;this.backend.getJson("/storedqueries?size=9999",this.backend.getSearchBase()).pipe(i.map((function(t){return(t||[]).map((function(t){var r=new Dr(t);return r.setQuery(e.searchService.buildQuery(t.query)),r}))}))).subscribe((function(t){e.storedQueries={queries:t},e.storedQueriesSource.next(e.storedQueries)}))},e.prototype.saveNewStoredQuery=function(e){var t=this;return this.backend.post("/storedqueries",e.toPersistableStoredQuery(),this.backend.getSearchBase()).pipe(i.map((function(e){var r=new Dr(e);return r.setQuery(t.searchService.buildQuery(e.query)),t.storedQueries.select=r.id,t.storedQueries.queries.push(r),t.storedQueriesSource.next(t.storedQueries),r})))},e.prototype.updateStoredQuery=function(e){var t=this;return this.backend.put("/storedqueries",e.toPersistableStoredQuery(),this.backend.getSearchBase()).pipe(i.map((function(e){var r=new Dr(e);return r.setQuery(t.searchService.buildQuery(e.query)),t.storedQueries.select=r.id,t.storedQueries.queries=t.storedQueries.queries.filter((function(e){return e.id!==r.id})),t.storedQueries.queries.push(r),t.storedQueriesSource.next(t.storedQueries),r})))},e.prototype.saveStoredQuery=function(t){return t.id===e.ID_NEW?this.saveNewStoredQuery(t):this.updateStoredQuery(t)},e.prototype.removeStoredQuery=function(e){var t=this;return this.backend.del("/storedqueries/"+e,this.backend.getSearchBase()).pipe(i.tap((function(){t.storedQueries.select=null,t.storedQueries.queries=t.storedQueries.queries.filter((function(t){return t.id!==e})),t.storedQueriesSource.next(t.storedQueries)})))},e.prototype.getFulltextFormElement=function(t,r){return{name:e.FULLTEXT,qname:e.FULLTEXT,label:t,value:r,type:"STRING"}},e}();jr.ID_NEW=Dr.ID_NEW,jr.FULLTEXT="fulltext",jr.decorators=[{type:r.Injectable}],jr.ctorParameters=function(){return[{type:er},{type:or},{type:Pr},{type:Qt}]};var Nr=function(){function e(e){var t=this;this.eventService=e,this.cacheKey="eo.clipboard",this.clipboard={action:null,elements:[]},this.clipboardSource=new o.ReplaySubject(1),this.clipboard$=this.clipboardSource.asObservable(),e.on(Vt.LOGOUT).subscribe((function(e){t.clear()})),this.loadCachedClipboard(),window.addEventListener("storage",(function(e){e.key===t.cacheKey&&t.loadCachedClipboard()}))}return e.prototype.set=function(e,t,r){this.clipboard={action:t,elements:e},r||this.updateCache(),this.clipboardSource.next(this.clipboard)},e.prototype.get=function(){return this.clipboard},e.prototype.clear=function(){this.clipboard={action:null,elements:[]},this.updateCache(),this.clipboardSource.next(this.clipboard)},e.prototype.updateCache=function(){window.localStorage.setItem(this.cacheKey,JSON.stringify(this.clipboard))},e.prototype.loadCachedClipboard=function(){var e=window.localStorage.getItem(this.cacheKey);try{var t=JSON.parse(e);t?this.set(t.elements,t.action,!0):this.clear()}catch(e){}},e}();Nr.decorators=[{type:r.Injectable}],Nr.ctorParameters=function(){return[{type:Qt}]};var Fr=function(){function e(e){this.toastrService=e,this.options={closeButton:!0,positionClass:"toast-bottom-right",timeOut:15e3}}return e.prototype.info=function(e,t){this.toast(e,t)},e.prototype.confirm=function(e,t,r,n){this.toast(e,t,"confirm",{onAdd:r,onRemove:n,timeOut:7e3})},e.prototype.success=function(e,t){this.toast(e,t,"success")},e.prototype.wait=function(e,t){this.toast(e,t,"wait")},e.prototype.error=function(e,t){this.toast(e,t,"error",{closeButton:!0,timeOut:7e3})},e.prototype.warning=function(e,t){this.toast(e,t,"warning")},e.prototype.toast=function(e,t,r,n){var o=Object.assign({},this.options,n);this.doToast(t,e,o,r)},e.prototype.doToast=function(e,t,r,n){switch(n){case"success":this.toastrService.success(e,t,r);break;case"error":this.toastrService.error(e,t,r);break;case"warning":this.toastrService.warning(e,t,r);break;case"confirm":this.toastrService.info(e,t,r);break;default:this.toastrService.info(e,t,r)}},e}();Fr.decorators=[{type:r.Injectable}],Fr.ctorParameters=function(){return[{type:ye.ToastrService}]};var Ur=function(){function e(){}return e.prototype.apply=function(e,t){return console&&console[e]&&console[e].apply(console,Zt(t))},e.prototype.assert=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.apply("assert",e)},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.apply("debug",e)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.apply("error",e)},e.prototype.group=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.apply("group",e)},e.prototype.groupEnd=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.apply("groupEnd",e)},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.apply("info",e)},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.apply("log",e)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.apply("warn",e)},e}();Ur.decorators=[{type:r.Injectable}];var Lr=function(){function e(e){this.prepareService=e,this._targets=[],this.targetsSource=new o.ReplaySubject(1),this.uploadTargets$=this.targetsSource.asObservable()}return e.prototype.setOverlayActive=function(e){this.overlayActive=e},e.prototype.isOverlayActive=function(){return this.overlayActive},e.prototype.register=function(e){var t,r,n=this;e.referenceObject&&(e.description=("object"===e.type&&(null===(r=null===(t=e.referenceObject)||void 0===t?void 0:t.type)||void 0===r?void 0:r.label)?e.referenceObject.type.label+": ":"")+e.referenceObject.title,e.subFolder&&this.prepareService.getPrepareChildTypes(e.referenceObject.id).subscribe((function(t){n.isSubFolderAllowed(e.subFolder.data,t.types)&&(e.description+="; "+e.subFolder.name)})));var o=this._targets.find((function(t){return t.id===e.id}));o?Object.assign(o,e):this._targets.push(e),this.targetsSource.next(this._targets)},e.prototype.isSubFolderAllowed=function(e,t){return!!t.find((function(t){return t.name===e.type}))},e.prototype.unregister=function(e){this._targets=this._targets.filter((function(t){return t.id!==e})),this.targetsSource.next(this._targets)},e}();Lr.decorators=[{type:r.Injectable}],Lr.ctorParameters=function(){return[{type:ur}]};var Mr=function(){};Mr.decorators=[{type:r.NgModule,args:[{exports:[ye.ToastrModule,t.TranslateModule]}]}];var Br=function(){function e(e){this.auth=e}return e.prototype.intercept=function(e,t){var r=this;return t.handle(e).pipe(i.tap((function(e){n.HttpResponse}),(function(e){(e instanceof n.HttpErrorResponse||e.isHttpErrorResponse)&&401===e.status&&r.auth.logout()})))},e}();Br.decorators=[{type:r.Injectable}],Br.ctorParameters=function(){return[{type:xr}]};var Hr=function(){function e(e,t){this.backend=e,this.translate=t}return e.prototype.signDocument=function(e,t){var r="/request/"+e;return this.backend.post(r,t,"/signing")},e.prototype.cancelSigning=function(e,t){var r="/cancel/"+e+"?comment="+t;return this.backend.put(r,null,"/signing")},e.prototype.getLocalizedSigningForm=function(){return{size:"small",readonly:!1,name:"yuvsigners",qname:"yuvsigning.yuvsigners",hitname:"yuvsigning.yuvsigners",label:this.translate.instant("eo.action.signature.signers"),type:"TABLE",indexname:"tab_yuvsigning_yuvsigners",required:!0,elements:[{readonly:!1,name:"yuvsignerorder",qname:"yuvsigning.yuvsigners.yuvsignerorder",hitname:"yuvsigning.yuvsigners.yuvsignerorder",label:this.translate.instant("eo.action.signature.yuvsigners.yuvsignerorder"),type:"NUMBER",indexname:"num_yuvsignerorder",scale:0,precision:10,grouping:!1,selectedforenrichment:!1,required:!0,sortable:!0,searchable:!0,value:1},{size:"small",multiline:!1,readonly:!1,name:"yuvsignername",qname:"yuvsigning.yuvsigners.yuvsignername",hitname:"yuvsigning.yuvsigners.yuvsignername",label:this.translate.instant("eo.action.signature.yuvsigners.yuvsignername"),type:"STRING",indexname:"str_yuvsignername",autocomplete:!0,selectedforenrichment:!1,maxlen:100,minlen:0,required:!0,sortable:!0,searchable:!0},{size:"small",multiline:!1,readonly:!1,name:"yuvsigneremail",qname:"yuvsigning.yuvsigners.yuvsigneremail",hitname:"yuvsigning.yuvsigners.yuvsigneremail",label:this.translate.instant("eo.action.signature.yuvsigners.yuvsigneremail"),type:"STRING",indexname:"str_yuvsigneremail",autocomplete:!0,selectedforenrichment:!1,maxlen:200,minlen:0,required:!0,sortable:!0,searchable:!0}]}},e.prototype.signatureRequested=function(e){return!!e.data.yuvsigstatus},e.prototype.signingInProcess=function(e){return"inprocess"===e.data.yuvsigstatus},e}();Hr.decorators=[{type:r.Injectable}],Hr.ctorParameters=function(){return[{type:er},{type:t.TranslateService}]};var qr=function(){function e(e){if(e)throw new Error("EoCoreModule is already loaded. Import it in the AppModule only")}return e.forRoot=function(o){return{ngModule:e,providers:[Ir,{provide:n.HTTP_INTERCEPTORS,useClass:Br,multi:!0},{provide:kt,useValue:o},{provide:_t,useClass:wt,deps:[kt]},{provide:r.APP_INITIALIZER,useFactory:At,deps:[Ir],multi:!0},{provide:t.TranslateLoader,useClass:Dt,deps:[n.HttpClient,_t]},{provide:t.MissingTranslationHandler,useClass:Rt}]}},e}();qr.decorators=[{type:r.NgModule,args:[{imports:[n.HttpClientModule,t.TranslateModule.forRoot(),ye.ToastrModule.forRoot()],providers:[xr,er,Xt,ir,Pr,or,Jt,Rr,Hr,zt,ur,hr,Er,dr,Nr,ar,Fr,mr,jr,Qt,Lr,Cr,{provide:Xt,useClass:Ur},Tr],exports:[Mr]}]}],qr.ctorParameters=function(){return[{type:qr,decorators:[{type:r.Optional},{type:r.SkipSelf}]}]};var Gr=function(e){this.id=Gt.uuid(),this.name=e.name,this.size=e.size,this.type=e.type,this._file=e};Object.defineProperty(e,"TranslateLoader",{enumerable:!0,get:function(){return t.TranslateLoader}}),Object.defineProperty(e,"TranslateModule",{enumerable:!0,get:function(){return t.TranslateModule}}),Object.defineProperty(e,"TranslateService",{enumerable:!0,get:function(){return t.TranslateService}}),e.AppCacheService=Jt,e.AuthService=xr,e.BackendService=er,e.BpmService=Er,e.CORE_CONFIG=_t,e.CUSTOM_CONFIG=kt,e.CapabilitiesService=dr,e.ClipboardService=Nr,e.Config=zt,e.CoreConfig=wt,e.CoreInit=Ir,e.DmsObject=wr,e.DmsObjectAttachment=_r,e.DmsObjectHistoryEntry=Ar,e.DmsService=Rr,e.EnaioEvent=Vt,e.EnvironmentEnaio=Or,e.EnvironmentService=Cr,e.EoCoreModule=qr,e.EoError=jt,e.EoSharedModule=Mr,e.EoUser=Yt,e.EoxMissingTranslationHandler=Rt,e.EoxTranslateJsonLoader=Dt,e.EventService=Qt,e.FieldDefinition=Ut,e.InboxItem=lr,e.InboxService=hr,e.LocalStorageService=mr,e.Logger=Xt,e.NotificationsService=Fr,e.ObjectType=rr,e.PrepareService=ur,e.PreparedItem=sr,e.Process=br,e.RangeValue=Ht,e.SearchFilter=Bt,e.SearchQuery=Nt,e.SearchResult=Mt,e.SearchService=Pr,e.SearchState=Lt,e.SigningService=Hr,e.SortOption=Ft,e.StoredQueriesService=jr,e.StoredQuery=Dr,e.SystemService=or,e.UploadFileItem=Gr,e.UploadRegistryService=Lr,e.UploadService=ar,e.UploadTarget=cr,e.UserService=ir,e.Utils=Gt,e.WorkItem=vr,e.WorkItemHistoryEntry=yr,e.init_module=At,e.ɵa=Tr,e.ɵb=Ur,e.ɵc=Br,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
15
|
+
***************************************************************************** */Object.create;function Kt(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function $t(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function Zt(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat($t(arguments[t]));return e}Object.create;var Xt=function(){function e(){}return e.prototype.assert=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.group=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.groupEnd=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e}();Xt.decorators=[{type:r.Injectable}];var er=function(){function e(e,t,r,n){this.http=e,this.coreConfig=t,this.logger=r,this.config=n,this.gridDataFilter=i.map((function(e){return null==e?void 0:e.filter((function(e){return!e.__removed}))})),this.cache=new Map,this.temp=new Map,this.headers=this.setDefaultHeaders(),this.authProfile={host:"",ntlm:!0}}return e.prototype.setAuthProfile=function(e){e&&(this.headers=this.setDefaultHeaders(),this.authProfile=e,this.authProfile.auth,this.headers.delete("Authorization"))},e.prototype.setHeader=function(e,t){t&&t.length&&(this.headers=this.headers.set(e,t))},e.prototype.getHeaders=function(){return this.headers},e.prototype.getHttpOptions=function(e){return Object.assign({headers:this.getHeaders(),withCredentials:this.coreConfig.withCredentials},e)},e.prototype.getServiceBase=function(){return this.config.getUri("serviceBase")},e.prototype.getSearchBase=function(){return this.config.getUri("searchBase")},e.prototype.getContextBase=function(){return this.config.getUri("contextBase")},e.prototype.getInboxBase=function(){return this.config.getUri("inboxBase")},e.prototype.getBpmBase=function(){return this.config.getUri("bpmBase")},e.prototype.getAgentBase=function(){return this.config.getUri("agentBase")},e.prototype.getStatusBase=function(){return this.config.getUri("statusBase")},e.prototype.getIconBase=function(e){return void 0===e&&(e=""),this.getBaseWithContext(this.getServiceBase())+"/ui/icon/"+e},e.prototype.getHost=function(){return this.authProfile.host||""},e.prototype.getBaseWithContext=function(e){return(null==e?void 0:e.startsWith("/"))?this.config.getContextPath()+e:e},e.prototype.getContextPath=function(e){return this.getHost()+this.getBaseWithContext(e||this.getServiceBase())},e.prototype.get=function(e,t,r){return this.http.get(this.getContextPath(t)+e,this.getHttpOptions(r))},e.prototype.put=function(e,t,r,n){return this.http.put(this.getContextPath(r)+e,t,this.getHttpOptions(n))},e.prototype.getJson=function(e,t){return this.http.get(this.getContextPath(t)+e,this.getHttpOptions({responseType:"json"}))},e.prototype.post=function(e,t,r,n){var o=this.getContextPath(r),i=t?JSON.stringify(t):"";return this.http.post(""+o+e,i,this.getHttpOptions(n))},e.prototype.postMultiPart=function(e,t,r,n){var o=this.getContextPath(r),i=this.getHeaders();i.delete("Content-Type");var s=Object.assign({headers:i,withCredentials:this.coreConfig.withCredentials},n);return this.http.post(""+o+e,t,s)},e.prototype.del=function(e,t,r){return this.http.delete(this.getContextPath(t)+e,this.getHttpOptions(r))},e.prototype.update=function(e,t){return t.forEach((function(t){var r=t.id,n=t.item;if(r){var o=e.find((function(e){return e.id===r}));Object.assign(o,n,n?{__updated:!0}:{__removed:!0})}else n&&e.unshift(Object.assign(n,{__added:!0}))})),e},e.prototype.getViaCache=function(e){var t=this;return this.cache.has(e)?o.of(this.cache.get(e)):this.getViaTempCache(e,(function(){return t.http.get(e,{withCredentials:t.coreConfig.withCredentials,responseType:"text"}).pipe(i.tap((function(r){return t.cache.set(e,r)})))}))},e.prototype.getViaTempCache=function(e,t){var r=this;if(this.temp.has(e))return this.temp.get(e);var n=(t?t():this.get(e)).pipe(i.finalize((function(){return r.temp.delete(e)})),i.shareReplay(1));return this.temp.set(e,n),n},e.prototype.downloadContent=function(e,t,r,n){var o=e[0];if(1===e.length)if(o.content){var i=this.getServiceBase()+"/dms/"+o.content.id+"/content?type="+o.content.type+"&asdownload=true&recyclebin="+!!n;i+=t?"&rendition="+t+"&_intent=DOWNLOAD_"+t:"&_intent=DOWNLOAD",o.content.id===o.id&&(i+="&version="+o.version),this.download(i,r?o.version:null)}else this.logger.error("The provided dms object has no content",o);if(e.length>1){i=this.getServiceBase()+"/dms/batch/export";if(o.content){var s={query:{expression:Zt(e.map((function(e){return e.content.id})))},options:{rendition:""}};s.options.rendition=t?"PDF":null,this.downloadMulti(i,r?o.version:null,s)}else this.logger.error("The provided dms object has no content",o)}},e.prototype.download=function(e,t){var r=this;this.http.get(e,{observe:"response",responseType:"blob",withCredentials:this.coreConfig.withCredentials}).subscribe((function(e){me.saveAs(e.body,r.getFileNameFromHttpResponse(e,t))}))},e.prototype.downloadMulti=function(e,t,r){var n=this;this.http.post(e,r,{observe:"response",responseType:"blob",withCredentials:this.coreConfig.withCredentials}).subscribe((function(e){me.saveAs(e.body,n.getFileNameFromHttpResponse(e,t))}))},e.prototype.getFileNameFromHttpResponse=function(e,t){var r=e.headers.get("Content-Disposition")||"",n=r.match("filename\\*=UTF-8''(.*)")||r.match('filename="(.*)"'),o=n?n[1]:null,i=o?decodeURIComponent(o):"unknown",s=~i.lastIndexOf(".")?i.lastIndexOf("."):i.length;return t?i.slice(0,s)+"_v"+t+i.slice(s):i},e.prototype.setDefaultHeaders=function(){return new n.HttpHeaders({"Content-Type":"application/json","X-os-include-links":"false","X-os-include-actions":"false","X-os-sync-index":"true"})},e}();er.decorators=[{type:r.Injectable}],er.ctorParameters=function(){return[{type:n.HttpClient},{type:wt,decorators:[{type:r.Inject,args:[_t]}]},{type:Xt},{type:zt}]};var tr,rr=function(){function e(e){this.id=e.id,this.implements=e.implements?e.implements:[],this.isFolder=e.folder,this.isContextFolder=e.iscontextfolder,this.isAbstract=e.abstract,this.iconId=e.icon?e.icon.id:null,this.maxFiles=e.maxfiles,this.minFiles=e.minfiles,this.name=e.name,this.qname=e.qname,this.label=e.label,this.description=e.description,this.group=e.group?e.group.label:"",this.elements=e.elements,this.allowedcontexttypes=e.allowedcontexttypes?e.allowedcontexttypes:[],this.supertypes=e.supertypes?e.supertypes.map((function(e){return e.name})):[],this.shareable=e.shareable,this.parenttypes=this.getParentTypes(e.allowedlocations)}return e.prototype.getParentTypes=function(e){return e?e.parenttypes.map((function(e){return e.name})):[]},e}(),nr=It,or=function(){function e(e,t,r,n){var i=this;this.backend=e,this.logger=t,this.eventService=r,this.appCache=n,this.systemSource=new o.ReplaySubject,this.system$=this.systemSource.asObservable(),this.objectTypeForms=[],this.cachedRoles=[],this.eventService.on(Vt.SYSTEM_STATUS_SCHEMA_CHANGED).subscribe((function(){i.fetchSystemDefinition(i.user)}))}return Object.defineProperty(e.prototype,"system",{get:function(){return JSON.parse(JSON.stringify(this._system))},set:function(e){this._system=e},enumerable:!1,configurable:!0}),e.prototype.getObjectTypes=function(){return this.system.types},e.prototype.getObjectType=function(e){return this.system.types.find((function(t){return t.name===e}))},e.prototype.getFormElementsFromFormModel=function(e,t,r){var n=this;return this.getObjectTypeForm(e,t,r?"CONTEXT":null).pipe(i.switchMap((function(e){var t=[];return n.processFormModelElements(e,t),o.of(t)})))},e.prototype.processFormModelElements=function(e,t){var r=this;e.elements.forEach((function(e){"o2mGroup"!==e.type&&"o2mGroupStack"!==e.type?t.push(e):e.elements&&e.elements.length&&r.processFormModelElements(e,t)}))},e.prototype.implementsType=function(e,t){return e.name===t||e.implements&&-1!==e.implements.indexOf(t)},e.prototype.getCodesystem=function(e){return this.system.codesystems.find((function(t){return t.id===e||t.name===e}))},e.prototype.getObjectTypeForm=function(e,t,r){for(var n,s=this,a=0;!n&&a<this.objectTypeForms.length;)this.objectTypeForms[a].name===e&&this.objectTypeForms[a].mode===r&&this.objectTypeForms[a].situation===t&&(n=this.objectTypeForms[a]),a++;if(n)return o.of(ge.cloneDeep(n));var c="/ui/form/"+e+"?situation="+t;return c+=r?"&formmode="+r:"",this.backend.getViaTempCache(c,(function(){return s.backend.getJson(c).pipe(i.tap((function(e){return s.objectTypeForms.push(ge.cloneDeep(e))})))}))},e.prototype.getSystemDefinition=function(e){return this.user=e,this.fetchSystemDefinition(e)},e.prototype.getDefaultValue=function(e){var t;switch(e){case"CURRENT_USER":t=this.user.name;break;case"CURRENT_USER_NAME":t=this.user.title;break;case"CURRENT_DATETIME":t=new Date;break;case"CURRENT_DATE":t=nr().startOf("day").toDate();break;case"YEAR":t=nr().year();break;case"MONTH":t=nr().month()+1;break;case"DAY":t=nr().date();break;case"HOUR":t=nr().hour();break;case"MINUTE":t=nr().minute();break;case"SECOND":t=nr().second();break;case"WEEK_OF_YEAR":t=nr().isoWeek();break;case"FIRST_DAY_OF_WEEK":t=nr().startOf("isoWeek").toDate();break;case"FIRST_DAY_OF_MONTH":t=nr().startOf("month").toDate();break;case"FIRST_DAY_OF_YEAR":t=nr().startOf("year").toDate()}return t},e.prototype.fetchSystemDefinition=function(e){var t=this,r=[this.backend.getJson("/system/type/list?elements=true&basetypes=true"),this.backend.getJson("/system/cs/list?elements=true")];return o.forkJoin(r).pipe(i.catchError(Gt.catch((function(e){t.logger.error("Error fetching recent version of system definition from server.",e),t.systemSource.error("Error fetching recent version of system definition from server.")}))),i.map((function(r){t.objectTypeForms=[];var n={info:{user:e.id,locale:e.getSchemaLocale(),version:e.schema.version},locales:e.schema.supportedLocales,types:[],codesystems:[]},o=r[0];return n.types=o.map((function(e){return new rr(e)})),n.codesystems=r[1],t.system=n,t.systemSource.next(n),t.logger.debug("Fetched new version of system definition (user: "+e.id+", version: "+e.schema.version+")."),t.appCache.setItem(t.appCache.SYSTEM_DEFINITION,n).subscribe((function(){t.logger.debug("Cached recent version")}),Gt.logError(null,"Error caching recent version of system definition.")),!0})))},e.prototype.getOrganizationObjectById=function(e){return this.backend.getJson("/organization/id/"+e)},e.prototype.getOrganizationObject=function(e){return this.getOrganizationObjects([e]).pipe(i.map((function(e){return e[0]})))},e.prototype.getOrganizationObjects=function(e){var t=this,r=e.map((function(e){return t.backend.getJson("/organization/name/"+e).pipe(i.catchError((function(t){return o.of({id:e,active:!1})})))}));return o.forkJoin(r)},e.prototype.getRoles=function(){var e=this;return this.cachedRoles.length?o.of(this.cachedRoles):this.backend.get("/organization/role").pipe(i.map((function(e){return e})),i.tap((function(t){return e.cachedRoles=t})))},e}();or.decorators=[{type:r.Injectable}],or.ctorParameters=function(){return[{type:er},{type:Xt},{type:Qt},{type:Jt}]},(tr=e.Direction||(e.Direction={})).LTR="ltr",tr.RTL="rtl";var ir=function(){function t(e,t,r,n,s,a,c){this.backend=e,this.translate=t,this.logger=r,this.eventService=n,this.system=s,this.http=a,this.config=c,this.USER_FETCH_URI="/user?favorites=true&privileges=true&roles=true&deputies=true&substitutesOf=true",this.user=null,this.userSource=new o.BehaviorSubject(this.user),this.user$=this.userSource.asObservable(),this.favorites=null,this.favoritesSource=new o.BehaviorSubject(this.favorites),this.favoritesGridData$=this.favoritesSource.asObservable().pipe(i.debounceTime(100),i.filter((function(e){return e}))),this.favorites$=this.favoritesGridData$.pipe(this.backend.gridDataFilter),this.notifications=null,this.notificationsSource=new o.BehaviorSubject(this.notifications),this.recycles=null,this.recyclesSource=new o.BehaviorSubject(this.recycles),this.recyclesGridData$=this.recyclesSource.asObservable().pipe(i.debounceTime(100),i.filter((function(e){return e}))),this.recycles$=this.recyclesGridData$.pipe(this.backend.gridDataFilter),this.notificationsGridData$=this.notificationsSource.asObservable().pipe(i.debounceTime(100),i.filter((function(e){return e}))),this.notifications$=this.notificationsGridData$.pipe(this.backend.gridDataFilter)}return t.prototype.getCurrentUser=function(){return this.user},t.prototype.setPresence=function(e){var t=this;return e!==this.user.present?this.backend.put("/user?presence="+e).pipe(i.tap((function(r){t.user.present=e,t.userSource.next(t.user)}))):o.of(null)},t.prototype.delUserImage=function(e){return this.http.put(e,null)},t.prototype.setUserImage=function(e){return this.backend.put("/user/image",e)},t.prototype.setDeputies=function(e){var t=this;return this.backend.put("/user/deputy?user="+e.join("&user=")).pipe(i.tap((function(){return t.refreshCurrentUser().subscribe()})))},t.prototype.changeClientLocale=function(t){var r=this;this.user.userSettings.clientlocale=t,this.backend.put("/user/config/web",this.user.userSettings).subscribe((function(){r.logger.debug("Changed client locale to '"+t+"'"),r.translate.use(t),r.user.uiDirection=(r.config.getClientLocales().find((function(e){return e.iso===t}))||{}).dir||e.Direction.LTR,r.userSource.next(r.user),r.eventService.trigger(Vt.CLIENT_LOCALE_CHANGED,t)}))},t.prototype.changeSchemaLocale=function(e){var t=this;return this.user.schemaLocale=e,this.backend.put("/user/locale/"+this.user.schemaLocale).pipe(i.tap((function(){t.logger.debug("Changed schema locale to '"+e+"'"),t.userSource.next(t.user),t.backend.setHeader("Accept-Language",t.user.getSchemaLocale()),t.logger.debug("Loading system definition for new locale."),t.system.getSystemDefinition(t.user).subscribe(),t.eventService.trigger(Vt.SCHEMA_LOCALE_CHANGED,e)})))},t.prototype.setCurrentUser=function(t){this.user=new Yt(t),this.passwordValidationSettings=t.passwortvalidation,this.user.setImageBase(this.backend.getServiceBase()),this.backend.setHeader("Accept-Language",this.user.getSchemaLocale());var r=this.config.getClientLocales().map((function(e){return e.iso})),n=this.user.getClientLocale();-1===r.indexOf(n)&&(n=this.config.getDefaultClientLocale()),this.logger.debug("Setting client locale to '"+n+"'"),this.translate.use(n),this.user.uiDirection=(this.config.getClientLocales().find((function(e){return e.iso===n}))||{}).dir||e.Direction.LTR,this.userSource.next(this.user),this.favorites=null,this.favoritesSource.next(this.favorites),this.notifications=null,this.notificationsSource.next(this.notifications)},t.prototype.getFavorites=function(){var e=this;return this.backend.getJson("/user/favorites").pipe(i.map((function(e){return e&&e.filter((function(e){return"DMS_OBJECT"===e.favoritetype}))})),i.tap((function(t){e.favorites=t,e.favoritesSource.next(e.favorites)})))},t.prototype.updateFavorites=function(e,t,r){this.backend.update(this.favorites,r||[{id:e,item:t}])&&this.favoritesSource.next(this.favorites)},t.prototype.getNotifications=function(){var e=[this.getSubscription(),this.getResubmission()];return o.forkJoin(e)},t.prototype.getResubmission=function(){var e=this;return this.backend.getJson("/messageprovider/resubmission/list").pipe(i.tap((function(t){e.notifications=t,e.notificationsSource.next(e.notifications)})))},t.prototype.getSubscription=function(){var e=this;return this.backend.getJson("/messageprovider/subscription/list").pipe(i.tap((function(t){e.notifications=t,e.notificationsSource.next(e.notifications)})))},t.prototype.removeNotifications=function(e,t){var r,n=this;switch(t){case"SUBSCRIPTION":r="subscription";break;case"RESUBMISSION":r="resubmission";break;default:return}return this.backend.del("/messageprovider/"+r+"/"+e).pipe(i.tap((function(e){return n.updateNotifications("")})))},t.prototype.updateNotifications=function(e,t,r){this.backend.update(this.notifications,r||[{id:e,item:t}])&&this.notificationsSource.next(this.notifications)},t.prototype.getUserImageUri=function(e){return this.backend.getBaseWithContext(this.backend.getServiceBase())+"/organization/image/"+e+"?usedefault=true"},t.prototype.removeFavorite=function(e){var t=this;return this.backend.del("/user/favorite/"+e).pipe(i.tap((function(r){return t.updateFavorites(e)})))},t.prototype.createFavorite=function(e,t,r){var n=this,o=Gt.buildUri("/dms/favorite/"+e,{type:t,title:r});return this.backend.post(o,{}).pipe(i.tap((function(e){return n.getFavorites().subscribe()})))},t.prototype.removeFavoritesForTarget=function(e){var t=this;return this.backend.del("/dms/favorite/"+e).pipe(i.tap((function(r){var n=t.favorites.filter((function(t){return t.target.id===e})).map((function(e){return Object.assign({id:e.id})}));t.updateFavorites(null,null,n)})))},t.prototype.getRecycleBin=function(){var e=this;return this.backend.getJson("/user/recyclebin").pipe(i.tap((function(t){e.recycles=t,e.recyclesSource.next(e.recycles)})))},t.prototype.changeLockSetting=function(e){var t=this;return this.user.userSettings.alwayslock=e,this.backend.put("/user/config/web",this.user.userSettings).pipe(i.map((function(){t.refreshCurrentUser().subscribe()})))},t.prototype.hasPrivilege=function(e){return!!this.user.privileges.find((function(t){return t.name===e}))},t.prototype.changePassword=function(e){return this.backend.put("/user/password",e)},t.prototype.refreshCurrentUser=function(){var e=this;return this.backend.get(this.USER_FETCH_URI).pipe(i.map((function(t){return e.setCurrentUser(t)})))},t.prototype.validatePassword=function(e){return e.length<this.passwordValidationSettings.minlength?{type:"short",amount:this.passwordValidationSettings.minlength}:e.replace(/[^0-9]/g,"").length<this.passwordValidationSettings.minnumber?{type:"number",amount:this.passwordValidationSettings.minnumber}:e.replace(/[a-zA-Z0-9ß ]/g,"").length<this.passwordValidationSettings.minspecialchars?{type:"specialchars",amount:this.passwordValidationSettings.minspecialchars}:{type:"valid",amount:null}},t.prototype.changeSavedInboxFilters=function(e){var t=this;return this.user.userSettings.savedInboxFilter=e,this.backend.put("/user/config/web",this.user.userSettings).pipe(i.map((function(){t.refreshCurrentUser().subscribe()})))},t}();ir.decorators=[{type:r.Injectable}],ir.ctorParameters=function(){return[{type:er},{type:t.TranslateService},{type:Xt},{type:Qt},{type:or},{type:n.HttpClient},{type:zt}]};var sr=function(){function e(e){Object.assign(this,e)}return Object.defineProperty(e.prototype,"title",{get:function(){return this.selectedtype?this.selectedtype.label:""},enumerable:!1,configurable:!0}),e.prototype.hasContent=function(){return!!this.template||this.contentcount>0},e.prototype.getSelectedTypeObject=function(){return this.types.find((function(e){return e.selected}))},e}(),ar=function(){function e(e,t,r){this.coreConfig=e,this.http=t,this.userService=r}return e.prototype.upload=function(e,t){var r=new FormData,o=new n.HttpHeaders({"Accept-Language":this.userService.getCurrentUser().getClientLocale()});return t.forEach((function(e){return r.append("files[]",e,Gt.encodeFileName(e.name))})),this.http.post(e,r,{headers:o,withCredentials:this.coreConfig.withCredentials})},e}();ar.decorators=[{type:r.Injectable}],ar.ctorParameters=function(){return[{type:wt,decorators:[{type:r.Inject,args:[_t]}]},{type:n.HttpClient},{type:ir}]};var cr=function(){function e(e,t){this.id=e,this.type=t}return e.prototype.onUploadSuccess=function(e){return e},e.prototype.onUploadFail=function(){return{}},e}();cr.ROOT="root",cr.CONTEXT="context",cr.CONTEXT_TREE="contexttree",cr.OBJECT="object",cr.CUSTOM="custom";var ur=function(){function e(e,t){this.backend=e,this.uploadService=t,this.preparedItemsSource=new o.ReplaySubject(1),this.preparedItems$=this.preparedItemsSource.asObservable(),this.preparedItemCountSource=new o.ReplaySubject(1),this.preparedItemCount$=this.preparedItemCountSource.asObservable()}return e.prototype.refreshPreparedItemsCount=function(){this.fetchPreparedItemsCount()},e.prototype.fetchPreparedItemsCount=function(){var e=this;this.backend.getJson("/prepare/state").pipe(i.map((function(e){return e.count}))).subscribe((function(t){e.preparedItemCount=t,e.preparedItemCountSource.next(e.preparedItemCount)}))},e.prototype.createPreparedItem=function(e,t){var r=this;return this.backend.post(this.createPreparedItemPostUrl({parentId:e,childType:t||null}),{}).pipe(i.tap((function(){return r.getPreparedItems$()})))},e.prototype.updatePreparedItemIndexData=function(e,t){var r=this;return this.backend.put("/prepare/"+e,t).pipe(i.tap((function(){return r.getPreparedItems$()})))},e.prototype.createPreparedItemPostUrl=function(e){var t=e.createMany?"/prepare/createmany":"/prepare/create";return e&&(t=Gt.buildUri(t,e)),t},e.prototype.getPreparedItems$=function(e){return this.fetchPreparedItems(e).subscribe(),this.preparedItems$},e.prototype.fetchPreparedItems=function(e){var t=this,r=e?"/prepare":"/prepare?form=true";return this.backend.getJson(r).pipe(i.map((function(e){return e.map((function(e){return new sr(e)}))})),i.tap((function(){return t.fetchPreparedItemsCount()})),i.tap((function(e){return t.preparedItemsSource.next(e.sort(Gt.sortValues("created","desc")))})))},e.prototype.deletePreparedItem=function(e){var t=this;return this.backend.del("/prepare/"+e).pipe(i.tap((function(){return t.getPreparedItems$()})))},e.prototype.getPrepareRootTypes=function(){return this.backend.getViaTempCache("/prepare/types").pipe(i.map((function(e){return e.types.map((function(e){return new rr(e)}))})))},e.prototype.getPrepareChildTypes=function(e,t){var r=e?{parentId:e,withcontent:t}:{withcontent:t},n=Gt.buildUri("/prepare/types",r);return this.backend.getViaTempCache(n).pipe(i.map((function(e){return{parent:e.parent,types:e.types.map((function(e){return new rr(e)}))}})))},e.prototype.getPreviewUri=function(e,t,r){return Gt.buildUri(this.backend.getServiceBase()+"/prepare/"+e+"/content",{rendition:r,index:t})},e.prototype.updateChildType=function(e,t){return this.backend.put("/prepare/"+t+"/"+e+"?form=true&contentmeta=true").pipe(i.map((function(e){return new sr(e)})))},e.prototype.addTemplate=function(e,t){return this.backend.put("/prepare/"+e+"/template?templateid="+t).pipe(i.map((function(e){return new sr(e)})))},e.prototype.getTemplates=function(e){return this.backend.getJson("/template/list?type="+e).pipe(i.map((function(e){return e})))},e.prototype.getTemplatePreviewUri=function(e,t){return Gt.buildUri(this.backend.getServiceBase()+"/template/"+e+"/content",{rendition:t})},e.prototype.commitPreparedItem=function(e,t,r){var n=this;return this.backend.put("/prepare/"+e+"/"+t).pipe(i.mergeMap((function(){return n.backend.post("/prepare/commit/"+e,r)})),i.tap((function(){return n.getPreparedItems$()})),i.map((function(e){return e.id})))},e.prototype.uploadContent=function(e,t){var r=this.backend.getBaseWithContext(this.backend.getServiceBase())+"/prepare/"+e+"/content.json?form=true&contentmeta=true";return this.uploadService.upload(r,[t]).pipe()},e.prototype.uploadToTarget=function(e,t,r){var n=this,o=t.map((function(e){return e._file}));return this.uploadService.upload(this.getUploadTarget(e,r),o).pipe(i.tap((function(){return n.getPreparedItems$()})))},e.prototype.getUploadTarget=function(e,t){var r;if(e.type===cr.ROOT)r=this.backend.getBaseWithContext(this.backend.getServiceBase())+this.createPreparedItemPostUrl({parentId:null,createMany:!t});else if(e.type===cr.OBJECT){var n=e.referenceObject;r=this.backend.getBaseWithContext(this.backend.getServiceBase())+"/dms/"+n.id+"/contents?type="+n.type.name}else e.type!==cr.CONTEXT&&e.type!==cr.CONTEXT_TREE||(r=this.backend.getBaseWithContext(this.backend.getServiceBase())+this.createPreparedItemPostUrl({parentId:e.referenceObject.id,createMany:!t,childType:e.subFolder&&e.subFolder.data.type?e.subFolder.data.type:null}));return r},e.prototype.deletePreparedItemContent=function(e,t){var r="/prepare/"+e+"/content"+(void 0!==t?"?index="+t:"");return this.backend.del(r).pipe(i.map((function(e){return new sr(e)})))},e}();ur.decorators=[{type:r.Injectable}],ur.ctorParameters=function(){return[{type:er},{type:ar}]};var pr=It,lr=function(){function e(e){this.id=e.inboxentryid,this.title=e.title,this.description=e.description,this.type=e.type,this.sourceId=e.source?e.source.id:null,this.iconId=e.target&&e.target.icon?e.target.icon.id:null,this.accepted=e.accepted,this.isdeputy=e.isdeputy,this.duetime=e.duetime,this.received=e.receivetime,this.target=e.target}return e.prototype.isOverdue=function(){return this.duetime&&pr(this.duetime).isBefore(pr())},e}();lr.TYPE_BPM="BPM",lr.TYPE_RESUBMISSION="RESUBMISSION",lr.TYPE_SUBSCRIPTION="SUBSCRIPTION";var hr=function(){function e(e){this.backend=e,this.MAX_PAGE_SIZE=1e3,this.inboxStateSource=new o.ReplaySubject(1),this.inboxState$=this.inboxStateSource.asObservable(),this.inboxItemsSource=new o.ReplaySubject(1),this.inboxItemsGridData$=this.inboxItemsSource.asObservable(),this.inboxItems$=this.inboxItemsGridData$.pipe(this.backend.gridDataFilter)}return e.prototype.getItems=function(){var e=this;return this.getAllPages().pipe(i.map((function(e){return e.map((function(e){return new lr(e)}))})),i.tap((function(t){e.inboxItems=t,e.inboxItemsSource.next(e.inboxItems)})),i.catchError(Gt.throw((function(){return e.inboxItemsSource.next([])}))))},e.prototype.getAllPages=function(){var e=this,t=[];return this.getPage().pipe(i.expand((function(t){return t.last?o.EMPTY:e.getPage(t.pageable.pageNumber+1)})),i.tap((function(e){return t=Zt(t,e.content)})),i.skipWhile((function(e){return!e.last})),i.map((function(e){return t})))},e.prototype.getPage=function(e){return this.backend.getJson("/get?size="+this.MAX_PAGE_SIZE+"&page="+(e||0),this.backend.getInboxBase())},e.prototype.getState=function(){return this.inboxState},e.prototype.refreshInboxState=function(){this.fetchInboxState()},e.prototype.fetchInboxState=function(){var e=this;this.backend.getJson("/state",this.backend.getInboxBase()).pipe(i.map((function(e){return e}))).subscribe((function(t){e.inboxState=t,e.inboxStateSource.next(e.inboxState)}),Gt.logError(null,"Failed to fetch inbox state!"))},e.prototype.removeItem=function(e){var t=this;return this.backend.del("/"+e.id,this.backend.getInboxBase()).pipe(i.tap((function(){return t.updateInboxItems(e.id)})))},e.prototype.updateInboxItems=function(e,t,r){this.backend.update(this.inboxItems,r||[{id:e,item:t}])&&this.inboxItemsSource.next(this.inboxItems)},e.prototype.markAsRead=function(e){return this.backend.put("/read/"+e.id,this.backend.getInboxBase())},e}();hr.decorators=[{type:r.Injectable}],hr.ctorParameters=function(){return[{type:er}]};var fr,dr=function(){function e(){}return e.prototype.setCapabilities=function(e,t){return this.capabilities={bpm:e.bpm,favorites:e.favorites,followup:e.followup,subscription:e.subscription,intray:e.intray,storedqueries:e.storedqueries,recyclebin:e.recyclebin,inbox:e.bpm||e.followup||e.subscription,notifications:e.followup||e.subscription,template:e.template,sso:t||!1},this.capabilities},e.prototype.getCapabilities=function(){return this.capabilities},e.prototype.hasCapability=function(e){return this.capabilities[e]},e}();dr.decorators=[{type:r.Injectable}],dr.ctorParameters=function(){return[]};var mr=function(){function e(){return fr&&(fr=this),this.storage=this.isLocalStorageAvailable()?window.localStorage:null,fr}return e.prototype.setItem=function(e,t){if(void 0===e||void 0===t)return!1;this.storage.setItem(e,JSON.stringify(t))},e.prototype.getItem=function(e){this.isKeyDefined(e);var t=this.storage.getItem(e);return!!t&&JSON.parse(t)},e.prototype.hasItem=function(e){return this.isKeyDefined(e),null===this.storage.getItem(e)},e.prototype.removeItem=function(e){this.isKeyDefined(e),this.storage.removeItem(e)},e.prototype.clear=function(e){var t=this;return e?Object.keys(this.storage).forEach((function(r){return e(r)&&t.removeItem(r)})):this.storage.clear()},e.prototype.isKeyDefined=function(e){if(void 0===e)return!1},e.prototype.isLocalStorageAvailable=function(){try{var e=window.localStorage;return e.setItem("test","test"),e.removeItem("test"),!0}catch(e){return!1}},e}();mr.decorators=[{type:r.Injectable}],mr.ctorParameters=function(){return[]};var gr,yr=function(e){var t=this;switch(this.title=e.activityName,this.description=e.description,this.number=e.number,this.time=e.time,this.type=e.type,this.data={},e.type){case"DEADLINE_START":case"DEADLINE_FIRE":this.title=e.periodName+": "+e.description,this.description=null,this.data={periodFireTime:e.periodFireTime},this.type=e.type}e.performer&&(this.performer=[],e.performer.groups.forEach((function(e){return t.performer.push({type:"group",label:e.name})})),e.performer.roles.forEach((function(e){return t.performer.push({type:"role",label:e.name})})),e.performer.users.forEach((function(e){return t.performer.push({type:"user",label:e.lastname+", "+e.firstname+" ("+e.name+")"})}))),e.user&&(this.editor=e.user)},br=function(){function e(e){this.creatorid=e.creatorid,this.modelname=e.modelname,this.iconurl=e.iconurl,this.iconid=e.iconid,this.localizedsubject=e.subject,this.modelid=e.modelid,this.processid=e.id,this.procname=e.name,this.starttime=e.starttime,this.endtime=e.endtime,this.state=e.state}return Object.defineProperty(e.prototype,"title",{get:function(){return this.localizedsubject||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this.processid||""},enumerable:!1,configurable:!0}),e.prototype.setFile=function(e){this.file=e||[]},e}(),vr=function(){function e(e){Object.assign(this,e),this.fileEntryPermissions={add:e.isFileElemAddable||!1,remove:e.isFileElemRemovable||!1},this.actions&&this.actions.length&&(this.actions=this.actions.sort((function(e,t){return e.code-t.code})))}return e.prototype.setFile=function(e){this.file=e?e.sort((function(e,t){return e.addtime<t.addtime?-1:e.addtime>t.addtime?1:0})):[]},e}();(gr=e.ClipboardAction||(e.ClipboardAction={}))[gr.COPY=0]="COPY",gr[gr.CUT=1]="CUT";var Sr,Er=function(){function t(e,t,r,n){this.capabilities=e,this.backend=t,this.eventService=r,this.inboxService=n,this.processItemsSource=new o.ReplaySubject(1),this.processItems$=this.processItemsSource.asObservable()}return t.prototype.getProcesses=function(e){var t=this;return void 0===e&&(e=1e3),this.backend.getJson("/process/user?size="+e,this.backend.getBpmBase()).pipe(i.map((function(e){return e.content.map((function(e){return new br(e)}))})),i.tap((function(e){t.processItems=e,t.processItemsSource.next(t.processItems)})))},t.prototype.getExecutableProcesses=function(e,t,r,n,i){return this.capabilities.hasCapability("bpm")?this.executableProcesses&&t?o.of(this.executableProcesses):this.fetchExecutableProcesses(e,r,n,i):o.of([])},t.prototype.initExecutableProcesses=function(){var e=this;return this.backend.get("/bpm/process/executable").pipe(i.tap((function(t){return e.hasMainExecutableProcesses=null==t?void 0:t.length})))},t.prototype.getExecutableProcessesForDmsObjects=function(e){return this.getExecutableProcesses(e.map((function(e){return e.typeName})),!1,!0)},t.prototype.fetchExecutableProcesses=function(e,t,r,n){var o=this,s="/bpm/process/executable";return t&&(s+="?form=true&fields=true"),e&&(s+=(t?"&":"?")+"type="+e.join(",")),r&&(s+=(t||e?"&":"?")+"modelid="+r),this.backend.get(s).pipe(i.map((function(e){return e})),i.tap((function(e){n&&(t?(o.executableProcesses||(o.executableProcesses=[]),e.forEach((function(e){var t=o.executableProcesses.findIndex((function(t){return t.id===e.id}));-1===t?o.executableProcesses.push(e):o.executableProcesses[t]=e}))):o.executableProcesses=e)})))},t.prototype.getProcessFile=function(e){return this.backend.getJson("/process/"+e+"/file",this.backend.getBpmBase()).pipe(i.map((function(e){return e.content.map((function(e){return{id:e.elementid,title:e.title,description:e.description?e.description:"",iconid:e.iconid,creator:e.creator,addtime:e.addtime,type:e.type}}))})))},t.prototype.getWorkItem=function(e,t,r){var n=r||{form:!0,fields:!0},s=[this.backend.getJson(Gt.buildUri("/bpm/process/"+e+"/"+t,n)),this.getProcessFile(e)];return o.forkJoin(s).pipe(i.map((function(e){var t=new vr(e[0]);return t.setFile(e[1]),t})))},t.prototype.saveWorkItem=function(e){var t=this,r=e.id,n=e.processId,o={contents:e.file,data:e.data};return this.backend.post(Gt.buildUri("/bpm/process/"+n+"/"+r+"/save",{keeplock:!0,isautolock:!1}),o).pipe(i.mergeMap((function(){return t.getWorkItem(n,r)})))},t.prototype.forwardWorkItem=function(e,t){var r=this,n={action:t,contents:e.file,data:e.data};return this.backend.post(Gt.buildUri("/bpm/process/"+e.processId+"/"+e.id+"/save",{keeplock:!1,isautolock:!1}),n).pipe(i.tap((function(){return r.inboxService.updateInboxItems(e.id)})))},t.prototype.lockWorkItem=function(e){var t=this;return this.backend.put("/bpm/process/"+e.processId+"/"+e.id+"/lock").pipe(i.mergeMap((function(){return t.getWorkItem(e.processId,e.id)})))},t.prototype.unlockWorkItem=function(e){var t=this;return this.backend.del("/bpm/process/"+e.processId+"/"+e.id+"/lock").pipe(i.mergeMap((function(){return t.getWorkItem(e.processId,e.id)})))},t.prototype.startProcess=function(e,t,r){return this.backend.post("/bpm/process/?modelid="+e,{data:t,contents:r})},t.prototype.getProcessHistory=function(e){return this.backend.getJson("/bpm/process/"+e+"/history").pipe(i.map((function(e){return e&&e.length?e.map((function(e){return new yr(e)})):[]})))},t.prototype.removeFileElement=function(e,t,r){return this.backend.del("/process/"+e+"/file/"+r+"?activityid="+t,this.backend.getBpmBase())},t.prototype.addFileElements=function(e,t,r){var n=this,s=[];return r.forEach((function(r){s.push(n.backend.post("/process/"+e+"/file/"+r.id+"?type="+r.type.name+"&activityid="+t,{},n.backend.getBpmBase()))})),o.forkJoin(s).pipe(i.mergeMap((function(){return n.getWorkItem(e,t)})))},t.prototype.addFileElementsFromClipboard=function(t,r){if(t&&t.fileEntryPermissions.add&&r&&r.elements.length&&r.action===e.ClipboardAction.COPY){var n=void 0;if(t.file.length){var i=t.file.map((function(e){return e.id}));n=r.elements.filter((function(e){return-1===i.indexOf(e.id)}))}else n=r.elements;return this.addFileElements(t.processId,t.id,n)}return o.throwError("error")},t}();Er.decorators=[{type:r.Injectable}],Er.ctorParameters=function(){return[{type:dr},{type:er},{type:Qt},{type:hr}]},(Sr=e.SystemStatusEnum||(e.SystemStatusEnum={})).SYSTEM_STATUS_SCHEMA_CHANGED="schemaChangedOn",Sr.SYSTEM_STATUS_ORG_CHANGED="orgChangedOn",Sr.SYSTEM_STATUS_SEC_CHANGED="securityChangedOn",Sr.SYSTEM_STATUS_ACL_CHANGED="aclChangedOn",Sr.SYSTEM_STATUS_INBOX_CHANGED="inboxChangedOn";var Tr=function(){function t(e,t,r,n){var i=this;this.eventService=e,this.backend=t,this.appCache=r,this.ngZone=n,this.statusCacheKey="eo.framework.cache.system.status",this.pollingStopTrigger$=new o.Subject,this.appCache.getItem(this.statusCacheKey).subscribe((function(e){return i.currentStatus=e}))}return t.prototype.init=function(e){void 0===e&&(e=-1),e>-1&&(this.pollingStopTrigger$=new o.Subject,this.startPolling(e))},t.prototype.stop=function(){this.hasBeenStopped=!0,this.pollingStopTrigger$.next(),this.pollingStopTrigger$.complete()},t.prototype.startPolling=function(e){var t=this;this.ngZone.runOutsideAngular((function(){o.timer(0,e).pipe(i.takeUntil(t.pollingStopTrigger$)).subscribe((function(){t.ngZone.run((function(){t.eventService.trigger(Vt.SYSTEM_STATUS_INBOX_CHANGED,{})}))}))}))},t.prototype.handleStatusResult=function(e){var t=this,r=[];Object.keys(e).forEach((function(n){t.statusCheck(e,n)&&r.push({type:t.statusEvent(n),data:e})})),(r.length||this.hasBeenStopped)&&this.ngZone.run((function(){r.forEach((function(e){t.eventService.trigger(e.type,e.data)}))})),!r.length&&this.currentStatus||(this.currentStatus=e,this.appCache.setItem(this.statusCacheKey,e))},t.prototype.handleStatusError=function(e){var t=this;this.ngZone.run((function(){setTimeout((function(e){t.stop()}))}))},t.prototype.statusEvent=function(t){return Vt[Object.keys(e.SystemStatusEnum).find((function(r){return e.SystemStatusEnum[r]===t}))]},t.prototype.statusCheck=function(e,t){return this.currentStatus&&this.currentStatus[t]<e[t]},t}();Tr.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new Tr(r.ɵɵinject(Qt),r.ɵɵinject(er),r.ɵɵinject(Jt),r.ɵɵinject(r.NgZone))},token:Tr,providedIn:"root"}),Tr.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],Tr.ctorParameters=function(){return[{type:Qt},{type:er},{type:Jt},{type:r.NgZone}]};var Or=function(){function e(){}return e.isWebEnvironment=function(){return!e.isDesktopEnvironment()&&!e.isMobileEnvironment()},e.isMobileEnvironment=function(){return window.hasOwnProperty("cordova")},e.isDesktopEnvironment=function(){return window.hasOwnProperty("process")&&window.process.versions.hasOwnProperty("electron")},e}(),Cr=function(){function e(){this._cloudEnvironment=!1}return Object.defineProperty(e.prototype,"cloudEnvironment",{get:function(){return this._cloudEnvironment},set:function(e){this._cloudEnvironment=e},enumerable:!1,configurable:!0}),e.prototype.isCloud=function(){return this.cloudEnvironment},e}();Cr.decorators=[{type:r.Injectable}],Cr.ctorParameters=function(){return[]};var xr=function(){function e(e,t,r,n,i,s,a,c,u,p,l,h,f,d,m,g,y,b,v){var S=this;this.config=e,this.coreConfig=t,this.appCache=r,this.envService=n,this.http=i,this.bpmService=s,this.ngZone=a,this.location=c,this.capabilitiesService=u,this.logger=p,this.inboxService=l,this.prepareService=h,this.backend=f,this.systemService=d,this.userService=m,this.eventService=g,this.systemStatusService=y,this.storage=b,this.local=v,this.TOKEN_STORAGE_KEY="eo.auth.cloud.credentials",this.userProfileUri=this.userService.USER_FETCH_URI,this.authSource=new o.BehaviorSubject(!1),this.loggedInCacheKey="eo.user.loggedIn",this.authenticated$=this.authSource.asObservable(),this.hosts=[],this.profile={host:"",user:null,auth:null,active:!1},window.addEventListener("storage",(function(e){if(e.key===S.loggedInCacheKey){var t=JSON.parse(e.newValue).host;S.initUser(t).subscribe()}}))}return e.prototype.login=function(e,t,r){var o=this;e=e||"";var s=new FormData;s.append("username",encodeURIComponent(t)),s.append("password",encodeURIComponent(r));var a=new n.HttpHeaders({"Content-Type":"application/x-www-form-urlencoded"});return this.http.post(e+this.config.getContextPath()+"/login","username="+encodeURIComponent(t)+"&password="+encodeURIComponent(r),{headers:a,responseType:"text",withCredentials:this.coreConfig.withCredentials}).pipe(i.switchMap((function(){return o.initUser(e)})))},e.prototype.cloudLogin=function(e,t){var r=this;return o.Observable.create((function(n){var s=new o.Subject,a=e||"";r.http.get(a+"/tenant/"+t+"/loginDevice").subscribe((function(e){var c=a+"/oauth/"+t+"?user_code="+e.user_code,u=window.open(c,"auth");u&&r.ngZone.runOutsideAngular((function(){var e=setInterval((function(){u.closed&&(clearInterval(e),r.ngZone.run((function(){s.next(),s.complete()})))}),1e3)})),r.cloudLoginPollForResult(a+"/auth/info/state?device_code="+e.device_code,1e3,s).pipe(i.tap((function(e){if(e){r.cloudLoginSetHeaders(e,t);var n={tenant:t,accessToken:e};r.storage.setItem(r.TOKEN_STORAGE_KEY,n).subscribe()}})),i.switchMap((function(e){if(e)return r.initUser(a);o.throwError("not authenticated")}))).subscribe((function(e){u.close(),n.next(e),n.complete()}),(function(e){u.close(),n.error(e),n.complete()}))}),(function(e){n.error("unable to call device flow endpoint",e),n.complete()}))}))},e.prototype.cloudLoginPollForResult=function(e,t,r){var n=this;return void 0===r&&(r=new o.Subject),o.Observable.create((function(s){var a=!1,c=!1;n.ngZone.runOutsideAngular((function(){o.interval(t).pipe(i.takeUntil(r),i.switchMap((function(){return n.http.get(e).pipe(i.catchError((function(e){if(400===e.status)return o.of(e.error);o.throwError(e)})))}))).subscribe((function(e){n.ngZone.run((function(){a=!!e.access_token,c="access_denied"===e.error,a||c?(r.next(),r.complete(),s.next(a?e.access_token:null),s.complete()):"expired_token"===e.error&&o.throwError("Token expired")}))}),(function(e){n.ngZone.run((function(){s.error(e),s.complete()}))}),(function(){n.ngZone.run((function(){s.next(a),s.complete()}))}))}))}))},e.prototype.cloudLoginSetHeaders=function(e,t){this.backend.setHeader("Authorization","bearer "+e),this.backend.setHeader("X-ID-TENANT-NAME",t)},e.prototype.initUser=function(e){var t=this,r=new n.HttpHeaders({"Content-Type":"application/json"});return this.http.get(""+(e||"")+this.config.getContextPath()+"/auth/info",{headers:r,withCredentials:this.coreConfig.withCredentials}).pipe(i.switchMap((function(r){return t.gatewayInfo=r,t.envService.cloudEnvironment=t.gatewayInfo&&t.gatewayInfo.oauth2,t.isCloudEnvironment()?t.storage.getItem(t.TOKEN_STORAGE_KEY).pipe(i.switchMap((function(n){return n&&t.cloudLoginSetHeaders(n.accessToken,n.tenant),t.fetchUser(r,e)}))):t.fetchUser(r,e)})))},e.prototype.fetchUser=function(e,t){var r=this,o=new n.HttpHeaders({"Content-Type":"application/json"});return this.backend.get(this.userProfileUri,"",{headers:o,withCredentials:this.coreConfig.withCredentials}).pipe(i.switchMap((function(n){return r.profile={host:t||"",user:n.user.name,auth:null,active:!0},t&&r.addHostConfig(t),window.localStorage.setItem(r.loggedInCacheKey,JSON.stringify({userId:n.user.id,host:t})),r.initApp(n,e.ntlm)})),i.tap((function(){return r.authSource.next(r.isLoggedIn())})))},e.prototype.logout=function(e){this.authSource.next(!1),this.systemStatusService.stop(),this.profile={host:"",user:null,auth:null,active:!1},this.isCloudEnvironment()&&(this.storage.removeItem(this.TOKEN_STORAGE_KEY).subscribe(),this.coreConfig.environment.production&&Or.isWebEnvironment())?window.location.href=this.config.getContextPath()+"/logout":(e&&this.http.get(""+(this.profile.host||"")+this.config.getContextPath()+"/logout",{withCredentials:this.coreConfig.withCredentials}).subscribe(),this.backend.setAuthProfile(this.profile),this.eventService.trigger(Vt.LOGOUT))},e.prototype.isCloudEnvironment=function(){return this.gatewayInfo&&this.gatewayInfo.oauth2},e.prototype.addHostConfig=function(e){this.hosts.find((function(t){return t===e}))||this.hosts.push(e)},e.prototype.isLoggedIn=function(){return null!==this.profile.user},e.prototype.initApp=function(e,t){var r=new Yt(e);this.backend.setAuthProfile(this.profile),this.userService.setCurrentUser(e);var n=this.capabilitiesService.setCapabilities(e.capabilities,t);this.systemStatusService.init(this.config.getRaw("systemStatusUpdateInterval")),n.inbox&&this.inboxService.refreshInboxState(),n.intray&&this.prepareService.refreshPreparedItemsCount();var s=[this.bpmService.initExecutableProcesses(),this.systemService.getSystemDefinition(r)];return o.forkJoin(s).pipe(i.map((function(){return r})))},e}();xr.decorators=[{type:r.Injectable}],xr.ctorParameters=function(){return[{type:zt},{type:wt,decorators:[{type:r.Inject,args:[_t]}]},{type:Jt},{type:Cr},{type:n.HttpClient},{type:Er},{type:r.NgZone},{type:s.PlatformLocation},{type:dr},{type:Xt},{type:hr},{type:ur},{type:er},{type:or},{type:ir},{type:Qt},{type:Tr},{type:de.LocalStorage},{type:mr}]};var Ir=function(){function e(e,t,r,n,o){this.coreConfig=e,this.logger=t,this.http=r,this.configService=n,this.authService=o}return e.prototype.initialize=function(){var e=this;return new Promise((function(t,r){(Array.isArray(e.coreConfig.main)?o.forkJoin(e.coreConfig.main.map((function(t){return e.http.get(t,{withCredentials:e.coreConfig.withCredentials}).pipe(i.catchError((function(t){return e.logger.error("failed to catch config file",t),o.of({})})))}))):o.of([e.coreConfig.main])).pipe(i.map((function(e){return e.reduce((function(e,t){return Object.keys(t).forEach((function(r){return!e[r]||Array.isArray(t[r])||"object"!=typeof t[r]?e[r]=t[r]:Object.assign(e[r],t[r])})),e}),{})})),i.mergeMap((function(t){return e.configService.set(t),e.authService.initUser().pipe(i.catchError((function(e){return o.of(!0)})))}))).subscribe((function(e){t(!0)}),(function(t){e.logger.error(t),r()}))}))},e}();Ir.decorators=[{type:r.Injectable}],Ir.ctorParameters=function(){return[{type:wt,decorators:[{type:r.Inject,args:[_t]}]},{type:Xt},{type:n.HttpClient},{type:zt},{type:xr}]};var kr,_r=function(e){Object.assign(this,e)},wr=function(e){this.subscriptions=[],this.resubmissions=[],this.storageInfo=[],this.additionalvisibility=[],this.id=e.id,this.title=e.title,this.description=e.description,this.version=e.version,this.versions=e.versions,this.data=e.data,this.typeName=e.type,this.isActiveVersion=e.activeversion,this.isFinalized=e.finalized,this.isFavorite=e.favorite,this.isFolder=e.folder,this.isContextFolder=!!e.iscontextfolder,this.storageInfo=e.storageinfo,e.contents&&e.contents[0]&&(this.contentFileName=e.contents[0].path,this.contentFileSize=e.contents[0].size),e.contextfolder&&(this.contextFolder={id:e.contextfolder.id,typeName:e.contextfolder.type,title:e.contextfolder.title,description:e.contextfolder.description}),e.created&&(this.created={on:e.created.on,by:{id:e.created.by.id,title:e.created.by.title,name:e.created.by.name}}),e.modified&&(this.modified={on:e.modified.on,by:{id:e.modified.by.id,title:e.modified.by.title,name:e.modified.by.name}}),"NOT_LOCKED"!==e.lock&&e.lockinfo&&(this.lock={on:e.lockinfo.time,by:{me:"LOCKED_BY_SESSION_USER"===e.lock,other:"LOCKED_BY_OTHER_USER"===e.lock,name:e.lockinfo.username,label:e.lockinfo.usertitle}}),e.rights&&e.rights.length>0?this.rights={select:e.rights[0].privileges.select,edit:e.rights[0].privileges.edit&&!(this.lock&&this.lock.by.other),delete:e.rights[0].privileges.delete&&!(this.lock&&this.lock.by.other),finalize:e.rights[0].privileges.finalize&&!(this.lock&&this.lock.by.other),recycle:e.rights[0].privileges.recycle&&!(this.lock&&this.lock.by.other)}:this.rights={select:!1,edit:!1,delete:!1,finalize:!1,recycle:!1},e.shares&&(this.shares=e.shares),e.contentid&&(this.content={id:e.contentid,type:e.contenttype,count:e.contentcount||0,linked:e.contentid!==e.id,contents:e.contents}),e.subscriptions&&(this.subscriptions=e.subscriptions),e.resubmissions&&(this.resubmissions=e.resubmissions),e.additionalvisibility&&(this.additionalvisibility=e.additionalvisibility)},Ar=function(e){this.version=e.version,this.time=e.time,this.title=e.title,this.description=e.description,this.intent=e.intent,this.comment=e.comment,this.group=e.group,this.type=e.type,this.user=e.user,e.parameter&&(this.parameter=Object.assign(Object.assign({},e.parameter),{processId:e.parameter.procId,processName:e.parameter.procName,activityId:e.parameter.actId,activityName:e.parameter.actName}))};(kr=e.SubscriptionMode||(e.SubscriptionMode={})).ONLY_INDEX_DATA_CHANGED="META",kr.ONLY_DOCUMENT_CONTENT_CHANGED="CONTENT",kr.DMS_OBJECT_CHANGED="BOTH";var Rr=function(){function e(e,t,r){this.backend=e,this.systemService=t,this.eventService=r}return e.prototype.getDmsObject=function(e,t,r,n,o,s){var a=this,c="/dms/"+e,u={additionalvisibility:!0,subscription:"CURRENT",resubmission:"CURRENT",rights:"CURRENT",datameta:"true",contextfolder:"true",type:t,recyclebin:o,version:r,storageinfo:s,_intent:n};return this.backend.getViaTempCache(Gt.buildUri(c,u)).pipe(i.catchError(Gt.catchSkip((function(e){return 404===e.status}))),i.map((function(e){return a.resolveObjectTypes(new wr(e))})))},e.prototype.getDmsObjectByParams=function(e){return this.getDmsObject(e.id,e.type,e.version,e.intent,e.recyclebin,e.withStorageInfo)},e.prototype.resolveObjectTypes=function(e){return e.type=this.systemService.getObjectType(e.typeName),e.contextFolder&&(e.contextFolder.type=this.systemService.getObjectType(e.contextFolder.typeName)),e},e.prototype.deleteDmsObject=function(e,t,r,n){void 0===n&&(n=!1);var o="/dms/"+e,i={};return t&&t.length>0&&(i.type=t),r&&(i.harddelete=r),n&&(i.forcedelete=n),this.backend.del(Gt.buildUri(o,i))},e.prototype.getContextPath=function(e){return this.backend.get("/dms/"+e+"/context").pipe(i.map((function(e){return e.forEach((function(e){e.dmsobject=new wr(e.dmsobject)})),e})))},e.prototype.getChildren=function(e){var t=this,r="/dms/"+e.id+"/children";return this.backend.getViaTempCache(Gt.buildUri(r,{type:e.type.name})).pipe(i.map((function(e){return e.map((function(e){return t.resolveObjectTypes(new wr(e))}))})))},e.prototype.getVersions=function(e,t){var r="/dms/"+e+"/versions";return this.backend.getViaTempCache(Gt.buildUri(r,{type:t})).pipe(i.map((function(e){return new wr(e)})))},e.prototype.getAttachments=function(e){var t,r,n,s=this,a=null===(t=e.content)||void 0===t?void 0:t.type,c=(null===(r=e.content)||void 0===r?void 0:r.linked)?-1:e.version,u=null===(n=e.content)||void 0===n?void 0:n.id,p=Gt.buildUri("/dms/"+u+"/attachments",{type:a,version:c});return u?this.backend.getViaTempCache(p).pipe(i.catchError(Gt.catchSkip((function(e){return 404===e.status}))),i.map((function(e){return e.attachmentinfo&&e.attachmentinfo.attachments?e.attachmentinfo.attachments.map((function(e,t){return new _r(Object.assign(e,{id:t,previewUri:s.getAttachmentByIndex(u,t,a,c)}))})):[]}))):o.of([])},e.prototype.getAttachmentByIndex=function(e,t,r,n){var o=Gt.buildUri("/dms/"+e+"/attachments/"+t,{type:r,version:n});return this.backend.getServiceBase()+o},e.prototype.getSlide=function(e,t,r,n){return Gt.buildUri(this.backend.getServiceBase()+"/dms/"+e+"/slide",{type:t,version:r,height:n})},e.prototype.getPreview=function(e,t,r,n,o){return Gt.buildUri(this.backend.getServiceBase()+"/dms/"+e+"/content",{rendition:n,type:t,version:r,recyclebin:o})},e.prototype.updateObject=function(e,t,r,n,o){var i=Gt.buildUri("/dms/"+e,{type:r,version:n,checkreferences:o});return this.triggerUpdate({id:e,type:r,typeName:r},this.backend.put(i,t))},e.prototype.getHistory=function(e,t,r){var n="/dms/"+e+"/audit";return this.backend.getJson(Gt.buildUri(n,{type:t,recyclebin:r})).pipe(i.map((function(e){return e.audit.map((function(e){return new Ar(e)}))})))},e.prototype.restoreVersion=function(e,t,r){var n="/dms/restoreversion/"+e+"/"+t;return this.backend.post(Gt.buildUri(n,{type:r}),null)},e.prototype.restore=function(e,t,r){var n="/dms/restore/"+e+"?userid="+t;return this.backend.put(n)},e.prototype.triggerUpdate=function(e,t){var r=this;return e?t.pipe(i.mergeMap((function(){return r.getDmsObject(e.id,e.typeName)})),i.tap((function(e){return r.eventService.trigger(Vt.DMS_OBJECT_UPDATED,e)}))):t},e.prototype.removeContent=function(e){var t="/dms/"+e.id+"/content";return this.triggerUpdate(e,this.backend.del(t))},e.prototype.createDmsObject=function(e,t,r,n){var o=new FormData;r?o.append("data",new Blob([JSON.stringify(r)],{type:"application/json"})):o.append("noindexdata",""),t&&o.append("files[]",t,Gt.encodeFileName(t.name));var i="/dms/create/"+e;return n&&(i=Gt.buildUri(i,{parentId:n.id,parentType:n.type})),this.backend.postMultiPart(i,o,null,{headers:{}})},e.prototype.createSubscription=function(e,t,r,n,o,i){var s="/dms/subscription/"+e.id;return this.triggerUpdate(e,this.backend.post(Gt.buildUri(s,{subject:t,type:e.typeName,receiver:r,sendemail:n,onlyemail:o,mode:i}),{}))},e.prototype.createResubmission=function(e,t,r,n,o,i){var s="/dms/resubmission/"+e.id;return this.triggerUpdate(e,this.backend.post(Gt.buildUri(s,{subject:t,type:e.typeName,receiver:n,due:r?r.toISOString():"",sendemail:o,onlyemail:i}),{}))},e.prototype.removeSubscriptionById=function(e,t){return this.triggerUpdate(t,this.backend.del("/messageprovider/subscription/"+e))},e.prototype.removeResubmissionsById=function(e,t){return this.triggerUpdate(t,this.backend.del("/dms/resubmission/"+e))},e.prototype.updateResubmission=function(e,t,r,n,o,s){var a=this;return this.removeResubmissionsById(e.id).pipe(i.mergeMap((function(){return a.createResubmission(e,t,r,n,o,s)})))},e.prototype.setOrganizationObjectsWithReadRights=function(e,t,r,n){var o="/dms/"+t+"/share",i={shares:Zt(n.map((function(e){return{organizationobject:e,sharechildren:!0}})),r.map((function(e){return{organizationobject:e,sharechildren:!1}})))};return this.triggerUpdate(e[0],this.backend.put(o,i))},e.prototype.move=function(e,t,r,n){var o="/dms/location/"+e;return this.backend.post(Gt.buildUri(o,{type:t,parentId:r,parentType:n}),{})},e.prototype.copy=function(e,t,r,n,o){var i="/dms/copy/"+e;return this.backend.post(Gt.buildUri(i,{type:t,parentId:r,parentType:n,createcontentlink:o}),{})},e.prototype.finalize=function(e){var t="/dms/finalize/"+e.id+"?type="+e.typeName;return this.triggerUpdate(e,this.backend.put(t))},e.prototype.definalize=function(e){var t="/dms/definalize/"+e.id+"?type="+e.typeName;return this.triggerUpdate(e,this.backend.put(t))},e.prototype.createLocalCopyOfDMSObject=function(e){var t={id:e.id,title:e.title,description:e.description,version:e.version,versions:e.versions,data:e.data,type:e.typeName,activeversion:e.isActiveVersion,finalized:e.isFinalized,favorite:e.isFavorite,folder:e.isFolder,iscontextfolder:e.isContextFolder,contextfolder:e.contextFolder?{id:e.contextFolder.id,type:e.contextFolder.typeName,title:e.contextFolder.title,description:e.contextFolder.description}:null,created:e.created,modified:e.modified,lock:e.lock?e.lock.by.me?"LOCKED_BY_SESSION_USER":"LOCKED_BY_OTHER_USER":"NOT_LOCKED",lockinfo:e.lock?{username:e.lock.by.name,usertitle:e.lock.by.label,time:e.lock.on}:null,rights:[{privileges:{select:e.rights.select,edit:e.rights.edit,delete:e.rights.delete,finalize:e.rights.finalize,recycle:e.rights.recycle}}],shares:e.shares,contentid:e.content?e.content.id:null,contenttype:e.content?e.content.type:null,contentcount:e.content?e.content.count:null,contents:e.content?e.content.contents:null,subscriptions:e.subscriptions,resubmissions:e.resubmissions,additionalvisibility:e.additionalvisibility},r=new wr(t);return r.type=e.type,r},e}();Rr.decorators=[{type:r.Injectable}],Rr.ctorParameters=function(){return[{type:er},{type:or},{type:Qt}]};var Dr=function(e){function t(r){var n,o,i=e.call(this)||this;if(r){if(i.id=r.id,i.name=r.name,i.favorite=r.favorite,i.shared=r.shared,i.user=r.user,i.version=r.version,i.roles=r.roles||[],i.parameter=[],r.parameter&&r.parameter.length>0)try{for(var s=Kt(r.parameter),a=s.next();!a.done;a=s.next()){var c=a.value;try{var u=JSON.parse(c),p={qname:u.qname,type:u.type};i.parameter.push(p)}catch(e){console.error("Failed parsing stored query parameter",e)}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}}else i.id=t.ID_NEW,i.parameter=[];return i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Wt(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(t,e),Object.defineProperty(t.prototype,"title",{get:function(){return this.name||""},enumerable:!1,configurable:!0}),t.prototype.setQuery=function(e){this.term=e?e.term:"",this.types=e?e.types:[],this.contextFolderTypes=e?e.contextFolderTypes:[],this.filters=e?e.filters:[],this.suggest=!!e&&e.suggest,this.expertMode=!!e&&e.expertMode,this.scope=e?e.scope:null,this.searchMode=e?e.searchMode:"idx"},t.prototype.toPersistableStoredQuery=function(){var e=[];return this.parameter.forEach((function(t){return e.push(JSON.stringify(t))})),{id:this.id,name:this.name,favorite:this.favorite,shared:this.shared,user:this.user,version:this.version,roles:this.roles,parameter:e,query:JSON.stringify(this.getQueryJson())}},t.prototype.isNew=function(){return this.id===t.ID_NEW},t}(Nt);Dr.ID_NEW="new";var Pr=function(){function e(e,t,r){this.system=e,this.backend=t,this.config=r}return e.toRangeValue=function(e){if(e){if(e instanceof Ht)return e;if(e.hasOwnProperty("operator")&&e.hasOwnProperty("firstValue"))return new Ht(e.operator,e.firstValue,e.secondValue)}return e},e.prototype.buildQuery=function(e){var t,r,n=this;e instanceof Nt?t=e:(r="string"==typeof e?JSON.parse(e):e,(t=new Nt).term=r.term,r.filters&&Object.keys(r.filters).forEach((function(e){t.filters.push(new Bt(e,r.filters[e].o,r.filters[e].v1,r.filters[e].v2))})),r.types&&r.types.forEach((function(e){n.system.getObjectType(e)?t.types.push(n.system.getObjectType(e)):t.types.push(e)})),r.contextfoldertypes&&r.contextfoldertypes.forEach((function(e){if("sysroot"===e){var r=new rr({id:"a",folder:!0,name:"sysroot",qname:"sysroot",label:"sysroot",iscontextfolder:!0,abstract:!1,elements:[],description:"",shareable:!1,minfiles:0,maxfiles:1});t.contextFolderTypes.push(r)}else t.contextFolderTypes.push(n.system.getObjectType(e))})),t.fields=r.fields,r.options&&(t.suggest=r.options.suggest||!1,t.expertMode=r.options.expertmode||!1,t.scope=r.options.scope,t.resolveReference=null!==r.options.resolvereference?r.options.resolvereference:null===r.options.resolveReference||r.options.resolveReference,t.withContext=r.options.withcontext||r.options.withContext||!1,t.searchMode=r.options.searchmode||Nt.DEFAULT_SEARCH_MODE));return t},e.prototype.search=function(e){var t=this;return this.executeQuery(e.getQueryJson()).pipe(i.map((function(e){return t.createResultFromResponse(e)})))},e.prototype.getSearchState=function(e){return e instanceof Nt&&(e=e.getQueryJson()),delete e.name,this.executeQuery(e,!0).pipe(i.map((function(e){var t=new Lt;return t.count=e.hits.total,Object.keys(Nt.BASE_PARAMS).forEach((function(r){var n=Nt.BASE_PARAMS[r];(e.aggregations[n]?e.aggregations[n].buckets:[]).forEach((function(e){var r=e.key,o=e.doc_count,i=e.contextfoldertype;"filesize"===n&&(o=e["filter#documents"].doc_count),t.addAggregations(n,r,o,e),n===Nt.BASE_PARAMS.TYPE&&i&&i.buckets.forEach((function(e){t.addAggregations("contexttype",e.key,e.doc_count,e)}))}))})),t})))},e.prototype.getChunkedResult=function(e,t,r){var n=this,o=e.getQueryJson();o.from=t;var s="search!chunk:"+r+"!"+JSON.stringify(o);return this.backend.getViaTempCache(s,(function(){return n.executeQuery(o,!1,r).pipe(i.map((function(e){return n.createResultFromResponse(e)})))}))},e.prototype.executeQuery=function(e,t,r){var n,o=this,i=e;if(t)n="/aggregate";else{var s=r||this.config.getRaw("search.limit");n="/?size="+s}return i.options=Object.assign(Object.assign({},i.options),{tracktotalhits:this.config.getRaw("search.trackTotalHits")||!1,timezone:Gt.getTimezoneOffset()}),this.backend.getViaTempCache(n+JSON.stringify(i),(function(){return o.backend.post(n,i,o.backend.getSearchBase())}))},e.prototype.downloadCsvFromQuery=function(e){var t=this;return this.backend.post("/export",e,this.backend.getSearchBase(),{observe:"response",responseType:"blob"}).pipe(i.tap((function(e){var r=new Blob([e.body],{type:"text/csv;charset=utf-8"});me.saveAs(r,t.getFileNameFromHttpResponse(e),{autoBom:!0})})))},e.prototype.getFileNameFromHttpResponse=function(e){return(e.headers.get("Content-Disposition")||"").split("filename=")[1]},e.prototype.autocomplete=function(e){return this.backend.getJson("/autocomplete?prefix="+encodeURIComponent(e),this.backend.getSearchBase())},e.prototype.getSearchFilter=function(e,t,r){var n=[],o=this.identifySearchFilter(e,t),i=e[0].elements.find((function(e){return e.qname===t}));if(null===r)n.push(new Bt(t,Bt.OPERATOR.EQUAL,null));else if(i&&"path"===i.classification)n.push(new Bt(t,Bt.OPERATOR.MATCH,r));else if(r instanceof Ht)null!==r.firstValue&&void 0!==r.firstValue&&n.push(new Bt(t,r.operator,r.firstValue,r.secondValue,o.datetime?{time:o.withtime}:void 0));else if(!o.multiselect&&!Array.isArray(r)||o.table)if(o.table){var s=r[0];Object.keys(s).forEach((function(e){if(void 0!==s[e]){var r=t+"."+e;s[e]instanceof Ht?n.push(new Bt(r,s[e].operator,s[e].firstValue,s[e].secondValue)):n.push(new Bt(r,Array.isArray(s[e])?Bt.OPERATOR.IN:Bt.OPERATOR.EQUAL,s[e]))}}))}else n.push(new Bt(t,Bt.OPERATOR.EQUAL,r));else Array.isArray(r)&&r.length&&n.push(new Bt(t,Bt.OPERATOR.IN,r));return n},e.prototype.identifySearchFilter=function(e,t){for(var r,n=0;!r&&n<e.length;)r=e[n].elements.find((function(e){return e.qname===t})),n++;return{multiselect:this.isMultiselectSearchFilter(r),table:r&&"TABLE"===r.type,datetime:r&&"DATETIME"===r.type,withtime:r&&r.withtime}},e.prototype.isMultiselectSearchFilter=function(e){return e&&("ORGANIZATION"===e.type||"CODESYSTEM"===e.type||"STRING"===e.type&&"selector"===e.classification||"STRING"===e.type&&e.multiselect)},e.prototype.createResultFromResponse=function(e){var t=new Mt;t.suggests=e.suggest,t.fields=e.config;var r=e.hits.hits.map((function(e){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e._source),{id:e._id}),e.snippets&&{snippets:e.snippets}),e.references&&{_references:e.references}),e.context&&{context:e.context})}));return t.count=e.hits.total,t.hits=r||[],t},e.prototype.getResultFieldDefinitionConfig=function(e){return{type:1===(e.types||[]).length?e.types[0]:null,contextType:1===(e.contextFolderTypes||[]).length?e.contextFolderTypes[0]:null}},e.prototype.resolveConfigTypeNames=function(e,t){return{typeName:e?e.qname:"sysobject",contextTypeName:e&&t?t.qname:void 0}},e.prototype.fetchResultFieldDefinition=function(e,t,r){var n=this.resolveConfigTypeNames(e,t),o=n.typeName,s=n.contextTypeName,a=Gt.buildUri("/user/config/result/"+o,{contexttype:s,mode:r});return this.backend.getJson(a).pipe(i.map((function(e){return new Ut(e.elements,e.sortorder,e.grouporder,e.pinned,e.alignmentx,e.mode)})))},e.prototype.saveResultFieldDefinition=function(e,t,r,n){void 0===n&&(n=!1);var o=n?"/user/config/commonresult/":"/user/config/result/",i=this.resolveConfigTypeNames(e,t),s=i.typeName,a=i.contextTypeName,c=Gt.buildUri(o+s,{contexttype:a});return this.backend.post(c,r)},e.prototype.removeResultFieldDefinition=function(e,t){var r=this.resolveConfigTypeNames(e,t),n=r.typeName,o=r.contextTypeName,i=Gt.buildUri("/user/config/result/"+n,{contexttype:o});return this.backend.del(i)},e.prototype.filterToElementValue=function(e,t){var r=void 0;return e&&(r="NUMBER"!==t&&"DATETIME"!==t||!e.firstValue?e.firstValue:new Ht(e.operator,e.firstValue,e.secondValue)),r},e.prototype.tableFiltersToElementValue=function(e,t){var r=this,n={};return e.forEach((function(e){var o=t.find((function(t){return t.qname===e.property})).name,i=t.find((function(t){return t.qname===e.property})).type;n[o]=r.filterToElementValue(e,i)})),[n]},e}();Pr.decorators=[{type:r.Injectable}],Pr.ctorParameters=function(){return[{type:or},{type:er},{type:zt}]};var jr=function(){function e(e,t,r,n){var i=this;this.backend=e,this.system=t,this.searchService=r,this.eventService=n,this.storedQueries={queries:[]},this.storedQueriesSource=new o.BehaviorSubject(this.storedQueries),this.storedQueries$=this.storedQueriesSource.asObservable(),n.on(Vt.LOGOUT).subscribe((function(){return i.clear()}))}return e.prototype.clear=function(){this.storedQueries={queries:[]},this.storedQueriesSource.next(this.storedQueries)},e.prototype.getStoredQueries$=function(){return this.storedQueries.queries.length||this.fetchStoredQueries(),this.storedQueries$},e.prototype.refreshStoredQueries=function(){this.fetchStoredQueries()},e.prototype.fetchStoredQueries=function(){var e=this;this.backend.getJson("/storedqueries?size=9999",this.backend.getSearchBase()).pipe(i.map((function(t){return(t||[]).map((function(t){var r=new Dr(t);return r.setQuery(e.searchService.buildQuery(t.query)),r}))}))).subscribe((function(t){e.storedQueries={queries:t},e.storedQueriesSource.next(e.storedQueries)}))},e.prototype.saveNewStoredQuery=function(e){var t=this;return this.backend.post("/storedqueries",e.toPersistableStoredQuery(),this.backend.getSearchBase()).pipe(i.map((function(e){var r=new Dr(e);return r.setQuery(t.searchService.buildQuery(e.query)),t.storedQueries.select=r.id,t.storedQueries.queries.push(r),t.storedQueriesSource.next(t.storedQueries),r})))},e.prototype.updateStoredQuery=function(e){var t=this;return this.backend.put("/storedqueries",e.toPersistableStoredQuery(),this.backend.getSearchBase()).pipe(i.map((function(e){var r=new Dr(e);return r.setQuery(t.searchService.buildQuery(e.query)),t.storedQueries.select=r.id,t.storedQueries.queries=t.storedQueries.queries.filter((function(e){return e.id!==r.id})),t.storedQueries.queries.push(r),t.storedQueriesSource.next(t.storedQueries),r})))},e.prototype.saveStoredQuery=function(t){return t.id===e.ID_NEW?this.saveNewStoredQuery(t):this.updateStoredQuery(t)},e.prototype.removeStoredQuery=function(e){var t=this;return this.backend.del("/storedqueries/"+e,this.backend.getSearchBase()).pipe(i.tap((function(){t.storedQueries.select=null,t.storedQueries.queries=t.storedQueries.queries.filter((function(t){return t.id!==e})),t.storedQueriesSource.next(t.storedQueries)})))},e.prototype.getFulltextFormElement=function(t,r){return{name:e.FULLTEXT,qname:e.FULLTEXT,label:t,value:r,type:"STRING"}},e}();jr.ID_NEW=Dr.ID_NEW,jr.FULLTEXT="fulltext",jr.decorators=[{type:r.Injectable}],jr.ctorParameters=function(){return[{type:er},{type:or},{type:Pr},{type:Qt}]};var Nr=function(){function e(e){var t=this;this.eventService=e,this.cacheKey="eo.clipboard",this.clipboard={action:null,elements:[]},this.clipboardSource=new o.ReplaySubject(1),this.clipboard$=this.clipboardSource.asObservable(),e.on(Vt.LOGOUT).subscribe((function(e){t.clear()})),this.loadCachedClipboard(),window.addEventListener("storage",(function(e){e.key===t.cacheKey&&t.loadCachedClipboard()}))}return e.prototype.set=function(e,t,r){this.clipboard={action:t,elements:e},r||this.updateCache(),this.clipboardSource.next(this.clipboard)},e.prototype.get=function(){return this.clipboard},e.prototype.clear=function(){this.clipboard={action:null,elements:[]},this.updateCache(),this.clipboardSource.next(this.clipboard)},e.prototype.updateCache=function(){window.localStorage.setItem(this.cacheKey,JSON.stringify(this.clipboard))},e.prototype.loadCachedClipboard=function(){var e=window.localStorage.getItem(this.cacheKey);try{var t=JSON.parse(e);t?this.set(t.elements,t.action,!0):this.clear()}catch(e){}},e}();Nr.decorators=[{type:r.Injectable}],Nr.ctorParameters=function(){return[{type:Qt}]};var Fr=function(){function e(e){this.toastrService=e,this.options={closeButton:!0,positionClass:"toast-bottom-right",timeOut:15e3}}return e.prototype.info=function(e,t){this.toast(e,t)},e.prototype.confirm=function(e,t,r,n){this.toast(e,t,"confirm",{onAdd:r,onRemove:n,timeOut:7e3})},e.prototype.success=function(e,t){this.toast(e,t,"success")},e.prototype.wait=function(e,t){this.toast(e,t,"wait")},e.prototype.error=function(e,t){this.toast(e,t,"error",{closeButton:!0,timeOut:7e3})},e.prototype.warning=function(e,t){this.toast(e,t,"warning")},e.prototype.toast=function(e,t,r,n){var o=Object.assign({},this.options,n);this.doToast(t,e,o,r)},e.prototype.doToast=function(e,t,r,n){switch(n){case"success":this.toastrService.success(e,t,r);break;case"error":this.toastrService.error(e,t,r);break;case"warning":this.toastrService.warning(e,t,r);break;case"confirm":this.toastrService.info(e,t,r);break;default:this.toastrService.info(e,t,r)}},e}();Fr.decorators=[{type:r.Injectable}],Fr.ctorParameters=function(){return[{type:ye.ToastrService}]};var Ur=function(){function e(){}return e.prototype.apply=function(e,t){return console&&console[e]&&console[e].apply(console,Zt(t))},e.prototype.assert=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.apply("assert",e)},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.apply("debug",e)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.apply("error",e)},e.prototype.group=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.apply("group",e)},e.prototype.groupEnd=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.apply("groupEnd",e)},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.apply("info",e)},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.apply("log",e)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.apply("warn",e)},e}();Ur.decorators=[{type:r.Injectable}];var Lr=function(){function e(e){this.prepareService=e,this._targets=[],this.targetsSource=new o.ReplaySubject(1),this.uploadTargets$=this.targetsSource.asObservable()}return e.prototype.setOverlayActive=function(e){this.overlayActive=e},e.prototype.isOverlayActive=function(){return this.overlayActive},e.prototype.register=function(e){var t,r,n=this;e.referenceObject&&(e.description=("object"===e.type&&(null===(r=null===(t=e.referenceObject)||void 0===t?void 0:t.type)||void 0===r?void 0:r.label)?e.referenceObject.type.label+": ":"")+e.referenceObject.title,e.subFolder&&this.prepareService.getPrepareChildTypes(e.referenceObject.id).subscribe((function(t){n.isSubFolderAllowed(e.subFolder.data,t.types)&&(e.description+="; "+e.subFolder.name)})));var o=this._targets.find((function(t){return t.id===e.id}));o?Object.assign(o,e):this._targets.push(e),this.targetsSource.next(this._targets)},e.prototype.isSubFolderAllowed=function(e,t){return!!t.find((function(t){return t.name===e.type}))},e.prototype.unregister=function(e){this._targets=this._targets.filter((function(t){return t.id!==e})),this.targetsSource.next(this._targets)},e}();Lr.decorators=[{type:r.Injectable}],Lr.ctorParameters=function(){return[{type:ur}]};var Mr=function(){};Mr.decorators=[{type:r.NgModule,args:[{exports:[ye.ToastrModule,t.TranslateModule]}]}];var Br=function(){function e(e){this.auth=e}return e.prototype.intercept=function(e,t){var r=this;return t.handle(e).pipe(i.tap((function(e){n.HttpResponse}),(function(e){(e instanceof n.HttpErrorResponse||e.isHttpErrorResponse)&&401===e.status&&r.auth.logout()})))},e}();Br.decorators=[{type:r.Injectable}],Br.ctorParameters=function(){return[{type:xr}]};var Hr=function(){function e(e,t){this.backend=e,this.translate=t}return e.prototype.signDocument=function(e,t){var r="/request/"+e;return this.backend.post(r,t,"/signing")},e.prototype.cancelSigning=function(e,t){var r="/cancel/"+e+"?comment="+t;return this.backend.put(r,null,"/signing")},e.prototype.getLocalizedSigningForm=function(){return{size:"small",readonly:!1,name:"yuvsigners",qname:"yuvsigning.yuvsigners",hitname:"yuvsigning.yuvsigners",label:this.translate.instant("eo.action.signature.signers"),type:"TABLE",indexname:"tab_yuvsigning_yuvsigners",required:!0,elements:[{readonly:!1,name:"yuvsignerorder",qname:"yuvsigning.yuvsigners.yuvsignerorder",hitname:"yuvsigning.yuvsigners.yuvsignerorder",label:this.translate.instant("eo.action.signature.yuvsigners.yuvsignerorder"),type:"NUMBER",indexname:"num_yuvsignerorder",scale:0,precision:10,grouping:!1,selectedforenrichment:!1,required:!0,sortable:!0,searchable:!0,value:1},{size:"small",multiline:!1,readonly:!1,name:"yuvsignername",qname:"yuvsigning.yuvsigners.yuvsignername",hitname:"yuvsigning.yuvsigners.yuvsignername",label:this.translate.instant("eo.action.signature.yuvsigners.yuvsignername"),type:"STRING",indexname:"str_yuvsignername",autocomplete:!0,selectedforenrichment:!1,maxlen:100,minlen:0,required:!0,sortable:!0,searchable:!0},{size:"small",multiline:!1,readonly:!1,name:"yuvsigneremail",qname:"yuvsigning.yuvsigners.yuvsigneremail",hitname:"yuvsigning.yuvsigners.yuvsigneremail",label:this.translate.instant("eo.action.signature.yuvsigners.yuvsigneremail"),type:"STRING",indexname:"str_yuvsigneremail",autocomplete:!0,selectedforenrichment:!1,maxlen:200,minlen:0,required:!0,sortable:!0,searchable:!0}]}},e.prototype.signatureRequested=function(e){return!!e.data.yuvsigstatus},e.prototype.signingInProcess=function(e){return"inprocess"===e.data.yuvsigstatus},e}();Hr.decorators=[{type:r.Injectable}],Hr.ctorParameters=function(){return[{type:er},{type:t.TranslateService}]};var qr=function(){function e(e){if(e)throw new Error("EoCoreModule is already loaded. Import it in the AppModule only")}return e.forRoot=function(o){return{ngModule:e,providers:[Ir,{provide:n.HTTP_INTERCEPTORS,useClass:Br,multi:!0},{provide:kt,useValue:o},{provide:_t,useClass:wt,deps:[kt]},{provide:r.APP_INITIALIZER,useFactory:At,deps:[Ir],multi:!0},{provide:t.TranslateLoader,useClass:Dt,deps:[n.HttpClient,_t]},{provide:t.MissingTranslationHandler,useClass:Rt}]}},e}();qr.decorators=[{type:r.NgModule,args:[{imports:[n.HttpClientModule,t.TranslateModule.forRoot(),ye.ToastrModule.forRoot()],providers:[xr,er,Xt,ir,Pr,or,Jt,Rr,Hr,zt,ur,hr,Er,dr,Nr,ar,Fr,mr,jr,Qt,Lr,Cr,{provide:Xt,useClass:Ur},Tr],exports:[Mr]}]}],qr.ctorParameters=function(){return[{type:qr,decorators:[{type:r.Optional},{type:r.SkipSelf}]}]};var Gr=function(e){this.id=Gt.uuid(),this.name=e.name,this.size=e.size,this.type=e.type,this._file=e};Object.defineProperty(e,"TranslateLoader",{enumerable:!0,get:function(){return t.TranslateLoader}}),Object.defineProperty(e,"TranslateModule",{enumerable:!0,get:function(){return t.TranslateModule}}),Object.defineProperty(e,"TranslateService",{enumerable:!0,get:function(){return t.TranslateService}}),e.AppCacheService=Jt,e.AuthService=xr,e.BackendService=er,e.BpmService=Er,e.CORE_CONFIG=_t,e.CUSTOM_CONFIG=kt,e.CapabilitiesService=dr,e.ClipboardService=Nr,e.Config=zt,e.CoreConfig=wt,e.CoreInit=Ir,e.DmsObject=wr,e.DmsObjectAttachment=_r,e.DmsObjectHistoryEntry=Ar,e.DmsService=Rr,e.EnaioEvent=Vt,e.EnvironmentEnaio=Or,e.EnvironmentService=Cr,e.EoCoreModule=qr,e.EoError=jt,e.EoSharedModule=Mr,e.EoUser=Yt,e.EoxMissingTranslationHandler=Rt,e.EoxTranslateJsonLoader=Dt,e.EventService=Qt,e.FieldDefinition=Ut,e.InboxItem=lr,e.InboxService=hr,e.LocalStorageService=mr,e.Logger=Xt,e.NotificationsService=Fr,e.ObjectType=rr,e.PrepareService=ur,e.PreparedItem=sr,e.Process=br,e.RangeValue=Ht,e.SearchFilter=Bt,e.SearchQuery=Nt,e.SearchResult=Mt,e.SearchService=Pr,e.SearchState=Lt,e.SigningService=Hr,e.SortOption=Ft,e.StoredQueriesService=jr,e.StoredQuery=Dr,e.SystemService=or,e.UploadFileItem=Gr,e.UploadRegistryService=Lr,e.UploadService=ar,e.UploadTarget=cr,e.UserService=ir,e.Utils=Gt,e.WorkItem=vr,e.WorkItemHistoryEntry=yr,e.init_module=At,e.ɵa=Tr,e.ɵb=Ur,e.ɵc=Br,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
16
16
|
//# sourceMappingURL=eo-sdk-client-projects-eo-sdk-core.umd.min.js.map
|