1(self.webpackChunkdspace_angular=self.webpackChunkdspace_angular||[]).push([[1271,2384,3017,3309,6106,9545,9832,9938],{84963(K,j,r){"use strict";r.d(j,{O:()=>f});var M=r(96354),u=r(20881),C=r(4093);class f extends u.W{findByHref(I,F=!0,D=!0,...y){return super.findByHref(I,F,D,...y).pipe((0,C.qD)(),(0,M.T)(x=>{if(x.hasFailed)throw new Error("Couldn't retrieve the config");return x}))}findByName(I,F=!0,D=!0,...y){return super.findById(I,F,D,...y)}}},61271(K,j,r){"use strict";r.d(j,{SubmissionAccessesConfigDataService:()=>F});var M=r(57775),u=r(81948),C=r(3601),f=r(7094),v=r(84963),I=r(2615);let F=(()=>{var D;class y extends v.O{constructor(g,h,E,m){super("submissionaccessoptions",g,h,E,m),this.requestService=g,this.rdbService=h,this.objectCache=E,this.halService=m}findByHref(g,h=!0,E=!0,...m){return super.findByHref(g,h,E,...m)}static#t=D=()=>(this.\u0275fac=function(h){return new(h||y)(I.KVO(C.B),I.KVO(M.o),I.KVO(u.$),I.KVO(f.Y))},this.\u0275prov=I.jDH({token:y,factory:y.\u0275fac,providedIn:"root"}))}return D(),y})()},12384(K,j,r){"use strict";r.d(j,{SubmissionFormsConfigDataService:()=>F});var M=r(57775),u=r(81948),C=r(3601),f=r(7094),v=r(84963),I=r(2615);let F=(()=>{var D;class y extends v.O{constructor(g,h,E,m){super("submissionforms",g,h,E,m),this.requestService=g,this.rdbService=h,this.objectCache=E,this.halService=m}findByHref(g,h=!0,E=!0,...m){return super.findByHref(g,h,E,...m)}static#t=D=()=>(this.\u0275fac=function(h){return new(h||y)(I.KVO(C.B),I.KVO(M.o),I.KVO(u.$),I.KVO(f.Y))},this.\u0275prov=I.jDH({token:y,factory:y.\u0275fac,providedIn:"root"}))}return D(),y})()},99545(K,j,r){"use strict";r.d(j,{SubmissionUploadsConfigDataService:()=>F});var M=r(57775),u=r(81948),C=r(3601),f=r(7094),v=r(84963),I=r(2615);let F=(()=>{var D;class y extends v.O{constructor(g,h,E,m){super("submissionuploads",g,h,E,m),this.requestService=g,this.rdbService=h,this.objectCache=E,this.halService=m}findByHref(g,h=!0,E=!0,...m){return super.findByHref(g,h,E,...m)}static#t=D=()=>(this.\u0275fac=function(h){return new(h||y)(I.KVO(C.B),I.KVO(M.o),I.KVO(u.$),I.KVO(f.Y))},this.\u0275prov=I.jDH({token:y,factory:y.\u0275fac,providedIn:"root"}))}return D(),y})()},33017(K,j,r){"use strict";r.d(j,{ResourcePolicyDataService:()=>W});var M=r(29330),u=r(61594),C=r(96354),f=r(89777),v=r(9847),I=r(57775),F=r(10186),D=r(81948),y=r(18328),x=r(72073),g=r(20881),h=r(4318),E=r(60796),m=r(96443),_=r(36343),b=r(49755),T=r(3601),P=r(74642),Y=r(13817),O=r(2086),l=r(7094),G=r(4093),$=r(2615);let W=(()=>{var nt;class it extends g.W{constructor(L,B,U,V,k,A,et,tt){super("resourcepolicies",L,B,U,V),this.requestService=L,this.rdbService=B,this.objectCache=U,this.halService=V,this.notificationsService=k,this.comparator=A,this.ePersonService=et,this.groupService=tt,this.searchByEPersonMethod="eperson",this.searchByGroupMethod="group",this.searchByResourceMethod="resource",this.createData=new y.V(this.linkPath,L,B,U,V,k,this.responseMsToLive),this.searchData=new E.X(this.linkPath,L,B,U,V,this.responseMsToLive),this.patchData=new h.n(this.linkPath,L,B,U,V,A,this.responseMsToLive,this.constructIdEndpoint),this.deleteData=new x.I(this.linkPath,L,B,U,V,k,this.responseMsToLive,this.constructIdEndpoint)}create(L,B,U,V){const k=[];return k.push(new F.x("resource",B)),(0,f.hj)(U)?k.push(new F.x("eperson",U)):(0,f.hj)(V)&&k.push(new F.x("group",V)),this.createData.create(L,...k)}delete(L){return this.deleteData.delete(L).pipe((0,G.qD)(),(0,C.T)(B=>B.hasSucceeded))}update(L){return this.patchData.update(L)}getDefaultAccessConditionsFor(L,B){return this.findListByHref(L._links.defaultAccessConditions.href,B)}searchByEPerson(L,B,U=!0,V=!0,...k){const A=new _._;
1return A.searchParams=[new F.x("uuid",L)],(0,f.hj)(B)&&A.searchParams.push(new F.x("resource",B)),this.searchData.searchBy(this.searchByEPersonMethod,A,U,V,...k)}searchByGroup(L,B,U=!0,V=!0,...k){const A=new _._;return A.searchParams=[new F.x("uuid",L)],(0,f.hj)(B)&&A.searchParams.push(new F.x("resource",B)),this.searchData.searchBy(this.searchByGroupMethod,A,U,V,...k)}searchByResource(L,B,U=!0,V=!0,...k){const A=new _._;return A.searchParams=[new F.x("uuid",L)],(0,f.hj)(B)&&A.searchParams.push(new F.x("action",B)),this.searchData.searchBy(this.searchByResourceMethod,A,U,V,...k)}updateTarget(L,B,U,V){const A=("eperson"===V?this.ePersonService:this.groupService).getIDHrefObs(U),et=Object.create({});let tt=new M.Lr;tt=tt.append("Content-Type","text/uri-list"),et.headers=tt;const t=this.requestService.generateRequestId();return A.pipe((0,u.$)()).subscribe(J=>{const dt=new b.v_(t,B+"/"+V,J,et);Object.assign(dt,{getResponseParser:()=>P.M}),this.requestService.send(dt)}),this.rdbService.buildFromRequestUUIDAndAwait(t,()=>this.invalidateByHref(B))}static#t=nt=()=>(this.\u0275fac=function(B){return new(B||it)($.KVO(T.B),$.KVO(I.o),$.KVO(D.$),$.KVO(l.Y),$.KVO(v.I),$.KVO(m.Y),$.KVO(Y.EPersonDataService),$.KVO(O.GroupDataService))},this.\u0275prov=$.jDH({token:it,factory:it.\u0275fac,providedIn:"root"}))}return nt(),it})()},6106(K,j,r){"use strict";r.d(j,{SubmissionCcLicenseDataService:()=>D});var M=r(57775),u=r(81948),C=r(90066),f=r(88667),v=r(3601),I=r(7094),F=r(2615);let D=(()=>{var y;class x extends C.L{constructor(h,E,m,_){super("submissioncclicenses",h,E,m,_),this.requestService=h,this.rdbService=E,this.objectCache=m,this.halService=_,this.linkPath="submissioncclicenses",this.findAllData=new f.H(this.linkPath,h,E,m,_,this.responseMsToLive)}findAll(h,E,m,..._){return this.findAllData.findAll(h,E,m,..._)}static#t=y=()=>(this.\u0275fac=function(E){return new(E||x)(F.KVO(v.B),F.KVO(M.o),F.KVO(u.$),F.KVO(I.Y))},this.\u0275prov=F.jDH({token:x,factory:x.\u0275fac,providedIn:"root"}))}return y(),x})()},9938(K,j,r){"use strict";r.d(j,{SubmissionCcLicenseUrlDataService:()=>h});var M=r(96354),u=r(25558),C=r(57775),f=r(10186),v=r(81948),I=r(90066),F=r(60796),D=r(3601),y=r(7094),x=r(4093),g=r(2615);let h=(()=>{var E;class m extends I.L{constructor(b,T,P,Y){super("submissioncclicenseUrls-search",b,T,P,Y),this.requestService=b,this.rdbService=T,this.objectCache=P,this.halService=Y,this.searchData=new F.X(this.linkPath,b,T,P,Y,this.responseMsToLive,(O,l)=>`${O}/${l}`)}getCcLicenseLink(b,T){return this.searchData.getSearchByHref("rightsByQuestions",{searchParams:[new f.x("license",b.id),...b.fields.map(P=>new f.x(`answer_${P.id}`,T.get(P).id))]}).pipe((0,u.n)(P=>this.findByHref(P)),(0,x.yd)(),(0,x.Bo)(),(0,M.T)(P=>P.url))}searchBy(b,T,P,Y,...O){return this.searchData.searchBy(b,T,P,Y,...O)}static#t=E=()=>(this.\u0275fac=function(T){return new(T||m)(g.KVO(D.B),g.KVO(C.o),g.KVO(v.$),g.KVO(y.Y))},this.\u0275prov=g.jDH({token:m,factory:m.\u0275fac,providedIn:"root"}))}return E(),m})()},63309(K,j,r){"use strict";r.r(j),r.d(j,{SubmissionSectionContainerComponent:()=>ns});var M=r(72200),u=r(2615),C=r(58003),f=r(68018),v=r(64972),I=r(74082),F=r(44845),D=r(1473),y=r(84572),x=r(7673),g=r(96697),h=r(5964),E=r(73028),m=r(96354),_=r(61271),b=r(33553),T=r(39592),P=r(4093),Y=r(28690),O=r(50813),l=r(89777),G=r(21711),$=r(86332),W=r(70338),nt=r(93583),it=r(48125),_t=r.n(it),L=r(83278),B=r.n(L),U=r(13627),V=r(38511),k=r(72887),A=r(95720);let et=(()=>{var n;class a{constructor(e,i){this.formBuilder=e,this.operationsBuilder=i}dispatchOperationsFromEvent(e,i,s,c){switch(i.type){case"remove":this.dispatchOperationsFromRemoveEvent(e,i,s);break;case"change":this.dispatchOperationsFromChangeEvent(e,i,s,c);break;case"move":this.dispatchOperationsFromMoveEvent(e,i,s)}}getArrayIndexFromEvent(e){let i;return(0,l.hj)(e)&&((0,D.hDs)(e)?(0,l.kZ)(e.context)?this.isPartOfArrayOfGroup(e.model)&&(i=e.model.parent.parent.index):i=e.context.
1index:i=e?.index),(0,l.EA)(i)?i:0}isPartOfArrayOfGroup(e){return(0,l.Pe)(e.parent)&&e.parent.type===D.wnr&&e.parent.parent&&e.parent.parent.context&&e.parent.parent.context.type===D.WlY}getQualdropValueMap(e){const i=new Map;return(this.formBuilder.isQualdropGroup(e.model)?e.model.parent.context:e.model.parent.parent.context).groups.forEach(c=>{const d=c.group[0],p=i.get(d.qualdropId)?i.get(d.qualdropId):[];d.value&&(p.push(d.value),i.set(d.qualdropId,p))}),i}getFieldPathFromEvent(e){const i=this.getArrayIndexFromEvent(e),s=this.getFieldPathSegmentedFromChangeEvent(e);return(0,l.EA)(i)?s+"/"+i:s}getQualdropItemPathFromEvent(e){const i=this.getArrayIndexFromEvent(e),s=new Map;let c=null;return(this.formBuilder.isQualdropGroup(e.model)?e.model.parent.context:e.model.parent.parent.context).groups.forEach((p,S)=>{const R=p.group[0],X=s.get(R.qualdropId)?s.get(R.qualdropId):[];R.value&&(X.push(R.value),s.set(R.qualdropId,X)),S===i&&(c=R.qualdropId+"/"+(X.length-1))}),c}getFieldPathSegmentedFromChangeEvent(e){let i;return i=this.formBuilder.isQualdropGroup(e.model)?e.model.qualdropId:this.formBuilder.isQualdropGroup(e.model.parent)?e.model.parent.qualdropId:this.formBuilder.getId(e.model),i}getFieldValueFromChangeEvent(e){let i;const s=e.model.value;if(this.formBuilder.isModelInCustomGroup(e.model))i=e.model.parent.value;else if(this.formBuilder.isRelationGroup(e.model))i=e.model.getGroupValue();else if(e.model.hasLanguages){const c=e.model.language;e.model.hasAuthority?Array.isArray(s)?(s.forEach((d,p)=>{d=Object.assign(new U.b,d,{language:c}),s[p]=d}),i=s):i=Object.assign(new U.b,s,{language:c}):i=new A.e(s,c)}else i=(0,O.z5)(s)?new A.e((0,O.$T)(s)):s instanceof k.r||s instanceof U.b||s instanceof V.M||B()(s)?s:new A.e(s);return i}getValueMap(e){const i=new Map;return e.forEach(s=>{Object.keys(s).forEach(c=>{const d=i.get(c)?i.get(c):[];d.push(s[c]),i.set(c,d)})}),i}dispatchOperationsFromRemoveEvent(e,i,s){const c=this.getFieldPathFromEvent(i),d=this.getFieldValueFromChangeEvent(i);this.formBuilder.isQualdropGroup(i.model)?this.dispatchOperationsFromMap(this.getQualdropValueMap(i),e,i,s):i.context&&i.context instanceof D.fHx?this.handleArrayGroupPatch(e,i,i.context.context,s):((0,l.hj)(d)&&"string"==typeof d||(0,l.hj)(d)&&d instanceof A.e&&d.hasValue())&&this.operationsBuilder.remove(e.getPath(c))}dispatchOperationsFromAddEvent(e,i){const s=this.getFieldPathSegmentedFromChangeEvent(i),c=(0,nt.Go)(this.getFieldValueFromChangeEvent(i));(0,l.hj)(c)&&(c.place=this.getArrayIndexFromEvent(i),(0,l.a4)(i.group)&&(0,l.a4)(i.group.value)&&(1===i.group.value.map(p=>Object.values(p)).reduce((p,S)=>p.concat(S)).filter(p=>(0,l.hj)(p)).length?this.operationsBuilder.add(e.getPath([s]),[c],!1):this.operationsBuilder.add(e.getPath([s,"-"]),c,!1)))}dispatchOperationsFromChangeEvent(e,i,s,c){if(i.context&&i.context instanceof D.fHx)return void this.handleArrayGroupPatch(e,i,i.context.context,s);const d=this.getFieldPathFromEvent(i),p=this.getFieldPathSegmentedFromChangeEvent(i),S=this.getFieldValueFromChangeEvent(i);if(this.formBuilder.isQualdropGroup(i.model.parent)||this.formBuilder.isQualdropGroup(i.model))this.dispatchOperationsFromMap(this.getQualdropValueMap(i),e,i,s);else if(this.formBuilder.isRelationGroup(i.model))this.dispatchOperationsFromMap(this.getValueMap(S),e,i,s);else if(this.formBuilder.hasArrayGroupValue(i.model))this.operationsBuilder.add(e.getPath(p),S,!0);else if(s.isPathEqual(this.formBuilder.getPath(i.model))||c&&(0,l.hj)(s.value)){if((0,l.a4)(i.$event)&&(0,l.a4)(i.$event.previousIndex))if(i.$event.previousIndex<0)this.operationsBuilder.add(e.getPath(p),S,!0);else{const R=e.getPath(d),X=e.getPath(p+"/"+i.$event.previousIndex);(0,l.hj)(X.path)&&(0,l.hj)(R.path)&&X.path!==R.path&&this.operationsBuilder.move(R,X.path)}else(0,l.hj)(S)&&!S.hasValue()?0===this.getArrayIndexFromEvent(i)?this.operationsBuilder.remove(e.getPath(p)):this.operationsBuilder.remove(e.getPath(d)):this.operationsBuilder.replace(e.getPath(d),S);s.delete()}else S.hasValue()&&((0,l.b0)(this.getArrayIndexFromEvent(i))||0===this.getArrayIndexFromEvent(i)?this.operationsBuilder.add(e.getPath(p),S,!0):this.operationsBuilder.add(e.getPath(d),S))}dispatchOperationsFromMap(e,i,s,c){const d=e;if("remove"===s.type){const p=this.getQualdropItemPathFromEvent(s);this.operationsBuilder.remove(i.getPath(p))}else c.isPathEqual(this.formBuilder.getPath(s.model))&&c.value.forEach((p,S)=>{const R=d.get(S);R?(_t()(p,R)||this.operationsBuilder.add(i.getPath(S),R,!0),d.delete(S)):R||this.operationsBuilder.remove(i.getPath(S))}),d.forEach((p,S)=>{1===p.length&&(0,l.kZ)(p[0])?this.operationsBuilder.remove(i.getPath(S)):this.operationsBuilder.add(i.getPath(S),p,!0)});c.delete()}dispatchOperationsFromMoveEvent(e,i,s){return this.handleArrayGroupPatch(e,i.$event,i.$event.arrayModel,s)}handleArrayGroupPatch(e,i,s,c){const d=this.formBuilder.getValueFromModel([s]),p=this.getFieldPathSegmentedFromChangeEvent(i);(0,l.hj)(d)?this.operationsBuilder.add(e.getPath(p),d[p],!1):c.isPathEqual(this.formBuilder.getPath(i.model))&&this.operationsBuilder.remove(e.getPath(p))}static#t=n=()=>(this.\u0275fac=function(i){return new(i||a)(u.KVO(G.j),u.KVO(T.C))},this.\u0275prov=u.jDH({token:a,factory:a.\u0275fac,providedIn:"root"}))}return n(),a})();var tt=r(99172),t=r(73664);let J=(()=>{var n;class a{constructor(e,i,s){this.injectedCollectionId=e,this.injectedSectionData=i,this.injectedSubmissionId=s,this.collectionId=e,this.sectionData=i,this.submissionId=s}ngOnInit(){this.onSectionInit(),this.updateSectionStatus()}updateSectionStatus(){this.sectionStatusSub=this.getSectionStatus().pipe((0,h.p)(e=>(0,l.EA)(e)),(0,tt.Z)(!0)).subscribe(e=>{this.sectionService.setSectionStatus(this.submissionId,this.sectionData.id,e)})}ngOnDestroy(){(0,l.a4)(this.sectionStatusSub)&&this.sectionStatusSub.unsubscribe(),this.onSectionDestroy()}static#t=n=()=>(this.\u0275fac=function(i){return new(i||a)(t.rXU("collectionIdProvider"),t.rXU("sectionDataProvider"),t.rXU("submissionIdProvider"))},this.\u0275cmp=t.VBU({type:a,selectors:[["ds-section-model"]],decls:0,vars:0,template:function(i,s){},encapsulation:2}))}return n(),a})();var Q=r(12443);const dt={id:"discoverable",name:"discoverable"},yt={element:{container:"custom-control custom-checkbox ps-1",control:"custom-control-input",label:"custom-control-label pt-1"}},Tt={id:"accessConditionGroup",group:[]},Ft={element:{host:"mb-3 access-condition-group col",container:"ps-1 pe-1",control:"row "}},Pt={id:"accessCondition",groupFactory:null},Ot={grid:{group:"row pt-4"}},vt={id:"name",label:"submission.sections.accesses.form.access-condition-label",hint:"submission.sections.accesses.form.access-condition-hint",options:[]},Rt={element:{host:"col-12",label:"col-form-label name-label"}},xt={id:"startDate",label:"submission.sections.accesses.form.from-label",hint:"submission.sections.accesses.form.from-hint",placeholder:"submission.sections.accesses.form.from-placeholder",inline:!1,toggleIcon:"far fa-calendar-alt",relations:[{match:D.AjF,operator:
1D.fXj,when:[]}],required:!0,validators:{required:null},errorMessages:{required:"submission.sections.accesses.form.date-required-from"}},Bt={element:{label:"col-form-label"},grid:{host:"col-6"}},jt={id:"endDate",label:"submission.sections.accesses.form.until-label",hint:"submission.sections.accesses.form.until-hint",placeholder:"submission.sections.accesses.form.until-placeholder",inline:!1,toggleIcon:"far fa-calendar-alt",relations:[{match:D.AjF,operator:D.fXj,when:[]}],required:!0,validators:{required:null},errorMessages:{required:"submission.sections.accesses.form.date-required-until"}},$t={element:{label:"col-form-label"},grid:{host:"col-6"}};var st=r(23294),Lt=r(91261),Ut=r(59640);let At=(()=>{var n;class a{constructor(e){this.store=e}getAccessesData(e,i){return this.store.select((0,Lt.on)(e,i)).pipe((0,h.p)(s=>(0,l.EA)(s)),(0,st.F)())}static#t=n=()=>(this.\u0275fac=function(i){return new(i||a)(u.KVO(Ut.il))},this.\u0275prov=u.jDH({token:a,factory:a.\u0275fac,providedIn:"root"}))}return n(),a})();const Vt=["formRef"];function Xt(n,a){if(1&n){const o=t.RV6();t.j41(0,"ds-form",2,0),t.bIt("dfChange",function(i){u.eBV(o);const s=t.XpG();return u.Njj(s.onChange(i))})("removeArrayItem",function(i){u.eBV(o);const s=t.XpG();return u.Njj(s.onRemove(i))}),t.k0s()}if(2&n){const o=t.XpG();t.Y8G("formId",o.formId)("formModel",o.formModel)("displaySubmit",!1)("displayCancel",!1)}}let Gt=(()=>{var n;class a extends J{constructor(e,i,s,c,d,p,S,R,X,w,z){super(void 0,w,z),this.sectionService=e,this.formBuilderService=i,this.accessesConfigService=s,this.accessesService=c,this.formOperationsService=d,this.operationsBuilder=p,this.formService=S,this.translate=R,this.operationsService=X,this.injectedSectionData=w,this.injectedSubmissionId=z,this.subs=[]}initModelData(e){this.accessesData.accessConditions.forEach((i,s)=>{Array.of("name","startDate","endDate").filter(c=>i.hasOwnProperty(c)&&(0,l.hj)(i[c])).forEach(c=>{const d=this.formBuilderService.findById(c,e,s);if(d)if(d.type===D.fQD){const p=new Date(i[c]);d.value={year:p.getUTCFullYear(),month:p.getUTCMonth()+1,day:p.getUTCDate()}}else d.value=i[c]})})}onChange(e){if(e.model.type===D.eU4){const i=this.formOperationsService.getFieldPathSegmentedFromChangeEvent(e),s=this.formOperationsService.getFieldValueFromChangeEvent(e);this.operationsBuilder.replace(this.pathCombiner.getPath(i),s.value,!0)}else{if(e.model.id===vt.id){const i=e.control.parent.get("startDate"),s=e.control.parent.get("endDate");i?.markAsUntouched(),s?.markAsUntouched(),i?.setValue(null),s?.setValue(null),e.control.parent.markAsDirty()}this.formService.validateAllFormFields(this.formRef.formGroup),this.formService.isValid(this.formId).pipe((0,g.s)(1),(0,h.p)(i=>i),(0,E.Z)(()=>this.formService.getFormData(this.formId)),(0,g.s)(1)).subscribe(i=>{const s=[];i.accessCondition.map(c=>c.accessConditionGroup).filter(c=>(0,l.hj)(c)).forEach(c=>{let d;if(this.availableAccessConditionOptions.filter(p=>(0,l.Pe)(c.name)&&p.name===c.name[0].value).forEach(p=>d=p),d){const p=Object.assign({},c);if(p.name=this.retrieveValueFromField(c.name),d.hasStartDate){if(c.startDate){const S=this.retrieveValueFromField(c.startDate);p.startDate=(0,O.Sd)(S)}}else delete p.startDate;if(d.hasEndDate){if(c.endDate){const S=this.retrieveValueFromField(c.endDate);p.endDate=(0,O.Sd)(S)}}else delete p.endDate;s.push(p)}}),this.operationsBuilder.add(this.pathCombiner.getPath("accessConditions"),s,!0)})}}onRemove(e){const s="accessConditions/"+this.formOperationsService.getArrayIndexFromEvent(e);this.operationsBuilder.remove(this.pathCombiner.getPath(s))}onSectionDestroy(){this.subs.filter(e=>(0,l.a4)(e)).forEach(e=>e.unsubscribe())}onSectionInit(){this.pathCombiner=new b.S("sections",this.sectionData.id),this.formId=this.formService.getUniqueId(this.sectionData.id);const e=this.accessesConfigService.findByHref(this.sectionData.config,!0,!1).pipe((0,P.yd)(),(0,m.T)(s=>s.payload)),i=this.accessesService.getAccessesData(this.submissionId,this.sectionData.id);(0,y.z)([e,i]).subscribe(([s,c])=>{this.availableAccessConditionOptions=(0,l.hj)(s.accessConditionOptions)?s.accessConditionOptions:[],this.canChangeDiscoverable=!!s.canChangeDiscoverable,this.accessesData=c,this.formModel=this.buildFileEditForm()})}getSectionStatus(){return(0,x.of)(!0)}buildFileEditForm(){const e=[];
1if(this.canChangeDiscoverable){const N=Object.assign({},dt,{label:this.translate.instant("submission.sections.accesses.form.discoverable-label"),hint:this.translate.instant("submission.sections.accesses.form.discoverable-description"),value:this.accessesData.discoverable});e.push(new D.M7d(N,yt))}const i=Object.assign({},vt),s=Object.assign({},Pt),c=[];for(const N of this.availableAccessConditionOptions)c.push({label:N.name,value:N.name});i.options=c;const d=[],p=[];let S,R;this.availableAccessConditionOptions.forEach(N=>{if(N.hasStartDate&&(d.push({id:"name",value:N.name}),N.maxStartDate)){const H=new Date(N.maxStartDate);S={year:H.getUTCFullYear(),month:H.getUTCMonth()+1,day:H.getUTCDate()}}if(N.hasEndDate&&(p.push({id:"name",value:N.name}),N.maxEndDate)){const H=new Date(N.maxEndDate);R={year:H.getUTCFullYear(),month:H.getUTCMonth()+1,day:H.getUTCDate()}}});const X={relations:[{match:D.AjF,operator:D.fXj,when:d}]},w={relations:[{match:D.AjF,operator:D.fXj,when:p}]},z=d.length>0,rt=p.length>0;return s.groupFactory=()=>{const N=new D.z4z(i,Rt),H=Object.assign({},xt,X);S&&(H.max=S);const lt=Object.assign({},jt,w);R&&(lt.max=R);const ss=new D.dku(H,Bt),os=new D.dku(lt,$t),mt=Object.assign({},Tt);return mt.group=[N],z&&mt.group.push(ss),rt&&mt.group.push(os),[new D.iO5(mt,Ft)]},s.initialCount=(0,l.hj)(this.accessesData.accessConditions)?this.accessesData.accessConditions.length:1,e.push(new D.UqU(s,Ot)),this.initModelData(e),e}retrieveValueFromField(e){const i=Array.isArray(e)?e[0]:e;return i?i.value:void 0}static#t=n=()=>(this.\u0275fac=function(i){return new(i||a)(t.rXU(Q.c),t.rXU(G.j),t.rXU(_.SubmissionAccessesConfigDataService),t.rXU(At),t.rXU(et),t.rXU(T.C),t.rXU(W.u),t.rXU(f.c$),t.rXU(Y.U),t.rXU("sectionDataProvider"),t.rXU("submissionIdProvider"))},this.\u0275cmp=t.VBU({type:a,selectors:[["ds-section-accesses"]],viewQuery:function(i,s){if(1&i&&t.GBs(Vt,5),2&i){let c;t.mGM(c=t.lsd())&&(s.formRef=c.first)}},features:[t.Vt3],decls:1,vars:1,consts:[["formRef","formComponent"],[3,"formId","formModel","displaySubmit","displayCancel"],[3,"dfChange","removeArrayItem","formId","formModel","displaySubmit","displayCancel"]],template:function(i,s){1&i&&t.nVh(0,Xt,2,4,"ds-form",1),2&i&&t.vxM(s.formModel?0:-1)},dependencies:[$.s],styles:[".access-condition-group{position:relative;top:-2.3rem;margin-bottom:-2.3rem}"]}))}return n(),a})();var ut=r(89417),pt=r(77540),ot=r(88141),Nt=r(94925),kt=r(16868),Kt=r(6106),Wt=r(9938),wt=r(79104);const Yt=[[["",8,"selection"]],[["",8,"menu"]]],Ht=[".selection",".menu"];function zt(n,a){if(1&n&&(t.j41(0,"span",1),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const o=t.XpG();t.R7$(),t.SpI(" ",t.bMT(2,1,o.label)," ")}}let Jt=(()=>{var n;class a{constructor(){this.toggled=new t.bkB,this.close=new t.bkB}static#t=n=()=>(this.\u0275fac=function(i){return new(i||a)},this.\u0275cmp=t.VBU({type:a,selectors:[["ds-select"]],inputs:{label:"label",disabled:"disabled"},outputs:{toggled:"toggled",close:"close"},ngContentSelectors:Ht,decls:8,vars:2,consts:[["ngbDropdown","",1,"btn-group",3,"openChange"],["id","dsSelectMenuLabel",1,"input-group-text"],["aria-describedby","dsSelectMenuLabel","id","dsSelectMenuButton","ngbDropdownToggle","",1,"btn","btn-outline-primary","selection",3,"blur","click","dsBtnDisabled"],["ngbDropdownMenu","","id","dsSelectDropdownMenu","aria-labelledby","dsSelectMenuButton",1,"dropdown-menu"]],template:function(i,s){1&i&&(t.NAR(Yt),t.j41(0,"div")(1,"div",0),t.bIt("openChange",function(d){return s.toggled.emit(d)}),t.nVh(2,zt,3,3,"span",1),t.j41(3,"button",2),t.bIt("blur",function(d){return s.close.emit(d)})("click",function(d){return s.close.emit(d)}),t.SdG(4),t.k0s(),t.j41(5,"div",3)(6,"div"),t.SdG(7,1),t.k0s()()()()),2&i&&(t.R7$(2),t.vxM(s.label?2:-1),t.R7$(),t.Y8G("dsBtnDisabled",s.disabled))},dependencies:[wt.A,C.zH,C.tg,C.do,C.U0,f.h,f.D9],encapsulation:2}))}return n(),a})();
1var Ct=r(15202),ht=r(50186),q=r(67707),ct=r(17705);const Qt=()=>({standalone:!0}),Zt=(n,a)=>a.id;function qt(n,a){1&n&&(t.j41(0,"button",6),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"submission.sections.ccLicense.none")," "))}function te(n,a){if(1&n){const o=t.RV6();t.j41(0,"button",8),t.bIt("click",function(){const i=u.eBV(o).$implicit,s=t.XpG(3);return u.Njj(s.selectCcLicense(i))}),t.EFF(1),t.k0s()}if(2&n){const o=a.$implicit;t.R7$(),t.SpI(" ",o.name," ")}}function ee(n,a){if(1&n&&t.Z7z(0,te,2,1,"button",7,Zt),2&n){const o=t.XpG(2);t.Dyx(o.submissionCcLicenses)}}function ie(n,a){if(1&n){const o=t.RV6();t.j41(0,"div",2)(1,"div",3)(2,"input",4,0),t.nI1(4,"translate"),t.nI1(5,"translate"),t.mxI("ngModelChange",function(i){u.eBV(o);const s=t.XpG();return t.DH7(s.selectedCcLicense.name,i)||(s.selectedCcLicense.name=i),u.Njj(i)}),t.k0s(),t.j41(6,"div",5),t.bIt("scroll",function(i){u.eBV(o);const s=t.XpG();return u.Njj(s.onScroll(i))}),t.nVh(7,qt,3,3,"button",6)(8,ee,2,0),t.k0s()()()}if(2&n){const o=t.XpG();t.R7$(2),t.Y8G("placeholder",t.mNQ(o.storedCcLicenseLink?t.bMT(5,12,"submission.sections.ccLicense.change"):t.bMT(4,10,"submission.sections.ccLicense.select"))),t.R50("ngModel",o.selectedCcLicense.name),t.Y8G("ngModelOptions",t.lJ4(14,Qt)),t.R7$(4),t.Y8G("infiniteScrollDistance",5)("infiniteScrollThrottle",300)("infiniteScrollUpDistance",1.5)("fromRoot",!0)("scrollWindow",!1),t.R7$(),t.vxM(0===(null==o.submissionCcLicenses?null:o.submissionCcLicenses.length)?7:8)}}function ne(n,a){if(1&n&&(t.j41(0,"div",9)(1,"h5"),t.EFF(2),t.k0s(),t.nrm(3,"div",18),t.k0s()),2&n){const o=a.$implicit;t.R7$(2),t.SpI(" ",o.label," "),t.R7$(),t.Y8G("innerHTML",o.description,t.npT)}}function se(n,a){if(1&n){const o=t.RV6();t.j41(0,"div")(1,"div",14)(2,"div")(3,"h4"),t.EFF(4),t.k0s(),t.nrm(5,"div",15),t.k0s(),t.j41(6,"button",16),t.bIt("click",function(){u.eBV(o);const i=t.XpG(3);return u.Njj(i.closeInfoModal())}),t.k0s()(),t.j41(7,"div",17),t.Z7z(8,ne,4,2,"div",9,t.fX1),t.k0s()()}if(2&n){const o=t.XpG().$implicit;t.R7$(4),t.SpI(" ",o.label," "),t.R7$(),t.Y8G("innerHTML",o.description,t.npT),t.R7$(3),t.Dyx(o.enums)}}function oe(n,a){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&n){const o=t.XpG().ngVar;t.R7$(),t.SpI(" ",o.label," ")}}function ae(n,a){1&n&&(t.j41(0,"span"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"submission.sections.ccLicense.option.select")," "))}function re(n,a){if(1&n&&(t.qex(0,22),t.nVh(1,oe,2,1,"span"),t.nVh(2,ae,3,3,"span"),t.bVm()),2&n){const o=a.ngVar;t.R7$(),t.vxM(o?1:-1),t.R7$(),t.vxM(o?-1:2)}}function ce(n,a){if(1&n){const o=t.RV6();t.j41(0,"button",8),t.bIt("click",function(){const i=u.eBV(o).$implicit,s=t.XpG(2).$implicit,c=t.XpG(2);return u.Njj(c.selectOption(c.getSelectedCcLicense(),s,i))}),t.EFF(1),t.k0s()}if(2&n){const o=a.$implicit;t.R7$(),t.SpI(" ",o.label," ")}}function le(n,a){if(1&n&&(t.j41(0,"ds-select",13),t.DNE(1,re,3,2,"ng-container",19),t.qex(2,20),t.j41(3,"div",21),t.Z7z(4,ce,2,1,"button",7,t.fX1),t.k0s(),t.bVm(),t.k0s()),2&n){const o=t.XpG().$implicit,e=t.XpG(2);t.Y8G("disabled","jurisdiction"===o.id&&void 0!==e.defaultJurisdiction&&"none"!==e.defaultJurisdiction),t.R7$(),t.Y8G("ngVar",e.getSelectedOption(e.getSelectedCcLicense(),o)),t.R7$(3),t.Dyx(o.enums)}}function de(n,a){if(1&n){const o=t.RV6();t.j41(0,"div",23)(1,"div",24),t.bIt("click",function(){const i=u.eBV(o).$implicit,s=t.XpG(2).$implicit,c=t.XpG(2);return u.Njj(c.selectOption(c.getSelectedCcLicense(),s,i))}),t.nrm(2,"input",25),t.j41(3,"span"),t.EFF(4),t.k0s()()()}if(2&n){const o=a.$implicit,e=t.XpG(2).$implicit,i=t.XpG(2);t.R7$(2),t.Y8G("title",t.mNQ(o.label))("checked",i.isSelectedOption(i.getSelectedCcLicense(),e,o)),t.R7$(2),t.JRh(o.label)}}function ue(n,a){if(1&n&&t.Z7z(0,de,5,4,"div",23,t.fX1),2&n){const o=t.XpG().$implicit;t.Dyx(o.enums)}}function pe(n,a){if(1&n){const o=t.RV6();t.j41(0,"div",9)(1,"div",10)(2,"div"),t.EFF(3),t.k0s(),t.j41(4,"button",11),t.bIt("click",function(){u.eBV(o);const i=t.sdS(7),s=t.XpG(2);return u.Njj(s.openInfoModal(i))}),t.nrm(5,"i",12),t.k0s()(),t.DNE(6,se,10,2,"ng-template",null,1,t.C5r),t.nVh(8,le,6,2,"ds-select",13),t.nVh(9,ue,2,0),t.k0s()}if(2&n){const o=a.$implicit;t.R7$(2),t.HbH(t.VkB("fw-bold ",o.id)),t.R7$(),t.SpI(" ",o.label," "),t.R7$(5),t.vxM((null==o.enums?null:o.enums.length)>5?8:-1),t.R7$(),t.vxM((null==o.enums?null:o.enums.length)<=5?9:-1)}}function me(n,a){if(1&n&&t.Z7z(0,pe,10,6,"div",9,t.fX1),2&n){const o=t.XpG();t.Dyx(o.getSelectedCcLicense().fields)}}function _e(n,a){if(1&n){const o=t.RV6();t.j41(0,"div",26)(1,"div"),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"a",27),t.EFF(5),t.k0s(),t.j41(6,"div",28)(7,"div",24),t.bIt("click",function(){u.eBV(o);const i=t.XpG(2);return u.Njj(i.setAccepted(!i.accepted))}),t.nrm(8,"input",29),t.j41(9,"span"),t.EFF(10),t.nI1(11,"translate"),t.k0s()()()()}if(2&n){t.XpG();const o=t.r8f(0),e=t.XpG();t.R7$(2),t.SpI(" ",t.bMT(3,6,"submission.sections.ccLicense.link")," "),t.R7$(2),t.Y8G("href",t.mNQ(o),t.B4B),t.R7$(),t.SpI(" ",o," "),t.R7$(3),t.Y8G("checked",e.accepted),t.R7$(2),t.SpI(" ",t.bMT(11,8,"submission.sections.ccLicense.confirmation"))}}function he(n,a){1&n&&t.nrm(0,"ds-loading")}function fe(n,a){if(1&n&&(t.SS7(0),t.nI1(1,"async"),t.nVh(2,_e,12,10,"div",26)(3,he,1,0,"ds-loading")),2&n){const o=t.bH3(t.bMT(1,1,t.XpG().ccLicenseLink$));t.R7$(2),t.vxM(o?2:3)}}let ve=(()=>{var n;class a extends J{get storedCcLicenseLink(){return this.data.uri}get accepted(){return void 0===this.data.accepted?!!this.data.uri:this.data.accepted}constructor(e,i,s,c,d,p,S,R,X,w){super(R,X,w),this.modalService=e,this.sectionService=i,this.submissionCcLicensesDataService=s,this.submissionCcLicenseUrlDataService=c,this.operationsBuilder=d,this.configService=p,this.ref=S,this.injectedCollectionId=R,this.injectedSectionData=X,this.injectedSubmissionId=w,this.isLoading=!0,this.subscriptions=[],this.submissionCcLicenses=[],this.selectedCcLicense=new kt.C,this.ccLicenceOptions={elementsPerPage:20,currentPage:1}}ngOnInit(){super.ngOnInit(),(0,l.Tn)(this.ccLicenseLink$)&&(this.ccLicenseLink$=this.getCcLicenseLink$())}ngOnChanges(e){((0,l.a4)(e.sectionData)||(0,l.a4)(e.submissionCcLicenses))&&(this.ccLicenseLink$=this.getCcLicenseLink$())}get data(){return this.sectionData.data}selectCcLicense(e){this.selectedCcLicense.id!==e.id&&(this.selectedCcLicense=e,this.setAccepted(!1),this.updateSectionData({ccLicense:{id:e.id,fields:{}},uri:void 0}),this.ccLicenseLink$=this.getCcLicenseLink$())}getSelectedCcLicense(){return this.submissionCcLicenses&&this.data.ccLicense?this.submissionCcLicenses.filter(e=>
1e.id===this.data.ccLicense.id)[0]:null}selectOption(e,i,s){this.isSelectedOption(e,i,s)||(this.updateSectionData({ccLicense:{id:e.id,fields:Object.assign({},this.data.ccLicense.fields,{[i.id]:s})},accepted:!1}),this.ccLicenseLink$=this.getCcLicenseLink$())}getSelectedOption(e,i){return"jurisdiction"===i.id&&void 0!==this.defaultJurisdiction&&"none"!==this.defaultJurisdiction?i.enums.find(s=>s.id===this.defaultJurisdiction):this.data.ccLicense.fields[i.id]}isSelectedOption(e,i,s){return this.getSelectedOption(e,i)&&this.getSelectedOption(e,i).id===s.id}getCcLicenseLink$(){if(this.storedCcLicenseLink)return(0,x.of)(this.storedCcLicenseLink);if(!this.getSelectedCcLicense()||this.getSelectedCcLicense().fields.some(i=>!this.getSelectedOption(this.getSelectedCcLicense(),i)))return;const e=this.getSelectedCcLicense();return this.submissionCcLicenseUrlDataService.getCcLicenseLink(e,new Map(e.fields.map(i=>[i,this.getSelectedOption(e,i)])))}openInfoModal(e){this.modalRef=this.modalService.open(e)}closeInfoModal(){this.modalRef.close()}getSectionStatus(){return(0,x.of)(this.accepted)}onSectionDestroy(){this.subscriptions.forEach(e=>e.unsubscribe())}onSectionInit(){this.pathCombiner=new b.S("sections",this.sectionData.id),this.subscriptions.push(this.sectionService.getSectionState(this.submissionId,this.sectionData.id,q.l.CcLicense).pipe((0,h.p)(e=>(0,l.hj)(e)&&((0,l.hj)(e.data)||(0,l.hj)(e.errorsToShow))),(0,st.F)(),(0,m.T)(e=>e.data)).subscribe(e=>{if(this.data.accepted!==e.accepted){const i=this.pathCombiner.getPath("uri");e.accepted?this.getCcLicenseLink$().pipe((0,g.s)(1)).subscribe(s=>{this.operationsBuilder.add(i,s.toString(),!1,!0)}):this.data.uri&&this.operationsBuilder.remove(i)}this.sectionData.data=e}),this.configService.findByPropertyName("cc.license.jurisdiction").pipe((0,P.qD)(),(0,P.Bo)()).subscribe(e=>{this.defaultJurisdiction=void 0===e||0===e.values.length?"":e.values[0]})),this.loadCcLicences()}setAccepted(e){this.updateSectionData({accepted:e}),this.updateSectionStatus()}updateSectionData(e){this.sectionService.updateSectionData(this.submissionId,this.sectionData.id,Object.assign({},this.data,e))}onScroll(e){e.target.scrollTop+e.target.clientHeight>=e.target.scrollHeight&&!this.isLoading&&!this._isLastPage&&(this.ccLicenceOptions.currentPage++,this.loadCcLicences())}loadCcLicences(){this.isLoading=!0,this.subscriptions.push(this.submissionCcLicensesDataService.findAll(this.ccLicenceOptions).pipe((0,P.ak)(),(0,ot.M)(e=>this._isLastPage=e.pageInfo.currentPage===e.pageInfo.totalPages),(0,m.T)(e=>e.page)).subscribe(e=>{this.submissionCcLicenses=[...this.submissionCcLicenses,...e],this.isLoading=!1,this.ref.detectChanges()}))}static#t=n=()=>(this.\u0275fac=function(i){return new(i||a)(t.rXU(C.Bq),t.rXU(Q.c),t.rXU(Kt.SubmissionCcLicenseDataService),t.rXU(Wt.SubmissionCcLicenseUrlDataService),t.rXU(T.C),t.rXU(Nt.ConfigurationDataService),t.rXU(ct.gRc),t.rXU("collectionIdProvider"),t.rXU("sectionDataProvider"),t.rXU("submissionIdProvider"))},this.\u0275cmp=t.VBU({type:a,selectors:[["ds-submission-section-cc-licenses"]],features:[t.Vt3,t.OA$],decls:3,vars:3,consts:[["script","ngModel"],["infoModal",""],[1,"mb-4","ccLicense-select"],["ngbDropdown",""],["id","cc-license-dropdown","ngbDropdownToggle","","role","combobox",1,"form-control",3,"ngModelChange","ngModel","placeholder","ngModelOptions"],["ngbDropdownMenu","","aria-labelledby","cc-license-dropdown","role","menu","infiniteScroll","",1,"w-100","scrollable-menu",3,"scroll","infiniteScrollDistance","infiniteScrollThrottle","infiniteScrollUpDistance","fromRoot","scrollWindow"],[1,"dropdown-item","disabled"],[1,"dropdown-item"],[1,"dropdown-item",3,"click"],[1,"mb-4"],[1,"d-flex","flex-row"],[1,"btn","btn-outline-info","btn-sm","ms-2",3,"click"],[1,"fas","fa-question"],[3,"disabled"],[1,"modal-header","mb-4"],[3,"innerHTML"],["type","button","aria-label","Close",1,"btn-close",3,"click"],[1,"modal-body"],[1,"fw-light",3,"innerHTML"],["class","selection",4,"ngVar"],[1,"menu"],[1,"options-select-menu","overflow-auto"],[1,"selection"],[1,"d-flex","flex-row","m-1"],[3,"click"],["type","radio",1,"me-1",3,"title","checked"],[1,"mt-2","p-4","bg-light","text-dark"],["target","_blank","rel","noopener noreferrer",1,"license-link",3,"href"],[1,"m-2"],["type","checkbox","title","accepted",1,"me-2",3,"checked"]],template:function(i,s){1&i&&(t.nVh(0,ie,9,15,"div",2),t.nVh(1,me,2,0),t.nVh(2,fe,4,4)),2&i&&(t.vxM(s.submissionCcLicenses?0:-1),t.R7$(),t.vxM(s.get
1SelectedCcLicense()?1:-1),t.R7$(),t.vxM(s.ccLicenseLink$?2:-1))},dependencies:[Jt,ut.YN,ut.me,ut.BC,ut.vS,pt.e,pt.D,C.zH,C.tg,C.do,C.U0,Ct.v,f.h,ht.r,M.Jj,f.D9],styles:[".options-select-menu[_ngcontent-%COMP%]{max-height:25vh}.ccLicense-select[_ngcontent-%COMP%]{width:fit-content}.scrollable-menu[_ngcontent-%COMP%]{height:auto;max-height:var(--ds-dropdown-menu-max-height);overflow-x:hidden}"]}))}return n(),a})();var Ce=r(61880),be=r(5127),Se=r(92767),at=r(30250);function ge(n,a){1&n&&(t.j41(0,"div",2),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.JRh(t.bMT(2,1,"submission.sections.duplicates.none")))}function Ee(n,a){if(1&n&&(t.j41(0,"div"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const o=a.$implicit;t.R7$(),t.Lme(" ",t.bMT(2,2,"item.preview."+o.key)," ",o.value," ")}}function De(n,a){1&n&&(t.j41(0,"p"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.JRh(t.bMT(2,1,"submission.sections.duplicates.in-workspace")))}function Ie(n,a){1&n&&(t.j41(0,"p"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.JRh(t.bMT(2,1,"submission.sections.duplicates.in-workflow")))}function Me(n,a){if(1&n&&(t.j41(0,"div",4)(1,"a",5),t.EFF(2),t.k0s(),t.Z7z(3,Ee,3,4,"div",null,t.fX1),t.nVh(5,De,3,3,"p"),t.nVh(6,Ie,3,3,"p"),t.k0s()),2&n){const o=a.$implicit,e=t.XpG(3);t.R7$(),t.Y8G("href",e.getItemLink(o.uuid),t.B4B),t.R7$(),t.JRh(o.title),t.R7$(),t.Dyx(e.Metadata.toViewModelList(o.metadata)),t.R7$(2),t.vxM(o.workspaceItemId?5:-1),t.R7$(),t.vxM(o.workflowItemId?6:-1)}}function ye(n,a){if(1&n&&(t.j41(0,"div",3),t.EFF(1),t.nI1(2,"translate"),t.k0s(),t.Z7z(3,Me,7,4,"div",4,t.fX1)),2&n){const o=t.XpG().ngVar;t.R7$(),t.JRh(t.bMT(2,1,"submission.sections.duplicates.detected")),t.R7$(2),t.Dyx(null==o?null:o.potentialDuplicates)}}function Te(n,a){if(1&n&&(t.j41(0,"div",1),t.nVh(1,ge,3,3,"div",2),t.nVh(2,ye,5,3),t.k0s()),2&n){const o=a.ngVar;t.R7$(),t.vxM(0===(null==o?null:o.potentialDuplicates.length)?1:-1),t.R7$(),t.vxM((null==o?null:o.potentialDuplicates.length)>0?2:-1)}}let Fe=(()=>{var n;class a extends J{constructor(e,i,s,c,d,p){super(c,d,p),this.translate=e,this.sectionService=i,this.submissionService=s,this.injectedCollectionId=c,this.injectedSectionData=d,this.injectedSubmissionId=p,this.Metadata=Ce.O,this.AlertTypeEnum=I.v,this.isLoading=!0,this.subs=[]}ngOnInit(){super.ngOnInit()}onSectionInit(){this.isLoading=!1}isReadOnly(){return!0}onSectionDestroy(){}getSectionStatus(){return(0,x.of)(!this.isLoading)}getDuplicateData(){return this.sectionService.getSectionData(this.submissionId,this.sectionData.id,this.sectionData.sectionType)}getItemLink(e){return new be.t((0,Se.Fy)(),e).toString()}static#t=n=()=>(this.\u0275fac=function(i){return new(i||a)(t.rXU(f.c$),t.rXU(Q.c),t.rXU(at.E),t.rXU("collectionIdProvider"),t.rXU("sectionDataProvider"),t.rXU("submissionIdProvider"))},this.\u0275cmp=t.VBU({type:a,selectors:[["ds-submission-section-duplicates"]],features:[t.Vt3],decls:2,vars:3,consts:[["class","text-sm-start",4,"ngVar"],[1,"text-sm-start"],[1,"alert","alert-success","w-100"],[1,"alert","alert-warning","w-100"],[1,"ds-duplicate"],["target","_blank",3,"href"]],template:function(i,s){1&i&&(t.DNE(0,Te,3,2,"div",0),t.nI1(1,"async")),2&i&&t.Y8G("ngVar",t.bMT(1,1,s.getDuplicateData()))},dependencies:[f.h,ht.r,M.Jj,f.D9],encapsulation:2}))}return n(),a})();var Pe=r(48376),bt=r.n(Pe),St=r(47677),gt=r(78544),Oe=r(81948),Re=r(12384),xe=r(3601),Be=r(56327),je=r(84821),$e=r(66903),Et=r(61989);class Le{constructor(a=null,o=null){this._path=a,this._value=o}get path(){return this._path}set path(a){this._path=a}get value(){return this._value}set value(a){this._value=a}delete(){this._value=null,this._path=null}isPathEqual(a){return this._path&&_t()(this._path,a)}}var Ue=r(9847),Ae=r(94525),ft=r(4600);const Ve=["formRef"];function Xe(n,a){1&n&&t.nrm(0,"ds-loading",1)}function Ge(n,a){if(1&n){const o=t.RV6();t.j41(0,"ds-form",3,0),t.bIt("dfChange",function(i){u.eBV(o);const s=t.XpG();return u.Njj(s.onChange(i))})("dfFocus",function(i){u.eBV(o);const s=t.XpG();return u.Njj(s.onFocus(i))})("remove",function(i){u.eBV(o);const s=t.XpG();return u.Njj(s.onRemove(i))})("ngbEvent",function(i){u.eBV(o);const s=t.XpG();return u.Njj(s.onCustomEvent(i))})("removeArrayItem",function(i){u.eBV(o);const s=t.XpG();return u.Njj(s.onRemove(i))}),t.k0s()}if(2&n){const o=t.XpG();t.Y8G("formId",o.formId)("formModel",o.formModel)("displaySubmit",!1)("displayCancel",!1)}}let Ne=(()=>{var n;class a extends J{constructor(e,i,s,c,d,p,S,R,X,w,z,rt,N,H,lt){super(N,H,lt),this.cdr=e,this.formBuilderService=i,this.formOperationsService=s,this.formService=c,this.formConfigService=d,this.notificationsService=p,this.sectionService=S,this.submissionService=R,this.translate=X,this.submissionObjectService=w,this.objectCache=z,this.requestService=rt,this.injectedCollectionId=N,this.injectedSectionData=H,this.injectedSubmissionId=lt,this.isUpdating=!1,this.isLoading=!0,this.fieldsOnTheirWayToBeRemoved=new Map,this.formData=Object.create({}),this.previousValue=new Le,this.subs=[],this.isSectionReadonly=!1}onSectionInit(){this.pathCombiner=new b.S("sections",this.sectionData.id),this.formId=this.formService.getUniqueId(this.sectionData.id),this.sectionService.dispatchSetSectionFormId(this.submissionId,this.sectionData.id,this.formId),this.formConfigService.findByHref(this.sectionData.config).pipe((0,m.T)(e=>e.payload),(0,ot.M)(e=>this.formConfig=e),(0,E.Z)(()=>(0,y.z)([this.sectionService.getSectionData(this.submissionId,this.sectionData.id,this.sectionData.sectionType),this.submissionObjectService.findById(this.submissionId,!0,!1,(0,ft.s)("item")).pipe((0,P.yd)(),(0,P.Bo)()),this.sectionService.isSectionReadOnly(this.submissionId,this.sectionData.id,this.submissionService.getSubmissionScope())])),(0,g.s)(1)).subscribe(([e,i,s])=>{(0,l.b0)(this.formModel)&&(this.submissionObject=i,this.isSectionReadonly=s,this.initForm(e,this.sectionData.errorsToShow,this.sectionData.serverValidationErrors),this.sectionData.data=e,this.subscriptions(),this.isLoading=!1,this.cdr.detectChanges())})}onSectionDestroy(){this.subs.filter(e=>
1(0,l.a4)(e)).forEach(e=>e.unsubscribe())}getSectionStatus(){const e=this.formService.isValid(this.formId),i=this.sectionService.getSectionServerErrors(this.submissionId,this.sectionData.id).pipe((0,m.T)(s=>(0,l.Im)(s)));return(0,y.z)([e,i]).pipe((0,m.T)(([s,c])=>s&&c))}hasMetadataEnrichment(e){const i={};Object.keys(e).forEach(d=>{this.inCurrentSubmissionScope(d)&&(i[d]=e[d])});const s=[],c=(0,Ae.iv)(i,this.formData);return Object.keys(c).forEach(d=>{c[d].forEach(p=>{p.hasOwnProperty("value")&&bt()(this.formData[d],{value:p.value})<0&&s.push(p)})}),(0,l.hj)(s)}inCurrentSubmissionScope(e){switch(this.formConfig?.rows.find(s=>s.fields?.[0]?.selectableMetadata?s.fields?.[0]?.selectableMetadata?.[0]?.metadata===e:!!s.fields?.[0]?.selectableRelationship&&s.fields?.[0]?.selectableRelationship.relationshipType===e.replace(/^relationship\./g,""))?.fields?.[0]?.scope){case Et.L.WorkspaceItem.valueOf():return this.submissionObject.type===je.F.type.value;case Et.L.WorkflowItem.valueOf():return this.submissionObject.type===Be.t.type.value;default:return!0}}initForm(e,i,s){try{this.formModel=this.formBuilderService.modelFromConfiguration(this.submissionId,this.formConfig,this.collectionId,e,this.submissionService.getSubmissionScope(),this.isSectionReadonly);const c=this.sectionService.computeSectionConfiguredMetadata(this.formConfig);this.sectionService.updateSectionData(this.submissionId,this.sectionData.id,e,i,s,c)}catch(c){const p={message:this.translate.instant("error.submission.sections.init-form-error")+c.toString(),path:"/sections/"+this.sectionData.id};c instanceof Error&&console.error(c.stack),this.sectionService.setSectionError(this.submissionId,this.sectionData.id,p)}}updateForm(e){const i=e.data,s=e.errorsToShow;(0,l.hj)(i)&&!_t()(i,this.sectionData.data)?(this.sectionData.data=i,this.hasMetadataEnrichment(i)?(this.isUpdating=!0,this.formModel=null,this.cdr.detectChanges(),this.initForm(i,s,e.serverValidationErrors),this.checksForErrors(s),this.isUpdating=!1,this.cdr.detectChanges()):((0,l.hj)(s)||(0,l.hj)(this.sectionData.errorsToShow))&&this.checksForErrors(s)):((0,l.hj)(s)||(0,l.hj)(this.sectionData.errorsToShow))&&this.checksForErrors(s)}checksForErrors(e){this.formService.isFormInitialized(this.formId).pipe((0,St.I)(i=>!0===i&&!this.isUpdating)).subscribe(()=>{this.sectionService.checkSectionErrors(this.submissionId,this.sectionData.id,this.formId,e,this.sectionData.errorsToShow),this.sectionData.errorsToShow=e,this.cdr.detectChanges()})}subscriptions(){this.subs.push(this.formService.getFormData(this.formId).pipe((0,st.F)()).subscribe(e=>{this.formData=e}),this.sectionService.getSectionState(this.submissionId,this.sectionData.id,this.sectionData.sectionType).pipe((0,h.p)(e=>(0,l.hj)(e)&&((0,l.hj)(e.data)||(0,l.hj)(e.errorsToShow))),(0,st.F)()).subscribe(e=>{this.fieldsOnTheirWayToBeRemoved=new Map,this.sectionMetadata=e.metadata,this.updateForm(e)}))}onChange(e){this.formOperationsService.dispatchOperationsFromEvent(this.pathCombiner,e,this.previousValue,this.hasStoredValue(this.formBuilderService.getId(e.model),this.formOperationsService.getArrayIndexFromEvent(e)));const i=this.formOperationsService.getFieldPathSegmentedFromChangeEvent(e),s=this.formOperationsService.getFieldValueFromChangeEvent(e);(-1!==gt.c.submission.autosave.metadata.indexOf(i)&&(0,l.hj)(s)||this.hasRelatedCustomError(i))&&this.submissionService.dispatchSave(this.submissionId)}hasRelatedCustomError(e){const i=bt()(this.sectionData.errorsToShow,{path:this.pathCombiner.getPath(e).path});if(-1!==i){const c=this.sectionData.errorsToShow[i].message.replace("error.validation.","");return!gt.c.form.validatorMap.hasOwnProperty(c)}return!1}onFocus(e){const i=this.formOperationsService.getFieldValueFromChangeEvent(e),s=this.formBuilderService.getPath(e.model);this.formBuilderService.hasMappedGroupValue(e.model)?(this.previousValue.path=s,this.previousValue.value=this.formOperationsService.getQualdropValueMap(e)):(0,l.hj)(i)&&("object"==typeof i&&(0,l.hj)(i.value)||"string"==typeof i)&&(this.previousValue.path=s,this.previousValue.value=i)}onRemove(e){const i=this.formBuilderService.getId(e.model),s=this.formOperationsService.getArrayIndexFromEvent(e);
1if(this.fieldsOnTheirWayToBeRemoved.has(i)){const c=this.fieldsOnTheirWayToBeRemoved.get(i);c.push(s),this.fieldsOnTheirWayToBeRemoved.set(i,c)}else this.fieldsOnTheirWayToBeRemoved.set(i,[s]);this.formOperationsService.dispatchOperationsFromEvent(this.pathCombiner,e,this.previousValue,this.hasStoredValue(i,s))}hasStoredValue(e,i){return!!(0,l.hj)(this.sectionData.data)&&this.sectionData.data.hasOwnProperty(e)&&(0,l.hj)(this.sectionData.data[e][i])&&!this.isFieldToRemove(e,i)}isFieldToRemove(e,i){return this.fieldsOnTheirWayToBeRemoved.has(e)&&this.fieldsOnTheirWayToBeRemoved.get(e).includes(i)}onCustomEvent(e){this.formOperationsService.dispatchOperationsFromEvent(this.pathCombiner,e,this.previousValue,null)}static#t=n=()=>(this.\u0275fac=function(i){return new(i||a)(t.rXU(ct.gRc),t.rXU(G.j),t.rXU(et),t.rXU(W.u),t.rXU(Re.SubmissionFormsConfigDataService),t.rXU(Ue.I),t.rXU(Q.c),t.rXU(at.E),t.rXU(f.c$),t.rXU($e.$),t.rXU(Oe.$),t.rXU(xe.B),t.rXU("collectionIdProvider"),t.rXU("sectionDataProvider"),t.rXU("submissionIdProvider"))},this.\u0275cmp=t.VBU({type:a,selectors:[["ds-submission-section-form"]],viewQuery:function(i,s){if(1&i&&t.GBs(Ve,5),2&i){let c;t.mGM(c=t.lsd())&&(s.formRef=c.first)}},features:[t.Vt3],decls:2,vars:2,consts:[["formRef","formComponent"],["message","Loading..."],[3,"formId","formModel","displaySubmit","displayCancel"],[3,"dfChange","dfFocus","remove","ngbEvent","removeArrayItem","formId","formModel","displaySubmit","displayCancel"]],template:function(i,s){1&i&&(t.nVh(0,Xe,1,0,"ds-loading",1),t.nVh(1,Ge,2,4,"ds-form",2)),2&i&&(t.vxM(s.isLoading?0:-1),t.R7$(),t.vxM(!s.isLoading&&s.formModel?1:-1))},dependencies:[$.s,Ct.v],encapsulation:2}))}return n(),a})();function ke(n,a){if(1&n&&(t.rj2(0,"li"),t.EFF(1),t.nI1(2,"translate"),t.eux()),2&n){const o=t.XpG().$implicit;t.R7$(),t.Lme("",t.bMT(2,2,"submission.sections.identifiers."+o.identifierType+"_label")," ",o.value)}}function Ke(n,a){if(1&n&&t.nVh(0,ke,3,4,"li"),2&n){const o=a.$implicit;t.XpG(2);const e=t.r8f(0);t.vxM(e.displayTypes.includes(o.identifierType)&&o.value?0:-1)}}function We(n,a){if(1&n&&(t.rj2(0,"div")(1,"span"),t.EFF(2),t.nI1(3,"translate"),t.eux(),t.rj2(4,"ul"),t.Z7z(5,Ke,1,1,null,null,t.fX1),t.eux()()),2&n){t.XpG();const o=t.r8f(0);t.R7$(2),t.JRh(t.bMT(3,1,"submission.sections.identifiers.info")),t.R7$(3),t.Dyx(o.identifiers)}}let we=(()=>{var n;class a extends J{constructor(e,i,s,c,d,p){super(c,d,p),this.translate=e,this.sectionService=i,this.submissionService=s,this.injectedCollectionId=c,this.injectedSectionData=d,this.injectedSubmissionId=p,this.isLoading=!0}onSectionInit(){this.isLoading=!1,this.identifierData$=this.getIdentifierData()}onSectionDestroy(){}getSectionStatus(){return(0,x.of)(!this.isLoading)}getIdentifierData(){return this.sectionService.getSectionData(this.submissionId,this.sectionData.id,this.sectionData.sectionType)}static#t=n=()=>(this.\u0275fac=function(i){return new(i||a)(t.rXU(f.c$),t.rXU(Q.c),t.rXU(at.E),t.rXU("collectionIdProvider"),t.rXU("sectionDataProvider"),t.rXU("submissionIdProvider"))},this.\u0275cmp=t.VBU({type:a,selectors:[["ds-submission-section-identifiers"]],features:[t.Vt3],decls:3,vars:4,template:function(i,s){if(1&i&&(t.SS7(0),t.nI1(1,"async"),t.nVh(2,We,7,3,"div")),2&i){const c=t.bH3(t.bMT(1,1,s.identifierData$));t.R7$(2),t.vxM(c&&c.identifiers?2:-1)}},dependencies:[f.h,M.Jj,f.D9],encapsulation:2}))}return n(),a})();var Dt=r(69295);const Ye={granted:{element:{container:"custom-control custom-checkbox ps-1",control:"custom-control-input",label:"custom-control-label pt-1"}}},He=[{id:"granted",label:"submission.sections.license.granted-label",required:!0,value:!1,validators:{required:null},errorMessages:{required:"submission.sections.license.required",notgranted:"submission.sections.license.notgranted"},type:"CHECKBOX"}],ze=["formRef"];function Je(n,a){if(1&n){const o=t.RV6();t.j41(0,"ds-form",3,0),t.bIt("dfChange",function(i){u.eBV(o);const s=t.XpG();return u.Njj(s.onChange(i))}),t.k0s()}if(2&n){const o=t.XpG();t.Y8G("formId",o.formId)("formModel",o.formModel)("formLayout",o.formLayout)("displaySubmit",o.displaySubmit)("displayCancel",!1)}}let Qe=(()=>{var n;class a extends J{constructor(e,i,s,c,d,p,S,R,X,w,z,rt){super(w,z,rt),this.changeDetectorRef=e,this.collectionDataService=i,this.formBuilderService=s,this.formOperationsService=c,this.formService=d,this.operationsBuilder=p,this.sectionService=S,this.submissionService=R,this.translateService=X,this.injectedCollectionId=w,this.injectedSectionData=z,this.injectedSubmissionId=rt,this.formLayout=Ye,this.displaySubmit=!1,this.subs=[]}onSectionInit(){this.pathCombiner=new b.S("sections",this.sectionData.id),this.formId=this.formService.getUniqueId(this.sectionData.id),this.formModel=this.formBuilderService.fromJSON(He);const e=this.formBuilderService.findById("granted",this.formModel);e.label&&(e.label=this.translateService.instant(e.label)),e.value=this.sectionData.data.granted,this.licenseText$=this.collectionDataService.findById(this.collectionId,!0,!0,(0,ft.s)("license")).pipe((0,h.p)(i=>(0,l.EA)(i.payload)),(0,E.Z)(i=>i.payload.license),(0,St.I)(i=>(0,l.EA)(i.payload)),(0,m.T)(i=>i.payload.text),(0,tt.Z)("")),this.subs.push(this.sectionService.isSectionReadOnly(this.submissionId,this.sectionData.id,this.submissionService.getSubmissionScope()).pipe((0,g.s)(1),(0,h.p)(i=>i)).subscribe(()=>{e.disabled=!0}),this.sectionService.getSectionErrors(this.submissionId,this.sectionData.id).pipe((0,h.p)(i=>(0,l.hj)(i)),(0,st.F)()).subscribe(i=>{const s=i.map(c=>"/sections/license"===c.path?e.checked?null:Object.assign({},c,{path:"/sections/license/granted"}):c).filter(c=>(0,l.Pe)(c));(0,l.hj)(s)?(this.sectionService.checkSectionErrors(this.submissionId,this.sectionData.id,this.formId,s),this.sectionData.errors=i):this.sectionService.dispatchRemoveSectionErrors(this.submissionId,this.sectionData.id)}))}ngAfterViewChecked(){this.changeDetectorRef.detectChanges()}getSectionStatus(){const e=this.formBuilderService.findById("granted",this.formModel);return e.valueChanges.pipe((0,m.T)(i=>!0===i),(0,tt.Z)(e.value))}onChange(e){const i=this.formOperationsService.getFieldPathSegmentedFromChangeEvent(e),s=this.formOperationsService.getFieldValueFromChangeEvent(e);s?(this.operationsBuilder.add(this.pathCombiner.getPath(i),s.value.toString(),!1,!0),this.sectionService.dispatchRemoveSectionErrors(this.submissionId,this.sectionData.id)):this.operationsBuilder.remove(this.pathCombiner.getPath(i)),this.submissionService.dispatchSaveSection(this.submissionId,this.sectionData.id)}onSectionDestroy(){this.subs.filter(e=>
1(0,l.a4)(e)).forEach(e=>e.unsubscribe())}static#t=n=()=>(this.\u0275fac=function(i){return new(i||a)(t.rXU(ct.gRc),t.rXU(Dt.CollectionDataService),t.rXU(G.j),t.rXU(et),t.rXU(W.u),t.rXU(T.C),t.rXU(Q.c),t.rXU(at.E),t.rXU(f.c$),t.rXU("collectionIdProvider"),t.rXU("sectionDataProvider"),t.rXU("submissionIdProvider"))},this.\u0275cmp=t.VBU({type:a,selectors:[["ds-submission-section-license"]],viewQuery:function(i,s){if(1&i&&t.GBs(ze,5),2&i){let c;t.mGM(c=t.lsd())&&(s.formRef=c.first)}},features:[t.Jv_([]),t.Vt3],decls:5,vars:4,consts:[["formRef","formComponent"],[1,"mb-5","preserve-line-breaks",3,"innerHTML"],[3,"formId","formModel","formLayout","displaySubmit","displayCancel"],[3,"dfChange","formId","formModel","formLayout","displaySubmit","displayCancel"]],template:function(i,s){1&i&&(t.nrm(0,"span",1),t.nI1(1,"async"),t.nrm(2,"br")(3,"br"),t.nVh(4,Je,2,5,"ds-form",2)),2&i&&(t.Y8G("innerHTML",t.bMT(1,2,s.licenseText$),t.npT),t.R7$(4),t.vxM(s.formModel?4:-1))},dependencies:[$.s,M.Jj],encapsulation:2}))}return n(),a})();var Ze=r(43374),qe=r(49832);const ti=n=>({"border-danger":n}),ei=n=>({"bg-light":n}),ii=n=>({pattern:n});function ni(n,a){1&n&&(t.j41(0,"button",11),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"submission.section.section-coar-notify.dropdown.no-data")," "))}function si(n,a){if(1&n){const o=t.RV6();t.j41(0,"button",17),t.bIt("click",function(){u.eBV(o);const i=t.XpG().$index,s=t.XpG(3).$implicit,c=t.XpG(2);return u.Njj(c.onChange(s.pattern,i,null))}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"submission.section.section-coar-notify.dropdown.select-none")," "))}function oi(n,a){if(1&n){const o=t.RV6();t.j41(0,"button",18),t.bIt("click",function(){const i=u.eBV(o).$implicit,s=t.XpG().$index,c=t.XpG(3).$implicit,d=t.XpG(2);return u.Njj(d.onChange(c.pattern,s,i))}),t.j41(1,"b"),t.EFF(2),t.k0s(),t.nrm(3,"br"),t.EFF(4),t.k0s()}if(2&n){const o=a.$implicit,e=t.XpG().$index,i=t.XpG(3).$implicit,s=t.XpG(2);t.Y8G("ngClass",t.eq3(3,ei,(null==s.ldnServiceByPattern[i.pattern].services[e]?null:s.ldnServiceByPattern[i.pattern].services[e].id)===o.id)),t.R7$(2),t.SpI(" ",o.name," "),t.R7$(2),t.SpI(" ",o.description," ")}}function ai(n,a){if(1&n){const o=t.RV6();t.j41(0,"button",19),t.nI1(1,"translate"),t.nI1(2,"translate"),t.bIt("click",function(){u.eBV(o);const i=t.XpG().$index,s=t.XpG(3).$implicit,c=t.XpG(2);return u.Njj(c.removeService(s,i))}),t.j41(3,"span"),t.nrm(4,"i",20),t.k0s()()}if(2&n){const o=t.XpG().$index;t.AVh("mt-2",o>0),t.Y8G("title",t.mNQ(t.bMT(1,5,"form.remove"))),t.BMQ("aria-label",t.bMT(2,7,"form.remove"))}}function ri(n,a){if(1&n&&(t.j41(0,"small",14),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const o=t.XpG(4).$implicit;t.R7$(),t.SpI(" ",t.i5U(2,1,"submission.section.section-coar-notify.small.notification",t.eq3(4,ii,o.pattern))," ")}}function ci(n,a){if(1&n&&(t.j41(0,"small",21),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const o=a.$implicit;t.R7$(),t.SpI(" ",t.bMT(2,1,o.message)," ")}}function li(n,a){if(1&n&&(t.Z7z(0,ci,3,3,"small",21,t.fX1),t.nI1(2,"async")),2&n){const o=t.XpG().$index,e=t.XpG(3).$implicit,i=t.XpG(2);t.Dyx(t.bMT(2,0,i.getShownSectionErrors$(e.pattern,o)))}}function di(n,a){if(1&n&&(t.j41(0,"div"),t.EFF(1),t.k0s()),2&n){const o=t.XpG(2).$index,e=t.XpG(3).$implicit,i=t.XpG(2);t.R7$(),t.SpI(" ",i.ldnServiceByPattern[e.pattern].services[o].description," ")}}function ui(n,a){1&n&&(t.j41(0,"span",25),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"submission.section.section-coar-notify.selection.no-description")," "))}function pi(n,a){if(1&n&&(t.j41(0,"div",15)(1,"div",22),t.nrm(2,"i",23),t.j41(3,"div",24)(4,"div"),t.EFF(5),t.nI1(6,"translate"),t.k0s(),t.nVh(7,di,2,1,"div")(8,ui,3,3,"span",25),t.k0s()()()),2&n){const o=t.XpG().$index,e=t.XpG(3).$implicit,i=t.XpG(2);t.R7$(5),t.JRh(t.bMT(6,2,"submission.section.section-coar-notify.selection.description")),t.R7$(2),t.vxM(null!=i.ldnServiceByPattern[e.pattern].services[o]&&i.ldnServiceByPattern[e.pattern].services[o].description?7:8)}}function mi(n,a){1&n&&(t.j41(0,"div",4)(1,"div",26)(2,"div",24)(3,"span"),t.EFF(4),t.nI1(5,"translate"),t.k0s()()()()),2&n&&(t.R7$(4),t.SpI(" ",t.bMT(5,1,"submission.section.section-coar-notify.notification.error")," "))}function _i(n,a){if(1&n){const o=t.RV6();t.j41(0,"div",27),t.bIt("click",function(){u.eBV(o);const i=t.XpG(4).$implicit,s=t.XpG(2);return u.Njj(s.addNewService(i))}),t.nrm(1,"i",28),t.EFF(2),t.nI1(3,"translate"),t.k0s()}2&n&&(t.R7$(2),t.SpI(" ",t.bMT(3,1,"submission.sections.general.add-more")," "))}function hi(n,a){if(1&n){const o=t.RV6();t.j41(0,"div")(1,"div",4)(2,"div",5,0)(4,"div",6),t.nrm(5,"i",7),t.j41(6,"input",8),t.nI1(7,"async"),t.bIt("click",function(){u.eBV(o);const i=t.sdS(3);return u.Njj(i.open())}),t.k0s()(),t.j41(8,"div",9)(9,"div",10),t.nVh(10,ni,3,3,"button",11),t.nI1(11,"async"),t.nVh(12,si,3,3,"button",11),t.nI1(13,"async"),t.Z7z(14,oi,5,5,"button",12,t.fX1),t.nI1(16,"async"),t.k0s()()(),t.nVh(17,ai,5,9,"button",13),t.k0s(),t.nVh(18,ri,3,6,"small",14),t.nVh(19,li,3,2),t.nI1(20,"async"),t.nVh(21,pi,9,4,"div",15),t.nVh(22,mi,6,3,"div",4),t.nI1(23,"async"),t.j41(24,"div",4),t.nVh(25,_i,4,3,"div",16),t.k0s()()}if(2&n){let o,e,i,s,c;const d=a.$index,p=t.XpG(3).$implicit,S=t.XpG(2);t.R7$(2),t.AVh("mt-2",d>0),t.R7$(2),t.BMQ("aria-label",p.pattern+".dropdown"),t.R7$(2),t.Y8G("readonly",!0)("ngClass",t.eq3(30,ti,(null==(o=t.bMT(7,18,S.getShownSectionErrors$(p.pattern,d)))?null:o.length)>0))("value",null==S.ldnServiceByPattern[p.pattern].services[d]?null:S.ldnServiceByPattern[p.pattern].services[d].name),t.BMQ("aria-label",p.pattern+".dropdownanchor"),t.R7$(3),t.Y8G("infiniteScrollDistance",2)("infiniteScrollThrottle",50)("scrollWindow",!1),t.R7$(),t.vxM(0===(null==(e=t.bMT(11,20,S.filterServices(p.pattern)))?null:e.length)?10:-1),t.R7$(2),t.vxM((null==(i=t.bMT(13,22,S.filterServices(p.pattern)))?null:i.length)>0?12:-1),t.R7$(2),t.Dyx(t.bMT(16,24,S.filterServices(p.pattern))),t.R7$(3),t.vxM(S.ldnServiceByPattern[p.pattern].services.length>1?17:-1),t.R7$(),t.vxM(S.ldnServiceByPattern[p.pattern].services[d]||d!==S.ldnServiceByPattern[p.pattern].services.length-1?-1:18),t.R7$(),t.vxM((null==(s=t.bMT(20,26,S.getShownSectionErrors$(p.pattern,d)))?null:s.length)>0?19:-1),t.R7$(2),t.vxM(S.ldnServiceByPattern[p.pattern].services[d]?21:-1),t.R7$(),t.vxM((null==(c=t.bMT(23,28,S.getShownSectionErrors$(p.pattern,d)))?null:c.length)>0?22:-1),t.R7$(3),t.vxM(p.multipleRequest&&d===S.ldnServiceByPattern[p.pattern].services.length-1?25:-1)}}function fi(n,a){if(1&n&&(t.j41(0,"div"),t.Z7z(1,hi,26,32,"div",null,t.fX1),t.k0s()),2&n){const o=t.XpG(2).$implicit,e=t.XpG(2);t.R7$(),t.Dyx(e.ldnServiceByPattern[o.pattern].services)}}function vi(n,a){if(1&n&&(t.j41(0,"div")(1,"label",3),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.nVh(4,fi,3,0,"div"),t.k0s()),2&n){const o=t.XpG().$implicit,e=t.XpG(2);t.R7$(2),t.SpI(" ",t.bMT(3,2,"submission.section.section-coar-notify.control."+o.pattern+".label")," "),t.R7$(2),t.vxM(null!=e.ldnServiceByPattern[o.pattern]&&e.ldnServiceByPattern[o.pattern].services.length?4:-1)}}function Ci(n,a){if(1&n&&(t.j41(0,"div",2),t.nVh(1,vi,5,4,"div"),t.nI1(2,"async"),t.k0s()),2&n){let o;const e=a.$implicit,i=t.XpG(2);t.R7$(),t.vxM((null==(o=t.bMT(2,1,i.filterServices(e.pattern)))?null:o.length)>0?1:-1)}}function bi(n,a){if(1&n&&t.Z7z(0,Ci,3,3,"div",2,t.fX1),2&n){const o=t.XpG();t.Dyx(o.patterns)}}function Si(n,a){1&n&&(t.j41(0,"p"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"submission.section.section-coar-notify.info.no-pattern")," "))}let gi=(()=>{var n;class a extends J{constructor(e,i,s,c,d,p,S,R){super(p,S,R),this.ldnServicesService=e,this.operationsBuilder=i,this.sectionService=s,this.coarNotifyConfigDataService=c,this.chd=d,this.injectedCollectionId=p,this.injectedSectionData=S,this.injectedSubmissionId=R,this.hasSectionData=!1,this.patterns=[],this.ldnServiceByPattern={},this.previousServices={},this.fieldsOnTheirWayToBeRemoved=new Map,this.subs=[],this.filteredServicesByPattern={}}
1onSectionInit(){this.setCoarNotifyConfig(),this.getSectionServerErrorsAndSetErrorsToDisplay(),this.pathCombiner=new b.S("sections",this.sectionData.id)}setCoarNotifyConfig(){this.subs.push(this.coarNotifyConfigDataService.findAll().pipe((0,P.qD)()).subscribe(e=>{e.hasSucceeded&&(this.patterns=e.payload.page[0].patterns,this.initSelectedServicesByPattern())}))}onChange(e,i,s){if(this.ldnServiceByPattern[e].services[i]?.id===s?.id)return;this.previousServices[e]||(this.previousServices[e]={services:[],allowsMultipleRequests:this.patterns.find(d=>d.pattern===e)?.multipleRequest}),this.previousServices[e].services[i]=this.ldnServiceByPattern[e].services[i],this.ldnServiceByPattern[e].services[i]=s;const c=(0,l.a4)(this.previousServices[e].services[i])&&this.previousServices[e].services[i].id!==s?.id;c&&(this.operationsBuilder.flushOperation(this.pathCombiner.getPath([e,"-"])),this.filteredServicesByPattern[e]?.includes(this.previousServices[e].services[i])&&this.operationsBuilder.remove(this.pathCombiner.getPath([e,i.toString()]))),(!c||s?.id&&c)&&this.operationsBuilder.add(this.pathCombiner.getPath([e,"-"]),[s.id],!1,!0),this.previousServices[e].services[i]=this.ldnServiceByPattern[e].services[i],this.sectionService.dispatchRemoveSectionErrors(this.submissionId,this.sectionData.id),this.chd.detectChanges()}initSelectedServicesByPattern(){this.patterns.forEach(e=>{(0,l.a4)(this.sectionData.data[e.pattern])?this.subs.push(this.filterServices(e.pattern).subscribe(i=>{this.ldnServiceByPattern[e.pattern]||(this.ldnServiceByPattern[e.pattern]={services:[],allowsMultipleRequests:e.multipleRequest}),this.ldnServiceByPattern[e.pattern].services=i.filter(s=>{const c=this.sectionData.data[e.pattern].find(d=>d.id===s.id);return this.addService(e,c),this.sectionData.data[e.pattern].includes(s.uuid)})})):(this.ldnServiceByPattern[e.pattern]={services:[],allowsMultipleRequests:e.multipleRequest},this.addService(e,null))})}addService(e,i){this.ldnServiceByPattern[e.pattern]||(this.ldnServiceByPattern[e.pattern]={services:[],allowsMultipleRequests:e.multipleRequest}),this.ldnServiceByPattern[e.pattern].services.push(i)}removeService(e,i){this.ldnServiceByPattern[e.pattern]&&(this.ldnServiceByPattern[e.pattern].services.splice(i,1),this.previousServices[e.pattern]?.services.splice(i,1),this.operationsBuilder.flushOperation(this.pathCombiner.getPath([e.pattern,"-"])),this.sectionService.dispatchRemoveSectionErrors(this.submissionId,this.sectionData.id)),this.ldnServiceByPattern[e.pattern].services.length||this.addNewService(e)}filterServices(e){return this.ldnServicesService.findByInboundPattern(e).pipe((0,P.qD)(),(0,ot.M)(i=>{if(i.hasFailed)throw new Error(`Failed to retrieve services for pattern ${e}`)}),(0,h.p)(i=>i.hasSucceeded),(0,P.Bo)(),(0,P.W8)(),(0,ot.M)(i=>{this.filteredServicesByPattern[e]||(this.filteredServicesByPattern[e]=[]),0===this.filteredServicesByPattern[e].length&&this.filteredServicesByPattern[e].push(...i)}),(0,m.T)(i=>i.filter(s=>(this.hasSectionData||(this.hasSectionData=this.hasInboundPattern(s,e)),this.hasInboundPattern(s,e)))))}hasInboundPattern(e,i){return e.notifyServiceInboundPatterns.some(s=>s.pattern===i)}getSectionServerErrorsAndSetErrorsToDisplay(){this.subs.push(this.sectionService.getSectionServerErrors(this.submissionId,this.sectionData.id).pipe((0,g.s)(1),(0,h.p)(e=>(0,l.hj)(e))).subscribe(e=>{(0,l.hj)(e)&&e.forEach(i=>{this.sectionService.setSectionError(this.submissionId,this.sectionData.id,i)})}))}getShownSectionErrors$(e,i){return this.sectionService.getShownSectionErrors(this.submissionId,this.sectionData.id,this.sectionData.sectionType).pipe((0,g.s)(1),(0,h.p)(s=>(0,l.hj)(s)),(0,m.T)(s=>s.filter(c=>c.path.includes(`${e}/${i}`))))}getSectionStatus(){return this.sectionService.getSectionServerErrors(this.submissionId,this.sectionData.id).pipe((0,m.T)(e=>(0,l.Im)(e)))}onSectionDestroy(){this.subs.filter(e=>(0,l.a4)(e)).forEach(e=>e.unsubscribe())}addNewService(e){this.ldnServiceByPattern[e.pattern].services.push(null)}static#t=n=()=>(this.\u0275fac=function(i){return new(i||a)(t.rXU(Ze.LdnServicesService),t.rXU(T.C),t.rXU(Q.c),t.rXU(qe.CoarNotifyConfigDataService),t.rXU(ct.gRc),t.rXU("collectionIdProvider"),t.rXU("sectionDataProvider"),t.rXU("submissionIdProvider"))},this.\u0275cmp=t.VBU({type:a,selectors:[["ds-submission-section-coar-notify"]],features:[t.Jv_([C.tg]),t.Vt3],decls:3,vars:2,consts:[["myDropdown","ngbDropdown"],[1,"container-fluid"],[1,"col"],[1,"row","col-form-label"],[1,"row"],["ngbDropdown","",1,"flex-grow-1"],[1,"position-relative","right-addon"],["ngbDropdownToggle","","aria-hidden","true",1,"position-absolute","scrollable-dropdown-toggle"],["type","text",1,"form-control","w-100","scrollable-dropdown-input",3,"click","readonly","ngClass","value"],["ngbDropdownMenu","","aria-haspopup","true","aria-expanded","fal
1se",1,"dropdown-menu","scrollable-dropdown-menu","w-100"],["role","listbox","infiniteScroll","",1,"scrollable-menu",3,"infiniteScrollDistance","infiniteScrollThrottle","scrollWindow"],[1,"dropdown-item","collection-item","text-truncate","w-100"],[1,"dropdown-item","collection-item","text-truncate","w-100",3,"ngClass"],["type","button","role","button",1,"btn","btn-secondary","ms-2",3,"mt-2","title"],[1,"row","text-muted"],[1,"row","mt-1"],[1,"btn","btn-link","mt-2","ps-0"],[1,"dropdown-item","collection-item","text-truncate","w-100",3,"click"],[1,"dropdown-item","collection-item","text-truncate","w-100",3,"click","ngClass"],["type","button","role","button",1,"btn","btn-secondary","ms-2",3,"click","title"],["aria-hidden","true",1,"fas","fa-trash"],[1,"row","text-danger"],[1,"alert","alert-info","w-100","d-flex","align-items-center","flex-row"],[1,"fa-solid","fa-circle-info","fa-xl","ms-2"],[1,"ms-4"],[1,"text-muted"],[1,"alert","alert-danger","w-100","d-flex","align-items-center","flex-row"],[1,"btn","btn-link","mt-2","ps-0",3,"click"],[1,"fas","fa-plus"]],template:function(i,s){1&i&&(t.j41(0,"div",1),t.nVh(1,bi,2,0),t.nVh(2,Si,3,3,"p"),t.k0s()),2&i&&(t.R7$(),t.vxM((null==s.patterns?null:s.patterns.length)>0?1:-1),t.R7$(),t.vxM(s.hasSectionData?-1:2))},dependencies:[pt.e,pt.D,C.zH,C.tg,C.do,C.U0,M.YU,f.h,M.Jj,f.D9],styles:[".scrollable-menu[_ngcontent-%COMP%]{height:auto;max-height:var(--ds-dropdown-menu-max-height);overflow-x:hidden}.collection-item[_ngcontent-%COMP%]{border-bottom:var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color)}.scrollable-dropdown-loading[_ngcontent-%COMP%]{background-color:var(--bs-primary);color:#fff;height:calc(var(--bs-spacer) * 2)!important;line-height:calc(var(--bs-spacer) * 2);position:sticky;bottom:0}.scrollable-dropdown-menu[_ngcontent-%COMP%]{left:0!important;margin-bottom:var(--bs-spacer);z-index:1000}.scrollable-dropdown-toggle[_ngcontent-%COMP%], .toggle-icon[_ngcontent-%COMP%]{padding:.7rem .7rem 0}.ds-form-input-addon[_ngcontent-%COMP%]{border-top-right-radius:0!important;border-bottom-right-radius:0!important;border-right:0!important}.ds-form-input-btn[_ngcontent-%COMP%]{border:var(--bs-input-btn-border-width) solid var(--bs-input-border-color);border-top-left-radius:0;border-bottom-left-radius:0;border-left:0}.ds-form-input-btn[_ngcontent-%COMP%]:focus{box-shadow:none!important}button.ds-form-add-more[_ngcontent-%COMP%]:focus{outline:none;box-shadow:none!important}.ds-form-input-value[_ngcontent-%COMP%]{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.fa-spin[_ngcontent-%COMP%]{pointer-events:none}.left-addon[_ngcontent-%COMP%] .far[_ngcontent-%COMP%], .left-addon[_ngcontent-%COMP%] .fas[_ngcontent-%COMP%], .left-addon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{left:0}.right-addon[_ngcontent-%COMP%] .far[_ngcontent-%COMP%], .right-addon[_ngcontent-%COMP%] .fas[_ngcontent-%COMP%], .right-addon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{right:0}.left-addon[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:calc(var(--bs-spacer) * 2.25)}.right-addon[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-right:calc(var(--bs-spacer) * 2.25)}select.form-control[_ngcontent-%COMP%]{appearance:auto}.col-sm-6[_ngcontent-%COMP%], .col-sm-12[_ngcontent-%COMP%]{padding-left:15px;padding-right:15px}"]}))}return n(),a})();var It=r(84412);function Ei(n,a){if(1&n&&(t.rj2(0,"div",1)(1,"div",2)(2,"p",3),t.EFF(3),t.nI1(4,"translate"),t.eux()(),t.rj2(5,"div",4)(6,"p",3),t.EFF(7),t.eux()()()),2&n){const o=t.XpG();t.R7$(3),t.JRh(t.bMT(4,2,"submission.sections.sherpa.record.information.id")),t.R7$(4),t.SpI("",o.metadata.id," ")}}function Di(n,a){if(1&n&&(t.rj2(0,"div",1)(1,"div",2)(2,"p",3),t.EFF(3),t.nI1(4,"translate"),t.eux()(),t.rj2(5,"div",4)(6,"p",3),t.EFF(7),t.nI1(8,"date"),t.eux()()()),2&n){const o=t.XpG();t.R7$(3),t.JRh(t.bMT(4,2,"submission.sections.sherpa.record.information.date.created")),t.R7$(4),t.SpI("",t.i5U(8,4,o.metadata.dateCreated,"d MMMM yyyy H:mm:ss zzzz")," ")}}function Ii(n,a){if(1&n&&(t.rj2(0,"div",1)(1,"div",2)(2,"p",3),t.EFF(3),t.nI1(4,"translate"),t.eux()(),t.rj2(5,"div",4)(6,"p",3),t.EFF(7),t.nI1(8,"date"),t.eux()()()),2&n){const o=t.XpG();t.R7$(3),t.JRh(t.bMT(4,2,"submission.sections.sherpa.record.information.date.modified")),t.R7$(4),t.SpI("",t.i5U(8,4,o.metadata.dateModified,"d MMMM yyyy H:mm:ss zzzz")," ")}}function Mi(n,a){if(1&n&&(t.rj2(0,"div",1)(1,"div",2)(2,"p",3),t.EFF(3),t.nI1(4,"translate"),t.eux()(),t.rj2(5,"div",4)(6,"p",3)(7,"a",5),t.EFF(8),t.eux()()()()),2&n){const o=t.XpG();t.R7$(3),t.JRh(t.bMT(4,3,"submission.sections.sherpa.record.information.uri")),t.R7$(4),t.Avn("href",o.metadata.uri,t.B4B),t.R7$(),t.JRh(o.metadata.uri)}}let yi=(()=>{var n;class a{static#t=n=()=>(this.\u0275fac=function(i){return new(i||a)},this.\u0275cmp=t.VBU({type:a,selectors:[["ds-metadata-information"]],inputs:{metadata:"metadata"},decls:5,vars:4,consts:[[1,"ms-4"],[1,"row"],[1,"col-4"],[1,"m-1"],[1,"col-8"],["target","_blank",3,"href"]],template:function(i,s){1&i&&(t.rj2(0,"div",0),t.nVh(1,Ei,8,4,"div",1),t.nVh(2,Di,9,7,"div",1),t.nVh(3,Ii,9,7,"div",1),t.nVh(4,Mi,9,5,"div",1),t.eux()),2&i&&(t.R7$(),t.vxM(null!=s.metadata&&s.metadata.id?1:-1),t.R7$(),t.vxM(null!=s.metadata&&s.metadata.dateCreated?2:-1),t.R7$(),t.vxM(null!=s.metadata&&s.metadata.dateModified?3:-1),t.R7$(),t.vxM(null!=s.metadata&&s.metadata.uri?4:-1))},dependencies:[f.h,M.vh,f.D9],encapsulation:2}))}return n(),a})();function Ti(n,a){if(1&n&&(t.rj2(0,"p",3),t.EFF(1),t.eux()),2&n){const o=a.$implicit;t.R7$(),t.SpI("",o," ")}}function Fi(n,a){if(1&n&&(t.rj2(0,"div",1)(1,"div",2)(2,"p",3),t.EFF(3),t.nI1(4,"translate"),t.eux()(),t.rj2(5,"div",2),t.Z7z(6,Ti,2,1,"p",3,t.fX1),t.eux()()),2&n){const o=t.XpG();t.R7$(3),t.JRh(t.bMT(4,1,"submission.sections.sherpa.publication.information.title")),t.R7$(3),t.Dyx(o.journal.titles)}}function Pi(n,a){if(1&n&&(t.rj2(0,"p",3),t.EFF(1),t.eux()),2&n){const o=a.$implicit;t.R7$(),t.SpI("",o," ")}}function Oi(n,a){if(1&n&&(t.rj2(0,"div",1)(1,"div",2)(2,"p",3),t.EFF(3),t.nI1(4,"translate"),t.eux()(),t.rj2(5,"div",2),t.Z7z(6,Pi,2,1,"p",3,t.fX1),t.eux()()),2&n){const o=t.XpG();t.R7$(3),t.JRh(t.bMT(4,1,"submission.sections.sherpa.publication.information.issns")),t.R7$(3),t.Dyx(o.journal.issns)}}function Ri(n,a){if(1&n&&(t.rj2(0,"div",1)(1,"div",2)(2,"p",3),t.EFF(3),t.nI1(4,"translate"),t.eux()(),t.rj2(5,"div",2)(6,"p",3)(7,"a",4),t.EFF(8),t.eux()()()()),2&n){const o=t.XpG();t.R7$(3),t.JRh(t.bMT(4,4,"submission.sections.sherpa.publication.information.url")),t.R7$(4),t.Avn("href",t.mNQ(o.journal.url),t.B4B),t.R7$(),t.SpI(" ",o.journal.url," ")}}function xi(n,a){if(1&n&&(t.rj2(0,"div",2)(1,"p",3)(2,"a",4),t.EFF(3),t.eux()()()),2&n){const o=a.$implicit;t.R7$(2),t.Avn("href",t.mNQ(o.uri),t.B4B),t.R7$(),t.SpI(" ",o.name," ")}}function Bi(n,a){if(1&n&&(t.rj2(0,"div",1)(1,"div",2)(2,"p",3),t.EFF(3),t.nI1(4,"translate"),t.eux()(),t.Z7z(5,xi,4,3,"div",2,t.fX1),t.eux()),2&n){const o=t.XpG();t.R7$(3),t.JRh(t.bMT(4,1,"submission.sections.sherpa.publication.information.publishers")),t.R7$(2),t.Dyx(o.journal.publishers)}}function ji(n,a){if(1&n&&(t.rj2(0,"div",1)(1,"div",2)(2,"p",3),t.EFF(3),t.nI1(4,"translate"),t.eux()(),t.rj2(5,"div",2)(6,"p",3),t.EFF(7),t.eux()()()),2&n){const o=t.XpG();t.R7$(3),t.JRh(t.bMT(4,2,"submission.sections.sherpa.publication.information.romeoPub")),t.R7$(4),t.SpI(" ",o.journal.romeoPub," ")}}function $i(n,a){if(1&n&&(t.rj2(0,"div",1)(1,"div",2)(2,"p",3),t.EFF(3),t.nI1(4,"translate"),t.eux()(),t.rj2(5,"div",2)(6,"p",3),t.EFF(7),t.eux()()()),2&n){const o=t.XpG();t.R7$(3),t.JRh(t.bMT(4,2,"submission.sections.sherpa.publication.information.zetoPub")),t.R7$(4),t.SpI(" ",o.journal.zetoPub," ")}}let Li=(()=>{var n;class a{static#t=n=()=>(this.\u0275fac=function(i){return new(i||a)},this.\u0275cmp=t.VBU({type:a,selectors:[["ds-publication-information"]],inputs:{journal:"journal"},decls:7,vars:6,consts:[[1,"ms-4"],[1,"row"],[1,"col-4"],[1,"m-1"],["target","_blank","rel","noopener noreferrer",3,"href"]],template:function(i,s){1&i&&(t.rj2(0,"div",0),t.nVh(1,Fi,8,3,"div",1),t.nVh(2,Oi,8,3,"div",1),t.nVh(3,Ri,9,6,"div",1),t.nVh(4,Bi,7,3,"div",1),t.nVh(5,ji,8,4,"div",1),t.nVh(6,$i,8,4,"div",1),t.eux()),2&i&&(t.R7$(),t.vxM(null!=s.journal&&s.journal.titles&&s.journal.titles.length>0?1:-1),t.R7$(),t.vxM(null!=s.journal&&s.journal.issns&&s.journal.issns.length>0?2:-1),t.R7$(),t.vxM(null!=s.journal&&s.journal.url?3:-1),t.R7$(),t.vxM(null!=s.journal&&s.journal.publishers&&s.journal.publishers.length>0?4:-1),t.R7$(),t.vxM(null!=s.journal&&s.journal.romeoPub?5:-1),t.R7$(),t.vxM(null!=s.journal&&s.journal.zetoPub?6:-1))},dependencies:[f.h,f.D9],encapsulation:2}))}return n(),a})();function Ui(n,a){if(1&n&&(t.j41(0,"span"),t.nrm(1,"i",12),t.EFF(2),t.k0s()),2&n){const o=t.XpG();t.R7$(2),t.Lme(" ",o.version.embargo.amount," ",null==o.version.embargo?null:o.version.embargo.units[0])}}function Ai(n,a){1&n&&(t.j41(0,"span"),t.nrm(1,"i",12),t.EFF(2),t.nI1(3,"translate"),t.k0s()),2&n&&(t.R7$(2),t.SpI(" ",t.bMT(3,1,"submission.sections.sherpa.publisher.policy.noembargo")))}function Vi(n,a){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&n){const o=t.XpG(2);t.R7$(),t.SpI("+",o.version.locations.length-1)}}function Xi(n,a){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.nVh(2,Vi,2,1,"span"),t.k0s()),2&n){const o=t.XpG();t.R7$(),t.SpI(" ",o.version.locations[0]," "),t.R7$(),t.vxM(o.version.locations.length>1?2:-1)}}function Gi(n,a){1&n&&(t.j41(0,"span"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.JRh(t.bMT(2,1,"submission.sections.sherpa.publisher.policy.nolocation")))}function Ni(n,a){1&n&&t.nrm(0,"span",8)}function ki(n,a){1&n&&t.nrm(0,"span",9)}function Ki(n,a){if(1&n&&(t.j41(0,"p",15),t.EFF(1),t.k0s()),2&n){const o=t.XpG(3);t.R7$(),t.Lme("",o.version.embargo.amount," ",o.version.embargo.units)}}function Wi(n,a){1&n&&(t.j41(0,"p",15),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.JRh(t.bMT(2,1,"submission.sections.sherpa.publisher.policy.noembargo")))}function wi(n,a){if(1&n&&(t.j41(0,"div",13)(1,"div",14)(2,"p",15),t.nrm(3,"i",12),t.EFF(4),t.nI1(5,"translate"),t.k0s()(),t.j41(6,"div",16),t.nVh(7,Ki,2,2,"p",15)(8,Wi,3,3,"p",15),t.k0s()()),2&n){const o=t.XpG(2);t.R7$(4),t.SpI(" ",t.bMT(5,2,"submission.sections.sherpa.publisher.policy.embargo")),t.R7$(3),t.vxM(o.version.embargo?7:8)}}function Yi(n,a){if(1&n&&(t.j41(0,"p",15),t.EFF(1),t.k0s()),2&n){const o=a.$implicit;t.R7$(),t.JRh(o)}}function Hi(n,a){if(1&n&&(t.j41(0,"div",13)(1,"div",14)(2,"p",15),t.nrm(3,"i",17),t.EFF(4),t.nI1(5,"translate"),t.k0s()(),t.j41(6,"div",16),t.Z7z(7,Yi,2,1,"p",15,t.fX1),t.k0s()()),2&n){const o=t.XpG(2);t.R7$(4),t.SpI(" ",t.bMT(5,1,"submission.sections.sherpa.publisher.policy.license")),t.R7$(3),t.Dyx(o.version.licenses)}}function zi(n,a){if(1&n&&(t.j41(0,"p",15),t.EFF(1),t.k0s()),2&n){const o=a.$implicit;t.R7$(),t.JRh(o)}}function Ji(n,a){if(1&n&&(t.j41(0,"div",13)(1,"div",14)(2,"p",15),t.nrm(3,"i",18),t.EFF(4),t.nI1(5,"translate"),t.k0s()(),t.j41(6,"div",16),t.Z7z(7,zi,2,1,"p",15,t.fX1),t.k0s()()),2&n){const o=t.XpG(2);t.R7$(4),t.SpI(" ",t.bMT(5,1,"submission.sections.sherpa.publisher.policy.prerequisites")),t.R7$(3),t.Dyx(o.version.prerequisites)}}function Qi(n,a){if(1&n&&(t.j41(0,"p",15),t.EFF(1),t.k0s()),2&n){const o=a.$implicit;t.R7$(),t.JRh(o)}}function Zi(n,a){if(1&n&&(t.j41(0,"div",13)(1,"div",14)(2,"p",15),t.nrm(3,"i",6),t.EFF(4),t.nI1(5,"translate"),t.k0s()(),t.j41(6,"div",16),t.Z7z(7,Qi,2,1,"p",15,t.fX1),t.k0s()()),2&n){const o=t.XpG(2);t.R7$(4),t.SpI(" ",t.bMT(5,1,"submission.sections.sherpa.publisher.policy.location")),t.R7$(3),t.Dyx(o.version.locations)}}function qi(n,a){if(1&n&&(t.j41(0,"p",15),t.EFF(1),t.k0s()),2&n){const o=a.$implicit;t.R7$(),t.JRh(o)}}function tn(n,a){if(1&n&&(t.j41(0,"div",13)(1,"div",14)(2,"p",15),t.nrm(3,"i",19),t.EFF(4),t.nI1(5,"translate"),t.k0s()(),t.j41(6,"div",16),t.Z7z(7,qi,2,1,"p",15,t.fX1),t.k0s()()),2&n){const o=t.XpG(2);t.R7$(4),t.SpI(" ",t.bMT(5,1,"submission.sections.sherpa.publisher.policy.conditions")),t.R7$(3),t.Dyx(o.version.conditions)}}function en(n,a){if(1&n&&(t.j41(0,"div",11),t.nVh(1,wi,9,4,"div",13),t.nVh(2,Hi,9,3,"div",13),t.nVh(3,Ji,9,3,"div",13),t.nVh(4,Zi,9,3,"div",13),t.nVh(5,tn,9,3,"div",13),t.k0s()),2&n){const o=t.XpG();t.R7$(),t.vxM(null!=o.version&&o.version.embargo&&null!=o.version&&o.version.embargo.amount?1:-1),t.R7$(),t.vxM(null!=o.version&&o.version.licenses&&o.version.licenses.length>0?2:-1),t.R7$(),t.vxM(null!=o.version&&o.version.prerequisites&&o.version.prerequisites.length>0?3:-1),t.R7$(),t.vxM(null!=o.version&&o.version.locations&&o.version.locations.length>0?4:-1),t.R7$(),t.vxM(null!=o.version&&o.version.conditions&&o.version.conditions.length>0?5:-1)}}let nn=(()=>{var n;class a{constructor(){this.isCollapsed=!0}static#t=n=()=>(this.\u0275fac=function(i){return new(i||a)},this.\u0275cmp=t.VBU({type:a,selectors:[["ds-content-accordion"]],inputs:{version:"version"},decls:20,vars:13,consts:[["collapse","ngbCollapse"],["data-test","collapse",1,"mb-3","border-bottom"],[1,"w-100","d-flex","justify-content-between","collapse-toggle",3,"click"],[1,"d-flex"],["type","button","aria-controls","collapseExample",1,"btn","btn-link","p-0","me-4",3,"click"],[1,"m-1","ms-4"],[1,"far","fa-folder-open"],[1,"d-inline-block"],[1,"fas","fa-chevron-down"],[1,"fas","fa-chevron-up"],[3,"ngbCollapse"],[1,"ms-4"],[1,"fas","fa-hourglass-half"],[1,"row"],[1,"col-4"],[1,"m-1"],[1,"col-6"],[1,"fas","fa-certificate"],[1,"fas","fa-exclamation-circle"],[1,"fas","fa-tasks"]],template:function(i,s){if(1&i){const c=t.RV6();t.j41(0,"div",1)(1,"div",2),t.bIt("click",function(){u.eBV(c);const p=t.sdS(18);return u.Njj(p.toggle())}),t.j41(2,"div",3)(3,"button",4),t.bIt("click",function(p){return u.eBV(c),u.Njj(p.preventDefault())}),t.EFF(4),t.nI1(5,"titlecase"),t.nI1(6,"translate"),t.k0s(),t.j41(7,"div"),t.nVh(8,
1Ui,3,2,"span")(9,Ai,4,3,"span"),t.j41(10,"span",5),t.nrm(11,"i",6),t.nVh(12,Xi,3,2,"span")(13,Gi,3,3,"span"),t.k0s()()(),t.j41(14,"div",7),t.nVh(15,Ni,1,0,"span",8),t.nVh(16,ki,1,0,"span",9),t.k0s()(),t.j41(17,"div",10,0),t.nVh(19,en,6,5,"div",11),t.k0s()()}if(2&i){const c=t.sdS(18);t.R7$(3),t.BMQ("aria-expanded",!c.collapsed),t.R7$(),t.Lme(" ",t.bMT(5,9,s.version.articleVersion)," ",t.bMT(6,11,"submission.sections.sherpa.publisher.policy.version")," "),t.R7$(4),t.vxM(null!=s.version&&s.version.embargo&&null!=s.version&&s.version.embargo.amount?8:9),t.R7$(4),t.vxM(null!=s.version&&s.version.locations&&s.version.locations.length>0?12:13),t.R7$(3),t.vxM(c.collapsed?15:-1),t.R7$(),t.vxM(c.collapsed?-1:16),t.R7$(),t.Y8G("ngbCollapse",s.isCollapsed),t.R7$(2),t.vxM(s.version?19:-1)}},dependencies:[C.HC,C.$G,f.h,M.PV,f.D9],encapsulation:2}))}return n(),a})();function sn(n,a){1&n&&t.nrm(0,"ds-content-accordion",1),2&n&&t.Y8G("version",a.$implicit)}function on(n,a){if(1&n&&(t.j41(0,"li")(1,"a",5),t.EFF(2),t.k0s()()),2&n){const o=a.$implicit;t.R7$(),t.Y8G("href",t.mNQ(o.key),t.B4B),t.R7$(),t.JRh(o.value)}}function an(n,a){if(1&n&&(t.j41(0,"div",2)(1,"div",3)(2,"p",4),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"ul"),t.Z7z(6,on,3,3,"li",null,t.fX1),t.nI1(8,"keyvalue"),t.k0s()()()),2&n){const o=t.XpG();t.R7$(3),t.SpI(" ",t.bMT(4,1,"submission.sections.sherpa.publisher.policy.more.information")," "),t.R7$(3),t.Dyx(t.bMT(8,3,o.policy.urls))}}let rn=(()=>{var n;class a{constructor(){this.AlertTypeEnum=I.v}static#t=n=()=>(this.\u0275fac=function(i){return new(i||a)},this.\u0275cmp=t.VBU({type:a,selectors:[["ds-publisher-policy"]],inputs:{policy:"policy"},decls:4,vars:1,consts:[[1,"ms-4"],[3,"version"],[1,"row"],[1,"col-12"],[1,"m-1"],["target","_blank","rel","noopener noreferrer",3,"href"]],template:function(i,s){1&i&&(t.j41(0,"div",0),t.Z7z(1,sn,1,1,"ds-content-accordion",1,t.fX1),t.nVh(3,an,9,5,"div",2),t.k0s()),2&i&&(t.R7$(),t.Dyx(s.policy.permittedVersions),t.R7$(2),t.vxM(null!=s.policy&&s.policy.urls?3:-1))},dependencies:[nn,f.h,M.lG,f.D9],encapsulation:2}))}return n(),a})();function cn(n,a){1&n&&t.nrm(0,"ds-alert",1),2&n&&t.Y8G("type","alert-info")("content","submission.sections.sherpa-policy.title-empty")}function ln(n,a){if(1&n){const o=t.RV6();t.j41(0,"div",2)(1,"ds-alert",4),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div")(5,"button",5),t.bIt("click",function(){u.eBV(o);const i=t.XpG();return u.Njj(i.refresh())}),t.j41(6,"span"),t.nrm(7,"i",6),t.EFF(8),t.nI1(9,"translate"),t.k0s()()()()}2&n&&(t.R7$(),t.Y8G("type","alert-info"),t.R7$(),t.SpI(" ",t.bMT(3,3,"submission.sections.sherpa.publisher.policy.description")," "),t.R7$(6),t.SpI(" ",t.bMT(9,5,"submission.sections.sherpa.publisher.policy.refresh")," "))}function dn(n,a){1&n&&t.nrm(0,"span",11)}function un(n,a){1&n&&t.nrm(0,"span",12)}function pn(n,a){1&n&&t.nrm(0,"span",11)}function mn(n,a){1&n&&t.nrm(0,"span",12)}function _n(n,a){if(1&n){const o=t.RV6();t.j41(0,"div",7)(1,"div",8),t.bIt("click",function(){u.eBV(o);const i=t.sdS(9);return u.Njj(i.toggle())}),t.j41(2,"button",9),t.bIt("click",function(i){return u.eBV(o),u.Njj(i.preventDefault())}),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"div",10),t.nVh(6,pn,1,0,"span",11),t.nVh(7,mn,1,0,"span",12),t.k0s()(),t.j41(8,"div",13,0),t.nrm(10,"ds-publisher-policy",16),t.k0s()()}if(2&n){const o=a.$implicit,e=t.sdS(9),i=t.XpG(4);t.R7$(2),t.BMQ("aria-expanded",!e.collapsed),t.R7$(),t.SpI(" ",t.bMT(4,6,"submission.sections.sherpa.publisher.policy")," "),t.R7$(3),t.vxM(e.collapsed?6:-1),t.R7$(),t.vxM(e.collapsed?-1:7),t.R7$(),t.Y8G("ngbCollapse",i.isCollapsed),t.R7$(2),t.Y8G("policy",o)}}function hn(n,a){if(1&n){const o=t.RV6();t.j41(0,"div",7)(1,"div",8),t.bIt("click",function(){u.eBV(o);const i=t.sdS(9);return u.Njj(i.toggle())}),t.j41(2,"button",9),t.bIt("click",function(i){return u.eBV(o),u.Njj(i.preventDefault())}),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"div",10),t.nVh(6,dn,1,0,"span",11),t.nVh(7,un,1,0,"span",12),t.k0s()(),t.j41(8,"div",13,0),t.nrm(10,"ds-publication-information",15),t.k0s()(),t.Z7z(11,_n,11,8,"div",7,t.fX1)}if(2&n){const o=a.$implicit,e=t.sdS(9),i=t.XpG(3);t.R7$(2),t.BMQ("aria-expanded",!e.collapsed),t.R7$(),t.SpI(" ",t.bMT(4,6,"submission.sections.sherpa.publication.information")," "),t.R7$(3),t.vxM(e.collapsed?6:-1),t.R7$(),t.vxM(e.collapsed?-1:
17),t.R7$(),t.Y8G("ngbCollapse",i.isCollapsed),t.R7$(2),t.Y8G("journal",o),t.R7$(),t.Dyx(o.policies)}}function fn(n,a){1&n&&t.nrm(0,"span",11)}function vn(n,a){1&n&&t.nrm(0,"span",12)}function Cn(n,a){if(1&n){const o=t.RV6();t.Z7z(0,hn,13,8,null,null,t.fX1),t.j41(2,"div",7)(3,"div",8),t.bIt("click",function(){u.eBV(o);const i=t.sdS(11);return u.Njj(i.toggle())}),t.j41(4,"button",9),t.bIt("click",function(i){return u.eBV(o),u.Njj(i.preventDefault())}),t.EFF(5),t.nI1(6,"translate"),t.k0s(),t.j41(7,"div",10),t.nVh(8,fn,1,0,"span",11),t.nVh(9,vn,1,0,"span",12),t.k0s()(),t.j41(10,"div",13,0),t.nrm(12,"ds-metadata-information",14),t.k0s()()}if(2&n){const o=t.sdS(11),e=t.XpG().ngVar,i=t.XpG();t.Dyx(e.journals),t.R7$(4),t.BMQ("aria-expanded",!o.collapsed),t.R7$(),t.SpI(" ",t.bMT(6,6,"submission.sections.sherpa.record.information")," "),t.R7$(3),t.vxM(o.collapsed?8:-1),t.R7$(),t.vxM(o.collapsed?-1:9),t.R7$(),t.Y8G("ngbCollapse",i.isCollapsed),t.R7$(2),t.Y8G("metadata",e.metadata)}}function bn(n,a){if(1&n&&(t.nrm(0,"ds-alert",1),t.nI1(1,"translate")),2&n){const o=t.XpG().ngVar,e=t.XpG();t.Y8G("type",e.AlertTypeEnum.Error)("content",o.message?o.message:t.bMT(1,2,"submission.sections.sherpa.error.message"))}}function Sn(n,a){if(1&n&&(t.qex(0),t.nVh(1,Cn,13,8),t.nVh(2,bn,2,4,"ds-alert",1),t.bVm()),2&n){const o=a.ngVar,e=t.XpG();t.R7$(),t.vxM(e.hasNoData()||!o||o.error?-1:1),t.R7$(),t.vxM(o&&o.error?2:-1)}}let gn=(()=>{var n;class a extends J{constructor(e,i,s,c,d){super(void 0,c,d),this.sectionService=e,this.operationsBuilder=i,this.submissionService=s,this.injectedSectionData=c,this.injectedSubmissionId=d,this.sherpaPoliciesData$=new It.t(null),this.subs=[],this.isCollapsed=!1,this.AlertTypeEnum=I.v}onSectionDestroy(){this.subs.filter(e=>(0,l.a4)(e)).forEach(e=>e.unsubscribe())}onSectionInit(){this.pathCombiner=new b.S("sections",this.sectionData.id),this.subs.push(this.sectionService.getSectionData(this.submissionId,this.sectionData.id,this.sectionData.sectionType).subscribe(e=>{this.sherpaPoliciesData$.next(e)}))}getSectionStatus(){return(0,x.of)(!0)}hasNoData(){return(0,l.Im)(this.sherpaPoliciesData$.value)}refresh(){this.operationsBuilder.remove(this.pathCombiner.getPath("retrievalTime")),this.submissionService.dispatchSaveSection(this.submissionId,this.sectionData.id)}static#t=n=()=>(this.\u0275fac=function(i){return new(i||a)(t.rXU(Q.c),t.rXU(T.C),t.rXU(at.E),t.rXU("sectionDataProvider"),t.rXU("submissionIdProvider"))},this.\u0275cmp=t.VBU({type:a,selectors:[["ds-section-sherpa-policies"]],features:[t.Vt3],decls:4,vars:5,consts:[["collapse","ngbCollapse"],[3,"type","content"],[1,"d-flex","flex-column","flex-nowrap","mt-2","mb-4"],[4,"ngVar"],[3,"type"],["type","button","data-test","refresh-btn",1,"btn","btn-secondary","float-end",3,"click"],[1,"fas","fa-sync"],["data-test","collapse",1,"mb-3","border-bottom"],[1,"w-100","d-flex","justify-content-between","collapse-toggle","mb-3",3,"click"],["type","button","aria-controls","collapseExample",1,"btn","btn-link","p-0",3,"click"],[1,"d-inline-block"],[1,"fas","fa-chevron-down"],[1,"fas","fa-chevron-up"],[3,"ngbCollapse"],[3,"metadata"],[3,"journal"],[3,"policy"]],template:function(i,s){if(1&i&&(t.nVh(0,cn,1,2,"ds-alert",1),t.nVh(1,ln,10,7,"div",2),t.DNE(2,Sn,3,2,"ng-container",3),t.nI1(3,"async")),2&i){let c;t.vxM(s.hasNoData()?0:-1),t.R7$(),t.vxM(s.hasNoData()?-1:1),t.R7$(),t.Y8G("ngVar",null==(c=t.bMT(3,3,s.sherpaPoliciesData$))?null:c.sherpaResponse)}},dependencies:[v.C,yi,C.HC,C.$G,Li,rn,f.h,ht.r,M.Jj,f.D9],encapsulation:2}))}return n(),a})();var En=r(25558),Dn=r(43446),In=r(99545),Mn=r(2086),yn=r(33017),Tn=r(96298),Fn=(r(56541),r(29710));const Pn=["*"];function On(n,a){}let Rn=(()=>{var n;class a extends Fn.J{constructor(){super(...arguments),this.inAndOutputNames=["availableAccessConditionOptions","isPrimary","collectionId","collectionPolicyType","configMetadataForm","fileId","fileIndex","fileName","sectionId","submissionId"]}getComponentName(){return"SubmissionSectionUploadFileComponent"}importThemedComponent(e){return r(96682)(`./${e}/app/submission/sections/upload/file/section-upload-file.component`)}importUnthemedComponent(){return r.e(8727).then(r.bind(r,8727))}static#t=n=()=>(this.\u0275fac=(()=>{let e;return function(s){return(e||(e=t.xGo(a)))(s||a)}})(),this.\u0275cmp=t.VBU({type:a,selectors:[["ds-submission-upload-section-file"]],inputs:{availableAccessConditionOptions:"availableAccessConditionOptions",isPrimary:"isPrimary",collectionId:"collectionId",collectionPolicyType:"collectionPolicyType",configMetadataForm:"configMetadataForm",fileId:"fileId",fileIndex:"fileIndex",fileName:"fileName",sectionId:"sectionId",submissionId:"submissionId"},features:[t.Vt3],ngContentSelectors:Pn,decls:5,vars:0,consts:[["vcr",""],["content",""]],template:function(i,s){1&i&&(t.NAR(),t.PeT(0,On,0,0,"ng-template",null,0,t.C5r),t.rj2(2,"div",null,1),t.SdG(4),t.eux())},encapsulation:2}))}return n(),a})();var xn=r(76668);const Mt=n=>({collectionName:n});function Bn(n,a){if(1&n&&(t.EFF(0),t.nI1(1,"translate")),2&n){const o=t.XpG(3);t.SpI(" ",t.i5U(1,1,"submission.sections.upload.header.policy.default.nolist",t.eq3(4,Mt,o.collectionName))," ")}}function jn(n,a){if(1&n&&(t.EFF(0),t.nI1(1,"translate")),2&n){const o=t.XpG(3);t.SpI(" ",t.i5U(1,1,"submission.sections.upload.header.policy.default.withlist",t.eq3(4,Mt,o.collectionName))," ")}}function $n(n,a){if(1&n&&(t.j41(0,"div",1)(1,"div",5)(2,"ds-alert",6),t.nVh(3,Bn,2,6),t.nVh(4,jn,2,6),t.nrm(5,"span",7)(6,"ds-submission-section-upload-access-conditions",8),t.k0s()()()),2&n){const o=t.XpG(2);t.R7$(2),t.Y8G("type",o.AlertTypeEnum.Warning),t.R7$(),t.vxM(1===o.collectionPolicyType?3:-1),t.R7$(),t.vxM(2===o.collectionPolicyType?4:-1),t.R7$(2),t.Y8G("accessConditions",o.collectionDefaultAccessConditions)}}function Ln(n,a){if(1&n&&(t.nrm(0,"ds-submission-upload-section-file",9),t.nI1(1,"async"),t.j41(2,"div",1)(3,"div",4),t.nrm(4,"hr"),t.k0s()()),2&n){const o=a.$implicit,e=a.$index,i=t.XpG(2);t.Y8G("isPrimary",i.primaryBitstreamUUID?i.primaryBitstreamUUID===o.uuid:null)("availableAccessConditionOptions",i.availableAccessConditionOptions)("collectionId",i.collectionId)("collectionPolicyType",i.collectionPolicyType)("configMetadataForm",t.bMT(1,10,i.configMetadataForm$))("fileId",o.uuid)("fileIndex",e)("fileName",i.fileNames[e])("sectionId",i.sectionData.id)("submissionId",i.submissionId)}}function Un(n,a){if(1&n&&(t.nVh(0,$n,7,4,"div",1),t.j41(1,"div",1)(2,"div",2)(3,"span",3),t.EFF(4),t.nI1(5,"translate"),t.k0s()()(),t.j41(6,"div",1)(7,"div",4),t.nrm(8,"hr"),t.k0s()(),t.Z7z(9,Ln,5,12,null,null,t.fX1)),2&n){const o=t.XpG();t.vxM(o.collectionDefaultAccessConditions.length>0?0:-1),t.R7$(4),t.JRh(t.bMT(5,2,"bitstream.edit.form.primaryBitstream.label")),t.R7$(5),t.Dyx(o.fileList)}}function An(n,a){1&n&&(t.j41(0,"div",1)(1,"div",4)(2,"div",10)(3,"span",11),t.EFF(4),t.nI1(5,"translate"),t.k0s()()()()),2&n&&(t.R7$(4),t.JRh(t.bMT(5,1,"submission.sections.upload.no-file-uploaded")))}let Gn=(()=>{var n;class a extends J{constructor(e,i,s,c,d,p,S,R,X,w,z){super(void 0,w,z),this.bitstreamService=e,this.changeDetectorRef=i,this.collectionDataService=s,this.groupService=c,this.resourcePolicyService=d,this.sectionService=p,this.submissionService=S,this.uploadsConfigService=R,this.dsoNameService=X,this.injectedSectionData=w,this.injectedSubmissionId=z,this.AlertTypeEnum=I.v,this.primaryBitstreamUUID=null,this.fileList=[],this.fileNames=[],this.collectionDefaultAccessConditions=[],this.required$=new It.t(!0),this.subs=[]}onSectionInit(){const e=this.uploadsConfigService.findByHref(this.sectionData.config,!0,!1,(0,ft.s)("metadata")).pipe((0,P.yd)(),(0,m.T)(i=>i.payload));this.configMetadataForm$=e.pipe((0,En.n)(i=>i.metadata.pipe((0,P.yd)(),(0,m.T)(s=>s.payload)))),this.subs.push(this.submissionService.getSubmissionObject(this.submissionId).pipe((0,h.p)(i=>(0,l.EA)(i)&&!i.isLoading),(0,h.p)(i=>(0,l.b0)(this.collectionId)||this.collectionId!==i.collection),(0,ot.M)(i=>this.collectionId=i.collection),(0,E.Z)(i=>this.collectionDataService.findById(i.collection)),(0,h.p)(i=>(0,l.EA)(i.payload)),(0,ot.M)(i=>this.collectionName=this.dsoNameService.getName(i.payload)),(0,E.Z)(()=>e)).subscribe(i=>{this.required$.next(i.required),this.availableAccessConditionOptions=(0,l.hj)(i.accessConditionOptions)?i.accessConditionOptions:[],this.collectionPolicyType=this.availableAccessConditionOptions.length>0?2:1,this.changeDetectorRef.detectChanges()}),(0,y.z)([this.configMetadataForm$,this.bitstreamService.getUploadedFilesData(this.submissionId,this.sectionData.id)]).pipe((0,h.p)(([i,s])=>(0,l.hj)(i)&&(0,l.hj)(s)),(0,st.F)()).subscribe(([i,{primary:s,files:c}])=>{this.primaryBitstreamUUID=s,this.fileList=c,this.fileNames=Array.from(c,d=>this.getFileName(i,d)),this.changeDetectorRef.detectChanges()}))}getFileName(e,i){const s=e.rows[0].fields[0].selectableMetadata[0].metadata;let c;return c=(0,l.hj)(i.metadata)&&(0,l.hj)(i.metadata[s])?i.metadata[s][0].display:i.uuid,c}getSectionStatus(){return(0,y.z)(this.required$,this.bitstreamService.getUploadedFileList(this.submissionId,this.sectionData.id),(e,i)=>!e||(0,l.EA)(i)&&i.length>0)}onSectionDestroy(){this.subs.filter(e=>
1(0,l.a4)(e)).forEach(e=>e.unsubscribe())}static#t=n=()=>(this.\u0275fac=function(i){return new(i||a)(t.rXU(xn.i),t.rXU(ct.gRc),t.rXU(Dt.CollectionDataService),t.rXU(Mn.GroupDataService),t.rXU(yn.ResourcePolicyDataService),t.rXU(Q.c),t.rXU(at.E),t.rXU(In.SubmissionUploadsConfigDataService),t.rXU(Dn.f),t.rXU("sectionDataProvider"),t.rXU("submissionIdProvider"))},this.\u0275cmp=t.VBU({type:a,selectors:[["ds-submission-section-upload"]],features:[t.Vt3],decls:3,vars:4,consts:[[3,"content","dismissible","type"],[1,"row"],[1,"col-md-2"],[1,"text-start","fw-bold"],[1,"col-md-12"],[1,"col-sm-12"],[3,"type"],[1,"clearfix"],[3,"accessConditions"],[3,"isPrimary","availableAccessConditionOptions","collectionId","collectionPolicyType","configMetadataForm","fileId","fileIndex","fileName","sectionId","submissionId"],[1,"text-center","h3"],[1,"text-muted"]],template:function(i,s){1&i&&(t.nrm(0,"ds-alert",0),t.nVh(1,Un,11,4)(2,An,6,3,"div",1)),2&i&&(t.Y8G("content","submission.sections.upload.info")("dismissible",!0)("type",s.AlertTypeEnum.Info),t.R7$(),t.vxM(s.fileList.length>0?1:2))},dependencies:[v.C,Tn._,Rn,f.h,M.Jj,f.D9],encapsulation:2}))}return n(),a})();const Z=new Map;Z.set(q.l.AccessesCondition,Gt),Z.set(q.l.License,Qe),Z.set(q.l.CcLicense,ve),Z.set(q.l.SherpaPolicies,gn),Z.set(q.l.Upload,Gn),Z.set(q.l.SubmissionForm,Ne),Z.set(q.l.Identifiers,we),Z.set(q.l.CoarNotify,gi),Z.set(q.l.Duplicates,Fe);const kn=["sectionRef"],Kn=n=>({"section-focus":n}),Wn=n=>({"text-white":n});function wn(n,a){1&n&&(t.nrm(0,"i",10),t.nI1(1,"translate"),t.nI1(2,"translate")),2&n&&(t.Y8G("title",t.mNQ(t.bMT(1,3,"submission.sections.status.warnings.title"))),t.BMQ("aria-label",t.bMT(2,5,"submission.sections.status.warnings.aria")))}function Yn(n,a){1&n&&(t.nrm(0,"i",11),t.nI1(1,"translate"),t.nI1(2,"translate")),2&n&&(t.Y8G("title",t.mNQ(t.bMT(1,3,"submission.sections.status.errors.title"))),t.BMQ("aria-label",t.bMT(2,5,"submission.sections.status.errors.aria")))}function Hn(n,a){1&n&&(t.nrm(0,"i",12),t.nI1(1,"translate"),t.nI1(2,"translate")),2&n&&(t.Y8G("title",t.mNQ(t.bMT(1,3,"submission.sections.status.valid.title"))),t.BMQ("aria-label",t.bMT(2,5,"submission.sections.status.valid.aria")))}function zn(n,a){1&n&&(t.nrm(0,"i",13),t.nI1(1,"translate"),t.nI1(2,"translate")),2&n&&(t.Y8G("title",t.mNQ(t.bMT(1,3,"submission.sections.status.info.title"))),t.BMQ("aria-label",t.bMT(2,5,"submission.sections.status.info.aria")))}function Jn(n,a){if(1&n){const o=t.RV6();t.j41(0,"a",15),t.bIt("click",function(i){u.eBV(o);const s=t.XpG(3);return u.Njj(s.removeSection(i))}),t.nrm(1,"i",16),t.k0s()}}function Qn(n,a){if(1&n&&(t.j41(0,"span",8),t.EFF(1),t.nI1(2,"translate"),t.k0s(),t.j41(3,"div",9),t.nVh(4,wn,3,7,"i",10),t.nI1(5,"async"),t.nVh(6,Yn,3,7,"i",11),t.nVh(7,Hn,3,7,"i",12),t.nI1(8,"async"),t.nVh(9,zn,3,7,"i",13),t.nVh(10,Jn,2,0,"a",14),t.k0s()),2&n){const o=t.XpG(2),e=t.sdS(1);t.Y8G("ngClass",t.eq3(13,Wn,e.isInfo())),t.R7$(),t.JRh(t.bMT(2,7,"submission.sections."+o.sectionData.header)),t.R7$(3),t.vxM(!0===t.bMT(5,9,e.isValid())||e.hasErrors()||e.isInfo()?-1:4),t.R7$(2),t.vxM(e.hasErrors()&&!e.isInfo()?6:-1),t.R7$(),t.vxM(!t.bMT(8,11,e.isValid())||e.hasErrors()||e.isInfo()?-1:7),t.R7$(2),t.vxM(e.isInfo()?9:-1),t.R7$(),t.vxM(e.isMandatory()?-1:10)}}function Zn(n,a){if(1&n){const o=t.RV6();t.j41(0,"ds-alert",21),t.bIt("close",function(){const i=u.eBV(o).$index;t.XpG(4);const s=t.sdS(1);return u.Njj(s.removeError(i))}),t.k0s()}if(2&n){const o=a.$implicit,e=t.XpG(4);t.Y8G("content",o)("dismissible",!0)("type",e.AlertTypeEnum.Error)}}function qn(n,a){if(1&n&&(t.j41(0,"div",17),t.Z7z(1,Zn,1,3,"ds-alert",20,t.fX1),t.k0s()),2&n){const o=t.XpG(3),e=t.sdS(1);t.Y8G("id",t.VkB("sectionGenericError_",o.sectionData.id)),t.R7$(),t.Dyx(e.getErrors())}}function ts(n,a){1&n&&t.eu8(0)}function es(n,a){if(1&n){const o=t.RV6();t.nVh(0,qn,3,2,"div",17),t.j41(1,"div",18),t.bIt("click",function(i){u.eBV(o),t.XpG(2);const s=t.sdS(1);return u.Njj(s.setFocus(i))}),t.DNE(2,ts,1,0,"ng-container",19),t.k0s()}if(2&n){const o=t.XpG(2),e=t.sdS(1);t.vxM(e.hasGenericErrors()?0:-1),t.R7$(),t.Y8G("id",t.VkB("sectionContent_",o.sectionData.id)),t.R7$(),t.Y8G("ngComponentOutlet",o.getSectionContent())("ngComponentOutletInjector",o.objectInjector)}}function is(n,a){if(1&n){const o=t.RV6();t.j41(0,"ngb-accordion",4,1),t.bIt("panelChange",function(i){u.eBV(o),t.XpG();const s=t.sdS(1);return u.Njj(s.sectionChange(i))}),t.j41(2,"ngb-panel",5),t.DNE(3,Qn,11,15,"ng-template",6)(4,es,3,5,"ng-template",7),t.k0s()()}if(2&n){const o=t.XpG(),e=t.sdS(1);t.Y8G("activeIds",t.mNQ(o.sectionData.id))("destroyOnHide",!1),t.R7$(2),t.Y8G("id",t.mNQ(o.sectionData.id))("type",e.isInfo()?"info":"")}}let ns=(()=>{var n;class a{constructor(e){this.injector=e,this.AlertTypeEnum=I.v}ngOnInit(){this.objectInjector=u.zZn.create({providers:[{provide:"collectionIdProvider",useFactory:()=>this.collectionId,deps:[]},{provide:"sectionDataProvider",useFactory:()=>this.sectionData,deps:[]},{provide:"submissionIdProvider",useFactory:()=>this.submissionId,deps:[]}],parent:this.injector})}removeSection(e){e.preventDefault(),e.stopPropagation(),this.sectionRef.removeSection(this.submissionId,this.sectionData.id)}getSectionContent(){return function Nn(n){return Z.get(n)}(this.sectionData.sectionType)}static#t=n=()=>(this.\u0275fac=function(i){return new(i||a)(t.rXU(u.zZn))},this.\u0275cmp=t.VBU({type:a,selectors:[["ds-base-submission-section-container"]],viewQuery:function(i,s){if(1&i&&t.GBs(kn,5),2&i){let c;t.mGM(c=t.lsd())&&(s.sectionRef=c.first)}},inputs:{collectionId:"collectionId",sectionData:"sectionData",submissionId:"submissionId"},decls:4,vars:11,consts:[["sectionRef","sectionRef"],["acc","ngbAccordion"],["dsSection","",1,"mb-2",3,"ngClass","mandatory","submissionId","sectionType","sectionId"],[3,"activeIds","destroyOnHide"],[3,"panelChange","activeIds","destroyOnHide"],[3,"id","type"],["ngbPanelTitle","",1,"d-flex"],["ngbPanelContent",""],["tabindex","0",1,"flex-grow-1","section-title",3,"ngClass"],[1,"d-inline-block"],["role","img",1,"fas","fa-exclamation-circle","text-warning","me-3",3,"title"],["role","img",1,"fas","fa-exclamation-circle","text-danger","me-3",3,"title"],["role","img",1,"fas","fa-check-circle","text-success","me-3",3,"title"],["role","img",1,"fas","fa-info-circle","me-3","text-white",3,"title"],["href","javascript:void(0);",1,"me-3"],["href","javascript:void(0);",1,"me-3",3,"click"],["aria-hidden","true","tabindex","0",1,"fas","fa-tras
1h-o"],[3,"id"],[3,"click","id"],[4,"ngComponentOutlet","ngComponentOutletInjector"],[3,"content","dismissible","type"],[3,"close","content","dismissible","type"]],template:function(i,s){if(1&i&&(t.j41(0,"div",2,0),t.nVh(2,is,5,6,"ngb-accordion",3),t.nI1(3,"async"),t.k0s()),2&i){const c=t.sdS(1);t.Y8G("ngClass",t.eq3(9,Kn,c.isSectionActive()))("mandatory",s.sectionData.mandatory)("submissionId",s.submissionId)("sectionType",s.sectionData.sectionType)("sectionId",s.sectionData.id),t.BMQ("id","section_"+s.sectionData.id),t.R7$(2),t.vxM(t.bMT(3,7,c.isEnabled())?2:-1)}},dependencies:[v.C,C._f,C.W1,C.CT,C.sb,C.t3,M.YU,M.OI,F.m,f.h,M.Jj,f.D9],styles:["[_nghost-%COMP%] .card{margin-bottom:var(--ds-submission-sections-margin-bottom);overflow:unset}.section-focus[_ngcontent-%COMP%]{border-radius:var(--bs-border-radius);box-shadow:var(--bs-btn-focus-box-shadow)}[_nghost-%COMP%] .card:first-of-type{border-bottom:var(--bs-card-border-width) solid var(--bs-card-border-color)!important;border-bottom-left-radius:var(--bs-card-border-radius)!important;border-bottom-right-radius:var(--bs-card-border-radius)!important}[_nghost-%COMP%] .card-header button{box-shadow:none!important;width:100%}"]}))}return n(),a})()},49832(K,j,r){"use strict";r.d(j,{CoarNotifyConfigDataService:()=>b});var M=r(96354),u=r(96697),C=r(57775),f=r(81948),v=r(18328),I=r(72073),F=r(88667),D=r(20881),y=r(4318),x=r(49755),g=r(3601),h=r(7094),E=r(5127),m=r(9847),_=r(2615);let b=(()=>{var T;class P extends D.W{constructor(O,l,G,$,W){super("submissioncoarnotifyconfigs",O,l,G,$),this.requestService=O,this.rdbService=l,this.objectCache=G,this.halService=$,this.notificationsService=W,this.findAllData=new F.H(this.linkPath,O,l,G,$,this.responseMsToLive),this.deleteData=new I.I(this.linkPath,O,l,G,$,W,this.responseMsToLive,this.constructIdEndpoint),this.patchData=new y.n(this.linkPath,O,l,G,$,this.comparator,this.responseMsToLive,this.constructIdEndpoint),this.createData=new v.V(this.linkPath,O,l,G,$,W,this.responseMsToLive)}create(O,...l){return this.createData.create(O,...l)}patch(O,l){return this.patchData.patch(O,l)}update(O){return this.patchData.update(O)}commitUpdates(O){return this.patchData.commitUpdates(O)}createPatchFromCache(O){return this.patchData.createPatchFromCache(O)}findAll(O,l,G,...$){return this.findAllData.findAll(O,l,G,...$)}delete(O,l){return this.deleteData.delete(O,l)}deleteByHref(O,l){return this.deleteData.deleteByHref(O,l)}invoke(O,l,G){const $=this.requestService.generateRequestId();return this.getBrowseEndpoint().pipe((0,u.s)(1),(0,M.T)(W=>new E.t(W,O,"submissioncoarnotifyconfigmodel",l).toString()),(0,M.T)(W=>{const nt=this.getInvocationFormData(G);return new x.E0($,W,nt)})).subscribe(W=>this.requestService.send(W)),this.rdbService.buildFromRequestUUID($)}getInvocationFormData(O){const l=new FormData;return O.forEach(G=>{l.append("file",G)}),l}static#t=T=()=>(this.\u0275fac=function(l){return new(l||P)(_.KVO(g.B),_.KVO(C.o),_.KVO(f.$),_.KVO(h.Y),_.KVO(m.I))},this.\u0275prov=_.jDH({token:P,factory:P.\u0275fac,providedIn:"root"}))}return T(),P})()},44845(K,j,r){"use strict";r.d(j,{m:()=>g});var M=r(89488),u=r.n(M),C=r(96354),f=r(89777),v=r(30250),I=r(69289),F=r(12443),y=(r(67707),r(17705)),x=r(73664);let g=(()=>{var h;class E{constructor(_,b,T){this.changeDetectorRef=_,this.submissionService=b,this.sectionService=T,this.mandatory=!0,this.genericSectionErrors=[],this.allSectionErrors=[],this.active=!0,this.sectionState=this.mandatory,this.subs=[]}ngOnInit(){this.valid=this.sectionService.isSectionValid(this.submissionId,this.sectionId).pipe((0,C.T)(_=>(_&&this.resetErrors(),_))),this.subs.push(this.sectionService.getShownSectionErrors(this.submissionId,this.sectionId,this.sectionType).subscribe(_=>{(0,f.hj)(_)?_.forEach(b=>{(0,I.A)(b.path).forEach(P=>{P.fieldId?this.allSectionErrors.push(b.message):this.genericSectionErrors=u()(this.genericSectionErrors.concat(b.message))})}):this.resetErrors()}),this.submissionService.getActiveSectionId(this.submissionId).subscribe(_=>{const b=this.active;this.active=_===this.sectionId,b!==this.active&&(this.changeDetectorRef.detectChanges(),!this.active&&(0,f.Pe)(_)&&this.submissionService.dispatchSave(this.submissionId))})),this.enabled=this.sectionService.isSectionEnabled(this.submissionId,this.sectionId)}ngOnDestroy(){this.subs.filter(_=>
1(0,f.a4)(_)).forEach(_=>_.unsubscribe())}sectionChange(_){this.sectionState=_.nextState}isOpen(){return this.sectionState}isMandatory(){return this.mandatory}isSectionActive(){return this.active}isEnabled(){return this.enabled}isValid(){return this.valid}removeSection(_,b){this.sectionService.removeSection(_,b)}hasGenericErrors(){return this.genericSectionErrors&&this.genericSectionErrors.length>0}hasErrors(){return this.genericSectionErrors&&this.genericSectionErrors.length>0||this.allSectionErrors&&this.allSectionErrors.length>0}getErrors(){return this.genericSectionErrors}setFocus(_){this.active||this.submissionService.setActiveSection(this.submissionId,this.sectionId)}isInfo(){return this.sectionService.getIsInformational(this.sectionType)}removeError(_){this.genericSectionErrors.splice(_)}resetErrors(){(0,f.hj)(this.genericSectionErrors)&&this.sectionService.dispatchRemoveSectionErrors(this.submissionId,this.sectionId),this.genericSectionErrors=[],this.allSectionErrors=[]}static#t=h=()=>(this.\u0275fac=function(b){return new(b||E)(x.rXU(y.gRc),x.rXU(v.E),x.rXU(F.c))},this.\u0275dir=x.FsC({type:E,selectors:[["","dsSection",""]],inputs:{mandatory:"mandatory",sectionId:"sectionId",sectionType:"sectionType",submissionId:"submissionId"},exportAs:["sectionRef"]}))}return h(),E})()},96298(K,j,r){"use strict";r.d(j,{_:()=>x});var M=r(43446),u=r(2086),C=r(4093),f=r(89777),v=r(73664);function I(g,h){if(1&g&&(v.rj2(0,"span",0),v.EFF(1),v.eux()),2&g){const E=v.XpG().$implicit;v.R7$(),v.E5c(" ",E.name," ",E.startDate," ",E.endDate," ")}}function F(g,h){if(1&g&&(v.rj2(0,"span",0),v.EFF(1),v.eux()),2&g){const E=v.XpG().$implicit;v.R7$(),v.Lme("",E.name," from ",E.endDate)}}function D(g,h){if(1&g&&(v.rj2(0,"span",1),v.EFF(1),v.eux()),2&g){const E=v.XpG().$implicit;v.R7$(),v.Lme("",E.name," until ",E.startDate)}}function y(g,h){if(1&g&&(v.nVh(0,I,2,3,"span",0),v.nVh(1,F,2,2,"span",0),v.nVh(2,D,2,2,"span",1),v.Hgh(3,"br")),2&g){const E=h.$implicit;v.vxM("DEFAULT_BITSTREAM_READ"===E.action?0:-1),v.R7$(),v.vxM("lease"===E.name?1:-1),v.R7$(),v.vxM("embargo"===E.name?2:-1)}}let x=(()=>{var g;class h{constructor(m,_){this.dsoNameService=m,this.groupService=_,this.accessConditionsList=[]}ngOnInit(){this.accessConditions.forEach(m=>{(0,f.Im)(m.name)?this.groupService.findByHref(m._links.group.href).pipe((0,C.qD)()).subscribe(_=>{if(_.hasSucceeded){const b=_.payload,T=Object.assign({},m);T.name=this.dsoNameService.getName(b),this.accessConditionsList.push(T)}}):this.accessConditionsList.push(m)})}static#t=g=()=>(this.\u0275fac=function(_){return new(_||h)(v.rXU(M.f),v.rXU(u.GroupDataService))},this.\u0275cmp=v.VBU({type:h,selectors:[["ds-submission-section-upload-access-conditions"]],inputs:{accessConditions:"accessConditions"},decls:2,vars:0,consts:[[1,"badge","bg-primary","mt-3","me-2"],[1,"badge","bg-dark","mt-3","me-2"]],template:function(_,b){1&_&&v.Z7z(0,y,4,3,null,null,v.fX1),2&_&&v.Dyx(b.accessConditionsList)},encapsulation:2}))}return g(),h})()},76668(K,j,r){"use strict";r.d(j,{i:()=>x});
1var M=r(23294),u=r(5964),C=r(96354),f=r(39592),v=r(89777),I=r(8734),F=r(91261),D=r(2615),y=r(59640);let x=(()=>{var g;class h{constructor(m,_){this.store=m,this.operationsBuilder=_}updatePrimaryBitstreamOperation(m,_,b,T){if(null===_&&b)this.operationsBuilder.add(m,T,!1,!0);else if(_!==b){if(b)return void this.operationsBuilder.replace(m,T,!0);this.operationsBuilder.remove(m)}}getUploadedFilesData(m,_){return this.store.select((0,F.on)(m,_)).pipe((0,C.T)(b=>b),(0,M.F)())}getUploadedFileList(m,_){return this.store.select((0,F.Uh)(m,_)).pipe((0,C.T)(b=>b),(0,M.F)())}getFileData(m,_,b){return this.store.select((0,F.Uh)(m,_)).pipe((0,u.p)(T=>!(0,v.b0)(T)),(0,C.T)(T=>{let P;return Object.keys(T).filter(Y=>T[Y].uuid===b).forEach(Y=>P=T[Y]),P}),(0,M.F)())}getDefaultPolicies(m,_,b){return this.store.select((0,F.hi)(m,_,b)).pipe((0,C.T)(T=>T),(0,M.F)())}addUploadedFile(m,_,b,T){this.store.dispatch(new I.Bo(m,_,b,T))}updateFilePrimaryBitstream(m,_,b){this.store.dispatch(new I.w7(m,_,b))}updateFileData(m,_,b,T){this.store.dispatch(new I.nt(m,_,b,T))}removeUploadedFile(m,_,b){this.store.dispatch(new I.IE(m,_,b))}static#t=g=()=>(this.\u0275fac=function(_){return new(_||h)(D.KVO(y.il),D.KVO(f.C))},this.\u0275prov=D.jDH({token:h,factory:h.\u0275fac,providedIn:"root"}))}return g(),h})()},89488(K,j,r){var M=r(73136);K.exports=function u(C){return C&&C.length?M(C):[]}},96682(K,j,r){var M={"./custom/app/submission/sections/upload/file/section-upload-file.component":[24433,[8727,4433]]};function u(C){if(!r.o(M,C))return Promise.resolve().then(()=>{var I=new Error("Cannot find module '"+C+"'");throw I.code="MODULE_NOT_FOUND",I});var f=M[C],v=f[0];return Promise.all(f[1].map(r.e)).then(()=>r(v))}u.keys=()=>Object.keys(M),u.id=96682,K.exports=u}}]);
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.