@oktis-works/admin 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/bin/admin.js +19 -0
  2. package/dist/client/_astro/ContentEditor.A5N-aCxT.js +1 -0
  3. package/dist/client/_astro/PostTypesManager.w66_1tDh.js +1 -0
  4. package/dist/client/_astro/TaxonomiesManager.Dv_OOCEw.js +1 -0
  5. package/dist/client/_astro/api.GqKwASBH.js +1 -0
  6. package/dist/client/_astro/client.CCQ0X2AX.js +1 -0
  7. package/dist/client/_astro/edit.B4LyOiwH.css +1 -0
  8. package/dist/client/_astro/hoisted.SqllSTyr.js +1 -0
  9. package/dist/client/_astro/web.D5F0ytYW.js +1 -0
  10. package/dist/server/_empty-middleware.mjs +3 -0
  11. package/dist/server/chunks/astro/assets-service_BADPYD54.mjs +438 -0
  12. package/dist/server/chunks/astro_C5DJOQ1V.mjs +2038 -0
  13. package/dist/server/chunks/edit_CLlDPSWF.mjs +6 -0
  14. package/dist/server/chunks/index_By1s_hvq.mjs +6 -0
  15. package/dist/server/chunks/index_CAPo3ste.mjs +6 -0
  16. package/dist/server/chunks/login_GjNKFqRH.mjs +6 -0
  17. package/dist/server/chunks/node_CZILS-L9.mjs +6 -0
  18. package/dist/server/chunks/pages/edit_DSkfb6lH.mjs +2173 -0
  19. package/dist/server/chunks/pages/index_7XvpCth_.mjs +61 -0
  20. package/dist/server/chunks/pages/login_BKgn8hvS.mjs +12 -0
  21. package/dist/server/chunks/pages/node_CxUkTckt.mjs +268 -0
  22. package/dist/server/chunks/pages/post-types_BeBr92jW.mjs +246 -0
  23. package/dist/server/chunks/pages/taxonomies_B0jngTat.mjs +69 -0
  24. package/dist/server/chunks/post-types_CVELl9a2.mjs +6 -0
  25. package/dist/server/chunks/taxonomies_D8nuzf2R.mjs +6 -0
  26. package/dist/server/entry.mjs +9777 -0
  27. package/dist/server/manifest_BgSBppnI.mjs +455 -0
  28. package/dist/server/renderers.mjs +101 -0
  29. package/package.json +43 -0
@@ -0,0 +1,61 @@
1
+ import { e as createComponent, g as addAttribute, i as renderHead, j as renderSlot, r as renderTemplate, h as createAstro, k as renderComponent, m as maybeRenderHead } from '../astro_C5DJOQ1V.mjs';
2
+ /* empty css */
3
+ /* empty css */
4
+ /* empty css */
5
+ /* empty css */
6
+
7
+ const $$Astro$1 = createAstro();
8
+ const $$BaseLayout = createComponent(($$result, $$props, $$slots) => {
9
+ const Astro2 = $$result.createAstro($$Astro$1, $$props, $$slots);
10
+ Astro2.self = $$BaseLayout;
11
+ const { title, description } = Astro2.props;
12
+ return renderTemplate`<html lang="en"> <head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="description"${addAttribute(description ?? "BlackLotus CMS Admin Dashboard", "content")}><title>${title} | BlackLotus CMS</title><link rel="icon" type="image/svg+xml" href="/favicon.svg">${renderHead()}</head> <body> ${renderSlot($$result, $$slots["default"])} </body></html>`;
13
+ }, "/home/judah/projetos/blacklotuscms-v2/apps/admin/src/layouts/BaseLayout.astro", void 0);
14
+
15
+ const $$Astro = createAstro();
16
+ const $$DashboardLayout = createComponent(($$result, $$props, $$slots) => {
17
+ const Astro2 = $$result.createAstro($$Astro, $$props, $$slots);
18
+ Astro2.self = $$DashboardLayout;
19
+ const { title, description } = Astro2.props;
20
+ return renderTemplate`${renderComponent($$result, "BaseLayout", $$BaseLayout, { "title": title, "description": description, "data-astro-cid-kqx5um5x": true }, { "default": ($$result2) => renderTemplate` ${maybeRenderHead()}<div class="layout" data-astro-cid-kqx5um5x> <aside class="sidebar" data-astro-cid-kqx5um5x> <div class="sidebar-header" data-astro-cid-kqx5um5x> <h2 class="text-lg font-bold" data-astro-cid-kqx5um5x>BlackLotus</h2> <span class="badge badge-secondary" data-astro-cid-kqx5um5x>Admin</span> </div> <nav class="sidebar-nav" data-astro-cid-kqx5um5x> <a href="/dashboard" class="nav-item active" data-astro-cid-kqx5um5x> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-kqx5um5x><rect x="3" y="3" width="7" height="7" data-astro-cid-kqx5um5x></rect><rect x="14" y="3" width="7" height="7" data-astro-cid-kqx5um5x></rect><rect x="14" y="14" width="7" height="7" data-astro-cid-kqx5um5x></rect><rect x="3" y="14" width="7" height="7" data-astro-cid-kqx5um5x></rect></svg>
21
+ Dashboard
22
+ </a> <a href="/content" class="nav-item" data-astro-cid-kqx5um5x> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-kqx5um5x><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" data-astro-cid-kqx5um5x></path><polyline points="14 2 14 8 20 8" data-astro-cid-kqx5um5x></polyline><line x1="16" y1="13" x2="8" y2="13" data-astro-cid-kqx5um5x></line><line x1="16" y1="17" x2="8" y2="17" data-astro-cid-kqx5um5x></line><polyline points="10 9 9 9 8 9" data-astro-cid-kqx5um5x></polyline></svg>
23
+ Content
24
+ </a> <a href="/media" class="nav-item" data-astro-cid-kqx5um5x> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-kqx5um5x><rect x="3" y="3" width="18" height="18" rx="2" ry="2" data-astro-cid-kqx5um5x></rect><circle cx="8.5" cy="8.5" r="1.5" data-astro-cid-kqx5um5x></circle><polyline points="21 15 16 10 5 21" data-astro-cid-kqx5um5x></polyline></svg>
25
+ Media
26
+ </a> <a href="/users" class="nav-item" data-astro-cid-kqx5um5x> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-kqx5um5x><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" data-astro-cid-kqx5um5x></path><circle cx="9" cy="7" r="4" data-astro-cid-kqx5um5x></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87" data-astro-cid-kqx5um5x></path><path d="M16 3.13a4 4 0 0 1 0 7.75" data-astro-cid-kqx5um5x></path></svg>
27
+ Users
28
+ </a> <a href="/settings" class="nav-item" data-astro-cid-kqx5um5x> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-kqx5um5x><circle cx="12" cy="12" r="3" data-astro-cid-kqx5um5x></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" data-astro-cid-kqx5um5x></path></svg>
29
+ Settings
30
+ </a> </nav> </aside> <main class="main-content" data-astro-cid-kqx5um5x> <header class="main-header" data-astro-cid-kqx5um5x> <h1 class="text-lg font-bold" data-astro-cid-kqx5um5x>${title}</h1> <div class="header-actions" data-astro-cid-kqx5um5x> <button class="btn btn-secondary btn-sm" id="logout-btn" data-astro-cid-kqx5um5x>Logout</button> </div> </header> <div class="content" data-astro-cid-kqx5um5x> ${renderSlot($$result2, $$slots["default"])} </div> </main> </div> ` })} `;
31
+ }, "/home/judah/projetos/blacklotuscms-v2/apps/admin/src/layouts/DashboardLayout.astro", void 0);
32
+
33
+ const $$Index$1 = createComponent(($$result, $$props, $$slots) => {
34
+ return renderTemplate`${renderComponent($$result, "DashboardLayout", $$DashboardLayout, { "title": "Dashboard", "data-astro-cid-j7pv25f6": true }, { "default": ($$result2) => renderTemplate` ${maybeRenderHead()}<div class="dashboard" data-astro-cid-j7pv25f6> <div class="stats-grid" data-astro-cid-j7pv25f6> <div class="card stat-card" data-astro-cid-j7pv25f6> <h3 class="stat-label" data-astro-cid-j7pv25f6>Total Content</h3> <p class="stat-value" id="total-content" data-astro-cid-j7pv25f6>--</p> </div> <div class="card stat-card" data-astro-cid-j7pv25f6> <h3 class="stat-label" data-astro-cid-j7pv25f6>Published</h3> <p class="stat-value" id="published-content" data-astro-cid-j7pv25f6>--</p> </div> <div class="card stat-card" data-astro-cid-j7pv25f6> <h3 class="stat-label" data-astro-cid-j7pv25f6>Drafts</h3> <p class="stat-value" id="draft-content" data-astro-cid-j7pv25f6>--</p> </div> <div class="card stat-card" data-astro-cid-j7pv25f6> <h3 class="stat-label" data-astro-cid-j7pv25f6>Media Files</h3> <p class="stat-value" id="total-media" data-astro-cid-j7pv25f6>--</p> </div> </div> <div class="recent-content" data-astro-cid-j7pv25f6> <div class="card" data-astro-cid-j7pv25f6> <div class="card-header" data-astro-cid-j7pv25f6> <h3 data-astro-cid-j7pv25f6>Recent Content</h3> <a href="/content" class="btn btn-secondary btn-sm" data-astro-cid-j7pv25f6>View All</a> </div> <table class="table" data-astro-cid-j7pv25f6> <thead data-astro-cid-j7pv25f6> <tr data-astro-cid-j7pv25f6> <th data-astro-cid-j7pv25f6>Title</th> <th data-astro-cid-j7pv25f6>Type</th> <th data-astro-cid-j7pv25f6>Status</th> <th data-astro-cid-j7pv25f6>Updated</th> </tr> </thead> <tbody id="recent-content-list" data-astro-cid-j7pv25f6> <tr data-astro-cid-j7pv25f6> <td colspan="4" class="text-center" data-astro-cid-j7pv25f6>Loading...</td> </tr> </tbody> </table> </div> </div> <div class="quick-actions" data-astro-cid-j7pv25f6> <div class="card" data-astro-cid-j7pv25f6> <h3 class="card-header" data-astro-cid-j7pv25f6>Quick Actions</h3> <div class="actions-grid" data-astro-cid-j7pv25f6> <a href="/content/new" class="action-card" data-astro-cid-j7pv25f6> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-j7pv25f6><line x1="12" y1="5" x2="12" y2="19" data-astro-cid-j7pv25f6></line><line x1="5" y1="12" x2="19" y2="12" data-astro-cid-j7pv25f6></line></svg> <span data-astro-cid-j7pv25f6>New Post</span> </a> <a href="/media/upload" class="action-card" data-astro-cid-j7pv25f6> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-j7pv25f6><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" data-astro-cid-j7pv25f6></path><polyline points="17 8 12 3 7 8" data-astro-cid-j7pv25f6></polyline><line x1="12" y1="3" x2="12" y2="15" data-astro-cid-j7pv25f6></line></svg> <span data-astro-cid-j7pv25f6>Upload Media</span> </a> <a href="/users/new" class="action-card" data-astro-cid-j7pv25f6> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-j7pv25f6><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" data-astro-cid-j7pv25f6></path><circle cx="8.5" cy="7" r="4" data-astro-cid-j7pv25f6></circle><line x1="20" y1="8" x2="20" y2="14" data-astro-cid-j7pv25f6></line><line x1="23" y1="11" x2="17" y2="11" data-astro-cid-j7pv25f6></line></svg> <span data-astro-cid-j7pv25f6>Add User</span> </a> <a href="/settings" class="action-card" data-astro-cid-j7pv25f6> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-astro-cid-j7pv25f6><circle cx="12" cy="12" r="3" data-astro-cid-j7pv25f6></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" data-astro-cid-j7pv25f6></path></svg> <span data-astro-cid-j7pv25f6>Settings</span> </a> </div> </div> </div> </div> ` })} `;
35
+ }, "/home/judah/projetos/blacklotuscms-v2/apps/admin/src/pages/index.astro", void 0);
36
+
37
+ const $$file$1 = "/home/judah/projetos/blacklotuscms-v2/apps/admin/src/pages/index.astro";
38
+ const $$url$1 = "";
39
+
40
+ const index$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
41
+ __proto__: null,
42
+ default: $$Index$1,
43
+ file: $$file$1,
44
+ url: $$url$1
45
+ }, Symbol.toStringTag, { value: 'Module' }));
46
+
47
+ const $$Index = createComponent(($$result, $$props, $$slots) => {
48
+ return renderTemplate`${renderComponent($$result, "DashboardLayout", $$DashboardLayout, { "title": "Content", "data-astro-cid-sm7sxu6c": true }, { "default": ($$result2) => renderTemplate` ${maybeRenderHead()}<div class="content-page" data-astro-cid-sm7sxu6c> <div class="page-header" data-astro-cid-sm7sxu6c> <div class="header-left" data-astro-cid-sm7sxu6c> <input type="search" class="input" placeholder="Search content..." id="search-input" data-astro-cid-sm7sxu6c> <select class="input" id="type-filter" data-astro-cid-sm7sxu6c> <option value="" data-astro-cid-sm7sxu6c>All Types</option> <option value="post" data-astro-cid-sm7sxu6c>Posts</option> <option value="page" data-astro-cid-sm7sxu6c>Pages</option> </select> <select class="input" id="status-filter" data-astro-cid-sm7sxu6c> <option value="" data-astro-cid-sm7sxu6c>All Status</option> <option value="DRAFT" data-astro-cid-sm7sxu6c>Draft</option> <option value="PUBLISHED" data-astro-cid-sm7sxu6c>Published</option> <option value="ARCHIVED" data-astro-cid-sm7sxu6c>Archived</option> </select> </div> <a href="/content/new" class="btn btn-primary" data-astro-cid-sm7sxu6c>New Content</a> </div> <div class="card" data-astro-cid-sm7sxu6c> <table class="table" data-astro-cid-sm7sxu6c> <thead data-astro-cid-sm7sxu6c> <tr data-astro-cid-sm7sxu6c> <th data-astro-cid-sm7sxu6c>Title</th> <th data-astro-cid-sm7sxu6c>Type</th> <th data-astro-cid-sm7sxu6c>Status</th> <th data-astro-cid-sm7sxu6c>Author</th> <th data-astro-cid-sm7sxu6c>Updated</th> <th data-astro-cid-sm7sxu6c>Actions</th> </tr> </thead> <tbody id="content-list" data-astro-cid-sm7sxu6c> <tr data-astro-cid-sm7sxu6c> <td colspan="6" class="text-center" data-astro-cid-sm7sxu6c>Loading...</td> </tr> </tbody> </table> <div class="pagination" id="pagination" data-astro-cid-sm7sxu6c></div> </div> </div> ` })} `;
49
+ }, "/home/judah/projetos/blacklotuscms-v2/apps/admin/src/pages/content/index.astro", void 0);
50
+
51
+ const $$file = "/home/judah/projetos/blacklotuscms-v2/apps/admin/src/pages/content/index.astro";
52
+ const $$url = "/content";
53
+
54
+ const index = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
55
+ __proto__: null,
56
+ default: $$Index,
57
+ file: $$file,
58
+ url: $$url
59
+ }, Symbol.toStringTag, { value: 'Module' }));
60
+
61
+ export { $$DashboardLayout as $, $$BaseLayout as a, index as b, index$1 as i };
@@ -0,0 +1,12 @@
1
+ import { e as createComponent, k as renderComponent, r as renderTemplate, m as maybeRenderHead } from '../astro_C5DJOQ1V.mjs';
2
+ import { a as $$BaseLayout } from './index_7XvpCth_.mjs';
3
+ /* empty css */
4
+
5
+ const $$Login = createComponent(async ($$result, $$props, $$slots) => {
6
+ return renderTemplate`${renderComponent($$result, "BaseLayout", $$BaseLayout, { "title": "Login", "data-astro-cid-sgpqyurt": true }, { "default": async ($$result2) => renderTemplate` ${maybeRenderHead()}<div class="login-page" data-astro-cid-sgpqyurt> <div class="login-card" data-astro-cid-sgpqyurt> <div class="login-header" data-astro-cid-sgpqyurt> <h1 data-astro-cid-sgpqyurt>BlackLotus CMS</h1> <p data-astro-cid-sgpqyurt>Sign in to your account</p> </div> <form id="login-form" class="login-form" data-astro-cid-sgpqyurt> <div class="form-group" data-astro-cid-sgpqyurt> <label for="email" data-astro-cid-sgpqyurt>Email</label> <input type="email" id="email" name="email" class="input" required placeholder="admin@example.com" data-astro-cid-sgpqyurt> </div> <div class="form-group" data-astro-cid-sgpqyurt> <label for="password" data-astro-cid-sgpqyurt>Password</label> <input type="password" id="password" name="password" class="input" required placeholder="••••••••" data-astro-cid-sgpqyurt> </div> <div class="form-group" data-astro-cid-sgpqyurt> <label for="tenant" data-astro-cid-sgpqyurt>Tenant ID</label> <input type="text" id="tenant" name="tenant" class="input" required placeholder="default" data-astro-cid-sgpqyurt> </div> <div id="error-message" class="error-message" style="display: none;" data-astro-cid-sgpqyurt></div> <button type="submit" class="btn btn-primary btn-block" data-astro-cid-sgpqyurt> <span id="submit-text" data-astro-cid-sgpqyurt>Sign In</span> <span id="submit-spinner" class="spinner" style="display: none;" data-astro-cid-sgpqyurt></span> </button> </form> </div> </div> ` })} `;
7
+ }, "/home/judah/projetos/blacklotuscms-v2/apps/admin/src/pages/login.astro", void 0);
8
+
9
+ const $$file = "/home/judah/projetos/blacklotuscms-v2/apps/admin/src/pages/login.astro";
10
+ const $$url = "/login";
11
+
12
+ export { $$Login as default, $$file as file, $$url as url };
@@ -0,0 +1,268 @@
1
+ import { i as isESMImportedImage, g as getImage$1, a as getConfiguredImageService, b as isRemotePath, c as isRemoteAllowed } from '../astro/assets-service_BADPYD54.mjs';
2
+ import { readFile } from 'fs/promises';
3
+ import { e as createComponent, A as AstroError, f as ImageMissingAlt, m as maybeRenderHead, g as addAttribute, s as spreadAttributes, r as renderTemplate, h as createAstro } from '../astro_C5DJOQ1V.mjs';
4
+
5
+ function getDefaultExportFromCjs (x) {
6
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
7
+ }
8
+
9
+ /**
10
+ * @param typeMap [Object] Map of MIME type -> Array[extensions]
11
+ * @param ...
12
+ */
13
+ function Mime$1() {
14
+ this._types = Object.create(null);
15
+ this._extensions = Object.create(null);
16
+
17
+ for (let i = 0; i < arguments.length; i++) {
18
+ this.define(arguments[i]);
19
+ }
20
+
21
+ this.define = this.define.bind(this);
22
+ this.getType = this.getType.bind(this);
23
+ this.getExtension = this.getExtension.bind(this);
24
+ }
25
+
26
+ /**
27
+ * Define mimetype -> extension mappings. Each key is a mime-type that maps
28
+ * to an array of extensions associated with the type. The first extension is
29
+ * used as the default extension for the type.
30
+ *
31
+ * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']});
32
+ *
33
+ * If a type declares an extension that has already been defined, an error will
34
+ * be thrown. To suppress this error and force the extension to be associated
35
+ * with the new type, pass `force`=true. Alternatively, you may prefix the
36
+ * extension with "*" to map the type to extension, without mapping the
37
+ * extension to the type.
38
+ *
39
+ * e.g. mime.define({'audio/wav', ['wav']}, {'audio/x-wav', ['*wav']});
40
+ *
41
+ *
42
+ * @param map (Object) type definitions
43
+ * @param force (Boolean) if true, force overriding of existing definitions
44
+ */
45
+ Mime$1.prototype.define = function(typeMap, force) {
46
+ for (let type in typeMap) {
47
+ let extensions = typeMap[type].map(function(t) {
48
+ return t.toLowerCase();
49
+ });
50
+ type = type.toLowerCase();
51
+
52
+ for (let i = 0; i < extensions.length; i++) {
53
+ const ext = extensions[i];
54
+
55
+ // '*' prefix = not the preferred type for this extension. So fixup the
56
+ // extension, and skip it.
57
+ if (ext[0] === '*') {
58
+ continue;
59
+ }
60
+
61
+ if (!force && (ext in this._types)) {
62
+ throw new Error(
63
+ 'Attempt to change mapping for "' + ext +
64
+ '" extension from "' + this._types[ext] + '" to "' + type +
65
+ '". Pass `force=true` to allow this, otherwise remove "' + ext +
66
+ '" from the list of extensions for "' + type + '".'
67
+ );
68
+ }
69
+
70
+ this._types[ext] = type;
71
+ }
72
+
73
+ // Use first extension as default
74
+ if (force || !this._extensions[type]) {
75
+ const ext = extensions[0];
76
+ this._extensions[type] = (ext[0] !== '*') ? ext : ext.substr(1);
77
+ }
78
+ }
79
+ };
80
+
81
+ /**
82
+ * Lookup a mime type based on extension
83
+ */
84
+ Mime$1.prototype.getType = function(path) {
85
+ path = String(path);
86
+ let last = path.replace(/^.*[/\\]/, '').toLowerCase();
87
+ let ext = last.replace(/^.*\./, '').toLowerCase();
88
+
89
+ let hasPath = last.length < path.length;
90
+ let hasDot = ext.length < last.length - 1;
91
+
92
+ return (hasDot || !hasPath) && this._types[ext] || null;
93
+ };
94
+
95
+ /**
96
+ * Return file extension associated with a mime type
97
+ */
98
+ Mime$1.prototype.getExtension = function(type) {
99
+ type = /^\s*([^;\s]*)/.test(type) && RegExp.$1;
100
+ return type && this._extensions[type.toLowerCase()] || null;
101
+ };
102
+
103
+ var Mime_1 = Mime$1;
104
+
105
+ var standard = {"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};
106
+
107
+ let Mime = Mime_1;
108
+ var lite = new Mime(standard);
109
+
110
+ const mime = /*@__PURE__*/getDefaultExportFromCjs(lite);
111
+
112
+ const fnv1a52 = (str) => {
113
+ const len = str.length;
114
+ let i = 0, t0 = 0, v0 = 8997, t1 = 0, v1 = 33826, t2 = 0, v2 = 40164, t3 = 0, v3 = 52210;
115
+ while (i < len) {
116
+ v0 ^= str.charCodeAt(i++);
117
+ t0 = v0 * 435;
118
+ t1 = v1 * 435;
119
+ t2 = v2 * 435;
120
+ t3 = v3 * 435;
121
+ t2 += v0 << 8;
122
+ t3 += v1 << 8;
123
+ t1 += t0 >>> 16;
124
+ v0 = t0 & 65535;
125
+ t2 += t1 >>> 16;
126
+ v1 = t1 & 65535;
127
+ v3 = t3 + (t2 >>> 16) & 65535;
128
+ v2 = t2 & 65535;
129
+ }
130
+ return (v3 & 15) * 281474976710656 + v2 * 4294967296 + v1 * 65536 + (v0 ^ v3 >> 4);
131
+ };
132
+ const etag = (payload, weak = false) => {
133
+ const prefix = weak ? 'W/"' : '"';
134
+ return prefix + fnv1a52(payload).toString(36) + payload.length.toString(36) + '"';
135
+ };
136
+
137
+ const $$Astro$1 = createAstro();
138
+ const $$Image = createComponent(async ($$result, $$props, $$slots) => {
139
+ const Astro2 = $$result.createAstro($$Astro$1, $$props, $$slots);
140
+ Astro2.self = $$Image;
141
+ const props = Astro2.props;
142
+ if (props.alt === void 0 || props.alt === null) {
143
+ throw new AstroError(ImageMissingAlt);
144
+ }
145
+ if (typeof props.width === "string") {
146
+ props.width = parseInt(props.width);
147
+ }
148
+ if (typeof props.height === "string") {
149
+ props.height = parseInt(props.height);
150
+ }
151
+ const image = await getImage(props);
152
+ const additionalAttributes = {};
153
+ if (image.srcSet.values.length > 0) {
154
+ additionalAttributes.srcset = image.srcSet.attribute;
155
+ }
156
+ return renderTemplate`${maybeRenderHead()}<img${addAttribute(image.src, "src")}${spreadAttributes(additionalAttributes)}${spreadAttributes(image.attributes)}>`;
157
+ }, "/home/judah/projetos/blacklotuscms-v2/node_modules/.bun/astro@4.0.0+f33040ce8019fdfa/node_modules/astro/components/Image.astro", void 0);
158
+
159
+ const $$Astro = createAstro();
160
+ const $$Picture = createComponent(async ($$result, $$props, $$slots) => {
161
+ const Astro2 = $$result.createAstro($$Astro, $$props, $$slots);
162
+ Astro2.self = $$Picture;
163
+ const defaultFormats = ["webp"];
164
+ const defaultFallbackFormat = "png";
165
+ const specialFormatsFallback = ["gif", "svg", "jpg", "jpeg"];
166
+ const { formats = defaultFormats, pictureAttributes = {}, fallbackFormat, ...props } = Astro2.props;
167
+ if (props.alt === void 0 || props.alt === null) {
168
+ throw new AstroError(ImageMissingAlt);
169
+ }
170
+ const optimizedImages = await Promise.all(
171
+ formats.map(
172
+ async (format) => await getImage({ ...props, format, widths: props.widths, densities: props.densities })
173
+ )
174
+ );
175
+ let resultFallbackFormat = fallbackFormat ?? defaultFallbackFormat;
176
+ if (!fallbackFormat && isESMImportedImage(props.src) && specialFormatsFallback.includes(props.src.format)) {
177
+ resultFallbackFormat = props.src.format;
178
+ }
179
+ const fallbackImage = await getImage({
180
+ ...props,
181
+ format: resultFallbackFormat,
182
+ widths: props.widths,
183
+ densities: props.densities
184
+ });
185
+ const imgAdditionalAttributes = {};
186
+ const sourceAdditionaAttributes = {};
187
+ if (props.sizes) {
188
+ sourceAdditionaAttributes.sizes = props.sizes;
189
+ }
190
+ if (fallbackImage.srcSet.values.length > 0) {
191
+ imgAdditionalAttributes.srcset = fallbackImage.srcSet.attribute;
192
+ }
193
+ return renderTemplate`${maybeRenderHead()}<picture${spreadAttributes(pictureAttributes)}> ${Object.entries(optimizedImages).map(([_, image]) => {
194
+ const srcsetAttribute = props.densities || !props.densities && !props.widths ? `${image.src}${image.srcSet.values.length > 0 ? ", " + image.srcSet.attribute : ""}` : image.srcSet.attribute;
195
+ return renderTemplate`<source${addAttribute(srcsetAttribute, "srcset")}${addAttribute("image/" + image.options.format, "type")}${spreadAttributes(sourceAdditionaAttributes)}>`;
196
+ })} <img${addAttribute(fallbackImage.src, "src")}${spreadAttributes(imgAdditionalAttributes)}${spreadAttributes(fallbackImage.attributes)}> </picture>`;
197
+ }, "/home/judah/projetos/blacklotuscms-v2/node_modules/.bun/astro@4.0.0+f33040ce8019fdfa/node_modules/astro/components/Picture.astro", void 0);
198
+
199
+ const imageConfig = {"service":{"entrypoint":"astro/assets/services/sharp","config":{}},"domains":[],"remotePatterns":[],"endpoint":"astro/assets/endpoint/node"};
200
+ const assetsDir = new URL("file:///home/judah/projetos/blacklotuscms-v2/apps/admin/dist/client/");
201
+ const getImage = async (options) => await getImage$1(options, imageConfig);
202
+
203
+ async function loadLocalImage(src, url) {
204
+ const filePath = new URL("." + src, assetsDir);
205
+ let buffer = void 0;
206
+ try {
207
+ buffer = await readFile(filePath);
208
+ } catch (e) {
209
+ const sourceUrl = new URL(src, url.origin);
210
+ buffer = await loadRemoteImage(sourceUrl);
211
+ }
212
+ return buffer;
213
+ }
214
+ async function loadRemoteImage(src) {
215
+ try {
216
+ const res = await fetch(src);
217
+ if (!res.ok) {
218
+ return void 0;
219
+ }
220
+ return Buffer.from(await res.arrayBuffer());
221
+ } catch (err) {
222
+ return void 0;
223
+ }
224
+ }
225
+ const GET = async ({ request }) => {
226
+ try {
227
+ const imageService = await getConfiguredImageService();
228
+ if (!("transform" in imageService)) {
229
+ throw new Error("Configured image service is not a local service");
230
+ }
231
+ const url = new URL(request.url);
232
+ const transform = await imageService.parseURL(url, imageConfig);
233
+ if (!transform?.src) {
234
+ throw new Error("Incorrect transform returned by `parseURL`");
235
+ }
236
+ let inputBuffer = void 0;
237
+ if (isRemotePath(transform.src)) {
238
+ if (isRemoteAllowed(transform.src, imageConfig) === false) {
239
+ return new Response("Forbidden", { status: 403 });
240
+ }
241
+ inputBuffer = await loadRemoteImage(new URL(transform.src));
242
+ } else {
243
+ inputBuffer = await loadLocalImage(transform.src, url);
244
+ }
245
+ if (!inputBuffer) {
246
+ return new Response("Not Found", { status: 404 });
247
+ }
248
+ const { data, format } = await imageService.transform(inputBuffer, transform, imageConfig);
249
+ return new Response(data, {
250
+ status: 200,
251
+ headers: {
252
+ "Content-Type": mime.getType(format) ?? `image/${format}`,
253
+ "Cache-Control": "public, max-age=31536000",
254
+ ETag: etag(data.toString()),
255
+ Date: (/* @__PURE__ */ new Date()).toUTCString()
256
+ }
257
+ });
258
+ } catch (err) {
259
+ return new Response(`Server Error: ${err}`, { status: 500 });
260
+ }
261
+ };
262
+
263
+ const node = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
264
+ __proto__: null,
265
+ GET
266
+ }, Symbol.toStringTag, { value: 'Module' }));
267
+
268
+ export { getDefaultExportFromCjs as g, node as n };