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.