@sonicjs-cms/core 3.0.0-beta.16 → 3.0.0-beta.17

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 (49) hide show
  1. package/dist/{chunk-KOXFYFOF.cjs → chunk-3RNDJAZ5.cjs} +4 -4
  2. package/dist/{chunk-KOXFYFOF.cjs.map → chunk-3RNDJAZ5.cjs.map} +1 -1
  3. package/dist/{chunk-HYO2MSFI.js → chunk-73KSHGOT.js} +2 -2
  4. package/dist/{chunk-HYO2MSFI.js.map → chunk-73KSHGOT.js.map} +1 -1
  5. package/dist/{chunk-IA24HACT.cjs → chunk-7YMMCIWY.cjs} +2 -2
  6. package/dist/{chunk-IA24HACT.cjs.map → chunk-7YMMCIWY.cjs.map} +1 -1
  7. package/dist/{chunk-KZIBF2EV.cjs → chunk-C3KSTUEA.cjs} +2 -2
  8. package/dist/{chunk-KZIBF2EV.cjs.map → chunk-C3KSTUEA.cjs.map} +1 -1
  9. package/dist/{chunk-UOFRE5PY.js → chunk-CYDEM6SY.js} +13 -13
  10. package/dist/chunk-CYDEM6SY.js.map +1 -0
  11. package/dist/{chunk-3XFA3E2F.cjs → chunk-KDRHGEUF.cjs} +3 -3
  12. package/dist/{chunk-3XFA3E2F.cjs.map → chunk-KDRHGEUF.cjs.map} +1 -1
  13. package/dist/{chunk-IXUNNFZZ.js → chunk-KXTGLSFY.js} +4 -4
  14. package/dist/{chunk-IXUNNFZZ.js.map → chunk-KXTGLSFY.js.map} +1 -1
  15. package/dist/{chunk-LXYDJU6U.cjs → chunk-MJZI3NHR.cjs} +10 -10
  16. package/dist/{chunk-LXYDJU6U.cjs.map → chunk-MJZI3NHR.cjs.map} +1 -1
  17. package/dist/{chunk-SC2WZFNQ.cjs → chunk-NOBU34HS.cjs} +206 -206
  18. package/dist/chunk-NOBU34HS.cjs.map +1 -0
  19. package/dist/{chunk-PA2UIFB7.js → chunk-OSMPF3PU.js} +5 -5
  20. package/dist/{chunk-PA2UIFB7.js.map → chunk-OSMPF3PU.js.map} +1 -1
  21. package/dist/{chunk-JRMBHDGM.js → chunk-RIFCRZYC.js} +3 -3
  22. package/dist/{chunk-JRMBHDGM.js.map → chunk-RIFCRZYC.js.map} +1 -1
  23. package/dist/{chunk-7P2IJM4K.js → chunk-Y34TG4TF.js} +3 -3
  24. package/dist/{chunk-7P2IJM4K.js.map → chunk-Y34TG4TF.js.map} +1 -1
  25. package/dist/{chunk-KIB7K5LV.js → chunk-YA4V4Y5U.js} +2 -2
  26. package/dist/{chunk-KIB7K5LV.js.map → chunk-YA4V4Y5U.js.map} +1 -1
  27. package/dist/{chunk-KMM45BTY.cjs → chunk-ZHQP75SR.cjs} +15 -15
  28. package/dist/{chunk-KMM45BTY.cjs.map → chunk-ZHQP75SR.cjs.map} +1 -1
  29. package/dist/index.cjs +259 -259
  30. package/dist/index.js +13 -13
  31. package/dist/middleware.cjs +33 -33
  32. package/dist/middleware.js +4 -4
  33. package/dist/migrations-7G6QBDSM.js +4 -0
  34. package/dist/{migrations-F4LBAHQN.js.map → migrations-7G6QBDSM.js.map} +1 -1
  35. package/dist/migrations-QIRBSVJJ.cjs +13 -0
  36. package/dist/{migrations-KMCULV6H.cjs.map → migrations-QIRBSVJJ.cjs.map} +1 -1
  37. package/dist/plugins.cjs +40 -40
  38. package/dist/plugins.js +3 -3
  39. package/dist/routes.cjs +26 -26
  40. package/dist/routes.js +6 -6
  41. package/dist/services.cjs +18 -18
  42. package/dist/services.js +2 -2
  43. package/dist/utils.cjs +3 -3
  44. package/dist/utils.js +1 -1
  45. package/package.json +1 -1
  46. package/dist/chunk-SC2WZFNQ.cjs.map +0 -1
  47. package/dist/chunk-UOFRE5PY.js.map +0 -1
  48. package/dist/migrations-F4LBAHQN.js +0 -4
  49. package/dist/migrations-KMCULV6H.cjs +0 -13
package/dist/index.cjs CHANGED
@@ -1,27 +1,27 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkKMCLNO4K_cjs = require('./chunk-KMCLNO4K.cjs');
4
- var chunkSC2WZFNQ_cjs = require('./chunk-SC2WZFNQ.cjs');
4
+ var chunkNOBU34HS_cjs = require('./chunk-NOBU34HS.cjs');
5
5
  require('./chunk-XWVDSM2L.cjs');
6
6
  require('./chunk-N32OWET6.cjs');
7
7
  var chunk4BTBSXMR_cjs = require('./chunk-4BTBSXMR.cjs');
8
8
  var chunkYA3TJ65D_cjs = require('./chunk-YA3TJ65D.cjs');
9
9
  var chunkYP7GW2G5_cjs = require('./chunk-YP7GW2G5.cjs');
10
- var chunkKMM45BTY_cjs = require('./chunk-KMM45BTY.cjs');
10
+ var chunkZHQP75SR_cjs = require('./chunk-ZHQP75SR.cjs');
11
11
  var chunkW36OZTJ5_cjs = require('./chunk-W36OZTJ5.cjs');
12
12
  var chunkJEQ7FLOD_cjs = require('./chunk-JEQ7FLOD.cjs');
13
- var chunkKZIBF2EV_cjs = require('./chunk-KZIBF2EV.cjs');
14
- var chunkIA24HACT_cjs = require('./chunk-IA24HACT.cjs');
13
+ var chunkC3KSTUEA_cjs = require('./chunk-C3KSTUEA.cjs');
14
+ var chunk7YMMCIWY_cjs = require('./chunk-7YMMCIWY.cjs');
15
15
  var chunkCRGUD4KC_cjs = require('./chunk-CRGUD4KC.cjs');
16
16
  var chunkPXNTCCPE_cjs = require('./chunk-PXNTCCPE.cjs');
17
17
  var chunkK623Q6WD_cjs = require('./chunk-K623Q6WD.cjs');
18
- var chunkLXYDJU6U_cjs = require('./chunk-LXYDJU6U.cjs');
19
- var chunkKOXFYFOF_cjs = require('./chunk-KOXFYFOF.cjs');
18
+ var chunkMJZI3NHR_cjs = require('./chunk-MJZI3NHR.cjs');
19
+ var chunk3RNDJAZ5_cjs = require('./chunk-3RNDJAZ5.cjs');
20
20
  var chunkJ6JTWD2A_cjs = require('./chunk-J6JTWD2A.cjs');
21
21
  var chunkIXUHXTHW_cjs = require('./chunk-IXUHXTHW.cjs');
22
22
  var chunkRCQ2HIQD_cjs = require('./chunk-RCQ2HIQD.cjs');
23
23
  require('./chunk-P3XDZL6Q.cjs');
24
- var chunk3XFA3E2F_cjs = require('./chunk-3XFA3E2F.cjs');
24
+ var chunkKDRHGEUF_cjs = require('./chunk-KDRHGEUF.cjs');
25
25
  var chunkMNWKYY5E_cjs = require('./chunk-MNWKYY5E.cjs');
26
26
  var chunkQTFKZBLC_cjs = require('./chunk-QTFKZBLC.cjs');
27
27
  require('./chunk-IGJUBJBW.cjs');
@@ -574,7 +574,7 @@ function formatCellValue(value) {
574
574
  // src/plugins/core-plugins/database-tools-plugin/admin-routes.ts
575
575
  function createDatabaseToolsAdminRoutes() {
576
576
  const router3 = new hono.Hono();
577
- router3.use("*", chunkKMM45BTY_cjs.requireAuth());
577
+ router3.use("*", chunkZHQP75SR_cjs.requireAuth());
578
578
  router3.get("/api/stats", async (c) => {
579
579
  try {
580
580
  const user = c.get("user");
@@ -977,7 +977,7 @@ var SiteConfigService = class {
977
977
 
978
978
  // src/plugins/core-plugins/email-plugin/routes/admin.ts
979
979
  var adminRoutes = new hono.Hono();
980
- adminRoutes.use("*", chunkKMM45BTY_cjs.requireAuth());
980
+ adminRoutes.use("*", chunkZHQP75SR_cjs.requireAuth());
981
981
  adminRoutes.post("/settings", async (c) => {
982
982
  if (c.get("user")?.role !== "admin") {
983
983
  return c.json({ error: "admin role required" }, 403);
@@ -1015,7 +1015,7 @@ adminRoutes.post("/test", async (c) => {
1015
1015
  const { subject, html: html4, text } = renderTestEmail({ siteName });
1016
1016
  try {
1017
1017
  const settingsLoaded = await settings.load();
1018
- const result = await chunkSC2WZFNQ_cjs.getEmailService().send({
1018
+ const result = await chunkNOBU34HS_cjs.getEmailService().send({
1019
1019
  to,
1020
1020
  subject,
1021
1021
  html: html4,
@@ -1097,7 +1097,7 @@ function makeOnRegistrationCompleted(env) {
1097
1097
  siteName,
1098
1098
  loginUrl: siteConfig.buildLoginUrl(siteUrl)
1099
1099
  });
1100
- const result = await chunkSC2WZFNQ_cjs.getEmailService().send({
1100
+ const result = await chunkNOBU34HS_cjs.getEmailService().send({
1101
1101
  to: user.email,
1102
1102
  subject,
1103
1103
  html: html4,
@@ -1171,7 +1171,7 @@ function makeOnPasswordResetRequested(env) {
1171
1171
  expiresAt: Date.now() + DEFAULT_EXPIRY_MS,
1172
1172
  siteName
1173
1173
  });
1174
- const result = await chunkSC2WZFNQ_cjs.getEmailService().send({
1174
+ const result = await chunkNOBU34HS_cjs.getEmailService().send({
1175
1175
  to: user.email,
1176
1176
  subject,
1177
1177
  html: html4,
@@ -1239,7 +1239,7 @@ function makeOnPasswordResetCompleted(env) {
1239
1239
  supportEmail,
1240
1240
  when: Date.now()
1241
1241
  });
1242
- const result = await chunkSC2WZFNQ_cjs.getEmailService().send({
1242
+ const result = await chunkNOBU34HS_cjs.getEmailService().send({
1243
1243
  to: user.email,
1244
1244
  subject,
1245
1245
  html: html4,
@@ -1971,7 +1971,7 @@ var CloudflareEmailProvider = class {
1971
1971
  }
1972
1972
  }
1973
1973
  };
1974
- var emailPluginV3 = chunkKOXFYFOF_cjs.definePlugin({
1974
+ var emailPluginV3 = chunk3RNDJAZ5_cjs.definePlugin({
1975
1975
  id: "email",
1976
1976
  version: "1.0.0",
1977
1977
  name: "Email",
@@ -1985,7 +1985,7 @@ var emailPluginV3 = chunkKOXFYFOF_cjs.definePlugin({
1985
1985
  const db = env.DB;
1986
1986
  if (db) {
1987
1987
  try {
1988
- const typeRegistry = new chunkKMM45BTY_cjs.DocumentTypeRegistry(db);
1988
+ const typeRegistry = new chunkZHQP75SR_cjs.DocumentTypeRegistry(db);
1989
1989
  await typeRegistry.register({
1990
1990
  id: "email_log",
1991
1991
  name: "email_log",
@@ -2000,7 +2000,7 @@ var emailPluginV3 = chunkKOXFYFOF_cjs.definePlugin({
2000
2000
  } catch {
2001
2001
  }
2002
2002
  }
2003
- if (!chunkSC2WZFNQ_cjs.hasEmailService()) {
2003
+ if (!chunkNOBU34HS_cjs.hasEmailService()) {
2004
2004
  const settings = db ? await new EmailSettingsService(db).load() : {};
2005
2005
  const envResendKey = typeof env.RESEND_API_KEY === "string" && env.RESEND_API_KEY ? env.RESEND_API_KEY : void 0;
2006
2006
  const cfEmailBinding = env.EMAIL;
@@ -2018,7 +2018,7 @@ var emailPluginV3 = chunkKOXFYFOF_cjs.definePlugin({
2018
2018
  } else {
2019
2019
  provider = resolveEmailProvider({ env });
2020
2020
  }
2021
- chunkSC2WZFNQ_cjs.setEmailService(new EmailService({ ...serviceOpts, provider }));
2021
+ chunkNOBU34HS_cjs.setEmailService(new EmailService({ ...serviceOpts, provider }));
2022
2022
  }
2023
2023
  ctx.hooks.on("auth:registration:completed", makeOnRegistrationCompleted(env));
2024
2024
  ctx.hooks.on("auth:password-reset:requested", makeOnPasswordResetRequested(env));
@@ -2029,7 +2029,7 @@ var emailPluginV3 = chunkKOXFYFOF_cjs.definePlugin({
2029
2029
  var BATCH_SIZE = 100;
2030
2030
  ({
2031
2031
  schema: zod.z.record(zod.z.string(), zod.z.unknown())});
2032
- var emailReconciliationPlugin = chunkKOXFYFOF_cjs.definePlugin({
2032
+ var emailReconciliationPlugin = chunk3RNDJAZ5_cjs.definePlugin({
2033
2033
  id: "email-reconciliation",
2034
2034
  version: "1.0.0",
2035
2035
  description: "Hourly cron that backfills email delivery state from provider status APIs. Only active for providers that implement EmailProvider.reconcile().",
@@ -2050,11 +2050,11 @@ var emailReconciliationPlugin = chunkKOXFYFOF_cjs.definePlugin({
2050
2050
  console.warn("[email-reconciliation] No DB binding in cron env \u2014 skipping.");
2051
2051
  return;
2052
2052
  }
2053
- if (!chunkSC2WZFNQ_cjs.hasEmailService()) {
2053
+ if (!chunkNOBU34HS_cjs.hasEmailService()) {
2054
2054
  console.warn("[email-reconciliation] EmailService not initialized \u2014 skipping.");
2055
2055
  return;
2056
2056
  }
2057
- const emailService = chunkSC2WZFNQ_cjs.getEmailService();
2057
+ const emailService = chunkNOBU34HS_cjs.getEmailService();
2058
2058
  let rows = [];
2059
2059
  try {
2060
2060
  const result = await db.prepare(
@@ -2540,8 +2540,8 @@ function buildOtpApi() {
2540
2540
  loginUrl: settings.loginUrl || "",
2541
2541
  loginButtonText: settings.loginButtonText || ""
2542
2542
  });
2543
- if (chunkSC2WZFNQ_cjs.hasEmailService()) {
2544
- const sent = await chunkSC2WZFNQ_cjs.getEmailService().send({
2543
+ if (chunkNOBU34HS_cjs.hasEmailService()) {
2544
+ const sent = await chunkNOBU34HS_cjs.getEmailService().send({
2545
2545
  to: normalizedEmail,
2546
2546
  subject: `Your login code for ${siteName}`,
2547
2547
  flow: "otp",
@@ -2643,21 +2643,21 @@ function buildOtpApi() {
2643
2643
  error: "Account is deactivated"
2644
2644
  }, 403);
2645
2645
  }
2646
- const tokenTtl = await chunkKMM45BTY_cjs.getJwtExpirySecondsFromDb(db, c.env);
2647
- const token = await chunkKMM45BTY_cjs.AuthManager.generateToken(user.id, user.email, user.role, c.env.JWT_SECRET, tokenTtl);
2646
+ const tokenTtl = await chunkZHQP75SR_cjs.getJwtExpirySecondsFromDb(db, c.env);
2647
+ const token = await chunkZHQP75SR_cjs.AuthManager.generateToken(user.id, user.email, user.role, c.env.JWT_SECRET, tokenTtl);
2648
2648
  cookie.setCookie(c, "auth_token", token, {
2649
2649
  httpOnly: true,
2650
2650
  secure: true,
2651
2651
  sameSite: "Strict",
2652
2652
  maxAge: tokenTtl
2653
2653
  });
2654
- chunkSC2WZFNQ_cjs.dispatchHookEvent(
2654
+ chunkNOBU34HS_cjs.dispatchHookEvent(
2655
2655
  c,
2656
2656
  "auth:otp:verified",
2657
2657
  { user: { id: user.id, email: user.email, role: user.role } },
2658
2658
  "fire-and-forget"
2659
2659
  );
2660
- const customData = await chunkSC2WZFNQ_cjs.getCustomData(db, user.id);
2660
+ const customData = await chunkNOBU34HS_cjs.getCustomData(db, user.id);
2661
2661
  const { is_active: _isActive, ...publicUser } = user;
2662
2662
  return c.json({
2663
2663
  success: true,
@@ -2702,7 +2702,7 @@ function buildOtpApi() {
2702
2702
  });
2703
2703
  return otpAPI;
2704
2704
  }
2705
- var otpLoginPlugin = chunkKOXFYFOF_cjs.definePlugin({
2705
+ var otpLoginPlugin = chunk3RNDJAZ5_cjs.definePlugin({
2706
2706
  id: "otp-login",
2707
2707
  version: "1.0.0",
2708
2708
  name: "OTP Login",
@@ -3099,15 +3099,15 @@ function buildOauthApi() {
3099
3099
  if (!user || !user.is_active) {
3100
3100
  return c.redirect("/auth/login?error=Account is deactivated");
3101
3101
  }
3102
- const tokenTtl2 = await chunkKMM45BTY_cjs.getJwtExpirySecondsFromDb(c.env.DB, c.env);
3103
- const jwt2 = await chunkKMM45BTY_cjs.AuthManager.generateToken(
3102
+ const tokenTtl2 = await chunkZHQP75SR_cjs.getJwtExpirySecondsFromDb(c.env.DB, c.env);
3103
+ const jwt2 = await chunkZHQP75SR_cjs.AuthManager.generateToken(
3104
3104
  user.id,
3105
3105
  user.email,
3106
3106
  user.role,
3107
3107
  c.env.JWT_SECRET,
3108
3108
  tokenTtl2
3109
3109
  );
3110
- chunkKMM45BTY_cjs.AuthManager.setAuthCookie(c, jwt2, { sameSite: "Lax", maxAge: tokenTtl2 });
3110
+ chunkZHQP75SR_cjs.AuthManager.setAuthCookie(c, jwt2, { sameSite: "Lax", maxAge: tokenTtl2 });
3111
3111
  return c.redirect("/admin");
3112
3112
  }
3113
3113
  const existingUser = await oauthService.findUserByEmail(profile.email);
@@ -3124,15 +3124,15 @@ function buildOauthApi() {
3124
3124
  tokenExpiresAt: tokenExpiresAt ?? void 0,
3125
3125
  profileData: JSON.stringify(profile)
3126
3126
  });
3127
- const tokenTtl2 = await chunkKMM45BTY_cjs.getJwtExpirySecondsFromDb(c.env.DB, c.env);
3128
- const jwt2 = await chunkKMM45BTY_cjs.AuthManager.generateToken(
3127
+ const tokenTtl2 = await chunkZHQP75SR_cjs.getJwtExpirySecondsFromDb(c.env.DB, c.env);
3128
+ const jwt2 = await chunkZHQP75SR_cjs.AuthManager.generateToken(
3129
3129
  existingUser.id,
3130
3130
  existingUser.email,
3131
3131
  existingUser.role,
3132
3132
  c.env.JWT_SECRET,
3133
3133
  tokenTtl2
3134
3134
  );
3135
- chunkKMM45BTY_cjs.AuthManager.setAuthCookie(c, jwt2, { sameSite: "Lax", maxAge: tokenTtl2 });
3135
+ chunkZHQP75SR_cjs.AuthManager.setAuthCookie(c, jwt2, { sameSite: "Lax", maxAge: tokenTtl2 });
3136
3136
  return c.redirect("/admin");
3137
3137
  }
3138
3138
  const newUserId = await oauthService.createUserFromOAuth(profile);
@@ -3145,15 +3145,15 @@ function buildOauthApi() {
3145
3145
  tokenExpiresAt: tokenExpiresAt ?? void 0,
3146
3146
  profileData: JSON.stringify(profile)
3147
3147
  });
3148
- const tokenTtl = await chunkKMM45BTY_cjs.getJwtExpirySecondsFromDb(c.env.DB, c.env);
3149
- const jwt = await chunkKMM45BTY_cjs.AuthManager.generateToken(
3148
+ const tokenTtl = await chunkZHQP75SR_cjs.getJwtExpirySecondsFromDb(c.env.DB, c.env);
3149
+ const jwt = await chunkZHQP75SR_cjs.AuthManager.generateToken(
3150
3150
  newUserId,
3151
3151
  profile.email.toLowerCase(),
3152
3152
  "viewer",
3153
3153
  c.env.JWT_SECRET,
3154
3154
  tokenTtl
3155
3155
  );
3156
- chunkKMM45BTY_cjs.AuthManager.setAuthCookie(c, jwt, { sameSite: "Lax", maxAge: tokenTtl });
3156
+ chunkZHQP75SR_cjs.AuthManager.setAuthCookie(c, jwt, { sameSite: "Lax", maxAge: tokenTtl });
3157
3157
  return c.redirect("/admin");
3158
3158
  } catch (error) {
3159
3159
  console.error("OAuth callback error:", error);
@@ -3248,7 +3248,7 @@ function buildOauthApi() {
3248
3248
  });
3249
3249
  return oauthAPI;
3250
3250
  }
3251
- var oauthProvidersPlugin = chunkKOXFYFOF_cjs.definePlugin({
3251
+ var oauthProvidersPlugin = chunk3RNDJAZ5_cjs.definePlugin({
3252
3252
  id: "oauth-providers",
3253
3253
  version: "1.0.0",
3254
3254
  name: "OAuth Providers",
@@ -3825,7 +3825,7 @@ var AISearchService = class {
3825
3825
  */
3826
3826
  async detectNewCollections() {
3827
3827
  try {
3828
- const allCollections = chunkKZIBF2EV_cjs.getCollectionRegistry().listActive().filter((r) => !r.internal).map((r) => ({
3828
+ const allCollections = chunkC3KSTUEA_cjs.getCollectionRegistry().listActive().filter((r) => !r.internal).map((r) => ({
3829
3829
  id: r.id,
3830
3830
  name: r.name,
3831
3831
  display_name: r.displayName,
@@ -3877,7 +3877,7 @@ var AISearchService = class {
3877
3877
  */
3878
3878
  async getAllCollections() {
3879
3879
  try {
3880
- const allCollections = chunkKZIBF2EV_cjs.getCollectionRegistry().listActive().filter((r) => !r.internal).sort((a, b) => a.displayName.localeCompare(b.displayName)).map((r) => ({
3880
+ const allCollections = chunkC3KSTUEA_cjs.getCollectionRegistry().listActive().filter((r) => !r.internal).sort((a, b) => a.displayName.localeCompare(b.displayName)).map((r) => ({
3881
3881
  id: r.id,
3882
3882
  name: r.name,
3883
3883
  display_name: r.displayName,
@@ -4213,7 +4213,7 @@ var IndexManager = class {
4213
4213
  */
4214
4214
  async indexCollection(collectionId) {
4215
4215
  try {
4216
- const registry = chunkKZIBF2EV_cjs.getCollectionRegistry();
4216
+ const registry = chunkC3KSTUEA_cjs.getCollectionRegistry();
4217
4217
  const record = registry.getById(collectionId) ?? registry.getByName(collectionId);
4218
4218
  if (!record) {
4219
4219
  throw new Error(`Collection ${collectionId} not found`);
@@ -4840,7 +4840,7 @@ function renderSettingsPage(data) {
4840
4840
 
4841
4841
  // src/plugins/core-plugins/ai-search-plugin/routes/admin.ts
4842
4842
  var adminRoutes2 = new hono.Hono();
4843
- adminRoutes2.use("*", chunkKMM45BTY_cjs.requireAuth());
4843
+ adminRoutes2.use("*", chunkZHQP75SR_cjs.requireAuth());
4844
4844
  adminRoutes2.get("/", async (c) => {
4845
4845
  try {
4846
4846
  const user = c.get("user");
@@ -5081,7 +5081,7 @@ var manifest_default = {
5081
5081
  author: "SonicJS"};
5082
5082
 
5083
5083
  // src/plugins/core-plugins/ai-search-plugin/index.ts
5084
- var aiSearchPlugin = chunkKOXFYFOF_cjs.definePlugin({
5084
+ var aiSearchPlugin = chunk3RNDJAZ5_cjs.definePlugin({
5085
5085
  id: manifest_default.id,
5086
5086
  version: manifest_default.version,
5087
5087
  name: manifest_default.name,
@@ -5952,7 +5952,7 @@ function renderSecuritySettingsPage(data) {
5952
5952
 
5953
5953
  // src/plugins/core-plugins/security-audit-plugin/routes/admin.ts
5954
5954
  var adminRoutes3 = new hono.Hono();
5955
- adminRoutes3.use("*", chunkKMM45BTY_cjs.requireAuth());
5955
+ adminRoutes3.use("*", chunkZHQP75SR_cjs.requireAuth());
5956
5956
  adminRoutes3.use("*", async (c, next) => {
5957
5957
  const user = c.get("user");
5958
5958
  if (user?.role !== "admin") {
@@ -5962,7 +5962,7 @@ adminRoutes3.use("*", async (c, next) => {
5962
5962
  });
5963
5963
  async function getSettings(db) {
5964
5964
  try {
5965
- const pluginService = new chunkKZIBF2EV_cjs.PluginService(db);
5965
+ const pluginService = new chunkC3KSTUEA_cjs.PluginService(db);
5966
5966
  const plugin2 = await pluginService.getPlugin("security-audit");
5967
5967
  if (plugin2?.settings) {
5968
5968
  const settings = typeof plugin2.settings === "string" ? JSON.parse(plugin2.settings) : plugin2.settings;
@@ -6067,7 +6067,7 @@ adminRoutes3.post("/settings", async (c) => {
6067
6067
  autoPurge: body["retention.autoPurge"] === "true"
6068
6068
  }
6069
6069
  };
6070
- const pluginService = new chunkKZIBF2EV_cjs.PluginService(db);
6070
+ const pluginService = new chunkC3KSTUEA_cjs.PluginService(db);
6071
6071
  await pluginService.updatePluginSettings("security-audit", settings);
6072
6072
  if (c.req.header("HX-Request")) {
6073
6073
  return c.json({ success: true });
@@ -6228,7 +6228,7 @@ var BruteForceDetector = class {
6228
6228
 
6229
6229
  // src/plugins/core-plugins/security-audit-plugin/routes/api.ts
6230
6230
  var apiRoutes2 = new hono.Hono();
6231
- apiRoutes2.use("*", chunkKMM45BTY_cjs.requireAuth());
6231
+ apiRoutes2.use("*", chunkZHQP75SR_cjs.requireAuth());
6232
6232
  apiRoutes2.use("*", async (c, next) => {
6233
6233
  const user = c.get("user");
6234
6234
  if (user?.role !== "admin") {
@@ -6238,7 +6238,7 @@ apiRoutes2.use("*", async (c, next) => {
6238
6238
  });
6239
6239
  async function getSettings2(db) {
6240
6240
  try {
6241
- const pluginService = new chunkKZIBF2EV_cjs.PluginService(db);
6241
+ const pluginService = new chunkC3KSTUEA_cjs.PluginService(db);
6242
6242
  const plugin2 = await pluginService.getPlugin("security-audit");
6243
6243
  if (plugin2?.settings) {
6244
6244
  const settings = typeof plugin2.settings === "string" ? JSON.parse(plugin2.settings) : plugin2.settings;
@@ -6386,7 +6386,7 @@ function generateFingerprint(ip, userAgent) {
6386
6386
  }
6387
6387
  async function getPluginSettings(db) {
6388
6388
  try {
6389
- const pluginService = new chunkKZIBF2EV_cjs.PluginService(db);
6389
+ const pluginService = new chunkC3KSTUEA_cjs.PluginService(db);
6390
6390
  const plugin2 = await pluginService.getPlugin("security-audit");
6391
6391
  if (plugin2?.settings) {
6392
6392
  const settings = typeof plugin2.settings === "string" ? JSON.parse(plugin2.settings) : plugin2.settings;
@@ -6617,7 +6617,7 @@ async function logAuthEvent(c, db, settings, ip, userAgent, countryCode, fingerp
6617
6617
 
6618
6618
  // src/plugins/core-plugins/security-audit-plugin/index.ts
6619
6619
  var SECURITY_ICON = `<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"/></svg>`;
6620
- var securityAuditPlugin = chunkKOXFYFOF_cjs.definePlugin({
6620
+ var securityAuditPlugin = chunk3RNDJAZ5_cjs.definePlugin({
6621
6621
  id: "security-audit",
6622
6622
  version: "1.0.0",
6623
6623
  name: "Security Audit",
@@ -6691,7 +6691,7 @@ var ApiKeyService = class {
6691
6691
  const prefix = secret.slice(0, DISPLAY_PREFIX_LEN);
6692
6692
  const expiresAt = input.expiresAt ?? null;
6693
6693
  const doc = await this.docService().create(
6694
- chunkSC2WZFNQ_cjs.createDocumentSchema.parse({
6694
+ chunkNOBU34HS_cjs.createDocumentSchema.parse({
6695
6695
  typeId: "api_key",
6696
6696
  tenantId: this.tenantId,
6697
6697
  title: name,
@@ -6961,7 +6961,7 @@ var createSchema = zod.z.object({
6961
6961
  });
6962
6962
  async function getSettings3(db) {
6963
6963
  try {
6964
- const plugin2 = await new chunkKZIBF2EV_cjs.PluginService(db).getPlugin("api-keys");
6964
+ const plugin2 = await new chunkC3KSTUEA_cjs.PluginService(db).getPlugin("api-keys");
6965
6965
  if (plugin2?.settings) {
6966
6966
  const s = typeof plugin2.settings === "string" ? JSON.parse(plugin2.settings) : plugin2.settings;
6967
6967
  return { ...DEFAULT_SETTINGS3, ...s };
@@ -6970,7 +6970,7 @@ async function getSettings3(db) {
6970
6970
  }
6971
6971
  return DEFAULT_SETTINGS3;
6972
6972
  }
6973
- adminRoutes4.use("*", chunkKMM45BTY_cjs.requireAuth());
6973
+ adminRoutes4.use("*", chunkZHQP75SR_cjs.requireAuth());
6974
6974
  adminRoutes4.use("*", async (c, next) => {
6975
6975
  const user = c.get("user");
6976
6976
  if (user?.role !== "admin") {
@@ -7055,7 +7055,7 @@ function apiKeyAuthMiddleware() {
7055
7055
 
7056
7056
  // src/plugins/core-plugins/api-keys-plugin/index.ts
7057
7057
  var KEY_ICON = `<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"/></svg>`;
7058
- var apiKeysPlugin = chunkKOXFYFOF_cjs.definePlugin({
7058
+ var apiKeysPlugin = chunk3RNDJAZ5_cjs.definePlugin({
7059
7059
  id: "api-keys",
7060
7060
  version: "1.0.0-beta.1",
7061
7061
  name: "API Keys",
@@ -7824,7 +7824,7 @@ var DEFAULT_SETTINGS4 = {
7824
7824
 
7825
7825
  // src/plugins/core-plugins/stripe-plugin/routes/admin.ts
7826
7826
  var adminRoutes5 = new hono.Hono();
7827
- adminRoutes5.use("*", chunkKMM45BTY_cjs.requireAuth());
7827
+ adminRoutes5.use("*", chunkZHQP75SR_cjs.requireAuth());
7828
7828
  adminRoutes5.use("*", async (c, next) => {
7829
7829
  const user = c.get("user");
7830
7830
  if (user?.role !== "admin") {
@@ -7834,7 +7834,7 @@ adminRoutes5.use("*", async (c, next) => {
7834
7834
  });
7835
7835
  async function getSettings4(db) {
7836
7836
  try {
7837
- const pluginService = new chunkKZIBF2EV_cjs.PluginService(db);
7837
+ const pluginService = new chunkC3KSTUEA_cjs.PluginService(db);
7838
7838
  const plugin2 = await pluginService.getPlugin("stripe");
7839
7839
  if (plugin2?.settings) {
7840
7840
  const settings = typeof plugin2.settings === "string" ? JSON.parse(plugin2.settings) : plugin2.settings;
@@ -8156,7 +8156,7 @@ function timingSafeEqual(a, b) {
8156
8156
  var apiRoutes3 = new hono.Hono();
8157
8157
  async function getSettings5(db) {
8158
8158
  try {
8159
- const pluginService = new chunkKZIBF2EV_cjs.PluginService(db);
8159
+ const pluginService = new chunkC3KSTUEA_cjs.PluginService(db);
8160
8160
  const plugin2 = await pluginService.getPlugin("stripe");
8161
8161
  if (plugin2?.settings) {
8162
8162
  const settings = typeof plugin2.settings === "string" ? JSON.parse(plugin2.settings) : plugin2.settings;
@@ -8307,7 +8307,7 @@ apiRoutes3.post("/webhook", async (c) => {
8307
8307
  }
8308
8308
  return c.json({ received: true });
8309
8309
  });
8310
- apiRoutes3.post("/create-checkout-session", chunkKMM45BTY_cjs.requireAuth(), async (c) => {
8310
+ apiRoutes3.post("/create-checkout-session", chunkZHQP75SR_cjs.requireAuth(), async (c) => {
8311
8311
  const db = c.env.DB;
8312
8312
  const user = c.get("user");
8313
8313
  if (!user) return c.json({ error: "Unauthorized" }, 401);
@@ -8347,7 +8347,7 @@ apiRoutes3.post("/create-checkout-session", chunkKMM45BTY_cjs.requireAuth(), asy
8347
8347
  });
8348
8348
  return c.json({ sessionId: session.id, url: session.url });
8349
8349
  });
8350
- apiRoutes3.get("/subscription", chunkKMM45BTY_cjs.requireAuth(), async (c) => {
8350
+ apiRoutes3.get("/subscription", chunkZHQP75SR_cjs.requireAuth(), async (c) => {
8351
8351
  const user = c.get("user");
8352
8352
  if (!user) return c.json({ error: "Unauthorized" }, 401);
8353
8353
  const db = c.env.DB;
@@ -8359,7 +8359,7 @@ apiRoutes3.get("/subscription", chunkKMM45BTY_cjs.requireAuth(), async (c) => {
8359
8359
  }
8360
8360
  return c.json({ subscription });
8361
8361
  });
8362
- apiRoutes3.get("/subscriptions", chunkKMM45BTY_cjs.requireAuth(), async (c) => {
8362
+ apiRoutes3.get("/subscriptions", chunkZHQP75SR_cjs.requireAuth(), async (c) => {
8363
8363
  const user = c.get("user");
8364
8364
  if (user?.role !== "admin") return c.json({ error: "Access denied" }, 403);
8365
8365
  const db = c.env.DB;
@@ -8375,7 +8375,7 @@ apiRoutes3.get("/subscriptions", chunkKMM45BTY_cjs.requireAuth(), async (c) => {
8375
8375
  const result = await subscriptionService.list(filters);
8376
8376
  return c.json(result);
8377
8377
  });
8378
- apiRoutes3.get("/stats", chunkKMM45BTY_cjs.requireAuth(), async (c) => {
8378
+ apiRoutes3.get("/stats", chunkZHQP75SR_cjs.requireAuth(), async (c) => {
8379
8379
  const user = c.get("user");
8380
8380
  if (user?.role !== "admin") return c.json({ error: "Access denied" }, 403);
8381
8381
  const db = c.env.DB;
@@ -8384,7 +8384,7 @@ apiRoutes3.get("/stats", chunkKMM45BTY_cjs.requireAuth(), async (c) => {
8384
8384
  const stats = await subscriptionService.getStats();
8385
8385
  return c.json(stats);
8386
8386
  });
8387
- apiRoutes3.post("/sync-subscriptions", chunkKMM45BTY_cjs.requireAuth(), async (c) => {
8387
+ apiRoutes3.post("/sync-subscriptions", chunkZHQP75SR_cjs.requireAuth(), async (c) => {
8388
8388
  const user = c.get("user");
8389
8389
  if (user?.role !== "admin") return c.json({ error: "Access denied" }, 403);
8390
8390
  const db = c.env.DB;
@@ -8432,7 +8432,7 @@ apiRoutes3.post("/sync-subscriptions", chunkKMM45BTY_cjs.requireAuth(), async (c
8432
8432
  }, 500);
8433
8433
  }
8434
8434
  });
8435
- apiRoutes3.get("/events", chunkKMM45BTY_cjs.requireAuth(), async (c) => {
8435
+ apiRoutes3.get("/events", chunkZHQP75SR_cjs.requireAuth(), async (c) => {
8436
8436
  const user = c.get("user");
8437
8437
  if (user?.role !== "admin") return c.json({ error: "Access denied" }, 403);
8438
8438
  const db = c.env.DB;
@@ -8455,7 +8455,7 @@ apiRoutes3.get("/events", chunkKMM45BTY_cjs.requireAuth(), async (c) => {
8455
8455
 
8456
8456
  // src/plugins/core-plugins/stripe-plugin/index.ts
8457
8457
  var STRIPE_ICON = `<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"/></svg>`;
8458
- var stripePlugin = chunkKOXFYFOF_cjs.definePlugin({
8458
+ var stripePlugin = chunk3RNDJAZ5_cjs.definePlugin({
8459
8459
  id: "stripe",
8460
8460
  version: "1.0.0",
8461
8461
  name: "Stripe",
@@ -8728,7 +8728,7 @@ function renderFormsListPage(data) {
8728
8728
 
8729
8729
  <!-- Forms Table -->
8730
8730
  <div class="bg-white dark:bg-zinc-900 rounded-lg border border-zinc-950/5 dark:border-white/10 overflow-hidden">
8731
- ${chunkSC2WZFNQ_cjs.renderTable(tableData)}
8731
+ ${chunkNOBU34HS_cjs.renderTable(tableData)}
8732
8732
  </div>
8733
8733
  </div>
8734
8734
  `;
@@ -10158,7 +10158,7 @@ function renderFormCreatePage(data) {
10158
10158
  // src/routes/admin-forms.ts
10159
10159
  var isTableMissing = (err) => String(err?.message ?? err?.cause?.message ?? "").includes("no such table: forms");
10160
10160
  var adminFormsRoutes = new hono.Hono();
10161
- adminFormsRoutes.use("*", chunkKMM45BTY_cjs.requireAuth());
10161
+ adminFormsRoutes.use("*", chunkZHQP75SR_cjs.requireAuth());
10162
10162
  adminFormsRoutes.get("/", async (c) => {
10163
10163
  try {
10164
10164
  const user = c.get("user");
@@ -10331,7 +10331,7 @@ adminFormsRoutes.get("/:id/builder", async (c) => {
10331
10331
  if (!form) {
10332
10332
  return c.html("<p>Form not found</p>", 404);
10333
10333
  }
10334
- const turnstileService = new chunkLXYDJU6U_cjs.TurnstileService(db);
10334
+ const turnstileService = new chunkMJZI3NHR_cjs.TurnstileService(db);
10335
10335
  const turnstileSettings = await turnstileService.getSettings();
10336
10336
  const pageData = {
10337
10337
  id: form.id,
@@ -10500,7 +10500,7 @@ publicFormsRoutes.get("/:identifier/turnstile-config", async (c) => {
10500
10500
  if (!form) {
10501
10501
  return c.json({ error: "Form not found" }, 404);
10502
10502
  }
10503
- const turnstileService = new chunkLXYDJU6U_cjs.TurnstileService(db);
10503
+ const turnstileService = new chunkMJZI3NHR_cjs.TurnstileService(db);
10504
10504
  const globalSettings = await turnstileService.getSettings();
10505
10505
  const formSettings = form.turnstile_settings ? JSON.parse(form.turnstile_settings) : { inherit: true };
10506
10506
  const enabled = form.turnstile_enabled === 1 || formSettings.inherit && globalSettings?.enabled;
@@ -10930,7 +10930,7 @@ publicFormsRoutes.post("/:identifier/submit", async (c) => {
10930
10930
  const turnstileEnabled = form.turnstile_enabled === 1;
10931
10931
  const turnstileSettings = form.turnstile_settings ? JSON.parse(form.turnstile_settings) : { inherit: true };
10932
10932
  if (turnstileEnabled || turnstileSettings.inherit) {
10933
- const turnstileService = new chunkLXYDJU6U_cjs.TurnstileService(db);
10933
+ const turnstileService = new chunkMJZI3NHR_cjs.TurnstileService(db);
10934
10934
  const globalEnabled = await turnstileService.isEnabled();
10935
10935
  if (globalEnabled || turnstileEnabled) {
10936
10936
  const turnstileToken = body.data?.turnstile || body.turnstile;
@@ -10992,7 +10992,7 @@ publicFormsRoutes.post("/:identifier/submit", async (c) => {
10992
10992
  });
10993
10993
 
10994
10994
  // src/plugins/core-plugins/forms-plugin/index.ts
10995
- var formsPlugin = chunkKOXFYFOF_cjs.definePlugin({
10995
+ var formsPlugin = chunk3RNDJAZ5_cjs.definePlugin({
10996
10996
  id: "forms",
10997
10997
  version: "1.0.0",
10998
10998
  name: "Forms",
@@ -11012,7 +11012,7 @@ var formsPlugin = chunkKOXFYFOF_cjs.definePlugin({
11012
11012
  });
11013
11013
  chunkK623Q6WD_cjs.init_admin_layout_catalyst_template();
11014
11014
  var adminRbacRoutes = new hono.Hono();
11015
- adminRbacRoutes.use("*", chunkKMM45BTY_cjs.requireRbac("rbac", "manage"));
11015
+ adminRbacRoutes.use("*", chunkZHQP75SR_cjs.requireRbac("rbac", "manage"));
11016
11016
  var esc = (s) => String(s).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
11017
11017
  var TABS2 = `
11018
11018
  <div class="border-b border-zinc-950/10 dark:border-white/10 mb-6">
@@ -11320,7 +11320,7 @@ adminRbacRoutes.get("/", async (c) => {
11320
11320
  title: "Roles & Permissions",
11321
11321
  pageTitle: "Roles & Permissions",
11322
11322
  currentPath: "/admin/users",
11323
- version: chunk3XFA3E2F_cjs.getCoreVersion(),
11323
+ version: chunkKDRHGEUF_cjs.getCoreVersion(),
11324
11324
  user: u ? { name: u.email || "Admin", email: u.email || "", role: u.role || "admin" } : void 0,
11325
11325
  content: content2
11326
11326
  })
@@ -11457,7 +11457,7 @@ adminRbacRoutes.get("/check", async (c) => {
11457
11457
  });
11458
11458
 
11459
11459
  // src/middleware/plugin-menu.ts
11460
- var REGISTRY_MENU_PLUGINS = Object.values(chunkKZIBF2EV_cjs.PLUGIN_REGISTRY).filter((p) => p.adminMenu !== null).map((p) => ({
11460
+ var REGISTRY_MENU_PLUGINS = Object.values(chunkC3KSTUEA_cjs.PLUGIN_REGISTRY).filter((p) => p.adminMenu !== null).map((p) => ({
11461
11461
  id: p.id,
11462
11462
  label: p.adminMenu.label,
11463
11463
  path: p.adminMenu.path,
@@ -11536,7 +11536,7 @@ function pluginMenuMiddleware() {
11536
11536
  } catch {
11537
11537
  }
11538
11538
  const user = c.get("user");
11539
- const singletonItems = chunkLXYDJU6U_cjs.resolvePluginMenuItems(user ? { role: user.role } : void 0);
11539
+ const singletonItems = chunkMJZI3NHR_cjs.resolvePluginMenuItems(user ? { role: user.role } : void 0);
11540
11540
  const existingPaths = new Set(activeMenuItems.map((i) => i.path));
11541
11541
  for (const item of singletonItems) {
11542
11542
  if (!existingPaths.has(item.path)) {
@@ -11563,7 +11563,7 @@ function pluginMenuMiddleware() {
11563
11563
  }
11564
11564
  chunkK623Q6WD_cjs.init_admin_layout_catalyst_template();
11565
11565
  var adminRoutes6 = new hono.Hono();
11566
- adminRoutes6.use("*", chunkKMM45BTY_cjs.requireAuth());
11566
+ adminRoutes6.use("*", chunkZHQP75SR_cjs.requireAuth());
11567
11567
  adminRoutes6.use("*", async (c, next) => {
11568
11568
  const user = c.get("user");
11569
11569
  if (user?.role !== "admin") {
@@ -11918,7 +11918,7 @@ apiRoutes4.get("/stats", async (c) => {
11918
11918
  });
11919
11919
 
11920
11920
  // src/plugins/core-plugins/analytics/index.ts
11921
- var analyticsPlugin = chunkKOXFYFOF_cjs.definePlugin({
11921
+ var analyticsPlugin = chunk3RNDJAZ5_cjs.definePlugin({
11922
11922
  id: "core-analytics",
11923
11923
  version: "1.0.0",
11924
11924
  name: "Analytics",
@@ -12065,7 +12065,7 @@ function esc2(s) {
12065
12065
  return (s || "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
12066
12066
  }
12067
12067
  async function getVariablesMap(db) {
12068
- let variables = chunkSC2WZFNQ_cjs.getVariablesCached();
12068
+ let variables = chunkNOBU34HS_cjs.getVariablesCached();
12069
12069
  if (variables) return variables;
12070
12070
  try {
12071
12071
  const { results } = await db.prepare(
@@ -12075,7 +12075,7 @@ async function getVariablesMap(db) {
12075
12075
  for (const row of results || []) {
12076
12076
  variables.set(row.key, row.value);
12077
12077
  }
12078
- chunkSC2WZFNQ_cjs.setVariablesCache(variables);
12078
+ chunkNOBU34HS_cjs.setVariablesCache(variables);
12079
12079
  return variables;
12080
12080
  } catch {
12081
12081
  return /* @__PURE__ */ new Map();
@@ -12144,7 +12144,7 @@ apiRoutes5.post("/", async (c) => {
12144
12144
  await db.prepare(
12145
12145
  "INSERT INTO global_variables (key, value, description, category, is_active) VALUES (?, ?, ?, ?, ?)"
12146
12146
  ).bind(key, value || "", description || "", category || "general", isActive !== false ? 1 : 0).run();
12147
- chunkSC2WZFNQ_cjs.invalidateVariablesCache();
12147
+ chunkNOBU34HS_cjs.invalidateVariablesCache();
12148
12148
  const created = await db.prepare("SELECT * FROM global_variables WHERE key = ?").bind(key).first();
12149
12149
  return c.json({ success: true, data: formatVariable(created) }, 201);
12150
12150
  } catch {
@@ -12189,7 +12189,7 @@ apiRoutes5.put("/:id", async (c) => {
12189
12189
  updates.push("updated_at = strftime('%s', 'now')");
12190
12190
  params.push(id);
12191
12191
  await db.prepare(`UPDATE global_variables SET ${updates.join(", ")} WHERE id = ?`).bind(...params).run();
12192
- chunkSC2WZFNQ_cjs.invalidateVariablesCache();
12192
+ chunkNOBU34HS_cjs.invalidateVariablesCache();
12193
12193
  const updated = await db.prepare("SELECT * FROM global_variables WHERE id = ?").bind(id).first();
12194
12194
  return c.json({ success: true, data: formatVariable(updated) });
12195
12195
  } catch {
@@ -12203,7 +12203,7 @@ apiRoutes5.delete("/:id", async (c) => {
12203
12203
  const existing = await db.prepare("SELECT id FROM global_variables WHERE id = ?").bind(id).first();
12204
12204
  if (!existing) return c.json({ error: "Variable not found" }, 404);
12205
12205
  await db.prepare("DELETE FROM global_variables WHERE id = ?").bind(id).run();
12206
- chunkSC2WZFNQ_cjs.invalidateVariablesCache();
12206
+ chunkNOBU34HS_cjs.invalidateVariablesCache();
12207
12207
  return c.json({ success: true });
12208
12208
  } catch {
12209
12209
  return c.json({ success: false, error: "Failed to delete variable" }, 500);
@@ -12263,7 +12263,7 @@ adminRoutes7.put("/:id", async (c) => {
12263
12263
  const value = body.value;
12264
12264
  if (value !== void 0) {
12265
12265
  await db.prepare("UPDATE global_variables SET value = ?, updated_at = strftime('%s', 'now') WHERE id = ?").bind(value, id).run();
12266
- chunkSC2WZFNQ_cjs.invalidateVariablesCache();
12266
+ chunkNOBU34HS_cjs.invalidateVariablesCache();
12267
12267
  }
12268
12268
  return c.html('<span class="text-green-400 text-xs">Saved</span>');
12269
12269
  });
@@ -12271,7 +12271,7 @@ adminRoutes7.post("/:id/toggle", async (c) => {
12271
12271
  const db = c.env.DB;
12272
12272
  const id = c.req.param("id");
12273
12273
  await db.prepare("UPDATE global_variables SET is_active = CASE WHEN is_active = 1 THEN 0 ELSE 1 END, updated_at = strftime('%s', 'now') WHERE id = ?").bind(id).run();
12274
- chunkSC2WZFNQ_cjs.invalidateVariablesCache();
12274
+ chunkNOBU34HS_cjs.invalidateVariablesCache();
12275
12275
  c.header("HX-Redirect", "/admin/global-variables");
12276
12276
  return c.body(null, 204);
12277
12277
  });
@@ -12292,7 +12292,7 @@ adminRoutes7.post("/", async (c) => {
12292
12292
  await db.prepare(
12293
12293
  "INSERT INTO global_variables (key, value, description, category) VALUES (?, ?, ?, ?)"
12294
12294
  ).bind(key, value, description, category).run();
12295
- chunkSC2WZFNQ_cjs.invalidateVariablesCache();
12295
+ chunkNOBU34HS_cjs.invalidateVariablesCache();
12296
12296
  c.header("HX-Redirect", "/admin/global-variables");
12297
12297
  return c.body(null, 204);
12298
12298
  });
@@ -12311,7 +12311,7 @@ adminRoutes7.post("/settings/editor-integration", async (c) => {
12311
12311
  adminRoutes7.delete("/:id", async (c) => {
12312
12312
  const db = c.env.DB;
12313
12313
  await db.prepare("DELETE FROM global_variables WHERE id = ?").bind(c.req.param("id")).run();
12314
- chunkSC2WZFNQ_cjs.invalidateVariablesCache();
12314
+ chunkNOBU34HS_cjs.invalidateVariablesCache();
12315
12315
  return c.html("");
12316
12316
  });
12317
12317
  function renderAdminPage(variables, editorStatus = { editorActive: false, activeEditorName: "", enableEditorIntegration: true }) {
@@ -12629,7 +12629,7 @@ function renderAdminPage(variables, editorStatus = { editorActive: false, active
12629
12629
  </div>
12630
12630
  ` });
12631
12631
  }
12632
- var globalVariablesPlugin = chunkKOXFYFOF_cjs.definePlugin({
12632
+ var globalVariablesPlugin = chunk3RNDJAZ5_cjs.definePlugin({
12633
12633
  id: "global-variables",
12634
12634
  version: "1.1.0",
12635
12635
  name: "Global Variables",
@@ -12652,7 +12652,7 @@ var globalVariablesPlugin = chunkKOXFYFOF_cjs.definePlugin({
12652
12652
  if (!db || !data) return data;
12653
12653
  const variables = await getVariablesMap(db);
12654
12654
  if (variables.size === 0) return data;
12655
- return chunkSC2WZFNQ_cjs.resolveVariablesInObject(data, variables);
12655
+ return chunkNOBU34HS_cjs.resolveVariablesInObject(data, variables);
12656
12656
  } catch {
12657
12657
  return data;
12658
12658
  }
@@ -12670,7 +12670,7 @@ var globalVariablesPlugin = chunkKOXFYFOF_cjs.definePlugin({
12670
12670
  },
12671
12671
  activate: async () => console.info("[GlobalVariables] Plugin activated"),
12672
12672
  deactivate: async () => {
12673
- chunkSC2WZFNQ_cjs.invalidateVariablesCache();
12673
+ chunkNOBU34HS_cjs.invalidateVariablesCache();
12674
12674
  console.info("[GlobalVariables] Plugin deactivated, cache cleared");
12675
12675
  },
12676
12676
  uninstall: async (ctx) => {
@@ -13236,7 +13236,7 @@ function renderAdminPage2(shortcodes, editorStatus = { editorActive: false, acti
13236
13236
  </div>
13237
13237
  ` });
13238
13238
  }
13239
- var shortcodesPlugin = chunkKOXFYFOF_cjs.definePlugin({
13239
+ var shortcodesPlugin = chunk3RNDJAZ5_cjs.definePlugin({
13240
13240
  id: "shortcodes",
13241
13241
  version: "1.0.0",
13242
13242
  name: "Shortcodes",
@@ -13320,7 +13320,7 @@ helloWorldRoutes.get("/", async (c) => {
13320
13320
  </html>
13321
13321
  `);
13322
13322
  });
13323
- var helloWorldPlugin = chunkKOXFYFOF_cjs.definePlugin({
13323
+ var helloWorldPlugin = chunk3RNDJAZ5_cjs.definePlugin({
13324
13324
  id: "hello-world",
13325
13325
  version: "1.0.0",
13326
13326
  name: "Hello World",
@@ -13551,7 +13551,7 @@ function renderTenantForm(data) {
13551
13551
  // src/plugins/core-plugins/multi-tenant-plugin/templates/tenant-members.template.ts
13552
13552
  chunkK623Q6WD_cjs.init_admin_layout_catalyst_template();
13553
13553
  function roleOptions(selected) {
13554
- return chunkSC2WZFNQ_cjs.VALID_MEMBER_ROLES.map(
13554
+ return chunkNOBU34HS_cjs.VALID_MEMBER_ROLES.map(
13555
13555
  (r) => `<option value="${r}" ${r === selected ? "selected" : ""}>${r}</option>`
13556
13556
  ).join("");
13557
13557
  }
@@ -13613,7 +13613,7 @@ function renderInvitations(slug, invitations) {
13613
13613
  <div>
13614
13614
  <label for="invite-role" class="mb-1 block text-xs font-medium text-zinc-500 dark:text-zinc-400">Role</label>
13615
13615
  <select id="invite-role" name="role" class="rounded-lg border border-zinc-950/10 bg-white px-2 py-2 text-sm text-zinc-950 dark:border-white/10 dark:bg-zinc-800 dark:text-white">
13616
- ${chunkSC2WZFNQ_cjs.VALID_MEMBER_ROLES.map((r) => `<option value="${r}" ${r === "viewer" ? "selected" : ""}>${r}</option>`).join("")}
13616
+ ${chunkNOBU34HS_cjs.VALID_MEMBER_ROLES.map((r) => `<option value="${r}" ${r === "viewer" ? "selected" : ""}>${r}</option>`).join("")}
13617
13617
  </select>
13618
13618
  </div>
13619
13619
  <button type="submit" data-send-invite class="rounded-lg bg-zinc-950 px-3.5 py-2 text-sm font-semibold text-white hover:bg-zinc-800 dark:bg-white dark:text-zinc-950 dark:hover:bg-zinc-200">Invite</button>
@@ -13709,7 +13709,7 @@ function renderTenantMembers(data) {
13709
13709
  // src/plugins/core-plugins/multi-tenant-plugin/templates/user-memberships.template.ts
13710
13710
  chunkK623Q6WD_cjs.init_admin_layout_catalyst_template();
13711
13711
  function roleOptions2(selected) {
13712
- return chunkSC2WZFNQ_cjs.VALID_MEMBER_ROLES.map(
13712
+ return chunkNOBU34HS_cjs.VALID_MEMBER_ROLES.map(
13713
13713
  (r) => `<option value="${r}" ${r === selected ? "selected" : ""}>${r}</option>`
13714
13714
  ).join("");
13715
13715
  }
@@ -13871,7 +13871,7 @@ function zodToFieldErrors(error) {
13871
13871
  }
13872
13872
  async function isMultiTenantActive(db) {
13873
13873
  try {
13874
- const plugin2 = await new chunkKZIBF2EV_cjs.PluginService(db).getPlugin(chunkKZIBF2EV_cjs.MULTI_TENANT_PLUGIN_ID);
13874
+ const plugin2 = await new chunkC3KSTUEA_cjs.PluginService(db).getPlugin(chunkC3KSTUEA_cjs.MULTI_TENANT_PLUGIN_ID);
13875
13875
  return plugin2?.status === "active";
13876
13876
  } catch {
13877
13877
  return false;
@@ -13879,7 +13879,7 @@ async function isMultiTenantActive(db) {
13879
13879
  }
13880
13880
  function createTenantAdminRoutes() {
13881
13881
  const routes2 = new hono.Hono();
13882
- routes2.use("*", chunkKMM45BTY_cjs.requireAuth());
13882
+ routes2.use("*", chunkZHQP75SR_cjs.requireAuth());
13883
13883
  routes2.use("*", async (c, next) => {
13884
13884
  const user = c.get("user");
13885
13885
  if (user?.role !== "admin") {
@@ -13893,7 +13893,7 @@ function createTenantAdminRoutes() {
13893
13893
  const form = await c.req.formData();
13894
13894
  const slug = String(form.get("tenant") ?? "").trim().toLowerCase();
13895
13895
  const redirect = String(form.get("redirect") ?? "");
13896
- const svc = new chunkSC2WZFNQ_cjs.TenantService(db);
13896
+ const svc = new chunkNOBU34HS_cjs.TenantService(db);
13897
13897
  const tenant = await svc.getTenantBySlug(slug);
13898
13898
  if (!tenant || tenant.status !== "active") {
13899
13899
  return c.json({ error: "Unknown or inactive tenant" }, 400);
@@ -13903,7 +13903,7 @@ function createTenantAdminRoutes() {
13903
13903
  if (!user.isSuperAdmin && !await svc.isMember(user.userId, slug)) {
13904
13904
  return c.json({ error: "You are not a member of this tenant" }, 403);
13905
13905
  }
13906
- cookie.setCookie(c, chunkKZIBF2EV_cjs.TENANT_COOKIE, slug, {
13906
+ cookie.setCookie(c, chunkC3KSTUEA_cjs.TENANT_COOKIE, slug, {
13907
13907
  path: "/",
13908
13908
  httpOnly: true,
13909
13909
  sameSite: "Lax",
@@ -13920,7 +13920,7 @@ function createTenantAdminRoutes() {
13920
13920
  if (!user) return c.redirect("/auth/login");
13921
13921
  const token = c.req.query("token") ?? "";
13922
13922
  try {
13923
- const { slug } = await new chunkSC2WZFNQ_cjs.TenantService(db).acceptInvitation(token, user.userId, user.email);
13923
+ const { slug } = await new chunkNOBU34HS_cjs.TenantService(db).acceptInvitation(token, user.userId, user.email);
13924
13924
  return c.redirect(`/admin/tenants/${slug}/members?message=Invitation accepted`);
13925
13925
  } catch (error) {
13926
13926
  const message = error instanceof Error ? error.message : "Failed to accept invitation";
@@ -13948,7 +13948,7 @@ function createTenantAdminRoutes() {
13948
13948
  const userId = c.req.param("userId");
13949
13949
  const target = await db.prepare("SELECT id, email FROM auth_user WHERE id = ?").bind(userId).first();
13950
13950
  if (!target?.id) return c.redirect("/admin/users?message=User not found&type=error");
13951
- const svc = new chunkSC2WZFNQ_cjs.TenantService(db);
13951
+ const svc = new chunkNOBU34HS_cjs.TenantService(db);
13952
13952
  const [memberships, allTenants] = await Promise.all([svc.listUserMemberships(userId), svc.listTenants()]);
13953
13953
  const memberSlugs = new Set(memberships.map((m) => m.slug));
13954
13954
  const availableTenants = allTenants.filter((t) => t.status === "active" && !memberSlugs.has(t.slug)).map((t) => ({ slug: t.slug, name: t.name }));
@@ -13973,10 +13973,10 @@ function createTenantAdminRoutes() {
13973
13973
  const slug = String(form.get("slug") ?? "").trim().toLowerCase();
13974
13974
  const role = String(form.get("role") ?? "viewer");
13975
13975
  const redirectTo = String(form.get("_redirect") ?? "") || `/admin/tenants/users/${userId}`;
13976
- if (!chunkSC2WZFNQ_cjs.isValidMemberRole(role)) throw new Error(`Invalid role '${role}'`);
13976
+ if (!chunkNOBU34HS_cjs.isValidMemberRole(role)) throw new Error(`Invalid role '${role}'`);
13977
13977
  const target = await db.prepare("SELECT email FROM auth_user WHERE id = ?").bind(userId).first();
13978
13978
  if (!target) throw new Error("User not found");
13979
- const svc = new chunkSC2WZFNQ_cjs.TenantService(db);
13979
+ const svc = new chunkNOBU34HS_cjs.TenantService(db);
13980
13980
  if (!await svc.getTenantBySlug(slug)) throw new Error("Tenant not found");
13981
13981
  if (await svc.isMember(userId, slug)) throw new Error(`Already a member of '${slug}'`);
13982
13982
  await svc.addMember(slug, userId, role, target.email ?? null);
@@ -13995,7 +13995,7 @@ function createTenantAdminRoutes() {
13995
13995
  const form = await c.req.formData();
13996
13996
  const role = String(form.get("role") ?? "");
13997
13997
  const redirectTo = String(form.get("_redirect") ?? "") || `/admin/tenants/users/${userId}`;
13998
- await new chunkSC2WZFNQ_cjs.TenantService(db).setMemberRole(slug, userId, role);
13998
+ await new chunkNOBU34HS_cjs.TenantService(db).setMemberRole(slug, userId, role);
13999
13999
  return c.redirect(`${redirectTo}?message=Role updated`);
14000
14000
  } catch (error) {
14001
14001
  const message = error instanceof Error ? error.message : "Failed to update role";
@@ -14010,7 +14010,7 @@ function createTenantAdminRoutes() {
14010
14010
  try {
14011
14011
  const form = await c.req.formData();
14012
14012
  const redirectTo = String(form.get("_redirect") ?? "") || `/admin/tenants/users/${userId}`;
14013
- await new chunkSC2WZFNQ_cjs.TenantService(db).removeMember(slug, userId);
14013
+ await new chunkNOBU34HS_cjs.TenantService(db).removeMember(slug, userId);
14014
14014
  return c.redirect(`${redirectTo}?message=Removed from ${encodeURIComponent(slug)}`);
14015
14015
  } catch (error) {
14016
14016
  const message = error instanceof Error ? error.message : "Failed to remove membership";
@@ -14025,7 +14025,7 @@ function createTenantAdminRoutes() {
14025
14025
  return c.html(renderTenantsInactive({ user: userShape(cur), version }));
14026
14026
  }
14027
14027
  const roleName = c.req.param("roleName");
14028
- const assignments = await new chunkSC2WZFNQ_cjs.TenantService(db).listAssignmentsByRole(roleName);
14028
+ const assignments = await new chunkNOBU34HS_cjs.TenantService(db).listAssignmentsByRole(roleName);
14029
14029
  return c.html(renderRoleUsage({ roleName, assignments, user: userShape(cur), version }));
14030
14030
  });
14031
14031
  routes2.get("/", async (c) => {
@@ -14035,7 +14035,7 @@ function createTenantAdminRoutes() {
14035
14035
  if (!await isMultiTenantActive(db)) {
14036
14036
  return c.html(renderTenantsInactive({ user: userShape(user), version }));
14037
14037
  }
14038
- const svc = new chunkSC2WZFNQ_cjs.TenantService(db);
14038
+ const svc = new chunkNOBU34HS_cjs.TenantService(db);
14039
14039
  await svc.ensureDefaultTenant();
14040
14040
  const tenants = await svc.listTenants();
14041
14041
  const [docRes, memberRes] = await db.batch([
@@ -14074,7 +14074,7 @@ function createTenantAdminRoutes() {
14074
14074
  formEntries = Object.fromEntries(form.entries());
14075
14075
  const validated = tenantFormSchema.parse(formEntries);
14076
14076
  if (!validated.slug) throw new zod.z.ZodError([{ code: "custom", message: "Slug is required", path: ["slug"] }]);
14077
- const svc = new chunkSC2WZFNQ_cjs.TenantService(db);
14077
+ const svc = new chunkNOBU34HS_cjs.TenantService(db);
14078
14078
  await svc.createTenant({
14079
14079
  name: validated.name,
14080
14080
  slug: validated.slug,
@@ -14099,7 +14099,7 @@ function createTenantAdminRoutes() {
14099
14099
  if (!await isMultiTenantActive(db)) {
14100
14100
  return c.html(renderTenantsInactive({ user: userShape(user), version }));
14101
14101
  }
14102
- const tenant = await new chunkSC2WZFNQ_cjs.TenantService(db).getTenantBySlug(c.req.param("slug"));
14102
+ const tenant = await new chunkNOBU34HS_cjs.TenantService(db).getTenantBySlug(c.req.param("slug"));
14103
14103
  if (!tenant) return c.redirect("/admin/tenants?message=Tenant not found&type=error");
14104
14104
  return c.html(renderTenantForm({ tenant, isEdit: true, user: userShape(user), version }));
14105
14105
  });
@@ -14109,7 +14109,7 @@ function createTenantAdminRoutes() {
14109
14109
  const version = c.get("appVersion");
14110
14110
  const slug = c.req.param("slug");
14111
14111
  if (!await isMultiTenantActive(db)) return c.json({ error: "Multi-tenant plugin is not active" }, 403);
14112
- const svc = new chunkSC2WZFNQ_cjs.TenantService(db);
14112
+ const svc = new chunkNOBU34HS_cjs.TenantService(db);
14113
14113
  try {
14114
14114
  const form = await c.req.formData();
14115
14115
  const validated = tenantFormSchema.parse(Object.fromEntries(form.entries()));
@@ -14134,7 +14134,7 @@ function createTenantAdminRoutes() {
14134
14134
  const slug = c.req.param("slug");
14135
14135
  if (!await isMultiTenantActive(db)) return c.json({ error: "Multi-tenant plugin is not active" }, 403);
14136
14136
  try {
14137
- await new chunkSC2WZFNQ_cjs.TenantService(db).deleteTenant(slug);
14137
+ await new chunkNOBU34HS_cjs.TenantService(db).deleteTenant(slug);
14138
14138
  return c.redirect("/admin/tenants?message=Tenant deleted successfully");
14139
14139
  } catch (error) {
14140
14140
  const message = error instanceof Error ? error.message : "Failed to delete tenant";
@@ -14149,7 +14149,7 @@ function createTenantAdminRoutes() {
14149
14149
  return c.html(renderTenantsInactive({ user: userShape(user), version }));
14150
14150
  }
14151
14151
  const slug = c.req.param("slug");
14152
- const svc = new chunkSC2WZFNQ_cjs.TenantService(db);
14152
+ const svc = new chunkNOBU34HS_cjs.TenantService(db);
14153
14153
  const tenant = await svc.getTenantBySlug(slug);
14154
14154
  if (!tenant) return c.redirect("/admin/tenants?message=Tenant not found&type=error");
14155
14155
  const [members, invitations] = await Promise.all([svc.listMembers(slug), svc.listInvitations(slug)]);
@@ -14175,7 +14175,7 @@ function createTenantAdminRoutes() {
14175
14175
  const form = await c.req.formData();
14176
14176
  const email = String(form.get("email") ?? "");
14177
14177
  const role = String(form.get("role") ?? "viewer");
14178
- await new chunkSC2WZFNQ_cjs.TenantService(db).addMemberByEmail(slug, email, role);
14178
+ await new chunkNOBU34HS_cjs.TenantService(db).addMemberByEmail(slug, email, role);
14179
14179
  return c.redirect(`/admin/tenants/${slug}/members?message=Member added`);
14180
14180
  } catch (error) {
14181
14181
  const message = error instanceof Error ? error.message : "Failed to add member";
@@ -14190,7 +14190,7 @@ function createTenantAdminRoutes() {
14190
14190
  try {
14191
14191
  const form = await c.req.formData();
14192
14192
  const role = String(form.get("role") ?? "");
14193
- await new chunkSC2WZFNQ_cjs.TenantService(db).setMemberRole(slug, userId, role);
14193
+ await new chunkNOBU34HS_cjs.TenantService(db).setMemberRole(slug, userId, role);
14194
14194
  return c.redirect(`/admin/tenants/${slug}/members?message=Role updated`);
14195
14195
  } catch (error) {
14196
14196
  const message = error instanceof Error ? error.message : "Failed to update role";
@@ -14203,7 +14203,7 @@ function createTenantAdminRoutes() {
14203
14203
  const userId = c.req.param("userId");
14204
14204
  if (!await isMultiTenantActive(db)) return c.json({ error: "Multi-tenant plugin is not active" }, 403);
14205
14205
  try {
14206
- await new chunkSC2WZFNQ_cjs.TenantService(db).removeMember(slug, userId);
14206
+ await new chunkNOBU34HS_cjs.TenantService(db).removeMember(slug, userId);
14207
14207
  return c.redirect(`/admin/tenants/${slug}/members?message=Member removed`);
14208
14208
  } catch (error) {
14209
14209
  const message = error instanceof Error ? error.message : "Failed to remove member";
@@ -14219,12 +14219,12 @@ function createTenantAdminRoutes() {
14219
14219
  const form = await c.req.formData();
14220
14220
  const email = String(form.get("email") ?? "");
14221
14221
  const role = String(form.get("role") ?? "viewer");
14222
- const token = await new chunkSC2WZFNQ_cjs.TenantService(db).createInvitation(slug, email, role, user?.userId ?? null);
14222
+ const token = await new chunkNOBU34HS_cjs.TenantService(db).createInvitation(slug, email, role, user?.userId ?? null);
14223
14223
  const origin = c.req.header("origin") || new URL(c.req.url).origin;
14224
14224
  const acceptUrl = `${origin}/join/invite?token=${encodeURIComponent(token)}`;
14225
14225
  let note;
14226
14226
  let noteType = "";
14227
- const svc2 = chunkSC2WZFNQ_cjs.hasEmailService() ? chunkSC2WZFNQ_cjs.getEmailService() : null;
14227
+ const svc2 = chunkNOBU34HS_cjs.hasEmailService() ? chunkNOBU34HS_cjs.getEmailService() : null;
14228
14228
  const hasRealProvider = !!svc2 && svc2.getProviderName() !== "console";
14229
14229
  if (hasRealProvider) {
14230
14230
  const result = await svc2.send({
@@ -14265,7 +14265,7 @@ function createTenantAdminRoutes() {
14265
14265
  WHERE i.id = ? AND t.slug = ? AND i.status = 'pending'`
14266
14266
  ).bind(id, slug).first();
14267
14267
  if (!inv) throw new Error("Invitation not found or already used");
14268
- const svc2 = chunkSC2WZFNQ_cjs.hasEmailService() ? chunkSC2WZFNQ_cjs.getEmailService() : null;
14268
+ const svc2 = chunkNOBU34HS_cjs.hasEmailService() ? chunkNOBU34HS_cjs.getEmailService() : null;
14269
14269
  const hasRealProvider = !!svc2 && svc2.getProviderName() !== "console";
14270
14270
  if (!hasRealProvider) throw new Error("No email plugin active");
14271
14271
  const origin = c.req.header("origin") || new URL(c.req.url).origin;
@@ -14290,7 +14290,7 @@ function createTenantAdminRoutes() {
14290
14290
  const id = c.req.param("id");
14291
14291
  if (!await isMultiTenantActive(db)) return c.json({ error: "Multi-tenant plugin is not active" }, 403);
14292
14292
  try {
14293
- await new chunkSC2WZFNQ_cjs.TenantService(db).revokeInvitation(slug, id);
14293
+ await new chunkNOBU34HS_cjs.TenantService(db).revokeInvitation(slug, id);
14294
14294
  return c.redirect(`/admin/tenants/${slug}/members?message=Invitation revoked`);
14295
14295
  } catch (error) {
14296
14296
  const message = error instanceof Error ? error.message : "Failed to revoke invitation";
@@ -14520,7 +14520,7 @@ function createJoinRoutes() {
14520
14520
  if (existing) return rerender("An account with this email already exists. Please sign in instead.");
14521
14521
  try {
14522
14522
  const userId = crypto.randomUUID();
14523
- const passwordHash = await chunkKMM45BTY_cjs.AuthManager.hashPassword(password);
14523
+ const passwordHash = await chunkZHQP75SR_cjs.AuthManager.hashPassword(password);
14524
14524
  const now = Date.now();
14525
14525
  const nowSec = Math.floor(now / 1e3);
14526
14526
  await db.batch([
@@ -14533,7 +14533,7 @@ function createJoinRoutes() {
14533
14533
  VALUES (?, ?, ?, 'credential', ?, ?, ?)`
14534
14534
  ).bind(`cred-${userId}`, userId, userId, passwordHash, nowSec, nowSec)
14535
14535
  ]);
14536
- await new chunkSC2WZFNQ_cjs.TenantService(db).acceptInvitation(token, userId, inv.email);
14536
+ await new chunkNOBU34HS_cjs.TenantService(db).acceptInvitation(token, userId, inv.email);
14537
14537
  const auth = chunkKMCLNO4K_cjs.createAuth(c.env);
14538
14538
  const origin = new URL(c.req.url).origin;
14539
14539
  const baReq = new Request(`${origin}/auth/sign-in/email`, {
@@ -14601,7 +14601,7 @@ function createJoinRoutes() {
14601
14601
  const baBody = await baRes.json();
14602
14602
  const userId = baBody?.user?.id;
14603
14603
  if (!userId) return rerender("Sign-in succeeded but could not read user ID.");
14604
- await new chunkSC2WZFNQ_cjs.TenantService(db).acceptInvitation(token, userId, inv.email);
14604
+ await new chunkNOBU34HS_cjs.TenantService(db).acceptInvitation(token, userId, inv.email);
14605
14605
  const headers = new Headers({ Location: "/admin?message=Welcome! You have joined " + encodeURIComponent(inv.tenantName) });
14606
14606
  copyBaCookies(baRes, headers);
14607
14607
  return new Response(null, { status: 302, headers });
@@ -14615,7 +14615,7 @@ function createJoinRoutes() {
14615
14615
 
14616
14616
  // src/plugins/core-plugins/multi-tenant-plugin/index.ts
14617
14617
  var TENANT_ICON = `<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m3-6H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21"/></svg>`;
14618
- var multiTenantPlugin = chunkKOXFYFOF_cjs.definePlugin({
14618
+ var multiTenantPlugin = chunk3RNDJAZ5_cjs.definePlugin({
14619
14619
  id: manifest_default2.id,
14620
14620
  version: "1.0.0",
14621
14621
  name: manifest_default2.name,
@@ -14630,30 +14630,30 @@ var multiTenantPlugin = chunkKOXFYFOF_cjs.definePlugin({
14630
14630
  { label: "Tenants", path: "/admin/tenants", icon: TENANT_ICON, order: 80 }
14631
14631
  ],
14632
14632
  activate: async () => {
14633
- chunkKZIBF2EV_cjs.invalidateTenantCache();
14633
+ chunkC3KSTUEA_cjs.invalidateTenantCache();
14634
14634
  console.info("\u2705 Multi-Tenant plugin activated");
14635
14635
  },
14636
14636
  deactivate: async () => {
14637
- chunkKZIBF2EV_cjs.invalidateTenantCache();
14637
+ chunkC3KSTUEA_cjs.invalidateTenantCache();
14638
14638
  console.info("\u274C Multi-Tenant plugin deactivated");
14639
14639
  }
14640
14640
  });
14641
14641
  var routes = new hono.Hono();
14642
- routes.use("*", chunkKMM45BTY_cjs.requireAuth());
14643
- routes.use("*", chunkKMM45BTY_cjs.requireRole(["admin", "editor"]));
14642
+ routes.use("*", chunkZHQP75SR_cjs.requireAuth());
14643
+ routes.use("*", chunkZHQP75SR_cjs.requireRole(["admin", "editor"]));
14644
14644
  routes.get("/:rootId", async (c) => {
14645
14645
  const { rootId } = c.req.param();
14646
14646
  const db = c.env.DB;
14647
- const scope = await chunkSC2WZFNQ_cjs.resolveDocScope(c, db, { rootId });
14647
+ const scope = await chunkNOBU34HS_cjs.resolveDocScope(c, db, { rootId });
14648
14648
  if (!scope) {
14649
14649
  return c.html('<p class="text-zinc-500 dark:text-zinc-400 p-4">Document not found.</p>', 404);
14650
14650
  }
14651
14651
  if (!scope.docType?.settings?.versioning) {
14652
14652
  return c.html('<p class="text-zinc-500 dark:text-zinc-400 p-4">Versioning not enabled for this type.</p>', 404);
14653
14653
  }
14654
- const denied = await chunkSC2WZFNQ_cjs.denyIfNotAllowed(c, db, rootId, "read", scope.docType?.settings, scope.tenantId);
14654
+ const denied = await chunkNOBU34HS_cjs.denyIfNotAllowed(c, db, rootId, "read", scope.docType?.settings, scope.tenantId);
14655
14655
  if (denied) return denied;
14656
- const repo = new chunkSC2WZFNQ_cjs.DocumentRepository(db, scope.tenantId);
14656
+ const repo = new chunkNOBU34HS_cjs.DocumentRepository(db, scope.tenantId);
14657
14657
  const versions = await repo.getVersionHistory(rootId);
14658
14658
  const safeRootIdAttr = chunkMNWKYY5E_cjs.escapeHtml(rootId);
14659
14659
  const rows = versions.map((v) => {
@@ -14746,14 +14746,14 @@ routes.post("/:rootId/restore/:versionNumber", async (c) => {
14746
14746
  const { rootId, versionNumber } = c.req.param();
14747
14747
  const db = c.env.DB;
14748
14748
  const user = c.get("user");
14749
- const scope = await chunkSC2WZFNQ_cjs.resolveDocScope(c, db, { rootId });
14749
+ const scope = await chunkNOBU34HS_cjs.resolveDocScope(c, db, { rootId });
14750
14750
  if (!scope) {
14751
14751
  return c.json({ error: "Document not found" }, 404);
14752
14752
  }
14753
14753
  if (!scope.docType?.settings?.versioning) {
14754
14754
  return c.json({ error: "Versioning not enabled for this type" }, 404);
14755
14755
  }
14756
- const denied = await chunkSC2WZFNQ_cjs.denyIfNotAllowed(c, db, rootId, "update", scope.docType?.settings, scope.tenantId);
14756
+ const denied = await chunkNOBU34HS_cjs.denyIfNotAllowed(c, db, rootId, "update", scope.docType?.settings, scope.tenantId);
14757
14757
  if (denied) return denied;
14758
14758
  const row = await db.prepare("SELECT * FROM documents WHERE root_id = ? AND tenant_id = ? AND version_number = ? LIMIT 1").bind(rootId, scope.tenantId, Number(versionNumber)).first();
14759
14759
  if (!row) {
@@ -14776,7 +14776,7 @@ routes.post("/:rootId/restore/:versionNumber", async (c) => {
14776
14776
  var routes_default = routes;
14777
14777
 
14778
14778
  // src/plugins/core-plugins/versioning-plugin/index.ts
14779
- var versioningPlugin = chunkKOXFYFOF_cjs.definePlugin({
14779
+ var versioningPlugin = chunk3RNDJAZ5_cjs.definePlugin({
14780
14780
  id: "versioning",
14781
14781
  version: "1.0.0",
14782
14782
  name: "Versioning",
@@ -14853,8 +14853,8 @@ function createMagicLinkAuthPlugin() {
14853
14853
  const baseUrl = new URL(c.req.url).origin;
14854
14854
  const magicLink = `${baseUrl}/auth/magic-link/verify?token=${token}`;
14855
14855
  try {
14856
- if (chunkSC2WZFNQ_cjs.hasEmailService()) {
14857
- await chunkSC2WZFNQ_cjs.getEmailService().send({
14856
+ if (chunkNOBU34HS_cjs.hasEmailService()) {
14857
+ await chunkNOBU34HS_cjs.getEmailService().send({
14858
14858
  to: normalizedEmail,
14859
14859
  subject: "Your Magic Link to Sign In",
14860
14860
  flow: "magic-link",
@@ -14931,19 +14931,19 @@ function createMagicLinkAuthPlugin() {
14931
14931
  SET used = 1, used_at = ?
14932
14932
  WHERE id = ?
14933
14933
  `).bind(Date.now(), magicLink.id).run();
14934
- const tokenTtl = await chunkKMM45BTY_cjs.getJwtExpirySecondsFromDb(c.env.DB, c.env);
14935
- const jwtToken = await chunkKMM45BTY_cjs.AuthManager.generateToken(
14934
+ const tokenTtl = await chunkZHQP75SR_cjs.getJwtExpirySecondsFromDb(c.env.DB, c.env);
14935
+ const jwtToken = await chunkZHQP75SR_cjs.AuthManager.generateToken(
14936
14936
  user.id,
14937
14937
  user.email,
14938
14938
  user.role,
14939
14939
  c.env.JWT_SECRET,
14940
14940
  tokenTtl
14941
14941
  );
14942
- chunkKMM45BTY_cjs.AuthManager.setAuthCookie(c, jwtToken, { maxAge: tokenTtl });
14942
+ chunkZHQP75SR_cjs.AuthManager.setAuthCookie(c, jwtToken, { maxAge: tokenTtl });
14943
14943
  await db.prepare(`
14944
14944
  UPDATE auth_user SET last_login_at = ? WHERE id = ?
14945
14945
  `).bind(Date.now(), user.id).run();
14946
- chunkSC2WZFNQ_cjs.dispatchHookEvent(
14946
+ chunkNOBU34HS_cjs.dispatchHookEvent(
14947
14947
  c,
14948
14948
  "auth:magic-link:consumed",
14949
14949
  { user: { id: user.id, email: user.email, role: user.role } },
@@ -15428,7 +15428,7 @@ async function warmCollections(db) {
15428
15428
  const collectionCache = chunkYA3TJ65D_cjs.getCacheService(config);
15429
15429
  let count = 0;
15430
15430
  try {
15431
- const results = chunkKZIBF2EV_cjs.getCollectionRegistry().listActive().map(chunkKZIBF2EV_cjs.collectionRecordToRow);
15431
+ const results = chunkC3KSTUEA_cjs.getCollectionRegistry().listActive().map(chunkC3KSTUEA_cjs.collectionRecordToRow);
15432
15432
  for (const collection of results) {
15433
15433
  const key = collectionCache.generateKey("item", collection.id);
15434
15434
  await collectionCache.set(key, collection);
@@ -15699,7 +15699,7 @@ function renderCacheDashboard(data) {
15699
15699
  </script>
15700
15700
 
15701
15701
  <!-- Confirmation Dialogs -->
15702
- ${chunkSC2WZFNQ_cjs.renderConfirmationDialog({
15702
+ ${chunkNOBU34HS_cjs.renderConfirmationDialog({
15703
15703
  id: "clear-all-cache-confirm",
15704
15704
  title: "Clear All Cache",
15705
15705
  message: "Are you sure you want to clear all cache entries? This cannot be undone.",
@@ -15710,7 +15710,7 @@ function renderCacheDashboard(data) {
15710
15710
  onConfirm: "performClearAllCaches()"
15711
15711
  })}
15712
15712
 
15713
- ${chunkSC2WZFNQ_cjs.renderConfirmationDialog({
15713
+ ${chunkNOBU34HS_cjs.renderConfirmationDialog({
15714
15714
  id: "clear-namespace-cache-confirm",
15715
15715
  title: "Clear Namespace Cache",
15716
15716
  message: "Clear cache for this namespace?",
@@ -15721,7 +15721,7 @@ function renderCacheDashboard(data) {
15721
15721
  onConfirm: "performClearNamespaceCache()"
15722
15722
  })}
15723
15723
 
15724
- ${chunkSC2WZFNQ_cjs.getConfirmationDialogScript()}
15724
+ ${chunkNOBU34HS_cjs.getConfirmationDialogScript()}
15725
15725
  `;
15726
15726
  const layoutData = {
15727
15727
  title: "Cache System",
@@ -15987,7 +15987,7 @@ app.get("/", async (c) => {
15987
15987
  const totalRequests = totalHits + totalMisses;
15988
15988
  const overallHitRate = totalRequests > 0 ? totalHits / totalRequests * 100 : 0;
15989
15989
  const DEFAULT_TTL = chunkYA3TJ65D_cjs.CACHE_CONFIGS.api?.ttl ?? 300;
15990
- const collections = chunkKZIBF2EV_cjs.getCollectionRegistry().listActive().filter((r) => !r.internal).map((r) => {
15990
+ const collections = chunkC3KSTUEA_cjs.getCollectionRegistry().listActive().filter((r) => !r.internal).map((r) => {
15991
15991
  const cacheOverride = r.cache;
15992
15992
  const cacheEnabled = cacheOverride?.enabled !== false;
15993
15993
  const hasCustomTtl = typeof cacheOverride?.ttl === "number";
@@ -16524,9 +16524,9 @@ var faviconSvg = `<?xml version="1.0" encoding="UTF-8" standalone="no"?>
16524
16524
  // src/app.ts
16525
16525
  function createSonicJSApp(config = {}) {
16526
16526
  const app2 = new hono.Hono();
16527
- const appVersion = config.version || chunk3XFA3E2F_cjs.getCoreVersion();
16527
+ const appVersion = config.version || chunkKDRHGEUF_cjs.getCoreVersion();
16528
16528
  const appName = config.name || "SonicJS AI";
16529
- const hookSystem = new chunkLXYDJU6U_cjs.HookSystemImpl();
16529
+ const hookSystem = new chunkMJZI3NHR_cjs.HookSystemImpl();
16530
16530
  chunkJ6JTWD2A_cjs.setHookSystem(hookSystem);
16531
16531
  const magicLinkPlugin = createMagicLinkAuthPlugin();
16532
16532
  const corePluginsBeforeCatchAll = [
@@ -16534,7 +16534,7 @@ function createSonicJSApp(config = {}) {
16534
16534
  apiKeysPlugin,
16535
16535
  aiSearchPlugin,
16536
16536
  oauthProvidersPlugin,
16537
- chunkSC2WZFNQ_cjs.userProfilesPlugin,
16537
+ chunkNOBU34HS_cjs.userProfilesPlugin,
16538
16538
  otpLoginPlugin,
16539
16539
  analyticsPlugin,
16540
16540
  stripePlugin,
@@ -16544,23 +16544,23 @@ function createSonicJSApp(config = {}) {
16544
16544
  shortcodesPlugin,
16545
16545
  helloWorldPlugin,
16546
16546
  multiTenantPlugin,
16547
- chunkSC2WZFNQ_cjs.lexicalEditorPlugin,
16547
+ chunkNOBU34HS_cjs.lexicalEditorPlugin,
16548
16548
  versioningPlugin
16549
16549
  ];
16550
16550
  const corePluginsAfterCatchAll = [emailPluginV3, magicLinkPlugin, emailReconciliationPlugin];
16551
- const wirePlugins = chunkLXYDJU6U_cjs.createPluginWirer(
16551
+ const wirePlugins = chunkMJZI3NHR_cjs.createPluginWirer(
16552
16552
  () => [...corePluginsBeforeCatchAll, ...corePluginsAfterCatchAll, ...config.plugins?.register ?? []],
16553
16553
  // The capability-gated `ctx.cap.email` resolves to the app EmailService, which
16554
16554
  // is initialized (below) just before wiring on the first request.
16555
16555
  () => ({
16556
16556
  hooks: hookSystem,
16557
16557
  env: firstRequestEnv,
16558
- providers: { email: () => chunkSC2WZFNQ_cjs.getEmailService() }
16558
+ providers: { email: () => chunkNOBU34HS_cjs.getEmailService() }
16559
16559
  })
16560
16560
  );
16561
16561
  let firstRequestEnv;
16562
16562
  const initEmailService = async (env = {}) => {
16563
- if (chunkSC2WZFNQ_cjs.hasEmailService()) return;
16563
+ if (chunkNOBU34HS_cjs.hasEmailService()) return;
16564
16564
  let provider;
16565
16565
  let defaultFrom = config.email?.from;
16566
16566
  let defaultReplyTo;
@@ -16595,14 +16595,14 @@ function createSonicJSApp(config = {}) {
16595
16595
  }
16596
16596
  }
16597
16597
  defaultFrom = defaultFrom || env.DEFAULT_FROM_EMAIL || "noreply@sonicjs.local";
16598
- chunkSC2WZFNQ_cjs.setEmailService(new EmailService({ provider, defaultFrom, defaultReplyTo, db: env.DB }));
16598
+ chunkNOBU34HS_cjs.setEmailService(new EmailService({ provider, defaultFrom, defaultReplyTo, db: env.DB }));
16599
16599
  };
16600
16600
  app2.use("*", async (c, next) => {
16601
16601
  c.set("appVersion", appVersion);
16602
16602
  await next();
16603
16603
  });
16604
- app2.use("*", chunkKMM45BTY_cjs.metricsMiddleware());
16605
- app2.use("*", chunkKMM45BTY_cjs.bootstrapMiddleware(config));
16604
+ app2.use("*", chunkZHQP75SR_cjs.metricsMiddleware());
16605
+ app2.use("*", chunkZHQP75SR_cjs.bootstrapMiddleware(config));
16606
16606
  const boot = async (env) => {
16607
16607
  if (config.plugins?.disableAll) return;
16608
16608
  firstRequestEnv = env;
@@ -16640,8 +16640,8 @@ function createSonicJSApp(config = {}) {
16640
16640
  allowHeaders: ["Content-Type", "Authorization", "X-API-Key"],
16641
16641
  credentials: true
16642
16642
  }));
16643
- app2.use("*", chunkKMM45BTY_cjs.securityHeadersMiddleware());
16644
- app2.use("*", chunkKMM45BTY_cjs.csrfProtection());
16643
+ app2.use("*", chunkZHQP75SR_cjs.securityHeadersMiddleware());
16644
+ app2.use("*", chunkZHQP75SR_cjs.csrfProtection());
16645
16645
  app2.use("*", async (c, next) => {
16646
16646
  try {
16647
16647
  const reqUrl = new URL(c.req.url);
@@ -16679,9 +16679,9 @@ function createSonicJSApp(config = {}) {
16679
16679
  app2.use("*", middleware);
16680
16680
  }
16681
16681
  }
16682
- app2.use("*", chunkKZIBF2EV_cjs.tenantMiddleware());
16683
- app2.use("/admin/*", chunkKMM45BTY_cjs.requireAuth());
16684
- app2.use("/admin/*", chunkKMM45BTY_cjs.requireRbac("portal", "access"));
16682
+ app2.use("*", chunkC3KSTUEA_cjs.tenantMiddleware());
16683
+ app2.use("/admin/*", chunkZHQP75SR_cjs.requireAuth());
16684
+ app2.use("/admin/*", chunkZHQP75SR_cjs.requireRbac("portal", "access"));
16685
16685
  app2.use("/admin/*", pluginMenuMiddleware());
16686
16686
  const NAV_LANDING = [
16687
16687
  { path: "/admin/content", perm: "content:read" },
@@ -16727,43 +16727,43 @@ function createSonicJSApp(config = {}) {
16727
16727
  });
16728
16728
  app2.route("/api/security-audit", apiRoutes2);
16729
16729
  app2.route("/admin/plugins/security-audit", adminRoutes3);
16730
- app2.route("/api/media", chunkSC2WZFNQ_cjs.api_media_default);
16731
- app2.route("/api/system", chunkSC2WZFNQ_cjs.api_system_default);
16732
- app2.route("/api/documents", chunkSC2WZFNQ_cjs.apiDocumentsRoutes);
16733
- app2.route("/api", chunkSC2WZFNQ_cjs.api_default);
16734
- app2.route("/admin/documents", chunkSC2WZFNQ_cjs.adminDocumentsRoutes);
16735
- chunkLXYDJU6U_cjs.registerPluginRoutes(app2, [formsPlugin], { source: "core" });
16736
- app2.route("/admin/api", chunkSC2WZFNQ_cjs.admin_api_default);
16737
- app2.route("/admin/collections", chunkSC2WZFNQ_cjs.adminCollectionsRoutes);
16738
- app2.route("/admin/settings", chunkSC2WZFNQ_cjs.adminSettingsRoutes);
16739
- app2.route("/admin/api-reference", chunkSC2WZFNQ_cjs.router2);
16730
+ app2.route("/api/media", chunkNOBU34HS_cjs.api_media_default);
16731
+ app2.route("/api/system", chunkNOBU34HS_cjs.api_system_default);
16732
+ app2.route("/api/documents", chunkNOBU34HS_cjs.apiDocumentsRoutes);
16733
+ app2.route("/api", chunkNOBU34HS_cjs.api_default);
16734
+ app2.route("/admin/documents", chunkNOBU34HS_cjs.adminDocumentsRoutes);
16735
+ chunkMJZI3NHR_cjs.registerPluginRoutes(app2, [formsPlugin], { source: "core" });
16736
+ app2.route("/admin/api", chunkNOBU34HS_cjs.admin_api_default);
16737
+ app2.route("/admin/collections", chunkNOBU34HS_cjs.adminCollectionsRoutes);
16738
+ app2.route("/admin/settings", chunkNOBU34HS_cjs.adminSettingsRoutes);
16739
+ app2.route("/admin/api-reference", chunkNOBU34HS_cjs.router2);
16740
16740
  app2.route("/admin/database-tools", createDatabaseToolsAdminRoutes());
16741
- app2.route("/admin/content", chunkSC2WZFNQ_cjs.admin_content_default);
16742
- app2.route("/admin/media", chunkSC2WZFNQ_cjs.adminMediaRoutes);
16741
+ app2.route("/admin/content", chunkNOBU34HS_cjs.admin_content_default);
16742
+ app2.route("/admin/media", chunkNOBU34HS_cjs.adminMediaRoutes);
16743
16743
  app2.use("/auth/*", securityAuditMiddleware());
16744
16744
  if (!config.plugins?.disableAll) {
16745
- chunkLXYDJU6U_cjs.registerPluginRoutes(app2, corePluginsBeforeCatchAll, { source: "core" });
16745
+ chunkMJZI3NHR_cjs.registerPluginRoutes(app2, corePluginsBeforeCatchAll, { source: "core" });
16746
16746
  app2.route("/admin/cache", cache_default.getRoutes());
16747
16747
  if (config.plugins?.register && config.plugins.register.length > 0) {
16748
- chunkLXYDJU6U_cjs.registerPluginRoutes(app2, config.plugins.register, { source: "user" });
16748
+ chunkMJZI3NHR_cjs.registerPluginRoutes(app2, config.plugins.register, { source: "user" });
16749
16749
  }
16750
16750
  }
16751
16751
  app2.route("/api/events", apiRoutes4);
16752
- app2.route("/admin/dashboard", chunkSC2WZFNQ_cjs.router);
16753
- app2.route("/admin/plugins", chunkSC2WZFNQ_cjs.adminPluginRoutes);
16754
- app2.route("/admin/logs", chunkSC2WZFNQ_cjs.adminLogsRoutes);
16752
+ app2.route("/admin/dashboard", chunkNOBU34HS_cjs.router);
16753
+ app2.route("/admin/plugins", chunkNOBU34HS_cjs.adminPluginRoutes);
16754
+ app2.route("/admin/logs", chunkNOBU34HS_cjs.adminLogsRoutes);
16755
16755
  app2.route("/admin/rbac", adminRbacRoutes);
16756
- app2.route("/admin", chunkSC2WZFNQ_cjs.userRoutes);
16757
- app2.route("/auth", chunkSC2WZFNQ_cjs.auth_default);
16756
+ app2.route("/admin", chunkNOBU34HS_cjs.userRoutes);
16757
+ app2.route("/auth", chunkNOBU34HS_cjs.auth_default);
16758
16758
  app2.on(["GET", "POST"], "/auth/*", (c) => {
16759
16759
  const reqUrl = new URL(c.req.url);
16760
16760
  const requestBaseURL = `${reqUrl.protocol}//${reqUrl.host}`;
16761
16761
  const auth = chunkKMCLNO4K_cjs.createAuth(c.env, config.auth?.extendBetterAuth, requestBaseURL);
16762
16762
  return auth.handler(c.req.raw);
16763
16763
  });
16764
- app2.route("/", chunkSC2WZFNQ_cjs.test_cleanup_default);
16764
+ app2.route("/", chunkNOBU34HS_cjs.test_cleanup_default);
16765
16765
  if (!config.plugins?.disableAll) {
16766
- chunkLXYDJU6U_cjs.registerPluginRoutes(app2, corePluginsAfterCatchAll, { source: "core" });
16766
+ chunkMJZI3NHR_cjs.registerPluginRoutes(app2, corePluginsAfterCatchAll, { source: "core" });
16767
16767
  }
16768
16768
  if (!config.plugins?.disableAll) {
16769
16769
  const allMountedPlugins = [
@@ -16773,10 +16773,10 @@ function createSonicJSApp(config = {}) {
16773
16773
  ...config.plugins?.register ?? []
16774
16774
  ];
16775
16775
  const userPlugins = (config.plugins?.register ?? []).filter(
16776
- (p) => !chunkKZIBF2EV_cjs.PLUGIN_REGISTRY[p.id]
16776
+ (p) => !chunkC3KSTUEA_cjs.PLUGIN_REGISTRY[p.id]
16777
16777
  );
16778
- chunkLXYDJU6U_cjs.setPluginMenu(userPlugins.flatMap((p) => p.menu ?? []));
16779
- chunkKOXFYFOF_cjs.setPluginDefinitions(allMountedPlugins);
16778
+ chunkMJZI3NHR_cjs.setPluginMenu(userPlugins.flatMap((p) => p.menu ?? []));
16779
+ chunk3RNDJAZ5_cjs.setPluginDefinitions(allMountedPlugins);
16780
16780
  }
16781
16781
  app2.get("/favicon.svg", (c) => {
16782
16782
  return new Response(faviconSvg, {
@@ -20268,7 +20268,7 @@ function createRedirectApiRoutes() {
20268
20268
  });
20269
20269
  return api;
20270
20270
  }
20271
- var redirectPlugin = chunkKOXFYFOF_cjs.definePlugin({
20271
+ var redirectPlugin = chunk3RNDJAZ5_cjs.definePlugin({
20272
20272
  id: manifest_default3.id,
20273
20273
  version: manifest_default3.version,
20274
20274
  name: manifest_default3.name,
@@ -20286,7 +20286,7 @@ var redirectPlugin = chunkKOXFYFOF_cjs.definePlugin({
20286
20286
  async onBoot(ctx) {
20287
20287
  const db = ctx.env?.DB;
20288
20288
  if (!db) return;
20289
- const registry = new chunkKMM45BTY_cjs.DocumentTypeRegistry(db);
20289
+ const registry = new chunkZHQP75SR_cjs.DocumentTypeRegistry(db);
20290
20290
  await registry.register({
20291
20291
  id: "redirect",
20292
20292
  name: "redirect",
@@ -20402,91 +20402,91 @@ function createDb(d1$1) {
20402
20402
  }
20403
20403
 
20404
20404
  // src/index.ts
20405
- var VERSION = chunk3XFA3E2F_cjs.package_default.version;
20405
+ var VERSION = chunkKDRHGEUF_cjs.package_default.version;
20406
20406
 
20407
20407
  Object.defineProperty(exports, "DocumentRepository", {
20408
20408
  enumerable: true,
20409
- get: function () { return chunkSC2WZFNQ_cjs.DocumentRepository; }
20409
+ get: function () { return chunkNOBU34HS_cjs.DocumentRepository; }
20410
20410
  });
20411
20411
  Object.defineProperty(exports, "ROUTES_INFO", {
20412
20412
  enumerable: true,
20413
- get: function () { return chunkSC2WZFNQ_cjs.ROUTES_INFO; }
20413
+ get: function () { return chunkNOBU34HS_cjs.ROUTES_INFO; }
20414
20414
  });
20415
20415
  Object.defineProperty(exports, "adminApiRoutes", {
20416
20416
  enumerable: true,
20417
- get: function () { return chunkSC2WZFNQ_cjs.admin_api_default; }
20417
+ get: function () { return chunkNOBU34HS_cjs.admin_api_default; }
20418
20418
  });
20419
20419
  Object.defineProperty(exports, "adminCheckboxRoutes", {
20420
20420
  enumerable: true,
20421
- get: function () { return chunkSC2WZFNQ_cjs.adminCheckboxRoutes; }
20421
+ get: function () { return chunkNOBU34HS_cjs.adminCheckboxRoutes; }
20422
20422
  });
20423
20423
  Object.defineProperty(exports, "adminCollectionsRoutes", {
20424
20424
  enumerable: true,
20425
- get: function () { return chunkSC2WZFNQ_cjs.adminCollectionsRoutes; }
20425
+ get: function () { return chunkNOBU34HS_cjs.adminCollectionsRoutes; }
20426
20426
  });
20427
20427
  Object.defineProperty(exports, "adminContentRoutes", {
20428
20428
  enumerable: true,
20429
- get: function () { return chunkSC2WZFNQ_cjs.admin_content_default; }
20429
+ get: function () { return chunkNOBU34HS_cjs.admin_content_default; }
20430
20430
  });
20431
20431
  Object.defineProperty(exports, "adminDashboardRoutes", {
20432
20432
  enumerable: true,
20433
- get: function () { return chunkSC2WZFNQ_cjs.router; }
20433
+ get: function () { return chunkNOBU34HS_cjs.router; }
20434
20434
  });
20435
20435
  Object.defineProperty(exports, "adminLogsRoutes", {
20436
20436
  enumerable: true,
20437
- get: function () { return chunkSC2WZFNQ_cjs.adminLogsRoutes; }
20437
+ get: function () { return chunkNOBU34HS_cjs.adminLogsRoutes; }
20438
20438
  });
20439
20439
  Object.defineProperty(exports, "adminMediaRoutes", {
20440
20440
  enumerable: true,
20441
- get: function () { return chunkSC2WZFNQ_cjs.adminMediaRoutes; }
20441
+ get: function () { return chunkNOBU34HS_cjs.adminMediaRoutes; }
20442
20442
  });
20443
20443
  Object.defineProperty(exports, "adminPluginRoutes", {
20444
20444
  enumerable: true,
20445
- get: function () { return chunkSC2WZFNQ_cjs.adminPluginRoutes; }
20445
+ get: function () { return chunkNOBU34HS_cjs.adminPluginRoutes; }
20446
20446
  });
20447
20447
  Object.defineProperty(exports, "adminSettingsRoutes", {
20448
20448
  enumerable: true,
20449
- get: function () { return chunkSC2WZFNQ_cjs.adminSettingsRoutes; }
20449
+ get: function () { return chunkNOBU34HS_cjs.adminSettingsRoutes; }
20450
20450
  });
20451
20451
  Object.defineProperty(exports, "adminUsersRoutes", {
20452
20452
  enumerable: true,
20453
- get: function () { return chunkSC2WZFNQ_cjs.userRoutes; }
20453
+ get: function () { return chunkNOBU34HS_cjs.userRoutes; }
20454
20454
  });
20455
20455
  Object.defineProperty(exports, "apiContentCrudRoutes", {
20456
20456
  enumerable: true,
20457
- get: function () { return chunkSC2WZFNQ_cjs.api_content_crud_default; }
20457
+ get: function () { return chunkNOBU34HS_cjs.api_content_crud_default; }
20458
20458
  });
20459
20459
  Object.defineProperty(exports, "apiMediaRoutes", {
20460
20460
  enumerable: true,
20461
- get: function () { return chunkSC2WZFNQ_cjs.api_media_default; }
20461
+ get: function () { return chunkNOBU34HS_cjs.api_media_default; }
20462
20462
  });
20463
20463
  Object.defineProperty(exports, "apiRoutes", {
20464
20464
  enumerable: true,
20465
- get: function () { return chunkSC2WZFNQ_cjs.api_default; }
20465
+ get: function () { return chunkNOBU34HS_cjs.api_default; }
20466
20466
  });
20467
20467
  Object.defineProperty(exports, "apiSystemRoutes", {
20468
20468
  enumerable: true,
20469
- get: function () { return chunkSC2WZFNQ_cjs.api_system_default; }
20469
+ get: function () { return chunkNOBU34HS_cjs.api_system_default; }
20470
20470
  });
20471
20471
  Object.defineProperty(exports, "authRoutes", {
20472
20472
  enumerable: true,
20473
- get: function () { return chunkSC2WZFNQ_cjs.auth_default; }
20473
+ get: function () { return chunkNOBU34HS_cjs.auth_default; }
20474
20474
  });
20475
20475
  Object.defineProperty(exports, "createUserProfilesPlugin", {
20476
20476
  enumerable: true,
20477
- get: function () { return chunkSC2WZFNQ_cjs.createUserProfilesPlugin; }
20477
+ get: function () { return chunkNOBU34HS_cjs.createUserProfilesPlugin; }
20478
20478
  });
20479
20479
  Object.defineProperty(exports, "defineUserProfile", {
20480
20480
  enumerable: true,
20481
- get: function () { return chunkSC2WZFNQ_cjs.defineUserProfile; }
20481
+ get: function () { return chunkNOBU34HS_cjs.defineUserProfile; }
20482
20482
  });
20483
20483
  Object.defineProperty(exports, "getUserProfileConfig", {
20484
20484
  enumerable: true,
20485
- get: function () { return chunkSC2WZFNQ_cjs.getUserProfileConfig; }
20485
+ get: function () { return chunkNOBU34HS_cjs.getUserProfileConfig; }
20486
20486
  });
20487
20487
  Object.defineProperty(exports, "userProfilesPlugin", {
20488
20488
  enumerable: true,
20489
- get: function () { return chunkSC2WZFNQ_cjs.userProfilesPlugin; }
20489
+ get: function () { return chunkNOBU34HS_cjs.userProfilesPlugin; }
20490
20490
  });
20491
20491
  Object.defineProperty(exports, "Logger", {
20492
20492
  enumerable: true,
@@ -20642,87 +20642,87 @@ Object.defineProperty(exports, "workflowHistory", {
20642
20642
  });
20643
20643
  Object.defineProperty(exports, "AuthManager", {
20644
20644
  enumerable: true,
20645
- get: function () { return chunkKMM45BTY_cjs.AuthManager; }
20645
+ get: function () { return chunkZHQP75SR_cjs.AuthManager; }
20646
20646
  });
20647
20647
  Object.defineProperty(exports, "PermissionManager", {
20648
20648
  enumerable: true,
20649
- get: function () { return chunkKMM45BTY_cjs.PermissionManager; }
20649
+ get: function () { return chunkZHQP75SR_cjs.PermissionManager; }
20650
20650
  });
20651
20651
  Object.defineProperty(exports, "bootstrapDocumentTypes", {
20652
20652
  enumerable: true,
20653
- get: function () { return chunkKMM45BTY_cjs.bootstrapDocumentTypes; }
20653
+ get: function () { return chunkZHQP75SR_cjs.bootstrapDocumentTypes; }
20654
20654
  });
20655
20655
  Object.defineProperty(exports, "bootstrapMiddleware", {
20656
20656
  enumerable: true,
20657
- get: function () { return chunkKMM45BTY_cjs.bootstrapMiddleware; }
20657
+ get: function () { return chunkZHQP75SR_cjs.bootstrapMiddleware; }
20658
20658
  });
20659
20659
  Object.defineProperty(exports, "cacheHeaders", {
20660
20660
  enumerable: true,
20661
- get: function () { return chunkKMM45BTY_cjs.cacheHeaders; }
20661
+ get: function () { return chunkZHQP75SR_cjs.cacheHeaders; }
20662
20662
  });
20663
20663
  Object.defineProperty(exports, "compressionMiddleware", {
20664
20664
  enumerable: true,
20665
- get: function () { return chunkKMM45BTY_cjs.compressionMiddleware; }
20665
+ get: function () { return chunkZHQP75SR_cjs.compressionMiddleware; }
20666
20666
  });
20667
20667
  Object.defineProperty(exports, "detailedLoggingMiddleware", {
20668
20668
  enumerable: true,
20669
- get: function () { return chunkKMM45BTY_cjs.detailedLoggingMiddleware; }
20669
+ get: function () { return chunkZHQP75SR_cjs.detailedLoggingMiddleware; }
20670
20670
  });
20671
20671
  Object.defineProperty(exports, "getActivePlugins", {
20672
20672
  enumerable: true,
20673
- get: function () { return chunkKMM45BTY_cjs.getActivePlugins; }
20673
+ get: function () { return chunkZHQP75SR_cjs.getActivePlugins; }
20674
20674
  });
20675
20675
  Object.defineProperty(exports, "isPluginActive", {
20676
20676
  enumerable: true,
20677
- get: function () { return chunkKMM45BTY_cjs.isPluginActive; }
20677
+ get: function () { return chunkZHQP75SR_cjs.isPluginActive; }
20678
20678
  });
20679
20679
  Object.defineProperty(exports, "logActivity", {
20680
20680
  enumerable: true,
20681
- get: function () { return chunkKMM45BTY_cjs.logActivity; }
20681
+ get: function () { return chunkZHQP75SR_cjs.logActivity; }
20682
20682
  });
20683
20683
  Object.defineProperty(exports, "loggingMiddleware", {
20684
20684
  enumerable: true,
20685
- get: function () { return chunkKMM45BTY_cjs.loggingMiddleware; }
20685
+ get: function () { return chunkZHQP75SR_cjs.loggingMiddleware; }
20686
20686
  });
20687
20687
  Object.defineProperty(exports, "optionalAuth", {
20688
20688
  enumerable: true,
20689
- get: function () { return chunkKMM45BTY_cjs.optionalAuth; }
20689
+ get: function () { return chunkZHQP75SR_cjs.optionalAuth; }
20690
20690
  });
20691
20691
  Object.defineProperty(exports, "performanceLoggingMiddleware", {
20692
20692
  enumerable: true,
20693
- get: function () { return chunkKMM45BTY_cjs.performanceLoggingMiddleware; }
20693
+ get: function () { return chunkZHQP75SR_cjs.performanceLoggingMiddleware; }
20694
20694
  });
20695
20695
  Object.defineProperty(exports, "requireActivePlugin", {
20696
20696
  enumerable: true,
20697
- get: function () { return chunkKMM45BTY_cjs.requireActivePlugin; }
20697
+ get: function () { return chunkZHQP75SR_cjs.requireActivePlugin; }
20698
20698
  });
20699
20699
  Object.defineProperty(exports, "requireActivePlugins", {
20700
20700
  enumerable: true,
20701
- get: function () { return chunkKMM45BTY_cjs.requireActivePlugins; }
20701
+ get: function () { return chunkZHQP75SR_cjs.requireActivePlugins; }
20702
20702
  });
20703
20703
  Object.defineProperty(exports, "requireAnyPermission", {
20704
20704
  enumerable: true,
20705
- get: function () { return chunkKMM45BTY_cjs.requireAnyPermission; }
20705
+ get: function () { return chunkZHQP75SR_cjs.requireAnyPermission; }
20706
20706
  });
20707
20707
  Object.defineProperty(exports, "requireAuth", {
20708
20708
  enumerable: true,
20709
- get: function () { return chunkKMM45BTY_cjs.requireAuth; }
20709
+ get: function () { return chunkZHQP75SR_cjs.requireAuth; }
20710
20710
  });
20711
20711
  Object.defineProperty(exports, "requirePermission", {
20712
20712
  enumerable: true,
20713
- get: function () { return chunkKMM45BTY_cjs.requirePermission; }
20713
+ get: function () { return chunkZHQP75SR_cjs.requirePermission; }
20714
20714
  });
20715
20715
  Object.defineProperty(exports, "requireRole", {
20716
20716
  enumerable: true,
20717
- get: function () { return chunkKMM45BTY_cjs.requireRole; }
20717
+ get: function () { return chunkZHQP75SR_cjs.requireRole; }
20718
20718
  });
20719
20719
  Object.defineProperty(exports, "securityHeaders", {
20720
20720
  enumerable: true,
20721
- get: function () { return chunkKMM45BTY_cjs.securityHeadersMiddleware; }
20721
+ get: function () { return chunkZHQP75SR_cjs.securityHeadersMiddleware; }
20722
20722
  });
20723
20723
  Object.defineProperty(exports, "securityLoggingMiddleware", {
20724
20724
  enumerable: true,
20725
- get: function () { return chunkKMM45BTY_cjs.securityLoggingMiddleware; }
20725
+ get: function () { return chunkZHQP75SR_cjs.securityLoggingMiddleware; }
20726
20726
  });
20727
20727
  Object.defineProperty(exports, "DocumentsService", {
20728
20728
  enumerable: true,
@@ -20734,35 +20734,35 @@ Object.defineProperty(exports, "RbacService", {
20734
20734
  });
20735
20735
  Object.defineProperty(exports, "PluginBootstrapService", {
20736
20736
  enumerable: true,
20737
- get: function () { return chunkKZIBF2EV_cjs.PluginBootstrapService; }
20737
+ get: function () { return chunkC3KSTUEA_cjs.PluginBootstrapService; }
20738
20738
  });
20739
20739
  Object.defineProperty(exports, "PluginServiceClass", {
20740
20740
  enumerable: true,
20741
- get: function () { return chunkKZIBF2EV_cjs.PluginService; }
20741
+ get: function () { return chunkC3KSTUEA_cjs.PluginService; }
20742
20742
  });
20743
20743
  Object.defineProperty(exports, "getAvailableCollectionNames", {
20744
20744
  enumerable: true,
20745
- get: function () { return chunkKZIBF2EV_cjs.getAvailableCollectionNames; }
20745
+ get: function () { return chunkC3KSTUEA_cjs.getAvailableCollectionNames; }
20746
20746
  });
20747
20747
  Object.defineProperty(exports, "loadCollectionConfig", {
20748
20748
  enumerable: true,
20749
- get: function () { return chunkKZIBF2EV_cjs.loadCollectionConfig; }
20749
+ get: function () { return chunkC3KSTUEA_cjs.loadCollectionConfig; }
20750
20750
  });
20751
20751
  Object.defineProperty(exports, "loadCollectionConfigs", {
20752
20752
  enumerable: true,
20753
- get: function () { return chunkKZIBF2EV_cjs.loadCollectionConfigs; }
20753
+ get: function () { return chunkC3KSTUEA_cjs.loadCollectionConfigs; }
20754
20754
  });
20755
20755
  Object.defineProperty(exports, "registerCollections", {
20756
20756
  enumerable: true,
20757
- get: function () { return chunkKZIBF2EV_cjs.registerCollections; }
20757
+ get: function () { return chunkC3KSTUEA_cjs.registerCollections; }
20758
20758
  });
20759
20759
  Object.defineProperty(exports, "validateCollectionConfig", {
20760
20760
  enumerable: true,
20761
- get: function () { return chunkKZIBF2EV_cjs.validateCollectionConfig; }
20761
+ get: function () { return chunkC3KSTUEA_cjs.validateCollectionConfig; }
20762
20762
  });
20763
20763
  Object.defineProperty(exports, "MigrationService", {
20764
20764
  enumerable: true,
20765
- get: function () { return chunkIA24HACT_cjs.MigrationService; }
20765
+ get: function () { return chunk7YMMCIWY_cjs.MigrationService; }
20766
20766
  });
20767
20767
  Object.defineProperty(exports, "renderFilterBar", {
20768
20768
  enumerable: true,
@@ -20802,99 +20802,99 @@ Object.defineProperty(exports, "renderAdminLayoutCatalyst", {
20802
20802
  });
20803
20803
  Object.defineProperty(exports, "HookSystemImpl", {
20804
20804
  enumerable: true,
20805
- get: function () { return chunkLXYDJU6U_cjs.HookSystemImpl; }
20805
+ get: function () { return chunkMJZI3NHR_cjs.HookSystemImpl; }
20806
20806
  });
20807
20807
  Object.defineProperty(exports, "HookUtils", {
20808
20808
  enumerable: true,
20809
- get: function () { return chunkLXYDJU6U_cjs.HookUtils; }
20809
+ get: function () { return chunkMJZI3NHR_cjs.HookUtils; }
20810
20810
  });
20811
20811
  Object.defineProperty(exports, "PluginDependencyCycleError", {
20812
20812
  enumerable: true,
20813
- get: function () { return chunkLXYDJU6U_cjs.PluginDependencyCycleError; }
20813
+ get: function () { return chunkMJZI3NHR_cjs.PluginDependencyCycleError; }
20814
20814
  });
20815
20815
  Object.defineProperty(exports, "PluginManagerClass", {
20816
20816
  enumerable: true,
20817
- get: function () { return chunkLXYDJU6U_cjs.PluginManager; }
20817
+ get: function () { return chunkMJZI3NHR_cjs.PluginManager; }
20818
20818
  });
20819
20819
  Object.defineProperty(exports, "PluginRegistryImpl", {
20820
20820
  enumerable: true,
20821
- get: function () { return chunkLXYDJU6U_cjs.PluginRegistryImpl; }
20821
+ get: function () { return chunkMJZI3NHR_cjs.PluginRegistryImpl; }
20822
20822
  });
20823
20823
  Object.defineProperty(exports, "PluginValidatorClass", {
20824
20824
  enumerable: true,
20825
- get: function () { return chunkLXYDJU6U_cjs.PluginValidator; }
20825
+ get: function () { return chunkMJZI3NHR_cjs.PluginValidator; }
20826
20826
  });
20827
20827
  Object.defineProperty(exports, "RegisterPluginsError", {
20828
20828
  enumerable: true,
20829
- get: function () { return chunkLXYDJU6U_cjs.RegisterPluginsError; }
20829
+ get: function () { return chunkMJZI3NHR_cjs.RegisterPluginsError; }
20830
20830
  });
20831
20831
  Object.defineProperty(exports, "ScopedHookSystemClass", {
20832
20832
  enumerable: true,
20833
- get: function () { return chunkLXYDJU6U_cjs.ScopedHookSystem; }
20833
+ get: function () { return chunkMJZI3NHR_cjs.ScopedHookSystem; }
20834
20834
  });
20835
20835
  Object.defineProperty(exports, "collectCronSchedules", {
20836
20836
  enumerable: true,
20837
- get: function () { return chunkLXYDJU6U_cjs.collectCronSchedules; }
20837
+ get: function () { return chunkMJZI3NHR_cjs.collectCronSchedules; }
20838
20838
  });
20839
20839
  Object.defineProperty(exports, "collectCrons", {
20840
20840
  enumerable: true,
20841
- get: function () { return chunkLXYDJU6U_cjs.collectCrons; }
20841
+ get: function () { return chunkMJZI3NHR_cjs.collectCrons; }
20842
20842
  });
20843
20843
  Object.defineProperty(exports, "createScheduledHandler", {
20844
20844
  enumerable: true,
20845
- get: function () { return chunkLXYDJU6U_cjs.createScheduledHandler; }
20845
+ get: function () { return chunkMJZI3NHR_cjs.createScheduledHandler; }
20846
20846
  });
20847
20847
  Object.defineProperty(exports, "dispatchCronTick", {
20848
20848
  enumerable: true,
20849
- get: function () { return chunkLXYDJU6U_cjs.dispatchCronTick; }
20849
+ get: function () { return chunkMJZI3NHR_cjs.dispatchCronTick; }
20850
20850
  });
20851
20851
  Object.defineProperty(exports, "getPluginMenu", {
20852
20852
  enumerable: true,
20853
- get: function () { return chunkLXYDJU6U_cjs.getPluginMenu; }
20853
+ get: function () { return chunkMJZI3NHR_cjs.getPluginMenu; }
20854
20854
  });
20855
20855
  Object.defineProperty(exports, "registerPlugins", {
20856
20856
  enumerable: true,
20857
- get: function () { return chunkLXYDJU6U_cjs.registerPlugins; }
20857
+ get: function () { return chunkMJZI3NHR_cjs.registerPlugins; }
20858
20858
  });
20859
20859
  Object.defineProperty(exports, "resetPluginMenu", {
20860
20860
  enumerable: true,
20861
- get: function () { return chunkLXYDJU6U_cjs.resetPluginMenu; }
20861
+ get: function () { return chunkMJZI3NHR_cjs.resetPluginMenu; }
20862
20862
  });
20863
20863
  Object.defineProperty(exports, "resolvePluginMenuItems", {
20864
20864
  enumerable: true,
20865
- get: function () { return chunkLXYDJU6U_cjs.resolvePluginMenuItems; }
20865
+ get: function () { return chunkMJZI3NHR_cjs.resolvePluginMenuItems; }
20866
20866
  });
20867
20867
  Object.defineProperty(exports, "setPluginMenu", {
20868
20868
  enumerable: true,
20869
- get: function () { return chunkLXYDJU6U_cjs.setPluginMenu; }
20869
+ get: function () { return chunkMJZI3NHR_cjs.setPluginMenu; }
20870
20870
  });
20871
20871
  Object.defineProperty(exports, "topoSort", {
20872
20872
  enumerable: true,
20873
- get: function () { return chunkLXYDJU6U_cjs.topoSort; }
20873
+ get: function () { return chunkMJZI3NHR_cjs.topoSort; }
20874
20874
  });
20875
20875
  Object.defineProperty(exports, "applySchemaDefaults", {
20876
20876
  enumerable: true,
20877
- get: function () { return chunkKOXFYFOF_cjs.applySchemaDefaults; }
20877
+ get: function () { return chunk3RNDJAZ5_cjs.applySchemaDefaults; }
20878
20878
  });
20879
20879
  Object.defineProperty(exports, "definePlugin", {
20880
20880
  enumerable: true,
20881
- get: function () { return chunkKOXFYFOF_cjs.definePlugin; }
20881
+ get: function () { return chunk3RNDJAZ5_cjs.definePlugin; }
20882
20882
  });
20883
20883
  Object.defineProperty(exports, "isDefinedPlugin", {
20884
20884
  enumerable: true,
20885
- get: function () { return chunkKOXFYFOF_cjs.isDefinedPlugin; }
20885
+ get: function () { return chunk3RNDJAZ5_cjs.isDefinedPlugin; }
20886
20886
  });
20887
20887
  Object.defineProperty(exports, "parseConfigSchema", {
20888
20888
  enumerable: true,
20889
- get: function () { return chunkKOXFYFOF_cjs.parseConfigSchema; }
20889
+ get: function () { return chunk3RNDJAZ5_cjs.parseConfigSchema; }
20890
20890
  });
20891
20891
  Object.defineProperty(exports, "parseFormDataToSettings", {
20892
20892
  enumerable: true,
20893
- get: function () { return chunkKOXFYFOF_cjs.parseFormDataToSettings; }
20893
+ get: function () { return chunk3RNDJAZ5_cjs.parseFormDataToSettings; }
20894
20894
  });
20895
20895
  Object.defineProperty(exports, "renderSchemaFields", {
20896
20896
  enumerable: true,
20897
- get: function () { return chunkKOXFYFOF_cjs.renderSchemaFields; }
20897
+ get: function () { return chunk3RNDJAZ5_cjs.renderSchemaFields; }
20898
20898
  });
20899
20899
  Object.defineProperty(exports, "getHookSystem", {
20900
20900
  enumerable: true,
@@ -20942,11 +20942,11 @@ Object.defineProperty(exports, "metricsTracker", {
20942
20942
  });
20943
20943
  Object.defineProperty(exports, "SONICJS_VERSION", {
20944
20944
  enumerable: true,
20945
- get: function () { return chunk3XFA3E2F_cjs.SONICJS_VERSION; }
20945
+ get: function () { return chunkKDRHGEUF_cjs.SONICJS_VERSION; }
20946
20946
  });
20947
20947
  Object.defineProperty(exports, "getCoreVersion", {
20948
20948
  enumerable: true,
20949
- get: function () { return chunk3XFA3E2F_cjs.getCoreVersion; }
20949
+ get: function () { return chunkKDRHGEUF_cjs.getCoreVersion; }
20950
20950
  });
20951
20951
  Object.defineProperty(exports, "escapeHtml", {
20952
20952
  enumerable: true,