1import{aK as Ae,b2 as ze,c$ as Fe,a_ as je,bJ as Le,b3 as D,bw as T,aU as a,aL as b,aM as s,b6 as r,bz as W,bN as I,aW as n,aY as g,be as E,b7 as Se,bb as Te,b4 as V,aZ as m,aN as p,aS as h,c9 as We,aQ as X,aR as G,aV as Ie,b8 as Ve,ba as P,aX as u,b9 as Pe,bi as qe,b5 as Ne,aT as Re,bL as Me}from"./YSys8W1B.js";import{_ as He}from"./CZGK0i9w.js";import{_ as Ye}from"./BAnNk66N.js";import{_ as Ue}from"./tspcgKcK.js";import{_ as Xe}from"./yN9XVIC6.js";import{_ as Ge}from"./DZImC7RF.js";import{_ as Ke}from"./BcRayaIQ.js";import{_ as Oe}from"./CS46BYMk.js";import{_ as Qe}from"./HJfh_fNk.js";import{_ as Je}from"./D_Vo6Waw.js";import{_ as Ze}from"./QPFDD7Xs.js";import{_ as et}from"./DihGEYkI.js";import{_ as tt,a as at}from"./Bh4tzqXv.js";import{_ as st}from"./D5UA2q-5.js";import{_ as ot}from"./BUzfJI3G.js";import{_ as rt}from"./VWAynHWm.js";import{_ as nt}from"./DvBc_Upu.js";import{u as lt}from"./B70MYqgA.js";import{u as it}from"./qciQe9Hb.js";import{f as B}from"./CHrbiEXP.js";import"./DfPwQgGx.js";import"./DQfMhs1a.js";import"./DhK5MTsy.js";import"./BWaoFbV1.js";import"./Cj3oWlu9.js";import"./BPW-gR40.js";import"./Ct9iAf4s.js";import"./C6WAALUb.js";import"./DaahWIvB.js";import"./B9nsQuw2.js";import"./DiiMo83o.js";import"./BVVVCSOS.js";import"./CHuGjcHx.js";import"./BR4AgFhR.js";import"./BLhkGDRH.js";import"./9-IV3cxA.js";import"./BJFp79w-.js";import"./Dv4TCXuI.js";import"./dMBU6dz_.js";import"./-rMZQZDA.js";import"./BcT--_lX.js";import"./DubtQmm9.js";import"./C7mdGcmX.js";import"./CKjpibSH.js";import"./LB7zqoS4.js";import"./C8flJOoQ.js";import"./CwPJkJMH.js";import"./CUSflg1G.js";import"./DnD_Qavx.js";import"./xFbsy4bS.js";import"./CPbQhZ2j.js";import"./Ct4ruXBU.js";import"./D_CpL_rA.js";import"./Ba5tFsJk.js";import"./Cu0pDeWt.js";import"./CDR4LUIs.js";import"./rRf-eU-N.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};f.SENTRY_RELEASE={id:"23ecd1d65cfd2b04a3ca202b459367cdf91f97eb"};var l=new f.Error().stack;l&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[l]="ff713efe-ef5a-4167-a395-ec03591b08cc",f._sentryDebugIdIdentifier="sentry-dbid-ff713efe-ef5a-4167-a395-ec03591b08cc")}catch{}})();const pt=Me(Qe),ct={key:0},mt={class:"flex items-center flex-row-reverse gap-2"},ut={class:"bg-muted-200 dark:bg-muted-950/50 rounded-lg w-fit"},dt={class:"flex gap-1"},_t=["onClick"],ft={class:"flex-1 min-w-0"},bt={class:"text-sm font-semibold text-muted-800 dark:text-muted-800"},gt={class:"text-xs text-muted-600 dark:text-muted-600 mt-0.5"},ht={class:"grid gap-4 md:grid-cols-2 mb-8"},yt={class:"flex flex-col justify-center"},kt=["innerHTML"],vt={class:"flex-grow"},xt={key:0,class:"h-full content-center p-6"},wt={key:1,class:"h-full content-center w-full p-6"},Ct={key:2,class:"content-center w-full p-6",style:{"min-width":"0"}},$t={key:3,class:"content-center w-full px-6",style:{"min-width":"0"}},Dt={class:"relative mb-8"},Et={class:"flex flex-col items-center sm:flex-row gap-2"},Bt={class:"w-full sm:w-auto sm:grow"},ja=Ae({__name:"lnps",async setup(f){let l,d;const{t:y}=ze(),{theme:{base:A}}=Fe(),q=it(),w=je(),{queryList:z}=Le(q),c=E("dados"),K=[{key:"dados",label:"Dados da pesquisa",icon:"ph:chart-bar-fill"},{key:"mapa",label:"Mapa de calor",icon:"carbon:heat-map"}],F=E({}),O=m(()=>({...z.value,...F.value}));function Q(){F.value.group=o.value.activeGroup}const{data:o,status:J}=([l,d]=D(()=>q.startPage(()=>"/lnps",{key:"internal-page-lnps",query:F.value})),l=await l,d(),l),{data:N,execute:Z,status:ee}=([l,d]=D(()=>V(`/api/${w.params.campaign}/lnps-historical`,{lazy:!0,query:O,immediate:!1})),l=await l,d(),l),te=m(()=>o.value.isValid?o.value?.lnps:0),ae=m(()=>{const e=o.value.lnps;return e>=-100&&e<1?y("_pages._lnps.critical"):e>=1&&e<=50?y("_pages._lnps.improv"):e>50&&e<=75?y("_pages._lnps.quality"):e>75&&e<=100?y("_pages._lnps.excellence"):y("base._insufficientData.title")}),se=m(()=>ae.value),oe=m(()=>{const e=o.value.lnps;return e>=-100&&e<1?"critico.png":e>=1&&e<=50?"neutro.png":e>50&&e<=75?"qualidade.png":e>75&&e<=100?"excelencia.png":"critico.png"}),re=m(()=>{const e=o.value.lnps;return e>=-100&&e<1?"!bg-[#C46058]":e>=1&&e<=50?"!bg-[#FFEB8A]":e>50&&e<=75?"!bg-[#A5E9E7]":e>75&&e<=100?"!bg-[#55DCD3]":"!bg-[#C46058]"}),R=m(()=>[{label:"_pages._lnps._promoters.title",img:"cdn/images/emojis/excelencia.png",progress:o.value?.distribution?.promoter.percent,tag:B(o.value?.distribution?.promoter.count),progressColor:A.success,benchmark:o.value.benchmark?o.value.benchmark?.distribution?.promoter.percent:null,percent:"%"},{label:"_pages._lnps._neutrals.title",img:"cdn/images/emojis/neutro.png",progress:o.value?.distribution?.neutral.percent,tag:B(o.value?.distribution?.neutral.count),progressColor:A.primaryLight,benchmark:o.value.benchmark?o.value.benchmark?.distribution?.neutral.percent:null,percent:"%"},{label:"_pages._lnps._detractors.title",img:"cdn/images/emojis/critico.png",progress:o.value?.distribution?.detractor.percent,tag:B(o.value?.distribution?.detractor.count),progressColor:A.danger,benchmark:o.value.benchmark?o.value.benchmark?.distribution?.detractor.percent:null,benchmarkInverse:!0,percent:"%"}]),ne=m(()=>R.value.map(({progress:e,label:i,progressColor:_})=>({value:e||"",name:y(i),itemStyle:{color:_}}))),le={yaxis:[{y:0,borderColor:"#C46058",strokeDashArray:-10,borderWidth:3,label:{text:"",borderColor:"#C46058",style:{color:"#ffffff",background:"#C46058"},offsetX:-6,offsetY:6}},{y:50,borderColor:"#FFEB8A",strokeDashArray:-10,borderWidth:3,label:{text:"",borderColor:"#FFEB8A",style:{color:"#ffffff",background:"#FFEB8A"},offsetX:-6,offsetY:6}},{y:75,borderColor:"#A5E9E7",strokeDashArray:-10,borderWidth:3,label:{text:"",borderColor:"#A5E9E7",style:{color:"#ffffff",background:"#A5E9E7"},offsetX:-6,offsetY:6}},{y:100,borderColor:"#55DCD3",strokeDashArray:-10,borderWidth:3,label:{text:"",borderColor:"#55DCD3",style:{color:"#ffffff",background:"#55DCD3"},offsetX:-6,offsetY:6}}]},ie=[{label:"base._titles._tables._columns.description",key:"description",sortable:!0,start:!0},{label:"base._research.respondents",class:"w-full lg:!w-[180px]",key:"respondents",sortable:!0},{label:"_pages._lnps.title",key:"lnps",class:"w-full lg:!w-[150px]",sortable:!0},{label:"_pages._lnps._promoters.title",key:"promoter",class:"w-full lg:!w-[100px]",sortable:!0},{label:"_pages._lnps._neutrals.title",key:"neutral",class:"w-full lg:!w-[100px]",sortable:!0},{label:"_pages._lnps._detractors.title",key:"detractor",class:"w-full lg:!w-[100px]",sortable:!0}],{data:pe}=([l,d]=D(()=>V(`/api/${w.params.campaign}/filters`,{lazy:!0})),l=await l,d(),l),M=m(()=>pe.value?.map(e=>e.key)??[]),k=E(""),C=E(1),ce=m(()=>({...z.value,filter:k.value,page:C.value})),{data:j,status:me,execute:v}=([l,d]=D(()=>V(`/api/${w.params.campaign}/heatmap/lnps`,{lazy:!0,immediate:!1,watch:!1,query:ce})),l=await l,d(),l);return T(M,e=>{e.length&&!k.value&&(k.value=e[0],c.value==="mapa"&&v())},{immediate:!0}),T(c,e=>{e==="mapa"&&k.value&&!j.value&&v()}),T(z,()=>{if(c.value!=="mapa"){j.value=null;return}C.value=1,v()},{deep:!0}),(e,i)=>{const _=Ve,H=Pe,ue=He,de=Ye,_e=Ue,L=Se,S=Xe,fe=Ge,x=Ne,be=Ke,ge=Oe,he=pt,ye=Je,ke=Ze,ve=et,xe=Te,we=at,Ce=tt,$e=st,Y=ot,De=rt,Ee=nt;return a(J)==="success"?(p(),b("div",ct,[s(L,null,{default:r(()=>[(p(),h(We,{to:"#campaign-page-header-button"},[n("div",mt,[n("div",ut,[n("div",dt,[(p(),b(X,null,G(K,t=>n("button",{key:t.key,class:Ie(["flex items-center gap-2 px-5 py-3 rounded-lg text-sm font-medium transition-all duration-200",a(c)===t.key?"bg-winnie-light dark:bg-primary-900 shadow-md text-white":"text-muted-500 dark:text-muted-400 hover:bg-winnie-light/10 dark:hover:bg-primary-900/10"]),onClick:U=>c.value=t.key}
1,[s(_,{"data-nui-tooltip":t.label,name:t.icon,class:"size-4"},null,8,["data-nui-tooltip","name"])],10,_t)),64))])]),a(c)!=="mapa"?(p(),h(_e,{key:0,variant:"default",bindings:{content:{align:"end",sideOffset:5}}},{button:r(()=>[s(H,{rounded:"md",class:"bg-primary-900! text-black!","data-nui-tooltip":e.$t("base._buttons.export")},{default:r(()=>[s(_,{name:"fa6-solid:file-export",class:"size-5"})]),_:1},8,["data-nui-tooltip"])]),default:r(()=>[s(ue,{rounded:"sm"},{default:r(()=>[P(u(e.$t("base._buttons.exportDeprecation"))+" ",1),s(_,{"data-nui-tooltip":e.$t("base._buttons.exportDeprecationTooltip"),name:"ph:info",class:"cursor-help ml-2 block size-5"},null,8,["data-nui-tooltip"])]),_:1}),s(de,{title:e.$t("base._buttons.exportFile"),class:"hover:text-primary-700",rounded:"sm",onClick:i[0]||(i[0]=t=>a(lt)("lnps"))},{end:r(()=>[s(_,{class:"me-2 block size-5",name:"fa6-solid:file-export"})]),_:1},8,["title"])]),_:1})):g("",!0)])]))]),_:1}),W(s(S,{class:"mb-6 flex items-center gap-4 px-5 py-4 border-s-4 bg-primary-700! border-s-muted-800 dark:border-s-muted-100 cursor-pointer",rounded:"lg",onClick:i[2]||(i[2]=t=>c.value="mapa")},{default:r(()=>[s(_,{name:"carbon:heat-map",class:"size-8 shrink-0 text-muted-800"}),n("div",ft,[n("p",bt,u(e.$t("base._heatmapCallout.title")),1),n("p",gt,u(e.$t("base._heatmapCallout.description")),1)]),s(H,{size:"sm",rounded:"lg",class:"shrink-0",onClick:i[1]||(i[1]=qe(t=>c.value="mapa",["stop"]))},{default:r(()=>[n("span",null,u(e.$t("base._heatmapCallout.button")),1),s(_,{name:"ph:arrow-right",class:"size-3.5"})]),_:1})]),_:1},512),[[I,a(c)==="dados"]]),W(n("div",null,[s(fe,{"has-benchmark":a(o)?.benchmark},null,8,["has-benchmark"]),n("div",ht,[n("div",yt,[s(x,{src:"cdn/images/illustrations/leader.svg",class:"h-72 bg-orange-100 rounded-xl pt-4 pb-12",alt:"Liderança"}),s(S,{class:"shadow-muted-300/30 dark:shadow-muted-900/20 -mt-8 !rounded-2xl px-6 pb-4 !pt-2 shadow-xl text-center place-content-center h-full"},{default:r(()=>[s(L,null,{default:r(()=>[n("div",{innerHTML:e.$t("_pages._lnps.card")},null,8,kt)]),_:1})]),_:1})]),s(S,{class:"flex flex-col justify-between",rounded:"lg"},{default:r(()=>[n("div",vt,[s(ve,{tabs:[{icon:"fa6-solid:face-smile",key:"lnps",tooltip:e.$t("base._buttons._tooltip.enps")},{icon:"fa6-solid:align-left",key:"progress",tooltip:e.$t("base._buttons._tooltip.progress")},{icon:"fa6-solid:chart-pie",key:"chart",tooltip:e.$t("base._buttons._tooltip.chart")},{icon:"fa6-solid:chart-area",key:"area",tooltip:e.$t("base._buttons._tooltip.comparative")}],"tab-class":"px-6 pt-6"},{tab:r(({activeTab:t})=>[t==="lnps"?(p(),b("div",xt,[s(be,{image:`cdn/images/emojis/${a(oe)}`,tag:a(re),text:a(te),title:a(se),benchmark:a(o)?.benchmark?.lnps},null,8,["image","tag","text","title","benchmark"])])):t==="progress"?(p(),b("div",wt,[s(ge,{items:a(R)},null,8,["items"])])):t==="chart"?(p(),b("div",Ct,[s(he,{"data-series":a(ne),"show-percentage":!0},null,8,["data-series"])])):t==="area"?(p(),b("div",$t,[s(L,null,{default:r(()=>[s(ke,{historical:a(N),status:a(ee),execute:a(Z)},{default:r(()=>[s(ye,{"series-data":a(N)?.distribution,annotations:le},null,8,["series-data"])]),_:1},8,["historical","status","execute"])]),_:1})])):g("",!0)]),_:1},8,["tabs"])])]),_:1})]),s(xe,{class:"mb-4",size:"xl",weight:"semibold"},{default:r(()=>[P(u(e.$t("_pages._lnps.tableResultsTitle")),1)]),_:1}),n("div",Dt,[n("div",Et,[n("div",Bt,[s($e,{label:e.$t("base._titles._select.filter")},{default:r(({inputAttrs:t,inputRef:U})=>[s(Ce,Re({ref:U,modelValue:a(o).activeGroup,"onUpdate:modelValue":i[3]||(i[3]=$=>a(o).activeGroup=$)},t,{rounded:"lg",size:"lg","onUpdate:modelValue":Q}),{default:r(()=>[(p(!0),b(X,null,G(a(o).groupKeys,($,Be)=>(p(),h(we,{key:Be,value:$},{default:r(()=>[P(u($),1)]),_:2},1032,["value"]))),128))]),_:1},16,["modelValue"])]),_:1},8,["label"])])])]),s(De,{columns:ie,rows:a(o).groups,class:"mt-8"},{"respondents-end":r(({row:t})=>[s(Y,{row:t,"row-key":"respondents","find-key":"description",benchmark:a(o).benchmark?.groups,suffix:"","benchmark-suffix":""},{default:r(()=>[n("span",null,u(a(B)(t.respondents)),1)]),_:2},1032,["row","benchmark"])]),"lnps-end":r(({row:t})=>[s(Y,{row:t,"row-key":"lnps","find-key":"description",benchmark:a(o).benchmark?.groups,suffix:"","benchmark-suffix":"",emoji:""},{emoji:r(()=>[t.lnps>75&&t.lnps<=100?(p(),h(x,{key:0,src:"cdn/images/emojis/excelencia.png",style:{height:"1.8rem"}})):g("",!0),t.lnps>50&&t.lnps<=75?(p(),h(x,{key:1,src:"cdn/images/emojis/qualidade.png",style:{height:"1.8rem"}})):g("",!0),t.lnps>=1&&t.lnps<=50?(p(),h(x,{key:2,src:"cdn/images/emojis/neutro.png",style:{height:"1.8rem"}})):g("",!0),t.lnps>=-100&&t.lnps<1?(p(),h(x,{key:3,src:"cdn/images/emojis/critico.png",style:{height:"1.8rem"}})):g("",!0)]),_:2},1032,["row","benchmark"])]),"promoter-end":r(({row:t})=>[n("span",null,u(t.promoter)+"% ",1)]),"neutral-end":r(({row:t})=>[n("span",null,u(t.neutral)+"% ",1)]),"detractor-end":r(({row:t})=>[n("span",null,u(t.detractor)+"% ",1)]),_:1},8,["rows"])],512),[[I,a(c)==="dados"]]),W(n("div",null,[s(Ee,{filter:a(k),heatmap:a(j),"heatmap-status":a(me),"filter-keys":a(M),"export-url":`/api/${a(w).params.campaign}/heatmap/lnps/export`,"onUpdate:filter":i[4]||(i[4]=t=>{k.value=t,C.value=1,a(v)()}),"onUpdate:page":i[5]||(i[5]=t=>{C.value=t,a(v)()})},null,8,["filter","heatmap","heatmap-status","filter-keys","export-url"])],512),[[I,a(c)==="mapa"]])])):g("",!0)}}});
1export{ja as default};
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.