qlu-20-ui-library 1.7.35 → 1.7.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -31,9 +31,9 @@ Check the top-level render call using <`+ct+">.")}return He}}function Y1(ue,He){
|
|
|
31
31
|
planet with those decisions. I founded Simple Mills with exactly that intent.Since 2012, I have been on a mission to transform what
|
|
32
32
|
America eats by creating snacks from simple, nutrient-dense ingredients. I believe that what we put in our bodies, and how it is grown,
|
|
33
33
|
matter immensely and we have the power to heal both people and our planet with those decisions. I founded Simple Mills with exactly
|
|
34
|
-
that intent.Since 2012, I have been on a missscpion to transform what America eats by creating snacks from simple, nutrient-dense ingredients`,rv={about:nv,industries:["Food","Wellness","Groceries","E-commerce","Health","Fitness"],employeeCount:50,websiteUrl:"qlu.ai",headquarter:"Islamabad, Pakistan"},A8=e=>{var s,c;if(!e||!e.trim())return"U";const a=e.trim().split(/[^\w]+/).filter(d=>d!==""),i=(s=a[0])==null?void 0:s.charAt(0);if(a.length===1)return i.toUpperCase()??"";const o=(c=a[1])==null?void 0:c.charAt(0);return`${i??""}${o??""}`.toUpperCase()},IE=e=>{const t=e.trim();return t===""?"":t.split(/[^\w]+/).filter(i=>i!=="")[0]??""},VE={1:"Jan",2:"Feb",3:"Mar",4:"Apr",5:"May",6:"Jun",7:"Jul",8:"Aug",9:"Sep",10:"Oct",11:"Nov",12:"Dec"},Pr=e=>{const t=e==null?void 0:e.split("-");return t.length>1?`${VE[t[0]]} ${t[1]}`:e};function Zs(e){return e<1e3?e:e<1e4?Math.round(e/1e3*10)/10+"K":e===1e4?"10K":"10K+"}const Hn=Intl.NumberFormat("en",{style:"currency",currency:"USD",notation:"compact"}),hl=Intl.NumberFormat("en",{notation:"compact"}),pl=e=>e.replace(/{{\.First_Name}}/g,"First Name ✕").replace(/{{\.Last_Name}}/g,"Last Name ✕").replace(/{{\.Full_Name}}/g,"Full Name ✕").replace(/{{\.Current_Title}}/g,"Current Title ✕").replace(/{{\.Job_Title}}/g,"Job Title ✕").replace(/{{\.My_Name}}/g,"My Name ✕").replace(/{{\.My_First_Name}}/g,"My First Name ✕").replace(/{{\.My_Full_Name}}/g,"My Full Name ✕").replace(/{{\.User_Name}}/g,"User Name ✕").replace(/{{\.School_Name}}/g,"School Name ✕").replace(/{{\.Current_Company}}/g,"Current Company ✕").replace(/{{\.Hiring_Company}}/g,"Hiring Company ✕"),wc=e=>e.replace(/My Name ✕/g,"{{.My_Name}}").replace(/My First Name ✕/g,"{{.My_First_Name}}").replace(/My Full Name ✕/g,"{{.My_Full_Name}}").replace(/First Name ✕/g,"{{.First_Name}}").replace(/Last Name ✕/g,"{{.Last_Name}}").replace(/Full Name ✕/g,"{{.Full_Name}}").replace(/Current Title ✕/g,"{{.Current_Title}}").replace(/Job Title ✕/g,"{{.Job_Title}}").replace(/User Name ✕/g,"{{.User_Name}}").replace(/School Name ✕/g,"{{.School_Name}}").replace(/Current Company ✕/g,"{{.Current_Company}}").replace(/Hiring Company ✕/g,"{{.Hiring_Company}}"),HE=(e,t,n)=>{const r=t.includes(e),a=n.includes(e);if(r&&a)return"Extracted from company and experience";if(a)return"Extracted from experience";if(r)return"Extracted from company"},WE=({industries:e,expIndustries:t})=>{const n=e.map(o=>o.toLowerCase().trim()),r=t.map(o=>o.toLowerCase().trim()),a=new Set([...n,...r]);return Array.from(a).map(o=>({source:HE(o,n,r),industry:Ys(o)}))},n2=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),KE=(e,t,n)=>{const r="Extracted from company and experience",a="Extracted from title",i="Extracted from experience",o="Extracted from company";return[...new Set([...e,...t,...n])].map(d=>{const f=e.includes(d),h=t.includes(d),m=n.includes(d.toLowerCase());let v;return f&&h?v=r:m?v=a:f?v=o:v=i,{industry:d,source:v}})},UE=({experienceIndustriesFromTitle:e,companyIndustries:t,experienceIndustries:n,filterIndustries:r})=>{const a=t.map(f=>f.trim().toLowerCase()),i=n.map(f=>f.trim().toLowerCase()),o=e.map(f=>f.trim().toLowerCase()),s=r.map(f=>f.trim().toLowerCase()),c={};return s.forEach(f=>{c[f]={industry:f,source:""}}),KE(a,i,o).forEach(({industry:f,source:h})=>{c[f]&&(c[f].source=h)}),Object.values(c).filter(({source:f})=>!!f).map(f=>({...f,industry:Ys(f.industry)}))},q3=(e,t)=>{const n=[];return t.forEach(r=>{const a=n2(r),i=new RegExp(`\\b${a}\\b`,"gi");e.match(i)&&n.push(r)}),n},O4=(e,t,n=5)=>{const r=[];return t.forEach(a=>{const i=a.split(/\s+/);if(i.length===1){const o=n2(a);new RegExp(`\\b${o}\\b`,"gi").test(e)&&r.push(a)}else{const s=i.map(d=>n2(d)).map((d,f)=>f===0?`\\b${d}\\b`:`(?:\\W+(?<!-)\\b\\w+\\b(?!-)){0,${n}}\\W+\\b${d}\\b`).join("");new RegExp(s,"gi").test(e)&&r.push(a)}}),r},GE=(e,t,n)=>{if(e.length===1)return e;const r=t.map(n2),a=new RegExp(`(?<!')\\b(${r.join("|")})\\b(?!')`,"gi");return e.map((i,o)=>i.split(a).map((s,c)=>t.some(f=>new RegExp(`(?<!')\\b(${n2(f)})\\b(?!')`,"gi").test(s))?u.jsx("b",{className:n(s),children:s},`${o}-${c}`):s))},S8=e=>`\\b${e.split(/\s+/).map(n2).join("\\s+")}\\b`,av=(e,t=5)=>{const n=e.split(/\s+/);return n.length<=1?"":n.map((r,a)=>a===0?`\\b${n2(r)}\\b`:`(?:\\W+\\w+){0,${t}}?\\W+\\b${n2(r)}\\b`).join("")},M3=(e,t,n="",r=0)=>`${e}-${t}-${Math.abs(t.split("").reduce((a,i)=>(a*31+i.charCodeAt(0))%Number.MAX_SAFE_INTEGER,0))}-${r}${n?`-${n.length}`:""}`,xc=(e,t)=>
|
|
34
|
+
that intent.Since 2012, I have been on a missscpion to transform what America eats by creating snacks from simple, nutrient-dense ingredients`,rv={about:nv,industries:["Food","Wellness","Groceries","E-commerce","Health","Fitness"],employeeCount:50,websiteUrl:"qlu.ai",headquarter:"Islamabad, Pakistan"},A8=e=>{var s,c;if(!e||!e.trim())return"U";const a=e.trim().split(/[^\w]+/).filter(d=>d!==""),i=(s=a[0])==null?void 0:s.charAt(0);if(a.length===1)return i.toUpperCase()??"";const o=(c=a[1])==null?void 0:c.charAt(0);return`${i??""}${o??""}`.toUpperCase()},IE=e=>{const t=e.trim();return t===""?"":t.split(/[^\w]+/).filter(i=>i!=="")[0]??""},VE={1:"Jan",2:"Feb",3:"Mar",4:"Apr",5:"May",6:"Jun",7:"Jul",8:"Aug",9:"Sep",10:"Oct",11:"Nov",12:"Dec"},Pr=e=>{const t=e==null?void 0:e.split("-");return t.length>1?`${VE[t[0]]} ${t[1]}`:e};function Zs(e){return e<1e3?e:e<1e4?Math.round(e/1e3*10)/10+"K":e===1e4?"10K":"10K+"}const Hn=Intl.NumberFormat("en",{style:"currency",currency:"USD",notation:"compact"}),hl=Intl.NumberFormat("en",{notation:"compact"}),pl=e=>e.replace(/{{\.First_Name}}/g,"First Name ✕").replace(/{{\.Last_Name}}/g,"Last Name ✕").replace(/{{\.Full_Name}}/g,"Full Name ✕").replace(/{{\.Current_Title}}/g,"Current Title ✕").replace(/{{\.Job_Title}}/g,"Job Title ✕").replace(/{{\.My_Name}}/g,"My Name ✕").replace(/{{\.My_First_Name}}/g,"My First Name ✕").replace(/{{\.My_Full_Name}}/g,"My Full Name ✕").replace(/{{\.User_Name}}/g,"User Name ✕").replace(/{{\.School_Name}}/g,"School Name ✕").replace(/{{\.Current_Company}}/g,"Current Company ✕").replace(/{{\.Hiring_Company}}/g,"Hiring Company ✕"),wc=e=>e.replace(/My Name ✕/g,"{{.My_Name}}").replace(/My First Name ✕/g,"{{.My_First_Name}}").replace(/My Full Name ✕/g,"{{.My_Full_Name}}").replace(/First Name ✕/g,"{{.First_Name}}").replace(/Last Name ✕/g,"{{.Last_Name}}").replace(/Full Name ✕/g,"{{.Full_Name}}").replace(/Current Title ✕/g,"{{.Current_Title}}").replace(/Job Title ✕/g,"{{.Job_Title}}").replace(/User Name ✕/g,"{{.User_Name}}").replace(/School Name ✕/g,"{{.School_Name}}").replace(/Current Company ✕/g,"{{.Current_Company}}").replace(/Hiring Company ✕/g,"{{.Hiring_Company}}"),HE=(e,t,n)=>{const r=t.includes(e),a=n.includes(e);if(r&&a)return"Extracted from company and experience";if(a)return"Extracted from experience";if(r)return"Extracted from company"},WE=({industries:e,expIndustries:t})=>{const n=e.map(o=>o.toLowerCase().trim()),r=t.map(o=>o.toLowerCase().trim()),a=new Set([...n,...r]);return Array.from(a).map(o=>({source:HE(o,n,r),industry:Ys(o)}))},n2=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),KE=(e,t,n)=>{const r="Extracted from company and experience",a="Extracted from title",i="Extracted from experience",o="Extracted from company";return[...new Set([...e,...t,...n])].map(d=>{const f=e.includes(d),h=t.includes(d),m=n.includes(d.toLowerCase());let v;return f&&h?v=r:m?v=a:f?v=o:v=i,{industry:d,source:v}})},UE=({experienceIndustriesFromTitle:e,companyIndustries:t,experienceIndustries:n,filterIndustries:r})=>{const a=t.map(f=>f.trim().toLowerCase()),i=n.map(f=>f.trim().toLowerCase()),o=e.map(f=>f.trim().toLowerCase()),s=r.map(f=>f.trim().toLowerCase()),c={};return s.forEach(f=>{c[f]={industry:f,source:""}}),KE(a,i,o).forEach(({industry:f,source:h})=>{c[f]&&(c[f].source=h)}),Object.values(c).filter(({source:f})=>!!f).map(f=>({...f,industry:Ys(f.industry)}))},q3=(e,t)=>{const n=[];return t.forEach(r=>{const a=n2(r),i=new RegExp(`\\b${a}\\b`,"gi");e.match(i)&&n.push(r)}),n},O4=(e,t,n=5)=>{const r=[];return t.forEach(a=>{const i=a.split(/\s+/);if(i.length===1){const o=n2(a);new RegExp(`\\b${o}\\b`,"gi").test(e)&&r.push(a)}else{const s=i.map(d=>n2(d)).map((d,f)=>f===0?`\\b${d}\\b`:`(?:\\W+(?<!-)\\b\\w+\\b(?!-)){0,${n}}\\W+\\b${d}\\b`).join("");new RegExp(s,"gi").test(e)&&r.push(a)}}),r},GE=(e,t,n)=>{if(e.length===1)return e;const r=t.map(n2),a=new RegExp(`(?<!')\\b(${r.join("|")})\\b(?!')`,"gi");return e.map((i,o)=>i.split(a).map((s,c)=>t.some(f=>new RegExp(`(?<!')\\b(${n2(f)})\\b(?!')`,"gi").test(s))?u.jsx("b",{className:n(s),children:s},`${o}-${c}`):s))},S8=e=>`\\b${e.split(/\s+/).map(n2).join("\\s+")}\\b`,av=(e,t=5)=>{const n=e.split(/\s+/);return n.length<=1?"":n.map((r,a)=>a===0?`\\b${n2(r)}\\b`:`(?:\\W+\\w+){0,${t}}?\\W+\\b${n2(r)}\\b`).join("")},M3=(e,t,n="",r=0)=>`${e}-${t}-${Math.abs(t.split("").reduce((a,i)=>(a*31+i.charCodeAt(0))%Number.MAX_SAFE_INTEGER,0))}-${r}${n?`-${n.length}`:""}`,xc=(e,t)=>[...t].sort((a,i)=>i.length-a.length).reduce((a,i)=>{const o=new RegExp(S8(i),"gi"),s=Array.from(e.matchAll(o)).map(c=>({start:c.index,end:c.index+c[0].length,keyword:i})).filter(c=>!a.some(d=>c.start>=d.start&&c.start<d.end||c.end>d.start&&c.end<=d.end));return[...a,...s]},[]).sort((a,i)=>a.start-i.start),ml=(e,t,n,r=5)=>{const a=new Set,i=n.toLowerCase(),s=e.toLowerCase().replace(/,/g," ").replace(/[/\\|.,:;'"!?()[\]{}<>+\-_=~`@#$%^&*]/g,""),c=i.replace(/[/\\|.,:;'"!?()[\]{}<>+\-_=~`@#$%^&*]/g,"").replace(/,/g," ").replace(/&/g,"&").replace(/\//g," ");return t.forEach(d=>{s.includes(d.toLowerCase())&&a.add(d.toLowerCase())}),t.forEach(d=>{const f=d.toLowerCase().split(/\s+/);if(f.length<=1)return;const h=s.split(/\s+/).filter(Boolean),m=f.filter(v=>h.includes(v));if(m.length>0){const v=c.split(/\s+/).filter(Boolean);m.forEach(g=>{v.forEach((w,y)=>{if(w===g){const b=Math.max(0,y-(r+1)),S=Math.min(v.length,y+(r+1)),C=v.slice(b,S);f.filter(N=>N!==g).every(N=>C.includes(N))&&a.add(d.toLowerCase())}})})}}),a},YE=(e,t,n=[],r=5)=>{if(t.length===0&&n.length===0||e.length===0)return[];const a=n.map(S8),i=t.map(S8),o=t.map(c=>av(c,r)).filter(Boolean),s=new RegExp(`(${[...a,...i,...o].join("|")})`,"gi");return e.reduce((c,d,f)=>{const h=[...d.matchAll(s)];if(h.length>0){const w=h.reduce((y,b,S)=>{const[C]=b,k=b.index,M=S===0?0:h[S-1].index+h[S-1][0].length;return k>M&&y.push(d.slice(M,k)),y.push(C),S===h.length-1&&k+C.length<d.length&&y.push(d.slice(k+C.length)),y},[]);return c.push(w),c}const m=e[f+1]||"",g=`${e[f-1]||""} ${d} ${m}`;return o.some(w=>new RegExp(w,"gi").test(g))&&c.push([d]),c},[]).map((c,d)=>[...c,d!==e.length-1?`
|
|
35
35
|
`:""]).flat()},bc=(e,t,n=[],r=5)=>{if(t.length===0&&n.length===0||!e.trim())return[e];const a=I4(e),i=n.map(S8),o=t.map(S8),s=t.map(h=>av(h,r)).filter(Boolean),c=new RegExp(`(${[...i,...o,...s].join("|")})`,"gi"),d=a.map((h,m)=>{const v=[...h.matchAll(c)];if(v.length>0)return v.reduce((S,C,k)=>{const[M]=C,N=C.index,P=k===0?0:v[k-1].index+v[k-1][0].length;return N>P&&S.push(h.slice(P,N)),S.push(M),k===v.length-1&&N+M.length<h.length&&S.push(h.slice(N+M.length)),S},[]);const g=a[m+1]||"",y=`${a[m-1]||""} ${h} ${g}`;return s.some(b=>new RegExp(b,"gi").test(y))?[h]:[h]});return d.reduce((h,m,v)=>[...h,...m,v!==d.length-1?`
|
|
36
|
-
`:""],[])},ja=(e,t,n)=>{const r=t.filter(a=>a.toLowerCase()===e.toLowerCase());return r.length>0?r.map(a=>a.toLowerCase()):t.filter(a=>{const i=a.toLowerCase().split(/\s+/),o=e.toLowerCase(),s=n.toLowerCase(),c=i.indexOf(o);return c===-1?!1:i.every((d,f)=>f===c?!0:s.includes(d))}).map(a=>a.toLowerCase())},P4=(e,t,n,r,a=[],i=5)=>e.map(o=>{if(!o.trim())return o;if(xc(o,a).length>0)return u.jsx("b",{className:n([o.toLowerCase()]),"data-phrases":o.toLowerCase(),children:o},M3("exact",o,o,parseInt(crypto.randomUUID().replace(/\D/g,""),10)));const c=xc(o,t);if(c.length===0){const h=r.indexOf(o),m=h+o.length,v=h>0?r.slice(Math.max(0,h-100),h).split(/\s+/).filter(Boolean).slice(-i).join(" "):"",g=m<r.length?r.slice(m).split(/\s+/).filter(Boolean).slice(0,i).join(" "):"",w=`${v} ${o} ${g}`,y=ml(o,t,w);if(y.size===0)return o;const b=o.split(/(\s+)/);return b.map((S,C)=>S.trim()&&Array.from(y).some(M=>{const N=M.toLowerCase().split(/\s+/),P=N.find(se=>S.toLowerCase().trim().replace(/^,|,$/g,"").replace(/\.+/g,"").includes(se));if(!P)return!1;const V=b.slice(0,C).filter(se=>se.trim()).length;let Q=v.split(/\s+/).filter(Boolean).length+V;const G=w.replace(/&/g,"&").split(/\s+/).filter(Boolean).filter(se=>se===""||se==="."||se===","?(Q-=1,!1):!0),ae=N.indexOf(P);if(ae>0){const se=N[ae-1];if(!G.slice(Math.max(0,Q-(i+1)),Q).some(Y=>Y.toLowerCase().trim().replace(/^,|,$/g,"").replace(/\.+/g,"").includes(se)))return!1}if(ae<N.length-1){const se=N[ae+1];if(!G.slice(Q+1,Q+(i+1)).some(Y=>Y.toLowerCase().trim().replace(/^,|,$/g,"").replace(/\.+/g,"").includes(se)))return!1}return!0})?u.jsx("b",{className:n(ja(S,t,w.replace(/&/g,"&"))),"data-phrases":ja(S,t,w.replace(/&/g,"&")).join(" "),children:S},M3("slop",S,o,parseInt(crypto.randomUUID().replace(/\D/g,""),10))):S)}const d=[];let f=0;if(c.forEach(h=>{if(h.start>f){const v=o.slice(f,h.start),g=o.slice(h.start),w=ml(v,t,g);if(w.size>0){const y=new RegExp(`\\b(${Array.from(w).map(n2).join("|")})\\b`,"gi");let b=f;v.split(y).forEach(S=>{y.test(S)?d.push(u.jsx("b",{className:n(ja(S,t,o)),"data-phrases":ja(S,t,o).join(" "),children:S},M3("slop",S,v,b))):d.push(S),b+=S.length})}else d.push(v)}const m=o.slice(h.start,h.end);d.push(u.jsx("b",{className:n(ja(h.keyword,t,o)),"data-phrases":ja(h.keyword,t,o).join(" "),children:m},M3("exact",h.keyword,m,h.start))),f=h.end}),f<o.length){const h=o.slice(f),m=o.slice(0,f),v=ml(h,t,m);if(v.size>0){const g=new RegExp(`\\b(${Array.from(v).map(n2).join("|")})\\b`,"gi");let w=f;h.split(g).forEach(y=>{g.test(y)?d.push(u.jsx("b",{className:n(ja(y,t,o)),"data-phrases":ja(y,t,o).join(" "),children:y},M3("slop",y,h,w))):d.push(y),w+=y.length})}else d.push(h)}return d}),qE=({experiences:e,index:t})=>{if(t===0)return!0;const n=e[t],r=e[t-1];return n.company!==r.company},ZE=({experiences:e,index:t})=>{if(t===e.length-1)return!0;const n=e[t],r=e[t+1];return n.company!==r.company},JE=e=>Object.entries(e).filter(([,t])=>t).map(([t])=>t).join(" "),XE=(e,t)=>{const n=e.split(" "),r=[];let a="";return n.forEach(i=>{(a+i).length>t?(r.push(a.trim()),a=i):a+=` ${i}`}),a&&r.push(a.trim()),r},QE=(e,t,n,r)=>{var i,o,s;if(!r)return[];const a=[...Object.values(((i=r.either)==null?void 0:i.isSelected)??{})];return a.push(...Object.values(n?(o=r.current)==null?void 0:o.isSelected:(s=r.previous)==null?void 0:s.isSelected)),a.filter(c=>{const d=c.companyUrn?c.companyUrn.replace(/\D+/g,""):"";return e&&c.companyUniversalName===e||t&&d===t}).map(c=>c.productName)},I4=e=>{if(!(e!=null&&e.trim()))return[];const t=new RegExp("(?<!\\b\\w\\.\\w.)(?<=\\.|\\?|!)(?=\\s+[A-Z])|(?<=\\w\\.\\w)(?=[A-Z])|(?<=\\n|^)(?=\\s*-)|(?<=\\n|^)(?=\\s*•)|(?<=\\n|^)(?=\\s*\\d+\\.)|(?<=\\n|^)(?=\\s*[a-z]+\\.)|(?<=\\n|^)(?=\\s*[A-Z]+\\.)|(?<=\\n|^)(?=\\s*[IVXLCDM]+\\.)|(?<=\\n|^)(?=\\s*[A-Z](?![A-Z0-9]\\.))","g");return e.split(t)},_E=(e,t)=>{if(t.length===0||e.length===0)return[];const n=e.reduce((r,a)=>{const i=t.map(n2),o=new RegExp(`\\b(${i.join("|")})\\b`,"gi"),s=a.split(o);return s.length>1&&r.push(s),r},[]);return n.map((r,a)=>[...r,a!==n.length-1?`
|
|
36
|
+
`:""],[])},ja=(e,t,n)=>{const r=t.filter(a=>a.toLowerCase()===e.toLowerCase());return r.length>0?r.map(a=>a.toLowerCase()):t.filter(a=>{const i=a.toLowerCase().split(/\s+/),o=e.toLowerCase().replace(/[/\\|.,:;'"!?()[\]{}<>+\-_=~`@#$%^&*]/g,""),s=n.toLowerCase(),c=i.indexOf(o);return c===-1?!1:i.every((d,f)=>f===c?!0:s.includes(d))}).map(a=>a.toLowerCase())},P4=(e,t,n,r,a=[],i=5)=>e.map(o=>{if(!o.trim())return o;if(xc(o,a).length>0)return u.jsx("b",{className:n([o.toLowerCase()]),"data-phrases":o.toLowerCase(),children:o},M3("exact",o,o,parseInt(crypto.randomUUID().replace(/\D/g,""),10)));const c=xc(o,t);if(c.length===0){const h=r.indexOf(o),m=h+o.length,v=h>0?r.slice(Math.max(0,h-100),h).split(/\s+/).filter(Boolean).slice(-i).join(" "):"",g=m<r.length?r.slice(m).split(/\s+/).filter(Boolean).slice(0,i).join(" "):"",w=`${v} ${o} ${g}`,y=ml(o,t,w);if(y.size===0)return o;const b=o.split(/(\s+)/);return b.map((S,C)=>S.trim()&&Array.from(y).some(M=>{const N=M.toLowerCase().split(/\s+/),P=N.find(se=>S.toLowerCase().trim().replace(/^,|,$/g,"").replace(/\.+/g,"").replace(/[/\\|.,:;'"!?()[\]{}<>+\-_=~`@#$%^&*]/g,"").includes(se));if(!P)return!1;const V=b.slice(0,C).filter(se=>se.trim()).length;let Q=v.split(/\s+/).filter(Boolean).length+V;const G=w.replace(/&/g,"&").split(/\s+/).filter(Boolean).filter(se=>se===""||se==="."||se===","?(Q-=1,!1):!0),ae=N.indexOf(P);if(ae>0){const se=N[ae-1];if(!G.slice(Math.max(0,Q-(i+1)),Q).some(Y=>Y.toLowerCase().trim().replace(/^,|,$/g,"").replace(/\.+/g,"").replace(/[/\\|.,:;'"!?()[\]{}<>+\-_=~`@#$%^&*]/g,"").includes(se)))return!1}if(ae<N.length-1){const se=N[ae+1];if(!G.slice(Q+1,Q+1+(i+1)).some(Y=>Y.toLowerCase().trim().replace(/^,|,$/g,"").replace(/\.+/g,"").replace(/[/\\|.,:;'"!?()[\]{}<>+\-_=~`@#$%^&*]/g," ").includes(se)))return!1}return!0})?u.jsx("b",{className:n(ja(S,t,w.replace(/&/g,"&"))),"data-phrases":ja(S,t,w.replace(/&/g,"&")).join(" "),children:S},M3("slop",S,o,parseInt(crypto.randomUUID().replace(/\D/g,""),10))):S)}const d=[];let f=0;if(c.forEach(h=>{if(h.start>f){const v=o.slice(f,h.start),g=o.slice(h.start),w=ml(v,t,g);if(w.size>0){const y=new RegExp(`\\b(${Array.from(w).map(n2).join("|")})\\b`,"gi");let b=f;v.split(y).forEach(S=>{y.test(S)?d.push(u.jsx("b",{className:n(ja(S,t,o)),"data-phrases":ja(S,t,o).join(" "),children:S},M3("slop",S,v,b))):d.push(S),b+=S.length})}else d.push(v)}const m=o.slice(h.start,h.end);d.push(u.jsx("b",{className:n(ja(h.keyword,t,o)),"data-phrases":ja(h.keyword,t,o).join(" "),children:m},M3("exact",h.keyword,m,h.start))),f=h.end}),f<o.length){const h=o.slice(f),m=o.slice(0,f),v=ml(h,t,m);if(v.size>0){const g=new RegExp(`\\b(${Array.from(v).map(n2).join("|")})\\b`,"gi");let w=f;h.split(g).forEach(y=>{g.test(y)?d.push(u.jsx("b",{className:n(ja(y,t,o)),"data-phrases":ja(y,t,o).join(" "),children:y},M3("slop",y,h,w))):d.push(y),w+=y.length})}else d.push(h)}return d}),qE=({experiences:e,index:t})=>{if(t===0)return!0;const n=e[t],r=e[t-1];return n.company!==r.company},ZE=({experiences:e,index:t})=>{if(t===e.length-1)return!0;const n=e[t],r=e[t+1];return n.company!==r.company},JE=e=>Object.entries(e).filter(([,t])=>t).map(([t])=>t).join(" "),XE=(e,t)=>{const n=e.split(" "),r=[];let a="";return n.forEach(i=>{(a+i).length>t?(r.push(a.trim()),a=i):a+=` ${i}`}),a&&r.push(a.trim()),r},QE=(e,t,n,r)=>{var i,o,s;if(!r)return[];const a=[...Object.values(((i=r.either)==null?void 0:i.isSelected)??{})];return a.push(...Object.values(n?(o=r.current)==null?void 0:o.isSelected:(s=r.previous)==null?void 0:s.isSelected)),a.filter(c=>{const d=c.companyUrn?c.companyUrn.replace(/\D+/g,""):"";return e&&c.companyUniversalName===e||t&&d===t}).map(c=>c.productName)},I4=e=>{if(!(e!=null&&e.trim()))return[];const t=new RegExp("(?<!\\b\\w\\.\\w.)(?<=\\.|\\?|!)(?=\\s+[A-Z])|(?<=\\w\\.\\w)(?=[A-Z])|(?<=\\n|^)(?=\\s*-)|(?<=\\n|^)(?=\\s*•)|(?<=\\n|^)(?=\\s*\\d+\\.)|(?<=\\n|^)(?=\\s*[a-z]+\\.)|(?<=\\n|^)(?=\\s*[A-Z]+\\.)|(?<=\\n|^)(?=\\s*[IVXLCDM]+\\.)|(?<=\\n|^)(?=\\s*[A-Z](?![A-Z0-9]\\.))","g");return e.split(t)},_E=(e,t)=>{if(t.length===0||e.length===0)return[];const n=e.reduce((r,a)=>{const i=t.map(n2),o=new RegExp(`\\b(${i.join("|")})\\b`,"gi"),s=a.split(o);return s.length>1&&r.push(s),r},[]);return n.map((r,a)=>[...r,a!==n.length-1?`
|
|
37
37
|
`:""]).flat()},$E="#373737",eC="#151217",tC="#100e11",nC="_ellipsisTextStyling_mmsc3_257",rC={"orange-25":"#fffcfa","orange-50":"#fff0e8","orange-100":"#ffe0cf","orange-200":"#ffcfb5","orange-300":"#ffb58c","orange-400":"#ff9e69","orange-500":"#ff8d4e","orange-600":"#e57f46","orange-700":"#c3713e","orange-800":"#99552f","orange-900":"#66381f","orange-950":"#331c10","orange-990":"#190e08","gray-10":"#fafafa","gray-15":"#e8e8e8","gray-25":"#d5d5d5","gray-50":"#c1c1c1","gray-100":"#adadad","gray-200":"#999999","gray-300":"#868686","gray-400":"#727272","gray-500":"#5e5e5e","gray-600":"#4b4b4b","gray-700":"#373737","gray-800":"#232323","gray-850":"#1a1a1a","gray-900":"#0f0f0f","blue-50":"#ebf5ff","blue-100":"#e1effe","blue-200":"#c3ddfd","blue-300":"#a4cafe","blue-400":"#76a9fa","blue-500":"#3f83f8","blue-600":"#1c64f2","blue-700":"#1a56db","blue-800":"#1e429f","blue-900":"#233876","red-50":"#fdf2f2","red-100":"#fde8e8","red-200":"#fbd5d5","red-300":"#f8b4b4","red-400":"#f98080","red-500":"#f05252","red-600":"#e02424","red-700":"#c81e1e","red-800":"#9b1c1c","red-900":"#771d1d","red-950":"#5e2a2a","red-990":"#402c2c","twOrange-50":"#fff8f1","twOrange-100":"#feecdc","twOrange-200":"#fcd9bd","twOrange-300":"#fdba8c","twOrange-400":"#ff8a4c","twOrange-500":"#ff5a1f","twOrange-600":"#d03801","twOrange-700":"#b43403","twOrange-800":"#8a2c0d","twOrange-900":"#771d1d","yellow-50":"#fdfdea","yellow-100":"#fdf6b2","yellow-200":"#fce96a","yellow-300":"#faca15","yellow-400":"#e3a008","yellow-500":"#c27803","yellow-600":"#9f580a","yellow-700":"#8e4b10","yellow-800":"#723b13","yellow-900":"#633112","green-50":"#f3faf7","green-100":"#def7ec","green-200":"#bcf0da","green-300":"#84e1bc","green-400":"#31c48d","green-500":"#0e9f6e","green-600":"#057a55","green-700":"#046c4e","green-800":"#03543f","green-900":"#014737","teal-50":"#edfafa","teal-100":"#d5f5f6","teal-200":"#afecef","teal-300":"#7edce2","teal-400":"#16bdca","teal-500":"#0694a2","teal-600":"#047481","teal-700":"#036672","teal-800":"#05505c","teal-900":"#014451","indigo-50":"#f0f5ff","indigo-100":"#e5edff","indigo-200":"#cddbfe","indigo-300":"#b46cfc","indigo-400":"#8da2fb","indigo-500":"#6875f5","indigo-600":"#5850ec","indigo-700":"#5145cd","indigo-800":"#42389d","indigo-900":"#362f78","purple-50":"#f6f5ff","purple-100":"#edebfe","purple-200":"#dcd7fe","purple-300":"#cabffd","purple-400":"#ac94fa","purple-500":"#9061f9","purple-600":"#7e3af2","purple-700":"#6c2bd9","purple-800":"#5521b5","purple-900":"#4a1d96","pink-50":"#fdf2f8","pink-100":"#fce8f3","pink-200":"#fad1ed","pink-300":"#f8b4d9","pink-400":"#f17eb8","pink-500":"#e74694","pink-600":"#d61f69","pink-700":"#bf125d","pink-800":"#99154b","pink-900":"#751a3d",bgPlaceholder:$E,tableBgEven:eC,tableBgOdd:tC,"gradient-background":"linear-gradient(212deg, rgba(73, 73, 73, 0.2) 0%, rgba(73, 73, 73, 0) 99.04%)",ellipsisTextStyling:nC};var iv={exports:{}};/*!
|
|
38
38
|
Copyright (c) 2018 Jed Watson.
|
|
39
39
|
Licensed under the MIT License (MIT), see
|
|
@@ -1320,20 +1320,19 @@ const Un = Intl.NumberFormat("en", {
|
|
|
1320
1320
|
(a, i) => (a * 31 + i.charCodeAt(0)) % Number.MAX_SAFE_INTEGER,
|
|
1321
1321
|
0
|
|
1322
1322
|
)
|
|
1323
|
-
)}-${r}${n ? `-${n.length}` : ""}`, bc = (e, t) => {
|
|
1324
|
-
const
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
const a = /* @__PURE__ */ new Set(), i = n.toLowerCase(), s = e.toLowerCase().replace(/,/g, " "), l = i.replace(/,/g, " ").replace(/&/g, "&").replace(/\//g, " ");
|
|
1323
|
+
)}-${r}${n ? `-${n.length}` : ""}`, bc = (e, t) => [...t].sort((a, i) => i.length - a.length).reduce((a, i) => {
|
|
1324
|
+
const o = new RegExp(L8(i), "gi"), s = Array.from(e.matchAll(o)).map((l) => ({
|
|
1325
|
+
start: l.index,
|
|
1326
|
+
end: l.index + l[0].length,
|
|
1327
|
+
keyword: i
|
|
1328
|
+
})).filter(
|
|
1329
|
+
(l) => !a.some(
|
|
1330
|
+
(d) => l.start >= d.start && l.start < d.end || l.end > d.start && l.end <= d.end
|
|
1331
|
+
)
|
|
1332
|
+
);
|
|
1333
|
+
return [...a, ...s];
|
|
1334
|
+
}, []).sort((a, i) => a.start - i.start), b4 = (e, t, n, r = 5) => {
|
|
1335
|
+
const a = /* @__PURE__ */ new Set(), i = n.toLowerCase(), s = e.toLowerCase().replace(/,/g, " ").replace(/[/\\|.,:;'"!?()[\]{}<>+\-_=~`@#$%^&*]/g, ""), l = i.replace(/[/\\|.,:;'"!?()[\]{}<>+\-_=~`@#$%^&*]/g, "").replace(/,/g, " ").replace(/&/g, "&").replace(/\//g, " ");
|
|
1337
1336
|
return t.forEach((d) => {
|
|
1338
1337
|
s.includes(d.toLowerCase()) && a.add(d.toLowerCase());
|
|
1339
1338
|
}), t.forEach((d) => {
|
|
@@ -1417,7 +1416,7 @@ const Un = Intl.NumberFormat("en", {
|
|
|
1417
1416
|
(a) => a.toLowerCase() === e.toLowerCase()
|
|
1418
1417
|
);
|
|
1419
1418
|
return r.length > 0 ? r.map((a) => a.toLowerCase()) : t.filter((a) => {
|
|
1420
|
-
const i = a.toLowerCase().split(/\s+/), o = e.toLowerCase(), s = n.toLowerCase(), l = i.indexOf(o);
|
|
1419
|
+
const i = a.toLowerCase().split(/\s+/), o = e.toLowerCase().replace(/[/\\|.,:;'"!?()[\]{}<>+\-_=~`@#$%^&*]/g, ""), s = n.toLowerCase(), l = i.indexOf(o);
|
|
1421
1420
|
return l === -1 ? !1 : i.every((d, f) => f === l ? !0 : s.includes(d));
|
|
1422
1421
|
}).map((a) => a.toLowerCase());
|
|
1423
1422
|
}, Gl = (e, t, n, r, a = [], i = 5) => e.map((o) => {
|
|
@@ -1446,7 +1445,7 @@ const Un = Intl.NumberFormat("en", {
|
|
|
1446
1445
|
const b = o.split(/(\s+)/);
|
|
1447
1446
|
return b.map((S, A) => S.trim() && Array.from(y).some((k) => {
|
|
1448
1447
|
const N = k.toLowerCase().split(/\s+/), I = N.find(
|
|
1449
|
-
(le) => S.toLowerCase().trim().replace(/^,|,$/g, "").replace(/\.+/g, "").includes(le)
|
|
1448
|
+
(le) => S.toLowerCase().trim().replace(/^,|,$/g, "").replace(/\.+/g, "").replace(/[/\\|.,:;'"!?()[\]{}<>+\-_=~`@#$%^&*]/g, "").includes(le)
|
|
1450
1449
|
);
|
|
1451
1450
|
if (!I)
|
|
1452
1451
|
return !1;
|
|
@@ -1459,7 +1458,7 @@ const Un = Intl.NumberFormat("en", {
|
|
|
1459
1458
|
Math.max(0, _ - (i + 1)),
|
|
1460
1459
|
_
|
|
1461
1460
|
).some(
|
|
1462
|
-
(q) => q.toLowerCase().trim().replace(/^,|,$/g, "").replace(/\.+/g, "").includes(le)
|
|
1461
|
+
(q) => q.toLowerCase().trim().replace(/^,|,$/g, "").replace(/\.+/g, "").replace(/[/\\|.,:;'"!?()[\]{}<>+\-_=~`@#$%^&*]/g, "").includes(le)
|
|
1463
1462
|
))
|
|
1464
1463
|
return !1;
|
|
1465
1464
|
}
|
|
@@ -1467,9 +1466,9 @@ const Un = Intl.NumberFormat("en", {
|
|
|
1467
1466
|
const le = N[ie + 1];
|
|
1468
1467
|
if (!Y.slice(
|
|
1469
1468
|
_ + 1,
|
|
1470
|
-
_ + (i + 1)
|
|
1469
|
+
_ + 1 + (i + 1)
|
|
1471
1470
|
).some(
|
|
1472
|
-
(q) => q.toLowerCase().trim().replace(/^,|,$/g, "").replace(/\.+/g, "").includes(le)
|
|
1471
|
+
(q) => q.toLowerCase().trim().replace(/^,|,$/g, "").replace(/\.+/g, "").replace(/[/\\|.,:;'"!?()[\]{}<>+\-_=~`@#$%^&*]/g, " ").includes(le)
|
|
1473
1472
|
))
|
|
1474
1473
|
return !1;
|
|
1475
1474
|
}
|
package/dist/types/utils.js
CHANGED
|
@@ -1166,28 +1166,37 @@ const createSlopPattern = (keyword, slop = 5) => {
|
|
|
1166
1166
|
const createUniqueKey = (type, text, context = "", position = 0) => `${type}-${text}-${Math.abs(text
|
|
1167
1167
|
.split("")
|
|
1168
1168
|
.reduce((acc, char) => (acc * 31 + char.charCodeAt(0)) % Number.MAX_SAFE_INTEGER, 0))}-${position}${context ? `-${context.length}` : ""}`;
|
|
1169
|
-
const findExactMatches = (text,
|
|
1170
|
-
|
|
1171
|
-
|
|
1169
|
+
const findExactMatches = (text, keywords) => {
|
|
1170
|
+
// Sort keywords by length (longest first) to prioritize longer matches
|
|
1171
|
+
const sortedKeywords = [...keywords].sort((a, b) => b.length - a.length);
|
|
1172
|
+
// Find all matches for all keywords
|
|
1173
|
+
const allMatches = sortedKeywords.reduce((matches, keyword) => {
|
|
1172
1174
|
const regex = new RegExp(createExactPhrasePattern(keyword), "gi");
|
|
1173
|
-
const
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1175
|
+
const keywordMatches = Array.from(text.matchAll(regex))
|
|
1176
|
+
.map((match) => ({
|
|
1177
|
+
start: match.index,
|
|
1178
|
+
end: match.index + match[0].length,
|
|
1179
|
+
keyword,
|
|
1180
|
+
}))
|
|
1181
|
+
// Filter out overlapping matches Checks if the start/end of new match falls within an existing match
|
|
1182
|
+
.filter((newMatch) => !matches.some((existingMatch) => (newMatch.start >= existingMatch.start &&
|
|
1183
|
+
newMatch.start < existingMatch.end) ||
|
|
1184
|
+
(newMatch.end > existingMatch.start &&
|
|
1185
|
+
newMatch.end <= existingMatch.end)));
|
|
1186
|
+
return [...matches, ...keywordMatches];
|
|
1187
|
+
}, []);
|
|
1188
|
+
return allMatches.sort((a, b) => a.start - b.start);
|
|
1183
1189
|
};
|
|
1184
1190
|
const findSlopWords = (segment, phrases, context, slop = 5) => {
|
|
1185
1191
|
const wordsToHighlight = new Set();
|
|
1186
1192
|
const contextLower = context.toLowerCase();
|
|
1187
1193
|
const segmentLower = segment.toLowerCase();
|
|
1188
1194
|
// Clean the segment and context of commas
|
|
1189
|
-
const cleanSegment = segmentLower
|
|
1195
|
+
const cleanSegment = segmentLower
|
|
1196
|
+
.replace(/,/g, " ")
|
|
1197
|
+
.replace(/[/\\|.,:;'"!?()[\]{}<>+\-_=~`@#$%^&*]/g, "");
|
|
1190
1198
|
const cleanContext = contextLower
|
|
1199
|
+
.replace(/[/\\|.,:;'"!?()[\]{}<>+\-_=~`@#$%^&*]/g, "")
|
|
1191
1200
|
.replace(/,/g, " ")
|
|
1192
1201
|
.replace(/&/g, "&")
|
|
1193
1202
|
.replace(/\//g, " ");
|
|
@@ -1345,7 +1354,9 @@ const findMatchingPhrases = (word, phrases, context) => {
|
|
|
1345
1354
|
return phrases
|
|
1346
1355
|
.filter((phrase) => {
|
|
1347
1356
|
const phraseWords = phrase.toLowerCase().split(/\s+/);
|
|
1348
|
-
const wordLower = word
|
|
1357
|
+
const wordLower = word
|
|
1358
|
+
.toLowerCase()
|
|
1359
|
+
.replace(/[/\\|.,:;'"!?()[\]{}<>+\-_=~`@#$%^&*]/g, "");
|
|
1349
1360
|
const contextLower = context.toLowerCase();
|
|
1350
1361
|
const wordIndex = phraseWords.indexOf(wordLower);
|
|
1351
1362
|
// If word isn't in the phrase, skip
|
|
@@ -1409,6 +1420,7 @@ fullText, products = [], slop = 5) => splittedText.map((segment) => {
|
|
|
1409
1420
|
.trim()
|
|
1410
1421
|
.replace(/^,|,$/g, "")
|
|
1411
1422
|
.replace(/\.+/g, "")
|
|
1423
|
+
.replace(/[/\\|.,:;'"!?()[\]{}<>+\-_=~`@#$%^&*]/g, "")
|
|
1412
1424
|
.includes(word));
|
|
1413
1425
|
if (!matchingWord)
|
|
1414
1426
|
return false;
|
|
@@ -1442,6 +1454,7 @@ fullText, products = [], slop = 5) => splittedText.map((segment) => {
|
|
|
1442
1454
|
.trim()
|
|
1443
1455
|
.replace(/^,|,$/g, "")
|
|
1444
1456
|
.replace(/\.+/g, "")
|
|
1457
|
+
.replace(/[/\\|.,:;'"!?()[\]{}<>+\-_=~`@#$%^&*]/g, "")
|
|
1445
1458
|
.includes(prevWord))) {
|
|
1446
1459
|
return false;
|
|
1447
1460
|
}
|
|
@@ -1450,12 +1463,13 @@ fullText, products = [], slop = 5) => splittedText.map((segment) => {
|
|
|
1450
1463
|
if (matchingWordIndex < phraseWords.length - 1) {
|
|
1451
1464
|
const nextWord = phraseWords[matchingWordIndex + 1];
|
|
1452
1465
|
// Look for nextWord in next 5 words
|
|
1453
|
-
const nextRange = filteredContextWords.slice(currentWordPosition + 1, currentWordPosition + (slop + 1));
|
|
1466
|
+
const nextRange = filteredContextWords.slice(currentWordPosition + 1, currentWordPosition + 1 + (slop + 1));
|
|
1454
1467
|
if (!nextRange.some((w) => w
|
|
1455
1468
|
.toLowerCase()
|
|
1456
1469
|
.trim()
|
|
1457
1470
|
.replace(/^,|,$/g, "")
|
|
1458
1471
|
.replace(/\.+/g, "")
|
|
1472
|
+
.replace(/[/\\|.,:;'"!?()[\]{}<>+\-_=~`@#$%^&*]/g, " ")
|
|
1459
1473
|
.includes(nextWord))) {
|
|
1460
1474
|
return false;
|
|
1461
1475
|
}
|