1"use strict";(self.webpackChunkdspace_angular=self.webpackChunkdspace_angular||[]).push([[7454],{37454:(I,h,i)=>{i.r(h),i.d(h,{AtmireRequestCopyModule:()=>o});var c=i(35103),m=i(78181),t=i(67522),C=i(8896),f=i(58360),S=i(96560),v=i(8848),A=i(5605),a=i(98678);let p=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=a.\u0275\u0275defineNgModule({type:e}),e.\u0275inj=a.\u0275\u0275defineInjector({providers:[v.w],imports:[t.Bz.forChild([{path:":token",resolve:{request:v.w},children:[{path:"",component:C.e},{path:f.MW,component:A.S},{path:f.uo,component:S.r}]}])]}),e})();var g=i(17232),F=i(86049);i(63766);const y=[],l=[];let R=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=a.\u0275\u0275defineNgModule({type:e}),e.\u0275inj=a.\u0275\u0275defineInjector({providers:[...l,...y.map(s=>({provide:s}))],imports:[c.ez,m.m,g.B]}),e})(),o=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=a.\u0275\u0275defineNgModule({type:e}),e.\u0275inj=a.\u0275\u0275defineInjector({providers:[F.O],imports:[c.ez,m.m,g.B,R,p]}),e})()},86049:(I,h,i)=>{i.d(h,{O:()=>y});var c=i(45608),m=i(4915),t=i(38025),C=i(62574),f=i.n(C),S=i(65384),v=i(27173),A=i(42821);const a=Object.assign({},A.Qb,{label:"submission.sections.upload.form.rac-from-label"}),p=Object.assign({},A.f9,{label:"submission.sections.upload.form.rac-until-label"});var g=i(25336),F=i.n(g),d=i(98678),T=i(96342);let y=(()=>{class l{constructor(o,e,s,n){this.formBuilderService=o,this.translateService=e,this.notificationsService=s,this.accessConditionsFormService=n,n.addConfigOverrides({startDateConfig:a,endDateConfig:p})}appendFormWithAccessConditionForm(o,e,s){this.appendFormWithAccessConditionGroupIfAllowed(o,t.T3.Always,e,s),this.appendFormWithAccessConditionGroupIfAllowed(o,t.T3.Request,e,s),this.appendFormWithAccessConditionGroupIfAllowed(o,t.T3.Fallback,e,s)}appendFormWithAccessConditionGroupIfAllowed(o,e,s,n){const r=this.buildAccessConditionGroup(e,s),u=(0,c.xI)(n)||(0,t.gI)(e,n);(0,c.Uh)(r)&&u&&o.push(r)}buildAccessConditionGroup(o,e){const s=o,n=e[(0,t.zw)(o)];if((0,c.xb)(n))return null;const r=1===n.length,u={preSelectFirstValue:r,disableSelectorOnPreselection:r};return this.accessConditionsFormService.buildAccessConditionGroup(s,n,this.getTranslationConfig(e,o,e.thresholdBytes),u)}getValidatedAccessConditionObject(o,e,s){const n=s[(0,t.zw)(o)];return this.accessConditionsFormService.getValidatedAccessConditionObject(o,e,n)}getPatchRequestPath(o){return["requestAccessOption",(0,t.cw)(o)]}fillFormModel(o,e){(0,c.xI)(e)||(this.fillFormModelSection(t.T3.Always,o,e),this.fillFormModelSection(t.T3.Request,o,e),this.fillFormModelSection(t.T3.Fallback,o,e))}fillFormModelSection(o,e,s){const n=s[(0,t.b_)(o)];
1this.accessConditionsFormService.fillAccessConditionFormGroup(o,e,n,this.getTranslationConfig(s,o))}updateAppliedRAOFromFormGroup(o,e,s){const n=f()(o);return n.alwaysDownloadAccessCondition=this.getValidatedAccessConditionObject(t.T3.Always,e,s),n.requestAccessCondition=this.getValidatedAccessConditionObject(t.T3.Request,e,s),n.fallbackDownloadAccessCondition=this.getValidatedAccessConditionObject(t.T3.Fallback,e,s),n}showDateValidationError(o){const e=this.translateService.instant(`submission.sections.upload.form.access-condition-label.requestaccess.${o.groupName}`);this.notificationsService.warning(this.translateService.get("submission.sections.upload.form.date-error.title"),this.translateService.get(`submission.sections.upload.form.date-error.rac.${o.dateType}`,{section:e,name:o.accessConditionName,maxDate:o.maxDate,date:o.selectedDate}))}hasUnsavedOrMismatchedSingularACs(o,e){return this.hasUnsavedSingularACs(o,e)||this.hasMismatchedSingularAC(o,e)}hasUnsavedSingularACs(o,e){return(0,c.xI)(o)?(console.error("Can't check for unsaved singular access conditions when no access condition options are provided"),!1):(0,c.xI)(e)?(console.error("Can't check for unsaved singular access conditions when no applied access conditions are provided"),!1):this.hasUnsavedSingularACForCategory(o,e,t.T3.Always)||this.hasUnsavedSingularACForCategory(o,e,t.T3.Request)||this.hasUnsavedSingularACForCategory(o,e,t.T3.Fallback)}hasUnsavedSingularACForCategory(o,e,s){return(0,t.gI)(s,e)&&1===o[(0,t.zw)(s)].length&&(0,c.xI)(e[(0,t.b_)(s)])}hasMismatchedSingularAC(o,e){return(0,c.xI)(o)?(console.error("Can't check for mismatched singular access conditions when no access condition options are provided"),!1):(0,c.xI)(e)?(console.error("Can't check for mismatched singular access conditions when no applied access conditions are provided"),!1):this.hasMismatchedSingularACForCategory(o,e,t.T3.Always)||this.hasMismatchedSingularACForCategory(o,e,t.T3.Request)||this.hasMismatchedSingularACForCategory(o,e,t.T3.Fallback)}hasMismatchedSingularACForCategory(o,e,s){const n=e[(0,t.b_)(s)];return!(!(0,t.gI)(s,e)||1!==o[(0,t.zw)(s)].length||(0,c.xI)(n))&&o[(0,t.zw)(s)][0].name!==n.name}getTranslationConfig(o,e,s){const n=o?.requestAccessType;let r=`submission.sections.upload.form.access-condition-hint.${n}.${e}`;if((0,c.Uh)(s)){const u=F()(s);r=this.translateService.instant(r,{threshold:u})}return{selectorLabel:`submission.sections.upload.form.access-condition-label.${n}.${e}`,optionLabelPrefix:`submission.sections.upload.form.access-condition-label.${n}`,selectorHint:r,preselectionHint:"submission.sections.upload.form.access-condition-hint.disabled"}}}return l.\u0275fac=function(o){return new(o||l)(d.\u0275\u0275inject(m.c),d.\u0275\u0275inject(T.sK),d.\u0275\u0275inject(S.T),d.\u0275\u0275inject(v._))},l.\u0275prov=d.\u0275\u0275defineInjectable({token:l,factory:l.\u0275fac}),l})()}}]);
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.