/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/ng2-smartworks@1.0.81/ng2-smartworks.umd.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("@angular/common"),require("mydatepicker"),require("angular2-draggable"),require("ng2-file-upload"),require("@ngx-translate/core"),require("rxjs/Subscription"),require("@angular/http"),require("rxjs"),require("rxjs/BehaviorSubject"),require("jquery"),require("@angular/router"),require("rxjs/Rx"),require("@angular/platform-browser")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/forms","@angular/common","mydatepicker","angular2-draggable","ng2-file-upload","@ngx-translate/core","rxjs/Subscription","@angular/http","rxjs","rxjs/BehaviorSubject","jquery","@angular/router","rxjs/Rx","@angular/platform-browser"],t):t(e["ng2-smartworks"]={},e.core,e.forms,e.common,e.mydatepicker,e.angular2Draggable,e.ng2FileUpload,e.core$1,e.Subscription,e.http,e.rxjs,e.BehaviorSubject,e.$_,e.router,e.Rx,e.platformBrowser)}(this,(function(e,t,i,n,s,o,r,a,l,c,d,p,u,m,h,g){"use strict";var f,v=u.default,b=function(){function e(e,t){this.el=e.nativeElement,this.renderer=t}return e.prototype.ngOnInit=function(){var e=this,t=this;"IFRAME"===this.el.tagName&&this.renderer.listen(this.el,"load",(function(){t.prevHeight=0,t.sameCount=0,setTimeout((function(){t.setHeight()}),50),e.renderer.setElementStyle(t.el.contentWindow.document.body,"margin","0px"),e.renderer.setElementStyle(t.el.contentWindow.document.body,"overflow-y","hidden")}))},e.prototype.setHeight=function(){var e=this;this.el.contentWindow.document.body.scrollHeight!==this.prevHeight?(this.sameCount=0,this.prevHeight=this.el.contentWindow.document.body.scrollHeight,this.renderer.setElementStyle(e.el,"height",this.el.contentWindow.document.body.scrollHeight+16+"px"),setTimeout((function(){e.setHeight()}),50)):(this.sameCount++,this.sameCount<2&&setTimeout((function(){e.setHeight()}),50))},e.decorators=[{type:t.Directive,args:[{selector:"[iframeAutoHeight]"}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer}]},e}(),y=function(){function e(){this.toasts=[]}return e.prototype.add=function(e,t){this.toasts.push({type:e,text:t})},e.prototype.clear=function(){this.toasts=[]},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[]},e}(),x=function(){function e(){this.popupMessage=new p.BehaviorSubject(null),this.changeNotice=new p.BehaviorSubject(null),this.subIsLoading=new p.BehaviorSubject(null),this.currentUserChange=new p.BehaviorSubject(null),this.copingProgress=new p.BehaviorSubject(null),this.updateSceneNotes=new p.BehaviorSubject(null),this.clientResumed=new p.BehaviorSubject(null),this.lastBreath=(new Date).getTime()}return e.prototype.pubPopupMessage=function(e){this.popupMessage.next(e)},e.prototype.pubChangeNotice=function(e){this.changeNotice.next(e)},e.prototype.isLoading=function(e){this.subIsLoading.next(e)},e.prototype.pubCurrentUserChange=function(e){console.log("pubCurrentUserChange called user = ",e),this.currentUserChange.next(e)},e.prototype.pubCopingProgress=function(e){this.copingProgress.next(e)},e.prototype.pubUpdateSceneNotes=function(e){this.updateSceneNotes.next(e)},e.prototype.keepBreathing=function(){var e=this;setTimeout((function(){var t=(new Date).getTime();e.lastBreath+2e4<t&&e.clientResumed.next(new Date),e.lastBreath=t,e.keepBreathing()}),1e4)},e.prototype.startBreathing=function(){this.lastBreath||this.keepBreathing()},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[]},e}(),w=function(){function e(e){this.publishService=e,this.spinners=0}return e.prototype.add=function(){var e=this;this.spinners++,this.spinners>0&&setTimeout((function(){e.publishService.isLoading(!0)}))},e.prototype.remove=function(){var e=this;this.spinners--,this.spinners<=0&&setTimeout((function(){e.publishService.isLoading(!1)}))},e.prototype.clear=function(){var e=this;this.spinners=0,setTimeout((function(){e.publishService.isLoading(!1)}))},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:x}]},e}(),S=window.location.origin,k="/free",C="/rest",I=S+"/login",U=function(){function e(e,t,i,n){this.http=e,this.translate=t,this.toastService=i,this.spinnerService=n}return e.prototype.handleError=function(e,t){e?401!==e&&this.toastService.add("error",this.translate.instant("common.error.http-communication",{code:e})):this.toastService.add("error",this.translate.instant("common.error.server-response",{message:t}))},e.prototype.callApi=function(e,t,i,n){var s=this,o="";if(i&&i instanceof Object)for(var r in i)i.hasOwnProperty(r)&&(o=o+(""===o?"?":"&")+r+"="+i[r]);return"get"===t?(this.spinnerService.add(),this.http.get(e+o).timeout(1e5).map((function(e){var t=null;try{t=e.json()}catch(t){return s.spinnerService.remove(),e}return!1===t.status&&s.handleError(null,t.errorMessage),s.spinnerService.remove(),t})).catch((function(e){return s.handleError(e.status,null),s.spinnerService.remove(),d.Observable.throw(e.message||e)}))):"post"===t?(this.spinnerService.add(),this.http.post(e+o,JSON.stringify(n)).timeout(1e5).map((function(e){var t=null;try{t=e.json()}catch(t){return s.spinnerService.remove(),e}return!1===t.status&&s.handleError(null,t.errorMessage),s.spinnerService.remove(),t})).catch((function(e){return s.handleError(e.status,null),s.spinnerService.remove(),d.Observable.throw(e.message||e)}))):void 0},e.prototype.callApiNotimeout=function(e,t,i,n){var s=this,o="";if(i&&i instanceof Object)for(var r in i)i.hasOwnProperty(r)&&(o=o+(""===o?"?":"&")+r+"="+i[r]);return"get"===t?(this.spinnerService.add(),this.http.get(e+o).map((function(e){var t=null;try{t=e.json()}catch(t){return s.spinnerService.remove(),e}return!1===t.status&&s.handleError(null,t.errorMessage),s.spinnerService.remove(),t})).catch((function(e){return s.handleError(e.status,null),s.spinnerService.remove(),d.Observable.throw(e.message||e)}))):"post"===t?(this.spinnerService.add(),this.http.post(e+o,JSON.stringify(n)).map((function(e){var t=null;try{t=e.json()}catch(t){return s.spinnerService.remove(),e}return!1===t.status&&s.handleError(null,t.errorMessage),s.spinnerService.remove(),t})).catch((function(e){return s.handleError(e.status,null),s.spinnerService.remove(),d.Observable.throw(e.message||e)}))):void 0},e.prototype.login=function(e,t){var i=this;return new Promise((function(n,s){i.callApi(I,"post",null,{username:e,password:t}).subscribe((function(e){n(e)}),(function(e){s(e)}))}))},e.prototype.register=function(e){var t=this;return new Promise((function(i,n){t.callApi(S+k+"/register","post",null,e).subscribe((function(e){i(e)}),(function(e){n(e)}))}))},e.prototype.setUser=function(e){var t=this;return new Promise((function(i,n){t.callApi(S+k+"/setUser","post",null,e).subscribe((function(e){i(e)}),(function(e){n(e)}))}))},e.prototype.logout=function(){},e.prototype.getCurrentUser=function(e){var t=this;return new Promise((function(i,n){t.callApi(S+C+"/getCurrentUser/"+e,"get",null,null).subscribe((function(e){i(e)}),(function(e){n(e)}))}))},e.prototype.checkUserIdRegistered=function(e){var t=this;return new Promise((function(i,n){t.callApi(S+k+"/checkUserIdRegistered/"+e,"get",null,null).subscribe((function(e){i(e)}),(function(e){n(e)}))}))},e.prototype.requestEmailAuthKey=function(e,t,i,n){var s=this;return new Promise((function(o,r){s.callApi(S+k+"/requestEmailAuthKey/"+e+(t?"/"+t+"/"+i+"/"+n:""),"get",null,null).subscribe((function(e){o(e)}),(function(e){r(e)}))}))},e.prototype.authenticateAuthKey=function(e,t){var i=this;return new Promise((function(n,s){i.callApi(S+k+"/authenticateAuthKey/"+e+"/"+t,"get",null,null).subscribe((function(e){n(e)}),(function(e){s(e)}))}))},e.prototype.getMyCompanies=function(){var e=this;return new Promise((function(t,i){e.callApi(S+C+"/getMyCompanies","get",null,null).subscribe((function(e){t(e)}),(function(e){i(e)}))}))},e.prototype.searchMyCompanys=function(e,t,i){var n=this;return new Promise((function(s,o){n.callApi(S+C+"/searchMyCompanys","post",null,{key:e||"",orderBy:t,managerOnly:""+i}).subscribe((function(e){s(e)}),(function(e){o(e)}))}))},e.prototype.getCompanyUsers=function(e){var t=this;return new Promise((function(i,n){t.callApi(S+C+"/getCompanyUsers/"+e,"get",null,null).subscribe((function(e){i(e)}),(function(e){n(e)}))}))},e.prototype.setCompanyUser=function(e,t){var i=this;return new Promise((function(n,s){i.callApi(S+C+"/setCompanyUser","post",null,{companyId:e,user:t}).subscribe((function(e){n(e)}),(function(e){s(e)}))}))},e.prototype.removeUsersFromCompany=function(e,t){var i=this;return new Promise((function(n,s){i.callApi(S+C+"/removeUsersFromCompany","post",null,{companyId:e,users:t}).subscribe((function(e){n(e)}),(function(e){s(e)}))}))},e.prototype.searchCompanyGroups=function(e,t){var i=this;return new Promise((function(n,s){i.callApi(S+C+"/searchCompanyGroups","post",null,{companyId:e,key:t||""}).subscribe((function(e){n(e)}),(function(e){s(e)}))}))},e.prototype.searchCompanyUsers=function(e,t,i){var n=this;return new Promise((function(s,o){n.callApi(S+C+"/searchCompanyUsers","post",null,{companyId:e,key:t||"",guestOnly:i?"true":"false"}).subscribe((function(e){s(e)}),(function(e){o(e)}))}))},e.prototype.searchCompanyWorkSpaces=function(e,t,i){var n=this;return new Promise((function(s,o){n.callApi(S+C+"/searchCompanyWorkSpaces","post",null,{companyId:e,key:t||"",guestOnly:i?"true":"false"}).subscribe((function(e){s(e)}),(function(e){o(e)}))}))},e.prototype.searchCompanyDepartments=function(e,t){var i=this;return new Promise((function(n,s){i.callApi(S+C+"/searchCompanyDepartments","post",null,{companyId:e,key:t||""}).subscribe((function(e){n(e)}),(function(e){s(e)}))}))},e.prototype.searchCompanyWorks=function(e,t){var i=this;return new Promise((function(n,s){i.callApi(S+C+"/searchCompanyWorks","post",null,{companyId:e,key:t||""}).subscribe((function(e){n(e)}),(function(e){s(e)}))}))},e.prototype.searchDepartmentUsers=function(e,t,i){var n=this;return new Promise((function(s,o){n.callApi(S+C+"/searchDepartmentUsers","post",null,{companyId:e,departmentId:t,key:i||""}).subscribe((function(e){s(e)}),(function(e){o(e)}))}))},e.prototype.getDepartmentUsers=function(e){var t=this;return new Promise((function(i,n){t.callApi(S+C+"/getDepartmentUsers/"+e,"get",null,null).subscribe((function(e){i(e)}),(function(e){n(e)}))}))},e.prototype.deleteTempFile=function(e){var t=this;return new Promise((function(i,n){t.callApi(S+C+"/deleteFile","post",null,{fileId:e.fileId,fileName:e.fileName}).subscribe((function(e){i(e)}),(function(e){n(e)}))}))},e.prototype.downloadFile=function(e){var t=this;return new Promise((function(i,n){t.callApi(S+C+"/downloadFile","get",{fileId:e.id,fileName:e.fileName,groupId:e.groupId},null).subscribe((function(e){i(e)}),(function(e){n(e)}))}))},e.prototype.requestEmailTempPassword=function(e){var t=this;return new Promise((function(i,n){t.callApi(S+k+"/requestEmailTempPassword/"+e,"get",null,null).subscribe((function(e){i(e)}),(function(e){n(e)}))}))},e.prototype.changeUserPassword=function(e,t,i){var n=this;return new Promise((function(s,o){n.callApi(S+k+"/changeUserPassword","post",null,{userId:e,tempPassword:t,newPassword:i}).subscribe((function(e){s(e)}),(function(e){o(e)}))}))},e.prototype.requestEmailInviteJoin=function(e,t,i){var n=this;return new Promise((function(s,o){n.callApi(S+C+"/requestEmailInviteJoin","post",null,{requestUserId:e.id,requestUserName:e.name,companyId:e.company.id,companyName:e.company.name,emailIds:t,inviteLink:i}).subscribe((function(e){s(e)}),(function(e){o(e)}))}))},e.prototype.getCompanyById=function(e){var t=this;return new Promise((function(i,n){t.callApi(S+C+"/getCompanyById/"+e,"get",null,null).subscribe((function(e){i(e)}),(function(e){n(e)}))}))},e.prototype.registerUserToCompany=function(e,t,i,n,s){var o=this;return new Promise((function(r,a){o.callApi(S+C+"/registerUserToCompany","post",null,{user:e,authKey:t,joinCompanyId:i,joinUserLevel:n,joinDepartmentId:s}).subscribe((function(e){r(e)}),(function(e){a(e)}))}))},e.prototype.updateUser=function(e){var t=this;return new Promise((function(i,n){t.callApi(S+C+"/updateUser","post",null,e).subscribe((function(e){i(e)}),(function(e){n(e)}))}))},e.prototype.createCompanyDepartmentsByTree=function(e,t){var i=this;return new Promise((function(n,s){i.callApi(S+k+"/createCompanyDepartmentsByTree","post",null,{companyId:e,departmentTree:t}).subscribe((function(e){n(e)}),(function(e){s(e)}))}))},e.prototype.createCompanyPositions=function(e,t){var i=this;return new Promise((function(n,s){i.callApi(S+k+"/createCompanyPositions","post",null,{companyId:e,positions:t}).subscribe((function(e){n(e)}),(function(e){s(e)}))}))},e.prototype.getAscendantsFromDepartmentId=function(e){var t=this;return new Promise((function(i,n){t.callApi(S+C+"/getAscendantsFromDepartmentId/"+e,"get",null,null).subscribe((function(e){i(e)}),(function(e){n(e)}))}))},e.prototype.getDescendantsFromDepartmentId=function(e){var t=this;return new Promise((function(i,n){t.callApi(S+C+"/getDescendantsFromDepartmentId/"+e,"get",null,null).subscribe((function(e){i(e)}),(function(e){n(e)}))}))},e.prototype.getChildrenFromDepartmentId=function(e){var t=this;return new Promise((function(i,n){t.callApi(S+C+"/getChildrenFromDepartmentId/"+e,"get",null,null).subscribe((function(e){i(e)}),(function(e){n(e)}))}))},e.prototype.getCompanyDepartmentTree=function(e){var t=this;return new Promise((function(i,n){t.callApi(S+C+"/getCompanyDepartmentTree/"+e,"get",null,null).subscribe((function(e){i(e)}),(function(e){n(e)}))}))},e.prototype.getCompanyPositions=function(e){var t=this;return new Promise((function(i,n){t.callApi(S+C+"/getCompanyPositions/"+e,"get",null,null).subscribe((function(e){i(e)}),(function(e){n(e)}))}))},e.prototype.setCompanyDepartment=function(e,t,i){var n=this;return new Promise((function(s,o){n.callApi(S+C+"/setCompanyDepartment","post",null,{companyId:e,departmentId:t,department:i}).subscribe((function(e){s(e)}),(function(e){o(e)}))}))},e.prototype.setCompanyDepartmentsByTree=function(e,t){var i=this;return new Promise((function(n,s){i.callApi(S+C+"/setCompanyDepartmentsByTree","post",null,{companyId:e,departmentTree:t}).subscribe((function(e){n(e)}),(function(e){s(e)}))}))},e.prototype.setCompanyPositions=function(e,t){var i=this;return new Promise((function(n,s){i.callApi(S+C+"/setCompanyPositions","post",null,{companyId:e,positions:t}).subscribe((function(e){n(e)}),(function(e){s(e)}))}))},e.prototype.getDepartmentMembers=function(e){var t=this;return new Promise((function(i,n){t.callApi(S+C+"/getDepartmentMembers/"+e,"get",null,null).subscribe((function(e){i(e)}),(function(e){n(e)}))}))},e.prototype.getDepartmentById=function(e){var t=this;return new Promise((function(i,n){t.callApi(S+C+"/getDepartmentById/"+e,"get",null,null).subscribe((function(e){i(e)}),(function(e){n(e)}))}))},e.prototype.getChannelById=function(e){var t=this;return new Promise((function(i,n){t.callApi(S+C+"/getChannelById/"+e,"get",null,null).subscribe((function(e){i(e)}),(function(e){n(e)}))}))},e.prototype.checkDomainIdRegistered=function(e){var t=this;return new Promise((function(i,n){t.callApi(S+C+"/checkDomainIdRegistered/"+e,"get",null,null).subscribe((function(e){i(e)}),(function(e){n(e)}))}))},e.prototype.setCompany=function(e,t,i){var n=this;return new Promise((function(s,o){n.callApi(S+C+"/setCompany","post",null,{company:e,departmentTree:t,positionList:i}).subscribe((function(e){s(e)}),(function(e){o(e)}))}))},e.prototype.cleanupCompany=function(e){var t=this;return new Promise((function(i,n){t.callApi(S+C+"/cleanupCompany/"+e,"get",null,null).subscribe((function(e){i(e)}),(function(e){n(e)}))}))},e.prototype.cancelCompanyJoin=function(e,t){var i=this;return new Promise((function(n,s){i.callApi(S+C+"/cancelCompanyJoin","post",null,{companyId:e,userId:t}).subscribe((function(e){n(e)}),(function(e){s(e)}))}))},e.prototype.setUserOutOfCompany=function(e,t){var i=this;return new Promise((function(n,s){i.callApi(S+C+"/setUserOutOfCompany","post",null,{companyId:e,userId:t}).subscribe((function(e){n(e)}),(function(e){s(e)}))}))},e.prototype.setUserAsManagerOfCompany=function(e,t){var i=this;return new Promise((function(n,s){i.callApi(S+C+"/setUserAsManagerOfCompany","post",null,{companyId:e,userId:t}).subscribe((function(e){n(e)}),(function(e){s(e)}))}))},e.prototype.getLastLoginHistoryByUserId=function(e){var t=this;return new Promise((function(i,n){t.callApi(S+C+"/getLastLoginHistoryByUserId/"+e,"get",null,null).subscribe((function(e){i(e)}),(function(e){n(e)}))}))},e.prototype.setLastWorkspaceId=function(e,t,i){var n=this;return new Promise((function(s,o){n.callApi(S+C+"/setLastWorkspaceId","post",null,{companyId:e,userId:t,workspaceId:i}).subscribe((function(e){s(e)}),(function(e){o(e)}))}))},e.prototype.setLastUserId=function(e,t,i){var n=this;return new Promise((function(s,o){n.callApi(S+C+"/setLastUserId","post",null,{companyId:e,userId:t,lastUserId:i}).subscribe((function(e){s(e)}),(function(e){o(e)}))}))},e.prototype.getMyLastIds=function(e,t){var i=this;return new Promise((function(n,s){i.callApi(S+C+"/getMyLastIds/"+e+"/"+t,"get",null,null).subscribe((function(e){n(e)}),(function(e){s(e)}))}))},e.prototype.getWindowData=function(e,t,i){var n=this;return new Promise((function(s,o){n.callApi(S+C+"/getWindowData/"+e+"/"+t+"/"+i,"get",null,null).subscribe((function(e){s(e)}),(function(e){o(e)}))}))},e.prototype.setWindowIds=function(e,t,i,n){var s=this;return this.spinnerService.remove(),new Promise((function(o,r){s.callApi(S+C+"/setWindowIds","post",null,{companyId:e,userId:t,model:i,windowList:n}).subscribe((function(e){o(e)}),(function(e){r(e)}))}))},e.prototype.setWindowStyles=function(e,t,i,n){var s=this;return this.spinnerService.remove(),new Promise((function(o,r){s.callApi(S+C+"/setWindowStyles","post",null,{companyId:e,userId:t,model:i,windowStyles:n}).subscribe((function(e){o(e)}),(function(e){r(e)}))}))},e.prototype.setMaximizedWindow=function(e,t,i){var n=this;return this.spinnerService.remove(),new Promise((function(s,o){n.callApi(S+C+"/setMaximizedWindow","post",null,{companyId:e,userId:t,model:i}).subscribe((function(e){s(e)}),(function(e){o(e)}))}))},e.prototype.setWindowHided=function(e,t,i,n){var s=this;return this.spinnerService.remove(),new Promise((function(o,r){s.callApi(S+C+"/setWindowHided","post",null,{companyId:e,userId:t,model:i,hided:n}).subscribe((function(e){o(e)}),(function(e){r(e)}))}))},e.prototype.deleteTaskById=function(e,t){var i=this;return new Promise((function(n,s){i.callApi(S+C+"/deleteTaskById","post",null,{companyId:e,id:t}).subscribe((function(e){n(e)}),(function(e){s(e)}))}))},e.prototype.getTempSavedTaskSize=function(e,t,i){var n=this;return this.spinnerService.remove(),new Promise((function(s,o){n.callApi(S+C+"/getTempSavedTaskSize/"+e+"/"+t+"/"+i,"get",null,null).subscribe((function(e){s(e)}),(function(e){o(e)}))}))},e.prototype.getTempSavedTasks=function(e,t,i,n){var s=this;return new Promise((function(o,r){s.callApi(S+C+"/getTempSavedTasks/"+e+"/"+t+"/"+i+"/"+(n||"now"),"get",null,null).subscribe((function(e){o(e)}),(function(e){r(e)}))}))},e.prototype.getTempSavedWorkSize=function(e,t){var i=this;return this.spinnerService.remove(),new Promise((function(n,s){i.callApi(S+C+"/getTempSavedWorkSize/"+e+"/"+t,"get",null,null).subscribe((function(e){n(e)}),(function(e){s(e)}))}))},e.prototype.getTempSavedWorks=function(e,t){var i=this;return new Promise((function(n,s){i.callApi(S+C+"/getTempSavedWorks/"+e+"/"+t,"get",null,null).subscribe((function(e){n(e)}),(function(e){s(e)}))}))},e.prototype.createComment=function(e,t){var i=this;return new Promise((function(n,s){i.callApi(S+C+"/createComment","post",null,{companyId:e,comment:t}).subscribe((function(e){n(e)}),(function(e){s(e)}))}))},e.prototype.setComment=function(e,t){var i=this;return new Promise((function(n,s){i.callApi(S+C+"/setComment","post",null,{companyId:e,comment:t}).subscribe((function(e){n(e)}),(function(e){s(e)}))}))},e.prototype.removeComment=function(e,t){var i=this;return new Promise((function(n,s){i.callApi(S+C+"/removeComment","post",null,{companyId:e,comment:t}).subscribe((function(e){n(e)}),(function(e){s(e)}))}))},e.prototype.getCommentReplies=function(e,t){var i=this;return new Promise((function(n,s){i.callApi(S+C+"/getCommentReplies/"+e+"/"+t,"get",null,null).subscribe((function(e){n(e)}),(function(e){s(e)}))}))},e.prototype.getCommentLastReply=function(e,t){var i=this;return new Promise((function(n,s){i.callApi(S+C+"/getCommentLastReply/"+e+"/"+t,"get",null,null).subscribe((function(e){n(e)}),(function(e){s(e)}))}))},e.prototype.getCompanyPositionUsers=function(e,t){var i=this;return new Promise((function(n,s){i.callApi(S+C+"/getCompanyPositionUsers/"+e+"/"+t,"get",null,null).subscribe((function(e){n(e)}),(function(e){s(e)}))}))},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:c.Http},{type:a.TranslateService},{type:y},{type:w}]},e}(),T=function(){function e(e,t,i,n){this.translate=e,this.apiService=t,this.publishService=i,this.toastService=n,this.currentUser=null}return e.prototype.storeLoginedUser=function(e){e&&e.id&&localStorage.setItem("loginedUser"+e.id,JSON.stringify(e))},e.prototype.removeLoginedUser=function(e){e&&e.id&&localStorage.removeItem("loginedUser"+e.id)},e.prototype.getLoginedUser=function(e){if(e){var t=localStorage.getItem("loginedUser"+e);return t?JSON.parse(t):null}},e.prototype.storeCurrentUserCredentials=function(e){e?(localStorage.setItem("currentUserCredentials",JSON.stringify(e)),console.log("currentUserCredentials = "+JSON.stringify(e)),this.currentUser=e.user,this.publishService.pubCurrentUserChange(this.currentUser)):(localStorage.removeItem("currentUserCredentials"),this.removeLoginedUser(this.currentUser),this.currentUser=null)},e.prototype.restoreCurrentUser=function(e){if(e){var t=localStorage.getItem("currentUserCredentials");if(t){var i=JSON.parse(t);if(i.user=e,localStorage.setItem("currentUserCredentials",JSON.stringify(i)),e.locale&&(this.translate.use(e.locale),e.locale!==this.currentUser.locale)){var n=this;jQuery.getJSON("../assets/i18n/${lang}.json",(function(t){n.translate.setTranslation(e.locale,t,!0)}))}this.currentUser=e,this.publishService.pubCurrentUserChange(this.currentUser)}}},e.prototype.clearCurrentUserCredentials=function(){this.storeCurrentUserCredentials(null)},e.prototype.reloadCurrentUser=function(){var e=localStorage.getItem("currentUserCredentials");this.currentUser=e?JSON.parse(e).user:null},e.prototype.getCurrentUser=function(){return this.currentUser||this.reloadCurrentUser(),this.currentUser},e.prototype.login=function(e){var t=this;return this.clearCurrentUserCredentials(),new Promise((function(i,n){t.apiService.login(e.username,e.password).then((function(n){if(n&&n.token){if(n.user&&(n.user.id=n.user.username,n.user.password=e.password,t.storeLoginedUser(n.user),n.user.locale)){t.translate.use(n.user.locale);var s=t;jQuery.getJSON("../assets/i18n/${lang}.json",(function(e){s.translate.setTranslation(n.user.locale,e,!0)}))}t.storeCurrentUserCredentials(n)}i(n)}),(function(e){n(e)}))}))},e.prototype.logout=function(){this.clearCurrentUserCredentials()},e.prototype.updateCurrentUser=function(e){var t=this;return new Promise((function(i,n){t.apiService.updateUser(e).then((function(n){t.restoreCurrentUser(e),i(e)}),(function(e){n(e)}))}))},e.prototype.getAuthToken=function(){var e=localStorage.getItem("currentUserCredentials");return"Bearer "+JSON.parse(e).token},e.prototype.switchCompany=function(e){var t=this;e&&this.currentUser?this.apiService.getCurrentUser(e).then((function(e){e&&!0===e.status&&e.result&&(e.result.password=t.currentUser.password,t.restoreCurrentUser(e.result),t.toastService.add("info",t.translate.instant("login.text.switch-company",{community:t.currentUser.company.name})))})):this.toastService.add("error",this.translate.instant("login.error.invalid-company-login"))},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:a.TranslateService},{type:U},{type:x},{type:y}]},e}(),D={lang:"ko",data:{"common.button.start":"시작","common.button.send":"전송","common.button.copy":"복사","common.button.share":"공유","common.button.notice":"상단메세지","common.button.reply":"댓글","common.button.login":"로그인","common.button.join":"회원가입","common.button.cancel":"취소","common.button.create":"생성하기","common.button.done":"완료","common.button.next":"다음","common.button.prev":"이전","common.button.add":"추가","common.button.delete":"삭제","common.button.edit":"수정","common.button.editing":"편집","common.button.exit":"종료","common.button.save":"저장","common.button.undo":"실행취소","common.button.redo":"다시실행","common.button.reset":"초기화","common.button.set":"설정","common.button.delete-selected":"선택삭제","common.button.delete-user":"사용자 삭제","common.button.delete-member":"구성원 삭제","common.button.delete-guest":"게스트 삭제","common.button.save-changes":"변경내용 저장","common.button.update":"수정","common.button.logout":"로그아웃","common.button.confirm":"확인","common.button.add-department":"부서추가","common.button.delete-department":"부서 삭제","common.button.add-position":"직급추가","common.button.download":"내려받기","common.button.download-all":"전체받기","common.button.upload":"올리기","common.button.skip":"건너뛰기","common.button.move":"이동","common.button.archive":"보관","common.button.restore":"복원","common.button.select":"선택","common.button.select-done":"선택완료","common.button.cancel-select":"선택해제","common.button.output":"출력","common.button.close":"닫기","common.button.minimize":"최소화","common.button.maximize":"최대화","common.button.normalize":"정상화","common.button.temp-save":"임시저장","common.button.copy-item":"불러오기","common.button.invite":"초대하기","common.button.save-organization":"조직도 저장","common.button.save-department":"부서 저장","common.title.file-upload":"파일 올리기","common.text.inform":"알림","common.text.name":"이름","common.text.email":"이메일","common.text.password":"비밀번호","common.text.password-confirm":"비밀번호 확인","common.text.contact":"연락처","common.text.department":"부서","common.text.position":"직급","common.text.group":"그룹","common.text.key":"키","common.text.value":"값","common.text.values":"값, 값","common.text.type":"종류","common.text.empty":"비어있음","common.text.none":"없음","common.text.file-name":"파일명","common.text.file-size":"용량","common.text.preview":"미리보기","common.text.total-users":"명","common.text.temp-password":"임시 비밀번호","common.text.all":"전체","common.text.korean":"한국어","common.text.english":"영어","common.text.help":"도움말 페이지","common.text.max":"최대","common.text.objects":"사물, 사물","common.text.input-name":"이름을 입력하세요","common.text.toggle-on":"ON","common.text.toggle-off":"OFF","common.text.user":"사용자","common.text.member":"구성원","common.text.participant":"참여자","common.text.guest":"게스트","common.text.me":"나","common.text.a-file":"1개의 파일","common.text.n-files":"{{count}}개의 파일","common.text.files":"개","common.text.created-date":"생성일자","common.text.guest-count":"게스트 {{count}}명","common.text.my-self":"나 자신","common.text.my-favorites":"즐겨찾기","common.text.search":"검색","common.text.no":"번호","common.text.status":"상태","common.text.subject":"제목","common.text.content":"내용","common.text.attachments":"첨부파일","common.text.creation-user":"생성자","common.text.creation-date":"생성일시","common.text.modification-user":"수정자","common.text.modification-date":"수정일시","common.text.date":"일시","common.text.no-subject":"제목없음","common.text.general":"일반","common.text.author":"작성자","common.text.keyword":"키워드","common.error.http-communication":"서버와 데이터를 주고 받는 중에 통신오류가 발생했습니다 [에러코드: {{code}}]","common.error.server-response":"서버와 데이터를 주고 받는 중에 서버에서 오류가 발생했습니다 [에러메시지: {{message}}]","common.error.invalid-email-id":"입력하신 이메일이 아이디가 이메일 형식에 맞지않습니다.","common.error.listed-email-id":"이미 목록에 포함된 아이디를 입력하였습니다.","common.error.duplicated-email-id":"이미 가입된 이메일 아이디를 입력하였습니다.","common.error.open-select-list":"선택목록을 서버에서 가져오는 중에 오류가 발생하였습니다.","common.error.listed-work-id":"이미 목룍에 포함된 업무를 입력하였습니다.","common.error.listed-department-id":"이미 목룍에 포함된 부서를 입력하였습니다.","system.text.shutdown-title":"스마트웍스닷넷 서버중지 안내","system.text.shutdown-text":"서버가 재기동되면 자동 연결됩니다.","system.text.connection-out-title":"스마트웍스닷넷 연결 종료","system.text.connection-out-text":"서버와 연결되면 자동 진행됩니다.","search.text.global-search":"통합검색","search.text.user-department":"사용자명, 부서명 검색","search.text.byDepartment":"부서별","search.text.byPosition":"직급별","search.text.byUserName":"이름순","search.text.byJoinDate":"가입순","upload.text.screenshot":"스크린샷","upload.text.upload-status-uploading":"업로드중","upload.text.upload-status-done":"업로드 완료","upload.text.upload-status-error":"업로드 실패","upload.button.choose-file":"파일찾기","upload.error.file-upload-failed":"파일 업로드하는데 문제가 발생하여 정상적으로 처리가 되지 않았습니다.","upload.error.file-types-allowed":"{{fileName}}을(를) 업로드 할 수 없습니다. {{types}} 형식의 파일(들)만 가능 합니다.","upload.error.max-size-allowed":"{{fileName}} / {{fileSize}} 을(를) 업로드 할 수 없습니다. 파일의 최대 사이즈는 {{maxSize}} 입니다.","user.text.level-labeling":"라벨링 담당자","user.text.level-qa":"QA 담당자","user.text.level-admin":"관리자","user.text.level-user":"사용자","user.text.level-sysManager":"시스템관리자","user.text.level-guest":"외부사용자","user.text.level-null":"지정되지 않음","user.text.level-undefined":"지정되지 않음","user.text.join-date":"가입일자","user.text.user-level":"사용자 역할","user.text.user-locale":"사용자 언어","user.text.locale-ko":"한국어","user.text.locale-en":"영어","user.text.timezone":"기준시간대","user.text.profile-info":"프로필 정보","user.text.status":"상태정보","user.text.status-none":"상태없음","user.text.status-undefined":"샹태없음","user.text.status-null":"상태없음","user.text.status-vacation":"휴가","user.text.status-externalWork":"외근","user.text.status-businessTrip":"출장","user.text.status-doNotInterrupt":"방해금지","user.text.status-meeting":"회의중","user.text.status-text":"상태메세지","user.text.specify-department":"부서지정","user.text.set-user":"사용자 설정","user.text.input-status-text":"알림말을 입력하세요.","user.text.resend-invite-mail":"초대메일 재전송","user.text.cancel-invitation":"초대 취소","user.text.no-status-text":"알림말이 없습니다.","user.text.successfully-remove-user":"{{name}}님이 삭제되었습니다.","user.error.password-confirm":"비밀번호와 비밀번호 확인이 같지 않습니다.","user.error.status-text-overflow":"상태메시지는 최대 50자만 저장됩니다.","department.text.name":"부서명","department.text.parent-department":"상위부서","department.text.no-members":"부서구성원이 없습니다.","department.text.new-members":"추가된 구성원","department.text.existing-members":"기존 구성원","department.text.add-members":"구성원 추가","department.text.depatment-saved":"변경된 부서정보가 저장되었습니다.","department.text.depatments-saved":"변경된 조직도와 부서정보가 저장되었습니다.","department.text.not-new-member":"{{name}}님은 부서의 기존 구성원입니다.","department.confirm.delete-item":"선택한 부서 항목을 삭제하겠습니까?","department.error.name-field-required":"부서이름을 입력해주세요.","welcome.text.get-started":"Get Started","login.text.product-name":"스마트웍스닷넷","login.text.forgot-password":"비밀번호가 기억나지 않습니까 ?","login.text.enter-email":"이메일을 입력해주세요.","login.text.sent-temp-password":"임시 비밀번호 발급","login.text.get-temp-password":"아래 이메일 주소로 임시 비밀번호를 발송하였습니다.다음으로 이동하여 비밀번호를 재설정 해주세요.","login.text.password-reset":"비밀번호 재설정","login.text.enter-new-password":"임시 비밀번호를 입력하고 새로운 비밀번호를 입력해주세요.","login.text.keep-login-state":"로그인상태유지","login.text.remember-email":"이메일 기억하기","login.text.didnt-receive-email":"임시 비밀번호를 받지 못하셨나요?","login.text.successfully-temp-password-requested":"임시 비밀번호 메일을 발송했습니다.","login.text.switch-company":"{{community}} 커뮤니티로 입장하였습니다.","login.error.email-is-required":"이메일을 입력해주세요.","login.error.invalid-email-format":"이메일 형식의 주소를 입력해주세요.","login.error.password-is-required":"비밀번호를 입력해주세요.","login.error.invalid-password-format":"8~20자 영문 대 소문자, 숫자,특수문자 혼용가능","login.error.temp-password-is-required":"임시 비밀번호를 입력해주세요.","login.error.invalid-temp-password-format":"임시 비밀번호는 11자 영문 대 소문자, 숫자 혼용 입니다.","login.error.not-registered-userid":"등록되지 않은 이메일 입니다. 다시 확인하시고 입력해주세요.","login.error.wrong-password":"비밀번호가 잘못 되었습니다. 다시 확인하시고 입력해주세요.","login.error.email-temp-password":"임시 비밀번호 메일 전송에 실패하였습니다. 관리자에게 확인헤주세요.","login.error.invalid-temp-password":"임시 비밀번호가잘못 입력 되었습니다.다시 확인하고 입력해주세요.","login.error.invalid-company-login":"커뮤니티가 없거나 로그인 상태가 아닙니다.","join.text.join-member":"회원가입하기","join.text.input-member-info":"회원정보 입력","join.text.welcome-join":"스마트웍스닷넷에 오신것을 환영합니다.","join.text.join-desc":"회원정보는 가입완료 후 설정에서 수정 가능합니다.","join.text.email-auth":"이메일 인증하기","join.text.sent-email-auth":"인증메일을 발송했습니다.","join.text.sent-email-auth-desc":"아래 이메일 주소에서 인증번호를 확인해주세요.","join.text.create-community":"커뮤니티 생성","join.text.creating-community":"커뮤니티를 생성합니다.","join.text.create-community-desc":"회사 또는 팀명을 입력하세요.","join.text.department-position":"부서 및 직급","join.text.input-department-position":"부서, 직급을 입력합니다.","join.text.department-position-desc":"부서, 직급을 바로 입력하거나, 조직도를 생성한 후에 선택할 수 있습니다.이 단계는 넘어갈 수 있습니다.","join.text.join-department-position-desc":"추가적으로 부서, 직급을 입력하거나, 이 단계는 넘어갈 수 있습니다.","join.text.community-name":"커뮤니티명","join.text.goto-login":"로그인하기","join.text.resend-request":"재전송하기","join.text.didnt-receive-email":"이메일을 받지 못하셨나요? ","join.text.after-create-organization":"조직도를 생성","join.text.select-after-create-organization":"하신 후에 선택하시겠습니까?","join.text.successfully-auth-requested":"인증메일을 전송 하였습니다. 인증번호를 확인해주세요","join.text.join-succeed":"축하합니다!!! 스마트웍스닷넷에 가입하셨습니다.","join.text.join-to-company":'초대받은 <span style="font-size: 24px; color: #3481cf; font-weight: bold">{{name}}</span>에 가입합니다.',"join.text.welcome-joiner":'환영합니다. <span style="font-size: 24px; color: #3481cf; font-weight: bold">{{name}}</span>님!',"join.text.joined-a-company":'<span style="font-size: 24px; color: #3481cf; font-weight: bold">{{name}}</span>에 가입되었습니다.',"join.text.create-organization":"조직도 생성","join.text.create-organization-desc":"부서, 직급을 추가한 후, 선택하여 등록합니다.","join.text.set-community":"커뮤니티 정보","join.text.setting-community":"커뮤니티 정보를 입력합니다.","join.text.set-community-desc":"지금 바로 입력하거나 커뮤니티를 생성한 후에 설정에서 변경할 수 있습니다.이 단계는 넘어갈 수 있습니다.","join.text.successfully-join-community":"환영합니다. 스마트웍스닷넷 {{community}} 커뮤니티에 가입되었습니다.","join.error.name-is-required":"이름을 입력해주세요.","join.error.email-is-required":"이메일을 입력해주세요.","join.error.already-joined-email":"이미 가입된 이메일 입니다.","join.error.community-field-required":"커뮤니티명을 입력해주세요.","join.error.invalid-email-id":"입력하신 이메일이 아이디가 이메일 형식에 맞지 않습니다.","join.error.invalid-auth-key":"이메일 인증번호가 유효하지 않거나 잘못입력하였습니다.","join.error.join-to-company":"이메일 인증번호가 잘못되었거나 커뮤니티 가입이 유효하지 않습니다.","join.error.already-joined-company":"이미 커뮤니티에 가입되어 있는 이메일 입니다.","join.error.department-tree-required":"부서들이 없습니다. 부서를 추가해주세요.","join.error.position-list-required":"직급들이 없습니다. 직급을 추가해주세요.","join.error.department-selection-required":"선택된 부서가 없습니다. 부서를 선택해주세요","join.error.position-selection-required":"선택된 직급이 없습니다. 직급을 선택해주세요","join.error.request-email-auth-key":"인증메일 요청을 실패하였습니다. 네트워크상태를 확인해주세요.","layout.text.home":"홈","layout.text.users":"사용자","layout.text.settings":"설정","users.text.user-management":"사용자 관리","users.text.invite-users":"사용자 초대","users.text.invite-members":"구성원 초대","users.text.invite-new-users":"새로운 사용자 초대","users.text.invite-url":"초대링크 URL","users.text.invite-email":"초대메일 전송","users.text.copy-to-clipboard":"사용자 초대링크가 클립보드에 복사되었습니다.","users.text.successfully-join-requested":"커뮤니티 가입 초대메일을 전송하였습니다.","users.text.successfully-remove-users":"선택한 사용자들을 삭제하였습니다.","users.text.successfully-set-user":"사용자 정보가 변경 되었습니다.","users.button.link-to-clipboard":"링크 복사하기","users.button.email-invite":"이메일 전송하기","settings.text.my-information":"내 정보","settings.text.setting-profile":"프로파일 설정","settings.text.setting-alarm":"알림 설정","settings.text.user-management":"사용자관리","settings.text.invite-users":"사용자 초대","settings.text.invite-member":"구성원 초대","settings.text.invite-guests":"게스트 초대","settings.text.admin-menus":"관리자 메뉴","settings.text.usage":"사용량","settings.text.organization":"조직 설정","settings.text.guest":"게스트 관리","setttins.text.change-image":"이미지 변경","setttins.text.default-image":"기본 이미지","settings.text.profile-update-succeed":"프로파일 설정이 변경 되었습니다.","position.text.positions-saved":"변경된 직급정보들이 저장되었습니다.","position.confirm.delete-item":"선택한 직급 항목을 삭제하겠습니까?","position.error.name-required":"직급이름을 입력해주세요.","position.error.empty-name":"직급이름을 입력하지 않아 편집한 항목이 자동으로 삭제되었습니다.","community.text.joined-community-list":"{{user}}님이 참여중인 커뮤니티 목록입니다.","community.text.search-list":"커뮤니티명, 참여자 검색","community.text.manager-community-only":"내가 관리자인 커뮤니티만 보기","community.text.order-by-recent":"최신순","community.text.order-by-created":"생성순","community.text.new-community":"새로운 커뮤니티","community.text.domain-name":"도메인명","community.text.manager":"관리자","community.text.organization-setting":"조직설정","community.text.do-it-now":"지금 설정","community.text.do-it-later":"나중에 하기","community.text.input-community-name":"커뮤니티명을 입력하세요","community.text.input-domain-id":"도메인명을 입력하세요","community.text.successfully-create-community":"{{community}} 커뮤니티가 성공적으로 생성되었습니다.","community.text.successfully-set-community":"{{community}} 커뮤니티가 성공적으로 수정되었습니다.","community.text.successfully-remove-community":"{{community}} 커뮤니티가 정상적으로 삭제되었습니다.","community.text.copy-domain-to-clipboard":"커뮤니티 도메인 링크가 클립보드에 복사되었습니다.","community.text.searched-in-company":"커뮤니티명에 검색어가 포함","community.text.searched-in-members":"참여자명에 검색어가 포함","community.text.successfully-resend-invite":"{{name}}님에게 커뮤니티 가입 초대메일을 재전송하였습니다.","community.text.successfully-cancel-invitation":"{{name}}님의 가입 초대를 취소하였습니다.","community.text.successfully-user-out":"{{name}}님을 내보내기 하였습니다.","community.text.successfully-user-as-leader":"{{name}}님을 관리자로 지정하였습니다.","community.button.create":"커뮤니티 생성","community.button.remove-community":"커뮤니티 삭제","community.button.set-user-out":"내보내기","community.button.set-user-as-manager":"관리자 지정하기","community.error.invalid-domain-id":"입력하신 도메인명이 형식에 맞지않습니다.(영문/_/$ 시작,영문/숫자/_/$ 포함)","community.error.duplicated-domain-id":"이미 사용중인 도메인명을 입력하였습니다","window.text.work":"업무","window.text.chat":"대화","window.text.temp-saved":"임시저장","window.text.open-all":"모두열기","window.text.close-all":"모두닫기","window.text.overflow-max-list":"새창이 총20개가 초과되어 오래된 새창을 닫았습니다.","window.button.open-new-window":"새 브라우저에서 보기","notification.text.browser-not-support":"[푸시알림] 브라우저가 데스크탑 푸시알림을 지원하지 않습니다!!!","notification.text.permission-requested":"[푸시알림] 푸시알림 허용을 요청하였습니다!!!!","notification.text.notification-granted":"[푸시알림] 푸시알림이 허용 되었습니다!!!!","notification.text.permission-rejected":"[푸시알림] 푸시알림 허용을 거부하였습니다!!!!","notification.text.settings-denied":"[푸시알림] 푸시알림이 설정에 의해 허용되지 않습니다!!!!","confirm.text.remove-selected-users":"선택한 사용자(들)을 삭제 하겠습니까?","confirm.text.remove-selected-user":"선택한 사용자를 삭제 하겠습니까?","confirm.text.remove-selected-guests":"선택한 게스트(들)을 삭제 하겠습니까?","confirm.text.remove-selected-guest":"선택한 게스트를 삭제 하겠습니까?","confirm.text.position-changed":"직급설정이 변경되었습니다. 변경된 내용을 버리고 부서설정으로 이동하겠습니까?","confirm.text.organization-changed":"부서 조직도가 변경되었습니다. 변경된 내용을 버리고 직급설정으로 이동하겠습니까?","confirm.text.department-changed":"부서내용이 변경되었습니다. 변경된 내용을 버리고 직급설정으로 이동하겠습니까?","confirm.text.remove-community":"커뮤니티를 삭제하면 관련된 모든내용들이 지워집니다.그래 삭제하시겠습니까?","confirm.text.close-all-windows":"모든 새창을 닫으시겠습니까 ?","confirm.text.discard-all-editeds":"편집중인 내용들이 모두 삭제되니 해당 새창에서 완료 또는 임시저장을 선택해주세요."}},P={lang:"en",data:{"common.button.start":"Start","common.button.send":"Send","common.button.copy":"Copy","common.button.share":"Share","common.button.notice":"Notice","common.button.reply":"Reply","common.button.login":"Login","common.button.join":"Join","common.button.cancel":"Cancel","common.button.create":"Create","common.button.done":"Done","common.button.next":"Next","common.button.prev":"Prev","common.button.add":"Add","common.button.delete":"Delete","common.button.edit":"Edit","common.button.editing":"Edit","common.button.exit":"Exit","common.button.save":"Save","common.button.undo":"Undo","common.button.redo":"Redo","common.button.reset":"Reset","common.button.set":"Set","common.button.delete-selected":"Delete Selected","common.button.delete-user":"Delete User","common.button.delete-member":"Delete Member","common.button.delete-guest":"Delete Guest","common.button.save-changes":"Save Changes","common.button.update":"Update","common.button.logout":"Logout","common.button.confirm":"Confirm","common.button.add-department":"Add Department","common.button.delete-department":"Delete Department","common.button.add-position":"Add Position","common.button.download":"Download","common.button.download-all":"Download All","common.button.upload":"Upload","common.button.skip":"Skip","common.button.move":"Move","common.button.archive":"Archive","common.button.restore":"Restore","common.button.select":"Select","common.button.select-done":"Select Done","common.button.cancel-select":"Cancel Select","common.button.output":"Output","common.button.close":"Close","common.button.minimize":"Minimize","common.button.maximize":"Maximize","common.button.normalize":"Normalize","common.button.temp-save":"Temp. Save","common.button.copy-item":"Copy Item","common.button.invite":"Invite","common.button.save-organization":"Save Organization","common.button.save-department":"Save Department","common.title.file-upload":"Upload Files","common.text.inform":"Information","common.text.name":"Name","common.text.email":"Email","common.text.password":"Password","common.text.password-confirm":"Password Confirm","common.text.contact":"Contact","common.text.department":"Department","common.text.position":"Position","common.text.group":"Group","common.text.key":"Key","common.text.value":"Value","common.text.values":"Value, Value","common.text.type":"Type","common.text.empty":"Empty","common.text.none":"None","common.text.file-name":"File Name","common.text.file-size":"Size","common.text.preview":"Preview","common.text.total-users":" Users","common.text.temp-password":"Temporary Password","common.text.all":"All","common.text.korean":"Korean","common.text.english":"English","common.text.help":"Help Page","common.text.max":"Max","common.text.objects":"Object, Object","common.text.input-name":"Input name","common.text.toggle-on":"ON","common.text.toggle-off":"OFF","common.text.user":"User","common.text.member":"Member","common.text.participant":"Participant","common.text.guest":"Guest","common.text.me":"Me","common.text.a-file":"1 file","common.text.n-files":"{{count}} files","common.text.files":" files","common.text.created-date":"Created Date","common.text.guest-count":"{{count}} guests","common.text.my-self":"Myself","common.text.my-favorites":"My Favorites","common.text.search":"Search","common.text.no":"No","common.text.status":"Status","common.text.subject":"Subject","common.text.content":"Content","common.text.attachments":"Attachments","common.text.creation-user":"Creation User","common.text.creation-date":"Created Date","common.text.modification-user":"Modified User","common.text.modification-date":"Modified Date","common.text.date":"Date","common.text.no-subject":"No Subject","common.text.general":"General","common.text.author":"Author","common.text.keyword":"Keyword","system.text.shutdown-title":"Smartworks.net Server Shutdown","system.text.shutdown-text":"Automaticall reconneted when started up!","common.error.http-communication":"Error has occured while http communicating with the server [status: {{code}}]","common.error.server-response":"Server has returned error while http communicating [message: {{message}}]","common.error.invalid-email-id":"The Email Id you have inputed is not valid email format.","common.error.listed-email-id":"You have inputed the email id which is already listed in.","common.error.duplicated-email-id":"You have inputed the email id which already joined.","common.error.open-select-list":"Error has occured while getting the select list from server","common.error.listed-work-id":"You have inputed the work id which is already listed in.","common.error.listed-department-id":"You have inputed the department id which is already listed in.","search.text.global-search":"Global search","search.text.user-department":"Search user, department","search.text.byDepartment":"By department","search.text.byPosition":"By position","search.text.byUserName":"By user name","search.text.byJoinDate":"By join date","upload.text.screenshot":"Screen-Shot","upload.text.upload-status-uploading":"Uploading","upload.text.upload-status-done":"Uploaded","upload.text.upload-status-error":"Upload Failed","upload.button.choose-file":"Find","upload.error.file-upload-failed":"File Upload has been failed with some error while uploading file.","upload.error.file-types-allowed":"{{fileName}} is not allowed to upload. The allowed are only {{types}}.","upload.error.max-size-allowed":"{{fileName}} / {{fileSize}} is not allowed to upload. The max size of a file is {{maxSize}}.","user.text.level-labeling":"Labeling","user.text.level-qa":"QA","user.text.level-admin":"Admin","user.text.level-user":"User","user.text.level-sysManager":"System Manager","user.text.level-guest":"Guest","user.text.level-null":"Not Defined","user.text.level-undefined":"Not Defined","user.text.join-date":"Joined Date","user.text.user-level":"User's Role'","user.text.user-locale":"User Locale","user.text.locale-ko":"Korean","user.text.locale-en":"English","user.text.timezone":"Timezone","user.text.profile-info":"User Profile","user.text.status":"User Status","user.text.status-none":"None","user.text.status-undefined":"None","user.text.status-null":"None","user.text.status-vacation":"On Vacation","user.text.status-externalWork":"On External Work","user.text.status-businessTrip":"On Business Trip","user.text.status-doNotInterrupt":"Do not interrupt","user.text.status-meeting":"On Meeting","user.text.status-text":"Status Text","user.text.specify-department":"Specify Department","user.text.set-user":"Set User","user.text.input-status-text":"Input status text.","user.text.resend-invite-mail":"Resend invite mail","user.text.cancel-invitation":"Cancel invitation","user.text.no-status-text":"No status text exists.","user.text.successfully-remove-user":"{{name}} user has been removed successfully.","user.error.password-confirm":"Password and password confirm are differnt","user.error.status-text-overflow":"Max 50 characters of status text would be saved.","department.text.name":"Department Name","department.text.parent-department":"Parent Department","department.text.no-members":"No members in department.","department.text.new-members":"Added Members","department.text.existing-members":"Existing Members","department.text.add-members":"Add Members","department.text.depatment-saved":"Ths changed department information has been saved.","department.text.depatments-saved":"The changed deaprtment tree and information has been saved","department.text.not-new-member":"{{name}} user is already existing in this department.","department.confirm.delete-item":"Do you want to delete the selected Department?","department.error.name-field-required":"Please input department name.","welcome.text.get-started":"Get Started","login.text.product-name":"SMARTWORKS.NET","login.text.forgot-password":"Forgot password ?","login.text.enter-email":"Please enter email.","login.text.sent-temp-password":"Sent Temporary Password","login.text.get-temp-password":"Temporary password has been sent to your email. Go Next for reset password.","login.text.password-reset":"Password Reset","login.text.enter-new-password":"Please enter temporary password and new password.","login.text.keep-login-state":"Keep login state","login.text.remember-email":"Remember email","login.text.didnt-receive-email":"Did not receive the temporary password email?","login.text.successfully-temp-password-requested":"Temporary password email has been sent.","login.text.switch-company":"You have been entered into the Community {{community}}.","login.error.email-is-required":"Please enter email address.","login.error.invalid-email-format":"Please enter email format address.","login.error.password-is-required":"Please enter password.","login.error.invalid-password-format":"Password could be 8~20 length combined with alpha-numeric and special chractrers.","login.error.temp-password-is-required":"Please enter temporary password","login.error.invalid-temp-password-format":"Temporary password be 11 length combined with alpha-numeric characters","login.error.not-registered-userid":"You have entered not-registered email. Please enter registered email address.","login.error.wrong-password":"You have entered wrong password. Please enter valid password","login.error.email-temp-password":"Failed to email the temporary password. Please contact system administrator.","login.error.invalid-temp-password":"The Temporary password you have entered is wrong. Please enter valid password","login.error.invalid-company-login":"Invalid community id or not logined error.","join.text.join-member":"Join member","join.text.input-member-info":"Member Information Step","join.text.welcome-join":"Welcome to SMARTWORKS.NET!","join.text.join-desc":"Member information could be modified in settings after joining.","join.text.email-auth":"Email Authentiation","join.text.sent-email-auth":"Authentiation email has been sent.","join.text.sent-email-auth-desc":"Please get the authentication key at the below email address.","join.text.create-community":"Community Creation Step","join.text.creating-community":"Now creating community.","join.text.create-community-desc":"Please input Company name or Team name.","join.text.department-position":"Department and Position","join.text.input-department-position":"Department, Position Step.","join.text.department-position-desc":"You can input department, position or select after creating the organization.\nThis step could be skipped.","join.text.join-department-position-desc":"You can input department, position. This step could skipp.","join.text.community-name":"Community Name","join.text.goto-login":"Goto Login","join.text.resend-request":"Resend Email","join.text.didnt-receive-email":"Did not receive the authentication email?","join.text.after-create-organization":"After creating the Organization,","join.text.select-after-create-organization":" do you want select ?","join.text.successfully-auth-requested":"Authentication email has been sent. Please get the authentication key.","join.text.join-succeed":"CONGRATURATIONS!!! Succeed to join SMARTWORKS.NET.","join.text.join-to-company":'Joining to invited <span style="font-size: 24px; color: #3481cf; font-weight: bold">{{name}}</span> community.',"join.text.welcome-joiner":'Welcome. <span style="font-size: 24px; color: #3481cf; font-weight: bold">{{name}}</span> !',"join.text.joined-a-company":'You are joined to <span style="font-size: 24px; color: #3481cf; font-weight: bold">{{name}}</span> !',"join.text.create-organization":"Create Organization","join.text.create-organization-desc":"After adding departments and positions, register the selections.","join.text.set-community":"Community Information","join.text.setting-community":"Input Community Information","join.text.set-community-desc":"You can input now or change the settings after creating this community.This step could be skipped.","join.text.successfully-join-community":"Welcom, you have successfully joined to the {{community}} community in SMARTWORKS.NET.","join.error.name-is-required":"Please enter name.","join.error.email-is-required":"Please enter email address.","join.error.already-joined-email":"Already joined eamil id.","join.error.community-field-required":"Please enter community name.","join.error.invalid-email-id":"The Email Id you have inputed is not valid email format.","join.error.invalid-auth-key":"Auth Key is not valid or wrong number","join.error.join-to-company":"Auth Key is wrong or Joining Community is nor valid","join.error.already-joined-company":"The email has been joined to this community already.","join.error.department-tree-required":"No departments. Please add departments.","join.error.position-list-required":"No positions. Please add positions.","join.error.department-selection-required":"No selected department. Please select a department.","join.error.position-selection-required":"No selected position. Please select a position","join.error.request-email-auth-key":"Failed to sent Authentication email. Please check the networks status.","layout.text.home":"Home","layout.text.users":"Users","layout.text.settings":"Settings","users.text.user-management":"User Management","users.text.invite-users":"Invite Users","users.text.invite-members":"Invite Members","users.text.invite-new-users":"Invite new Users","users.text.invite-url":"Invite Link URL","users.text.invite-email":"Invite Email","users.text.copy-to-clipboard":"Invite Link URL has been copied to the CLIPBOARD.","users.text.successfully-join-requested":"Community Joining Invitation has been sent.","users.text.successfully-remove-users":"Selected Users have been removed","users.text.successfully-set-user":"User inforamtion has been updated.","users.button.link-to-clipboard":"Copy Link to Clipboard","users.button.email-invite":"Send Invite Email","settings.text.my-information":"My Information","settings.text.setting-profile":"Profile Setting","settings.text.setting-alarm":"Alarm Setting","settings.text.user-management":"User Management","settings.text.invite-users":"Invite Users","settings.text.invite-member":"Invite Members","settings.text.invite-guests":"Invite Guests","settings.text.admin-menus":"Admin. Menus","settings.text.usage":"Usages","settings.text.organization":"Organization Setting","settings.text.guest":"Guest Management","setttins.text.change-image":"Change Image","setttins.text.default-image":"Use Default","settings.text.profile-update-succeed":"User Profile has been changed.","position.text.positions-saved":"The changed position informations have been saved","position.confirm.delete-item":"Do you want to delete the selected Position?","position.error.name-required":"Please input the Position name.","position.error.empty-name":"The edited position has been removed automatically because of empty name.","community.text.joined-community-list":"Your, {{user}}, joined community list","community.text.search-list":"Search community name, member","community.text.manager-community-only":"communities only leaded by me","community.text.order-by-recent":"By recent used","community.text.order-by-created":"By created time","community.text.new-community":"New Community","community.text.domain-name":"Domain Name","community.text.manager":"Manager","community.text.organization-setting":"Organization Setting","community.text.do-it-now":"Setting Now","community.text.do-it-later":"Setting Later","community.text.input-community-name":"Please enter community name","community.text.input-domain-id":"Please enter domain id","community.text.successfully-create-community":"Community {{community}} has been created successfully.","community.text.successfully-set-community":"Community {{community}} has been modified successfully","community.text.successfully-remove-community":"Community {{community}} has been removed successfully.","community.text.copy-domain-to-clipboard":"Community Domain Link URL has been copied to the CLIPBOARD","community.text.searched-in-company":"Community name contains search key","community.text.searched-in-members":"Members contains search key","community.text.successfully-resend-invite":"Invitation mail for {{name}} user to join community has been resent.","community.text.successfully-cancel-invitation":"Invatation for {{name}} user to join community has been canceled.","community.text.successfully-user-out":"{{name}} user has been pushed out.","community.text.successfully-user-as-manager":"{{name}} user has been set as manager.","community.button.create":"Create Community","community.button.remove-community":"Remove Community","community.button.set-user-out":"Push Out","community.button.set-user-as-leader":"Set As Manager","community.error.invalid-domain-id":"The Domain Id you have inputed is not valid format.(Start Alpha/_/$,Contain Alpha/Number/_/$)","community.error.duplicated-domain-id":"You have inputed the domain id which already used.","window.text.work":"Work","window.text.chat":"Chat","window.text.temp-saved":"Temp Saved","window.text.open-all":"Open All","window.text.close-all":"Close All","window.text.overflow-max-list":"The oldest window has been closed because of 20 windows limitation.","window.button.open-new-window":"Open with new browser","notification.text.browser-not-support":"[Notification] This browser does not support desktop notification !!!","notification.text.permission-requested":"[Notification] push notification permission requested !!!!","notification.text.notification-granted":"[Notification] push notification granted !!!!","notification.text.permission-rejected":"[Notification] push notification permission rejected !!!!","notification.text.settings-denied":"[Notification] push notification denied by settings !!!!","confirm.text.remove-selected-users":"Do you want to remove the selected User(s) ?","confirm.text.remove-selected-user":"Do you want to remove the selected User ?","confirm.text.remove-selected-guests":"Do you want to remove the selected Guest(s) ?","confirm.text.remove-selected-guest":"Do you want to remove the selected Guest ?","confirm.text.position-changed":"Do you want to move to the Department setting without save the Postion setting ?","confirm.text.organization-changed":"Do you want to move to the Position Setting without save the Organization changes ?","confirm.text.department-changed":"Do you want to move to the Position Setting without save the Department changes ?","confirm.text.remove-community":"Do really want to remove the community even though all the related data would be removed ?","confirm.text.close-all-windows":"Do you want close all the windows ?","confirm.text.discard-all-editeds":"Please complete or temp save the editing windows."}},O=function(){function e(e,t){this.translate=e,this.authService=t,this.extend=function(e,t){for(var i=0,n=t;i<n.length;i++){var s=n[i];e[s]=t[s]}},this.extendClass=function(e,t){for(var i=0,n=e;i<n.length;i++){var s=n[i];t.hasProperty(s)&&(e[s]=t[s])}}}return e.prototype.setSwLibTranslations=function(){var e=this;[D,P].forEach((function(t){e.translate.setTranslation(t.lang,t.data,!0)}))},e.prototype.getColorCodes=function(){return["#ffffff","#f6d871","#e97661","#bbdc7d","#74d1dc","#3481cf","#b39af5"]},e.prototype.getNoteColorCodes=function(){var e=this.getColorCodes();return e.shift(),e},e.prototype.generateAppId=function(){return this.randomUUID("app")},e.prototype.generateCommentId=function(){return this.randomUUID("cmt_")},e.prototype.newCompanyId=function(){return this.randomUUID("comp_")},e.prototype.newDepartmentId=function(){return this.randomUUID("dept_")},e.prototype.newPositionId=function(){return this.randomUUID("pos_")},e.prototype.generateId=function(e){return(e||"")+(new Date).getTime().toString(16)},e.prototype.isCommentId=function(e){return!!e&&e.startsWith("cmt")},e.prototype.randomUUID=function(e){for(var t=[],i=0;i<36;i++)t[i]=Math.floor(16*Math.random());t[14]=4,t[19]=3&t[19]|8;for(i=0;i<36;i++)t[i]="0123456789abcdef"[t[i]];return t[8]=t[13]=t[18]=t[23],e+t.join("")},e.prototype.getByteLength=function(e){for(var t=e.length,i=e.length-1;i>=0;i--){var n=e.charCodeAt(i);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2),n>=56320&&n<=57343&&i--}return t},e.prototype.substrBytes=function(e,t,i){for(var n,s=0,o=0,r="",a=0;0<e.length;a++){s=o++,n=e.charCodeAt(a);do{n>>=8,o++}while(n);if(o>t+i)return r;s>=t&&(r+=e[a])}},e.prototype.getFileNameShort=function(e){if(!e)return"";var t=e.split("."),i="",n="";return t.length>1&&(n="."+t[t.length-1]),1===t.length?i=t[0]:(t.splice(t.length-1,1),i=t.join(".")),(i=i.normalize()).length<=20?e:i.substring(0,10)+"....."+i.substring(i.length-5)+n},e.prototype.getFileNameBrief=function(e){if(!e)return"";var t=e.split("."),i="",n="";return t.length>1&&(n="."+t[t.length-1]),1===t.length?i=t[0]:(t.splice(t.length-1,1),i=t.join(".")),(i=i.normalize()).length<=25?e:i.substring(0,15)+"....."+i.substring(i.length-5)+n},e.prototype.getExtention=function(e){if(!e)return this.translate.instant("common.text.empty");var t=e.lastIndexOf("."),i="none";return-1!==t&&(i=e.substring(t+1,e.length).toLowerCase()),i},e.prototype.getFileNameOnly=function(e){if(!e)return e;var t=e.lastIndexOf(".");return-1!==t?e.substring(0,t):e},e.prototype.getBytesWithUnit=function(e){if(!isNaN(e)){var t=Math.floor(Math.log(+e)/Math.log(2));t<1&&(t=0);var i=Math.floor(t/10);return(e=+e/Math.pow(2,10*i)).toString().length>e.toFixed(3).toString().length&&(e=e.toFixed(1)),e+[" bytes"," KB"," MB"," GB"," TB"," PB"," EB"," ZB"," YB"][i]}},e.prototype.isDocFile=function(e){var t=this.getExtention(e);if(!t)return!1;return["DOC","DOCX","XLS","XLSX","PPT","PPTX","PDF","PAGES","AI","PSD","TIFF","DXF","SVG","EPS","PS","TTF","XPS","RTF","ODT","SXW","SSV","SXC","ODS","SXI","ODP","WPD"].indexOf(t.toUpperCase())>-1},e.prototype.isImageFile=function(e){var t=this.getExtention(e);if(!t)return!1;return["BMP","RLE","JPG","JPEG","JPE","JFIF","GIF","PNG","PDD","PSD","TIF","RAW","AI","EPS","SVG","SVGZ","IFF","FPX","FRM","PCX","PCT","PIC","PXR","SCT","TGA","VDA","ICB","VST"].indexOf(t.toUpperCase())>-1},e.prototype.isVideoFile=function(e){var t=this.getExtention(e);if(!t)return!1;return["mp4","mp3","mdmov","moov","mov","movie"].indexOf(t.toLowerCase())>-1},e.prototype.mergeObjects=function(e,t){for(var i=0,n=t;i<n.length;i++){var s=n[i];e[s]=t[s]}return e},e.prototype.merge3Objects=function(e,t,i){return this.mergeObjects(e,this.mergeObjects(t,i))},e.prototype.isEmpty=function(e){return void 0===e||!e||0===e.length||/^\s*$/.test(e)||"null"===e},e.prototype.smartEncode=function(e){return null===e?e:e=(e=(e=(e=e.replace(/\"/g,"&quot;")).replace(/\'/g,"&squo;")).replace(/</g,"&lt;")).replace(/>/g,"&gt;")},e.prototype.smartDecode=function(e){return null===e?e:e=(e=(e=(e=e.replace(/&quot;/g,'"')).replace(/&squo;/g,"'")).replace(/&lt;/g,"<")).replace(/&gt;/g,">")},e.prototype.targetElement=function(e){var t=v||u;return void 0!==e.target?t(e.target):t(e.srcElement)},e.prototype.setAutoFocus=function(e,t){t=t||0,(v||u)(e).each((function(e,i){if(i.setSelectionRange)i.focus(),i.setSelectionRange(t,t);else if(i.createTextRange){var n=i.createTextRange();n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",t),n.select()}}))},e.prototype.contains=function(e,t,i,n){if(e.constructor==={}.constructor&&t.constructor==={}.constructor){var s=t.top,o=t.left,r=t.left+i,a=t.top+n;if(e.x>=o&&e.x<=r&&e.y>=s&&e.y<=a)return!0}return!1},e.prototype.isEmailId=function(e){return this.isUserId(e)},e.prototype.isUserId=function(e){var t=$('<input type="email">');$("body").append(t),t.val(e);var i=t[0].checkValidity();return t.remove(),i},e.prototype.isCompanyId=function(e){return!!e&&e.startsWith("comp")},e.prototype.isDepartmentId=function(e){return!!e&&e.startsWith("dept")},e.prototype.isPositionId=function(e){return!!e&&e.startsWith("pos")},e.prototype.isValidURL=function(e){return!!new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(e)},e.prototype.isValidDomainId=function(e){try{Function("var "+e)}catch(e){return!1}return!0},e.prototype.convertBase64ToBlob=function(e){for(var t=e.split(";base64,"),i=t[0].split(":")[1],n=window.atob(t[1]),s=new Uint8Array(n.length),o=0;o<n.length;++o)s[o]=n.charCodeAt(o);return new Blob([s],{type:i})},e.prototype.convertUrlToBase64=function(e,t){var i=new XMLHttpRequest;i.onload=function(){var e=new FileReader;e.onloadend=function(){t(e.result)},e.readAsDataURL(i.response)},i.open("GET",e),i.responseType="blob",i.send()},e.prototype.generatePasteImageName=function(e){return this.translate.instant("upload.text.screenshot")+"-"+(new Date).toJSON()+"."+e},e.prototype.trimLeadingZeros=function(e){return e?"string"!=typeof e?""+e:e.replace(/^0+/,""):e},e.prototype.padLeadingZeros=function(e,t){return(e+="").length>=t?e:new Array(t-e.length+1).join("0")+e},e.prototype.hasFocus=function(){return document.hasFocus()},e.prototype.getInitialChar=function(e){if(this.isEmpty(e))return null;if(!(e.charCodeAt(0)>255))return e.substring(0,1).toUpperCase();var t=e.charCodeAt(0)-44032;return t>-1&&t<11172?["ㄱ","ㄲ","ㄴ","ㄷ","ㄸ","ㄹ","ㅁ","ㅂ","ㅃ","ㅅ","ㅆ","ㅇ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"][Math.floor(t/588)]:null},e.prototype.isToday=function(e){var t=this.authService.getCurrentUser();if(e>0&&t){var i=new Date(e+(t.timezoneOffset?t.timezoneOffset:0)),n=new Date((new Date).getTime()-60*(new Date).getTimezoneOffset()*1e3+(t.timezoneOffset?t.timezoneOffset:0));return i.getUTCFullYear()===n.getUTCFullYear()&&i.getUTCMonth()===n.getUTCMonth()&&i.getUTCDate()===n.getUTCDate()}return!1},e.prototype.isSameDay=function(e,t){var i=this.authService.getCurrentUser();if(e>0&&t>0&&i){var n=new Date(e+(i.timezoneOffset?i.timezoneOffset:0)),s=new Date(t+(i.timezoneOffset?i.timezoneOffset:0));return n.getUTCFullYear()===s.getUTCFullYear()&&n.getUTCMonth()===s.getUTCMonth()&&n.getUTCDate()===s.getUTCDate()}return!1},e.prototype.toLocaleDateOnlyShortString=function(e){var t=this.authService.getCurrentUser();if(e>0&&t){var i=new Date((new Date).getTime()-60*(new Date).getTimezoneOffset()*1e3+(t.timezoneOffset?t.timezoneOffset:0)),n=new Date(e+(t.timezoneOffset?t.timezoneOffset:0)),s=n.getUTCFullYear(),o=(n.getUTCMonth(),n.getUTCDate(),"");if(s!==i.getUTCFullYear()){var r={weekday:"short",year:"numeric",month:"long",day:"numeric"};o=n.toLocaleDateString(t.locale,r)}else{r={weekday:"short",year:"numeric",month:"long",day:"numeric"};o=n.toLocaleDateString(t.locale,r)}return o.replace(/ /g,"")}return""},e.prototype.toDateTimeString=function(e){var t=this.authService.getCurrentUser();if(e>0&&t){var i=new Date(e+(t.timezoneOffset?t.timezoneOffset:0));return i.getUTCFullYear()+"."+this.padLeadingZeros(i.getUTCMonth()+1,2)+"."+this.padLeadingZeros(i.getUTCDate(),2)+" "+this.padLeadingZeros(i.getUTCHours(),2)+":"+this.padLeadingZeros(i.getUTCMinutes(),2)}return""},e.prototype.toDateTimeShortString=function(e){var t=this.authService.getCurrentUser();if(e>0&&t){var i=new Date((new Date).getTime()-60*(new Date).getTimezoneOffset()*1e3),n=new Date(e+(t.timezoneOffset?t.timezoneOffset:0)),s=n.getUTCFullYear(),o=n.getUTCMonth(),r=n.getUTCDate(),a=n.getUTCHours(),l=n.getUTCMinutes();return s!==i.getUTCFullYear()?s.toString().substr(-2)+"."+this.padLeadingZeros(o+1,2)+"."+this.padLeadingZeros(r,2):o===i.getUTCMonth()&&r===i.getUTCDate()?this.padLeadingZeros(a,2)+":"+this.padLeadingZeros(l,2):this.padLeadingZeros(o+1,2)+"."+this.padLeadingZeros(r,2)+" "+this.padLeadingZeros(a,2)+":"+this.padLeadingZeros(l,2)}return""},e.prototype.toDateTimeSimpleString=function(e){var t=this.authService.getCurrentUser();if(e>0&&t){var i=new Date((new Date).getTime()-60*(new Date).getTimezoneOffset()*1e3+(t.timezoneOffset?t.timezoneOffset:0)),n=new Date(e+(t.timezoneOffset?t.timezoneOffset:0)),s=n.getUTCFullYear(),o=n.getUTCMonth(),r=n.getUTCDate(),a=n.getUTCHours(),l=n.getUTCMinutes();return s!==i.getUTCFullYear()?s.toString().substr(-2)+"."+this.padLeadingZeros(o+1,2)+"."+this.padLeadingZeros(r,2):o===i.getUTCMonth()&&r===i.getUTCDate()?this.padLeadingZeros(a,2)+":"+this.padLeadingZeros(l,2):this.padLeadingZeros(o+1,2)+"."+this.padLeadingZeros(r,2)+" "+this.padLeadingZeros(a,2)+":"+this.padLeadingZeros(l,2)}return""},e.prototype.hexToRgb=function(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},e.prototype.isControlKeyPressed=function(e){return-1!==navigator.appVersion.indexOf("Mac")?e.metaKey:e.ctrlKey},e.prototype.isAltKeyPressed=function(e){return-1!==navigator.appVersion.indexOf("Mac")?e.shiftKey:e.altKey},e.prototype.getUserLevels=function(){return[{id:"user",name:this.translate.instant("user.text.level-user")},{id:"admin",name:this.translate.instant("user.text.level-admin")},{id:"sysManager",name:this.translate.instant("user.text.level-sysManager")},{id:"guest",name:this.translate.instant("user.text.level-guest")}]},e.prototype.getUserStatusById=function(e){for(var t=this.getUserStatuses(),i=0;i<t.length;i++)if(e===t[i].id)return t[i];return t[0]},e.prototype.getUserStatuses=function(){return[{id:"none",name:this.translate.instant("common.text.none"),colorCode:"#fff"},{id:"vacation",name:this.translate.instant("user.text.status-vacation"),colorCode:"#a0a0a0"},{id:"externalWork",name:this.translate.instant("user.text.status-externalWork"),colorCode:"#ffba00"},{id:"businessTrip",name:this.translate.instant("user.text.status-businessTrip"),colorCode:"#ffba00"},{id:"doNotInterrupt",name:this.translate.instant("user.text.status-doNotInterrupt"),colorCode:"#f46864"},{id:"meeting",name:this.translate.instant("user.text.status-meeting"),colorCode:"#f46864"}]},e.prototype.getSearchedNameTokens=function(e,t){if(!t||!e||""===t||""===e)return[t,"",""];var i,n=t,s="";t.includes("▶")&&(n=(i=t.split("▶"))[i.length-1],s=t.substring(0,t.length-n.length).replace(/▶/gi,'<span class="path-arrow">▶</span>'));if(1===(i=n.split(e)).length)return[s+n,"",""];var o=[s+i[0],e,i[1]];if(i.length>2)for(var r=2;r<i.length;r++)o[2]=o[2]+e+i[r];return o},e.prototype.getBubbleScrollTop=function(){return $(".popup-window .popup-content").is(":visible")?0:$("sw-settings .contents").is(":visible")?$("sw-settings .contents").scrollTop():$(".scroll-body").is(":visible")?$(".scroll-body").scrollTop():0},e.prototype.getElementText=function(e){var t="";if(3===e.nodeType||4===e.nodeType)t=e.nodeValue;else if(1===e.nodeType&&("img"==e.tagName.toLowerCase()||"area"==e.tagName.toLowerCase()||"input"==e.tagName.toLowerCase()&&e.getAttribute("type")&&"image"==e.getAttribute("type").toLowerCase()))t=e.getAttribute("alt")||"";else if(1===e.nodeType&&!e.tagName.match(/^(script|style)$/i))for(var i=e.childNodes,n=0,s=i.length;n<s;n++)t+=this.getElementText(i[n]);return t},e.prototype.getTextOnlyFromHtml=function(e){var t=document.createElement("span");t.innerHTML=e;var i=this.getElementText(t);return t.innerHTML=null,$(t).remove(),i},e.prototype.downloadFile=function(e,t){e&&e.stopPropagation(),window.location.href="/rest/downloadFile?fileId="+t.id+"&fileName="+encodeURIComponent(t.fileName)+"&groupId="+t.groupId},e.prototype.downloadAllFiles=function(e,t){e&&e.stopPropagation(),t&&1===t.length?window.location.href="/rest/downloadFile?fileId="+t[0].id+"&fileName="+encodeURIComponent(t[0].fileName)+"&groupId="+t[0].groupId:t&&t.length>1&&(window.location.href="/rest/downloadFile?groupId="+t[0].groupId)},e.prototype.spawnBrowserNotification=function(e,t,i){var n={body:t||"",icon:"/assets/icon/logo.png",requireInteraction:!0,tag:i};if("Notification"in window)if("granted"===Notification.permission)new Notification(e,n);else if("denied"!==Notification.permission)Notification.requestPermission((function(e){if("granted"===e)new Notification("Now, ready to recieve Notification!")}));else new Notification(t.subject,n);else;},e.prototype.getPagination=function(e){var t=e;if(0===e.totalSize)return t.pageNo=0,t.pageTotal=0,t.startIndex=0,t.first=!1,t.prev=!1,t.next=!1,t.last=!1,t.pages=[],t.pageStart=0,t.pageEnd=0,t;t.pageTotal=parseInt((e.totalSize-1)/e.pageSize+"")+1,t.startIndex=e.totalSize-e.pageNo*e.pageSize,t.first=e.pageNo+1>2*e.pageGroupSize,t.prev=e.pageNo+1>e.pageGroupSize,t.next=parseInt(e.pageNo/e.pageGroupSize+"")<parseInt((t.pageTotal-1)/e.pageGroupSize+""),t.last=t.next&&e.pageNo+1!==t.pageTotal,t.pages=[],t.pageStart=parseInt(e.pageNo/e.pageGroupSize+"")*e.pageGroupSize,t.pageEnd=Math.min(t.pageStart+e.pageGroupSize-1,e.pageTotal-1);for(var i=t.pageStart;i<=t.pageEnd;i++)t.pages.push(i+1);return t},e.prototype.getChannelName=function(e,t){return e?e.myChannelName&&""!==e.myChannelName?e.myChannelName:e.name&&""!==e.name?e.name:this.getChannelNameWithMembers(e,t):this.translate.instant("common.text.empty")},e.prototype.getChannelNameWithMembers=function(e,t){if(!e||!e.members)return this.translate.instant("common.text.empty");if(1===e.members.length)return e.members[0].name;var i="";if(e&&e.members)for(var n=0,s=e.members;n<s.length;n++){var o=s[n];o.id!==t&&(i=i+(""===i?"":", ")+o.name)}return""===i?this.translate.instant("common.text.empty"):i},e.prototype.getTimezones=function(){return[{id:"Etc/GMT+12",name:"(GMT-12:00) International Date Line West"},{id:"Pacific/Midway",name:"(GMT-11:00) Midway Island, Samoa"},{id:"Pacific/Honolulu",name:"(GMT-10:00) Hawaii"},{id:"US/Alaska",name:"(GMT-09:00) Alaska"},{id:"America/Los_Angeles",name:"(GMT-08:00) Pacific Time (US & Canada)"},{id:"America/Tijuana",name:"(GMT-08:00) Tijuana, Baja California"},{id:"US/Arizona",name:"(GMT-07:00) Arizona"},{id:"America/Chihuahua",name:"(GMT-07:00) Chihuahua, La Paz, Mazatlan"},{id:"US/Mountain",name:"(GMT-07:00) Mountain Time (US & Canada)"},{id:"America/Managua",name:"(GMT-06:00) Central America"},{id:"US/Central",name:"(GMT-06:00) Central Time (US & Canada)"},{id:"America/Mexico_City",name:"(GMT-06:00) Guadalajara, Mexico City, Monterrey"},{id:"Canada/Saskatchewan",name:"(GMT-06:00) Saskatchewan"},{id:"America/Bogota",name:"(GMT-05:00) Bogota, Lima, Quito, Rio Branco"},{id:"US/Eastern",name:"(GMT-05:00) Eastern Time (US & Canada)"},{id:"US/East-Indiana",name:"(GMT-05:00) Indiana (East)"},{id:"Canada/Atlantic",name:"(GMT-04:00) Atlantic Time (Canada)"},{id:"America/Caracas",name:"(GMT-04:00) Caracas, La Paz"},{id:"America/Manaus",name:"(GMT-04:00) Manaus"},{id:"America/Santiago",name:"(GMT-04:00) Santiago"},{id:"Canada/Newfoundland",name:"(GMT-03:30) Newfoundland"},{id:"America/Sao_Paulo",name:"(GMT-03:00) Brasilia"},{id:"America/Argentina/Buenos_Aires",name:"(GMT-03:00) Buenos Aires, Georgetown"},{id:"America/Godthab",name:"(GMT-03:00) Greenland"},{id:"America/Montevideo",name:"(GMT-03:00) Montevideo"},{id:"America/Noronha",name:"(GMT-02:00) Mid-Atlantic"},{id:"Atlantic/Cape_Verde",name:"(GMT-01:00) Cape Verde Is."},{id:"Atlantic/Azores",name:"(GMT-01:00) Azores"},{id:"Africa/Casablanca",name:"(GMT+00:00) Casablanca, Monrovia, Reykjavik"},{id:"Etc/Greenwich",name:"(GMT+00:00) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London"},{id:"Europe/Amsterdam",name:"(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna"},{id:"Europe/Belgrade",name:"(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague"},{id:"Europe/Brussels",name:"(GMT+01:00) Brussels, Copenhagen, Madrid, Paris"},{id:"Europe/Sarajevo",name:"(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb"},{id:"Africa/Lagos",name:"(GMT+01:00) West Central Africa"},{id:"Asia/Amman",name:"(GMT+02:00) Amman"},{id:"Europe/Athens",name:"(GMT+02:00) Athens, Bucharest, Istanbul"},{id:"Asia/Beirut",name:"(GMT+02:00) Beirut"},{id:"Africa/Cairo",name:"(GMT+02:00) Cairo"},{id:"Africa/Harare",name:"(GMT+02:00) Harare, Pretoria"},{id:"Europe/Helsinki",name:"(GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius"},{id:"Asia/Jerusalem",name:"(GMT+02:00) Jerusalem"},{id:"Europe/Minsk",name:"(GMT+02:00) Minsk"},{id:"Africa/Windhoek",name:"(GMT+02:00) Windhoek"},{id:"Asia/Kuwait",name:"(GMT+03:00) Kuwait, Riyadh, Baghdad"},{id:"Europe/Moscow",name:"(GMT+03:00) Moscow, St. Petersburg, Volgograd"},{id:"Africa/Nairobi",name:"(GMT+03:00) Nairobi"},{id:"Asia/Tbilisi",name:"(GMT+03:00) Tbilisi"},{id:"Asia/Tehran",name:"(GMT+03:30) Tehran"},{id:"Asia/Muscat",name:"(GMT+04:00) Abu Dhabi, Muscat"},{id:"Asia/Baku",name:"(GMT+04:00) Baku"},{id:"Asia/Yerevan",name:"(GMT+04:00) Yerevan"},{id:"Asia/Kabul",name:"(GMT+04:30) Kabul"},{id:"Asia/Yekaterinburg",name:"(GMT+05:00) Yekaterinburg"},{id:"Asia/Karachi",name:"(GMT+05:00) Islamabad, Karachi, Tashkent"},{id:"Asia/Calcutta",name:"(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi"},{id:"Asia/Calcutta",name:"(GMT+05:30) Sri Jayawardenapura"},{id:"Asia/Katmandu",name:"(GMT+05:45) Kathmandu"},{id:"Asia/Almaty",name:"(GMT+06:00) Almaty, Novosibirsk"},{id:"Asia/Dhaka",name:"(GMT+06:00) Astana, Dhaka"},{id:"Asia/Rangoon",name:"(GMT+06:30) Yangon (Rangoon)"},{id:"Asia/Bangkok",name:"(GMT+07:00) Bangkok, Hanoi, Jakarta"},{id:"Asia/Krasnoyarsk",name:"(GMT+07:00) Krasnoyarsk"},{id:"Asia/Hong_Kong",name:"(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi"},{id:"Asia/Kuala_Lumpur",name:"(GMT+08:00) Kuala Lumpur, Singapore"},{id:"Asia/Irkutsk",name:"(GMT+08:00) Irkutsk, Ulaan Bataar"},{id:"Australia/Perth",name:"(GMT+08:00) Perth"},{id:"Asia/Taipei",name:"(GMT+08:00) Taipei"},{id:"Asia/Tokyo",name:"(GMT+09:00) Osaka, Sapporo, Tokyo"},{id:"Asia/Seoul",name:"(GMT+09:00) Seoul"},{id:"Asia/Yakutsk",name:"(GMT+09:00) Yakutsk"},{id:"Australia/Adelaide",name:"(GMT+09:30) Adelaide"},{id:"Australia/Darwin",name:"(GMT+09:30) Darwin"},{id:"Australia/Brisbane",name:"(GMT+10:00) Brisbane"},{id:"Australia/Canberra",name:"(GMT+10:00) Canberra, Melbourne, Sydney"},{id:"Australia/Hobart",name:"(GMT+10:00) Hobart"},{id:"Pacific/Guam",name:"(GMT+10:00) Guam, Port Moresby"},{id:"Asia/Vladivostok",name:"(GMT+10:00) Vladivostok"},{id:"Asia/Magadan",name:"(GMT+11:00) Magadan, Solomon Is., New Caledonia"},{id:"Pacific/Auckland",name:"(GMT+12:00) Auckland, Wellington"},{id:"Pacific/Fiji",name:"(GMT+12:00) Fiji, Kamchatka, Marshall Is."},{id:"Pacific/Tongatapu",name:"(GMT+13:00) Nuku'alofa"}]},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:a.TranslateService},{type:T}]},e}(),M=function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function r(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?s(e.value):new i((function(t){t(e.value)})).then(r,a)}l((n=n.apply(e,t||[])).next())}))},j=function(e,t){var i,n,s,o,r={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(s=n[2&o[0]?"return":o[0]?"throw":"next"])&&!(s=s.call(n,o[1])).done)return s;switch(n=0,s&&(o=[0,s.value]),o[0]){case 0:case 1:s=o;break;case 4:return r.label++,{value:o[1],done:!1};case 5:r.label++,n=o[1],o=[0];continue;case 7:o=r.ops.pop(),r.trys.pop();continue;default:if(!(s=r.trys,(s=s.length>0&&s[s.length-1])||6!==o[0]&&2!==o[0])){r=0;continue}if(3===o[0]&&(!s||o[1]>s[0]&&o[1]<s[3])){r.label=o[1];break}if(6===o[0]&&r.label<s[1]){r.label=s[1],s=o;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(o);break}s[2]&&r.ops.pop(),r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e],n=0}finally{i=s=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},L=window.location.origin+"/rest/uploadTempFile",z=function(){function e(e,i,n,s,o,a){var c=this;this.translate=e,this.apiService=i,this.authService=n,this.utilService=s,this.publishService=o,this.toastService=a,this.notify=new t.EventEmitter,this.fileUploader=new t.EventEmitter,this.fileOverCallback=new t.EventEmitter,this.onFileDropCallback=new t.EventEmitter,this.appId=this.utilService.generateAppId(),this.subscription=new l.Subscription,this.uploader=new r.FileUploader({url:L,authToken:this.authService.getAuthToken(),autoUpload:!1,disableMultipart:!1,formatDataFunctionIsAsync:!1,formatDataFunction:function(e){return M(c,void 0,void 0,(function(){var t=this;return j(this,(function(i){return[2,new Promise((function(i,n){i({fileName:e._file.name,fileExt:t.utilService.getExtention(e._file.name),fileSize:e._file.size,contentType:e._file.type,date:new Date})}))]}))}))}}),this.hasDropZoneOver=!1,this.uploader.response.subscribe((function(e){e&&(e=JSON.parse(e)),e&&!0===e.status?(c.multiple?c.uploadedFiles=c.uploadedFiles||[]:c.uploadedFiles=[],e.result.added=!0,c.uploadedFiles.push(e.result),c.notify.emit(c.uploadedFiles),c.onUploadedFileCoping(e.result,100)):c.toastService.add("error",(e.result?e.result.fileId+":":"Unkown FileId:")+c.translate.instant("upload.error.file-upload-failed"))}))}return e.prototype.ngOnInit=function(){this.fileUploader.emit(this.uploader)},e.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},e.prototype.getProgress=function(e){return Math.round(e.progress/3*2+e.copingProgress/3)},e.prototype.fileOverBase=function(e){this.hasDropZoneOver=e},e.prototype.onUploadedFileCoping=function(e,t){if(e)for(var i=0;i<this.uploader.queue.length;i++)if(!this.uploader.queue[i].isUploaded&&e.fileSize===this.uploader.queue[i].file.size&&e.fileName===this.uploader.queue[i].file.name)return void(this.uploader.queue[i].copingProgress=t)},Object.defineProperty(e.prototype,"uploadedFiles",{get:function(){return this._uploadedFiles},set:function(e){this._uploadedFiles=JSON.parse(JSON.stringify(e||[]))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extFileDropItems",{set:function(e){e&&this.onFileSelected(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"clearAll",{set:function(e){if(e){if(this.uploader&&this.uploader.queue)for(var t=0;t<this.uploader.queue.length;t++)this.uploader.queue[t].cancel(),this.uploader.queue[t].remove(),t--;if(this.uploadedFiles)for(t=0;t<this.uploadedFiles.length;t++)this.apiService.deleteTempFile(this.uploadedFiles[t]).then((function(e){})),this.uploadedFiles.splice(t,1),t--}},enumerable:!0,configurable:!0}),e.prototype.onFileSelected=function(e){for(var t=this,i=0;i<e.length;i++)if(this.checkIfTypesAllowed(e[i])){if(this.maxSize>0&&e[i].size>this.maxSize){for(n=0;n<this.uploader.queue.length;n++)this.uploader.queue[n].isUploaded||e[i].size!==this.uploader.queue[n].file.size||e[i].name!==this.uploader.queue[n].file.name||(this.uploader.queue[n].remove(),n--);this.toastService.add("warn",this.translate.instant("upload.error.max-size-allowed",{fileName:e[i].name,fileSize:this.utilService.getBytesWithUnit(e[i].size),maxSize:this.utilService.getBytesWithUnit(this.maxSize)}))}}else{for(var n=0;n<this.uploader.queue.length;n++)this.uploader.queue[n].isUploaded||e[i].size!==this.uploader.queue[n].file.size||e[i].name!==this.uploader.queue[n].file.name||(this.uploader.queue[n].remove(),n--);this.toastService.add("warn",this.translate.instant("upload.error.file-types-allowed",{fileName:e[i].name,types:this.getTypesAllowedString()}))}if(this.multiple){if(this.uploader.queue.length>e.length)for(i=0;i<this.uploader.queue.length;i++)if(this.uploader.queue[i].isReady)for(var s=0;s<this.uploadedFiles.length;s++)if(this.uploader.queue[i].file.size===this.uploadedFiles[s].fileSize&&this.uploader.queue[i].file.name===this.uploadedFiles[s].fileName){this.removeItem(this.uploader.queue[i]);break}}else if(this.uploader.queue&&this.uploader.queue.length>1)for(i=0;i<this.uploader.queue.length;i++)this.uploader.queue[i].isReady||this.removeItem(this.uploader.queue[i]);for(i=0;i<this.uploader.queue.length;i++)this.uploader.queue[i].isReady||this.uploader.queue[i].copingProgress||(this.uploader.queue[i].copingProgress=0);this.notify.emit(this.uploadedFiles),this.uploader.uploadAll(),this.subscription.add(this.publishService.copingProgress.subscribe((function(e){e&&t.onUploadedFileCoping(e,e.copingProgress)})))},e.prototype.getTypesAllowedString=function(){if(!this.typesAllowed)return"";for(var e="",t=0;t<this.typesAllowed.length;t++)e=e+(0===t?".":", ")+this.typesAllowed[t];return e},e.prototype.checkIfTypesAllowed=function(e){if(!this.typesAllowed)return!0;if(!e||!e.type)return!1;for(var t=e.type.split("/"),i=t[t.length-1],n=0;n<this.typesAllowed.length;n++)if(i.toLowerCase()===this.typesAllowed[n].toLowerCase())return!0;return!1},e.prototype.removeItem=function(e){if(this.uploadedFiles&&this.uploadedFiles.length>0)for(var t=0;t<this.uploadedFiles.length;t++)if(e.file.size===this.uploadedFiles[t].fileSize&&e.file.name===this.uploadedFiles[t].fileName){this.apiService.deleteTempFile(this.uploadedFiles[t]).then((function(e){})),this.uploadedFiles.splice(t,1);break}e.remove()},Object.defineProperty(e.prototype,"uploadFile",{set:function(e){var t=this;if(e){var i=new File([this.utilService.convertBase64ToBlob(e.data)],e.filename),n=new FormData;n.append("file",i),$.ajax({url:L,type:"post",data:n,contentType:!1,processData:!1,success:function(e){t.uploadedFiles=t.uploadedFiles||[],t.uploadedFiles.push(e.result),t.notify.emit(t.uploadedFiles)},error:function(e){this.toastService.add("error",this.translate.instant("upload.error.file-upload-failed"))}})}},enumerable:!0,configurable:!0}),e.prototype.getOldUploadedFiles=function(){return(this.uploadedFiles||[]).filter((function(e){return!e.added}))},e.decorators=[{type:t.Component,args:[{selector:"sw-file-upload",template:'<div id="{{appId}}"> <div *ngIf="!profile" id="{{appId}}" class="file-uploader well my-drop-zone" ng2FileDrop [ngClass]="{\'nv-file-over\': hasDropZoneOver}" (fileOver)="fileOverBase($event)" [uploader]="uploader" (onFileDrop)="onFileSelected($event)"> <div class="choose-file"> <input *ngIf="multiple" type="file" [attr.sw-title]="" ng2FileSelect [uploader]="uploader" (onFileSelected)="onFileSelected($event)" multiple  /> <input *ngIf="!multiple" type="file" [attr.sw-title]="" ng2FileSelect [uploader]="uploader" (onFileSelected)="onFileSelected($event)"/> <span>{{\'upload.button.choose-file\' | translate}}</span> </div> <ul *ngIf="!hideUploadList" class="upload-list"> <li *ngFor="let file of getOldUploadedFiles()" class="upload-item" [attr.sw-title]="file.fileName"> <span class="icon-file-type {{utilService.getExtention(file.fileName)}}"></span> <span class="file-name">{{utilService.getFileNameBrief(file.fileName)}}</span> <span class="file-size">/{{utilService.getBytesWithUnit(file.fileSize)}}</span> <span (click)="removeItem(file)" class="icon-delete-item" [attr.sw-title]="\'common.button.delete\' | translate"></span> </li> <li *ngFor="let item of uploader.queue" class="upload-item" [attr.sw-title]="item?.file?.name"> <span class="icon-file-type {{utilService.getExtention(item?.file?.name)}}"></span> <span class="file-name">{{utilService.getFileNameBrief(item?.file?.name)}}</span> <span class="file-size">/{{utilService.getBytesWithUnit(item?.file?.size)}}</span> <span *ngIf="!item.isError && getProgress(item) < 100" class="progress-circle p{{getProgress(item)}}" [attr.data-progress]="getProgress(item)" (click)="removeItem(item)" [attr.sw-title]="\'common.button.cancel\' | translate"></span> <span *ngIf="item.isError" class="icon-field-error" [attr.sw-title]=""></span> <span *ngIf="item.isUploaded && getProgress(item) === 100" (click)="removeItem(item)" class="icon-delete-item" [attr.sw-title]="\'common.button.delete\' | translate"></span> </li> </ul> <div class="extended-drop-zone" [ngStyle]="extDropZoneStyles"></div> </div> <div *ngIf="profile" class="file-uploader profile-uploader well my-drop-zone" [style.width]="size + \'px\'" [style.height]="size + \'px\'" [style.margin-top]="(-1*(size+5)) + \'px\'" ng2FileDrop [ngClass]="{\'nv-file-over\': hasDropZoneOver}" (fileOver)="fileOverBase($event)" [uploader]="uploader" (onFileDrop)="onFileSelected($event)"> <div class="choose-file" [style.width]="size + \'px\'" [style.height]="size + \'px\'"> <input type="file" [attr.sw-title]="" ng2FileSelect [uploader]="uploader" (onFileSelected)="onFileSelected($event)"/> </div> </div> </div>',styles:[".file-uploader .nv-file-over {  backgroud-color: rgba(245, 237, 23, 0.2); } .file-uploader .choose-file { font-size: 12px; font-weight: normal; color: #fff; border-radius: 5px; background-color: #111b25; width: 60px; display: inline-block; height: 26px; text-align: center;  vertical-align: top;   \t } .file-uploader .choose-file > input { width: 60px; opacity: 0; } .file-uploader .choose-file > input[type=file], /* FF, IE7+, chrome (except button) */ .file-uploader .choose-file > input[type=file]::-webkit-file-upload-button { /* chromes and blink button */ cursor: pointer;  } .profile-uploader{ } .profile-uploader .choose-file { border-radius: 50%; opacity: 0; } .profile-uploader .choose-file > input { border-radius: 50%; width: 100%; height: 100%; } .file-uploader .choose-file > span { margin-top: -16px; display: inline-block; vertical-align: top; } .file-uploader .upload-list { display: inline-block; vertical-align: top; font-size: 14px; font-weight: normal; color: #222222; width: calc(100% - 80px); margin-left: 10px; margin-top: 3px; } .file-uploader .upload-item > span { margin: 0 5px; display: inline-block; vertical-align: top; } .file-uploader .upload-item > .icon-file-type { transform: scale(0.4); transform-origin: 0 0; margin-right: -25px; margin-bottom: -22px; margin-top: 2px; } .file-uploader .upload-item > .file-name { } .file-uploader .upload-item > .file-size { font-size: 11px; margin-top: 4px; margin-left: 0px; } .file-uploader .upload-item > .progress-circle { cursor: pointer; margin-top: -1px; } .file-uploader .upload-item > .icon-field-error, .file-uploader .upload-item > .icon-delete-item { margin-top: 7px; } "]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:a.TranslateService},{type:U},{type:T},{type:O},{type:x},{type:y}]},e.propDecorators={selectedFileId:[{type:t.Input}],multiple:[{type:t.Input}],profile:[{type:t.Input}],size:[{type:t.Input}],maxSize:[{type:t.Input}],typesAllowed:[{type:t.Input}],hideUploadList:[{type:t.Input}],extDropZoneStyles:[{type:t.Input}],notify:[{type:t.Output}],fileUploader:[{type:t.Output}],fileOverCallback:[{type:t.Output}],onFileDropCallback:[{type:t.Output}],uploadedFiles:[{type:t.Input,args:["uploadedFiles"]}],extFileDropItems:[{type:t.Input,args:["extFileDropItems"]}],clearAll:[{type:t.Input,args:["clearAll"]}],uploadFile:[{type:t.Input,args:["uploadFile"]}]},e}(),N=function(){},A=function(){},W=function(){},E=function(){},F=function(){function e(e,i){this.translate=e,this.utilService=i,this.fileChoosed=new t.EventEmitter,this.pictureUrlChange=new t.EventEmitter,this.appId=this.utilService.generateAppId(),this.imageCount=0}return e.prototype.ngOnInit=function(){},e.prototype.loadImage=function(e,t,i){var n=this;setTimeout((function(s){var o=$("#"+n.appId).find("img."+t);o.hide();var r=new Image,a=n;r.onload=function(){var e=0,t=0;r.width<a.size&&r.height<a.size?o.css({"margin-top":(a.size-2-r.height)/2+"px"}):r.width>r.height?(e=r.width*a.size/r.height/2-a.size*i.width/2,.5===i.height&&(t=a.size*i.height/2),o.css({height:"calc("+a.size+"px - 2px)",width:"auto","margin-top":-1*t+"px","margin-left":-1*e+"px"})):r.width<r.height?(t=r.height*a.size/r.width/2-a.size*i.height/2,.5===i.width&&(e=a.size*i.width/2),o.css({height:"auto",width:"calc("+a.size+"px - 2px)","margin-top":-1*t+"px","margin-left":-1*e+"px"})):(.5===i.height?t=r.height*a.size/r.width/2-a.size*i.height/2:.5===i.width&&(e=r.width*a.size/r.height/2-a.size*i.width/2),o.css({height:"calc("+a.size+"px - 2px)",width:"auto","margin-top":-1*t+"px","margin-left":-1*e+"px"})),o.show()},r.src=e}))},Object.defineProperty(e.prototype,"selectedUser",{get:function(){return this._selectedUser},set:function(e){var t=this;this.imageCount++,this._selectedUser=e,this.selectedUser&&(this.loadImage(this.selectedUser.profileUrl,"multi0",{width:1,height:1}),setTimeout((function(e){var i=$("#"+t.appId);(t.selectedUser||t.selectedUsers&&1===t.selectedUsers.length)&&i.find(".user-list .user-item:first").css({width:"calc(100% - 2px)",height:"calc(100% - 2px)",display:"inline-block"})})))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pictureUrl",{get:function(){return this._pictureUrl},set:function(e){if(this._pictureUrl=e,this.pictureUrl){var t=new N;t.profileUrl=e,this.selectedUser=t}else this.selectedUser=null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectedUsers",{get:function(){return this._selectedUsers},set:function(e){var t=this;if(this.imageCount++,this._selectedUsers=e,this.selectedUsers&&0!==this.selectedUsers.length){for(var i=0;i<this.selectedUsers.length;i++)if(this.selectedUsers[i].profileUrl)switch(this.selectedUsers.length){case 1:this.loadImage(this.selectedUsers[i].profileUrl,"multi"+i,{width:1,height:1});break;case 2:this.loadImage(this.selectedUsers[i].profileUrl,"multi"+i,{width:.7,height:.7});break;default:this.loadImage(this.selectedUsers[i].profileUrl,"multi"+i,{width:.5,height:.5})}setTimeout((function(e){var i=$("#"+t.appId);t.selectedUser||t.selectedUsers&&1===t.selectedUsers.length?i.find(".user-list .user-item:first").css({width:"calc(100% - 2px)",height:"calc(100% - 2px)",display:"inline-block"}):2===t.selectedUsers.length?(i.find(".user-list .user-item").css({width:"calc(70% - 2px)",height:"calc(70% - 2px)",display:"inline-block"}),i.find(".user-list .user-item:first").css({float:"left"}),i.find(".user-list .user-item:last").css({float:"right","margin-top":"calc(-35% - 2px)",display:"inline-block"})):3===t.selectedUsers.length?(i.find(".user-list .user-item").css({width:"calc(50% - 2px)",height:"calc(50% - 2px)",display:"inline-block"}),i.find(".user-list .user-item:first").css({float:"left","margin-left":"calc(25% + 1px)",display:"inline-block"})):i.find(".user-list .user-item").css({width:"calc(50% - 2px)",height:"calc(50% - 2px)",display:"inline-block"})}))}},enumerable:!0,configurable:!0}),e.prototype.onImagesFileChanged=function(e){e&&1===e.length&&(this.selectedUser=this.selectedUser||new N,this.selectedUser.profileUrl=e[0].fileUrl,this.selectedUser=this.selectedUser,this.fileChoosed.emit(e),this.pictureUrlChange.emit(e[0].fileUrl))},e.prototype.getMaxFourUsers=function(){return this.selectedUser||this.selectedUsers?this.selectedUser?[this.selectedUser]:this.selectedUsers&&this.selectedUsers.length>=4?this.selectedUsers.slice(0,4):this.selectedUsers:null},e.prototype.getUsersName=function(){if(!this.selectedUsers||0===this.selectedUsers.length)return this.translate.instant("common.text.empty");for(var e="",t=0;t<this.selectedUsers.length;t++){if(4===t)return this.translate.instant("users.text.count-except-name",{name:e,count:this.selectedUsers.length-4});e=e+(0===t?"":", ")+this.selectedUsers[t].name}return e},e.prototype.getUserInitial=function(e){if(!e)return"?";var t=e.name;if(!t)return this.utilService.isUserId(e.id)?e.id.split("@")[0].slice(0,2).toUpperCase():"?";if(/[^\u0000-\u00ff]/.test(t))return t.slice(0,1);var i=t.split(" ");return i.length>=2?(i[i.length-1].slice(0,1)+i[0].slice(0,1)).toUpperCase():t.slice(0,3).toUpperCase()},e.prototype.getEmptyProfileStyle=function(){var e=this.size-2;return this.selectedUsers?1===this.selectedUsers.length?{"font-size":"14.5px","line-height":"14.5px",padding:(e-14.5)/2+"px 0"}:2===this.selectedUsers.length?{"font-size":"14.5px","line-height":"14.5px",padding:(.7*e-14.5)/2+"px 0"}:{"font-size":"14.5px","line-height":"14.5px",padding:(e/2-14.5)/2+"px 0"}:this.size<=36&&this.size>25?{"font-size":"14.5px","line-height":"14.5px",padding:(e-14.5)/2+"px 0"}:this.size<=25?{"font-size":"12px","line-height":"12px",padding:(e-12)/2+"px 0"}:this.size>=60?{"font-size":"38px","line-height":"38px",padding:(e-38)/2+"px 0"}:{"font-size":"21px","line-height":"21px",padding:(e-21)/2+"px 0"}},e.prototype.isEmptyProfile=function(){return this.selectedUser?!this.selectedUser.profileUrl:this.selectedUsers&&1===this.selectedUsers.length&&!this.selectedUsers[0].profileUrl},e.decorators=[{type:t.Component,args:[{selector:"sw-avatar",template:'<div id="{{appId}}" class="user-avatar" [style.width]="size + \'px\'" [style.height]="size + \'px\'"> <ul *ngIf="selectedUser || selectedUsers" class="user-list"> <li *ngFor="let user of getMaxFourUsers() index as i" class="user-item {{user && !user.profileUrl && (\'color-code\' + user.colorCode)}}"> <img *ngIf="user.profileUrl" class="multi{{i}}" src="{{user.profileUrl}}?v={{imageCount}}"/> <span *ngIf="!user.profileUrl" class="empty-profile" [ngStyle]="getEmptyProfileStyle()">{{getUserInitial(user)}}</span>         </li> </ul> <sw-file-upload *ngIf="editable" [multiple]="false" [profile]="true" [typesAllowed]="[\'bmp\', \'gif\', \'jpg\', \'png\', \'tiff\']" [size]="120" (notify)="onImagesFileChanged($event)"></sw-file-upload> </div> ',styles:[".user-avatar { display: inline-block; overflow: hidden; text-align: center; } .user-avatar .empty-profile { color: #fff; font-size: 14.5px; display: inline-block; vertical-align: top; border-radius: 40%; } .user-avatar .user-list { width: 100%; height: 100%; text-align: center; } .user-avatar .user-list .user-item { display: none; overflow: hidden; vertical-align: top; text-align: center; border-radius: 40%; margin: 1px; } .user-avatar.color-codenull, .user-avatar.color-codeundefined, .user-avatar.color-code0, .user-avatar .user-list .user-item.color-codenull, .user-avatar .user-list .user-item.color-codeundefined, .user-avatar .user-list .user-item.color-code0 { background-color: #37c5ab!important; } .user-avatar.color-code1, .user-avatar .user-list .user-item.color-code1 { background-color: #74d285!important; } .user-avatar.color-code2, .user-avatar .user-list .user-item.color-code2 { background-color: #faaf5f!important; } .user-avatar.color-code3, .user-avatar .user-list .user-item.color-code3 { background-color: #aeb7f9!important; } .user-avatar.color-code4, .user-avatar .user-list .user-item.color-code4 { background-color: #7455e3!important; } .user-avatar.color-code5, .user-avatar .user-list .user-item.color-code5 { background-color: #00bae6!important; } .user-avatar.color-code6, .user-avatar .user-list .user-item.color-code6 { background-color: #f17fa4!important; } .user-avatar.color-code7, .user-avatar .user-list .user-item.color-code7 { background-color: #8b0000!important; } "]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:a.TranslateService},{type:O}]},e.propDecorators={size:[{type:t.Input}],editable:[{type:t.Input}],fileChoosed:[{type:t.Output}],pictureUrlChange:[{type:t.Output}],selectedUser:[{type:t.Input,args:["selectedUser"]}],pictureUrl:[{type:t.Input,args:["pictureUrl"]}],selectedUsers:[{type:t.Input,args:["selectedUsers"]}]},e}(),q=function(){function e(e,i,n,s,o,r,a){this.apiService=e,this.authService=i,this.utilService=n,this.toastService=s,this.publishService=o,this.spinnerService=r,this.translate=a,this.selectedUsersChange=new t.EventEmitter,this.appId=this.utilService.generateAppId(),this._currentUser=this.authService.getCurrentUser(),this.arrowDownPressed=0,this.selectedUser=null}return e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"users",{get:function(){return this._users},set:function(e){var t=this;this._users=e,this.users&&this.users.length>0?(setTimeout((function(){t.setSelectListPosition()})),window.addEventListener("wheel",(function(){t.users=null}))):window.removeEventListener("wheel",(function(){}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentUser",{get:function(){return this._currentUser},set:function(e){this._currentUser=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectedUsers",{get:function(){return this._selectedUsers},set:function(e){this._selectedUsers=e},enumerable:!0,configurable:!0}),e.prototype.closePopups=function(){var e=this;window.removeEventListener("wheel",(function(){})),setTimeout((function(){e.users=null,e.onSearchUser=!1}),100)},e.prototype.onFocusout=function(e){var t=this;e.relatedTarget&&(jQuery.contains(e.target,e.relatedTarget)||jQuery.contains(e.relatedTarget,e.target))||(window.removeEventListener("wheel",(function(){})),setTimeout((function(){t.users=null,t.onSearchUser=!1}),100))},e.prototype.addToSelectedUsers=function(e){var t=this;if(e&&e.name){if(e.added=!0,"email"===this.type){if(!this.utilService.isEmailId(e.id))return void this.toastService.add("warn",this.translate.instant("common.error.invalid-email-id"));this.currentUser&&this.apiService.searchCompanyUsers(this.currentUser.company.id,e.id,!1).then((function(i){i&&i.status&&i.result&&i.result.length>0&&(t.removeUser(e),t.toastService.add("warn",t.translate.instant("common.error.duplicated-email-id")))}))}if(!this.multiple)return this.selectedUsers=[e],void this.selectedUsersChange.emit(this.selectedUsers);this.selectedUsers=this.selectedUsers||[];for(var i=0;i<this.selectedUsers.length;i++)if(e.id&&this.selectedUsers[i].id===e.id||"email"===this.type&&this.selectedUsers[i].name===e.name)return void this.toastService.add("warn",this.translate.instant("common.error.listed-email-id"));this.selectedUsers.push(e),this.selectedUsersChange.emit(this.selectedUsers)}},e.prototype.keydownOnInput=function(e){if(this.onSearchUser=!1,13===(e.which||e.keyCode)&&"email"!==this.type)return $(e.target).text(""),e.stopPropagation(),!1},e.prototype.keyupOnInput=function(e){var t=e.which||e.keyCode;if(8===t&&(""===$(e.target).text()||null===$(e.target).text())){if(this.selectedUser&&this.selectedUsers)return this.selectedUsers.splice(this.selectedUsers.length-1,1),this.selectedUser=null,void this.selectedUsersChange.emit(this.selectedUsers);if(this.selectedUsers&&this.selectedUsers.length>0&&(!this.appendMode||this.selectedUsers[this.selectedUsers.length-1].added))return void(this.selectedUser=this.selectedUsers[this.selectedUsers.length-1])}if(this.selectedUser=null,(40===t||38===t||13===t)&&this.users&&this.users.length>0){var i=$(e.target).parents(".auto-search-user").find(".select-list"),n=i.find("li.hover:first");if(0==n.length){if(40===t)return i.find("li:first").addClass("hover"),void(this.arrowDownPressed=(new Date).getTime());if(38===t)return i.find("li:last").addClass("hover"),this.arrowDownPressed=(new Date).getTime(),void i.scrollTop(i.prop("scrollHeight"))}else switch(t){case 40:if(n.nextAll().length>0){if(this.arrowDownPressed>(new Date).getTime()-500)return void(this.arrowDownPressed=0);var s=n.removeClass("hover").next().addClass("hover");1==s.length&&s.offset().top+s.height()>i.offset().top+i.height()&&i.scrollTop(i.scrollTop()+(s.offset().top+s.height()-(i.offset().top+i.height())))}break;case 38:if(n.prevAll().length>0){if(this.arrowDownPressed>(new Date).getTime()-500)return void(this.arrowDownPressed=0);var o=n.removeClass("hover").prev().addClass("hover");1===o.length&&o.offset().top<i.offset().top&&i.scrollTop(i.scrollTop()-(i.offset().top-o.offset().top))}break;case 13:n.attr("tabindex","-1").focus().click(),$(e.target).attr("tabindex","-1").focus()}this.arrowDownPressed=0}else if(13!==t&&188!==t||!$(e.target).text()){var r=""+$(e.target).text();"email"!==this.type&&(this.selectListBox=$(e.target).parents(".select-list-box:first"),this.currentUser&&this.belatedSearchCompanyUsers(r))}else{if("email"!==this.type)return void $(e.target).text("");if(this.newUser=new N,this.newUser.name=$(e.target).text(),188===t&&(this.newUser.name=this.newUser.name.substring(0,this.newUser.name.length-1),$(e.target).text("")),this.newUser.id=this.newUser.name,this.addToSelectedUsers(this.newUser),this.newUser=new N,13===t){var a=$(e.target);setTimeout((function(){a.text("")}))}}},e.prototype.belatedSearchCompanyUsers=function(e){var t=this;this.lastKey=e,setTimeout((function(e){t.onSearching||t.lastKey!==e||(t.onSearching=!0,t.spinnerService.remove(),t.multiple&&!t.userOnly?t.apiService.searchCompanyWorkSpaces(t.currentUser.company.id,e,!1).then((function(i){i&&i.status&&(t.users=i.result),t.onSearching=!1,t.key=e}),(function(i){t.onSearching=!1,t.key=e})):t.apiService.searchCompanyUsers(t.currentUser.company.id,e,!1).then((function(i){i&&i.status&&(t.users=i.result),t.onSearching=!1,t.key=e}),(function(i){t.onSearching=!1,t.key=e})))}),300,e)},e.prototype.setSelectListPosition=function(){var e=this,t=this.selectListBox.find("ul.select-list");if(0!==t.length){var i=this.selectListBox,n=this.utilService.getBubbleScrollTop();if("c"===this.type)t.css({width:i.parent().width()+"px",top:i.offset().top+i.height()-$("#work-list").offset().top+"px",bottom:"auto",left:"auto","margin-left":"-8px","margin-top":"8px","margin-right":-1*t.width()+"px"}),i.offset().top+i.height()-$("#work-list").offset().top+t.height()>$(window).height()&&t.css({top:"auto",bottom:$(window).height()-i.offset().top+"px","margin-top":"-8px"});else if(i.parents().is("table")){var s=i.parents().is(".scroll-body")?$(".scroll-body").offset().top:0;if(t.css({width:i.parent().width()+"px",top:i.offset().top-s+n+i.parent().height()+"px",left:i.offset().left+"px"}),i.offset().top-s+i.parent().height()+t.height()>$(window).height()){var o=1===i.parents(".popup-window:first").length?i.parents(".popup-window:first").height():$(window).height();t.css({top:"auto",bottom:o-i.offset().top-s-n+"px"})}}else if(t.css({width:i.parent().width()+"px",top:i.position().top+n+i.parent().height()+"px",left:i.position().left+"px"}),i.offset().top+i.parent().height()+t.height()>$(window).height()){o=1===i.parents(".popup-window:first").length?i.parents(".popup-window:first").height():$(window).height();t.css({top:"auto",bottom:o-i.position().top-n+"px"})}t.show()}else setTimeout((function(){e.setSelectListPosition()}),100)},e.prototype.selectUser=function(e){this.addToSelectedUsers(e),$("sw-auto-user .select-list-box .input-box").text(""),this.users=null,this.newUser=new N},e.prototype.onInputFocusOut=function(e){if("email"===this.type){var t=this;setTimeout((function(){$(e.target).text()&&(t.newUser=new N,t.newUser.name=$(e.target).text(),t.newUser.id=t.newUser.name,$(e.target).text(""),t.addToSelectedUsers(t.newUser),t.newUser=new N)}),100)}else $(e.target).text("")},e.prototype.removeUser=function(e){if(this.selectedUsers)for(var t=0;t<this.selectedUsers.length;t++)if(this.selectedUsers[t].id&&this.selectedUsers[t].id===e.id||this.selectedUsers[t].name===e.name){this.selectedUsers.splice(t,1),this.selectedUsersChange.emit(this.selectedUsers);break}return!1},e.prototype.clickOnSearchUser=function(e){this.users=null,this.onSearchUser=!0,this.selectListBox=$(e.target).parents(".select-list-box:first"),this.setSearchUserPosition()},e.prototype.setSelectedUsers=function(e){var t=this;this.selectedUsers=e,this.selectedUsersChange.emit(this.selectedUsers),setTimeout((function(){t.setSearchUserPosition()}),300)},e.prototype.setSearchUserPosition=function(){var e=this;if(this.onSearchUser){var t=this.selectListBox.find(".search-user:first");if(0!==t.length){var i=this.selectListBox,n=this.utilService.getBubbleScrollTop();if(t.css({width:i.parent().width()+"px",top:i.position().top+n+i.parent().height()+"px",left:i.position().left+"px"}),i.offset().top+i.parent().height()+t.height()>$(window).height()){var s=1===i.parents(".popup-window:first").length?i.parents(".popup-window:first").height():$(window).height()-$("#header").height();i.offset().top-$("#header").height()>t.height()?t.css({top:"auto",bottom:Math.max(s-i.position().top-n,0)+"px"}):t.css({top:"auto",left:i.position().left+"px",bottom:Math.max(s-i.position().top-n-(t.height()-i.offset().top+$("#header").height())-10,0)+"px"})}t.show()}else setTimeout((function(){e.setSearchUserPosition()}),100)}},e.prototype.inviteNewUsers=function(e){return this.onSearchUser=!1,this.publishService.pubPopupMessage({targetId:"inviteNewUser",parameters:[this.selectedDepartment]}),!1},e.decorators=[{type:t.Component,args:[{selector:"sw-auto-user",template:'<div id="{{appId}}" [ngClass]="{\'small-size\': smallSize, \'read-only\': readOnly}"> <div class="auto-search-user select-list-box" tabindex="-1" (focusout)="onFocusout($event)"> <div class="auto-user-field" [ngClass]="{\'no-icon\': type===\'email\'}"> <span *ngFor="let user of selectedUsers index as i" class="user-item" [ngClass]="{\'on\': selectedUser && selectedUser.id === user.id, \'added\': user.added}">{{user.name}} <a href="" *ngIf="!appendMode && !user.added && !readOnly" class="icon-delete-item" (click)="removeUser(user)"></a> <a href="" *ngIf="user.added" class="icon-delete-item-wh" (click)="removeUser(user)"></a> </span> <span *ngIf="!readOnly && (multiple || !selectedUsers || selectedUsers.length === 0) " class="input-box" contenteditable="true" (focusout)="onInputFocusOut($event)" (keydown)="keydownOnInput($event)" (keyup)="keyupOnInput($event)" (change)="changeOnInput($event)"></span> <span *ngIf="type!==\'email\' && !noSearchUser && !readOnly" class="icon-search-user" (click)="clickOnSearchUser($event)"></span> </div> <ul *ngIf="users && users.length>0" class="select-list" (mousewheel)="$event.stopPropagation()"> <li *ngFor="let user of users" (click)="selectUser(user)"> <sw-avatar [selectedUser]="user" [size]="25"></sw-avatar> <span *ngIf="utilService.getSearchedNameTokens(key, user.name) as nameTokens" class="text-ellipsis"> <span>{{nameTokens[0]}}</span><span class="highlight">{{nameTokens[1]}}</span><span>{{nameTokens[2]}}</span> </span> </li> </ul> <div *ngIf="onSearchUser" class="search-user"> <div *ngIf="showInviteUser" class="invite-user"><span (click)="inviteNewUsers($event)">{{\'users.text.invite-new-users\' | translate}}</span></div> <div> <sw-search-user [multiple]="multiple" [selectedMember]="!multiple && selectedUsers && selectedUsers.length==1 ? selectedUsers[0]:null" [userOnly]="userOnly" [selectedMembers]="selectedUsers" (selectedMembersChange)="setSelectedUsers($event)" [useSortBy]="true"></sw-search-user> </div> </div> </div> </div>',styles:[".auto-search-user {  width: calc(100% - 16px); border: solid 1px #e6e7e8; border-radius: 5px; font-size: 13px; color: #222222; background-color: #ffffff; padding: 4px 7px; padding-bottom: 0; outline: none; } .read-only > .auto-search-user {  width: 100%; border: none; padding: 5px 7px; } .small-size > .auto-search-user { padding: 3px 7px; padding-bottom: 2px; } .small-size.read-only > .auto-search-user { padding: 6px 7px; } .auto-search-user.select-list-box { cursor: default;     } .auto-user-field { width: calc(100% - 20px); } .auto-user-field.no-icon { width: 100%; } .auto-user-field .user-item { border-radius: 5px; background-color: #e5e6e6; margin-right: 5px; margin-bottom: 3px; padding: 5px 7px; display: inline-block; } .small-size > .auto-search-user .auto-user-field .user-item { padding: 2px 7px; } .auto-user-field .user-item:hover { background-color: #d3d6da; } .read-only .auto-user-field .user-item:hover { background-color: #e5e6e6; } .auto-user-field .user-item .icon-delete-item, .auto-user-field .user-item .icon-delete-item-wh { margin-left: 2px; } .auto-search-user .auto-user-field .user-item.on,  .auto-search-user .auto-user-field .user-item.on:hover,  .auto-search-user .auto-user-field .user-item.on.added { background-color: #d3d6da; } .read-only .auto-search-user .auto-user-field .user-item.on,  .read-only .auto-search-user .auto-user-field .user-item.on:hover,  .read-only .auto-search-user .auto-user-field .user-item.on.added { background-color: #e5e6e6; } .auto-user-field .user-item.added { background-color: #497fc9; color: #fff; } .select-list { position: absolute; text-align: left; max-height: 200px; height: fit-content; width: 100%; overflow-y: auto; margin-top: 2px; box-shadow: 1.1px 1.7px 4px 0 rgba(0, 0, 0, 0.24); border: solid 1px #b4b5b5; background-color: #ffffff; padding: 5px 0; border-radius: 5px; font-size: 13px; color: #222222; display: none; z-index: 1; } .select-list::-webkit-scrollbar { width: 0.5em; } .select-list > li { text-align: left; list-style: none; padding: 4px 10px 4px 10px; } .select-list > li.on { background-color: #3481cf; color: #ffffff; } .select-list > li:hover, .select-list > li.hover { background-color: rgba(52, 129, 207, 0.2); cursor: pointer; } .select-list > li.on:hover, .select-list > li.on.hover { background-color: #3481cf; } .select-list > li .highlight { background-color: #91b7de; } .select-list > li > sw-avatar { height: 25px; display: inline-block; vertical-align: top; } .select-list > li > span { display: inline-block; vertical-align: top; padding: 3px 5px; max-width: calc(100% - 38px); } .auto-user-field .input-box { min-width: 100px; display: inline-block; border: none; outline: none; margin-bottom: 3px; padding: 5px 0; } .small-size .auto-user-field .input-box { padding: 2px 0; } .auto-user-field .icon-search-user { float: right; margin-right: -18px; vertical-align: top; cursor: pointer; margin-top: 6px; } .small-size .auto-user-field .icon-search-user { margin-top: 0; } .auto-search-user .search-user { position: absolute; height: 460px; border-radius: 10px; box-shadow: 0px 3px 16px 0 rgba(0, 0, 0, 0.35); border: solid 1px #e6e7e8; background-color: #ffffff; display: none; z-index: 1; } .auto-search-user .invite-user { text-align: right; font-size: 12px; font-weight: bold; color: #222; padding: 15px; padding-bottom: 0; } .auto-search-user .search-user > .invite-user > span { cursor: pointer; } .auto-search-user .search-user > div:last-of-type { height: 100%; } .auto-search-user .search-user > .invite-user + div { height: calc(100% - 27px); } "]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:U},{type:T},{type:O},{type:y},{type:x},{type:w},{type:a.TranslateService}]},e.propDecorators={type:[{type:t.Input}],readOnly:[{type:t.Input}],multiple:[{type:t.Input}],userOnly:[{type:t.Input}],smallSize:[{type:t.Input}],noSearchUser:[{type:t.Input}],showInviteUser:[{type:t.Input}],selectedDepartment:[{type:t.Input}],appendMode:[{type:t.Input}],selectedUsersChange:[{type:t.Output}],currentUser:[{type:t.Input,args:["currentUser"]}],selectedUsers:[{type:t.Input,args:["selectedUsers"]}]},e}(),_=function(){function e(e,i,n,s,o,r){this.apiService=e,this.authService=i,this.utilService=n,this.toastService=s,this.spinnerService=o,this.translate=r,this.selectedDepartmentChange=new t.EventEmitter,this.selectedDepartmentsChange=new t.EventEmitter,this.appId=this.utilService.generateAppId(),this.currentUser=this.authService.getCurrentUser(),this.arrowDownPressed=0}return e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"departments",{get:function(){return this._departments},set:function(e){var t=this;this._departments=e,this.departments&&this.departments.length>0?(setTimeout((function(){t.setSelectListPosition()})),window.addEventListener("wheel",(function(){t.departments=null}))):window.removeEventListener("wheel",(function(){}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectedDepartment",{get:function(){return this._selectedDepartment},set:function(e){this._selectedDepartment=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectedDepartments",{get:function(){return this._selectedDepartments},set:function(e){var t=this;this._selectedDepartments=e,setTimeout((function(){t.setSearchDepartmentPosition()}),300)},enumerable:!0,configurable:!0}),e.prototype.onFocusout=function(e){var t=this;e.relatedTarget&&(jQuery.contains(e.target,e.relatedTarget)||jQuery.contains(e.relatedTarget,e.target))||(window.removeEventListener("wheel",(function(){})),setTimeout((function(){t.departments=null,t.onSearchDepartment=!1}),100))},e.prototype.addToSelectedDepartments=function(e){if(e&&e.name){if(!this.multiple)return this.selectedDepartments=[e],void this.selectedDepartmentsChange.emit(this.selectedDepartments);this.selectedDepartments=this.selectedDepartments||[];for(var t=0;t<this.selectedDepartments.length;t++)if(e.id&&this.selectedDepartments[t].id===e.id)return void this.toastService.add("warn",this.translate.instant("common.error.listed-department-id"));this.selectedDepartments.push(e),this.selectedDepartmentsChange.emit(this.selectedDepartments)}},e.prototype.keydownOnInput=function(e){if(13===(e.which||e.keyCode))return $(e.target).text(""),e.stopPropagation(),!1},e.prototype.keyupOnInput=function(e){var t=e.which||e.keyCode;if(8===t&&(""===$(e.target).text()||null===$(e.target).text())){if(this.selectedDepartment&&this.selectedDepartments)return this.selectedDepartments.splice(this.selectedDepartments.length-1,1),this.selectedDepartment=null,void this.selectedDepartmentsChange.emit(this.selectedDepartments);if(this.selectedDepartments&&this.selectedDepartments.length>0&&(!this.appendMode||this.selectedDepartments[this.selectedDepartments.length-1].added))return void(this.selectedDepartment=this.selectedDepartments[this.selectedDepartments.length-1])}if(this.selectedDepartment=null,(40===t||38===t||13===t)&&this.departments&&this.departments.length>0){var i=$(e.target).parents(".auto-search-department").find(".select-list"),n=i.find("li.hover:first");if(0==n.length){if(40===t)return i.find("li:first").addClass("hover"),void(this.arrowDownPressed=(new Date).getTime());if(38===t)return i.find("li:last").addClass("hover"),this.arrowDownPressed=(new Date).getTime(),void i.scrollTop(i.prop("scrollHeight"))}else switch(t){case 40:if(n.nextAll().length>0){if(this.arrowDownPressed>(new Date).getTime()-500)return void(this.arrowDownPressed=0);var s=n.removeClass("hover").next().addClass("hover");1==s.length&&s.offset().top+s.height()>i.offset().top+i.height()&&i.scrollTop(i.scrollTop()+(s.offset().top+s.height()-(i.offset().top+i.height())))}break;case 38:if(n.prevAll().length>0){if(this.arrowDownPressed>(new Date).getTime()-500)return void(this.arrowDownPressed=0);var o=n.removeClass("hover").prev().addClass("hover");1===o.length&&o.offset().top<i.offset().top&&i.scrollTop(i.scrollTop()-(i.offset().top-o.offset().top))}break;case 13:n.attr("tabindex","-1").focus().click(),$(e.target).attr("tabindex","-1").focus()}this.arrowDownPressed=0}else if(13!==t&&188!==t||!$(e.target).text()){var r=""+$(e.target).text();this.selectListBox=$(e.target).parents(".select-list-box:first"),this.belatedSearchCompanyDepartments(r)}else $(e.target).text("")},e.prototype.belatedSearchCompanyDepartments=function(e){var t=this;this.lastKey=e,setTimeout((function(e){t.onSearching||t.lastKey!==e||(t.onSearching=!0,t.spinnerService.remove(),t.apiService.searchCompanyDepartments(t.currentUser.company.id,e).then((function(i){i&&i.status&&(t.departments=i.result),t.onSearching=!1,t.key=e}),(function(i){t.onSearching=!1,t.key=e})))}),300,e)},e.prototype.setSelectListPosition=function(){var e=this,t=this.selectListBox.find("ul.select-list");if(0!==t.length){var i=this.selectListBox,n=this.utilService.getBubbleScrollTop();if(t.css({width:i.parent().width()+"px",top:i.position().top+n+i.parent().height()+"px",left:i.position().left+"px"}),i.offset().top+i.parent().height()+t.height()>$(window).height()){var s=1===i.parents(".popup-window:first").length?i.parents(".popup-window:first").height():$(window).height();t.css({top:"auto",bottom:s-i.position().top-n+"px"})}t.show()}else setTimeout((function(){e.setSelectListPosition()}),100)},e.prototype.selectDepartment=function(e){$("sw-auto-department .select-list-box .input-box").text(""),this.addToSelectedDepartments(e),this.departments=null,this.newDepartment=new W},e.prototype.onInputFocusOut=function(e){$(e.target).text("")},e.prototype.removeDepartment=function(e){if(this.selectedDepartments)for(var t=0;t<this.selectedDepartments.length;t++)if(this.selectedDepartments[t].id&&this.selectedDepartments[t].id===e.id||this.selectedDepartments[t].name===e.name){this.selectedDepartments.splice(t,1),this.selectedDepartmentsChange.emit(this.selectedDepartments);break}return!1},e.prototype.clickOnSearchDepartment=function(e){var t=this;this.departments=null,this.departmentTree=JSON.parse(JSON.stringify(this.currentUser.company)),this.apiService.getCompanyDepartmentTree(this.currentUser.company.id).then((function(e){e&&!0===e.status&&(e.result instanceof Array?t.departmentTree.children=e.result:t.departmentTree=e.result)})),this.onSearchDepartment=!0,this.selectListBox=$(e.target).parents(".select-list-box:first"),this.setSearchDepartmentPosition()},e.prototype.setSearchDepartmentPosition=function(){var e=this;if(this.onSearchDepartment){var t=this.selectListBox.find(".search-department:first");if(0!==t.length){var i=this.selectListBox,n=this.utilService.getBubbleScrollTop();if(t.css({width:i.parent().width()+"px",top:i.position().top+n+i.parent().height()+"px",left:i.position().left+"px"}),i.offset().top+i.parent().height()+t.height()>$(window).height()){var s=1===i.parents(".popup-window:first").length?i.parents(".popup-window:first").height():$(window).height()-$("#header").height();i.offset().top-$("#header").height()>t.height()?t.css({top:"auto",bottom:s-i.position().top-n+"px"}):t.css({top:"auto",left:i.position().left-i.parent().width()+"px",bottom:s-i.position().top-n-(t.height()-i.offset().top+$("#header").height())-10+"px"})}t.show()}else setTimeout((function(){e.setSearchDepartmentPosition()}),100)}},e.decorators=[{type:t.Component,args:[{selector:"sw-auto-department",template:'<div id="{{appId}}" [ngClass]="{\'small-size\': smallSize, \'read-only\': readOnly}"> <div class="auto-search-department select-list-box" tabindex="-1" (focusout)="onFocusout($event)"> <div class="auto-department-field"> <span *ngFor="let department of selectedDepartments index as i" class="department-item" [attr.sw-title]="department.fullName || department.name" [ngClass]="{\'on\': selectedDepartment && selectedDepartment.id === department.id, \'added\': department.added}">{{department.name}} <a href="" *ngIf="!appendMode && !department.added && !readOnly" class="icon-delete-item" (click)="removeDepartment(department)"></a> <a href="" *ngIf="department.added" class="icon-delete-item-wh" (click)="removeDepartment(department)"></a> </span> <span *ngIf="!readOnly" class="input-box" contenteditable="true" (focusout)="onInputFocusOut($event)" (keydown)="keydownOnInput($event)" (keyup)="keyupOnInput($event)" (change)="changeOnInput($event)"></span> <span *ngIf="!readOnly" class="icon-search-department" (click)="clickOnSearchDepartment($event)"></span> </div> <ul *ngIf="departments && departments.length>0" class="select-list" (mousewheel)="$event.stopPropagation()"> <li *ngFor="let department of departments" (click)="selectDepartment(department)"> <span *ngIf="utilService.getSearchedNameTokens(key, department.fullName || department.name) as nameTokens" class="text-ellipsis"> <span [innerHTML]="nameTokens[0]"></span><span class="highlight" [innerHTML]="nameTokens[1]"></span><span [innerHTML]="nameTokens[2]"></span> </span> </li> </ul> <div *ngIf="onSearchDepartment" class="search-department"> <div class="search-header"> <div class="list-search"> <input type="text" autocomplete="off" [(ngModel)]="searchText" placeholder="{{\'search.text.user-department\' | translate}}" (keyup)="refreshDepartmentTree()" (click)="$event.stopPropagation()"/>  </div> </div> <div class="department-tree"> <sw-tree-department [multiple]="multiple" [selectedDepartment]="!multiple && selectedDepartments && selectedDepartments.length===1 ? selectedDepartments[0]:null" [(selectedDepartments)]="selectedDepartments" [departmentTree]="departmentTree"></sw-tree-department> </div> </div> </div> </div>',styles:[".auto-search-department {  width: calc(100% - 16px); border: solid 1px #e6e7e8; border-radius: 5px; font-size: 13px; color: #222222; background-color: #ffffff; padding: 4px 7px; padding-bottom: 0; outline: none; } .read-only >.auto-search-department {  width: 100%; border: none; padding: 5px 7px; } .small-size > .auto-search-department { padding: 5px 7px; padding-bottom: 2px; } .small-size.read-only > .auto-search-department { padding: 6px 7px; } .auto-search-department.select-list-box { cursor: default;     } .auto-department-field { width: calc(100% - 20px); } .auto-department-field .department-item { border-radius: 5px; background-color: #e5e6e6; margin-right: 5px; margin-bottom: 3px; padding: 5px 7px; display: inline-block; } .small-size >.auto-search-department .auto-department-field .department-item { padding: 0 7px; } .small-size.read-only >.auto-search-department .auto-department-field .department-item { padding: 0; } .auto-department-field .department-item:hover { background-color: #d3d6da; } .auto-department-field .user-item .icon-delete-item, .auto-department-field .user-item .icon-delete-item-wh { margin-left: 2px; } :not(.read-only) >.auto-search-department .auto-department-field .department-item.on,  :not(.read-only) >.auto-search-department .auto-department-field .department-item.on:hover,  :not(.read-only) >.auto-search-department .auto-department-field .department-item.on.added { background-color: #d3d6da; } .auto-department-field .department-item.added { background-color: #497fc9; color: #fff; } .select-list { position: absolute; text-align: left; max-height: 200px; height: fit-content; width: 100%; overflow-y: auto; margin-top: 2px; box-shadow: 1.1px 1.7px 4px 0 rgba(0, 0, 0, 0.24); border: solid 1px #b4b5b5; background-color: #ffffff; padding: 5px 0; border-radius: 5px; font-size: 13px; color: #222222; display: none; z-index: 1; } .select-list::-webkit-scrollbar { width: 0.5em; } .select-list > li { text-align: left; list-style: none; padding: 4px 10px 4px 10px; } .select-list > li.on { background-color: #3481cf; color: #ffffff; } .select-list > li:hover, .select-list > li.hover { background-color: rgba(52, 129, 207, 0.2); cursor: pointer; } .select-list > li.on:hover, .select-list > li.on.hover { background-color: #3481cf; } .select-list > li .highlight { background-color: #91b7de; } .select-list > li > span { max-width: 100%; display: inline-block; } .auto-department-field .input-box { min-width: 100px; display: inline-block; border: none; outline: none; margin-bottom: 3px; padding: 5px 0; } .small-size .auto-department-field .input-box { padding: 0; } .auto-department-field .icon-search-department { float: right; margin-right: -20px; vertical-align: top; cursor: pointer; margin-top: 6px; } .small-size .auto-department-field .icon-search-department { margin-top: 0; } .auto-search-department .search-department { position: absolute; height: 400px; border-radius: 10px; box-shadow: 0px 3px 16px 0 rgba(0, 0, 0, 0.35); border: solid 1px #e6e7e8; background-color: #ffffff; display: none; z-index: 1; } .auto-search-department .search-department .search-header { padding: 8px 9px; } .auto-search-department .search-department .search-header .list-search { background-color: #f1f3f4; border-radius: 10px; padding: 5px 20px;   } .auto-search-department .search-department .search-header .list-search input { font-size: 12px; border: none; width: 100%; vertical-align: middle; outline: none; margin-top: -7px; margin-left: -7px; background-color: #f1f3f4; } .auto-search-department .search-department .department-tree { height: calc(100% - 45px); } .auto-search-department .search-department .department-tree > sw-tree-department::-webkit-scrollbar { width: 0.5em; } "]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:U},{type:T},{type:O},{type:y},{type:w},{type:a.TranslateService}]},e.propDecorators={readOnly:[{type:t.Input}],multiple:[{type:t.Input}],smallSize:[{type:t.Input}],appendMode:[{type:t.Input}],selectedDepartmentChange:[{type:t.Output}],selectedDepartmentsChange:[{type:t.Output}],selectedDepartment:[{type:t.Input,args:["selectedDepartment"]}],selectedDepartments:[{type:t.Input,args:["selectedDepartments"]}]},e}(),B=function(){function e(e,i,n){this.translate=e,this.utilService=i,this.toastService=n,this.selectedKeywordsChange=new t.EventEmitter,this.appId=this.utilService.generateAppId(),this._selectedKeyword=null}return e.prototype.ngOnInit=function(){this.selectedKeywords=this.selectedKeywords||[],this.newKeyword||(this.newKeyword=null)},e.prototype.addToSelectedKeywords=function(e){if(e&&(this.selectedKeywords=this.selectedKeywords||[],!(this.maxKeywords>0&&this.selectedKeywords.length>=this.maxKeywords))){for(var t=0;t<this.selectedKeywords.length;t++)if(this.selectedKeywords[t]===e)return;this.selectedKeywords.push(e),this.selectedKeyword=e,this.selectedKeywordsChange.emit(this.selectedKeywords)}},Object.defineProperty(e.prototype,"selectedKeyword",{get:function(){return this._selectedKeyword},set:function(e){this._selectedKeyword=e},enumerable:!0,configurable:!0}),e.prototype.keyupOnInput=function(e){if(8===(e.which||e.keyCode)&&(""===$(e.target).text()||null===$(e.target).text())){if(this.selectedKeyword&&this.selectedKeywords){for(var t=0;t<this.selectedKeywords.length;t++)if(this.selectedKeyword===this.selectedKeywords[t]){this.selectedKeywords.splice(t,1),this.selectedKeywordsChange.emit(this.selectedKeywords);break}return void(this.selectedKeyword=null)}if(this.selectedKeywords&&this.selectedKeywords.length>0)return void(this.selectedKeyword=this.selectedKeywords[this.selectedKeywords.length-1])}this.selectedKeyword=null},e.prototype.keydownOnInput=function(e){var t=e.which||e.keyCode;13!==t&&188!==t||!$(e.target).text()||(this.newKeyword=$(e.target).text(),this.addToSelectedKeywords(this.newKeyword),this.newKeyword=null,setTimeout((function(){$(e.target).text("")})),e.preventDefault())},e.prototype.onInputFocusOut=function(e){var t=this;setTimeout((function(){$(e.target).text()&&(t.newKeyword=null,t.newKeyword=$(e.target).text(),$(e.target).text(""),t.addToSelectedKeywords(t.newKeyword),t.newKeyword=null,t.selectedKeywordsChange.emit(t.selectedKeywords))}),500)},e.prototype.removeKeyword=function(e){if(this.selectedKeywords)for(var t=0;t<this.selectedKeywords.length;t++)if(this.selectedKeywords[t]===e){this.selectedKeywords.splice(t,1),this.selectedKeywordsChange.emit(this.selectedKeywords);break}return this.selectedKeyword=null,$("#"+this.appId+" .input-box").focus(),!1},e.decorators=[{type:t.Component,args:[{selector:"sw-auto-keyword",template:'<div id="{{appId}}"> <div class="auto-keyword"> <div class="auto-keyword-field"> <span *ngFor="let keyword of selectedKeywords" class="keyword-item" [ngClass]="{\'on\': selectedKeyword === keyword}" (click)="selectedKeyword=keyword"> {{keyword}} <i [ngClass]="selectedKeyword === keyword ? \'icon-delete-item-wh\' : \'icon-delete-item\'" (click)="removeKeyword(keyword)"></i> </span> <span class="input-box" contenteditable="true" (focusout)="onInputFocusOut($event)" (keyup)="keyupOnInput($event)" (keydown)="keydownOnInput($event)"></span> </div> </div> </div>',styles:[".auto-keyword {  width: calc(100% - 16px); border: solid 1px #e6e7e8; font-size: 13px; color: #222222; background-color: #ffffff; padding: 5px 7px; padding-bottom: 0; border-radius: 5px; } .auto-keyword-field { max-width: calc(100% - 24px); display: inline-block; } .auto-keyword-field .keyword-item { border-radius: 5px; background-color: #e5e6e6; margin-right: 5px; margin-bottom: 5px; padding: 0 7px; display: inline-block; } .auto-keyword-field .keyword-item:hover { background-color: #d3d6da; } .auto-keyword-field .keyword-item.on, .auto-keyword-field .keyword-item.on:hover { background-color: #497fc9; color: #fff; } .auto-keyword-field .keyword-item .icon-delete-item { margin-left: 2px; cursor: pointer; } .auto-keyword-field .input-box { min-width: 100px; display: inline-block; border: none; outline: none; margin-bottom: 5px; }"]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:a.TranslateService},{type:O},{type:y}]},e.propDecorators={selectedKeywords:[{type:t.Input}],selectedKeywordsChange:[{type:t.Output}],maxKeywords:[{type:t.Input}]},e}(),R=function(){function e(e){this.utilService=e,this.modelChange=new t.EventEmitter,this.appId=this.utilService.generateAppId()}return e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e,this.modelChange.emit(e)},enumerable:!0,configurable:!0}),e.prototype.setModel=function(e){this.disabled||(this.model=!this.model)},e.decorators=[{type:t.Component,args:[{selector:"sw-check-box",template:'<span id="{{appId}}" class="checkbox-group" [ngClass]="{\'disabled\': disabled, \'rectangle\': rectangle}" (click)="setModel($event)"> <input type="checkbox" [(ngModel)]="model" disabled> <label> <i class="icon-checked"></i> </label> <span *ngIf="label" class="blind">{{label}}</span> </span> ',styles:[".checkbox-group { margin-left: 10px; } .checkbox-group input { position: absolute; clip: rect(1px, 1px, 1px, 1px);  } .checkbox-group input + label { display: inline-block; width: 17px; height: 17px; border: solid 1px #b4b5b5; border-radius: 50%; background-color: #ffffff;   cursor: pointer; } .checkbox-group.rectangle input + label { width: 13px; height: 13px; border-radius: 3px; } .checkbox-group.disabled input + label { cursor: default; } .checkbox-group input:checked + label { background-color: #3481cf; border: none; width: 19px; height: 19px; text-align: center; } .checkbox-group.rectangle input:checked + label { width: 15px; height: 15px; } .checkbox-group input:checked + label > .icon-checked { display: inline-block;   } .checkbox-group.rectangle input:checked + label > .icon-checked { vertical-align: top; margin: 3px 2px;   } .checkbox-group > label, .checkbox-group > span { vertical-align: top; display: inline-block; margin-left: 5px; } "]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:O}]},e.propDecorators={modelChange:[{type:t.Output}],label:[{type:t.Input}],disabled:[{type:t.Input}],rectangle:[{type:t.Input}],model:[{type:t.Input,args:["model"]}]},e}(),G=function(){function e(e){this.utilService=e,this.modelChange=new t.EventEmitter,this.appId=this.utilService.generateAppId()}return e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e,this.modelChange.emit(e)},enumerable:!0,configurable:!0}),e.prototype.setModel=function(e){if(this.disabled)return!1;this.model=e},e.decorators=[{type:t.Component,args:[{selector:"sw-toggle-box",template:'<span id="{{appId}}" class="togglebox-group" [ngClass]="{\'disabled\': disabled}" > <div class="toggle slide"> <input id="chk{{appId}}" type="checkbox" [ngModel]="model" (change)="setModel($event)"/> <label for="chk{{appId}}"> <div class="card slide"></div> <span>{{\'common.text.toggle-on\' | translate}}</span> <span>{{\'common.text.toggle-off\' | translate}}</span>     </label>\t     </div> </span> ',styles:[".toggle { display: inline-block; position: relative; width: 132px; height: 24px; background: #fff; align-self:center; -webkit-user-select:none; -moz-user-select:none; -ms-user-select:none; user-select:none; font-size: 11px; color: #afb0b1; border: 1px solid #afb0b1; } input { display:none; } label { position:absolute; top:0; left:0; right:0; bottom:0; -webkit-perspective:1000; perspective:1000;  cursor:pointer; } .togglebox-group.disabled label { cursor: default; } .card { position:relative; background: #3481cf; transition:.4s; width: 50%; height: 100%; pointer-events:none; color: #fff; } input:not(:checked) + label .card {  background: #afb0b1; color: #fff;  } .slide .card { -webkit-transform:translate(0); transform:translate(0); } .slide input:not(:checked) + label .card { -webkit-transform:translateX(66px); transform:translateX(66px); } label > span { display: inline-block; width: 50%; height: 100%; position: absolute; margin-top: -24px; line-height: 24px; text-align: center; } input:checked + label > span:first-of-type { color: #fff; } input:not(:checked) + label > span:last-of-type { color: #fff; } label > span:last-of-type { left: 50%; }"]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:O}]},e.propDecorators={disabled:[{type:t.Input}],modelChange:[{type:t.Output}],model:[{type:t.Input,args:["model"]}]},e}(),K=function(){function e(e){this.utilService=e,this.modelChange=new t.EventEmitter,this.appId=this.utilService.generateAppId()}return e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e,this.modelChange.emit(e)},enumerable:!0,configurable:!0}),e.prototype.setModel=function(e){this.disabled||(this.model=!this.model)},e.decorators=[{type:t.Component,args:[{selector:"sw-slide-box",template:'<span id="{{appId}}" class="slidebox-group" [ngClass]="{\'disabled\': disabled}"> <span class="bar" [ngClass]="{\'on\': model===true}"> <span class="button"  (click)="setModel($event)"></span> </span> </span> ',styles:[".slidebox-group { } .slidebox-group > .bar { display: inline-block; width: 35px; height: 12px; border-radius: 6px; background-color: #d9dada; } .slidebox-group > .bar.on { background-color: #3481cf4d; } .slidebox-group > .bar .button { width: 18px; height: 18px; border: solid 1px #d9dada; border-radius: 50%; background-color: var(--white); display: inline-block; float: left; margin-top: -4px; transition: margin-left 300ms ease; cursor: pointer; } .slidebox-group.disabled > .bar .button { cursor: default; } .slidebox-group > .bar.on .button { border: solid 1px var(--main-blue); background-color: var(--main-blue); margin-left: 15px; } "]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:O}]},e.propDecorators={modelChange:[{type:t.Output}],label:[{type:t.Input}],disabled:[{type:t.Input}],model:[{type:t.Input,args:["model"]}]},e}(),H=function(){function e(e,i,n,s,o,r,a){var l=this;this.translate=e,this.apiService=i,this.utilService=n,this.toastService=s,this.publishService=o,this.authService=r,this.spinnerService=a,this.selectedMembersChange=new t.EventEmitter,this.selectedMemberChange=new t.EventEmitter,this.refreshChange=new t.EventEmitter,this.appId=this.utilService.generateAppId(),this.currentUser=null,this.currentCompany=null,this.searchText=null,this.searchOrders=null,this.currentOrder=null,this.myCompanyUsers=null,this.departmentUsers=null,this.groupSelectionAll={},this.selectedUser=null,this._selectedMembers=[],this.currentUser=r.getCurrentUser(),this.currentCompany=this.currentUser.company,this.publishService.currentUserChange.subscribe((function(e){e&&(l.currentUser=e,l.currentCompany=l.currentUser.company,l.refreshData())}))}return e.prototype.ngOnInit=function(){var e=this;this.setSearchOrder(this.getSearchOrders()[0]),this.departmentTree=JSON.parse(JSON.stringify(this.currentUser.company)),this.apiService.getCompanyDepartmentTree(this.currentCompany.id).then((function(t){t&&!0===t.status&&t.result&&(t.result instanceof Array?e.departmentTree.children=t.result:e.departmentTree=t.result)}))},e.prototype.refreshData=function(){this.setSearchOrder(this.currentOrder)},Object.defineProperty(e.prototype,"refresh",{set:function(e){var t=this;!0===e&&(this.refreshData(),setTimeout((function(){t.refreshChange.emit(!1)}),300))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"guestOnly",{get:function(){return this._guestOnly},set:function(e){this._guestOnly=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectedMember",{set:function(e){this.selectedUser=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectedMembers",{get:function(){return this._selectedMembers},set:function(e){var t=this;if(this.appendMode&&(!this.selectedMembers||0===this.selectedMembers.length)&&e&&e.length>0&&(this.unselectableMembers=JSON.parse(JSON.stringify(e))),this._selectedMembers=e,this.currentOrder&&"byDepartment"===this.currentOrder.id&&!this.userOnly&&(this.groupSelectionAll={},this.userSelectionAll=!1,this.selectedDepartments=[]),this.selectedDepartments=this.selectedDepartments||[],this.myCompanyUsers&&this.myCompanyUsers.forEach((function(e){e.selected=!1})),this.selectedMembers&&this.myCompanyUsers)for(var i=0;i<this.selectedMembers.length;i++)if(this.utilService.isDepartmentId(this.selectedMembers[i].id)){this.groupSelectionAll[this.selectedMembers[i].id]=!0,this.selectedDepartments.push(this.selectedMembers[i]);for(var n=0;n<this.myCompanyUsers.length;n++)this.myCompanyUsers[n].department&&this.myCompanyUsers[n].department.id===this.selectedMembers[i].id&&(this.myCompanyUsers[n].selected=!0);this.apiService.getDescendantsFromDepartmentId(this.selectedMembers[i].id).then((function(e){if(e&&!0===e.status&&e.result)for(var i=0;i<e.result.length;i++){var n=e.result[i];t.groupSelectionAll[n.id]=!0;for(var s=0;s<t.myCompanyUsers.length;s++)t.myCompanyUsers[s].department&&t.myCompanyUsers[s].department.id===n.id&&(t.myCompanyUsers[s].selected=!0);t.selectedDepartments.push(n)}}))}else if(this.utilService.isCompanyId(this.selectedMembers[i].id)){this.groupSelectionAll[this.selectedMembers[i].id]=!0,this.selectedDepartments.push(this.selectedMembers[i]);for(n=0;n<this.myCompanyUsers.length;n++)this.myCompanyUsers[n].selected=!0;this.apiService.getDescendantsFromDepartmentId(this.selectedMembers[i].id).then((function(e){if(e&&!0===e.status&&e.result)for(var i=0;i<e.result.length;i++){var n=e.result[i];t.groupSelectionAll[n.id]=!0,t.selectedDepartments.push(n)}}))}else for(n=0;n<this.myCompanyUsers.length;n++)if(this.selectedMembers[i].id===this.myCompanyUsers[n].id){this.myCompanyUsers[n].selected=!0;break}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectedDepartment",{get:function(){return this._selectedDepartment},set:function(e){var t=this;this._selectedDepartment=e,e&&(this.departmentUsers=this.myCompanyUsers.filter((function(e){return t.utilService.isCompanyId(t.selectedDepartment.id)&&!e.department||e.department&&e.department.id===t.selectedDepartment.id})),this.utilService.isCompanyId(this.selectedDepartment.id)||this.apiService.getAscendantsFromDepartmentId(this.selectedDepartment.id).then((function(e){e&&!0===e.status&&(t._selectedDepartment.parents=e.result)})))},enumerable:!0,configurable:!0}),e.prototype.getSearchOrders=function(){var e=new Array;return e.push({id:"byUserName",name:this.translate.instant("search.text.byUserName")}),this.currentCompany.hasDepartment&&e.push({id:"byDepartment",name:this.translate.instant("search.text.byDepartment")}),this.currentCompany.hasPosition&&e.push({id:"byPosition",name:this.translate.instant("search.text.byPosition")}),e},e.prototype.openSearchOrders=function(e){return this.searchOrders=this.getSearchOrders(),!1},e.prototype.setSearchOrder=function(e){var t=this;return this.currentOrder=e,this.searchOrders=null,this.myCompanyUsers=null,this.currentOrder&&"byDepartment"!==this.currentOrder.id&&(this.selectedDepartment=null),this.searchText&&""!==this.searchText&&this.spinnerService.remove(),!!this.currentCompany&&(this.apiService.searchCompanyUsers(this.currentCompany.id,this.searchText,this.guestOnly).then((function(e){if(e&&!0===e.status&&e.result){for(var i=0;i<e.result.length;i++){e.result[i].initialChar=t.utilService.getInitialChar(e.result[i].name);for(var n=0;n<(t.selectedMembers||[]).length;n++)if(e.result[i].id===t.selectedMembers[n].id){e.result[i].selected=!0;break}if(t.appendMode)for(n=0;n<(t.unselectableMembers||[]).length;n++)if(e.result[i].id===t.unselectableMembers[n].id){e.result[i].unselectable=!0;break}}if(t.myCompanyUsers=e.result,t.prevSearchText!==t.searchText&&(t.userSelectionAll=!1,t.groupSelectionAll={},t.prevSearchText=t.searchText),t.useSortBy)switch(t.currentOrder.id){case"byPosition":t.myCompanyUsers=t.myCompanyUsers.sort((function(e,t){return e.position?t.position?e.position.name>t.position.name?1:e.position.name<t.position.name?-1:0:-1:1}));break;case"byDepartment":if(t.userOnly){t.myCompanyUsers=t.myCompanyUsers.sort((function(e,t){return e.department?t.department?e.department.name>t.department.name?1:e.department.name<t.department.name?-1:0:1:-1}));break}case"byUserName":t.myCompanyUsers=t.myCompanyUsers.sort((function(e,t){return e.initialChar>t.initialChar?1:e.initialChar<t.initialChar?-1:0}))}}}),(function(e){t.myCompanyUsers=null})),!1)},e.prototype.changeSelectedMembersForAscendants=function(e,t){var i=this;this.apiService.getAscendantsFromDepartmentId(e).then((function(n){if(n&&!0===n.status&&n.result)for(var s=n.result.reverse(),o=null,r=0;r<s.length;r++){o=s[r];for(var a=!1,l=0;l<t.length;l++)if(t[l].id===o.id){t.splice(l,1),a=!0;break}for(l=0;l<i.myCompanyUsers.length;l++)(i.utilService.isCompanyId(o.id)&&!i.myCompanyUsers[l].department||!i.utilService.isCompanyId(o.id)&&i.myCompanyUsers[l].department&&i.myCompanyUsers[l].department.id===o.id)&&(i.myCompanyUsers[l].added=!0,t.push(i.myCompanyUsers[l]));if(i.apiService.getChildrenFromDepartmentId(o.id).then((function(n){if(n&&!0===n.status&&n.result)for(var o=0;o<n.result.length;o++){for(var r=!1,a=0;a<s.length;a++)if(s[a].id===n.result[o].id){r=!0;break}r||n.result[o].id===e||(n.result[o].added=!0,t.push(n.result[o]))}i.selectedMembersChange.emit(JSON.parse(JSON.stringify(t||[])))})),a)break}i.selectedMembersChange.emit(JSON.parse(JSON.stringify(t||[])))}),(function(e){i.selectedMembersChange.emit(JSON.parse(JSON.stringify(t||[])))}))},e.prototype.toggleGroupSelection=function(e,t){var i=this;if(t||"byPosition"!==this.currentOrder.id||(t={id:"none"}),t){var n=JSON.parse(JSON.stringify(this._selectedMembers||[]));if(this.groupSelectionAll[t.id]=!this.groupSelectionAll[t.id],this.utilService.isDepartmentId(t.id)&&!this.userOnly){if(this.groupSelectionAll[t.id]){for(var s=0;s<n.length;s++)n[s].department&&n[s].department.id===t.id&&(n.splice(s,1),s--);t.added=!0,n.push(t),this.apiService.getDescendantsFromDepartmentId(t.id).then((function(e){if(e&&!0===e.status&&e.result)for(var t=0;t<e.result.length;t++)for(var s=e.result[t],o=0;o<n.length;o++)(n[o].id===s.id||n[o].department&&i.selectedMembers[o].department.id===s.id)&&(n.splice(o,1),o--);i.selectedMembersChange.emit(n)}),(function(e){i.selectedMembersChange.emit(n)}))}else{for(s=0;s<n.length;s++)if(n[s].id===t.id)return n.splice(s,1),this.selectedMembersChange.emit(n),!1;this.changeSelectedMembersForAscendants(t.id,n)}return!1}if(this.utilService.isCompanyId(t.id)&&!this.userOnly)n=[],this.groupSelectionAll[t.id]&&(t.added=!0,n=[t]);else{var o="initialChar";this.utilService.isCompanyId(t.id)||this.utilService.isDepartmentId(t.id)?o="department":(this.utilService.isPositionId(t.id)||"none"===t.id)&&(o="position");for(s=0;s<this.myCompanyUsers.length;s++)if(this.myCompanyUsers[s][o]&&this.myCompanyUsers[s][o].id===t.id||"initialChar"===o&&this.myCompanyUsers[s][o]===t.id||this.utilService.isCompanyId(t.id)&&!this.myCompanyUsers[s].department||"none"===t.id&&!this.myCompanyUsers[s].position){this.myCompanyUsers[s].selected=this.groupSelectionAll[t.id];for(var r=0;r<n.length;r++)if(n[r].id===this.myCompanyUsers[s].id){n.splice(r,1);break}this.myCompanyUsers[s].selected&&(this.myCompanyUsers[s].added=!0,n.push(this.myCompanyUsers[s]))}}return this.selectedMembersChange.emit(n),!1}},e.prototype.selectUser=function(e){this.selectedUser=e,this.selectedMemberChange.emit(e),this.multiple||(e.added=!0,this.selectedMembersChange.emit([e]))},e.prototype.toggleUserSelection=function(e,t){e.stopPropagation();var i=JSON.parse(JSON.stringify(this.selectedMembers||[]));if(-1===t){this.userSelectionAll=!this.userSelectionAll;for(var n=0;n<this.myCompanyUsers.length;n++)this.myCompanyUsers[n].selected=this.userSelectionAll;if(this.userSelectionAll){var s=[];for(n=0;n<this.myCompanyUsers.length;n++){for(var o=!1,r=0;r<i.length;r++)if(this.myCompanyUsers[n].id===i[r].id){o=!0;break}o||(this.myCompanyUsers[n].added=!0,s=this.myCompanyUsers[n])}i=i.concat(s)}else i=[]}else{this.myCompanyUsers[t].selected=!this.myCompanyUsers[t].selected;for(o=!1,n=0;n<i.length;n++)if(i[n].id===this.myCompanyUsers[t].id){this.myCompanyUsers[t].selected||i.splice(n,1),o=!0;break}if(this.myCompanyUsers[t].selected&&!o&&(this.myCompanyUsers[t].added=!0,i.push(this.myCompanyUsers[t])),!this.myCompanyUsers[t].selected)if(this.useSortBy){var a=this.myCompanyUsers[t].department?this.myCompanyUsers[t].department.id:this.currentCompany.id;if(this.groupSelectionAll[a]){this.groupSelectionAll[a]=!1;for(n=0;n<i.length;n++)if(i[n].id===a){i.splice(n,1);break}for(n=0;n<this.myCompanyUsers.length;n++)n!==t&&(this.myCompanyUsers[n].department&&this.myCompanyUsers[n].department.id===a||!this.myCompanyUsers[n].department&&this.utilService.isCompanyId(a))&&(this.myCompanyUsers[n].selected=!0,this.myCompanyUsers[n].added=!0,i.push(this.myCompanyUsers[n]))}switch(this.currentOrder.id){case"byPosition":this.groupSelectionAll[this.myCompanyUsers[t].position?this.myCompanyUsers[t].position.id:"none"]=!1;break;case"byUserName":this.groupSelectionAll[this.myCompanyUsers[t].initialChar]=!1}}else this.userSelectionAll=!1}return this.selectedMembersChange.emit(i),!1},e.prototype.toggleDepartmentUserSelection=function(e,t){var i=this;e.stopPropagation();var n=JSON.parse(JSON.stringify(this.selectedMembers||[]));this.departmentUsers[t].selected=!this.departmentUsers[t].selected;for(var s=!1,o=0;o<n.length;o++)if(n[o].id===this.departmentUsers[t].id){this.departmentUsers[t].selected||n.splice(o,1),s=!0;break}if(this.departmentUsers[t].selected)this.departmentUsers[t].added=!0,n.push(this.departmentUsers[t]);else{if(this.useSortBy){var r=(this.departmentUsers[t].department?this.departmentUsers[t].department:this.currentCompany).id;if(s)this.selectedMembersChange.emit(n);else{for(o=0;o<this.departmentUsers.length;o++)o!==t&&(this.departmentUsers[o].added=!0,n.push(this.departmentUsers[o]));this.apiService.getChildrenFromDepartmentId(r).then((function(e){if(e&&!0===e.status&&e.result)for(var t=0;t<e.result.length;t++)e.result[t].id!==r&&(e.result[t].added=!0,n.push(e.result[t]));i.selectedMembersChange.emit(JSON.parse(JSON.stringify(n||[])))}),(function(e){i.selectedMembersChange.emit(JSON.parse(JSON.stringify(n||[])))}));for(o=0;o<n.length;o++)if(n[o].id===r)return n.splice(o,1),this.selectedMembersChange.emit(n),!1;this.changeSelectedMembersForAscendants(r,n)}return!1}this.userSelectionAll=!1}return this.selectedMembersChange.emit(n),!1},e.prototype.findInDepartmentTree=function(e,t){var i=null;if(!e||!t)return null;if(e.id===t)return(i=JSON.parse(JSON.stringify(e))).children=null,i;if(e.children&&e.children.length>0)for(var n=0;n<e.children.length;n++)if(i=this.findInDepartmentTree(e.children[n],t))return i;return null},e.prototype.onToggleDepartmentSelection=function(e){if(e){var t=this.findInDepartmentTree(this.departmentTree,e.id);t&&this.toggleGroupSelection(null,t)}},e.decorators=[{type:t.Component,args:[{selector:"sw-search-user",template:'<div id="{{appId}}" class="search-user-list" [ngClass]="{\'no-search\': guestOnly}"> <div class="search-header"> <div *ngIf="!guestOnly" class="list-search"> <input type="text" autocomplete="off" [(ngModel)]="searchText" placeholder="{{\'search.text.user-department\' | translate}}" (keyup)="setSearchOrder(currentOrder)"/>\t </div> <div *ngIf="useSortBy" class="list-header"> <sw-select-box class="sort-by" [selectedObject]="currentOrder" (selectedObjectChange)="setSearchOrder($event)" [selectObjects]="searchOrders" (refreshSelectObjects)="openSearchOrders($event)"></sw-select-box> </div>   <div *ngIf="!useSortBy" class="list-header"> <span>{{\'common.text.all\' | translate}} {{myCompanyUsers ? myCompanyUsers.length : 0}}{{\'common.text.total-users\' | translate}}</span> <sw-check-box *ngIf="multiple && myCompanyUsers" class="user-select" [model]="userSelectionAll" (click)="toggleUserSelection($event, -1)"></sw-check-box> </div>   </div> <ul class="search-list" *ngIf="currentOrder.id === \'byUserName\'"> <li *ngFor="let user of myCompanyUsers index as i"> <div *ngIf="useSortBy && (i === 0 || myCompanyUsers[i-1].initialChar !== user.initialChar)" class="user-group-item"> <span>{{user.initialChar}}</span> <sw-check-box *ngIf="multiple && !user.unselectable" class="user-select" [model]="groupSelectionAll[user.initialChar]" (click)="toggleGroupSelection($event, {id: user.initialChar})"></sw-check-box> </div>   <div class="user-item" [ngClass]="{\'on\': selectedUser && selectedUser.id === user.id}" (click)="selectUser(user)"> <sw-avatar [selectedUser]="user" [size]="36"></sw-avatar> <span class="name">{{user.name}}<span *ngIf="guestOnly" class="guest">-Guest</span></span> <sw-check-box *ngIf="multiple && !user.unselectable" class="user-select" [model]="myCompanyUsers[i].selected" (click)="toggleUserSelection($event, i)"></sw-check-box>  </div> </li> </ul> <div *ngIf="currentOrder.id === \'byDepartment\' && multiple && !userOnly" class="department-tree"> <sw-tree-department [multiple]="true" [smallSize]="true"  [(selectedDepartment)]="selectedDepartment" [selectedDepartments]="selectedDepartments" (toggleSelectionChange)="onToggleDepartmentSelection($event)" [departmentTree]="departmentTree"></sw-tree-department> </div> <div *ngIf="currentOrder.id === \'byDepartment\' && multiple && !userOnly" class="department-pathname"> <div *ngIf="selectedDepartment"> <span *ngFor="let parent of selectedDepartment.parents index as i"><span class="department-name">{{parent.name}}</span><span class="arrow">▶</span></span> <span class="department-name">{{selectedDepartment.name}}</span> </div> </div> <ul class="search-list has-department-tree" *ngIf="currentOrder.id === \'byDepartment\' && multiple && !userOnly"> <li *ngFor="let user of departmentUsers index as i"> <div class="user-item" [ngClass]="{\'on\': selectedUser && selectedUser.id === user.id}" (click)="selectUser(user)"> <sw-avatar [selectedUser]="user" [size]="36"></sw-avatar> <span class="name">{{user.name}}</span> <sw-check-box *ngIf="!user.unselectable" class="user-select" [model]="departmentUsers[i].selected" (click)="toggleDepartmentUserSelection($event, i)"></sw-check-box>  </div> </li> </ul> <ul class="search-list" *ngIf="currentOrder.id === \'byDepartment\' && (userOnly || !multiple)"> <li *ngFor="let user of myCompanyUsers index as i"> <div *ngIf="user.department && useSortBy && (i === 0 || !myCompanyUsers[i-1].department || myCompanyUsers[i-1].department.id !== user.department.id)" class="user-group-item"> <span>{{user.department.name}}</span> <sw-check-box *ngIf="multiple" class="user-select" [model]="groupSelectionAll[user.department.id]" (click)="toggleGroupSelection($event, user.department)"></sw-check-box> </div>             <div *ngIf="!user.department && useSortBy && (i === 0 || myCompanyUsers[i-1].department)" class="user-group-item"> <span>{{currentCompany.name}}</span> <sw-check-box *ngIf="multiple" class="user-select" [model]="groupSelectionAll[currentCompany.id]" (click)="toggleGroupSelection($event, currentCompany)"></sw-check-box> </div>             <div class="user-item" [ngClass]="{\'on\': selectedUser && selectedUser.id === user.id}" (click)="selectUser(user)"> <sw-avatar [selectedUser]="user" [size]="36"></sw-avatar> <span class="name">{{user.name}}</span> <sw-check-box *ngIf="multiple && !user.unselectable" class="user-select" [model]="myCompanyUsers[i].selected" (click)="toggleUserSelection($event, i)"></sw-check-box>  </div> </li> </ul> <ul class="search-list" *ngIf="currentOrder.id === \'byPosition\'"> <li *ngFor="let user of myCompanyUsers index as i"> <div *ngIf="user.position && useSortBy && (i === 0 || !myCompanyUsers[i-1].position || myCompanyUsers[i-1].position.id !== user.position.id)" class="user-group-item"> <span>{{user.position.name}}</span> <sw-check-box *ngIf="multiple" class="user-select" [model]="groupSelectionAll[user.position.id]" (click)="toggleGroupSelection($event, user.position)"></sw-check-box> </div>   <div *ngIf="!user.position && useSortBy && (i === 0 || myCompanyUsers[i-1].position)" class="user-group-item"> <span>{{\'common.text.empty\' | translate}}</span> <sw-check-box *ngIf="multiple" class="user-select" [model]="groupSelectionAll[\'none\']" (click)="toggleGroupSelection($event, user.position)"></sw-check-box> </div>   <div class="user-item" [ngClass]="{\'on\': selectedUser && selectedUser.id === user.id}" (click)="selectUser(user)"> <sw-avatar [selectedUser]="user" [size]="36"></sw-avatar> <span class="name">{{user.name}}</span> <sw-check-box *ngIf="multiple && !user.unselectable" class="user-select" [model]="myCompanyUsers[i].selected" (click)="toggleUserSelection($event, i)"></sw-check-box>  </div> </li> </ul> </div> ',styles:[".search-user-list { height: 100%; } .search-header { padding: 8px 9px; border-bottom: solid 1px #e6e7e8; } .search-header .list-search { background-color: #f1f3f4; border-radius: 10px; padding: 5px 20px;   } .search-header .list-search input { font-size: 12px; border: none; width: 100%; vertical-align: middle; outline: none; margin-top: -7px; margin-left: -7px; background-color: #f1f3f4; } .invite-new-member { font-size: 12px; font-weight: bold; color: #0e1b26; text-align: right; margin-bottom: 8px;\t } .list-header { min-height: 24px; color: #666464; font-size: 11px } .list-header > span { display: inline-block; vertical-align: bottom; margin-bottom: -8px; } .list-header .user-select { float: right; margin: 6px 10px 0 0; } .list-header .sort-by { float: right; margin-top: 6px; } .search-list { padding: 0; height: calc(100% - 75px); overflow-y: scroll; } .search-list.has-department-tree { height: calc(100% - 75px - 145px - 37px); } .search-user-list.no-search > .search-list { height: calc(100% - 41px); } .search-list.two-block { overflow-y: hidden; } .search-list .user-group-item { font-size: 12px; color: #666464; padding: 5px 7px; overflow: hidden; border-bottom: solid 1px #e6e7e8; } .user-group-item .user-select { float: right; margin-right: 5px; } .search-list .user-item:hover { background-color: #f7f5f5; } .search-list .user-item { border-bottom: solid 1px #e6e7e8; font-size: 15px; height: 38px; font-weight: bold; color: #222222; padding: 5px 36px 5px 7px; overflow: hidden; cursor: pointer; } .search-list .user-item.on, .search-list .user-item.on:hover { background-color: #eaeff4; } .search-list .user-item img, .search-list .user-item span{ vertical-align: middle; } .search-list .user-item .name { font-size: 15px; font-weight: bold; text-align: left; margin-left: 12px; color: #222222; vertical-align: top; margin-top: 7px; display: inline-block; } .search-list .user-item .name > .guest { font-size: 11px; font-weight: normal; color: #222222; display: inline-block; } .search-list .user-item .user-select { float: right; margin: 9px -24px 0 0; } .search-user-list .department-tree { height: 145px; margin-top: -1px; margin-bottom: -1px; } .search-user-list .department-pathname { height: 17px; font-size: 11px; border-top: 1px solid #e6e7e8; border-bottom: 1px solid #e6e7e8; padding: 8px 7px; padding-bottom: 10px; overflow-x: auto; overflow-y: hidden; white-space: nowrap; } .search-user-list .department-pathname::-webkit-scrollbar { height: 3px; } .search-user-list .department-pathname .department-name { font-size: 11px; color: #666464; border-radius: 5px; padding: 1px 5px; border: solid 1px #d8d9db; background-color: #eeeeee; cursor: pointer; } .search-user-list .department-pathname .department-name:last-of-type { color: #fff; background-color: #3481cf; margin-right: 5px; cursor: default; } .search-user-list .department-pathname .arrow { font-size: 9px; margin: 5px; }"]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:a.TranslateService},{type:U},{type:O},{type:y},{type:x},{type:T},{type:w}]},e.propDecorators={appendMode:[{type:t.Input}],useSortBy:[{type:t.Input}],userOnly:[{type:t.Input}],multiple:[{type:t.Input}],selectedMembersChange:[{type:t.Output}],selectedMemberChange:[{type:t.Output}],refreshChange:[{type:t.Output}],refresh:[{type:t.Input,args:["refresh"]}],guestOnly:[{type:t.Input,args:["guestOnly"]}],selectedMember:[{type:t.Input,args:["selectedMember"]}],selectedMembers:[{type:t.Input,args:["selectedMembers"]}]},e}(),J=function(){function e(e,i,n){this.utilService=e,this.toastService=i,this.translate=n,this.keyId="id",this.nameId="name",this.selectedObjectChange=new t.EventEmitter,this.refreshSelectObjects=new t.EventEmitter,this.appId=this.utilService.generateAppId()}return e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"selectObjects",{get:function(){return this._selectObjects},set:function(e){this._selectObjects=e,this.selectObjects&&(this.listObjects=this.selectObjects)},enumerable:!0,configurable:!0}),e.prototype.setSelectListPosition=function(){var e=this;if(this.selectListBox){var t=this.selectListBox.find("ul.select-list");if(0!==t.length){var i=this.selectListBox;if("a"===this.type?t.css({top:"auto",bottom:"auto",left:Math.max(i.position().left+i.width()-t.width(),5)+"px"}):"b"===this.type?t.css({top:"auto",bottom:"auto",left:"auto","margin-left":"-8px","margin-top":"30px","margin-right":-1*t.width()+"px"}):"c"===this.type?t.css({top:i.offset().top+i.height()-$("#work-list").offset().top+"px",bottom:"auto",left:"auto","margin-left":"-8px","margin-top":"0","margin-right":-1*t.width()+"px"}):t.css({top:i.position().top+i.height()+"px",left:Math.max(i.position().left+i.width()-t.width(),5)+"px"}),i.offset().top+i.height()+t.height()>$(window).height())if("a"===this.type)t.css({"margin-top":-(i.parents("sw-select-box:first").outerHeight()+t.outerHeight())+"px"});else if("b"===this.type);else if("c"===this.type)t.css({top:"auto",bottom:$(window).height()-i.offset().top+"px"});else if(this.selectListBox.parents(".popup-window").length){var n=this.selectListBox.parents(".popup-window");t.css({top:"auto",bottom:n.height()-i.position().top+"px"})}else t.css({top:"auto",bottom:$(window).height()-i.offset().top+"px"});t.show()}else setTimeout((function(){e.setSelectListPosition()}),100)}},Object.defineProperty(e.prototype,"listObjects",{get:function(){return this._listObjects},set:function(e){var t=this;this._listObjects=e,this.listObjects&&this.listObjects.length>0?(setTimeout((function(){t.setSelectListPosition()})),window.addEventListener("wheel",(function(){t.listObjects=null}))):window.removeEventListener("wheel",(function(){}))},enumerable:!0,configurable:!0}),e.prototype.onFocusout=function(e){var t=this;window.removeEventListener("wheel",(function(){})),setTimeout((function(e){t.listObjects=null}),300)},e.prototype.selectObject=function(e,t){e.stopPropagation(),this.selectedObject=t,this.listObjects=null,this.selectedObjectChange.emit(t)},e.prototype.openListObjects=function(e){var t=$(e.target||e.srcElement);this.selectListBox=t.hasClass("select-list-box")?t:t.parents(".select-list-box:first"),this.selectListBox.focus(),this.selectObjects&&this.selectObjects.length>0?this.listObjects=this.selectObjects:(this.listObjects=null,this.refreshSelectObjects.emit(e))},e.decorators=[{type:t.Component,args:[{selector:"sw-select-box",template:'<div id="{{appId}}" class="select-list-box" tabindex="-1" (focusout)="listObjects=null" (click)="openListObjects($event)" (mousewheel)="$event.stopPropagation()"> <span *ngIf="selectedObject && selectedObject.iconClass" class="icon {{selectedObject.iconClass}}"></span> <span class="selected-name">{{selectedObject ? (selectedObject[nameId] || selectedObject) : \'common.text.empty\' | translate}}</span> <i class="icon-select-list"></i> <ul *ngIf="listObjects" class="select-list" [ngClass]="{\'relative\': type === \'b\'}"> <li *ngFor="let listObject of listObjects" (click)="selectObject($event, listObject)" [ngClass]="{\'on\': (!selectedObject && listObject[keyId] === \'none\') || (selectedObject && ((listObject[keyId] && listObject[keyId] === selectedObject[keyId]) || listObject === selectedObject))}"> <span *ngIf="listObject.colorCode" class="color-code" [style.background-color]="listObject.colorCode"></span> <span>{{listObject[nameId] || listObject}}</span> <i *ngIf="selectedObject && ((listObject[keyId] && listObject[keyId] === selectedObject[keyId]) || listObject === selectedObject)" class="icon-list-checked"></i> </li> </ul> </div>',styles:[".select-list-box { display: inline-block; outline: none; cursor: pointer; } .select-list-box .select-list { position: absolute; box-shadow: 1.1px 1.7px 4px 0 rgba(0, 0, 0, 0.24); border: solid 1px #b4b5b5; background-color: #ffffff; padding: 5px 0; border-radius: 5px; font-size: 13px; color: #222222; z-index: 1000; display: none; max-height:512px; overflow-y: auto; } .select-list-box .select-list.relative { position: relative; float: left; } .select-list-box .select-list::-webkit-scrollbar { width: 0.5em; } .select-list-box .select-list > li { list-style: none; padding: 4px 30px 4px 10px; text-align: left; } .select-list-box .select-list > li.on { background-color: #3481cf; color: #ffffff; } .select-list-box .select-list > li:hover { background-color: rgba(52, 129, 207, 0.2); cursor: pointer; } .select-list-box .select-list > li.on:hover { background-color: #3481cf; } .select-list-box .select-list > li > .color-code { display: inline-block; margin: 3px; width: 5px; height: 5px; border-radius: 50%; } .select-list-box .select-list > li > span { white-space: nowrap; } .select-list-box .select-list > li > .color-code + span { padding-left: 10px; } "]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:O},{type:y},{type:a.TranslateService}]},e.propDecorators={selectedObject:[{type:t.Input}],keyId:[{type:t.Input}],nameId:[{type:t.Input}],type:[{type:t.Input}],selectedObjectChange:[{type:t.Output}],refreshSelectObjects:[{type:t.Output}],selectObjects:[{type:t.Input,args:["selectObjects"]}]},e}(),V=function(){function e(e,t){this.publishService=e,this.translate=t,this.showConfirm=!1,this.level="info",this.event=null}return e.prototype.confirm=function(e,t,i){var n=this;return void 0===t&&(t=!1),void 0===i&&(i=null),this.showConfirm=!0,this.message=e,this.isFloating=t,this.event=i,this.level="info",this.description=null,this.buttons=null,this.publishService.pubChangeNotice({source:"confirmService"}),new Promise((function(e,t){n.publishService.changeNotice.subscribe((function(i){i&&"confirmCallback"===i.source&&(i.result?e():t())}))}))},e.prototype.confirmSimple=function(e,t){return this.confirm(e,!0,t)},e.prototype.saveConfirm=function(e,t,i,n,s){void 0===n&&(n=this.dummyCallback),void 0===s&&(s=this.dummyCallback),this.showConfirm=!0,this.message=e,this.description=t,this.buttons=[{name:this.translate.instant("common.button.cancel"),callback:s},{name:this.translate.instant("common.button.temp-save"),callback:n},{name:this.translate.instant("common.button.confirm"),callback:i}],this.isFloating=!1,this.level="delete",this.event=event,this.publishService.pubChangeNotice({source:"confirmService"})},e.prototype.warning=function(e,t){var i=this;return void 0===t&&(t=null),this.showConfirm=!0,this.message=e,this.description=t,this.isFloating=!1,this.level="warning",this.buttons=null,this.publishService.pubChangeNotice({source:"confirmService"}),new Promise((function(e,t){i.publishService.changeNotice.subscribe((function(i){i&&"confirmCallback"===i.source&&(i.result?e():t())}))}))},e.prototype.error=function(e,t,i){void 0===t&&(t=null),void 0===i&&(i=this.dummyCallback),this.showConfirm=!0,this.message=e,this.description=t,this.isFloating=!1,this.level="warning",this.buttons=[{name:this.translate.instant("common.button.confirm"),callback:i}],this.publishService.pubChangeNotice({source:"confirmService"})},e.prototype.terminateChannelConfirm=function(e,t,i,n,s){void 0===s&&(s=this.dummyCallback),this.showConfirm=!0,this.message=e,this.description=t,this.buttons=[{name:this.translate.instant("common.button.cancel"),callback:s},{name:this.translate.instant("common.button.archive"),callback:n},{name:this.translate.instant("common.button.exit"),callback:i}],this.isFloating=!1,this.level="warning",this.event=event,this.publishService.pubChangeNotice({source:"confirmService"})},e.prototype.exitChannelConfirm=function(e,t,i){var n=this;return this.showConfirm=!0,this.message=e,this.description=t,this.isFloating=!1,this.level="warning",this.channelMembers=i,this.publishService.pubChangeNotice({source:"confirmService"}),new Promise((function(e,t){n.publishService.changeNotice.subscribe((function(i){i&&"confirmCallback"===i.source&&(i.result?e(i.newLeader):t())}))}))},e.prototype.autoSceneConfirm=function(e,t,i,n){this.showConfirm=!0,this.message=e,this.description=t,this.buttons=[{name:this.translate.instant("common.button.cancel"),callback:n},{name:this.translate.instant("common.button.confirm"),callback:i}],this.isFloating=!1,this.level="info",this.event=event,this.publishService.pubChangeNotice({source:"confirmService"})},e.prototype.dummyCallback=function(e){},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:x},{type:a.TranslateService}]},e}(),Y=function(){function e(e,i,n,s){this.utilService=e,this.translate=i,this.toastService=n,this.confirmService=s,this.selectedNodeChange=new t.EventEmitter,this.selectedNodesChange=new t.EventEmitter,this.dragDropped=new t.EventEmitter,this.currentSourceChange=new t.EventEmitter,this.currentSourceIdChange=new t.EventEmitter,this.treeChange=new t.EventEmitter,this.removeTreeNode=new t.EventEmitter,this.toggleSelectionChange=new t.EventEmitter,this._currentSource=null,this._currentSourceId=null}return e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"tree",{get:function(){return this._tree},set:function(e){this._tree=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectedNode",{get:function(){return this._selectedNode},set:function(e){this._selectedNode=e,this.selectedNodeChange.emit(e),this.multiple||(e?(e.added=!0,this.selectedNodes=[e]):this.selectedNodes=null,this.selectedNodesChange.emit(this.selectedNodes))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectedNodes",{get:function(){return this._selectedNodes},set:function(e){this._selectedNodes=e,this.selectedNodesChange.emit(e)},enumerable:!0,configurable:!0}),e.prototype.toggleExpandNode=function(e){e.stopPropagation(),this.tree.expanded=!this.tree.expanded},e.prototype.emitToggleSelectionChange=function(e){this.toggleSelectionChange.emit(e)},e.prototype.toggleSelectedNode=function(e){if(e.stopPropagation(),this.multiple){if($(e.target).hasClass("select-node")||1===$(e.target).parents(".select-node:first").length){if(this.isThisSelectedNode()){for(var t=0;t<this.selectedNodes.length;t++)if(this.selectedNodes[t].id===this.tree.id){this.selectedNodes.splice(t,1);break}this.toggleSelectionChange.emit({id:this.tree.id,selection:!1})}else this.selectedNodes=this.selectedNodes||[],this.tree.added=!0,this.selectedNodes.push(this.tree),this.toggleSelectionChange.emit({id:this.tree.id,selection:!0});this.selectedNodesChange.emit(this.selectedNodes)}this.selectedNode=this.tree}else this.tree.editing||this.edit&&this.selectedNode&&this.selectedNode.id===this.tree.id?this.selectedNode=null:this.selectedNode=this.tree},e.prototype.isChildOfNode=function(e,t){if(!e)return!1;for(var i=0;i<e.length;i++)if(e[i].id===t)return!0;return!1},e.prototype.onDragStart=function(e){e.stopPropagation();var t=$(e.target).find(".btn-move-group");if(!t.hasClass("btn-move-group"))return!1;var i=t.offset().left-t.parent().offset().left-5,n=t.offset().top-t.parent().offset().top-5,s=t.width()+10,o=t.height()+10;if(e.offsetX<i||e.offsetX>i+s||e.offsetY<n||e.offsetY>n+o)return!1;e.dataTransfer.setData("Text",this.tree.id),this.currentSourceId=this.tree.id,this.currentSource=$(e.target).parents("li:first").clone().addClass("droppable"),setTimeout((function(){$(e.target).parents("li:first").hide()}))},e.prototype.allowDrop=function(e){e.stopPropagation(),this.currentSourceId&&this.currentSourceId!==this.tree.id&&!this.isChildOfNode(this.tree.children,this.currentSourceId)&&e.preventDefault()},e.prototype.onDragEnter=function(e){if(e.stopPropagation(),this.currentSourceId&&this.currentSourceId!==this.tree.id&&!this.isChildOfNode(this.tree.children,this.currentSourceId)){var t=$(e.target).parents(".tree-node:first").find(".sub-tree-list:first");this.tree.expanded=!0,t.append(this.currentSource)}},e.prototype.onDragLeave=function(e){e.stopPropagation()},e.prototype.onDrop=function(e){e.stopPropagation(),e.preventDefault();var t=e.dataTransfer.getData("Text");t!==this.tree.id&&(this.tree.expanded=!0,this.dragDropped.emit({sourceId:t,targetId:this.tree.id}),this.currentSource.remove(),this.currentSource=null,this.currentSourceId=null)},e.prototype.onDragEnd=function(e){e.stopPropagation(),this.currentSource&&this.currentSource.hasClass("droppable")&&(this.currentSource.remove(),this.currentSource=null,this.currentSourceId=null),$(e.target).parents("li:first").show()},e.prototype.onDragDropped=function(e){this.dragDropped.emit(e)},Object.defineProperty(e.prototype,"currentSource",{get:function(){return this._currentSource},set:function(e){this._currentSource=e,this.currentSourceChange.emit(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentSourceId",{get:function(){return this._currentSourceId},set:function(e){this._currentSourceId=e,this.currentSourceIdChange.emit(e)},enumerable:!0,configurable:!0}),e.prototype.editNode=function(e){e.stopPropagation(),this.tree.editing=!0,this.tree.newName=this.tree.name},e.prototype.deleteNode=function(e){e.stopPropagation(),this.removeTreeNode.emit(this.tree)},e.prototype.onRemoveTreeNode=function(e){this.removeTreeNode.emit(e)},e.prototype.completeEditingNode=function(e){e.stopPropagation(),this.tree.newName&&""!==this.tree.newName?(this.tree.name!==this.tree.newName&&(this.tree.name=this.tree.newName,this.treeChange.emit(this.tree)),this.tree.newName=null,this.tree.editing=!1):this.toastService.add("warn",this.translate.instant("node.error.name-required"))},e.prototype.keyupOnInput=function(e){e.stopPropagation();var t=e.which||e.keyCode;27!==t&&13!==t||(this.tree.editing&&this.tree.newName&&""!==this.tree.newName?this.tree.name!==this.tree.newName&&(this.tree.name=this.tree.newName,this.treeChange.emit(this.tree)):this.toastService.add("warn",this.translate.instant("node.error.empty-name")),this.tree.newName=null,this.tree.editing=!1)},e.prototype.isThisSelectedNode=function(){if(!this.selectedNodes||0===this.selectedNodes.length)return!1;for(var e=0;e<this.selectedNodes.length;e++)if(this.selectedNodes[e].id===this.tree.id)return!0;return!1},e.decorators=[{type:t.Component,args:[{selector:"sw-tree-node",template:'<div *ngIf="tree"  class="tree-node" [ngClass]="{\'small-size\': smallSize, \'move\': edit || move}"> <span *ngIf="!fixedRoot && tree.children && tree.children.length>0 && !tree.expanded" class="btn-expand-group" (click)="toggleExpandNode($event)"></span> <span *ngIf="!fixedRoot && tree.children && tree.children.length>0 && tree.expanded" class="btn-collapse-group" (click)="toggleExpandNode($event)"></span> <div class="node-item" [ngClass]="{\'fixed\': fixedRoot, \'on\': selectedNode && selectedNode.id === tree.id}" draggable="true" (dragstart)="onDragStart($event, dragData)" (dragend)="onDragEnd($event)"> <div class="node-body" [ngClass]="{\'editing\': tree.editing}" (drop)="onDrop($event, dropData)" (dragover)="allowDrop($event)" (dragenter)="onDragEnter($event)" (dragleave)="onDragLeave($event)" (click)="toggleSelectedNode($event)"> <span *ngIf="!fixedRoot && move && !tree.editing" class="btn-move-group"></span> <span *ngIf="!edit || !tree.editing" class="name text-ellipsis">{{tree.name || \'common.text.empty\' | translate}}</span> <span *ngIf="edit && tree.editing" class="name editing" (click)="$event.stopPropagation()"> <input type="text" autocomplete="off" placeholder="{{\'common.text.input-name\' | translate}}" [(ngModel)]="tree.newName" (keydown)="keyupOnInput($event)"> <span class="btn-complete-editing" (click)="completeEditingNode($event)"></span> </span> <div *ngIf="!fixedRoot && edit && (!selectedNode || selectedNode.id !== tree.id) && !tree.editing" class="btn-group"> <span class="btn-edit" [attr.sw-title]="\'common.button.edit\' | translate" (click)="editNode($event)"></span> <span class="btn-delete" [attr.sw-title]="\'common.button.delete\' | translate" (click)="deleteNode($event)"></span> </div> <sw-check-box *ngIf="multiple" class="select-node" [model]="isThisSelectedNode()" (click)="toggleSelectedNode($event)"></sw-check-box> <sw-check-box *ngIf="!multiple && edit && selectedNode && selectedNode.id === tree.id" [model]="selectedNode && selectedNode.id === tree.id"></sw-check-box> </div> </div> <ul *ngIf="fixedRoot || tree.expanded" class="sub-tree-list"> <li *ngFor="let child of tree.children index as i"> <sw-tree-node [(tree)]="tree.children[i]" [multiple]="multiple" [smallSize]="smallSize" [edit]="edit" [move]="move" [fixedRoot]="false" [(selectedNode)]="selectedNode" [(selectedNodes)]="selectedNodes" (dragDropped)="onDragDropped($event)" (removeTreeNode)="onRemoveTreeNode($event)"  [(currentSource)]="currentSource" [(currentSourceId)]="currentSourceId" (toggleSelectionChange)="emitToggleSelectionChange($event)"></sw-tree-node> </li> </ul> </div> ',styles:[".tree-node { padding: 0px; width: 100%; } .tree-node.move { padding: 7px; width: calc(100% - 12px); } .tree-node .tree-node { border: none; padding: 0px; padding-left: 33px; width: calc(100% - 33px); } .tree-node.move .tree-node { padding: 2px; padding-left: 33px; } .tree-node .sub-tree-list { margin-top: 0; } .tree-node.move .sub-tree-list { margin-top: 2px; } .tree-node .sub-tree-list > li.droppable { opacity: 0.8; } .tree-node .sub-tree-list > li.droppable > sw-tree-node > .tree-node > .node-item > .node-body { border: none; } .tree-node .sub-tree-list > li.droppable > sw-tree-node > .tree-node > .node-item > .node-body { border: dashed 1px #e6e7e8; } .tree-node .sub-tree-list > li.droppable > sw-tree-node > .tree-node > span:first-of-type, .tree-node .sub-tree-list > li.droppable > sw-tree-node > .tree-node > .sub-tree-list { display: none; } .tree-node > .btn-expand-group, .tree-node > .btn-collapse-group { float: left; cursor: pointer; vertical-align: top; } .tree-node > .btn-expand-group { margin-left: -19px; margin-top: 11px; } .tree-node > .btn-collapse-group { margin-left: -22px; margin-top: 15px; } .tree-node.small-size > .btn-expand-group { margin-top: 8px; } .tree-node.small-size > .btn-collapse-group { margin-top: 11px; } .node-item > .node-body { padding: 7px 15px; border: solid 1px #e6e7e8; font-size: 15px; color: #222222; display: inline-block; max-width: calc(100% - 32px); width: 100%; } .tree-node:not(.move) .node-item > .node-body { margin-bottom: -1px; } .tree-node.small-size .node-item > .node-body { padding: 4px 15px; font-size: 12px; } .node-item.fixed > .node-body { margin-left: 0; } .node-item:hover > .node-body { background-color: #f7f5f5; } .node-item > .node-body.editing { padding: 3.5px 16px; } .node-item.on > .node-body, .node-item.on:hover > .node-body { background-color: #eaeff4; } .node-item > .node-body > .btn-move-group { display: none; float: left; margin-left: -11px; margin-top: 6px; cursor: move; } .node-item:hover > .node-body > .btn-move-group { display: inline-block; } .node-item > .node-body > .name { display: inline-block; cursor: pointer; max-width: calc(100% - 34px); vertical-align: top; } .tree-node.small-size .node-item.on > .node-body > .name { color: #3481cf; font-weight: bold; } .node-item > .node-body > .name.editing { border: solid 1px #e4e4e4; margin-left: -10px; padding: 1.5px 0; background-color: #fff; } .node-item > .node-body > .name > input { width: 256px; font-size: 15px; color: #222; border: none; } .node-item > .node-body > .name > span { margin-right: -23px; float: right; margin-top: 8px; } .node-item > .node-body > .btn-group { display: inline-block; float: right; margin-right: -7px; margin-top: 3px; height: 18px; } .node-item > .node-body > .btn-group .btn-edit { display: none; vertical-align: top; margin-top: 2px; } .node-item > .node-body > .btn-group .btn-delete { display: none; margin-left: 14px; vertical-align: top; } .node-item:hover > .node-body > .btn-group .btn-edit, .node-item:hover > .node-body > .btn-group .btn-delete { display: inline-block; cursor: pointer; } .node-item > .node-body > sw-check-box { float: right; margin-right: -7px; margin-top: 1px; margin-bottom: -1px; } "]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:O},{type:a.TranslateService},{type:y},{type:V}]},e.propDecorators={edit:[{type:t.Input}],move:[{type:t.Input}],multiple:[{type:t.Input}],smallSize:[{type:t.Input}],fixedRoot:[{type:t.Input}],selectedNodeChange:[{type:t.Output}],selectedNodesChange:[{type:t.Output}],dragDropped:[{type:t.Output}],currentSourceChange:[{type:t.Output}],currentSourceIdChange:[{type:t.Output}],treeChange:[{type:t.Output}],removeTreeNode:[{type:t.Output}],toggleSelectionChange:[{type:t.Output}],tree:[{type:t.Input,args:["tree"]}],selectedNode:[{type:t.Input,args:["selectedNode"]}],selectedNodes:[{type:t.Input,args:["selectedNodes"]}],currentSource:[{type:t.Input,args:["currentSource"]}],currentSourceId:[{type:t.Input,args:["currentSourceId"]}]},e}(),X=function(){function e(e,i,n,s,o){this.translate=e,this.authService=i,this.utilService=n,this.toastService=s,this.publishService=o,this.selectedDepartmentChange=new t.EventEmitter,this.selectedDepartmentsChange=new t.EventEmitter,this.departmentTreeChange=new t.EventEmitter,this.toggleSelectionChange=new t.EventEmitter,this.addNewDepartmentChange=new t.EventEmitter,this.appId=this.utilService.generateAppId(),this._departmentTree=null}return e.prototype.ngOnInit=function(){},e.prototype.findInDepartmentTree=function(e,t){var i=null;if(!e||!t)return null;if(e.id===t)return(i=JSON.parse(JSON.stringify(e))).children=null,i;if(e.children&&e.children.length>0)for(var n=0;n<e.children.length;n++)if(i=this.findInDepartmentTree(e.children[n],t))return i;return null},Object.defineProperty(e.prototype,"selectedDepartment",{get:function(){return this._selectedDepartment},set:function(e){this._selectedDepartment=e,this.selectedDepartment&&!this.selectedDepartment.parent&&(this.selectedDepartment.parent=this.findInDepartmentTree(this.departmentTree,this.selectedDepartment.parentId)),this.selectedDepartmentChange.emit(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectedDepartments",{get:function(){return this._selectedDepartments},set:function(e){this._selectedDepartments=e,this.selectedDepartmentsChange.emit(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"addNewDepartment",{set:function(e){var t=this;if(!0===e&&this.departmentTree){var i=new W;i.id=this.utilService.newDepartmentId(),this.edit&&(i.editing=!0),this.departmentTree.children=this.departmentTree.children||[],this.selectedDepartment?(i.parent=JSON.parse(JSON.stringify(this.selectedDepartment)),i.parent.children=null,this.selectedDepartment.children=this.selectedDepartment.children||[],this.selectedDepartment.children.push(i),this.selectedDepartment.expanded=!0):(i.parent=JSON.parse(JSON.stringify(this.departmentTree)),i.parent.children=null,this.departmentTree.children.push(i)),this.departmentTreeChange.emit(this.departmentTree),setTimeout((function(){t.addNewDepartmentChange.emit(!1)}),300)}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"departmentTree",{get:function(){return this._departmentTree},set:function(e){this._departmentTree=e},enumerable:!0,configurable:!0}),e.prototype.findRemoveInTree=function(e,t,i){if(!e)return null;if(e.id===i){if(t&&t.children)for(var n=0;n<t.children.length;n++)if(t.children[n].id===i){t.children.splice(n,1);break}return e}if(e.children&&e.children.length>0)for(n=0;n<e.children.length;n++){var s=this.findRemoveInTree(e.children[n],e,i);if(s)return s}return null},e.prototype.insertInTree=function(e,t,i){if(!e||!t||!i)return!1;if(e.id===i){e.children=e.children||[],t.parent=JSON.parse(JSON.stringify(e)),t.children=null;for(var n=0;n<e.children.length;n++)if(e.children[n].id===t.id)return e.children[n]=t,!0;return e.children.push(t),!0}if(e.children&&e.children.length>0)for(n=0;n<e.children.length;n++)if(this.insertInTree(e.children[n],t,i))return!0;return!1},e.prototype.onDragDropped=function(e){if(e&&this.departmentTree){var t=JSON.stringify(this.departmentTree),i=this.findRemoveInTree(this.departmentTree,null,e.sourceId);this.insertInTree(this.departmentTree,i,e.targetId)?this.departmentTreeChange.emit(this.departmentTree):this.departmentTree=JSON.parse(t)}},e.prototype.onRemoveDepartment=function(e){e&&this.departmentTree&&(this.findRemoveInTree(this.departmentTree,null,e.id),this.departmentTreeChange.emit(this.departmentTree))},e.prototype.emitToggleSelectionChange=function(e){this.toggleSelectionChange.emit(e)},e.decorators=[{type:t.Component,args:[{selector:"sw-tree-department",template:'<div id="{{appId}}" class="department-tree-list" [ngClass]="{\'edit\': edit, \'move\': edit || move}"> <ul class="department-tree"> <sw-tree-node [(tree)]="departmentTree" [fixedRoot]="true" [multiple]="multiple" [smallSize]="smallSize" [edit]="edit" [move]="move" [(selectedNode)]="selectedDepartment" [(selectedNodes)]="selectedDepartments" (dragDropped)="onDragDropped($event)" (removeTreeNode)="onRemoveDepartment($event)" (toggleSelectionChange)="emitToggleSelectionChange($event)"></sw-tree-node> </ul> </div> ',styles:[".department-tree-list { height: 100%; width: calc(100% + 2px); margin-left: -1px; } .department-tree-list.move { height: 100%; width: 100%; } .department-tree-list.edit { min-width: 376px; } .department-tree { padding: 0; height: 100%; overflow-y: auto; overflow-x: hidden; } .search-header + .department-tree { height: calc(100% - 45px); }"]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:a.TranslateService},{type:T},{type:O},{type:y},{type:x}]},e.propDecorators={edit:[{type:t.Input}],move:[{type:t.Input}],multiple:[{type:t.Input}],smallSize:[{type:t.Input}],selectedDepartmentChange:[{type:t.Output}],selectedDepartmentsChange:[{type:t.Output}],departmentTreeChange:[{type:t.Output}],toggleSelectionChange:[{type:t.Output}],addNewDepartmentChange:[{type:t.Output}],selectedDepartment:[{type:t.Input,args:["selectedDepartment"]}],selectedDepartments:[{type:t.Input,args:["selectedDepartments"]}],addNewDepartment:[{type:t.Input,args:["addNewDepartment"]}],departmentTree:[{type:t.Input,args:["departmentTree"]}]},e}(),Z=function(){function e(e,i){this.authService=e,this.apiService=i,this.selectedDepartmentChange=new t.EventEmitter,this.currentUser=this.authService.getCurrentUser(),this._showDepartmentTree=!1,this.searchText=null}return e.prototype.ngOnInit=function(){var e=this;this.departmentTree||(this.departmentTree=JSON.parse(JSON.stringify(this.currentUser.company)),this.apiService.getCompanyDepartmentTree(this.currentUser.company.id).then((function(t){t&&!0===t.status&&(t.result instanceof Array?e.departmentTree.children=t.result:e.departmentTree=t.result)})))},Object.defineProperty(e.prototype,"selectedDepartment",{get:function(){return this._selectedDepartment},set:function(e){var t=this;!e||this.selectedDepartment&&this.selectedDepartment.id===e.id||setTimeout((function(){t.showDepartmentTree=!1})),this._selectedDepartment=e,this.selectedDepartmentChange.emit(e)},enumerable:!0,configurable:!0}),e.prototype.setSelectListPosition=function(){var e=this,t=this.selectListBox.find(".select-list");if(0!==t.length){var i=this.selectListBox;t.css({top:i.position().top+i.height()+"px",left:Math.max(i.position().left+i.width()-t.width(),0)+"px"}),i.offset().top+i.height()+t.height()>$(window).height()&&t.css({top:"auto",bottom:$(window).height()-i.offset().top+"px"}),t.show()}else setTimeout((function(){e.setSelectListPosition()}),100)},Object.defineProperty(e.prototype,"showDepartmentTree",{get:function(){return this._showDepartmentTree},set:function(e){var t=this;this._showDepartmentTree=e,this.showDepartmentTree?(setTimeout((function(){t.setSelectListPosition()})),window.addEventListener("wheel",(function(){t.showDepartmentTree=!1}))):window.removeEventListener("wheel",(function(){}))},enumerable:!0,configurable:!0}),e.prototype.onFocusout=function(e){var t=this;e.relatedTarget&&(jQuery.contains(e.relatedTarget,e.target)||jQuery.contains(e.target,e.relatedTarget))?e.stopPropagation():(window.removeEventListener("wheel",(function(){})),setTimeout((function(e){t.showDepartmentTree=!1}),300))},e.prototype.openDepartmentTree=function(e){var t=$(e.target||e.srcElement);this.selectListBox=t.hasClass("select-list-box")?t:t.parents(".select-list-box:first"),this.selectListBox.focus(),this.showDepartmentTree=!0},e.decorators=[{type:t.Component,args:[{selector:"sw-select-department",template:'<div class="select-list-department select-list-box" tabindex="-1" (focusout)="onFocusout($event)" (click)="openDepartmentTree($event)" (mousewheel)="$event.stopPropagation()"> <span class="selected-name">{{selectedDepartment ? selectedDepartment.name : \'common.text.empty\' | translate}}</span> <i class="icon-select-list"></i> <div *ngIf="showDepartmentTree" class="select-list"> <div class="search-header"> <div class="list-search"> <input type="text" autocomplete="off" [(ngModel)]="searchText" placeholder="{{\'search.text.user-department\' | translate}}" (keyup)="refreshDepartmentTree()" (click)="$event.stopPropagation()"/>  </div> </div> <div class="department-tree"> <sw-tree-department [(selectedDepartment)]="selectedDepartment" [departmentTree]="departmentTree"></sw-tree-department> </div> </div> </div>',styles:[".select-list-box { display: inline-block; outline: none; cursor: pointer; border: solid 1px #c1c4c6; padding: 1px 7px 2px 7px; padding-right: 0px; } .select-list-box .selected-name { font-size: 13px; color: #0e1b26; } .select-list-box .select-list { position: absolute; border-radius: 10px; box-shadow: 0px 3px 16px 0 rgba(0, 0, 0, 0.35); border: solid 1px #e6e7e8; font-size: 13px; color: #222222; background-color: #fff; z-index: 1000; display: none; height: 400px; width: 370px; margin-left: 200px; margin-top: 10px; } .select-list-box .select-list .search-header { padding: 8px 9px; } .select-list-box .select-list .search-header .list-search { background-color: #f1f3f4; border-radius: 10px; padding: 5px 20px;   } .select-list-box .select-list .search-header .list-search input { font-size: 12px; border: none; width: 100%; vertical-align: middle; outline: none; margin-top: -7px; margin-left: -7px; background-color: #f1f3f4; } .select-list-box .select-list .department-tree { height: calc(100% - 45px); } .select-list-box .select-list .department-tree > sw-tree-department::-webkit-scrollbar { width: 0.5em; }"]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:T},{type:U}]},e.propDecorators={appendMode:[{type:t.Input}],selectedDepartmentChange:[{type:t.Output}],selectedDepartment:[{type:t.Input,args:["selectedDepartment"]}]},e}(),Q=function(){function e(e,i,n,s,o){this.translate=e,this.utilService=i,this.toastService=n,this.publishService=s,this.confirmService=o,this.selectedPositionChange=new t.EventEmitter,this.positionListChange=new t.EventEmitter,this.addNewPositionChange=new t.EventEmitter,this.appId=this.utilService.generateAppId(),this._positionList=null}return e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"selectedPosition",{get:function(){return this._selectedPosition},set:function(e){this._selectedPosition=e,this.selectedPositionChange.emit(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"addNewPosition",{set:function(e){var t=this;if(!0===e){var i=new E;if(i.id=this.utilService.newPositionId(),i.editing=!0,this.positionList=this.positionList||[],this.selectedPosition){for(var n=0;n<this.positionList.length;n++)if(this.positionList[n].id===this.selectedPosition.id){this.positionList.splice(n+1,0,i);break}}else this.positionList.push(i);this.positionListChange.emit(this.positionList),setTimeout((function(){t.addNewPositionChange.emit(!1)}),300)}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"positionList",{get:function(){return this._positionList},set:function(e){this._positionList=e},enumerable:!0,configurable:!0}),e.prototype.refreshPositionList=function(){return this.positionList=[{id:"pos_1",name:"대표이사",index:0},{id:"pos_2",name:"부사장",index:1},{id:"pos_3",name:"전무이사",index:2},{id:"pos_4",name:"상무이사",index:3},{id:"pos_5",name:"이사",index:4},{id:"pos_6",name:"수석연구원",index:5},{id:"pos_7",name:"책임연구원",index:6},{id:"pos_8",name:"선임연구원",index:7},{id:"pos_9",name:"주임연구원",index:8},{id:"pos_10",name:"연구원",index:9},{id:"pos_11",name:"부장",index:10},{id:"pos_12",name:"차장",index:11},{id:"pos_13",name:"과장",index:12},{id:"pos_14",name:"대리",index:13},{id:"pos_15",name:"주임",index:14},{id:"pos_16",name:"사원",index:15}],!1},e.prototype.toggleSelectedPosition=function(e,t){e.stopPropagation(),t.editing||(this.select&&this.selectedPosition&&this.selectedPosition.id===t.id?this.selectedPosition=null:this.selectedPosition=t)},e.prototype.onDragStart=function(e,t){e.stopPropagation();var i=$(e.target).find(".btn-move-group");if(!i.hasClass("btn-move-group"))return!1;var n=i.offset().left-i.parent().offset().left-5,s=i.offset().top-i.parent().offset().top-5,o=i.width()+10,r=i.height()+10;if(e.offsetX<n||e.offsetX>n+o||e.offsetY<s||e.offsetY>s+r)return!1;e.dataTransfer.setData("Text",t.id),e.dataTransfer.effectAllowed="move",this.currentSource=$(e.target).clone().addClass("droppable"),this.sourcePos=-1;for(var a=0;a<(this.positionList||[]).length;a++)if(t.id===this.positionList[a].id){this.sourcePos=a;break}setTimeout((function(){$(e.target).hide()}))},e.prototype.allowDrop=function(e,t){e.stopPropagation(),e.preventDefault()},e.prototype.onDragEnter=function(e,t){e.stopPropagation(),$(e.target).parents(".position-item:first").height()/2>e.offsetY?$(e.target).parents(".position-item:first").before(this.currentSource):$(e.target).parents(".position-item:first").after(this.currentSource)},e.prototype.onDragLeave=function(e,t){e.stopPropagation()},e.prototype.onDrop=function(e,t){e.stopPropagation(),e.preventDefault();for(var i=$(e.target).parents(".position-item:first"),n=-1,s=-1,o=0;o<this.positionList.length;o++)e.dataTransfer.getData("Text")===this.positionList[o].id&&(n=o),t.id===this.positionList[o].id&&(s=o);i.prev().hasClass("droppable")||(i.next().hasClass("droppable")?s+=1:s=-1),(n=-1===n?this.sourcePos:n)>-1&&s>-1&&(this.positionList.splice(s,0,this.positionList.splice(n,1)[0]),this.positionListChange.emit(this.positionList)),this.currentSource.remove(),this.currentSource=null},e.prototype.onDragEnd=function(e){if(e.stopPropagation(),this.currentSource&&this.currentSource.hasClass("droppable")){var t=this.currentSource.prevAll().length;if(t>0||this.currentSource.nextAll().length>0){for(var i=-1,n=0;n<this.positionList.length;n++)e.dataTransfer.getData("Text")===this.positionList[n].id&&(i=n);(i=-1===i?this.sourcePos:i)>-1&&(this.positionList.splice(t,0,this.positionList.splice(i,1)[0]),this.positionListChange.emit(this.positionList))}this.currentSource.remove(),this.currentSource=null}$(e.target).show()},e.prototype.editPosition=function(e,t){e.stopPropagation(),t.editing=!0,t.newName=t.name},e.prototype.completeEditingPosition=function(e,t){e.stopPropagation(),t.newName&&""!==t.newName?(t.name!==t.newName&&(t.name=t.newName,this.positionListChange.emit(this.positionList)),t.newName=null,t.editing=!1):this.toastService.add("warn",this.translate.instant("position.error.name-required"))},e.prototype.deletePosition=function(e,t){var i=this;e.stopPropagation(),$(e.target).parents(".position-item:first").addClass("on"),this.confirmService.confirm(this.translate.instant("position.confirm.delete-item"),!0,e).then((function(e){i.removePosition(t)}),(function(t){$(e.target).parents(".position-item:first").removeClass("on")}))},e.prototype.removePosition=function(e){if(this.positionList&&e)for(var t=0;t<this.positionList.length;t++)if(this.positionList[t].id===e.id)return this.positionList.splice(t,1),void this.positionListChange.emit(this.positionList)},e.prototype.keyupOnInput=function(e,t){e.stopPropagation();var i=e.which||e.keyCode;27!==i&&13!==i||(t.editing&&t.newName&&""!==t.newName?t.name!==t.newName&&(t.name=t.newName,this.positionListChange.emit(this.positionList)):(this.toastService.add("warn",this.translate.instant("position.error.empty-name")),this.removePosition(t)),t.newName=null,t.editing=!1)},e.decorators=[{type:t.Component,args:[{selector:"sw-list-position",template:'<div id="{{appId}}" class="position-list"> <ul class="positions"> <li *ngFor="let position of positionList index as i" class="position-item" [ngClass]="{\'on\': selectedPosition && selectedPosition.id === position.id}" draggable="true" (dragstart)="onDragStart($event, position)" (dragend)="onDragEnd($event)"> <div class="node-body" [ngClass]="{\'editing\': position.editing}" (drop)="onDrop($event, position)" (dragover)="allowDrop($event, position)" (dragenter)="onDragEnter($event, position)" (dragleave)="onDragLeave($event, position)" (click)="toggleSelectedPosition($event, position)"> <span *ngIf="edit && !position.editing" class="btn-move-group"></span> <span *ngIf="!edit || !position.editing" class="name text-ellipsis">{{position.name}}</span> <span *ngIf="edit && position.editing" class="name editing" (click)="$event.stopPropagation()"> <input type="text" autocomplete="off" placeholder="{{\'common.text.input-name\' | translate}}" [(ngModel)]="position.newName" (keydown)="keyupOnInput($event, position)"> <span class="btn-complete-editing" (click)="completeEditingPosition($event, position)"></span> </span> <div *ngIf="edit && (!select || !selectedPosition || selectedPosition.id !== position.id) && !position.editing" class="btn-group"> <span class="btn-edit" [attr.sw-title]="\'common.button.edit\' | translate" (click)="editPosition($event, position)"></span> <span class="btn-delete" [attr.sw-title]="\'common.button.delete\' | translate" (click)="deletePosition($event, position)"></span> </div> <sw-check-box *ngIf="select && selectedPosition && selectedPosition.id === position.id" [model]="selectedPosition && selectedPosition.id === position.id"></sw-check-box> </div>\t    </li> </ul> </div> ',styles:[".position-list { height: 100%; width: 100%; } .position-list > ul { height: calc(100% - 14px); overflow-y: auto; overflow-x: hidden; padding: 7px; width: calc(100% - 14px); } .position-list > ul::-webkit-scrollbar { width: 0.5em; } .position-item { border: none; padding-bottom: 4px; } .position-item > .node-body { padding: 7px 15px; border: solid 1px #e6e7e8; font-size: 15px; color: #222222; display: inline-block; max-width: calc(100% - 34px); width: 100%; } .position-item:hover > .node-body { background-color: #f7f5f5; } .position-item > .node-body.editing { padding: 3.5px 16px; } .position-item.droppable { opacity: 0.6; } .position-item.droppable > .node-body { border: none; } .position-item.on > .node-body, .position-item.on:hover > .node-body { background-color: #eaeff4; } .position-item > .node-body > .btn-move-group { display: none; float: left; margin-left: -11px; margin-top: 6px; cursor: move; } .position-item:hover > .node-body > .btn-move-group { display: inline-block; } .position-item > .node-body > .name { display: inline-block; cursor: pointer; max-width: calc(100% - 34px); vertical-align: top; } .position-item > .node-body > .name.editing { border: solid 1px #e4e4e4; margin-left: -10px; padding: 1.5px 0; background-color: #fff; } .position-item > .node-body > .name > input { width: 256px; font-size: 15px; color: #222; border: none; } .position-item > .node-body > .name > span { margin-right: -23px; float: right; margin-top: 8px; } .position-item > .node-body > .btn-group { display: inline-block; float: right; margin-right: -7px; margin-top: 3px; height: 18px; } .position-item > .node-body > .btn-group .btn-edit { display: none; vertical-align: top; margin-top: 2px; } .position-item > .node-body > .btn-group .btn-delete { display: none; margin-left: 14px; vertical-align: top; } .position-item:hover > .node-body > .btn-group .btn-edit, .position-item:hover > .node-body > .btn-group .btn-delete { display: inline-block; cursor: pointer; } .position-item > .node-body > sw-check-box { float: right; margin-right: -7px; margin-top: 1px; margin-bottom: -1px; } "]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:a.TranslateService},{type:O},{type:y},{type:x},{type:V}]},e.propDecorators={edit:[{type:t.Input}],select:[{type:t.Input}],selectedPositionChange:[{type:t.Output}],positionListChange:[{type:t.Output}],addNewPositionChange:[{type:t.Output}],selectedPosition:[{type:t.Input,args:["selectedPosition"]}],addNewPosition:[{type:t.Input,args:["addNewPosition"]}],positionList:[{type:t.Input,args:["positionList"]}]},e}(),ee=function(){},te=function(){},ie=function(){},ne=function(){function e(e,i,n,s,o,r,a,l){var c=this;this.apiService=e,this.utilService=i,this.spinnerService=n,this.authService=s,this.toastService=o,this.translate=r,this.confirmService=a,this.publishService=l,this.appId=this.utilService.generateAppId(),this.modelChange=new t.EventEmitter,this.currentUser=this.authService.getCurrentUser(),this.newComment=new ie,this.newReply=new ie,this.subscriptions=[],this.subscriptions.push(this.publishService.currentUserChange.subscribe((function(e){e&&(c.currentUser=e)})))}return e.prototype.ngOnInit=function(){},e.prototype.ngOnDestroy=function(){for(var e=0,t=this.subscriptions;e<t.length;e++){t[e].unsubscribe()}},Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e},enumerable:!0,configurable:!0}),e.prototype.updateNewComment=function(e){if(e)if(e.targetId===this.model.id)this.model.comments=this.model.comments||[],this.model.comments.unshift(e);else if(this.utilService.isCommentId(e.targetId)&&this.model.comments)for(var t=0,i=this.model.comments;t<i.length;t++){var n=i[t];if(n.id=e.targetId){n.replyCount++,!0===n.onReplyText?(n.replies=n.replies||[],n.replies.push(e)):n.lastReply=e;break}}},e.prototype.setComment=function(e){if(e)if(e.targetId===this.model.id){this.model.comments=this.model.comments||[];for(var t=0;t<this.model.comments.length;t++){if((s=this.model.comments[t]).id===e.id){e.replies=s.replies,e.onReplyText=s.onReplyText,this.model.comments[t]=e;break}}}else if(this.utilService.isCommentId(e.targetId)&&this.model.comments)for(var i=0,n=this.model.comments;i<n.length;i++){var s;if((s=n[i]).id=e.targetId){if(s.replies)for(t=0;t<s.replies.length;t++){if(s.replies[t].id===e.id){s.replies[t]=e;break}}else s.lastReply&&s.lastReply.id===e.id&&(s.lastReply=e);break}}},e.prototype.deleteComment=function(e){if(e)if(e.targetId===this.model.id){this.model.comments=this.model.comments||[];for(var t=0;t<this.model.comments.length;t++)if(this.model.comments[t].id===e.id){this.model.comments.splice(t,1);break}}else if(this.utilService.isCommentId(e.targetId)&&this.model.comments)for(var i=function(t){if(t.id=e.targetId){if(t.replyCount--,t.replies)for(var i=0;i<t.replies.length;i++)if(t.replies[i].id===e.id){t.replies.splice(i,1);break}return n.spinnerService.remove(),n.apiService.getCommentLastReply(n.currentUser.company.id,t.id).then((function(e){!0===e.status&&(t.lastReply=e.result)})),"break"}},n=this,s=0,o=this.model.comments;s<o.length;s++){if("break"===i(o[s]))break}},e.prototype.keyupOnComment=function(e){var t=this;if(13===(e.which||e.keyCode)&&!e.shiftKey){if(!this.newComment||!this.newComment.text)return;this.newComment.id=this.utilService.generateCommentId(),this.newComment.target=this.model,this.newComment.channelId=this.model.channelId,this.newComment.messageId=this.model.id,this.spinnerService.remove(),this.apiService.createComment(this.currentUser.company.id,this.newComment).then((function(e){!0===e.status&&(t.model.comments=t.model.comments||[],e.result&&(t.model.comments.unshift(e.result.comment),t.publishService.pubChangeNotice({source:"channel.lastMessage",channelId:t.model.channelId,unreads:0,newMessage:e.result.message}),t.publishService.pubChangeNotice({source:"channel.newMessage",channelId:t.model.channelId,unreads:0,newMessage:e.result.message})))})),this.newComment=new ie}},e.prototype.keyupOnReply=function(e,t){var i=this;if(13===(e.which||e.keyCode)&&!e.shiftKey){if(!this.newReply||!this.newReply.text||!t)return;this.newReply.id=this.utilService.generateCommentId(),this.newReply.target=t,this.newReply.channelId=this.model.channelId,this.newReply.messageId=this.model.id,this.spinnerService.remove(),this.apiService.createComment(this.currentUser.company.id,this.newReply).then((function(e){!0===e.status&&(t.replies=t.replies||[],e.result&&(t.replies.push(e.result.comment),i.publishService.pubChangeNotice({source:"channel.lastMessage",channelId:i.model.channelId,unreads:0,newMessage:e.result.message}),i.publishService.pubChangeNotice({source:"channel.newMessage",channelId:i.model.channelId,unreads:0,newMessage:e.result.message})))})),this.newReply=new ie}},e.prototype.showAllReplies=function(e,t){e.stopPropagation(),t&&this.apiService.getCommentReplies(this.currentUser.company.id,t.id).then((function(e){!0===e.status&&(t.replies=e.result)}))},e.prototype.keyupOnUpdateComment=function(e,t){var i=this,n=e.which||e.keyCode,s=$(e.target).val();if(13===n&&!e.shiftKey){if(!t||!s)return;t.text=s,t.channelId=this.model.channelId,t.messageId=this.model.id,t.showUpdate=void 0,this.spinnerService.remove(),this.apiService.setComment(this.currentUser.company.id,t).then((function(e){!0===e.status&&e.result&&(i.publishService.pubChangeNotice({source:"channel.lastMessage",channelId:i.model.channelId,unreads:0,newMessage:e.result.message}),i.publishService.pubChangeNotice({source:"channel.newMessage",channelId:i.model.channelId,unreads:0,newMessage:e.result.message}))}))}},e.prototype.completeOnUpdateComment=function(e,t){var i=this,n=$(e.target).prev().val();t&&n&&(t.text=n,t.channelId=this.model.channelId,t.messageId=this.model.id,t.showUpdate=void 0,this.spinnerService.remove(),this.apiService.setComment(this.currentUser.company.id,t).then((function(e){!0===e.status&&e.result&&(i.publishService.pubChangeNotice({source:"channel.lastMessage",channelId:i.model.channelId,unreads:0,newMessage:e.result.message}),i.publishService.pubChangeNotice({source:"channel.newMessage",channelId:i.model.channelId,unreads:0,newMessage:e.result.message}))})))},e.prototype.removeComment=function(e,t){var i=this;return e.stopPropagation(),this.confirmService.confirm(this.translate.instant("confirm.text.remove-comment"),!0,e).then((function(e){t.channelId=i.model.channelId,t.messageId=i.model.id,i.apiService.removeComment(i.currentUser.company.id,t).then((function(e){if(e.status&&(i.toastService.add("info",i.translate.instant("message.text.remove-comment-succeed")),i.model&&i.model.comments))for(var n=0;n<i.model.comments.length;n++)i.model.comments[n].id===t.id&&(i.model.comments.splice(n,1),e.result&&(i.publishService.pubChangeNotice({source:"channel.lastMessage",channelId:i.model.channelId,unreads:0,newMessage:e.result.message}),i.publishService.pubChangeNotice({source:"channel.newMessage",channelId:i.model.channelId,unreads:0,newMessage:e.result.message})))}))}),(function(e){})),!1},e.decorators=[{type:t.Component,args:[{selector:"sw-comments",template:'<div id="{{appId}}" class="comments"> <div *ngIf="model.comments" class="comment-count">{{\'message.text.comments-count\' | translate : {count: model.comments.length} }}</div> <div class="add-comment"> <div class="text-box"> <input type="text" autocomplete="off" placeholder="{{\'message.text.add-comment\' | translate}}" [(ngModel)]="newComment.text" (keyup)="keyupOnComment($event)"> </div> </div> <ul *ngIf="model.comments" class="comment-list"> <li *ngFor="let comment of model.comments" class="comment-item"> <div class="comment"> <div class="avatar"> <sw-avatar [selectedUser]="comment.created.user" [size]="36"></sw-avatar> </div> <div class="comment-body"> <div> <span class="name">{{comment.created.user.name}}</span> <span class="date">{{utilService.toDateTimeShortString(comment.created.date)}}</span> </div> <div *ngIf="!comment.showUpdate" class="text">{{comment.text}}</div> <div *ngIf="comment.showUpdate" class="text-input"><input type="text" [ngModel]="comment.text" (keyup)="keyupOnUpdateComment($event, comment)"><span class="btn-complete-editing" (click)="completeUpdateComment($event, comment)"></span></div> <ul class="comment-buttons"> <li *ngIf="comment.replies && comment.replies.length > 1" (click)="comment.replies = null">{{\'message.button.hide-reply\' | translate}}</li> <li *ngIf="!comment.replies && !comment.lastReply" (click)="comment.onReplyText = !comment.onReplyText">{{(comment.onReplyText ? \'message.button.hide-reply\' : \'message.button.add-reply\') | translate}}</li> <li *ngIf="currentUser.id === comment.created.user.id" (click)="comment.showUpdate = !comment.showUpdate">{{comment.showUpdate ? (\'common.button.cancel\' | translate) : (\'message.button.modify-comment\' | translate)}}</li> <li *ngIf="currentUser.id === comment.created.user.id" (click)="removeComment($event, comment)">{{\'message.button.delete-comment\' | translate}}</li> <li *ngIf="(!comment.replies || comment.replies.length===0) && comment.replyCount > 1" class="reply-count" (click)="showAllReplies($event, comment)">{{\'message.text.replies-count\' | translate : {count: comment.replyCount} }}</li> </ul> </div> </div> <ul *ngIf="comment.replies || comment.onReplyText" class="reply-list"> <li *ngFor="let reply of comment.replies || []" class="reply-item"> <div class="avatar"> <sw-avatar [selectedUser]="reply.created.user" [size]="25"></sw-avatar> </div> <div class="reply-body"> <div> <span class="name">{{reply.created.user.name}}</span> <span class="date">{{utilService.toDateTimeShortString(reply.created.date)}}</span> </div> <div class="text">{{reply.text}}</div> </div> </li> <li class="add-reply-comment"> <div class="text-box"> <input type="text" autocomplete="off" placeholder="{{\'message.text.add-comment\' | translate}}" [(ngModel)]="newReply.text" (keyup)="keyupOnReply($event, comment)"> </div> </li> </ul> <ul *ngIf="(!comment.replies || comment.replies.length===0) && comment.lastReply" class="reply-list"> <li class="reply-item"> <div class="avatar"> <sw-avatar [selectedUser]="comment.lastReply.created.user" [size]="25"></sw-avatar> </div> <div class="reply-body"> <div> <span class="name">{{comment.lastReply.created.user.name}}</span> <span class="date">{{utilService.toDateTimeShortString(comment.lastReply.created.date)}}</span> </div> <div class="text">{{comment.lastReply.text}}</div> </div> </li> <li class="add-reply-comment"> <div class="text-box"> <input type="text" autocomplete="off" placeholder="{{\'message.text.add-reply\' | translate}}" [(ngModel)]="newReply.text" (keyup)="keyupOnReply($event, comment)"> </div> </li> </ul> </li> </ul> </div>\t\t\t ',styles:[".comments .comment-count, .comments .reply-count { font-size: 12px; color: #222222; float: right; margin: 3px 7px;\t } .comments .reply-count { color: #3481cf; margin: 9px 0 0 0; } .comments .add-comment { padding: 8px 7px 8px 7px; } .comments .add-comment > div { display: inline-block; vertical-align: top; } .comments .text-box { border-radius: 10px; border: solid 1px #d8d9db; background-color: #f2f2f2; width: calc(100% - 2px); padding: 5px 0;\t } .comments .text-box input { width: calc(100% - 4px); border: none; background: inherit; font-size: 13px; vertical-align: top; margin-top: 2px; } .comment-list .comment-item .comment { padding: 8px; } .comment-list .comment-item .comment:hover { background-color: #f7f5f5; } .comment-item .comment > div { display: inline-block; vertical-align: top; } .comment-item .comment-body { width: calc(100% - 36px - 6px);\t } .comments .name { font-size: 13px; font-weight: bold; color: #0e1b26;\t } .comments .date { font-size: 12px; font-weight: normal; color: #666464; float: right;\t } .comments .text { font-size: 13px; font-weight: normal; color: #222222;  padding: 3px 0; } .comments .text-input { font-size: 13px; font-weight: normal; color: #222222;  padding: 1px 0; padding-right: 4px; width: calc(100% - 4px); border-bottom: 1px solid #d8d9db; background-color: #fff; } .comments .text-input > input { border: none; width: calc(100% - 15px); display: inline-block; } .comment-item .comment-buttons { margin-left: -5px; } .comment-item .comment-buttons > li { font-size: 12px; color: #3481cf; cursor: pointer; border-right: 1px solid #3481cf; display: inline-block; padding: 0px 5px; line-height: 11px; } .comment-item .comment-buttons > li:last-of-type { border-right: none; } .comment-item .reply-list > div { display: inline-block; vertical-align: top; } .comment-item .reply-list .reply-item,  .reply-list .add-reply-comment { padding: 7px; padding-left: 55px; } .comment-item .reply-list .reply-item:hover { background-color: #f7f5f5; } .reply-list .reply-item > div { display: inline-block; } .reply-list .reply-item .reply-body { width: calc(100% - 25px - 7px) } .reply-list .add-reply-comment > div { display: inline-block; vertical-align: top; } "]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:U},{type:O},{type:w},{type:T},{type:y},{type:a.TranslateService},{type:V},{type:x}]},e.propDecorators={modelChange:[{type:t.Output}],model:[{type:t.Input,args:["model"]}]},e}(),se=function(){function e(e,i,n){this.authService=e,this.utilService=i,this.translate=n,this.modelChange=new t.EventEmitter,this.appId=this.utilService.generateAppId(),this.currentUser=this.authService.getCurrentUser()}return e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e,e&&(this.modelChange.emit(e),this.selectedDate=new Date(this.model+this.currentUser.timezoneOffset))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectedDate",{get:function(){return this._selectedDate},set:function(e){this._selectedDate=e,e&&(this.model=new Date(e.formatted).getTime()-this.currentUser.timezoneOffset,this.modelChange.emit(this.model))},enumerable:!0,configurable:!0}),e.prototype.clickOnShowPicker=function(e){this.disabled||(this.dateSearchEvent=e,this.showDatePicker=!0)},e.decorators=[{type:t.Component,args:[{selector:"sw-date-picker",template:'<span id="{{appId}}" class="date-picker-group" [ngClass]="{\'disabled\': disabled}"> <span class="value" (click)="clickOnShowPicker($event)">{{utilService.toLocaleDateOnlyShortString(model)}}</span> <sw-date-picker-popup *ngIf="showDatePicker" [(showDatePicker)]="showDatePicker" [event]="dateSearchEvent" [(selectedDate)]="selectedDate"></sw-date-picker-popup> </span> ',styles:[".date-picker-group .value { display: inline-block; height: 31px; width: 100px; line-height: 31px; font-size: 13px; color: #222; border: 1px solid #e6e7e8; border-radius: 5px; }"]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:T},{type:O},{type:a.TranslateService}]},e.propDecorators={modelChange:[{type:t.Output}],disabled:[{type:t.Input}],model:[{type:t.Input,args:["model"]}]},e}(),oe=function(){function e(e,t){this.router=e,this.authService=t}return e.prototype.canActivate=function(e,t){return!!this.authService.getCurrentUser()||(this.router.navigate(["/welcome"],{queryParams:{returnUrl:t.url}}),!1)},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:m.Router},{type:T}]},e}(),re=(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},function(e,t){function i(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),ae=function(e){function i(t,i){return e.call(this,t,i)||this}return re(i,e),i.prototype.request=function(t,i){return e.prototype.request.call(this,t,i).catch(this.onCatch)},i.prototype.get=function(t,i){return t=this.updateUrl(t),e.prototype.get.call(this,t,this.getRequestOptionArgs(i)).catch(this.onCatch)},i.prototype.post=function(t,i,n){return t=this.updateUrl(t),e.prototype.post.call(this,t,i,this.getRequestOptionArgs(n)).catch(this.onCatch)},i.prototype.put=function(t,i,n){return t=this.updateUrl(t),e.prototype.put.call(this,t,i,this.getRequestOptionArgs(n)).catch(this.onCatch)},i.prototype.delete=function(t,i){return t=this.updateUrl(t),e.prototype.delete.call(this,t,this.getRequestOptionArgs(i)).catch(this.onCatch)},i.prototype.updateUrl=function(e){return e},i.prototype.getRequestOptionArgs=function(e){null==e&&(e=new c.RequestOptions),null==e.headers&&(e.headers=new c.Headers),e.headers.append("Content-Type","application/json; charset=utf-8");var t=localStorage.getItem("currentUserCredentials");return t&&e.headers.append("Authorization","Bearer "+JSON.parse(t).token),e},i.prototype.onCatch=function(e,t){return 401===e.status?(console.log("httpInterceptor 401 error : ",e),localStorage.getItem("currentUserCredentials")&&localStorage.removeItem("currentUserCredentials"),h.Observable.throw(e)):h.Observable.throw(e)},i.decorators=[{type:t.Injectable}],i.ctorParameters=function(){return[{type:c.ConnectionBackend},{type:c.RequestOptions}]},i}(c.Http),le=function(){function e(){}return e.prototype.getPager=function(e,t,i){void 0===t&&(t=1),void 0===i&&(i=1);var n,s,o=Math.ceil(e/i);t<1?t=1:t>o&&(t=o),o<=30?(n=1,s=o):t<=15?(n=1,s=Math.min(28,o)):t+15>=o?(n=Math.max(o-27,1),s=o):(n=Math.max(t-12,1),s=Math.min(t+13,o));var r=(t-1)*i,a=Math.min(r+i-1,e-1),l=Array.from(Array(s+1-n).keys()).map((function(e){return n+e}));return{totalItems:e,currentPage:t,pageSize:i,totalPages:o,startPage:n,endPage:s,startIndex:r,endIndex:a,pages:l}},e.decorators=[{type:t.Injectable}],e}(),ce=function(){function e(e,t,i,n,s,o){var r=this;this.translate=e,this.utilService=t,this.authService=i,this.toastService=n,this.publishService=s,this.ngZone=o,this.currentUser=this.authService.getCurrentUser(),this.currentCompany=this.currentUser?this.currentUser.company:null,this.websocket=null,this.baseUrl=(window.location.origin.indexOf("https://")>-1?"wss://":"ws://")+window.location.origin.split("://")[1]+"/ws/websocket/",this.keySubscribers=new Array,this.subscriptions=[],this.subscriptions.push(this.publishService.currentUserChange.subscribe((function(e){e&&(r.currentUser=e,r.currentCompany=r.currentUser.company)})))}return e.prototype.ngOnInit=function(){},e.prototype.ngOnDestroy=function(){for(var e=0,t=this.subscriptions;e<t.length;e++){t[e].unsubscribe()}},e.prototype.resumeOnSleep=function(e){var t=this;setTimeout((function(){var i=(new Date).getTime();e+2e4<i||t.websocket.readyState===WebSocket.CLOSED?location.reload(!0):t.resumeOnSleep(i)}),1e4,e)},e.prototype.closeWebSocket=function(){console.log("closeWebSocket called..."),this.onMessageCallbacks=null,this.websocket&&(this.websocket.close(),this.websocket=null)},e.prototype.openWebSocket=function(){var e=this;if(this.currentUser){console.log("openWebSocket called..."),this.onMessageCallbacks=null,this.websocket&&this.websocket.close(),this.websocket=new WebSocket(this.baseUrl+this.currentUser.id),this.websocket.onopen=function(e){console.log("connect! ev = ",e)},this.websocket.onclose=function(e){console.log("connect closed ev=",e)};var t=this;this.websocket.onmessage=function(e){if(e.data){var i=JSON.parse(e.data);if(i){switch(i.key){case"serverShutdown":t.utilService.spawnBrowserNotification(t.translate.instant("system.text.shutdown-title"),t.translate.instant("system.text.shutdown-text"),null);break;case"copingProgress":t.publishService.pubCopingProgress(i)}if(t.onMessageCallbacks)for(var n=0,s=t.onMessageCallbacks;n<s.length;n++){var o=s[n];o instanceof Function&&i.companyId===t.currentCompany.id&&o(i)}}}},this.ngZone.runOutsideAngular((function(){e.resumeOnSleep((new Date).getTime())}))}},e.prototype.onMessage=function(e){this.onMessageCallbacks=this.onMessageCallbacks||[];for(var t=0,i=this.onMessageCallbacks;t<i.length;t++){if(i[t]===e)return}this.onMessageCallbacks.push(e)},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:a.TranslateService},{type:O},{type:T},{type:y},{type:x},{type:t.NgZone}]},e}(),de=600,pe=520,ue=function(){function e(e,t,i,n,s){this.apiService=e,this.toastService=t,this.translate=i,this.spinnerService=n,this.authService=s,this.chatWindowList=[],this.workWindowList=[],this.savedWorkList=null,this.savedWindowList=null,this.chatVisibleWindowList=[],this.workVisibleWindowList=[],this.chatInvisibleWindowList=[],this.workInvisibleWindowList=[],this.chatHidedWindowList=[],this.workHidedWindowList=[],this.chatWindowPosition={x:63,y:58},this.workWindowPosition={x:63,y:58},this.chatWindowSize={width:de+"px",height:pe+"px"},this.workWindowSize={width:de+"px",height:pe+"px"},this.windowMinWidth=330,this.windowMinHeight=520,this.onMoreSavedWorkList=!1}return e.prototype.isNarrowView=function(e){return this.maximized!==e&&("chat"===e?Number(this.chatWindowSize.width.split("px")[0])<512:"work"===e?Number(this.workWindowSize.width.split("px")[0])<512:void 0)},e.prototype.checkWindowPositionSize=function(e){var t=$(window).width(),i=$(window).height(),n="chat"===e?this.chatWindowPosition:this.workWindowPosition,s="chat"===e?this.chatWindowSize:this.workWindowSize;(n.x+Number(s.width.split("px")[0])+20>t||n.y+Number(s.height.split("px")[0])+70>i)&&("chat"===e?this.chatWindowPosition={x:63,y:58}:"work"===e&&(this.workWindowPosition={x:63,y:58}),(Number(s.width.split("px")[0])>de||Number(s.height.split("px")[0])>pe)&&("chat"===e?this.chatWindowSize={width:de+"px",height:pe+"px"}:"work"===e&&(this.workWindowSize={width:de+"px",height:pe+"px"})))},Object.defineProperty(e.prototype,"maximized",{get:function(){return this._maximized},set:function(e){var t=this;this._maximized=e,this.apiService.setMaximizedWindow(this.currentUser.company.id,this.currentUser.id,e).then(),setTimeout((function(){t.refreshVisibleWindowList(e),e?$(window).resize((function(i){t.refreshVisibleWindowList(e)})):$(window).off("resize")}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"chatWindowHided",{get:function(){return this._chatWindowHided},set:function(e){var t=this;this._chatWindowHided=e,this.apiService.setWindowHided(this.currentUser.company.id,this.currentUser.id,"chat",e).then(),e||setTimeout((function(){t.refreshVisibleWindowList("chat")}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"workWindowHided",{get:function(){return this._workWindowHided},set:function(e){var t=this;this._workWindowHided=e,this.apiService.setWindowHided(this.currentUser.company.id,this.currentUser.id,"work",e).then(),e||setTimeout((function(){t.refreshVisibleWindowList("work")}))},enumerable:!0,configurable:!0}),e.prototype.loadWindowData=function(e,t){var i=this;this.currentUser=e,e.company&&this.apiService.getWindowData(this.currentUser.company.id,this.currentUser.id,t).then((function(e){e&&!0===e.status&&e.result&&(e.result.chatWindowList&&(i.chatWindowList=e.result.chatWindowList),e.result.workWindowList&&(i.workWindowList=e.result.workWindowList),e.result.chatWindowPosition&&(i.chatWindowPosition=e.result.chatWindowPosition),e.result.workWindowPosition&&(i.workWindowPosition=e.result.workWindowPosition),e.result.chatWindowSize&&(i.chatWindowSize={width:e.result.chatWindowSize.width+"px",height:e.result.chatWindowSize.height+"px"}),e.result.workWindowSize&&(i.workWindowSize={width:e.result.workWindowSize.width+"px",height:e.result.workWindowSize.height+"px"}),i.maximized=e.result.maximized,i.chatWindowHided=e.result.chatWindowHided,i.workWindowHided=e.result.workWindowHided,i.checkWindowPositionSize("chat"),i.checkWindowPositionSize("work"),i.refreshVisibleWindowList(t))}))},e.prototype.checkIfSavedWorkList=function(e){var t=this;this.savedWindowList=null,this.apiService.getTempSavedWorkSize(this.currentUser.company.id,this.currentUser.id).then((function(e){e&&!0===e.status&&e.result>0&&(t.savedWorkList=[])}))},e.prototype.moreSavedWindowList=function(e,t,i){var n=this;this.apiService.getTempSavedTasks(this.currentUser.company.id,this.currentUser.id,t,i).then((function(i){if(i&&!0===i.status){if(i.result&&i.result.length>0)return n.savedWindowList=n.savedWindowList.concat(i.result),void setTimeout((function(){$("#window-list .menu-list .sub-menu-list .saved-list .window-list").scrollTop(3e4),n.moreSavedWindowList(e,t,i.result[i.result.length-1].created.date)}),1);0===n.savedWindowList.length&&(n.savedWindowList=null),n.onMoreSavedWorkList=!1}else n.onMoreSavedWorkList=!1,n.savedWindowList=null}),(function(e){n.onMoreSavedWorkList=!1,n.savedWindowList=null}))},e.prototype.loadSavedWindowList=function(e,t){this.savedWindowList&&0===this.savedWindowList.length&&!this.onMoreSavedWorkList&&(this.onMoreSavedWorkList=!0,this.moreSavedWindowList(e,t,null))},e.prototype.loadSavedWorkList=function(e){var t=this;this.savedWorkList=[],this.apiService.getTempSavedWorks(this.currentUser.company.id,this.currentUser.id).then((function(e){e&&!0===e.status&&e.result&&e.result.length>0?t.savedWorkList=e.result:t.savedWorkList=null}),(function(e){t.savedWorkList=null}))},e.prototype.getNumberOnlyFromPX=function(e){return e?Number(e.split("px")[0]):NaN},e.prototype.getMyWindowList=function(e){switch(e){case"work":return this.workWindowList;case"chat":return this.chatWindowList;case"saved":return this.savedWindowList}},e.prototype.isWindowListVisible=function(e){return"work"===e?!this.workWindowHided:"chat"===e&&!this.chatWindowHided},e.prototype.getHidedWindowList=function(e){for(var t=[],i=null,n=0,s=e;n<s.length;n++){var o=s[n];o.subWindowList=void 0,o.hided?t.push(o):(i||(i=[]),o.focused?(o.subWindowList=i,t.push(o)):i.push(o))}return t},e.prototype.refreshVisibleWindowList=function(e){e&&"chat"!==e||(this.refreshVisibleChatWindowList(),this.chatHidedWindowList=this.getHidedWindowList(this.chatWindowList)),e&&"work"!==e||(this.refreshVisibleWorkWindowList(),this.workHidedWindowList=this.getHidedWindowList(this.workWindowList))},e.prototype.refreshVisibleChatWindowList=function(){var e=this.chatWindowList.filter((function(e){return!e.hided}));if(this.chatVisibleWindowList=[],this.chatInvisibleWindowList=[],this.focusedChatItem=null,this.chatWindowHided||0===e.length)this.chatWindowHided=!0;else{var t=this.getNumberOnlyFromPX(this.chatWindowSize.width);this.maximized&&(t=$(".popup-window.maximized").width());for(var i,n=parseInt((t-60)/250+""),s=0;s<e.length;s++)if(e[s].visible){if(this.chatVisibleWindowList.length===n){e[s].visible=void 0;continue}this.chatVisibleWindowList.push(e[s]),e[s].focused&&(this.focusedChatItem=e[s],i=!0)}if(this.chatVisibleWindowList.length===n){if(i)return void(this.chatInvisibleWindowList=e.filter((function(e){return!e.visible})));for(s=0;s<e.length;s++)if(e[s].focused)return this.chatVisibleWindowList[0].visible=void 0,e[s].visible=!0,this.focusedChatItem=e[s],this.chatVisibleWindowList.splice(0,1),this.chatVisibleWindowList.push(e[s]),void(this.chatInvisibleWindowList=e.filter((function(e){return!e.visible})));return this.chatVisibleWindowList[this.chatVisibleWindowList.length-1].focused=!0,this.focusedChatItem=this.chatVisibleWindowList[this.chatVisibleWindowList.length-1],void(this.chatInvisibleWindowList=e.filter((function(e){return!e.visible})))}for(var o=0,r=0,a=e;r<a.length;r++){var l=a[r];if(l.visible)o++;else if(l.visible=!0,this.chatVisibleWindowList.splice(o,0,l),this.chatVisibleWindowList.length===n){if(i)return void(this.chatInvisibleWindowList=e.filter((function(e){return!e.visible})));break}}this.chatVisibleWindowList.length>0&&(this.chatVisibleWindowList[this.chatVisibleWindowList.length-1].focused=!0,this.focusedChatItem=this.chatVisibleWindowList[this.chatVisibleWindowList.length-1]),this.chatInvisibleWindowList=e.filter((function(e){return!e.visible}))}},e.prototype.refreshVisibleWorkWindowList=function(){var e=this.workWindowList.filter((function(e){return!e.hided}));if(this.workVisibleWindowList=[],this.workInvisibleWindowList=[],this.focusedWorkItem=null,this.workWindowHided||0===e.length)this.workWindowHided=!0;else{var t=this.getNumberOnlyFromPX(this.workWindowSize.width);this.maximized&&(t=$(".popup-window.maximized").width());for(var i,n=parseInt((t-60)/250+""),s=0;s<e.length;s++)if(e[s].visible){if(this.workVisibleWindowList.length===n){e[s].visible=void 0;continue}this.workVisibleWindowList.push(e[s]),e[s].focused&&(this.focusedWorkItem=e[s],i=!0)}if(this.workVisibleWindowList.length===n){if(i)return void(this.workInvisibleWindowList=e.filter((function(e){return!e.visible})));for(s=0;s<e.length;s++)if(e[s].focused)return this.workVisibleWindowList[0].visible=void 0,e[s].visible=!0,this.focusedWorkItem=e[s],this.workVisibleWindowList.splice(0,1),this.workVisibleWindowList.push(e[s]),void(this.workInvisibleWindowList=e.filter((function(e){return!e.visible})));return this.workVisibleWindowList[this.workVisibleWindowList.length-1].focused=!0,this.focusedWorkItem=this.workVisibleWindowList[this.workVisibleWindowList.length-1],void(this.workInvisibleWindowList=e.filter((function(e){return!e.visible})))}for(var o=0,r=0,a=e;r<a.length;r++){var l=a[r];if(l.visible)o++;else if(l.visible=!0,this.workVisibleWindowList.splice(o,0,l),this.workVisibleWindowList.length===n){if(i)return void(this.workInvisibleWindowList=e.filter((function(e){return!e.visible})));break}}this.workVisibleWindowList.length>0&&(this.workVisibleWindowList[this.workVisibleWindowList.length-1].focused=!0,this.focusedWorkItem=this.workVisibleWindowList[this.workVisibleWindowList.length-1]),this.workInvisibleWindowList=e.filter((function(e){return!e.visible}))}},e.prototype.addWindow=function(e,t){for(var i=this,n=this.getMyWindowList(t),s=!1,o=0,r=n;o<r.length;o++){var a=r[o];a.id!==e.id?a.focused=void 0:(s=!0,a.focused=!0,a.hided=void 0)}if(!s){if(20===n.length){for(var l=!1,c=0;c<n.length;c++)n[c].hided||n[c].visible||(n.splice(c,1),l=!0);if(!l)for(c=0;c<n.length;c++)n[c].hided||n[c].focused||(n.splice(c,1),l=!0);l||n.splice(0,1),this.toastService.add("warn",this.translate.instant("window.text.overflow-max-list"))}e.focused=!0,n.push(JSON.parse(JSON.stringify(e)))}"chat"===t?this.chatWindowHided=!1:"work"===t&&(this.workWindowHided=!1),this.refreshVisibleWindowList(t),setTimeout((function(){i.bringWindowToFront(null,t)})),this.apiService.setWindowIds(this.currentUser.company.id,this.currentUser.id,t,n).then()},e.prototype.closeWindow=function(e,t){for(var i=this.getMyWindowList(t),n=0;n<i.length;n++)if(i[n].id===e.id)return i.splice(n,1),this.refreshVisibleWindowList(t),void this.apiService.setWindowIds(this.currentUser.company.id,this.currentUser.id,t,i).then()},e.prototype.showWindow=function(e,t){for(var i=this.getMyWindowList(t),n=0,s=i;n<s.length;n++){var o=s[n];o.focused&&(o.focused=void 0)}e.hided=void 0,e.visible=!0,e.focused=!0,this.refreshVisibleWindowList(t),this.apiService.setWindowIds(this.currentUser.company.id,this.currentUser.id,t,i).then()},e.prototype.hideWindow=function(e,t){var i=this.getMyWindowList(t);e.hided=!0,e.visible=void 0,e.focused=void 0,e.subWindowList=void 0,this.refreshVisibleWindowList(t),this.apiService.setWindowIds(this.currentUser.company.id,this.currentUser.id,t,i).then()},e.prototype.bringWindowToFront=function(e,t){var i=e?$(e.target).parents("sw-window"):$("sw-window."+t);i.addClass("focus").siblings().removeClass("focus").find(".popup-header").removeClass("focus"),i.find(".popup-header").addClass("focus")},e.prototype.closeAllWindows=function(e){e&&"work"!==e?e&&"chat"!==e||(this.chatWindowList=[],this.apiService.setWindowIds(this.currentUser.company.id,this.currentUser.id,"chat",[]).then()):(this.workWindowList=[],this.apiService.setWindowIds(this.currentUser.company.id,this.currentUser.id,"work",[]).then()),e&&this.maximized!==e||(this.maximized=null,this.apiService.setMaximizedWindow(this.currentUser.company.id,this.currentUser.id,null).then())},e.prototype.clear=function(){this.chatWindowList=[],this.workWindowList=[],this.savedWindowList=[],this.apiService.setWindowIds(this.currentUser.company.id,this.currentUser.id,"chat",[]).then(),this.apiService.setWindowIds(this.currentUser.company.id,this.currentUser.id,"work",[]).then()},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:U},{type:y},{type:a.TranslateService},{type:w},{type:T}]},e}(),me=function(){function e(e,t,i,n,s){var o=this;this.confirmService=e,this.utilService=t,this.apiService=i,this.authService=n,this.publishService=s,this.currentUser=this.authService.getCurrentUser(),this.toastsElement=null,this.subscriptions=[],this.subscriptions.push(this.publishService.changeNotice.subscribe((function(e){if(e&&"confirmService"===e.source){o.level=o.confirmService.level,o.description=o.confirmService.description,o.buttons=o.confirmService.buttons,o.isFloating=o.confirmService.isFloating,o.showConfirm=o.confirmService.showConfirm,o.message=o.confirmService.message;var t=o.confirmService.event;if(setTimeout((function(e){var i=$("sw-confirm .popup-window");if(o.isFloating){var n,s,r,a,l=t.clientY,c=t.clientX,d=i.height(),p=i.width(),u=$(window).width(),m=$(window).height();m<l+40+d?s=m-l+20:n=l+20,u<c+20+p?a=20:r=c+10,i.css({top:n?n+"px":"auto",bottom:s?s+"px":"auto",left:r?r+"px":"auto",right:a?a+"px":"auto",visibility:"visible"})}else i.css({top:$(window).height()/2-i.height()/2+"px",visibility:"visible"})})),o.confirmService.channelMembers){o.channelMembers=JSON.parse(JSON.stringify(o.confirmService.channelMembers.sort((function(e,t){return o.utilService.isUserId(e.id)?-1:o.utilService.isUserId(t.id)?1:0})))),o.channelMembers=o.channelMembers.filter((function(e){return e.id!==o.currentUser.id})),o.newLeader=null;for(var i=function(e){o.utilService.isDepartmentId(e.id)?o.apiService.getDepartmentUsers(e.id).then((function(t){!0===t.status&&(e.members=t.result)})):o.utilService.isCompanyId(e.id)&&o.apiService.getCompanyUsers(e.id).then((function(t){!0===t.status&&(e.members=t.result)}))},n=0,s=o.channelMembers;n<s.length;n++){i(s[n])}}}})))}return e.prototype.ngOnInit=function(){},e.prototype.ngOnDestroy=function(){for(var e=0,t=this.subscriptions;e<t.length;e++){t[e].unsubscribe()}},e.prototype.onCancelClick=function(){return this.publishService.pubChangeNotice({source:"confirmCallback",result:!1}),this.showConfirm=!1,!1},e.prototype.onOkClick=function(){if(!this.channelMembers||this.newLeader)return this.publishService.pubChangeNotice({source:"confirmCallback",result:!0,newLeader:this.newLeader}),this.showConfirm=!1,!1},e.decorators=[{type:t.Component,args:[{selector:"sw-confirm",template:'<div *ngIf="showConfirm" class="confirm-curtain popup-app" [ngClass]="{\'floating\': isFloating}" (click)="onCancelClick()"> <div class="popup-window" (click)="$event.stopPropagation()"> <div class="popup-header"> <span>{{\'common.text.inform\' | translate}}</span> <a href="" class="btn-popup-close" (click)="onCancelClick()"></a> </div> <div class="popup-content"> <i class="img-confirm-{{level}}"></i> <div *ngIf="description" class="message" [ngClass]="{\'no-border-bottom\': channelMembers}"> <div>{{message}}</div> <div class="description">{{description}}</div> </div> <div *ngIf="!description" class="message">{{message}}</div> <div *ngIf="channelMembers" class="member-list"> <li *ngFor="let member of channelMembers"> <div class="member-item" *ngIf="utilService.isUserId(member.id)"> <sw-avatar [selectedUser]="member" [size]="34"></sw-avatar> <span class="text-ellipsis">{{member.name}}</span> <input type="radio" name="checkNewLeader" (click)="newLeader = member;"> </div> <ul *ngIf="!utilService.isUserId(member.id) && member.members"> <li class="community-name">{{member.name}}</li> <li *ngFor="let comMember of member.members"> <div class="member-item"> <sw-avatar [selectedUser]="comMember" [size]="34"></sw-avatar> <span class="text-ellipsis">{{comMember.name}}</span> <input type="radio" name="checkNewLeader" (click)="newLeader = comMember;"> </div> </li> </ul> </li> </div> <ul *ngIf="buttons" class="btn-group"> <li *ngFor="let button of buttons; index as i" class="btn-android" [ngClass]="{\'ink\': buttons.length-1 > i, \'border\': buttons.length>2 && buttons.length-1>i}" (click)="button.callback($event);showConfirm=false">{{button.name}}</li> </ul> <ul *ngIf="!buttons" class="btn-group"> <li class="btn-cancel btn-android ink" (click)="onCancelClick()">{{\'common.button.cancel\' | translate}}</li> <button class="btn-ok btn-android" (click)="onOkClick()">{{\'common.button.confirm\' | translate}}</button> </ul> </div> </div> </div> ',styles:[".confirm-curtain { position: fixed; top: 0;  bottom: 0;  left: 0;  right: 0;  background-color: rgba(0, 0, 0, 0.4);  z-index: 1000; } .confirm-curtain.floating { background-color: rgba(0, 0, 0, 0);  } .confirm-curtain .popup-window { visibility: hidden; position: fixed; left: 0;  right: 0; top: auto; bottom: auto; margin: auto; width: 500px; } .confirm-curtain.floating .popup-window { position: absolute; left: auto; right: auto; width: auto; min-width: 300px; max-width: 500px; box-shadow: 3.8px 5.9px 8px 0 rgba(0, 0, 0, 0.11); background-color: #ffffff; } .confirm-curtain.floating .popup-header { display: none; } .popup-content { padding: 15px; } .popup-content > i { display: inline-block; float: left; margin-top: 20px; margin-left: 6px; } .popup-content .message { font-size: 15px; font-weight: bold; padding: 20px 10px 30px 60px; padding-bottom: 30px; color: #222;\t border-bottom: solid 1px #e6e7e8; line-height: 40px; } .popup-content .message.no-border-bottom { border-bottom: none; } .popup-content .message > span, .popup-content .message > div { line-height: normal; } .popup-content .message > span { display: inline-block; } .popup-content .message > div:last-of-type { font-weight: normal; } .popup-content .member-list { max-height: 230px; overflow-y: auto; overflow-x: hidden; border: solid 1px var(--border-lightgray); font-size: 15px; font-weight: bold; margin-top: -10px; } .popup-content .member-list li { border-bottom: solid 1px var(--border-lightgray); } .popup-content .member-list li:last-of-type { border-bottom: none; } .popup-content .member-list .member-item { padding: 7px 9px; } .popup-content .member-list .member-item:hover { background-color: #f7f5f5; } .popup-content .member-list .member-item.on, .popup-content .member-list .member-item.on:hover { background-color: var(--select-blue); } .popup-content .member-list .member-item > sw-avatar { display: inline-block; height: 36px; vertical-align: top; margin-right: 8px; } .popup-content .member-list .member-item > span { display: inline-block; vertical-align: top; line-height: 36px; max-width: calc(100% - 44px - 20px); } .popup-content .member-list .member-item > input { float: right; margin-top: 10px; } .popup-content .member-list .community-name { font-size: 11px; font-weight: normal; color: #666464; border-bottom: solid 1px var(--border-lightgray); padding: 7px 9px; } .confirm-curtain.floating .popup-content .message { padding: 20px 5px 20px 50px; } .popup-content .btn-group { text-align: right; margin-top: 10px; } .popup-content .btn-group > li, .popup-content .btn-group button { font-size: 13px; padding: 8px 35px; display: inline-block; vertical-align: top; } .popup-content .btn-group li.border { border: 1px solid #b4b5b5; margin-right: 4px; padding: 7px 34px; }"]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:V},{type:O},{type:U},{type:T},{type:x}]},e}(),he=function(){function e(e,t,i,n,s,o,r){var a=this;this.router=e,this.translate=t,this.utilService=i,this.apiService=n,this.authService=s,this.toastService=o,this.publishService=r,this.currentUser=this.authService.getCurrentUser(),this.subscriptions=[],this.subscriptions.push(this.publishService.currentUserChange.subscribe((function(e){e&&(a.currentUser=e)})))}return e.prototype.ngOnInit=function(){},e.prototype.ngOnDestroy=function(){for(var e=0,t=this.subscriptions;e<t.length;e++){t[e].unsubscribe()}},e.prototype.logout=function(){this.authService.logout(),this.router.navigate([""])},e.prototype.setProfile=function(){this.publishService.pubChangeNotice({source:"layout.route",workspaceId:"settings",targetId:"profile"})},e.prototype.closePopup=function(){return this.publishService.pubPopupMessage(null),!1},e.prototype.openUserStatuses=function(e){this.userStatuses=this.utilService.getUserStatuses();var t=$(e.target||e.srcElement);this.selectListBox=t.hasClass("select-list-box")?t:t.parents(".select-list-box:first"),this.setSelectListPosition()},e.prototype.onFocusout=function(e){var t=this;e.relatedTarget&&(jQuery.contains(e.target,e.relatedTarget)||jQuery.contains(e.relatedTarget,e.target))||setTimeout((function(){t.userStatuses=null}),100)},e.prototype.setUserStatus=function(e,t){this.currentUser.status=t.id,this.userStatuses=null,this.updateCurrentUser()},e.prototype.setSelectListPosition=function(){var e=this,t=this.selectListBox.find("ul.select-list");0!==t.length?t.show():setTimeout((function(){e.setSelectListPosition()}),100)},e.prototype.keydownOnStatusText=function(e){if(13===(e.which||e.keyCode))return!1},e.prototype.keyupOnStatusText=function(e){var t=this,i=$(e.target).text();if(i&&i.length>50){var n=window.getSelection(),s=n.anchorNode,o=n.getRangeAt(0),r=o.startOffset;this.currentUser.statusText="",setTimeout((function(){s.nodeValue!==i?(t.currentUser.statusText=t.currentUser.statusText.substring(0,50),r=50):1===r?t.currentUser.statusText=i.substring(r,i.length):r===i.length?t.currentUser.statusText=i.substring(0,i.length-1):(t.currentUser.statusText=i.substring(0,r-1),t.currentUser.statusText=t.currentUser.statusText+i.substring(r,i.length)),setTimeout((function(){(o=document.createRange()).setStart(s,Math.min(Math.max(r-1,0),s.nodeValue.length)),n.removeAllRanges(),n.addRange(o),t.toastService.add("warn",t.translate.instant("user.error.status-text-overflow"))}))}))}},e.prototype.setUserStatusText=function(e){if(e.relatedTarget)return $("#header .my-avatar").removeAttr("tabindex"),void $(e.target).focus();this.currentUser.statusText=$(e.target).text(),this.currentUser.statusText&&this.currentUser.statusText.length>50&&(this.currentUser.statusText=this.currentUser.statusText.substring(0,50),this.toastService.add("warn",this.translate.instant("user.error.status-text-overflow"))),e.stopPropagation(),this.updateCurrentUser(),$("#header .my-avatar").attr("tabindex","-1").focus()},e.prototype.updateCurrentUser=function(){var e=this;this.apiService.updateUser(this.currentUser).then((function(t){t.status&&t.result&&(e.toastService.add("info",e.translate.instant("settings.text.profile-update-succeed")),t.result.password=e.currentUser.password,e.authService.restoreCurrentUser(t.result))}))},e.decorators=[{type:t.Component,args:[{selector:"sw-user-profile",template:'<div class="popup-window"> <span class="btn-setting" (click)="setProfile()"></span> <div *ngIf="currentUser" class="popup-content"> <div class="profile"> <sw-avatar [selectedUser]="currentUser" [size]="90"></sw-avatar> <div class="status"> <div class="select-list-box" tabindex="-1" (focusout)="onFocusout($event)" (click)="openUserStatuses($event)" (mousewheel)="$event.stopPropagation()"> <span [style.border]="!currentUser.status || currentUser.status === \'none\' ? \'1px solid #c5c5c5\': \'\'" [style.background-color]="utilService.getUserStatusById(currentUser.status || \'none\').colorCode" [style.color]="utilService.getUserStatusById(currentUser.status || \'none\').id === \'none\' ? \'#666464\' : \'#fff\'">{{\'user.text.status-\' + currentUser.status | translate}}</span> <i class="icon-select-list"></i> <ul *ngIf="userStatuses" class="select-list"> <li *ngFor="let status of userStatuses" (click)="setUserStatus($event, status)" [ngClass]="{\'on\': currentUser.status === status.id}"> <span *ngIf="status.colorCode" class="color-code" [style.background-color]="status.colorCode"></span> <span>{{status.name}}</span> <i *ngIf="currentUser.status === status.id" class="icon-list-checked"></i> </li> </ul> </div> </div> <div *ngIf="currentUser.company && currentUser.company.hasDepartment" class="department">{{currentUser.department ? currentUser.department.name : \'common.text.empty\' | translate}}</div> <div class="name">{{currentUser.name}} <span *ngIf="currentUser.position" class="position">{{currentUser.position.name}}</span></div> <div class="status-text"><div contenteditable="true" (keyup)="keyupOnStatusText($event)" (keydown)="keydownOnStatusText($event)" (focusout)="setUserStatusText($event)" [attr.placeholder]="\'user.text.input-status-text\' | translate">{{currentUser.statusText}}</div></div> </div> <div> <label><span class="icon-profile-contact"></span></label> <span>{{currentUser.phoneNo}}</span> </div> <div> <label><span class="icon-profile-email"></span></label> <span>{{currentUser.id}}</span> </div>         <div> <label><span class="icon-profile-user-role"></span></label> <span>{{(\'user.text.level-\' + currentUser.userLevel) | translate}}</span> </div>         </div> <div class="btn-group"> <button class="btn-android" (click)="logout()">{{\'common.button.logout\' | translate}}</button> </div> </div> ',styles:[".popup-window { position: absolute; top: 55px; right: 5px; left: auto; bottom: auto; width: 260px; border-radius: 5px; border: 1px solid #b4b5b5; box-shadow: 0px 7px 8px 0 rgba(0, 0, 0, 0.23); background-color: #ffffff; cursor: default; z-index: 1; } .popup-window > .btn-setting { float: right; cursor: pointer; margin-right: 10px; margin-top: 10px; margin-left: -14px; } .popup-header { border-top-left-radius: 5px; border-top-right-radius: 5px; } .popup-content { padding: 10px; font-size: 13px; color: #0e1b26; } .popup-content .profile { text-align: center; margin-bottom: 15px; } .popup-content .profile > div { margin: 5px; } .popup-content .profile .status .select-list-box > span:first-of-type { border-radius: 5px; font-size: 12px; color: #666464; padding: 2px 4px; } .select-list-box { margin-left: 20px; display: inline-block; outline: none; cursor: pointer; } .select-list-box .select-list { position: absolute; box-shadow: 1.1px 1.7px 4px 0 rgba(0, 0, 0, 0.24); border: solid 1px #b4b5b5; background-color: #ffffff; padding: 5px 0; border-radius: 5px; font-size: 13px; font-weight: normal; margin: 0 6px 0 -6px; color: #222222; z-index: 1000; display: none; max-height:512px; overflow-y: auto; } .select-list-box .select-list::-webkit-scrollbar { width: 0.5em; } .select-list-box .select-list > li { list-style: none; padding: 4px 30px 4px 10px; text-align: left; } .select-list-box .select-list > li.on { background-color: #3481cf; color: #ffffff; } .select-list-box .select-list > li:hover { background-color: rgba(52, 129, 207, 0.2); cursor: pointer; } .select-list-box .select-list > li.on:hover { background-color: #3481cf; } .select-list-box .select-list > li > span { white-space: nowrap; } .select-list-box .select-list > li > .color-code { display: inline-block; margin: 3px; width: 5px; height: 5px; border-radius: 50%; } .select-list-box .select-list > li > .color-code + span { padding-left: 10px; } .popup-content .profile > .department { font-size: 13px; color: #222; font-weight: normal;    } .popup-content .profile > .name { font-size: 18px; font-weight: bold; } .popup-content .profile > .name > .position { font-size: 15px; font-weight: normal; margin-left: 5px; } .popup-content .profile > .status-text { font-size: 12px; border-radius: 5px; border: solid 1px #c5c5c5; display: inline-block; width: calc(100% - 2px); padding: 1px 0; margin: 0; text-align: left; } .popup-content .profile > .status-text > div { border-radius: 5px; border: none; outline: none; width: calc(100% - 16px); padding: 0 7px; } .popup-content label { color: #666464; width: 20%; height: 30px; text-align: center; display: inline-block; } .popup-content label > span { vertical-align: bottom; } .popup-content label > span.icon-profile-email { margin-bottom: -2px; } .popup-content label + span { width: 80%; overflow: hidden; display: inline-block; vertical-align: top; word-break: break-word; } .btn-group { text-align: center; padding: 5px; margin-top: -17px; } .btn-group > button { width: 179px; height: 35px; border-radius: 17.5px; background-color: #0e1b26; margin: 5px; font-size: 13px; color: #fff; outline: none; padding: 0; cursor: pointer; } "]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:m.Router},{type:a.TranslateService},{type:O},{type:U},{type:T},{type:y},{type:x}]},e}(),ge=function(){function e(e,t,i,n,s,o,r){var a=this;this.router=e,this.translate=t,this.utilService=i,this.apiService=n,this.authService=s,this.toastService=o,this.publishService=r,this.currentUser=this.authService.getCurrentUser(),this.subscriptions=[],this.subscriptions.push(this.publishService.currentUserChange.subscribe((function(e){e&&(a.currentUser=e)})))}return e.prototype.ngOnInit=function(){},e.prototype.ngOnDestroy=function(){for(var e=0,t=this.subscriptions;e<t.length;e++){t[e].unsubscribe()}},Object.defineProperty(e.prototype,"selectedUser",{get:function(){return this._selectedUser},set:function(e){this._selectedUser=e||e},enumerable:!0,configurable:!0}),e.prototype.openPositions=function(){var e=this;this.positions=null,this.apiService.getCompanyPositions(this.currentUser.company.id).then((function(t){t&&!0===t.status&&(e.positions=t.result)}))},e.prototype.openUserLevels=function(){this.userLevels=this.utilService.getUserLevels()},e.prototype.setUserLevel=function(e){this.selectedUser.userLevel=e?e.id:null},e.prototype.closePopup=function(){return this.publishService.pubPopupMessage(null),!1},e.prototype.setDepartment=function(e){this.selectedUser.department=e?e[0]:this.currentUser.company},e.prototype.deleteUser=function(){var e=this;this.apiService.removeUsersFromCompany(this.currentUser.company.id,[this.selectedUser]).then((function(t){!0===t.status&&(e.publishService.pubChangeNotice({source:"settings.removeUser",userId:e.selectedUser.id}),e.toastService.add("info",e.translate.instant("user.text.successfully-remove-user",{name:e.selectedUser.name})),e.closePopup())}))},e.prototype.setUser=function(){var e=this;this.apiService.setCompanyUser(this.currentUser.company.id,this.selectedUser).then((function(t){!0===t.status&&(e.publishService.pubChangeNotice({source:"settings.userUpdated",userId:e.selectedUser}),e.toastService.add("info",e.translate.instant("user.text.successfully-update-user",{name:e.selectedUser.name})),e.closePopup())}))},e.decorators=[{type:t.Component,args:[{selector:"sw-set-user",template:'<div class="popup-window"> <div class="popup-header"> <span>{{\'user.text.set-user\' | translate}}</span> <a href="" class="icon-btn-close" (click)="closePopup()"></a> </div> <form *ngIf="selectedUser" class="popup-content" name="form" #f="ngForm" novalidate> <div class="profile"> <sw-avatar [selectedUser]="selectedUser" [size]="90"></sw-avatar> <div *ngIf="selectedUser.status"> <span class="status" [style.background-color]="utilService.getUserStatusById(selectedUser.status || \'none\').colorCode" [style.color]="utilService.getUserStatusById(selectedUser.status || \'none\').id === \'none\' ? \'#222\' : \'#fff\'">{{\'user.text.status-\' + selectedUser.status | translate}}</span> </div> <div *ngIf="currentUser.company && currentUser.company.hasDepartment" class="department">{{selectedUser.department ? selectedUser.department.name : \'common.text.empty\' | translate}}</div> <div class="name">{{selectedUser.name}} <span *ngIf="selectedUser.position" class="position">{{selectedUser.position.name}}</span></div> <div class="status-text">{{selectedUser.statusText || \'common.text.empty\' | translate}}</div> <i class="icon-status-text-pointer"></i> </div> <div *ngIf="currentUser.company && currentUser.company.hasDepartment"> <label>{{\'common.text.department\' | translate}}</label> <sw-auto-department class="value no-padding" [smallSize]="true" [selectedDepartments]="selectedUser.department ? [selectedUser.department] : null" (selectedDepartmentsChange)="setDepartment($event)" [multiple]="false"></sw-auto-department> </div> <div *ngIf="currentUser.company && currentUser.company.hasPosition"> <label>{{\'common.text.position\' | translate}}</label> <sw-select-box class="value" [(selectedObject)]="selectedUser.position" [selectObjects]="positions" (refreshSelectObjects)="openPositions()"></sw-select-box> </div> <div> <label>{{\'user.text.user-level\' | translate}}</label> <sw-select-box class="value" [selectedObject]="{id: selectedUser.userLevel, name: translate.instant(\'user.text.level-\' + selectedUser.userLevel)}" (selectedObjectChange)="setUserLevel($event)" [selectObjects]="userLevels" (refreshSelectObjects)="openUserLevels()"></sw-select-box> </div> <div> <label>{{\'common.text.contact\' | translate}}</label> <span class="value"><input type="text" autocomplete="off" name="contact" [ngModel]="selectedUser.contact" #contact="ngModel"></span> </div>         <div> <label>{{\'common.text.email\' | translate}}</label> <span class="value read-only">{{selectedUser.id}}</span> </div>         </form> <ul class="btn-group"> <li class="btn-android" (click)="deleteUser()">{{\'common.button.delete-member\' | translate}}</li> <button class="btn-android" (click)="setUser()">{{\'common.button.save\' | translate}}</button> </ul> </div> ',styles:[".popup-window { width: 455px; height: fit-content; } .popup-content { padding: 16px 22px; font-size: 13px; color: #222; } .popup-content > div { padding: 8px 15px; border-bottom: solid 1px #e6e7e8; } .popup-content .profile { padding: 10px 0; text-align: center; border-bottom: none; } .popup-content .profile > div { margin: 5px; } .popup-content .profile .status { border-radius: 5px; font-size: 12px; color: #fff; padding: 2px 8px; } .popup-content .profile > .department { font-size: 13px;\t } .popup-content .profile > .name { font-size: 18px; font-weight: bold; } .popup-content .profile > .name > .position { font-size: 15px; font-weight: normal; margin-left: 5px; } .popup-content .profile > .status-text { font-size: 12px; border-radius: 5px; border: solid 1px #c5c5c5; display: inline-block; width: calc(100% - 12px); padding: 5px; margin: 5px 0; } .popup-content label { color: #666464; width: 30%; display: inline-block; vertical-align: top; margin-top: 6px; } .popup-content .value { display: inline-block; vertical-align: top; } .popup-content span.value.read-only { padding: 5px 7px; width: calc(70% - 16px); } .popup-content span.value { padding: 4px 0; width: calc(70% - 2px); border: solid 1px #e4e4e4; } .popup-content span.value > input { width: calc(100% - 2px); border: none; } .popup-content .value.no-padding { padding: 0; width: 70%; } .popup-content sw-select-box.value { border: solid 1px #e4e4e4; width: auto; max-width: calc(70% - 16px); margin-top: 2px; margin-bottom: 2px; padding: 3px 7px; padding-right: 0; } .popup-content > div:first-of-type, .popup-content > div:last-of-type { border-bottom: solid 2px #b6babd; } .btn-group { text-align: left; padding: 0 22px; padding-bottom: 16px; } .btn-group > li { font-size: 13px; border-radius: 3px; outline: none; padding: 7px 20px; cursor: pointer; color: #f46864; border: solid 1px #f46864; background-color: #fbebea; display: inline-block; } .btn-group > button { float: right; font-size: 13px; padding: 8px 35px; }"]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:m.Router},{type:a.TranslateService},{type:O},{type:U},{type:T},{type:y},{type:x}]},e.propDecorators={selectedUser:[{type:t.Input,args:["selectedUser"]}]},e}(),fe=function(){function e(e,t,i,n,s,o,r){this.router=e,this.translate=t,this.utilService=i,this.apiService=n,this.authService=s,this.toastService=o,this.publishService=r,this.currentUser=this.authService.getCurrentUser()}return e.prototype.ngOnInit=function(){this.generateInviteLink()},e.prototype.closePopup=function(){return this.publishService.pubPopupMessage(null),!1},e.prototype.onEmailsChange=function(e){this.emails=e},e.prototype.copyToClipboard=function(){if(this.inviteLink){var e=$("<input>");$("body").append(e),e.val(this.inviteLink).select(),document.execCommand("copy"),e.remove(),this.toastService.add("info",this.translate.instant("users.text.copy-to-clipboard"))}},e.prototype.generateInviteLink=function(){this.inviteLink=window.location.origin+"/join/"+this.currentUser.company.id+"/user/"+(this.selectedDepartment?this.selectedDepartment.id:"noDepartment")},e.prototype.requestInviteJoin=function(){for(var e=this,t="",i=0;i<this.emails.length;i++)t=t+(0===i?"":";")+this.emails[i].id;return this.apiService.requestEmailInviteJoin(this.currentUser,t,this.inviteLink).then((function(t){t&&t.status&&(e.toastService.add("info",e.translate.instant("users.text.successfully-join-requested")),e.emails=null)})),!1},e.decorators=[{type:t.Component,args:[{selector:"sw-invite-new-user",template:'<div class="popup-window"> <div class="popup-header"> <span>{{\'users.text.invite-users\' | translate}}</span> <a href="" class="btn-popup-close" (click)="closePopup()"></a> </div> <div class="popup-content"> <div class="header"> <div class="select-group"> <sw-select-box [selectedObject]="selectedDepartment"></sw-select-box> </div> </div> <div class="body"> <div class="link"> <label>{{\'users.text.invite-url\' | translate}}</label> <input type="text" autocomplete="off" id="userInviteUrl" class="value" [ngModel]="inviteLink" (click)="copyToClipboard()" disabled> <button class="btn-android" [ngClass]="{\'disabled\': !inviteLink}" (click)="copyToClipboard()">{{\'users.button.link-to-clipboard\' | translate}}</button> </div> <div class="email"> <label>{{\'users.text.invite-email\' | translate}}</label> <sw-auto-user class="value" [selectedUsers]="emails" [type]="\'email\'" [multiple]="true" (selectedUsersChange)="onEmailsChange($event)"></sw-auto-user> <button class="btn-android" [ngClass]="{\'disabled\': !emails || emails.length === 0}" (click)="requestInviteJoin()">{{\'users.button.email-invite\' | translate}}</button> </div> </div> </div> </div> ',styles:[".popup-window { width: 660px; height: fit-content; } .popup-content { padding: 16px 22px; font-size: 13px; color: #222; } .popup-content > .header { border-bottom: solid 2px #b6babd; padding: 20px 0; } .popup-content > .header > span { font-size: 20px; font-weight: bold; color: #0e1b26; display: inline-block; } .popup-content > .header .select-group { display: inline-block; font-size: 13px; color: #666464; margin-left: 10px; margin-top: 5px; vertical-align: top; } .popup-content > .header .select-group > .select-item { margin-right: 10px; } .popup-content > .header .select-group > .select-item.on { font-weight: bold; color: #222; } .popup-content > .header .select-group > sw-check-box { margin-right: 10px; } .popup-content > .header .select-group > sw-select-department { vertical-align: top; display: inline-block; margin-top: -2px;    } .popup-content > .body { margin-top: 20px; } .popup-content > .body > div { padding: 10px 0; } .popup-content > .body > div label { color: #666464; font-size: 13px; display: block; margin-bottom: 5px; } .popup-content > .body > div .value { width: calc(100% - 142px); display: inline-block; } .popup-content > .body > div input.value { font-size: 15px; color: #3481cf; padding: 6.5px 0; background-color: #f2f2f2; vertical-align: top; width: calc(100% - 145px); } .popup-content > .body > div .btn-android { border-radius: 3px; width: 125px; padding: 8.5px; margin-left: 14px; vertical-align: top; font-size: 13px; } "]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:m.Router},{type:a.TranslateService},{type:O},{type:U},{type:T},{type:y},{type:x}]},e.propDecorators={selectedDepartment:[{type:t.Input}]},e}(),ve=function(){function e(e,i,n){this.translate=e,this.utilService=i,this.publishService=n,this.selectedDateChange=new t.EventEmitter,this.showDatePickerChange=new t.EventEmitter,this.myDatePickerOptions={dateFormat:"yyyy.mm.dd",showTodayBtn:!1,inline:!0,monthSelector:!1,yearSelector:!1}}return e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"event",{get:function(){return this._event},set:function(e){var t=this;this._event=e,this.event&&setTimeout((function(){var e,i,n,s,o=$("sw-date-picker .popup-window"),r=t.event.clientY,a=t.event.clientX,l=o.height(),c=o.width(),d=$(window).width(),p=$(window).height(),u=$(t.event.target).parents(".search-message");p<r+40+l?i=p-r+20:e=r+20,d<a+20+c?s=20:n=a+(u.length?-1*c/2:10),o.css({top:e?e+"px":"auto",bottom:i?i+"px":"auto",left:n?n+"px":"auto",right:s?s+"px":"auto",visibility:"visible"});var m=o.find(".markcurrday");m.css({"text-decoration":"none"}),m.parents(".daycell:first").addClass("currday"),o.find("button").click((function(){var e=o.find(".markcurrday");e.css({"text-decoration":"none"}),e.parents(".daycell:first").addClass("currday")}))}))},enumerable:!0,configurable:!0}),e.prototype.closePopup=function(){return this.showDatePickerChange.emit(!1),!1},e.prototype.getCurrentDPLocale=function(){switch(this.translate.currentLang){case"ko":return"ko-kr";case"en":return"en"}return"ko-kr"},Object.defineProperty(e.prototype,"selectedDate",{get:function(){return this._selectedDate},set:function(e){this._selectedDate=e},enumerable:!0,configurable:!0}),e.prototype.onDateSearchChanged=function(e){this._selectedDate=e,this.selectedDateChange.emit(this.selectedDate)},e.decorators=[{type:t.Component,args:[{selector:"sw-date-picker-popup",template:'<div *ngIf="showDatePicker && event" class="picker-curtain popup-app" (click)="closePopup()"> <div class="popup-window" (click)="$event.stopPropagation()"> <div class="popup-header"> <span>{{\'popup.text.date-search\' | translate}}</span> <a href="" class="btn-popup-close" (click)="closePopup()"></a> </div> <div class="popup-content"> <my-date-picker name="mydate" [options]="myDatePickerOptions" [locale]="getCurrentDPLocale()" [(ngModel)]="model" (dateChanged)="onDateSearchChanged($event)"></my-date-picker> </div> </div> </div> ',styles:[".picker-curtain { position: fixed; top: 0;  bottom: 0;  left: 0;  right: 0;  background-color: rgba(0, 0, 0, 0);  z-index: 1000; } .picker-curtain .popup-window { position: absolute; width: 280px; height: 324px; border-radius: 5px; box-shadow: 0px 3px 9px 0 rgba(25, 25, 25, 0.26); border: solid 1px #b4b5b5; background-color: #ffffff; left: auto; right: auto; top: auto; bottom: auto; z-index: 1000; visibility: hidden; } .picker-curtain .popup-window .popup-content { padding: 5px; } "]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:a.TranslateService},{type:O},{type:x}]},e.propDecorators={showDatePicker:[{type:t.Input}],selectedDateChange:[{type:t.Output}],showDatePickerChange:[{type:t.Output}],event:[{type:t.Input,args:["event"]}],selectedDate:[{type:t.Input,args:["selectedDate"]}]},e}(),be=function(){function e(e,t,i,n,s,o,r){this.router=e,this.translate=t,this.utilService=i,this.apiService=n,this.authService=s,this.toastService=o,this.publishService=r,this.currentUser=this.authService.getCurrentUser(),this.listOrders=[{id:"byUserName",name:this.translate.instant("search.text.byUserName")},{id:"byJoinDate",name:this.translate.instant("search.text.byJoinDate")}],this.currentOrder=this.listOrders[0]}return e.prototype.ngOnInit=function(){$("sw-user-list").focus()},Object.defineProperty(e.prototype,"company",{get:function(){return this._company},set:function(e){var t=this;this._company=e,this.users=null,this.company&&this.apiService.getCompanyUsers(this.company.id).then((function(e){e&&e.status&&(t.orgUsers=e.result,t.reorderUsers())}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"users",{get:function(){return this._users},set:function(e){this._users=e},enumerable:!0,configurable:!0}),e.prototype.onUsersChange=function(e){var t=this,i=this.company;this.company=null,setTimeout((function(){t.company=i}))},e.prototype.belatedSearchText=function(e){var t=this;setTimeout((function(e){e==t.searchText&&(t.users=t.orgUsers.filter((function(t){return t.id.includes(e)||t.name&&t.name.includes(e)||t.department&&t.department.name.includes(e)})))}),300,e)},e.prototype.keyupOnSearchText=function(e){this.belatedSearchText(this.searchText)},e.prototype.reorderUsers=function(){if(this.orgUsers&&this.currentOrder)switch(this.currentOrder.id){case"byUserName":this.users=this.orgUsers.sort((function(e,t){return e.id===e.name?1:t.id===t.name||e.name<t.name?-1:e.name>t.name?1:0}));break;case"byJoinDate":this.users=this.orgUsers.sort((function(e,t){return e.targetJoinDate?t.targetJoinDate?e.targetJoinDate<t.targetJoinDate?-1:e.targetJoinDate>t.targetJoinDate?1:0:-1:1}))}},e.prototype.requestInviteJoin=function(e,t){var i=this;e.stopPropagation();var n=window.location.origin+"/join/"+this.company.id+"/"+t.userLevel+"/"+(t.departmentId?t.departmentId:"noDepartment");return this.apiService.requestEmailInviteJoin(this.currentUser,t.id,n).then((function(e){e&&e.status&&i.toastService.add("info",i.translate.instant("users.text.successfully-join-requested"))})),!1},e.prototype.cancelInvitation=function(e,t,i){var n=this;return e.stopPropagation(),this.apiService.cancelCompanyJoin(this.company.id,t.id).then((function(e){e&&e.status&&(n.toastService.add("info",n.translate.instant("users.text.successfully-cancel-invitation",{name:t.name})),n.orgUsers.length>i&&n.orgUsers.splice(i,1),n.reorderUsers())})),!1},e.prototype.setListOrder=function(e){this.currentOrder=e,this.reorderUsers()},e.prototype.selectUser=function(e){this.selectedUser=e},e.decorators=[{type:t.Component,args:[{selector:"sw-user-list",template:'<div class="popup-app"> <div class="popup-window" (click)="$event.stopPropagation()"> <div class="popup-content"> <div class="search-header"> <div class="list-search"> <input type="text" autocomplete="off" [(ngModel)]="searchText" placeholder="{{\'search.text.user-department\' | translate}}" (keyup)="keyupOnSearchText($event)"/>     </div> <div class="list-header"> <sw-select-box class="sort-by" [selectedObject]="currentOrder" (selectedObjectChange)="setListOrder($event)" [selectObjects]="listOrders"></sw-select-box> </div>   </div> <sw-view-user *ngIf="selectedUser" [(selectedUser)]="selectedUser" [amIManager]="amIManager" [company]="company" (usersChange)="onUsersChange($event)"></sw-view-user> <ul *ngIf="users" class="user-list"> <li *ngFor="let user of users index as i"> <div class="user-item" (click)="selectUser(user)"> <sw-avatar [selectedUser]="user" [size]="36"></sw-avatar> <i *ngIf="user.userLevel === \'admin\'" class="icon-leader"></i> <span class="name text-ellipsis">{{user.name}}<span *ngIf="user.userLevel === \'guest\'" class="guest">Guest</span></span> <span *ngIf="user.targetJoinDate" class="join-date">{{utilService.toDateTimeShortString(user.targetJoinDate)}}</span> <span *ngIf="user.targetJoinDate" class="join-actions"> <span class="btn-mail-resend" [attr.sw-title]="\'user.text.resend-invite-mail\' | translate" (click)="requestInviteJoin($event, user)"></span> <span class="btn-cancel-invitation" [attr.sw-title]="\'user.text.cancel-invitation\' | translate" (click)="cancelInvitation($event, user, i)"></span> </span> </div> </li> </ul> </div> </div> </div> ',styles:[".popup-window { position: absolute; top: auto; bottom: auto; left: auto; right: auto; width: 297px; height: fit-content; border-radius: 10px; box-shadow: 0px 3px 16px 0 rgba(0, 0, 0, 0.35); background-color: #ffffff; margin-bottom: 20px; } .popup-content { padding: 0; font-size: 13px; color: #222; } .popup-content .search-header { padding: 8px 9px; border-bottom: solid 1px #e6e7e8; } .popup-content .search-header .list-search { background-color: #f1f3f4; border-radius: 10px; padding: 5px 20px;   } .popup-content .search-header .list-search input { font-size: 12px; border: none; width: 100%; vertical-align: middle; outline: none; margin-top: -7px; margin-left: -7px; background-color: #f1f3f4; } .popup-content .search-header .list-header { min-height: 24px; color: #666464; font-size: 11px } .popup-content .search-header .list-header > span { display: inline-block; vertical-align: bottom; margin-bottom: -8px; } .popup-content .search-header .list-header .sort-by { float: right; margin-top: 6px; } .popup-content .user-list { max-height: 398px; overflow-y: auto; background-color: #fff; border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; } .popup-content .user-list .user-item:hover { background-color: #f7f5f5; } .popup-content .user-list .user-item { border-bottom: solid 1px #e6e7e8; font-size: 15px; height: 38px; font-weight: bold; color: #222222; padding: 5px 7px; overflow: hidden; cursor: pointer; } .popup-content .user-list li:last-of-type .user-item { border-bottom: none; border-radius: 10px; } .popup-content .user-list .user-item.on,  .popup-content .user-list .user-item.on:hover { background-color: #eaeff4; } .popup-content .user-list .user-item img,  .popup-content .user-list .user-item span{ vertical-align: middle; } .popup-content .user-list .user-item .icon-leader{ margin-left:-14px; margin-top: -14px; } .popup-content .user-list .user-item .name { font-size: 15px; font-weight: bold; text-align: left; margin-left: 12px; color: #222222; vertical-align: top; margin-top: 7px; display: inline-block; max-width: calc(100% - 118px); } .popup-content .user-list .user-item .name > .guest { font-size: 11px; font-weight: normal; color: #222222; display: inline-block; margin-left: 7px; width: 40px; border-radius: 7.5px; border: solid 1px #bcbcbc; text-align: center; line-height: 13px; } .popup-content .user-list .user-item .join-date { float: right; font-size: 11px; font-weight: normal; margin-top: 10px; } .popup-content .user-list .user-item .join-actions { float: right; margin-top: 7px; } .popup-content .user-list .user-item .join-actions > span { cursor: pointer; } .popup-content .user-list .user-item .join-actions > span:first-of-type { margin-right: 10px; } "]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:m.Router},{type:a.TranslateService},{type:O},{type:U},{type:T},{type:y},{type:x}]},e.propDecorators={amIManager:[{type:t.Input}],company:[{type:t.Input,args:["company"]}]},e}(),ye=function(){function e(e,i,n,s,o,r,a){this.router=e,this.translate=i,this.utilService=n,this.apiService=s,this.authService=o,this.toastService=r,this.publishService=a,this.selectedUserChange=new t.EventEmitter,this.usersChange=new t.EventEmitter,this.currentUser=this.authService.getCurrentUser()}return e.prototype.ngOnInit=function(){},e.prototype.ngOnDestroy=function(){},e.prototype.closePopup=function(e){return this.selectedUserChange.emit(null),$(e.target).parents("sw-user-list:first").focus(),!1},e.prototype.setUserOut=function(e){var t=this;return e.stopPropagation(),this.apiService.setUserOutOfCompany(this.company.id,this.selectedUser.id).then((function(i){i&&i.status&&(t.toastService.add("info",t.translate.instant("community.text.successfully-user-out",{name:t.selectedUser.name})),t.usersChange.emit(!0),t.selectedUserChange.emit(null),$(e.target).parents("sw-user-list:first").focus())})),!1},e.prototype.setUserAsManager=function(e){var t=this;return e.stopPropagation(),this.apiService.setUserAsManagerOfCompany(this.company.id,this.selectedUser.id).then((function(e){e&&e.status&&(t.toastService.add("info",t.translate.instant("community.text.successfully-user-as-manager",{name:t.selectedUser.name})),t.usersChange.emit(!0))})),!1},e.prototype.requestInviteJoin=function(e,t){var i=this;e.stopPropagation();var n=window.location.origin+"/join/"+this.company.id+"/"+t.userLevel+"/"+(t.departmentId?t.departmentId:"noDepartment"),s=JSON.parse(JSON.stringify(this.currentUser));return s.company=this.company,s.companyId=this.company.id,this.apiService.requestEmailInviteJoin(s,t.id,n).then((function(e){e&&e.status&&(i.toastService.add("info",i.translate.instant("community.text.successfully-resend-invite",{name:t.name})),i.selectedUserChange.emit(null))})),!1},e.prototype.cancelInvitation=function(e,t){var i=this;return e.stopPropagation(),this.apiService.cancelCompanyJoin(this.company.id,t.id).then((function(n){n&&n.status&&(i.toastService.add("info",i.translate.instant("community.text.successfully-cancel-invitation",{name:t.name})),i.usersChange.emit(!0),i.selectedUserChange.emit(null),$(e.target).parents("sw-user-list:first").focus())})),!1},e.decorators=[{type:t.Component,args:[{selector:"sw-view-user",template:'<div class="popup-window" (focusout)="$event.stopPropagation()"> <div *ngIf="selectedUser" class="popup-content"> <a href="" class="btn-popup-close-gray" (click)="closePopup($event)"></a> <div class="profile"> <sw-avatar [selectedUser]="selectedUser" [size]="90"></sw-avatar> <div *ngIf="selectedUser.status && selectedUser.joinDate"> <span class="status" [style.background-color]="utilService.getUserStatusById(selectedUser.status || \'none\').colorCode" [style.color]="utilService.getUserStatusById(selectedUser.status || \'none\').id === \'none\' ? \'#222\' : \'#fff\'">{{\'user.text.status-\' + selectedUser.status | translate}}</span> </div> <div *ngIf="currentUser.company && currentUser.company.hasDepartment" class="department">{{selectedUser.department ? selectedUser.department.name : \'common.text.empty\' | translate}}</div> <div class="name">{{selectedUser.name}} <span *ngIf="selectedUser.position" class="position">{{selectedUser.position.name}}</span></div> <div *ngIf="selectedUser.joinDate" class="status-text">{{selectedUser.statusText || \'user.text.no-status-text\' | translate}}</div> </div> <div *ngIf="selectedUser.joinDate"> <label><span class="icon-profile-contact"></span></label> <span class="value">{{selectedUser.contact || \'common.text.empty\' | translate }}</span> </div>         <div> <label><span class="icon-profile-email"></span></label> <span class="value">{{selectedUser.id}}</span> </div>         <div> <label><span class="icon-profile-user-role"></span></label> <span class="value">{{translate.instant(\'user.text.level-\' + selectedUser.userLevel)}}</span> </div>         </div> <div *ngIf="selectedUser.joinDate && amIManager && selectedUser.id !== currentUser.id" class="btn-group"> <button class="btn-android" (click)="setUserOut($event)">{{\'community.button.set-user-out\' | translate}}</button> <button class="btn-android" (click)="setUserAsManager($event)">{{\'community.button.set-user-as-manager\' | translate}}</button> </div> <ul *ngIf="!selectedUser.joinDate && selectedUser.id !== currentUser.id" class="btn-group"> <li class="btn-android" (click)="requestInviteJoin($event, selectedUser)">{{\'user.text.resend-invite-mail\' | translate}}</li> <button class="btn-android" (click)="cancelInvitation($event, selectedUser)">{{\'user.text.cancel-invitation\' | translate}}</button> </ul> </div> ',styles:[".popup-window { position: absolute; width: 239px; height: fit-content; margin-left: -260px; border-radius: 5px; box-shadow: 0px 7px 8px 0 rgba(0, 0, 0, 0.23); border: solid 1px #e6e7e8; z-index: 1000; } .popup-content { padding: 10px; font-size: 13px; color: #222; } .popup-content > a { margin-left: -15px; } .popup-content > div { padding: 8px 15px; } .popup-content .profile { padding: 0; text-align: center; border-bottom: none; } .popup-content .profile > div { margin: 5px; } .popup-content .profile .status { border-radius: 5px; font-size: 12px; color: #fff; padding: 2px 8px; } .popup-content .profile > .department { font-size: 13px;\t } .popup-content .profile > .name { font-size: 18px; font-weight: bold; } .popup-content .profile > .name > .position { font-size: 15px; font-weight: normal; margin-left: 5px; } .popup-content .profile > .status-text { font-size: 12px; border-radius: 5px; border: solid 1px #c5c5c5; display: inline-block; width: calc(100% - 12px); padding: 5px; margin: 5px 0; white-space: normal; text-align: left; } .popup-content label { color: #666464; width: 20%; display: inline-block; vertical-align: top; margin-top: 4px; text-align: center; } .popup-content label > .icon-profile-email { margin-bottom: -2px; } .popup-content .value { display: inline-block; vertical-align: top; margin-top: 1px; width: calc(80% - 2px); } .btn-group { text-align: left; padding: 0 10px; padding-bottom: 10px; font-size: 13px; } .btn-group > li, .btn-group > button { outline: none; cursor: pointer; width: 105px; height: 38px; color: #222; background-color: #fff; border: 1px solid #b4b5b5; border-radius: 5px; padding: 0; display: inline-block; vertical-align: top; } .btn-group > button { float: right; }"]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:m.Router},{type:a.TranslateService},{type:O},{type:U},{type:T},{type:y},{type:x}]},e.propDecorators={selectedUser:[{type:t.Input}],selectedUserChange:[{type:t.Output}],amIManager:[{type:t.Input}],company:[{type:t.Input}],usersChange:[{type:t.Output}]},e}(),xe=function(){function e(e){this.toastService=e,this.toastsElement=null}return e.prototype.ngOnInit=function(){this.toastsElement=document.querySelector("#toasts");var e=this;this.toastsElement.addEventListener("webkitAnimationEnd",(function(t){"hide"===t.animationName&&e.toastService.toasts.splice(0,1)}))},e.prototype.onClose=function(e){return e<this.toastService.toasts.length&&this.toastService.toasts.splice(e,1),!1},e.decorators=[{type:t.Component,args:[{selector:"sw-toast",template:'<ul id="toasts"> <li *ngFor="let toast of toastService.toasts, let i = index" class="{{toast.type}}"> <i class="icon-toast-{{toast.type}}"></i> <span class="text">{{toast.text}}</span> <i class="btn-toast-close" (click)="onClose(i)"></i> </li> </ul>',styles:["#toasts { position: fixed; max-width: 100%; right: 0; bottom: 0; -webkit-transform: translateZ(0); transform: translateZ(0); padding: 0 10px; box-sizing: border-box; transition: height 1s; z-index: 1000; } #toasts li { width: 360px; font-size: 13px; padding: 11px 16px; background: #0e1b26; color: #fff; opacity: 0.9; border-radius: 5.2px; margin: 10px 0; vertical-align: middle; -webkit-animation: popup 0.6s cubic-bezier(0.1, 1.06, 0.6, 1.34), hide 0.4s 5s; animation: popup 0.6s cubic-bezier(0.1, 1.06, 0.6, 1.34), hide 0.4s 5s; } #toasts li.info { background: #0e1b26; } #toasts li.error { background: #eb5652; } #toasts li.warn { background: #ff8a00; } #toasts li > .text { display: inline-block; vertical-align: middle; width: 311px; margin: 0 13px;\t } #toasts li > i { vertical-align: middle; } @-webkit-keyframes popup { from { -webkit-transform: translateX(50%); transform: translateX(50%); opacity: 0; } 100% { -webkit-transform: translateX(0%); transform: translateX(0%); opacity: 1; } } @keyframes popup { from { -webkit-transform: translateX(50%); transform: translateX(50%); opacity: 0; } 100% { -webkit-transform: translateX(0%); transform: translateX(0%); opacity: 1; } } @-webkit-keyframes hide { from { opacity: 1; } 100% { opacity: 0; } } @keyframes hide { from { opacity: 1; } 100% { opacity: 0; } } "]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:y}]},e}(),we=function(){function e(e,t){var i=this;this.toastService=e,this.router=t,this.swTitle=null,$(document).on("mouseenter","[sw-title]",(function(e){i.swTitle=$(e.target).attr("sw-title")||$(e.target).parents("[sw-title]:first").attr("sw-title");var t=e;$(document).on("mousemove",(function(e){t=e})),setTimeout((function(){$(document).off("mousemove");var e=$("#sw-title");0!==e.length&&e.css({left:t.pageX-e.width()/2+"px",top:t.pageY-40+"px"})}),500)})),$(document).on("mouseleave","[sw-title]",(function(e){i.swTitle=null,$("#sw-title").css({left:"-1000px",top:"-1000px"})}))}return e.prototype.ngOnInit=function(){this.toastService.add("info","Welcome to SMARWORKS.NET!")},e.prototype.gotoPage=function(e){var t=this;return setTimeout((function(i){t.router.navigate([e])}),300),!1},e.decorators=[{type:t.Component,args:[{selector:"sw-welcome",template:'\x3c!-- <div> <ckeditor [(ngModel)]="mycontent" #myckeditor [config]="ckeConfig" debounce="500"> </ckeditor> </div> --\x3e <div class="header"> <a (click)="gotoPage(\'/welcome\')" class="img-product-logo"></a> <div class="menus"> <a class="btn-android ink" (click)="gotoPage(\'/login\')">{{\'common.button.login\' | translate}}</a> <a class="btn-android" (click)="gotoPage(\'/join\')">{{\'common.button.join\' | translate}}</a> </div> </div> <div class="body"> <div class="image"> <i class="img-welcome"></i> </div> <div class="intro"> <p>Autonomous Driving</p> <div>{{\'welcome.text.introduction-content\' | translate}}</div> <a (click)="gotoPage(\'/get-started\')" class="get-started">{{\'welcome.text.get-started\' | translate}} ></a> \x3c!--          <a class="get-started">{{\'welcome.text.get-started\' | translate}} ></a> --\x3e    </div> </div> <span class="btn-help-talk"> <i class="icon-help-talk"></i> </span> <div class="footer"> <span>Copyrightⓒ SmartWorks.net, Inc. & AIROV Tech. All Rights Reserved.</span> <span class="logos"> <i class="logo-smartworksnet-inc"></i> <i class="logo-airov-inc"></i> </span> </div> <div *ngIf="swTitle" id="sw-title"> <span class="content">{{swTitle}}</span> <span class="pointer"></span> </div> ',styles:[".header { position: absolute; top: 0; left: 0; right: 0; padding: 20px 25px; background-color: #ffffff; } .header > a { font-size: 20px; font-weight: bold; color: #111b25; } .header > .menus { float: right; } .header > .menus > a { font-size: 15px; color: #0e1b26; background-color: #fff; } .header > .menus > a:last-of-type { border-radius: 5px; color: #3481cf; font-weight: bold; border: solid 1px #3481cf; padding: 5px 20px; } .body { position: absolute; top: 70px; left: 0; right: 0; bottom: 42px; background-color: #ffffff; padding: 50px; min-width: 900px; } .body .image { width: calc(100% - 540px); height: 100%; display: inline-block; text-align: right; } .body .intro { text-align: left; width: 440px; display: inline-block; color: #222; vertical-align: top; font-size: 17px; padding-right: 100px; line-height: 1.76; } .body .intro > p { font-size: 40px; font-weight: bold; color: #3481cf; vertical-align: top; margin: 23px 0; } .body .intro > a { font-size: 18px; color: #fff; border-radius: 5px; background-color: #3481cf; padding: 10px 20px; margin-top: 40px; display: inline-block; } .footer { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 24px; text-align: center; font-size: 12px; color: #9fa5b1; } .footer > .logos { position: absolute; right: 24px; bottom: 12px;\t } .footer > .logos > i { margin-left: 25px; vertical-align: bottom; } .btn-help-talk {   position: absolute; right: 20px; bottom: 70px; width: 57px; border-radius: 50%; box-shadow: 0px 2px 4px 0 rgba(0, 0, 0, 0.24); background-color: #3481cf; display: inline-block; padding: 14px 0; cursor: pointer; text-align: center; } .btn-help-talk > .icon-help-talk { vertical-align: top; }",""]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:y},{type:m.Router}]},e}(),Se=function(){function e(e){var t=this;this.router=e,this.scrollAutoMoving=!1,this.currentBigPage="",this.currentDetailPage="",this.currentIndex=1,this.contents=[{level:1,level1:"start",level2:null,level3:null,title:"시작하기",spaceHolder:!0},{level:2,level1:"start",level2:"join",level3:null,title:"회원가입",spaceHolder:!1},{level:2,level1:"start",level2:"login",level3:null,title:"로그인",spaceHolder:!1},{level:1,level1:"main",level2:null,level3:null,title:"메인화면",spaceHolder:!0},{level:2,level1:"main",level2:"layout",level3:null,title:"메인화면 구성",spaceHolder:!1},{level:1,level1:"home",level2:null,level3:null,title:"홈",spaceHolder:!0},{level:2,level1:"home",level2:"preparing",level3:null,title:"준비중입니다.",spaceHolder:!1},{level:1,level1:"annotation",level2:null,level3:null,title:"어노테이션",spaceHolder:!0},{level:2,level1:"annotation",level2:"annotation-layout",level3:null,title:"어노테이션 구성",spaceHolder:!1},{level:2,level1:"annotation",level2:"scenario-add",level3:null,title:"새로운 시나리오 추가",spaceHolder:!1},{level:3,level1:"annotation",level2:"scenario-add",level3:"required-item",title:"필수항목",spaceHolder:!1},{level:3,level1:"annotation",level2:"scenario-add",level3:"sensor",title:"센서",spaceHolder:!1},{level:3,level1:"annotation",level2:"scenario-add",level3:"scenario-property",title:"시나리오 속성",spaceHolder:!1},{level:3,level1:"annotation",level2:"scenario-add",level3:"frame-property",title:"프레임 속성목록",spaceHolder:!1},{level:3,level1:"annotation",level2:"scenario-add",level3:"object-property",title:"사물 속성목록",spaceHolder:!1},{level:2,level1:"annotation",level2:"dataset-add",level3:null,title:"DATASET 추가",spaceHolder:!1},{level:2,level1:"annotation",level2:"annotation-tool-layout",level3:null,title:"어노테이션 툴 구성",spaceHolder:!1},{level:2,level1:"annotation",level2:"annotation-tool-usage",level3:null,title:"어노테이션 툴 사용",spaceHolder:!1},{level:3,level1:"annotation",level2:"annotation-tool-usage",level3:"box-draw",title:"박스 그리기",spaceHolder:!1},{level:3,level1:"annotation",level2:"annotation-tool-usage",level3:"car-line-draw",title:"차선 그리기",spaceHolder:!1},{level:3,level1:"annotation",level2:"annotation-tool-usage",level3:"dot-line-draw",title:"점 그리기",spaceHolder:!1},{level:3,level1:"annotation",level2:"annotation-tool-usage",level3:"semantic-draw",title:"시멘틱 그리기",spaceHolder:!1},{level:3,level1:"annotation",level2:"annotation-tool-usage",level3:"frame-status",title:"프레임 상태",spaceHolder:!1},{level:2,level1:"annotation",level2:"keyboard-shortcut",level3:null,title:"단축키",spaceHolder:!1},{level:1,level1:"verification",level2:null,level3:null,title:"검증/평가",spaceHolder:!0},{level:2,level1:"verification",level2:"preparing",level3:null,title:"준비중입니다.",spaceHolder:!1},{level:1,level1:"user",level2:null,level3:null,title:"사용자",spaceHolder:!0},{level:2,level1:"user",level2:"user-management",level3:null,title:"사용자 관리",spaceHolder:!1},{level:2,level1:"user",level2:"user-invitation",level3:null,title:"사용자 초대",spaceHolder:!1},{level:1,level1:"setting",level2:null,level3:null,title:"설정",spaceHolder:!0},{level:2,level1:"setting",level2:"profile-setting",level3:null,title:"프로파일 설정",spaceHolder:!1}],this.swTitle=null,$(document).on("mouseenter","[sw-title]",(function(e){t.swTitle=$(e.target).attr("sw-title")||$(e.target).parents("[sw-title]:first").attr("sw-title");var i=e;$(document).on("mousemove",(function(e){i=e})),setTimeout((function(){$(document).off("mousemove");var e=$("#sw-title");0!==e.length&&e.css({left:i.pageX-e.width()/2+"px",top:i.pageY-40+"px"})}),500)})),$(document).on("mouseleave","[sw-title]",(function(e){t.swTitle=null,$("#sw-title").css({left:"-1000px",top:"-1000px"})}))}return e.prototype.ngOnInit=function(){var e=this,t=$("sw-get-started > .content");setTimeout((function(){t.scrollTop(100)}),300);var i=t.height(),n=0;t.scroll((function(s){var o=t.scrollTop(),r=t.prop("scrollHeight");if(n<o)o+i+10>r&&-1!==(a=e.getCurrentIndex(1))&&(e.currentIndex=a,o=100,t.scrollTop(100));else if(n>o){var a;if(o-10<0)-1!==(a=e.getCurrentIndex(-1))&&(e.currentIndex=a,o=100,t.scrollTop(100))}n=o}))},e.prototype.getCurrentIndex=function(e){if(1===e){if(this.currentIndex+1>=this.contents.length)return-1;for(var t=this.currentIndex+1;t<this.contents.length;t++)if(!this.contents[t].spaceHolder)return this.scrollNavIndex(e,t),t}else if(-1===e){if(0===this.currentIndex)return-1;for(t=this.currentIndex-1;t>=0;t--)if(!this.contents[t].spaceHolder)return this.scrollNavIndex(e,t),t}return-1},e.prototype.getLevelTitle=function(e,t){for(var i=0;i<this.contents.length;i++){if(1===e&&this.contents[i].level1===t)return this.contents[i].title;if(2===e&&this.contents[i].level2===t)return this.contents[i].title}},e.prototype.moveToPage=function(e,t){e||(this.currentIndex=t,$("sw-get-started > .content").scrollTop(200))},e.prototype.scrollNavIndex=function(e,t){var i=$("sw-get-started > .nav .table-contents"),n=i.find("li:first"),s=i.find("li:eq("+t+")"),o=s.position().top-n.position().top,r=o+s.outerHeight();1===e?i.scrollTop()+i.height()<r&&i.scrollTop(r-i.height()+20):-1===e&&i.scrollTop()>o&&i.scrollTop(o-20)},e.prototype.gotoPage=function(e){var t=this;setTimeout((function(i){t.router.navigate([e])}),300)},e.decorators=[{type:t.Component,args:[{selector:"sw-get-started",template:'<div class="header"> <a (click)="gotoPage(\'/welcome\')" class="img-product-logo"></a> <div class="menus"> <a class="btn-android" (click)="gotoPage(\'/login\')">{{\'common.button.login\' | translate}}</a> <a class="btn-android" (click)="gotoPage(\'/join\')">{{\'common.button.join\' | translate}}</a> </div> </div> <div class="line"></div> <div class="nav"> <div class="search-box"> <input type="text" class="search" placeholder="매뉴얼 검색" /> </div> <div class="table-contents"> <ul *ngIf="contents"class="contents"> \x3c!-- <li *ngFor="let content of contents index as i" class="content-item level{{content.level}}" [ngClass]="{\'on\': currentIndex === i, \'space-holder\': content.spaceHolder}"  (click)="content.spaceHolder ? \'\': currentIndex = i">{{content.title}}</li> --\x3e <li *ngFor="let content of contents index as i" class="content-item level{{content.level}}" [ngClass]="{\'on\': currentIndex === i, \'space-holder\': content.spaceHolder}"  (click)="moveToPage(content.spaceHolder, i)">{{content.title}}</li> </ul> </div> </div> <div class="content"> <ul *ngIf="contents[currentIndex].level === 2" class="content-path"> <li>{{getLevelTitle(1, contents[currentIndex].level1)}}<span>></span></li> <li>{{contents[currentIndex].title}}</li> </ul> <ul *ngIf="contents[currentIndex].level === 3" class="content-path"> <li>{{getLevelTitle(1, contents[currentIndex].level1)}}<span>></span></li> <li>{{getLevelTitle(2, contents[currentIndex].level2)}}<span>></span></li> <li>{{contents[currentIndex].title}}</li> </ul> \x3c!-- 페이지 시작--\x3e <div *ngIf="currentIndex === 1" class="content-item"> <div class="title"> <span>Smart Annotation을 사용하려면 홈에서 \'회원가입\'을 진행해주세요.</span> </div> <div class="page with-image"> <div class="image"> <img src="/assets/imgs/get-started/img-enter@3x.png" /> <span>▲ 회원정보 입력 화면</span> </div> <div class="description"> <div class="title">회원정보 입력</div> <div>이름, 이메일, 비밀번호는 필수사항 입니다.</div> <div>비밀번호는 8자리 입력해야하며, 보안을 위해 영문 대소문자, 숫자 그리고 특수문자를 혼용하여 사용하는 것이 가장 좋습니다.</div> </div> </div> <div class="page with-image"> <div class="image"> <img src="/assets/imgs/get-started/img-email@3x.png" /> <span>▲ 이메일 인증 화면</span> </div> <div class="description"> <div class="title">이메일 인증하기</div> <div>가입자의 메일주소가 유효한지 확인하는 절차입니다.</div> <div>메일주소는 다른 사용자를 초대하거나, 임시 비밀번호를 발급할 때 사용합니다.</div> <div>인증메일을 받지 못했을 경우에는 하단의 ‘재전송하기’를 선택하여 재발송 합니다.</div> </div> </div> <div class="page with-image"> <div class="image"> <img src="/assets/imgs/get-started/img-community@3x.png" /> <span>▲ 커뮤니티 정보 입력 화면</span> </div> <div class="description"> <div class="title">커뮤니티명 입력</div> <div>사용자의 소속 커뮤니티를 생성합니다.</div> <div>설정에서 커뮤니티명을 변경할 수 있습니다.</div> <div>1명의 사용자가 여러 커뮤니티를 생성할 수 있습니다.</div> </div> </div> </div> \x3c!-- 페이지 종료--\x3e <div *ngIf="currentIndex === 2" class="content-item"> <div class="title"> <span>Smart Annotation을 사용하려면 홈에서 \'회원가입\'을 진행해주세요.</span> </div> <div class="page with-image"> <div class="image"> <img src="/assets/imgs/get-started/img-login@3x.png" /> <span>▲ 로그인 정보 입력 화면</span> </div> <div class="description"> <div class="title">로그인 정보 입력</div> <div>사용자의 이메일과 비밀번호를 입력하여 로그인합니다.</div> <div>\'로그인상태유지\'를 선택하면, 로그아웃하기 전까지 로그인 상태를 유지합니다.</div> <div>\'이메일 기억하기\'를 선택하면, 로그인 시에 메일주소를 자동 표시해줍니다.</div> </div> </div> <div class="page with-image"> <div class="image"> <img src="/assets/imgs/get-started/img-password@3x.png" /> <span>▲ 비밀번호 찾기 화면</span> </div> <div class="description"> <div class="title">비밀번호가 기억나지 않습니까?</div> <div>로그인 화면에서 \'비밀번호가 기억나지 않습니까?\'를 선택합니다.</div> <div>입력한 메일주소로 임시 비밀번호를 발송합니다.</div> <div>임시 비밀번호를 입력하고 새로운 비밀번호로 변경해야합니다.</div> </div> </div> </div> \x3c!-- 페이지 시작--\x3e <div *ngIf="currentIndex === 4" class="content-item"> <div class="page main-layout"> <div class="description"> <div class="image"> <img src="/assets/imgs/get-started/img-main@3x.png"> <span>▲ 메인화면</span> </div> <div>1. 메뉴목록: 홈, 어노테이션, 검증/평가, 사용자, 설정으로 구성</div> <div>2. 커뮤니티: 선택된 커뮤니티를 표시하고 ‘      ’ 을 선택하여 사용자가 소속된 다른 커뮤니티로 선택하여 이동</div> <div>3. 통합검색: 사용자가 포함된 모든 커뮤니티 내에서 해당 검색어를 포함한 정보를 검색</div> <div>4. 일정: 사용자가 포함된 모든 커뮤니티에서 공유한 일정을 확인하거나 새로운 일정을 등록</div> <div>5. 알람: 사용자가 포함된 모든 커뮤니티에서 편집된 내용에 대한 알람을 표시 </div> <div>6. 사용자 정보는 사용자의 프로파일 정보확인과 ‘프로파일 설정’을 선택하여 설정화면으로 이동, 사용자 로그아웃 기능</div> <div>7. 컨텐츠: 메뉴 목록에서 선택된 메뉴의 컨텐츠를 표시하는 영역</div> </div> </div> </div> \x3c!-- 페이지 종료--\x3e\t <div *ngIf="currentIndex === 6" class="content-item"> <div class="page with-image preparing"> <div class="image"> <img src="/assets/imgs/get-started/icon-preparing.png" /><br/> <span>준비중입니다.</span> </div> </div> </div> \x3c!-- 미완료 --\x3e <div *ngIf="currentIndex === 8" class="content-item"> <div class="page annotation-layout"> <div class="description"> <div class="image"> <img src="/assets/imgs/get-started/img-annotation@3x.png"> <span>▲ 어노테이션 화면</span> </div> </div> </div> <div class="page with-image annotation-layout2"> <div class="image"> <img src="/assets/imgs/get-started/img-scenario-list@3x.png" /> <span>▲ 시나리오 목록 화면</span> </div> <div class="description"> <div>a) 그룹명</div> <div>b) 파일형식 </div> <div>c) 시나리오 이름</div> <div>d) 센서 정보</div> <div>e) 시나리오 속성 정보</div> <div>f) 시나리오 생성자, 생성일시 정보</div> <div>g) 시나리오 정보에 마우스 오버 시, 시나리오 수정/ 삭제 버튼 활성화</div> </div> </div> <div class="page with-image reverse"> <div class="description"> <div>a) 시나리오 이름</div> <div>b) DATASETS 개수</div> <div>c) DATASET 추가 버튼</div> <div>d) 추가된 DATASETS 목록</div> </div> <div class="image"> <img src="/assets/imgs/get-started/img-dataset@3x.png" /> <span>▲ DATASETS 정보화면</span> </div> </div> </div> \x3c!-- icon-add@3x.png, img-add-scenario-2@3x.png --\x3e <div *ngIf="currentIndex === 9" class="content-item"> <div class="title"> <span>시나리오목록 하단의 <img src="/assets/imgs/get-started/icon-add.png" /> ‘새로운 시나리오 추가’ 버튼을 선택합니다.</span> </div> <div class="page scenario-add"> <div class="description"> <div class="image"> <img src="/assets/imgs/get-started/img-add-scenario-2@3x.png"> </div> </div> </div> </div> \x3c!-- 미완료 : 맨 마지막 굵은 텍스트, 텍스트 사이에 아이콘 이미지 들어가는것(2개). icon-add.png, icon-search.png --\x3e <div *ngIf="currentIndex === 10" class="content-item"> <div class="page scenario-add"> <div class="description"> <div class="image"> <img src="/assets/imgs/get-started/img-add-scenario@3x.png"> <span>▲ 새로운 시나리오 추가 화면</span> </div> <div>1. 새로운 시나리오 이름을 입력합니다.</div> <div>2. 새로운 시나리오를 추가할 그룹명을 입력 또는 ‘<img src="/assets/imgs/get-started/icon-search.png" />’ 을 클릭하여 그룹목록에서 선택합니다.<br/> <span>입력한 그룹명이 기존에 없는 이름일 때에는 그룹을 새로 생성하여 시나리오를 추가합니다.</span> </div> <div>3, 4. 파일형식 <br/> <span class="text-effect-bold">이미지파일들</span>: 이미지 확장자만 업로드 할 수 있습니다.   <span class="text-effect-bold">비디오파일</span>: 영상 확장자만 업로드 할 수 있습니다. </div> </div> </div> </div> \x3c!-- 이미지 나란히 있는것 해야됨 --\x3e <div *ngIf="currentIndex === 11" class="content-item"> <div class="page with-image"> <div class="image"> <img src="/assets/imgs/get-started/img-add-sensor@3x.png" /> <span>▲ 새로운 시나리오 추가 화면</span> </div> <div class="description"> <div>자동차의 센서 이름을 입력하고 종류를 선택합니다.</div> <div><span class="text-effect">센서</span>는 GPS, CAN, LiDAR, RADAR, Camera, AVM, Ultrasonic 으로 총 7가지를 제공합니다.</div> </div> </div> <div class="page with-double-image"> <div class="description"> <div class="image"> <img src="/assets/imgs/get-started/img-list-sensor@3x.png"> <img src="/assets/imgs/get-started/img-list-sensor-edit@3x.png"> <span>▲ 시나리오 목록 화면</span> </div> <div>시나리오 목록에서 해당하는 시나리오 센서정보를 확인할 수 있습니다.</div> <div>센서 수정은 해당 시나리오에 마우스오버 후, 활성화된 편집 버튼을 선택합니다.</div> </div> </div> <div class="page with-image"> <div class="image"> <img src="/assets/imgs/get-started/img-editor-sensor@3x.png" /> <span>▲ 편집화면</span> </div> <div class="description"> <div>프레임 화면의 프레임 속성에서 센서정보는 등록한 센서정보가 해당 프레임에 실제로 정보가 있을 경우에만 아이콘과 간단 정보를 표시합니다.</div> </div> </div> </div> \x3c!-- 이미지 나란히 있는것 해야됨 --\x3e <div *ngIf="currentIndex === 12" class="content-item"> <div class="page with-image"> <div class="image"> <img src="/assets/imgs/get-started/img-add-attributes@3x.png" /> <span>▲ 새로운 시나리오 추가 화면</span> </div> <div class="description"> <div>시나리오 속성 키와 값을 입력합니다.</div> <div>속성 입력 후에 엔터(Enter)를 입력하면 등록되고 새로운 키와 값을 입력할 수 있습니다.</div> </div> </div> <div class="page with-double-image"> <div class="description"> <div class="image"> <img src="/assets/imgs/get-started/img-list-attributes@3x.png"> <img src="/assets/imgs/get-started/img-list-attributes-edit@3x.png"> <span>▲ 시나리오 목록 화면</span> </div> <div>시나리오 목록에서 해당하는 시나리오 속성 정보를 확인할 수 있습니다.</div> <div>속성 수정은 해당 시나리오에 마우스오버 후, 활성화된 편집 버튼을 선택합니다.</div> </div> </div> </div> <div *ngIf="currentIndex === 13" class="content-item"> <div class="page with-image"> <div class="image"> <img src="/assets/imgs/get-started/img-add-frame-attributes@3x.png" /> <span>▲ 새로운 시나리오 추가 화면</span> </div> <div class="description"> <div>프레임 속성 키에 여러 값들을 입력합니다.</div> <div>속성 입력 후에 콤마(,)를 입력하면 등록되고 새로운 키와 값을 입력할 수 있습니다. </div> </div> </div> <div class="page with-image"> <div class="image"> <img src="/assets/imgs/get-started/img-editor-frame-attributes@3x.png" /> <span>▲ 편집화면</span> </div> <div class="description"> <div>프레임 화면에서는 프레임 속성을 선택하여 프레임 속성을 확인할 수 있습니다</div> <div>프레임 속성에서 프레임 속성의 값을 선택하여 변경할 수 있습니다.</div> <div>프레임 속성에서 ‘키’ 와 ‘값’을 추가할 수 있습니다.</div> <div>새로운 시나리오 추가 시에 생성한 사물은 어노테이션툴에서 삭제할 수 없습니다.</div> <div>프레임 화면에서 추가한 프레임 속성은 어노테이션툴에서 삭제할 수 있습니다.</div> </div> </div> </div> \x3c!-- 미완료 : 텍스트 부분 색깔변경되는부분 --\x3e <div *ngIf="currentIndex === 14" class="content-item"> <div class="page with-image"> <div class="image"> <img src="/assets/imgs/get-started/img-add-object@3x.png" /> <span>▲ 새로운 시나리오 추가 화면</span> </div> <div class="description"> <div>박스, 차선, 점, 시멘틱의 목록을 각각 입력합니다.</div> <div>사물 입력 후에 콤마를 입력하면 등록되고 새로운 사물 이름을 입력할 수 있습니다. </div> <div><span class="text-effect">박스</span>는 사물 이름을 구성할 수 있습니다. (ex. 자동차, 자전거, 사람)</div> <div><span class="text-effect">차선</span>의 사물 이름을 구성할 수 있습니다. (ex. 주황실선, 주황점선)</div> <div><span class="text-effect">점</span>의 사물 이름을 구성할 수 있습니다. (ex. 포인트, 점, 지점)</div> <div><span class="text-effect">시맨틱</span>의 사물 이름을 구성할 수 있습니다. (ex. 자동차, 신호등)</div> <div><span class="text-effect">사물 속성목록</span>은 사물목록에 해당하는 속성의 키와 여러 값들을 입력 합니다.</div> <div>각 사물을 추가할 때, 색상을 선택하여 추가할 수 있습니다.</div> </div> </div> <div class="page object-property"> <div class="description"> <div class="image"> <img src="/assets/imgs/get-started/img-editor-object@3x.png"> <span>▲ 편집화면</span> </div> <div>어노테이션툴에서 각각 구성한 사물을 목록에서 확인합니다.</div> <div>각 구성한 사물을 목록에서 선택하여 프레임 화면에 추가합니다.</div> <div>사물의 속성은 <span class="text-effect">‘+ 추가하기’</span>를 선택하여 추가합니다.</div> <div>새로운 시나리오 추가 시에 생성한 사물은 어노테이션툴에서 삭제할 수 없습니다.</div> <div>프레임 화면에서 추가한 사물 속성은 어노테이션툴에서 삭제할 수 있습니다.</div> </div> </div> </div> \x3c!-- 미완료 : 텍스트 라인 및 색상부분 변경 --\x3e <div *ngIf="currentIndex === 15" class="content-item"> <div class="page with-image"> <div class="image"> <img src="/assets/imgs/get-started/img-add-dataset@3x.png" /> <span>▲ DATASET 추가 화면</span> </div> <div class="description"> <div>DATASET의 이름을 필수 입력합니다.</div> <div>‘형식없는이미지’ 또는 ‘ED Data’를 필수적으로 선택합니다. </div> <div>비디오파일은 최대 1.0GB까지 업로드 할 수 있습니다.</div> </div> </div> <div class="page"> <div class="description"> <div class="image"> <img src="/assets/imgs/get-started/img-dataset-list@3x.png"> <span>▲ DATASET 목록 화면</span> </div> <div>추가한 파일은 DATASETS 목록에서 확인합니다.</div> <div><span class="text-effect">업로드 상태</span>가 ‘정상완료’일 때, 라벨링을 시작합니다.</div> <div>DATASET은 동영상이 갖고 있는 프레임수로 SCENE을 분리합니다.</div> <div>추가한 영상의 프레임 수가 1000개가 넘어갈 경우, DATASET 이름에 \'-1\'를 붙여 추가 DATASET을 자동으로 생성합니다. (ex. \'데이터셋1\' 영상이 2000개의 프레임이 있는 동영상일 경우에 DATASETS목록에서는 \'데이터셋1\'과 \'데이터셋1-1\'으로  구성됩니다.) </div> <div>SCENES의 라벨링/QA/QA불량/완료 각각 현재 개수를 확인할 수 있습니다.</div> <div><span class="text-effect">라벨링 내려받기</span>는 DATASET에 편집한 정보와 영상정보를 내려받습니다. 라벨은 JSON으로, 영상은 업로드 한 상태의 영상으로 내려받습니다.</div> </div> </div> </div> \x3c!-- 미완료 : 텍스트 라인 변경 및 아이콘 세팅 필요. icon-full@3x.png --\x3e <div *ngIf="currentIndex === 16" class="content-item"> <div class="title annotation-tool-layout"> <span>SCENES 목록에서 하나의 프레임을 선택하여 프레임 편집화면으로 이동합니다. </span> </div> <div class="page annotation-tool-layout"> <div class="description"> <div class="image"> <img src="/assets/imgs/get-started/img-dataset-list-2@3x.png"> </div> </div> </div> <div class="page annotation-tool-layout"> <div class="description"> <div class="image"> <img src="/assets/imgs/get-started/img-editor@3x.png"> <span>▲ 편집화면</span> </div> <div>1. 시나리오이름 ▶︎ DATASET이름, 프레임 이름</div> <div>2. 프레임 상태 : 생성됨 / 라벨링중 / QA중 / QA불량 / 완료 중 하나를 선택 </div> <div>3. DATASET의 현재 프레임 순서 정보 및 이동 버튼 </div> <div>4. 매뉴얼 보기 버튼 </div> <div>5. 종료: 프레임의 편집내용을 저장하고 종료하는 기능 </div> <div>6. 사물: 박스그리기/ 차선그리기/ 점그리기/ 시맨틱 그리기 </div> <div>7. 화면보기 옵션<br/> <span>1) 원본: SCENE의 원본 상태</span><br/> <span>2) 라벨 : SCENE에 라벨만 보이기 옵션</span><br/> <span>3) 라벨, 속성 : SCENE에 라벨과 속성 보이기 옵션</span> </div> <div>8. 모드 변경<br/> <span>1) 선택 모드: 프레임에 라벨을 추가할 수 있는 모드</span><br/> <span>2) 화면 이동 모드: 편집화면 안에서 프레임을 이동하는 모드</span> </div> <div>9. 화면 확대 / 화면 축소 : 프레임을 확대/ 축소하는 기능 </div> <div>10. 실행취소 / 다시실행 : 프레임의 라벨링 작업을 한 단계씩 실행 취소/ 다시 실행하는 기능 </div> <div>11. 초기화 : 초기화/이전프레임 전체복사: 프레임의 편집 내용을 모두 삭제하는 기능 / 이전 프레임의 모든 편집 내용 복사하는 기능(이전 프레임에 편집한 내용이 있을 경우에만 아이콘 활성화) </div> <div>12. 프레임 편집화면 : 프레임 화면이며 사물을 사용하여 편집하는 영역 </div> <div>13. 프레임 정보: 선택된 프레임에 저장되어있는 GPS, CAN, LiDAR, RADAR, Camera, AVM, Ultrasonic 정보와 프레임 속성을 표시 (\'프레임 속성\'을 제외한 모든 정보는 \'새로운 시나리오 추가\'에서 입력한 센서 정보가 아닙니다.) </div> <div>14. 노트추가: 버튼을 선택하여 노트 작성</div> <div>15. 노트목록: 버튼을 선택하여 현재 프레임의 노트목록 확인</div> </div> </div> <div class="page with-image annotation-tool-layout"> <div class="image"> <img src="/assets/imgs/get-started/img-frame-icon.png" /><br/> <span>▲ 프레임 정보</span> </div> <div class="description"> <div>a. 프레임 속성 정보<br/> <span>- \'새로운 시나리오 추가\'에서 입력하거나, 프레임 정보에서 추가한 프레임 속성 정보를 표시합니다.</span><br/> <span>(상세한 설명은 \'어노테이션 > 새로운 시나리오 추가 > 프레임 속성목록\'을 참고해주세요.)</span><br/> <span>-  확대 버튼(<img src="/assets/imgs/get-started/icon-full.png" />)이 없기 때문에 전체화면으로 볼 수 없습니다.</span> </div> <div>b. GPS 정보<br/> <span>- 영상에 저장되어 있는 GPS정보를 선택한 프레임에 해당하는 정보를 표시합니다.</span><br/> <span>- 확대버튼을 선택하여 FULL화면으로 볼 수 있습니다. </span> </div> <div>c. CAN 정보<br/> <span>- 영상에 저장되어 있는 차량정보를 선택한 프레임에 해당하는 차량정보를 표시합니다.</span><br/> <span>- 속도, 방향지시등, 기어 등의 정보를 표시합니다.</span><br/> <span>- 확대버튼을 선택하여 FULL화면으로 볼 수 있습니다.</span> </div> <div>d. Camera 정보<br/> <span>- 영상에 저장되어 있는 운전자카메라 정보를 선택한 Frame에 해당하는 정보를 표시합니다.</span><br/> <span>- 확대버튼을 선택하여 FULL화면으로 볼 수 있습니다.</span> <br/> </div> <div>e. LiDAR 정보<br/> <span>- 준비중입니다.</span> </div> <div>f. RADAR 정보<br/> <span>- 준비중입니다</span> </div> <div>g. AVM 정보<br/> <span>- 준비중입니다.</span> </div> <div>h. Ultrasonic 정보<br/> <span>- 준비중입니다.</span> </div> </div> </div> <div class="page annotation-tool-layout-note"> <div class="description"> <div class="image"> <img src="/assets/imgs/get-started/img-editor-note@3x.png"> <span>▲ 노트 생성, 노트 목록 화면</span> </div> <div>노트 버튼을 선택하고 화면 원하는 위치를 클릭하여 내용을 작성합니다.</div> <div>해당 노트에 댓글을 입력하거나 수정, 삭제할 수 있습니다.</div> <div>입력한 노트는 번호와 색상으로 표시되며 프레임에서 이동할 수 있습니다.</div> <div>노트 목록을 선택하여 프레임에 있는 노트를 번호순으로 확인할 수 있습니다.</div> </div> </div> </div> <div *ngIf="currentIndex === 17" class="content-item"> <div class="page annotation-tool-usage"> <div class="description"> <div class="image"> <img src="/assets/imgs/get-started/img-editor-tool@3x.png"> <span>▲ 편집 툴 화면</span> </div> <div>어노테이션을 위한 사물은 박스, 차선, 점, 시맨틱 그리기로 구성됩니다.</div> <div>박스, 차선, 점, 시멘틱은 필요에 따라 사물을 추가하여 사용합니다.</div> <div>그려진 사물은 기본 또는 설정한 색상을 갖고 있으며, 선택하면 빨강색으로 표시됩니다. </div> <div>선택되어 빨강색으로 표시된 사물을 클릭하고 드래그하여 위치를 이동할 수 있습니다.</div> <div>빨강색으로 선택된 사물은 더블 클릭하여 사물 속성설정 창에서 사물의 키, 값과 색상을 변경할 수 있습니다.</div> <div>편집을 진행하면 자동으로 저장되며, 단축키 \'Ctrl + S\' 또는  \'⌘ + S\'로 저장합니다.</div> <div>각 기능의 단축키 정보는 매뉴얼 \'단축키\'에서 상세하게 확인할 수 있습니다.</div> </div> </div> </div> \x3c!-- 미완료 : 텍스트에 이미지 아이콘 넣기 icon-arrow.png --\x3e <div *ngIf="currentIndex === 18" class="content-item"> <div class="page draw-box"> <div class="description"> <div class="image"> <img src="/assets/imgs/get-started/img-box-open@3x.png"> <span>▲ 편집 툴 화면</span> </div> <div>박스그리기에서 사물을 선택하고 박스를 클릭하여 프레임의 원하는 위치에 드래그하여 추가합니다.</div> <div>박스그리기의 사물을 추가할 때는 \'<img src="/assets/imgs/get-started/icon-arrow.png" />\' 를 선택하고  \'<span class="text-effect">+ 추가하기</span>\' 를 사용합니다.</div> <div>박스그리기에서 박스를 클릭하면 현재 프레임에서 선, 점, 시맨틱을 제외하고  박스 사물만 표시합니다.</div> </div> </div> <div class="page with-image"> <div class="image"> <img src="/assets/imgs/get-started/img-add-box@3x.png" /> <span>▲ 박스, 사물추가 화면</span> </div> <div class="description"> <div>새 시나리오 추가할 때에 작성한 사물은 삭제할 수 없습니다.</div> <div>프레임에서 추가한 사물은 프레임에서 삭제할 수 있습니다.</div> <div>사물을 추가할 때에  단어 + 콤마를 입력하면 추가적으로 사물이름을 입력할 수 있습니다. </div> </div> </div> <div class="page with-image"> <div class="image"> <img src="/assets/imgs/get-started/img-box-attributes@3x.png" /> <span>▲ 박스, 사물속성 설정 화면</span> </div> <div class="description"> <div>사물 이름을 선택하거나, 그려진 박스를 더블클릭하여 사물속성 설정 창에서 키와 값을 추가하거나 색상을 변경합니다.</div> </div> </div> </div> \x3c!-- 미완료 : 텍스트 사이에 이미지 icon-arrow.png --\x3e <div *ngIf="currentIndex === 19" class="content-item"> <div class="page draw-car-line"> <div class="description"> <div class="image"> <img src="/assets/imgs/get-started/img-lane-open@3x.png"> <span>▲ 편집 툴 화면</span> </div> <div>차선그리기에서 사물을 선택하고 박스를 클릭하여 프레임의 원하는 위치에 클릭하여 추가합니다.</div> <div>차선그리기의 사물을 추가할 때는 \'<img src="/assets/imgs/get-started/icon-arrow.png" />\' 를 선택하고  \'<span class="text-effect">+ 추가하기 \'</span>를 사용합니다.</div> <div>그려진 차선을 수정할 때는 선을 선택하여 표시되는 원(각 지점)을 드래그합니다.</div> <div>그려진 차선에 지점을 추가할 때는 \'Space\'를 눌러 지점을 추가할 위치를 클릭합니다. 추가된 원을 드래그해서 편집합니다.</div> <div>시스템에서 제공하는 차선은 아래와 같습니다.</div> </div> </div> <div class="page"> <div class="description"> <div class="image"> <img src="/assets/imgs/get-started/img-system-lane@3x.png"> </div> </div> </div> <div class="page with-image"> <div class="image"> <img src="/assets/imgs/get-started/img-add-lane@3x.png" /> <span>▲ 차선, 사물추가 화면</span> </div> <div class="description"> <div>새 시나리오 추가할 때에 작성한 사물은 삭제할 수 없습니다.</div> <div>프레임에서 추가한 사물은 삭제할 수 있습니다.</div> <div>사물을 추가할 때에  단어 + 콤마를 입력하면 추가적으로 사물 이름을 입력할 수 있습니다.</div> </div> </div> <div class="page with-image"> <div class="image"> <img src="/assets/imgs/get-started/img-lane-attributes@3x.png" /> <span>▲ 차선, 사물속성 설정 화면</span> </div> <div class="description"> <div>사물 이름을 선택하거나, 그려진 차선을 더블클릭하여 사물속성 설정 창에서 키와 값을 추가하거나 색상을 변경합니다.</div> </div> </div> </div> \x3c!-- 이미지 icon-arrow@3x.png 빠짐  --\x3e <div *ngIf="currentIndex === 20" class="content-item"> <div class="page draw-dot"> <div class="description"> <div class="image"> <img src="/assets/imgs/get-started/img-point-open@3x.png"> <span>▲ 편집 툴 화면</span> </div> <div>점 그리기에서 사물을 선택하고 박스를 클릭하여 프레임의 원하는 위치에 클릭하여 추가합니다.</div> <div>점 그리기의 사물을 추가할 때는 \'<img src="/assets/imgs/get-started/icon-arrow.png" />\' 를 선택하고  \'<span class="text-effect">+ 추가하기</span>\' 를 사용합니다.</div> <div>점 그리기에서 박스를 클릭하면 현재 프레임에서 박스, 선, 시맨틱을 제외하고  점 사물만 표시합니다.</div> </div> </div> <div class="page with-image"> <div class="image"> <img src="/assets/imgs/get-started/img-add-point@3x.png" /> <span>▲ 차선, 사물추가 화면</span> </div> <div class="description"> <div>새 시나리오 추가할 때에 작성한 사물은 삭제할 수 없습니다.</div> <div>프레임에서 추가한 사물은 프레임에서 삭제할 수 있습니다.</div> <div>사물을 추가할 때에  단어 + 콤마를 입력하면 추가적으로 사물이름을 입력할 수 있습니다.</div> </div> </div> <div class="page with-image"> <div class="image"> <img src="/assets/imgs/get-started/img-point-attributes@3x.png" /> <span>▲ 차선, 사물속성 설정 화면</span> </div> <div class="description"> <div>사물 이름을 선택하거나, 그려진 점을 더블클릭하여 사물속성 설정 창에서 키와 값을 추가하거나 색상을 변경합니다.</div> </div> </div> </div> <div *ngIf="currentIndex === 21" class="content-item"> <div class="page draw-semantic"> <div class="description"> <div class="image"> <img src="/assets/imgs/get-started/img-point-open-semantic@3x.png"> <span>▲ 편집 툴 화면</span> </div> <div>시맨틱그리기에서 사물을 선택하고 박스를 클릭하여 프레임의 원하는 위치에 클릭하여 영역을 지정합니다.</div> <div>시맨틱 그리기의 사물을 추가할 때는 \'<img src="/assets/imgs/get-started/icon-arrow.png" />\' 를 선택하고  \'<span class="text-effect">+ 추가하기</span>\' 를 사용합니다.</div> <div>시맨틱그리기에서 박스를 클릭하면 현재 프레임에서 박스, 선, 점을 제외하고  시멘틱 사물만 표시합니다. </div> <div>그려진 시맨틱을 수정할 때는 시맨틱을 선택하여 표시되는 원(각 지점)을 드래그합니다.</div> <div>그려진 시맨틱에 지점을 추가할 때는  \'Space\'를 눌러 지점을 추가할 위치를 클릭합니다.  추가된 원을 드래그해서 편집합니다.</div> </div> </div> <div class="page with-image"> <div class="image"> <img src="/assets/imgs/get-started/img-add-semantic@3x.png" /> <span>▲ 차선, 사물추가 화면</span> </div> <div class="description"> <div>새 시나리오 추가할 때에 작성한 사물은 삭제할 수 없습니다.</div> <div>프레임에서 추가한 사물은 프레임에서 삭제할 수 있습니다.</div> <div>사물을 추가할 때에  단어 + 콤마를 입력하면 추가적으로 사물이름을 입력할 수 있습니다. </div> </div> </div> <div class="page with-image"> <div class="image"> <img src="/assets/imgs/get-started/img-semantic-attributes@3x.png" /> <span>▲ 차선, 사물속성 설정 화면</span> </div> <div class="description"> <div>그려진 점을 더블클릭하여 사물속성 설정 창에서 키와 값을 추가하거나 색상을 변경합니다.</div> </div> </div> </div> <div *ngIf="currentIndex === 22" class="content-item"> <div class="page frame-status"> <div class="description"> <div class="image"> <img src="/assets/imgs/get-started/img-point-open-frame-status@3x.png"> <span>▲ 편집 툴 화면</span> </div> <div>기본은 \'생성됨\'이며 프레임상태에 따라 선택하여 적용합니다.</div> <div>라벨링중 : 기능을 사용하여 편집하고 노트를 추가할 수 있습니다.</div> <div>QA중 : 편집할 수 없으며, 노트를 추가할 수 있습니다.</div> <div>QA불량: 편집할 수 없으며, 노트를 추가할 수 있습니다.</div> <div>완료: 편집할 수 없으며, 노트를 추가할 수 있습니다.</div> </div> </div> <div class="page frame-status-bottom"> <div class="description"> <div class="image"> <img src="/assets/imgs/get-started/img-scene-list@3x.png"> <span>▲ SCENE 목록</span> </div> <div>프레임 상태는 DATASET 목록과 SCENE 목록에서 확인합니다.</div> </div> </div> </div> <div *ngIf="currentIndex === 23" class="content-item"> <div class="page short-cut"> <div class="title"> <span>* OS가 Mac인 경우는 ‘Ctrl’키를 ‘⌘’로, ’Alt’를 ‘⇧’로 바꿔서 입력합니다.</span> </div> <div class="description"> <div class="layer"> <div> <span>선택/ 이동모드 변경</span> <img src="/assets/imgs/get-started/icon-move.png"> </div> <img src="/assets/imgs/get-started/icon-shortcut-space.png"> <span>를 누르고 있는 동안 이동모드 작동</span> </div> <div class="layer"> <div> <span>확대/ 축소</span> <img src="/assets/imgs/get-started/icon-zoom.png"> </div> <img src="/assets/imgs/get-started/icon-shortcut-zoom.png"> </div> <div class="layer"> <div> <span>작업취소/ 작업재실행</span> <img src="/assets/imgs/get-started/icon-redo.png"> </div> <img src="/assets/imgs/get-started/icon-shortcut-redo.png"> </div> <div class="layer"> <div> <span>초기화</span> <img src="/assets/imgs/get-started/icon-reset.png"> </div> <img src="/assets/imgs/get-started/icon-shortcut-reset.png"> </div> <div class="layer"> <div> <span>종료하기</span> <img src="/assets/imgs/get-started/icon-end.png"> </div> <img src="/assets/imgs/get-started/icon-shortcut-end_2.png"> </div> <div class="layer"> <div> <span>저장하기</span> </div> <img src="/assets/imgs/get-started/icon-shortcut-end.png"> </div> <div class="layer"> <div> <span>그리기 중지</span> </div> <img src="/assets/imgs/get-started/icon-shortcut-esc.png"> </div> <div class="layer"> <div> <span>SCENE 이동</span> </div> <img src="/assets/imgs/get-started/icon-shortcut-scene.png"> </div> <div class="layer"> <div> <span>사물 다중선택</span> </div> <img src="/assets/imgs/get-started/icon-shortcut-select.png"> </div> <div class="layer"> <div> <span>프레임의 전체 라벨링 선택</span> </div> <img src="/assets/imgs/get-started/icon-shortcut-select-all.png"> </div> <div class="layer"> <div> <span>사물 복사/ 붙여넣기</span> </div> <img src="/assets/imgs/get-started/icon-shortcut-select-copy.png"> </div> </div> </div> </div> <div *ngIf="currentIndex === 25" class="content-item"> <div class="page with-image preparing"> <div class="image"> <img src="/assets/imgs/get-started/icon-preparing.png" /><br/> <span>준비중입니다.</span> </div> </div> </div> <div *ngIf="currentIndex === 27" class="content-item"> <div class="page user-management"> <div class="description"> <div class="image"> <img src="/assets/imgs/get-started/img-user-list@3x.png"> <span>▲ 사용자 관리 화면</span> </div> <div>사용자 목록에서 사용자를 선택하여 삭제할 수 있습니다.</div> <div>사용자 목록에서 사용자를 선택하여 상세정보를 확인합니다.</div> <div>사용자 목록에서 사용자를 선택하여 사용자역할을 변경할 수 있습니다.</div> <div>변경된 내용은 \'변경내용저장\'을 선택하여 저장합니다.</div> </div> </div> </div> <div *ngIf="currentIndex === 28" class="content-item"> <div class="page user-invite"> <div class="description"> <div class="image"> <img src="/assets/imgs/get-started/img-user-invite@3x.png"> <span>▲ 사용자 초대 화면</span> </div> <div>초대메일을 발송하여 사용자를 초대합니다.</div> <div>초대할 사용자의 권한을 선택하면 초대링크 URL이 표시됩니다.</div> <div>초대링크 URL의 \'링크복사하기\'를 선택하여, 메일 또는 메신저로 바로 보낼 수 있습니다.</div> <div>초대메일 전송은 초대메일을 발송할 메일주소를 입력하고 \'메일 전송하기\'를 선택합니다.</div> </div> </div> <div class="page with-image"> <div class="image"> <img src="/assets/imgs/get-started/img-join@3x.png" /> <span>▲ 가입 화면</span> </div> <div class="description"> <div>초대받은 사용자는 받은 초대링크 또는 메일로 받은 \'가입하기\'를 선택합니다.</div> <div>초대받은 커뮤니티를 확인하고, 가입절차를 진행합니다.</div> <div>SmartAnnotation에 이미 가입했다면, 이름과 이메일만 입력합니다.</div> <div>SmartAnnotation 가입 또는 커뮤니티 가입을 완료하고 로그인 후에 시작합니다.</div> </div> </div> </div> <div *ngIf="currentIndex === 30" class="content-item"> <div class="page"> <div class="description"> <div class="image"> <img src="/assets/imgs/get-started/img-profile@3x.png"> <span>▲ 커뮤니티 프로필 설정 화면</span> </div> <div>커뮤니티 탭을 선택하면 사용자의 이미지, 역할과 가입일자를 확인할 수 있습니다.</div> <div>사용자 역할을 변경할 수 있습니다.</div> <div>변경된 내용은 \'변경내용저장\'을 선택하여 저장합니다.</div> <div>변경된 내용이 없을 때에는 \'변경내용저장\' 버튼이 보이지 않습니다.</div> </div> </div> <div class="page"> <div class="description"> <div class="image"> <img src="/assets/imgs/get-started/img-profile-2@3x.png"> <span>▲ 전체프로필 설정 화면</span> </div> <div>전체 탭을 선택하면 사용자의 이미지, 이름, 비밀번호, 연락처, 사용자 언어, 기준시간대를 확인, 변경할 수 있습니다.</div> <div>사용자의 이메일은 변경할 수 없습니다.</div> <div>변경된 내용은 \'변경내용저장\'을 선택하여 저장합니다.</div> <div>변경된 내용이 없을 때에는 \'변경내용저장\' 버튼이 보이지 않습니다.</div> </div> </div> </div> </div> \x3c!-- \t\t<div class="page"> <div class="description"> <div class="title">이메일 인증하기</div> <div>가입자의 메일주소가 유효한지 확인하는 절차입니다.</div> <div>메일주소는 다른 사용자를 초대하거나, 임시 비밀번호를 발급할 때 사용합니다.</div> <div>인증메일을 받지 못했을 경우에는 하단의 \'재전송하기\'를 선택하여 재발송합니다.</div> </div> </div> --\x3e <div class="footer"> <span>Copyrightⓒ SmartWorks.net, Inc. & AIROV Tech. All Rights Reserved.</span> <span class="logos"> <i class="logo-smartworksnet-inc"></i> <i class="logo-airov-inc"></i> </span> </div> <div *ngIf="swTitle" id="sw-title"> <span class="content">{{swTitle}}</span> <span class="pointer"></span> </div>',styles:['.header { position: fixed; top: 0; left: 0; right: 0; padding: 20px 25px; background-color: #ffffff; } .header > a { font-size: 20px; font-weight: bold; color: #111b25; } .header > .menus { float: right; } .header > .menus > a { font-size: 15px; color: #0e1b26; background-color: #fff; } .header > .menus > a:last-of-type { border-radius: 5px; color: #3481cf; font-weight: bold; border: solid 1px #3481cf; padding: 5px 20px; } .line { position: fixed; width: 100%; height: 1px; background-color: #e6e7e8; left: 0; right: 0; top: 70px; } .nav { position: fixed; width: 305px; top: 71px; bottom: 0; left: 0; border-right: 1px solid #e6e7e8; background-color: #fffefe; z-index: 1; } .nav .search-box { border-bottom: 1px solid #e6e7e8; height:50px; } .nav .search-box .search { position: absolute; width: 264px; height: 33px; font-size: 12px; font-family: SpoqaHanSans; border-radius: 10px; border: none; margin-top: 7.5px; margin-left: 9.5px; padding-left: 20px; background-color: #f1f3f4; } .nav .table-contents { height: calc(100% - 51px); border-bottom: 1px solid #e6e7e8; overflow-y: scroll; font-family: SpoqaHanSans; } .nav .table-contents .contents { text-align: left; color: #222222; } .nav .table-contents .contents { color: #222; padding: 10px 0; } .nav .table-contents .contents > li { padding: 5px 18px; } .nav .table-contents .contents > li.on { color: #3481cf; font-weight: bold; } .nav .table-contents .contents > li:hover { background-color: #f7f5f5; cursor: pointer; } .nav .table-contents .contents > li:hover.space-holder { cursor: default; } .nav .table-contents .contents > li.level1 { font-size: 20px; font-weight: bold; } .nav .table-contents .contents > li.level2 { font-size: 15px; } .nav .table-contents .contents > li.level3 { font-size: 13px; color: #666464; list-style: circle; padding-left: 33px; } .nav .table-contents .contents > li.level3.on { color: #3481cf; } .content { position: fixed; left: 306px; right: 0; top: 71px; bottom: 42px; overflow-y: scroll; } .content .content-path { position: fixed; top: 71px; right: 0; padding: 15px 35px; text-align: right; background-color: rgba(255,255,255,0.8); border-bottom-left-radius: 20px; } .content .content-path > li { display: inline-block; font-size: 16px; font-weight: bold; color: #222; } .content .content-path > li > span { margin: 0 15px; } .content .content-path > li:last-of-type { font-weight: normal; color: #3481cf; } .content > .content-item { /* padding: 0px 25px 300px 0px; */ padding: 200px 25px 300px 0px; min-height: calc(100% + 10px); } .content > .content-item > .title { text-align: center; font-size: 19px; padding: 60px; color: #222; } .content > .content-item > .title.annotation-tool-layout { padding-bottom:0px; } .content > .content-item > .page { margin-bottom: 60px; padding: 30px; } .content > .content-item > .page.scenario-add, .content > .content-item > .page.object-property { padding-top:0px;\t } .content > .content-item > .page.annotation-tool-layout { width: 80%; margin: auto; margin-bottom: 0; padding-bottom:0px; } .content > .content-item > .page.draw-bow { width: 80%; margin: auto; } /* .content > .content-item > .page.with-image { padding: 0; } */ .content > .content-item > .page.with-image.annotation-tool-layout { padding-top:63px; } .content > .content-item > .page.with-image > .image { display: inline-block; vertical-align: top; width: 40%; text-align: center; } .content > .content-item > .page.with-image.reverse > .image { width:60%; } .content > .content-item > .page.with-image.annotation-tool-layout > .image { width:10%; } /* .content > .content-item > .page.with-image.annotation-tool-layout > .image { width:auto; } */ .content > .content-item > .page.with-image > .image > img { background-size: contain; width: 100%; } .content > .content-item > .page.with-image.annotation-tool-layout > .image > img { width:auto; } .content > .content-item > .page.with-image > .image > span { font-size: 11px; color: #9b9c9c; } .content > .content-item > .page.with-image.preparing { text-align:center; margin-bottom:0px; margin-top: calc(25% - 92px); } .content > .content-item > .page.with-image.preparing > .image { width:auto; } .content > .content-item > .page.with-image.preparing > .image > img { width:auto; } .content > .content-item > .page.with-image.preparing > .image > span { font-size:19px; } .content > .content-item > .page > .description { vertical-align: top; } .content > .content-item > .page.with-double-image > .description { text-align:center; } .content > .content-item > .page.main-layout > .description > div { width:80%; margin:auto; margin-bottom:18px; } .content > .content-item > .page.annotation-layout > .description > div { width:80%; margin:auto; margin-bottom:18px; } .content > .content-item > .page.scenario-add > .description > div { width:calc(60% + 100px); margin:auto; margin-bottom:18px; } .content > .content-item > .page.scenario-add > .description > div:not(:nth-child(1)) {  width:80%; } .content > .content-item > .page.scenario-add > .description > div:nth-child(4) > span { font-weight:bold; } .content > .content-item > .page.object-property > .description > div {  width:60%; margin:auto; margin-bottom:19px; } .content > .content-item > .page.object-property > .description > .image { margin-bottom:25px; } /* .content > .content-item > .page.annotation-tool-layout > .description > .image { width: 80%; margin: auto; } */ .content > .content-item > .page > .description > .image { text-align: center; margin-bottom: 20px; } .content > .content-item > .page.main-layout > .description .image { margin-bottom:26px; } .content > .content-item > .page > .description > .image > img { background-size: contain; width: 100%; } /* .content > .content-item > .page.scenario-add > .description > .image > img { width:50%; } */ .content > .content-item > .page > .description > .image > span { font-size: 11px; color: #9b9c9c; } .content > .content-item > .page.scenario-add > .description > .image > span { display:block; } .content > .content-item > .page.scenario-add > .description > div:before { content: "•"; margin-left: -14px; color: #222; } .content > .content-item > .page.scenario-add > .description > .image:before { content: ""; } .content > .content-item > .page.scenario-add > .description > div:nth-child(2) { margin-top:50px; } .content > .content-item > .page.scenario-add > .description > div:nth-child(3) > span { padding-left: 18px; } .content > .content-item > .page.with-double-image > .description > .image > img { width: calc(50% - 50px); padding: 0 25px; } .content > .content-item > .page.with-double-image > .description > .image > span { float: left; padding-left: 25px; } .content > .content-item > .page.with-double-image > .description > div:nth-child(2) { margin-top:49px; } .content > .content-item > .page.with-image > .description { display: inline-block; vertical-align: top; padding: 20px 30px; padding-right: 0; width: calc(60% - 30px); } .content > .content-item > .page.with-image.reverse > .description { width: calc(40% - 30px); } .content > .content-item > .page.with-image.annotation-tool-layout > .description { width: calc(90% - 30px); } .content > .content-item > .page > .description > div { font-size: 16px; margin-bottom: 20px; padding-left: 10px; font-family: SpoqaHanSans; line-height: 1.44; } .content > .content-item > .page > .description > div:before { content: "•"; margin-left: -14px; color: #222; } .content > .content-item > .page > .description > span { font-family: SpoqaHanSans; margin-left: 25px; line-height: 2; } .content > .content-item > .page > .description > .title { font-size: 22px; font-weight: bold; padding-left: 0; } .content > .content-item > .page > .description > .title:before, .content > .content-item > .page > .description > .image:before { content: ""; margin-left: 0; } .content > .content-item > .page.short-cut .title { margin: -65px -35px 67px 0; right: 0; float: right; } .content > .content-item > .page.short-cut .description { clear:right; } .content > .content-item > .page.short-cut > .description .layer { width: 680px; margin: auto; margin-bottom:29px; } .content > .content-item > .page.short-cut > .description .layer > div { display: inline-block; width: 300px; font-size: 22px; color: #222222; } .content > .content-item > .page.short-cut > .description .layer:before { content: ""; } .content > .content-item > .page.short-cut > .description .layer > div:before { content: "•"; color: #222; } .content > .content-item > .page.short-cut > .description .layer > img { padding-left: 64px; vertical-align: sub;\t } .content > .content-item > .page.short-cut > .description .layer > div > img:nth-child(2) { padding-left: 9px; vertical-align: bottom; } .content > .content-item > .page.short-cut > .description .layer > div > span { font-family: SpoqaHanSans; } .content > .content-item > .page .text-effect { color: #3481cf; } .content > .content-item > .page .text-effect-bold { font-weight:bold; } .content > .content-item > .page.draw-box > .description { text-align:center; } .content > .content-item > .page.draw-box > .description > .image { width: 60%; margin: auto; margin-bottom:20px; } .content > .content-item > .page.draw-box > .description > div { width: 80%; margin: auto; margin-bottom:20px; } .content > .content-item > .page.annotation-tool-usage > .description > div { width: 80%; margin: auto; margin-bottom:20px; } .content > .content-item > .page.annotation-tool-usage > .description > .image { width: 60%; } .content > .content-item > .page.annotation-layout { margin-bottom:0px; } .content > .content-item > .page.with-image.annotation-layout2 { margin-bottom:0px; } .content > .content-item > .page.draw-car-line { margin-bottom:0px; } .content > .content-item > .page.draw-car-line > .description > div { width: 80%; margin: auto; margin-bottom:20px; } .content > .content-item > .page.draw-car-line > .description > .image { width: 60%; } .content > .content-item > .page.draw-dot { margin-bottom:0px; } .content > .content-item > .page.draw-dot > .description { text-align:center; } .content > .content-item > .page.draw-dot > .description > div { width: 80%; margin: auto; margin-bottom:20px; } .content > .content-item > .page.draw-dot > .description > .image { width: 60%; } .content > .content-item > .page.draw-semantic { margin-bottom:0px; } .content > .content-item > .page.draw-semantic > .description > div { width: 80%; margin: auto; margin-bottom:20px; } .content > .content-item > .page.draw-semantic > .description > .image { width: 60%; } .content > .content-item > .page.draw-semantic { margin-bottom:0px; } .content > .content-item > .page.frame-status { margin-bottom:0px; } .content > .content-item > .page.frame-status > .description { text-align:center; } .content > .content-item > .page.frame-status > .description > div { width: 80%; margin: auto; margin-bottom:20px; } .content > .content-item > .page.frame-status > .description > .image { width: 60%; } .content > .content-item > .page.frame-status-bottom > .description { text-align:center; } .content > .content-item > .page.user-management > .description { text-align:center; } .content > .content-item > .page.user-management > .description > div { width: 80%; margin: auto; margin-bottom:20px; } .content > .content-item > .page.user-management > .description > .image { width: 60%; } .content > .content-item > .page.user-invite { margin-bottom:0px;\t } .content > .content-item .page.annotation-tool-layout-note > .description { width:60%; margin:auto; } .content > .content-item .page.annotation-tool-layout-note > .description > .image { margin-bottom:40px; } .footer { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 24px; text-align: center; font-size: 12px; color: #9fa5b1; } .footer > .logos { position: absolute; right: 24px; bottom: 12px;\t } .footer > .logos > i { margin-left: 25px; vertical-align: bottom; }']}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:m.Router}]},e}(),ke=function(){function e(e,t,i,n,s,o,r,a,l){var c=this;this.sanitized=e,this.router=t,this.route=i,this.translate=n,this.utilService=s,this.authService=o,this.toastService=r,this.publishService=a,this.apiService=l,this.user=new N,this.currentStepIndex=0,this.userNameError=null,this.userIdError=null,this.passwordError=null,this.isJoinedUser=!1,this.joinWorkflowInfos=[{step:1,title:"join.text.input-member-info",message:"join.text.welcome-join",description:"join.text.join-desc"},{step:2,title:"join.text.email-auth",message:"join.text.sent-email-auth",description:"join.text.sent-email-auth-desc"},{step:3,title:"join.text.create-community",message:"join.text.creating-community",description:"join.text.create-community-desc"},{step:4,title:"join.text.set-community",message:"join.text.setting-community",description:"join.text.set-community-desc"}],this.authKeys=new Array(4),this.currentUser=this.authService.getCurrentUser(),this.positionList=[],this.smartworksUrl=window.location.origin+"/",this.subscriptions=[],this.swTitle=null,this.user.locale=n.currentLang,this.user.company=new A,this.user.company.id=this.utilService.newCompanyId(),this.subscriptions.push(this.route.params.subscribe((function(e){c.joinCompanyId=e.companyId,c.joinUserLevel=e.userLevel,c.joinDepartmentId=e.departmentId,c.joinDepartmentId&&"noDepartment"!==c.joinDepartmentId&&c.apiService.getDepartmentById(c.joinDepartmentId).then((function(e){e&&!0===e.status&&(c.selectedDepartment=e.result)})),c.joinChannelId=e.channelId,c.joinChannelId&&c.apiService.getChannelById(c.joinChannelId).then((function(e){e&&!0===e.status&&(c.joinChannel=e.result)}))}))),$(document).on("mouseenter","[sw-title]",(function(e){c.swTitle=$(e.target).attr("sw-title")||$(e.target).parents("[sw-title]:first").attr("sw-title");var t=e;$(document).on("mousemove",(function(e){t=e})),setTimeout((function(){$(document).off("mousemove");var e=$("#sw-title");0!==e.length&&e.css({left:t.pageX-e.width()/2+"px",top:t.pageY-40+"px"})}),500)})),$(document).on("mouseleave","[sw-title]",(function(e){c.swTitle=null,$("#sw-title").css({left:"-1000px",top:"-1000px"})}))}return e.prototype.ngOnInit=function(){},e.prototype.ngOnDestroy=function(){for(var e=0,t=this.subscriptions;e<t.length;e++){t[e].unsubscribe()}},Object.defineProperty(e.prototype,"joinCompanyId",{get:function(){return this._joinCompanyId},set:function(e){var t=this;this._joinCompanyId=e,null!=e&&""!==e&&this.apiService.getCompanyById(e).then((function(e){e&&!0===e.status&&(t.joinCompany=e.result,"guest"===t.joinUserLevel?t.joinWorkflowInfos=[{step:1,title:"join.text.input-member-info",message:"join.text.welcome-join",description:"join.text.join-desc"},{step:2,title:"join.text.email-auth",message:"join.text.sent-email-auth",description:"join.text.sent-email-auth-desc"},{step:3,title:null,message:null,description:null}]:t.joinWorkflowInfos=[{step:1,title:"join.text.input-member-info",message:"join.text.welcome-join",description:"join.text.join-desc"},{step:2,title:"join.text.email-auth",message:"join.text.sent-email-auth",description:"join.text.sent-email-auth-desc"},{step:3,title:"join.text.department-position",message:"join.text.input-department-position",description:"join.text.join-department-position-desc"},{step:4,title:null,message:null,description:null}])}))},enumerable:!0,configurable:!0}),e.prototype.requestAuthKey=function(){var e=this;return this.apiService.requestEmailAuthKey(this.user.id,this.joinCompanyId,this.joinUserLevel,this.joinDepartmentId).then((function(t){t&&!0===t.status&&e.toastService.add("info",e.translate.instant("join.text.successfully-auth-requested"))})),!1},e.prototype.next=function(){var e=this;if(this.userIdError=null,this.currentStepIndex<this.joinWorkflowInfos.length)switch(this.currentStepIndex){case 0:this.apiService.requestEmailAuthKey(this.user.id,this.joinCompanyId,this.joinUserLevel,this.joinDepartmentId).then((function(t){t&&!0===t.status&&(e.toastService.add("info",e.translate.instant("join.text.successfully-auth-requested")),e.currentStepIndex++)}));break;case 1:this.joinCompany&&this.joinUserLevel&&this.joinDepartmentId?(this.user.timezone=Intl.DateTimeFormat().resolvedOptions().timeZone,this.apiService.registerUserToCompany(this.user,this.authKeys.join(""),this.joinCompanyId,this.joinUserLevel,this.joinDepartmentId).then((function(t){t&&!0===t.status&&t.result?(e.apiService.getCompanyDepartmentTree(e.joinCompanyId).then((function(t){t&&!0===t.status&&t.result&&(e.departmentTree=t.result)})),e.apiService.getCompanyPositions(e.joinCompanyId).then((function(t){t&&!0===t.status&&t.result&&(e.positionList=t.result)})),e.toastService.add("info",e.translate.instant("join.text.successfully-join-community",{community:e.joinCompany.name})),e.currentStepIndex++):e.toastService.add("error",e.translate.instant("join.error.invalid-auth-key"))}))):this.apiService.authenticateAuthKey(this.user.id,this.authKeys.join("")).then((function(t){t&&!0===t.status&&t.result?(e.user.authKey=e.authKeys.join(""),e.currentStepIndex++):e.toastService.add("error",e.translate.instant("join.error.invalid-auth-key"))}));break;case 2:this.user.company&&(this.currentStepIndex++,this.newCompany=JSON.parse(JSON.stringify(this.user.company)));break;case 3:this.user.company&&this.currentStepIndex++}return!1},e.prototype.registerUser=function(){var e=this;return this.departmentTree||(this.departmentName&&(this.user.department=new W,this.user.department.id=this.utilService.newDepartmentId(),this.user.department.name=this.departmentName),this.positionName&&(this.user.position=new E,this.user.position.id=this.utilService.newPositionId(),this.user.position.name=this.positionName)),this.user.timezone=Intl.DateTimeFormat().resolvedOptions().timeZone,this.apiService.register(this.user).then((function(t){t&&!0===t.status&&(e.authService.login({username:e.user.id,password:e.user.password}).then((function(t){e.router.navigate([e.user.company.id])})),e.toastService.add("info",e.translate.instant("join.text.join-succeed")))})),!1},e.prototype.checkUserIdRegistered=function(){var e=this;return this.userIdError=null,this.isJoinedUser=!1,this.user.id?this.utilService.isUserId(this.user.id)?void this.apiService.checkUserIdRegistered(this.user.id).then((function(t){if(t&&!0===t.status&&t.result)if(e.joinCompany){for(var i=t.result,n=0;n<i.length;n++)if(e.joinCompany.id===i[n].id){e.userIdError="already-joined-company";break}e.userIdError||(e.isJoinedUser=!0)}else e.userIdError="already-joined-email"})):(this.userIdError="invalid-email-id",!1):(this.userIdError="email-is-required",!1)},e.prototype.gotoNextInput=function(e){var t=e.which||e.keyCode;8!==t&&46!==t&&$(e.target).next().focus()},e.prototype.gotoNextButton=function(e){var t=e.which||e.keyCode;8!==t&&46!==t&&$(e.target).parents("form:first").find(".button-group .btn-android").attr("tabindex","-1").focus()},e.prototype.isSecuredPassword=function(){return this.utilService.isUserId(this.user.password)},e.prototype.setPositionList=function(e){this.positionList=e},e.prototype.createOrganization=function(){return this.departmentTree&&this.departmentTree.children&&0!==this.departmentTree.children.length?this.selectedDepartment?this.positionList&&0!==this.positionList.length?this.selectedPosition?(this.apiService.createCompanyDepartmentsByTree(this.user.company.id,this.departmentTree.children).then((function(e){e&&e.status})),this.user.department=this.selectedDepartment,this.apiService.createCompanyPositions(this.user.company.id,this.positionList).then((function(e){e&&e.status})),this.user.position=this.selectedPosition,this.registerUser(),!1):(this.toastService.add("warn",this.translate.instant("join.error.position-selection-required")),!1):(this.toastService.add("warn",this.translate.instant("join.error.position-list-required")),!1):(this.toastService.add("warn",this.translate.instant("join.error.department-selection-required")),!1):(this.toastService.add("warn",this.translate.instant("join.error.department-tree-required")),!1)},e.prototype.onFocusout=function(e){var t=this;e.relatedTarget&&(jQuery.contains(e.relatedTarget,e.target)||jQuery.contains(e.target,e.relatedTarget))?e.stopPropagation():(window.removeEventListener("wheel",(function(){})),setTimeout((function(e){t.showDepartmentTree=!1,t.showPositionList=!1}),300))},e.prototype.setSelectListPosition=function(){var e=this,t=this.selectListBox.find(".select-list");if(0!==t.length){var i=this.selectListBox;t.css({top:i.position().top+i.height()+"px",left:Math.max(i.position().left+i.width()-t.width(),0)+"px"}),i.offset().top+i.height()+t.height()>$(window).height()&&t.css({top:"auto",bottom:$("sw-join > .body").height()-i.position().top+20+"px"}),t.show()}else setTimeout((function(){e.setSelectListPosition()}),100)},e.prototype.openDepartmentTree=function(e){var t=$(e.target||e.srcElement);this.selectListBox=t.hasClass("select-list-box")?t:t.parents(".select-list-box:first"),this.selectListBox.focus(),this.showDepartmentTree=!0,this.setSelectListPosition()},e.prototype.openPositionList=function(e){var t=$(e.target||e.srcElement);this.selectListBox=t.hasClass("select-list-box")?t:t.parents(".select-list-box:first"),this.selectListBox.focus(),this.showPositionList=!0,this.setSelectListPosition()},e.prototype.onStartClick=function(e){var t=this;this.user.id&&this.user.password?this.authService.login({username:this.user.id,password:this.user.password}).then((function(e){t.authService.switchCompany(t.user.company.id),t.router.navigate([t.user.company.id]),t.joinChannelId&&setTimeout((function(){t.publishService.pubChangeNotice({source:"channel.selectChannel",channelId:t.joinChannelId})}),1e3)})):this.router.navigate(["/login/"+this.user.id+"/"+this.joinCompanyId+(this.joinChannelId?"/"+this.joinChannelId:"")]),this.authService.switchCompany(this.user.company.id)},e.prototype.addNewDepartment=function(e){var t=this;this.isNewDepartment=!1,setTimeout((function(){t.isNewDepartment=!0}))},e.prototype.addNewPosition=function(e){var t=this;this.isNewPosition=!1,setTimeout((function(){t.isNewPosition=!0}))},e.prototype.onManagersChanged=function(e){this.user.company.managers=e},e.prototype.onMembersChanged=function(e){if(this.user.company.users=e,this.user.company.users&&this.user.company.managers)for(var t=0;t<this.user.company.users.length;t++)for(var i=this.user.company.users[t],n=0,s=this.user.company.managers;n<s.length;n++){var o=s[n];if(i.id===o.id){this.user.company.users.splice(t,1),t--;break}}},e.prototype.keyupOnDomainId=function(e){var t=this;this.domainIdError=!1,this.duplicatedDomainIdError=!1,this.user.company.domainId&&(this.domainIdError=!this.utilService.isValidDomainId(this.user.company.domainId),this.domainIdError||this.apiService.checkDomainIdRegistered(this.user.company.domainId).then((function(e){e&&!0===e.status&&(t.duplicatedDomainIdError=e.result)})))},e.prototype.toggleDoOrganizationSetting=function(e){this.doOrganizationSetting=!this.doOrganizationSetting,this.doOrganizationSetting&&(this.departmentTree=this.user.company,this.departmentTree.children=[],this.positionList=[],this.isNewDepartment=this.isNewPosition=!1)},e.prototype.registerUserWithCommunity=function(e){return this.user.company=this.newCompany,this.doOrganizationSetting?this.createOrganization():this.registerUser(),!1},e.prototype.skipSetCommunity=function(e){return this.departmentTree=null,this.registerUser(),!1},e.prototype.gotoPage=function(e){var t=this;return setTimeout((function(i){t.router.navigate([e])}),300),!1},e.decorators=[{type:t.Component,args:[{selector:"sw-join",template:'<div class="header"> <a (click)="gotoPage(\'/welcome\')" class="img-product-logo"></a> </div> <div class="body"> <div> <div class="info"> <div class="title">{{joinWorkflowInfos[currentStepIndex].title | translate}}</div> <ul class="step-block"> <li class="join-step" *ngFor="let joinWorkflowInfo of joinWorkflowInfos, let i = index" [ngClass]="{\'current\': joinWorkflowInfo.step-1 === currentStepIndex}"> <span class="number">{{joinWorkflowInfo.step}}</span> <span *ngIf="i<joinWorkflowInfos.length-1" class="line"></span> </li> </ul> <div class="message">{{joinWorkflowInfos[currentStepIndex].message | translate}}</div> <div *ngIf="currentStepIndex === 0 && joinCompany" class="join-company" [innerHTML]="sanitized.bypassSecurityTrustHtml(\'join.text.join-to-company\' | translate : {name: joinCompany.name})"></div> <div *ngIf="(currentStepIndex === 2 && joinCompany && joinUserLevel === \'guest\') || (currentStepIndex === 3 && joinCompany && joinUserLevel !== \'guest\')" class="welcome-joiner" [innerHTML]="sanitized.bypassSecurityTrustHtml(\'join.text.welcome-joiner\' | translate : {name: user.name})"></div> <div *ngIf="(currentStepIndex === 2 && joinCompany && joinUserLevel === \'guest\') || (currentStepIndex === 3 && joinCompany && joinUserLevel !== \'guest\')" class="join-company" [innerHTML]="sanitized.bypassSecurityTrustHtml(\'join.text.joined-a-company\' | translate : {name: joinCompany.name})"></div> <div class="description">{{joinWorkflowInfos[currentStepIndex].description | translate}}</div> </div> <div *ngIf="(currentStepIndex === 2 && joinCompany && joinUserLevel === \'guest\') || (currentStepIndex === 3 && joinCompany && joinUserLevel !== \'guest\')" class="img-welcome-join"></div> <form name="form" #f="ngForm" novalidate> <div *ngIf="currentStepIndex===0" class="input-box" [ngClass]="{\'on\': user.name}"> <div *ngIf="userNameError" class="help-block"> <i class="icon-field-error"></i> <div>{{\'join.error.name-is-required\' | translate}}</div> </div> <i class="icon-user-name" [ngClass]="{\'on\': user.name, \'error\': userNameError}"></i> <input type="text" name="name" [(ngModel)]="user.name" #name="ngModel" required placeholder="{{\'common.text.name\' | translate}}"/> <i class="icon-field-required"></i> </div> <div *ngIf="currentStepIndex===0" class="input-box" [ngClass]="{\'on\': user.id, \'invalid\': userIdError}"> <div *ngIf="userIdError" class="help-block"> <i class="icon-field-error"></i> <div>{{\'join.error.\' + userIdError | translate}}</div> </div> <i class="icon-user-email" [ngClass]="{\'on\': user.id, \'error\': userIdError}"></i> <input type="text" name="userid" autocomplete="new-userid"  (blur)="checkUserIdRegistered($event)" [(ngModel)]="user.id" #userid="ngModel" placeholder="{{\'common.text.email\' | translate}}" required email /> <i class="icon-field-required"></i> </div> <div *ngIf="currentStepIndex===0 && !isJoinedUser" class="input-box" [ngClass]="{\'on\': user.phoneNo}"> <i class="icon-user-contact" [ngClass]="{\'on\': user.phoneNo}"></i> <input type="text" name="contact" [(ngModel)]="user.phoneNo" #contact="ngModel" placeholder="{{\'common.text.contact\' | translate}}"/> </div> <div *ngIf="currentStepIndex===0 && !isJoinedUser" class="input-box"  [ngClass]="{\'on\': user.password, \'invalid\': passwordError}"> <div *ngIf="passwordError" class="help-block"> <i class="icon-field-error"></i> <div>{{\'login.error.\' + passwordError | translate}}</div> </div> <i class="icon-user-password" [ngClass]="{\'on\': user.password, \'error\': passwordError}"></i> <input type="password" name="password" autocomplete="new-password" [(ngModel)]="user.password" #password="ngModel" minlength="8" placeholder="{{\'common.text.password\' | translate}}" required/> <i class="icon-field-required"></i> <ul *ngIf="password.dirty || password.touched"> <li *ngIf="password.invalid && password?.errors.minlength" class="severity1"> <span></span> </li> <li *ngIf="password.valid && !isSecuredPassword()" class="severity2"> <span></span><span></span> </li> <li *ngIf="password.valid && isSecuredPassword()" class="severity3"> <span></span><span></span><span></span> </li> </ul> </div> <div *ngIf="currentStepIndex===1" class="sent-email">{{user.id}}</div> <div *ngIf="currentStepIndex===1" class="auth-keys"> <input type="text" name="authKey0" [(ngModel)]="authKeys[0]" #authKey0="ngModel" maxlength="1" required (keyup)="gotoNextInput($event)"> <input type="text" name="authKey1" [(ngModel)]="authKeys[1]" #authKey1="ngModel" maxlength="1" required (keyup)="gotoNextInput($event)"> <input type="text" name="authKey2" [(ngModel)]="authKeys[2]" #authKey2="ngModel" maxlength="1" required (keyup)="gotoNextInput($event)"> <input type="text" name="authKey3" [(ngModel)]="authKeys[3]" #authKey3="ngModel" maxlength="1" required (keyup)="gotoNextButton($event)"> </div> <div *ngIf="currentStepIndex===2 && !joinCompany" class="input-box" [ngClass]="{\'on\': community.valid && (community.dirty || community.touched)}"> <div *ngIf="community.invalid && (community.dirty || community.touched)" class="help-block"> <i class="icon-field-error"></i> <div *ngIf="community?.errors.required">{{\'join.error.community-field-required\' | translate}}</div> </div> <i class="icon-user-community" [ngClass]="{\'on\': community.valid && (community.dirty || community.touched), \'error\': community.invalid && (community.dirty || community.touched)}"></i> <input type="text" name="community" [(ngModel)]="user.company.name" #community="ngModel" required placeholder="{{\'join.text.community-name\' | translate}}"/> <i class="icon-field-required"></i> </div> <div *ngIf="(currentStepIndex===2 && joinUserLevel !== \'guest\' && joinCompany && !joinCompany.hasDepartment)" class="input-box" [ngClass]="{\'on\': department.valid && (department.dirty || department.touched)}"> <i class="icon-user-department" [ngClass]="{\'on\': department.valid && (department.dirty || department.touched), \'error\': department.invalid && (department.dirty || department.touched)}"></i> <input type="text" name="department" [(ngModel)]="departmentName" #department="ngModel" placeholder="{{\'common.text.department\' | translate}}"/> </div> <div *ngIf="currentStepIndex===2 && joinUserLevel !== \'guest\' && joinCompany && joinCompany.hasDepartment" class="input-box select-list-box" tabindex="-1" (focusout)="onFocusout($event)"> <i class="icon-user-department"></i> <input *ngIf="user.department" type="text" [ngModel]="user.department.fullName" disabled> <input *ngIf="!user.department" type="text" name="department" [ngModel]="selectedDepartment ? selectedDepartment.fullName: \'\'" #department="ngModel" placeholder="{{\'common.text.department\' | translate}}"/> <i *ngIf="!user.department" class="icon-select-list" (click)="openDepartmentTree($event)"></i> <div *ngIf="showDepartmentTree" class="select-list"> <sw-tree-department [(selectedDepartment)]="selectedDepartment" [departmentTree]="departmentTree"></sw-tree-department> </div> </div> <div *ngIf="(currentStepIndex===2 && joinUserLevel !== \'guest\' && joinCompany && !joinCompany.hasPosition)" class="input-box" [ngClass]="{\'on\': position.valid && (position.dirty || position.touched)}"> <i class="icon-user-position" [ngClass]="{\'on\': position.valid && (position.dirty || position.touched), \'error\': position.invalid && (position.dirty || position.touched)}"></i> <input type="text" name="position" [(ngModel)]="positionName" #position="ngModel" placeholder="{{\'common.text.position\' | translate}}"/> </div> <div *ngIf="currentStepIndex===2 && joinUserLevel !== \'guest\' && joinCompany && joinCompany.hasPosition" class="input-box select-list-box" tabindex="-1" (focusout)="onFocusout($event)"> <i class="icon-user-position"></i> <input type="text" name="position" [ngModel]="selectedPosition ? selectedPosition.name : \'\'" #position="ngModel" placeholder="{{\'common.text.position\' | translate}}"/> <i class="icon-select-list" (click)="openPositionList($event)"></i> <div *ngIf="showPositionList" class="select-list"> <sw-list-position [(selectedPosition)]="selectedPosition" [positionList]="positionList"></sw-list-position> </div> </div> <div *ngIf="currentStepIndex===3 && !joinCompany" class="set-community"> <table> <tr> <td class="label">{{\'join.text.community-name\' | translate}}</td> <td class="value"> <div *ngIf="communityNameError" class="help-block"> <i class="icon-field-error"></i> <div>{{\'join.error.community-field-required\' | translate}}</div> </div> <input type="text" [(ngModel)]="user.company.name" [ngModelOptions]="{standalone: true}" placeholder="{{\'community.text.input-community-name\' | translate}}"> </td> </tr> <tr class="domain-name"> <td class="label">{{\'community.text.domain-name\' | translate}}</td> <td class="value"> <div *ngIf="domainIdError || duplicatedDomainIdError" class="help-block"> <i class="icon-field-error"></i> <div *ngIf="domainIdError">{{\'community.error.invalid-domain-id\' | translate}}</div> <div *ngIf="duplicatedDomainIdError">{{\'community.error.duplicated-domain-id\' | translate}}</div> </div> <span>{{smartworksUrl}}</span><input type="text" [(ngModel)]="user.company.domainId" [ngModelOptions]="{standalone: true}" placeholder="{{\'community.text.input-domain-id\' | translate}}" (keyup)="keyupOnDomainId($event)"> </td> </tr> <tr> <td class="label">{{\'community.text.manager\' | translate}}</td> <td class="value"> <sw-auto-user name="managers" [appendMode]="true" [type]="\'email\'" [currentUser]="null" [smallSize]="true" [multiple]="true" [userOnly]="false" [noSearchUser]="true" [selectedUsers]="[user]" (selectedUsersChange)="onManagersChanged($event)"></sw-auto-user> </td> </tr> <tr> <td class="label">{{\'common.text.member\' | translate}}</td> <td class="value"> <sw-auto-user name="members" [appendMode]="true" [type]="\'email\'" [currentUser]="null" [smallSize]="true" [multiple]="true" [userOnly]="false" [noSearchUser]="true" [selectedUsers]="[]" (selectedUsersChange)="onMembersChanged($event)"></sw-auto-user> </td> </tr> <tr class="do-organization-setting"> <td class="label">{{\'community.text.organization-setting\' | translate}}<span class="btn-question-mark"></span></td> <td class="value"> <span class="radio-button" (click)="toggleDoOrganizationSetting($event)"><span [ngClass]="{\'on\': !doOrganizationSetting}"></span></span><span>{{\'community.text.do-it-later\' | translate}}</span> <span class="radio-button" (click)="toggleDoOrganizationSetting($event)"><span [ngClass]="{\'on\': doOrganizationSetting}"></span></span><span>{{\'community.text.do-it-now\' | translate}}</span> </td> </tr> </table> <div *ngIf="doOrganizationSetting" class="organization"> <div class="left-side"> <button class="btn-android" (click)="addNewDepartment($event)">{{\'common.button.add-department\' | translate}}</button> <div> <sw-tree-department (selectedDepartmentChange)="selectedDepartment=$event" [move]="true" [edit]="true" [addNewDepartment]="isNewDepartment" [(departmentTree)]="departmentTree"></sw-tree-department>             </div> </div> <div class="right-side"> <button class="btn-android" (click)="addNewPosition($event)">{{\'common.button.add-position\' | translate}}</button> <div> <sw-list-position (selectedPositionChange)="selectedPosition=$event" [(positionList)]="positionList" [edit]="true" [select]="true" [addNewPosition]="isNewPosition"></sw-list-position> </div> </div> </div> </div> <div class="button-group"> <div *ngIf="currentStepIndex < joinWorkflowInfos.length-1" [ngClass]="{\'disabled\': f.invalid || userIdError}" class="btn-android full" (click)="next();">{{\'common.button.next\' | translate}}</div> <a *ngIf="currentStepIndex===0 && !joinCompany" (click)="gotoPage(\'/login\')" class="">{{\'join.text.goto-login\' | translate}}</a> <div *ngIf="currentStepIndex===1" class="resend-authkey">{{\'join.text.didnt-receive-email\' | translate}} <a href="" (click)="requestAuthKey()" class="">{{\'join.text.resend-request\' | translate}}</a></div> <div *ngIf="(currentStepIndex===2 && isAnnotation) && !joinCompany" [ngClass]="{\'disabled\': f.invalid}" href="" class="btn-android full" (click)="registerUser();">{{\'common.button.done\' | translate}}</div> <div *ngIf="(currentStepIndex === 2 && joinCompany && joinUserLevel === \'guest\') || (currentStepIndex === 3 && joinCompany && joinUserLevel !== \'guest\')" (click)="onStartClick($event)" class="btn-android full">{{\'common.button.start\' | translate}}</div> <div *ngIf="currentStepIndex===3 && !isAnnotation && !joinCompany" class="btn-android full" (click)="registerUserWithCommunity($event);">{{\'common.button.done\' | translate}}</div> <div *ngIf="currentStepIndex===3 && !isAnnotation && !joinCompany" class="create-organization"><a href="" (click)="skipSetCommunity($event)" class="">{{\'common.button.skip\' | translate}}</a></div> </div> </form> </div> </div> <span class="btn-help-talk"> <i class="icon-help-talk"></i> </span> <div class="footer"> <span>Copyrightⓒ SmartWorks.net, Inc. & AIROV Tech. All Rights Reserved.</span> <span class="logos"> <i class="logo-smartworksnet-inc"></i> <i class="logo-airov-inc"></i> </span> </div> <div *ngIf="swTitle" id="sw-title"> <span class="content">{{swTitle}}</span> <span class="pointer"></span> </div> ',styles:[".header { position: absolute; top: 0; left: 0; right: 0; padding: 20px 25px; background-color: #ffffff; } .header > a { font-size: 20px; font-weight: bold; color: #111b25; } .body { position: absolute; top: 70px; left: 0; right: 0; bottom: 42px; background-color: #ffffff; padding: 50px; min-width: 500px; overflow-y:scroll; overflow-x: hidden; } .body > div { position: absolute; left: 0; right: 0; top: 0; bottom: 0; margin: auto; width: 500px; height: 500px; text-align: center; } .body .info { margin: 10px 0; } .body .info .title { font-size: 17px; color: #0e1b26; } .body .info .step-block { display: inline-block; height: 38px; margin: 20px 0; } .body .info .step-block .join-step { display: inline-block; height: 38px; vertical-align: middle; } .body .info .step-block .join-step .number { display: inline-block; width: 30px; height: 26px; border-radius: 50%; background-color: #ffffff; color: #898989; border: 1px solid #898989; vertical-align: middle; margin-top: 3px; padding: 2px 0; } .body .info .step-block .join-step.current .number { width: 38px; background-color: #3481cf; color: #ffffff; border: none; vertical-align: middle; margin-top: 0; padding: 6px 0px; } .body .info .step-block .join-step .line { display: inline-block; width: 74px; height: 1px; background-color: #4b4c4d; margin-bottom: 2px; } .body .info .message { font-size: 24px; font-weight: bold; color: #0e1b26; padding: 5px; } .body .info .welcome-joiner { font-size: 20px; color: #0e1b26; } .body .info .join-company { font-size: 20px; color: #0e1b26; margin-bottom: 20px; } .body .info .description { font-size: 15px; color: #a2a3a6; max-width: 354px; display: inline-block; } .body .img-welcome-join { display: inline-block; margin-bottom: 20px; } .body form { padding: 10px 73px; } .body form .help-block { text-align: left; line-height: 18px; } .body form .help-block > i { margin-bottom: -1.7px } .body form .help-block > div { display: inline-block; font-size: 11px; color: #da6058; margin-left: 5px; } .body form .input-box { border-bottom: 1px solid #bcbcbc; display: inline-block; margin-bottom: 10px; padding: 4px 0; } .body form .input-box.on { border-bottom: 1px solid #3481cf; } .body form .input-box input { border: none; outline: none; font-size: 15px; color: #222222; width: 275px; margin: 0 35px 0 15px; vertical-align: top; } .body form .input-box input + i { position: absolute; padding: 10px; margin: -10px; margin-top: 0px; margin-left: -32px; opacity: 0.8; background-position: 50%; } .body form .input-box input + i:hover { opacity: 1; cursor: pointer; } .body form .select-list-box { outline: none; } .select-list-box .select-list { position: absolute; border-radius: 10px; box-shadow: 0px 3px 16px 0 rgba(0, 0, 0, 0.35); color: #222222; background-color: #fff; z-index: 1000; display: none; height: 320px; width: 370px; margin-top: 5px; } .body form .input-box .icon-user-community + input { width: 270px; } .body form .sent-email { font-size: 20px; color: #0e1b26; } .body form .auth-keys { margin: 25px 0; } .body form .auth-keys > input { width: 30px; font-size: 30px; color: #0e1b26; font-weight: bold; padding: 11px 16px; border: 1px solid #bcbcbc; border-radius: 10px; color: #0e1b26; margin-right: 32px; } .body form .auth-keys > input:last-of-type { margin-right: 0; } .body form .input-box .icon-field-required { margin-bottom: 6px; } .body form .input-box .severity1,  .body form .input-box .severity2,  .body form .input-box .severity3 { text-align: left; } .body form .input-box .severity1 > span { display: inline-block; width: 114px; height: 5px; background-color: #f46864; text-align: left; } .body form .input-box .severity2 > span { display: inline-block; width: 114px; height: 5px; margin-right: 5px; background-color: #f4c364;\t } .body form .input-box .severity3 > span { display: inline-block; width: 114px; height: 5px; margin-right: 5px; background-color: #b3eb7b;\t } .body form .input-box .severity3  > span:last-of-type { margin-right: 0; } .body form .email-receive { font-size: 14px; margin-top: 10px; color: #96999c;\t } .body form .button-group { margin-top: 10px; } .body form .button-group > a { font-size: 14px; display: block; text-align: center; color: #96999c; margin-top: 10px; cursor: pointer; } .body form .button-group .resend-authkey, .body form .button-group .create-organization { margin-top: 10px; color: #96999c; font-size: 14px; } .body form .button-group .resend-authkey a, .body form .button-group .create-organization a { display: inline-block; color: #3481cf; border-bottom: 1px solid #3481cf; } .body form .selection-group { text-align: right; } .body form .selection-group > a { width: 77px; margin-left: 5px; display: inline-block; cursor: pointer; } .body .set-community { margin-left: -215px; margin-right: -215px; text-align: left; border-top: 2px solid #b4b5b5; } .body .set-community table { font-size: 13px; color: #666464; width: 100%; } .body .set-community table td { border-bottom: 1px solid #e6e7e8; padding: 8px 0; } .body .set-community table tr td:first-of-type { width: 20%; } .body .set-community table .help-block { text-align: left; line-height: 18px; } .body .set-community table .help-block > i { margin-bottom: -1.7px } .body .set-community table .help-block > div { display: inline-block; font-size: 11px; color: #da6058; margin-left: 5px; } .body .set-community table tr td input { padding: 4px 0; width: calc(100% - 2px); border: 1px solid #e6e7e8; } .body .set-community table .domain-name input { width: 185px!important; margin-left: 10px; } .body .set-community .do-organization-setting .value .radio-button { width: 17px; height: 17px; display: inline-block; vertical-align: top; border: 1px solid #b4b5b5; border-radius: 50%; text-align: center; background-color: #fff; margin-top: 1px; margin-right: 5px; } .body .set-community .do-organization-setting .value .radio-button .on { width: 8px; height: 8px; margin-top: calc(50% - 4px); display: inline-block; vertical-align: top; border-radius: 50%; background-color: #3481cf; } .body .set-community .do-organization-setting .value > span:nth-of-type(2) { margin-right: 10px; } .body .set-community .organization { margin-top: 10px; height: 450px; } .body .set-community .organization .left-side, .body .organization .right-side { display: inline-block; vertical-align: top; width: calc(50% - 12px); height: 100%; overflow: hidden; } .body .set-community .organization .left-side > button, .body .set-community .organization .right-side > button { width: 95px; padding: 4px 0;  font-size: 13px; border-radius: 3px; font-size: 13px; border: solid 1px #3481cf; background-color: #eaeff4; color: #3481cf; margin-bottom: 5px; } .body .set-community .organization .left-side { text-align: left; margin-right: 10px; } .body .set-community .organization .right-side { text-align: right; margin-left: 10px; } .body .set-community .organization .left-side > div, .body .set-community .organization .right-side > div { height: calc(100% - 40px); border: solid 1px #e6e7e8; text-align: left; } .form-group.invalid > .icon-user-name, .form-group.invalid:focus-within > .icon-user-name { background: url('/assets/icon/name-error.svg') no-repeat; } .form-group:focus-within > .icon-user-name { background: url('/assets/icon/name-on.svg') no-repeat; } .form-group.invalid > .icon-user-email, .form-group.invalid:focus-within > .icon-user-email { background: url('/assets/icon/mail-error.svg') no-repeat; } .form-group:focus-within > .icon-user-email { background: url('/assets/icon/mail-on.svg') no-repeat; } .form-group:focus-within > .icon-user-contact { background: url('/assets/icon/contact-on.svg') no-repeat; } .form-group.invalid > .icon-user-password, .form-group.invalid:focus-within > .icon-user-password { background: url('/assets/icon/password-error.svg') no-repeat; } .form-group:focus-within > .icon-user-password { background: url('/assets/icon/password-on.svg') no-repeat; } .form-group.invalid > .icon-user-community, .form-group.invalid:focus-within > .icon-user-community { background: url('/assets/icon/community-error.svg') no-repeat; } .form-group:focus-within > .icon-user-community { background: url('/assets/icon/community-on.svg') no-repeat; } .form-group:focus-within > .icon-user-department { background: url('/assets/icon/department-on.svg') no-repeat; } .form-group:focus-within > .icon-user-position { background: url('/assets/icon/position-on.svg') no-repeat; } .footer { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 24px; text-align: center; font-size: 12px; color: #9fa5b1; } .footer > .logos { position: absolute; right: 24px; bottom: 12px;    } .footer > .logos > i { margin-left: 25px; vertical-align: bottom; } .btn-help-talk {   position: absolute; right: 20px; bottom: 70px; width: 57px; border-radius: 50%; box-shadow: 0px 2px 4px 0 rgba(0, 0, 0, 0.24); background-color: #3481cf; display: inline-block; padding: 14px 0; cursor: pointer; text-align: center; } .btn-help-talk > .icon-help-talk { vertical-align: top; }"]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:g.DomSanitizer},{type:m.Router},{type:m.ActivatedRoute},{type:a.TranslateService},{type:O},{type:T},{type:y},{type:x},{type:U}]},e.propDecorators={isAnnotation:[{type:t.Input}]},e}(),Ce=function(){function e(e,t,i,n,s,o,r){var a=this;this.router=e,this.route=t,this.translate=i,this.toastService=n,this.utilService=s,this.authService=o,this.apiService=r,this.user=new N,this.currentStepIndex=0,this.userIdError=null,this.passwordError=null,this.tempPassword=null,this.tempPasswordError=null,this.loginWorkflowInfos=[{step:1,title:"login.text.product-name",message:"common.button.login",description:null},{step:2,title:null,message:"login.text.forgot-password",description:"login.text.enter-email"},{step:3,title:null,message:"login.text.sent-temp-password",description:"login.text.get-temp-password"},{step:4,title:null,message:"login.text.password-reset",description:"login.text.enter-new-password"}],this.subscriptions=[],this.swTitle=null,this.subscriptions.push(this.route.params.subscribe((function(e){a.utilService.isUserId(e.param1)?a.user.id=e.param1:a.domainOrCompanyId=e.param1,a.utilService.isCompanyId(e.param2)?a.loginCommunityId=e.param2:a.targetId=e.param2,a.loginChannelId=e.param3}))),$(document).on("mouseenter","[sw-title]",(function(e){a.swTitle=$(e.target).attr("sw-title")||$(e.target).parents("[sw-title]:first").attr("sw-title");var t=e;$(document).on("mousemove",(function(e){t=e})),setTimeout((function(){$(document).off("mousemove");var e=$("#sw-title");0!==e.length&&e.css({left:t.pageX-e.width()/2+"px",top:t.pageY-40+"px"})}),500)})),$(document).on("mouseleave","[sw-title]",(function(e){a.swTitle=null,$("#sw-title").css({left:"-1000px",top:"-1000px"})}))}return e.prototype.ngOnInit=function(){},e.prototype.ngOnDestroy=function(){for(var e=0,t=this.subscriptions;e<t.length;e++){t[e].unsubscribe()}},e.prototype.login=function(){var e=this;return this.userIdError=this.passwordError=this.tempPasswordError=null,this.user.id?this.utilService.isEmailId(this.user.id)?this.user.password?this.user.password.length<8?this.passwordError="invalid-password-format":this.authService.login({username:this.user.id,password:this.user.password}).then((function(t){e.loginCommunityId?e.router.navigate([e.loginCommunityId+(e.loginChannelId?"/"+e.loginChannelId:"")]):e.domainOrCompanyId?e.router.navigate([e.domainOrCompanyId+(e.targetId?"/"+e.targetId:"")]):e.router.navigate([""])}),(function(t){401===t.status&&e.apiService.checkUserIdRegistered(e.user.id).then((function(t){t&&!0===t.status&&t.result?e.passwordError="wrong-password":e.userIdError="not-registered-userid"}))})):this.passwordError="password-is-required":this.userIdError="invalid-email-format":this.userIdError="email-is-required",!1},e.prototype.gotoFindPassword=function(){return this.currentStepIndex=1,!1},e.prototype.cancelFindPassword=function(){return this.userIdError=this.passwordError=this.tempPasswordError=null,this.currentStepIndex=0,!1},e.prototype.complete=function(){var e=this;switch(this.currentStepIndex){case 1:this.userIdError=null,this.user.id?this.utilService.isEmailId(this.user.id)?this.apiService.requestEmailTempPassword(this.user.id).then((function(t){!0===t.status?(e.toastService.add("info",e.translate.instant("loin.text.successfully-temp-password-requested")),e.currentStepIndex++):e.apiService.checkUserIdRegistered(e.user.id).then((function(t){t&&!0===t.status&&t.result?e.userIdError="email-temp-password":e.userIdError="not-registered-userid"}))})):this.userIdError="invalid-email-format":this.userIdError="email-is-required";break;case 2:this.currentStepIndex++;break;case 3:this.passwordError=this.tempPasswordError=null,this.tempPassword?this.tempPassword.length<8?this.tempPasswordError="invalid-temp-password-format":this.user.password?this.user.password.length<8?this.passwordError="invalid-password-format":this.apiService.changeUserPassword(this.user.id,this.tempPassword,this.user.password).then((function(t){t.status?e.authService.login({username:e.user.id,password:e.user.password}).then((function(t){e.router.navigate([""])}),(function(t){401===t.status&&e.apiService.checkUserIdRegistered(e.user.id).then((function(t){t&&!0===t.status&&t.result?e.passwordError="wrong-password":e.userIdError="not-registered-userid"}))})):e.passwordError="invalid-temp-password"})):this.passwordError="password-is-required":this.tempPasswordError="temp-password-is-required"}return!1},e.prototype.requestTempPassword=function(){var e=this;return this.apiService.requestEmailTempPassword(this.user.id).then((function(t){t.status?e.currentStepIndex++:e.apiService.checkUserIdRegistered(e.user.id).then((function(t){t&&!0===t.status&&t.result?e.userIdError="email-temp-password":e.userIdError="not-registered-userid"}))})),this.currentStepIndex--,!1},e.prototype.returnOnLogin=function(e){13===e.keyCode&&this.login()},e.prototype.isSecuredPassword=function(){return this.utilService.isUserId(this.user.password)},e.prototype.gotoPage=function(e){var t=this;return setTimeout((function(i){t.router.navigate([e])}),300),!1},e.decorators=[{type:t.Component,args:[{selector:"sw-login",template:'<div class="header"> <a (click)="gotoPage(\'/welcome\')" class="img-product-logo"></a> </div> <div class="body" (keydown)="returnOnLogin($event)"> <div> <div class="info"> <div *ngIf="loginWorkflowInfos[currentStepIndex].title" class="title">{{loginWorkflowInfos[currentStepIndex].title | translate}}</div> <div class="message">{{loginWorkflowInfos[currentStepIndex].message | translate}}</div> <div *ngIf="loginWorkflowInfos[currentStepIndex].description" class="description">{{loginWorkflowInfos[currentStepIndex].description | translate}}</div> </div> <form name="form" #f="ngForm" novalidate> <div *ngIf="currentStepIndex<2" class="input-box"  [ngClass]="{\'on\': user.id}"> <div *ngIf="userIdError" class="help-block"> <i class="icon-field-error"></i> <div>{{\'login.error.\' + userIdError | translate}}</div> </div> <i class="icon-user-email" [ngClass]="{\'on\': user.id, \'error\': userIdError}"></i> <input type="text" name="userid" autocomplete="new-userid" [(ngModel)]="user.id" #userid="ngModel" placeholder="{{\'common.text.email\' | translate}}" required email /> </div> <div *ngIf="currentStepIndex === 3" class="input-box"> <div *ngIf="tempPasswordError" class="help-block"> <i class="icon-field-error"></i> <div>{{\'login.error.\' + tempPasswordError | translate}}</div> </div> <input type="password" name="tempPassword" autocomplete="new-password" [(ngModel)]="tempPassword" minlength="8" placeholder="{{\'common.text.temp-password\' | translate}}" required/> </div> <div *ngIf="currentStepIndex!==1 && currentStepIndex!==2 " class="input-box" [ngClass]="{\'on\': user.password}"> <div *ngIf="passwordError" class="help-block"> <i class="icon-field-error"></i> <div>{{\'login.error.\' + passwordError | translate}}</div> </div> <i *ngIf="currentStepIndex!==3" class="icon-user-password" [ngClass]="{\'on\': user.password, \'error\': passwordError}"></i> <input type="password" name="password" autocomplete="new-password" [(ngModel)]="user.password" #password="ngModel" minlength="8" placeholder="{{\'common.text.password\' | translate}}" required/> <ul *ngIf="currentStepIndex===3 && (password.dirty || password.touched)"> <li *ngIf="password.invalid && password?.errors.minlength" class="severity1"> <span></span> </li> <li *ngIf="password.valid && !isSecuredPassword()" class="severity2"> <span></span><span></span> </li> <li *ngIf="password.valid && isSecuredPassword()" class="severity3"> <span></span><span></span><span></span> </li> </ul> </div> <div *ngIf="currentStepIndex === 2" class="email-id"> <span>{{user.id}}</span> </div> <div *ngIf="currentStepIndex===0" class="option-group"> <sw-check-box [(model)]="user.keepLoginStatus" [label]="\'login.text.keep-login-state\' | translate"></sw-check-box> <sw-check-box [(model)]="user.rememberUserId" [label]="\'login.text.remember-email\' | translate"></sw-check-box> </div> <div class="button-group"> <div *ngIf="currentStepIndex===0" class="btn-login btn-android full" (click)="login()">{{\'common.button.login\' | translate}}</div> <a *ngIf="currentStepIndex===0" (click)="gotoFindPassword()">{{\'login.text.forgot-password\' | translate}}</a> <a *ngIf="currentStepIndex===0" (click)="gotoPage(\'/join\')">{{\'join.text.join-member\' | translate}}</a> <div *ngIf="currentStepIndex === 1 || currentStepIndex === 3" class="selection-group"> <a (click)="cancelFindPassword()" class="btn-android ink">{{\'common.button.cancel\' | translate}}</a> <a class="btn-android" (click)="complete();">{{\'common.button.done\' | translate}}</a> </div> <div *ngIf="currentStepIndex===2" class="btn-login btn-android full" (click)="complete()">{{\'common.button.next\' | translate}}</div> <div *ngIf="currentStepIndex===2" class="resend-temp-password">{{\'login.text.didnt-receive-email\' | translate}} <a href="" (click)="requestTempPassword()" class="">{{\'join.text.resend-request\' | translate}}</a></div> </div> </form> </div> </div> <span class="btn-help-talk"> <i class="icon-help-talk"></i> </span> <div class="footer"> <span>Copyrightⓒ SmartWorks.net, Inc. & AIROV Tech. All Rights Reserved.</span> <span class="logos"> <i class="logo-smartworksnet-inc"></i> <i class="logo-airov-inc"></i> </span> </div> <div *ngIf="swTitle" id="sw-title"> <span class="content">{{swTitle}}</span> <span class="pointer"></span> </div>',styles:[".header { position: absolute; top: 0; left: 0; right: 0; padding: 20px 25px; background-color: #ffffff; } .header > a { font-size: 20px; font-weight: bold; color: #111b25; } .body { position: absolute; top: 70px; left: 0; right: 0; bottom: 42px; background-color: #ffffff; padding: 50px; min-width: 500px; } .body > div { position: absolute; left: 0; right: 0; top: 0; bottom: 0; margin: auto; width: 500px; height: 400px; text-align: center; } .body .info { margin: 30px 0 10px 0; } .body .info .title { font-size: 20px; color: #0e1b26; } .body .info .message { font-size: 24px; font-weight: bold; color: #0e1b26; padding: 5px; } .body .info .description { font-size: 15px; color: #a2a3a6; max-width: 354px; display: inline-block; } .body form { padding: 10px 73px; } .body form .help-block { text-align: left; line-height: 18px; } .body form .help-block > i { margin-bottom: -1.7px } .body form .help-block > div { display: inline-block; font-size: 11px; color: #da6058; margin-left: 5px; } .body form .input-box { border-bottom: 1px solid #bcbcbc; display: inline-block; margin-bottom: 10px; padding: 4px 0; } .body form .input-box.on { border-bottom: 1px solid #3481cf; } .body form .input-box input { border: none; outline: none; font-size: 15px; color: #222222; width: 300px; margin: 0 15px; margin-top: -3px; vertical-align: top; } .body form .input-box .severity1,  .body form .input-box .severity2,  .body form .input-box .severity3 { text-align: left; } .body form .input-box .severity1 > span { display: inline-block; width: 114px; height: 5px; background-color: #f46864; text-align: left; } .body form .input-box .severity2 > span { display: inline-block; width: 114px; height: 5px; margin-right: 5px; background-color: #f4c364;\t } .body form .input-box .severity3 > span { display: inline-block; width: 114px; height: 5px; margin-right: 5px; background-color: #b3eb7b;\t } .body form .input-box .severity3  > span:last-of-type { margin-right: 0; } .body form .email-id { display: inline-block; margin-bottom: 30px; font-size: 20px; color: #0e1b26; } .body form .checkbox-group:last-of-type { margin-left: 15px; } .body form .checkbox-group > span:last-of-type { display: inline-block; vertical-align: top; margin-left: 10px;     } .body form .option-group { font-size: 14px; color: #96999c; text-align: right; margin-top: 30px; margin-bottom: 10px; } .body form .button-group > a { font-size: 14px; display: block; text-align: center; color: #96999c; margin-top: 10px; cursor: pointer; } .body form .button-group > a:first-of-type { display: inline-block; color: #3481cf; border-bottom: 1px solid #3481cf; } .body form .selection-group { text-align: right; } .body form .selection-group > a { width: 77px; margin-left: 5px; display: inline-block; cursor: pointer; } .body form .button-group .resend-temp-password { margin-top: 10px; font-size: 14px; color: #96999c; } .body form .button-group .resend-temp-password a { display: inline-block; color: #3481cf; border-bottom: 1px solid #3481cf; } .footer { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 24px; text-align: center; font-size: 12px; color: #9fa5b1; } .footer > .logos { position: absolute; right: 24px; bottom: 12px;    } .footer > .logos > i { margin-left: 25px; vertical-align: bottom; } .btn-help-talk {   position: absolute; right: 20px; bottom: 70px; width: 57px; border-radius: 50%; box-shadow: 0px 2px 4px 0 rgba(0, 0, 0, 0.24); background-color: #3481cf; display: inline-block; padding: 14px 0; cursor: pointer; text-align: center; } .btn-help-talk > .icon-help-talk { vertical-align: top; }"]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:m.Router},{type:m.ActivatedRoute},{type:a.TranslateService},{type:y},{type:O},{type:T},{type:U}]},e}(),Ie=function(){function e(e,i,n,s,o,r,a,l,c,d,p){var u=this;this.translate=e,this.router=i,this.route=n,this.utilService=s,this.apiService=o,this.authService=r,this.toastService=a,this.publishService=l,this.windowService=c,this.confirmService=d,this.webSocketService=p,this.windowDisabled=!0,this.currentWorkspaceChange=new t.EventEmitter,this._myWorkspaces=[],this.currentUser=null,this.currentCompany=null,this.myCompanies=null,this.notificationBadges=new Array(2),this.popupParameters=null,this.whiteParameters=null,this.showLayoutPopup=null,this.showWhiteCurtain=null,this.labelEditorOn=!1,this.isLoading=!1,this.popupUserProfile=!1,this.subscriptions=[],this.swTitle=null,this.currentUser=r.getCurrentUser(),this.currentCompany=this.currentUser?this.currentUser.company:null,this.notificationBadges[0]=0,this.notificationBadges[1]=0,this.subscriptions.push(this.publishService.currentUserChange.subscribe((function(e){e&&(u.currentUser=e,u.currentCompany=u.currentUser.company,u.currentWorkspace=u.currentWorkspace,u.windowService.loadWindowData(u.currentUser,null),console.log("LayoutBaseComponent currentUser = ",u.currentUser))}))),this.subscriptions.push(this.publishService.popupMessage.subscribe((function(e){e?(u.showPopup(e.targetId),u.popupParameters=e.parameters):u.showPopup(null)}))),this.subscriptions.push(this.publishService.subIsLoading.subscribe((function(e){u.isLoading=e}))),this.webSocketService.openWebSocket(),this.initCurrentUser(),$(document).on("mouseenter","[sw-title]",(function(e){u.swTitle=$(e.target).attr("sw-title")||$(e.target).parents("[sw-title]:first").attr("sw-title");var t=e;$(document).on("mousemove",(function(e){t=e})),setTimeout((function(){$(document).off("mousemove");var e=$("#sw-title");if(0!==e.length){e.css({left:t.pageX-e.width()/2+"px",top:t.pageY-40+"px"});var i=2,n=setInterval((function(){u.swTitle&&$(t.target).length&&0!==i||(u.swTitle=null,clearInterval(n)),i--}),1e3)}else u.swTitle=null}),500)})),$(document).on("mouseleave","[sw-title]",(function(e){u.swTitle=null}))}return e.prototype.ngOnInit=function(){var e=this;"Notification"in window?"granted"===Notification.permission||("denied"!==Notification.permission?(this.toastService.add("info",this.translate.instant("notification.text.permission-requested")),Notification.requestPermission((function(t){"granted"===t?e.toastService.add("info",e.translate.instant("notification.text.notification-granted")):e.toastService.add("warn",e.translate.instant("notification.text.permission-rejected"))}))):this.toastService.add("info",this.translate.instant("notification.text.settings-denied"))):this.toastService.add("info",this.translate.instant("notification.text.browser-not-support"))},e.prototype.ngOnDestroy=function(){for(var e=0,t=this.subscriptions;e<t.length;e++){t[e].unsubscribe()}this.webSocketService.closeWebSocket()},e.prototype.setWorkspace=function(e,t){this.myWorkspaces=e,this.currentWorkspace=t,this.currentWorkspaceChange.emit(t)},Object.defineProperty(e.prototype,"myWorkspaces",{get:function(){return this._myWorkspaces},set:function(e){this._myWorkspaces=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentWorkspace",{get:function(){return this._currentWorkspace},set:function(e){this._currentWorkspace=e,e&&this.currentUser.company&&this.apiService.setLastWorkspaceId(this.currentUser.company.id,this.currentUser.id,this.currentWorkspace.id)},enumerable:!0,configurable:!0}),e.prototype.setNavFocused=function(){setTimeout((function(e){$("sw-layout #nav").attr("tabindex","-1").focus()}))},e.prototype.initCurrentUser=function(){this.currentUser&&this.currentUser.company&&this.windowService.loadWindowData(this.currentUser,null)},e.prototype.gotoWorkspace=function(e,t){return this.currentWorkspace=e,this.currentWorkspaceChange.emit(e),t=t||e.defaultTargetId,this.publishService.pubChangeNotice({source:"workspace",workspace:e,targetId:t}),this.setNavFocused(),!1},e.prototype.showPopup=function(e){var t=this;setTimeout((function(){t.showLayoutPopup=e}),100)},e.prototype.openMyCompanies=function(e){var t=this;return this.myCompanies=null,this.apiService.getMyCompanies().then((function(e){e&&!0===e.status&&(t.myCompanies=e.result)})),!1},e.prototype.switchCompany=function(e){this.router.navigate([e.id])},e.prototype.openUserProfile=function(e){$(e.target||e.srcElement).parents(".my-avatar:first").focus(),this.popupUserProfile=!0},e.prototype.focusoutOnUserProfile=function(e){var t=this;e.relatedTarget&&(jQuery.contains(e.target,e.relatedTarget)||jQuery.contains(e.relatedTarget,e.target))||setTimeout((function(){t.popupUserProfile=!1}),100)},e.prototype.movePage=function(e){for(var t=-1,i=0;i<this.myWorkspaces.length;i++)if(this.currentWorkspace.id===this.myWorkspaces[i].id){t=i;break}if(-1!==t)if(1===e){for(i=t+1;i<this.myWorkspaces.length;i++)if(!this.myWorkspaces[i].spaceHolder)return void this.gotoWorkspace(this.myWorkspaces[i],null)}else if(-1===e)for(i=t-1;i>=0;i--)if(!this.myWorkspaces[i].spaceHolder)return void this.gotoWorkspace(this.myWorkspaces[i],null)},e.prototype.keyup=function(e){var t=e.which||e.keyCode;38===t?this.movePage(-1):40===t?this.movePage(1):37===t||39===t&&this.setWrapNavFocused()},e.prototype.setWrapNavFocused=function(){$("#wrap .nav:first").attr("tabindex","-1").focus()},e.prototype.isLayoutBasePopup=function(e){switch(e){case"setUser":case"inviteNewUser":return!0}return!1},e.prototype.toggleShowWindowList=function(e){this.windowMenuList=null,this.subWindowList=null,this.showWindowList=!this.showWindowList,this.showWindowList&&(this.windowService.checkIfSavedWorkList(this.currentUser),setTimeout((function(){$("#window-list").focus()})))},e.prototype.clickOnOpenWindow=function(e,t,i){this.windowService.isWindowListVisible(i)&&t.subWindowList||(this.windowService.addWindow(t,i),this.showWindowList=!1)},e.prototype.getListPosition=function(e,t){if(t>=5)return 0;switch(t){case 1:return e;case 2:case 3:return e-1;case 4:return e-2}return e-t},e.prototype.closeAllWindows=function(e){var t=this;e.stopPropagation(),this.windowService.workWindowList.filter((function(e){return e.editMode})).length>0?this.confirmService.warning(this.translate.instant("confirm.text.close-all-windows"),this.translate.instant("confirm.text.discard-all-editeds")).then((function(){for(var e=0,i=t.windowService.workWindowList.filter((function(e){return e.editMode}));e<i.length;e++){var n=i[e];t.apiService.deleteTaskById(t.currentUser.company.id,n.id)}t.windowService.closeAllWindows(null)}),(function(){})):this.windowService.closeAllWindows(null)},e.prototype.loadSavedWorkList=function(e){this.windowMenuList="saved",this.windowService.savedWindowList=null,this.windowService.loadSavedWorkList(this.currentUser)},e.prototype.loadSavedWindowList=function(e,t,i){this.windowMenuList="saved",this.focusedWorkIndex=i,this.windowService.savedWindowList=[],this.windowService.loadSavedWindowList(this.currentUser,t),this.savedMoreUp=!0,this.savedMoreDown=!1},e.prototype.moreSavedPage=function(e,t){var i=this,n=$("#window-list .sub-menu-list .saved-list .window-list"),s=setInterval((function(){"up"===t?(n.scrollTop(n.scrollTop()-1),n.scrollTop()<=0&&(clearInterval(s),i.savedMoreUp=!1),i.savedMoreDown=!0):(n.scrollTop(n.scrollTop()+1),n.scrollTop()>=n[0].scrollHeight-n.height()&&(clearInterval(s),i.savedMoreDown=!1),i.savedMoreUp=!0)}),10);$(e.target).bind("mouseleave",(function(e){clearInterval(s)}))},e.decorators=[{type:t.Component,args:[{selector:"sw-layout",template:'<div id="boundary" #layout> <div id="header"> <sw-select-box class="my-company" [selectedObject]="currentCompany" (selectedObjectChange)="switchCompany($event)" [selectObjects]="myCompanies" (refreshSelectObjects)="openMyCompanies($event)"></sw-select-box> <ul class="notifications"> <li [ngClass]="{\'has-badge\': notificationBadges[1]>0, \'on\': showAlarm}"> <i class="icon-h-alarm" (click)="showAlarm = !showAlarm"></i> <span *ngIf="notificationBadges[1]" class="badge">{{notificationBadges[1]}}</span> </li> </ul> <div class="my-avatar" tabindex="-1" [ngClass]="{\'on\': popupUserProfile}" (focusout)="focusoutOnUserProfile($event)" (click)="openUserProfile($event)"> <sw-avatar [selectedUser]="currentUser" [size]="36"></sw-avatar> <sw-user-profile *ngIf="popupUserProfile"></sw-user-profile> </div> </div> <div id="nav" (keyup)="keyup($event)"> <ul *ngIf="myWorkspaces && currentWorkspace" class="workspace-list"> <li *ngFor="let workspace of myWorkspaces"  [ngClass]="{\'on\': currentWorkspace.id === workspace.id}"  (click)="gotoWorkspace(workspace)" [attr.sw-title]="workspace.name | translate"> <i *ngIf="workspace.hasNew" class="icon-has-new"></i> <a class="icon-{{workspace.id}}" [ngClass]="{\'on\': currentWorkspace.id === workspace.id}"></a> </li> </ul> <span *ngIf="!windowDisabled" class="new-window" (click)="toggleShowWindowList($event)"> <i class="icon-new-window"></i> </span> </div> <div *ngIf="!windowDisabled && showWindowList" id="window-list" tabindex="-1" (focusout)="showWindowList=null"> <ul class="menu-list"> <li [ngClass]="{\'on\': windowMenuList===\'chat\'}"> <i class="icon-window-list-chat"></i> <span>{{\'window.text.chat\' | translate}}</span> <span *ngIf="windowService.chatWindowList.length" class="more" (mouseenter)="windowMenuList=\'chat\';invisibleWindowList=null"><i class="icon-list-more-right"></i></span> <ul *ngIf="windowMenuList===\'chat\'" class="sub-menu-list _{{getListPosition(3, windowService.chatWindowList.length)}}"> <li *ngFor="let subWindow of windowService.chatWindowList" [ngClass]="{\'on\': subWindow[\'focused\']}" (click)="clickOnOpenWindow($event, subWindow, windowMenuList)"> <span class="text-ellipsis">{{utilService.getChannelName(subWindow, currentUser.id)}}</span> </li> </ul> </li> <li [ngClass]="{\'on\': windowMenuList===\'work\'}"> <i class="icon-window-list-work"></i> <span>{{\'window.text.work\' | translate}}</span> <span *ngIf="windowService.workWindowList.length" class="more" (mouseenter)="windowMenuList=\'work\';invisibleWindowList=null"><i class="icon-list-more-right"></i></span> <ul *ngIf="windowMenuList===\'work\'" class="sub-menu-list _{{getListPosition(2, windowService.workWindowList.length)}}" > <li *ngFor="let subWindow of windowService.workWindowList" [ngClass]="{\'on\': subWindow[\'focused\'], \'edit-mode\': subWindow.editMode}" (click)="clickOnOpenWindow($event, subWindow, windowMenuList)"> <span class="text-ellipsis"><span *ngIf="subWindow.editMode" class="edit-status">{{\'common.button.editing\' | translate}}</span>{{subWindow.subject || \'common.text.no-subject\' | translate}}</span> </li> </ul> </li> <li> <i class="icon-window-list-saved"></i> <span>{{\'window.text.temp-saved\' | translate}}</span> <span *ngIf="windowService.savedWorkList" class="more" (mouseenter)="loadSavedWorkList($event)"><i class="icon-list-more-right"></i></span> <ul *ngIf="windowMenuList===\'saved\' && windowService.savedWorkList && windowService.savedWorkList.length > 0" class="sub-menu-list _{{getListPosition(1, windowService.savedWorkList.length)}}"> <li *ngFor="let work of windowService.savedWorkList; index as pos" class="saved"> <span class="text-ellipsis" [innerHTML]="work.fullPathName || \'common.text.no-subject\' | translate"></span> <span class="more" (mouseenter)="loadSavedWindowList($event, work.id, pos)"><i class="icon-list-more-right"></i></span> </li> <ul *ngIf="windowMenuList===\'saved\' && windowService.savedWindowList && windowService.savedWindowList.length > 0" class="saved-list _{{getListPosition(focusedWorkIndex, windowService.savedWindowList.length)}}"> <li *ngIf="windowService.savedWindowList.length > 10 && !windowService.onMoreSavedWorkList && savedMoreUp" class="more-page up" (mouseenter)="moreSavedPage($event, \'up\')"><i class="icon-arrow-list-more-up"></i></li> <ul class="window-list"> <li *ngFor="let window of windowService.savedWindowList; index as pos" class="saved" (click)="clickOnOpenWindow($event, window, \'work\')"> <span class="text-ellipsis">{{window.subject || \'common.text.no-subject\' | translate}}</span> </li> </ul> <li *ngIf="savedMoreDown" class="more-page down" (mouseover)="moreSavedPage($event, \'down\')"><i class="icon-arrow-list-more-down"></i></li> </ul> </ul>\t\t\t\t </li> <li class="single"> <span (click)="closeAllWindows($event)">{{\'window.text.close-all\' | translate}}</span> </li> </ul> </div> <div id="wrap" class="drag-boundary" #wrap> <app-workspace [currentWorkspace]="currentWorkspace"></app-workspace> </div> <div *ngIf="showLayoutPopup" id="popup-curtain"> <sw-set-user *ngIf="showLayoutPopup === \'setUser\'" class="popup-app" [selectedUser]="popupParameters && popupParameters[0]"></sw-set-user> <sw-invite-new-user *ngIf="showLayoutPopup === \'inviteNewUser\'" class="popup-app" [selectedDepartment]="popupParameters && popupParameters[0]"></sw-invite-new-user> <app-layout-popup *ngIf="!isLayoutBasePopup(showLayoutPopup)" [showLayoutPopup]="showLayoutPopup" [popupParameters]="popupParameters"></app-layout-popup> </div> <div *ngIf="isLoading === true" [ngClass]="{\'loading\': isLoading === true}"></div> <div *ngIf="swTitle" id="sw-title"> <span class="content" [innerHTML]="swTitle"></span> <span class="pointer"></span> </div> </div> ',styles:["#boundary { position: absolute; top: 0; left: 0; right: 0; bottom: 0; } #header { position: fixed; top: 0; left: 63px; right: 0; height: 57px; min-width: 1024px; border-bottom: solid 1px #d8d9db; background-color: #ffffff; z-index: 100; } #nav { position: fixed; top: 0; bottom: 0; left: 0; width: 63px; background-color: #0e1b26; z-index: 100; outline: none; } #wrap { position: fixed; top: 58px; left: 63px; right: 0; bottom: 0; } #popup-curtain { position: fixed;  top: 0;  bottom: 0;  left: 0;  right: 0;  background-color: rgba(0, 0, 0, 0.4);  z-index: 1000; } #white-curtain { position: fixed;  top: 0;  bottom: 0;  left: 0;  right: 0;  background-color: rgba(256, 256, 256, 0);  z-index: 1100; } #popup-curtain.on, #white-curtain.on { display: block; } #wrap #content-nav { width: 306px; height: 100%; background-color: #ffffff; } #wrap #content { width: calc(100% - 306px); height: 100%; padding-left: 306px; background-color: #eeeeee; } #wrap #detail { position: absolute; top: 0; bottom: 0; right: 0; width: 348px; box-shadow: -1.8px 0.9px 8px 0 rgba(0, 0, 0, 0.11); border: solid 1px #d8d9db; background-color: #ffffff; overflow-y: scroll; } #nav .workspace-list { padding: 0; margin: 0; } #nav .icon-has-new { position: absolute; width: 6px; height: 6px; left: 11px; margin-top: 15px; display: inline-block; background-color: #f46864; border-radius: 50%; } #nav .icon-product-logo { position: absolute; bottom: 10px; left: 0; right: 0; margin-left: auto; margin-right: auto;\t cursor: pointer; outline: none; } #nav .workspace-list > li { width: 100%; height: 56px; text-align: center; } #nav .workspace-list > li:hover { background-color: rgb(17,37,60); cursor: pointer; } #nav .workspace-list > li.on, #nav .workspace-list > li:hover.on { background-color: #3481cf; } #nav .workspace-list > li > a { margin-top: 20px; } #nav .new-window { position: absolute; bottom: 17px; left: 0; right: 0; margin-left: auto; margin-right: auto;\t outline: none; width: 30px; height: 30px; border-radius: 3px; background-color: #3983cc; text-align: center; cursor: pointer; } #nav .new-window > i { margin-top: 6px; } #window-list { position: absolute; bottom: 54px; left: 17px; right: auto; outline: none; text-align: left; background-color: #fff;\t z-index: 102; border-radius: 5px; box-shadow: 0 0 16px 0 rgba(0, 0, 0, 0.25); border: solid 1px #b4b5b5; font-size: 13px; color: #222; padding: 8px 0; width: 120px; } #window-list .menu-list > li { padding: 5.5px 8px; } #window-list .menu-list > li.edit-mode { padding: 2.5px 8px; } #window-list .menu-list > li.on, #window-list .menu-list > li:hover { background-color: #ededee; } #window-list .menu-list > li > i { margin-bottom: -3px; } #window-list .menu-list > li > span:not(.more) { margin-left: 22px; } #window-list .menu-list > li > i + span { margin-left: 7px; } #window-list .menu-list li > .more { float: right; text-align: center; width: 18px; height: 18px; } #window-list .menu-list li.on > .more, #window-list .menu-list li > .more:hover { border-radius: 50%; background-color: #2222221a; cursor: pointer; } #window-list .menu-list li > .more > i { margin-top: 7px; vertical-align: top; } #window-list .menu-list > li.single { cursor: pointer; } #window-list .menu-list .sub-menu-list { position: absolute; bottom: 0; left: 124px; right: auto; outline: none; text-align: left; background-color: #ededee;\t border-radius: 5px; box-shadow: 0 0 16px 0 rgba(0, 0, 0, 0.25); border: solid 1px #b4b5b5; font-size: 13px; color: #222; padding: 8px 0; width: 220px; } #window-list .menu-list .sub-menu-list .edit-status { background-color: #3481cf; border-radius: 5px; font-size: 11px; color: #fff; display: inline-block; padding: 0px 6px; margin-right: 5px; border: 1px solid #3481cf; } #window-list .menu-list .sub-menu-list li.on .edit-status { background-color: inherit; border: 1px solid #fff; } #window-list .menu-list ._1, #window-list .menu-list .sub-menu-list .saved-list._1 { bottom: 30px!important; } #window-list .menu-list ._2, #window-list .menu-list .sub-menu-list .saved-list._2 { bottom: 60px!important; } #window-list .menu-list ._3, #window-list .menu-list .sub-menu-list .saved-list._3 { bottom: 90px!important; } #window-list .menu-list ._4, #window-list .menu-list .sub-menu-list .saved-list._4 { bottom: 120px!important; } #window-list .menu-list ._5, #window-list .menu-list .sub-menu-list .saved-list._4 { bottom: 150px!important; } #window-list .menu-list ._6, #window-list .menu-list .sub-menu-list .saved-list._4 { bottom: 180px!important; } #window-list .menu-list ._7, #window-list .menu-list .sub-menu-list .saved-list._4 { bottom: 210px!important; } #window-list .menu-list ._8, #window-list .menu-list .sub-menu-list .saved-list._4 { bottom: 240px!important; } #window-list .menu-list ._9, #window-list .menu-list .sub-menu-list .saved-list._4 { bottom: 270px!important; } #window-list .menu-list .sub-menu-list.view-option { width: fit-content; } #window-list .menu-list .sub-menu-list > li { padding: 5.5px 8px; } #window-list .menu-list .sub-menu-list > li.edit-mode { padding: 5px 8px; } #window-list .menu-list .sub-menu-list > li:hover { background-color: #dbdbdb; cursor: pointer; } #window-list .menu-list .sub-menu-list > li.on, #window-list .menu-list .sub-menu-list > li.on:hover { background-color: #3481cf; color: #fff; cursor: default; } #window-list .menu-list .sub-menu-list > li > .text-ellipsis { display: inline-block; max-width: calc(100% - 44px); vertical-align: top; } #window-list .menu-list .sub-menu-list > li.on > .text-ellipsis { display: inline-block; max-width: calc(100% - 44px); }    #window-list .menu-list .sub-menu-list > li.saved > .text-ellipsis { max-width: calc(100% - 18px); }    #window-list .menu-list .sub-menu-list > li > i { float: right; margin-top: 5px; } #window-list .menu-list .sub-menu-list > li .more-count { float: right; margin-right: 6px; font-size: 11px; } #window-list .menu-list .sub-menu-list > li.edit-mode > i { margin-top: 7px; } #window-list .menu-list .sub-menu-list > li.edit-mode .more-count { margin-top: 2px; } #window-list .menu-list .sub-menu-list .saved-list { position: absolute; bottom: 0; margin-left: 225px; right: auto; outline: none; text-align: left; background-color: #ededee;\t border-radius: 5px; box-shadow: 0 0 16px 0 rgba(0, 0, 0, 0.25); border: solid 1px #b4b5b5; font-size: 13px; color: #222; padding: 8px 0; width: 220px; } #window-list .menu-list .sub-menu-list .saved-list .window-list { max-height: 300px; overflow: hidden;\t } #window-list .menu-list .sub-menu-list .saved-list .window-list > li { padding: 5.5px 8px; } #window-list .menu-list .sub-menu-list .saved-list .window-list > li:hover { background-color: #dbdbdb; cursor: pointer; } #window-list .menu-list .sub-menu-list .saved-list .window-list > li > .text-ellipsis { display: inline-block; max-width: 100%; vertical-align: top; }    #window-list .menu-list .sub-menu-list li.more-page { text-align: center; padding: 0px 8px; line-height: 10px; cursor: default; } #window-list .menu-list .sub-menu-list li.more-page.up { margin-top: -4px; margin-bottom: -6px; } #window-list .menu-list .sub-menu-list li.more-page.down { margin-top: -6px; margin-bottom: -4px; } #window-list .menu-list .sub-menu-list li.more-page > i { float: none; margin-bottom: 3px; margin-top: 0; } #window sw-window { position: absolute; width: fit-content; height: fit-content; left: 0; top: 0; bottom: auto; right: auto; z-index: 100; } #window sw-window { position: absolute; width: fit-content; height: 0; left: 0; top: 0; z-index: 100; } #window sw-window.maximized { position: absolute; width: auto; height: auto; left: 0; top: 0; bottom: 0; right: 0; } #window sw-window.focus { z-index: 101; } #header .my-company { float: left; margin: 17px; } #header .my-company .icon-select-list{ vertical-align: middle; } #header .global-search { position: absolute; display: inline-block; left: 305px; padding: 15px; padding-right: 0; } #header .global-search input { font-size: 14px; font-weight: normal; font-style: normal; font-stretch: normal; line-height: 0.86; letter-spacing: normal; text-align: left; color: rgba(48, 49, 49, 0.8); border: none; width: 500px;\t outline: none; margin-left: 5px; } #header .notifications { float: right; margin-right: 50px; margin-top: 13px; } #header .notifications > li { width: 28px; height: 28px; display: inline-block; margin-right: 20px; border: 1px solid #fff; border-radius: 5px; text-align: center; } #header .notifications > li.on { border: solid 1px #656d74; background-color: #eeeeee; } #header .notifications > li.has-badge { cursor: pointer; } #header .notifications .badge { display: inline-block; font-size: 10px; font-weight: bold; color: #ffffff; background-color: #eb5652; border-radius: 20px; padding: 0 3px; min-width: 10px; text-align: center;     bottom: 10px; margin-left: -7px; } #header .my-avatar { position: absolute; top: 0; right: 0; margin: 9px; width: 34px; height: 34px; border: 1px solid #fff; outline: none; cursor: pointer; } #header .my-avatar:hover, #header .my-avatar.on { border: 1px solid #5fa5fc; border-radius: 40%; } #header .my-avatar sw-avatar { margin-left: -1px; margin-top: -1px; display: inline-block; } #header .company-name { font-size: 16px; font-weight: bold; font-style: normal; font-stretch: normal; line-height: 0.75; letter-spacing: normal; text-align: left; color: #0e1b26;\t } "]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:a.TranslateService},{type:m.Router},{type:m.ActivatedRoute},{type:O},{type:U},{type:T},{type:y},{type:x},{type:ue},{type:V},{type:ce}]},e.propDecorators={windowDisabled:[{type:t.Input}],currentWorkspaceChange:[{type:t.Output}],myWorkspaces:[{type:t.Input,args:["workspaces"]}],currentWorkspace:[{type:t.Input,args:["currentWorkspace"]}]},e}(),Ue=function(){function e(e,t,i,n,s,o,r,a,l){var c=this;this.router=e,this.translate=t,this.utilService=i,this.authService=n,this.toastService=s,this.apiService=o,this.publishService=r,this.webSocketService=a,this.confirmService=l,this.smartworksUrl=window.location.origin+"/",this.notificationBadges=new Array(2),this._currentMenu="communityList",this.communityOrders=[{id:"orderByRecent",name:this.translate.instant("community.text.order-by-recent")},{id:"orderByCreated",name:this.translate.instant("community.text.order-by-created")}],this.orderBy=this.communityOrders[0],this._managerCommunityOnly=!1,this.isNewDepartment=!1,this.isNewPosition=!1,this.popupUserProfile=!1,this.isLoading=!1,this.subscriptions=[],this.showMembersOn=-1,this.swTitle=null,this.notificationBadges[0]=0,this.notificationBadges[1]=0,this.subscriptions.push(this.publishService.subIsLoading.subscribe((function(e){c.isLoading=e}))),this.webSocketService.openWebSocket(),$(document).on("mouseenter","[sw-title]",(function(e){c.swTitle=$(e.target).attr("sw-title")||$(e.target).parents("[sw-title]:first").attr("sw-title");var t=e;$(document).on("mousemove",(function(e){t=e})),setTimeout((function(){$(document).off("mousemove");var e=$("#sw-title");0!==e.length&&e.css({left:t.pageX-e.width()/2+"px",top:t.pageY-40+"px"})}),500)})),$(document).on("mouseleave","[sw-title]",(function(e){c.swTitle=null,$("#sw-title").css({left:"-1000px",top:"-1000px"})}))}return e.prototype.ngOnInit=function(){this.currentUser=this.authService.getCurrentUser(),this.currentUser.company=null,this.currentUser.department=null,this.currentUser.position=null},e.prototype.ngOnDestroy=function(){for(var e=0,t=this.subscriptions;e<t.length;e++){t[e].unsubscribe()}this.webSocketService.closeWebSocket()},Object.defineProperty(e.prototype,"currentMenu",{get:function(){return this._currentMenu},set:function(e){this._currentMenu=e,"communityList"===this.currentMenu&&this.reorderCommunities(null)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"managerCommunityOnly",{get:function(){return this._managerCommunityOnly},set:function(e){this._managerCommunityOnly=e,this.reorderCommunities(null)},enumerable:!0,configurable:!0}),e.prototype.checkIfCommunityChanged=function(){if(this.communityChanged=!this.orgCompany||this.orgCompany.name!==this.newCompany.name||this.orgCompany.domainId!==this.newCompany.domainId,!this.communityChanged&&(this.orgCompany.managers||this.newCompany.managers))if(this.orgCompany.managers&&this.orgCompany.managers&&this.orgCompany.managers.length===this.newCompany.managers.length){for(var e=0;e<this.newCompany.managers.length;e++)if(this.orgCompany.managers[e].id!==this.newCompany.managers[e].id)return void(this.communityChanged=!0)}else this.communityChanged=!0},e.prototype.belatedSearchRequest=function(e){var t=this;this.myCommunities=this.searchMemberCommunities=null,setTimeout((function(e){e===t.searchKey&&t.apiService.searchMyCompanys(t.searchKey,t.orderBy.id,t.managerCommunityOnly).then((function(e){e&&!0===e.status?t.searchKey&&e.result?(t.myCommunities=e.result.filter((function(e){return!e.searchedMembers||0===e.searchedMembers.length})),t.searchMemberCommunities=e.result.filter((function(e){return e.searchedMembers&&e.searchedMembers.length>0}))):e.result&&e.result.length>0?t.myCommunities=e.result:t.router.navigate(["/login"]):t.router.navigate(["/login"])}))}),e?500:0,e)},e.prototype.reorderCommunities=function(e){e&&(this.orderBy=e),this.belatedSearchRequest(this.searchKey)},e.prototype.clickOnCreateCommunity=function(e){return this.newCompany=new A,this.newCompany.managers=[this.currentUser],this.departmentTree=this.newCompany,this.departmentTree.children=[],this.positionList=[],this.communityNameError=this.domainIdError=this.duplicatedDomainIdError=!1,this.currentMenu="createCommunity",!1},e.prototype.clickOnSetCommunity=function(e,t){var i=this;return e.stopPropagation(),this.orgCompany=t,this.newCompany=JSON.parse(JSON.stringify(t)),this.communityName=this.newCompany.name,this.domainId=this.newCompany.domainId,this.departmentTree=this.newCompany,this.departmentTree.children=[],this.positionList=[],this.communityNameError=this.domainIdError=this.duplicatedDomainIdError=!1,this.communityChanged=!1,this.apiService.getCompanyDepartmentTree(this.newCompany.id).then((function(e){e&&!0===e.status&&e.result&&(i.departmentTree=e.result)})),this.apiService.getCompanyPositions(this.newCompany.id).then((function(e){e&&!0===e.status&&e.result&&(i.positionList=e.result)})),this.currentMenu="setCommunity",!1},e.prototype.gotoCommunity=function(e){this.router.navigate([e.id])},e.prototype.cancel=function(e){return this.newCompany=null,this.currentMenu="communityList",!1},e.prototype.setCommunity=function(e){var t=this;if(!this.domainIdError&&!this.duplicatedDomainIdError){if(this.newCompany.name)return this.apiService.setCompany(this.newCompany,this.doOrganizationSetting?this.departmentTree:null,this.doOrganizationSetting?this.positionList:null).then((function(e){e&&!0===e.status&&(t.toastService.add("info",t.translate.instant("community.text.successfully-"+("createCommunity"===t.currentMenu?"create":"set")+"-community",{community:t.newCompany.name})),t.newCompany=null,t.currentMenu="communityList")})),!1;this.communityNameError=!0}},e.prototype.removeCommunity=function(e){var t=this;return this.confirmService.confirm(this.translate.instant("confirm.text.remove-community")).then((function(e){t.apiService.cleanupCompany(t.newCompany.id).then((function(e){e&&!0===e.status&&(t.toastService.add("info",t.translate.instant("community.text.successfully-remove-community",{community:t.newCompany.name})),t.newCompany=null,t.currentMenu="communityList")}))}),(function(e){})),!1},e.prototype.addNewDepartment=function(e){var t=this;this.isNewDepartment=!1,setTimeout((function(){t.isNewDepartment=!0}))},e.prototype.addNewPosition=function(e){var t=this;this.isNewPosition=!1,setTimeout((function(){t.isNewPosition=!0}))},e.prototype.onManagersChanged=function(e){this.newCompany.managers=e,this.checkIfCommunityChanged()},e.prototype.onMembersChanged=function(e){if(this.newCompany.users=e,this.newCompany.users&&this.newCompany.managers)for(var t=0;t<this.newCompany.users.length;t++)for(var i=this.newCompany.users[t],n=0,s=this.newCompany.managers;n<s.length;n++){var o=s[n];if(i.id===o.id){this.newCompany.users.splice(t,1),t--;break}}},e.prototype.communityNameChanged=function(e){this.checkIfCommunityChanged()},e.prototype.keyupOnSearchKey=function(e){this.reorderCommunities(null)},e.prototype.keyupOnDomainId=function(e){var t=this;this.domainIdError=!1,this.duplicatedDomainIdError=!1,this.checkIfCommunityChanged(),this.newCompany.domainId&&(this.domainIdError=!this.utilService.isValidDomainId(this.newCompany.domainId),this.domainIdError||this.apiService.checkDomainIdRegistered(this.newCompany.domainId).then((function(e){e&&!0===e.status&&(t.duplicatedDomainIdError=e.result)})))},e.prototype.toggleDoOrganizationSetting=function(e){var t=this;this.doOrganizationSetting=!this.doOrganizationSetting,this.doOrganizationSetting&&(this.departmentTree=this.newCompany,this.departmentTree.children=[],this.positionList=[],this.isNewDepartment=this.isNewPosition=!1,"setCommunity"===this.currentMenu&&(this.apiService.getCompanyDepartmentTree(this.newCompany.id).then((function(e){e&&!0===e.status&&e.result&&(t.departmentTree=e.result)})),this.apiService.getCompanyPositions(this.newCompany.id).then((function(e){e&&!0===e.status&&e.result&&(t.positionList=e.result)}))))},e.prototype.copyUrlToClipboard=function(e,t){e.stopPropagation();var i=$("<input>");$("body").append(i),i.val(this.smartworksUrl+t.domainId).select(),document.execCommand("copy"),i.remove(),this.toastService.add("info",this.translate.instant("community.text.copy-domain-to-clipboard"))},e.prototype.openUserProfile=function(e){$(e.target||e.srcElement).parents(".my-avatar:first").focus(),this.popupUserProfile=!0},e.prototype.focusoutOnUserProfile=function(e){var t=this;e.relatedTarget&&(jQuery.contains(e.target,e.relatedTarget)||jQuery.contains(e.relatedTarget,e.target))||setTimeout((function(){t.popupUserProfile=!1}),100)},e.prototype.showMembers=function(e,t){return e.stopPropagation(),this.showMembersOn=this.showMembersOn===t?-1:t,!1},e.prototype.focusoutOnShowMembers=function(e){var t=this;e.relatedTarget&&(jQuery.contains(e.target,e.relatedTarget)||jQuery.contains(e.relatedTarget,e.target))||setTimeout((function(){t.showMembersOn=-1}),100)},e.prototype.gotoPage=function(e){var t=this;return setTimeout((function(i){t.router.navigate([e])}),300),!1},e.decorators=[{type:t.Component,args:[{selector:"sw-community",template:'<div class="header"> <a (click)="gotoPage(\'/welcome\')" class="img-product-logo"></a> <ul class="notifications"> <li [ngClass]="{\'has-badge\': notificationBadges[1]>0, \'on\': showAlarm}"> <i class="icon-h-alarm" (click)="showAlarm = !showAlarm"></i> <span *ngIf="notificationBadges[1]" class="badge">{{notificationBadges[1]}}</span> </li> </ul> <div class="my-avatar" tabindex="-1" [ngClass]="{\'on\': popupUserProfile}" (focusout)="focusoutOnUserProfile($event)" (click)="openUserProfile($event)"> <sw-avatar [selectedUser]="currentUser" [size]="36"></sw-avatar> <sw-user-profile *ngIf="popupUserProfile"></sw-user-profile> </div> </div> <div class="scroll-body"> <div *ngIf="!currentMenu || currentMenu === \'communityList\'" class="body list"> <div class="body-header"> <span>{{\'community.text.joined-community-list\' | translate : {user: currentUser.name} }}</span> <a class="btn-android" (click)="clickOnCreateCommunity($event)">{{\'community.button.create\' | translate}}</a> </div> <div class="list-search"> <input type="text" autocomplete="off" [(ngModel)]="searchKey" (keyup)="keyupOnSearchKey($event)" placeholder="{{\'community.text.search-list\' | translate}}"/> </div> <div *ngIf="!searchKey" class="list-header"> <sw-select-box [selectedObject]="orderBy" (selectedObjectChange)="reorderCommunities($event)" [selectObjects]="communityOrders"></sw-select-box>     <span class="list-option"> <sw-check-box [(model)]="managerCommunityOnly"></sw-check-box> <span>{{\'community.text.manager-community-only\' | translate}}</span> </span> </div> <ul *ngIf="myCommunities && myCommunities.length>0" class="community-list" [ngClass]="{\'search-header\': searchKey}"> <li *ngIf="searchKey" class="searched-group-title">{{\'community.text.searched-in-company\' | translate}}</li> <li *ngFor="let company of myCommunities index as i" class="community-item" (click)="gotoCommunity(company)"> <div *ngIf="searchKey && company.searchedMembers && company.searchedMembers.length > 0 && (i === 0 || !myCommunities[i-1].searchedMembers || myCommunities[i-1].searchedMembers.length === 0)" class="searched-group-title">{{\'community.text.searched-in-members\' | translate}}</div> <div class="community-title"> <span>{{company.name}}</span> <span *ngIf="company.notifications > 0"class="unreads">{{company.notifications}}</span>                     <span class="members" [ngClass]="{\'on\': showMembersOn}" (click)="showMembers($event, i)"> <span class="icon-header-avatar"></span> <span class="member-count">{{company.memberCount}}</span> <span *ngIf="company.guestCount>0" class="guest-count">({{\'common.text.guest-count\' | translate : {count: company.guestCount} }})</span> <span class="icon-select-list"></span> <sw-user-list *ngIf="showMembersOn === i" [company]="company" [amIManager]="company.amIManager" tabindex="-1" (focusout)="focusoutOnShowMembers($event)"></sw-user-list> </span> </div> <div class="community-domain"> <span>{{smartworksUrl + (company.domainId || (\'common.text.none\' | translate))}}</span> <span *ngIf="company.domainId" class="copy" (click)="copyUrlToClipboard($event, company)">copy</span> </div> <div class="my-name"> <sw-avatar [selectedUser]="company.currentUser" [size]="25"></sw-avatar> <span>{{company.currentUser.name}} {{company.currentUser.position ? company.currentUser.position.name : \'\'}}</span> <span *ngIf="company.amIManager" class="icon-settings" (click)="clickOnSetCommunity($event, company)" [attr.sw-title]="\'community.text.settings\' | translate"></span> </div> <div *ngIf="company.created && orderBy.id === \'orderByCreated\'" class="created"> <span>{{\'common.text.created-date\' | translate}}</span> <span>{{utilService.toDateTimeString(company.created.date)}}</span> </div> </li> </ul> <ul *ngIf="searchMemberCommunities && searchMemberCommunities.length>0" class="community-list search-header"> <li class="searched-group-title">{{\'community.text.searched-in-members\' | translate}}</li> <li *ngFor="let company of searchMemberCommunities index as i" class="community-item" (click)="gotoCommunity(company)"> <div class="community-title"> <span>{{company.name}}</span> <span *ngIf="company.notifications > 0"class="unreads">{{company.notifications}}</span>                     <span class="members"> <span class="icon-header-avatar"></span> <span class="member-count">{{company.memberCount}}</span> <span *ngIf="company.guestCount>0" class="guest-count">({{\'common.text.guest-count\' | translate : {count: company.guestCount} }})</span> <span class="icon-select-list"></span> </span> </div> <div class="community-domain"> <span>{{smartworksUrl + (company.domainId || (\'common.text.none\' | translate))}}</span> <span *ngIf="company.domainId" class="copy" (click)="copyUrlToClipboard($event, company)">copy</span> </div> <div class="my-name"> <sw-avatar [selectedUser]="company.currentUser" [size]="25"></sw-avatar> <span>{{company.currentUser.name}} {{company.currentUser.position ? company.currentUser.position.name : \'\'}}</span> <span *ngIf="company.amIManager" class="icon-settings" (click)="clickOnSetCommunity($event, company)" [attr.sw-title]="\'community.text.settings\' | translate"></span> </div> <div *ngIf="company.created && orderBy.id === \'orderByCreated\'" class="created"> <span>{{\'common.text.created-date\' | translate}}</span> <span>{{utilService.toDateTimeString(company.created.date)}}</span> </div> <div *ngIf="searchKey && company.searchedMembers && company.searchedMembers.length > 0" class="searched-members"> <span>{{\'common.text.participant\' | translate}}</span> <ul class="searched-member-list"> <li *ngFor="let user of company.searchedMembers index as i" class="member"> <span *ngIf="utilService.getSearchedNameTokens(searchKey, user.name) as nameTokens" class="text-ellipsis"> <span>{{nameTokens[0]}}</span><span class="highlight">{{nameTokens[1]}}</span><span>{{nameTokens[2]}} {{user.position ? user.position.name : \'\'}}</span><span *ngIf="i < company.searchedMembers.length-1">, </span> </span> </li> </ul> </div> </li> </ul> </div> <div *ngIf="currentMenu === \'createCommunity\'" class="body create"> <div class="body-header"> <span>{{\'community.text.new-community\' | translate}}</span> </div> <table> <tr> <td class="label">{{\'join.text.community-name\' | translate}}</td> <td class="value"> <div *ngIf="communityNameError" class="help-block"> <i class="icon-field-error"></i> <div>{{\'join.error.community-field-required\' | translate}}</div> </div> <input type="text" autocomplete="off" [(ngModel)]="newCompany.name" placeholder="{{\'community.text.input-community-name\' | translate}}"> </td> </tr> <tr class="domain-name"> <td class="label">{{\'community.text.domain-name\' | translate}}</td> <td class="value"> <div *ngIf="domainIdError || duplicatedDomainIdError" class="help-block"> <i class="icon-field-error"></i> <div *ngIf="domainIdError">{{\'community.error.invalid-domain-id\' | translate}}</div> <div *ngIf="duplicatedDomainIdError">{{\'community.error.duplicated-domain-id\' | translate}}</div> </div> <span>{{smartworksUrl}}</span><input type="text" autocomplete="off" [(ngModel)]="newCompany.domainId" placeholder="{{\'community.text.input-domain-id\' | translate}}" (keyup)="keyupOnDomainId($event)"> </td> </tr> <tr> <td class="label">{{\'community.text.manager\' | translate}}</td> <td class="value"> <sw-auto-user name="managers" [appendMode]="true" [type]="\'email\'" [currentUser]="null" [smallSize]="true" [multiple]="true" [userOnly]="false" [noSearchUser]="true" [selectedUsers]="[currentUser]" (selectedUsersChange)="onManagersChanged($event)"></sw-auto-user> </td> </tr> <tr> <td class="label">{{\'common.text.member\' | translate}}</td> <td class="value"> <sw-auto-user name="members" [appendMode]="true" [type]="\'email\'" [currentUser]="null" [smallSize]="true" [multiple]="true" [userOnly]="false" [noSearchUser]="true" [selectedUsers]="[]" (selectedUsersChange)="onMembersChanged($event)"></sw-auto-user> </td> </tr> <tr class="do-organization-setting"> <td class="label">{{\'community.text.organization-setting\' | translate}}<span class="btn-question-mark"></span></td> <td class="value"> <span class="radio-button" (click)="toggleDoOrganizationSetting($event)"><span [ngClass]="{\'on\': !doOrganizationSetting}"></span></span><span>{{\'community.text.do-it-later\' | translate}}</span> <span class="radio-button" (click)="toggleDoOrganizationSetting($event)"><span [ngClass]="{\'on\': doOrganizationSetting}"></span></span><span>{{\'community.text.do-it-now\' | translate}}</span> </td> </tr> </table> <div *ngIf="doOrganizationSetting" class="organization"> <div class="left-side"> <button class="btn-android" (click)="addNewDepartment($event)">{{\'common.button.add-department\' | translate}}</button> <div> <sw-tree-department (selectedDepartmentChange)="selectedDepartment=$event" [move]="true" [edit]="true" [addNewDepartment]="isNewDepartment" [(departmentTree)]="departmentTree"></sw-tree-department>             </div> </div> <div class="right-side"> <button class="btn-android" (click)="addNewPosition($event)">{{\'common.button.add-position\' | translate}}</button> <div> <sw-list-position (selectedPositionChange)="selectedPosition=$event" [(positionList)]="positionList" [edit]="true" [select]="true" [addNewPosition]="isNewPosition"></sw-list-position> </div> </div> </div> <div class="border-bottom"></div> <div class="button-group"> <div class="btn-android ink" (click)="cancel($event)">{{\'common.button.cancel\' | translate}}</div> <div class="btn-android" (click)="setCommunity($event)">{{\'common.button.create\' | translate}}</div> </div> </div> <div *ngIf="currentMenu === \'setCommunity\'" class="body set"> <div class="body-header"> <div>{{communityName}}</div> <div> <span class="community-domain">{{smartworksUrl + (domainId || (\'common.text.none\' | translate))}}</span> <span class="members"> <span class="icon-header-avatar"></span> <span class="member-count">{{newCompany.memberCount}}</span> <span *ngIf="newCompany.guestCount>0" class="guest-count">({{\'common.text.guest-count\' | translate : {count: newCompany.guestCount} }})</span> <span class="icon-select-list"></span> </span> </div> </div> <table> <tr> <td class="label">{{\'join.text.community-name\' | translate}}</td> <td class="value"> <div *ngIf="communityNameError" class="help-block"> <i class="icon-field-error"></i> <div>{{\'join.error.community-field-required\' | translate}}</div> </div> <input type="text" autocomplete="off" [(ngModel)]="newCompany.name" (change)="communityNameChanged($event)" placeholder="{{\'community.text.input-community-name\' | translate}}"> </td> </tr> <tr class="domain-name"> <td class="label">{{\'community.text.domain-name\' | translate}}</td> <td class="value"> <div *ngIf="domainIdError || duplicatedDomainIdError" class="help-block"> <i class="icon-field-error"></i> <div *ngIf="domainIdError">{{\'community.error.invalid-domain-id\' | translate}}</div> <div *ngIf="duplicatedDomainIdError">{{\'community.error.duplicated-domain-id\' | translate}}</div> </div> <span>{{smartworksUrl}}</span><input type="text" autocomplete="off" [(ngModel)]="newCompany.domainId" placeholder="{{\'community.text.input-domain-id\' | translate}}" (keyup)="keyupOnDomainId($event)"> </td> </tr> <tr> <td class="label">{{\'community.text.manager\' | translate}}</td> <td class="value"> <sw-auto-user name="managers" [appendMode]="true" [smallSize]="true" [multiple]="true" [userOnly]="false" [noSearchUser]="true" [selectedUsers]="[currentUser]" (selectedUsersChange)="onManagersChanged($event)"></sw-auto-user> </td> </tr> </table> <div class="border-bottom"></div> <div class="btn-android" (click)="removeCommunity($event)">{{\'community.button.remove-community\' | translate}}</div> <div class="button-group"> <div class="btn-android ink" (click)="cancel($event)">{{\'common.button.cancel\' | translate}}</div> <div *ngIf="communityChanged" class="btn-android" (click)="setCommunity($event)">{{\'common.button.save-changes\' | translate}}</div> </div> </div> </div> <span class="btn-help-talk"> <i class="icon-help-talk"></i> </span> <div class="footer"> <span>Copyrightⓒ SmartWorks.net, Inc. & AIROV Tech. All Rights Reserved.</span> <span class="logos"> <i class="logo-smartworksnet-inc"></i> <i class="logo-airov-inc"></i> </span> </div> <div *ngIf="isLoading === true" [ngClass]="{\'loading\': isLoading === true}"></div> <div *ngIf="swTitle" id="sw-title"> <span class="content">{{swTitle}}</span> <span class="pointer"></span> </div>',styles:[".header { position: absolute; top: 0; left: 0; right: 0; padding: 20px 25px; background-color: #ffffff; } .header .notifications { float: right; margin-right: 25px; margin-top: -7px; } .header .notifications > li { width: 28px; height: 28px; display: inline-block; margin-right: 20px; border: 1px solid #fff; border-radius: 5px; text-align: center; } .header .notifications > li.on { border: solid 1px #656d74; background-color: #eeeeee; } .header .notifications > li.has-badge { cursor: pointer; } .header .notifications .badge { display: inline-block; font-size: 10px; font-weight: bold; color: #ffffff; background-color: #eb5652; border-radius: 20px; padding: 0 3px; min-width: 10px; text-align: center;     bottom: 10px; margin-left: -7px; } .header .my-avatar { position: absolute; top: 0; right: 0; margin: 9px; width: 36px; height: 36px; outline: none; cursor: pointer; } .header .my-avatar:hover, .header .my-avatar.on { width: 38px; height: 38px; border: 1px solid #5fa5fc; border-radius: 50%; top: -1px; right: -3px; } .scroll-body { position: absolute; margin-top: 73px; top: 0; bottom: 42px; left: 0; right: 0; overflow-y: auto; overflow-x: hidden; } .body { padding-top: 47px; background-color: #ffffff; width: 780px; margin: auto; } .body.list .body-header { font-size: 23px; margin-bottom: 18px; } .body.list .body-header > a { float: right; font-size: 15px; color: #3481cf; background-color: #fff; border: 1px solid #3481cf; border-radius: 5px; padding: 5.5px 21px; } .body .list-search { background-color: #f1f3f4; border-radius: 20px; padding: 5px 20px; margin-bottom: 15px; } .body .list-search input { font-size: 12px; border: none; width: 100%; vertical-align: middle; outline: none; margin-top: -7px; margin-left: -7px; background-color: #f1f3f4; } .body .list-header { font-size: 11px; color: #666464;\t } .body .list-header .list-option { float: right; margin-top: -2px; } .body .list-header .list-option sw-check-box { font-size: 15px; } .body .list-header .list-option > span { margin-left: 7px; margin-top: 2px; display: inline-block; vertical-align: top; } .body .community-list { border: 1px solid #d8d9db; margin-top: 5px; max-height: calc(100% - 130px); overflow-y: auto; overflow-x: hidden; } .body .community-list.search-header { margin-top: 37px; } .body .community-list .searched-group-title { font-size: 11px; color: #666464; margin-top: -25px; position: absolute; } .body .community-list .community-item { padding: 15px; border-bottom: 1px solid #d8d9db; } .body .community-list .community-item:last-of-type { border-bottom: none; } .body .community-list .community-item:hover { cursor: pointer; background-color: #f7f5f5;  } .body .community-list .community-item > div { margin-bottom: 5px; } .body .community-list .community-item > div:last-of-type { margin-bottom: 0; } .body .community-list .community-item .community-title { font-size: 18px; font-weight: bold; color: #222; } .body .community-list .community-item .community-title .members, .body.set .body-header .members { float: right; font-size: 11px; color: #666464; font-weight: normal; margin-right: -10px; } .body.set .body-header .members { margin-top: 11px; margin-right: 0; } .body.set .body-header .members.on { color: #3481cf; } .body .community-list .community-item .community-title .members .member-count, .body .community-list .community-item .community-title .members .guest-count, .body.set .body-header .members .member-count, .body.set .body-header .members .guest-count { margin-top: -1px; display: inline-block; vertical-align: top; } .body .community-list .community-item .community-title .members .member-count, .body.set .body-header .members .member-count { margin-left: 6px; } .body .community-list .community-item .community-domain, .body.set .body-header .community-domain { font-size: 15px; color: #222; font-weight: normal; } .body .community-list .community-item .community-domain .copy { border-radius: 5px; background-color: #111b25; font-size: 11px; color: #fff; display: inline-block; text-align: center; margin-left: 5px; padding: 0px 5px; cursor: pointer; } .body .community-list .community-item .my-name { height: 27px; } .body .community-list .community-item .my-name > span { font-size: 13px; display: inline-block; vertical-align: top; margin: 4px 5px; } .body .community-list .community-item .my-name > .icon-settings { float: right; } .body .community-list .community-item .created { font-size: 13px; } .body .community-list .community-item .created > span:first-of-type { color: #666464; } .body .community-list .community-item .created > span:last-of-type { color: #222; margin-left: 13px; } .body .community-list .community-item .searched-members { font-size: 13px; } .body .community-list .community-item .searched-members .member { display: inline-block; margin-left: 5px; } .body .community-list .community-item .searched-members span, .body .community-list .community-item .searched-members ul { display: inline-block; vertical-align: top; } .body .community-list .community-item .searched-members ul { margin-left: 10px; } .body .community-list .community-item .searched-members span.highlight { background-color: #91b7de; } .body.create .body-header, .body.set .body-header { font-size: 20px; color: #222; font-weight: bold; border-bottom: 2px solid #b4b5b5; } .body.create .body-header { padding-bottom: 5px; } .body.set .body-header { } .body table { font-size: 13px; color: #666464; width: 100%; } .body table td { border-bottom: 1px solid #e6e7e8; padding: 8px 0; } .body table tr td:first-of-type { width: 20%; } .body table .help-block { text-align: left; line-height: 18px; } .body table .help-block > i { margin-bottom: -1.7px } .body table .help-block > div { display: inline-block; font-size: 11px; color: #da6058; margin-left: 5px; } .body table tr td input { padding: 4px 0; width: calc(100% - 2px); border: 1px solid #e6e7e8; } .body table .domain-name input { width: 185px!important; margin-left: 10px; } .body.create .do-organization-setting .value .radio-button { width: 17px; height: 17px; display: inline-block; vertical-align: top; border: 1px solid #b4b5b5; border-radius: 50%; text-align: center; background-color: #fff; margin-top: 1px; margin-right: 5px; } .body.create .do-organization-setting .value .radio-button .on { width: 8px; height: 8px; margin-top: calc(50% - 4px); display: inline-block; vertical-align: top; border-radius: 50%; background-color: #3481cf; } .body.create .do-organization-setting .value > span:nth-of-type(2) { margin-right: 10px; } .body .organization { margin-top: 10px; height: 450px; } .body .organization .left-side, .body .organization .right-side { display: inline-block; vertical-align: top; width: calc(50% - 12px); height: 100%; overflow: hidden; } .body .organization .left-side > button, .body .organization .right-side > button { width: 95px; padding: 4px 0;  font-size: 13px; border-radius: 3px; font-size: 13px; border: solid 1px #3481cf; background-color: #eaeff4; color: #3481cf; margin-bottom: 5px; } .body .organization .left-side { text-align: left; margin-right: 10px; } .body .organization .right-side { text-align: right; margin-left: 10px; } .body .organization .left-side > div, .body .organization .right-side > div { height: calc(100% - 40px); border: solid 1px #e6e7e8; text-align: left; } .body .border-bottom { border-bottom: 2px solid #b4b5b5; margin: 15px 0; } .body > .btn-android { float: left; border-radius: 3px; border: solid 1px #e37169; background-color: #f8ecea; color: #e37169; } .body .button-group { float: right; } .body .button-group > div { display: inline-block; } .footer { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 24px; text-align: center; font-size: 12px; color: #9fa5b1; } .footer > .logos { position: absolute; right: 24px; bottom: 12px;    } .footer > .logos > i { margin-left: 25px; vertical-align: bottom; } .btn-help-talk {   position: absolute; right: 20px; bottom: 70px; width: 57px; border-radius: 50%; box-shadow: 0px 2px 4px 0 rgba(0, 0, 0, 0.24); background-color: #3481cf; display: inline-block; padding: 14px 0; cursor: pointer; text-align: center; } .btn-help-talk > .icon-help-talk { vertical-align: top; }"]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:m.Router},{type:a.TranslateService},{type:O},{type:T},{type:y},{type:U},{type:x},{type:ce},{type:V}]},e}(),Te=function(){function e(){}return e.prototype.ngOnInit=function(){},e.decorators=[{type:t.Component,args:[{selector:"sw-home",template:"<p> home works! </p> ",styles:[""]}]},{type:t.NgModule}],e.ctorParameters=function(){return[]},e}(),De=function(){function e(){}return e.prototype.ngOnInit=function(){},e.decorators=[{type:t.Component,args:[{selector:"sw-schedule",template:"<p> schedule works! </p> ",styles:[""]}]},{type:t.NgModule}],e.ctorParameters=function(){return[]},e}(),Pe=function(){function e(e,t){var i=this;this.translate=e,this.publishService=t,this.settingsMenus=[],this.subscriptions=[],this.subscriptions.push(this.publishService.changeNotice.subscribe((function(e){if(e&&e.source&&"workspace"===e.source){if(e.targetId&&i.settingsMenus)for(var t=0;t<i.settingsMenus.length;t++)e.targetId===i.settingsMenus[t].id&&(i.selectedMenu=i.settingsMenus[t]);i.refresh()}})))}return e.prototype.ngOnInit=function(){},e.prototype.ngOnDestroy=function(){for(var e=0,t=this.subscriptions;e<t.length;e++){t[e].unsubscribe()}},e.prototype.setNavFocused=function(){setTimeout((function(e){$("sw-settings .nav").attr("tabindex","-1").focus()}))},e.prototype.refresh=function(){var e=this.selectedMenu;this.selectedMenu=null,this.selectedMenu=e},e.prototype.selectMenu=function(e){e.spaceHolder||(this.selectedMenu=e,this.setNavFocused())},e.prototype.movePage=function(e){var t=-1;if(this.settingsMenus){for(var i=0;i<this.settingsMenus.length;i++)if(this.selectedMenu.id===this.settingsMenus[i].id){t=i;break}if(-1===t)return;if(1===e){for(i=t+1;i<this.settingsMenus.length;i++)if(!this.settingsMenus[i].spaceHolder)return void(this.selectedMenu=this.settingsMenus[i])}else if(-1===e)for(i=t-1;i>=0;i--)if(!this.settingsMenus[i].spaceHolder)return void(this.selectedMenu=this.settingsMenus[i])}},e.prototype.keyup=function(e){var t=e.which||e.keyCode;38===t?this.movePage(-1):40===t?this.movePage(1):37===t&&this.setParentNavFocused()},e.prototype.setParentNavFocused=function(){$("sw-layout #nav").attr("tabindex","-1").focus()},e.decorators=[{type:t.Component,args:[{selector:"sw-settings",template:'<ul *ngIf="selectedMenu && settingsMenus" class="nav" (keyup)="keyup($event)"> <li *ngFor="let menu of settingsMenus" [ngClass]="{\'on\': menu.id === selectedMenu.id, \'group-title\': menu.spaceHolder}" (click)="selectMenu(menu)"> <span>{{menu.name | translate}}</span> </li> </ul> <div *ngIf="selectedMenu" class="contents"> <app-settings [selectedMenu]="selectedMenu"></app-settings> </div>',styles:[".nav { position: absolute; top: 0; left: 0; bottom: 0; width: 230px; border-right: 1px solid #e6e7e8; background-color: #ffffff; overflow-y: auto; padding: 10px; font-size: 14px; color: #222; outline: none;  } .nav > li { padding: 6px 10px; font-size: 14px; border: solid 1px #fff; border-radius: 5px; cursor: pointer; color: #222; margin: 2px 0; } .nav > li:hover { border: solid 1px #d9d9d9; background-color: #f2f2f2; } .nav > li.on, .nav > li.on:hover  { font-weight: bold; border: solid 1px #d9d8da; background-color: #0e1b26; color: #fff; } .nav > li.group-title,  .nav > li.on.group-title,  .nav > li.group-title:hover .nav > li.on.group-title:hover { font-size: 11px; background-color: #fff; color: #999999; padding: 6px 5px; border: none; cursor: default; } .contents { position: absolute; right: 0; left: 251px; bottom: 0; top: 0; padding: 20px 50px; overflow-y: auto; } "]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:a.TranslateService},{type:x}]},e.propDecorators={settingsMenus:[{type:t.Input}],selectedMenu:[{type:t.Input}]},e}(),Oe=function(){function e(e,t,i,n,s,o){this.translate=e,this.apiService=t,this.utilService=i,this.toastService=n,this.confirmService=s,this.authService=o,this.currentUser=this.authService.getCurrentUser(),this.selectedUser=null,this.refreshSearchUser=!1}return e.prototype.ngOnInit=function(){},e.prototype.setSelectedUser=function(e){this.selectedUser=e,this.newUser=null,e&&(this.newUser=JSON.parse(JSON.stringify(e)))},e.prototype.removeSelectedUser=function(e){if(this.selectedUsers&&e){for(var t=0;t<this.selectedUsers.length;t++)if(e.id===this.selectedUsers[t].id){this.selectedUsers.splice(t,1);break}return this.resizeUserListHeight(),!1}},Object.defineProperty(e.prototype,"selectedUsers",{get:function(){return this._selectedUsers},set:function(e){this._selectedUsers=e,this.resizeUserListHeight()},enumerable:!0,configurable:!0}),e.prototype.setUser=function(e){var t=this;this.apiService.updateUser(this.newUser).then((function(e){!0===e.status&&(t.refreshSearchUser=!0)}))},e.prototype.deleteUser=function(e){var t=this;return!(!this.selectedUser||!this.selectedUsers)&&(this.confirmService.confirm(this.translate.instant("confirm.text.remove-selected-guests"),!0,e).then((function(e){for(var i=JSON.parse(JSON.stringify(t.selectedUsers)),n=0;n<i.length;n++)if(t.selectedUser.id===i[n].id){i.splice(n,1);break}t.apiService.removeUsersFromCompany(t.currentUser.company.id,[t.selectedUser]).then((function(e){!0===e.status&&(t.selectedUser=null,t.newUser=null,t.selectedUsers=i,t.refreshSearchUser=!0,t.resizeUserListHeight())}))}),(function(e){})),!1)},e.prototype.deleteSelectedUsers=function(e){var t=this;this.selectedUsers&&this.confirmService.confirm(this.translate.instant("confirm.text.remove-selected-guests"),!0,e).then((function(e){t.apiService.removeUsersFromCompany(t.currentUser.company.id,t.selectedUsers).then((function(e){!0===e.status&&(t.selectedUser=null,t.newUser=null,t.selectedUsers=null,t.refreshSearchUser=!0,t.resizeUserListHeight())}))}),(function(e){}))},e.prototype.resizeUserListHeight=function(){setTimeout((function(){$("sw-guest-management .body .user-list").css({height:"calc(100% - "+$("sw-guest-management .body .selected-user-list").height()+"px)"})}),300)},e.decorators=[{type:t.Component,args:[{selector:"sw-guest-management",template:'<div class="header"> <span>{{\'settings.text.guest\' | translate}}</span> </div> <div class="body"> <div class="left-side"> <div *ngIf="selectedUsers && selectedUsers.length>0" class="selected-user-list"> <span *ngFor="let user of selectedUsers" class="user-item" [ngClass]="{\'on\': selectedUser && selectedUser.id === user.id}">{{user.name}} <a href="" class="icon-delete-item" (click)="removeSelectedUser(user)"></a> </span> </div> <div class="user-list"> <sw-search-user [(refresh)]="refreshSearchUser" [multiple]="true" [selectedMember]="selectedUser" (selectedMemberChange)="setSelectedUser($event)" [(selectedMembers)]="selectedUsers" [guestOnly]="true"></sw-search-user> </div> <div class="btn-group"> <span *ngIf="selectedUsers && selectedUsers.length>0" class="selected-count">{{selectedUsers.length}}{{\'common.text.total-users\' | translate}}</span> <button *ngIf="selectedUsers && selectedUsers.length>0" class="btn-android" (click)="deleteSelectedUsers($event)">{{\'common.button.delete-selected\' | translate}}</button> </div> </div> <div *ngIf="selectedUser" class="right-side"> <form class="user-detail" name="form" #f="ngForm" novalidate> <div class="profile"> <sw-avatar [selectedUser]="newUser" [size]="90"></sw-avatar> <div><span class="status">{{\'user.text.status-\' + newUser.status | translate}}</span></div> <div class="name">{{newUser.name}} <span class="guest">Guest</span></div> <div class="status-text">{{newUser.statusText || \'common.text.empty\' | translate}}</div> <i class="icon-status-text-pointer"></i> </div> <div> <label>{{\'common.text.contact\' | translate}}</label> <span class="value"><input name="contact" type="text" autocomplete="off" [ngModel]="newUser.contact" #contact="ngModel"></span> </div>         <div> <label>{{\'common.text.email\' | translate}}</label> <span class="value read-only">{{newUser.id}}</span> </div>         </form> <div class="btn-group"> <button *ngIf="(userChanged && newUser) || f.dirty"  class="btn-android save-changes" (click)="setUser($event)">{{\'common.button.save-changes\' | translate}}</button> <button *ngIf="newUser && selectedUser && newUser.id === selectedUser.id" class="btn-android delete-user" (click)="deleteUser($event)">{{\'common.button.delete-guest\' | translate}}</button> </div> </div> </div> ',styles:[".header { border-bottom: solid 2px #b6babd; padding: 20px 0; } .header > span { font-size: 20px; font-weight: bold; color: #0e1b26; display: inline-block; } .header .right-tabs { float: right; font-size: 15px; color: #222222; margin-top: 10px; display: inline-block; text-align: right; } .header .right-tabs li { display: inline-block; padding: 0px 20px; line-height: 17px; cursor: pointer; } .header .right-tabs li:last-of-type { border-left: solid 1px #222; padding-right: 0px; } .header .right-tabs li.on { font-weight: bold; color: #3481cf } .body { margin-top: 20px; height: calc(100% - 94px); } .body > div { display: inline-block; vertical-align: top; height: calc(100% - 46px); border : 1px solid #e6e7e8; } .body .left-side { width: 40%; } .body .left-side .selected-user-list { padding: 4px 9px; margin-bottom: -5px; } .body .left-side .selected-user-list .user-item { border-radius: 5px; background-color: #e5e6e6; margin-right: 5px; display: inline-block; padding: 0 7px; margin-bottom: 0; font-size: 13px; } .body .left-side .selected-user-list .user-item:hover { background-color: #d3d6da; } .body .left-side .selected-user-list .user-item .icon-delete-item { margin-left: 2px; } .body .left-side .user-list { height: 100%; } .body .btn-group { float: right; margin-top: 10px; } .body .btn-group button { width: 95px; padding: 4px 0;  font-size: 13px; border-radius: 3px; font-size: 13px; margin-left: 10px; } .body .left-side .btn-group button { border: solid 1px #3481cf; background-color: #eaeff4; color: #3481cf; } .body .left-side .btn-group button:hover { background-color: #d1e0ee; } .body .left-side .btn-group .selected-count { font-size: 12px; color: #666464; } .body .right-side { width: calc(60% - 4px); border : 1px solid #e6e7e8; border-left: none; } .body .right-side .user-detail { text-align: left; padding: 24px; height: calc(100% - 48px); font-size: 13px; color: #222; } .body .right-side .user-detail > div { padding: 8px 15px; border-bottom: solid 1px #e6e7e8; } .body .right-side .user-detail .profile { padding: 10px 0; text-align: center; border-bottom: none; } .body .right-side .user-detail .profile > div { margin: 5px; } .body .right-side .user-detail .profile .status { border-radius: 5px; background-color: #a0a0a0; font-size: 12px; color: #fff; padding: 2px 8px; } .body .right-side .user-detail .profile > .name { font-size: 18px; font-weight: bold; } .body .right-side .user-detail .profile > .name > .guest { font-size: 15px; font-weight: normal; margin-left: 5px; } .body .right-side .user-detail .profile > .status-text { font-size: 12px; border-radius: 5px; border: solid 1px #c5c5c5; display: inline-block; width: calc(100% - 12px); padding: 5px; margin: 5px 0; } .body .right-side .user-detail label { color: #666464; width: 30%; display: inline-block; vertical-align: top; margin-top: 6px; } .body .right-side .user-detail .value { display: inline-block; vertical-align: top; } .body .right-side .user-detail span.value.read-only { padding: 5px 7px; width: calc(70% - 16px); } .body .right-side .user-detail span.value { padding: 4px 0; width: calc(70% - 2px); border: solid 1px #e4e4e4; } .body .right-side .user-detail span.value > input { width: calc(100% - 2px); border: none; } .body .right-side .user-detail .value.no-padding { padding: 0; width: 70%; } .body .right-side .user-detail sw-select-box.value { border: solid 1px #e4e4e4; width: auto; max-width: calc(70% - 16px); padding-right: 0; } .body .right-side .user-detail > div:first-of-type, .body .right-side .user-detail > div:last-of-type { border-bottom: solid 2px #b6babd; } .body .right-side .btn-group button.delete-user { border: solid 1px #f46864; background-color: #fbebea; color: #f46864; } .body .right-side .btn-group button.delete-user:hover { background-color: #f4c4c2; } .body .right-side .btn-group button.save-changes { border: solid 1px #a3adb5; background-color: #edecec; color: #0e1b26; } .body .right-side .btn-group button.save-changes:hover { background-color: #dedbdb; } "]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:a.TranslateService},{type:U},{type:O},{type:y},{type:V},{type:T}]},e}(),Me=function(){function e(e,t,i,n,s){var o=this;this.translate=e,this.apiService=t,this.authService=i,this.publishService=n,this.toastService=s,this.currentUser=this.authService.getCurrentUser(),this.subscriptions=[],this.subscriptions.push(this.publishService.currentUserChange.subscribe((function(e){e&&(o.currentUser=e,o.refresh())})))}return e.prototype.ngOnInit=function(){this.generateInviteLink()},e.prototype.ngOnDestroy=function(){for(var e=0,t=this.subscriptions;e<t.length;e++){t[e].unsubscribe()}},e.prototype.refresh=function(){this.userLevel=this.userLevel},Object.defineProperty(e.prototype,"userLevel",{get:function(){return this._userLevel},set:function(e){this._userLevel=e,e&&this.generateInviteLink()},enumerable:!0,configurable:!0}),e.prototype.onEmailsChange=function(e){this.emails=e},e.prototype.onGuestEmailsChange=function(e){this.guestEmails=e},e.prototype.copyToClipboard=function(){if(this.inviteLink){var e=$("<input>");$("body").append(e),e.val(this.inviteLink).select(),document.execCommand("copy"),e.remove(),this.toastService.add("info",this.translate.instant("users.text.copy-to-clipboard"))}},e.prototype.copyGuestToClipboard=function(){if(this.inviteGuestLink){var e=$("<input>");$("body").append(e),e.val(this.inviteGuestLink).select(),document.execCommand("copy"),e.remove(),this.toastService.add("info",this.translate.instant("users.text.copy-to-clipboard"))}},e.prototype.generateInviteLink=function(){this.isAnnotation?this.userLevel&&(this.inviteLink=window.location.origin+"/join/"+this.currentUser.company.id+"/"+this.userLevel+"/"):(this.inviteLink=window.location.origin+"/join/"+this.currentUser.company.id+"/user/"+(this.selectedDepartment?this.selectedDepartment.id:"noDepartment"),this.inviteGuestLink=window.location.origin+"/join/"+this.currentUser.company.id+"/guest/noDepartment")},e.prototype.requestInviteJoin=function(){for(var e=this,t="",i=0;i<this.emails.length;i++)t=t+(0===i?"":";")+this.emails[i].id;return this.apiService.requestEmailInviteJoin(this.currentUser,t,this.inviteLink).then((function(t){t&&t.status&&(e.toastService.add("info",e.translate.instant("users.text.successfully-join-requested")),e.emails=null)})),!1},e.prototype.requestInviteGuestJoin=function(){for(var e=this,t="",i=0;i<this.guestEmails.length;i++)t=t+(0===i?"":";")+this.guestEmails[i].id;return this.apiService.requestEmailInviteJoin(this.currentUser,t,this.inviteGuestLink).then((function(t){t&&t.status&&(e.toastService.add("info",e.translate.instant("users.text.successfully-join-requested")),e.guestEmails=null)})),!1},Object.defineProperty(e.prototype,"selectedDepartment",{get:function(){return this._selectedDepartment},set:function(e){this._selectedDepartment=e,this.generateInviteLink()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"specifyDepartment",{get:function(){return this._specifyDepartment},set:function(e){this._specifyDepartment=e,this.specifyDepartment||(this.selectedDepartment=null),this.generateInviteLink()},enumerable:!0,configurable:!0}),e.decorators=[{type:t.Component,args:[{selector:"sw-invite-users",template:'<div class="header"> <span>{{\'settings.text.invite-users\' | translate}}</span> <div *ngIf="isAnnotation" class="select-group"> <span class="select-item" [ngClass]="{\'on\': userLevel === \'labeling\'}"> <input type="radio" name="userLevel" required [(ngModel)]="userLevel" [value]="\'labeling\'"/><span class="text">{{\'user.text.level-labeling\' | translate}}</span> </span> <span class="select-item" [ngClass]="{\'on\': userLevel === \'qa\'}"> <input type="radio" name="userLevel" required [(ngModel)]="userLevel" [value]="\'qa\'"/><span class="text">{{\'user.text.level-qa\' | translate}}</span> </span> <span class="select-item" [ngClass]="{\'on\': userLevel === \'admin\'}"> <input type="radio" name="userLevel" required [(ngModel)]="userLevel" [value]="\'admin\'"/><span class="text">{{\'user.text.level-admin\' | translate}}</span> </span> </div> <div *ngIf="!isAnnotation" class="select-group"> <sw-check-box [(model)]="specifyDepartment" [label]="\'user.text.specify-department\' | translate"></sw-check-box> <sw-select-department *ngIf="specifyDepartment" [(selectedDepartment)]="selectedDepartment"></sw-select-department> </div> </div> <div class="body"> <div class="link"> <label>{{\'users.text.invite-url\' | translate}}</label> <input type="text" autocomplete="off" id="userInviteUrl" class="value" [ngModel]="inviteLink" (click)="copyToClipboard()" disabled> <button class="btn-android" [ngClass]="{\'disabled\': !inviteLink || (isAnnotation && !userLevel)}" (click)="copyToClipboard()">{{\'users.button.link-to-clipboard\' | translate}}</button> </div> <div class="email"> <label>{{\'users.text.invite-email\' | translate}}</label> <sw-auto-user class="value" [selectedUsers]="emails" [type]="\'email\'" [multiple]="true" (selectedUsersChange)="onEmailsChange($event)"></sw-auto-user> <button class="btn-android" [ngClass]="{\'disabled\': !emails || emails.length === 0 || (isAnnotation && !userLevel)}" (click)="requestInviteJoin()">{{\'users.button.email-invite\' | translate}}</button> </div> </div> <div *ngIf="!isAnnotation" class="header"> <span>{{\'settings.text.invite-guests\' | translate}}</span> </div> <div *ngIf="!isAnnotation" class="body"> <div class="link"> <label>{{\'users.text.invite-url\' | translate}}</label> <input type="text" autocomplete="off" id="userInviteGuestUrl" class="value" [ngModel]="inviteGuestLink" (click)="copyGuestToClipboard()" disabled> <button class="btn-android" [ngClass]="{\'disabled\': !inviteGuestLink}" (click)="copyGuestToClipboard()">{{\'users.button.link-to-clipboard\' | translate}}</button> </div> <div class="email"> <label>{{\'users.text.invite-email\' | translate}}</label> <sw-auto-user class="value" [selectedUsers]="guestEmails" [type]="\'email\'" [multiple]="true" (selectedUsersChange)="onGuestEmailsChange($event)"></sw-auto-user> <button class="btn-android" [ngClass]="{\'disabled\': !guestEmails || guestEmails.length === 0}" (click)="requestInviteGuestJoin()">{{\'users.button.email-invite\' | translate}}</button> </div> </div> ',styles:[".header { border-bottom: solid 2px #b6babd; padding: 20px 0; } .header > span { font-size: 20px; font-weight: bold; color: #0e1b26; display: inline-block; } .header .select-group { display: inline-block; font-size: 13px; color: #666464; margin-left: 10px; margin-top: 5px; vertical-align: top; } .header .select-group > .select-item { margin-right: 10px; } .header .select-group > .select-item.on { font-weight: bold; color: #222; } .header .select-group > sw-check-box { margin-right: 10px; } .header .select-group > sw-select-department { vertical-align: top; display: inline-block; margin-top: -2px;\t } .body { margin-top: 20px; } .body > div { padding: 10px 0; } .body > div label { color: #666464; font-size: 13px; display: block; margin-bottom: 5px; } .body > div .value { width: calc(100% - 142px); display: inline-block; } .body > div input.value { font-size: 15px; color: #3481cf; padding: 10px 0; background-color: #f2f2f2; vertical-align: top; width: calc(100% - 145px); border: 1px solid #e6e7e8; border-radius: 3px; } .body > div .btn-android { border-radius: 3px; width: 125px; padding: 8.5px; margin-left: 14px; vertical-align: top; font-size: 13px; border: none; } .body .select-list-box { cursor: default; }"]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:a.TranslateService},{type:U},{type:T},{type:x},{type:y}]},e.propDecorators={isAnnotation:[{type:t.Input}]},e}(),je=function(){function e(){}return e.prototype.ngOnInit=function(){},e.decorators=[{type:t.Component,args:[{selector:"sw-setting-alarm",template:"<p> setting-alarm works! </p> ",styles:[""]}]},{type:t.NgModule}],e.ctorParameters=function(){return[]},e}(),Le=function(){function e(e,t,i,n,s,o,r){var a=this;this.translate=e,this.apiService=t,this.utilService=i,this.publishService=n,this.toastService=s,this.confirmService=o,this.authService=r,this.currentUser=null,this.currentCompany=null,this.selectedDepartment=null,this.selectedPosition=null,this.selectedUser=null,this.subscriptions=[],this.currentUser=r.getCurrentUser(),this.currentCompany=this.currentUser.company,this.subscriptions.push(this.publishService.currentUserChange.subscribe((function(e){e&&(a.currentUser=e,a.currentCompany=a.currentUser.company)}))),this.subscriptions.push(this.publishService.changeNotice.subscribe((function(e){if(e&&e.source)switch(e.source){case"settings.removeUser":a.removeUserFromDepartment(e.userId);break;case"settings.userUpdated":a.updateUserInDepartment(e.user)}})))}return e.prototype.ngOnInit=function(){this.selectedTab="department"},e.prototype.ngOnDestroy=function(){for(var e=0,t=this.subscriptions;e<t.length;e++){t[e].unsubscribe()}},e.prototype.removeUserFromDepartment=function(e){if(this.newDepartment&&e){for(var t=0;t<(this.newDepartment.members||[]).length;t++)if(e===this.newDepartment.members[t].id){this.newDepartment.members.splice(t,1);break}for(t=0;t<(this.newDepartment.newMembers||[]).length;t++)if(e===this.newDepartment.newMembers[t].id){this.newDepartment.newMembers.splice(t,1);break}}},e.prototype.updateUserInDepartment=function(e){if(this.newDepartment&&e){for(var t=0;t<(this.newDepartment.members||[]).length;t++)if(e.id===this.newDepartment.members[t].id){this.newDepartment.members[t]=e;break}for(t=0;t<(this.newDepartment.newMembers||[]).length;t++)if(e.id===this.newDepartment.newMembers[t].id){this.newDepartment.newMembers[t]=e;break}}},e.prototype.updateDepartmentTree=function(e,t,i){if(e||(e=this.departmentTree),!e||!t)return!1;for(var n=0;n<(e.children||[]).length;n++){if(t.id===e.children[n].id)return t.children=e.children[n].children,t.expanded=e.children[n].expanded,e.children[n]=JSON.parse(JSON.stringify(t)),i||(this.selectedDepartment=t),!0;if(this.updateDepartmentTree(e.children[n],t,i))return!0}return!1},e.prototype.refreshDepartmentTree=function(){var e=this;this.positionChanged=!1,this.departmentChanged=!1,this.newDepartmentChanged=!1,this.selectedDepartment=null,this.newDepartment=null,this._positionList=[],this._departmentTree=JSON.parse(JSON.stringify(this.currentUser.company)),this.apiService.getCompanyDepartmentTree(this.currentUser.company.id).then((function(t){t&&!0===t.status&&(t.result instanceof Array?e._departmentTree.children=t.result:e._departmentTree=t.result)}))},e.prototype.refreshPositionList=function(){var e=this;this.positionChanged=!1,this.departmentChanged=!1,this._positionList=[],this._departmentTree=null,this.apiService.getCompanyPositions(this.currentUser.company.id).then((function(t){t&&!0===t.status&&(e._positionList=t.result)}))},Object.defineProperty(e.prototype,"selectedTab",{get:function(){return this._selectedTab},set:function(e){var t=this;if(e)switch(e){case"department":this.positionChanged?this.confirmService.confirm(this.translate.instant("confirm.text.position-changed")).then((function(i){t._selectedTab=e,t.refreshDepartmentTree()}),(function(e){})):(this._selectedTab=e,this.refreshDepartmentTree());break;case"position":this.departmentChanged?this.confirmService.confirm(this.translate.instant("confirm.text.organization-changed")).then((function(i){t.newDepartmentChanged?t.confirmService.confirm(t.translate.instant("confirm.text.department-changed")).then((function(i){t._selectedTab=e,t.refreshPositionList()}),(function(e){})):(t._selectedTab=e,t.refreshPositionList())}),(function(e){})):this.newDepartmentChanged?this.confirmService.confirm(this.translate.instant("confirm.text.department-changed")).then((function(i){t._selectedTab=e,t.refreshPositionList()}),(function(e){})):(this._selectedTab=e,this.refreshPositionList())}},enumerable:!0,configurable:!0}),e.prototype.selectNewDepartment=function(e){var t=this;this.selectedDepartment&&e&&this.selectedDepartment.id!==e.id&&this.newDepartmentChanged?this.confirmService.confirm(this.translate.instant("confirm.text.department-changed")).then((function(i){t.setSelectedDepartment(e)}),(function(e){})):this.setSelectedDepartment(e)},e.prototype.setSelectedDepartment=function(e){var t=this;this.selectedDepartment&&(this.selectedDepartment.members=null),this.newDepartmentChanged=!1,this.selectedDepartment=e,this.newDepartment=JSON.parse(JSON.stringify(e)),this.newDepartment&&(this.newDepartment.members=null,this.apiService.searchDepartmentUsers(this.currentUser.company.id,this.newDepartment.id,null).then((function(e){e&&!0===e.status&&(t.newDepartment.members=e.result)})))},e.prototype.selectUser=function(e){return this.publishService.pubPopupMessage({targetId:"setUser",parameters:[e]}),!1},Object.defineProperty(e.prototype,"departmentTree",{get:function(){return this._departmentTree},set:function(e){this._departmentTree=e,this.departmentChanged=!0},enumerable:!0,configurable:!0}),e.prototype.changeParentDepartment=function(e){this.newDepartmentChanged=!0,e&&1===e.length?this.newDepartment.parent=e[0]:this.newDepartment.parent=this.currentUser.company},Object.defineProperty(e.prototype,"positionList",{get:function(){return this._positionList},set:function(e){this._positionList=e,this.positionChanged=!0},enumerable:!0,configurable:!0}),e.prototype.addNewDepartment=function(e){this.isNewDepartment=!0},e.prototype.addNewPosition=function(e){this.isNewPosition=!0},e.prototype.findRemoveInTree=function(e,t,i){if(!e)return null;if(e.id===i){if(t&&t.children)for(var n=0;n<t.children.length;n++)if(t.children[n].id===i){t.children.splice(n,1);break}return e}if(e.children&&e.children.length>0)for(n=0;n<e.children.length;n++){var s=this.findRemoveInTree(e.children[n],e,i);if(s)return s}return null},e.prototype.deleteSelectedDepartment=function(e){if(!this.selectedDepartment)return!1;this.findRemoveInTree(this.departmentTree,null,this.selectedDepartment.id),this.departmentChanged=!0,this.selectedDepartment=null},e.prototype.setNewDepartment=function(){var e=this;this.apiService.setCompanyDepartment(this.currentUser.company.id,this.newDepartment.id,this.newDepartment).then((function(t){t&&!0===t.status&&(t.result?e.updateDepartmentTree(e.departmentTree,t.result,!1):e.updateDepartmentTree(e.departmentTree,e.newDepartment,!1),e.toastService.add("info",e.translate.instant("department.text.depatments-saved")))}))},e.prototype.setDepartments=function(){var e=this;this.newDepartmentChanged&&this.updateDepartmentTree(this.departmentTree,this.newDepartment,!0),this.apiService.setCompanyDepartmentsByTree(this.currentUser.company.id,this.departmentTree).then((function(t){t&&!0===t.status&&(e.refreshDepartmentTree(),e.toastService.add("info",e.translate.instant("department.text.depatments-saved")))}))},e.prototype.setPositions=function(){var e=this;this.apiService.setCompanyPositions(this.currentUser.company.id,this.positionList).then((function(t){t&&!0===t.status&&(e.refreshPositionList(),e.toastService.add("info",e.translate.instant("position.text.positions-saved")))}))},e.prototype.changeNewMembers=function(e){var t=this;e&&(e=e.filter((function(e){for(var i=0,n=t.newDepartment.members;i<n.length;i++){var s=n[i];if(e.id===s.id)return t.toastService.add("warn",t.translate.instant("department.text.not-new-member",{name:e.name})),!1}return!0}))),this.newDepartment.newMembers=e,this.newDepartmentChanged=!0,setTimeout((function(){var e=$("sw-setting-organization .new-members").outerHeight();$("sw-setting-organization .member-list").css({"max-height":"calc(100% - "+e+"px - 130px)"})}),300)},e.decorators=[{type:t.Component,args:[{selector:"sw-setting-organization",template:'<div class="header"> <span>{{\'settings.text.organization\' | translate}}</span> <ul class="right-tabs"> <li [ngClass]="{\'on\': selectedTab === \'department\'}" (click)="selectedTab = \'department\'">{{\'common.text.department\' | translate}}</li> <li [ngClass]="{\'on\': selectedTab === \'position\'}" (click)="selectedTab = \'position\'">{{\'common.text.position\' | translate}}</li> </ul> </div> <div class="body"> <div *ngIf="selectedTab===\'department\'" class="left-side"> <sw-tree-department [selectedDepartment]="selectedDepartment" (selectedDepartmentChange)="selectNewDepartment($event)" [move]="true" [(addNewDepartment)]="isNewDepartment" [(departmentTree)]="departmentTree"></sw-tree-department> <div class="btn-group"> <button *ngIf="departmentChanged"  class="btn-android save-changes" (click)="setDepartments()">{{\'common.button.save-organization\' | translate}}</button> <button class="btn-android" (click)="addNewDepartment($event)">{{\'common.button.add-department\' | translate}}</button> </div> </div> <div *ngIf="selectedTab===\'department\'" class="right-side"> <form class="department-detail" name="form" #f="ngForm" novalidate> <div *ngIf="newDepartment"> <div class="department-name text-ellipsis">{{selectedDepartment.name ? selectedDepartment.name : \'common.text.empty\' | translate}}</div> <ul class="info-list"> <li> <div *ngIf="departmentname.invalid && (departmentname.dirty || departmentname.touched)" class="help-block"> <i class="icon-field-error"></i> <div *ngIf="departmentname?.errors.required">{{\'department.error.name-field-required\' | translate}}</div> </div> <label *ngIf="newDepartment.id !== currentUser.company.id">{{\'department.text.name\' | translate}}</label> <label *ngIf="newDepartment.id === currentUser.company.id">{{\'join.text.community-name\' | translate}}</label> <span class="value"><input type="text" autocomplete="off" name="departmentname" [(ngModel)]="newDepartment.name" (change)="newDepartmentChanged=true" #departmentname="ngModel" required></span> </li> <li *ngIf="newDepartment && newDepartment.id !== currentUser.company.id"> <label>{{\'department.text.parent-department\' | translate}}</label> <sw-auto-department class="value no-padding" [multiple]="false" [smallSize]="true" [selectedDepartments]="[newDepartment.parent]" (selectedDepartmentsChange)="changeParentDepartment($event)"></sw-auto-department> </li> <li class="new-members"> <label>{{\'department.text.add-members\' | translate}}</label> <sw-auto-user class="value no-padding" [smallSize]="true" [multiple]="true" [userOnly]="true" [showInviteUser]="true" [selectedUsers]="newDepartment.newMembers" (selectedUsersChange)="changeNewMembers($event)" [selectedDepartment]="newDepartment"></sw-auto-user> </li> </ul> <div class="member-list"> <ul *ngIf="newDepartment.newMembers && newDepartment.newMembers.length > 0"> <li class="title"> <span>{{\'department.text.new-members\' | translate}}</span> </li> <li *ngFor="let user of newDepartment.newMembers index as i" (click)="selectUser(user)"> <sw-avatar [selectedUser]="user" [size]="34"></sw-avatar> <span class="info text-ellipsis"> <span class="name">{{user.name}}</span> <span class="position">{{user.position ? user.position.name : \'\'}}</span> </span> </li> </ul>             <ul> <div *ngIf="!newDepartment.members || newDepartment.members.length === 0"> <span class="no-members">{{\'department.text.no-members\' | translate}}</span> </div> <li *ngIf="newDepartment.members && newDepartment.members.length > 0" class="title"> <span>{{\'department.text.existing-members\' | translate}}</span> </li> <li *ngFor="let user of newDepartment.members index as i" (click)="selectUser(user)"> <sw-avatar [selectedUser]="user" [size]="34"></sw-avatar> <span class="info text-ellipsis"> <span class="name">{{user.name}}</span> <span class="position">{{user.position ? user.position.name : \'\'}}</span> </span> </li> </ul>             </div> </div> </form> <div class="btn-group"> <button *ngIf="newDepartment && newDepartmentChanged"  class="btn-android save-changes" (click)="setNewDepartment()">{{\'common.button.save-department\' | translate}}</button> <button *ngIf="newDepartment && newDepartment.id !== currentCompany.id" class="btn-android delete-department" (click)="deleteSelectedDepartment($event)">{{\'common.button.delete-department\' | translate}}</button> </div> </div> <div *ngIf="selectedTab===\'position\'" class="position-setting"> <sw-list-position [(selectedPosition)]="selectedPosition" [(positionList)]="positionList" [edit]="true" [(addNewPosition)]="isNewPosition"></sw-list-position> <div class="btn-group"> <button class="btn-android" (click)="addNewPosition($event)">{{\'common.button.add-position\' | translate}}</button> <button *ngIf="positionChanged"  class="btn-android save-changes" (click)="setPositions()">{{\'common.button.save-changes\' | translate}}</button> </div> </div>  </div> ',styles:[".header { border-bottom: solid 2px #b6babd; padding: 20px 0; } .header > span { font-size: 20px; font-weight: bold; color: #0e1b26; display: inline-block; } .header .right-tabs { float: right; font-size: 15px; color: #222222; margin-top: 10px; display: inline-block; text-align: right; } .header .right-tabs li { display: inline-block; padding: 0px 20px; line-height: 17px; cursor: pointer; } .header .right-tabs li:last-of-type { border-left: solid 1px #222; padding-right: 0px; } .header .right-tabs li.on { font-weight: bold; color: #3481cf } .body { margin-top: 20px; height: calc(100% - 94px); } .body > div { display: inline-block; vertical-align: top; height: calc(100% - 46px); border : 1px solid #e6e7e8; } .body .left-side { width: 40%; } .body .btn-group { float: right; margin-top: 10px; } .body .btn-group button { width: 95px; padding: 4px 0;\t font-size: 13px; border-radius: 3px; font-size: 13px; margin-left: 10px; } .body .left-side .btn-group button, .body > .position-setting .btn-group button:first-of-type { border: solid 1px #3481cf; background-color: #eaeff4; color: #3481cf; } .body .left-side .btn-group button:hover, .body > .position-setting .btn-group button:first-of-type:hover { background-color: #d1e0ee; } .body .right-side { width: calc(60% - 4px); border : 1px solid #e6e7e8; border-left: none; } .body .right-side .department-detail { height: 100%; text-align: center; } .body .right-side .department-detail > div { height: 100% } .body .right-side .department-detail .department-name { font-size: 16px; font-weight: bold; padding: 15px; } .body .right-side .department-detail .info-list { padding: 15px; } .body .right-side .department-detail .info-list > li { font-size: 13px; color: #0e1b26; text-align: left; padding: 7px 10px; } .body .right-side .department-detail .info-list > li > label { color: #666464; width: 20%; display: inline-block; vertical-align: top; margin-top: 6px; } .body .right-side .department-detail .info-list > li > .value { padding: 6px 7px; width: calc(80% - 18px); display: inline-block; vertical-align: top; } .body .right-side .department-detail .info-list > li > span.value { padding: 4px 0; width: calc(80% - 2px); border: solid 1px #e4e4e4; } .body .right-side .department-detail .info-list > li > span.value > input { width: calc(100% - 2px); border: none; } .body .right-side .department-detail .info-list > li > .value.no-padding { padding: 0; width: 80% ; } .body .right-side .department-detail .info-list > li:last-of-type { border-bottom: none; } .body form .help-block { float: right; line-height: 18px; margin-top: -20px; } .body form .help-block > i { margin-bottom: -1.7px } .body form .help-block > div { display: inline-block; font-size: 11px; color: #da6058; margin-left: 5px; } .body .right-side .department-detail .member-list { max-height: calc(100% - 45px - 130px); overflow-y: auto; overflow-x: hidden; border-top: solid 1px #e4e4e4; } .body .right-side .department-detail .member-list::-webkit-scrollbar { width: 0.5em; } .body .right-side .department-detail .member-list li { color: #222; text-align: left; padding: 6px 10px; height: 36px; border-bottom: solid 1px #e6e7e8; } .body .right-side .department-detail .member-list li.title { height: auto; padding: 0 10px; } .body .right-side .department-detail .member-list li.title > span { color: #666464; font-size: 11px; margin-top: 4px; vertical-align: top; display: inline-block; } .body .right-side .department-detail .member-list li:hover { background-color: #f7f5f5; cursor: pointer; } .body .right-side .department-detail .member-list .no-members { display: inline-block; text-align: center; width: 100%; font-size: 13px; padding: 15px 0; } .body .right-side .department-detail .member-list li > .info { width: calc(100% - 50px); margin-left: 14px; display: inline-block; vertical-align: top; } .body .right-side .department-detail .member-list li > .info .name { font-size: 15px; font-weight: bold; padding: 7px 0; display: inline-block; vertical-align: top; } .body .right-side .department-detail .member-list li > .info .position { font-size: 13px; font-weight: normal; margin-left: 5px; padding: 8px 0; display: inline-block; vertical-align: top; } .body .right-side .btn-group button.delete-department { border: solid 1px #f46864; background-color: #fbebea; color: #f46864; } .body .right-side .btn-group button.delete-department:hover { background-color: #f4c4c2; } .body .right-side .btn-group button.save-changes, .body > .position-setting .btn-group button.save-changes { border: solid 1px #a3adb5; background-color: #edecec; color: #0e1b26; } .body .right-side .btn-group button.save-changes:hover, .body > .position-setting .btn-group button.save-changes:hover { background-color: #dedbdb; } .body > .position-setting { width: calc(100% - 22px); margin: 0 10px; } .body > .position-setting .btn-group { float: none; width: 100%; text-align: left; } .body > .position-setting .btn-group button.save-changes { float: right; margin-right: 10px; } "]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:a.TranslateService},{type:U},{type:O},{type:x},{type:y},{type:V},{type:T}]},e}(),ze=function(){function e(e,t,i,n,s,o){var r=this;this.translate=e,this.apiService=t,this.utilService=i,this.toastService=n,this.publishService=s,this.authService=o,this.currentCompany=null,this.userChanged=!1,this.openOptions=!1,this.selectedTab="all",this.userLevels=null,this.timezones=null,this.passwordConfirmError=!1,this.subscriptions=[],this.newUser=JSON.parse(JSON.stringify(o.getCurrentUser())),this.currentCompany=this.newUser.company,this.passwordConfirm=this.newUser.password,this.subscriptions.push(this.publishService.currentUserChange.subscribe((function(e){r.refresh()})))}return e.prototype.ngOnInit=function(){},e.prototype.ngOnDestroy=function(){for(var e=0,t=this.subscriptions;e<t.length;e++){t[e].unsubscribe()}},e.prototype.refresh=function(){this.newUser=JSON.parse(JSON.stringify(this.authService.getCurrentUser())),this.thisForm&&this.thisForm.form.markAsPristine()},e.prototype.openPictureOptions=function(e){return $(e.target||e.srcElement).parents(".select-list-box:first").focus(),this.openOptions=!0,!1},e.prototype.usePictureOption=function(e,t){return"change"===t?$(e.target).parents(".user-picture:first").find("sw-avatar .choose-file input").click():"default"===t&&(this.newUser.profileUrl&&(this.newUser.profileUrl=null,this.userChanged=!0),this.newUser.profileFiles=null),this.openOptions=!1,!1},e.prototype.onImageFileChanged=function(e){this.userChanged=!0,this.newUser.profileFiles=e},e.prototype.openTimezones=function(e){return this.timezones=this.utilService.getTimezones(),!1},e.prototype.setTimezone=function(e){this.userChanged||this.newUser.timezone===e.id||(this.userChanged=!0),this.newUser.timezone=e.id,this.timezones=null},e.prototype.toDateTimeString=function(e){return this.utilService.toDateTimeString(e)},e.prototype.setUser=function(){var e=this;this.passwordConfirmError=!1,this.newUser.password!==this.passwordConfirm&&(this.passwordConfirmError=!0),this.newUser.profileUrl||(this.newUser.profile=null),this.newUser.statusText&&this.newUser.statusText.length>50&&(this.newUser.statusText=this.newUser.statusText.substring(0,50),this.toastService.add("warn",this.translate.instant("user.error.status-text-overflow"))),this.apiService.updateUser(this.newUser).then((function(t){t.status&&t.result&&(e.toastService.add("info",e.translate.instant("settings.text.profile-update-succeed")),t.result.password=e.newUser.password,e.authService.restoreCurrentUser(t.result),e.userChanged=!1)}))},e.prototype.openLocales=function(e){return this.locales=[{id:"ko",name:this.translate.instant("user.text.locale-ko")},{id:"en",name:this.translate.instant("user.text.locale-en")}],!1},e.prototype.setLocale=function(e){this.userChanged||this.newUser.userLevel===e.id||(this.userChanged=!0),this.newUser.locale=e.id,this.locales=null},e.prototype.getTimezoneName=function(e){for(var t=this.utilService.getTimezones(),i=0;i<t.length;i++)if(e===t[i].id)return t[i].name},e.prototype.openUserStatuses=function(e){this.userStatuses=this.utilService.getUserStatuses()},e.prototype.setUserStatus=function(e){this.userChanged||this.newUser.status===e.id||(this.userChanged=!0),this.newUser.status=e.id,this.userStatuses=null},e.prototype.keydownOnStatusText=function(e){if(13===(e.which||e.keyCode))return!1},e.decorators=[{type:t.Component,args:[{selector:"sw-setting-profile",template:'<div class="header"> <span>{{\'settings.text.setting-profile\' | translate}}</span> <div class="user-picture select-list-box" tabindex="-1" (focusout)="openOptions=false"> <sw-avatar [selectedUser]="newUser" [size]="120" [editable]="true" (fileChoosed)="onImageFileChanged($event)"></sw-avatar> <span class="btn-picture"><i class="icon-camera" (click)="openPictureOptions($event)"></i></span> <ul *ngIf="openOptions" class="select-list"> <li (click)="usePictureOption($event, \'change\')"> <span>{{\'setttins.text.change-image\' | translate}}</span> </li> <li (click)="usePictureOption($event, \'default\')"> <span>{{\'setttins.text.default-image\' | translate}}</span> </li> </ul> </div> <ul class="right-tabs"> <li [ngClass]="{\'on\': selectedTab === \'current\'}" (click)="selectedTab = \'current\'">{{newUser.company.name}}</li> <li [ngClass]="{\'on\': selectedTab === \'all\'}" (click)="selectedTab = \'all\'">{{\'common.text.all\' | translate}}</li> </ul> </div> <form name="form" class="body" #f="ngForm" novalidate> <ul class="info-list"> <li *ngIf="selectedTab === \'all\' && !isAnnotation"> <label>{{\'user.text.status\' | translate}}</label> <sw-select-box class="value" [selectedObject]="{id: newUser.status, name: translate.instant(\'user.text.status-\' + newUser.status)}" (selectedObjectChange)="setUserStatus($event)" [selectObjects]="userStatuses" (refreshSelectObjects)="openUserStatuses($event)"></sw-select-box> </li> <li *ngIf="selectedTab === \'all\' && !isAnnotation"> <label>{{\'user.text.status-text\' | translate}}</label> <textarea name="userstatustext" [(ngModel)]="newUser.statusText" (keydown)="keydownOnStatusText($event)" #userstatustext="ngModel" class="value"> </textarea> </li> <li *ngIf="selectedTab === \'all\'"> <label>{{\'common.text.name\' | translate}}</label> <input type="text" autocomplete="off" name="username" [(ngModel)]="newUser.name" #username="ngModel" class="value" required> </li> <li *ngIf="selectedTab === \'all\'"> <label>{{\'common.text.email\' | translate}}</label> <span class="value">{{newUser.id}}</span> </li> <li *ngIf="selectedTab === \'all\'"> <label>{{\'common.text.password\' | translate}}</label> <input type="password" autocomplete="off" name="password" [(ngModel)]="newUser.password" #password="ngModel" class="value" required> </li> <li *ngIf="selectedTab === \'all\'">         <label>{{\'common.text.password-confirm\' | translate}}</label> <input type="password" autocomplete="off" name="passwordconfirm" [(ngModel)]="passwordConfirm" ##passwordconfirm="ngModel" class="value" required> <div *ngIf="passwordConfirmError" class="help-block"> <i class="icon-field-error"></i> <div>{{\'user.error.password-confirm\' | translate}}</div> </div> </li> <li *ngIf="selectedTab === \'all\'"> <label>{{\'common.text.contact\' | translate}}</label> <input type="text" autocomplete="off" name="phoneno" [(ngModel)]="newUser.phoneNo" #phoneno="ngModel" class="value"> </li> <li *ngIf="selectedTab === \'all\'"> <label>{{\'user.text.user-locale\' | translate}}</label> <sw-select-box class="value" [selectedObject]="{id: newUser.locale, name: translate.instant(\'user.text.locale-\' + newUser.locale)}" (selectedObjectChange)="setLocale($event)" [selectObjects]="locales" (refreshSelectObjects)="openLocales($event)"></sw-select-box> </li> <li *ngIf="selectedTab === \'all\'"> <label>{{\'user.text.timezone\' | translate}}</label> <sw-select-box class="value" [selectedObject]="{id: newUser.timezone, name: getTimezoneName(newUser.timezone)}" (selectedObjectChange)="setTimezone($event)" [selectObjects]="timezones" (refreshSelectObjects)="openTimezones($event)"></sw-select-box> </li> <li *ngIf="selectedTab === \'current\' && newUser.company.hasDepartment"> <label>{{\'common.text.department\' | translate}}</label> <span class="value">{{newUser.department ? newUser.department.name : \'common.text.empty\' | translate}}</span> </li> <li *ngIf="selectedTab === \'current\' && newUser.company.hasPosition"> <label>{{\'common.text.position\' | translate}}</label> <span class="value">{{newUser.position ? newUser.position.name : \'common.text.empty\' | translate}}</span> </li> <li *ngIf="selectedTab === \'current\'"> <label>{{\'user.text.user-level\' | translate}}</label> <span class="value">{{(\'user.text.level-\' + newUser.userLevel) | translate}}</span> </li> <li *ngIf="selectedTab === \'current\'"> <label>{{\'user.text.join-date\' | translate}}</label> <span  class="value">{{toDateTimeString(newUser.joinDate)}}</span> </li> </ul> <div class="btn-group"> <button *ngIf="userChanged || f.dirty" class="btn-android save-changes" [ngClass]="{\'disabled\': f.invalid}" (click)="setUser()">{{\'common.button.save-changes\' | translate}}</button> </div> </form> ',styles:[".header { border-bottom: solid 2px #b6babd; padding: 20px 0; margin-top: 80px; } .header > span { font-size: 20px; font-weight: bold; color: #0e1b26; display: inline-block; } .header .user-picture { position: absolute; left: 0; right: 0; margin: auto; width: 120px; height: 120px; margin-top: -125px; outline: none; display: block; cursor: default; } .header .user-picture .btn-picture { width: 33px; height: 33px; display: inline-block; border-radius: 50%; background-color: #0e1b26; opacity: 0.8; text-align: center; float: right; margin-top: -38px; } .header .user-picture .btn-picture:hover { cursor: pointer; } .header .user-picture .btn-picture > i { margin-top: 8px; } .header .user-picture .select-list { position: absolute; box-shadow: 1.1px 1.7px 4px 0 rgba(0, 0, 0, 0.24); border: solid 1px #b4b5b5; background-color: #ffffff; padding: 5px 0; border-radius: 5px; font-size: 13px; color: #222222; z-index: 1000; margin-left: 125px; margin-top: -40px; width: 120px; display: inline-block; } .header .user-picture .select-list > li { list-style: none; padding: 4px 30px 4px 10px; text-align: left; } .header .user-picture .select-list > li.on { background-color: #3481cf; color: #ffffff; } .header .user-picture .select-list > li:hover { background-color: rgba(52, 129, 207, 0.2); cursor: pointer; } .header .user-picture .select-list > li.on:hover { background-color: #3481cf; } .header .user-picture .select-list > li > span { white-space: nowrap; } .header .right-tabs { float: right; font-size: 15px; color: #222222; margin-top: 10px; display: inline-block; text-align: right; } .header .right-tabs li { display: inline-block; padding: 0px 20px; line-height: 17px; cursor: pointer; } .header .right-tabs li:last-of-type { border-left: solid 1px #222; padding-right: 0px; } .header .right-tabs li.on { font-weight: bold; color: #3481cf } .body { } .body .info-list { border-bottom: solid 2px #b6babd; } .body .info-list > li { border-bottom: solid 1px #e4e4e4; font-size: 13px; color: #0e1b26; text-align: left; padding: 7px 10px; } .body .info-list > li .help-block { text-align: left; line-height: 18px; margin-top: 3px; display: inline-block; margin-left: 10px; vertical-align: top; } .body .info-list > li .help-block > i { margin-bottom: -1.7px } .body .info-list > li .help-block > div { display: inline-block; font-size: 11px; color: #da6058; margin-left: 5px; } .body .info-list > li > label { color: #666464; width: 20%; display: inline-block; vertical-align: top; margin-top: 6px; } .body .info-list > li > .value { padding: 6px 7px; width: calc(80% - 20px); display: inline-block; vertical-align: top; } .body .info-list > li > input.value { padding: 4px 0px; width: calc(80% - 6px); border: solid 1px #e4e4e4; } .body .info-list > li > textarea.value { resize: none; overflow: hidden; height: 54px; width: calc(80% - 18px); border: solid 1px #e4e4e4; } .body .info-list > li > input[type='password'].value { width: 230px; } .body .info-list > li > .user-level, .body .info-list > li > .user-locale, .body .info-list > li > .user-timezone { border: solid 1px #e4e4e4; } .body .info-list > li:last-of-type { border-bottom: none; } .body .btn-group { float: right; margin-top: 15px; } .body .btn-group button.save-changes { font-size: 13px; padding: 7px 35px; border: none; } "]}]},{type:t.NgModule}],e.ctorParameters=function(){return[{type:a.TranslateService},{type:U},{type:O},{type:y},{type:x},{type:T}]},e.propDecorators={thisForm:[{type:t.ViewChild,args:["f"]}],isAnnotation:[{type:t.Input}]},e}(),Ne=function(){function e(){}return e.prototype.ngOnInit=function(){},e.decorators=[{type:t.Component,args:[{selector:"sw-usage-management",template:"<p> usage-management works! </p> ",styles:[""]}]},{type:t.NgModule}],e.ctorParameters=function(){return[]},e}(),Ae=function(){function e(){}return e.prototype.intercept=function(e,t){var i=JSON.parse(localStorage.getItem("currentUser"));return i&&i.token&&(e=e.clone({setHeaders:{Authorization:"Bearer "+i.token}})),t.handle(e)},e.decorators=[{type:t.Injectable}],e}(),$e=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[oe,ae,U,T,V,le,x,y,O,ce,w,ue]}},e.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,i.FormsModule,s.MyDatePickerModule,o.AngularDraggableModule,r.FileUploadModule,a.TranslateModule,b,F,z,q,_,B,R,G,K,H,J,Y,X,Z,Q,ne,se,me,he,ge,fe,ve,be,ye,xe,we,Se,ke,Ce,Ie,Ue,Te,De,Pe,Oe,Me,je,Le,ze,Ne],declarations:[],exports:[a.TranslateModule,b,z,F,xe,q,_,B,R,G,K,H,J,Y,X,Z,Q,ne,se,me,he,ge,fe,ve,be,ye,xe,we,Se,ke,Ce,Ie,Ue,Te,De,Pe,Oe,Me,je,Le,ze,Ne],schemas:[t.NO_ERRORS_SCHEMA,t.CUSTOM_ELEMENTS_SCHEMA]}]}],e}();e.SmartworksModule=$e,e.User=N,e.Company=A,e.Department=W,e.Position=E,e.Work=ee,e.Message=te,e.Comment=ie,e.AuthGuard=oe,e.HttpInterceptor=ae,e.JwtInterceptor=Ae,e.ApiService=U,e.AuthService=T,e.ConfirmService=V,e.PagerService=le,e.PublishService=x,e.ToastService=y,e.UtilService=O,e.WebSocketService=ce,e.SpinnerService=w,e.WindowService=ue,e.IframeAutoHeightDirective=b,e.FileUploadDirective=z,e.AvatarDirective=F,e.AutoUserDirective=q,e.AutoDepartmentDirective=_,e.AutoKeywordDirective=B,e.CheckBoxDirective=R,e.ToggleBoxDirective=G,e.SlideBoxDirective=K,e.SearchUserDirective=H,e.SelectBoxDirective=J,e.TreeNodeDirective=Y,e.TreeDepartmentDirective=X,e.SelectDepartmentDirective=Z,e.ListPositionDirective=Q,e.CommentsDirective=ne,e.DatePickerDirective=se,e.ConfirmPopup=me,e.UserProfilePopup=he,e.SetUserPopup=ge,e.InviteNewUserPopup=fe,e.DatePickerPopup=ve,e.UserListPopup=be,e.ViewUserPopup=ye,e.ToastComponent=xe,e.WelcomeComponent=we,e.GetStartedComponent=Se,e.JoinComponent=ke,e.LoginComponent=Ce,e.LayoutBaseComponent=Ie,e.CommunityComponent=Ue,e.HomeComponent=Te,e.ScheduleComponent=De,e.SettingsBaseComponent=Pe,e.GuestManagementComponent=Oe,e.InviteUsersComponent=Me,e.SettingAlarmComponent=je,e.SettingOrganizationComponent=Le,e.SettingProfileComponent=ze,e.UsageManagementComponent=Ne,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=/sm/0f194b9fcba574a89c8dd66a8d484a426da60a85e089ce902485897b7bec87f3.map