PageSourceSearch

https://uptrusting.com/_next/static/chunks/2172-a38797bb7a2e34ad.js

js uptrusting.com collected 2026-10-02 00:57:56 UTC 18,547 bytes, 1 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1a5ba8a7-4a75-43ed-aae3-c061d0a93cc4",e._sentryDebugIdIdentifier="sentry-dbid-1a5ba8a7-4a75-43ed-aae3-c061d0a93cc4")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2172],{12172:(e,t,s)=>{s.d(t,{A:()=>o});var a=s(95155),n=s(55596),r=s(4474),i=s(74350),l=s(98071);function o({open:e,onOpenChangeAction:t,title:s="Invite Someone You Trust",description:c="Assign trust to someone by inviting them. Choose 1-4 topics you trust them on.",isTrustedFriend:d=!1,onSuccessAction:u}){let m=(0,l.X)({isTrustedFriend:d,onSuccess:()=>{t(!1),u?.()}}),h=e=>{!m.isSubmitting&&(t(e),e||m.reset())};return(0,a.jsx)(i.lG,{open:e,onOpenChange:h,children:(0,a.jsxs)(i.Cf,{children:[(0,a.jsxs)(i.c7,{children:[(0,a.jsx)(i.L3,{children:s}),(0,a.jsx)(i.rr,{children:c})]}),(0,a.jsx)(n.A,{...m}),(0,a.jsxs)(i.Es,{children:[(0,a.jsx)(r.$,{id:"invite-dialog-cancel",variant:"outline",onClick:()=>h(!1),disabled:m.isSubmitting,children:"Cancel"}),(0,a.jsx)(r.$,{id:"invite-dialog-submit",onClick:m.handleSubmit,disabled:!m.canSubmit||m.isSubmitting,children:m.isSubmitting?"Sending...":"Send Invitation"})]})]})})}},55596:(e,t,s)=>{s.d(t,{A:()=>m});var a=s(95155),n=s(12115),r=s(76031),i=s(19615),l=s(93354),o=s(39658),c=s(79792),d=s(98071),u=s(91337);function m({email:e,setEmail:t,name:s,setName:h,topics:p,suggestedTopics:x,personalNote:f,setPersonalNote:g,noteOverLimit:v,isSubmitting:b,error:y,handleAddTopic:j,handleRemoveTopic:w}){let N=x.filter(e=>!p.includes(e)),C=p.length<4,[k,S]=(0,n.useState)(!1);return(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)(c.J,{htmlFor:"invite-email",children:"Email"}),(0,a.jsxs)("button",{id:"invite-email-contacts",type:"button",onClick:()=>S(!0),disabled:b,className:"flex items-center gap-1 text-xs font-medium text-primary disabled:opacity-50",children:[(0,a.jsx)(i.In,{iconClass:"ph-address-book",label:"contacts",extraClasses:"text-xs"}),"From contacts"]})]}),(0,a.jsx)(o.p,{id:"invite-email",type:"email",placeholder:"[email protected]",value:e,onChange:e=>t(e.target.value),disabled:b})]}),k&&(0,a.jsx)(r.A,{open:!0,onOpenChange:S,field:"email",multiple:!1,source:"vouch-invite",onSelect:e=>{let a=e[0];a&&(t(a.value),!s.trim()&&a.name&&h(a.name))}}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)(c.J,{htmlFor:"invite-name",children:["Name ",(0,a.jsx)("span",{className:"text-muted-foreground font-normal",children:"(optional)"})]}),(0,a.jsx)(o.p,{id:"invite-name",type:"text",placeholder:"Their name",value:s,onChange:e=>h(e.target.value),disabled:b})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)(c.J,{htmlFor:"invite-topics",children:["Topics ",(0,a.jsxs)("span",{className:"text-muted-foreground font-normal",children:["(",p.length,"/4)"]})]}),p.length>0&&(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:p.map(e=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 bg-primary/10 text-primary text-sm px-2.5 py-1 rounded-full capitalize",children:[e,(0,a.jsx)("button",{type:"button",onClick:()=>w(e),disabled:b,className:"hover:text-destructive",children:(0,a.jsx)(i.In,{iconClass:"ph-x",label:"remove",extraClasses:"text-xs"})})]},e))}),C&&N.length>0&&(0,a.jsx)("div",{className:"flex flex-wrap gap-2 pt-1",children:N.map((e,t)=>(0,a.jsxs)("button",{id:`invite-suggest-${t}`,type:"button",onClick:()=>j(e),disabled:b,className:"inline-flex items-center gap-1 border border-border text-muted-foreground hover:text-primary hover:border-primary/40 hover:bg-primary/5 text-sm px-2.5 py-1 rounded-full capitalize transition-colors",children:[(0,a.jsx)(i.In,{iconClass:"ph-plus",label:"add",extraClasses:"text-xs"}),e]},e))}),C&&(0,a.jsx)(l.A,{existingTags:p,placeholder:"Search for a topic...",onTagSelectAction:j,allowCreate:!0}),0===p.length&&(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Add at least one topic you trust this person on."})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,a.jsxs)(c.J,{htmlFor:"invite-message",children:["Message ",(0,a.jsx)("span",{className:"text-muted-foreground font-normal",children:"(optional)"})]}),(0,a.jsxs)("span",{className:(0,u.cn)("text-xs",v?"text-destructive":"text-muted-foreground"),children:[f.length,"/",d.v]})]}),(0,a.jsx)("textarea",{id:"invite-message",rows:3,maxLength:d.v+20,placeholder:"A short note for them: why you're vouching, or what to expect.",value:f,onChange:e=>g(e.target.value),disabled:b,className:(0,u.cn)("flex w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",v&&"border-destructive focus-visible:ring-destructive")}
1)]}),y&&(0,a.jsx)("div",{className:"bg-destructive/10 text-destructive text-sm p-3 rounded-md",children:y})]})}},76031:(e,t,s)=>{s.d(t,{A:()=>x});var a=s(95155),n=s(93053),r=s(12115);async function i(e){let t,s,a=[];for(let s=0;s<20;s++){let s=new URL("https://people.googleapis.com/v1/people/me/connections");s.searchParams.set("personFields","names,emailAddresses,phoneNumbers"),s.searchParams.set("pageSize",String(1e3)),s.searchParams.set("sortOrder","FIRST_NAME_ASCENDING"),t&&s.searchParams.set("pageToken",t);let n=await fetch(s.toString(),{headers:{Authorization:`Bearer ${e}`}});if(!n.ok)throw Error(`Google People API request failed (${n.status})`);let r=await n.json();if(r.connections&&a.push(...r.connections),!r.nextPageToken)break;t=r.nextPageToken}return s=[],a.forEach((e,t)=>{let a=e.names?.[0]?.displayName?.trim()??"",n=(e.emailAddresses??[]).map(e=>e.value?.trim()).filter(e=>!!e),r=(e.phoneNumbers??[]).map(e=>(e.canonicalForm??e.value)?.trim()).filter(e=>!!e);(0!==n.length||0!==r.length||a)&&s.push({id:`google-${t}`,name:a,emails:n,phones:r})}),s}var l=s(66436),o=s(4474),c=s(74350),d=s(39658),u=s(34951),m=s(60331),h=s(71444),p=s(1377);function x({open:e,onOpenChange:t,field:s,multiple:n=!0,defaultCountry:i=u.T1,onSelect:g,source:v,title:b}){let y=(0,m.n)(),[j,w]=(0,r.useState)([]),[N,C]=(0,r.useState)(new Set),[k,S]=(0,r.useState)(""),A=(0,r.useRef)(null),E="u">typeof navigator&&"contacts"in navigator,_=!!(0,h.iF)().googleClientId,T=(0,r.useMemo)(()=>(0,u.Fi)(i).dial,[i]),L=(0,r.useCallback)(e=>{if("email"===s){let t=e.trim().toLowerCase();return(0,p.B9)(t)?t:null}return(0,u.tO)(e,T)},[s,T]),I=(0,r.useMemo)(()=>{let e=new Set,t=[];for(let a of j)for(let n of"email"===s?a.emails:a.phones){let s=L(n);!s||e.has(s)||(e.add(s),t.push({id:`${a.id}-${s}`,name:a.name,value:s}))}return t},[j,s,L]),R=(0,r.useMemo)(()=>{let e=k.trim().toLowerCase();return e?I.filter(t=>t.name.toLowerCase().includes(e)||t.value.includes(e)):I},[I,k]),$=(e,t)=>{(w(t=>[...t,...e]),0===e.reduce((e,t)=>e+("email"===s?t.emails:t.phones).filter(e=>null!==L(e)).length,0))?(0,l.newSnackbar)("email"===s?"No email addresses found in those contacts":"No phone numbers found in those contacts","failure"):y("Contacts Connected",{source:v,field:s,loadedFrom:t,count:e.length})},F=async e=>{if(e.size>0xa00000)return void(0,l.newSnackbar)("That file is too large. Keep it under 10 MB","failure");try{let t=function(e){let t=[],s=!1,a="",n="",r=[],i=[],l=0,o=()=>{let e=a||function(e){let[t="",s=""]=e.split(";");return[s.trim(),t.trim()].filter(Boolean).join(" ")}(n);(r.length>0||i.length>0||e)&&t.push({id:`vcard-${l++}`,name:e,emails:r,phones:i}),a="",n="",r=[],i=[]};for(let t of function(e){let t=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split("\n"),s=[],a="",n=e=>/QUOTED-PRINTABLE/i.test(e);for(let e of t)""!==a&&n(a)&&a.endsWith("=")?a=a.slice(0,-1)+e:""!==a&&(e.startsWith(" ")||e.startsWith("	"))?a+=e.slice(1):(""!==a&&s.push(a),a=e);return""!==a&&s.push(a),s}(e)){let e=function(e){let t=e.indexOf(":");if(-1===t)return null;let s=e.slice(0,t),a=e.slice(t+1),n=s.split(";"),r=n[0]??"",i=r.lastIndexOf("."),l=(-1===i?r:r.slice(i+1)).toUpperCase(),o=n.slice(1).map(e=>e.toUpperCase());return o.some(e=>e.includes("QUOTED-PRINTABLE"))&&(a=function(e){let t=[];for(let s=0;s<e.length;s++){let a=e[s];if("="===a&&s+2<e.length){let a=e.slice(s+1,s+3);if(/^[0-9A-Fa-f]{2}$/.test(a)){t.push(Number.parseInt(a,16)),s+=2;continue}}t.push(255&a.charCodeAt(0))}try{return new TextDecoder("utf-8").decode(new Uint8Array(t))}catch{return e}}(a)),{name:l,params:o,value:a.trim()}}(t);if(e){if("BEGIN"===e.name&&"VCARD"===e.value.toUpperCase()){s=!0,a="",n="",r=[],i=[];continue}if("END"===e.name&&"VCARD"===e.value.toUpperCase()){s&&o(),s=!1;continue}if(s)switch(e.name){case"FN":e.value&&(a=e.value);break;case"N":n=e.value;break;case"EMAIL":e.value&&r.push(e.value);break;case"TEL":e.value&&i.push(e.value)}}}return t}(await e.text());if(0===t.length)return void(0,l.newSnackbar)("No contacts found in that file","failure");$(t,"vcard")}catch{(0,l.newSnackbar)("Could not read that file","failure")}},P=async()=>{try{let e=navigator.contacts,t=await e.select(["name","email"===s?"email":"tel"],{multiple:!0});if(!t||0===t.length)return;let a=t.map((e,t)=>({id:`device-${t}`,name:e.name?.[0]??"",emails:e.email??[],phones:e.tel??[]}));$(a,"device")}catch{}},z=e=>{0!==e.length&&(g(e),t(!1))},O=R.length>0&&R.every(e=>N.has(e.id));return(0,a.jsx)(c.lG,{open:e,onOpenChange:t,children:(0,a.jsxs)(c.Cf,{className:"max-w-md",children:[(0,a.jsxs)(c.c7,{children:[(0,a.jsx)(c.L3,{children:b??"Add from contacts"}),(0,a.jsx)(c.rr,{children:"Contacts are read in your browser and never uploaded. Only the people you select are added."})]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,a.jsx)("input",{ref:A,id:"contact-picker-vcard-input",type:"file",accept:".vcf,text/vcard,text/x-vcard",hidden:!0,onChange:e=>{let t=e.target.files?.[0];t&&F(t),e.target.value=""}}),(0,a.jsxs)(o.$,{id:"contact-picker-upload-btn",type:"button",variant:"outline",size:"sm",onClick:()=>A.current?.click(),children:[(0,a.jsx)("i",{className:"ph ph-file-arrow-up"}),"Upload vCard (.vcf)"]}),E&&(0,a.jsxs)(o.$,{id:"contact-picker-device-btn",type:"button",variant:"outline",size:"sm",onClick:P,children:[(0,a.jsx)("i",{className:"ph ph-address-book"}),"Device contacts"]}),_&&(0,a.jsx)(f,{onLoaded:e=>$(e,"google")})]}),(0,a.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Prefer a file? Export a ",(0,a.jsx)("span",{className:"font-medium",children:".vcf"})," from Apple Contacts, Google, or Outlook and upload it above."]}),I.length>0&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(d.p,{id:"contact-picker-search",type:"text",placeholder:"Search contacts...",value:k,onChange:e=>S(e.target.value)}),n&&(0,a.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,a.jsx)("button",{id:"contact-picker-toggle-all",type:"button",className:"font-medium text-primary",onClick:()=>{C(e=>{let t=new Set(e);
1return O?R.forEach(e=>t.delete(e.id)):R.forEach(e=>t.add(e.id)),t})},children:O?"Clear all":"Select all"}),(0,a.jsxs)("span",{className:"text-muted-foreground",children:[N.size," selected"]})]}),(0,a.jsxs)("ul",{className:"max-h-64 overflow-y-auto rounded-md border border-input divide-y divide-border",children:[R.map(e=>{let t=N.has(e.id);return(0,a.jsx)("li",{children:(0,a.jsxs)("button",{id:`contact-picker-entry-${e.id}`,type:"button",onClick:()=>{!n?z([e]):C(t=>{let s=new Set(t);return s.has(e.id)?s.delete(e.id):s.add(e.id),s})},className:"flex w-full items-center gap-3 px-3 py-2 text-left hover:bg-muted/50",children:[n&&(0,a.jsx)("span",{className:`flex h-4 w-4 shrink-0 items-center justify-center rounded border ${t?"border-primary bg-primary text-primary-foreground":"border-input"}`,children:t&&(0,a.jsx)("i",{className:"ph ph-check text-[10px]"})}),(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[e.name&&(0,a.jsx)("span",{className:"block truncate text-sm font-medium",children:e.name}),(0,a.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:e.value})]})]})},e.id)}),0===R.length&&(0,a.jsx)("li",{className:"px-3 py-4 text-center text-sm text-muted-foreground",children:"No matches"})]}),n&&(0,a.jsxs)(o.$,{id:"contact-picker-add-btn",type:"button",className:"w-full",disabled:0===N.size,onClick:()=>z(I.filter(e=>N.has(e.id))),children:["Add ",N.size>0?N.size:""," ","email"===s?"email":"number",1===N.size?"":"s"]})]})]})})}function f({onLoaded:e}){let[t,s]=(0,r.useState)(!1),c=(0,n.mg)({flow:"implicit",scope:"https://www.googleapis.com/auth/contacts.readonly",onSuccess:async t=>{try{let s=await i(t.access_token);if(0===s.length)return void(0,l.newSnackbar)("No contacts found in your Google account","failure");e(s)}catch{(0,l.newSnackbar)("Could not load your Google contacts","failure")}finally{s(!1)}},onError:()=>{s(!1),(0,l.newSnackbar)("Could not connect to Google","failure")},onNonOAuthError:()=>s(!1)});return(0,a.jsxs)(o.$,{id:"contact-picker-google-btn",type:"button",variant:"outline",size:"sm",disabled:t,onClick:()=>{s(!0),c()},children:[t?(0,a.jsx)("span",{className:"h-4 w-4 animate-spin rounded-full border-b-2 border-current"}):(0,a.jsx)("i",{className:"ph ph-google-logo"}),"Google Contacts"]})}},93354:(e,t,s)=>{s.d(t,{A:()=>d});var a=s(95155),n=s(12115),r=s(66436),i=s(91459),l=s(35837),o=s(58205),c=s(48736);function d({existingTags:e,placeholder:t,onTagSelectAction:s,id:u,allowCreate:m}){let[h,p]=(0,n.useState)(""),[x,f]=(0,n.useState)([]),[g,v]=(0,n.useState)(!1),[b,y]=(0,n.useState)(!1),[j,w]=(0,n.useState)(!1),N=(0,n.useRef)(null),C=(0,n.useRef)(null),k=(0,n.useRef)(null);(0,n.useEffect)(()=>{let e=e=>{C.current&&!C.current.contains(e.target)&&w(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]);let S=async t=>{if(!t.trim())return void f([]);v(!0);try{let s=new URLSearchParams;s.append("limit","5"),s.append("prefix",t),e.forEach(e=>s.append("tag",e));let a=await l.CL.requestResult("/user/tags/search/with-content","get",void 0,s);a.success&&(f(a.data),w(!0))}catch(e){console.error("Error searching tags:",e)}finally{v(!1)}},A=e=>{s(e),p(""),f([]),w(!1)},E=h.trim(),_=E.length>0&&(e.some(e=>e.toLowerCase()===E.toLowerCase())||x.some(([e])=>e.toLowerCase()===E.toLowerCase())),T=!0===m&&E.length>0&&!_,L=async()=>{if(T&&!b){y(!0);try{let e=await l.CL.requestResult("/user/tags/create","post",E);e.success?A(e.data):(0,r.newSnackbar)((0,o.EC)(e.error),"failure")}catch{(0,r.newSnackbar)("Something went wrong creating that topic. Please try again.","failure")}finally{y(!1)}}};return(0,a.jsxs)("div",{className:"relative w-full",ref:C,children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{ref:k,id:u,type:"text",value:h,onChange:e=>{let t=e.target.value;p(t),N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{S(t)},300)},onFocus:()=>(x.length>0||T)&&w(!0),placeholder:t,name:"tag-search",className:"text-input border border-border bg-background focus:outline-none focus:ring-2 focus:ring-primary"}),g&&(0,a.jsx)("div",{className:"absolute right-3 top-1/2 transform -translate-y-1/2 flex items-center justify-center",children:(0,a.jsx)(c.A,{})})]}),j&&(x.length>0||T)&&(0,a.jsxs)("div",{className:"absolute z-10 w-full mt-1 bg-background border border-border rounded-lg shadow-lg max-h-60 overflow-y-auto",children:[x.map(([e,t])=>(0,a.jsx)("button",{type:"button",onClick:()=>A(e),className:"w-full px-3 py-2 text-left hover:bg-snowy dark:hover:bg-rainy transition-colors",children:(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("span",{className:"font-medium",children:e}),(0,a.jsx)(i.Bc,{delayDuration:200,children:(0,a.jsxs)("span",{className:"text-sm text-gray-500",children:[(0,a.jsxs)(i.m_,{children:[(0,a.jsx)(i.k$,{asChild:!0,children:(0,a.jsxs)("span",{className:"cursor-help",children:[t._tagCounts_postCount," posts"]})}),(0,a.jsx)(i.ZI,{side:"top",sideOffset:6,children:"Number of posts tagged with this topic"})]}),", ",(0,a.jsxs)(i.m_,{children:[(0,a.jsx)(i.k$,{asChild:!0,children:(0,a.jsxs)("span",{className:"cursor-help",children:[t._tagCounts_commentCount," comments"]})}),(0,a.jsx)(i.ZI,{side:"top",sideOffset:6,children:"Number of comments tagged with this topic"})]})]})})]})},e)),T&&(0,a.jsxs)("button",{id:u?`${u}-create-topic`:"tag-search-create-topic",type:"button",onClick:L,disabled:b,className:"w-full px-3 py-2 text-left hover:bg-snowy dark:hover:bg-rainy transition-colors border-t border-border flex items-center justify-between",children:[(0,a.jsxs)("span",{children:["Add ",(0,a.jsxs)("span",{className:"font-medium",children:['"',E,'"']})," as a new topic"]}),b&&(0,a.jsx)(c.A,{})]})]})]})}},98071:(e,t,s)=>{s.d(t,{X:()=>o,v:()=>l});var a=s(12115),n=s(66436),r=s(35837),i=s(58205);let l=280;function o(e){let[t,s]=(0,a.useState)(""),[o,c]=(0,a.useState)(""),[d,u]=(0,a.useState)([]),[m,h]=(0,a.useState)([]),[p,x]=(0,a.useState)(""),[f,g]=(0,a.useState)(!1),[v,b]=(0,a.useState)(null),y=(0,a.useRef)(!1),j=p.length>l,w=t.trim().length>0&&d.length>=1&&d.length<=4&&!j,N=()=>{s(""),c(""),u([]),x(""),b(null),y.current=!1};(0,a.useEffect)(()=>{let e=!1,t=new URLSearchParams;return t.append("limit","8"),r.CL.requestResult("/user/invitations/suggested-contexts","get",void 0,t).then(t=>{!e&&t.success&&h(t.data)}).catch(()=>{}),()=>{e=!0}},[]),(0,a.useEffect)(()=>
1{if(y.current||d.length>0)return;let e=m[0];void 0!==e&&(y.current=!0,u([e]))},[m,d.length]);let C=async()=>{if(w){g(!0),b(null);try{let s=p.trim(),a={_inviteRequest_email:t.trim(),_inviteRequest_contexts:d,_inviteRequest_isTrustedFriend:e?.isTrustedFriend===!0,...o.trim()&&{_inviteRequest_name:o.trim()},...s&&{_inviteRequest_personalNote:s}},l=await r.CL.requestResult("/user/invitations","post",a);if(l.success)(0,n.newSnackbar)("string"==typeof l.data?l.data:"Invitation sent","success"),N(),e?.onSuccess?.();else{let e=(0,i.tp)(l.error);null!==e&&b(e)}}catch{b("Something went wrong. Please try again.")}finally{g(!1)}}};return{email:t,setEmail:s,name:o,setName:c,topics:d,suggestedTopics:m,personalNote:p,setPersonalNote:x,noteOverLimit:j,canSubmit:w,isSubmitting:f,error:v,setError:b,handleAddTopic:e=>{d.length<4&&u([...d,e])},handleRemoveTopic:e=>{u(d.filter(t=>t!==e))},handleSubmit:C,reset:N}}}}]);

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.