PageSourceSearch

https://seodoon-church-admin.web.app/assets/index-D1K3lVhu.js

js seodoon-church-admin.web.app collected 2026-10-03 12:35:16 UTC 195,937 bytes, 181 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MemberList-ClrP8byN.js","assets/vendor-data-Z5doMMu-.js","assets/vendor-react-zNM0AU50.js","assets/index.esm-NBNS-BUx.js","assets/vendor-ui-CW5bJ11U.js","assets/positions-BjtHy0zm.js","assets/MemberCardModal-DsOGCHII.js","assets/visitService-DcwGr2oo.js","assets/vendor-firebase-Da9KY1q_.js","assets/prayerService-DgtIrt49.js","assets/faithJourneyService-B56_rhGw.js","assets/vendor-charts-08G1rM8P.js","assets/ag-theme-alpine-Co7i_95s.css","assets/MemberForm-Cmv9C13b.js","assets/userService-CE4aI1A4.js","assets/financeConstants-CXKUiVP8.js","assets/storageService-HxVmCucr.js","assets/ProfileEditRequestsPage-B5oJLTsk.js","assets/NewMemberManagementPage-EkqVUAi6.js","assets/SmsSend-BqGNCzOm.js","assets/smsService-D76IH2nH.js","assets/SmsHistory-CYvCwaE9.js","assets/SmsTemplates-yZpVbn8M.js","assets/PastoralDashboard-D0wNGC2t.js","assets/FaithJourneyPage-BxHlfrCv.js","assets/VisitManagementPage-hYs4x-cO.js","assets/PrayerManagementPage-Bxh8GAv2.js","assets/SpiritualMetricsPage-BexQlfNL.js","assets/attendanceService-CvkHMi2v.js","assets/CounselingManagementPage-LfS7N3Y8.js","assets/SpiritualStatsPage-D1YAgbvd.js","assets/StaffReportPage-B8WmUODF.js","assets/staffReportService-CDFbV8rg.js","assets/RichTextEditor-D4OTyKrK.js","assets/RichTextEditor-4RyaA7S0.css","assets/StaffDashboard-Ouctdj0W.js","assets/staff-calendar-Dk9XScWa.js","assets/staffApprovalService-DRZchZHW.js","assets/StaffCalendarPage-8dHlFsnG.js","assets/StaffAnnouncementsPage--08m3d0R.js","assets/imageService-5xt-7IGi.js","assets/FileAttachments-DlLJW4q3.js","assets/staff-communication-CbPIwj0F.js","assets/StaffBoardPage-C1up8oru.js","assets/StaffNotificationsPage-DLMUP1YU.js","assets/StaffApprovalPage-BrPG-nbT.js","assets/SmartBulletinPage-DJNDhfoE.js","assets/bulletinService-CRS1aT1n.js","assets/BannerManagementPage-CvP1MRwD.js","assets/PushManagementPage-DqOccZGR.js","assets/pushService-ggivUk2Y.js","assets/QTManagementPageCombined-BeLZ14zV.js","assets/CouncilBoardPage-Be1KFDcY.js","assets/ResourceLibraryPage-BQ_bDxTC.js","assets/NoticesPage-aH9os4Jq.js","assets/FamilyEventsPage-Bht_qGY6.js","assets/MemberSearchInput-B4_Iy3N2.js","assets/EventManagementPage-ve5oEClk.js","assets/BulletinConverterPage-DUSWzZdm.js","assets/LentRegistrationPage-D16AP_Sm.js","assets/PopupManagementPage-CfxwgIV-.js","assets/CommunityPrayerPage-kGS5t4zj.js","assets/WorshipCommitteePage-BfMqZMi-.js","assets/CultureManagementPage-DsZocwz2.js","assets/FamilyProgramManagementPage-DEPMKGFX.js","assets/AcademyManagementPage-C7_HEjXM.js","assets/SilverUniversityPage-fEaawAGA.js","assets/CouncilDashboard-_8LKlgrd.js","assets/councilService-CCqwDmOg.js","assets/council-CvBHSAtS.js","assets/CouncilMeetingPage-_erKx1k6.js","assets/CouncilVotingPage-Sbe-jGs-.js","assets/CouncilReportsPage-DlB9zIQs.js","assets/CouncilSchedulePage-BmRgeKgz.js","assets/CouncilChatPage-BEsBg1N-.js","assets/CouncilSuggestionsPage-CH_7FO2L.js","assets/LostSheepDashboard-CBB0yJsv.js","assets/MediaAlbumsPage-DZK6YoQr.js","assets/mediaService-BgYWQpy9.js","assets/galleryService-DMdFtlFe.js","assets/AlbumDetailPage-Ct5_QIih.js","assets/GalleryDetailPage-EZAFEqjq.js","assets/GalleryPostsPage-B-z6fcWA.js","assets/ChurchSettingsPage-D4ToOCQl.js","assets/settingsService-BWi-XAI3.js","assets/SystemSettingsPage-2wEXEVnb.js","assets/AppUsersPage-2423sUOS.js","assets/AccessLogsPage-C1K74qgV.js","assets/ErrorReportsPage-CLcwCKS-.js","assets/GuideImagesPage-DyCoj4SN.js","assets/BackupManagementPage-CwVXUyAs.js","assets/SystemHealthPage-BGUVbMrj.js","assets/BulletinView-CytJnx9o.js","assets/html2canvas.esm-CBrSDip1.js","assets/jspdf.es.min-BLt6GQQp.js","assets/AttendanceManagementPage-Cx-jtLCg.js","assets/Toast-DAGgZM11.js","assets/AttendanceDashboard-iXM5ZE3U.js","assets/PageHeader-vb1XdvVj.js","assets/AbsenteeManagement-CTmvyAmF.js","assets/attendanceSettingsService-xB_5Q3M9.js","assets/AttendanceSettingsPage-DKZgZ-A3.js","assets/EducationIframePage-D4x9b3oB.js","assets/HelpPage-C49K473l.js","assets/ElectionManagementPage-BXgQDZNS.js","assets/EducationDashboardPage-BAcdkDcL.js","assets/DepartmentSelectorBar-EFx-1H4v.js","assets/educationService-BxXX95Q0.js","assets/StudentManagementPage-CsW7ycFg.
1js","assets/TeacherManagementPage-DJpFO43L.js","assets/AttendanceManagementPage-DSadnxWI.js","assets/OrganizationPage-oKzgeoXi.js","assets/EducationReportsPage-3SC_Azho.js","assets/VisitationManagementPage-D6bcHfzV.js","assets/FinanceDashboardV2-wwnrWf3C.js","assets/offeringService-Cuo8E004.js","assets/expenseService-DUKgHU3-.js","assets/budgetService-DjQ_xOae.js","assets/financeSettingsService-Gao7wv_9.js","assets/FinanceHome-CQyzgwFy.js","assets/OfferingListPageV2-D4A7aIJ2.js","assets/financeCloseService-C1M9uxKC.js","assets/pdfExportService-CqxdTgGC.js","assets/OfferingFormPage-CiV4YmRm.js","assets/OfferingBulkPage-BV0odrdX.js","assets/MonthClosePage-DsR9sE6C.js","assets/BudgetPlanOverviewPage-CaKf9VYv.js","assets/departmentService-CkVQlARN.js","assets/departmentBudgetService-BkfaTbui.js","assets/DepartmentBudgetPlanPage-C3wv5NuZ.js","assets/OfferingTypeSettingsPage-CDl8_EVK.js","assets/ExpenseCategorySettingsPage-BozhRZwp.js","assets/OnlineOfferingPage-BO4Wim1Z.js","assets/ExpenseListPageV2-oYAP8fER.js","assets/ExpenseFormPage-8TQDuwfn.js","assets/BudgetFormPage-C1OEcio5.js","assets/BudgetRequestListPage-BTjBRlBA.js","assets/budgetRequestService-C_9tMGTu.js","assets/BudgetRequestFormPage-FSnDNg1q.js","assets/BudgetApprovalPage-D8zkb2cy.js","assets/DepartmentFinancePage-C2HBztMc.js","assets/AssetManagementPage-DJT4Xd5P.js","assets/AccountListPage-BnyckRGZ.js","assets/accountService-CnSilcbs.js","assets/JournalListPage-DS1fj_fd.js","assets/FinanceSetupPage-DzfB3jkA.js","assets/MemberSearchInput-CkBMsjbg.js","assets/incomeBudgetService-JIhgONuP.js","assets/FinanceReportPage-CKEHmcHV.js","assets/react-pdf.browser-Ban59td5.js","assets/___vite-browser-external_commonjs-proxy-C1zkvW-1.js","assets/DonationReceiptPage-Bt1QMPW6.js","assets/donationReceiptService-CQSRXCTG.js","assets/DonorStatsPage-BA0i7PIe.js","assets/PledgeManagementPage-OS9MCLdK.js","assets/SettlementPage-sm7bgtC1.js","assets/BankAccountPage-pgkwg4Hs.js","assets/IncomeBudgetPage-DJ_78F4P.js","assets/DepartmentManagePage-CBCPfewl.js","assets/IncomePage-BHK30Mby.js","assets/ExpensePage-BxsxFpSb.js","assets/BudgetPage-DeIX8gY-.js","assets/ReportPage-BFamIDiV.js","assets/SettingsPage-bplmnqMz.js","assets/DepartmentLedgerPage-BrR69I4M.js","assets/departmentLedgerService-DdzWjo6I.js","assets/DepartmentLedgerAuditPage-6BnId6va.js"])))=>i.map(i=>d[i]);
2var Qs=Object.defineProperty;var Ys=(t,s,r)=>s in t?Qs(t,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[s]=r;var Oe=(t,s,r)=>Ys(t,typeof s!="symbol"?s+"":s,r);import{Q as Xs,j as e,a as Zs}from"./vendor-data-Z5doMMu-.js";import{a as It,r as l,N as K,u as it,b as Dt,L as X,O as er,B as tr,d as sr,e as m,R as rr}from"./vendor-react-zNM0AU50.js";import{z as ve,B as _e,C as nr,T as _s,a as lt,X as Qe,M as We,b as Ce,F as Ne,c as pe,U as re,A as wt,d as ar,I as or,S as ir,D as lr,e as ws,R as Ps,H as Ot,L as ct,f as dt,u as cr,g as Te,h as dr,i as Ns,j as Ge,k as ur,l as mr,G as Es,m as Tt,n as hr,o as fr,p as ze,q as gt,r as bt,s as ks,t as Wt,v as xr,w as pr,x as gr,y as br,E as tt,J as Pt,K as yr,N as jr,O as Nt,P as vr,V as Gt,Q as Ht,W as _r,Y as Jt,Z as wr,_ as Pr,$ as Cs,a0 as Nr,a1 as Er,a2 as kr,a3 as Et,a4 as Cr,a5 as Sr,a6 as Ar}from"./vendor-ui-CW5bJ11U.js";import{_ as Rr,C as Lr,r as Qt,g as Ir,a as Dr,b as zt,c as Or,F as Tr,i as zr,d as Mr,e as qr,f as Vr,s as Fr,h as Br,j as xe,k as I,l as B,q as J,w as Q,m as Y,u as $,o as Ss,n as $r,p as Ur,t as kt,v as Mt,x as Ee,y as He,z as Je,T as fe,A as le,B as Kr}from"./vendor-firebase-Da9KY1q_.js";import{c as Wr,R as Ye,B as Gr,C as qt,X as rt,Y as nt,T as ut,L as mt,a as Hr,b as As,d as Rs,A as Jr,e as Qr,P as Yr,f as Xr,g as Zr}from"./vendor-charts-08G1rM8P.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(a){if(a.ep)return;a.ep=!0;const o=r(a);fetch(a.href,o)}})();
2var Ct={},Yt=It;Ct.createRoot=Yt.createRoot,Ct.hydrateRoot=Yt.hydrateRoot;const en="modulepreload",tn=function(t){return"/"+t},Xt={},g=function(s,r,n){let a=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),c=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));a=Promise.allSettled(r.map(u=>{if(u=tn(u),u in Xt)return;Xt[u]=!0;const d=u.endsWith(".css"),x=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${x}`))return;const f=document.createElement("link");if(f.rel=d?"stylesheet":en,d||(f.as="script"),f.crossOrigin="",f.href=u,c&&f.setAttribute("nonce",c),document.head.appendChild(f),d)return new Promise((b,v)=>{f.addEventListener("load",b),f.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(i){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=i,window.dispatchEvent(c),!c.defaultPrevented)throw i}return a.then(i=>{for(const c of i||[])c.status==="rejected"&&o(c.reason);return s().catch(o)})},sn=new Xs({defaultOptions:{queries:{staleTime:5*60*1e3,gcTime:10*60*1e3,retry:1,refetchOnWindowFocus:!1,refetchOnReconnect:!0},mutations:{onError:t=>{console.error("Mutation error:",t);const s=rn(t);ve.error(s)}}}});function rn(t){if(t instanceof Error){const s={"permission-denied":"권한이 없습니다.","not-found":"데이터를 찾을 수 없습니다.","already-exists":"이미 존재하는 데이터입니다.","resource-exhausted":"요청 한도를 초과했습니다.","failed-precondition":"작업을 수행할 수 없는 상태입니다.",aborted:"작업이 중단되었습니다.",unavailable:"서버에 연결할 수 없습니다.",unauthenticated:"로그인이 필요합니다."};for(const[r,n]of Object.entries(s))if(t.message.includes(r))return n;return t.message}return"작업 중 오류가 발생했습니다."}/**
3 * @license
4 * Copyright 2017 Google LLC
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 *   http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */const nn="type.googleapis.com/google.protobuf.Int64Value",an="type.googleapis.com/google.protobuf.UInt64Value";function Ls(t,s){const r={};for(const n in t)t.hasOwnProperty(n)&&(r[n]=s(t[n]));return r}function St(t){if(t==null)return null;if(t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&isFinite(t)||t===!0||t===!1||Object.prototype.toString.call(t)==="[object String]")return t;if(t instanceof Date)return t.toISOString();if(Array.isArray(t))return t.map(s=>St(s));if(typeof t=="function"||typeof t=="object")return Ls(t,s=>St(s));throw new Error("Data cannot be encoded in JSON: "+t)}function at(t){if(t==null)return t;if(t["@type"])switch(t["@type"]){case nn:case an:{const s=Number(t.value);if(isNaN(s))throw new Error("Data cannot be decoded from JSON: "+t);return s}default:throw new Error("Data cannot be decoded from JSON: "+t)}return Array.isArray(t)?t.map(s=>at(s)):typeof t=="function"||typeof t=="object"?Ls(t,s=>at(s)):t}/**
18 * @license
19 * Copyright 2020 Google LLC
20 *
21 * Licensed under the Apache License, Version 2.0 (the "License");
22 * you may not use this file except in compliance with the License.
23 * You may obtain a copy of the License at
24 *
25 *   http://www.apache.org/licenses/LICENSE-2.0
26 *
27 * Unless required by applicable law or agreed to in writing, software
28 * distributed under the License is distributed on an "AS IS" BASIS,
29 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
30 * See the License for the specific language governing permissions and
31 * limitations under the License.
32 */const Vt="functions";/**
33 * @license
34 * Copyright 2017 Google LLC
35 *
36 * Licensed under the Apache License, Version 2.0 (the "License");
37 * you may not use this file except in compliance with the License.
38 * You may obtain a copy of the License at
39 *
40 *   http://www.apache.org/licenses/LICENSE-2.0
41 *
42 * Unless required by applicable law or agreed to in writing, software
43 * distributed under the License is distributed on an "AS IS" BASIS,
44 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
45 * See the License for the specific language governing permissions and
46 * limitations under the License.
47 */const Zt={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class we extends Tr{constructor(s,r,n){super(`${Vt}/${s}`,r||""),this.details=n}}function on(t){if(t>=200&&t<300)return"ok";switch(t){case 0:return"internal";case 400:return"invalid-argument";case 401:return"unauthenticated";case 403:return"permission-denied";case 404:return"not-found";case 409:return"aborted";case 429:return"resource-exhausted";case 499:return"cancelled";case 500:return"internal";case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline-exceeded"}return"unknown"}function ln(t,s){let r=on(t),n=r,a;try{const o=s&&s.error;if(o){const i=o.status;if(typeof i=="string"){if(!Zt[i])return new we("internal","internal");r=Zt[i],n=i}const c=o.message;typeof c=="string"&&(n=c),a=o.details,a!==void 0&&(a=at(a))}}catch{}return r==="ok"?null:new we(r,n,a)}/**
48 * @license
49 * Copyright 2017 Google LLC
50 *
51 * Licensed under the Apache License, Version 2.0 (the "License");
52 * you may not use this file except in compliance with the License.
53 * You may obtain a copy of the License at
54 *
55 *   http://www.apache.org/licenses/LICENSE-2.0
56 *
57 * Unless required by applicable law or agreed to in writing, software
58 * distributed under the License is distributed on an "AS IS" BASIS,
59 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
60 * See the License for the specific language governing permissions and
61 * limitations under the License.
62 */class cn{constructor(s,r,n){this.auth=null,this.messaging=null,this.appCheck=null,this.auth=s.getImmediate({optional:!0}),this.messaging=r.getImmediate({optional:!0}),this.auth||s.get().then(a=>this.auth=a,()=>{}),this.messaging||r.get().then(a=>this.messaging=a,()=>{}),this.appCheck||n.get().then(a=>this.appCheck=a,()=>{})}async getAuthToken(){if(this.auth)try{const s=await this.auth.getToken();return s==null?void 0:s.accessToken}catch{return}}async getMessagingToken(){if(!(!this.messaging||!("Notification"in self)||Notification.permission!=="granted"))try{return await this.messaging.getToken()}catch{return}}async getAppCheckToken(s){if(this.appCheck){const r=s?await this.appCheck.getLimitedUseToken():await this.appCheck.getToken();return r.error?null:r.token}return null}async getContext(s){const r=await this.getAuthToken(),n=await this.getMessagingToken(),a=await this.getAppCheckToken(s);return{authToken:r,messagingToken:n,appCheckToken:a}}}/**
63 * @license
64 * Copyright 2017 Google LLC
65 *
66 * Licensed under the Apache License, Version 2.0 (the "License");
67 * you may not use this file except in compliance with the License.
68 * You may obtain a copy of the License at
69 *
70 *   http://www.apache.org/licenses/LICENSE-2.0
71 *
72 * Unless required by applicable law or agreed to in writing, software
73 * distributed under the License is distributed on an "AS IS" BASIS,
74 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
75 * See the License for the specific language governing permissions and
76 * limitations under the License.
77 */const At="us-central1";function dn(t){let s=null;return{promise:new Promise((r,n)=>{s=setTimeout(()=>{n(new we("deadline-exceeded","deadline-exceeded"))},t)}),cancel:()=>{s&&clearTimeout(s)}}}class un{constructor(s,r,n,a,o=At,i){this.app=s,this.fetchImpl=i,this.emulatorOrigin=null,this.contextProvider=new cn(r,n,a),this.cancelAllRequests=new Promise(c=>{this.deleteService=()=>Promise.resolve(c())});try{const c=new URL(o);this.customDomain=c.origin+(c.pathname==="/"?"":c.pathname),this.region=At}catch{this.customDomain=null,this.region=o}}_delete(){return this.deleteService()}_url(s){const r=this.app.options.projectId;return this.emulatorOrigin!==null?`${this.emulatorOrigin}/${r}/${this.region}/${s}`:this.customDomain!==null?`${this.customDomain}/${s}`:`https://${this.region}-${r}.cloudfunctions.net/${s}`}}function mn(t,s,r){t.emulatorOrigin=`http://${s}:${r}`}function hn(t,s,r){return n=>xn(t,s,n,r||{})}async function fn(t,s,r,n){r["Content-Type"]="application/json";let a;try{a=await n(t,{method:"POST",body:JSON.stringify(s),headers:r})}catch{return{status:0,json:null}}let o=null;try{o=await a.json()}catch{}return{status:a.status,json:o}}function xn(t,s,r,n){const a=t._url(s);return pn(t,a,r,n)}async function pn(t,s,r,n){r=St(r);const a={data:r},o={},i=await t.contextProvider.getContext(n.limitedUseAppCheckTokens);i.authToken&&(o.Authorization="Bearer "+i.authToken),i.messagingToken&&
77(o["Firebase-Instance-ID-Token"]=i.messagingToken),i.appCheckToken!==null&&(o["X-Firebase-AppCheck"]=i.appCheckToken);const c=n.timeout||7e4,u=dn(c),d=await Promise.race([fn(s,a,o,t.fetchImpl),u.promise,t.cancelAllRequests]);if(u.cancel(),!d)throw new we("cancelled","Firebase Functions instance was deleted.");const x=ln(d.status,d.json);if(x)throw x;if(!d.json)throw new we("internal","Response is not valid JSON object.");let f=d.json.data;if(typeof f>"u"&&(f=d.json.result),typeof f>"u")throw new we("internal","Response is missing data field.");return{data:at(f)}}const es="@firebase/functions",ts="0.11.8";/**
78 * @license
79 * Copyright 2019 Google LLC
80 *
81 * Licensed under the Apache License, Version 2.0 (the "License");
82 * you may not use this file except in compliance with the License.
83 * You may obtain a copy of the License at
84 *
85 *   http://www.apache.org/licenses/LICENSE-2.0
86 *
87 * Unless required by applicable law or agreed to in writing, software
88 * distributed under the License is distributed on an "AS IS" BASIS,
89 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
90 * See the License for the specific language governing permissions and
91 * limitations under the License.
92 */const gn="auth-internal",bn="app-check-internal",yn="messaging-internal";function jn(t,s){const r=(n,{instanceIdentifier:a})=>{const o=n.getProvider("app").getImmediate(),i=n.getProvider(gn),c=n.getProvider(yn),u=n.getProvider(bn);return new un(o,i,c,u,a,t)};Rr(new Lr(Vt,r,"PUBLIC").setMultipleInstances(!0)),Qt(es,ts,s),Qt(es,ts,"esm2017")}/**
93 * @license
94 * Copyright 2020 Google LLC
95 *
96 * Licensed under the Apache License, Version 2.0 (the "License");
97 * you may not use this file except in compliance with the License.
98 * You may obtain a copy of the License at
99 *
100 *   http://www.apache.org/licenses/LICENSE-2.0
101 *
102 * Unless required by applicable law or agreed to in writing, software
103 * distributed under the License is distributed on an "AS IS" BASIS,
104 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
105 * See the License for the specific language governing permissions and
106 * limitations under the License.
107 */function vn(t=Ir(),s=At){const n=Dr(zt(t),Vt).getImmediate({identifier:s}),a=Or("functions");return a&&_n(n,...a),n}function _n(t,s,r){mn(zt(t),s,r)}function wn(t,s,r){return hn(zt(t),s,r)}jn(fetch.bind(self));const Is={apiKey:"AIzaSyCt42EuKaifSJdL_-EvvckUmt_y6KwKXSk",authDomain:"seodoon-church.firebaseapp.com",projectId:"seodoon-church",storageBucket:"seodoon-church.firebasestorage.app",messagingSenderId:"361347196723",appId:"1:361347196723:web:a1c25838f4d86f12c34046"},ht=zr(Is),E=Mr(ht,{ignoreUndefinedProperties:!0}),je=qr(ht),Pl=Vr(ht),Pn=vn(ht,"asia-northeast3");Fr(je,Br).then(()=>{console.log("🔐 Auth Persistence: SESSION (탭 닫으면 로그아웃)")}).catch(t=>{console.error("❌ Auth Persistence 설정 실패:",t)});console.log("🔥 Firebase 초기화 완료:",Is.projectId);const ge={최고관리자:{members:!0,finance:!0,pastoral:!0,content:!0,churchSettings:!0,settings:!0,deptLedger:!0,media:!0,staffOffice:!0,council:!0},담임목사:{members:!1,finance:!1,pastoral:!1,content:!1,churchSettings:!1,settings:!1,deptLedger:!1,media:!1,staffOffice:!1,council:!1},관리자:{members:!1,finance:!1,pastoral:!1,content:!1,churchSettings:!1,settings:!1,deptLedger:!1,media:!1,staffOffice:!1,council:!1},재정부장:{members:!1,finance:!1,pastoral:!1,content:!1,churchSettings:!1,settings:!1,deptLedger:!1,media:!1,staffOffice:!1,council:!1},본회계:{members:!1,finance:!1,pastoral:!1,content:!1,churchSettings:!1,settings:!1,deptLedger:!1,media:!1,staffOffice:!1,council:!1},부서회계:{members:!1,finance:!1,pastoral:!1,content:!1,churchSettings:!1,settings:!1,deptLedger:!1,media:!1,staffOffice:!1,council:!1},당회:{members:!1,finance:!1,pastoral:!1,content:!1,churchSettings:!1,settings:!1,deptLedger:!1,media:!1,staffOffice:!1,council:!1},담당자:{members:!1,finance:!1,pastoral:!1,content:!1,churchSettings:!1,settings:!1,deptLedger:!1,media:!1,staffOffice:!1,council:!1},성도:{members:!1,finance:!1,pastoral:!1,content:!1,churchSettings:!1,settings:!1,deptLedger:!1,media:!1,staffOffice:!1}},Ds={super_admin:"최고관리자",senior_pastor:"담임목사",associate_pastor:"부목사",part_time_pastor:"준전임교역자",council:"당회",admin:"관리자",finance_director:"재정부장",finance_staff:"재정담당",secretary:"간사",head_accountant:"본회계",accountant:"회계담당",small_group_leader:"소그룹장",district_leader:"구역장",culture_director:"문화강좌 담당",family_director:"가정사역 담당",silver_director:"실버대학 담당",newcomer_director:"새가족부 담당",media_director:"미디어"},Os={최고관리자:"super_admin",담임목사:"senior_pastor",부목사:"associate_pastor",관리자:"admin",재정부장:"finance_director",재정담당:"finance_staff",간사:"secretary",본회계:"head_accountant",회계담당:"accountant",부서회계:"accountant",당회:"council",준전임교역자:"part_time_pastor","문화강좌 담당":"culture_director","가정사역 담당":"family_director","실버대학 담당":"silver_director","새가족부 담당":"newcomer_director",미디어:"media_director","미디어 담당":"media_director"},Nn={members:"교적부",attendance:"출석관리",pastoral:"목양 (심방)",counseling:"상담",education:"교육 관리",notices:"공지사항",bulletin:"주보관리",banner:"배너",push:"푸시알림",qt_management:"QT관리",council_board:"당회게시판",resources:"자료실",events:"일정관리",culture:"문화강좌",family:"가정사역",academy:"서둔아카데미",silver_university:"실버대학",missions:"선교회 관리",albums:"앨범관리",gallery_posts:"게시물관리",finance:"재정 관리",dept_ledger:"부서장부",staff_reports:"업무보고",staff_calendar:"캘린더",staff_announcements:"공지사항",staff_board:"게시판",staff_notifications:"알림센터",staff_approvals:"결재",council_meetings:"안건/회의록",council_votes:"투표/의결",council_bulletins:"당회주보",council_reports:"각부보고",council_schedule:"일정",council_chat:"채팅",council_resources:"자료실",council_suggestions:"건의함",church_info:"교회설정",system_settings:"설정",election:"선거/투표/설문"},Nl={"교인 관리":["members","attendance","pastoral","counseling"],교역자실:["staff_reports","staff_calendar","staff_announcements","staff_board","staff_notifications","staff_approvals"],교육:["education"],소통:["notices","bulletin","banner","push","qt_management","council_board","resources","events","culture","family","academy","silver_university","missions"],당회:["council_meetings","council_votes","council_bulletins","council_reports","council_schedule","council_chat","council_resources","council_suggestions"],미디어:["albums","gallery_posts"],재정:["finance","dept_ledger"],"교회 설정":["church_info"],시스템:["system_settings","election"]},En={members:"members",attendance:"members",pastoral:"pastoral",counseling:"pastoral",education:"content",n
107otices:"content",bulletin:"content",banner:"content",push:"content",qt_management:"content",council_board:"content",resources:"content",events:"content",culture:"content",family:"content",academy:"content",silver_university:"content",missions:"content",albums:"media",gallery_posts:"media",finance:"finance",dept_ledger:"deptLedger",staff_reports:"staffOffice",staff_calendar:"staffOffice",staff_announcements:"staffOffice",staff_board:"staffOffice",staff_notifications:"staffOffice",staff_approvals:"staffOffice",council_meetings:"council",council_votes:"council",council_bulletins:"council",council_reports:"council",council_schedule:"council",council_chat:"council",council_resources:"council",council_suggestions:"council",church_info:"churchSettings",system_settings:"settings",election:"settings"};function kn(t){const s={members:!1,pastoral:!1,content:!1,finance:!1,churchSettings:!1,settings:!1,deptLedger:!1,media:!1,staffOffice:!1,council:!1};for(const[r,n]of Object.entries(t)){if(!n||!n.read)continue;const a=En[r];a&&a in s&&(s[a]=!0)}return s}const El={목회:["senior_pastor","associate_pastor"],준전임교역자:["part_time_pastor"],행정:["super_admin","admin","secretary"],당회:["council"],재정:["finance_director","finance_staff","head_accountant","accountant"],봉사:["small_group_leader","district_leader","culture_director","family_director","silver_director","newcomer_director"],미디어:["media_director"]},kl={super_admin:100,senior_pastor:90,associate_pastor:80,part_time_pastor:75,council:70,admin:60,finance_director:50,secretary:45,finance_staff:40,head_accountant:35,accountant:30,small_group_leader:20,district_leader:20,culture_director:20,family_director:20,silver_director:20,newcomer_director:20,media_director:20},Cn=["small_group_leader","district_leader","media_director"];function Cl(t){return t==="super_admin"?Object.keys(Ds).filter(s=>s!=="super_admin"):t==="admin"?Cn:[]}function Sn(){const t=Object.keys(Nn),s={},r={};for(const a of t)s[a]={read:!1,write:!1},r[a]={read:!0,write:!0};const n={};for(const a of Object.keys(Ds))a==="super_admin"?n[a]={...r}:a==="media_director"?n[a]={...s,albums:{read:!0,write:!0},gallery_posts:{read:!0,write:!0}}:n[a]={...s};return n}const Sl=Sn(),Rt=[{keys:["super_admin","최고관리자"],value:"최고관리자",permKey:"super_admin"},{keys:["senior_pastor","담임목사"],value:"담임목사",permKey:"senior_pastor"},{keys:["associate_pastor","부목사"],value:"관리자",permKey:"associate_pastor"},{keys:["secretary","간사"],value:"관리자",permKey:"secretary"},{keys:["admin","관리자"],value:"관리자",permKey:"admin"},{keys:["finance_director","재정부장"],value:"재정부장",permKey:"finance_director"},{keys:["finance_staff","재정담당"],value:"재정부장",permKey:"finance_staff"},{keys:["head_accountant","본회계"],value:"본회계",permKey:"head_accountant"},{keys:["accountant","회계담당"],value:"본회계",permKey:"accountant"},{keys:["council","당회"],value:"당회",permKey:"council"},{keys:["culture_director","문화강좌 담당"],value:"담당자",permKey:"culture_director"},{keys:["family_director","가정사역 담당"],value:"담당자",permKey:"family_director"},{keys:["silver_director","실버대학 담당"],value:"담당자",permKey:"silver_director"},{keys:["newcomer_director","새가족부 담당"],value:"담당자",permKey:"newcomer_director"},{keys:["media_director","미디어"],value:"담당자",permKey:"media_director"}];async function ss(t,s){try{const r=s||Os[t];if(!r)return null;const n=await xe(I(E,"system","permissions"));if(!n.exists())return null;const o=n.data()[r];return!o||typeof o!="object"?null:{categoryPermissions:kn(o),resourcePermissions:o}}catch(r){return console.error("system/permissions 로드 실패:",r),null}}function rs(t,s,r){let n=t,a="";for(const o of Rt)o.keys.some(i=>s.includes(i))&&(n==="성도"||n===r)&&(n=o.value,a=o.permKey);return a||(a=Os[n]||""),{role:n,permKey:a}}const ot={async findEmailByName(t){try{const s=B(E,"members"),r=J(s,Q("name","==",t));return(await Y(r)).empty?null:`${t}@seodoon.org`}catch{return null}},async signIn(t,s){try{let r=t;t.includes("@")||(r=`${t}@seodoon.org`);const n=await Ur(je,r,s),a=await xe(I(E,"users",n.user.uid));if(!a.exists())throw new Error("사용자 정보를 찾을 수 없습니다. 관리자
107에게 문의하세요.");const o=a.data();let i=o.role||"성도",c=o.member_id,u="";if(!c&&o.name){const f=B(E,"members"),b=J(f,Q("name","==",o.name)),v=await Y(b);v.empty||(c=v.docs[0].id,await $(I(E,"users",n.user.uid),{member_id:c}),console.log(`✅ 자동 연결: users/${n.user.uid} → members/${c}`))}if(c){const f=await xe(I(E,"members",c));if(f.exists()){const b=f.data();let v=[];b.roles&&Array.isArray(b.roles)&&b.roles.length>0?v=b.roles:b.role&&(v=[b.role]),o.role&&!v.includes(o.role)&&v.push(o.role),console.log(`👤 ${o.name} 역할 확인:`,v);const w=rs(i,v,o.role);i=w.role,u=w.permKey}}if(!c){for(const f of Rt)if(f.keys.includes(o.role)){i=f.value,u=f.permKey;break}}let d,x={};if(i==="최고관리자")d={...ge.최고관리자};else{const f=await ss(i,u);f?(d=f.categoryPermissions,x=f.resourcePermissions):d={...ge[i]||ge.성도}}if(console.log(`🔑 ${o.name} 권한: role=${i}, permKey=${u}, permissions=`,d,"resources=",x),o.customPermissions&&typeof o.customPermissions=="object"){const f=o.customPermissions;d={members:typeof f.members=="boolean"?f.members:d.members,finance:typeof f.finance=="boolean"?f.finance:d.finance,pastoral:typeof f.pastoral=="boolean"?f.pastoral:d.pastoral,content:typeof f.content=="boolean"?f.content:d.content,churchSettings:typeof f.churchSettings=="boolean"?f.churchSettings:d.churchSettings,settings:typeof f.settings=="boolean"?f.settings:d.settings,deptLedger:typeof f.deptLedger=="boolean"?f.deptLedger:d.deptLedger,media:typeof f.media=="boolean"?f.media:d.media,staffOffice:typeof f.staffOffice=="boolean"?f.staffOffice:d.staffOffice,council:typeof f.council=="boolean"?f.council:d.council}}return{uid:n.user.uid,email:n.user.email,name:o.name,churchId:o.churchId||"seodoon-church",role:i,roles:o.roles||[],member_id:c,permissions:d,resourcePermissions:x,is_active:o.is_active!==void 0?o.is_active:!0}}catch(r){throw r.code==="auth/user-not-found"?new Error("존재하지 않는 사용자입니다."):r.code==="auth/wrong-password"?new Error("비밀번호가 올바르지 않습니다."):r.code==="auth/invalid-email"?new Error("유효하지 않은 이메일 형식입니다."):r.code==="auth/user-disabled"?new Error("비활성화된 계정입니다. 관리자에게 문의하세요."):r.code==="auth/too-many-requests"?new Error("너무 많은 로그인 시도가 있었습니다. 잠시 후 다시 시도해주세요."):r.message?r:new Error("로그인에 실패했습니다. 관리자에게 문의하세요.")}},async signOut(){await $r(je)},onAuthStateChanged(t){return Ss(je,t)},async getCurrentUserData(){try{const t=je.currentUser;if(!t)return null;const s=await xe(I(E,"users",t.uid));if(!s.exists())return null;const r=s.data();let n=r.role||"성도",a=r.member_id,o="";if(!a&&r.name){const u=B(E,"members"),d=J(u,Q("name","==",r.name)),x=await Y(d);x.empty||(a=x.docs[0].id,await $(I(E,"users",t.uid),{member_id:a}),console.log(`✅ 자동 연결: users/${t.uid} → members/${a}`))}if(a){const u=await xe(I(E,"members",a));if(u.exists()){const d=u.data();let x=[];d.roles&&Array.isArray(d.roles)&&d.roles.length>0?x=d.roles:d.role&&(x=[d.role]),r.role&&!x.includes(r.role)&&x.push(r.role),console.log(`👤 ${r.name} 역할 확인:`,x);const f=rs(n,x,r.role);n=f.role,o=f.permKey}}if(!a){for(const u of Rt)if(u.keys.includes(r.role)){n=u.value,o=u.permKey;break}}let i,c={};if(n==="최고관리자")i={...ge.최고관리자};else{const u=await ss(n,o);u?(i=u.categoryPermissions,c=u.resourcePermissions):i={...ge[n]||ge.성도}}if(console.log(`🔑 ${r.name} 권한: role=${n}, permKey=${o}, permissions=`,i,"resources=",c),r.customPermissions&&typeof r.customPermissions=="object"){const u=r.customPermissions;i={members:typeof u.members=="boolean"?u.members:i.members,finance:typeof u.finance=="boolean"?u.finance:i.finance,pastoral:typeof u.pastoral=="boolean"?u.pastoral:i.pastoral,content:typeof u.content=="boolean"?u.content:i.content,churchSettings:typeof u.churchSettings=="boolean"?u.churchSettings:i.churchSettings,settings:typeof u.settings=="boolean"?u.settings:i.settings,deptLedger:typeof u.deptLedger=="boolean"?u.deptLedger:i.deptLedger,media:typeof u.media=="boolean"?u.media:i.media,staffOffice:typeof u.staffOffice=="boolean"?u.staffOffice:i.staffOffice,council:typeof u.council=="boolean"?u.council:i.council}}return{uid:t.uid,email:t.email,name:r.name,churchId:r.churchId||"seodoon-church",role:n,roles:r.roles||[],member_id:a,permissions:i,resourcePermissions:c,is_active:r.is_active!==void 0?r.is_active:!0}}catch{return null}}},Ts=l.createContext(void 0);function An({children:t}){const[s,r]=l.useState(null),[n,a]=l.useState(!0),o=l.useRef(!1);l.useEffect(()=>{const f=Ss(je,async b=>{if(b)try{const v=await ot.getCurrentUserData();r(v)}catch(v){console.error("사용자 정보 로드 실패:",v),r(null)}else r(null);a(!1)});return()=>f()},[]);const x={user:s,loading:n,isAuthenticated:!!s,hasPermission:f=>!s||!s.permissions?!1:s.permissions[f]===!0,hasResourcePermission:(f,b="read")=>{var v,w,_;return s?s.role==="최고관리자"||(f==="albums"||f==="gallery_posts")&&((v=s.roles)!=null&&v.includes("media-admin")||((w=s.permissions)==null?void 0:w.media)===!0)?!0:s.resourcePermissions?((_=s.resourcePermissions[f])==null?void 0:_[b])===!0:!1:!1},isRole:(...f)=>
107s?f.includes(s.role):!1,refreshUser:async()=>{if(!o.current){o.current=!0;try{const f=await ot.getCurrentUserData();r(f)}catch(f){console.error("사용자 정보 갱신 실패:",f)}finally{o.current=!1}}}};return e.jsx(Ts.Provider,{value:x,children:t})}function Se(){const t=l.useContext(Ts);if(t===void 0)throw new Error("useAuth must be used within an AuthProvider");return t}const ns=[{id:"baby",name:"영아부",shortName:"영아",firestorePrefix:"baby",color:"#ec4899",colorClass:"pink",ageRange:"0~3세",gradeType:"age",gradeOptions:[{value:"0",label:"0세"},{value:"1",label:"1세"},{value:"2",label:"2세"},{value:"3",label:"3세"}],hasSchoolField:!1,hasPhoneField:!1,hasChallenges:!1,sortOrder:1},{id:"yuchi",name:"유치부",shortName:"유치",firestorePrefix:"yuchi",color:"#f97316",colorClass:"orange",ageRange:"4~6세",gradeType:"age",gradeOptions:[{value:"4",label:"4세"},{value:"5",label:"5세"},{value:"6",label:"6세"},{value:"7",label:"7세"}],hasSchoolField:!1,hasPhoneField:!1,hasChallenges:!1,sortOrder:2},{id:"junior",name:"유년부",shortName:"유년",firestorePrefix:"junior",color:"#eab308",colorClass:"yellow",ageRange:"초1~3",gradeType:"grade",gradeOptions:[{value:"1",label:"1학년"},{value:"2",label:"2학년"},{value:"3",label:"3학년"}],hasSchoolField:!0,hasPhoneField:!1,hasChallenges:!1,sortOrder:3},{id:"senior",name:"소년부",shortName:"소년",firestorePrefix:"senior",color:"#22c55e",colorClass:"green",ageRange:"초4~6",gradeType:"grade",gradeOptions:[{value:"4",label:"4학년"},{value:"5",label:"5학년"},{value:"6",label:"6학년"}],hasSchoolField:!0,hasPhoneField:!1,hasChallenges:!1,sortOrder:4},{id:"middle",name:"중등부",shortName:"중등",firestorePrefix:"middle",color:"#3b82f6",colorClass:"blue",ageRange:"중1~3",gradeType:"grade",gradeOptions:[{value:"1",label:"1학년"},{value:"2",label:"2학년"},{value:"3",label:"3학년"}],hasSchoolField:!0,hasPhoneField:!0,hasChallenges:!0,sortOrder:5},{id:"high",name:"고등부",shortName:"고등",firestorePrefix:"high",color:"#8b5cf6",colorClass:"purple",ageRange:"고1~3",gradeType:"grade",gradeOptions:[{value:"1",label:"1학년"},{value:"2",label:"2학년"},{value:"3",label:"3학년"}],hasSchoolField:!0,hasPhoneField:!0,hasChallenges:!0,sortOrder:6}];function Rn(t){return{students:`${t}Students`,teachers:`${t}Teachers`,groups:`${t}Groups`,attendance:`${t}Attendance`,notices:`${t}Notices`,events:`${t}Events`,counseling:`${t}Counseling`,challenges:`${t}Challenges`,visitations:`${t}Visitations`}}const zs=l.createContext(void 0),yt="education-selected-department";function ue({children:t}){const[s,r]=l.useState(()=>{try{return localStorage.getItem(yt)||null}catch{return null}}),n=s&&ns.find(c=>c.id===s)||null,a=n?Rn(n.firestorePrefix):null,o=l.useCallback(c=>{r(c);try{c?localStorage.setItem(yt,c):localStorage.removeItem(yt)}catch{}},[]),i={selectedDepartment:n,selectedDepartmentId:s,selectDepartment:o,collections:a,departments:ns,isAllSelected:s===null};return e.jsx(zs.Provider,{value:i,children:t})}function Al(){const t=l.useContext(zs);if(t===void 0)throw new Error("useEducationDepartment must be used within an EducationDepartmentProvider");return t}const Ft="-",Ln=t=>{const s=Dn(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:i=>{const c=i.split(Ft);return c[0]===""&&c.length!==1&&c.shift(),Ms(c,s)||In(i)},getConflictingClassGroupIds:(i,c)=>{const u=r[i]||[];return c&&n[i]?[...u,...n[i]]:u}}},Ms=(t,s)=>{var i;if(t.length===0)return s.classGroupId;const r=t[0],n=s.nextPart.get(r),a=n?Ms(t.slice(1),n):void 0;if(a)return a;if(s.validators.length===0)return;const o=t.join(Ft);return(i=s.validators.find(({validator:c}
vendor: 5,335 bytes, line 107
107)=>c(o)))==null?void 0:i.classGroupId},as=/^\[(.+)\]$/,In=t=>{if(as.test(t)){const s=as.exec(t)[1],r=s==null?void 0:s.substring(0,s.indexOf(":"));if(r)return"arbitrary.."+r}},Dn=t=>{const{theme:s,prefix:r}=t,n={nextPart:new Map,validators:[]};return Tn(Object.entries(t.classGroups),r).forEach(([o,i])=>{Lt(i,n,o,s)}),n},Lt=(t,s,r,n)=>{t.forEach(a=>{if(typeof a=="string"){const o=a===""?s:os(s,a);o.classGroupId=r;return}if(typeof a=="function"){if(On(a)){Lt(a(n),s,r,n);return}s.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([o,i])=>{Lt(i,os(s,o),r,n)})})},os=(t,s)=>{let r=t;return s.split(Ft).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},On=t=>t.isThemeGetter,Tn=(t,s)=>s?t.map(([r,n])=>{const a=n.map(o=>typeof o=="string"?s+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,c])=>[s+i,c])):o);return[r,a]}):t,zn=t=>{if(t<1)return{get:()=>{},set:()=>{}};let s=0,r=new Map,n=new Map;const a=(o,i)=>{r.set(o,i),s++,s>t&&(s=0,n=r,r=new Map)};return{get(o){let i=r.get(o);if(i!==void 0)return i;if((i=n.get(o))!==void 0)return a(o,i),i},set(o,i){r.has(o)?r.set(o,i):a(o,i)}}},qs="!",Mn=t=>{const{separator:s,experimentalParseClassName:r}=t,n=s.length===1,a=s[0],o=s.length,i=c=>{const u=[];let d=0,x=0,f;for(let P=0;P<c.length;P++){let A=c[P];if(d===0){if(A===a&&(n||c.slice(P,P+o)===s)){u.push(c.slice(x,P)),x=P+o;continue}if(A==="/"){f=P;continue}}A==="["?d++:A==="]"&&d--}const b=u.length===0?c:c.substring(x),v=b.startsWith(qs),w=v?b.substring(1):b,_=f&&f>x?f-x:void 0;return{modifiers:u,hasImportantModifier:v,baseClassName:w,maybePostfixModifierPosition:_}};return r?c=>r({className:c,parseClassName:i}):i},qn=t=>{if(t.length<=1)return t;const s=[];let r=[];return t.forEach(n=>{n[0]==="["?(s.push(...r.sort(),n),r=[]):r.push(n)}),s.push(...r.sort()),s},Vn=t=>({cache:zn(t.cacheSize),parseClassName:Mn(t),...Ln(t)}),Fn=/\s+/,Bn=(t,s)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=s,o=[],i=t.trim().split(Fn);let c="";for(let u=i.length-1;u>=0;u-=1){const d=i[u],{modifiers:x,hasImportantModifier:f,baseClassName:b,maybePostfixModifierPosition:v}=r(d);let w=!!v,_=n(w?b.substring(0,v):b);if(!_){if(!w){c=d+(c.length>0?" "+c:c);continue}if(_=n(b),!_){c=d+(c.length>0?" "+c:c);continue}w=!1}const P=qn(x).join(":"),A=f?P+qs:P,D=A+_;if(o.includes(D))continue;o.push(D);const U=a(_,w);for(let z=0;z<U.length;++z){const C=U[z];o.push(A+C)}c=d+(c.length>0?" "+c:c)}return c};function $n(){let t=0,s,r,n="";for(;t<arguments.length;)(s=arguments[t++])&&(r=Vs(s))&&(n&&(n+=" "),n+=r);return n}const Vs=t=>{if(typeof t=="string")return t;let s,r="";for(let n=0;n<t.length;n++)t[n]&&(s=Vs(t[n]))&&(r&&(r+=" "),r+=s);return r};function Un(t,...s){let r,n,a,o=i;function i(u){const d=s.reduce((x,f)=>f(x),t());return r=Vn(d),n=r.cache.get,a=r.cache.set,o=c,c(u)}function c(u){const d=n(u);if(d)return d;const x=Bn(u,r);return a(u,x),x}return function(){return o($n.apply(null,arguments))}}const O=t=>{const s=r=>r[t]||[];return s.isThemeGetter=!0,s},Fs=/^\[(?:([a-z-]+):)?(.+)\]$/i,Kn=/^\d+\/\d+$/,Wn=new Set(["px","full","screen"]),Gn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Hn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Jn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Qn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Yn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ee=t=>Pe(t)||Wn.has(t)||Kn.test(t),oe=t=>Ae(t,"length",aa),Pe=t=>!!t&&!Number.isNaN(Number(t)),jt=t=>Ae(t,"number",Pe),Me=t=>!!t&&Number.isInteger(Number(t)),Xn=t=>t.endsWith("%")&&Pe(t.slice(0,-1)),N=t=>Fs.test(t),ie=t=>Gn.test(t),Zn=new Set(["length","size","percentage"]),ea=t=>Ae(t,Zn,Bs),ta=t=>Ae(t,"position",Bs),sa=new Set(["image","url"]),ra=t=>Ae(t,sa,ia),na=t=>Ae(t,"",oa),qe=()=>!0,Ae=(t,s,r)=>{const n=Fs.exec(t);return n?n[1]?typeof s=="string"?n[1]===s:s.has(n[1]):r(n[2]):!1},aa=t=>Hn.test(t)&&!Jn.test(t),Bs=()=>!1,oa=t=>Qn.test(t),ia=t=>Yn.test(t),la=()=>{const t=O("colors"),s=O("spacing"),r=O("blur"),n=O("brightness"),a=O("borderColor"),o=O("borderRadius"),i=O("borderSpacing"),c=O("borderWidth"),u=O("contrast"),d=O("grayscale"),x=O("hueRotate"),f=O("invert"),b=O("gap"),v=O("gradientColorStops"),w=O("gradientColorStopPositions"),_=O("inset"),P=O("margin"),A=O("opacity"),D=O("padding"),U=O("saturate"),z=O("scale"),C=O("sepia"),q=O("skew"),j=O("space"),h=O("translate"),V=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto",N,s],L=()=>[N,s],Le=()=>["",ee,oe],ne=()=>["auto",Pe,N],Xe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],de=()=>["solid","dashed","dotted","double","none"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>["start","end","center","between","around","evenly","stretch"],H=()=>["","0",N],Ie=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[Pe,N];return{cacheSize:500,separator:":",theme:{colors:[qe],spacing:[ee,oe],blur:["none","",ie,N],brightness:R(),borderColor:[t],borderRadius:["n
107one","","full",ie,N],borderSpacing:L(),borderWidth:Le(),contrast:R(),grayscale:H(),hueRotate:R(),invert:H(),gap:L(),gradientColorStops:[t],gradientColorStopPositions:[Xn,oe],inset:T(),margin:T(),opacity:R(),padding:L(),saturate:R(),scale:R(),sepia:H(),skew:R(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",N]}],container:["container"],columns:[{columns:[ie]}],"break-after":[{"break-after":Ie()}],"break-before":[{"break-before":Ie()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Xe(),N]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[_]}],"inset-x":[{"inset-x":[_]}],"inset-y":[{"inset-y":[_]}],start:[{start:[_]}],end:[{end:[_]}],top:[{top:[_]}],right:[{right:[_]}],bottom:[{bottom:[_]}],left:[{left:[_]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Me,N]}],basis:[{basis:T()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",N]}],grow:[{grow:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",Me,N]}],"grid-cols":[{"grid-cols":[qe]}],"col-start-end":[{col:["auto",{span:["full",Me,N]},N]}],"col-start":[{"col-start":ne()}],"col-end":[{"col-end":ne()}],"grid-rows":[{"grid-rows":[qe]}],"row-start-end":[{row:["auto",{span:[Me,N]},N]}],"row-start":[{"row-start":ne()}],"row-end":[{"row-end":ne()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",N]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",N]}],gap:[{gap:[b]}],"gap-x":[{"gap-x":[b]}],"gap-y":[{"gap-y":[b]}],"justify-content":[{justify:["normal",...W()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...W(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...W(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[D]}],px:[{px:[D]}],py:[{py:[D]}],ps:[{ps:[D]}],pe:[{pe:[D]}],pt:[{pt:[D]}],pr:[{pr:[D]}],pb:[{pb:[D]}],pl:[{pl:[D]}],m:[{m:[P]}],mx:[{mx:[P]}],my:[{my:[P]}],ms:[{ms:[P]}],me:[{me:[P]}],mt:[{mt:[P]}],mr:[{mr:[P]}],mb:[{mb:[P]}],ml:[{ml:[P]}],"space-x":[{"space-x":[j]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[j]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",N,s]}],"min-w":[{"min-w":[N,s,"min","max","fit"]}],"max-w":[{"max-w":[N,s,"none","full","min","max","fit","prose",{screen:[ie]},ie]}],h:[{h:[N,s,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[N,s,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[N,s,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[N,s,"auto","min","max","fit"]}],"font-size":[{text:["base",ie,oe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",jt]}],"font-family":[{font:[qe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",N]}],"line-clamp":[{"line-clamp":["none",Pe,jt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ee,N]}],"list-image":[{"list-image":["none",N]}],"list-style-type":[{list:["none","disc","decimal",N]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...de(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ee,oe]}],"underline-offset":[{"underline-offset":["auto",ee,N]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",N]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",N]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Xe(),ta]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ea]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ra]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[w]}
vendor: 5,176 bytes, line 107
107],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...de(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:de()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...de()]}],"outline-offset":[{"outline-offset":[ee,N]}],"outline-w":[{outline:[ee,oe]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:Le()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[ee,oe]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",ie,na]}],"shadow-color":[{shadow:[qe]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...G(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":G()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",ie,N]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[x]}],invert:[{invert:[f]}],saturate:[{saturate:[U]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[x]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[U]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",N]}],duration:[{duration:R()}],ease:[{ease:["linear","in","out","in-out",N]}],delay:[{delay:R()}],animate:[{animate:["none","spin","ping","pulse","bounce",N]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[z]}],"scale-x":[{"scale-x":[z]}],"scale-y":[{"scale-y":[z]}],rotate:[{rotate:[Me,N]}],"translate-x":[{"translate-x":[h]}],"translate-y":[{"translate-y":[h]}],"skew-x":[{"skew-x":[q]}],"skew-y":[{"skew-y":[q]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",N]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",N]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
107],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",N]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[ee,oe,jt]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},ca=Un(la);function y(...t){return ca(Wr(t))}const $s=l.createContext(null);function da(){const t=l.useContext($s);if(!t)throw new Error("useNotifications must be used within NotificationProvider");return t}function ua({children:t,maxNotifications:s=50}){const[r,n]=l.useState([]),a=r.filter(x=>!x.read).length,o=l.useCallback(x=>{const f={...x,id:`notif-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,timestamp:new Date,read:!1};n(b=>[f,...b].slice(0,s))},[s]),i=l.useCallback(x=>{n(f=>f.map(b=>b.id===x?{...b,read:!0}:b))},[]),c=l.useCallback(()=>{n(x=>x.map(f=>({...f,read:!0})))},[]),u=l.useCallback(x=>{n(f=>f.filter(b=>b.id!==x))},[]),d=l.useCallback(()=>{n([])},[]);return e.jsx($s.Provider,{value:{notifications:r,unreadCount:a,addNotification:o,markAsRead:i,markAllAsRead:c,removeNotification:u,clearAll:d},children:t})}const ma={info:{icon:e.jsx(or,{className:"w-4 h-4"}),iconBg:"bg-blue-100",iconColor:"text-blue-600"},success:{icon:e.jsx(ar,{className:"w-4 h-4"}),iconBg:"bg-emerald-100",iconColor:"text-emerald-600"},warning:{icon:e.jsx(wt,{className:"w-4 h-4"}),iconBg:"bg-amber-100",iconColor:"text-amber-600"},error:{icon:e.jsx(wt,{className:"w-4 h-4"}),iconBg:"bg-red-100",iconColor:"text-red-600"},member:{icon:e.jsx(re,{className:"w-4 h-4"}),iconBg:"bg-violet-100",iconColor:"text-violet-600"},event:{icon:e.jsx(pe,{className:"w-4 h-4"}),iconBg:"bg-pink-100",iconColor:"text-pink-600"},document:{icon:e.jsx(Ne,{className:"w-4 h-4"}),iconBg:"bg-cyan-100",iconColor:"text-cyan-600"},finance:{icon:e.jsx(Ce,{className:"w-4 h-4"}),iconBg:"bg-lime-100",iconColor:"text-lime-600"},message:{icon:e.jsx(We,{className:"w-4 h-4"}),iconBg:"bg-orange-100",iconColor:"text-orange-600"}};function ha(t){const r=new Date().getTime()-t.getTime(),n=Math.floor(r/1e3),a=Math.floor(n/60),o=Math.floor(a/60),i=Math.floor(o/24);return n<60?"방금 전":a<60?`${a}분 전`:o<24?`${o}시간 전`:i<7?`${i}일 전`:t.toLocaleDateString("ko-KR",{month:"short",day:"numeric"})}function fa({notification:t,onRead:s,onRemove:r,onClick:n}){const a=ma[t.type],o=()=>{t.read||s(t.id),n==null||n()};return e.jsx("div",{className:y("p-4 border-b border-gray-100 hover:bg-gray-50 transition-colors cursor-pointer",!t.read&&"bg-blue-50/50"),onClick:o,children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:y("w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0",a.iconBg,a.iconColor),children:a.icon}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("p",{className:y("text-sm truncate",t.read?"text-gray-600":"text-gray-900 font-medium"),children:t.title}),e.jsx("button",{onClick:i=>
107{i.stopPropagation(),r(t.id)},className:"p-1 text-gray-400 hover:text-gray-600 rounded opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsx(Qe,{className:"w-3.5 h-3.5"})})]}),e.jsx("p",{className:"text-xs text-gray-500 mt-0.5 line-clamp-2",children:t.message}),e.jsxs("div",{className:"flex items-center justify-between mt-2",children:[e.jsx("span",{className:"text-xs text-gray-400",children:ha(t.timestamp)}),t.action&&e.jsx("button",{onClick:i=>{var c;i.stopPropagation(),(c=t.action)==null||c.onClick()},className:"text-xs text-blue-600 hover:text-blue-700 font-medium",children:t.action.label})]})]}),!t.read&&e.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full flex-shrink-0 mt-2"})]})})}function xa({className:t}){const[s,r]=l.useState(!1),{notifications:n,unreadCount:a,markAsRead:o,markAllAsRead:i,removeNotification:c,clearAll:u}=da();return l.useEffect(()=>{const d=x=>{x.key==="Escape"&&r(!1)};if(s)return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[s]),e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>r(!s),className:y("relative p-2 text-gray-500 hover:text-gray-700 hover:bg-gray-100 rounded-lg transition-colors",t),children:[e.jsx(_e,{className:"w-5 h-5"}),a>0&&e.jsx("span",{className:"absolute -top-0.5 -right-0.5 w-5 h-5 bg-red-500 text-white text-xs font-bold rounded-full flex items-center justify-center",children:a>9?"9+":a})]}),s&&It.createPortal(e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>r(!1)}),e.jsxs("div",{className:"fixed top-16 right-4 z-50 w-96 max-h-[calc(100vh-80px)] bg-white rounded-xl shadow-2xl border border-gray-200 overflow-hidden animate-in fade-in slide-in-from-top-2 duration-200",children:[e.jsx("div",{className:"p-4 border-b border-gray-100 bg-gray-50",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h3",{className:"font-semibold text-gray-900",children:"알림"}),a>0&&e.jsxs("span",{className:"px-2 py-0.5 text-xs font-medium text-blue-600 bg-blue-100 rounded-full",children:[a,"개 새 알림"]})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[a>0&&e.jsx("button",{onClick:i,className:"p-1.5 text-gray-500 hover:text-gray-700 hover:bg-gray-200 rounded-lg transition-colors",title:"모두 읽음 처리",children:e.jsx(nr,{className:"w-4 h-4"})}),n.length>0&&e.jsx("button",{onClick:u,className:"p-1.5 text-gray-500 hover:text-gray-700 hover:bg-gray-200 rounded-lg transition-colors",title:"모두 삭제",children:e.jsx(_s,{className:"w-4 h-4"})})]})]})}),e.jsx("div",{className:"overflow-y-auto max-h-[400px]",children:n.length===0?e.jsxs("div",{className:"py-12 text-center",children:[e.jsx(_e,{className:"w-12 h-12 text-gray-300 mx-auto mb-3"}),e.jsx("p",{className:"text-sm text-gray-500",children:"새로운 알림이 없습니다"})]}):e.jsx("div",{className:"divide-y divide-gray-100",children:n.map(d=>e.jsx("div",{className:"group",children:e.jsx(fa,{notification:d,onRead:o,onRemove:c,onClick:()=>{d.link&&(window.location.href=d.link,r(!1))}})},d.id))})}),n.length>0&&e.jsx("div",{className:"p-3 border-t border-gray-100 bg-gray-50",children:e.jsxs("button",{onClick:()=>{r(!1)},className:"w-full flex items-center justify-center gap-1 text-sm text-gray-600 hover:text-gray-900 font-medium py-1",children:["전체 알림 보기",e.jsx(lt,{className:"w-4 h-4"})]})})]})]}),document.body)]})}function pa(){const[t,s]=l.useState(null),[r,n]=l.useState(!1),[a,o]=l.useState(!1);return l.useEffect(()=>{if(window.matchMedia("(display-mode: standalone)").matches){n(!0);return}const c=d=>{d.preventDefault(),s(d)},u=()=>{n(!0),s(null)};return window.addEventListener("beforeinstallprompt",c),window.addEventListener("appinstalled",u),()=>{window.removeEventListener("beforeinstallprompt",c),window.removeEventListener("appinstalled",u)}},[]),{canInstall:!!t&&!r,isInstalled:r,isInstalling:a,install:async()=>{if(!t)return!1;o(!0);try{await t.prompt();const{outcome:c}=await t.userChoice;return c==="accepted"?(n(!0),s(null),!0):!1}catch(c){return console.error("Install failed:",c),!1}finally{o(!1)}}}}function ga({className:t}){const{canInstall:s,isInstalling:r,install:n}=pa(),[a,o]=l.useState(!1);if(l.useEffect(()=>{const u=localStorage.getItem("pwa-banner-dismissed");if(u){const d=parseInt(u,10);Date.now()-d<7*24*60*60*1e3&&o(!0)}},[]),!s||a)return null;const i=()=>{o(!0),localStorage.setItem("pwa-banner-dismissed",Date.now().toString())},c=async()=>{await n()&&o(!0)};return e.jsx("div",{className:y("fixed bottom-0 left-0 right-0 z-50 p-4 bg-gradient-to-r from-blue-600 to-indigo-600","animate-in slide-in-from-bottom duration-300",t),children:e.jsxs("div",{className:"max-w-3xl mx-auto flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex-shrink-0 p-2 bg-white/20 rounded-xl",children:e.jsx(ir,{className:"w-6 h-6 text-white"})}),e.jsxs("div",{className:"text-white",children:[e.jsx("p",{className:"font-semibold",children:"ChurchOS 앱 설치"}),e.jsx("p",{className:"text-sm opacity-90",children:"홈 화면에 추가하여 더 빠르게 접근하세요"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:c,disabled:r,className:y("px-4 py-2 bg-white text-blue-600 font-medium rounded-lg","hover:bg-blue-50 transition-colors","flex items-center gap-2",r&&"opacity-50 cursor-not-allowed"),children:[r?e.jsx("div",{className:"w-4 h-4 border-2 border-blue-600 border-t-transparent roun
107ded-full animate-spin"}):e.jsx(lr,{className:"w-4 h-4"}),e.jsx("span",{children:"설치"})]}),e.jsx("button",{onClick:i,className:"p-2 text-white/80 hover:text-white transition-colors","aria-label":"닫기",children:e.jsx(Qe,{className:"w-5 h-5"})})]})]})})}class ba extends l.Component{constructor(r){super(r);Oe(this,"handleReload",()=>{window.location.reload()});Oe(this,"handleGoHome",()=>{window.location.href="/"});Oe(this,"handleRetry",()=>{this.setState({hasError:!1,error:null,errorInfo:null})});Oe(this,"toggleDetails",()=>{this.setState(r=>({showDetails:!r.showDetails}))});this.state={hasError:!1,error:null,errorInfo:null,showDetails:!1}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,n){var a,o;this.setState({errorInfo:n}),console.error("ErrorBoundary caught an error:",r,n),(o=(a=this.props).onError)==null||o.call(a,r,n),this.logErrorToService(r,n)}logErrorToService(r,n){const a={message:r.message,stack:r.stack,componentStack:n.componentStack,timestamp:new Date().toISOString(),url:window.location.href,userAgent:navigator.userAgent};console.log("[Error Tracking]",a)}render(){const{hasError:r,error:n,errorInfo:a,showDetails:o}=this.state,{children:i,fallback:c}=this.props;return r?c||e.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:"max-w-lg w-full bg-white rounded-2xl shadow-xl overflow-hidden",children:[e.jsxs("div",{className:"bg-red-500 p-6 text-center",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 bg-white/20 rounded-full mb-4",children:e.jsx(ws,{className:"w-8 h-8 text-white"})}),e.jsx("h1",{className:"text-xl font-bold text-white",children:"문제가 발생했습니다"}),e.jsx("p",{className:"text-red-100 mt-2 text-sm",children:"예기치 않은 오류가 발생했습니다"})]}),e.jsxs("div",{className:"p-6",children:[e.jsxs("p",{className:"text-gray-600 text-center mb-6",children:["죄송합니다. 페이지를 표시하는 중 오류가 발생했습니다.",e.jsx("br",{}),"아래 버튼을 눌러 다시 시도해 주세요."]}),e.jsxs("div",{className:"flex gap-3 mb-6",children:[e.jsxs("button",{onClick:this.handleRetry,className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 bg-blue-600 text-white font-medium rounded-xl hover:bg-blue-700 transition-colors",children:[e.jsx(Ps,{className:"w-4 h-4"}),"다시 시도"]}),e.jsxs("button",{onClick:this.handleGoHome,className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 border border-gray-300 text-gray-700 font-medium rounded-xl hover:bg-gray-50 transition-colors",children:[e.jsx(Ot,{className:"w-4 h-4"}),"홈으로"]})]}),!1]})]})}):i}}function p({children:t,requiredPermission:s,requiredAnyPermission:r,requiredResource:n,requiredRoles:a,redirectTo:o="/login"}){const{user:i,isAuthenticated:c,loading:u,hasPermission:d,hasResourcePermission:x,isRole:f}=Se(),b=(...w)=>i?!!(w.includes(i.role)||i.roles&&i.roles.some(_=>w.includes(_))):!1;return u?e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto mb-4"}),e.jsx("p",{className:"text-gray-600",children:"로딩 중..."})]})}):c?n&&!x(n)?e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:e.jsxs("div",{className:"text-center bg-white p-8 rounded-lg shadow-md max-w-md",children:[e.jsx("svg",{className:"w-16 h-16 text-red-500 mx-auto mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),e.jsx("h2",{className:"text-xl font-bold text-gray-900 mb-2",children:"접근 권한 없음"}),e.jsxs("p",{className:"text-gray-600 mb-4",children:["이 기능에 접근할 권한이 없습니다.",e.jsx("br",{}),"관리자에게 권한을 요청하세요."]}),e.jsx("button",{onClick:()=>window.history.back(),className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors",children:"이전 페이지로"})]})}):!!s&&!d(s)||!!r&&r.length>0&&!r.some(w=>d(w))?e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:e.jsxs("div",{className:"text-center bg-white p-8 rounded-lg shadow-md max-w-md",children:[e.jsx("svg",{className:"w-16 h-16 text-red-500 mx-auto mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),e.jsx("h2",{className:"text-xl font-bold text-gray-900 mb-2",children:"접근 권한 없음"}),e.jsxs("p",{className:"text-gray-600 mb-4",children:["이 페이지에 접근할 권한이 없습니다.",e.jsx("br",{}
107),"관리자에게 문의하세요."]}),e.jsx("button",{onClick:()=>window.history.back(),className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors",children:"이전 페이지로"})]})}):a&&!b(...a)?e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:e.jsxs("div",{className:"text-center bg-white p-8 rounded-lg shadow-md max-w-md",children:[e.jsx("svg",{className:"w-16 h-16 text-red-500 mx-auto mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),e.jsx("h2",{className:"text-xl font-bold text-gray-900 mb-2",children:"접근 권한 없음"}),e.jsxs("p",{className:"text-gray-600 mb-4",children:["이 기능을 사용할 권한이 없습니다.",e.jsx("br",{}),"필요 역할: ",a.join(", ")]}),e.jsx("button",{onClick:()=>window.history.back(),className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors",children:"이전 페이지로"})]})}):e.jsx(e.Fragment,{children:t}):e.jsx(K,{to:o,replace:!0})}const ya=()=>{if(typeof window>"u")return{mobile:!1,tablet:!1};const t=window.innerWidth,s="ontouchstart"in window||navigator.maxTouchPoints>0;return{mobile:t<480,tablet:t>=480&&t<768||s&&t>=768&&t<1200}},is=ya(),ja=["/finance","/finance/offerings","/finance/expenses","/finance/reports","/members","/dashboard","/pastoral/staff-reports"],va=["/finance/offerings","/finance/expenses","/finance/reports","/members"],_a=l.createContext({isMobile:!1,isTablet:!1,isReadOnly:!1,showMobileWarning:!1,dismissWarning:()=>{}});function wa({children:t}){const[s,r]=l.useState(is.mobile),[n,a]=l.useState(is.tablet),[o,i]=l.useState(!1),[c,u]=l.useState(!1),d=it();l.useEffect(()=>{const w=()=>{const _=window.innerWidth,P="ontouchstart"in window||navigator.maxTouchPoints>0;r(_<480),a(_>=480&&_<768||P&&_>=768&&_<1200)};return window.addEventListener("resize",w),()=>window.removeEventListener("resize",w)},[]);const x=ja.some(w=>d.pathname===w||d.pathname.startsWith(w+"/")),f=va.some(w=>d.pathname===w||d.pathname.startsWith(w+"/"));if(s&&!x)return e.jsx("div",{className:"min-h-screen bg-gradient-to-br from-blue-50 to-blue-100 flex items-center justify-center p-4",children:e.jsxs("div",{className:"max-w-md w-full bg-white rounded-2xl shadow-xl p-6 text-center",children:[e.jsx("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:e.jsx("svg",{className:"w-10 h-10 text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})})}),e.jsx("h1",{className:"text-xl font-bold text-gray-900 mb-2",children:"이 기능은 PC에서 이용해주세요"}),e.jsx("p",{className:"text-gray-600 mb-4 text-sm leading-relaxed",children:"해당 관리 기능은 화면이 큰 PC 또는 태블릿에서 더 편리하게 사용하실 수 있습니다."}),e.jsxs("div",{className:"bg-green-50 rounded-lg p-4 mb-4 text-left",children:[e.jsx("p",{className:"text-sm text-green-800 font-medium mb-2",children:"📱 모바일에서 가능한 기능"}),e.jsxs("ul",{className:"text-xs text-green-700 space-y-1",children:[e.jsx("li",{children:"• 재정 대시보드 조회"}),e.jsx("li",{children:"• 헌금/지출 내역 확인"}),e.jsx("li",{children:"• 지출 승인/반려"}),e.jsx("li",{children:"• 보고서 조회"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("a",{href:"/churchos-admin/#/finance",className:"block w-full px-4 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors font-medium text-sm",children:"재정 대시보드로 이동"}),e.jsx("a",{href:"/",className:"block w-full px-4 py-2 text-gray-600 hover:text-gray-800 transition-colors text-sm",children:"성도용 앱으로 이동 →"})]})]})});const b=(s||n)&&!c,v={isMobile:s,isTablet:n,isReadOnly:(s||n)&&f,showMobileWarning:b&&o,dismissWarning:()=>u(!0)};return l.useEffect(()=>{if((s||n)&&!c){i(!0);const w=setTimeout(()=>i(!1),5e3);return()=>clearTimeout(w)}},[s,n,c]),e.jsxs(_a.Provider,{value:v,children:[b&&o&&e.jsx("div",{className:"fixed bottom-4 left-4 right-4 z-[9999] animate-slide-up",children:e.jsx("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-3 shadow-lg",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"flex-shrink-0 text-amber-500",children:e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-amber-800",children:"모바일 모드"}),e.jsx("p",{className:"text-xs text-amber-700 mt-0.5",children:f?"조회만 가능합니다. 수정은 PC에서 해주세요.":"일부 기능이 제한될 수 있습니다."})]}),e.jsx("button",{onClick:()=>{i(!1),u(!0)},className:"flex-shrink-0 text-amber-500 hover:text-amber-700",children:e.jsx("svg",{className:"w-4 h-4",fill:"
107currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})})}),t]})}const Pa={primary:y("bg-primary-600 text-white","hover:bg-primary-700","focus:ring-primary-500","shadow-sm"),secondary:y("bg-white text-gray-700","border border-gray-300","hover:bg-gray-50 hover:border-gray-400","focus:ring-gray-500"),danger:y("bg-red-600 text-white","hover:bg-red-700","focus:ring-red-500","shadow-sm"),ghost:y("text-gray-700","hover:bg-gray-100","focus:ring-gray-500"),link:y("text-primary-600","hover:text-primary-700 hover:underline","p-0 h-auto")},Na={xs:"px-2 py-1 text-xs gap-1",sm:"px-3 py-1.5 text-sm gap-1.5",md:"px-4 py-2 text-sm gap-2",lg:"px-5 py-2.5 text-base gap-2"},Ea={xs:"w-3 h-3",sm:"w-3.5 h-3.5",md:"w-4 h-4",lg:"w-5 h-5"},ka=l.forwardRef(({className:t,variant:s="primary",size:r="md",loading:n=!1,disabled:a,icon:o,iconPosition:i="left",fullWidth:c=!1,children:u,type:d="button",...x},f)=>{const b=a||n,v=Ea[r];return e.jsxs("button",{ref:f,type:d,disabled:b,className:y("inline-flex items-center justify-center","font-medium rounded-lg","transition-all duration-200","focus:outline-none focus:ring-2 focus:ring-offset-2","disabled:opacity-50 disabled:cursor-not-allowed",Pa[s],s!=="link"&&Na[r],c&&"w-full",t),...x,children:[n&&e.jsx(ct,{className:y("animate-spin",v)}),!n&&o&&i==="left"&&e.jsx("span",{className:v,children:o}),u,!n&&o&&i==="right"&&e.jsx("span",{className:v,children:o})]})});ka.displayName="Button";const Ca={default:"bg-gray-100 text-gray-700 hover:bg-gray-200 focus:ring-gray-400",primary:"bg-blue-100 text-blue-700 hover:bg-blue-200 focus:ring-blue-400",danger:"bg-red-100 text-red-700 hover:bg-red-200 focus:ring-red-400",ghost:"text-gray-600 hover:bg-gray-100 hover:text-gray-900 focus:ring-gray-400",outline:"border border-gray-300 text-gray-700 hover:bg-gray-50 focus:ring-gray-400"},Sa={xs:"w-6 h-6",sm:"w-8 h-8",md:"w-10 h-10",lg:"w-12 h-12"},Aa={xs:"w-3 h-3",sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},Us=l.forwardRef(({className:t,variant:s="default",size:r="md",loading:n=!1,disabled:a,icon:o,rounded:i=!1,label:c,type:u="button",...d},x)=>{const f=a||n,b=Aa[r];return e.jsx("button",{ref:x,type:u,disabled:f,"aria-label":c,title:c,className:y("inline-flex items-center justify-center","transition-all duration-200","focus:outline-none focus:ring-2 focus:ring-offset-1","disabled:opacity-50 disabled:cursor-not-allowed",i?"rounded-full":"rounded-lg",Ca[s],Sa[r],t),...d,children:n?e.jsx(ct,{className:y("animate-spin",b)}):e.jsx("span",{className:b,children:o})})});Us.displayName="IconButton";const Ra={blue:"bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500 shadow-blue-600/30",emerald:"bg-emerald-600 text-white hover:bg-emerald-700 focus:ring-emerald-500 shadow-emerald-600/30",rose:"bg-rose-600 text-white hover:bg-rose-700 focus:ring-rose-500 shadow-rose-600/30",violet:"bg-violet-600 text-white hover:bg-violet-700 focus:ring-violet-500 shadow-violet-600/30"},La={"bottom-right":"fixed bottom-6 right-6","bottom-left":"fixed bottom-6 left-6","bottom-center":"fixed bottom-6 left-1/2 -translate-x-1/2"},Ia=l.forwardRef(({className:t,position:s="bottom-right",color:r="blue",shadow:n=!0,size:a="lg",...o},i)=>e.jsx(Us,{ref:i,...o,size:a,rounded:!0,variant:"primary",className:y(La[s],Ra[r],n&&"shadow-xl","z-50",t)}));Ia.displayName="FAB";const Da=l.forwardRef(({className:t,containerClassName:s,label:r,error:n,hint:a,leftIcon:o,rightIcon:i,onRightIconClick:c,id:u,required:d,disabled:x,...f},b)=>{const v=u||(r==null?void 0:r.toLowerCase().replace(/\s/g,"-")),w=!!n;return e.jsxs("div",{className:y("w-full",s),children:[r&&e.jsxs("label",{htmlFor:v,className:"block text-sm font-medium text-gray-700 mb-1.5",children:[r,d&&e.jsx("span",{className:"text-red-500 ml-0.5",children:"*"})]}),e.jsxs("div",{className:"relative",children:[o&&e.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e.jsx(o,{className:"w-4 h-4 text-gray-400"})}),e.jsx("input",{ref:b,id:v,disabled:x,required:d,"aria-invalid":w,"aria-describedby":w?`${v}-error`:a?`${v}-hint`:void 0,className:y("w-full px-3 py-2.5 text-sm rounded-lg border","transition-all duration-200","placeholder:text-gray-400","focus:outline-none focus:ring-2 focus:ring-offset-0",w?"border-red-300 focus:border-red-500 focus:ring-red-500/20":"border-gray-300 focus:border-primary-500 focus:ring-primary-500/20",x&&"bg-gray-100 cursor-not-allowed opacity-60",o&&"pl-10",i&&"pr-10",t),...f}),i&&e.jsx("div",{className:y("absolute inset-y-0 right-0 pr-3 flex items-center",c&&!x&&"cursor-pointer hover:text-gray-600"),onClick:x?void 0:c,children:e.jsx(i,{className:"w-4 h-4 text-gray-400"})})]}),w&&e.jsx("p",{id:`${v}-error`,className:"mt-1.5 text-sm text-red-600",children:n}),a&&!w&&e.jsx("p",{id:`${v}-hint`,className:"mt-1.5 text-sm text-gray-500",children:a})]})});Da.displayName="Input";const Oa=l.forwardRef(({className:t,containerClassName:s,label:r,error:n,hint:a,id:o,required:i,disabled:c,rows:u=4,...d},x)=>{const f=o||(r==null?void 0:r.toLowerCase().replace(/\s/g,"-")),b=!!n;return e.jsxs("div",{className:y("w-full",s),children:[r&&e.jsxs("label",{htmlFor:f,className:"block text-sm font-medium text-gray-700 mb-1.5",children:[r,i&&e.jsx("span",{className:"text-red-500 ml-0.5",children:"*"})]}),e.jsx("textarea",{ref:x,id:f,disabled:c,required:i,rows:u,"aria-invalid":b,"aria-describedby":b?`${f}-error`:a?`${f}-hint`:void 0,className:y("w-full px-3 py-2.5 text-sm rounded-lg border","transition-all duration-200","placeholder:text-gray-400","resize-y min-h-[100px]","focus:outline-none focus:ring-2 focus:ring-offset-0",b?"border-red-300 focus:border-red-500 focus:ring-red-500/20":"border-gray-300 focus:border-primary-500 focus:ring-primary-500/20",c&&"bg-gray-100 cursor-not-allowed opacity-60",t),...d}),b&&e.jsx("p",{id:`${f}-error`,className:"mt-1.5 text-sm text-red-600",children:n}),a&&!b&&e.jsx("p",{id:`${f}-hint`,className:"mt-1.5 text-sm text-gray-500",children:a})]})});Oa.displayName="TextArea";const Ta=l.forwardRef(({className:t,containerClassName:s,label:r,error:n,hint:a,options:o,placeholder:i,id:c,required:u,disabled:d,...x},f)=>{const b=c||(r==null?void 0:r.toLowerCase().replace(/\s/g,"-")),v=!!n;return e.jsxs("div",{className:y("w-full",s),children:[r&&e.jsxs("label",{htmlFor:b,className:"block text-sm font-medium text-gray-700 mb-1.5",children:[r,u&&e.jsx("span",{className:"text-red-500 ml-0.5",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsxs("select",{ref:f,id:b,disabled:d,required:u,"aria-invalid":v,"aria-describedby":v?`${b}-error`:a?`${b}-hint`:void 0,className:y("w-full px-3 py-2.5 text-sm rounded-lg border","transition-all duration-200","appearance-none cursor-pointer","pr-10","focus:outline-none focus:ring-2 focus:ring-offset-0",v?"border-red-300 focus:border-red-500 focus:ring-red-500/20":"border-gray-300 focus:border-primary-500 focus:ring-primary-500/20",d&&"bg-gray-100 cursor-not-allowed opacity-60",!x.value&&"text-gray-400",t),...x,children:[i&&e.jsx("option",{value:"",disabled:!0,children:i}),o.map(w=>e.jsx("option",{value:w.value,disabled:w.disabled,children:w.label},w.value))]}),e.jsx("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:e.jsx(dt,{className:"w-4 h-4 text-gray-400"})})]}),v&&e.jsx("p",{id:`${b}-error`,className:"mt-1.5 text-sm text-red-600",children:n}),a&&!v&&e.jsx("p",{id:`${b}-hint`,className:"mt-1.5 text-sm text-gray-500",children:a})]})});Ta.displayName="Select";const za={sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8"};function Ks({size:t="md",text:s,fullScreen:r=!1,className:n}){const a=e.jsxs("div",{className:y("flex flex-col items-center justify-center gap-3",n),children:[e.jsx(ct,{className:y("animate-spin text-primary-600",za[t])}),s&&e.jsx("p",{className:"text-sm text-gray-500",children:s})]});return r?e.jsx("div",{className:"fixed inset-0 bg-white/80 backdrop-blur-sm flex items-center justify-center z-50",children:a}):e.jsx("div",{className:"flex items-center justify-center min-h-[200px]",children:a})}const Ma=l.createContext(null);function Re(){const t=l.useContext(Ma),{getFieldState:s,formState:r}=cr();if(!t)throw new Error("useFormField must be used within <FormField>");const n=s(t.name,r);return{id:t.id,name:t.name,...n}}function ft({className:t,children:s,...r}){return e.jsx("div",{className:y("space-y-1.5",t),...r,children:s})}function Bt({className:t,required:s,children:r,...n}){const{id:a,error:o}=Re();return e.jsxs("label",{htmlFor:a,className:y("block text-sm font-medium text-gray-700",o&&"text-red-600",t),...n,children:[r,s&&e.jsx("span",{className:"text-red-500 ml-0.5",children:"*"})]})}function $t({className:t,children:s,...r}){return e.jsx("p",{className:y("text-xs text-gray-500",t),...r,children:s})}function xt({className:t,children:s,...r}){const{id:n,error:a}=Re(),o=(a==null?void 0:a.message)||s;return o?e.jsxs("p",{id:`${n}-error`,className:y("text-xs text-red-600 flex items-center gap-1",t),...r,children:[e.jsx(wt,{className:"w-3 h-3 flex-shrink-0"}),o]}):null}const qa=l.forwardRef(({className:t,label:s,description:r,...n},a)=>{const{id:o,error:i}=Re();
107return e.jsxs(ft,{children:[s&&e.jsx(Bt,{required:n.required,children:s}),e.jsx("input",{ref:a,id:o,className:y("w-full px-3 py-2 text-sm border rounded-lg transition-colors","focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500","disabled:bg-gray-50 disabled:text-gray-500 disabled:cursor-not-allowed",i?"border-red-300 focus:border-red-500 focus:ring-red-500/20":"border-gray-300",t),"aria-invalid":!!i,"aria-describedby":i?`${o}-error`:void 0,...n}),r&&e.jsx($t,{children:r}),e.jsx(xt,{})]})});qa.displayName="FormInput";const Va=l.forwardRef(({className:t,label:s,description:r,...n},a)=>{const{id:o,error:i}=Re();return e.jsxs(ft,{children:[s&&e.jsx(Bt,{required:n.required,children:s}),e.jsx("textarea",{ref:a,id:o,className:y("w-full px-3 py-2 text-sm border rounded-lg transition-colors resize-none","focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500","disabled:bg-gray-50 disabled:text-gray-500 disabled:cursor-not-allowed",i?"border-red-300 focus:border-red-500 focus:ring-red-500/20":"border-gray-300",t),"aria-invalid":!!i,"aria-describedby":i?`${o}-error`:void 0,...n}),r&&e.jsx($t,{children:r}),e.jsx(xt,{})]})});Va.displayName="FormTextArea";const Fa=l.forwardRef(({className:t,label:s,description:r,options:n,placeholder:a,...o},i)=>{const{id:c,error:u}=Re();return e.jsxs(ft,{children:[s&&e.jsx(Bt,{required:o.required,children:s}),e.jsxs("select",{ref:i,id:c,className:y("w-full px-3 py-2 text-sm border rounded-lg transition-colors appearance-none bg-white","focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500","disabled:bg-gray-50 disabled:text-gray-500 disabled:cursor-not-allowed",u?"border-red-300 focus:border-red-500 focus:ring-red-500/20":"border-gray-300",t),"aria-invalid":!!u,"aria-describedby":u?`${c}-error`:void 0,...o,children:[a&&e.jsx("option",{value:"",disabled:!0,children:a}),n.map(d=>e.jsx("option",{value:d.value,disabled:d.disabled,children:d.label},d.value))]}),r&&e.jsx($t,{children:r}),e.jsx(xt,{})]})});Fa.displayName="FormSelect";const Ba=l.forwardRef(({className:t,label:s,description:r,...n},a)=>{const{id:o,error:i}=Re();return e.jsxs(ft,{className:"flex items-start gap-3",children:[e.jsx("input",{ref:a,id:o,type:"checkbox",className:y("mt-0.5 w-4 h-4 rounded border-gray-300 text-blue-600","focus:ring-blue-500 focus:ring-2 focus:ring-offset-0","disabled:opacity-50 disabled:cursor-not-allowed",i&&"border-red-300",t),"aria-invalid":!!i,"aria-describedby":i?`${o}-error`:void 0,...n}),e.jsxs("div",{className:"flex-1",children:[e.jsx("label",{htmlFor:o,className:y("text-sm font-medium text-gray-700 cursor-pointer",i&&"text-red-600"),children:s}),r&&e.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:r}),e.jsx(xt,{})]})]})});Ba.displayName="FormCheckbox";const ls=[{key:"member",label:"교인",icon:e.jsx(re,{className:"w-4 h-4"}),color:"text-blue-600 bg-blue-50"},{key:"offering",label:"헌금",icon:e.jsx(Ce,{className:"w-4 h-4"}),color:"text-emerald-600 bg-emerald-50"},{key:"bulletin",label:"주보",icon:e.jsx(Ne,{className:"w-4 h-4"}),color:"text-purple-600 bg-purple-50"},{key:"event",label:"일정",icon:e.jsx(pe,{className:"w-4 h-4"}),color:"text-orange-600 bg-orange-50"}];function $a({onSearch:t,placeholder:s="교인, 헌금, 주보 검색...",className:r}){const n=Dt(),[a,o]=l.useState(!1),[i,c]=l.useState(""),[u,d]=l.useState([]),[x,f]=l.useState(!1),[b,v]=l.useState(0),[w,_]=l.useState([]),P=l.useRef(null),A=l.useRef(null);l.useEffect(()=>{const j=localStorage.getItem("churchos_recent_searches");if(j)try{_(JSON.parse(j))}catch{}},[]);const D=l.useCallback(j=>{if(!j.trim())return;const h=[j,...w.filter(V=>V!==j)].slice(0,5);_(h),localStorage.setItem("churchos_recent_searches",JSON.stringify(h))},[w]);l.useEffect(()=>{if(!i.trim()){d([]);return}const j=setTimeout(async()=>{f(!0);try{if(t){const h=await t(i);d(h)}else d([{id:"1",type:"member",title:"홍길동",subtitle:"집사",link:"/members/1"},{id:"2",type:"member",title:"김영희",subtitle:"권사",link:"/members/2"}])}catch(h){console.error("Search error:",h),d([])}finally{f(!1)}},300);return()=>clearTimeout(j)},[i,t]);const U=l.useCallback(j=>{j.key==="ArrowDown"?(j.preventDefault(),v(h=>Math.min(h+1,u.length-1))):j.key==="ArrowUp"?(j.preventDefault(),v(h=>Math.max(h-1,0))):j.key==="Enter"&&u[b]?(j.preventDefault(),z(u[b])):j.key==="Escape"&&o(!1)},[u,b]),z=l.useCallback(j=>{D(i),o(!1),c(""),n(j.link)},[i,n,D]);l.useEffect(()=>{const j=h=>{A.current&&!A.current.contains(h.target)&&o(!1)};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[]),l.useEffect(()=>{const j=h=>{(h.metaKey||h.ctrlKey)&&h.key==="k"&&(h.preventDefault(),o(!0),setTimeout(()=>{var V;return(V=P.current)==null?void 0:V.focus()},0))};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[]);const C=j=>{const h=ls.find(V=>V.key===j);
107return(h==null?void 0:h.icon)||e.jsx(Te,{className:"w-4 h-4"})},q=j=>{const h=ls.find(V=>V.key===j);return(h==null?void 0:h.color)||"text-gray-600 bg-gray-50"};return e.jsxs("div",{ref:A,className:y("relative",r),children:[e.jsxs("button",{onClick:()=>{o(!0),setTimeout(()=>{var j;return(j=P.current)==null?void 0:j.focus()},0)},className:y("flex items-center gap-2 px-3 py-2 text-sm","bg-white/10 hover:bg-white/20 text-white/70 hover:text-white","rounded-xl transition-all duration-200","hidden sm:flex"),children:[e.jsx(Te,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden lg:inline",children:"검색"}),e.jsxs("kbd",{className:"hidden lg:inline-flex items-center gap-0.5 px-1.5 py-0.5 text-xs bg-white/10 rounded",children:[e.jsx("span",{children:"⌘"}),"K"]})]}),e.jsx("button",{onClick:()=>{o(!0),setTimeout(()=>{var j;return(j=P.current)==null?void 0:j.focus()},0)},className:"sm:hidden p-2 text-white/70 hover:text-white hover:bg-white/10 rounded-xl transition-all",children:e.jsx(Te,{className:"w-5 h-5"})}),a&&It.createPortal(e.jsxs("div",{className:"fixed inset-0 z-50 flex items-start justify-center pt-[10vh]",children:[e.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>o(!1)}),e.jsxs("div",{className:"relative w-full max-w-2xl mx-4 bg-white rounded-2xl shadow-2xl overflow-hidden animate-scale-in",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-gray-100",children:[e.jsx(Te,{className:"w-5 h-5 text-gray-400 flex-shrink-0"}),e.jsx("input",{ref:P,type:"text",value:i,onChange:j=>{c(j.target.value),v(0)},onKeyDown:U,placeholder:s,className:"flex-1 text-base outline-none placeholder-gray-400",autoComplete:"off"}),x&&e.jsx(ct,{className:"w-5 h-5 text-gray-400 animate-spin"}),i&&!x&&e.jsx("button",{onClick:()=>c(""),className:"p-1 text-gray-400 hover:text-gray-600 rounded-lg hover:bg-gray-100",children:e.jsx(Qe,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>o(!1),className:"hidden sm:block text-xs text-gray-400 px-2 py-1 bg-gray-100 rounded",children:"ESC"})]}),e.jsx("div",{className:"max-h-[60vh] overflow-y-auto",children:i.trim()?u.length>0?e.jsx("div",{className:"py-2",children:u.map((j,h)=>e.jsxs("button",{onClick:()=>z(j),className:y("w-full flex items-center gap-3 px-4 py-3 text-left transition-colors",b===h?"bg-blue-50":"hover:bg-gray-50"),children:[e.jsx("div",{className:y("p-2 rounded-lg",q(j.type)),children:C(j.type)}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"font-medium text-gray-900 truncate",children:j.title}),j.subtitle&&e.jsx("div",{className:"text-sm text-gray-500 truncate",children:j.subtitle})]}),e.jsx(dr,{className:"w-4 h-4 text-gray-400 flex-shrink-0"})]},j.id))}):x?null:e.jsxs("div",{className:"py-12 text-center text-gray-500",children:[e.jsx(Te,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsxs("p",{children:['"',i,'"에 대한 검색 결과가 없습니다.']})]}):e.jsxs("div",{className:"py-4",children:[w.length>0&&e.jsxs("div",{className:"px-4 mb-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("h4",{className:"text-xs font-semibold text-gray-500 uppercase",children:"최근 검색"}),e.jsx("button",{onClick:()=>{_([]),localStorage.removeItem("churchos_recent_searches")},className:"text-xs text-gray-400 hover:text-gray-600",children:"전체 삭제"})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:w.map((j,h)=>e.jsxs("button",{onClick:()=>c(j),className:"flex items-center gap-1.5 px-3 py-1.5 text-sm text-gray-600 bg-gray-100 hover:bg-gray-200 rounded-lg transition-colors",children:[e.jsx(Ns,{className:"w-3 h-3 text-gray-400"}),j]},h))})]}),e.jsxs("div",{className:"px-4",children:[e.jsx("h4",{className:"text-xs font-semibold text-gray-500 uppercase mb-2",children:"빠른 이동"}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:[{label:"교인 목록",link:"/members",icon:e.jsx(re,{className:"w-4 h-4"}),color:"text-blue-600"},{label:"헌금 관리",link:"/finance/offerings",icon:e.jsx(Ce,{className:"w-4 h-4"}),color:"text-emerald-600"},{label:"주보 관리",link:"/content/bulletin",icon:e.jsx(Ne,{className:"w-4 h-4"}),color:"text-purple-600"},{label:"출석 관리",link:"/attendance",icon:e.jsx(pe,{className:"w-4 h-4"}),color:"text-orange-600"}].map(j=>e.jsxs("button",{onClick:()=>{o(!1),n(j.link)},className:"flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 rounded-lg transition-colors",children:[e.jsx("span",{className:j.color,children:j.icon}),j.label]},j.link))})]})]})}),e.jsxs("div",{className:"hidden sm:flex items-center justify-between px-4 py-2 bg-gray-50 border-t border-gray-100 text-xs text-gray-500",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("kbd",{className:"px-1.5 py-0.5 bg-white rounded border shadow-sm",children:"↑"}),e.jsx("kbd",{className:"px-1.5 py-0.5 bg-white rounded border shadow-sm",children:"↓"}),"이동"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("kbd",{className:"px-1.5 py-0.5 bg-white rounded border shadow-sm",children:"Enter"}),"선택"]})]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("kbd",{className:"px-1.5 py-0.5 bg-white rounded border shadow-sm",children:"ESC"}),"닫기"]})]})]})]}),document.body)]})}function Ve({children:t,className:s,colSpan:r=1,rowSpan:n=1}){const a={1:"col-span-1",2:"col-span-1 lg:col-span-2",3:"col-span-1 lg:col-span-3",4:"col-span-1 lg:col-span-4"},o={1:"row-span-1",2:"row-span-1 lg:row-span-2",3:"row-span-1 lg:row-span-3"};return e.jsx("div",{className:y("bg-white rounded-2xl shadow-lg shadow-gray-200/50 border border-gray-100 overflow-hidden",a[r],o[n],s),children:t})}const Ws={blue:"bg-blue-50 text-blue-600",emerald:"bg-emerald-50 text-emerald-600",violet:"bg-violet-50 text-violet-600",amber:"bg-amber-50 text-amber-600",rose:"bg-rose-50 text-rose-600",
107slate:"bg-slate-100 text-slate-600"};function Fe({title:t,subtitle:s,icon:r,iconColor:n="blue",moreLink:a,moreLinkText:o="자세히 보기",actions:i,onRefresh:c,onSettings:u,onExpand:d,menu:x}){return e.jsx("div",{className:"p-4 sm:p-6 border-b border-gray-100",children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[r&&e.jsx("div",{className:y("w-9 h-9 rounded-lg flex items-center justify-center flex-shrink-0",Ws[n]),children:r}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"text-base sm:text-lg font-bold text-gray-900 truncate",children:t}),s&&e.jsx("p",{className:"text-xs sm:text-sm text-gray-500 truncate",children:s})]})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[c&&e.jsx("button",{onClick:c,className:"p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-lg transition-colors",title:"새로고침",children:e.jsx(Ps,{className:"w-4 h-4"})}),u&&e.jsx("button",{onClick:u,className:"p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-lg transition-colors",title:"설정",children:e.jsx(Ge,{className:"w-4 h-4"})}),d&&e.jsx("button",{onClick:d,className:"p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-lg transition-colors",title:"확대",children:e.jsx(ur,{className:"w-4 h-4"})}),x,i,a&&e.jsxs(X,{to:a,className:"hidden sm:flex items-center gap-1 text-sm text-blue-600 hover:text-blue-700 font-medium",children:[o,e.jsx(lt,{className:"w-4 h-4"})]})]})]})})}function Be({children:t,className:s,noPadding:r}){return e.jsx("div",{className:y(!r&&"p-4 sm:p-6",s),children:t})}function et({title:t,value:s,subtitle:r,icon:n,iconColor:a="blue",trend:o,footer:i,link:c,onClick:u}){const d=c?X:u?"button":"div",x=c?{to:c}:u?{onClick:u}:{};return e.jsxs(d,{...x,className:y("bg-white rounded-2xl shadow-lg shadow-gray-200/50 border border-gray-100 p-5 transition-all duration-200",(c||u)&&"hover:shadow-xl hover:scale-[1.02] cursor-pointer"),children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm text-gray-500 font-medium truncate",children:t}),e.jsx("p",{className:"text-2xl sm:text-3xl font-bold text-gray-900 mt-1",children:typeof s=="number"?s.toLocaleString():s}),r&&e.jsx("p",{className:"text-sm text-gray-400 mt-1 truncate",children:r}),o&&e.jsxs("div",{className:"flex items-center gap-1 mt-2",children:[e.jsxs("span",{className:y("text-sm font-medium",o.isPositive!==!1?o.value>=0?"text-emerald-600":"text-red-600":o.value>=0?"text-red-600":"text-emerald-600"),children:[o.value>=0?"+":"",o.value,"%"]}),o.label&&e.jsx("span",{className:"text-xs text-gray-400",children:o.label})]})]}),n&&e.jsx("div",{className:y("w-11 h-11 rounded-lg flex items-center justify-center flex-shrink-0",Ws[a]),children:n})]}),i&&e.jsx("div",{className:"mt-4 pt-4 border-t border-gray-100",children:i})]})}function Ua({children:t,columns:s=4,className:r}){const n={1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"};return e.jsx("div",{className:y("grid gap-4 sm:gap-6",n[s],r),children:t})}function cs({items:t,emptyMessage:s="항목이 없습니다.",maxItems:r=5}){const n=t.slice(0,r);return n.length===0?e.jsx("div",{className:"py-8 text-center text-gray-500",children:e.jsx("p",{className:"text-sm",children:s})}):e.jsx("div",{className:"divide-y divide-gray-100",children:n.map(a=>{const o=a.link?X:a.onClick?"button":"div",i=a.link?{to:a.link}:a.onClick?{onClick:a.onClick}:{};return e.jsxs(o,{...i,className:y("flex items-center gap-3 p-3 -mx-3 first:pt-0 last:pb-0",(a.link||a.onClick)&&"hover:bg-gray-50 rounded-lg cursor-pointer"),children:[a.icon&&e.jsx("div",{className:"w-10 h-10 bg-gray-100 rounded-xl flex items-center justify-center flex-shrink-0",children:a.icon}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-gray-900 truncate",children:a.title}),a.subtitle&&e.jsx("p",{className:"text-xs text-gray-500 truncate",children:a.subtitle})]}),a.badge,(a.link||a.onClick)&&e.jsx(lt,{className:"w-4 h-4 text-gray-300 flex-shrink-0"})]},a.id)})})}const st={primary:"#3B82F6",success:"#10B981",danger:"#EF4444"},ce=["#3B82F6","#8B5CF6","#10B981","#F59E0B","#EF4444","#06B6D4","#EC4899","#84CC16"];function Ut({active:t,payload:s,label:r,valueFormatter:n=o=>
107o.toLocaleString(),labelFormatter:a=o=>o}){return!t||!s||s.length===0?null:e.jsxs("div",{className:"bg-white p-3 rounded-lg shadow-lg border border-gray-100",children:[e.jsx("p",{className:"text-sm font-medium text-gray-900 mb-2",children:a(r)}),s.map((o,i)=>e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:o.color}}),e.jsxs("span",{className:"text-gray-600",children:[o.name,":"]}),e.jsx("span",{className:"font-medium text-gray-900",children:n(o.value)})]},i))]})}function Rl({data:t,lines:s,height:r=300,className:n,showGrid:a=!0,showLegend:o=!0,curved:i=!0,valueFormatter:c,labelFormatter:u}){return e.jsx("div",{className:y("w-full",n),style:{height:r},children:e.jsx(Ye,{width:"100%",height:"100%",children:e.jsxs(As,{data:t,margin:{top:5,right:20,left:0,bottom:5},children:[a&&e.jsx(qt,{strokeDasharray:"3 3",stroke:"#E5E7EB",vertical:!1}),e.jsx(rt,{dataKey:"name",axisLine:!1,tickLine:!1,tick:{fill:"#6B7280",fontSize:12},dy:10}),e.jsx(nt,{axisLine:!1,tickLine:!1,tick:{fill:"#6B7280",fontSize:12},tickFormatter:c,width:60}),e.jsx(ut,{content:e.jsx(Ut,{valueFormatter:c,labelFormatter:u})}),o&&e.jsx(mt,{verticalAlign:"top",height:36,iconType:"circle",iconSize:8,formatter:d=>e.jsx("span",{className:"text-sm text-gray-600",children:d})}),s.map((d,x)=>e.jsx(Rs,{type:i?"monotone":"linear",dataKey:d.dataKey,name:d.name,stroke:d.color||ce[x%ce.length],strokeWidth:d.strokeWidth||2,strokeDasharray:d.dashed?"5 5":void 0,dot:!1,activeDot:{r:6,strokeWidth:2,fill:"#fff"}},d.dataKey))]})})})}function Ka({data:t,bars:s,height:r=300,className:n,showGrid:a=!0,showLegend:o=!0,layout:i="horizontal",barSize:c=20,valueFormatter:u,labelFormatter:d}){const x=i==="vertical";return e.jsx("div",{className:y("w-full",n),style:{height:r},children:e.jsx(Ye,{width:"100%",height:"100%",children:e.jsxs(Gr,{data:t,layout:i,margin:{top:5,right:20,left:0,bottom:5},children:[a&&e.jsx(qt,{strokeDasharray:"3 3",stroke:"#E5E7EB",horizontal:!x,vertical:x}),x?e.jsxs(e.Fragment,{children:[e.jsx(rt,{type:"number",axisLine:!1,tickLine:!1,tick:{fill:"#6B7280",fontSize:12},tickFormatter:u}),e.jsx(nt,{type:"category",dataKey:"name",axisLine:!1,tickLine:!1,tick:{fill:"#6B7280",fontSize:12},width:80})]}):e.jsxs(e.Fragment,{children:[e.jsx(rt,{dataKey:"name",axisLine:!1,tickLine:!1,tick:{fill:"#6B7280",fontSize:12},dy:10}),e.jsx(nt,{axisLine:!1,tickLine:!1,tick:{fill:"#6B7280",fontSize:12},tickFormatter:u,width:60})]}),e.jsx(ut,{content:e.jsx(Ut,{valueFormatter:u,labelFormatter:d})}),o&&e.jsx(mt,{verticalAlign:"top",height:36,iconType:"rect",iconSize:12,formatter:f=>e.jsx("span",{className:"text-sm text-gray-600",children:f})}),s.map((f,b)=>e.jsx(Hr,{dataKey:f.dataKey,name:f.name,fill:f.color||ce[b%ce.length],stackId:f.stackId,barSize:c,radius:[4,4,0,0]},f.dataKey))]})})})}function Wa({data:t,height:s=300,className:r,showLegend:n=!0,donut:a=!1,valueFormatter:o=c=>c.toLocaleString(),label:i=!1}){const c=t.reduce((d,x)=>d+x.value,0),u=d=>i==="percent"?`${(d.percent*100).toFixed(0)}%`:i==="value"?o(d.value):d.name;return e.jsx("div",{className:y("w-full",r),style:{height:s},children:e.jsx(Ye,{width:"100%",height:"100%",children:e.jsxs(Yr,{children:[e.jsx(Xr,{data:t,cx:"50%",cy:"50%",innerRadius:a?"60%":0,outerRadius:"80%",paddingAngle:2,dataKey:"value",label:i?u:void 0,labelLine:i?{stroke:"#9CA3AF",strokeWidth:1}:!1,children:t.map((d,x)=>e.jsx(Zr,{fill:d.color||ce[x%ce.length]},d.name))}),e.jsx(ut,{content:({active:d,payload:x})=>{if(!d||!x||x.length===0)return null;const f=x[0].payload;return e.jsxs("div",{className:"bg-white p-3 rounded-lg shadow-lg border border-gray-100",children:[e.jsx("p",{className:"text-sm font-medium text-gray-900",children:f.name}),e.jsxs("p",{className:"text-sm text-gray-600",children:[o(f.value)," (",(f.value/c*100).toFixed(1),"%)"]})]})}}),n&&e.jsx(mt,{verticalAlign:"bottom",height:36,iconType:"circle",iconSize:8,formatter:d=>e.jsx("span",{className:"text-sm text-gray-600",children:d})})]})})})}function Ga(t){return e.jsx(Wa,{...t,donut:!0})}function Ll({data:t,areas:s,height:r=300,className:n,showGrid:a=!0,showLegend:o=!0,curved:i=!0,valueFormatter:c,labelFormatter:u}){return e.jsx("div",{className:y("w-full",n),style:{height:r},children:e.jsx(Ye,{width:"100%",height:"100%",children:e.jsxs(Jr,{data:t,margin:{top:5,right:20,left
107:0,bottom:5},children:[a&&e.jsx(qt,{strokeDasharray:"3 3",stroke:"#E5E7EB",vertical:!1}),e.jsx(rt,{dataKey:"name",axisLine:!1,tickLine:!1,tick:{fill:"#6B7280",fontSize:12},dy:10}),e.jsx(nt,{axisLine:!1,tickLine:!1,tick:{fill:"#6B7280",fontSize:12},tickFormatter:c,width:60}),e.jsx(ut,{content:e.jsx(Ut,{valueFormatter:c,labelFormatter:u})}),o&&e.jsx(mt,{verticalAlign:"top",height:36,iconType:"rect",iconSize:12,formatter:d=>e.jsx("span",{className:"text-sm text-gray-600",children:d})}),s.map((d,x)=>{const f=d.color||ce[x%ce.length];return e.jsx(Qr,{type:i?"monotone":"linear",dataKey:d.dataKey,name:d.name,stroke:f,fill:f,fillOpacity:d.fillOpacity??.2,stackId:d.stackId},d.dataKey)})]})})})}function Ha({data:t,color:s,height:r=40,className:n,showDot:a=!0,trend:o}){const i=t.map((u,d)=>({index:d,value:u})),c=o==="up"?st.success:o==="down"?st.danger:s||st.primary;return e.jsx("div",{className:y("w-full",n),style:{height:r},children:e.jsx(Ye,{width:"100%",height:"100%",children:e.jsx(As,{data:i,children:e.jsx(Rs,{type:"monotone",dataKey:"value",stroke:c,strokeWidth:2,dot:!1,activeDot:a?{r:4,fill:c}:!1})})})})}function Il({value:t,max:s=100,size:r=120,strokeWidth:n=10,color:a=st.primary,bgColor:o="#E5E7EB",showValue:i=!0,valueFormatter:c=(d,x)=>`${Math.round(d/x*100)}%`,className:u}){const d=(r-n)/2,x=d*2*Math.PI,f=Math.min(t/s,1),b=x-f*x;return e.jsxs("div",{className:y("relative inline-flex",u),style:{width:r,height:r},children:[e.jsxs("svg",{width:r,height:r,className:"transform -rotate-90",children:[e.jsx("circle",{cx:r/2,cy:r/2,r:d,stroke:o,strokeWidth:n,fill:"none"}),e.jsx("circle",{cx:r/2,cy:r/2,r:d,stroke:a,strokeWidth:n,fill:"none",strokeLinecap:"round",strokeDasharray:x,strokeDashoffset:b,className:"transition-all duration-500 ease-out"})]}),i&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx("span",{className:"text-lg font-semibold text-gray-900",children:c(t,s)})})]})}const ds=[{to:"/dashboard",label:"대시보드",icon:Ot,paths:["/","/dashboard"]},{to:"/members",label:"교인",icon:re,paths:["/members","/attendance","/pastoral"]},{to:"/education-admin",label:"교육",icon:Es,paths:["/education"]},{to:"/content/bulletin",label:"소통",icon:Tt,paths:["/content"]},{to:"/finance",label:"재정",icon:Ce,paths:["/finance"]},{to:"/settings",label:"시스템",icon:Ge,paths:["/settings"]}];function Ja(){var u,d;const t=it(),s=Dt(),{user:r}=Se(),{toggle:n}=mo(),[a,o]=l.useState(!1),i=x=>x.some(f=>t.pathname===f||t.pathname.startsWith(f+"/")),c=async()=>{try{await ot.signOut(),ve.success("로그아웃되었습니다."),s("/login")}catch(x){console.error("로그아웃 실패:",x),ve.error("로그아웃에 실패했습니다.")}};return e.jsx("header",{className:"sticky top-0 z-30 h-16 gradient-header shadow-lg shadow-blue-900/20",children:e.jsxs("div",{className:"h-full px-4 lg:px-6 flex items-center",children:[e.jsx("button",{className:"lg:hidden p-2 -ml-2 mr-2 text-white/70 hover:text-white hover:bg-white/10 rounded-xl transition-all",onClick:n,"aria-label":"메뉴 열기",children:e.jsx(mr,{className:"w-5 h-5"})}),e.jsxs(X,{to:"/dashboard",className:"flex items-center gap-2 sm:gap-3 mr-4 lg:mr-10 group",children:[e.jsx("div",{className:"w-9 h-9 sm:w-10 sm:h-10 bg-white/10 backdrop-blur rounded-xl flex items-center justify-center group-hover:bg-white/20 transition-all duration-300",children:e.jsx("img",{src:"/pic/logo.png",alt:"서둔교회",className:"h-6 sm:h-7 w-auto"})}),e.jsxs("div",{className:"hidden sm:flex flex-col",children:[e.jsx("span",{className:"text-[15px] sm:text-[16px] font-bold text-white tracking-tight",children:"ChurchOS"}),e.jsx("span",{className:"text-[9px] sm:text-[10px] text-blue-200/80 font-medium",children:"서둔교회 관리 시스템"})]})]}),e.jsx("nav",{className:"hidden lg:flex gap-1 bg-white/5 backdrop-blur-sm rounded-xl p-1",children:ds.map(x=>e.jsx(Qa,{to:x.to,active:i(x.paths),children:x.label},x.to))}),e.jsx("div",{className:"lg:hidden flex-1 flex justify-center",children:e.jsx("span",{className:"text-sm font-medium text-white/90",children:((u=ds.find(x=>i(x.paths)))==null?void 0:u.label)||"대시보드"})}),e.jsxs("div",{className:"ml-auto flex items-center gap-1 sm:gap-2",children:[e.jsx($a,{}
107),e.jsx(xa,{className:"w-9 h-9 sm:w-10 sm:h-10 text-white/70 hover:text-white hover:bg-white/10"}),e.jsx("div",{className:"hidden sm:block h-8 w-px bg-white/10 mx-1 sm:mx-2"}),e.jsxs("div",{className:"relative",children:[e.jsxs("button",{onClick:()=>o(!a),className:"flex items-center gap-2 sm:gap-3 px-2 sm:px-3 py-1.5 sm:py-2 hover:bg-white/10 rounded-xl transition-all duration-200",children:[e.jsx("div",{className:"w-8 h-8 sm:w-9 sm:h-9 bg-gradient-to-br from-cyan-400 to-blue-500 rounded-xl flex items-center justify-center text-xs sm:text-sm text-white font-bold shadow-lg shadow-blue-500/30",children:((d=r==null?void 0:r.name)==null?void 0:d.charAt(0))||"?"}),e.jsxs("div",{className:"hidden md:flex flex-col items-start",children:[e.jsx("span",{className:"text-sm text-white font-semibold leading-none",children:(r==null?void 0:r.name)||"알 수 없음"}),(r==null?void 0:r.role)&&e.jsx("span",{className:"text-[11px] text-white/60 leading-none mt-1",children:r.role})]}),e.jsx(dt,{size:16,className:"hidden sm:block text-white/60"})]}),a&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>o(!1)}),e.jsxs("div",{className:"absolute right-0 top-full mt-2 sm:mt-3 w-56 sm:w-64 bg-white rounded-xl sm:rounded-2xl shadow-2xl shadow-gray-900/20 border border-gray-100 py-2 z-20 animate-scale-in",children:[e.jsxs("div",{className:"px-4 py-3 sm:py-4 border-b border-gray-100",children:[e.jsx("p",{className:"text-sm sm:text-base font-bold text-gray-900",children:r==null?void 0:r.name}),e.jsx("p",{className:"text-xs sm:text-sm text-gray-500 mt-0.5 truncate",children:r==null?void 0:r.email}),(r==null?void 0:r.role)&&e.jsx("span",{className:"inline-block mt-2 sm:mt-3 px-2.5 sm:px-3 py-0.5 sm:py-1 bg-gradient-to-r from-blue-50 to-cyan-50 text-blue-700 text-xs font-semibold rounded-full",children:r.role})]}),e.jsxs("div",{className:"p-1.5 sm:p-2",children:[e.jsxs(X,{to:"/settings",className:"w-full px-3 py-2 sm:py-2.5 text-left text-sm text-gray-700 hover:bg-gray-50 rounded-lg sm:rounded-xl flex items-center gap-3 transition-colors",onClick:()=>o(!1),children:[e.jsx(hr,{size:18,className:"text-gray-400"}),"내 정보"]}),e.jsxs("button",{onClick:c,className:"w-full px-3 py-2 sm:py-2.5 text-left text-sm text-red-600 hover:bg-red-50 rounded-lg sm:rounded-xl flex items-center gap-3 transition-colors",children:[e.jsx(fr,{size:18}),"로그아웃"]})]})]})]})]})]})]})})}function Qa({to:t,children:s,active:r}){return e.jsx(X,{to:t,className:y("px-4 py-2 flex items-center text-sm rounded-lg transition-all duration-200 font-medium",r?"bg-white text-blue-700 shadow-md":"text-white/80 hover:bg-white/10 hover:text-white"),children:s})}function ke(t){return t instanceof fe||t&&typeof t=="object"&&"toDate"in t?t.toDate().toISOString():typeof t=="string"?t:new Date().toISOString()}const be="staff_announcements";function Ya(t){const s=t.data();return{id:t.id,title:s.title||"",content:s.content||"",priority:s.priority||"normal",is_pinned:s.is_pinned||!1,attachments:s.attachments||[],read_by:s.read_by||[],download_count:s.download_count||0,author_id:s.author_id||"",author_name:s.author_name||"",created_at:ke(s.created_at),updated_at:ke(s.updated_at)}}const Dl={async create(t){return(await Je(B(E,be),{...t,read_by:[],created_at:le(),updated_at:le()})).id},async update(t,s){const r=Object.fromEntries(Object.entries(s).filter(([,n])=>n!==void 0));delete r.id,delete r.created_at,await $(I(E,be,t),{...r,updated_at:le()})},async delete(t){await He(I(E,be,t))},async getAll(){const t=J(B(E,be),Ee("created_at","desc"));return(await Y(t)).docs.map(n=>Ya(n)).sort((n,a)=>n.is_pinned&&!a.is_pinned?-1:!n.is_pinned&&a.is_pinned?1:0)},async markAsRead(t,s){await $(I(E,be,t),{read_by:Mt(s)})},async incrementDownloadCount(t){await $(I(E,be,t),{download_count:kt(1)})}},me="staff_posts",vt="staff_post_comments";function Xa(t){const s=t.data();return{id:t.id,board_type:s.board_type||"free",title:s.title||"",content:s.content||"",attachments:s.attachments||[],comment_count:s.comment_count||0,view_count:s.view_count||0,viewed_by:s.viewed_by||[],download_count:s.download_count||0,author_id:s.author_id||"",author_name:s.author_name||"",created_at:ke(s.created_at),updated_at:ke(s.updated_at)}}function Za(t){const s=t.data();return{id:t.id,post_id:s.post_id||"",content:s.content||"",author_id:s.author_id||"",author_name:s.author_name||"",created_at:ke(s.created_at)}}const Ol={async create(t){return(await Je(B(E,me),{...t,comment_count:0,created_at:le(),updated_at:le()}
107)).id},async update(t,s){const r=Object.fromEntries(Object.entries(s).filter(([,n])=>n!==void 0));delete r.id,delete r.created_at,await $(I(E,me,t),{...r,updated_at:le()})},async delete(t){await He(I(E,me,t))},async getByBoard(t){const s=J(B(E,me),Q("board_type","==",t),Ee("created_at","desc"));return(await Y(s)).docs.map(n=>Xa(n))},async markAsViewed(t,s){await $(I(E,me,t),{view_count:kt(1),viewed_by:Mt(s)})},async incrementDownloadCount(t){await $(I(E,me,t),{download_count:kt(1)})},async addComment(t){const s=await Je(B(E,vt),{...t,created_at:le()}),r=I(E,me,t.post_id),n=await xe(r);if(n.exists()){const a=n.data().comment_count||0;await $(r,{comment_count:a+1})}return s.id},async getComments(t){const s=J(B(E,vt),Q("post_id","==",t),Ee("created_at","asc"));return(await Y(s)).docs.map(n=>Za(n))},async deleteComment(t){await He(I(E,vt,t))}},$e="staff_notifications";function eo(t){const s=t.data();return{id:t.id,type:s.type||"report",title:s.title||"",body:s.body||"",link:s.link,reference_id:s.reference_id,is_read:s.is_read||!1,recipient_id:s.recipient_id||"",sender_id:s.sender_id,sender_name:s.sender_name,created_at:ke(s.created_at)}}const to={async getMyNotifications(t){const s=J(B(E,$e),Q("recipient_id","==",t),Ee("created_at","desc"));return(await Y(s)).docs.map(n=>eo(n))},async markAsRead(t){await $(I(E,$e,t),{is_read:!0})},async markAllAsRead(t){const r=(await this.getMyNotifications(t)).filter(n=>!n.is_read).map(n=>$(I(E,$e,n.id),{is_read:!0}));await Promise.all(r)},async getUnreadCount(t){const s=J(B(E,$e),Q("recipient_id","==",t),Q("is_read","==",!1));return(await Y(s)).size},async delete(t){await He(I(E,$e,t))}};function so({onNavigate:t}){var Ie;const s=it(),{user:r,hasPermission:n,hasResourcePermission:a,isRole:o}=Se(),[i,c]=l.useState(!1),[u,d]=l.useState(!1),[x,f]=l.useState(!1),[b,v]=l.useState(!1),[w,_]=l.useState(!1),[P,A]=l.useState(!1),[D,U]=l.useState(!1),[z,C]=l.useState(!1),[q,j]=l.useState(0),h=R=>s.pathname===R||s.pathname.startsWith(R+"/"),V=s.pathname.startsWith("/finance"),M=R=>o("최고관리자")?!0:n(R),T=R=>o("최고관리자")?!0:a(R),L=o("최고관리자"),Le=o("최고관리자","관리자")||M("settings"),ne=M("media")||((Ie=r==null?void 0:r.roles)==null?void 0:Ie.includes("media-admin")),[Xe,de]=l.useState(new Set),G=R=>{de(De=>{const Z=new Set(De);return Z.has(R)?Z.delete(R):Z.add(R),Z})},W=R=>Xe.has(R);if(l.useEffect(()=>{const R=s.pathname,De=[["members",["/members","/attendance","/pastoral/counseling"]],["pastoral",["/pastoral"]],["visits",["/pastoral/visits"]],["staff",["/staff"]],["council",["/council","/council/lost-sheep"]],["education",["/education","/education2-admin","/silver-university"]],["communication",["/content","/culture","/family","/academy","/men-admin","/women-admin","/deacons-admin","/elders-women-admin"]],["media",["/media","/gallery-posts"]],["church",["/church-settings"]],["system",["/settings","/help"]]];for(const[Z,pt]of De)if(pt.some(ae=>R===ae||R.startsWith(ae+"/"))){de(ae=>{if(ae.has(Z))return ae;const Ze=new Set(ae);return Ze.add(Z),Ze});break}},[s.pathname]),l.useEffect(()=>{!(r!=null&&r.uid)||!M("staffOffice")||to.getUnreadCount(r.uid).then(j).catch(()=>{})},[r==null?void 0:r.uid]),V&&!M("finance")&&(M("deptLedger")||r!=null&&r.assignedDepartmentId))return e.jsx("aside",{className:"w-full bg-white pb-8",children:e.jsxs("nav",{className:"p-3 space-y-0.5",children:[e.jsx(F,{icon:ze,to:"/finance",active:s.pathname==="/finance",color:"slate",onClick:t,children:"홈"}),e.jsx(F,{icon:gt,to:"/finance/budget-plan",active:h("/finance/budget-plan"),color:"violet",onClick:t,children:"예산편성"}),e.jsx(F,{icon:bt,to:"/finance/dept-ledger",active:h("/finance/dept-ledger"),color:"sky",onClick:t,children:"부서장부"})]})});if(V&&M("finance")){const R=h("/finance/income")||h("/finance/offerings"),De=h("/finance/expense")||h("/finance/expenses"),Z=h("/finance/budget")||h("/finance/income-budget"),pt=h("/finance/reports")||h("/finance/monthly-report")||h("/finance/donor-stats")||h("/finance/donation-receipt")||h("/finance/settlement"),ae=h("/finance/setup")||h("/finance/departments")||h("/finance/bank-accounts")||h("/finance/accounts"),Ze=h("/finance/dept-ledger")&&!h("/finance/dept-ledger/audit"),Hs=h("/finance/dept-ledger/audit"),Kt=o("최고관리자","본회계","재정부장"),Js=o("부서회계")||(r==null?void 0:r.assignedDepartmentId);return e.jsx("aside",{className:"w-full bg-white pb-8",children:e.jsxs("nav",{className:"p-3 space-y-0.5",children:[e.jsx(F,{icon:ze,to:"/finance",active:s.pathname==="/finance",color:"slate",onClick:t,children:"홈"}),e.jsx(F,{icon:ks,to:"/finance/income",active:R,color:"emerald",onClick:t,children:"수입"}),e.jsx(F,{icon:Wt,to:"/finance/expense",active:De,color:"rose",onClick:t,children:"지출"}),e.jsx(F,{icon:xr,to:"/finance/budget",active:Z,color:"violet",onClick:t,children:"예산"}),e.jsx(F,{icon:gt,to:"/finance/budget-plan",active:h("/finance/budget-plan"),color:"violet",onClick:t,children:"예산편성"}),e.jsx(F,{icon:Ne,to:"/finance/reports",active:pt,color:"sky",onClick:t,children:"보고서"}),e.jsx(F,{icon:pr,to:"/finance/month-close",active:h("/finance/month-close"),color:"violet",onClick:t,children:"월마감"}),e.jsx(F,{icon:Ge,to:"/finance/settings",active:ae,color:"slate",onClick:t,children:"설정"}),e.jsx(F,{icon:Ce,to:"/finance/offering-types",active:h("/finance/offering-types"),color:"emerald",onClick:t,children:"헌금유형"}),e.jsx(F,{icon:Wt,to:"/finance/expense-categories",active:h("/finance/expense-categories"),color:"rose",onClick:t,children:"지출카테고리"}),(Js||Kt)&&e.jsx(F,{icon:bt,to:"/finance/dept-ledger",active:Ze,color:"sky",onClick:t,children:"부서장부"}),Kt&&e.jsx(F,{icon:gr,to:"/finance/dept-ledger/audit",active:Hs,color:"violet",onClick:t,children:"장부감사"})]})})}const H=(r==null?void 0:r.role)==="담당자";return e.jsxs("aside",{className:"w-full bg-white pb-8",children:[!H&&e.jsx("div",{className:"p-3",children:e.jsx(k,{icon:ze,to:"/dashboard",active:h("/dashboard")||s.pathname==="/",onClick:t,children:"대시보드"})}),(M("members")||M("pastoral"))&&e.jsxs(te,{label:"교인",isExpanded:W("members"),onToggle:()=>G("members"),children:[M("members")&&e.jsxs(e.Fragment,{children:[e.jsx(k,{icon:re,to:"/members",active:h("/members")&&!h("/members/edit-requests"),onClick:t,children:"교적부"}),e.jsx(k,{icon:br,to:"/members/edit-requests",active:h("/members/edit-requests"),onClick:t,children:"정보수정요청"}),e.jsx(k,{icon:tt,to:"/members/new-family",active:h("/members/new-family"),onClick:t,children:"새가족관리"}),e.jsx(k,{icon:Pt,to:"/attendance",active:h("/attendance")&&!h("/attendance/dashboard")&&!h("/attendance/absentees"),onClick:t,children:"출석관리"}),e.jsx(k,{icon:yr,to:"/attendance/dashboard",active:h("/attendance/dashboard"),onClick:t,children:"출석통계"}),e.jsx(k,{icon:jr,to:"/attendance/absentees",active:h("/attendance/absentees"),onClick:t,children:"결석자관리"}),e.jsx(k,{icon:Ge,to:"/attendance/settings",active:h("/attendance/settings"),onClick:t,children:"출석설정"})]}),M("pastoral")&&e.jsxs(e.Fragment,{children:[e.jsx(k,{icon:Nt,to:"/pastoral",active:h("/pastoral")&&!h("/pastoral/counseling"),onClick:t,children:"목양"}),!o("관리자")&&e.jsx(k,{icon:We,to:"/pastoral/counseling",active:h("/pastoral/counseling"),onClick:t,children:"상담"})]})]}),(o("최고관리자","관리자","담임목사")||T("sms"))&&e.jsx("div",{className:"px-3 pb-1",children:e.jsx(k,{icon:Tt,to:"/messaging",active:h("/messaging"),onClick:t,children:"문자발송"})}),M("pastoral")&&e.jsx(te,{label:"심방관리",isExpanded:W("visits"),onToggle:()=>G("visits"),children:e.jsx(k,{icon:Ot,to:"/pastoral/visits",active:h("/pastoral/visits"),onClick:t,children:"심방기록"})}),M("staffOffice")&&e.jsxs(te,{label:"교역자실",isExpanded:W("staff"),onToggle:()=>G("staff"),children:[e.jsx(k,{icon:ze,to:"/staff/dashboard",active:h("/staff/dashboard")||s.pathname==="/staff",onClick:t,children:"대시보드"}),e.jsx(k,{icon:gt,to:"/staff/reports",active:h("/staff/reports"),onClick:t,children:"업무보고"}),e.jsx(k,{icon:pe,to:"/staff/calendar",active:h("/staff/calendar"),onClick:t,children:"캘린더"}),e.jsxs(Ue,{icon:We,label:"소통",isExpanded:D,onToggle:()=>U(!D),isActive:h("/staff/announcements")||h("/staff/board")||h("/staff/notifications"),children:[e.jsx(S,{to:"/staff/announcements",active:h("/staff/announcements"),onClick:t,children:"공지사항"}),e.jsx(S,{to:"/staff/board",active:h("/staff/board"),onClick:t,children:"게시판"}),e.jsx(S,{to:"/staff/notifications",active:h("/staff/notifications"),onClick:t,badge:q,children:"알림센터"})]}),e.jsx(k,{icon:vr,to:"/staff/approvals",active:h("/staff/approvals"),onClick:t,children:"결재"})]}),(M("council")||o("당회"))&&e.jsxs(te,{label:"당회",isExpanded:W("council"),onToggle:()=>G("council"),children:[M("council")&&e.jsxs(e.Fragment,{children:[e.jsx(k,{icon:ze,to:"/council",active:s.pathname==="/council",onClick:t,children:"대시보드"}),e.jsx(k,{icon:Ne,to:"/council/meetings",active:h("/council/meetings"),onClick:t,children:"안건/회의록"}),e.jsx(k,{icon:Gt,to:"/council/voting",active:h("/council/voting"),onClick:t,children:"투표/의결"}),e.jsxs(Ue,{icon:We,label:"소통",isExpanded:z,onToggle:()=>C(!z),isActive:h("/council/reports")||h("/council/suggestions")||h("/council/chat"),children:[e.jsx(S,{to:"/council/reports",active:h("/council/reports"),onClick:t,children:"각부보고"}),e.jsx(S,{to:"/council/suggestions",active:h("/council/suggestions"),onClick:t,children:"건의함"}),e.jsx(S,{to:"/council/chat",active:h("/council/chat"),onClick:t,children:"채팅"})]}),e.jsx(k,{icon:pe,to:"/council/schedule",active:h("/council/schedule"),onClick:t,children:"일정"})]}),e.jsx(k,{icon:Ht,to:"/council/lost-sheep",active:h("/council/lost-sheep"),onClick:t,children:"교적부 재정비(잃은양 찾기)"})]}),(T("education")||T("silver_university")||!H&&M("content"))&&e.jsxs(te,{label:"교육",isExpanded:W("education"),onToggle:()=>G("education"),children:[T("education")&&e.jsxs(Ue,{icon:Es,label:"교회학교 관리",isExpanded:u,onToggle:()=>d(!u),isActive:h("/education"),children:[e.jsx(S,{to:"/education",active:s.pathname==="/education",onClick:t,children:"대시보드"}),e.jsx(S,{to:"/education/students",active:h("/education/students"),onClick:t,children:"학생 관리"}),e.jsx(S,{to:"/education/teachers",active:h("/education/teachers"),onClick:t,children:"교사 관리"}),e.jsx(S,{to:"/education/attendance",active:h("/education/attendance"),onClick:t,children:"출결 관리"}),e.jsx(S,{to:"/education/organization",active:h("/education/organization"),onClick:t,children:"조직 관리"}),e.jsx(S,{to:"/education/reports",active:h("/education/reports"),onClick:t,children:"보고서"}),e.jsx(S,{to:"/education/visitations",active:h("/education/visitations"),onClick:t,children:"심방 관리"})]}),!H&&e.jsx(S,{to:"/education2-admin",active:h("/education2-admin"),onClick:t,children:"청년부"}),T("silver_university")&&e.jsx(S,{to:"/silver-university",active:h("/silver-university"),onClick:t,children:"실버대학"})]}),M("content")&&e.jsxs(te,{label:"소통",isExpanded:W("communication"),onToggle:()=>G("communication"),children:[!H&&e.jsxs(Ue,{icon:_e,label:"소통 관리",isExpanded:x,onToggle:()=>f(!x),isActive:h("/content"),children:[T("notices")&&e.jsx(S,{to:"/content/notices",active:h("/content/notices"),onClick:t,children:"공지사항"}),T("notices")&&e.jsx(S,{to:"/content/family-events",active:h("/content/family-events"),onClick:t,children:"경조사 소식"}),T("bulletin")&&e.jsx(S,{to:"/content/bulletin-converter",active:h("/content/bulletin-converter"),onClick:t,children:"주보관리"}),T("banner")&&e.jsx(S,{to:"/content/banner",active:h("/content/banner"),onClick:t,children:"배너"}),T("push")&&e.jsx(S,{to:"/content/push",active:h("/content/push"),onClick:t,children:"푸시알림"}),T("qt_management")&&e.jsx(S,{to:"/content/qt",active:h("/content/qt"),onClick:t,children:"QT관리"}),T("council_board")&&e.jsx(S,{to:"/content/council",active:h("/content/council"),onClick:t,children:"당회게시판"}),T("resources")&&e.jsx(S,{to:"/content/resources",active:h("/content/resources"),onClick:t,children:"자료실"}),T("events")&&e.jsx(S,{to:"/content/events",active:h("/content/events"),onClick:t,children:"일정관리"}),!H&&e.jsxs(e.Fragment,{children:[e.jsx(S,{to:"/content/community-prayers",active:h("/content/community-prayers"),onClick:t,children:"합심기도"}),e.jsx(S,{to:"/content/worship-committee",active:h("/content/worship-committee"),onClick:t,children:"예배/안내위원"}),e.jsx(S,{to:"/content/lent-registration",active:h("/content/lent-registration"),onClick:t,children:"사순절 신청"}),e.jsx(S,{to:"/content/popups",active:h("/content/popups"),onClick:t,children:"팝업 관리"})]})]}),T("culture")&&e.jsx(k,{icon:_r,to:"/culture",active:h("/culture"),onClick:t,children:"문화강좌"}),T("family")&&e.jsx(k,{icon:Nt,to:"/family",active:h("/family"),onClick:t,children:"가정사역"}),T("academy")&&e.jsx(k,{icon:bt,to:"/academy",active:h("/academy"),onClick:t,children:"서둔아카데미"}),T("missions")&&e.jsxs(Ue,{icon:re,label:"선교회 관리",isExpanded:b,onToggle:()=>v(!b),isActive:h("/men-admin")||h("/women-admin")||h("/deacons-admin")||h("/elders-women-admin"),children:[e.jsx(S,{to:"/men-admin",active:h("/men-admin"),onClick:t,children:"남선교회"}),e.jsx(S,{to:"/women-admin",active:h("/women-admin"),onClick:t,children:"여전도회"}),e.jsx(S,{to:"/deacons-admin",active:h("/deacons-admin"),onClick:t,children:"안수집사회"}),e.jsx(S,{to:"/elders-women-admin",active:h("/elders-women-admin"),onClick:t,children:"권사회"})]})]}),ne&&e.jsxs(te,{label:"미디어",isExpanded:W("media"),onToggle:()=>G("media"),children:[(T("albums")||ne)&&e.jsx(k,{icon:Jt,to:"/media",active:h("/media")&&!h("/gallery-posts"),onClick:t,children:"앨범관리"}),(T("gallery_posts")||ne)&&e.jsx(k,{icon:wr,to:"/gallery-posts",active:h("/gallery-posts"),onClick:t,children:"게시물관리"})]}),M("churchSettings")&&e.jsx(te,{label:"교회",isExpanded:W("church"),onToggle:()=>G("church"),children:e.jsx(k,{icon:Pr,to:"/church-settings",active:h("/church-settings"),onClick:t,children:"교회설정"})}),e.jsxs(te,{label:"시스템",isExpanded:W("system"),onToggle:()=>G("system"),children:[Le&&e.jsxs(e.Fragment,{children:[e.jsx(k,{icon:Ge,to:"/settings",active:h("/settings")&&!h("/settings/app-users")&&!h("/settings/access-logs"),onClick:t,children:"설정"}),e.jsx(k,{icon:re,to:"/settings/app-users",active:h("/settings/app-users"),onClick:t,children:"회원관리"})]}),L&&e.jsxs(e.Fragment,{children:[e.jsx(k,{icon:Cs,to:"/settings/access-logs",active:h("/settings/access-logs"),onClick:t,children:"접속로그"}),e.jsx(k,{icon:ws,to:"/settings/error-reports",active:h("/settings/error-reports"),onClick:t,children:"오류신고"}),e.jsx(k,{icon:Jt,to:"/settings/guide-images",active:h("/settings/guide-images"),onClick:t,children:"가이드 이미지"}),e.jsx(k,{icon:Nr,to:"/settings/backup",active:h("/settings/backup"),onClick:t,children:"데이터 백업"}),e.jsx(k,{icon:Ht,to:"/settings/system-health",active:h("/settings/system-health"),onClick:t,children:"시스템 점검"})]}),Le&&e.jsx(ro,{icon:Gt,href:"https://seodoon-church-election.web.app",children:"선거/투표/설문"}),e.jsx(k,{icon:Er,to:"/help",active:h("/help"),onClick:t,children:"도움말"})]})]})}function te({label:t,isExpanded:s,onToggle:r,children:n}){return e.jsxs("div",{className:"px-3 pb-1",children:[e.jsxs("button",{onClick:r,className:"mx-1 mt-2 w-[calc(100%-8px)] flex items-center justify-between px-3 py-1.5 text-sm font-bold text-gray-700 bg-gray-100 rounded cursor-pointer hover:bg-gray-200 transition-colors",children:[e.jsx("span",{children:t}),e.jsx(dt,{className:y("w-4 h-4 text-gray-400 transition-transform duration-200",s&&"rotate-180")}
107)]}),e.jsx("div",{className:y("overflow-hidden transition-all duration-200",s?"max-h-[800px] opacity-100 mt-1":"max-h-0 opacity-0"),children:e.jsx("div",{className:"space-y-0.5",children:n})})]})}function k({icon:t,to:s,children:r,active:n,onClick:a}){return e.jsxs(X,{to:s,onClick:a,className:y("flex items-center px-3 py-2.5 text-sm rounded-lg transition-all duration-200",n?"bg-blue-600 text-white font-semibold":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"),children:[e.jsx(t,{className:y("w-[18px] h-[18px] mr-3",n?"text-white":"text-gray-400")}),e.jsx("span",{children:r})]})}function ro({icon:t,href:s,children:r,active:n}){return e.jsxs("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:y("flex items-center px-3 py-2.5 text-sm rounded-lg transition-all duration-200 group",n?"bg-blue-600 text-white font-semibold":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"),children:[e.jsx(t,{className:y("w-[18px] h-[18px] mr-3",n?"text-white":"text-gray-400")}),e.jsx("span",{className:"flex-1",children:r}),e.jsx(kr,{className:"w-3.5 h-3.5 opacity-0 group-hover:opacity-50 transition-opacity"})]})}function Ue({icon:t,label:s,isExpanded:r,onToggle:n,isActive:a,children:o}){return e.jsxs("div",{children:[e.jsxs("button",{onClick:n,className:y("w-full flex items-center justify-between px-3 py-2.5 text-sm rounded-lg transition-all duration-200",a?"bg-blue-600 text-white font-semibold":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"),children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx(t,{className:y("w-[18px] h-[18px] mr-3",a?"text-white":"text-gray-400")}),e.jsx("span",{children:s})]}),e.jsx(dt,{className:y("w-4 h-4 transition-transform duration-200",r&&"rotate-180")})]}),e.jsx("div",{className:y("overflow-hidden transition-all duration-200",r?"max-h-[600px] opacity-100":"max-h-0 opacity-0"),children:e.jsx("div",{className:"ml-3 mt-1 pl-3 border-l-2 border-gray-200 space-y-0.5",children:o})})]})}function S({to:t,children:s,active:r,onClick:n,badge:a}){return e.jsxs(X,{to:t,onClick:n,className:y("flex items-center px-3 py-2 text-sm rounded-md transition-all duration-200",r?"bg-blue-50 text-blue-700 font-medium":"text-gray-500 hover:bg-gray-50 hover:text-gray-900"),children:[e.jsx("span",{className:"flex-1",children:s}),a!==void 0&&a>0&&e.jsx("span",{className:"ml-auto px-1.5 py-0.5 text-[10px] font-bold bg-red-500 text-white rounded-full min-w-[18px] text-center",children:a>99?"99+":a})]})}const Ke={active:"bg-blue-600 text-white font-semibold",inactive:"text-gray-600 hover:bg-gray-100 hover:text-gray-900",icon:"text-gray-400",activeIcon:"text-white"},no={slate:Ke,emerald:Ke,rose:Ke,violet:Ke,sky:Ke};function F({icon:t,to:s,children:r,active:n,color:a="slate",badge:o,onClick:i}){const c=no[a];return e.jsxs(X,{to:s,onClick:i,className:y("flex items-center px-3 py-2.5 text-sm rounded-lg transition-all duration-200",n?c.active:c.inactive),children:[e.jsx(t,{className:y("w-[18px] h-[18px] mr-3",n?c.activeIcon:c.icon)}),e.jsx("span",{className:"flex-1",children:r}),o!==void 0&&o>0&&e.jsx("span",{className:y("px-2 py-0.5 text-xs font-bold rounded-full",n?"bg-white/20 text-white":"bg-red-500 text-white"),children:o})]})}function ao({targetId:t="main-content",label:s="메인 콘텐츠로 이동"}){const r=n=>{n.preventDefault();const a=document.getElementById(t);a&&(a.focus(),a.scrollIntoView({behavior:"smooth"}))};return e.jsx("a",{href:`#${t}`,onClick:r,className:"sr-only focus:not-sr-only focus:fixed focus:top-4 focus:left-4 focus:z-[100] focus:px-4 focus:py-2 focus:bg-blue-600 focus:text-white focus:rounded-lg focus:shadow-lg focus:outline-none",children:s})}const oo=`당신은 서둔교회 ChurchOS 관리자 시스템의 AI 도우미입니다.
108친절하고 명확하게 답변해주세요. 한국어로 답변합니다.
109
110## ChurchOS 플랫폼 구조
111
112### 주요 메뉴
1131. **대시보드**: 전체 현황 요약 (교인 수, 헌금 현황, 최근 활동)
1142. **교인 관리**: 교인 등록/수정/검색, 가족 관계 설정, 직분 관리
1153. **재정 관리**:
116   - 헌금 관리: 헌금 입력, 목록 조회, 통계
117   - 지출 관리: 지출 등록, 승인/반려, 영수증 첨부
118   - 예산 관리: 연간 예산 편성, 예산 대비 실적
119   - 보고서: 월간/연간 재정 보고서, PDF/Excel 출력
1204. **선거 관리**: 후보자 등록, 투표 설정, 개표 결과
1215. **주보 관리**: 주보 작성/편집, 광고 관리
1226. **콘텐츠**: QT 관리, 배너 관리, 자료실
123
124### 자주 묻는 질문 (FAQ)
125
126**헌금 관련**
127- 헌금 입력: 재정관리 > 헌금관리 > 우측 상단 "헌금 입력" 버튼
128- 헌금 유형: 십일조, 감사헌금, 주일헌금, 건축헌금, 선교헌금 등
129- 헌금 수정: 목록에서 해당 항목 클릭 후 수정
130
131**지출 관련**
132- 지출 등록: 재정관리 > 지출관리 > "지출 등록" 버튼
133- 승인 절차: 등록 → 검토 → 승인 (권한에 따라)
134- 영수증: 지출 등록 시 이미지 첨부 가능
135
136**보고서 관련**
137- PDF 출력: 보고서 페이지에서 템플릿 선택 후 "PDF" 버튼
138- Excel 출력: "Excel" 버튼 클릭
139- 인쇄: "인쇄" 버튼으로 브라우저 인쇄
140
141**선거 관련**
142- 선거 생성: 선거관리 > "새 선거 만들기"
143- 후보 등록: 선거 상세 > "후보자 추가"
144- 투표 시작: 선거 상세 > "투표 시작" 버튼
145- 개표: 투표 종료 후 "개표" 버튼
146
147**교인 관리**
148- 교인 등록: 교인관리 > "교인 등록" 버튼
149- 검색: 상단 검색창에 이름/전화번호 입력
150- 가족 연결: 교인 상세 > 가족관계 탭
151
152### 오류 해결 가이드
153
154**로그인 안 됨**
1551. 이메일/비밀번호 확인
1562. 브라우저 캐시 삭제 후 재시도
1573. 관리자 권한 확인 필요
158
159**화면이 안 보임**
1601. 새로고침 (Ctrl+R 또는 Cmd+R)
1612. 브라우저 캐시 삭제
1623. 다른 브라우저로 시도
163
164**데이터 저장 안 됨**
1651. 인터넷 연결 확인
1662. 필수 입력 항목 확인
1673. 페이지 새로고침 후 재시도
168
169**PDF 출력 안 됨**
1701. 팝업 차단 해제 확인
1712. "PDF로 저장" 프린터 선택
1723. 브라우저를 Chrome으로 시도
173
174답변 시 주의사항:
175- 간결하고 명확하게 답변
176- 단계별로 안내할 때는 번호 매기기
177- 메뉴 경로는 ">" 로 표시 (예: 재정관리 > 헌금관리)
178- 모르는 내용은 "관리자에게 문의해주세요"라고 안내
179- 기술적인 오류는 상황을 자세히 물어보고 해결책 제시`;async function io(t){try{return(await wn(Pn,"aiAssistant")({messages:t,systemPrompt:oo})).data.content}catch(s){if(console.error("AI 도우미 오류:",s),s&&typeof s=="object"&&"code"in s){const r=s;throw r.code==="functions/unauthenticated"?new Error("로그인이 필요합니다."):new Error(r.message||"AI 처리 중 오류가 발생했습니다.")}throw s}}function lo(){const t=window.location.pathname;return t.includes("/finance/offerings")?"현재 페이지: 헌금 관리":t.includes("/finance/expenses")?"현재 페이지: 지출 관리":t.includes("/finance/budget")?"현재 페이지: 예산 관리":t.includes("/finance/reports")?"현재 페이지: 재정 보고서":t.includes("/finance")?"현재 페이지: 재정 관리":t.includes("/election")?"현재 페이지: 선거 관리":t.includes("/members")?"현재 페이지: 교인 관리":t.includes("/bulletin")?"현재 페이지: 주보 관리":t.includes("/dashboard")?"현재 페이지: 대시보드":""}function co(){const t=window.location.pathname;return t.includes("/finance/offerings")?["헌금은 어떻게 입력하나요?","헌금 내역을 수정하려면?","특정 교인의 헌금 내역 검색"]:t.includes("/finance/expenses")?["지출 등록 방법","영수증 첨부는 어떻게?","지출 승인 절차"]:t.includes("/finance/reports")?["PDF로 출력하려면?","Excel로 내보내기","월별 보고서 생성"]:t.includes("/election")?["새 선거 만들기","후보자 등록 방법","투표 시작/종료 설정"]:t.includes("/members")?["교인 등록 방법","가족 관계 설정","교인 검색 방법"]:["이 페이지에서 뭘 할 수 있나요?","자주 발생하는 오류 해결","도움이 필요해요"]}function uo(){const[t,s]=l.useState(!1),[r,n]=l.useState([]),[a,o]=l.useState(""),[i,c]=l.useState(!1),[u,d]=l.useState(null),x=l.useRef(null),f=l.useRef(null);l.useEffect(()=>{var _;(_=x.current)==null||_.scrollIntoView({behavior:"smooth"})},[r]),l.useEffect(()=>{var _;t&&((_=f.current)==null||_.focus())},[t]);const b=async _=>{const P=_||a.trim();if(!P||i)return;const A=lo(),D=A?`${A}
180
181질문: ${P}`:P,U={role:"user",content:P,timestamp:new Date};n(z=>[...z,U]),o(""),c(!0),d(null);try{const z=[...r,{role:"user",content:D}],q={role:"assistant",content:await io(z.map(j=>({role:j.role,content:j.content}))),timestamp:new Date};n(j=>[...j,q])}catch(z){const C=z instanceof Error?z.message:"오류가 발생했습니다.";d(C)}finally{c(!1)}},v=()=>{n([]),d(null)},w=co();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`fixed bottom-6 right-6 z-50 flex flex-col items-center gap-1 transition-all duration-300 ${t?"scale-0":"scale-100"}`,children:[e.jsx("span",{className:"text-[10px] text-gray-500 font-medium bg-white/90 px-2 py-0.5 rounded-full shadow-sm",children:"물어보기"}),e.jsx("button",{onClick:()=>s(!0),className:"w-14 h-14 bg-gradient-to-r from-violet-600 to-blue-600 text-white rounded-full shadow-lg hover:shadow-xl transition-all duration-300 flex items-center justify-center",title:"AI 도우미",children:e.jsx(Et,{className:"w-6 h-6"})})]}),t&&e.jsxs("div",{className:"fixed bottom-6 right-6 w-96 h-[32rem] bg-white rounded-2xl shadow-2xl flex flex-col z-50 overflow-hidden border border-gray-200",children:[e.jsxs("div",{className:"bg-gradient-to-r from-violet-600 to-blue-600 text-white px-4 py-3 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Et,{className:"w-5 h-5"}),e.jsx("span",{className:"font-semibold",children:"AI 도우미"}),e.jsx("span",{className:"text-xs bg-white/20 px-2 py-0.5 rounded-full",children:"Beta"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:v,className:"p-1.5 hover:bg-white/20 rounded-lg transition-colors",title:"대화 초기화",children:e.jsx(_s,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>s(!1),className:"p-1.5 hover:bg-white/20 rounded-lg transition-colors",children:e.jsx(Qe,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:[r.length===0&&e.jsxs("div",{className:"text-center py-4",children:[e.jsx("div",{className:"w-12 h-12 bg-violet-100 rounded-full flex items-center justify-center mx-auto mb-3",children:e.jsx(We,{className:"w-6 h-6 text-violet-600"})}),e.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"안녕하세요! ChurchOS 사용에 도움이 필요하시면 질문해주세요."}),e.jsx("div",{className:"space-y-2",children:w.map((_,P)=>e.jsx("button",{onClick:()=>b(_),className:"w-full px-3 py-2 text-sm text-left bg-gray-50 hover:bg-violet-50 hover:text-violet-700 rounded-lg transition-colors",children:_},P))})]}),r.map((_,P)=>e.jsx("div",{className:`flex ${_.role==="user"?"justify-end":"justify-start"}`,children:e.jsx("div",{className:`max-w-[85%] px-4 py-2.5 rounded-2xl ${_.role==="user"?"bg-violet-600 text-white rounded-br-md":"bg-gray-100 text-gray-800 rounded-bl-md"}`,children:e.jsx("p",{className:"text-sm whitespace-pre-wrap",children:_.content})})},P)),i&&e.jsx("div",{className:"flex justify-start",children:e.jsx("div",{className:"bg-gray-100 px-4 py-3 rounded-2xl rounded-bl-md",children:e.jsxs("div",{className:"flex gap-1",children:[e.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),e.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),e.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})})}),u&&e.jsx("div",{className:"bg-red-50 text-red-700 px-4 py-2 rounded-lg text-sm",children:u}),e.jsx("div",{ref:x})]}),e.jsx("div",{className:"p-3 border-t border-gray-200",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{ref:f,type:"text",value:a,onChange:_=>o(_.target.value),onKeyDown:_=>_.key==="Enter"&&!_.shiftKey&&b(),placeholder:"질문을 입력하세요...",className:"flex-1 px-4 py-2.5 bg-gray-100 rounded-full focus:outline-none focus:ring-2 focus:ring-violet-500 text-sm",disabled:i}),e.jsx("button",{onClick:()=>b(),disabled:!a.trim()||i,className:"w-10 h-10 bg-violet-600 text-white rounded-full flex items-center justify-center hover:bg-violet-700 disabled:bg-gray-300 disabled:cursor-not-allowed transition-colors",children:e.jsx(Cr,{className:"w-4 h-4"})})]})})]})]})}const Gs=l.createContext(null);function mo(){const t=l.useContext(Gs);if(!t)throw new Error("useSidebar must be used within MainLayout");return t}function ho(){const[t,s]=l.useState(!1),r={isOpen:t,open:()=>s(!0),close:()=>s(!1),toggle:()=>s(n=>!n)};return e.jsx(Gs.Provider,{value:r,children:e.jsxs("div",{className:"min-h-screen bg-gray-100",children:[e.jsx(ao,{targetId:"main-content"}),e.jsx("div",{className:"print:hidden",children:e.jsx(Ja,{})}),e.jsxs("div",{className:"flex min-h-[calc(100vh-4rem)]",children:[e.jsx("div",{className:y("fixed inset-0 bg-black/50 z-40 lg:hidden print:hidden","transition-opacity duration-300",t?"opacity-100":"opacity-0 pointer-events-none"),onClick:()=>s(!1),"aria-hidden":"true"}),e.jsxs("aside",{className:y("fixed lg:sticky top-16 z-50 lg:z-0","h-[calc(100vh-4rem)] overflow-hidden","w-[280px] lg:w-[260px]","transition-transform duration-300 ease-in-out lg:transition-none","lg:translate-x-0",t?"translate-x-0":"-translate-x-full","print:hidden"),children:[e.jsx("button",{className:y("absolute top-4 right-4 z-10 lg:hidden","p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-lg","transition-colors"),onClick:()=>s(!1),"aria-label":"메뉴 닫기",children:e.jsx(Qe,{className:"w-5 h-5"})}),e.jsx("div",{className:"h-full overflow-y-auto overflow-x-hidden bg-white",children:e.jsx(so,{onNavigate:()=>s(!1)})})]}),e.jsx("main",{id:"main-content",tabIndex:-1,role:"main","aria-label":"메인 콘텐츠",className:y("flex-1 min-w-0","p-4 sm:p-6 lg:p-8","transition-all duration-300","focus:outline-none","print:p-0 print:m
181-0"),children:e.jsx("div",{className:"max-w-7xl mx-auto print:max-w-none",children:e.jsx(er,{})})})]}),e.jsx("div",{className:"print:hidden",children:e.jsx(uo,{})})]})})}function fo(){const t=it(),{user:s}=Se(),r=l.useRef("");return l.useEffect(()=>{if(r.current===t.pathname||t.pathname==="/login")return;r.current=t.pathname,(async()=>{try{const a=navigator.userAgent,o=/iPhone|iPad|iPod|Android/i.test(a),i=/iPad|Android/i.test(a)&&!/Mobile/i.test(a),c={platform:"admin",page:t.pathname,userAgent:a,deviceType:i?"tablet":o?"mobile":"desktop",accessTime:le(),sessionId:xo()};s&&(s.id&&(c.userId=s.id),s.name&&(c.userName=s.name),s.email&&(c.userEmail=s.email)),await Je(B(E,"accessLogs"),c)}catch(a){console.error("[AccessLog] 페이지 접속 로그 기록 실패:",a)}})()},[t.pathname,s]),null}function xo(){let t=sessionStorage.getItem("admin_session_id");return t||(t=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,sessionStorage.setItem("admin_session_id",t)),t}function po(){const t=Dt(),[s,r]=l.useState(""),[n,a]=l.useState(""),[o,i]=l.useState(!1),c=async u=>{if(u.preventDefault(),!s||!n){ve.error("이름(또는 이메일)과 비밀번호를 입력해주세요.");return}i(!0);try{const d=await ot.signIn(s,n);ve.success(`환영합니다, ${d.name}님!`),t("/dashboard")}catch(d){console.error("로그인 실패:",d),ve.error(d.message||"로그인에 실패했습니다.")}finally{i(!1)}};return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:e.jsxs("div",{className:"max-w-md w-full bg-white rounded-lg shadow-md p-8",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("div",{className:"mx-auto w-16 h-16 bg-blue-600 rounded-full flex items-center justify-center mb-4",children:e.jsx("svg",{className:"w-10 h-10 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})})}),e.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"교회관리시스템"}),e.jsx("p",{className:"text-gray-600 mt-2",children:"서둔교회 관리자 전용"}),e.jsx("div",{className:"mt-3 px-4 py-2 bg-amber-50 border border-amber-200 rounded-md",children:e.jsxs("p",{className:"text-xs text-amber-800",children:["🔒 이 시스템은 모바일 앱과 ",e.jsx("strong",{children:"별도의 로그인"}),"이 필요합니다"]})})]}),e.jsxs("form",{onSubmit:c,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"nameOrEmail",className:"block text-sm font-medium text-gray-700 mb-1",children:"이름 또는 이메일"}),e.jsx("input",{id:"nameOrEmail",type:"text",value:s,onChange:u=>r(u.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"홍길동 또는 홍길동@seodoon.org",disabled:o,required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-700 mb-1",children:"비밀번호"}),e.jsx("input",{id:"password",type:"password",value:n,onChange:u=>a(u.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"••••••••",disabled:o,required:!0})]}),e.jsx("button",{type:"submit",disabled:o,className:"w-full bg-blue-600 text-white py-2 rounded-md hover:bg-blue-700 transition-colors disabled:bg-gray-400 disabled:cursor-not-allowed",children:o?"로그인 중...":"로그인"})]}),e.jsx("div",{className:"mt-6 text-center",children:e.jsxs("p",{className:"text-xs text-gray-500",children:["관리자 계정이 필요합니다.",e.jsx("br",{}),"문의: 교회 사무실"]})})]})})}const se="members";function us(t){const s={};for(const[r,n]of Object.entries(t))n!==void 0&&(s[r]=n);return s}const go={async getMembers(){try{const t=B(E,se),s=J(t,Ee("name","asc"));return(await Y(s)).docs.map(n=>{var a,o,i,c;return{id:n.id,...n.data(),created_at:(o=(a=n.data().created_at)==null?void 0:a.toDate)==null?void 0:o.call(a),updated_at:(c=(i=n.data().updated_at)==null?void 0:i.toDate)==null?void 0:c.call(i)}})}
181catch(t){throw console.error("교인 목록 가져오기 실패:",t),t}},async getAllMembers(){return this.getMembers()},async getMember(t){var s,r,n,a;try{const o=I(E,se,t),i=await xe(o);return i.exists()?{id:i.id,...i.data(),created_at:(r=(s=i.data().created_at)==null?void 0:s.toDate)==null?void 0:r.call(s),updated_at:(a=(n=i.data().updated_at)==null?void 0:n.toDate)==null?void 0:a.call(n)}:null}catch(o){throw console.error("교인 조회 실패:",o),o}},async createMember(t){try{const s=B(E,se),r=fe.now(),n=us(t);return{id:(await Je(s,{...n,created_at:r,updated_at:r})).id,...t,created_at:r.toDate(),updated_at:r.toDate()}}catch(s){throw console.error("교인 추가 실패:",s),s}},async updateMember(t,s){try{const r=I(E,se,t),n=us(s);await $(r,{...n,updated_at:fe.now()})}catch(r){throw console.error("교인 수정 실패:",r),r}},async appendFamilyEventHistory(t,s){try{const r=I(E,se,t);await $(r,{family_event_history:Mt(s),updated_at:fe.now()})}catch(r){throw console.error("경조사 이력 축적 실패:",r),r}},async removeFamilyEventHistory(t,s){var r;try{const n=await this.getMember(t);if(!((r=n==null?void 0:n.family_event_history)!=null&&r.length))return;const a=n.family_event_history.filter(i=>i.event_id!==s);if(a.length===n.family_event_history.length)return;const o=I(E,se,t);await $(o,{family_event_history:a,updated_at:fe.now()})}catch(n){throw console.error("경조사 이력 제거 실패:",n),n}},async deleteMember(t){try{const s=I(E,se,t);await He(s)}catch(s){throw console.error("교인 삭제 실패:",s),s}},async searchByName(t){try{const s=B(E,se),r=J(s,Q("name",">=",t),Q("name","<=",t+""),Ee("name"),Kr(50));return(await Y(r)).docs.map(a=>({id:a.id,...a.data()}))}catch(s){throw console.error("교인 검색 실패:",s),s}},async findByNameAndPhone(t,s){try{return t&&(await this.getMembers()).find(a=>a.name===t&&a.mobile_phone===s)||null}catch(r){throw console.error("교인 중복 체크 실패:",r),r}},async searchMembers(t,s){try{const r=await this.getMembers();if(!s)return r.slice(0,20);const n=s.normalize("NFC").trim().toLowerCase();return r.filter(o=>{var i;return(i=o.name)==null?void 0:i.normalize("NFC").trim().toLowerCase().includes(n)}).slice(0,20)}catch(r){throw console.error("교인 검색 실패:",r),r}},async getLostSheepStats(){const t=await this.getMembers(),s=new Date(Date.now()-28*24*60*60*1e3),r=u=>u?u.toDate?u.toDate():new Date(u):null,n=u=>{if(u.worship_status==="장기결석")return!0;if((u.worship_status??"미확인")==="미확인"){const x=r(u.worship_status_at);return!x||x<s}return!1},a=t.filter(u=>u.member_classification==="서둔출석성도"&&u.district),o=new Map;for(const u of a){const d=`${u.parish??"미배정"}||${u.district}`;o.has(d)||o.set(d,[]),o.get(d).push(u)}const i=[],c=[];for(const[u,d]of o.entries()){const[x,f]=u.split("||"),b=d.find(C=>C.district_role==="구역장"),v=(b==null?void 0:b.name)??"-";let w=0,_=0,P=0,A=0,D=null;const U=[];for(const C of d){const q=C.worship_status??"미확인";q==="출석"?w++:q==="장기결석"?_++:q==="별세"||q==="이사"||q==="이명"?A++:P++;const j=r(C.worship_status_at);if(j&&(!D||j>D)&&(D=j),n(C)){const h={id:C.id,name:C.name,parish:x,district:f,position:C.position,worship_status:q,worship_status_at:j,worship_status_note:C.worship_status_note,leaderName:v};U.push(h),c.push(h)}}const z=d.map(C=>({id:C.id,name:C.name,position:C.position,district_role:C.district_role,worship_status:C.worship_status??"미확인",worship_status_note:C.worship_status_note,worship_status_at:r(C.worship_status_at)}));z.sort((C,q)=>C.district_role==="구역장"?-1:q.district_role==="구역장"?1:0),i.push({parish:x,district:f,leaderName:v,total:d.length,attending:w,longAbsent:_,unconfirmed:P,reasonal:A,noInputDistrict:d.every(C=>!C.worship_status),lastUpdated:D,lostSheep:U,members:z})}return i.sort((u,d)=>{const x=u.parish.localeCompare(d.parish);return x!==0?x:u.district.localeCompare(d.district)}),{totalMembers:a.length,attending:i.reduce((u,d)=>u+d.attending,0),longAbsent:i.reduce((u,d)=>u+d.longAbsent,0),unconfirmed:i.reduce((u,d)=>u+d.unconfirmed,0),reasonal:i.reduce((u,d)=>u+d.reasonal,0),districtsWithNoInput:i.filter(u=>u.noInputDistrict).length,totalDistricts:i.length,districts:i,lostSheep:c}},async updateWorshipStatus(t,s,r){const n=I(E,se,t);await $(n,{worship_status:s,worship_status_note:r,worship_status_at:fe.now(),updated_at:fe.now()})},async getStats(){try{const t=await this.getMembers();return{total:t.length,서둔출석성도:t.filter(s=>s.member_classification==="서둔출석성도").length,교인:t.filter(s=>s.member_classification==="교인").length,새가족:t.filter(s=>s.member_classification==="새가족").length,불신:t.filter(s=>s.member_classification==="불신").length,제적:t.filter(s=>s.member_classification==="제적").length,타종교:t.filter(s=>s.member_classification==="타종교").length,보관:t.filter(s=>s.member_classification==="보관").length,미등록교인:t.filter(s=>s.member_classification==="미등록교인").length,타교인:t.filter(s=>s.member_classification==="타교인").length,별세:t.filter(s=>s.member_classification==="별세").length,이민:t.filter(s=>s.member_classification==="이민").length,유학:t.filter(s=>s.member_classification==="유학").length,유고:t.filter(s=>s.member_classification==="유고").length,군입대:t.filter(s=>s.member_classification==="군입대").length,active:t.filter(s=>s.status==="활동").length,inactive:t.filter(s=>s.status==="휴면").length,new:t.filter(s=>s.member_classification==="새가족").length}}
181catch(t){throw console.error("통계 가져오기 실패:",t),t}}};function bo(){const[t,s]=l.useState({total:0,서둔출석성도:0,교인:0,새가족:0,불신:0,제적:0,타종교:0,보관:0,미등록교인:0,타교인:0,별세:0,이민:0,유학:0,유고:0,군입대:0,active:0,inactive:0,new:0}),[r,n]=l.useState(!0);l.useEffect(()=>{a()},[]);async function a(){try{const b=await go.getStats();s(b)}catch(b){console.error("통계 로딩 실패:",b)}finally{n(!1)}}const o=new Date,i=o.getHours()<12?"좋은 아침입니다":o.getHours()<18?"좋은 오후입니다":"좋은 저녁입니다",c=[{name:"출석성도",value:t.서둔출석성도+t.교인,color:"#3B82F6"},{name:"새가족",value:t.새가족,color:"#10B981"},{name:"미등록/타교인",value:t.미등록교인+t.타교인,color:"#8B5CF6"},{name:"기타",value:t.불신+t.타종교+t.보관,color:"#6B7280"}].filter(b=>b.value>0),u=[{name:"서둔출석성도",value:t.서둔출석성도},{name:"교인",value:t.교인},{name:"새가족",value:t.새가족},{name:"미등록교인",value:t.미등록교인},{name:"타교인",value:t.타교인},{name:"불신",value:t.불신}].filter(b=>b.value>0),d=[{id:"1",title:"새 교인 등록",subtitle:"교적부에 새 교인 추가",icon:e.jsx(tt,{className:"w-5 h-5 text-blue-600"}),link:"/members/new"},{id:"2",title:"출석 체크",subtitle:"주일 예배 출석 관리",icon:e.jsx(Pt,{className:"w-5 h-5 text-emerald-600"}),link:"/attendance"},{id:"3",title:"알림 보내기",subtitle:"푸시 알림 발송",icon:e.jsx(_e,{className:"w-5 h-5 text-amber-600"}),link:"/content/push"},{id:"4",title:"주보 관리",subtitle:"이번 주 주보 편집",icon:e.jsx(pe,{className:"w-5 h-5 text-blue-600"}),link:"/content/bulletin"}],x=[{id:"1",title:"새가족 등록",subtitle:"방금 전",icon:e.jsx(tt,{className:"w-4 h-4 text-emerald-600"})},{id:"2",title:"주보 업데이트",subtitle:"10분 전",icon:e.jsx(Ne,{className:"w-4 h-4 text-blue-600"})},{id:"3",title:"헌금 입력",subtitle:"30분 전",icon:e.jsx(Ce,{className:"w-4 h-4 text-amber-600"})},{id:"4",title:"심방 기록 추가",subtitle:"1시간 전",icon:e.jsx(Nt,{className:"w-4 h-4 text-rose-600"})}],f=[120,135,128,142,138,145,150,148];return r?e.jsx(Ks,{message:"데이터를 불러오는 중..."}):e.jsxs("div",{className:"space-y-6 animate-fade-in",children:[e.jsx("div",{className:"relative overflow-hidden bg-white border border-gray-200 rounded-2xl p-6 lg:p-8 shadow-sm",children:e.jsxs("div",{className:"relative flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 text-blue-600 text-sm mb-2",children:[e.jsx(Et,{className:"w-4 h-4"}),e.jsx("span",{children:o.toLocaleDateString("ko-KR",{year:"numeric",month:"long",day:"numeric",weekday:"long"})})]}),e.jsxs("h1",{className:"text-2xl lg:text-3xl font-bold mb-2 text-gray-900",children:[i,"!"]}),e.jsx("p",{className:"text-gray-500 text-base lg:text-lg",children:"서둔교회 관리 시스템에 오신 것을 환영합니다."})]}),e.jsxs(X,{to:"/messaging",className:"inline-flex items-center gap-2 rounded-xl bg-blue-600 px-5 py-3 text-sm font-semibold text-white shadow-sm transition-colors hover:bg-blue-700 shrink-0 self-start sm:self-auto",children:[e.jsx(Tt,{className:"w-4 h-4"}),"문자발송"]})]})}),e.jsxs(Ua,{columns:4,children:[e.jsx(et,{title:"전체 교인",value:t.total,icon:e.jsx(re,{className:"w-5 h-5"}),iconColor:"blue",link:"/members",footer:e.jsxs("div",{className:"flex items-center justify-between text-xs",children:[e.jsx("span",{className:"text-gray-500",children:"교적부 전체"}),e.jsxs("span",{className:"text-blue-600 font-medium flex items-center gap-0.5",children:["보기 ",e.jsx(lt,{className:"w-3 h-3"})]})]})}),e.jsx(et,{title:"출석 성도",value:t.서둔출석성도+t.교인,subtitle:`서둔출석성도 ${t.서둔출석성도} + 교인 ${t.교인}`,icon:e.jsx(Sr,{className:"w-5 h-5"}),iconColor:"emerald"}),e.jsx(et,{title:"새가족",value:t.새가족,icon:e.jsx(tt,{className:"w-5 h-5"}),iconColor:"blue",trend:{value:12,label:"전월 대비"}}),e.jsx(et,{title:"이번 주 출석",value:0,subtitle:"데이터 수집 중",icon:e.jsx(Pt,{className:"w-5 h-5"}),iconColor:"amber",footer:e.jsx(Ha,{data:f,height:32,trend:"up"})})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs(Ve,{colSpan:2,className:"lg:col-span-2",children:[e.jsx(Fe,{title:"교인 분류 현황",subtitle:`전체 ${t.total.toLocaleStr
181ing()}명`,icon:e.jsx(re,{className:"w-5 h-5"}),iconColor:"blue",moreLink:"/members",moreLinkText:"교적부 보기"}),e.jsxs(Be,{children:[e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[e.jsx("div",{children:e.jsx(Ga,{data:c,height:220,showLegend:!0,valueFormatter:b=>`${b.toLocaleString()}명`})}),e.jsx("div",{children:e.jsx(Ka,{data:u,bars:[{dataKey:"value",name:"인원"}],height:220,layout:"horizontal",showLegend:!1,showGrid:!1,valueFormatter:b=>`${b}명`})})]}),e.jsxs("div",{className:"grid grid-cols-4 sm:grid-cols-7 gap-2 mt-6",children:[e.jsx(he,{label:"서둔출석성도",value:t.서둔출석성도,color:"blue"}),e.jsx(he,{label:"교인",value:t.교인,color:"blue"}),e.jsx(he,{label:"새가족",value:t.새가족,color:"emerald",highlight:!0}),e.jsx(he,{label:"미등록교인",value:t.미등록교인,color:"blue"}),e.jsx(he,{label:"타교인",value:t.타교인,color:"blue"}),e.jsx(he,{label:"불신",value:t.불신,color:"gray"}),e.jsx(he,{label:"기타",value:t.보관+t.별세+t.제적,color:"gray"})]})]})]}),e.jsxs(Ve,{children:[e.jsx(Fe,{title:"빠른 액션",subtitle:"자주 사용하는 기능",icon:e.jsx(Ns,{className:"w-5 h-5"}),iconColor:"emerald"}),e.jsx(Be,{children:e.jsx(cs,{items:d})})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs(Ve,{children:[e.jsx(Fe,{title:"최근 활동",subtitle:"시스템 활동 내역",icon:e.jsx(Cs,{className:"w-5 h-5"}),iconColor:"blue"}),e.jsx(Be,{children:e.jsx(cs,{items:x,emptyMessage:"최근 활동이 없습니다."})})]}),e.jsxs(Ve,{children:[e.jsx(Fe,{title:"이번 주 일정",subtitle:"예배 및 행사",icon:e.jsx(pe,{className:"w-5 h-5"}),iconColor:"amber",moreLink:"/content/bulletin"}),e.jsx(Be,{children:e.jsxs("div",{className:"space-y-3",children:[e.jsx(_t,{day:"주일",time:"오전 11:00",title:"주일예배",highlight:!0}),e.jsx(_t,{day:"수요일",time:"오후 7:30",title:"수요예배"}),e.jsx(_t,{day:"금요일",time:"오후 9:00",title:"금요기도회"})]})})]}),e.jsxs(Ve,{children:[e.jsx(Fe,{title:"공지사항",subtitle:"중요 안내",icon:e.jsx(_e,{className:"w-5 h-5"}),iconColor:"rose",moreLink:"/content/bulletin"}),e.jsx(Be,{children:e.jsxs("div",{className:"text-center py-8 text-gray-500",children:[e.jsx(_e,{className:"w-10 h-10 mx-auto mb-2 text-gray-300"}),e.jsx("p",{className:"text-sm",children:"새로운 공지사항이 없습니다."})]})})]})]})]})}function he({label:t,value:s,color:r,highlight:n}){const a={blue:"bg-blue-50 text-blue-700 border-blue-200",emerald:"bg-emerald-50 text-emerald-700 border-emerald-200",violet:"bg-blue-50 text-blue-700 border-blue-200",gray:"bg-gray-50 text-gray-600 border-gray-200",red:"bg-red-50 text-red-700 border-red-200"};return e.jsxs("div",{className:`${a[r]} border rounded-lg p-2 text-center transition-all hover:shadow-sm ${n?"ring-2 ring-emerald-300":""}`,children:[e.jsx("div",{className:"text-[10px] font-medium truncate",children:t}),e.jsx("div",{className:"text-sm font-bold",children:s.toLocaleString()})]})}function _t({day:t,time:s,title:r,highlight:n}){return e.jsxs("div",{className:`flex items-center gap-3 p-3 rounded-lg ${n?"bg-blue-50":"bg-gray-50"}`,children:[e.jsx("div",{className:`w-12 text-center ${n?"text-blue-600":"text-gray-600"}`,children:e.jsx("div",{className:"text-xs font-medium",children:t})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:`text-sm font-medium ${n?"text-blue-900":"text-gray-900"}`,children:r}),e.jsx("div",{className:"text-xs text-gray-500",children:s})]}),n&&e.jsx(ks,{className:"w-4 h-4 text-blue-500"})]})}const ms={blue:{50:"239 246 255",100:"219 234 254",200:"191 219 254",300:"147 197 253",400:"96 165 250",500:"59 130 246",600:"37 99 235",700:"29 78 216",800:"30 64 175",900:"30 58 138"},emerald:{50:"236 253 245",100:"209 250 229",200:"167 243 208",300:"110 231 183",400:"52 211 153",500:"16 185 129",600:"5 150 105",700:"4 120 87",800:"6 95 70",900:"6 78 59"},indigo:{50:"238 242 255",100:"224 231 255",200:"199 210 254",300:"165 180 252",400:"129 140 248",500:"99 102 241",600:"79 70 229",700:"67 56 202",800:"55 48 163",900:"49 46 129"},teal:{50:"240 253 250",100:"204 251 241",200:"153 246 228",300:"94 234 212",400:"45 212 191",500:"20 184 166",600:"13 148 136",700:"15 118 110",800:"17 94 89",900:"19 78 74"},rose:{50:"255 241 242",100:"255 228 230",200:"254 205 211",300:"253 164 175",400:"251 113 133",500:"244 63 94",600:"225 29 72",700:"190 18 60",800:"159 18 57",900:"136 19 55"}},yo={"seodoon-church":"blue"};function jo(t){const s=ms[t]??ms.blue,r=document.documentElement;for(const[n,a]of Object.entries(s))r.style.setProperty(`--brand-${n}`,a)}function vo(t){jo(yo[t??""]??"blue")}function _o(){const{user:t}=Se();return l.useEffect(()=>{vo(t==null?void 0:t.churchId)},[t==null?void 0:t.churchId]),null}const wo=l.lazy(()=>g(()=>import("./MemberList-ClrP8byN.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])).then(t=>({default:t.MemberList}))),hs=l.lazy(()=>g(()=>import("./MemberForm-Cmv9C13b.js"),__vite__mapDeps([13,1,2,4,14,8,15,16,7,5,11])).then(t=>({default:t.MemberForm}))),Po=l.lazy(()=>g(()=>import("./ProfileEditRequestsPage-B5oJLTsk.js"),__vite__mapDeps([17,1,2,8,4,11]))),No=l.lazy(()=>g(()=>import("./NewMemberManagementPage-EkqVUAi6.js"),__vite__mapDeps([18,1,2,4,8,11])).then(t=>({default:t.NewMemberManagementPage}))),Eo=l.lazy(()=>g(()=>import("./SmsSend-BqGNCzOm.js"),__vite__mapDeps([19,1,2,4,20,8,11])).then(t=>({default:t.SmsSend}))),ko=l.lazy(()=>g(()=>import("./SmsHistory-CYvCwaE9.js"),__vite__mapDeps([21,1,2,4,20,8,11])).then(t=>({default:t.SmsHistory}))),Co=l.lazy(()=>g(()=>import("./SmsTemplates-yZpVbn8M.js"),__vite__mapDeps([22,1,2,4,20,8,11])).then(t=>({default:t.SmsTemplates}))),So=l.lazy(()=>g(()=>import("./PastoralDashboard-D0wNGC2t.js"),__vite__mapDeps([23,1,2,7,8,9,10,4,11])).then(t=>({default:t.PastoralDashboard}))),Ao=l.lazy(()=>g(()=>import("./FaithJourneyPage-BxHlfrCv.js"),__vite__mapDeps([24,1,2,10,8,4,11])).then(t=>({default:t.FaithJourneyPage}
181))),Ro=l.lazy(()=>g(()=>import("./VisitManagementPage-hYs4x-cO.js"),__vite__mapDeps([25,1,2,7,8,4,11])).then(t=>({default:t.VisitManagementPage}))),Lo=l.lazy(()=>g(()=>import("./PrayerManagementPage-Bxh8GAv2.js"),__vite__mapDeps([26,1,2,9,8,4,11])).then(t=>({default:t.PrayerManagementPage}))),Io=l.lazy(()=>g(()=>import("./SpiritualMetricsPage-BexQlfNL.js"),__vite__mapDeps([27,1,2,10,8,7,9,28,4,11])).then(t=>({default:t.SpiritualMetricsPage}))),Do=l.lazy(()=>g(()=>import("./CounselingManagementPage-LfS7N3Y8.js"),__vite__mapDeps([29,1,2,8,4,11])).then(t=>({default:t.CounselingManagementPage}))),Oo=l.lazy(()=>g(()=>import("./SpiritualStatsPage-D1YAgbvd.js"),__vite__mapDeps([30,1,2,8,4,11]))),fs=l.lazy(()=>g(()=>import("./StaffReportPage-B8WmUODF.js"),__vite__mapDeps([31,1,2,8,32,4,33,34,11])).then(t=>({default:t.StaffReportPage}))),xs=l.lazy(()=>g(()=>import("./StaffDashboard-Ouctdj0W.js"),__vite__mapDeps([35,1,2,32,8,36,37,4,11])).then(t=>({default:t.StaffDashboard}))),To=l.lazy(()=>g(()=>import("./StaffCalendarPage-8dHlFsnG.js"),__vite__mapDeps([38,1,2,36,8,4,11])).then(t=>({default:t.StaffCalendarPage}))),zo=l.lazy(()=>g(()=>import("./StaffAnnouncementsPage--08m3d0R.js"),__vite__mapDeps([39,1,2,40,8,4,33,34,41,42,11])).then(t=>({default:t.StaffAnnouncementsPage}))),Mo=l.lazy(()=>g(()=>import("./StaffBoardPage-C1up8oru.js"),__vite__mapDeps([43,1,2,40,8,4,33,34,41,42,11])).then(t=>({default:t.StaffBoardPage}))),qo=l.lazy(()=>g(()=>import("./StaffNotificationsPage-DLMUP1YU.js"),__vite__mapDeps([44,1,2,4,42,8,11])).then(t=>({default:t.StaffNotificationsPage}))),Vo=l.lazy(()=>g(()=>import("./StaffApprovalPage-BrPG-nbT.js"),__vite__mapDeps([45,1,2,37,8,14,4,33,34,11])).then(t=>({default:t.StaffApprovalPage}))),ps=l.lazy(()=>g(()=>import("./SmartBulletinPage-DJNDhfoE.js"),__vite__mapDeps([46,1,2,47,8,4,40,11])).then(t=>({default:t.SmartBulletinPage}))),Fo=l.lazy(()=>g(()=>import("./BannerManagementPage-CvP1MRwD.js"),__vite__mapDeps([48,1,2,8,16,4,11])).then(t=>({default:t.BannerManagementPage}))),Bo=l.lazy(()=>g(()=>import("./PushManagementPage-DqOccZGR.js"),__vite__mapDeps([49,1,2,50,8,16,4,11])).then(t=>({default:t.PushManagementPage}))),$o=l.lazy(()=>g(()=>import("./QTManagementPageCombined-BeLZ14zV.js"),__vite__mapDeps([51,1,2,8,4,11]))),Uo=l.lazy(()=>g(()=>import("./CouncilBoardPage-Be1KFDcY.js"),__vite__mapDeps([52,1,2,8,4,11])).then(t=>({default:t.CouncilBoardPage}))),Ko=l.lazy(()=>g(()=>import("./ResourceLibraryPage-BQ_bDxTC.js"),__vite__mapDeps([53,1,2,8,4,11])).then(t=>
181({default:t.ResourceLibraryPage}))),Wo=l.lazy(()=>g(()=>import("./NoticesPage-aH9os4Jq.js"),__vite__mapDeps([54,1,2,8,4,33,34,11])).then(t=>({default:t.NoticesPage}))),Go=l.lazy(()=>g(()=>import("./FamilyEventsPage-Bht_qGY6.js"),__vite__mapDeps([55,1,2,8,4,56,11])).then(t=>({default:t.FamilyEventsPage}))),Ho=l.lazy(()=>g(()=>import("./EventManagementPage-ve5oEClk.js"),__vite__mapDeps([57,1,2,8,4,11])).then(t=>({default:t.EventManagementPage}))),Jo=l.lazy(()=>g(()=>import("./BulletinConverterPage-DUSWzZdm.js"),__vite__mapDeps([58,1,2,4,47,8,33,34,11])).then(t=>({default:t.BulletinConverterPage}))),Qo=l.lazy(()=>g(()=>import("./LentRegistrationPage-D16AP_Sm.js"),__vite__mapDeps([59,1,2,8,4,11])).then(t=>({default:t.LentRegistrationPage}))),Yo=l.lazy(()=>g(()=>import("./PopupManagementPage-CfxwgIV-.js"),__vite__mapDeps([60,1,2,8,4,11])).then(t=>({default:t.PopupManagementPage}))),Xo=l.lazy(()=>g(()=>import("./CommunityPrayerPage-kGS5t4zj.js"),__vite__mapDeps([61,1,2,8,4,11])).then(t=>({default:t.CommunityPrayerPage}))),Zo=l.lazy(()=>g(()=>import("./WorshipCommitteePage-BfMqZMi-.js"),__vite__mapDeps([62,1,2,8,4,11])).then(t=>({default:t.WorshipCommitteePage}))),ei=l.lazy(()=>g(()=>import("./CultureManagementPage-DsZocwz2.js"),__vite__mapDeps([63,1,2,3,4,8,11,12])).then(t=>({default:t.CultureManagementPage}))),ti=l.lazy(()=>g(()=>import("./FamilyProgramManagementPage-DEPMKGFX.js"),__vite__mapDeps([64,1,2,3,4,8,11,12])).then(t=>({default:t.FamilyProgramManagementPage}))),si=l.lazy(()=>g(()=>import("./AcademyManagementPage-C7_HEjXM.js"),__vite__mapDeps([65,1,2,4,8,11])).then(t=>({default:t.AcademyManagementPage}))),ri=l.lazy(()=>g(()=>import("./SilverUniversityPage-fEaawAGA.js"),__vite__mapDeps([66,1,2,4,8,50,11])).then(t=>({default:t.SilverUniversityPage}))),ni=l.lazy(()=>g(()=>import("./CouncilDashboard-_8LKlgrd.js"),__vite__mapDeps([67,1,2,68,8,69,4,11])).then(t=>({default:t.CouncilDashboard}))),ai=l.lazy(()=>g(()=>import("./CouncilMeetingPage-_erKx1k6.js"),__vite__mapDeps([70,1,2,68,8,69,4,11])).then(t=>({default:t.CouncilMeetingPage}))),oi=l.lazy(()=>g(()=>import("./CouncilVotingPage-Sbe-jGs-.js"),__vite__mapDeps([71,1,2,68,8,69,4,11])).then(t=>({default:t.CouncilVotingPage}))),ii=l.lazy(()=>g(()=>import("./CouncilReportsPage-DlB9zIQs.js"),__vite__mapDeps([72,1,2,68,8,69,4,11])).then(t=>({default:t.CouncilReportsPage}))),li=l.lazy(()=>g(()=>import("./CouncilSchedulePage-BmRgeKgz.js"),__vite__mapDeps([73,1,2,68,8,4,11])).then(t=>({default:t.CouncilSchedulePage}))),ci=l.lazy(()=>g(()=>import("./CouncilChatPage-BEsBg1N-.js"),__vite__mapDeps([74,1,2,68,8,4,11])).then(t=>({default:t.CouncilChatPage}))),di=l.lazy(()=>g(()=>import("./CouncilSuggestionsPage-CH_7FO2L.js"),__vite__mapDeps([75,1,2,68,8,69,4,11])).then(t=>({default:t.CouncilSuggestionsPage}))),ui=l.lazy(()=>g(()=>import("./LostSheepDashboard-CBB0yJsv.js"),__vite__mapDeps([76,1,2,6,7,8,9,10,4,11])).then(t=>({default:t.LostSheepDashboard}))),mi=l.lazy(()=>g(()=>import("./MediaAlbumsPage-DZK6YoQr.js"),__vite__mapDeps([77,1,2,4,78,8,79,11])).then(t=>({default:t.MediaAlbumsPage}))),hi=l.lazy(()=>g(()=>import("./AlbumDetailPage-Ct5_QIih.js"),__vite__mapDeps([80,1,2,4,78,8,11])).then(t=>({default:t.AlbumDetailPage}))),fi=l.lazy(()=>g(()=>import("./GalleryDetailPage-EZAFEqjq.js"),__vite__mapDeps([81,1,2,4,79,8,11])).then(t=>({default:t.GalleryDetailPage}))),xi=l.lazy(()=>g(()=>import("./GalleryPostsPage-B-z6fcWA.js"),__vite__mapDeps([82,1,2,4,8,11])).then(t=>({default:t.GalleryPostsPage}))),pi=l.lazy(()=>g(()=>import("./ChurchSettingsPage-D4ToOCQl.js"),__vite__mapDeps([83,1,2,84,8,16,4,11])).then(t=>({default:t.ChurchSettingsPage}))),gi=l.lazy(()=>g(()=>import("./SystemSettingsPage-2wEXEVnb.js"),__vite__mapDeps([85,1,2,8,4,84,11])).then(t=>({default:t.SystemSettingsPage}))),bi=l.lazy(()=>g(()=>import("./AppUsersPage-2423sUOS.js"),__vite__mapDeps([86,1,2,8,4,11]))),yi=l.lazy(()=>g(()=>import("./AccessLogsPage-C1K74qgV.js"),__vite__mapDeps([87,1,2,8,4,11])).then(t=>({default:t.AccessLogsPage}
181))),ji=l.lazy(()=>g(()=>import("./ErrorReportsPage-CLcwCKS-.js"),__vite__mapDeps([88,1,2,8,4,11])).then(t=>({default:t.ErrorReportsPage}))),vi=l.lazy(()=>g(()=>import("./GuideImagesPage-DyCoj4SN.js"),__vite__mapDeps([89,1,2,8]))),_i=l.lazy(()=>g(()=>import("./BackupManagementPage-CwVXUyAs.js"),__vite__mapDeps([90,1,2,4,8,11])).then(t=>({default:t.BackupManagementPage}))),wi=l.lazy(()=>g(()=>import("./SystemHealthPage-BGUVbMrj.js"),__vite__mapDeps([91,1,2,4,8,11])).then(t=>({default:t.SystemHealthPage}))),Pi=l.lazy(()=>g(()=>import("./BulletinView-CytJnx9o.js"),__vite__mapDeps([92,1,2,47,8,4,93,94,40,11])).then(t=>({default:t.BulletinView}))),Ni=l.lazy(()=>g(()=>import("./AttendanceManagementPage-Cx-jtLCg.js"),__vite__mapDeps([95,1,2,8,96,4,11]))),Ei=l.lazy(()=>g(()=>import("./AttendanceDashboard-iXM5ZE3U.js"),__vite__mapDeps([97,1,2,28,8,98,4,11])).then(t=>({default:t.AttendanceDashboard}))),ki=l.lazy(()=>g(()=>import("./AbsenteeManagement-CTmvyAmF.js"),__vite__mapDeps([99,1,2,28,8,100,84,98,4,96,11])).then(t=>({default:t.AbsenteeManagement}))),Ci=l.lazy(()=>g(()=>import("./AttendanceSettingsPage-DKZgZ-A3.js"),__vite__mapDeps([101,1,2,4,100,8,84,11])).then(t=>({default:t.AttendanceSettingsPage}))),ye=l.lazy(()=>g(()=>import("./EducationIframePage-D4x9b3oB.js"),__vite__mapDeps([102,1,2])).then(t=>({default:t.EducationIframePage}))),Si=l.lazy(()=>g(()=>import("./HelpPage-C49K473l.js"),__vite__mapDeps([103,1,2,4])).then(t=>({default:t.HelpPage}))),Ai=l.lazy(()=>g(()=>import("./ElectionManagementPage-BXgQDZNS.js"),__vite__mapDeps([104,1,2,8,4,11])).then(t=>({default:t.ElectionManagementPage}))),Ri=l.lazy(()=>g(()=>import("./EducationDashboardPage-BAcdkDcL.js"),__vite__mapDeps([105,1,2,106,107,8,4,11])).then(t=>({default:t.EducationDashboardPage}))),Li=l.lazy(()=>g(()=>import("./StudentManagementPage-CsW7ycFg.js"),__vite__mapDeps([108,1,2,106,107,8,4,11])).then(t=>({default:t.StudentManagementPage}))),Ii=l.lazy(()=>g(()=>import("./TeacherManagementPage-DJpFO43L.js"),__vite__mapDeps([109,1,2,106,107,8,4,11])).then(t=>({default:t.TeacherManagementPage}))),Di=l.lazy(()=>g(()=>import("./AttendanceManagementPage-DSadnxWI.js"),__vite__mapDeps([110,1,2,106,107,8,4,11])).then(t=>({default:t.AttendanceManagementPage}))),Oi=l.lazy(()=>g(()=>import("./OrganizationPage-oKzgeoXi.js"),__vite__mapDeps([111,1,2,106,107,8,4,11])).then(t=>({default:t.OrganizationPage}))),Ti=l.lazy(()=>g(()=>import("./EducationReportsPage-3SC_Azho.js"),__vite__mapDeps([112,1,2,106,4,8,11])).then(t=>({default:t.EducationReportsPage}))),zi=l.lazy(()=>g(()=>import("./VisitationManagementPage-D6bcHfzV.js"),__vite__mapDeps([113,1,2,106,107,8,4,11])).then(t=>({default:t.VisitationManagementPage})));l.lazy(()=>g(()=>import("./FinanceDashboardV2-wwnrWf3C.js"),__vite__mapDeps([114,1,2,115,8,116,117,15,118,4,11])).then(t=>({default:t.FinanceDashboardV2})));const Mi=l.lazy(()=>g(()=>import("./FinanceHome-CQyzgwFy.js"),__vite__mapDeps([119,1,2,4,8,11])).then(t=>({default:t.FinanceHome}))),qi=l.lazy(()=>g(()=>import("./OfferingListPageV2-D4A7aIJ2.js"),__vite__mapDeps([120,1,2,115,8,121,15,4,122,94,93,3,11,12])).then(t=>({default:t.OfferingListPageV2}))),gs=l.lazy(()=>g(()=>import("./OfferingFormPage-CiV4YmRm.js"),__vite__mapDeps([123,1,2,115,8,121,15,118,56,4,11])).then(t=>({default:t.OfferingFormPage}))),Vi=l.lazy(()=>g(()=>import("./OfferingBulkPage-BV0odrdX.js"),__vite__mapDeps([124,1,2,4,56,115,8,121,15,118,11])).then(t=>({default:t.OfferingBulkPage}))),Fi=l.lazy(()=>g(()=>import("./MonthClosePage-DsR9sE6C.js"),__vite__mapDeps([125,1,2,4,121,8,15,11])).then(t=>({default:t.MonthClosePage}))),Bi=l.lazy(()=>g(()=>import("./BudgetPlanOverviewPage-CaKf9VYv.js"),__vite__mapDeps([126,1,2,4,15,127,8,128,11])).then(t=>({default:t.BudgetPlanOverviewPage}))),$i=l.lazy(()=>g(()=>import("./DepartmentBudgetPlanPage-C3wv5NuZ.js"),__vite__mapDeps([129,1,2,4,15,128,8,11])).then(t=>({default:t.DepartmentBudgetPlanPage}))),Ui=l.lazy(()=>g(()=>import("./OfferingTypeSettingsPage-CDl8_EVK.js"),__vite__mapDeps([130,1,2,4,118,8,15,11])).then(t=>({default:t.OfferingTypeSettingsPage}))),Ki=l.lazy(()=>g(()=>import("./ExpenseCategorySettingsPage-BozhRZwp.js"),__vite__mapDeps([131,1,2,4,118,8,15,11])).then(t=>({default:t.ExpenseCategorySettingsPage}
181))),Wi=l.lazy(()=>g(()=>import("./OnlineOfferingPage-BO4Wim1Z.js"),__vite__mapDeps([132,1,2,4,8,11])).then(t=>({default:t.OnlineOfferingPage}))),Gi=l.lazy(()=>g(()=>import("./ExpenseListPageV2-oYAP8fER.js"),__vite__mapDeps([133,1,2,116,8,121,15,4,122,94,93,3,11,12])).then(t=>({default:t.ExpenseListPageV2}))),bs=l.lazy(()=>g(()=>import("./ExpenseFormPage-8TQDuwfn.js"),__vite__mapDeps([134,1,2,8,116,121,128,15,118,4,11])).then(t=>({default:t.ExpenseFormPage}))),ys=l.lazy(()=>g(()=>import("./BudgetFormPage-C1OEcio5.js"),__vite__mapDeps([135,1,2,117,8,116,115,15,4,11])).then(t=>({default:t.BudgetFormPage}))),Hi=l.lazy(()=>g(()=>import("./BudgetRequestListPage-BTjBRlBA.js"),__vite__mapDeps([136,1,2,137,8,15,4,3,11,12])).then(t=>({default:t.BudgetRequestListPage}))),js=l.lazy(()=>g(()=>import("./BudgetRequestFormPage-FSnDNg1q.js"),__vite__mapDeps([138,1,2,137,8,15,4,11])).then(t=>({default:t.BudgetRequestFormPage}))),Ji=l.lazy(()=>g(()=>import("./BudgetApprovalPage-D8zkb2cy.js"),__vite__mapDeps([139,1,2,137,8,127,15,4,11])).then(t=>({default:t.BudgetApprovalPage}))),Qi=l.lazy(()=>g(()=>import("./DepartmentFinancePage-C2HBztMc.js"),__vite__mapDeps([140,1,2,15,3,117,8,116,115,4,11,12])).then(t=>({default:t.DepartmentFinancePage}))),Yi=l.lazy(()=>g(()=>import("./AssetManagementPage-DJT4Xd5P.js"),__vite__mapDeps([141,1,2,15,3,4,8,11,12])).then(t=>({default:t.AssetManagementPage}))),Xi=l.lazy(()=>g(()=>import("./AccountListPage-BnyckRGZ.js"),__vite__mapDeps([142,1,2,143,8,4,11,15])).then(t=>({default:t.AccountListPage}))),Zi=l.lazy(()=>g(()=>import("./JournalListPage-DS1fj_fd.js"),__vite__mapDeps([144,1,2,143,8,4,11,15])).then(t=>({default:t.JournalListPage}))),el=l.lazy(()=>g(()=>import("./FinanceSetupPage-DzfB3jkA.js"),__vite__mapDeps([145,1,2,8,15,146,4,147,11])).then(t=>({default:t.FinanceSetupPage}))),tl=l.lazy(()=>g(()=>import("./FinanceReportPage-CKEHmcHV.js"),__vite__mapDeps([148,1,2,115,8,116,128,15,147,118,149,150,4,11])).then(t=>({default:t.FinanceReportPage}))),sl=l.lazy(()=>g(()=>import("./DonationReceiptPage-Bt1QMPW6.js"),__vite__mapDeps([151,1,2,152,8,4,11])).then(t=>({default:t.DonationReceiptPage}))),rl=l.lazy(()=>g(()=>import("./DonorStatsPage-BA0i7PIe.js"),__vite__mapDeps([153,1,2,152,8,4,11])).then(t=>({default:t.DonorStatsPage}))),nl=l.lazy(()=>g(()=>import("./PledgeManagementPage-OS9MCLdK.js"),__vite__mapDeps([154,1,2,8,4,11])).then(t=>({default:t.PledgeManagementPage}))),al=l.lazy(()=>g(()=>import("./SettlementPage-sm7bgtC1.js"),__vite__mapDeps([155,1,2,149,8,115,116,147,15,150,4,11])).then(t=>({default:t.SettlementPage}))),ol=l.lazy(()=>g(()=>import("./BankAccountPage-pgkwg4Hs.js"),__vite__mapDeps([156,1,2,8,4,11])).then(t=>({default:t.BankAccountPage}))),il=l.lazy(()=>g(()=>import("./IncomeBudgetPage-DJ_78F4P.js"),__vite__mapDeps([157,1,2,147,8,15,4,11])).then(t=>({default:t.IncomeBudgetPage}))),ll=l.lazy(()=>g(()=>import("./DepartmentManagePage-CBCPfewl.js"),__vite__mapDeps([158,1,2,127,8,15,146,4,11])).then(t=>({default:t.DepartmentManagePage}))),cl=l.lazy(()=>g(()=>import("./IncomePage-BHK30Mby.js"),__vite__mapDeps([159,1,2,120,115,8,121,15,4,122,94,93,3,11,12,132,153,152])).then(t=>({default:t.IncomePage}))),dl=l.lazy(()=>g(()=>import("./ExpensePage-BxsxFpSb.js"),__vite__mapDeps([160,1,2,133,116,8,121,15,4,122,94,93,3,11,12,136,137,139,127])).then(t=>({default:t.ExpensePage}))),ul=l.lazy(()=>g(()=>import("./BudgetPage-DeIX8gY-.js"),__vite__mapDeps([161,1,2,157,147,8,15,4,11,117,116,115,140,3,12])).then(t=>({default:t.BudgetPage}))),ml=l.lazy(()=>g(()=>import("./ReportPage-BFamIDiV.js"),__vite__mapDeps([162,1,2,115,8,116,15,4,122,94,93,11,148,128,147,118,149,150,155,151,152])).then(t=>({default:t.ReportPage}))),hl=l.lazy(()=>g(()=>import("./SettingsPage-bplmnqMz.js"),__vite__mapDeps([163,1,2,145,8,15,146,4,147,11,156,158,127,142,143])).then(t=>({default:t.SettingsPage}))),fl=l.lazy(()=>g(()=>import("./DepartmentLedgerPage-BrR69I4M.js"),__vite__mapDeps([164,1,2,15,165,8,128,4,11])).then(t=>({default:t.DepartmentLedgerPage}))),xl=l.lazy(()=>g(()=>import("./DepartmentLedgerAuditPage-6BnId6va.js"),__vite__mapDeps([166,1,2,3,4,165,8,127,15,11])).then(t=>({default:t.DepartmentLedgerAuditPage})));function pl(){return e.jsx(Ks,{message:"페이지를 불러오는 중..."})}function vs(){const{user:t,hasResourcePermission:s}=Se();return(t==null?void 0:t.role)==="담당자"?s("culture")?e.jsx(K,{to:"/culture",replace:!0}):s("family")?e.jsx(K,{to:"/family",replace:!0}):s("silver_university")?e.jsx(K,{to:"/silver-university",replace:!0}):s("academy")?e.jsx(K,{to:"/academy",replace:!0}):e.jsx(K,{to:"/help",replace:!0}):e.jsx(bo,{})}function gl(){return e.jsx(ba,{children:e.jsx(Zs,{client:sn,children:e.jsxs(An,{children:[e.jsx(ua,{children:e.jsx(tr,{children:e.jsxs(wa,{children:[e.jsx(_o,{}),e.jsx(fo,{}),e.jsx(l.Suspense,{fallback:e.jsx(pl,{}),children:e.jsxs(sr,{children:[e.jsx(m,{path:"/login",element:e.jsx(po,{})}),e.jsx(m,{path:"/bulletin-view",element:e.jsx(Pi,{})}),e.jsxs(m,{path:"/",element:e.jsx(p,{children:e.jsx(ho,{})}),children:[e.jsx(m,{index:!0,element:e.jsx(vs,{})}),e.jsx(m,{path:"dashboard",element:e.jsx(vs,{})}),e.jsxs(m,{path:"members",children:[e.jsx(m,{index:!0,element:e.jsx(p,{requiredPermission:"members",children:e.jsx(wo,{})})}),e.jsx(m,{path:"new",element:e.jsx(p,{requiredPermission:"members",children:e.jsx(hs,{mode:"create"})})}),e.jsx(m,{path:":id/edit",element:e.jsx(p,{requiredPermission:"members",children:e.jsx(hs,{mode:"edit"})})}),e.jsx(m,{path:"edit-requests",element:e.jsx(p,{requiredPermission:"members",children:e.jsx(Po,{})})}),e.jsx(m,{path:"new-family",element:e.jsx(p,{requiredPermission:"members",children:e.jsx(No,{})})})]}),e.jsxs(m,{path:"messaging",children:[e.jsx(m,{index:!0,element:e.jsx(p,{requiredRoles:["최고관리자","관리자","담임목사","부목사","간사","secretary"],children:e.jsx(Eo,{})})}),e.jsx(m,{path:"history",element:e.jsx(p,{requiredRoles:["최고관리자","관리자","담임목사","부목사","간사","secretary"],children:e.jsx(ko,{})})}),e.jsx(m,{path:"templates",element:e.jsx(p,{requiredRoles:["최고관리자","관리자","담임목사","부목사","간사","secretary"],children:e.jsx(Co,{})})})]}),e.jsxs(m,{path:"attendance",children:[e.jsx(m,{index:!0,element:e.jsx(p,{requiredPermission:"members",children:e.jsx(Ni,{})})}),e.jsx(m,{path:"dashboard",element:e.jsx(p,{requiredPermission:"members",children:e.jsx(Ei,{})})}),e.jsx(m,{path:"absentees",element:e.jsx(p,{requiredPermission:"members",children:e.jsx(ki,{})})}),e.jsx(m,{path:"settings",element:e.jsx(p,{requiredPermission:"members",children:e.jsx(Ci,{})})})]}),e.jsxs(m,{path:"finance",children:[e.jsx(m,{index:!0,element:e.jsx(p,{requiredAnyPermission:["finance","deptLedger"],children:e.jsx(Mi,{})})}),e.jsx(m,{path:"income",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(cl,{})})}),e.jsx(m,{path:"expense",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(dl,{})})}),e.jsx(m,{path:"settings",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(hl,{})})}),e.jsx(m,{path:"offerings",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(qi,{})})}),e.jsx(m,{path:"offerings/new",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(gs,{mode:"create"})})}),e.jsx(m,{path:"offerings/bulk",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(Vi,{})})}),e.jsx(m,{path:"month-close",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(Fi,{})})}),e.jsx(m,{path:"budget-plan",element:e.jsx(p,{requiredAnyPermission:["finance","deptLedger"],children:e.jsx(Bi,{})})}),e.jsx(m,{path:"budget-plan/:departmentId",element:e.jsx(p,{requiredAnyPermission:["finance","deptLedger"],children:e.jsx($i,{})})}),e.jsx(m,{path:"offering-types",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(Ui,{})})}),e.jsx(m,{path:"expense-categories",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(Ki,{})})}),e.jsx(m,{path:"offerings/:id/edit",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(gs,{mode:"edit"})})}),e.jsx(m,{path:"expenses",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(Gi,{})})}),e.jsx(m,{path:"expenses/new",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(bs,{mode:"create"})})}),e.jsx(m,{path:"expenses/:id/edit",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(bs,{mode:"edit"})})}),e.jsx(m,{path:"budget",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(ul,{})})}),e.jsx(m,{path:"budget/new",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(ys,{mode:"create"})})}),e.jsx(m,{path:"budget/:id/edit",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(ys,{mode:"edit"})})}),e.jsx(m,{path:"income-budget",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(il,{})})}),e.jsx(m,{path:"departments",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(ll,{})})}),e.jsx(m,{path:"reports",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(ml,{})})}),e.jsx(m,{path:"monthly-report",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(tl,{})})}),e.jsx(m,{path:"accounts",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(Xi,{})})}),e.jsx(m,{path:"journal",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(Zi,{})})}),e.jsx(m,{path:"requests",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(Hi,{})})}),e.jsx(m,{path:"requests/new",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(js,{mode:"create"})})}),e.jsx(m,{path:"requests/:id/edit",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(js,{mode:"edit"})})}),e.jsx(m,{path:"requests/approval",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(Ji,{})})}),e.jsx(m,{path:"online-offering",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(Wi,{})})}),e.jsx(m,{path:"department",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(Qi,{})})}),e.jsx(m,{path:"assets",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(Yi,{})})}),e.jsx(m,{path:"setup",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(el,{})})}),e.jsx(m,{path:"donation-receipt",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(sl,{})})}),e.jsx(m,{path:"donor-stats",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(rl,{})})}),e.jsx(m,{path:"pledge",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(nl,{})})}),e.jsx(m,{path:"settlement",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(al,{})})}),e.jsx(m,{path:"bank-accounts",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(ol,{})})}),e.jsx(m,{path:"dept-ledger",element:e.jsx(p,{requiredPermission:"deptLedger",children:e.jsx(fl,{})})}),e.jsx(m,{path:"dept-ledger/audit",element:e.jsx(p,{requiredPermission:"finance",children:e.jsx(xl,{})})})]}),e.jsxs(m,{path:"pastoral",children:[e.jsx(m,{index:!0,element:e.jsx(p,{requiredPermission:"pastoral",children:e.jsx(So,{})})}),e.jsx(m,{path:"journey",element:e.jsx(p,{requiredPermission:"pastoral",children:e.jsx(Ao,{})})}),e.jsx(m,{path:"visits",element:e.jsx(p,{requiredPermission:"pastoral",children:e.jsx(Ro,{})})}),e.jsx(m,{path:"prayers",element:e.jsx(p,{requiredPermission:"pastoral",children:e.jsx(Lo,{})})}),e.jsx(m,{path:"metrics",element:e.jsx(p,{requiredPermission:"pastoral",children:e.jsx(Io,{})})}),e.jsx(m,{path:"stats",element:e.jsx(p,{requiredPermission:"pastoral",children:e.jsx(Oo,{})})}),e.jsx(m,{path:"counseling",element:e.jsx(p,{requiredPermission:"pastoral",children:e.jsx(Do,{})})}),e.jsx(m,{path:"staff-reports",element:e.jsx(p,{requiredPermission:"staffOffice",children:e.jsx(fs,{})})})]}),e.jsxs(m,{path:"staff",children:[e.jsx(m,{index:!0,element:e.jsx(p,{requiredPermission:"staffOffice",children:e.jsx(xs,{})})}),e.jsx(m,{path:"dashboard",element:e.jsx(p,{requiredPermission:"staffOffice",children:e.jsx(xs,{})})}),e.jsx(m,{path:"reports",element:e.jsx(p,{requiredResource:"staff_reports",children:e.jsx(fs,{})})}),e.jsx(m,{path:"calendar",element:e.jsx(p,{requiredResource:"staff_calendar",children:e.jsx(To,{})})}),e.jsx(m,{path:"announcements",element:e.jsx(p,{requiredResource:"staff_announcements",children:e.jsx(zo,{})})}),e.jsx(m,{path:"board",element:e.jsx(p,{requiredResource:"staff_board",children:e.jsx(Mo,{})})}),e.jsx(m,{path:"notifications",element:e.jsx(p,{requiredResource:"staff_notifications",children:e.jsx(qo,{})})}),e.jsx(m,{path:"approvals",element:e.jsx(p,{requiredResource:"staff_approvals",children:e.jsx(Vo,{})})})]}),e.jsxs(m,{path:"council",children:[e.jsx(m,{index:!0,element:e.jsx(p,{requiredPermission:"council",children:e.jsx(ni,{})})}),e.jsx(m,{path:"meetings",element:e.jsx(p,{requiredResource:"council_meetings",children:e.jsx(ai,{})})}),e.jsx(m,{path:"voting",element:e.jsx(p,{requiredResource:"council_votes",children:e.jsx(oi,{})})}),e.jsx(m,{path:"reports",element:e.jsx(p,{requiredResource:"council_reports",children:e.jsx(ii,{})})}),e.jsx(m,{path:"schedule",element:e.jsx(p,{requiredResource:"council_schedule",children:e.jsx(li,{})})}),e.jsx(m,{path:"chat",element:e.jsx(p,{requiredResource:"council_chat",children:e.jsx(ci,{})})}),e.jsx(m,{path:"suggestions",element:e.jsx(p,{requiredResource:"council_suggestions",children:e.jsx(di,{})})}),e.jsx(m,{path:"lost-sheep",element:e.jsx(p,{requiredRoles:["최고관리자","관리자","담임목사","당회"],children:e.jsx(ui,{})})})]}),e.jsxs(m,{path:"content",children:[e.jsx(m,{index:!0,element:e.jsx(p,{requiredResource:"bulletin",children:e.jsx(ps,{})})}),e.jsx(m,{path:"bulletin",element:e.jsx(p,{requiredResource:"bulletin",children:e.jsx(ps,{})})}),e.jsx(m,{path:"banner",element:e.jsx(p,{requiredResource:"banner",children:e.jsx(Fo,{})})}),e.jsx(m,{path:"push",element:e.jsx(p,{requiredResource:"push",children:e.jsx(Bo,{})})}),e.jsx(m,{path:"qt",element:e.jsx(p,{requiredResource:"qt_management",children:e.jsx($o,{})})}),e.jsx(m,{path:"council",element:e.jsx(p,{requiredResource:"council_board",children:e.jsx(Uo,{})})}),e.jsx(m,{path:"resources",element:e.jsx(p,{requiredResource:"resources",children:e.jsx(Ko,{})})}),e.jsx(m,{path:"notices",element:e.jsx(p,{requiredResource:"notices",children:e.jsx(Wo,{})})}),e.jsx(m,{path:"events",element:e.jsx(p,{requiredResource:"events",children:e.jsx(Ho,{})})}),e.jsx(m,{path:"family-events",element:e.jsx(p,{requiredResource:"notices",children:e.jsx(Go,{})})}),e.jsx(m,{path:"bulletin-converter",element:e.jsx(p,{requiredResource:"bulletin",children:e.jsx(Jo,{})})}),e.jsx(m,{path:"community-prayers",element:e.jsx(p,{requiredPermission:"content",children:e.jsx(Xo,{})})}),e.jsx(m,{path:"worship-committee",element:e.jsx(p,{requiredPermission:"content",children:e.jsx(Zo,{})})}),e.jsx(m,{path:"lent-registration",element:e.jsx(p,{requiredPermission:"content",children:e.jsx(Qo,{})})}),e.jsx(m,{path:"popups",element:e.jsx(p,{requiredPermission:"content",children:e.jsx(Yo,{})})})]}),e.jsx(m,{path:"culture",element:e.jsx(p,{requiredResource:"culture",children:e.jsx(ei,{})})}),e.jsx(m,{path:"family",element:e.jsx(p,{requiredResource:"family",children:e.jsx(ti,{})})}),e.jsx(m,{path:"academy",element:e.jsx(p,{requiredResource:"academy",children:e.jsx(si,{})})}),e.jsx(m,{path:"silver-university",element:e.jsx(p,{requiredResource:"silver_university",children:e.jsx(ri,{})})}),e.jsxs(m,{path:"media",children:[e.jsx(m,{index:!0,element:e.jsx(p,{requiredResource:"albums",children:e.jsx(mi,{})})}),e.jsx(m,{path:":albumId",element:e.jsx(p,{requiredResource:"albums",children:e.jsx(hi,{})})})]}),e.jsx(m,{path:"gallery/:albumId",element:e.jsx(p,{requiredResource:"albums",children:e.jsx(fi,{})})}),e.jsx(m,{path:"gallery-posts",element:e.jsx(p,{requiredResource:"gallery_posts",children:e.jsx(xi,{})})}),e.jsxs(m,{path:"education",children:[e.jsx(m,{index:!0,element:e.jsx(p,{requiredResource:"education",children:e.jsx(ue,{children:e.jsx(Ri,{})})})}),e.jsx(m,{path:"students",element:e.jsx(p,{requiredResource:"education",children:e.jsx(ue,{children:e.jsx(Li,{})})})}),e.jsx(m,{path:"teachers",element:e.jsx(p,{requiredResource:"education",children:e.jsx(ue,{children:e.jsx(Ii,{})})})}),e.jsx(m,{path:"attendance",element:e.jsx(p,{requiredResource:"education",children:e.jsx(ue,{children:e.jsx(Di,{})})})}),e.jsx(m,{path:"organization",element:e.jsx(p,{requiredResource:"education",children:e.jsx(ue,{children:e.jsx(Oi,{})})})}),e.jsx(m,{path:"reports",element:e.jsx(p,{requiredResource:"e
181ducation",children:e.jsx(ue,{children:e.jsx(Ti,{})})})}),e.jsx(m,{path:"visitations",element:e.jsx(p,{requiredResource:"education",children:e.jsx(ue,{children:e.jsx(zi,{})})})})]}),e.jsx(m,{path:"education1-admin",element:e.jsx(K,{to:"/education",replace:!0})}),e.jsx(m,{path:"baby-admin",element:e.jsx(K,{to:"/education",replace:!0})}),e.jsx(m,{path:"yuchi-admin",element:e.jsx(K,{to:"/education",replace:!0})}),e.jsx(m,{path:"yunyen-admin",element:e.jsx(K,{to:"/education",replace:!0})}),e.jsx(m,{path:"sonyeon-admin",element:e.jsx(K,{to:"/education",replace:!0})}),e.jsx(m,{path:"middle-admin",element:e.jsx(K,{to:"/education",replace:!0})}),e.jsx(m,{path:"high-admin",element:e.jsx(K,{to:"/education",replace:!0})}),e.jsx(m,{path:"education2-admin",element:e.jsx(p,{children:e.jsx(ye,{src:"https://seodoon-church-youth-admin.web.app/",title:"청년부 관리"})})}),e.jsx(m,{path:"education4-admin",element:e.jsx(p,{children:e.jsx(ye,{src:"https://seodoon-church.web.app/education4-admin/index.html",title:"교육4부 관리"})})}),e.jsx(m,{path:"men-admin",element:e.jsx(p,{children:e.jsx(ye,{src:"https://seodoon-church.web.app/men-admin/",title:"남선교회 관리"})})}),e.jsx(m,{path:"women-admin",element:e.jsx(p,{children:e.jsx(ye,{src:"https://seodoon-church.web.app/women-admin/",title:"여전도회 관리"})})}),e.jsx(m,{path:"deacons-admin",element:e.jsx(p,{children:e.jsx(ye,{src:"https://seodoon-church.web.app/deacons-admin/",title:"안수집사회 관리"})})}),e.jsx(m,{path:"elders-women-admin",element:e.jsx(p,{children:e.jsx(ye,{src:"https://seodoon-church.web.app/elders-women-admin/",title:"권사회 관리"})})}),e.jsx(m,{path:"church-settings",element:e.jsx(p,{requiredPermission:"churchSettings",children:e.jsx(pi,{})})}),e.jsxs(m,{path:"settings",children:[e.jsx(m,{index:!0,element:e.jsx(p,{requiredPermission:"settings",children:e.jsx(gi,{})})}),e.jsx(m,{path:"app-users",element:e.jsx(p,{requiredPermission:"settings",children:e.jsx(bi,{})})}),e.jsx(m,{path:"access-logs",element:e.jsx(p,{requiredRoles:["최고관리자"],children:e.jsx(yi,{})})}),e.jsx(m,{path:"error-reports",element:e.jsx(p,{requiredRoles:["최고관리자"],children:e.jsx(ji,{})})}),e.jsx(m,{path:"guide-images",element:e.jsx(p,{requiredPermission:"settings",children:e.jsx(vi,{})})}),e.jsx(m,{path:"backup",element:e.jsx(p,{requiredRoles:["최고관리자"],children:e.jsx(_i,{})})}),e.jsx(m,{path:"system-health",element:e.jsx(p,{requiredRoles:["최고관리자"],children:e.jsx(wi,{})})})]}),e.jsx(m,{path:"election",element:e.jsx(p,{requiredPermission:"settings",children:e.jsx(Ai,{})})}),e.jsx(m,{path:"help",element:e.jsx(p,{children:e.jsx(Si,{})})}),e.jsx(m,{path:"*",element:e.jsx(K,{to:"/",replace:!0})})]})]})})]})})}),e.jsx(ga,{}),e.jsx(Ar,{position:"top-right",toastOptions:{duration:3e3,style:{fontSize:"13px"}}})]})})})}Ct.createRoot(document.getElementById("root")).render(e.jsx(rr.StrictMode,{children:e.jsx(gl,{})}));export{Ll as A,Ka as B,ce as C,Sl as D,ns as E,Ks as L,Il as P,Ds as R,et as S,Ua as W,g as _,Dl as a,Ol as b,y as c,E as d,to as e,Pn as f,vn as g,wn as h,Cl as i,Nn as j,El as k,kl as l,go as m,Nl as n,ht as o,je as p,Ve as q,Fe as r,Pl as s,Be as t,Se as u,Ga as v,Rl as w,Al as x,ka as y,Ta as z};

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.