PageSourceSearch

https://openpoint.app/chunk-DfffHgwi.js

js openpoint.app collected 2026-10-05 18:07:50 UTC 116,320 bytes, 1 lines download raw bytes

1import {f}from'./chunk-BG6Y4irt.js';import {j as jn$1}from'./chunk-A10Z6-W8.js';import {n as ne,J,_ as _1e,cq as Ce,S as SW,T,b,W,D as Dt$1,g as Rn$1,dN as y,u as ue,p as pe,P as Pe,l as lt,z,a as P,bV as Yt,f as Xt,B as Be,N as N$1,m as Dn$1,j as zn$1,O as Oe,c as Se,bC as Zo$1,bD as Nt$1,o as od,b4 as y2,ct as M,b2 as C,X,ce as c,i as hc,d as ce,q as k,L as Lb,b5 as vp,M as Mu,F as Fe,K as Ki,b6 as A3e,y as Pb,R,e as e$1,cr as s,bw as Kt,k as ko,ca as v,cs as kl,h as b$1,w as i,cN as tve,bO as _p,s as p,aX as Y,dy as AI,dz as TL,r as B,C as Au,v as Ss,ay as iD,ae as w,ai as Ce$1,ah as S,cM as Wi,x as js,A as v2,E as q,$ as $9,Z as RQ,a0 as pMe,a1 as xMe,a2 as MMe,a3 as NMe,a4 as AMe,a5 as TMe,a6 as PMe,a7 as RMe,a8 as OMe,a9 as FMe,aa as LMe,ab as fv,ac as bW,ad as W8,ak as em,al as Ht,am as tm,an as Fq,ar as Lt$1,as as Uw,ap as E,ao as le,at as Bq,au as et,av as q$1,aw as $,aC as Z_e,aD as t1,aE as W_e,aF as Y_e,bg as KW,aG as eu,aH as mY,aI as os,aJ as kL,aK as rZ,aL as FZ,aM as Tu,aU as Tr$1,cm as hDe,cn as vF,co as jK,bS as lc,bT as ga$1,aN as Cb,aO as ns,aP as nb,bG as ob,bh as GF,bi as Du,aj as be,aq as ye,ba as _a$1,bR as cc,bU as Su,ag as Ee,af as he,aR as N4,aS as F4,be as An$1,aB as x,cA as zCe,U as ec,bb as ZCe,bc as e0e,cB as i0e,cE as XCe,cD as JCe,Y as wu,cj as Txe,aY as Ml,bB as X8,cC as t0e,bk as sa$1,bm as ca$1,G as xZ,I as _Z,Q as hZ,V as jCe,bL as Oke,cg as jn$2,ep as K_e,cu as x$1,bH as _7,cF as _Q,cG as MTe,cH as XF,br as Ge,bd as E6,aQ as mu,dP as q7,dQ as z7,bl as Td,aV as Ae,dL as Rd,aZ as X$1,aT as Zn$1,a_ as gn$1,gz as UG,aW as Rq,bM as Vq,ex as kn$1,az as vn$1,ey as im,a$ as Ct,b0 as wt,cJ as BM}from'./main-IZHJ2OCR.js';import {L as L$1}from'./chunk-Dpd7YaN1.js';import {t as t$1}from'./chunk-B5dBYwcC.js';import'./chunk-i66OAyKa.js';var Io=(()=>{class t{constructor(e){this.recordType=e;}static{this.\u0275fac=function(i){return new(i||t)(ce(L$1))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-records"]],standalone:false,decls:7,vars:0,consts:[["outlet","outlet"],[1,"oppt-host","flex-row"],[1,"flex-fill-gap"],[1,"oppt-host","flex-full-screen"],[1,"oppt-host","flex-100p"],[1,"oppt-host"]],template:function(i,o){i&1&&(w(0,"div",1),Ce$1(1,"div",2),w(2,"div",3)(3,"article",4),Ce$1(4,"router-outlet",5,0),S()(),Ce$1(6,"div",2),S());},dependencies:[iD],encapsulation:2,changeDetection:1});}}return t})();var Ne=class extends i{constructor(){super(...arguments),this.recordTypeId=null,this.recordId=null,this.identifier=null,this.value1=null,this.value2=null,this.value3=null,this.value4=null,this.value5=null,this.value6=null,this.value7=null,this.date1From=null,this.date1To=null,this.decimal1From=null,this.decimal1To=null,this.recordIds=[],this.recordStatusIds=[];}},Ue=class extends i{constructor(){super(...arguments),this.recordTypeId=null,this.recordId=null,this.identifier=null,this.value1=null,this.value2=null,this.value3=null,this.date1From=null,this.date1To=null,this.decimal1From=null,this.decimal1To=null,this.recordStatusIds=[];}},wo=t=>(Lt.identifier.caption=t.identifier.caption,Lt.identifier.systemCaption=t.identifier.systemCaption,Lt.recordStatusIds.caption=t.recordStatusId.caption,Lt.recordStatusIds.systemCaption=t.recordStatusId.systemCaption,Lt),Lt={defaultSearch:{entityKey:"defaultSearch",caption:"Search",defaultValue:"",systemCaption:{},validators:{maxLength:[50]},messages:{maxlength:"Enter no more than 50 characters"},updateOn:null},identifier:{entityKey:"identifier",caption:"Identifier",defaultValue:"",systemCaption:{},validators:{maxLength:[100]},messages:{maxlength:"Enter no more than 100 characters"},updateOn:null},recordStatusIds:{entityKey:"recordStatusIds",caption:"Status",defaultValue:null,systemCaption:{},validators:{},messages:{},updateOn:null},value1:{entityKey:"value1",caption:"Value 1",defaultValue:"",systemCaption:{},validators:{maxLength:[100]},messages:{maxlength:"Enter no more than 100 characters"},updateOn:null},value2:{entityKey:"value2",caption:"Value 2",defaultValue:"",systemCaption:{},validators:{maxLength:[100]},messages:{maxlength:"Enter no more than 100 characters"},updateOn:null},value3:{entityKey:"value3",caption:"Value 3",defaultValue:"",systemCaption:{},validators:{maxLength:[100]},messages:{maxlength:"Enter no more than 100 characters"},updateOn:null},value4:{entityKey:"value4",caption:"Value 4",defaultValue:"",systemCaption:{},validators:{maxLength:[100]},messages:{maxlength:"Enter no more than 100 characters"},updateOn:null},date1From:{entityKey:"date1From",caption:"Date from",defaultValue:"",systemCaption:{},validators:{realdate:["^(0?[1-9]|1[012])\\/(0?[1-9]|[12][0-9]|3[01])\\/(19|20|21)\\d\\d$"]},messages:{matDatepickerMin:"Date cannot be before 1900",matDatepickerMax:"Date cannot be after 2199",matDatepickerParse:"Enter a date in format m/d/yyyy",realdate:"Enter a date (m/d/yyyy)"},updateOn:null},date1To:{entityKey:"date1To",caption:"Date to",defaultValue:"",systemCaption:{},validators:{realdate:["^(0?[1-9]|1[012])\\/(0?[1-9]|[12][0-9]|3[01])\\/(19|20|21)\\d\\d$"]},messages:{matDatepickerMin:"Date cannot be before 1900",matDatepickerMax:"Date cannot be after 2199",matDatepickerParse:"Enter a date in format m/d/yyyy",realdate:"Enter a date (m/d/yyyy)"},updateOn:null},decimal1From:{entityKey:"decimal1From",caption:"Number from",defaultValue:null,systemCaption:{},validators:{realnumber:["(^$)|((^[0-9]*(\\.[0-9]*)?$))"],maxscale:["([^\\-\\.0-9]+)|(\\..*\\.)|(.+\\-)|(^-?[0-9]*(\\.[0-9]{{0,2}0*)?$)"],maxcharacteristic:["([^-.0-9]+)|(..*.)|(.+-)|(^-?0*[0-9]{0,8}(.|$))"]},messages:{realnumber:"Enter a positive number or zero",maxscale:"Enter no more than two digits to the right of the decimal",maxcharacteristic:"Use no more than 8 whole number digits"},updateOn:null},decimal1To:{entityKey:"decimal1To",caption:"Number to",defaultValue:null,systemCaption:{},validators:{realnumber:["(^$)|((^[0-9]*(\\.[0-9]*)?$))"],maxscale:["([^\\-\\.0-9]+)|(\\..*\\.)|(.+\\-)|(^-?[0-9]*(\\.[0-9]{{0,2}0*)?$)"],maxcharacteristic:["([^-.0-9]+)|(..*.)|(.+-)|(^-?0*[0-9]{0,8}(.|$))"]},messages:{realnumber:"Enter a positive number or zero",maxscale:"Enter no more than two digits to the right of the decimal",maxcharacteristic:"Use no more than 8 whole number digits"},updateOn:null}};var Ci=class{constructor(){this.recordId=null,this.recordTypeId=null,this.systemId=null,this.recordStatusId=null,this.recordStatus=null,this.identifier=null,this.openPointRoute=null,this.alive=true,this.insertDate=null,this.insertUserAlias=null,this.values={},this.entityAction="Create",this.entityName="record";}};var ci=class{constructor(){this.recordId=null,this.systemId=null,this.recordTypeId=null,this.recordStatusId=null,this.recordStatus=null,this.identifier=null,this.value1=null,this.value2=null,this.value3=null,this.value4=null,this.value5=null,this.value6=null,this.value7=null,this.alive=true,this.insertDate=null;}},li=class{constructor(){this.year=0,this.recordCount=0;}},Bt=class{constructor(){this.recordId=null,this.numbers={};}},yi=t=>{let d=new b$1("record","recordId","record",()=>{let e=new Ci;return e.systemId=t.systemId,e});return d.autoDelete=false,d.autoUpdateCache=false,d.autoAddNew=false,d},bi=t=>{t.metadataList.dynamicValues={entityKey:"dynamicValues",caption:"Record details",defaultValue:null,systemCaption:{},validators:{},messages:{},updateOn:null},t.metadataList.identifier.validators.required=null,t.metadataList.identifier.messages.required="Required field",t.metadataList.recordStatusId.validators.required=null,t.metadataList.recordStatusId.messages.required="Required field";};var Et=(()=>
1{class t{constructor(e,i,o,c$1){this.cache=e,this.service=i,this.recordType=o,this.session=c$1,this.ngUnsubscribe=new P,this.recentStorageKey="recordrecents_",this.recordTypeId="",this.recent=new Yt([]),this.totalRecords=new Yt(0),this.busy=new Yt(false),this.refresh=()=>{this.busy.getValue()&&this.recordTypeId===this.recordType.entity?.recordTypeId||this.recordType.entityChanges.pipe(Se(l=>N$1.isNotNull(l)),Xt(l=>this.busy),Se(l=>!l),Be(1)).subscribe(l=>{if(this.recordTypeId=this.recordType.entity?.recordTypeId,this.recent.next([]),this.totalRecords.next(0),N$1.isNull(this.recordTypeId))return;let u=this.cache.retrieveObjectInStorage(this.recentStorageKey+this.recordTypeId);this.busy.next(true);let g=new Ne;if(g.recordTypeId=this.recordTypeId,g.pageSize=10,N$1.isNotNull(u)&&u.length>0){g.recordIds=u,this.service.search(g).subscribe(b=>{let R=this.sort(b.list,u);this.recent.next(R),this.totalRecords.next(R.length),this.busy.next(false);},b=>{console.log(b),this.busy.next(false);});return}g.orderBy=[new c("identifier","asc")],this.service.search(g).subscribe(b=>{this.recent.next(b.list),this.totalRecords.next(b.list.length),this.cacheRecent(),this.busy.next(false);},b=>{console.log(b),this.busy.next(false);});});},this.sort=(l,u)=>{let g=[];for(let b=0,R=u.length;b<R;b++){let ee=u[b],G=l.find(he=>he.recordId===ee);N$1.isNotNull(G)&&g.push(G);}return g},this.cacheRecent=()=>{let l=this.recent.getValue().map(u=>u.recordId);this.cache.stashObjectInStorage(this.recentStorageKey+this.recordTypeId,l);},this.removeRecent=l=>{N$1.isNull(l)||N$1.isNullOrEmpty(l.recordId)||this.busy.pipe(Se(u=>!u),Be(1)).subscribe(u=>{if(l.recordTypeId!==this.recordTypeId){this.removeRecentFromCache(l);return}let g=this.recent.getValue(),b=g.findIndex(R=>R.recordId===l.recordId);if(b>=0)g.splice(b,1);else return;this.recent.next(g),this.totalRecords.next(g.length),this.cacheRecent();});},this.removeRecentFromCache=l=>{let u=this.cache.retrieveObjectInStorage(this.recentStorageKey+l.recordTypeId);if(N$1.isNull(u))return;let g=u.findIndex(b=>b===l.recordId);if(g>=0)u.splice(g,1);else return;this.cache.stashObjectInStorage(this.recentStorageKey+l.recordTypeId,u);},this.addRecent=l=>{N$1.isNull(l)||N$1.isNullOrEmpty(l.recordId)||this.busy.pipe(Se(u=>!u),Be(1)).subscribe(u=>{if(l.recordTypeId!=this.recordTypeId){this.addRecentToCache(l);return}let g=this.recent.getValue(),b=g.findIndex(R=>R.recordId===l.recordId);b>-1?g.splice(b,1):g.length>=10&&g.pop(),g.unshift(l),this.recent.next(g),this.totalRecords.next(g.length),this.cacheRecent();});},this.addRecentToCache=l=>{let u=this.cache.retrieveObjectInStorage(this.recentStorageKey+l.recordTypeId);if(N$1.isNull(u))return;let g=u.findIndex(b=>b===l.recordId);g>-1?u.splice(g,1):u.length===10&&u.pop(),u.unshift(l.recordId),this.cache.stashObjectInStorage(this.recentStorageKey+l.recordTypeId,u);},this.recordType.entityChanges.pipe(zn$1(10),Oe(this.ngUnsubscribe)).subscribe(l=>{this.refresh();});}ngOnDestroy(){this.recent.complete(),this.busy.complete(),this.totalRecords.complete(),this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(pe(Pb),pe(Le),pe(L$1),pe(Lb))};}static{this.\u0275prov=Pe({token:t,factory:t.\u0275fac});}}return t})();var Te=(()=>{class t extends W{constructor(e,i,o,c,l,u,g){super(e,i,o,c,l,u,yi(u)),this.http=e,this.cache=i,this.authService=o,this.errorHandler=c,this.entityManager=l,this.session=u,this.recentRecords=g;}extendMetadata(e){bi(e);}getNewForm(e,i){let o="GetNewForm",c={recordId:e,openPointRoute:i};return this.authService.getAuthRequestHeaders().pipe(Dt$1(l=>this.http.post(this.serviceUrl+o,c,{headers:l}).pipe(this.errorHandler.onErrorShowMessage("Find failed"))))}getForm(e,i){let o="GetForm",c={recordId:e,openPointRoute:i};return this.authService.getAuthRequestHeaders().pipe(Dt$1(l=>this.http.post(this.serviceUrl+o,c,{headers:l}).pipe(this.errorHandler.onErrorShowMessage("Find failed"),Rn$1(u=>this.recentRecords.addRecent(u.record)))))}getStatistics(e){let i="Statistics/";return this.authService.getAuthRequestHeaders().pipe(Dt$1(o=>this.http.get(this.serviceUrl+i+e,{headers:o}).pipe(this.errorHandler.onErrorShowMessage("Get statistics entity failed"))))}
1delete(e){let i=this.startUpdate();return this.authService.getAuthRequestHeaders().pipe(Dt$1(o=>this.http.post(this.serviceUrl+this.deleteEndPoint,{recordId:e.recordId},{headers:o}).pipe(this.errorHandler.slowRetry(1,500))),this.errorHandler.onErrorGetEntityResult(e),this.errorHandler.showEntityResultMessage("Delete",this.entityType),Rn$1(o=>{this.entityManager.raiseEventFromResult(o,e,this.entityType,y.DELETED),this.recentRecords.removeRecent(e.record),this.endUpdate(i);},o=>this.endUpdate(i)))}importRecords(e,i,o,c=null){let l="ImportRecords",u={systemId:i,recordTypeId:o,csvData:e},g=this.startUpdate();return this.authService.getAuthRequestHeaders().pipe(Dt$1(b=>{let R=new Wi({Authorization:b.get("Authorization"),"api-version":b.get("api-version"),timeout:"240000"});return this.http.post(this.serviceUrl+l,u,{headers:R}).pipe(this.errorHandler.slowRetry(1,500))}),this.errorHandler.onErrorGetEntityResult({}),this.errorHandler.showEntityResultMessage("Save",this.entityType,c),Rn$1(()=>{this.endUpdate(g);},()=>this.endUpdate(g)))}merge(e,i=null){let o=this.startUpdate();return this.authService.getAuthRequestHeaders().pipe(Dt$1(c=>this.http.post(this.serviceUrl+this.mergeEndPoint,e.record,{headers:c}).pipe(this.errorHandler.slowRetry(1,500))),this.errorHandler.onErrorGetEntityResult(e.record),this.errorHandler.showEntityResultMessage("Save",this.entityType,i),ue(c=>(c.entity=null,c)),Rn$1(c=>{this.entityManager.raiseEventFromResult(c,e,this.entityType,y.SAVED),this.endUpdate(o);},c=>this.endUpdate(o)))}static{this.\u0275fac=function(i){return new(i||t)(pe(js),pe(Pb),pe(v2),pe(Au),pe(q),pe(Lb),pe(Et))};}static{this.\u0275prov=Pe({token:t,factory:t.\u0275fac});}}return t})(),Le=(()=>{class t extends lt{constructor(e,i,o,c,l,u){super(e,i,o,c,l,u,yi(u)),this.http=e,this.cache=i,this.authService=o,this.errorHandler=c,this.entityManager=l,this.session=u;}getRecordDate1Overview(e){let i="Date1Overview/";return this.authService.getAuthRequestHeaders().pipe(Dt$1(o=>this.http.get(this.serviceUrl+i+e,{headers:o}).pipe(this.errorHandler.onErrorShowMessage("Get date overview failed"))))}extendMetadata(e){bi(e);}static{this.\u0275fac=function(i){return new(i||t)(pe(js),pe(Pb),pe(v2),pe(Au),pe(q),pe(Lb))};}static{this.\u0275prov=Pe({token:t,factory:t.\u0275fac});}}return t})();var ot=(()=>{class t extends X{get advancedCriteria(){return this.advancedCriteriaSubject.getValue()}set advancedCriteria(e){N$1.isNull(e)||this.advancedCriteriaSubject.next(e);}constructor(e,i,o){super(e,o),this.session=i,this.advancedCriteriaSubject=new Yt(null),this.advancedCriteriaObserver=this.criteriaSubject.pipe(Se(N$1.isNotNull));}getCriteriaFromAdvancedCriteria(e){let i=new Ne,o=this.criteria||new Ne;return i.orderBy=o.orderBy,i.pageSize=this.session.shortPageSize,i.pageIndex=o.pageIndex,i.systemId=e.systemId,i.defaultSearch=e.defaultSearch,i.recordTypeId=e.recordTypeId,i.recordId=e.recordId,i.date1From=e.date1From,i.date1To=e.date1To,i.decimal1From=e.decimal1From,i.decimal1To=e.decimal1To,i.identifier=e.identifier,i.value1=e.value1,i.value2=e.value2,i.value3=e.value3,i.recordStatusIds=e.recordStatusIds,i}generateCachedSearchResults(){}ngOnDestroy(){super.ngOnDestroy(),this.advancedCriteriaSubject.complete();}static{this.\u0275fac=function(i){return new(i||t)(pe(Le),pe(Lb),pe(q))};}static{this.\u0275prov=Pe({token:t,factory:t.\u0275fac});}}return t})();var pn=t=>({"oppt-hide":t}),mn=(t,d)=>["/assetrecord",t,"records",d];function un(t,d){if(t&1&&(w(0,"th",12),Ee(1),S()),t&2){let e=X$1();E(),Zn$1(" ",e.identifierCaption," ");}}function hn(t,d){if(t&1&&(w(0,"td",13),Ee(1),S()),t&2){let e=d.$implicit;E(),Zn$1(" ",e.identifier," ");}}function fn(t,d){if(t&1&&(w(0,"th",12),Ee(1),S()),t&2){let e=X$1();E(),Zn$1(" ",e.recordStatusCaption," ");}}function vn(t,d){if(t&1&&(w(0,"td",13),Ee(1),S()),t&2){let e=d.$implicit;E(),Zn$1(" ",e.recordStatus," ");}}function gn(t,d){if(t&1&&(w(0,"th",12),Ee(1),S()),t&2){let e=X$1();E(),Zn$1(" ",e.value1Caption," ");}}function Cn(t,d){if(t&1&&(w(0,"td",13),Ee(1),S()),t&2){let e=d.$implicit;E(),Zn$1(" ",e.value1," ");}}
1function yn(t,d){if(t&1&&(w(0,"th",12),Ee(1),S()),t&2){let e=X$1();E(),Zn$1(" ",e.value2Caption," ");}}function bn(t,d){if(t&1&&(w(0,"td",13),Ee(1),S()),t&2){let e=d.$implicit;E(),Zn$1(" ",e.value2," ");}}function xn(t,d){if(t&1&&(w(0,"th",12),Ee(1),S()),t&2){let e=X$1();E(),Zn$1(" ",e.value3Caption," ");}}function _n(t,d){if(t&1&&(w(0,"td",13),Ee(1),S()),t&2){let e=d.$implicit;E(),Zn$1(" ",e.value3," ");}}function Sn(t,d){if(t&1&&(w(0,"th",12),Ee(1),S()),t&2){let e=X$1();E(),Zn$1(" ",e.value4Caption," ");}}function Tn(t,d){if(t&1&&(w(0,"td",13),Ee(1),S()),t&2){let e=d.$implicit;E(),Zn$1(" ",e.value4," ");}}function In(t,d){if(t&1&&(w(0,"th",12),Ee(1),S()),t&2){let e=X$1();E(),Zn$1(" ",e.value5Caption," ");}}function wn(t,d){if(t&1&&(w(0,"td",13),Ee(1),S()),t&2){let e=d.$implicit;E(),Zn$1(" ",e.value5," ");}}function Rn(t,d){if(t&1&&(w(0,"th",12),Ee(1),S()),t&2){let e=X$1();E(),Zn$1(" ",e.value6Caption," ");}}function Mn(t,d){if(t&1&&(w(0,"td",13),Ee(1),S()),t&2){let e=d.$implicit;E(),Zn$1(" ",e.value6," ");}}function En(t,d){if(t&1&&(w(0,"th",12),Ee(1),S()),t&2){let e=X$1();E(),Zn$1(" ",e.value7Caption," ");}}function Nn(t,d){if(t&1&&(w(0,"td",13),Ee(1),S()),t&2){let e=d.$implicit;E(),Zn$1(" ",e.value7," ");}}function Dn(t,d){t&1&&Ce$1(0,"tr",14);}function kn(t,d){if(t&1&&Ce$1(0,"tr",15),t&2){let e=d.$implicit,i=X$1();le("routerLink",Rd(2,mn,i.recordTypeRoute,e.recordId))("routerLinkActive","mat-row-selected");}}var di=(()=>{class t{get orderBy(){return this.searchService.getOrderByClause(this.sort)}set orderBy(e){this.searchService.setMatSort(this.sort,e);}get pageSize(){return N$1.isNull(this.pager)?this.session.shortPageSize:this.pager.pageSize}set pageSize(e){N$1.isNull(this.pager)||(this.pager.pageSize=e);}get pageIndex(){return N$1.isNull(this.pager)?0:this.pager.pageIndex}set pageIndex(e){N$1.isNull(this.pager)||(this.pager.pageIndex=e);}get pageChanged(){return this.pager.page}get sortChanged(){return this.sort.sortChange}constructor(e,i,o){this.searchService=e,this.session=i,this.recordType=o,this.ngUnsubscribe=new P,this.opptShow=false,this.value1ColumnName="value1long",this.value2ColumnName="value2long",this.value3ColumnName="value3long",this.value4ColumnName="value4long",this.value5ColumnName="value5long",this.value6ColumnName="value6long",this.value7ColumnName="value7long",this.value1Caption=null,this.value2Caption=null,this.value3Caption=null,this.value4Caption=null,this.value5Caption=null,this.value6Caption=null,this.value7Caption=null,this.identifierCaption=null,this.recordStatusCaption=null,this.recordTypeRoute=null,this.baseDisplayColumns=["identifier","recordStatus"],this.displayedColumns=["identifier","recordStatus"];}ngAfterViewInit(){this.recordType.entityChanges.pipe(zn$1(100),Oe(this.ngUnsubscribe)).subscribe(e=>{this.recordTypeRoute=e?.openPointRoute,this.identifierCaption=this.recordType.entity?.identifierCaption,this.recordStatusCaption=this.recordType.entity?.recordStatusCaption,this.value1Caption=this.recordType.tableColumn1?.shortCaption,this.value2Caption=this.recordType.tableColumn2?.shortCaption,this.value3Caption=this.recordType.tableColumn3?.shortCaption,this.value4Caption=this.recordType.tableColumn4?.shortCaption,this.value5Caption=this.recordType.tableColumn5?.shortCaption,this.value6Caption=this.recordType.tableColumn6?.shortCaption,this.value7Caption=this.recordType.tableColumn7?.shortCaption,N$1.isNullOrEmpty(this.recordType.tableColumn1)||N$1.isNullOrEmpty(this.recordType.tableColumn1.maximumLength)||this.recordType.tableColumn1.maximumLength<=50?this.value1ColumnName="value1":this.value1ColumnName="value1long",N$1.isNullOrEmpty(this.recordType.tableColumn2)||N$1.isNullOrEmpty(this.recordType.tableColumn2.maximumLength)||this.recordType.tableColumn2.maximumLength<=50?this.value2ColumnName="value2":this.value2ColumnName="value2long",N$1.isNullOrEmpty(this.recordType.tableColumn3)||N$1.isNullOrEmpty(this.recordType.tableColumn3.maximumLength)||this.recordType.tableColumn3.maximumLength<=50?this.value3ColumnName="value3":this.value3ColumnName="value3long",N$1.isNullOrEmpty(this.recordType.tableColumn4)||N$1.isNullOrEmpty(this.recordType.tableColumn4.maximumLength)||this.recordType.tableColumn4.maximumLength<=50?this.value4ColumnName="value4":this.value4ColumnName="value4long",N$1.isNullOrEmpty(this.recordType.tableColumn5)||N$1.isNullOrEmpty(this.recordType.tableColumn5.maximumLength)||this.recordType.tableColumn5.maximumLength<=50?this.value5ColumnName="value5":this.value5ColumnName="value5long",N$1.isNullOrEmpty(this.recordType.tableColumn6)||N$1.isNullOrEmpty(this.recordType.tableColumn6.maximumLength)||this.recordType.tableColumn6.maximumLength<=50?this.value6ColumnName="value6":this.value6ColumnName="value6long",N$1.isNullOrEmpty(this.recordType.tableColumn7)||N$1.isNullOrEmpty(this.recordType.tableColumn7.maximumLength)||this.recordType.tableColumn7.maximumLength<=50?this.value7ColumnName="value7":this.value7ColumnName="value7long";let i=[...this.baseDisplayColumns];N$1.isNotNullOrEmpty(this.value1Caption)&&i.push(this.value1ColumnName),N$1.isNotNullOrEmpty(this.value2Caption)&&i.push(this.value2ColumnName),N$1.isNotNullOrEmpty(this.value3Caption)&&i.push(this.value3ColumnName),N$1.isNotNullOrEmpty(this.value4Caption)&&i.push(this.value4ColumnName),N$1.isNotNullOrEmpty(this.value5Caption)&&i.push(this.value5ColumnName),N$1.isNotNullOrEmpty(this.value6Caption)&&i.push(this.value6ColumnName),N$1.isNotNullOrEmpty(this.value7Caption)&&i.push(this.value7ColumnName),this.displayedColumns=i;},e=>{console.log(e);}),this.searchService.metadata().pipe(od(0),Be(1)).subscribe(e=>{this.meta=e;});}trackRecordBy(e,i){return i?i.recordId:void 0}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(ot),ce(Lb),
1ce(L$1))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-record-table"]],viewQuery:function(i,o){if(i&1&&et(RQ,5)($9,5),i&2){let c;q$1(c=$())&&(o.sort=c.first),q$1(c=$())&&(o.pager=c.first);}},inputs:{opptShow:"opptShow"},standalone:false,decls:37,vars:22,consts:[["paginator",""],["mat-table","","matSort","",1,"oppt-table",3,"dataSource","trackBy"],["matColumnDef","identifier"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","recordStatus"],[3,"matColumnDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"routerLink","routerLinkActive",4,"matRowDef","matRowDefColumns"],[3,"hidden"],["pageIndex","0",3,"length","pageSize"],[1,"oppt-fab-space"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row","",3,"routerLink","routerLinkActive"]],template:function(i,o){i&1&&(w(0,"div")(1,"table",1),em(2,2),Ht(3,un,2,1,"th",3)(4,hn,2,1,"td",4),tm(),em(5,5),Ht(6,fn,2,1,"th",3)(7,vn,2,1,"td",4),tm(),em(8,6),Ht(9,gn,2,1,"th",3)(10,Cn,2,1,"td",4),tm(),em(11,6),Ht(12,yn,2,1,"th",3)(13,bn,2,1,"td",4),tm(),em(14,6),Ht(15,xn,2,1,"th",3)(16,_n,2,1,"td",4),tm(),em(17,6),Ht(18,Sn,2,1,"th",3)(19,Tn,2,1,"td",4),tm(),em(20,6),Ht(21,In,2,1,"th",3)(22,wn,2,1,"td",4),tm(),em(23,6),Ht(24,Rn,2,1,"th",3)(25,Mn,2,1,"td",4),tm(),em(26,6),Ht(27,En,2,1,"th",3)(28,Nn,2,1,"td",4),tm(),Ht(29,Dn,1,0,"tr",7)(30,kn,1,5,"tr",8),S(),w(31,"div",9),Fq(32,"async"),Ce$1(33,"mat-paginator",10,0),Fq(35,"async"),S(),Ce$1(36,"div",11),S()),i&2&&(Lt$1(Uw(20,pn,!o.opptShow)),E(),le("dataSource",o.searchService)("trackBy",o.trackRecordBy),E(7),le("matColumnDef",o.value1ColumnName),E(3),le("matColumnDef",o.value2ColumnName),E(3),le("matColumnDef",o.value3ColumnName),E(3),le("matColumnDef",o.value4ColumnName),E(3),le("matColumnDef",o.value5ColumnName),E(3),le("matColumnDef",o.value6ColumnName),E(3),le("matColumnDef",o.value7ColumnName),E(3),le("matHeaderRowDef",o.displayedColumns),E(),le("matRowDefColumns",o.displayedColumns),E(),le("hidden",Bq(32,16,o.searchService.noPaging)),E(2),le("length",Bq(35,18,o.searchService.totalRecords))("pageSize",o.session.shortPageSize));},dependencies:[$9,RQ,pMe,xMe,MMe,NMe,AMe,TMe,PMe,RMe,OMe,FMe,LMe,fv,bW,W8],styles:[".oppt-table[_ngcontent-%COMP%]{width:100%}.mat-column-value1[_ngcontent-%COMP%], .mat-column-value1long[_ngcontent-%COMP%], .mat-column-value2[_ngcontent-%COMP%], .mat-column-value2long[_ngcontent-%COMP%], .mat-column-value3[_ngcontent-%COMP%], .mat-column-value3long[_ngcontent-%COMP%], .mat-column-value4[_ngcontent-%COMP%], .mat-column-value4long[_ngcontent-%COMP%], .mat-column-value5[_ngcontent-%COMP%], .mat-column-value5long[_ngcontent-%COMP%], .mat-column-value6[_ngcontent-%COMP%], .mat-column-value6long[_ngcontent-%COMP%], .mat-column-value7[_ngcontent-%COMP%], .mat-column-value7long[_ngcontent-%COMP%]{display:none}@media(min-width:600px){.mat-column-value1[_ngcontent-%COMP%]{display:table-cell}.mat-column-value1long[_ngcontent-%COMP%]{display:none}}@media(min-width:960px){.mat-column-value2[_ngcontent-%COMP%], .mat-column-value2long[_ngcontent-%COMP%], .mat-column-value3[_ngcontent-%COMP%], .mat-column-value3long[_ngcontent-%COMP%]{display:table-cell}}@media(min-width:1280px){.mat-column-value4[_ngcontent-%COMP%], .mat-column-value4long[_ngcontent-%COMP%], .mat-column-value5[_ngcontent-%COMP%], .mat-column-value5long[_ngcontent-%COMP%], .mat-column-value7[_ngcontent-%COMP%], .mat-column-value7long[_ngcontent-%COMP%]{display:table-cell}}"],changeDetection:1});}}return t})();function jn(t,d){if(t&1&&(w(0,"mat-option",9),Ee(1),S()),t&2){let e=d.$implicit;le("value",e.recordStatusId),E(),Ge(e.description);}}function Un(t,d){if(t&1&&(w(0,"div",4)(1,"oppt-form-field",13)(2,"mat-form-field"),Ce$1(3,"mat-label")(4,"input",14),N4(),Ce$1(5,"mat-datepicker-toggle",15)(6,"mat-datepicker",16,1),S()(),w(8,"oppt-form-field",13)(9,"mat-form-field"),Ce$1(10,"mat-label")(11,"input",17),N4(),Ce$1(12,"mat-datepicker-toggle",15)(13,"mat-datepicker",16,2),S()()()),t&2){let e=vn$1(7),i=vn$1(14),o=X$1(2);E(4),le("min",o.minDate)("max",o.maxDate)("matDatepicker",e),F4(),E(),le("for",e),E(6),le("min",o.minDate)("max",o.maxDate)("matDatepicker",i),F4(),E(),le("for",i);}}function Ln(t,d){t&1&&(w(0,"oppt-form-field",5)(1,"mat-form-field"),Ce$1(2,"mat-label")(3,"input",18),N4(),S()()),t&2&&(E(3),F4());}function Bn(t,d){t&1&&(w(0,"oppt-form-field",5)(1,"mat-form-field"),Ce$1(2,"mat-label")(3,"input",19),N4(),S()()),t&2&&(E(3),F4());}function An(t,d){t&1&&(w(0,"oppt-form-field",5)(1,"mat-form-field"),Ce$1(2,"mat-label")(3,"input",20),N4(),S()()),t&2&&(E(3),F4());}function zn(t,d){t&1&&(w(0,"oppt-form-field",5)(1,"mat-form-field"),Ce$1(2,"mat-label")(3,"input",21),N4(),S()()),t&2&&(E(3),F4());}function $n(t,d){if(t&1){let e=gn$1();w(0,"mat-dialog-content")(1,"form",3,0),he("submit",function(){Ct(e);let o=X$1();return wt(o.done())}),w(3,"div",4)(4,"oppt-form-field",5)(5,"mat-form-field"),Ce$1(6,"mat-label")(7,"input",6),N4(),S()(),w(8,"oppt-form-field",5)(9,"mat-form-field")(10,"mat-label"),Ee(11),S(),Ce$1(12,"input",7),N4(),S()()(),w(13,"div",4)(14,"oppt-form-field",5)(15,"mat-form-field")(16,"mat-label"),Ee(17),S(),w(18,"mat-select",8),sa$1(19,jn,2,2,"mat-option",9,Td),S(),N4(),S()()(),be(21,Un,15,8,"div",4),w(22,"div",4),be(23,Ln,4,0,"oppt-form-field",5),be(24,Bn,4,0,"oppt-form-field",5),S(),w(25,"div",4),be(26,An,4,0,"oppt-form-field",5),be(27,zn,4,0,"oppt-form-field",5),S()()(),w(28,"div",10)(29,"button",11),he("click",function(){Ct(e);let o=X$1();return wt(o.cancel())}),Ee(30,"Cancel"),S(),w(31,"button",11),he("click",function(){Ct(e);let o=X$1();return wt(o.reset())}),Ee(32,"Reset criteria"),S(),w(33,"button",12),Ee(34,"Search"),S()();}if(t&2){let e=X$1();E(),le("formGroup",e.meta.form)("formMetadata",e.meta),E(6),F4(),E(4),Ge(e.recordType.entity?.identifierCaption),E(),F4(),E(5),Ge(e.recordType.entity?.recordStatusCaption),E(),F4(),E(),ca$1(e.recordStatusOptions),E(2),ye(e.showDate1?21:-1),E(2),ye(e.showValue1?23:-1),E(),ye(e.showValue2?24:-1),E(2),ye(e.showValue3?26:-1),E(),ye(e.showValue4?27:-1),E(6),le("disabled",e.cannotSearch);}}var Vo=(()=>{class t{get cannotSearch(){return z.isInvalid(this.form)}
1constructor(e,i,o,c,l,u){this.searchService=e,this.recordType=i,this.recordService=o,this.session=c,this.ngChanges=l,this.dialogRef=u,this.ngUnsubscribe=new P,this.minDate=p.minDate,this.maxDate=p.maxDate,this.recordStatusOptions=[],this.showValue1=false,this.showValue2=false,this.showValue3=false,this.showValue4=false,this.showDate1=false,this.title="Advanced search",this.isVisible=false;}done(){if(this.cannotSearch)return;let e=this.searchService.advancedCriteria;N$1.isNull(e)?e=new Ue:e=Object.assign({},e),this.meta.update(e),e.systemId=this.session.systemId,this.dialogRef.close(e);}reset(){let e=new Ue;e.pageSize=this.session.shortPageSize,this.meta.loadFrom(e);}cancel(){this.dialogRef.close();}ngAfterViewInit(){Dn$1([this.recordService.metadata(),this.recordType.entityChanges]).pipe(od(0),Oe(this.ngUnsubscribe)).subscribe(e=>{let i=wo(e[0].metadataList);this.showDate1=false,this.showValue1=false,this.showValue2=false,this.showValue3=false,this.showValue4=false;let o=e[1].recordStatuses;if(N$1.isNotNullOrEmpty(o)?this.recordStatusOptions=o:this.recordStatusOptions=[],this.showValue1=this.setupColumn(this.recordType.tableColumn1,i),this.showValue2=this.setupColumn(this.recordType.tableColumn2,i),this.showValue3=this.setupColumn(this.recordType.tableColumn3,i),this.showValue4=this.setupColumn(this.recordType.tableColumn4,i),this.recordType.tableDate1&&(this.showDate1=true,i.date1From.caption=this.recordType.tableDate1.caption+" from",i.date1To.caption=this.recordType.tableDate1.caption+" to"),N$1.isNull(this.meta)){let l=new M(i,this.session);this.form=l.createFormGroup(["defaultSearch","identifier","recordStatusIds","value1","value2","value3","value4","date1From","date1To"]),this.meta=new C(l,this.form);}let c=this.searchService.advancedCriteria||new Ue;this.meta.loadFrom(c),this.isVisible=true,this.ngChanges.detectChanges();});}setupColumn(e,i){return e&&e.dataType==="string"&&(e.controlName==="textbox"||e.controlName==="textarea")?(i["value"+e.tableColumnNumber.toString()].caption=e.caption,true):false}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(ot),ce(L$1),ce(Te),ce(Lb),ce(Fe),ce(_p))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-record-search"]],standalone:false,decls:1,vars:1,consts:[["formRef",""],["dateFromPick",""],["dateToPick",""],["id","recordSearchForm","novalidate","",3,"submit","formGroup","formMetadata"],[1,"flex-form"],[1,"flex-min-150","flex-100p-lt-sm"],["matInput","","formControlName","defaultSearch","maxlength","50","type","text","autocomplete","off"],["matInput","","formControlName","identifier","maxlength","100","type","text","autocomplete","off"],["multiple","true","formControlName","recordStatusIds","multiple",""],[3,"value"],["mat-dialog-actions","","align","end"],["mat-stroked-button","","type","button","color","primary",3,"click"],["mat-raised-button","","type","submit","color","primary","form","recordSearchForm",3,"disabled"],[1,"flex-min-150"],["matInput","","formControlName","date1From","autocomplete","off",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["touchUi","true"],["matInput","","formControlName","date1To","autocomplete","off",3,"min","max","matDatepicker"],["matInput","","formControlName","value1","maxlength","100","type","text","autocomplete","off"],["matInput","","formControlName","value2","maxlength","100","type","text","autocomplete","off"],["matInput","","formControlName","value3","maxlength","100","type","text","autocomplete","off"],["matInput","","formControlName","value4","maxlength","100","type","text","autocomplete","off"]],template:function(i,o){i&1&&be(0,$n,35,10),i&2&&ye(o.isVisible?0:-1);},dependencies:[Z_e,t1,W_e,Y_e,KW,eu,mY,os,kL,rZ,FZ,Tu,Tr$1,hDe,vF,jK,lc,ga$1,Cb,ns,nb,ob,GF,Du],styles:["[_nghost-%COMP%]     .mat-dialog-content{max-height:55vh}"],changeDetection:1});}}return t})();function Hn(t,d){t&1&&Ce$1(0,"mat-progress-bar",14);}var Po=(()=>{class t{constructor(e,i,o,c){this.fb=e,this.session=i,this.dialogRef=o,this.changeRef=c,this.ngUnsubscribe=new P,this.cannotSave=true,this.busy=false,this.form=e.group({import:""});}ngAfterViewInit(){this.form.get("import").valueChanges.pipe(Oe(this.ngUnsubscribe),zn$1(100)).subscribe(e=>{N$1.isNullOrEmpty(e)||this.busy?this.cannotSave===false&&(this.cannotSave=true):this.cannotSave===true&&(this.cannotSave=false);});}save(){if(!(this.busy||this.cannotSave))try{this.busy=!0,this.form.disable(),this.dialogRef.close(this.form.get("import").value);}catch(e){console.log(e);}finally{this.busy=false,this.form.enable();}}cancel(){this.dialogRef.close();}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(tve),ce(Lb),
1ce(_p),ce(Fe))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-records-import-dialog"]],standalone:false,decls:32,vars:3,consts:[["formRef",""],["mat-dialog-title",""],[1,"mat-h1"],[1,"oppt-instructions"],[1,"mat-h4"],["mat-dialog-content","","opptScroller","",3,"keydown.control.enter"],[3,"formGroup"],[1,"flex-form"],[1,"flex-100p"],["matInput","","formControlName","import","type","text","autocomplete","off","placeholder","Paste rows here"],["align","end"],["mat-stroked-button","","type","button","color","primary",3,"click"],["mat-raised-button","","type","button","color","primary",3,"click","disabled"],[1,"oppt-progress-bar-wrapper"],["mode","indeterminate"]],template:function(i,o){i&1&&(w(0,"div",1)(1,"h1",2),Ee(2,"Import new records from Excel"),S(),w(3,"div",3)(4,"h4",4),Ee(5,"1. Copy "),w(6,"code"),Ee(7,"Ctrl+C"),S(),Ee(8," the header and rows from Excel."),S(),w(9,"h4",4),Ee(10,"2. Paste "),w(11,"code"),Ee(12,"Ctrl+V"),S(),Ee(13," into the text box below."),S()()(),w(14,"div",5),he("keydown.control.enter",function(){return o.save()}),w(15,"form",6,0)(17,"div",7)(18,"div",8)(19,"mat-form-field")(20,"mat-label"),Ee(21,"Import"),S(),Ce$1(22,"textarea",9),N4(),S()()()(),w(23,"h4",4),Ee(24,"You will receive an email when the import is complete"),S()(),w(25,"mat-dialog-actions",10)(26,"button",11),he("click",function(){return o.cancel()}),Ee(27,"Cancel"),S(),w(28,"button",12),he("click",function(){return o.save()}),Ee(29,"Import"),S()(),w(30,"div",13),be(31,Hn,1,0,"mat-progress-bar",14),S()),i&2&&(E(15),le("formGroup",o.form),E(7),F4(),E(6),le("disabled",o.cannotSave),E(3),ye(o.busy?31:-1));},dependencies:[Z_e,t1,W_e,Y_e,eu,mY,os,FZ,_a$1,Tu,Tr$1,cc,lc,ga$1,Cb,ns,nb,Su],encapsulation:2,changeDetection:1});}}return t})();var Nt=(()=>{class t{constructor(e,i,o){this.service=e,this.recordType=i,this.session=o,this.ngUnsubscribe=new P,this.shouldShow=false,this.statuses=new Yt([]),this.totalRecords=new Yt(0),this.busy=new Yt(false),this.refreshSubject=new P,this.refresh=()=>{this.refreshSubject.next(void 0);},Dn$1([this.recordType.entityChanges,this.refreshSubject]).pipe(Xt(c=>{this.busy.next(true),this.statuses.next([]),this.totalRecords.next(0);let l=c[0];return N$1.isNullOrEmpty(l)?An$1:(this.shouldShow=N$1.isNotNull(this.recordType.tableDate1),this.service.getRecordDate1Overview(l.recordTypeId))}),zn$1(10),Oe(this.ngUnsubscribe),Rn$1(c=>{this.statuses.next(c),this.totalRecords.next(c.length),this.busy.next(false);}),Oe(this.ngUnsubscribe)).subscribe(c=>{},c=>{console.log(c),this.busy.next(false);}),this.refresh();}ngOnDestroy(){this.statuses.complete(),this.busy.complete(),this.totalRecords.complete(),this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(pe(Le),pe(L$1),pe(Lb))};}static{this.\u0275prov=Pe({token:t,factory:t.\u0275fac});}}return t})();var Ii=AI(TL());function Wn(t,d){if(t&1){let e=gn$1();w(0,"button",12),he("click",function(){Ct(e);let o=X$1(2);return wt(o.refresh())}),w(1,"mat-icon",13),Ee(2,"refresh"),S()();}}function qn(t,d){t&1&&(w(0,"div",4),Ce$1(1,"mat-progress-spinner",14),S());}function Yn(t,d){if(t&1){let e=gn$1();w(0,"mat-card",17),he("click",function(){Ct(e);let o=X$1().$implicit,c=X$1(2);return wt(c.search(o))}),w(1,"mat-icon",18),Ee(2,"search"),S(),w(3,"mat-card-header")(4,"mat-card-title-group",19)(5,"mat-card-title",20),Ee(6),Fq(7,"number"),S()()(),Ce$1(8,"div",21),w(9,"mat-card-content",22)(10,"h1",23),Ee(11),S()()();}if(t&2){let e=X$1().$implicit;le("@fadeIn",void 0)("matTooltip","Search for "+e.year+" records"),E(6),Ge(Vq(7,4,e.recordCount,"1.0")),E(5),Zn$1("Year ",e.year);}}function Kn(t,d){t&1&&Ce$1(0,"mat-card",16),t&2&&le("@fadeIn",void 0);}function Qn(t,d){if(t&1&&be(0,Yn,12,7,"mat-card",15)(1,Kn,1,1,"mat-card",16),t&2){let i=d.$implicit;ye((i.year===null||i.year<1e3)?1:0);}}function Jn(t,d){if(t&1){let e=gn$1();w(0,"div",0)(1,"div",1)(2,"h2",2),Ee(3),S(),be(4,Wn,3,0,"button",3)(5,qn,2,0,"div",4),S(),w(6,"div",5)(7,"div",6),sa$1(8,Qn,2,1,null,null,UG().trackYearBy,true),S(),w(10,"div",7)(11,"button",8),Fq(12,"async"),he("click",function(){Ct(e);let o=X$1();return wt(o.goToPreviousPage())}),w(13,"mat-icon",9),Ee(14,"keyboard_arrow_left"),S()()(),w(15,"div",10)(16,"button",8),Fq(17,"async"),he("click",function(){Ct(e);let o=X$1();return wt(o.goToNextPage())}),w(18,"mat-icon",11),Ee(19,"keyboard_arrow_right"),S()()()()();}if(t&2){let i=X$1();E(3),Ge(i.title),E(),ye((i.busy)===false?4:5),E(4),ca$1(i.list),E(3),le("disabled",Bq(12,4,i.cannotGoPrevious)),E(5),le("disabled",Bq(17,6,i.cannotGoNext));}}var Uo=(()=>
1{class t{constructor(e,i,o,c,l){this.service=e,this.recordType=i,this.changeRef=o,this.session=c,this.breakpoints=l,this.ngUnsubscribe=new P,this.advancedSearch=new B,this.title="Records by year",this.list=[],this.busy=true,this.bandSize=new Yt(0),this.index=new Yt(0),this.cannotGoPrevious=this.index.pipe(ue(u=>u<=0),Oe(this.ngUnsubscribe)),this.repopulate=new P,this.refresh=()=>{this.service.refresh();},this.populate=u=>{let g=this.bandSize.getValue();this.breakpoints.isMatched(s.lg)?g!==5&&(this.bandSize.next(5),this.index.next(0)):this.breakpoints.isMatched(s.md)?g!==4&&(this.bandSize.next(4),this.index.next(0)):this.breakpoints.isMatched(s.sm)?g!==3&&(this.bandSize.next(3),this.index.next(0)):this.breakpoints.isMatched(s.xs)?g!==2&&(this.bandSize.next(2),this.index.next(0)):g!==7&&(this.bandSize.next(7),this.index.next(0));let b=u.length,R=this.index.getValue();R>b&&(this.index.next(0),R=0);let ee=R+this.bandSize.getValue();ee>b&&(ee=b);let G=[];R<=b&&(G=u.slice(R,ee));let he=this.bandSize.getValue()-G.length;for(let te=he;te>0;te--){let I=new li;I.recordCount=te,G.push(I);}this.list=G;},this.cannotGoNext=Dn$1([this.service.totalRecords.pipe(Zo$1()),this.bandSize,this.index]).pipe(ue(u=>{let g=u[0],b=u[1];return u[2]+b>=g}),Oe(this.ngUnsubscribe)),Dn$1([this.service.statuses,this.breakpoints.observe([s.xs,s.sm,s.md,s.lg,s.xl]).pipe(Nt$1(null)),this.repopulate.pipe(Nt$1(null))]).pipe(zn$1(400),Oe(this.ngUnsubscribe)).subscribe(u=>{this.populate(u[0]);},u=>console.log(u));}search(e){this.recordType.entityChanges.pipe(Be(1)).subscribe(i=>{if(N$1.isNull(i))return;let o=new Ue;o.pageSize=this.session.shortPageSize,o.recordTypeId=this.recordType.entity.recordTypeId,o.date1From=(0, Ii.default)(e.year.toString()+"0101","YYYYMMDD").format("MM/DD/YYYY"),o.date1To=(0, Ii.default)(e.year.toString()+"1231","YYYYMMDD").format("MM/DD/YYYY"),o.recordStatusIds=[];for(let c of i.recordStatuses)c.isActive&&o.recordStatusIds.push(c.recordStatusId);this.advancedSearch.emit(o);});}goToNextPage(){this.service.busy.getValue()||this.cannotGoNext.pipe(Be(1)).subscribe(e=>{if(e)return;let i=this.index.getValue()+this.bandSize.getValue();this.index.next(i),this.repopulate.next(void 0);});}goToPreviousPage(){this.service.busy.getValue()||this.cannotGoPrevious.pipe(Be(1)).subscribe(e=>{if(e)return;let i=this.index.getValue()-this.bandSize.getValue();i>=0?(this.index.next(i),this.repopulate.next(void 0)):this.index.getValue()!==0&&(this.index.next(0),this.repopulate.next(void 0));});}ngAfterViewInit(){this.service.busy.pipe(od(10),Oe(this.ngUnsubscribe)).subscribe(e=>{this.busy!==e&&(this.busy=e);});}trackYearBy(e,i){return i.year===null?i.recordCount:i.year}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete(),this.bandSize.complete(),this.index.complete(),this.repopulate.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(Nt),ce(L$1),ce(Fe),ce(Lb),ce(kl))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-record-date1-band"]],outputs:{advancedSearch:"advancedSearch"},standalone:false,decls:1,vars:1,consts:[[1,"oppt-band-host"],[1,"flex-row"],[1,"mat-h2","oppt-m0","flex-self-center"],["type","button","mat-icon-button",""],[1,"oppt-refresh-spinner"],[1,"oppt-band"],[1,"oppt-band-cards","flex-fill-gap","flex-row","flex-gap-10",2,"order","2"],[1,"oppt-pager-wrapper",2,"order","1"],["type","button","mat-mini-fab","","color","primary",3,"click","disabled"],["aria-label","Previous statuses"],[1,"oppt-pager-wrapper",2,"order","3"],["aria-label","Next statuses"],["type","button","mat-icon-button","",3,"click"],["aria-label","refresh","color","primary"],["mode","indeterminate","diameter","20","strokeWidth","2"],["appearance","outlined",1,"flex-min-150",3,"matTooltip"],["appearance","outlined",1,"flex-min-150","oppt-empty-card"],["appearance","outlined",1,"flex-min-150",3,"click","matTooltip"],[1,"oppt-card-background-icon"],[1,"flex-justify-end"],[1,"mat-headline-3","oppt-m0"],[1,"flex-fill-gap"],[1,"flex-row","flex-justify-end"],[1,"oppt-mr5"]],template:function(i,o){i&1&&be(0,Jn,20,8,"div",0),i&2&&ye(o.service.shouldShow?0:-1);},dependencies:[zCe,ec,ZCe,e0e,i0e,XCe,JCe,wu,Txe,Ml,W8,X8],encapsulation:2,data:{animation:[x]},changeDetection:1});}}return t})();var Zn=(t,d)=>["/assetrecord",t,"records",d];function er(t,d){if(t&1){let e=gn$1();w(0,"button",12),he("click",function(){Ct(e);let o=X$1();return wt(o.refresh())}),w(1,"mat-icon",13),Ee(2,"refresh"),S()();}}function tr(t,d){t&1&&(w(0,"div",4),Ce$1(1,"mat-progress-spinner",14),S());}function ir(t,d){if(t&1&&(w(0,"mat-card",15)(1,"mat-card-header")(2,"mat-card-title-group")(3,"mat-card-title"),Ee(4),S(),w(5,"mat-card-subtitle"),Ee(6),S()()()()),t&2){let e=X$1().$implicit,i=X$1();le("routerLink",Rd(4,Zn,i.recordTypeRoute,e.recordId))("@fadeIn",void 0),E(4),Ge(e.identifier),E(2),Ge(e.recordStatus);}}function or(t,d){t&1&&Ce$1(0,"mat-card",16),t&2&&le("@fadeIn",void 0);}function nr(t,d){if(t&1&&be(0,ir,7,7,"mat-card",15)(1,or,1,1,"mat-card",16),t&2){let i=d.$implicit;ye((i.recordId===null)?1:0);}}var Lo=(()=>
1{class t{constructor(e,i,o,c){this.service=e,this.recordType=i,this.changeRef=o,this.breakpoints=c,this.ngUnsubscribe=new P,this.list=[],this.busy=true,this.bandSize=new Yt(0),this.index=new Yt(0),this.cannotGoPrevious=this.index.pipe(ue(l=>l<=0),Oe(this.ngUnsubscribe)),this.recordTypeRoute="",this.repopulate=new P,this.refresh=()=>{this.service.refresh();},this.populate=l=>{let u=this.bandSize.getValue();this.breakpoints.isMatched(s.lg)?u!==5&&(this.bandSize.next(5),this.index.next(0)):this.breakpoints.isMatched(s.md)?u!==4&&(this.bandSize.next(4),this.index.next(0)):this.breakpoints.isMatched(s.sm)?u!==3&&(this.bandSize.next(3),this.index.next(0)):this.breakpoints.isMatched(s.xs)?u!==2&&(this.bandSize.next(2),this.index.next(0)):u!==7&&(this.bandSize.next(7),this.index.next(0));let g=l.length,b=this.index.getValue();b>g&&(this.index.next(0),b=0);let R=b+this.bandSize.getValue();R>g&&(R=g);let ee=[];b<=g&&(ee=l.slice(b,R));let G=this.bandSize.getValue()-ee.length;for(let he=G;he>0;he--){let te=new ci;te.identifier="_"+he.toString(),ee.push(te);}this.list=ee;},this.cannotGoNext=Dn$1([this.service.totalRecords.pipe(Zo$1()),this.bandSize,this.index]).pipe(ue(l=>{let u=l[0],g=l[1];return l[2]+g>=u}),Oe(this.ngUnsubscribe));}goToNextPage(){this.service.busy.getValue()||this.cannotGoNext.pipe(Be(1)).subscribe(e=>{if(e)return;let i=this.index.getValue()+this.bandSize.getValue();this.index.next(i),this.repopulate.next(void 0);});}goToPreviousPage(){this.service.busy.getValue()||this.cannotGoPrevious.pipe(Be(1)).subscribe(e=>{if(e)return;let i=this.index.getValue()-this.bandSize.getValue();i>=0?(this.index.next(i),this.repopulate.next(void 0)):this.index.getValue()!==0&&(this.index.next(0),this.repopulate.next(void 0));});}ngAfterViewInit(){Dn$1([this.service.recent,this.breakpoints.observe([s.xs,s.sm,s.md,s.lg,s.xl]).pipe(Nt$1(null)),this.repopulate.pipe(Nt$1(null))]).pipe(zn$1(400),Oe(this.ngUnsubscribe)).subscribe(e=>{this.populate(e[0]);},e=>console.log(e)),this.recordType.entityChanges.pipe(zn$1(10),Oe(this.ngUnsubscribe)).subscribe(e=>{this.recordTypeRoute=e?.openPointRoute;}),this.service.busy.pipe(zn$1(10),Oe(this.ngUnsubscribe)).subscribe(e=>{this.busy!==e&&(this.busy=e);});}trackRecordBy(e,i){return i.recordId===null?i.identifier:i.recordId}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete(),this.bandSize.complete(),this.index.complete(),this.repopulate.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(Et),ce(L$1),ce(Fe),ce(kl))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-record-recent-band"]],standalone:false,decls:20,vars:7,consts:[[1,"oppt-band-host"],[1,"flex-row"],[1,"mat-h2","oppt-m0","flex-self-center"],["type","button","mat-icon-button",""],[1,"oppt-refresh-spinner"],[1,"oppt-band"],[1,"oppt-band-cards","flex-fill-gap","flex-row","flex-gap-10",2,"order","2"],[1,"oppt-pager-wrapper",2,"order","1"],["type","button","mat-mini-fab","","color","primary",3,"click","disabled"],["aria-label","Previous records"],[1,"oppt-pager-wrapper",2,"order","3"],["aria-label","Next records"],["type","button","mat-icon-button","",3,"click"],["aria-label","refresh","color","primary"],["mode","indeterminate","diameter","20","strokeWidth","2"],["appearance","outlined","matTooltip","Go to record overview",1,"flex-min-150",3,"routerLink"],["appearance","outlined",1,"flex-min-150","oppt-empty-card"]],template:function(i,o){if(i&1&&(w(0,"div",0)(1,"div",1)(2,"h2",2),Ee(3,"Recent records"),S(),be(4,er,3,0,"button",3)(5,tr,2,0,"div",4),S(),w(6,"div",5)(7,"div",6),sa$1(8,nr,2,1,null,null,o.trackRecordBy,true),S(),w(10,"div",7)(11,"button",8),Fq(12,"async"),he("click",function(){return o.goToPreviousPage()}),w(13,"mat-icon",9),Ee(14,"keyboard_arrow_left"),S()()(),w(15,"div",10)(16,"button",8),Fq(17,"async"),he("click",function(){return o.goToNextPage()}),w(18,"mat-icon",11),Ee(19,"keyboard_arrow_right"),S()()()()()),i&2){E(4),ye((o.busy)===false?4:5),E(4),ca$1(o.list),E(3),le("disabled",Bq(12,3,o.cannotGoPrevious)),E(5),le("disabled",Bq(17,5,o.cannotGoNext));}},dependencies:[zCe,ec,ZCe,i0e,t0e,XCe,JCe,wu,Txe,Ml,fv,W8],encapsulation:2,data:{animation:[x]},changeDetection:1});}}return t})();var ar=(t,d)=>d.componentId;function sr(t,d){if(t&1){let e=gn$1();w(0,"button",7),he("click",function(){Ct(e);let o=X$1().$implicit,c=X$1(2);return wt(c.routeTo(o))}),Ee(1),S();}if(t&2){let e=X$1().$implicit;le("disabled",e.route==null),E(),Zn$1(" ",e.name," ");}}function cr(t,d){if(t&1&&(w(0,"a",6),Ee(1),S()),t&2){let e=X$1().$implicit;le("href",e.uri,BM)("target",e.openNewWindow?"_blank":""),E(),Zn$1(" ",e.name," ");}}function lr(t,d){if(t&1&&be(0,sr,2,2,"button",5)(1,cr,2,3,"a",6),t&2){let i=d.$implicit;ye((i.uri===null)?0:1);}}function dr(t,d){if(t&1&&(w(0,"mat-card",0)(1,"mat-card-header",1)(2,"mat-card-title"),Ee(3,"Links"),S(),Ce$1(4,"div",2),w(5,"mat-icon"),Ee(6,"link"),S()(),w(7,"mat-card-content",3),Ce$1(8,"div",4),sa$1(9,lr,2,1,null,null,ar),S()()),t&2){let e=X$1();E(9),ca$1(e.components);}}var Bo=(()=>
1{class t{constructor(e,i,o,c,l){this.session=e,this.router=i,this.route=o,this.lookup=c,this.changeRef=l,this.ngUnsubscribe=new P,this.components=[],this.anyLinks=false;}ngAfterViewInit(){this.lookup.availableComponentsObserver.pipe(zn$1(400),Oe(this.ngUnsubscribe)).subscribe(e=>{this.components=e.filter(i=>i.componentLocationCode==="recordlinksdashboard"),this.components.length>0&&(this.anyLinks=true);});}routeTo(e){this.router.navigate([`/${e.route}`]);}trackComponentBy(e,i){return i?i.componentId:void 0}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(Lb),ce(Ki),ce(ko),ce(A3e),ce(Fe))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-record-links-card"]],standalone:false,decls:1,vars:1,consts:[["appearance","outlined",1,"oppt-job-trans-card"],[1,"oppt-primary-background","oppt-pb5"],[1,"flex-fill-gap"],[1,"flex-column"],[1,"oppt-mb5"],["mat-button","","type","button","color","primary",1,"oppt-menu-button",3,"disabled"],["mat-button","","type","button","color","primary",1,"oppt-menu-button",3,"href","target"],["mat-button","","type","button","color","primary",1,"oppt-menu-button",3,"click","disabled"]],template:function(i,o){i&1&&be(0,dr,11,0,"mat-card",0),i&2&&ye(o.anyLinks?0:-1);},dependencies:[Tr$1,ZCe,e0e,i0e,XCe,wu],styles:[".mat-mdc-card-content[_ngcontent-%COMP%]{height:180px;overflow-y:auto;padding:0 8px}"],data:{animation:[x]},changeDetection:1});}}return t})();var Ao=t=>({"oppt-hide":t});function ur(t,d){if(t&1){let e=gn$1();em(0,1),w(1,"button",14),he("click",function(){Ct(e);let o=X$1();return wt(o.modeChanged({value:"dashboard"}))}),w(2,"mat-icon"),Ee(3,"arrow_back"),S()(),w(4,"div",15)(5,"h4",16),Ee(6),S(),w(7,"h5",16),Ee(8),S()(),tm();}if(t&2){let e=X$1();E(6),Ge(e.title),E(2),Ge(e.searchService.resultsText);}}function hr(t,d){if(t&1){let e=gn$1();em(0,1),w(1,"button",17),he("click",function(){Ct(e);let o=X$1();return wt(o.cradle.toggleLeftNav())}),w(2,"mat-icon"),Ee(3,"menu"),S()(),w(4,"h3",16),Ee(5),S(),tm();}if(t&2){let e=X$1();E(5),Ge(e.title);}}function fr(t,d){if(t&1&&(w(0,"div",4)(1,"div",18)(2,"div",19)(3,"div",20)(4,"h1",21),Ee(5),S()()()()()),t&2){let e=X$1();E(5),Ge(e.title);}}function vr(t,d){if(t&1){let e=gn$1();w(0,"button",22),he("click",function(){Ct(e);let o=X$1();return wt(o.import())}),w(1,"mat-icon"),Ee(2,"publish"),S()();}}function gr(t,d){if(t&1){let e=gn$1();w(0,"button",23),he("click",function(){Ct(e);let o=X$1();return wt(o.addNew())}),w(1,"mat-icon"),Ee(2,"add"),S()();}}function Cr(t,d){t&1&&Ce$1(0,"oppt-not-found-state",10);}var zo=(()=>{class t{get mode(){return this.cache.retrieveInMemory("recordDashboardMode","dashboard")}set mode(e){this.cache.stashInMemory("recordDashboardMode",e);}constructor(e,i,o,c,l,u,g,b,R,ee,G,he,te){this.searchService=e,this.recordType=i,this.service=o,this.date1Service=c,this.cradle=l,this.session=u,this.dialog=g,this.dialogService=b,this.changeRef=R,this.router=ee,this.matDialog=G,this.lookup=he,this.cache=te,this.ngUnsubscribe=new P,this.busy=true,this.showNotFoundState=false,this.showList=false,this.title=null,this.canCreate=false,this.importEnabled=true,this.setState=(I,B)=>{if(this.busy=I,I||this.searchService.criteria===null){this.showNotFoundState&&(this.showNotFoundState=false),this.showList&&(this.showList=false);return}B?(this.showList||(this.showList=true),this.showNotFoundState&&(this.showNotFoundState=false)):(this.showList&&(this.showList=false),this.showNotFoundState||(this.showNotFoundState=true));},this.advancedSearch=I=>{if(N$1.isNull(this.recordType.entity?.recordTypeId))return;this.searchService.advancedCriteria=I;let B=this.searchService.getCriteriaFromAdvancedCriteria(I);B.recordTypeId=this.recordType.entity?.recordTypeId,B.systemId=this.session.systemId,B.pageIndex=0,B.pageSize=this.session.shortPageSize,this.search.opptSearchText=B.defaultSearch,this.table.orderBy=B.orderBy,this.table.pageSize=B.pageSize,this.table.pageIndex=B.pageIndex,this.searchService.criteria=B,this.mode="list";},this.setCriteria=(I=false)=>{let B=this.getCriteria();return I?(this.searchService.criteria=B,true):(N$1.isShallowEqual(B,this.searchService.criteria)||(this.searchService.criteria=B),true)},this.getCriteria=()=>
1{if(N$1.isNull(this.recordType.entity?.recordTypeId))return null;let I=null;return N$1.isNotNull(this.searchService.advancedCriteria)?I=this.searchService.getCriteriaFromAdvancedCriteria(this.searchService.advancedCriteria):I=new Ne,I.defaultSearch=this.search.opptSearchText,I.recordTypeId=this.recordType.entity?.recordTypeId,I.systemId=this.session.systemId,I.orderBy=this.table.orderBy,I.pageSize=this.session.shortPageSize,I.pageIndex=this.table.pageIndex,I},this.addNew=()=>{let I=this.recordType.entity.openPointRoute;N$1.isNullOrEmpty(I)||this.router.navigate(["/assetrecord",I,"records","new"]);},this.import=()=>{let I=this.matDialog.open(Po,{width:"100%",maxWidth:"800px"}),B=null;Dn$1([I.afterClosed(),this.session.systemIdObserver,this.recordType.entityChanges]).pipe(od(10),Oe(this.ngUnsubscribe),Be(1),Dt$1(fe=>N$1.isNullOrEmpty(fe[0])||N$1.isNull(fe[2])?An$1:(B=this.dialogService.Working("Scheduling import","Please wait..."),this.service.importRecords(fe[0],fe[1],fe[2].recordTypeId,"Import scheduled")))).subscribe(fe=>{try{B&&B.close();}catch(xe){}fe.resultType!=="Failure"&&this.dialogService.ShowMessage("Import successfully scheduled. You will receive an email when it is complete.");},fe=>{try{console.log(fe),B&&B.close();}catch(xe){}});};}ngAfterViewInit(){this.searchService.metadata().pipe(od(0),Be(1)).subscribe(e=>{this.meta=e,N$1.isNotNull(this.searchService.criteria)&&(this.search.opptSearchText=this.searchService.criteria.defaultSearch,this.table.orderBy=this.searchService.criteria.orderBy,this.table.pageSize=this.searchService.criteria.pageSize,this.table.pageIndex=this.searchService.criteria.pageIndex);}),this.search.opptSearchTextChange.pipe(zn$1(400),Oe(this.ngUnsubscribe)).subscribe(e=>{N$1.isNull(this.recordType.entity?.recordTypeId)||(this.table.pageIndex=0,this.searchService.advancedCriteria=this.getAdvancedCriteriaFromSimpleSearch(),this.setCriteria(true),this.mode="list");}),this.recordType.entityChanges.pipe(zn$1(200),Oe(this.ngUnsubscribe)).subscribe(e=>{if(this.canCreate=this.session.claimCheck(hc.RecordEdit,this.session.systemId),!N$1.isNull(this.recordType.entity)){if(this.title=N$1.capitalize(this.recordType.entity.namePlural),this.recordType.entity?.systemId!==this.session.systemId){this.router.navigate(["/assets"]);return}this.mode==="list"&&this.setCriteria();}}),this.table.sortChanged.pipe(zn$1(400),Oe(this.ngUnsubscribe)).subscribe(e=>{N$1.isNull(this.recordType.entity)||this.mode==="list"&&(this.table.pageIndex=0,this.setCriteria());}),this.table.pageChanged.pipe(zn$1(200),Oe(this.ngUnsubscribe)).subscribe(e=>{if(this.session.systemId!==this.recordType.entity?.systemId){this.router.navigate(["/assets"]);return}this.mode==="list"&&(this.setCriteria(),this.changeRef.detectChanges());}),Dn$1([this.searchService.busy,this.searchService.anyResults]).pipe(zn$1(10),Oe(this.ngUnsubscribe)).subscribe(e=>{this.setState(e[0],e[1]);}),this.searchService.busy.pipe(zn$1(10),Oe(this.ngUnsubscribe)).subscribe(e=>{this.busy=e;});}showAdvancedSearch(){this.dialog.open(Vo,{width:"100%",maxWidth:"800px",position:{right:"5px",top:"5px"}}).afterClosed().pipe(od(10),Oe(this.ngUnsubscribe),Be(1)).subscribe(i=>{N$1.isNull(i)||this.advancedSearch(i);});}getAdvancedCriteriaFromSimpleSearch(){if(N$1.isNull(this.recordType.entity?.recordTypeId))return null;let e=new Ue;return e.pageSize=this.session.shortPageSize,e.defaultSearch=this.search.opptSearchText,e.systemId=this.session.systemId,e.recordTypeId=this.recordType.entity?.recordTypeId,e}goToList(){this.mode="list",this.searchService.criteria===null&&this.setCriteria();}modeChanged(e){this.mode=e.value,e.value==="list"&&this.goToList();}add(){if(this.canCreate){if(this.importEnabled===false){this.addNew();return}this.addTrigger.toggleMenu();}}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(ot),ce(L$1),ce(Te),ce(Nt),ce(k),ce(Lb),ce(vp),ce(Mu),ce(Fe),ce(Ki),ce(vp),ce(A3e),ce(Pb))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-record-dashboard"]],viewQuery:function(i,o){if(i&1&&et(di,5)(_Z,5)(Oke,5),i&2){let c;
1q$1(c=$())&&(o.table=c.first),q$1(c=$())&&(o.search=c.first),q$1(c=$())&&(o.addTrigger=c.first);}},standalone:false,decls:19,vars:18,consts:[["opptToolbarColor","primary","opptBackground","dark",1,"oppt-host",3,"opptBusy","opptMaxWidth","opptNoScrollNoBorder"],["opptToolbarLeft",""],["opptToolbarRight","",1,"flex-row"],["placeholder","Search",3,"opptMoreClick","opptMore"],[1,"oppt-heading","oppt-primary"],["opptBottomRightFab","",1,"flex-row","flex-gap-10","flex-place-center-start"],["mat-mini-fab","","color","accent","aria-label","Import new records","type","button","matTooltip","Import new records"],["mat-fab","","color","accent","aria-label","Create a new record","type","button","matTooltip","Create a new record"],[1,"flex-column"],[3,"opptShow"],["titleCaption","No records found for this search"],[3,"advancedSearch"],[1,"oppt-widget-spacer"],[1,"oppt-fab-space"],["mat-icon-button","","type","button","matTooltip","Go to dashboard",3,"click"],[1,"flex-column","oppt-heading-wrapper"],[1,"oppt-white-color"],["mat-icon-button","","type","menu",3,"click"],[1,"oppt-heading-section-host","flex-row"],[1,"oppt-heading-section","flex-auto","flex-column","flex-place-start-end"],[1,"oppt-heading-wrapper"],[1,"mat-h1"],["mat-mini-fab","","color","accent","aria-label","Import new records","type","button","matTooltip","Import new records",3,"click"],["mat-fab","","color","accent","aria-label","Create a new record","type","button","matTooltip","Create a new record",3,"click"]],template:function(i,o){if(i&1&&(w(0,"oppt-section",0),be(1,ur,9,2,"ng-container",1)(2,hr,6,1,"ng-container",1),w(3,"div",2)(4,"oppt-toolbar-search",3),he("opptMoreClick",function(){return o.showAdvancedSearch()}),S()(),be(5,fr,6,1,"div",4),w(6,"div",5),be(7,vr,3,0,"button",6),be(8,gr,3,0,"button",7),S(),w(9,"div",8)(10,"div"),Ce$1(11,"oppt-record-table",9),be(12,Cr,1,0,"oppt-not-found-state",10),S(),w(13,"div"),Ce$1(14,"oppt-record-recent-band"),w(15,"oppt-record-date1-band",11),he("advancedSearch",function(l){return o.advancedSearch(l)}),S(),Ce$1(16,"div",12)(17,"oppt-record-links-card")(18,"div",13),S()()()),i&2){le("opptBusy",o.busy)("opptMaxWidth",2e3)("opptNoScrollNoBorder",true),E(),ye((o.mode)==="list"?1:2),E(3),le("opptMore",true),E(),ye(o.mode!=="list"?5:-1),E(2),ye(o.canCreate?7:-1),E(),ye(o.canCreate?8:-1),E(2),Lt$1(Uw(14,Ao,o.mode!=="list")),E(),le("opptShow",o.showList),E(),ye(o.showNotFoundState?12:-1),E(),Lt$1(Uw(16,Ao,o.mode==="list"));}},dependencies:[xZ,_Z,hZ,zCe,ec,jCe,wu,Ml,di,Uo,Lo,Bo],encapsulation:2,changeDetection:1});}}return t})();var Ni=(()=>{class t{static{this.uniqueIdentifierValidatorKey="nameTaken";}static uniqueIdentifierValidator(e,i,o){return c=>N$1.isNull(c.valueChanges)?Y(null):c.valueChanges.pipe(zn$1(400),Be(1),Xt(l=>c.pristine&&N$1.isNotNullOrEmpty(l)?Y(false):this.isIdentifierTaken(l,e,i,o).pipe(jn$2(u=>Y(true)))),ue(l=>l?{nameTaken:true}:null))}static isIdentifierTaken(e,i,o,c){return this.getRecord(e,o,c).pipe(ue(l=>N$1.isNull(l)?false:l.recordId.toUpperCase()!==i.toUpperCase()))}static getRecord(e,i,o){if(N$1.isNull(e)||e==="")return Y(null);let c=new Ne;return c.identifier=e,c.recordTypeId=i,c.pageSize=1,o.search(c).pipe(ue(l=>l.totalRecords===0?null:l.list[0]))}}return t})();var L=(()=>{class t extends z{get identifierFieldDisabled(){return this._identifierFieldDisabled}set identifierFieldDisabled(e){this._identifierFieldDisabled=e,this.afterDisabledChanged();}constructor(e,i,o,c,l,u){super(),this.service=e,this.recordTypeOverview=i,this.lookupService=o,this.lookups=c,this.session=l,this.tenantCodeLookup=u,this.ngUnsubscribe=new P,this.dynamicForm=null,this.dynamicFormFields=null,this.dynamicMeta=null,this._identifierFieldDisabled=false,this.id=new Yt(null),this.statisticsSubject=new Yt(new Bt),this.tenantCodes=[],this.getCannotSave=()=>this.formChanges.pipe(Xt(g=>N$1.isNull(g)?Y(false):Kt(g.statusChanges.pipe(Nt$1(null)),this.loading,this.busy,this.canEdit).pipe(ue(()=>!this.canEdit.getValue()||this.loading.getValue()||this.busy.getValue()?true:z.cannotSave(g,false)))),Be(1)),this.populateOptions=(g,b)=>{if(!N$1.isNull(g))for(let R=0,ee=g.length;R<ee;R++){let G=g[R];N$1.isNullOrEmpty(G.tenantCodeType)||(G.options=this.tenantCodes.reduce((he,te)=>((te.systemId==null||te.systemId===b)&&te.codeType===G.tenantCodeType&&he.push(te.code),he),[]),G.options.includes(G.value)||G.options.push(G.value));}},this.serverService=e,this.formFields=["identifier","recordStatusId","dynamicValues"],Dn$1([this.formChanges,this.recordTypeOverview.entityChanges]).pipe(zn$1(100),Oe(this.ngUnsubscribe),ue(g=>{if(N$1.isNull(this.entity)||N$1.isNull(this.recordTypeOverview.entity)||N$1.isNullOrEmpty(this.recordTypeOverview.entity?.openPointRoute))return this.canEdit.next(true),null;let b={recordId:this.entity?.recordId,openPointRoute:this.entity.record.openPointRoute};return this.session.claimCheck(hc.RecordEdit,this.recordTypeOverview.entity.systemId)?(this.canEdit.next(true),b):(this.canEdit.next(false),b)}),Se(N$1.isNotNull),Zo$1(),Rn$1(g=>{this.id.next(g);}),Oe(this.ngUnsubscribe)).subscribe(g=>{}),this.formChanges.pipe(zn$1(200),Oe(this.ngUnsubscribe),Xt(g=>(this.statisticsSubject.next(new Bt),N$1.isNotNullOrEmpty(this.entity?.recordId)?this.service.getStatistics(this.entity.recordId):An$1)),Oe(this.ngUnsubscribe),Rn$1(g=>{this.statisticsSubject.next(g);}),Oe(this.ngUnsubscribe)).subscribe(g=>{},g=>{console.log(g);}),this.initializeLookups();}initializeLookups(){}get cannotSave(){return this.formChanges.pipe(Xt(e=>N$1.isNull(e)?Y(true):Kt(e.statusChanges.pipe(Nt$1(null)),this.loading,this.busy,this.canEdit).pipe(ue(()=>{if(!this.canEdit.getValue()||this.loading.getValue()||this.busy.getValue()||N$1.isNull(e))return  true;let i=e.get("dynamicValues").value;if(e.invalid||i.invalid)return  true;for(let o in e.controls){if(!e.controls.hasOwnProperty(o))continue;let c=e.controls[o];if(c.constructor.name===K_e.name){if(z.isInvalid(c))return  true;continue}if(c.invalid||c.pending&&!c.pristine||c.constructor.name===K_e.name&&z.isInvalid(c)===true)return  true}for(let o in i.controls){if(!i.controls.hasOwnProperty(o))continue;let c=i.controls[o];if(c.constructor.name===K_e.name){if(z.isInvalid(c))return  true;continue}if(c.invalid||c.pending&&!c.pristine||c.constructor.name===K_e.name&&z.isInvalid(c)===true)return  true}return  false}))),Nt$1(true))}addCustomValidators(){this.addIdentifierValidator("identifier");}addIdentifierValidator(e){if(this.formFields.indexOf(e)===-1)return;this.meta.getControl(e).setAsyncValidators(Ni.uniqueIdentifierValidator(this.entity.recordId,this.entity.record.recordTypeId,this.lookupService)),this.meta.addMessage(e,Ni.uniqueIdentifierValidatorKey,`${this.meta.getCaption(e)} in use`);}afterDisabledChanged(){if(!(N$1.isNull(this.form)||N$1.isNull(this.dynamicForm))){if(this.form.disabled)this.dynamicForm.enabled&&this.dynamicForm.disable();else {this.dynamicForm.disabled&&this.dynamicForm.enable();let e=this.entity.values;for(let i=0,o=e.length;i<o;i++){let c=e[i],l=this.dynamicForm.get(c.recordValueTypeId);c.canEdit?l.disabled&&l.enable():l.enabled&&l.disable();}}if(this.identifierFieldDisabled?this.disableControl("identifier"):this.enableControl("identifier"),this.form.disabled)this.dynamicForm.enabled&&this.dynamicForm.disable();else {this.dynamicForm.disabled&&this.dynamicForm.enable();let e=this.entity.values;for(let i=0,o=e.length;i<o;i++){let c=e[i],l=this.dynamicForm.get(c.recordValueTypeId);c.canEdit?l.disabled&&l.enable():l.enabled&&l.disable();}}}}refresh(){return this.now=new Date,this.busy.pipe(Be(1),od(0),Dt$1(()=>this.resolveImmediate(this.id.getValue().recordId,this.formFields)))}resolveCreate(e=null){return this.now=new Date,this.busy.pipe(Be(1),od(0),Dt$1(()=>this.resolveCreateImmediate(e)))}resolveCreateImmediate(e=null){try{e!=null&&(this.formFields=e);let i=y2.newId();if(y2.isValidUuid(i))return this.resolveCreateById(i);throw this.busy.next(!1),new Error(`${this.serverService.entityType.capitalizedCaption} identifier invalid`)}catch(i){throw this.busy.next(false),i}}resolveCreateById(e,i=null){try{return this.busy.next(!0),this.loading.next(!0),this.show
1Form.next(!1),this.recordTypeOverview.entityChanges.pipe(Se(N$1.isNotNullOrEmpty),Xt(o=>Dn$1([this.service.getNewForm(e,o.openPointRoute),this.serverService.metadata(),this.tenantCodeLookup.list()])),Be(1),ue(o=>({entity:o[0],metadata:o[1],codes:o[2]})),Rn$1(o=>{this.tenantCodes=o.codes,this.form=null,this.meta=null,this.setEntity(o.metadata,o.entity),this.busy.next(!1),this.loading.next(!1),this.showForm.next(!0);},()=>{this.busy.next(!1);}),ue(o=>{if(N$1.isNullOrEmpty(o.entity))throw new Error(`${this.serverService.entityType.capitalizedCaption} not found`);return o.entity}))}catch(o){throw this.busy.next(false),console.log(o),new Error(`${this.serverService.entityType.capitalizedCaption} not found`)}}resetForm(){try{if(this.busy.getValue()||this.loading.getValue())return;this.busy.next(!0),this.loading.next(!0),this.showForm.next(!1),this.form=null,this.meta=null,this.serverService.metadata().pipe(Be(1),Rn$1(e=>{this.setEntity(e,this.entity),this.busy.next(!1),this.loading.next(!1),this.showForm.next(!0);})).subscribe(e=>{},e=>{console.log(e),this.busy.next(!1),this.loading.next(!1),this.showForm.next(!0);});}catch(e){throw this.busy.next(false),console.log(e),new Error(`${this.serverService.entityType.capitalizedCaption} not found`)}}resolve(e=null,i=null){return this.now=new Date,this.busy.pipe(Be(1),od(0),Dt$1(()=>this.resolveImmediate(e,i)))}resolveImmediate(e=null,i=null){try{if(i!=null&&(this.formFields=i),(N$1.isNullOrEmpty(e)||N$1.isSimilar(e,"new"))&&(e=y2.newId()),y2.isValidUuid(e))return this.resolveById(e);throw this.busy.next(!1),new Error(`${this.serverService.entityType.capitalizedCaption} identifier invalid`)}catch(o){throw this.busy.next(false),o}}resolveById(e){try{return this.busy.next(!0),this.loading.next(!0),this.showForm.next(!1),this.recordTypeOverview.entityChanges.pipe(Se(N$1.isNotNullOrEmpty),Xt(i=>Dn$1([this.service.getForm(e,i.openPointRoute),this.serverService.metadata(),this.tenantCodeLookup.list()])),Be(1),ue(i=>({entity:i[0],metadata:i[1],codes:i[2]})),Rn$1(i=>{this.tenantCodes=i.codes,this.form=null,this.meta=null,this.setEntity(i.metadata,i.entity),this.busy.next(!1),this.loading.next(!1),this.showForm.next(!0);},()=>{this.busy.next(!1);}),ue(i=>{if(N$1.isNullOrEmpty(i.entity))throw new Error(`${this.serverService.entityType.capitalizedCaption} not found`);return i.entity}))}catch(i){throw this.busy.next(false),console.log(i),new Error(`${this.serverService.entityType.capitalizedCaption} not found`)}}setEntity(e,i,o=true){if(this.populateOptions(i?.values,i?.record?.systemId),!this.form||!this.meta){this.dynamicFormFields=this.getDynamicFormFields(i?.values);let c=new M(i?.metadata,this.session);this.dynamicForm=c.createFormGroup([...this.dynamicFormFields]),this.dynamicMeta=new C(c,this.dynamicForm),this.setDynamicEntity(this.dynamicForm,i?.values),this.form=e.createFormGroup([...this.formFields]),this.disabled&&this.form.disable(),this.meta=new C(e,this.form);}this.entity=i,this.meta.loadFrom(this.entity?.record),this.form.get("dynamicValues").setValue(this.dynamicForm),N$1.isNotNull(this.entity?.record)&&this.addCustomValidators(),o&&this.notifyFormChanges();}getDynamicFormFields(e){if(N$1.isNull(e))return [];let i=[];for(let o=0,c=e.length;o<c;o++){let l=e[o].recordValueTypeId;i.push(l);}return i}setDynamicEntity(e,i){if(!N$1.isNull(i))for(let o=0,c=i.length;o<c;o++){let l=i[o],u=e.get(l.recordValueTypeId);if(l.canEdit?u.disabled&&u.enable():u.disabled||u.disable(),l.controlName==="datePicker"){if(N$1.isNullOrEmpty(l.value)||N$1.isDate(l.value)===false){u.setValue(null);continue}u.setValue(new Date(l.value));continue}if(l.controlName==="multiselect"||l.controlName==="checklist"){if(N$1.isNullOrEmpty(l.value)){u.setValue(null);continue}u.setValue(l.value.split(","));continue}if(l.controlName!=="switch"&&l.controlName!=="checkbox"){u.setValue(l.value);continue}if(N$1.isSimilar(l.value,"Yes")){u.setValue(true);continue}u.setValue(false);}}updateEntity(e,i){e.update(i.record),N$1.isNotNull(i.record)&&(i.record.values={},i.record.dynamicValues=null),i.record.values={};for(let o=0,c=i.values.length;o<c;o++){let l=i.values[o];if(N$1.isNull(l))continue;let u=this.dynamicForm.get(l.recordValueTypeId).value;if(l.controlName==="datePicker"){if(u instanceof Date){l.value=N$1.convertDateToString(u),i.record.values[l.recordValueTypeId]=l.value;continue}l.value=null,i.record.values[l.recordValueTypeId]=null;continue}if(l.controlName==="multiselect"||l.controlName==="checklist"){if(u===null||!Array.isArray(u)||u.length===0){l.value=null,i.record.values[l.recordValueTypeId]=null;continue}l.value=u.join(),i.record.values[l.recordValueTypeId]=l.value;continue}if(l.controlName!=="switch"&&l.controlName!=="checkbox"){N$1.isNullOrEmpty(u)?(l.value=null,i.record.values[l.recordValueTypeId]=null):(l.value=u,i.record.values[l.recordValueTypeId]=u);continue}if(u===true){l.value="Yes",i.record.values[l.recordValueTypeId]="Yes";continue}l.value="No",i.record.values[l.recordValueTypeId]="No";}}ngOnDestroy(){super.ngOnDestroy(),this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(pe(Te),pe(L$1),pe(Le),pe(A3e),pe(Lb),pe(x$1))};}static{this.\u0275prov=Pe({token:t,factory:t.\u0275fac});}}return t})();var $o=(()=>
1{class t{constructor(e,i,o,c,l,u){this.record=e,this.recordType=i,this.service=o,this.session=c,this.router=l,this.route=u,this.ngUnsubscribe=new P,this.onBeforeChangeSystemId=g=>{if(!(!this.record||this.record.loading.getValue())){if(this.record.busy.getValue()){g.cancel("Busy, please wait");return}this.service.pendingUpdates&&g.cancel("Busy, please wait");}},this.session.onBeforeSystemIdChange.on(this.onBeforeChangeSystemId);}ngAfterViewInit(){Dn$1([this.recordType.recordTypeRoute,this.route.params]).pipe(Oe(this.ngUnsubscribe),Zo$1((e,i)=>N$1.isSimilar(e[0],i[0])&&N$1.isSimilar(N$1.isNullOrEmpty(e[1])?null:e[1].recordId,N$1.isNullOrEmpty(i[1])?null:i[1].recordId)),Se(e=>N$1.isNotNull(e[0])),zn$1(10),Xt(e=>this.record.resolve(e[1].recordId,this.record.formFields)),Oe(this.ngUnsubscribe)).subscribe(e=>{N$1.isNull(this.record.entity)&&(N$1.isNotNullOrEmpty(this.recordType.recordTypeRoute.getValue())?this.router.navigate(["/assetrecord",this.recordType.recordTypeRoute.getValue(),"records"]):this.router.navigate(["/assets"]));},e=>{console.log(e),N$1.isNotNullOrEmpty(this.recordType.recordTypeRoute.getValue())?this.router.navigate(["/assetrecord",this.recordType.recordTypeRoute.getValue(),"records"]):this.router.navigate(["/assets"]);});}
1ngOnDestroy(){this.session.onBeforeSystemIdChange.off(this.onBeforeChangeSystemId),this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(L),ce(L$1),ce(Te),ce(Lb),ce(Ki),ce(ko))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-record"]],standalone:false,decls:1,vars:0,consts:[[1,"oppt-host"]],template:function(i,o){i&1&&Ce$1(0,"router-outlet",0);},dependencies:[iD],encapsulation:2,changeDetection:1});}}return t})();function yr(t,d){if(t&1&&(w(0,"div",1)(1,"h1",3),Ee(2),S(),w(3,"h5",4),Ee(4),S()()),t&2){let e=X$1();E(2),Ge(e.title),E(2),Ge(e.subtitle);}}var Ho=(()=>{class t{constructor(e,i,o){this.service=e,this.recordType=i,this.changeRef=o,this.ngUnsubscribe=new P,this.entity=null,this.title=null,this.subtitle=null,this.entityLoaded=false;}ngAfterViewInit(){Dn$1([this.recordType.entityChanges,this.service.formChanges]).pipe(Oe(this.ngUnsubscribe),zn$1(10)).subscribe(e=>{let i=e[0];if(this.entity=this.service.entity,N$1.isNull(i)||N$1.isNullOrEmpty(i.namePlural)?this.subtitle=null:this.subtitle=N$1.capitalize(i.namePlural),N$1.isNull(this.entity)){this.title=null;return}N$1.isNotNullOrEmpty(this.entity.record?.identifier)?(this.title=this.entity.record.identifier,this.subtitle=this.recordType.entity?.name):N$1.isNotNullOrEmpty(this.recordType.entity?.name)?(this.title=this.recordType.entity.name,this.subtitle=null):(this.title="Record",this.subtitle=null);},e=>{this.title=null,this.subtitle=null;}),Kt(this.service.busy,this.service.loading).pipe(zn$1(10),Oe(this.ngUnsubscribe)).subscribe(e=>{!this.service.loading.getValue()&&N$1.isNotNull(this.entity)?this.entityLoaded=true:this.entityLoaded=false;});}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(L),ce(L$1),ce(Fe))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-record-overview-header"]],standalone:false,decls:3,vars:1,consts:[[1,"oppt-heading-section-1"],[1,"oppt-heading-section-2"],[1,"oppt-heading-asside-spacer"],[1,"mat-h1"],[1,"mat-h5"]],template:function(i,o){i&1&&(w(0,"div",0),be(1,yr,5,2,"div",1),Ce$1(2,"div",2),S()),i&2&&(E(),ye(o.entityLoaded?1:-1));},styles:["[_nghost-%COMP%]{width:100%;height:70px;min-width:0;display:block;color:#fff}[_nghost-%COMP%]   .oppt-heading-section-1[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:row}[_nghost-%COMP%]   .oppt-heading-section-2[_ngcontent-%COMP%]{width:100%;height:70px;padding:0 8px 8px 72px;max-width:100%;overflow:hidden;text-overflow:ellipsis;word-wrap:break-word;text-wrap:none;flex-wrap:nowrap;overflow-wrap:break-word;overflow-y:hidden;overflow-x:hidden;word-break:break-all}[_nghost-%COMP%]   .oppt-heading-asside-spacer[_ngcontent-%COMP%]{flex:0 0 320px;width:320px;max-width:320px}[_nghost-%COMP%]   h1.mat-h1[_ngcontent-%COMP%], [_nghost-%COMP%]   h2.mat-h2[_ngcontent-%COMP%], [_nghost-%COMP%]   h3.mat-h3[_ngcontent-%COMP%], [_nghost-%COMP%]   h4.mat-h4[_ngcontent-%COMP%], [_nghost-%COMP%]   h5.mat-h5[_ngcontent-%COMP%], [_nghost-%COMP%]   h6.mat-h6[_ngcontent-%COMP%]{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;word-wrap:break-word;text-wrap:none;flex-wrap:nowrap;overflow-wrap:break-word;overflow-y:hidden;overflow-x:hidden;word-break:break-all;margin:0}[_nghost-%COMP%]   h1.mat-h1[_ngcontent-%COMP%]{max-height:32px}[_nghost-%COMP%]   h5.mat-h5[_ngcontent-%COMP%]{max-height:42px}@media(max-width:1279px){.oppt-heading-asside-spacer[_ngcontent-%COMP%]{display:none}}"],changeDetection:1});}}return t})();var xr=(t,d)=>["/assetrecord",t,"records",d,"attributes"];function _r(t,d){if(t&1&&(w(0,"div",2)(1,"p",8),Ee(2),S(),w(3,"p",4),Ee(4),S()()),t&2){let e=X$1().$implicit;E(2),Ge(e.value),E(2),Ge(e.caption);}}function Sr(t,d){if(t&1&&(w(0,"div",2)(1,"p",8),Ee(2),S(),w(3,"p",4),Ee(4),S()()),t&2){let e=X$1().$implicit;E(2),Ge(e.value),E(2),Ge(e.caption);}}function Tr(t,d){if(t&1&&(w(0,"div",2)(1,"p",3),Ee(2),S(),w(3,"p",4),Ee(4),S()()),t&2){let e=X$1().$implicit;E(2),Ge(e.value),E(2),Ge(e.caption);}}function Ir(t,d){if(t&1&&be(0,_r,5,2,"div",2)(1,Sr,5,2,"div",2)(2,Tr,5,2,"div",2),t&2){let e,i=d.$implicit;ye((e=i.controlName)==="textarea"?0:e==="multiselect"?1:2);}}function wr(t,d){if(t&1&&(w(0,"div",0)(1,"h2",1),Ee(2,"Attributes"),S(),w(3,"div",2)(4,"p",3),Ee(5),S(),w(6,"p",4),Ee(7),S()(),w(8,"div",2)(9,"p",3),Ee(10),S(),w(11,"p",4),Ee(12),S()(),sa$1(13,Ir,3,1,null,null,Td),w(15,"div",5)(16,"button",6),Ee(17,"Show more"),w(18,"mat-icon",7),Ee(19,"arrow_forward"),S()()()()),t&2){let e=X$1();E(5),Ge(e.entity.identifier),E(2),Ge(e.identifierCaption),E(3),Ge(e.entity.recordStatus),E(2),Ge(e.recordStatusCaption),E(),ca$1(e.fieldValues),E(3),le("routerLink",Rd(5,xr,e.recordTypeRoute,e.recordId));}}var Go=(()=>{class t{get meta(){return this.service.meta}get dynamicMeta(){return this.service.dynamicMeta}
1constructor(e,i,o,c){this.recordType=e,this.service=i,this.route=o,this.errorHandler=c,this.ngUnsubscribe=new P,this.recordId=null,this.recordTypeRoute=null,this.identifierCaption="Identifier",this.recordStatusCaption="Status",this.entity=null,this.fieldValues=[],this.showDForm=false;}ngAfterViewInit(){this.service.id.pipe(Oe(this.ngUnsubscribe),zn$1(10)).subscribe(e=>{this.recordId=e?.recordId,this.recordTypeRoute=e?.openPointRoute;}),this.recordType.entityChanges.pipe(zn$1(10),Oe(this.ngUnsubscribe),Rn$1(e=>{N$1.isNull(e)?(this.identifierCaption="Identifier",this.recordStatusCaption="Status"):(this.identifierCaption=e.identifierCaption,this.recordStatusCaption=e.recordStatusCaption);})).subscribe(e=>{},e=>{console.error(e);}),this.service.formChanges.pipe(zn$1(10),Oe(this.ngUnsubscribe),Rn$1(e=>{if(this.showDForm=false,this.entity=this.service.entity?.record,N$1.isNull(e))return;let i=[],o=this.service.entity?.values,c=0,l=0,u=4;for(let g=0,b=o.length;g<b;g++){let R=o[g];if(R.controlName!=="header"&&(c=c+1,!(c<=l)&&(N$1.isNotNullOrEmpty(R.value)&&(i.push(R),this.showDForm=true),
1c===u)))break}this.fieldValues=i;}),zn$1(10),Oe(this.ngUnsubscribe)).subscribe(e=>{},e=>{console.error(e);});}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(L$1),ce(L),ce(ko),ce(Au))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-record1-card"]],standalone:false,decls:1,vars:1,consts:[[1,"oppt-widget"],[1,"oppt-primary-color","oppt-mb10"],[1,"oppt-attribute"],[1,"oppt-attribute-value"],[1,"oppt-attribute-title","oppt-grey-color"],[1,"oppt-attribute","oppt-mt15","flex-row"],["type","button","mat-button","","color","primary",3,"routerLink"],["iconPositionEnd",""],[1,"oppt-attribute-value-md"]],template:function(i,o){i&1&&be(0,wr,20,8,"div",0),i&2&&ye(o.entity?0:-1);},dependencies:[Tr$1,wu,fv],styles:[".oppt-widget[_ngcontent-%COMP%]{margin:24px 8px 24px 16px}.mdc-button[_ngcontent-%COMP%]{margin-left:-8px}.oppt-feature-button[_ngcontent-%COMP%]{margin-left:-8px;text-align:left}"],changeDetection:1});}}return t})();var Mr=(t,d)=>["/assetrecord",t,"records",d,"attributes"];function Er(t,d){if(t&1&&(w(0,"div",5)(1,"p",6),Ee(2),S(),w(3,"p",7),Ee(4),S()()),t&2){let e=X$1().$implicit;E(2),Ge(e.value),E(2),Ge(e.caption);}}function Nr(t,d){if(t&1&&(w(0,"div",5)(1,"p",6),Ee(2),S(),w(3,"p",7),Ee(4),S()()),t&2){let e=X$1().$implicit;E(2),Ge(e.value),E(2),Ge(e.caption);}}function Dr(t,d){if(t&1&&(w(0,"div",5)(1,"p",8),Ee(2),S(),w(3,"p",7),Ee(4),S()()),t&2){let e=X$1().$implicit;E(2),Ge(e.value),E(2),Ge(e.caption);}}function kr(t,d){if(t&1&&be(0,Er,5,2,"div",5)(1,Nr,5,2,"div",5)(2,Dr,5,2,"div",5),t&2){let e,i=d.$implicit;ye((e=i.controlName)==="textarea"?0:e==="multiselect"?1:2);}}function Fr(t,d){if(t&1&&(w(0,"div",0)(1,"h2",1),Ee(2,"Attributes"),S(),sa$1(3,kr,3,1,null,null,Td),w(5,"div",2)(6,"button",3),Ee(7,"Show more"),w(8,"mat-icon",4),Ee(9,"arrow_forward"),S()()()()),t&2){let e=X$1();E(3),ca$1(e.fieldValues),E(3),le("routerLink",Rd(1,Mr,e.recordTypeRoute,e.recordId));}}var Wo=(()=>{class t{get meta(){return this.service.meta}get dynamicMeta(){return this.service.dynamicMeta}constructor(e,i,o){this.service=e,this.route=i,this.errorHandler=o,this.ngUnsubscribe=new P,this.recordId=null,this.recordTypeRoute=null,this.entity=null,this.fieldValues=[],this.showDForm=false;}ngAfterViewInit(){this.service.id.pipe(Oe(this.ngUnsubscribe),zn$1(10)).subscribe(e=>{this.recordId=e?.recordId,this.recordTypeRoute=e?.openPointRoute;}),this.service.formChanges.pipe(zn$1(10),Oe(this.ngUnsubscribe),Rn$1(e=>{if(this.showDForm=false,this.entity=this.service.entity?.record,N$1.isNull(e))return;let i=[],o=this.service.entity?.values,c=0,l=4,u=12;for(let g=0,b=o.length;g<b;g++){let R=o[g];if(R.controlName!=="header"&&(c=c+1,!(c<=l)&&(N$1.isNotNullOrEmpty(R.value)&&(i.push(R),this.showDForm=true),
1c===u)))break}this.fieldValues=i;}),zn$1(10),Oe(this.ngUnsubscribe)).subscribe(e=>{},e=>{console.error(e);});}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(L),ce(ko),ce(Au))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-record2-card"]],standalone:false,decls:1,vars:1,consts:[[1,"oppt-widget"],[1,"oppt-primary-color","oppt-mb10"],[1,"oppt-attribute","oppt-mt15","flex-row"],["type","button","mat-button","","color","primary",3,"routerLink"],["iconPositionEnd",""],[1,"oppt-attribute"],[1,"oppt-attribute-value-md"],[1,"oppt-attribute-title","oppt-grey-color"],[1,"oppt-attribute-value"]],template:function(i,o){i&1&&be(0,Fr,10,4,"div",0),i&2&&ye(o.entity?0:-1);},dependencies:[Tr$1,wu,fv],styles:[".oppt-widget[_ngcontent-%COMP%]{margin:24px 8px 24px 16px}.mdc-button[_ngcontent-%COMP%]{margin-left:-8px}.oppt-feature-button[_ngcontent-%COMP%]{margin-left:-8px;text-align:left}"],changeDetection:1});}}return t})();var qo=(t,d)=>d.componentId;function Pr(t,d){if(t&1&&(w(0,"span",11),Ee(1),S()),t&2){let e=X$1(2).$implicit;E(),Ge(e.asside);}}function jr(t,d){if(t&1){let e=gn$1();w(0,"button",7),he("click",function(){Ct(e);let o=X$1().$implicit,c=X$1(2);return wt(c.routeTo(o))}),w(1,"span",8)(2,"span",9),Ee(3),S(),Ce$1(4,"span",10),be(5,Pr,2,1,"span",11),S()();}if(t&2){let e=X$1().$implicit;le("disabled",e.route==null),E(3),Ge(e.name),E(2),ye(e.asside?5:-1);}}function Ur(t,d){if(t&1&&(w(0,"a",6),Ee(1),S()),t&2){let e=X$1().$implicit;le("href",e.uri,BM)("target",e.openNewWindow?"_blank":""),E(),Zn$1(" ",e.name," ");}}function Lr(t,d){if(t&1&&be(0,jr,6,3,"button",5)(1,Ur,2,3,"a",6),t&2){let i=d.$implicit;ye((i.uri===null)?0:1);}}function Br(t,d){t&1&&(w(0,"div",4),Ce$1(1,"mat-divider"),w(2,"h4",12),Ee(3,"Links"),S()());}function Ar(t,d){if(t&1&&(w(0,"span",11),Ee(1),S()),t&2){let e=X$1(2).$implicit;E(),Ge(e.asside);}}function zr(t,d){if(t&1){let e=gn$1();w(0,"button",7),he("click",function(){Ct(e);let o=X$1().$implicit,c=X$1(2);return wt(c.routeTo(o))}),w(1,"span",8)(2,"span",9),Ee(3),S(),Ce$1(4,"span",10),be(5,Ar,2,1,"span",11),S()();}if(t&2){let e=X$1().$implicit;le("disabled",e.route==null),E(3),Ge(e.name),E(2),ye(e.asside?5:-1);}}function $r(t,d){if(t&1&&(w(0,"a",6),Ee(1),S()),t&2){let e=X$1().$implicit;le("href",e.uri,BM)("target",e.openNewWindow?"_blank":""),E(),Zn$1(" ",e.name," ");}}function Hr(t,d){if(t&1&&be(0,zr,6,3,"button",5)(1,$r,2,3,"a",6),t&2){let i=d.$implicit;ye((i.uri===null)?0:1);}}function Gr(t,d){if(t&1&&(w(0,"div",3),sa$1(1,Lr,2,1,null,null,qo),be(3,Br,4,0,"div",4),sa$1(4,Hr,2,1,null,null,qo),S()),t&2){let e=X$1();le("@fadeIn",void 0),E(),ca$1(e.mainComponents),E(2),ye(e.linksComponents.length>0?3:-1),E(),ca$1(e.linksComponents);}}var Ko=(()=>{class t{constructor(e,i,o,c,l,u,g,b,R){this.recordType=e,this.service=i,this.session=o,this.router=c,this.route=l,this.lookup=u,this.changeRef=g,this.errorHandler=b,this.documentationService=R,this.ngUnsubscribe=new P,this.recordId=null,this.recordTypeRoute=null,this.loading=true,this.components=new Yt([]),this.mainComponents=[],this.linksComponents=[],this.buildComponents=(ee,G,he)=>ee.reduce((te,I)=>{if(I.componentLocationCode!=="recordmain"&&I.componentLocationCode!=="recordoverview")return te;let B=null,fe=null;if(N$1.isNullOrEmpty(I.route)){if(N$1.isNullOrEmpty(I.uri))return te;B=I.uri.replace(/{recordId}/gi,this.recordId),B=I.uri.replace(/{identifier}/gi,this.service.entity?.record?.identifier),B=I.uri.replace(/{recordTypeRoute}/gi,this.recordTypeRoute);}else {let zt=G.numbers[I.route];N$1.isNotNullOrEmpty(zt)&&zt>0&&(zt<1e3?fe=zt.toString():fe="1k+");}let xe=new t$1;return xe.name=I.name,xe.description=I.description,xe.materialImage=I.materialImage,xe.componentId=I.componentId,xe.componentLocationCode=I.componentLocationCode,xe.route=I.route,xe.uri=B,xe.asside=fe,xe.openNewWindow=I.openNewWindow,te.push(xe),te},[]);}ngAfterViewInit(){this.service.id.pipe(Oe(this.ngUnsubscribe),zn$1(10)).subscribe(e=>{this.recordId=e?.recordId,this.recordTypeRoute=e?.openPointRoute;}),Dn$1([this.lookup.availableComponentsObserver,this.service.statisticsSubject.pipe(Nt$1(null)),this.service.formChanges.pipe(Nt$1(null))]).pipe(zn$1(400),Oe(this.ngUnsubscribe)).subscribe(e=>{this.components.next(this.buildComponents(e[0],e[1],this.service.entity));}),Dn$1([this.components,this.search.opptSearchTextChange.pipe(Nt$1(""))]).pipe(zn$1(100),Oe(this.ngUnsubscribe)).subscribe(e=>{let i=e[0];this.mainComponents=i.filter(o=>o.componentLocationCode==="recordmain"&&N$1.stringContains(this.search.opptSearchText,[o.name,o.description])),this.linksComponents=i.filter(o=>o.componentLocationCode==="recordoverview"&&N$1.stringContains(this.search.opptSearchText,[o.name,o.description])),this.loading&&i.length>0&&(this.loading=false);}),N$1.isNotNull(this.sidenav)&&this.sidenav.closedStart.pipe(od(0),Oe(this.ngUnsubscribe)).subscribe(e=>{this.search.opptSearchText="";});}toggleNav(e){N$1.isNull(this.sidenav)||(N$1.isNull(e)?this.sidenav.toggle(
1):this.sidenav.toggle(e),this.sidenav.opened||(this.search.opptSearchText=""));}showDocumentation(){this.documentationService.tryDownloadAndOpen("client_record_overview");}routeTo(e){if(!N$1.isNull(this.service.entity)){if(e.route==="currentfeature"){let i=this.service.entity.recordId;if(N$1.isNullOrEmpty(i))return;this.router.navigate([`/records/${i}`]),this.toggleNav(false);return}this.router.navigate([`/assetrecord/${this.recordTypeRoute}/records/${this.recordId}/${e.route}`]),this.toggleNav(false);}}trackComponentBy(e,i){return i?i.componentId:void 0}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(L$1),ce(L),ce(Lb),ce(Ki),ce(ko),ce(A3e),ce(Fe),ce(Au),ce(v))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-record-nav"]],viewQuery:function(i,o){if(i&1&&et(_Z,5),i&2){let c;q$1(c=$())&&(o.search=c.first);}},inputs:{sidenav:"sidenav"},standalone:false,decls:5,vars:1,consts:[[1,"oppt-nav-widget-container","oppt-host","oppt-material-background","flex-column"],[1,"oppt-toolbar-widget","flex-auto","flex-row","flex-place-center-start","oppt-ml10","oppt-mb10"],[1,"oppt-overflow-auto-y"],[1,"flex-column","oppt-menu-items-container"],[1,"oppt-mt10","oppt-mb5"],["mat-button","","type","button",1,"oppt-menu-button","oppt-medium-button","mat-primary-darker",3,"disabled"],["mat-button","","type","button",1,"oppt-menu-button","oppt-medium-button","mat-primary-darker",3,"href","target"],["mat-button","","type","button",1,"oppt-menu-button","oppt-medium-button","mat-primary-darker",3,"click","disabled"],[1,"flex-row","oppt-w100p"],[1,"oppt-menu-text"],[1,"flex-fill-gap"],[1,"oppt-menu-count","flex-auto"],[1,"opt-dark-grey","oppt-ml10"]],template:function(i,o){i&1&&(w(0,"div",0)(1,"div",1),Ce$1(2,"oppt-toolbar-search"),S(),w(3,"div",2),be(4,Gr,6,2,"div",3),S()()),i&2&&(E(4),ye(o.loading?-1:4));},dependencies:[_Z,Tr$1,_7],styles:["[_nghost-%COMP%]{background:transparent;border-radius:18px}.oppt-nav-widget-container[_ngcontent-%COMP%]{border-radius:18px;overflow:hidden}.oppt-menu-items-container[_ngcontent-%COMP%]{padding:6px 4px}"],data:{animation:[x]},changeDetection:1});}}return t})();var qr=t=>["/assetrecord",t,"records"];function Yr(t,d){if(t&1){let e=gn$1();w(0,"button",13),he("click",function(){Ct(e),X$1();let o=vn$1(2);return wt(o.toggle())}),w(1,"mat-icon"),Ee(2,"menu"),S()();}}function Kr(t,d){t&1&&Ce$1(0,"oppt-record-nav",10);}function Qr(t,d){t&1&&(w(0,"div",12)(1,"div",14)(2,"div",15),Ce$1(3,"oppt-record1-card"),S(),w(4,"div",15),Ce$1(5,"oppt-record2-card"),S()(),Ce$1(6,"div",16),S());}var Qo=(()=>{class t{get meta(){return this.service.meta?.metaWrapper}get entity(){return this.service.entity}constructor(e,i,o,c,l,u,g,b,R,ee){this.router=e,this.session=i,this.service=o,this.serverService=c,this.recordType=l,this.route=u,this.changeRef=g,this.matDialog=b,this.documentationService=R,this.breakpoints=ee,this.ngUnsubscribe=new P,this.recordId=null,this.recordTypeRoute=null,this.showStaticDrawer=false,this.entityLoaded=false,this.loading=true,this.busy=true,this.ltLg=true,this.title=null,this.setBreakpoints=()=>{this.breakpoints.isMatched(s.ltLg)?this.ltLg=true:this.ltLg=false,this.changeRef.detectChanges();},this.onBeforeChangeSystemId=G=>{!this.service||this.service.loading.getValue()||(this.service.busy.getValue()||this.serverService.pendingUpdates.getValue())&&G.cancel("Busy, please wait");}
1,this.session.onBeforeSystemIdChange.on(this.onBeforeChangeSystemId);}ngOnInit(){this.setBreakpoints();}ngAfterViewInit(){this.service.id.pipe(Oe(this.ngUnsubscribe),zn$1(10)).subscribe(e=>{this.recordId=e?.recordId,this.recordTypeRoute=e?.openPointRoute;}),Kt(this.service.busy,this.service.loading,this.serverService.pendingUpdates).pipe(zn$1(10),Oe(this.ngUnsubscribe)).subscribe(e=>{this.busy=this.service.busy.getValue()||this.serverService.pendingUpdates.getValue(),this.loading=this.service.loading.getValue(),!this.loading&&N$1.isNotNull(this.entity)?this.entityLoaded=true:this.entityLoaded=false,this.changeRef.detectChanges();}),this.recordType.entityChanges.pipe(zn$1(10),Oe(this.ngUnsubscribe)).subscribe(e=>{if(N$1.isNull(e)){this.title=null;return}this.title=e.namePlural;}),this.breakpoints.observe(s.ltLg).pipe(zn$1(100),Oe(this.ngUnsubscribe)).subscribe(e=>{this.setBreakpoints();});}canDeactivate(){return !this.service||this.service.loading.getValue()?true:!this.service.busy.getValue()&&!this.serverService.pendingUpdates.getValue()}showDocumentation(){this.documentationService.tryDownloadAndOpen("client_record_overview");}
1ngOnDestroy(){this.session.onBeforeSystemIdChange.off(this.onBeforeChangeSystemId),this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(Ki),ce(Lb),ce(L),ce(Te),ce(L$1),ce(ko),ce(Fe),ce(vp),ce(v),ce(kl))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-record-overview"]],standalone:false,decls:19,vars:10,consts:[["rightnav",""],[1,"oppt-host"],["mode","over","position","end",1,"oppt-host"],[1,"oppt-record-nav"],[1,"oppt-host","flex-row"],[1,"flex-fill-gap"],["opptToolbarColor","primary-darker",1,"oppt-host",3,"opptBusy","opptMaxWidth","opptNoScrollNoBorder"],["opptToolbarLeft","","mat-icon-button","","type","button",3,"routerLink"],["opptToolbarLeft","",1,"mat-h3","oppt-toolbar-header"],["opptToolbarRight","","mat-icon-button","","type","menu"],["opptTopRightDrawer","",1,"oppt-hide-lt-lg","mat-elevation-z12","flex-280"],[1,"oppt-primary-darker"],[1,"flex-row","oppt-cards"],["opptToolbarRight","","mat-icon-button","","type","menu",3,"click"],[1,"oppt-cards","flex-full-screen","flex-row","flex-wrap"],[1,"oppt-details-section"],[1,"oppt-hide-lt-lg","flex-320"]],template:function(i,o){i&1&&(w(0,"mat-sidenav-container",1)(1,"mat-sidenav",2,0),Ce$1(3,"oppt-record-nav",3),S(),w(4,"mat-sidenav-content",1)(5,"div",4),Ce$1(6,"div",5),w(7,"oppt-section",6)(8,"button",7)(9,"mat-icon"),Ee(10,"arrow_back"),S()(),w(11,"h3",8),Ee(12),S(),be(13,Yr,3,0,"button",9),be(14,Kr,1,0,"oppt-record-nav",10),w(15,"div",1),Ce$1(16,"oppt-record-overview-header",11),be(17,Qr,7,0,"div",12),S()(),Ce$1(18,"div",5),S()()()),i&2&&(E(7),le("opptBusy",o.busy)("opptMaxWidth",2e3)("opptNoScrollNoBorder",true),E(),le("routerLink",Uw(8,qr,o.recordTypeRoute)),E(4),Ge(o.title),E(),ye(o.ltLg?13:-1),E(),ye(o.loading?-1:14),E(3),ye(o.entityLoaded?17:-1));},dependencies:[hZ,ec,wu,_Q,MTe,XF,fv,Ho,Go,Wo,Ko],styles:[".oppt-cards[_ngcontent-%COMP%]{margin:6px}.oppt-list-card[_ngcontent-%COMP%]{max-width:420px}.oppt-details-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1 0 280px;box-sizing:border-box;max-width:100%}.oppt-stats-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1 0 160px;box-sizing:border-box;max-width:100%}.oppt-lists-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1 0 280px;box-sizing:border-box;max-width:100%}.mat-drawer[_ngcontent-%COMP%]{width:280px}@media(max-width:599px){.oppt-details-section[_ngcontent-%COMP%]{flex:0 1 100%;box-sizing:border-box;max-width:100%}.oppt-lists-section[_ngcontent-%COMP%]{display:none}}@media(max-width:959px){.oppt-stats-section[_ngcontent-%COMP%]{display:none}}"],changeDetection:1});}}return t})();function Jr(t,d){if(t&1&&(w(0,"mat-option",10),Ee(1),S()),t&2){let e=d.$implicit;le("value",e.recordStatusId),E(),Ge(e.description);}}function Xr(t,d){if(t&1&&(w(0,"div",14),Ce$1(1,"mat-divider",15),w(2,"h4",16),Ee(3),S()()),t&2){let e=X$1().$implicit,i=X$1(3);Lt$1(e.value),kn$1("flex",i.ltSm?e.flexLtSm:e.flex),E(3),Ge(e.caption);}}function Zr(t,d){if(t&1&&(w(0,"oppt-form-field",14)(1,"mat-form-field"),Ce$1(2,"mat-label")(3,"input",17),N4(),S()()),t&2){let e=X$1().$implicit,i=X$1(3);kn$1("flex",i.ltSm?e.flexLtSm:e.flex),E(3),le("formControlName",e.recordValueTypeId)("maxLength",e.maximumLength),F4();}}function ea(t,d){if(t&1&&(w(0,"oppt-form-field",14)(1,"mat-form-field"),Ce$1(2,"mat-label")(3,"textarea",18,2),N4(),w(5,"mat-hint",19),Ee(6),S()()()),t&2){let e=vn$1(4),i=X$1().$implicit,o=X$1(3);kn$1("flex",o.ltSm?i.flexLtSm:i.flex),E(3),le("formControlName",i.recordValueTypeId),F4(),E(3),im("",e.value.length," / ",i.maximumLength);}}function ta(t,d){if(t&1&&(w(0,"oppt-form-field",14)(1,"mat-form-field"),Ce$1(2,"mat-label")(3,"input",20),N4(),Ce$1(4,"mat-datepicker-toggle",21)(5,"mat-datepicker",22,3),S()()),t&2){let e=vn$1(6),i=X$1().$implicit,o=X$1(3);kn$1("flex",o.ltSm?i.flexLtSm:i.flex),E(3),le("min",o.minDate)("max",o.maxDate)("formControlName",i.recordValueTypeId)("matDatepicker",e),F4(),E(),le("for",e);}}function ia(t,d){t&1&&(w(0,"mat-option"),Ee(1,"No selection"),S());}function oa(t,d){if(t&1&&(w(0,"mat-option",10),Ee(1),S()),t&2){let e=d.$implicit;le("value",e),E(),Ge(e);}}function na(t,d){if(t&1&&(w(0,"oppt-form-field",14)(1,"mat-form-field"),Ce$1(2,"mat-label"),w(3,"mat-select",23),be(4,ia,2,0,"mat-option"),sa$1(5,oa,2,2,"mat-option",10,Td),S(),N4(),S()()),t&2){let e=X$1().$implicit,i=X$1(3);kn$1("flex",i.ltSm?e.flexLtSm:e.flex),E(3),le("formControlName",e.recordValueTypeId),F4(),E(),ye(e.required==="Never"?4:-1),E(),ca$1(e.options);}}function ra(t,d){if(t&1&&(w(0,"mat-option",10),Ee(1),S()),t&2){let e=d.$implicit;le("value",e),E(),Ge(e);}}function aa(t,d){if(t&1&&(w(0,"oppt-form-field",14)(1,"mat-form-field"),Ce$1(2,"mat-label"),w(3,"mat-select",24),sa$1(4,ra,2,2,"mat-option",10,Td),S(),N4(),S()()),t&2){let e=X$1().$implicit,i=X$1(3);kn$1("flex",i.ltSm?e.flexLtSm:e.flex),E(3),le("formControlName",e.recordValueTypeId),F4(),E(),ca$1(e.options);}}function sa(t,d){if(t&1&&(w(0,"mat-list-option",10),Ee(1),S()),t&2){let e=d.$implicit;le("value",e),E(),Zn$1(" ",e," ");}}function ca(t,d){if(t&1&&(w(0,"div",25)(1,"h4",26),Ee(2),S(),w(3,"oppt-form-field")(4,"mat-selection-list",27),sa$1(5,sa,2,2,"mat-list-option",10,Td),S(),N4(),S()()),t&2){let e=X$1().$implicit,i=X$1(3);kn$1("flex",i.ltSm?e.flexLtSm:e.flex),E(2),Ge(e.caption),E(2),le("formControlName",e.recordValueTypeId),F4(),E(),ca$1(e.options);}}
1function la(t,d){if(t&1&&(w(0,"oppt-form-field",14)(1,"mat-checkbox",23),Ee(2),S(),N4(),S()),t&2){let e=X$1().$implicit,i=X$1(3);kn$1("flex",i.ltSm?e.flexLtSm:e.flex),E(),le("formControlName",e.recordValueTypeId),F4(),E(),Zn$1(" ",e.caption," ");}}function da(t,d){if(t&1&&be(0,Xr,4,5,"div",11)(1,Zr,4,4,"oppt-form-field",12)(2,ea,7,5,"oppt-form-field",12)(3,ta,7,7,"oppt-form-field",12)(4,na,7,4,"oppt-form-field",12)(5,aa,6,3,"oppt-form-field",12)(6,ca,7,4,"div",13)(7,la,3,4,"oppt-form-field",12),t&2){let e,i=d.$implicit;ye((e=i.controlName)==="header"?0:e==="textbox"?1:e==="textarea"?2:e==="datePicker"?3:e==="dropdown"?4:e==="multiselect"?5:e==="checklist"?6:e==="switch"?7:-1);}}function pa(t,d){if(t&1&&(w(0,"div",5),sa$1(1,da,8,1,null,null,Td),S()),t&2){let e=d.$implicit;E(),ca$1(e);}}function ma(t,d){if(t&1&&(w(0,"div",4),sa$1(1,pa,3,0,"div",5,Td),S()),t&2){let e=X$1();le("formGroup",e.dynamicForm)("formMetadata",e.dynamicMeta),E(),ca$1(e.rowsAndFields);}}var Jo=(()=>{class t{get form(){return this.service.form}get dynamicForm(){return this.service.dynamicForm}get meta(){return this.service.meta}get dynamicMeta(){return this.service.dynamicMeta}constructor(e,i,o,c){this.service=e,this.recordType=i,this.lookup=o,this.breakpoints=c,this.ngUnsubscribe=new P,this.ltSm=false,this.entity=null,this.rowsAndFields=[],this.showDForm=false,this.identifierCaption="Identifier *",this.recordStatusCaption="Status",this.recordStatusOptions=[],this.minDate=p.minDate,this.maxDate=p.maxDate,this.ltSm=this.breakpoints.isMatched(s.ltSm);}ngAfterViewInit(){this.recordType.entityChanges.pipe(Nt$1(null),zn$1(10),Oe(this.ngUnsubscribe),Rn$1(e=>{e?.recordStatuses?this.recordStatusOptions=e.recordStatuses:this.recordStatusOptions=[],this.service.identifierFieldDisabled=e.autoGenerateIdentifier,this.identifierCaption=(e.identifierCaption||"Identifier")+" *",this.recordStatusCaption=e.recordStatusCaption||"Status";}),Oe(this.ngUnsubscribe)).subscribe(e=>{},e=>{console.error(e);}),this.service.formChanges.pipe(Nt$1(null),zn$1(10),Oe(this.ngUnsubscribe),Rn$1(e=>{if(this.showDForm=false,this.entity=this.service.entity?.record,N$1.isNull(e))return;let i=[],o=null,c=-1,l=this.service.entity?.values;for(let u=0,g=l.length;u<g;u++){let b=l[u];(N$1.isNull(o)||o!==b.rowNumber)&&(o=b.rowNumber,c++,i[c]=[]),i[c].push(b),this.showDForm=true;}this.rowsAndFields=i;}),zn$1(10),Oe(this.ngUnsubscribe)).subscribe(e=>{},e=>{console.error(e);}),this.breakpoints.observe([s.ltSm]).pipe(zn$1(600),Oe(this.ngUnsubscribe)).subscribe(e=>{this.ltSm=e.matches;});}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(L),ce(L$1),ce(A3e),ce(kl))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-record-main-form"]],standalone:false,decls:17,vars:5,consts:[["identifierRef",""],["recordStatusSelectRef",""],["locationTextarea",""],["datePickerRef",""],[3,"formGroup","formMetadata"],[1,"flex-form"],[1,"flex-min-150","flex-100p-lt-sm"],["matInput","","formControlName","identifier","type","text","maxLength","250","autocomplete","off"],[1,"flex-min-150"],["formControlName","recordStatusId"],[3,"value"],[1,"dynamic-flex-field",3,"flex","class"],[1,"dynamic-flex-field",3,"flex"],[1,"dynamic-flex-field","oppt-checklist-section",3,"flex"],[1,"dynamic-flex-field"],[1,"oppt-mt10"],[1,"mat-h4","oppt-grey","oppt-mb20"],["matInput","","type","text","autocomplete","off",3,"formControlName","maxLength"],["matInput","","type","text","maxLength","dv.maximumLength","autocomplete","off",3,"formControlName"],["align","end"],["matInput","","autocomplete","off",3,"min","max","formControlName","matDatepicker"],["matSuffix","",3,"for"],["touchUi","true"],[3,"formControlName"],["multiple","",3,"formControlName"],[1,"dynamic-flex-field","oppt-checklist-section"],[1,"oppt-checklist-header"],["dense","",1,"oppt-checklist",3,"formControlName"]],template:function(i,o){i&1&&(w(0,"div",4)(1,"div",5)(2,"oppt-form-field",6)(3,"mat-form-field")(4,"mat-label"),Ee(5),S(),Ce$1(6,"input",7,0),N4(),S()(),w(8,"oppt-form-field",8)(9,"mat-form-field")(10,"mat-label"),Ee(11),S(),w(12,"mat-select",9,1),sa$1(14,Jr,2,2,"mat-option",10,Td),S(),N4(),S()()(),be(16,ma,3,2,"div",4),S()),i&2&&(le("formGroup",o.form)("formMetadata",o.meta),E(5),Ge(o.identifierCaption),E(),F4(),E(5),Ge(o.recordStatusCaption),E(),F4(),E(2),ca$1(o.recordStatusOptions),E(2),ye(o.showDForm?16:-1));},dependencies:[t1,W_e,Y_e,eu,mY,os,kL,rZ,FZ,Tu,E6,hDe,vF,jK,Cb,ns,nb,mu,ob,GF,Du,q7,z7,_7],styles:["div.oppt-header-calypso[_ngcontent-%COMP%]{background-color:#2c7d88;margin:12px 0 16px}div.oppt-header-calypso[_ngcontent-%COMP%]   .mat-divider[_ngcontent-%COMP%]{display:none}div.oppt-header-calypso[_ngcontent-%COMP%]   .mat-h4[_ngcontent-%COMP%]{color:#fff;font-weight:500;margin:5px 5px 5px 15px}div.oppt-header-blue-stone[_ngcontent-%COMP%]{background-color:#01644f;margin:12px 0 16px}div.oppt-header-blue-stone[_ngcontent-%COMP%]   .mat-divider[_ngcontent-%COMP%]{display:none}div.oppt-header-blue-stone[_ngcontent-%COMP%]   .mat-h4[_ngcontent-%COMP%]{color:#fff;font-weight:500;margin:5px 5px 5px 15px}div.oppt-header-venice-blue[_ngcontent-%COMP%]{background-color:#065c77;margin:12px 0 16px}div.oppt-header-venice-blue[_ngcontent-%COMP%]   .mat-divider[_ngcontent-%COMP%]{display:none}div.oppt-header-venice-blue[_ngcontent-%COMP%]   .mat-h4[_ngcontent-%COMP%]{color:#fff;font-weight:500;margin:5px 5px 5px 15px}
1div.oppt-header-bright-red[_ngcontent-%COMP%]{background-color:#a20000;margin:12px 0 16px}div.oppt-header-bright-red[_ngcontent-%COMP%]   .mat-divider[_ngcontent-%COMP%]{display:none}div.oppt-header-bright-red[_ngcontent-%COMP%]   .mat-h4[_ngcontent-%COMP%]{color:#fff;font-weight:500;margin:5px 5px 5px 15px}div.oppt-header-fern-frond[_ngcontent-%COMP%]{background-color:#3f752b;margin:12px 0 16px}div.oppt-header-fern-frond[_ngcontent-%COMP%]   .mat-divider[_ngcontent-%COMP%]{display:none}div.oppt-header-fern-frond[_ngcontent-%COMP%]   .mat-h4[_ngcontent-%COMP%]{color:#fff;font-weight:500;margin:5px 5px 5px 15px}.oppt-checklist-header[_ngcontent-%COMP%]{margin:0}.dynamic-flex-field[_ngcontent-%COMP%]{box-sizing:border-box;min-width:0;max-width:100%}"],changeDetection:1});}}return t})();var ha=["formRef"],Dt=(()=>{class t{get form(){return this.service.form}get meta(){return this.service.meta}get entity(){return this.service.entity?.record}constructor(e){this.service=e,this.ngUnsubscribe=new P,this.save=new B;}ngAfterViewInit(){N$1.isNotNull(this.formRef)&&Ss(this.formRef.nativeElement,"submit").pipe(Oe(this.ngUnsubscribe)).subscribe(e=>{this.save.emit(this.meta);});}ngOnDestroy(){this.save.complete(),this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(L))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-record-form"]],viewQuery:function(i,o){if(i&1&&et(ha,5),i&2){let c;q$1(c=$())&&(o.formRef=c.first);}},inputs:{formId:"formId"},outputs:{save:"save"},standalone:false,decls:5,vars:4,consts:[["formRef",""],["novalidate","",1,"flex-one-pages",3,"formGroup","formMetadata","id"],["appearance","raised",1,"oppt-material-background","flex-one-page"]],template:function(i,o){i&1&&(w(0,"form",1,0)(2,"mat-card",2)(3,"mat-card-content"),Ce$1(4,"oppt-record-main-form"),S()()()),i&2&&le("formGroup",o.form)("formMetadata",o.meta)("id",o.formId)("@fadeIn",void 0);},dependencies:[Z_e,Y_e,eu,kL,ZCe,e0e,Jo],styles:[".oppt-card[_ngcontent-%COMP%]{margin:8px;max-width:750px;padding:32px;z-index:1}.oppt-card-container[_ngcontent-%COMP%]{margin:0;padding:0;max-width:750px}"],data:{animation:[x]},changeDetection:1});}}return t})();var fa=(t,d)=>["/assetrecord",t,"records",d],Xo=()=>["edit"];function va(t,d){if(t&1){let e=gn$1();w(0,"button",14),Fq(1,"async"),he("click",function(){Ct(e);let o=X$1();return wt(o.delete())}),w(2,"mat-icon"),Ee(3,"delete"),S()();}if(t&2){let e=X$1();le("disabled",Bq(1,1,e.busy));}}function ga(t,d){t&1&&(w(0,"button",5)(1,"mat-icon"),Ee(2,"mode_edit"),S()()),t&2&&le("routerLink",Rq(1,Xo));}function Ca(t,d){t&1&&Ce$1(0,"oppt-record-form",10);}function ya(t,d){t&1&&(w(0,"button",13)(1,"mat-icon"),Ee(2,"mode_edit"),S()()),t&2&&le("routerLink",Rq(1,Xo));}var Zo=(()=>{class t extends e$1{constructor(e,i,o,c,l){super(i),this.router=e,this.recordType=o,this.documentationService=c,this.dialog=l,this.ngUnsubscribe=new P,this.recordId=null,this.recordTypeRoute=null,this.title=null,this.service.disabled=true;}ngAfterViewInit(){this.recordType.entityChanges.pipe(Oe(this.ngUnsubscribe),zn$1(10)).subscribe({next:e=>{if(N$1.isNull(e)||N$1.isNullOrEmpty(e.name)){this.title=null;return}this.title=N$1.capitalize(e.name)+" attributes";},error:e=>{this.title=null;}}),this.service.id.pipe(Oe(this.ngUnsubscribe),zn$1(10)).subscribe(e=>{this.recordId=e?.recordId,this.recordTypeRoute=e?.openPointRoute;});}delete(){this.busy.value||this.dialog.Confirm(`Delete ${this.title}?`,`Are you sure you want to delete this ${this.title}?`,"Delete","Cancel").pipe(Oe(this.ngUnsubscribe),Xt(e=>e?this.service.delete():Y({resultType:"Failure",entity:null}))).subscribe(e=>{e.resultType!=="Failure"&&this.router.navigate(["/assetrecord",this.recordTypeRoute,"records"]);});}showDocumentation(){this.documentationService.tryDownloadAndOpen("client_record_setup");}canDeactivate(){return !this.service||this.service.loading.getValue()?true:!this.service.busy.getValue()}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(Ki),ce(L),ce(L$1),ce(v),ce(Mu))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-record-detail"]],standalone:false,features:[Ae],decls:22,vars:22,consts:[["opptToolbarColor","primary-darker","opptBackgroun
1d","dark",1,"oppt-host",3,"opptBusy","opptMaxWidth","opptNoScrollNoBorder"],["opptToolbarLeft","","mat-icon-button","","type","button",3,"routerLink"],["opptToolbarLeft","",1,"mat-h3","oppt-toolbar-header"],["opptToolbarRight","","mat-icon-button","","type","button","matTooltip","Delete record",3,"disabled"],["opptBottomRightFab",""],["mat-fab","","color","accent","aria-label","Edit record attributes","type","button",1,"oppt-hide-gt-md",3,"routerLink"],[1,"oppt-flex-space","oppt-primary-darker"],[1,"page-content"],[1,"flex-row"],[1,"oppt-forms","flex-min-200"],["formId","recordEdit"],[1,"oppt-fab-space"],[1,"oppt-fab-right-section","flex-max-200","oppt-hide-lt-lg","flex-row","flex-place-end-center"],["mat-fab","","color","accent","aria-label","Edit record attributes","type","button",3,"routerLink"],["opptToolbarRight","","mat-icon-button","","type","button","matTooltip","Delete record",3,"click","disabled"]],template:function(i,o){i&1&&(w(0,"oppt-section",0),Fq(1,"async"),w(2,"button",1)(3,"mat-icon"),Ee(4,"close"),S()(),w(5,"h3",2),Ee(6),S(),be(7,va,4,3,"button",3),Fq(8,"async"),w(9,"div",4),be(10,ga,3,2,"button",5),Fq(11,"async"),S(),Ce$1(12,"div",6),w(13,"div",7)(14,"div",8)(15,"div",9),be(16,Ca,1,0,"oppt-record-form",10),Fq(17,"async"),Ce$1(18,"div",11),S(),w(19,"div",12),be(20,ya,3,2,"button",13),Fq(21,"async"),S()()()()),i&2&&(le("opptBusy",Bq(1,9,o.busy))("opptMaxWidth",2e3)("opptNoScrollNoBorder",true),E(2),le("routerLink",Rd(19,fa,o.recordTypeRoute,o.recordId)),E(4),Ge(o.title),E(),ye(Bq(8,11,o.canEdit)?7:-1),E(3),ye(Bq(11,13,o.canEdit)?10:-1),E(6),ye(Bq(17,15,o.showForm)?16:-1),E(4),ye(Bq(21,17,o.canEdit)?20:-1));},dependencies:[hZ,ec,jCe,wu,Ml,fv,Dt,W8],styles:[".page-content[_ngcontent-%COMP%]{padding:8px}.oppt-forms[_ngcontent-%COMP%]{max-width:850px}.oppt-flex-space[_ngcontent-%COMP%]{position:absolute;height:220px;width:100%}.oppt-fab-right-section[_ngcontent-%COMP%]{height:240px;margin-left:8px}"],changeDetection:1});}}return t})();var ba=(t,d)=>["/assetrecord",t,"records",d];function xa(t,d){if(t&1&&(w(0,"button",3),Fq(1,"async"),Ee(2,"Save"),S()),t&2){let e=X$1();le("disabled",Bq(1,1,e.cannotSave));}}function _a(t,d){if(t&1){let e=gn$1();w(0,"oppt-record-form",11),he("save",function(){Ct(e);let o=X$1();return wt(o.save())}),S();}}var en=(()=>{class t extends e$1{constructor(e,i,o,c){super(i),this.router=e,this.recordType=o,this.dialog=c,this.ngUnsubscribe=new P,this.recordId=null,this.recordTypeRoute=null,this.title=null,this.service.disabled=false;}ngAfterViewInit(){this.recordType.entityChanges.pipe(Oe(this.ngUnsubscribe),zn$1(10)).subscribe(e=>{if(N$1.isNull(e)||N$1.isNullOrEmpty(e.name)){this.title=null;return}this.title=N$1.capitalize(e.name)+" attributes";},e=>{this.title=null;}),this.service.id.pipe(Oe(this.ngUnsubscribe),zn$1(10)).subscribe(e=>{this.recordId=e?.recordId,this.recordTypeRoute=e?.openPointRoute;}),this.service.formChanges.pipe(Oe(this.ngUnsubscribe),od(10)).subscribe(e=>{N$1.isNull(this.service.entity)||N$1.isNull(this.service.entity)||this.service.canEdit.getValue()||this.router.navigate(["/assetrecord",this.recordTypeRoute,"records",this.recordId,"attributes"]);},e=>{console.error(e),this.router.navigate(["/assetrecord",this.recordTypeRoute,"records"]);});}save(){this.service.save().pipe(Oe(this.ngUnsubscribe),Be(1),od(0),Rn$1(e=>{e.resultType!=="Failure"&&(this.service.refresh().subscribe(),this.router.navigate(["/assetrecord",this.recordTypeRoute,"records",this.recordId]));})).subscribe(e=>{},e=>{console.error(e),this.router.navigate(["/assetrecord",this.recordType.entity?.openPointRoute,"records"]);});}canDeactivate(){return !this.service||this.service.loading.getValue()?true:this.service.busy.getValue()?false:this.service.form.dirty?this.dialog.DiscardChanges().pipe(Rn$1(e=>{e&&N$1.isNotNull(this.service.entity)&&this.service.resetForm();})):true}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(Ki),ce(L),ce(L$1),ce(Mu))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-record-edit"]],standalone:false,features:[Ae],decls:17,vars:16,consts:[["opptToolbarColor","primary-darker","opptBackgroun
1d","dark",1,"oppt-host",3,"opptBusy","opptMaxWidth","opptNoScrollNoBorder"],["opptToolbarLeft","","mat-icon-button","","type","button",3,"routerLink"],["opptToolbarLeft","",1,"mat-h3","oppt-toolbar-header"],["opptToolbarRight","","mat-flat-button","","color","accent","type","submit","form","recordEdit",3,"disabled"],[1,"oppt-flex-space","oppt-primary-darker"],[1,"page-content"],[1,"flex-row"],[1,"oppt-forms","flex-min-200"],["formId","recordEdit"],[1,"oppt-fab-space"],[1,"oppt-fab-right-section","flex-max-200","oppt-hide-lt-lg"],["formId","recordEdit",3,"save"]],template:function(i,o){i&1&&(w(0,"oppt-section",0),Fq(1,"async"),w(2,"button",1)(3,"mat-icon"),Ee(4,"close"),S()(),w(5,"h3",2),Ee(6),S(),be(7,xa,3,3,"button",3),Fq(8,"async"),Ce$1(9,"div",4),w(10,"div",5)(11,"div",6)(12,"div",7),be(13,_a,1,0,"oppt-record-form",8),Fq(14,"async"),Ce$1(15,"div",9),S(),Ce$1(16,"div",10),S()()()),i&2&&(le("opptBusy",Bq(1,7,o.busy))("opptMaxWidth",2e3)("opptNoScrollNoBorder",true),E(2),le("routerLink",Rd(13,ba,o.recordTypeRoute,o.recordId)),E(4),Ge(o.title),E(),ye(Bq(8,9,o.showForm)?7:-1),E(6),ye(Bq(14,11,o.showForm)?13:-1));},dependencies:[hZ,Tr$1,ec,wu,fv,Dt,W8],styles:[".page-content[_ngcontent-%COMP%]{padding:8px}.oppt-forms[_ngcontent-%COMP%]{max-width:850px}.oppt-flex-space[_ngcontent-%COMP%]{position:absolute;height:220px;width:100%}.oppt-fab-right-section[_ngcontent-%COMP%]{height:240px;margin-left:8px}"],changeDetection:1});}}return t})();var tn=(()=>{class t{constructor(e,i,o,c,l){this.service=e,this.session=i,this.router=o,this.route=c,this.recordType=l,this.ngUnsubscribe=new P,this.onBeforeChangeSystemId=u=>{if(!(!this.service||this.service.loading.getValue())){if(this.service.busy.getValue()){u.cancel("Busy, please wait");return}this.service.form.dirty&&u.cancel("Unsaved changes");}},e.disabled=true;}ngAfterViewInit(){this.service.resetForm(),this.session.onBeforeSystemIdC
1hange.on(this.onBeforeChangeSystemId),this.service.formChanges.pipe(Oe(this.ngUnsubscribe),Se(N$1.isNotNull)).subscribe(e=>{N$1.isNull(this.service.entity)||this.service.entity.record.entityAction==="Create"&&this.router.navigate(["/assetrecord",this.recordType.entity.openPointRoute,"records"]);},e=>{console.log(e),N$1.isNullOrEmpty(this.service.entity?.recordId)?this.router.navigate(["/assetrecord",this.recordType.entity.openPointRoute,"records"]):this.router.navigate(["/assetrecord",this.recordType.entity.openPointRoute,"records",this.service.entity.recordId]);});}ngOnDestroy(){this.session.onBeforeSystemIdChange.off(this.onBeforeChangeSystemId),this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(L),ce(Lb),ce(Ki),ce(ko),ce(L$1))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-record-setup"]],standalone:false,decls:1,vars:0,consts:[[1,"oppt-host"]],template:function(i,o){i&1&&Ce$1(0,"router-outlet",0);},dependencies:[iD],encapsulation:2,changeDetection:1});}}return t})();var Sa=t=>["/assetrecord",t,"records"];function Ta(t,d){if(t&1&&(w(0,"button",3),Fq(1,"async"),Ee(2,"Save"),S()),t&2){let e=X$1();le("disabled",Bq(1,1,e.cannotSave));}}function Ia(t,d){if(t&1){let e=gn$1();w(0,"oppt-record-form",11),he("save",function(){Ct(e);let o=X$1();return wt(o.save())}),S();}}var ki=(()=>{class t extends e$1{constructor(e,i,o,c){super(i),this.router=e,this.recordType=o,this.dialog=c,this.ngUnsubscribe=new P,this.recordTypeRoute=null,this.title="Record",this.service.disabled=false;}ngAfterViewInit(){this.service.showForm.next(false),this.recordType.entityChanges.pipe(Oe(this.ngUnsubscribe),Se(e=>N$1.isNotNull(e)),Zo$1((e,i)=>N$1.isSimilar(e?.recordTypeId,i?.recordTypeId)),od(0),Xt(e=>(this.recordTypeRoute=this.recordType.entity?.openPointRoute,this.title=this.recordType.entity?.name||"Record",this.service.resolveCreate())),Rn$1(e=>{N$1.isNull(this.service.entity)||this.service.canEdit.getValue()||this.router.navigate(["/assetrecord",this.recordTypeRoute,"records"]);}),Oe(this.ngUnsubscribe)).subscribe(e=>{},e=>{console.error(e),this.router.navigate(["/assetrecord",this.recordTypeRoute,"records"]);});}save(){this.service.save().pipe(Oe(this.ngUnsubscribe),Be(1),od(0)).subscribe(e=>{e.resultType!=="Failure"&&this.router.navigate(["/assetrecord",this.recordTypeRoute,"records",this.service.id.getValue().recordId]);},e=>{console.error(e);});}canDeactivate(){return !this.service||this.service.loading.getValue()?true:this.service.busy.getValue()?false:this.service.form.dirty?this.dialog.DiscardChanges().pipe(Rn$1(e=>{e&&N$1.isNotNull(this.service.entity)&&this.service.resetForm();})):true}ngOnDestroy(){this.ngUnsubscribe.next(void 0),this.ngUnsubscribe.complete();}static{this.\u0275fac=function(i){return new(i||t)(ce(Ki),ce(L),ce(L$1),ce(Mu))};}static{this.\u0275cmp=R({type:t,selectors:[["oppt-record-new"]],standalone:false,features:[Ae],decls:17,vars:15,consts:[["opptToolbarColor","primary-darker","opptBackground","dark",1,"oppt-host",3,"opptBusy","opptMaxWidth","opptNoScrollNoBorder"],["opptToolbarLeft","","mat-icon-button","","type","button",3,"routerLink"],["opptToolbarLeft","",1,"mat-h3","oppt-toolbar-header"],["opptToolbarRight","","mat-flat-button","","color","accent","type","submit","form","recordEdit",3,"disabled"],[1,"oppt-flex-space","oppt-primary-darker"],[1,"page-content"],[1,"flex-row"],[1,"oppt-forms","flex-min-200"],["formId","recordEdit"],[1,"oppt-fab-space"],[1,"oppt-fab-right-section","flex-max-200","oppt-hide-lt-lg"],["formId","recordEdit",3,"save"]],template:function(i,o){i&1&&(w(0,"oppt-section",0),Fq(1,"async"),w(2,"button",1)(3,"mat-icon"),Ee(4,"close"),S()(),w(5,"h3",2),Ee(6),S(),be(7,Ta,3,3,"button",3),Fq(8,"async"),Ce$1(9,"div",4),w(10,"div",5)(11,"div",6)(12,"div",7),be(13,Ia,1,0,"oppt-record-form",8),Fq(14,"async"),Ce$1(15,"div",9),S(),Ce$1(16,"div",10),S()()()),i&2&&(le("opptBusy",Bq(1,7,o.busy))("opptMaxWidth",2e3)("opptNoScrollNoBorder",true),E(2),le("routerLink",Uw(13,Sa,o.recordTypeRoute)),E(4),Ge(o.title),E(),ye(Bq(8,9,o.showForm)?7:-1),E(6),ye(Bq(14,11,o.showForm)?13:-1));},dependencies:[hZ,Tr$1,ec,wu,fv,Dt,W8],styles:[".page-content[_ngcontent-%COMP%]{padding:8px}.oppt-forms[_ngcontent-%COMP%]{max-width:850px}.oppt-flex-space[_ngcontent-%COMP%]{position:absolute;height:220px;width:100%}.oppt-fab-right-section[_ngcontent-%COMP%]{height:240px;margin-left:8px}.oppt-card[_ngcontent-%COMP%]{margin:0 0 5px;max-width:750px;padding:0 16px;z-index:1;box-shadow:none;background-color:transparent}.oppt-card-container[_ngcontent-%COMP%]{margin:0;padding:0;max-width:750px;box-shadow:none}[_nghost-%COMP%]     .mat-form-field-appearance-fill .mat-form-field-flex{background-color:#aac9db}"],changeDetection:1});}}return t})();var on=[{path:"attributes",component:tn,children:[{path:"",pathMatch:"full",component:Zo,canDeactivate:[b]}
1,{path:"edit",pathMatch:"full",component:en,canDeactivate:[b],canActivate:[T],canActivateChild:[T],data:{claim:["RecordEdit","Record"]}}]}];var wa=[{path:"",component:Io,children:[{path:"",pathMatch:"full",component:zo}]},{path:"new",pathMatch:"full",component:ki,canDeactivate:[b],canActivateChild:[T],data:{claim:["RecordEdit","Record"]}},{path:":recordId",component:$o,children:[{path:"",pathMatch:"full",component:Qo,canDeactivate:[b]},...on,...f,{path:"**",redirectTo:""}]}],nn=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275mod=ne({type:t});}static{this.\u0275inj=J({imports:[SW.forChild(wa),SW]});}}return t})();var rn=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275mod=ne({type:t});}static{this.\u0275inj=J({imports:[_1e,SW]});}}return t})();var an=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275mod=ne({type:t});}static{this.\u0275inj=J({imports:[_1e,SW]});}}return t})();var sn=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275mod=ne({type:t});}static{this.\u0275inj=J({imports:[_1e,SW]});}}return t})();var Ld=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275mod=ne({type:t});}static{this.\u0275inj=J({providers:[Te,Le,L,ot,Nt,Et],imports:[_1e,nn,rn,an,sn,jn$1,Ce]});}}return t})();export{Ld as RecordsModule};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.