1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8162],{8162:function(e,t,n){n.r(t),n.d(t,{default:function(){return eb}});var s=n(57437),a=n(69102),r=n.n(a),i=n(2265),o=n(37181),l=n(71635),c=n(75646),d=n(34826),m=n(92759),p=n(7473),u=n(62357),h=n(575),g=n(96391),x=n(49769),f=n(22169);let b=(0,x.j)("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-8 px-2",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),v=i.forwardRef((e,t)=>{let{className:n,variant:a,size:r,...i}=e;return(0,s.jsx)(g.f,{ref:t,className:(0,f.cn)(b({variant:a,size:r,className:n})),...i})});v.displayName=g.f.displayName;var w=n(62677),j=n(34645),y=n(9208),N=n(3549),C=n(99497),k=n(73293),S=n(12647),D=n(37841),T=n(10632),z=n(69475),P=n(79580),A=n(18727),L=n(26570),E=n(39139),F=n(30572),M=n(23441),I=n(72733),H=n(94415),Z=n(42804),O=n(99925),_=n(22455),R=n(65694),G=n(48541),W=n(2866),J=n(20244),B=n(20403),U=n(65561),q=n(3665),V=n(15453),X=n(62184),Y=n(40318),$=n(19672),K=n(3654);let Q=/\b(Genesis|Exodus|Leviticus|Numbers|Deuteronomy|Joshua|Judges|Ruth|1\s*Samuel|2\s*Samuel|1\s*Kings|2\s*Kings|1\s*Chronicles|2\s*Chronicles|Ezra|Nehemiah|Esther|Job|Psalms?|Proverbs|Ecclesiastes|Song\s*of\s*Solomon|Song\s*of\s*Songs|Isaiah|Jeremiah|Lamentations|Ezekiel|Daniel|Hosea|Joel|Amos|Obadiah|Jonah|Micah|Nahum|Habakkuk|Zephaniah|Haggai|Zechariah|Malachi|Matthew|Mark|Luke|John|Acts|Romans|1\s*Corinthians|2\s*Corinthians|Galatians|Ephesians|Philippians|Colossians|1\s*Thessalonians|2\s*Thessalonians|1\s*Timothy|2\s*Timothy|Titus|Philemon|Hebrews|James|1\s*Peter|2\s*Peter|1\s*John|2\s*John|3\s*John|Jude|Revelation)\s+(\d+)(?::(\d+)(?:-(\d+))?)?/gi,ee=Y.hj.create({name:"bibleVerseExtension",addProseMirrorPlugins:()=>[new $.Sy({key:new $.H$("bibleVerseExtension"),props:{decorations(e){let{doc:t}=e,n=[];return t.descendants((e,t)=>{e.isText&&(function(e){let t;let n=[];for(;null!==(t=Q.exec(e));)n.push({from:t.index,to:t.index+t[0].length,reference:t[0]});return n})(e.text).forEach(e=>{let s=t+e.from,a=t+e.to;n.push(K.p.inline(s,a,{class:"bible-reference","data-reference":e.reference}))})}),K.EH.create(t,n)}}})]});var et=n(29069),en=n(14525),es=n(6886),ea=n(44055),er=n(1270),ei=n(49677);let eo=[{id:"shorter",label:"Make shorter",prompt:"Make this email shorter and easier to read while keeping the same meaning."},{id:"warmer",label:"Warmer tone",prompt:"Rewrite with a warmer, more welcoming tone that fits a church audience."},{id:"grammar",label:"Fix grammar",prompt:"Fix grammar, spelling, and punctuation. Keep the same message and tone."},{id:"simpler",label:"Simplify",prompt:"Use simpler, clearer wording so anyone can understand it on a first read."},{id:"cta",label:"Add next step",prompt:"Add a clear, friendly next step or call to action at the end of the email."},{id:"subject",label:"Improve subject",prompt:"Suggest a clearer subject line and revise the body if needed so they work well together."}],el=e=>{let{actionPrompt:t,bodyHtml:n,subject:s}=e,a=n.trim(),r=null==s?void 0:s.trim();return["I'm editing an email in Communications.",t,"",(r?"Current subject: ".concat(r,"\n\n"):"")+(a?"Current email body (HTML):\n".concat(a):"The email body is currently empty."),"","Please update the draft in Communications for me to review before sending.","Preserve personalization tags like {FirstName} and {Organization}."].join("\n")},ec=e=>{let{actionPrompt:t,bodyHtml:n,subject:s}=e;(0,ei.pT)({assistantId:"content-creator",message:el({actionPrompt:t,bodyHtml:n,subject:s}),skipIntro:!0})};var ed=n(7036);function em(e){e.preventDefault()}let ep=e=>{let{open:t,onOpenChange:n,onApply:a,editor:r,dynamicTags:o=[]}=e,[l,c]=(0,i.useState)("html"),[d,m]=(0,i.useState)(""),[p,u]=(0,i.useState)(""),[g,x]=(0,i.useState)("");return(0,i.useEffect)(()=>{t&&r&&m(r.getHTML())},[t,r]),(0,i.useEffect)(()=>{x('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n <html xmlns="http://www.w3.org/1999/xhtml">\n <head>\n <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1.0" />\n <title>Email</title>\n </head>\n <body style="margin: 0; padding: 0; background-color: #f0f1f4; font-family: Arial, sans-serif; line-height: 1.6;">\n <table border="0" cellpadding="0" cellspacing="0" width="100%">\n <tr>\n <td align="center" style="padding: 20px 0;">\n <table border="0" cellpadding="0" cellspacing="0" width="600" style="background-color: #ffffff; border-radius: 16px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">\n <tr>\n <td align="center" style="padding: 40px;">\n <table border="0" cellpadding="0" cellspacing="0" width="100%">\n \n <tr>\n <td style="color: #1a1a4e; font-size: 16px; padding-bottom: 30px;">\n {{CONTENT}}\n </td>\n </tr>\n \n <tr>\n <td style="color: #1a1a4e; font-size: 16px; padding-bottom: 30px;">\n Footer\n </td>\n </tr>\n <tr>\n <td align="center" style="color: #666666; font-size: 12px;">\n Client details\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </body>\n </html>'.replace("{{CONTENT}}",d))},[d]),(0,s.jsx)(y.Dialog,{open:t,onOpenChange:n,children:(0,s.jsxs)(y.DialogContent,{className:"sm:max-w-[800px] ".concat(ed.Vp),overlayClassName:ed.HL,onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)(y.DialogHeader,{children:[(0,s.jsx)(y.DialogTitle,{children:"Add Custom HTML/CSS"}),(0,s.jsx)(y.DialogDescription,{children:"Edit HTML content, add CSS styling, and preview the email"})]}),(0,s.jsxs)(C.mQ,{value:l,onValueChange:c,children:[(0,s.jsxs)(C.dr,{className:"grid w-full grid-cols-3",children:[(0,s.jsx)(C.SP,{value:"html",children:"HTML Content"}),(0,s.jsx)(C.SP,{value:"style",children:"CSS Style"}),(0,s.jsxs)(C.SP,{value:"preview",className:"flex items-center gap-1",children:[(0,s.jsx)(D.Z,{className:"h-4 w-4"}),"Email Preview"]})]}),(0,s.jsx)(C.nU,{value:"html",className:"space-y-4",children:(0,s.jsxs)("div",{className:"grid gap-2",children:[(0,s.jsx)(S._,{htmlFor:"html",children:"HTML Content"}),(0,s.jsx)(N.g,{id:"html",value:d,onChange:e=>m(e.target.value),placeholder:"",className:"min-h-[200px] font-mono"}),o.length>0&&(0,s.jsxs)("div",{className:"space-y-2 mt-4",children:[(0,s.jsx)(S._,{children:"Insert Dynamic Tag"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map(e=>(0,s.jsx)(h.z,{type:"button",variant:"outline",size:"sm",onClick:()=>{let t=document.getElementById("html");if(t){let n=t.selectionStart,s=t.selectionEnd;m(d.substring(0,n)+e.value+d.substring(s)),setTimeout(()=>{t.focus(),t.setSelectionRange(n+e.value.length,n+e.value.length)},0)}},className:"py-1 px-2 h-auto text-xs",children:e.name},e.value))})]})]})}),(0,s.jsx)(C.nU,{value:"style",className:"space-y-4",children:(0,s.jsxs)("div",{className:"grid gap-2",children:[(0,s.jsx)(S._,{htmlFor:"style",children:"CSS Style"}),(0,s.jsx)(k.I,{id:"style",value:p,onChange:e=>u(e.target.value),placeholder:"",className:"font-mono"})]})}),(0,s.jsx)(C.nU,{value:"preview",className:"space-y-4",children:(0,s.jsxs)("div",{className:"grid gap-2",children:[(0,s.jsx)(S._,{htmlFor:"preview",children:"Email Preview"}),(0,s.jsxs)("div",{className:"border rounded-md overflow-hidden bg-white",children:[(0,s.jsx)("div",{className:"bg-muted px-4 py-2 border-b flex items-center justify-between",children:(0,s.jsx)("div",{className:"font-medium",children:"Email Preview"})}),(0,s.jsx)("div",{className:"max-h-[500px] overflow-auto p-4",children:(0,s.jsx)("iframe",{srcDoc:g,title:"Email Preview",className:"w-full h-[450px] border-0",sandbox:"allow-same-origin"})})]})]})})]}),(0,s.jsx)(y.DialogFooter,{children:(0,s.jsx)(h.z,{onClick:()=>{let e=d;p&&"style"===l&&(e='<div style="'.concat(p,'">').concat(d,"</div>")),a(e),n(!1),m(""),u("")},children:"Insert Content"})})]})})},eu=e=>{let{open:t,onOpenChange:n,onApply:a}=e,[r,o]=(0,i.useState)("");return(0,s.jsx)(y.Dialog,{open:t,onOpenChange:n,children:(0,s.jsxs)(y.DialogContent,{className:"sm:max-w-[425px] ".concat(ed.Vp),overlayClassName:ed.HL,children:[(0,s.jsxs)(y.DialogHeader,{children:[(0,s.jsx)(y.DialogTitle,{children:"Add Inline CSS"}),(0,s.jsx)(y.DialogDescription,{children:"Enter CSS styles to apply to the selected text (e.g., color: red; font-size: 16px;)"})]}),(0,s.jsx)("div",{className:"grid gap-4 py-4",children:(0,s.jsxs)("div",{className:"grid gap-2",children:[(0,s.jsx)(S._,{htmlFor:"style",children:"CSS Style"}),(0,s.jsx)(k.I,{id:"style",value:r,onChange:e=>o(e.target.value),placeholder:""})]})}),(0,s.jsx)(y.DialogFooter,{children:(0,s.jsx)(h.z,{onClick:()=>{a(r),n(!1)},children:"Apply Style"})})]})})},eh=e=>{let{open:t,onOpenChange:n,onApply:a}=e,[r,o]=(0,i.useState)("Fill in your answer..."),[l,c]=(0,i.useState)("medium"),[d,m]=(0,i.useState)(1);return(0,s.jsx)(y.Dialog,{open:t,onOpenChange:n,children:(0,s.jsxs)(y.DialogContent,{className:"sm:max-w-[425px] top-0 translate-y-0 ".concat(ed.Vp),overlayClassName:ed.HL,style:{position:"fixed",top:"5%",transform:"translateY(0) translateX(-50%)"},children:[(0,s.jsxs)(y.DialogHeader,{children:[(0,s.jsx)(y.DialogTitle,{children:"Add Fillable Field"}),(0,s.jsx)(y.DialogDescription,{children:"Create a blank field that bulletin viewers can fill in with their own answers."})]}),(0,s.jsxs)("div",{className:"grid gap-4 py-4",children:[(0,s.jsxs)("div",{className:"grid gap-2",children:[(0,s.jsx)(S._,{htmlFor:"placeholder",children:"Placeholder Text"}),(0,s.jsx)(k.I,{id:"placeholder",value:r,onChange:e=>o(e.target.value),placeholder:"Fill in your answer..."}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"This text appears as a hint inside the empty field."})]}),(0,s.jsxs)("div",{className:"grid gap-2",children:[(0,s.jsx)(S._,{htmlFor:"width",children:"Field Width"}
1),(0,s.jsxs)("select",{id:"width",value:l,onChange:e=>c(e.target.value),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background",children:[(0,s.jsx)("option",{value:"small",children:"Small"}),(0,s.jsx)("option",{value:"medium",children:"Medium"}),(0,s.jsx)("option",{value:"large",children:"Large"}),(0,s.jsx)("option",{value:"full",children:"Full Width"})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Controls how much horizontal space the field takes up."})]}),(0,s.jsxs)("div",{className:"grid gap-2",children:[(0,s.jsx)(S._,{htmlFor:"lines",children:"Number of Lines"}),(0,s.jsxs)("select",{id:"lines",value:d,onChange:e=>m(parseInt(e.target.value)),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background",children:[(0,s.jsx)("option",{value:"1",children:"Single Line"}),(0,s.jsx)("option",{value:"3",children:"Multiple Lines (3)"}),(0,s.jsx)("option",{value:"5",children:"Multiple Lines (5)"})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"For longer answers, choose multiple lines."})]}),(0,s.jsxs)("div",{className:"bg-blue-50 border border-blue-100 rounded-md p-3",children:[(0,s.jsx)("h4",{className:"text-sm font-medium text-blue-800 mb-1",children:"How it works"}),(0,s.jsx)("p",{className:"text-xs text-blue-700",children:"These fillable fields will appear in the bulletin and allow viewers to type their own responses. Use them for reflection questions, fill-in-the-blanks, or note-taking sections."})]})]}),(0,s.jsx)(y.DialogFooter,{children:(0,s.jsx)(h.z,{onClick:()=>{a({placeholder:r,width:l,lines:d}),n(!1)},children:"Insert Field"})})]})})},eg=e=>{let{open:t,onOpenChange:n,onDocumentImport:a}=e,[r,o]=(0,i.useState)(!1),[l,c]=(0,i.useState)(""),[d,m]=(0,i.useState)(null),[p,u]=(0,i.useState)(""),[g,x]=(0,i.useState)(""),[f,b]=(0,i.useState)(!1),v=(0,i.useRef)(null);(0,i.useEffect)(()=>{t||setTimeout(()=>{m(null),c(""),u(""),x(""),b(!1)},300)},[t]);let w=e=>e.replace(/(?:\d\s*)?[A-Za-z]+\s+\d+(?::\d+(?:-\d+)?)?/g,e=>'<span class="bible-reference">'.concat(e,"</span>")),j=async e=>new Promise((t,n)=>{try{let s=new FileReader;s.onload=async s=>{var a;if(!(null===(a=s.target)||void 0===a?void 0:a.result)){n(Error("Failed to read file"));return}try{if("application/pdf"===e.type){let n="<h2>Imported from ".concat(e.name,"</h2>\n<p>Your PDF has been processed. PDFs may require manual formatting adjustments.</p>");t(w(n))}else if(window.mammoth){let e=s.target.result,n=await window.mammoth.convertToHtml({arrayBuffer:e}),a=w(n.value);t(a)}else{let n="<h2>Imported from ".concat(e.name,"</h2>\n<p>Your document has been imported. For better document conversion, please use the Import Document tab.</p>");t(w(n))}}catch(s){console.error("Error processing document:",s);let n="<h2>Imported from ".concat(e.name,"</h2>\n<p>There was an error processing your document. You can continue editing the content below.</p>");t(w(n))}},s.onerror=e=>{console.error("Error reading file:",e),n(e)},"application/pdf"===e.type?s.readAsText(e):s.readAsArrayBuffer(e)}catch(e){console.error("Error in document processing:",e),n(e)}}),N=async e=>{var t;let n=null===(t=e.target.files)||void 0===t?void 0:t[0];if(!n)return;let s=n.type;if("application/pdf"!==s&&"application/msword"!==s&&"application/vnd.openxmlformats-officedocument.wordprocessingml.document"!==s){c("Please upload a PDF or Word document");return}if(n.size>10485760){c("File is too large (max 10MB)");return}m(n),c(""),o(!0);try{let e=n.name.replace(/\.(pdf|docx|doc)$/,"");x(e);let t=await j(n);u(t),o(!1),b(!0)}catch(e){console.error("Error processing file:",e),c("Error processing file. Please try again."),o(!1)}},C=async e=>{if(e.preventDefault(),e.stopPropagation(),e.dataTransfer.files&&e.dataTransfer.files.length>0){let t=e.dataTransfer.files[0],n=t.type;if("application/pdf"!==n&&"application/msword"!==n&&"application/vnd.openxmlformats-officedocument.wordprocessingml.document"!==n){c("Please upload a PDF or Word document");return}if(t.size>10485760){c("File is too large (max 10MB)");return}m(t),c(""),o(!0);try{let e=t.name.replace(/\.(pdf|docx|doc)$/,"");x(e);let n=await j(t);u(n),o(!1),b(!0)}catch(e){console.error("Error processing file:",e),c("Error processing file. Please try again."),o(!1)}}};return(0,s.jsx)(y.Dialog,{open:t,onOpenChange:n,children:(0,s.jsxs)(y.DialogContent,{className:"sm:max-w-[550
1px]",children:[(0,s.jsxs)(y.DialogHeader,{children:[(0,s.jsxs)(y.DialogTitle,{className:"flex items-center gap-2",children:[(0,s.jsx)(T.Z,{className:"h-5 w-5 text-purple-600"}),"Import Document"]}),(0,s.jsx)(y.DialogDescription,{children:f?"Review the extracted content before inserting":"Upload a sermon document to automatically extract its content"})]}),f?(0,s.jsxs)("div",{className:"grid gap-4",children:[(0,s.jsxs)("div",{className:"border rounded-md p-4",children:[(0,s.jsx)("h3",{className:"font-medium mb-2",children:"Document Preview"}),(0,s.jsx)("div",{className:"max-h-[300px] overflow-y-auto border p-4 rounded bg-slate-50",children:(0,s.jsx)("div",{dangerouslySetInnerHTML:{__html:p}})})]}),(0,s.jsxs)(y.DialogFooter,{className:"flex justify-end gap-2 pt-2",children:[(0,s.jsx)(h.z,{variant:"outline",onClick:()=>{b(!1),m(null)},children:"Cancel"}),(0,s.jsx)(h.z,{onClick:()=>{a(p,g),n(!1)},className:"bg-purple-600 hover:bg-purple-700",children:"Insert Content"})]})]}):(0,s.jsxs)("div",{className:"grid gap-4",children:[(0,s.jsxs)("div",{className:"border-2 border-dashed rounded-lg p-8 text-center cursor-pointer hover:bg-slate-50 transition-colors",onClick:()=>{v.current&&v.current.click()},onDrop:C,onDragOver:e=>{e.preventDefault(),e.stopPropagation(),e.currentTarget.classList.add("border-purple-400","bg-purple-50")},onDragLeave:e=>{e.preventDefault(),e.stopPropagation(),e.currentTarget.classList.remove("border-purple-400","bg-purple-50")},children:[(0,s.jsx)("input",{type:"file",ref:v,className:"hidden",accept:".pdf,.doc,.docx",onChange:N}),(0,s.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[d?(0,s.jsx)(z.Z,{className:"h-10 w-10 text-indigo-600"}):(0,s.jsx)(T.Z,{className:"h-10 w-10 text-indigo-600"}),(0,s.jsx)("div",{className:"mt-2",children:r?(0,s.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,s.jsx)(P.Z,{className:"h-5 w-5 animate-spin text-indigo-600"}),(0,s.jsx)("p",{className:"text-sm font-medium",children:"Processing document..."})]}):d?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:d.name}),(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:[(d.size/1024).toFixed(2)," KB"]})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Click to upload or drag and drop"}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"PDF or Word document (max 10MB)"})]})})]})]}),l&&(0,s.jsx)(et.bZ,{variant:"destructive",children:(0,s.jsx)(et.X,{children:l})}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Bible references will be automatically detected and made interactive."})]})]})})},ex=e=>{let{editor:t,onImprove:n}=e,[a,r]=(0,i.useState)(!1),[o,l]=(0,i.useState)({x:0,y:0});return((0,i.useEffect)(()=>{let e=()=>{let e=window.getSelection();if(e&&e.toString().trim().length>0&&t.isActive()){let t=e.getRangeAt(0).getBoundingClientRect();l({x:t.left+t.width/2,y:t.top-10}),r(!0)}else r(!1)};return document.addEventListener("selectionchange",e),document.addEventListener("mouseup",e),()=>{document.removeEventListener("selectionchange",e),document.removeEventListener("mouseup",e)}},[t]),a)?(0,s.jsx)("div",{className:"ai-improve-menu fixed z-50",style:{left:"".concat(o.x,"px"),top:"".concat(o.y,"px"),transform:"translate(-50%, -100%)"},children:(0,s.jsx)("div",{className:"bg-white rounded-md shadow-md border border-purple-200 p-1 flex items-center",children:(0,s.jsxs)("button",{className:"flex items-center gap-1 text-xs px-2 py-1 text-purple-700 hover:bg-purple-50 rounded",onClick:()=>{let e=window.getSelection();e&&e.toString().trim().length>0&&(n(e.toString()),r(!1))},children:[(0,s.jsx)(A.Z,{className:"w-3 h-3"}),(0,s.jsx)("span",{children:"Improve with AI"})]})})}):null},ef=e=>{let{open:t,onOpenChange:n,onSuggestionAccept:a,initialPrompt:r="",initialMode:o="improve"}=e,[l,c]=(0,i.useState)(r),[d,m]=(0,i.useState)(""),[p,u]=(0,i.useState)(!1),[g,x]=(0,i.useState)(o);(0,i.useEffect)(()=>{c(r),x(o),m("")},[r,o,t]);let f=async()=>{l.trim()&&(u(!0),setTimeout(()=>{m("improve"===g?l.toLowerCase().includes("be kind")?'"Love one another deeply with genuine affection. Take delight in honoring each other." (Romans 12:10)\n\nChrist calls us not merely to kindness, but to a sacrificial love that places others\' needs above our own.':l.toLowerCase().includes("faith")?"\"Faith is the assurance of things hoped for, the conviction of things not seen.\" (Hebrews 11:1)\n\nFaith isn't blind belief, but confident trust grounded in God's unchanging character and promises.":l+"\n\nConsider expanding this point with scripture from Matthew 7:12, where Jesus teaches us to treat others as we wish to be treated. This foundational principle transforms how we view our relationships and responsibilities to one another.":'## Sermon Outline: "'.concat(l,'"\n\n')+"### Introduction\n"+"- Open with a compelling personal story about ".concat(l,"\n")+"- Share why this topic matters in our daily Christian walk\n\n### Scripture Foundation\n- Primary text: John 15:12-17 - Love one another\n- Supporting text: 1 Corinthians 13:4-7 - Attributes of love\n\n### Main Points\n"+"1. Understanding ".concat(l," through a biblical lens\n")+"2. Common misconceptions about ".concat(l,"\n")+"3. Practical steps to apply ".concat(l," in our daily lives\n\n")+"### Application\n"+"- Three specific ways to live out ".concat(l," this week\n")+"- How ".concat(l," transforms our relationships\n\n")+"### Conclusion\n"+"- Call to action: Commit to one specific practice related to ".concat(l,"\n")+"- Closing prayer focusing on grace to live out this teaching"),u(!1)},1500))};return(0,s.jsx)(y.Dialog,{open:t,onOpenChange:n,children:(0,s.jsxs)(y.DialogContent,{className:"sm:max-w-[625px]",children:[(0,s.jsxs)(y.DialogHeader,{children:[(0,s.jsxs)(y.DialogTitle,{className:"flex items-center gap-2",children:[(0,s.jsx)(A.Z,{className:"h-5 w-5 text-purple-600"}),"improve"===g?"AI Text Improvement":"AI Sermon Content Generator"]}),(0,s.jsx)(y.DialogDescription,{children:"improve"===g?"Let AI help improve your selected text with scriptural insights":"Generate sermon content ideas based on a topic"})]}),(0,s.jsxs)("div",{className:"grid gap-4",children:[(0,s.jsxs)("div",{className:"flex gap-4",children:[(0,s.jsxs)(h.z,{variant:"improve"===g?"default":"outline",size:"sm",onClick:()=>x("improve"),className:"improve"===g?"bg-purple-600 hover:bg-purple-700":"",children:[(0,s.jsx)(L.Z,{className:"mr-2 h-4 w-4"}),"Improve Text"]}),(0,s.jsxs)(h.z,{variant:"generate"===g?"default":"outline",size:"sm",onClick:()=>x("generate"),className:"generate"===g?"bg-purple-600 hover:bg-purple-700":"",children:[(0,s.jsx)(E.Z,{className:"mr-2 h-4 w-4"}),"Generate Content"]})]}),(0,s.jsxs)("div",{className:"grid gap-2",children:[(0,s.jsx)(S._,{htmlFor:"prompt",children:"improve"===g?"Text to improve":"Sermon topic"}
1),(0,s.jsx)(N.g,{id:"prompt",value:l,onChange:e=>c(e.target.value),placeholder:"improve"===g?"Enter text you want to improve...":"Enter a sermon topic or theme...",className:"min-h-[100px]"})]}),d&&(0,s.jsxs)("div",{className:"grid gap-2 mt-2",children:[(0,s.jsx)(S._,{children:"AI Suggestion"}),(0,s.jsx)("div",{className:"border rounded-md p-4 bg-slate-50 whitespace-pre-wrap max-h-[300px] overflow-y-auto",children:d})]})]}),(0,s.jsx)(y.DialogFooter,{className:"gap-2 sm:gap-0",children:d?(0,s.jsx)(h.z,{onClick:()=>{d&&(a(d),n(!1))},className:"w-full sm:w-auto bg-purple-600 hover:bg-purple-700",children:"Insert into Sermon Notes"}):(0,s.jsx)(h.z,{onClick:f,disabled:p||!l.trim(),className:"w-full sm:w-auto bg-purple-600 hover:bg-purple-700",children:p?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(P.Z,{className:"mr-2 h-4 w-4 animate-spin"}),"Generating..."]}):"Generate"})})]})})};var eb=e=>{let{value:t,onChange:n,placeholder:a="",dynamicTags:g=[],onImageUpload:x,editorRef:f,enableBibleVerses:b=!1,enableAiAssistant:y=!1,enableDocumentImport:N=!1,enableFillableFields:C=!1,autoFocus:S=!1,enableCommsComposeAssistant:D=!1,emailSubject:z}=e,[P,Y]=(0,i.useState)(!1),[$,K]=(0,i.useState)(!1),[Q,et]=(0,i.useState)(!1),[ei,el]=(0,i.useState)(!1),[eb,ev]=(0,i.useState)(""),[ew,ej]=(0,i.useState)("improve"),[ey,eN]=(0,i.useState)(!1),[eC,ek]=(0,i.useState)(!1),[eS,eD]=(0,i.useState)(null),{user:eT}=(0,en.CG)(e=>e.user),ez=(0,o.jE)({extensions:(()=>{let e=[l.Z.configure({heading:{levels:[2,3]},bulletList:{},orderedList:{}}),u.Z,p.I,V.Z,X.Z.configure({types:["heading","paragraph"]}),c.ZP.configure({openOnClick:!1,HTMLAttributes:{class:"text-primary underline"}}),d.ZP.configure({HTMLAttributes:{class:"rounded-md max-w-full"}}),m.Z.configure({placeholder:a})];return b&&e.push(ee),e})(),content:t,onUpdate:e=>{let{editor:t}=e;n(t.getHTML())},enablePasteRules:!0,editorProps:{attributes:{class:"prose prose-sm max-w-none min-h-[min(360px,52vh)] cursor-text px-4 py-4 pb-16 outline-none"},transformPastedHTML(e){if(!(0,ea.C)(eT)){let t=document.createElement("div");t.innerHTML=e;let n=t.querySelectorAll("a[href]"),s=!1,a=null;if(n.forEach(e=>{let t=e.getAttribute("href");if(t&&(0,es.T)(t)){var n;s=!0,a=(0,es.S)(t);let r=e.textContent||"",i=document.createTextNode(r);null===(n=e.parentNode)||void 0===n||n.replaceChild(i,e)}}),s)return setTimeout(()=>{eD(a),ek(!0)},100),t.innerHTML}return e}}});(0,i.useEffect)(()=>{S&&ez&&ez.commands.focus("end")},[S,ez]),(0,i.useEffect)(()=>{f&&ez&&(f.current=ez)},[ez,f]),(0,i.useEffect)(()=>{if(ez){let e=ez.getHTML();"string"==typeof t&&e!==t&&ez.commands.setContent(t,!1,{preserveWhitespace:!0})}},[t,ez]);let eP=e=>{ez&&ez.chain().focus().insertContent(e).run()},eA=(0,i.useCallback)(async()=>{if(!x)return;let e=document.createElement("input");e.type="file",e.accept="image/*",e.onchange=async()=>{var t;let n=null===(t=e.files)||void 0===t?void 0:t[0];if(n)try{let e=await x(n);null==ez||ez.chain().focus().setImage({src:e}).run()}catch(e){console.error("Failed to upload image:",e)}},e.click()},[ez,x]),eL=(0,i.useCallback)(()=>{let e=window.prompt("Enter URL");if(e){let t=e.trim();if(t.startsWith("http://")?t=t.replace("http://","https://"):t.startsWith("https://")||t.startsWith("mailto:")||t.startsWith("/")||(t="https://".concat(t)),(0,es.T)(t)&&!(0,ea.C)(eT)){eD((0,es.S)(t)),ek(!0);return}null==ez||ez.chain().focus().setLink({href:t}).run()}},[ez,eT]),eE=(0,i.useCallback)(e=>{ez&&e&&ez.chain().focus().setMark("span",{style:e}).run()},[ez]),eF=(0,i.useCallback)(e=>{ez&&e&&ez.commands.setContent(e)},[ez]),eM=(0,i.useCallback)(()=>{et(!0)},[]),eI=(0,i.useCallback)(e=>{if(ez){let t="[".concat(e.placeholder,"|width:").concat(e.width,"|lines:").concat(e.lines,"]");ez.chain().focus().insertContent({type:"text",marks:[{type:"textStyle",attrs:{color:"#9333ea"}},{type:"bold"}],text:t}).run()}},[ez]),eH=e=>{ec({actionPrompt:e,bodyHtml:(null==ez?void 0:ez.getHTML())||t||"",subject:z})};return ez?(0,s.jsxs)(w.pn,{children:[(0,s.jsxs)("div",{className:"jsx-3f34071457a5af6e rich-text-editor-root flex w-full min-h-[min(400px,56vh)] flex-col rounded-md border bg-background",children:[(y||N||C)&&(0,s.jsxs)("div",{className:"jsx-3f34071457a5af6e p-2 flex justify-end items-center gap-2 border-b bg-slate-50",children:[C&&
1(0,s.jsxs)("div",{className:"jsx-3f34071457a5af6e bg-purple-50 rounded flex items-center border border-purple-200",children:[(0,s.jsx)(h.z,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-purple-100",onClick:eM,children:(0,s.jsx)(F.Z,{className:"h-4 w-4 text-purple-600"})}),(0,s.jsx)("span",{onClick:eM,className:"jsx-3f34071457a5af6e pr-2 text-xs font-medium text-purple-700 cursor-pointer",children:"Add Fillable Field"})]}),N&&(0,s.jsxs)(h.z,{variant:"outline",size:"sm",className:"gap-1",onClick:()=>eN(!0),children:[(0,s.jsx)(T.Z,{className:"h-4 w-4 text-purple-600"}),"Import Document"]}),y&&(0,s.jsxs)(j.h_,{children:[(0,s.jsx)(j.$F,{asChild:!0,children:(0,s.jsxs)(h.z,{variant:"outline",size:"sm",className:"gap-1",children:[(0,s.jsx)(A.Z,{className:"h-4 w-4 text-purple-600"}),"AI Assist",(0,s.jsx)(M.Z,{className:"h-3 w-3"})]})}),(0,s.jsxs)(j.AW,{align:"end",className:ed.ru,children:[(0,s.jsx)(j.Ju,{children:"AI Assistance"}),(0,s.jsxs)(j.Qk,{children:[(0,s.jsxs)(j.Xi,{onClick:()=>{ej("generate"),ev(""),el(!0)},children:[(0,s.jsx)(E.Z,{className:"mr-2 h-4 w-4"}),"Generate Sermon Content"]}),(0,s.jsxs)(j.Xi,{onClick:()=>{if(ez&&ez.view&&ez.state.selection){let{from:e,to:t}=ez.state.selection,n=ez.state.doc.textBetween(e,t);n?ev(n):ev(""),ej("improve"),el(!0)}},children:[(0,s.jsx)(L.Z,{className:"mr-2 h-4 w-4"}),"Improve Selected Text"]})]})]})]})]}),(0,s.jsxs)("div",{onClick:e=>e.stopPropagation(),className:"jsx-3f34071457a5af6e flex flex-wrap items-center gap-2 p-2 border-b bg-slate-50",children:[(0,s.jsx)(k.I,{type:"color",className:"w-8 h-8 p-0.5 bg-transparent border-0 cursor-pointer rounded",onMouseDown:em,onChange:e=>{null==ez||ez.chain().focus().setColor(e.target.value).run()}}),(0,s.jsx)(h.z,{variant:"ghost",size:"sm","aria-label":"Heading 2",className:"h-8 w-8 p-0 ".concat(ez.isActive("heading",{level:2})?"bg-purple-200 text-purple-800":"bg-white"),onMouseDown:em,onClick:()=>ez.chain().focus().toggleHeading({level:2}).run(),children:(0,s.jsxs)("span",{className:"jsx-3f34071457a5af6e font-bold text-sm",children:["H",(0,s.jsx)("sub",{className:"jsx-3f34071457a5af6e",children:"2"})]})}),(0,s.jsx)(h.z,{variant:"ghost",size:"sm","aria-label":"Heading 3",className:"h-8 w-8 p-0 ".concat(ez.isActive("heading",{level:3})?"bg-purple-200 text-purple-800":"bg-white"),onMouseDown:em,onClick:()=>ez.chain().focus().toggleHeading({level:3}).run(),children:(0,s.jsxs)("span",{className:"jsx-3f34071457a5af6e font-bold text-sm",children:["H",(0,s.jsx)("sub",{className:"jsx-3f34071457a5af6e",children:"3"})]})}),(0,s.jsx)("div",{className:"jsx-3f34071457a5af6e w-px h-6 bg-slate-200"}),(0,s.jsx)(v,{size:"sm",pressed:ez.isActive("bold"),"aria-label":"Bold",onMouseDown:em,onPressedChange:()=>ez.chain().focus().toggleBold().run(),className:"bg-white data-[state=on]:bg-slate-200",children:(0,s.jsx)(I.Z,{className:"h-4 w-4"})}),(0,s.jsx)(v,{size:"sm",pressed:ez.isActive("italic"),"aria-label":"Italic",onMouseDown:em,onPressedChange:()=>ez.chain().focus().toggleItalic().run(),className:"bg-white data-[state=on]:bg-slate-200",children:(0,s.jsx)(H.Z,{className:"h-4 w-4"})}),(0,s.jsx)(v,{size:"sm",pressed:ez.isActive("underline"),"aria-label":"Underline",onMouseDown:em,onPressedChange:()=>ez.chain().focus().toggleUnderline().run(),className:"bg-white data-[state=on]:bg-slate-200",children:(0,s.jsx)(Z.Z,{className:"h-4 w-4"})}),(0,s.jsx)("div",{className:"jsx-3f34071457a5af6e w-px h-6 bg-slate-200"}),(0,s.jsx)(h.z,{variant:"ghost",size:"sm","aria-label":"Bullet list",className:"h-8 w-8 p-0 ".concat(ez.isActive("bulletList")?"bg-purple-200 text-purple-800":"bg-white"),onMouseDown:em,onClick:()=>ez.chain().focus().toggleBulletList().run(),children:(0,s.jsx)(O.Z,{className:"h-4 w-4"})}),(0,s.jsx)(h.z,{variant:"ghost",size:"sm","aria-label":"Numbered list",className:"h-8 w-8 p-0 ".concat(ez.isActive("orderedList")?"bg-purple-200 text-purple-800":"bg-white"),onMouseDown:em,onClick:()=>ez.chain().focus().toggleOrderedList().run(),children:(0,s.jsx)(_.Z,{className:"h-4 w-4"})}),(0,s.jsx)("div",{className:"jsx-3f34071457a5af6e w-px h-6 bg-slate-200"}),(0,s.jsx)(v,{size:"sm",pressed:ez.isActive({textAlign:"left"}
1),"aria-label":"Align left",onMouseDown:em,onPressedChange:()=>ez.chain().focus().setTextAlign("left").run(),className:"bg-white data-[state=on]:bg-slate-200",children:(0,s.jsx)(R.Z,{className:"h-4 w-4"})}),(0,s.jsx)(v,{size:"sm",pressed:ez.isActive({textAlign:"center"}),"aria-label":"Align center",onMouseDown:em,onPressedChange:()=>ez.chain().focus().setTextAlign("center").run(),className:"bg-white data-[state=on]:bg-slate-200",children:(0,s.jsx)(G.Z,{className:"h-4 w-4"})}),(0,s.jsx)(v,{size:"sm",pressed:ez.isActive({textAlign:"right"}),"aria-label":"Align right",onMouseDown:em,onPressedChange:()=>ez.chain().focus().setTextAlign("right").run(),className:"bg-white data-[state=on]:bg-slate-200",children:(0,s.jsx)(W.Z,{className:"h-4 w-4"})}),(0,s.jsx)("div",{className:"jsx-3f34071457a5af6e w-px h-6 bg-slate-200"}),(0,s.jsx)(h.z,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 bg-white","aria-label":"Add link",onMouseDown:em,onClick:eL,children:(0,s.jsx)(J.Z,{className:"h-4 w-4"})}),(0,s.jsx)(h.z,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 bg-white","aria-label":"Add custom HTML/CSS","data-testid":"compose-html-css-button",onMouseDown:em,onClick:e=>{e.preventDefault(),e.stopPropagation(),K(!0)},children:(0,s.jsx)(B.Z,{className:"h-4 w-4"})}),x&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"jsx-3f34071457a5af6e w-px h-6 bg-slate-200"}),(0,s.jsx)(h.z,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 bg-white","aria-label":"Add image",onMouseDown:em,onClick:e=>{e.preventDefault(),e.stopPropagation(),eA()},children:(0,s.jsx)(U.Z,{className:"h-4 w-4"})})]}),g.length>0&&(0,s.jsxs)(j.h_,{children:[(0,s.jsx)(j.$F,{asChild:!0,children:(0,s.jsxs)(h.z,{variant:"ghost",size:"sm",className:"h-8 p-0 px-2 bg-white flex items-center gap-1",children:[(0,s.jsx)(q.Z,{className:"h-4 w-4"}),(0,s.jsx)("span",{className:"jsx-3f34071457a5af6e text-xs",children:"Insert Tag"})]})}),(0,s.jsxs)(j.AW,{className:"w-56 ".concat(ed.ru),children:[(0,s.jsx)(j.Ju,{children:"Dynamic Tags"}),(0,s.jsx)(j.VD,{}),(0,s.jsx)(j.Qk,{children:g.map(e=>(0,s.jsx)(j.Xi,{onClick:()=>eP(e.value),children:e.name},e.value))})]})]}),(0,s.jsx)("div",{className:"jsx-3f34071457a5af6e ml-auto"})]}),D?(0,s.jsxs)("div",{className:"jsx-3f34071457a5af6e border-b border-gray-100 bg-gray-50 px-3 py-2.5",children:[(0,s.jsx)("p",{className:"jsx-3f34071457a5af6e mb-1.5 text-[10px] font-medium text-gray-400",children:"Ask the assistant to:"}),(0,s.jsx)("div",{className:"jsx-3f34071457a5af6e flex flex-wrap gap-1.5",children:eo.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>eH(e.prompt),"aria-label":"Ask assistant to ".concat(e.label.toLowerCase()),className:"jsx-3f34071457a5af6e inline-flex items-center gap-1 rounded-full border border-gray-200 bg-white px-2.5 py-1 text-[11px] font-medium text-gray-600 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:text-gray-900",children:[(0,s.jsx)(A.Z,{className:"h-2.5 w-2.5 text-gray-400","aria-hidden":"true"}),e.label]},e.id))})]}):null,(0,s.jsx)("div",{className:"jsx-3f34071457a5af6e flex min-h-0 flex-1 flex-col overflow-y-auto",children:(0,s.jsx)(o.kg,{editor:ez,onClick:e=>e.stopPropagation(),className:"flex-1 text-base leading-relaxed [&_.ProseMirror]:min-h-[min(360px,52vh)] [&_.ProseMirror]:cursor-text"})})]}),(0,s.jsx)(ep,{open:$,onOpenChange:K,onApply:eF,editor:ez,dynamicTags:g}),(0,s.jsx)(eu,{open:P,onOpenChange:Y,onApply:eE}),(0,s.jsx)(eh,{open:Q,onOpenChange:et,onApply:eI}),y&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ex,{editor:ez,onImprove:e=>{ev(e),ej("improve"),el(!0)}}),(0,s.jsx)(ef,{open:ei,onOpenChange:el,onSuggestionAccept:e=>{if(ez){if("improve"===ew){let{state:t}=ez,{selection:n}=t;n&&!n.empty&&(ez.chain().focus().deleteSelection().run(),ez.chain().focus().insertContent(e).run(),ez.commands.focus())}else ez.chain().focus().insertContent(e).run()}},initialPrompt:eb,initialMode:ew})]}),(0,s.jsx)(eg,{open:ey,onOpenChange:eN,onDocumentImport:(e,t)=>{ez&&(ez.chain().focus().insertContent(e).run(),window&&window.setSermonTitle&&window.setSermonTitle(t))}}),(0,s.jsx)(r(),{id:"3f34071457a5af6e",children:'.rich-text-editor-root .ProseMirror{min-height:min(360px,52vh);
1cursor:text}.bible-reference{color:#4f46e5;text-decoration:underline;cursor:pointer;-webkit-transition:background-color.2s;-moz-transition:background-color.2s;-o-transition:background-color.2s;transition:background-color.2s}.bible-reference:hover{background-color:rgba(79,70,229,.1)}.fillable-field{display:inline;position:relative}.fillable-field::after{content:"";position:absolute;left:0;right:0;bottom:-2px;height:2px;background-color:#9333ea}.fillable-field-container{display:-webkit-inline-box!important;display:-webkit-inline-flex!important;display:-moz-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important;-webkit-box-align:center!important;-webkit-align-items:center!important;-moz-box-align:center!important;-ms-flex-align:center!important;align-items:center!important;background-color:#f5f3ff!important;border:1px solid#e9d5ff!important;-webkit-border-radius:.25rem!important;-moz-border-radius:.25rem!important;border-radius:.25rem!important;padding:.25rem .5rem!important;margin:.25rem!important;-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important;cursor:default!important}.prose .fillable-field-container{display:-webkit-inline-box!important;display:-webkit-inline-flex!important;display:-moz-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important;margin:0 .25rem!important;font-size:.875rem!important;line-height:1.25rem!important;font-weight:normal!important;text-decoration:none!important;font-style:normal!important}.fillable-input{width:100%;border:none;border-bottom:2px solid#8b5cf6;background-color:rgba(139,92,246,.05);padding:4px 8px;font-size:inherit;font-family:inherit;line-height:inherit;color:inherit;outline:none;-webkit-transition:border-color.2s,background-color.2s;-moz-transition:border-color.2s,background-color.2s;-o-transition:border-color.2s,background-color.2s;transition:border-color.2s,background-color.2s}.fillable-textarea{width:100%;border:2px solid#8b5cf6;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;background-color:rgba(139,92,246,.05);padding:8px;font-size:inherit;font-family:inherit;line-height:inherit;color:inherit;outline:none;resize:vertical;-webkit-transition:border-color.2s,background-color.2s;-moz-transition:border-color.2s,background-color.2s;-o-transition:border-color.2s,background-color.2s;transition:border-color.2s,background-color.2s}.fillable-input:focus,.fillable-input:hover,.fillable-textarea:focus,.fillable-textarea:hover{border-color:#6d28d9;background-color:rgba(139,92,246,.1)}.w-32{width:8rem}.w-48{width:12rem}.w-64{width:16rem}.w-full{width:100%}'}),(0,s.jsx)(er._,{open:eC,onOpenChange:ek,platformName:eS})]}):null}},7036:function(e,t,n){n.d(t,{HL:function(){return s},Vp:function(){return a},ru:function(){return r}});let s="z-[13050]",a="z-[13060]",r="z-[13100]"},6886:function(e,t,n){n.d(t,{S:function(){return i},T:function(){return r}});let s=["pushpay.com","secure.pushpay.com","pushpay.com/pay","pushpay.com/g","tithe.ly","give.tithe.ly","tithelygiving.com","elvanto.com","tithelychurchgiving.com","subsplashgiving.com","subspla.sh","secure.subsplash.com","onrealm.org","shelbynextchms.com","app.ministryone.com","elexiogiving.com","engage.suran.com","churchcenter.com","churchcenter.com/giving","securegive.com","app.securegive.com","easytithe.com","easytitheplus.com","givelify.com","giv.li","rebelgive.com","give.church","faithlife.com/giving","faithlife.com","eservicepayments.com","vanconews.com","vancopayments.com","givewp.com","buy.stripe.com","donate.stripe.com","checkout.stripe.com","squareup.com/pay","square.link","checkout.square.site","square.site","paypal.com/donate","paypal.me","www.paypal.com/webapps/hermes","donorbox.org","fundraiseup.com","cdn.fundraiseup.com","classy.org","secure.classy.org","nfg.com","networkforgood.com","donatenow.networkforgood.org","bloomerang.co","secure.bloomerang.co","givebutter.com","qgiv.com","secure.qgiv.com","charity.gofundme.com","secure.everyaction.com","act.everyaction.com","engagingnetworks.app","canadahelps.org","justgiving.com","mightycause.com","neoncrm.com","secure.neoncrm.com","secure2.convio.net","blackbaud.com","donate.blackbaud.com","neonone.com","secure.neonone.com","donately.com","donate.donately.com","idonate.com","engage.
1idonate.com","raisedonors.com","secure.raisedonors.com","zeffy.com","secure.zeffy.com","funraise.org","give.funraise.org","secure.givelively.org","gofundme.com","kickstarter.com","indiegogo.com","facebook.com/donate","youtube.com/fundraiser","checkout.authorize.net","braintreepayments.com","affinipay.com"],a=e=>{try{let t=e;return e.startsWith("http://")||e.startsWith("https://")||(t="https://".concat(e)),new URL(t).hostname.toLowerCase()}catch(n){let t=e.toLowerCase().match(/(?:https?:\/\/)?(?:www\.)?([^\/\s]+)/);return t?t[1]:e.toLowerCase()}},r=e=>{if(!e||"string"!=typeof e)return!1;let t=e.toLowerCase().trim(),n=a(t);for(let e of s){let s=e.toLowerCase();if(n===s||n==="www.".concat(s)||n.endsWith(".".concat(s))||t.includes(s))return!0}return!1},i=e=>{if(!r(e))return null;let t=a(e).toLowerCase();for(let[e,n]of Object.entries({pushpay:"Pushpay","tithe.ly":"Tithely",tithely:"Tithely",subsplash:"Subsplash Giving",onrealm:"Realm Giving",churchcenter:"Planning Center",securegive:"SecureGive",easytithe:"EasyTithe",givelify:"Givelify",rebelgive:"RebelGive","stripe.com":"Stripe",square:"Square",paypal:"PayPal",donorbox:"Donorbox",classy:"Classy",gofundme:"GoFundMe","facebook.com/donate":"Facebook Fundraisers"}))if(t.includes(e))return n;return"External Giving Platform"}}}]);
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.