@kyro-cms/core 0.10.12 → 0.10.14

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.
@@ -1 +1 @@
1
- 'use strict';var chunkJ6CGNUWO_cjs=require('./chunk-J6CGNUWO.cjs');require('./chunk-ZWT5MX7S.cjs'),require('./chunk-UJNSOOYZ.cjs'),require('./chunk-65G73T7Z.cjs'),require('./chunk-CVVW4LXZ.cjs'),require('./chunk-CIE3XMLH.cjs'),require('./chunk-DAW5ZMWQ.cjs'),require('./chunk-AJAZ7D3W.cjs'),require('./chunk-WIZ6C5QZ.cjs'),require('./chunk-GFU7AOI3.cjs'),require('./chunk-ET6NN2V2.cjs'),require('./chunk-HVXO3OFB.cjs'),require('./chunk-ISWMETHJ.cjs'),require('./chunk-NY47CFVP.cjs'),require('./chunk-F7SR5IDT.cjs'),require('./chunk-4ORJMSJU.cjs'),require('./chunk-6CLRVJPP.cjs'),require('./chunk-GYQMNXXW.cjs'),require('./chunk-MIOMMB23.cjs'),require('./chunk-UBHFUFD4.cjs'),require('./chunk-UDSJGML2.cjs'),require('./chunk-ATLSIYRH.cjs'),require('./chunk-DV4LFLPL.cjs'),require('./chunk-Q3Q7BJVQ.cjs'),require('./chunk-AHSFSERC.cjs');function n(e){return new Response(e.body,e)}var p={graphqlEnabled:false,trpcEnabled:false,wsEnabled:false,requireAuth:false};function r(){return new Response(JSON.stringify({error:"GraphQL is disabled"}),{status:503,headers:{"Content-Type":"application/json"}})}async function o(){try{return (await chunkJ6CGNUWO_cjs.a.db.findOne({collection:"_globals_access-settings",where:{},draft:!0}))?.apiAccess?.graphqlEnabled??p.graphqlEnabled}catch{return true}}var l=async e=>{if(await chunkJ6CGNUWO_cjs.b(),!await o())return r();let t=await chunkJ6CGNUWO_cjs.a.getGraphQL().fetch(e.request,e.locals);return n(t)},u=async e=>{if(await chunkJ6CGNUWO_cjs.b(),!await o())return r();let t=await chunkJ6CGNUWO_cjs.a.getGraphQL().fetch(e.request,e.locals);return n(t)};exports.GET=u;exports.POST=l;
1
+ 'use strict';var chunk44TYUUC6_cjs=require('./chunk-44TYUUC6.cjs');require('./chunk-IGLFKSXH.cjs'),require('./chunk-UJNSOOYZ.cjs'),require('./chunk-65G73T7Z.cjs'),require('./chunk-CVVW4LXZ.cjs'),require('./chunk-CIE3XMLH.cjs'),require('./chunk-PDSHJVCT.cjs'),require('./chunk-AJAZ7D3W.cjs'),require('./chunk-WIZ6C5QZ.cjs'),require('./chunk-GFU7AOI3.cjs'),require('./chunk-ET6NN2V2.cjs'),require('./chunk-HVXO3OFB.cjs'),require('./chunk-ISWMETHJ.cjs'),require('./chunk-NY47CFVP.cjs'),require('./chunk-F7SR5IDT.cjs'),require('./chunk-4ORJMSJU.cjs'),require('./chunk-6CLRVJPP.cjs'),require('./chunk-GYQMNXXW.cjs'),require('./chunk-MIOMMB23.cjs'),require('./chunk-UBHFUFD4.cjs'),require('./chunk-UDSJGML2.cjs'),require('./chunk-ATLSIYRH.cjs'),require('./chunk-DV4LFLPL.cjs'),require('./chunk-Q3Q7BJVQ.cjs'),require('./chunk-AHSFSERC.cjs');function n(e){return new Response(e.body,e)}var p={graphqlEnabled:false,trpcEnabled:false,wsEnabled:false,requireAuth:false};function r(){return new Response(JSON.stringify({error:"GraphQL is disabled"}),{status:503,headers:{"Content-Type":"application/json"}})}async function o(){try{return (await chunk44TYUUC6_cjs.a.db.findOne({collection:"_globals_access-settings",where:{},draft:!0}))?.apiAccess?.graphqlEnabled??p.graphqlEnabled}catch{return true}}var l=async e=>{if(await chunk44TYUUC6_cjs.b(),!await o())return r();let t=await chunk44TYUUC6_cjs.a.getGraphQL().fetch(e.request,e.locals);return n(t)},u=async e=>{if(await chunk44TYUUC6_cjs.b(),!await o())return r();let t=await chunk44TYUUC6_cjs.a.getGraphQL().fetch(e.request,e.locals);return n(t)};exports.GET=u;exports.POST=l;
@@ -1 +1 @@
1
- import {b,a}from'./chunk-3SIWD5MY.js';import'./chunk-QMMMQQNI.js';import'./chunk-FO3HLBC7.js';import'./chunk-NZ35PV5R.js';import'./chunk-7N6NKCRT.js';import'./chunk-R6UUTH3T.js';import'./chunk-JPH44WC3.js';import'./chunk-7WOX27LK.js';import'./chunk-K6WUOU6P.js';import'./chunk-AE6GXUT7.js';import'./chunk-2W4FK6CJ.js';import'./chunk-NRLIGDYF.js';import'./chunk-UVTS2IWM.js';import'./chunk-HLSB2MCK.js';import'./chunk-SL3LZQCF.js';import'./chunk-PP5S2UBV.js';import'./chunk-VKXQUYYV.js';import'./chunk-RHCWCG3O.js';import'./chunk-OG7CNQGU.js';import'./chunk-QRXDCV6K.js';import'./chunk-G6A7OSIG.js';import'./chunk-P7CESLDJ.js';import'./chunk-ZAQOSRP6.js';import'./chunk-KDNYHLD2.js';import'./chunk-5J6HXUF6.js';function n(e){return new Response(e.body,e)}var p={graphqlEnabled:false,trpcEnabled:false,wsEnabled:false,requireAuth:false};function r(){return new Response(JSON.stringify({error:"GraphQL is disabled"}),{status:503,headers:{"Content-Type":"application/json"}})}async function o(){try{return (await a.db.findOne({collection:"_globals_access-settings",where:{},draft:!0}))?.apiAccess?.graphqlEnabled??p.graphqlEnabled}catch{return true}}var l=async e=>{if(await b(),!await o())return r();let t=await a.getGraphQL().fetch(e.request,e.locals);return n(t)},u=async e=>{if(await b(),!await o())return r();let t=await a.getGraphQL().fetch(e.request,e.locals);return n(t)};export{u as GET,l as POST};
1
+ import {b,a}from'./chunk-N3PMDG7U.js';import'./chunk-SB33D472.js';import'./chunk-FO3HLBC7.js';import'./chunk-NZ35PV5R.js';import'./chunk-7N6NKCRT.js';import'./chunk-R6UUTH3T.js';import'./chunk-G3DZDZIP.js';import'./chunk-7WOX27LK.js';import'./chunk-K6WUOU6P.js';import'./chunk-AE6GXUT7.js';import'./chunk-2W4FK6CJ.js';import'./chunk-NRLIGDYF.js';import'./chunk-UVTS2IWM.js';import'./chunk-HLSB2MCK.js';import'./chunk-SL3LZQCF.js';import'./chunk-PP5S2UBV.js';import'./chunk-VKXQUYYV.js';import'./chunk-RHCWCG3O.js';import'./chunk-OG7CNQGU.js';import'./chunk-QRXDCV6K.js';import'./chunk-G6A7OSIG.js';import'./chunk-P7CESLDJ.js';import'./chunk-ZAQOSRP6.js';import'./chunk-KDNYHLD2.js';import'./chunk-5J6HXUF6.js';function n(e){return new Response(e.body,e)}var p={graphqlEnabled:false,trpcEnabled:false,wsEnabled:false,requireAuth:false};function r(){return new Response(JSON.stringify({error:"GraphQL is disabled"}),{status:503,headers:{"Content-Type":"application/json"}})}async function o(){try{return (await a.db.findOne({collection:"_globals_access-settings",where:{},draft:!0}))?.apiAccess?.graphqlEnabled??p.graphqlEnabled}catch{return true}}var l=async e=>{if(await b(),!await o())return r();let t=await a.getGraphQL().fetch(e.request,e.locals);return n(t)},u=async e=>{if(await b(),!await o())return r();let t=await a.getGraphQL().fetch(e.request,e.locals);return n(t)};export{u as GET,l as POST};
@@ -1 +1 @@
1
- 'use strict';var chunkJ6CGNUWO_cjs=require('./chunk-J6CGNUWO.cjs');require('./chunk-ZWT5MX7S.cjs'),require('./chunk-UJNSOOYZ.cjs'),require('./chunk-65G73T7Z.cjs'),require('./chunk-CVVW4LXZ.cjs'),require('./chunk-CIE3XMLH.cjs'),require('./chunk-DAW5ZMWQ.cjs'),require('./chunk-AJAZ7D3W.cjs'),require('./chunk-WIZ6C5QZ.cjs'),require('./chunk-GFU7AOI3.cjs'),require('./chunk-ET6NN2V2.cjs'),require('./chunk-HVXO3OFB.cjs'),require('./chunk-ISWMETHJ.cjs'),require('./chunk-NY47CFVP.cjs'),require('./chunk-F7SR5IDT.cjs'),require('./chunk-4ORJMSJU.cjs'),require('./chunk-6CLRVJPP.cjs'),require('./chunk-GYQMNXXW.cjs'),require('./chunk-MIOMMB23.cjs'),require('./chunk-UBHFUFD4.cjs'),require('./chunk-UDSJGML2.cjs'),require('./chunk-ATLSIYRH.cjs'),require('./chunk-DV4LFLPL.cjs'),require('./chunk-Q3Q7BJVQ.cjs'),require('./chunk-AHSFSERC.cjs');function n(){return new Response(JSON.stringify({error:"tRPC is disabled"}),{status:503,headers:{"Content-Type":"application/json"}})}var r={graphqlEnabled:false,trpcEnabled:false,wsEnabled:false,requireAuth:false};async function s(){try{return (await chunkJ6CGNUWO_cjs.a.db.findOne({collection:"_globals_access-settings",where:{},draft:!0}))?.apiAccess?.trpcEnabled??r.trpcEnabled}catch{return true}}var i=async e=>(await chunkJ6CGNUWO_cjs.b(),await s()?chunkJ6CGNUWO_cjs.a.getTRPC().fetch(e.request,e.locals):n());exports.ALL=i;
1
+ 'use strict';var chunk44TYUUC6_cjs=require('./chunk-44TYUUC6.cjs');require('./chunk-IGLFKSXH.cjs'),require('./chunk-UJNSOOYZ.cjs'),require('./chunk-65G73T7Z.cjs'),require('./chunk-CVVW4LXZ.cjs'),require('./chunk-CIE3XMLH.cjs'),require('./chunk-PDSHJVCT.cjs'),require('./chunk-AJAZ7D3W.cjs'),require('./chunk-WIZ6C5QZ.cjs'),require('./chunk-GFU7AOI3.cjs'),require('./chunk-ET6NN2V2.cjs'),require('./chunk-HVXO3OFB.cjs'),require('./chunk-ISWMETHJ.cjs'),require('./chunk-NY47CFVP.cjs'),require('./chunk-F7SR5IDT.cjs'),require('./chunk-4ORJMSJU.cjs'),require('./chunk-6CLRVJPP.cjs'),require('./chunk-GYQMNXXW.cjs'),require('./chunk-MIOMMB23.cjs'),require('./chunk-UBHFUFD4.cjs'),require('./chunk-UDSJGML2.cjs'),require('./chunk-ATLSIYRH.cjs'),require('./chunk-DV4LFLPL.cjs'),require('./chunk-Q3Q7BJVQ.cjs'),require('./chunk-AHSFSERC.cjs');function n(){return new Response(JSON.stringify({error:"tRPC is disabled"}),{status:503,headers:{"Content-Type":"application/json"}})}var r={graphqlEnabled:false,trpcEnabled:false,wsEnabled:false,requireAuth:false};async function s(){try{return (await chunk44TYUUC6_cjs.a.db.findOne({collection:"_globals_access-settings",where:{},draft:!0}))?.apiAccess?.trpcEnabled??r.trpcEnabled}catch{return true}}var i=async e=>(await chunk44TYUUC6_cjs.b(),await s()?chunk44TYUUC6_cjs.a.getTRPC().fetch(e.request,e.locals):n());exports.ALL=i;
@@ -1 +1 @@
1
- import {b,a}from'./chunk-3SIWD5MY.js';import'./chunk-QMMMQQNI.js';import'./chunk-FO3HLBC7.js';import'./chunk-NZ35PV5R.js';import'./chunk-7N6NKCRT.js';import'./chunk-R6UUTH3T.js';import'./chunk-JPH44WC3.js';import'./chunk-7WOX27LK.js';import'./chunk-K6WUOU6P.js';import'./chunk-AE6GXUT7.js';import'./chunk-2W4FK6CJ.js';import'./chunk-NRLIGDYF.js';import'./chunk-UVTS2IWM.js';import'./chunk-HLSB2MCK.js';import'./chunk-SL3LZQCF.js';import'./chunk-PP5S2UBV.js';import'./chunk-VKXQUYYV.js';import'./chunk-RHCWCG3O.js';import'./chunk-OG7CNQGU.js';import'./chunk-QRXDCV6K.js';import'./chunk-G6A7OSIG.js';import'./chunk-P7CESLDJ.js';import'./chunk-ZAQOSRP6.js';import'./chunk-KDNYHLD2.js';import'./chunk-5J6HXUF6.js';function n(){return new Response(JSON.stringify({error:"tRPC is disabled"}),{status:503,headers:{"Content-Type":"application/json"}})}var r={graphqlEnabled:false,trpcEnabled:false,wsEnabled:false,requireAuth:false};async function s(){try{return (await a.db.findOne({collection:"_globals_access-settings",where:{},draft:!0}))?.apiAccess?.trpcEnabled??r.trpcEnabled}catch{return true}}var i=async e=>(await b(),await s()?a.getTRPC().fetch(e.request,e.locals):n());export{i as ALL};
1
+ import {b,a}from'./chunk-N3PMDG7U.js';import'./chunk-SB33D472.js';import'./chunk-FO3HLBC7.js';import'./chunk-NZ35PV5R.js';import'./chunk-7N6NKCRT.js';import'./chunk-R6UUTH3T.js';import'./chunk-G3DZDZIP.js';import'./chunk-7WOX27LK.js';import'./chunk-K6WUOU6P.js';import'./chunk-AE6GXUT7.js';import'./chunk-2W4FK6CJ.js';import'./chunk-NRLIGDYF.js';import'./chunk-UVTS2IWM.js';import'./chunk-HLSB2MCK.js';import'./chunk-SL3LZQCF.js';import'./chunk-PP5S2UBV.js';import'./chunk-VKXQUYYV.js';import'./chunk-RHCWCG3O.js';import'./chunk-OG7CNQGU.js';import'./chunk-QRXDCV6K.js';import'./chunk-G6A7OSIG.js';import'./chunk-P7CESLDJ.js';import'./chunk-ZAQOSRP6.js';import'./chunk-KDNYHLD2.js';import'./chunk-5J6HXUF6.js';function n(){return new Response(JSON.stringify({error:"tRPC is disabled"}),{status:503,headers:{"Content-Type":"application/json"}})}var r={graphqlEnabled:false,trpcEnabled:false,wsEnabled:false,requireAuth:false};async function s(){try{return (await a.db.findOne({collection:"_globals_access-settings",where:{},draft:!0}))?.apiAccess?.trpcEnabled??r.trpcEnabled}catch{return true}}var i=async e=>(await b(),await s()?a.getTRPC().fetch(e.request,e.locals):n());export{i as ALL};
@@ -1 +1 @@
1
- 'use strict';var chunkJ6CGNUWO_cjs=require('./chunk-J6CGNUWO.cjs');require('./chunk-ZWT5MX7S.cjs'),require('./chunk-UJNSOOYZ.cjs'),require('./chunk-65G73T7Z.cjs'),require('./chunk-CVVW4LXZ.cjs'),require('./chunk-CIE3XMLH.cjs'),require('./chunk-DAW5ZMWQ.cjs'),require('./chunk-AJAZ7D3W.cjs'),require('./chunk-WIZ6C5QZ.cjs'),require('./chunk-GFU7AOI3.cjs'),require('./chunk-ET6NN2V2.cjs'),require('./chunk-HVXO3OFB.cjs'),require('./chunk-ISWMETHJ.cjs'),require('./chunk-NY47CFVP.cjs'),require('./chunk-F7SR5IDT.cjs'),require('./chunk-4ORJMSJU.cjs'),require('./chunk-6CLRVJPP.cjs'),require('./chunk-GYQMNXXW.cjs'),require('./chunk-MIOMMB23.cjs'),require('./chunk-UBHFUFD4.cjs'),require('./chunk-UDSJGML2.cjs'),require('./chunk-ATLSIYRH.cjs'),require('./chunk-DV4LFLPL.cjs'),require('./chunk-Q3Q7BJVQ.cjs'),require('./chunk-AHSFSERC.cjs');Object.defineProperty(exports,"ALL",{enumerable:true,get:function(){return chunkJ6CGNUWO_cjs.c}});Object.defineProperty(exports,"kyroInstance",{enumerable:true,get:function(){return chunkJ6CGNUWO_cjs.a}});Object.defineProperty(exports,"warmKyroInstance",{enumerable:true,get:function(){return chunkJ6CGNUWO_cjs.b}});
1
+ 'use strict';var chunk44TYUUC6_cjs=require('./chunk-44TYUUC6.cjs');require('./chunk-IGLFKSXH.cjs'),require('./chunk-UJNSOOYZ.cjs'),require('./chunk-65G73T7Z.cjs'),require('./chunk-CVVW4LXZ.cjs'),require('./chunk-CIE3XMLH.cjs'),require('./chunk-PDSHJVCT.cjs'),require('./chunk-AJAZ7D3W.cjs'),require('./chunk-WIZ6C5QZ.cjs'),require('./chunk-GFU7AOI3.cjs'),require('./chunk-ET6NN2V2.cjs'),require('./chunk-HVXO3OFB.cjs'),require('./chunk-ISWMETHJ.cjs'),require('./chunk-NY47CFVP.cjs'),require('./chunk-F7SR5IDT.cjs'),require('./chunk-4ORJMSJU.cjs'),require('./chunk-6CLRVJPP.cjs'),require('./chunk-GYQMNXXW.cjs'),require('./chunk-MIOMMB23.cjs'),require('./chunk-UBHFUFD4.cjs'),require('./chunk-UDSJGML2.cjs'),require('./chunk-ATLSIYRH.cjs'),require('./chunk-DV4LFLPL.cjs'),require('./chunk-Q3Q7BJVQ.cjs'),require('./chunk-AHSFSERC.cjs');Object.defineProperty(exports,"ALL",{enumerable:true,get:function(){return chunk44TYUUC6_cjs.c}});Object.defineProperty(exports,"kyroInstance",{enumerable:true,get:function(){return chunk44TYUUC6_cjs.a}});Object.defineProperty(exports,"warmKyroInstance",{enumerable:true,get:function(){return chunk44TYUUC6_cjs.b}});
@@ -1 +1 @@
1
- export{c as ALL,a as kyroInstance,b as warmKyroInstance}from'./chunk-3SIWD5MY.js';import'./chunk-QMMMQQNI.js';import'./chunk-FO3HLBC7.js';import'./chunk-NZ35PV5R.js';import'./chunk-7N6NKCRT.js';import'./chunk-R6UUTH3T.js';import'./chunk-JPH44WC3.js';import'./chunk-7WOX27LK.js';import'./chunk-K6WUOU6P.js';import'./chunk-AE6GXUT7.js';import'./chunk-2W4FK6CJ.js';import'./chunk-NRLIGDYF.js';import'./chunk-UVTS2IWM.js';import'./chunk-HLSB2MCK.js';import'./chunk-SL3LZQCF.js';import'./chunk-PP5S2UBV.js';import'./chunk-VKXQUYYV.js';import'./chunk-RHCWCG3O.js';import'./chunk-OG7CNQGU.js';import'./chunk-QRXDCV6K.js';import'./chunk-G6A7OSIG.js';import'./chunk-P7CESLDJ.js';import'./chunk-ZAQOSRP6.js';import'./chunk-KDNYHLD2.js';import'./chunk-5J6HXUF6.js';
1
+ export{c as ALL,a as kyroInstance,b as warmKyroInstance}from'./chunk-N3PMDG7U.js';import'./chunk-SB33D472.js';import'./chunk-FO3HLBC7.js';import'./chunk-NZ35PV5R.js';import'./chunk-7N6NKCRT.js';import'./chunk-R6UUTH3T.js';import'./chunk-G3DZDZIP.js';import'./chunk-7WOX27LK.js';import'./chunk-K6WUOU6P.js';import'./chunk-AE6GXUT7.js';import'./chunk-2W4FK6CJ.js';import'./chunk-NRLIGDYF.js';import'./chunk-UVTS2IWM.js';import'./chunk-HLSB2MCK.js';import'./chunk-SL3LZQCF.js';import'./chunk-PP5S2UBV.js';import'./chunk-VKXQUYYV.js';import'./chunk-RHCWCG3O.js';import'./chunk-OG7CNQGU.js';import'./chunk-QRXDCV6K.js';import'./chunk-G6A7OSIG.js';import'./chunk-P7CESLDJ.js';import'./chunk-ZAQOSRP6.js';import'./chunk-KDNYHLD2.js';import'./chunk-5J6HXUF6.js';
@@ -1 +1 @@
1
- 'use strict';var chunkZWT5MX7S_cjs=require('./chunk-ZWT5MX7S.cjs'),chunkUJNSOOYZ_cjs=require('./chunk-UJNSOOYZ.cjs'),chunkET6NN2V2_cjs=require('./chunk-ET6NN2V2.cjs'),chunk6CLRVJPP_cjs=require('./chunk-6CLRVJPP.cjs'),chunkGYQMNXXW_cjs=require('./chunk-GYQMNXXW.cjs'),chunkUDSJGML2_cjs=require('./chunk-UDSJGML2.cjs'),chunkATLSIYRH_cjs=require('./chunk-ATLSIYRH.cjs'),A=require('kyro:config');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var A__default=/*#__PURE__*/_interopDefault(A);exports.a=null;var n=null;async function g(){if(!exports.a)try{let e=A__default.default.default||A__default.default;exports.a=chunkZWT5MX7S_cjs.q(e),await exports.a.init(),await exports.a.loadSettings();let a=exports.a.db,r;if(a instanceof chunk6CLRVJPP_cjs.c){if(a.dialect==="postgres")r=new chunkGYQMNXXW_cjs.a({db:a.client});else if(a.dialect==="sqlite"){let s=process.env.KYRO_AUTH_DB_PATH||"./data/auth.db";r=new chunkET6NN2V2_cjs.a({path:s});}}else if(a instanceof chunkZWT5MX7S_cjs.r){let s=process.env.KYRO_AUTH_DB_PATH||"./data/auth.db";r=new chunkET6NN2V2_cjs.a({path:s});}else a instanceof chunkUDSJGML2_cjs.a&&(r=new chunkATLSIYRH_cjs.a({db:a.db}));r?.connect&&await r.connect(),(await chunkUJNSOOYZ_cjs.d(r))?.success,typeof exports.a.startWebSocket=="function"&&exports.a.startWebSocket().catch(s=>{console.error("[Kyro] WebSocket auto-start failed:",s);}),globalThis.__KYRO_INSTANCE__=exports.a;}catch(e){throw exports.a=null,n=null,console.error("[Kyro API] Init failed, will retry:",e),e}}async function q(){n||(n=g()),await n;}var w={graphqlEnabled:false,trpcEnabled:false,wsEnabled:false,requireAuth:false};async function b(e){try{return (await exports.a.db.findOne({collection:"_globals_access-settings",where:{},draft:!0}))?.apiAccess?.[e]??w[e]??!0}catch{return true}}var v=async e=>{if(!exports.a){n||(n=g());try{await Promise.race([n,new Promise((l,o)=>setTimeout(()=>o(new Error("Initialization timeout")),3e4))]);}catch{return new Response(JSON.stringify({error:"Service Unavailable",message:"Kyro CMS is still starting up. Please try again in a moment."}),{status:503,headers:{"Content-Type":"application/json","Retry-After":"5"}})}}let r=new URL(e.request.url).pathname,i=__KYRO_API_PATH__;if(r===`${i}/graphql`&&typeof exports.a.getGraphQL=="function"){if(!await b("graphqlEnabled"))return new Response(JSON.stringify({error:"GraphQL is disabled"}),{status:503,headers:{"Content-Type":"application/json"}});let o=await exports.a.getGraphQL().fetch(e.request,e.locals);return new Response(o.body,o)}if(r.startsWith(`${i}/trpc/`)&&typeof exports.a.getTRPC=="function"){if(!await b("trpcEnabled"))return new Response(JSON.stringify({error:"tRPC is disabled"}),{status:503,headers:{"Content-Type":"application/json"}});let o=await exports.a.getTRPC().fetch(e.request,e.locals);return new Response(o.body,o)}return exports.a.getREST().fetch(e.request,e.locals)};exports.b=q;exports.c=v;
1
+ 'use strict';var chunkIGLFKSXH_cjs=require('./chunk-IGLFKSXH.cjs'),chunkUJNSOOYZ_cjs=require('./chunk-UJNSOOYZ.cjs'),chunkET6NN2V2_cjs=require('./chunk-ET6NN2V2.cjs'),chunk6CLRVJPP_cjs=require('./chunk-6CLRVJPP.cjs'),chunkGYQMNXXW_cjs=require('./chunk-GYQMNXXW.cjs'),chunkUDSJGML2_cjs=require('./chunk-UDSJGML2.cjs'),chunkATLSIYRH_cjs=require('./chunk-ATLSIYRH.cjs'),A=require('kyro:config');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var A__default=/*#__PURE__*/_interopDefault(A);exports.a=null;var n=null;async function g(){if(!exports.a)try{let e=A__default.default.default||A__default.default;exports.a=chunkIGLFKSXH_cjs.q(e),await exports.a.init(),await exports.a.loadSettings();let a=exports.a.db,r;if(a instanceof chunk6CLRVJPP_cjs.c){if(a.dialect==="postgres")r=new chunkGYQMNXXW_cjs.a({db:a.client});else if(a.dialect==="sqlite"){let s=process.env.KYRO_AUTH_DB_PATH||"./data/auth.db";r=new chunkET6NN2V2_cjs.a({path:s});}}else if(a instanceof chunkIGLFKSXH_cjs.r){let s=process.env.KYRO_AUTH_DB_PATH||"./data/auth.db";r=new chunkET6NN2V2_cjs.a({path:s});}else a instanceof chunkUDSJGML2_cjs.a&&(r=new chunkATLSIYRH_cjs.a({db:a.db}));r?.connect&&await r.connect(),(await chunkUJNSOOYZ_cjs.d(r))?.success,typeof exports.a.startWebSocket=="function"&&exports.a.startWebSocket().catch(s=>{console.error("[Kyro] WebSocket auto-start failed:",s);}),globalThis.__KYRO_INSTANCE__=exports.a;}catch(e){throw exports.a=null,n=null,console.error("[Kyro API] Init failed, will retry:",e),e}}async function q(){n||(n=g()),await n;}var w={graphqlEnabled:false,trpcEnabled:false,wsEnabled:false,requireAuth:false};async function b(e){try{return (await exports.a.db.findOne({collection:"_globals_access-settings",where:{},draft:!0}))?.apiAccess?.[e]??w[e]??!0}catch{return true}}var v=async e=>{if(!exports.a){n||(n=g());try{await Promise.race([n,new Promise((l,o)=>setTimeout(()=>o(new Error("Initialization timeout")),3e4))]);}catch{return new Response(JSON.stringify({error:"Service Unavailable",message:"Kyro CMS is still starting up. Please try again in a moment."}),{status:503,headers:{"Content-Type":"application/json","Retry-After":"5"}})}}let r=new URL(e.request.url).pathname,i=__KYRO_API_PATH__;if(r===`${i}/graphql`&&typeof exports.a.getGraphQL=="function"){if(!await b("graphqlEnabled"))return new Response(JSON.stringify({error:"GraphQL is disabled"}),{status:503,headers:{"Content-Type":"application/json"}});let o=await exports.a.getGraphQL().fetch(e.request,e.locals);return new Response(o.body,o)}if(r.startsWith(`${i}/trpc/`)&&typeof exports.a.getTRPC=="function"){if(!await b("trpcEnabled"))return new Response(JSON.stringify({error:"tRPC is disabled"}),{status:503,headers:{"Content-Type":"application/json"}});let o=await exports.a.getTRPC().fetch(e.request,e.locals);return new Response(o.body,o)}return exports.a.getREST().fetch(e.request,e.locals)};exports.b=q;exports.c=v;
@@ -0,0 +1,3 @@
1
+ import {a as a$1}from'./chunk-NZ35PV5R.js';import {b as b$1}from'./chunk-AE6GXUT7.js';var S={};var v={};var T={},oe=[];var k={},ie=[];var V={};var K={slug:"media",label:"Media Library",admin:{useAsTitle:"title",defaultColumns:["thumbnailUrl","title","type","fileSize","createdAt"],group:"content"},access:{read:()=>true,create:()=>true,update:()=>true,delete:()=>true},fields:[{name:"title",type:"text",label:"Title",required:true,admin:{description:"Descriptive title for the file"}},{name:"filename",type:"text",label:"Filename",required:true,admin:{readOnly:true,description:"System filename (auto-generated)"}},{name:"originalName",type:"text",label:"Original Name",admin:{readOnly:true}},{name:"alt",type:"text",label:"Alt Text",admin:{description:"Alternative text for images (accessibility)"}},{name:"caption",type:"richtext",label:"Caption",admin:{description:"Optional caption or description"}},{name:"type",type:"select",label:"File Type",required:true,defaultValue:"document",options:[{label:"Image",value:"image"},{label:"Video",value:"video"},{label:"Audio",value:"audio"},{label:"Document",value:"document"},{label:"Archive",value:"archive"},{label:"Other",value:"other"}],admin:{readOnly:true}},{name:"mimeType",type:"text",label:"MIME Type",admin:{readOnly:true}},{name:"url",type:"text",label:"URL",required:true,admin:{readOnly:true,description:"Public URL of the file"}},{name:"thumbnailUrl",type:"text",label:"Thumbnail URL",admin:{readOnly:true}},{name:"width",type:"number",label:"Width",admin:{readOnly:true,description:"Width in pixels (for images/videos)"}},{name:"height",type:"number",label:"Height",admin:{readOnly:true,description:"Height in pixels (for images/videos)"}},{name:"fileSize",type:"number",label:"File Size",admin:{readOnly:true,description:"Size in bytes"}},{name:"folder",type:"text",label:"Folder",admin:{description:"Folder path for organization (e.g., /products, /blog)"}},{name:"tags",type:"array",label:"Tags",fields:[{name:"tag",type:"text",label:"Tag"}]},{name:"focalPoint",type:"group",label:"Focal Point",admin:{description:"Point of interest for cropping"},fields:[{name:"x",type:"number",label:"X",defaultValue:50},{name:"y",type:"number",label:"Y",defaultValue:50}]},{name:"metadata",type:"json",label:"Metadata",admin:{readOnly:true,description:"Additional file metadata (EXIF, etc.)"}},{name:"provider",type:"select",label:"Storage Provider",defaultValue:"local",options:[{label:"Local",value:"local"},{label:"AWS S3",value:"s3"},{label:"Cloudinary",value:"cloudinary"},{label:"Imgix",value:"imgix"}],admin:{readOnly:true}},{name:"status",type:"select",label:"Status",defaultValue:"active",options:[{label:"Active",value:"active"},{label:"Archived",value:"archived"}]},{name:"createdAt",type:"date",label:"Created",admin:{readOnly:true}},{name:"updatedAt",type:"date",label:"Last Modified",admin:{readOnly:true}}]},P=[K];var z={slug:"menu",label:"Menu",singularLabel:"Menu Item",admin:{useAsTitle:"title",defaultColumns:["title","menuLocation"]},fields:[{name:"title",type:"text",label:"Title",required:true},{name:"menuLocation",type:"select",label:"Location",options:[{label:"Header",value:"header"},{label:"Footer",value:"footer"},{label:"Sidebar",value:"sidebar"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"}],required:true,admin:{position:"sidebar"}},{name:"order",type:"number",label:"Order",admin:{position:"sidebar"}},{name:"menu",type:"group",fields:[{name:"menuItem",label:"Menu Item",type:"array",fields:[{name:"linkType",type:"select",label:"Type",options:[{label:"Internal",value:"internal"},{label:"External",value:"external"}]},{name:"internalTarget",type:"relationship",label:"Target",relationTo:["pages","posts"],admin:{condition:{field:"linkType",equals:"internal"}}},{name:"externalUrl",type:"text",label:"URL",admin:{condition:{field:"linkType",equals:"external"}}}]}]}]},w={menu:z};var W={slug:"posts",label:"Posts",labelPlural:"Posts",singularLabel:"Post",admin:{useAsTitle:"title",defaultColumns:["title","slug","status","createdAt","updatedAt"],description:"Blog posts and articles"},fields:[{name:"mainTabs",type:"tabs",tabs:[{label:"Content",fields:[{name:"title",type:"text",required:true,label:"Title",admin:{description:"The main title of the post as it will appear publicly."}},{name:"content",type:"richtext",label:"Content"}]},{label:"Meta",fields:[{name:"category",type:"relationship",label:"Category",relationTo:"categories",admin:{description:"Select the primary category this post belongs to."}},{name:"relatedPosts",type:"array",label:"Related Posts",fields:[{name:"post",type:"relationship",relationTo:"posts",label:"Post"}],admin:{description:"Select posts related to this one."}}]},{label:"SEO",fields:[{name:"metaTitle",type:"text",label:"Meta Title",admin:{autoGenerate:"title",description:"The title used for SEO and social sharing (recommended < 60 chars)."}},{name:"metaDescription",type:"textarea",label:"Meta Description",admin:{autoGenerate:"content",description:"A brief summary for search engines (recommended < 160 chars)."}},{name:"ogImage",type:"upload",label:"OG Image",relationTo:"media",admin:{description:"The image shown when the post is shared on social media."}}]}]},{name:"slug",type:"text",required:true,label:"Slug",admin:{description:"The URL-friendly identifier for the post.",position:"sidebar",autoGenerate:"title"}},{name:"tags",type:"list",label:"Tags",admin:{description:"Add keywords to help categorize your post.",position:"sidebar"}},{name:"authors",type:"array",label:"Authors",fields:[{name:"user",type:"relationship",label:"User",relationTo:"users"}],admin:{description:"Select one or more authors for this post.",position:"sidebar"}},{name:"featuredImage",type:"upload",label:"Featured Image",relationTo:"media",admin:{description:"The primary visual used to represent this post.",position:"sidebar"}}],timestamps:true,versions:{drafts:true,maxPerDoc:10}},O={posts:W};function a(e){return {...e,fields:[...[{name:"anchorId",type:"text",admin:{readOnly:true,hidden:true,description:"Auto-generated slug ID used for queries and anchor links."},hooks:{beforeChange:[({value:l,siblingData:f})=>f.name&&typeof f.name=="string"?f.name.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,""):l||null]}}],...e.fields,...ye]}}var ne=[{name:"text",type:"text",label:"Label"},{name:"url",type:"text",label:"URL"}],c={name:"buttons",type:"array",label:"Action Buttons",fields:ne},re={slug:"heading-element",label:"Heading",admin:{group:"Basic Content Elements",description:"Section heading"},fields:[{name:"content",type:"text",label:"Content"}]},se={slug:"text-element",label:"Text",admin:{group:"Basic Content Elements",description:"Plain text paragraph"},fields:[{name:"content",type:"textarea",label:"Content"}]},me={slug:"image-element",label:"Image",admin:{group:"Basic Content Elements",description:"Single image"},fields:[{name:"image",type:"upload",label:"Image",relationTo:"media"}]},pe={slug:"richtext-element",label:"Rich Text",admin:{group:"Basic Content Elements",description:"Formatted rich text content"},fields:[{name:"content",type:"richtext",label:"Content"}]},de={slug:"button-element",label:"Button",admin:{group:"Basic Content Elements",description:"Call-to-action button"},fields:[{name:"buttonData",type:"group",label:"Button",admin:{inline:true},fields:[{name:"text",type:"text",label:"Label"},{name:"url",type:"text",label:"URL"}]}]},ue={slug:"video-element",label:"Video",admin:{group:"Basic Content Elements",description:"Embedded video player"},fields:[{name:"url",type:"text",label:"Video URL"},{name:"file",type:"upload",label:"Video File",relationTo:"media"},{name:"caption",type:"text",label:"Caption"}]},ce={slug:"list-element",label:"List",admin:{group:"Basic Content Elements",description:"Bulleted or numbered list"},fields:[{name:"items",type:"array",label:"Items",fields:[{name:"text",type:"text",label:"Item Text"}]}]},be=[re,se,me,pe,de,ue,ce],ge={name:"elements",type:"blocks",label:"Extra Content Elements",blocks:be,admin:{pickerMode:"dropdown"}},ye=[ge],fe=a({slug:"hero",admin:{group:"Structural Sections",description:"Primary landing section with heading, text, media & CTA"},label:"Hero Section",fields:[{name:"isMultiScreen",type:"checkbox",label:"Enable Carousel",defaultValue:false},{name:"multiSlides",type:"group",label:"Multi Slides",admin:{condition:{field:"isMultiScreen",equals:true}},fields:[{name:"multiSlides",type:"array",label:"Hero Slides",fields:[{name:"heading",type:"text",label:"Heading"},{name:"subheading",type:"textarea",label:"Subheading"},{name:"backgroundImage",type:"upload",label:"Background Image",relationTo:"media"},c]}]},{name:"singleSlide",type:"group",label:"Single Slide",admin:{condition:{field:"isMultiScreen",equals:false}},fields:[{name:"heading",type:"text",label:"Heading"},{name:"subheading",type:"textarea",label:"Subheading"},{name:"backgroundImage",type:"upload",label:"Background Image",relationTo:"media"},c]}]}),xe=a({slug:"card",admin:{group:"Structural Sections",description:"Modular card block featuring title, text, and optional media"},label:"Card Block",fields:[{name:"isMultiCard",type:"checkbox",label:"Enable Multicard Layout",defaultValue:false},{name:"multiCards",type:"group",label:"Multi Cards",admin:{condition:{field:"isMultiCard",equals:true}},fields:[{name:"cards",type:"array",label:"Cards List",fields:[{name:"title",type:"text",label:"Title"},{name:"description",type:"textarea",label:"Description"},{name:"image",type:"upload",label:"Image",relationTo:"media"},{name:"icon",type:"text",label:"Icon"},{name:"linkText",type:"text",label:"Link Text"},{name:"link",type:"text",label:"URL"}]}]},{name:"singleCard",type:"group",label:"Single Card",admin:{condition:{field:"isMultiCard",equals:false}},fields:[{name:"title",type:"text",label:"Title"},{name:"description",type:"textarea",label:"Description"},{name:"image",type:"upload",label:"Image",relationTo:"media"},{name:"icon",type:"text",label:"Icon"},{name:"linkText",type:"text",label:"Link Text"},{name:"link",type:"text",label:"URL"}]}]});a({slug:"text",admin:{group:"Basic Content Elements",description:"Rich text content"},label:"Text Block",fields:[{name:"content",type:"richtext",label:"Content"}]});a({slug:"image",admin:{group:"Basic Content Elements",description:"Image upload container"},label:"Image",fields:[{name:"image",type:"upload",label:"Image",relationTo:"media"},{name:"caption",type:"text",label:"Caption"},{name:"alt",type:"text",label:"Alt Text"},{name:"aspectRatio",type:"select",label:"Aspect Ratio",defaultValue:"original",options:[{label:"Original",value:"original"},{label:"16:9 Landscape",value:"16-9"},{label:"4:3 Classic",value:"4-3"},{label:"1:1 Square",value:"1-1"},{label:"2:3 Portrait",value:"2-3"}]},{name:"enableLightbox",type:"checkbox",label:"Enable Zoom / Lightbox",defaultValue:false}]});var Ce=a({slug:"feature-split",admin:{group:"Structural Sections",description:"Side-by-side text and media layout"},label:"Feature Split (Text & Media)",fields:[{name:"title",type:"text",label:"Title"},{name:"description",type:"richtext",label:"Description"},{name:"checkpoints",type:"array",label:"Value Checkpoints",fields:[{name:"title",type:"text",label:"Checkpoint Title"},{name:"description",type:"textarea",label:"Checkpoint Description"},{name:"icon",type:"text",label:"Icon Name"},{name:"image",type:"upload",label:"Image",relationTo:"media"},{name:"itemUrl",type:"text",label:"Link URL"}]},{name:"images",type:"array",label:"Images",fields:[{name:"image",type:"upload",label:"Image",relationTo:"media"}]},c]}),he=a({slug:"feature-grid",admin:{group:"Marketing Grids",description:"Multi-column grid showcasing features or services"},label:"Feature Grid",fields:[{name:"sectionTitle",type:"text",label:"Section Heading"},{name:"sectionSubtitle",type:"textarea",label:"Section Subtitle"},{name:"features",type:"array",label:"Features List",fields:[{name:"title",type:"text",label:"Title"},{name:"description",type:"textarea",label:"Description"},{name:"icon",type:"text",label:"Icon Name"},{name:"image",type:"upload",label:"Feature Image",relationTo:"media"},{name:"itemUrl",type:"text",label:"Card Redirection URL"}]}]}),Se=a({slug:"cta-banner",admin:{group:"Structural Sections",description:"High-impact call-to-action banner"},label:"CTA Banner",fields:[{name:"headline",type:"text",label:"Headline"},{name:"subheading",type:"textarea",label:"Subheading"},{name:"backgroundImage",type:"upload",label:"Background Image",relationTo:"media"},c]}),ve=a({slug:"testimonials",admin:{group:"Marketing Grids",description:"Customer reviews and quotes carousel"},label:"Testimonials",fields:[{name:"sectionTitle",type:"text",label:"Section Heading"},{name:"items",type:"array",label:"Testimonials",fields:[{name:"quote",type:"textarea",label:"Quote"},{name:"rating",type:"select",label:"Star Rating",defaultValue:"5",options:[{label:"5 Stars",value:"5"},{label:"4 Stars",value:"4"},{label:"3 Stars",value:"3"},{label:"2 Stars",value:"2"},{label:"1 Star",value:"1"}]},{name:"authorName",type:"text",label:"Author Name"},{name:"authorRole",type:"text",label:"Author Role"},{name:"avatar",type:"upload",label:"Avatar",relationTo:"media"},{name:"companyLogo",type:"upload",label:"Company Logo",relationTo:"media"}]}]}),Te=a({slug:"faq",admin:{group:"Lead Capture & Interactive",description:"Expandable list of frequently asked questions"},label:"FAQ Section",fields:[{name:"sectionTitle",type:"text",label:"Section Heading"},{name:"items",type:"array",label:"Questions List",fields:[{name:"tag",type:"text",label:"Category Tag (e.g. billing, account)"},{name:"question",type:"text",label:"Question"},{name:"answer",type:"richtext",label:"Answer"}]},{name:"footerHeading",type:"text",label:"Footer Heading (e.g. Still have questions?)"},{name:"footerCtaUrl",type:"text",label:"Footer CTA Redirection URL"}]}),ke=a({slug:"stats",admin:{group:"Marketing Grids",description:"Grid displaying key numerical metrics and stats"},label:"Stats / Metrics",fields:[{name:"sectionTitle",type:"text",label:"Section Heading"},{name:"items",type:"array",label:"Stats List",fields:[{name:"prefix",type:"text",label:"Value Prefix (e.g. + or $)"},{name:"value",type:"text",label:"Value (e.g. 99.9 or 5M)"},{name:"suffix",type:"text",label:"Value Suffix (e.g. % or users)"},{name:"label",type:"text",label:"Label (e.g. Uptime)"},{name:"description",type:"textarea",label:"Context Description"}]}]}),Pe=a({slug:"logo-cloud",admin:{group:"Structural Sections",description:"Showcase for partner and client company logos"},label:"Logo Cloud / Partners",fields:[{name:"sectionTitle",type:"text",label:"Section Heading"},{name:"logos",type:"array",label:"Logos List",fields:[{name:"name",type:"text",label:"Company Name"},{name:"logo",type:"upload",label:"Logo Image",relationTo:"media"},{name:"url",type:"text",label:"Website URL"}]}]}),Ae=a({slug:"pricing",admin:{group:"Marketing Grids",description:"Tiered pricing plans with feature comparisons"},label:"Pricing Plans",fields:[{name:"sectionTitle",type:"text",label:"Section Heading"},{name:"sectionSubtitle",type:"textarea",label:"Section Subtitle"},{name:"annualDiscount",type:"text",label:"Annual Promo Tag (e.g. Save 20%)"},{name:"plans",type:"array",label:"Pricing Plans",fields:[{name:"popularBadgeText",type:"text",label:"Plan Badge (e.g. MOST POPULAR)"},{name:"name",type:"text",label:"Plan Name"},{name:"description",type:"textarea",label:"Plan Description"},{name:"currency",type:"text",label:"Plan Currency (e.g. $)",defaultValue:"$"},{name:"price",type:"text",label:"Price (e.g. 29)"},{name:"billingPeriod",type:"text",label:"Billing Period (e.g. /mo)"},{name:"features",type:"list",label:"Features Checklist"},c,{name:"footnote",type:"text",label:"Footnote note (e.g. *cancel anytime)"},{name:"isFeatured",type:"checkbox",label:"Highlight Plan (Featured)",defaultValue:false}]}]}),Ge=a({slug:"team",admin:{group:"Marketing Grids",description:"Showcase of team members with photos and roles"},label:"Team Showcase",fields:[{name:"sectionTitle",type:"text",label:"Section Heading"},{name:"sectionSubtitle",type:"textarea",label:"Section Subtitle"},{name:"members",type:"array",label:"Team Members",fields:[{name:"name",type:"text",label:"Member Name"},{name:"role",type:"text",label:"Role / Position"},{name:"department",type:"text",label:"Department / Team tag (e.g. engineering, design)"},{name:"avatar",type:"upload",label:"Avatar Image",relationTo:"media"},{name:"bio",type:"textarea",label:"Brief Bio"},{name:"twitterUrl",type:"text",label:"Twitter URL"},{name:"linkedinUrl",type:"text",label:"LinkedIn URL"},{name:"githubUrl",type:"text",label:"GitHub URL"},{name:"websiteUrl",type:"text",label:"Website URL"}]}]}),Le=a({slug:"recent-feed",admin:{group:"Dynamic Content",description:"Hand-picked showcase of items"},label:"Hand-Picked Feed",fields:[{name:"sectionTitle",type:"text",label:"Section Heading"},{name:"sectionSubtitle",type:"textarea",label:"Section Subtitle"},{name:"selectedItems",type:"relationship",label:"Feed Items",relationTo:["posts"],hasMany:true},c]}),Ie=a({slug:"process-steps",admin:{group:"Lead Capture & Interactive",description:"Numbered sequence illustrating a process or workflow"},label:"Process Steps / Timeline",fields:[{name:"sectionTitle",type:"text",label:"Section Heading"},{name:"sectionSubtitle",type:"textarea",label:"Section Subtitle"},{name:"steps",type:"array",label:"Steps",fields:[{name:"stepNumber",type:"text",label:"Step Number (e.g. 01)"},{name:"icon",type:"upload",label:"Step Icon / Image",relationTo:"media"},{name:"title",type:"text",label:"Step Title"},{name:"description",type:"textarea",label:"Description"}]}]}),Me=a({slug:"form-embed",admin:{group:"Lead Capture & Interactive",description:"Embeddable interactive forms for lead capture"},label:"Form Embed",fields:[{name:"title",type:"text",label:"Form Title"},{name:"subtitle",type:"textarea",label:"Form Subtitle"},{name:"form",type:"relationship",relationTo:"forms",label:"Form",required:true}]}),Ee=a({slug:"video-showcase",admin:{group:"Structural Sections",description:"Cinematic video player with custom thumbnail"},label:"Cinematic Video Showcase",fields:[{name:"sectionTitle",type:"text",label:"Section Heading"},{name:"sectionSubtitle",type:"textarea",label:"Section Subtitle"},{name:"coverImage",type:"upload",label:"Cinematic Cover Image (Thumbnail)",relationTo:"media"},{name:"videoUrl",type:"text",label:"Video Embed URL (YouTube / Vimeo / MP4)"},{name:"videoTitle",type:"text",label:"Video Title (for accessibility & hover text)"},{name:"durationBadge",type:"text",label:"Duration Badge (e.g. '\u25B6 2:34')"},{name:"isLightbox",type:"checkbox",label:"Open in Cinematic Lightbox Modal",defaultValue:true},{name:"autoplay",type:"checkbox",label:"Autoplay Video (muted)",defaultValue:false}]}),Y=[fe,xe,Ce,he,Se,ve,Te,ke,Pe,Ae,Ge,Le,Ie,Me,Ee];var X={slug:"pages",label:"Pages",labelPlural:"Pages",singularLabel:"Page",admin:{useAsTitle:"title",defaultColumns:["title","slug","status","updatedAt"],description:"Static pages"},fields:[{name:"mainTabs",type:"tabs",tabs:[{label:"Content",fields:[{name:"title",type:"text",required:true,label:"Title",admin:{description:"The main title of the page as it will appear publicly."}},{name:"content",type:"blocks",label:"Content",blocks:Y}]},{label:"Meta",fields:[]},{label:"SEO",fields:[{name:"metaTitle",type:"text",label:"Meta Title",admin:{autoGenerate:"title"}},{name:"metaDescription",type:"textarea",label:"Meta Description",admin:{autoGenerate:"content"}},{name:"ogImage",type:"upload",label:"OG Image",relationTo:"media"}]}]},{name:"slug",type:"text",required:true,label:"Slug",admin:{position:"sidebar",autoGenerate:"title"}},{name:"featuredImage",type:"upload",label:"Featured Image",relationTo:"media",admin:{position:"sidebar"}}],timestamps:true,versions:{drafts:true,maxPerDoc:10}},F={pages:X};var _={slug:"categories",label:"Categories",labelPlural:"Categories",singularLabel:"Category",admin:{useAsTitle:"name",defaultColumns:["name","slug"],description:"Post categories",layout:"split"},fields:[{name:"name",type:"text",required:true,label:"Name"},{name:"description",type:"textarea",label:"Description"},{name:"slug",type:"text",required:true,label:"Slug",admin:{position:"sidebar",autoGenerate:"name"}},{name:"icon",type:"upload",label:"Icon",relationTo:"media",admin:{position:"sidebar"}},{name:"parent",type:"relationship",label:"Parent Category",relationTo:"categories",admin:{position:"sidebar"}},{name:"order",type:"number",label:"Order",defaultValue:0,admin:{position:"sidebar"}}],timestamps:true,versions:{drafts:true,maxPerDoc:5}},q={categories:_},J={slug:"product-categories",label:"Product Categories",labelPlural:"Product Categories",singularLabel:"Product Category",admin:{useAsTitle:"name",defaultColumns:["name","slug"],description:"Product categories for organizing your catalog"},fields:[{name:"name",type:"text",required:true,label:"Name"},{name:"slug",type:"text",required:true,label:"Slug",admin:{position:"sidebar",autoGenerate:"name"}},{name:"description",type:"textarea",label:"Description"},{name:"image",type:"text",label:"Image URL"},{name:"parent",type:"relationship",label:"Parent Category",relationTo:"product-categories",admin:{position:"sidebar"}}],timestamps:true,versions:{drafts:true,maxPerDoc:5}},A={"product-categories":J};var Q={slug:"products",label:"Products",labelPlural:"Products",singularLabel:"Product",admin:{useAsTitle:"title",defaultColumns:["title","slug","price","status","inventory","updatedAt"],description:"Product catalog"},fields:[{name:"title",type:"text",required:true,label:"Title"},{name:"slug",type:"text",required:true,label:"Slug",admin:{position:"sidebar",autoGenerate:"title"}},{name:"description",type:"richtext",label:"Description"},{name:"price",type:"number",required:true,label:"Price"},{name:"compareAtPrice",type:"number",label:"Compare at Price",admin:{description:"Original price for sale display"}},{name:"costPrice",type:"number",label:"Cost Price",admin:{description:"For profit calculation"}},{name:"sku",type:"text",required:true,label:"SKU"},{name:"barcode",type:"text",label:"Barcode"},{name:"images",type:"array",label:"Images",fields:[{name:"url",type:"text",label:"URL"},{name:"alt",type:"text",label:"Alt Text"}]},{name:"category",type:"relationship",label:"Category",relationTo:"product-categories"},{name:"inventory",type:"number",label:"Inventory",defaultValue:0}],timestamps:true,versions:{drafts:true,maxPerDoc:10}},G={products:Q};var $={slug:"customers",label:"Customers",labelPlural:"Customers",singularLabel:"Customer",admin:{useAsTitle:"email",defaultColumns:["email","firstName","lastName","createdAt","updatedAt"],description:"Customer accounts"},fields:[{name:"email",type:"email",required:true,label:"Email"},{name:"firstName",type:"text",label:"First Name"},{name:"lastName",type:"text",label:"Last Name"},{name:"phone",type:"text",label:"Phone"},{name:"addresses",type:"array",label:"Addresses",fields:[{name:"type",type:"text",label:"Type"},{name:"line1",type:"text",label:"Address Line 1"},{name:"line2",type:"text",label:"Address Line 2"},{name:"city",type:"text",label:"City"},{name:"state",type:"text",label:"State"},{name:"postalCode",type:"text",label:"Postal Code"},{name:"country",type:"text",label:"Country"}]},{name:"slug",type:"text",required:true,label:"Slug",admin:{position:"sidebar",autoGenerate:"email"}}],timestamps:true,versions:{drafts:true,maxPerDoc:5}},L={customers:$};var Z={slug:"orders",label:"Orders",labelPlural:"Orders",singularLabel:"Order",admin:{useAsTitle:"orderNumber",defaultColumns:["orderNumber","customer","status","total","createdAt","updatedAt"],description:"Customer orders"},fields:[{name:"orderNumber",type:"text",required:true,label:"Order Number"},{name:"customer",type:"relationship",required:true,label:"Customer",relationTo:"customers"},{name:"paymentStatus",type:"select",label:"Payment Status",options:[{label:"Pending",value:"pending"},{label:"Paid",value:"paid"},{label:"Failed",value:"failed"},{label:"Refunded",value:"refunded"}],defaultValue:"pending"},{name:"items",type:"array",label:"Items",fields:[{name:"product",type:"text",label:"Product"},{name:"quantity",type:"number",label:"Quantity"},{name:"unitPrice",type:"number",label:"Unit Price"},{name:"total",type:"number",label:"Total"}]},{name:"subtotal",type:"number",required:true,label:"Subtotal"},{name:"tax",type:"number",label:"Tax"},{name:"shipping",type:"number",label:"Shipping"},{name:"discount",type:"number",label:"Discount"},{name:"total",type:"number",required:true,label:"Total"},{name:"notes",type:"richtext",label:"Notes"},{name:"slug",type:"text",required:true,label:"Slug",admin:{position:"sidebar",autoGenerate:"orderNumber"}}],timestamps:true,versions:{drafts:true,maxPerDoc:10}},I={orders:Z};var ee={slug:"coupons",label:"Coupons",labelPlural:"Coupons",singularLabel:"Coupon",admin:{useAsTitle:"code",defaultColumns:["code","type","value","active","expiresAt"],description:"Discount codes and promotions"},fields:[{name:"code",type:"text",required:true,label:"Code"},{name:"type",type:"select",required:true,label:"Type",options:[{label:"Percentage",value:"percentage"},{label:"Fixed Amount",value:"fixed"},{label:"Free Shipping",value:"freeShipping"}]},{name:"value",type:"number",label:"Value"},{name:"minPurchase",type:"number",label:"Minimum Purchase"},{name:"maxDiscount",type:"number",label:"Max Discount"},{name:"usageLimit",type:"number",label:"Usage Limit"},{name:"usedCount",type:"number",defaultValue:0,label:"Used Count"},{name:"startsAt",type:"date",label:"Starts At"},{name:"expiresAt",type:"date",label:"Expires At"},{name:"active",type:"checkbox",defaultValue:true,label:"Active"}],timestamps:true,versions:{drafts:true,maxPerDoc:5}},M={coupons:ee};var te={slug:"forms",label:"Forms",labelPlural:"Forms",singularLabel:"Form",admin:{useAsTitle:"name",defaultColumns:["name","slug","updatedAt"],description:"Reusable form definitions"},fields:[{name:"name",type:"text",required:true,label:"Name"},{name:"subtitle",type:"textarea",label:"Subtitle"},{name:"slug",type:"text",required:true,label:"Slug",admin:{position:"sidebar",autoGenerate:"name"}},{name:"submitButtonText",type:"text",label:"Submit Button Text",defaultValue:"Submit",admin:{position:"sidebar"}},{name:"consentCheckboxText",type:"text",label:"Consent Agreement label (e.g. I agree to terms)",admin:{position:"sidebar"}},{name:"redirectUrl",type:"text",label:"Success Redirect URL",admin:{position:"sidebar"}},{name:"fields",type:"array",label:"Form Fields",fields:[{name:"fieldName",type:"text",label:"Field API Name (e.g. company)"},{name:"inputType",type:"select",label:"Input Type",defaultValue:"text",options:[{label:"Text input",value:"text"},{label:"Email input",value:"email"},{label:"Phone number input",value:"tel"},{label:"Multi-line textarea",value:"textarea"},{label:"Checkbox selector",value:"checkbox"}]},{name:"placeholder",type:"text",label:"Input Placeholder Text"},{name:"isRequired",type:"checkbox",label:"Make this field required",defaultValue:false}]},{name:"entries",type:"relationship",relationTo:"form-entries",hasMany:true,label:"Entries",admin:{description:"Form submissions linked to this form."}}],timestamps:true,versions:{drafts:true,maxPerDoc:5}},D={forms:te};var ae={slug:"form-entries",label:"Form Entries",labelPlural:"Form Entries",singularLabel:"Form Entry",admin:{useAsTitle:"id",defaultColumns:["id","form","createdAt","ipAddress"],description:"Form submission entries"},fields:[{name:"form",type:"relationship",relationTo:"forms",required:true,label:"Form",admin:{position:"sidebar",readOnly:true,description:"The form this entry belongs to."}},{name:"data",type:"json",label:"Submitted Data",admin:{readOnly:true,description:"All field values submitted with this entry."}},{name:"ipAddress",type:"text",label:"IP Address",admin:{position:"sidebar",readOnly:true,description:"The IP address of the submitter."}}],timestamps:true},U={"form-entries":ae};var o={slug:"site-settings",label:"Site Settings",admin:{group:"settings"},access:{read:()=>true,update:()=>true},fields:[{name:"siteName",type:"text",label:"Site Name",required:true,admin:{}},{name:"siteDescription",type:"textarea",label:"Site Description",admin:{placeholder:"Enter a brief description of your site for SEO and search results."}},{name:"siteLogo",type:"upload",label:"Site Logo",relationTo:"media"},{name:"siteFavicon",type:"upload",label:"Favicon",relationTo:"media"},{name:"siteOgImage",type:"upload",label:"Default OG Image",relationTo:"media"},{name:"siteUrl",type:"text",label:"Site URL",admin:{}},{name:"maintenanceEnabled",type:"checkbox",label:"Enable Maintenance Mode",defaultValue:false,admin:{description:"When enabled, the public site will show a maintenance page."}},{name:"maintenance",type:"group",label:"Maintenance Configuration",admin:{condition:e=>e.maintenanceEnabled===true},fields:[{name:"message",type:"textarea",label:"Maintenance Message",admin:{placeholder:"We'll be back soon! We're performing scheduled maintenance."}},{name:"bypassToken",type:"text",label:"Bypass Token",admin:{description:"Append ?bypass=YOUR_TOKEN to URL to view the site while in maintenance mode."}}]},{name:"enableI18n",type:"checkbox",label:"Enable Internationalization (i18n)",defaultValue:false,admin:{description:"Enable support for multiple languages."}},{name:"i18n",type:"group",label:"Localization",admin:{condition:e=>e.enableI18n===true},fields:[{name:"language",type:"select",label:"Default Language",defaultValue:"en",options:[{label:"English",value:"en"},{label:"Spanish",value:"es"},{label:"French",value:"fr"},{label:"German",value:"de"},{label:"Portuguese",value:"pt"},{label:"Italian",value:"it"},{label:"Dutch",value:"nl"},{label:"Russian",value:"ru"},{label:"Japanese",value:"ja"},{label:"Chinese",value:"zh"},{label:"Korean",value:"ko"},{label:"Arabic",value:"ar"}]},{name:"timezone",type:"text",label:"Timezone",defaultValue:"UTC"}]},{name:"logo",type:"group",label:"Logo Display Settings",fields:[{name:"width",type:"number",label:"Max Width (px)"},{name:"height",type:"number",label:"Max Height (px)"},{name:"altText",type:"text",label:"Alt Text"}]},{name:"analyticsEnabled",type:"checkbox",label:"Enable Analytics & Tracking",defaultValue:false},{name:"analytics",type:"group",label:"Tracking Configurations",admin:{condition:e=>e.analyticsEnabled===true},fields:[{name:"googleAnalyticsId",type:"text",label:"Google Analytics ID"},{name:"googleTagManagerId",type:"text",label:"Google Tag Manager ID"},{name:"plausibleDomain",type:"text",label:"Plausible Domain"},{name:"mixpanelToken",type:"password",label:"Mixpanel Token"}]}]};var i={slug:"seo-settings",label:"SEO Settings",admin:{group:"settings"},access:{read:()=>true,update:()=>true},fields:[{name:"seoMode",type:"select",label:"Visibility Mode",defaultValue:"simple",options:[{label:"Simple (Basic Meta)",value:"simple"},{label:"Advanced (Full Technical SEO)",value:"advanced"}],admin:{description:"Switch to advanced mode to control robots.txt, canonical URLs, and deep metadata."}},{name:"defaultTitle",type:"text",label:"Default Title",admin:{}},{name:"defaultDescription",type:"textarea",label:"Default Description",admin:{}},{name:"titleTemplate",type:"text",label:"Title Template",defaultValue:"{{title}} | {{siteName}}",admin:{}},{name:"siteNameInTitle",type:"checkbox",label:"Include Site Name in Title",defaultValue:true},{name:"separator",type:"text",label:"Title Separator",defaultValue:" | ",admin:{}},{name:"meta",type:"group",label:"Technical Meta Settings",admin:{condition:e=>e.seoMode==="advanced"},fields:[{name:"robots",type:"text",label:"Robots Meta",defaultValue:"index, follow"},{name:"canonicalUrl",type:"text",label:"Canonical URL"},{name:"ogType",type:"select",label:"Default OG Type",defaultValue:"website",options:[{label:"Website",value:"website"},{label:"Article",value:"article"},{label:"Product",value:"product"},{label:"Book",value:"book"},{label:"Music",value:"music"},{label:"Video",value:"video"}]}]},{name:"enableSitemap",type:"checkbox",label:"Enable XML Sitemap",defaultValue:true},{name:"sitemap",type:"group",label:"Sitemap Configuration",admin:{condition:e=>e.enableSitemap===true&&e.seoMode==="advanced"},fields:[{name:"sitemapUrls",type:"number",label:"Sitemap URL Limit",defaultValue:5e4}]},{name:"robotsTxt",type:"textarea",label:"Custom robots.txt",admin:{condition:e=>e.seoMode==="advanced"}},{name:"social",type:"group",label:"Social Media",fields:[{name:"twitterHandle",type:"text",label:"Twitter/X Handle",admin:{}},{name:"twitterCardType",type:"select",label:"Twitter Card Type",defaultValue:"summary_large_image",options:[{label:"Summary",value:"summary"},{label:"Summary with Large Image",value:"summary_large_image"},{label:"App",value:"app"},{label:"Player",value:"player"}]},{name:"fbAppId",type:"text",label:"Facebook App ID"}]},{name:"advanced",type:"group",label:"Advanced",fields:[{name:"jsonLdEnabled",type:"checkbox",label:"Enable JSON-LD",defaultValue:true,admin:{}},{name:"breadcrumbsEnabled",type:"checkbox",label:"Enable Breadcrumbs",defaultValue:true},{name:"paginationSize",type:"number",label:"Default Pagination Size",defaultValue:10}]}]};var r={slug:"social-settings",label:"Social Media",admin:{group:"settings"},access:{read:()=>true,update:()=>true},fields:[{name:"showAll",type:"checkbox",label:"Show All Platforms",defaultValue:false,admin:{description:"Toggle to show niche or secondary social platforms."}},{name:"facebook",type:"text",label:"Facebook"},{name:"twitter",type:"text",label:"Twitter/X"},{name:"instagram",type:"text",label:"Instagram"},{name:"linkedin",type:"text",label:"LinkedIn"},{name:"youtube",type:"text",label:"YouTube"},{name:"tiktok",type:"text",label:"TikTok",admin:{condition:e=>e.showAll===true}},{name:"pinterest",type:"text",label:"Pinterest",admin:{condition:e=>e.showAll===true}},{name:"discord",type:"text",label:"Discord",admin:{condition:e=>e.showAll===true}},{name:"twitch",type:"text",label:"Twitch",admin:{condition:e=>e.showAll===true}},{name:"github",type:"text",label:"GitHub",admin:{condition:e=>e.showAll===true}},{name:"mastodon",type:"text",label:"Mastodon",admin:{condition:e=>e.showAll===true}}]};var s={slug:"email-settings",label:"Email Settings",admin:{group:"settings"},access:{read:()=>true,update:()=>true},fields:[{name:"fromName",type:"text",label:"From Name",admin:{}},{name:"fromEmail",type:"email",label:"From Email",required:true,admin:{}},{name:"replyTo",type:"email",label:"Reply-To Email",admin:{}},{name:"provider",type:"select",label:"Email Provider",defaultValue:"smtp",options:[{label:"SMTP (Standard)",value:"smtp"},{label:"Resend",value:"resend"},{label:"SendGrid",value:"sendgrid"},{label:"Mailgun",value:"mailgun"},{label:"AWS SES",value:"ses"}]},{name:"smtp",type:"group",label:"SMTP Settings",admin:{condition:e=>e.provider==="smtp"},fields:[{name:"smtpService",type:"select",label:"SMTP Service",defaultValue:"custom",options:[{label:"Custom SMTP",value:"custom"},{label:"Gmail",value:"gmail"},{label:"Outlook / Office 365",value:"outlook"},{label:"Brevo (Sendinblue)",value:"brevo"},{label:"Mailgun (SMTP)",value:"mailgun-smtp"},{label:"SendGrid (SMTP)",value:"sendgrid-smtp"},{label:"Mandrill / Mailchimp",value:"mandrill"}],admin:{description:"Selecting a known service will pre-configure host and port settings."}},{name:"host",type:"text",label:"Host",admin:{condition:(e,t)=>t.smtpService==="custom",placeholder:"smtp.example.com"}},{name:"port",type:"number",label:"Port",defaultValue:587,admin:{condition:(e,t)=>t.smtpService==="custom"}},{name:"username",type:"text",label:"Username"},{name:"password",type:"password",label:"Password"},{name:"secure",type:"checkbox",label:"Use TLS/SSL",defaultValue:true}]},{name:"resend",type:"group",label:"Resend Settings",admin:{condition:e=>e.provider==="resend"},fields:[{name:"apiKey",type:"password",label:"API Key",required:true}]},{name:"sendgrid",type:"group",label:"SendGrid Settings",admin:{condition:e=>e.provider==="sendgrid"},fields:[{name:"apiKey",type:"password",label:"API Key",required:true}]},{name:"mailgun",type:"group",label:"Mailgun Settings",admin:{condition:e=>e.provider==="mailgun"},fields:[{name:"apiKey",type:"password",label:"API Key",required:true},{name:"domain",type:"text",label:"Domain",required:true},{name:"region",type:"select",label:"Region",defaultValue:"us",options:[{label:"US (United States)",value:"us"},{label:"EU (Europe)",value:"eu"}]}]},{name:"ses",type:"group",label:"AWS SES Settings",admin:{condition:e=>e.provider==="ses"},fields:[{name:"accessKeyId",type:"text",label:"Access Key ID",required:true},{name:"secretAccessKey",type:"password",label:"Secret Access Key",required:true},{name:"region",type:"text",label:"Region",defaultValue:"us-east-1",admin:{placeholder:"us-east-1"}}]},{name:"testEmailSection",type:"row",label:"Test Email",admin:{description:"Enter an email address to send a test email."},fields:[{name:"testEmail",type:"email",label:"Email",admin:{width:"300px"}},{name:"sendTestEmail",type:"action",label:"Send Test Email",admin:{action:"/api/globals/email-settings/test",method:"POST"}}]}]};var m={slug:"access-settings",label:"Access Control",admin:{group:"settings"},access:{read:()=>true,update:()=>true},fields:[{name:"enablePublicAccess",type:"checkbox",label:"Enable Public Access",defaultValue:true,admin:{}},{name:"defaultCollectionAccess",type:"select",label:"Default Collection Access",defaultValue:"read",options:[{label:"Read Only",value:"read"},{label:"Read & Create",value:"create"},{label:"Read & Create & Update",value:"update"},{label:"Full Access",value:"admin"},{label:"No Access",value:"none"}],admin:{}},{name:"apiAccess",type:"group",label:"API Access",fields:[{name:"graphqlEnabled",type:"checkbox",label:"Enable GraphQL",defaultValue:false},{name:"trpcEnabled",type:"checkbox",label:"Enable tRPC",defaultValue:false},{name:"wsEnabled",type:"checkbox",label:"Enable WebSocket",defaultValue:false},{name:"requireAuth",type:"checkbox",label:"Require Authentication",defaultValue:false},{name:"cors",type:"group",label:"CORS Settings",admin:{condition:e=>e.apiAccess?.graphqlEnabled===true},fields:[{name:"allowedOrigins",type:"textarea",label:"Allowed Origins (one per line)",admin:{placeholder:`https://example.com
2
+ https://app.example.com`}}]}]},{name:"rateLimiting",type:"group",label:"Rate Limiting Configuration",admin:{condition:e=>e.rateLimiting?.enabled===true},fields:[{name:"enabled",type:"checkbox",label:"Enable Global Rate Limiting",defaultValue:true},{name:"maxRequests",type:"number",label:"Max Requests",defaultValue:100,admin:{condition:(e,t)=>t.enabled===true}},{name:"windowMs",type:"number",label:"Window (ms)",defaultValue:6e4,admin:{condition:(e,t)=>t.enabled===true}}]}]};var Re=[{label:"United States",value:"US"},{label:"United Kingdom",value:"GB"},{label:"Canada",value:"CA"},{label:"Australia",value:"AU"},{label:"Germany",value:"DE"},{label:"France",value:"FR"},{label:"Netherlands",value:"NL"},{label:"Belgium",value:"BE"},{label:"Spain",value:"ES"},{label:"Italy",value:"IT"},{label:"Portugal",value:"PT"},{label:"Sweden",value:"SE"},{label:"Norway",value:"NO"},{label:"Denmark",value:"DK"},{label:"Finland",value:"FI"},{label:"Austria",value:"AT"},{label:"Switzerland",value:"CH"},{label:"Japan",value:"JP"},{label:"South Korea",value:"KR"},{label:"China",value:"CN"},{label:"India",value:"IN"},{label:"Brazil",value:"BR"},{label:"Mexico",value:"MX"}],b={slug:"store-settings",label:"Store Settings",admin:{group:"settings"},access:{read:()=>true,update:()=>true},fields:[{name:"storeName",type:"text",label:"Store Name",required:true},{name:"storeEmail",type:"email",label:"Contact Email",required:true},{name:"storePhone",type:"text",label:"Phone Number"},{name:"address",type:"group",label:"Store Address",fields:[{name:"street",type:"text",label:"Street Address"},{name:"city",type:"text",label:"City"},{name:"state",type:"text",label:"State/Province"},{name:"postalCode",type:"text",label:"Postal Code"},{name:"country",type:"select",label:"Country",options:Re}]},{name:"currency",type:"group",label:"Currency",fields:[{name:"code",type:"select",label:"Currency Code",defaultValue:"USD",options:[{label:"USD - US Dollar",value:"USD"},{label:"EUR - Euro",value:"EUR"},{label:"GBP - British Pound",value:"GBP"},{label:"CAD - Canadian Dollar",value:"CAD"},{label:"AUD - Australian Dollar",value:"AUD"},{label:"JPY - Japanese Yen",value:"JPY"},{label:"CNY - Chinese Yuan",value:"CNY"},{label:"INR - Indian Rupee",value:"INR"},{label:"BRL - Brazilian Real",value:"BRL"},{label:"MXN - Mexican Peso",value:"MXN"}]},{name:"symbol",type:"text",label:"Symbol",defaultValue:"$"},{name:"position",type:"select",label:"Symbol Position",defaultValue:"before",options:[{label:"Before amount",value:"before"},{label:"After amount",value:"after"}]},{name:"decimals",type:"number",label:"Decimal Places",defaultValue:2}]},{name:"tax",type:"group",label:"Tax Logistics",admin:{condition:e=>e.tax?.enabled===true},fields:[{name:"enabled",type:"checkbox",label:"Enable Tax",defaultValue:true},{name:"rate",type:"number",label:"Tax Rate (%)",admin:{placeholder:"10",condition:(e,t)=>t.enabled===true}},{name:"includedInPrice",type:"checkbox",label:"Tax Included in Prices",admin:{condition:(e,t)=>t.enabled===true}},{name:"taxId",type:"text",label:"Tax ID / VAT Number",admin:{condition:(e,t)=>t.enabled===true}}]},{name:"shipping",type:"group",label:"Shipping Logic",admin:{condition:e=>e.shipping?.enableLocalPickup===true||e.shipping?.flatRate>0},fields:[{name:"enableLocalPickup",type:"checkbox",label:"Enable Local Pickup",defaultValue:true},{name:"flatRate",type:"number",label:"Flat Rate Shipping Fee",admin:{}},{name:"freeShippingThreshold",type:"number",label:"Free Shipping Minimum",admin:{condition:(e,t)=>t.flatRate>0}}]},{name:"orders",type:"group",label:"Orders",fields:[{name:"orderNumberPrefix",type:"text",label:"Order Number Prefix",defaultValue:"ORD",admin:{}},{name:"allowGuestCheckout",type:"checkbox",label:"Allow Guest Checkout",defaultValue:true},{name:"requirePhone",type:"checkbox",label:"Require Phone Number",defaultValue:true}]}]};var g={slug:"payment-settings",label:"Payment Settings",admin:{group:"settings"},access:{read:()=>true,update:()=>true},fields:[{name:"testMode",type:"checkbox",label:"Test Mode",defaultValue:true,admin:{}},{name:"provider",type:"select",label:"Primary Payment Provider",defaultValue:"stripe",options:[{label:"Stripe",value:"stripe"},{label:"PayPal",value:"paypal"},{label:"Square",value:"square"},{label:"Manual Methods Only",value:"manual"}]},{name:"stripe",type:"group",label:"Stripe",admin:{condition:e=>e.provider==="stripe"},fields:[{name:"enabled",type:"checkbox",label:"Enable Stripe",defaultValue:false},{name:"publishableKey",type:"text",label:"Publishable Key",admin:{placeholder:"pk_live_..."}},{name:"secretKey",type:"password",label:"Secret Key"},{name:"webhookSecret",type:"password",label:"Webhook Secret",admin:{}}]},{name:"paypal",type:"group",label:"PayPal",admin:{condition:e=>e.provider==="paypal"},fields:[{name:"enabled",type:"checkbox",label:"Enable PayPal",defaultValue:false},{name:"clientId",type:"text",label:"Client ID"},{name:"clientSecret",type:"password",label:"Client Secret"},{name:"mode",type:"select",label:"Mode",defaultValue:"sandbox",options:[{label:"Sandbox (Test)",value:"sandbox"},{label:"Live",value:"live"}]}]},{name:"square",type:"group",label:"Square",admin:{condition:e=>e.provider==="square"},fields:[{name:"enabled",type:"checkbox",label:"Enable Square",defaultValue:false},{name:"applicationId",type:"text",label:"Application ID"},{name:"accessToken",type:"password",label:"Access Token"},{name:"locationId",type:"text",label:"Location ID"}]},{name:"methods",type:"group",label:"Manual Payment Methods",fields:[{name:"cod",type:"checkbox",label:"Cash on Delivery",defaultValue:true},{name:"bankTransfer",type:"checkbox",label:"Bank Transfer",defaultValue:true},{name:"cash",type:"checkbox",label:"Cash (Local Pickup)",defaultValue:true},{name:"check",type:"checkbox",label:"Check",defaultValue:false}]},{name:"bankTransfer",type:"group",label:"Bank Transfer Details",admin:{},fields:[{name:"bankName",type:"text",label:"Bank Name"},{name:"accountName",type:"text",label:"Account Name"},{name:"accountNumber",type:"text",label:"Account Number"},{name:"routingNumber",type:"text",label:"Routing/Sort Code"},{name:"iban",type:"text",label:"IBAN"},{name:"swift",type:"text",label:"SWIFT/BIC"}]}]};var p={slug:"system",label:"System",admin:{group:"settings",description:"Core system configuration and secrets"},access:{read:()=>true,update:()=>true},fields:[{name:"appSecret",type:"secret",label:"App Secret",required:false,admin:{description:"Auto-generated master secret used for encryption and auth. Auto-created if empty on load.",readOnly:true}},{name:"encryptionKey",type:"text",label:"Encryption Key",required:false,admin:{description:"Auto-generated key for data encryption at rest.",readOnly:true}},{name:"sessionMaxAge",type:"number",label:"Session Max Age (days)",required:false,defaultValue:7,admin:{description:"Maximum session duration in days"}},{name:"maxSessionsPerUser",type:"number",label:"Max Sessions Per User",required:false,defaultValue:3,admin:{description:"Maximum concurrent sessions allowed per user"}}]};var d={slug:"header-settings",label:"Header Settings",admin:{group:"Header Configuration",description:"Manage global header settings like the logo and navigation."},access:{read:()=>true,update:()=>true},fields:[{name:"siteLogo",type:"upload",relationTo:"media",label:"Logo"},{name:"siteMenu",type:"relationship",relationTo:"menu",label:"Menu"},{name:"headerText",type:"richtext",label:"Text"},{name:"headerButtons",type:"array",label:"Buttons",fields:[{name:"button",type:"group",label:"Button",fields:[{name:"text",type:"text",label:"Text"},{name:"url",type:"text",label:"URL"}]}]}]};var u={slug:"footer-settings",label:"Footer Settings",admin:{group:"Footer Configuration",description:"Manage global footer settings like the logo, text, and links."},access:{read:()=>true,update:()=>true},fields:[{name:"footerLogo",type:"upload",relationTo:"media",label:"Logo"},{name:"footerText",type:"richtext",label:"Text"},{name:"footerAddress",type:"text",label:"Address"},{name:"footerPhone",type:"text",label:"Phone"},{name:"footerEmail",type:"text",label:"Email"},{name:"footerHours",type:"array",label:"Hours",fields:[{name:"hour",type:"text",label:"Hour"}]},{name:"footerMenu",type:"array",label:"Menu",fields:[{name:"menu",type:"relationship",relationTo:"menu"}]},{name:"footerButtons",type:"array",label:"Buttons",fields:[{name:"button",type:"group",label:"Button",fields:[{name:"text",type:"text",label:"Text"},{name:"url",type:"text",label:"URL"}]}]},{name:"footerForm",type:"relationship",relationTo:"forms",label:"Form"}]};var E=[o,i,r,s,a$1,m,b,g,p,d,u],y=[o,i,r,s,a$1,m,p,d,u],N={[o.slug]:o,[i.slug]:i,[r.slug]:r,[s.slug]:s,[a$1.slug]:a$1,[m.slug]:m,[b.slug]:b,[g.slug]:g,[p.slug]:p,[d.slug]:d,[u.slug]:u};function j(e){switch(e){case "minimal":return [o,i];case "starter":case "blog":return y;case "ecommerce":case "kitchen-sink":return E;default:return y}}function x(e){let t=new Map;for(let l of e)t.has(l.slug)||t.set(l.slug,l);return Array.from(t.values())}var le=[...Object.values(O),...Object.values(F),...Object.values(q),...Object.values(D),...Object.values(U)],R=[...le,...P,...Object.values(b$1),...Object.values(w)],ma={minimal:x([...Object.values(S),...le]),starter:x([...Object.values(v),...R]),blog:x([...Object.values(T),...R]),ecommerce:x([...Object.values(k),...Object.values(G),...Object.values(L),...Object.values(I),...Object.values(M),...Object.values(A),...R]),"kitchen-sink":x([...Object.values(S),...Object.values(v),...Object.values(T),...Object.values(k),...Object.values(V),...Object.values(G),...Object.values(L),...Object.values(I),...Object.values(M),...Object.values(A),...R])};function da(e){let t=e.collections?[...e.collections]:[],l=e.globals?[...e.globals]:[];e.includeMedia!==false&&t.push(...P);let f=e.template?j(e.template):y;if(e.includeSettings){if(e.includeSettings==="all")l.push(...E);else if(e.includeSettings==="core")l.push(...y);else if(Array.isArray(e.includeSettings))for(let C of e.includeSettings){let h=N[C];h&&l.push(h);}}else (!e.globals||e.globals.length===0)&&l.push(...f);if(e.excludeSettings&&e.excludeSettings.length>0){let C=new Set(e.excludeSettings),h=l.filter(H=>!C.has(H.slug)&&!C.has(H.label?.toLowerCase().replace(/\s+/g,"-")||""));l.length=0,l.push(...h);}return {collections:t.length>0?t:void 0,globals:l.length>0?l:void 0}}
3
+ export{M as A,te as B,D as C,ae as D,U as E,o as F,i as G,r as H,s as I,m as J,b as K,g as L,p as M,d as N,u as O,E as P,y as Q,N as R,j as S,ma as T,da as U,S as a,v as b,T as c,oe as d,k as e,ie as f,V as g,K as h,P as i,z as j,w as k,W as l,O as m,X as n,F as o,_ as p,q,J as r,A as s,Q as t,G as u,$ as v,L as w,Z as x,I as y,ee as z};