PageSourceSearch

https://vizops360.ai/assets/customFieldFocus-BbtM5clD.js

js vizops360.ai collected 2026-10-05 13:53:34 UTC 4,054 bytes, 1 lines download raw bytes

1import{r as m}from"./index-CpeGhXo5.js";const h="lead-convert-field-error",S={company:"Link a company so the lead is associated with the right account.",contactName:"Add the contact's name.",sourceAccountId:"Link a specific source account for this lead.",email:"Add an email address for the primary contact.",phone:"Add a phone number for the primary contact."};function v(t){if(t.offsetParent!==null)return!0;const e=t.getBoundingClientRect();return e.width>0&&e.height>0}function C(t){return`[data-lead-convert-field="${t}"], [data-lead-convert-field-keys~="${t}"]`}function L(t){const e=document.querySelectorAll(C(t));for(const n of e)if(v(n))return n;return e[0]??null}const d="data-missing-field-tour-anchor";function y(t){document.querySelectorAll(`[${d}]`).forEach(n=>{n.removeAttribute(d)});const e=L(t);return e?(e.setAttribute(d,t),!0):!1}function V(){return`[${d}]`}function q(t,e){const n=m.useRef(null),o=new Set(["company","contactName","contactReach","email","phone"]),c=new Set(["source","sourceAccountId","leadType","jobTitle","jobUrl","bidAmount","contractType"]);let i=!0;t&&o.has(t)&&(i=e?.associationsOpen??!0),t&&c.has(t)&&(i=i&&(e?.sourceSectionOpen??!0)),m.useEffect(()=>{if(!t){n.current=null;return}i&&n.current!==t&&(n.current=t,g(C(t),{tooltip:S[t],maxAttempts:15,onComplete:()=>y(t)}))},[t,i])}const A="custom_",R=3e3,_=200;let u=null,r=null,f=null;const w={contact:"data-contact-custom-field",company:"data-company-custom-field",lead:"data-lead-custom-field",deal:"data-deal-custom-field"},I={contact:"data-contact-customize-field",company:"data-company-customize-field",lead:"data-lead-customize-field",deal:"data-deal-customize-field"};function M(t){return`${A}${t}`}function x(t){return t.startsWith(A)}function G(t){return t.slice(A.length)}function P(t,e){return!!(t.applyToAll||t.visibleToIds?.includes(e))}function j(t){return t==null||t===""?!0:Array.isArray(t)?t.length===0:!1}function $(t,e){return`[${w[t]}="${e}"]`}function H(t,e){return`[${I[t]}="${e}"]`}function p(){f&&(f.remove(),f=null)}function O(){u&&(clearTimeout(u),u=null),r&&(r.classList.remove(h),r=null),p()}function F(t){if(t.offsetParent!==null)return!0;const e=t.getBoundingClientRect();return e.width>0&&e.height>0}function E(t){const e=document.querySelectorAll(t);for(const n of e)if(F(n))return n;return e[0]??null}function B(t,e){p();const n=t.getBoundingClientRect(),o=document.createElement("div");o.setAttribute("role","tooltip"),o.className="fixed z-[9999] max-w-[220px] rounded-md border border-destructive/30 bg-destructive text-destructive-foreground px-2.5 py-1.5 text-xs font-medium shadow-lg pointer-events-none",o.textContent=e,document.body.appendChild(o);const c=o.getBoundingClientRect(),i=Math.min(Math.max(n.left+n.width/2-c.width/2,8),window.innerWidth-c.width-8),s=n.top-c.height-8;o.style.left=`${i}px`,o.style.top=`${s<8?n.bottom+8:s}px`,f=o}function D(t,e){O(),t.scrollIntoView({behavior:"smooth",block:"center"}),t.classList.add(h),r=t,e&&requestAnimationFrame(()=>B(t,e)),u=setTimeout(()=>{t.classList.remove(h),r===t&&(r=null),p(),u=null},R)}function U(t,e){const n=E(t);return n?(D(n,e),!0):!1}function g(t,e){const n=e?.maxAttempts??15,o=c=>{if(U(t,e?.tooltip)){e?.onComplete?.();return}if(c+1<n){window.setTimeout(()=>o(c+1),150);return}};window.setTimeout(()=>{requestAnimationFrame(()=>o(0))},_)}function k(t,e,n){g(H(t,e),n)}const z={contact:"contact",company:"company",lead:"lead",deal:"deal"};function W(t,e,n,o){const c=m.useRef(null),i=o?.sectionOpen??!0;m.useEffect(()=>{if(!e){c.current=null;return}if(!i)return;const s=n.find(a=>a.fieldKey===e);if(!s)return;const l=e;if(c.current===l)return;c.current=l;const T=$(t,l);g(T,{tooltip:`Add ${s.label} for this ${z[t]}.`,maxAttempts:20,onComplete:()=>{const a=E(T);a&&(document.querySelectorAll("[data-missing-field-tour-anchor]").forEach(b=>{b.removeAttribute("data-missing-field-tour-anchor")}),a.setAttribute("data-missing-field-tour-anchor",l))}})},[t,e,n,i])}export{h as L,P as a,x as b,k as c,q as d,V as e,$ as g,j as i,G as p,g as s,M as t,W as u};

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.