PageSourceSearch

https://www.llmplace.ai/_next/static/immutable/chunks/1wf9k3az6ni8i.js

js llmplace.ai collected 2026-10-05 14:29:05 UTC 4,492 bytes, 4 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="93caa611-3522-e6c7-d40b-49ce5f4f2160")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,786355,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(522016),r=e.i(705766);let l={promotional:"Promotional",newsletter:"Newsletter",announcement:"Announcement","re-engagement":"Re-engagement"};e.s(["default",0,function(){let[e,i]=(0,s.useState)([]),[n,d]=(0,s.useState)(!0),[c,o]=(0,s.useState)(null);(0,s.useEffect)(()=>{m()},[]);let m=async()=>{try{d(!0),o(null);let e=await fetch("/api/admin/marketing/templates"),t=await e.json();if(!e.ok)throw Error(t.error||"Failed to fetch templates");i(t.data?.templates||[])}catch(e){o(e instanceof Error?e.message:"An error occurred")}finally{d(!1)}},x=async(e,t)=>{if(confirm(`Are you sure you want to delete template "${t}"?`))try{let t=await fetch(`/api/admin/marketing/templates/${e}`,{method:"DELETE"});if(!t.ok){let e=await t.json();throw Error(e.error||"Failed to delete template")}r.toast.success("Template deleted"),m()}catch(e){r.toast.error(e instanceof Error?e.message:"Failed to delete template")}},g={promotional:"bg-purple-100 text-purple-800",newsletter:"bg-blue-100 text-blue-800",announcement:"bg-orange-100 text-orange-800","re-engagement":"bg-green-100 text-green-800"};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Email Templates"}),(0,t.jsx)(a.default,{href:"/admin/marketing/templates/new",className:"px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 transition-colors",children:"Create Template"})]}),c&&(0,t.jsxs)("div",{className:"bg-red-50 text-red-600 p-4 rounded-xl",children:["Error: ",c]}),n&&(0,t.jsx)("div",{className:"text-center py-12 text-gray-500",children:"Loading templates..."}),!n&&e.length>0&&(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:e.map(e=>(0,t.jsx)("div",{className:"bg-white rounded-xl shadow-md border border-gray-100 overflow-hidden",children:(0,t.jsxs)("div",{className:"p-6",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"font-semibold text-gray-900",children:e.name}),(0,t.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e.description||e.subject})]}),(0,t.jsx)("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${g[e.category]||"bg-gray-100 text-gray-800"}`,children:l[e.category]||e.category})]}),(0,t.jsxs)("div",{className:"text-sm text-gray-500 mb-4",children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:"Subject:"})," ",e.subject]}),(0,t.jsxs)("p",{className:"mt-1",children:[(0,t.jsx)("strong",{children:"Created:"})," ",new Date(e.createdAt).toLocaleDateString()]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-4 border-t border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:`w-2 h-2 rounded-full ${e.isActive?"bg-green-500":"bg-gray-400"}`}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:e.isActive?"Active":"Inactive"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(a.default,{href:`/admin/marketing/templates/${e.id}`,className:"text-indigo-600 hover:text-indigo-900 text-sm",children:"Edit"}),(0,t.jsx)("button",{onClick:()=>x(e.id,e.name),className:"text-red-600 hover:text-red-900 text-sm",children:"Delete"})]})]})]})},e.id))}),!n&&0===e.length&&(0,t.jsxs)("div",{className:"bg-white rounded-xl shadow-md border border-gray-100 p-12 text-center",children:[(0,t.jsx)("div",{className:"text-4xl mb-4",children:"📄"}),(0,t.jsx)("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:"No templates yet"}),(0,t.jsx)("p",{className:"text-gray-500 mb-4",children:"Create your first email template to use in campaigns."}),(0,t.jsx)(a.default,{href:"/admin/marketing/templates/new",className:"inline-block px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 transition-colors",children:"Create Template"})]})]})}])}]);
3
4//# debugId=93caa611-3522-e6c7-d40b-49ce5f4f2160

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.