@isardsat/editorial-admin 6.13.2 → 6.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/assets/{clear-button-D8P7FXYU.js → clear-button-B9FEVwz_.js} +1 -1
- package/build/client/assets/dashboard._collection-iaZtNe1q.js +1 -0
- package/build/client/assets/dashboard._collection._document-D5xIGjFu.js +1 -0
- package/build/client/assets/dashboard._collection.new-BHgy4-1b.js +1 -0
- package/build/client/assets/dashboard._layout-CcUjmFn4.js +1 -0
- package/build/client/assets/date-picker-CRoXMswR.js +1 -0
- package/build/client/assets/datetime-picker-BpQhYvak.js +1 -0
- package/build/client/assets/{home-B_IEYn8i.js → home-cGpyicWm.js} +1 -1
- package/build/client/assets/index-CSxhbVIn.js +1 -0
- package/build/client/assets/{index-Cxe-PO-X.js → index-CYog0F9C.js} +1 -1
- package/build/client/assets/index-KAkY22zU.js +45 -0
- package/build/client/assets/index-dHuXonUr.js +1 -0
- package/build/client/assets/itemForm-B9pUxhMy.js +8 -0
- package/build/client/assets/manifest-bb8dabfd.js +1 -0
- package/build/client/assets/markdownEditor-sDvEK7dl.js +100 -0
- package/build/client/assets/root-40NKTO2H.css +1 -0
- package/build/client/assets/{schemas-UEZYZN9g.js → schemas-BoZMckka.js} +2 -2
- package/build/client/index.html +2 -2
- package/package.json +2 -2
- package/build/client/assets/dashboard._collection-CtVDeSsn.js +0 -1
- package/build/client/assets/dashboard._collection._document-BWSH9DF3.js +0 -1
- package/build/client/assets/dashboard._collection.new-D-_fvPhB.js +0 -1
- package/build/client/assets/dashboard._layout-Cd56BPh5.js +0 -1
- package/build/client/assets/date-picker-B4gEJFZ7.js +0 -1
- package/build/client/assets/datetime-picker-vpQoFZRp.js +0 -1
- package/build/client/assets/index-B45LLRRA.js +0 -1
- package/build/client/assets/index-BuuBEQuS.js +0 -1
- package/build/client/assets/index-C0hImMcN.js +0 -1
- package/build/client/assets/index-DgNySWwD.js +0 -45
- package/build/client/assets/itemForm-WlM0ABNB.js +0 -8
- package/build/client/assets/manifest-c1b2838f.js +0 -1
- package/build/client/assets/markdownEditor-Gw028d85.js +0 -100
- package/build/client/assets/root-DR_oZZHy.css +0 -1
- /package/build/client/assets/{root-6i8HcLlQ.js → root-DnO5pWRh.js} +0 -0
package/build/client/index.html
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en" class="min-h-screen"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Editorial Admin</title><meta name="robots" content="noindex"/><link rel="icon" type="image/ico" href="/admin/favicon.ico"/><link rel="modulepreload" href="/assets/manifest-
|
|
2
|
-
import * as route0 from "/assets/root-
|
|
1
|
+
<!DOCTYPE html><html lang="en" class="min-h-screen"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Editorial Admin</title><meta name="robots" content="noindex"/><link rel="icon" type="image/ico" href="/admin/favicon.ico"/><link rel="modulepreload" href="/assets/manifest-bb8dabfd.js"/><link rel="modulepreload" href="/assets/entry.client-C94uvdU2.js"/><link rel="modulepreload" href="/assets/chunk-EPOLDU6W-CiSVlmCe.js"/><link rel="modulepreload" href="/assets/index-DLIEpuwL.js"/><link rel="modulepreload" href="/assets/root-DnO5pWRh.js"/><link rel="modulepreload" href="/assets/index-CZSVchcX.js"/><link rel="modulepreload" href="/assets/tslib.es6-Dm3DwgL9.js"/><link rel="modulepreload" href="/assets/createLucideIcon-BvSqmaUO.js"/><link rel="modulepreload" href="/assets/circle-check-C6CxUIig.js"/><link rel="modulepreload" href="/assets/authSlice-DyBWbN7g.js"/><link rel="modulepreload" href="/assets/utils-oJIM4U5n.js"/><link rel="modulepreload" href="/assets/Loading-BkOvB9cm.js"/><link rel="stylesheet" href="/assets/root-40NKTO2H.css"/></head><body class="h-full min-h-screen bg-background font-sans antialiased"><div class="flex gap-1 items-center justify-center min-h-screen"><svg xmlns="http://www.w3.org/2000/svg" width="28px" height="28px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-loader-circle animate-spin"><path d="M21 12a9 9 0 1 1-6.219-8.56"></path></svg><p class="text-gray-600">Loading Editorial...</p></div><section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false"></section><script>window.__reactRouterContext = {"basename":"/","future":{"unstable_optimizeDeps":false,"unstable_subResourceIntegrity":false,"unstable_trailingSlashAwareDataRequests":false,"v8_middleware":false,"v8_splitRouteModules":false,"v8_viteEnvironmentApi":false},"routeDiscovery":{"mode":"initial"},"ssr":false,"isSpaMode":true};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());</script><script type="module" async="">import "/assets/manifest-bb8dabfd.js";
|
|
2
|
+
import * as route0 from "/assets/root-DnO5pWRh.js";
|
|
3
3
|
|
|
4
4
|
window.__reactRouterRouteModules = {"root":route0};
|
|
5
5
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@isardsat/editorial-admin",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.14.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"tailwindcss-animate": "^1.0.7",
|
|
79
79
|
"vaul": "^1.1.2",
|
|
80
80
|
"zod": "^4.1.11",
|
|
81
|
-
"@isardsat/editorial-common": "^6.
|
|
81
|
+
"@isardsat/editorial-common": "^6.14.0"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@react-router/dev": "^7.7.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e,a as m,x as g,R as L,w as V}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{B}from"./button-CAQsSeJv.js";import{i as M,l as S,d as A,m as E,n as y,a as N}from"./utils-oJIM4U5n.js";import{I as H}from"./input-BuAmKgZ9.js";import{c as O,u as P,T as U,a as q,b,d as G,f as k,e as Q,g as J,i as K,j as W,h as X}from"./index-CDZBGZah.js";import{c as u}from"./createLucideIcon-BvSqmaUO.js";import{C as f}from"./calendar-Frbsxn98.js";import{T as Y,F as Z}from"./trash-UKLAaALv.js";import{E as F}from"./external-link-ERgO2SVI.js";import{C as D}from"./circle-check-C6CxUIig.js";import{a as ee,A as te}from"./arrow-up-C0I0e1Jt.js";import"./index-B-2LEQwB.js";const se=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],ae=u("arrow-up-down",se);const le=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],T=u("circle",le);const re=[["path",{d:"M15 12h6",key:"upa0zy"}],["path",{d:"M15 6h6",key:"1jlkvy"}],["path",{d:"m3 13 3.553-7.724a.5.5 0 0 1 .894 0L11 13",key:"blevx4"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M4 11h6",key:"olkgv1"}]],C=u("letter-text",re);const ne=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],oe=u("list",ne);const ie=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ce=u("plus",ie),de={boolean:D,date:f,datetime:f,markdown:C,select:oe,string:C,url:F},p=O(),R=(r,s,n)=>{const o=r.getValue(n),i=s.getValue(n);return!o&&!i?0:o?i?new Date(o).getTime()-new Date(i).getTime():-1:1},v=[p.accessor("id",{header(){return e.jsxs("span",{className:"flex items-center max-w-48",children:[e.jsx(T,{className:"text-gray-500 h-4"})," ID"]})},cell(r){const s=r.getValue();return e.jsx("span",{title:s,className:"block overflow-hidden text-ellipsis w-48 max-w-48 whitespace-nowrap",children:s})}})],me=[p.accessor("updatedAt",{header(){return e.jsxs("div",{className:"flex items-center max-w-48",children:[e.jsx(f,{className:"text-gray-500 h-4"})," Last updated"]})},sortingFn:R,cell(r){return M(new Date(r.getValue()))}})];function ue({itemType:r}){const{data:s}=S(r),{data:n}=A(),[o,i]=m.useState([]),[I,_]=m.useState([{id:"updatedAt",desc:!0}]),[w]=E(),j=m.useMemo(()=>p.display({id:"actions",header:()=>e.jsx("span",{className:"flex justify-end ml-auto"}),cell(l){return e.jsx("div",{className:"flex gap-2 justify-end",children:e.jsxs("button",{className:"hover:text-red-500 p-1 hover:bg-muted rounded-sm",onClick:t=>{t.stopPropagation(),w({type:r,id:l.row.original.id})},children:[e.jsx(Y,{size:16,className:"group-hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:"Delete entry"})]})})},enableSorting:!1}),[r,w]),x=m.useMemo(()=>{if(!s)return v;const l=Object.entries(s.fields);return[...v,...l.filter(([,t])=>t.showInSummary).map(([t,c])=>p.accessor(d=>d[t],{id:t,sortingFn:c.type==="date"||c.type==="datetime"?R:"alphanumeric",header(){const d=c.isUploadedFile?Z:de[c.type]??L.Fragment;return e.jsxs("div",{className:"flex items-center ",children:[e.jsx(d,{className:"text-gray-500 h-4 flex-shrink-0"}),c.displayName]})},cell(d){const a=d.getValue();switch(c.type){case"boolean":const z=a?D:T;return e.jsx("span",{className:"flex justify-center items-center h-full text-nowrap",children:e.jsx(z,{className:y("mx-auto",a?"text-green-600":"text-gray-300"),size:14})});case"url":return a?e.jsx(g,{to:a,className:"flex items-center w-48 hover:text-blue-500 overflow-hidden text-ellipsis whitespace-nowrap",title:a,children:a}):"--";case"datetime":return a?e.jsx("span",{className:" text-nowrap",title:a,children:new Date(a).toLocaleString(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:void 0})}):"--";case"date":return a?e.jsx("span",{className:"text-nowrap",title:a,children:M(new Date(a))}):"--";case"markdown":case"string":return c.isUploadedFile?e.jsxs("span",{title:a,className:"flex items-center w-48 overflow-hidden text-ellipsis whitespace-nowrap",children:[e.jsx(F,{className:"h-4 shrink-0"})," ",a]}):e.jsx("span",{title:a,className:"block w-48 overflow-hidden text-ellipsis whitespace-nowrap",children:a});default:return a}}})),...me,j]},[j,s]),$=m.useMemo(()=>n?.[r]?Object.values(n[r]):[],[r,n]),h=P({data:$,columns:x,getCoreRowModel:X(),onColumnFiltersChange:i,getFilteredRowModel:W(),onSortingChange:_,getSortedRowModel:K(),state:{sorting:I,columnFilters:o}});return!s||!n?null:e.jsxs("div",{className:"rounded-sm border overflow-auto",children:[s.filterBy&&Object.entries(s.fields).find(([l])=>l===s.filterBy)&&e.jsx("div",{className:"flex items-center py-2 pl-2 ",children:e.jsx(H,{placeholder:`Filter ${s.filterBy}...`,value:h.getColumn(s.filterBy)?.getFilterValue()??"",onChange:l=>h.getColumn(s.filterBy||"")?.setFilterValue(l.target.value),className:"max-w-sm rounded-sm"})}),e.jsxs(U,{children:[e.jsx(q,{className:"sticky top-0 z-50",children:h.getHeaderGroups().map(l=>e.jsx(b,{className:"grid",style:{gridTemplateColumns:`repeat(${x.length}, minmax(200px, 1fr))`},children:l.headers.map(t=>e.jsx(G,{className:y("bg-background transition-colors",t.column.getCanSort()&&"hover:bg-gray-100 cursor-default"),onClick:()=>{console.log("sorting",t.column.getIsSorted()),t.column.toggleSorting(t.column.getIsSorted()==="asc")},children:e.jsxs("div",{className:"flex items-center w-full overflow-hidden",children:[e.jsx("span",{className:"block overflow-hidden text-ellipsis whitespace-nowrap",title:t.column.columnDef.header?.toString?.()??"",children:t.isPlaceholder?null:k(t.column.columnDef.header,t.getContext())}),t.column.getCanSort()&&(t.column.getIsSorted()==="asc"?e.jsx(ee,{className:"ml-2 h-4 w-4 text-foreground"}):t.column.getIsSorted()==="desc"?e.jsx(te,{className:"ml-2 h-4 w-4 text-foreground"}):e.jsx(ae,{className:"ml-2 h-4 w-4 text-gray-400"}))]})},t.id))},l.id))}),e.jsx(Q,{children:h.getRowModel().rows.map(l=>e.jsx(g,{to:`/admin/dashboard/${r}/${l.original.id}`,children:e.jsx(b,{className:N("grid",l.original.isDraft&&"bg-orange-50 hover:bg-orange-100"),style:{gridTemplateColumns:`repeat(${x.length}, minmax(200px, 1fr))`},children:l.getVisibleCells().map(t=>e.jsx(J,{className:N("h-10"),children:k(t.column.columnDef.cell,t.getContext())},t.id))})},l.id))})]})]})}const ve=V(function({params:s}){const{collectionId:n}=s,{data:o,isFetching:i}=S(n);return i||!o?null:e.jsx("div",{className:"overflow-hidden flex flex-1 p-4 gap-4",children:e.jsx("div",{className:"flex flex-col overflow-hidden flex-1 gap-8",children:e.jsxs("div",{className:"flex flex-col h-full gap-4 last:mb-20",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx("h2",{className:"scroll-mt-[4.5rem] text-xl font-semibold leading-none capitalize",id:o.displayName,children:o.displayName}),e.jsx(B,{asChild:!0,variant:"default",size:"sm",className:"ml-auto",children:e.jsxs(g,{to:`/admin/dashboard/${n}/new`,children:[e.jsx(ce,{}),"Create"]})})]}),e.jsx(ue,{itemType:n},n)]})})})});export{ve as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{w as n,p as i}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{I as c}from"./itemForm-WlM0ABNB.js";import{l,o as p}from"./utils-oJIM4U5n.js";import"./button-CAQsSeJv.js";import"./index-B-2LEQwB.js";import"./schemas-UEZYZN9g.js";import"./index-Cxe-PO-X.js";import"./index-DLIEpuwL.js";import"./check-DF0ucE8d.js";import"./createLucideIcon-BvSqmaUO.js";import"./input-BuAmKgZ9.js";import"./index-DgNySWwD.js";import"./tslib.es6-Dm3DwgL9.js";const T=n(function({params:s}){const{collectionId:t,documentId:o}=s,{data:e,isFetching:r}=l(t),{data:a,isFetching:m}=p({itemType:t,id:o});return!e||(r||m)?null:i.jsx("div",{className:"overflow-auto scrollbar-stable",children:i.jsx("div",{className:"flex p-4 gap-4",children:i.jsx(c,{itemType:t,fields:e.fields,data:a??void 0,isSingleton:e.singleton},`${t}-${o}`)})})});export{T as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{w as r,p as t}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{I as s}from"./itemForm-WlM0ABNB.js";import{l as m}from"./utils-oJIM4U5n.js";import"./button-CAQsSeJv.js";import"./index-B-2LEQwB.js";import"./schemas-UEZYZN9g.js";import"./index-Cxe-PO-X.js";import"./index-DLIEpuwL.js";import"./check-DF0ucE8d.js";import"./createLucideIcon-BvSqmaUO.js";import"./input-BuAmKgZ9.js";import"./index-DgNySWwD.js";import"./tslib.es6-Dm3DwgL9.js";const y=r(function({params:i}){const{collectionId:e}=i,{data:o}=m(e);return o?t.jsx("div",{className:"overflow-auto",children:t.jsx("div",{className:"flex p-4 gap-4",children:t.jsx(s,{itemType:e,fields:o.fields,isNew:!0,isSingleton:o.singleton})})}):null});export{y as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e,a as r,x as N,y as X,v as he,z as xe,R as fe,w as be,O as me}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{u as ge,d as z,e as je}from"./authSlice-DyBWbN7g.js";import{a as l,b as P,d as ve,f as we,g as Ne,h as ye,u as Ce}from"./utils-oJIM4U5n.js";import{t as M}from"./index-CZSVchcX.js";import{R as Z,C as Y,a as J,T as ee,D as te,P as ae,O as se,u as Se}from"./index-DgNySWwD.js";import{X as ie,C as $}from"./x-BVtfHpQX.js";import{B as k}from"./button-CAQsSeJv.js";import{c as y}from"./createLucideIcon-BvSqmaUO.js";import{S as E,c as ke,u as _e}from"./index-B-2LEQwB.js";import{P as Me,u as Oe,c as ze,a as R,b as Pe,d as Ee,e as Re}from"./index-Cxe-PO-X.js";import{P as Ae,R as De,T as Ie,a as Te,C as Le,A as $e}from"./index-C0hImMcN.js";import{A as Be,a as Ge}from"./arrow-up-C0I0e1Jt.js";import{L as He}from"./tslib.es6-Dm3DwgL9.js";import{U as Fe}from"./upload-DhJ5wU_H.js";import{E as Ve}from"./external-link-ERgO2SVI.js";import{L as Ke}from"./Loading-BkOvB9cm.js";import{C as Ue}from"./chevron-right-BFlMu-RJ.js";import"./index-DLIEpuwL.js";import"./index-B45LLRRA.js";const qe=[["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["path",{d:"M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3",key:"1fpvtg"}]],We=y("blocks",qe);const Qe=[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]],Xe=y("files",Qe);const Ze=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],Ye=y("grid-3x3",Ze);const Je=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]],et=y("heart",Je);const tt=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],at=y("log-out",tt);const st=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],it=y("panel-left",st);const nt=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],ot=y("square",nt);function rt({...t}){return e.jsx(Z,{"data-slot":"dialog",...t})}function lt({...t}){return e.jsx(ae,{"data-slot":"dialog-portal",...t})}function dt({className:t,...a}){return e.jsx(se,{"data-slot":"dialog-overlay",className:l("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...a})}function ct({className:t,children:a,...i}){return e.jsxs(lt,{"data-slot":"dialog-portal",children:[e.jsx(dt,{}),e.jsxs(Y,{"data-slot":"dialog-content",className:l("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...i,children:[a,e.jsxs(J,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[e.jsx(ie,{}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function ut({className:t,...a}){return e.jsx("div",{"data-slot":"dialog-header",className:l("flex flex-col gap-2 text-center sm:text-left",t),...a})}function pt({className:t,...a}){return e.jsx("div",{"data-slot":"dialog-footer",className:l("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...a})}function ht({className:t,...a}){return e.jsx(ee,{"data-slot":"dialog-title",className:l("text-lg leading-none font-semibold",t),...a})}function xt({className:t,...a}){return e.jsx(te,{"data-slot":"dialog-description",className:l("text-muted-foreground text-sm",t),...a})}const ft="#181717",bt=r.forwardRef(function({title:a="GitHub",color:i="currentColor",size:s=24,...n},o){return i==="default"&&(i=ft),e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,fill:i,viewBox:"0 0 24 24",ref:o,...n,children:[e.jsx("title",{children:a}),e.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]})}),mt="#85EA2D",B=r.forwardRef(function({title:a="Swagger",color:i="currentColor",size:s=24,...n},o){return i==="default"&&(i=mt),e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,fill:i,viewBox:"0 0 24 24",ref:o,...n,children:[e.jsx("title",{children:a}),e.jsx("path",{d:"M12 0C5.383 0 0 5.383 0 12s5.383 12 12 12c6.616 0 12-5.383 12-12S18.616 0 12 0zm0 1.144c5.995 0 10.856 4.86 10.856 10.856 0 5.995-4.86 10.856-10.856 10.856-5.996 0-10.856-4.86-10.856-10.856C1.144 6.004 6.004 1.144 12 1.144zM8.37 5.868a6.707 6.707 0 0 0-.423.005c-.983.056-1.573.517-1.735 1.472-.115.665-.096 1.348-.143 2.017-.013.35-.05.697-.115 1.038-.134.609-.397.798-1.016.83a2.65 2.65 0 0 0-.244.042v1.463c1.126.055 1.278.452 1.37 1.629.033.429-.013.858.015 1.287.018.406.073.808.156 1.2.259 1.075 1.307 1.435 2.575 1.218v-1.283c-.203 0-.383.005-.558 0-.43-.013-.591-.12-.632-.535-.056-.535-.042-1.08-.075-1.62-.064-1.001-.175-1.988-1.153-2.625.503-.37.868-.812.983-1.398.083-.41.134-.821.166-1.237.028-.415-.023-.84.014-1.25.06-.665.102-.937.9-.91.12 0 .235-.017.369-.027v-1.31c-.16 0-.31-.004-.454-.006zm7.593.009a4.247 4.247 0 0 0-.813.06v1.274c.245 0 .434 0 .623.005.328.004.577.13.61.494.032.332.031.669.064 1.006.065.669.101 1.347.217 2.007.102.544.475.95.941 1.283-.817.549-1.057 1.333-1.098 2.215-.023.604-.037 1.213-.069 1.822-.028.554-.222.734-.78.748-.157.004-.31.018-.484.028v1.305c.327 0 .627.019.927 0 .932-.055 1.495-.507 1.68-1.412.078-.498.124-1 .138-1.504.032-.461.028-.927.074-1.384.069-.715.397-1.01 1.112-1.057a.972.972 0 0 0 .199-.046v-1.463c-.12-.014-.204-.027-.291-.032-.536-.023-.804-.203-.937-.71a5.146 5.146 0 0 1-.152-.993c-.037-.618-.033-1.241-.074-1.86-.08-1.192-.794-1.753-1.887-1.786zm-6.89 5.28a.844.844 0 0 0-.083 1.684h.055a.83.83 0 0 0 .877-.78v-.046a.845.845 0 0 0-.83-.858zm2.911 0a.808.808 0 0 0-.834.78c0 .027 0 .05.004.078 0 .503.342.826.859.826.507 0 .826-.332.826-.853-.005-.503-.342-.836-.855-.831zm2.963 0a.861.861 0 0 0-.876.835c0 .47.378.849.849.849h.009c.425.074.853-.337.881-.83.023-.457-.392-.854-.863-.854z"})]})});function gt({isOpen:t,setOpen:a}){return e.jsx(rt,{open:t,onOpenChange:i=>a(i),children:e.jsxs(ct,{children:[e.jsxs(ut,{children:[e.jsx(ht,{children:"Editorial"}),e.jsx(xt,{children:"A simple CMS for static websites"})]}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx(k,{asChild:!0,variant:"ghost",children:e.jsxs(N,{to:"https://lobelia-earth.github.io/editorial/",children:[e.jsx(B,{size:14}),"Documentation"]})}),e.jsx(k,{asChild:!0,variant:"ghost",children:e.jsxs(N,{to:"/doc/ui",children:[e.jsx(B,{size:14}),"Swagger API UI"]})}),e.jsx(k,{asChild:!0,variant:"ghost",children:e.jsxs(N,{to:"https://github.com/Lobelia-Earth/editorial",children:[e.jsx(bt,{size:14}),"GitHub repository"]})})]}),e.jsx(pt,{children:e.jsxs("p",{className:"flex items-center gap-1",children:["Created with",e.jsx(et,{size:14,className:"stroke-red-500 fill-red-500"})," by"," ",e.jsx(N,{to:"https://lobelia.earth",className:"underline hover:text-blue-500",children:"Lobelia.earth"})]})})]})})}var jt="Separator",G="horizontal",vt=["horizontal","vertical"],ne=r.forwardRef((t,a)=>{const{decorative:i,orientation:s=G,...n}=t,o=wt(s)?s:G,c=i?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return e.jsx(Me.div,{"data-orientation":o,...c,...n,ref:a})});ne.displayName=jt;function wt(t){return vt.includes(t)}var Nt=ne;function oe({className:t,orientation:a="horizontal",decorative:i=!0,...s}){return e.jsx(Nt,{"data-slot":"separator-root",decorative:i,orientation:a,className:l("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...s})}function yt({...t}){return e.jsx(Z,{"data-slot":"sheet",...t})}function Ct({...t}){return e.jsx(ae,{"data-slot":"sheet-portal",...t})}function St({className:t,...a}){return e.jsx(se,{"data-slot":"sheet-overlay",className:l("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...a})}function kt({className:t,children:a,side:i="right",...s}){return e.jsxs(Ct,{children:[e.jsx(St,{}),e.jsxs(Y,{"data-slot":"sheet-content",className:l("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",i==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",i==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",i==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",i==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...s,children:[a,e.jsxs(J,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[e.jsx(ie,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function _t({className:t,...a}){return e.jsx("div",{"data-slot":"sheet-header",className:l("flex flex-col gap-1.5 p-4",t),...a})}function Mt({className:t,...a}){return e.jsx(ee,{"data-slot":"sheet-title",className:l("text-foreground font-semibold",t),...a})}function Ot({className:t,...a}){return e.jsx(te,{"data-slot":"sheet-description",className:l("text-muted-foreground text-sm",t),...a})}function re({delayDuration:t=0,...a}){return e.jsx(Ae,{"data-slot":"tooltip-provider",delayDuration:t,...a})}function zt({...t}){return e.jsx(re,{children:e.jsx(De,{"data-slot":"tooltip",...t})})}function Pt({...t}){return e.jsx(Ie,{"data-slot":"tooltip-trigger",...t})}function Et({className:t,sideOffset:a=0,children:i,...s}){return e.jsx(Te,{children:e.jsxs(Le,{"data-slot":"tooltip-content",sideOffset:a,className:l("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t),...s,children:[i,e.jsx($e,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const O=768;function Rt(){const[t,a]=r.useState(void 0);return r.useEffect(()=>{const i=window.matchMedia(`(max-width: ${O-1}px)`),s=()=>{a(window.innerWidth<O)};return i.addEventListener("change",s),a(window.innerWidth<O),()=>i.removeEventListener("change",s)},[]),!!t}const At="sidebar_state",Dt=3600*24*7,It="16rem",Tt="18rem",Lt="3rem",$t="b",le=r.createContext(null);function A(){const t=r.useContext(le);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function Bt({defaultOpen:t=!0,open:a,onOpenChange:i,className:s,style:n,children:o,...d}){const c=Rt(),[f,u]=r.useState(!1),[m,C]=r.useState(t),b=a??m,j=r.useCallback(x=>{const p=typeof x=="function"?x(b):x;i?i(p):C(p),document.cookie=`${At}=${p}; path=/; max-age=${Dt}`},[i,b]),h=r.useCallback(()=>c?u(x=>!x):j(x=>!x),[c,j,u]);r.useEffect(()=>{const x=p=>{p.key===$t&&(p.metaKey||p.ctrlKey)&&(p.preventDefault(),h())};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[h]);const v=b?"expanded":"collapsed",S=r.useMemo(()=>({state:v,open:b,setOpen:j,isMobile:c,openMobile:f,setOpenMobile:u,toggleSidebar:h}),[v,b,j,c,f,u,h]);return e.jsx(le.Provider,{value:S,children:e.jsx(re,{delayDuration:0,children:e.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":It,"--sidebar-width-icon":Lt,...n},className:l("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",s),...d,children:o})})})}function Gt({side:t="left",variant:a="sidebar",collapsible:i="offcanvas",className:s,children:n,...o}){const{isMobile:d,state:c,openMobile:f,setOpenMobile:u}=A();return i==="none"?e.jsx("div",{"data-slot":"sidebar",className:l("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",s),...o,children:n}):d?e.jsx(yt,{open:f,onOpenChange:u,...o,children:e.jsxs(kt,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":Tt},side:t,children:[e.jsxs(_t,{className:"sr-only",children:[e.jsx(Mt,{children:"Sidebar"}),e.jsx(Ot,{children:"Displays the mobile sidebar."})]}),e.jsx("div",{className:"flex h-full w-full flex-col",children:n})]})}):e.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":c,"data-collapsible":c==="collapsed"?i:"","data-variant":a,"data-side":t,"data-slot":"sidebar",children:[e.jsx("div",{"data-slot":"sidebar-gap",className:l("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",a==="floating"||a==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),e.jsx("div",{"data-slot":"sidebar-container",className:l("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",t==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",a==="floating"||a==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",s),...o,children:e.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:n})})]})}function Ht({className:t,onClick:a,...i}){const{toggleSidebar:s}=A();return e.jsxs(k,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:l("size-7",t),onClick:n=>{a?.(n),s()},...i,children:[e.jsx(it,{}),e.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function Ft({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:l("flex flex-col gap-2 p-2",t),...a})}function Vt({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:l("flex flex-col gap-2 p-2",t),...a})}function Kt({className:t,...a}){return e.jsx(oe,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:l("bg-sidebar-border mx-2 w-auto",t),...a})}function Ut({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:l("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...a})}function H({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:l("relative flex w-full min-w-0 flex-col p-2",t),...a})}function F({className:t,asChild:a=!1,...i}){const s=a?E:"div";return e.jsx(s,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:l("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",t),...i})}function V({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:l("w-full text-sm",t),...a})}function K({className:t,...a}){return e.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:l("flex w-full min-w-0 flex-col gap-1",t),...a})}function w({className:t,...a}){return e.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:l("group/menu-item relative",t),...a})}const qt=ke("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function g({asChild:t=!1,isActive:a=!1,variant:i="default",size:s="default",tooltip:n,className:o,...d}){const c=t?E:"button",{isMobile:f,state:u}=A(),m=e.jsx(c,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":s,"data-active":a,className:l(qt({variant:i,size:s}),o),...d});return n?(typeof n=="string"&&(n={children:n}),e.jsxs(zt,{children:[e.jsx(Pt,{asChild:!0,children:m}),e.jsx(Et,{side:"right",align:"center",hidden:u!=="collapsed"||f,...n})]})):m}function Wt({className:t,...a}){return e.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:l("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",t),...a})}function Qt({asChild:t=!1,size:a="md",isActive:i=!1,className:s,...n}){const o=t?E:"a";return e.jsx(o,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":a,"data-active":i,className:l("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",a==="sm"&&"text-xs",a==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",s),...n})}function U({singleton:t}){const{data:a}=P(),{data:i}=ve();if(!a)return null;const s=r.useMemo(()=>Object.entries(a).filter(([,n])=>t?n.singleton:!n.singleton).toSorted(([n],[o])=>n.localeCompare(o)),[a,t]);return e.jsx(e.Fragment,{children:s.map(([n,o])=>e.jsx(Wt,{children:e.jsx(X,{to:t?`/admin/dashboard/${n}/default`:`/admin/dashboard/${n}`,className:({isActive:d,isPending:c})=>c?"pending":d?"active":"",children:({isActive:d})=>e.jsx(Qt,{isActive:d,asChild:!0,children:e.jsxs("div",{children:[e.jsx("span",{className:"inline-block overflow-hidden whitespace-nowrap text-ellipsis text-nowrap",children:o.displayName}),!t&&i?.[n]&&e.jsx("span",{className:"text-xs text-gray-500 ml-auto pr-1 min-w-[25px] text-right",children:Object.keys(i[n]).length})]})})})},o.displayName))})}var _="Collapsible",[Xt]=ze(_),[Zt,D]=Xt(_),de=r.forwardRef((t,a)=>{const{__scopeCollapsible:i,open:s,defaultOpen:n,disabled:o,onOpenChange:d,...c}=t,[f,u]=Oe({prop:s,defaultProp:n??!1,onChange:d,caller:_});return e.jsx(Zt,{scope:i,disabled:o,contentId:Se(),open:f,onOpenToggle:r.useCallback(()=>u(m=>!m),[u]),children:e.jsx(R.div,{"data-state":T(f),"data-disabled":o?"":void 0,...c,ref:a})})});de.displayName=_;var ce="CollapsibleTrigger",ue=r.forwardRef((t,a)=>{const{__scopeCollapsible:i,...s}=t,n=D(ce,i);return e.jsx(R.button,{type:"button","aria-controls":n.contentId,"aria-expanded":n.open||!1,"data-state":T(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...s,ref:a,onClick:Pe(t.onClick,n.onOpenToggle)})});ue.displayName=ce;var I="CollapsibleContent",pe=r.forwardRef((t,a)=>{const{forceMount:i,...s}=t,n=D(I,t.__scopeCollapsible);return e.jsx(Ee,{present:i||n.open,children:({present:o})=>e.jsx(Yt,{...s,ref:a,present:o})})});pe.displayName=I;var Yt=r.forwardRef((t,a)=>{const{__scopeCollapsible:i,present:s,children:n,...o}=t,d=D(I,i),[c,f]=r.useState(s),u=r.useRef(null),m=_e(a,u),C=r.useRef(0),b=C.current,j=r.useRef(0),h=j.current,v=d.open||c,S=r.useRef(v),x=r.useRef(void 0);return r.useEffect(()=>{const p=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(p)},[]),Re(()=>{const p=u.current;if(p){x.current=x.current||{transitionDuration:p.style.transitionDuration,animationName:p.style.animationName},p.style.transitionDuration="0s",p.style.animationName="none";const L=p.getBoundingClientRect();C.current=L.height,j.current=L.width,S.current||(p.style.transitionDuration=x.current.transitionDuration,p.style.animationName=x.current.animationName),f(s)}},[d.open,s]),e.jsx(R.div,{"data-state":T(d.open),"data-disabled":d.disabled?"":void 0,id:d.contentId,hidden:!v,...o,ref:m,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...t.style},children:v&&n})});function T(t){return t?"open":"closed"}var Jt=de;function q({...t}){return e.jsx(Jt,{"data-slot":"collapsible",...t})}function W({...t}){return e.jsx(ue,{"data-slot":"collapsible-trigger",...t})}function Q({...t}){return e.jsx(pe,{"data-slot":"collapsible-content",...t})}function ea(){const t=ge(),[a,i]=r.useState(!1),[s]=we(),[n]=Ne(),[o]=ye(),[d,c]=r.useState(!1),{data:f}=Ce(),{data:u}=P(),m=r.useMemo(()=>u&&!!Object.values(u).find(h=>!h.singleton),[u]),C=r.useMemo(()=>u&&!!Object.values(u).find(h=>h.singleton),[u]),b=z(h=>h.auth.user),j=async h=>{c(!0);try{await s({author:h}).unwrap()?M.success("Content published successfully."):M.error("Publishing failed.")}catch(v){M.error("Publishing failed."),console.error(v)}finally{c(!1)}};return e.jsxs(Gt,{className:"z-50",children:[e.jsx(gt,{isOpen:a,setOpen:i}),e.jsx(Ft,{className:"h-14 justify-center",children:e.jsx(H,{children:e.jsx(N,{to:"/admin/dashboard",className:"text-3xl font-semibold tracking-tight transition-colors",children:f?.name})})}),e.jsx(Ut,{children:e.jsxs(H,{children:[e.jsx(F,{children:"Content"}),e.jsx(V,{children:e.jsxs(K,{children:[e.jsx(q,{className:"group/collapsible",disabled:!m,children:e.jsxs(w,{children:[e.jsx(W,{asChild:!0,children:e.jsxs(g,{className:"group",children:[e.jsx(Ye,{}),e.jsx("span",{children:"Collections"}),e.jsx($,{className:"transition-transform ml-auto -mr-[2px] group-data-[state=open]:rotate-180"})]})}),e.jsx(Q,{children:e.jsx(U,{})})]})}),e.jsx(q,{className:"group/collapsible",disabled:!C,children:e.jsxs(w,{children:[e.jsx(W,{asChild:!0,children:e.jsxs(g,{className:"group",children:[e.jsx(ot,{}),e.jsx("span",{children:"Singles"}),e.jsx($,{className:"transition-transform ml-auto -mr-[2px] group-data-[state=open]:rotate-180"})]})}),e.jsx(Q,{children:e.jsx(U,{singleton:!0})})]})}),e.jsx(w,{children:e.jsx(g,{asChild:!0,children:e.jsxs(N,{to:"/admin/dashboard/files",children:[e.jsx(Xe,{}),e.jsx("span",{children:"Files"})]})})}),e.jsx(w,{children:e.jsxs(g,{disabled:!0,children:[e.jsx(We,{}),e.jsx("span",{children:"Components"})]})})]})})]})}),e.jsxs(Vt,{children:[e.jsx(F,{children:"Actions"}),e.jsx(V,{children:e.jsxs(K,{children:[b?.role==="developer"&&e.jsxs(e.Fragment,{children:[e.jsx(w,{children:e.jsxs(g,{className:"cursor-pointer",onClick:()=>n(),children:[e.jsx(Be,{}),e.jsx("span",{children:"Pull from repo"})]})}),e.jsx(w,{children:e.jsxs(g,{className:"cursor-pointer",onClick:()=>o({author:b.email}),children:[e.jsx(Ge,{}),e.jsx("span",{children:"Push to repo"})]})})]}),b&&e.jsx(w,{children:e.jsxs(g,{className:"cursor-pointer",onClick:()=>{j(b.email)},children:[d?e.jsx(He,{className:"animate-spin"}):e.jsx(Fe,{}),e.jsx("span",{children:"Publish"})]})})]})}),e.jsx(Kt,{}),e.jsx(g,{asChild:!0,children:e.jsxs(N,{to:f?.previewUrl,children:["Preview",e.jsx(Ve,{className:"ml-auto"})]})}),e.jsx(g,{className:"cursor-pointer",onClick:()=>i(!0),children:"About"}),e.jsxs(g,{className:"cursor-pointer",onClick:()=>t(je()),children:[e.jsx(at,{}),"Log out"]}),e.jsxs("div",{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:"text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0 group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",children:["Editorial v","6.13.2"]})]})]})}function ta({children:t}){const a=he(),i=z(n=>n.auth.user),s=z(n=>n.auth.isLoading);return r.useEffect(()=>{!s&&!i&&a("/admin")},[s,a,i]),s||!i?e.jsx(Ke,{}):t}function aa(){const{pathname:t}=xe(),{data:a}=P(),i=t.split("/").filter(s=>!["admin","dashboard"].includes(s)&&s!=="");return a?e.jsx(e.Fragment,{children:i.map((s,n,o)=>e.jsxs(fe.Fragment,{children:[o.length>1&&n>=1&&e.jsx(Ue,{size:12,className:"text-gray-500 pt-[1px]"}),e.jsxs("p",{className:"text-sm leading-none tracking-tight capitalize text-gray-500 last:text-foreground",children:[n<o.length-1&&a[s]&&a[s].singleton&&(a[s]?a[s].displayName:s),n<o.length-1&&a[s]&&!a[s].singleton&&e.jsx(X,{to:`/admin/dashboard/${s}`,className:({isActive:d,isPending:c})=>c?"pending":d?"active":"",children:a[s]?a[s].displayName:s}),n===o.length-1&&(a[s]?a[s].displayName:s)]},s)]},n))}):null}const Na=be(function(){return e.jsx(ta,{children:e.jsxs(Bt,{className:"flex h-full",children:[e.jsx(ea,{}),e.jsxs("main",{className:"flex flex-col flex-1 h-full w-0",children:[e.jsx("header",{className:"flex sticky bg-sidebar dark:bg-sidebar z-40 top-0 h-14 shrink-0 items-center gap-2 border-b",children:e.jsxs("div",{className:"flex items-center gap-2 px-3",children:[e.jsx(Ht,{}),e.jsx(oe,{orientation:"vertical",className:"h-4"}),e.jsx(aa,{})]})}),e.jsx(me,{})]})]})})});export{Na as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as r}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{B as l}from"./button-CAQsSeJv.js";import{P as n,a as p,f as c,C as f,b as u,c as x}from"./clear-button-D8P7FXYU.js";import{a as d}from"./utils-oJIM4U5n.js";import{C as j}from"./calendar-Frbsxn98.js";import"./index-B-2LEQwB.js";import"./createLucideIcon-BvSqmaUO.js";import"./chevron-right-BFlMu-RJ.js";import"./x-BVtfHpQX.js";import"./index-BuuBEQuS.js";import"./index-Cxe-PO-X.js";import"./index-DLIEpuwL.js";import"./index-DgNySWwD.js";import"./tslib.es6-Dm3DwgL9.js";import"./index-B45LLRRA.js";function T({id:e,date:t,onDateChange:o,placeholder:s="Pick a date",disabled:i=!1,className:a,allowClear:m=!1}){return r.jsxs(n,{children:[r.jsx(p,{asChild:!0,children:r.jsx(l,{variant:"outline",className:d("w-full justify-start text-left font-normal relative",!t&&"text-muted-foreground",a),disabled:i,children:r.jsxs(r.Fragment,{children:[r.jsx(j,{className:"mr-2 h-4 w-4"}),t?c(t,"PPP"):r.jsx("span",{children:s}),r.jsx(f,{onClear:()=>{o?.(void 0)},visible:m&&!!t})]})})}),r.jsx(u,{className:"w-auto p-0",children:r.jsx(x,{id:e,mode:"single",selected:t,onSelect:o,initialFocus:!0})})]})}export{T as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,p as t}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{B as N}from"./button-CAQsSeJv.js";import{f as c,P as b,a as H,C as S,b as g,c as k}from"./clear-button-D8P7FXYU.js";import{I as B}from"./input-BuAmKgZ9.js";import{a as E}from"./utils-oJIM4U5n.js";import{C as w}from"./calendar-Frbsxn98.js";import"./index-B-2LEQwB.js";import"./createLucideIcon-BvSqmaUO.js";import"./chevron-right-BFlMu-RJ.js";import"./x-BVtfHpQX.js";import"./index-BuuBEQuS.js";import"./index-Cxe-PO-X.js";import"./index-DLIEpuwL.js";import"./index-DgNySWwD.js";import"./tslib.es6-Dm3DwgL9.js";import"./index-B45LLRRA.js";function U({id:d,date:s,onDateTimeChange:r,placeholder:x="Pick a date and time",disabled:u=!1,className:j,allowClear:v=!1}){const[e,i]=a.useState(s),[m,p]=a.useState(s?c(s,"HH:mm"):"12:00");a.useEffect(()=>{i(s),s&&p(c(s,"HH:mm"))},[s]);const h=a.useCallback(o=>{const l=o.target.value;if(p(l),!e)return;const[n,C]=l.split(":").map(Number),f=new Date(e);f.setHours(n,C,0,0),r?.(f)},[e,r]),P=a.useCallback(o=>{if(!o){i(void 0),r?.(void 0);return}const[l,n]=m.split(":").map(Number);o.setHours(l,n,0,0),i(o),r?.(o)},[m,r]);return t.jsxs("div",{className:"flex gap-2",children:[t.jsxs(b,{children:[t.jsx(H,{asChild:!0,children:t.jsx(N,{variant:"outline",className:E("flex-1 justify-start text-left font-normal relative",!e&&"text-muted-foreground",j),disabled:u,children:t.jsxs(t.Fragment,{children:[t.jsx(w,{className:"mr-2 h-4 w-4"}),e?c(e,"PPP"):t.jsx("span",{children:x}),t.jsx(S,{onClear:()=>{i(void 0),r?.(void 0)},visible:v&&!!s})]})})}),t.jsx(g,{className:"w-auto p-0",children:t.jsx(k,{id:d,mode:"single",selected:e,onSelect:P,initialFocus:!0})})]}),t.jsx(B,{type:"time",value:m,onChange:h,disabled:u||!e,className:"w-32"})]})}export{U as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as R,p as Y}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{a as Ae}from"./index-DLIEpuwL.js";import{a as At,c as Re,g as Ce,e as $t}from"./index-Cxe-PO-X.js";import{u as Xt}from"./index-B-2LEQwB.js";import{d as Pe}from"./index-DgNySWwD.js";const Oe=["top","right","bottom","left"],Z=Math.min,W=Math.max,at=Math.round,ct=Math.floor,z=t=>({x:t,y:t}),Se={left:"right",right:"left",bottom:"top",top:"bottom"},Ee={start:"end",end:"start"};function yt(t,e,n){return W(t,Z(e,n))}function q(t,e){return typeof t=="function"?t(e):t}function U(t){return t.split("-")[0]}function tt(t){return t.split("-")[1]}function Rt(t){return t==="x"?"y":"x"}function Ct(t){return t==="y"?"height":"width"}const Le=new Set(["top","bottom"]);function j(t){return Le.has(U(t))?"y":"x"}function Pt(t){return Rt(j(t))}function De(t,e,n){n===void 0&&(n=!1);const o=tt(t),r=Pt(t),i=Ct(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=ft(s)),[s,ft(s)]}function Me(t){const e=ft(t);return[vt(t),e,vt(e)]}function vt(t){return t.replace(/start|end/g,e=>Ee[e])}const kt=["left","right"],Ft=["right","left"],Te=["top","bottom"],$e=["bottom","top"];function ke(t,e,n){switch(t){case"top":case"bottom":return n?e?Ft:kt:e?kt:Ft;case"left":case"right":return e?Te:$e;default:return[]}}function Fe(t,e,n,o){const r=tt(t);let i=ke(U(t),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),e&&(i=i.concat(i.map(vt)))),i}function ft(t){return t.replace(/left|right|bottom|top/g,e=>Se[e])}function Ne(t){return{top:0,right:0,bottom:0,left:0,...t}}function Yt(t){return typeof t!="number"?Ne(t):{top:t,right:t,bottom:t,left:t}}function ut(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function Nt(t,e,n){let{reference:o,floating:r}=t;const i=j(e),s=Pt(e),c=Ct(s),l=U(e),a=i==="y",f=o.x+o.width/2-r.width/2,u=o.y+o.height/2-r.height/2,m=o[c]/2-r[c]/2;let d;switch(l){case"top":d={x:f,y:o.y-r.height};break;case"bottom":d={x:f,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:u};break;case"left":d={x:o.x-r.width,y:u};break;default:d={x:o.x,y:o.y}}switch(tt(e)){case"start":d[s]-=m*(n&&a?-1:1);break;case"end":d[s]+=m*(n&&a?-1:1);break}return d}const We=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,c=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let a=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:f,y:u}=Nt(a,o,l),m=o,d={},p=0;for(let h=0;h<c.length;h++){const{name:w,fn:g}=c[h],{x,y:b,data:y,reset:v}=await g({x:f,y:u,initialPlacement:o,placement:m,strategy:r,middlewareData:d,rects:a,platform:s,elements:{reference:t,floating:e}});f=x??f,u=b??u,d={...d,[w]:{...d[w],...y}},v&&p<=50&&(p++,typeof v=="object"&&(v.placement&&(m=v.placement),v.rects&&(a=v.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:r}):v.rects),{x:f,y:u}=Nt(a,m,l)),h=-1)}return{x:f,y:u,placement:m,strategy:r,middlewareData:d}};async function ot(t,e){var n;e===void 0&&(e={});const{x:o,y:r,platform:i,rects:s,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:m=!1,padding:d=0}=q(e,t),p=Yt(d),w=c[m?u==="floating"?"reference":"floating":u],g=ut(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:a,rootBoundary:f,strategy:l})),x=u==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),y=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},v=ut(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:b,strategy:l}):x);return{top:(g.top-v.top+p.top)/y.y,bottom:(v.bottom-g.bottom+p.bottom)/y.y,left:(g.left-v.left+p.left)/y.x,right:(v.right-g.right+p.right)/y.x}}const He=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:i,platform:s,elements:c,middlewareData:l}=e,{element:a,padding:f=0}=q(t,e)||{};if(a==null)return{};const u=Yt(f),m={x:n,y:o},d=Pt(r),p=Ct(d),h=await s.getDimensions(a),w=d==="y",g=w?"top":"left",x=w?"bottom":"right",b=w?"clientHeight":"clientWidth",y=i.reference[p]+i.reference[d]-m[d]-i.floating[p],v=m[d]-i.reference[d],P=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a));let C=P?P[b]:0;(!C||!await(s.isElement==null?void 0:s.isElement(P)))&&(C=c.floating[b]||i.floating[p]);const M=y/2-v/2,F=C/2-h[p]/2-1,D=Z(u[g],F),$=Z(u[x],F),k=D,S=C-h[p]-$,O=C/2-h[p]/2+M,N=yt(k,O,S),E=!l.arrow&&tt(r)!=null&&O!==N&&i.reference[p]/2-(O<k?D:$)-h[p]/2<0,L=E?O<k?O-k:O-S:0;return{[d]:m[d]+L,data:{[d]:N,centerOffset:O-N-L,...E&&{alignmentOffset:L}},reset:E}}}),_e=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:h=!0,...w}=q(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=U(r),x=j(c),b=U(c)===c,y=await(l.isRTL==null?void 0:l.isRTL(a.floating)),v=m||(b||!h?[ft(c)]:Me(c)),P=p!=="none";!m&&P&&v.push(...Fe(c,h,p,y));const C=[c,...v],M=await ot(e,w),F=[];let D=((o=i.flip)==null?void 0:o.overflows)||[];if(f&&F.push(M[g]),u){const O=De(r,s,y);F.push(M[O[0]],M[O[1]])}if(D=[...D,{placement:r,overflows:F}],!F.every(O=>O<=0)){var $,k;const O=((($=i.flip)==null?void 0:$.index)||0)+1,N=C[O];if(N&&(!(u==="alignment"?x!==j(N):!1)||D.every(A=>j(A.placement)===x?A.overflows[0]>0:!0)))return{data:{index:O,overflows:D},reset:{placement:N}};let E=(k=D.filter(L=>L.overflows[0]<=0).sort((L,A)=>L.overflows[1]-A.overflows[1])[0])==null?void 0:k.placement;if(!E)switch(d){case"bestFit":{var S;const L=(S=D.filter(A=>{if(P){const T=j(A.placement);return T===x||T==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(T=>T>0).reduce((T,V)=>T+V,0)]).sort((A,T)=>A[1]-T[1])[0])==null?void 0:S[0];L&&(E=L);break}case"initialPlacement":E=c;break}if(r!==E)return{reset:{placement:E}}}return{}}}};function Wt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Ht(t){return Oe.some(e=>t[e]>=0)}const Be=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:o="referenceHidden",...r}=q(t,e);switch(o){case"referenceHidden":{const i=await ot(e,{...r,elementContext:"reference"}),s=Wt(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Ht(s)}}}case"escaped":{const i=await ot(e,{...r,altBoundary:!0}),s=Wt(i,n.floating);return{data:{escapedOffsets:s,escaped:Ht(s)}}}default:return{}}}}},qt=new Set(["left","top"]);async function Ve(t,e){const{placement:n,platform:o,elements:r}=t,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=U(n),c=tt(n),l=j(n)==="y",a=qt.has(s)?-1:1,f=i&&l?-1:1,u=q(e,t);let{mainAxis:m,crossAxis:d,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof p=="number"&&(d=c==="end"?p*-1:p),l?{x:d*f,y:m*a}:{x:m*a,y:d*f}}const je=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:i,placement:s,middlewareData:c}=e,l=await Ve(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:s}}}}},ze=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r}=e,{mainAxis:i=!0,crossAxis:s=!1,limiter:c={fn:w=>{let{x:g,y:x}=w;return{x:g,y:x}}},...l}=q(t,e),a={x:n,y:o},f=await ot(e,l),u=j(U(r)),m=Rt(u);let d=a[m],p=a[u];if(i){const w=m==="y"?"top":"left",g=m==="y"?"bottom":"right",x=d+f[w],b=d-f[g];d=yt(x,d,b)}if(s){const w=u==="y"?"top":"left",g=u==="y"?"bottom":"right",x=p+f[w],b=p-f[g];p=yt(x,p,b)}const h=c.fn({...e,[m]:d,[u]:p});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[m]:i,[u]:s}}}}}},Ie=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:r,rects:i,middlewareData:s}=e,{offset:c=0,mainAxis:l=!0,crossAxis:a=!0}=q(t,e),f={x:n,y:o},u=j(r),m=Rt(u);let d=f[m],p=f[u];const h=q(c,e),w=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const b=m==="y"?"height":"width",y=i.reference[m]-i.floating[b]+w.mainAxis,v=i.reference[m]+i.reference[b]-w.mainAxis;d<y?d=y:d>v&&(d=v)}if(a){var g,x;const b=m==="y"?"width":"height",y=qt.has(U(r)),v=i.reference[u]-i.floating[b]+(y&&((g=s.offset)==null?void 0:g[u])||0)+(y?0:w.crossAxis),P=i.reference[u]+i.reference[b]+(y?0:((x=s.offset)==null?void 0:x[u])||0)-(y?w.crossAxis:0);p<v?p=v:p>P&&(p=P)}return{[m]:d,[u]:p}}}},Xe=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:r,rects:i,platform:s,elements:c}=e,{apply:l=()=>{},...a}=q(t,e),f=await ot(e,a),u=U(r),m=tt(r),d=j(r)==="y",{width:p,height:h}=i.floating;let w,g;u==="top"||u==="bottom"?(w=u,g=m===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(g=u,w=m==="end"?"top":"bottom");const x=h-f.top-f.bottom,b=p-f.left-f.right,y=Z(h-f[w],x),v=Z(p-f[g],b),P=!e.middlewareData.shift;let C=y,M=v;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(M=b),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(C=x),P&&!m){const D=W(f.left,0),$=W(f.right,0),k=W(f.top,0),S=W(f.bottom,0);d?M=p-2*(D!==0||$!==0?D+$:W(f.left,f.right)):C=h-2*(k!==0||S!==0?k+S:W(f.top,f.bottom))}await l({...e,availableWidth:M,availableHeight:C});const F=await s.getDimensions(c.floating);return p!==F.width||h!==F.height?{reset:{rects:!0}}:{}}}};function pt(){return typeof window<"u"}function et(t){return Ut(t)?(t.nodeName||"").toLowerCase():"#document"}function H(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function X(t){var e;return(e=(Ut(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ut(t){return pt()?t instanceof Node||t instanceof H(t).Node:!1}function _(t){return pt()?t instanceof Element||t instanceof H(t).Element:!1}function I(t){return pt()?t instanceof HTMLElement||t instanceof H(t).HTMLElement:!1}function _t(t){return!pt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof H(t).ShadowRoot}const Ye=new Set(["inline","contents"]);function it(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=B(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Ye.has(r)}const qe=new Set(["table","td","th"]);function Ue(t){return qe.has(et(t))}const Ze=[":popover-open",":modal"];function mt(t){return Ze.some(e=>{try{return t.matches(e)}catch{return!1}})}const Ke=["transform","translate","scale","rotate","perspective"],Ge=["transform","translate","scale","rotate","perspective","filter"],Je=["paint","layout","strict","content"];function Ot(t){const e=St(),n=_(t)?B(t):t;return Ke.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Ge.some(o=>(n.willChange||"").includes(o))||Je.some(o=>(n.contain||"").includes(o))}function Qe(t){let e=K(t);for(;I(e)&&!Q(e);){if(Ot(e))return e;if(mt(e))return null;e=K(e)}return null}function St(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const tn=new Set(["html","body","#document"]);function Q(t){return tn.has(et(t))}function B(t){return H(t).getComputedStyle(t)}function ht(t){return _(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function K(t){if(et(t)==="html")return t;const e=t.assignedSlot||t.parentNode||_t(t)&&t.host||X(t);return _t(e)?e.host:e}function Zt(t){const e=K(t);return Q(e)?t.ownerDocument?t.ownerDocument.body:t.body:I(e)&&it(e)?e:Zt(e)}function rt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=Zt(t),i=r===((o=t.ownerDocument)==null?void 0:o.body),s=H(r);if(i){const c=bt(s);return e.concat(s,s.visualViewport||[],it(r)?r:[],c&&n?rt(c):[])}return e.concat(r,rt(r,[],n))}function bt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Kt(t){const e=B(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=I(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:o,c=at(n)!==i||at(o)!==s;return c&&(n=i,o=s),{width:n,height:o,$:c}}function Et(t){return _(t)?t:t.contextElement}function J(t){const e=Et(t);if(!I(e))return z(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=Kt(e);let s=(i?at(n.width):n.width)/o,c=(i?at(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const en=z(0);function Gt(t){const e=H(t);return!St()||!e.visualViewport?en:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function nn(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==H(t)?!1:e}function G(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=Et(t);let s=z(1);e&&(o?_(o)&&(s=J(o)):s=J(t));const c=nn(i,n,o)?Gt(i):z(0);let l=(r.left+c.x)/s.x,a=(r.top+c.y)/s.y,f=r.width/s.x,u=r.height/s.y;if(i){const m=H(i),d=o&&_(o)?H(o):o;let p=m,h=bt(p);for(;h&&o&&d!==p;){const w=J(h),g=h.getBoundingClientRect(),x=B(h),b=g.left+(h.clientLeft+parseFloat(x.paddingLeft))*w.x,y=g.top+(h.clientTop+parseFloat(x.paddingTop))*w.y;l*=w.x,a*=w.y,f*=w.x,u*=w.y,l+=b,a+=y,p=H(h),h=bt(p)}}return ut({width:f,height:u,x:l,y:a})}function gt(t,e){const n=ht(t).scrollLeft;return e?e.left+n:G(X(t)).left+n}function Jt(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-gt(t,n),r=n.top+e.scrollTop;return{x:o,y:r}}function on(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i=r==="fixed",s=X(o),c=e?mt(e.floating):!1;if(o===s||c&&i)return n;let l={scrollLeft:0,scrollTop:0},a=z(1);const f=z(0),u=I(o);if((u||!u&&!i)&&((et(o)!=="body"||it(s))&&(l=ht(o)),I(o))){const d=G(o);a=J(o),f.x=d.x+o.clientLeft,f.y=d.y+o.clientTop}const m=s&&!u&&!i?Jt(s,l):z(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+f.x+m.x,y:n.y*a.y-l.scrollTop*a.y+f.y+m.y}}function rn(t){return Array.from(t.getClientRects())}function sn(t){const e=X(t),n=ht(t),o=t.ownerDocument.body,r=W(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=W(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+gt(t);const c=-n.scrollTop;return B(o).direction==="rtl"&&(s+=W(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:c}}const Bt=25;function cn(t,e){const n=H(t),o=X(t),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,c=0,l=0;if(r){i=r.width,s=r.height;const f=St();(!f||f&&e==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}const a=gt(o);if(a<=0){const f=o.ownerDocument,u=f.body,m=getComputedStyle(u),d=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,p=Math.abs(o.clientWidth-u.clientWidth-d);p<=Bt&&(i-=p)}else a<=Bt&&(i+=a);return{width:i,height:s,x:c,y:l}}const ln=new Set(["absolute","fixed"]);function an(t,e){const n=G(t,!0,e==="fixed"),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=I(t)?J(t):z(1),s=t.clientWidth*i.x,c=t.clientHeight*i.y,l=r*i.x,a=o*i.y;return{width:s,height:c,x:l,y:a}}function Vt(t,e,n){let o;if(e==="viewport")o=cn(t,n);else if(e==="document")o=sn(X(t));else if(_(e))o=an(e,n);else{const r=Gt(t);o={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return ut(o)}function Qt(t,e){const n=K(t);return n===e||!_(n)||Q(n)?!1:B(n).position==="fixed"||Qt(n,e)}function fn(t,e){const n=e.get(t);if(n)return n;let o=rt(t,[],!1).filter(c=>_(c)&&et(c)!=="body"),r=null;const i=B(t).position==="fixed";let s=i?K(t):t;for(;_(s)&&!Q(s);){const c=B(s),l=Ot(s);!l&&c.position==="fixed"&&(r=null),(i?!l&&!r:!l&&c.position==="static"&&!!r&&ln.has(r.position)||it(s)&&!l&&Qt(t,s))?o=o.filter(f=>f!==s):r=c,s=K(s)}return e.set(t,o),o}function un(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const s=[...n==="clippingAncestors"?mt(e)?[]:fn(e,this._c):[].concat(n),o],c=s[0],l=s.reduce((a,f)=>{const u=Vt(e,f,r);return a.top=W(u.top,a.top),a.right=Z(u.right,a.right),a.bottom=Z(u.bottom,a.bottom),a.left=W(u.left,a.left),a},Vt(e,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function dn(t){const{width:e,height:n}=Kt(t);return{width:e,height:n}}function pn(t,e,n){const o=I(e),r=X(e),i=n==="fixed",s=G(t,!0,i,e);let c={scrollLeft:0,scrollTop:0};const l=z(0);function a(){l.x=gt(r)}if(o||!o&&!i)if((et(e)!=="body"||it(r))&&(c=ht(e)),o){const d=G(e,!0,i,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else r&&a();i&&!o&&r&&a();const f=r&&!o&&!i?Jt(r,c):z(0),u=s.left+c.scrollLeft-l.x-f.x,m=s.top+c.scrollTop-l.y-f.y;return{x:u,y:m,width:s.width,height:s.height}}function wt(t){return B(t).position==="static"}function jt(t,e){if(!I(t)||B(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return X(t)===n&&(n=n.ownerDocument.body),n}function te(t,e){const n=H(t);if(mt(t))return n;if(!I(t)){let r=K(t);for(;r&&!Q(r);){if(_(r)&&!wt(r))return r;r=K(r)}return n}let o=jt(t,e);for(;o&&Ue(o)&&wt(o);)o=jt(o,e);return o&&Q(o)&&wt(o)&&!Ot(o)?n:o||Qe(t)||n}const mn=async function(t){const e=this.getOffsetParent||te,n=this.getDimensions,o=await n(t.floating);return{reference:pn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function hn(t){return B(t).direction==="rtl"}const gn={convertOffsetParentRelativeRectToViewportRelativeRect:on,getDocumentElement:X,getClippingRect:un,getOffsetParent:te,getElementRects:mn,getClientRects:rn,getDimensions:dn,getScale:J,isElement:_,isRTL:hn};function ee(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function wn(t,e){let n=null,o;const r=X(t);function i(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),i();const a=t.getBoundingClientRect(),{left:f,top:u,width:m,height:d}=a;if(c||e(),!m||!d)return;const p=ct(u),h=ct(r.clientWidth-(f+m)),w=ct(r.clientHeight-(u+d)),g=ct(f),b={rootMargin:-p+"px "+-h+"px "+-w+"px "+-g+"px",threshold:W(0,Z(1,l))||1};let y=!0;function v(P){const C=P[0].intersectionRatio;if(C!==l){if(!y)return s();C?s(!1,C):o=setTimeout(()=>{s(!1,1e-7)},1e3)}C===1&&!ee(a,t.getBoundingClientRect())&&s(),y=!1}try{n=new IntersectionObserver(v,{...b,root:r.ownerDocument})}catch{n=new IntersectionObserver(v,b)}n.observe(t)}return s(!0),i}function xn(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Et(t),f=r||i?[...a?rt(a):[],...rt(e)]:[];f.forEach(g=>{r&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const u=a&&c?wn(a,n):null;let m=-1,d=null;s&&(d=new ResizeObserver(g=>{let[x]=g;x&&x.target===a&&d&&(d.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=d)==null||b.observe(e)})),n()}),a&&!l&&d.observe(a),d.observe(e));let p,h=l?G(t):null;l&&w();function w(){const g=G(t);h&&!ee(h,g)&&n(),h=g,p=requestAnimationFrame(w)}return n(),()=>{var g;f.forEach(x=>{r&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),u?.(),(g=d)==null||g.disconnect(),d=null,l&&cancelAnimationFrame(p)}}const yn=je,vn=ze,bn=_e,An=Xe,Rn=Be,zt=He,Cn=Ie,Pn=(t,e,n)=>{const o=new Map,r={platform:gn,...n},i={...r.platform,_c:o};return We(t,e,{...r,platform:i})};var On=typeof document<"u",Sn=function(){},lt=On?R.useLayoutEffect:Sn;function dt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,r;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!dt(t[o],e[o]))return!1;return!0}if(r=Object.keys(t),n=r.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&t.$$typeof)&&!dt(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function ne(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function It(t,e){const n=ne(t);return Math.round(e*n)/n}function xt(t){const e=R.useRef(t);return lt(()=>{e.current=t}),e}function En(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:l,open:a}=t,[f,u]=R.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,d]=R.useState(o);dt(m,o)||d(o);const[p,h]=R.useState(null),[w,g]=R.useState(null),x=R.useCallback(A=>{A!==P.current&&(P.current=A,h(A))},[]),b=R.useCallback(A=>{A!==C.current&&(C.current=A,g(A))},[]),y=i||p,v=s||w,P=R.useRef(null),C=R.useRef(null),M=R.useRef(f),F=l!=null,D=xt(l),$=xt(r),k=xt(a),S=R.useCallback(()=>{if(!P.current||!C.current)return;const A={placement:e,strategy:n,middleware:m};$.current&&(A.platform=$.current),Pn(P.current,C.current,A).then(T=>{const V={...T,isPositioned:k.current!==!1};O.current&&!dt(M.current,V)&&(M.current=V,Ae.flushSync(()=>{u(V)}))})},[m,e,n,$,k]);lt(()=>{a===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,u(A=>({...A,isPositioned:!1})))},[a]);const O=R.useRef(!1);lt(()=>(O.current=!0,()=>{O.current=!1}),[]),lt(()=>{if(y&&(P.current=y),v&&(C.current=v),y&&v){if(D.current)return D.current(y,v,S);S()}},[y,v,S,D,F]);const N=R.useMemo(()=>({reference:P,floating:C,setReference:x,setFloating:b}),[x,b]),E=R.useMemo(()=>({reference:y,floating:v}),[y,v]),L=R.useMemo(()=>{const A={position:n,left:0,top:0};if(!E.floating)return A;const T=It(E.floating,f.x),V=It(E.floating,f.y);return c?{...A,transform:"translate("+T+"px, "+V+"px)",...ne(E.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:V}},[n,c,E.floating,f.x,f.y]);return R.useMemo(()=>({...f,update:S,refs:N,elements:E,floatingStyles:L}),[f,S,N,E,L])}const Ln=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:o,padding:r}=typeof t=="function"?t(n):t;return o&&e(o)?o.current!=null?zt({element:o.current,padding:r}).fn(n):{}:o?zt({element:o,padding:r}).fn(n):{}}}},Dn=(t,e)=>({...yn(t),options:[t,e]}),Mn=(t,e)=>({...vn(t),options:[t,e]}),Tn=(t,e)=>({...Cn(t),options:[t,e]}),$n=(t,e)=>({...bn(t),options:[t,e]}),kn=(t,e)=>({...An(t),options:[t,e]}),Fn=(t,e)=>({...Rn(t),options:[t,e]}),Nn=(t,e)=>({...Ln(t),options:[t,e]});var Wn="Arrow",oe=R.forwardRef((t,e)=>{const{children:n,width:o=10,height:r=5,...i}=t;return Y.jsx(At.svg,{...i,ref:e,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:Y.jsx("polygon",{points:"0,0 30,0 15,10"})})});oe.displayName=Wn;var Hn=oe,Lt="Popper",[re,Kn]=Re(Lt),[_n,ie]=re(Lt),se=t=>{const{__scopePopper:e,children:n}=t,[o,r]=R.useState(null);return Y.jsx(_n,{scope:e,anchor:o,onAnchorChange:r,children:n})};se.displayName=Lt;var ce="PopperAnchor",le=R.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:o,...r}=t,i=ie(ce,n),s=R.useRef(null),c=Xt(e,s),l=R.useRef(null);return R.useEffect(()=>{const a=l.current;l.current=o?.current||s.current,a!==l.current&&i.onAnchorChange(l.current)}),o?null:Y.jsx(At.div,{...r,ref:c})});le.displayName=ce;var Dt="PopperContent",[Bn,Vn]=re(Dt),ae=R.forwardRef((t,e)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:i="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:a=[],collisionPadding:f=0,sticky:u="partial",hideWhenDetached:m=!1,updatePositionStrategy:d="optimized",onPlaced:p,...h}=t,w=ie(Dt,n),[g,x]=R.useState(null),b=Xt(e,nt=>x(nt)),[y,v]=R.useState(null),P=Ce(y),C=P?.width??0,M=P?.height??0,F=o+(i!=="center"?"-"+i:""),D=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},$=Array.isArray(a)?a:[a],k=$.length>0,S={padding:D,boundary:$.filter(zn),altBoundary:k},{refs:O,floatingStyles:N,placement:E,isPositioned:L,middlewareData:A}=En({strategy:"fixed",placement:F,whileElementsMounted:(...nt)=>xn(...nt,{animationFrame:d==="always"}),elements:{reference:w.anchor},middleware:[Dn({mainAxis:r+M,alignmentAxis:s}),l&&Mn({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Tn():void 0,...S}),l&&$n({...S}),kn({...S,apply:({elements:nt,rects:Tt,availableWidth:xe,availableHeight:ye})=>{const{width:ve,height:be}=Tt.reference,st=nt.floating.style;st.setProperty("--radix-popper-available-width",`${xe}px`),st.setProperty("--radix-popper-available-height",`${ye}px`),st.setProperty("--radix-popper-anchor-width",`${ve}px`),st.setProperty("--radix-popper-anchor-height",`${be}px`)}}),y&&Nn({element:y,padding:c}),In({arrowWidth:C,arrowHeight:M}),m&&Fn({strategy:"referenceHidden",...S})]}),[T,V]=de(E),Mt=Pe(p);$t(()=>{L&&Mt?.()},[L,Mt]);const pe=A.arrow?.x,me=A.arrow?.y,he=A.arrow?.centerOffset!==0,[ge,we]=R.useState();return $t(()=>{g&&we(window.getComputedStyle(g).zIndex)},[g]),Y.jsx("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...N,transform:L?N.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:Y.jsx(Bn,{scope:n,placedSide:T,onArrowChange:v,arrowX:pe,arrowY:me,shouldHideArrow:he,children:Y.jsx(At.div,{"data-side":T,"data-align":V,...h,ref:b,style:{...h.style,animation:L?void 0:"none"}})})})});ae.displayName=Dt;var fe="PopperArrow",jn={top:"bottom",right:"left",bottom:"top",left:"right"},ue=R.forwardRef(function(e,n){const{__scopePopper:o,...r}=e,i=Vn(fe,o),s=jn[i.placedSide];return Y.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:Y.jsx(Hn,{...r,ref:n,style:{...r.style,display:"block"}})})});ue.displayName=fe;function zn(t){return t!==null}var In=t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:o,middlewareData:r}=e,s=r.arrow?.centerOffset!==0,c=s?0:t.arrowWidth,l=s?0:t.arrowHeight,[a,f]=de(n),u={start:"0%",center:"50%",end:"100%"}[f],m=(r.arrow?.x??0)+c/2,d=(r.arrow?.y??0)+l/2;let p="",h="";return a==="bottom"?(p=s?u:`${m}px`,h=`${-l}px`):a==="top"?(p=s?u:`${m}px`,h=`${o.floating.height+l}px`):a==="right"?(p=`${-l}px`,h=s?u:`${d}px`):a==="left"&&(p=`${o.floating.width+l}px`,h=s?u:`${d}px`),{data:{x:p,y:h}}}});function de(t){const[e,n="center"]=t.split("-");return[e,n]}var Gn=se,Jn=le,Qn=ae,to=ue;export{Jn as A,Qn as C,Gn as R,to as a,Kn as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as c,p}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{u as G,c as H,a as A,b as P,d as O,i as K}from"./index-Cxe-PO-X.js";import{u as _}from"./index-B-2LEQwB.js";import{u as $,e as U,h as V,g as W,f as Z,F as q,i as z}from"./index-DgNySWwD.js";import{c as E,R as B,A as w,a as J,C as Q}from"./index-B45LLRRA.js";var x="Popover",[j]=H(x,[E]),g=E(),[X,u]=j(x),b=e=>{const{__scopePopover:n,children:t,open:s,defaultOpen:o,onOpenChange:r,modal:a=!1}=e,i=g(n),f=c.useRef(null),[v,h]=c.useState(!1),[C,l]=G({prop:s,defaultProp:o??!1,onChange:r,caller:x});return p.jsx(B,{...i,children:p.jsx(X,{scope:n,contentId:$(),triggerRef:f,open:C,onOpenChange:l,onOpenToggle:c.useCallback(()=>l(m=>!m),[l]),hasCustomAnchor:v,onCustomAnchorAdd:c.useCallback(()=>h(!0),[]),onCustomAnchorRemove:c.useCallback(()=>h(!1),[]),modal:a,children:t})})};b.displayName=x;var F="PopoverAnchor",N=c.forwardRef((e,n)=>{const{__scopePopover:t,...s}=e,o=u(F,t),r=g(t),{onCustomAnchorAdd:a,onCustomAnchorRemove:i}=o;return c.useEffect(()=>(a(),()=>i()),[a,i]),p.jsx(w,{...r,...s,ref:n})});N.displayName=F;var S="PopoverTrigger",y=c.forwardRef((e,n)=>{const{__scopePopover:t,...s}=e,o=u(S,t),r=g(t),a=_(n,o.triggerRef),i=p.jsx(A.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":L(o.open),...s,ref:a,onClick:P(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:p.jsx(w,{asChild:!0,...r,children:i})});y.displayName=S;var R="PopoverPortal",[Y,ee]=j(R,{forceMount:void 0}),D=e=>{const{__scopePopover:n,forceMount:t,children:s,container:o}=e,r=u(R,n);return p.jsx(Y,{scope:n,forceMount:t,children:p.jsx(O,{present:t||r.open,children:p.jsx(U,{asChild:!0,container:o,children:s})})})};D.displayName=R;var d="PopoverContent",M=c.forwardRef((e,n)=>{const t=ee(d,e.__scopePopover),{forceMount:s=t.forceMount,...o}=e,r=u(d,e.__scopePopover);return p.jsx(O,{present:s||r.open,children:r.modal?p.jsx(re,{...o,ref:n}):p.jsx(te,{...o,ref:n})})});M.displayName=d;var oe=K("PopoverContent.RemoveScroll"),re=c.forwardRef((e,n)=>{const t=u(d,e.__scopePopover),s=c.useRef(null),o=_(n,s),r=c.useRef(!1);return c.useEffect(()=>{const a=s.current;if(a)return V(a)},[]),p.jsx(W,{as:oe,allowPinchZoom:!0,children:p.jsx(T,{...e,ref:o,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(e.onCloseAutoFocus,a=>{a.preventDefault(),r.current||t.triggerRef.current?.focus()}),onPointerDownOutside:P(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,f=i.button===0&&i.ctrlKey===!0,v=i.button===2||f;r.current=v},{checkForDefaultPrevented:!1}),onFocusOutside:P(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),te=c.forwardRef((e,n)=>{const t=u(d,e.__scopePopover),s=c.useRef(!1),o=c.useRef(!1);return p.jsx(T,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{e.onCloseAutoFocus?.(r),r.defaultPrevented||(s.current||t.triggerRef.current?.focus(),r.preventDefault()),s.current=!1,o.current=!1},onInteractOutside:r=>{e.onInteractOutside?.(r),r.defaultPrevented||(s.current=!0,r.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=r.target;t.triggerRef.current?.contains(a)&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&o.current&&r.preventDefault()}})}),T=c.forwardRef((e,n)=>{const{__scopePopover:t,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:r,disableOutsidePointerEvents:a,onEscapeKeyDown:i,onPointerDownOutside:f,onFocusOutside:v,onInteractOutside:h,...C}=e,l=u(d,t),m=g(t);return Z(),p.jsx(q,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:o,onUnmountAutoFocus:r,children:p.jsx(z,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:i,onPointerDownOutside:f,onFocusOutside:v,onDismiss:()=>l.onOpenChange(!1),children:p.jsx(Q,{"data-state":L(l.open),role:"dialog",id:l.contentId,...m,...C,ref:n,style:{...C.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",ne=c.forwardRef((e,n)=>{const{__scopePopover:t,...s}=e,o=u(k,t);return p.jsx(A.button,{type:"button",...s,ref:n,onClick:P(e.onClick,()=>o.onOpenChange(!1))})});ne.displayName=k;var se="PopoverArrow",I=c.forwardRef((e,n)=>{const{__scopePopover:t,...s}=e,o=g(t);return p.jsx(J,{...o,...s,ref:n})});I.displayName=se;function L(e){return e?"open":"closed"}var le=b,de=N,fe=y,ve=D,Pe=M,ge=I;export{de as A,Pe as C,ve as P,le as R,fe as T,ge as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as s,p as u}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{a as H,c as $,u as J,b as m,d as N,f as Q}from"./index-Cxe-PO-X.js";import{u as S}from"./index-B-2LEQwB.js";import{u as Z,e as ee,i as te}from"./index-DgNySWwD.js";import{c as G,R as oe,A as re,a as ne,C as se}from"./index-B45LLRRA.js";var ae=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ie="VisuallyHidden",V=s.forwardRef((e,o)=>u.jsx(H.span,{...e,ref:o,style:{...ae,...e.style}}));V.displayName=ie;var le=V,[A]=$("Tooltip",[G]),O=G(),F="TooltipProvider",ce=700,D="tooltip.open",[ue,j]=A(F),Y=e=>{const{__scopeTooltip:o,delayDuration:t=ce,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:l}=e,i=s.useRef(!0),v=s.useRef(!1),a=s.useRef(0);return s.useEffect(()=>{const d=a.current;return()=>window.clearTimeout(d)},[]),u.jsx(ue,{scope:o,isOpenDelayedRef:i,delayDuration:t,onOpen:s.useCallback(()=>{window.clearTimeout(a.current),i.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:v,onPointerInTransitChange:s.useCallback(d=>{v.current=d},[]),disableHoverableContent:n,children:l})};Y.displayName=F;var R="Tooltip",[pe,_]=A(R),B=e=>{const{__scopeTooltip:o,children:t,open:r,defaultOpen:n,onOpenChange:l,disableHoverableContent:i,delayDuration:v}=e,a=j(R,e.__scopeTooltip),d=O(o),[c,f]=s.useState(null),h=Z(),p=s.useRef(0),x=i??a.disableHoverableContent,y=v??a.delayDuration,T=s.useRef(!1),[C,g]=J({prop:r,defaultProp:n??!1,onChange:M=>{M?(a.onOpen(),document.dispatchEvent(new CustomEvent(D))):a.onClose(),l?.(M)},caller:R}),w=s.useMemo(()=>C?T.current?"delayed-open":"instant-open":"closed",[C]),E=s.useCallback(()=>{window.clearTimeout(p.current),p.current=0,T.current=!1,g(!0)},[g]),P=s.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g(!1)},[g]),I=s.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{T.current=!0,g(!0),p.current=0},y)},[y,g]);return s.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),u.jsx(oe,{...d,children:u.jsx(pe,{scope:o,contentId:h,open:C,stateAttribute:w,trigger:c,onTriggerChange:f,onTriggerEnter:s.useCallback(()=>{a.isOpenDelayedRef.current?I():E()},[a.isOpenDelayedRef,I,E]),onTriggerLeave:s.useCallback(()=>{x?P():(window.clearTimeout(p.current),p.current=0)},[P,x]),onOpen:E,onClose:P,disableHoverableContent:x,children:t})})};B.displayName=R;var L="TooltipTrigger",U=s.forwardRef((e,o)=>{const{__scopeTooltip:t,...r}=e,n=_(L,t),l=j(L,t),i=O(t),v=s.useRef(null),a=S(o,v,n.onTriggerChange),d=s.useRef(!1),c=s.useRef(!1),f=s.useCallback(()=>d.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),u.jsx(re,{asChild:!0,...i,children:u.jsx(H.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:a,onPointerMove:m(e.onPointerMove,h=>{h.pointerType!=="touch"&&!c.current&&!l.isPointerInTransitRef.current&&(n.onTriggerEnter(),c.current=!0)}),onPointerLeave:m(e.onPointerLeave,()=>{n.onTriggerLeave(),c.current=!1}),onPointerDown:m(e.onPointerDown,()=>{n.open&&n.onClose(),d.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:m(e.onFocus,()=>{d.current||n.onOpen()}),onBlur:m(e.onBlur,n.onClose),onClick:m(e.onClick,n.onClose)})})});U.displayName=L;var k="TooltipPortal",[de,fe]=A(k,{forceMount:void 0}),q=e=>{const{__scopeTooltip:o,forceMount:t,children:r,container:n}=e,l=_(k,o);return u.jsx(de,{scope:o,forceMount:t,children:u.jsx(N,{present:t||l.open,children:u.jsx(ee,{asChild:!0,container:n,children:r})})})};q.displayName=k;var b="TooltipContent",W=s.forwardRef((e,o)=>{const t=fe(b,e.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...l}=e,i=_(b,e.__scopeTooltip);return u.jsx(N,{present:r||i.open,children:i.disableHoverableContent?u.jsx(X,{side:n,...l,ref:o}):u.jsx(ve,{side:n,...l,ref:o})})}),ve=s.forwardRef((e,o)=>{const t=_(b,e.__scopeTooltip),r=j(b,e.__scopeTooltip),n=s.useRef(null),l=S(o,n),[i,v]=s.useState(null),{trigger:a,onClose:d}=t,c=n.current,{onPointerInTransitChange:f}=r,h=s.useCallback(()=>{v(null),f(!1)},[f]),p=s.useCallback((x,y)=>{const T=x.currentTarget,C={x:x.clientX,y:x.clientY},g=ye(C,T.getBoundingClientRect()),w=ge(C,g),E=Ce(y.getBoundingClientRect()),P=be([...w,...E]);v(P),f(!0)},[f]);return s.useEffect(()=>()=>h(),[h]),s.useEffect(()=>{if(a&&c){const x=T=>p(T,c),y=T=>p(T,a);return a.addEventListener("pointerleave",x),c.addEventListener("pointerleave",y),()=>{a.removeEventListener("pointerleave",x),c.removeEventListener("pointerleave",y)}}},[a,c,p,h]),s.useEffect(()=>{if(i){const x=y=>{const T=y.target,C={x:y.clientX,y:y.clientY},g=a?.contains(T)||c?.contains(T),w=!me(C,i);g?h():w&&(h(),d())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[a,c,i,d,h]),u.jsx(X,{...e,ref:l})}),[he,xe]=A(R,{isInside:!1}),Te=Q("TooltipContent"),X=s.forwardRef((e,o)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:l,onPointerDownOutside:i,...v}=e,a=_(b,t),d=O(t),{onClose:c}=a;return s.useEffect(()=>(document.addEventListener(D,c),()=>document.removeEventListener(D,c)),[c]),s.useEffect(()=>{if(a.trigger){const f=h=>{h.target?.contains(a.trigger)&&c()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[a.trigger,c]),u.jsx(te,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:c,children:u.jsxs(se,{"data-state":a.stateAttribute,...d,...v,ref:o,style:{...v.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsx(Te,{children:r}),u.jsx(he,{scope:t,isInside:!0,children:u.jsx(le,{id:a.contentId,role:"tooltip",children:n||r})})]})})});W.displayName=b;var z="TooltipArrow",K=s.forwardRef((e,o)=>{const{__scopeTooltip:t,...r}=e,n=O(t);return xe(z,t).isInside?null:u.jsx(ne,{...n,...r,ref:o})});K.displayName=z;function ye(e,o){const t=Math.abs(o.top-e.y),r=Math.abs(o.bottom-e.y),n=Math.abs(o.right-e.x),l=Math.abs(o.left-e.x);switch(Math.min(t,r,n,l)){case l:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function ge(e,o,t=5){const r=[];switch(o){case"top":r.push({x:e.x-t,y:e.y+t},{x:e.x+t,y:e.y+t});break;case"bottom":r.push({x:e.x-t,y:e.y-t},{x:e.x+t,y:e.y-t});break;case"left":r.push({x:e.x+t,y:e.y-t},{x:e.x+t,y:e.y+t});break;case"right":r.push({x:e.x-t,y:e.y-t},{x:e.x-t,y:e.y+t});break}return r}function Ce(e){const{top:o,right:t,bottom:r,left:n}=e;return[{x:n,y:o},{x:t,y:o},{x:t,y:r},{x:n,y:r}]}function me(e,o){const{x:t,y:r}=e;let n=!1;for(let l=0,i=o.length-1;l<o.length;i=l++){const v=o[l],a=o[i],d=v.x,c=v.y,f=a.x,h=a.y;c>r!=h>r&&t<(f-d)*(r-c)/(h-c)+d&&(n=!n)}return n}function be(e){const o=e.slice();return o.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),we(o)}function we(e){if(e.length<=1)return e.slice();const o=[];for(let r=0;r<e.length;r++){const n=e[r];for(;o.length>=2;){const l=o[o.length-1],i=o[o.length-2];if((l.x-i.x)*(n.y-i.y)>=(l.y-i.y)*(n.x-i.x))o.pop();else break}o.push(n)}o.pop();const t=[];for(let r=e.length-1;r>=0;r--){const n=e[r];for(;t.length>=2;){const l=t[t.length-1],i=t[t.length-2];if((l.x-i.x)*(n.y-i.y)>=(l.y-i.y)*(n.x-i.x))t.pop();else break}t.push(n)}return t.pop(),o.length===1&&t.length===1&&o[0].x===t[0].x&&o[0].y===t[0].y?o:o.concat(t)}var Oe=Y,De=B,Le=U,je=q,ke=W,Ie=K;export{Ie as A,ke as C,Oe as P,De as R,Le as T,ae as V,je as a};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import{a,B as nt,p as g}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{e as De,a as O,b as N,h as rt,u as ot,c as at,d as se,i as it,j as st}from"./index-Cxe-PO-X.js";import{u as W}from"./index-B-2LEQwB.js";import{R as ct}from"./index-DLIEpuwL.js";import{_ as T,a as Re,b as ut}from"./tslib.es6-Dm3DwgL9.js";var lt=nt[" useId ".trim().toString()]||(()=>{}),dt=0;function q(e){const[t,n]=a.useState(lt());return De(()=>{n(r=>r??String(dt++))},[e]),e||(t?`radix-${t}`:"")}function j(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...n)=>t.current?.(...n),[])}function ft(e,t=globalThis?.document){const n=j(e);a.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var vt="DismissableLayer",ae="dismissableLayer.update",ht="dismissableLayer.pointerDownOutside",mt="dismissableLayer.focusOutside",fe,Pe=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Oe=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:u,onDismiss:s,...E}=e,l=a.useContext(Pe),[d,v]=a.useState(null),h=d?.ownerDocument??globalThis?.document,[,y]=a.useState({}),D=W(t,p=>v(p)),c=Array.from(l.layers),[f]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),m=c.indexOf(f),b=d?c.indexOf(d):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,S=b>=m,w=Et(p=>{const A=p.target,L=[...l.branches].some(B=>B.contains(A));!S||L||(o?.(p),u?.(p),p.defaultPrevented||s?.())},h),R=yt(p=>{const A=p.target;[...l.branches].some(B=>B.contains(A))||(i?.(p),u?.(p),p.defaultPrevented||s?.())},h);return ft(p=>{b===l.layers.size-1&&(r?.(p),!p.defaultPrevented&&s&&(p.preventDefault(),s()))},h),a.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(fe=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),ve(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=fe)}},[d,h,n,l]),a.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),ve())},[d,l]),a.useEffect(()=>{const p=()=>y({});return document.addEventListener(ae,p),()=>document.removeEventListener(ae,p)},[]),g.jsx(O.div,{...E,ref:D,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:N(e.onFocusCapture,R.onFocusCapture),onBlurCapture:N(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:N(e.onPointerDownCapture,w.onPointerDownCapture)})});Oe.displayName=vt;var gt="DismissableLayerBranch",pt=a.forwardRef((e,t)=>{const n=a.useContext(Pe),r=a.useRef(null),o=W(t,r);return a.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),g.jsx(O.div,{...e,ref:o})});pt.displayName=gt;function Et(e,t=globalThis?.document){const n=j(e),r=a.useRef(!1),o=a.useRef(()=>{});return a.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let E=function(){xe(ht,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=E,t.addEventListener("click",o.current,{once:!0})):E()}else t.removeEventListener("click",o.current);r.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function yt(e,t=globalThis?.document){const n=j(e),r=a.useRef(!1);return a.useEffect(()=>{const o=i=>{i.target&&!r.current&&xe(mt,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ve(){const e=new CustomEvent(ae);document.dispatchEvent(e)}function xe(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?rt(o,i):o.dispatchEvent(i)}var Q="focusScope.autoFocusOnMount",J="focusScope.autoFocusOnUnmount",he={bubbles:!1,cancelable:!0},bt="FocusScope",Te=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...u}=e,[s,E]=a.useState(null),l=j(o),d=j(i),v=a.useRef(null),h=W(t,c=>E(c)),y=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let c=function(C){if(y.paused||!s)return;const S=C.target;s.contains(S)?v.current=S:x(v.current,{select:!0})},f=function(C){if(y.paused||!s)return;const S=C.relatedTarget;S!==null&&(s.contains(S)||x(v.current,{select:!0}))},m=function(C){if(document.activeElement===document.body)for(const w of C)w.removedNodes.length>0&&x(s)};document.addEventListener("focusin",c),document.addEventListener("focusout",f);const b=new MutationObserver(m);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",c),document.removeEventListener("focusout",f),b.disconnect()}}},[r,s,y.paused]),a.useEffect(()=>{if(s){ge.add(y);const c=document.activeElement;if(!s.contains(c)){const m=new CustomEvent(Q,he);s.addEventListener(Q,l),s.dispatchEvent(m),m.defaultPrevented||(Ct(Pt(Ne(s)),{select:!0}),document.activeElement===c&&x(s))}return()=>{s.removeEventListener(Q,l),setTimeout(()=>{const m=new CustomEvent(J,he);s.addEventListener(J,d),s.dispatchEvent(m),m.defaultPrevented||x(c??document.body,{select:!0}),s.removeEventListener(J,d),ge.remove(y)},0)}}},[s,l,d,y]);const D=a.useCallback(c=>{if(!n&&!r||y.paused)return;const f=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,m=document.activeElement;if(f&&m){const b=c.currentTarget,[C,S]=St(b);C&&S?!c.shiftKey&&m===S?(c.preventDefault(),n&&x(C,{select:!0})):c.shiftKey&&m===C&&(c.preventDefault(),n&&x(S,{select:!0})):m===b&&c.preventDefault()}},[n,r,y.paused]);return g.jsx(O.div,{tabIndex:-1,...u,ref:h,onKeyDown:D})});Te.displayName=bt;function Ct(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(x(r,{select:t}),document.activeElement!==n)return}function St(e){const t=Ne(e),n=me(t,e),r=me(t.reverse(),e);return[n,r]}function Ne(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function me(e,t){for(const n of e)if(!wt(n,{upTo:t}))return n}function wt(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Dt(e){return e instanceof HTMLInputElement&&"select"in e}function x(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Dt(e)&&t&&e.select()}}var ge=Rt();function Rt(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=pe(e,t),e.unshift(t)},remove(t){e=pe(e,t),e[0]?.resume()}}}function pe(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Pt(e){return e.filter(t=>t.tagName!=="A")}var Ot="Portal",Ae=a.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=a.useState(!1);De(()=>i(!0),[]);const u=n||o&&globalThis?.document?.body;return u?ct.createPortal(g.jsx(O.div,{...r,ref:t}),u):null});Ae.displayName=Ot;var ee=0;function xt(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ee()),document.body.insertAdjacentElement("beforeend",e[1]??Ee()),ee++,()=>{ee===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ee--}},[])}function Ee(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Y="right-scroll-bar-position",X="width-before-scroll-bar",Tt="with-scroll-bars-hidden",Nt="--removed-body-scroll-bar-size";function te(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function At(e,t){var n=a.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var It=typeof window<"u"?a.useLayoutEffect:a.useEffect,ye=new WeakMap;function Lt(e,t){var n=At(null,function(r){return e.forEach(function(o){return te(o,r)})});return It(function(){var r=ye.get(n);if(r){var o=new Set(r),i=new Set(e),u=n.current;o.forEach(function(s){i.has(s)||te(s,null)}),i.forEach(function(s){o.has(s)||te(s,u)})}ye.set(n,e)},[e]),n}function Mt(e){return e}function Ft(e,t){t===void 0&&(t=Mt);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var u=t(i,r);return n.push(u),function(){n=n.filter(function(s){return s!==u})}},assignSyncMedium:function(i){for(r=!0;n.length;){var u=n;n=[],u.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var u=[];if(n.length){var s=n;n=[],s.forEach(i),u=n}var E=function(){var d=u;u=[],d.forEach(i)},l=function(){return Promise.resolve().then(E)};l(),n={push:function(d){u.push(d),l()},filter:function(d){return u=u.filter(d),n}}}};return o}function kt(e){e===void 0&&(e={});var t=Ft(null);return t.options=T({async:!0,ssr:!1},e),t}var Ie=function(e){var t=e.sideCar,n=Re(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return a.createElement(r,T({},n))};Ie.isSideCarExport=!0;function _t(e,t){return e.useMedium(t),Ie}var Le=kt(),ne=function(){},z=a.forwardRef(function(e,t){var n=a.useRef(null),r=a.useState({onScrollCapture:ne,onWheelCapture:ne,onTouchMoveCapture:ne}),o=r[0],i=r[1],u=e.forwardProps,s=e.children,E=e.className,l=e.removeScrollBar,d=e.enabled,v=e.shards,h=e.sideCar,y=e.noRelative,D=e.noIsolation,c=e.inert,f=e.allowPinchZoom,m=e.as,b=m===void 0?"div":m,C=e.gapMode,S=Re(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=h,R=Lt([n,t]),p=T(T({},S),o);return a.createElement(a.Fragment,null,d&&a.createElement(w,{sideCar:Le,removeScrollBar:l,shards:v,noRelative:y,noIsolation:D,inert:c,setCallbacks:i,allowPinchZoom:!!f,lockRef:n,gapMode:C}),u?a.cloneElement(a.Children.only(s),T(T({},p),{ref:R})):a.createElement(b,T({},p,{className:E,ref:R}),s))});z.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};z.classNames={fullWidth:X,zeroRight:Y};var Wt=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Bt(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Wt();return t&&e.setAttribute("nonce",t),e}function jt(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ut(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Kt=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Bt())&&(jt(t,n),Ut(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ht=function(){var e=Kt();return function(t,n){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Me=function(){var e=Ht(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Gt={left:0,top:0,right:0,gap:0},re=function(e){return parseInt(e||"",10)||0},Vt=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[re(n),re(r),re(o)]},Yt=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Gt;var t=Vt(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Xt=Me(),_="data-scroll-locked",$t=function(e,t,n,r){var o=e.left,i=e.top,u=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
-
.`.concat(Tt,` {
|
|
3
|
-
overflow: hidden `).concat(r,`;
|
|
4
|
-
padding-right: `).concat(s,"px ").concat(r,`;
|
|
5
|
-
}
|
|
6
|
-
body[`).concat(_,`] {
|
|
7
|
-
overflow: hidden `).concat(r,`;
|
|
8
|
-
overscroll-behavior: contain;
|
|
9
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
10
|
-
padding-left: `.concat(o,`px;
|
|
11
|
-
padding-top: `).concat(i,`px;
|
|
12
|
-
padding-right: `).concat(u,`px;
|
|
13
|
-
margin-left:0;
|
|
14
|
-
margin-top:0;
|
|
15
|
-
margin-right: `).concat(s,"px ").concat(r,`;
|
|
16
|
-
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.`).concat(Y,` {
|
|
20
|
-
right: `).concat(s,"px ").concat(r,`;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.`).concat(X,` {
|
|
24
|
-
margin-right: `).concat(s,"px ").concat(r,`;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.`).concat(Y," .").concat(Y,` {
|
|
28
|
-
right: 0 `).concat(r,`;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.`).concat(X," .").concat(X,` {
|
|
32
|
-
margin-right: 0 `).concat(r,`;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
body[`).concat(_,`] {
|
|
36
|
-
`).concat(Nt,": ").concat(s,`px;
|
|
37
|
-
}
|
|
38
|
-
`)},be=function(){var e=parseInt(document.body.getAttribute(_)||"0",10);return isFinite(e)?e:0},zt=function(){a.useEffect(function(){return document.body.setAttribute(_,(be()+1).toString()),function(){var e=be()-1;e<=0?document.body.removeAttribute(_):document.body.setAttribute(_,e.toString())}},[])},Zt=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;zt();var i=a.useMemo(function(){return Yt(o)},[o]);return a.createElement(Xt,{styles:$t(i,!t,o,n?"":"!important")})},ie=!1;if(typeof window<"u")try{var K=Object.defineProperty({},"passive",{get:function(){return ie=!0,!0}});window.addEventListener("test",K,K),window.removeEventListener("test",K,K)}catch{ie=!1}var M=ie?{passive:!1}:!1,qt=function(e){return e.tagName==="TEXTAREA"},Fe=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!qt(e)&&n[t]==="visible")},Qt=function(e){return Fe(e,"overflowY")},Jt=function(e){return Fe(e,"overflowX")},Ce=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=ke(e,r);if(o){var i=_e(e,r),u=i[1],s=i[2];if(u>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},en=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},tn=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ke=function(e,t){return e==="v"?Qt(t):Jt(t)},_e=function(e,t){return e==="v"?en(t):tn(t)},nn=function(e,t){return e==="h"&&t==="rtl"?-1:1},rn=function(e,t,n,r,o){var i=nn(e,window.getComputedStyle(t).direction),u=i*r,s=n.target,E=t.contains(s),l=!1,d=u>0,v=0,h=0;do{if(!s)break;var y=_e(e,s),D=y[0],c=y[1],f=y[2],m=c-f-i*D;(D||m)&&ke(e,s)&&(v+=m,h+=D);var b=s.parentNode;s=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!E&&s!==document.body||E&&(t.contains(s)||t===s));return(d&&Math.abs(v)<1||!d&&Math.abs(h)<1)&&(l=!0),l},H=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Se=function(e){return[e.deltaX,e.deltaY]},we=function(e){return e&&"current"in e?e.current:e},on=function(e,t){return e[0]===t[0]&&e[1]===t[1]},an=function(e){return`
|
|
39
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},sn=0,F=[];function cn(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState(sn++)[0],i=a.useState(Me)[0],u=a.useRef(e);a.useEffect(function(){u.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var c=ut([e.lockRef.current],(e.shards||[]).map(we),!0).filter(Boolean);return c.forEach(function(f){return f.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),c.forEach(function(f){return f.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=a.useCallback(function(c,f){if("touches"in c&&c.touches.length===2||c.type==="wheel"&&c.ctrlKey)return!u.current.allowPinchZoom;var m=H(c),b=n.current,C="deltaX"in c?c.deltaX:b[0]-m[0],S="deltaY"in c?c.deltaY:b[1]-m[1],w,R=c.target,p=Math.abs(C)>Math.abs(S)?"h":"v";if("touches"in c&&p==="h"&&R.type==="range")return!1;var A=window.getSelection(),L=A&&A.anchorNode,B=L?L===R||L.contains(R):!1;if(B)return!1;var U=Ce(p,R);if(!U)return!0;if(U?w=p:(w=p==="v"?"h":"v",U=Ce(p,R)),!U)return!1;if(!r.current&&"changedTouches"in c&&(C||S)&&(r.current=w),!w)return!0;var de=r.current||w;return rn(de,f,c,de==="h"?C:S)},[]),E=a.useCallback(function(c){var f=c;if(!(!F.length||F[F.length-1]!==i)){var m="deltaY"in f?Se(f):H(f),b=t.current.filter(function(w){return w.name===f.type&&(w.target===f.target||f.target===w.shadowParent)&&on(w.delta,m)})[0];if(b&&b.should){f.cancelable&&f.preventDefault();return}if(!b){var C=(u.current.shards||[]).map(we).filter(Boolean).filter(function(w){return w.contains(f.target)}),S=C.length>0?s(f,C[0]):!u.current.noIsolation;S&&f.cancelable&&f.preventDefault()}}},[]),l=a.useCallback(function(c,f,m,b){var C={name:c,delta:f,target:m,should:b,shadowParent:un(m)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(S){return S!==C})},1)},[]),d=a.useCallback(function(c){n.current=H(c),r.current=void 0},[]),v=a.useCallback(function(c){l(c.type,Se(c),c.target,s(c,e.lockRef.current))},[]),h=a.useCallback(function(c){l(c.type,H(c),c.target,s(c,e.lockRef.current))},[]);a.useEffect(function(){return F.push(i),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:h}),document.addEventListener("wheel",E,M),document.addEventListener("touchmove",E,M),document.addEventListener("touchstart",d,M),function(){F=F.filter(function(c){return c!==i}),document.removeEventListener("wheel",E,M),document.removeEventListener("touchmove",E,M),document.removeEventListener("touchstart",d,M)}},[]);var y=e.removeScrollBar,D=e.inert;return a.createElement(a.Fragment,null,D?a.createElement(i,{styles:an(o)}):null,y?a.createElement(Zt,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function un(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ln=_t(Le,cn);var We=a.forwardRef(function(e,t){return a.createElement(z,T({},e,{ref:t,sideCar:ln}))});We.classNames=z.classNames;var dn=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},k=new WeakMap,G=new WeakMap,V={},oe=0,Be=function(e){return e&&(e.host||Be(e.parentNode))},fn=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Be(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},vn=function(e,t,n,r){var o=fn(t,Array.isArray(e)?e:[e]);V[n]||(V[n]=new WeakMap);var i=V[n],u=[],s=new Set,E=new Set(o),l=function(v){!v||s.has(v)||(s.add(v),l(v.parentNode))};o.forEach(l);var d=function(v){!v||E.has(v)||Array.prototype.forEach.call(v.children,function(h){if(s.has(h))d(h);else try{var y=h.getAttribute(r),D=y!==null&&y!=="false",c=(k.get(h)||0)+1,f=(i.get(h)||0)+1;k.set(h,c),i.set(h,f),u.push(h),c===1&&D&&G.set(h,!0),f===1&&h.setAttribute(n,"true"),D||h.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",h,m)}})};return d(t),s.clear(),oe++,function(){u.forEach(function(v){var h=k.get(v)-1,y=i.get(v)-1;k.set(v,h),i.set(v,y),h||(G.has(v)||v.removeAttribute(r),G.delete(v)),y||v.removeAttribute(n)}),oe--,oe||(k=new WeakMap,k=new WeakMap,G=new WeakMap,V={})}},hn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=dn(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),vn(r,o,n,"aria-hidden")):function(){return null}},Z="Dialog",[je,Tn]=at(Z),[mn,P]=je(Z),Ue=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:u=!0}=e,s=a.useRef(null),E=a.useRef(null),[l,d]=ot({prop:r,defaultProp:o??!1,onChange:i,caller:Z});return g.jsx(mn,{scope:t,triggerRef:s,contentRef:E,contentId:q(),titleId:q(),descriptionId:q(),open:l,onOpenChange:d,onOpenToggle:a.useCallback(()=>d(v=>!v),[d]),modal:u,children:n})};Ue.displayName=Z;var Ke="DialogTrigger",He=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=P(Ke,n),i=W(t,o.triggerRef);return g.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":le(o.open),...r,ref:i,onClick:N(e.onClick,o.onOpenToggle)})});He.displayName=Ke;var ce="DialogPortal",[gn,Ge]=je(ce,{forceMount:void 0}),Ve=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=P(ce,t);return g.jsx(gn,{scope:t,forceMount:n,children:a.Children.map(r,u=>g.jsx(se,{present:n||i.open,children:g.jsx(Ae,{asChild:!0,container:o,children:u})}))})};Ve.displayName=ce;var $="DialogOverlay",Ye=a.forwardRef((e,t)=>{const n=Ge($,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=P($,e.__scopeDialog);return i.modal?g.jsx(se,{present:r||i.open,children:g.jsx(En,{...o,ref:t})}):null});Ye.displayName=$;var pn=it("DialogOverlay.RemoveScroll"),En=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=P($,n);return g.jsx(We,{as:pn,allowPinchZoom:!0,shards:[o.contentRef],children:g.jsx(O.div,{"data-state":le(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),I="DialogContent",Xe=a.forwardRef((e,t)=>{const n=Ge(I,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=P(I,e.__scopeDialog);return g.jsx(se,{present:r||i.open,children:i.modal?g.jsx(yn,{...o,ref:t}):g.jsx(bn,{...o,ref:t})})});Xe.displayName=I;var yn=a.forwardRef((e,t)=>{const n=P(I,e.__scopeDialog),r=a.useRef(null),o=W(t,n.contentRef,r);return a.useEffect(()=>{const i=r.current;if(i)return hn(i)},[]),g.jsx($e,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:N(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:N(e.onPointerDownOutside,i=>{const u=i.detail.originalEvent,s=u.button===0&&u.ctrlKey===!0;(u.button===2||s)&&i.preventDefault()}),onFocusOutside:N(e.onFocusOutside,i=>i.preventDefault())})}),bn=a.forwardRef((e,t)=>{const n=P(I,e.__scopeDialog),r=a.useRef(!1),o=a.useRef(!1);return g.jsx($e,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const u=i.target;n.triggerRef.current?.contains(u)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),$e=a.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...u}=e,s=P(I,n),E=a.useRef(null),l=W(t,E);return xt(),g.jsxs(g.Fragment,{children:[g.jsx(Te,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:g.jsx(Oe,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":le(s.open),...u,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(Cn,{titleId:s.titleId}),g.jsx(wn,{contentRef:E,descriptionId:s.descriptionId})]})]})}),ue="DialogTitle",ze=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=P(ue,n);return g.jsx(O.h2,{id:o.titleId,...r,ref:t})});ze.displayName=ue;var Ze="DialogDescription",qe=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=P(Ze,n);return g.jsx(O.p,{id:o.descriptionId,...r,ref:t})});qe.displayName=Ze;var Qe="DialogClose",Je=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=P(Qe,n);return g.jsx(O.button,{type:"button",...r,ref:t,onClick:N(e.onClick,()=>o.onOpenChange(!1))})});Je.displayName=Qe;function le(e){return e?"open":"closed"}var et="DialogTitleWarning",[Nn,tt]=st(et,{contentName:I,titleName:ue,docsSlug:"dialog"}),Cn=({titleId:e})=>{const t=tt(et),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
42
|
-
|
|
43
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
|
-
|
|
45
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return a.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Sn="DialogDescriptionWarning",wn=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${tt(Sn).contentName}}.`;return a.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},An=Ue,In=He,Ln=Ve,Mn=Ye,Fn=Xe,kn=ze,_n=qe,Wn=Je;export{Fn as C,_n as D,Te as F,Mn as O,Ln as P,An as R,kn as T,Nn as W,Wn as a,In as b,Tn as c,j as d,Ae as e,xt as f,We as g,hn as h,Oe as i,q as u};
|