1import{j as e}from"./vendor-data-Z5doMMu-.js";import{r as c}from"./vendor-react-zNM0AU50.js";import{f as N,D as o,S as v,E as g,G as w,J as k}from"./vendor-firebase-Da9KY1q_.js";const R=[{id:"01-home.jpg",name:"í íë©´",description:"ì± ì²« íë©´ (ë¡ê·¸ì¸ ì )"},{id:"02-login-page.jpg",name:"ë¡ê·¸ì¸ íì´ì§",description:"ë¡ê·¸ì¸/íìê°ì
ë²í¼ì´ ë³´ì´ë íë©´"},{id:"03-signup-form.jpg",name:"íìê°ì
í¼",description:"íìê°ì
ì ë³´ ì
ë ¥ íë©´"},{id:"04-login.jpg",name:"ë¡ê·¸ì¸ íë©´",description:"ì´ë©ì¼/ë¹ë°ë²í¸ ì
ë ¥ íë©´"},{id:"05-logged-in.jpg",name:"ë¡ê·¸ì¸ ìë£",description:"ë¡ê·¸ì¸ í íë¡íì´ ë³´ì´ë íë©´"},{id:"06-home-overview.jpg",name:"í íë©´ ì ì²´",description:"í íë©´ ì ì²´ 구ì±"},{id:"07-bulletin.jpg",name:"주보",description:"ìë°° > 주보 íë©´"},{id:"08-journey.jpg",name:"ëí ë©ë´",description:"ëí í ë©ì¸ íë©´"},{id:"09-bible-plan.jpg",name:"ì±ê²½ì½ê¸° ê³í",description:"ê³í ì¤ì íë©´"},{id:"10-bible-reading.jpg",name:"ì±ê²½ ì½ê¸°",description:"ì±ê²½ 본문 ì½ê¸° íë©´"},{id:"11-qt.jpg",name:"QT",description:"QT í íë©´"},{id:"12-my-meditation.jpg",name:"ëì 묵ì",description:"묵ì ê¸°ë¡ íë©´"},{id:"13-community.jpg",name:"ìíµ",description:"ìíµ í íë©´"},{id:"14-gallery.jpg",name:"ê°¤ë¬ë¦¬",description:"ê°¤ë¬ë¦¬ íë©´"},{id:"15-profile.jpg",name:"ëì ì ë³´",description:"íë¡í íë©´"}],C=()=>{const[r,m]=c.useState([]),[j,u]=c.useState(!0),[x,p]=c.useState(null),d=N();c.useEffect(()=>{f()},[]);const f=async()=>{u(!0);try{const s=o(d,"guide");let l=[];try{l=(await v(s)).items.map(n=>n.name)}catch{}const a=await Promise.all(R.map(async t=>{const n=l.includes(t.id);let i=null;if(n)try{i=await g(o(d,`guide/${t.id}`))}catch{}return{...t,url:i,uploaded:n&&i!==null}}));m(a)}catch(s){console.error("ì´ë¯¸ì§ ë¡ë ì¤í¨:",s)}finally{u(!1)}},b=async(s,l)=>{p(s);try{const a=o(d,`guide/${s}`);await w(a,l);const t=await g(a);m(n=>n.map(i=>i.id===s?{...i,url:t,uploaded:!0}:i)),alert("ì
ë¡ë ìë£!")}catch(a){console.error("ì
ë¡ë ì¤í¨:",a),alert("ì
ë¡ëì ì¤í¨íìµëë¤.")}finally{p(null)}},y=async s=>{if(confirm("ì´ë¯¸ì§ë¥¼ ìì íìê² ìµëê¹?"))try{const l=o(d,`guide/${s}`);await k(l),m(a=>a.map(t=>t.id===s?{...t,url:null,uploaded:!1}:t)),alert("ìì ìë£!")}catch(l){console.error("ìì ì¤í¨:",l),alert("ìì ì ì¤í¨íìµëë¤.")}},h=r.filter(s=>s.uploaded).length;return e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"ì¬ì©ì ê°ì´ë ì´ë¯¸ì§ ê´ë¦¬"}),e.jsx("p",{className:"text-gray-600 mt-1",children:"ì± ì¬ì© ê°ì´ëì íìë ì¤í¬ë¦°ì·ì ì
ë¡ëí©ëë¤."}),e.jsx("a",{href:"https://www.seodoon.org/guide/",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline text-sm mt-2 inline-block",children:"ê°ì´ë íì´ì§ 미리보기 â"})]}),e.jsxs("div",{className:"bg-white rounded-lg shadow p-4 mb-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-sm font-medium text-gray-700",children:"ì
ë¡ë ì§íë¥ "}),e.jsxs("span",{className:"text-sm text-gray-600",children:[h," / ",r.length]})]}),e.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:e.jsx("div",{className:"bg-blue-600 h-2 rounded-full transition-all",style:{width:`${h/r.length*100}%`}})})]}),j?e.jsxs("div",{className:"text-center py-12",children:[e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600 mx-auto"}),e.jsx("p",{className:"text-gray-500 mt-2",children:"ë¡ë© ì¤..."})]}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:r.map(s=>e.jsxs("div",{className:"bg-white rounded-lg shadow overflow-hidden",children:[e.jsxs("div",{className:"aspect-[9/16] bg-gray-100 relative",children:[s.url?e.jsx("img",{src:s.url,alt:s.name,className:"w-full h-full object-contain"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center text-gray-400",children:e.jsxs("div",{className:"text-center",children:[e.jsx("svg",{className:"w-12 h-12 mx-auto mb-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),e.jsx("span",{className:"text-sm",children:"ì´ë¯¸ì§ ìì"})]})}),x===s.id&&e.jsx("div",{className:"absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center",children:e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-white"})})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-start justify-between mb-2",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-medium text-gray-900",children:s.name}),e.jsx("p",{className:"text-sm text-gray-500",children:s.description})]}),s.uploaded&&e.jsx("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800",children:"ìë£"})]}),e.jsx("p",{className:"text-xs text-gray-400 mb-3 font-mono",children:s.id}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("label",{className:"flex-1",children:[e.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:l=>{var t;const a=(t=l.target.files)==null?void 0:t[0];a&&b(s.id,a),l.target.value=""},disabled:x!==null}),e.jsx("span",{className:"block w-full text-center px-3 py-2 bg-blue-600 text-white text-sm rounded-lg cursor-pointer hover:bg-blue-700 transition-colors",children:s.uploaded?"ë³ê²½":"ì
ë¡ë"})]}),s.uploaded&&e.jsx("button",{onClick:()=>y(s.id),className:"px-3 py-2 bg-red-100 text-red-600 text-sm rounded-lg hover:bg-red-200 transition-colors",children:"ìì "})]})]})]},s.id))}),e.jsxs("div",{className:"mt-8 bg-blue-50 rounded-lg p-4",children:[e.jsx("h3",{className:"font-medium text-blue-900 mb-2",children:"ì¤í¬ë¦°ì· ì´¬ì ê°ì´ë"}),e.jsxs("ul",{className:"text-sm text-blue-800 space-y-1",children:[e.jsx("li",{children:"⢠모ë°ì¼ íë©´ ë¹ì¨(9:16)ë¡ ìº¡ì²í´ì£¼ì¸ì"}),e.jsx("li",{children:"⢠ìíë°ê° ë³´ì´ì§ ìê² í¬ë¡íë©´ ë ê¹ëí©ëë¤"}),e.jsx("li",{children:"⢠PNG ëë JPG íìì ê¶ì¥í©ëë¤"}),e.jsx("li",{children:"⢠ì
ë¡ë í ê°ì´ë íì´ì§ìì ë°ë¡ íì¸í ì ììµëë¤"})]})]})]})};export{C as default};
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.