PageSourceSearch

https://gms.church/_next/static/chunks/pages/cms/churches-services/create-f053e05ceaf0312a.js

js gms.church collected 2026-10-04 14:30:56 UTC 6,024 bytes, 1 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{},s=(new e.Error).stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="289cf92f-8e92-448b-b62a-754b6aa010ca",e._sentryDebugIdIdentifier="sentry-dbid-289cf92f-8e92-448b-b62a-754b6aa010ca")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4835],{9965:(e,s,t)=>{"use strict";t.d(s,{A:()=>c});var r=t(37876),a=t(14232),l=t(23566);function c(e){let{isOpen:s,onClose:t,title:c,message:i}=e;return(0,a.useEffect)(()=>{if(s){let e=setTimeout(()=>{t()},3e3);return()=>clearTimeout(e)}},[s,t]),(0,r.jsx)(l.A,{isOpen:s,onClose:t,title:c,size:"sm",children:(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:(0,r.jsx)("svg",{className:"h-6 w-6 text-green-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),(0,r.jsx)("p",{className:"mb-6 text-sm text-gray-600",children:i})]})})}},23566:(e,s,t)=>{"use strict";t.d(s,{A:()=>l});var r=t(37876),a=t(14232);function l(e){let{isOpen:s,onClose:t,title:l,children:c,size:i="md"}=e;return((0,a.useEffect)(()=>{let e=e=>{"Escape"===e.key&&t()};return s&&(document.addEventListener("keydown",e),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",e),document.body.style.overflow="unset"}},[s,t]),s)?(0,r.jsxs)("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:[(0,r.jsx)("div",{className:"fixed inset-0 bg-black opacity-50 transition-opacity",onClick:t}),(0,r.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,r.jsxs)("div",{className:`relative w-full ${{sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl"}[i]} bg-white rounded-lg shadow-xl`,children:[(0,r.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-gray-200",children:[(0,r.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:l}),(0,r.jsx)("button",{onClick:t,className:"text-gray-400 hover:text-gray-600 transition-colors",children:(0,r.jsx)("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,r.jsx)("div",{className:"p-6",children:c})]})})]}):null}},27786:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>d});var r=t(37876),a=t(14232),l=t(89099),c=t(43965),i=t(9965),n=t(93497);let d=()=>{let e=(0,l.useRouter)(),[s,t]=(0,a.useState)([]),[d,o]=(0,a.useState)([]),[u,h]=(0,a.useState)(!0),[m,x]=(0,a.useState)(null),[f,v]=(0,a.useState)(!1);(0,a.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/locales");if(e.ok){let s=await e.json();s.success&&s.data?t(s.data):s&&t(s)}let s=await fetch("/api/services");if(s.ok){let e=await s.json();e.success&&e.data?o(e.data):e&&o(e)}}catch(e){console.error("Error fetching data:",e),x("Failed to fetch required data")}finally{h(!1)}})()},[]);let j=async e=>{try{h(!0),x(null);let[s,t]=e.time.split(":");e.time=`${s}:${t}:00`;let r=await fetch("/api/churches-services",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await r.json();a.success?v(!0):x(a.message||"Failed to create churches service")}catch(e){console.error("Error creating churches service:",e),x("Failed to create churches service")}finally{h(!1)}},y=()=>{e.push("/cms/churches-services")};return m?(0,r.jsx)(c.A,{children:(0,r.jsx)("div",{className:"p-6",children:(0,r.jsx)("div",{className:"rounded-md border border-red-200 bg-red-50 p-4",children:(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("div",{className:"flex-shrink-0",children:(0,r.jsx)("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,r.jsxs)("div",{className:"ml-3",children:[(0,r.jsx)("h3",{className:"text-sm font-medium text-red-800",children:"Error"}),(0,r.jsx)("div",{className:"mt-2 text-sm text-red-700",children:m}),(0,r.jsx)("div",{className:"mt-4",children:(0,r.jsx)("button",{onClick:()=>x(null),className:"text-sm font-medium text-red-800 hover:text-red-600",children:"Try again"})})]})]})})})}):(0,r.jsxs)(c.A,{children:[(0,r.jsxs)("div",{className:"p-6",children:[(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,r.jsx)("button",{onClick:y,className:"text-gray-500 hover:text-gray-700",children:(0,r.jsx)("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),(0,r.jsx)("h1",{className:"text-2xl font-bold text-gray-900",children:"Create New Churches Service"})]}),(0,r.jsx)("p",{className:"mt-2 text-gray-600",children:"Add a new churches service with multilingual support"})]}),u?(0,r.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"mx-auto h-12 w-12 animate-spin rounded-full border-b-2 border-blue-600"}),(0,r.jsx)("p",{className:"mt-4 text-gray-600",children:"Loading form data..."})]})}):(0,r.jsx)(n.A,{locales:s,services:d,onSubmit:j,onCancel:y,loading:u})]}),(0,r.jsx)(i.A,{isOpen:f,onClose:()=>
1{v(!1),e.push("/cms/churches-services")},title:"Success!",message:"Churches service successfully created"})]})}},40718:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/cms/churches-services/create",function(){return t(27786)}])}},e=>{e.O(0,[8230,7768,3965,3497,636,6593,8792],()=>e(e.s=40718)),_N_E=e.O()}]);

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.