1import{V as c,a as u,_ as f,b as o,N as v,e as h,f as g,g as y}from"./index-f5c6f890.js";import{_ as d}from"./VDivider-266197a4.js";import{_ as p}from"./VSpacer-1dacdb07.js";import{T as x,a as C,R as $,N as b,O as w}from"./OriginIndicator-a3712e5f.js";import{A as T}from"./ArrayViewer-c26cde87.js";import{T as k}from"./Tags-27bb825e.js";import{_ as m}from"./VRow-477f36c2.js";import{_}from"./VCol-4e2e67ec.js";import{_ as l}from"./VTooltip-184ef230.js";import"./VTextarea-a7008c6a.js";import"./VTextField-3c24aecf.js";import"./ocean-6931db7f.js";import"./DottedContext-9f6e507e.js";import"./index-3afa7640.js";import"./VAvatar-3588cd45.js";import"./ComboboxColored-7939ae89.js";import"./csv-chips-cc2317de.js";import"./VCombobox-cc6d19a6.js";import"./VAutocomplete-664978db.js";import"./VSelect-6efada6f.js";import"./index-b5848854.js";import"./VForm-55d1fac3.js";import"./VListItemGroup-22dcb49d.js";import"./VItemGroup-0e94dc6d.js";const S=c.extend({name:"ObjectViewer",props:{value:{type:Object,required:!0,default:()=>({})},keys:{type:Array,required:!1,default:()=>[]},mainKey:{type:String,required:!0,default:""}},watch:{value:{immediate:!0,handler(){const{metaData:s}=this.value[this.mainKey],[t,e]=Object.keys(s==null?void 0:s.dataDefinition);this.model={key:t,value:e}}}},computed:{events(){var s,t;return((t=(s=this.value[this.mainKey])==null?void 0:s.dataSet)==null?void 0:t.data)||[]},linkToSubStatistic(){const s={...this.$route.query,conditions:{companyId:this.value.companyId}};return{path:`/statistic/${this.mainKey}`,query:s}}},data:()=>({model:{key:"",value:""}})});var P=function(){var t=this,e=t._self._c;return t._self._setupProxy,e("div",[e(d),e("div",{staticClass:"my-5"},[e("div",{staticClass:"d-flex align-center"},[e("span",{staticClass:"font-16 font-weight-bold text-uppercase neutral-3--text"},[t._v(" "+t._s(t.$t(`table.column.${t.mainKey}`))+" / "+t._s(t.$t(`table.column.${t.model.value}`))+" ")]),e(p),e(f,{directives:[{name:"permission",rawName:"v-permission",value:"RIGHT_SUBSTAT_DRILLDOWN",expression:"'RIGHT_SUBSTAT_DRILLDOWN'"}],attrs:{to:t.linkToSubStatistic,icon:"",link:""}},[e(o,[t._v(" mdi-chevron-right")])],1)],1),e("div",{staticClass:"full-width py-3"},t._l(t.events,function(a,n){return e("div",{key:n,staticClass:"d-flex text-overflow-ellipsis table-column-color--text"},[e("span",[t._v(" "+t._s(a[t.model.key]))]),e(p),e("span",[t._v(t._s(a[t.model.value]))])],1)}),0)])],1)},F=[],V=u(S,P,F,!1,null,null,null,null);const D=V.exports,I=c.extend({name:"FlagViewer",props:{value:{type:String,required:!0,default:""},type:{type:String,required:!1,default:""}},computed:{flagType(){const[,s]=this.type.replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(" ");return s?s.toLowerCase():""}}});var M=function(){var t=this,e=t._self._c;return t._self._setupProxy,e("div",[t.flagType!=="continent"&&t.type!=="locationCountryCodeText"?e("span",{staticClass:"fp fp-rounded mr-1",class:t.value}):t._e(),e("span",[t._v(" "+t._s(t.$t(`view.label.${t.flagType}.${t.value}`))+" ")])])},A=[],L=u(I,M,A,!1,null,null,null,null);const R=L.exports,N=c.extend({name:"Links",props:{value:{required:!0},protocol:{required:!1,default:"https://"}},methods:{openLink(s){const t=this.protocol=="tel:"?"_self":"_new";s.startsWith("http")&&(s=s.split("://")[1]),window.open(`${this.protocol}${s}`,t)}}});var E=function(){var t=this,e=t._self._c;return t._self._setupProxy,e("a",{on:{click:function(a){return t.openLink(t.value)}}},[t._v(" "+t._s(t.value)+" ")])},q=[],O=u(N,E,q,!1,null,null,null,null);const z=O.exports,j=c.extend({name:"ExtendViewContent",components:{ObjectViewer:D,TableActions:x,TableActionsContext:C,ArrayViewer:T,FlagViewer:R,Rating:$,Links:z,Notes:b,Tags:k,OriginIndicator:w},data:()=>({fieldsRights:{restricted:{dimensions:["companyName","companyContacts","firstSeenDate","date","lastSeenDate","companyVisitCounter"]},foreign:{measures:["date","firstSeenDate","lastSeenDate","companyVisitCounter"],others:["companyContacts"]}},components:{arrays:["companyAddress","companyContacts"],object:[],links:["companyDomain","companyPhone","domainDomain"],flags:["companyContinent","companyCountryCode","locationCountryCodeText"],dates:["firstSeenDate","lastSeenDate"],metrics:["scoreAvg","scoreAvgPercentage","scoreMaxPercentage","visitsPercentage"],needTranslation:["companyCountryCodeText","companyBranchCodeText","companySizeClassText","companyRevenueClassText"]},order:[],interval:null,expandedFinish:!1,getParsedTags:v}),watch:{preset:{immediate:!0,handler(){var s,t;this.order=(s=this.preset)==null?void 0:s.fieldsExtended,(t=this.preset)!=null&&t.id&&this.$store.dispatch("extendedView/setContentLoaded",!0)}}},computed:{currentLanguage(){return this.$store.getters["localization/getCurrent"]},defaultPreset(){return this.$store.getters["statistics/extendedDefaultPreset"]},preset(){return this.$store.getters["statistics/extendedPreset"]},company(){return this.$store.getters["statistics/extendedCompany"]},tagItems(){return this.$store.getters["statistics/extendedTags"]},allFields(){return Object.entries(this.preset.dataDefinition).map(([s,t])=>({value:s,class:t.class,specification:t==null?void 0:t.specification}))},dimensions(){const s=this.allFields.filter(t=>{var e;return t.class==="dimension"&&t.value!==this.defaultMetric&&!this.fieldsRights.restricted.dimensions.includes(t.value)&&((e=this.preset)==null?void 0:e.fieldsExtended.includes(t.value))}).map(t=>t.value);return this.order.filter(t=>s.includes(t))},measures(){const s=this.allFields.filter(t=>{var e;return(t.class==="measure"||this.fieldsRights.foreign.measures.includes(t.value))&&((e=this.preset)==null?void 0:e.fieldsExtended.includes(t.value))&&t.value!==this.defaultMetric}).map(t=>t.value);return this.order.filter(t=>s.includes(t))},others(){return this.allFields.filter(s=>{var t;return(!["measure","dimension"].includes(s.class)||this.fieldsRights.foreign.others.includes(s.value))&&((t=this.preset)==null?void 0:t.fieldsExtended.includes(s.value))&&!s.value.startsWith("action")&&s.value!==this.defaultMetric}).map(s=>s.value)},defaultMetric(){return this.preset.chartDimensions[0]},extendedViewTitle(){return this.defaultMetric.includes("date")?this.getAppropriateDateFormat(this.company[this.defaultMetric]):this.company[this.defaultMetric]},parsedTags(){return this.getParsedTags(this.tagItems)}},methods:{getAppropriateDateFormat(s){const t=this.$route.params.module.toLowerCase();let e=this.$moment(s).format("ll");return t.includes("weekday")?e=this.$moment().day(s).format("dddd"):t.includes("week")?e=`${this.$t("view.label.calendar_week_short")} ${Number(s)}`:t.includes("year")||t.includes("hour")?e=s:t.includes("minute")||t.includes("visitinfo")?e=this.$moment(s).format(`L HH:mm ${this.currentLanguage==="en"?"A":""}`).toString().replace("00:","12:"):t.includes("month")&&(e=this.$moment(s).format("MMM YYYY")),e},getFormattedTime(s){const t=Math.floor(s/3600),e=Math.floor(s/60-t*60),a=Math.round(s)-(t*3600+e*60);return`${String(t).padStart(2,"0")}
1:${String(e).padStart(2,"0")}:${String(a).padStart(2,"0")}`},hasLength(s){var t,e;return(e=(t=this.company[s])==null?void 0:t.dataSet)==null?void 0:e.data.length},closeExtendedView(){this.$store.dispatch("extendedView/hide")},renderMeasure(s){return Number(this.company[s])&&Number(this.company[s])%1!==0?this.company[s]:this.company[s]},async loadNewTagItems(){try{const t=(await this.$API.company().getTags()).items;await this.$store.dispatch("statistics/setExtendedTags",t)}catch(s){await this.$store.dispatch("alert/showError",s.message||s)}},getI18nPrefix(s){var e,a;const t=this.allFields.filter(n=>{var r;return n.value===s&&((r=n==null?void 0:n.specification)==null?void 0:r.i18nPrefix)});return t.length>0?((a=(e=t[0])==null?void 0:e.specification)==null?void 0:a.i18nPrefix)??"":""}}});var H=function(){var t=this,e=t._self._c;return t._self._setupProxy,e(h,{staticClass:"transparent pb-0",attrs:{tile:"",flat:""}},[e(g,{staticClass:"table-header-background d-flex align-center big-margin mt-7 pb-0"},[e("div",{staticClass:"d-flex full-width mb-2"},[e(p),e("table-actions",{attrs:{item:t.company,template:t.defaultPreset}}),e("table-actions-context",{attrs:{item:t.company,template:t.defaultPreset}})],1),e("div",{staticClass:"d-flex align-center full-width mb-1",staticStyle:{"line-height":"25px"}},[e("span",{staticClass:"font-25"},[t._v(" "+t._s(t.extendedViewTitle)+" ")])]),e("span",{staticClass:"font-12 neutral-3--text"},[t._v(" "+t._s(t.$t("view.subtitle.extendedData"))+" ")])]),e(y,{staticClass:"pb-0"},[t.measures.length?e(d,{staticClass:"big-margin my-5"}):t._e(),e("div",{staticClass:"big-margin"},[e(m,t._l(t.measures,function(a,n){return e(_,{key:n,staticClass:"pr-1",attrs:{cols:"4"}},[e("div",{staticClass:"font-11 text-overflow-ellipsis text-uppercase neutral-3--text"},[t._v(" "+t._s(t.$t(`table.column.${a}`))+" ")]),e("div",{staticClass:"font-23 text-color--text font-weight-bold text-overflow-ellipsis fill-height"},[a.includes("duration")?e("span",[t._v(" "+t._s(t.getFormattedTime(Number(t.company[a])))+" ")]):t.components.dates.includes(a)?e("span",[t._v(" "+t._s(t.$moment(t.company[a]).format("DD MMM, yyyy").replace(".,",""))+" ")]):a==="date"?e("span",[t._v(" "+t._s(t.$moment(t.company[a]).format(`l HH:mm ${t.currentLanguage==="en"?"A":""}`).toString().replace("00","12"))+" ")]):a==="originIndicator"?e("span",[e("origin-indicator",{attrs:{originIndicator:t.company[a]}})],1):e("span",[t._v(" "+t._s(Number(parseFloat(t.company[a]).toFixed(2)))+" ")])])])}),1)],1),t.dimensions.length||t.others.length?e(d,{staticClass:"big-margin my-5"}):t._e(),e("div",{staticClass:"big-margin mb-10"},[e(m,t._l(t.dimensions,function(a,n){return e(_,{key:n,staticClass:"pb-0",attrs:{cols:"6"}},[e("div",{staticClass:"font-11 text-overflow-ellipsis text-uppercase neutral-3--text"},[t._v(" "+t._s(t.$t(`table.column.${a}`))+" ")]),e("div",{staticClass:"position-relative"},[a==="tags"?e("tags",{staticClass:"mt-1",attrs:{id:t.company.companyId,"all-existent-tags":t.tagItems,"parsed-existent-tags":t.parsedTags,"max-items":10,"selected-items":t.company.tags,"extended-view":""},on:{updateAllTags:function(r){return t.loadNewTagItems()}}}):a==="noteValue"?e("notes",{staticClass:"font-15",attrs:{value:t.company,"extended-view":"","show-all-notes":""}}):a==="rating"?e("rating",{staticClass:"font-15",attrs:{value:t.company,"extended-view":""}}):a==="hubspotCrmData"?[t.company.hubspotCrmData.length?e(l,{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function({on:r,attrs:i}){return[e(o,t._g(t._b({staticClass:"text-color--text ml-2",attrs:{size:"20"}},"v-icon",i,!1),r),[t._v("mdi-link-variant")])]}}],null,!0)},[e("span",[t._v(t._s(t.$t("statistic.export.label.linked")))])]):e(l,{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function({on:r,attrs:i}){return[e(o,t._g(t._b({staticClass:"text-color--text ml-2",staticStyle:{opacity:"0.6"},attrs:{size:"20"}},"v-icon",i,!1),r),[t._v("mdi-link-variant-off")])]}}],null,!0)},[e("span",[t._v(t._s(t.$t("statistic.export.label.not_linked")))])])]:a==="salesforceCrmData"?[t.company.salesforceCrmData.length?e(l,{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function({on:r,attrs:i}){return[e(o,t._g(t._b({staticClass:"text-color--text ml-2",attrs:{size:"20"}},"v-icon",i,!1),r),[t._v("mdi-link-variant")])]}}],null,!0)},[e("span",[t._v(t._s(t.$t("statistic.export.label.linked")))])]):e(l,{attrs:{bottom:""},scopedSlots:t._u([{key:"activator",fn:function({on:r,attrs:i}){return[e(o,t._g(t._b({staticClass:"text-color--text ml-2",staticStyle:{opacity:"0.6"},attrs:{size:"20"}},"v-icon",i,!1),r),[t._v("mdi-link-variant-off")])]}}],null,!0)},[e("span",[t._v(t._s(t.$t("statistic.export.label.not_linked")))])])]:t.components.arrays.includes(a)?e("array-viewer",{staticClass:"font-15",attrs:{value:t.company[a]}}):t.components.links.includes(a)?e("links",{staticClass:"font-15",attrs:{value:t.company[a],protocol:a=="companyPhone"?"tel:":"https://"}}):t.components.flags.includes(a)?e("flag-viewer",{attrs:{type:a,value:t.company[a]}}):t.components.needTranslation.includes(a)?e("div",{staticClass:"font-15 text-overflow-ellipsis"},[e("span",{attrs:{title:t.$t(`${t.getI18nPrefix(a)+t.company[a]}`)}},[t._v(" "+t._s(t.$t(`${t.getI18nPrefix(a)+t.company[a]}`))+" ")])]):e("div",{staticClass:"font-15 text-overflow-ellipsis"},[e("span",[t._v(" "+t._s(t.company[a])+" ")])])],2)])}),1)],1),t._l(t.others,function(a,n){return[t.hasLength(a)||t.company[a]&&t.company[a].length?e("div",{key:n,staticClass:"big-margin"},[a!=="companyContacts"?e("object-viewer",{staticClass:"font-15",attrs:{"main-key":a,value:t.company}}):a==="companyContacts"?e("array-viewer",{staticClass:"font-15",attrs:{value:t.company[a],"main-key":"companyContacts"}}):t._e()],1):t._e()]})],2)],1)},K=[],W=u(j,H,K,!1,null,"902640a9",null,null);const vt=W.exports;export{vt 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.