1import{a as Te}from"./chunk-NKL3HMD5.js";import{e as X,g as Se}from"./chunk-A5EDXY74.js";import{a as Ve}from"./chunk-XGEV72WQ.js";import{a as Ee}from"./chunk-WE6WJZ3L.js";import{a as Fe}from"./chunk-U7FGWDOD.js";import{a as ke}from"./chunk-JDU64GG4.js";import{c as be}from"./chunk-PC7KDAWZ.js";import{a as Oe}from"./chunk-YF7KRSY6.js";import{a as Le}from"./chunk-QGMGIOFS.js";import{a as we}from"./chunk-4ZAG3HXC.js";import{a as Pe}from"./chunk-R2XRE5BH.js";import{a as ve}from"./chunk-OMPJBGJV.js";import{a as ye}from"./chunk-IG7BCB22.js";import{a as Me}from"./chunk-7Z2AZHJW.js";import"./chunk-GO5C3RZZ.js";import"./chunk-7TIQMJNK.js";import"./chunk-75TNSU2R.js";import"./chunk-GYW5LQLV.js";import"./chunk-LCF3QRKX.js";import"./chunk-DHWVOWFC.js";import"./chunk-FPUQYHPI.js";import"./chunk-MKHCCJED.js";import"./chunk-EN7FUT6O.js";import"./chunk-MP3B4MPU.js";import{f as fe}from"./chunk-4PP2FJCQ.js";import"./chunk-EKD2LGHF.js";import"./chunk-JHKO534Q.js";import{A as xe,c as ue,g as Ce,k as he}from"./chunk-LMRDRJSO.js";import{h as ge}from"./chunk-LKXFT5TF.js";import{b as W,c as Y}from"./chunk-3T3PFJSX.js";import{Bb as ae,Cc as R,Db as f,Eb as u,Gb as w,Gc as y,Hb as P,Hc as v,Ib as O,Jb as N,Kb as C,Lb as h,Mb as H,Nb as m,Ob as _,Pb as F,R as B,Tc as me,Ua as z,Ub as A,Vb as G,Y as ie,Yb as V,Za as l,_b as r,ba as k,cc as le,d as te,dc as re,ec as de,ga as I,ha as $,kc as j,mb as K,mc as p,n as ne,nc as x,oc as E,pc as se,ta as oe,tc as ce,uc as pe,vc as _e}from"./chunk-UJIV47FO.js";import{a as ee}from"./chunk-VB56BUGO.js";var U=class n{INFO_TEXT_KEY="__INFO_TEXT__";translate=k(W);buildSections(t,e,i){let o=t?.data??{},d=Object.keys(t?.collections||{})[0]||"Contact",a=this.resolveDisplayLanguage(t,e),s=e?.elements||[],{beforeGroups:c,collection:g,afterGroups:M}=this.splitFormByCollectionGrouped(s,a,o,d),{structuralGroups:L,generalFields:T}=this.extractCollectionStructure(g,a),b=[{key:"leadId",label:"Lead ID",type:"text",value:t?.leadId},{key:"syncOn",label:"Sync On",type:"text",value:this.formatSyncOn(t?.syncOn)},{key:"modifiedOn",label:"Modified On",type:"text",value:this.formatSyncOn(t?.updatedAt)}],D=g?this.pickLabel(g,a):d,S=this.buildFooterFields(t,i?.syncStatusVisible===!0);return{basic:b,beforeCollectionGroups:c,collectionName:d,collectionLabel:D,collectionStructuralGroups:L,collectionGeneralFields:T,afterCollectionGroups:M,footer:S,lang:a}}buildFooterFields(t,e){return e?[{key:"syncStatus",label:this.translate.instant("pages.lead.lead-table.columns.syncStatus"),type:"syncStatus",value:t?.syncStatus??0}]:[]}resolveDisplayLanguage(t,e){let i=typeof t?.leadLang=="string"?t.leadLang.trim():"";if(i)return i.toLowerCase();let o=typeof e?.activeLanguage=="string"&&e.activeLanguage.trim()||typeof e?.defaultLanguage=="string"&&e.defaultLanguage.trim()||"";if(o)return o.toLowerCase();let d=typeof this.translate?.currentLang=="string"&&this.translate.currentLang.trim()||typeof this.translate?.defaultLang=="string"&&this.translate.defaultLang.trim()||"";return d?d.toLowerCase():"en"}
1applyExportLabels(t,e,i,o,d){let a=(e||"").toLowerCase().replace(/\s+/g,"");if(!o||a!=="checkbox"&&a!=="select"||!i?.length||t==null||t==="")return t;let s=c=>{let g=c.trim();if(!g)return c;let M=i.find(T=>String(T?.value??"").trim().toLowerCase()===g.toLowerCase());return M&&this.resolveOptionLabel(M,d)||g};return Array.isArray(t)?t.filter(c=>c!=null&&String(c).trim().length>0).map(c=>s(String(c))):typeof t=="string"?t.includes(",")&&!t.includes("|")?t.split(",").map(c=>c.trim()).filter(Boolean).map(s).join(", "):t.includes("|")?t.split("|").map(c=>c.trim()).filter(Boolean).map(s).join("|"):s(t):s(String(t))}applyEmailLanguageLabel(t,e,i){return!this.isEmailLanguageType(e)||typeof t!="string"||!t.trim()?t:Se(t,i)}isEmailLanguageType(t){return(t||"").toLowerCase().replace(/\s+/g,"")==="emaillanguage"}resolveOptionLabel(t,e){let i=t.label!=null?t.label:t.text;if(i==null)return"";if(typeof i=="string")return i.trim();if(typeof i=="object"){let o=i,d=e&&o[e]||o.en||o.de||Object.values(o).find(a=>(a||"").toString().trim().length>0);return d!=null?String(d).trim():""}return String(i).trim()}toFieldDef(t,e,i){let o=t.type||"text",d=t.exportLabels===!0,a=o.toLowerCase().replace(/\s+/g,""),s=d&&(a==="checkbox"||a==="select")&&Array.isArray(t.options);return ee({name:t.name.trim(),type:o,label:this.pickLabel(t,e),exportLabels:s?!0:void 0,options:s?t.options:void 0,customOptions:this.isEmailLanguageType(o)?X(t.customOptions):void 0},i)}normalizeScalarValue(t,e){return t==null?"":Array.isArray(t)&&e!="sendleadto"?t.find(o=>o!=null&&String(o).trim().length>0)??"":t}isImageType(t){let e=(t||"").toLowerCase();return e==="card"||e==="photo"}splitFormByCollectionGrouped(t,e,i,o="Contact"){let d=[],a=[],s=!1,c=null,g=[],M=()=>{g.length>0&&((s?a:d).push({structuralType:null,title:"",fields:[...g]}),g=[])},L=T=>{for(let b of T||[]){let D=(b.type||"").toLowerCase();if(!s&&D==="collection"&&(b.name||"").trim()===o){M(),s=!0,c=b;continue}if(D==="tabs"){b.children?.length&&L(b.children);continue}if(this.isStructuralType(D)||D==="collection"){M();let S=this.collectLeafFieldsAsItems(b,e,i);S.length>0&&(s?a:d).push({structuralType:D,title:this.pickLabel(b,e),fields:S});continue}if(D==="label"){g.push({key:this.INFO_TEXT_KEY,label:"Info text",type:"label",value:this.pickLabel(b,e)});continue}if(!this.shouldSkipFormNode(b)){let S=b.type||"text",J=i?.[b.name.trim()],q=S.toLowerCase()==="label"?this.pickLabel(b,e)??"":this.rawValueForExportLabels(J,S),$e=S.toLowerCase()==="label"?q:this.applyEmailLanguageLabel(this.applyExportLabels(q,S,b.options,b.exportLabels,e),S,X(b.customOptions));g.push({key:b.name.trim(),label:this.pickLabel(b,e),type:S,value:$e})}}};return L(t),M(),{beforeGroups:d,collection:c,afterGroups:a}}collectLeafFieldsAsItems(t,e,i){let o=[],d=(t.type||"").toLowerCase();if(d==="label")return o.push({key:this.INFO_TEXT_KEY,label:"Info text",type:"label",value:this.pickLabel(t,e)}),o;if(this.isLayoutType(d)||this.isStructuralType(d)||d==="collection"||d==="tabs")return(t.children||[]).forEach(c=>o.push(...this.collectLeafFieldsAsItems(c,e,i))),o;if(this.shouldSkipFormNode(t))return o;let a=t.type||"text",s=this.rawValueForExportLabels(i?.[t.name.trim()],a);return o.push({key:t.name.trim(),label:this.pickLabel(t,e),type:a,value:this.applyEmailLanguageLabel(this.applyExportLabels(s,a,t.options,t.exportLabels,e),a,X(t.customOptions))}),o}rawValueForExportLabels(t,e){let i=(e||"").toLowerCase().replace(/\s+/g,"");return(i==="checkbox"||i==="select")&&Array.isArray(t)?t:this.normalizeScalarValue(t,i)}pickLabel(t,e,i="en"){let o=t.label||{};return e&&o[e]||o[i]||Object.values(o).find(d=>(d||"").trim().length>0)||this.formatLabel(t.name||"")}isStructuralType(t){let e=(t||"").toLowerCase();return e==="fieldset"||e==="panel"||e==="columns"}isLayoutType(t){let e=(t||"").toLowerCase();return e==="fieldset"||e==="panel"||e==="columns"||e==="tabs"}shouldSkipFormNode(t){let e=(t.type||"").toLowerCase(),i=(t.name||"").trim();return this.isLayoutType(e)||e==="label"?!1:!i||e==="hidden"}extractCollectionStructure(t,e){if(!t?.children?.length)return{structuralGroups:[],generalFields:[]};let i=[],o=[],d=(s,c)=>{let g=(s.type||"").toLowerCase();if(g==="label"){c.push({name:this.INFO_TEXT_KEY,type:"label",label:"Info text",f
1ixedValue:this.pickLabel(s,e)});return}if(this.isLayoutType(g)){(s.children||[]).forEach(M=>d(M,c));return}this.shouldSkipFormNode(s)||c.push(this.toFieldDef(s,e))},a=s=>{for(let c of s||[]){let g=(c.type||"").toLowerCase();if(g==="label"){o.push({name:this.INFO_TEXT_KEY,type:"label",label:"Info text",fixedValue:this.pickLabel(c,e)});continue}if(this.isStructuralType(g)){let M=[];d(c,M);let L=this.pickLabel(c,e)||this.formatLabel(c.name||c.type||"Section"),T=this.dedupByName(M);T.length&&i.push({title:L,fields:T});continue}if(this.isLayoutType(g)){c.children?.length&&a(c.children);continue}this.shouldSkipFormNode(c)||o.push(this.toFieldDef(c,e))}};return a(t.children),{structuralGroups:i,generalFields:this.dedupByName(o)}}dedupByName(t){let e=new Set;return t.filter(i=>{if((i.type||"").toLowerCase()==="label")return!0;let o=(i.name||"").toLowerCase();return e.has(o)?!1:(e.add(o),!0)})}formatLabel(t){return(t||"").replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\s+/g," ").trim().replace(/\b\w/g,e=>e.toUpperCase())}formatDateTime(t){if(t==null||t==="")return null;let e=new Date(t);return isNaN(e.getTime())?typeof t=="string"?t:String(t):`${e.toLocaleDateString()} ${e.toLocaleTimeString()}`}formatSyncOn(t){if(t==null||t==="")return null;let e=new Date(t);if(isNaN(e.getTime()))return typeof t=="string"?t:String(t);let i=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),d=String(e.getDate()).padStart(2,"0"),a=String(e.getHours()).padStart(2,"0"),s=String(e.getMinutes()).padStart(2,"0"),c=String(e.getSeconds()).padStart(2,"0");return`${i}-${o}-${d} ${a}:${s}:${c}`}static \u0275fac=function(e){return new(e||n)};static \u0275prov=ie({token:n,factory:n.\u0275fac,providedIn:"root"})};var Z=()=>[];function ze(n,t){if(n&1&&(F(0,"img",3),y(1,"fileUrl")),n&2){let e=r(2);G("src",v(1,1,e.lead.companyLogo),z)}}function Ne(n,t){if(n&1&&(F(0,"img",4),y(1,"fileUrl")),n&2){let e=r(2);G("src",v(1,1,e.lead.eventLogo),z)}}function Ae(n,t){if(n&1&&(m(0,"div",10)(1,"div",11),p(2),_(),m(3,"div",12)(4,"div",7),p(5),_()()()),n&2){let e=t.$implicit,i=r(3);l(2),x(e.label),l(3),x(i.formatDisplayValue(e.key,e.value))}}function Ge(n,t){if(n&1&&(m(0,"section",5)(1,"div",9),P(2,Ae,6,2,"div",10,w),_()()),n&2){let e=r(2);l(2),O(e.leadSections.basic)}}function Ue(n,t){n&1&&F(0,"hr",6)}function je(n,t){n&1&&(m(0,"span",14)(1,"span",16),F(2,"span",17),p(3),y(4,"translate"),_(),m(5,"span",16),F(6,"span",18),p(7),y(8,"translate"),_()()),n&2&&(l(3),E(" ",v(4,2,"pages.lead.addEdit.legendFromList")," "),l(4),E(" ",v(8,4,"pages.lead.addEdit.legendManual")," "))}function Re(n,t){if(n&1&&(m(0,"div",7),p(1),_()),n&2){let e=r().$implicit;l(),x(e.value)}}function Ke(n,t){if(n&1&&(m(0,"span",20),p(1),_()),n&2){let e=t.$implicit,i=r(6);j("lead-forward-chip--list",i.isSendLeadFromList(e))("lead-forward-chip--manual",!i.isSendLeadFromList(e)),l(),E(" ",e," ")}}function We(n,t){n&1&&(m(0,"div",7),p(1,"-"),_())}function Ye(n,t){if(n&1&&(m(0,"div",15),P(1,Ke,2,5,"span",19,w,!1,We,2,0,"div",7),_()),n&2){let e=r().$implicit,i=r(4);l(),O(i.sendLeadEmails(e.value))}}function Xe(n,t){if(n&1&&(m(0,"div",7),p(1),_()),n&2){let e=r(2).$implicit,i=r(4);l(),x(i.formatDisplayValue(e.key,e.value))}}function Ze(n,t){if(n&1&&F(0,"img",21),n&2){let e=r().$implicit,i=r(4).$implicit,o=r(4);G("src",o.convertToFullImageUrl(e),z)("alt",i.label)}}function Qe(n,t){if(n&1&&f(0,Ze,1,2,"img",21),n&2){let e=t.$implicit;u(e?0:-1)}}function He(n,t){if(n&1&&P(0,Qe,1,1,null,null,w),n&2){let e=r(3).$implicit;O(e.value)}}function Je(n,t){if(n&1&&F(0,"img",21),n&2){let e=r(4).$implicit,i=r(4);G("src",i.convertToFullImageUrl(e.value),z)("alt",e.label)}}function qe(n,t){if(n&1&&f(0,Je,1,2,"img",21),n&2){let e=r(3).$implicit;u(e.value?0:-1)}}function et(n,t){if(n&1&&f(0,He,2,0)(1,qe,1,1),n&2){let e=r(2).$implicit,i=r(4);u(i.isArray(e.value)&&(e.value!=null&&e.value.length)?0:1)}}function tt(n,t){if(n&1&&f(0,Xe,2,1,"div",7)(1,et,2,1),n&2){let e=r().$implicit,i=r(4);u(!i.isImageType(e.type)&&!i.isImageKey(e.key,e.value)?0:1)}}function nt(n,t){if(n&1&&(m(0,"div",13)(1,"div",11),p(2),y(3,"translate"),f(4,je,9,6,"span",14),_(),m(5,"div",12),f(6,Re,2,1,"div",7)(7,Ye,4,1,"div",15)(8,tt,2,1),_()()),n&2){let e=t.$implicit,i=r(4);l(2),E(" ",e.type==="label"?v(3,3,"pages.lead.view.infoText"):e.label," "),l(2),u(i.isSendLeadType(e.type)?4:-1),l(2),u(e.type==="label"?6:i.isSendLeadType(e.type)?7:8)}}function it(n,t){if(n&1&&(f(0,Ue,1,0,"hr",6),m(1,"section",5)(2,"div",9),P(3,nt,9,5,"div",13,w),_()()),n&2){let e=r(),i=e.$implicit,o=e.$index;u(o>0?0:-1),l(3),O(i.fields)}}function ot(n,t){if(n&1&&f(0,it,5,1),n&2){let e=t.$implicit;u(e.fields.length?0:-1)}}function at(n,t){n&1&&F(0,"hr",6)}function lt(n,t){if(n&1&&(m(0,"div",7),p(1),_()),n&2){let e=r().$implicit;l(),x(e.fixedValue)}}function rt(n,t){if(n&1&&F(0,"img",21),n&2){let e=r().$implicit,i=r(2).$implicit,o=r(4);G("src",o.convertToFullImageUrl(e==null?null:e[i.name]),z)("alt",i.label)}}function dt(n,t){if(n&1&&(m(0,"div",7),p(1),_()),n&2){let e=r().$implicit,i=r(2).$implicit,o=r(4);l(),E(" ",o.formatContactValue(i,e==null?null:e[i.name])," ")}}function st(n,t){n&1&&(m(0,"div",7),p(1,"-"),_())}function ct(n,t){if(n&1&&f(0,rt,1,2,"img",21)(1,dt,2,1,"div",7)(2,st,2,0,"div",7),n&2){let e=t.$implicit,i=r(2).$implicit,o=r(4);u(o.isFieldImage(i.type,e==null?null:e[i.name])&&o.normalizeScalarValue(e==null?null:e[i.name])?0:o.isFieldImage(i.type,e==null?null:e[i.name])?2:1)}}function pt(n,t){if(n&1&&P(0,ct,3,1,null,null,w),n&2){let e=r(5);O(e.getContactItems())}}function _t(n,t){if(n&1&&(m(0,"div",23)(1,"div",24),p(2),y(3,"translate"),_(),m(4,"div",25),f(5,lt,2,1,"div",7)(6,pt,2,0),_()()),n&2){let e=t.$implicit;l(2),E(" ",e.type==="label"?v(3,2,"pages.lead.view.infoText"):e.label," "),l(3),u(e.type==="label"?5:6)}}function mt(n,t){if(n&1&&(m(0,"div",22),P(1,_t,7,4,"div",23,w),_()),n&2){let e=t.$implicit;l(),O(e.fields)}}function gt(n,t){if(n&1&&P(0,mt,3,0,"div",22,w),n&2){let e=r(2);O((e.leadSections==null?null:e.leadSections.collectionStructuralGroups)||R(0,Z))}}function ft(n,t){n&1&&(m(0,"div",7),p(1),y(2,"translate"),_()),n&2&&(l(),x(v(2,1,"pages.lead.view.noItemsInCollection")))}function ut(n,t){if(n&1&&(m(0,"div",30)(1,"div",31),p(2),y(3,"translate"),_(),m(4,"div",32),p(5),_()()),n&2){let e=r().$implicit;
1l(2),x(v(3,2,"pages.lead.view.infoText")),l(3),x(e.fixedValue)}}function Ct(n,t){if(n&1&&F(0,"img",21),n&2){let e=r(2).$implicit,i=r().$implicit,o=r(3);G("src",o.convertToFullImageUrl(i==null?null:i[e.name]),z)("alt",e.label)}}function ht(n,t){if(n&1&&p(0),n&2){let e=r(2).$implicit,i=r().$implicit,o=r(3);E(" ",o.formatContactValue(e,i==null?null:i[e.name])," ")}}function xt(n,t){n&1&&p(0," - ")}function bt(n,t){if(n&1&&(m(0,"div",30)(1,"div",31),p(2),_(),m(3,"div",32),f(4,Ct,1,2,"img",21)(5,ht,1,1)(6,xt,1,0),_()()),n&2){let e=r().$implicit,i=r().$implicit,o=r(3);l(2),x(e.label),l(2),u(o.isFieldImage(e.type,i==null?null:i[e.name])&&o.normalizeScalarValue(i==null?null:i[e.name])?4:o.isFieldImage(e.type,i==null?null:i[e.name])?6:5)}}function yt(n,t){if(n&1&&f(0,ut,6,4,"div",30)(1,bt,7,2,"div",30),n&2){let e=t.$implicit;u(e.type==="label"?0:1)}}function vt(n,t){if(n&1&&(m(0,"div",26)(1,"div",27),p(2),_(),m(3,"div",28)(4,"div",29),P(5,yt,2,1,null,null,w),_()()()),n&2){let e=t.$index,i=r(3);l(2),se(" ",(i.leadSections==null?null:i.leadSections.collectionLabel)||"Kontaktfelder"," ",e+1," "),l(3),O((i.leadSections==null?null:i.leadSections.collectionGeneralFields)||R(2,Z))}}function wt(n,t){if(n&1&&P(0,vt,7,3,"div",26,w),n&2){let e=r(2);O(e.getContactItems())}}function Pt(n,t){n&1&&(m(0,"div",8),p(1),y(2,"translate"),_()),n&2&&(l(),x(v(2,1,"pages.lead.view.noItemsInCollection")))}function Ot(n,t){n&1&&(m(0,"span",14)(1,"span",16),F(2,"span",17),p(3),y(4,"translate"),_(),m(5,"span",16),F(6,"span",18),p(7),y(8,"translate"),_()()),n&2&&(l(3),E(" ",v(4,2,"pages.lead.addEdit.legendFromList")," "),l(4),E(" ",v(8,4,"pages.lead.addEdit.legendManual")," "))}function Mt(n,t){if(n&1&&(m(0,"div",7),p(1),_()),n&2){let e=r().$implicit;l(),x(e.value)}}function Lt(n,t){if(n&1&&(m(0,"span",20),p(1),_()),n&2){let e=t.$implicit,i=r(6);j("lead-forward-chip--list",i.isSendLeadFromList(e))("lead-forward-chip--manual",!i.isSendLeadFromList(e)),l(),E(" ",e," ")}}function kt(n,t){n&1&&(m(0,"div",7),p(1,"-"),_())}function Ft(n,t){if(n&1&&(m(0,"div",15),P(1,Lt,2,5,"span",19,w,!1,kt,2,0,"div",7),_()),n&2){let e=r().$implicit,i=r(4);l(),O(i.sendLeadEmails(e.value))}}function Et(n,t){if(n&1&&(m(0,"div",7),p(1),_()),n&2){let e=r(2).$implicit,i=r(4);l(),x(i.formatDisplayValue(e.key,e.value))}}function St(n,t){if(n&1&&F(0,"img",21),n&2){let e=r().$implicit,i=r(4).$implicit,o=r(4);G("src",o.convertToFullImageUrl(e),z)("alt",i.label)}}function Vt(n,t){if(n&1&&f(0,St,1,2,"img",21),n&2){let e=t.$implicit;u(e?0:-1)}}function Tt(n,t){if(n&1&&P(0,Vt,1,1,null,null,w),n&2){let e=r(3).$implicit;O(e.value)}}function Dt(n,t){if(n&1&&F(0,"img",21),n&2){let e=r(4).$implicit,i=r(4);G("src",i.convertToFullImageUrl(e.value),z)("alt",e.label)}}function It(n,t){if(n&1&&f(0,Dt,1,2,"img",21),n&2){let e=r(3).$implicit;u(e.value?0:-1)}}function $t(n,t){if(n&1&&f(0,Tt,2,0)(1,It,1,1),n&2){let e=r(2).$implicit,i=r(4);u(i.isArray(e.value)&&(e.value!=null&&e.value.length)?0:1)}}function Bt(n,t){if(n&1&&f(0,Et,2,1,"div",7)(1,$t,2,1),n&2){let e=r().$implicit,i=r(4);u(!i.isImageType(e.type)&&!i.isImageKey(e.key,e.value)?0:1)}}function zt(n,t){if(n&1&&(m(0,"div",13)(1,"div",11),p(2),y(3,"translate"),f(4,Ot,9,6,"span",14),_(),m(5,"div",12),f(6,Mt,2,1,"div",7)(7,Ft,4,1,"div",15)(8,Bt,2,1),_()()),n&2){let e=t.$implicit,i=r(4);l(2),E(" ",e.type==="label"?v(3,3,"pages.lead.view.infoText"):e.label," "),l(2),u(i.isSendLeadType(e.type)?4:-1),l(2),u(e.type==="label"?6:i.isSendLeadType(e.type)?7:8)}}function Nt(n,t){if(n&1&&(F(0,"hr",6),m(1,"section",5)(2,"div",9),P(3,zt,9,5,"div",13,w),_()()),n&2){let e=r().$implicit;l(3),O(e.fields)}}function At(n,t){if(n&1&&f(0,Nt,5,0),n&2){let e=t.$implicit;u(e.fields.length?0:-1)}}function Gt(n,t){if(n&1&&(m(0,"div",7),p(1),y(2,"syncStatus"),_()),n&2){let e=r().$implicit;l(),x(v(2,1,e.value))}}function Ut(n,t){if(n&1&&(m(0,"div",7),p(1),_()),n&2){let e=r().$implicit,i=r(3);l(),x(i.formatDisplayValue(e.key,e.value))}}function jt(n,t){if(n&1&&(m(0,"div",10)(1,"div",11),p(2),_(),m(3,"div",12),f(4,Gt,3,3,"div",7)(5,Ut,2,1,"div",7),_()()),n&2){let e=t.$implicit,i=r(3);l(2),x(e.label),l(2),u(i.isSyncStatusField(e)?4:5)}}function Rt(n,t){if(n&1&&(m(0,"div",9),P(1,jt,6,2,"div",10,w),_()),n&2){let e=r(2);l(),O(e.leadSections.footer)}}function Kt(n,t){if(n&1&&(m(0,"div",0)(1,"div",2),f(2,ze,2,3,"img",3),f(3,Ne,2,3,"img",4),_(),f(4,Ge,4,0,"section",5),P(5,ot,1,1,null,null,w),f(7,at,1,0,"hr",6),m(8,"section",5),f(9,gt,2,1)(10,ft,3,3,"div",7),_(),m(11,"section",5),f(12,wt,2,0)(13,Pt,3,3,"div",8),_(),P(14,At,1,1,null,null,w),f(16,Rt,3,0,"div",9),_()),n&2){let e=r();
1l(2),u(e.lead!=null&&e.lead.companyLogo?2:-1),l(),u(e.lead!=null&&e.lead.eventLogo?3:-1),l(),u(!(e.leadSections==null||e.leadSections.basic==null)&&e.leadSections.basic.length?4:-1),l(),O((e.leadSections==null?null:e.leadSections.beforeCollectionGroups)||R(7,Z)),l(2),u(!(e.leadSections==null||e.leadSections.beforeCollectionGroups==null)&&e.leadSections.beforeCollectionGroups.length&&(e.getContactItems().length||!(e.leadSections==null||e.leadSections.collectionGeneralFields==null)&&e.leadSections.collectionGeneralFields.length)?7:-1),l(2),u(e.getContactItems().length?9:10),l(3),u(e.getContactItems().length?12:13),l(2),O((e.leadSections==null?null:e.leadSections.afterCollectionGroups)||R(8,Z)),l(2),u(!(e.leadSections==null||e.leadSections.footer==null)&&e.leadSections.footer.length?16:-1)}}function Wt(n,t){n&1&&F(0,"div",1)}var Q=class n{lead=null;leadSections=null;leadsImages=[];sendLeadListEmails=new Set;loading=!1;leadDetailsLayout=k(U);isSyncStatusField(t){return(t?.key||"").toLowerCase()==="syncstatus"||(t?.type||"").toLowerCase()==="syncstatus"}isSendLeadType(t){return(t||"").toLowerCase().replace(/\s+/g,"")==="sendleadto"}sendLeadEmails(t){let e=[];Array.isArray(t)?e=t:typeof t=="string"?e=t.split(/[;\n,|]/):t!=null&&(e=[t]);let i=e.map(a=>String(a??"").trim()).filter(a=>a.length>0),o=i.filter(a=>this.isSendLeadFromList(a)),d=i.filter(a=>!this.isSendLeadFromList(a));return[...o,...d]}extractEmail(t){let e=(t||"").match(/[a-zA-Z0-9._%+\-]+@[a-zA-Z0-9.\-]+\.[a-zA-Z]{2,}/);return e?e[0].toLowerCase():""}isSendLeadFromList(t){let e=this.extractEmail(t);return!!e&&this.sendLeadListEmails.has(e)}isArray(t){return Array.isArray(t)&&t.length>0}normalizeScalarValue(t){return t==null?"":Array.isArray(t)?t.find(i=>i!=null&&String(i).trim().length>0)??"":t}formatContactValue(t,e){let i=typeof t=="string"?{type:t,name:"",exportLabels:!1,options:void 0}:t,o=this.leadSections?.lang||"en",d=this.leadDetailsLayout.applyEmailLanguageLabel(this.leadDetailsLayout.applyExportLabels(e,i.type,i.options,i.exportLabels,o),i.type,i.customOptions);if(Array.isArray(d)){let s=d.filter(c=>c!=null&&String(c).trim().length>0).map(c=>String(c).trim());return s.length===0?"-":s.join(" ; ")}let a=this.normalizeScalarValue(d);return a===""||a===null||a===void 0?"-":typeof a=="boolean"?a?"Yes":"No":typeof a!="string"?String(a):a.includes("|")?a.split("|").map(s=>s.trim()).filter(Boolean).join(", "):a}looksLikeImage(t){if(typeof t!="string")return!1;let e=t.trim();if(!e)return!1;if(e.startsWith("data:image/"))return!0;let i=e.split(/[?#]/)[0];return/(png|jpg|jpeg|gif|webp|bmp|svg)$/i.test(i)}formatDisplayValue(t,e){return e==null?"":Array.isArray(e)?e.filter(i=>i!=null&&String(i).trim().length>0).map(i=>this.formatDisplayValue(t,i)).join(", "):typeof e!="string"?e:e.includes("|")?e.split("|").map(i=>i.trim()).filter(Boolean).join(", "):e}isImageType(t){let e=(t||"").toLowerCase();return e==="card"||e==="photo"||e==="sketch"||e==="signature"}isImageValue(t){return typeof t=="string"&&t.trim().startsWith("data:image/")?!0:Array.isArray(t)?t.some(e=>typeof e=="string"&&e.trim().startsWith("data:image/")):!1}isFieldImage(t,e){return this.isImageType(t)||this.isImageValue(e)}isImageKey(t,e){let i=(t||"").toLowerCase();return["business_card_front","business_card_back","photo1","photo2","sketch","signature"].includes(i)||typeof e=="string"&&this.looksLikeImage(e)?!0:Array.isArray(e)?e.some(o=>typeof o=="string"&&this.looksLikeImage(o)):!1}getContactItems(){let t=this.lead?.collections;if(!t||typeof t!="object")return[];let e=Object.values(t)[0];return Array.isArray(e)?e:[]}getCollectionValues(t){let i=this.getContactItems().map(a=>a?.[t]).map(a=>this.normalizeScalarValue(a)).filter(a=>a!=null&&String(a).trim().length>0),o=new Set,d=[];for(let a of i){let s=typeof a=="string"?a:JSON.stringify(a);o.has(s)||(o.add(s),d.push(a))}return d}convertToFullImageUrl(t){if(!t)return"";let e=this.leadsImages.find(i=>i.original===t);return e?e.url:t}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=K({type:n,selectors:[["app-lead-details-sections"]],inputs:{lead:"lead",leadSections:"leadSections",leadsImages:"leadsImages",sendLeadListEmails:"sendLeadListEmails",loading:"loading"},decls:2,vars:1,consts:[[1,"lead-content"],[1,"lead-placeholder"],[1,"lead-logos"],["alt","Company Logo",3,"src"],["alt","Event Logo",3,"src"],[1,"lead-hero"],[1,"structural-divider"],[1,"lead-hero__text"],[1,"muted"],[1,"lead-hero__grid"],[1,"lead-hero__item","lead-hero__item--compact"],[1,"lead-hero__label"],[1,"lead-hero__value"],[1,"lead-hero__item"],[1,"lead-forward-legend"],[1,"lead-forward-chips"],[1,"lead-forward-legend-item"],[1,"lead-forward-legend-swatch","lead-forward-legend-swatch--list"],[1,"lead-forward-legend-swatch","lead-forward-legend-swatch--manual"],[1,"lead-forward-chip",3,"lead-forward-chip--list","lead-forward-chip--manual"],[1,"lead-forward-chip"],[1,"lead-hero__image",3,"src","alt"],[1,"contact-group"],[1,"contact-section__row"],[1,"contact-section__field-label"],[1,"contact-section__field-value"],[1,"contact-block"],[1,"contact-header"],[1,"contact-details-indent"],[1,"contact-field-list"],[1,"contact-field-stacked"],[1,"contact-field-stacked__topic"],[1,"contact-field-stacked__data"]],template:function(e,i){e&1&&f(0,Kt,17,9,"div",0)(1,Wt,1,0,"div",1),e&2&&u(i.loading?1:0)},dependencies:[ve,we,Y],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:block;padding:24px}.lead-view[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px}.page-header[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:16px 24px}.page-header[_ngcontent-%COMP%] .page-header__text[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:2.5rem;font-weight:700;margin:0 0 8px;color:#222}.page-header__actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:12px}.lead-content[_ngcontent-%COMP%]{max-width:900px;margin:0 auto}.lead-content[_ngcontent-%COMP%] .lead-logos[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:4px clamp(24px,10vw,300px);margin-bottom:24px}.lead-content[_ngcontent-%COMP%] .lead-logos[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:200
1px;height:auto;max-height:100px;object-fit:contain}.lead-content[_ngcontent-%COMP%] .lead-sections[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:32px}.lead-content[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:350px;height:auto;object-fit:contain}.structural-divider[_ngcontent-%COMP%]{border:none;border-top:1px solid rgba(148,163,184,.35);margin:4px 0}.lead-hero[_ngcontent-%COMP%]{margin-top:8px;padding:8px 0 16px}.lead-hero__grid[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0}.contact-block[_ngcontent-%COMP%]{display:grid;grid-template-columns:220px 1fr;align-items:start;gap:4px clamp(24px,8vw,300px)}.contact-header[_ngcontent-%COMP%]{font-size:18px;font-weight:800;color:#0f172a;padding:0 0 4px;margin-top:4px;border-top:1px solid rgba(148,163,184,.15)}.lead-hero[_ngcontent-%COMP%] > .contact-block[_ngcontent-%COMP%]:first-child .contact-header[_ngcontent-%COMP%]{border-top:none}.contact-block[_ngcontent-%COMP%] .contact-details-indent[_ngcontent-%COMP%]{margin-left:0}.contact-details-indent[_ngcontent-%COMP%]{margin-left:calc(220px + clamp(24px,8vw,300px))}.contact-field-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0}.contact-field-stacked[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;padding:4px 0}.contact-field-stacked__topic[_ngcontent-%COMP%]{font-size:16px;font-weight:700;color:#000}.contact-field-stacked__data[_ngcontent-%COMP%]{font-size:16px;font-weight:500;color:#111827;word-break:break-word}.lead-hero__item[_ngcontent-%COMP%]{display:grid;grid-template-columns:220px 1fr;align-items:flex-start;gap:4px clamp(24px,8vw,300px);padding:14px 0}.lead-hero__item--compact[_ngcontent-%COMP%]{padding:2px 0;border-bottom:none}.lead-hero__label[_ngcontent-%COMP%]{font-size:16px;font-weight:700;color:#000}.contact-section[_ngcontent-%COMP%] + .contact-section[_ngcontent-%COMP%]{margin-top:16px;padding-top:8px;border-top:1px solid #c7c7c7}.contact-section__title[_ngcontent-%COMP%]{grid-column:1/-1;font-weight:900;margin-bottom:4px}.contact-section__row[_ngcontent-%COMP%]{display:grid;grid-template-columns:220px 1fr;align-items:flex-start;gap:4px clamp(24px,8vw,300px);padding:14px 0;border-bottom:1px solid rgba(157,161,161,.15)}.contact-section__field-label[_ngcontent-%COMP%]{font-size:16px;font-weight:800}.contact-section__field-value[_ngcontent-%COMP%]{word-break:break-word}.lead-hero__value[_ngcontent-%COMP%]{font-size:16px;color:#111827;font-weight:500;word-break:break-word}.lead-hero__text[_ngcontent-%COMP%]{white-space:pre-wrap}.lead-hero__image[_ngcontent-%COMP%]{margin-top:10px;display:block;width:100%;max-width:360px;height:auto;border-radius:8px}.lead-hero__image[alt=Signature][_ngcontent-%COMP%]{display:inline-block;width:auto;max-width:180px;max-height:150px;margin-right:16px}.pdf-dialog-backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#0f172a8c;display:flex;align-items:center;justify-content:center;z-index:1000;padding:24px}.pdf-dialog[_ngcontent-%COMP%]{position:relative;width:min(640px,100%);background:#fff;border-radius:18px;box-shadow:0 24px 60px #0f172a40;padding:40px 36px 32px;display:flex;flex-direction:column;gap:24px}.pdf-dialog__close[_ngcontent-%COMP%]{position:absolute;top:18px;right:18px;width:40px;height:40px;border:none;border-radius:50%;background:#f1f5f9;color:#111827;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.pdf-dialog__header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:26px;font-weight:700;color:#111827}.pdf-dialog__body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.pdf-dialog__row[_ngcontent-%COMP%]{display:grid;grid-template-columns:200px 1fr;gap:24px;align-items:center}.pdf-dialog__label[_ngcontent-%COMP%]{font-weight:600;color:#475569}.pdf-dialog__value[_ngcontent-%COMP%]{font-size:16px;color:#111827;font-weight:500}.pdf-dialog__input[_ngcontent-%COMP%]{width:100%;padding:12px 16px;border:1px solid #d1d5db;border-radius:10px;font-size:15px;transition:border-color .2s ease,box-shadow .2s ease}.pdf-dialog__input[_ngcontent-%COMP%]:focus{outline:none;border-color:#23c3f6;box-shadow:0 0 0 4px #23c3f633}.pdf-dialog__row--variables[_ngcontent-%COMP%]{align-items:start}.pdf-dialog__links[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:12px}.pdf-dialog__link[_ngcontent-%COMP%]{padding:0;border:none;background:none;color:#23c3f6;font-weight:600;cursor:pointer}.pdf-dialog__link[_ngcontent-%COMP%]:hover{text-decoration:underline}.pdf-dialog__variables-dropdown[_ngcontent-%COMP%]{display:flex;gap:10px;margin-top:12px;padding:12px 14px;border-radius:10px;width:100%;grid-column:1/-1;max-height:0;opacity:0;overflow:hidden;transform:translateY(-4px);transition:max-height .25s ease,opacity .2s ease,transform .2s ease}.pdf-dialog__variables-dropdown.is-open[_ngcontent-%COMP%]{max-height:500px;opacity:1;overflow:auto;transform:translateY(0)}.variables-section__title[_ngcontent-%COMP%]{font-weight:600;font-size:18px;text-transform:capitalize;letter-spacing:.05em;
1color:#000;margin-bottom:4px}.variables-section__list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0}.variables-section__item[_ngcontent-%COMP%]{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:15px;padding:2px 0;color:#111827}.variables-section__btn[_ngcontent-%COMP%]{border:1px solid #d2f0f5;background:#d2f0f5;padding:4px 10px;margin:2px 0;cursor:pointer;font:inherit;color:#111827;transition:background-color .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease}.variables-section__btn[_ngcontent-%COMP%]:hover{background:#e0f2fe;border-color:#38bdf8;color:#0f172a;box-shadow:0 0 0 1px #38bdf866}.variables-section__btn[_ngcontent-%COMP%]:focus-visible{outline:none;box-shadow:0 0 0 2px #38bdf8cc}.pdf-dialog__footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:16px}@media(max-width:4000px){.lead-content[_ngcontent-%COMP%]{margin-top:80px}}@media(max-width:768px){.lead-content[_ngcontent-%COMP%]{margin-top:150px}}@media(max-width:640px){.lead-view[_ngcontent-%COMP%]{padding:16px}.lead-content[_ngcontent-%COMP%]{max-width:100%}.lead-content[_ngcontent-%COMP%] .lead-logos[_ngcontent-%COMP%]{justify-content:center;gap:12px}.lead-content[_ngcontent-%COMP%] .lead-logos[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:200px;max-height:auto}.lead-hero__grid[_ngcontent-%COMP%]{gap:4px}.lead-hero__item[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(110px,40%) 1fr;gap:6px 12px}.lead-hero__label[_ngcontent-%COMP%], .lead-hero__value[_ngcontent-%COMP%]{font-size:14px}.lead-hero__image[_ngcontent-%COMP%]{width:100%;max-width:220px;height:auto}.contact-section__row[_ngcontent-%COMP%], .contact-block[_ngcontent-%COMP%]{grid-template-columns:minmax(110px,40%) 1fr;gap:6px 12px}.contact-details-indent[_ngcontent-%COMP%]{margin-left:0}.contact-field-stacked[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.contact-field-stacked__topic[_ngcontent-%COMP%], .contact-field-stacked__data[_ngcontent-%COMP%]{font-size:14px}.contact-section__field-label[_ngcontent-%COMP%]{font-weight:700;font-size:14px}.pdf-dialog[_ngcontent-%COMP%]{padding:32px 24px 28px}.pdf-dialog__row[_ngcontent-%COMP%]{grid-template-columns:1fr;gap:12px;text-align:left}.pdf-dialog__label[_ngcontent-%COMP%]{color:#1f2937}.pdf-dialog__footer[_ngcontent-%COMP%]{flex-direction:column-reverse;align-items:stretch}}@media(max-width:460px){.lead-content[_ngcontent-%COMP%]{margin-top:210px}}.dark-theme[_nghost-%COMP%] .lead-view[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .lead-view[_ngcontent-%COMP%]{background-color:#0b0e13;color:#e5e7eb}.dark-theme[_nghost-%COMP%] .page-header__text[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .page-header__text[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{color:#f9fafb}.dark-theme[_nghost-%COMP%] .structural-divider[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .structural-divider[_ngcontent-%COMP%]{border-top-color:#37415180}.dark-theme[_nghost-%COMP%] .lead-hero[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .lead-hero[_ngcontent-%COMP%]{border-top-color:#1f2937}.dark-theme[_nghost-%COMP%] .lead-hero__item[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .lead-hero__item[_ngcontent-%COMP%]{border-bottom-color:#1f2937}.dark-theme[_nghost-%COMP%] .lead-hero__label[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .lead-hero__label[_ngcontent-%COMP%]{color:#e5e7eb}.dark-theme[_nghost-%COMP%] .lead-hero__value[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .lead-hero__value[_ngcontent-%COMP%], .dark-theme[_nghost-%COMP%] .contact-section__field-value[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .contact-section__field-value[_ngcontent-%COMP%]{color:#cbd5f5}.dark-theme[_nghost-%COMP%] .contact-section__field-label[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .contact-section__field-label[_ngcontent-%COMP%]{color:#e5e7eb}.dark-theme[_nghost-%COMP%] .lead-hero__image[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .lead-hero__image[_ngcontent-%COMP%]{box-shadow:0 0 0 1px #0f172a99}.dark-theme[_nghost-%COMP%] .pdf-dialog[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .pdf-dialog[_ngcontent-%COMP%]{background:#0f172a;box-shadow:0 24px 60px #02061799}.dark-theme[_nghost-%COMP%] .pdf-dialog__close[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .pdf-dialog__close[_ngcontent-%COMP%]{background:#1e293b;color:#e2e8f0}.dark-theme[_nghost-%COMP%] .pdf-dialog__header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .pdf-dialog__header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .dark-theme[_nghost-%COMP%] .pdf-dialog__value[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .pdf-dialog__value[_ngcontent-%COMP%]{color:#f8fafc}.dark-theme[_nghost-%COMP%] .pdf-dialog__label[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .pdf-dialog__label[_ngcontent-%COMP%]{color:#cbd5f5}.dark-theme[_nghost-%COMP%] .pdf-dialog__input[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .pdf-dialog__input[_ngcontent-%COMP%]{background:#111827;border-color:#334155;color:#f8fafc}.dark-theme[_nghost-%COMP%] .pdf-dialog__input[_ngcontent-%COMP%]:focus, .dark-theme [_nghost-%COMP%] .pdf-dialog__input[_ngcontent-%COMP%]:focus{border-color:#38bdf8;box-shadow:0 0 0 4px #38bdf833}.dark-theme[_nghost-%COMP%] .pdf-dialog__link[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .pdf-dialog__link[_ngcontent-%COMP%]{color:#38bdf8}.dark-theme[_nghost-%COMP%] .variables-section__btn[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .variables-section__btn[_ngcontent-%COMP%]{border-color:#334155;background:#0b1120;color:#e5e7eb}.dark-theme[_nghost-%COMP%] .variables-section__btn[_ngcontent-%COMP%]:hover, .dark-theme [_nghost-%COMP%] .variables-section__btn[_ngcontent-%COMP%]:hover{background:#020617;border-color:#38bdf8;color:#f9fafb}.collection-two-col[_ngcontent-%COMP%]{display:grid;grid-template-columns:220px 1fr;column-gap:32px;align-items:start}.collection-two-col__left[_ngcontent-%COMP%]{font-weight:700;font-size:18px}.collection-two-col__right[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px}
1.collection-field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.collection-field__label[_ngcontent-%COMP%]{font-weight:700}.collection-field__value[_ngcontent-%COMP%]{font-weight:400}.collection-field__images[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.collection-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:220px 1fr;column-gap:32px;padding:16px 0;border-bottom:1px solid rgba(148,163,184,.15)}.collection-row__left[_ngcontent-%COMP%]{font-weight:800;font-size:18px;color:#0f172a;padding-top:4px}.collection-row__right[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.field-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.field-block__key[_ngcontent-%COMP%]{font-weight:800;font-size:15px;color:#0f172a}.field-block__value[_ngcontent-%COMP%]{font-size:15px;font-weight:500;color:#111827;white-space:pre-wrap;word-break:break-word}.field-block__images[_ngcontent-%COMP%] .img[_ngcontent-%COMP%]{width:100%;max-width:360px;border-radius:10px;display:block;margin-top:6px}@media(max-width:640px){.collection-row[_ngcontent-%COMP%]{grid-template-columns:1fr;row-gap:12px}.collection-row__left[_ngcontent-%COMP%]{font-size:16px}.field-block__key[_ngcontent-%COMP%], .field-block__value[_ngcontent-%COMP%]{font-size:14px}.field-block__images[_ngcontent-%COMP%] .img[_ngcontent-%COMP%]{max-width:100%}}.lead-forward-legend[_ngcontent-%COMP%]{display:inline-flex;flex-wrap:wrap;align-items:center;gap:6px 16px;margin-left:12px;font-size:12px;font-weight:400;color:#475569}.lead-forward-legend-item[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px}.lead-forward-legend-swatch[_ngcontent-%COMP%]{width:12px;height:12px;border-radius:3px;flex:none}.lead-forward-legend-swatch--list[_ngcontent-%COMP%]{background:#2563eb}.lead-forward-legend-swatch--manual[_ngcontent-%COMP%]{background:#f59e0b}.lead-forward-chips[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px}.lead-forward-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:4px 12px;border-radius:16px;font-size:13px;line-height:1.4}.lead-forward-chip--list[_ngcontent-%COMP%]{background:#dbeafe;color:#1e3a8a}.lead-forward-chip--manual[_ngcontent-%COMP%]{background:#fef3c7;color:#92400e}']})};var Yt=["pdfCustomNameInput"];function Xt(n,t){if(n&1&&(C(0,"div",5),H(1,"app-lead-details-sections",9),h()),n&2){let e=r();l(),N("lead",e.lead)("leadSections",e.leadSections)("leadsImages",e.leadsImages)("sendLeadListEmails",e.sendLeadListEmails)("loading",e.loading())}}function Zt(n,t){n&1&&H(0,"div",6)}function Qt(n,t){if(n&1){let e=A();C(0,"button",29),V("click",function(){let o=I(e).$implicit,d=r(2);return $(d.onVariableLinkClick(o))}),p(1),h()}if(n&2){let e=t.$implicit;l(),E(" ",e.label," ")}}function Ht(n,t){if(n&1){let e=A();C(0,"div",32)(1,"button",33),V("click",function(o){let d=I(e).$implicit,a=r(4);return $(a.onVariableTokenClick(d,o))}),p(2),h()()}if(n&2){let e=t.$implicit;l(2),x(e)}}function Jt(n,t){if(n&1&&(C(0,"div",25)(1,"div",30),p(2),y(3,"translate"),h(),C(4,"div",31),P(5,Ht,3,1,"div",32,w),h()()),n&2){let e=r(3);l(2),x(v(3,1,"pages.lead.view.pdfDialog.variableSections.account")),l(3),O(e.account)}}function qt(n,t){if(n&1){let e=A();C(0,"div",32)(1,"button",33),V("click",function(o){let d=I(e).$implicit,a=r(4);return $(a.onVariableTokenClick(d,o))}),p(2),h()()}if(n&2){let e=t.$implicit;l(2),x(e)}}function en(n,t){if(n&1&&(C(0,"div",25)(1,"div",30),p(2),y(3,"translate"),h(),C(4,"div",31),P(5,qt,3,1,"div",32,w),h()()),n&2){let e=r(3);l(2),x(v(3,1,"pages.lead.view.pdfDialog.variableSections.appUser")),l(3),O(e.appUser)}}function tn(n,t){if(n&1){let e=A();C(0,"div",32)(1,"button",33),V("click",function(o){let d=I(e).$implicit,a=r(4);return $(a.onVariableTokenClick(d,o))}),p(2),h()()}if(n&2){let e=t.$implicit;l(2),x(e)}}function nn(n,t){if(n&1&&(C(0,"div",25)(1,"div",30),p(2),y(3,"translate"),h(),C(4,"div",31),P(5,tn,3,1,"div",32,w),h()()),n&2){let e=r(3);l(2),E("",v(3,1,"pages.lead.view.pdfDialog.variableSections.event")," "),l(3),O(e.event)}}function on(n,t){if(n&1){let e=A();C(0,"div",32)(1,"button",33),V("click",function(o){let d=I(e).$implicit,a=r(4);return $(a.onVariableTokenClick(d,o))}),p(2),h()()}if(n&2){let e=t.$implicit;l(2),x(e)}}function an(n,t){if(n&1&&(C(0,"div",25)(1,"div",30),p(2),y(3,"translate"),h(),C(4,"div",31),P(5,on,3,1,"div",32,w),h()()),n&2){let e=r(3);l(2),E("",v(3,1,"pages.lead.view.pdfDialog.variableSections.form")," "),l(3),O(e.form)}}function ln(n,t){if(n&1){let e=A();C(0,"div",32)(1,"button",33),V("click",function(o){let d=I(e).$implicit,a=r(4);return $(a.onVariableTokenClick(d,o))}),p(2),h()()}if(n&2){let e=t.$implicit;l(2),x(e)}}function rn(n,t){if(n&1&&(C(0,"div",25)(1,"div",30),p(2),y(3,"translate"),h(),C(4,"div",31),P(5,ln,3,1,"div",32,w),h()()),n&2){let e=r(3);l(2),E("",v(3,1,"pages.lead.view.pdfDialog.variableSections.lead")," "),l(3),O(e.leadVariables)}}function dn(n,t){if(n&1&&(f(0,Jt,7,3,"div",25),f(1,en,7,3,"div",25),f(2,nn,7,3,"div",25),f(3,an,7,3,"div",25),f(4,rn,7,3,"div",25)),n&2){let e=r(2);u(e.account&&e.account.length?0:-1),l(),u(e.appUser&&e.appUser.length?1:-1),l(),u(e.event&&e.event.length?2:-1),l(),u(e.form&&e.form.length?3:-1),l(),u(e.leadVariables&&e.leadVariables.length?4:-1)}}function sn(n,t){if(n&1){let e=A();C(0,"div",32)(1,"button",33),V("click",function(o){let d=I(e).$implicit,a=r(3);return $(a.onVariableTokenClick(d,o))}),p(2),h()()}if(n&2){let e=t.$implicit;l(2),x(e)}}function cn(n,t){if(n&1&&(C(0,"div",25)(1,"div",30),p(2),h(),C(3,"div",31),P(4,sn,3,1,"div",32,w),h()()),n&2){let e=r(2);l(2),x(e.pdfDialogFormName),l(2),O(e.formFields)}}function pn(n,t){if(n&1){let e=A();C(0,"div",7)(1,"div",10)(2,"button",11),V("click",function(){I(e);
1let o=r();return $(o.closePdfDialog())}),C(3,"span",12),p(4,"close"),h()(),C(5,"header",13)(6,"h2",14),p(7),y(8,"translate"),h()(),C(9,"div",15)(10,"div",16)(11,"div",17),p(12),y(13,"translate"),h(),C(14,"div",18),p(15),h()(),C(16,"div",16)(17,"label",19),p(18),y(19,"translate"),h(),C(20,"input",20,0),y(22,"translate"),_e("ngModelChange",function(o){I(e);let d=r();return pe(d.pdfDialogCustomName,o)||(d.pdfDialogCustomName=o),$(o)}),h()(),C(23,"div",21)(24,"div",17),p(25),y(26,"translate"),h(),C(27,"div",22),P(28,Qt,2,1,"button",23,w),h(),C(30,"div",24),f(31,dn,5,5),f(32,cn,6,1,"div",25),h()()(),C(33,"footer",26)(34,"app-button",27),y(35,"translate"),V("clicked",function(){I(e);let o=r();return $(o.closePdfDialog())}),h(),C(36,"app-button",28),y(37,"translate"),V("clicked",function(){I(e);let o=r();return $(o.onGeneratePdf(o.lead))}),p(38,"> "),h()()()()}if(n&2){let e=r();l(2),ae("aria-label","close"),l(5),x(v(8,14,"pages.lead.view.pdfDialog.title")),l(5),x(v(13,16,"pages.lead.view.pdfDialog.filenameLabel")),l(3),x(e.pdfDialogDefaultName),l(3),x(v(19,18,"pages.lead.view.pdfDialog.customizeFilenameLabel")),l(2),N("placeholder",v(22,20,"pages.lead.view.pdfDialog.customizeFilenamePlaceholder")),ce("ngModel",e.pdfDialogCustomName),l(5),x(v(26,22,"pages.lead.view.pdfDialog.availableVariables")),l(3),O(e.pdfDialogVariableLinks),l(2),j("is-open",e.showGeneralVariables||e.showFormFieldsVariables),l(),u(e.showGeneralVariables?31:-1),l(),u(e.showFormFieldsVariables&&e.formFields&&e.formFields.length?32:-1),l(2),N("label",v(35,24,"pages.lead.view.pdfDialog.closeButton")),l(2),N("label",v(37,26,"pages.lead.view.pdfDialog.generateButton"))}}var Ie=class n{leadSections=null;pdfCustomNameInput;route=k(fe);location=k(ge);destroy$=new te;cdr=k(me);dialog=k(be);leadService=k(Le);formService=k(Fe);formFileManagerService=k(Te);fileStorageService=k(ye);eventService=k(Ee);INFO_TEXT_KEY="__INFO_TEXT__";translateService=k(W);leadDetailsLayout=k(U);employeeService=k(ke);id;lead=null;loading=oe(!0);syncStatusVisible=!1;lastForm=null;sendLeadListEmails=new Set;account=[];appUser=[];event=[];form=[];leadVariables=[];formFields=[];leadViewTemplate=[];leadsImages=[];headerTitle=null;popupVisible=!1;popupTitle="Load Failed";popupMessage="";popupIcon="error";showProgressDots=!1;showCloseButton=!0;iconColor="#ef4444";backgroundColor="rgba(239, 68, 68, 0.12)";pdfDialogVisible=!1;pdfDialogDefaultName="";pdfDialogCustomName="";pdfDialogFormName="";pdfDialogFormId=null;pdfDialogVariableLinks=[];showGeneralVariables=!1;showFormFieldsVariables=!1;showErrorPopup(t,e){this.popupTitle=t,this.popupMessage=e,this.popupIcon="error",this.showProgressDots=!1,this.showCloseButton=!0,this.iconColor="#ef4444",this.backgroundColor="rgba(239, 68, 68, 0.12)",this.popupVisible=!0}showLoadingPopup(t,e){this.popupTitle=t,this.popupMessage=e,this.popupIcon="hourglass_top",this.showProgressDots=!0,this.showCloseButton=!1,this.iconColor="#19c2f7",this.backgroundColor="rgba(29, 198, 246, 0.12)",this.popupVisible=!0}showInfoPopup(t,e){this.popupTitle=t,this.popupMessage=e,this.popupIcon="info",this.showProgressDots=!1,this.showCloseButton=!0,this.iconColor="#19c2f7",this.backgroundColor="rgba(29, 198, 246, 0.12)",this.popupVisible=!0}hidePopup(){this.popupVisible=!1}onPopupClose(){this.popupVisible=!1}ngOnInit(){this.leadService.isPlatformBrwsr()&&(this.id=Number(this.route.snapshot.paramMap.get("id")),this.loadTenantSyncStatusVisibility(),this.loadLeads(this.id))}loadTenantSyncStatusVisibility(){this.employeeService.getTenantSettings().pipe(B(this.destroy$)).subscribe({next:t=>{this.syncStatusVisible=t?.data?.otherSettings?.syncStatusVisible===!0,this.rebuildLeadSectionsIfReady()},error:t=>{console.error("Failed to load tenant settings for sync status visibility",t),this.syncStatusVisible=!1}})}rebuildLeadSectionsIfReady(){!this.lead||!this.lastForm||(this.leadSections=this.leadDetailsLayout.buildSections(this.lead,this.lastForm,{syncStatusVisible:this.syncStatusVisible}),this.cdr.detectChanges())}loadLeads(t){this.leadService.getByRecordId(t).pipe(B(this.destroy$)).subscribe({next:async e=>{let i=e?.data??e;this.lead=i;let o=i?.pdfUrlPattern??i?.data?.pdfUrlPattern,d=this.extractFilenameFromPdfUrlPattern(o);d&&(this.lead.data=this.lead.data||{},this.lead.data.pdfUrlPattern=d);try{if(this.lead.eventId){let a=await ne(this.eventService.getByEventId(this.lead.eventId)),s=a?.data??a;console.log(s),s&&(this.lead.eventLogo=s.fairLogo,this.lead.companyLogo=s.companyLogo,this.cdr.detectChanges())}}catch(a){console.error("Failed to load event details",a)}if(console.log("Lead data:",e),this.loadForm(i.formId),this.loadVariables(i.formId),this.loadImages(this.lead),i?.createdAt){let a=new Date(i.createdAt),s=a.toLocaleDateString(),c=a.toLocaleTimeString();this.headerTitle=`Lead details from: ${s} ${c}`}else this.headerTitle="Lead details from: N/A";this.loading.set(!1),this.cdr.detectChanges()},error:e=>{console.error("Error loading lead:",e),this.loading.set(!1),this.cdr.detectChanges()}})}loadForm(t){this.formService.getByFormId(t).pipe(B(this.destroy$)).subscribe({next:e=>{let i=e?.data??e;console.log("Form data:",i),this.lead&&(this.lastForm=i,this.leadSections=this.leadDetailsLayout.buildSections(this.lead,i,{syncStatusVisible:this.syncStatusVisible}),this.cdr.detectChanges()),this.loadSendLeadListEmails(i)},error:e=>{console.error("Error loading form:",e)}})}loadVariables(t){t&&this.formService.getFormFields(t).pipe(B(this.destroy$)).subscribe({next:e=>{this.account=e?.data?.account||[],this.appUser=e?.data?.appUser||[],this.event=e?.data?.event||[],this.form=e?.data?.form||[],this.leadVariables=e?.data?.lead||[],this.formFields=e?.data?.formFields||[]},error:e=>{console.error("Error fetching available variables:",e)}})}isMetaRow(t){return t==="leadId"||t==="syncOn"||t==="updatedAt"}formatLabel(t){return(t||"").replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\s+/g," ").trim().replace(/\b\w/g,e=>e.toUpperCase())}formatDisplayValue(t,e){if(e==null)return"";if(typeof e!="string")return e;let i=e;return i.includes("|")&&(i=i.split("|").map(o=>o.trim()).filter(o=>o.length>0).join(", ")),i}looksLikeImage(t){if(typeof t!="string")return!1;let e=t.split(/[?#]/)[0];return e.startsWith("data:image")||/(png|jpg|jpeg|gif|webp|bmp|svg)$/i.test(e)}looksLikeJson(t){if(typeof t!="string")return!1;let e=t.trim();return e.startsWith("{")&&e.endsWith("}")||e.startsWith("[")&&e.endsWith("]")}isArray(t){return Array.isArray(t)&&t.length>0}extractImagesFromLead(t,e=!1){let i=[];return!t||typeof t!="object"||(t.data&&typeof t.data=="object"&&!e&&Ob
1ject.entries(t.data).forEach(([o,d])=>{let a=null;if(Array.isArray(d)&&d.length>0){let s=d[0];typeof s=="string"&&this.looksLikeImage(s)&&(a=s)}else typeof d=="string"&&this.looksLikeImage(d)&&(a=d);a&&i.push({fieldKey:o,value:a})}),t.collections&&typeof t.collections=="object"&&Object.entries(t.collections).forEach(([o,d])=>{Array.isArray(d)&&d.forEach((a,s)=>{a&&typeof a=="object"&&Object.entries(a).forEach(([c,g])=>{let M=null;if(typeof g=="string"&&this.looksLikeImage(g))M=g;else if(Array.isArray(g)&&g.length>0){let L=g[0];typeof L=="string"&&this.looksLikeImage(L)&&(M=L)}M&&i.push({fieldKey:`${o}.${s}.${c}`,value:M})})})})),i}loadImages(t){if(!t||typeof t!="object")return;let e=this.extractImagesFromLead(t,!1);e.length&&e.forEach(i=>{let o=i.value;if(typeof o!="string")return;let d=o.trim();!d||d.startsWith("http")||d.startsWith("data:image")||d.startsWith("/")&&this.fileStorageService.getFileFromLeadStorage(d).pipe(B(this.destroy$)).subscribe({next:a=>{let s=URL.createObjectURL(a);this.leadsImages.push({url:s,label:this.formatLabel(i.fieldKey)||i.fieldKey||"Image",fieldKey:i.fieldKey,original:d}),this.cdr.detectChanges()},error:a=>{console.error("Error loading image in lead view:",i.value,a)}})})}extractFilenameFromPdfUrlPattern(t){if(!t)return null;let e=String(t),o=e.split(/[?#]/)[0].split("/");return o[o.length-1]||""||e}buildFollowUpEmailOptions(){let t=[],e=this.lead?.formName?`${this.lead.formName} Follow-up`:"General follow-up";return t.push({value:"followup_general",label:e}),this.lead?.eventName&&t.push({value:"followup_event",label:`${this.lead.eventName} recap`}),t.push({value:"followup_thankyou",label:"Thank you and next steps"}),t}openPdfDialog(t){let e="_{?}.pdf";this.pdfDialogFormId=t?.formId??null;let i=this.lead?.data?.pdfUrlPattern||`${this.lead?.leadId||""}`;this.pdfDialogDefaultName=`${i}${e}`,this.pdfDialogCustomName=t?.customPdfName||"",this.pdfDialogFormName=t?.form?.name||this.lead?.formName||"",this.showGeneralVariables=!1,this.showFormFieldsVariables=!1;let o=[{label:"General variables"}];this.pdfDialogFormName&&o.push({label:this.pdfDialogFormName}),this.pdfDialogVariableLinks=o,this.pdfDialogVisible=!0}onVariableLinkClick(t){t.label==="General variables"?(this.showGeneralVariables=!this.showGeneralVariables,this.showGeneralVariables&&(this.showFormFieldsVariables=!1)):t.label===this.pdfDialogFormName?(this.show
1FormFieldsVariables=!this.showFormFieldsVariables,this.showFormFieldsVariables&&(this.showGeneralVariables=!1)):t.url&&window.open(t.url,"_blank")}onVariableTokenClick(t,e){e&&(e.preventDefault(),e.stopPropagation());let i;if(typeof t=="string"?i=t:t&&(i=(t.token||t.label||"").toString()),!i)return;let o=this.pdfDialogCustomName||"",d=this.pdfCustomNameInput?.nativeElement;if(d){d.focus();let a=d.selectionStart??o.length,s=d.selectionEnd??o.length,c=o.slice(0,a)+i+o.slice(s);this.pdfDialogCustomName=c;let g=a+i.length;setTimeout(()=>{d.selectionStart=g,d.selectionEnd=g});return}this.pdfDialogCustomName=o+i}closePdfDialog(){this.pdfDialogVisible=!1}onGeneratePdf(t){if(!this.lead){let s=this.translateService.instant("pages.lead.view.popup.generatingPdf");this.showInfoPopup(s,"Lead details are still loading. Please try again in a moment.");return}let e=this.lead.recordId??this.id;if(!e){let s=this.translateService.instant("pages.lead.view.popup.pdfFailed"),c=this.translateService.instant("pages.lead.view.popup.pdfFailedMessage");this.showErrorPopup(s,c);return}let i=this.lead?.data?.pdfUrlPattern||"{lead_id}",o=(this.pdfDialogCustomName||"").trim(),d=o?`${i}_${o}`:i,a=this.translateService.instant("pages.lead.view.popup.generatingPdf");this.showLoadingPopup(a,"Resolving filename..."),this.leadService.resolvePdfFilename(e,d).pipe(B(this.destroy$)).subscribe({next:s=>{this.hidePopup(),this.closePdfDialog();let c=s?.data||`${e}.pdf`;sessionStorage.setItem("fileName",c);let g=encodeURIComponent(c.replace(".pdf",""));window.open(`/pdf-preview/${e}/${g}`,"_blank"),this.hidePopup(),this.cdr.detectChanges()},error:s=>{this.hidePopup(),console.error("Error resolving PDF filename",s);let c=this.translateService.instant("pages.lead.view.popup.pdfFailed"),g=this.translateService.instant("pages.lead.view.popup.pdfFailedMessage");this.showErrorPopup(c,g),this.cdr.detectChanges()}})}onFollowUp(){if(!this.lead){this.showInfoPopup("Follow Up Email","Lead details are still loading. Please try again in a moment.");return}let t=this.buildFollowUpEmailOptions();this.dialog.open(Ve,{panelClass:"followup-email-dialog-panel",autoFocus:!1,restoreFocus:!1,data:{title:"Email selection",options:t}}).afterClosed().pipe(B(this.destroy$)).subscribe(i=>{if(!i)return;let o=this.translateService.instant("pages.lead.view.popup.followUpSent"),d=this.translateService.instant("pages.lead.view.popup.followUpSentMessage");this.showInfoPopup(o,d)})}loadSendLeadListEmails(t){let i=(t?.data??t)?.elements;if(!Array.isArray(i))return;let o=this.findSendLeadToElement(i),d=o?.dataSourceId;if(!d)return;let a=o?.emailColumn??o?.emailField??null;this.formFileManagerService.getCsvData(String(d)).pipe(B(this.destroy$)).subscribe({next:s=>{let c=Array.isArray(s?.data)?s.data:s;if(!Array.isArray(c)||!c.length||!Array.isArray(c[0]))return;let g=c[0],M=b=>String(b??"").trim().toLowerCase(),L=-1;if(a){let b=M(a);L=g.findIndex(D=>M(D)===b)}if(L===-1&&(L=g.findIndex(b=>["email","e-mail","email address","mail"].includes(M(b)))),L===-1&&g.length>2&&(L=2),L===-1)return;let T=new Set;c.forEach((b,D)=>{if(D===0||!Array.isArray(b)||L>=b.length)return;let S=this.extractEmail(String(b[L]??""));S&&T.add(S)}),this.sendLeadListEmails=T,this.cdr.detectChanges()},error:s=>{console.error("Error loading Forward-lead CSV data",s)}})}findSendLeadToElement(t){for(let e of t){if(!e)continue;if((e.type||"").toString().toLowerCase().replace(/\s+/g,"")==="sendleadto")return e;if(Array.isArray(e.children)&&e.children.length>0){let o=this.findSendLeadToElement(e.children);if(o)return o}}return null}extractEmail(t){let e=(t||"").match(/[a-zA-Z0-9._%+\-]+@[a-zA-Z0-9.\-]+\.[a-zA-Z]{2,}/);return e?e[0].toLowerCase():""}back(){this.location.back()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=K({type:n,selectors:[["app-leads-view"]],viewQuery:function(e,i){if(e&1&&le(Yt,5),e&2){let o;re(o=de())&&(i.pdfCustomNameInput=o.first)}},decls:10,vars:20,consts:[["pdfCustomNameInput",""],[1,"lead-view"],[3,"title","subtitle","titleSize","fullPage"],["size","md","type","info","icon","arrow_back",3,"clicked","label"],["size","md","type","info","icon","picture_as_pdf",3,"clicked","label"],[1,"lead-content"],[1,"lead-placeholder"],["role","dialog","aria-modal","true","aria-labelledby","pdfDialogTitle",1,"pdf-dialog-backdrop"],[3,"close","isVisible","t
1itle","message","icon","showProgressDots","showCloseButton","iconColor","backgroundColor"],[3,"lead","leadSections","leadsImages","sendLeadListEmails","loading"],[1,"pdf-dialog"],["type","button",1,"pdf-dialog__close",3,"click"],["aria-hidden","true",1,"material-icons"],[1,"pdf-dialog__header"],["id","pdfDialogTitle"],[1,"pdf-dialog__body"],[1,"pdf-dialog__row"],[1,"pdf-dialog__label"],[1,"pdf-dialog__value"],["for","pdfCustomName",1,"pdf-dialog__label"],["id","pdfCustomName","type","text",1,"pdf-dialog__input",3,"ngModelChange","placeholder","ngModel"],[1,"pdf-dialog__row","pdf-dialog__row--variables"],[1,"pdf-dialog__links"],["type","button",1,"pdf-dialog__link"],[1,"pdf-dialog__variables-dropdown"],[1,"variables-section"],[1,"pdf-dialog__footer"],["size","md","type","default",3,"clicked","label"],["icon","picture_as_pdf","size","md","type","info",3,"clicked","label"],["type","button",1,"pdf-dialog__link",3,"click"],[1,"variables-section__title"],["role","list",1,"variables-section__list"],["role","listitem",1,"variables-section__item"],["type","button",1,"variables-section__btn",3,"click"]],template:function(e,i){e&1&&(C(0,"div",1)(1,"app-page-header",2)(2,"app-button",3),y(3,"translate"),V("clicked",function(){return i.back()}),h(),C(4,"app-button",4),y(5,"translate"),V("clicked",function(){return i.openPdfDialog(i.lead)}),h()(),f(6,Xt,2,5,"div",5)(7,Zt,1,0,"div",6),f(8,pn,39,28,"div",7),C(9,"app-public-popup",8),V("close",function(){return i.onPopupClose()}),h()()),e&2&&(l(),N("title",i.headerTitle||"")("subtitle","")("titleSize","1.9rem")("fullPage",!0),l(),N("label",v(3,16,"pages.lead.view.backButton")),l(2),N("label",v(5,18,"pages.lead.view.generatePdfButton")),l(2),u(i.loading()?7:6),l(2),u(i.pdfDialogVisible?8:-1),l(),N("isVisible",i.popupVisible)("title",i.popupTitle)("message",i.popupMessage)("icon",i.popupIcon)("showProgressDots",i.showProgressDots)("showCloseButton",i.showCloseButton)("iconColor",i.iconColor)("backgroundColor",i.backgroundColor))},dependencies:[Oe,Pe,xe,ue,Ce,he,Q,Me,Y],styles:["[_nghost-%COMP%]{display:block;padding:24px}.lead-view[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px}.lead-content[_ngcontent-%COMP%]{max-width:900px;margin:0 auto}.lead-content[_ngcontent-%COMP%] .lead-logos[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:4px clamp(24px,10vw,300px);margin-bottom:24px}.lead-content[_ngcontent-%COMP%] .lead-logos[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:200px;height:auto;max-height:100px;object-fit:contain}.lead-content[_ngcontent-%COMP%] .lead-sections[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:32px}.lead-content[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:350px;height:auto;object-fit:contain}.lead-hero[_ngcontent-%COMP%]{margin-top:8px;padding:8px 0 16px}.lead-hero__grid[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0}.lead-hero__item[_ngcontent-%COMP%]{display:grid;grid-template-columns:220px 1fr;align-items:flex-start;gap:4px clamp(24px,8vw,300px);padding:14px 0;border-bottom:1px solid rgba(157,161,161,.2470588235)}.lead-hero__item--compact[_ngcontent-%COMP%]{padding:6px 0;border-bottom:none}.lead-hero__label[_ngcontent-%COMP%]{font-size:16px;font-weight:700;color:#000}.contact-section[_ngcontent-%COMP%] + .contact-section[_ngcontent-%COMP%]{margin-top:16px;padding-top:8px;border-top:1px solid #c7c7c7}.contact-section__title[_ngcontent-%COMP%]{grid-column:1/-1;font-weight:900;margin-bottom:4px}.contact-section__field-label[_ngcontent-%COMP%]{font-size:16px;font-weight:800}.contact-section__field-value[_ngcontent-%COMP%]{margin-bottom:10px;word-break:break-word}.lead-hero__value[_ngcontent-%COMP%]{font-size:16px;color:#111827;font-weight:500;word-break:break-word}.lead-hero__text[_ngcontent-%COMP%]{white-space:pre-wrap}.lead-hero__image[_ngcontent-%COMP%]{margin-top:10px;display:block;width:100%;max-width:360px;height:auto;border-radius:8px}.lead-hero__image[alt=Signature][_ngcontent-%COMP%]{display:inline-block;width:auto;max-width:180px;max-height:150px;margin-right:16px}.pdf-dialog-backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#0f172a8c;display:flex;align-items:center;justify-content:center;z-index:1000;padding:24px}.pdf-dialog[_ngcontent-%COMP%]{position:relative;width:min(640px,100%);background:#fff;border-radius:18px;box-shadow:0 24px 60px #0f172a40;padding:40px 36px 32px;display:flex;flex-direction:column;gap:24px}.pdf-dialog__close[_ngcontent-%COMP%]{position:absolute;top:18px;right:18px;width:40px;height:40px;border:none;border-radius:50%;background:#f1f5f9;color:#111827;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.pdf-dialog__header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:26px;font-weight:700;color:#111827}.pdf-dialog__body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.pdf-dialog__row[_ngcontent-%COMP%]{display:grid;grid-template-columns:200px 1fr;gap:24px;align-items:center}.pdf-dialog__label[_ngcontent-%COMP%]{font-weight:600;color:#475569}.pdf-dialog__value[_ngcontent-%COMP%]{font-size:16px;color:#111827;font-weight:500}.pdf-dialog__input[_ngcontent-%COMP%]{width:100%;padding:12px 16px;border:1px solid #d1d5db;border-radius:10px;font-size:15px;transition:border-color .2s ease,box-shadow .2s ease}.pdf-dialog__input[_ngcontent-%COMP%]:focus{outline:none;border-color:#23c3f6;box-shadow:0 0 0 4px #23c3f633}.pdf-dialog__row--variables[_ngcontent-%COMP%]{align-items:start}.pdf-dialog__links[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:12px}.pdf-dialog__link[_ngcontent-%COMP%]{padding:0;border:none;background:none;color:#23c3f6;font-weight:600;cursor:pointer}.pdf-dialog__link[_ngcontent-%COMP%]:hover{text-decoration:underline}.pdf-dialog__variables-dropdown[_ngcontent-%COMP%]{display:flex;gap:10px;margin-top:12px;padding:12px 14px;border-radius:10px;width:100%;grid-column:1/-1;max-height:0;opacity:0;overflow:hidden;transform:translateY(-4px);transition:max-height .25s ease,opacity .2s ease,transform .2s ease}.pdf-dialog__variables-dropdown.is-open[_ngcontent-%COMP%]{max-height:500px;opacity:1;overflow:auto;transform:translateY(0)}.variables-section__title[_ngcontent-%COMP%]{font-weight:600;font-size:18px;text-transform:capitalize;letter-spacing:.05em;
1color:#000;margin-bottom:4px}.variables-section__list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0}.variables-section__item[_ngcontent-%COMP%]{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:15px;padding:2px 0;color:#111827}.variables-section__btn[_ngcontent-%COMP%]{border:1px solid #d2f0f5;background:#d2f0f5;padding:4px 10px;margin:2px 0;cursor:pointer;font:inherit;color:#111827;transition:background-color .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease}.variables-section__btn[_ngcontent-%COMP%]:hover{background:#e0f2fe;border-color:#38bdf8;color:#0f172a;box-shadow:0 0 0 1px #38bdf866}.variables-section__btn[_ngcontent-%COMP%]:focus-visible{outline:none;box-shadow:0 0 0 2px #38bdf8cc}.pdf-dialog__footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:16px}@media(max-width:640px){.lead-view[_ngcontent-%COMP%]{padding:16px}.lead-content[_ngcontent-%COMP%]{max-width:100%}.lead-content[_ngcontent-%COMP%] .lead-logos[_ngcontent-%COMP%]{justify-content:center;gap:12px}.lead-content[_ngcontent-%COMP%] .lead-logos[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:200px;max-height:auto}.lead-hero__grid[_ngcontent-%COMP%]{gap:4px}.lead-hero__item[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(110px,40%) 1fr;gap:6px 12px}.lead-hero__label[_ngcontent-%COMP%], .lead-hero__value[_ngcontent-%COMP%]{font-size:14px}.lead-hero__image[_ngcontent-%COMP%]{width:100%;max-width:220px;height:auto}.contact-section__field-label[_ngcontent-%COMP%]{font-weight:700;font-size:14px}.pdf-dialog[_ngcontent-%COMP%]{padding:32px 24px 28px}.pdf-dialog__row[_ngcontent-%COMP%]{grid-template-columns:1fr;gap:12px;text-align:left}.pdf-dialog__label[_ngcontent-%COMP%]{color:#1f2937}.pdf-dialog__footer[_ngcontent-%COMP%]{flex-direction:column-reverse;align-items:stretch}}.dark-theme[_nghost-%COMP%] .lead-view[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .lead-view[_ngcontent-%COMP%]{background-color:#0b0e13;color:#e5e7eb}.dark-theme[_nghost-%COMP%] .page-header__text[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .page-header__text[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{color:#f9fafb}.dark-theme[_nghost-%COMP%] .lead-hero[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .lead-hero[_ngcontent-%COMP%]{border-top-color:#1f2937}.dark-theme[_nghost-%COMP%] .lead-hero__item[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .lead-hero__item[_ngcontent-%COMP%]{border-bottom-color:#1f2937}.dark-theme[_nghost-%COMP%] .lead-hero__label[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .lead-hero__label[_ngcontent-%COMP%]{color:#e5e7eb}.dark-theme[_nghost-%COMP%] .lead-hero__value[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .lead-hero__value[_ngcontent-%COMP%], .dark-theme[_nghost-%COMP%] .contact-section__field-value[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .contact-section__field-value[_ngcontent-%COMP%]{color:#cbd5f5}.dark-theme[_nghost-%COMP%] .contact-section__field-label[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .contact-section__field-label[_ngcontent-%COMP%]{color:#e5e7eb}.dark-theme[_nghost-%COMP%] .lead-hero__image[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .lead-hero__image[_ngcontent-%COMP%]{box-shadow:0 0 0 1px #0f172a99}.dark-theme[_nghost-%COMP%] .pdf-dialog[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .pdf-dialog[_ngcontent-%COMP%]{background:#0f172a;box-shadow:0 24px 60px #02061799}.dark-theme[_nghost-%COMP%] .pdf-dialog__close[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .pdf-dialog__close[_ngcontent-%COMP%]{background:#1e293b;color:#e2e8f0}.dark-theme[_nghost-%COMP%] .pdf-dialog__header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .pdf-dialog__header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .dark-theme[_nghost-%COMP%] .pdf-dialog__value[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .pdf-dialog__value[_ngcontent-%COMP%]{color:#f8fafc}.dark-theme[_nghost-%COMP%] .pdf-dialog__label[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .pdf-dialog__label[_ngcontent-%COMP%]{color:#cbd5f5}.dark-theme[_nghost-%COMP%] .pdf-dialog__input[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .pdf-dialog__input[_ngcontent-%COMP%]{background:#111827;border-color:#334155;color:#f8fafc}.dark-theme[_nghost-%COMP%] .pdf-dialog__input[_ngcontent-%COMP%]:focus, .dark-theme [_nghost-%COMP%] .pdf-dialog__input[_ngcontent-%COMP%]:focus{border-color:#38bdf8;box-shadow:0 0 0 4px #38bdf833}.dark-theme[_nghost-%COMP%] .pdf-dialog__link[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .pdf-dialog__link[_ngcontent-%COMP%]{color:#38bdf8}.dark-theme[_nghost-%COMP%] .variables-section__btn[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .variables-section__btn[_ngcontent-%COMP%]{border-color:#334155;background:#0b1120;color:#e5e7eb}.dark-theme[_nghost-%COMP%] .variables-section__btn[_ngcontent-%COMP%]:hover, .dark-theme [_nghost-%COMP%] .variables-section__btn[_ngcontent-%COMP%]:hover{background:#020617;border-color:#38bdf8;color:#f9fafb}.collection-two-col[_ngcontent-%COMP%]{display:grid;grid-template-columns:220px 1fr;column-gap:32px;align-items:start}.collection-two-col__left[_ngcontent-%COMP%]{font-weight:700;font-size:18px}.collection-two-col__right[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px}
1.collection-field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.collection-field__label[_ngcontent-%COMP%]{font-weight:700}.collection-field__value[_ngcontent-%COMP%]{font-weight:400}.collection-field__images[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}"]})};export{Ie as LeadsViewComponent};
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.