1"use strict";(self.webpackChunkcqd_frontend=self.webpackChunkcqd_frontend||[]).push([[1654],{21865(Ge,_e,o){o.d(_e,{J:()=>L});var r=o(54438),e=o(96354),y=o(88141),z=o(99437),te=o(62471),V=o(50817),W=o(86322),Q=o(843);let B=(()=>{class f extends W.Y{constructor(){super(...arguments),this.apiLinkPart=W.B.genericEstimates}getGenericEstimates(S){const E={...this.getCorrectedParams(S),gwp:S.gwp,declared_unit__like:S.declaredUnit,publisher__name__like:S.publisher,reviewer_org__name__like:S.reviewerOrgName,geography:S.geography,mf:S.mfPrettyString,force_uncached_read:S.forceUncachedRead},k=new te._g(this.apiBaseUrl).withMethod("GET").withParams(E).withUrl(`/${W.B.genericEstimates}`).observe("response");return this.performRequest(k).pipe((0,e.T)(re=>({items:re.body.map(we=>new Q.z(we)),pageSize:+re.headers.get(V.b.pageSize),totalCount:+re.headers.get(V.b.totalCount),totalPages:+re.headers.get(V.b.totalPages)})))}static{this.\u0275fac=(()=>{let S;return function(E){return(S||(S=r.xGo(f)))(E||f)}})()}static{this.\u0275prov=r.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}}return f})();var b=o(18810),j=o(89611);let L=(()=>{class f extends j.i{constructor(){super(...arguments),this.apiLinkPart=W.B.genericEstimates,this.apiService=(0,r.WQX)(B)}getGenericEstimates(S){return this.apiService.getGenericEstimates(S).pipe((0,e.T)(T=>({...T,items:T.items.map(E=>(this.addQaStatusesToEpd(E,!1),this.correctInsulationDeclaredUnit(E),E))})))}getGenericEstimateById(S){return this.apiService.getById(S).pipe((0,e.T)(T=>new Q.z(T)),(0,e.T)(T=>(this.addQaStatusesToEpd(T,!0),T)))}createGenericEstimate(S){return this.apiService.create(S).pipe((0,e.T)(T=>new Q.z(T)),(0,y.M)(T=>{this.addQaStatusesToEpd(T,!0)}))}patchGenericEstimate(S,T,E){return this.apiService.patch(S,T,E).pipe((0,e.T)(k=>new Q.z(k)),(0,y.M)(k=>{this.addQaStatusesToEpd(k,!0)}),(0,z.W)(k=>(403===k.status&&this.navigateToObjectAccessDeniedPage(T.name,T.myCapabilities,null),(0,b.$)(k))))}deleteGenericEstimate(S){return this.apiService.delete(S).pipe((0,z.W)(T=>403===T.status?this.getGenericEstimateById(S).pipe((0,e.T)(E=>this.navigateToObjectAccessDeniedPage(E.name,E.myCapabilities,null))):(0,b.$)(T)))}static{this.\u0275fac=(()=>{let S;return function(E){return(S||(S=r.xGo(f)))(E||f)}})()}static{this.\u0275prov=r.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}}return f})()},67542(Ge,_e,o){o.d(_e,{h:()=>L});var r=o(54438),e=o(17001),y=o(96354),z=o(88141),te=o(99437),V=o(62471),W=o(50817),Q=o(86322);let B=(()=>{class f extends Q.Y{constructor(){super(...arguments),this.apiLinkPart=Q.B.industryEpds}getIndustryEpds(S){const E={...this.getCorrectedParams(S),gwp:S.gwp,declared_unit__like:S.declaredUnit,publisher__name__like:S.publisher,geography:S.geography,mf:S.mfPrettyString,force_uncached_read:S.forceUncachedRead},k=new V._g(this.apiBaseUrl).withMethod("GET").withParams(E).withUrl("/industry_epds").observe("response");return this.performRequest(k).pipe((0,y.T)(re=>({items:re.body.map(we=>new e.n(we)),pageSize:+re.headers.get(W.b.pageSize),totalCount:+re.headers.get(W.b.totalCount),totalPages:+re.headers.get(W.b.totalPages)})))}static{this.\u0275fac=(()=>{let S;return function(E){return(S||(S=r.xGo(f)))(E||f)}})()}static{this.\u0275prov=r.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}}return f})();var b=o(18810),j=o(89611);let L=(()=>{class f extends j.i{constructor(){super(...arguments),this.apiLinkPart=Q.B.industryEpds,this.apiService=(0,r.WQX)(B)}getIndustryEpds(S){return this.apiService.getIndustryEpds(S).pipe((0,y.T)(T=>({...T,items:T.items.map(E=>(this.addQaStatusesToEpd(E,!0),this.correctInsulationDeclaredUnit(E),E))})))}getIndustryEpdById(S){return this.apiService.getById(S).pipe((0,y.T)(T=>new e.n(T)),(0,y.T)(T=>(this.addQaStatusesToEpd(T,!0),T)))}createIndustryEpd(S){return this.apiService.create(S).pipe((0,y.T)(T=>new e.n(T)),(0,z.M)(T=>{this.addQaStatusesToEpd(T,!0)}))}updateIndustryEpd(S,T){return this.apiService.update(S,T).pipe((0,y.T)(E=>new e.n(E)),(0,te.W)(E=>(403===E.status&&this.navigateToObjectAccessDeniedPage(T.name,T.myCapabilities,null),(0,b.$)(E))))}patchIndustryEpd(S,T,E){return this.apiService.patch(S,T,E).pipe((0,y.T)(k=>new e.n(k)),(0,z.M)(k=>{this.addQaStatusesToEpd(k,!0)}),(0,te.W)(k=>(403===k.status&&this.navigateToObjectAccessDeniedPage(T.name,T.myCapabilities,null),(0,b.$)(k))))}migrateIndustryEpd(S){return this.apiService.migrate(S)}deleteIndustryEpd(S){return this.apiService.delete(S).pipe((0,te.W)(T=>403===T.status?this.getIndustryEpdById(S).pipe((0,y.T)(E=>this.navigateToObjectAccessDeniedPage(E.name,E.myCapabilities,null))):(0,b.$)(T)))}verifyEpd(S){return this.apiService.verifyEpd(S)}static{this.\u0275fac=(()=>{let S;return function(E){return(S||(S=r.xGo(f)))(E||f)}})()}static{this.\u0275prov=r.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}}return f})()},70420(Ge,_e,o){o.d(_e,{_:()=>te});var r=o(54438),e=o(83561);o(85129),o(83870);let te=(()=>{class V{constructor(){this.showCategoryStep=!1,this.hide=new r.bkB,this.searchSubmit=new r.bkB,this.setBuilder=new r.bkB,this.labels=e.W,this.isHideCurrentDialog=!1}onHide(){this.hide.emit(),this.detailsPanelShown=!1}onSubmit(Q){this.searchSubmit.emit(Q),this.detailsPanelShown=!1}onSetBuilder(Q){this.setBuilder.emit({element:this.selectedElementControl,builderName:Q})}
1onShowDetails(){this.detailsPanelShown=!0}showCurrentDialog(){this.isHideCurrentDialog=!1}hideCurrentDialog(){this.isHideCurrentDialog=!0}static{this.\u0275fac=function(B){return new(B||V)}}static{this.\u0275cmp=r.VBU({type:V,selectors:[["cqd-material-search-modal"]],inputs:{project:"project",coordinates:"coordinates",rootLabelsArray:"rootLabelsArray",collection:"collection",elementName:"elementName",gwpTargetSettings:"gwpTargetSettings",visible:"visible",bidIndex:"bidIndex",bidders:"bidders",allowBroadCategorySelection:"allowBroadCategorySelection",withGenericCategories:"withGenericCategories",supportReusedMaterials:"supportReusedMaterials",selectedElementControl:"selectedElementControl",showCategoryStep:"showCategoryStep"},outputs:{hide:"hide",searchSubmit:"searchSubmit",setBuilder:"setBuilder"},decls:2,vars:17,consts:[["appendTo","body",3,"hide","header","dialogWidth","visible","isHideCurrentDialog"],["appendTo","body",3,"searchSubmit","showDetails","showCurrentDialog","hideCurrentDialog","setBuilder","collection","project","bidIndex","bidders","selectMaterialEnabled","coordinates","gwpTargetSettings","rootLabelsArray","allowBroadCategorySelection","withGenericCategories","supportReusedMaterials","selectedElement","showCategoryStep"]],template:function(B,b){1&B&&(r.j41(0,"cqd-modal",0),r.bIt("hide",function(){return b.onHide()}),r.j41(1,"cqd-material-search-form",1),r.bIt("searchSubmit",function(L){return b.onSubmit(L)})("showDetails",function(){return b.onShowDetails()})("showCurrentDialog",function(){return b.showCurrentDialog()})("hideCurrentDialog",function(){return b.hideCurrentDialog()})("setBuilder",function(L){return b.onSetBuilder(L)}),r.k0s()()),2&B&&(r.Y8G("header",b.elementName)("dialogWidth",1600)("visible",b.visible)("isHideCurrentDialog",b.isHideCurrentDialog),r.R7$(),r.Y8G("collection",b.collection)("project",b.project)("bidIndex",b.bidIndex)("bidders",b.bidders)("selectMaterialEnabled",!0)("coordinates",b.coordinates)("gwpTargetSettings",b.gwpTargetSettings)("rootLabelsArray",b.rootLabelsArray)("allowBroadCategorySelection",b.allowBroadCategorySelection)("withGenericCategories",b.withGenericCategories)("supportReusedMaterials",b.supportReusedMaterials)("selectedElement",b.selectedElementControl)("showCategoryStep",b.showCategoryStep))},styles:["[_nghost-%COMP%] .modal-overlay .modal-window.p-dialog .p-dialog-content{padding-bottom:40px!important} .p-dialog cqd-material-search-form{display:block;padding:10px;background:#edeef0;border-radius:3px} .dialog-header{background-color:#f2f2f5!important;border-bottom:none!important}"],changeDetection:0})}}return V})()},81654(Ge,_e,o){o.d(_e,{MaterialsModule:()=>ul});var r=o(51188),e=o(54438),y=o(89417),z=o(83561),te=o(42187),V=o(72279),W=o(70384),Q=o(58907),B=o(4475),b=o(22210),j=o(25007),L=o(84412),f=o(21413),ne=o(43236),S=o(33726),T=o(84572),E=o(7673),k=o(19724),re=o(983),we=o(18810),Ke=o(40605),Ye=o(97647),ve=o(44668),ge=o(5964),at=o(23294),st=o(65245),C=o(25558),P=o(88141),h=o(56977),F=o(99172),m=o(96354),me=o(53993),u=o(96697),Le=o(33103),ht=o(77048),Me=o(70980),At=o(99437),ze=o(40941),Qe=o(85129),gt=o(98314),Ie=o(81446),K=o(42049);const Pt={[K.BM.allMaterials]:"Material Search",[K.BM.concrete]:"Concrete Search by Properties",[K.BM.readyMix]:"Ready Mixes Search by Properties",[K.BM.shotcrete]:"Shotcrete Search by Properties",[K.BM.steel]:"Steel Search by Properties",[K.BM.rebarSteel]:"Rebar Steel Search by Properties",[K.BM.ptSteel]:"Post-Tensioning Steel Search by Properties",[K.BM.gypsum]:"Gypsum & Drywall Search by Properties",[K.BM.aluminium]:"Aluminum Search by Properties",[K.BM.insulation]:"Insulation Search by Properties",[K.BM.timber]:"Timber Search by Properties",[K.BM.carpet]:"Carpet Search by Properties",[K.BM.masonry]:"Masonry Search by Properties",[K.BM.asphalt]:"Asphalt Search by Properties",[K.BM.other]:"Other Materials Search by Properties"};var Rt=o(67903),yt=o(90360),q=o(82902),Ot=o(27505),vt=o(70573),G=o(96935),tt=o(22323),g=o(34003),p=o(79479),I=o(24860);class U extends I.Z{constructor(){super(...arguments),this.sessionService=(0,e.WQX)(g.Q),this.materialSearchFormService=(0,e.WQX)(p.p)}get formSearchTypes(){return this.materialSearchFormService.getFormSearchTypes()}setControlSearchType(l,t){this.materialSearchFormService.setControlSearchType(l,t)}getControlSearchType(l){return this.materialSearchFormService.getControlSearchType(l)}}var X=o(57682),Y=o(55345),ce=o(31527);const he={name:$localize`Search Terms`,id:"materialSearchBefore",version:1,steps:[{intro:$localize`Select a material <b>category</b> to search inside. Each category has customized search terms to help`+$localize`you find materials actually relevant to your requirements`,element:".ms-p1-s1 ~ .p-toggleable-content",position:"right",scrollTo:"off"},{intro:$localize`Some categories can be opened up into <b>subcategories</b>. Searches of a parent category always`+$localize` include all its subcategories.`,element:".Concrete .p-submenu-list",position:"right"},{intro:$localize`You can see and change your current category and subcategories from this ′<b>breadcrumb</b>′`+$localize` menu. You will need to use the breadcrumb menu in the Building Planner.`,element:"#ms-p1-s3"},{intro:$localize`There′
1s not much point considering the emissions of products that don′t actually fit your`+$localize` application. The <b>Design Intent</b> section lets you narrow down to just relevant products. This section`+$localize` is different for each material type. If there′s a term you would like to be able to search by, please`+$localize` submit a feature request!`,element:"#ms-p1-s4"},{intro:$localize`You can change most searches to specify a <b>maximum</b>, a <b>minimum</b>, or a <b>general target</b>`+$localize` using this control.`,element:"#ms-p1-s4 .field-type.search-type"},{intro:$localize`There′s not much point considering the emissions of products that are not offered in your`+$localize` region. For <b>heavy materials</b> that are usually not shipped worldwide, these filters can help narrow`+$localize` down to just relevant materials.`,element:"#ms-p1-s6"},{intro:$localize`For text, you can choose to <b>include</b> (checkmark) or <b>exclude</b> (x) text.`,element:"#ms-p1-s7 .field-type.search-type"},{intro:$localize`By default, we return EPDs that are <b>valid as of today</b>. You can change the date here to suit your`+$localize` project.`,element:"#epdDateValidityEnds"},{intro:$localize`All the search terms you create appear here as ′<b>chips</b>′. You can remove a search term by`+$localize` clicking the red ′X′ on its chip.`,element:".ms-p1-s8"},{intro:$localize`Above the search results, you have a set of <b>filters</b> to narrow down your search by the contents of`+$localize` each column. Most of these filters are also available in one of the sections above; it doesn′t matter`+$localize` which one you use.`}]},xe={name:$localize`Search Results`,id:"materialSearchAfter",version:1,steps:[{intro:$localize`The results of your search. The green bar shows where most products fall. The`+$localize` ′<b>Achievable</b>′ line is an intensity you can probably procure at moderate cost,`+$localize` because at least <b>20%</b> of products found have that carbon intensity or better.`,element:"#ms-p2-s1",position:"left"},{intro:$localize`The <b>number</b> of materials found, and the <b>range</b> of results`,element:"#ms-p2-s2"},{intro:$localize`You can use these filter boxes to further <b>refine</b> your search. Changing the checkmark symbol to an X`+$localize` will let you exclude certain words/plants`,element:'#ms-p2-s3 cqd-select[ng-reflect-input-id="manufacturer"]'},{intro:$localize`The ′<b>compare</b>′ button will bring up an analysis of how products from different`+$localize` manufacturers or plants compare.`,element:"#ms-p2-s4"},{intro:$localize`If you want to find products under a <b>certain target</b> (e.g. the Achievable Target from a previous`+$localize` search) you can put the <b>maximum</b> here.`,element:'#ms-p2-s3 cqd-form-unit[ng-reflect-input-id="gwp"]'},{intro:$localize`Click on a row of the table to <b>select</b> that material.`,element:".ms-p2-s6"},{intro:$localize`<b>View</b> and download the underlying <b>EPD</b>`,element:"#ms-p2-s7"}]};var A=o(65444),w=o(48726),D=o(62471),se=o(87897),Se=o(93416),le=o(25025);class De extends Se.N{constructor(l){super(),this.manufacturer=l.manufacturer,this.specValue=(0,le.Dq)(l.specValue),this.conservativeEstimate=(0,le.Dq)(l.conservativeEstimate)}}let ie=(()=>{class a extends w.v{getMaterialDataPointsBySpec(t,n){const i={...n?se.wF.getCorrectedParams(n):{},spec:t,page_size:void 0,page_number:void 0},s=new D._g(this.apiBaseUrl).withMethod("GET").withUrl("/data_points/by_spec").withParams(i);return this.performRequest(s).pipe((0,m.T)(c=>c.map(_=>new De(_))))}static{this.\u0275fac=(()=>{let t;return function(i){return(t||(t=e.xGo(a)))(i||a)}})()}static{this.\u0275prov=e.jDH({token:a,factory:a.\u0275fac,providedIn:"root"})}}return a})(),J=(()=>{class a{constructor(t){this.chartDataApiService=t}getMaterialDataPointsBySpec(t,n){return this.chartDataApiService.getMaterialDataPointsBySpec(t,n)}static{this.\u0275fac=function(n){return new(n||a)(e.KVO(ie))}}static{this.\u0275prov=e.jDH({token:a,factory:a.\u0275fac,providedIn:"root"})}}return a})();var Ne=o(7809),Je=o(45312);const Be={name:$localize`Select Category`,id:"categorySelector",version:1,isExtraTour:!0,steps:[{intro:Je.c.assetsUrl+"assets/images/tour/Category_Selector.jpg"}]};var $e=o(95937),Ze=o(34984),Te=o(22668),fe=o(90071),mt=o(34692),et=o(36295),ut=o(67430),St=o(49966),Re=o(73239),Ee=o(36013),We=o(62750),d=o(86322),Z=o(57765),ee=o(80810),ft=o(67542),It=o(92537),Mn=o(40673),Ct=o(73644),de=o(32096),En=o(97465),bn=o(19727),je=o(28950),ue=o(45419),An=o(41424),Pn=o(69135),Rn=o(10179),yn=o(21865),Tt=o(9521),On=o(13466),vn=o(14635),In=o(42592),wn=o(52720),xn=o(83844),ot=(o(83870),o(50834)),Mt=o(89079),Wt=o(35284),Dn=o(4147),Fn=o(45635),Gn=o(17947),wt=o(88701),Ln=o(59947),Nn=o(13495);let Bn=(()=>{class a{encryptBase64(t){if(!t)return null;try{return btoa(t)}catch{return null}}decryptBase64(t){if(!t)return null;try{return atob(t)}catch{return null}}static{this.\u0275fac=function(n){return new(n||a)}}static{this.\u0275prov=e.jDH({token:a,factory:a.\u0275fac,providedIn:"root"})}}return a})();var $n=o(59640),N=o(60177),ye=o(81141),Ae=o(5779),be=o(38542),jn=o(36432),ke=o(15473),kn=o(87240),Fe=o(50505);const Un=["chartScatterPlot"];let Hn=(()=>{class a{set materials(t){this._materials=t}get materials(){return this._materials}onResize(t){this.resizeBoxPlot()}constructor(t){this.sessionService=t,this.heightChart=320,this.widthChart=350,this.widthMin=120,this.widthMax=350,this.heightMin=320,this.margin={top:10,right:10,bottom:30,left:55},this.colors={green:"#9be097",blue:"#008fdd",title_red:"#cb181d",grey:"#404040",light_blue:"#00e0dc",purple:"#3f007d"},this.resizeBoxPlot=()=>{this.set_dimensions(),Fe.Ltv(".box_svg"+this.my_class).attr("width",this.totalWidth).attr("height",this.totalHeight),this.updateChart()},this.createVisualization=()=>{const n=Fe.Ltv("#svgScatterPlot"),i=this.my_class,c=this.colors,_=this.materials.map(O=>({name:O.name,materialId:O.id,gwpDisplayValue:W.S.getMaterialUncertaintyAdjustedGwpPerDeclaredUnit(O,this.declaredUnit.convertedUnit.getBaseUnit()).toNumber("kgCO2e").toFixed(4)})),M=this,R=M.width/2;M.max_value=Fe.T9B(_,O=>{const Pe=parseFloat(O.gwpDisplayValue);return isNaN(Pe)?-1/0:Pe});const v=Fe.WH().domain(["SCATTER"]).range([0,M.width]),x=Fe.m4Y().domain([0,1.2*this.max_value]).range([M.height,0]),H=this.baseline;!1===isNaN(H)&&H>0&&!0===this.useBaseline&&(x.domain()[1]<H&&x.domain([0,1.05*H]),Fe.Ltv(".clf_baseline"+i).attr("visibility","visible").attr("x1",v.range()[0]).attr("x2",v.range()[1]).attr("y1",x(H)-.5).attr("y2",x(H)-.5),Fe.Ltv(".clf_baseline_mouseover"+i).attr("visibility","visible").attr("x1",v.range()[0]).attr("x2",v.range()[1]).attr("y1",x(H)-1).attr("y2",x(H)-1),Fe.Ltv(".clf_baseline_text"+i).attr("visibility","visible").attr("text-anchor","end").attr("x",v.range()[1]).attr("y",x(H)-.5).attr("font-size","0.75em").attr("dy",10).text("CLF Baseline")),n.select(".y_axis"+i).call(Fe.V4s(x).tickSizeOuter(0).ticks(5)),n.selectAll(".y_axis"+i+" text").attr("dx",5),n.selectAll(".y_axis"+i+" line").attr("x2",M.width),n.select(".x_axis"+i).call(Fe.l78(v).tickSizeOuter(0).tick
1Format("")).attr("transform","translate(0,"+M.height+")"),n.select(".background_rect"+i).attr("width",M.width).attr("height",M.height).attr("fill","#F8F8F8");let $=n.selectAll(".scatter_group"+i).data(_);$.exit().remove();const oe=this.sessionService.getSecurityPrincipal(),Ce=$.enter().append("g").attr("class","scatter_group"+i).on("mouseover",(O,Pe)=>{if(oe.tooltipsAvailability()){const pe="#tooltip_rect"+i+Pe.materialId,Ut=".tooltip_text"+i+"tooltip_item"+i+Pe.materialId,Ht="#tspan_element"+i+Pe.materialId,bt=$.select(".tooltip_group"+i+Pe.materialId).attr("visibility","visible"),Vt=bt.select(pe),_t=bt.select(Ut);_t.select(Ht).attr("dy",1.1*(_t.selectAll("tspan").size()-1)+"em");const Xt=_t.node().getBBox().height+15;Vt.attr("height",Xt)}}).on("mouseout",(O,Pe)=>{oe.tooltipsAvailability()&&Ce.select(".tooltip_group"+i+Pe.materialId).attr("visibility","hidden")});Ce.append("circle").attr("class","scatter_circle"+i);const ae=Ce.append("g").attr("class",O=>"tooltip_group"+i+O.materialId).attr("visibility","hidden").attr("pointer-events","none");ae.append("rect").attr("class",O=>"tooltip_rect"+i+" tooltip_item"+i+O.materialId).attr("id",O=>"tooltip_rect"+i+O.materialId).attr("rx",5).attr("ry",5).attr("x",0).attr("y",function(O){return x(O.gwpDisplayValue)-15}).attr("stroke-width","1px").attr("stroke","grey").attr("fill","white").attr("width",R).attr("height",1);const Oe=ae.append("text").attr("class",O=>"tooltip_text"+i+"tooltip_item"+i+O.materialId).attr("text-anchor","end").attr("font-size","0.8em").attr("x",R-15).attr("y",function(O){return x(O.gwpDisplayValue)}).text(O=>`${O.name}`).attr("dy","1.1em").call(kn.LV,R-15);Oe.append("tspan").attr("x",R-15).attr("y",function(O){return x(O.gwpDisplayValue)}).attr("dy",0).attr("fill","#3b9cb6").text("One EPD:"),Oe.append("tspan").attr("id",O=>"tspan_element"+i+O.materialId).attr("x",R-15).attr("y",function(O){return x(O.gwpDisplayValue)}).attr("dy",0).attr("fill","#209ed9").text(O=>`${O.gwpDisplayValue} kgCO2e/${M.declaredUnit.convertedUnit.getUnitName()}`),$=$.merge(Ce),$.select(".scatter_circle"+i).attr("cx",R).attr("cy",function(O){return x(O.gwpDisplayValue)}).attr("fill",c.green).attr("stroke",c.green).attr("stroke-width","1px").attr("fill-opacity","0.5").attr("r",10)},this.useBaseline=Je.c.useBaselineForCharts}ngOnChanges(t){(0,q.I)(t.materials?.currentValue)||(this.baseline=this.gwpBaseline?this.gwpBaseline.multiply(this.declaredUnit.ratio.fromConvertedToOriginal).getNumericValue():null,this.svg||this.createChart(),this.updateChart())}set_dimensions(){this.element=document.getElementById("chartScatterPlot"),this.totalWidth=this.widthChart>this.componentWrapper.clientWidth?this.componentWrapper.clientWidth:this.widthChart,this.totalHeight=this.heightChart,this.width=this.totalWidth-this.margin.left-this.margin.right,this.height=this.totalHeight-this.margin.top-this.margin.bottom}createChart(){this.element=this.chartContainer.nativeElement,this.my_class="scatter";const t=this.my_class;this.set_dimensions(),this.svg=Fe.Ltv("#chartScatterPlot").append("svg").attr("width",this.totalWidth).attr("height",this.totalHeight),this.vis=this.svg.append("g").attr("id","svgScatterPlot").attr("height",this.totalHeight-35).attr("transform","translate("+this.margin.left+","+this.margin.top+")"),this.vis.append("rect").attr("class","single_element background_rect"+t),this.vis.append("g").attr("class","single_element y_axis y_axis"+t),this.vis.append("g").attr("class","single_element x_axis x_axis"+t),this.vis.append("text").attr("class","single_element box_title y_axis_label"+t),this.vis.append("line").attr("stroke",this.colors.purple).attr("class","clf_baseline"+t+" baseline_item"+t),this.vis.append("text").attr("fill",this.colors.purple).attr("class","clf_baseline_text"+t+" baseline_item"+t),this.vis.append("line").attr("stroke","transparent").attr("stroke-width","8px").attr("class","clf_baseline_mouseover"+t+" baseline_item"+t)}updateChart(){this.createVisualization()}static{this.\u0275fac=function(n){return new(n||a)(e.rXU(g.Q))}}static{this.\u0275cmp=e.VBU({type:a,selectors:[["cqd-scatter-plot"]],viewQuery:function(n,i){if
1(1&n&&e.GBs(Un,7),2&n){let s;e.mGM(s=e.lsd())&&(i.chartContainer=s.first)}},hostBindings:function(n,i){1&n&&e.bIt("resize",function(c){return i.onResize(c)},!1,e.tSv)},inputs:{componentWrapper:"componentWrapper",gwpBaseline:"gwpBaseline",materials:"materials",declaredUnit:"declaredUnit",heightChart:"heightChart",widthChart:"widthChart"},features:[e.OA$],decls:3,vars:0,consts:[["chartScatterPlot",""],[1,"scatter-plot-chart"],["id","chartScatterPlot"]],template:function(n,i){1&n&&(e.j41(0,"div",1),e.nrm(1,"div",2,0),e.k0s())},styles:["#chartScatterPlot[_ngcontent-%COMP%]{width:100%;height:100%;text-align:left;font-size:12px}[_nghost-%COMP%] .y_axis line{stroke-dasharray:2,2;stroke:#d0d0d0}[_nghost-%COMP%] .x_axis line{display:none}[_nghost-%COMP%] .y_axis path, [_nghost-%COMP%] .x_axis path{stroke:#d0d0d0}[_nghost-%COMP%] .box_title, [_nghost-%COMP%] .x_axis text{fill:#cb181d}[_nghost-%COMP%] .box_title{font-size:1.2em}"]})}}return a})();var rt=o(69441),Vn=o(12742),Xn=o(27932),xt=o(99213),Yn=o(82765),zn=o(99164),Wn=o(9826),qn=o(11922),Kn=o(2677),Qn=o(50982),Jn=o(96855),Zn=o(84047),ei=o(81442);let ti=(()=>{class a extends ei.Q{constructor(t){super(),this.element=t,this.cqdCtrlPressed=new e.bkB}ngOnInit(){(0,S.R)(this.element.nativeElement,"mouseenter").pipe((0,h.Q)(this.destroy$)).subscribe(()=>{this.isMouseOverElement=!0,this.cqdCtrlPressed.emit(this.isCtrlPressed)}),(0,S.R)(this.element.nativeElement,"mouseleave").pipe((0,h.Q)(this.destroy$)).subscribe(()=>{this.isMouseOverElement=!1,this.cqdCtrlPressed.emit(!1)}),(0,S.R)(window,"keydown").pipe((0,h.Q)(this.destroy$)).subscribe(t=>{(t.ctrlKey||t.metaKey)&&(this.isCtrlPressed=!0),this.isMouseOverElement&&this.cqdCtrlPressed.emit(this.isCtrlPressed)}),(0,S.R)(window,"keyup").pipe((0,h.Q)(this.destroy$)).subscribe(()=>{this.isCtrlPressed=!1,this.cqdCtrlPressed.emit(this.isCtrlPressed)}),(0,S.R)(window,"blur").pipe((0,h.Q)(this.destroy$)).subscribe(()=>{this.isCtrlPressed=!1,this.cqdCtrlPressed.emit(this.isCtrlPressed)})}static{this.\u0275fac=function(n){return new(n||a)(e.rXU(e.aKT))}}static{this.\u0275dir=e.FsC({type:a,selectors:[["","cqdCtrlPressed",""]],outputs:{cqdCtrlPressed:"cqdCtrlPressed"},features:[e.Vt3]})}}return a})();var qt=o(11846);let ni=(()=>{class a{static{this.\u0275fac=function(n){return new(n||a)}}static{this.\u0275cmp=e.VBU({type:a,selectors:[["cqd-statistics-input"]],inputs:{value:"value",label:"label",tooltip:"tooltip",tooltipPosition:"tooltipPosition"},decls:5,vars:4,consts:[[1,"stats-title",3,"pTooltip","tooltipPosition"],[1,"stats-value"]],template:function(n,i){1&n&&(e.j41(0,"div")(1,"span",0),e.EFF(2),e.k0s(),e.j41(3,"span",1),e.EFF(4),e.k0s()()),2&n&&(e.R7$(),e.Y8G("pTooltip",i.tooltip)("tooltipPosition",i.tooltipPosition),e.R7$(),e.SpI("",i.label,": "),e.R7$(2),e.JRh(i.value))},dependencies:[be.m],styles:[".stats-title[_ngcontent-%COMP%]{font-weight:600;font-size:13px}.stats-value[_ngcontent-%COMP%]{font-weight:650;font-size:14px;color:#375685}"],changeDetection:0})}}return a})();function ii(a,l){if(1&a&&(e.j41(0,"div",3),e.nrm(1,"cqd-statistics-input",10),e.k0s()),2&a){const t=e.XpG();e.R7$(),e.Y8G("value",t.statistics.genericEstimatesCount)}}function ai(a,l){if(1&a&&(e.j41(0,"div",3),e.nrm(1,"cqd-statistics-input",11),e.k0s()),2&a){const t=e.XpG();e.R7$(),e.Y8G("value",t.statistics.processedDeclaredUnit.convertedUnit.format())}}let si=(()=>{class a{constructor(t,n,i){this.formattingService=t,this.notificationService=n,this.configurationService=i,this.header=$localize`Statistics`}ngOnInit(){this.isShowGenericEstimate=this.configurationService.isShowGenericEstimates()}ngOnChanges(t){if(t.statistics&&!t.statistics.isFirstChange()){let n=(0,Z.M)(t.statistics.currentValue.unit,t.statistics.previousValue.unit)?"":$localize`Changing comparison to kgCO2e per 1 ${t.statistics.currentValue.unit.getUnitName()}. Previous selections cleared.`;this.isStatisticsValuesTheSame(t.statistics.currentValue,t.statistics.previousValue)||(n=$localize`${n} Statistics updated.`),n&&this.notificationService.showWarning({detail:n})}}format(t){if(t&&this.statistics.processedDeclaredUnit){const{originalUnit:n,convertedUnit:i}=this.statistics.processedDeclaredUnit;return t.per(n,i).format()}return"0"}formatGwpZ(t){return this.formattingService.formatGwpZToPercentage(t)}
1isStatisticsValuesTheSame(t,n){return t.samples===n.samples&&t.average.equalsWith(n.average)&&t.bestPractice.equalsWith(n.bestPractice)&&t.conservativeEstimate.equalsWith(n.conservativeEstimate)}static{this.\u0275fac=function(n){return new(n||a)(e.rXU(qt.Rw),e.rXU(wt.J),e.rXU(Tt.s))}}static{this.\u0275cmp=e.VBU({type:a,selectors:[["cqd-statistics"]],inputs:{statistics:"statistics",header:"header"},features:[e.OA$],decls:18,vars:8,consts:()=>{let t,n,i,s,c,_,M,R,v,x,H,$,oe,Ce;return t=$localize`:âe586bcc09eda1b246b1ca65d75fa823d85fc5c62â415550512170272543:Count of all Product EPDs matching search terms above. (not affected by filters below).`,n=$localize`:â9979372b726fafbb46202063b579178c283cc3edâ7290779776038352426:Product EPDs`,i=$localize`:â1438013e7472a9eb220bb0a86f02cbfc975dde3aâ2610184086800193959:Count of all Industry EPDs matching search terms above. (not affected by filters below).`,s=$localize`:â5a9eeca96ad0feac5a9d3a0194dca8453a5efb86â4893608042141186394:Industry EPDs`,c=$localize`:â71e6dba66beae026f35ed417a5834500ebab1d75â8452240730323621495:20th percentile of all Product EPDs and Industry EPD data points matching search terms above. Each Industry EPD is assumed to represent 20 data points with a normal distribution around the reported value. In a list of 1000 EPDs plus Industry-EPD data points, the 200th lowest one would be the 20th percentile.`,_=$localize`:âd42692f6f83f5eac9e44fc50bbe62e1c061f6e31â9154371920460448069:Achievable`,M=$localize`:âbc387f2cf0982320c6b3e53faa5c70f270050d4câ1732910773635449924:Arithmetic Mean and Relative Standard Deviation of all Product EPDs and Industry EPD data points matching search terms above. Each Industry EPD is assumed to represent 20 data points with a normal distribution around the reported value.`,R=$localize`:â578f3696ab5ffb8fc85da042cb38d898c9ca894bâ6685892931357659955:Average`,v=$localize`:âa57f64a97c3ac30f7d22f73d85121deb6aee3d30â1450203568009048804:80th percentile of all Product EPDs and Industry EPD data points matching search terms above. Each Industry EPD is assumed to represent 20 data points with a normal distribution around the reported value. In a list of 1000 EPDs plus Industry-EPD data points, the 200th highest one would be the 80th percentile. `,x=$localize`:â15d6777d13dc2a09302adb50772393038c1c715câ6833673110140590046:Conservative`,H=$localize`:âde90ee5606f9a2d4ec1ac398c57290db31b865b9â9081493600340279131:Count of all Generic Estimates matching search terms above. (not affected by filters below).`,$=$localize`:â564558f531c2dd5f38ac8348ab22844870386ebcâ4622901616763350162:Generic Estimates`,oe=$localize`:â13e9e69a8fb2a6de5f8552d2c23521deaee531d7â1857679815395246150:All GWP values are converted to this unit. You can change units in your User Profile, or by clicking on the Measurement Units button at top right.`,Ce=$localize`:âb78c0c9e5d2b5911c39fd6456f9fd9f9eecb75b1â2279252291819878959:Converted per Unit`,[[1,"main-header","stats-header"],["id","ms-p2-s2",1,"panel-body","all-readonly"],[1,"p-g"],[1,"p-g-12","p-md-6","p-lg-2"],["tooltip",t,"tooltipPosition","top","label",n,3,"value"],["tooltip",i,"tooltipPosition","top","label",s,3,"value"],["class","p-g-12 p-md-6 p-lg-2",4,"ngIf"],["tooltip",c,"tooltipPosition","top","label",_,3,"value"],["tooltip",M,"tooltipPosition","top","label",R,3,"value"],["tooltip",v,"tooltipPosition","top","label",x,3,"value"],["tooltip",H,"tooltipPosition","top","label",$,3,"value"],["tooltip",oe,"tooltipPosition","top","label",Ce,3,"value"]]},template:function(n,i){1&n&&(e.j41(0,"p-panel")(1,"p-header",0)(2,"span"),e.EFF(3),e.k0s()(),e.j41(4,"div",1)(5,"div",2)(6,"div",3),e.nrm(7,"cqd-statistics-input",4),e.k0s(),e.j41(8,"div",3),e.nrm(9,"cqd-statistics-input",5),e.k0s(),e.DNE(10,ii,2,1,"div",6),e.j41(11,"div",3),e.nrm(12,"cqd-statistics-input",7),e.k0s(),e.j41(13,"div",3),e.nrm(14,"cqd-statistics-input",8),e.k0s(),e.j41(15,"div",3),e.nrm(16,"cqd-statistics-input",9),e.k0s(),e.DNE(17,ai,2,1,"div",6),e.k0s()()()),2&n&&(e.R7$(3),e.JRh(i.header),e.R7$(4),e.Y8G("value",i.statistics.samples),e.R7$(2),e.Y8G("value",i.statistics.industryEpdsCount),e.R7$(),e.Y8G("ngIf",i.isShowGenericEstimate),e.R7$(2),e.Y8G("value",i.format(i.statistics.bestPractice)),e.R7$(2),e.Y8G("value",i.format(i.statistics.average)+" \xb1 "+i.formatGwpZ(i.statistics.gwpZ)),e.R7$(2),e.Y8G("value",i.format(i.statistics.conservativeEstimate)),e.R7$(),e.Y8G("ngIf",i.statistics.processedDeclaredUnit))},dependencies:[N.bT,Ae.Y9,ke.Z,ni],styles:['@media screen and (min-width: 64.063em){.p-lg-1-half[_ngcontent-%COMP%]{width:5.2083333333%}}@media print{.p-pr-dnone[_ngcontent-%COMP%]{display:none!important}.pr-d-contents[_ngcontent-%COMP%]{display:contents!important}.p-pr-1[_ngcontent-%COMP%]{width:8.3333%}.p-pr-2[_ngcontent-%COMP%]{width:16.6667%}.p-pr-3[_ngcontent-%COMP%]{width:25%}.p-pr-4[_ngcontent-%COMP%]{width:33.3333%}.p-pr-5[_ngcontent-%COMP%]{width:41.6667%}.p-pr-6[_ngcontent-%COMP%]{width:50%}.p-pr-7[_ngcontent-%COMP%]{width:58.3333%}.p-pr-8[_ngcontent-%COMP%]{width:66.6667%}.p-pr-9[_ngcontent-%COMP%]{width:75%}.p-pr-10[_ngcontent-%COMP%]{width:83.3333%}.p-pr-11[_ngcontent-%COMP%]{width:91.6667%}.p-pr-12[_ngcontent-%COMP%]{width:100%}.p-md-1[_ngcontent-%COMP%]{width:8.3333%}.p-md-2[_ngcontent-%COMP%]{width:16.6667%}.p-md-3[_ngcontent-%COMP%]{width:25%}.p-md-4[_ngcontent-%COMP%]{width:33.3333%}.p-md-5[_ngcontent-%COMP%]{width:41.6667%}.p-md-6[_ngcontent-%COMP%]{width:50%}.p-md-7[_ngcontent-%COMP%]{width:58.3333%}.p-md-8[_ngcontent-%COMP%]{width:66.6667%}.p-md-9[_ngcontent-%COMP%]{width:75%}.p-md-10[_ngcontent-%COMP%]{width:83.3333%}.p-md-11[_ngcontent-%COMP%]{width:91.6667%}.p-md-12[_ngcontent-%COMP%]{width:100%}.p-lg-1[_ngcontent-%COMP%]{width:8.3333%}
1.p-lg-2[_ngcontent-%COMP%]{width:16.6667%}.p-lg-3[_ngcontent-%COMP%]{width:25%}.p-lg-4[_ngcontent-%COMP%]{width:33.3333%}.p-lg-5[_ngcontent-%COMP%]{width:41.6667%}.p-lg-6[_ngcontent-%COMP%]{width:50%}.p-lg-7[_ngcontent-%COMP%]{width:58.3333%}.p-lg-8[_ngcontent-%COMP%]{width:66.6667%}.p-lg-9[_ngcontent-%COMP%]{width:75%}.p-lg-10[_ngcontent-%COMP%]{width:83.3333%}.p-lg-11[_ngcontent-%COMP%]{width:91.6667%}.p-lg-12[_ngcontent-%COMP%]{width:100%}}@media print,(min-width: 64.063em){.p-pr-1[_ngcontent-%COMP%]{padding:.5em;width:8.3333%}.p-pr-2[_ngcontent-%COMP%]{padding:.5em;width:16.6667%}.p-pr-3[_ngcontent-%COMP%]{padding:.5em;width:25%}.p-pr-4[_ngcontent-%COMP%]{padding:.5em;width:33.3333%}.p-pr-5[_ngcontent-%COMP%]{padding:.5em;width:41.6667%}.p-pr-6[_ngcontent-%COMP%]{padding:.5em;width:50%}.p-pr-7[_ngcontent-%COMP%]{padding:.5em;width:58.3333%}.p-pr-8[_ngcontent-%COMP%]{padding:.5em;width:66.6667%}.p-pr-9[_ngcontent-%COMP%]{padding:.5em;width:75%}.p-pr-10[_ngcontent-%COMP%]{padding:.5em;width:83.3333%}.p-pr-11[_ngcontent-%COMP%]{padding:.5em;width:91.6667%}.p-pr-12[_ngcontent-%COMP%]{padding:.5em;width:100%}.p-lg-1[_ngcontent-%COMP%]{padding:.5em;width:8.3333%}.p-lg-2[_ngcontent-%COMP%]{padding:.5em;width:16.6667%}.p-lg-3[_ngcontent-%COMP%]{padding:.5em;width:25%}.p-lg-4[_ngcontent-%COMP%]{padding:.5em;width:33.3333%}.p-lg-5[_ngcontent-%COMP%]{padding:.5em;width:41.6667%}.p-lg-6[_ngcontent-%COMP%]{padding:.5em;width:50%}.p-lg-7[_ngcontent-%COMP%]{padding:.5em;width:58.3333%}.p-lg-8[_ngcontent-%COMP%]{padding:.5em;width:66.6667%}.p-lg-9[_ngcontent-%COMP%]{padding:.5em;width:75%}.p-lg-10[_ngcontent-%COMP%]{padding:.5em;width:83.3333%}.p-lg-11[_ngcontent-%COMP%]{padding:.5em;width:91.6667%}.p-lg-12[_ngcontent-%COMP%]{padding:.5em;width:100%}}@media print,(min-width: 40.063em){.p-md-1[_ngcontent-%COMP%]{padding:.5em;width:8.3333%}.p-md-2[_ngcontent-%COMP%]{padding:.5em;width:16.6667%}.p-md-3[_ngcontent-%COMP%]{padding:.5em;width:25%}.p-md-4[_ngcontent-%COMP%]{padding:.5em;width:33.3333%}.p-md-5[_ngcontent-%COMP%]{padding:.5em;width:41.6667%}.p-md-6[_ngcontent-%COMP%]{padding:.5em;width:50%}.p-md-7[_ngcontent-%COMP%]{padding:.5em;width:58.3333%}.p-md-8[_ngcontent-%COMP%]{padding:.5em;width:66.6667%}.p-md-9[_ngcontent-%COMP%]{padding:.5em;width:75%}.p-md-10[_ngcontent-%COMP%]{padding:.5em;width:83.3333%}.p-md-11[_ngcontent-%COMP%]{padding:.5em;width:91.6667%}.p-md-12[_ngcontent-%COMP%]{padding:.5em;width:100%}}.p-g[_ngcontent-%COMP%], .p-g[_ngcontent-%COMP%]:after{box-sizing:border-box}.p-g[_ngcontent-%COMP%]:after{clear:both;content:"";display:table}.p-g[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.p-g-1[_ngcontent-%COMP%]{width:8.3333%;float:left;padding:.5rem}.col-offset-1[_ngcontent-%COMP%]{margin-left:8.3333%}.p-g-2[_ngcontent-%COMP%]{width:16.6667%;float:left;padding:.5rem}
1.col-offset-2[_ngcontent-%COMP%]{margin-left:16.6667%}.p-g-3[_ngcontent-%COMP%]{width:25%;float:left;padding:.5rem}.col-offset-3[_ngcontent-%COMP%]{margin-left:25%}.p-g-4[_ngcontent-%COMP%]{width:33.3333%;float:left;padding:.5rem}.col-offset-4[_ngcontent-%COMP%]{margin-left:33.3333%}.p-g-5[_ngcontent-%COMP%]{width:41.6667%;float:left;padding:.5rem}.col-offset-5[_ngcontent-%COMP%]{margin-left:41.6667%}.p-g-6[_ngcontent-%COMP%]{width:50%;float:left;padding:.5rem}.col-offset-6[_ngcontent-%COMP%]{margin-left:50%}.p-g-7[_ngcontent-%COMP%]{width:58.3333%;float:left;padding:.5rem}.col-offset-7[_ngcontent-%COMP%]{margin-left:58.3333%}.p-g-8[_ngcontent-%COMP%]{width:66.6667%;float:left;padding:.5rem}.col-offset-8[_ngcontent-%COMP%]{margin-left:66.6667%}.p-g-9[_ngcontent-%COMP%]{width:75%;float:left;padding:.5rem}.col-offset-9[_ngcontent-%COMP%]{margin-left:75%}.p-g-10[_ngcontent-%COMP%]{width:83.3333%;float:left;padding:.5rem}.col-offset-10[_ngcontent-%COMP%]{margin-left:83.3333%}.p-g-11[_ngcontent-%COMP%]{width:91.6667%;float:left;padding:.5rem}.col-offset-11[_ngcontent-%COMP%]{margin-left:91.6667%}.p-g-12[_ngcontent-%COMP%]{width:100%;float:left;padding:.5rem}.col-offset-12[_ngcontent-%COMP%]{margin-left:100%}@media (max-width: 40em){.p-sm-1[_ngcontent-%COMP%]{width:8.3333%;float:left;padding:.5rem}.p-sm-2[_ngcontent-%COMP%]{width:16.6667%;float:left;padding:.5rem}.p-sm-3[_ngcontent-%COMP%]{width:25%;float:left;padding:.5rem}.p-sm-4[_ngcontent-%COMP%]{width:33.3333%;float:left;padding:.5rem}.p-sm-5[_ngcontent-%COMP%]{width:41.6667%;float:left;padding:.5rem}.p-sm-6[_ngcontent-%COMP%]{width:50%;float:left;padding:.5rem}.p-sm-7[_ngcontent-%COMP%]{width:58.3333%;float:left;padding:.5rem}.p-sm-8[_ngcontent-%COMP%]{width:66.6667%;float:left;padding:.5rem}.p-sm-9[_ngcontent-%COMP%]{width:75%;float:left;padding:.5rem}.p-sm-10[_ngcontent-%COMP%]{width:83.3333%;float:left;padding:.5rem}.p-sm-11[_ngcontent-%COMP%]{width:91.6667%;float:left;padding:.5rem}.p-sm-12[_ngcontent-%COMP%]{width:100%;float:left;padding:.5rem}}@media (min-width: 40.063em){.p-md-1[_ngcontent-%COMP%]{width:8.3333%;float:left;padding:.5rem}.p-md-2[_ngcontent-%COMP%]{width:16.6667%;float:left;padding:.5rem}.p-md-3[_ngcontent-%COMP%]{width:25%;float:left;padding:.5rem}.p-md-4[_ngcontent-%COMP%]{width:33.3333%;float:left;padding:.5rem}.p-md-5[_ngcontent-%COMP%]{width:41.6667%;float:left;padding:.5rem}.p-md-6[_ngcontent-%COMP%]{width:50%;float:left;padding:.5rem}.p-md-7[_ngcontent-%COMP%]{width:58.3333%;float:left;padding:.5rem}.p-md-8[_ngcontent-%COMP%]{width:66.6667%;float:left;padding:.5rem}.p-md-9[_ngcontent-%COMP%]{width:75%;float:left;padding:.5rem}.p-md-10[_ngcontent-%COMP%]{width:83.3333%;float:left;padding:.5rem}.p-md-11[_ngcontent-%COMP%]{width:91.6667%;float:left;padding:.5rem}.p-md-12[_ngcontent-%COMP%]{width:100%;float:left;padding:.5rem}}@media (min-width: 64.063em){.p-lg-1[_ngcontent-%COMP%]{width:8.3333%;float:left;padding:.5rem}.p-lg-2[_ngcontent-%COMP%]{width:16.6667%;float:left;padding:.5rem}.p-lg-3[_ngcontent-%COMP%]{width:25%;float:left;padding:.5rem}.p-lg-4[_ngcontent-%COMP%]{width:33.3333%;float:left;padding:.5rem}.p-lg-5[_ngcontent-%COMP%]{width:41.6667%;float:left;padding:.5rem}.p-lg-6[_ngcontent-%COMP%]{width:50%;float:left;padding:.5rem}.p-lg-7[_ngcontent-%COMP%]{width:58.3333%;float:left;padding:.5rem}.p-lg-8[_ngcontent-%COMP%]{width:66.6667%;float:left;padding:.5rem}.p-lg-9[_ngcontent-%COMP%]{width:75%;float:left;padding:.5rem}.p-lg-10[_ngcontent-%COMP%]{width:83.3333%;float:left;padding:.5rem}.p-lg-11[_ngcontent-%COMP%]{width:91.6667%;float:left;padding:.5rem}.p-lg-12[_ngcontent-%COMP%]{width:100%;float:left;padding:.5rem}}.p-g-nopad[_ngcontent-%COMP%]{padding:0}.p-g-nopad-important[_ngcontent-%COMP%]{padding:0!important}[_nghost-%COMP%] .panel-body{padding-top:0;padding-bottom:0}[_nghost-%COMP%] .stats-header{padding-right:8px}[_nghost-%COMP%] .p-g{align-items:center;justify-content:space-between}@media (min-width: 64.063em){[_nghost-%COMP%] .p-g .p-lg-2{width:initial}}'],changeDetection:0})}}return a})();var oi=o(70152),ri=o(79065),Kt=(o(89120),o(61120));let Dt=(()=>{class a extends U{constructor(){super(),this.showCurrentDialog=new e.bkB,this.hideCurrentDialog=new e.bkB,this.unitTypes=te.Sy,this.materialFields=de.$T,this.routes=Kt.JZ,this.isEpdRangeHighlighterEnabledSignal=(0,e.EWP)(()=>this.configurationService.isEpdRangeHighlighterEnabled()),this.formattingService=(0,e.WQX)(qt.Rw),this.unitService=(0,e.WQX)(B.I),this.configurationService=(0,e.WQX)(Tt.s),this.unitSystem$=this.sessionService.unitSystemName$.pipe((0,m.T)(t=>B.I.getUnitSystem(t)))}formattedUncertaintyAdjustedGwpPerDeclared(t){const n=this.uncertaintyAdjustedGwpPerDeclared(t);return n?n.format(this.formattingService.format4r):""}uncertaintyAdjustedGwpPerDeclared(t){return W.S.getMaterialUncertaintyAdjustedGwpPerDeclaredUnit(t,this.declaredUnit?.convertedUnit.getBaseUnit())}gwpPerDeclared(t){return W.S.getMaterialRawGwpPerDeclaredUnit(t,this.declaredUnit?.convertedUnit.getBaseUnit())}formatConcreteStrength(t){if(t){const n=this.materialSearchFormService.getForm(),i=de.$T.concreteCompressiveStrength28d.name,s=de.$T.concreteCompressiveStrengthOther.name,c=n.get(s)?n.get(i).value:null,_=n.get(s)?n.get(s).value:null;return(c&&c instanceof le.O4?(0,E.of)(c.getUnitName()):_&&_ instanceof le.O4?(0,E.of)(_.getUnitName()):this.unitSystem$.pipe((0,m.T)(R=>R[te.Sy.pressure].defaultUnit))).pipe((0,u.s)(1),(0,m.T)(R=>t.formatTo(R)))}}formatUnitWithContext(t,n){if(t){const s=this.materialSearchFormService.getForm().get(n).value;return(s?(0,E.of)(s.getUnitName()):this.unitSystem$.pipe((0,m.T)(_=>_[t.getUnitType()].defaultUnit))).pipe((0,u.s)(1),(0,m.T)(_=>t.formatTo(_)))}}formatByType(t,n){if(t)return this.unitSystem$.pipe((0,u.s)(1),(0,m.T)(i=>i[n].defaultUnit),(0,m.T)(i=>t.formatTo(i)))}isGwpLessOrEqualsBaselineGwp(t){const n=this.baselineGwp?.per(this.declaredUnit.originalUnit,this.declaredUnit.convertedUnit);return t?.getNumericValue()<=n?.getNumericValue()}static{this.\u0275fac=function(n){return new(n||a)}}static{this.\u0275dir=e.FsC({type:a,inputs:{appendTo:"appendTo",declaredUnit:"declaredUnit",baselineGwp:"baselineGwp"},outputs:{showCurrentDialog:"showCurrentDialog",hideCurrentDialog:"hideCurrentDialog"},features:[e.Vt3]})}}return a})();var Ft=o(80989),Qt=(o(33929),o(97260)),Jt=o(96315);const li=["addEpdToProjectComponent"],ci=(a,l)=>({"matched-via-also-shown-in":a,"material-with-errors":l});function di(a,l){if(1&a){const t=e.RV6();e.qex(0),e.j41(1,"div",18)(2,"button",19),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.showDownloadModal())}),e.k0s()(),e.bVm()}}function pi(a,l){1&a&&(e.j41(0,"p",28),e.pXf(1,7),e.k0s())}function _i(a,l){1&a&&(e.j41(0,"th",35),e.pXf(1,8),e.k0s())}function hi(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-compare-button",39),e.bIt("clickEvent",function(){e.eBV(t);const i=e.XpG(6);return e.Njj(i.onCompareCategories())}),e.k0s()}if(2&a){const t=e.XpG(6);e.Y8G("tooltipPosition",t.tooltipPositions.top)("disabled",!(null!=t.materials&&t.materials.length)||t.isAllMaterialsCategory)}}function gi(a,l){if(1&a&&(e.qex(0),e.DNE(1,hi,1,2,"cqd-compare-button",38),e.nI1(2,"async"),e.bVm()),2&a){const t=e.XpG(5);e.R7$(),e.Y8G("ngIf",e.bMT(2,1,t.subcategoryOptions$).length>1)}}function mi(a,l){if(1&a&&(e.j41(0,"th",36),e.nrm(1,"cqd-select",37),e.nI1(2,"async"),e.nI1(3,"async"),e.DNE(4,gi,3,3,"ng-container",11),e.k0s()),2&a){const t=e.XpG(4);e.R7$(),e.Y8G("bindValue",null)("options",e.bMT(2,6,t.subcategoryOptions$))("clearable",!0)("multiple",!0)("disabled",1===e.bMT(3,8,t.subcategoryOptions$).length),e.R7$(3),e.Y8G("ngIf",!t.category.allowsAnyDeclaredUnit&&(null==t.materials?null:t.materials.length)>0)}}function ui(a,l){if(1&a&&(e.qex(0),e.nrm(1,"cqd-org-multiple-autocomplete",44),e.bVm()),2&a){const t=e.XpG(2).$implicit,n=e.XpG(4);e.R7$(),e.Y8G("label",t.filterBar.label)("inputId",t.filterBar.elementId)("disabled",t.filterBar.disabled)("maxSelectedItems",25)("allowCreateNew",!1)("reasonableChoiceFilter",n.manufacturerReasonableChoiceFilter)}}function Si(a,l){if(1&a&&(e.qex(0),e.nrm(1,"cqd-plant-or-group-multiple-autocomplete",45),e.bVm()),2&a){const t=e.XpG(2).$implicit,n=e.XpG(4);e.R7$(),e.Y8G("label",t.filterBar.label)("inputId",t.filterBar.elementId)("disabled",t.filterBar.disabled)("maxSelectedItems",25)("reasonableChoiceFilter",n.plantReasonableChoiceFilter)}}function fi(a,l){if(1&a&&(e.qex(0),e.j41(1,"div",46),e.nrm(2,"cqd-filter-select",47),e.k0s(),e.bVm()),2&a){const t=e.XpG(2).$implicit;e.R7$(),e.Y8G("pTooltip",t.tooltip),e.R7$(),e.Y8G("label",t.filterBar.label)("options",t.options)("multiple",!0)}}function Ci(a,l){if(1&a&&(e.qex(0),e.DNE(1,ui,2,6,"ng-container",11)(2,Si,2,5,"ng-container",11)(3,fi,3,4,"ng-container",11),e.bVm()),2&a){const t=e.XpG().$implicit;e.R7$(),e.Y8G("ngIf","orgName"===t.name),e.R7$(),e.Y8G("ngIf","plantOrGroupName"===t.name),e.R7$(),e.Y8G("ngIf","tvd"===t.name)}}function Ti(a,l){if(1&a){const t=e.RV6();e.qex(0),e.j41(1,"cqd-search-form-fields",48),e.bIt("searchTypeChange",function(i){e.eBV(t);const s=e.XpG(2).$implicit,c=e.XpG(4);return e.Njj(c.onSearchTypeChange(s.name,i))}),e.k0s(),e.bVm()}if(2&a){const t=e.XpG(2).$implicit,n=e.XpG(4);e.R7$(),e.HbH("filter-input-with-sort "+t.filterBar.className||0),e.Y8G("config",t)("disabled",t.filterBar.disabled)("searchType",n.getSearchType(t.name))("declaredUnit",n.declaredUnit)("isFilterBarControl",!0),e.BMQ("id",t.filterBar.elementId||null)}}function Mi(a,l){if(1&a&&(e.j41(0,"span",49),e.EFF(1),e.k0s()),2&a){const t=e.XpG(2).$implicit;e.Y8G("pSortableColumn",t.filterBar.sortable?t.filterBar.sortKey:null),e.R7$(),e.JRh(t.filterBar.label)}}function Ei(a,l){if(1&a&&e.DNE(0,Ti,2,8,"ng-container",41)(1,Mi,2,2,"ng-template",null,4,e.C5r),2&a){const t=e.sdS(2),n=e.XpG().$implicit;e.Y8G("ngIf",n.filterBar&&n.controlType)("ngIfElse",t)}}function bi(a,l){if(1&a&&e.nrm(0,"p-sortIcon",50),2&a){const t=e.XpG().$implicit;e.Y8G("pSortableColumn",t.filterBar.sortKey)("field",t.filterBar.sortKey)}}function Ai(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-compare-button",55),e.bIt("clickEvent",function(){e.eBV(t);const i=e.XpG(6);return e.Njj(i.onCompareByStrength())}),e.k0s()}if(2&a){const t=e.XpG(6);e.Y8G("tooltipPosition",t.tooltipPositions.top)("disabled",!(null!=t.materials&&t.materials.length)||t.isAllMaterialsCategory)}}function Pi(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-compare-button",56),e.bIt("clickEvent",function(){e.eBV(t);const i=e.XpG(6);return e.Njj(i.onCompareManufacturers())}),e.k0s()}if(2&a){const t=e.XpG(6);e.Y8G("tooltipPosition",t.tooltipPositions.top)("disabled",!(null!=t.materials&&t.materials.length)||t.isAllMaterialsCategory)}}function Ri(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-compare-button",57),e.bIt("clickEvent",function(){e.eBV(t);const i=e.XpG(6);return e.Njj(i.onComparePlants())}),e.k0s()}if(2&a){const t=e.XpG(6);e.Y8G("tooltipPosition",t.tooltipPositions.top)("disabled",!(null!=t.materials&&t.materials.length)||t.isAllMaterialsCategory)}}function yi(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-compare-button",58),e.bIt("clickEvent",function(){e.eBV(t);const i=e.XpG(6);return e.Njj(i.toggleCompareProducts())}),e.k0s()}if(2&a){const t=e.XpG(6);e.Y8G("tooltipPosition",t.tooltipPositions.top)("label",t.productC
1ompareLabel)("buttonStyleClass",t.getCompareProductStyleClasses())("disabled",!(null!=t.materials&&t.materials.length)||t.isAllMaterialsCategory||t.showPlantsMap)}}function Oi(a,l){if(1&a&&(e.qex(0),e.DNE(1,Ai,1,2,"cqd-compare-button",51)(2,Pi,1,2,"cqd-compare-button",52)(3,Ri,1,2,"cqd-compare-button",53)(4,yi,1,4,"cqd-compare-button",54),e.bVm()),2&a){const t=e.XpG().$implicit;e.R7$(),e.Y8G("ngIf","concreteCompressiveStrength28d"===t.name),e.R7$(),e.Y8G("ngIf","orgName"===t.name),e.R7$(),e.Y8G("ngIf","plantOrGroupName"===t.name),e.R7$(),e.Y8G("ngIf","name"===t.name)}}function vi(a,l){if(1&a&&(e.j41(0,"th",40),e.DNE(1,Ci,4,3,"ng-container",41)(2,Ei,3,2,"ng-template",null,3,e.C5r),e.j41(4,"div",42),e.DNE(5,bi,1,2,"p-sortIcon",43),e.k0s(),e.DNE(6,Oi,5,4,"ng-container",11),e.k0s()),2&a){const t=l.$implicit,n=e.sdS(3),i=e.XpG(4);e.HbH(t.name),e.R7$(),e.Y8G("ngIf",t.filterBar.isCustomElement)("ngIfElse",n),e.R7$(4),e.Y8G("ngIf",t.filterBar.sortable),e.R7$(),e.Y8G("ngIf",!i.category.allowsAnyDeclaredUnit&&(null==i.materials?null:i.materials.length)>0)}}function Ii(a,l){if(1&a&&(e.j41(0,"tr",29),e.DNE(1,_i,2,0,"th",30)(2,mi,5,10,"th",31)(3,vi,7,6,"th",32),e.j41(4,"th",33),e.nrm(5,"cqd-select",34),e.k0s()()),2&a){e.XpG();const t=e.sdS(6),n=e.sdS(8),i=e.XpG(2);e.R7$(),e.Y8G("ngIf",i.bidders),e.R7$(),e.Y8G("ngIf",i.category),e.R7$(),e.Y8G("ngForOf",i.selectedColumnsToShow),e.R7$(2),e.Y8G("clearable",!1)("bindValue",null)("formControl",i.tableColumnsControl)("options",i.limitedColumnsList)("customOptionTemplate",t)("customMultiLabelTemplate",n)("multiple",!0)}}function wi(a,l){if(1&a&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&a){const t=l.item;e.R7$(),e.JRh(t.filterBar.label)}}function xi(a,l){if(1&a){const t=e.RV6();e.j41(0,"div",60)(1,"span",61),e.EFF(2),e.k0s(),e.j41(3,"span",62),e.bIt("click",function(){const i=e.eBV(t).$implicit,s=e.XpG().clear;return e.Njj(s(i))}),e.EFF(4,"\xd7"),e.k0s()()}if(2&a){const t=l.$implicit;e.R7$(),e.Y8G("pTooltip",t.filterBar.label)("cqdHideTooltipIfTextFits",t.filterBar.label),e.R7$(),e.JRh(t.filterBar.label)}}function Di(a,l){1&a&&e.DNE(0,xi,5,3,"div",59),2&a&&e.Y8G("ngForOf",l.items)}function Fi(a,l){if(1&a&&e.pXf(0,9),2&a){const t=e.XpG().$implicit;e.uP7(t.openXpdUuid),e.nnv(0)}}function Gi(a,l){if(1&a){const t=e.RV6();e.DNE(0,Fi,1,1,"ng-template",null,5,e.C5r),e.j41(2,"tr",63),e.bIt("markAsSelected",function(){const i=e.eBV(t).$implicit,s=e.XpG(3);return e.Njj(s.markAsSelected.emit(i))})("markAsUnselected",function(){const i=e.eBV(t).$implicit,s=e.XpG(3);return e.Njj(s.markAsUnselected.emit(i))})("markAsAlternative",function(){const i=e.eBV(t).$implicit,s=e.XpG(3);return e.Njj(s.onMarkAsAlternative(i))})("biddersChanged",function(i){const s=e.eBV(t).$implicit,c=e.XpG(3);return e.Njj(c.onBiddersChanged(s,i))})("addToProject",function(){const i=e.eBV(t).$implicit,s=e.XpG(3);return e.Njj(s.onAddToProject(i))}),e.k0s()}if(2&a){const t=l.$implicit,n=l.expanded,i=e.sdS(1),s=e.XpG(3);e.R7$(2),e.Y8G("ngxTippy",t.qaStatus===s.QaStatuses.Error?i:null)("isSameDimensionality",s.isSameDimensionality(t))("pTooltip",s.isSameDimensionality(t)?null:"Cannot compare because these EPDs are reported in several incompatible units (e.g. volume and area)")("pSelectableRowDisabled",!s.selectMaterialEnabled||s.onlyAlternativeMaterialsCanSelect||!(null==s.bidders||!s.bidders.length)||!s.isMaterialWithConservative(t))("pSelectableRow",t)("ngClass",e.l_i(24,ci,t.isAlsoShownInMatched,t.qaStatus===s.QaStatuses.Error))("material",t)("isMaterialWithConservative",s.isMaterialWithConservative(t))("category",s.category)("bidIndex",s.bidIndex)("bidders",s.bidders)("columnsToShow",s.selectedColumnsToShow)("hasAddress",s.hasAddress)("selectMaterialEnabled",s.selectMaterialEnabled)("onlyAlternativeMaterialsCanSelect",s.onlyAlternativeMaterialsCanSelect)("declaredUnit",s.declaredUnit)("baselineGwp",s.baselineGwp)("selectedMaterial",s.selectedMaterial)("alternativeMaterials",s.alternativeMaterials)("maxMaterialsCount",s.maxMaterialsCount)("showCompareCheckboxes",s.showCompareCheckboxes)("materialsToCompareIdsControl",s.materialsToCompareIdsControl)("expanded",n)("enableAddToProject",!s.selectMaterialEnabled&&!s.bidders&&s.canUsePilotOrHigher)}}function Li(a,l){if(1&a&&(e.j41(0,"tr",64)(1,"td"),e.nrm(2,"cqd-material-details",65),e.k0s()()),2&a){const t=l.$implicit,n=e.XpG(3);e.R7$(),e.BMQ("colspan",n.selectedColumnsToShow.length+2),e.R7$(),e.Y8G("appendTo",n.appendTo)("category",n.c
1ategory)("target",n.target)("material",t)("statistics",n.statistics)("declaredUnit",n.declaredUnit)}}function Ni(a,l){if(1&a&&(e.j41(0,"tr")(1,"td")(2,"p",66),e.pXf(3,10),e.k0s()()()),2&a){const t=e.XpG(3);e.R7$(),e.BMQ("colspan",t.selectedColumnsToShow.length+2)}}function Bi(a,l){if(1&a){const t=e.RV6();e.j41(0,"div",20),e.DNE(1,pi,2,0,"p",21),e.j41(2,"div",22)(3,"p-table",23),e.bIt("onRowSelect",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.onRowSelect(i))})("onRowUnselect",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.onRowUnSelect())})("onLazyLoad",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.onLazyLoad(i))}),e.mxI("selectionChange",function(i){e.eBV(t);const s=e.XpG(2);return e.DH7(s.selectedMaterial,i)||(s.selectedMaterial=i),e.Njj(i)}),e.DNE(4,Ii,6,10,"ng-template",24)(5,wi,2,1,"ng-template",null,1,e.C5r)(7,Di,1,1,"ng-template",null,2,e.C5r)(9,Gi,3,27,"ng-template",25)(10,Li,3,7,"ng-template",26)(11,Ni,4,1,"ng-template",27),e.k0s()()()}if(2&a){const t=e.XpG(2);e.Y8G("formGroup",t.form),e.R7$(),e.Y8G("ngIf",t.isAllMaterialsCategory),e.R7$(2),e.Y8G("value",t.materials)("paginator",t.totalRecords>t.rows)("first",t.pageFirst)("rows",t.rows)("lazy",!0)("lazyLoadOnInit",!1)("loading",t.loading)("totalRecords",t.totalRecords)("rowExpandMode",!0)("dataKey","id")("resizableColumns",!0),e.R50("selection",t.selectedMaterial)}}function $i(a,l){if(1&a){const t=e.RV6();e.j41(0,"p-panel")(1,"p-header",14)(2,"div",15)(3,"span"),e.pXf(4,6),e.k0s(),e.j41(5,"cqd-search-bar",16),e.bIt("search",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onQuerySearch(i))})("clear",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onQuerySearchReset())}),e.k0s()(),e.DNE(6,di,3,0,"ng-container",11),e.k0s(),e.DNE(7,Bi,12,14,"div",17),e.k0s()}if(2&a){const t=e.XpG();e.R7$(5),e.Y8G("disabled",t.loading),e.R7$(),e.Y8G("ngIf",t.canUsePilotOrHigher&&(null==t.materials?null:t.materials.length)),e.R7$(),e.Y8G("ngIf",t.form)}}function ji(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-download-search-results-modal",67),e.bIt("hide",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.hideDownloadModal())})("downloadSearchResults",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onDownloadSearchResults(i))})("downloadFullSearchResults",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onDownloadFullSearchResults())})("downloadGSAReport",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onDownloadGSAReport())}),e.k0s()}if(2&a){const t=e.XpG();e.Y8G("display",t.showDownloadSearchResultModal)("showGSAReport",t.withBuilding)("appendTo",t.appendTo)}}var lt=function(a){return a.uaGwp="gwp",a.reportedGwp="reportedGwp",a}(lt||{});let Zt=(()=>{class a extends Dt{set searchFormValue(t){this._searchFormValue=t,this.populate3PVColumn(),this.gwpLciaMethod=t.lciaMethod}set columnsToShow(t){t&&(this._columnsToShow=this.sortColumns(this.addExtraColumnsTo(t)),this.hasAddress&&this.addGeodesicColumn(),this.mapForm(this.columnsToShow))}get columnsToShow(){return this._columnsToShow}set category(t){this.updateSubcategoryOptions(t),this.isAllMaterialsCategory=t.id===K.BM.allMaterials,this._category=t}get category(){return this._category}set showResults(t){this.showResultsSignal.set(t),t?this.initColumns(this.columnsToShow):this.resetFilteringParams()}constructor(t,n){super(),this.categoryService=t,this.permissionsService=n,this.lazyLoad=new e.bkB,this.showDetail
1s=new e.bkB,this.markAsSelected=new e.bkB,this.markAsUnselected=new e.bkB,this.markAsAlternative=new e.bkB,this.unSelectMaterial=new e.bkB,this.comparePlants=new e.bkB,this.compareManufacturers=new e.bkB,this.compareCategories=new e.bkB,this.compareProducts=new e.bkB,this.compareByStrength=new e.bkB,this.filteringParams=new e.bkB,this.materialsToCompareChanged=new e.bkB,this.downloadSearchResults=new e.bkB,this.downloadFullSearchResults=new e.bkB,this.downloadGSAReport=new e.bkB,this.hideCompareByProduct=new e.bkB,this.subcategoryOptionsSource=new L.t([]),this.subcategoryOptions$=this.subcategoryOptionsSource.asObservable(),this.isAllMaterialsCategory=!1,this.maxMaterialsCount=11,this.materialsToCompareIdsControl=new y.MJ,this.cachedMaterialsToCompare={},this.subcategoryControl=new y.MJ,this.querySearchControl=new y.MJ,this.tvdFilterControl=new y.MJ(fe.LS),this.tooltipPositions=ee.C_,this.showResultsSignal=(0,e.vPA)(!1),this.tableColumnsControl=new y.MJ([]),this.selectedColumnsToShow=[],this.limitedColumnsList=[],this.notPublicColumnsList=[],this.stickyColumnsList=[],this.QaStatuses=je.fR,this._columnsToShow=[],this.hiddenColumnsByDefault=new Set,this.stickyColumnNames=new Set,this.lastSortOrder=1,(0,Te.dX)(this.materialsToCompareIdsControl,null,this.destroy$).subscribe(i=>{i&&(i.forEach(s=>{this.cachedMaterialsToCompare[s]||(this.cachedMaterialsToCompare[s]=this.materials.find(c=>c.id===s))}),this.emitSelectedMaterialsChange())})}ngOnInit(){this.canUsePilotOrHigher=this.sessionService.getSecurityPrincipal()?.canUsePilotOrHigher(),this.subcategoryOptions$.pipe((0,h.Q)(this.destroy$),(0,P.M)(t=>{if(this.category.id===K.BM.allMaterials)this.manufacturerReasonableChoiceFilter=null,this.plantReasonableChoiceFilter=null;else{const n=t.length>1?[this.category.id,...t.map(i=>i.id)]:[this.category.id];this.manufacturerReasonableChoiceFilter={primaryActivityManufacturer:!0,categoryIds:n},this.plantReasonableChoiceFilter={categoryIds:n}}})).subscribe(),this.tableColumnsControl.valueChanges.pipe((0,h.Q)(this.destroy$)).subscribe(t=>{this.selectedColumnsToShow=this.sortColumns([...this.stickyColumnsList,...t]),this.actualizeFilters()}),this.checkCompatibility()}ngOnChanges({statistics:t,hasAddress:n}){t&&this.materialsToCompareIdsControl.reset(),n?.currentValue!==n?.previousValue&&n?.currentValue?this.addGeodesicColumn():n?.currentValue!==n?.previousValue&&!n?.currentValue&&this.removeGeodesicColumn()}get productCompareLabel(){return this.showCompareCheckboxes?$localize`Back`:$localize`Compare`}sortColumns(t){return t.sort((n,i)=>n.filterBar.order-i.filterBar.order)}actualizeFilters(){const t=new Set(this.limitedColumnsList.map(s=>({name:s.name,sortKey:s.filterBar.sortKey}))),n=new Set(this.selectedColumnsToShow.map(s=>({name:s.name,sortKey:s.filterBar.sortKey})));(0,Qt.D1)(t,n,(s,c)=>![...c].find(_=>_.name===s.name)).forEach(s=>{s.sortKey&&this.lastSortField===s.sortKey&&(this.resetOrderingParams(),this.forceMaterialFiltering=!0);const c=this.filterFormFieldMapper.get(s.name)||s.name,_=this.form.get(c);_&&_.reset()})}addExtraColumnsTo(t){const n=de.$T.reportedGwp;return t.some(i=>i.name===n.name)?t:[...t,n]}isMaterialWithConservative(t){return!!t.conservativeEstimate}isSameDimensionality(t){return(0,Z.M)(t.declaredUnit,this.statistics?.processedDeclaredUnit.originalUnit)}showDownloadModal(){this.hideCurrentDialog.emit(),this.showDownloadSearchResultModal=!0}hideDownloadModal(){this.showDownloadSearchResultModal=!1,this.showCurrentDialog.emit()}onDownloadSearchResults(t){this.downloadSearchResults.emit(t)}onDownloadFullSearchResults(){this.downloadFullSearchResults.emit()}onDownloadGSAReport(){this.downloadGSAReport.emit()}onMarkAsAlternative(t){this.markAsAlternative.emit(t)}onBiddersChanged(t,n){t.bidderIndexes=n,this.markAsAlternative.emit(t)}onAddToProject(t){this.materialToAdd=t,this.addEpdToProjectComponent.addToProjectModalShow()}getSearchType(t){return this.getControlSearchType(t)}onLazyLoad(t){const n=new Set(this.limitedColumnsList.map(c=>c.filterBar.sortKey)),i=new Set(this.selectedColumnsToShow.map(c=>c.filterBar.sortKey));(0,Qt._i)(n,i).has(t.sortField)&&(t.sortField=null,t.sortOrder=1),this.lastSortField=t.sortField,this.lastSortOrder=t.sortOrder,this.lazyLoad.emit(t)}onQuerySearch(t){this.querySearchControl.setValue(t)}onQuerySearchReset(){this.querySearchControl.setValue(null)}onSearchTypeChange(t,n){this.setControlSearchType(t,n),this.prevFormHash=ot.$.calculateHash(JSON.stringify(this.form.value)),this.filteringParams.emit({formValue:this.form.value,searchTypes:this.formSearchTypes,sortFiled:this.lastSortField,sortOrder:this.lastSortOrder})}onRowSelect(t){this.checkCompatibility(),this.markAsSelected.emit(t.data)}onRowUnSelect(){this.resetSelectedMaterial()}resetSelectedMaterial(){this.unSelectMaterial.emit(this.selectedMaterial)}onCompareByStrength(){this.compareByStrength.emit()}onCompareManufacturers(){this.compareManufacturers.emit()}onComparePlants(){this.comparePlants.emit()}onCompareCategories(){this.compareCategories.emit()}toggleCompareProducts(){this.showCompareCheckboxes?(this.showCompareCheckboxes=!1,this.materialsToCompareIdsControl.setValue([]),this.hideCompareByProduct.emit()):(this.showCompareCheckboxes=!0,this.compareProducts.emit(this.getMaterialsToCompareModels()))}getCompareProductStyleClasses(){return"button button-small "+(this.showCompareCheckboxes?"button--light-blue":"button--tertiary")}populate3PVColumn(){const t=[];this._searchFormValue.epdTypes.includes(fe.VD.productEpds)&&t.push(fe.VD.productEpds),this._searchFormValue.epdTypes.includes(fe.VD.trustedVendorDeclarations)&&t.push(fe.VD.trustedVendorDeclarations),this.form?.controls.tvd.setValue(t,{emitEvent:!1})}checkCompatibility(){this.hasWrongSelectedMaterial=!this.categoryService.isMaterialCompatible(this.selectedMaterial,this.category),this.hasWrongSelectedMaterialTooltip=this.hasWrongSelectedMaterial?`${this.selectedMaterial.category.displayName} is not compatible with ${this.category.displayName}`:""}emitSelectedMaterialsChange(){this.materialsToCompareChanged.emit(this.getMaterialsToCompareModels())}getMaterialsToCompareModels(){return this.materialsToCompareIdsControl.value?.map(t=>this.cachedMaterialsToCompare[t])||[]}updateSubcategoryOptions(t){const n=new ri.Q({...t}),i=this.categoryService.flatSubcategories([...t.subcategories]);i&&i.length>0?this.permissionsService.isAdmin()?this.subcategoryOptionsSource.next(this.categoryService.sortCategories(i)):(n.subcategories=i,this.filterEmptyCategories(n)):this.subcategoryOptionsSource.next([t])}
1addGeodesicColumn(){const t=de.$T.plantDistance;this.columnsToShow.some(n=>n.name===t.name)||(this.columnsToShow=[...this.columnsToShow,t])}removeGeodesicColumn(){const t=de.$T.plantDistance;this.columnsToShow.some(n=>n.name===t.name)&&(this.columnsToShow=this.columnsToShow.filter(n=>n.name!==t.name))}addTVDColumn(t){const n=de.$T.tvd;return t.find(i=>i.name===n.name)||t.push(n),t}filterEmptyCategories(t){this.categoryService.getCategoriesWithEpdsCountDict().pipe((0,u.s)(1),(0,P.M)(n=>{const i=t.subcategories.filter(s=>!!n[s.id]&&n[s.id].materialsCount+n[s.id].industryEpdsCount>0);(0,q.I)(i)?this.subcategoryOptionsSource.next([t]):this.subcategoryOptionsSource.next(this.categoryService.sortCategories(i))})).subscribe()}mapForm(t){this.filteringParamsChangesSubscription&&this.filteringParamsChangesSubscription.unsubscribe(),this.form=new y.gE({q:this.querySearchControl,subcategory:this.subcategoryControl,manufacturers:new y.MJ,plantsOrGroups:new y.MJ,tvd:this.tvdFilterControl}),this.filterFormFieldMapper=new Map([["orgName","manufacturers"],["plantOrGroupName","plantsOrGroups"]]);const n=this.materialSearchFormService.getDynamicFormControls();t.forEach(i=>{const s=n[i.name];s&&!this.filterFormFieldMapper.has(i.name)&&this.form.addControl(i.name,s)}),this.subscribeToFilteringParams()}subscribeToFilteringParams(){this.prevFormHash=ot.$.calculateHash(JSON.stringify(this.form.value)),this.filteringParamsChangesSubscription=this.form.valueChanges.pipe((0,oi.B)(500),(0,ge.p)(t=>(this.currFormHash=ot.$.calculateHash(JSON.stringify(t)),this.form.valid&&this.currFormHash!==this.prevFormHash)),(0,P.M)(()=>this.prevFormHash=this.currFormHash),(0,ge.p)(()=>this.showResultsSignal()||this.forceMaterialFiltering),(0,P.M)(()=>this.forceMaterialFiltering=!1),(0,P.M)(t=>this.filteringParams.emit({formValue:t,searchTypes:this.formSearchTypes,sortFiled:this.lastSortField,sortOrder:this.lastSortOrder})),(0,h.Q)(this.destroy$)).subscribe()}resetFilteringParams(){this.resetOrderingParams(),this.form.reset(),this.populate3PVColumn()}resetOrderingParams(){this.lastSortField=null,this.lastSortOrder=1}initColumns(t){let n=t;this.configurationService.isTVDEnabledInCategoryAndConfiguration(this.category.mayContainTrustedVendorDeclarations)&&(n=this.addTVDColumn(t)),this.setGwpColumn(),this.stickyColumnsList=n.filter(s=>this.stickyColumnNames.has(s.name)),this.limitedColumnsList=n.filter(s=>!this.stickyColumnNames.has(s.name));const i=this.limitedColumnsList.filter(s=>!this.hiddenColumnsByDefault.has(s.name));this.selectedColumnsToShow=this.sortColumns([...this.stickyColumnsList,...i]),this.tableColumnsControl.setValue(i)}setGwpColumn(){const t=this.switchGwpColumn?lt.reportedGwp:lt.uaGwp;this.stickyColumnNames.clear(),this.stickyColumnNames.add("name"),this.stickyColumnNames.add(t);const n=this.switchGwpColumn?lt.uaGwp:lt.reportedGwp;this.hiddenColumnsByDefault.clear(),this.hiddenColumnsByDefault.add(n)}static{this.\u0275fac=function(n){return new(n||a)(e.rXU(G.M),e.rXU(Ft.K))}}static{this.\u0275cmp=e.VBU({type:a,selectors:[["cqd-material-search-results-table"]],viewQuery:function(n,i){if(1&n&&e.GBs(li,5),2&n){let s;e.mGM(s=e.lsd())&&(i.addEpdToProjectComponent=s.first)}},inputs:{selectedMaterial:"selectedMaterial",selectMaterialEnabled:"selectMaterialEnabled",onlyAlternativeMaterialsCanSelect:"onlyAlternativeMaterialsCanSelect",alternativeMaterials:"alternativeMaterials",element:"element",bidIndex:"bidIndex",bidders:"bidders",searchFormValue:"searchFormValue",columnsToShow:"columnsToShow",switchGwpColumn:"switchGwpColumn",category:"category",loading:"loading",rows:"rows",statistics:"statistics",mfPrettyString:"mfPrettyString",totalRecords:"totalRecords",pageFirst:"pageFirst",withBuilding:"withBuilding",hasAddress:"hasAddress",target:"target",materials:"materials",showResults:"showResults",showCompareCheckboxes:"showCompareCheckboxes",showPlantsMap:"showPlantsMap"},outputs:{lazyLoad:"lazyLoad",showDetails:"showDetails",markAsSelected:"markAsSelected",markAsUnselected:"markAsUnselected",markAsAlternative:"markAsAlternative",unSelectMaterial:"unSelectMaterial",comparePlants:"comparePlants",compareManufacturers:"compareManufacturers",compareCategories:"compareCategories",compareProducts:"compareProducts",compareByStrength:"compareByStrength",filteringParams:"filteringParams",materialsToCompareChanged:"materialsToCompareChanged",downloadSearchResults:"downloadSearchResults",downloadFullSearchResults:"downloadFullSearchResults",downloadGSAReport:"downloadGSAReport",hideCompareByProduct:"hideCompareByProduct"},features:[e.Vt3,e.OA$],decls:4,vars:6,consts:()=>{let t,n,i,s,c,_,M,R,v,x,H,$,oe,Ce,ae,Oe;return t=$localize`:âd22907eac1ffd97447de08cc1bb5bddb753edcc0â7192184640917058543:Use this field to filter by document ID, EC3 ID, or any other text that you think may appear in the EPD you want to find.`,n=$localize`:â9979372b726fafbb46202063b579178c283cc3edâ7290779776038352426:Product EPDs`,i=$localize`:âdc75033a5238fdc4f462212c847a45ba8018a3fdâ3099741642167775297:Download`,s=$localize`:âb05f5a30261a62e882211de84d7b2f82648ec9c0â7225336477562472593:
1Download this search result as a spreadsheet. Up to 200 EPDs can be returned at a time.`,c=$localize`:â3fa2fe51b12977edbdf794ad7906bdf84f109d68â1084163283848759672: Comparisons are not available for "All Materials" category `,_=$localize`:âb169576ab898458aa823e09c1e7f3397f8f011a0â843548054527451651:Columns`,M=$localize`:â3a06bd9c8fa001e38d4857f5774bb943f1d0c949â1770610461310749078:Bidders`,R=$localize`:â1367577bb1a9e780683bca5bc2c4588690991bd5â8950076974301590939:Subcategory`,v=$localize`:âecdea3aff8867194a1e7be62e61009ff91b73c3câ4486372435583028094:Compare by Category`,x=$localize`:âf117d141f29517c5368c642364008f3864ff634dâ8125916251062332638:Materials plot by Compressive Strength`,H=$localize`:âa71074e24fff35f8dfaf4eaf440d3bd2ab207fc0â6872759676497378673:Plot`,$=$localize`:â73bf1af52e9095bdd9d3cf4d04d6288cf6c1183aâ3776126226853922585:Comparison chart shows the overall results from the search in the first column, followed by sub-results from up to seven manufacturers' products that matched the search, ordered by the number of valid EPDs. If more than seven manufacturers were found, then the rightmost column aggregates them all. To get more specific data, try narrowing your search parameters e.g. by selecting only certain manufacturers.`,oe=$localize`:â83697c4635f7b8c38cba789cb7ff5837534846c1â8879575230657382369:Compare by Plant or Plant Groups`,Ce=$localize`:âd56584c27de64e94c14868e31dbfcb902c10322bâ6416650233145906632:Compare Products`,ae=$localize`:â7a39ce85ad62bd14620f37fa06422087bb1c97dfâ1406671121953150511: The selected EPD (${"\ufffd0\ufffd"}:INTERPOLATION:) is no longer valid, due to failing EC3 quality checks. To clear this error, de-select this EPD or contact the EPD program operator to have the correct data entered. `,Oe=$localize`:â52b1e429a6fb77397d3d1944992f7c32d6f0504câ8430816677357950196: No EPDs foun
1d. To find more materials, try loosening search parameters. Many performance parameters are not reported consistently in EPDs by all manufacturers, and so may not be fully searchable in EC3. Also, note that geographic searches are based on location of manufacture, rather than where the product may be available. `,[["addEpdToProjectComponent",""],["customOptionTemplate",""],["customMultiLabelTemplate",""],["defaultControlTemplate",""],["labelTemplate",""],["materialWithErrorTooltip",""],n,c,M,ae,Oe,[4,"ngIf"],[3,"display","showGSAReport","appendTo","hide","downloadSearchResults","downloadFullSearchResults","downloadGSAReport",4,"ngIf"],[3,"epd","statistics","mfPrettyString","gwpLciaMethod"],[1,"stats-header","main-header"],[1,"left"],["tooltip",t,3,"search","clear","disabled"],["class","container-overflow",3,"formGroup",4,"ngIf"],[1,"right"],["pButton","","label",i,"pTooltip",s,"tooltipPosition","top",1,"button","button-small","button--light-blue",3,"click"],[1,"container-overflow",3,"formGroup"],["class","all-materials-unavailable",4,"ngIf"],[1,"table","with-filter-inputs"],["id","search-results-table","cqdShowResponsiveTableHead","","selectionMode","single",3,"onRowSelect","onRowUnselect","onLazyLoad","selectionChange","value","paginator","first","rows","lazy","lazyLoadOnInit","loading","totalRecords","rowExpandMode","dataKey","resizableColumns","selection"],["pTemplate","header"],["pTemplate","body"],["pTemplate","rowexpansion"],["pTemplate","emptymessage"],[1,"all-materials-unavailable"],["id","ms-p1-s9"],["class","bidders-column",4,"ngIf"],["pResizableColumn","",4,"ngIf"],["id","ms-p2-s3","pResizableColumn","",3,"class",4,"ngFor","ngForOf"],[1,"actions"],["id","columns-select","label",_,"inputId","columns","dropdownId","columns-select-dropdown","appendTo","cqd-material-search-results-table p-panel .p-panel-content",1,"field-input-no-sort",3,"clearable","bindValue","formControl","options","customOptionTemplate","customMultiLabelTemplate","multiple"],[1,"bidders-column"],["pResizableColumn",""],["label",R,"bindLabel","displayName","formControlName","subcategory","appendTo","cqd-material-search-results-table p-panel .p-panel-content",1,"filter-input-with-sort","multi-line",3,"bindValue","options","clearable","multiple","disabled"],["class","p-pr-dnone","tooltip",v,3,"tooltipPosition","disabled","clickEvent",4,"ngIf"],["tooltip",v,1,"p-pr-dnone",3,"clickEvent","tooltipPosition","disabled"],["id","ms-p2-s3","pResizableColumn",""],[4,"ngIf","ngIfElse"],[1,"sort-button-container"],[3,"pSortableColumn","field",4,"ngIf"],["formControlName","manufacturers","appendTo","cqd-material-search-results-table p-panel .p-panel-content",1,"filter-input-with-sort","multi-line",3,"label","inputId","disabled","maxSelectedItems","allowCreateNew","reasonableChoiceFilter"],["formControlName","plantsOrGroups","appendTo","cqd-material-search-results-table p-panel .p-panel-content",1,"filter-input-with-sort","multi-line",3,"label","inputId","disabled","maxSelectedItems","reasonableChoiceFilter"],["tooltipPosition","top",1,"filter-input-with-sort",3,"pTooltip"],["id","tvd-select","formControlName","tvd",1,"filter-input-with-sort",3,"label","options","multiple"],["dropdownAppendTo","cqd-material-search-results-table p-panel .p-panel-content",3,"searchTypeChange","config","disabled","searchType","declaredUnit","isFilterBarControl"],[3,"pSortableColumn"],[3,"pSortableColumn","field"],["class","p-pr-dnone plot-button","tooltip",x,"label",H,"iconUrl","assets/icons/compare-plot.png",3,"tooltipPosition","disabled","clickEvent",4,"ngIf"],["id","ms-p2-s4","class","p-pr-dnone","tooltip",$,"tooltipStyleClass","wide",3,"tooltipPosition","disabled","clickEvent",4,"ngIf"],["class","p-pr-dnone","tooltip",oe,3,"tooltipPosition","disabled","clickEvent",4,"ngIf"],["class","p-pr-dnone","tooltip",Ce,3,"tooltipPosition","label","buttonStyleClass","disabled","clickEvent",4,"ngIf"],["tooltip",x,"label",H,"iconUrl","assets/icons/compare-plot.png",1,"p-pr-dnone","plot-button",3,"clickEvent","tooltipPosition","disabled"],["id","ms-p2-s4","tooltip",$,"tooltipStyleClass","wide",1,"p-pr-dnone",3,"clickEvent","tooltipPosition","disabled"],["tooltip",oe,1,"p-pr-dnone",3,"clickEvent","tooltipPosition","disabled"],["tooltip",Ce,1,"p-pr-dnone",3,"clickEvent","tooltipPosition","label","buttonStyleClass","disabled"],["class","ng-value custom-multi-label",4,"ngFor","ngForOf"],[1,"ng-value","custom-multi-label"],["tooltipPosition","top","tooltipStyleClass","desc-tooltip",1,"ng-value-label",3,"pTooltip","cqdHideTooltipIfTextFits"],["aria-hidden","true",1,"ng-value-icon","right",3,"click"],["tooltipPosition","bottom","cqd-material-row","",1,"ms-p2-s6",3,"markAsSelected","markAsUnselected","markAsAlternative","biddersChanged","addToProject","ngxTippy","isSameDimensionality","pTooltip","pSelectableRowDisabled","pSelectableRow","ngClass","material","isMaterialWithConservative","category","bidIndex","bidders","columnsToShow","hasAddress","selectMaterialEnabled","onlyAlternativeMaterialsCanSelect","declaredUnit","baselineGwp","selectedMaterial","alternativeMaterials","maxMaterialsCount","showCompareCheckboxes","materialsToCompareIdsControl","expanded","enableAddToProject"],[1,"row-expand"],[3,"appendTo","category","target","material","statistics","declaredUnit"],[1,"no-results"],[3,"hide","downloadSearchResults","downloadFullSearchResults","downloadGSAReport","display","showGSAReport","appendTo"]]},template:function(n,i){1&n&&(e.DNE(0,$i,8,3,"p-panel",11)(1,ji,1,3,"cqd-download-search-results-modal",12),e.nrm(2,"cqd-add-epd-to-project",13,0)),2&n&&(e.Y8G("ngIf",i.showResultsSignal()),e.R7$(),e.Y8G("ngIf",i.showDownloadSearchResultModal),e.R7$(),e.Y8G("epd",i.materialToAdd)("statistics",i.statistics)("mfPrettyString",i.mfPrettyString)("gwpLciaMethod",i.gwpLciaMethod))},styles:[".table-with-filter-inputs[_ngcontent-%COMP%]{overflow:visible}.stats-header[_ngcontent-%COMP%] {display:flex;align-items:center}.stats-header[_ngcontent-%COMP%] .search-bar-wrapper{margin:0 0 0 15px}.stats-header[_ngcontent-%COMP%] .left{display:flex;align-items:center;flex:1}.table[_ngcontent-%COMP%] {overflow:visible;border-top:2px solid #ffffff}.table[_ngcontent-%COMP%] .p-datatable{min-width:unset!important}.table[_ngcontent-%COMP%] .p-datatable .p-datatable-loading-overlay.p-component-overlay{z-index:2}.table[_ngcontent-%COMP%] .p-datatable-resizable .p-datatable-thead>tr>th{overflow:visible}.table[_ngcontent-%COMP%] table{table-layout:fixed}.table[_ngcontent-%COMP%] table thead th{white-space:normal}.table[_ngcontent-%COMP%] table thead th.tvd{width:64px}.table[_ngcontent-%COMP%] table thead cqd-select .ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:nowrap!important}.table[_ngcontent-%COMP%] table thead .multi-line ng-select.ng-select.ng-select-multiple .ng-select-container{height:auto!important}.table[_ngcontent-%COMP%] table thead .multi-line ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap!important;padding:0}.table[_ngcontent-%COMP%] table thead .multi-line ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{padding:0;min-width:100%}.table[_ngcontent-%COMP%] table thead .multi-line ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{margin-bottom:2px;margin-top:2px;max-width:100%}.table[_ngcontent-%COMP%] table thead .multi-line .ng-dropdown-panel{text-align:left;min-width:250px}.table[_ngcontent-%COMP%] table thead #columns-select .ng-dropdown-panel{width:250px;left:auto;right:0}.table[_ngcontent-%COMP%] table thead #columns-select .ng-dropdown-panel .ng-dropdown-panel-items{max-height:350px}.table[_ngcontent-%COMP%] table thead #tvd-select{margin-right:8px}.table[_ngcontent-%COMP%] table thead #tvd-select .filter-wrapper{flex-direction:column;align-items:flex-start}.table[_ngcontent-%COMP%] table .compare-chkbox{position:relative;top:-3px}.table[_ngcontent-%COMP%] .p-datatable-wrapper{overflow:visible}.table[_ngcontent-%COMP%] p-checkbox{margin-right:0}.table[_ngcontent-%COMP%] .error-message{position:absolute;z-index:10;width:170px;border:1px solid #c94747;padding:2px 5px;background:#fff;border-radius:5px;top:-30px;bottom:initial;left:95%}.concrete-details-panel[_ngcontent-%COMP%]{position:fixed;top:65px;right:0;bottom:0;background:#f2f3f5;overflow-y:auto;overflow-x:hidden;box-shadow:0 0 5px #6c758329,0 0 18px #b2b9c54d,0 1px #dcdee033,0 1px #d4d5d633;width:100%;max-width:400px;padding:10px 0;transform:translate(110%);transition:transform .3s ease-in-out}.concrete-details-panel.opened[_ngcontent-%COMP%]{transform:translate(0)}.concrete-details-panel[_ngcontent-%COMP%] .close-panel[_ngcontent-%COMP%]{width:30px;height:30px;border-radius:2px;padding:0;background:#d1d1d14d url(hide-sidebar.4c63f07052256706.svg) center no-repeat!important;
1transform:scaleX(-1);transition:opacity .3s ease-in-out;position:absolute;top:10px;right:10px}.declared-unit-header[_ngcontent-%COMP%]{font-size:10px} .selected-material{margin:0} .selected-material .p-fieldset-legend-text{padding:.5em 1em} .selected-material.hasErrors p-fieldset fieldset{background-color:#b847474d} .selected-material.hasErrors p-fieldset fieldset .warning{font-weight:600;margin-bottom:1rem;color:#ca0000} .selected-material.hasErrors p-fieldset fieldset legend{background-color:#ead6d6} .selected-material .p-fieldset-content{margin-right:70px} .selected-material .open-selected-material{position:absolute;right:40px;top:45%;margin:0 10px} .selected-material .panel-body{background:#f2f3f5} .selected-title{font-weight:600;margin-right:10px}.industry-average[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{opacity:.7}tr[_ngcontent-%COMP%]{outline:none}tr[_ngcontent-%COMP%]:nth-child(2n){background:#e6e6e659}tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:10px 5px 5px!important;text-align:center}tr[_ngcontent-%COMP%] th.actions[_ngcontent-%COMP%]{width:160px}tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%] cqd-compare-button[_ngcontent-%COMP%] .button{margin-top:5px}tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%] cqd-select[_ngcontent-%COMP%]{text-align:left}p-fieldset[_ngcontent-%COMP%] legend{background-color:#bfd2dc;font-weight:700}p-fieldset[_ngcontent-%COMP%] fieldset{background-color:#47afb84d}p-fieldset[_ngcontent-%COMP%] .p-fieldset-legend-text{color:#000}.no-results[_ngcontent-%COMP%]{text-align:center;white-space:normal}.panel-body[_ngcontent-%COMP%]{position:relative}.reset-selected-material[_ngcontent-%COMP%]{position:absolute;right:27px;top:25px;cursor:pointer}.all-materials-unavailable[_ngcontent-%COMP%]{font-weight:500;font-style:italic;color:#c94747}.matched-via-also-shown-in[_ngcontent-%COMP%]{background-color:#e6e6e6b3}.matched-via-also-shown-in[_ngcontent-%COMP%]:nth-child(2n){background-color:#e6e6e6}.plot-button[_ngcontent-%COMP%] img{margin-top:2px}.bidders-column[_ngcontent-%COMP%]{width:140px}.material-with-errors[_ngcontent-%COMP%]{border:2px solid var(--danger)} cqd-material-search-results-table .p-panel-content{position:relative}"],changeDetection:0})}}return a})();var ki=o(17001),Gt=o(11906);let en=(()=>{class a{constructor(){this.lazyLoad=new e.bkB,this.routes=Kt.JZ,this.parseGeography=Gt.gc,this.QaStatuses=je.fR,this.labels=z.W,this.configurationService=(0,e.WQX)(Tt.s),this.isEpdRangeHighlighterEnabledSignal=(0,e.EWP)(()=>this.configurationService.isEpdRangeHighlighterEnabled())}isWrongDimensionality(t){return!(0,Z.M)(t.convertedUnit,this.statisticUnit)}format(t,n){if(!t||!n)return"0";if((0,Z.M)(n.convertedUnit,this.statisticUnit)){const i=this.statisticUnit.getNumericRatio(n.convertedUnit);return t.multiply(n.convertedUnit.getNumericRatio(n.originalUnit)*i).format()}return null}onLazyLoad(t){this.lazyLoad.emit(t)}isGwpLessOrEqualsBaselineGwp(t,n){const i=this.baselineGwp?.per(n.convertedUnit,this.statisticUnit);return t?.per(n.convertedUnit,this.statisticUnit)?.getNumericValue()<=i?.getNumericValue()}static{this.\u0275fac=function(n){return new(n||a)}}static{this.\u0275dir=e.FsC({type:a,inputs:{loading:"loading",collapsed:"collapsed",statisticUnit:"statisticUnit",selectMaterialEnabled:"selectMaterialEnabled",baselineGwp:"baselineGwp",totalCount:"totalCount",rowsCount:"rowsCount",pageFirst:"pageFirst"},outputs:{lazyLoad:"lazyLoad"}})}}return a})();var Ue=o(97381),Ui=o(71895),tn=o(71337),nt=o(44368),nn=o(65571),Et=o(35018),Hi=o(63481),Lt=o(97014);const Vi=a=>({"search-page":a}),Xi=(a,l,t)=>({broken:a,"wrong-dimensionality":l,"epd-with-errors":t}),Yi=a=>({highlighted:a});function zi(a,l){if(1&a){const t=e.RV6();e.j41(0,"mat-button-toggle-group",19),e.bIt("valueChange",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.industryView=i)}),e.j41(1,"mat-button-toggle",20),e.EFF(2),e.k0s(),e.j41(3,"mat-button-toggle",20),e.EFF(4),e.k0s()()}if(2&a){const t=e.XpG();e.Y8G("value",t.industryView),e.R7$(),e.Y8G("value",t.industryViewType.impacts),e.R7$(),e.JRh(t.industryViewType.impacts),e.R7$(),e.Y8G("value",t.industryViewType.participants),e.R7$(),e.JRh(t.industryViewType.participants)}}function Wi(a,l){1&a&&e.nrm(0,"div",21)}function qi(a,l){1&a&&(e.qex(0),e.j41(1,"th",30),e.pXf(2,6),e.k0s(),e.j41(3,"th",31),e.pXf(4,7),e.k0s(),e.j41(5,"th",32),e.pXf(6,8),e.k0s(),e.bVm())}function Ki(a,l){1&a&&(e.qex(0),e.j41(1,"th",33),e.pXf(2,9),e.k0s(),e.bVm())}function Qi(a,l){if(1&a&&(e.j41(0,"tr")(1,"th",25),e.pXf(2,3),e.k0s(),e.j41(3,"th",26),e.pXf(4,4),e.k0s(),e.j41(5,"th",27),e.pXf(6,5),e.k0s(),e.DNE(7,qi,7,0,"ng-container",28)(8,Ki,3,0,"ng-container",28),e.nrm(9,"th",29),e.k0s()),2&a){const t=e.XpG(2);e.R7$(7),e.Y8G("ngIf",t.industryView===t.industryViewType.impacts),e.R7$(),e.Y8G("ngIf",t.industryView===t.industryViewType.participants),e.R7$(),e.Y8G("ngClass",e.eq3(3,Vi,!t.selectMaterialEnabled))}}function Ji(a,l){if(1&a&&e.pXf(0,12),2&a){const t=e.XpG().$implicit;
1e.uP7(t.openXpdUuid),e.nnv(0)}}function Zi(a,l){if(1&a&&(e.qex(0),e.j41(1,"td",41),e.EFF(2),e.k0s(),e.j41(3,"td",41),e.EFF(4),e.k0s(),e.j41(5,"td",41)(6,"span",42),e.EFF(7),e.k0s()(),e.bVm()),2&a){const t=e.XpG().$implicit,n=e.XpG(2);e.R7$(),e.Y8G("pTooltip",n.getWarningTooltip(t.processedDeclaredUnit)),e.R7$(),e.SpI(" ",n.format(t.bestPractice,t.processedDeclaredUnit)," "),e.R7$(),e.Y8G("pTooltip",n.getWarningTooltip(t.processedDeclaredUnit)),e.R7$(),e.SpI(" ",n.format(t.average,t.processedDeclaredUnit)," "),e.R7$(),e.Y8G("pTooltip",n.getWarningTooltip(t.processedDeclaredUnit)),e.R7$(),e.Y8G("ngClass",e.eq3(7,Yi,n.isEpdRangeHighlighterEnabledSignal()&&n.isGwpLessOrEqualsBaselineGwp(t.conservativeEstimate,t.processedDeclaredUnit))),e.R7$(),e.SpI(" ",n.format(t.conservativeEstimate,t.processedDeclaredUnit)," ")}}function ea(a,l){if(1&a&&(e.j41(0,"span",45),e.nrm(1,"cqd-org-logo",46),e.k0s()),2&a){const t=l.$implicit;e.Y8G("pTooltip",t.name),e.R7$(),e.Y8G("logo",t.image)("website",t.website)("orgRouteId",t.routeId)("name",t.name)}}function ta(a,l){if(1&a&&(e.qex(0),e.j41(1,"td")(2,"span",43),e.DNE(3,ea,2,5,"span",44),e.k0s()(),e.bVm()),2&a){const t=e.XpG().$implicit;e.R7$(3),e.Y8G("ngForOf",t.participants)}}function na(a,l){if(1&a){const t=e.RV6();e.j41(0,"button",47),e.bIt("click",function(){e.eBV(t);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.onToggleSelect({data:i}))}),e.k0s()}}function ia(a,l){if(1&a&&e.nrm(0,"cqd-download-industry-epd-file",48),2&a){const t=e.XpG().$implicit;e.Y8G("instance",t)}}function aa(a,l){if(1&a&&(e.DNE(0,Ji,1,1,"ng-template",null,1,e.C5r),e.j41(2,"tr",34)(3,"td",35)(4,"span",36),e.pXf(5,10),e.k0s(),e.EFF(6),e.k0s(),e.j41(7,"td",35),e.EFF(8),e.k0s(),e.j41(9,"td",35),e.EFF(10),e.k0s(),e.DNE(11,Zi,8,9,"ng-container",28)(12,ta,4,1,"ng-container",28),e.j41(13,"td",37),e.DNE(14,na,1,0,"button",38),e.j41(15,"a",39),e.pXf(16,11),e.k0s(),e.DNE(17,ia,1,1,"cqd-download-industry-epd-file",40),e.k0s()()),2&a){const t=l.$implicit,n=e.sdS(1),i=e.XpG(2);e.R7$(2),e.Y8G("ngxTippy",t.qaStatus===i.QaStatuses.Error?n:null)("pSelectableRow",t)("pSelectableRowDisabled",!i.selectMaterialEnabled)("ngClass",e.sMw(18,Xi,!t.processedDeclaredUnit,i.isWrongDimensionality(t.processedDeclaredUnit),t.qaStatus===i.QaStatuses.Error)),e.R7$(),e.Y8G("pTooltip",t.name)("cqdHideTooltipIfTextFits",t.name),e.R7$(3),e.SpI(" ",t.name," "),e.R7$(),e.Y8G("pTooltip",i.getPublishersNames(t))("cqdHideTooltipIfTextFits",i.getPublishersNames(t)),e.R7$(),e.SpI(" ",i.getPublishersNames(t)," "),e.R7$(),e.Y8G("pTooltip",i.parseGeography(t.geography))("cqdHideTooltipIfTextFits",i.parseGeography(t.geography)),e.R7$(),e.SpI(" ",i.parseGeography(t.geography)," "),e.R7$(),e.Y8G("ngIf",i.industryView===i.industryViewType.impacts),e.R7$(),e.Y8G("ngIf",i.industryView===i.industryViewType.participants),e.R7$(2),e.Y8G("ngIf",i.selectMaterialEnabled),e.R7$(),e.Y8G("href",i.routes.dashboard.industryEpds.url+"/"+(t.openXpdUuid||t.id),e.B4B),e.R7$(2),e.Y8G("ngIf",i.canDownload(t))}}function sa(a,l){if(1&a){const t=e.RV6();e.qex(0),e.j41(1,"p-table",22),e.bIt("onLazyLoad",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onLazyLoad(i))})("onRowSelect",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onRowSelect(i))})("onRowUnselect",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onRowUnselect())}),e.mxI("selectionChange",function(i){e.eBV(t);const s=e.XpG();return e.DH7(s.selectedEpd,i)||(s.selectedEpd=i),e.Njj(i)}),e.DNE(2,Qi,10,5,"ng-template",23)(3,aa,18,22,"ng-template",24),e.k0s(),e.bVm()}if(2&a){const t=e.XpG();e.R7$(),e.Y8G("value",t.industryEpds)("loading",t.loading)("first",t.pageFirst)("rows",t.rowsCount)("lazy",!0)("totalRecords",t.totalCount)("paginator",t.totalCount>t.rowsCount)("lazyLoadOnInit",!1),e.R50("selection",t.selectedEpd)}}function oa(a,l){1&a&&(e.j41(0,"div",50)(1,"div",51)(2,"div",52),e.nrm(3,"div",53)(4,"div",54)(5,"div",54)(6,"div",54)(7,"div",54)(8,"div",55),e.k0s(),e.j41(9,"div",52),e.nrm(10,"div",53)(11,"div",54)(12,"div",54)(13,"div",54)(14,"div",54)(15,"div",55),e.k0s(),e.j41(16,"div",52),e.nrm(17,"div",53)(18,"div",54)(19,"div",54)(20,"div",54)(21,"div",54)(22,"div",55),e.k0s()()())}function ra(a,l){if(1&a&&e.DNE(0,oa,23,0,"div",49),2&a){const t=e.XpG();e.Y8G("ngIf",t.loading)}}const an={impacts:"Impacts",participants:"Participants"};let la=(()=>{class a extends en{constructor(){super(...arguments),this.industryEpds=[],this.selectEpd=new e.bkB,this.industryViewType=an,this.industryView=an.impacts}ngOnChanges(t){const{searchTerms:n}=t;if(n){const i=n.currentValue.map(s=>s.name);this.industryView=i.includes("orgName")?this.industryViewType.participants:this.industryViewType.impacts}}onToggleSelect(t){this.selectedEpd&&this.selectedEpd.id===t.data.id?this.onRowUnselect():this.onRowSelect(t)}onRowSelect(t){const n=new ki.n(t.data);this.selectEpd.next(n)}onRowUnselect(){this.selectEpd.next(null)}getWarningTooltip(t){return this.isWrongDimensionality(t)?ee.vX.wrongDimensionality("Industry EPD"):null}getPublishersNames(t){return t.publishers?t.publishers.map(n=>n.name).join(", "):""}canDownload(t){return t.isDownloadable&&t.boxId&&!t.boxId.includes("skanska.app.box.c
1om")}static{this.\u0275fac=(()=>{let t;return function(i){return(t||(t=e.xGo(a)))(i||a)}})()}static{this.\u0275cmp=e.VBU({type:a,selectors:[["cqd-industry-epds-statistics-table"]],inputs:{industryEpds:"industryEpds",selectedEpd:"selectedEpd",searchTerms:"searchTerms"},outputs:{selectEpd:"selectEpd"},features:[e.Vt3,e.OA$],decls:10,vars:6,consts:()=>{let t,n,i,s,c,_,M,R,v,x,H,$,oe,Ce,ae,Oe;return t=$localize`:â5a9eeca96ad0feac5a9d3a0194dca8453a5efb86â4893608042141186394:Industry EPDs`,n=$localize`:âcff1428d10d59d14e45edec3c735a27b5482db59â8953033926734869941:Name`,i=$localize`:â326d64036d72558edc5812658e4927e4cf593deeâ2217106614099579669:Publishers`,s=$localize`:âad5e48b415424a366c34c0dc5e613dd35ff093c7â9153701383270933397:Jurisdiction`,c=$localize`:â6f1e3fd25b43d2783570227569c1d38a39a17877â1237100727627058484:20% of products covered by this Industry EPD are estimated to have GWP lower than this value, based on the values reported, the specificity of the Industry EPD, and the estimated standard deviation of products in this category. The value is per unit of the product shown under 'Declared Unit'`,_=$localize`:âc524a6a14d18f399f40ffa51e9da7287218cff01â2966638979676835788:This is the GWP impact given in the Industry EPD per unit of the product shown under 'Declared Unit'`,M=$localize`:âac20086daaedcdefbd30dbf818f3a31a2ef68a27â5721574098950963282:80% of products covered by this Industry EPD are estimated to have GWP lower than this value, based on the values reported, the specificity of the Industry EPD, and the estimated standard deviation of products in this category. The value is per unit of the product shown under 'Declared Unit'`,R=$localize`:â3b7f1e134cd06ab9e63e9ff934e053bff82fc235â8248331277943669702: Achievable `,v=$localize`:â0eaad88f01d4e0db641ced42a302244ce7418369â6526565343802716753: Average `,x=$localize`:â8a7e60e49ff389862f00cbe2491b8145ea2ecf39â213997907310621224: Conservative Estimate `,H=$localize`:â19cbc737b99410528f96484999823715015a538eâ532585765630415282:Participating Manufacturers`,$=$localize`:â1dad7559989f53f4a313ee732a4c4d7e93b4b78eâ80856595770326868:-S-`,oe=$localize`:âb05c1f4ebc949a1fe5d394f9fda0630c687d2a2fâ4939845221509107760:Select this Industry EPD. You can also select the Industry EPD by clicking anywhere in its row. The chosen Industry EPD will be used instead of the Search Statistics when calculating Conservative and Achievable values.`,Ce=$localize`:â92c915a821d66af3a8b8c284faf054ea255399a9â5027063337008780338:Broken:`,ae=$localize`:âc9039b1b13b3ef165b66b3c5d79f810ab1ebb050â7593555694782789615:Open`,Oe=$localize`:â80fc5312ed6fc07934eac89cf1f8e229f7f0a1f7â2031087702685840926: The selected Industry EPD (${"\ufffd0\ufffd"}:INTERPOLATION:) is no longer valid, due to failing EC3 quality checks. To clear this error, de-select this EPD or contact the EPD program operator to have the correct data entered. `,[["loadingTemplate",""],["industryEpdWithErrorTooltip",""],t,n,i,s,R,v,x,H,Ce,ae,Oe,[1,"panel-collapse",3,"onAfterToggle","collapsed","toggleable"],[1,"header"],[1,"label"],["class","industry-view-toggler",3,"value","valueChange",4,"ngIf"],["class","loading",4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"industry-view-toggler",3,"valueChange","value"],[3,"value"],[1,"loading"],["cqdShowResponsiveTableHead","","selectionMode","single","dataKey","id",3,"onLazyLoad","onRowSelect","onRowUnselect","selectionChange","value","loading","first","rows","lazy","totalRecords","paginator","lazyLoadOnInit","selection"],["pTemplate","header"],["pTemplate","body"],[1,"name"],[1,"publisher"],[1,"jurisdiction"],[4,"ngIf"],[1,"action-row-header",3,"ngClass"],["tooltipPosition","top","pTooltip",c,1,"achivable"],["tooltipPosition","top","pTooltip",_,1,"average"],["tooltipPosition","top","pTooltip",M,1,"conservative"],[1,"participants"],[3,"ngxTippy","pSelectableRow","pSelectableRowDisabled","ngClass"],["tooltipPosition","top","tooltipStyleClass","desc-tooltip",3,"pTooltip","cqdHideTooltipIfTextFits"],[1,"broken-label"],[1,"buttons-row"],["class","button button-select button-small button--green","pButton","","type","button","label",$,"pTooltip",oe,"tooltipPosition","left",3,"click",4,"ngIf"],["target","_blank","rel","noopener",1,"open-epd-btn","link","button","button-small","button--light-blue",3,"href"],["styleClass","button button--light-blue button-small",3,"instance",4,"ngIf"],["tooltipPosition","top",3,"pTooltip"],[3,"ngClass"],[1,"participant-cell"],["class","participant-logo","tooltipPosition","top",3,"pTooltip",4,"ngFor","ngForOf"],["tooltipPosition","top",1,"participant-logo",3,"pTooltip"],["cqdPreventClick","",3,"logo","website","orgRouteId","name"],["pButton","","type","button","label",$,"pTooltip",oe,"tooltipPosition","left",1,"button","button-select","button-small","button--green",3,"click"],["styleClass","button button--light-blue button-small",3,"instance"],["class","ssc ssc-card",4,"ngIf"],[1,"ssc","ssc-card"],[1,"ssc-wrapper"],[1,"flex","align-center","justify-between"],[1,"ssc-line","w-30","mbs"],[1,"ssc-line","w-10","mbs"],[1,"ssc-line","w-20","mbs"]]}
1,template:function(n,i){if(1&n){const s=e.RV6();e.j41(0,"p-panel",13),e.bIt("onAfterToggle",function(_){return e.eBV(s),e.Njj(i.isPanelCollapsed=_.collapsed)}),e.j41(1,"p-header",14)(2,"span",15),e.pXf(3,2),e.k0s(),e.DNE(4,zi,5,5,"mat-button-toggle-group",16)(5,Wi,1,0,"div",17),e.k0s(),e.j41(6,"div"),e.DNE(7,sa,4,9,"ng-container",18),e.k0s()(),e.DNE(8,ra,1,1,"ng-template",null,0,e.C5r)}if(2&n){const s=e.sdS(9);e.Y8G("collapsed",i.collapsed)("toggleable",!0),e.R7$(4),e.Y8G("ngIf",i.industryEpds.length&&!i.isPanelCollapsed),e.R7$(),e.Y8G("ngIf",i.isPanelCollapsed&&i.loading),e.R7$(2),e.Y8G("ngIf",i.industryEpds.length)("ngIfElse",s)}},dependencies:[N.YU,N.Sq,N.bT,ye._f,Ae.Y9,Ae.Ei,be.m,Ue.XI,Ue.d5,ke.Z,Ui.V,tn.W,nt.T,nn.ec,nn.pc,Et.No,Hi.Z,Lt.v],styles:["[_nghost-%COMP%] table{table-layout:fixed!important}[_nghost-%COMP%] .p-datatable{min-width:unset!important}[_nghost-%COMP%] .p-highlight td{background-color:#eaffea!important}[_nghost-%COMP%] tr{outline:none}[_nghost-%COMP%] tr .action-row-header{width:165px}[_nghost-%COMP%] tr .action-row-header.search-page{width:140px}[_nghost-%COMP%] tr .name{width:300px}[_nghost-%COMP%] tr .participants{width:40%}[_nghost-%COMP%] tr .broken-label{color:#c94747;font-style:italic;font-size:10px;margin-right:5px;display:none}[_nghost-%COMP%] tr.broken .broken-label{display:inline-block}[_nghost-%COMP%] td{color:#000!important}[_nghost-%COMP%] td span{padding:2px 5px}[_nghost-%COMP%] td span.highlighted{background-color:#28c36b66;border-radius:8px}[_nghost-%COMP%] .buttons-row{text-overflow:clip}.header[_ngcontent-%COMP%]{display:flex}.header[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{flex:1}.header[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%]{position:relative}.header[_ngcontent-%COMP%] .industry-view-toggler[_ngcontent-%COMP%] {font-size:14px;font-weight:400}.header[_ngcontent-%COMP%] .industry-view-toggler[_ngcontent-%COMP%] .mat-button-toggle-checked{font-weight:600}.header[_ngcontent-%COMP%] .industry-view-toggler[_ngcontent-%COMP%] .mat-button-toggle-label-content{line-height:23px}.participant-cell[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.participant-logo[_ngcontent-%COMP%]{margin:auto 2px}.open-epd-btn[_ngcontent-%COMP%]{margin-right:5px;text-decoration:none!important}.button[_ngcontent-%COMP%]{margin-right:5px}.wrong-dimensionality[_ngcontent-%COMP%]{background-color:#ffcfcf4d!important}.epd-with-errors[_ngcontent-%COMP%]{border:2px solid var(--danger)}"],changeDetection:0})}}return a})();var sn=o(31153),ca=o(90719);let Nt=(()=>{class a extends sn.${constructor(){super(...arguments),this.searchTypeChange=new e.bkB,this.hideParentDialog=new e.bkB,this.showParentDialog=new e.bkB,this.labels=z.W,this.shouldExpandSource=new L.t(!1),this.sectionFormFieldNames=[],this.formService=(0,e.WQX)(p.p)}ngOnInit(){this.shouldExpand$=this.shouldExpandSource.asObservable(),this.formService.formIsInvalid$.pipe((0,h.Q)(this.destroy$),(0,P.M)(()=>this.shouldExpandSource.next(!0))).subscribe()}ngOnChanges(t){if(t.formFields){const n=t.formFields.currentValue;n&&(this.sectionFormFieldNames=n.map(i=>i.name))}}ngAfterViewInit(){const t=this.formService.getForm();t.statusChanges.pipe((0,h.Q)(this.destroy$),(0,ge.p)(n=>n===ca.d.invalid),(0,P.M)(()=>{this.sectionFormFieldNames.forEach(n=>{const i=t.get(n);i&&i.invalid&&(i.markAsDirty({onlySelf:!0}),this.shouldExpandSource.next(!0))})})).subscribe()}onSearchTypeChange(t,n){this.searchTypeChange.emit({controlName:t,searchType:n})}onCollapsedChange(t){this.shouldExpandSource.next(!t)}static{this.\u0275fac=(()=>{let t;return function(i){return(t||(t=e.xGo(a)))(i||a)}})()}static{this.\u0275dir=e.FsC({type:a,inputs:{formFields:"formFields",declaredUnit:"declaredUnit",withBuilding:"withBuilding",introShown:"introShown",searchTypes:"searchTypes",isSearchInProgress:"isSearchInProgress"},outputs:{searchTypeChange:"searchTypeChange",hideParentDialog:"hideParentDialog",showParentDialog:"showParentDialog"},features:[e.Vt3,e.OA$]})}}return a})();var da=o(34421),pa=o(60184),ct=o(92619),_a=o(70406),on=o(30218),ha=o(87314),rn=o(34142),ln=o(78637),ga=o(37661),ma=o(27443),ua=o(77934),Sa=o(357),fa=o(31397),Ca=o(74647),cn=o(47681),Bt=o(72510),Ta=o(34822);const Ma=a=>({invalid:a}),dn=a=>({ban:a}),$t=a=>({red:a});function Ea(a,l){if(1&a&&(e.qex(0),e.j41(1,"span",9)(2,"span",10),e.EFF(3),e.k0s(),e.j41(4,"span",11),e.EFF(5),e.k0s()(),e.bVm()),2&a){const t=e.XpG().item,n=e.XpG();e.R7$(),e.Y8G("pTooltip",t.tooltip)("ngClass",e.eq3(5,dn,!1===t.state)),e.R7$(2),e.JRh(t.label),e.R7$(),e.Y8G("ngClass",e.eq3(7,$t,!1===t.state)),e.R7$(),e.JRh(n.parseItemState(t))}}function ba(a,l){if(1&a&&(e.j41(0,"span",12)(1,"span",10),e.EFF(2),e.k0s(),e.j41(3,"span",11),e.EFF(4),e.k0s()()),2&a){const t=e.XpG().item,n=e.XpG();e.Y8G("ngClass",e.eq3(6,dn,!1===t.state))("tippyProps",t.interactiveTooltip)("tippyClassName",t.interactiveTooltip.styleClassName),e.R7$(2),e.JRh(t.label),e.R7$(),e.Y8G("ngClass",e.eq3(8,$t,!1===t.state)),e.R7$(),e.JRh(n.parseItemState(t))}}function Aa(a,l){if(1&a&&e.DNE(0,Ea,6,9,"ng-container",8)(1,ba,5,10,"ng-template",null,1,e.C5r),2&a){const t=l.item,n=e.sdS(2);e.Y8G("ngIf",!t.interactiveTooltip)("ngIfElse",n)}}function Pa(a,l){if(1&a){const t=e.RV6();e.j41(0,"div",14)(1,"span",15),e.EFF(2),e.k0s(),e.j41(3,"span",16),e.EFF(4),e.k0s(),e.j41(5,"span",17),e.bIt("click",function(){const i=e.eBV(t).$implicit,s=e.XpG().clear;return e.Njj(s(i))}),e.EFF(6,"\xd7"),e.k0s()()}if(2&a){const t=l.$implicit,n=e.XpG(2);e.R7$(),e.Y8G("pTooltip",t.label+": "+n.parseItemState(t))("cqdHideTooltipIfTextFits",t.label+":"),e.R7$(),e.SpI("",t.label,": "),e.R7$(),e.Y8G("ngClass",e.eq3(5,$t,!1===t.state)),e.R7$(),e.JRh(n.parseItemState(t))}}function Ra(a,l){1&a&&e.DNE(0,Pa,7,7,"div",13),2&a&&e.Y8G("ngForOf",l.items)}let ya=(()=>{class a extends cn.x{set control(t){t&&(this.selectedItems=t.value,this._control=t,this._control.valueChanges.pipe((0,h.Q)(this.destroy$)).subscribe(n=>{this.selectedItems=n}),(0,Ke.Y)(250).pipe((0,fa.Z)(()=>t.statusChanges),(0,h.Q)(this.destroy$),(0,at.F)()).subscribe(()=>this.cdRef.markForCheck()))}get control(){return this._control}set options(t){t&&(this._options=t.map(n=>({...n})))}get options(){return this._options}set selectedItems(t){this._selectedItems=t;const n=t.map(i=>({...i}));
1this.propagateChange(n)}get selectedItems(){return this._selectedItems}constructor(t,n){super(),this.injector=t,this.clearable=!0,this.labels=z.W,this._control=new y.MJ,this._selectedItems=null,this.shouldShowControlErrors=i=>i&&i.invalid&&!i.pristine,this.propagateChange=()=>{},n&&(n.formSubmit$.pipe((0,h.Q)(this.destroy$)).subscribe(()=>this.cdRef.markForCheck()),this.shouldShowControlErrors=n.shouldShowControlErrors.bind(n))}ngAfterViewInit(){const t=this.injector.get(y.vO,null);t&&(this._control=t.control,this.cdRef.detectChanges()),this.ngSelect.toggleItem=n=>this.selectItem(n.value)}ngDoCheck(){if(this.control){const t=this.control.dirty;this._dirty!==t&&(this._dirty=t,this.cdRef.markForCheck())}}writeValue(t){if(t){if("string"==typeof t[0]){const n=[];t.forEach(i=>{const s=this.options.find(c=>c.value===i);s&&(s.state=!0,n.push(s))}),this._selectedItems=n}else this._selectedItems=t;this.options&&((0,q.I)(t)?(this.options.forEach(n=>n.state=null),(0,q.I)(this.ngSelect.selectedItems)||this.ngSelect.clearModel()):this.ngSelect.itemsList.items.forEach(i=>{!this.selectedItems.find(c=>c.value===i.value.value)&&i.selected&&this.ngSelect.unselect(i)})),this.cdRef.markForCheck()}}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}markSelected(t,n){return t.value===n.value&&(t.state=n.state,(0,b.Lm)(n.state))}removeSelectedItem(t){t.state=null}clearSelectedItems(){this.options.forEach(t=>t.state=null)}parseItemState(t){return t?(0,b.hX)(t.state)?"":t.state?"Yes":"No":""}selectItem(t){if(t.value){let n=-1;const i=(0,q.I)(this.selectedItems)?[]:this.selectedItems.filter((s,c)=>s.value!==t.value||(n=c,!1));t.state=!(0,b.Lm)(t.state)||!1===t.state&&null,(0,b.Lm)(t.state)&&(-1!==n?i.splice(n,0,t):i.push(t)),this.selectedItems=i}}static{this.\u0275fac=function(n){return new(n||a)(e.rXU(e.zZn),e.rXU(Ca.L,8))}}static{this.\u0275cmp=e.VBU({type:a,selectors:[["cqd-three-state-dropdown-list"]],inputs:{dropdownAppendTo:"dropdownAppendTo",inputId:"inputId",label:"label",disabled:"disabled",clearable:"clearable",groupBy:"groupBy",control:"control",options:"options",selectedItems:"selectedItems"},features:[e.Jv_([{provide:y.kq,multi:!0,useExisting:(0,e.Rfq)(()=>a)}]),e.Vt3],decls:7,vars:18,consts:[["ngSelect",""],["itemWithInteractiveTooltip",""],[3,"ngClass"],["bindLabel","label",3,"ngModelChange","remove","clear","open","bindValue","disabled","labelForId","items","placeholder","ngModel","searchable","multiple","closeOnSelect","clearable","appendTo","groupBy","isOpen","compareWith"],["ng-option-tmp",""],["ng-multi-label-tmp",""],[1,"error-wrapper"],[3,"control"],[4,"ngIf","ngIfElse"],["tooltipZIndex","1100",1,"ng-option-item","three-state-item",3,"pTooltip","ngClass"],[1,"ng-option-label","text-ellipsis"],[1,"ng-option-state",3,"ngClass"],["ngxTippy","",1,"ng-option-item","three-state-item",3,"ngClass","tippyProps","tippyClassName"],["class","ng-value",4,"ngFor","ngForOf"],[1,"ng-value"],["tooltipPosition","top","tooltipStyleClass","desc-tooltip",1,"ng-value-label","text-ellipsis",3,"pTooltip","cqdHideTooltipIfTextFits"],[1,"ng-value-state",3,"ngClass"],["aria-hidden","true",1,"ng-value-icon","right",3,"click"]],template:function(n,i){if(1&n){const s=e.RV6();e.j41(0,"div",2)(1,"ng-select",3,0),e.mxI("ngModelChange",function(_){return e.eBV(s),e.DH7(i.selectedItems,_)||(i.selectedItems=_),e.Njj(_)}),e.bIt("remove",function(_){return e.eBV(s),e.Njj(i.removeSelectedItem(_))})("clear",function(){return e.eBV(s),e.Njj(i.clearSelectedItems())})("open",function(){return e.eBV(s),e.Njj(i.onOpen())}),e.DNE(3,Aa,3,2,"ng-template",4)(4,Ra,1,1,"ng-template",5),e.k0s(),e.j41(5,"div",6),e.nrm(6,"cqd-form-errors",7),e.k0s()()}2&n&&(e.Y8G("ngClass",e.eq3(16,Ma,i.shouldShowControlErrors(i.control)&&!i.disabled)),e.R7$(),e.Y8G("bindValue",null)("disabled",i.disabled)("labelForId",i.inputId)("items",i.options)("placeholder",i.label),e.R50("ngModel",i.selectedItems),e.Y8G("searchable",!1)("multiple",!0)("closeOnSelect",!1)("clearable",i.clearable)("appendTo",i.dropdownAppendTo)("groupBy",i.groupBy)("isOpen",i.isManualOpen)("compareWith",i.markSelected),e.R7$(5),e.Y8G("control",i.control))},dependencies:[N.YU,N.Sq,N.bT,y.BC,y.vS,be.m,Bt.vr,Bt.Uq,Bt.EY,Et.No,Ta.Z,nt.T],styles:["body[_ngcontent-%COMP%], .p-widget[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;letter-spacing:-.16px;font: 14px/1.29 Open Sans,Helvetica,Arial,sans-serif;color:#000}h1[_ngcontent-%COMP%]{font-size:18px;font-weight:800;letter-spacing:-.8px;line-height:1.23;margin:0 0 30px}@media (min-width: 1026px){h1[_ngcontent-%COMP%]{font-size:22px}}@media (min-width: 1381px){h1[_ngcontent-%COMP%]{font-size:26px}}h2[_ngcontent-%COMP%]{font-size:22px;font-weight:800;letter-spacing:-.68px;line-height:1.28;margin:0 0 30px}h3[_ngcontent-%COMP%]{font-size:18px;font-weight:800;letter-spacing:-.55px;line-height:1.28;margin:0 0 30px}h5[_ngcontent-%COMP%]{font-size:11.8px;font-weight:800}.title[_ngcontent-%COMP%]{font-size:16px;font-weight:800;line-height:1.25;text-transform:uppercase;color:#000}.title-subsection[_ngcontent-%COMP%]{font-weight:600;line-height:1.38;letter-spacing:-.12px}p[_ngcontent-%COMP%]{margin:0 0 10px;line-height:1.5}a[_ngcontent-%COMP%], .p-widget-content[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--primary);transition:opacity .3s ease-in-out}a[_ngcontent-%COMP%]:hover, a[_ngcontent-%COMP%]:active, a[_ngcontent-%COMP%]:focus, .p-widget-content[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .p-widget-content[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:active, .p-widget-content[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:focus{opacity:.7}hr[_ngcontent-%COMP%]{color:#b0b9c6;margin:0 3px}.font-bold[_ngcontent-%COMP%]{font-weight:700}.text-ellipsis[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.text-lowercase[_ngcontent-%COMP%]{text-transform:lowercase}.text-capitalize[_ngcontent-%COMP%]{text-transform:capitalize}.text-uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-transform-initial[_ngcontent-%COMP%]{text-transform:initial}textarea[_ngcontent-%COMP%]{white-space:pre-wrap!important}pre[_ngcontent-%COMP%]{font-size:14px;white-space:pre-wrap}.no-decoration[_ngcontent-%COMP%]{text-decoration:none!important}.red[_ngcontent-%COMP%]{color:#c94747}.yellow[_ngcontent-%COMP%], .amber[_ngcontent-%COMP%]{color:#ebac2a}.green[_ngcontent-%COMP%]{color:#33b688}.dark-violet[_ngcontent-%COMP%]{color:#9400d3}.grey[_ngcontent-%COMP%], .gray[_ngcontent-%COMP%]{color:#b0b9c6}.blue[_ngcontent-%COMP%]{color:#3b9cb6}.primary[_ngcontent-%COMP%]{color:var(--primary)}.page-title[_ngcontent-%COMP%]{font-weight:500;font-size:28px;margin-bottom:3rem}.page-paragraph[_ngcontent-%COMP%]{bottom:.6rem;margin-bottom:.6rem}.page-paragraph--margined[_ngcontent-%COMP%]{margin-left:1.5rem}.page-subtitle[_ngcontent-%COMP%]{font-weight:600;margin:1.5rem 0}.page-list[_ngcontent-%COMP%] .page-list-item[_ngcontent-%COMP%]{margin-bottom:.6rem}.page-list[_ngcontent-%COMP%] .page-list-item--strong[_ngcontent-%COMP%]::marker{font-weight:600;font-size:18px}.page-subsumed[_ngcontent-%COMP%]{font-size:18px;letter-spacing:-.55px;font-weight:600;margin:1.5rem 0}h2.page-subtitle[_ngcontent-%COMP%]{font-size:20px;color:#3b9cb6}h3.page-subtitle[_ngcontent-%COMP%]{font-size:18px}h4.page-subtitle[_ngcontent-%COMP%]{font-size:16px;margin:.6rem 0}.list[_ngcontent-%COMP%]{margin-left:2.5rem;margin-bottom:.6rem}.list-numeric[_ngcontent-%COMP%]{list-style:decimal}.list-disc[_ngcontent-%COMP%]{list-style:disc}.text-underlined[_ngcontent-%COMP%]{text-decoration:underline}.term-description[_ngcontent-%COMP%]{color:#90f}.text-center[_ngcontent-%COMP%]{text-align:center}.img-center[_ngcontent-%COMP%]{margin:auto}#footnotes[_ngcontent-%COMP%]{margin:3rem 0}#footnotes[_ngcontent-%COMP%] .separate-line[_ngcontent-%COMP%]{width:150px;border-top-color:#d1d1d1;margin-bottom:.5rem}.no-text-transform[_ngcontent-%COMP%]{text-transform:none}label[_ngcontent-%COMP%], .label-default-state[_ngcontent-%COMP%]{font:400 13px/1.43 Open Sans,Helvetica,Arial,sans-serif;color:gray;transition:transform .3s cubic-bezier(.64,.09,.08,1),padding .3s cubic-bezier(.64,.09,.08,1)}.label-style-focus[_ngcontent-%COMP%], [_nghost-%COMP%] .ng-select.ng-select-opened .ng-select-container .ng-value-container .ng-placeholder, [_nghost-%COMP%] .ng-select.ng-select-focused .ng-select-container .ng-value-container .ng-placeholder, .label-style-filled[_ngcontent-%COMP%], [_nghost-%COMP%] .ng-select.ng-select-filtered .ng-select-container .ng-value-container .ng-placeholder, [_nghost-%COMP%] .ng-select .ng-select-container.ng-has-value .ng-value-container .ng-placeholder{font-size:12px;font-weight:600;letter-spacing:.2px;color:#000}.with-filter-inputs[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:30px!important;padding:5px 6px}input[_ngcontent-%COMP%], .p-inputtext[_ngcontent-%COMP%], .p-autocomplete[_ngcontent-%COMP%] .p-autocomplete-input[_ngcontent-%COMP%], .ng-select[_ngcontent-%COMP%] .ng-select-container[_ngcontent-%COMP%]{height:36px;width:100%;padding:8px 6px;border-radius:0;border:1px solid #979ea8;background:#fff;color:#000;font:14px/1.4 Open Sans,Helvetica,Arial,sans-serif;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:1}input[_ngcontent-%COMP%]::-webkit-input-placeholder, .p-inputtext[_ngcontent-%COMP%]::-webkit-input-placeholder, .p-autocomplete[_ngcontent-%COMP%] .p-autocomplete-input[_ngcontent-%COMP%]::-webkit-input-placeholder, .ng-select[_ngcontent-%COMP%] .ng-select-container[_ngcontent-%COMP%]::-webkit-input-placeholder{color:gray}input[_ngcontent-%COMP%]:-moz-placeholder, .p-inputtext[_ngcontent-%COMP%]:-moz-placeholder, .p-autocomplete[_ngcontent-%COMP%] .p-autocomplete-input[_ngcontent-%COMP%]:-moz-placeholder, .ng-select[_ngcontent-%COMP%] .ng-select-container[_ngcontent-%COMP%]:-moz-placeholder{color:gray}input[_ngcontent-%COMP%]::-moz-placeholder, .p-inputtext[_ngcontent-%COMP%]::-moz-placeholder, .p-autocomplete[_ngcontent-%COMP%] .p-autocomplete-input[_ngcontent-%COMP%]::-moz-placeholder, .ng-select[_ngcontent-%COMP%] .ng-select-container[_ngcontent-%COMP%]::-moz-placeholder{color:gray}input[_ngcontent-%COMP%]:-ms-input-placeholder, .p-inputtext[_ngcontent-%COMP%]:-ms-input-placeholder, .p-autocomplete[_ngcontent-%COMP%] .p-autocomplete-input[_ngcontent-%COMP%]:-ms-input-placeholder, .ng-select[_ngcontent-%COMP%] .ng-select-container[_ngcontent-%COMP%]:-ms-input-placeholder{color:gray}input[_ngcontent-%COMP%]:focus, .p-inputtext[_ngcontent-%COMP%]:focus, .p-autocomplete[_ngcontent-%COMP%] .p-autocomplete-input[_ngcontent-%COMP%]:focus, .ng-select[_ngcontent-%COMP%] .ng-select-container[_ngcontent-%COMP%]:focus{box-shadow:0 1px #00000008,0 0 0 4px #e8edef;border-color:#3b9cb6!important}input[disabled][_ngcontent-%COMP%], input[aria-disabled][_ngcontent-%COMP%], input[readonly][_ngcontent-%COMP%], input[aria-readonly][_ngcontent-%COMP%], .p-inputtext[disabled][_ngcontent-%COMP%], .p-inputtext[aria-disabled][_ngcontent-%COMP%], .p-inputtext[readonly][_ngcontent-%COMP%], .p-inputtext[aria-readonly][_ngcontent-%COMP%], .p-autocomplete[_ngcontent-%COMP%] .p-autocomplete-input[disabled][_ngcontent-%COMP%], .p-autocomplete[_ngcontent-%COMP%] .p-autocomplete-input[aria-disabled][_ngcontent-%COMP%], .p-autocomplete[_ngcontent-%COMP%] .p-autocomplete-input[readonly][_ngcontent-%COMP%], .p-autocomplete[_ngcontent-%COMP%] .p-autocomplete-input[aria-readonly][_ngcontent-%COMP%], .ng-select[_ngcontent-%COMP%] .ng-select-container[disabled][_ngcontent-%COMP%], .ng-select[_ngcontent-%COMP%] .ng-select-container[aria-disabled][_ngcontent-%COMP%], .ng-select[_ngcontent-%COMP%] .ng-select-container[readonly][_ngcontent-%COMP%], .ng-select[_ngcontent-%COMP%] .ng-select-container[aria-readonly][_ngcontent-%COMP%]{box-shadow:0 1px #00000008,0 0 0 4px #b2b9c51a;background:#f2f3f5;border-color:#b2b9c5!important;opacity:1;pointer-events:none}textarea[disabled][_ngcontent-%COMP%], textarea[aria-disabled][_ngcontent-%COMP%], textarea[readonly][_ngcontent-%COMP%], textarea[aria-readonly][_ngcontent-%COMP%]{pointer-events:initial!important}.all-readonly[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{border:none!important;box-shadow:none!important;background:#f2f3f5!important;height:auto;padding-bottom:0}.all-readonly[_ngcontent-%COMP%] .p-float-label[_ngcontent-%COMP%]{height:auto}.field-type[_ngcontent-%COMP%]{font:700 12px Open Sans,Helvetica,Arial,sans-serif;color:#b2b9c5;letter-spacing:-.13px;transition:color .3s ease-in-out;text-transform:none}.field-type-container[_ngcontent-%COMP%]{position:absolute;right:0;top:0;display:flex;justify-content:center;align-items:center}.field-type-container.left[_ngcontent-%COMP%]{right:auto!important;margin-right:4px;left:6px!important}.field-type-container.left[_ngcontent-%COMP%] .field-type[_ngcontent-%COMP%]{margin-right:6px}.field-type-container.right[_ngcontent-%COMP%]{right:6px!important;margin-left:4px;left:auto!important}.field-type-container.right[_ngcontent-%COMP%] .field-type[_ngcontent-%COMP%]{margin-left:6px}.invalid[_ngcontent-%COMP%] .ng-select-container[_ngcontent-%COMP%]{border-color:#df8181!important}.invalid[_ngcontent-%COMP%] .field-type[_ngcontent-%COMP%]{color:#df8181}
1.invalid[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .invalid[_ngcontent-%COMP%] .p-dropdown-label[_ngcontent-%COMP%], .invalid[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .invalid[_ngcontent-%COMP%] .p-inputtext[_ngcontent-%COMP%]{border-color:#df8181!important}.invalid[_ngcontent-%COMP%] .error-message[_ngcontent-%COMP%]{display:inline-block}.error-message[_ngcontent-%COMP%]{margin-top:6px;display:none;font: 14px/1.29 Open Sans,Helvetica,Arial,sans-serif;letter-spacing:-.16px;color:#c94747}.p-progressbar[_ngcontent-%COMP%]{height:20px}[_nghost-%COMP%] {width:100%;display:block;margin-top:5px}[_nghost-%COMP%] .ng-select .ng-select-container{overflow:visible;padding:8px}[_nghost-%COMP%] .ng-select .ng-select-container .ng-value-container{padding:0}[_nghost-%COMP%] .ng-select .ng-select-container .ng-value-container .ng-placeholder{position:absolute;top:0!important;left:0!important;margin-top:0!important;letter-spacing:-.16px;font:400 13px/1.43 Open Sans,Helvetica,Arial,sans-serif;color:gray;transition:transform .3s cubic-bezier(.64,.09,.08,1),padding .3s cubic-bezier(.64,.09,.08,1);transform:translate(6px) translateY(8px) translateZ(0);text-align:left;display:inline-block;max-width:85%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}[_nghost-%COMP%] .ng-select .ng-select-container .ng-value-container .ng-input{padding:0 50px 0 8px;top:0;height:0}[_nghost-%COMP%] .ng-select .ng-select-container .ng-value-container .ng-input>input{padding:0;box-sizing:border-box}[_nghost-%COMP%] .ng-select.ng-select-searchable.ng-select-opened .ng-input, [_nghost-%COMP%] .ng-select.ng-select-searchable.ng-select-focused .ng-input{height:auto}[_nghost-%COMP%] .ng-select.ng-select-opened .ng-select-container, [_nghost-%COMP%] .ng-select.ng-select-focused .ng-select-container{box-shadow:0 1px #00000008,0 0 0 4px #e8edef;border-color:#3b9cb6!important}[_nghost-%COMP%] .ng-select.ng-select-opened .ng-select-container .ng-value-container .ng-placeholder, [_nghost-%COMP%] .ng-select.ng-select-focused .ng-select-container .ng-value-container .ng-placeholder{transform:translate(6px) translateY(-16px) translateZ(0);color:#000}[_nghost-%COMP%] .ng-select.ng-select-filtered .ng-select-container .ng-value-container .ng-placeholder, [_nghost-%COMP%] .ng-select .ng-select-container.ng-has-value .ng-value-container .ng-placeholder{transform:translate(0) translateY(-16px) translateZ(0);color:#000}[_nghost-%COMP%] .ng-select .ng-arrow-wrapper{padding:0 5px!important;width:9px!important;height:7px;border-radius:0;background-color:transparent;border:none;background-image:url(drodown-arrow.eb377d1d30724b27.svg);background-size:9px 7px;background-position:center;background-repeat:no-repeat;transition:transform .3s cubic-bezier(.64,.09,.08,1)}[_nghost-%COMP%] .ng-select .ng-arrow-wrapper .ng-arrow{display:none}[_nghost-%COMP%] .ng-select.ng-select-opened .ng-arrow-wrapper{transform:rotate(180deg)}[_nghost-%COMP%] .ng-select .ng-clear-wrapper .ng-clear{font-size:20px}[_nghost-%COMP%] .ng-select.ng-select-multiple .ng-select-container{height:auto;padding-top:0;padding-bottom:0;justify-content:space-around}[_nghost-%COMP%] .ng-select.ng-select-multiple .ng-select-container .ng-value-container{padding:5px 0;max-width:90%}[_nghost-%COMP%] .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{display:flex;flex-direction:row;justify-content:flex-end;max-width:100%}[_nghost-%COMP%] .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-state{font-weight:600;font-style:italic;padding-right:5px;color:#33b688}[_nghost-%COMP%] .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-state.red{color:#df8181}[_nghost-%COMP%] .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input input{height:auto}[_nghost-%COMP%] .ng-select.ng-select-disabled .ng-select-container{background-color:#f2f3f5;border-color:#b2b9c5}.error-wrapper[_ngcontent-%COMP%]{height:0}.invalid[_ngcontent-%COMP%] .error-wrapper[_ngcontent-%COMP%]{height:auto}"],changeDetection:0})}}return a})();var Oa=o(1021),va=o(84261),Ia=o(78501);function wa(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-form-unit",16),e.bIt("keydown",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.keydownEvent.emit(i))})("searchTypeChange",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.searchTypeChange.emit(i))})("hideParentDialog",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.hideParentDialog.emit())})("showParentDialog",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.showParentDialog.emit())}),e.k0s()}if(2&a){const t=e.XpG(2);e.Y8G("label",t.config.perDeclaredUnit?null!=t.declaredUnit&&t.declaredUnit.convertedUnit?t.config.label+" / "+(null==t.declaredUnit?null:t.declaredUnit.convertedUnit.format()):t.isFilterBarControl?
1((null==t.config.filterBar?null:t.config.filterBar.label)||t.config.label)+" / Declared unit":t.config.label+" / Declared unit":t.config.label)("inputId",t.config.name)("disabled",t.isSearchInProgress||t.isDisabled)("unitType",t.config.unitType)("pTooltip",t.config.tooltip)("tooltipStyleClass",t.config.tooltipStyleClass)("searchType",t.searchType)("defaultUnit",t.defaultUnit)("plural",t.config.plural)("placeholder",t.config.placeholder)("withSearchType",!!t.config.searchType)("tooltipPosition",t.config.tooltipPosition||"top")("formControl",t.parentForm.get(t.config.name))}}function xa(a,l){if(1&a&&e.nrm(0,"cqd-select",17),2&a){const t=e.XpG(2);e.Y8G("actualizeSelectedItems",!0)("label",t.isFilterBarControl&&(null==t.config.filterBar?null:t.config.filterBar.label)||t.config.label)("inputId",t.config.name)("options",t.config.options)("bindLabel",t.config.bindLabel||"label")("bindValue",t.config.bindValue||"value")("pTooltip",t.config.tooltip)("tooltipStyleClass",t.config.tooltipStyleClass)("disabled",t.isSearchInProgress||t.isDisabled)("multiple",t.config.multiselect)("groupBy",t.config.groupBy)("selectableGroup",t.config.selectableGroup)("maxSelectedItems",t.config.maxSelectedItems)("formControl",t.parentForm.get(t.config.name))("tooltipPosition",t.config.tooltipPosition||"top")("isManualDropdownClosing",t.config.isManualDropdownClosing)("clearable",!t.config.required)}}function Da(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-form-ratio",18),e.bIt("keydown",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.keydownEvent.emit(i))})("searchTypeChange",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.searchTypeChange.emit(i))})("hideParentDialog",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.hideParentDialog.emit())})("showParentDialog",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.showParentDialog.emit())}),e.k0s()}if(2&a){const t=e.XpG(2);e.Y8G("pTooltip",(t.isSearchInProgress||t.isDisabled)&&t.config.boxTooltip?t.config.boxTooltip:null)("label",t.isFilterBarControl&&(null==t.config.filterBar?null:t.config.filterBar.label)||t.config.label)("inputId",t.config.name)("disabled",t.isSearchInProgress||t.isDisabled)("searchType",t.searchType)("boxTooltip",t.config.tooltip)("formControl",t.parentForm.get(t.config.name))("withSearchType",!!t.config.searchType)}}function Fa(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-form-input",19),e.bIt("keydown",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.keydownEvent.emit(i))})("searchTypeChange",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.searchTypeChange.emit(i))})("hideParentDialog",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.hideParentDialog.emit())})("showParentDialog",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.showParentDialog.emit())}),e.k0s()}if(2&a){const t=e.XpG(2);e.Y8G("label",t.isFilterBarControl&&(null==t.config.filterBar?null:t.config.filterBar.label)||t.config.label)("inputId",t.config.name)("disabled",t.isSearchInProgress||t.isDisabled)("searchType",t.searchType)("boxTooltip",t.config.tooltip)("formControl",t.parentForm.get(t.config.name))("withSearchType",!!t.config.searchType)}}function Ga(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-form-input",20),e.bIt("keydown",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.keydownEvent.emit(i))})("searchTypeChange",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.searchTypeChange.emit(i))})("hideParentDialog",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.hideParentDialog.emit())})("showParentDialog",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.showParentDialog.emit())}),e.k0s()}if(2&a){const t=e.XpG(2);e.Y8G("label",t.isFilterBarControl&&(null==t.config.filterBar?null:t.config.filterBar.label)||t.config.label)("inputId",t.config.name)("disabled",t.isSearchInProgress||t.isDisabled)("boxTooltip",t.config.tooltip)("searchType",t.searchType)("withSearchType",!!t.config.searchType)("formControl",t.parentForm.get(t.config.name))}}function La(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-form-input",21),e.bIt("keydown",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.keydownEvent.emit(i))})("searchTypeChange",function(i){e.eBV(t);const s=e.XpG(2);return e.Njj(s.searchTypeChange.emit(i))})("hideParentDialog",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.hideParentDialog.emit())})("showParentDialog",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.showParentDialog.emit())}),e.k0s()}if(2&a){const t=e.XpG(2);e.Y8G("label",t.isFilterBarControl&&(null==t.config.filterBar?null:t.config.filterBar.label)||t.config.label)("inputId",t.config.name)("disabled",t.isSearchInProgress||t.isDisabled)("boxTooltip",t.config.tooltip)("searchType",t.searchType)("withSearchType",!!t.config.searchType)("controlType",t.config.controlType)("formControl",t.parentForm.get(t.config.name))}}function Na(a,l){if(1&a&&e.nrm(0,"cqd-form-tags",22),2&a){const t=e.XpG(2);e.Y8G("max",t.config.max)("label",t.isFilterBarControl&&(null==t.config.filterBar?null:t.config.filterBar.label)||t.config.label)("inputId",t.config.name)("options",t.config.options)("addOnTab",t.config.addOnTab)("addOnBlur",t.config.addOnBlur)("boxTooltip",t.config.tooltip)("allowDuplicate",t.config.allowDuplicate)("formControl",t.parentForm.get(t.config.name))("disabled",t.isSearchInProgress||t.isDisabled)}}function Ba(a,l){if(1&a&&e.nrm(0,"cqd-form-calendar",23),2&a){const t=e.XpG(2);e.Y8G("label",t.isFilterBarControl&&(null==t.config.filterBar?null:t.config.filterBar.label)||t.config.label)("inputId",t.config.name)("control",t.parentForm.get(t.config.name))("disabled",t.isSearchInProgress||t.isDisabled)}}function $a(a,l){if(1&a&&e.nrm(0,"cqd-org-multiple-autocomplete",24),2&a){const t=e.XpG(2);e.Y8G("label",t.isFilterBarControl&&(null==t.config.filterBar?null:t.config.filterBar.label)||t.config.label)("maxSelectedItems",t.config.maxSelectedItems)("formControl",t.parentForm.get(t.config.name))("allowCreateNew",t.config.allowCreateNew)("preInitOptions",t.config.preInitOptions)("queryParams",t.config.queryParams)("disabled",t.isSearchInProgress||t.isDisabled)}}function ja(a,l){if(1&a&&e.nrm(0,"cqd-form-switch-radio",25),2&a){const t=e.XpG(2);e.Y8G("formControl",t.parentForm.get(t.config.name))("control",t.parentForm.get(t.config.name))("falseLabel",t.config.switchRadioOptions.falseLabel)("trueLabel",t.config.switchRadioOptions.trueLabel)("groupId",t.config.switchRadioOptions.groupId)("canBeNull",t.config.switchRadioOptions.canBeNull)("disabled",t.isSearchInProgress||t.isDisabled)}}function ka(a,l){if(1&a&&e.nrm(0,"cqd-three-state-select",26),2&a){const t=e.XpG(2);e.Y8G("label",t.isFilterBarControl&&(null==t.config.filterBar?null:t.config.filterBar.label)||t.config.label)("inputId",t.config.name)("options",t.config.options)("groupBy",t.config.groupBy)("pTooltip",t.config.tooltip)("tooltipStyleClass",t.config.tooltipStyleClass)("disabled",t.isSearchInProgress||t.isDisabled)("formControl",t.parentForm.get(t.config.name))("tooltipPosition",t.config.tooltipPosition||"top")("isManualDropdownClosing",t.config.isManualDropdownClosing)}}function Ua(a,l){if(1&a&&e.nrm(0,"cqd-pcr-autocomplete",27),2&a){const t=e.XpG(2);e.Y8G("label",t.config.label)("formControl",t.parentForm.get(t.config.name))("categoryIds",t.categoryIds)("pTooltip",t.config.tooltip)("tooltipStyleClass",t.config.tooltipStyleClass)("disabled",t.isSearchInProgress||t.isDisabled)("tooltipPosition",t.config.tooltipPosition||"top")("currentOnly",t.config.onlyCurrentPcrs)("preInitOptions",t.config.preInitOptions)("multiple",t.config.multiselect)}}function Ha(a,l){if(1&a&&e.nrm(0,"cqd-three-state-dropdown-list",28),2&a){const t=e.XpG(2);e.Y8G("label",t.isFilterBarControl&&(null==t.config.filterBar?null:t.config.filterBar.label)||t.config.label)("inputId",t.config.name)("options",t.config.options)("groupBy",t.config.groupBy)("dropdownAppendTo",t.dropdownAppendTo)("pTooltip",t.config.tooltip)("tooltipStyleClass",t.config.tooltipStyleClass)("disabled",t.isSearchInProgress||t.isDisabled)("formControl",t.parentForm.get(t.config.name))("tooltipPosition",t.config.tooltipPosition||"top")("isManualDropdownClosing",t.config.isManualDropdownClosing)}}function Va(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-aci-exposure-class",29),e.bIt("hideParentDialog",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.hideParentDialog.emit())})("showParentDialog",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.showParentDialog.emit())}),e.k0s()}if(2&a){const t=e.XpG(2);e.Y8G("formControl",t.parentForm.get(t.config.name))("disabled",t.isSearchInProgress||t.isDisabled)("isMultipleChoicesPerClass",t.config.isMultipleChoices)}}function Xa(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-csa-exposure-class",29),e.bIt("hideParentDialog",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.hideParentDialog.emit())})("showParentDialog",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.showParentDialog.emit())}),e.k0s()}if(2&a){const t=e.XpG(2);e.Y8G("formControl",t.parentForm.get(t.config.name))("disabled",t.isSearchInProgress||t.isDisabled)("isMultipleChoicesPerClass",t.config.isMultipleChoices)}}function Ya(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-en-exposure-class",29),e.bIt("hideParentDialog",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.hideParentDialog.emit())})("showParentDialog",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.showParentDialog.emit())}),e.k0s()}if(2&a){const t=e.XpG(2);e.Y8G("formControl",t.parentForm.get(t.config.name))("disabled",t.isSearchInProgress||t.isDisabled)("isMultipleChoicesPerClass",t.config.isMultipleChoices)}}function za(a,l){if(1&a&&(e.j41(0,"div",1),e.DNE(1,wa,1,13,"cqd-form-unit",2)(2,xa,1,17,"cqd-select",3)(3,Da,1,8,"cqd-form-ratio",4)(4,Fa,1,7,"cqd-form-input",5)(5,Ga,1,7,"cqd-form-input",6)(6,La,1,8,"cqd-form-input",7)(7,Na,1,10,"cqd-form-tags",8)(8,Ba,1,4,"cqd-form-calendar",9)(9,$a,1,7,"cqd-org-multiple-autocomplete",10)(10,ja,1,7,"cqd-form-switch-radio",11)(11,ka,1,10,"cqd-three-state-select",12)(12,Ua,1,10,"cqd-pcr-autocomplete",13)(13,Ha,1,11,"cqd-three-state-dropdown-list",14)(14,Va,1,3,"cqd-aci-exposure-class",15)(15,Xa,1,3,"cqd-csa-exposure-class",15)(16,Ya,1,3,"cqd-en-exposure-class",15),e.k0s()),2&a){const t=e.XpG();e.Y8G("ngSwitch",t.config.controlType),e.R7$(),e.Y8G("ngSwitchCase","unit"),e.R7$(),e.Y8G("ngSwitchCase","select"),e.R7$(),e.Y8G("ngSwitchCase","ratio"),e.R7$(),e.Y8G("ngSwitchCase","range"),e.R7$(),e.Y8G("ngSwitchCase","text"),e.R7$(),e.Y8G("ngSwitchCase","integer"),e.R7$(),e.Y8G("ngSwitchCase","tags"),e.R7$(),e.Y8G("ngSwitchCase","date"),e.R7$(),e.Y8G("ngSwitchCase","org-multiple-autocomplete"),e.R7$(),e.Y8G("ngSwitchCase","switch-radio"),e.R7$(),e.Y8G("ngSwitchCase","three-state-select"),e.R7$(),e.Y8G("ngSwitchCase","pcr-autocomplete"),e.R7$(),e.Y8G("ngSwitchCase","three-state-dropdown-list"),e.R7$(),e.Y8G("ngSwitchCase","aci-exposure-class"),e.R7$(),e.Y8G("ngSwitchCase","csa-exposure-class"),e.R7$(),e.Y8G("ngSwitchCase","en-exposure-class")}}let jt=(()=>{class a{set config(t){this._config=t;const n=this.sessionService.getUserUnitSystem();this.defaultUnit=this.config&&this.config.defaultUnits?this.config.defaultUnits[n]:null,this.config&&this.config.asyncOptions&&this.asyncOptionsService.getAsyncOptions(this.config.asyncOptions).pipe((0,u.s)(1),(0,P.M)(i=>this.config.options=i),(0,Me.j)(()=>this.cdRef.markForCheck())).subscribe()}get config(){return this._config}constructor(t,n,i,s,c,_){this.sessionService=t,this.asyncOptionsService=i,this.permissionsService=s,this.cdRef=c,this.materialTvdService=_,this.searchTypeChange=new e.bkB,this.keydownEvent=new e.bkB,this.hideParentDialog=new e.bkB,this.showParentDialog=new e.bkB,this.parentForm=n.control;const M=this.sessionService.getSecurityPrincipal();this.isUserPilotOrHigher=M.canUsePilotOrHigher()}ngOnChanges(t){(t.category?.currentValue||t.config?.currentValue)&&this.materialTvdService.populateEPDTypes(this.config,!!this.category?.mayContainTrustedVendorDeclarations)}get isDisabled(){return this.disabled&&!(this.config.canUseAdmin&&this.permissionsService.isAdmin())&&!(this.config.canUsePilotOrHigher&&this.isUserPilotOrHigher)}static{this.\u0275fac=function(n){return new(n||a)(e.rXU(g.Q),e.rXU(y.ZU),e.rXU(Wt.K),e.rXU(Ft.K),e.rXU(e.gRc),e.rXU(pa.x))}}static{this.\u0275cmp=e.VBU({type:a,selectors:[["cqd-search-form-fields"]],inputs:{categoryIds:"categoryIds",isSearchInProgress:"isSearchInProgress",category:"category",dropdownAppendTo:"dropdownAppendTo",config:"config",searchType:"searchType",disabled:"disabled",isFilterBarControl:"isFilterBarControl",declaredUnit:"declaredUnit"},outputs:{searchTypeChange:"searchTypeChange",keydownEvent:"keydownEvent",hideParentDialog:"hideParentDialog",showParentDialog:"showParentDialog"},features:[e.OA$],decls:1,vars:1,consts:[[3,"ngSwitch",4,"ngIf"],[3,"ngSwitch"],["class","control",3,"label","inputId","disabled","unitType","pTooltip","tooltipStyleClass","searchType","defaultUnit","plural","placeholder","withSearchType","tooltipPosition","formControl","keydown","searchTypeChange","hideParentDialog","showParentDialog",4,"ngSwitchCase"],[3,"actualizeSelectedItems","label","inputId","options","bindLabel","bindValue","pTooltip","tooltipStyleClass","disabled","multiple","groupBy","
1selectableGroup","maxSelectedItems","formControl","tooltipPosition","isManualDropdownClosing","clearable",4,"ngSwitchCase"],["tooltipPosition","top",3,"pTooltip","label","inputId","disabled","searchType","boxTooltip","formControl","withSearchType","keydown","searchTypeChange","hideParentDialog","showParentDialog",4,"ngSwitchCase"],[3,"label","inputId","disabled","searchType","boxTooltip","formControl","withSearchType","keydown","searchTypeChange","hideParentDialog","showParentDialog",4,"ngSwitchCase"],[3,"label","inputId","disabled","boxTooltip","searchType","withSearchType","formControl","keydown","searchTypeChange","hideParentDialog","showParentDialog",4,"ngSwitchCase"],["type","number",3,"label","inputId","disabled","boxTooltip","searchType","withSearchType","controlType","formControl","keydown","searchTypeChange","hideParentDialog","showParentDialog",4,"ngSwitchCase"],[3,"max","label","inputId","options","addOnTab","addOnBlur","boxTooltip","allowDuplicate","formControl","disabled",4,"ngSwitchCase"],[3,"label","inputId","control","disabled",4,"ngSwitchCase"],[3,"label","maxSelectedItems","formControl","allowCreateNew","preInitOptions","queryParams","disabled",4,"ngSwitchCase"],[3,"formControl","control","falseLabel","trueLabel","groupId","canBeNull","disabled",4,"ngSwitchCase"],[3,"label","inputId","options","groupBy","pTooltip","tooltipStyleClass","disabled","formControl","tooltipPosition","isManualDropdownClosing",4,"ngSwitchCase"],[3,"label","formControl","categoryIds","pTooltip","tooltipStyleClass","disabled","tooltipPosition","currentOnly","preInitOptions","multiple",4,"ngSwitchCase"],[3,"label","inputId","options","groupBy","dropdownAppendTo","pTooltip","tooltipStyleClass","disabled","formControl","tooltipPosition","isManualDropdownClosing",4,"ngSwitchCase"],[3,"formControl","disabled","isMultipleChoicesPerClass","hideParentDialog","showParentDialog",4,"ngSwitchCase"],[1,"control",3,"keydown","searchTypeChange","hideParentDialog","showParentDialog","label","inputId","disabled","unitType","pTooltip","tooltipStyleClass","searchType","defaultUnit","plural","placeholder","withSearchType","tooltipPosition","formControl"],[3,"actualizeSelectedItems","label","inputId","options","bindLabel","bindValue","pTooltip","tooltipStyleClass","disabled","multiple","groupBy","
1selectableGroup","maxSelectedItems","formControl","tooltipPosition","isManualDropdownClosing","clearable"],["tooltipPosition","top",3,"keydown","searchTypeChange","hideParentDialog","showParentDialog","pTooltip","label","inputId","disabled","searchType","boxTooltip","formControl","withSearchType"],[3,"keydown","searchTypeChange","hideParentDialog","showParentDialog","label","inputId","disabled","searchType","boxTooltip","formControl","withSearchType"],[3,"keydown","searchTypeChange","hideParentDialog","showParentDialog","label","inputId","disabled","boxTooltip","searchType","withSearchType","formControl"],["type","number",3,"keydown","searchTypeChange","hideParentDialog","showParentDialog","label","inputId","disabled","boxTooltip","searchType","withSearchType","controlType","formControl"],[3,"max","label","inputId","options","addOnTab","addOnBlur","boxTooltip","allowDuplicate","formControl","disabled"],[3,"label","inputId","control","disabled"],[3,"label","maxSelectedItems","formControl","allowCreateNew","preInitOptions","queryParams","disabled"],[3,"formControl","control","falseLabel","trueLabel","groupId","canBeNull","disabled"],[3,"label","inputId","options","groupBy","pTooltip","tooltipStyleClass","disabled","formControl","tooltipPosition","isManualDropdownClosing"],[3,"label","formControl","categoryIds","pTooltip","tooltipStyleClass","disabled","tooltipPosition","currentOnly","preInitOptions","multiple"],[3,"label","inputId","options","groupBy","dropdownAppendTo","pTooltip","tooltipStyleClass","disabled","formControl","tooltipPosition","isManualDropdownClosing"],[3,"hideParentDialog","showParentDialog","formControl","disabled","isMultipleChoicesPerClass"]],template:function(n,i){1&n&&e.DNE(0,za,17,17,"div",0),2&n&&e.Y8G("ngIf",i.parentForm&&(i.isFilterBarControl||!i.config.hideFromSearch))},dependencies:[N.bT,N.ux,N.e1,y.BC,y.l_,be.m,ct.w,_a.S,on.S,ha.L,rn.I,ln.S,ga.P,ma.J,ua.T,Sa.L,ya,Oa.s,va.w,Ia.w],encapsulation:2,changeDetection:0})}}return a})();const pn=a=>({controlConfig:a});function Wa(a,l){if(1&a&&e.eu8(0,13),2&a){const t=l.$implicit;e.XpG(4);const n=e.sdS(2);e.Y8G("ngTemplateOutlet",n)("ngTemplateOutletContext",e.eq3(2,pn,t))}}function qa(a,l){if(1&a&&(e.qex(0),e.j41(1,"cqd-toggleable-fieldset",14),e.DNE(2,Wa,1,4,"ng-container",15),e.k0s(),e.bVm()),2&a){const t=e.XpG().$implicit,n=e.XpG(2);e.R7$(),e.Y8G("header",t.label)("collapsed",t.collapsed),e.R7$(),e.Y8G("ngForOf",n.getFieldSetFields(t.fieldSet))}}function Ka(a,l){}function Qa(a,l){if(1&a&&(e.qex(0),e.DNE(1,qa,3,3,"ng-container",12)(2,Ka,0,0,"ng-template",13,1,e.C5r),e.bVm()),2&a){const t=l.$implicit,n=e.sdS(3);e.XpG(2);const i=e.sdS(2);e.R7$(),e.Y8G("ngIf",t.isFieldSet)("ngIfElse",n),e.R7$(),e.Y8G("ngTemplateOutlet",i)("ngTemplateOutletContext",e.eq3(4,pn,t))}}function Ja(a,l){if(1&a){const t=e.RV6();e.j41(0,"p-panel",5),e.nI1(1,"async"),e.bIt("collapsedChange",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onCollapsedChange(i))}),e.j41(2,"p-header")(3,"div",6)(4,"span",7),e.pXf(5,2),e.k0s(),e.j41(6,"button",8),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.resetSearchForm.emit())}),e.pXf(7,3),e.k0s()()(),e.j41(8,"div",9)(9,"div",10),e.DNE(10,Qa,4,6,"ng-container",11),e.k0s()()()}if(2&a){const t=e.XpG();e.Y8G("toggleable",!0)("collapsed",!(e.bMT(1,3,t.shouldExpand$)||t.introShown)),e.R7$(10),e.Y8G("ngForOf",t.formFields)}}function Za(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-search-form-fields",16),e.bIt("searchTypeChange",function(i){const s=e.eBV(t).controlConfig,c=e.XpG();return e.Njj(c.onSearchTypeChange(s.name,i))})("hideParentDialog",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.hideParentDialog.emit())})("showParentDialog",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.showParentDialog.emit())}),e.k0s()}if(2&a){const t=l.controlConfig,n=e.XpG();e.HbH(t.className),e.Y8G("config",t)("disabled",t.disabled)("isSearchInProgress",n.isSearchInProgress)("searchType",n.getSearchType(t))("declaredUnit",n.declaredUnit)}}let es=(()=>{class a extends Nt{constructor(){super(...arguments),this.resetSearchForm=new e.bkB}ngOnInit(){super.ngOnInit(),this.shouldExpandSource.next(!0)}getSearchType(t){const{name:n}=t;return this.formService.getControlSearchType(n)}getFieldSetFields(t){return Object.values(t)}static{this.\u0275fac=(()=>{let t;return function(i){return(t||(t=e.xGo(a)))(i||a)}})()}static{this.\u0275cmp=e.VBU({type:a,selectors:[["cqd-design-intent-form-block"]],outputs:{resetSearchForm:"resetSearchForm"},features:[e.Vt3],decls:3,vars:1,consts:()=>{let t,n;return t=$localize`:section header|An introduction header for Performance Specificationsâbcfe8127d7c85ad3726d0ab4105f81a128f7818dâ1062936215969760155: Performance Specifications `,n=$localize`:âc741e919cae3e4e5d7a6e43da8926bb99b1fd780â6915841853172879888: Reset `,[["formField",""],["singleFormField",""],t,n,["id","ms-p1-s4","class","panel-collapse",3,"toggleable","collapsed","collapsedChange",4,"ngIf"],["id","ms-p1-s4",1,"panel-collapse",3,"collapsedChange","toggleable","collapsed"],[1,"header-wrapper"],[1,"header-label"],["pButton","","type","button",1,"button","button-small","button--grey",3,"click"],[1,"panel-body","p-g"],[1,"p-g-12","grid-container"],[4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-g-12","fieldset",3,"header","collapsed"],[3,"ngTemplateOutlet","ngTemplateOutletContext",4,"ngFor","ngForOf"],[3,"searchTypeChange","hideParentDialog","showParentDialog","config","disabled","isSearchInProgress","searchType","declaredUnit"]]},template:function(n,i){1&n&&e.DNE(0,Ja,11,5,"p-panel",4)(1,Za,1,7,"ng-template",null,0,e.C5r),2&n&&e.Y8G("ngIf",i.formFields.length>0)},dependencies:[N.Sq,N.bT,N.T3,ye._f,Ae.Y9,ke.Z,da._,jt,N.Jj],styles:["[_nghost-%COMP%] cqd-form-switch-radio .radio-wrapper{height:30px}[_nghost-%COMP%] cqd-search-form-fields{position:relative}[_nghost-%COMP%] cqd-search-form-fields .error-message{left:95%;bottom:initial}[_nghost-%COMP%] .fieldset .custom-legend-text{padding:0!important}.search-form-toggler[_ngcontent-%COMP%]{float:right}.header-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center}.header-label[_ngcontent-%COMP%]{flex:1}"],changeDetection:0})}}return a})();var ts=o(1377);function ns(a,l){if(1&a){const t=e.RV6();e.j41(0,"button",10),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onShowPlantsMap())}),e.nrm(1,"img",11),e.k0s()}if(2&a){const t=e.XpG();e.Y8G("pTooltip",t.disabledMapButtonTooltip)("disabled",t.disableMapButton||t.noResultsFound),e.R7$(),e.Y8G("src",t.assetsUrl+"assets/svg/google-map.svg",e.B4B)}}function is(a,l){1&a&&(e.j41(0,"div",7),e.nrm(1,"cqd-form-input",12),e.k0s()),2&a&&(e.R7$(),e.Y8G("disabled",!0))}let as=(()=>{class a extends Nt{constructor(t){super(),this.sessionService=t,this.disableMapButton=!1,this.noResultsFound=!1,this.changePlantsMapVisibility=new e.bkB,this.unitTypes=te.Sy,this.shouldShowGeographyTreeSelectModal=!1,this.geographyItemsHierarchy=Gt.lK,this.tooltips=ee.vX}get disabledMapButtonTooltip(){return this.disableMapButton?ee.vX.doSearchToViewPlantMap:this.noResultsFound?ee.vX.noResultsWereFoundPlantMap:ee.vX.plantMap}ngOnInit(){super.ngOnInit(),this.isPilotOrHigher=this.sessionService.getSecurityPrincipal().canUsePilotOrHigher(),this.shouldExpandSource.next(!0)}setSelectedItems(t){this.selectedItems=t?.map(n=>({label:n.data.name,value:n}))||[],t&&this.geographyItemsToApplicableIn(t)}
1onFocus(){this.shouldShowGeographyTreeSelectModal=!0}onShowPlantsMap(){this.changePlantsMapVisibility.emit()}plantDistanceLabel(){return this.withBuilding?this.hasAddress?$localize`Max Distance from Project Site`:$localize`Add address to enable distance search`:$localize`Distance Search only available in Building Projects`}plantDistanceTooltip(){return this.withBuilding?this.hasAddress?$localize`Select only materials produced at plants within a certain distance (miles or km) from the project site address. You can filter by distance, or by jurisdiction, or both.`:$localize`EC3 can search by max distance from the manufacturing facility to the project site, but currently the project site has no registered address. Please add an address to the project, which will enable distance searches for all material collections`:$localize`To search by distance, create a Project with a valid address. Create at least one Element, and select Search. The Search function is the same as Find/Compare Materials, but accepts distances in miles or km from the construction site`}geographyItemsToApplicableIn(t){return t?(0,Gt.Hi)(t):[]}static{this.\u0275fac=function(n){return new(n||a)(e.rXU(g.Q))}}static{this.\u0275cmp=e.VBU({type:a,selectors:[["cqd-geographic-form-block"]],inputs:{jurisdictionForm:"jurisdictionForm",distanceControl:"distanceControl",hasAddress:"hasAddress",disableMapButton:"disableMapButton",noResultsFound:"noResultsFound"},outputs:{changePlantsMapVisibility:"changePlantsMapVisibility"},features:[e.Vt3],decls:13,vars:14,consts:()=>{let t,n,i,s,c;return t=$localize`:âd2a2915d79ff31439a174fc3a147004542291e29â5813867925497374051:Map`,n=$localize`:â951d6fbb99fbc70cc1c4bfe6c44628c26bc4f2c9â3012231561587019282:Geography`,i=$localize`:âc4c510f951d6124449062dec039a20f438499868â8734420180257937547:Jurisdiction(s) in which product is available. 'Global' is the default`,s=$localize`:â18c4d4996f8fb9e09f854ca2f83b8f9ace0838d6â5978238302104639867: Geographic `,c=$localize`:âf5ca65ad07f116548286195c28ee9415b0ab9da6â2915460427694942419:GWP Transport Cost`,[s,["id","ms-p1-s6",1,"panel-collapse",3,"collapsedChange","toggleable","collapsed"],["class","button button-small button--light-blue","pButton","","tooltipPosition","top","label",t,3,"pTooltip","disabled","click",4,"ngIf"],[1,"panel-body","p-g"],[1,"p-g-12"],[1,"p-g-12","p-md-6","p-lg-8"],["label",n,"tooltip",i,3,"geographyItemsHierarchy","formControl","disabled"],[1,"p-g-12","p-md-6","p-lg-4"],["inputId","plantDistance","tooltipPosition","top",3,"label","disabled","pTooltip","formControl","unitType"],["class","p-g-12 p-md-6 p-lg-4",4,"ngIf"],["pButton","","tooltipPosition","top","label",t,1,"button","button-small","button--light-blue",3,"click","pTooltip","disabled"],["alt","",1,"map-button-icon",3,"src"],["label",c,"inputId","gwpCost",3,"disabled"]]},template:function(n,i){1&n&&(e.j41(0,"p-panel",1),e.nI1(1,"async"),e.bIt("collapsedChange",function(c){return i.onCollapsedChange(c)}),e.j41(2,"p-header")(3,"span"),e.pXf(4,0),e.k0s(),e.DNE(5,ns,2,3,"button",2),e.k0s(),e.j41(6,"div",3)(7,"div",4)(8,"div",5),e.nrm(9,"cqd-geography-select",6),e.k0s(),e.j41(10,"div",7),e.nrm(11,"cqd-form-unit",8),e.k0s(),e.DNE(12,is,2,1,"div",9),e.k0s()()()),2&n&&(e.Y8G("toggleable",!0)("collapsed",!(e.bMT(1,12,i.shouldExpand$)||i.introShown)),e.R7$(5),e.Y8G("ngIf",i.isPilotOrHigher),e.R7$(4),e.Y8G("geographyItemsHierarchy",i.geographyItemsHierarchy)("formControl",i.jurisdictionForm)("disabled",i.isSearchInProgress),e.R7$(2),e.Y8G("label",i.plantDistanceLabel())("disabled",i.isSearchInProgress||!i.withBuilding||!i.hasAddress)("pTooltip",i.plantDistanceTooltip())("formControl",i.distanceControl)("unitType",i.unitTypes.distance),e.R7$(),e.Y8G("ngIf",i.withBuilding))},dependencies:[N.bT,y.BC,y.l_,ye._f,Ae.Y9,be.m,ke.Z,on.S,rn.I,ts.o,N.Jj],styles:["cqd-form-field[_ngcontent-%COMP%] {position:relative}cqd-form-field[_ngcontent-%COMP%] .error-message{left:95%;bottom:initial}p-header[_ngcontent-%COMP%]{display:flex!important;align-items:center;justify-content:space-between}p-header[_ngcontent-%COMP%]:after{display:none!important}.map-button-icon[_ngcontent-%COMP%]{width:22px}"],changeDetection:0})}}return a})();function ss(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-search-form-fields",5),e.bIt("searchTypeChange",function(i){const s=e.eBV(t).$implicit,c=e.XpG();return e.Njj(c.onSearchTypeChange(s.name,i))})("hideParentDialog",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.hideParentDialog.emit())})("showParentDialog",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.showParentDialog.emit())}),e.k0s()}if(2&a){const t=l.$implicit,n=e.XpG();e.HbH(t.className),e.Y8G("categoryIds",n.hierarchyCategoryIds)("config",t)("disabled",t.disabled)("isSearchInProgress",n.isSearchInProgress)("searchType",n.searchTypes[t.name])("category",n.c
1ategory)}}let os=(()=>{class a extends Nt{constructor(t){super(),this.categoryService=t}ngOnInit(){super.ngOnInit(),this.shouldExpandSource.next(!1)}ngOnChanges(t){super.ngOnChanges(t),t.category&&this.categoryService.getCategoriesHierarchyListById(t.category.currentValue.id).pipe((0,h.Q)(this.destroy$),(0,m.T)(i=>i.map(s=>s.id))).subscribe(i=>this.hierarchyCategoryIds=i)}static{this.\u0275fac=function(n){return new(n||a)(e.rXU(G.M))}}static{this.\u0275cmp=e.VBU({type:a,selectors:[["cqd-advanced-form-block"]],inputs:{category:"category"},features:[e.Vt3,e.OA$],decls:8,vars:5,consts:()=>{let t;return t=$localize`:â358695408485dfbe691e68adacd62c58bc367a07â4231832305442792261: More... `,[t,["id","ms-p1-s7",1,"panel-collapse",3,"collapsedChange","toggleable","collapsed"],[1,"panel-body","p-g"],[1,"p-g-12"],[3,"class","categoryIds","config","disabled","isSearchInProgress","searchType","category","searchTypeChange","hideParentDialog","showParentDialog",4,"ngFor","ngForOf"],[3,"searchTypeChange","hideParentDialog","showParentDialog","categoryIds","config","disabled","isSearchInProgress","searchType","category"]]},template:function(n,i){1&n&&(e.j41(0,"p-panel",1),e.nI1(1,"async"),e.bIt("collapsedChange",function(c){return i.onCollapsedChange(c)}),e.j41(2,"p-header")(3,"span"),e.pXf(4,0),e.k0s()(),e.j41(5,"div",2)(6,"div",3),e.DNE(7,ss,1,8,"cqd-search-form-fields",4),e.k0s()()()),2&n&&(e.Y8G("toggleable",!0)("collapsed",!(e.bMT(1,3,i.shouldExpand$)||i.introShown)),e.R7$(7),e.Y8G("ngForOf",i.formFields))},dependencies:[N.Sq,Ae.Y9,ke.Z,jt,N.Jj],styles:["cqd-form-field[_ngcontent-%COMP%] {position:relative}cqd-form-field[_ngcontent-%COMP%] .error-message{left:95%;top:-6px;bottom:initial}"],changeDetection:0})}}return a})();var _n=o(6691);function rs(a,l){1&a&&e.nrm(0,"div",7)}function ls(a,l){1&a&&e.nrm(0,"div",7)}function cs(a,l){if(1&a){const t=e.RV6();e.j41(0,"button",8),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onMultiple())}),e.j41(1,"div",3),e.nrm(2,"img",4),e.DNE(3,ls,1,0,"div",5),e.k0s()()}if(2&a){const t=e.XpG();e.Y8G("label","Update "+t.elementsWithSameCollectionCount+" elements")("disabled",t.disabled),e.R7$(2),e.Y8G("src",t.assetsUrl+"assets/svg/checked.svg",e.B4B),e.R7$(),e.Y8G("ngIf",t.isInProgress&&t.isMultiple)}}let ds=(()=>{class a extends _n.W{constructor(){super(...arguments),this.submitEvent=new e.bkB}set isInProgress(t){this._isInProgress=t,t||(this.isSingle=this.isMultiple=!1)}get isInProgress(){return this._isInProgress}onSingle(){this.isSingle=!0,this.submitEvent.emit(!0)}onMultiple(){this.isMultiple=!0,this.submitEvent.emit(!1)}static{this.\u0275fac=(()=>{let t;return function(i){return(t||(t=e.xGo(a)))(i||a)}})()}static{this.\u0275cmp=e.VBU({type:a,selectors:[["cqd-search-actions"]],inputs:{elementsWithSameCollectionCount:"elementsWithSameCollectionCount",currentCollectionId:"currentCollectionId",disabled:"disabled",tooltip:"tooltip",isInProgress:"isInProgress"},outputs:{submitEvent:"submitEvent"},features:[e.Vt3],decls:8,vars:7,consts:[[1,"btns-wrapper"],["tooltipPosition","top",3,"pTooltip"],["pButton","","icon","pi",1,"button","button--light-blue","update-current-element",3,"click","label","disabled"],[1,"btn-icon-wrapper"],["alt","",3,"src"],["class","loading",4,"ngIf"],["class","button button--light-blue update-all-elements","pButton","",3,"label","disabled","click",4,"ngIf"],[1,"loading"],["pButton","",1,"button","button--light-blue","update-all-elements",3,"click","label","disabled"]],template:function(n,i){1&n&&(e.j41(0,"div",0)(1,"div",1)(2,"button",2),e.bIt("click",function(){return i.onSingle()}),e.j41(3,"div",3),e.nrm(4,"img",4),e.DNE(5,rs,1,0,"div",5),e.k0s()()(),e.j41(6,"div",1),e.DNE(7,cs,4,4,"button",6),e.k0s()()),2&n&&(e.R7$(),e.Y8G("pTooltip",i.disabled&&i.tooltip),e.R7$(),e.Y8G("label",i.currentCollectionId?"Change this element":"Use this collection")("disabled",i.disabled),e.R7$(2),e.Y8G("src",i.assetsUrl+"assets/svg/checked.svg",e.B4B),e.R7$(),e.Y8G("ngIf",i.isInProgress&&i.isSingle),e.R7$(),e.Y8G("pTooltip",i.disabled&&i.tooltip),e.R7$(),e.Y8G("ngIf",i.elementsWithSameCollectionCount>1))},dependencies:[N.bT,ye._f,be.m],styles:[".update-all-elements[_ngcontent-%COMP%]{margin-left:20px}.btns-wrapper[_ngcontent-%COMP%]{display:flex}.btns-wrapper[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{display:flex;align-items:center}.btns-wrapper[_ngcontent-%COMP%] .button[_ngcontent-%COMP%] .btn-icon-wrapper[_ngcontent-%COMP%]{position:relative;display:flex}.btns-wrapper[_ngcontent-%COMP%] .button[_ngcontent-%COMP%] .btn-icon-wrapper[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%]{position:relative;right:16px}.btns-wrapper[_ngcontent-%COMP%] .button[_ngcontent-%COMP%] .btn-icon-wrapper[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%]:before{border-top-color:#fff}"],changeDetection:0})}}return a})(),ps=(()=>{class a extends rt.y{constructor(){super(...arguments),this.completeEvent=ne
1w e.bkB,this.control=new y.MJ([])}onSubmit(){this.completeEvent.emit(this.control.value)}ngOnChanges(t){t.options&&this.control.setValue(t.options.currentValue.map(n=>n.value))}static{this.\u0275fac=(()=>{let t;return function(i){return(t||(t=e.xGo(a)))(i||a)}})()}static{this.\u0275cmp=e.VBU({type:a,selectors:[["cqd-element-select-modal"]],inputs:{options:"options"},outputs:{completeEvent:"completeEvent"},features:[e.Vt3,e.OA$],decls:4,vars:7,consts:()=>{let t,n,i;return t=$localize`:â9fd12480bae51ef73c3f1136b5e120ab7e48cb51â8994912608051356327:Apply Collection to`,n=$localize`:âcdb1d7b065a59509471520408d8bd80892f544a9â6856981935030444519:Elements`,i=$localize`:âc2d0ac9f528bbd5f53fd34269fde8b59e029621bâ4391289919356861627:Apply`,[["header",t,"styleClass","element-select-modal",3,"hide","appendTo","visible","dialogWidth"],["label",n,"appendTo",".element-select-modal",1,"flex-wrap-ng-value-container",3,"multiple","options","formControl"],[1,"button-action","text-center"],["pButton","","label",i,1,"button","button--green",3,"click","disabled"]]},template:function(n,i){1&n&&(e.j41(0,"cqd-modal",0),e.bIt("hide",function(){return i.onHide()}),e.nrm(1,"cqd-select",1),e.j41(2,"div",2)(3,"button",3),e.bIt("click",function(){return i.onSubmit()}),e.k0s()()()),2&n&&(e.Y8G("appendTo",i.appendTo)("visible",i.visible)("dialogWidth",700),e.R7$(),e.Y8G("multiple",!0)("options",i.options)("formControl",i.control),e.R7$(2),e.Y8G("disabled",!i.control.value.length))},dependencies:[y.BC,y.l_,ye._f,ct.w,rt.y],styles:[".flex-wrap-ng-value-container[_ngcontent-%COMP%] .ng-value-container{flex-wrap:wrap!important}.flex-wrap-ng-value-container[_ngcontent-%COMP%] .ng-value-container .ng-value{display:inline-flex}.flex-wrap-ng-value-container[_ngcontent-%COMP%] .ng-value-container .ng-value-label{max-width:580px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}"],changeDetection:0})}}return a})(),_s=(()=>{class a{static{this.\u0275fac=function(n){return new(n||a)}}static{this.\u0275cmp=e.VBU({type:a,selectors:[["cqd-material-search-form-spinner"]],decls:35,vars:0,consts:[[1,"ssc","ssc-card","ssc-wrapper"],[1,"ssc-head-line","w-100","mbs"],[1,"flex","align-start","justify-between"],[1,"ssc-wrapper","w-70"],[1,"ssc-card","ssc-wrapper","mbs"],[1,"ssc-head-line","w-100","mb"],[1,"flex","align-center","justify-between"],[1,"ssc-line","w-30","mbs"],[1,"ssc-line","w-60","mbs"],[1,"ssc-wrapper","w-30"],[1,"ssc-square","w-100"]],template:function(n,i){1&n&&(e.j41(0,"div",0),e.nrm(1,"div",1),e.j41(2,"div",2)(3,"div",3)(4,"div",4),e.nrm(5,"div",5),e.j41(6,"div",6),e.nrm(7,"div",7)(8,"div",7)(9,"div",7),e.k0s(),e.j41(10,"div",6),e.nrm(11,"div",7)(12,"div",7)(13,"div",7),e.k0s(),e.j41(14,"div",6),e.nrm(15,"div",7)(16,"div",7)(17,"div",7),e.k0s()(),e.j41(18,"div",4),e.nrm(19,"div",5),e.j41(20,"div",6),e.nrm(21,"div",8)(22,"div",7),e.k0s()(),e.j41(23,"div",4),e.nrm(24,"div",5),e.j41(25,"div",6),e.nrm(26,"div",7)(27,"div",7)(28,"div",7),e.k0s(),e.j41(29,"div",6),e.nrm(30,"div",7)(31,"div",7)(32,"div",7),e.k0s()()(),e.j41(33,"div",9),e.nrm(34,"div",10),e.k0s()()())},styles:[".ssc-square[_ngcontent-%COMP%]{height:350px}"]})}}return a})();var hs=o(843);const gs=a=>({"search-page":a}),ms=(a,l,t)=>({broken:a,"wrong-dimensionality":l,"ge-with-errors":t}),us=a=>({highlighted:a});function Ss(a,l){1&a&&e.nrm(0,"div",7)}function fs(a,l){if(1&a&&(e.j41(0,"tr")(1,"th",11),e.EFF(2,"Name"),e.k0s(),e.j41(3,"th",12),e.EFF(4,"Publisher"),e.k0s(),e.j41(5,"th",13),e.EFF(6,"Jurisdiction"),e.k0s(),e.j41(7,"th",14),e.EFF(8," Achievable "),e.k0s(),e.j41(9,"th",15),e.EFF(10," Average "),e.k0s(),e.j41(11,"th",16),e.EFF(12," Conservative Estimate "),e.k0s(),e.nrm(13,"th",17),e.k0s()),2&a){const t=e.XpG(2);e.R7$(13),e.Y8G("ngClass",e.eq3(1,gs,!t.selectMaterialEnabled))}}function Cs(a,l){if(1&a&&e.EFF(0),2&a){const t=e.XpG().$implicit;e.SpI(" The selected Generic Estimate (",t.openXpdUuid,") is no longer valid, due to failing EC3 quality checks. To clear this error, de-select this Generic Estimate or contact the EPD program operator to have the correct data entered. ")}}function Ts(a,l){if(1&a){const t=e.RV6();e.j41(0,"button",26),e.bIt("click",function(){e.eBV(t);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.onToggleSelect({data:i}))}),e.k0s()}}function Ms(a,l){if(1&a&&(e.DNE(0,Cs,1,1,"ng-template",null,1,e.C5r),e.j41(2,"tr",18)(3,"td",19)(4,"span",20),e.EFF(5,"Broken:"),e.k0s(),e.EFF(6),e.k0s(),e.j41(7,"td",19),e.EFF(8),e.k0s(),e.j41(9,"td",19),e.EFF(10),e.k0s(),e.j41(11,"td",21),e.EFF(12),e.k0s(),e.j41(13,"td",21),e.EFF(14),e.k0s(),e.j41(15,"td",21)(16,"span",22),e.EFF(17),e.k0s()(),e.j41(18,"td",23),e.DNE(19,Ts,1,0,"button",24),e.j41(20,"a",25),e.EFF(21,"Open"),e.k0s()()()),2&a){const t=l.$implicit,n=e.sdS(1),i=e.XpG(2);e.R7$(2),e.Y8G("ngxTippy",t.qaStatus===i.QaStatuses.Error?n:null)("pSelectableRow",t)("pSelectableRowDisabled",!i.selectMaterialEnabled)("ngClass",e.sMw(22,ms,!t.processedDeclaredUnit,i.isWrongDimensionality(t.processedDeclaredUnit),t.qaStatus===i.QaStatuses.Error)),e.R7$(),e.Y8G("pTooltip",t.name)("cqdHideTooltipIfTextFits",t.name),e.R7$(3),e.SpI(" ",t.name," "),e.R7$(),e.Y8G("pTooltip",t.publisher.name)("cqdHideTooltipIfTextFits",t.publisher.name),e.R7$(),e.SpI(" ",t.publisher.name," "),e.R7$(),e.Y8G("pTooltip",i.parseGeography(t.geography))("cqdHideTooltipIfTextFits",i.parseGeography(t.geography)),e.R7$(),e.SpI(" ",i.parseGeography(t.geography)," "),e.R7$(),e.Y8G("pTooltip",i.getWarningTooltip(t.processedDeclaredUnit)),e.R7$(),e.SpI(" ",i.format(t.bestPractice,t.processedDeclaredUnit)," "),e.R7$(),e.Y8G("pTooltip",i.getWarningTooltip(t.processedDeclaredUnit)),e.R7$(),e.SpI(" ",i.format(t.average,t.processedDeclaredUnit)," "),e.R7$(),e.Y8G("pTooltip",i.getWarningTooltip(t.processedDeclaredUnit)),e.R7$(),e.Y8G("ngClass",e.eq3(26,us,i.isEpdRangeHighlighterEnabledSignal()&&i.isGwpLessOrEqualsBaselineGwp(t.conservativeEstimate,t.processedDeclaredUnit))),e.R7$(),e.SpI(" ",i.format(t.conservativeEstimate,t.processedDeclaredUnit)," "),e.R7$(2),e.Y8G("ngIf",i.selectMaterialEnabled),e.R7$(),e.Y8G("href",i.routes.dashboard.genericEstimates.url+"/"+(t.openXpdUui
1d||t.id),e.B4B)}}function Es(a,l){if(1&a){const t=e.RV6();e.qex(0),e.j41(1,"p-table",8),e.bIt("onLazyLoad",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onLazyLoad(i))})("onRowSelect",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onRowSelect(i))})("onRowUnselect",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onRowUnselect())}),e.mxI("selectionChange",function(i){e.eBV(t);const s=e.XpG();return e.DH7(s.selectedGenericEstimate,i)||(s.selectedGenericEstimate=i),e.Njj(i)}),e.DNE(2,fs,14,3,"ng-template",9)(3,Ms,22,28,"ng-template",10),e.k0s(),e.bVm()}if(2&a){const t=e.XpG();e.R7$(),e.Y8G("value",t.genericEstimates)("loading",t.loading)("first",t.pageFirst)("rows",t.rowsCount)("lazy",!0)("totalRecords",t.totalCount)("paginator",t.totalCount>t.rowsCount)("lazyLoadOnInit",!1),e.R50("selection",t.selectedGenericEstimate)}}function bs(a,l){1&a&&(e.j41(0,"div",28)(1,"div",29)(2,"div",30),e.nrm(3,"div",31)(4,"div",32)(5,"div",32)(6,"div",32)(7,"div",32)(8,"div",33),e.k0s(),e.j41(9,"div",30),e.nrm(10,"div",31)(11,"div",32)(12,"div",32)(13,"div",32)(14,"div",32)(15,"div",33),e.k0s(),e.j41(16,"div",30),e.nrm(17,"div",31)(18,"div",32)(19,"div",32)(20,"div",32)(21,"div",32)(22,"div",33),e.k0s()()())}function As(a,l){if(1&a&&e.DNE(0,bs,23,0,"div",27),2&a){const t=e.XpG();e.Y8G("ngIf",t.loading)}}let Ps=(()=>{class a extends en{constructor(){super(...arguments),this.genericEstimates=[],this.selectGenericEstimate=new e.bkB}onToggleSelect(t){this.selectedGenericEstimate&&this.selectedGenericEstimate.id===t.data.id?this.onRowUnselect():this.onRowSelect(t)}onRowSelect(t){const n=new hs.z(t.data);this.selectGenericEstimate.next(n)}onRowUnselect(){this.selectGenericEstimate.next(null)}getWarningTooltip(t){return this.isWrongDimensionality(t)?ee.vX.wrongDimensionality("Generic Estimate"):null}static{this.\u0275fac=(()=>{let t;return function(i){return(t||(t=e.xGo(a)))(i||a)}})()}static{this.\u0275cmp=e.VBU({type:a,selectors:[["cqd-generic-estimates-statistics-table"]],inputs:{genericEstimates:"genericEstimates",selectedGenericEstimate:"selectedGenericEstimate"},outputs:{selectGenericEstimate:"selectGenericEstimate"},features:[e.Vt3],decls:9,vars:6,consts:()=>{let t,n,i,s,c;return t=$localize`:âf9a49cc97c3f98b40c9b7b39201ebd240823d635â3297843615920666550:20% of products covered by this Generic Estimate are estimated to have GWP lower than this value, based on the values reported, the specificity of the Generic Estimate, and the estimated standard deviation of products in this category. The value is per unit of the product shown under 'Declared Unit'`,n=$localize`:â76fd5c03a1acc9093577a32dd612c209be927e8câ775952284930356770:This is the GWP impact given in the Generic Estimate per unit of the product shown under 'Declared Unit'`,i=$localize`:â7dcc8b7396dd67d7a5778d78d987d3c621c108cbâ7535544088672824376:80% of products covered by this Generic Estimate are estimated to have GWP lower than this value, based on the values reported, the specificity of the Generic Estimate, and the estimated standard deviation of products in this category. The value is per unit of the product shown under 'Declared Unit'`,s=$localize`:â1dad7559989f53f4a313ee732a4c4d7e93b4b78eâ80856595770326868:-S-`,c=$localize`:â52de2ddcecb6ea3613737b6bbb81e4cd9d07fe84â6902099140679292739:Select this Generic Estimate. You can also select the Generic Estimate by clicking anywhere in its row. The chosen Generic Estimate will be used instead of the Search Statistics when calculating Conservative and Achievable values.`,[["loadingTemplate",""],["genericEstimateWithErrorTooltip",""],[1,"panel-collapse",3,"onAfterToggle","collapsed","toggleable"],[1,"header"],[1,"label"],["class","loading",4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"loading"],["cqdShowResponsiveTableHead","","selectionMode","single","dataKey","id",3,"onLazyLoad","onRowSelect","onRowUnselect","selectionChange","value","loading","first","rows","lazy","totalRecords","paginator","lazyLoadOnInit","selection"],["pTemplate","header"],["pTemplate","body"],[1,"name"],[1,"publisher"],[1,"jurisdiction"],["tooltipPosition","top","pTooltip",t,1,"achivable"],["tooltipPosition","top","pTooltip",n,1,"average"],["tooltipPosition","top","pTooltip",i,1,"conservative"],[1,"action-row-header",3,"ngClass"],[3,"ngxTippy","pSelectableRow","pSelectableRowDisabled","ngClass"],["tooltipPosition","top","tooltipStyleClass","desc-tooltip",3,"pTooltip","cqdHideTooltipIfTextFits"],[1,"broken-label"],["tooltipPosition","top",3,"pTooltip"],[3,"ngClass"],[1,"buttons-row"],["class","button button-select button-small button--green","pButton","","type","button","label",s,"pTooltip",c,"tooltipPosition","left",3,"click",4,"ngIf"],["target","_blank","rel","noopener",1,"open-ge-btn","link","button","button-small","button--light-blue",3,"href"],["pButton","","type","button","label",s,"pTooltip",c,"tooltipPosition","left",1,"button","button-select","button-small","button--green",3,"click"],["class","ssc ssc-card",4,"ngIf"],[1,"ssc","ssc-card"],[1,"ssc-wrapper"],[1,"flex","align-center","justify-between"],[1,"ssc-line","w-30","mbs"],[1,"ssc-line","w-10","mbs"],[1,"ssc-line","w-20","mbs"]]}
1,template:function(n,i){if(1&n){const s=e.RV6();e.j41(0,"p-panel",2),e.bIt("onAfterToggle",function(_){return e.eBV(s),e.Njj(i.isPanelCollapsed=_.collapsed)}),e.j41(1,"p-header",3)(2,"span",4),e.EFF(3),e.k0s(),e.DNE(4,Ss,1,0,"div",5),e.k0s(),e.j41(5,"div"),e.DNE(6,Es,4,9,"ng-container",6),e.k0s()(),e.DNE(7,As,1,1,"ng-template",null,0,e.C5r)}if(2&n){const s=e.sdS(8);e.Y8G("collapsed",i.collapsed)("toggleable",!0),e.R7$(3),e.JRh(i.labels.genericEstimates),e.R7$(),e.Y8G("ngIf",i.isPanelCollapsed&&i.loading),e.R7$(2),e.Y8G("ngIf",i.genericEstimates.length)("ngIfElse",s)}},dependencies:[N.YU,N.bT,ye._f,Ae.Y9,Ae.Ei,be.m,Ue.XI,Ue.d5,ke.Z,nt.T,Et.No,Lt.v],styles:["[_nghost-%COMP%] table{table-layout:fixed!important}[_nghost-%COMP%] .p-datatable{min-width:unset!important}[_nghost-%COMP%] .p-highlight td{background-color:#eaffea!important}[_nghost-%COMP%] tr{outline:none}[_nghost-%COMP%] tr .action-row-header{width:165px}[_nghost-%COMP%] tr .action-row-header.search-page{width:140px}[_nghost-%COMP%] tr .name{width:300px}[_nghost-%COMP%] tr .broken-label{color:#c94747;font-style:italic;font-size:10px;margin-right:5px;display:none}[_nghost-%COMP%] tr.broken .broken-label{display:inline-block}[_nghost-%COMP%] td{color:#000!important}[_nghost-%COMP%] td span{padding:2px 5px}[_nghost-%COMP%] td span.highlighted{background-color:#28c36b66;border-radius:8px}[_nghost-%COMP%] .buttons-row{text-overflow:clip}.header[_ngcontent-%COMP%]{display:flex}.header[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{flex:1}.header[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%]{position:relative}.open-ge-btn[_ngcontent-%COMP%]{margin-right:5px;text-decoration:none!important}.button[_ngcontent-%COMP%]{margin-right:5px}.wrong-dimensionality[_ngcontent-%COMP%]{background-color:#ffcfcf4d!important}.ge-with-errors[_ngcontent-%COMP%]{border:2px solid var(--danger)}"],changeDetection:0})}}return a})();var hn=o(19562),He=o(40168);let Rs=(()=>{class a{constructor(t,n){this.materialApi=t,this.categoryService=n,this.colorPerCategory=new Map}getMaterialsPlants(t){return this.materialApi.getMaterialPlants(t).pipe((0,m.T)(n=>n.map(i=>(i.categoryName=this.categoryService.getCategoryByIdSync(i.categoryIds[0])?.displayName,i.products=i.categoryIds.map(s=>this.categoryService.getCategoryByIdSync(s)?.displayName),i))))}preparePinColors(t,n){const i=(t||[]).reduce((s,c)=>(s[c.categoryIds[0]]=c.categoryName,s),{});
1return Object.keys(i).forEach(s=>{this.colorPerCategory.get(s)||this.colorPerCategory.set(s,{label:i[s],value:He.fW.getNextElement()})}),n?this.setEmptyColorConfig(this.colorPerCategory):this.colorPerCategory.delete("-111"),this.colorPerCategory}setEmptyColorConfig(t){t.set("-111",{label:$localize`:plants-map-legends|:Plant without EPDs`,value:He.tb})}preparePinGwpColors(t=!1){const n=(new Map).set("-112",{label:$localize`:plants-map-legends|:At least one product from Plant is at or below Achievable Target`,value:He.f2}).set("-113",{label:$localize`:plants-map-legends|:At least one product from Plant is at or below the 40th percentile`,value:He.GO}).set("-114",{label:$localize`:plants-map-legends|:Other Plant with EPDs`,value:He.XK});return t&&this.setEmptyColorConfig(n),n}resetColorsConfig(){this.colorPerCategory.clear(),He.fW.resetNavigator()}static{this.\u0275fac=function(n){return new(n||a)(e.KVO(se.wF),e.KVO(G.M))}}static{this.\u0275prov=e.jDH({token:a,factory:a.\u0275fac,providedIn:"root"})}}return a})();o(25926);var gn=o(65430),ys=o(71517),it=o(59115),Os=o(97818),dt=o(22342);const vs=["clusterMap"],Is=["mapDetailPanel"];function ws(a,l){if(1&a&&(e.j41(0,"div",10)(1,"p",11),e.EFF(2),e.k0s(),e.nrm(3,"p",12),e.k0s()),2&a){const t=l.$implicit;e.R7$(2),e.JRh(t.label),e.R7$(),e.Y8G("innerHTML",t.value,e.npT)}}function xs(a,l){if(1&a){const t=e.RV6();e.j41(0,"div",13)(1,"button",14),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.navigateBetweenMarkers(-1))}),e.nrm(2,"i",15),e.EFF(3," Prev "),e.k0s(),e.j41(4,"button",14),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.navigateBetweenMarkers(1))}),e.EFF(5," Next "),e.nrm(6,"i",16),e.k0s()()}if(2&a){const t=e.XpG();e.R7$(),e.Y8G("disabled",!t.navigationIndex),e.R7$(3),e.Y8G("disabled",t.navigationIndex===(null==t.markersInArea?null:t.markersInArea.length)-1)}}let Ds=(()=>{class a extends sn.${constructor(t,n,i){super(),this.googleMapsService=t,this.cdRef=n,this.renderer2=i,this.markersInArea=[],this.navigationIndex=null}get sidePanelLabel(){return this.pinDetail?.name||this.pinDetail?.plantName}ngOnInit(){this.startPinDetailWatching()}ngOnChanges(t){(t.mapPlants?.currentValue&&this.gMap||!t.mapPlantOrGroup?.firstChange&&t.mapPlantOrGroup&&this.gMap||!t.isGWPPlantsShown?.firstChange&&t.isGWPPlantsShown&&this.gMap)&&this.initMap()}ngAfterViewInit(){this.googleMapsService.initMap(this.clusterMap.nativeElement,!0).pipe((0,u.s)(1)).subscribe(t=>{this.prepareSidePanelForMapFullMode(),this.gMap=t,this.googleMapsService.setMapCenter(t,this.centering),this.googleMapsService.setZoom(t,this.zoom),this.centering.isBoundary&&this.googleMapsService.drawCircleAreaWithDistance(this.gMap,this.centering,this.distance)})}ngOnDestroy(){super.ngOnDestroy(),this.reloadMapView()}closeMapPanel(){this.googleMapsService.resetPinDetail()}navigateBetweenMarkers(t){this.navigationIndex=(this.navigationIndex+t+this.markersInArea.length)%this.markersInArea.length,this.googleMapsService.programmaticallyClickOnMarker(this.markersInArea[this.navigationIndex].marker)}startPinDetailWatching(){this.googleMapsService.getPinDetail$().pipe((0,h.Q)(this.destroy$)).subscribe(t=>{this.markersInArea=t?.markersInArea,this.pinDetail=t?.content,this.navigationIndex=t?(0,b.Et)(this.navigationIndex)?this.navigationIndex:this.markersInArea?.findIndex(n=>n.content.id===this.pinDetail.id):null,this.detailsDisplayConfig=t?.contentDisplayFields||[],this.cdRef.detectChanges()})}initMap(){this.reloadMapView(),this.initPinsWithCluster()}initPinsWithCluster(){this.prepareMapPins(),this.googleMapsService.enableMarkerClustering(this.gMap),this.centering.isBoundary&&this.googleMapsService.setBaseProjectPin(this.gMap,this.centering,this.baseProject),this.googleMapsService.mapFitBound(this.gMap)}reloadMapView(){this.googleMapsService.clearGeoData(this.gMap),this.googleMapsService.clearPins(this.gMap),this.googleMapsService.resetCluster(),this.googleMapsService.resetPinDetail()}prepareSidePanelForMapFullMode(){this.renderer2.appendChild(this.clusterMap.nativeElement.querySelector("div"),this.mapDetailPanel.
1nativeElement)}prepareMapPins(){this.mapPlants?.forEach(t=>{let n;n=t.isEmpty?He.tb:this.isGWPPlantsShown?t.minGwp<=this.statistics.bestPractice.getNumericValue()?He.f2:t.minGwp<=this.statistics.pct40Gwp.getNumericValue()?He.GO:He.XK:this.pinColorsConfig.get(t.categoryIds[0]).value,this.googleMapsService.setPin(this.gMap,{latitude:t.latitude,longitude:t.longitude},null,t,n,this.mapPlantOrGroup&&(t.id===this.mapPlantOrGroup.id||t.groupIds.includes(this.mapPlantOrGroup.id)))})}static{this.\u0275fac=function(n){return new(n||a)(e.rXU(Os.s),e.rXU(e.gRc),e.rXU(e.sFG))}}static{this.\u0275cmp=e.VBU({type:a,selectors:[["cqd-google-cluster-map"]],viewQuery:function(n,i){if(1&n&&(e.GBs(vs,5),e.GBs(Is,5)),2&n){let s;e.mGM(s=e.lsd())&&(i.clusterMap=s.first),e.mGM(s=e.lsd())&&(i.mapDetailPanel=s.first)}},inputs:{baseProject:"baseProject",centering:"centering",zoom:"zoom",distance:"distance",mapPlants:"mapPlants",mapPlantOrGroup:"mapPlantOrGroup",pinColorsConfig:"pinColorsConfig",statistics:"statistics",isGWPPlantsShown:"isGWPPlantsShown"},features:[e.Vt3,e.OA$],decls:11,vars:6,consts:[["clusterMap",""],["mapDetailPanel",""],[1,"wrapper"],[1,"google-cluster-map"],[1,"map-panel"],[1,"map-panel-header"],["tooltipPosition","top",1,"map-panel-header__name",3,"pTooltip"],[1,"close",3,"click"],["class","block",4,"ngFor","ngForOf"],["class","navigation-wrapper",4,"ngIf"],[1,"block"],[1,"block__title"],[1,"block__value",3,"innerHTML"],[1,"navigation-wrapper"],["pButton","",1,"button","button--light-blue",3,"click","disabled"],[1,"fa","fa-chevron-left"],[1,"fa","fa-chevron-right"]],template:function(n,i){if(1&n){const s=e.RV6();e.j41(0,"div",2),e.nrm(1,"div",3,0),e.j41(3,"div",4,1)(5,"div",5)(6,"h4",6),e.EFF(7),e.k0s(),e.j41(8,"div",7),e.bIt("click",function(){return e.eBV(s),e.Njj(i.closeMapPanel())}),e.k0s()(),e.DNE(9,ws,4,2,"div",8)(10,xs,7,2,"div",9),e.k0s()()}2&n&&(e.R7$(3),e.AVh("active",i.pinDetail),e.R7$(3),e.Y8G("pTooltip",i.sidePanelLabel),e.R7$(),e.SpI(" ",i.sidePanelLabel," "),e.R7$(2),e.Y8G("ngForOf",i.detailsDisplayConfig),e.R7$(),e.Y8G("ngIf",(null==i.markersInArea?null:i.markersInArea.length)>1))},dependencies:[N.Sq,N.bT,ye._f,be.m],styles:["@keyframes _ngcontent-%COMP%_panelAppear{to{width:300px}}.wrapper[_ngcontent-%COMP%]{position:relative}.google-cluster-map[_ngcontent-%COMP%]{height:482px}.map-panel[_ngcontent-%COMP%]{position:absolute;top:0;left:0;bottom:0;z-index:100;width:0;height:100%;background:#fff;overflow-x:hidden;animation:_ngcontent-%COMP%_panelAppear .4s forwards;animation-delay:.1s;display:none;flex-direction:column}.map-panel.active[_ngcontent-%COMP%]{display:flex}.map-panel-header[_ngcontent-%COMP%]{position:sticky;top:0;left:0;z-index:1;margin-bottom:8px;padding:8px 10px;display:flex;justify-content:space-between;align-items:center;background:#fff}.map-panel-header__name[_ngcontent-%COMP%]{max-width:210px;font-weight:500;font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.map-panel[_ngcontent-%COMP%] .block[_ngcontent-%COMP%]{padding:6px 10px}.map-panel[_ngcontent-%COMP%] .block__title[_ngcontent-%COMP%]{margin-bottom:2px;font-size:12px;color:#999}.map-panel[_ngcontent-%COMP%] .block__value[_ngcontent-%COMP%]{margin-bottom:0;word-wrap:break-word}.map-panel[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{width:14px;height:14px;background-image:url(/assets/svg/close-modal-button.svg);background-repeat:no-repeat;background-position:center center;cursor:pointer}.map-panel[_ngcontent-%COMP%] .navigation-wrapper[_ngcontent-%COMP%]{width:100%;margin-top:auto;padding:6px 12px;display:flex;align-items:center;justify-content:flex-end;gap:12px}.map-panel[_ngcontent-%COMP%] .navigation-wrapper[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{gap:6px}"],changeDetection:0})}}return a})();const Fs=a=>({background:a});function Gs(a,l){if(1&a&&(e.j41(0,"div",14),e.nrm(1,"span",15),e.EFF(2),e.k0s()),2&a){const t=l.$implicit;e.Y8G("pTooltip",t.label),e.R7$(),e.Aen(e.eq3(4,Fs,t.value)),e.R7$(),e.SpI(" - ",t.label," ")}}function Ls(a,l){1&a&&e.nrm(0,"cqd-spinner")}let Ns=(()=>{class a extends _n.W{set baseProjectAddress(t){t&&t.latitude&&t.longitude&&(this.mapCenter={latitude:t.latitude,longitude:t.longitude,isBoundary:!0,address:t.address},this.zoom=5)}constructor(t,n,i,s){super(),this.materialsPlantsService=t,this.sessionService=n,this.materialService=i,this.cdRef=s,this.hideMap=new e.bkB,this.mapCenter={latitude:hn.i.lat,longitude:hn.i.lng},this.zoom=4,this.isLoading=!1,this.isEmptyPlantsShown=!1,this.isGWPPlantsShown=!1}get pinColorsConfigArray(){return Array.from(this.plantsGWPLegends||this.pinColorsConfig||[],([t,n])=>n)}ngOnChanges(t){!this.distance&&this.mapCenter.isBoundary?this.initPlantsWithMaterialFilters():t.materialSearchPrettyString?.currentValue&&this.initPlants()}ngOnDestroy(){this.materialsPlantsService.resetColorsConfig()}showEmptyPlants({checked:t}){this.isEmptyPlantsShown=t,this.initPlants(),this.plantsGWPLegends&&(t?this.materialsPlantsService.setEmptyColorConfig(this.plantsGWPLegends):this.plantsGWPLegends.delete("-111"))}togglePlantGwpMode({checked:t}){this.isGWPPlantsShown=t,this.plantsGWPLegends=t?this.materialsPlantsService.preparePinGwpColors(this.isEmptyPlantsShown):null}initPlantsWithMaterialFilters(){this.isLoading=!0;const t=this.baseProject.getJurisdiction(),n=Ct.d.getAddressSpecificPredicates(t,this.mapCenter);this.plantMaterialFilter.filter.push(...n);const i=B.I.getUnitSystem(this.sessionService.getUserUnitSystem())[te.Sy.distance].defaultUnit;this.plantMaterialFilter.filter.push(Ct.d.getMaterialFilterPredicate(de.uE.distance,Ze.D9.max,`500 ${i}`)),this.materialService.translateMaterialFilterToQueryString(this.plantMaterialFilter).pipe((0,u.s)(1)).subscribe(s=>{this.materialSearchPrettyString=s,this.initPlants(),this.cdRef.detectChanges()})}initPlants(){this.isLoading=!0,this.plants$=this.materialsPlantsService.getMaterialsPlants({mfPrettyString:this.materialSearchPrettyString,isEmpty:this.isEmptyPlantsShown}).pipe((0,P.M)(t=>this.pinColorsConfig=this.materialsPlantsService.preparePinColors(t,this.isEmptyPlantsShown)),(0,Me.j)(()=>{this.isLoading=!1}))}static{this.\u0275fac=function(n){return new(n||a)(e.rXU(Rs),e.rXU(g.Q),e.rXU(tt.V),e.rXU(e.gRc))}}static{this.\u0275cmp=e.VBU({type:a,selectors:[["cqd-plants-google-map"]],inputs:{distance:"distance",plantMaterialFilter:"plantMaterialFilter",materialSearchPrettyString:"materialSearchPrettyString",selectedMaterial:"selectedMaterial",statistics:"statistics",baseProject:"baseProject",baseProjectAddress:"baseProjectAddress"},outputs:{hideMap:"hideMap"},features:[e.Vt3,e.OA$],decls:23,vars:19,consts:()=>{let t,n,i,s,c,_;return t=$localize`:plants-map-settings|âd187d04b5184e09a8fb80e67c6b1b296dc9f115câ7862424507661876862:Show plants without EPDs`,n=$localize`:plants-map-settings|â742b5df910a38bd2f4ddd27bb1f0c70c695e964dâ188738
10944425656112:Plants GWP mode`,i=$localize`:â75590be668b2d2abce04e33cdae0b3df6d277165â5198906805476722598:Map Legends`,s=$localize`:âcee4828ca5dc6516302cc43ad505c98a1a1a6123â1634055821031108322:Back to Material form.`,c=$localize`:â5404c51e80282db1984e50418038557d74fafe73â3998862511632748521:Close map`,_=$localize`:plants-map|â85b063e91e4c6800c808e60462090fa1215fd06câ1404897121171774382:Plants Map`,[["settingsMenu","matMenu"],["menu","matMenu"],_,["type","button","pButton","",1,"settings",3,"matMenuTriggerFor"],[1,"settings-icon"],[3,"xPosition"],["mat-menu-item","",1,"setting-option",3,"click"],["label",t,3,"onChange","binary"],["label",n,3,"onChange","binary"],["pButton","","label",i,"type","button",1,"button","button-small","button--light-blue","map-legends",3,"matMenuTriggerFor"],["class","map-legend-item","mat-menu-item","","tooltipPosition","top",3,"pTooltip",4,"ngFor","ngForOf"],["pButton","","pTooltip",s,"tooltipPosition","top","label",c,1,"button","button-small","button--blue",3,"click"],[4,"ngIf"],[3,"centering","baseProject","zoom","distance","mapPlants","mapPlantOrGroup","pinColorsConfig","isGWPPlantsShown","statistics"],["mat-menu-item","","tooltipPosition","top",1,"map-legend-item",3,"pTooltip"],[1,"rectangle"]]},template:function(n,i){if(1&n){const s=e.RV6();e.j41(0,"p-panel")(1,"p-header")(2,"span"),e.pXf(3,2),e.k0s(),e.j41(4,"button",3)(5,"mat-icon",4),e.EFF(6,"settings"),e.k0s()(),e.j41(7,"mat-menu",5,0)(9,"div")(10,"div",6),e.bIt("click",function(_){return e.eBV(s),e.Njj(_.stopPropagation())}),e.j41(11,"p-checkbox",7),e.bIt("onChange",function(_){return e.eBV(s),e.Njj(i.showEmptyPlants(_))}),e.k0s()(),e.j41(12,"div",6),e.bIt("click",function(_){return e.eBV(s),e.Njj(_.stopPropagation())}),e.j41(13,"p-checkbox",8),e.bIt("onChange",function(_){return e.eBV(s),e.Njj(i.togglePlantGwpMode(_))}),e.k0s()()()(),e.nrm(14,"button",9),e.j41(15,"mat-menu",5,1)(17,"div"),e.DNE(18,Gs,3,6,"div",10),e.k0s()(),e.j41(19,"button",11),e.bIt("click",function(){return e.eBV(s),e.Njj(i.hideMap.emit())}),e.k0s()(),e.DNE(20,Ls,1,0,"cqd-spinner",12),e.nrm(21,"cqd-google-cluster-map",13),e.nI1(22,"async"),e.k0s()}if(2&n){const s=e.sdS(8),c=e.sdS(16);e.R7$(4),e.Y8G("matMenuTriggerFor",s),e.R7$(3),e.Y8G("xPosition","before"),e.R7$(4),e.Y8G("binary",!0),e.R7$(2),e.Y8G("binary",!0),e.R7$(),e.Y8G("matMenuTriggerFor",c),e.R7$(),e.Y8G("xPosition","before"),e.R7$(3),e.Y8G("ngForOf",i.pinColorsConfigArray),e.R7$(2),e.Y8G("ngIf",i.isLoading),e.R7$(),e.Y8G("centering",i.mapCenter)("baseProject",i.baseProject)("zoom",i.zoom)("distance",i.distance)("mapPlants",e.bMT(22,17,i.plants$))("mapPlantOrGroup",null==i.selectedMaterial?null:i.selectedMaterial.plantOrGroup)("pinColorsConfig",i.pinColorsConfig)("isGWPPlantsShown",i.isGWPPlantsShown)("statistics",i.statistics)}},dependencies:[N.Sq,N.bT,ye._f,Ae.Y9,be.m,ke.Z,gn.Sc,ys.t,xt.An,it.kk,it.fb,it.Cp,Ds,N.Jj],styles:["[_nghost-%COMP%] .p-panel-content{position:relative}cqd-spinner[_ngcontent-%COMP%]{position:absolute;top:0;left:0;z-index:10;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:var(--tertiary-disabled)}p-header[_ngcontent-%COMP%]{display:flex!important;align-items:center;gap:10px}p-header[_ngcontent-%COMP%]:after{display:none!important}.map-legend-item[_ngcontent-%COMP%]{padding:8px}.rectangle[_ngcontent-%COMP%]{position:relative;top:7px;width:24px;min-width:24px;height:24px;margin-right:4px;border-radius:4px;display:inline-flex}.settings[_ngcontent-%COMP%]{margin-left:auto}.settings-icon[_ngcontent-%COMP%]{color:var(--info)}.setting-option[_ngcontent-%COMP%]{padding:8px;background:initial!important}.setting-option[_ngcontent-%COMP%] p-checkbox[_ngcontent-%COMP%]{position:relative;top:-5px}"],changeDetection:0})}}return a})();const Bs=["pulse"],$s=["boxPlotWrapper"],kt=a=>({hidden:a}),js=a=>({ctrl:a}),ks=a=>({warning:a});function Us(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-intro-button",28),e.bIt("startTour",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.startIntro())}),e.k0s()}if(2&a){const t=e.XpG();e.Y8G("tour",t.introOptions)}}function Hs(a,l){1&a&&(e.qex(0),e.nrm(1,"cqd-material-search-form-spinner"),e.bVm())}function Vs(a,l){1&a&&e.pXf(0,8)}function Xs(a,l){if(1&a&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&a){const t=e.XpG(2);e.R7$(),e.SpI(": ",t.formSelectorHeader,"")}}function Ys(a,l){if(1&a){const t=e.RV6();e.j41(0,"button",39),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.onDone())}),e.pXf(1,9),e.k0s()}if(2&a){let t;const n=e.XpG(2);e.xc7("margin-right","12px"),e.Y8G("disabled",!(null!=(t=n.emittedCategorySignal())&&t.category)||n.isCollectionInProgressSignal())}}function zs(a,l){1&a&&e.pXf(0,10)}function Ws(a,l){1&a&&(e.j41(0,"span",81)(1,"mat-icon"),e.EFF(2,"warning"),e.k0s(),e.qex(3),e.pXf(4,13),e.bVm(),e.k0s())}function qs(a,l){if(1&a){const t=e.RV6();e.qex(0),e.j41(1,"div",84)(2,"mat-checkbox",85),e.bIt("change",function(i){e.eBV(t);const s=e.XpG(5);return e.Njj(s.changeReusedMaterial(i))}),e.EFF(3,"Reused Material"),e.k0s()(),e.bVm()}if(2&a){const t=e.XpG(5);e.R7$(2),e.Y8G("checked",t.isReusedMaterialSignal())}}function Ks(a,l){if(1&a){const t=e.RV6();e.j41(0,"div",82),e.DNE(1,qs,4,1,"ng-container",32),e.j41(2,"cqd-search-actions",83),e.nI1(3,"async"),e.nI1(4,"async"),e.bIt("submitEvent",function(i){e.eBV(t);const s=e.XpG(4);return e.Njj(s.selectElementsToApplyCollection(i))}),e.k0s()()}if(2&a){const t=e.XpG(4);e.R7$(),e.Y8G("ngIf",t.supportReusedMaterials),e.R7$(),e.Y8G("disabled",e.bMT(3,6,t.isLocked$)||t.isBroadCategorySignal()&&!e.bMT(4,8,t.allowBroadCategorySelection$)||!t.hasAccessToCategory)("tooltip",t.useCollectionTooltip)("elementsWithSameCollectionCount",t.elementItemsWithSameCollection.length)("currentCollectionId",t.searchForm.value.collectionId)("isInProgress",t.isCollectionInProgressSignal())}}function Qs(a,l){if(1&a){const t=e.RV6();e.j41(0,"div",86)(1,"p-panel")(2,"p-header")(3,"span",62),e.pXf(4,14),e.k0s()(),e.j41(5,"div",87)(6,"cqd-compare-by-product-chart",88,3),e.nI1(8,"async"),e.nI1(9,"async"),e.nI1(10,"async"),e.nI1(11,"async"),e.nI1(12,"async"),e.bIt("back",function(){e.eBV(t);const i=e.XpG(4);return e.Njj(i.hideCompareByProduct())}),e.k0s()()()()}if(2&a){const t=e.XpG(4);e.R7$(4),e.uP7(t.declaredUnit?t.declaredUnit.convertedUnit.toString():"unit"),e.nnv(4),e.R7$(2),e.Y8G("materials",t.materialsToCompare)("searchStatistics",e.bMT(8,8,t.statisticsWithMaterials$))("selectedMaterial",e.bMT(9,10,t.selectedMaterial$))("selectedIndustryEpd",e.bMT(10,12,t.selectedIndustryEpd$))("selectedGenericEstimate",e.bMT(11,14,t.selectedGenericEstimate$))("referenceAndTargetSettings",t.referenceAndTargetSettingsSignal())("alternativeMaterials",e.bMT(12,16,t.alternativeMaterials$))}}function Js(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-box-plot-wrapper",94,6),e.nI1(2,"async"),e.nI1(3,"async"),e.nI1(4,"async"),e.nI1(5,"async"),e.nI1(6,"async"),e.bIt("chartSettingsUpdate",function(i){e.eBV(t);const s=e.XpG(7);return e.Njj(s.onChartSettingsUpdate(i))}),e.k0s()}if(2&a){const t=e.XpG(7);e.Y8G("project",t.project)("selectedElement",t.selectedElement)("category",e.bMT(2,12,t.category))("statistics",e.bMT(3,14,t.statisticsForUse$))("selectedIndustryEpd",e.bMT(4,16,t.selectedIndustryEpd$))("selectedGenericEstimate",e.bMT(5,18,t.selectedGenericEstimate$))("materialGwpData",e.bMT(6,20,t.materialGwpData$))("target",t.gwpTargetSettings)("isSearchForm",!0)("toUnitSystem",!0)("appendTo",t.appendTo)("referenceAndTargetSettings",t.referenceAndTargetSettingsSignal()||t.collectionSignal())}}function Zs(a,l){if(1&a&&e.nrm(0,"cqd-scatter-plot",95),2&a){e.XpG(2);const t=e.sdS(1),n=e.XpG(5);e.Y8G("gwpBaseline",n.baselineGwpSignal())("materials",n.materialsSignal())("declaredUnit",n.declaredUnit)("componentWrapper",t)}}function eo(a,l){if(1&a&&(e.qex(0),e.DNE(1,Js,7,22,"cqd-box-plot-wrapper",92),e.nI1(2,"async"),e.DNE(3,Zs,1,4,"cqd-scatter-plot",93),e.nI1(4,"async"),e.bVm()),2&a){const t=e.XpG(6);e.R7$(),e.Y8G("ngIf",e.bMT(2,2,t.shouldShowBoxPlot$)),e.R7$(2),e.Y8G("ngIf",e.bMT(4,4,t.shouldShowScatterPlot$)&&!!t.materialsSignal().length)}}function to(a,l){if(1&a&&(e.j41(0,"div",91,5),e.DNE(2,eo,5,6,"ng-container",32),e.nI1(3,"async"),e.k0s()),2&a){const t=e.XpG(5);e.R7$(2),e.Y8G("ngIf",e.bMT(3,1,t.shouldShowAnyPlot$))}}function no(a,l){1&a&&e.nrm(0,"div",96)}function io(a,l){if(1&a&&(e.j41(0,"div",89),e.DNE(1,to,4,3,"div",90),e.nI1(2,"async"),e.DNE(3,no,1,0,"ng-template",null,4,e.C5r),e.k0s()),2&a){const t=e.sdS(4),n=e.XpG(4);e.R7$(),e.Y8G("ngIf",!e.bMT(2,2,n.isBoxPlotLoading$))("ngIfElse",t)}}function ao(a,l){if(1&a){const t=e.RV6();e.j41(0,"button",99),e.bIt("click",function(){e.eBV(t);const i=e.XpG(5);return e.Njj(i.compareProducts())}),e.pXf(1,16),e.k0s()}}function so(a,l){if(1&a){const t=e.RV6();e.qex(0),e.j41(1,"div",97),e.DNE(2,ao,2,0,"button",98),e.nI1(3,"async"),e.j41(4,"button",99),e.bIt("click",function(){e.eBV(t);const i=e.XpG(4);return e.Njj(i.openSettings())}),e.pXf(5,15),e.k0s()(),e.bVm()}if(2&a){const t=e.XpG(4);e.R7$(2),e.Y8G("ngIf",e.bMT(3,1,t.alternativeMaterials$).length)}}function oo(a,l){if(1&a&&(e.j41(0,"div",100),e.PLo(1,17),e.nrm(2,"span",101),e.YFu(),e.k0s()),2&a){const t=e.XpG(4);e.R7$(2),e.Y8G("pTooltip",t.tooltips.disclaimerA1A3)}}function ro(a,l){if(1&a&&(e.j41(0,"div",100),e.PLo(1,18),e.nrm(2,"span",101),e.YFu(),e.k0s()),2&a){const t=e.XpG(4);e.R7$(2),e.Y8G("pTooltip",t.tooltips.disclaimerA1A3)}}function lo(a,l){1&a&&(e.j41(0,"div",102),e.PLo(1,19),e.nrm(2,"b"),e.YFu(),e.k0s())}function co(a,l){1&a&&(e.j41(0,"div",102),e.PLo(1,20),e.nrm(2,"b"),e.YFu(),e.k0s())}function po(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-plants-google-map",103),e.nI1(1,"async"),e.nI1(2,"async"),e.bIt("hideMap",function(){e.eBV(t);const i=e.XpG(4);return e.Njj(i.togglePlantsMap())}),e.k0s()}if(2&a){let t;const n=e.XpG(4);e.Y8G("baseProject",n.project)("baseProjectAddress",n.baseProjectAddressSignal())("distance",null==(t=n.searchForm.get("plantDistance"))||null==t.value?null:t.value.mathjsUnit.value)("plantMaterialFilter",n.plantMaterialFilterSignal())("materialSearchPrettyString",n.plantMapMaterialSearchPrettyStringSignal())("selectedMaterial",e.bMT(1,7,n.selectedMaterial$))("statistics",e.bMT(2,9,n.statistics$))}}function _o(a,l){1&a&&e.nrm(0,"i",104)}function ho(a,l){if(1&a&&e.nrm(0,"div",105),2&a){const t=e.XpG(4);e.Y8G("ngClass",e.eq3(1,ks,t.isBroadCategorySignal()))}}function go(a,l){if(1&a){const t=e.RV6();e.j41(0,"div",44),e.bIt("keydown",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.onKeyDown(i))},!1,e.EBC),e.j41(1,"div",45),e.bIt("click",function(){e.eBV(t),e.XpG(2);const i=e.sdS(1);return e.Njj(i.previous())}),e.nrm(2,"p-breadcrumb",46),e.k0s(),e.j41(3,"form",47)(4,"p-panel",48)(5,"p-header",49)(6,"div",50)(7,"span"),e.PLo(8,11),e.nrm(9,"span",51),e.nI1(10,"async"),e.YFu(),e.k0s(),e.DNE(11,Ws,5,0,"span",52),e.nI1(12,"async"),e.DNE(13,Ks,5,10,"div",53),e.k0s()(),e.j41(14,"div",54)(15,"div",55)(16,"div",56)(17,"cqd-design-intent-form-block",57),e.nI1(18,"async"),e.bIt("searchTypeChange",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.onSearchTypeChange(i))})("hideParentDialog",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.hideSearchDialog())})("showParentDialog",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.showSearchDialog())})("resetSearchForm",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.resetSearchFormByDefault())}),e.k0s(),e.j41(19,"cqd-geographic-form-block",58),e.nI1(20,"async"),e.bIt("changePlantsMapVisibility",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.togglePlantsMap())}),e.k0s(),e.j41(21,"cqd-advanced-form-block",59),e.nI1(22,"async"),e.nI1(23,"async"),e.bIt("searchTypeChange",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.onSearchTypeChange(i))})("hideParentDialog",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.hideSearchDialog())})("showParentDialog",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.showSearchDialog())}),e.k0s()(),e.DNE(24,Qs,13,18,"div",60),e.j41(25,"div",61)(26,"p-panel")(27,"p-header")(28,"span",62),e.pXf(29,12),e.k0s()(),e.DNE(30,io,5,4,"div",63),e.k0s(),e.DNE(31,so,6,3,"ng-container",32),e.nI1(32,"async"),e.k0s(),e.DNE(33,oo,3,1,"div",64)(34,ro,3,1,"div",64)(35,lo,3,0,"div",65)(36,co,3,0,"div",65),e.k0s(),e.DNE(37,po,3,11,"cqd-plants-google-map",66),e.k0s(),e.j41(38,"p-footer")(39,"div",67)(40,"div",68)(41,"div",69)(42,"cqd-search-terms",70),e.nI1(43,"async"),e.bIt("termRemove",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.removeTerm(i))}),e.k0s()()(),e.j41(44,"div",71)(45,"div",72),e.nrm(46,"cqd-copy-link-button",73),e.k0s(),e.j41(47,"div",74)(48,"div",75)(49,"button",76),e.nI1(50,"async"),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.search())})("cqdCtrlPressed",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.onCtrlPressed(i))}
1),e.DNE(51,_o,1,0,"i",77),e.j41(52,"div",78),e.nrm(53,"img",79),e.DNE(54,ho,1,3,"div",80),e.k0s()()()()()()()()()()}if(2&a){const t=e.XpG(3);e.R7$(2),e.Y8G("model",t.items),e.R7$(),e.Y8G("formGroup",t.searchForm),e.R7$(7),e.uP7(e.bMT(10,48,t.category).masterformat),e.nnv(8),e.R7$(),e.Y8G("ngIf",e.bMT(12,50,t.category).obsolete),e.R7$(2),e.Y8G("ngIf",t.project),e.R7$(2),e.Y8G("ngClass",e.eq3(66,kt,t.showPlantsMapSignal())),e.R7$(),e.Y8G("ngClass",e.eq3(68,kt,t.showCompareByProductChartSignal())),e.R7$(),e.Y8G("introShown",t.introShown)("formFields",e.bMT(18,52,t.intentFormFields$))("declaredUnit",t.declaredUnit)("searchTypes",t.formSearchTypes)("isSearchInProgress",t.isSearchInProgressSignal()),e.R7$(2),e.Y8G("introShown",t.introShown)("formFields",e.bMT(20,54,t.geographicFormFields$))("jurisdictionForm",t.searchForm.get("jurisdiction"))("distanceControl",t.searchForm.get("plantDistance"))("withBuilding",!!t.project)("isSearchInProgress",t.isSearchInProgressSignal())("hasAddress",!(null==t.coordinates||!t.coordinates.latitude||null==t.coordinates||!t.coordinates.longitude))("noResultsFound",!t.materialsSignal().length)("disableMapButton",!t.showResultsSignal()),e.R7$(2),e.Y8G("introShown",t.introShown)("formFields",e.bMT(22,56,t.advancedFormFields$))("searchTypes",t.formSearchTypes)("category",e.bMT(23,58,t.category))("isSearchInProgress",t.isSearchInProgressSignal()),e.R7$(3),e.Y8G("ngIf",t.showCompareByProductChartSignal()),e.R7$(),e.Y8G("ngClass",e.eq3(70,kt,t.showCompareByProductChartSignal())),e.R7$(4),e.uP7(t.declaredUnit?t.declaredUnit.convertedUnit.toString():"unit"),e.nnv(29),e.R7$(),e.Y8G("ngIf",!t.showPlantsMapSignal()),e.R7$(),e.Y8G("ngIf",e.bMT(32,60,t.shouldShowAnyPlot$)),e.R7$(2),e.Y8G("ngIf",t.showShortServiceLifeDisclaimer),e.R7$(),e.Y8G("ngIf",t.showShortServiceLifeDisclaimerForMembraneRoofing),e.R7$(),e.Y8G("ngIf",t.showProcessedGlassWarning),e.R7$(),e.Y8G("ngIf",t.showIGUWarning),e.R7$(),e.Y8G("ngIf",t.showPlantsMapSignal()),e.R7$(5),e.Y8G("searchTerms",e.bMT(43,62,t.searchTerms$))("clearable",!t.isSearchInProgressSignal()&&!t.showCompareByProductChartSignal()&&!t.showPlantsMapSignal()),e.R7$(4),e.Y8G("buttonStyleClass","button button-search button--light-blue button-right button-no-wrap")("getLink$",t.getShareableLink()),e.R7$(2),e.Y8G("pTooltip",t.searchButtonTooltip),e.R7$(),e.Y8G("pTooltip",t.uncachedSearchTooltipSignal())("tooltipPosition",t.searchButtonTooltip?"bottom":"top")("ngClass",e.eq3(72,js,t.isCtrlPressedSignal()))("disabled",e.bMT(50,64,t.isLocked$)||!t.hasAccessToCategory),e.R7$(2),e.Y8G("ngIf",t.isBroadCategorySignal()),e.R7$(2),e.Y8G("src",t.assetsUrl+"assets/svg/search.svg",e.B4B),e.R7$(),e.Y8G("ngIf",t.isSearchInProgressSignal())}}function mo(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-generic-estimates-statistics-table",109),e.nI1(1,"async"),e.nI1(2,"async"),e.nI1(3,"async"),e.nI1(4,"async"),e.bIt("lazyLoad",function(i){e.eBV(t);const s=e.XpG(4);return e.Njj(s.onLazyLoadGenericEstimates(i))})("selectGenericEstimate",function(i){e.eBV(t);const s=e.XpG(4);return e.Njj(s.onSelectGenericEstimate(i))}),e.k0s()}if(2&a){const t=e.XpG().ngIf,n=e.XpG(3);e.Y8G("loading",n.isSearchInProgressSignal()||n.geLoadingSignal())("selectMaterialEnabled",n.selectMaterialEnabled)("genericEstimates",e.bMT(1,10,n.genericEstimates$))("selectedGenericEstimate",e.bMT(2,12,n.selectedGenericEstimate$))("collapsed",n.isNeedToGetMaterialsSignal()&&!e.bMT(3,14,n.selectedGenericEstimate$))("statisticUnit",t.processedDeclaredUnit.convertedUnit)("baselineGwp",n.baselineGwpSignal())("pageFirst",e.bMT(4,16,n.genericEstimatesPageFirst$))("rowsCount",n.rowsCount)("totalCount",n.totalGenericEstimatesRecords)}}function uo(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-industry-epds-statistics-table",110),e.nI1(1,"async"),e.nI1(2,"async"),e.nI1(3,"async"),e.nI1(4,"async"),e.nI1(5,"async"),e.bIt("lazyLoad",function(i){e.eBV(t);const s=e.XpG(4);return e.Njj(s.onLazyLoadIndustryEpds(i))})("selectEpd",function(i){e.eBV(t);const s=e.XpG(4);return e.Njj(s.onSelectEpd(i))}),e.k0s()}if(2&a){const t=e.XpG().ngIf,n=e.XpG(3);e.Y8G("loading",n.isSearchInProgressSignal()||n.industryLoadingSignal())("selectMaterialEnabled",n.selectMaterialEnabled)("industryEpds",e.bMT(1,11,n.industryEpds$))("selectedEpd",e.bMT(2,13,n.selectedIndustryEpd$))("searchTerms",e.bMT(3,15,n.searchTerms$))("collapsed",n.isNeedToGetMaterialsSignal()&&!e.bMT(4,17,n.selectedIndustryEpd$))("statisticUnit",t.processedDeclaredUnit.convertedUnit)("baselineGwp",n.baselineGwpSignal())("pageFirst",e.bMT(5,19,n.industryEpdsPageFirst$))("rowsCount",n.rowsCount)("totalCount",n.totalIndustryEpdsRecords)}}function So(a,l){if(1&a&&(e.j41(0,"div"),e.nrm(1,"cqd-statistics",106),e.DNE(2,mo,5,18,"cqd-generic-estimates-statistics-table",107),e.nI1(3,"async"),e.DNE(4,uo,6,21,"cqd-industry-epds-statistics-table",108),e.nI1(5,"async"),e.k0s()),2&a){let t,n;const i=l.ngIf,s=e.XpG(3);e.R7$(),e.Y8G("statistics",i),e.R7$(),e.Y8G("ngIf",s.isShowGenericEstimates&&i.genericEstimatesCount&&s.isNeedToGetGenericEstimatesSignal()&&(s.isSearchInProgressSignal()||(null==(t=e.bMT(3,3,s.genericEstimates$))?null:t.length))),e.R7$(2),e.Y8G("ngIf",i.industryEpdsCount&&s.isNeedToGetIndustryEpdsSignal()&&(s.isSearchInProgressSignal()||(null==(n=e.bMT(5,5,s.industryEpds$))?null:n.length)))}}function fo(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-material-search-results-table",111),e.nI1(1,"async"),e.nI1(2,"async"),e.nI1(3,"async"),e.nI1(4,"async"),e.nI1(5,"async"),e.nI1(6,"async"),e.nI1(7,"async"),e.bIt("showCurrentDialog",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.showCurrentDialog.emit())})("hideCurrentDialog",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.hideCurrentDialog.emit())})("comparePlants",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.comparePlants())})("compareManufacturers",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.compareManufacturers())})("compareCategories",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.compareCategories())})("compareByStrength",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.compareByStrength())})("compareProducts",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.compareProducts(i))})("hideCompareByProduct",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.hideCompareByProduct())})("lazyLoad",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.onLazyLoadMaterials(i))}
1)("showDetails",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.onShowDetails())})("materialsToCompareChanged",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.materialsToCompareChanged(i))})("markAsSelected",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.markAsSelected(i))})("markAsUnselected",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.markAsUnselected(i))})("markAsAlternative",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.markAsAlternative(i))})("unSelectMaterial",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.unSelectMaterial())})("filteringParams",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.onChangeFilteringParams(i))})("downloadSearchResults",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.onDownloadSearchResults(i))})("downloadFullSearchResults",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.onDownloadFullSearchResults())})("downloadGSAReport",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.onDownloadGSAReport())}),e.k0s()}if(2&a){const t=e.XpG(3);e.Y8G("mfPrettyString",t.cachedStatisticsMaterialFilterPrettyStringSignal())("searchFormValue",t.searchForm.value)("element",t.collectionSignal())("appendTo",t.appendTo)("withBuilding",!(null==t.project||!t.project.id))("hasAddress",!!(null!=t.coordinates&&t.coordinates.latitude&&null!=t.coordinates&&t.coordinates.longitude&&t.searchForm.get("plantDistance").value))("selectMaterialEnabled",t.selectMaterialEnabled)("onlyAlternativeMaterialsCanSelect",t.isReusedMaterialSignal())("statistics",e.bMT(1,27,t.statisticsForUse$))("declaredUnit",t.declaredUnit)("switchGwpColumn",t.isFemaSelected)("columnsToShow",e.bMT(2,29,t.columnsToShow$))("category",e.bMT(3,31,t.category))("loading",t.isSearchInProgressSignal()||t.materialLoadingSignal())("materials",t.materialsSignal())("totalRecords",t.totalMaterialsRecords)("rows",t.rowsCount)("baselineGwp",t.baselineGwpSignal())("target",e.bMT(4,33,t.target$))("selectedMaterial",e.bMT(5,35,t.selectedMaterial$))("alternativeMaterials",e.bMT(6,37,t.alternativeMaterials$))("bidIndex",t.bidIndex)("bidders",t.bidders)("showResults",t.showResultsSignal())("pageFirst",e.bMT(7,39,t.materialsPageFirst$))("showCompareCheckboxes",t.showCompareByProductChartSignal())("showPlantsMap",t.showPlantsMapSignal())}}function Co(a,l){if(1&a){const t=e.RV6();e.j41(0,"div",112)(1,"cqd-search-actions",83),e.nI1(2,"async"),e.nI1(3,"async"),e.bIt("submitEvent",function(i){e.eBV(t);const s=e.XpG(3);return e.Njj(s.selectElementsToApplyCollection(i))}),e.k0s()()}if(2&a){const t=e.XpG(3);e.R7$(),e.Y8G("disabled",e.bMT(2,5,t.isLocked$)||t.isBroadCategorySignal()&&!e.bMT(3,7,t.allowBroadCategorySelection$)||!t.hasAccessToCategory)("tooltip",t.useCollectionTooltip)("elementsWithSameCollectionCount",t.elementItemsWithSameCollection.length)("currentCollectionId",t.searchForm.value.collectionId)("isInProgress",t.isCollectionInProgressSignal())}}function To(a,l){if(1&a&&(e.qex(0),e.DNE(1,go,55,74,"div",40),e.j41(2,"div",41),e.DNE(3,So,6,7,"div",32),e.nI1(4,"async"),e.DNE(5,fo,8,41,"cqd-material-search-results-table",42)(6,Co,4,9,"div",43),e.k0s(),e.bVm()),2&a){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",t.searchForm),e.R7$(2),e.Y8G("ngIf",e.bMT(4,4,t.statisticsForUse$)),e.R7$(2),e.Y8G("ngIf",t.isNeedToGetMaterialsSignal()),e.R7$(),e.Y8G("ngIf",t.project&&!!t.materialsSignal().length)}}function Mo(a,l){1&a&&e.pXf(0,21)}function Eo(a,l){1&a&&(e.j41(0,"mat-icon"),e.EFF(1,"search"),e.k0s())}function bo(a,l){1&a&&(e.j41(0,"mat-icon"),e.EFF(1,"youtube_searched_for"),e.k0s())}function Ao(a,l){if(1&a){const t=e.RV6();e.j41(0,"mat-horizontal-stepper",29,1),e.bIt("selectionChange",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onStepChange(i))}),e.j41(2,"mat-step",30),e.DNE(3,Vs,1,0,"ng-template",31),e.j41(4,"p-panel")(5,"p-header"),e.qex(6),e.pXf(7,7),e.bVm(),e.DNE(8,Xs,2,1,"span",32),e.k0s(),e.j41(9,"cqd-category-tree-select",33),e.bIt("categorySelect",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.categorySelect(i))})("builderSelect",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onSetBuilder(i))})("categoryItemsUpdate",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.setBreadcrumbItems(i))}),e.DNE(10,Ys,2,3,"button",34),e.j41(11,"cqd-button-pulse",35,2),e.bIt("clickEvent",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onNext())}),e.k0s()()()(),e.j41(13,"mat-step",30),e.DNE(14,zs,1,0,"ng-template",31)(15,To,7,6,"ng-container",32),e.k0s(),e.j41(16,"mat-step",36),e.DNE(17,Mo,1,0,"ng-template",31),e.k0s(),e.DNE(18,Eo,2,0,"ng-template",37)(19,bo,2,0,"ng-template",38),e.k0s()}if(2&a){let t,n;const i=e.XpG();e.Y8G("selectedIndex",i.selectedStepIndex),e.R7$(2),e.Y8G("completed",!!i.emittedCategorySignal()),e.R7$(6),e.Y8G("ngIf",i.formSelectorHeader),e.R7$(),e.Y8G("categoryId",i.selectedCategoryId||null)("preventToSelectCategories",i.preventToSelectCategories)("withGenericCategories",i.withGenericCategories)("withBuilders",i.project&&!(null!=i.selectedElement&&i.selectedElement.value.isSubElement)&&!i.bidders)("hideAllCategories",null==i.selectedElement?null:i.selectedElement.value.shared.elements),e.R7$(),e.Y8G("ngIf",i.project&&!(null!=i.selectedElement&&i.selectedElement.value.shared.elements)&&!i.emittedBuilderSignal()),e.R7$(),e.Y8G("label",i.nextButtonTextSignal())("pTooltip",null!=(t=i.emittedCategorySignal())&&t.category||i.emittedBuilderSignal()?"":i.tooltips.materialSearchNextButton)("tooltipDisabled",!!i.emittedCategorySignal())("disabled",!(null!=(n=i.emittedCategorySignal())&&n.category)&&!i.emittedBuilderSignal()||i.isCollectionInProgressSignal()),e.R7$(2),e.Y8G("completed",!1),e.R7$(2),e.Y8G("ngIf",i.categoryId),e.R7$(),e.Y8G("state",i.searchingStateSignal())}}function Po(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-modal",113),e.bIt("hide",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.stopSelectorTour())}),e.j41(1,"div",114),e.nrm(2,"img",115),e.k0s()()}if(2&a){const t=e.XpG();e.Y8G("header","Tour: "+t.introOptions.name)("visible",t.categorySelectorTourShown)("appendTo",t.appendTo),e.R7$(2),e.Y8G("src",t.introOptions.steps[0].intro,e.B4B)}}function Ro(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-compare-by-plant-chart-modal",116),e.nI1(1,"async"),e.nI1(2,"async"),e.nI1(3,"async"),e.bIt("hide",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.hideCompareByPlantModal())}),e.k0s()}if(2&a){const t=e.XpG();e.Y8G("appendTo",t.appendTo)("visible",t.shouldShowCompareByPlantModal)("searchStatistics",e.bMT(1,6,t.statisticsWithMaterials$))("mfPrettyString",e.bMT(2,8,t.mfPrettyString$))("searchTerms",e.bMT(3,10,t.searchTermsWithoutSoftSearchTerms$))("referenceAndTargetSettings",t.referenceAndTargetSettingsSignal())}}function yo(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-compare-by-manufacturer-chart-modal",116),e.nI1(1,"async"),e.nI1(2,"async"),e.nI1(3,"async"),e.bIt("hide",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.hideCompareByManufacturerModal())}),e.k0s()}if(2&a){const t=e.XpG();e.Y8G("appendTo",t.appendTo)("visible",t.shouldShowCompareByManufacturerModal)("searchStatistics",e.bMT(1,6,t.statisticsWithMaterials$))("mfPrettyString",e.bMT(2,8,t.mfPrettyString$))("searchTerms",e.bMT(3,10,t.searchTermsWithoutSoftSearchTerms$))("referenceAndTargetSettings",t.referenceAndTargetSettingsSignal())}}function Oo(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-compare-by-category-chart-modal",116),e.nI1(1,"async"),e.nI1(2,"async"),e.nI1(3,"async"),e.bIt("hide",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.hideCompareByCategoryModal())}),e.k0s()}if(2&a){const t=e.XpG();e.Y8G("appendTo",t.appendTo)("visible",t.shouldShowCompareByCategoryModal)("searchStatistics",e.bMT(1,6,t.statisticsWithMaterials$))("mfPrettyString",e.bMT(2,8,t.mfPrettyString$))("searchTerms",e.bMT(3,10,t.searchTermsWithoutSoftSearchTerms$))("referenceAndTargetSettings",t.referenceAndTargetSettingsSignal())}}function vo(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-material-spec-chart-modal",117),e.nI1(1,"async"),e.bIt("hide",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.hideCompareByStrengthModal())}),e.k0s()}if(2&a){const t=e.XpG();e.Y8G("appendTo",t.appendTo)("data",e.bMT(1,3,t.compareByStrengthData$))("visible",t.shouldShowCompareByStrengthModal)}}function Io(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-element-select-modal",118),e.bIt("hide",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.hideSelectElementsModal())})("completeEvent",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.submitSearchResults(i))}),e.k0s()}if(2&a){const t=e.XpG();e.Y8G("visible",t.shouldShowSelectElementsModal)("appendTo",t.appendTo)("options",t.elementItemsWithSameCollection)}}var Xe=function(a){return a.selectedIndustryEpd="selected_industry_epd_id",a.selectedGenericEstimate="selected_generic_estimate_id",a.selectedMaterial="selected_material_id",a.alternativeMaterials="alternative_material_ids",a}(Xe||{});let mn=(()=>{class a extends U{set collection(t){t?.mf&&this.restoreFormInProgressSignal.set(!0),this.collectionSignal.set(t),this.isReusedMaterialSignal.set(t?.isReused),this.sidebarService.resetSelectedCategory(),j.$.schedule(()=>this.pushCollection(t))}constructor(t,n,i,s,c,_,M,R,v,x,H,$,oe,Ce,ae,Oe,O,Pe,qe,pe,Ut,Ht,bt,Vt,_t,fn,Xt,Sl,fl,Cl,Tl,Ml,El){super(),this.cdRef=t,this.logger=n,this.unitService=i,this.sidebarService=s,this.materialService=c,this.categoryService=_,this.searchTypeHelper=M,this.statisticsService=R,this.breadcrumbService=v,this.collectionService=x,this.searchTermsService=H,this.declaredUnitService=$,this.notificationService=oe,this.project
1ViewFormService=Ce,this.materialChartPointsService=ae,this.introService=Oe,this.confirmationService=O,this.chartSettingsService=Pe,this.downloadByLinkService=qe,this.revitBridgeService=pe,this.route=Ut,this.cryptoService=Ht,this.statisticsCalculatorService=bt,this.industryEpdService=Vt,this.jobService=_t,this.userService=fn,this.materialFilterService=Xt,this.genericEstimatesService=Sl,this.configurationService=fl,this.store=Cl,this.projectSignals=Tl,this.asyncOptionsService=Ml,this.injector=El,this.keepSelectedSearchType=!0,this.showCategoryStep=!1,this.searchSubmit=new e.bkB,this.showDetails=new e.bkB,this.showCurrentDialog=new e.bkB,this.hideCurrentDialog=new e.bkB,this.setBuilder=new e.bkB,this.elementItemsWithSameCollection=[],this.materialsSignal=(0,e.vPA)([]),this.materialLoadingSignal=(0,e.vPA)(!1),this.industryLoadingSignal=(0,e.vPA)(!1),this.geLoadingSignal=(0,e.vPA)(!1),this.rowsCount=25,this.labels=z.W,this.searchingStepSignal=(0,e.vPA)(!1),this.searchingStateSignal=(0,e.EWP)(()=>this.searchingStepSignal()?"searching":"search"),this.categorySelectorTourShown=!1,this.unitTypes=te.Sy,this.preventToSelectCategories=[],this.showResultsSignal=(0,e.vPA)(!1),this.showCompareByProductChartSignal=(0,e.vPA)(!1),this.selectedStepIndex=0,this.emittedCategorySignal=(0,e.vPA)(void 0),this.emittedBuilderSignal=(0,e.vPA)(""),this.isReusedMaterialSignal=(0,e.vPA)(!1),this.nextButtonTextSignal=(0,e.EWP)(()=>this.emittedCategorySignal()&&!this.emittedBuilderSignal()?$localize`:material-search-form|:EPDs`:$localize`:material-search-form|:Next`),this.isBroadCategorySignal=(0,e.vPA)(!1),this.isCollectionInProgressSignal=(0,e.vPA)(!1),this.isSearchInProgressSignal=(0,e.vPA)(!1),this.showPlantsMapSignal=(0,e.vPA)(!1),this.plantMapMaterialSearchPrettyStringSignal=(0,e.vPA)(null),this.plantMaterialFilterSignal=(0,e.vPA)(null),this.baseProjectAddressSignal=(0,e.vPA)(null),this.restoreFormInProgressSignal=(0,e.vPA)(!1),this.actualizeFormInProgressSignal=(0,e.vPA)(!1),this.prepareSearchFormInProgressSignal=(0,e.EWP)(()=>this.restoreFormInProgressSignal()||this.actualizeFormInProgressSignal()),this.tooltips=ee.vX,this.isCtrlPressedSignal=(0,e.vPA)(!1),this.uncachedSearchTooltipSignal=(0,e.EWP)(()=>this.isCtrlPressedSignal()?ee.vX.uncachedSearch:null),this.referenceAndTargetSettingsSignal=(0,e.vPA)(null),this.collectionSignal=(0,e.vPA)(null),this.baselineGwpSignal=(0,e.EWP)(()=>{const{gwpSourceName:Yt,referenceLine:Cn,customReferenceGwp:bl,referenceSet:Tn}=this.referenceAndTargetSettingsSignal(),Al=Cn?.id||Tn?.id?(0,e.O8t)(this.referenceGwpSourcesSignal).find(zt=>zt.isReferenceLine):(0,e.O8t)(this.referenceGwpSourcesSignal).find(zt=>zt.name===Yt);return this.statisticsForUseSignal()?W.S.getGwpBaseline((0,e.O8t)(this.statisticsForUseSignal),Al,Cn,bl,Tn):null}),this.isNeedToGetMaterialsSignal=(0,e.EWP)(()=>[fe.VD.productEpds,fe.VD.trustedVendorDeclarations].some(Yt=>this.epdTypesSignal()?.includes(Yt))),this.isNeedToGetIndustryEpdsSignal=(0,e.EWP)(()=>this.epdTypesSignal()?.includes(fe.VD.industryEpds)),this.isNeedToGetGenericEstimatesSignal=(0,e.EWP)(()=>
1this.epdTypesSignal()?.includes(fe.VD.genericEstimates)),this.categoryHierarchyIds=[],this.externalFormStateSource=new L.t(null),this.externalFormState$=this.externalFormStateSource.asObservable(),this.externalMfPrettyStringSource=new L.t(null),this.externalMfPrettyString$=this.externalMfPrettyStringSource.asObservable(),this.formFieldsSource=new L.t([]),this.searchTermsSource=new L.t([]),this.statisticsSource=new L.t(null),this.industryEpdsSource=new L.t([]),this.genericEstimatesSource=new L.t([]),this.isBoxPlotLoadingSource=new L.t(!1),this.alternativeMaterialsSource=new L.t([]),this.selectedMaterialSource=new L.t(null),this.selectedIndustryEpdSource=new L.t(null),this.selectedGenericEstimateSource=new L.t(null),this.multipleBoxPlotDataSource=new L.t(null),this.materialsPageFirstSource=new f.B,this.industryEpdsPageFirstSource=new f.B,this.genericEstimatesPageFirstSource=new f.B,this.searchResultsBreadcrumbs={label:$localize`Search Results`},this.prevMaterialsSortOrder=1,this.actualizeSearchFomSource=new f.B,this.actualizeSearchForm$=this.actualizeSearchFomSource.asObservable(),this.cachedMaterialFilterSignal=(0,e.vPA)(null),this.cachedMaterialFilterWithoutSoftSearchTermsSignal=(0,e.vPA)(null),this.cachedStatisticsMaterialFilterPrettyStringSignal=(0,e.vPA)(null),this.cachedIndustryMaterialFilterPrettyStringSignal=(0,e.vPA)(null),this.cachedGenericEstimatesMaterialFilterPrettyStringSignal=(0,e.vPA)(null),this.cachedMaterialResultsFilterPrettyStringSignal=(0,e.vPA)(null),this.categoryWarningTemplate=$localize`:material-search|:<p><b>Warning</b></p><p>This will search many sub-categories that are quite different from each other.<br/>The resulting statistics may be deceptive, and any baselines may not be valid, unless a narrower sub-category is chosen. Continue?</p>`,this.subCategoryWarningTemplate=$localize`:material-search|:<p><b>Warning</b></p><p>You can search for and select EPDs, but we won't be able to generate useful statistics for this category until it is more fully analyzed. Continue?</p>`,this.savingInProgressSignal=(0,e.vPA)(!1)}pushCollection(t){this.logger.log("Pushed element's collection",t);const n=t?.mf;if(n)this.externalMfPrettyStringSource.next(n);else{const s=t?.searchTerms;this.externalFormStateSource.next(new gt.wj(s?{...s.toJSON(),values:{...s.values.toJSON(),epdDateValidityEnds:s.values?this.getDefaultEpdDateValidityEnds(s.values.epdDateValidityEnds):void 0,target:s.values.target}}:null))}const i=new Ie.D0({...t});if(this.setCategoryHierarchyIds(i.categoryId),i&&i.unit){t?.selectedIndustryEpd&&(i.industryEpdsCount||(i.industryEpdsCount=1),this.industryEpdsSource.next([t.selectedIndustryEpd]),this.selectedIndustryEpdSource.next(this.getCorrectedIndustryEpd(t.selectedIndustryEpd))),t?.selectedGenericEstimate&&(i.genericEstimatesCount||(i.genericEstimatesCount=1),this.genericEstimatesSource.next([t.selectedGenericEstimate]),this.selectedGenericEstimateSource.next(this.getCorrectedGenericEstimate(t.selectedGenericEstimate))),this.selectedMaterialSource.next(this.getCorrectedMaterial(t.selectedMaterial));const s=t.alternativeMaterials?.map(M=>this.getCorrectedMaterial(M)),c=this.bidders?this.bidders.reduce((M,R,v)=>(R.bids.forEach(x=>{x.material&&(M[x.material.id]=M[x.material.id]?[...M[x.material.id],v]:[v])}),M),{}):{},_=s.map(M=>c[M.id]?.length?(M.bidderIndexes=c[M.id],M):(M.bidderIndexes=[],M));this.alternativeMaterialsSource.next(_),this.categoryHierarchyIds.includes(K.BM.insulation)&&!i.unit.getUnitName().includes("RSI")&&(i.unit=i.unit.multiply((0,le.Dq)("RSI"))),this.statisticsSource.next(i)}else this.statisticsSource.next(null)}get categoryId(){return this.searchForm.controls.categoryId.value}get category(){return this.categoryId?this.categoryService.getCategoryById(this.categoryId).pipe((0,Ye.u)()):null}ngOnInit(){this.referenceGwpSourcesSignal=(0,Mt.ot)(this.asyncOptionsService.getAsyncOptions(Dn.S.referenceGwpSources$),{injector:this.injector,initialValue:[]});const t=this.selectedElement?.value.shared;this.referenceAndTargetSettingsSignal.set(this.chartSettingsService.prepareInitialReferenceAndTargetMethods({collection:t,project:this.project})),this.project&&(this.baseProjectAddressSignal=this.store.selectSignal((this.projectSignals.isCivilProjectSignal()?wn.TJ:xn.UN).selectProjectAddress)),this.isShowGenericEstimates=this.configurationService.isShowGenericEstimates(),this.sidebarService.resetSelectedCategory(),this.isFirstInit=!0,this.initializeObservables(),this.subscribeToUsersnap(),this.searchForm=this.materialSearchFormService.createForm(this.destroy$,{target:this.referenceAndTargetSettingsSignal().target}),this.epdTypesSignal=(0,Mt.ot)(this.searchForm.controls.epdTypes.valueChanges,{injector:this.injector,initialValue:[]}),this.cdRef.markForCheck(),this.target$=(0,Te.dX)(this.searchForm,"target",this.destroy$).pipe((0,ve.t)({bufferSize:1,refCount:!0})),this.searchForm.valueChanges.pipe((0,ge.p)(()=>!this.prepareSearchFormInProgressSignal()&&!this.savingInProgressSignal()),(0,at.F)((n,i)=>ot.$.calculateHash(JSON.stringify(n))===ot.$.calculateHash(JSON.stringify(i))),(0,st.i)(1),(0,C.n)(()=>this.getSearchTerms()),(0,P.M)(n=>this.searchTermsSource.next(n)),(0,P.M)(()=>this.searchingStepSignal.set(!1)),(0,P.M)(()=>this.resetSearchResults()),(0,P.M)(()=>this.resetCachedMaterialFilter()),(0,h.Q)(this.destroy$)).subscribe(),this.externalFormState$.pipe((0,h.Q)(this.destroy$),(0,ge.p)(n=>!!n),(0,P.M)(n=>this.logger.log("Got external form state:",n)),(0,C.n)(n=>this.setCategoryFromFormState(n)),(0,ge.p)(n=>!!n),(0,C.n)(n=>this.materialSearchFormService.restoreThreeStateSearchTerms(n,this.categoryFormFields)),(0,P.M)(n=>n.values.categoryId=void 0),(0,P.M)(n=>this.setFormState(n)),(0,C.n)(()=>this.getSearchTerms()),(0,P.M)(n=>{this.searchTermsSource.next(n);const i=this.statisticsSource.getValue();this.statisticsSource.next(i)})).subscribe(()=>{this.target$=this.searchForm.controls.target.valueChanges.pipe((0,F.Z)(this.searchForm.value.target),(0,h.Q)(this.destroy$),(0,ve.t)({bufferSize:1,refCount:!0})),ne.E.schedule(()=>this.restoreFormInProgressSignal.set(!1))}),this.externalMfPrettyString$.pipe((0,h.Q)(this.destroy$),(0,ge.p)(n=>!!n),(0,C.n)(n=>(this.plantMapMaterialSearchPrettyStringSignal.set(n),this.materialService.translateMaterialQueryStringToMaterialFilter(n))),(0,P.M)(n=>this.logger.log("Got external material filter:",n)),(0,C.n)(n=>{const i=n.category;return this.plantMaterialFilterSignal.set(n),this.categoryService.getCategoryByName(i).pipe((0,C.n)(s=>this.emitCategory(s)),(0,m.T)(s=>s&&!s.genericMaterial?{mf:n,category:s}:null))}),(0,ge.p)(n=>!!n?.mf),(0,C.n)(({mf:n,category:i})=>this.materialSearchFormService.restoreSearchFormFromMaterialFilter(n,this.categoryFormFields,i.mayContainTrustedVendorDeclarations)),(0,C.n)(n=>this.category.pipe((0,m.T)(i=>({category:i,formState:n})))),(0,me.E)(this.sessionService.unitSystemName$),(0,m.T)(([{category:n,formState:i},s])=>(i.values.gwp&&(i.values.gwp=this.gwpPerCategoryDeclaredUnitInUnitSystemName(i.values.gwp,n.declaredUnit,s)),i.values.reportedGwp&&(i.values.reportedGwp=this.gwpPerCategoryDeclaredUnitInUnitSystemName(i.values.reportedGwp,n.declaredUnit,s)),i)),(0,P.M)(n=>this.setFormState(n)),(0,C.n)(()=>this.getSearchTerms()),(0,P.M)(n=>{this.searchTermsSource.next(n);const i=this.statisticsSource.getValue();this.statisticsSource.next(i)})).subscribe(()=>{this.target$=this.searchForm.controls.target.valueChanges.pipe((0,F.Z)(this.searchForm.value.target),(0,h.Q)(this.destroy$),(0,ve.t)({bufferSize:1,refCount:!0})),ne.E.schedule(()=>this.restoreFormInProgressSignal.set(!1))}),this.sidebarService.categorySelection$.pipe((0,ge.p)(n=>!!n.category),(0,P.M)(n=>this.categorySelect(n)),(0,ge.p)(()=>this.stepper.selectedIndex>0),(0,C.n)(n=>this.actualizeSearchForm(n)),(0,C.n)(()=>this.getSearchTerms()),(0,P.M)(n=>this.searchTermsSource.next(n)),(0,h.Q)(this.destroy$)).subscribe(),this.preventToSelectCategories.push(K.BM.allMaterials),this.route.queryParams.pipe((0,u.s)(1),(0,ge.p)(n=>n.mf||n.state),(0,P.M)(n=>{if(this.restoreFormInProgressSignal.set(!0),n.mf){const i=this.cryptoService.decryptBase64(n.mf);this.logger.log("Decrypted MF from URL:",i),i&&(this.setStep(!!i),j.$.schedule(()=>this.externalMfPrettyStringSource.next(i)))}else if(n.state){const i=this.cryptoService.decryptBase64(n.state);if(!(0,q.I)(i)){const s=JSON.parse(i);this.logger.log("Decrypted Search terms from URL:",s),this.setStep(!!s.searchTerms.values.categoryId),j.$.schedule(()=>this.externalFormStateSource.next(new gt.wj(s.searchTerms)))}}})).subscribe()}ngOnChanges(t){t.collection&&(this.setElementItemsWithSameCollection(t.collection.currentValue,this.rootLabelsArray),this.setStep(!(this.showCategoryStep||!t.collection.currentValue?.mf&&!t.collection.currentValue?.searchTerms?.values?.categoryId))),t.rootLabelsArray&&this.setElementItemsWithSameCollection(this.collectionSignal(),t.rootLabelsArray.currentValue)}ngAfterViewInit(){this.initIntro();const t=document.querySelector("mat-step-header:last-child");t&&(0,S.R)(t,"click",n=>{this.categoryId&&!this.searchingStepSignal()&&(t===n.target||t.contains(n.target))&&(this.stepper.next(),this.search())}).pipe((0,h.Q)(this.destroy$)).subscribe()}setElementItemsWithSameCollection(t,n){t&&n&&(this.elementItemsWithSameCollection=this.project
1ViewFormService.getElementItemsWithCollectionId(t.id,n))}materialsToCompareChanged(t){this.materialsToCompare=t,this.cdRef.markForCheck()}startIntro(){0===this.selectedStepIndex&&(this.categorySelectorTourShown=!0)}stopSelectorTour(){this.stopIntro(!1)}selectTour(){this.introOptions=this.selectedStepIndex>0?(0,q.I)(this.materialsSignal())?he:xe:Be}initIntro(){this.selectTour(),this.introService.isShowIntro().pipe((0,h.Q)(this.destroy$),(0,ge.p)(()=>!this.introShown),(0,P.M)(()=>this.introShown=!0),(0,C.n)(()=>this.sidebarService.sidebarShown$.pipe((0,u.s)(1))),(0,P.M)(t=>this._introSidebarShown=t),(0,P.M)(t=>{t||this.sidebarService.showSideBar()}),(0,P.M)(()=>this.sidebarService.hideSideBarScroll()),(0,P.M)(()=>this.sidebarService.expandSideBarMenuItems()),(0,P.M)(()=>this.cdRef.markForCheck()),(0,Le.c)(700),(0,P.M)(()=>{this.selectTour();const t=this.introService.startIntro(this.introOptions).onbeforechange(()=>{this.introService.getCurrentStep(t)<3&&window.scrollTo({top:0})}).onexit(()=>this.stopIntro())})).subscribe()}stopIntro(t=!0){this.introShown=!1,this.categorySelectorTourShown=!1,this.introService.stopIntro(),this.introService.markTourAsViewed(this.introOptions.id,this.introOptions.version),this.sidebarService.sidebarShown$.pipe((0,u.s)(1),(0,ht.v)(()=>t),(0,P.M)(n=>{this._introSidebarShown!==n&&this.sidebarService.toggleSidebar(n)})).subscribe(),this.sidebarService.showSideBarScroll(),this.cdRef.markForCheck()}initializeObservables(){this.sessionService.unitSystemName$.pipe((0,h.Q)(this.destroy$)).subscribe(t=>{this.unitSystem=t,this.resetCachedMaterialFilter()}),this.statistics$=(0,T.z)([this.statisticsSource.asObservable(),this.sessionService.unitSystemName$]).pipe((0,m.T)(([t,n])=>t),(0,ve.t)({bufferSize:1,refCount:!0})),this.formFields$=this.formFieldsSource.asObservable(),this.searchTerms$=this.searchTermsSource.asObservable(),this.searchTermsWithoutSoftSearchTerms$=this.searchTerms$.pipe((0,m.T)(t=>this.searchTermsService.filterSoftSearchTerms(t)),(0,Ye.u)()),this.isBoxPlotLoading$=this.isBoxPlotLoadingSource.asObservable(),this.intentFormFields$=this.formFields$.pipe((0,m.T)(t=>t.filter(n=>n.section===de.z5.Intent)),(0,m.T)(t=>t.sort((n,i)=>n.order-i.order))),this.advancedFormFields$=this.formFields$.pipe((0,m.T)(t=>t.filter(n=>n.section===de.z5.Advanced)),(0,m.T)(t=>t.sort((n,i)=>n.order-i.order))),this.geographicFormFields$=this.formFields$.pipe((0,m.T)(t=>t.filter(n=>n.section===de.z5.Geographic)),(0,m.T)(t=>t.sort((n,i)=>n.order-i.order))),this.columnsToShow$=this.formFields$.pipe((0,m.T)(t=>t.filter(n=>n.filterBar&&!n.filterBar.dynamicField)),(0,m.T)(t=>t.sort((n,i)=>n.filterBar.order-i.filterBar.order))),this.shouldShowAdditionalAttributes$=this.intentFormFields$.pipe((0,m.T)(t=>Object.keys(t).length>0)),this.alternativeMaterials$=this.alternativeMaterialsSource.asObservable().pipe((0,P.M)(t=>{t.length&&(this.updateMaterialsWithSelectedAndAlternatives(),this.showResultsSignal.set(!0))}),(0,ve.t)({bufferSize:1,refCount:!0})),this.selectedMaterial$=this.selectedMaterialSource.asObservable().pipe((0,P.M)(t=>{t&&(this.updateMaterialsWithSelectedAndAlternatives(),this.showResultsSignal.set(!0))}),(0,ve.t)({bufferSize:1,refCount:!0})),this.materialGwpData$=this.selectedMaterial$.pipe((0,m.T)(t=>t&&this.declaredUnit?{gwp:W.S.getMaterialRawGwpPerDeclaredUnit(t,this.declaredUnit.originalUnit.getBaseUnit()),gwpZ:t.gwpZ,declaredUnit:this.declaredUnit.originalUnit}:null)),this.selectedIndustryEpd$=this.selectedIndustryEpdSource.asObservable(),this.industryEpds$=this.industryEpdsSource.asObservable().pipe((0,m.T)(t=>t.map(n=>(n.unit&&(this.getCorrectedIndustryEpd(n),n.processedDeclaredUnit=this.declaredUnitService.parseDeclaredUnit(n.unit)),n))),(0,C.n)(t=>this.selectedIndustryEpd$.pipe((0,m.T)(()=>t)))),this.genericEstimates$=this.genericEstimatesSource.asObservable().pipe((0,m.T)(t=>t.map(n=>(n.unit&&(this.getCorrectedGenericEstimate(n),n.processedDeclaredUnit=this.declaredUnitService.parseDeclaredUnit(n.unit)),n))),(0,C.n)(t=>this.selectedGenericEstimate$.pipe((0,m.T)(()=>t)))),this.selectedGenericEstimate$=this.selectedGenericEstimateSource.asObservable(),this.statsAndSelectedEpds$=(0,T.z)([this.statistics$,this.selectedIndustryEpd$,this.selectedGenericEstimate$,this.selectedMaterial$,this.alternativeMaterials$]).pipe((0,m.T)(([t,n,i,s,c])=>
1({statistics:t,selectedIndustryEpd:n,selectedGenericEstimate:i,selectedMaterial:s,alternativeMaterials:c}))),this.statisticsForUse$=this.statsAndSelectedEpds$.pipe((0,m.T)(({statistics:t,selectedIndustryEpd:n,selectedGenericEstimate:i,selectedMaterial:s})=>{let c=n?new Ie.D0({...n.toJSON(),industryEpdsCount:t?.industryEpdsCount,genericEstimatesCount:t?.genericEstimatesCount,baselines:t?.baselines,excludedSearchTerms:t?.excludedSearchTerms,samples:t?.samples,unit:n.declaredUnit}):i?new Ie.D0({...i.toJSON(),industryEpdsCount:t?.industryEpdsCount,genericEstimatesCount:t?.genericEstimatesCount,baselines:t?.baselines,excludedSearchTerms:t?.excludedSearchTerms,samples:t?.samples,unit:i.declaredUnit}):this.isBroadCategorySignal()&&s?new Ie.D0({...s.toJSON(),industryEpdsCount:t?.industryEpdsCount,genericEstimatesCount:t?.genericEstimatesCount,baselines:t?.baselines,excludedSearchTerms:t?.excludedSearchTerms,samples:1,unit:s.declaredUnit,average:s.conservativeEstimate,bestPractice:s.conservativeEstimate}):this.isBroadCategorySignal()&&this.isReusedMaterialSignal()&&t?new Ie.D0(t.toJSON()):t;if(c&&this.isBroadCategorySignal()&&this.isReusedMaterialSignal()&&(c.average=c.bestPractice=c.conservativeEstimate=(0,le.Dq)("0 kgCO2e")),this.bidders&&this.isBroadCategorySignal()&&(!n||!i)){const _=this.getSelectedAndAlternativeMaterials();if(!(0,q.I)(_)){const M=_[0];c=new Ie.D0({...M.toJSON(),industryEpdsCount:t?.industryEpdsCount,genericEstimatesCount:t?.genericEstimatesCount,baselines:t?.baselines,excludedSearchTerms:t?.excludedSearchTerms,samples:1,unit:M.declaredUnit,average:M.conservativeEstimate,bestPractice:M.conservativeEstimate})}}if(c){const _=n?this.getAverageDensity(n):null,M=i?this.getAverageDensity(i):null;c.density=s?.density||_||M||c.density}return this.statisticsPostProcessing(c),c}),(0,ve.t)({bufferSize:1,refCount:!0})),this.statisticsForUseSignal=(0,Mt.ot)(this.statisticsForUse$,{injector:this.injector,initialValue:null}),this.statisticsWithMaterials$=(0,T.z)([this.statisticsForUse$,(0,Mt.br)(this.materialsSignal,{injector:this.injector})]).pipe((0,m.T)(([t,n])=>(t&&(t.materials=[...n]),t))),this.shouldShowScatterPlot$=this.statsAndSelectedEpds$.pipe((0,m.T)(({statistics:t,selectedIndustryEpd:n,selectedGenericEstimate:i,selectedMaterial:s})=>!s&&!n&&!i&&t&&t.samples>0&&t.samples<=3)),this.shouldShowBoxPlot$=this.statsAndSelectedEpds$.pipe((0,m.T)(({statistics:t,selectedIndustryEpd:n,selectedGenericEstimate:i,selectedMaterial:s})=>t&&(0===t.samples||t.samples>3)||this.project&&(!!n||!!i||!!s))),this.shouldShowAnyPlot$=(0,T.z)([this.shouldShowBoxPlot$,this.shouldShowScatterPlot$]).pipe((0,m.T)(([t,n])=>(t||n)&&!this.isBroadCategorySignal()&&!this.isReusedMaterialSignal())),this.multipleBoxPlotData$=this.multipleBoxPlotDataSource.asObservable().pipe((0,Ye.u)()),this.materialsPageFirst$=this.materialsPageFirstSource.asObservable(),this.industryEpdsPageFirst$=this.industryEpdsPageFirstSource.asObservable(),this.genericEstimatesPageFirst$=this.genericEstimatesPageFirstSource.asObservable(),this.allowBroadCategorySelection$=(0,T.z)([this.selectedIndustryEpd$,this.selectedGenericEstimate$,this.selectedMaterial$,this.alternativeMaterials$]).pipe((0,m.T)(([t,n,i])=>this.isBroadCategorySignal()&&(this.isReusedMaterialSignal()||!!t||!!n||!!i)||this.isAlternativeBidderSelected()),(0,ve.t)({bufferSize:1,refCount:!0}))}isAlternativeBidderSelected(){return this.bidders&&this.isBroadCategorySignal()&&!(0,q.I)(this.alternativeMaterialsSource.getValue())}statisticsPostProcessing(t){if(t&&t.unit){if(t.processedDeclaredUnit=this.declaredUnitService.parseDeclaredUnit(t.unit),this.declaredUnit=this.declaredUnitService.parseDeclaredUnit(t.unit),t.collectionName&&t.collectionId&&this.searchForm.patchValue({collectionName:t.collectionName,collectionId:t.collectionId}),!(0,q.I)(t.excludedSearchTerms)){const n=this.searchTermsSource.getValue(),i=t.getExcludedSearchTermsInCamelCase(),s=this.searchTermsService.markSoftSearchTerms(n,i);this.searchTermsSource.next(s)}}else this.declaredUnit=null;this.isBoxPlotLoadingSource.next(!1)}getShareableLink(){return(this.cachedStatisticsMaterialFilterPrettyStringSignal()?(0,E.of)(this.cachedStatisticsMaterialFilterPrettyStringSignal()):this.getSearchFormOptions().pipe((0,C.n)(n=>this.materialService.translateMaterialFilterToQueryString(n)))).pipe((0,C.n)(n=>{this.logger.debug("MF by search form state:",n);const i=this.cryptoService.encryptBase64(n);return this.materialService.getShareableLink(i)}))}ngOnDestroy(){super.ngOnDestroy()}hideSearchDialog(){this.hideCurrentDialog.emit()}showSearchDialog(){this.showCurrentDialog.emit()}setCategoryFromFormState(t){return this.categoryService.getCategoryById(t.values.categoryId).pipe((0,C.n)(i=>this.emitCategory(i)),(0,m.T)(i=>i?t:null))}emitCategory(t){return t?(this.emittedCategorySignal.set({category:t,shouldResetStatistics:!1}),this.categorySelect(this.emittedCategorySignal()),this.actualizeSearchForm(this.emittedCategorySignal()).pipe((0,C.n)(()=>this.getSearchTerms()),(0,P.M)(n=>this.searchTermsSource.next(n)),(0,m.T)(()=>t))):(this.setCategoryId(null),this.setStep(!1),this.restoreFormInProgressSignal.set(!1),(0,E.of)(t))}getSearchType(t){return this.getControlSearchType(t)}onSearchTypeChange({controlName:t,searchType:n}){this.resetSearchResults(),this.resetCachedMaterialFilter(),this.setControlSearchType(t,n);let s=this.searchTermsSource.getValue().map(c=>
1this.termNamesMatch(c.name,t)?{...c,searchTypeIcon:this.searchTypeHelper.getSearchTypeIcon(n)}:c);s=this.searchTermsService.unMarkSoftSearchTerms(s),this.searchTermsSource.next(s)}termNamesMatch(t,n){return t===((0,b.cy)(n)?n[n.length-1]:n)}onStepChange(t){this.selectedStepIndex=t.selectedIndex,this.initIntro(),0===t.previouslySelectedIndex&&1===t.selectedIndex&&this.emittedCategorySignal()&&(this.actualizeFormInProgressSignal.set(!0),this.actualizeSearchForm(this.emittedCategorySignal()).pipe((0,u.s)(1),(0,C.n)(()=>this.getSearchTerms()),(0,P.M)(n=>this.searchTermsSource.next(n)),(0,Me.j)(()=>this.actualizeFormInProgressSignal.set(!1))).subscribe()),t.previouslySelectedIndex>0&&0===t.selectedIndex&&this.pulseButton.delayedRipple(),t.selectedIndex<2&&(this.searchingStepSignal.set(!1),this.showPlantsMapSignal.set(!1),this.plantMapMaterialSearchPrettyStringSignal.set(null))}setBreadcrumbItems(t){this.items=t}categorySelect(t){const{category:n}=t;this.emittedCategorySignal.set(t),this.selectedCategoryId=n.id,this.formSelectorHeader=(n.displayName||n.name||"").toUpperCase(),this.pulseButton?.delayedRipple(),this.setCategoryHierarchyIds(n.id)}onNext(){this.emittedBuilderSignal()?this.setBuilder.emit(this.emittedBuilderSignal()):this.stepper.next()}onDone(){this.actualizeFormInProgressSignal.set(!0),this.actualizeSearchForm(this.emittedCategorySignal()).pipe((0,u.s)(1),(0,ge.p)(({category:t})=>!t.genericMaterial),(0,P.M)(()=>this.selectElementsToApplyCollection(this.elementItemsWithSameCollection.length<=1)),(0,Me.j)(()=>this.actualizeFormInProgressSignal.set(!1))).subscribe()}onSetBuilder(t){this.emittedBuilderSignal.set(t)}setCategoryAdditionalProperties(t){this.isBroadCategorySignal.set(t.categoryStatisticsWarning||t.allowsAnyDeclaredUnit),this.categoryService.hasAccessToCategory(t.id).pipe((0,u.s)(1),(0,P.M)(n=>{this.hasAccessToCategory=n,this.setWarningTooltips(t)})).subscribe(),this.showShortServiceLifeDisclaimerIfNeeded(t)}setWarningTooltips(t){this.searchButtonTooltip=null,this.useCollectionTooltip=null;const n=$localize`To use this collection, you will need to select a more specific category, or an Industry EPD, or a specific product EPD.`;t.allowsAnyDeclaredUnit&&(this.searchButtonTooltip=$localize`This category includes EPDs declared with mutually incompatible declared units. Comparisons and ordering of EPDs within this category may be irrelevant, unless done by hand.`,this.useCollectionTooltip=n),t.categoryStatisticsWarning&&(this.searchButtonTooltip=$localize`This is very broad category. Consider selecting a sub-category for more useful results.`,this.useCollectionTooltip=$localize`This category is too broad to generate statistics. `+n),this.hasAccessToCategory||(this.useCollectionTooltip=this.searchButtonTooltip=ee.vX.doesNotHaveAccessToCategory)}restoreWarningTooltips(t){this.categoryService.getCategoryById(t).pipe((0,u.s)(1),(0,P.M)(n=>this.setWarningTooltips(n))).subscribe()}actualizeSearchForm(t){this.logger.debug("Actualize search form - get category form fields"),this.materialSearchFormService.clearUnknownMfPredicates(),this.clearCategoryWarnings(),this.actualizeSearchFomSource.next(),this.pulseButton?.stopPulse();const{category:n,shouldResetStatistics:i}=t;return n.genericMaterial?this.applyGenericCategory(n).pipe((0,m.T)(()=>t)):this.materialSearchFormService.getSearchFormFieldsByCategory(n).pipe((0,m.T)(s=>{this.categoryFormFields=s,this.breadcrumbService.removeFromCurrentBreadcrumbs(this.searchResultsBreadcrumbs),this.setCategoryAdditionalProperties(n),this.hideCompareByProduct(),this.searchingStepSignal.set(!1),this.isFirstInit&&(this.searchForm.reset({epdDateValidityEnds:this.getDefaultEpdDateValidityEnds(),target:this.searchForm.value.target,epdTypes:this.getDefaultSearchFormEpdTypes(this.collectionSignal(),n.mayContainTrustedVendorDeclarations),lciaMethod:this.getDefaultSearchFormLciaMethod()}),this.isFirstInit=!1),this.setCategoryId(n?n.id:null),i&&(this.resetData(),this.resetCachedMaterialFilter()),this.materialSearchFormService.updateFormFields(this.categoryFormFields,this.destroy$),this.materialSearchFormService.initDefaultFormSearchTypes(this.categoryFormFields,this.keepSelectedSearchType),this.provideCategoryFormFields(this.categoryFormFields),n&&(this.formHeader=this.getFormHeader(n),this.materialSearchFormService.setCategorySpecificValidators(n,this.destroy$)),this.selectTour(),this.subscribeDynamicFields(n),this.applyDefaultSearchFormValues(),this.prevSearchFormState={values:this.searchForm.value,searchTypes:{...this.materialSearchFormService.getFormSearchTypes()}}}),(0,m.T)(()=>t))}resetSearchFormByDefault(){this.setFormState(this.prevSearchFormState),this.hideSearchResults()}hideSearchResults(){this.showResultsSignal.set(!1),this.materialResultsFilteringParams=null,this.lastMaterialsSortField=null}applyGenericCategory(t){return this.hideCurrentDialog.emit(),this.setCategoryId(null),this.confirmationService.showConfirmationDialog({labels:{agree:$localize`OK`,cancel:$localize`Choose another`},content:$localize`<p>This material, <b>${t.displayName}</b>, is generic and has no EPDs.<br>Its conservative GWP estimate of <b><i>${t.pct80Gwp}</i></b> will be used</p>`}).pipe((0,u.s)(1),(0,P.M)(n=>{n?this.submitCollectionForGenericCategory(t):(this.setStep(!1),this.showCurrentDialog.emit())}),(0,Me.j)(()=>this.restoreFormInProgressSignal.set(!1)))}provideCategoryFormFields(t){const n=Object.values(t).filter(i=>i&&i.controlType).map(i=>({...i}));this.formFieldsSource.next(n)}subscribeDynamicFields(t){[K.BM.vinylSiding,K.BM.insulatedVinylSiding].some(i=>i===t.id)&&(0,Te.dX)(this.searchForm,"sidingFormFactor",this.actualizeSearchForm$).pi
1pe((0,P.M)(i=>{let s=[...Re.WT,...Re.bm];if(!(0,q.I)(i)&&i.every(c=>"Vertical"===c.value&&c.state)){s=Re.bm;const c=this.searchForm.controls.vinylSidingThickness,_=Re.WT.map(R=>R.value),M=c.value?.filter(R=>!_.some(v=>v===R.value))??[];c.setValue(M,{emitEvent:!1})}this.categoryFormFields.vinylSidingThickness.options=s,this.provideCategoryFormFields(this.categoryFormFields)}),(0,P.M)(()=>this.cdRef.detectChanges())).subscribe(),this.searchForm.controls.compliance?.valueChanges.pipe((0,h.Q)(this.actualizeSearchForm$)).subscribe(i=>{this.isFemaSelected=i?.some(s=>s.includes("FEMA 2023 IRA"))})}submitCollectionForGenericCategory(t){const n=(0,Ie.W0)(t.declaredUnit);this.statisticsSource.next(n);const s=this.materialFilterService.getMaterialFilter(t.name,[],this.searchForm.controls.lciaMethod.value);this.materialService.translateMaterialFilterToQueryString(s).pipe((0,u.s)(1),(0,C.n)(c=>{const _=new Qe.W({...n,name:t.displayName,mf:c});return this.createCollection(_)}),(0,P.M)(c=>{this.searchForm.controls.collectionId.setValue(c.id,{emitEvent:!1}),this.searchForm.controls.collectionName.setValue(c.name,{emitEvent:!1}),this.statisticsSource.next(new Ie.D0({...n,collectionName:c.name}))}),(0,P.M)(c=>{this.onSearchSubmit(c,null,null,null,null,[])})).subscribe()}setStep(t){this.selectedStepIndex=t?1:0}getFormHeader(t){return Pt[t.id]||`${t.displayName||t.name} Search by properties`}setCategoryId(t){this.searchForm.controls.categoryId.setValue(t||null,{emitEvent:!1}),this.cdRef.markForCheck()}search(t={}){if(this.searchForm.valid){const n=this.isCtrlPressedSignal();this.searchingStepSignal.set(!0),this.category?.pipe((0,P.M)(i=>this.checkCategoryWarnings(i)),(0,C.n)(i=>this.isBroadCategorySignal()?(this.hideCurrentDialog.emit(),this.confirmationService.showConfirmationDialog({content:this.getCategoryWarningTemplate(i),labels:{agree:$localize`Yes`,cancel:$localize`No`}})):(0,E.of)(!0)),(0,P.M)(()=>this.showCurrentDialog.emit()),(0,ge.p)(i=>i),(0,P.M)(()=>{this.resetSelectedIndustryEpd(),this.resetSelectedGenericEstimate(),this.clearFailedSelectedInstances(),this.getMaterialsAndStatistics({forceUncachedRead:n||void 0,...t,sortBy:this.lastMaterialsSortField})}),(0,u.s)(1)).subscribe()}else this.showFormErrors()}onSelectEpd(t){this.selectedIndustryEpdSource.next(this.getCorrectedIndustryEpd(t)),this.resetSelectedMaterialIfNeeded(t);const n=this.clearUnCompatibleAlternativeMaterials(t);this.alternativeMaterialsSource.next([...n])}onSelectGenericEstimate(t){if(!this.selectedIndustryEpdSource.getValue()){this.selectedGenericEstimateSource.next(this.getCorrectedGenericEstimate(t)),this.resetSelectedMaterialIfNeeded(t);const i=this.clearUnCompatibleAlternativeMaterials(t);this.alternativeMaterialsSource.next([...i])}}save(){if(this.searchForm.valid){this.savingInProgressSignal.set(!0),this.searchButtonTooltip=null,this.useCollectionTooltip=null,this.lockComponent(),this.materialLoadingSignal.set(!0),this.isBoxPlotLoadingSource.next(!0);const t=this.didSearch?this.statisticsForUse$:this.getSearchFormOptions().pipe((0,C.n)(n=>this.materialService.translateMaterialFilterToQueryString(n).pipe((0,m.T)(i=>(this.cachedStatisticsMaterialFilterPrettyStringSignal.set(i),this.plantMapMaterialSearchPrettyStringSignal.set(i),i)))),(0,C.n)(n=>this.getStatistics({mfPrettyString:n})));return(0,k.H)(t).pipe((0,u.s)(1),(0,P.M)(n=>{if(0===n.samples&&(!n.conservativeEstimate||0===n.conservativeEstimate.getNumericValue()))throw this.notificationService.showWarning({detail:$localize`No EPD data available.`}),re.w}),(0,me.E)(this.statisticsForUse$,this.selectedMaterial$,this.selectedIndustryEpd$,this.selectedGenericEstimate$,this.alternativeMaterials$),(0,m.T)(([n,i,s,c,_,M])=>({statisticsForUse:i,selectedIndustryEpd:c,selectedGenericEstimate:_,selectedMaterial:s,alternativeMaterials:M})),(0,C.n)(({statisticsForUse:n,selectedIndustryEpd:i,selectedGenericEstimate:s,selectedMaterial:c,alternativeMaterials:_})=>{const M=this.getExcludeEpdTypes(),v=(0,b.Et)(this.bidIndex)||this.bidders?.length?{}:this.collectionSignal().a4Legs,x=this.collectionService.prepareCollectionReferenceAndTargetValues(this.referenceAndTargetSettingsSignal(),this.project),H=new Qe.W({...n.toJSON(),...v,...x,name:this.searchForm.value.collectionName,mf:this.cachedStatisticsMaterialFilterPrettyStringSignal(),selectedIndustryEpdId:i?.id??null,selectedGenericEstimateId:s?.id??null,selectedMaterialId:c?.id??null,alternativeMaterials:_,...M,isReused:this.isReusedMaterialSignal()});
1return this.getSearchFormOptions().pipe((0,C.n)($=>this.searchTermsService.parseCollectionNameFromMaterialFilter($,H.getExcludedSearchTermsWithoutPostFixes(),!!i,!!s)),(0,m.T)($=>(H.name=$,H)),(0,C.n)($=>$.standardDeviation?(0,E.of)($):this.statisticsCalculatorService.calculateStats(d.B.epds,{gwp:$.average.toSendingString(),gwpZ:$.gwpZ}).pipe((0,m.T)(oe=>($.standardDeviation=oe.standardDeviation,$)))))}),(0,C.n)(n=>this.createCollection(n)),(0,P.M)(n=>{this.searchForm.controls.collectionId.setValue(n.id,{emitEvent:!1}),this.searchForm.controls.collectionName.setValue(n.name,{emitEvent:!1}),this.statisticsSource.next(new Ie.D0({...this.statisticsSource.getValue().toJSON(),collectionName:n.name,categoryId:n.categoryId})),this.collectionSignal.set(n)}),(0,At.W)(n=>{if(400===n.status){const i=n.error.validation_errors,s=Object.keys(i),c=[];s.forEach(M=>{if(M===Xe.selectedIndustryEpd){c.push(Xe.selectedIndustryEpd);const R=this.selectedIndustryEpdSource.getValue();R.qaStatus=je.fR.Error,this.selectedIndustryEpdSource.next(R);
1const v=this.getErrorMessageFor(pt.indusrtyEpd,R.openXpdUuid);this.notificationService.showError(v)}if(M===Xe.selectedGenericEstimate){c.push(Xe.selectedGenericEstimate);const R=this.selectedGenericEstimateSource.getValue();R.qaStatus=je.fR.Error,this.selectedGenericEstimateSource.next(R);const v=this.getErrorMessageFor(pt.genericEstimate,R.openXpdUuid);this.notificationService.showError(v)}if(M===Xe.selectedMaterial){c.push(Xe.selectedMaterial);const R=this.selectedMaterialSource.getValue();R.qaStatus=je.fR.Error,this.selectedMaterialSource.next(R);const v=this.getErrorMessageFor(pt.epd,R.openXpdUuid);this.notificationService.showError(v)}if(M===Xe.alternativeMaterials){c.push(Xe.alternativeMaterials);const R=[];Object.values(i[M]).forEach(H=>{H.forEach($=>{const oe=this.extractId($);oe&&R.push(oe)})});const x=this.alternativeMaterialsSource.getValue();x.forEach(H=>{if(R.includes(H.id)){H.qaStatus=je.fR.Error;const $=this.getErrorMessageFor(pt.epd,H.openXpdUuid);this.notificationService.showError($)}}),this.alternativeMaterialsSource.next(x)}});const _=(0,Rn.c)(i,c);(0,q.I)(_)||this.notificationService.showServerValidationErrors(_)}else this.notificationService.showServerValidationErrors(n.error?.validation_errors);return this.isBoxPlotLoadingSource.next(!1),this.restoreWarningTooltips(this.searchForm.controls.categoryId.value),re.w}),(0,Me.j)(()=>{this.unlockComponent(),this.materialLoadingSignal.set(!1),this.savingInProgressSignal.set(!1)}))}this.showFormErrors()}
1onShowDetails(){this.showDetails.emit()}onLazyLoadMaterials(t){this.materialLoadingSignal.set(!0),this.lastMaterialsSortField=(0,Ne.f)(t.sortField,t.sortOrder);const n=this.prevMaterialsSortField!==t.sortField||this.prevMaterialsSortOrder!==t.sortOrder,i=n?1:t.first/this.rowsCount+1;this.materialsPageFirstSource.next(n?0:t.first);const s={page:i,sortBy:this.lastMaterialsSortField},c=this.getSelectedCategoryIds();this.getMaterialResultsMaterialFilterPrettyString().pipe((0,u.s)(1),(0,C.n)(_=>this.getMaterials({...s,mfPrettyString:_},c)),(0,Me.j)(()=>{this.materialLoadingSignal.set(!1),this.prevMaterialsSortField=t.sortField,this.prevMaterialsSortOrder=t.sortOrder,this.cdRef.markForCheck()})).subscribe()}onLazyLoadIndustryEpds(t){this.industryLoadingSignal.set(!0);const n=t.first/this.rowsCount+1;this.industryEpdsPageFirstSource.next(t.first);const i={page:n};this.getSearchFormOptions().pipe((0,u.s)(1),(0,C.n)(s=>this.getIndustryEpds(i,s)),(0,Me.j)(()=>{this.industryLoadingSignal.set(!1)})).subscribe()}onLazyLoadGenericEstimates(t){this.geLoadingSignal.set(!0);const n=t.first/this.rowsCount+1;this.genericEstimatesPageFirstSource.next(t.first);const i={page:n};this.getSearchFormOptions().pipe((0,u.s)(1),(0,C.n)(s=>this.getGenericEstimates(i,s)),(0,Me.j)(()=>{this.geLoadingSignal.set(!1)})).subscribe()}onChartSettingsUpdate(t){this.referenceAndTargetSettingsSignal.set(t)}submitSearchResults(t){this.hideSelectElementsModal(),this.isCollectionInProgressSignal.set(!0),this.clearFailedSelectedInstances(),this.save().pipe((0,me.E)(this.selectedMaterial$,this.alternativeMaterials$,this.selectedIndustryEpd$,this.selectedGenericEstimate$),(0,m.T)(([n,i,s,c,_])=>({collection:n,selectedMaterial:i,alternativeMaterials:s,selectedIndustryEpd:c,selectedGenericEstimate:_})),(0,u.s)(1),(0,Me.j)(()=>{this.isCollectionInProgressSignal.set(!1)})).subscribe(({collection:n,selectedMaterial:i,alternativeMaterials:s,selectedIndustryEpd:c,selectedGenericEstimate:_})=>{this.onSearchSubmit(n,i,s,c,_,t)})}onSearchSubmit(t,n,i,s,c,_){this.searchSubmit.emit({statistics:new Ie.D0({...t,collectionId:t.id,collectionName:t.name}),selectedIndustryEpd:s,selectedGenericEstimate:c,selectedMaterial:n,alternativeMaterials:i,elementsToUpdateIds:_,excludeEpds:t.excludeEpds,excludeIndustryEpds:t.excludeIndustryEpds,excludeGenericEstimates:t.excludeGenericEstimates,isReused:t.isReused,documentationRequirementType:t.documentationRequirementType,referenceGwpSource:W.S.parseReferenceGwpSource(t.referenceGwpSource),referenceLine:t.referenceLine,target:t.target,customReferenceGwp:t.customReferenceGwp,customTargetGwp:t.customTargetGwp})}onKeyDown(t){"Enter"===t.key&&this.getMaterialResultsMaterialFilterPrettyString().pipe((0,u.s)(1)).subscribe(n=>{this.search({forceUncachedRead:t.ctrlKey||t.metaKey||void 0,mfPrettyString:n})})}onCtrlPressed(t){this.isCtrlPressedSignal.set(t)}onDownloadSearchResults(t){this.getDownloadSearchResultsParams(t).pipe((0,C.n)(n=>this.materialService.getLinkToDownloadSearchResults(n)),(0,C.n)(n=>this.downloadByLinkService.downloadByLink(n))).subscribe()}onDownloadFullSearchResults(t,n,i){this.getDownloadSearchResultsParams(void 0,i,t,n).pipe((0,C.n)(s=>this.materialService.requestToDownloadFullSearchResults(s)),(0,C.n)(s=>this.jobService.updateJob(s.id,{notifyWhenDone:!0})),(0,P.M)(()=>this.notificationService.showInfo({summary:n?$localize`GSA Report`:$localize`Full report`,detail:$localize`We send you email when it is complete with the link to the box file.`}))).subscribe()}onDownloadGSAReport(){this.categoryService.getCategoryById(this.categoryId).pipe((0,u.s)(1)).subscribe(t=>{const n=this.collectionSignal()?.categoryId===t.id&&this.collectionSignal()?.name!==z.W.unmapped&&this.collectionSignal()?.name||t?.name||z.W.unmapped;this.onDownloadFullSearchResults(n,!0,et.g.xlsx)})}togglePlantsMap(){this.showPlantsMapSignal.update(t=>!t)}getDownloadSearchResultsParams(t,n,i,s){return this.getMaterialResultsFilter().pipe((0,me.E)(this.statisticsForUse$),(0,m.T)(([c,_])=>{const M=_?.processedDeclaredUnit?.convertedUnit||this.declaredUnitService.parseDeclaredUnit(_.unit)?.convertedUnit,R=this.selectedElement?.getRawValue().shared.quantityUnit;return{mf:c,comparisonUnit:s&&(0,Z.M)(R,M)?R:M}}),(0,C.n)(({mf:c,comparisonUnit:_})=>(s?this.materialService.translateMaterialFilterToQueryString(c):this.getMaterialResultsMaterialFilterPrettyString()).pipe((0,m.T)(R=>({mfPrettyString:R,comparisonUnit:_})))),(0,m.T)(({mfPrettyString:c,comparisonUnit:_})=>({gsa:s,fileName:i,format:t,sortBy:this.lastMaterialsSortField,fileFormat:n,comparisonUnit:_,mfPrettyString:c})))}compareByStrength(){this.hideCurrentDialog.emit(),this.shouldShowCompareByStrengthModal=!0,this.compareByStrengthData$=this.getMaterialResultsMaterialFilterPrettyString().pipe((0,C.n)(t=>this.materialChartPointsService.getMaterialDataPointsBySpec("concrete_compressive_strength_28d",{mfPrettyString:t})),(0,C.n)(t=>[t.map(i=>{if(i?.specValue){const s=i.specValue.to(vn.D4[this.unitSystem].pressure.defaultUnit);return{...i,specValue:s}}return i})]))}hideCompareByStrengthModal(){this.shouldShowCompareByStrengthModal=!1,this.compareByStrengthData$=null,this.showCurrentDialog.emit()}compareManufacturers(){this.hideCurrentDialog.emit(),this.shouldShowCompareByManufacturerModal=!0,this.mfPrettyString$=this.getMaterialResultsMaterialFilterPrettyString()}hideCompareByManufacturerModal(){this.shouldShowCompareByManufacturerModal=!1,this.showCurrentDialog.emit()}comparePlants(){this.hideCurrentDialog.emit(),this.shouldShowCompareByPlantModal=!0,this.mfPrettyString$=this.getMaterialResultsMaterialFilterPrettyString()}hideCompareByPlantModal(){this.shouldShowCompareByPlantModal=!1,this.showCurrentDialog.emit()}compareCategories(){this.hideCurrentDialog.emit(),this.shouldShowCompareByCategoryModal=!0,this.mfPrettyString$=this.getMaterialResultsMaterialFilterPrettyString()}hideCompareByCategoryModal(){this.shouldShowCompareByCategoryModal=!1,this.showCurrentDialog.emit()}compareProducts(t=[]){this.materialsToCompare=t,this.showCompareByProductChartSignal.set(!0)}hideCompareByProduct(){this.showCompareByProductChartSignal.set(!1),this.materialsToCompare=[]}selectElementsToApplyCollection(t){t?this.submitSearchResults([]):this.shouldShowSelectElementsModal=!0}hideSelectElementsModal(){this.shouldShowSelectElementsModal=!1,this.showCurrentDialog.emit()}markAsSelected(t){if(this.isBroadCategorySignal()){const n=this.selectedIndustryEpdSource.getValue();n&&!this.isMaterialsInSameDimensionality(n,t)&&this.resetSelectedIndustryEpd();const i=this.selectedGenericEstimateSource.getValue();i&&!this.isMaterialsInSameDimensionality(i,t)&&this.resetSelectedGenericEstimate(),this.switchCategoryWithWarning(t.category.id).pipe((0,u.s)(1),(0,C.n)(s=>(this.selectMaterial(t),s?this.switchCategoryToMaterialCategory(t.category):re.w))).subscribe()}else this.selectMaterial(t)}clearFailedSelectedInstances(){const t=this.selectedIndustryEpdSource.getValue(),n=this.selectedGenericEstimateSource.getValue(),i=this.selectedMaterialSource.getValue(),s=this.alternativeMaterialsSource.getValue();this.selectedIndustryEpdSource.next(t?.qaStatus!==je.fR.Error?t:null),this.selectedGenericEstimateSource.next(n?.qaStatus!==je.fR.Error?n:null),this.selectedMaterialSource.next(i?.qaStatus!==je.fR.Error?i:null),this.alternativeMaterialsSource.next(s.filter(c=>c?.qaStatus!==je.fR.Error))}switchCategoryWithWarning(t){return this.categoryId!==t?this.categoryService.getCategoriesHierarchyListById(t,!1).pipe((0,m.T)(n=>n.map(i=>i.displayName).join(" / ")),(0,C.n)(n=>this.confirmationService.showConfirmationDialog({content:$localize`This EPD is in <b><i>${n}</i></b>.<br>Change collection to be in <b>${n}</b>?`,labels:{agree:$localize`Yes`,cancel:$localize`No`},appendTo:"body",width:500}))):(0,E.of)(!1)}switchCategoryToMaterialCategory(t){const n=this.selectedIndustryEpdSource.getValue(),i=this.selectedMaterialSource.getValue(),s=this.alternativeMaterialsSource.getValue();return this.categoryService.getCategoryById(t.id).pipe((0,C.n)(c=>this.emitCategory(c)),(0,m.T)(c=>(this.selectedIndustryEpdSource.next(n?.category.id===c.id?n:null),this.selectedMaterialSource.next(i),this.alternativeMaterialsSource.next(s.filter(_=>_.category.id===c.id)),c)),(0,ze.Q)(j.$),(0,P.M)(()=>this.getMaterialsAndStatistics()))}selectMaterial(t){if(this.selectedMaterialSource.getValue()?.id!==t.id){this.materialsSignal.update(s=>[t,...this.alternativeMaterialsSource.getValue(),...s]);const n=this.selectedMaterialSource.getValue();n&&(this.alternativeMaterialsSource.getValue().length<6?this.alternativeMaterialsSource.next([n,...this.alternativeMaterialsSource.getValue()]):this.notificationService.show({severity:"error",summary:$localize`Error`,detail
1:$localize`You cannot select more than ${6} alternative materials`})),this.selectedMaterialSource.next(t);const i=this.clearUnCompatibleAlternativeMaterials(t);this.alternativeMaterialsSource.next(i.filter(s=>s.id!==t.id)),this.resetSelectedIndustryEpdIfNeeded(t),this.resetSelectedGenericEstimateIfNeeded(t),this.updateMaterialsWithSelectedAndAlternatives()}}markAsAlternative(t){this.bidders?this.switchCategoryWithWarning(t.category.id).pipe((0,u.s)(1),(0,C.n)(n=>(this.selectAlternative(t),n?this.switchCategoryToMaterialCategory(t.category):re.w))).subscribe():this.selectAlternative(t)}selectAlternative(t){if(this.resetSelectedMaterialIfNeeded(t),this.resetSelectedIndustryEpdIfNeeded(t),this.resetSelectedGenericEstimateIfNeeded(t),!this.alternativeMaterialsSource.getValue()?.find(({id:n})=>n===t.id)){const n=this.clearUnCompatibleAlternativeMaterials(t);this.alternativeMaterialsSource.next([...n,t]),this.updateMaterialsWithSelectedAndAlternatives()}}clearUnCompatibleAlternativeMaterials(t){return t?this.alternativeMaterialsSource.getValue().filter(i=>this.isMaterialsInSameDimensionality(i,t)):this.alternativeMaterialsSource.getValue()}unSelectMaterial(){this.resetSelectedMaterial()}markAsUnselected(t){this.resetSelectedMaterialIfNeeded(t),this.alternativeMaterialsSource.next(this.alternativeMaterialsSource.getValue().filter(n=>n.id!==t.id)),this.updateMaterialsWithSelectedAndAlternatives()}resetSelectedMaterialIfNeeded(t){const n=this.selectedMaterialSource.getValue();n&&t&&(n.id===t.id||!this.isMaterialsInSameDimensionality(n,t))&&this.unSelectMaterial(),this.updateMaterialsWithSelectedAndAlternatives()}resetSelectedIndustryEpdIfNeeded(t){const n=this.selectedIndustryEpdSource.getValue();n&&!this.isMaterialsInSameDimensionality(t,n)&&this.resetSelectedIndustryEpd()}resetSelectedGenericEstimateIfNeeded(t){const n=this.selectedGenericEstimateSource.getValue();n&&!this.isMaterialsInSameDimensionality(t,n)&&this.resetSelectedGenericEstimate()}isMaterialsInSameDimensionality(t,n){return t&&n&&(0,Z.M)(t.declaredUnit,n.declaredUnit)}updateMaterialsWithSelectedAndAlternatives(){const t=this.getSelectedAndAlternativeMaterials(),n=t.map(s=>s.id),i=(0,q.I)(this.materialsSignal())?[]:this.materialsSignal().filter(({id:s})=>!n.includes(s));this.materialsSignal.set([...t,...i])}getSelectedAndAlternativeMaterials(){const t=this.alternativeMaterialsSource.getValue().sort((n,i)=>{const s=n.bidderIndexes?.length||0;return(i.bidderIndexes?.length||0)-s});return[this.selectedMaterialSource.getValue(),...t].filter(Boolean)}onChangeFilteringParams(t){this.materialResultsFilteringParams=t,this.cachedMaterialResultsFilterPrettyStringSignal.set(null),this.materialLoadingSignal.set(!0),this.materialsPageFirstSource.next(0);const n={sortBy:(0,Ne.f)(t.sortFiled,t.sortOrder)},i=this.getSelectedCategoryIds();this.getMaterialResultsMaterialFilterPrettyString().pipe((0,u.s)(1),(0,C.n)(s=>this.getMaterials({...n,mfPrettyString:s},i)),(0,Me.j)(()=>{this.materialLoadingSignal.set(!1)})).subscribe()}resetSelectedMaterial(){this.selectedMaterialSource.next(null)}resetSelectedIndustryEpd(){this.selectedIndustryEpdSource.next(null)}resetSelectedGenericEstimate(){this.selectedGenericEstimateSource.next(null)}removeTerm(t){if(t.name===de.$T.jurisdiction.name)this.searchForm.controls.jurisdiction.setValue([]);else if(t.name===de.$T.forestPracticesCertifiers.name)this.searchForm.controls.forestPracticesCertifiers.setValue([]);else if(t.isThreeStateDropdownList){const n=this.searchForm.get(t.name),i=n.value.filter(s=>!t.value.includes(s));n.setValue(i)}else if(t.isFieldSet)this.searchForm.get([t.parentName,t.name]).setValue(null);else if(t.isExposureClass){const n=this.searchForm.get(t.name),i=n.value[0].split(", ")[0].split(".")[0],s=t.value.split(", ").map(_=>`${i}.${_}`).join(", "),c=n.value.filter(_=>_!==s);n.setValue(c)}else{const n=this.searchForm.get(t.name);if(n instanceof y.Yp)n.setValue([]);else if(n.value instanceof Array){const i=n.value.filter(s=>!t.value.includes(s));n.setValue(i.length?i:null)}else n.setValue(null)}this.cdRef.detectChanges()}getSearchTerms(){const t=[];for(const i of Object.keys(this.searchForm.controls)){const s=this.categoryFormFields?.[i];if(s){const c=this.searchForm.controls[i].value,_=(0,de.mf)(s),M=this.getSearchType(i);if(s.isThreeStateDropdownList&&c){if(!this.searchTermShouldBeIgnored(s,c,i)){const R=c.filter(x=>x.state),v=c.filter(x=>!x.state);R.length&&t.push({name:i,value:R,readableName:_,isThreeStateDropdownList:!0,tooltip:s.chipTooltip,required:s.required}),v.length&&t.push({name:i,value:v,readableName:_,isThreeStateDropdownList:!0,tooltip:s.chipTooltip,required:s.required})}}
1else if(s.isFieldSet&&c){const R=s.name;Object.values(s.fieldSet).forEach(v=>{const x=v.name[1],H=c[x],$=this.getSearchType(v.name),oe=this.searchTermsService.parseTermValueToChipsValue(x,H);!this.searchTermShouldBeIgnored(v,H,x)&&null!==oe&&t.push({name:x,value:oe,readableName:(0,de.mf)(v),searchTypeIcon:this.searchTypeHelper.getSearchTypeIcon($),parentName:R,isFieldSet:!0,tooltip:s.chipTooltip,required:s.required})})}else if(s.isExposureClasses&&c)this.searchTermsService.parseTermValueToChipsValue(i,c).forEach(v=>{t.push({name:i,value:v,readableName:_,isExposureClass:!0,tooltip:s.chipTooltip,required:s.required})});else{const R=this.searchTermsService.parseTermValueToChipsValue(i,c),v=this.parseTermValueByGroup(s,c);!this.searchTermShouldBeIgnored(s,c,i)&&null!==R&&(v?Object.keys(v).forEach(x=>{t.push({name:i,value:v[x],readableName:_,searchTypeIcon:this.searchTypeHelper.getSearchTypeIcon(M),tooltip:s.chipTooltip,required:s.required})}):t.push({name:i,value:R,state:s.isThreeStateOptions?c:null,readableName:_,searchTypeIcon:this.searchTypeHelper.getSearchTypeIcon(M),tooltip:s.chipTooltip,required:s.required}))}}}const n=this.getUnknownSearchTerms();return(0,E.of)([...t,...n])}parseTermValueByGroup(t,n){return n&&t?.options&&t.options.some(i=>i.groupName)?t.options.filter(s=>n.includes(s.value)).reduce((s,c)=>(s[c.groupName]?s[c.groupName].push(c.label):s[c.groupName]=[c.label],s),{}):null}getUnknownSearchTerms(){const t=[],n=this.materialSearchFormService.getUnknownMfPredicateArgs();return this.categoryFormFields&&Object.values(this.categoryFormFields).forEach(s=>{const c=(0,de.iZ)(s),_=(0,de.mf)(s);if(s.isThreeStateDropdownList){const M=n.filter(R=>R.field===c);if(!(0,q.I)(M)){const R=[];M.forEach(v=>{const x=v.argComment.filter(Boolean),H=(0,q.I)(x)?v.arg:x;R.push(...H.map($=>({label:$,value:$,state:v.op===Ze.D9.in})))}),t.push({isUnknown:!0,name:s.name,value:R,readableName:_,isThreeStateDropdownList:!0})}}else{const M=n.find(R=>R.field===c);if(M){const R=this.parseUnknownArgs(M);t.push({isUnknown:!0,name:s.name,value:R,readableName:_})}}}),this.materialSearchFormService.getUnknownMfPredicates().forEac
1h(s=>{const c=En.U.toCamelCase(s.field),_=this.searchTypeHelper.getSearchTypeIcon(s.op),M=this.parseUnknownArgs(s);t.push({isUnknown:!0,name:c,readableName:c,searchTypeIcon:_,value:M,state:(0,b.Lm)(M)?M:null})}),t}parseUnknownArgs(t){const n=(0,b.cy)(t.argComment)?t.argComment.filter(Boolean):t.argComment;if((0,q.I)(n)){const i=t.arg;return(0,b.cy)(i)?i.join(", "):i}return(0,b.cy)(n)?n.join(", "):n}shouldBeIgnored(t){return["category","collectionName","collectionId","Options","curingTime","target"].some(i=>t.includes(i))}createCollection(t){return t.opened=!0,this.collectionService.createCollection(t,!1)}getSearchFormOptions(){return this.cachedMaterialFilterSignal()?(0,E.of)(this.cachedMaterialFilterSignal()).pipe((0,P.M)(t=>this.plantMaterialFilterSignal.set(t))):this.category.pipe((0,u.s)(1),(0,me.E)(this.sessionService.unitSystemName$),(0,m.T)(([t,n])=>(this.cachedMaterialFilterSignal.set(this.processSearchParamsToMaterialFilter(this.searchForm.value,this.formSearchTypes,t,n)),this.plantMaterialFilterSignal.set(this.cachedMaterialFilterSignal()),this.cachedMaterialFilterSignal())))}getMaterialResultsFilter(){return this.getSearchFormOptions().pipe((0,u.s)(1),(0,C.n)(t=>this.filterMaterialFilterSoftSearchParams(t)),(0,C.n)(t=>this.category.pipe((0,m.T)(n=>({category:n,mf:t})))),(0,me.E)(this.sessionService.unitSystemName$),(0,m.T)(([{category:t,mf:n},i])=>{if(this.materialResultsFilteringParams){const s=this.materialSearchFormService.prepareMaterialFilterPredicatesFromSearchForm(this.materialResultsFilteringParams.formValue,this.materialResultsFilteringParams.searchTypes);this.correctGwpValue(s,t.declaredUnit,i);const c=n.toJSON(),_=[...c.filter];return c.filter=this.materialFilterService.mergeMaterialFilterPredicates(_,s),new It.QA(c)}return n}))}correctGwpValue(t,n,i){const s=t.find(_=>_.field===(0,de.iZ)(de.$T.gwp));s&&(s.arg=this.gwpToCategoryDeclaredUnitInUnitSystemName(s.arg,n,i));const c=t.find(_=>_.field===(0,de.iZ)(de.$T.reportedGwp));c&&(c.arg=this.gwpToCategoryDeclaredUnitInUnitSystemName(c.arg,n,i))}getMaterialResultsMaterialFilterPrettyString(){return this.cachedMaterialResultsFilterPrettyStringSignal()?(0,E.of)(this.cachedMaterialResultsFilterPrettyStringSignal()):this.getMaterialResultsFilter().pipe((0,u.s)(1),(0,C.n)(t=>this.materialService.translateMaterialFilterToQueryString(t)),(0,m.T)(t=>(this.cachedMaterialResultsFilterPrettyStringSignal.set(t),t)))}processSearchParamsToMaterialFilter(t,n,i,s){const c=this.materialSearchFormService.prepareMaterialFilterPredicatesFromSearchForm(t,n);if(this.correctGwpValue(c,i.declaredUnit,s),c.find(R=>R.field===de.$T.plantDistance.specificApiField)&&!(0,q.I)(this.coordinates.latitude)&&!(0,q.I)(this.coordinates.longitude)){const R=this.project.getJurisdiction(),v=Ct.d.getAddressSpecificPredicates(R,this.coordinates);c.push(...v)}return this.materialFilterService.getMaterialFilter(i.name,c,this.searchForm.controls.lciaMethod.value)}gwpToCategoryDeclaredUnitInUnitSystemName(t,n,i){const s=this.getCategoryDeclaredUnitRatioInUnitSystem(n,i);return t.multiply(s)}gwpPerCategoryDeclaredUnitInUnitSystemName(t,n,i){const s=this.getCategoryDeclaredUnitRatioInUnitSystem(n,i);return t.divide(s)}getCategoryDeclaredUnitRatioInUnitSystem(t,n){return this.unitService.toUnitSystem(t,n).getNumericValue()}filterMaterialFilterSoftSearchParams(t){return this.cachedMaterialFilterWithoutSoftSearchTermsSignal()?(0,E.of)(this.cachedMaterialFilterWithoutSoftSearchTermsSignal()):this.statistics$.pipe((0,u.s)(1),(0,m.T)(n=>{if((0,q.I)(n?.excludedSearchTerms))this.cachedMaterialFilterWithoutSoftSearchTermsSignal.set(t);else{const i=n.getExcludedSearchTermsWithoutPostFixes();this.cachedMaterialFilterWithoutSoftSearchTermsSignal.set(this.searchTermsService.filterMaterialFilterSoftSearchParams(t,i))}return this.cachedMaterialFilterWithoutSoftSearchTermsSignal()}))}getMaterialsAndStatistics(t={}){this.lockComponent(),this.isSearchInProgressSignal.set(!0),this.isBoxPlotLoadingSource.next(!0),(t.mfPrettyString?this.materialService.translateMaterialQueryStringToMaterialFilter(t.mfPrettyString):this.getSearchFormOptions()).pipe((0,u.s)(1),(0,C.n)(i=>this.materialService.translateMaterialFilterToQueryString(i).pipe((0,m.T)(s=>(this.cachedStatisticsMaterialFilterPrettyStringSignal.set(s),this.plantMapMaterialSearchPrettyStringSignal.set(s),{mf:i,mfPrettyString:s})))),(0,C.n)(({mf:i,mfPrettyString:s})=>this.getStatistics({...t,fetchMaterials:this.isNeedToGetMaterialsSignal()||void 0,mfPrettyString:s}).pipe((0,m.T)(c=>({statistics:c,additionalParams:t,mf:i})))),(0,P.M)(()=>{this.materialLoadingSignal.set(!1),this.showResultsSignal.set(!0),this.materialsPageFirstSource.next(0)}),(0,ze.Q)(ne.E),(0,C.n)(({statistics:i,additionalParams:s,mf:c})=>i?.industryEpdsCount&&this.isNeedToGetIndustryEpdsSignal()?this.getIndustryEpds(s,c).pipe((0,P.M)(()=>this.industryEpdsPageFirstSource.next(0)),(0,m.T)(()=>({statistics:i,additionalParams:s,mf:c}))):(0,E.of)({statistics:i,additionalParams:s,mf:c})),(0,C.n)(({statistics:i,additionalParams:s,mf:c})=>this.isShowGenericEstimates&&i?.genericEstimatesCount&&this.isNeedToGetGenericEstimatesSignal()?this.getGenericEstimates(s,c).pipe((0,P.M)(()=>this.genericEstimatesPageFirstSource.next(0)),(0,m.T)(_=>({statistics:_,additionalParams:s,mf:c}))):(0,E.of)({statistics:i,additionalParams:s,mf:c})),(0,At.W)(i=>(this.logger.error(i),this.notificationService.showInvalidDataError(),(0,we.$)(i))),(0,Me.j)(()=>{this.project||this.breadcrumbService.appendToCurrentBreadcrumbs(this.searchResultsBreadcrumbs),this.selectTour(),this.unlockComponent(),this.isSearchInProgressSignal.set(!1),this.didSearch=!0})).subscribe()}getStatistics(t){const i={...t,...this.getExcludeEpdTypes()};return this.statisticsService.getStatistics(this.categoryId,i).pipe((0,C.n)(s=>
1s?.materials?.length?this.materialService.markIsAlsoShownInMatched([this.categoryId],s.materials).pipe((0,m.T)(c=>(s.materials=c,s))):(0,E.of)(s)),(0,P.M)(s=>{this.statisticsSource.next(s),this.totalMaterialsRecords=s?.samples??0,this.materialsSignal.set(s?.materials?[...s.materials]:[]),(0,q.I)(s?.materials)||this.updateMaterialsWithSelectedAndAlternatives()}))}getMaterials(t,n){return this.materialService.getMaterials(t,n).pipe((0,u.s)(1),(0,P.M)(i=>{const s=this.getSelectedAndAlternativeMaterials();this.totalMaterialsRecords=i.totalCount;const c=[...s,...i.items.filter(_=>!s.find(M=>M.id===_.id))];this.materialsSignal.set(c)}),(0,P.M)(i=>{this.revitBridgeService.isRevitPluginDetected()&&this.revitBridgeService.broadcastData(i.items,ut.Hc.materialSearchResults)}))}getIndustryEpds(t,n){return(this.cachedIndustryMaterialFilterPrettyStringSignal()?(0,E.of)(this.cachedIndustryMaterialFilterPrettyStringSignal()):this.statistics$.pipe((0,u.s)(1),(0,C.n)(s=>(0,q.I)(s?.excludedSearchTerms)?(this.cachedMaterialFilterWithoutSoftSearchTermsSignal.set(this.cachedMaterialFilterSignal()),this.cachedIndustryMaterialFilterPrettyStringSignal.set(this.cachedStatisticsMaterialFilterPrettyStringSignal()),(0,E.of)(this.cachedIndustryMaterialFilterPrettyStringSignal())):this.filterMaterialFilterSoftSearchParams(n).pipe((0,C.n)(c=>this.materialService.translateMaterialFilterToQueryString(c).pipe((0,m.T)(_=>(this.cachedIndustryMaterialFilterPrettyStringSignal.set(_),_)))))))).pipe((0,u.s)(1),(0,C.n)(s=>this.industryEpdService.getIndustryEpds({page:t.page||1,mfPrettyString:s,forceUncachedRead:t.forceUncachedRead})),(0,P.M)(s=>{this.totalIndustryEpdsRecords=s.totalCount,this.industryEpdsSource.next(s.items)}))}getGenericEstimates(t,n){return(this.cachedGenericEstimatesMaterialFilterPrettyStringSignal()?(0,E.of)(this.cachedGenericEstimatesMaterialFilterPrettyStringSignal()):this.statistics$.pipe((0,u.s)(1),(0,C.n)(s=>(0,q.I)(s?.excludedSearchTerms)?(this.cachedMaterialFilterWithoutSoftSearchTermsSignal.set(this.cachedMaterialFilterSignal()),this.cachedGenericEstimatesMaterialFilterPrettyStringSignal.set(this.cachedStatisticsMaterialFilterPrettyStringSignal()),(0,E.of)(this.cachedGenericEstimatesMaterialFilterPrettyStringSignal())):this.filterMaterialFilterSoftSearchParams(n).pipe((0,C.n)(c=>this.materialService.translateMaterialFilterToQueryString(c).pipe((0,m.T)(_=>(this.cachedGenericEstimatesMaterialFilterPrettyStringSignal.set(_),_)))))))).pipe((0,u.s)(1),(0,C.n)(s=>this.genericEstimatesService.getGenericEstimates({page:t.page||1,mfPrettyString:s,forceUncachedRead:t.forceUncachedRead})),(0,P.M)(s=>{this.totalGenericEstimatesRecords=s.totalCount,this.genericEstimatesSource.next(s.items)}))}resetSearchResults(){this.unMarkSoftSearchTerms(),this.resetData(),this.didSearch=!1}unMarkSoftSearchTerms(){const t=this.searchTermsSource.getValue(),n=this.searchTermsService.unMarkSoftSearchTerms(t);this.searchTermsSource.next(n)}resetData(){this.totalMaterialsRecords=0,this.materialsSignal.set([]),this.totalIndustryEpdsRecords=0,this.industryEpdsSource.next([]),this.declaredUnit=null,this.statisticsSource.next(null),this.resetSelectedIndustryEpd(),this.resetSelectedGenericEstimate(),this.resetSelectedMaterial(),this.alternativeMaterialsSource.next([]),this.materialResultsFilteringParams=null,this.totalGenericEstimatesRecords=0,this.hideSearchResults()}resetCachedMaterialFilter(){this.cachedMaterialFilterSignal.set(null),this.cachedMaterialFilterWithoutSoftSearchTermsSignal.set(null),this.cachedStatisticsMaterialFilterPrettyStringSignal.set(null),this.cachedIndustryMaterialFilterPrettyStringSignal.set(null),this.cachedGenericEstimatesMaterialFilterPrettyStringSignal.set(null),this.cachedMaterialResultsFilterPrettyStringSignal.set(null)}searchTermShouldBeIgnored(t,n,i){return t?.ignoreSearchTermChips||(0,q.I)(n)&&!(0,b.Lm)(n)||this.shouldBeIgnored(i)}setFormState(t){t.searchTypes&&this.materialSearchFormService.updateSearchTypes(t.searchTypes),this.materialSearchFormService.setFormState(t),this.cdRef.markForCheck()}getDefaultEpdDateValidityEnds(t){return t?t instanceof Date?t:new Date(t):this.project?.constructionStartDate?this.project.constructionStartDate:new Date}getDefaultSearchFormEpdTypes(t,n=!1){let i=[];return t?.id?(t.excludeEpds||i.push(fe.VD.productEpds),t.excludeIndustryEpds||i.push(fe.VD.industryEpds),t.excludeGenericEstimates||i.push(fe.VD.genericEstimates)
1):i=this.sessionService.getSecurityPrincipal().getDefaultEpdTypes(),this.configurationService.isTVDEnabledInCategoryAndConfiguration(n)&&i.push(fe.VD.trustedVendorDeclarations),i}getDefaultSearchFormLciaMethod(){return this.userService.getUserLciaMethod()}applyDefaultSearchFormValues(){const t=(0,On.Q)(this.categoryHierarchyIds);(0,q.I)(t)||this.searchForm.patchValue(t)}clearCategoryWarnings(){this.showProcessedGlassWarning=!1,this.showIGUWarning=!1}checkCategoryWarnings(t){switch(t.id){case K.BM.processedNonInsulatingGlassPanes:{const{thickness:n}=this.searchForm.value,s=this.isFormFieldsAreEmpty([ue.V0.acidEtched.name,ue.V0.electrochromic.name,ue.V0.fireResistant.name,ue.V0.fireProtection.name,ue.V0.laminated.name,ue.V0.lowEmissivity.name,ue.V0.pyrolyticCoated.name,ue.V0.sputterCoat.name,ue.V0.tempered.name,ue.V0.toughened.name]);return void(this.showProcessedGlassWarning=(0,q.I)(n)||s)}case K.BM.insulatingGlazingUnits:{const{thickness:n,glassPanes:i}=this.searchForm.value,c=this.isFormFieldsAreEmpty([ue.V0.acidEtched.name,ue.V0.electrochromic.name,ue.V0.fireResistant.name,ue.V0.laminated.name,ue.V0.lowEmissivity.name,ue.V0.pyrolyticCoated.name,ue.V0.sputterCoat.name,ue.V0.tempered.name,ue.V0.toughened.name,ue.V0.hurricaneResistant.name]);return void(this.showIGUWarning=(0,q.I)(n)||(0,q.I)(i)||c)}default:return}}isFormFieldsAreEmpty(t){return t.every(n=>(0,q.I)(this.searchForm.value[n]))}setCategoryHierarchyIds(t){this.categoryHierarchyIds=this.categoryService.getCategoriesHierarchyListByIdSync(t).map(n=>n.id)}getCorrectedIndustryEpd(t){return this.correctUnit(t)}getCorrectedGenericEstimate(t){return this.correctUnit(t)}correctUnit(t){return t&&this.categoryHierarchyIds.includes(K.BM.insulation)&&!t.unit.getUnitName().includes("RSI")&&(t.unit=t.unit.multiply((0,le.Dq)("RSI"))),t}getCorrectedMaterial(t){return t&&this.categoryHierarchyIds.includes(K.BM.insulation)&&!t.declaredUnit.getUnitName().includes("RSI")&&(t.declaredUnit=t.declaredUnit.multiply((0,le.Dq)("RSI"))),t}getExcludeEpdTypes(){const{epdTypes:t}=this.searchForm.value;return{excludeEpds:!t.includes(fe.VD.productEpds),excludeIndustryEpds:!t.includes(fe.VD.industryEpds),excludeGenericEstimates:!t.includes(fe.VD.genericEstimates)}}showShortServiceLifeDisclaimerIfNeeded(t){this.showShortServiceLifeDisclaimer=!1,this.showShortServiceLifeDisclaimerForMembraneRoofing=!1,t.shortServiceLifeDisclaimer&&this.categoryService.getCategoriesHierarchyListById(t.id).pipe((0,u.s)(1),(0,m.T)(n=>n.map(i=>i.id)),(0,P.M)(n=>{this.showShortServiceLifeDisclaimer=!n.includes(K.BM.membraneRoofing),this.showShortServiceLifeDisclaimerForMembraneRoofing=n.includes(K.BM.membraneRoofing)})).subscribe()}subscribeToUsersnap(){const t=new f.B,n=new f.B;(0,Ke.Y)(10,j.$).pipe((0,m.T)(()=>window.Usersnap),(0,ge.p)(i=>!!i),(0,P.M)(i=>n.next(i)),(0,P.M)(()=>t.next()),(0,h.Q)(t)).subscribe(),n.pipe((0,C.n)(i=>(0,S.R)(i,"open").pipe((0,h.Q)(this.destroy$))),(0,ge.p)(()=>1===this.selectedStepIndex),(0,C.n)(i=>this.getShareableLink().pipe((0,m.T)(s=>({event:i,link:s})))),(0,P.M)(({event:i,link:s})=>{const c={...St.I,link:s};i.api.setValue("custom",c)}),(0,h.Q)(this.destroy$)).subscribe()}changeReusedMaterial({checked:t}){this.isReusedMaterialSignal.set(t),this.toggleSelectedMaterials({isReset:t})}toggleSelectedMaterials(t){if(t.isReset){const n=this.selectedMaterialSource.getValue();n&&(this.prevSelectedMaterial=n),this.resetSelectedMaterial()}else{const n=this.alternativeMaterialsSource.getValue();this.alternativeMaterialsSource.next(n.filter(i=>i.id!==this.prevSelectedMaterial?.id)),this.selectedMaterialSource.next(this.prevSelectedMaterial),this.prevSelectedMaterial=null}this.updateMaterialsWithSelectedAndAlternatives()}getSelectedCategoryIds(){const t=[this.categoryId],n=this.materialResultsFilteringParams?.formValue.subcategory;return(0,q.I)(n)||n.forEach(i=>t.push(i.id)),t}showFormErrors(){yt.s.markAllDirty(this.searchForm),this.materialSearchFormService.formIsInvalid(),this.notificationService.showError({detail:$localize`Search terms are invalid.`}),this.cdRef.markForCheck()}getAverageDensity(t){const{densityMin:n,densityMax:i}=t;return n&&i?n.add(i).divide(2):n&&!i?n:i&&!n?i:null}extractId(t){const[n]=(0,An.s)(t,Pn.sf);return n}getErrorMessageFor(t,n){return{summary:$localize`Invalid ${t}`,detail:$localize`The selected ${t} (${n}) is no longer valid, due to failing EC3 quality checks. This EPD will be deselected when you update the collection. To fix this issue, please report the problem to the EPD program operator.`}}getCategoryWarningTemplate(t){const n=this.categoryService.getActualSubcategoriesList(t);return(0,q.I)(n)?this.subCategoryWarningTemplate:this.categoryWarningTemplate}openSettings(){this.boxPlotWrapperComponent.showBoxPlotSettingsModal()}static{this.\u0275fac=function(n){return new(n||a)(e.rXU(e.gRc),e.rXU(Fn.J),e.rXU(B.I),e.rXU(Gn.o),e.rXU(tt.V),e.rXU(G.M),e.rXU(Rt.Z),e.rXU(X.r),e.rXU(vt.b),e.rXU(V.Y),e.rXU(Q.V),e.rXU(Y.E),e.rXU(wt.J),e.rXU(Ot.my),e.rXU(J),e.rXU(ce.i),e.rXU(Ln.t),e.rXU(mt.B),e.rXU(Nn.L),e.rXU(ut.Fq),e.rXU(r.nX),e.rXU(Bn),e.rXU(We.N),e.rXU(ft.h),e.rXU(Mn.L),e.rXU(bn.D),e.rXU(Ct.d),e.rXU(yn.J),e.rXU(Tt.s),e.rXU($n.il),e.rXU(In.r),e.rXU(Wt.K),e.rXU(e.zZn))}}static{this.\u0275cmp=e.VBU({type:a,selectors:[["cqd-material-search-form"]],viewQuery:function(n,i){if
1(1&n&&(e.GBs(Ee.M6,5),e.GBs(Bs,5),e.GBs($s,5)),2&n){let s;e.mGM(s=e.lsd())&&(i.stepper=s.first),e.mGM(s=e.lsd())&&(i.pulseButton=s.first),e.mGM(s=e.lsd())&&(i.boxPlotWrapperComponent=s.first)}},inputs:{appendTo:"appendTo",project:"project",bidIndex:"bidIndex",bidders:"bidders",selectMaterialEnabled:"selectMaterialEnabled",coordinates:"coordinates",collection:"collection",gwpTargetSettings:"gwpTargetSettings",rootLabelsArray:"rootLabelsArray",allowBroadCategorySelection:"allowBroadCategorySelection",withGenericCategories:"withGenericCategories",supportReusedMaterials:"supportReusedMaterials",selectedElement:"selectedElement",showCategoryStep:"showCategoryStep"},outputs:{searchSubmit:"searchSubmit",showDetails:"showDetails",showCurrentDialog:"showCurrentDialog",hideCurrentDialog:"hideCurrentDialog",setBuilder:"setBuilder"},features:[e.Vt3,e.OA$],decls:10,vars:9,consts:()=>{let t,n,i,s,c,_,M,R,v,x,H,$,oe,Ce,ae,Oe,O,Pe,qe;return t=$localize`:â4d2a4634120265ec2b9c073e7b936b608400f2f3â5216939962003020788:SELECT CATEGORY`,n=$localize`:â607de17c2a755f65775881c19e276e7c933bcf94â1806667489382256324:Category`,i=$localize`:material-search-form|âaa2cb8a13cfa02852a687babcece774793c5ca15â3469328460121465849: Done `,s=$localize`:â901c622d5ae3ff3466756cbea63af34d724b101eâ1173595123853425035:Performance Specs`,c=$localize`:â5539a4b2a300170a94312e7b023c86c675c83f50â7185152669248385710:Share search form`,_=$localize`:âed569c55ccab0dc6c9a733199005f9a06aa2f717â6987745483201754686:Share Link`,M=$localize`:â7e892ba15f2c6c17e83510e273b3e10fc32ea016â4580988005648117665:Search`,R=$localize`:âe72c7a20c580e3d4739640d4ea6660262cd13b0eâ8033166763028978560:Search by properties: ${"\ufffd#9\ufffd"}:START_TAG_SPAN:${"\ufffd0\ufffd"}:INTERPOLATION:${"\ufffd/#9\ufffd"}:CLOSE_TAG_SPAN:`,v=$localize`:â15e153710e467452e65b432c109870021f3e7b4fâ1420452623158655533: kgCO2e embodied per ${"\ufffd0\ufffd"}:INTERPOLATION: `,x=$localize`:â677d14da96a16f33bef8823289eb8405ac2dd95aâ487973151368497383: This category is being deprecated`,H=$localize`:â11a6d787e781445a03093f8107aa02ac44b85931â3312765651223972108:Elements marked as reused will have their Realized A1-A3 GWP value set to 0 kgCO2e/unit to reflect the avoided burden of producing a new material or product.`,$=$localize`:â15e153710e467452e65b432c109870021f3e7b4fâ1420452623158655533: kgCO2e embodied per ${"\ufffd0\ufffd"}:INTERPOLATION: `,oe=$localize`:â9bfc2d04ee5b2be62e7bd07dd304266f42a81683â3980119100224256924: Settings `,Ce=$localize`:âafd8b664ab3bf4c73ed5dc105677b62856941a36â8164421107241524173: Show Alternates `,ae=$localize`:âf1ff6e0a36351430ac3520aca87b5de5e9fc23c2â4308490744018311204: EC3 reports ${"\ufffd#2\ufffd"}:START_TAG_SPAN:A1-A3${"\ufffd/#2\ufffd"}:CLOSE_TAG_SPAN: (i.e. cradle to gate) impacts for a single purchase of this product; it does not include future replacements of the product. To estimate building lifetime impact, you will need to estimate a replacement interval for your project. `,Oe=$localize`:â33a0204c4cded50fab5162c2ae3f6acb045722c5â2599944344284682568: EC3 reports ${"\ufffd#2\ufffd"}:START_TAG_SPAN:A1-A3${"\ufffd/#2\ufffd"}:CLOSE_TAG_SPAN: (i.e., cradle to gate, product manufacturing) impacts. Informed specification and procurement decisions should also consider the application and other attributes such as performance, durability, and reference service life. `,O=$localize`:âd0688b83b41d934007d3245f2ae2a08113189086â3895349060639512864:${"\ufffd#2\ufffd"}:START_BOLD_TEXT:Warning:${"\ufffd/#2\ufffd"}:CLOSE_BOLD_TEXT: You have not specified the type of processed glass and/or its thickness in your search. EPD results from this search may not be comparable. `,Pe=$localize`:âb12902f2c1a0a4a5546cbdcad4459814dc7ea072â1502536929565849747:${"\ufffd#2\ufffd"}:START_BOLD_TEXT:Warning:${"\ufffd/#2\ufffd"}:CLOSE_BOLD_TEXT: You have not specified the number of panes and/or processing type and/or thickness in your search. EPD results from this search may not be comparable. `,qe=$localize`:â7e892ba15f2c6c17e83510e273b3e10fc32ea016â4580988005648117665:Search`,[["searchFormTemplate",""],["stepper",""],["pulse",""],["compareByProductChart",""],["loading",""],["wrapper",""],["boxPlotWrapper",""],t,n,i,s,R,v,x,$,oe,Ce,ae,Oe,O,Pe,qe,[3,"tour","startTour",4,"ngIf"],[4,"ngIf","ngIfElse"],[3,"header","visible","appendTo","hide",4,"ngIf"],[3,"appendTo","visible","searchStatistics","mfPrettyString","searchTerms","referenceAndTargetSettings","hide",4,"ngIf"],[3,"appendTo","data","visible","hide",4,"ngIf"],[3,"visible","appendTo","options","hide","completeEvent",4,"ngIf"],[3,"startTour","tour"],["linear","",3,"selectionChange","selectedIndex"],[3,"completed"],["matStepLabel",""],[4,"ngIf"],[1,"category-select","float-none",3,"categorySelect","builderSelect","categoryItemsUpdate","categoryId","preventToSelectCategories","withGenericCategories","withBuilders","hideAllCategories"],["class","button button--small button--light-blue","type","button",3,"disabled","marginRight","click",4,"ngIf"],["btnClass","button--red","tooltipPosition","top",3,"clickEvent","label","pTooltip","tooltipDisabled","disabled"],[3,"state"],["matStepperIcon","search"],["matStepperIcon","searching"],["type","button",1,"button","button--small","button--light-blue",3,"click","disabled"],[3,"keydown",4,"ngIf"],[1,"results-wrapper"],[3,"mfPrettyString","searchFormValue","element","appendTo","withBuilding","hasAddress","selectMaterialEnabled","onlyAlternativeMaterialsCanSelect","statistics","declaredUnit","switchGwpColumn","columnsToShow","category","loading","materials","totalRecords","rows","baselineGwp","target","selectedMaterial","alternativeMaterials","bidIndex","bidders","showResults","pageFirst","showCompareCheckboxes","showPlantsMap","showCurrentDialog","hideCurrentDialog","comparePlants","compareManufacturers","compareCategories","compareByStrength","compareProducts","hideCompareByProduct","lazyLoad","showDetail
1s","materialsToCompareChanged","markAsSelected","markAsUnselected","markAsAlternative","unSelectMaterial","filteringParams","downloadSearchResults","downloadFullSearchResults","downloadGSAReport",4,"ngIf"],["class","bottom-use-collection-container",4,"ngIf"],[3,"keydown"],[1,"category-breadcrumb",3,"click"],["id","ms-p1-s3",3,"model"],[3,"formGroup"],[1,"main-search-panel"],[1,"main-header"],[1,"align-center-container"],[1,"masterformat"],["class","warning-label",4,"ngIf"],["class","form-actions-container",4,"ngIf"],[1,"panel-body"],[1,"p-g",3,"ngClass"],[1,"p-lg-9","p-md-7","p-pr-10",3,"ngClass"],[3,"searchTypeChange","hideParentDialog","showParentDialog","resetSearchForm","introShown","formFields","declaredUnit","searchTypes","isSearchInProgress"],[3,"changePlantsMapVisibility","introShown","formFields","jurisdictionForm","distanceControl","withBuilding","isSearchInProgress","hasAddress","noResultsFound","disableMapButton"],[3,"searchTypeChange","hideParentDialog","showParentDialog","introShown","formFields","searchTypes","category","isSearchInProgress"],["class","compare-by-wrapper p-lg-12",4,"ngIf"],["id","ms-p2-s1",1,"p-lg-3","p-md-5","p-pr-2","diagram-wrapper",2,"position","relative",3,"ngClass"],[1,"gwp-per-unit"],["class","boxplot-panel-body",4,"ngIf"],["class","p-g-12 disclaimer",4,"ngIf"],["class","p-g-12 warning",4,"ngIf"],[3,"baseProject","baseProjectAddress","distance","plantMaterialFilter","materialSearchPrettyString","selectedMaterial","statistics","hideMap",4,"ngIf"],[1,"p-g"],[1,"p-g-nopad","search-terms-wrapper","p-g-9"],[1,"p-g-nopad"],[3,"termRemove","searchTerms","clearable"],[1,"p-g-nopad","search-btn-block","p-g-3"],[1,"shareable-link"],["tooltip",c,"label",_,3,"buttonStyleClass","getLink$"],[1,"search-btn-wrapper"],["tooltipPosition","top",3,"pTooltip"],["pButton","","label",M,1,"button","button-search","button--light-blue","button-right",3,"click","cqdCtrlPressed","pTooltip","tooltipPosition","ngClass","disabled"],["class","fa fa-exclamation-triangle warning-icon",4,"ngIf"],[1,"search-icon-wrapper"],["alt","",3,"src"],["class","loading",3,"ngClass",4,"ngIf"],[1,"warning-label"],[1,"form-actions-container"],[3,"submitEvent","disabled","tooltip","elementsWithSameCollectionCount","currentCollectionId","isInProgress"],["pTooltip",H,"tooltipPosition","top",1,"reused-materials"],["color","primary",3,"change","checked"],[1,"compare-by-wrapper","p-lg-12"],[1,"compare-by-container","multiple-box-plot-panel-body"],[3,"back","materials","searchStatistics","selectedMaterial","selectedIndustryEpd","selectedGenericEstimate","referenceAndTargetSettings","alternativeMaterials"],[1,"boxplot-panel-body"],["class","charts-container",4,"ngIf","ngIfElse"],[1,"charts-container"],[3,"project","selectedElement","category","statistics","selectedIndustryEpd","selectedGenericEstimate","materialGwpData","target","isSearchForm","toUnitSystem","appendTo","referenceAndTargetSettings","chartSettingsUpdate",4,"ngIf"],[3,"gwpBaseline","materials","declaredUnit","componentWrapper",4,"ngIf"],[3,"chartSettingsUpdate","project","selectedElement","category","statistics","selectedIndustryEpd","selectedGenericEstimate","materialGwpData","target","isSearchForm","toUnitSystem","appendTo","referenceAndTargetSettings"],[3,"gwpBaseline","materials","declaredUnit","componentWrapper"],[1,"loading"],[1,"p-g-nopad","btns-under-boxplot"],["class","button button-small button--light-blue","pButton","","type","button",3,"click",4,"ngIf"],["pButton","","type","button",1,"button","button-small","button--light-blue",3,"click"],[1,"p-g-12","disclaimer"],["tooltipPosition","top",1,"disclaimer__tooltip",3,"pTooltip"],[1,"p-g-12","warning"],[3,"hideMap","baseProject","baseProjectAddress","distance","plantMaterialFilter","materialSearchPrettyString","selectedMaterial","statistics"],[1,"fa","fa-exclamation-triangle","warning-icon"],[1,"loading",3,"ngClass"],[3,"statistics"],[3,"loading","selectMaterialEnabled","genericEstimates","selectedGenericEstimate","collapsed","statisticUnit","baselineGwp","pageFirst","rowsCount","totalCount","lazyLoad","selectGenericEstimate",4,"ngIf"],[3,"loading","selectMaterialEnabled","industryEpds","
1selectedEpd","searchTerms","collapsed","statisticUnit","baselineGwp","pageFirst","rowsCount","totalCount","lazyLoad","selectEpd",4,"ngIf"],[3,"lazyLoad","selectGenericEstimate","loading","selectMaterialEnabled","genericEstimates","selectedGenericEstimate","collapsed","statisticUnit","baselineGwp","pageFirst","rowsCount","totalCount"],[3,"lazyLoad","selectEpd","loading","selectMaterialEnabled","industryEpds","selectedEpd","searchTerms","collapsed","statisticUnit","baselineGwp","pageFirst","rowsCount","totalCount"],[3,"showCurrentDialog","hideCurrentDialog","comparePlants","compareManufacturers","compareCategories","compareByStrength","compareProducts","hideCompareByProduct","lazyLoad","showDetails","materialsToCompareChanged","markAsSelected","markAsUnselected","markAsAlternative","unSelectMaterial","filteringParams","downloadSearchResults","downloadFullSearchResults","downloadGSAReport","mfPrettyString","searchFormValue","element","appendTo","withBuilding","hasAddress","selectMaterialEnabled","onlyAlternativeMaterialsCanSelect","statistics","declaredUnit","switchGwpColumn","columnsToShow","category","loading","materials","totalRecords","rows","baselineGwp","target","selectedMaterial","alternativeMaterials","bidIndex","bidders","showResults","pageFirst","showCompareCheckboxes","showPlantsMap"],[1,"bottom-use-collection-container"],[3,"hide","header","visible","appendTo"],[1,"sankey-tour"],[3,"src"],[3,"hide","appendTo","visible","searchStatistics","mfPrettyString","searchTerms","referenceAndTargetSettings"],[3,"hide","appendTo","data","visible"],[3,"hide","completeEvent","visible","appendTo","options"]]},template:function(n,i){if(1&n&&e.DNE(0,Us,1,1,"cqd-intro-button",22)(1,Hs,2,0,"ng-container",23)(2,Ao,20,16,"ng-template",null,0,e.C5r)(4,Po,3,4,"cqd-modal",24)(5,Ro,4,12,"cqd-compare-by-plant-chart-modal",25)(6,yo,4,12,"cqd-compare-by-manufacturer-chart-modal",25)(7,Oo,4,12,"cqd-compare-by-category-chart-modal",25)(8,vo,2,5,"cqd-material-spec-chart-modal",26)(9,Io,1,3,"cqd-element-select-modal",27),2&n){const s=e.sdS(3);e.Y8G("ngIf",i.introOptions&&!i.project),e.R7$(),e.Y8G("ngIf",i.prepareSearchFormInProgressSignal())("ngIfElse",s),e.R7$(3),e.Y8G("ngIf",i.categorySelectorTourShown),e.R7$(),e.Y8G("ngIf",i.shouldShowCompareByPlantModal),e.R7$(),e.Y8G("ngIf",i.shouldShowCompareByManufacturerModal),e.R7$(),e.Y8G("ngIf",i.shouldShowCompareByCategoryModal),e.R7$(),e.Y8G("ngIf",i.shouldShowCompareByStrengthModal),e.R7$(),e.Y8G("ngIf",i.shouldShowSelectElementsModal)}},dependencies:[N.YU,N.bT,y.qT,y.cb,y.j4,ye._f,Ae.Y9,Ae.wi,be.m,jn.Q,ke.Z,Hn,rt.y,Vn.Y,Xn.j,xt.An,Yn.So,zn.o,Wn.o,qn.F,Kn.N,Qn.b,Ee.V5,Ee.Ti,Ee.M6,Ee.xJ,$e.j,Jn.r,Zn.m,ti,A.$,si,Zt,la,es,as,os,ds,ps,_s,Ps,Ns,N.Jj],styles:[".btns-under-boxplot[_ngcontent-%COMP%]{display:flex;justify-content:center;gap:10px}.shareable-link[_ngcontent-%COMP%]{margin-right:10px;display:flex;align-items:center}.shareable-link[_ngcontent-%COMP%] cqd-copy-link-button button{padding-left:4px!important;padding-right:4px!important;text-transform:capitalize}.search-btn-block[_ngcontent-%COMP%]{display:flex;justify-content:right;align-items:center}.search-btn-block[_ngcontent-%COMP%] .button-search[_ngcontent-%COMP%] .search-icon-wrapper[_ngcontent-%COMP%]{position:relative;min-width:22px;display:flex;align-items:center}.search-btn-block[_ngcontent-%COMP%] .button-search[_ngcontent-%COMP%] .search-icon-wrapper[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%]{position:relative;right:16px}@media (max-width: 1250px){.search-btn-block[_ngcontent-%COMP%] .button-search[_ngcontent-%COMP%] .search-icon-wrapper[_ngcontent-%COMP%] .loading.warning[_ngcontent-%COMP%]{right:22px}}.search-btn-block[_ngcontent-%COMP%] .button-search[_ngcontent-%COMP%] .search-icon-wrapper[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%]:before{border-top-color:#fff}.search-btn-block[_ngcontent-%COMP%] .button-search.ctrl[_ngcontent-%COMP%]{background:var(--warning-pressed)!important}.strength[_ngcontent-%COMP%]{position:relative}.strength[_ngcontent-%COMP%] .control[_ngcontent-%COMP%]{width:calc(100% - 26px);
1display:inline-block}.strength[_ngcontent-%COMP%] .tooltip[_ngcontent-%COMP%]{margin-left:10px;width:16px;display:inline-block}.strength[_ngcontent-%COMP%] cqd-help-tooltip[_ngcontent-%COMP%]{position:absolute;top:21px}[_nghost-%COMP%]{padding:0!important}.search-terms-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center} .main-search-panel p-panel .p-panel.p-component, cqd-industry-epds-statistics-table p-panel .p-panel.p-component{background-color:#fff} .main-search-panel p-panel .p-panel.p-component .p-panel-icons .p-panel-header-icon .pi, cqd-industry-epds-statistics-table p-panel .p-panel.p-component .p-panel-icons .p-panel-header-icon .pi{top:0!important} p-panel .p-panel .panel-collapse .panel-body{padding:0 5px} cqd-material-search-modal .mat-stepper-horizontal{overflow:hidden} cqd-material-search-modal .mat-stepper-horizontal p-panel cqd-select{margin-top:5px} cqd-material-search-modal .mat-stepper-horizontal p-panel .p-panel.p-widget.p-widget-content{background:#f2f3f5} cqd-material-search-modal .mat-stepper-horizontal p-panel .p-panel.p-widget.p-widget-content .p-panel-icons .p-panel-header-icon .pi{height:45px;top:0!important} cqd-material-search-modal .mat-stepper-horizontal p-panel p-panel .p-panel.p-widget.p-widget-content{background:#fff} cqd-material-search-modal .mat-stepper-horizontal p-panel p-panel .p-panel.p-widget.p-widget-content .p-panel-icons .p-panel-header-icon .pi{height:45px} .mat-horizontal-stepper-header .mat-step-icon.mat-step-icon-state-searching{background-color:#3b9cb6} .p-tooltip{z-index:9999!important}.main-search-panel[_ngcontent-%COMP%] .warning-label[_ngcontent-%COMP%]{color:var(--warning-dark);display:flex}.main-search-panel[_ngcontent-%COMP%] .warning-label[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{line-height:23px}.float-none[_ngcontent-%COMP%]{float:none}.category-select[_ngcontent-%COMP%]{display:inline-block;width:100%;min-height:500px}.inline-block[_ngcontent-%COMP%]{display:inline-block;vertical-align:middle}.category-select-wrapper[_ngcontent-%COMP%]{padding:7px}[_nghost-%COMP%] .ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap!important}.industry-average[_ngcontent-%COMP%]{text-align:center;margin-bottom:10px;color:#cb181d;font-size:1em}.charts-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.masterformat[_ngcontent-%COMP%]{font-weight:600}.no-results[_ngcontent-%COMP%]{font-size:16px;text-align:center;margin-top:10px}.plants-no-declarations[_ngcontent-%COMP%]{margin:0 10px;float:right;height:34px;display:flex}.plants-no-declarations[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{margin:auto;cursor:pointer}.boxplot-panel-body[_ngcontent-%COMP%]{height:430px;padding:10px;position:relative}.multiple-box-plot-panel-body[_ngcontent-%COMP%]{height:500px;padding:0}.compare-by-wrapper[_ngcontent-%COMP%]{width:100%}cqd-box-plot[_ngcontent-%COMP%]{display:block}.gwp-per-unit[_ngcontent-%COMP%]{text-transform:unset}.bottom-use-collection-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.form-actions-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center}.form-actions-container[_ngcontent-%COMP%] .reused-materials[_ngcontent-%COMP%] {margin-right:20px}cqd-box-plot-wrapper[_ngcontent-%COMP%], cqd-scatter-plot[_ngcontent-%COMP%]{min-height:323px}.warning-icon[_ngcontent-%COMP%]{color:#ebac2a;font-size:16px;position:relative;top:1px;margin-right:5px}.search-form-toggler[_ngcontent-%COMP%]{float:right}.disclaimer[_ngcontent-%COMP%], .warning[_ngcontent-%COMP%]{color:#ce6417;font-style:italic;font-weight:600}.disclaimer__tooltip[_ngcontent-%COMP%], .warning__tooltip[_ngcontent-%COMP%]{font-weight:800}.results-wrapper[_ngcontent-%COMP%]{margin-bottom:25px}.category-breadcrumb[_ngcontent-%COMP%]{display:inline-block}.category-breadcrumb[_ngcontent-%COMP%] .p-breadcrumb{padding-right:20px}.hidden[_ngcontent-%COMP%]{display:none}"],changeDetection:0})}}return a})();var pt=function(a){return a.epd="EPD",a.indusrtyEpd="Industry EPD",a.genericEstimate="Generic Estimate",a}(pt||{});const wo=[{path:"",component:(()=>{class a{static{this.\u0275fac=function(n){return new(n||a)}}static{this.\u0275cmp=e.VBU({type:a,selectors:[["cqd-material-search"]],decls:1,vars:0,template:function(n,i){1&n&&e.nrm(0,"cqd-material-search-form")},dependencies:[mn],encapsulation:2,changeDetection:0})}}return a})()}];let xo=(()=>{class a{static{this.\u0275fac=function(n){return new(n||a)}}static{this.\u0275mod=e.$C({type:a})}static{this.\u0275inj=e.G2t({imports:[r.iI.forChild(wo),r.iI]})}}return a})();var Do=o(63905),Fo=o(70420),Go=o(68551),un=o(73979);const Lo=(a,l)=>({id:a,isDownloadable:l,boxId:"material"});function No(a,l){if(1&a&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&a){const t=e.XpG(2);e.R7$(),e.Lme("",t.labels.organizationName,": ",t.material.manufacturer.name,"")}}function Bo(a,l){if(1&a&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&a){const t=e.XpG(2);e.R7$(),e.Lme(" ",t.labels.plantOrGroupName," : ",t.material.plantOrGroup.getFormattedName()," ")}}function $o(a,l){if(1&a&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&a){const t=e.XpG(2);e.R7$(),e.Lme("",t.labels.productName,": ",t.material.name,"")}}function jo(a,l){if(1&a&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&a){const t=e.XpG(2);e.R7$(),e.Lme("",t.labels.description,": ",t.material.description,"")}}function ko(a,l){if(1&a&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&a){const t=e.XpG(2);e.R7$(),e.Lme("",t.labels.uaGWP,": ",t.formattedUncertaintyAdjustedGwp,"")}}function Uo(a,l){if(1&a&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&a){const t=e.XpG(2);e.R7$(),e.Lme("",t.labels.gwp,": ",t.formattedGwp,"")}}function Ho(a,l){if(1&a&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&a){const t=e.XpG(2);e.R7$(),e.Lme(" ",t.labels.alternativeNames,": ",t.material.plantOrGroup.altNames," ")}}function Vo(a,l){if(1&a&&(e.j41(0,"li")(1,"span"),e.EFF(2),e.nI1(3,"async"),e.k0s()()),2&a){const t=e.XpG(2);e.R7$(2),e.Lme("",t.concreteCompressiveStrength28dLabel,": ",e.bMT(3,2,t.formattedCompressiveStrength28d$),"")}}function Xo(a,l){if(1&a&&(e.j41(0,"li")(1,"span"),e.EFF(2),e.nI1(3,"async"),e.k0s()()),2&a){const t=e.XpG(2);e.R7$(2),e.E5c("",t.labels.concreteCompressiveStrength," ",t.material.concreteCompressiveStrengthOtherD,"D: ",e.bMT(3,3,t.formattedCompressiveStrengthOther$),"")}}function Yo(a,l){if(1&a&&(e.j41(0,"li")(1,"span"),e.EFF(2),e.k0s()()),2&a){const t=e.XpG(2);e.R7$(2),e.E5c("",t.labels.slump,": ",t.formattedMinSlump," - ",t.formattedMaxSlump,"")}}function zo(a,l){if(1&a&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&a){const t=e.XpG(2);e.R7$(),e.Lme("",t.labels.wcRatio,": ",t.material.concreteWCRatio,"")}}function Wo(a,l){if(1&a&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&a){const t=e.XpG(2);e.R7$(),e.Lme(" ",t.labels.aggregateSizeMax,": ",t.formattedAggregateSizeMax," ")}}function qo(a,l){if(1&a&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&a){const t=e.XpG(2);e.R7$(),e.Lme("",t.labels.minPipelineSize,": ",t.formattedMinPipelineSize,"")}}function Ko(a,l){if(1&a&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&a){const t=e.XpG(2);e.R7$(),e.Lme("",t.labels.opc,": ",t.material.cementitious.opc,"")}}function Qo(a,l){if(1&a&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&a){const t=e.XpG(2);e.R7$(),e.Lme("",t.labels.wht,": ",t.material.cementitious.wht,"")}}function Jo(a,l){if(1&a&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&a){const t=e.XpG(2);e.R7$(),e.Lme("",t.labels.ggbs,": ",t.material.cementitious.ggbs,"")}}function Zo(a,l){if(1&a&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&a){const t=e.XpG(2);e.R7$(),e.Lme("",t.labels.flyAsh,": ",t.material.cementitious.flyAsh,"")}}function er(a,l){if(1&a&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&a){const t=e.XpG(2);e.R7$(),e.Lme("",t.labels.siFume,": ",t.material.cementitious.siFume,"")}}function tr(a,l){if(1&a&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&a){const t=e.XpG(2);e.R7$(),e.Lme("",t.labels.gg45,": ",t.material.cementitious.gg45,"")}}
1function nr(a,l){if(1&a&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&a){const t=e.XpG(2);e.R7$(),e.Lme("",t.labels.natPoz,": ",t.material.cementitious.natPoz,"")}}function ir(a,l){if(1&a&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&a){const t=e.XpG(2);e.R7$(),e.Lme("",t.labels.mk,": ",t.material.cementitious.mk,"")}}function ar(a,l){if(1&a&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&a){const t=e.XpG(2);e.R7$(),e.Lme("",t.labels.CaCO3,": ",t.material.cementitious.CaCO3,"")}}function sr(a,l){if(1&a&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&a){const t=e.XpG(2);e.R7$(),e.Lme("",t.labels.otherScm,": ",t.material.cementitious.other,"")}}function or(a,l){if(1&a&&(e.j41(0,"li"),e.EFF(1),e.nrm(2,"cqd-download-epd-file",7),e.k0s()),2&a){const t=e.XpG(2);e.R7$(),e.SpI(" ",t.labels.originalEpdFile,": "),e.R7$(),e.Y8G("instance",e.l_i(3,Lo,t.material.epdId,t.material.isDownloadable))("label",t.labels.downloadEPD)}}function rr(a,l){if(1&a&&(e.j41(0,"div",8)(1,"p-panel")(2,"p-header")(3,"span",9),e.pXf(4,0),e.k0s()(),e.j41(5,"div",10),e.nrm(6,"cqd-box-plot-wrapper",11),e.k0s()()()),2&a){const t=e.XpG(2);e.R7$(4),e.uP7(t.declaredUnit?t.declaredUnit.convertedUnit.toString():"unit"),e.nnv(4),e.R7$(2),e.Y8G("target",t.target)("statistics",t.statistics)("materialGwpData",t.materialGwpData)("alwaysShowMaterial",!0)("showTour",!1)("category",t.material.category)("isSearchForm",!0)("toUnitSystem",!0)("appendTo",t.appendTo)}}function lr(a,l){if(1&a&&(e.qex(0),e.j41(1,"div",2)(2,"div",3)(3,"ul",4),e.DNE(4,No,2,2,"li",1)(5,Bo,2,2,"li",1)(6,$o,2,2,"li",1)(7,jo,2,2,"li",1)(8,ko,2,2,"li",1)(9,Uo,2,2,"li",1)(10,Ho,2,2,"li",1)(11,Vo,4,4,"li",1)(12,Xo,4,5,"li",1)(13,Yo,3,3,"li",1)(14,zo,2,2,"li",1)(15,Wo,2,2,"li",1)(16,qo,2,2,"li",1)(17,Ko,2,2,"li",1)(18,Qo,2,2,"li",1)(19,Jo,2,2,"li",1)(20,Zo,2,2,"li",1)(21,er,2,2,"li",1)(22,tr,2,2,"li",1)(23,nr,2,2,"li",1)(24,ir,2,2,"li",1)(25,ar,2,2,"li",1)(26,sr,2,2,"li",1)(27,or,3,6,"li",1),e.k0s(),e.nrm(28,"cqd-open-epd-button",5),e.k0s(),e.DNE(29,rr,7,10,"div",6),e.k0s(),e.bVm()),2&a){const t=e.XpG();e.R7$(4),e.Y8G("ngIf",t.material.manufacturer),e.R7$(),e.Y8G("ngIf",t.material.plantOrGroup),e.R7$(),e.Y8G("ngIf",t.material.name),e.R7$(),e.Y8G("ngIf",t.material.description),e.R7$(),e.Y8G("ngIf",t.material.uncertaintyAdjustedGwp),e.R7$(),e.Y8G("ngIf",t.material.gwp),e.R7$(),e.Y8G("ngIf",t.material.plantOrGroup&&t.material.plantOrGroup.altNames),e.R7$(),e.Y8G("ngIf",t.material.concreteCompressiveStrength28d),e.R7$(),e.Y8G("ngIf",t.material.concreteCompressiveStrengthOther),e.R7$(),e.Y8G("ngIf",t.material.concreteMinSlump&&t.material.concreteMaxSlump),e.R7$(),e.Y8G("ngIf",t.material.concreteWCRatio),e.R7$(),e.Y8G("ngIf",t.material.concreteAggregateSizeMax),e.R7$(),e.Y8G("ngIf",t.material.concreteMinPipelineSize),e.R7$(),e.Y8G("ngIf",null==t.material.cementitious?null:t.material.cementitious.opc),e.R7$(),e.Y8G("ngIf",null==t.material.cementitious?null:t.material.cementitious.wht),e.R7$(),e.Y8G("ngIf",null==t.material.cementitious?null:t.material.cementitious.ggbs),e.R7$(),e.Y8G("ngIf",null==t.material.cementitious?null:t.material.cementitious.flyAsh),e.R7$(),e.Y8G("ngIf",null==t.material.cementitious?null:t.material.cementitious.siFume),e.R7$(),e.Y8G("ngIf",null==t.material.cementitious?null:t.material.cementitious.gg45),e.R7$(),e.Y8G("ngIf",null==t.material.cementitious?null:t.material.cementitious.natPoz),e.R7$(),e.Y8G("ngIf",null==t.material.cementitious?null:t.material.cementitious.mk),e.R7$(),e.Y8G("ngIf",null==t.material.cementitious?null:t.material.cementitious.CaCO3),e.R7$(),e.Y8G("ngIf",null==t.material.cementitious?null:t.material.cementitious.other),e.R7$(),e.Y8G("ngIf",t.material.isDownloadable),e.R7$(),e.Y8G("isProductTvd",t.material.isProductTvd)("epdId",t.material.openXpdUuid||t.material.epdId)("tooltipPosition",t.tooltipPosition.right),e.R7$(),e.Y8G("ngIf",!t.category.allowsAnyDeclaredUnit&&!t.category.noStatistics)}}let cr=(()=>{class a extends Dt{constructor(){super(...arguments),this.labels=z.W,this.tooltipPosition=ee.C_}
1ngOnChanges({material:t,declaredUnit:n}){t&&t.currentValue&&(this.setFormattedPropertiesOfMaterial(t.currentValue),this.concreteCompressiveStrength28dLabel=[K.BM.masonry,K.BM.precastConcrete].includes(t.currentValue.category.id)?$localize`Compressive Strength`:$localize`Concrete Compressive Strength 28D`),n&&n.currentValue&&(this.formattedDeclaredUnit=n.currentValue.convertedUnit.toString(),this.formatUncertaintyAdjustedGwpAndDeclaredGwp(this.material)),this.declaredUnit&&this.material&&(this.materialGwpData={gwp:this.gwpPerDeclared(this.material),gwpZ:this.material.gwpZ,declaredUnit:this.declaredUnit.convertedUnit})}setFormattedPropertiesOfMaterial(t){this.formatUncertaintyAdjustedGwpAndDeclaredGwp(t),t.concreteCompressiveStrength28d&&(this.formattedCompressiveStrength28d$=this.formatConcreteStrength(t.concreteCompressiveStrength28d)),t.concreteCompressiveStrengthOther&&(this.formattedCompressiveStrengthOther$=this.formatUnitWithContext(t.concreteCompressiveStrengthOther,this.materialFields.concreteCompressiveStrengthOther.name)),t.concreteMinSlump&&(this.formattedMinSlump=t.concreteMinSlump.format()),t.concreteMaxSlump&&(this.formattedMaxSlump=t.concreteMaxSlump.format()),t.concreteAggregateSizeMax&&(this.formattedAggregateSizeMax=t.concreteAggregateSizeMax.format()),t.concreteMinPipelineSize&&(this.formattedMinPipelineSize=t.concreteMinPipelineSize.format())}formatUncertaintyAdjustedGwpAndDeclaredGwp(t){const n=this.uncertaintyAdjustedGwpPerDeclared(t);this.formattedUncertaintyAdjustedGwp=n?`${n.to("kgCO2e").format(this.formattingService.format4r)} / ${this.declaredUnit.convertedUnit.format()}`:"";const i=this.gwpPerDeclared(t);this.formattedGwp=i?`${i.to("kgCO2e").format()} / ${this.declaredUnit.convertedUnit.format()}`:""}static{this.\u0275fac=(()=>{let t;return function(i){return(t||(t=e.xGo(a)))(i||a)}})()}static{this.\u0275cmp=e.VBU({type:a,selectors:[["cqd-material-details"]],inputs:{material:"material",statistics:"statistics",gwpBaseline:"gwpBaseline",target:"target",category:"category"},features:[e.Vt3,e.OA$],decls:1,vars:1,consts:()=>{let t;return t=$localize`:â9d73899ef54dd05490faa4ca10c6b7902ff94657â5283968737322960479: kgCO2e embodied per ${"\ufffd0\ufffd"}:INTERPOLATION: `,[t,[4,"ngIf"],[1,"material"],[1,"material-details"],[1,"material-details-list"],[3,"isProductTvd","epdId","tooltipPosition"],["class","material-box-plot",4,"ngIf"],["styleClass","button button--light-blue--invert epd-actions-btn",3,"instance","label"],[1,"material-box-plot"],[1,"gwp-per-unit"],[1,"chart-container"],[3,"target","statistics","materialGwpData","alwaysShowMaterial","showTour","category","isSearchForm","toUnitSystem","appendTo"]]},template:function(n,i){1&n&&e.DNE(0,lr,30,28,"ng-container",1),2&n&&e.Y8G("ngIf",i.material)},dependencies:[N.bT,Ae.Y9,ke.Z,Go.H,un.d,A.$,N.Jj],styles:[".material[_ngcontent-%COMP%]{padding:10px;border:1px solid #979ea8;display:flex;flex-direction:row;width:100%}.material-details[_ngcontent-%COMP%]{width:100%;margin-right:10px}.material-details-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0}.material-details-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{white-space:normal;width:100%;padding:8px 25px;display:flex;align-items:center}.material-details-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(2n){background:#b2b9c54d}.material-details-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] cqd-download-epd-file[_ngcontent-%COMP%] button{padding:3px 15px 0!important}.material-box-plot[_ngcontent-%COMP%]{width:315px}.material-box-plot[_ngcontent-%COMP%] .chart-container[_ngcontent-%COMP%]{background-color:#fff}.material-box-plot[_ngcontent-%COMP%] .gwp-per-unit[_ngcontent-%COMP%]{text-transform:unset}cqd-box-plot-wrapper[_ngcontent-%COMP%] .settings-btn{margin:auto 0 auto auto!important}"],changeDetection:0})}}return a})();var dr=o(97768),pr=o(72109),_r=o(97039),hr=o(77927);function gr(a,l){if(1&a){const t=e.RV6();e.j41(0,"div",2)(1,"button",9),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onDownloadFullSearchResults())}),e.nrm(2,"img",6),e.k0s()()}if(2&a){const t=e.XpG();e.R7$(),e.Y8G("disabled",t.isDisabledDownload),e.R7$(),e.Y8G("src",t.assetsUrl+"assets/svg/file-csv.svg",e.B4B)}}function mr(a,l){if(1&a){const t=e.RV6();e.j41(0,"div",2)(1,"button",10),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onDownloadGSAReport())}),e.nrm(2,"img",6),e.k0s()()}if(2&a){const t=e.XpG();e.R7$(),e.Y8G("disabled",t.isDisabledDownload),e.R7$(),e.Y8G("src",t.assetsUrl+"assets/svg/file-xls.svg",e.B4B)}}let ur=(()=>{class a extends _r.K{constructor(t){super(),this.permissionsService=t,this.hide=new e.bkB,this.downloadSearchResults=new e.bkB,this.downloadFullSearchResults=new e.bkB,this.downloadGSAReport=new e.bkB,this.csv=et.g.csv,this.xls=et.g.xlsx}ngOnInit(){this.isAdmin=this.permissionsService.isAdmin()}onHide(){this.hide.emit()}onDownloadSearchResults(t){this.downloadSearchResults.emit(t)}onDownloadFullSearchResults(){this.downloadFullSearchResults.emit()}onDownloadGSAReport(){this.downloadGSAReport.emit()}static{this.\u0275fac=function(n){return new(n||a)(e.rXU(Ft.K))}}static{this.\u0275cmp=e.VBU({type:a,selectors:[["cqd-download-search-results-modal"]],inputs:{display:"display",showGSAReport:"showGSAReport",appendTo:"appendTo",isDisabledDownload:"isDisabledDownload"},outputs:{hide:"hide",downloadSearchResults:"downloadSearchResults",downloadFullSearchResults:"downloadFullSearchResults",downloadGSAReport:"downloadGSAReport"},features:[e.Vt3],decls:16,vars:9,consts:()=>{let t,n,i,s,c;return t=$localize`:âe763937ea6b2a53d79ba0f71e4dfc4b8c10cbad0â8387398260011151526:Download Search Results`,n=$localize`:â009cbc61486303f35ccb9fcf6466a956137fe37dâ3581390655099769115:Search Results`,i=$localize`:â009cbc61486303f35ccb9fcf6466a956137fe37dâ3581390655099769115:Search Results`,s=$localize`:â777cacb86c74c54c1668a7e8202c267aa6951101â6194250777129049069:Full report in Box.com`,c=$localize`:âe4bad4eaea31c811f1d147f2a2918416c99c3e9aâ7337750765244783588:GSA report in Box.com`,[["header",t,3,"hide","visible","dialogWidth","appendTo"],[1,"content-wrapper"],[1,"buttons-block-wrapper"],[1,"block-item","block-title"],["indicatorSide","left",1,"download-wrapper"],["pButton","","type","button","label",n,1,"block-item","button","button--light-blue","button-right","button-small",3,"click","disabled"],["alt","",1,"icon",3,"src"],["pButton","","type","button","label",i,1,"block-item","button","button--light-blue","button-right","button-small",3,"click","disabled"],["class","buttons-block-wrapper",4,"ngIf"],["pButton","","type","button","label",s,1,"block-item","button","button--light-blue","button-right","button-small","full",3,"click","disabled"],["id","gsa-report","pButton","","type","button","label",c,1,"block-item","button","button--light-blue","button-right","button-small","full",3,"click","disabled"]]},template:function(n,i){1&n&&(e.j41(0,"cqd-modal",0),e.bIt("hide",function(){return i.onHide()}
1),e.j41(1,"div",1)(2,"div",2)(3,"span",3),e.EFF(4,"Formatted"),e.k0s(),e.j41(5,"span",3),e.EFF(6,"Raw"),e.k0s()(),e.j41(7,"div",2)(8,"cqd-button-loading-wrapper",4)(9,"button",5),e.bIt("click",function(){return i.onDownloadSearchResults(i.xls)}),e.nrm(10,"img",6),e.k0s()(),e.j41(11,"cqd-button-loading-wrapper",4)(12,"button",7),e.bIt("click",function(){return i.onDownloadSearchResults(i.csv)}),e.nrm(13,"img",6),e.k0s()()(),e.DNE(14,gr,3,2,"div",8)(15,mr,3,2,"div",8),e.k0s()()),2&n&&(e.Y8G("visible",i.display)("dialogWidth",400)("appendTo",i.appendTo),e.R7$(9),e.Y8G("disabled",i.isDisabledDownload),e.R7$(),e.Y8G("src",i.assetsUrl+"assets/svg/file-xls.svg",e.B4B),e.R7$(2),e.Y8G("disabled",i.isDisabledDownload),e.R7$(),e.Y8G("src",i.assetsUrl+"assets/svg/file-csv.svg",e.B4B),e.R7$(),e.Y8G("ngIf",i.isAdmin),e.R7$(),e.Y8G("ngIf",i.isAdmin&&i.showGSAReport))},dependencies:[N.bT,ye._f,rt.y,hr.x],styles:[".content-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.icon[_ngcontent-%COMP%]{width:20px;height:16px}.buttons-block-wrapper[_ngcontent-%COMP%]{display:flex;width:100%;justify-content:space-between}.buttons-block-wrapper[_ngcontent-%COMP%] .block-item[_ngcontent-%COMP%]{margin:0 0 4px;width:160px}.buttons-block-wrapper[_ngcontent-%COMP%] .block-item.full[_ngcontent-%COMP%]{width:100%}.buttons-block-wrapper[_ngcontent-%COMP%] .block-title[_ngcontent-%COMP%]{text-align:left;margin-bottom:.5rem;font-weight:600;display:inline-block}"],changeDetection:0})}}return a})();var Sr=o(85226);let fr=(()=>{class a{constructor(){this.lastlySelectedBidderIndexesSource=new f.B,this.lastlySelectedBidderIndexes$=this.lastlySelectedBidderIndexesSource.asObservable()}updateLastlySelectedBidderIndexes(t){this.lastlySelectedBidderIndexesSource.next(t)}static{this.\u0275fac=function(n){return new(n||a)}}static{this.\u0275prov=e.jDH({token:a,factory:a.\u0275fac,providedIn:"root"})}}return a})();var Cr=o(45144),Tr=o(17198),Sn=o(62664);const Mr=["cqd-material-row",""],Er=(a,l)=>({"button--grey":a,"button--blue":l}),br=a=>({highlighted:a});function Ar(a,l){if(1&a&&(e.qex(0),e.j41(1,"td",9),e.nrm(2,"cqd-select",10),e.k0s(),e.bVm()),2&a){const t=e.XpG();e.R7$(2),e.Y8G("formControl",t.biddersControl)("options",t.bidderOptions)("clearable",!1)("multiple",!0)("disabled",!t.isAlternativeMaterial&&t.alternativeMaterials.length>=t.alternativeMaterialsMaxCount||!t.isMaterialWithConservative)}}function Pr(a,l){if(1&a){const t=e.RV6();e.j41(0,"button",13),e.bIt("click",function(i){e.eBV(t),e.XpG();const s=e.sdS(5);return e.Njj(s.toggle(i))}),e.nrm(1,"img",14),e.k0s()}}function Rr(a,l){if(1&a){const t=e.RV6();e.j41(0,"button",13),e.bIt("click",function(i){e.eBV(t),e.XpG();const s=e.sdS(5);return e.Njj(s.toggle(i))}),e.nrm(1,"img",15),e.k0s()}}function yr(a,l){if(1&a){const t=e.RV6();e.j41(0,"button",13),e.bIt("click",function(i){e.eBV(t),e.XpG();const s=e.sdS(5);return e.Njj(s.toggle(i))}),e.nrm(1,"img",16),e.k0s()}}function Or(a,l){if(1&a&&(e.qex(0),e.DNE(1,Pr,2,0,"button",11)(2,Rr,2,0,"button",11)(3,yr,2,0,"button",11),e.nrm(4,"p-menu",12,0),e.bVm()),2&a){const t=e.XpG();e.R7$(),e.Y8G("ngIf",t.isSelectedMaterial),e.R7$(),e.Y8G("ngIf",t.isAlternativeMaterial),e.R7$(),e.Y8G("ngIf",!t.isSelectedMaterial&&!t.isAlternativeMaterial),e.R7$(),e.Y8G("popup",!0)("model",t.materialStateItems)}}function vr(a,l){if(1&a&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&a){const t=e.XpG();e.R7$(),e.SpI(" ",t.material.category.displayName," ")}}function Ir(a,l){if(1&a&&(e.qex(0),e.j41(1,"td",17)(2,"span"),e.EFF(3),e.k0s()(),e.bVm()),2&a){const t=e.XpG();e.R7$(),e.Y8G("pTooltip",null==t.material.manufacturer?null:t.material.manufacturer.name)("cqdHideTooltipIfTextFits",null==t.material.manufacturer?null:t.material.manufacturer.name),e.R7$(2),e.JRh(null==t.material.manufacturer?null:t.material.manufacturer.name)}}function wr(a,l){if(1&a&&(e.qex(0),e.j41(1,"td",17)(2,"span"),e.EFF(3),e.k0s()(),e.bVm()),2&a){const t=e.XpG();e.R7$(),e.Y8G("pTooltip",null==t.material.plantOrGroup?null:t.material.plantOrGroup.getFormattedName())("cqdHideTooltipIfTextFits",null==t.material.plantOrGroup?null:t.material.plantOrGroup.getFormattedName()),e.R7$(2),e.JRh(null==t.material.plantOrGroup?null:t.material.plantOrGroup.getFormattedName())}}function xr(a,l){if(1&a&&e.nrm(0,"p-checkbox",19),2&a){const t=e.XpG(2);e.Y8G("value",t.material.id)("formControl",t.materialsToCompareIdsControl)("cqdDisabled",t.materialsToCompareIdsControl.value&&t.materialsToCompareIdsControl.value.length>=t.maxMaterialsCount&&!t.materialsToCompareIdsControl.value.includes(t.material.id)||!t.isSameDimensionality)}}function Dr(a,l){if(1&a&&(e.qex(0),e.j41(1,"td",17),e.DNE(2,xr,1,3,"p-checkbox",18),e.EFF(3),e.k0s(),e.bVm()),2&a){const t=e.XpG();e.R7$(),e.Y8G("pTooltip",t.material.name)("cqdHideTooltipIfTextFits",t.material.name),e.R7$(),e.Y8G("ngIf",t.showCompareCheckboxes),e.R7$(),e.SpI(" ",t.material.name," ")}}function Fr(a,l){if(1&a&&(e.qex(0),e.j41(1,"td",17),e.EFF(2),e.k0s(),e.bVm()),2&a){const t=e.XpG();e.R7$(),e.Y8G("pTooltip",t.material.description)("cqdHideTooltipIfTextFits",t.material.description),e.R7$(),e.SpI(" ",t.material.description," ")}}function Gr(a,l){if(1&a&&(e.qex(0),e.j41(1,"td"),e.EFF(2),e.nI1(3,"async"),e.k0s(),e.bVm()),2&a){const t=e.XpG();e.R7$(2),e.SpI(" ",e.bMT(3,1,t.formatConcreteStrength(t.material.concreteCompressiveStrength28d))," ")}}function Lr(a,l){if(1&a&&(e.qex(0),e.j41(1,"td"),e.EFF(2),e.nI1(3,"async"),e.k0s(),e.bVm()),2&a){const t=e.XpG();e.R7$(2),e.SpI(" ",e.bMT(3,1,t.formatUnitWithContext(t.material.concreteFlexionStrength,t.materialFields.concreteFlexionStrength.name))," ")}}function Nr(a,l){if(1&a&&(e.qex(0),e.j41(1,"td"),e.EFF(2),e.nI1(3,"async"),e.k0s(),e.bVm()),2&a){const t=e.XpG();e.R7$(2),e.SpI(" ",e.bMT(3,1,t.formatUnitWithContext(t.material.yarnWeight,"yarnWeight"))," ")}}function Br(a,l){if(1&a&&(e.qex(0),e.j41(1,"td"),e.EFF(2),e.k0s(),e.bVm()),2&a){const t=e.XpG();e.R7$(2),e.SpI(" ",t.material.yarnType," ")}}function $r(a,l){if(1&a&&(e.qex(0),e.j41(1,"td"),e.EFF(2),e.nI1(3,"async"),e.k0s(),e.bVm()),2&a){const t=e.XpG();e.R7$(2),e.SpI(" ",e.bMT(3,1,t.formatByType(t.material.thickness,t.unitTypes.thickness))," ")}}
1function jr(a,l){if(1&a&&(e.qex(0),e.j41(1,"td"),e.EFF(2),e.nI1(3,"async"),e.k0s(),e.bVm()),2&a){const t=e.XpG();e.R7$(2),e.SpI(" ",e.bMT(3,1,t.formatByType(null==t.material.plantOrGroup?null:t.material.plantOrGroup.distance,t.unitTypes.distance))," ")}}function kr(a,l){if(1&a&&e.nrm(0,"i",22),2&a){const t=e.XpG(2);e.Y8G("pTooltip",t.tooltips.epdIndependentlyVerified)}}function Ur(a,l){if(1&a&&(e.j41(0,"span",23),e.EFF(1,"TVD"),e.k0s()),2&a){const t=e.XpG(2);e.Y8G("pTooltip",t.tvdTooltip)}}function Hr(a,l){if(1&a&&(e.qex(0),e.j41(1,"td")(2,"div",20),e.DNE(3,kr,1,1,"i",21)(4,Ur,2,1,"ng-template",null,1,e.C5r),e.k0s()(),e.bVm()),2&a){const t=e.sdS(5),n=e.XpG();e.R7$(3),e.Y8G("ngIf",n.material.declarationType!==n.evidenceType.TVD)("ngIfElse",t)}}function Vr(a,l){if(1&a&&(e.qex(0),e.j41(1,"td")(2,"span",24),e.EFF(3),e.k0s()(),e.bVm()),2&a){const t=e.XpG();e.R7$(2),e.Y8G("ngClass",e.eq3(2,br,t.isEpdRangeHighlighterEnabledSignal()&&t.isGwpLessOrEqualsBaselineGwp(t.uncertaintyAdjustedGwpPerDeclared(t.material)))),e.R7$(),e.JRh(t.formattedUncertaintyAdjustedGwpPerDeclared(t.material))}}function Xr(a,l){if(1&a&&(e.qex(0),e.j41(1,"td"),e.EFF(2),e.k0s(),e.bVm()),2&a){let t;const n=e.XpG();e.R7$(2),e.JRh(null==(t=n.gwpPerDeclared(n.material))?null:t.format())}}function Yr(a,l){if(1&a){const t=e.RV6();e.j41(0,"cqd-add-epd-to-project-button",25),e.bIt("clickEvent",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.addToProject.emit(i.material))}),e.k0s()}if(2&a){const t=e.XpG();e.Y8G("iconOnly",!0)("tooltip",t.tooltips.addEpdToProject)}}var Ve=function(a){return a.selected="selected",a.alternative="alternative",a.normal="normal",a}(Ve||{});let zr=(()=>{class a extends Dt{constructor(t,n){super(),this.notificationService=t,this.bidderSelectionService=n,this.materialState=Ve.normal,this.markAsUnselected=new e.bkB,this.markAsSelected=new e.bkB,this.markAsAlternative=new e.bkB,this.biddersChanged=new e.bkB,this.addToProject=new e.bkB,this.alternativeMaterialsMaxCount=6,this.biddersControl=new y.MJ([]),this.tooltips=ee.vX,this.evidenceType=Sr.M,this.baseMaterialStateItems=[{label:"Selected",nextState:Ve.selected,title:"Mark this material as the Basis of Design, Selected, or Procured product",command:()=>this.markAsSelected.emit()},{label:"Alternative",nextState:Ve.alternative,title:"Mark this product as a potential material for selection. Up to 6 alternatives may be selected.",command:()=>{this.alternativeMaterials.length>=6?this.notificationService.show({severity:"error",summary:"Error",detail:"You cannot select more than 6 alternative materials"}):this.markAsAlternative.emit()}},{label:"Unselected",nextState:Ve.normal,title:"No special designation.",command:()=>this.markAsUnselected.emit()}],this.alternativeStateItem={name:"Alternative",index:Ve.alternative}}ngOnInit(){this.bidderSelectionService.lastlySelectedBidderIndexes$.pipe((0,h.Q)(this.destroy$)).subscribe(({materialId:t,bidderIndexes:n})=>{n.forEach(i=>{this.biddersControl.value.includes(i)&&t!==this.material.id&&this.biddersControl.setValue(this.biddersControl.value.filter(s=>s!==i))})}),this.biddersControl.valueChanges.pipe((0,h.Q)(this.destroy$)).subscribe(t=>{const[n]=t.filter(s=>s===Ve.alternative),i=t.filter(s=>s!==Ve.alternative);this.biddersChanged.emit(i.map(s=>this.decreaseBidderIndex(s))),this.updateAlternativeOptionStatus(i,n),n?this.markAsAlternative.emit():i.length||this.markAsUnselected.emit(),this.bidderSelectionService.updateLastlySelectedBidderIndexes({materialId:this.material.id,bidderIndexes:i})}),this.tvdTooltip=this.tooltips.tvdTooltip(this.configurationService.getTenantName()||"Building Transparency EC3")}ngOnChanges(t){if(t.selectedMaterial&&(this.isSelectedMaterial=t.selectedMaterial.currentValue?.id===this.material.id),t.alternativeMaterials&&(this.isAlternativeMaterial=!!t.alternativeMaterials.currentValue?.find(n=>n.id===this.material.id),!this.isAlternativeMaterial&&this.bidders&&this.biddersControl.setValue([],{emitEvent:!1})),t.bidders){this.isAlternativeMaterial&&!this.material.bidderIndexes.length&&this.biddersControl.setValue([this.alternativeStateItem.index]);const n=t.bidders.currentValue;
1n&&(this.bidderOptions=[this.alternativeStateItem,...n.map((i,s)=>(i.index=this.increaseBidderIndex(s),i))],n.forEach((i,s)=>{i.bids[this.bidIndex].material&&i.bids[this.bidIndex].material.id===this.material.id&&this.material.bidderIndexes.includes(s)&&(this.setAlternativeOptionDisabledStatus(!0),this.biddersControl.setValue([...this.biddersControl.value,this.increaseBidderIndex(s)]))}))}t.onlyAlternativeMaterialsCanSelect&&(this.materialStateItems=t.onlyAlternativeMaterialsCanSelect.currentValue?this.baseMaterialStateItems.filter(n=>n.nextState!==Ve.selected):this.baseMaterialStateItems)}updateAlternativeOptionStatus(t,n){this.setAlternativeOptionDisabledStatus(!(!t.length||n))}setAlternativeOptionDisabledStatus(t){this.bidderOptions=this.bidderOptions.map(n=>n.index===Ve.alternative?{...n,disabled:t}:n)}hasColumn(t){return this.columnsToShow.some(n=>n.name===t)}getAlsoShownInTooltip(t){return t.isAlsoShownInMatched?`This material is also in category ${this.category.displayName}`:null}getLabel(){return this.expanded?$localize`Close`:$localize`Details`}increaseBidderIndex(t){return t+1}decreaseBidderIndex(t){return t-1}static{this.\u0275fac=function(n){return new(n||a)(e.rXU(wt.J),e.rXU(fr))}}static{this.\u0275cmp=e.VBU({type:a,selectors:[["","cqd-material-row",""]],inputs:{material:"material",isMaterialWithConservative:"isMaterialWithConservative",category:"category",hasAddress:"hasAddress",bidIndex:"bidIndex",bidders:"bidders",enableAddToProject:"enableAddToProject",selectMaterialEnabled:"selectMaterialEnabled",onlyAlternativeMaterialsCanSelect:"onlyAlternativeMaterialsCanSelect",selectedMaterial:"selectedMaterial",alternativeMaterials:"alternativeMaterials",columnsToShow:"columnsToShow",materialState:"materialState",maxMaterialsCount:"maxMaterialsCount",showCompareCheckboxes:"showCompareCheckboxes",materialsToCompareIdsControl:"materialsToCompareIdsControl",expanded:"expanded",isSameDimensionality:"isSameDimensionality"},outputs:{markAsUnselected:"markAsUnselected",markAsSelected:"markAsSelected",markAsAlternative:"markAsAlternative",biddersChanged:"biddersChanged",addToProject:"addToProject"},features:[e.Vt3,e.OA$],attrs:Mr,decls:22,vars:26,consts:[["menu",""],["tvdTemplate",""],[4,"ngIf"],["tooltipPosition","top",3,"pTooltip"],[1,"text-center"],["pButton","","type","button",1,"button","button-details","button-small",3,"ngClass","label","pRowToggler"],["id","ms-p2-s7"],[3,"isProductTvd","epdId"],[3,"iconOnly","tooltip","clickEvent",4,"ngIf"],[1,"bidders-cell"],["bindLabel","name","bindValue","index",3,"formControl","options","clearable","multiple","disabled"],["class","star-icon","pButton","","type","button",3,"click",4,"ngIf"],["appendTo","body",3,"popup","model"],["pButton","","type","button",1,"star-icon",3,"click"],["src","assets/icons/filled-star.png","alt","Selected Material"],["src","assets/icons/half-filled-star.png","alt","Alternative Material"],["src","assets/icons/empty-star.png","alt","Unselected Material"],["tooltipPosition","top","tooltipStyleClass","desc-tooltip",3,"pTooltip","cqdHideTooltipIfTextFits"],["class","p-pr-dnone compare-chkbox","cqdPreventClick","",3,"value","formControl","cqdDisabled",4,"ngIf"],["cqdPreventClick","",1,"p-pr-dnone","compare-chkbox",3,"value","formControl","cqdDisabled"],[1,"tvd-wrapper"],["class","fa fa-check","tooltipPosition","top",3,"pTooltip",4,"ngIf","ngIfElse"],["tooltipPosition","top",1,"fa","fa-check",3,"pTooltip"],["tooltipPosition","top",1,"tvd-text",3,"pTooltip"],[3,"ngClass"],[3,"clickEvent","iconOnly","tooltip"]],template:function(n,i){1&n&&(e.DNE(0,Ar,3,5,"ng-container",2),e.j41(1,"td",3),e.DNE(2,Or,6,5,"ng-container",2)(3,vr,2,1,"span",2),e.k0s(),e.DNE(4,Ir,4,3,"ng-container",2)(5,wr,4,3,"ng-container",2)(6,Dr,4,4,"ng-container",2)(7,Fr,3,3,"ng-container",2)(8,Gr,4,3,"ng-container",2)(9,Lr,4,3,"ng-container",2)(10,Nr,4,3,"ng-container",2)(11,Br,3,1,"ng-container",2)(12,$r,4,3,"ng-container",2)(13,jr,4,3,"ng-container",2)(14,Hr,6,2,"ng-container",2)(15,Vr,4,4,"ng-container",2)(16,Xr,3,1,"ng-container",2),e.j41(17,"td",4),e.nrm(18,"button",5),e.j41(19,"span",6),e.nrm(20,"cqd-open-epd-button",7),e.k0s(),e.DNE(21,Yr,1,2,"cqd-add-epd-to-project-button",8),e.k0s()),2&n&&(e.Y8G("ngIf",i.bidders),e.R7$(),e.Y8G("pTooltip",i.getAlsoShownInTooltip(i.material)),e.R7$(),e.Y8G("ngIf",i.selectMaterialEnabled&&!i.bidders&&i.isMaterialWithConservative),e.R7$(),e.Y8G("ngIf",i.material.category),e.R7$(),e.Y8G("ngIf",i.hasColumn("orgName")),e.R7$(),e.Y8G("ngIf",i.hasColumn("plantOrGroupName")),e.R7$(),e.Y8G("ngIf",i.hasColumn("name")),e.R7$(),e.Y8G("ngIf",i.hasColumn("description")),e.R7$(),e.Y8G("ngIf",i.hasColumn("concreteCompressiveStrength28d")),e.R7$(),e.Y8G("ngIf",i.hasColumn("concreteFlexionStrength")),e.R7$(),e.Y8G("ngIf",i.hasColumn("yarnWeight")),e.R7$(),e.Y8G("ngIf",i.hasColumn("yarnType")),e.R7$(),e.Y8G("ngIf",i.hasColumn("thickness")),e.R7$(),e.Y8G("ngIf",i.hasAddress&&i.hasColumn("plantDistance")),e.R7$(),e.Y8G("ngIf",i.hasColumn("tvd")),e.R7$(),e.Y8G("ngIf",i.hasColumn("gwp")),e.R7$(),e.Y8G("ngIf",i.hasColumn("reportedGwp")),e.R7$(2),e.Y8G("ngClass",e.l_i(23,Er,i.expanded,!i.expanded))("label",i.getLabel())("pRowToggler",i.material),e.R7$(2),e.Y8G("isProductTvd",i.material.isProductTvd)("epdId",i.material.openXpdUui
1d||i.material.epdId),e.R7$(),e.Y8G("ngIf",i.enableAddToProject))},dependencies:[N.YU,N.bT,y.BC,y.l_,ye._f,be.m,Ue.FP,Cr.W1,gn.Sc,ct.w,tn.W,Tr.y,nt.T,un.d,Sn.O,N.Jj],styles:["[_nghost-%COMP%]{position:relative}[_nghost-%COMP%] td[_ngcontent-%COMP%]{justify-content:flex-start!important}[_nghost-%COMP%] td[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{padding:2px 5px}[_nghost-%COMP%] td[_ngcontent-%COMP%] span.highlighted[_ngcontent-%COMP%]{background-color:#28c36b66;border-radius:8px}.bidder-index[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:10px;font-weight:400}.star-icon[_ngcontent-%COMP%]{position:relative;padding:0}.star-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .star-icon[_ngcontent-%COMP%] cqd-avatar-logo[_ngcontent-%COMP%]{display:inherit;width:22px}.bidders-cell[_ngcontent-%COMP%]{overflow:visible!important}.bidders-cell[_ngcontent-%COMP%] cqd-select[_ngcontent-%COMP%]{margin:0}.bidders-cell[_ngcontent-%COMP%] cqd-select[_ngcontent-%COMP%] .ng-select-container{min-height:26px}.bidders-cell[_ngcontent-%COMP%] cqd-select[_ngcontent-%COMP%] .ng-select-container .ng-value-container{padding:2px 0}.bidders-cell[_ngcontent-%COMP%] cqd-select[_ngcontent-%COMP%] .ng-select-container .ng-input{padding:0}.bidders-cell[_ngcontent-%COMP%] cqd-select[_ngcontent-%COMP%] .ng-select-container .ng-input input{height:18px!important;font-size:.9em}.tvd-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.tvd-wrapper[_ngcontent-%COMP%] .tvd-text[_ngcontent-%COMP%]{color:#c94747}"],changeDetection:0})}}return a})();var Wr=o(25191),qr=o(49249),Kr=o(6768),Qr=o(95561),Jr=o(78699),Zr=o(45324);let el=(()=>{class a extends Zr.J{constructor(){super(),this.label=$localize`Compare`,this.iconUrl="assets/svg/compare.svg",this.buttonStyleClass="button button--tertiary button-small"}static{this.\u0275fac=function(n){return new(n||a)}}static{this.\u0275cmp=e.VBU({type:a,selectors:[["cqd-compare-button"]],inputs:{label:"label",iconUrl:"iconUrl",buttonStyleClass:"buttonStyleClass"},features:[e.Vt3],decls:2,vars:7,consts:[["pButton","","type","button","icon","icon",3,"click","ngClass","label","disabled","pTooltip","tooltipPosition","tooltipStyleClass"],["alt","",1,"icon",3,"src"]],template:function(n,i){1&n&&(e.j41(0,"button",0),e.bIt("click",function(){return i.onClick()}),e.nrm(1,"img",1),e.k0s()),2&n&&(e.Y8G("ngClass",i.buttonStyleClass)("label",i.label)("disabled",i.disabled)("pTooltip",i.tooltip)("tooltipPosition",i.tooltipPosition)("tooltipStyleClass",i.tooltipStyleClass),e.R7$(),e.Y8G("src",i.assetsUrl+i.iconUrl,e.B4B))},dependencies:[N.YU,ye._f,be.m],styles:[".button[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:22px}"],changeDetection:0})}}return a})();var tl=o(81397);function nl(a,l){if(1&a&&(e.j41(0,"p",8),e.EFF(1),e.k0s()),2&a){const t=e.XpG();e.R7$(),e.JRh(t.label)}}function il(a,l){if(1&a&&e.nrm(0,"cqd-budge-number",9),2&a){const t=e.XpG();e.Y8G("value",t.selectedItem.length)}}function al(a,l){if(1&a){const t=e.RV6();e.j41(0,"div",10),e.bIt("click",function(i){const s=e.eBV(t).$implicit,c=e.XpG();return e.Njj(c.selectItem(i,s))}),e.j41(1,"span",11),e.EFF(2),e.k0s()()}if(2&a){const t=l.$implicit,n=e.XpG();e.AVh("selected",n.isItemSelected(t)),e.Y8G("pTooltip",t[n.bindValue]),e.R7$(),e.Y8G("ngClass",t.styleClass),e.R7$(),e.SpI("",t[n.bindLabel]," ")}}let sl=(()=>{class a extends cn.x{constructor(){super(...arguments),this.label="",this.bindLabel="label",this.bindValue="value",this.beforeItemSelect=new e.bkB,this._selectedItem=[],this._comparisonFn=(t,n)=>(t[this.bindValue]||t)===n[this.bindValue],this.propagateChange=()=>{}}set options(t){JSON.stringify(t,this.stringifyReplacer)!==JSON.stringify(this._options,this.stringifyReplacer)&&(this._options=t)}get options(){return this._options}get selectedItem(){return this._selectedItem}writeValue(t){(0,q.I)(t)||(this._selectedItem=this.processSelectedItem(t),this.cdRef.markForCheck())}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}isItemSelected(t){return!!this.selectedItem?.find(n=>this._comparisonFn(n,t))}selectItem(t,n){t.stopImmediatePropagation();const i=this.selectedItem.findIndex(s=>this._comparisonFn(s,n));-1!==i?this.selectedItem.splice(i,1):this.selectedItem.push(n[this.bindValue]),this.prop
1agateChange(this.selectedItem),this.cdRef.detectChanges()}processSelectedItem(t){return[...t]}static{this.\u0275fac=(()=>{let t;return function(i){return(t||(t=e.xGo(a)))(i||a)}})()}static{this.\u0275cmp=e.VBU({type:a,selectors:[["cqd-filter-select"]],inputs:{stringifyReplacer:"stringifyReplacer",disabled:"disabled",label:"label",bindLabel:"bindLabel",bindValue:"bindValue",options:"options"},outputs:{beforeItemSelect:"beforeItemSelect"},features:[e.Jv_([{provide:y.kq,multi:!0,useExisting:(0,e.Rfq)(()=>a)}]),e.Vt3],decls:10,vars:5,consts:[["menu","matMenu"],[1,"filter-wrapper"],["class","filter-wrapper__label",4,"ngIf"],[1,"icon-wrapper",3,"matMenuTriggerFor"],[1,"icon"],[3,"value",4,"ngIf"],[1,"filter-select-menu",3,"xPosition"],["class","ng-option-label-wrapper","mat-menu-item","","tooltipPosition","top",3,"pTooltip","selected","click",4,"ngFor","ngForOf"],[1,"filter-wrapper__label"],[3,"value"],["mat-menu-item","","tooltipPosition","top",1,"ng-option-label-wrapper",3,"click","pTooltip"],[1,"ng-option-label","text-ellipsis",3,"ngClass"]],template:function(n,i){if(1&n&&(e.j41(0,"div",1),e.DNE(1,nl,2,1,"p",2),e.j41(2,"div",3)(3,"mat-icon",4),e.EFF(4,"filter_list"),e.k0s(),e.DNE(5,il,1,1,"cqd-budge-number",5),e.k0s()(),e.j41(6,"mat-menu",6,0)(8,"div"),e.DNE(9,al,3,5,"div",7),e.k0s()()),2&n){const s=e.sdS(7);e.R7$(),e.Y8G("ngIf",i.label),e.R7$(),e.Y8G("matMenuTriggerFor",s),e.R7$(3),e.Y8G("ngIf",null==i.selectedItem?null:i.selectedItem.length),e.R7$(),e.Y8G("xPosition","before"),e.R7$(3),e.Y8G("ngForOf",i.options)}},dependencies:[N.YU,N.Sq,N.bT,be.m,xt.An,it.kk,it.fb,it.Cp,tl._],styles:[".filter-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px}.filter-wrapper__label[_ngcontent-%COMP%]{margin:0}.filter-wrapper[_ngcontent-%COMP%] .icon-wrapper[_ngcontent-%COMP%]{position:relative;cursor:pointer}.filter-wrapper[_ngcontent-%COMP%] .icon-wrapper[_ngcontent-%COMP%] .budge-wrapper{background:#3b9cb6;top:-5px;left:10px;width:16px;height:16px} .filter-select-menu{max-width:200px;padding:5px;border:1px solid #979ea8;background:#fff;margin-top:-1px;border-radius:0!important;box-shadow:0 2px 5px #6c758314,0 10px 18px #b2b9c51f,0 1px #dcdee0,0 1px #d4d5d6!important} .filter-select-menu .ng-option-label-wrapper{border-radius:1px;background:#fff;transition:background .3s ease-in-out;padding:5px 10px} .filter-select-menu .mat-mdc-menu-item-text{width:100%} .filter-select-menu .ng-option-label{font:14px/1.29 Open Sans,Helvetica,Arial,sans-serif!important;letter-spacing:-.16px;display:block;color:#000} .filter-select-menu .selected{padding-right:25px;background:#fff url(/assets/svg/selecred-menu-item.svg) right 10px center no-repeat!important} .filter-select-menu .selected .ng-option-label{color:#3b7d66!important}"],changeDetection:0})}}return a})();var ol=o(27468),rl=o(66338),ll=o(38702),cl=o(94779),dl=o(43697);function pl(a,l){if(1&a){const t=e.RV6();e.j41(0,"div")(1,"cqd-select",3),e.nI1(2,"async"),e.bIt("changeEvent",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.setSelectedItems(i))})("typeahead",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.requestNewOptions(i))})("openEvent",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onOpen(i))}),e.k0s()()}if(2&a){const t=e.XpG(),n=e.sdS(2),i=e.sdS(4);e.R7$(),e.HbH(t.selectStyleClass),e.Y8G("appendTo",t.appendTo)("bindValue",null)("control",t.validationControl)("pTooltip",t.tooltip)("inputId",t.inputId)("label",t.label)("clearSearchOnAdd",!1)("multiple",!0)("maxSelectedItems",t.maxSelectedItems)("loading",t.isLoadingSignal())("selectedItem",t.selectedItems)("options",e.bMT(2,17,t.source$))("disabled",t.disabled)("customOptionTemplate",n)("customMultiLabelTemplate",i
1)}}function _l(a,l){if(1&a&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&a){const t=l.item;e.R7$(),e.JRh(t.getFormattedName())}}function hl(a,l){if(1&a){const t=e.RV6();e.j41(0,"div",5)(1,"span",6),e.EFF(2),e.k0s(),e.j41(3,"span",7),e.bIt("click",function(){const i=e.eBV(t).$implicit,s=e.XpG().clear;return e.Njj(s(i))}),e.EFF(4,"\xd7"),e.k0s()()}if(2&a){const t=l.$implicit;e.R7$(),e.Y8G("pTooltip",t.getFormattedName())("cqdHideTooltipIfTextFits",t.getFormattedName()),e.R7$(),e.JRh(t.getFormattedName())}}function gl(a,l){1&a&&e.DNE(0,hl,5,3,"div",4),2&a&&e.Y8G("ngForOf",l.items)}let ml=(()=>{class a extends rl.L{constructor(t,n,i,s){super(),this.plantOrGroupService=t,this.plantService=n,this.plantGroupService=i,this.injector=s,this.clearable=!0,this.queryParams={},this.queryMinLength=1,this.propagateChange=()=>{}}ngAfterViewInit(){const t=this.injector.get(y.vO,null);t&&(this.form=t.control,this.cdRef.detectChanges())}onOpen(t){super.onOpen(t),this._selectComponent=t}setSelectedItems(t){if(this.isReasonableChoiceFilter){const n=t.findIndex(i=>i.name===this.moreLink);n>-1?(t.splice(n,1),this.selectedItems=[...t],this.moreItemSelected=!0,this.requestNewOptions(this.prevSearchTerm)):(this.selectedItems=[...t],this.propagateChange(t))}else this.selectedItems=[...t],this.propagateChange(t)}writeValue(t){this.selectedItems=t,this.cdRef.markForCheck()}registerOnChange(t){this.propagateChange=t}registerOnTouched(t){}createForm(){return new y.MJ([])}getSource(t){this.isLoadingSignal.set(!0),this.prevSearchTerm=null;let i,n={...this.queryParams,q:t,pageSize:100};return this.isReasonableChoiceFilter&&!this.moreItemSelected&&(this.prevSearchTerm=t,n={...n,...this.reasonableChoiceFilter}),i=this.ownedById?[this.plantOrGroupService.getOrganizationPlantsOrGroups(this.ownedById,n)]:[this.plantService.getPlants(n),this.plantGroupService.getPlantGroups(n)],(0,ol.p)(i).pipe((0,m.T)(s=>{let c;return c=this.ownedById?[...s[0].items]:[...s[0].items.map(_=>new dt.v_({..._,type:dt.vE.plant})),...s[1].items.map(_=>new dt.v_({..._,type:dt.vE.plantGroup}))],this.isReasonableChoiceFilter&&!this.moreItemSelected&&(c=[...c,new dt.v_({name:this.moreLink})]),c}),(0,Me.j)(()=>this.isLoadingSignal.set(!1)))}static{this.\u0275fac=function(n){return new(n||a)(e.rXU(ll.B),e.rXU(cl.h),e.rXU(dl.i),e.rXU(e.zZn))}}static{this.\u0275cmp=e.VBU({type:a,selectors:[["cqd-plant-or-group-multiple-autocomplete"]],inputs:{label:"label",inputId:"inputId",tooltip:"tooltip",appendTo:"appendTo",clearable:"clearable",selectStyleClass:"selectStyleClass",validationControl:"validationControl",maxSelectedItems:"maxSelectedItems",queryParams:"queryParams",queryMinLength:"queryMinLength",ownedById:"ownedById"},features:[e.Jv_([{provide:y.kq,multi:!0,useExisting:(0,e.Rfq)(()=>a)}]),e.Vt3],decls:5,vars:1,consts:[["customOptionTemplate",""],["customMultiLabelTemplate",""],[4,"ngIf"],["bindLabel","name",3,"changeEvent","typeahead","openEvent","appendTo","bindValue","control","pTooltip","inputId","label","clearSearchOnAdd","multiple","maxSelectedItems","loading","selectedItem","options","disabled","customOptionTemplate","customMultiLabelTemplate"],["class","ng-value custom-multi-label",4,"ngFor","ngForOf"],[1,"ng-value","custom-multi-label"],["tooltipPosition","top","tooltipStyleClass","desc-tooltip",1,"ng-value-label",3,"pTooltip","cqdHideTooltipIfTextFits"],["aria-hidden","true",1,"ng-value-icon","right",3,"click"]],template:function(n,i){1&n&&e.DNE(0,pl,3,19,"div",2)(1,_l,2,1,"ng-template",null,0,e.C5r)(3,gl,1,1,"ng-template",null,1,e.C5r),2&n&&e.Y8G("ngIf",i.form)},dependencies:[N.Sq,N.bT,be.m,ct.w,nt.T,N.Jj],styles:["[_nghost-%COMP%] .ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap!important}[_nghost-%COMP%] .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{display:inline-flex}[_nghost-%COMP%] .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-label{max-width:150px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}"],changeDetection:0})}}return a})(),ul=(()=>{class a{static{this.\u0275fac=function(n){return new(n||a)}}static{this.\u0275mod=e.$C({type:a})}static{this.\u0275inj=e.G2t({providers:[{provide:dr.x8,useValue:{displayDefaultIndicatorType:!1}},{provide:Kr.x,useExisting:Qr.X}],imports:[Do.G,xo,pr.m,Wr.Z,qr.u,Sn.O,Jt.M,A.$]})}}return a})();e.wjB(Zt,[N.YU,N.Sq,N.bT,y.BC,y.cb,y.l_,y.j4,y.JD,ye._f,Ae.Y9,Ae.
1Ei,be.m,Ue.XI,Ue.Tg,Ue.d5,Ue.O8,Ue.yc,ke.Z,ct.w,nt.T,ln.S,Jr.L,el,Et.No,Lt.v,sl,ml,Jt.M,cr,jt,ur,zr],[N.Jj]),e.wjB(Fo._,[rt.y,mn],[])},72109(Ge,_e,o){o.d(_e,{m:()=>te});var r=o(63905),e=o(73805),y=o(34038),z=o(54438);let te=(()=>{class V{static{this.\u0275fac=function(B){return new(B||V)}}static{this.\u0275mod=z.$C({type:V})}static{this.\u0275inj=z.G2t({imports:[r.G,e.PlantsModule,y.PlantGroupsModule,e.PlantsModule,y.PlantGroupsModule]})}}return V})()},38702(Ge,_e,o){o.d(_e,{B:()=>B});var r=o(48726),e=o(62471),y=o(50817),z=o(96354),te=o(22342),V=o(54438);let W=(()=>{class b extends r.v{getOrganizationPlantsOrGroups(L,f){let ne;f&&(ne={page_number:f.page||1,page_size:f.pageSize||25,sort_by:f.sortBy,q:f.q,with_errors:f.withErrors,with_warnings:f.withWarnings});const S=new e._g(this.apiBaseUrl).withMethod("GET").withParams(ne).withUrl(`/orgs/${L}/plant_or_groups`).observe("response");return this.performRequest(S).pipe((0,z.T)(T=>({items:T.body.map(E=>new te.v_(E)),pageSize:+T.headers.get(y.b.pageSize),totalCount:+T.headers.get(y.b.totalCount),totalPages:+T.headers.get(y.b.totalPages)})))}static{this.\u0275fac=(()=>{let L;return function(ne){return(L||(L=V.xGo(b)))(ne||b)}})()}static{this.\u0275prov=V.jDH({token:b,factory:b.\u0275fac,providedIn:"root"})}}return b})();var Q=o(62704);let B=(()=>{class b{constructor(L,f){this.qaService=L,this.plantOrGroupApiService=f}getOrganizationPlantsOrGroups(L,f){return this.plantOrGroupApiService.getOrganizationPlantsOrGroups(L,{sortBy:"+name",...f}).pipe((0,z.T)(S=>({...S,items:S.items.map(T=>(this.qaService.addQaStatusesToModel(T,!1),T))})))}static{this.\u0275fac=function(f){return new(f||b)(V.KVO(Q.Q),V.KVO(W))}}static{this.\u0275prov=V.jDH({token:b,factory:b.\u0275fac,providedIn:"root"})}}return b})()},65444(Ge,_e,o){o.d(_e,{$:()=>vt});var r=o(54438),e=o(81446),y=o(7673),z=o(96354),te=o(96885),V=o(25025),W=o(57682),Q=o(89432),B=o(67542),b=o(21865),j=o(70384);let L=(()=>{class G{constructor(g,p,I,U){this.statisticsService=g,this.epdService=p,this.industryEpdService=I,this.genericEstimateService=U}statisticsBaseToBoxPlotData(g,{target:p,materialGwpData:I,categoryName:U,referenceGwpSource:X,referenceLine:Y,referenceSet:ce,customReferenceGwp:he,customTargetGwp:xe,options:A}){const w=g.processedDeclaredUnit?(0,V.Dq)(g.processedDeclaredUnit.convertedUnit):I?I.declaredUnit:g.unit,D=this.statisticsService.convertStatisticsToUnit(g,w),se=Y?.referenceSet?.groupName||ce?.groupName,Se=new te.e({id:D.id,collectionName:D.collectionName,declaredUnit:w.format(),maxGwp:this.gwpToKgCO2(D.maxGwp),pct80Gwp:this.gwpToKgCO2(D.conservativeEstimate),meanGwp:this.gwpToKgCO2(D.average),pct20Gwp:this.gwpToKgCO2(D.bestPractice),minGwp:this.gwpToKgCO2(D.minGwp),collection:{minGwp:this.gwpToKgCO2(D.minGwp),maxGwp:this.gwpToKgCO2(D.maxGwp),meanGwp:this.gwpToKgCO2(D.average),pct20Gwp:this.gwpToKgCO2(D.bestPractice),pct80Gwp:this.gwpToKgCO2(D.conservativeEstimate)},target:{value:this.gwpToKgCO2(j.S.getTargetGwp(D,p,X,Y,ce,he,xe)),method:p?.method},baselineGwp:this.gwpToKgCO2(j.S.getGwpBaseline(D,X,Y,he,ce)),baselineRefLink:Object.values(g.baselines).find(le=>le.referenceSet.name===se)?.referenceLink||"",baselineName:j.S.getBaselineName(X,g.baselines,se),categoryName:U,material:null});if(I?.gwp&&I.declaredUnit.getBaseUnit().equalBase(w.getBaseUnit())){const le=I.gwp.per(I.declaredUnit,w).toString(),De=I.gwpZ&&(I.gwpZ.getOriginalValue()>=1?I.gwpZ.getValueAsRatio():I.gwpZ.getOriginalValue())||0;let ie=this.epdService.calculateStats({gwp:le,gwpZ:De});return A.isIndustryEpd&&(ie=this.industryEpdService.calculateStats({gwp:le,gwpZ:De})),A.isGenericEstimate&&(ie=this.genericEstimateService.calculateStats({gwp:le,gwpZ:De})),ie.pipe((0,z.T)(J=>({...Se,material:{meanGwp:this.gwpToKgCO2(J.average),gwpZ:J.gwpZ.getValueAsRatio(),pct20Gwp:this.gwpToKgCO2(J.bestPractice),pct80Gwp:this.gwpToKgCO2(J.conservativeEstimate),uncertaintyAdjustedGwp:this.gwpToKgCO2(J.uncertaintyAdjustedGwp)}})))}return(0,y.of)(Se)}gwpToKgCO2(g){return g&&g?g.toNumber("kgCO2e"):null}static{this.\u0275fac=function(p){return new(p||G)(r.KVO(W.r),r.KVO(Q.t),r.KVO(B.h),r.KVO(b.J))}}static{this.\u0275prov=r.jDH({token:G,factory:G.\u0275fac,providedIn:"root"})}}return G})();var f=o(34003),ne=o(17001),S=o(31527),T=o(45312);const E={name:"Boxplot Diagram - Selected Material",id:"boxplotSelectedMaterial",version:1,isExtraTour:!0,steps:[{intro:T.c.assetsUrl+"assets/images/tour/Boxplot_Diagram_Tour_Selected_Material.png"}]}
1,k={name:$localize`:boxplot-common-diagram|:About this Boxplot Diagram`,id:"boxplotCommon",version:1,isExtraTour:!0,steps:[{intro:T.c.assetsUrl+"assets/images/tour/Boxplot_Diagram_Tour_Common.png"}]};var re=o(83870),we=o(34692),Ke=o(56977),Ye=o(96697),ve=o(25558),ge=o(31153),st=(o(79065),o(84412)),C=o(843),P=o(35284),h=o(4147),F=o(349),m=o(63905),me=o(88701),u=o(50505),Le=o(46421),ht=o(86292),Me=o(43236),ze=(o(58500),function(G){return G[G.Box=0]="Box",G[G.RectLine=1]="RectLine",G}(ze||{})),Qe=function(G){return G.material="material",G.product="product",G}(Qe||{});let gt=(()=>{class G{static openBaselineLink(g){g&&window.open(g,"_blank")}constructor(g){this.sessionService=g,this.heightChart=370,this.widthChart=350,this.labelPrefix=!1,this.labelPrefixStr={max:"Max",p80:"Conservative",p20:"Achievable",min:"Min"},this.barMin=30,this.barMax=45,this.margin={top:20,right:10,bottom:30,left:30},this.colors={green:"#209ED9",blue:"#008fdd",titleRed:"#cb181d",grey:"#404040",lightBlue:"#00e0dc",lightGreen:"#008fdd",gold:"#EBAC2A",lightGrey:"#F8F8F8",purple:"#3f007d",opacityPurple:"rgba(63, 0, 125, .7)"},this.id=(0,Le.A)().split("-")[4],this.myClass=this.id,this.chartBoxPlotId=`chartBoxPlot-${this.id}`}static formatSignificant(g){return u.GPZ(".4r")(g)}onResize(){this.resizeBoxPlot()}tooltipWrap(g,p,I,U){let X;const Y="tooltip_text"+I;g.each(function(){X=1;const ce=u.Ltv(this),he=ce.text().split(/\s+/).reverse(),A=ce.attr("y"),w=ce.attr("x"),D=parseFloat(ce.attr("dy"));let se,Se=[],le=ce.text(null).append("tspan").attr("class",Y).attr("x",w).attr("y",A).attr("dy","10px");for(;se=he.pop();)Se.push(se),le.text(Se.join(" ")),le.node().getComputedTextLength()>p&&(Se.pop(),le.text(Se.join(" ")),Se=[se],le=ce.append("tspan").attr("class",Y).attr("x",w).attr("y",A).attr("dy",10*++X+D+"px").text(se));const De=10*X+10;u.Ltv(".tooltip_rect"+I).attr("height",De);const ie=document.getElementById("tooltip_rect"+I);if(null!==ie){const{width:J,height:Ne}=ie.getBBox(),Je=u.Ltv("#tooltip_rect"+I).attr("transform");let[Be,$e]=Je.replace(/.*\(([\d.]+,\s?[\d.]+)\)/,"$1").split(",").map(Ze=>+Ze);Be+J>U.totalWidth-5&&(Be=U.totalWidth-J/2-5),$e+Ne>U.totalHeight-10&&($e=U.totalHeight-Ne-10),$e<0&&($e=15),Be+J/2<0&&(Be=J/2),u.Ubm(".tooltip_item"+I).attr("transform",`translate(${Be},${$e})`)}})}ngOnChanges(g){Me.E.schedule(()=>{g.data?.currentValue&&(this.svg||this.createChart(),this.updateChart())})}resizeBoxPlot(){this.setDimensions(),u.Ltv(`#${this.chartBoxPlotId}`).style("width",`${this.totalWidth}px`).style("height",`${this.totalHeight}px`),u.Ltv(".box_svg"+this.myClass).attr("width",this.totalWidth).attr("height",this.totalHeight),this.data&&this.updateChart()}setDimensions(){this.totalWidth=this.widthChart>this.componentWrapper.clientWidth?this.componentWrapper.clientWidth:this.widthChart,this.totalHeight=this.heightChart,this.width=this.totalWidth-this.margin.left-this.margin.right,this.height=this.totalHeight-this.margin.top-this.margin.bottom}createChart(){this.svg=u.Ltv(`#${this.chartBoxPlotId}`).append("svg").attr("class","box_svg"+this.myClass).attr("width",this.totalWidth).attr("height",this.totalHeight),this.svg.append("rect").attr("width","100%").attr("height","100%").attr("fill","white"),this.vis=this.svg.append("g").attr("class","boxplot_svg_"+this.myClass),this.vis.append("rect").attr("class","single_element background_rect"+this.myClass),this.vis.append("g").attr("class","single_element y_axis y_axis"+this.myClass),this.vis.append("g").attr("class","single_element x_axis x_axis"+this.myClass),this.vis.append("text").attr("class","single_element box_title y_axis_label"+this.myClass),this.vis.append("line").attr("class","single_element axis_line"+this.myClass),this.vis.append("text").attr("class","single_element top_max"+this.myClass),this.vis.append("text").attr("class","single_element bottom_min"+this.myClass),this.svg.append("line").attr("class","clf_baseline"+this.myClass+" baseline_item"+this.myClass),this.svg.append("text").attr("class","clf_baseline_text"+this.myClass+" baseline_item"+this.myClass),this.svg.append("line").attr("stroke","transparent").attr("stroke-width","8px").attr("class","clf_baseline_mouseover"+this.myClass+" baseline_item"+this.myClass),this.svg.append("line").attr("stroke",this.colors.gold).attr("class","target_line"+this.myClass+" target_item"+this.myClass),this.svg.append("rect").style("fill","white").style("opacity",.6).attr("class","target_text_rect"+this.myClass+" target_item"+this.myClass).attr("width",10).attr("height",12),this.svg.append("text").attr("pointer-events","none").attr("fill",this.colors.gold).attr("dy","0.4em").attr("font-weight","bold").attr("class","target_text"+this.myClass+" target_item"+this.myClass).attr("text-anchor","middle").attr("font-size","1.2em").attr("visibility","hidden").text("T"),this.svg.append("g").attr("class","tooltip_group"+this.myClass)}
1resizing(){const U=((this.maxValue?this.maxValue:this.data?.maxGwp)+(this.minValue?this.minValue:this.data?.minGwp)).toString().split(".")[0].length;U>3&&(this.margin.left=7*U+7),this.setDimensions(),u.Ltv(`#${this.chartBoxPlotId}`).style("width",`${this.totalWidth}px`).style("height",`${this.totalHeight}px`),u.Ltv(".box_svg"+this.myClass).attr("width",this.totalWidth).attr("height",this.totalHeight),this.svg?.selectAll(`.clf_baseline${this.myClass},.boxplot_svg_${this.myClass},.clf_baseline_text${this.myClass},.clf_baseline_mouseover${this.myClass},.target_line${this.myClass}`).attr("transform","translate("+this.margin.left+","+this.margin.top+")"),this.svg?.select(`.target_text_rect${this.myClass}`).attr("transform","translate("+(this.margin.left-5)+","+(this.margin.top-6)+")"),this.svg?.select(`.target_text${this.myClass}`).attr("transform","translate("+this.margin.left+","+this.margin.top+")")}updateChart(){this.buildJSON(this.data),this.showSelectedMaterial||(this.boxPlotData=[this.boxPlotData[0]]),this.resizing(),this.createVisualization()}drawTooltips(g,p,I,U){g.append("rect").attr("class","tooltip_rect"+U+" tooltip_item"+U).attr("id","tooltip_rect"+U).attr("pointer-events","none").attr("visibility","hidden").attr("rx",5).attr("ry",5).attr("stroke-width","1px").attr("stroke","grey").attr("fill","white").attr("width",p).attr("height",0).attr("x",-p/2).attr("y",10),g.append("text").attr("pointer-events","none").attr("class","tooltip_text"+U+" tooltip_item"+U).attr("visibility","hidden").attr("dy",0).attr("x",0).attr("y",13).attr("text-anchor","middle").attr("font-size",I)}drawGradients(g,p,I){if(p===Qe.material){const U=g.append("linearGradient").attr("id","gradient-box-"+p).attr("x1","0%").attr("y1","0%").attr("x2","0%").attr("y2","100%");U.append("stop").attr("class","stop-top").attr("id","stop-top-"+p).attr("stop-color","#404040").attr("offset","0"),U.append("stop").attr("class","stop-center").attr("stop-color","#25B782").attr("id","stop-bottom-"+p).attr("offset","1")}else{g.append("marker").attr("id","arrow").attr("class","arrow_defs").attr("viewBox","-0 -5 10 10").attr("refX",0).attr("refY",0).attr("orient","auto-start-reverse").attr("markerWidth",16).attr("markerHeight",16).attr("xoverflow","visible").append("svg:path").style("fill",I).attr("d","M 0,-5 L 10 ,0 L 0,5").append("path").attr("d","M0,0L10,10L1,5").attr("class","arrowHead");const X=g.append("linearGradient").attr("id","gradient-box-"+p).attr("x1","0%").attr("y1","0%").attr("x2","0%").attr("y2","100%");X.append("stop").attr("class","stop-top").attr("id","stop-top-"+p).attr("stop-color","rgb(71, 175, 184)").attr("stop-opacity",.15).attr("offset","0"),X.append("stop").attr("class","stop-top-1").attr("id","stop-top-1-"+p).attr("stop-color","rgb(71, 175, 184)").attr("stop-opacity",.15).attr("offset","0.04"),X.append("stop").attr("class","stop-center").attr("id","stop-center-"+p).attr("stop-color","rgb(71, 175, 184)").attr("stop-opacity",1).attr("offset","0.5"),X.append("stop").attr("class","stop-bottom-1").attr("stop-color","rgb(71, 175, 184)").attr("stop-opacity",.2).attr("id","stop-bottom-1-"+p).attr("offset","0.96"),X.append("stop").attr("class","stop-bottom").attr("stop-color","rgb(71, 175, 184)").attr("stop-opacity",.15).attr("id","stop-bottom-"+p).attr("offset","1")}}boxTypeFill(){return this.data?.material?this.colors.lightgrey:"transparent"}limitFill(g){return"max"===g||"p80"===g?this.colors.grey:u.KIW(this.colors.green).darker(2)}createVisualization(){const g=this,p=this.sessionService.getSecurityPrincipal();if(0===this.minValue&&0===this.maxValue?(u.Ubm(".single_element").style("display","none"),this.boxPlotData=[]):u.Ubm(".single_element").style("display","block"),this.boxPlotData.length){const Y=u.Ltv(".boxplot_svg_"+this.myClass);if(!Y.select("defs").size()){const d=Y.append("defs");this.drawGradients(d,Qe.material,this.colors.lightGreen),this.drawGradients(d,Qe.product,this.colors.lightGreen)}p.tooltipsAvailability()&&this.drawTooltips(u.Ltv(".tooltip_group"+this.myClass),this.width/2,"10px",this.myClass);const he=u.GPZ(",.3r"),xe=Array.from(new Set(this.boxPlotData.map(d=>d.chartName))),A=u.WH().domain(xe).range([0,this.width]),w=u.m4Y().domain([this.scaleMin,this.maxValue]).range([this.height,0]);let D=A.bandwidth()/4;D<this.barMin?D=this.barMin:D>this.barMax&&(D=this.barMax),!0===this.noMaxBar?u.Ltv(".top_max"+this.myClass).style("visibility","visible").attr("text-anchor","middle").attr("x",A.bandwidth()/2).attr("y",-5).text("(M
1ax: "+he(this.boxPlotData[0].originalMax)+")"):u.Ltv(".top_max"+this.myClass).text(""),!0===this.noMinBar?u.Ltv(".bottom_min"+this.myClass).style("visibility","visible").attr("x",A.bandwidth()/2).attr("y",this.totalHeight-25).attr("text-anchor","middle").text("(Min: "+he(this.boxPlotData[0].originalMin)+")"):u.Ltv(".bottom_min"+this.myClass).text("");const se=this.boxPlotData[0].baseline;this.showReferenceLine&&se?(this.maxValue<se&&(!0===this.noMaxBar?this.boxPlotData[0].originalMax<se?(this.boxPlotData[0].max=this.boxPlotData[0].originalMax,w.domain([this.scaleMin,1.05*this.boxPlotData[0].originalMax]),u.Ltv(".top_max"+this.myClass).text(""),this.noMaxBar=!1):(this.boxPlotData[0].max=1.05*se,w.domain([this.scaleMin,1.05*se])):w.domain([this.scaleMin,1.05*se])),u.Ltv(".clf_baseline"+this.myClass).attr("visibility","visible").attr("fill","none").attr("stroke",this.data.color||this.colors.opacityPurple).attr("x1",A.range()[0]).attr("x2",A.range()[1]).attr("y1",w(se)-.5).attr("y2",w(se)-.5),u.Ltv(".clf_baseline_mouseover"+this.myClass).attr("visibility","visible").attr("x1",A.range()[0]).attr("x2",A.range()[1]).attr("y1",w(se)-1).attr("y2",w(se)-1).attr("fill","none").on("mouseover",(d,Z)=>{u.Ltv(d.currentTarget).attr("cursor","pointer"),U(this.myClass,he(se)+" kgCO2e/ "+this.chartUnits+". Click to open page with more details.",d.offsetX,d.offsetY,this.width)}).on("mouseout",function(){u.Ltv(this).attr("cursor","default"),X(g.myClass)}).on("click",()=>{G.openBaselineLink(this.data.baselineRefLink)}),u.Ltv(".clf_baseline_text"+this.myClass).attr("visibility","visible").attr("pointer-events","none").attr("text-anchor","end").attr("x",A.range()[1]).attr("y",w(se)-.5).attr("font-size","0.75em").attr("dy",10).attr("fill",this.data.color||this.colors.opacityPurple).text(this.data.baselineName)):u.Ubm(".baseline_item"+this.myClass).attr("visibility","hidden");const Se=this.boxPlotData[0].target;this.showTarget&&Se&&(Se<this.maxValue+this.minValue||se&&Se<se&&this.maxValue<se)?(u.Ltv(".target_line"+this.myClass).attr("visibility","visible").attr("x1",A(A.domain()[0])-D/2-5+A.bandwidth()/2).attr("x2",A(A.domain()[0])+D/2+5+A.bandwidth()/2).attr("y1",w(Se)-.5).attr("y2",w(Se)-.5),u.Ltv(".target_text"+this.myClass).attr("visibility","visible").attr("x",A(A.domain()[0])+A.bandwidth()/2).attr("y",w(Se)-.5),u.Ltv(".target_text_rect"+this.myClass).attr("visibility","visible").attr("x",A(A.domain()[0])+A.bandwidth()/2).attr("y",w(Se)-.5).on("mouseover",(d,Z)=>{u.Ltv(d.currentTarget).attr("cursor","pointer"),U(this.myClass,"My Target: "+he(Se),d.offsetX,d.offsetY,this.width/3)}).on("mouseout",function(){u.Ltv(this).attr("cursor","default"),X(g.myClass)})):u.Ubm(".target_item"+this.myClass).attr("visibility","hidden"),Y.select(".y_axis"+this.myClass).call(u.V4s(w).tickSizeOuter(0).ticks(8)).call(d=>d.selectAll(".tick line").style("stroke-dasharray",Z=>0===Z?"0":"2,2").style("stroke",Z=>
10===Z?"#000":"#D0D0D0")),Y.selectAll(".y_axis"+this.myClass+" text").attr("dx",5),Y.selectAll(".y_axis"+this.myClass+" line").attr("x2",this.width),Y.select(".x_axis"+this.myClass).call(u.l78(A).tickSizeOuter(0).tickFormat(d=>d.toUpperCase())).attr("transform","translate(0,"+this.height+")");let le=A.bandwidth();le<67.5&&(le=67.5),Y.selectAll(".x_axis"+this.myClass+" .tick text").attr("x",0).attr("y",0).attr("dy",0).attr("transform","translate(0,4)").each(function(d,Z){let ee=le;"this search"===d.toLowerCase()&&(ee=A.bandwidth(),ee<48&&(ee=48)),g.tooltipWrap(u.Ltv(this),ee,"tooltip_tick"+Z,g)}),Y.select(".background_rect"+this.myClass).attr("width",this.width).attr("height",this.height).attr("fill",this.boxTypeFill),Y.select(".axis_line"+this.myClass).attr("x1",this.width/2).attr("x2",this.width/2).attr("y1",0).attr("y1",this.height).attr("fill","none").attr("stroke",this.boxTypeFill);const De=this.boxPlotData.filter(d=>d.chartType===ze.Box);this.showSelectedMaterial&&!De[0].id&&(De[0].id="show_materials");let ie=Y.selectAll(".box_group"+this.myClass).data(De,d=>d.id+this.maxValue);ie.exit().remove();const J=ie.enter().append("g").attr("class","box_group"+this.myClass);J.append("line").attr("class","box_line_top box_line_top"+this.myClass),J.append("line").attr("class","box_line_bottom box_line_bottom"+this.myClass),J.append("rect").attr("class","box"+this.myClass),J.append("rect").attr("class","box_tooltip"+this.myClass),J.append("rect").attr("class","limits_rect_min"+this.myClass),J.append("rect").attr("class","limits_rect_max"+this.myClass),J.append("text").attr("class","limits_label_min"+this.myClass),J.append("text").attr("class","limits_label_max"+this.myClass),J.append("text").attr("class","limits_label_p20"+this.myClass),J.append("text").attr("class","limits_label_p80"+this.myClass),J.append("text").attr("class","limits_text_p20"+this.myClass),J.append("text").attr("class","limits_text_p80"+this.myClass),J.append("text").attr("class","limits_text_min"+this.myClass),J.append("text").attr("class","limits_text_max"+this.myClass),ie=ie.merge(J),ie.select(".box_line_top"+this.myClass).attr("fill","none").attr("x1",d=>A(d.chartName)+A.bandwidth()/2).attr("x2",d=>A(d.chartName)+A.bandwidth()/2).attr("y1",d=>w(this.noMaxBar||this.noMinBar?d.p20:d.mean)).attr("y2",d=>w(d.max)).style("stroke",d=>I(d.min,d.max,this.colors.grey,"none")),ie.select(".box_line_bottom"+this.myClass).attr("fill","none").attr("x1",d=>A(d.chartName)+A.bandwidth()/2).attr("x2",d=>A(d.chartName)+A.bandwidth()/2).attr("y1",d=>w(d.min)).attr("y2",d=>w(this.noMaxBar||this.noMinBar?d.p80:d.mean)).style("stroke",d=>I(d.min,d.max,this.colors.green,"none")),ie.select(".limits_rect_min"+this.myClass).attr("visibility",!0===this.noMinBar||this.isIndustryEpd?"hidden":"visible").attr("x",d=>A(d.chartName)+A.bandwidth()/2-D/4).attr("y",function(d){return w(d.min)}).attr("width",D/2).attr("height",1).attr("fill",d=>I(d.min,d.max,this.limitFill("min"),"none")),ie.select(".limits_rect_max"+this.myClass).attr("visibility",!0===this.noMaxBar||this.isIndustryEpd?"hidden":"visible").attr("x",d=>A(d.chartName)+A.bandwidth()/2-D/4).attr("y",function(d){return w(d.max)}).attr("width",D/2).attr("height",1).attr("fill",d=>I(d.min,d.max,this.limitFill("max"),"none"));const Ne=(d,Z)=>{d.attr("id",`${this.myClass}--${(0,Le.A)().split("-")[4]}`).on("mouseover",(ee,ft)=>{u.Ltv(ee.currentTarget).attr("cursor","pointer");const[It]=ee.currentTarget.id.split("--");U(It,Z,ee.offsetX,ee.offsetY,this.width/2)}).on("mouseout",function(){u.Ltv(this).attr("cursor","default"),u.Ltv(this).attr("cursor","default"),X(g.id.split("--")[0])})},Je=d=>{Ne(d,"Max of all EPDs, based on EC3 80% confidence estimates of each EPD")},Be=d=>{Ne(d,"Min of all EPDs, based on EC3 80% confidence estimates of each EPD")},$e=d=>{Ne(d,"80% of EPDs are below this Conservative Estimate, based on EC3 80% confidence estimates of each EPD")},Ze=d=>{Ne(d,"20% of EPDs are below this Achievable Target, based on EC3 80% confidence estimates of each EPD")};ie.select(".limits_label_min"+this.myClass).attr("visibility",!0===this.noMinBar||this.isIndustryEpd?"hidden":"visible").attr("x",d=>A(d.chartName)+A.bandwidth()/2-D/2-5).attr("y",d=>w(d.min)+12).attr("text-anchor","end").attr("font-size","0.9em").attr("font-style","
1italic").attr("fill",this.limitFill("min")).text(d=>!0===this.labelPrefix?I(d.min,d.max,this.labelPrefixStr.min,""):"").call(Be),ie.select(".limits_label_max"+this.myClass).attr("visibility",!0===this.noMaxBar||this.isIndustryEpd?"hidden":"visible").attr("x",d=>A(d.chartName)+A.bandwidth()/2-D/2-5).attr("y",d=>w(d.max)-4).attr("text-anchor","end").attr("font-size","0.9em").attr("font-style","italic").attr("fill",this.limitFill("max")).text(d=>!0===this.labelPrefix?I(d.min,d.max,this.labelPrefixStr.max,""):"").call(Je),ie.select(".limits_label_p20"+this.myClass).attr("x",d=>A(d.chartName)+A.bandwidth()/2-D/2-5).attr("y",d=>w(d.p20)+2).attr("text-anchor","end").attr("font-size","0.9em").attr("font-style","italic").attr("fill",this.limitFill("p20")).text(!0===this.labelPrefix?this.labelPrefixStr.p20:"").call(Ze),ie.select(".limits_label_p80"+this.myClass).attr("x",d=>A(d.chartName)+A.bandwidth()/2-D/2-5).attr("y",d=>w(d.p80)+5).attr("text-anchor","end").attr("font-size","0.9em").attr("font-style","italic").attr("fill",this.limitFill("p80")).text(!0===this.labelPrefix?this.labelPrefixStr.p80:"").call($e),ie.select(".limits_text_min"+this.myClass).attr("visibility",d=>!0===this.noMinBar||this.isIndustryEpd||d.min===d.p20?"hidden":"visible").attr("font-size","0.9em").attr("font-style","italic").attr("x",d=>A(d.chartName)+A.bandwidth()/2+D/2+5).attr("y",d=>w(d.min)+12).attr("text-anchor","start").attr("fill",this.limitFill("min")).text(d=>I(d.min,d.max,G.formatSignificant(d.min),"")).call(Be),ie.select(".limits_text_max"+this.myClass).attr("visibility",d=>!0===this.noMaxBar||this.isIndustryEpd||d.max===d.p80?"hidden":"visible").attr("font-size","0.9em").attr("font-style","italic").attr("x",d=>A(d.chartName)+A.bandwidth()/2+D/2+5).attr("y",d=>w(d.max)-4).attr("text-anchor","start").attr("fill",this.limitFill("max")).text(d=>I(d.min,d.max,G.formatSignificant(d.max),"")).call(Je),ie.select(".limits_text_p20"+this.myClass).attr("font-size","0.9em").attr("font-style","italic").attr("x",d=>A(d.chartName)+A.bandwidth()/2+D/2+5).attr("y",d=>w(d.p20)+2).attr("text-anchor","start").attr("fill",this.limitFill("p20")).text(d=>G.formatSignificant(d.p20)).call(Ze),ie.select(".limits_text_p80"+this.myClass).attr("font-size","0.9em").attr("font-style","italic").attr("x",d=>A(d.chartName)+A.bandwidth()/2+D/2+5).attr("y",d=>w(d.p80)+5).attr("text-anchor","start").attr("fill",this.limitFill("p80")).text(d=>!0===d.midValsEqual?"":G.formatSignificant(d.p80)).call($e);const Te={},fe=["min","max","p20","p80"];for(let d=0;d<4;d++)u.Ubm(".limits_label_"+fe[d]+this.myClass).each(function(){Te[fe[d]]=+u.Ltv(this).attr("y")});if(Te.min-Te.p20<12){const d=12-(Te.min-Te.p20);u.Ubm(".limits_label_min"+this.myClass).attr("y",Te.min+d),u.Ubm(".limits_text_min"+this.myClass).attr("y",Te.min+d)}if(Te.p80-Te.max<12){const d=12-(Te.p80-Te.max);u.Ubm(".limits_label_max"+this.myClass).attr("y",Te.max-d),u.Ubm(".limits_text_max"+this.myClass).attr("y",Te.max-d)}ie.select(".box"+this.myClass).attr("x",d=>A(d.chartName)+A.bandwidth()/2-D/2).attr("y",d=>w(d.p80)).attr("width",D).attr("height",d=>!0===d.midValsEqual?3:Math.abs(w(d.p80)-w(d.p20))).style("fill",ht.L.normalizeId("url(#gradient-box-material)"));const mt=d=>{const Z=G.formatSignificant;return`Uncertainty Adjusted GWP = ${Z(d.uncertaintyAdjustedGwp)}kgCO2e/${d.declaredUnit} (blue line),\n based on the reported GWP of ${Z(d.gwp)}kgCO2e/${d.declaredUnit} (black line) and\n estimated relative standard deviation of ${Z(d.gwpZ)}. When comparing EPDs, keep in mind\n that EPDs with overlapping uncertainty bars (fuzzy blue) might be equal or even\n reversed in terms of true GWP impact. Use uncertainty-adjusted GWP when comparing\n EPDs with differing specificity or data sources.`};ie.select(".box_tooltip"+this.myClass).attr("id",this.myClass).attr("x",d=>A(d.chartName)+A.bandwidth()/2-D/2).attr("y",d=>w(d.p80)).attr("width",D).attr("height",d=>w(d.p20)-w(d.p80)).attr("fill","transparent").on("mouseover",d=>{U(d.currentTarget.id,"EC typical range of 60% of known products in this category.",d.offsetX,d.offsetY,this.width/2)}).on("mouseout",()=>{X(this.id)});const et=this.boxPlotData.filter(d=>d.chartType===ze.RectLine),ut=u.UMr().range([this.colors.lightBlue,this.colors.lightGreen]).domain(["line","rect"]);let St=[],Re=0;et.length>0&&(St=[et[0].data],Re=A(et[0].chartName));let Ee=Y.selectAll(".rect_line_group"+this.myClass).data(St);Ee.exit().remove();const We=Ee.enter().append("g").attr("class","rect_line_group"+this.myClass);We.append("rect").attr("class","material_rect"+this.myClass),We.append("rect").attr("class","material_rect_tooltip"+this.myClass),We.append("line").attr("class","material_line"+this.myClass),We.append("line").attr("class","material_line_tooltip"+this.myClass),We.append("line").attr("class","gwp_line"+this.myClass),Ee=Ee.merge(We),Ee.select(".material_rect"+this.myClass).attr("width",D).attr("x",Re+A.bandwidth()/2-D/2).attr("y",d=>w(d.rectTop)).attr("height",d=>w(0)-w(d.rectHeight)).attr("fill",ht.L.normalizeId("url(#gradient-box-product)")),Ee.select(".material_rect_tooltip"+this.myClass).attr("id",this.myClass).attr("width",D).attr("x",Re+A.bandwidth()/2-D/2).attr("y",d=>w(d.rectTop)).attr("height",d=>w(0)-w(d.rectHeight)).attr("fill","transparent").on("mouseover",(d,Z)=>{U(d.currentTarget.id,mt(Z),d.offsetX,d.offsetY,this.width/2)}).on("mouseout",()=>{X(this.id)}),Ee.select(".gwp_line"+this.myClass).attr("x1",Re+A.bandwidth()/2-D/2-5).attr("x2",Re+A.bandwidth()/2-D/2+D+5).attr("y1",d=>w(d.gwp)).attr("y2",d=>w(d.gwp)).attr("pointer-events","none").attr("stroke-width","0.5px").attr("stroke","black"),Ee.select(".material_line"+this.myClass).attr("x1",10).attr("x2",Re+A.bandwidth()/2+D/2).attr("y1",d=>w(d.p80)).attr("y2",d=>w(d.p80)).attr("fill","none").attr("stroke-width","0.5px").attr("stroke-dasharray","1,1").attr("marker-start","url(#arrow)").attr("stroke",ut("rect")),Ee.select(".material_line_tooltip"+this.myClass).attr("id",this.myClass).attr("x1",Re).attr("x2",Re+A.bandwidth()).attr("y1",d=>w(d.p80)).attr("y2",d=>w(d.p80)).attr("fill","none").attr("stroke-width","15px").attr("stroke","transparent").on("mouseover",(d,Z)=>{U(d.currentTarget.id,mt(Z),d.offsetX,d.offsetY,this.width/2)}).on("mouseout",()=>{X(this.id)})}function I(Y,ce,he,xe){return null===Y||null===ce?xe:he}function U(Y,ce,he,xe,A){p.tooltipsAvailability()&&(u.Ubm(".tooltip_item"+Y).attr("visibility","visible").attr("transform","translate("+he+","+xe+")"),u.Ltv(".tooltip_rect"+Y).attr("width",A).attr("x",-A/2),u.Ltv(".tooltip_text"+Y).html(ce).call(g.tooltipWra
1p,A-10,Y,g))}function X(Y){p.tooltipsAvailability()&&(u.Ubm("tspan.tooltip_text"+Y).remove(),u.Ubm(".tooltip_item"+Y).attr("visibility","hidden"))}}buildJSON(g){this.myClass=this.id,this.boxPlotData=[];const p=g;let I=!1;p.pct80Gwp-p.pct20Gwp==0&&(I=!0);let U=this.isSearchForm?this.isIndustryEpd?"Industry Average":"This Search":"Category";if(this.data&&!this.data.material&&(this.labelPrefix=!0,this.isIndustryEpd||(U="")),p.maxGwp===p.pct80Gwp&&(p.maxGwp=null),p.minGwp===p.pct20Gwp&&(p.minGwp=null),this.noMaxBar=!1,this.noMinBar=!1,this.minValue=null===p.minGwp?p.pct20Gwp:p.minGwp,null===p.maxGwp)this.maxValue=p.pct80Gwp;else if(this.maxValue=p.maxGwp,this.maxValue>3*p.pct80Gwp&&(!p.baselineGwp||p.baselineGwp&&this.maxValue>p.baselineGwp)){this.maxValue=1.75*p.pct80Gwp,this.noMaxBar=!0;const he=p.material?.pct80Gwp||0;he>this.maxValue&&(he<p.maxGwp?this.maxValue=he:(this.maxValue=p.maxGwp,this.noMaxBar=!1))}this.scaleMin=this.minValue;const X=p.material&&Math.min(p.material.pct80Gwp,p.material.pct20Gwp),Y=p.material&&Math.max(p.material.pct80Gwp,p.material.pct20Gwp);this.minValue<0&&this.minValue<(p.pct20Gwp>0?p.pct20Gwp/3:3*p.pct20Gwp)?(this.minValue=p.pct20Gwp>0?p.pct20Gwp/1.75:1.75*p.pct20Gwp,this.noMinBar=!0,this.scaleMin=this.minValue,p.material&&X<this.minValue&&(X>p.minGwp?(this.minValue=X,this.scaleMin=this.minValue):(this.minValue=p.minGwp,this.scaleMin=X,this.noMinBar=!1))):p.material&&X<0&&X<this.minValue&&(X>p.minGwp?(this.minValue=X,this.scaleMin=this.minValue):(this.minValue=p.minGwp,this.scaleMin=X,this.noMinBar=!1)),this.noMinBar&&(this.minValue=Math.min(0,this.minValue)),this.scaleMin=Math.min(0,this.scaleMin),this.boxPlotData.push({id:p.id,min:this.minValue,p20:p.pct20Gwp,mean:p.meanGwp,p80:p.pct80Gwp,max:this.maxValue,chartType:ze.Box,chartName:U,category_name:p.categoryName,target:p.target.value,baseline:p.baselineGwp,targetText:p.target.method,originalMax:p.maxGwp,originalMin:p.minGwp,midValsEqual:I}),this.chartUnits=p.declaredUnit,p.material&&(this.labelPrefix=!1,this.boxPlotData.push({chartType:ze.RectLine,data:{id:p.id,rectTop:Y,rectHeight:Math.abs(p.material.pct80Gwp-p.material.pct20Gwp),gwp:p.material.meanGwp,gwpZ:p.material.gwpZ,p80:p.material.pct80Gwp,uncertaintyAdjustedGwp:p.material.uncertaintyAdjustedGwp,declaredUnit:p.declaredUnit},chartName:this.isSearchForm?"Selected Material":this.isGenericEstimate?"This Generic Estimate":"This EPD"}),p.material.pct80Gwp>this.maxValue&&(this.maxValue=p.material.pct80Gwp))}static{this.\u0275fac=function(p){return new(p||G)(r.rXU(f.Q))}}static{this.\u0275cmp=r.VBU({type:G,selectors:[["cqd-box-plot"]],hostBindings:function(p,I){1&p&&r.bIt("resize",function(X){return I.onResize(X)},!1,r.tSv)},inputs:{data:"data",heightChart:"heightChart",widthChart:"widthChart",componentWrapper:"componentWrapper",isSearchForm:"isSearchForm",isGenericEstimate:"isGenericEstimate",isIndustryEpd:"isIndustryEpd",showReferenceLine:"showReferenceLine",showTarget:"showTarget",showSelectedMaterial:"showSelectedMaterial",referenceLine:"referenceLine"},features:[r.OA$],decls:2,vars:1,consts:[[1,"box-plot-chart"],[1,"chart-body",3,"id"]],template:function(p,I){1&p&&(r.j41(0,"div",0),r.nrm(1,"div",1),r.k0s()),2&p&&(r.R7$(),r.Y8G("id",I.chartBoxPlotId))},styles:[":host{min-height:320px;height:320px}.top_max{visibility:hidden;font-style:italic;text-anchor:middle;font-size:.8em}.y_axis line{stroke-dasharray:2,2;stroke:#d0d0d0}.x_axis line{display:none}.y_axis path,.x_axis path{stroke:#d0d0d0}.box_title,.x_axis text{fill:#333}.box_title{font-size:1.2em}.box_line_top,.box_line_bottom{stroke-width:6;stroke-dasharray:1,4}.box-plot-chart .chart-body{width:100%;height:100%;text-align:left;font-size:12px}@media print{.box-plot-chart .chart-body svg{position:absolute}}.box-plot-chart div.tooltip{position:absolute;text-align:center;padding:1px;font-size:9px;background:#e0ffff;border:0;border-radius:1px;pointer-events:none;opacity:0;display:none}.box-plot-chart .tooltip-legend{text-align:center;font-size:9px}.box-plot-chart tspan.bottom-box-border-conservative{font-size:1em}\n"],encapsulation:2})}}return G})();var Ie=o(50119),K=o(69441),Pt=o(12742);function Rt(G,tt){if(1&G){const g=r.RV6();r.j41(0,"div",4)(1,"div",6)(2,"cqd-intro-button",7),r.bIt("startTour",function(){r.eBV(g);const I=r.XpG(2);
1return r.Njj(I.startIntro())}),r.k0s()()()}if(2&G){const g=r.XpG(2);r.R7$(2),r.Y8G("tour",g.introOptions)}}function yt(G,tt){if(1&G&&(r.DNE(0,Rt,3,1,"div",4),r.j41(1,"div",1,0),r.nrm(3,"cqd-box-plot",5),r.k0s()),2&G){const g=r.sdS(2),p=r.XpG();r.vxM(0,p.showTour?0:-1),r.R7$(3),r.Y8G("data",p.boxPlotDataSignal())("componentWrapper",g)("showTarget",p.chartOptionsSignal().showTarget&&p.showTargetBelowBaseline())("isSearchForm",p.isSearchForm)("isGenericEstimate",p.isGenericEstimate)("showSelectedMaterial",p.chartOptionsSignal().showSelectedMaterial)("isIndustryEpd",p.isSelectedIndustryEpd||p.isSelectedGenericEstimate)("showReferenceLine",p.chartOptionsSignal().showReferenceLine)("referenceLine",p.initialChartSettings.referenceLine)}}function q(G,tt){if(1&G){const g=r.RV6();r.j41(0,"cqd-chart-settings-modal",8),r.bIt("hide",function(){r.eBV(g);const I=r.XpG();return r.Njj(I.hideBoxPlotSettingsModal())})("confirm",function(I){r.eBV(g);const U=r.XpG();return r.Njj(U.setNewBoxPlotSettings(I))}),r.k0s()}if(2&G){const g=r.XpG();r.Y8G("isBoxplotChart",!0)("project",g.project)("appendTo",g.appendTo)("showCheckboxSelectedMaterial",!g.alwaysShowMaterial&&!!g.project)("referenceLines",g.statistics.baselines)("showTarget",!g.alwaysHideTarget)("visible",g.shouldShowBoxPlotSettingsModalSignal())("initialSettings",g.initialChartSettings)}}function Ot(G,tt){if(1&G){const g=r.RV6();r.j41(0,"cqd-modal",9),r.bIt("hide",function(){r.eBV(g);const I=r.XpG();return r.Njj(I.stopIntro())}),r.j41(1,"div",10),r.nrm(2,"img",11),r.k0s()()}if(2&G){const g=r.XpG();r.Y8G("header",g.introOptions.name)("visible",g.boxplotTourShownSignal())("dialogWidth",900)("appendTo",g.appendTo),r.R7$(2),r.Y8G("src",g.introOptions.steps[0].intro,r.B4B)}}let vt=(()=>{class G extends ge.${constructor(g,p,I,U,X,Y){super(),this.sessionService=g,this.analyticsService=p,this.notificationService=I,this.introService=U,this.chartSettingsService=X,this.asyncOptionsService=Y,this.showTour=!0,this.chartSettingsUpdate=new r.bkB,this.boxPlotDataSignal=(0,r.vPA)(null),this.introOptions=k,this.boxplotTourShownSignal=(0,r.vPA)(!1),this.showTargetBelowBaseline=(0,r.EWP)(()=>{const ce=this.referenceAndTargetSettings?.target?.method===F.iZ.BelowBaselineBy,he=!!this.boxPlotDataSignal()?.baselineGwp;return!ce||ce&&he}),this.shouldShowBoxPlotSettingsModalSignal=(0,r.vPA)(!1),this.chartOptionsSignal=(0,r.vPA)(null),this.boxPlotInputsChangedSource=new st.t(null)}ngOnInit(){this.boxPlotInputsChanged$=this.boxPlotInputsChangedSource.asObservable(),this.prepareInitialChartSettings(),this.sessionService.securityPrincipal$.pipe((0,Ke.Q)(this.destroy$)).subscribe(g=>{const p=this.prepareChartOptions(g.getChartSettings().boxplot);this.chartOptionsSignal.set({...this.chartOptionsSignal(),showSelectedMaterial:p.showSelectedMaterial})}),this.boxPlotInputsChanged$.pipe((0,Ke.Q)(this.destroy$)).subscribe(()=>{this.setBoxPlotData()})}ngOnChanges(g){this.introOptions=g.materialGwpData?.currentValue&&this.chartOptionsSignal()?.showSelectedMaterial?E:k,this.isSelectedIndustryEpd=g.selectedIndustryEpd?.currentValue,this.isSelectedGenericEstimate=g.selectedIndustryEpd?.currentValue,g.collection?.currentValue?.id&&this.prepareInitialChartSettings(),this.boxPlotInputsChangedSource.next()}prepareInitialChartSettings(){const g=this.chartSettingsService.prepareInitialReferenceAndTargetMethods({collection:this.referenceAndTargetSettings,project:this.project}),p=this.chartSettingsService.getBoxplotSettings();this.initialChartSettings={...g,chartOptions:this.prepareChartOptions(p)},this.chartOptionsSignal.set(this.initialChartSettings.chartOptions)}prepareChartOptions(g){return{...g,showSelectedMaterial:!!this.alwaysShowMaterial||g.showSelectedMaterial,showTarget:!this.alwaysHideTarget&&g.showTarget}}setNewBoxPlotSettings(g){this.initialChartSettings=g,g.chartOptions.showSelectedMaterial!==this.chartOptionsSignal().showSelectedMaterial&&this.chartSettingsService.updateUserBoxplotSettings(g.chartOptions).pipe((0,Ye.s)(1)).subscribe(),this.chartOptionsSignal.set(g.chartOptions),this.boxPlotInputsChangedSource.next(),this.chartSettingsUpdate.emit(g),this.introOptions=this.materialGwpData&&g.chartOptions.showSelectedMaterial?E:k}showBoxPlotSettingsModal(){this.shouldShowBoxPlotSettingsModalSignal.set(!0)}hideBoxPlotSettingsModal(){this.shouldShowBoxPlotSettingsModalSignal.set(!1)}startIntro(){this.boxplotTourShownSignal.set(!0)}stopIntro(){this.boxplotTourShownSignal.set(!1),this.introService.markTourAsViewed(this.introOptions.id,this.introOptions.version)}setBoxPlotData(){this.asyncOptionsService.getAsyncOptions(h.S.referenceGwpSources$).pipe((0,Ye.s)(1),(0,ve.n)(g=>(this.referenceGwpSources=g,this.parseBoxPlotChartData({stats:this.selectedIndustryEpd||this.selectedGenericEstimate||this.statistics})))).subscribe(g=>{g.color=this.referenceGwpSources.find(p=>p.name===this.initialChartSettings?.gwpSourceName)?.color,this.boxPlotDataSignal.set(g)})}parseBoxPlotChartData(g){const{stats:p}=g,I=new e.D0({...p.toJSON(),baselines:{...this.statistics.baselines}});return p?.unit instanceof V.O4?this.analyticsService.statisticsBaseToBoxPlotData(I,{target:this.initialChartSettings?.target||this.referenceAndTargetSettings?.target||this.project?.target||new re.We(this.sessionService.getSecurityPrincipal().getJSON().target),materialGwpData:this.initialChartSettings?.chartOptions.showSelectedMaterial&&this.materialGwpData,categoryName:this.category.displayName,referenceGwpSource:this.getReferenceGwpSource(),referenceLine:this.initialChartSettings?.referenceLine,referenceSet:this.initialChartSettings?.referenceSet,customReferenceGwp:this.initialChartSettings?.customReferenceGwp,customTargetGwp:this.initialChartSettings?.customTargetGwp,options:{isIndustryEpd:this.isIndustryEpd||this.isSelectedIndustryEpd,isGenericEstimate:this.isGenericEstimate||this.isSelectedGenericEstimate&&!this.isSelectedIndustryEpd}}):(p instanceof ne.n&&this.notificationService.show({severity:"error",summary:$localize`:box-plot|:Bad data`,detail:$localize`:box-plot|:Provi
1ded wrong Industry EPD`}),p instanceof C.z&&this.notificationService.show({severity:"error",summary:$localize`:box-plot|:Bad data`,detail:$localize`:box-plot|:Provided wrong Generic Estimate`}),(0,y.of)(null))}getReferenceGwpSource(){return this.referenceGwpSources.find(p=>p.name===this.initialChartSettings?.gwpSourceName)??this.referenceGwpSources.find(p=>p.isReferenceLine)}static{this.\u0275fac=function(p){return new(p||G)(r.rXU(f.Q),r.rXU(L),r.rXU(me.J),r.rXU(S.i),r.rXU(we.B),r.rXU(P.K))}}static{this.\u0275cmp=r.VBU({type:G,selectors:[["cqd-box-plot-wrapper"]],inputs:{appendTo:"appendTo",statistics:"statistics",selectedElement:"selectedElement",selectedIndustryEpd:"selectedIndustryEpd",selectedGenericEstimate:"selectedGenericEstimate",target:"target",isSearchForm:"isSearchForm",category:"category",materialGwpData:"materialGwpData",alwaysShowMaterial:"alwaysShowMaterial",alwaysHideTarget:"alwaysHideTarget",toUnitSystem:"toUnitSystem",showTour:"showTour",isIndustryEpd:"isIndustryEpd",isGenericEstimate:"isGenericEstimate",project:"project",referenceAndTargetSettings:"referenceAndTargetSettings"},outputs:{chartSettingsUpdate:"chartSettingsUpdate"},standalone:!0,features:[r.Vt3,r.OA$,r.aNF],decls:3,vars:3,consts:[["wrapper",""],[1,"charts-container"],[3,"isBoxplotChart","project","appendTo","showCheckboxSelectedMaterial","referenceLines","showTarget","visible","initialSettings"],[3,"header","visible","dialogWidth","appendTo"],[1,"actions-wrapper","p-pr-dnone"],[3,"data","componentWrapper","showTarget","isSearchForm","isGenericEstimate","showSelectedMaterial","isIndustryEpd","showReferenceLine","referenceLine"],[1,"tour-btn"],["label","",3,"startTour","tour"],[3,"hide","confirm","isBoxplotChart","project","appendTo","showCheckboxSelectedMaterial","referenceLines","showTarget","visible","initialSettings"],[3,"hide","header","visible","dialogWidth","appendTo"],[1,"boxplot-tour"],[3,"src"]],template:function(p,I){1&p&&r.DNE(0,yt,4,10,"div",1)(1,q,1,8,"cqd-chart-settings-modal",2)(2,Ot,3,5,"cqd-modal",3),2&p&&(r.vxM(0,I.boxPlotDataSignal()?0:-1),r.R7$(),r.vxM(1,I.shouldShowBoxPlotSettingsModalSignal()?1:-1),r.R7$(),r.vxM(2,I.boxplotTourShownSignal()?2:-1))},dependencies:[m.G,gt,Ie.q,K.y,Pt.Y],styles:["[_nghost-%COMP%]{width:100%}.charts-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.actions-wrapper[_ngcontent-%COMP%]{display:flex}.actions-wrapper[_ngcontent-%COMP%] .tour-btn[_ngcontent-%COMP%] {flex:1;margin:auto}.actions-wrapper[_ngcontent-%COMP%] .tour-btn[_ngcontent-%COMP%] .tour-button-wrapper{position:static}.actions-wrapper[_ngcontent-%COMP%] .tour-btn[_ngcontent-%COMP%] .tour-button-wrapper .tour-label{margin:auto 5px;font-size:12px}.actions-wrapper[_ngcontent-%COMP%] .tour-btn[_ngcontent-%COMP%] .tour-button-wrapper .take-tour-button{margin:auto 0 auto auto;font-size:12px!important}.actions-wrapper[_ngcontent-%COMP%] .settings-btn[_ngcontent-%COMP%]{margin:auto}"],changeDetection:0})}}return G})()},95937(Ge,_e,o){o.d(_e,{j:()=>f});var r=o(86600),e=o(21413),y=o(19724),z=o(7673),te=o(70274),V=o(33103),W=o(56977),Q=o(88141),B=o(45324),b=o(54438),j=o(81141),L=o(38542);let f=(()=>{class ne extends B.J{constructor(){super(...arguments),this.stopPropagation$=new e.B,this.delayBetweenPulse=500,this.btnClass=""}ngOnDestroy(){this.stopPropagation$.next(),this.stopPropagation$.complete()}launchRipple(){this.ripple.launch({centered:!0,color:"rgba(243, 197, 103, 0.7)"})}pulseRipple(){(0,y.H)(new Array(3)).pipe((0,W.Q)(this.stopPropagation$),(0,te.H)(()=>(0,z.of)(null).pipe((0,Q.M)(()=>this.launchRipple()),(0,V.c)(this.delayBetweenPulse)))).subscribe()}delayedRipple(T=!0,E=3e3){this.stopPulse(),(0,z.of)(null).pipe((0,Q.M)(()=>{this.mouseOverHandler=()=>this.stopPulse(),this.mouseOutHandler=()=>this.delayedRipple(T,E)}),(0,V.c)(E),(0,W.Q)(this.stopPropagation$),(0,Q.M)(()=>{T?this.pulseRipple():this.launchRipple()}),(0,V.c)(3*this.delayBetweenPulse),(0,W.Q)(this.stopPropagation$),(0,Q.M)(()=>this.delayedRipple(T,E))).subscribe()}stopPulse(){this.stopPropagation$.next()}onClick(){this.stopPulse(),this.deleteHandlers(),super.onClick()}onMouseOver(){this.mouseOverHandler&&this.mouseOverHandler()}onMouseOut(){this.mouseOutHandler&&this.mouseOutHandler()}deleteHandlers(){this.mouseOverHandler=null,this.mouseOutHandler=null}static{this.\u0275fac=(()=>{let T;return function(k){return(T||(T=b.xGo(ne)))(k||ne)}})()}static{this.\u0275cmp=b.VBU({type:ne,selectors:[["cqd-button-pulse"]],viewQuery:function(E,k){if(1&
1E&&b.GBs(r.r6,5),2&E){let re;b.mGM(re=b.lsd())&&(k.ripple=re.first)}},inputs:{btnClass:"btnClass"},features:[b.Vt3],decls:1,vars:8,consts:[["type","button","pButton","","matRipple","",3,"mouseover","mouseout","click","matRippleRadius","matRippleUnbounded","label","disabled","pTooltip","tooltipPosition"]],template:function(E,k){1&E&&(b.j41(0,"button",0),b.bIt("mouseover",function(){return k.onMouseOver()})("mouseout",function(){return k.onMouseOut()})("click",function(){return k.onClick()}),b.k0s()),2&E&&(b.HbH("button button-search button--light-blue "+k.btnClass),b.Y8G("matRippleRadius",60)("matRippleUnbounded",!0)("label",k.label)("disabled",k.disabled)("pTooltip",k.tooltip)("tooltipPosition",k.tooltipPosition))},dependencies:[j._f,L.m,r.r6],styles:[".button-search[_ngcontent-%COMP%]{z-index:101}"],changeDetection:0})}}return ne})()},63481(Ge,_e,o){o.d(_e,{Z:()=>L});var r=o(54438),e=o(28971),y=o(67542),z=o(60177),te=o(81141),V=o(38542);function W(f,ne){if(1&f&&r.nrm(0,"img",5),2&f){const S=r.XpG(2);r.Y8G("src",S.iconSrc,r.B4B)}}function Q(f,ne){if(1&f&&r.EFF(0),2&f){const S=r.XpG(2);r.SpI(" ",S.label," ")}}function B(f,ne){if(1&f){const S=r.RV6();r.qex(0),r.j41(1,"button",3),r.nI1(2,"async"),r.bIt("click",function(){r.eBV(S);const E=r.XpG();return r.Njj(E.download())}),r.DNE(3,W,1,1,"img",4)(4,Q,1,1,"ng-template",null,1,r.C5r),r.k0s(),r.bVm()}if(2&f){const S=r.sdS(5),T=r.XpG();r.R7$(),r.Y8G("pTooltip",T.tooltips.downloadPdfOfIndustryEpd)("ngClass",T.styleClass+(T.iconSrc?" icon-button":""))("disabled",r.bMT(2,5,T.isLocked$)),r.R7$(2),r.Y8G("ngIf",T.iconSrc)("ngIfElse",S)}}function b(f,ne){if(1&f){const S=r.RV6();r.qex(0),r.j41(1,"button",7),r.bIt("click",function(){r.eBV(S);const E=r.XpG(2);return r.Njj(E.openOriginalEpd())}),r.EFF(2),r.k0s(),r.bVm()}if(2&f){const S=r.XpG(2);r.R7$(),r.Y8G("ngClass",S.styleClass),r.R7$(),r.SpI(" ",S.labels.openOriginalEpd," ")}}function j(f,ne){if(1&f&&r.DNE(0,b,3,2,"ng-container",6),2&f){const S=r.XpG();r.Y8G("ngIf",S.instance.doc&&!S.isSelfUrl)}}let L=(()=>{class f extends e.O{constructor(){super(...arguments),this.epdService=(0,r.WQX)(y.h)}static{this.\u0275fac=(()=>{let S;return function(E){return(S||(S=r.xGo(f)))(E||f)}})()}static{this.\u0275cmp=r.VBU({type:f,selectors:[["cqd-download-industry-epd-file"]],features:[r.Vt3],decls:3,vars:2,consts:[["openOriginal",""],["defaultLabel",""],[4,"ngIf","ngIfElse"],["pButton","","tooltipPosition","top",3,"click","pTooltip","ngClass","disabled"],["class","epd-download-icon","alt","",3,"src",4,"ngIf","ngIfElse"],["alt","",1,"epd-download-icon",3,"src"],[4,"ngIf"],["pButton","",3,"click","ngClass"]],template:function(T,E){if(1&T&&r.DNE(0,B,6,7,"ng-container",2)(1,j,1,1,"ng-template",null,0,r.C5r),2&T){const k=r.sdS(2);r.Y8G("ngIf",E.instance.isDownloadable&&E.instance.boxId)("ngIfElse",k)}},dependencies:[z.YU,z.bT,te._f,V.m,z.Jj],encapsulation:2,changeDetection:0})}}return f})()},77934(Ge,_e,o){o.d(_e,{T:()=>V});var r=o(54438),e=o(89417),y=o(56977),z=o(81442),te=o(494);let V=(()=>{class W extends z.Q{constructor(B){super(),this.cdRef=B,this.prop
1agateChange=()=>{}}ngOnChanges(B){B.control&&B.control.currentValue.valueChanges.pipe((0,y.Q)(this.destroy$)).subscribe(()=>this.cdRef.markForCheck())}get curValue(){return this._curValue}set curValue(B){this._prevValue=this._curValue,this._curValue=B,this.propagateChange(B)}registerOnChange(B){this.propagateChange=B}registerOnTouched(B){}writeValue(B){this.curValue=B}clickBy(B,b){this.canBeNull&&this._prevValue===b&&(this.curValue=null)}static{this.\u0275fac=function(b){return new(b||W)(r.rXU(r.gRc))}}static{this.\u0275cmp=r.VBU({type:W,selectors:[["cqd-form-switch-radio"]],inputs:{disabled:"disabled",falseLabel:"falseLabel",trueLabel:"trueLabel",groupId:"groupId",canBeNull:"canBeNull",control:"control"},features:[r.Jv_([{provide:e.kq,useExisting:(0,r.Rfq)(()=>W),multi:!0}]),r.Vt3,r.OA$],decls:4,vars:11,consts:[[1,"radio-wrapper",3,"id"],[1,"radio-items"],[3,"ngModelChange","onClick","ngModel","value","label","name","disabled"]],template:function(b,j){1&b&&(r.j41(0,"div",0)(1,"div",1)(2,"p-radioButton",2),r.mxI("ngModelChange",function(f){return r.DH7(j.curValue,f)||(j.curValue=f),f}),r.bIt("onClick",function(f){return j.clickBy(f,!1)}),r.k0s(),r.j41(3,"p-radioButton",2),r.mxI("ngModelChange",function(f){return r.DH7(j.curValue,f)||(j.curValue=f),f}),r.bIt("onClick",function(f){return j.clickBy(f,!0)}),r.k0s()()()),2&b&&(r.Y8G("id",j.groupId),r.R7$(2),r.R50("ngModel",j.curValue),r.Y8G("value",!1)("label",j.falseLabel)("name",j.groupId)("disabled",j.disabled),r.R7$(),r.R50("ngModel",j.curValue),r.Y8G("value",!0)("label",j.trueLabel)("name",j.groupId)("disabled",j.disabled))},dependencies:[e.BC,e.vS,te.a],styles:[".radio-wrapper[_ngcontent-%COMP%]{display:flex;height:100%}.radio-items[_ngcontent-%COMP%]{margin:auto 0}"],changeDetection:0})}}return W})()},357(Ge,_e,o){o.d(_e,{L:()=>st});var r=o(54438),e=o(89417),y=o(40605),z=o(23294),te=o(31397),V=o(56977),W=o(83561),Q=o(74647),B=o(22210),b=o(82902),j=o(47681),L=o(60177),f=o(38542),ne=o(72510),S=o(35018),T=o(34822),E=o(44368);const k=C=>({invalid:C}),re=C=>({ban:C}),we=C=>({red:C});function Ke(C,P){if(1&C&&(r.qex(0),r.j41(1,"span",9)(2,"span",10),r.EFF(3),r.k0s(),r.j41(4,"span",11),r.EFF(5),r.k0s()(),r.bVm()),2&C){const h=r.XpG().item,F=r.XpG();r.R7$(),r.Y8G("pTooltip",h.tooltip)("ngClass",r.eq3(5,re,!1===(null==h.value?null:h.value.state))),r.R7$(2),r.JRh(h.label),r.R7$(),r.Y8G("ngClass",r.eq3(7,we,!1===(null==h.value?null:h.value.state))),r.R7$(),r.JRh(F.parseItemState(h.value))}}function Ye(C,P){if(1&C&&(r.j41(0,"span",12)(1,"span",10),r.EFF(2),r.k0s(),r.j41(3,"span",11),r.EFF(4),r.k0s()()),2&C){const h=r.XpG().item,F=r.XpG();r.Y8G("ngClass",r.eq3(6,re,!1===(null==h.value?null:h.value.state)))("tippyProps",h.interactiveTooltip)("tippyClassName",h.interactiveTooltip.styleClassName),r.R7$(2),r.JRh(h.label),r.R7$(),r.Y8G("ngClass",r.eq3(8,we,!1===(null==h.value?null:h.value.state))),r.R7$(),r.JRh(F.parseItemState(h.value))}}function ve(C,P){if(1&C&&r.DNE(0,Ke,6,9,"ng-container",8)(1,Ye,5,10,"ng-template",null,1,r.C5r),2&C){const h=P.item,F=r.sdS(2);r.Y8G("ngIf",!h.interactiveTooltip)("ngIfElse",F)}}function ge(C,P){if(1&C){const h=r.RV6();r.j41(0,"div",14)(1,"span",15),r.EFF(2),r.k0s(),r.j41(3,"span",16),r.EFF(4),r.k0s(),r.j41(5,"span",17),r.bIt("click",function(){const m=r.eBV(h).$implicit,me=r.XpG().clear;return r.Njj(me(m))}),r.EFF(6,"\xd7"),r.k0s()()}if(2&C){const h=P.$implicit,F=r.XpG(2);r.R7$(),r.Y8G("pTooltip",h.label+": "+F.parseItemState(h.value))("cqdHideTooltipIfTextFits",h.label+":"),r.R7$(),r.SpI("",h.label,": "),r.R7$(),r.Y8G("ngClass",r.eq3(5,we,!1===(null==h.value?null:h.value.state))),r.R7$(),r.JRh(F.parseItemState(h.value))}}function at(C,P){1&C&&r.DNE(0,ge,7,7,"div",13),2&C&&r.Y8G("ngForOf",P.items)}let st=(()=>{class C extends j.x{set control(h){h&&(this.selectedItems=h.value,this._control=h,this._control.valueChanges.pipe((0,V.Q)(this.destroy$)).subscribe(F=>{this.selectedItems=F}),(0,y.Y)(250).pipe((0,te.Z)(()=>h.statusChanges),(0,V.Q)(this.destroy$),(0,z.F)()).subscribe(()=>this.cdRef.markForCheck()))}get control(){return this._control}set options(h){h&&(this._options=h.map(F=>{const m={...F};return m.value={...F.value},m}),this.clearUnMatchedSelectedItems())}get options(){return this._options}set selectedItems(h){this._selectedItems=h;const F=h.map(m=>({...m}));
1this.propagateChange(F)}get selectedItems(){return this._selectedItems}constructor(h,F){super(),this.injector=h,this.clearable=!0,this.labels=W.W,this._control=new e.MJ,this._selectedItems=[],this._options=[],this.shouldShowControlErrors=m=>m&&m.invalid&&!m.pristine,this.propagateChange=()=>{},F&&(F.formSubmit$.pipe((0,V.Q)(this.destroy$)).subscribe(()=>this.cdRef.markForCheck()),this.shouldShowControlErrors=F.shouldShowControlErrors.bind(F))}ngAfterViewInit(){const h=this.injector.get(e.vO,null);h&&(this._control=h.control,this.cdRef.detectChanges()),this.ngSelect.toggleItem=F=>this.selectItem(F.value)}ngDoCheck(){if(this.control){const h=this.control.dirty;this._dirty!==h&&(this._dirty=h,this.cdRef.markForCheck())}}writeValue(h){h&&(this._selectedItems=h,(0,b.I)(h)?(this.options.forEach(F=>F.value.state=null),(0,b.I)(this.ngSelect.selectedItems)||this.ngSelect.clearModel()):this.ngSelect.itemsList.items.forEach(m=>{const me=h.find(u=>u.field===m.value.value.field);me?(m.value.value=me,this.ngSelect.select(m)):m.selected&&this.ngSelect.unselect(m)}),this.cdRef.markForCheck())}registerOnChange(h){this.propagateChange=h}registerOnTouched(h){}markSelected(h,F){return h.value.field===F.field&&(h.value.state=F.state,(0,B.Lm)(F.state))}removeSelectedItem(h){h.value.state=null}clearSelectedItems(){this.options.forEach(h=>h.value.state=null)}parseItemState(h){return h?(0,B.hX)(h.state)?"":h.state?"Yes":"No":""}selectItem(h){if(h.value){let F=-1;const m=this.selectedItems.filter((me,u)=>me.field!==h.value.field||(F=u,!1));h.value.state=!(0,B.Lm)(h.value.state)||!1===h.value.state&&null,(0,B.Lm)(h.value.state)&&(-1!==F?m.splice(F,0,h.value):m.push(h.value)),this.selectedItems=m}}clearUnMatchedSelectedItems(){if(this.selectedItems){const h=this.options.map(F=>F.value.field);this._selectedItems=this.selectedItems.filter(F=>h.includes(F.field))}}static{this.\u0275fac=function(F){return new(F||C)(r.rXU(r.zZn),r.rXU(Q.L,8))}}static{this.\u0275cmp=r.VBU({type:C,selectors:[["cqd-three-state-select"]],inputs:{dropdownAppendTo:"dropdownAppendTo",inputId:"inputId",label:"label",disabled:"disabled",clearable:"clearable",groupBy:"groupBy",control:"control",options:"options",selectedItems:"selectedItems"},features:[r.Jv_([{provide:e.kq,multi:!0,useExisting:(0,r.Rfq)(()=>C)}]),r.Vt3],decls:7,vars:17,consts:[["ngSelect",""],["itemWithInteractiveTooltip",""],[3,"ngClass"],["bindLabel","label","bindValue","value",3,"ngModelChange","remove","clear","open","disabled","labelForId","items","placeholder","ngModel","searchable","multiple","closeOnSelect","clearable","appendTo","groupBy","isOpen","compareWith"],["ng-option-tmp",""],["ng-multi-label-tmp",""],[1,"error-wrapper"],[3,"control"],[4,"ngIf","ngIfElse"],["tooltipZIndex","1100",1,"ng-option-item","three-state-item",3,"pTooltip","ngClass"],[1,"ng-option-label","text-ellipsis"],[1,"ng-option-state",3,"ngClass"],["ngxTippy","",1,"ng-option-item","three-state-item",3,"ngClass","tippyProps","tippyClassName"],["class","ng-value",4,"ngFor","ngForOf"],[1,"ng-value"],["tooltipPosition","top","tooltipStyleClass","desc-tooltip",1,"ng-value-label","text-ellipsis",3,"pTooltip","cqdHideTooltipIfTextFits"],[1,"ng-value-state",3,"ngClass"],["aria-hidden","true",1,"ng-value-icon","right",3,"click"]],template:function(F,m){if(1&F){const me=r.RV6();r.j41(0,"div",2)(1,"ng-select",3,0),r.mxI("ngModelChange",function(Le){return r.eBV(me),r.DH7(m.selectedItems,Le)||(m.selectedItems=Le),r.Njj(Le)}),r.bIt("remove",function(Le){return r.eBV(me),r.Njj(m.removeSelectedItem(Le))})("clear",function(){return r.eBV(me),r.Njj(m.clearSelectedItems())})("open",function(){return r.eBV(me),r.Njj(m.onOpen())}),r.DNE(3,ve,3,2,"ng-template",4)(4,at,1,1,"ng-template",5),r.k0s(),r.j41(5,"div",6),r.nrm(6,"cqd-form-errors",7),r.k0s()()}2&F&&(r.Y8G("ngClass",r.eq3(15,k,m.shouldShowControlErrors(m.control)&&!m.disabled)),r.R7$(),r.Y8G("disabled",m.disabled)("labelForId",m.inputId)("items",m.options)("placeholder",m.label),r.R50("ngModel",m.selectedItems),r.Y8G("searchable",!1)("multiple",!0)("closeOnSelect",!1)("clearable",m.clearable)("appendTo",m.dropdownAppendTo)("groupBy",m.groupBy)("isOpen",m.isManualOpen)("compareWith",m.markSelected),r.R7$(5),r.Y8G("control",m.control))},dependencies:[L.YU,L.Sq,L.bT,e.BC,e.vS,f.m,ne.vr,ne.Uq,ne.EY,S.No,T.Z,E.T],styles:["body[_ngcontent-%COMP%], .p-widget[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;letter-spacing:-.16px;font: 14px/1.29 Open Sans,Helvetica,Arial,sans-serif;color:#000}h1[_ngcontent-%COMP%]{font-size:18px;font-weight:800;letter-spacing:-.8px;line-height:1.23;margin:0 0 30px}@media (min-width: 1026px){h1[_ngcontent-%COMP%]{font-size:22px}}@media (min-width: 1381px){h1[_ngcontent-%COMP%]{font-size:26px}}h2[_ngcontent-%COMP%]{font-size:22px;font-weight:800;letter-spacing:-.68px;line-height:1.28;margin:0 0 30px}h3[_ngcontent-%COMP%]{font-size:18px;font-weight:800;letter-spacing:-.55px;line-height:1.28;margin:0 0 30px}h5[_ngcontent-%COMP%]{font-size:11.8px;font-weight:800}.title[_ngcontent-%COMP%]{font-size:16px;font-weight:800;line-height:1.25;text-transform:uppercase;color:#000}.title-subsection[_ngcontent-%COMP%]{font-weight:600;line-height:1.38;letter-spacing:-.12px}p[_ngcontent-%COMP%]{margin:0 0 10px;line-height:1.5}a[_ngcontent-%COMP%], .p-widget-content[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--primary);transition:opacity .3s ease-in-out}a[_ngcontent-%COMP%]:hover, a[_ngcontent-%COMP%]:active, a[_ngcontent-%COMP%]:focus, .p-widget-content[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .p-widget-content[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:active, .p-widget-content[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:focus{opacity:.7}hr[_ngcontent-%COMP%]{color:#b0b9c6;margin:0 3px}.font-bold[_ngcontent-%COMP%]{font-weight:700}.text-ellipsis[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.text-lowercase[_ngcontent-%COMP%]{text-transform:lowercase}.text-capitalize[_ngcontent-%COMP%]{text-transform:capitalize}.text-uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-transform-initial[_ngcontent-%COMP%]{text-transform:initial}textarea[_ngcontent-%COMP%]{white-space:pre-wrap!important}pre[_ngcontent-%COMP%]{font-size:14px;white-space:pre-wrap}.no-decoration[_ngcontent-%COMP%]{text-decoration:none!important}.red[_ngcontent-%COMP%]{color:#c94747}.yellow[_ngcontent-%COMP%], .amber[_ngcontent-%COMP%]{color:#ebac2a}.green[_ngcontent-%COMP%]{color:#33b688}.dark-violet[_ngcontent-%COMP%]{color:#9400d3}.grey[_ngcontent-%COMP%], .gray[_ngcontent-%COMP%]{color:#b0b9c6}.blue[_ngcontent-%COMP%]{color:#3b9cb6}.primary[_ngcontent-%COMP%]{color:var(--primary)}.page-title[_ngcontent-%COMP%]{font-weight:500;font-size:28px;margin-bottom:3rem}.page-paragraph[_ngcontent-%COMP%]{bottom:.6rem;margin-bottom:.6rem}.page-paragraph--margined[_ngcontent-%COMP%]{margin-left:1.5rem}.page-subtitle[_ngcontent-%COMP%]{font-weight:600;margin:1.5rem 0}.page-list[_ngcontent-%COMP%] .page-list-item[_ngcontent-%COMP%]{margin-bottom:.6rem}.page-list[_ngcontent-%COMP%] .page-list-item--strong[_ngcontent-%COMP%]::marker{font-weight:600;font-size:18px}.page-subsumed[_ngcontent-%COMP%]{font-size:18px;letter-spacing:-.55px;font-weight:600;margin:1.5rem 0}h2.page-subtitle[_ngcontent-%COMP%]{font-size:20px;color:#3b9cb6}h3.page-subtitle[_ngcontent-%COMP%]{font-size:18px}h4.page-subtitle[_ngcontent-%COMP%]{font-size:16px;margin:.6rem 0}.list[_ngcontent-%COMP%]{margin-left:2.5rem;margin-bottom:.6rem}.list-numeric[_ngcontent-%COMP%]{list-style:decimal}.list-disc[_ngcontent-%COMP%]{list-style:disc}.text-underlined[_ngcontent-%COMP%]{text-decoration:underline}.term-description[_ngcontent-%COMP%]{color:#90f}.text-center[_ngcontent-%COMP%]{text-align:center}.img-center[_ngcontent-%COMP%]{margin:auto}#footnotes[_ngcontent-%COMP%]{margin:3rem 0}#footnotes[_ngcontent-%COMP%] .separate-line[_ngcontent-%COMP%]{width:150px;border-top-color:#d1d1d1;margin-bottom:.5rem}.no-text-transform[_ngcontent-%COMP%]{text-transform:none}label[_ngcontent-%COMP%], .label-default-state[_ngcontent-%COMP%]{font:400 13px/1.43 Open Sans,Helvetica,Arial,sans-serif;color:gray;transition:transform .3s cubic-bezier(.64,.09,.08,1),padding .3s cubic-bezier(.64,.09,.08,1)}.label-style-focus[_ngcontent-%COMP%], [_nghost-%COMP%] .ng-select.ng-select-opened .ng-select-container .ng-value-container .ng-placeholder, [_nghost-%COMP%] .ng-select.ng-select-focused .ng-select-container .ng-value-container .ng-placeholder, .label-style-filled[_ngcontent-%COMP%], [_nghost-%COMP%] .ng-select.ng-select-filtered .ng-select-container .ng-value-container .ng-placeholder, [_nghost-%COMP%] .ng-select .ng-select-container.ng-has-value .ng-value-container .ng-placeholder{font-size:12px;font-weight:600;letter-spacing:.2px;color:#000}.with-filter-inputs[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:30px!important;padding:5px 6px}input[_ngcontent-%COMP%], .p-inputtext[_ngcontent-%COMP%], .p-autocomplete[_ngcontent-%COMP%] .p-autocomplete-input[_ngcontent-%COMP%], .ng-select[_ngcontent-%COMP%] .ng-select-container[_ngcontent-%COMP%]{height:36px;width:100%;padding:8px 6px;border-radius:0;border:1px solid #979ea8;background:#fff;color:#000;font:14px/1.4 Open Sans,Helvetica,Arial,sans-serif;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:1}input[_ngcontent-%COMP%]::-webkit-input-placeholder, .p-inputtext[_ngcontent-%COMP%]::-webkit-input-placeholder, .p-autocomplete[_ngcontent-%COMP%] .p-autocomplete-input[_ngcontent-%COMP%]::-webkit-input-placeholder, .ng-select[_ngcontent-%COMP%] .ng-select-container[_ngcontent-%COMP%]::-webkit-input-placeholder{color:gray}input[_ngcontent-%COMP%]:-moz-placeholder, .p-inputtext[_ngcontent-%COMP%]:-moz-placeholder, .p-autocomplete[_ngcontent-%COMP%] .p-autocomplete-input[_ngcontent-%COMP%]:-moz-placeholder, .ng-select[_ngcontent-%COMP%] .ng-select-container[_ngcontent-%COMP%]:-moz-placeholder{color:gray}input[_ngcontent-%COMP%]::-moz-placeholder, .p-inputtext[_ngcontent-%COMP%]::-moz-placeholder, .p-autocomplete[_ngcontent-%COMP%] .p-autocomplete-input[_ngcontent-%COMP%]::-moz-placeholder, .ng-select[_ngcontent-%COMP%] .ng-select-container[_ngcontent-%COMP%]::-moz-placeholder{color:gray}input[_ngcontent-%COMP%]:-ms-input-placeholder, .p-inputtext[_ngcontent-%COMP%]:-ms-input-placeholder, .p-autocomplete[_ngcontent-%COMP%] .p-autocomplete-input[_ngcontent-%COMP%]:-ms-input-placeholder, .ng-select[_ngcontent-%COMP%] .ng-select-container[_ngcontent-%COMP%]:-ms-input-placeholder{color:gray}input[_ngcontent-%COMP%]:focus, .p-inputtext[_ngcontent-%COMP%]:focus, .p-autocomplete[_ngcontent-%COMP%] .p-autocomplete-input[_ngcontent-%COMP%]:focus, .ng-select[_ngcontent-%COMP%] .ng-select-container[_ngcontent-%COMP%]:focus{box-shadow:0 1px #00000008,0 0 0 4px #e8edef;border-color:#3b9cb6!important}input[disabled][_ngcontent-%COMP%], input[aria-disabled][_ngcontent-%COMP%], input[readonly][_ngcontent-%COMP%], input[aria-readonly][_ngcontent-%COMP%], .p-inputtext[disabled][_ngcontent-%COMP%], .p-inputtext[aria-disabled][_ngcontent-%COMP%], .p-inputtext[readonly][_ngcontent-%COMP%], .p-inputtext[aria-readonly][_ngcontent-%COMP%], .p-autocomplete[_ngcontent-%COMP%] .p-autocomplete-input[disabled][_ngcontent-%COMP%], .p-autocomplete[_ngcontent-%COMP%] .p-autocomplete-input[aria-disabled][_ngcontent-%COMP%], .p-autocomplete[_ngcontent-%COMP%] .p-autocomplete-input[readonly][_ngcontent-%COMP%], .p-autocomplete[_ngcontent-%COMP%] .p-autocomplete-input[aria-readonly][_ngcontent-%COMP%], .ng-select[_ngcontent-%COMP%] .ng-select-container[disabled][_ngcontent-%COMP%], .ng-select[_ngcontent-%COMP%] .ng-select-container[aria-disabled][_ngcontent-%COMP%], .ng-select[_ngcontent-%COMP%] .ng-select-container[readonly][_ngcontent-%COMP%], .ng-select[_ngcontent-%COMP%] .ng-select-container[aria-readonly][_ngcontent-%COMP%]{box-shadow:0 1px #00000008,0 0 0 4px #b2b9c51a;background:#f2f3f5;border-color:#b2b9c5!important;opacity:1;pointer-events:none}textarea[disabled][_ngcontent-%COMP%], textarea[aria-disabled][_ngcontent-%COMP%], textarea[readonly][_ngcontent-%COMP%], textarea[aria-readonly][_ngcontent-%COMP%]{pointer-events:initial!important}.all-readonly[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{border:none!important;box-shadow:none!important;background:#f2f3f5!important;height:auto;padding-bottom:0}.all-readonly[_ngcontent-%COMP%] .p-float-label[_ngcontent-%COMP%]{height:auto}.field-type[_ngcontent-%COMP%]{font:700 12px Open Sans,Helvetica,Arial,sans-serif;color:#b2b9c5;letter-spacing:-.13px;transition:color .3s ease-in-out;text-transform:none}.field-type-container[_ngcontent-%COMP%]{position:absolute;right:0;top:0;display:flex;justify-content:center;align-items:center}.field-type-container.left[_ngcontent-%COMP%]{right:auto!important;margin-right:4px;left:6px!important}.field-type-container.left[_ngcontent-%COMP%] .field-type[_ngcontent-%COMP%]{margin-right:6px}.field-type-container.right[_ngcontent-%COMP%]{right:6px!important;margin-left:4px;left:auto!important}.field-type-container.right[_ngcontent-%COMP%] .field-type[_ngcontent-%COMP%]{margin-left:6px}.invalid[_ngcontent-%COMP%] .ng-select-container[_ngcontent-%COMP%]{border-color:#df8181!important}.invalid[_ngcontent-%COMP%] .field-type[_ngcontent-%COMP%]{color:#df8181}
1.invalid[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .invalid[_ngcontent-%COMP%] .p-dropdown-label[_ngcontent-%COMP%], .invalid[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .invalid[_ngcontent-%COMP%] .p-inputtext[_ngcontent-%COMP%]{border-color:#df8181!important}.invalid[_ngcontent-%COMP%] .error-message[_ngcontent-%COMP%]{display:inline-block}.error-message[_ngcontent-%COMP%]{margin-top:6px;display:none;font: 14px/1.29 Open Sans,Helvetica,Arial,sans-serif;letter-spacing:-.16px;color:#c94747}.p-progressbar[_ngcontent-%COMP%]{height:20px}[_nghost-%COMP%] {width:100%;display:block;margin-top:5px}[_nghost-%COMP%] .ng-select .ng-select-container{overflow:visible;padding:8px}[_nghost-%COMP%] .ng-select .ng-select-container .ng-value-container{padding:0}[_nghost-%COMP%] .ng-select .ng-select-container .ng-value-container .ng-placeholder{position:absolute;top:0!important;left:0!important;margin-top:0!important;letter-spacing:-.16px;font:400 13px/1.43 Open Sans,Helvetica,Arial,sans-serif;color:gray;transition:transform .3s cubic-bezier(.64,.09,.08,1),padding .3s cubic-bezier(.64,.09,.08,1);transform:translate(6px) translateY(8px) translateZ(0);text-align:left;display:inline-block;max-width:85%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}[_nghost-%COMP%] .ng-select .ng-select-container .ng-value-container .ng-input{padding:0 50px 0 8px;top:0;height:0}[_nghost-%COMP%] .ng-select .ng-select-container .ng-value-container .ng-input>input{padding:0;box-sizing:border-box}[_nghost-%COMP%] .ng-select.ng-select-searchable.ng-select-opened .ng-input, [_nghost-%COMP%] .ng-select.ng-select-searchable.ng-select-focused .ng-input{height:auto}[_nghost-%COMP%] .ng-select.ng-select-opened .ng-select-container, [_nghost-%COMP%] .ng-select.ng-select-focused .ng-select-container{box-shadow:0 1px #00000008,0 0 0 4px #e8edef;border-color:#3b9cb6!important}[_nghost-%COMP%] .ng-select.ng-select-opened .ng-select-container .ng-value-container .ng-placeholder, [_nghost-%COMP%] .ng-select.ng-select-focused .ng-select-container .ng-value-container .ng-placeholder{transform:translate(6px) translateY(-16px) translateZ(0);color:#000}[_nghost-%COMP%] .ng-select.ng-select-filtered .ng-select-container .ng-value-container .ng-placeholder, [_nghost-%COMP%] .ng-select .ng-select-container.ng-has-value .ng-value-container .ng-placeholder{transform:translate(0) translateY(-16px) translateZ(0);color:#000}[_nghost-%COMP%] .ng-select .ng-arrow-wrapper{padding:0 5px!important;width:9px!important;height:7px;border-radius:0;background-color:transparent;border:none;background-image:url(drodown-arrow.eb377d1d30724b27.svg);background-size:9px 7px;background-position:center;background-repeat:no-repeat;transition:transform .3s cubic-bezier(.64,.09,.08,1)}[_nghost-%COMP%] .ng-select .ng-arrow-wrapper .ng-arrow{display:none}[_nghost-%COMP%] .ng-select.ng-select-opened .ng-arrow-wrapper{transform:rotate(180deg)}[_nghost-%COMP%] .ng-select .ng-clear-wrapper .ng-clear{font-size:20px}[_nghost-%COMP%] .ng-select.ng-select-multiple .ng-select-container{height:auto;padding-top:0;padding-bottom:0;justify-content:space-around}[_nghost-%COMP%] .ng-select.ng-select-multiple .ng-select-container .ng-value-container{padding:5px 0;max-width:82%}[_nghost-%COMP%] .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{display:flex;flex-direction:row;justify-content:flex-end;max-width:100%}[_nghost-%COMP%] .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-state{font-weight:600;font-style:italic;padding-right:5px;color:#33b688}[_nghost-%COMP%] .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-state.red{color:#df8181}[_nghost-%COMP%] .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input input{height:auto}[_nghost-%COMP%] .ng-select.ng-select-disabled .ng-select-container{background-color:#f2f3f5;border-color:#b2b9c5}.error-wrapper[_ngcontent-%COMP%]{height:0}.invalid[_ngcontent-%COMP%] .error-wrapper[_ngcontent-%COMP%]{height:auto}"],changeDetection:0})}}return C})()}}]);
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.