PageSourceSearch

https://app.secria.me/bundle.cdfe1058afc8597980b8.js

js secria.me collected 2026-09-24 13:01:49 UTC 10,895 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkwebapp=self.webpackChunkwebapp||[]).push([[5],{21998:(e,t,n)=>{n.d(t,{A:()=>r});var s=n(93701),i=n(41934);const r=(0,s.A)((0,i.jsx)("path",{d:"M3 17.46v3.04c0 .28.22.5.5.5h3.04c.13 0 .26-.05.35-.15L17.81 9.94l-3.75-3.75L3.15 17.1q-.15.15-.15.36M20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"EditRounded")},70005:(e,t,n)=>{n.r(t),n.d(t,{default:()=>I});var s=n(41934),i=n(17256),r=n(41498),l=n(30218),a=n(57402),o=n(38752),c=n(35358),d=n(2444),x=n(54939),h=n(71996),m=n(5189),u=n(18297),g=n(33520),A=n(7364),j=n(14868),p=n(60106),y=n(38598),f=n(77753),v=n(3258),b=n(61492),w=n(15056),S=n(40270),C=n(66746),_=n(21998),T=n(52759),k=n(47798),D=n(77240),L=n(21703),z=n(95494),E=n(56284),R=n(86904);function O({signature:e,onEdit:t,onDelete:n}){const i=e.html_content&&""!==e.html_content.trim(),x=(i?e.html_content:e.plain_text).replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim().substring(0,100);return(0,s.jsx)(r.A,{variant:"outlined",sx:{p:2,"&:hover":{bgcolor:"background.level1"}},children:(0,s.jsxs)(l.A,{direction:"row",spacing:2,alignItems:"flex-start",children:[(0,s.jsxs)(a.A,{sx:{flexGrow:1,minWidth:0},children:[(0,s.jsxs)(l.A,{direction:"row",spacing:1,alignItems:"center",sx:{mb:1},children:[(0,s.jsx)(o.Ay,{level:"title-sm",sx:{fontWeight:600},children:e.name}),e.is_default&&(0,s.jsx)(c.A,{size:"sm",color:"primary",startDecorator:(0,s.jsx)(C.A,{}),children:"Default"}),(0,s.jsx)(c.A,{size:"sm",variant:"soft",color:i?"success":"neutral",children:i?"HTML":"Text"})]}),x&&(0,s.jsxs)(o.Ay,{level:"body-sm",sx:{color:"text.secondary",fontStyle:"italic",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[x,"..."]}),(0,s.jsxs)(o.Ay,{level:"body-xs",sx:{color:"text.tertiary",mt:.5},children:["Created: ",new Date(e.created_at).toLocaleDateString()]})]}),(0,s.jsxs)(l.A,{direction:"row",spacing:1,children:[(0,s.jsx)(d.Ay,{size:"sm",variant:"plain",color:"primary",onClick:()=>t(e),children:(0,s.jsx)(_.A,{})}),(0,s.jsx)(d.Ay,{size:"sm",variant:"plain",color:"danger",onClick:()=>n(e.id),children:(0,s.jsx)(T.A,{})})]})]})})}function W({open:e,onClose:t,signature:n,onSave:i}){const[c,d]=(0,S.useState)(n?.name||""),[b,w]=(0,S.useState)(n?.html_content||""),[C,_]=(0,S.useState)(n?.plain_text||""),[T,D]=(0,S.useState)(n?.is_default||!1),[L,z]=(0,S.useState)(!1),[E,O]=(0,S.useState)([]);(0,S.useEffect)((()=>{n?(d(n.name),w(n.html_content||""),_(n.plain_text||""),D(n.is_default),z(!(!n.html_content||!n.html_content.trim()))):(d(""),w(""),_(""),D(!1),z(!1))}),[n,e]),(0,S.useEffect)((()=>{O([])}),[b,C,L]);return(0,s.jsx)(x.Ay,{open:e,onClose:t,children:(0,s.jsxs)(h.A,{size:"lg",sx:{maxWidth:{xs:"95vw",sm:"90vw",md:"80vw"},maxHeight:"90vh",overflow:"auto",p:{xs:2,sm:3},m:{xs:1,sm:2}},children:[(0,s.jsx)(m.A,{}),(0,s.jsx)(o.Ay,{level:"title-lg",sx:{mb:2},children:n?"Edit Signature":"Create Signature"}),(0,s.jsxs)(l.A,{spacing:2,children:[E.length>0&&(0,s.jsx)(u.A,{color:"warning",startDecorator:(0,s.jsx)(k.A,{}),children:(0,s.jsxs)(l.A,{children:[(0,s.jsx)(o.Ay,{level:"title-sm",children:"Content Sanitization Warnings"}),E.map(((e,t)=>(0,s.jsxs)(o.Ay,{level:"body-sm",children:["• ",e]},t)))]})}),(0,s.jsxs)(g.A,{required:!0,children:[(0,s.jsx)(A.A,{children:"Signature Name"}),(0,s.jsx)(j.Ay,{value:c,onChange:e=>d(e.target.value),placeholder:"e.g., Professional, Personal, Company"})]}),(0,s.jsxs)(g.A,{children:[(0,s.jsx)(A.A,{children:"Format"}),(0,s.jsx)(l.A,{direction:{xs:"column",sm:"row"},spacing:2,alignItems:{xs:"flex-start",sm:"center"},children:(0,s.jsxs)(l.A,{direction:"row",spacing:2,alignItems:"center",children:[(0,s.jsx)(o.Ay,{level:"body-sm",children:"Plain Text"}),(0,s.jsx)(p.A,{checked:L,onChange:e=>z(e.target.checked)}),(0,s.jsx)(o.Ay,{level:"body-sm",children:"HTML"})]})}),(0,s.jsx)(y.A,{children:"HTML signatures support rich formatting and links"})]}),L?(0,s.jsxs)(g.A,{children:[(0,s.jsx)(A.A,{children:"HTML Content"}),(0,s.jsx)(f.A,{value:b,onChange:e=>w(e.target.value),placeholder:'<div style="font-family: Arial, sans-serif; font-size: 14px; color: #333;">\n    <strong>John Doe</strong><br>\n    <span style="color: #666;">
1Senior Software Engineer</span><br>\n    <a href="mailto:[email protected]" style="color: #0066cc;">[email protected]</a><br>\n    📱 +1 (234) 567-8900\n</div>',minRows:8,maxRows:15,sx:{fontFamily:"monospace",fontSize:"sm"}})]}):(0,s.jsxs)(g.A,{children:[(0,s.jsx)(A.A,{children:"Plain Text Content"}),(0,s.jsx)(f.A,{value:C,onChange:e=>_(e.target.value),placeholder:"Best regards,\nJohn Doe\[email protected]\n+1 (555) 123-4567",minRows:4,maxRows:8}),(0,s.jsx)(y.A,{children:"Enter your signature as plain text"})]}),(0,s.jsx)(g.A,{children:(0,s.jsxs)(l.A,{direction:{xs:"column",sm:"row"},spacing:2,alignItems:{xs:"flex-start",sm:"center"},children:[(0,s.jsx)(p.A,{checked:T,onChange:e=>D(e.target.checked)}),(0,s.jsxs)(a.A,{children:[(0,s.jsx)(o.Ay,{level:"body-sm",children:"Set as default signature"}),(0,s.jsx)(o.Ay,{level:"body-xs",sx:{color:"text.secondary"},children:"This signature will be automatically added to new emails"})]})]})}),L&&b&&(0,s.jsxs)(a.A,{children:[(0,s.jsx)(o.Ay,{level:"body-sm",sx:{mb:1,fontWeight:600},children:"Preview:"}),(0,s.jsx)(r.A,{variant:"outlined",sx:{p:2},children:(0,s.jsx)("div",{dangerouslySetInnerHTML:{__html:(0,R.L)(b)}})})]})]}),(0,s.jsxs)(l.A,{direction:{xs:"column-reverse",sm:"row"},spacing:2,sx:{mt:3,justifyContent:"flex-end"},children:[(0,s.jsx)(v.A,{variant:"plain",onClick:t,sx:{width:{xs:"100%",sm:"auto"}},children:"Cancel"}),(0,s.jsxs)(v.A,{onClick:()=>{if(!c.trim())return;const e=(0,R.C)(L?b:"",L?"":C.trim());e.isValid?(O(e.warnings),i(c.trim(),L?e.sanitized:"",L?"":C.trim(),T),t()):O(e.warnings)},disabled:!c.trim()||!b.trim()&&!C.trim(),sx:{width:{xs:"100%",sm:"auto"}},children:[n?"Update":"Create"," Signature"]})]})]})})}function I(){const{client:e}=(0,b.SF)(),t=(0,w.Zp)(),n=e,c=e.user,[d,x]=(0,S.useState)(!1),[h,m]=(0,S.useState)(),[g,A]=(0,S.useState)(null),[j,y]=(0,S.useState)(!1),[f,C]=(0,S.useState)(null),_=c?.email_signatures||[],T=c?.plan_config?.plan,k=c?.plan_config?.signature_limit||0,R=T&&"free"!==T,I=(0,i.KP)(),F=_.length<k,M=()=>{m(void 0),x(!0)},N=e=>{m(e),x(!0)};return R?(0,s.jsxs)(a.A,{sx:{maxWidth:z.k,mx:"auto",p:{xs:2,sm:3}},children:[(0,s.jsxs)(l.A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:{xs:2,sm:0},sx:{mb:3},children:[(0,s.jsx)(o.Ay,{level:"title-lg",startDecorator:(0,s.jsx)(D.A,{}),sx:{display:{xs:"none",md:"flex"}},children:"Email Signatures"}),(0,s.jsx)(v.A,{startDecorator:(0,s.jsx)(L.A,{}),onClick:M,disabled:!F||j,sx:{display:0===_.length?"none":void 0,width:{xs:"100%",sm:"auto"},fontSize:{xs:"0.875rem",sm:"1rem"}},children:"Add Signature"})]}),R&&(0,s.jsxs)(o.Ay,{level:"body-sm",sx:{mb:2,color:"text.secondary"},children:[_.length," signature",1!==_.length?"s":""," of ",k," used"]}),f&&(0,s.jsx)(u.A,{color:"danger",sx:{mb:2},children:f}),0===_.length?(0,s.jsxs)(r.A,{variant:"outlined",sx:{p:4,textAlign:"center"},children:[(0,s.jsx)(D.A,{sx:{fontSize:48,color:"text.tertiary",mb:2}}),(0,s.jsx)(o.Ay,{level:"title-sm",sx:{mb:1},children:"No signatures yet"}),(0,s.jsx)(o.Ay,{level:"body-sm",sx:{color:"text.secondary",mb:2},children:"Create your first email signature to automatically include it in your emails"}),(0,s.jsx)(v.A,{onClick:M,disabled:j,children:"Create Your First Signature"})]}):(0,s.jsx)(l.A,{spacing:2,children:_.map((e=>(0,s.jsx)(O,{signature:e,onEdit:N,onDelete:A},e.id)))}),(0,s.jsx)(W,{open:d,onClose:()=>{x(!1),m(void 0)},signature:h,onSave:(e,t,s,i)=>{h?(async(e,t,s,i)=>{if(h){y(!0),C(null);try{const r=await n.updateSignature(h.id,e,t,s,i);r.success||C(r.data)}catch(e){C("Failed to update signature")}finally{y(!1)}}})(e,t,s,i):(async(e,t,s,i)=>{y(!0),C(null);try{const r=await n.createSignature(e,t,s,i);r.success||C(r.data)}catch(e){C("Failed to create signature")}finally{y(!1)}})(e,t,s,i)}}),(0,s.jsx)(E.A,{open:!!g,onClose:()=>A(null),onConfirm:()=>g&&(async e=>{y(!0),C(null);try{const t=await n.deleteSignature(e);t.success||C(t.data)}catch(e){C("Failed to delete signature")}finally{y(!1),A(null)}})(g),onReject:()=>A(null),title:"Delete Signature",message:"Are you sure you want to delete this signature? This action cannot be undone.",color:"danger"})]}):(0,s.jsxs)(a.A,{sx:{maxWidth:z.k,mx:"auto",p:{xs:2,sm:3}}
1,children:[(0,s.jsx)(o.Ay,{level:"h1",sx:{mb:1},children:"Signatures"}),(0,s.jsx)(o.Ay,{level:"body-md",color:"neutral",sx:{mb:3},children:"The lines that go at the foot of the mail you send."}),(0,s.jsx)(r.A,{variant:"outlined",sx:{p:2,mb:3},children:(0,s.jsxs)(l.A,{direction:"row",spacing:2,alignItems:"flex-start",justifyContent:"space-between",children:[(0,s.jsxs)(a.A,{sx:{minWidth:0},children:[(0,s.jsx)(o.Ay,{level:"title-sm",id:"secria-footer-label",children:"Secria footer"}),(0,s.jsx)(o.Ay,{level:"body-sm",sx:{mt:.5},children:'New messages start with a short "Sent with Secria" line at the foot.'}),(0,s.jsx)(a.A,{"aria-hidden":!0,sx:{mt:1.5,p:1,borderRadius:"sm",bgcolor:"background.level1",fontSize:"12px",color:"text.tertiary"},children:"Sent with Secria"})]}),(0,s.jsx)(p.A,{checked:I.secriaFooter,onChange:e=>(0,i.nz)({secriaFooter:e.target.checked}),slotProps:{input:{"aria-labelledby":"secria-footer-label"}}})]})}),(0,s.jsx)(u.A,{color:"neutral",sx:{mb:3},endDecorator:(0,s.jsx)(v.A,{size:"sm",variant:"outlined",onClick:()=>t("/app/config/plan"),children:"See plans"}),children:(0,s.jsx)(o.Ay,{level:"body-sm",children:"Writing your own signature is part of Plus and Pro."})})]})}},86904:(e,t,n)=>{n.d(t,{C:()=>r,L:()=>i});var s=n(39794);function i(e){if(!e||""===e.trim())return"";const t=s.A.sanitize(e,{ALLOWED_TAGS:["p","br","strong","b","em","i","u","span","div","a","table","tr","td","th","tbody","thead"],ALLOWED_ATTR:["style","href","target","width","height","cellpadding","cellspacing","border"],ALLOW_DATA_ATTR:!1,ALLOW_UNKNOWN_PROTOCOLS:!1,FORBID_TAGS:["script","iframe","object","embed","form","input","button","img"],FORBID_ATTR:["onclick","onload","onerror","onmouseover","onfocus","onblur","onchange","onsubmit","src"],SANITIZE_DOM:!0,KEEP_CONTENT:!0,RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1});return function(e){return[/javascript:/i,/data:/i,/vbscript:/i,/on\w+\s*=/i,/<script/i,/<iframe/i,/<object/i,/<embed/i,/<img/i,/eval\s*\(/i,/expression\s*\(/i].some((t=>t.test(e)))}(t)?t.replace(/<[^>]*>/g,""):t}function r(e,t){const n=[];let s="";if(e&&""!==e.trim()){const t=e.length;s=i(e),s.length<.8*t&&n.push("Significant content was removed during sanitization"),(s.includes("&lt;img")||s.includes("&lt;script"))&&n.push("Images and scripts are not allowed in signatures")}return s&&""!==s.trim()||t&&""!==t.trim()?{isValid:!0,sanitized:s,warnings:n}
1:{isValid:!1,sanitized:"",warnings:["Signature must have either HTML or plain text content"]}}}}]);

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.