1import { r as reactExports, j as jsxRuntimeExports, R as React } from "./vendor-react-Bay9Y7Lb.js"; 2import { a as api } from "./index-w5lXls15.js"; 3import { u as useTranslation } from "./vendor-i18n-BC7ZMXWQ.js"; 4import { aW as X, dQ as LifeBuoy, b1 as CircleAlert, bx as Send, bM as Clock, bb as User, a_ as CircleCheck, bf as Search, aX as ArrowLeft, ct as BookOpen, ba as Info, bF as ChevronRight, bc as MessageSquare, by as MessageCircle, aZ as Mail, bG as CircleQuestionMark, bA as Eye, bn as Globe, bj as CreditCard, b9 as Settings, a$ as Shield, b2 as Upload, bV as Play, bq as Coins, bs as Zap, d6 as ShieldCheck$1, cs as Network, dR as GitBranch, b7 as Check, dS as GitMerge, dT as CodeXml } from "./vendor-D0P4XgNj.js"; 5import { m as formatTicketDate } from "./utils-CEVb7nN1.js"; 6import { a as getAllActionCosts } from "./credit-rules-8PgauDOD.js"; 7function CreateTicketModal({ isOpen, onClose, currentUser }) { 8 const { t } = useTranslation(); 9 const [subject, setSubject] = reactExports.useState(""); 10 const [category, setCategory] = reactExports.useState("general"); 11 const [description, setDescription] = reactExports.useState(""); 12 const [isSubmitting, setIsSubmitting] = reactExports.useState(false); 13 const [error, setError] = reactExports.useState(""); 14 const [honeypot, setHoneypot] = reactExports.useState(""); 15 const [startTime] = reactExports.useState(Date.now()); 16 const [hasInteracted, setHasInteracted] = reactExports.useState(false); 17 if (!isOpen) return null; 18 const handleSubmit = async (e) => { 19 e.preventDefault(); 20 setIsSubmitting(true); 21 setError(""); 22 if (honeypot) { 23 console.warn("Spam detected via honeypot"); 24 onClose(); 25 return; 26 } 27 const duration = (Date.now() - startTime) / 1e3; 28 if (duration < 10) { 29 setError("Please take a moment to fill out the form (Too fast)."); 30 setIsSubmitting(false); 31 return; 32 } 33 if (!hasInteracted) { 34 setError("Please interact with the form before submitting."); 35 setIsSubmitting(false); 36 return; 37 } 38 try { 39 const autoPriority = category === "bug" || category === "billing" ? "high" : "low"; 40 await api.createTicket( 41 currentUser.id, 42 subject, 43 category, 44 autoPriority, 45 description, 46 honeypot 47 ); 48 onClose(); 49 alert("Ticket submitted successfully!"); 50 } catch (err) { 51 setError(err.message || t("common.error", "An error occurred")); 52 } finally { 53 setIsSubmitting(false); 54 } 55 }; 56 return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "fixed inset-0 z-[1000] flex items-center justify-center p-4", children: [ 57 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute inset-0 bg-black/80 backdrop-blur-sm", onClick: onClose }), 58 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative w-full max-w-lg bg-white dark:bg-zinc-900 rounded-xl shadow-2xl p-6 border border-zinc-200 dark:border-zinc-800 animate-in zoom-in-95", children: [
59 /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: onClose, className: "absolute top-4 right-4 p-2 hover:bg-zinc-100 dark:hover:bg-zinc-800 rounded-full text-zinc-500", children: /* @__PURE__ */ jsxRuntimeExports.jsx(X, { size: 20 }) }), 60 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3 mb-6", children: [ 61 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-3 bg-indigo-50 dark:bg-indigo-900/20 rounded-lg text-indigo-600 dark:text-indigo-400", children: /* @__PURE__ */ jsxRuntimeExports.jsx(LifeBuoy, { size: 24 }) }), 62 /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-xl font-bold text-zinc-900 dark:text-white", children: t("help.createTicket", "Submit a Request") }) 63 ] }), 64 error && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-4 p-3 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg flex items-center gap-2 text-sm text-red-700 dark:text-red-300", children: [ 65 /* @__PURE__ */ jsxRuntimeExports.jsx(CircleAlert, { size: 16 }), 66 " ", 67 error 68 ] }),
69 /* @__PURE__ */ jsxRuntimeExports.jsxs("form", { onSubmit: handleSubmit, className: "space-y-4", children: [ 70 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ 71 /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "block text-sm font-bold text-zinc-700 dark:text-zinc-300 mb-1", children: t("help.subject", "Subject") }), 72 /* @__PURE__ */ jsxRuntimeExports.jsx( 73 "input", 74 { 75 required: true, 76 value: subject, 77 onChange: (e) => { 78 setSubject(e.target.value); 79 setHasInteracted(true); 80 }, 81 onFocus: () => setHasInteracted(true), 82 className: "w-full bg-zinc-50 dark:bg-zinc-950 border border-zinc-300 dark:border-zinc-700 rounded-lg px-4 py-2.5 outline-none focus:ring-2 focus:ring-indigo-500 text-zinc-900 dark:text-white transition-all", 83 placeholder: "Brief summary of the issue" 84 } 85 ) 86 ] }), 87 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-1 gap-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
88 /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "block text-sm font-bold text-zinc-700 dark:text-zinc-300 mb-1", children: t("help.category", "Category") }), 89 /* @__PURE__ */ jsxRuntimeExports.jsxs( 90 "select", 91 { 92 value: category, 93 onChange: (e) => { 94 setCategory(e.target.value); 95 setHasInteracted(true); 96 }, 97 onFocus: () => setHasInteracted(true), 98 className: "w-full bg-zinc-50 dark:bg-zinc-950 border border-zinc-300 dark:border-zinc-700 rounded-lg px-4 py-2.5 outline-none focus:ring-2 focus:ring-indigo-500 text-zinc-900 dark:text-white", 99 children: [ 100 /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "general", children: "General Inquiry" }), 101 /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "account", children: "Account Issue" }), 102 /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "copyright", children: "Copyright Claim" }),
103 /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "bug", children: t("support.bugReport", "Bug Report") }), 104 /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "billing", children: "Billing" }) 105 ] 106 } 107 ) 108 ] }) }), 109 category === "copyright" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-3 bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800 rounded-lg text-xs text-amber-800 dark:text-amber-200", children: [ 110 /* @__PURE__ */ jsxRuntimeExports.jsx(CircleAlert, { size: 14, className: "inline mr-1 shrink-0" }), 111 "For legally-binding copyright takedowns, please use our official ", 112 /* @__PURE__ */ jsxRuntimeExports.jsx("a", { href: "/dmca", className: "font-bold underline text-indigo-600 dark:text-indigo-400", children: "DMCA Takedown Portal" }), 113 " for immediate, automated processing." 114 ] }), 115 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
116 /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "block text-sm font-bold text-zinc-700 dark:text-zinc-300 mb-1", children: t("help.description", "Description") }), 117 /* @__PURE__ */ jsxRuntimeExports.jsx( 118 "textarea", 119 { 120 required: true, 121 value: description, 122 onChange: (e) => { 123 setDescription(e.target.value); 124 setHasInteracted(true); 125 }, 126 onFocus: () => setHasInteracted(true), 127 className: "w-full h-32 bg-zinc-50 dark:bg-zinc-950 border border-zinc-300 dark:border-zinc-700 rounded-lg px-4 py-2.5 outline-none focus:ring-2 focus:ring-indigo-500 text-zinc-900 dark:text-white resize-none", 128 placeholder: "Please provide details about the issue..." 129 } 130 ) 131 ] }), 132 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-end gap-3 pt-4 border-t border-zinc-200 dark:border-zinc-800 mt-2", children: [
133 /* @__PURE__ */ jsxRuntimeExports.jsx( 134 "button", 135 { 136 type: "button", 137 onClick: onClose, 138 className: "px-6 py-2.5 rounded-lg font-bold text-zinc-600 hover:bg-zinc-100 dark:text-zinc-400 dark:hover:bg-zinc-800 transition-colors", 139 children: t("common.cancel", "Cancel") 140 } 141 ), 142 /* @__PURE__ */ jsxRuntimeExports.jsx( 143 "button", 144 { 145 type: "submit", 146 disabled: isSubmitting, 147 className: "px-6 py-2.5 bg-indigo-600 hover:bg-indigo-700 text-white rounded-lg font-bold flex items-center gap-2 transition-colors disabled:opacity-50", 148 children: isSubmitting ? t("common.loading", "Loading...") : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [ 149 /* @__PURE__ */ jsxRuntimeExports.jsx(Send, { size: 16 }), 150 " ", 151 t("help.submit", "Submit Ticket") 152 ] }) 153 } 154 ) 155 ] }) 156 ] }) 157 ] }) 158 ] }); 159} 160function TicketDetailModal({ isOpen, onClose, ticketId, currentUser }) { 161 const { t } = useTranslation(); 162 const [ticket, setTicket] = reactExports.useState(null); 163 const [replyText, setReplyText] = reactExports.useState(""); 164 const [isSubmitting, setIsSubmitting] = reactExports.useState(false); 165 const [loading, setLoading] = reactExports.useState(true); 166 const [error, setError] = reactExports.useState(""); 167 const scrollRef = reactExports.useRef(null); 168 reactExports.useEffect(() => { 169 if (isOpen && ticketId) { 170 fetchTicket(); 171 } 172 }, [isOpen, ticketId]); 173 reactExports.useEffect(() => { 174 if (scrollRef.current) { 175 scrollRef.current.scrollTop = scrollRef.current.scrollHeight; 176 } 177 }, [ticket == null ? void 0 : ticket.messages]); 178 const fetchTicket = async () => { 179 setLoading(true); 180 try { 181 const data = await api.getTicketDetails(ticketId); 182 setTicket(data); 183 } catch (err) { 184 setError(err.message || "Failed to load ticket details"); 185 } finally { 186 setLoading(false); 187 } 188 }; 189 const handleReply = async (e) => { 190 e.preventDefault(); 191 if (!replyText.trim() || isSubmitting) return; 192 setIsSubmitting(true); 193 try { 194 await api.replyToTicket(ticketId, replyText); 195 setReplyText(""); 196 await fetchTicket(); 197 } catch (err) { 198 setError(err.message || "Failed to send message"); 199 } finally { 200 setIsSubmitting(false); 201 } 202 }; 203 if (!isOpen) return null; 204 return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "fixed inset-0 z-[1000] flex items-center justify-center p-4", children: [ 205 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute inset-0 bg-black/80 backdrop-blur-sm", onClick: onClose }), 206 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative w-full max-w-2xl bg-white dark:bg-zinc-900 rounded-2xl shadow-2xl overflow-hidden border border-zinc-200 dark:border-zinc-800 flex flex-col max-h-[90vh] animate-in zoom-in-95", children: [
207 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-6 border-b border-zinc-200 dark:border-zinc-800 flex items-center justify-between bg-zinc-50 dark:bg-zinc-900/50", children: [ 208 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-4", children: [ 209 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-2 bg-indigo-50 dark:bg-indigo-900/20 rounded-lg text-indigo-600 dark:text-indigo-400", children: /* @__PURE__ */ jsxRuntimeExports.jsx(LifeBuoy, { size: 24 }) }), 210 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ 211 /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-xl font-bold text-zinc-900 dark:text-white line-clamp-1", children: (ticket == null ? void 0 : ticket.subject) || "Support Ticket" }), 212 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3 mt-1", children: [ 213 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `text-[10px] font-black uppercase tracking-widest px-2 py-0.5 rounded-full ${(ticket == null ? void 0 : ticket.status) === "open" ? "bg-emerald-100 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400" : "bg-zinc-100 text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400"}`, children: ticket == null ? void 0 : ticket.status }),
214 /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-xs text-zinc-500 flex items-center gap-1", children: [ 215 /* @__PURE__ */ jsxRuntimeExports.jsx(Clock, { size: 12 }), 216 " ", 217 formatTicketDate(ticket == null ? void 0 : ticket.createdAt) 218 ] }) 219 ] }) 220 ] }) 221 ] }), 222 /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: onClose, className: "p-2 hover:bg-zinc-200 dark:hover:bg-zinc-800 rounded-full transition-colors text-zinc-500", children: /* @__PURE__ */ jsxRuntimeExports.jsx(X, { size: 20 }) }) 223 ] }), 224 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 overflow-y-auto p-6 space-y-6 custom-scrollbar", ref: scrollRef, children: [ 225 loading ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center py-20 text-zinc-500 gap-3", children: [ 226 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-8 h-8 border-2 border-indigo-500 border-t-transparent rounded-full animate-spin" }),
227 /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-medium", children: "Loading conversation..." }) 228 ] }) : error ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-xl text-red-700 dark:text-red-300 flex items-center gap-3", children: [ 229 /* @__PURE__ */ jsxRuntimeExports.jsx(CircleAlert, { size: 20 }), 230 /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-medium", children: error }) 231 ] }) : ticket == null ? void 0 : ticket.messages.map((msg, i) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `flex gap-4 ${msg.sender === "support" ? "" : "flex-row-reverse"}`, children: [ 232 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `w-10 h-10 rounded-xl flex items-center justify-center ${msg.sender === "support" ? "bg-indigo-600 text-white shadow-lg shadow-indigo-500/20" : "bg-zinc-100 dark:bg-zinc-800 text-zinc-600 dark:text-zinc-400 border border-zinc-200 dark:border-zinc-700"}`, children: msg.sender === "support" ? /* @__PURE__ */ jsxRuntimeExports.jsx(ShieldCheck, { size: 20 }) : /* @__PURE__ */ jsxRuntimeExports.jsx(User, { size: 20 }) }) }),
233 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `flex flex-col gap-1 max-w-[80%] ${msg.sender === "support" ? "" : "items-end"}`, children: [ 234 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 px-1", children: [ 235 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-bold text-zinc-900 dark:text-white", children: msg.sender === "support" ? "HamieNET Support" : currentUser.username }), 236 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] text-zinc-500", children: formatTicketDate(msg.timestamp) }) 237 ] }), 238 /* @__PURE__ */ jsxRuntimeExports.jsx( 239 "div", 240 { 241 className: `p-4 rounded-2xl text-sm leading-relaxed ${msg.sender === "support" ? "bg-white dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-700 text-zinc-800 dark:text-zinc-200 rounded-tl-none" : "bg-indigo-600 text-white rounded-tr-none"}`, 242 style: { whiteSpace: "pre-wrap" }, 243 dangerouslySetInnerHTML: { __html: msg.text } 244 } 245 ) 246 ] }) 247 ] }, i)), 248 (ticket == null ? void 0 : ticket.status) === "resolved" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center py-8 gap-3 opacity-60", children: [
249 /* @__PURE__ */ jsxRuntimeExports.jsx(CircleCheck, { size: 40, className: "text-emerald-500" }), 250 /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-bold text-zinc-500", children: "This ticket has been marked as resolved." }) 251 ] }) 252 ] }), 253 (ticket == null ? void 0 : ticket.status) === "open" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-6 bg-zinc-50 dark:bg-zinc-900/50 border-t border-zinc-200 dark:border-zinc-800", children: [ 254 /* @__PURE__ */ jsxRuntimeExports.jsxs("form", { onSubmit: handleReply, className: "relative flex items-center gap-3", children: [ 255 /* @__PURE__ */ jsxRuntimeExports.jsx( 256 "textarea", 257 { 258 value: replyText, 259 onChange: (e) => setReplyText(e.target.value), 260 placeholder: "Type your response here...", 261 className: "w-full bg-white dark:bg-zinc-800 border border-zinc-300 dark:border-zinc-700 rounded-xl px-4 py-3 pr-14 text-sm outline-none focus:ring-2 focus:ring-indigo-500 text-zinc-900 dark:text-white transition-all resize-none h-14", 262 onKeyDown: (e) => { 263 if (e.key === "Enter" && !e.shiftKey) { 264 e.preventDefault(); 265 handleReply(e); 266 } 267 } 268 } 269 ),
270 /* @__PURE__ */ jsxRuntimeExports.jsx( 271 "button", 272 { 273 type: "submit", 274 disabled: isSubmitting || !replyText.trim(), 275 className: "absolute right-2 p-2 bg-indigo-600 hover:bg-indigo-700 text-white rounded-lg transition-all disabled:opacity-50 disabled:grayscale", 276 children: /* @__PURE__ */ jsxRuntimeExports.jsx(Send, { size: 20 }) 277 } 278 ) 279 ] }), 280 /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-[10px] text-zinc-500 mt-3 text-center", children: "Press Enter to send. Your response will be reviewed by our moderation team." }) 281 ] }) 282 ] }) 283 ] }); 284} 285function ShieldCheck({ size }) { 286 return /* @__PURE__ */ jsxRuntimeExports.jsxs( 287 "svg", 288 { 289 xmlns: "http://www.w3.org/2000/svg", 290 width: size, 291 height: size, 292 viewBox: "0 0 24 24", 293 fill: "none", 294 stroke: "currentColor", 295 strokeWidth: "2", 296 strokeLinecap: "round", 297 strokeLinejoin: "round", 298 children: [
299 /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }), 300 /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "m9 12 2 2 4-4" }) 301 ] 302 } 303 ); 304} 305const ICON_MAP = { 306 "user": User, 307 "play": Play, 308 "upload": Upload, 309 "shield": Shield, 310 "settings": Settings, 311 "message-circle": MessageSquare, 312 "credit-card": CreditCard, 313 "globe": Globe, 314 "help-circle": CircleQuestionMark, 315 "default": Info 316}; 317const DynamicCreditsGuide = ({ currentUser }) => { 318 var _a; 319 const [config, setConfig] = reactExports.useState(null); 320 const [loading, setLoading] = reactExports.useState(true); 321 reactExports.useEffect(() => { 322 api.getSystemSetting("credit_config").then((res) => { 323 if (res && res.value) { 324 setConfig(res.value); 325 } 326 setLoading(false); 327 }); 328 }, []); 329 if (loading) { 330 return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "py-10 text-center text-zinc-500", children: "Loading credit details..." }); 331 } 332 if (!config) { 333 return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "py-10 text-center text-red-500", children: "Could not load credit configuration." }); 334 } 335 return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-8 mt-6", children: [ 336 /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-zinc-600 dark:text-zinc-400 text-lg", children: "Credits are the virtual currency used to perform specific actions on the platform. This guide explains how credits are earned, spent, and allocated." }), 337 currentUser && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-indigo-50 dark:bg-indigo-900/20 border border-indigo-100 dark:border-indigo-800 rounded-xl p-6 flex items-center justify-between", children: [
338 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ 339 /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-lg font-bold text-indigo-900 dark:text-indigo-100 mb-1", children: "Your Current Balance" }), 340 /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-indigo-700 dark:text-indigo-300", children: "You can earn more credits based on your activity and trust score." }) 341 ] }), 342 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3 bg-white dark:bg-zinc-900 px-6 py-3 rounded-full border border-indigo-200 dark:border-indigo-700 shadow-sm", children: [ 343 /* @__PURE__ */ jsxRuntimeExports.jsx(Coins, { className: "text-amber-500" }), 344 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-2xl font-black text-zinc-900 dark:text-white", children: currentUser.credits || 0 }) 345 ] }) 346 ] }), 347 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
348 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white dark:bg-zinc-900 rounded-xl p-6 border border-zinc-200 dark:border-zinc-800", children: [ 349 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3 mb-4", children: [ 350 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-10 h-10 rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center text-red-600 dark:text-red-400", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Zap, { size: 20 }) }), 351 /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-xl font-bold text-zinc-900 dark:text-white", children: "Action Costs" }) 352 ] }), 353 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-6", children: [ 354 Object.entries( 355 getAllActionCosts(config).reduce((acc, action) => { 356 acc[action.category] = acc[action.category] || []; 357 acc[action.category].push(action); 358 return acc; 359 }, {}) 360 ).map(([category, actions]) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
361 /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "text-xs font-bold text-zinc-500 dark:text-zinc-400 uppercase tracking-wider mb-2", children: category }), 362 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-1 bg-zinc-50 dark:bg-zinc-800/50 p-3 rounded-lg border border-zinc-100 dark:border-zinc-800", children: actions.map((action) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center py-1.5 border-b border-zinc-100 dark:border-zinc-800/50 last:border-0", children: [ 363 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-zinc-700 dark:text-zinc-300 text-sm", children: action.label }), 364 /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-bold flex items-center gap-1 text-sm", children: [ 365 /* @__PURE__ */ jsxRuntimeExports.jsx(Coins, { size: 12, className: "text-amber-500" }), 366 " ", 367 action.currentCost 368 ] }) 369 ] }, action.key)) }) 370 ] }, category)),
371 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center py-2 border-t border-zinc-100 dark:border-zinc-800", children: [ 372 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-indigo-600 dark:text-indigo-400 font-bold", children: "Subscribers" }), 373 /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-bold flex items-center gap-1 text-emerald-500", children: [ 374 /* @__PURE__ */ jsxRuntimeExports.jsx(Coins, { size: 14, className: "text-amber-500" }), 375 " Free" 376 ] }) 377 ] }) 378 ] }) 379 ] }), 380 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white dark:bg-zinc-900 rounded-xl p-6 border border-zinc-200 dark:border-zinc-800", children: [ 381 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3 mb-4", children: [ 382 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-10 h-10 rounded-full bg-zinc-100 dark:bg-zinc-800 flex items-center justify-center text-zinc-600 dark:text-zinc-400", children: /* @__PURE__ */ jsxRuntimeExports.jsx(User, { size: 20 }) }),
383 /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-xl font-bold text-zinc-900 dark:text-white", children: "Guest Limitations" }) 384 ] }), 385 /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-zinc-600 dark:text-zinc-400 text-sm mb-4", children: "Unregistered users have strict limits on actions." }), 386 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-3", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center py-2 border-b border-zinc-100 dark:border-zinc-800", children: [ 387 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-zinc-700 dark:text-zinc-300", children: "Guest Downloads" }), 388 /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-bold", children: [ 389 ((_a = config.allotments.find((a) => a.id === "guest")) == null ? void 0 : _a.base) || 1, 390 " max" 391 ] }) 392 ] }) }) 393 ] }) 394 ] }), 395 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white dark:bg-zinc-900 rounded-xl p-6 border border-zinc-200 dark:border-zinc-800", children: [
396 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3 mb-6", children: [ 397 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-10 h-10 rounded-full bg-emerald-100 dark:bg-emerald-900/30 flex items-center justify-center text-emerald-600 dark:text-emerald-400", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ShieldCheck$1, { size: 20 }) }), 398 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [ 399 /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-xl font-bold text-zinc-900 dark:text-white", children: "Daily Allotments" }), 400 /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-zinc-500", children: "Credits are refreshed daily based on your tier and trust score." }) 401 ] }) 402 ] }), 403 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-6", children: config.allotments.map((tier) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "border border-zinc-100 dark:border-zinc-800 rounded-lg p-4", children: [
404 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center mb-4", children: [ 405 /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "font-bold text-lg text-zinc-900 dark:text-white", children: tier.name }), 406 /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "bg-zinc-100 dark:bg-zinc-800 px-3 py-1 rounded-full text-sm font-bold flex items-center gap-1", children: [ 407 "Base: ", 408 /* @__PURE__ */ jsxRuntimeExports.jsx(Coins, { size: 14, className: "text-amber-500 ml-1" }), 409 " ", 410 tier.base 411 ] }) 412 ] }), 413 tier.trustTiers.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-zinc-50 dark:bg-zinc-800/50 rounded p-4", children: [ 414 /* @__PURE__ */ jsxRuntimeExports.jsx("h5", { className: "text-sm font-bold text-zinc-700 dark:text-zinc-300 mb-3", children: "Trust Score Bonuses" }), 415 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: tier.trustTiers.map((trust, i) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between text-sm bg-white dark:bg-zinc-900 p-2 rounded border border-zinc-200 dark:border-zinc-700", children: [
416 /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-zinc-600 dark:text-zinc-400", children: [ 417 "Score ", 418 trust.score, 419 "+" 420 ] }), 421 /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-bold flex items-center gap-1", children: [ 422 /* @__PURE__ */ jsxRuntimeExports.jsx(Coins, { size: 12, className: "text-amber-500" }), 423 " ", 424 trust.credits 425 ] }) 426 ] }, i)) }) 427 ] }) 428 ] }, tier.id)) }) 429 ] }) 430 ] }); 431}; 432const DynamicAlgorithmGuide = ({ onNavigate }) => { 433 return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-10 mt-6", children: [ 434 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-gradient-to-br from-indigo-500 to-purple-600 rounded-3xl p-8 text-white shadow-xl relative overflow-hidden", children: [ 435 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute top-0 right-0 opacity-10 -mr-10 -mt-10", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Network, { size: 200 }) }),
436 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative z-10", children: [ 437 /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-3xl font-black mb-4", children: "Crowdsourced Engraving" }), 438 /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-indigo-100 text-lg max-w-2xl leading-relaxed", children: "The Community Standard Engine is a decentralized, version-controlled system where users write and vote on the code that converts MIDI files into Sheet Music." }) 439 ] }) 440 ] }), 441 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-8", children: [ 442 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white dark:bg-zinc-900 rounded-2xl p-6 border border-zinc-200 dark:border-zinc-800 shadow-sm", children: [ 443 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-12 h-12 rounded-xl bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center text-blue-600 mb-6", children: /* @__PURE__ */ jsxRuntimeExports.jsx(GitBranch, { size: 24 }) }),
444 /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-xl font-bold mb-3", children: "1. Branching" }), 445 /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-zinc-600 dark:text-zinc-400 text-sm leading-relaxed", children: 'Anyone can "branch" the current active standard. This creates a personal draft where you can modify the JavaScript logic responsible for note quantization, measure grouping, and XML generation.' }) 446 ] }), 447 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white dark:bg-zinc-900 rounded-2xl p-6 border border-zinc-200 dark:border-zinc-800 shadow-sm", children: [ 448 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-12 h-12 rounded-xl bg-orange-100 dark:bg-orange-900/30 flex items-center justify-center text-orange-600 mb-6", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { size: 24 }) }), 449 /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-xl font-bold mb-3", children: "2. Phase 1: Proposals" }), 450 /* @__P
450URE__ */ jsxRuntimeExports.jsx("p", { className: "text-zinc-600 dark:text-zinc-400 text-sm leading-relaxed", children: "Once you're happy with your logic, publish it to Phase 1. The community reviews your code and votes. You need a **Net 3 Score** (Upvotes minus Downvotes) over **24 hours** to advance." }) 451 ] }), 452 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white dark:bg-zinc-900 rounded-2xl p-6 border border-zinc-200 dark:border-zinc-800 shadow-sm", children: [ 453 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-12 h-12 rounded-xl bg-indigo-100 dark:bg-indigo-900/30 flex items-center justify-center text-indigo-600 mb-6", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Play, { size: 24 }) }), 454 /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-xl font-bold mb-3", children: "3. Phase 2: Testing" }), 455 /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-zinc-600 dark:text-zinc-400 text-sm leading-relaxed", children: "In Phase 2, your algorithm is put through rigorous automated benchmarks against reference MIDI files. Users visit the **Staging Arena** to compare your output against the current standard." }) 456 ] }),
457 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white dark:bg-zinc-900 rounded-2xl p-6 border border-zinc-200 dark:border-zinc-800 shadow-sm", children: [ 458 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-12 h-12 rounded-xl bg-emerald-100 dark:bg-emerald-900/30 flex items-center justify-center text-emerald-600 mb-6", children: /* @__PURE__ */ jsxRuntimeExports.jsx(GitMerge, { size: 24 }) }), 459 /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-xl font-bold mb-3", children: "4. Merging to Main" }), 460 /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-zinc-600 dark:text-zinc-400 text-sm leading-relaxed", children: "If a Phase 2 algorithm maintains its threshold, it is automatically merged into the **Main Branch**. It becomes the new platform default, and its version number is incremented (e.g., V1.01)." }) 461 ] }) 462 ] }), 463 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-zinc-100 dark:bg-zinc-800/50 rounded-2xl p-8 border border-zinc-200 dark:border-zinc-700", children: [
464 /* @__PURE__ */ jsxRuntimeExports.jsxs("h3", { className: "text-xl font-bold mb-4 flex items-center gap-2", children: [ 465 /* @__PURE__ */ jsxRuntimeExports.jsx(CodeXml, { size: 24, className: "text-indigo-500" }), 466 "How to access the Editor?" 467 ] }), 468 /* @__PURE__ */ jsxRuntimeExports.jsxs("ol", { className: "list-decimal list-inside space-y-4 text-zinc-700 dark:text-zinc-300", children: [ 469 /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { children: [ 470 "Navigate to the ", 471 /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: "Algorithm Studio" }), 472 ' via the sidebar (under "Tools").' 473 ] }), 474 /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { children: [ 475 "Click the ", 476 /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: '"Branch New Logic"' }), 477 " button to start from the current active version." 478 ] }), 479 /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { children: [ 480 "Use the built-in ",
481 /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: "IDE" }), 482 ' to write your JavaScript. You can use the "Code with AI" prompt to get help from LLMs.' 483 ] }), 484 /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { children: [ 485 "Test your code in the ", 486 /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: "Sandbox" }), 487 " against any MIDI ID from the platform." 488 ] }) 489 ] }) 490 ] }), 491 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col items-center py-10", children: /* @__PURE__ */ jsxRuntimeExports.jsx( 492 "button", 493 { 494 onClick: () => onNavigate == null ? void 0 : onNavigate("algorithm-studio"), 495 className: "px-10 py-4 bg-indigo-600 hover:bg-indigo-700 text-white rounded-2xl font-black shadow-xl shadow-indigo-500/30 transition-all transform hover:scale-105", 496 children: "Visit Algorithm Studio" 497 } 498 ) }) 499 ] }); 500}; 501const ArticleView = ({ article, onBack, currentUser, onNavigate }) => { 502 return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "animate-in fade-in slide-in-from-bottom-4 max-w-4xl mx-auto", children: [ 503 /* @__PURE__ */ jsxRuntimeExports.jsxs( 504 "button", 505 { 506 onClick: onBack, 507 className: "group flex items-center gap-2 text-zinc-500 hover:text-zinc-900 dark:hover:text-white mb-6 transition-colors font-medium", 508 children: [
509 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-1.5 rounded-full bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 group-hover:bg-zinc-100 dark:group-hover:bg-zinc-800 transition-colors shadow-sm", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowLeft, { size: 18 }) }), 510 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Back to Help Center" }) 511 ] 512 } 513 ), 514 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white dark:bg-zinc-900 rounded-2xl shadow-sm border border-zinc-200 dark:border-zinc-800 p-8 md:p-12 overflow-hidden relative", children: [ 515 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute -top-10 -right-10 opacity-[0.03] pointer-events-none rotate-12", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CircleQuestionMark, { size: 300 }) }), 516 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", children: [ 517 /* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-3xl md:text-4xl font-bold text-zinc-900 dark:text-white mb-6 leading-tight", children: article.title }),
518 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-wrap items-center gap-6 text-sm text-zinc-500 mb-10 border-b border-zinc-100 dark:border-zinc-800 pb-6", children: [ 519 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [ 520 /* @__PURE__ */ jsxRuntimeExports.jsx(Clock, { size: 16 }), 521 /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [ 522 "Last updated ", 523 new Date(article.lastUpdated).toLocaleDateString() 524 ] }) 525 ] }), 526 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [ 527 /* @__PURE__ */ jsxRuntimeExports.jsx(Eye, { size: 16 }), 528 /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [ 529 article.views, 530 " views" 531 ] }) 532 ] }) 533 ] }), 534 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "prose prose-indigo dark:prose-invert max-w-none prose-headings:font-bold prose-a:text-indigo-600 dark:prose-a:text-indigo-400", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "whitespace-pre-wrap font-sans text-zinc-700 dark:text-zinc-300 leading-relaxed text-base md:text-lg", children: article.id === "virtual-credits-guide" ? /* @__PURE__ */ jsxRuntimeExports.jsx(DynamicCreditsGuide, { currentUser }) : article.id === "community-standard-guide" ? /* @__PURE__ */ jsxRuntimeExports.jsx(DynamicAlgorithmGuide, { onNavigate }) : article.content }) }) 535 ] }) 536 ] }), 537 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-8 text-center text-sm text-zinc-500", children: [
538 /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: "Was this article helpful?" }), 539 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-4 justify-center mt-3", children: [ 540 /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "px-4 py-2 bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-full hover:border-indigo-500 hover:text-indigo-500 transition-colors shadow-sm", children: "Yes, thanks" }), 541 /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "px-4 py-2 bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-full hover:border-red-500 hover:text-red-500 transition-colors shadow-sm", children: "Not really" }) 542 ] }) 543 ] }) 544 ] }); 545}; 546const HelpPage = ({ currentUser, onAuthRequested, initialArticleId, category, onNavigate }) => { 547 var _a; 548 const { t, i18n } = useTranslation(); 549 const [searchQuery, setSearchQuery] = reactExports.useState(""); 550 const [isTicketModalOpen, setIsTicketModalOpen] = reactExports.useState(false); 551 const [categories, setCategories] = reactExports.useState([]); 552 const [articles, setArticles] = reactExports.useState([]); 553 const [loading, setLoading] = reactExports.useState(true); 554 const [selectedCategory, setSelectedCategory] = reactExports.useState(null); 555 const [viewingArticle, setViewingArticle] = reactExports.useState(null); 556 const [myTickets, setMyTickets] = reactExports.useState([]); 557 const [selectedTicketId, setSelectedTicketId] = reactExports.useState(null); 558 const [isTicketDetailOpen, setIsTicketDetailOpen] = reactExports.useState(false); 559 reactExports.useEffect(() => { 560 if (category && category !== "all") { 561 setSelectedCategory(category); 562 } else { 563 setSelectedCategory(null); 564 } 565 }, [category]); 566 const handleCategoryClick = (categoryId) => { 567 if (onNavigate) { 568 if (categoryId) { 569 onNavigate("help?cat=" + categoryId); 570 } else { 571 onNavigate("help"); 572 } 573 } else { 574 setSelectedCategory(categoryId); 575 } 576 if (categoryId) { 577 setTimeout(() => { 578 const element = document.getElementById("knowledge-base"); 579 if (element) { 580 element.scrollIntoView({ behavior: "smooth", block: "start" }); 581 } 582 }, 50); 583 } 584 }; 585 reactExports.useEffect(() => { 586 if (currentUser) { 587 api.getMyTickets().then(setMyTickets); 588 } 589 }, [currentUser]); 590 reactExports.useEffect(() => { 591 const params = new URLSearchParams(window.location.search); 592 const ticketId = params.get("ticket"); 593 if (ticketId) { 594 setSelectedTicketId(ticketId); 595 setIsTicketDetailOpen(true); 596 } 597 }, []); 598 reactExports.useEffect(() => { 599 const fetchData = async () => { 600 let cats = await api.getHelpCategories(); 601 let arts = await api.getHelpArticles(); 602 const legalCategory = { 603 id: "legal", 604 title: "Legal & Policies", 605 description: "Our commitment to archival ethics and privacy.", 606 iconKey: "shield", 607 colorClass: "bg-zinc-100 dark:bg-zinc-800 text-zinc-600 dark:text-zinc-400", 608 order: 100, 609 isHidden: false, 610 type: "support", 611 translations: {} 612 }; 613 const analysisCategory = { 614 id: "analysis", 615 title: "MIDI & Analysis", 616 description: "Understand how we analyze and process your music.", 617 iconKey: "play", 618 colorClass: "bg-amber-100 dark:bg-amber-900/30 text-amber-600 dark:text-amber-400", 619 order: 50, 620 isHidden: false, 621 type: "info", 622 translations: {} 623 }; 624 if (!cats.some((c) => c.id === "analysis")) { 625 cats.push(analysisCategory); 626 } 627 if (!cats.some((c) => c.id === "legal")) { 628 cats.push(legalCategory); 629 } 630 const virtualCreditsArticle = { 631 id: "virtual-credits-guide", 632 categoryId: "account", 633 title: "Credit System & Costs", 634 content: "Virtual Component", 635 isPublished: true, 636 isHidden: false, 637 views: 0, 638 lastUpdated: /* @__PURE__ */ new Date(), 639 translations: {} 640 }; 641 const termsArticle = { 642 id: "terms", 643 categoryId: "legal", 644 title: "Terms of Service", 645 content: `DISCLAIMER 646HamieNET.com contains MIDI, lyrics, and music scores for educational use only (study, skill development, scholarship, research, etc.). The goal of HamieNET.com is to educate the world with music. We do not seek to violate copyrights, and we encourage you to purchase the artist's album and official sheet music. Use of this site signifies your acceptance of these Terms and Conditions. If you do not wish to be bound by this agreement, do not access HamieNET.com. 647 648The copyright law of the United States Of America (Title 17, United States Code) governs the making of photocopies or other reproductions of copyrighted material. Under certain conditions specified in the law, libraries and archives are authorized to furnish a photocopy or other reproduction. One of these specified conditions is that the photocopy or reproduction is not to be "used for any purpose other than private study, scholarship, or research." If a user/visitor of this website uses a reproduction of any material for purposes in excess of "fair use," that user/visitor may be liable for copyright infringement. Many items on this website do not contain individual copyright notices. The lack of a notice does not necessarily mean that the work is not protected by copyright law. 649 650This agreement is entered into by and between HamieNET.com and any individual, corporation, association, agency, company, or other entity who accesses or uses HamieNET.com (the "User" or "you"). 651 652USER CONDUCT 653You agree to access and use HamieNET.com only for lawful purposes. You are solely responsible for the knowledge of and adherence to any and all laws, statutes, rules and regulations, pertaining to: 654(i) your use of the HamieNET.com, including any Interactive Area; 655(ii) the use of any networks or other services connected to HamieNET.com. 656 657By accessing HamieNET.com, you agree that you will not: 6581. Restrict or inhibit any other user from using and enjoying the Features of HamieNET.com. 6592. Post or transmit any unlawful, threatening, abusive, libelous, defamatory, obscene, vulgar, pornographic, profane, or indecent information of any kind. 6603. Post or transmit any information, software, or other material which violates or infringes on the rights of others, including material which is an invasion of privacy or publicity rights or which is protected by copyright, trademark or other proprietary right. 6614. Post or transmit any information, software or other material which contains a virus or other harmful component. 6625. Alter, damage or delete any Content or other communications that are not your own Content or otherwise interfere with the ability of others to access HamieNET.com. 663 664LIMITATION OF LIABILITY 665UNDER NO CIRCUMSTANCES SHALL HAMIENET.COM, ITS SUBSIDIARY AND PARENT COMPANIES, OR AFFILIATES, OR THEIR RESPECTIVE DIRECTORS, OFFICERS, EMPLOYEES, AGENTS, CONTRACTORS, OR LICENSORS, BE LIABLE FOR ANY INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES UNDER OR ARISING FROM THIS AGREEMENT. THIS INCLUDES WITHOUT LIMITATION, ANY LIABILITY FOR DAMAGES CAUSED OR ALLEGEDLY CAUSED BY ANY FAILURE OF PERFORMANCE, ERROR, OMISSION, INTERRUPTION, ELECTRICAL SURGE/DAMAGE/INTERFERENCE, DELETION, DEFECT, DELAY IN OPERATION OR TRANSMISSION, COMPUTER VIRUS, COMMUNICATIONS LINE FAILURE, BREAKDOWN OF EQUIPMENT, SOFTWARE ERROR, INFRINGEMENT, UNAUTHORIZED ACCESS TO, OR THEFT, DESTRUCTION, ALTERATION, OR USE OF, RECORDS. 666 667UNDER NO CIRCUMSTANCES SHALL THE OPEN EDUCATIONAL MUSIC LIBRARY, ITS SUBSIDIARY AND PARENT COMPANIES, OR AFFILIATES, OR THEIR RESPECTIVE DIRECTORS, OFFICERS, EMPLOYEES, AGENTS, CONTRACTORS, OR LICENSORS, BE LIABLE TO YOU OR ANY OTHER THIRD PARTY FOR ANY DECISION MADE OR ACTION TAKEN BY YOU IN RELIANCE ON THE CONTENT CONTAINED WITHIN HAMIENET.COM. IF YOU ARE DISSATISFIED WITH ANY HAMIENET.COM SITE CONTENT, OR WITH THE ACCESS AGREEMENT OF HAMIENET.COM, IN WHOLE OR IN PART, YOUR SOLE AND EXCLUSIVE REMEDY IS TO DISCONTINUE USING HAMIENET.COM. 668 669INDEMNITY & REVISIONS 670HamieNET.com may revise this Agreement or any other policy at any time, and such revision shall be effective tw
670o (2) days upon posting notice of such revision prominently on HamieNET.com. You agree to review this Agreement periodically to be aware of such revisions. Your continued accessing and use of HamieNET.com following notice of any such revision shall conclusively be deemed acceptance of all such revisions.`, 671 isPublished: true, 672 isHidden: false, 673 views: 1240, 674 lastUpdated: /* @__PURE__ */ new Date("2024-01-15"), 675 translations: {} 676 }; 677 const privacyArticle = { 678 id: "privacy", 679 categoryId: "legal", 680 title: "Privacy Policy", 681 content: `INFORMATION GATHERING & PRIVACY 682HamieNET.com is firmly committed to privacy. Our registration form requires users to give us contact information (like their name and email address) and demographic information (like their location or age). The user's contact information is used to contact the user when necessary. Demographic and profile data is used to tailor the user's experience at our site, showing them content that we think they might be interested in. 683 684PUBLIC FORUMS 685This site makes chat rooms, forums, message boards, and/or news groups available to its users. Please remember that any information that is disclosed in these areas becomes public information and you should exercise caution when deciding to disclose your personal information. 686 687SECURITY & COOKIES 688The platform software uses cookies to 'remember' your session and language preferences. This avoids the need to re-type your credentials constantly. When you register and when you make a post, your IP address is stored on our server. This protects you as a member and us as a platform in identifying that the user who posted is indeed authentic. This information will only be used if you misuse any features or in any dispute. 689 690CHILDREN'S GUIDELINES 691In accordance with children's privacy protection standards, HamieNET.com will: 692- NOT collect online contact information without prior parental consent or notification. 693- NOT collect personally identifiable offline contact information without prior parental consent. 694- NOT distribute to third parties any personally identifiable information without prior parental consent. 695- NOT entice by the prospect of a special game, prize or other activity, to divulge more information than is needed to participate in the activity. 696 697ADVERTISING & THIRD PARTIES 698Google, as a third party vendor, uses cookies to serve ads on HamieNET. We allow third-party companies to serve ads and/
698or collect certain anonymous information when you visit our web site. These companies may use non-personally identifiable information during your visits to this and other web sites in order to provide advertisements about goods and services likely to be of greater interest to you. 699 700CHOICE / OPT-OUT 701This site gives users the option for removing their information from our database to not receive future communications or to no longer receive our service. You can contact us via private messaging or edit your profile at any time to change or modify information previously provided.`, 702 isPublished: true, 703 isHidden: false, 704 views: 850, 705 lastUpdated: /* @__PURE__ */ new Date("2024-01-15"), 706 translations: {} 707 }; 708 const difficultyArticle = { 709 id: "difficulty-guide", 710 categoryId: "analysis", 711 title: "How Difficulty is Calculated", 712 content: `Every MIDI file uploaded to HamieNET undergoes a rigorous technical analysis by our MIDI worker to determine its playing difficulty. This ensures that learners and virtuosos alike can find content suited to their skill level. 713 714### The Metrics 715Our algorithm analyzes three primary dimensions of a musical score: 716 7171. **Notes Per Second (NPS):** 718This is the primary measure of speed. We count every note in the score and divide it by the total duration. A higher density of notes generally indicates a higher difficulty. 719 7202. **Range Spread:** 721This measures the "reach" required. We calculate the distance between the lowest and highest MIDI notes. A wide range often indicates complex arrangements or large leaps. 722 7233. **Max Polyphony:** 724This measures "thickness". We detect the maximum number of notes played simultaneously in a single chord. High polyphony (e.g., 8-note piano chords) requires more advanced technique. 725 726### The Formula 727These metrics are combined into a weighted score: 728Score = (NPS à 2) + (Range Spread / 12 à 1.5) + (Max Polyphony à 5) 729 730### Difficulty Tiers 731The final score is mapped to one of four levels: 732⢠Beginner: Score < 20 733⢠Intermediate: Score 20 - 49 734⢠Advanced: Score 50 - 89 735⢠Virtuoso: Score 90+ 736 737This automated system provides a consistent baseline across our library of over 100,000 tracks.`, 738 isPublished: true, 739 isHidden: false, 740 views: 0, 741 lastUpdated: /* @__PURE__ */ new Date(), 742 translations: {} 743 }; 744 const communityStandardArticle = { 745 id: "community-standard-guide", 746 categoryId: "analysis", 747 title: "Community Standard Engine", 748 content: "Virtual Component", 749 isPublished: true, 750 isHidden: false, 751 views: 0, 752 lastUpdated: /* @__PURE__ */ new Date(), 753 translations: {} 754 }; 755 const defaultArts = [virtualCreditsArticle, communityStandardArticle, termsArticle, privacyArticle, difficultyArticle]; 756 for (const defaultArt of defaultArts) { 757 if (!arts.some((a) => a.id === defaultArt.id)) { 758 arts.push(defaultArt); 759 } 760 } 761 setCategories(cats); 762 setArticles(arts); 763 setLoading(false); 764 }; 765 fetchData(); 766 }, []); 767 const getLocalizedArticle = React.useCallback((article) => { 768 const currentLang = i18n.language; 769 if (article.translations && article.translations[currentLang]) { 770 const trans = article.translations[currentLang]; 771 return { 772 ...article, 773 title: trans.title || article.title, 774 content: trans.content || article.content 775 }; 776 } 777 return article; 778 }, [i18n.language]); 779 reactExports.useEffect(() => { 780 if (!loading && articles.length > 0) { 781 if (initialArticleId) { 782 const article = articles.find((a) => a.id === initialArticleId); 783 if (article) { 784 setViewingArticle(getLocalizedArticle(article)); 785 } else { 786 setViewingArticle(null); 787 } 788 } else { 789 setViewingArticle(null); 790 } 791 } 792 }, [loading, initialArticleId, articles, getLocalizedArticle]); 793 const handleContactClick = () => { 794 if (!currentUser) { 795 onAuthRequested(); 796 } else { 797 setIsTicketModalOpen(true); 798 } 799 }; 800 const getIcon = (key) => { 801 return ICON_MAP[key] || ICON_MAP["default"]; 802 }; 803 const infoCategories = reactExports.useMemo(() => { 804 if (!Array.isArray(categories)) return []; 805 return categories.filter((c) => !c.isHidden && (c.type === "info" || !c.type)).sort((a, b) => a.order - b.order); 806 }, [categories]); 807 const supportCategories = reactExports.useMemo(() => { 808 if (!Array.isArray(categories)) return []; 809 return categories.filter((c) => !c.isHidden && c.type === "support").sort((a, b) => a.order - b.order); 810 }, [categories]); 811 const filteredArticles = reactExports.useMemo(() => { 812 if (!Array.isArray(articles)) return []; 813 const filtered = articles.filter((a) => a.isPublished && !a.isHidden); 814 const localized = filtered.map(getLocalizedArticle); 815 if (selectedCategory) { 816 return localized.filter((a) => a.categoryId === selectedCategory); 817 } 818 if (searchQuery) { 819 const q = searchQuery.toLowerCase(); 820 return localized.filter( 821 (a) => a.title.toLowerCase().includes(q) || a.content.toLowerCase().includes(q) 822 ); 823 } 824 return localized; 825 }, [articles, selectedCategory, searchQuery, getLocalizedArticle]); 826 const activeCategoryTitle = selectedCategory ? (_a = categories.find((c) => c.id === selectedCategory)) == null ? void 0 : _a.title : t("help.knowledgeBase", "Knowledge Base"); 827 const isFilteredView = selectedCategory || searchQuery; 828 if (viewingArticle) { 829 return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "min-h-full animate-in fade-in pb-20 pt-8 px-6 lg:px-10", children: /* @__PURE__ */ jsxRuntimeExports.jsx( 830 ArticleView, 831 { 832 article: viewingArticle, 833 onBack: () => { 834 if (onNavigate) { 835 onNavigate("help"); 836 } else {
837 setViewingArticle(null); 838 } 839 }, 840 currentUser, 841 onNavigate 842 } 843 ) }); 844 } 845 return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-h-full animate-in fade-in pb-20 bg-zinc-50 dark:bg-[#0a0a0a]", children: [ 846 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative pt-24 pb-32 px-6 overflow-hidden bg-white dark:bg-black", children: [ 847 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute top-0 left-1/4 w-[500px] h-[500px] bg-indigo-500/10 blur-[120px] rounded-full animate-pulse pointer-events-none" }), 848 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute bottom-0 right-1/4 w-[500px] h-[500px] bg-purple-500/10 blur-[120px] rounded-full animate-pulse pointer-events-none" }), 849 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "max-w-4xl mx-auto relative text-center", children: [ 850 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "inline-flex items-center gap-2 px-3 py-1 rounded-full bg-indigo-50 dark:bg-indigo-900/30 text-indigo-600 dark:text-indigo-400 text-xs font-bold uppercase tracking-wider mb-6 animate-in fade-in slide-in-from-top-4 duration-700", children: [
851 /* @__PURE__ */ jsxRuntimeExports.jsx(LifeBuoy, { size: 14 }), 852 "How can we help?" 853 ] }), 854 /* @__PURE__ */ jsxRuntimeExports.jsxs("h1", { className: "text-4xl md:text-6xl font-black text-zinc-900 dark:text-white mb-8 tracking-tight", children: [ 855 "Help & ", 856 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-transparent bg-clip-text bg-gradient-to-r from-indigo-500 to-purple-500", children: "Resources" }) 857 ] }), 858 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "max-w-2xl mx-auto relative group", children: [ 859 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute -inset-1 bg-gradient-to-r from-indigo-500 to-purple-500 rounded-2xl blur opacity-25 group-hover:opacity-40 transition duration-1000 group-hover:duration-200" }), 860 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", children: [ 861 /* @__PURE__ */ jsxRuntimeExports.jsx(Search, { className: "absolute left-5 top-1/2 -translate-y-1/2 text-zinc-400", size: 24 }),
862 /* @__PURE__ */ jsxRuntimeExports.jsx( 863 "input", 864 { 865 type: "text", 866 value: searchQuery, 867 onChange: (e) => { 868 setSearchQuery(e.target.value); 869 setSelectedCategory(null); 870 }, 871 placeholder: t("help.searchPlaceholder", "Find answers, guides and documentation..."), 872 className: "w-full pl-14 pr-6 py-5 rounded-2xl bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 text-zinc-900 dark:text-white outline-none focus:ring-2 focus:ring-indigo-500 shadow-xl transition-all text-lg" 873 } 874 ) 875 ] }) 876 ] }) 877 ] }) 878 ] }), 879 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "max-w-7xl mx-auto px-6 -mt-12 relative", children: [ 880 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { id: "knowledge-base", className: "mb-16", children: [ 881 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-between mb-8", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("h2", { className: "text-2xl font-black text-zinc-900 dark:text-white flex items-center gap-3", children: [ 882 isFilteredView ? /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: () => { 883 if (onNavigate) { 884 onNavigate("help"); 885 } else { 886 setSelectedCategory(null); 887 } 888 setSearchQuery(""); 889 }, className: "hover:bg-zinc-100 dark:hover:bg-zinc-800 p-2 rounded-xl border border-zinc-200 dark:border-zinc-800 transition-colors", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowLeft, { size: 24 }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-2 bg-white dark:bg-zinc-900 rounded-xl border border-zinc-200 dark:border-zinc-800 shadow-sm", children: /* @__PURE__ */ jsxRuntimeExports.jsx(BookOpen, { className: "text-indigo-500" }) }), 890 searchQuery ? t("help.searchResults", "Search Results") : activeCategoryTitle 891 ] }) }), 892 isFilteredView ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: filteredArticles.length > 0 ? filteredArticles.map((article, i) => /* @__PURE__ */ jsxRuntimeExports.jsxs( 893 "div", 894 { 895 onClick: () => { 896 if (onNavigate) { 897 onNavigate("help", article.id); 898 } else { 899 setViewingArticle(article); 900 } 901 }, 902 className: "bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-2xl p-8 hover:border-indigo-500 hover:shadow-2xl hover:shadow-indigo-500/10 transition-all group cursor-pointer animate-in fade-in slide-in-from-bottom-4", 903 style: { animationDelay: `${i * 50}ms` }, 904 children: [
905 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-start mb-4", children: [ 906 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-2 bg-indigo-50 dark:bg-indigo-900/30 rounded-lg text-indigo-600 dark:text-indigo-400", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Info, { size: 20 }) }), 907 /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { size: 18, className: "text-zinc-400 group-hover:text-indigo-500 group-hover:translate-x-1 transition-all" }) 908 ] }), 909 /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-xl font-bold text-zinc-900 dark:text-white mb-3 group-hover:text-indigo-600 dark:group-hover:text-indigo-400 transition-colors", children: article.title }), 910 /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-zinc-600 dark:text-zinc-400 text-sm leading-relaxed line-clamp-3", children: article.content }) 911 ] 912 }, 913 i 914 )) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "col-span-full flex flex-col items-center py-20 bg-white dark:bg-zinc-900 rounded-3xl border-2 border-dashed border-zinc-200 dark:border-zinc-800", children: [
915 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 bg-zinc-50 dark:bg-zinc-800 rounded-full mb-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Search, { size: 40, className: "text-zinc-400" }) }), 916 /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-zinc-500 font-medium", children: t("home.noResults", "No results found") }) 917 ] }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6", children: loading ? Array(4).fill(0).map((_, i) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-48 bg-white dark:bg-zinc-900 animate-pulse rounded-2xl border border-zinc-200 dark:border-zinc-800" }, i)) : infoCategories.map((cat, i) => { 918 const Icon = getIcon(cat.iconKey); 919 return /* @__PURE__ */ jsxRuntimeExports.jsxs( 920 "button", 921 { 922 onClick: () => handleCategoryClick(cat.id), 923 className: "group flex flex-col items-center p-8 bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-3xl hover:border-indigo-500 transition-all shadow-xl hover:shadow-indigo-500/20 text-center relative overflow-hidden animate-in fade-in slide-in-from-bottom-4", 924 style: { animationDelay: `${i * 100}ms` }, 925 children: [
926 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute top-0 right-0 w-24 h-24 bg-gradient-to-br from-indigo-500/5 to-purple-500/5 -mr-8 -mt-8 rounded-full blur-2xl group-hover:scale-150 transition-transform duration-700" }), 927 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `w-16 h-16 rounded-2xl mb-6 ${cat.colorClass} flex items-center justify-center shadow-lg group-hover:scale-110 group-hover:rotate-3 transition-all duration-300`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { size: 32 }) }), 928 /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-lg font-black text-zinc-900 dark:text-white mb-2", children: cat.title }), 929 /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-zinc-500 dark:text-zinc-400 leading-relaxed", children: cat.description }) 930 ] 931 }, 932 cat.id 933 ); 934 }) }) 935 ] }), 936 currentUser && myTickets.length > 0 && !isFilteredView && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-16 animate-in fade-in slide-in-from-bottom-4 duration-700 delay-200", children: [
937 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-between mb-8", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("h2", { className: "text-2xl font-black text-zinc-900 dark:text-white flex items-center gap-3", children: [ 938 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-2 bg-indigo-50 dark:bg-indigo-900/30 rounded-xl border border-indigo-100 dark:border-indigo-800 shadow-sm", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageSquare, { className: "text-indigo-500" }) }), 939 t("help.myTickets", "My Support Requests") 940 ] }) }), 941 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-white dark:bg-zinc-900 rounded-3xl border border-zinc-200 dark:border-zinc-800 overflow-hidden shadow-xl", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("table", { className: "w-full text-left border-collapse", children: [ 942 /* @__PURE__ */ jsxRuntimeExports.jsx("thead", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { className: "bg-zinc-50 dark:bg-zinc-950 border-b border-zinc-200 dark:border-zinc-800", children: [
943 /* @__PURE__ */ jsxRuntimeExports.jsx("th", { className: "px-6 py-4 text-xs font-bold text-zinc-500 uppercase tracking-wider", children: t("help.subject", "Subject") }), 944 /* @__PURE__ */ jsxRuntimeExports.jsx("th", { className: "px-6 py-4 text-xs font-bold text-zinc-500 uppercase tracking-wider text-center", children: t("help.status", "Status") }), 945 /* @__PURE__ */ jsxRuntimeExports.jsx("th", { className: "px-6 py-4 text-xs font-bold text-zinc-500 uppercase tracking-wider", children: t("help.updated", "Last Update") }), 946 /* @__PURE__ */ jsxRuntimeExports.jsx("th", { className: "px-6 py-4 text-xs font-bold text-zinc-500 uppercase tracking-wider text-right", children: t("common.action", "Action") }) 947 ] }) }), 948 /* @__PURE__ */ jsxRuntimeExports.jsx("tbody", { className: "divide-y divide-zinc-100 dark:divide-zinc-800", children: myTickets.map((ticket) => /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { className: "hover:bg-zinc-50 dark:hover:bg-zinc-800/50 transition-colors", children: [
949 /* @__PURE__ */ jsxRuntimeExports.jsxs("td", { className: "px-6 py-4", children: [ 950 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-bold text-zinc-900 dark:text-white", children: ticket.subject }), 951 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-zinc-500 mt-0.5", children: ticket.category }) 952 ] }), 953 /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "px-6 py-4 text-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `inline-flex items-center px-2.5 py-0.5 rounded-full text-[10px] font-black uppercase tracking-widest ${ticket.status === "open" ? "bg-emerald-100 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400" : "bg-zinc-100 text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400"}`, children: ticket.status }) }), 954 /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "px-6 py-4 text-sm text-zinc-500", children: ticket.createdAt }), 955 /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "px-6 py-4 text-right", children: /* @__PURE__ */ jsxRuntimeExports.jsx( 956 "button", 957 { 958 onClick: () => { 959 setSelectedTicketId(ticket.id); 960 setIsTicketDetailOpen(true); 961 }, 962 className: "px-4 py-1.5 bg-indigo-50 dark:bg-indigo-900/30 text-indigo-600 dark:text-indigo-400 rounded-lg text-xs font-bold hover:bg-indigo-600 hover:text-white transition-all shadow-sm border border-indigo-100 dark:border-indigo-800", 963 children: t("common.view", "View Details") 964 } 965 ) }) 966 ] }, ticket.id)) }) 967 ] }) }) }) 968 ] }),
969 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-3 gap-8", children: [ 970 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "lg:col-span-2 bg-white dark:bg-zinc-900 rounded-3xl border border-zinc-200 dark:border-zinc-800 p-8 md:p-10 shadow-xl", children: [ 971 /* @__PURE__ */ jsxRuntimeExports.jsxs("h2", { className: "text-2xl font-black text-zinc-900 dark:text-white mb-8 flex items-center gap-3", children: [ 972 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-2 bg-amber-50 dark:bg-amber-900/30 rounded-xl", children: /* @__PURE__ */ jsxRuntimeExports.jsx(LifeBuoy, { className: "text-amber-500" }) }), 973 t("help.commonTopics", "Common Topics") 974 ] }), 975 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: supportCategories.map((cat, i) => /* @__PURE__ */ jsxRuntimeExports.jsxs( 976 "button", 977 { 978 onClick: () => handleCategoryClick(cat.id), 979 className: "group flex justify-between items-center p-5 bg-zinc-50 dark:bg-zinc-800/50 rounded-2xl border border-zinc-100 dark:border-zinc-800 hover:border-indigo-400 dark:hover:border-indigo-600 hover:bg-white dark:hover:bg-zinc-800 transition-all animate-in fade-in slide-in-from-left-4", 980 style: { animationDelay: `${i * 50}ms` }, 981 children: [
982 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-4", children: [ 983 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-1.5 h-1.5 rounded-full bg-indigo-500 opacity-0 group-hover:opacity-100 transition-opacity" }), 984 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-bold text-zinc-800 dark:text-zinc-200", children: cat.title }) 985 ] }), 986 /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { size: 18, className: "text-zinc-400 group-hover:text-indigo-500 group-hover:translate-x-1 transition-all" }) 987 ] 988 }, 989 cat.id 990 )) }) 991 ] }), 992 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative group overflow-hidden bg-gradient-to-br from-indigo-600 to-purple-600 rounded-3xl p-10 flex flex-col items-center justify-center text-center shadow-2xl", children: [ 993 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute top-0 right-0 w-64 h-64 bg-white/10 blur-[80px] rounded-full -mr-20 -mt-20" }),
994 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute bottom-0 left-0 w-64 h-64 bg-indigo-400/20 blur-[80px] rounded-full -ml-20 -mb-20" }), 995 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", children: [ 996 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-20 h-20 bg-white/10 backdrop-blur-xl border border-white/20 rounded-3xl flex items-center justify-center text-white mb-6 scale-110 rotate-3 shadow-2xl", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MessageCircle, { size: 40 }) }), 997 /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-2xl font-black text-white mb-3 tracking-tight", children: t("help.stillNeedHelp", "Still need help?") }), 998 /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-indigo-100/80 text-sm mb-8 max-w-[200px] mx-auto leading-relaxed", children: t("help.contactDesc", "Our team is available to assist you with any issues.") }), 999 /* @__PURE__ */ jsxRuntimeExports.jsxs( 1000 "button", 1001 { 1002 onClick: handleContactClick, 1003 className: "w-full py-4 bg-white text-indigo-600 hover:bg-zinc-50 rounded-2xl font-black shadow-xl transition-all transform hover:scale-[1.02] active:scale-[0.98] flex items-center justify-center gap-2", 1004 children: [
1005 /* @__PURE__ */ jsxRuntimeExports.jsx(Mail, { size: 20 }), 1006 " ", 1007 t("help.contactSupport", "Contact Support") 1008 ] 1009 } 1010 ) 1011 ] }) 1012 ] }) 1013 ] }) 1014 ] }), 1015 currentUser && /* @__PURE__ */ jsxRuntimeExports.jsx( 1016 CreateTicketModal, 1017 { 1018 isOpen: isTicketModalOpen, 1019 onClose: () => { 1020 setIsTicketModalOpen(false); 1021 api.getMyTickets().then(setMyTickets); 1022 }, 1023 currentUser 1024 } 1025 ), 1026 currentUser && selectedTicketId && /* @__PURE__ */ jsxRuntimeExports.jsx( 1027 TicketDetailModal, 1028 { 1029 isOpen: isTicketDetailOpen, 1030 onClose: () => { 1031 setIsTicketDetailOpen(false); 1032 setSelectedTicketId(null); 1033 api.getMyTickets().then(setMyTickets); 1034 }, 1035 ticketId: selectedTicketId, 1036 currentUser 1037 } 1038 ) 1039 ] }); 1040}; 1041export { 1042 HelpPage as default 1043};
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.