1"use strict";(self.webpackChunkdspace_angular=self.webpackChunkdspace_angular||[]).push([[200],{70200:(B,h,s)=>{s.r(h),s.d(h,{UsageReportFilterInputDateComponent:()=>D});var m=s(31635),E=s(60177),o=s(58003),C=s(68018),u=s(42737),O=s(5964),l=s(89777),g=s(44783),c=s(88914),v=s(68988),t=s(54438);const f=n=>({"is-invalid":n});function b(n,a){if(1&n){const i=t.RV6();t.j41(0,"button",13),t.bIt("click",function(){const r=t.eBV(i).$implicit,d=t.XpG();return t.Njj(d.select(r))}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}if(2&n){const i=a.$implicit;t.R7$(),t.SpI(" ",t.bMT(2,1,"usage-reports.date.options."+(null==i?null:i.id))," ")}}function R(n,a){1&n&&(t.j41(0,"div",10),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.JRh(t.bMT(2,1,"usage-reports.date.start.empty")))}function I(n,a){1&n&&(t.j41(0,"div",10),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.JRh(t.bMT(2,1,"usage-reports.date.start.before")))}function M(n,a){1&n&&(t.j41(0,"div",10),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.JRh(t.bMT(2,1,"usage-reports.date.end.empty")))}function F(n,a){1&n&&(t.j41(0,"div",10),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.JRh(t.bMT(2,1,"usage-reports.date.end.after")))}let D=class p extends c.t{constructor(){super(...arguments),this.startDate=null,this.endDate=null,this.startDateEmpty=!1,this.endDateEmpty=!1,this.startDateAfterEndDate=!1,this.startBlurred=!1,this.endBlurred=!1}ngOnInit(){this.setDateOption(),this.setBsConfig(),this.validator.pipe((0,O.p)(a=>!0===a)).subscribe(()=>{this.startBlurred=!0,this.endBlurred=!0,this.validate()})}ngOnChanges(a){this.setDateOption(),this.setBsConfig()}setDateOption(){this.dateOption=this.filter.parentOption,this.setDates()}setDates(){(0,l.a4)(this.dateOption.selectedValue)&&(this.startDate=this.dateOption.selectedValue.range.startDate,this.endDate=this.dateOption.selectedValue.range.endDate,this.validate())}setBsConfig(){this.bsConfig=Object.assign({});let a="year",i=g.T3;this.dateOption.dateValueOptions.forEach(e=>{"Year-Month"===e.name&&(a="month",i=g._q)}),i=i.replace("yyyy","YYYY"),this.bsConfig.minMode=a,this.bsConfig.dateInputFormat=i}select(a){this.filter.values=[a.toString()],this.dateOption.selectedValue=a,this.setDates(),"custom"!==this.dateOption.selectedValue.id&&this.emitValues()}updateStartDate(a){this.startDate!==a&&(this.startDate=a,this.dateOption.switchToCustom(this.startDate,this.endDate),this.filter.values=[this.dateOption.selectedValue.toString()],this.validate(),this.emitValues())}updateEndDate(a){this.endDate!==a&&(this.endDate=a,this.dateOption.switchToCustom(this.startDate,this.endDate),this.filter.values=[this.dateOption.selectedValue.toString()],this.validate(),this.emitValues())}emitValues(){this.valid&&this.submitValues.emit(this.filter.values)}validate(){this.startDateEmpty=(0,l.Tn)(this.startDate),this.endDateEmpty=(0,l.Tn)(this.endDate),this.startDateAfterEndDate=(0,l.a4)(this.startDate)&&(0,l.a4)(this.endDate)&&this.startDate>this.endDate,!this.startDateEmpty&&!this.startDateAfterEndDate&&(this.startBlurred=!1),!this.endDateEmpty&&!this.startDateAfterEndDate&&(this.endBlurred=!1),this.filter.valid=this.valid}get valid(){return!this.startDateEmpty&&!this.endDateEmpty&&!this.startDateAfterEndDate}static{this.\u0275fac=(()=>{let a;return function(e){return(a||(a=t.xGo(p)))(e||p)}})()}static{this.\u0275cmp=t.VBU({type:p,selectors:[["ds-usage-report-filter-input-date"]],standalone:!0,features:[t.Vt3,t.OA$,t.aNF],decls:22,vars:17,consts:[["dp","bsDatepicker"],[1,"d-flex"],["ngbDropdown","","placement","bottom-left",1,"btn-group","flex-grow-1","me-1"],["ngbDropdownToggle","",1,"btn","btn-outline-secondary","d-flex"],[1,"me-auto"],["ngbDropdownMenu",""],["ngbDropdownItem",""],[1,"flex-grow-1","d-flex"],[1,"me-1","flex-grow-1"],["type","text","bsDatepicker","",1,"form-control",3,"blur","bsValueChange","ngClass","bsConfig","bsValue"],[1,"invalid-feedback"],[1,"separator"],[1,"ms-1","flex-grow-1"],["ngbDropdownItem","",3,"click"]],template:function(i,e){if(1&i){const r=t.RV6();t.j41(0,"div",1)(1,"div",2)(2,"button",3)(3,"span",4),t.EFF(4),t.nI1(5,"translate"),t.k0s()(),t.j41(6,"div",5),t.Z7z(7,b,3,3,"button",6,t.fX1),t.k0s()(),t.j41(9,"div",7)(10,"div",8)(11,"input",9,0),t.bIt("blur",function(){return t.eBV(r),t.Njj(e.startBlurred=!0)})("bsValueChange",function(_){return t.eBV(r),t.Njj(e.updateStartDate(_))}),t.k0s(),t.DNE(13,R,3,3,"div",10)(14,I,3,3,"div",10),t.k0s(),t.j41(15,"div",11),t.EFF(16," -"),t.k0s(),t.j41(17,"div",12)(18,"input",9,0),t.bIt("blur",function(){return t.eBV(r),t.Njj(e.endBlurred=!0)})("bsValueChange",function(_){return t.eBV(r),t.Njj(e.updateEndDate(_))}),t.k0s(),t.DNE(20,M,3,3,"div",10)(21,F,3,3,"div",10),t.k0s()()()}2&i&&(t.R7$(4),t.SpI("",null!=e.dateOption&&e.dateOption.selectedValue?t.bMT(5,11,"usage-reports.date.options."+(null==e.dateOption||null==e.dateOption.selectedValue?null:e.dateOption.selectedValue.id)):"","\xa0"),t.R7$(3),t.Dyx(null==e.dateOption?null:e.dateOption.values),t.R7$(4),t.Y8G("ngClass",t.eq3(13,f,e.startBlurred&&(e.startDateEmpty||e.startDateAfterEndDate)))("bsConfig",e.bsConfig)("bsValue",e.startDate),t.R7$(2),t.vxM(e.startBlurred&&e.startDateEmpty?13:-1),t.R7$(),t.vxM(e.startBlurred&&e.startDateAfterEndDate?14:-1),t.R7$(4),t.Y8G("ngClass",t.eq3(15,f,e.endBlurred&&(e.endDateEmpty||e.startDateAfterEndDate)))("bsConfig",e.bsConfig)("bsValue",e.endDate),t.R7$(2),t.vxM(e.endBlurred&&e.endDateEmpty?20:-1),t.R7$(),t.vxM(e.endBlurred&&e.startDateAfterEndDate?21:-1))},dependencies:[u.YN,u.pc,u.p0,o.UN,o.tg,o.do,o.U0,o._H,E.YU,C.D9],styles:[".dropdown-toggle[_ngcontent-%COMP%]{text-align:left}.dropdown-toggle[_ngcontent-%COMP%]:after{align-self:center}.btn[_ngcontent-%COMP%]{height:fit-content}
1.separator[_ngcontent-%COMP%]{padding-top:.5rem;padding-bottom:.5rem}"]})}};D=(0,m.Cg)([(0,v.YC)("date","any")],D)}}]);
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.