@isardsat/editorial-admin 6.4.4 → 6.5.1

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 (23) hide show
  1. package/build/client/assets/{authSlice-Ck6mjgyY.js → authSlice-BC3X-Dze.js} +141 -141
  2. package/build/client/assets/{button-D_tNOZW3.js → button-DYtHJlPL.js} +1 -1
  3. package/build/client/assets/{dashboard-CCf5hKPx.js → dashboard-eLqz7BO7.js} +1 -1
  4. package/build/client/assets/{dashboard._collection-wP1ZB_LW.js → dashboard._collection-BBg-A9Sj.js} +1 -1
  5. package/build/client/assets/{dashboard._collection._document-CjPV6DBM.js → dashboard._collection._document-5DoDCjb9.js} +1 -1
  6. package/build/client/assets/{dashboard._collection.new-BJEQdRj5.js → dashboard._collection.new-CZuGYJjj.js} +1 -1
  7. package/build/client/assets/{dashboard._layout-DvaVEgFX.js → dashboard._layout-D8eDuulk.js} +1 -1
  8. package/build/client/assets/{dashboard.files-D61rcU4r.js → dashboard.files-DzKr0fnV.js} +1 -1
  9. package/build/client/assets/files-BpDIfAek.js +26 -0
  10. package/build/client/assets/{home-B0S_vIyA.js → home-BMO8Phzv.js} +1 -1
  11. package/build/client/assets/{index-b67bZzAe.js → index-BCGL68Qt.js} +1 -1
  12. package/build/client/assets/{index-BKOWzfnu.js → index-BhhxCYB_.js} +1 -1
  13. package/build/client/assets/{index-BCIQh_1v.js → index-DuwVf14f.js} +1 -1
  14. package/build/client/assets/{index-BkW3jRP3.js → index-Dycitln2.js} +1 -1
  15. package/build/client/assets/{itemForm-DeCuor51.js → itemForm-C5JHfZSI.js} +1 -1
  16. package/build/client/assets/{manifest-17a9c848.js → manifest-d31f28c7.js} +1 -1
  17. package/build/client/assets/{root-DwCI6c10.js → root-Bmrk0090.js} +1 -1
  18. package/build/client/assets/{spinner-C6NBcdtB.js → spinner-C3uu_C2V.js} +1 -1
  19. package/build/client/assets/{types-DI1nugUt.js → types-BFhFSnS8.js} +1 -1
  20. package/build/client/assets/{utils-DN8wQ0jG.js → utils-BdGM_Id-.js} +1 -1
  21. package/build/client/index.html +2 -2
  22. package/package.json +2 -2
  23. package/build/client/assets/files-BkbeSoaZ.js +0 -26
@@ -1 +1 @@
1
- import{p as a}from"./chunk-EF7DTUVF-MlADC7xe.js";import{S as o,c as d}from"./index-b67bZzAe.js";import{a as u}from"./utils-DN8wQ0jG.js";const c=d("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function b({className:e,variant:r,size:t,asChild:i=!1,...s}){const n=i?o:"button";return a.jsx(n,{"data-slot":"button",className:u(c({variant:r,size:t,className:e})),...s})}export{b as B,c as b};
1
+ import{p as a}from"./chunk-EF7DTUVF-MlADC7xe.js";import{S as o,c as d}from"./index-BCGL68Qt.js";import{a as u}from"./utils-BdGM_Id-.js";const c=d("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function b({className:e,variant:r,size:t,asChild:i=!1,...s}){const n=i?o:"button";return a.jsx(n,{"data-slot":"button",className:u(c({variant:r,size:t,className:e})),...s})}export{b as B,c as b};
@@ -1 +1 @@
1
- import{p as e,a as j,x as b,w}from"./chunk-EF7DTUVF-MlADC7xe.js";import{a as m,j as u,d as C,b as N,k as v,l as T}from"./utils-DN8wQ0jG.js";import{c as y,u as D,T as R,a as L,b as x,d as k,f as p,e as A,g as H,h as I}from"./index-BkW3jRP3.js";function G({className:a,...t}){return e.jsx("div",{"data-slot":"skeleton",className:m("bg-accent animate-pulse rounded-md",a),...t})}function f({className:a,title:t,value:r,isLoading:n,...s}){return e.jsxs("div",{className:m("border border-border rounded-xl p-6",a),...s,children:[e.jsx("h3",{className:"text-xs text-muted-foreground",children:t}),n?e.jsx(G,{className:"h-[2.25rem] w-16"}):e.jsx("p",{className:"text-lg sm:text-3xl font-bold leading-none",children:r})]})}const i=y(),c=[i.accessor("id",{header(){return e.jsx("span",{className:"block w-48 max-w-48",children:"ID"})},cell(a){const t=a.getValue();return e.jsx("span",{title:t,className:"block overflow-hidden text-ellipsis w-48 max-w-48 whitespace-nowrap",children:t})}}),i.accessor("createdAt",{header:"Created",cell(a){return u(new Date(a.getValue()))}}),i.accessor("updatedAt",{header:"Updated",cell(a){return u(new Date(a.getValue()))}})];function M(){const{data:a}=C(),{data:t}=N(),r=j.useMemo(()=>!a||!t?[]:Object.entries(a).filter(([o])=>o in t).reduce((o,[d,h])=>o.concat(Object.values(h).map(g=>({...g,type:d}))),[]).toSorted((o,d)=>o.updatedAt>d.updatedAt?-1:1).slice(0,6),[a,t]),n=D({data:r,columns:c,getCoreRowModel:I()});return e.jsx("div",{className:"rounded-sm border overflow-auto",children:e.jsxs(R,{children:[e.jsx(L,{children:n.getHeaderGroups().map(s=>e.jsx(x,{className:"grid",style:{gridTemplateColumns:`repeat(${c.length}, minmax(200px, 1fr))`},children:s.headers.map(l=>e.jsx(k,{children:l.isPlaceholder?null:p(l.column.columnDef.header,l.getContext())},l.id))},s.id))}),e.jsx(A,{children:n.getRowModel().rows.map(s=>e.jsx(b,{to:`/admin/dashboard/${s.original.type}/${s.original.id}`,children:e.jsx(x,{className:"grid",style:{gridTemplateColumns:`repeat(${c.length}, minmax(200px, 1fr))`},children:s.getVisibleCells().map(l=>e.jsx(H,{className:m("p-2"),children:p(l.column.columnDef.cell,l.getContext())},l.id))},s.id)},s.original.id))})]})})}const S=w(function(){const{data:t,isLoading:r}=v(),{data:n,isLoading:s}=T();return e.jsx("div",{className:"flex flex-1 h-full p-4 gap-4",children:e.jsxs("div",{className:"flex flex-col overflow-hidden flex-1 gap-4",children:[e.jsxs("div",{className:"flex flex-row gap-2 grid-cols-12",children:[e.jsx(f,{className:"w-full sm:w-44",title:"Items",value:t,isLoading:r}),e.jsx(f,{className:"w-full sm:w-44",title:"Files",value:n,isLoading:s})]}),e.jsxs("div",{className:"flex flex-col gap-4 last:mb-20",children:[e.jsx("h2",{className:"scroll-mt-[4.5rem] text-xl font-semibold leading-none capitalize",children:"Recently Updated"}),e.jsx(M,{})]})]})})});export{S as default};
1
+ import{p as e,a as j,x as b,w}from"./chunk-EF7DTUVF-MlADC7xe.js";import{a as m,j as u,d as C,b as N,k as v,l as T}from"./utils-BdGM_Id-.js";import{c as y,u as D,T as R,a as L,b as x,d as k,f as p,e as A,g as H,h as I}from"./index-Dycitln2.js";function G({className:a,...t}){return e.jsx("div",{"data-slot":"skeleton",className:m("bg-accent animate-pulse rounded-md",a),...t})}function f({className:a,title:t,value:r,isLoading:n,...s}){return e.jsxs("div",{className:m("border border-border rounded-xl p-6",a),...s,children:[e.jsx("h3",{className:"text-xs text-muted-foreground",children:t}),n?e.jsx(G,{className:"h-[2.25rem] w-16"}):e.jsx("p",{className:"text-lg sm:text-3xl font-bold leading-none",children:r})]})}const i=y(),c=[i.accessor("id",{header(){return e.jsx("span",{className:"block w-48 max-w-48",children:"ID"})},cell(a){const t=a.getValue();return e.jsx("span",{title:t,className:"block overflow-hidden text-ellipsis w-48 max-w-48 whitespace-nowrap",children:t})}}),i.accessor("createdAt",{header:"Created",cell(a){return u(new Date(a.getValue()))}}),i.accessor("updatedAt",{header:"Updated",cell(a){return u(new Date(a.getValue()))}})];function M(){const{data:a}=C(),{data:t}=N(),r=j.useMemo(()=>!a||!t?[]:Object.entries(a).filter(([o])=>o in t).reduce((o,[d,h])=>o.concat(Object.values(h).map(g=>({...g,type:d}))),[]).toSorted((o,d)=>o.updatedAt>d.updatedAt?-1:1).slice(0,6),[a,t]),n=D({data:r,columns:c,getCoreRowModel:I()});return e.jsx("div",{className:"rounded-sm border overflow-auto",children:e.jsxs(R,{children:[e.jsx(L,{children:n.getHeaderGroups().map(s=>e.jsx(x,{className:"grid",style:{gridTemplateColumns:`repeat(${c.length}, minmax(200px, 1fr))`},children:s.headers.map(l=>e.jsx(k,{children:l.isPlaceholder?null:p(l.column.columnDef.header,l.getContext())},l.id))},s.id))}),e.jsx(A,{children:n.getRowModel().rows.map(s=>e.jsx(b,{to:`/admin/dashboard/${s.original.type}/${s.original.id}`,children:e.jsx(x,{className:"grid",style:{gridTemplateColumns:`repeat(${c.length}, minmax(200px, 1fr))`},children:s.getVisibleCells().map(l=>e.jsx(H,{className:m("p-2"),children:p(l.column.columnDef.cell,l.getContext())},l.id))},s.id)},s.original.id))})]})})}const S=w(function(){const{data:t,isLoading:r}=v(),{data:n,isLoading:s}=T();return e.jsx("div",{className:"flex flex-1 h-full p-4 gap-4",children:e.jsxs("div",{className:"flex flex-col overflow-hidden flex-1 gap-4",children:[e.jsxs("div",{className:"flex flex-row gap-2 grid-cols-12",children:[e.jsx(f,{className:"w-full sm:w-44",title:"Items",value:t,isLoading:r}),e.jsx(f,{className:"w-full sm:w-44",title:"Files",value:n,isLoading:s})]}),e.jsxs("div",{className:"flex flex-col gap-4 last:mb-20",children:[e.jsx("h2",{className:"scroll-mt-[4.5rem] text-xl font-semibold leading-none capitalize",children:"Recently Updated"}),e.jsx(M,{})]})]})})});export{S as default};
@@ -1,4 +1,4 @@
1
- import{p as e,a as u,x as p,R as V,w as $}from"./chunk-EF7DTUVF-MlADC7xe.js";import{B as L}from"./button-D_tNOZW3.js";import{j as C,m as v,d as R,n as D,o as F,a as I}from"./utils-DN8wQ0jG.js";import{c as E,u as H,T as P,a as S,b as N,d as B,f as b,e as O,g as G,h as Q}from"./index-BkW3jRP3.js";import{c as o}from"./createLucideIcon-BJQzFwzJ.js";import{C as f}from"./calendar-6ih_JEvR.js";import{T as q,F as A}from"./trash-CN5HT_ZJ.js";import{E as U}from"./external-link-D1If5twJ.js";import"./index-b67bZzAe.js";/**
1
+ import{p as e,a as u,x as p,R as V,w as $}from"./chunk-EF7DTUVF-MlADC7xe.js";import{B as L}from"./button-DYtHJlPL.js";import{j as C,m as v,d as R,n as D,o as F,a as I}from"./utils-BdGM_Id-.js";import{c as E,u as H,T as P,a as S,b as N,d as B,f as b,e as O,g as G,h as Q}from"./index-Dycitln2.js";import{c as o}from"./createLucideIcon-BJQzFwzJ.js";import{C as f}from"./calendar-6ih_JEvR.js";import{T as q,F as A}from"./trash-CN5HT_ZJ.js";import{E as U}from"./external-link-D1If5twJ.js";import"./index-BCGL68Qt.js";/**
2
2
  * @license lucide-react v0.487.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{w as c,p as e}from"./chunk-EF7DTUVF-MlADC7xe.js";import{I as p}from"./itemForm-DeCuor51.js";import{m as n,p as l}from"./utils-DN8wQ0jG.js";import"./button-D_tNOZW3.js";import"./index-b67bZzAe.js";import"./types-DI1nugUt.js";import"./index-BKOWzfnu.js";import"./index-xBXWoUIa.js";import"./createLucideIcon-BJQzFwzJ.js";import"./index-BCIQh_1v.js";import"./authSlice-Ck6mjgyY.js";import"./upload-CopmcV94.js";import"./calendar-6ih_JEvR.js";import"./files-BkbeSoaZ.js";import"./trash-CN5HT_ZJ.js";import"./external-link-D1If5twJ.js";const N=c(function({params:r}){const{collectionId:t,documentId:i}=r,{data:o,isFetching:s}=n(t),{data:m,isFetching:a}=l({itemType:t,id:i});return!o||!m||(s||a)?null:e.jsx("div",{className:"overflow-auto scrollbar-stable",children:e.jsx("div",{className:"flex p-4 gap-4",children:e.jsx(p,{itemType:t,fields:o.fields,data:m},`${t}-${i}`)})})});export{N as default};
1
+ import{w as c,p as e}from"./chunk-EF7DTUVF-MlADC7xe.js";import{I as p}from"./itemForm-C5JHfZSI.js";import{m as n,p as l}from"./utils-BdGM_Id-.js";import"./button-DYtHJlPL.js";import"./index-BCGL68Qt.js";import"./types-BFhFSnS8.js";import"./index-BhhxCYB_.js";import"./index-xBXWoUIa.js";import"./createLucideIcon-BJQzFwzJ.js";import"./index-DuwVf14f.js";import"./authSlice-BC3X-Dze.js";import"./upload-CopmcV94.js";import"./calendar-6ih_JEvR.js";import"./files-BpDIfAek.js";import"./trash-CN5HT_ZJ.js";import"./external-link-D1If5twJ.js";const N=c(function({params:r}){const{collectionId:t,documentId:i}=r,{data:o,isFetching:s}=n(t),{data:m,isFetching:a}=l({itemType:t,id:i});return!o||!m||(s||a)?null:e.jsx("div",{className:"overflow-auto scrollbar-stable",children:e.jsx("div",{className:"flex p-4 gap-4",children:e.jsx(p,{itemType:t,fields:o.fields,data:m},`${t}-${i}`)})})});export{N as default};
@@ -1 +1 @@
1
- import{w as e,p as o}from"./chunk-EF7DTUVF-MlADC7xe.js";import{I as m}from"./itemForm-DeCuor51.js";import{m as p}from"./utils-DN8wQ0jG.js";import"./button-D_tNOZW3.js";import"./index-b67bZzAe.js";import"./types-DI1nugUt.js";import"./index-BKOWzfnu.js";import"./index-xBXWoUIa.js";import"./createLucideIcon-BJQzFwzJ.js";import"./index-BCIQh_1v.js";import"./authSlice-Ck6mjgyY.js";import"./upload-CopmcV94.js";import"./calendar-6ih_JEvR.js";import"./files-BkbeSoaZ.js";import"./trash-CN5HT_ZJ.js";import"./external-link-D1If5twJ.js";const P=e(function({params:i}){const{collectionId:t}=i,{data:r}=p(t);return r?o.jsx("div",{className:"overflow-auto",children:o.jsx("div",{className:"flex p-4 gap-4",children:o.jsx(m,{itemType:t,fields:r.fields,isNew:!0})})}):null});export{P as default};
1
+ import{w as e,p as o}from"./chunk-EF7DTUVF-MlADC7xe.js";import{I as m}from"./itemForm-C5JHfZSI.js";import{m as p}from"./utils-BdGM_Id-.js";import"./button-DYtHJlPL.js";import"./index-BCGL68Qt.js";import"./types-BFhFSnS8.js";import"./index-BhhxCYB_.js";import"./index-xBXWoUIa.js";import"./createLucideIcon-BJQzFwzJ.js";import"./index-DuwVf14f.js";import"./authSlice-BC3X-Dze.js";import"./upload-CopmcV94.js";import"./calendar-6ih_JEvR.js";import"./files-BpDIfAek.js";import"./trash-CN5HT_ZJ.js";import"./external-link-D1If5twJ.js";const P=e(function({params:i}){const{collectionId:t}=i,{data:r}=p(t);return r?o.jsx("div",{className:"overflow-auto",children:o.jsx("div",{className:"flex p-4 gap-4",children:o.jsx(m,{itemType:t,fields:r.fields,isNew:!0})})}):null});export{P as default};
@@ -1,4 +1,4 @@
1
- import{p as e,a as d,x as y,y as U,v as le,z as ce,R as ue,w as he,O as pe}from"./chunk-EF7DTUVF-MlADC7xe.js";import{u as xe,e as D,h as fe}from"./authSlice-Ck6mjgyY.js";import{a as r,b as W,d as be,f as ge,g as me,h as je,u as ve,i as we}from"./utils-DN8wQ0jG.js";import{R as Q,C as X,a as Z,X as Y,T as J,D as ee,P as te,O as ae,b as ye,c as Ne,d as Ce,e as Se,f as ke,g as _e,A as Me,u as ze,h as De}from"./index-BCIQh_1v.js";import{B as _}from"./button-D_tNOZW3.js";import{c as b}from"./createLucideIcon-BJQzFwzJ.js";import{S as E,c as Ee,u as Oe}from"./index-b67bZzAe.js";import{u as Re,c as Ae,P as O,a as Pe,b as Ie,d as Te}from"./index-BKOWzfnu.js";import{C as L,U as Le}from"./upload-CopmcV94.js";import{E as $e}from"./external-link-D1If5twJ.js";import"./index-xBXWoUIa.js";/**
1
+ import{p as e,a as d,x as y,y as U,v as le,z as ce,R as ue,w as he,O as pe}from"./chunk-EF7DTUVF-MlADC7xe.js";import{u as xe,e as D,h as fe}from"./authSlice-BC3X-Dze.js";import{a as r,b as W,d as be,f as ge,g as me,h as je,u as ve,i as we}from"./utils-BdGM_Id-.js";import{R as Q,C as X,a as Z,X as Y,T as J,D as ee,P as te,O as ae,b as ye,c as Ne,d as Ce,e as Se,f as ke,g as _e,A as Me,u as ze,h as De}from"./index-DuwVf14f.js";import{B as _}from"./button-DYtHJlPL.js";import{c as b}from"./createLucideIcon-BJQzFwzJ.js";import{S as E,c as Ee,u as Oe}from"./index-BCGL68Qt.js";import{u as Re,c as Ae,P as O,a as Pe,b as Ie,d as Te}from"./index-BhhxCYB_.js";import{C as L,U as Le}from"./upload-CopmcV94.js";import{E as $e}from"./external-link-D1If5twJ.js";import"./index-xBXWoUIa.js";/**
2
2
  * @license lucide-react v0.487.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{w as e,p as o}from"./chunk-EF7DTUVF-MlADC7xe.js";import{F as r}from"./files-BkbeSoaZ.js";import"./authSlice-Ck6mjgyY.js";import"./utils-DN8wQ0jG.js";import"./index-b67bZzAe.js";import"./upload-CopmcV94.js";import"./createLucideIcon-BJQzFwzJ.js";import"./trash-CN5HT_ZJ.js";const n=e(function(){return o.jsx("div",{className:"overflow-auto flex flex-1 p-4 gap-4",children:o.jsx("div",{className:"flex flex-col flex-1 gap-8",children:o.jsx(r,{})})})});export{n as default};
1
+ import{w as e,p as o}from"./chunk-EF7DTUVF-MlADC7xe.js";import{F as r}from"./files-BpDIfAek.js";import"./authSlice-BC3X-Dze.js";import"./utils-BdGM_Id-.js";import"./index-BCGL68Qt.js";import"./upload-CopmcV94.js";import"./createLucideIcon-BJQzFwzJ.js";import"./trash-CN5HT_ZJ.js";const n=e(function(){return o.jsx("div",{className:"overflow-auto flex flex-1 p-4 gap-4",children:o.jsx("div",{className:"flex flex-col flex-1 gap-8",children:o.jsx(r,{})})})});export{n as default};
@@ -0,0 +1,26 @@
1
+ import{p as e,a as g,x as F}from"./chunk-EF7DTUVF-MlADC7xe.js";import{e as v,m as y}from"./authSlice-BC3X-Dze.js";import{a as j,q as z,v as C,w as $,x as M,u as D,y as U,o as _}from"./utils-BdGM_Id-.js";import{S as H,c as L}from"./index-BCGL68Qt.js";import{U as b,C as S}from"./upload-CopmcV94.js";import{F as T,T as I}from"./trash-CN5HT_ZJ.js";import{c as m}from"./createLucideIcon-BJQzFwzJ.js";/**
2
+ * @license lucide-react v0.487.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const V=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],P=m("copy",V);/**
7
+ * @license lucide-react v0.487.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const q=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],E=m("file-text",q);/**
12
+ * @license lucide-react v0.487.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const R=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],Z=m("file",R);/**
17
+ * @license lucide-react v0.487.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const G=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],Q=m("folder-open",G);/**
22
+ * @license lucide-react v0.487.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const W=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],B=m("folder",W),O=L("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function A({className:s,variant:i,asChild:l=!1,...o}){const n=l?H:"span";return e.jsx(n,{"data-slot":"badge",className:j(O({variant:i}),s),...o})}const J=["txt","md","html","pdf"],K=["svg","webp","png","jpeg","jpg"],X=[{Icon:T,test:s=>K.some(i=>s.name.endsWith(i))},{Icon:E,test:s=>J.some(i=>s.name.endsWith(i))}],Y={Icon:Z},N=({node:s,level:i=0,onDelete:l,onChange:o,disableActions:n,onUpload:p,onCreateFolder:u})=>{const[d,f]=g.useState(!1),{data:h}=D();v(y);const a=X.find(r=>r.test(s))??Y,t=s.type==="directory",c=t||o?"div":F,w=()=>{t&&f(!d)},k=r=>{const x=r.target.files;x&&p&&p(s.path,x)};return e.jsxs("div",{className:"select-none",children:[e.jsxs(c,{to:`/${s.relativePath}`,target:"_blank",className:"flex items-center gap-2 h-10 p-2 group hover:bg-muted/50 cursor-pointer",style:{paddingLeft:`calc(0.5rem + ${i*20}px)`},onClick:t?w:o?()=>o(s.isLarge?`${h?.largeFilesUrl}/${s.relativePath}`:s.relativePath):void 0,children:[t?e.jsx(S,{size:16,className:j("transition-transform",{"rotate-180":d})}):e.jsx("div",{className:"w-4"}),e.jsxs("div",{className:"flex flex-grow w-24 items-center gap-2 ml-2",children:[t?d?e.jsx(Q,{size:16,className:"text-yellow-500"}):e.jsx(B,{size:16,className:"text-yellow-500"}):e.jsx(a.Icon,{size:16,className:" text-gray-500"}),e.jsxs("span",{className:"flex gap-2 items-center text-sm whitespace-nowrap text-ellipsis overflow-hidden w-full",children:[!t&&s.isLarge&&e.jsx(A,{variant:"outline",children:"Large"}),s.name]})]}),e.jsx("div",{className:"flex w-24 justify-end gap-2",children:e.jsx("span",{className:"text-sm text-gray-500",children:t?"--":U(s.size)})}),!n&&e.jsxs("div",{className:"flex items-center gap-1 ml-4 group-hover:visible invisible z-50",children:[t&&e.jsxs(e.Fragment,{children:[e.jsx("input",{type:"file",multiple:!0,onChange:k,className:"hidden",id:`dir-upload-${s.name}-${i}`}),e.jsxs("label",{htmlFor:`dir-upload-${s.name}-${i}`,className:"hover:text-blue-500 p-1 hover:bg-muted rounded-sm cursor-pointer",onClick:r=>{r.stopPropagation()},children:[e.jsx(b,{size:16}),e.jsx("span",{className:"sr-only",children:"Upload files to this folder"})]})]}),e.jsxs("button",{className:_("hover:text-yellow-500 p-1 hover:bg-muted rounded-sm",t&&"hidden"),onClick:r=>{r.preventDefault(),r.stopPropagation(),navigator.clipboard.writeText(s.path)},children:[e.jsx(P,{size:16}),e.jsx("span",{className:"sr-only",children:"Copy file URL"})]}),e.jsxs("button",{className:"hover:text-red-500 p-1 hover:bg-muted rounded-sm",onClick:r=>{r.preventDefault(),r.stopPropagation(),l(s.path)},children:[e.jsx(I,{size:16}),e.jsxs("span",{className:"sr-only",children:["Delete this ",t?"folder":"file"]})]})]})]}),t&&d&&s.children&&e.jsx("div",{children:s.children.map((r,x)=>e.jsx(N,{node:r,level:i+1,onDelete:l,onChange:o,disableActions:n,onUpload:p,onCreateFolder:u},`${r.name}-${x}`))})]})};function le({disableActions:s,onChange:i}){const{data:l}=z(),[o]=C(),[n]=$(),[p]=M();v(y);const u=async a=>{const t=a.target.files;if(t)try{await n({files:t}).unwrap()}catch(c){console.error("Upload failed:",c)}},d=async(a,t)=>{try{await n({files:t,path:a}).unwrap()}catch(c){console.error("Upload failed:",c)}},f=async(a,t)=>{try{await p({name:t,path:a}).unwrap()}catch(c){console.error("Create folder failed:",c)}},h=g.useMemo(()=>l?.toSorted((a,t)=>a.type==="directory"&&t.type!=="directory"?-1:a.type!=="directory"&&t.type==="directory"?1:a.name.localeCompare(t.name)).map(a=>e.jsx(N,{node:a,onDelete:o,onChange:i,disableActions:s,onUpload:d,onCreateFolder:f},a.name)),[l,s,i]);return e.jsxs("div",{className:"overflow-auto h-full max-w-[800px] rounded-xl border",children:[e.jsxs("div",{className:"sticky top-0 bg-white flex items-center gap-2 py-1 px-2 border-b group",children:[e.jsx("div",{className:"w-4"}),e.jsx("div",{className:"flex flex-grow items-center gap-2 ml-2",children:e.jsx("span",{className:"text-sm font-semibold",children:"Name"})}),e.jsx("div",{className:"flex w-24 items-center gap-2 ml-2",children:e.jsx("span",{className:"text-sm font-semibold",children:"Size"})}),!s&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("input",{type:"file",multiple:!0,onChange:u,className:"hidden",id:"file-upload"}),e.jsxs("label",{htmlFor:"file-upload",className:"hover:text-blue-500 p-1 hover:bg-muted rounded-sm cursor-pointer",children:[e.jsx(b,{size:16}),e.jsx("span",{className:"sr-only",children:"Upload files"})]})]})]}),h]})}export{le as F};
@@ -1 +1 @@
1
- import{a as p,p as e,w as f,v as b}from"./chunk-EF7DTUVF-MlADC7xe.js";import{B as g}from"./button-D_tNOZW3.js";import{o as N,b as y,s as d,u as w,F,a as n,c as t,d as x,e as i,I as u,f as m,C as v,t as C}from"./types-DI1nugUt.js";import{S as L}from"./spinner-C6NBcdtB.js";import{u as S,e as c,l as E}from"./authSlice-Ck6mjgyY.js";import"./index-b67bZzAe.js";import"./utils-DN8wQ0jG.js";import"./index-BKOWzfnu.js";import"./index-xBXWoUIa.js";import"./createLucideIcon-BJQzFwzJ.js";const k=N({email:d().nonempty("Please enter your email").email(),password:d().nonempty("Please enter your password"),remember:y()});function P(){"use no memo";const o=S(),r=c(s=>s.auth.isLoading),a=w({resolver:C(k),disabled:r,defaultValues:{email:"",password:"",remember:!1}}),l=p.useCallback(({email:s,password:h,remember:j})=>{o(E({email:s,password:h,remember:j}))},[o]);return e.jsx("div",{className:"flex flex-col",children:e.jsx(F,{...a,children:e.jsxs("form",{onSubmit:a.handleSubmit(l),className:"space-y-4",children:[e.jsx(n,{control:a.control,name:"email",rules:{required:!0},render:({field:s})=>e.jsxs(t,{children:[e.jsx(x,{className:"flex gap-1 items-baseline",children:"Email"}),e.jsx(i,{children:e.jsx(u,{placeholder:"callasmaria@example.com",...s})}),e.jsx(m,{})]})}),e.jsx(n,{name:"password",control:a.control,rules:{required:!0},render:({field:s})=>e.jsxs(t,{children:[e.jsx(x,{className:"flex gap-1 items-baseline",children:"Password"}),e.jsx(i,{children:e.jsx(u,{type:"password",...s})}),e.jsx(m,{})]})}),e.jsx(n,{name:"remember",control:a.control,render:({field:s})=>e.jsxs(t,{children:[e.jsx(i,{children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(v,{id:"remember",checked:s.value,onCheckedChange:s.onChange}),e.jsx("label",{htmlFor:"remember",className:"text-sm leading-none",children:"Remember me"})]})}),e.jsx(m,{})]})}),e.jsx(g,{type:"submit",disabled:!a.formState.isValid||r,className:"w-full",children:r?e.jsx(L,{className:"absolute"}):"Login"})]})})})}const z=f(function(){const r=b(),a=c(s=>s.auth.user),l=c(s=>s.auth.isLoading);return p.useEffect(()=>{a&&r("/admin/dashboard")},[r,a]),l||a?null:e.jsx("div",{className:"flex w-full h-full",children:e.jsxs("div",{className:"self-center space-y-8 w-72 mx-auto",children:[e.jsxs("div",{className:"flex flex-col space-y-2 text-center",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight leading-none",children:"Editorial Admin"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Enter your details below to login"})]}),e.jsx(P,{})]})})});export{z as default};
1
+ import{a as p,p as e,w as f,v as b}from"./chunk-EF7DTUVF-MlADC7xe.js";import{B as g}from"./button-DYtHJlPL.js";import{o as N,b as y,s as d,u as w,F,a as n,c as t,d as x,e as i,I as u,f as m,C as v,t as C}from"./types-BFhFSnS8.js";import{S as L}from"./spinner-C3uu_C2V.js";import{u as S,e as c,l as E}from"./authSlice-BC3X-Dze.js";import"./index-BCGL68Qt.js";import"./utils-BdGM_Id-.js";import"./index-BhhxCYB_.js";import"./index-xBXWoUIa.js";import"./createLucideIcon-BJQzFwzJ.js";const k=N({email:d().nonempty("Please enter your email").email(),password:d().nonempty("Please enter your password"),remember:y()});function P(){"use no memo";const o=S(),r=c(s=>s.auth.isLoading),a=w({resolver:C(k),disabled:r,defaultValues:{email:"",password:"",remember:!1}}),l=p.useCallback(({email:s,password:h,remember:j})=>{o(E({email:s,password:h,remember:j}))},[o]);return e.jsx("div",{className:"flex flex-col",children:e.jsx(F,{...a,children:e.jsxs("form",{onSubmit:a.handleSubmit(l),className:"space-y-4",children:[e.jsx(n,{control:a.control,name:"email",rules:{required:!0},render:({field:s})=>e.jsxs(t,{children:[e.jsx(x,{className:"flex gap-1 items-baseline",children:"Email"}),e.jsx(i,{children:e.jsx(u,{placeholder:"callasmaria@example.com",...s})}),e.jsx(m,{})]})}),e.jsx(n,{name:"password",control:a.control,rules:{required:!0},render:({field:s})=>e.jsxs(t,{children:[e.jsx(x,{className:"flex gap-1 items-baseline",children:"Password"}),e.jsx(i,{children:e.jsx(u,{type:"password",...s})}),e.jsx(m,{})]})}),e.jsx(n,{name:"remember",control:a.control,render:({field:s})=>e.jsxs(t,{children:[e.jsx(i,{children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(v,{id:"remember",checked:s.value,onCheckedChange:s.onChange}),e.jsx("label",{htmlFor:"remember",className:"text-sm leading-none",children:"Remember me"})]})}),e.jsx(m,{})]})}),e.jsx(g,{type:"submit",disabled:!a.formState.isValid||r,className:"w-full",children:r?e.jsx(L,{className:"absolute"}):"Login"})]})})})}const z=f(function(){const r=b(),a=c(s=>s.auth.user),l=c(s=>s.auth.isLoading);return p.useEffect(()=>{a&&r("/admin/dashboard")},[r,a]),l||a?null:e.jsx("div",{className:"flex w-full h-full",children:e.jsxs("div",{className:"self-center space-y-8 w-72 mx-auto",children:[e.jsxs("div",{className:"flex flex-col space-y-2 text-center",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight leading-none",children:"Editorial Admin"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Enter your details below to login"})]}),e.jsx(P,{})]})})});export{z as default};
@@ -1 +1 @@
1
- import{a as s,p as y}from"./chunk-EF7DTUVF-MlADC7xe.js";import{o as h}from"./utils-DN8wQ0jG.js";function C(n,t){if(typeof n=="function")return n(t);n!=null&&(n.current=t)}function x(...n){return t=>{let e=!1;const l=n.map(r=>{const o=C(r,t);return!e&&typeof o=="function"&&(e=!0),o});if(e)return()=>{for(let r=0;r<l.length;r++){const o=l[r];typeof o=="function"?o():C(n[r],null)}}}}function I(...n){return s.useCallback(x(...n),n)}function N(n){const t=R(n),e=s.forwardRef((l,r)=>{const{children:o,...u}=l,a=s.Children.toArray(o),f=a.find(j);if(f){const i=f.props.children,c=a.map(d=>d===f?s.Children.count(i)>1?s.Children.only(null):s.isValidElement(i)?i.props.children:null:d);return y.jsx(t,{...u,ref:r,children:s.isValidElement(i)?s.cloneElement(i,void 0,c):null})}return y.jsx(t,{...u,ref:r,children:o})});return e.displayName=`${n}.Slot`,e}var W=N("Slot");function R(n){const t=s.forwardRef((e,l)=>{const{children:r,...o}=e;if(s.isValidElement(r)){const u=_(r),a=O(o,r.props);return r.type!==s.Fragment&&(a.ref=l?x(l,u):u),s.cloneElement(r,a)}return s.Children.count(r)>1?s.Children.only(null):null});return t.displayName=`${n}.SlotClone`,t}var E=Symbol("radix.slottable");function k(n){const t=({children:e})=>y.jsx(y.Fragment,{children:e});return t.displayName=`${n}.Slottable`,t.__radixId=E,t}function j(n){return s.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===E}function O(n,t){const e={...t};for(const l in t){const r=n[l],o=t[l];/^on[A-Z]/.test(l)?r&&o?e[l]=(...a)=>{const f=o(...a);return r(...a),f}:r&&(e[l]=r):l==="style"?e[l]={...r,...o}:l==="className"&&(e[l]=[r,o].filter(Boolean).join(" "))}return{...n,...e}}function _(n){let t=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,e=t&&"isReactWarning"in t&&t.isReactWarning;return e?n.ref:(t=Object.getOwnPropertyDescriptor(n,"ref")?.get,e=t&&"isReactWarning"in t&&t.isReactWarning,e?n.props.ref:n.props.ref||n.ref)}const S=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,b=h,T=(n,t)=>e=>{var l;if(t?.variants==null)return b(n,e?.class,e?.className);const{variants:r,defaultVariants:o}=t,u=Object.keys(r).map(i=>{const c=e?.[i],d=o?.[i];if(c===null)return null;const m=S(c)||S(d);return r[i][m]}),a=e&&Object.entries(e).reduce((i,c)=>{let[d,m]=c;return m===void 0||(i[d]=m),i},{}),f=t==null||(l=t.compoundVariants)===null||l===void 0?void 0:l.reduce((i,c)=>{let{class:d,className:m,...V}=c;return Object.entries(V).every(g=>{let[p,v]=g;return Array.isArray(v)?v.includes({...o,...a}[p]):{...o,...a}[p]===v})?[...i,d,m]:i},[]);return b(n,u,f,e?.class,e?.className)};export{W as S,N as a,k as b,T as c,I as u};
1
+ import{a as s,p as y}from"./chunk-EF7DTUVF-MlADC7xe.js";import{o as h}from"./utils-BdGM_Id-.js";function C(n,t){if(typeof n=="function")return n(t);n!=null&&(n.current=t)}function x(...n){return t=>{let e=!1;const l=n.map(r=>{const o=C(r,t);return!e&&typeof o=="function"&&(e=!0),o});if(e)return()=>{for(let r=0;r<l.length;r++){const o=l[r];typeof o=="function"?o():C(n[r],null)}}}}function I(...n){return s.useCallback(x(...n),n)}function N(n){const t=R(n),e=s.forwardRef((l,r)=>{const{children:o,...u}=l,a=s.Children.toArray(o),f=a.find(j);if(f){const i=f.props.children,c=a.map(d=>d===f?s.Children.count(i)>1?s.Children.only(null):s.isValidElement(i)?i.props.children:null:d);return y.jsx(t,{...u,ref:r,children:s.isValidElement(i)?s.cloneElement(i,void 0,c):null})}return y.jsx(t,{...u,ref:r,children:o})});return e.displayName=`${n}.Slot`,e}var W=N("Slot");function R(n){const t=s.forwardRef((e,l)=>{const{children:r,...o}=e;if(s.isValidElement(r)){const u=_(r),a=O(o,r.props);return r.type!==s.Fragment&&(a.ref=l?x(l,u):u),s.cloneElement(r,a)}return s.Children.count(r)>1?s.Children.only(null):null});return t.displayName=`${n}.SlotClone`,t}var E=Symbol("radix.slottable");function k(n){const t=({children:e})=>y.jsx(y.Fragment,{children:e});return t.displayName=`${n}.Slottable`,t.__radixId=E,t}function j(n){return s.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===E}function O(n,t){const e={...t};for(const l in t){const r=n[l],o=t[l];/^on[A-Z]/.test(l)?r&&o?e[l]=(...a)=>{const f=o(...a);return r(...a),f}:r&&(e[l]=r):l==="style"?e[l]={...r,...o}:l==="className"&&(e[l]=[r,o].filter(Boolean).join(" "))}return{...n,...e}}function _(n){let t=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,e=t&&"isReactWarning"in t&&t.isReactWarning;return e?n.ref:(t=Object.getOwnPropertyDescriptor(n,"ref")?.get,e=t&&"isReactWarning"in t&&t.isReactWarning,e?n.props.ref:n.props.ref||n.ref)}const S=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,b=h,T=(n,t)=>e=>{var l;if(t?.variants==null)return b(n,e?.class,e?.className);const{variants:r,defaultVariants:o}=t,u=Object.keys(r).map(i=>{const c=e?.[i],d=o?.[i];if(c===null)return null;const m=S(c)||S(d);return r[i][m]}),a=e&&Object.entries(e).reduce((i,c)=>{let[d,m]=c;return m===void 0||(i[d]=m),i},{}),f=t==null||(l=t.compoundVariants)===null||l===void 0?void 0:l.reduce((i,c)=>{let{class:d,className:m,...V}=c;return Object.entries(V).every(g=>{let[p,v]=g;return Array.isArray(v)?v.includes({...o,...a}[p]):{...o,...a}[p]===v})?[...i,d,m]:i},[]);return b(n,u,f,e?.class,e?.className)};export{W as S,N as a,k as b,T as c,I as u};
@@ -1 +1 @@
1
- import{a as c,p as x,D as y}from"./chunk-EF7DTUVF-MlADC7xe.js";import{u as E,a as w}from"./index-b67bZzAe.js";import{a as b}from"./index-xBXWoUIa.js";function _(e,t){const n=c.createContext(t),r=i=>{const{children:u,...s}=i,a=c.useMemo(()=>s,Object.values(s));return x.jsx(n.Provider,{value:a,children:u})};r.displayName=e+"Provider";function o(i){const u=c.useContext(n);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function j(e,t=[]){let n=[];function r(i,u){const s=c.createContext(u),a=n.length;n=[...n,u];const f=d=>{const{scope:p,children:m,...v}=d,S=p?.[e]?.[a]||s,g=c.useMemo(()=>v,Object.values(v));return x.jsx(S.Provider,{value:g,children:m})};f.displayName=i+"Provider";function l(d,p){const m=p?.[e]?.[a]||s,v=c.useContext(m);if(v)return v;if(u!==void 0)return u;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[f,l]}const o=()=>{const i=n.map(u=>c.createContext(u));return function(s){const a=s?.[e]||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:a}}),[s,a])}};return o.scopeName=e,[r,P(o,...t)]}function P(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const u=r.reduce((s,{useScope:a,scopeName:f})=>{const d=a(i)[`__scope${f}`];return{...s,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}function L(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var N=globalThis?.document?c.useLayoutEffect:()=>{},C=y[" useInsertionEffect ".trim().toString()]||N;function W({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,u]=A({defaultProp:t,onChange:n}),s=e!==void 0,a=s?e:o;{const l=c.useRef(e!==void 0);c.useEffect(()=>{const d=l.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),l.current=s},[s,r])}const f=c.useCallback(l=>{if(s){const d=R(l)?l(e):l;d!==e&&u.current?.(d)}else i(l)},[s,e,i,u]);return[a,f]}function A({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),i=c.useRef(t);return C(()=>{i.current=t},[t]),c.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function R(e){return typeof e=="function"}function F(e){const[t,n]=c.useState(void 0);return N(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let u,s;if("borderBoxSize"in i){const a=i.borderBoxSize,f=Array.isArray(a)?a[0]:a;u=f.inlineSize,s=f.blockSize}else u=e.offsetWidth,s=e.offsetHeight;n({width:u,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function M(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var O=e=>{const{present:t,children:n}=e,r=T(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),i=E(r.ref,I(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:i}):null};O.displayName="Presence";function T(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),i=c.useRef("none"),u=e?"mounted":"unmounted",[s,a]=M(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const f=h(r.current);i.current=s==="mounted"?f:"none"},[s]),N(()=>{const f=r.current,l=o.current;if(l!==e){const p=i.current,m=h(f);e?a("MOUNT"):m==="none"||f?.display==="none"?a("UNMOUNT"):a(l&&p!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,a]),N(()=>{if(t){let f;const l=t.ownerDocument.defaultView??window,d=m=>{const S=h(r.current).includes(m.animationName);if(m.target===t&&S&&(a("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",f=l.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},p=m=>{m.target===t&&(i.current=h(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{l.clearTimeout(f),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:c.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function h(e){return e?.animationName||"none"}function I(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var U=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],k=U.reduce((e,t)=>{const n=w(`Primitive.${t}`),r=c.forwardRef((o,i)=>{const{asChild:u,...s}=o,a=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(a,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function H(e,t){e&&b.flushSync(()=>e.dispatchEvent(t))}export{k as P,L as a,O as b,j as c,N as d,F as e,H as f,_ as g,W as u};
1
+ import{a as c,p as x,D as y}from"./chunk-EF7DTUVF-MlADC7xe.js";import{u as E,a as w}from"./index-BCGL68Qt.js";import{a as b}from"./index-xBXWoUIa.js";function _(e,t){const n=c.createContext(t),r=i=>{const{children:u,...s}=i,a=c.useMemo(()=>s,Object.values(s));return x.jsx(n.Provider,{value:a,children:u})};r.displayName=e+"Provider";function o(i){const u=c.useContext(n);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function j(e,t=[]){let n=[];function r(i,u){const s=c.createContext(u),a=n.length;n=[...n,u];const f=d=>{const{scope:p,children:m,...v}=d,S=p?.[e]?.[a]||s,g=c.useMemo(()=>v,Object.values(v));return x.jsx(S.Provider,{value:g,children:m})};f.displayName=i+"Provider";function l(d,p){const m=p?.[e]?.[a]||s,v=c.useContext(m);if(v)return v;if(u!==void 0)return u;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[f,l]}const o=()=>{const i=n.map(u=>c.createContext(u));return function(s){const a=s?.[e]||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:a}}),[s,a])}};return o.scopeName=e,[r,P(o,...t)]}function P(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const u=r.reduce((s,{useScope:a,scopeName:f})=>{const d=a(i)[`__scope${f}`];return{...s,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}function L(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var N=globalThis?.document?c.useLayoutEffect:()=>{},C=y[" useInsertionEffect ".trim().toString()]||N;function W({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,u]=A({defaultProp:t,onChange:n}),s=e!==void 0,a=s?e:o;{const l=c.useRef(e!==void 0);c.useEffect(()=>{const d=l.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),l.current=s},[s,r])}const f=c.useCallback(l=>{if(s){const d=R(l)?l(e):l;d!==e&&u.current?.(d)}else i(l)},[s,e,i,u]);return[a,f]}function A({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),i=c.useRef(t);return C(()=>{i.current=t},[t]),c.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function R(e){return typeof e=="function"}function F(e){const[t,n]=c.useState(void 0);return N(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let u,s;if("borderBoxSize"in i){const a=i.borderBoxSize,f=Array.isArray(a)?a[0]:a;u=f.inlineSize,s=f.blockSize}else u=e.offsetWidth,s=e.offsetHeight;n({width:u,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function M(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var O=e=>{const{present:t,children:n}=e,r=T(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),i=E(r.ref,I(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:i}):null};O.displayName="Presence";function T(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),i=c.useRef("none"),u=e?"mounted":"unmounted",[s,a]=M(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const f=h(r.current);i.current=s==="mounted"?f:"none"},[s]),N(()=>{const f=r.current,l=o.current;if(l!==e){const p=i.current,m=h(f);e?a("MOUNT"):m==="none"||f?.display==="none"?a("UNMOUNT"):a(l&&p!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,a]),N(()=>{if(t){let f;const l=t.ownerDocument.defaultView??window,d=m=>{const S=h(r.current).includes(m.animationName);if(m.target===t&&S&&(a("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",f=l.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},p=m=>{m.target===t&&(i.current=h(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{l.clearTimeout(f),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:c.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function h(e){return e?.animationName||"none"}function I(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var U=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],k=U.reduce((e,t)=>{const n=w(`Primitive.${t}`),r=c.forwardRef((o,i)=>{const{asChild:u,...s}=o,a=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(a,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function H(e,t){e&&b.flushSync(()=>e.dispatchEvent(t))}export{k as P,L as a,O as b,j as c,N as d,F as e,H as f,_ as g,W as u};
@@ -1,4 +1,4 @@
1
- import{c as Kt}from"./createLucideIcon-BJQzFwzJ.js";import{a as c,D as vr,p as C}from"./chunk-EF7DTUVF-MlADC7xe.js";import{d as Ne,P as F,a as j,f as mr,c as at,g as gr,u as qt,b as we,e as yr}from"./index-BKOWzfnu.js";import{u as K,a as wr,b as xr}from"./index-b67bZzAe.js";import{_ as ee,j as Zt,k as br}from"./authSlice-Ck6mjgyY.js";import{R as Er,a as Cr}from"./index-xBXWoUIa.js";/**
1
+ import{c as Kt}from"./createLucideIcon-BJQzFwzJ.js";import{a as c,D as vr,p as C}from"./chunk-EF7DTUVF-MlADC7xe.js";import{d as Ne,P as F,a as j,f as mr,c as at,g as gr,u as qt,b as we,e as yr}from"./index-BhhxCYB_.js";import{u as K,a as wr,b as xr}from"./index-BCGL68Qt.js";import{_ as ee,j as Zt,k as br}from"./authSlice-BC3X-Dze.js";import{R as Er,a as Cr}from"./index-xBXWoUIa.js";/**
2
2
  * @license lucide-react v0.487.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{p as y,a as X}from"./chunk-EF7DTUVF-MlADC7xe.js";import{a as E}from"./utils-DN8wQ0jG.js";function ut({className:e,...o}){return y.jsx("div",{"data-slot":"table-container",className:"flex relative",children:y.jsx("div",{"data-slot":"table",className:E("flex-1 caption-bottom text-sm",e),...o})})}function at({className:e,...o}){return y.jsx("div",{"data-slot":"table-header",className:E("[&_tr]:border-b",e),...o})}function gt({className:e,...o}){return y.jsx("div",{"data-slot":"table-body",className:E("[&_tr:last-child]:border-0",e),...o})}function dt({className:e,...o}){return y.jsx("div",{"data-slot":"table-row",className:E("hover:bg-muted/50 data-[state=selected]:bg-muted transition-colors",e),...o})}function ct({className:e,...o}){return y.jsx("div",{"data-slot":"table-head",className:E("flex items-center text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap border-b [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...o})}function ft({className:e,...o}){return y.jsx("div",{"data-slot":"table-cell",className:E("p-2 align-middle whitespace-nowrap border-b [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...o})}/**
1
+ import{p as y,a as X}from"./chunk-EF7DTUVF-MlADC7xe.js";import{a as E}from"./utils-BdGM_Id-.js";function ut({className:e,...o}){return y.jsx("div",{"data-slot":"table-container",className:"flex relative",children:y.jsx("div",{"data-slot":"table",className:E("flex-1 caption-bottom text-sm",e),...o})})}function at({className:e,...o}){return y.jsx("div",{"data-slot":"table-header",className:E("[&_tr]:border-b",e),...o})}function gt({className:e,...o}){return y.jsx("div",{"data-slot":"table-body",className:E("[&_tr:last-child]:border-0",e),...o})}function dt({className:e,...o}){return y.jsx("div",{"data-slot":"table-row",className:E("hover:bg-muted/50 data-[state=selected]:bg-muted transition-colors",e),...o})}function ct({className:e,...o}){return y.jsx("div",{"data-slot":"table-head",className:E("flex items-center text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap border-b [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...o})}function ft({className:e,...o}){return y.jsx("div",{"data-slot":"table-cell",className:E("p-2 align-middle whitespace-nowrap border-b [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...o})}/**
2
2
  * table-core
3
3
  *
4
4
  * Copyright (c) TanStack
@@ -1,4 +1,4 @@
1
- import{R as _,a as I,p as M,A as Ty,x as Xg,B as Qg,C as Jd}from"./chunk-EF7DTUVF-MlADC7xe.js";import{b as Ms,B as pi}from"./button-D_tNOZW3.js";import{I as mo,g as Iy,u as uc,h as Ny,s as Gr,b as My,l as Ay,o as Oy,F as Py,a as Qa,c as el,d as is,e as tl,f as nl,C as Fy,i as Kd,t as Ly}from"./types-DI1nugUt.js";import{a as he,q as ep,r as Dy,t as Ry}from"./utils-DN8wQ0jG.js";import{c as tp}from"./createLucideIcon-BJQzFwzJ.js";import{h as $y,i as ca,j as np,u as Oo,k as cc,l as rp,m as ip,n as op,o as sp,p as ap,F as lp,q as up,r as cp,s as dp,R as fp,W as By,C as hp,T as gp,D as Hy,a as dc,P as pp,O as mp,t as Vy,X as zy,v as xp,b as Wy,V as jy,c as yp,d as bp,e as vp,f as Cp,g as wp,A as Uy}from"./index-BCIQh_1v.js";import{C as Jy}from"./upload-CopmcV94.js";import{u as Pr,c as Kr,b as _p,P as Ue,a as we,d as or}from"./index-BKOWzfnu.js";import{u as ct,a as As,b as Ky}from"./index-b67bZzAe.js";import{C as kp}from"./calendar-6ih_JEvR.js";import{F as Zy}from"./files-BkbeSoaZ.js";import{E as Sp}from"./external-link-D1If5twJ.js";import{a as Os}from"./index-xBXWoUIa.js";import{_ as Zd}from"./authSlice-Ck6mjgyY.js";/**
1
+ import{R as _,a as I,p as M,A as Ty,x as Xg,B as Qg,C as Jd}from"./chunk-EF7DTUVF-MlADC7xe.js";import{b as Ms,B as pi}from"./button-DYtHJlPL.js";import{I as mo,g as Iy,u as uc,h as Ny,s as Gr,b as My,l as Ay,o as Oy,F as Py,a as Qa,c as el,d as is,e as tl,f as nl,C as Fy,i as Kd,t as Ly}from"./types-BFhFSnS8.js";import{a as he,q as ep,r as Dy,t as Ry}from"./utils-BdGM_Id-.js";import{c as tp}from"./createLucideIcon-BJQzFwzJ.js";import{h as $y,i as ca,j as np,u as Oo,k as cc,l as rp,m as ip,n as op,o as sp,p as ap,F as lp,q as up,r as cp,s as dp,R as fp,W as By,C as hp,T as gp,D as Hy,a as dc,P as pp,O as mp,t as Vy,X as zy,v as xp,b as Wy,V as jy,c as yp,d as bp,e as vp,f as Cp,g as wp,A as Uy}from"./index-DuwVf14f.js";import{C as Jy}from"./upload-CopmcV94.js";import{u as Pr,c as Kr,b as _p,P as Ue,a as we,d as or}from"./index-BhhxCYB_.js";import{u as ct,a as As,b as Ky}from"./index-BCGL68Qt.js";import{C as kp}from"./calendar-6ih_JEvR.js";import{F as Zy}from"./files-BpDIfAek.js";import{E as Sp}from"./external-link-D1If5twJ.js";import{a as Os}from"./index-xBXWoUIa.js";import{_ as Zd}from"./authSlice-BC3X-Dze.js";/**
2
2
  * @license lucide-react v0.487.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-BI4QA1ti.js","imports":["/assets/chunk-EF7DTUVF-MlADC7xe.js","/assets/index-xBXWoUIa.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":true,"module":"/assets/root-DwCI6c10.js","imports":["/assets/chunk-EF7DTUVF-MlADC7xe.js","/assets/index-xBXWoUIa.js","/assets/authSlice-Ck6mjgyY.js","/assets/utils-DN8wQ0jG.js","/assets/spinner-C6NBcdtB.js","/assets/createLucideIcon-BJQzFwzJ.js"],"css":["/assets/root-DVVVBPEK.css"]},"routes/home":{"id":"routes/home","parentId":"root","path":"/admin","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/home-B0S_vIyA.js","imports":["/assets/chunk-EF7DTUVF-MlADC7xe.js","/assets/button-D_tNOZW3.js","/assets/types-DI1nugUt.js","/assets/spinner-C6NBcdtB.js","/assets/authSlice-Ck6mjgyY.js","/assets/index-b67bZzAe.js","/assets/utils-DN8wQ0jG.js","/assets/index-BKOWzfnu.js","/assets/index-xBXWoUIa.js","/assets/createLucideIcon-BJQzFwzJ.js"],"css":[]},"routes/dashboard._layout":{"id":"routes/dashboard._layout","parentId":"root","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._layout-DvaVEgFX.js","imports":["/assets/chunk-EF7DTUVF-MlADC7xe.js","/assets/authSlice-Ck6mjgyY.js","/assets/utils-DN8wQ0jG.js","/assets/index-BCIQh_1v.js","/assets/button-D_tNOZW3.js","/assets/createLucideIcon-BJQzFwzJ.js","/assets/index-b67bZzAe.js","/assets/index-BKOWzfnu.js","/assets/upload-CopmcV94.js","/assets/external-link-D1If5twJ.js","/assets/index-xBXWoUIa.js"],"css":[]},"routes/dashboard":{"id":"routes/dashboard","parentId":"routes/dashboard._layout","path":"/admin/dashboard","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard-CCf5hKPx.js","imports":["/assets/chunk-EF7DTUVF-MlADC7xe.js","/assets/utils-DN8wQ0jG.js","/assets/index-BkW3jRP3.js"],"css":[]},"routes/dashboard.$collection.new":{"id":"routes/dashboard.$collection.new","parentId":"routes/dashboard._layout","path":"/admin/dashboard/:collectionId/new","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._collection.new-BJEQdRj5.js","imports":["/assets/chunk-EF7DTUVF-MlADC7xe.js","/assets/itemForm-DeCuor51.js","/assets/utils-DN8wQ0jG.js","/assets/button-D_tNOZW3.js","/assets/index-b67bZzAe.js","/assets/types-DI1nugUt.js","/assets/index-BKOWzfnu.js","/assets/index-xBXWoUIa.js","/assets/createLucideIcon-BJQzFwzJ.js","/assets/index-BCIQh_1v.js","/assets/authSlice-Ck6mjgyY.js","/assets/upload-CopmcV94.js","/assets/calendar-6ih_JEvR.js","/assets/files-BkbeSoaZ.js","/assets/trash-CN5HT_ZJ.js","/assets/external-link-D1If5twJ.js"],"css":["/assets/itemForm-ya4bvPWM.css"]},"routes/dashboard.$collection":{"id":"routes/dashboard.$collection","parentId":"routes/dashboard._layout","path":"/admin/dashboard/:collectionId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._collection-wP1ZB_LW.js","imports":["/assets/chunk-EF7DTUVF-MlADC7xe.js","/assets/button-D_tNOZW3.js","/assets/utils-DN8wQ0jG.js","/assets/index-BkW3jRP3.js","/assets/createLucideIcon-BJQzFwzJ.js","/assets/calendar-6ih_JEvR.js","/assets/trash-CN5HT_ZJ.js","/assets/external-link-D1If5twJ.js","/assets/index-b67bZzAe.js"],"css":[]},"routes/dashboard.$collection.$document":{"id":"routes/dashboard.$collection.$document","parentId":"routes/dashboard._layout","path":"/admin/dashboard/:collectionId/:documentId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._collection._document-CjPV6DBM.js","imports":["/assets/chunk-EF7DTUVF-MlADC7xe.js","/assets/itemForm-DeCuor51.js","/assets/utils-DN8wQ0jG.js","/assets/button-D_tNOZW3.js","/assets/index-b67bZzAe.js","/assets/types-DI1nugUt.js","/assets/index-BKOWzfnu.js","/assets/index-xBXWoUIa.js","/assets/createLucideIcon-BJQzFwzJ.js","/assets/index-BCIQh_1v.js","/assets/authSlice-Ck6mjgyY.js","/assets/upload-CopmcV94.js","/assets/calendar-6ih_JEvR.js","/assets/files-BkbeSoaZ.js","/assets/trash-CN5HT_ZJ.js","/assets/external-link-D1If5twJ.js"],"css":["/assets/itemForm-ya4bvPWM.css"]},"routes/dashboard.files":{"id":"routes/dashboard.files","parentId":"routes/dashboard._layout","path":"/admin/dashboard/files","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard.files-D61rcU4r.js","imports":["/assets/chunk-EF7DTUVF-MlADC7xe.js","/assets/files-BkbeSoaZ.js","/assets/authSlice-Ck6mjgyY.js","/assets/utils-DN8wQ0jG.js","/assets/index-b67bZzAe.js","/assets/upload-CopmcV94.js","/assets/createLucideIcon-BJQzFwzJ.js","/assets/trash-CN5HT_ZJ.js"],"css":[]}},"url":"/assets/manifest-17a9c848.js","version":"17a9c848"};
1
+ window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-BI4QA1ti.js","imports":["/assets/chunk-EF7DTUVF-MlADC7xe.js","/assets/index-xBXWoUIa.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":true,"module":"/assets/root-Bmrk0090.js","imports":["/assets/chunk-EF7DTUVF-MlADC7xe.js","/assets/index-xBXWoUIa.js","/assets/authSlice-BC3X-Dze.js","/assets/utils-BdGM_Id-.js","/assets/spinner-C3uu_C2V.js","/assets/createLucideIcon-BJQzFwzJ.js"],"css":["/assets/root-DVVVBPEK.css"]},"routes/home":{"id":"routes/home","parentId":"root","path":"/admin","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/home-BMO8Phzv.js","imports":["/assets/chunk-EF7DTUVF-MlADC7xe.js","/assets/button-DYtHJlPL.js","/assets/types-BFhFSnS8.js","/assets/spinner-C3uu_C2V.js","/assets/authSlice-BC3X-Dze.js","/assets/index-BCGL68Qt.js","/assets/utils-BdGM_Id-.js","/assets/index-BhhxCYB_.js","/assets/index-xBXWoUIa.js","/assets/createLucideIcon-BJQzFwzJ.js"],"css":[]},"routes/dashboard._layout":{"id":"routes/dashboard._layout","parentId":"root","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._layout-D8eDuulk.js","imports":["/assets/chunk-EF7DTUVF-MlADC7xe.js","/assets/authSlice-BC3X-Dze.js","/assets/utils-BdGM_Id-.js","/assets/index-DuwVf14f.js","/assets/button-DYtHJlPL.js","/assets/createLucideIcon-BJQzFwzJ.js","/assets/index-BCGL68Qt.js","/assets/index-BhhxCYB_.js","/assets/upload-CopmcV94.js","/assets/external-link-D1If5twJ.js","/assets/index-xBXWoUIa.js"],"css":[]},"routes/dashboard":{"id":"routes/dashboard","parentId":"routes/dashboard._layout","path":"/admin/dashboard","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard-eLqz7BO7.js","imports":["/assets/chunk-EF7DTUVF-MlADC7xe.js","/assets/utils-BdGM_Id-.js","/assets/index-Dycitln2.js"],"css":[]},"routes/dashboard.$collection.new":{"id":"routes/dashboard.$collection.new","parentId":"routes/dashboard._layout","path":"/admin/dashboard/:collectionId/new","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._collection.new-CZuGYJjj.js","imports":["/assets/chunk-EF7DTUVF-MlADC7xe.js","/assets/itemForm-C5JHfZSI.js","/assets/utils-BdGM_Id-.js","/assets/button-DYtHJlPL.js","/assets/index-BCGL68Qt.js","/assets/types-BFhFSnS8.js","/assets/index-BhhxCYB_.js","/assets/index-xBXWoUIa.js","/assets/createLucideIcon-BJQzFwzJ.js","/assets/index-DuwVf14f.js","/assets/authSlice-BC3X-Dze.js","/assets/upload-CopmcV94.js","/assets/calendar-6ih_JEvR.js","/assets/files-BpDIfAek.js","/assets/trash-CN5HT_ZJ.js","/assets/external-link-D1If5twJ.js"],"css":["/assets/itemForm-ya4bvPWM.css"]},"routes/dashboard.$collection":{"id":"routes/dashboard.$collection","parentId":"routes/dashboard._layout","path":"/admin/dashboard/:collectionId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._collection-BBg-A9Sj.js","imports":["/assets/chunk-EF7DTUVF-MlADC7xe.js","/assets/button-DYtHJlPL.js","/assets/utils-BdGM_Id-.js","/assets/index-Dycitln2.js","/assets/createLucideIcon-BJQzFwzJ.js","/assets/calendar-6ih_JEvR.js","/assets/trash-CN5HT_ZJ.js","/assets/external-link-D1If5twJ.js","/assets/index-BCGL68Qt.js"],"css":[]},"routes/dashboard.$collection.$document":{"id":"routes/dashboard.$collection.$document","parentId":"routes/dashboard._layout","path":"/admin/dashboard/:collectionId/:documentId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._collection._document-5DoDCjb9.js","imports":["/assets/chunk-EF7DTUVF-MlADC7xe.js","/assets/itemForm-C5JHfZSI.js","/assets/utils-BdGM_Id-.js","/assets/button-DYtHJlPL.js","/assets/index-BCGL68Qt.js","/assets/types-BFhFSnS8.js","/assets/index-BhhxCYB_.js","/assets/index-xBXWoUIa.js","/assets/createLucideIcon-BJQzFwzJ.js","/assets/index-DuwVf14f.js","/assets/authSlice-BC3X-Dze.js","/assets/upload-CopmcV94.js","/assets/calendar-6ih_JEvR.js","/assets/files-BpDIfAek.js","/assets/trash-CN5HT_ZJ.js","/assets/external-link-D1If5twJ.js"],"css":["/assets/itemForm-ya4bvPWM.css"]},"routes/dashboard.files":{"id":"routes/dashboard.files","parentId":"routes/dashboard._layout","path":"/admin/dashboard/files","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard.files-DzKr0fnV.js","imports":["/assets/chunk-EF7DTUVF-MlADC7xe.js","/assets/files-BpDIfAek.js","/assets/authSlice-BC3X-Dze.js","/assets/utils-BdGM_Id-.js","/assets/index-BCGL68Qt.js","/assets/upload-CopmcV94.js","/assets/createLucideIcon-BJQzFwzJ.js","/assets/trash-CN5HT_ZJ.js"],"css":[]}},"url":"/assets/manifest-d31f28c7.js","version":"d31f28c7"};
@@ -1 +1 @@
1
- import{a as c,p as e,w as m,q as h,M as x,L as p,S as j,t as g,O as b,i as E}from"./chunk-EF7DTUVF-MlADC7xe.js";import{u as y,o as S,r as w,f as v,g as F,s as l,a as N,b as L,c as R,i as z,d as A}from"./authSlice-Ck6mjgyY.js";import{u,c as P,s as C,e as o,P as I}from"./utils-DN8wQ0jG.js";import{S as k}from"./spinner-C6NBcdtB.js";import"./createLucideIcon-BJQzFwzJ.js";function q(){const s=y(),{data:t}=u();return c.useEffect(()=>{const a=S(R,async r=>{if(r&&t?.firebase){const i=r.email?.replace(/[.@]/g,"_"),n=w(v,`${t.firebase.dbUsersPath}/${i}`),f=(await F(n)).val();s(l({uid:r.uid,email:r.email})),s(N(f))}else s(l(void 0));s(L(!1))});return()=>a()},[s,t]),null}function B({children:s}){const[t,a]=c.useState(!1),{data:r,error:i,isLoading:n}=u();return c.useEffect(()=>{if(!n){if(i){console.error("Failed to fetch firebase config:",i);return}if(r)try{if(!r.firebase)throw new Error("Firebase configuration not found in admin config");z(r.firebase),a(!0)}catch(d){console.error("Failed to initialize Firebase:",d)}}},[r,i,n]),i?e.jsx("div",{className:"flex items-center justify-center min-h-screen",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h2",{className:"text-xl font-semibold text-red-600 mb-2",children:"Firebase Initialization Error"}),e.jsx("p",{className:"text-gray-600",children:i instanceof Error?i.message:"Failed to fetch admin config"})]})}):n||!t?e.jsxs("div",{className:"flex gap-1 items-center justify-center min-h-screen",children:[e.jsx(k,{size:"28px"}),e.jsx("p",{className:"text-gray-600",children:"Loading Editorial..."})]}):e.jsx(e.Fragment,{children:s})}function D(){const s=P({reducer:{auth:A,[o.reducerPath]:o.reducer},middleware:t=>t().concat(o.middleware)});return C(s.dispatch),s}function O({children:s}){const t=c.useRef(null);return t.current||(t.current=D(),t.current.dispatch(o.endpoints.getConfig.initiate())),e.jsx(I,{store:t.current,children:s})}const G=()=>[];function K({}){return[{title:"Editorial Admin"}]}function Q({children:s}){return e.jsxs("html",{lang:"en",className:"min-h-screen",children:[e.jsxs("head",{children:[e.jsx("meta",{charSet:"utf-8"}),e.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),e.jsx(x,{}),e.jsx(p,{})]}),e.jsxs("body",{className:"h-full min-h-screen bg-background font-sans antialiased",children:[e.jsx(O,{children:e.jsxs(B,{children:[e.jsx(q,{}),s]})}),e.jsx(j,{}),e.jsx(g,{})]})]})}const H=m(function(){return e.jsx(b,{})}),J=h(function({error:t}){let a="Oops!",r="An unexpected error occurred.",i;return E(t)&&(a=t.status===404?"404":"Error",r=t.status===404?"The requested page could not be found.":t.statusText||r),e.jsxs("main",{className:"pt-16 p-4 container mx-auto",children:[e.jsx("h1",{children:a}),e.jsx("p",{children:r}),i]})});export{J as ErrorBoundary,Q as Layout,H as default,G as links,K as meta};
1
+ import{a as c,p as e,w as m,q as h,M as x,L as p,S as j,t as g,O as b,i as E}from"./chunk-EF7DTUVF-MlADC7xe.js";import{u as y,o as S,r as w,f as v,g as F,s as l,a as N,b as L,c as R,i as z,d as A}from"./authSlice-BC3X-Dze.js";import{u,c as P,s as C,e as o,P as I}from"./utils-BdGM_Id-.js";import{S as k}from"./spinner-C3uu_C2V.js";import"./createLucideIcon-BJQzFwzJ.js";function q(){const s=y(),{data:t}=u();return c.useEffect(()=>{const a=S(R,async r=>{if(r&&t?.firebase){const i=r.email?.replace(/[.@]/g,"_"),n=w(v,`${t.firebase.dbUsersPath}/${i}`),f=(await F(n)).val();s(l({uid:r.uid,email:r.email})),s(N(f))}else s(l(void 0));s(L(!1))});return()=>a()},[s,t]),null}function B({children:s}){const[t,a]=c.useState(!1),{data:r,error:i,isLoading:n}=u();return c.useEffect(()=>{if(!n){if(i){console.error("Failed to fetch firebase config:",i);return}if(r)try{if(!r.firebase)throw new Error("Firebase configuration not found in admin config");z(r.firebase),a(!0)}catch(d){console.error("Failed to initialize Firebase:",d)}}},[r,i,n]),i?e.jsx("div",{className:"flex items-center justify-center min-h-screen",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h2",{className:"text-xl font-semibold text-red-600 mb-2",children:"Firebase Initialization Error"}),e.jsx("p",{className:"text-gray-600",children:i instanceof Error?i.message:"Failed to fetch admin config"})]})}):n||!t?e.jsxs("div",{className:"flex gap-1 items-center justify-center min-h-screen",children:[e.jsx(k,{size:"28px"}),e.jsx("p",{className:"text-gray-600",children:"Loading Editorial..."})]}):e.jsx(e.Fragment,{children:s})}function D(){const s=P({reducer:{auth:A,[o.reducerPath]:o.reducer},middleware:t=>t().concat(o.middleware)});return C(s.dispatch),s}function O({children:s}){const t=c.useRef(null);return t.current||(t.current=D(),t.current.dispatch(o.endpoints.getConfig.initiate())),e.jsx(I,{store:t.current,children:s})}const G=()=>[];function K({}){return[{title:"Editorial Admin"}]}function Q({children:s}){return e.jsxs("html",{lang:"en",className:"min-h-screen",children:[e.jsxs("head",{children:[e.jsx("meta",{charSet:"utf-8"}),e.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),e.jsx(x,{}),e.jsx(p,{})]}),e.jsxs("body",{className:"h-full min-h-screen bg-background font-sans antialiased",children:[e.jsx(O,{children:e.jsxs(B,{children:[e.jsx(q,{}),s]})}),e.jsx(j,{}),e.jsx(g,{})]})]})}const H=m(function(){return e.jsx(b,{})}),J=h(function({error:t}){let a="Oops!",r="An unexpected error occurred.",i;return E(t)&&(a=t.status===404?"404":"Error",r=t.status===404?"The requested page could not be found.":t.statusText||r),e.jsxs("main",{className:"pt-16 p-4 container mx-auto",children:[e.jsx("h1",{children:a}),e.jsx("p",{children:r}),i]})});export{J as ErrorBoundary,Q as Layout,H as default,G as links,K as meta};
@@ -1,4 +1,4 @@
1
- import{a as r,p as d}from"./chunk-EF7DTUVF-MlADC7xe.js";import{a as p}from"./utils-DN8wQ0jG.js";import{c as a}from"./createLucideIcon-BJQzFwzJ.js";/**
1
+ import{a as r,p as d}from"./chunk-EF7DTUVF-MlADC7xe.js";import{a as p}from"./utils-BdGM_Id-.js";import{c as a}from"./createLucideIcon-BJQzFwzJ.js";/**
2
2
  * @license lucide-react v0.487.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{a as z,p as L,R as O}from"./chunk-EF7DTUVF-MlADC7xe.js";import{u as vr,S as ss}from"./index-b67bZzAe.js";import{c as as,b as ns,P as nt,u as is,a as Wt,e as os}from"./index-BKOWzfnu.js";import{a as Ee}from"./utils-DN8wQ0jG.js";import{c as ds}from"./createLucideIcon-BJQzFwzJ.js";/**
1
+ import{a as z,p as L,R as O}from"./chunk-EF7DTUVF-MlADC7xe.js";import{u as vr,S as ss}from"./index-BCGL68Qt.js";import{c as as,b as ns,P as nt,u as is,a as Wt,e as os}from"./index-BhhxCYB_.js";import{a as Ee}from"./utils-BdGM_Id-.js";import{c as ds}from"./createLucideIcon-BJQzFwzJ.js";/**
2
2
  * @license lucide-react v0.487.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.