1import{$a as Oo,C as Eo,Gc as li,Hc as ui,I as Ro,Ia as ai,L as To,M as xo,Yc as _t,_a as $o,ab as Lo,db as Do,dd as Mo,fd as Vo,gd as Wo,hd as No,i as mo,k as _o,l as wo,lc as Ao,m as fo,n as So,o as vo,p as yo,pa as Ke,qa as bo,qe as ko,r as ho,ra as Io,re as Je,se as Ze,ta as Fo,u as go,ue as Uo,v as si,ye as Po,z as Co}from"./chunk-6QDVQ5WV.js";import{$a as F,$d as wn,$e as Sn,$n as Mn,$u as ii,Aq as Xn,Ba as M,Bn as Yt,Bp as Qt,Bt as Jt,Bu as ti,Ca as X,Cc as Pe,Cn as Gt,Co as ae,Ct as io,Cy as ri,D as R,Db as bt,De as Ye,Dl as xn,Dm as kt,Eb as Ae,Ed as Be,Em as In,F as Qi,Fl as ze,Fo as Pn,Ha as f,Hc as an,Hd as _n,Hl as At,Ia as Ee,Ib as w,Iu as Ce,Ja as S,Jb as v,Ji as hn,K as Y,Ka as st,Kb as nn,Kd as H,Ke as ue,Ki as gn,Kn as zt,La as Et,Lf as Fi,Li as Cn,M as rt,Ma as q,Mb as It,Mc as ln,Mi as Re,Mm as Ut,Mq as Hn,N as k,Na as j,Nb as Ii,Nc as un,Nn as Dn,O as Te,Oa as p,On as qt,Pa as l,Pb as fe,Pc as Oe,Pd as $t,Po as Bn,Q as gt,Qa as u,Qc as cn,Qo as Yn,Ra as y,Ro as Gn,Sc as pn,Sl as re,Sn as qe,Sx as uo,Ti as En,Tx as sr,Ub as on,Uf as vn,Um as Fn,Ux as co,V as xe,Va as Zi,Vm as $n,Vt as He,Vx as po,W as Xi,Wa as en,Wb as L,Wf as $i,Wn as An,Xa as _e,Xp as B,Xt as no,Xu as so,Ya as Q,Yb as Ft,Ym as ge,Z as c,Za as Ie,Zt as Le,_a as Fe,_b as Se,_c as dn,_k as Ve,_l as bn,ac as rn,af as Ot,ag as yn,ao as Vn,bb as Ne,bf as Lt,bv as ni,c as We,ca as U,cb as ke,cf as Me,cg as pt,cm as Mt,cn as Pt,cq as qn,cu as Zt,da as P,db as Rt,dm as Vt,dq as jn,dr as Kn,du as oo,e as qi,ea as Hi,eb as V,ev as ne,fb as m,fm as Wt,fs as Xt,ft as Jn,ga as be,gl as z,gn as On,go as Wn,gr as je,gt as Zn,gv as ao,he as ie,hl as Ge,hn as Bt,hr as Qe,ht as eo,i as Z,ir as Xe,ja as Ki,jl as ce,k as ee,kl as Rn,ko as Nn,kq as Qn,l as d,la as te,ln as Ln,lo as kn,m as I,me as fn,mu as ei,nd as ve,nl as T,ob as at,ot as to,pa as Ct,pb as tn,pd as mn,pm as se,qb as Tt,qd as ye,ql as dt,r as ji,rc as lt,rm as he,ro as Li,sa as r,sl as Tn,so as Di,sv as lo,tb as D,tc as Ue,tl as pe,tm as Nt,tu as ro,ub as G,uy as oi,v as De,vb as $e,vc as sn,ve as ut,vk as Oi,vl as Dt,wb as xt,wo as Un,xb as O,xt as Ht,ya as E,yb as W,yc as oe,ye as ct,yo as mt,yp as jt,yt as Kt,za as Ji,zb as $,zp as zn}from"./chunk-6VDOBKBI.js";import"./chunk-UNNH6OJB.js";import{a as x,b,f as rr,h as me}from"./chunk-HE2D45TV.js";var wt="surveys-survey",ft="surveys-services",St="surveys-resources";var Bo=(()=>{class i{constructor(){this.accountRx=c(He),this.resourcesRx=c(Zt),this.servicesRx=c(ti),this.surveysRx=c(Ce),this.showFilters$=this.accountRx.hasAccountFeature
1("enableSurveys").pipe(k(e=>e?this.surveysRx.surveys$.pipe(d(t=>t.length>0)):Z(!1)),R()),this.surveysFilter$=this.surveysRx.surveys$.pipe(d(e=>e.sort((t,n)=>{let o=t.isActive?1:0,a=n.isActive?1:0;return o===a?t.name.localeCompare(n.name):a-o})),d(e=>({id:ai(wt),name:$localize`Surveys`,categoryId:wt,stringify:t=>`${t.join(",")}`,parse:t=>t?.split(",")??[],pluckLabel:t=>t?.join(", ")??$localize`All surveys`,component:T(qe,{layout:"vertical",size:"full",selection:"multiple",panelClass:"ww-surveys-filter-trigger-select-panel",placeholder:$localize`All surveys`,data:e.map(t=>t.id),triggerComponent:T(et,{pluckLabel:t=>{let n=ie(t?.surveyIds);if(n.length===0)return $localize`All surveys`;if(n.length===1){let o=e.find(a=>a.id===n[0]);return o?o.name:$localize`1 survey`}return $localize`${n.length} surveys`}}),pluckLabel:t=>{let n=e.find(o=>o.id===t);return n?.isActive?At({$element:{classList:["flex","items-center","gap-4","w-fit"]},components:[xn({content:n.name,$element:{classList:["w-full"]}}),T(tt,{active:!0})]}):n?.name??$localize`Unknown`}})}))),this.servicesFilter$=I([this.servicesRx.hasSelectableServices$,this.servicesRx.services$,this.servicesRx.servicesById$]).pipe(d(([e,t,n])=>{if(!e)return null;let o=Object.values(n).filter(a=>a.isCategory);return{id:ai(ft),name:$localize`Services`,categoryId:ft,stringify:a=>`${a.join(",")}`,parse:a=>a?.split(",")??[],pluckLabel:a=>a?.join(", ")??$localize`Any service`,component:T(qe,{panelClass:"ww-surveys-filter-trigger-select-panel",layout:"vertical",size:"full",selection:"multiple",searchable:!0,placeholder:$localize`Any service`,data:t.map(a=>
1a.id),triggerComponent:T(et,{pluckLabel:a=>{let _=ie(a?.serviceIds);if(_.length===0)return $localize`Any service`;if(_.length===1){let h=n[_[0]];return h?h.name:$localize`1 service`}return $localize`${_.length} services`}}),groupBy:a=>{let _=n[a];if(!_)return{id:"",label:$localize`Service`};let h=o.findIndex(A=>A.id===_.id||A.id===_.parentId),g=o[h];return g?{id:g.id,label:g.name,index:h}:{id:"",label:$localize`Service`}},pluckParent:a=>n[a]?.parentId??void 0,pluckLabel:a=>n[a]?.name??$localize`Unknown`})}})),this.resourcesFilter$=I([this.resourcesRx.hasSelectableResources$,this.resourcesRx.resources$,this.resourcesRx.resourcesById$]).pipe(d(([e,t,n])=>{if(!e)return null;let o=Object.values(n).filter(a=>a.isCategory);return{id:ai(St),name:$localize`Resources`,categoryId:St,stringify:a=>`${a.join(",")}`,parse:a=>a?.split(",")??[],pluckLabel:a=>a?.join(", ")??$localize`Any resource`,component:T(qe,{panelClass:"ww-surveys-filter-trigger-select-panel",layout:"vertical",size:"full",selection:"multiple",searchable:!0,placeholder:$localize`Any resource`,data:t.map(a=>
1a.id),triggerComponent:T(et,{pluckLabel:a=>{let _=ie(a?.resourceIds);if(_.length===0)return $localize`Any resource`;if(_.length===1){let h=n[_[0]];return h?h.name:$localize`1 resource`}return $localize`${_.length} resources`}}),groupBy:a=>{let _=n[a];if(!_)return{id:"",label:$localize`Resource`};let h=o.findIndex(A=>A.id===_.id||A.id===_.parentId),g=o[h];return g?{id:g.id,label:g.name,index:h}:{id:"",label:$localize`Resource`}},pluckParent:a=>n[a]?.parentId??void 0,pluckLabel:a=>n[a]?.name??$localize`Unknown`})}}))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var it=(()=>{class i extends To{constructor(){let e=c(Hi);super(e),this.filterComponents=c(Bo),this.defaultFilterValues={surveyIds:[],serviceIds:[],resourceIds:[]},this.filters$=I([this.filterComponents.showFilters$,this.filterComponents.surveysFilter$,this.filterComponents.servicesFilter$,this.filterComponents.resourcesFilter$]).pipe(d(([t,n,o,a])=>t?[n,o,a].filter(ve):[])),this.values$=this.state$.pipe(d(t=>t.reduce((n,o)=>{switch(o.source.categoryId){case wt:n=b(x({},n),{surveyIds:o.value});break;case ft:n=b(x({},n),{serviceIds:o.value});break;case St:n=b(x({},n),{resourceIds:o.value});break}return n},this.defaultFilterValues))),this.injector=e}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Yo={0:[],1:["green2"],2:["green2","red2"],3:["green2","darkGrey","red2"],4:["green2","green4","red4","red2"],5:["green2","green4","darkGrey","red4","red2"]},Go={"CS-ISSUE-RESOLVED":["green2","red2"],"CS-RESPONSE-TIME":["green2","green4","darkGrey","red4","red2"],"EV-LENGTH":["red2","red2","green2"],"QE-JOIN-METHOD":["darkGrey","darkGrey","darkGrey","red2"],"SR-VALUED-TIME":["red2","darkGrey","green2"],"WE-WAIT-TIME-COMPARISON":["green2","green4","darkGrey","red4","red2"]},ar=Object.entries(Re).reduce((i,[s,e])=>(i[s]=e.pages.flatMap(t=>t.questions.map(n=>n.questionId)),i),{}),zo=Object.values(ar).flat(),qo=10,ci="en-US",pi=Object.keys(Re.CSAT.i18n??{}),vt={key:"surveyAnswerStatus",operator:"!=",value:hn.OPENED};
1var jo={answersData:!1,moreAnswersData:!1,metricsReportData:!1,metricsSurveyData:!1,questionsData:!1,responseTrendData:!1},de=(()=>{class i{constructor(){this.analyticsRx=c(oo),this.filterStore=c(it),this.layout=c(ne),this.locationRx=c(Le),this.queryParams=c(Sn),this.routingService=c(lo),this.surveyRx=c(Ce),this.dateRangeSub=new We(null),this.dateRange$=this.dateRangeSub.asObservable(),this.compareDateRangeSub=new We(null),this.answersResponseSub=new We(null),this.answersPaginationTokenSub=new We(null),this.defaultFormControlValues={},this.loadingStateSub=new We(jo),this.loadingState$=this.loadingStateSub.asObservable(),this.loading$=this.loadingState$.pipe(d(e=>Object.values(x({},e)).some(t=>t===!0))),this.reportingGroupKeyAndValue$=I([this.locationRx.locationId$]).pipe(d(([e])=>({key:"locationId",value:[e]}))),this.presetSurveyIds$=this.filterStore.values$.pipe(k(e=>!e||!e.surveyIds||e.surveyIds.length===0?Z([]):this.surveyRx.surveys$.pipe(d(t=>t.filter(o=>e.surveyIds?.includes(o.id)).map(o=>o.presetSurveyId??"CSAT")??[])))),this.resourceAndServiceFilters$=this.filterStore.values$.pipe(d(e=>{let t=[];return e.resourceIds&&e.resourceIds.length>0&&t.push({key:"resourceId",operator:"in",value:e.resourceIds}),e.serviceIds&&e.serviceIds.length>0&&t.push({key:"serviceId",operator:"in",value:e.serviceIds}),t}),R((e,t)=>H(e,t)),Y({refCount:!0,bufferSize:1})),this.surveyIdFilters$=this.filterStore.values$.pipe(d(e=>{let t=[];return e.surveyIds&&e.surveyIds.length>0&&t.push({key:"surveyId",operator:"in",value:e.surveyIds}),t}),R((e,t)=>H(e,t)),Y({refCount:!0,bufferSize:1})),this.presetSurveyIdFilters$=this.presetSurveyIds$.pipe(d(e=>{let t=[];return e&&e.length>0&&t.push({key:"presetSurveyId",operator:"in",value:e}),t}),R((e,t)=>H(e,t)),Y({refCount:!0,bufferSize:1})),this.metricFilters$=I([this.resourceAndServiceFilters$,this.surveyIdFilters$]).pipe(d(([e,t])=>[...e,...t]),R((e,t)=>H(e,t)),Y({refCount:!0,bufferSize:1})),this.answersFilters$=I([this.resourceAndServiceFilters$,this.presetSurveyIdFilters$]).pipe(d(([e,t])=>[...e,...t,vt]),R((e,t)=>H(e,t)),Y({refCount:!0,bufferSize:1})),this.responseTrendData$=I([this.dateRange$,this.reportingGroupKeyAndValue$,this.metricFilters$]).pipe(this.updateLoadingState("responseTrendData",!0),k(([e,t,n])=>{if(!ae(e))return Z(null);let o=[],a=Fi(e.end,e.start);return a<=31?o.push("surveyAnswerDate"):a<=180?o.push("weekStarting"):o.push("month"),this.analyticsRx.getAnalyticsCsatData(e.start,e.end,t.key,t.value,o,[...n,vt],["numSurveyAnswers","avgCsatScore"])}),this.updateLoadingState("responseTrendData",!1),Y({refCount:!0,bufferSize:1})),this.metricsReportData$=I([this.dateRange$,this.reportingGroupKeyAndValue$,this.metricFilters$]).pipe(this.updateLoadingState("metricsReportData",!0),k(([e,t,n])=>ae(e)?this.analyticsRx.getReportData(e.start,e.end,t.key,t.value,n,[],["numSurveysSent"]):Z(null)),this.updateLoadingState("metricsReportData",!1),Y({refCount:!0,bufferSize:1})),this.metricsSurveyData$=I([this.dateRange$,this.reportingGroupKeyAndValue$,this.metricFilters$]).pipe(this.updateLoadingState("metricsSurveyData",!0),k(([e,t,n])=>ae(e)?this.analyticsRx.getSurveyMetrics(e.start,e.end,t.key,t.value,[...n,vt]):Z(null)),this.updateLoadingState("metricsSurveyData",!1),Y({refCount:!0,bufferSize:1})),this.questionsData$=I([this.dateRange$,this.reportingGroupKeyAndValue$,this.metricFilters$]).pipe(this.updateLoadingState("questionsData",!0),k(([e,t,n])=>ae(e)?this.analyticsRx.getSurveyQuestionsData(e.start,e.end,t.key,t.value,[...n,{key:"surveyQuestionInputType",operator:"!=",value:"TEXTAREA"},vt]):Z(null)),this.updateLoadingState("questionsData",!1),Y({refCount:!0,bufferSize:1})),this.answersVariables$=I([this.dateRange$,this.answersFilters$,this.reportingGroupKeyAndValue$]).pipe(De(([e])=>ae(e)),gt(()=>this.answersPaginationTokenSub.next(null)),gt(()=>this.answersResponseSub.next(null)),R((e,t)=>H(e,t)),Y({refCount:!0,bufferSize:1})),this.answers$=this.answersVariables$.pipe(this.updateLoadingState("answersData",!0),k(([e,t,n])=>ae(e)?this.answersPaginationTokenSub.pipe(this.updateLoadingState("moreAnswersData",!0),k(o=>this.analyticsRx.getCsatAnswers(e.start,e.end,n.key,n.value,t,qo,o??void 0).pipe(d(a=>{if(a){let _=this.answersResponseSub.value?.data??[],h=a?.data??[],g=[..._,...h],A=b(x({},a),{data:g});this.answersResponseSub.next(A)}else this.answersResponseSub.next(null);return this.answersResponseSub.value}
1)))):Z(null)),this.updateLoadingState("answersData",!1),this.updateLoadingState("moreAnswersData",!1),Y({refCount:!0,bufferSize:1})),this.subscribeToLocationChanges(),this.subscribeToFeatureChanged()}setAnswersPaginationToken(e){this.answersPaginationTokenSub.next(e)}setLoadingState(e,t){this.loadingStateSub.next(b(x({},this.loadingStateSub.value),{[e]:t}))}setDateRange(e,t){this.dateRangeSub.next(e),this.compareDateRangeSub.next(this.getCompareDateRange(e)),t&&e&&ae(e)?(Lt(je,t),Lt(Qe,Ye(e.start)),Lt(Xe,Ye(e.end))):(Me(je),Me(Qe),Me(Xe))}getInitialFormControlValue(e,t,n){return this.defaultFormControlValues[e]=t,this.queryParams.get(e,t,n)}persistFormControlValue(e,t){if(this.defaultFormControlValues[e]===t){this.queryParams.update({remove:[e]});return}this.queryParams.set(e,t,{navigation:"replace",disableEmitEvent:!0})}openSurveyAnswerViewer(e){this.layout.open({component:{type:yt,inputs:{entityId:e,disableEntityUpdates:!0}},isEqualInputs:(t,n)=>t?.entityId===n?.entityId})}openSurveyAnswerVisitViewer(e,t){this.layout.open({component:{type:Ao,inputs:{entityId:e,disableEntityUpdates:!0}}}),this.layout.openNext({component:{type:yt,inputs:{entityId:t,disableEntityUpdates:!0}}})}updateLoadingState(e,t){return n=>n.pipe(gt(()=>this.setLoadingState(e,t)),Qi(()=>this.setLoadingState(e,!1)))}subscribeToLocationChanges(){this.locationRx.locationChanged$.subscribe(()=>{this.loadingStateSub.next(jo)})}subscribeToFeatureChanged(){this.routingService.featureChanged$.subscribe(([e,t])=>{e!==t&&e==="surveys"&&(Me(je),Me(Qe),Me(Xe))})}getCompareDateRange(e){if(ae(e)){let t=Fi(e.end,e.start);return{start:pt(e.start,t+1),end:pt(e.end,t+1)}}return null}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Qo={1:"red2",2:"red2",3:"black",4:"green2",5:"green2"},Xo={1:"red2",2:"red2",3:"lightGrey",4:"green2",5:"green2"},Ho={1:!0,2:!0,3:!1,4:!0,5:!0};function pr(i,s){i&1&&(l(0,"ww-card",1),y(1,"ww-chart-layout-placeholder"),u()),i&2&&p("bordered",!0)}function dr(i,s){if(i&1){let e=Q();l(0,"div",5)(1,"ww-link",6),V("click",function(){U(e);let n=m(2);return P(n.fetchRows.emit())}),l(2,"span"),F(3,0),u()()()}if(i&2){m();let e=$(2);r(),p("disabled",e??!1)("wwColor",e?"darkGrey":"black")}}function mr(i,s){if(i&1){let e=Q();O(0),w(1,"async"),O(2),w(3,"async"),l(4,"ww-card",3)(5,"ww-table",4),w(6,"async"),w(7,"async"),V("rowClicked",function(n){U(e);let o=m();return P(o.onRowClicked(n))}),u(),f(8,dr,4,2,"div",5),w(9,"async"),u()}if(i&2){let e=m(),t=v(1,9,e.rows$);r(2);let n=W(v(3,11,e.loadingRows$));r(2),Tt("!hidden",!n&&t&&t.length===0),p("bordered",!0),r(),p("columns",v(6,14,e.columns$))("data",t)("loading",n)("pluckCellLabel",v(7,16,e.pluckCellLabel$))("withPointerStyles",!0),r(3),S(v(9,18,e.hasMoreRows$)?8:-1)}}var mi=(()=>{class i extends z{constructor(){super(...arguments),this.commonDisplay=c(Eo),this.resourceRx=c(Zt),this.serviceRx=c(ti),this.surveysService=c(de),this.loading=null,this.loading$=this.observe("loading"),this.rows=null,this.rows$=this.observe("rows"),this.loadingRows=null,this.loadingRows$=this.observe("loadingRows"),this.hasMoreRows=null,this.hasMoreRows$=this.observe("hasMoreRows"),this.fetchRows=new be,this.columns$=I([this.resourceRx.hasSelectableResources$,this.serviceRx.hasSelectableServices$]).pipe(d(([e,t])=>{let n=[{key:"date",label:$localize`Date`},{key:"score",label:$localize`Score`},{key:"feedback",label:$localize`Feedback`},{key:"survey",label:$localize`Survey`}];return t&&n.push({key:"service",label:$localize`Service`}),e&&n.push({key:"resource",label:$localize`Resource`}),n}),this.shareReplay()),this.title=$localize`Responses`,this.pluckCellLabel$=this.columns$.pipe(d(e=>t=>e.reduce((n,o)=>{if(o.key==="date"){let a=t[o.key];return ye(a)?b(x({},n),{[o.key]:this.commonDisplay.displayDate(a)}):n}if(o.key==="score"){let a=ue(t[o.key]);if(!mn(a)||a<1||a>5)return n;let _=Qo[a],h=ce(Xo[a]),g=Ho[a]?`${h}1a`:h;return b(x({},n),{[o.key]:Bt({size:"small",component:a,backgroundColor:g,color:_,$element:{classList:["!inline-flex"]}})})}return b(x({},n),{[o.key]:t[o.key]})},{})))}onRowClicked(e){let t=e.id;ye(t)&&this.surveysService.openSurveyAnswerViewer(t)}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=te(i)))(n||i)}})()}static{this.\u0275cmp=E({type:i,selectors:[["ww-surveys-overview-answers-table"]],hostAttrs:[1,"ww-surveys-overview-answers-table"],inputs:{loading:"loading",rows:"rows",loadingRows:"loadingRows",hasMoreRows:"hasMoreRows"},outputs:{fetchRows:"fetchRows"},standalone:!1,features:[M],decls:4,vars:3,consts:()=>{let e;return e=$localize`Show more`,[e,[1,"flex","items-center","justify-center","min-h-[360px]",3,"bordered"],[1,"flex","flex-col","p-2","px-4",3,"!hidden","bordered"],[1,"flex","flex-col","p-2","px-4",3,"bordered"],[3,"rowClicked","columns","data","loading","pluckCellLabel","withPointerStyles"],[1,"flex","justify-center","gap-2","w-full","h-9"],["type","internal-in-same-tab",3,"click","disabled","wwColor"]]},template:function(t,n){if(t&1&&(O(0),w(1,"async"),f(2,pr,2,1,"ww-card",1)(3,mr,10,20,"ww-card",2)),t&2){let o=v(1,1,n.loading$);r(2),S(o?2:3)}},dependencies:[li,ge,se,jt,Qt,L],styles:[`.ww-surveys-overview-answers-table{width:100%}.ww-surveys-overview-answers-table:empty{display:none}.ww-surveys-overview-answers-table .ww-table .mat-mdc-cell{font-family:var(--ww-typography-body1-font-family);font-size:var(--ww-typography-body1-font-size);font-weight:var(--ww-typography-body1-font-weight);line-height:var(--ww-typography-body1-line-height);letter-spacing:var(--ww-typography-body1-letter-spacing)}.ww-surveys-overview-answers-table .ww-table .mat-mdc-cell ww-display-date{font-family:var(--ww-typography-body1-font-family);font-size:var(--ww-typography-body1-font-size);font-weight:var(--ww-typography-body1-font-weight);line-height:var(--ww-typography-body1-line-height);letter-spacing:var(--ww-typography-body1-letter-spacing);font-weight:400}.ww-surveys-overview-answers-table .ww-table .mat-mdc-row.mat-mdc-row .mat-mdc-cell:last-child{text-align:left}.ww-surveys-overview-answers-table .ww-table .mat-mdc-header-row.mat-mdc-header-row .mat-mdc-header-cell .ww-table-header-cell-content{text-transform:uppercase}.ww-surveys-overview-answers-table .ww-table .mat-mdc-header-row.mat-mdc-header-row .mat-mdc-header-cell:last-child .ww-table-header-cell-content{justify-content:flex-start}.ww-surveys-overview-answers-table .ww-table .mat-mdc-table.mat-mdc-table .mat-mdc-header-cell{border-top:0} 2/*noopsurveys-overview-answers-table.component-A5GYQVXW.css.map */ 3`],encapsulation:2,changeDetection:0})}}return i})();
3function fr(i,s){if(i&1&&y(0,"ww-date-range-picker",0),i&2){let e=m(),t=$(0),n=$(2);p("filters",n)("formControl",e.dateRangeFormControl)("min",t)("wwTypography","button")("size","full")}}var _i=(()=>{class i extends z{constructor(){super(),this.breakpoints=c(pe),this.accountRx=c(He),this.eventLogger=c(ii),this.surveysService=c(de),this.defaultMinDate=new Date(2023,0,1),this.defaultFilters=[An,Wn,Vn,Mn,Li,kn,Nn,Di,Un],this.dateRangeFormControl=new oe(null),this.maxAnalyticsHistoricalDays$=this.accountRx.getAccount(["features"]).pipe(d(e=>e.features.maxAnalyticsHistoricalDays)),this.minDate$=this.maxAnalyticsHistoricalDays$.pipe(d(e=>e?pt($i(),e-1):this.defaultMinDate)),this.filters$=this.minDate$.pipe(d(e=>this.defaultFilters.filter(t=>t.createDateRange().start.getTime()>=e.getTime()))),this.dateRange$=Be(this.dateRangeFormControl).pipe(De(ae),De(e=>e.start.getTime()<=e.end.getTime())),this.subscribeToDateRange()}subscribeToDateRange(){this.dateRange$.pipe(Te(this.ngOnDestroy$)).subscribe(e=>{let t=this.defaultFilters.find(n=>H(n.createDateRange(),e));t&&t.id===Di.id?this.surveysService.setDateRange({start:vn(new Date),end:$i()}
3,t.id):this.surveysService.setDateRange(e,t?.id??mt.id),this.eventLogger.log("updated_surveys_date_range",{params:{range:t?.id??mt.id}}),t&&t.id!==mt.id?(this.surveysService.persistFormControlValue("date-preset",t.id),this.surveysService.persistFormControlValue("date-start",null),this.surveysService.persistFormControlValue("date-end",null)):(this.surveysService.persistFormControlValue("date-preset",null),this.surveysService.persistFormControlValue("date-start",Ye(e.start)),this.surveysService.persistFormControlValue("date-end",Ye(e.end)))})}syncDateRangeFormControlWithQueryParamsAndSessionStorage(){let e=this.surveysService.getInitialFormControlValue("date-preset",null,ye),t=this.surveysService.getInitialFormControlValue("date-start",null,ye),n=this.surveysService.getInitialFormControlValue("date-end",null,ye);if(t&&ut(t)&&n&&ut(n)){this.dateRangeFormControl.setValue({start:ct(t),end:ct(n)});return}if(e){let h=this.defaultFilters.find(g=>g.id===e);if(h){let g=h.createDateRange();this.dateRangeFormControl.setValue(g);return}}let o=Ot(je,null,ye);if(o===mt.id){let h=Ot(Qe,null,ye),g=Ot(Xe,null,ye);if(h&&ut(h)&&g&&ut(g)){this.dateRangeFormControl.setValue({start:ct(h),end:ct(g)});return}}let a=this.defaultFilters.find(h=>h.id===o);if(a){let h=a.createDateRange();this.dateRangeFormControl.setValue(h);return}let _=Li.createDateRange();this.dateRangeFormControl.setValue(_)}ngOnInit(){this.syncDateRangeFormControlWithQueryParamsAndSessionStorage()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=E({type:i,selectors:[["ww-surveys-date-range-picker"]],hostAttrs:[1,"ww-surveys-date-range-picker"],standalone:!1,features:[M],decls:5,vars:7,consts:[[1,"ww-surveys-date-range-picker-component",3,"filters","formControl","min","wwTypography","size"]],template:function(t,n){if(t&1&&(O(0),w(1,"async"),O(2),w(3,"async"),f(4,fr,1,5,"ww-date-range-picker",0)),t&2){let o=W(v(1,1,n.minDate$));r(2);let a=W(v(3,4,n.filters$));r(2),S(o&&a?4:-1)}},dependencies:[Ue,Pe,Pn,kt,L],styles:[`.ww-surveys-date-range-picker{display:block}.ww-breakpoints-below-small .ww-surveys-date-range-picker{width:100%}.ww-surveys-date-range-picker .ww-surveys-date-range-picker-component{display:block;min-width:160px} 4/*noopsurveys-date-range-picker.component-7IBCHJB6.css.map */ 5`],encapsulation:2,changeDetection:0})}}return i})();var et=(()=>{class i extends z{constructor(){super(...arguments),this.filterStore=c(it),this.pluckLabel=null,this.pluckLabel$=this.observe("pluckLabel"),this.label$=this.pluckLabel$.pipe(k(e=>e?this.filterStore.values$.pipe(d(t=>e(t))):Z(null)))}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=te(i)))(n||i)}})()}static{this.\u0275cmp=E({type:i,selectors:[["ww-surveys-filter-trigger"]],hostAttrs:[1,"ww-surveys-filter-trigger"],inputs:{pluckLabel:"pluckLabel"},standalone:!1,features:[M],decls:5,vars:4,consts:[[1,"ww-surveys-filter-trigger-button",3,"wwButton"],["icon","bx-chevron-down"]],template:function(t,n){t&1&&(l(0,"button",0)(1,"span"),D(2),w(3,"async"),u(),y(4,"ww-icon",1),u()),t&2&&(p("wwButton","secondary"),r(2),G(v(3,2,n.label$)))},dependencies:[re,he,L],styles:[`.ww-surveys-filter-trigger{display:block;min-width:160px}.ww-surveys-filter-trigger .ww-surveys-filter-trigger-button{display:flex;justify-content:space-between;width:100%} 6/*noopsurveys-filter-trigger.component-BBNOJIWL.css.map */ 7`],encapsulation:2,changeDetection:0})}}return i})();function gr(i,s){i&1&&y(0,"ww-skeleton-placeholder",1),i&2&&p("height",30)("width",75)}
7function Cr(i,s){if(i&1&&(l(0,"ww-metric-value"),D(1),u()),i&2){let e=m();r(),xt("",e.value(),"",e.valueSuffix())}}var fi=(()=>{class i{constructor(){this.loading=fe(!0),this.title=fe(""),this.value=fe(null),this.valueSuffix=fe(null)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=E({type:i,selectors:[["ww-surveys-overview-metric"]],hostAttrs:[1,"ww-surveys-overview-metric"],inputs:{loading:[1,"loading"],title:[1,"title"],value:[1,"value"],valueSuffix:[1,"valueSuffix"]},standalone:!1,decls:7,vars:3,consts:[[3,"padding"],[3,"height","width"]],template:function(t,n){t&1&&(l(0,"ww-section")(1,"ww-section-content",0)(2,"ww-metric")(3,"ww-metric-title"),D(4),u(),f(5,gr,1,2,"ww-skeleton-placeholder",1)(6,Cr,2,2,"ww-metric-value"),u()()()),t&2&&(r(),p("padding","none"),r(3),G(n.title()),r(),S(n.loading()?5:6))},dependencies:[Wo,Mo,Vo,qt,zt,B],encapsulation:2,changeDetection:0})}}return i})();var Rr=(i,s)=>s.label;function Tr(i,s){if(i&1&&(l(0,"div",8)(1,"div",9)(2,"div"),D(3),u(),l(4,"div",10),D(5),w(6,"number"),u()(),l(7,"div",11),y(8,"div",12),u()()),i&2){let e=s.$implicit;r(3),xt("",e.label,"",e.labelSuffix),r(2),$e(" ",nn(6,6,e.percent,"1.0-0"),"% "),r(3),tn("width",e.percent,"%"),p("wwBackgroundColor",e.color)}}function xr(i,s){if(i&1&&(l(0,"div",7),q(1,Tr,9,9,"div",8,Rr),u()),i&2){let e=m();r(),j(e.values())}}function br(i,s){if(i&1&&(l(0,"div",13),y(1,"ww-chart",14),u()),i&2){m();let e=$(0);r(),p("preset","donut")("options",e)}}function Ir(i,s){if(i&1&&(O(0),f(1,br,2,2,"div",13)),i&2){let e=W(m().donutChartOptions());r(),S(e!==null?1:-1)}}var Si=(()=>{class i extends z{constructor(){super(...arguments),this.chartInputs=c(Je),this.decimalPipe=c(Se),this.title=fe(""),this.count=fe(0),this.type=fe("bars"),this.values=fe([]),this.countLabel=Ii(()=>wn($localize`response`,this.count(),$localize`responses`)),this.donutChartOptions=Ii(()=>{if(this.type()!=="donut")return null;let e=this.values(),t=e.map(o=>Rn(o.color)?ce(o.color):o.color),n=o=>`${this.decimalPipe.transform(o,"1.0-2")??""}%`;return this.chartInputs.extend({chart:{parentHeightOffset:0,height:174},responsive:[],colors:t,series:e.map(o=>o.percent),labels:e.map(o=>o.label),legend:{show:!0,position:"right",offsetY:40,offsetX:20,markers:{shape:"square",offsetX:-10}},dataLabels:{enabled:!0,formatter:n,background:{enabled:!0,padding:6,borderRadius:4,borderWidth:1,borderColor:"#fff"},style:{colors:t,fontSize:"12px"}},tooltip:{enabled:!0,y:{formatter:n}}},this.chartInputs.donut)})}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=te(i)))(n||i)}})()}static{this.\u0275cmp=E({type:i,selectors:[["ww-surveys-overview-question-chart"]],hostAttrs:[1,"ww-surveys-overview-question-chart"],inputs:{title:[1,"title"],count:[1,"count"],type:[1,"type"],values:[1,"values"]},standalone:!1,features:[M],decls:10,vars:7,consts:()=>{let e;return e=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD1\uFFFD"}:INTERPOLATION_1:`,[e,[1,"flex","flex-col","gap-4","p-4","min-h-full",3,"bordered"],[1,"flex","flex-col","gap-2"],[1,"ww-surveys-overview-question-chart-title"],[1,"flex"],["size","x-small"],[1,"w-full","h-px","border-b",3,"wwBorderColor"],[1,"flex","flex-col","gap-4","p-4","pt-0"],[1,"flex","flex-col","gap-1"],[1,"ww-surveys-overview-question-chart-value","flex","justify-between"],["wwColor","darkerGrey"],["wwBackgroundColor","lightGrey",1,"flex","w-full","rounded"],[1,"h-2","rounded",3,"wwBackgroundColor"],[1,"flex","items-center","justify-center","w-full","h-full","min-h-56"],[3,"preset","options"]]},template:function(t,n){t&1&&(l(0,"ww-card",1)(1,"div",2)(2,"div",3),D(3),u(),l(4,"div",4)(5,"ww-chip",5),F(6,0),u()()(),y(7,"div",6),f(8,xr,3,0,"div",7),f(9,Ir,2,2),u()),t&2&&(p("bordered",!0),r(3),G(n.title()),r(3),Ne(n.count())(n.countLabel()),ke(6),r(),p("wwBorderColor","mediumGrey"),r(),S(n.type()==="bars"?8:-1),r(),S(n.type()==="donut"?9:-1))},dependencies:[Ze,ge,On,se,Se],styles:[`.ww-surveys-overview-question-chart{min-height:360px}.ww-surveys-overview-question-chart .ww-surveys-overview-question-chart-title{font-family:var(--ww-typography-h5-font-family);font-size:var(--ww-typography-h5-font-size);font-weight:var(--ww-typography-h5-font-weight);line-height:var(--ww-typography-h5-line-height);letter-spacing:var(--ww-typography-h5-letter-spacing);font-weight:500}.ww-surveys-overview-question-chart .ww-surveys-overview-question-chart-value{font-family:var(--ww-typography-body2-font-family);font-size:var(--ww-typography-body2-font-size);
7font-weight:var(--ww-typography-body2-font-weight);line-height:var(--ww-typography-body2-line-height);letter-spacing:var(--ww-typography-body2-letter-spacing);font-weight:500} 8/*noopsurveys-overview-question-chart.component-WBUL4KMK.css.map */ 9`],encapsulation:2,changeDetection:0})}}return i})();function Or(i,s){i&1&&y(0,"ww-chart",1),i&2&&p("options",s)}var vi=(()=>{class i{constructor(){this.breakpoints=c(pe),this.chartInputs=c(Je),this.datePipe=c(Ft),this.decimalPipe=c(Se),this.surveysService=c(de),this.title=$localize`Responses`,this.loading$=this.surveysService.loadingState$.pipe(d(e=>e.responseTrendData||e.metricsReportData||e.metricsSurveyData),R(),Y({bufferSize:1,refCount:!0})),this.response$=this.surveysService.responseTrendData$.pipe(R((e,t)=>H(e,t)),Y({bufferSize:1,refCount:!0})),this.dataMap$=this.response$.pipe(d(e=>this.createDataMap(e))),this.chart$=I([this.dataMap$,this.breakpoints.isBelowMobile$]).pipe(d(([e,t])=>this.createChart(!1,e.period,e.responses,e.labels,t)))}createDataMap(e){let t=e?.dimensions?.[0];if(!e||!ve(t))return{responses:[],avgScore:[],labels:[],hideLegend:!0,legendItems:[],dateRange:"",columns:[],rows:[],period:"surveyAnswerDate",pluckCellLabel:null};let n=[{key:"responses",label:$localize`Responses`,color:Ve["csat-responses"]}],o=[{key:"period",label:$localize`Period`,sortable:!0},{key:"responses",label:$localize`Responses`,sortable:!0}],a=ie(e?.data).filter(C=>t==="weekStarting"?(C.weekStarting??"").length>0:t==="month"?(C.month??"").length>0:(C.surveyAnswerDate??"").length>0),_=Xt(a,t,e.fromDate,e.toDate,e.weekdayStart),h=_.map(C=>t==="weekStarting"?C.weekStarting:t==="month"?`${C.month??"2020-01"}-01`:C.surveyAnswerDate).map(C=>`${C}T00:00`),g=_.map(C=>{let K=C.surveyAnswerDate,we="shortDate";return t==="weekStarting"?(K=C.weekStarting,we="shortDate"):t==="month"&&(K=`${C.month??"2020-01"}-01`,we="yyyy MMM"),{period:{value:this.datePipe.transform(K,we)??K,sortableValue:K},response:C.numSurveyAnswers,avgScore:C.avgCsatScore}}),A={responses:g.map(C=>C.response),avgScore:g.map(C=>C.avgScore),labels:h,legendItems:n,dateRange:`${e.fromDate}-${e.toDate}`,columns:o,rows:g,period:t};return b(x({},A),{hasData:$t(A.responses)>0,hasInternalPadding:!0,hideLegend:!0})}createChart(e,t,n,o,a){let _={bar:{borderRadius:2,dataLabels:{position:"top"}}};this.breakpoints.isBelowMobile&&(_=b(x({},_),{bar:b(x({},_.bar),{columnWidth:"8"})})),this.breakpoints.isAboveMobile&&n.length>7&&(_=b(x({},_),{bar:b(x({},_.bar),{columnWidth:n.length<12?"24":"12"})}));let h=Math.max(...n);return this.chartInputs.extend({plotOptions:_,series:[{name:$localize`Responses`,data:n,color:Ve["csat-responses"]}],dataLabels:{enabled:!0,offsetY:-20,style:{colors:[ce("darkerGrey")],fontSize:"11px"},formatter:g=>g===0?"":this.decimalPipe.transform(g,"1.0-0")??""},colors:[Ve["csat-responses"]],labels:o,xAxis:{type:"datetime",labels:{show:!0,hideOverlappingLabels:!0,rotateAlways:!1,rotate:-45,trim:!1,style:{colors:ce("darkerGrey"),fontWeight:200,fontSize:"11px"},datetimeFormatter:{year:"yyyy",month:"MMM yy",day:"dd MMM",hour:"HH:mm"},formatter:g=>t==="month"?this.datePipe.transform(g,"LLL yyyy")??"":t==="weekStarting"?this.datePipe.transform(g,"dd MMM")??"":this.datePipe.transform(g,"dd MMM")??""},tickAmount:o.length>7?7:o.length,axisBorder:{show:!1},axisTicks:{show:!1},tooltip:{enabled:!1}},yAxis:{show:!0,min:0,max:h+1,labels:{show:!0,formatter:g=>this.decimalPipe.transform(g,"1.0-0")??"",style:{colors:ce("darkerGrey")}}},tooltip:{x:{formatter:(g,A)=>t==="month"?`${this.datePipe.transform(o[A.dataPointIndex??0],"LLL yyyy")}`:t==="weekStarting"?`Week starting on ${this.datePipe.transform(o[A.dataPointIndex??0],"dd MMM")}`:this.datePipe.transform(o[A.dataPointIndex??0],"dd MMM")??""}},chart:{type:"bar",parentHeightOffset:0,height:e?"400":"240",events:{click:()=>{}}},responsive:[],grid:{show:!0,position:"back",borderColor:ce("mediumGrey"),xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}}}},this.chartInputs.bar)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=E({type:i,selectors:[["ww-surveys-overview-response-trend"]],hostAttrs:[1,"ww-surveys-overview-response-trend","p-4"],standalone:!1,decls:5,vars:11,consts:[[3,"chartTitle","loading","dataMap","withoutCardLayout"],["preset","bar",3,"options"]],template:function(t,n){if(t&1&&(l(0,"ww-chart-layout",0),w(1,"async"),w(2,"async"),f(3,Or,1,1,"ww-chart",1),w(4,"async"),u()),t&2){let o;p("chartTitle",n.title)("loading",v(1,5,n.loading$))("dataMap",v(2,7,n.dataMap$))("withoutCardLayout",!0),r(3),S((o=v(4,9,n.chart$))?3:-1,o)}},dependencies:[Ze,ui,L],encapsulation:2,changeDetection:0})}}return i})();function Dr(i,s){i&1&&y(0,"ww-chart",1),i&2&&p("options",s)}var yi=(()=>{class i{constructor(){this.breakpoints=c(pe),this.chartInputs=c(Je),this.datePipe=c(Ft),this.decimalPipe=c(Se),this.surveysService=c(de),this.title=$localize`Satisfaction score`,this.loading$=this.surveysService.loadingState$.pipe(d(e=>e.responseTrendData||e.metricsReportData||e.metricsSurveyData),R(),Y({bufferSize:1,refCount:!0})),this.response$=this.surveysService.responseTrendData$.pipe(R((e,t)=>H(e,t)),Y({bufferSize:1,refCount:!0})),this.dataMap$=this.response$.pipe(d(e=>this.createDataMap(e)),Y({bufferSize:1,refCount:!0})),this.chart$=I([this.dataMap$,this.breakpoints.isBelowMobile$]).pipe(d(([e,t])=>this.createChart(!1,e.period,e.avgScore,e.labels,t)),Y({bufferSize:1,refCount:!0}))}createDataMap(e){let t=e?.dimensions?.[0];if(!e||!ve(t))return{avgScore:[],labels:[],hideLegend:!0,legendItems:[],dateRange:"",columns:[],rows:[],peri
9od:"surveyAnswerDate",pluckCellLabel:null};let n=[{key:"avgScore",label:$localize`Avg score`,color:Ve["csat-avg-score"]}],o=[{key:"period",label:$localize`Period`,sortable:!0},{key:"avgScore",label:$localize`Avg score`,sortable:!0}],a=ie(e?.data).filter(C=>t==="weekStarting"?(C.weekStarting??"").length>0:t==="month"?(C.month??"").length>0:(C.surveyAnswerDate??"").length>0),_=Xt(a,t,e.fromDate,e.toDate,e.weekdayStart),h=_.map(C=>t==="weekStarting"?C.weekStarting:t==="month"?`${C.month??"2020-01"}-01`:C.surveyAnswerDate).map(C=>`${C}T00:00`),g=_.map(C=>{let K=C.surveyAnswerDate,we="shortDate";return t==="weekStarting"?(K=C.weekStarting,we="shortDate"):t==="month"&&(K=`${C.month??"2020-01"}-01`,we="yyyy MMM"),{period:{value:this.datePipe.transform(K,we)??K,sortableValue:K},response:C.numSurveyAnswers,avgScore:C.avgCsatScore}}),A={avgScore:g.map(C=>C.avgScore),labels:h,legendItems:n,dateRange:`${e.fromDate}-${e.toDate}`,columns:o,rows:g,period:t};return b(x({},A),{hasData:$t(A.avgScore)>0,hasInternalPadding:!0,hideLegend:!0})}createChart(e,t,n,o,a){let _={bar:{borderRadius:4}};return this.breakpoints.isAboveMobile&&t==="month"&&(_=b(x({},_),{bar:b(x({},_.bar),{columnWidth:"32"})})),this.chartInputs.extend({plotOptions:_,legend:{show:!1},series:[{name:$localize`Avg score`,data:n,color:Ve["csat-avg-score"]}],stroke:{width:3,curve:"smooth"},fill:{type:"gradient",gradient:{shadeIntensity:1,opacityFrom:.7,opacityTo:.9,stops:[0,90,100]}},labels:o,tooltip:{y:{formatter:h=>this.decimalPipe.transform(h,"1.0-1")??""},x:{formatter:(h,g)=>t==="month"?`${this.datePipe.transform(o[g.dataPointIndex??0],"LLL yyyy")}`:t==="weekStarting"?$localize`Week starting on ${this.datePipe.transform(o[g.dataPointIndex??0],"dd MMM")}`:this.datePipe.transform(o[g.dataPointIndex??0],"dd MMM")??""}},xAxis:{type:"datetime",labels:{show:!0,hideOverlappingLabels:!0,rotateAlways:!1,rotate:-45,trim:!1,style:{colors:ce("darkerGrey"),fontWeight:200,fontSize:"11px"},datetimeFormatter:{year:"yyyy",month:"MMM yy",day:"dd MMM",hour:"HH:mm"},formatter:h=>t==="month"?this.datePipe.transform(h,"LLL yyyy")??"":t==="weekStarting"?this.datePipe.transform(h,"dd MMM")??"":this.datePipe.transform(h,"dd MMM")??""},tickAmount:o.length>7?7:o.length,axisBorder:{show:!1},axisTicks:{show:!1},tooltip:{enabled:!1}},yAxis:[{min:0,max:5,labels:{show:!0,formatter:h=>this.decimalPipe.transform(h,"1.0-0")??""}}],chart:{parentHeightOffset:0,height:e?"400":"240",events:{click:()=>{}}},responsive:[],grid:{show:!0,position:"back",borderColor:ce("mediumGrey"),xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}}}},this.chartInputs.area)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=E({type:i,selectors:[["ww-surveys-overview-score-distribution"]],hostAttrs:[1,"ww-surveys-overview-score-distribution","p-4"],standalone:!1,decls:5,vars:11,consts:[[3,"chartTitle","loading","dataMap","withoutCardLayout"],["preset","area",3,"options"]],template:function(t,n){if(t&1&&(l(0,"ww-chart-layout",0),w(1,"async"),w(2,"async"),f(3,Dr,1,1,"ww-chart",1),w(4,"async"),u()),t&2){let o;p("chartTitle",n.title)("loading",v(1,5,n.loading$))("dataMap",v(2,7,n.dataMap$))("withoutCardLayout",!0),r(3),S((o=v(4,9,n.chart$))?3:-1,o)}},dependencies:[Ze,ui,L],encapsulation:2,changeDetection:0})}}return i})();var Vr=(i,s)=>s.key;function Wr(i,s){i&1&&_e(0)}function Nr(i,s){i&1&&_e(0)}
9function kr(i,s){if(i&1&&(l(0,"ww-display-object-key"),X(1,Wr,1,0,"ng-container",4),u(),l(2,"ww-display-object-value"),X(3,Nr,1,0,"ng-container",4),u()),i&2){let e=s.$implicit;r(),p("wwOutlet",e.label),r(2),p("wwOutlet",e.component)}}function Ur(i,s){i&1&&(l(0,"ww-display-object"),q(1,kr,4,2,null,null,Vr),u()),i&2&&(r(),j(s))}function Pr(i,s){i&1&&(l(0,"div",3),y(1,"mat-spinner"),u())}var Br=Tn(Ge),yt=(()=>{class i extends Br{constructor(){super(...arguments),this.coreSurveyRx=c(ri),this.layout=c(ne),this.surveyAnswerProperties=c(ko),this.surveysService=c(de),this._entityApi=e=>this.coreSurveyRx.getAnswer(e),this.properties$=this._entity$.pipe(k(e=>this.surveyAnswerProperties.getProperties(e)),d(e=>to(e,{visitId:{display:t=>zn({type:"internal-in-same-tab",content:t.visit.id,$element:{color:"black",eventListeners:{click:n=>{n.preventDefault(),this.surveysService.openSurveyAnswerVisitViewer(t.visit.id,t.id)}}}})}}))),this.labelledComponents$=this._entity$.pipe(k(e=>e?this.properties$.pipe(d(t=>Co(e,Object.values(t),[]))):Z([])))}close(){this.layout.close()}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=te(i)))(n||i)}})()}static{this.\u0275cmp=E({type:i,selectors:[["ww-survey-answer-viewer"]],hostAttrs:[1,"ww-survey-answer-viewer"],inputs:{entity:"entity",entityId:"entityId",disableEntityUpdates:"disableEntityUpdates"},standalone:!1,features:[M],decls:12,vars:8,consts:[["wwButton","tertiary",3,"click","ariaLabel"],["icon","bx-x"],[3,"padding"],[1,"flex","justify-center","w-full"],[4,"wwOutlet"]],template:function(t,n){if(t&1&&(l(0,"ww-section"),O(1),w(2,"async"),l(3,"ww-section-title")(4,"span"),D(5),u(),l(6,"button",0),V("click",function(){return n.close()}),y(7,"ww-icon",1),u()(),l(8,"ww-section-content",2),f(9,Ur,3,0,"ww-display-object"),w(10,"async"),Ee(11,Pr,2,0,"div",3),u()()),t&2){let o,a=v(2,4,n._entity$);r(5),G(a==null?null:a.presetSurveyId),r(),p("ariaLabel","Close"),r(2),p("padding","large"),r(),S((o=v(10,6,n.labelledComponents$))?9:11,o)}},dependencies:[Ut,re,Gn,Bn,Yn,he,ze,qt,zt,Dn,L],encapsulation:2,changeDetection:0})}}return i})();function Yr(i,s){i&1&&(l(0,"div",2)(1,"div",4),y(2,"ww-icon",5),u(),l(3,"span",6),F(4,0),u()())}function Gr(i,s){i&1&&(l(0,"div",3)(1,"div",7),y(2,"ww-icon",8),u(),l(3,"span"),F(4,1),u()())}var tt=(()=>{class i{constructor(){this.active=!1}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=E({type:i,selectors:[["ww-surveys-status-indicator"]],hostAttrs:[1,"ww-surveys-status-indicator"],inputs:{active:"active"},standalone:!1,decls:2,vars:1,consts:()=>{let e;e=$localize`Active`;let t;return t=$localize`Inactive`,[e,t,[1,"flex","items-center","gap-1"],[1,"flex","items-center","gap-2"],["wwBackgroundColor","success-alpha-20",1,"rounded-full","p-0.5"],["icon","bxs-circle","wwColor","success","size","x-small"],["wwColor","darkerGrey"],["wwBackgroundColor","lightGrey",1,"rounded-full","p-0.5"],["icon","bxs-minus-circle","wwColor","darkGrey","size","x-small"]]},template:function(t,n){t&1&&f(0,Yr,5,0,"div",2)(1,Gr,5,0,"div",3),t&2&&S(n.active?0:1)},dependencies:[se,he],encapsulation:2,changeDetection:0})}}return i})();function jr(i,s){i&1&&y(0,"ww-illustration",2),i&2&&p("icon","ww-surveys-preset-active")}function Qr(i,s){i&1&&y(0,"ww-illustration",2),i&2&&p("icon","ww-surveys-preset-inactive")}function Xr(i,s){i&1&&y(0,"ww-account-feature-icon")}function Hr(i,s){if(i&1&&y(0,"ww-surveys-status-indicator",7),i&2){let e=m();p("active",e.active)}}var hi=(()=>{class i{constructor(){this.breakpoints=c(pe),this.dialog=c(Gt),this.router=c(Oe),this.active=!1,this.locked=!1,this.presetId=null,this.name=null,this.description=null}navigate(){if(this.locked){this.dialog.open(T(So,{featureName:$localize`Survey addons`,missingAccountFeatures:["enableSurveys"]}),{size:this.breakpoints.isBelowSmall?"bottom-sheet":"auto"});return}this.router.navigate(["/surveys/edit"],{queryParams:{presetId:this.presetId}})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=E({type:i,selectors:[["ww-surveys-template"]],hostAttrs:[1,"ww-surveys-template"],inputs:{active:"active",locked:"locked",presetId:"presetId",name:"name",description:"description"},standalone:!1,decls:11,vars:4,consts:[[1,"ww-surveys-template-card",3,"click"],[1,"ww-surveys-template-card-content"],[1,"ww-surveys-template-card-content-image",3,"icon"],[1,"ww-surveys-template-card-detail
9s"],[1,"flex","items-center","gap-2"],[1,"ww-surveys-template-card-name"],[1,"ww-surveys-template-card-description"],[3,"active"]],template:function(t,n){t&1&&(l(0,"ww-card",0),V("click",function(){return n.navigate()}),l(1,"div",1),f(2,jr,1,1,"ww-illustration",2)(3,Qr,1,1,"ww-illustration",2),u(),l(4,"div",3)(5,"div",4)(6,"span",5),D(7),u(),f(8,Xr,1,0,"ww-account-feature-icon"),u(),l(9,"div",6),f(10,Hr,1,1,"ww-surveys-status-indicator",7),u()()()),t&2&&(r(2),S(n.active?2:3),r(5),G(n.name),r(),S(n.locked?8:-1),r(2),S(n.locked?-1:10))},dependencies:[vo,ge,Nt,tt],styles:[`.ww-surveys-template{cursor:pointer}.ww-surveys-template .ww-surveys-template-card{display:flex;flex-direction:column;height:256px;width:340px;border-radius:16px}.ww-surveys-template .ww-surveys-template-card .ww-surveys-template-card-content{display:flex;flex:1;overflow:hidden}.ww-breakpoints-below-mobile .ww-surveys-template .ww-surveys-template-card .ww-surveys-template-card-content .ww-surveys-template-card-content-image{width:100%}.ww-breakpoints-below-mobile .ww-surveys-template .ww-surveys-template-card .ww-surveys-template-card-content .ww-surveys-template-card-content-image svg{width:100%;height:auto}.ww-surveys-template .ww-surveys-template-card .ww-surveys-template-card-details{display:flex;flex-direction:column;padding:16px 16px 16px 20px;gap:4px;border-top:1px solid var(--ww-color-mediumGrey)}.ww-surveys-template .ww-surveys-template-card .ww-surveys-template-card-name{font-family:var(--ww-typography-h5-font-family);font-size:var(--ww-typography-h5-font-size);font-weight:var(--ww-typography-h5-font-weight);line-height:var(--ww-typography-h5-line-height);letter-spacing:var(--ww-typography-h5-letter-spacing)}.ww-surveys-template .ww-surveys-template-card .ww-surveys-template-card-description{display:flex;font-family:var(--ww-typography-body2-font-family);font-size:var(--ww-typography-body2-font-size);font-weight:var(--ww-typography-body2-font-weight);line-height:var(--ww-typography-body2-line-height);letter-spacing:var(--ww-typography-body2-letter-spacing);color:var(--ww-color-darkerGrey);min-height:20px}.ww-breakpoints-below-mobile .ww-surveys-template .ww-surveys-template-card{width:100%;height:auto}.ww-breakpoints-below-mobile .ww-surveys-template{width:100%} 10/*noopsurvey-template.component-FRIDN5OZ.css.map */ 11`],encapsulation:2,changeDetection:0})}}return i})();var Mi=rr(sr());function ts(i,s){i&1&&_e(0)}function is(i,s){i&1&&_e(0)}function ns(i,s){if(i&1&&(l(0,"ww-sublabel"),X(1,is,1,0,"ng-container",5),u()),i&2){let e=m(3);r(),p("wwOutlet",e.sublabel)}}function os(i,s){if(i&1&&(l(0,"ww-label"),X(1,ts,1,0,"ng-container",5),f(2,ns,2,1,"ww-sublabel"),u()),i&2){let e=m(2);r(),p("wwOutlet",e.label),r(),S(e.sublabel?2:-1)}}function rs(i,s){i&1&&(Ie(0,0,2),y(1,"span"),Fe())}function ss(i,s){i&1&&F(0,0,3)}function as(i,s){if(i&1&&(Ie(0,0,1),f(1,rs,2,0,"span"),f(2,ss,1,0),Fe()),i&2){let e=s.$implicit,t=s.$index,n=s.$index,o=s.$count;m(2);let a=$(5);r(),S(t>0&&a.length>2?1:-1),r(),S(n===o-1&&n!==0?2:-1),Ne(e),ke(0)}}function ls(i,s){i&1&&F(0,0,4)}function us(i,s){i&1&&F(0,0,5)}function cs(i,s){if(i&1&&(l(0,"p",3),Ie(1,0),q(2,as,3,3,null,null,Et),f(4,ls,1,0)(5,us,1,0),Fe(),u()),i&2){m();let e=$(5);r(2),j(e),r(2),S(e.length===1?4:5)}}function ps(i,s){if(i&1){let e=Q();l(0,"ww-i18n-string-input",6),w(1,"async"),V("localeChanged",function(n){U(e);let o=m(2);return P(o.localeChanged.emit(n))}),u()}if(i&2){let e=m(2);p("formControl",e.linkTextFormControl)("locales",e.locales)("selectedLocale",v(1,3,e.selectedLocale$))}}function ds(i,s){if(i&1&&(l(0,"ww-label-layout"),f(1,os,3,2,"ww-label"),l(2,"div",1)(3,"div"),y(4,"ww-select",2),O(5),w(6,"async"),f(7,cs,6,1,"p",3),u(),f(8,ps,2,5,"ww-i18n-string-input",4),u()()),i&2){let e=m(),t=$(0);r(),S(e.label?1:-1),r(3),p("layout","vertical")("data",t)("selection","multiple")("formControl",e.includeInFormControl)("pluckLabel",e.pluckLabel),r();let n=W(v(6,8,e.selectedAndDisabledMessageTypes$));r(2),S(n&&n.length>0?7:-1),r(),S(e.includeInFormControl.value&&e.includeInFormControl.value.length>0?8:-1)}}var ms=Dt(Ge),gi=(()=>{class i extends ms{constructor(){super(...arguments),this.coreLocationRx=c(oi),this.messageConfigRx=c(ro),this.locales=null,this.selectedLocale=null,this.selectedLocale$=this.observe("selectedLocale"),this.localeChanged=new be,this.linkTextFormControl=new oe({value:null,i18n:{}},{validators:[lt.required]}),this.includeInFormControl=new oe([]),this.viewValue$=I([Be(this.linkTextFormControl),Be(this.includeInFormControl)]).pipe(De(()=>this.linkTextFormControl.dirty||this.includeInFormControl.dirty),d(([e,t])=>!e||!t||!t.length?null:{includeIn:t,linkText:e})),this.availableMessageTypes$=this.coreLocationRx.getCurrentNullableLocation(["isBookingActive","
11isWaitlistActive","bookingManualConfirmation"]).pipe(d(e=>Hn.filter(t=>!(Jn(t)&&!e?.isBookingActive||eo(t)&&!e?.bookingManualConfirmation||Zn(t)&&!e?.isWaitlistActive))),this.shareReplay()),this.activeEmailMessageTypes$=this.messageConfigRx.messageConfigs$.pipe(d(e=>e.filter(t=>t.channels.includes("EMAIL")).map(t=>t.type)),this.shareReplay()),this.selectedAndDisabledMessageTypes$=I([this.activeEmailMessageTypes$,Be(this.includeInFormControl)]).pipe(d(([e,t])=>t?t.filter(n=>!e.includes(n)).map(n=>Oi[n]):[])),this.pluckLabel=e=>Oi[e]}writeValue(e){this.linkTextFormControl.setValue(e?.linkText??{value:"",i18n:{}},{emitEvent:!1}),this.includeInFormControl.setValue(e?.includeIn??[],{emitEvent:!1})}registerOnChange(e){this.viewValue$.pipe(Te(this.ngOnDestroy$)).subscribe(e)}registerOnTouched(){}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=te(i)))(n||i)}})()}static{this.\u0275cmp=E({type:i,selectors:[["ww-surveys-include-in-messages"]],hostAttrs:[1,"ww-surveys-include-in-messages-editor"],inputs:{hint:"hint",label:"label",sublabel:"sublabel",placeholder:"placeholder",ariaLabel:"ariaLabel",ariaLabelledby:"ariaLabelledby",autoFocus:"autoFocus",locales:"locales",selectedLocale:"selectedLocale"},outputs:{localeChanged:"localeChanged"},standalone:!1,features:[M],decls:3,vars:4,consts:()=>{let e;e=$localize`Add a linked button to the following email templates:`;let t;t=$localize`Button text`;let n;return n=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD*1:2\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPAN:,${"\uFFFD/#1:2\uFFFD"}:CLOSE_TAG_SPAN:${"[\uFFFD/*1:2\uFFFD|\uFFFD/*2:3\uFFFD|\uFFFD/*4:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*2:3\uFFFD"}:START_BLOCK_IF_1: and ${"[\uFFFD/*1:2\uFFFD|\uFFFD/*2:3\uFFFD|\uFFFD/*4:4\uFFFD]"}:CLOSE_BLOCK_IF: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD*4:4\uFFFD"}:START_BLOCK_IF_2: is currently not enabled ${"[\uFFFD/*1:2\uFFFD|\uFFFD/*2:3\uFFFD|\uFFFD/*4:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*5:5\uFFFD"}:START_BLOCK_ELSE: are currently not enabled ${"\uFFFD/*5:5\uFFFD"}:CLOSE_BLOCK_ELSE:`,n=Rt(n),[n,[1,"flex","flex-col","gap-4","pt-2","max-w-full"],["label",e,3,"layout","data","selection","formControl","pluckLabel"],["wwColor","darkerGrey","wwTypography","body2"],["size","large","layout","vertical","label",t,3,"formControl","locales","selectedLocale"],[4,"wwOutlet"],["size","large","layout","vertical","label",t,3,"localeChanged","formControl","locales","selectedLocale"]]},template:function(t,n){if(t&1&&(O(0),w(1,"async"),f(2,ds,9,11,"ww-label-layout")),t&2){let o=W(v(1,1,n.availableMessageTypes$));r(2),S(o&&o.length>0?2:-1)}},dependencies:[Ue,Pe,_t,se,Vt,Mt,Wt,ze,qe,kt,L],encapsulation:2,changeDetection:0})}}return i})();var Ai={EMOJI:{1:"\u{1F620}",2:"\u{1F641}",3:"\u{1F610}",4:"\u{1F60A}",5:"\u{1F604}"},STARS:{1:"\u2B50",2:"\u2B50",3:"\u2B50",4:"\u2B50",5:"\u2B50"}};function _s(i,s){if(i&1&&(l(0,"div",1),D(1),u()),i&2){m();let e=$(1);r(),$e(" ",e," ")}}function ws(i,s){if(i&1&&(l(0,"button",5),D(1),u()),i&2){let e=s.$implicit;p("disabled",!0),r(),$e(" ",e," ")}}function fs(i,s){if(i&1&&(l(0,"div",6)(1,"div",7),D(2),u(),l(3,"div",7),D(4),u()()),i&2){m(2);let e=$(0);r(2),G(e.minValueDescription),r(2),G(e.maxValueDescription)}}function Ss(i,s){if(i&1&&(l(0,"div",3)(1,"div",4),q(2,ws,2,2,"button",5,st),u(),f(4,fs,5,2,"div",6),u()),i&2){m();let e=$(0);r(2),j(e.entries),r(2),S(e.minValueDescription||e.maxValueDescription?4:-1)}}function vs(i,s){if(i&1&&(O(0),w(1,"async"),f(2,Ss,5,1,"div",3)),i&2){let e=W(v(1,1,m(2).numbers$));r(2),S(e?2:-1)}}function ys(i,s){if(i&1&&(l(0,"button",9),D(1),u()),i&2){let e=s.$implicit;p("disabled",!0),r(),$e(" ",e," ")}}function hs(i,s){if(i&1&&(l(0,"div",8),q(1,ys,2,2,"button",9,st),u()),i&2){m();let e=$(0);r(),j(e)}}function gs(i,s){if(i&1&&(O(0),w(1,"async"),f(2,hs,3,0,"div",8)),i&2){let e=W(v(1,1,m(2).choices$));r(2),S(e?2:-1)}}function Cs(i,s){if(i&1&&(y(0,"ww-textarea",2),w(1,"async")),i&2){let e=m(2);p("formControl",e.formControl)("placeholder",v(1,2,e.placeholder$))}}function Es(i,s){if(i&1&&(l(0,"div",0),O(1),w(2,"async"),f(3,_s,2,1,"div",1),f(4,vs,3,4),f(5,gs,3,4),f(6,Cs,2,4,"ww-textarea",2),u()),i&2){let e=m();r();let t=W(v(2,4,e.displayName$));r(2),S(t?3:-1),r(),S(e.question.inputType==="NUMBER"?4:-1),r(),S(e.question.inputType==="CHOICE"?5:-1),r(),S(e.question.inputType==="TEXTAREA"?6:-1)}}var Rs=Dt(Ge),Ci=(()=>{class i extends Rs{constructor(){super(...arguments),this.question=null,this.locales=null,this.locales$=this.observe("locales"),this.selectedLocale=null,this.selectedLocale$=this.observe("selectedLocale"),this.formControl=new oe(""),this.choices$=this.selectedLocale$.pipe(d(e=>e?this.question?.i18n?.[e]?.inputOptions??this.question?.inputOptions??[]:this.question?.inputOptions??[]),R((e,t)=>H(e,t))),this.numbers$=this.selectedLocale$.pipe(d(e=>{let t=ue(this.question?.minValue),n=ue(this.question?.maxValue),o=[];return t!==null&&n!==null&&(o=Array.from({length:n-t+1},(a,_)=>`${t+_}
11`),this.question?.numberDisplayType==="EMOJI"?o=o.map(a=>{let _=ue(a)??Number.NaN;return Ai.EMOJI[_]??a}):this.question?.numberDisplayType==="STARS"&&(o=o.map(a=>{let _=ue(a)??Number.NaN;return Ai.STARS[_]??a}))),!e||!this.question?.i18n?.[e]?{entries:o,minValue:this.question?.minValue,minValueDescription:this.question?.minValueDescription,maxValue:this.question?.maxValue,maxValueDescription:this.question?.maxValueDescription,numberDisplayType:this.question?.numberDisplayType}:{entries:o,minValue:this.question?.minValue,minValueDescription:this.question.i18n[e].minValueDescription??this.question?.minValueDescription,maxValue:this.question?.maxValue,maxValueDescription:this.question.i18n[e].maxValueDescription??this.question?.maxValueDescription,numberDisplayType:this.question.numberDisplayType}}),R((e,t)=>H(e,t))),this.displayName$=this.selectedLocale$.pipe(d(e=>e?this.question?.i18n?.[e]?.displayName??this.question?.displayName??"":this.question?.displayName??""),R()),this.placeholder$=this.selectedLocale$.pipe(d(e=>e?this.question?.i18n?.[e]?.placeholder??this.question?.placeholder??"":this.question?.placeholder??""),R())}ngOnInit(){this.question&&Kt(this.question.id)&&this.formControl.disable()}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=te(i)))(n||i)}})()}static{this.\u0275cmp=E({type:i,selectors:[["ww-surveys-editor-question-form"]],hostAttrs:[1,"ww-surveys-editor-question-form"],hostVars:2,hostBindings:function(t,n){t&2&&Tt("ww-surveys-editor-question-form-borderless",(n.question==null?null:n.question.inputType)!=="TEXTAREA")},inputs:{question:"question",locales:"locales",selectedLocale:"selectedLocale"},standalone:!1,features:[M],decls:1,vars:1,consts:[["wwFormFieldSize","large",1,"ww-surveys-editor-question-form-content"],[1,"ww-surveys-editor-question-form-title"],[3,"formControl","placeholder"],[1,"flex","flex-col","gap-2"],[1,"flex","items-center","justify-between","gap-3"],["wwButton","secondary",1,"ww-surveys-editor-question-form-number",3,"disabled"],[1,"flex","justify-between"],["wwColor","darkGrey"],[1,"flex","flex-col","gap-3"],["wwButton","secondary",1,"ww-surveys-editor-question-form-choice",3,"disabled"]],template:function(t,n){t&1&&f(0,Es,7,7,"div",0),t&2&&S(n.question?0:-1)},dependencies:[Ue,Pe,re,se,bn,Ln,L],styles:[`.ww-surveys-editor-question-form .ww-label-layout.ww-label-layout-horizontal{border-bottom:none;padding-bottom:8px}.ww-surveys-editor-question-form .ww-label-layout.ww-label-layout-horizontal .mat-mdc-input-element[disabled]{color:var(--ww-color-black)}.ww-surveys-editor-question-form .ww-surveys-editor-question-form-content{display:flex;flex-direction:column;gap:16px}.ww-surveys-editor-question-form .ww-surveys-editor-question-form-content .ww-surveys-editor-question-form-title{font-family:var(--ww-typography-h5-font-family);font-size:var(--ww-typography-h5-font-size);font-weight:var(--ww-typography-h5-font-weight);line-height:var(--ww-typography-h5-line-height);letter-spacing:var(--ww-typography-h5-letter-spacing)}.ww-surveys-editor-question-form .ww-surveys-editor-question-form-content .ww-surveys-editor-question-form-number{border:1px solid var(--ww-color-darkGrey);font-weight:300;width:100%}.ww-surveys-editor-question-form .ww-surveys-editor-question-form-content .ww-surveys-editor-question-form-choice{border:1px solid var(--ww-color-darkGrey);font-weight:300;justify-content:flex-start;width:100%} 12/*noopsurveys-editor-question-form.component-DRKMAAND.css.map */ 13`],encapsulation:2,changeDetection:0})}}return i})();function xs(i,s){if(i&1&&(y(0,"ww-surveys-editor-question-form",4),w(1,"async"),w(2,"async")),i&2){let e=s.$implicit,t=m();p("question",e)("locales",v(1,3,t.locales$))("selectedLocale",v(2,5,t.selectedLocale$))}}var Ei=(()=>{class i extends z{constructor(){super(...arguments),this.surveyName=null,this.surveyName$=this.observe("surveyName"),this.questions=null,this.questions$=this.observe("questions"),this.locales=null,this.locales$=this.observe("locales"),this.selectedLocale=null,this.selectedLocale$=this.observe("selectedLocale")}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=te(i)))(n||i)}})()}static{this.\u0275cmp=E({type:i,selectors:[["ww-surveys-editor-questions"]],hostAttrs:[1,"ww-surveys-editor-questions"],inputs:{surveyName:"surveyName",questions:"questions",locales:"locales",selectedLocale:"selectedLocale"},standalone:!1,features:[M],decls:10,vars:2,consts:()=>{let e;e=$localize`Survey questions`;let t;return t=$localize`The following questions are included in the selected survey. You are not able to edit the questions.`,[e,t,[1,"ww-surveys-editor-questions-label-layout"],[1,"flex","flex-col","gap-6","w-full"],[3,"question","locales","selectedLocale"]]},template:function(t,n){t&1&&(l(0,"ww-label-layout",2)(1,"ww-label")(2,"span"),F(3,0),u(),l(4,"ww-sublabel"),F(
135,1),u()(),l(6,"div",3),q(7,xs,3,7,"ww-surveys-editor-question-form",4,st),w(9,"async"),u()()),t&2&&(r(7),j(v(9,0,n.questions$)))},dependencies:[Vt,Mt,Wt,Ci,L],styles:[`.ww-surveys-editor-questions .ww-surveys-editor-question-form:last-of-type .ww-label-layout.ww-label-layout-horizontal{padding-bottom:0} 14/*noopsurveys-editor-questions.component-CDKTGBZV.css.map */ 15`],encapsulation:2,changeDetection:0})}}return i})();var Vi=()=>["surveys.configure"],Wi=i=>({permissions:i}),Ni=i=>({enabledConfig:i});function bs(i,s){if(i&1){let e=Q();l(0,"button",8),V("click",function(){U(e);let n=m(4);return P(n.onEnable())}),F(1,1),u()}}function Is(i,s){i&1&&(l(0,"ww-account-feature-button",9),F(1,2),u())}function Fs(i,s){if(i&1&&(Zi(0),X(1,bs,2,0,"button",7)(2,Is,2,0,"ng-template",null,0,It),en()),i&2){let e=at(3);r(),p("wwAccountFeature","enableCustomMessageProvider")("wwAccountFeatureElse",e)}}function $s(i,s){i&1&&X(0,Fs,4,2,"ng-container",6),i&2&&p("wwLayoutTertiaryAction",Ae(4,Ni,Ae(2,Wi,bt(1,Vi))))}function Os(i,s){if(i&1){let e=Q();l(0,"button",13),V("click",function(){U(e);let n=m(4);return P(n.onDisable())}),F(1,3),u()}}function Ls(i,s){i&1&&X(0,Os,2,0,"button",12),i&2&&p("wwLayoutTertiaryAction",Ae(4,Ni,Ae(2,Wi,bt(1,Vi))))}function Ds(i,s){if(i&1){let e=Q();l(0,"button",15),V("click",function(){U(e);let n=m(4);return P(n.onEnable())}),F(1,4),u()}if(i&2){let e=m(4);p("disabled",e.updateFormGroup.invalid)}}function As(i,s){i&1&&X(0,Ds,2,1,"button",14),i&2&&p("wwLayoutTertiaryAction",Ae(4,Ni,Ae(2,Wi,bt(1,Vi))))}function Ms(i,s){if(i&1&&f(0,Ls,1,6,"button",10)(1,As,1,6,"button",11),i&2){let e=m(2);S(e.survey.isActive?0:1)}}function Vs(i,s){if(i&1&&(f(0,$s,1,6,"ng-container")(1,Ms,2,1),y(2,"ww-joi-form",5)),i&2){let e=m();S(e.survey.isLocked?0:1),r(2),p("form",e.joiFormUpdate)("wwTrackPendingChanges",e.joiFormUpdate.options.formGroup)("wwTrackPendingChangesUntil",e.update)}}var Ri=(()=>{class i extends z{constructor(){super(...arguments),this.businessTerms=c(so),this.layout=c(ne),this.locationRx=c(Le),this.pendingChangesStore=c(ao),this.create=new be,this.disable=new be,this.update=new be,this.survey=null,this.survey$=this.observe("survey"),this.presetQuestions=null,this.presetQuestions$=this.observe("presetQuestions"),this.selectedLocale=Ki(null),this.surveyIdentity$=this.survey$.pipe(d(e=>e?{id:e.id,locationIds:e.locationIds,isLocked:e.isLocked}:null),R((e,t)=>H(e,t)),this.shareReplay()),this.locales$=this.locationRx.getCurrentLocation(["publicLocales"]).pipe(d(e=>fn([ci,...e.publicLocales.map(t=>dn(t)?.code).filter(ve)]))),this.supportedLocales$=this.locales$.pipe(d(e=>e.filter(t=>pi.includes(t)))),this.joiFormOptions={labels:{title:$localize`Survey title`,showOnStatusPageCompleted:`${this.businessTerms.businessTerms.completeStateTerm.capitalized} ${this.businessTerms.businessTerms.visitTerm.pluralLower}`,showOnStatusPageCancelled:$localize`Cancelled ${this.businessTerms.businessTerms.visitTerm.pluralLower}`,showOnStatusPageNoShow:$localize`No-show ${this.businessTerms.businessTerms.visitTerm.pluralLower}`,completionMessage:$localize`Completion message`,includeInMessages:$localize`Sharing options`},sublabels:{title:$localize`Header text for the survey. Survey title is not displayed on the status page.`,completionMessage:$localize`Displayed after a survey has been submitted.`,includeInMessages:$localize`Share the survey with a linked button attached at the bottom of any email.`},placeholders:{title:$localize`Thank you for your visit`,completionMessage:$localize`Thank you for your response`},groups:{showOnStatusPage:{children:["showOnStatusPageCompleted","showOnStatusPageCancelled","showOnStatusPageNoShow"],label:$localize`Targeting rules`,sublabel:$localize`Choose which ${this.businessTerms.businessTerms.visitTerm.pluralLower} states result in a survey being sent.`}},projection:{completionMessage:{above:T(Ei,{$rx:{surveyName:this.survey$.pipe(d(e=>e?.name??null)),locales:this.supportedLocales$,selectedLocale:dt(this.selectedLocale),questions:this.presetQuestions$}})}},components:{title:T(_t,{$rx:{locales:this.supportedLocales$,selectedLocale:dt(this.selectedLocale)}
15,$hooks:{onCreate:e=>{e.instance.localeChanged.subscribe(t=>{this.selectedLocale.set(t)})}}}),showOnStatusPageCompleted:T(Pt),showOnStatusPageCancelled:T(Pt),showOnStatusPageNoShow:T(Pt),completionMessage:T(_t,{$rx:{locales:this.supportedLocales$,selectedLocale:dt(this.selectedLocale)},$hooks:{onCreate:e=>{e.instance.localeChanged.subscribe(t=>{this.selectedLocale.set(t)})}}}),includeInMessages:T(gi,{$rx:{locales:this.supportedLocales$,selectedLocale:dt(this.selectedLocale)},$hooks:{onCreate:e=>{e.instance.localeChanged.subscribe(t=>{this.selectedLocale.set(t)})}}})}},this.updateFormGroup=Oo(Mi.PAYLOAD_SCHEMA,new sn({showOnStatusPageCompleted:new oe(!0),showOnStatusPageCancelled:new oe(!0),showOnStatusPageNoShow:new oe(!0),title:new oe({value:null,i18n:{}},{validators:[lt.required]}),completionMessage:new oe({value:null,i18n:{}},{validators:[lt.required]}),includeInMessages:new oe(null,{validators:({value:e})=>e&&e.includeIn.length!==0&&!e.linkText.value?.trim()?{linkText:!1}:null})})),this.joiFormUpdate=Lo(x({formGroup:this.updateFormGroup,description:Mi.PAYLOAD_SCHEMA},this.joiFormOptions))}reset(){return me(this,null,function*(){let e=yield ee(this.survey$);e&&(this.updateFormGroup.patchValue(this.toView(e),{emitEvent:!1}),this.updateFormGroup.markAsPristine({emitEvent:!1}),this.updateFormGroup.updateValueAndValidity())})}toView(e){let t=e.showOnStatusPageRules?.conditions.flatMap(n=>Object.prototype.hasOwnProperty.call(n,"logicalOperator")?[]:n.type)??[];return b(x({},e),{showOnStatusPageCompleted:t.includes("IS_COMPLETED"),showOnStatusPageCancelled:t.includes("IS_CANCELLED"),showOnStatusPageNoShow:t.includes("IS_NO_SHOW"),title:Jt(e,"displayName"),completionMessage:Jt(e,"completionMessage"),includeInMessages:{includeIn:e.addSurveyToEmailMessageTypes??[],linkText:Jt(e,"surveyEmailTextLink")}})}toPayload(e,t){let{title:n,completionMessage:o,includeInMessages:a}=e,_=x({},io({displayName:n,completionMessage:o,surveyEmailTextLink:a?.linkText}));_=b(x({},_),{i18n:Object.keys(_.i18n).reduce((g,A)=>{let C=_.i18n?.[A];return C.surveyEmailTextLink===null&&delete C.surveyEmailTextLink,g[A]=C,g},{})});let h=null;return(e.showOnStatusPageCancelled||e.showOnStatusPageCompleted||e.showOnStatusPageNoShow)&&(h={logicalOperator:"OR",conditions:[]},e.showOnStatusPageCompleted&&h.conditions.push({type:"IS_COMPLETED"}),e.showOnStatusPageCancelled&&h.conditions.push({type:"IS_CANCELLED"}),e.showOnStatusPageNoShow&&h.conditions.push({type:"IS_NO_SHOW"})),_=b(x({},_),{showOnStatusPageRules:h,addSurveyToEmailMessageTypes:a?.includeIn}),t&&(_.isActive=!0),_}onDisable(){return me(this,null,function*(){let e=yield ee(this.survey$);e&&this.disable.emit(e.id)})}onEnable(){this.onUpdate(!0)}onUpdate(e=!1){return me(this,null,function*(){if(!this.updateFormGroup.valid)return;let t=this.toPayload(this.updateFormGroup.value,e),n=yield ee(this.survey$);if(n&&n.id&&n.id.length>0){this.update.emit({id:n.id,updates:t});return}let o=yield ee(this.locationRx.getCurrentLocation(["id"])).then(_=>_?.id),a=n?.presetSurveyId??Kn;this.create.emit(b(x({},t),{isActive:!0,presetSurveyId:a,locationIds:[o]}))})}ngOnInit(){this.surveyIdentity$.pipe(Te(this.ngOnDestroy$)).subscribe(e=>{e&&(e.isLocked?this.updateFormGroup.disable({emitEvent:!1}):(this.updateFormGroup.enable({emitEvent:!1}),this.layout.updateFeatureContext({pendingChanges:{formId:"surveys-editor-form",reset:()=>this.reset(),save:()=>this.onUpdate(),store:this.pendingChangesStore,enabledConfig:{permissions:["accounts.update"]}}})),this.reset())})}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=te(i)))(n||i)}})()}static{this.\u0275cmp=E({type:i,selectors:[["ww-surveys-editor-form"]],hostAttrs:[1,"ww-surveys-editor-form"],inputs:{survey:"survey",presetQuestions:"presetQuestions"},outputs:{create:"create",disable:"disable",update:"update"},standalone:!1,features:[M],decls:1,vars:1,consts:()=>{let e;e=$localize` Activate survey `;let t;t=$localize` Activate survey `;let n;n=$localize` Deactivate survey `;let o;return o=$localize` Activate survey `,[["featureMissingTmpl",""],e,t,n,o,[1,"flex","flex-col","gap-6",3,"form","wwTrackPendingChanges","wwTrackPendingChangesUntil"],[4,"wwLayoutTertiaryAction"],["wwButton","",3,"click",4,"wwAccountFeature","wwAccountFeatureElse"],["wwButton","",3,"click"],["type","primary"],["wwButton","warning"],["wwButton","",3,"disabled"],["wwButton","warning",3,"click",4,"wwLayoutTertiaryAction"],["wwButton","warning",3,"click"],["wwButton","",3,"disabled","click",4,"wwLayoutTertiaryAction"],["wwButton","",3,"click","disabled"]]},template:function(t,n){t&1&&f(0,Vs,3,4),t&2&&S(n.survey?0:-1)},dependencies:[Fo,yo,ho,Ro,$o,re],encapsulation:2,changeDetection:0})}}return i})();function er(i){return b(x({},i),{isActive:!1,id:"",created:new Date,createdBy:"",updated:new Date,updatedBy:"",locationIds:[],numQuestions:0,numSurveyAnswers:0})}function Ns(i,s){let e=ue(i.minValue),t=ue(i.maxValue);if(e===null||t===null)return;let n;return i.minValueDescription&&s===e&&(n=` - ${i.minValueDescription}`),i.maxValueDescription&&s===t&&(n=` - ${i.maxValueDescription}`),n}function ks(i){let s=Cn[i.questionId];if(!s)return i;if(s.inputType==="NUMBER"){let e=ue(s.minValue),t=ue(s.maxValue);if(e!==null&&t!==null)for(let n=e;n<=t;n++){let o=Ns(s,n),a=i.values.find(_=>_.label===n.toString());if(a){a.order=n,a.labelSuffix=o;continue}i.values.push({order:n,label:n.toString(),labelSuffix:o,count:0,percent:0,color:"darkGrey"})}}else if(s.inputType==="CHOICE"&&s.inputOptions)for(let[e,t]of s.inputOptions.entries()){let n=i.values.find(o=>o.label===t);if(n){n.order=e;continue}i.values.push({order:e,label:t,count:0,percent:0,color:"darkGrey"})}return i}function tr(i){let s=[];for(let e of i){let t=e.surveyQuestionId;if(!Kt(t))continue;let n=s.find(o=>o.questionId===t);n?(n.count+=e.numSurveyAnswers,n.values.push({order:n.values.length,label:e.surveyAnswerValues??"",count:e.numSurveyAnswers,percent:0,color:"darkGrey"})):s.push({questionId:t,questionInputType:e.surveyQuestionInputType??"",order:zo.indexOf(t),title:e.surveyQuestionDisplayName??"",count:e.numSurveyAnswers,type:"bars",values:[{order:0,label:e.surveyAnswerValues??"",count:e.numSurveyAnswers,percent:0,color:"darkGrey"}]})}for(let e of s){ks(e),e.questionInputType==="NUMBER"&&e.values.sort((o,a)=>a.order-o.order),e.questionInputType==="CHOICE"&&e.values.sort((o,a)=>o.order-a.order);let t=Go[e.questionId];if(t)for(let o=0;o<e.values.length;o++)e.values[o].color=t[o]??"darkGrey";else{let o=Yo[e.values.length];if(o)for(let a=0;a<e.values.length;a++)e.values[a].color=o[a]??"darkGrey"}e.questionInputType==="CHOICE"&&e.values.length===2&&(e.type="donut");let n=e.values.reduce((o,a)=>o+a.count,0);for(let o of e.values)o.percent=n>0?o.count/n*100:0}return s.sort((e,t)=>
15e.order-t.order)}function ir(i){return i.length<1?[]:i.map(s=>{let e=s.surveyAnswerId,t=s.answerLocalTimestamp,n=s.presetSurveyId??"CSAT";if(!e||!t||!Ht(n))return null;let o=Re[n];if(!o)return null;let a=ie(s.resourceCombinations?.split(",").filter(Boolean)),_=ie(s.serviceCombinations?.split(",").filter(Boolean));return{id:e,date:t,score:s.csatScore??null,feedback:s.csatFeedback??null,survey:o.displayName,resource:a.length>0?a.join(", "):null,service:_.length>0?_.join(", "):null}}).filter(ve)}function Ps(i,s){i&1&&(l(0,"div",2),y(1,"mat-spinner",4),u()),i&2&&(r(),p("diameter",60))}function Bs(i,s){if(i&1&&(l(0,"ww-info-bubble"),F(1,1),w(2,"async"),u()),i&2){let e=m(2);r(2),Ne(v(2,2,e.unsupportedLocalesAsString$))(e.defaultLocale),ke(1)}}function Ys(i,s){if(i&1){let e=Q();l(0,"ww-surveys-editor-form",8),V("create",function(n){U(e);let o=m(2);return P(o.onFormCreate(n))})("disable",function(n){U(e);let o=m(2);return P(o.onFormDisable(n))})("update",function(n){U(e);let o=m(2);return P(o.onFormUpdate(n))}),u()}if(i&2){m();let e=$(7),t=$(9);p("survey",e)("presetQuestions",t)}}function Gs(i,s){if(i&1&&(l(0,"div",3)(1,"div",5),Ie(2,0),y(3,"ww-link",6)(4,"ww-link",6),Fe(),u(),f(5,Bs,3,4,"ww-info-bubble"),w(6,"async"),O(7),w(8,"async"),O(9),w(10,"async"),f(11,Ys,1,2,"ww-surveys-editor-form",7),u()),i&2){let e=m();r(3),p("inline",!0)("type","router-link")("href","/settings/customer-messages"),r(),p("inline",!0)("type","router-link")("href","/messages"),r(),S(v(6,8,e.hasUnsupportedLocales$)?5:-1),r(2);let t=W(v(8,10,e.survey$));r(2);let n=W(v(10,13,e.presetQuestions$));r(2),S(t&&n?11:-1)}}var ki=(()=>{class i extends z{constructor(){super(),this.coreLocationRx=c(oi),this.coreSurveyRx=c(ri),this.createSurveyWrite=c(uo),this.dialog=c(Gt),this.featuresRx=c(ei),this.layout=c(ne),this.locationRx=c(Le),this.surveyRx=c(Ce),this.updateSurveyWrite=c(co),this.defaultLocale=ci,this.unsupportedLocales$=this.locationRx.getCurrentLocationProperty("publicLocales").pipe(d(e=>e?e.filter(t=>!pi.includes(t)):[]),R((e,t)=>e.join(",")===t.join(","))),this.hasUnsupportedLocales$=this.unsupportedLocales$.pipe(d(e=>e.length>0),R()),this.unsupportedLocalesAsString$=this.unsupportedLocales$.pipe(d(e=>e.join(", ")),R()),this.hasSurveys$=this.featuresRx.isFeatureEnabled({accountFeatures:["enableSurveys"]}),this.presetId$=ji(0,qi).pipe(k(()=>_n().pipe(d(e=>e.presetId??null),d(e=>Ht(e)?e:null))),R(),this.shareReplay()),this.preset$=I([this.presetId$,this.hasSurveys$]).pipe(d(([e,t])=>e?b(x({},Re[e]),{isActive:!1,isLocked:!t}):null),this.shareReplay()),this.survey$=this.coreLocationRx.currentLocationSnapshot$.pipe(k(()=>this.preset$.pipe(k(e=>{let t=e?.presetSurveyId;return t?this.surveyRx.get(t).pipe(d(n=>n?b(x({},n),{isActive:n.isActive,isLocked:e.isLocked}):er(e))):Z(null)}))),this.shareReplay()),this.presetQuestions$=this.presetId$.pipe(k(e=>e?this.coreSurveyRx.getPresetQuestions(e):Z([])),this.shareReplay()),this.isLoading$=this.locationRx.locationChanged$.pipe(rt([]),k(()=>this.survey$),d(()=>!1),rt(!0),R()),this.layout.setFeatureContext({name:$localize`Edit survey`,parentPath:"/surveys/library"}),this.subscribeToPreset()}onFormCreate(e){return me(this,null,function*(){let t=yield ee(this.survey$);if(!t)return;let o=(yield ee(this.surveyRx.surveys$)).find(a=>a.isActive);if(o&&o.presetSurveyId!==t.presetSurveyId){if(!(yield ee(this.dialog.openConfirm({title:$localize`Switch active survey?`,message:$localize`Only one survey can be active at a time. ${o.name} will be deactivated and ${t.name} will become your new active survey.`,confirmLabel:$localize`Switch survey`}).afterClosed$)))return;yield this.updateSurveyWrite.call({id:o.id,updates:{isActive:!1}})}this.createSurveyWrite.payload.next(e)})}onFormUpdate(e){return me(this,null,function*(){let t=yield ee(this.survey$);if(!t)return;let o=(yield ee(this.surveyRx.surveys$)).find(a=>a.isActive);if(o&&o.id!==e.id){if(!(yield ee(this.dialog.openConfirm({title:$localize`Switch active survey?`,message:$localize`Only one survey can be active at a time. ${o.name} will be deactivated and ${t.name} will become your new active survey.`,confirmLabel:$localize`Switch survey`}).afterClosed$)))return;yield this.updateSurveyWrite.call({id:o.id,updates:{isActive:!1}})}this.updateSurveyWrite.payload.next(e)})}onFormDisable(e){return me(this,null,function*(){this.updateSurveyWrite.payload.next({id:e,updates:{isActive:!1}})})}subscribeToPreset(){this.preset$.pipe(Te(this.ngOnDestroy$)).subscribe(e=>{e&&(e.isActive?this.layout.updateFeatureContext({breadcrumbName:e.displayName??e.name,name:At({components:[e.displayName??e.name,Bt({component:$localize`Active`,backgroundColor:"success-alpha-10",color:"green2",size:"x-small"})],$element:{classList:["flex","items-center","gap-2"]}})}):this.layout.updateFeatureContext({name:e.displayName??e.name}))})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=E({type:i,selectors:[["ww-surveys-editor"]],hostAttrs:[1,"ww-surveys","ww-surveys-editor"],standalone:!1,features:[M],decls:3,vars:3,consts:()=>{let e;e=$localize` The survey URL can be shared by including it in any ${"\uFFFD#3\uFFFD"}:START_TAG_WW_LINK:Customer message${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_WW_LINK: template or ${"\uFFFD#4\uFFFD"}:START_TAG_WW_LINK_1:direct message${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_WW_LINK:. Find the â+â icon in the message editor or chat window and add the Satisfaction Survey variable to the message. `,e=Rt(e);let t;return t=$localize` You are currently using location languages not supported by Surveys (${"\uFFFD0\uFFFD"}:INTERPOLATION:). Surveys sent to customers with an unsupported locale will use the default language: ${"\uFFFD1\uFFFD"}:INTERPOLATION_1:. `,[e,t,[1,"flex","items-center","justify-center","py-40","max-w-3xl"],["wwLayoutPadding","",1,"flex","flex-col","gap-6"],[3,"diameter"],[1,"max-w-3xl"],[3,"inline","type","href"],[3,"survey","presetQuestions"],[3,"create","disable","update","survey","presetQuestions"]]},template:function(t,n){t&1&&(f(0,Ps,2,1,"div",2),w(1,"async"),Ee(2,Gs,12,16,"div",3)),t&2&&S(v(1,1,n.isLoading$)?0:2)},dependencies:[Ke,Ut,Yt,jt,Ri,L],encapsulation:2,changeDetection:0})}}return i})();var ht=(()=>{class i{constructor(){this.accountRx=c(He),this.router=c(Oe)}
15canActivate(e,t){return this.accountRx.hasAccountFeature("enableSurveys").pipe(d(n=>n||t.url.startsWith("/surveys/upgrade")?!0:(this.router.navigate(["/surveys/upgrade"]),!1)))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var zs=(i,s)=>s.presetSurveyId;function qs(i,s){if(i&1&&y(0,"ww-surveys-template",1),i&2){let e=s.$implicit;p("active",e.isActive)("locked",e.isLocked)("presetId",e.presetSurveyId)("name",e.displayName)("description",e.description)}}var Ti=(()=>{class i extends z{constructor(){super(),this.layout=c(ne),this.featuresRx=c(ei),this.surveyRx=c(Ce),this.hasSurveys$=this.featuresRx.isFeatureEnabled({accountFeatures:["enableSurveys"]}),this.presets$=I([this.surveyRx.surveys$,this.hasSurveys$]).pipe(d(([e,t])=>gn.map(n=>{let o=Re[n],a=e?.find(_=>_.presetSurveyId===n);return b(x({},o),{displayName:o.displayName??o.name,presetSurveyId:n,isActive:!!a?.isActive,isLocked:!t})}).sort((n,o)=>n.displayName.localeCompare(o.displayName)).sort((n,o)=>n.isActive===o.isActive?0:n.isActive?-1:1)),this.shareReplay()),this.layout.setFeatureContext({name:$localize`Surveys`})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=E({type:i,selectors:[["ww-surveys-library"]],hostAttrs:[1,"ww-surveys-library"],standalone:!1,features:[M],decls:4,vars:2,consts:[["wwLayoutPadding","",1,"flex","flex-wrap","gap-6"],[3,"active","locked","presetId","name","description"]],template:function(t,n){t&1&&(l(0,"div",0),q(1,qs,1,5,"ww-surveys-template",1,zs),w(3,"async"),u()),t&2&&(r(),j(v(3,0,n.presets$)))},dependencies:[Ke,hi,L],encapsulation:2,changeDetection:0})}}return i})();var Qs=(i,s)=>s.title;function Xs(i,s){i&1&&(l(0,"div",5),y(1,"ww-icon",6),u())}function Hs(i,s){if(i&1){let e=Q();l(0,"div",7)(1,"div",9),y(2,"ww-icon",10),l(3,"span"),F(4,0),u()(),l(5,"div",11)(6,"a",12),V("click",function(n){U(e);let o=m(2);return n.preventDefault(),P(o.openHelpArticle())}),F(7,1),u(),l(8,"button",13),V("click",function(){U(e);let n=m(2);return P(n.openLibrary())}),F(9,2),u()()()}if(i&2){let e=m(2);r(6),p("href",e.learnMoreUrl,Ct)}}function Ks(i,s){if(i&1){let e=Q();l(0,"div",14)(1,"div",22),y(2,"ww-surveys-date-range-picker"),l(3,"ww-filter",23),w(4,"async"),w(5,"async"),V("filtersChanged",function(n){U(e);let o=m(3);return P(o.filterStore.reset(n))}),u()(),l(6,"button",24),V("click",function(){U(e);let n=m(3);return P(n.export())}),y(7,"ww-icon",25),l(8,"span"),F(9,3),u()()()}if(i&2){let e=m(3);r(3),p("layout","horizontal")("filters",v(4,3,e.filterStore.filters$))("values",v(5,5,e.filterStore.state$))}}function Js(i,s){if(i&1&&(l(0,"div",15),y(1,"ww-surveys-date-range-picker")(2,"ww-page-filter-button",26),u()),i&2){let e=m(3);r(2),p("store",e.filterStore)}}function Zs(i,s){i&1&&(l(0,"ww-info-bubble",16),F(1,4),u())}function ea(i,s){if(i&1&&(l(0,"div",18),y(1,"ww-surveys-overview-metric",27)(2,"ww-surveys-overview-metric",28)(3,"ww-surveys-overview-metric",29)(4,"ww-surveys-overview-metric",30)(5,"ww-surveys-overview-metric",31),u()),i&2){m();let e=$(7),t=$(9);r(),p("loading",t)("value",e==null?null:e.avgScore),r(),p("loading",t)("value",e==null?null:e.surveysSent),r(),p("loading",t)("value",e==null?null:e.responses),r(),p("loading",t)("value",e==null?null:e.responseRate)("valueSuffix",e==null?null:e.responseRateSuffix),r(),p("loading",t)("value",e==null?null:e.feedbackRate)("valueSuffix","%")}}function ta(i,s){if(i&1&&(l(0,"div",32),y(1,"ww-surveys-overview-metric",33)(2,"ww-surveys-overview-metric",34)(3,"ww-surveys-overview-metric",35),u(),l(4,"div",36),y(5,"ww-surveys-overview-metric",37)(6,"ww-surveys-overview-metric",38),u()),i&2){m();let e=$(7),t=$(9);r(),p("loading",t)("value",e==null?null:e.avgScore),r(),p("loading",t)("value",e==null?null:e.surveysSent),r(),p("loading",t)("value",e==null?null:e.responses),r(2),p("loading",t)("value",e==null?null:e.responseRate)("valueSuffix",e==null?null:e.responseRateSuffix),r(),p("loading",t)("value",e==null?null:e.feedbackRate)("valueSuffix","%")}}function ia(i,s){i&1&&(l(0,"div",20)(1,"ww-card",39),y(2,"ww-chart-layout-placeholder"),u()()),i&2&&(r(),p("bordered",!0))}function na(i,s){if(i&1&&y(0,"ww-surveys-overview-question-chart",41),i&2){let e=s.$implicit;p("title",e.title)("count",e.count)("type",e.type)("values",e.values)}}function oa(i,s){if(i&1&&(l(0,"div",40),q(1,na,1,4,"ww-surveys-overview-question-chart",41,Qs),u()),i&2){m(2);let e=$(17);r(),j(e)}}function ra(i,s){if(i&1&&f(0,oa,3,0,"div",40),i&2){m();let e=$(17);S(e.length>0?0:-1)}}function sa(i,s){if(i&1){let e=Q();O(0),w(1,"async"),l(2,"div",8),f(3,Ks,10,7,"div",14)(4,Js,3,1,"div",15),f(5,Zs,2,0,"ww-info-bubble",16),w(6,"async"),O(7),w(8,"async"),O(9),w(10,"async"),l(11,"ww-card",17),f(12,ea,6,12,"div",18)(13,ta,7,12),u(),l(14,"ww-card",19),y(15,"ww-surveys-overview-score-distribution")(16,"ww-surveys-overview-response-trend"),u(),O(17),w(18,"async"),f(19,ia,3,1,"div",20)(20,ra,1,1),l(21,"ww-surveys-overview-answers-table",21),w(22,"async"),w(23,"async"),w(24,"async"),w(25,"async"),V("fetchRows",function(){U(e);let n=m(2);return P(n.fetchMoreAnswers())}
15),u()()}if(i&2){let e=m(2),t=v(1,10,e.breakpoints.isAboveSmall$);r(3),S(t?3:4),r(2),S(v(6,12,e.showDateRangeDisclaimer$)?5:-1),r(2),W(v(8,14,e.metricsData$)),r(2);let n=W(v(10,17,e.dataLoading$));r(2),p("bordered",!0),r(),S(t?12:13),r(2),p("bordered",!0),r(3);let o=W(v(18,20,e.questions$));r(2),S(o===null||n?19:20),r(2),p("loading",v(22,23,e.answersLoading$))("loadingRows",v(23,25,e.moreAnswersLoading$))("rows",v(24,27,e.answers$))("hasMoreRows",v(25,29,e.hasMoreAnswers$))}}function aa(i,s){if(i&1&&(f(0,Hs,10,1,"div",7),w(1,"async"),Ee(2,sa,26,31,"div",8)),i&2){let e=m();S(v(1,1,e.showGetStarted$)?0:2)}}var xi=(()=>{class i extends z{constructor(){super(),this.breakpoints=c(pe),this.filterStore=c(it),this.decimalPipe=c(Se),this.eventLogger=c(ii),this.exportSurveyAnswersWrite=c(po),this.intercomService=c(ni),this.layout=c(ne),this.locationRx=c(Le),this.router=c(Oe),this.surveyRx=c(Ce),this.surveysService=c(de),this.learnMoreUrl=Xn,this.surveys$=this.surveyRx.surveys$,this.showGetStarted$=this.surveys$.pipe(d(e=>e.length===0)),this.dateRangeContainsPreLaunchDate$=this.surveysService.dateRange$.pipe(d(e=>ae(e)?yn(e.start,new Date(2026,5,1)):!1),R(),this.shareReplay()),this.showDateRangeDisclaimer$=this.dateRangeContainsPreLaunchDate$,this.surveysLoading$=this.showGetStarted$.pipe(d(()=>!1),rt(!0),R()),this.dataLoading$=this.surveysService.loadingState$.pipe(d(e=>e.responseTrendData||e.metricsReportData||e.metricsSurveyData),R()),this.metricsData$=I([this.surveysService.metricsReportData$,this.surveysService.metricsSurveyData$,this.dateRangeContainsPreLaunchDate$]).pipe(d(([e,t,n])=>{let o=ie(e?.data)[0]??null,a=ie(t?.data)[0]??null;if(!o||!a)return{avgScore:"0",surveysSent:"0",feedbackRate:"0",responses:"0",responseRate:"0",responseRateSuffix:"%"};let _=a?.avgCsatScore??0,h=o?.numSurveysSent??0,g=a?.numSurveyAnswers??0,A=a?.numAnswersWithFeedback??0,C=A>0&&g>0?Math.round(A/g*100):0,K=h>0&&g>0?Math.round(g/h*100):0;return{avgScore:this.decimalPipe.transform(_,"1.0-1")??"0",surveysSent:n?"-":this.decimalPipe.transform(h,"1.0-0")??"0",feedbackRate:this.decimalPipe.transform(C,"1.0-0")??"0",responses:this.decimalPipe.transform(g,"1.0-1")??"0",responseRate:n?"-":this.decimalPipe.transform(K,"1.0-1")??"0",responseRateSuffix:n?"":"%"}})),this.questions$=this.surveysService.questionsData$.pipe(d(e=>{let t=ie(e?.data);return tr(t)})),this.answersLoading$=this.surveysService.loadingState$.pipe(d(e=>e.answersData),R(),this.shareReplay()),this.moreAnswersLoading$=this.surveysService.loadingState$.pipe(d(e=>e.moreAnswersData),R(),this.shareReplay()),this.answers$=this.surveysService.answers$.pipe(d(e=>e?ir(ie(e?.data)):null),this.shareReplay()),this.answersPaginationToken$=this.surveysService.answers$.pipe(d(e=>e?.pagination?.nextPageToken??null),R(),this.shareReplay()),this.hasMoreAnswers$=this.answersPaginationToken$.pipe(d(e=>!!e),R(),this.shareReplay()),this.layout.setFeatureContext({name:$localize`Surveys`})}export(){return me(this,null,function*(){let e=yield ee(this.locationRx.locationId$);if(!e)return;let t=yield ee(this.surveysService.dateRange$);ae(t)&&(this.exportSurveyAnswersWrite.payload.next({locationId:e,fromTime:t.start,toTime:t.end}),this.eventLogger.log("survey_answers_export_csv"))})}openHelpArticle(){this.intercomService.showArticle(16050899)}openLibrary(){this.router.navigate(["/surveys/library"])}fetchMoreAnswers(){return me(this,null,function*(){let e=yield ee(this.answersPaginationToken$);e&&this.surveysService.setAnswersPaginationToken(e)})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=E({type:i,selectors:[["ww-surveys-overview"]],hostAttrs:[1,"ww-surveys-overview"],standalone:!1,features:[M],decls:3,vars:3,consts:()=>{let e;e=$localize`Enable your first survey to start collecting feedback.`;let t;t=$localize` Learn more `;let n;n=$localize`Get started`;let o;o=$localize`Export survey answers`;let a;a=$localize`Export`;let _;_=$localize`Filters`;let h;h=$localize`The new metric Surveys Sent went live on June 1, 2026. Any date range before June 1, 2026 may display no data.`;let g;g=$localize`Average score`;let A;A=$localize`Surveys sent`;let C;C=$localize`Responses`;let K;K=$localize`Response rate`;let we;we=$localize`Feedback rate`;let Pi;Pi=$localize`Average score`;let Bi;Bi=$localize`Surveys sent`;let Yi;Yi=$localize`Responses`;let Gi;Gi=$localize`Response rate`;let zi;return zi=$localize`Feedback rate`,[e,t,n,a,h,[1,"flex","items-center","justify-center","py-40"],["icon","bx-loader-alt","size","2x-large","wwColor","darkGrey",1,"ww-animate-rotate"],[1,"ww-surveys-overview-empty-state","flex","flex-col","items-center","gap-10"],["wwLayoutPadding","",1,"flex","flex-col","gap-6","w-full"],[1,"flex","flex-col","items-center","gap-2"],["icon","ww-surveys-overview-empty-state","sizeStyle","auto",1,"w-32","h-32"],[1,"flex","gap-4"],["
15wwButton","secondary",3,"click","href"],["wwButton","",3,"click"],[1,"flex","items-start","justify-between","w-full"],[1,"flex","gap-2"],["color","alert",1,"!w-full","!max-w-full"],[1,"flex","flex-col","py-2",3,"bordered"],[1,"grid","grid-cols-5","gap-4","w-full"],[1,"!grid","small:grid-cols-2","w-full",3,"bordered"],[1,"grid","small:grid-cols-2","small:gap-6","gap-4","w-full","min-h-[360px]"],[3,"fetchRows","loading","loadingRows","rows","hasMoreRows"],[1,"flex","flex-wrap","gap-3"],[3,"filtersChanged","layout","filters","values"],["wwButton","secondary","wwTooltip",o,3,"click"],["icon","bx-upload"],["title",_,"buttonType","secondary",3,"store"],["title",g,3,"loading","value"],["title",A,3,"loading","value"],["title",C,3,"loading","value"],["title",K,3,"loading","value","valueSuffix"],["title",we,3,"loading","value","valueSuffix"],[1,"grid","grid-cols-3","w-full"],["title",Pi,3,"loading","value"],["title",Bi,3,"loading","value"],["title",Yi,3,"loading","value"],[1,"grid","grid-cols-2","w-full"],["title",Gi,3,"loading","value","valueSuffix"],["title",zi,3,"loading","value","valueSuffix"],[1,"flex","items-center","justify-center","min-h-full","col-span-1",3,"bordered"],[1,"grid","small:grid-cols-2","small:gap-6","gap-4","w-full"],[1,"col-span-1",3,"title","count","type","values"]]},template:function(t,n){t&1&&(f(0,Xs,2,0,"div",5),w(1,"async"),Ee(2,aa,3,3)),t&2&&S(v(1,1,n.surveysLoading$)?0:2)},dependencies:[li,xo,Ke,No,re,ge,se,he,Yt,In,mi,_i,fi,Si,vi,yi,L],styles:[`.ww-breakpoints-below-small .ww-surveys-overview .ww-surveys-overview-date-range-picker{display:block;width:100%}.ww-surveys-overview .ww-chart-layout .ww-chart-layout-graph{min-height:240px}.ww-surveys-overview .ww-section-content{padding:16px 12px}.ww-surveys-overview .ww-metric{align-items:center;flex-direction:column-reverse}.ww-surveys-overview .ww-metric .ww-metric-title-container{justify-content:center}.ww-surveys-overview .ww-metric .ww-metric-title-container .ww-metric-title{text-align:center}.ww-surveys-overview .ww-metric .ww-metric-value{display:flex;justify-content:center} 16/*noopsurveys-overview.component-4J4WO62N.css.map */ 17`],encapsulation:2,changeDetection:0})}}return i})();var or=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=E({type:i,selectors:[["ww-surveys-routing"]],standalone:!1,decls:1,vars:0,template:function(t,n){t&1&&y(0,"router-outlet")},dependencies:[un],encapsulation:2,changeDetection:0})}}return i})();var ua=(i,s)=>s.id;function ca(i,s){if(i&1){let e=Q();l(0,"button",2),V("click",function(){U(e);let n=m();return P(n.openIntercom())}),F(1,0),u()}}function pa(i,s){if(i&1&&(l(0,"a",4),D(1),u()),i&2){let e=s.$implicit;m(2);let t=$(3);p("active",(t==null?null:t.id)===e.id)("routerLink",`/surveys/${e.path}`),r(),G(e.label)}}function da(i,s){i&1&&_e(0)}function ma(i,s){if(i&1&&(l(0,"ww-tab-bar",3),q(1,pa,2,3,"a",4,ua),u(),X(3,da,1,0,"ng-container",5)),i&2){m();let e=$(1),t=$(3);p("type","fill"),r(),j(e),r(2),p("ngComponentOutlet",t.component)}}var bi=(()=>{class i extends z{constructor(){super(),this.environment=c(En),this.intercomService=c(ni),this.layout=c(ne),this.permissionRx=c(no),this.route=c(ln),this.tabs$=I([this.permissionRx.hasPermission("surveys.show"),this.permissionRx.hasPermission("surveys.configure")]).pipe(d(([e,t])=>{if(!e)return[];let n=[{id:"overview",path:"overview",label:$localize`Overview`,component:xi}];return t&&n.push({id:"library",path:"library",label:$localize`Library`,component:Ti}),n}),this.shareReplay()),this.url$=this.route.url.pipe(d(e=>e[0]?.path),R()),this.activeTab$=this.tabs$.pipe(k(e=>this.url$.pipe(d(t=>e.find(n=>n.path===t)??null)))),this.layout.setFeatureContext({name:$localize`Surveys`})}openIntercom(){this.environment.intercom&&this.intercomService.startSurvey(this.environment.intercom.surveyId)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=E({type:i,selectors:[["ww-surveys"]],hostAttrs:[1,"ww-surveys","flex","flex-col","gap-6","w-full"],standalone:!1,features:[M],decls:6,vars:7,consts:()=>{let e;return e=$localize` Provide feedback 18`,[e,["wwButton","secondary",3,"click",4,"wwLayoutPrimaryAction"],["wwButton","secondary",3,"click"],[3,"type"],["wwTabBarItem","",3,"active","routerLink"],[4,"ngComponentOutlet"]]},template:function(t,n){if(t&1&&(X(0,ca,2,0,"button",1),O(1),w(2,"async"),O(3),w(4,"async"),f(5,ma,4,2)),t&2){r();let o=W(v(2,1,n.tabs$));r(2);let a=W(v(4,4,n.activeTab$));r(2),S(o&&a?5:-1)}},dependencies:[on,cn,bo,re,jn,qn,L],encapsulation:2,changeDetection:0})}}return i})();function _a(i,s){if(i&1&&(l(0,"ww-bullet-list-item"),D(1),u()),i&2){let e=s.$implicit;r(),G(e)}}function wa(i,s){if(i&1&&(l(0,"ww-bullet-list",8),q(1,_a,2,1,"ww-bullet-list-item",null,Et),u()),i&2){let e=m(3);r(),j(e.content.bulletPoints)}}function fa(i,s){i&1&&_e(0)}function Sa(i,s){if(i&1&&(l(0,"div",4)(1,"div",5)(2,"ww-call-out",6)(3,"ww-call-out-title"),D(4),u(),l(5,"ww-call-out-content",7)(6,"p"),D(7),u(),f(8,wa,3,0,"ww-bullet-list",8),w(9,"async"),u(),l(10,"ww-call-out-actions"),X(11,fa,1,0,"ng-container",9),u()()()(),l(12,"div",10)(13,"ww-card",11)(14,"div",12)(15,"div",13),y(16,"ww-skeleton-placeholder",14)(17,"ww-skeleton-placeholder",14),u()(),l(18,"div",15),y(19,"ww-table",16),u()()()),i&2){m();let e=at(4),t=m();r(2),p("backgroundColor","upgrade2")("illustration",t.content.illustration??null),r(2),G(t.content.title),r(3),G(t.content.description),r(),S(v(9,14,t.breakpoints.isAboveMobile$)?8:-1),r(3),p("wwOutlet",e),r(2),p("bordered",!1),r(3),p("height",24)("width",100),r(),p("height",24)("width",130),r(2),p("data",t.data)("columns",t.columns)("pluckCellLabel",t.pluckCellLabel)}}function va(i,s){i&1&&_e(0)}function ya(i,s){if(i&1&&(l(0,"div",3)(1,"div",17),y(2,"ww-illustration",18),l(3,"div",19)(4,"h3"),D(5),u(),l(6,"p",20),D(7),u()()(),l(8,"div",19),X(9,va,1,0,"ng-container",9),u()()),i&2){m();let e=at(4),t=m();r(2),p("icon",t.content.illustration??null),r(3),G(t.content.title),r(2),$e(" ",t.content.description," "),r(2),p("wwOutlet",e)}}function ha(i,s){if(i&1&&(l(0,"a",23),F(1,2),u()),i&2){let e=m(3);p("href",e.content.helpArticle,Ct)}}function ga(i,s){if(i&1){let e=Q();l(0,"button",21),V("click",function(){U(e);let n=m(2);return P(n.upgrade())}),Ie(1,1),y(2,"ww-icon",22),Fe(),u(),f(3,ha,2,1,"a",23)}if(i&2){let e=m(2);r(3),S(e.content.helpArticle?3:-1)}}function Ca(i,s){if(i&1&&(f(0,Sa,20,16),w(1,"async"),Ee(2,ya,10,4,"div",3),X(3,ga,4,1,"ng-template",null,0,It)),i&2){let e=m();S(v(1,1,e.breakpoints.isAboveSmall$)?0:2)}}var Ui=(()=>{class i{constructor(){this.breakpoints=c(pe),this.layout=c(ne),this.router=c(Oe),this.content={title:$localize`Upgrade to Starter to access Surveys`,description:$localize`You know how many people walked through your door, now find out how they felt. Upgrade to a Starter account to measure guest satisfaction in real-time and make data-driven improvements to your service journey.`,illustration:"ww-plan-starter",helpArticle:"https://help.waitwhile.com/en/collections/14954126-surveys"},this.data=Array.from({length:10}).map(()=>({a:Math.ceil(Math.random()*100)+40,b:Math.ceil(Math.random()*100)+30,c:Math.ceil(Math.random()*100)+50,d:Math.ceil(Math.random()*100)+70,e:Math.ceil(Math.random()*100)+20,f:Math.ceil(Math.random()*100)+30,g:Math.ceil(Math.random()*100)+40,h:Math.ceil(Math.random()*100)+50,k:Math.ceil(Math.random()*100)+40})),this.columns=[{key:"a",label:T(B,{height:20,width:60})},{key:"b",label:T(B,{height:20,width:60})},{key:"c",label:T(B,{height:20,width:60})},{key:"d",label:T(B,{height:20,width:60})},{key:"e",label:T(B,{height:20,width:60})},{key:"f",label:T(B,{height:20,width:60})},{key:"g",label:T(B,{height:20,width:60})},{key:"h",label:T(B,{height:20,width:60})},{key:"k",label:T(B,{height:20,width:60})}],this.pluckCellLabel=e=>({a:T(B,{height:14,width:e.a}),b:T(B,{height:14,width:e.b}),c:T(B,{height:14,width:e.c}),d:T(B,{height:14,width:e.d}),e:T(B,{height:14,width:e.e}),f:T(B,{height:14,width:e.f}),g:T(B,{height:14,width:e.g}),h:T(B,{height:14,width:e.h}),k:T(B,{height:14,width:e.k})}),this.layout.setFeatureContext({name:$localize`Surveys`})}upgrade(){this.router.navigate(["/account/settings/billing/change-plan"])}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=E({type:i,selectors:[["ww-surveys-upgrade"]],hostAttrs:[1,"ww-surveys","ww-surveys-upgrade","flex","flex-col","gap-6","small:p-6","relative"],standalone:!1,decls:1,vars:1,consts:()=>{let e;e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_WW_ICON:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_WW_ICON: Upgrade `;let t;return t=$localize` Learn more `,[["actionsTmpl",""],e,t,[1,"ww-surveys-upgrade-background","flex","flex-col","flex-grow","justify-between","gap-4","p-6"],[1,"ww-surveys-upgrade-overlay","block","absolute","top-0","left-0","w-full","h-full","z-20"],[1,"ww-surveys-upgrade-overlay-container","flex","flex-col","items-center","pt-6","small:pt-24","w-full","h-full"],[1,"ww-surveys-upgrade-overlay-content",3,"backgroundColor","illustration"],[1,"flex","flex-col","gap-4"],["icon","bx-check-circle"],[4,"wwOutlet"],[1,"z-10"],["wwBackgroun
18dColor","lighterGrey",1,"flex","flex-col","gap-1",3,"bordered"],["wwBorderColor","mediumGrey",1,"flex","flex-col","gap-1","p-6","pt-4","border-b"],[1,"flex","gap-2"],[3,"height","width"],[1,"flex","flex-col","px-4"],["selection","none",3,"data","columns","pluckCellLabel"],[1,"flex","flex-col","gap-2","flex-grow","justify-center"],[1,"ww-surveys-upgrade-illustration",3,"icon"],[1,"flex","flex-col","gap-2"],[1,"ww-surveys-upgrade-description"],["wwButton","secondary","wwBackgroundColor","black","wwColor","white",3,"click"],["icon","bxs-bolt"],["wwButton","tertiary","target","_blank",3,"href"]]},template:function(t,n){t&1&&f(0,Ca,5,3),t&2&&S(n.content?0:-1)},dependencies:[mo,_o,wo,fo,Fn,$n,re,ge,se,he,Nt,ze,B,Qt,L],styles:[`.ww-surveys-upgrade .ww-surveys-upgrade-overlay{background-color:#fff3;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.ww-surveys-upgrade .ww-surveys-upgrade-overlay .ww-surveys-upgrade-overlay-content{box-shadow:0 4px 8px #0000000f,0 12px 24px #0000000d;-webkit-backdrop-filter:none;backdrop-filter:none;background-color:var(--ww-color-white);max-width:832px}.ww-breakpoints-below-small .ww-surveys-upgrade{--top-nav-bar-height: 48px;--layout-header-height: 56px;--layout-bottom-height: 64px;min-height:calc(100vh - var(--berg-layout-top-inset) - var(--top-nav-bar-height) - var(--layout-header-height) - var(--layout-bottom-height))}.ww-breakpoints-below-small .ww-surveys-upgrade .ww-surveys-upgrade-background{background:radial-gradient(circle at 50% 50%,var(--ww-color-upgrade2),transparent 100%)}.ww-breakpoints-below-small .ww-surveys-upgrade .ww-surveys-upgrade-illustration{display:flex;justify-content:center}.ww-breakpoints-below-small .ww-surveys-upgrade .ww-surveys-upgrade-illustration svg{max-height:160px;max-width:160px}@media screen and (max-height:700px){.ww-breakpoints-below-small .ww-surveys-upgrade .ww-surveys-upgrade-description{display:none}} 19/*noopsurveys-upgrade.component-5EABOFDL.css.map */ 20`],encapsulation:2,changeDetection:0})}}return i})();var Ea=[mi,_i,et,fi,Si,vi,yi],Ra=[tt,hi],Ta=[ki,Ri,Ci,Ei,gi],h_=[...Ea,...Ra,...Ta,yt,bi,Ti,xi,or,Ui],g_=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=Ji({type:i})}static{this.\u0275inj=Xi({providers:[Io],imports:[rn,an,pn.forChild([{path:"",pathMatch:"full",redirectTo:"overview"},{path:"upgrade",component:Ui,canActivate:[ht]},go({path:"edit",component:ki,canActivate:[ht,si({somePermissions:["surveys.configure"]})]},{trackPendingChanges:!0}),{path:"overview",component:bi,canActivate:[ht,si({permissions:["surveys.show"]})]},{path:"library",component:bi,canActivate:[ht,si({permissions:["surveys.configure"]})]}]),Uo,Po,Do,Qn]})}}return i})();export{it as SurveysFilterStore,ht as SurveysGuard,yt as WwSurveyAnswerViewerComponent,bi as WwSurveysComponent,_i as WwSurveysDateRangePickerComponent,ki as WwSurveysEditorComponent,Ri as WwSurveysEditorFormComponent,Ci as WwSurveysEditorQuestionFormComponent,Ei as WwSurveysEditorQuestionsComponent,et as WwSurveysFilterTriggerComponent,gi as WwSurveysIncludeInMessagesComponent,Ti as WwSurveysLibraryComponent,g_ as WwSurveysModule,mi as WwSurveysOverviewAnswersTableComponent,xi as WwSurveysOverviewComponent,fi as WwSurveysOverviewMetricComponent,Si as WwSurveysOverviewQuestionChartComponent,vi as WwSurveysOverviewResponseTrendComponent,yi as WwSurveysOverviewScoreDistributionComponent,or as WwSurveysRoutingComponent,tt as WwSurveysStatusIndicatorComponent,hi as WwSurveysTemplateComponent,Ui as WwSurveysUpgradeComponent}; 21//noopchunk-3GQSSISU.js.map
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.