@aotter/mantle-admin-ui 0.0.11-alpha.21 → 0.0.11-alpha.22

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/dist/index.html CHANGED
@@ -136,7 +136,7 @@ Error generating stack: `+e.message+`
136
136
 
137
137
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
138
138
 
139
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return M.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Vs=`DialogDescriptionWarning`,Hs=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${zs(Vs).contentName}}.`;return M.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Us=ms,Ws=bs,Gs=Ss,Ks=Es,qs=js,Js=Ns,Ys=Fs;function Xs({...e}){return(0,N.jsx)(Us,{"data-slot":`sheet`,...e})}function Zs({...e}){return(0,N.jsx)(Ws,{"data-slot":`sheet-portal`,...e})}function Qs({className:e,...t}){return(0,N.jsx)(Gs,{"data-slot":`sheet-overlay`,className:B(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function $s({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,N.jsxs)(Zs,{children:[(0,N.jsx)(Qs,{}),(0,N.jsxs)(Ks,{"data-slot":`sheet-content`,className:B(`fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500`,n===`right`&&`inset-y-0 right-0 h-full w-3/4 shadow-[-12px_0_32px_-12px_rgba(0,0,0,0.4)] data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm`,n===`left`&&`inset-y-0 left-0 h-full w-3/4 shadow-[12px_0_32px_-12px_rgba(0,0,0,0.4)] data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm`,n===`top`&&`inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top`,n===`bottom`&&`inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom`,e),...i,children:[t,r&&(0,N.jsxs)(Ys,{className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,N.jsx)(Fn,{className:`size-4`}),(0,N.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function ec({className:e,...t}){return(0,N.jsx)(`div`,{"data-slot":`sheet-header`,className:B(`flex flex-col gap-1.5 p-4`,e),...t})}function tc({className:e,...t}){return(0,N.jsx)(qs,{"data-slot":`sheet-title`,className:B(`font-semibold text-foreground`,e),...t})}function nc({className:e,...t}){return(0,N.jsx)(Js,{"data-slot":`sheet-description`,className:B(`text-sm text-muted-foreground`,e),...t})}var rc=`16rem`,ic=`3.25rem`,ac=`18rem`,oc=`b`,sc=M.createContext(null);function cc(){let[e,t]=M.useState(!1);return M.useEffect(()=>{let e=window.matchMedia(`(max-width: 767px)`),n=()=>t(window.innerWidth<768);return e.addEventListener(`change`,n),t(window.innerWidth<768),()=>e.removeEventListener(`change`,n)},[]),e}function lc({defaultOpen:e=!0,className:t,style:n,children:r,...i}){let a=cc(),[o,s]=M.useState(!1),[c,l]=M.useState(e),u=M.useCallback(e=>{Jn(e),l(e)},[]),d=M.useCallback(()=>a?s(e=>!e):u(!c),[a,c,u]);M.useEffect(()=>{let e=e=>{e.key===oc&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),d())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[d]);let f=c?`expanded`:`collapsed`,p=M.useMemo(()=>({state:f,open:c,setOpen:u,isMobile:a,openMobile:o,setOpenMobile:s,toggleSidebar:d}),[f,c,u,a,o,d]);return(0,N.jsx)(sc.Provider,{value:p,children:(0,N.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":rc,"--sidebar-width-icon":ic,...n},className:B(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar rtl:flex-row-reverse`,t),...i,children:r})})}function uc(){let e=M.useContext(sc);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function dc({side:e=`left`,variant:t=`sidebar`,className:n,children:r,...i}){let{isMobile:a,state:o,openMobile:s,setOpenMobile:c}=uc();return a?(0,N.jsx)(Xs,{open:s,onOpenChange:c,...i,children:(0,N.jsxs)($s,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) glass-strip p-0 text-sidebar-foreground [&>button]:hidden`,style:{"--sidebar-width":ac},side:e,showCloseButton:!1,children:[(0,N.jsxs)(ec,{className:`sr-only`,children:[(0,N.jsx)(tc,{children:`Sidebar`}),(0,N.jsx)(nc,{children:`Displays the mobile sidebar.`})]}),(0,N.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:r})]})}):(0,N.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":o,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,N.jsx)(`div`,{"data-slot":`sidebar-gap`,className:`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 group-data-[state=collapsed]:w-(--sidebar-width-icon)`}),(0,N.jsx)(`div`,{"data-slot":`sidebar-container`,className:B(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[width] duration-200 md:flex group-data-[state=collapsed]:w-(--sidebar-width-icon)`,e===`left`?`left-0`:`right-0`,t===`inset`?`p-2`:``,n),...i,children:(0,N.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`glass-strip flex h-full w-full flex-col`,children:r})})]})}function fc({className:e,onClick:t,...n}){let{toggleSidebar:r}=uc();return(0,N.jsxs)(V,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon`,className:B(`size-7`,e),onClick:e=>{t?.(e),r()},...n,children:[(0,N.jsx)(sn,{}),(0,N.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function pc({className:e,...t}){return(0,N.jsx)(`main`,{"data-slot":`sidebar-inset`,className:B(`relative flex w-full flex-1 flex-col bg-background`,`md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm rtl:md:peer-data-[variant=inset]:ml-2 rtl:md:peer-data-[variant=inset]:mr-0`,e),...t})}function mc({className:e,...t}){return(0,N.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:B(`flex flex-col gap-2 p-2`,e),...t})}function hc({className:e,...t}){return(0,N.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:B(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto`,e),...t})}function gc({className:e,...t}){return(0,N.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:B(`flex flex-col gap-2 p-2`,e),...t})}function _c({className:e,...t}){return(0,N.jsx)(`hr`,{"data-slot":`sidebar-separator`,"data-sidebar":`separator`,className:B(`mx-4 my-1 h-px w-auto border-0`,`bg-linear-to-r from-transparent via-[color-mix(in_srgb,var(--primary)_24%,transparent)] to-transparent`,`opacity-70 dark:via-[color-mix(in_srgb,var(--palette-teal-light)_18%,transparent)]`,e),...t})}function vc({className:e,...t}){return(0,N.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:B(`relative flex w-full min-w-0 flex-col p-2`,e),...t})}function yc({className:e,...t}){return(0,N.jsx)(`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:B(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70`,e),...t})}function bc({className:e,...t}){return(0,N.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:B(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function xc({className:e,...t}){return(0,N.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:B(`group/menu-item relative`,e),...t})}var Sc=$n(`peer/menu-button relative flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none 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 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,{variants:{size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm`}},defaultVariants:{size:`default`}});function Cc({asChild:e=!1,isActive:t=!1,size:n=`default`,className:r,...i}){return(0,N.jsx)(e?cr:`button`,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":n,"data-active":t,className:B(Sc({size:n}),r),...i})}function wc({className:e,...t}){return(0,N.jsx)(`ul`,{"data-slot":`sidebar-menu-sub`,"data-sidebar":`menu-sub`,className:B(`mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 rtl:-translate-x-px rtl:border-l-0 rtl:border-r`,e),...t})}function Tc({className:e,...t}){return(0,N.jsx)(`li`,{"data-slot":`sidebar-menu-sub-item`,"data-sidebar":`menu-sub-item`,className:B(`group/menu-sub-item relative`,e),...t})}function Ec({asChild:e=!1,size:t=`md`,isActive:n=!1,className:r,...i}){return(0,N.jsx)(e?cr:`a`,{"data-slot":`sidebar-menu-sub-button`,"data-sidebar":`menu-sub-button`,"data-size":t,"data-active":n,className:B(`flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[active=true]:font-medium [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,`rtl:translate-x-px`,t===`sm`&&`text-xs`,t===`md`&&`text-sm`,r),...i})}var Dc=`/admin/api`,Oc=class extends Error{status;body;constructor(e,t,n){super(e),this.status=t,this.body=n,this.name=`ApiError`}};async function kc(e,t){let n=await fetch(`${Dc}${e}`,{credentials:`same-origin`,...t,headers:{Accept:`application/json`,...t?.headers??{}}}),r=await n.text(),i=null;if(r)try{i=JSON.parse(r)}catch{i=r}if(!n.ok)throw new Oc(`${n.status} ${n.statusText}`,n.status,i);return i}var Ac={get:e=>kc(e),post:(e,t)=>kc(e,jc(`POST`,t)),patch:(e,t)=>kc(e,jc(`PATCH`,t)),delete:e=>kc(e,{method:`DELETE`})};function jc(e,t){return{method:e,headers:{"Content-Type":`application/json`},body:t===void 0?void 0:JSON.stringify(t)}}var Mc=[`draft`,`review`,`published`,`archived`],Nc=[`draft`,`published`,`archived`],Pc=M.createContext(null);function Fc(){return typeof window>`u`?{pathname:`/admin`,search:``}:{pathname:window.location.pathname,search:window.location.search}}function Ic(e){if(typeof window>`u`)return!1;let t=new URL(e,window.location.href);return!(t.origin!==window.location.origin||!t.pathname.startsWith(`/admin`)||t.pathname.startsWith(`/admin/api/`)||t.pathname.startsWith(`/admin/auth/`)||t.pathname===`/admin/logout`)}function Lc({children:e}){let[t,n]=M.useState(Fc),r=M.useCallback((e,t={})=>{if(typeof window>`u`)return;let r=new URL(e,window.location.href),i=`${r.pathname}${r.search}${r.hash}`;i!==`${window.location.pathname}${window.location.search}${window.location.hash}`&&(t.replace?window.history.replaceState(null,``,i):window.history.pushState(null,``,i));let a={pathname:r.pathname,search:r.search};(0,Xi.flushSync)(()=>n(a))},[]);M.useEffect(()=>{let e=()=>n(Fc());return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]),M.useEffect(()=>{let e=e=>{if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target;if(!(t instanceof Element))return;let n=t.closest(`a[href]`);n instanceof HTMLAnchorElement&&(n.target&&n.target!==`_self`||n.hasAttribute(`download`)||Ic(n.href)&&(e.preventDefault(),r(n.href)))};return document.addEventListener(`click`,e,{capture:!0}),()=>document.removeEventListener(`click`,e,{capture:!0})},[r]);let i=M.useMemo(()=>({location:t,navigate:r}),[t,r]);return(0,N.jsx)(Pc.Provider,{value:i,children:e})}function Rc(){let e=M.useContext(Pc);if(!e)throw Error(`useAdminRouter must be used inside AdminRouterProvider.`);return e}function zc(){return Rc().location}var Bc=[{value:`en`,label:`English`,nativeLabel:`English`,htmlLang:`en`,direction:`ltr`},{value:`de`,label:`German`,nativeLabel:`Deutsch`,htmlLang:`de`,direction:`ltr`},{value:`es`,label:`Spanish`,nativeLabel:`Español`,htmlLang:`es`,direction:`ltr`},{value:`fr`,label:`French`,nativeLabel:`Français`,htmlLang:`fr`,direction:`ltr`},{value:`it`,label:`Italian`,nativeLabel:`Italiano`,htmlLang:`it`,direction:`ltr`},{value:`ja`,label:`Japanese`,nativeLabel:`日本語`,htmlLang:`ja`,direction:`ltr`},{value:`ko`,label:`Korean`,nativeLabel:`한국어`,htmlLang:`ko`,direction:`ltr`},{value:`pt-BR`,label:`Portuguese (Brazil)`,nativeLabel:`Português (BR)`,htmlLang:`pt-BR`,direction:`ltr`},{value:`ru`,label:`Russian`,nativeLabel:`Русский`,htmlLang:`ru`,direction:`ltr`},{value:`zh-CN`,label:`Simplified Chinese`,nativeLabel:`简体中文`,htmlLang:`zh-Hans-CN`,direction:`ltr`},{value:`zh-TW`,label:`Traditional Chinese`,nativeLabel:`繁體中文`,htmlLang:`zh-Hant-TW`,direction:`ltr`},{value:`id`,label:`Indonesian`,nativeLabel:`Bahasa Indonesia`,htmlLang:`id`,direction:`ltr`},{value:`nl`,label:`Dutch`,nativeLabel:`Nederlands`,htmlLang:`nl`,direction:`ltr`},{value:`pl`,label:`Polish`,nativeLabel:`Polski`,htmlLang:`pl`,direction:`ltr`},{value:`tr`,label:`Turkish`,nativeLabel:`Türkçe`,htmlLang:`tr`,direction:`ltr`},{value:`vi`,label:`Vietnamese`,nativeLabel:`Tiếng Việt`,htmlLang:`vi`,direction:`ltr`},{value:`cs`,label:`Czech`,nativeLabel:`Čeština`,htmlLang:`cs`,direction:`ltr`},{value:`uk`,label:`Ukrainian`,nativeLabel:`Українська`,htmlLang:`uk`,direction:`ltr`},{value:`ar`,label:`Arabic`,nativeLabel:`العربية`,htmlLang:`ar`,direction:`rtl`},{value:`he`,label:`Hebrew`,nativeLabel:`עברית`,htmlLang:`he`,direction:`rtl`},{value:`fa`,label:`Persian`,nativeLabel:`فارسی`,htmlLang:`fa`,direction:`rtl`},{value:`th`,label:`Thai`,nativeLabel:`ไทย`,htmlLang:`th`,direction:`ltr`}],Vc=`cms.preference.language`,Hc=`cms.preference.direction`,Uc=`cms.preference.theme`,Wc=`cms.theme`,Gc=M.createContext(null);function Kc({children:e}){let[t,n]=M.useState(qc),[r,i]=M.useState(()=>Jc(qc())),[a,o]=M.useState(Yc),s=M.useCallback(e=>{let t=el(e);Zc(Vc,e),Zc(Hc,t),n(e),i(t)},[]),c=M.useCallback(e=>{Zc(Hc,e),i(e)},[]),l=M.useCallback(e=>{Zc(Uc,e),Zc(Wc,e),o(e)},[]);M.useEffect(()=>{document.documentElement.lang=Bc.find(e=>e.value===t)?.htmlLang??`en`,document.documentElement.dir=r},[t,r]),M.useEffect(()=>{let e=()=>{let e=typeof matchMedia<`u`&&matchMedia(`(prefers-color-scheme: dark)`).matches;document.documentElement.classList.toggle(`dark`,a===`dark`||a===`system`&&e)};if(e(),a!==`system`||typeof matchMedia>`u`)return;let t=matchMedia(`(prefers-color-scheme: dark)`);return t.addEventListener(`change`,e),()=>t.removeEventListener(`change`,e)},[a]);let u=M.useMemo(()=>({language:t,direction:r,theme:a,setLanguage:s,setDirection:c,setTheme:l}),[t,r,a,s,c,l]);return(0,N.jsx)(Gc.Provider,{value:u,children:e})}function G(){let e=M.useContext(Gc);if(!e)throw Error(`usePreferences must be used inside PreferencesProvider.`);return e}function qc(){let e=Xc(Vc);if(Qc(e))return e;if(typeof navigator>`u`)return`en`;for(let e of navigator.languages??[]){let t=$c(e);if(t!==`en`||e.toLowerCase().startsWith(`en`))return t}return $c(navigator.language)}function Jc(e){let t=Xc(Hc);return t===`rtl`||t===`ltr`?t:el(e)}function Yc(){let e=Xc(`cms.preference.theme`)??Xc(Wc);return e===`light`||e===`dark`||e===`system`?e:`system`}function Xc(e){try{return localStorage.getItem(e)}catch{return null}}function Zc(e,t){try{localStorage.setItem(e,t)}catch{}}function Qc(e){return Bc.some(t=>t.value===e)}function $c(e){let t=(e??``).toLowerCase();if(t===`zh-tw`||t===`zh-hant`||t.startsWith(`zh-hant`))return`zh-TW`;if(t===`zh-cn`||t===`zh-hans`||t.startsWith(`zh-hans`))return`zh-CN`;if(t.startsWith(`pt-br`)||t===`pt`)return`pt-BR`;let n=t.split(`-`)[0];return n===`ar`?`ar`:n===`cs`?`cs`:n===`de`?`de`:n===`es`?`es`:n===`fa`?`fa`:n===`fr`?`fr`:n===`he`||n===`iw`?`he`:n===`id`?`id`:n===`it`?`it`:n===`ja`?`ja`:n===`ko`?`ko`:n===`nl`?`nl`:n===`pl`?`pl`:n===`pt`?`pt-BR`:n===`ru`?`ru`:n===`th`?`th`:n===`tr`?`tr`:n===`uk`?`uk`:n===`vi`?`vi`:n===`zh`?`zh-TW`:`en`}function el(e){return Bc.find(t=>t.value===e)?.direction??`ltr`}var tl=`@aotter/mantle`,nl=`0.0.11-alpha.21`,rl=`https://www.npmjs.com/package/@aotter/mantle`,il=`https://github.com/aotter/mantle`,al=`M62.27,18.91c-24.86,0-45.09,20.23-45.09,45.09s20.23,45.09,45.09,45.09,45.09-20.23,45.09-45.09-20.23-45.09-45.09-45.09ZM65.07,102.86v-18.98h5.49c1.26,0,2.29-1.03,2.29-2.29v-4.47h11.6c1.26,0,2.29-1.03,2.29-2.29v-20.57c0-1.26-1.03-2.29-2.29-2.29h-5.13v-12.73c0-1.55-1.26-2.8-2.8-2.8s-2.8,1.26-2.8,2.8v12.73h-22.89v-12.73c0-1.55-1.26-2.8-2.81-2.8s-2.8,1.26-2.8,2.8v12.73h-5.13c-1.26,0-2.29,1.03-2.29,2.29v20.57c0,1.26,1.03,2.29,2.29,2.29h11.6v4.47c0,1.26,1.03,2.29,2.29,2.29h5.49v18.98c-20.32-1.45-36.16-18.42-36.16-38.86,0-21.49,17.48-38.97,38.97-38.97s38.97,17.48,38.97,38.97-15.84,37.42-36.16,38.86ZM41.89,73.03v-16.96h14.46c1.94,2.28,5.02,5.87,5.11,5.97.19.19.39.23.52.23s.34-.04.54-.25c.07-.06,1.33-1.44,4.33-4.69.4-.44.8-.87,1.17-1.26h14.63v16.96h-40.75ZM55.78,79.79v-3.15h12.98v3.15h-12.98Z`;function ol(e){switch(e){case`brand`:return`text-[#1a3062]`;case`black`:return`text-[#040000]`;case`white`:return`text-white`;default:return`text-current`}}function sl({className:e,title:t,tone:n=`current`}){return(0,N.jsxs)(`svg`,{viewBox:`0 0 128 128`,role:t?`img`:void 0,"aria-hidden":t?void 0:!0,className:B(ol(n),e),children:[t?(0,N.jsx)(`title`,{children:t}):null,(0,N.jsx)(`path`,{fill:`currentColor`,d:al})]})}function cl(){return(0,N.jsxs)(`div`,{className:B(`fixed bottom-3 end-3 z-30 hidden items-center gap-2 rounded-full`,`border border-border/60 bg-background/65 px-2.5 py-1.5 text-xs`,`text-muted-foreground shadow-[var(--glass-shadow)] backdrop-blur-md md:flex`),children:[(0,N.jsx)(sl,{className:`size-4 text-primary`}),(0,N.jsx)(`a`,{href:rl,target:`_blank`,rel:`noreferrer`,className:`font-medium text-foreground/80 hover:text-primary`,children:tl}),(0,N.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,N.jsx)(`a`,{href:il,target:`_blank`,rel:`noreferrer`,className:`hover:text-primary`,children:`GitHub`}),(0,N.jsxs)(`span`,{"aria-label":`version ${nl}`,children:[`v`,nl]})]})}var ll={en:{"admin.consoleTitle":`Admin console`,"auth.accessDenied.title":`Access denied`,"auth.accessDenied.noStaff":`You're signed in, but this account isn't on the admin staff list.`,"auth.accessDenied.askOwner":`Ask a site owner to add your GitHub login, or sign out to try a different account.`,"auth.error.title":`Something went wrong`,"auth.signIn.eyebrow":`AotterMantle admin`,"auth.signIn.title":`Sign in`,"auth.signIn.body":`Staff console. Access is gated by role after sign-in.`,"auth.signIn.methodsLoadFailed":`Couldn't load sign-in methods. Try refreshing.`,"auth.signIn.noMethods":`No sign-in methods are configured for this site.`,"auth.signIn.unknownMethod":`Unsupported sign-in method: {kind}.`,"auth.signIn.method.social.button":`Continue with {provider}`,"auth.signIn.method.email-otp.body":`Sign in with a one-time code sent to your email.`,"auth.signIn.method.email-otp.emailLabel":`Email address`,"auth.signIn.method.email-otp.emailPlaceholder":`you@example.com`,"auth.signIn.method.email-otp.sendButton":`Send code`,"auth.signIn.method.email-otp.sendFailed":`Couldn't send the code. Check the email and try again.`,"auth.signIn.method.email-otp.sentTo":`We sent a code to {email}.`,"auth.signIn.method.email-otp.otpLabel":`One-time code`,"auth.signIn.method.email-otp.otpPlaceholder":`Enter the 6-digit code`,"auth.signIn.method.email-otp.verifyButton":`Verify and sign in`,"auth.signIn.method.email-otp.verifyFailed":`That code didn't match. Try again.`,"auth.signIn.method.email-otp.back":`Use a different email`,"auth.signIn.method.magic-link.body":`We'll email you a one-tap sign-in link.`,"auth.signIn.method.magic-link.emailLabel":`Email address`,"auth.signIn.method.magic-link.emailPlaceholder":`you@example.com`,"auth.signIn.method.magic-link.sendButton":`Send sign-in link`,"auth.signIn.method.magic-link.sendFailed":`Couldn't send the link. Check the email and try again.`,"auth.signIn.method.magic-link.sentTo":`We sent a sign-in link to {email}.`,"auth.signIn.method.magic-link.clickHint":`Click the link in the email to finish signing in. The link expires shortly.`,"auth.signIn.method.magic-link.anotherEmail":`Use a different email`,"common.signOut":`Sign out`,"common.viewSite":`View site`,"common.copy":`Copy`,"common.open":`Open`,"common.failedToLoad":`Failed to load`,"common.signedIn":`Signed in`,"console.eyebrow":`Owner console`,"console.description":`{title} is deployed. Use this console for orientation; use an MCP-capable agent for content operations.`,"console.descriptionFallback":`Use this console for orientation; use an MCP-capable agent for content operations.`,"console.agent.title":`Next: connect an agent`,"console.agent.body":`Give this Staff MCP URL to Claude Code, Codex, Cursor, or another MCP client. It will open a consent screen, then the agent can manage this site's content with your staff permission.`,"console.workspace.title":`Start editing here`,"console.workspace.body":`Products, pages, media, and layout sections should all be editable from this console. Pick a common action to begin.`,"workspace.products":`Product list`,"workspace.pages":`Homepage and pages`,"workspace.media":`Media library`,"console.mcpUrl":`Staff MCP URL`,"console.publicUrl":`Public URL`,"console.loop.title":`Operational loop`,"console.loop.body":`Ask your content agent to list entries, create drafts, publish, unpublish, or adjust copy. Then refresh this console if you want a human-readable inventory.`,"console.onboarding.title":`Guided setup`,"console.onboarding.body":`A first-run overlay will guide new owners through editing content, checking media, and publishing.`,"console.onboarding.step1":`Review the seeded products and homepage sections.`,"console.onboarding.step2":`Edit copy with the rich editor inside the relevant product or page.`,"console.onboarding.step3":`Preview the storefront, then publish the change.`,"console.loop.step1":`Open the public site and inspect the result.`,"console.loop.step2":`Connect a second agent through MCP.`,"console.loop.step3":`Tell the agent what content or workflow to change.`,"console.collections.eyebrow":`Content model`,"console.collections.title":`Content lists`,"console.collections.body":`Products, pages, orders, and operational data from this site. Translation child schemas are folded into their parent.`,"console.collections.emptyTitle":`No collections defined yet`,"console.collections.emptyBody":`A blank project can add Schema manifests later; a starter should normally seed at least one collection.`,"console.collections.noDescription":`No description.`,"collection.breadcrumb":`Collections`,"collection.defaultDescription":`Entries in this collection.`,"collection.schemaSummary":`Manage entries, publishing state, and localized content for {name}.`,"collection.schemaDetails":`Schema notes`,"collection.searchPlaceholder":`Search title, id, status...`,"collection.filter.all":`All`,"collection.empty.title":`No entries yet`,"collection.empty.search":`No entries matched “{search}”.`,"collection.empty.withStatus":`No {status} entries in this collection.`,"collection.empty.all":`This collection has no entries yet.`,"collection.refreshing":`Updating the list...`,"collection.moreRows":`More rows are available, but cursor pagination is not wired in this admin shell yet.`,"collection.table.id":`ID`,"collection.table.title":`Title`,"collection.table.status":`Status`,"collection.table.locale":`Locale`,"collection.table.version":`Version`,"collection.table.updated":`Updated`,"collection.table.actions":`Actions`,"collection.actions.label":`Collection actions`,"collection.untitled":`(untitled)`,"crud.create":`Add`,"crud.edit":`Edit`,"crud.search":`Search`,"crud.delete":`Delete`,"crud.createTooltip":`Create a new {name} entry.`,"crud.editTooltip":`Edit {name}.`,"crud.searchTooltip":`Search {name}.`,"crud.deleteTooltip":`Delete {name}.`,"crud.duplicateTooltip":`Duplicate {name}.`,"crud.saveTitle":`Save title`,"crud.cancelTitle":`Cancel editing`,"crud.deleteConfirm":`Delete {name}? This cannot be undone.`,"crud.saving":`Saving...`,"crud.duplicating":`Duplicating...`,"crud.deleting":`Deleting...`,"entryEdit.back":`Back to {name}`,"entryEdit.body":`Edit {name} from its Schema manifest. Related child entries are inferred from existing schema relationships.`,"entryEdit.parent":`Parent: {name}`,"entryEdit.save":`Save changes`,"entryEdit.saveTooltip":`Save this entry.`,"entryEdit.fields":`Entry fields`,"entryEdit.meta":`Entry details`,"entryEdit.related":`Related entries`,"entryEdit.noRelated":`No child collections were inferred for this entry.`,"entryEdit.noChildEntries":`No child entries match this entry yet.`,"entryEdit.relationship":`Joined by {child} from parent {parent}.`,"entryEdit.addItem":`Add item`,"entryEdit.removeItem":`Remove item`,"entryEdit.emptyOption":`No value`,"entryEdit.boolean":`Enabled`,"entryEdit.publish":`Publish`,"entryEdit.publishing":`Publishing...`,"entryEdit.publishTooltip":`Publish this draft.`,"entryEdit.publishDisabledDirty":`Save changes before publishing.`,"entryEdit.unpublish":`Unpublish`,"entryEdit.unpublishing":`Unpublishing...`,"entryEdit.unpublishTooltip":`Move this entry back to draft so it can be edited.`,"entryEdit.uploadMedia":`Upload`,"entryEdit.uploadingMedia":`Uploading...`,"entryEdit.noMediaPurpose":`No media upload purpose is configured.`,"entryEdit.skus":`Variants and pricing`,"entryEdit.skusBody":`Manage sellable SKUs for {name}. Prices, original prices, inventory behavior, and option values stay attached to this product.`,"entryEdit.openAdvanced":`Open full SKU editor`,"entryEdit.priceMinor":`Price`,"entryEdit.compareAtPriceMinor":`Original price`,"entryEdit.inventoryMode":`Inventory`,"entryEdit.inventoryTracked":`Track stock`,"entryEdit.inventoryUntracked":`Unlimited / untracked`,"entryEdit.currency":`Currency`,"entryEdit.skuInlineHint":`Use the full editor for media, raw option JSON, or advanced fields.`,"productEdit.back":`Back to products`,"productEdit.title":`Edit product`,"productEdit.body":`Edit product copy, price, promotions, brand story, and service details in one place.`,"productEdit.save":`Save changes`,"productEdit.basic":`Product content`,"productEdit.shortDescription":`Short description`,"productEdit.description":`Product description`,"productEdit.price":`Price`,"productEdit.salePrice":`Sale price`,"productEdit.compareAtPrice":`Original price`,"productEdit.promotions":`Promotions`,"productEdit.promoLabel":`Label`,"productEdit.promoTitle":`Promotion title`,"productEdit.promoBody":`Promotion details`,"productEdit.relatedSku":`Bundled SKU`,"productEdit.noRelatedSku":`No bundled SKU`,"productEdit.discountPercent":`Discount %`,"productEdit.addPromotion":`Add promotion`,"productEdit.brand":`Brand story`,"productEdit.brandName":`Brand name`,"productEdit.brandTagline":`Brand tagline`,"productEdit.brandIntro":`Brand introduction`,"productEdit.serviceIncludes":`Service includes`,"settings.page.title":`Store settings`,"settings.page.body":`Manage site-level brand copy and default service information used across the storefront.`,"settings.tabsLabel":`Store settings sections`,"settings.tab.brand":`Brand`,"settings.tab.tracking":`Tracking`,"settings.brandSection":`Brand and service`,"settings.brandSectionBody":`Default storefront copy used by product pages and generated homepage sections.`,"settings.siteBrand":`Site brand`,"settings.siteTitle":`Site title`,"settings.siteDescription":`Site description`,"settings.trackingSection":`Tracking codes`,"settings.trackingSectionBody":`Fill in analytics IDs and Mantle will inject the matching tracking scripts into generated storefront pages.`,"settings.ga4MeasurementId":`GA4 Measurement ID`,"settings.ga4MeasurementIdHelp":`Use the ID only, for example G-XXXXXXXXXX. Do not paste the whole gtag script.`,"settings.facebookPixelId":`Facebook Pixel ID`,"settings.facebookPixelIdHelp":`Use the numeric Pixel ID only. Mantle will generate the base Pixel code.`,"guide.title":`Your store admin is ready`,"guide.body":`Use this guided flow to understand where editing happens before you ask an agent to make larger changes.`,"guide.step1":`Open Products and confirm the seeded storefront items.`,"guide.step2":`Use Add, Edit, Search, or Delete from the collection page.`,"guide.step3":`Preview the public site, then keep refining with the rich editor inside each content area.`,"guide.close":`Close guide`,"guide.open":`Guide`,"guide.next":`Next`,"guide.prev":`Previous`,"guide.finish":`Finish`,"guide.products.title":`Start with products`,"guide.products.body":`Open the Products collection to manage storefront items, SKUs, prices, and localized product copy.`,"guide.filters.title":`Filter publishing states`,"guide.filters.body":`Switch between all, draft, published, and archived entries without leaving the list.`,"guide.actions.title":`Edit from the list`,"guide.actions.body":`Use the row actions to edit product details, duplicate an item, or remove it from the site.`,"guide.reopen.title":`Reopen this guide anytime`,"guide.reopen.body":`The guide button stays in the status bar, so users can turn this walkthrough on again whenever they need it.`,"nav.home":`Home`,"nav.content":`Content`,"nav.editor":`Editor`,"nav.media":`Media library`,"nav.more":`More`,"nav.approvals":`Approvals`,"nav.settings":`Settings`,"nav.staff":`Staff`,"staff.page.title":`Staff`,"staff.page.body":`Invite staff by email, assign roles, and revoke pending invitations. Only owners can see this page.`,"staff.invite.title":`Invite staff`,"staff.invite.emailLabel":`Email address`,"staff.invite.emailPlaceholder":`teammate@example.com`,"staff.invite.roleLabel":`Role`,"staff.invite.button":`Invite`,"staff.invite.sending":`Inviting…`,"staff.invite.revoke":`Revoke`,"staff.invite.hint":`Invitees sign in at /admin/sign-in with the invited email (magic link, email code, or a social account on the same address) and land with their role already in effect.`,"staff.table.name":`Name`,"staff.table.email":`Email`,"staff.table.status":`Status / sign-in`,"staff.table.role":`Role`,"staff.role.owner":`Owner`,"staff.role.editor":`Editor`,"staff.role.contributor":`Contributor`,"staff.role.none":`No role`,"staff.badge.invited":`Invited`,"staff.status.emailSignIn":`Email sign-in`,"staff.self":`you`,"status.draft":`Drafts`,"status.review":`In Review`,"status.published":`Published`,"status.archived":`Archived`,"preferences.heading":`Preferences`,"preferences.language":`Admin language`,"preferences.language.search":`Search languages...`,"preferences.language.noResults":`No languages found.`,"preferences.direction":`Text direction`,"preferences.direction.auto":`Text direction follows the selected language.`,"preferences.appearance":`Appearance`,"preferences.light":`Light`,"preferences.dark":`Dark`,"preferences.system":`System`,"preferences.ltr":`Left to right`,"preferences.rtl":`Right to left`,"preferences.page.title":`Personal preferences`,"preferences.page.body":`These preferences stay on this browser. They change the admin console only and do not modify site settings.`,"preferences.page.languageBody":`Choose the language used by system pages and admin chrome.`,"preferences.page.appearanceBody":`Choose light, dark, or follow your operating system.`,"preferences.page.open":`Preferences`,"settings.planned.title":`Settings are not wired yet`,"settings.planned.body":`Settings are for values persisted to the site, such as site config. Preferences stay local to this browser.`,"system.notFound.title":`Not found`,"system.notFound.plannedTitle":`Not wired yet`,"system.notFound.body":`No view registered for`,"system.notFound.back":`Back to home`,"editor.page.title":`Content editor`,"editor.page.body":`Draft copy in Markdown, HTML, or rich text before handing it to an agent or publishing workflow.`,"editor.mode.markdown":`Markdown`,"editor.mode.html":`HTML`,"editor.mode.rich":`Rich editor`,"editor.titleLabel":`Title`,"editor.slugLabel":`Slug`,"editor.bodyLabel":`Body`,"editor.preview":`Preview`,"editor.insertBlock":`Insert block`,"editor.saveDraft":`Save draft`,"editor.markdownHint":`Supports headings, lists, links, and fenced code blocks.`,"editor.htmlHint":`Edit trusted HTML fragments with a plain source view.`,"editor.richHint":`Format sections, callouts, and product copy without touching markup.`,"editor.toolbar":`Rich editor toolbar`,"editor.undo":`Undo`,"editor.redo":`Redo`,"editor.aiClean":`Insert callout`,"editor.uploadImage":`Upload image`,"editor.uploading":`Uploading image...`,"editor.textStyle":`Text style`,"editor.headingPlaceholder":`Heading`,"editor.decreaseFont":`Decrease font size`,"editor.increaseFont":`Increase font size`,"editor.selectedText":`selected text`,"editor.bold":`Bold`,"editor.italic":`Italic`,"editor.underline":`Underline`,"editor.strike":`Strikethrough`,"editor.inlineCode":`Inline code`,"editor.textColor":`Text color`,"editor.highlight":`Highlight`,"editor.palette":`Brand color`,"editor.alignLeft":`Align left`,"editor.alignCenter":`Align center`,"editor.alignRight":`Align right`,"editor.bulletList":`Bullet list`,"editor.numberList":`Numbered list`,"editor.checkList":`Checklist`,"editor.indent":`Indent`,"editor.link":`Link`,"editor.linkText":`link text`,"editor.table":`Table`,"editor.emoji":`Emoji`,"editor.mediaLibrary":`Media library`,"editor.imageUrl":`Image URL`,"editor.insertImage":`Insert image`,"editor.videoUrl":`YouTube / Dailymotion URL`,"editor.insertVideo":`Insert video`,"editor.audioHint":`Audio embed`,"media.page.title":`Media library`,"media.page.body":`Upload, search, crop, tag, and reuse images across products and pages.`,"media.upload":`Upload media`,"media.search":`Search media...`,"media.crop":`Crop`,"media.alt":`Alt text`,"media.tags":`Tags`,"media.empty":`No media assets yet.`,"media.dropzone":`Drop files here or choose images`,"media.dropzoneHint":`Assets uploaded here can be reused by products, pages, and storefront sections.`,"media.copyUrl":`Copy image URL`,"media.filter":`Filter media`,"media.filter.all":`All`,"media.filter.product":`Products`,"media.filter.brand":`Brand`,"media.filter.content":`Content`,"media.sort":`Sort media`,"media.sort.newest":`Newest`,"media.sort.name":`Name`,"media.sort.type":`Type`,"approvals.title":`Approvals`,"approvals.body":`Review editorial entries that are waiting for approval before they go live.`,"approvals.emptyTitle":`Nothing is waiting for review`,"approvals.emptyBody":`Entries submitted for review will appear here by collection.`,"approvals.groupBody":`{count} entries are currently marked {status}.`,"approvals.openCollection":`Open collection`,"approvals.reviewEntry":`Review`},"zh-TW":{"admin.consoleTitle":`管理後台`,"auth.accessDenied.title":`無法存取`,"auth.accessDenied.noStaff":`你已登入,但這個帳號不在 admin staff 清單內。`,"auth.accessDenied.askOwner":`請網站 owner 加入你的 GitHub login,或登出改用其他帳號。`,"auth.error.title":`發生錯誤`,"auth.signIn.eyebrow":`AotterMantle 後台`,"auth.signIn.title":`登入`,"auth.signIn.body":`Staff 後台。登入後依角色決定能用的範圍。`,"auth.signIn.methodsLoadFailed":`讀取登入方式失敗,請重新整理頁面。`,"auth.signIn.noMethods":`這個站台還沒設定任何登入方式。`,"auth.signIn.unknownMethod":`不支援的登入方式:{kind}。`,"auth.signIn.method.social.button":`使用 {provider} 繼續`,"auth.signIn.method.email-otp.body":`輸入 email,我們會寄一次性驗證碼給你。`,"auth.signIn.method.email-otp.emailLabel":`電子郵件`,"auth.signIn.method.email-otp.emailPlaceholder":`you@example.com`,"auth.signIn.method.email-otp.sendButton":`寄送驗證碼`,"auth.signIn.method.email-otp.sendFailed":`驗證碼寄送失敗,請確認 email 後重試。`,"auth.signIn.method.email-otp.sentTo":`已寄驗證碼到 {email}。`,"auth.signIn.method.email-otp.otpLabel":`驗證碼`,"auth.signIn.method.email-otp.otpPlaceholder":`輸入 6 位驗證碼`,"auth.signIn.method.email-otp.verifyButton":`驗證並登入`,"auth.signIn.method.email-otp.verifyFailed":`驗證碼錯誤,請再試一次。`,"auth.signIn.method.email-otp.back":`用其他 email`,"auth.signIn.method.magic-link.body":`我們會寄一個一鍵登入連結給你。`,"auth.signIn.method.magic-link.emailLabel":`電子郵件`,"auth.signIn.method.magic-link.emailPlaceholder":`you@example.com`,"auth.signIn.method.magic-link.sendButton":`寄送登入連結`,"auth.signIn.method.magic-link.sendFailed":`連結寄送失敗,請確認 email 後重試。`,"auth.signIn.method.magic-link.sentTo":`已將登入連結寄到 {email}。`,"auth.signIn.method.magic-link.clickHint":`請點 email 裡的連結完成登入。連結很快會過期。`,"auth.signIn.method.magic-link.anotherEmail":`用其他 email`,"common.signOut":`登出`,"common.viewSite":`查看網站`,"common.copy":`複製`,"common.open":`開啟`,"common.failedToLoad":`載入失敗`,"common.signedIn":`已登入`,"console.eyebrow":`Owner console`,"console.description":`{title} 已部署完成。這裡是操作入口;內容營運請交給支援 MCP 的 agent。`,"console.descriptionFallback":`這裡是操作入口;內容營運請交給支援 MCP 的 agent。`,"console.agent.title":`下一步:連接 agent`,"console.agent.body":`把這個 Staff MCP URL 交給 Claude Code、Codex、Cursor 或其他 MCP client。它會開啟 consent 畫面,授權後 agent 就能用你的 staff 權限管理網站內容。`,"console.workspace.title":`從這裡開始編輯`,"console.workspace.body":`商品、頁面、媒體與首頁區塊都應該能在這個後台管理。先選一個常用操作開始。`,"workspace.products":`商品清單`,"workspace.pages":`首頁與頁面編排`,"workspace.media":`媒體庫`,"console.mcpUrl":`Staff MCP URL`,"console.publicUrl":`公開網站 URL`,"console.loop.title":`營運閉環`,"console.loop.body":`你可以請內容 agent 列出 entries、建立草稿、發布、取消發布或調整文案。需要人工盤點時,再回這個 console 查看。`,"console.onboarding.title":`操作導覽`,"console.onboarding.body":`第一次進入後台時,會用 overlay 帶店主完成內容編輯、媒體檢查與發布。`,"console.onboarding.step1":`先檢查預設商品與首頁區塊。`,"console.onboarding.step2":`在商品或頁面內直接用 Rich Editor 修改內容。`,"console.onboarding.step3":`預覽前台,再發布變更。`,"console.loop.step1":`先打開公開網站檢查結果。`,"console.loop.step2":`透過 MCP 連接第二個 agent。`,"console.loop.step3":`用自然語言告訴 agent 要改內容或流程。`,"console.collections.eyebrow":`內容模型`,"console.collections.title":`內容清單`,"console.collections.body":`這裡會列出這個網站的商品、頁面、訂單與營運資料。翻譯 child schema 會折進 parent 顯示。`,"console.collections.emptyTitle":`尚未定義 collections`,"console.collections.emptyBody":`Blank project 之後可以新增 Schema manifests;starter 通常應該至少有一個 collection。`,"console.collections.noDescription":`沒有描述。`,"collection.breadcrumb":`內容清單`,"collection.defaultDescription":`這個 collection 裡的 entries。`,"collection.schemaSummary":`管理 {name} 的 entries、發布狀態與多語內容。`,"collection.schemaDetails":`Schema 說明`,"collection.searchPlaceholder":`搜尋標題、ID、狀態...`,"collection.filter.all":`全部`,"collection.empty.title":`目前沒有 entries`,"collection.empty.search":`沒有符合「{search}」的資料。`,"collection.empty.withStatus":`這個 collection 目前沒有 {status} entries。`,"collection.empty.all":`這個 collection 目前沒有 entries。`,"collection.refreshing":`清單更新中...`,"collection.moreRows":`還有更多資料,但這個 admin shell 尚未接上 cursor pagination。`,"collection.table.id":`ID`,"collection.table.title":`標題`,"collection.table.status":`狀態`,"collection.table.locale":`語言`,"collection.table.version":`版本`,"collection.table.updated":`更新時間`,"collection.table.actions":`操作`,"collection.actions.label":`內容操作`,"collection.untitled":`(未命名)`,"crud.create":`新增`,"crud.edit":`編輯`,"crud.search":`查詢`,"crud.delete":`刪除`,"crud.createTooltip":`新增一筆{name}。`,"crud.editTooltip":`編輯{name}。`,"crud.searchTooltip":`查詢{name}。`,"crud.deleteTooltip":`刪除{name}。`,"crud.duplicateTooltip":`複製{name}。`,"crud.saveTitle":`儲存標題`,"crud.cancelTitle":`取消編輯`,"crud.deleteConfirm":`確定要刪除{name}?這個動作無法復原。`,"crud.saving":`儲存中...`,"crud.duplicating":`複製中...`,"crud.deleting":`刪除中...`,"entryEdit.back":`回到 {name}`,"entryEdit.body":`依據 {name} 的 Schema manifest 編輯資料;相關子資料會由既有 schema 關係自動推導。`,"entryEdit.parent":`父層:{name}`,"entryEdit.save":`儲存變更`,"entryEdit.saveTooltip":`儲存這筆資料。`,"entryEdit.fields":`資料欄位`,"entryEdit.meta":`資料資訊`,"entryEdit.related":`相關資料`,"entryEdit.noRelated":`目前沒有推導出這筆資料的子 collection。`,"entryEdit.noChildEntries":`目前沒有符合這筆資料的子資料。`,"entryEdit.relationship":`透過子欄位 {child} 對應父欄位 {parent}。`,"entryEdit.addItem":`新增項目`,"entryEdit.removeItem":`移除項目`,"entryEdit.emptyOption":`無值`,"entryEdit.boolean":`啟用`,"entryEdit.skus":`規格與售價`,"entryEdit.skusBody":`管理 {name} 底下實際可販售的 SKU。價格、原價、庫存方式與規格值都會跟著這個商品。`,"entryEdit.openAdvanced":`開啟完整 SKU 編輯器`,"entryEdit.priceMinor":`售價`,"entryEdit.compareAtPriceMinor":`原價`,"entryEdit.inventoryMode":`庫存模式`,"entryEdit.inventoryTracked":`追蹤庫存`,"entryEdit.inventoryUntracked":`不限量/不追蹤`,"entryEdit.currency":`幣別`,"entryEdit.skuInlineHint":`媒體、原始規格 JSON 或進階欄位可用完整編輯器處理。`,"productEdit.back":`回商品清單`,"productEdit.title":`編輯商品`,"productEdit.body":`在同一頁編輯商品文案、價格、優惠活動、品牌介紹與服務內容。`,"productEdit.save":`儲存變更`,"productEdit.basic":`商品內容`,"productEdit.shortDescription":`短描述`,"productEdit.description":`商品介紹`,"productEdit.price":`商品價格`,"productEdit.salePrice":`售價`,"productEdit.compareAtPrice":`原價`,"productEdit.promotions":`活動優惠組合`,"productEdit.promoLabel":`標籤`,"productEdit.promoTitle":`活動標題`,"productEdit.promoBody":`活動內容`,"productEdit.relatedSku":`組合 SKU`,"productEdit.noRelatedSku":`不套用組合 SKU`,"productEdit.discountPercent":`折扣 %`,"productEdit.addPromotion":`新增優惠`,"productEdit.brand":`品牌介紹`,"productEdit.brandName":`品牌名稱`,"productEdit.brandTagline":`品牌標語`,"productEdit.brandIntro":`品牌介紹`,"productEdit.serviceIncludes":`服務包含`,"settings.page.title":`商店設定`,"settings.page.body":`管理全站品牌文案與預設服務資訊,讓商品與首頁可以共用。`,"settings.tabsLabel":`商店設定分頁`,"settings.tab.brand":`品牌`,"settings.tab.tracking":`追蹤碼`,"settings.brandSection":`品牌與服務`,"settings.brandSectionBody":`商品頁與產生首頁區塊會共用的預設商店文案。`,"settings.siteBrand":`網站品牌`,"settings.siteTitle":`網站標題`,"settings.siteDescription":`網站描述`,"settings.trackingSection":`追蹤碼`,"settings.trackingSectionBody":`填入 analytics ID 後,Mantle 會在產生的前台頁面自動埋入對應追蹤碼。`,"settings.ga4MeasurementId":`GA4 Measurement ID`,"settings.ga4MeasurementIdHelp":`只需要填 ID,例如 G-XXXXXXXXXX,不要貼整段 gtag script。`,"settings.facebookPixelId":`Facebook Pixel ID`,"settings.facebookPixelIdHelp":`只需要填數字 Pixel ID,Mantle 會產生標準 Pixel base code。`,"guide.title":`你的商店後台已經準備好了`,"guide.body":`先用這個導覽了解每個編輯入口,再交給 agent 做更大量的調整。`,"guide.step1":`打開商品清單,確認前台預設商品都有進後台。`,"guide.step2":`在 collection 頁使用新增、編輯、查詢或刪除。`,"guide.step3":`預覽公開網站,再在各內容區直接用 Rich Editor 持續調整。`,"guide.close":`關閉引導`,"guide.open":`使用者引導`,"guide.next":`下一步`,"guide.prev":`上一步`,"guide.finish":`完成`,"guide.products.title":`先從商品開始`,"guide.products.body":`打開商品 collection,管理前台商品、SKU、價格與多語商品文案。`,"guide.filters.title":`切換發布狀態`,"guide.filters.body":`在清單上直接切換全部、草稿、已發布與已封存,不需要離開目前頁面。`,"guide.actions.title":`在清單裡直接操作`,"guide.actions.body":`用每列右側操作編輯商品內容、複製商品,或從網站移除該項目。`,"guide.reopen.title":`隨時重新打開引導`,"guide.reopen.body":`右上角會保留使用者引導按鈕,需要時可以再次開啟或關閉這套逐步導覽。`,"nav.home":`首頁`,"nav.content":`內容`,"nav.editor":`編輯器`,"nav.media":`媒體庫`,"nav.more":`更多`,"nav.approvals":`審核`,"nav.settings":`設定`,"nav.staff":`員工管理`,"staff.page.title":`員工管理`,"staff.page.body":`以 email 邀請員工、指派角色、撤銷尚未使用的邀請。僅 owner 可見此頁。`,"staff.invite.title":`邀請員工`,"staff.invite.emailLabel":`Email`,"staff.invite.emailPlaceholder":`teammate@example.com`,"staff.invite.roleLabel":`角色`,"staff.invite.button":`建立邀請`,"staff.invite.sending":`邀請中…`,"staff.invite.revoke":`撤銷`,"staff.invite.hint":`受邀者到 /admin/sign-in 用受邀的 email 登入(magic link、email 驗證碼,或同信箱的社群帳號),登入時角色即已生效。`,"staff.table.name":`姓名`,"staff.table.email":`Email`,"staff.table.status":`狀態/登入方式`,"staff.table.role":`角色`,"staff.role.owner":`管理者`,"staff.role.editor":`編輯`,"staff.role.contributor":`協作者`,"staff.role.none":`無角色`,"staff.badge.invited":`邀請中`,"staff.status.emailSignIn":`Email 登入`,"staff.self":`你自己`,"status.draft":`草稿`,"status.review":`審核中`,"status.published":`已發布`,"status.archived":`已封存`,"preferences.heading":`偏好設定`,"preferences.language":`後台語言`,"preferences.language.search":`搜尋語言...`,"preferences.language.noResults":`找不到語言。`,"preferences.direction":`文字方向`,"preferences.direction.auto":`文字方向會跟隨選擇的語言。`,"preferences.appearance":`外觀`,"preferences.light":`淺色`,"preferences.dark":`深色`,"preferences.system":`跟隨系統`,"preferences.ltr":`左到右`,"preferences.rtl":`右到左`,"preferences.page.title":`個人偏好`,"preferences.page.body":`這些偏好只保存在這個瀏覽器,只影響 admin console,不會改動站台設定。`,"preferences.page.languageBody":`選擇系統頁與 admin chrome 使用的語言。`,"preferences.page.appearanceBody":`選擇淺色、深色,或跟隨作業系統。`,"preferences.page.open":`個人偏好`,"settings.planned.title":`Settings 尚未接上`,"settings.planned.body":`Settings 是會寫進站台的資料,例如 site config。Preferences 則只保存在這個瀏覽器。`,"system.notFound.title":`找不到頁面`,"system.notFound.plannedTitle":`尚未接上`,"system.notFound.body":`沒有 view 註冊在`,"system.notFound.back":`回首頁`,"editor.page.title":`內容編輯器`,"editor.page.body":`在交給 agent 或發布流程之前,先用 Markdown、HTML 或 Rich Editor 編輯內容草稿。`,"editor.mode.markdown":`Markdown`,"editor.mode.html":`HTML`,"editor.mode.rich":`Rich Editor`,"editor.titleLabel":`標題`,"editor.slugLabel":`Slug`,"editor.bodyLabel":`本文`,"editor.preview":`預覽`,"editor.insertBlock":`插入區塊`,"editor.saveDraft":`儲存草稿`,"editor.markdownHint":`支援標題、清單、連結與 fenced code blocks。`,"editor.htmlHint":`用原始碼模式編輯可信任的 HTML 片段。`,"editor.richHint":`不碰 markup 也能整理段落、提示框與商品文案。`,"editor.toolbar":`Rich Editor 工具列`,"editor.undo":`復原`,"editor.redo":`重做`,"editor.aiClean":`插入提示區塊`,"editor.uploadImage":`上傳圖片`,"editor.uploading":`圖片上傳中...`,"editor.textStyle":`文字樣式`,"editor.headingPlaceholder":`標題`,"editor.decreaseFont":`縮小字級`,"editor.increaseFont":`放大字級`,"editor.selectedText":`選取文字`,"editor.bold":`粗體`,"editor.italic":`斜體`,"editor.underline":`底線`,"editor.strike":`刪除線`,"editor.inlineCode":`行內程式碼`,"editor.textColor":`文字顏色`,"editor.highlight":`螢光標記`,"editor.palette":`品牌色`,"editor.alignLeft":`靠左對齊`,"editor.alignCenter":`置中對齊`,"editor.alignRight":`靠右對齊`,"editor.bulletList":`項目清單`,"editor.numberList":`編號清單`,"editor.checkList":`待辦清單`,"editor.indent":`縮排`,"editor.link":`連結`,"editor.linkText":`連結文字`,"editor.table":`表格`,"editor.emoji":`表情符號`,"editor.mediaLibrary":`媒體庫`,"editor.imageUrl":`圖片網址`,"editor.insertImage":`插入圖片`,"editor.videoUrl":`YouTube / Dailymotion 連結`,"editor.insertVideo":`插入影片`,"editor.audioHint":`音訊嵌入`,"media.page.title":`媒體庫`,"media.page.body":`上傳、搜尋、裁切、標記並重複使用商品與頁面圖片。`,"media.upload":`上傳媒體`,"media.search":`搜尋媒體...`,"media.crop":`裁切`,"media.alt":`替代文字`,"media.tags":`標籤`,"media.empty":`目前沒有媒體素材。`,"media.dropzone":`拖放檔案到這裡,或選擇圖片`,"media.dropzoneHint":`上傳後的素材可重複用在商品、頁面與前台區塊。`,"media.copyUrl":`複製圖片網址`,"media.filter":`篩選媒體`,"media.filter.all":`全部`,"media.filter.product":`商品`,"media.filter.brand":`品牌`,"media.filter.content":`內容`,"media.sort":`排序媒體`,"media.sort.newest":`最新`,"media.sort.name":`名稱`,"media.sort.type":`類型`,"approvals.title":`審核中心`,"approvals.body":`集中查看等待審核的 editorial entries,發布前可以逐筆檢查內容。`,"approvals.emptyTitle":`目前沒有等待審核的內容`,"approvals.emptyBody":`送出審核的資料會依 collection 分組顯示在這裡。`,"approvals.groupBody":`目前有 {count} 筆內容標記為「{status}」。`,"approvals.openCollection":`開啟清單`,"approvals.reviewEntry":`審核`},"zh-CN":{"admin.consoleTitle":`管理后台`,"auth.signIn.title":`登录`,"common.signOut":`登出`,"common.viewSite":`查看网站`,"common.copy":`复制`,"common.open":`打开`,"common.failedToLoad":`加载失败`,"common.signedIn":`已登录`,"console.agent.title":`下一步:连接 agent`,"console.workspace.title":`从这里开始编辑`,"console.workspace.body":`商品、页面、媒体与首页区块都应该能在这个后台管理。先选一个常用操作开始。`,"workspace.products":`商品清单`,"workspace.pages":`首页与页面编排`,"workspace.media":`媒体库`,"console.onboarding.title":`操作导览`,"console.onboarding.body":`第一次进入后台时,会用 overlay 带店主完成内容编辑、媒体检查与发布。`,"console.onboarding.step1":`先检查预设商品与首页区块。`,"console.onboarding.step2":`在商品或页面内直接用 Rich Editor 修改内容。`,"console.onboarding.step3":`预览前台,再发布变更。`,"console.mcpUrl":`Staff MCP URL`,"console.publicUrl":`公开网站 URL`,"console.collections.title":`内容清单`,"console.collections.body":`这里会列出这个网站的商品、页面、订单与运营数据。翻译 child schema 会折进 parent 显示。`,"collection.breadcrumb":`内容清单`,"collection.filter.all":`全部`,"collection.table.title":`标题`,"collection.table.status":`状态`,"collection.table.locale":`语言`,"collection.table.version":`版本`,"collection.table.updated":`更新时间`,"collection.table.actions":`操作`,"collection.actions.label":`内容操作`,"collection.untitled":`(未命名)`,"collection.searchPlaceholder":`搜索标题、ID、状态...`,"collection.empty.search":`没有符合“{search}”的资料。`,"crud.create":`新增`,"crud.edit":`编辑`,"crud.search":`查询`,"crud.delete":`删除`,"crud.createTooltip":`新增一笔{name}。`,"crud.editTooltip":`编辑{name}。`,"crud.searchTooltip":`查询{name}。`,"crud.deleteTooltip":`删除{name}。`,"crud.duplicateTooltip":`复制{name}。`,"crud.saveTitle":`保存标题`,"crud.cancelTitle":`取消编辑`,"crud.deleteConfirm":`确定要删除{name}?这个动作无法复原。`,"crud.saving":`保存中...`,"crud.duplicating":`复制中...`,"crud.deleting":`删除中...`,"entryEdit.back":`回到 {name}`,"entryEdit.body":`依据 {name} 的 Schema manifest 编辑资料;相关子资料会由既有 schema 关系自动推导。`,"entryEdit.parent":`父层:{name}`,"entryEdit.save":`保存变更`,"entryEdit.saveTooltip":`保存这笔资料。`,"entryEdit.fields":`资料字段`,"entryEdit.meta":`资料信息`,"entryEdit.related":`相关资料`,"entryEdit.noRelated":`目前没有推导出这笔资料的子 collection。`,"entryEdit.noChildEntries":`目前没有符合这笔资料的子资料。`,"entryEdit.relationship":`透过子字段 {child} 对应父字段 {parent}。`,"entryEdit.addItem":`新增项目`,"entryEdit.removeItem":`移除项目`,"entryEdit.emptyOption":`无值`,"entryEdit.boolean":`启用`,"entryEdit.skus":`规格与售价`,"entryEdit.skusBody":`管理 {name} 底下实际可销售的 SKU。价格、原价、库存方式与规格值都会跟着这个商品。`,"entryEdit.openAdvanced":`打开完整 SKU 编辑器`,"entryEdit.priceMinor":`售价`,"entryEdit.compareAtPriceMinor":`原价`,"entryEdit.inventoryMode":`库存模式`,"entryEdit.inventoryTracked":`追踪库存`,"entryEdit.inventoryUntracked":`不限量/不追踪`,"entryEdit.currency":`币别`,"entryEdit.skuInlineHint":`媒体、原始规格 JSON 或进阶字段可用完整编辑器处理。`,"productEdit.back":`回商品清单`,"productEdit.title":`编辑商品`,"productEdit.body":`在同一页编辑商品文案、价格、优惠活动、品牌介绍与服务内容。`,"productEdit.save":`保存变更`,"productEdit.basic":`商品内容`,"productEdit.shortDescription":`短描述`,"productEdit.description":`商品介绍`,"productEdit.price":`商品价格`,"productEdit.salePrice":`售价`,"productEdit.compareAtPrice":`原价`,"productEdit.promotions":`活动优惠组合`,"productEdit.promoLabel":`标签`,"productEdit.promoTitle":`活动标题`,"productEdit.promoBody":`活动内容`,"productEdit.relatedSku":`组合 SKU`,"productEdit.noRelatedSku":`不套用组合 SKU`,"productEdit.discountPercent":`折扣 %`,"productEdit.addPromotion":`新增优惠`,"productEdit.brand":`品牌介绍`,"productEdit.brandName":`品牌名称`,"productEdit.brandTagline":`品牌标语`,"productEdit.brandIntro":`品牌介绍`,"productEdit.serviceIncludes":`服务包含`,"settings.page.title":`商店设置`,"settings.page.body":`管理全站品牌文案与预设服务信息,让商品与首页可以共用。`,"settings.tabsLabel":`商店设置分页`,"settings.tab.brand":`品牌`,"settings.tab.tracking":`追踪码`,"settings.brandSection":`品牌与服务`,"settings.brandSectionBody":`商品页与生成首页区块会共用的默认商店文案。`,"settings.siteBrand":`网站品牌`,"settings.siteTitle":`网站标题`,"settings.siteDescription":`网站描述`,"settings.trackingSection":`追踪码`,"settings.trackingSectionBody":`填入 analytics ID 后,Mantle 会在生成的前台页面自动埋入对应追踪码。`,"settings.ga4MeasurementId":`GA4 Measurement ID`,"settings.ga4MeasurementIdHelp":`只需要填 ID,例如 G-XXXXXXXXXX,不要贴整段 gtag script。`,"settings.facebookPixelId":`Facebook Pixel ID`,"settings.facebookPixelIdHelp":`只需要填数字 Pixel ID,Mantle 会生成标准 Pixel base code。`,"guide.title":`你的商店后台已经准备好了`,"guide.body":`先用这个导览了解每个编辑入口,再交给 agent 做更大量的调整。`,"guide.step1":`打开商品清单,确认前台预设商品都有进后台。`,"guide.step2":`在 collection 页使用新增、编辑、查询或删除。`,"guide.step3":`预览公开网站,再在各内容区直接用 Rich Editor 持续调整。`,"guide.close":`关闭引导`,"guide.open":`使用者引导`,"guide.next":`下一步`,"guide.prev":`上一步`,"guide.finish":`完成`,"guide.products.title":`先从商品开始`,"guide.products.body":`打开商品 collection,管理前台商品、SKU、价格与多语商品文案。`,"guide.filters.title":`切换发布状态`,"guide.filters.body":`在清单上直接切换全部、草稿、已发布与已归档,不需要离开当前页面。`,"guide.actions.title":`在清单里直接操作`,"guide.actions.body":`用每列右侧操作编辑商品内容、复制商品,或从网站移除该项目。`,"guide.reopen.title":`随时重新打开引导`,"guide.reopen.body":`右上角会保留使用者引导按钮,需要时可以再次开启或关闭这套逐步导览。`,"nav.home":`首页`,"nav.content":`内容`,"nav.editor":`编辑器`,"nav.media":`媒体库`,"nav.more":`更多`,"nav.approvals":`审核`,"nav.settings":`设置`,"status.draft":`草稿`,"status.review":`审核中`,"status.published":`已发布`,"status.archived":`已归档`,"preferences.heading":`偏好设置`,"preferences.language":`后台语言`,"preferences.language.search":`搜索语言...`,"preferences.language.noResults":`找不到语言。`,"preferences.direction":`文字方向`,"preferences.direction.auto":`文字方向会跟随选择的语言。`,"preferences.appearance":`外观`,"preferences.light":`浅色`,"preferences.dark":`深色`,"preferences.system":`跟随系统`,"preferences.ltr":`从左到右`,"preferences.rtl":`从右到左`,"preferences.page.open":`个人偏好`,"preferences.page.title":`个人偏好`,"preferences.page.body":`这些偏好只保存在此浏览器,只影响 admin console,不会修改站点设置。`,"preferences.page.languageBody":`选择系统页面和 admin chrome 使用的语言。`,"preferences.page.appearanceBody":`选择浅色、深色,或跟随操作系统。`,"editor.page.title":`内容编辑器`,"editor.page.body":`在交给 agent 或发布流程前,先用 Markdown、HTML 或 Rich Editor 编辑内容草稿。`,"editor.mode.markdown":`Markdown`,"editor.mode.html":`HTML`,"editor.mode.rich":`Rich Editor`,"editor.titleLabel":`标题`,"editor.slugLabel":`Slug`,"editor.bodyLabel":`正文`,"editor.preview":`预览`,"editor.insertBlock":`插入区块`,"editor.saveDraft":`保存草稿`,"editor.markdownHint":`支持标题、列表、链接与 fenced code blocks。`,"editor.htmlHint":`用源码模式编辑可信任的 HTML 片段。`,"editor.richHint":`不用碰 markup 也能整理段落、提示框与商品文案。`,"editor.toolbar":`Rich Editor 工具栏`,"editor.undo":`撤销`,"editor.redo":`重做`,"editor.aiClean":`插入提示区块`,"editor.uploadImage":`上传图片`,"editor.uploading":`图片上传中...`,"editor.textStyle":`文字样式`,"editor.headingPlaceholder":`标题`,"editor.decreaseFont":`缩小字号`,"editor.increaseFont":`放大字号`,"editor.selectedText":`选取文字`,"editor.bold":`粗体`,"editor.italic":`斜体`,"editor.underline":`下划线`,"editor.strike":`删除线`,"editor.inlineCode":`行内代码`,"editor.textColor":`文字颜色`,"editor.highlight":`高亮标记`,"editor.palette":`品牌色`,"editor.alignLeft":`左对齐`,"editor.alignCenter":`居中对齐`,"editor.alignRight":`右对齐`,"editor.bulletList":`项目列表`,"editor.numberList":`编号列表`,"editor.checkList":`待办列表`,"editor.indent":`缩进`,"editor.link":`链接`,"editor.linkText":`链接文字`,"editor.table":`表格`,"editor.emoji":`表情符号`,"editor.mediaLibrary":`媒体库`,"editor.imageUrl":`图片网址`,"editor.insertImage":`插入图片`,"editor.videoUrl":`YouTube / Dailymotion 链接`,"editor.insertVideo":`插入视频`,"editor.audioHint":`音频嵌入`,"media.page.title":`媒体库`,"media.page.body":`上传、搜索、裁切、标记并复用商品与页面图片。`,"media.upload":`上传媒体`,"media.search":`搜索媒体...`,"media.crop":`裁切`,"media.alt":`替代文字`,"media.tags":`标签`,"media.empty":`目前没有媒体素材。`,"media.dropzone":`拖放文件到这里,或选择图片`,"media.dropzoneHint":`上传后的素材可复用在商品、页面与前台区块。`,"media.copyUrl":`复制图片网址`,"media.filter":`筛选媒体`,"media.filter.all":`全部`,"media.filter.product":`商品`,"media.filter.brand":`品牌`,"media.filter.content":`内容`,"media.sort":`排序媒体`,"media.sort.newest":`最新`,"media.sort.name":`名称`,"media.sort.type":`类型`,"approvals.title":`审核中心`,"approvals.body":`集中查看等待审核的 editorial entries,发布前可以逐笔检查内容。`,"approvals.emptyTitle":`目前没有等待审核的内容`,"approvals.emptyBody":`送出审核的资料会依 collection 分组显示在这里。`,"approvals.groupBody":`目前有 {count} 笔内容标记为“{status}”。`,"approvals.openCollection":`打开清单`,"approvals.reviewEntry":`审核`},de:{"auth.signIn.title":`Anmelden`,"common.signOut":`Abmelden`,"common.viewSite":`Website ansehen`,"common.copy":`Kopieren`,"common.open":`Öffnen`,"common.failedToLoad":`Laden fehlgeschlagen`,"common.signedIn":`Angemeldet`,"console.agent.title":`Nächster Schritt: Agent verbinden`,"collection.filter.all":`Alle`,"nav.home":`Start`,"nav.content":`Inhalte`,"nav.more":`Mehr`,"nav.approvals":`Freigaben`,"nav.settings":`Einstellungen`,"status.draft":`Entwürfe`,"status.review":`In Prüfung`,"status.published":`Veröffentlicht`,"status.archived":`Archiviert`,"preferences.heading":`Präferenzen`,"preferences.language":`Admin-Sprache`,"preferences.language.search":`Sprachen suchen...`,"preferences.language.noResults":`Keine Sprachen gefunden.`,"preferences.direction":`Textrichtung`,"preferences.direction.auto":`Die Textrichtung folgt der gewählten Sprache.`,"preferences.appearance":`Darstellung`,"preferences.light":`Hell`,"preferences.dark":`Dunkel`,"preferences.system":`System`,"preferences.ltr":`Links nach rechts`,"preferences.rtl":`Rechts nach links`,"preferences.page.open":`Präferenzen`,"preferences.page.title":`Persönliche Präferenzen`,"preferences.page.body":`Diese Präferenzen bleiben in diesem Browser. Sie ändern nur die Admin-Konsole und keine Website-Einstellungen.`,"preferences.page.languageBody":`Wähle die Sprache für Systemseiten und Admin-Chrome.`,"preferences.page.appearanceBody":`Wähle hell, dunkel oder dein Betriebssystem.`},es:{"auth.signIn.title":`Iniciar sesión`,"common.signOut":`Cerrar sesión`,"common.viewSite":`Ver sitio`,"common.copy":`Copiar`,"common.open":`Abrir`,"common.failedToLoad":`Error al cargar`,"common.signedIn":`Sesión iniciada`,"console.agent.title":`Siguiente: conectar un agente`,"collection.filter.all":`Todo`,"nav.home":`Inicio`,"nav.content":`Contenido`,"nav.more":`Más`,"nav.approvals":`Aprobaciones`,"nav.settings":`Configuración`,"status.draft":`Borradores`,"status.review":`En revisión`,"status.published":`Publicado`,"status.archived":`Archivado`,"preferences.heading":`Preferencias`,"preferences.language":`Idioma del admin`,"preferences.language.search":`Buscar idiomas...`,"preferences.language.noResults":`No se encontraron idiomas.`,"preferences.direction":`Dirección del texto`,"preferences.direction.auto":`La dirección del texto sigue el idioma seleccionado.`,"preferences.appearance":`Apariencia`,"preferences.light":`Claro`,"preferences.dark":`Oscuro`,"preferences.system":`Sistema`,"preferences.ltr":`Izquierda a derecha`,"preferences.rtl":`Derecha a izquierda`,"preferences.page.open":`Preferencias`,"preferences.page.title":`Preferencias personales`,"preferences.page.body":`Estas preferencias se guardan en este navegador. Solo cambian la consola de administración y no modifican la configuración del sitio.`,"preferences.page.languageBody":`Elige el idioma de las páginas del sistema y la interfaz de administración.`,"preferences.page.appearanceBody":`Elige claro, oscuro o seguir el sistema operativo.`},fr:{"auth.signIn.title":`Se connecter`,"common.signOut":`Se déconnecter`,"common.viewSite":`Voir le site`,"common.copy":`Copier`,"common.open":`Ouvrir`,"common.failedToLoad":`Échec du chargement`,"common.signedIn":`Connecté`,"console.agent.title":`Étape suivante : connecter un agent`,"collection.filter.all":`Tout`,"nav.home":`Accueil`,"nav.content":`Contenu`,"nav.more":`Plus`,"nav.approvals":`Approbations`,"nav.settings":`Paramètres`,"status.draft":`Brouillons`,"status.review":`En révision`,"status.published":`Publié`,"status.archived":`Archivé`,"preferences.heading":`Préférences`,"preferences.language":`Langue admin`,"preferences.language.search":`Rechercher une langue...`,"preferences.language.noResults":`Aucune langue trouvée.`,"preferences.direction":`Direction du texte`,"preferences.direction.auto":`La direction du texte suit la langue sélectionnée.`,"preferences.appearance":`Apparence`,"preferences.light":`Clair`,"preferences.dark":`Sombre`,"preferences.system":`Système`,"preferences.ltr":`Gauche à droite`,"preferences.rtl":`Droite à gauche`,"preferences.page.open":`Préférences`,"preferences.page.title":`Préférences personnelles`,"preferences.page.body":`Ces préférences restent dans ce navigateur. Elles modifient seulement la console admin, pas les paramètres du site.`,"preferences.page.languageBody":`Choisissez la langue des pages système et de l'interface admin.`,"preferences.page.appearanceBody":`Choisissez clair, sombre ou le thème du système.`},it:{"auth.signIn.title":`Accedi`,"common.signOut":`Esci`,"common.viewSite":`Vedi sito`,"common.copy":`Copia`,"common.open":`Apri`,"common.failedToLoad":`Caricamento non riuscito`,"common.signedIn":`Accesso effettuato`,"console.agent.title":`Prossimo: collega un agente`,"collection.filter.all":`Tutto`,"nav.home":`Home`,"nav.content":`Contenuti`,"nav.more":`Altro`,"nav.approvals":`Approvazioni`,"nav.settings":`Impostazioni`,"status.draft":`Bozze`,"status.review":`In revisione`,"status.published":`Pubblicato`,"status.archived":`Archiviato`,"preferences.heading":`Preferenze`,"preferences.language":`Lingua admin`,"preferences.language.search":`Cerca lingue...`,"preferences.language.noResults":`Nessuna lingua trovata.`,"preferences.direction":`Direzione testo`,"preferences.direction.auto":`La direzione del testo segue la lingua selezionata.`,"preferences.appearance":`Aspetto`,"preferences.light":`Chiaro`,"preferences.dark":`Scuro`,"preferences.system":`Sistema`,"preferences.ltr":`Da sinistra a destra`,"preferences.rtl":`Da destra a sinistra`,"preferences.page.open":`Preferenze`,"preferences.page.title":`Preferenze personali`,"preferences.page.body":`Queste preferenze restano in questo browser. Modificano solo la console admin e non le impostazioni del sito.`,"preferences.page.languageBody":`Scegli la lingua delle pagine di sistema e dell'interfaccia admin.`,"preferences.page.appearanceBody":`Scegli chiaro, scuro o segui il sistema operativo.`},ja:{"auth.signIn.title":`サインイン`,"auth.signIn.body":`管理コンソールです。サインイン後にロールでアクセスを判定します。`,"auth.signIn.methodsLoadFailed":`サインイン方法を読み込めませんでした。再読み込みしてください。`,"auth.signIn.noMethods":`このサイトにはサインイン方法が設定されていません。`,"auth.signIn.unknownMethod":`未対応のサインイン方法: {kind}`,"auth.signIn.method.social.button":`{provider} でサインイン`,"auth.signIn.method.email-otp.body":`メールに届くワンタイムコードでサインインします。`,"auth.signIn.method.email-otp.emailLabel":`メールアドレス`,"auth.signIn.method.email-otp.emailPlaceholder":`you@example.com`,"auth.signIn.method.email-otp.sendButton":`コードを送信`,"auth.signIn.method.email-otp.sendFailed":`コードの送信に失敗しました。メールを確認してもう一度お試しください。`,"auth.signIn.method.email-otp.sentTo":`{email} にコードを送信しました。`,"auth.signIn.method.email-otp.otpLabel":`ワンタイムコード`,"auth.signIn.method.email-otp.otpPlaceholder":`6 桁のコードを入力`,"auth.signIn.method.email-otp.verifyButton":`コードを確認してサインイン`,"auth.signIn.method.email-otp.verifyFailed":`コードが一致しません。もう一度入力してください。`,"auth.signIn.method.email-otp.back":`別のメールアドレスを使う`,"auth.signIn.method.magic-link.body":`ワンタップでサインインできるリンクをメールでお送りします。`,"auth.signIn.method.magic-link.emailLabel":`メールアドレス`,"auth.signIn.method.magic-link.emailPlaceholder":`you@example.com`,"auth.signIn.method.magic-link.sendButton":`サインインリンクを送信`,"auth.signIn.method.magic-link.sendFailed":`リンクの送信に失敗しました。メールを確認してもう一度お試しください。`,"auth.signIn.method.magic-link.sentTo":`{email} にサインインリンクを送信しました。`,"auth.signIn.method.magic-link.clickHint":`メール内のリンクをクリックしてサインインを完了してください。リンクはまもなく失効します。`,"auth.signIn.method.magic-link.anotherEmail":`別のメールアドレスを使う`,"common.signOut":`サインアウト`,"common.viewSite":`サイトを見る`,"common.copy":`コピー`,"common.open":`開く`,"common.failedToLoad":`読み込みに失敗しました`,"common.signedIn":`サインイン済み`,"console.agent.title":`次へ: agent を接続`,"collection.filter.all":`すべて`,"nav.home":`ホーム`,"nav.content":`コンテンツ`,"nav.more":`その他`,"nav.approvals":`承認`,"nav.settings":`設定`,"status.draft":`下書き`,"status.review":`レビュー中`,"status.published":`公開済み`,"status.archived":`アーカイブ済み`,"preferences.heading":`環境設定`,"preferences.language":`管理画面の言語`,"preferences.language.search":`言語を検索...`,"preferences.language.noResults":`言語が見つかりません。`,"preferences.direction":`文字方向`,"preferences.direction.auto":`文字方向は選択した言語に従います。`,"preferences.appearance":`外観`,"preferences.light":`ライト`,"preferences.dark":`ダーク`,"preferences.system":`システム`,"preferences.ltr":`左から右`,"preferences.rtl":`右から左`,"preferences.page.open":`環境設定`,"preferences.page.title":`個人設定`,"preferences.page.body":`これらの設定はこのブラウザにのみ保存されます。管理コンソールだけに影響し、サイト設定は変更しません。`,"preferences.page.languageBody":`システムページと管理 UI で使う言語を選びます。`,"preferences.page.appearanceBody":`ライト、ダーク、またはシステム設定に合わせます。`},ko:{"auth.signIn.title":`로그인`,"common.signOut":`로그아웃`,"common.viewSite":`사이트 보기`,"common.copy":`복사`,"common.open":`열기`,"common.failedToLoad":`로드 실패`,"common.signedIn":`로그인됨`,"console.agent.title":`다음: agent 연결`,"collection.filter.all":`전체`,"nav.home":`홈`,"nav.content":`콘텐츠`,"nav.more":`더보기`,"nav.approvals":`승인`,"nav.settings":`설정`,"status.draft":`초안`,"status.review":`검토 중`,"status.published":`게시됨`,"status.archived":`보관됨`,"preferences.heading":`환경설정`,"preferences.language":`관리 언어`,"preferences.language.search":`언어 검색...`,"preferences.language.noResults":`언어를 찾을 수 없습니다.`,"preferences.direction":`텍스트 방향`,"preferences.direction.auto":`텍스트 방향은 선택한 언어를 따릅니다.`,"preferences.appearance":`화면 모드`,"preferences.light":`라이트`,"preferences.dark":`다크`,"preferences.system":`시스템`,"preferences.ltr":`왼쪽에서 오른쪽`,"preferences.rtl":`오른쪽에서 왼쪽`,"preferences.page.open":`환경설정`,"preferences.page.title":`개인 환경설정`,"preferences.page.body":`이 설정은 이 브라우저에만 저장됩니다. 관리 콘솔에만 적용되며 사이트 설정은 변경하지 않습니다.`,"preferences.page.languageBody":`시스템 페이지와 관리 UI에 사용할 언어를 선택합니다.`,"preferences.page.appearanceBody":`라이트, 다크 또는 운영체제 설정을 따르도록 선택합니다.`},"pt-BR":{"auth.signIn.title":`Entrar`,"common.signOut":`Sair`,"common.viewSite":`Ver site`,"common.copy":`Copiar`,"common.open":`Abrir`,"common.failedToLoad":`Falha ao carregar`,"common.signedIn":`Conectado`,"console.agent.title":`Próximo: conectar um agente`,"collection.filter.all":`Todos`,"nav.home":`Início`,"nav.content":`Conteúdo`,"nav.more":`Mais`,"nav.approvals":`Aprovações`,"nav.settings":`Configurações`,"status.draft":`Rascunhos`,"status.review":`Em revisão`,"status.published":`Publicado`,"status.archived":`Arquivado`,"preferences.heading":`Preferências`,"preferences.language":`Idioma do admin`,"preferences.language.search":`Pesquisar idiomas...`,"preferences.language.noResults":`Nenhum idioma encontrado.`,"preferences.direction":`Direção do texto`,"preferences.direction.auto":`A direção do texto segue o idioma selecionado.`,"preferences.appearance":`Aparência`,"preferences.light":`Claro`,"preferences.dark":`Escuro`,"preferences.system":`Sistema`,"preferences.ltr":`Esquerda para direita`,"preferences.rtl":`Direita para esquerda`,"preferences.page.open":`Preferências`,"preferences.page.title":`Preferências pessoais`,"preferences.page.body":`Estas preferências ficam neste navegador. Elas mudam apenas o console admin e não alteram as configurações do site.`,"preferences.page.languageBody":`Escolha o idioma das páginas do sistema e da interface admin.`,"preferences.page.appearanceBody":`Escolha claro, escuro ou seguir o sistema operacional.`},ru:{"auth.signIn.title":`Войти`,"common.signOut":`Выйти`,"common.viewSite":`Открыть сайт`,"common.copy":`Копировать`,"common.open":`Открыть`,"common.failedToLoad":`Не удалось загрузить`,"common.signedIn":`Вы вошли`,"console.agent.title":`Далее: подключите агента`,"collection.filter.all":`Все`,"nav.home":`Главная`,"nav.content":`Контент`,"nav.more":`Еще`,"nav.approvals":`Одобрения`,"nav.settings":`Настройки`,"status.draft":`Черновики`,"status.review":`На проверке`,"status.published":`Опубликовано`,"status.archived":`Архив`,"preferences.heading":`Предпочтения`,"preferences.language":`Язык админки`,"preferences.language.search":`Поиск языков...`,"preferences.language.noResults":`Языки не найдены.`,"preferences.direction":`Направление текста`,"preferences.direction.auto":`Направление текста следует выбранному языку.`,"preferences.appearance":`Внешний вид`,"preferences.light":`Светлая`,"preferences.dark":`Темная`,"preferences.system":`Система`,"preferences.ltr":`Слева направо`,"preferences.rtl":`Справа налево`,"preferences.page.open":`Предпочтения`,"preferences.page.title":`Личные предпочтения`,"preferences.page.body":`Эти предпочтения хранятся в этом браузере. Они меняют только админ-консоль и не изменяют настройки сайта.`,"preferences.page.languageBody":`Выберите язык системных страниц и интерфейса админки.`,"preferences.page.appearanceBody":`Выберите светлую, темную тему или тему системы.`},nl:{"auth.signIn.title":`Inloggen`,"common.signOut":`Uitloggen`,"common.viewSite":`Site bekijken`,"common.copy":`Kopiëren`,"common.open":`Openen`,"common.failedToLoad":`Laden mislukt`,"common.signedIn":`Ingelogd`,"console.agent.title":`Volgende stap: agent verbinden`,"collection.filter.all":`Alles`,"nav.home":`Home`,"nav.content":`Content`,"nav.more":`Meer`,"nav.approvals":`Goedkeuringen`,"nav.settings":`Instellingen`,"status.draft":`Concepten`,"status.review":`In review`,"status.published":`Gepubliceerd`,"status.archived":`Gearchiveerd`,"preferences.heading":`Voorkeuren`,"preferences.language":`Beheertaal`,"preferences.language.search":`Talen zoeken...`,"preferences.language.noResults":`Geen talen gevonden.`,"preferences.direction":`Tekstrichting`,"preferences.direction.auto":`De tekstrichting volgt de gekozen taal.`,"preferences.appearance":`Weergave`,"preferences.light":`Licht`,"preferences.dark":`Donker`,"preferences.system":`Systeem`,"preferences.ltr":`Links naar rechts`,"preferences.rtl":`Rechts naar links`,"preferences.page.open":`Voorkeuren`,"preferences.page.title":`Persoonlijke voorkeuren`,"preferences.page.body":`Deze voorkeuren blijven in deze browser. Ze wijzigen alleen de adminconsole en niet de site-instellingen.`,"preferences.page.languageBody":`Kies de taal voor systeempagina's en de admininterface.`,"preferences.page.appearanceBody":`Kies licht, donker of volg het besturingssysteem.`},pl:{"auth.signIn.title":`Zaloguj się`,"common.signOut":`Wyloguj się`,"common.viewSite":`Zobacz stronę`,"common.copy":`Kopiuj`,"common.open":`Otwórz`,"common.failedToLoad":`Nie udało się załadować`,"common.signedIn":`Zalogowano`,"console.agent.title":`Dalej: połącz agenta`,"collection.filter.all":`Wszystkie`,"nav.home":`Start`,"nav.content":`Treści`,"nav.more":`Więcej`,"nav.approvals":`Zatwierdzenia`,"nav.settings":`Ustawienia`,"status.draft":`Szkice`,"status.review":`W recenzji`,"status.published":`Opublikowane`,"status.archived":`Zarchiwizowane`,"preferences.heading":`Preferencje`,"preferences.language":`Język panelu`,"preferences.language.search":`Szukaj języków...`,"preferences.language.noResults":`Nie znaleziono języków.`,"preferences.direction":`Kierunek tekstu`,"preferences.direction.auto":`Kierunek tekstu wynika z wybranego języka.`,"preferences.appearance":`Wygląd`,"preferences.light":`Jasny`,"preferences.dark":`Ciemny`,"preferences.system":`System`,"preferences.ltr":`Od lewej do prawej`,"preferences.rtl":`Od prawej do lewej`,"preferences.page.open":`Preferencje`,"preferences.page.title":`Preferencje osobiste`,"preferences.page.body":`Te preferencje są zapisane w tej przeglądarce. Zmieniają tylko konsolę administracyjną, nie ustawienia strony.`,"preferences.page.languageBody":`Wybierz język stron systemowych i interfejsu admina.`,"preferences.page.appearanceBody":`Wybierz jasny, ciemny lub zgodny z systemem.`},tr:{"auth.signIn.title":`Oturum aç`,"common.signOut":`Çıkış yap`,"common.viewSite":`Siteyi görüntüle`,"common.copy":`Kopyala`,"common.open":`Aç`,"common.failedToLoad":`Yüklenemedi`,"common.signedIn":`Oturum açık`,"console.agent.title":`Sonraki: agent bağla`,"collection.filter.all":`Tümü`,"nav.home":`Ana sayfa`,"nav.content":`İçerik`,"nav.more":`Daha fazla`,"nav.approvals":`Onaylar`,"nav.settings":`Ayarlar`,"status.draft":`Taslaklar`,"status.review":`İncelemede`,"status.published":`Yayında`,"status.archived":`Arşivlendi`,"preferences.heading":`Tercihler`,"preferences.language":`Yönetici dili`,"preferences.language.search":`Dil ara...`,"preferences.language.noResults":`Dil bulunamadı.`,"preferences.direction":`Metin yönü`,"preferences.direction.auto":`Metin yönü seçilen dili izler.`,"preferences.appearance":`Görünüm`,"preferences.light":`Açık`,"preferences.dark":`Koyu`,"preferences.system":`Sistem`,"preferences.ltr":`Soldan sağa`,"preferences.rtl":`Sağdan sola`,"preferences.page.open":`Tercihler`,"preferences.page.title":`Kişisel tercihler`,"preferences.page.body":`Bu tercihler bu tarayıcıda kalır. Yalnızca yönetim konsolunu değiştirir, site ayarlarını değiştirmez.`,"preferences.page.languageBody":`Sistem sayfaları ve yönetim arayüzü için dili seçin.`,"preferences.page.appearanceBody":`Açık, koyu veya işletim sistemini takip et seçeneğini seçin.`},vi:{"auth.signIn.title":`Đăng nhập`,"common.signOut":`Đăng xuất`,"common.viewSite":`Xem trang`,"common.copy":`Sao chép`,"common.open":`Mở`,"common.failedToLoad":`Tải thất bại`,"common.signedIn":`Đã đăng nhập`,"console.agent.title":`Tiếp theo: kết nối agent`,"collection.filter.all":`Tất cả`,"nav.home":`Trang chủ`,"nav.content":`Nội dung`,"nav.more":`Thêm`,"nav.approvals":`Phê duyệt`,"nav.settings":`Cài đặt`,"status.draft":`Bản nháp`,"status.review":`Đang duyệt`,"status.published":`Đã xuất bản`,"status.archived":`Đã lưu trữ`,"preferences.heading":`Tùy chọn`,"preferences.language":`Ngôn ngữ quản trị`,"preferences.language.search":`Tìm ngôn ngữ...`,"preferences.language.noResults":`Không tìm thấy ngôn ngữ.`,"preferences.direction":`Hướng văn bản`,"preferences.direction.auto":`Hướng văn bản theo ngôn ngữ đã chọn.`,"preferences.appearance":`Giao diện`,"preferences.light":`Sáng`,"preferences.dark":`Tối`,"preferences.system":`Hệ thống`,"preferences.ltr":`Trái sang phải`,"preferences.rtl":`Phải sang trái`,"preferences.page.open":`Tùy chọn`,"preferences.page.title":`Tùy chọn cá nhân`,"preferences.page.body":`Các tùy chọn này chỉ lưu trong trình duyệt này. Chúng chỉ thay đổi admin console và không sửa cài đặt trang.`,"preferences.page.languageBody":`Chọn ngôn ngữ cho trang hệ thống và giao diện quản trị.`,"preferences.page.appearanceBody":`Chọn sáng, tối hoặc theo hệ điều hành.`},cs:{"auth.signIn.title":`Přihlásit se`,"common.signOut":`Odhlásit se`,"common.viewSite":`Zobrazit web`,"common.copy":`Kopírovat`,"common.open":`Otevřít`,"common.failedToLoad":`Načtení selhalo`,"common.signedIn":`Přihlášeno`,"console.agent.title":`Další: připojit agenta`,"collection.filter.all":`Vše`,"nav.home":`Domů`,"nav.content":`Obsah`,"nav.more":`Více`,"nav.approvals":`Schválení`,"nav.settings":`Nastavení`,"status.draft":`Koncepty`,"status.review":`V kontrole`,"status.published":`Publikováno`,"status.archived":`Archivováno`,"preferences.heading":`Předvolby`,"preferences.language":`Jazyk administrace`,"preferences.language.search":`Hledat jazyky...`,"preferences.language.noResults":`Nenalezeny žádné jazyky.`,"preferences.direction":`Směr textu`,"preferences.direction.auto":`Směr textu se řídí vybraným jazykem.`,"preferences.appearance":`Vzhled`,"preferences.light":`Světlý`,"preferences.dark":`Tmavý`,"preferences.system":`Systém`,"preferences.ltr":`Zleva doprava`,"preferences.rtl":`Zprava doleva`,"preferences.page.open":`Předvolby`,"preferences.page.title":`Osobní předvolby`,"preferences.page.body":`Tyto předvolby zůstávají v tomto prohlížeči. Mění jen administrační konzoli, ne nastavení webu.`,"preferences.page.languageBody":`Vyberte jazyk systémových stránek a administračního rozhraní.`,"preferences.page.appearanceBody":`Vyberte světlý, tmavý nebo systémový režim.`},uk:{"auth.signIn.title":`Увійти`,"common.signOut":`Вийти`,"common.viewSite":`Переглянути сайт`,"common.copy":`Копіювати`,"common.open":`Відкрити`,"common.failedToLoad":`Не вдалося завантажити`,"common.signedIn":`Ви увійшли`,"console.agent.title":`Далі: підключіть агента`,"collection.filter.all":`Усі`,"nav.home":`Головна`,"nav.content":`Контент`,"nav.more":`Більше`,"nav.approvals":`Схвалення`,"nav.settings":`Налаштування`,"status.draft":`Чернетки`,"status.review":`На перевірці`,"status.published":`Опубліковано`,"status.archived":`Архівовано`,"preferences.heading":`Параметри`,"preferences.language":`Мова адмінки`,"preferences.language.search":`Пошук мов...`,"preferences.language.noResults":`Мови не знайдено.`,"preferences.direction":`Напрям тексту`,"preferences.direction.auto":`Напрям тексту відповідає вибраній мові.`,"preferences.appearance":`Вигляд`,"preferences.light":`Світла`,"preferences.dark":`Темна`,"preferences.system":`Система`,"preferences.ltr":`Зліва направо`,"preferences.rtl":`Справа наліво`,"preferences.page.open":`Параметри`,"preferences.page.title":`Особисті параметри`,"preferences.page.body":`Ці параметри зберігаються в цьому браузері. Вони змінюють лише адмін-консоль, а не налаштування сайту.`,"preferences.page.languageBody":`Виберіть мову системних сторінок та адмін-інтерфейсу.`,"preferences.page.appearanceBody":`Виберіть світлу, темну тему або тему системи.`},ar:{"auth.signIn.title":`تسجيل الدخول`,"common.signOut":`تسجيل الخروج`,"common.viewSite":`عرض الموقع`,"common.copy":`نسخ`,"common.open":`فتح`,"common.failedToLoad":`فشل التحميل`,"common.signedIn":`تم تسجيل الدخول`,"console.agent.title":`التالي: وصّل الوكيل`,"collection.filter.all":`الكل`,"nav.home":`الرئيسية`,"nav.content":`المحتوى`,"nav.more":`المزيد`,"nav.approvals":`الموافقات`,"nav.settings":`الإعدادات`,"status.draft":`مسودات`,"status.review":`قيد المراجعة`,"status.published":`منشور`,"status.archived":`مؤرشف`,"preferences.heading":`التفضيلات`,"preferences.language":`لغة الإدارة`,"preferences.language.search":`ابحث عن اللغات...`,"preferences.language.noResults":`لم يتم العثور على لغات.`,"preferences.direction":`اتجاه النص`,"preferences.direction.auto":`يتبع اتجاه النص اللغة المحددة.`,"preferences.appearance":`المظهر`,"preferences.light":`فاتح`,"preferences.dark":`داكن`,"preferences.system":`النظام`,"preferences.ltr":`من اليسار إلى اليمين`,"preferences.rtl":`من اليمين إلى اليسار`,"preferences.page.open":`التفضيلات`,"preferences.page.title":`التفضيلات الشخصية`,"preferences.page.body":`تبقى هذه التفضيلات في هذا المتصفح. إنها تغيّر وحدة الإدارة فقط ولا تعدّل إعدادات الموقع.`,"preferences.page.languageBody":`اختر لغة صفحات النظام وواجهة الإدارة.`,"preferences.page.appearanceBody":`اختر الوضع الفاتح أو الداكن أو اتبع نظام التشغيل.`},he:{"auth.signIn.title":`כניסה`,"common.signOut":`יציאה`,"common.viewSite":`הצג אתר`,"common.copy":`העתק`,"common.open":`פתח`,"common.failedToLoad":`הטעינה נכשלה`,"common.signedIn":`מחובר`,"console.agent.title":`הבא: חבר agent`,"collection.filter.all":`הכול`,"nav.home":`בית`,"nav.content":`תוכן`,"nav.more":`עוד`,"nav.approvals":`אישורים`,"nav.settings":`הגדרות`,"status.draft":`טיוטות`,"status.review":`בבדיקה`,"status.published":`פורסם`,"status.archived":`בארכיון`,"preferences.heading":`העדפות`,"preferences.language":`שפת ניהול`,"preferences.language.search":`חפש שפות...`,"preferences.language.noResults":`לא נמצאו שפות.`,"preferences.direction":`כיוון טקסט`,"preferences.direction.auto":`כיוון הטקסט נקבע לפי השפה שנבחרה.`,"preferences.appearance":`מראה`,"preferences.light":`בהיר`,"preferences.dark":`כהה`,"preferences.system":`מערכת`,"preferences.ltr":`משמאל לימין`,"preferences.rtl":`מימין לשמאל`,"preferences.page.open":`העדפות`,"preferences.page.title":`העדפות אישיות`,"preferences.page.body":`העדפות אלה נשמרות בדפדפן הזה. הן משנות רק את מסוף הניהול ולא את הגדרות האתר.`,"preferences.page.languageBody":`בחר את שפת דפי המערכת וממשק הניהול.`,"preferences.page.appearanceBody":`בחר בהיר, כהה או לפי מערכת ההפעלה.`},fa:{"auth.signIn.title":`ورود`,"common.signOut":`خروج`,"common.viewSite":`مشاهده سایت`,"common.copy":`کپی`,"common.open":`باز کردن`,"common.failedToLoad":`بارگذاری ناموفق بود`,"common.signedIn":`وارد شده‌اید`,"console.agent.title":`بعدی: اتصال agent`,"collection.filter.all":`همه`,"nav.home":`خانه`,"nav.content":`محتوا`,"nav.more":`بیشتر`,"nav.approvals":`تأییدها`,"nav.settings":`تنظیمات`,"status.draft":`پیش‌نویس‌ها`,"status.review":`در بازبینی`,"status.published":`منتشر شده`,"status.archived":`بایگانی شده`,"preferences.heading":`ترجیحات`,"preferences.language":`زبان مدیریت`,"preferences.language.search":`جستجوی زبان‌ها...`,"preferences.language.noResults":`زبانی پیدا نشد.`,"preferences.direction":`جهت متن`,"preferences.direction.auto":`جهت متن از زبان انتخاب‌شده پیروی می‌کند.`,"preferences.appearance":`ظاهر`,"preferences.light":`روشن`,"preferences.dark":`تیره`,"preferences.system":`سیستم`,"preferences.ltr":`چپ به راست`,"preferences.rtl":`راست به چپ`,"preferences.page.open":`ترجیحات`,"preferences.page.title":`ترجیحات شخصی`,"preferences.page.body":`این ترجیحات در همین مرورگر ذخیره می‌شود. فقط کنسول مدیریت را تغییر می‌دهد و تنظیمات سایت را تغییر نمی‌دهد.`,"preferences.page.languageBody":`زبان صفحات سیستمی و رابط مدیریت را انتخاب کنید.`,"preferences.page.appearanceBody":`روشن، تیره یا پیروی از سیستم‌عامل را انتخاب کنید.`},th:{"auth.signIn.title":`เข้าสู่ระบบ`,"common.signOut":`ออกจากระบบ`,"common.viewSite":`ดูเว็บไซต์`,"common.copy":`คัดลอก`,"common.open":`เปิด`,"common.failedToLoad":`โหลดไม่สำเร็จ`,"common.signedIn":`เข้าสู่ระบบแล้ว`,"console.agent.title":`ถัดไป: เชื่อมต่อ agent`,"collection.filter.all":`ทั้งหมด`,"nav.home":`หน้าแรก`,"nav.content":`เนื้อหา`,"nav.more":`เพิ่มเติม`,"nav.approvals":`การอนุมัติ`,"nav.settings":`การตั้งค่า`,"status.draft":`ฉบับร่าง`,"status.review":`กำลังตรวจสอบ`,"status.published":`เผยแพร่แล้ว`,"status.archived":`เก็บถาวร`,"preferences.heading":`ค่ากำหนด`,"preferences.language":`ภาษาผู้ดูแล`,"preferences.language.search":`ค้นหาภาษา...`,"preferences.language.noResults":`ไม่พบภาษา`,"preferences.direction":`ทิศทางข้อความ`,"preferences.direction.auto":`ทิศทางข้อความจะตามภาษาที่เลือก`,"preferences.appearance":`รูปลักษณ์`,"preferences.light":`สว่าง`,"preferences.dark":`มืด`,"preferences.system":`ระบบ`,"preferences.ltr":`ซ้ายไปขวา`,"preferences.rtl":`ขวาไปซ้าย`,"preferences.page.open":`ค่ากำหนด`,"preferences.page.title":`ค่ากำหนดส่วนตัว`,"preferences.page.body":`ค่ากำหนดเหล่านี้จะอยู่ในเบราว์เซอร์นี้เท่านั้น และมีผลกับ admin console โดยไม่แก้การตั้งค่าเว็บไซต์`,"preferences.page.languageBody":`เลือกภาษาสำหรับหน้าระบบและส่วนติดต่อผู้ดูแล`,"preferences.page.appearanceBody":`เลือกสว่าง มืด หรือใช้ตามระบบปฏิบัติการ`},id:{"auth.signIn.title":`Masuk`,"common.signOut":`Keluar`,"common.viewSite":`Lihat situs`,"common.copy":`Salin`,"common.open":`Buka`,"common.failedToLoad":`Gagal memuat`,"common.signedIn":`Sudah masuk`,"console.agent.title":`Berikutnya: hubungkan agent`,"collection.filter.all":`Semua`,"nav.home":`Beranda`,"nav.content":`Konten`,"nav.more":`Lainnya`,"nav.approvals":`Persetujuan`,"nav.settings":`Pengaturan`,"status.draft":`Draf`,"status.review":`Dalam ulasan`,"status.published":`Terbit`,"status.archived":`Arsip`,"preferences.heading":`Preferensi`,"preferences.language":`Bahasa admin`,"preferences.language.search":`Cari bahasa...`,"preferences.language.noResults":`Bahasa tidak ditemukan.`,"preferences.direction":`Arah teks`,"preferences.direction.auto":`Arah teks mengikuti bahasa yang dipilih.`,"preferences.appearance":`Tampilan`,"preferences.light":`Terang`,"preferences.dark":`Gelap`,"preferences.system":`Sistem`,"preferences.ltr":`Kiri ke kanan`,"preferences.rtl":`Kanan ke kiri`,"preferences.page.open":`Preferensi`,"preferences.page.title":`Preferensi pribadi`,"preferences.page.body":`Preferensi ini tetap di browser ini. Preferensi hanya mengubah konsol admin dan tidak mengubah pengaturan situs.`,"preferences.page.languageBody":`Pilih bahasa untuk halaman sistem dan antarmuka admin.`,"preferences.page.appearanceBody":`Pilih terang, gelap, atau ikuti sistem operasi.`}};function K(e,t,n={}){let r=ll[e]?.[t]??ll.en[t];for(let[e,t]of Object.entries(n))r=r.split(`{${e}}`).join(t);return r}function ul({brand:e}){let{setOpenMobile:t}=uc(),{language:n}=G();return(0,N.jsx)(bc,{children:(0,N.jsx)(xc,{children:(0,N.jsx)(Cc,{asChild:!0,size:`lg`,className:`data-[slot=sidebar-menu-button]:!p-1.5`,children:(0,N.jsxs)(`a`,{href:e.href??`/admin`,onClick:()=>t(!1),children:[(0,N.jsx)(`span`,{className:`text-primary flex aspect-square size-8 items-center justify-center`,children:(0,N.jsx)(sl,{className:`size-5`})}),(0,N.jsx)(`div`,{"data-sidebar-label":!0,className:`grid flex-1 text-start text-sm leading-tight`,children:(0,N.jsx)(`span`,{className:`truncate font-semibold`,children:K(n,`admin.consoleTitle`)})})]})})})})}var dl=`Collapsible`,[fl,pl]=Bi(dl),[ml,hl]=fl(dl),gl=M.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=qi({prop:r,defaultProp:i??!1,onChange:o,caller:dl});return(0,N.jsx)(ml,{scope:n,disabled:a,contentId:Gi(),open:c,onOpenToggle:M.useCallback(()=>l(e=>!e),[l]),children:(0,N.jsx)(ra.div,{"data-state":Sl(c),"data-disabled":a?``:void 0,...s,ref:t})})});gl.displayName=dl;var _l=`CollapsibleTrigger`,vl=M.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=hl(_l,n);return(0,N.jsx)(ra.button,{type:`button`,"aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Sl(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:H(e.onClick,i.onOpenToggle)})});vl.displayName=_l;var yl=`CollapsibleContent`,bl=M.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=hl(yl,e.__scopeCollapsible);return(0,N.jsx)(za,{present:n||i.open,children:({present:e})=>(0,N.jsx)(xl,{...r,ref:t,present:e})})});bl.displayName=yl;var xl=M.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=hl(yl,n),[s,c]=M.useState(r),l=M.useRef(null),u=nr(t,l),d=M.useRef(0),f=d.current,p=M.useRef(0),m=p.current,h=o.open||s,g=M.useRef(h),_=M.useRef(void 0);return M.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),Hi(()=>{let e=l.current;if(e){_.current=_.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=_.current.transitionDuration,e.style.animationName=_.current.animationName),c(r)}},[o.open,r]),(0,N.jsx)(ra.div,{"data-state":Sl(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function Sl(e){return e?`open`:`closed`}var Cl=gl,wl=vl,Tl=bl;function El(e){let t=e+`CollectionProvider`,[n,r]=Bi(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=M.useRef(null),a=M.useRef(new Map).current;return(0,N.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Zi(s),l=M.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,N.jsx)(c,{ref:nr(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Zi(u),p=M.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=M.useRef(null),s=nr(t,o),c=a(u,n);return M.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,N.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return M.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var Dl=M.createContext(void 0);function Ol(e){let t=M.useContext(Dl);return e||t||`ltr`}var kl=[`top`,`right`,`bottom`,`left`],Al=Math.min,jl=Math.max,Ml=Math.round,Nl=Math.floor,Pl=e=>({x:e,y:e}),Fl={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Il(e,t,n){return jl(e,Al(t,n))}function Ll(e,t){return typeof e==`function`?e(t):e}function q(e){return e.split(`-`)[0]}function J(e){return e.split(`-`)[1]}function Y(e){return e===`x`?`y`:`x`}function X(e){return e===`y`?`height`:`width`}function Z(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Rl(e){return Y(Z(e))}function zl(e,t,n){n===void 0&&(n=!1);let r=J(e),i=Rl(e),a=X(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Jl(o)),[o,Jl(o)]}function Bl(e){let t=Jl(e);return[Vl(e),t,Vl(t)]}function Vl(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Hl=[`left`,`right`],Ul=[`right`,`left`],Wl=[`top`,`bottom`],Gl=[`bottom`,`top`];function Kl(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Ul:Hl:t?Hl:Ul;case`left`:case`right`:return t?Wl:Gl;default:return[]}}function ql(e,t,n,r){let i=J(e),a=Kl(q(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Vl)))),a}function Jl(e){let t=q(e);return Fl[t]+e.slice(t.length)}function Yl(e){return{top:0,right:0,bottom:0,left:0,...e}}function Xl(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Yl(e)}function Zl(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Ql(e,t,n){let{reference:r,floating:i}=e,a=Z(t),o=Rl(t),s=X(o),c=q(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(J(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function $l(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Ll(t,e),p=Xl(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Zl(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Zl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var eu=50,tu=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:$l},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ql(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<eu&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Ql(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},nu=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Ll(e,t)||{};if(l==null)return{};let d=Xl(u),f={x:n,y:r},p=Rl(i),m=X(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,ee=Al(d[_],T),te=Al(d[v],T),E=ee,ne=C-h[m]-te,re=C/2-h[m]/2+w,ie=Il(E,re,ne),D=!c.arrow&&J(i)!=null&&re!==ie&&a.reference[m]/2-(re<E?ee:te)-h[m]/2<0,ae=D?re<E?re-E:re-ne:0;return{[p]:f[p]+ae,data:{[p]:ie,centerOffset:re-ie-ae,...D&&{alignmentOffset:ae}},reset:D}}}),ru=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Ll(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=q(r),_=Z(o),v=q(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Jl(o)]:Bl(o)),x=p!==`none`;!d&&x&&b.push(...ql(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=zl(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==Z(t))||T.every(e=>Z(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Z(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function iu(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function au(e){return kl.some(t=>e[t]>=0)}var ou=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Ll(e,t);switch(i){case`referenceHidden`:{let e=iu(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:au(e)}}}case`escaped`:{let e=iu(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:au(e)}}}default:return{}}}}},su=new Set([`left`,`top`]);async function cu(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=q(n),s=J(n),c=Z(n)===`y`,l=su.has(o)?-1:1,u=a&&c?-1:1,d=Ll(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var lu=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await cu(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},uu=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Ll(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Z(q(i)),p=Y(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Il(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Il(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},du=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Ll(e,t),u={x:n,y:r},d=Z(i),f=Y(d),p=u[f],m=u[d],h=Ll(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=su.has(q(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},fu=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Ll(e,t),u=await o.detectOverflow(t,l),d=q(i),f=J(i),p=Z(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Al(h-u[g],v),x=Al(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=jl(u.left,0),t=jl(u.right,0),n=jl(u.top,0),r=jl(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:jl(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:jl(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function pu(){return typeof window<`u`}function mu(e){return _u(e)?(e.nodeName||``).toLowerCase():`#document`}function hu(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gu(e){return((_u(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function _u(e){return pu()?e instanceof Node||e instanceof hu(e).Node:!1}function vu(e){return pu()?e instanceof Element||e instanceof hu(e).Element:!1}function yu(e){return pu()?e instanceof HTMLElement||e instanceof hu(e).HTMLElement:!1}function bu(e){return!pu()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof hu(e).ShadowRoot}function xu(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Mu(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Su(e){return/^(table|td|th)$/.test(mu(e))}function Cu(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var wu=/transform|translate|scale|rotate|perspective|filter/,Tu=/paint|layout|strict|content/,Eu=e=>!!e&&e!==`none`,Du;function Ou(e){let t=vu(e)?Mu(e):e;return Eu(t.transform)||Eu(t.translate)||Eu(t.scale)||Eu(t.rotate)||Eu(t.perspective)||!Au()&&(Eu(t.backdropFilter)||Eu(t.filter))||wu.test(t.willChange||``)||Tu.test(t.contain||``)}function ku(e){let t=Pu(e);for(;yu(t)&&!ju(t);){if(Ou(t))return t;if(Cu(t))return null;t=Pu(t)}return null}function Au(){return Du??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Du}function ju(e){return/^(html|body|#document)$/.test(mu(e))}function Mu(e){return hu(e).getComputedStyle(e)}function Nu(e){return vu(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pu(e){if(mu(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||bu(e)&&e.host||gu(e);return bu(t)?t.host:t}function Fu(e){let t=Pu(e);return ju(t)?e.ownerDocument?e.ownerDocument.body:e.body:yu(t)&&xu(t)?t:Fu(t)}function Iu(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Fu(e),i=r===e.ownerDocument?.body,a=hu(r);if(i){let e=Lu(a);return t.concat(a,a.visualViewport||[],xu(r)?r:[],e&&n?Iu(e):[])}else return t.concat(r,Iu(r,[],n))}function Lu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ru(e){let t=Mu(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=yu(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Ml(n)!==a||Ml(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function zu(e){return vu(e)?e:e.contextElement}function Bu(e){let t=zu(e);if(!yu(t))return Pl(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Ru(t),o=(a?Ml(n.width):n.width)/r,s=(a?Ml(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Vu=Pl(0);function Hu(e){let t=hu(e);return!Au()||!t.visualViewport?Vu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Uu(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==hu(e)?!1:t}function Q(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=zu(e),o=Pl(1);t&&(r?vu(r)&&(o=Bu(r)):o=Bu(e));let s=Uu(a,n,r)?Hu(a):Pl(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=hu(a),t=r&&vu(r)?hu(r):r,n=e,i=Lu(n);for(;i&&r&&t!==n;){let e=Bu(i),t=i.getBoundingClientRect(),r=Mu(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=hu(i),i=Lu(n)}}return Zl({width:u,height:d,x:c,y:l})}function Wu(e,t){let n=Nu(e).scrollLeft;return t?t.left+n:Q(gu(e)).left+n}function Gu(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Wu(e,n),y:n.top+t.scrollTop}}function Ku(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=gu(r),s=t?Cu(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Pl(1),u=Pl(0),d=yu(r);if((d||!d&&!a)&&((mu(r)!==`body`||xu(o))&&(c=Nu(r)),d)){let e=Q(r);l=Bu(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Gu(o,c):Pl(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function qu(e){return Array.from(e.getClientRects())}function Ju(e){let t=gu(e),n=Nu(e),r=e.ownerDocument.body,i=jl(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=jl(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Wu(e),s=-n.scrollTop;return Mu(r).direction===`rtl`&&(o+=jl(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Yu=25;function Xu(e,t){let n=hu(e),r=gu(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Au();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Wu(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Yu&&(a-=o)}else l<=Yu&&(a+=l);return{width:a,height:o,x:s,y:c}}function Zu(e,t){let n=Q(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=yu(e)?Bu(e):Pl(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Qu(e,t,n){let r;if(t===`viewport`)r=Xu(e,n);else if(t===`document`)r=Ju(gu(e));else if(vu(t))r=Zu(t,n);else{let n=Hu(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Zl(r)}function $u(e,t){let n=Pu(e);return n===t||!vu(n)||ju(n)?!1:Mu(n).position===`fixed`||$u(n,t)}function ed(e,t){let n=t.get(e);if(n)return n;let r=Iu(e,[],!1).filter(e=>vu(e)&&mu(e)!==`body`),i=null,a=Mu(e).position===`fixed`,o=a?Pu(e):e;for(;vu(o)&&!ju(o);){let t=Mu(o),n=Ou(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||xu(o)&&!n&&$u(e,o))?r=r.filter(e=>e!==o):i=t,o=Pu(o)}return t.set(e,r),r}function td(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Cu(t)?[]:ed(t,this._c):[].concat(n),r],o=Qu(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Qu(t,a[e],i);s=jl(n.top,s),c=Al(n.right,c),l=Al(n.bottom,l),u=jl(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function nd(e){let{width:t,height:n}=Ru(e);return{width:t,height:n}}function rd(e,t,n){let r=yu(t),i=gu(t),a=n===`fixed`,o=Q(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Pl(0);function l(){c.x=Wu(i)}if(r||!r&&!a)if((mu(t)!==`body`||xu(i))&&(s=Nu(t)),r){let e=Q(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Gu(i,s):Pl(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function id(e){return Mu(e).position===`static`}function ad(e,t){if(!yu(e)||Mu(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return gu(e)===n&&(n=n.ownerDocument.body),n}function od(e,t){let n=hu(e);if(Cu(e))return n;if(!yu(e)){let t=Pu(e);for(;t&&!ju(t);){if(vu(t)&&!id(t))return t;t=Pu(t)}return n}let r=ad(e,t);for(;r&&Su(r)&&id(r);)r=ad(r,t);return r&&ju(r)&&id(r)&&!Ou(r)?n:r||ku(e)||n}var sd=async function(e){let t=this.getOffsetParent||od,n=this.getDimensions,r=await n(e.floating);return{reference:rd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function cd(e){return Mu(e).direction===`rtl`}var ld={convertOffsetParentRelativeRectToViewportRelativeRect:Ku,getDocumentElement:gu,getClippingRect:td,getOffsetParent:od,getElementRects:sd,getClientRects:qu,getDimensions:nd,getScale:Bu,isElement:vu,isRTL:cd};function ud(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function dd(e,t){let n=null,r,i=gu(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Nl(d),h=Nl(i.clientWidth-(u+f)),g=Nl(i.clientHeight-(d+p)),_=Nl(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:jl(0,Al(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!ud(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function fd(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=zu(e),u=i||a?[...l?Iu(l):[],...t?Iu(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?dd(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Q(e):null;c&&g();function g(){let t=Q(e);h&&!ud(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var pd=lu,md=uu,hd=ru,gd=fu,_d=ou,vd=nu,$=du,yd=(e,t,n)=>{let r=new Map,i={platform:ld,...n},a={...i.platform,_c:r};return tu(e,t,{...i,platform:a})},bd=typeof document<`u`?M.useLayoutEffect:function(){};function xd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!xd(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!xd(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Sd(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Cd(e,t){let n=Sd(e);return Math.round(t*n)/n}function wd(e){let t=M.useRef(e);return bd(()=>{t.current=e}),t}function Td(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=M.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=M.useState(r);xd(f,r)||p(r);let[m,h]=M.useState(null),[g,_]=M.useState(null),v=M.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=M.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=M.useRef(null),C=M.useRef(null),w=M.useRef(u),T=c!=null,ee=wd(c),te=wd(i),E=wd(l),ne=M.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};te.current&&(e.platform=te.current),yd(S.current,C.current,e).then(e=>{let t={...e,isPositioned:E.current!==!1};re.current&&!xd(w.current,t)&&(w.current=t,Xi.flushSync(()=>{d(t)}))})},[f,t,n,te,E]);bd(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let re=M.useRef(!1);bd(()=>(re.current=!0,()=>{re.current=!1}),[]),bd(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(ee.current)return ee.current(b,x,ne);ne()}},[b,x,ne,ee,T]);let ie=M.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),D=M.useMemo(()=>({reference:b,floating:x}),[b,x]),ae=M.useMemo(()=>{let e={position:n,left:0,top:0};if(!D.floating)return e;let t=Cd(D.floating,u.x),r=Cd(D.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Sd(D.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,D.floating,u.x,u.y]);return M.useMemo(()=>({...u,update:ne,refs:ie,elements:D,floatingStyles:ae}),[u,ne,ie,D,ae])}var Ed=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:vd({element:r.current,padding:i}).fn(n):r?vd({element:r,padding:i}).fn(n):{}}}},Dd=(e,t)=>{let n=pd(e);return{name:n.name,fn:n.fn,options:[e,t]}},Od=(e,t)=>{let n=md(e);return{name:n.name,fn:n.fn,options:[e,t]}},kd=(e,t)=>({fn:$(e).fn,options:[e,t]}),Ad=(e,t)=>{let n=hd(e);return{name:n.name,fn:n.fn,options:[e,t]}},jd=(e,t)=>{let n=gd(e);return{name:n.name,fn:n.fn,options:[e,t]}},Md=(e,t)=>{let n=_d(e);return{name:n.name,fn:n.fn,options:[e,t]}},Nd=(e,t)=>{let n=Ed(e);return{name:n.name,fn:n.fn,options:[e,t]}},Pd=`Arrow`,Fd=M.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,N.jsx)(ra.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,N.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Fd.displayName=Pd;var Id=Fd;function Ld(e){let[t,n]=M.useState(void 0);return Hi(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Rd=`Popper`,[zd,Bd]=Bi(Rd),[Vd,Hd]=zd(Rd),Ud=e=>{let{__scopePopper:t,children:n}=e,[r,i]=M.useState(null);return(0,N.jsx)(Vd,{scope:t,anchor:r,onAnchorChange:i,children:n})};Ud.displayName=Rd;var Wd=`PopperAnchor`,Gd=M.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Hd(Wd,n),o=M.useRef(null),s=nr(t,o),c=M.useRef(null);return M.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,N.jsx)(ra.div,{...i,ref:s})});Gd.displayName=Wd;var Kd=`PopperContent`,[qd,Jd]=zd(Kd),Yd=M.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=Hd(Kd,n),[_,v]=M.useState(null),y=nr(t,e=>v(e)),[b,x]=M.useState(null),S=Ld(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),ee=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},te=Array.isArray(l)?l:[l],E=te.length>0,ne={padding:ee,boundary:te.filter($d),altBoundary:E},{refs:re,floatingStyles:ie,placement:D,isPositioned:ae,middlewareData:oe}=Td({strategy:`fixed`,placement:T,whileElementsMounted:(...e)=>fd(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[Dd({mainAxis:i+w,alignmentAxis:o}),c&&Od({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?kd():void 0,...ne}),c&&Ad({...ne}),jd({...ne,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&Nd({element:b,padding:s}),ef({arrowWidth:C,arrowHeight:w}),f&&Md({strategy:`referenceHidden`,...ne})]}),[se,O]=tf(D),k=aa(m);Hi(()=>{ae&&k?.()},[ae,k]);let ce=oe.arrow?.x,le=oe.arrow?.y,ue=oe.arrow?.centerOffset!==0,[de,A]=M.useState();return Hi(()=>{_&&A(window.getComputedStyle(_).zIndex)},[_]),(0,N.jsx)(`div`,{ref:re.setFloating,"data-radix-popper-content-wrapper":``,style:{...ie,transform:ae?ie.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:de,"--radix-popper-transform-origin":[oe.transformOrigin?.x,oe.transformOrigin?.y].join(` `),...oe.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,N.jsx)(qd,{scope:n,placedSide:se,onArrowChange:x,arrowX:ce,arrowY:le,shouldHideArrow:ue,children:(0,N.jsx)(ra.div,{"data-side":se,"data-align":O,...h,ref:y,style:{...h.style,animation:ae?void 0:`none`}})})})});Yd.displayName=Kd;var Xd=`PopperArrow`,Zd={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Qd=M.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Jd(Xd,n),a=Zd[i.placedSide];return(0,N.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]: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:(0,N.jsx)(Id,{...r,ref:t,style:{...r.style,display:`block`}})})});Qd.displayName=Xd;function $d(e){return e!==null}var ef=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=tf(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function tf(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var nf=Ud,rf=Gd,af=Yd,of=Qd,sf=`rovingFocusGroup.onEntryFocus`,cf={bubbles:!1,cancelable:!0},lf=`RovingFocusGroup`,[uf,df,ff]=El(lf),[pf,mf]=Bi(lf,[ff]),[hf,gf]=pf(lf),_f=M.forwardRef((e,t)=>(0,N.jsx)(uf.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,N.jsx)(uf.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,N.jsx)(vf,{...e,ref:t})})}));_f.displayName=lf;var vf=M.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=M.useRef(null),p=nr(t,f),m=Ol(a),[h,g]=qi({prop:o,defaultProp:s??null,onChange:c,caller:lf}),[_,v]=M.useState(!1),y=aa(l),b=df(n),x=M.useRef(!1),[S,C]=M.useState(0);return M.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(sf,y),()=>e.removeEventListener(sf,y)},[y]),(0,N.jsx)(hf,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:M.useCallback(e=>g(e),[g]),onItemShiftTab:M.useCallback(()=>v(!0),[]),onFocusableItemAdd:M.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:M.useCallback(()=>C(e=>e-1),[]),children:(0,N.jsx)(ra.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:H(e.onMouseDown,()=>{x.current=!0}),onFocus:H(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(sf,cf);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);wf([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:H(e.onBlur,()=>v(!1))})})}),yf=`RovingFocusGroupItem`,bf=M.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Gi(),l=a||c,u=gf(yf,n),d=u.currentTabStopId===l,f=df(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return M.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,N.jsx)(uf.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,N.jsx)(ra.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:H(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:H(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:H(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Cf(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?Tf(n,r+1):n.slice(r+1)}setTimeout(()=>wf(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});bf.displayName=yf;var xf={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Sf(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Cf(e,t,n){let r=Sf(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return xf[r]}function wf(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Tf(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ef=_f,Df=bf,Of=[`Enter`,` `],kf=[`ArrowDown`,`PageUp`,`Home`],Af=[`ArrowUp`,`PageDown`,`End`],jf=[...kf,...Af],Mf={ltr:[...Of,`ArrowRight`],rtl:[...Of,`ArrowLeft`]},Nf={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},Pf=`Menu`,[Ff,If,Lf]=El(Pf),[Rf,zf]=Bi(Pf,[Lf,Bd,mf]),Bf=Bd(),Vf=mf(),[Hf,Uf]=Rf(Pf),[Wf,Gf]=Rf(Pf),Kf=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Bf(t),[c,l]=M.useState(null),u=M.useRef(!1),d=aa(a),f=Ol(i);return M.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,N.jsx)(nf,{...s,children:(0,N.jsx)(Hf,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,N.jsx)(Wf,{scope:t,onClose:M.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};Kf.displayName=Pf;var qf=`MenuAnchor`,Jf=M.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Bf(n);return(0,N.jsx)(rf,{...i,...r,ref:t})});Jf.displayName=qf;var Yf=`MenuPortal`,[Xf,Zf]=Rf(Yf,{forceMount:void 0}),Qf=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Uf(Yf,t);return(0,N.jsx)(Xf,{scope:t,forceMount:n,children:(0,N.jsx)(za,{present:n||a.open,children:(0,N.jsx)(La,{asChild:!0,container:i,children:r})})})};Qf.displayName=Yf;var $f=`MenuContent`,[ep,tp]=Rf($f),np=M.forwardRef((e,t)=>{let n=Zf($f,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Uf($f,e.__scopeMenu),o=Gf($f,e.__scopeMenu);return(0,N.jsx)(Ff.Provider,{scope:e.__scopeMenu,children:(0,N.jsx)(za,{present:r||a.open,children:(0,N.jsx)(Ff.Slot,{scope:e.__scopeMenu,children:o.modal?(0,N.jsx)(rp,{...i,ref:t}):(0,N.jsx)(ip,{...i,ref:t})})})})}),rp=M.forwardRef((e,t)=>{let n=Uf($f,e.__scopeMenu),r=M.useRef(null),i=nr(t,r);return M.useEffect(()=>{let e=r.current;if(e)return cs(e)},[]),(0,N.jsx)(op,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:H(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),ip=M.forwardRef((e,t)=>{let n=Uf($f,e.__scopeMenu);return(0,N.jsx)(op,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ap=Zi(`MenuContent.ScrollLock`),op=M.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=Uf($f,n),_=Gf($f,n),v=Bf(n),y=Vf(n),b=If(n),[x,S]=M.useState(null),C=M.useRef(null),w=nr(t,C,g.onContentChange),T=M.useRef(0),ee=M.useRef(``),te=M.useRef(0),E=M.useRef(null),ne=M.useRef(`right`),re=M.useRef(0),ie=m?$o:M.Fragment,D=m?{as:ap,allowPinchZoom:!0}:void 0,ae=e=>{let t=ee.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=Wp(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){ee.current=t,window.clearTimeout(T.current),t!==``&&(T.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};M.useEffect(()=>()=>window.clearTimeout(T.current),[]),Wa();let oe=M.useCallback(e=>ne.current===E.current?.side&&Kp(e,E.current?.area),[]);return(0,N.jsx)(ep,{scope:n,searchRef:ee,onItemEnter:M.useCallback(e=>{oe(e)&&e.preventDefault()},[oe]),onItemLeave:M.useCallback(e=>{oe(e)||(C.current?.focus(),S(null))},[oe]),onTriggerLeave:M.useCallback(e=>{oe(e)&&e.preventDefault()},[oe]),pointerGraceTimerRef:te,onPointerGraceIntentChange:M.useCallback(e=>{E.current=e},[]),children:(0,N.jsx)(ie,{...D,children:(0,N.jsx)(wa,{asChild:!0,trapped:i,onMountAutoFocus:H(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,N.jsx)(pa,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,N.jsx)(Ef,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:H(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,N.jsx)(af,{role:`menu`,"aria-orientation":`vertical`,"data-state":zp(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:w,style:{outline:`none`,...h.style},onKeyDown:H(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&ae(e.key));let i=C.current;if(e.target!==i||!jf.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);Af.includes(e.key)&&a.reverse(),Hp(a)}),onBlur:H(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(T.current),ee.current=``)}),onPointerMove:H(e.onPointerMove,qp(e=>{let t=e.target,n=re.current!==e.clientX;e.currentTarget.contains(t)&&n&&(ne.current=e.clientX>re.current?`right`:`left`,re.current=e.clientX)}))})})})})})})});np.displayName=$f;var sp=`MenuGroup`,cp=M.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,N.jsx)(ra.div,{role:`group`,...r,ref:t})});cp.displayName=sp;var lp=`MenuLabel`,up=M.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,N.jsx)(ra.div,{...r,ref:t})});up.displayName=lp;var dp=`MenuItem`,fp=`menu.itemSelect`,pp=M.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=M.useRef(null),o=Gf(dp,e.__scopeMenu),s=tp(dp,e.__scopeMenu),c=nr(t,a),l=M.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(fp,{bubbles:!0,cancelable:!0});e.addEventListener(fp,e=>r?.(e),{once:!0}),ia(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,N.jsx)(mp,{...i,ref:c,disabled:n,onClick:H(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:H(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:H(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||Of.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});pp.displayName=dp;var mp=M.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=tp(dp,n),s=Vf(n),c=M.useRef(null),l=nr(t,c),[u,d]=M.useState(!1),[f,p]=M.useState(``);return M.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,N.jsx)(Ff.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,N.jsx)(Df,{asChild:!0,...s,focusable:!r,children:(0,N.jsx)(ra.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:H(e.onPointerMove,qp(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:H(e.onPointerLeave,qp(e=>o.onItemLeave(e))),onFocus:H(e.onFocus,()=>d(!0)),onBlur:H(e.onBlur,()=>d(!1))})})})}),hp=`MenuCheckboxItem`,gp=M.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,N.jsx)(wp,{scope:e.__scopeMenu,checked:n,children:(0,N.jsx)(pp,{role:`menuitemcheckbox`,"aria-checked":Bp(n)?`mixed`:n,...i,ref:t,"data-state":Vp(n),onSelect:H(i.onSelect,()=>r?.(Bp(n)?!0:!n),{checkForDefaultPrevented:!1})})})});gp.displayName=hp;var _p=`MenuRadioGroup`,[vp,yp]=Rf(_p,{value:void 0,onValueChange:()=>{}}),bp=M.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=aa(r);return(0,N.jsx)(vp,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,N.jsx)(cp,{...i,ref:t})})});bp.displayName=_p;var xp=`MenuRadioItem`,Sp=M.forwardRef((e,t)=>{let{value:n,...r}=e,i=yp(xp,e.__scopeMenu),a=n===i.value;return(0,N.jsx)(wp,{scope:e.__scopeMenu,checked:a,children:(0,N.jsx)(pp,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Vp(a),onSelect:H(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Sp.displayName=xp;var Cp=`MenuItemIndicator`,[wp,Tp]=Rf(Cp,{checked:!1}),Ep=M.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=Tp(Cp,n);return(0,N.jsx)(za,{present:r||Bp(a.checked)||a.checked===!0,children:(0,N.jsx)(ra.span,{...i,ref:t,"data-state":Vp(a.checked)})})});Ep.displayName=Cp;var Dp=`MenuSeparator`,Op=M.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,N.jsx)(ra.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});Op.displayName=Dp;var kp=`MenuArrow`,Ap=M.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Bf(n);return(0,N.jsx)(of,{...i,...r,ref:t})});Ap.displayName=kp;var jp=`MenuSub`,[Mp,Np]=Rf(jp),Pp=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=Uf(jp,t),o=Bf(t),[s,c]=M.useState(null),[l,u]=M.useState(null),d=aa(i);return M.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,N.jsx)(nf,{...o,children:(0,N.jsx)(Hf,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,N.jsx)(Mp,{scope:t,contentId:Gi(),triggerId:Gi(),trigger:s,onTriggerChange:c,children:n})})})};Pp.displayName=jp;var Fp=`MenuSubTrigger`,Ip=M.forwardRef((e,t)=>{let n=Uf(Fp,e.__scopeMenu),r=Gf(Fp,e.__scopeMenu),i=Np(Fp,e.__scopeMenu),a=tp(Fp,e.__scopeMenu),o=M.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=M.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return M.useEffect(()=>u,[u]),M.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]),(0,N.jsx)(Jf,{asChild:!0,...l,children:(0,N.jsx)(mp,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":i.contentId,"data-state":zp(n.open),...e,ref:tr(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:H(e.onPointerMove,qp(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:H(e.onPointerLeave,qp(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:H(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||Mf[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});Ip.displayName=Fp;var Lp=`MenuSubContent`,Rp=M.forwardRef((e,t)=>{let n=Zf($f,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Uf($f,e.__scopeMenu),o=Gf($f,e.__scopeMenu),s=Np(Lp,e.__scopeMenu),c=M.useRef(null),l=nr(t,c);return(0,N.jsx)(Ff.Provider,{scope:e.__scopeMenu,children:(0,N.jsx)(za,{present:r||a.open,children:(0,N.jsx)(Ff.Slot,{scope:e.__scopeMenu,children:(0,N.jsx)(op,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:`start`,side:o.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{o.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:H(e.onFocusOutside,e=>{e.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:H(e.onEscapeKeyDown,e=>{o.onClose(),e.preventDefault()}),onKeyDown:H(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=Nf[o.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),s.trigger?.focus(),e.preventDefault())})})})})})});Rp.displayName=Lp;function zp(e){return e?`open`:`closed`}function Bp(e){return e===`indeterminate`}function Vp(e){return Bp(e)?`indeterminate`:e?`checked`:`unchecked`}function Hp(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Up(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Wp(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Up(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Gp(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Kp(e,t){return t?Gp({x:e.clientX,y:e.clientY},t):!1}function qp(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Jp=Kf,Yp=Jf,Xp=Qf,Zp=np,Qp=cp,$p=up,em=pp,tm=gp,nm=bp,rm=Sp,im=Ep,am=Op,om=Ap,sm=Ip,cm=Rp,lm=`DropdownMenu`,[um,dm]=Bi(lm,[zf]),fm=zf(),[pm,mm]=um(lm),hm=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=fm(t),l=M.useRef(null),[u,d]=qi({prop:i,defaultProp:a??!1,onChange:o,caller:lm});return(0,N.jsx)(pm,{scope:t,triggerId:Gi(),triggerRef:l,contentId:Gi(),open:u,onOpenChange:d,onOpenToggle:M.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,N.jsx)(Jp,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};hm.displayName=lm;var gm=`DropdownMenuTrigger`,_m=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=mm(gm,n),o=fm(n);return(0,N.jsx)(Yp,{asChild:!0,...o,children:(0,N.jsx)(ra.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:tr(t,a.triggerRef),onPointerDown:H(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:H(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});_m.displayName=gm;var vm=`DropdownMenuPortal`,ym=e=>{let{__scopeDropdownMenu:t,...n}=e,r=fm(t);return(0,N.jsx)(Xp,{...r,...n})};ym.displayName=vm;var bm=`DropdownMenuContent`,xm=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=mm(bm,n),a=fm(n),o=M.useRef(!1);return(0,N.jsx)(Zp,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:H(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:H(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});xm.displayName=bm;var Sm=`DropdownMenuGroup`,Cm=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=fm(n);return(0,N.jsx)(Qp,{...i,...r,ref:t})});Cm.displayName=Sm;var wm=`DropdownMenuLabel`,Tm=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=fm(n);return(0,N.jsx)($p,{...i,...r,ref:t})});Tm.displayName=wm;var Em=`DropdownMenuItem`,Dm=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=fm(n);return(0,N.jsx)(em,{...i,...r,ref:t})});Dm.displayName=Em;var Om=`DropdownMenuCheckboxItem`,km=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=fm(n);return(0,N.jsx)(tm,{...i,...r,ref:t})});km.displayName=Om;var Am=`DropdownMenuRadioGroup`,jm=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=fm(n);return(0,N.jsx)(nm,{...i,...r,ref:t})});jm.displayName=Am;var Mm=`DropdownMenuRadioItem`,Nm=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=fm(n);return(0,N.jsx)(rm,{...i,...r,ref:t})});Nm.displayName=Mm;var Pm=`DropdownMenuItemIndicator`,Fm=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=fm(n);return(0,N.jsx)(im,{...i,...r,ref:t})});Fm.displayName=Pm;var Im=`DropdownMenuSeparator`,Lm=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=fm(n);return(0,N.jsx)(am,{...i,...r,ref:t})});Lm.displayName=Im;var Rm=`DropdownMenuArrow`,zm=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=fm(n);return(0,N.jsx)(om,{...i,...r,ref:t})});zm.displayName=Rm;var Bm=`DropdownMenuSubTrigger`,Vm=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=fm(n);return(0,N.jsx)(sm,{...i,...r,ref:t})});Vm.displayName=Bm;var Hm=`DropdownMenuSubContent`,Um=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=fm(n);return(0,N.jsx)(cm,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Um.displayName=Hm;var Wm=hm,Gm=_m,Km=ym,qm=xm,Jm=Tm,Ym=Dm,Xm=Lm,Zm=Wm,Qm=Gm,$m=M.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,N.jsx)(Km,{children:(0,N.jsx)(qm,{ref:r,sideOffset:t,className:B(`z-50 min-w-[8rem] overflow-hidden rounded-lg border border-[var(--glass-border)] bg-card backdrop-blur-md p-1 text-foreground shadow-[var(--glass-shadow-lg)] 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 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`,e),...n})}));$m.displayName=qm.displayName;var eh=M.forwardRef(({className:e,inset:t,...n},r)=>(0,N.jsx)(Ym,{ref:r,className:B(`relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,t&&`ps-8`,e),...n}));eh.displayName=Ym.displayName;var th=M.forwardRef(({className:e,inset:t,...n},r)=>(0,N.jsx)(Jm,{ref:r,className:B(`px-2 py-1.5 text-sm font-semibold text-primary`,t&&`ps-8`,e),...n}));th.displayName=Jm.displayName;var nh=M.forwardRef(({className:e,...t},n)=>(0,N.jsx)(Xm,{ref:n,className:B(`-mx-1 my-1 h-px bg-[var(--glass-border)]`,e),...t}));nh.displayName=Xm.displayName;function rh(e){return Array.isArray(e.items)}function ih({group:e,pathname:t,search:n}){return(0,N.jsxs)(vc,{children:[e.title&&(0,N.jsx)(yc,{title:e.title,children:e.title}),(0,N.jsx)(bc,{children:e.items.map(e=>(0,N.jsx)(oh,{item:e,pathname:t,search:n},ah(e)))})]})}function ah(e){return rh(e)?`g:${e.title}`:`l:${e.url}`}function oh({item:e,pathname:t,search:n}){let{state:r,isMobile:i}=uc();return rh(e)?r===`collapsed`&&!i?(0,N.jsx)(dh,{item:e,pathname:t,search:n}):(0,N.jsx)(ch,{item:e,pathname:t,search:n}):(0,N.jsx)(sh,{item:e,pathname:t,search:n})}function sh({item:e,pathname:t,search:n}){let{setOpenMobile:r}=uc();return(0,N.jsx)(xc,{children:(0,N.jsx)(Cc,{asChild:!0,isActive:ph(e,t,n),children:(0,N.jsxs)(`a`,{href:e.url,title:e.title,"data-tour":uh(e.url),onClick:()=>r(!1),...e.external?{target:`_blank`,rel:`noreferrer`}:null,children:[e.icon&&(0,N.jsx)(e.icon,{"aria-hidden":!0}),(0,N.jsx)(`span`,{"data-sidebar-label":!0,className:`flex-1 truncate`,children:e.title}),e.marker&&(0,N.jsx)(e.marker,{"aria-hidden":!0,"data-sidebar-label":!0,className:`size-3.5 text-muted-foreground`}),e.badge&&(0,N.jsx)(fh,{sidebarLabel:!0,children:e.badge})]})})})}function ch({item:e,pathname:t,search:n}){let r=mh(e,t,n);return(0,N.jsx)(Cl,{defaultOpen:r,className:`group/collapsible`,asChild:!0,children:(0,N.jsxs)(xc,{children:[(0,N.jsx)(wl,{asChild:!0,children:(0,N.jsxs)(Cc,{isActive:r,"data-tour":uh(e.items[0]?.url),children:[e.icon&&(0,N.jsx)(e.icon,{"aria-hidden":!0}),(0,N.jsx)(`span`,{"data-sidebar-label":!0,className:`flex-1 truncate`,title:e.title,children:e.title}),e.marker&&(0,N.jsx)(e.marker,{"aria-hidden":!0,"data-sidebar-label":!0,className:`size-3.5 text-muted-foreground`}),e.badge&&(0,N.jsx)(fh,{sidebarLabel:!0,children:e.badge}),(0,N.jsx)(kt,{"aria-hidden":!0,"data-sidebar-label":!0,className:`transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90 rtl:rotate-180 rtl:group-data-[state=open]/collapsible:-rotate-90`})]})}),(0,N.jsx)(Tl,{children:(0,N.jsx)(wc,{children:e.items.map(e=>(0,N.jsx)(lh,{link:e,pathname:t,search:n},e.url))})})]})})}function lh({link:e,pathname:t,search:n}){let{setOpenMobile:r}=uc();return(0,N.jsx)(Tc,{children:(0,N.jsx)(Ec,{asChild:!0,isActive:ph(e,t,n),children:(0,N.jsxs)(`a`,{href:e.url,title:e.title,"data-tour":uh(e.url),onClick:()=>r(!1),children:[e.icon&&(0,N.jsx)(e.icon,{"aria-hidden":!0}),(0,N.jsx)(`span`,{children:e.title}),e.badge&&(0,N.jsx)(fh,{children:e.badge})]})})})}function uh(e){if(e){if(e===`/admin`)return`nav-home`;if(e.startsWith(`/admin/c/products`))return`nav-products`;if(e===`/admin/media`)return`nav-media`;if(e===`/admin/settings`)return`nav-settings`}}function dh({item:e,pathname:t,search:n}){let r=mh(e,t,n),{direction:i}=G();return(0,N.jsx)(xc,{children:(0,N.jsxs)(Zm,{children:[(0,N.jsx)(Qm,{asChild:!0,children:(0,N.jsxs)(Cc,{isActive:r,children:[e.icon&&(0,N.jsx)(e.icon,{"aria-hidden":!0}),(0,N.jsx)(`span`,{"data-sidebar-label":!0,title:e.title,children:e.title}),(0,N.jsx)(kt,{"aria-hidden":!0,"data-sidebar-label":!0,className:`ms-auto`})]})}),(0,N.jsxs)($m,{side:i===`rtl`?`left`:`right`,align:`start`,sideOffset:4,children:[(0,N.jsx)(th,{children:e.title}),(0,N.jsx)(nh,{}),e.items.map(e=>(0,N.jsx)(eh,{asChild:!0,children:(0,N.jsx)(`a`,{href:e.url,className:B(ph(e,t,n)&&`font-medium`),children:e.title})},e.url))]})]})})}function fh({children:e,sidebarLabel:t=!1}){return(0,N.jsx)(`span`,{"data-sidebar-label":t||void 0,className:`ms-auto rounded-full bg-accent px-2 py-0.5 text-xs text-accent-foreground`,children:e})}function ph(e,t,n){let r=new URL(e.url,`http://x`);if(r.pathname!==t)return!1;if(!r.search)return!0;let i=new URLSearchParams(r.search),a=new URLSearchParams(n);for(let[e,t]of i.entries())if(a.get(e)!==t)return!1;return!0}function mh(e,t,n){return e.items.some(e=>ph(e,t,n))?!0:e.items.some(e=>new URL(e.url,`http://x`).pathname===t)}function hh({login:e,role:t}){let{isMobile:n}=uc(),{language:r}=G(),i=(e??`?`).charAt(0).toUpperCase(),a=e?`https://github.com/${encodeURIComponent(e)}.png?size=80`:null;return(0,N.jsx)(bc,{children:(0,N.jsx)(xc,{children:(0,N.jsxs)(Zm,{children:[(0,N.jsx)(Qm,{asChild:!0,children:(0,N.jsxs)(Cc,{size:`lg`,className:`data-[state=open]:bg-accent/40`,children:[(0,N.jsx)(gh,{avatarUrl:a,initial:i}),(0,N.jsxs)(`div`,{"data-sidebar-label":!0,className:`grid flex-1 text-start text-sm leading-tight`,children:[(0,N.jsx)(`span`,{className:`truncate font-semibold`,children:e??`—`}),(0,N.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:t??K(r,`common.signedIn`)})]}),(0,N.jsx)(At,{"data-sidebar-label":!0,className:`ms-auto size-4 text-muted-foreground`,"aria-hidden":!0})]})}),(0,N.jsxs)($m,{align:`end`,side:n?`bottom`:`right`,sideOffset:6,className:`w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg`,children:[(0,N.jsxs)(th,{className:`flex items-center gap-3 py-2`,children:[(0,N.jsx)(gh,{avatarUrl:a,initial:i,large:!0}),(0,N.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,N.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,children:e??`—`}),(0,N.jsx)(`span`,{className:`label-eyebrow truncate`,children:t??K(r,`common.signedIn`)})]})]}),(0,N.jsx)(nh,{}),(0,N.jsx)(eh,{asChild:!0,children:(0,N.jsxs)(`a`,{href:`/admin/preferences`,className:`flex items-center gap-2`,children:[(0,N.jsx)(gn,{className:`size-4`,"aria-hidden":!0}),K(r,`preferences.page.open`)]})}),(0,N.jsx)(nh,{}),(0,N.jsx)(eh,{asChild:!0,className:`text-destructive focus:text-destructive focus:bg-destructive/10`,children:(0,N.jsxs)(`button`,{type:`button`,onClick:_h,className:`flex w-full cursor-pointer items-center gap-2`,children:[(0,N.jsx)(tn,{className:`size-4`,"aria-hidden":!0}),K(r,`common.signOut`)]})})]})]})})})}function gh({avatarUrl:e,initial:t,large:n=!1}){let r=n?`size-9`:`size-8`,i=n?`text-sm`:`text-xs`;return(0,N.jsx)(`span`,{className:B(`shrink-0 inline-flex items-center justify-center rounded-lg`,`bg-primary/15 text-foreground/80 ring-1 ring-border`,r),"aria-hidden":!0,children:e?(0,N.jsx)(`img`,{src:e,alt:``,className:`size-full rounded-lg object-cover`,decoding:`async`}):(0,N.jsx)(`span`,{className:B(`font-medium`,i),children:t})})}function _h(){let e=document.createElement(`form`);e.method=`POST`,e.action=`/admin/logout`,document.body.appendChild(e),e.submit()}function vh({brand:e,groups:t,pathname:n,search:r,user:i}){let{variant:a}=Gn(),{direction:o}=G();return(0,N.jsxs)(dc,{side:o===`rtl`?`right`:`left`,variant:a===`floating`?`sidebar`:a,children:[(0,N.jsx)(mc,{children:(0,N.jsxs)(`div`,{className:`sidebar-chrome-row`,children:[(0,N.jsx)(ul,{brand:e}),(0,N.jsx)(fc,{})]})}),(0,N.jsx)(_c,{}),(0,N.jsx)(hc,{children:t.map((e,t)=>(0,N.jsx)(ih,{group:e,pathname:n,search:r},e.title??`g-${t}`))}),(0,N.jsx)(_c,{}),(0,N.jsx)(gc,{children:(0,N.jsx)(hh,{login:i.login,role:i.role})})]})}function yh({login:e,role:t}){let{language:n}=G(),r=(e??`?`).charAt(0).toUpperCase(),i=e?`https://github.com/${encodeURIComponent(e)}.png?size=80`:null;return(0,N.jsxs)(Zm,{children:[(0,N.jsx)(Qm,{"aria-label":`Account menu`,className:B(`relative inline-flex size-8 items-center justify-center rounded-full`,`outline-hidden ring-1 ring-border`,`hover:ring-primary/40 transition-all`,`data-[state=open]:ring-primary`),children:(0,N.jsx)(bh,{avatarUrl:i,initial:r})}),(0,N.jsxs)($m,{align:`end`,sideOffset:6,className:`w-56`,children:[(0,N.jsxs)(th,{className:`flex items-center gap-3 py-2`,children:[(0,N.jsx)(bh,{avatarUrl:i,initial:r,large:!0}),(0,N.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,N.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,children:e??`—`}),(0,N.jsx)(`span`,{className:`label-eyebrow truncate`,children:t??K(n,`common.signedIn`)})]})]}),(0,N.jsx)(nh,{}),(0,N.jsx)(eh,{asChild:!0,children:(0,N.jsxs)(`a`,{href:`/admin/preferences`,className:`flex items-center gap-2`,children:[(0,N.jsx)(gn,{className:`size-4`,"aria-hidden":!0}),K(n,`preferences.page.open`)]})}),(0,N.jsx)(nh,{}),(0,N.jsx)(eh,{asChild:!0,className:`text-destructive focus:text-destructive focus:bg-destructive/10`,children:(0,N.jsxs)(`button`,{type:`button`,onClick:xh,className:`flex w-full cursor-pointer items-center gap-2`,children:[(0,N.jsx)(tn,{className:`size-4`,"aria-hidden":!0}),K(n,`common.signOut`)]})})]})]})}function bh({avatarUrl:e,initial:t,large:n=!1}){let r=n?`size-9`:`size-8`,i=n?`text-sm`:`text-xs`;return(0,N.jsx)(`span`,{className:B(`shrink-0 inline-flex items-center justify-center rounded-full overflow-hidden`,`bg-primary/15 text-foreground/80`,r),"aria-hidden":!0,children:e?(0,N.jsx)(`img`,{src:e,alt:``,className:`size-full object-cover`,decoding:`async`}):(0,N.jsx)(`span`,{className:B(`font-medium`,i),children:t})})}function xh(){let e=document.createElement(`form`);e.method=`POST`,e.action=`/admin/logout`,document.body.appendChild(e),e.submit()}function Sh(){let{language:e,setLanguage:t}=G(),n=Bc.find(t=>t.value===e)??Bc[0];return(0,N.jsxs)(Zm,{children:[(0,N.jsx)(Qm,{asChild:!0,children:(0,N.jsxs)(V,{type:`button`,variant:`ghost`,size:`sm`,className:`h-8 gap-2 rounded-full border border-border/60 bg-background/30 px-2.5`,"aria-label":K(e,`preferences.language`),children:[(0,N.jsx)(Yt,{className:`size-4 text-primary`,"aria-hidden":!0}),(0,N.jsx)(`span`,{className:`hidden text-xs font-medium sm:inline`,children:n.nativeLabel})]})}),(0,N.jsxs)($m,{align:`end`,className:`max-h-[min(28rem,80vh)] w-52 overflow-y-auto`,children:[(0,N.jsx)(th,{className:`label-eyebrow opacity-70`,children:K(e,`preferences.language`)}),Bc.map(n=>(0,N.jsxs)(eh,{onSelect:()=>t(n.value),className:`justify-between`,children:[(0,N.jsx)(`span`,{children:n.nativeLabel}),(0,N.jsx)(Dt,{"aria-hidden":!0,className:B(`size-4 text-primary`,n.value===e?`opacity-100`:`opacity-0`)})]},n.value))]})]})}function Ch(){let{language:e,theme:t,setTheme:n}=G(),r=wh(e).find(e=>e.value===t),i=r?.icon??nn;return(0,N.jsxs)(Zm,{children:[(0,N.jsx)(Qm,{asChild:!0,children:(0,N.jsxs)(V,{type:`button`,variant:`ghost`,size:`sm`,className:`h-8 gap-2 rounded-full border border-border/60 bg-background/30 px-2.5`,"aria-label":K(e,`preferences.appearance`),children:[(0,N.jsx)(i,{className:`size-4 text-primary`,"aria-hidden":!0}),(0,N.jsx)(`span`,{className:`hidden text-xs font-medium sm:inline`,children:r?.label??K(e,`preferences.system`)})]})}),(0,N.jsxs)($m,{align:`end`,className:`w-44`,children:[(0,N.jsx)(th,{className:`label-eyebrow opacity-70`,children:K(e,`preferences.appearance`)}),wh(e).map(e=>{let r=e.icon;return(0,N.jsxs)(eh,{onSelect:()=>n(e.value),className:`justify-between`,children:[(0,N.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(r,{className:`size-4`,"aria-hidden":!0}),e.label]}),(0,N.jsx)(Dt,{"aria-hidden":!0,className:B(`size-4 text-primary`,e.value===t?`opacity-100`:`opacity-0`)})]},e.value)})]})]})}function wh(e){return[{value:`light`,label:K(e,`preferences.light`),icon:yn},{value:`dark`,label:K(e,`preferences.dark`),icon:rn},{value:`system`,label:K(e,`preferences.system`),icon:nn}]}function Th({fixed:e=!1,className:t,children:n,user:r,site:i,publicUrl:a,onOpenGuide:o}){let{language:s}=G(),[c,l]=M.useState(!1);return M.useEffect(()=>{if(!e)return;let t=()=>l(window.scrollY>10);return t(),window.addEventListener(`scroll`,t,{passive:!0}),()=>window.removeEventListener(`scroll`,t)},[e]),(0,N.jsxs)(`header`,{"data-slot":`header`,"data-scrolled":c||void 0,className:B(`admin-statusbar z-20 flex h-14 shrink-0 items-center gap-3 px-4`,e?`sticky top-0 w-[inherit] transition-shadow`:`border-b border-border/40`,c&&`shadow-sm`,t),children:[i?(0,N.jsxs)(`div`,{className:`admin-site-status`,"aria-label":`Current admin site`,children:[(0,N.jsx)(`span`,{children:i.title}),i.subtitle?(0,N.jsx)(`small`,{children:i.subtitle}):null]}):null,a?(0,N.jsx)(V,{asChild:!0,variant:`secondary`,size:`sm`,className:`shrink-0`,children:(0,N.jsxs)(`a`,{href:a,target:`_blank`,rel:`noreferrer`,title:K(s,`common.viewSite`),children:[(0,N.jsx)(zt,{className:`size-3.5`,"aria-hidden":!0}),(0,N.jsx)(`span`,{className:`hidden sm:inline`,children:K(s,`common.viewSite`)})]})}):null,n,r?(0,N.jsxs)(`div`,{className:B(`flex items-center gap-2`,n?``:`ms-auto`),children:[o?(0,N.jsxs)(V,{type:`button`,variant:`ghost`,size:`sm`,onClick:o,"data-tour":`guide-button`,title:K(s,`guide.open`),"aria-label":K(s,`guide.open`),children:[(0,N.jsx)(Mt,{className:`size-4`,"aria-hidden":!0}),(0,N.jsx)(`span`,{className:`hidden sm:inline`,children:K(s,`guide.open`)})]}):null,(0,N.jsx)(Sh,{}),(0,N.jsx)(Ch,{}),(0,N.jsx)(yh,{login:r.login,role:r.role})]}):null]})}var Eh=`content`;function Dh({className:e}){return(0,N.jsx)(`a`,{href:`#${Eh}`,className:B(`fixed inset-inline-start-3 top-3 z-[999]`,`-translate-y-52 rounded-md bg-primary px-3 py-2 text-sm font-medium`,`text-primary-foreground shadow`,`focus-visible:translate-y-0 transition-transform`,`outline-2 outline-offset-2 outline-ring/40`,e),children:`Skip to main content`})}function Oh({fixed:e=!1,fluid:t=!1,className:n,children:r}){return(0,N.jsx)(`div`,{id:Eh,"data-layout":e?`fixed`:`auto`,className:B(`@container/content`,`w-full px-4 py-6 sm:px-6`,e&&`flex grow flex-col overflow-hidden`,!t&&`mx-auto max-w-[1440px]`,`flex-1`,n),children:r})}function kh(e,t){switch(t){case`draft`:return K(e,`status.draft`);case`review`:return K(e,`status.review`);case`published`:return K(e,`status.published`);case`archived`:return K(e,`status.archived`)}}var Ah={products:{en:`Products`,"zh-TW":`商品`,"zh-CN":`商品`},"product-skus":{en:`Product SKUs`,"zh-TW":`商品規格`,"zh-CN":`商品规格`},pages:{en:`Pages`,"zh-TW":`頁面`,"zh-CN":`页面`},orders:{en:`Orders`,"zh-TW":`訂單`,"zh-CN":`订单`},order_items:{en:`Order line items`,"zh-TW":`訂單明細`,"zh-CN":`订单明细`},inventory_snapshots:{en:`Inventory snapshots`,"zh-TW":`庫存快照`,"zh-CN":`库存快照`}},jh={products:{en:`Manage product records, publishing state, and localized product copy.`,"zh-TW":`管理商品資料、發布狀態與多語商品內容。`,"zh-CN":`管理商品资料、发布状态与多语商品内容。`},"product-skus":{en:`Manage sellable variants, prices, inventory mode, and product options.`,"zh-TW":`管理可販售規格、價格、庫存模式與商品選項。`,"zh-CN":`管理可销售规格、价格、库存模式与商品选项。`},pages:{en:`Manage storefront pages, layout sections, and localized page copy.`,"zh-TW":`管理前台頁面、首頁區塊與多語文案。`,"zh-CN":`管理前台页面、首页区块与多语文案。`},orders:{en:`Review customer orders and fulfillment state.`,"zh-TW":`查看客戶訂單與履約狀態。`,"zh-CN":`查看客户订单与履约状态。`},order_items:{en:`Review purchased items captured at checkout time.`,"zh-TW":`查看結帳當下保存的購買項目明細。`,"zh-CN":`查看结账当下保存的购买项目明细。`},inventory_snapshots:{en:`Review inventory snapshots synced from the inventory actor.`,"zh-TW":`查看由庫存 actor 同步的庫存快照。`,"zh-CN":`查看由库存 actor 同步的库存快照。`}};function Mh(e,t){return Ah[e.name]?.[t]??e.title}function Nh(e,t){return e?jh[e.name]?.[t]??e.description:null}var Ph=`mantle.admin.guide.closed`,Fh=[{key:`products`,selector:`[data-tour="nav-products"]`},{key:`filters`,selector:`[data-tour="status-filter"]`,href:`/admin/c/products`},{key:`actions`,selector:`[data-tour="entry-actions"]`,href:`/admin/c/products`},{key:`reopen`,selector:`[data-tour="guide-button"]`}],Ih={products:{title:`guide.products.title`,body:`guide.products.body`},filters:{title:`guide.filters.title`,body:`guide.filters.body`},actions:{title:`guide.actions.title`,body:`guide.actions.body`},reopen:{title:`guide.reopen.title`,body:`guide.reopen.body`}};function Lh({language:e,onClose:t}){let[n,r]=M.useState(0),{location:i,navigate:a}=Rc(),o=Fh[n]??Fh[0],s=zh(o),c=M.useMemo(()=>Bh(s),[s]),l=n===Fh.length-1;return M.useEffect(()=>{!(`href`in o)||!o.href||`${i.pathname}${i.search}`!==o.href&&a(o.href)},[i.pathname,i.search,a,o]),(0,N.jsxs)(`div`,{className:`admin-guide-overlay`,role:`dialog`,"aria-modal":`false`,"aria-labelledby":`admin-guide-title`,children:[s?(0,N.jsx)(`div`,{className:`admin-guide-highlight`,style:{top:s.top-8,left:s.left-8,width:s.width+16,height:s.height+16}}):null,(0,N.jsxs)(`section`,{className:`admin-guide-popover`,style:c,children:[(0,N.jsxs)(`div`,{className:`admin-guide-progress`,children:[(0,N.jsx)(`span`,{children:n+1}),(0,N.jsx)(`small`,{children:Fh.length})]}),(0,N.jsxs)(`div`,{className:`admin-guide-copy`,children:[(0,N.jsx)(`p`,{className:`label-eyebrow`,children:`AotterMantle`}),(0,N.jsx)(`h2`,{id:`admin-guide-title`,children:K(e,Ih[o.key].title)}),(0,N.jsx)(`p`,{children:K(e,Ih[o.key].body)})]}),(0,N.jsxs)(`div`,{className:`admin-guide-controls`,children:[(0,N.jsx)(`button`,{type:`button`,className:`guide-icon-button`,onClick:()=>r(e=>Math.max(0,e-1)),disabled:n===0,title:K(e,`guide.prev`),children:(0,N.jsx)(Ot,{className:`size-4`,"aria-hidden":!0})}),(0,N.jsxs)(`button`,{type:`button`,className:`guide-primary-button`,onClick:()=>l?t():r(e=>Math.min(Fh.length-1,e+1)),children:[l?K(e,`guide.finish`):K(e,`guide.next`),l?null:(0,N.jsx)(kt,{className:`size-4`,"aria-hidden":!0})]}),(0,N.jsx)(`button`,{type:`button`,className:`guide-icon-button`,onClick:t,title:K(e,`guide.close`),children:(0,N.jsx)(Fn,{className:`size-4`,"aria-hidden":!0})})]})]})]})}function Rh(){let{language:e}=G(),[t,n]=M.useState(()=>Vh());return{language:e,open:t,showGuide:M.useCallback(()=>{try{localStorage.removeItem(Ph)}catch{}n(!0)},[]),closeGuide:M.useCallback(()=>{try{localStorage.setItem(Ph,`1`)}catch{}n(!1)},[])}}function zh(e){let[t,n]=M.useState(null);return M.useEffect(()=>{let t=0,r=()=>{cancelAnimationFrame(t),t=requestAnimationFrame(()=>{let t=document.querySelector(e.selector);if(!t){n(null);return}t.scrollIntoView({block:`nearest`,inline:`nearest`});let r=t.getBoundingClientRect();n({top:r.top,left:r.left,width:r.width,height:r.height})})};return r(),window.addEventListener(`resize`,r),window.addEventListener(`scroll`,r,!0),()=>{cancelAnimationFrame(t),window.removeEventListener(`resize`,r),window.removeEventListener(`scroll`,r,!0)}},[e]),t}function Bh(e){if(typeof window>`u`)return{};if(!e)return{top:`5rem`,left:`50%`,transform:`translateX(-50%)`};let t=Math.min(380,Math.max(280,window.innerWidth-32)),n=e.left+e.width+t+24<window.innerWidth,r=e.left-t-24>0,i=Math.min(window.innerHeight-220,Math.max(16,e.top));return n?{top:i,left:e.left+e.width+18}:r?{top:i,left:e.left-t-18}:{top:Math.min(window.innerHeight-220,e.top+e.height+18),left:`50%`,transform:`translateX(-50%)`}}function Vh(){if(typeof window>`u`)return!1;try{return localStorage.getItem(Ph)!==`1`}catch{return!0}}var Hh={title:`CMS`,subtitle:`admin`,href:`/admin`};function Uh({brand:e=Hh,fixed:t=!1,fluid:n=!1,children:r}){let{pathname:i,search:a}=zc(),{language:o}=G(),s=Rh(),c=P({queryKey:[`me`],queryFn:()=>Ac.get(`/me`),retry:!1}),l=P({queryKey:[`collections`],queryFn:async()=>(await Ac.get(`/collections`)).collections}),u=P({queryKey:[`site`],queryFn:()=>Ac.get(`/site`)}),d=M.useMemo(()=>({...e,title:u.data?.brand??e.title,subtitle:u.data?.canonicalLocale??e.subtitle}),[e,u.data]),f=M.useMemo(()=>Wh(l.data??[],o,c.data?.role??null),[l.data,o,c.data?.role]);return(0,N.jsx)(Wn,{children:(0,N.jsxs)(lc,{defaultOpen:qn()??!0,children:[(0,N.jsx)(Dh,{}),(0,N.jsx)(vh,{brand:d,groups:f,pathname:i,search:a,user:{login:c.data?.login??null,role:c.data?.role??null}}),(0,N.jsxs)(pc,{children:[(0,N.jsx)(Th,{fixed:!0,site:d,publicUrl:u.data?.publicUrl,onOpenGuide:s.showGuide,user:{login:c.data?.login??null,role:c.data?.role??null}}),(0,N.jsx)(Oh,{fixed:t,fluid:n,children:r})]}),(0,N.jsx)(cl,{}),s.open?(0,N.jsx)(Lh,{language:s.language,onClose:s.closeGuide}):null]})})}function Wh(e,t,n){let r=e.filter(e=>!e.parent);return[{items:[{title:K(t,`nav.home`),url:`/admin`,icon:Wt}]},{title:K(t,`nav.content`),items:r.map(e=>({title:Mh(e,t),icon:Vt,marker:e.hasTranslations?Ht:void 0,items:[{title:K(t,`collection.filter.all`),url:`/admin/c/${e.name}`},...Gh(e).map(n=>({title:kh(t,n),url:`/admin/c/${e.name}?status=${n}`}))]}))},{title:K(t,`nav.more`),items:[{title:K(t,`nav.media`),url:`/admin/media`,icon:qt},{title:K(t,`nav.approvals`),url:`/admin/approvals`,icon:Pt},{title:K(t,`nav.settings`),url:`/admin/settings`,icon:gn},...n===`owner`?[{title:K(t,`nav.staff`),url:`/admin/staff`,icon:Mn}]:[]]}]}function Gh(e){return e.lifecycle===`editorial`?Mc:Nc}function Kh(){return(0,N.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,N.jsxs)(`div`,{className:`glass-card w-full max-w-sm p-6`,children:[(0,N.jsx)(`div`,{className:`mb-4 h-4 w-24 animate-pulse rounded bg-muted`}),(0,N.jsxs)(`div`,{className:`space-y-2`,children:[(0,N.jsx)(`div`,{className:`h-3 w-full animate-pulse rounded bg-muted`}),(0,N.jsx)(`div`,{className:`h-3 w-2/3 animate-pulse rounded bg-muted`})]})]})})}function qh({error:e}){let{language:t}=G(),n=e instanceof Error?e.message:`Unknown error.`;return(0,N.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,N.jsxs)(`div`,{className:`glass-card animate-rise w-full max-w-sm p-8 text-center`,children:[(0,N.jsx)(`h1`,{className:`mb-2 text-xl`,children:K(t,`auth.error.title`)}),(0,N.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n})]})})}function Jh({login:e}){let{language:t}=G();return(0,N.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,N.jsxs)(`div`,{className:`glass-card animate-rise w-full max-w-md p-8 text-center`,children:[(0,N.jsx)(`div`,{className:`mx-auto mb-3 inline-flex size-10 items-center justify-center rounded-full bg-destructive/10 text-destructive`,children:(0,N.jsx)(En,{className:`size-5`,"aria-hidden":!0})}),(0,N.jsx)(`h1`,{className:`mb-2 text-xl`,children:K(t,`auth.accessDenied.title`)}),e?(0,N.jsxs)(`p`,{className:`mb-1 text-sm font-medium text-foreground`,children:[`GitHub: `,e]}):null,(0,N.jsx)(`p`,{className:`mb-1 text-sm text-muted-foreground`,children:K(t,`auth.accessDenied.noStaff`)}),(0,N.jsx)(`p`,{className:`mb-6 text-sm text-muted-foreground`,children:K(t,`auth.accessDenied.askOwner`)}),(0,N.jsxs)(V,{variant:`outline`,className:`w-full`,onClick:ag,children:[(0,N.jsx)(tn,{className:`me-2 size-4`,"aria-hidden":!0}),K(t,`common.signOut`)]})]})})}var Yh=`w-full rounded border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,Xh=`first:mt-0 mt-4`,Zh=`first:mt-0 first:border-t-0 first:pt-0 mt-6 border-t border-border pt-4`;function Qh(){let{language:e}=G(),t=new URLSearchParams(window.location.search).get(`return`)??`/admin`,[n,r]=M.useState(null),[i,a]=M.useState(null);return M.useEffect(()=>{let e=!1;async function t(){try{let t=await fetch(`/api/auth/methods`,{credentials:`include`});if(!t.ok)throw Error(`HTTP ${t.status}`);let n=await t.json();if(e)return;r(n.methods??[])}catch(t){if(e)return;a(t instanceof Error?t.message:String(t))}}return t(),()=>{e=!0}},[]),(0,N.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,N.jsxs)(`div`,{className:`glass-card animate-rise w-full max-w-sm p-8`,children:[(0,N.jsx)(`p`,{className:`label-eyebrow mb-2`,children:K(e,`auth.signIn.eyebrow`)}),(0,N.jsx)(`h1`,{className:`mb-2 text-xl`,children:K(e,`auth.signIn.title`)}),i?(0,N.jsx)(`p`,{className:`mb-4 text-sm text-destructive`,children:K(e,`auth.signIn.methodsLoadFailed`)}):null,n===null&&!i?(0,N.jsx)(`div`,{className:`space-y-2`,children:(0,N.jsx)(`div`,{className:`h-9 w-full animate-pulse rounded bg-muted`})}):null,n&&n.length===0?(0,N.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:K(e,`auth.signIn.noMethods`)}):null,n&&n.length>0?(0,N.jsx)(`div`,{children:n.map(e=>(0,N.jsx)($h,{method:e,returnTo:t},e.kind===`social`?`social:${e.provider}`:e.kind))}):null]})})}function $h({method:e,returnTo:t}){switch(e.kind){case`social`:return(0,N.jsx)(tg,{provider:e.provider,returnTo:t});case`email-otp`:return(0,N.jsx)(ng,{returnTo:t});case`magic-link`:return(0,N.jsx)(rg,{returnTo:t});default:return(0,N.jsx)(ig,{kind:e.kind})}}var eg={github:`GitHub`,google:`Google`,apple:`Apple`,"microsoft-entra-id":`Microsoft`,facebook:`Facebook`,discord:`Discord`,twitter:`Twitter / X`,linkedin:`LinkedIn`,spotify:`Spotify`,twitch:`Twitch`,gitlab:`GitLab`,tiktok:`TikTok`,reddit:`Reddit`,kick:`Kick`,vk:`VK`,naver:`Naver`,kakao:`Kakao`,line:`LINE`,slack:`Slack`,atlassian:`Atlassian`,zoom:`Zoom`,notion:`Notion`,figma:`Figma`,linear:`Linear`,vercel:`Vercel`,paypal:`PayPal`,huggingface:`Hugging Face`,cognito:`Cognito`,salesforce:`Salesforce`,polar:`Polar`,railway:`Railway`,roblox:`Roblox`,paybin:`Paybin`,wechat:`WeChat`,dropbox:`Dropbox`};function tg({provider:e,returnTo:t}){let{language:n}=G(),r=eg[e]??e,i=async()=>{let n=await fetch(`/api/auth/sign-in/social`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:e,callbackURL:t})});if(!n.ok)return;let r=await n.json();r.url&&(window.location.href=r.url)};return(0,N.jsx)(`div`,{className:Xh,children:(0,N.jsx)(V,{onClick:()=>void i(),className:`w-full`,children:K(n,`auth.signIn.method.social.button`,{provider:r})})})}function ng({returnTo:e}){let{language:t}=G(),[n,r]=M.useState(`email`),[i,a]=M.useState(``),[o,s]=M.useState(``),[c,l]=M.useState(!1),[u,d]=M.useState(null),f=async e=>{l(!0),d(null);try{await e()}finally{l(!1)}};return(0,N.jsxs)(`div`,{className:Zh,children:[(0,N.jsx)(`p`,{className:`mb-2 text-sm text-muted-foreground`,children:K(t,`auth.signIn.method.email-otp.body`)}),n===`email`?(0,N.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),i&&f(async()=>{if(!(await fetch(`/api/auth/email-otp/send-verification-otp`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({email:i,type:`sign-in`})})).ok){d(K(t,`auth.signIn.method.email-otp.sendFailed`));return}r(`otp`)})},className:`space-y-2`,children:[(0,N.jsx)(`label`,{htmlFor:`signin-email`,className:`sr-only`,children:K(t,`auth.signIn.method.email-otp.emailLabel`)}),(0,N.jsx)(`input`,{id:`signin-email`,type:`email`,value:i,onChange:e=>a(e.currentTarget.value),placeholder:K(t,`auth.signIn.method.email-otp.emailPlaceholder`),required:!0,autoComplete:`email`,className:Yh}),(0,N.jsx)(V,{type:`submit`,className:`w-full`,disabled:c||!i,children:K(t,`auth.signIn.method.email-otp.sendButton`)})]}):(0,N.jsxs)(`form`,{onSubmit:n=>{n.preventDefault(),o&&f(async()=>{if(!(await fetch(`/api/auth/sign-in/email-otp`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({email:i,otp:o})})).ok){d(K(t,`auth.signIn.method.email-otp.verifyFailed`));return}window.location.assign(e)})},className:`space-y-2`,children:[(0,N.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:K(t,`auth.signIn.method.email-otp.sentTo`,{email:i})}),(0,N.jsx)(`label`,{htmlFor:`signin-otp`,className:`sr-only`,children:K(t,`auth.signIn.method.email-otp.otpLabel`)}),(0,N.jsx)(`input`,{id:`signin-otp`,type:`text`,inputMode:`numeric`,autoComplete:`one-time-code`,value:o,onChange:e=>s(e.currentTarget.value),placeholder:K(t,`auth.signIn.method.email-otp.otpPlaceholder`),required:!0,className:Yh}),(0,N.jsx)(V,{type:`submit`,className:`w-full`,disabled:c||!o,children:K(t,`auth.signIn.method.email-otp.verifyButton`)}),(0,N.jsx)(`button`,{type:`button`,onClick:()=>r(`email`),className:`text-xs text-muted-foreground underline-offset-2 hover:underline`,children:K(t,`auth.signIn.method.email-otp.back`)})]}),u?(0,N.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:u}):null]})}function rg({returnTo:e}){let{language:t}=G(),[n,r]=M.useState(``),[i,a]=M.useState(!1),[o,s]=M.useState(!1),[c,l]=M.useState(null),u=async e=>{a(!0),l(null);try{await e()}finally{a(!1)}};return(0,N.jsxs)(`div`,{className:Zh,children:[(0,N.jsx)(`p`,{className:`mb-2 text-sm text-muted-foreground`,children:K(t,`auth.signIn.method.magic-link.body`)}),o?(0,N.jsxs)(`div`,{className:`space-y-2`,children:[(0,N.jsx)(`p`,{className:`text-sm text-foreground`,children:K(t,`auth.signIn.method.magic-link.sentTo`,{email:n})}),(0,N.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:K(t,`auth.signIn.method.magic-link.clickHint`)}),(0,N.jsx)(`button`,{type:`button`,onClick:()=>{s(!1),r(``)},className:`text-xs text-muted-foreground underline-offset-2 hover:underline`,children:K(t,`auth.signIn.method.magic-link.anotherEmail`)})]}):(0,N.jsxs)(`form`,{onSubmit:r=>{r.preventDefault(),n&&u(async()=>{if(!(await fetch(`/api/auth/sign-in/magic-link`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({email:n,callbackURL:e})})).ok){l(K(t,`auth.signIn.method.magic-link.sendFailed`));return}s(!0)})},className:`space-y-2`,children:[(0,N.jsx)(`label`,{htmlFor:`signin-mlink-email`,className:`sr-only`,children:K(t,`auth.signIn.method.magic-link.emailLabel`)}),(0,N.jsx)(`input`,{id:`signin-mlink-email`,type:`email`,value:n,onChange:e=>r(e.currentTarget.value),placeholder:K(t,`auth.signIn.method.magic-link.emailPlaceholder`),required:!0,autoComplete:`email`,className:Yh}),(0,N.jsx)(V,{type:`submit`,className:`w-full`,disabled:i||!n,children:K(t,`auth.signIn.method.magic-link.sendButton`)})]}),c?(0,N.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:c}):null]})}function ig({kind:e}){let{language:t}=G();return(0,N.jsx)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:K(t,`auth.signIn.unknownMethod`,{kind:e})})}function ag(){fetch(`/api/auth/sign-out`,{method:`POST`,credentials:`include`}).then(()=>{window.location.href=`/admin/sign-in`})}function og({eyebrow:e,title:t,description:n,actions:r}){return(0,N.jsxs)(`div`,{className:`mb-6 flex flex-wrap items-end justify-between gap-4`,children:[(0,N.jsxs)(`div`,{className:`min-w-0`,children:[e?(0,N.jsx)(`p`,{className:`label-eyebrow mb-1`,children:e}):null,(0,N.jsx)(`h1`,{className:`text-2xl`,children:t}),n?(0,N.jsx)(`div`,{className:`mt-1 max-w-3xl text-sm text-muted-foreground`,children:n}):null]}),r?(0,N.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:r}):null]})}function sg({className:e,children:t}){return(0,N.jsx)(`section`,{className:B(`glass-card p-5`,e),children:t})}function cg({icon:e=jt,title:t,description:n,action:r}){return(0,N.jsxs)(`div`,{className:`rounded-lg border border-dashed border-border p-8 text-center`,children:[(0,N.jsx)(`div`,{className:`mx-auto mb-3 inline-flex size-10 items-center justify-center rounded-full bg-accent text-accent-foreground`,children:(0,N.jsx)(e,{className:`size-5`,"aria-hidden":!0})}),(0,N.jsx)(`h2`,{className:`text-lg`,children:t}),n?(0,N.jsx)(`p`,{className:`mx-auto mt-1 max-w-md text-sm text-muted-foreground`,children:n}):null,r?(0,N.jsx)(`div`,{className:`mt-4`,children:r}):null]})}function lg({error:e}){let{language:t}=G(),n=e instanceof Oc&&e.status===401;if(M.useEffect(()=>{if(!n||typeof window>`u`)return;let e=window.location.pathname+window.location.search;window.location.href=`/admin/sign-in?return=${encodeURIComponent(e)}`},[n]),n)return null;let r=e instanceof Error?e.message:`Unknown error.`;return(0,N.jsxs)(`div`,{className:`rounded-lg border border-destructive/30 bg-destructive/5 p-4 text-sm text-destructive`,children:[K(t,`common.failedToLoad`),`: `,r]})}function ug(){let{language:e}=G(),t=P({queryKey:[`site`],queryFn:()=>Ac.get(`/site`)}),n=P({queryKey:[`collections`],queryFn:async()=>(await Ac.get(`/collections`)).collections}),r=(n.data??[]).filter(e=>!e.parent),i=t.data;return(0,N.jsxs)(`div`,{className:`space-y-6`,children:[(0,N.jsx)(og,{eyebrow:K(e,`console.eyebrow`),title:i?.brand??`AotterMantle`,description:i?K(e,`console.description`,{title:i.title}):K(e,`console.descriptionFallback`),actions:i?.publicUrl?(0,N.jsx)(V,{asChild:!0,variant:`outline`,children:(0,N.jsxs)(`a`,{href:i.publicUrl,target:`_blank`,rel:`noreferrer`,children:[(0,N.jsx)(Ht,{className:`size-4`,"aria-hidden":!0}),K(e,`common.viewSite`)]})}):null}),(0,N.jsx)(`div`,{className:`grid grid-cols-1 gap-4`,children:(0,N.jsxs)(sg,{className:`admin-dashboard-panel`,children:[(0,N.jsxs)(`div`,{className:`mb-4 flex items-start gap-3`,children:[(0,N.jsx)(`div`,{className:`rounded-xl bg-primary/15 p-2 text-primary`,children:(0,N.jsx)(cn,{className:`size-5`,"aria-hidden":!0})}),(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`h2`,{className:`text-lg`,children:K(e,`console.workspace.title`)}),(0,N.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:K(e,`console.workspace.body`)})]})]}),(0,N.jsxs)(`div`,{className:`grid grid-cols-1 gap-2 sm:grid-cols-3`,children:[(0,N.jsx)(dg,{href:`/admin/c/products`,icon:cn,label:K(e,`workspace.products`)}),(0,N.jsx)(dg,{href:`/admin/c/pages`,icon:Bt,label:K(e,`workspace.pages`)}),(0,N.jsx)(dg,{href:`/admin/media`,icon:qt,label:K(e,`workspace.media`)})]})]})}),(0,N.jsxs)(`section`,{children:[(0,N.jsx)(og,{eyebrow:K(e,`console.collections.eyebrow`),title:K(e,`console.collections.title`),description:K(e,`console.collections.body`)}),n.isLoading&&(0,N.jsx)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3`,children:[0,1,2].map(e=>(0,N.jsx)(`div`,{className:`glass-card h-36 animate-pulse`},e))}),n.isError&&(0,N.jsx)(lg,{error:n.error}),n.data&&r.length===0&&(0,N.jsx)(cg,{icon:Rt,title:K(e,`console.collections.emptyTitle`),description:K(e,`console.collections.emptyBody`)}),r.length>0&&(0,N.jsx)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3`,children:r.map(t=>(0,N.jsxs)(`a`,{href:`/admin/c/${encodeURIComponent(t.name)}`,className:`glass-card card-lift block p-5 no-underline text-foreground`,children:[(0,N.jsxs)(`div`,{className:`mb-3 flex items-start justify-between gap-3`,children:[(0,N.jsxs)(`div`,{className:`min-w-0`,children:[(0,N.jsx)(`h2`,{className:`truncate text-lg`,title:Mh(t,e),children:Mh(t,e)}),(0,N.jsx)(`p`,{className:`font-mono text-xs text-muted-foreground`,children:t.name})]}),(0,N.jsx)(Bt,{className:`size-5 shrink-0 text-muted-foreground`,"aria-hidden":!0})]}),Nh(t,e)?(0,N.jsx)(`p`,{className:`line-clamp-2 text-sm text-muted-foreground`,children:Nh(t,e)}):(0,N.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:K(e,`console.collections.noDescription`)}),(0,N.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-2`,children:[(0,N.jsx)(`span`,{className:`badge-status bg-accent text-accent-foreground`,children:t.lifecycle}),t.hasTranslations?(0,N.jsx)(`span`,{className:`badge-status bg-[color-mix(in_srgb,var(--info)_16%,transparent)] text-[color:var(--info)]`,children:`i18n`}):null,t.mediaFields?.length?(0,N.jsx)(`span`,{className:`badge-status bg-[color-mix(in_srgb,var(--success)_16%,transparent)] text-[color:var(--success)]`,children:`media`}):null,(0,N.jsx)(`span`,{className:`badge-status bg-muted text-muted-foreground`,children:kh(e,`published`)})]})]},t.name))})]})]})}function dg({href:e,icon:t,label:n}){return(0,N.jsxs)(`a`,{href:e,title:n,className:`quick-action`,children:[(0,N.jsx)(t,{className:`size-4`,"aria-hidden":!0}),(0,N.jsx)(`span`,{children:n})]})}function fg({children:e,className:t}){return(0,N.jsx)(`div`,{className:B(`glass-card overflow-hidden`,t),children:(0,N.jsx)(`div`,{className:`overflow-x-auto`,children:(0,N.jsx)(`table`,{className:`w-full min-w-[720px] text-sm`,children:e})})})}function pg({children:e,className:t}){return(0,N.jsx)(`th`,{className:B(`label-eyebrow px-3 py-2 text-left`,t),children:e})}function mg({children:e,className:t}){return(0,N.jsx)(`td`,{className:B(`px-3 py-2 align-middle`,t),children:e})}var hg={draft:`bg-muted text-muted-foreground`,review:`bg-[color-mix(in_srgb,var(--warning)_18%,transparent)] text-[color:var(--warning)]`,approved:`bg-[color-mix(in_srgb,var(--success)_18%,transparent)] text-[color:var(--success)]`,scheduled:`bg-[color-mix(in_srgb,var(--info)_18%,transparent)] text-[color:var(--info)]`,published:`bg-[color-mix(in_srgb,var(--success)_18%,transparent)] text-[color:var(--success)]`,archived:`bg-secondary text-muted-foreground`};function gg({status:e,className:t}){return(0,N.jsx)(`span`,{className:B(`badge-status`,_g(e)?hg[e]:`bg-accent text-accent-foreground`,t),children:e})}function _g(e){return e in hg}var vg=new Intl.DateTimeFormat(void 0,{dateStyle:`short`,timeStyle:`short`});function yg({collectionName:e}){let{language:t}=G(),n=zc(),r=Ze(),i=new URLSearchParams(n.search),a=i.get(`status`)??void 0,o=i.get(`search`)?.trim()??``,s=P({queryKey:[`collections`],queryFn:async()=>(await Ac.get(`/collections`)).collections}),c=P({queryKey:[`entries`,e,a??`all`,t],queryFn:()=>{let n=new URLSearchParams({collection:e,limit:`99`,locale:t});return a&&n.set(`status`,a),Ac.get(`/entries?${n.toString()}`)}}),[l,u]=M.useState(null);M.useEffect(()=>{c.data&&u(c.data)},[c.data]);let d=c.data??l,f=M.useMemo(()=>{if(!d||!o)return d;let e=o.toLocaleLowerCase();return{...d,items:d.items.filter(n=>{let r=kg(n.title,t);return[n.id,n.collection,n.status,n.locale??``,r].some(t=>String(t).toLocaleLowerCase().includes(e))})}},[d,t,o]),p=c.isLoading&&!d,m=s.data?.find(t=>t.name===e),h=m?Mh(m,t):e,g=M.useCallback(()=>{r.invalidateQueries({queryKey:[`entries`,e]})},[e,r]),_=ft({mutationFn:({id:e,title:t,version:n})=>Ac.patch(`/entries/${encodeURIComponent(e)}`,{data:{title:t},expectedVersion:n}),onSuccess:g}),v=ft({mutationFn:e=>Ac.delete(`/entries/${encodeURIComponent(e)}`),onSuccess:g});return(0,N.jsxs)(`div`,{children:[(0,N.jsx)(og,{eyebrow:(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`a`,{href:`/admin`,className:`hover:underline`,children:K(t,`collection.breadcrumb`)}),(0,N.jsx)(`span`,{className:`mx-2 text-foreground/30`,children:`/`}),(0,N.jsx)(`span`,{className:`text-foreground/70`,children:e})]}),title:h,description:xg(m,t),actions:(0,N.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:[a?(0,N.jsx)(gg,{status:a}):null,m?.hasTranslations?(0,N.jsx)(`span`,{className:`badge-status bg-accent text-accent-foreground`,children:`i18n`}):null,m?.mediaFields?.length?(0,N.jsx)(`span`,{className:`badge-status bg-[color-mix(in_srgb,var(--success)_16%,transparent)] text-[color:var(--success)]`,children:`media`}):null]})}),m?(0,N.jsx)(bg,{collectionName:m.name,status:a,searchTerm:o,language:t}):null,m?(0,N.jsx)(Cg,{collection:m,activeStatus:a,searchTerm:o,language:t}):null,p&&(0,N.jsx)(Eg,{}),c.isError&&!d&&(0,N.jsx)(lg,{error:c.error}),f&&f.items.length===0&&(0,N.jsx)(cg,{icon:Bt,title:K(t,`collection.empty.title`),description:o?K(t,`collection.empty.search`,{search:o}):a?K(t,`collection.empty.withStatus`,{status:a}):K(t,`collection.empty.all`)}),f&&f.items.length>0&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(fg,{children:[(0,N.jsx)(`thead`,{children:(0,N.jsxs)(`tr`,{className:`border-b border-[var(--glass-border)]`,children:[(0,N.jsx)(pg,{children:K(t,`collection.table.id`)}),(0,N.jsx)(pg,{children:K(t,`collection.table.title`)}),(0,N.jsx)(pg,{children:K(t,`collection.table.status`)}),(0,N.jsx)(pg,{children:K(t,`collection.table.locale`)}),(0,N.jsx)(pg,{children:K(t,`collection.table.version`)}),(0,N.jsx)(pg,{children:K(t,`collection.table.updated`)}),(0,N.jsx)(pg,{children:K(t,`collection.table.actions`)})]})}),(0,N.jsx)(`tbody`,{children:f.items.map(e=>(0,N.jsx)(Dg,{row:e,language:t,collection:m,onRename:t=>_.mutateAsync({id:e.id,title:t,version:e.version}),onDelete:()=>v.mutateAsync(e.id),busy:_.isPending&&_.variables?.id===e.id||v.isPending&&v.variables===e.id},e.id))})]}),c.isFetching&&!c.data?(0,N.jsx)(`p`,{className:`mt-3 text-xs text-muted-foreground`,children:K(t,`collection.refreshing`)}):null,f.next_cursor?(0,N.jsx)(`p`,{className:`mt-3 text-xs text-muted-foreground`,children:K(t,`collection.moreRows`)}):null]})]})}function bg({collectionName:e,status:t,searchTerm:n,language:r}){let[i,a]=M.useState(n);return M.useEffect(()=>a(n),[n]),(0,N.jsx)(`form`,{className:`mb-3 max-w-xl`,role:`search`,onSubmit:n=>{n.preventDefault();let r=i.trim(),a=new URLSearchParams;t&&a.set(`status`,t),r&&a.set(`search`,r);let o=a.toString();window.location.href=`/admin/c/${encodeURIComponent(e)}${o?`?${o}`:``}`},children:(0,N.jsxs)(`label`,{className:`relative block`,children:[(0,N.jsx)(mn,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground`,"aria-hidden":!0}),(0,N.jsx)(`input`,{className:`admin-input h-10 pl-9`,value:i,onChange:e=>a(e.target.value),placeholder:K(r,`collection.searchPlaceholder`)})]})})}function xg(e,t){let n=Nh(e,t)?.trim();return n?Sg(n)?(0,N.jsxs)(`div`,{className:`space-y-2`,children:[(0,N.jsx)(`p`,{children:K(t,`collection.schemaSummary`,{name:e?Mh(e,t):``})}),(0,N.jsxs)(`details`,{className:`group`,children:[(0,N.jsx)(`summary`,{className:`inline-flex cursor-pointer list-none items-center rounded-md border border-border bg-card/70 px-2.5 py-1 text-xs font-semibold text-foreground/70 transition hover:bg-accent hover:text-accent-foreground`,children:K(t,`collection.schemaDetails`)}),(0,N.jsx)(`p`,{className:`mt-2 max-w-3xl rounded-md border border-border bg-card/55 p-3 text-xs leading-relaxed text-muted-foreground`,children:n})]})]}):n:K(t,`collection.defaultDescription`)}function Sg(e){return e.length>180||/`|SKU|BCP|ISO|ContentState|column|field|schema|locale|inventory/i.test(e)}function Cg({collection:e,activeStatus:t,searchTerm:n,language:r}){let i=e.lifecycle===`editorial`?[`draft`,`review`,`published`,`archived`]:[`draft`,`published`,`archived`];return(0,N.jsxs)(`div`,{className:`mb-5 flex gap-2 overflow-x-auto pb-1`,"data-tour":`status-filter`,children:[(0,N.jsx)(Tg,{href:wg(e.name,void 0,n),active:!t,children:K(r,`collection.filter.all`)}),i.map(i=>(0,N.jsx)(Tg,{href:wg(e.name,i,n),active:t===i,children:kh(r,i)},i))]})}function wg(e,t,n){let r=new URLSearchParams;t&&r.set(`status`,t),n&&r.set(`search`,n);let i=r.toString();return`/admin/c/${encodeURIComponent(e)}${i?`?${i}`:``}`}function Tg({href:e,active:t,children:n}){return(0,N.jsx)(`a`,{href:e,"aria-current":t?`page`:void 0,className:B(`inline-flex h-8 shrink-0 items-center justify-center rounded-lg border px-3 text-xs font-medium`,`transition-colors duration-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,t?`border-[var(--glass-border)] bg-secondary text-secondary-foreground`:`border-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground`),children:n})}function Eg(){return(0,N.jsx)(`div`,{className:`glass-card overflow-hidden`,children:[0,1,2,3,4].map(e=>(0,N.jsxs)(`div`,{className:`flex items-center gap-4 border-b border-[var(--glass-border)] p-3 last:border-b-0`,children:[(0,N.jsx)(`div`,{className:`h-3 w-16 animate-pulse rounded bg-muted`}),(0,N.jsx)(`div`,{className:`h-3 flex-1 animate-pulse rounded bg-muted`}),(0,N.jsx)(`div`,{className:`h-6 w-20 animate-pulse rounded-full bg-muted`})]},e))})}function Dg({row:e,language:t,collection:n,onRename:r,onDelete:i,busy:a}){let o=kg(e.title,t),[s,c]=M.useState(!1),[l,u]=M.useState(o),[d,f]=M.useState(null);M.useEffect(()=>{s||u(o)},[s,o]);async function p(){let e=l.trim();if(!e||e===o){c(!1),u(o);return}f(null);try{await r(e),c(!1)}catch(e){f(e instanceof Error?e.message:String(e))}}async function m(){if(!(typeof window<`u`&&!window.confirm(K(t,`crud.deleteConfirm`,{name:o})))){f(null);try{await i()}catch(e){f(e instanceof Error?e.message:String(e))}}}return(0,N.jsxs)(`tr`,{className:`border-t border-[var(--glass-border)] hover:bg-accent/40`,children:[(0,N.jsx)(mg,{className:`font-mono text-xs text-muted-foreground`,children:String(e.id).slice(0,8)}),(0,N.jsx)(mg,{className:`max-w-[28rem]`,children:(0,N.jsxs)(`div`,{className:`min-w-[16rem]`,children:[s?(0,N.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,N.jsx)(`input`,{className:`admin-input h-9 min-w-0 flex-1`,value:l,autoFocus:!0,disabled:a,onChange:e=>u(e.target.value),onBlur:()=>void p(),onKeyDown:e=>{e.key===`Enter`&&p(),e.key===`Escape`&&(u(o),c(!1))}}),(0,N.jsx)(`button`,{type:`button`,className:`row-action`,title:K(t,`crud.saveTitle`),disabled:a,onMouseDown:e=>e.preventDefault(),onClick:()=>void p(),children:(0,N.jsx)(Dt,{className:`size-3.5`,"aria-hidden":!0})}),(0,N.jsx)(`button`,{type:`button`,className:`row-action`,title:K(t,`crud.cancelTitle`),disabled:a,onMouseDown:e=>e.preventDefault(),onClick:()=>{u(o),c(!1)},children:(0,N.jsx)(Fn,{className:`size-3.5`,"aria-hidden":!0})})]}):(0,N.jsxs)(`button`,{type:`button`,className:`group inline-flex max-w-full items-center gap-2 text-left`,onClick:()=>c(!0),title:o,children:[(0,N.jsx)(`span`,{className:`truncate`,children:Og(e.title,t)}),(0,N.jsx)(cn,{className:`size-3 shrink-0 opacity-0 transition-opacity group-hover:opacity-60`,"aria-hidden":!0})]}),d?(0,N.jsx)(`p`,{className:`mt-1 text-xs text-destructive`,children:d}):null]})}),(0,N.jsx)(mg,{children:(0,N.jsx)(gg,{status:e.status})}),(0,N.jsx)(mg,{className:`text-muted-foreground`,children:e.locale??`-`}),(0,N.jsxs)(mg,{className:`font-mono text-xs text-muted-foreground`,children:[`v`,e.version]}),(0,N.jsx)(mg,{className:`text-muted-foreground`,children:Ag(e.updated_at)}),(0,N.jsxs)(mg,{children:[(0,N.jsxs)(`div`,{className:`flex items-center gap-1`,"data-tour":`entry-actions`,children:[(0,N.jsx)(`a`,{className:`row-action`,title:K(t,`crud.editTooltip`,{name:o}),href:`/admin/c/${encodeURIComponent(e.collection)}/${encodeURIComponent(e.id)}`,children:(0,N.jsx)(cn,{className:`size-3.5`,"aria-hidden":!0})}),(0,N.jsx)(`button`,{type:`button`,className:`row-action`,title:K(t,`crud.deleteTooltip`,{name:o}),disabled:a,onClick:()=>void m(),children:(0,N.jsx)(Tn,{className:`size-3.5`,"aria-hidden":!0})})]}),(0,N.jsx)(`span`,{className:`sr-only`,children:n?Mh(n,t):``})]})]})}function Og(e,t){return e==null||e===``?(0,N.jsx)(`span`,{className:`text-muted-foreground`,children:K(t,`collection.untitled`)}):typeof e==`string`?e:(0,N.jsx)(`span`,{className:`font-mono text-xs`,children:JSON.stringify(e)})}function kg(e,t){return typeof e==`string`&&e?e:e==null||e===``?K(t,`collection.untitled`):JSON.stringify(e)}function Ag(e){if(!Number.isFinite(e))return`-`;try{return vg.format(new Date(e))}catch{return`-`}}var jg=[{name:`product-cover-01`,type:`image/webp`,tag:`product`,alt:`商品主視覺`,url:`/media/product-cover-01.webp`,size:`1920 x 1440`,createdAt:`2026-06-01`,tone:`linear-gradient(135deg,#e8dfcf,#a9c0b5 45%,#2b5b55)`},{name:`brand-story`,type:`image/jpeg`,tag:`brand`,alt:`品牌介紹圖片`,url:`/media/brand-story.jpg`,size:`1600 x 1200`,createdAt:`2026-05-31`,tone:`linear-gradient(135deg,#f3dccb,#d8aa72 48%,#213d59)`},{name:`workflow-map`,type:`image/png`,tag:`content`,alt:`流程示意圖`,url:`/media/workflow-map.png`,size:`1440 x 1080`,createdAt:`2026-05-30`,tone:`linear-gradient(135deg,#e9edf4,#9fb2ca 45%,#253453)`},{name:`homepage-hero`,type:`image/webp`,tag:`content`,alt:`首頁主視覺`,url:`/media/homepage-hero.webp`,size:`2400 x 1350`,createdAt:`2026-05-29`,tone:`linear-gradient(135deg,#f7f1df,#91b7a7 44%,#173f45)`}];async function Mg(e){let t=Ng(e.purposes,e.preferredPurpose);if(!t)throw Error(`No media upload purpose is configured for this site.`);let n=await Ig(e.file,t),r=await Ac.post(`/media/uploads`,{filename:e.file.name,purpose:t.name,variants:n.map(e=>({mimeType:e.mimeType,byteSize:e.blob.size,role:e.role})),alt:e.alt??Wg(e.file),caption:e.caption});for(let e of n){let t=r.capabilities.find(t=>t.mimeType===e.mimeType&&t.role===e.role);if(!t)throw Error(`Upload capability missing for ${e.mimeType}.`);await fetch(t.uploadUrl,{method:t.method,headers:t.requiredHeaders??{"Content-Type":e.mimeType},body:e.blob})}return Ac.post(`/media/uploads/${encodeURIComponent(r.uploadGroupId)}/commit`,{alt:e.alt??Wg(e.file),caption:e.caption})}function Ng(e,t){if(t){let n=e.find(e=>e.name===t);if(n)return n}return e.find(e=>e.name===`content`)??e[0]??null}function Pg(e,t,n){let r=n[n.length-1]??``,i=Ug(t.replace(/-translations$/,``)),a=[];/cover/i.test(r)&&a.push(`${i}-cover`),/image|asset|media/i.test(r)&&(a.push(`${i}-image`),a.push(`${i}-media`)),a.push(`content`);for(let t of a)if(e.some(e=>e.name===t))return t;return e[0]?.name}function Fg(e){return(e.variants.find(e=>e.role===`primary`)??e.variants[0])?.publicUrl??null}async function Ig(e,t){if(!e.type.startsWith(`image/`)||e.type===`image/svg+xml`)throw Error(`Only raster image uploads are supported in the admin UI.`);let n=Lg(t.required);if(n.length===0)throw Error(`Media purpose '${t.name}' does not declare required image variants.`);let r=await createImageBitmap(e);try{let e=n.map(e=>zg(e,t)),i=e.find(Hg)??e[0],a=[];for(let n of e){let e=t.maxBytes[n]??2**53-1;a.push({mimeType:n,role:n===i?`primary`:`alternate`,blob:await Bg(r,n,e)})}return a}finally{r.close?.()}}function Lg(e){return e.map(e=>e.split(`,`).map(Rg).filter(e=>!!e)).filter(e=>e.length>0)}function Rg(e){let t=e.trim().toLowerCase();return t?t===`jpg`||t===`jpeg`||t===`image/jpg`?`image/jpeg`:t===`png`?`image/png`:t===`webp`?`image/webp`:t===`avif`?`image/avif`:t===`gif`?`image/gif`:t.includes(`/`)?t:null:null}function zg(e,t){for(let n of e)if(n.startsWith(`image/`)&&t.maxBytes[n]!=null)return n;throw Error(`No browser-supported image mime in purpose '${t.name}'.`)}async function Bg(e,t,n){let r=1,i=t===`image/jpeg`?[.88,.78,.68,.58]:[.78,.68,.58,.48],a=null;for(let o=0;o<6;o+=1){for(let o of i){let i=await Vg(e,t,r,o);if(i.type===t&&(a=i,i.size<=n))return i}r*=.82}if(a)return a;throw Error(`This browser cannot encode ${t}.`)}async function Vg(e,t,n,r){let i=document.createElement(`canvas`);i.width=Math.max(1,Math.round(e.width*n)),i.height=Math.max(1,Math.round(e.height*n));let a=i.getContext(`2d`);if(!a)throw Error(`Could not prepare image upload.`);a.drawImage(e,0,0,i.width,i.height);let o=await new Promise(e=>i.toBlob(e,t,r));if(!o)throw Error(`This browser cannot encode ${t}.`);return o}function Hg(e){return e===`image/jpeg`||e===`image/png`||e===`image/gif`}function Ug(e){return e.endsWith(`ies`)?`${e.slice(0,-3)}y`:e.endsWith(`ses`)?e.slice(0,-2):e.endsWith(`s`)&&e.length>1?e.slice(0,-1):e}function Wg(e){return e.name.replace(/\.[^.]+$/,``)}function Gg({value:e,onChange:t,label:n,mode:r,onModeChange:i,compact:a=!1,showPreview:o=!1}){let{language:s}=G(),c=M.useRef(null),l=M.useRef(null),[u,d]=M.useState(!1),[f,p]=M.useState(!1),[m,h]=M.useState(!1),[g,_]=M.useState(null),v=r??`rich`,y=P({queryKey:[`site`],queryFn:()=>Ac.get(`/site`)}),b=M.useCallback((n,r=``,i=``)=>{let a=c.current;if(!a){t(`${e}${n}${i}${r}`);return}let o=a.selectionStart,s=a.selectionEnd,l=e.slice(o,s)||i;t(`${e.slice(0,o)}${n}${l}${r}${e.slice(s)}`),window.requestAnimationFrame(()=>{a.focus();let e=o+n.length,t=e+l.length;a.setSelectionRange(e,t)})},[t,e]),x=M.useCallback(t=>{b(`${e.endsWith(`
139
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return M.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Vs=`DialogDescriptionWarning`,Hs=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${zs(Vs).contentName}}.`;return M.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Us=ms,Ws=bs,Gs=Ss,Ks=Es,qs=js,Js=Ns,Ys=Fs;function Xs({...e}){return(0,N.jsx)(Us,{"data-slot":`sheet`,...e})}function Zs({...e}){return(0,N.jsx)(Ws,{"data-slot":`sheet-portal`,...e})}function Qs({className:e,...t}){return(0,N.jsx)(Gs,{"data-slot":`sheet-overlay`,className:B(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function $s({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,N.jsxs)(Zs,{children:[(0,N.jsx)(Qs,{}),(0,N.jsxs)(Ks,{"data-slot":`sheet-content`,className:B(`fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500`,n===`right`&&`inset-y-0 right-0 h-full w-3/4 shadow-[-12px_0_32px_-12px_rgba(0,0,0,0.4)] data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm`,n===`left`&&`inset-y-0 left-0 h-full w-3/4 shadow-[12px_0_32px_-12px_rgba(0,0,0,0.4)] data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm`,n===`top`&&`inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top`,n===`bottom`&&`inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom`,e),...i,children:[t,r&&(0,N.jsxs)(Ys,{className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,N.jsx)(Fn,{className:`size-4`}),(0,N.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function ec({className:e,...t}){return(0,N.jsx)(`div`,{"data-slot":`sheet-header`,className:B(`flex flex-col gap-1.5 p-4`,e),...t})}function tc({className:e,...t}){return(0,N.jsx)(qs,{"data-slot":`sheet-title`,className:B(`font-semibold text-foreground`,e),...t})}function nc({className:e,...t}){return(0,N.jsx)(Js,{"data-slot":`sheet-description`,className:B(`text-sm text-muted-foreground`,e),...t})}var rc=`16rem`,ic=`3.25rem`,ac=`18rem`,oc=`b`,sc=M.createContext(null);function cc(){let[e,t]=M.useState(!1);return M.useEffect(()=>{let e=window.matchMedia(`(max-width: 767px)`),n=()=>t(window.innerWidth<768);return e.addEventListener(`change`,n),t(window.innerWidth<768),()=>e.removeEventListener(`change`,n)},[]),e}function lc({defaultOpen:e=!0,className:t,style:n,children:r,...i}){let a=cc(),[o,s]=M.useState(!1),[c,l]=M.useState(e),u=M.useCallback(e=>{Jn(e),l(e)},[]),d=M.useCallback(()=>a?s(e=>!e):u(!c),[a,c,u]);M.useEffect(()=>{let e=e=>{e.key===oc&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),d())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[d]);let f=c?`expanded`:`collapsed`,p=M.useMemo(()=>({state:f,open:c,setOpen:u,isMobile:a,openMobile:o,setOpenMobile:s,toggleSidebar:d}),[f,c,u,a,o,d]);return(0,N.jsx)(sc.Provider,{value:p,children:(0,N.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":rc,"--sidebar-width-icon":ic,...n},className:B(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar rtl:flex-row-reverse`,t),...i,children:r})})}function uc(){let e=M.useContext(sc);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function dc({side:e=`left`,variant:t=`sidebar`,className:n,children:r,...i}){let{isMobile:a,state:o,openMobile:s,setOpenMobile:c}=uc();return a?(0,N.jsx)(Xs,{open:s,onOpenChange:c,...i,children:(0,N.jsxs)($s,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) glass-strip p-0 text-sidebar-foreground [&>button]:hidden`,style:{"--sidebar-width":ac},side:e,showCloseButton:!1,children:[(0,N.jsxs)(ec,{className:`sr-only`,children:[(0,N.jsx)(tc,{children:`Sidebar`}),(0,N.jsx)(nc,{children:`Displays the mobile sidebar.`})]}),(0,N.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:r})]})}):(0,N.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":o,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,N.jsx)(`div`,{"data-slot":`sidebar-gap`,className:`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 group-data-[state=collapsed]:w-(--sidebar-width-icon)`}),(0,N.jsx)(`div`,{"data-slot":`sidebar-container`,className:B(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[width] duration-200 md:flex group-data-[state=collapsed]:w-(--sidebar-width-icon)`,e===`left`?`left-0`:`right-0`,t===`inset`?`p-2`:``,n),...i,children:(0,N.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`glass-strip flex h-full w-full flex-col`,children:r})})]})}function fc({className:e,onClick:t,...n}){let{toggleSidebar:r}=uc();return(0,N.jsxs)(V,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon`,className:B(`size-7`,e),onClick:e=>{t?.(e),r()},...n,children:[(0,N.jsx)(sn,{}),(0,N.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function pc({className:e,...t}){return(0,N.jsx)(`main`,{"data-slot":`sidebar-inset`,className:B(`relative flex w-full flex-1 flex-col bg-background`,`md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm rtl:md:peer-data-[variant=inset]:ml-2 rtl:md:peer-data-[variant=inset]:mr-0`,e),...t})}function mc({className:e,...t}){return(0,N.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:B(`flex flex-col gap-2 p-2`,e),...t})}function hc({className:e,...t}){return(0,N.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:B(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto`,e),...t})}function gc({className:e,...t}){return(0,N.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:B(`flex flex-col gap-2 p-2`,e),...t})}function _c({className:e,...t}){return(0,N.jsx)(`hr`,{"data-slot":`sidebar-separator`,"data-sidebar":`separator`,className:B(`mx-4 my-1 h-px w-auto border-0`,`bg-linear-to-r from-transparent via-[color-mix(in_srgb,var(--primary)_24%,transparent)] to-transparent`,`opacity-70 dark:via-[color-mix(in_srgb,var(--palette-teal-light)_18%,transparent)]`,e),...t})}function vc({className:e,...t}){return(0,N.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:B(`relative flex w-full min-w-0 flex-col p-2`,e),...t})}function yc({className:e,...t}){return(0,N.jsx)(`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:B(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70`,e),...t})}function bc({className:e,...t}){return(0,N.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:B(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function xc({className:e,...t}){return(0,N.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:B(`group/menu-item relative`,e),...t})}var Sc=$n(`peer/menu-button relative flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none 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 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,{variants:{size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm`}},defaultVariants:{size:`default`}});function Cc({asChild:e=!1,isActive:t=!1,size:n=`default`,className:r,...i}){return(0,N.jsx)(e?cr:`button`,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":n,"data-active":t,className:B(Sc({size:n}),r),...i})}function wc({className:e,...t}){return(0,N.jsx)(`ul`,{"data-slot":`sidebar-menu-sub`,"data-sidebar":`menu-sub`,className:B(`mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 rtl:-translate-x-px rtl:border-l-0 rtl:border-r`,e),...t})}function Tc({className:e,...t}){return(0,N.jsx)(`li`,{"data-slot":`sidebar-menu-sub-item`,"data-sidebar":`menu-sub-item`,className:B(`group/menu-sub-item relative`,e),...t})}function Ec({asChild:e=!1,size:t=`md`,isActive:n=!1,className:r,...i}){return(0,N.jsx)(e?cr:`a`,{"data-slot":`sidebar-menu-sub-button`,"data-sidebar":`menu-sub-button`,"data-size":t,"data-active":n,className:B(`flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[active=true]:font-medium [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,`rtl:translate-x-px`,t===`sm`&&`text-xs`,t===`md`&&`text-sm`,r),...i})}var Dc=`/admin/api`,Oc=class extends Error{status;body;constructor(e,t,n){super(e),this.status=t,this.body=n,this.name=`ApiError`}};async function kc(e,t){let n=await fetch(`${Dc}${e}`,{credentials:`same-origin`,...t,headers:{Accept:`application/json`,...t?.headers??{}}}),r=await n.text(),i=null;if(r)try{i=JSON.parse(r)}catch{i=r}if(!n.ok)throw new Oc(`${n.status} ${n.statusText}`,n.status,i);return i}var Ac={get:e=>kc(e),post:(e,t)=>kc(e,jc(`POST`,t)),patch:(e,t)=>kc(e,jc(`PATCH`,t)),delete:e=>kc(e,{method:`DELETE`})};function jc(e,t){return{method:e,headers:{"Content-Type":`application/json`},body:t===void 0?void 0:JSON.stringify(t)}}var Mc=[`draft`,`review`,`published`,`archived`],Nc=[`draft`,`published`,`archived`],Pc=M.createContext(null);function Fc(){return typeof window>`u`?{pathname:`/admin`,search:``}:{pathname:window.location.pathname,search:window.location.search}}function Ic(e){if(typeof window>`u`)return!1;let t=new URL(e,window.location.href);return!(t.origin!==window.location.origin||!t.pathname.startsWith(`/admin`)||t.pathname.startsWith(`/admin/api/`)||t.pathname.startsWith(`/admin/auth/`)||t.pathname===`/admin/logout`)}function Lc({children:e}){let[t,n]=M.useState(Fc),r=M.useCallback((e,t={})=>{if(typeof window>`u`)return;let r=new URL(e,window.location.href),i=`${r.pathname}${r.search}${r.hash}`;i!==`${window.location.pathname}${window.location.search}${window.location.hash}`&&(t.replace?window.history.replaceState(null,``,i):window.history.pushState(null,``,i));let a={pathname:r.pathname,search:r.search};(0,Xi.flushSync)(()=>n(a))},[]);M.useEffect(()=>{let e=()=>n(Fc());return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]),M.useEffect(()=>{let e=e=>{if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target;if(!(t instanceof Element))return;let n=t.closest(`a[href]`);n instanceof HTMLAnchorElement&&(n.target&&n.target!==`_self`||n.hasAttribute(`download`)||Ic(n.href)&&(e.preventDefault(),r(n.href)))};return document.addEventListener(`click`,e,{capture:!0}),()=>document.removeEventListener(`click`,e,{capture:!0})},[r]);let i=M.useMemo(()=>({location:t,navigate:r}),[t,r]);return(0,N.jsx)(Pc.Provider,{value:i,children:e})}function Rc(){let e=M.useContext(Pc);if(!e)throw Error(`useAdminRouter must be used inside AdminRouterProvider.`);return e}function zc(){return Rc().location}var Bc=[{value:`en`,label:`English`,nativeLabel:`English`,htmlLang:`en`,direction:`ltr`},{value:`de`,label:`German`,nativeLabel:`Deutsch`,htmlLang:`de`,direction:`ltr`},{value:`es`,label:`Spanish`,nativeLabel:`Español`,htmlLang:`es`,direction:`ltr`},{value:`fr`,label:`French`,nativeLabel:`Français`,htmlLang:`fr`,direction:`ltr`},{value:`it`,label:`Italian`,nativeLabel:`Italiano`,htmlLang:`it`,direction:`ltr`},{value:`ja`,label:`Japanese`,nativeLabel:`日本語`,htmlLang:`ja`,direction:`ltr`},{value:`ko`,label:`Korean`,nativeLabel:`한국어`,htmlLang:`ko`,direction:`ltr`},{value:`pt-BR`,label:`Portuguese (Brazil)`,nativeLabel:`Português (BR)`,htmlLang:`pt-BR`,direction:`ltr`},{value:`ru`,label:`Russian`,nativeLabel:`Русский`,htmlLang:`ru`,direction:`ltr`},{value:`zh-CN`,label:`Simplified Chinese`,nativeLabel:`简体中文`,htmlLang:`zh-Hans-CN`,direction:`ltr`},{value:`zh-TW`,label:`Traditional Chinese`,nativeLabel:`繁體中文`,htmlLang:`zh-Hant-TW`,direction:`ltr`},{value:`id`,label:`Indonesian`,nativeLabel:`Bahasa Indonesia`,htmlLang:`id`,direction:`ltr`},{value:`nl`,label:`Dutch`,nativeLabel:`Nederlands`,htmlLang:`nl`,direction:`ltr`},{value:`pl`,label:`Polish`,nativeLabel:`Polski`,htmlLang:`pl`,direction:`ltr`},{value:`tr`,label:`Turkish`,nativeLabel:`Türkçe`,htmlLang:`tr`,direction:`ltr`},{value:`vi`,label:`Vietnamese`,nativeLabel:`Tiếng Việt`,htmlLang:`vi`,direction:`ltr`},{value:`cs`,label:`Czech`,nativeLabel:`Čeština`,htmlLang:`cs`,direction:`ltr`},{value:`uk`,label:`Ukrainian`,nativeLabel:`Українська`,htmlLang:`uk`,direction:`ltr`},{value:`ar`,label:`Arabic`,nativeLabel:`العربية`,htmlLang:`ar`,direction:`rtl`},{value:`he`,label:`Hebrew`,nativeLabel:`עברית`,htmlLang:`he`,direction:`rtl`},{value:`fa`,label:`Persian`,nativeLabel:`فارسی`,htmlLang:`fa`,direction:`rtl`},{value:`th`,label:`Thai`,nativeLabel:`ไทย`,htmlLang:`th`,direction:`ltr`}],Vc=`cms.preference.language`,Hc=`cms.preference.direction`,Uc=`cms.preference.theme`,Wc=`cms.theme`,Gc=M.createContext(null);function Kc({children:e}){let[t,n]=M.useState(qc),[r,i]=M.useState(()=>Jc(qc())),[a,o]=M.useState(Yc),s=M.useCallback(e=>{let t=el(e);Zc(Vc,e),Zc(Hc,t),n(e),i(t)},[]),c=M.useCallback(e=>{Zc(Hc,e),i(e)},[]),l=M.useCallback(e=>{Zc(Uc,e),Zc(Wc,e),o(e)},[]);M.useEffect(()=>{document.documentElement.lang=Bc.find(e=>e.value===t)?.htmlLang??`en`,document.documentElement.dir=r},[t,r]),M.useEffect(()=>{let e=()=>{let e=typeof matchMedia<`u`&&matchMedia(`(prefers-color-scheme: dark)`).matches;document.documentElement.classList.toggle(`dark`,a===`dark`||a===`system`&&e)};if(e(),a!==`system`||typeof matchMedia>`u`)return;let t=matchMedia(`(prefers-color-scheme: dark)`);return t.addEventListener(`change`,e),()=>t.removeEventListener(`change`,e)},[a]);let u=M.useMemo(()=>({language:t,direction:r,theme:a,setLanguage:s,setDirection:c,setTheme:l}),[t,r,a,s,c,l]);return(0,N.jsx)(Gc.Provider,{value:u,children:e})}function G(){let e=M.useContext(Gc);if(!e)throw Error(`usePreferences must be used inside PreferencesProvider.`);return e}function qc(){let e=Xc(Vc);if(Qc(e))return e;if(typeof navigator>`u`)return`en`;for(let e of navigator.languages??[]){let t=$c(e);if(t!==`en`||e.toLowerCase().startsWith(`en`))return t}return $c(navigator.language)}function Jc(e){let t=Xc(Hc);return t===`rtl`||t===`ltr`?t:el(e)}function Yc(){let e=Xc(`cms.preference.theme`)??Xc(Wc);return e===`light`||e===`dark`||e===`system`?e:`system`}function Xc(e){try{return localStorage.getItem(e)}catch{return null}}function Zc(e,t){try{localStorage.setItem(e,t)}catch{}}function Qc(e){return Bc.some(t=>t.value===e)}function $c(e){let t=(e??``).toLowerCase();if(t===`zh-tw`||t===`zh-hant`||t.startsWith(`zh-hant`))return`zh-TW`;if(t===`zh-cn`||t===`zh-hans`||t.startsWith(`zh-hans`))return`zh-CN`;if(t.startsWith(`pt-br`)||t===`pt`)return`pt-BR`;let n=t.split(`-`)[0];return n===`ar`?`ar`:n===`cs`?`cs`:n===`de`?`de`:n===`es`?`es`:n===`fa`?`fa`:n===`fr`?`fr`:n===`he`||n===`iw`?`he`:n===`id`?`id`:n===`it`?`it`:n===`ja`?`ja`:n===`ko`?`ko`:n===`nl`?`nl`:n===`pl`?`pl`:n===`pt`?`pt-BR`:n===`ru`?`ru`:n===`th`?`th`:n===`tr`?`tr`:n===`uk`?`uk`:n===`vi`?`vi`:n===`zh`?`zh-TW`:`en`}function el(e){return Bc.find(t=>t.value===e)?.direction??`ltr`}var tl=`@aotter/mantle`,nl=`0.0.11-alpha.22`,rl=`https://www.npmjs.com/package/@aotter/mantle`,il=`https://github.com/aotter/mantle`,al=`M62.27,18.91c-24.86,0-45.09,20.23-45.09,45.09s20.23,45.09,45.09,45.09,45.09-20.23,45.09-45.09-20.23-45.09-45.09-45.09ZM65.07,102.86v-18.98h5.49c1.26,0,2.29-1.03,2.29-2.29v-4.47h11.6c1.26,0,2.29-1.03,2.29-2.29v-20.57c0-1.26-1.03-2.29-2.29-2.29h-5.13v-12.73c0-1.55-1.26-2.8-2.8-2.8s-2.8,1.26-2.8,2.8v12.73h-22.89v-12.73c0-1.55-1.26-2.8-2.81-2.8s-2.8,1.26-2.8,2.8v12.73h-5.13c-1.26,0-2.29,1.03-2.29,2.29v20.57c0,1.26,1.03,2.29,2.29,2.29h11.6v4.47c0,1.26,1.03,2.29,2.29,2.29h5.49v18.98c-20.32-1.45-36.16-18.42-36.16-38.86,0-21.49,17.48-38.97,38.97-38.97s38.97,17.48,38.97,38.97-15.84,37.42-36.16,38.86ZM41.89,73.03v-16.96h14.46c1.94,2.28,5.02,5.87,5.11,5.97.19.19.39.23.52.23s.34-.04.54-.25c.07-.06,1.33-1.44,4.33-4.69.4-.44.8-.87,1.17-1.26h14.63v16.96h-40.75ZM55.78,79.79v-3.15h12.98v3.15h-12.98Z`;function ol(e){switch(e){case`brand`:return`text-[#1a3062]`;case`black`:return`text-[#040000]`;case`white`:return`text-white`;default:return`text-current`}}function sl({className:e,title:t,tone:n=`current`}){return(0,N.jsxs)(`svg`,{viewBox:`0 0 128 128`,role:t?`img`:void 0,"aria-hidden":t?void 0:!0,className:B(ol(n),e),children:[t?(0,N.jsx)(`title`,{children:t}):null,(0,N.jsx)(`path`,{fill:`currentColor`,d:al})]})}function cl(){return(0,N.jsxs)(`div`,{className:B(`fixed bottom-3 end-3 z-30 hidden items-center gap-2 rounded-full`,`border border-border/60 bg-background/65 px-2.5 py-1.5 text-xs`,`text-muted-foreground shadow-[var(--glass-shadow)] backdrop-blur-md md:flex`),children:[(0,N.jsx)(sl,{className:`size-4 text-primary`}),(0,N.jsx)(`a`,{href:rl,target:`_blank`,rel:`noreferrer`,className:`font-medium text-foreground/80 hover:text-primary`,children:tl}),(0,N.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,N.jsx)(`a`,{href:il,target:`_blank`,rel:`noreferrer`,className:`hover:text-primary`,children:`GitHub`}),(0,N.jsxs)(`span`,{"aria-label":`version ${nl}`,children:[`v`,nl]})]})}var ll={en:{"admin.consoleTitle":`Admin console`,"auth.accessDenied.title":`Access denied`,"auth.accessDenied.noStaff":`You're signed in, but this account isn't on the admin staff list.`,"auth.accessDenied.askOwner":`Ask a site owner to add your GitHub login, or sign out to try a different account.`,"auth.error.title":`Something went wrong`,"auth.signIn.eyebrow":`AotterMantle admin`,"auth.signIn.title":`Sign in`,"auth.signIn.body":`Staff console. Access is gated by role after sign-in.`,"auth.signIn.methodsLoadFailed":`Couldn't load sign-in methods. Try refreshing.`,"auth.signIn.noMethods":`No sign-in methods are configured for this site.`,"auth.signIn.unknownMethod":`Unsupported sign-in method: {kind}.`,"auth.signIn.method.social.button":`Continue with {provider}`,"auth.signIn.method.email-otp.body":`Sign in with a one-time code sent to your email.`,"auth.signIn.method.email-otp.emailLabel":`Email address`,"auth.signIn.method.email-otp.emailPlaceholder":`you@example.com`,"auth.signIn.method.email-otp.sendButton":`Send code`,"auth.signIn.method.email-otp.sendFailed":`Couldn't send the code. Check the email and try again.`,"auth.signIn.method.email-otp.sentTo":`We sent a code to {email}.`,"auth.signIn.method.email-otp.otpLabel":`One-time code`,"auth.signIn.method.email-otp.otpPlaceholder":`Enter the 6-digit code`,"auth.signIn.method.email-otp.verifyButton":`Verify and sign in`,"auth.signIn.method.email-otp.verifyFailed":`That code didn't match. Try again.`,"auth.signIn.method.email-otp.back":`Use a different email`,"auth.signIn.method.magic-link.body":`We'll email you a one-tap sign-in link.`,"auth.signIn.method.magic-link.emailLabel":`Email address`,"auth.signIn.method.magic-link.emailPlaceholder":`you@example.com`,"auth.signIn.method.magic-link.sendButton":`Send sign-in link`,"auth.signIn.method.magic-link.sendFailed":`Couldn't send the link. Check the email and try again.`,"auth.signIn.method.magic-link.sentTo":`We sent a sign-in link to {email}.`,"auth.signIn.method.magic-link.clickHint":`Click the link in the email to finish signing in. The link expires shortly.`,"auth.signIn.method.magic-link.anotherEmail":`Use a different email`,"common.signOut":`Sign out`,"common.viewSite":`View site`,"common.copy":`Copy`,"common.open":`Open`,"common.failedToLoad":`Failed to load`,"common.signedIn":`Signed in`,"console.eyebrow":`Owner console`,"console.description":`{title} is deployed. Use this console for orientation; use an MCP-capable agent for content operations.`,"console.descriptionFallback":`Use this console for orientation; use an MCP-capable agent for content operations.`,"console.agent.title":`Next: connect an agent`,"console.agent.body":`Give this Staff MCP URL to Claude Code, Codex, Cursor, or another MCP client. It will open a consent screen, then the agent can manage this site's content with your staff permission.`,"console.workspace.title":`Start editing here`,"console.workspace.body":`Products, pages, media, and layout sections should all be editable from this console. Pick a common action to begin.`,"workspace.products":`Product list`,"workspace.pages":`Homepage and pages`,"workspace.media":`Media library`,"console.mcpUrl":`Staff MCP URL`,"console.publicUrl":`Public URL`,"console.loop.title":`Operational loop`,"console.loop.body":`Ask your content agent to list entries, create drafts, publish, unpublish, or adjust copy. Then refresh this console if you want a human-readable inventory.`,"console.onboarding.title":`Guided setup`,"console.onboarding.body":`A first-run overlay will guide new owners through editing content, checking media, and publishing.`,"console.onboarding.step1":`Review the seeded products and homepage sections.`,"console.onboarding.step2":`Edit copy with the rich editor inside the relevant product or page.`,"console.onboarding.step3":`Preview the storefront, then publish the change.`,"console.loop.step1":`Open the public site and inspect the result.`,"console.loop.step2":`Connect a second agent through MCP.`,"console.loop.step3":`Tell the agent what content or workflow to change.`,"console.collections.eyebrow":`Content model`,"console.collections.title":`Content lists`,"console.collections.body":`Products, pages, orders, and operational data from this site. Translation child schemas are folded into their parent.`,"console.collections.emptyTitle":`No collections defined yet`,"console.collections.emptyBody":`A blank project can add Schema manifests later; a starter should normally seed at least one collection.`,"console.collections.noDescription":`No description.`,"collection.breadcrumb":`Collections`,"collection.defaultDescription":`Entries in this collection.`,"collection.schemaSummary":`Manage entries, publishing state, and localized content for {name}.`,"collection.schemaDetails":`Schema notes`,"collection.searchPlaceholder":`Search title, id, status...`,"collection.filter.all":`All`,"collection.empty.title":`No entries yet`,"collection.empty.search":`No entries matched “{search}”.`,"collection.empty.withStatus":`No {status} entries in this collection.`,"collection.empty.all":`This collection has no entries yet.`,"collection.refreshing":`Updating the list...`,"collection.moreRows":`More rows are available, but cursor pagination is not wired in this admin shell yet.`,"collection.table.id":`ID`,"collection.table.title":`Title`,"collection.table.status":`Status`,"collection.table.locale":`Locale`,"collection.table.version":`Version`,"collection.table.updated":`Updated`,"collection.table.actions":`Actions`,"collection.actions.label":`Collection actions`,"collection.untitled":`(untitled)`,"crud.create":`Add`,"crud.edit":`Edit`,"crud.search":`Search`,"crud.delete":`Delete`,"crud.createTooltip":`Create a new {name} entry.`,"crud.editTooltip":`Edit {name}.`,"crud.searchTooltip":`Search {name}.`,"crud.deleteTooltip":`Delete {name}.`,"crud.duplicateTooltip":`Duplicate {name}.`,"crud.saveTitle":`Save title`,"crud.cancelTitle":`Cancel editing`,"crud.deleteConfirm":`Delete {name}? This cannot be undone.`,"crud.saving":`Saving...`,"crud.duplicating":`Duplicating...`,"crud.deleting":`Deleting...`,"entryEdit.back":`Back to {name}`,"entryEdit.body":`Edit {name} from its Schema manifest. Related child entries are inferred from existing schema relationships.`,"entryEdit.parent":`Parent: {name}`,"entryEdit.save":`Save changes`,"entryEdit.saveTooltip":`Save this entry.`,"entryEdit.fields":`Entry fields`,"entryEdit.meta":`Entry details`,"entryEdit.related":`Related entries`,"entryEdit.noRelated":`No child collections were inferred for this entry.`,"entryEdit.noChildEntries":`No child entries match this entry yet.`,"entryEdit.relationship":`Joined by {child} from parent {parent}.`,"entryEdit.addItem":`Add item`,"entryEdit.removeItem":`Remove item`,"entryEdit.emptyOption":`No value`,"entryEdit.boolean":`Enabled`,"entryEdit.publish":`Publish`,"entryEdit.publishing":`Publishing...`,"entryEdit.publishTooltip":`Publish this draft.`,"entryEdit.publishDisabledDirty":`Save changes before publishing.`,"entryEdit.unpublish":`Unpublish`,"entryEdit.unpublishing":`Unpublishing...`,"entryEdit.unpublishTooltip":`Move this entry back to draft so it can be edited.`,"entryEdit.uploadMedia":`Upload`,"entryEdit.uploadingMedia":`Uploading...`,"entryEdit.noMediaPurpose":`No media upload purpose is configured.`,"entryEdit.skus":`Variants and pricing`,"entryEdit.skusBody":`Manage sellable SKUs for {name}. Prices, original prices, inventory behavior, and option values stay attached to this product.`,"entryEdit.openAdvanced":`Open full SKU editor`,"entryEdit.priceMinor":`Price`,"entryEdit.compareAtPriceMinor":`Original price`,"entryEdit.inventoryMode":`Inventory`,"entryEdit.inventoryTracked":`Track stock`,"entryEdit.inventoryUntracked":`Unlimited / untracked`,"entryEdit.currency":`Currency`,"entryEdit.skuInlineHint":`Use the full editor for media, raw option JSON, or advanced fields.`,"productEdit.back":`Back to products`,"productEdit.title":`Edit product`,"productEdit.body":`Edit product copy, price, promotions, brand story, and service details in one place.`,"productEdit.save":`Save changes`,"productEdit.basic":`Product content`,"productEdit.shortDescription":`Short description`,"productEdit.description":`Product description`,"productEdit.price":`Price`,"productEdit.salePrice":`Sale price`,"productEdit.compareAtPrice":`Original price`,"productEdit.promotions":`Promotions`,"productEdit.promoLabel":`Label`,"productEdit.promoTitle":`Promotion title`,"productEdit.promoBody":`Promotion details`,"productEdit.relatedSku":`Bundled SKU`,"productEdit.noRelatedSku":`No bundled SKU`,"productEdit.discountPercent":`Discount %`,"productEdit.addPromotion":`Add promotion`,"productEdit.brand":`Brand story`,"productEdit.brandName":`Brand name`,"productEdit.brandTagline":`Brand tagline`,"productEdit.brandIntro":`Brand introduction`,"productEdit.serviceIncludes":`Service includes`,"settings.page.title":`Store settings`,"settings.page.body":`Manage site-level brand copy and default service information used across the storefront.`,"settings.tabsLabel":`Store settings sections`,"settings.tab.brand":`Brand`,"settings.tab.tracking":`Tracking`,"settings.brandSection":`Brand and service`,"settings.brandSectionBody":`Default storefront copy used by product pages and generated homepage sections.`,"settings.siteBrand":`Site brand`,"settings.siteTitle":`Site title`,"settings.siteDescription":`Site description`,"settings.trackingSection":`Tracking codes`,"settings.trackingSectionBody":`Fill in analytics IDs and Mantle will inject the matching tracking scripts into generated storefront pages.`,"settings.ga4MeasurementId":`GA4 Measurement ID`,"settings.ga4MeasurementIdHelp":`Use the ID only, for example G-XXXXXXXXXX. Do not paste the whole gtag script.`,"settings.facebookPixelId":`Facebook Pixel ID`,"settings.facebookPixelIdHelp":`Use the numeric Pixel ID only. Mantle will generate the base Pixel code.`,"guide.title":`Your store admin is ready`,"guide.body":`Use this guided flow to understand where editing happens before you ask an agent to make larger changes.`,"guide.step1":`Open Products and confirm the seeded storefront items.`,"guide.step2":`Use Add, Edit, Search, or Delete from the collection page.`,"guide.step3":`Preview the public site, then keep refining with the rich editor inside each content area.`,"guide.close":`Close guide`,"guide.open":`Guide`,"guide.next":`Next`,"guide.prev":`Previous`,"guide.finish":`Finish`,"guide.products.title":`Start with products`,"guide.products.body":`Open the Products collection to manage storefront items, SKUs, prices, and localized product copy.`,"guide.filters.title":`Filter publishing states`,"guide.filters.body":`Switch between all, draft, published, and archived entries without leaving the list.`,"guide.actions.title":`Edit from the list`,"guide.actions.body":`Use the row actions to edit product details, duplicate an item, or remove it from the site.`,"guide.reopen.title":`Reopen this guide anytime`,"guide.reopen.body":`The guide button stays in the status bar, so users can turn this walkthrough on again whenever they need it.`,"nav.home":`Home`,"nav.content":`Content`,"nav.editor":`Editor`,"nav.media":`Media library`,"nav.more":`More`,"nav.approvals":`Approvals`,"nav.settings":`Settings`,"nav.staff":`Staff`,"staff.page.title":`Staff`,"staff.page.body":`Invite staff by email, assign roles, and revoke pending invitations. Only owners can see this page.`,"staff.invite.title":`Invite staff`,"staff.invite.emailLabel":`Email address`,"staff.invite.emailPlaceholder":`teammate@example.com`,"staff.invite.roleLabel":`Role`,"staff.invite.button":`Invite`,"staff.invite.sending":`Inviting…`,"staff.invite.revoke":`Revoke`,"staff.invite.hint":`Invitees sign in at /admin/sign-in with the invited email (magic link, email code, or a social account on the same address) and land with their role already in effect.`,"staff.table.name":`Name`,"staff.table.email":`Email`,"staff.table.status":`Status / sign-in`,"staff.table.role":`Role`,"staff.role.owner":`Owner`,"staff.role.editor":`Editor`,"staff.role.contributor":`Contributor`,"staff.role.none":`No role`,"staff.badge.invited":`Invited`,"staff.status.emailSignIn":`Email sign-in`,"staff.self":`you`,"status.draft":`Drafts`,"status.review":`In Review`,"status.published":`Published`,"status.archived":`Archived`,"preferences.heading":`Preferences`,"preferences.language":`Admin language`,"preferences.language.search":`Search languages...`,"preferences.language.noResults":`No languages found.`,"preferences.direction":`Text direction`,"preferences.direction.auto":`Text direction follows the selected language.`,"preferences.appearance":`Appearance`,"preferences.light":`Light`,"preferences.dark":`Dark`,"preferences.system":`System`,"preferences.ltr":`Left to right`,"preferences.rtl":`Right to left`,"preferences.page.title":`Personal preferences`,"preferences.page.body":`These preferences stay on this browser. They change the admin console only and do not modify site settings.`,"preferences.page.languageBody":`Choose the language used by system pages and admin chrome.`,"preferences.page.appearanceBody":`Choose light, dark, or follow your operating system.`,"preferences.page.open":`Preferences`,"settings.planned.title":`Settings are not wired yet`,"settings.planned.body":`Settings are for values persisted to the site, such as site config. Preferences stay local to this browser.`,"system.notFound.title":`Not found`,"system.notFound.plannedTitle":`Not wired yet`,"system.notFound.body":`No view registered for`,"system.notFound.back":`Back to home`,"editor.page.title":`Content editor`,"editor.page.body":`Draft copy in Markdown, HTML, or rich text before handing it to an agent or publishing workflow.`,"editor.mode.markdown":`Markdown`,"editor.mode.html":`HTML`,"editor.mode.rich":`Rich editor`,"editor.titleLabel":`Title`,"editor.slugLabel":`Slug`,"editor.bodyLabel":`Body`,"editor.preview":`Preview`,"editor.insertBlock":`Insert block`,"editor.saveDraft":`Save draft`,"editor.markdownHint":`Supports headings, lists, links, and fenced code blocks.`,"editor.htmlHint":`Edit trusted HTML fragments with a plain source view.`,"editor.richHint":`Format sections, callouts, and product copy without touching markup.`,"editor.toolbar":`Rich editor toolbar`,"editor.undo":`Undo`,"editor.redo":`Redo`,"editor.aiClean":`Insert callout`,"editor.uploadImage":`Upload image`,"editor.uploading":`Uploading image...`,"editor.textStyle":`Text style`,"editor.headingPlaceholder":`Heading`,"editor.decreaseFont":`Decrease font size`,"editor.increaseFont":`Increase font size`,"editor.selectedText":`selected text`,"editor.bold":`Bold`,"editor.italic":`Italic`,"editor.underline":`Underline`,"editor.strike":`Strikethrough`,"editor.inlineCode":`Inline code`,"editor.textColor":`Text color`,"editor.highlight":`Highlight`,"editor.palette":`Brand color`,"editor.alignLeft":`Align left`,"editor.alignCenter":`Align center`,"editor.alignRight":`Align right`,"editor.bulletList":`Bullet list`,"editor.numberList":`Numbered list`,"editor.checkList":`Checklist`,"editor.indent":`Indent`,"editor.link":`Link`,"editor.linkText":`link text`,"editor.table":`Table`,"editor.emoji":`Emoji`,"editor.mediaLibrary":`Media library`,"editor.imageUrl":`Image URL`,"editor.insertImage":`Insert image`,"editor.videoUrl":`YouTube / Dailymotion URL`,"editor.insertVideo":`Insert video`,"editor.audioHint":`Audio embed`,"media.page.title":`Media library`,"media.page.body":`Upload, search, crop, tag, and reuse images across products and pages.`,"media.upload":`Upload media`,"media.search":`Search media...`,"media.crop":`Crop`,"media.alt":`Alt text`,"media.tags":`Tags`,"media.empty":`No media assets yet.`,"media.dropzone":`Drop files here or choose images`,"media.dropzoneHint":`Assets uploaded here can be reused by products, pages, and storefront sections.`,"media.copyUrl":`Copy image URL`,"media.filter":`Filter media`,"media.filter.all":`All`,"media.filter.product":`Products`,"media.filter.brand":`Brand`,"media.filter.content":`Content`,"media.sort":`Sort media`,"media.sort.newest":`Newest`,"media.sort.name":`Name`,"media.sort.type":`Type`,"approvals.title":`Approvals`,"approvals.body":`Review editorial entries that are waiting for approval before they go live.`,"approvals.emptyTitle":`Nothing is waiting for review`,"approvals.emptyBody":`Entries submitted for review will appear here by collection.`,"approvals.groupBody":`{count} entries are currently marked {status}.`,"approvals.openCollection":`Open collection`,"approvals.reviewEntry":`Review`},"zh-TW":{"admin.consoleTitle":`管理後台`,"auth.accessDenied.title":`無法存取`,"auth.accessDenied.noStaff":`你已登入,但這個帳號不在 admin staff 清單內。`,"auth.accessDenied.askOwner":`請網站 owner 加入你的 GitHub login,或登出改用其他帳號。`,"auth.error.title":`發生錯誤`,"auth.signIn.eyebrow":`AotterMantle 後台`,"auth.signIn.title":`登入`,"auth.signIn.body":`Staff 後台。登入後依角色決定能用的範圍。`,"auth.signIn.methodsLoadFailed":`讀取登入方式失敗,請重新整理頁面。`,"auth.signIn.noMethods":`這個站台還沒設定任何登入方式。`,"auth.signIn.unknownMethod":`不支援的登入方式:{kind}。`,"auth.signIn.method.social.button":`使用 {provider} 繼續`,"auth.signIn.method.email-otp.body":`輸入 email,我們會寄一次性驗證碼給你。`,"auth.signIn.method.email-otp.emailLabel":`電子郵件`,"auth.signIn.method.email-otp.emailPlaceholder":`you@example.com`,"auth.signIn.method.email-otp.sendButton":`寄送驗證碼`,"auth.signIn.method.email-otp.sendFailed":`驗證碼寄送失敗,請確認 email 後重試。`,"auth.signIn.method.email-otp.sentTo":`已寄驗證碼到 {email}。`,"auth.signIn.method.email-otp.otpLabel":`驗證碼`,"auth.signIn.method.email-otp.otpPlaceholder":`輸入 6 位驗證碼`,"auth.signIn.method.email-otp.verifyButton":`驗證並登入`,"auth.signIn.method.email-otp.verifyFailed":`驗證碼錯誤,請再試一次。`,"auth.signIn.method.email-otp.back":`用其他 email`,"auth.signIn.method.magic-link.body":`我們會寄一個一鍵登入連結給你。`,"auth.signIn.method.magic-link.emailLabel":`電子郵件`,"auth.signIn.method.magic-link.emailPlaceholder":`you@example.com`,"auth.signIn.method.magic-link.sendButton":`寄送登入連結`,"auth.signIn.method.magic-link.sendFailed":`連結寄送失敗,請確認 email 後重試。`,"auth.signIn.method.magic-link.sentTo":`已將登入連結寄到 {email}。`,"auth.signIn.method.magic-link.clickHint":`請點 email 裡的連結完成登入。連結很快會過期。`,"auth.signIn.method.magic-link.anotherEmail":`用其他 email`,"common.signOut":`登出`,"common.viewSite":`查看網站`,"common.copy":`複製`,"common.open":`開啟`,"common.failedToLoad":`載入失敗`,"common.signedIn":`已登入`,"console.eyebrow":`Owner console`,"console.description":`{title} 已部署完成。這裡是操作入口;內容營運請交給支援 MCP 的 agent。`,"console.descriptionFallback":`這裡是操作入口;內容營運請交給支援 MCP 的 agent。`,"console.agent.title":`下一步:連接 agent`,"console.agent.body":`把這個 Staff MCP URL 交給 Claude Code、Codex、Cursor 或其他 MCP client。它會開啟 consent 畫面,授權後 agent 就能用你的 staff 權限管理網站內容。`,"console.workspace.title":`從這裡開始編輯`,"console.workspace.body":`商品、頁面、媒體與首頁區塊都應該能在這個後台管理。先選一個常用操作開始。`,"workspace.products":`商品清單`,"workspace.pages":`首頁與頁面編排`,"workspace.media":`媒體庫`,"console.mcpUrl":`Staff MCP URL`,"console.publicUrl":`公開網站 URL`,"console.loop.title":`營運閉環`,"console.loop.body":`你可以請內容 agent 列出 entries、建立草稿、發布、取消發布或調整文案。需要人工盤點時,再回這個 console 查看。`,"console.onboarding.title":`操作導覽`,"console.onboarding.body":`第一次進入後台時,會用 overlay 帶店主完成內容編輯、媒體檢查與發布。`,"console.onboarding.step1":`先檢查預設商品與首頁區塊。`,"console.onboarding.step2":`在商品或頁面內直接用 Rich Editor 修改內容。`,"console.onboarding.step3":`預覽前台,再發布變更。`,"console.loop.step1":`先打開公開網站檢查結果。`,"console.loop.step2":`透過 MCP 連接第二個 agent。`,"console.loop.step3":`用自然語言告訴 agent 要改內容或流程。`,"console.collections.eyebrow":`內容模型`,"console.collections.title":`內容清單`,"console.collections.body":`這裡會列出這個網站的商品、頁面、訂單與營運資料。翻譯 child schema 會折進 parent 顯示。`,"console.collections.emptyTitle":`尚未定義 collections`,"console.collections.emptyBody":`Blank project 之後可以新增 Schema manifests;starter 通常應該至少有一個 collection。`,"console.collections.noDescription":`沒有描述。`,"collection.breadcrumb":`內容清單`,"collection.defaultDescription":`這個 collection 裡的 entries。`,"collection.schemaSummary":`管理 {name} 的 entries、發布狀態與多語內容。`,"collection.schemaDetails":`Schema 說明`,"collection.searchPlaceholder":`搜尋標題、ID、狀態...`,"collection.filter.all":`全部`,"collection.empty.title":`目前沒有 entries`,"collection.empty.search":`沒有符合「{search}」的資料。`,"collection.empty.withStatus":`這個 collection 目前沒有 {status} entries。`,"collection.empty.all":`這個 collection 目前沒有 entries。`,"collection.refreshing":`清單更新中...`,"collection.moreRows":`還有更多資料,但這個 admin shell 尚未接上 cursor pagination。`,"collection.table.id":`ID`,"collection.table.title":`標題`,"collection.table.status":`狀態`,"collection.table.locale":`語言`,"collection.table.version":`版本`,"collection.table.updated":`更新時間`,"collection.table.actions":`操作`,"collection.actions.label":`內容操作`,"collection.untitled":`(未命名)`,"crud.create":`新增`,"crud.edit":`編輯`,"crud.search":`查詢`,"crud.delete":`刪除`,"crud.createTooltip":`新增一筆{name}。`,"crud.editTooltip":`編輯{name}。`,"crud.searchTooltip":`查詢{name}。`,"crud.deleteTooltip":`刪除{name}。`,"crud.duplicateTooltip":`複製{name}。`,"crud.saveTitle":`儲存標題`,"crud.cancelTitle":`取消編輯`,"crud.deleteConfirm":`確定要刪除{name}?這個動作無法復原。`,"crud.saving":`儲存中...`,"crud.duplicating":`複製中...`,"crud.deleting":`刪除中...`,"entryEdit.back":`回到 {name}`,"entryEdit.body":`依據 {name} 的 Schema manifest 編輯資料;相關子資料會由既有 schema 關係自動推導。`,"entryEdit.parent":`父層:{name}`,"entryEdit.save":`儲存變更`,"entryEdit.saveTooltip":`儲存這筆資料。`,"entryEdit.fields":`資料欄位`,"entryEdit.meta":`資料資訊`,"entryEdit.related":`相關資料`,"entryEdit.noRelated":`目前沒有推導出這筆資料的子 collection。`,"entryEdit.noChildEntries":`目前沒有符合這筆資料的子資料。`,"entryEdit.relationship":`透過子欄位 {child} 對應父欄位 {parent}。`,"entryEdit.addItem":`新增項目`,"entryEdit.removeItem":`移除項目`,"entryEdit.emptyOption":`無值`,"entryEdit.boolean":`啟用`,"entryEdit.skus":`規格與售價`,"entryEdit.skusBody":`管理 {name} 底下實際可販售的 SKU。價格、原價、庫存方式與規格值都會跟著這個商品。`,"entryEdit.openAdvanced":`開啟完整 SKU 編輯器`,"entryEdit.priceMinor":`售價`,"entryEdit.compareAtPriceMinor":`原價`,"entryEdit.inventoryMode":`庫存模式`,"entryEdit.inventoryTracked":`追蹤庫存`,"entryEdit.inventoryUntracked":`不限量/不追蹤`,"entryEdit.currency":`幣別`,"entryEdit.skuInlineHint":`媒體、原始規格 JSON 或進階欄位可用完整編輯器處理。`,"productEdit.back":`回商品清單`,"productEdit.title":`編輯商品`,"productEdit.body":`在同一頁編輯商品文案、價格、優惠活動、品牌介紹與服務內容。`,"productEdit.save":`儲存變更`,"productEdit.basic":`商品內容`,"productEdit.shortDescription":`短描述`,"productEdit.description":`商品介紹`,"productEdit.price":`商品價格`,"productEdit.salePrice":`售價`,"productEdit.compareAtPrice":`原價`,"productEdit.promotions":`活動優惠組合`,"productEdit.promoLabel":`標籤`,"productEdit.promoTitle":`活動標題`,"productEdit.promoBody":`活動內容`,"productEdit.relatedSku":`組合 SKU`,"productEdit.noRelatedSku":`不套用組合 SKU`,"productEdit.discountPercent":`折扣 %`,"productEdit.addPromotion":`新增優惠`,"productEdit.brand":`品牌介紹`,"productEdit.brandName":`品牌名稱`,"productEdit.brandTagline":`品牌標語`,"productEdit.brandIntro":`品牌介紹`,"productEdit.serviceIncludes":`服務包含`,"settings.page.title":`商店設定`,"settings.page.body":`管理全站品牌文案與預設服務資訊,讓商品與首頁可以共用。`,"settings.tabsLabel":`商店設定分頁`,"settings.tab.brand":`品牌`,"settings.tab.tracking":`追蹤碼`,"settings.brandSection":`品牌與服務`,"settings.brandSectionBody":`商品頁與產生首頁區塊會共用的預設商店文案。`,"settings.siteBrand":`網站品牌`,"settings.siteTitle":`網站標題`,"settings.siteDescription":`網站描述`,"settings.trackingSection":`追蹤碼`,"settings.trackingSectionBody":`填入 analytics ID 後,Mantle 會在產生的前台頁面自動埋入對應追蹤碼。`,"settings.ga4MeasurementId":`GA4 Measurement ID`,"settings.ga4MeasurementIdHelp":`只需要填 ID,例如 G-XXXXXXXXXX,不要貼整段 gtag script。`,"settings.facebookPixelId":`Facebook Pixel ID`,"settings.facebookPixelIdHelp":`只需要填數字 Pixel ID,Mantle 會產生標準 Pixel base code。`,"guide.title":`你的商店後台已經準備好了`,"guide.body":`先用這個導覽了解每個編輯入口,再交給 agent 做更大量的調整。`,"guide.step1":`打開商品清單,確認前台預設商品都有進後台。`,"guide.step2":`在 collection 頁使用新增、編輯、查詢或刪除。`,"guide.step3":`預覽公開網站,再在各內容區直接用 Rich Editor 持續調整。`,"guide.close":`關閉引導`,"guide.open":`使用者引導`,"guide.next":`下一步`,"guide.prev":`上一步`,"guide.finish":`完成`,"guide.products.title":`先從商品開始`,"guide.products.body":`打開商品 collection,管理前台商品、SKU、價格與多語商品文案。`,"guide.filters.title":`切換發布狀態`,"guide.filters.body":`在清單上直接切換全部、草稿、已發布與已封存,不需要離開目前頁面。`,"guide.actions.title":`在清單裡直接操作`,"guide.actions.body":`用每列右側操作編輯商品內容、複製商品,或從網站移除該項目。`,"guide.reopen.title":`隨時重新打開引導`,"guide.reopen.body":`右上角會保留使用者引導按鈕,需要時可以再次開啟或關閉這套逐步導覽。`,"nav.home":`首頁`,"nav.content":`內容`,"nav.editor":`編輯器`,"nav.media":`媒體庫`,"nav.more":`更多`,"nav.approvals":`審核`,"nav.settings":`設定`,"nav.staff":`員工管理`,"staff.page.title":`員工管理`,"staff.page.body":`以 email 邀請員工、指派角色、撤銷尚未使用的邀請。僅 owner 可見此頁。`,"staff.invite.title":`邀請員工`,"staff.invite.emailLabel":`Email`,"staff.invite.emailPlaceholder":`teammate@example.com`,"staff.invite.roleLabel":`角色`,"staff.invite.button":`建立邀請`,"staff.invite.sending":`邀請中…`,"staff.invite.revoke":`撤銷`,"staff.invite.hint":`受邀者到 /admin/sign-in 用受邀的 email 登入(magic link、email 驗證碼,或同信箱的社群帳號),登入時角色即已生效。`,"staff.table.name":`姓名`,"staff.table.email":`Email`,"staff.table.status":`狀態/登入方式`,"staff.table.role":`角色`,"staff.role.owner":`管理者`,"staff.role.editor":`編輯`,"staff.role.contributor":`協作者`,"staff.role.none":`無角色`,"staff.badge.invited":`邀請中`,"staff.status.emailSignIn":`Email 登入`,"staff.self":`你自己`,"status.draft":`草稿`,"status.review":`審核中`,"status.published":`已發布`,"status.archived":`已封存`,"preferences.heading":`偏好設定`,"preferences.language":`後台語言`,"preferences.language.search":`搜尋語言...`,"preferences.language.noResults":`找不到語言。`,"preferences.direction":`文字方向`,"preferences.direction.auto":`文字方向會跟隨選擇的語言。`,"preferences.appearance":`外觀`,"preferences.light":`淺色`,"preferences.dark":`深色`,"preferences.system":`跟隨系統`,"preferences.ltr":`左到右`,"preferences.rtl":`右到左`,"preferences.page.title":`個人偏好`,"preferences.page.body":`這些偏好只保存在這個瀏覽器,只影響 admin console,不會改動站台設定。`,"preferences.page.languageBody":`選擇系統頁與 admin chrome 使用的語言。`,"preferences.page.appearanceBody":`選擇淺色、深色,或跟隨作業系統。`,"preferences.page.open":`個人偏好`,"settings.planned.title":`Settings 尚未接上`,"settings.planned.body":`Settings 是會寫進站台的資料,例如 site config。Preferences 則只保存在這個瀏覽器。`,"system.notFound.title":`找不到頁面`,"system.notFound.plannedTitle":`尚未接上`,"system.notFound.body":`沒有 view 註冊在`,"system.notFound.back":`回首頁`,"editor.page.title":`內容編輯器`,"editor.page.body":`在交給 agent 或發布流程之前,先用 Markdown、HTML 或 Rich Editor 編輯內容草稿。`,"editor.mode.markdown":`Markdown`,"editor.mode.html":`HTML`,"editor.mode.rich":`Rich Editor`,"editor.titleLabel":`標題`,"editor.slugLabel":`Slug`,"editor.bodyLabel":`本文`,"editor.preview":`預覽`,"editor.insertBlock":`插入區塊`,"editor.saveDraft":`儲存草稿`,"editor.markdownHint":`支援標題、清單、連結與 fenced code blocks。`,"editor.htmlHint":`用原始碼模式編輯可信任的 HTML 片段。`,"editor.richHint":`不碰 markup 也能整理段落、提示框與商品文案。`,"editor.toolbar":`Rich Editor 工具列`,"editor.undo":`復原`,"editor.redo":`重做`,"editor.aiClean":`插入提示區塊`,"editor.uploadImage":`上傳圖片`,"editor.uploading":`圖片上傳中...`,"editor.textStyle":`文字樣式`,"editor.headingPlaceholder":`標題`,"editor.decreaseFont":`縮小字級`,"editor.increaseFont":`放大字級`,"editor.selectedText":`選取文字`,"editor.bold":`粗體`,"editor.italic":`斜體`,"editor.underline":`底線`,"editor.strike":`刪除線`,"editor.inlineCode":`行內程式碼`,"editor.textColor":`文字顏色`,"editor.highlight":`螢光標記`,"editor.palette":`品牌色`,"editor.alignLeft":`靠左對齊`,"editor.alignCenter":`置中對齊`,"editor.alignRight":`靠右對齊`,"editor.bulletList":`項目清單`,"editor.numberList":`編號清單`,"editor.checkList":`待辦清單`,"editor.indent":`縮排`,"editor.link":`連結`,"editor.linkText":`連結文字`,"editor.table":`表格`,"editor.emoji":`表情符號`,"editor.mediaLibrary":`媒體庫`,"editor.imageUrl":`圖片網址`,"editor.insertImage":`插入圖片`,"editor.videoUrl":`YouTube / Dailymotion 連結`,"editor.insertVideo":`插入影片`,"editor.audioHint":`音訊嵌入`,"media.page.title":`媒體庫`,"media.page.body":`上傳、搜尋、裁切、標記並重複使用商品與頁面圖片。`,"media.upload":`上傳媒體`,"media.search":`搜尋媒體...`,"media.crop":`裁切`,"media.alt":`替代文字`,"media.tags":`標籤`,"media.empty":`目前沒有媒體素材。`,"media.dropzone":`拖放檔案到這裡,或選擇圖片`,"media.dropzoneHint":`上傳後的素材可重複用在商品、頁面與前台區塊。`,"media.copyUrl":`複製圖片網址`,"media.filter":`篩選媒體`,"media.filter.all":`全部`,"media.filter.product":`商品`,"media.filter.brand":`品牌`,"media.filter.content":`內容`,"media.sort":`排序媒體`,"media.sort.newest":`最新`,"media.sort.name":`名稱`,"media.sort.type":`類型`,"approvals.title":`審核中心`,"approvals.body":`集中查看等待審核的 editorial entries,發布前可以逐筆檢查內容。`,"approvals.emptyTitle":`目前沒有等待審核的內容`,"approvals.emptyBody":`送出審核的資料會依 collection 分組顯示在這裡。`,"approvals.groupBody":`目前有 {count} 筆內容標記為「{status}」。`,"approvals.openCollection":`開啟清單`,"approvals.reviewEntry":`審核`},"zh-CN":{"admin.consoleTitle":`管理后台`,"auth.signIn.title":`登录`,"common.signOut":`登出`,"common.viewSite":`查看网站`,"common.copy":`复制`,"common.open":`打开`,"common.failedToLoad":`加载失败`,"common.signedIn":`已登录`,"console.agent.title":`下一步:连接 agent`,"console.workspace.title":`从这里开始编辑`,"console.workspace.body":`商品、页面、媒体与首页区块都应该能在这个后台管理。先选一个常用操作开始。`,"workspace.products":`商品清单`,"workspace.pages":`首页与页面编排`,"workspace.media":`媒体库`,"console.onboarding.title":`操作导览`,"console.onboarding.body":`第一次进入后台时,会用 overlay 带店主完成内容编辑、媒体检查与发布。`,"console.onboarding.step1":`先检查预设商品与首页区块。`,"console.onboarding.step2":`在商品或页面内直接用 Rich Editor 修改内容。`,"console.onboarding.step3":`预览前台,再发布变更。`,"console.mcpUrl":`Staff MCP URL`,"console.publicUrl":`公开网站 URL`,"console.collections.title":`内容清单`,"console.collections.body":`这里会列出这个网站的商品、页面、订单与运营数据。翻译 child schema 会折进 parent 显示。`,"collection.breadcrumb":`内容清单`,"collection.filter.all":`全部`,"collection.table.title":`标题`,"collection.table.status":`状态`,"collection.table.locale":`语言`,"collection.table.version":`版本`,"collection.table.updated":`更新时间`,"collection.table.actions":`操作`,"collection.actions.label":`内容操作`,"collection.untitled":`(未命名)`,"collection.searchPlaceholder":`搜索标题、ID、状态...`,"collection.empty.search":`没有符合“{search}”的资料。`,"crud.create":`新增`,"crud.edit":`编辑`,"crud.search":`查询`,"crud.delete":`删除`,"crud.createTooltip":`新增一笔{name}。`,"crud.editTooltip":`编辑{name}。`,"crud.searchTooltip":`查询{name}。`,"crud.deleteTooltip":`删除{name}。`,"crud.duplicateTooltip":`复制{name}。`,"crud.saveTitle":`保存标题`,"crud.cancelTitle":`取消编辑`,"crud.deleteConfirm":`确定要删除{name}?这个动作无法复原。`,"crud.saving":`保存中...`,"crud.duplicating":`复制中...`,"crud.deleting":`删除中...`,"entryEdit.back":`回到 {name}`,"entryEdit.body":`依据 {name} 的 Schema manifest 编辑资料;相关子资料会由既有 schema 关系自动推导。`,"entryEdit.parent":`父层:{name}`,"entryEdit.save":`保存变更`,"entryEdit.saveTooltip":`保存这笔资料。`,"entryEdit.fields":`资料字段`,"entryEdit.meta":`资料信息`,"entryEdit.related":`相关资料`,"entryEdit.noRelated":`目前没有推导出这笔资料的子 collection。`,"entryEdit.noChildEntries":`目前没有符合这笔资料的子资料。`,"entryEdit.relationship":`透过子字段 {child} 对应父字段 {parent}。`,"entryEdit.addItem":`新增项目`,"entryEdit.removeItem":`移除项目`,"entryEdit.emptyOption":`无值`,"entryEdit.boolean":`启用`,"entryEdit.skus":`规格与售价`,"entryEdit.skusBody":`管理 {name} 底下实际可销售的 SKU。价格、原价、库存方式与规格值都会跟着这个商品。`,"entryEdit.openAdvanced":`打开完整 SKU 编辑器`,"entryEdit.priceMinor":`售价`,"entryEdit.compareAtPriceMinor":`原价`,"entryEdit.inventoryMode":`库存模式`,"entryEdit.inventoryTracked":`追踪库存`,"entryEdit.inventoryUntracked":`不限量/不追踪`,"entryEdit.currency":`币别`,"entryEdit.skuInlineHint":`媒体、原始规格 JSON 或进阶字段可用完整编辑器处理。`,"productEdit.back":`回商品清单`,"productEdit.title":`编辑商品`,"productEdit.body":`在同一页编辑商品文案、价格、优惠活动、品牌介绍与服务内容。`,"productEdit.save":`保存变更`,"productEdit.basic":`商品内容`,"productEdit.shortDescription":`短描述`,"productEdit.description":`商品介绍`,"productEdit.price":`商品价格`,"productEdit.salePrice":`售价`,"productEdit.compareAtPrice":`原价`,"productEdit.promotions":`活动优惠组合`,"productEdit.promoLabel":`标签`,"productEdit.promoTitle":`活动标题`,"productEdit.promoBody":`活动内容`,"productEdit.relatedSku":`组合 SKU`,"productEdit.noRelatedSku":`不套用组合 SKU`,"productEdit.discountPercent":`折扣 %`,"productEdit.addPromotion":`新增优惠`,"productEdit.brand":`品牌介绍`,"productEdit.brandName":`品牌名称`,"productEdit.brandTagline":`品牌标语`,"productEdit.brandIntro":`品牌介绍`,"productEdit.serviceIncludes":`服务包含`,"settings.page.title":`商店设置`,"settings.page.body":`管理全站品牌文案与预设服务信息,让商品与首页可以共用。`,"settings.tabsLabel":`商店设置分页`,"settings.tab.brand":`品牌`,"settings.tab.tracking":`追踪码`,"settings.brandSection":`品牌与服务`,"settings.brandSectionBody":`商品页与生成首页区块会共用的默认商店文案。`,"settings.siteBrand":`网站品牌`,"settings.siteTitle":`网站标题`,"settings.siteDescription":`网站描述`,"settings.trackingSection":`追踪码`,"settings.trackingSectionBody":`填入 analytics ID 后,Mantle 会在生成的前台页面自动埋入对应追踪码。`,"settings.ga4MeasurementId":`GA4 Measurement ID`,"settings.ga4MeasurementIdHelp":`只需要填 ID,例如 G-XXXXXXXXXX,不要贴整段 gtag script。`,"settings.facebookPixelId":`Facebook Pixel ID`,"settings.facebookPixelIdHelp":`只需要填数字 Pixel ID,Mantle 会生成标准 Pixel base code。`,"guide.title":`你的商店后台已经准备好了`,"guide.body":`先用这个导览了解每个编辑入口,再交给 agent 做更大量的调整。`,"guide.step1":`打开商品清单,确认前台预设商品都有进后台。`,"guide.step2":`在 collection 页使用新增、编辑、查询或删除。`,"guide.step3":`预览公开网站,再在各内容区直接用 Rich Editor 持续调整。`,"guide.close":`关闭引导`,"guide.open":`使用者引导`,"guide.next":`下一步`,"guide.prev":`上一步`,"guide.finish":`完成`,"guide.products.title":`先从商品开始`,"guide.products.body":`打开商品 collection,管理前台商品、SKU、价格与多语商品文案。`,"guide.filters.title":`切换发布状态`,"guide.filters.body":`在清单上直接切换全部、草稿、已发布与已归档,不需要离开当前页面。`,"guide.actions.title":`在清单里直接操作`,"guide.actions.body":`用每列右侧操作编辑商品内容、复制商品,或从网站移除该项目。`,"guide.reopen.title":`随时重新打开引导`,"guide.reopen.body":`右上角会保留使用者引导按钮,需要时可以再次开启或关闭这套逐步导览。`,"nav.home":`首页`,"nav.content":`内容`,"nav.editor":`编辑器`,"nav.media":`媒体库`,"nav.more":`更多`,"nav.approvals":`审核`,"nav.settings":`设置`,"status.draft":`草稿`,"status.review":`审核中`,"status.published":`已发布`,"status.archived":`已归档`,"preferences.heading":`偏好设置`,"preferences.language":`后台语言`,"preferences.language.search":`搜索语言...`,"preferences.language.noResults":`找不到语言。`,"preferences.direction":`文字方向`,"preferences.direction.auto":`文字方向会跟随选择的语言。`,"preferences.appearance":`外观`,"preferences.light":`浅色`,"preferences.dark":`深色`,"preferences.system":`跟随系统`,"preferences.ltr":`从左到右`,"preferences.rtl":`从右到左`,"preferences.page.open":`个人偏好`,"preferences.page.title":`个人偏好`,"preferences.page.body":`这些偏好只保存在此浏览器,只影响 admin console,不会修改站点设置。`,"preferences.page.languageBody":`选择系统页面和 admin chrome 使用的语言。`,"preferences.page.appearanceBody":`选择浅色、深色,或跟随操作系统。`,"editor.page.title":`内容编辑器`,"editor.page.body":`在交给 agent 或发布流程前,先用 Markdown、HTML 或 Rich Editor 编辑内容草稿。`,"editor.mode.markdown":`Markdown`,"editor.mode.html":`HTML`,"editor.mode.rich":`Rich Editor`,"editor.titleLabel":`标题`,"editor.slugLabel":`Slug`,"editor.bodyLabel":`正文`,"editor.preview":`预览`,"editor.insertBlock":`插入区块`,"editor.saveDraft":`保存草稿`,"editor.markdownHint":`支持标题、列表、链接与 fenced code blocks。`,"editor.htmlHint":`用源码模式编辑可信任的 HTML 片段。`,"editor.richHint":`不用碰 markup 也能整理段落、提示框与商品文案。`,"editor.toolbar":`Rich Editor 工具栏`,"editor.undo":`撤销`,"editor.redo":`重做`,"editor.aiClean":`插入提示区块`,"editor.uploadImage":`上传图片`,"editor.uploading":`图片上传中...`,"editor.textStyle":`文字样式`,"editor.headingPlaceholder":`标题`,"editor.decreaseFont":`缩小字号`,"editor.increaseFont":`放大字号`,"editor.selectedText":`选取文字`,"editor.bold":`粗体`,"editor.italic":`斜体`,"editor.underline":`下划线`,"editor.strike":`删除线`,"editor.inlineCode":`行内代码`,"editor.textColor":`文字颜色`,"editor.highlight":`高亮标记`,"editor.palette":`品牌色`,"editor.alignLeft":`左对齐`,"editor.alignCenter":`居中对齐`,"editor.alignRight":`右对齐`,"editor.bulletList":`项目列表`,"editor.numberList":`编号列表`,"editor.checkList":`待办列表`,"editor.indent":`缩进`,"editor.link":`链接`,"editor.linkText":`链接文字`,"editor.table":`表格`,"editor.emoji":`表情符号`,"editor.mediaLibrary":`媒体库`,"editor.imageUrl":`图片网址`,"editor.insertImage":`插入图片`,"editor.videoUrl":`YouTube / Dailymotion 链接`,"editor.insertVideo":`插入视频`,"editor.audioHint":`音频嵌入`,"media.page.title":`媒体库`,"media.page.body":`上传、搜索、裁切、标记并复用商品与页面图片。`,"media.upload":`上传媒体`,"media.search":`搜索媒体...`,"media.crop":`裁切`,"media.alt":`替代文字`,"media.tags":`标签`,"media.empty":`目前没有媒体素材。`,"media.dropzone":`拖放文件到这里,或选择图片`,"media.dropzoneHint":`上传后的素材可复用在商品、页面与前台区块。`,"media.copyUrl":`复制图片网址`,"media.filter":`筛选媒体`,"media.filter.all":`全部`,"media.filter.product":`商品`,"media.filter.brand":`品牌`,"media.filter.content":`内容`,"media.sort":`排序媒体`,"media.sort.newest":`最新`,"media.sort.name":`名称`,"media.sort.type":`类型`,"approvals.title":`审核中心`,"approvals.body":`集中查看等待审核的 editorial entries,发布前可以逐笔检查内容。`,"approvals.emptyTitle":`目前没有等待审核的内容`,"approvals.emptyBody":`送出审核的资料会依 collection 分组显示在这里。`,"approvals.groupBody":`目前有 {count} 笔内容标记为“{status}”。`,"approvals.openCollection":`打开清单`,"approvals.reviewEntry":`审核`},de:{"auth.signIn.title":`Anmelden`,"common.signOut":`Abmelden`,"common.viewSite":`Website ansehen`,"common.copy":`Kopieren`,"common.open":`Öffnen`,"common.failedToLoad":`Laden fehlgeschlagen`,"common.signedIn":`Angemeldet`,"console.agent.title":`Nächster Schritt: Agent verbinden`,"collection.filter.all":`Alle`,"nav.home":`Start`,"nav.content":`Inhalte`,"nav.more":`Mehr`,"nav.approvals":`Freigaben`,"nav.settings":`Einstellungen`,"status.draft":`Entwürfe`,"status.review":`In Prüfung`,"status.published":`Veröffentlicht`,"status.archived":`Archiviert`,"preferences.heading":`Präferenzen`,"preferences.language":`Admin-Sprache`,"preferences.language.search":`Sprachen suchen...`,"preferences.language.noResults":`Keine Sprachen gefunden.`,"preferences.direction":`Textrichtung`,"preferences.direction.auto":`Die Textrichtung folgt der gewählten Sprache.`,"preferences.appearance":`Darstellung`,"preferences.light":`Hell`,"preferences.dark":`Dunkel`,"preferences.system":`System`,"preferences.ltr":`Links nach rechts`,"preferences.rtl":`Rechts nach links`,"preferences.page.open":`Präferenzen`,"preferences.page.title":`Persönliche Präferenzen`,"preferences.page.body":`Diese Präferenzen bleiben in diesem Browser. Sie ändern nur die Admin-Konsole und keine Website-Einstellungen.`,"preferences.page.languageBody":`Wähle die Sprache für Systemseiten und Admin-Chrome.`,"preferences.page.appearanceBody":`Wähle hell, dunkel oder dein Betriebssystem.`},es:{"auth.signIn.title":`Iniciar sesión`,"common.signOut":`Cerrar sesión`,"common.viewSite":`Ver sitio`,"common.copy":`Copiar`,"common.open":`Abrir`,"common.failedToLoad":`Error al cargar`,"common.signedIn":`Sesión iniciada`,"console.agent.title":`Siguiente: conectar un agente`,"collection.filter.all":`Todo`,"nav.home":`Inicio`,"nav.content":`Contenido`,"nav.more":`Más`,"nav.approvals":`Aprobaciones`,"nav.settings":`Configuración`,"status.draft":`Borradores`,"status.review":`En revisión`,"status.published":`Publicado`,"status.archived":`Archivado`,"preferences.heading":`Preferencias`,"preferences.language":`Idioma del admin`,"preferences.language.search":`Buscar idiomas...`,"preferences.language.noResults":`No se encontraron idiomas.`,"preferences.direction":`Dirección del texto`,"preferences.direction.auto":`La dirección del texto sigue el idioma seleccionado.`,"preferences.appearance":`Apariencia`,"preferences.light":`Claro`,"preferences.dark":`Oscuro`,"preferences.system":`Sistema`,"preferences.ltr":`Izquierda a derecha`,"preferences.rtl":`Derecha a izquierda`,"preferences.page.open":`Preferencias`,"preferences.page.title":`Preferencias personales`,"preferences.page.body":`Estas preferencias se guardan en este navegador. Solo cambian la consola de administración y no modifican la configuración del sitio.`,"preferences.page.languageBody":`Elige el idioma de las páginas del sistema y la interfaz de administración.`,"preferences.page.appearanceBody":`Elige claro, oscuro o seguir el sistema operativo.`},fr:{"auth.signIn.title":`Se connecter`,"common.signOut":`Se déconnecter`,"common.viewSite":`Voir le site`,"common.copy":`Copier`,"common.open":`Ouvrir`,"common.failedToLoad":`Échec du chargement`,"common.signedIn":`Connecté`,"console.agent.title":`Étape suivante : connecter un agent`,"collection.filter.all":`Tout`,"nav.home":`Accueil`,"nav.content":`Contenu`,"nav.more":`Plus`,"nav.approvals":`Approbations`,"nav.settings":`Paramètres`,"status.draft":`Brouillons`,"status.review":`En révision`,"status.published":`Publié`,"status.archived":`Archivé`,"preferences.heading":`Préférences`,"preferences.language":`Langue admin`,"preferences.language.search":`Rechercher une langue...`,"preferences.language.noResults":`Aucune langue trouvée.`,"preferences.direction":`Direction du texte`,"preferences.direction.auto":`La direction du texte suit la langue sélectionnée.`,"preferences.appearance":`Apparence`,"preferences.light":`Clair`,"preferences.dark":`Sombre`,"preferences.system":`Système`,"preferences.ltr":`Gauche à droite`,"preferences.rtl":`Droite à gauche`,"preferences.page.open":`Préférences`,"preferences.page.title":`Préférences personnelles`,"preferences.page.body":`Ces préférences restent dans ce navigateur. Elles modifient seulement la console admin, pas les paramètres du site.`,"preferences.page.languageBody":`Choisissez la langue des pages système et de l'interface admin.`,"preferences.page.appearanceBody":`Choisissez clair, sombre ou le thème du système.`},it:{"auth.signIn.title":`Accedi`,"common.signOut":`Esci`,"common.viewSite":`Vedi sito`,"common.copy":`Copia`,"common.open":`Apri`,"common.failedToLoad":`Caricamento non riuscito`,"common.signedIn":`Accesso effettuato`,"console.agent.title":`Prossimo: collega un agente`,"collection.filter.all":`Tutto`,"nav.home":`Home`,"nav.content":`Contenuti`,"nav.more":`Altro`,"nav.approvals":`Approvazioni`,"nav.settings":`Impostazioni`,"status.draft":`Bozze`,"status.review":`In revisione`,"status.published":`Pubblicato`,"status.archived":`Archiviato`,"preferences.heading":`Preferenze`,"preferences.language":`Lingua admin`,"preferences.language.search":`Cerca lingue...`,"preferences.language.noResults":`Nessuna lingua trovata.`,"preferences.direction":`Direzione testo`,"preferences.direction.auto":`La direzione del testo segue la lingua selezionata.`,"preferences.appearance":`Aspetto`,"preferences.light":`Chiaro`,"preferences.dark":`Scuro`,"preferences.system":`Sistema`,"preferences.ltr":`Da sinistra a destra`,"preferences.rtl":`Da destra a sinistra`,"preferences.page.open":`Preferenze`,"preferences.page.title":`Preferenze personali`,"preferences.page.body":`Queste preferenze restano in questo browser. Modificano solo la console admin e non le impostazioni del sito.`,"preferences.page.languageBody":`Scegli la lingua delle pagine di sistema e dell'interfaccia admin.`,"preferences.page.appearanceBody":`Scegli chiaro, scuro o segui il sistema operativo.`},ja:{"auth.signIn.title":`サインイン`,"auth.signIn.body":`管理コンソールです。サインイン後にロールでアクセスを判定します。`,"auth.signIn.methodsLoadFailed":`サインイン方法を読み込めませんでした。再読み込みしてください。`,"auth.signIn.noMethods":`このサイトにはサインイン方法が設定されていません。`,"auth.signIn.unknownMethod":`未対応のサインイン方法: {kind}`,"auth.signIn.method.social.button":`{provider} でサインイン`,"auth.signIn.method.email-otp.body":`メールに届くワンタイムコードでサインインします。`,"auth.signIn.method.email-otp.emailLabel":`メールアドレス`,"auth.signIn.method.email-otp.emailPlaceholder":`you@example.com`,"auth.signIn.method.email-otp.sendButton":`コードを送信`,"auth.signIn.method.email-otp.sendFailed":`コードの送信に失敗しました。メールを確認してもう一度お試しください。`,"auth.signIn.method.email-otp.sentTo":`{email} にコードを送信しました。`,"auth.signIn.method.email-otp.otpLabel":`ワンタイムコード`,"auth.signIn.method.email-otp.otpPlaceholder":`6 桁のコードを入力`,"auth.signIn.method.email-otp.verifyButton":`コードを確認してサインイン`,"auth.signIn.method.email-otp.verifyFailed":`コードが一致しません。もう一度入力してください。`,"auth.signIn.method.email-otp.back":`別のメールアドレスを使う`,"auth.signIn.method.magic-link.body":`ワンタップでサインインできるリンクをメールでお送りします。`,"auth.signIn.method.magic-link.emailLabel":`メールアドレス`,"auth.signIn.method.magic-link.emailPlaceholder":`you@example.com`,"auth.signIn.method.magic-link.sendButton":`サインインリンクを送信`,"auth.signIn.method.magic-link.sendFailed":`リンクの送信に失敗しました。メールを確認してもう一度お試しください。`,"auth.signIn.method.magic-link.sentTo":`{email} にサインインリンクを送信しました。`,"auth.signIn.method.magic-link.clickHint":`メール内のリンクをクリックしてサインインを完了してください。リンクはまもなく失効します。`,"auth.signIn.method.magic-link.anotherEmail":`別のメールアドレスを使う`,"common.signOut":`サインアウト`,"common.viewSite":`サイトを見る`,"common.copy":`コピー`,"common.open":`開く`,"common.failedToLoad":`読み込みに失敗しました`,"common.signedIn":`サインイン済み`,"console.agent.title":`次へ: agent を接続`,"collection.filter.all":`すべて`,"nav.home":`ホーム`,"nav.content":`コンテンツ`,"nav.more":`その他`,"nav.approvals":`承認`,"nav.settings":`設定`,"status.draft":`下書き`,"status.review":`レビュー中`,"status.published":`公開済み`,"status.archived":`アーカイブ済み`,"preferences.heading":`環境設定`,"preferences.language":`管理画面の言語`,"preferences.language.search":`言語を検索...`,"preferences.language.noResults":`言語が見つかりません。`,"preferences.direction":`文字方向`,"preferences.direction.auto":`文字方向は選択した言語に従います。`,"preferences.appearance":`外観`,"preferences.light":`ライト`,"preferences.dark":`ダーク`,"preferences.system":`システム`,"preferences.ltr":`左から右`,"preferences.rtl":`右から左`,"preferences.page.open":`環境設定`,"preferences.page.title":`個人設定`,"preferences.page.body":`これらの設定はこのブラウザにのみ保存されます。管理コンソールだけに影響し、サイト設定は変更しません。`,"preferences.page.languageBody":`システムページと管理 UI で使う言語を選びます。`,"preferences.page.appearanceBody":`ライト、ダーク、またはシステム設定に合わせます。`},ko:{"auth.signIn.title":`로그인`,"common.signOut":`로그아웃`,"common.viewSite":`사이트 보기`,"common.copy":`복사`,"common.open":`열기`,"common.failedToLoad":`로드 실패`,"common.signedIn":`로그인됨`,"console.agent.title":`다음: agent 연결`,"collection.filter.all":`전체`,"nav.home":`홈`,"nav.content":`콘텐츠`,"nav.more":`더보기`,"nav.approvals":`승인`,"nav.settings":`설정`,"status.draft":`초안`,"status.review":`검토 중`,"status.published":`게시됨`,"status.archived":`보관됨`,"preferences.heading":`환경설정`,"preferences.language":`관리 언어`,"preferences.language.search":`언어 검색...`,"preferences.language.noResults":`언어를 찾을 수 없습니다.`,"preferences.direction":`텍스트 방향`,"preferences.direction.auto":`텍스트 방향은 선택한 언어를 따릅니다.`,"preferences.appearance":`화면 모드`,"preferences.light":`라이트`,"preferences.dark":`다크`,"preferences.system":`시스템`,"preferences.ltr":`왼쪽에서 오른쪽`,"preferences.rtl":`오른쪽에서 왼쪽`,"preferences.page.open":`환경설정`,"preferences.page.title":`개인 환경설정`,"preferences.page.body":`이 설정은 이 브라우저에만 저장됩니다. 관리 콘솔에만 적용되며 사이트 설정은 변경하지 않습니다.`,"preferences.page.languageBody":`시스템 페이지와 관리 UI에 사용할 언어를 선택합니다.`,"preferences.page.appearanceBody":`라이트, 다크 또는 운영체제 설정을 따르도록 선택합니다.`},"pt-BR":{"auth.signIn.title":`Entrar`,"common.signOut":`Sair`,"common.viewSite":`Ver site`,"common.copy":`Copiar`,"common.open":`Abrir`,"common.failedToLoad":`Falha ao carregar`,"common.signedIn":`Conectado`,"console.agent.title":`Próximo: conectar um agente`,"collection.filter.all":`Todos`,"nav.home":`Início`,"nav.content":`Conteúdo`,"nav.more":`Mais`,"nav.approvals":`Aprovações`,"nav.settings":`Configurações`,"status.draft":`Rascunhos`,"status.review":`Em revisão`,"status.published":`Publicado`,"status.archived":`Arquivado`,"preferences.heading":`Preferências`,"preferences.language":`Idioma do admin`,"preferences.language.search":`Pesquisar idiomas...`,"preferences.language.noResults":`Nenhum idioma encontrado.`,"preferences.direction":`Direção do texto`,"preferences.direction.auto":`A direção do texto segue o idioma selecionado.`,"preferences.appearance":`Aparência`,"preferences.light":`Claro`,"preferences.dark":`Escuro`,"preferences.system":`Sistema`,"preferences.ltr":`Esquerda para direita`,"preferences.rtl":`Direita para esquerda`,"preferences.page.open":`Preferências`,"preferences.page.title":`Preferências pessoais`,"preferences.page.body":`Estas preferências ficam neste navegador. Elas mudam apenas o console admin e não alteram as configurações do site.`,"preferences.page.languageBody":`Escolha o idioma das páginas do sistema e da interface admin.`,"preferences.page.appearanceBody":`Escolha claro, escuro ou seguir o sistema operacional.`},ru:{"auth.signIn.title":`Войти`,"common.signOut":`Выйти`,"common.viewSite":`Открыть сайт`,"common.copy":`Копировать`,"common.open":`Открыть`,"common.failedToLoad":`Не удалось загрузить`,"common.signedIn":`Вы вошли`,"console.agent.title":`Далее: подключите агента`,"collection.filter.all":`Все`,"nav.home":`Главная`,"nav.content":`Контент`,"nav.more":`Еще`,"nav.approvals":`Одобрения`,"nav.settings":`Настройки`,"status.draft":`Черновики`,"status.review":`На проверке`,"status.published":`Опубликовано`,"status.archived":`Архив`,"preferences.heading":`Предпочтения`,"preferences.language":`Язык админки`,"preferences.language.search":`Поиск языков...`,"preferences.language.noResults":`Языки не найдены.`,"preferences.direction":`Направление текста`,"preferences.direction.auto":`Направление текста следует выбранному языку.`,"preferences.appearance":`Внешний вид`,"preferences.light":`Светлая`,"preferences.dark":`Темная`,"preferences.system":`Система`,"preferences.ltr":`Слева направо`,"preferences.rtl":`Справа налево`,"preferences.page.open":`Предпочтения`,"preferences.page.title":`Личные предпочтения`,"preferences.page.body":`Эти предпочтения хранятся в этом браузере. Они меняют только админ-консоль и не изменяют настройки сайта.`,"preferences.page.languageBody":`Выберите язык системных страниц и интерфейса админки.`,"preferences.page.appearanceBody":`Выберите светлую, темную тему или тему системы.`},nl:{"auth.signIn.title":`Inloggen`,"common.signOut":`Uitloggen`,"common.viewSite":`Site bekijken`,"common.copy":`Kopiëren`,"common.open":`Openen`,"common.failedToLoad":`Laden mislukt`,"common.signedIn":`Ingelogd`,"console.agent.title":`Volgende stap: agent verbinden`,"collection.filter.all":`Alles`,"nav.home":`Home`,"nav.content":`Content`,"nav.more":`Meer`,"nav.approvals":`Goedkeuringen`,"nav.settings":`Instellingen`,"status.draft":`Concepten`,"status.review":`In review`,"status.published":`Gepubliceerd`,"status.archived":`Gearchiveerd`,"preferences.heading":`Voorkeuren`,"preferences.language":`Beheertaal`,"preferences.language.search":`Talen zoeken...`,"preferences.language.noResults":`Geen talen gevonden.`,"preferences.direction":`Tekstrichting`,"preferences.direction.auto":`De tekstrichting volgt de gekozen taal.`,"preferences.appearance":`Weergave`,"preferences.light":`Licht`,"preferences.dark":`Donker`,"preferences.system":`Systeem`,"preferences.ltr":`Links naar rechts`,"preferences.rtl":`Rechts naar links`,"preferences.page.open":`Voorkeuren`,"preferences.page.title":`Persoonlijke voorkeuren`,"preferences.page.body":`Deze voorkeuren blijven in deze browser. Ze wijzigen alleen de adminconsole en niet de site-instellingen.`,"preferences.page.languageBody":`Kies de taal voor systeempagina's en de admininterface.`,"preferences.page.appearanceBody":`Kies licht, donker of volg het besturingssysteem.`},pl:{"auth.signIn.title":`Zaloguj się`,"common.signOut":`Wyloguj się`,"common.viewSite":`Zobacz stronę`,"common.copy":`Kopiuj`,"common.open":`Otwórz`,"common.failedToLoad":`Nie udało się załadować`,"common.signedIn":`Zalogowano`,"console.agent.title":`Dalej: połącz agenta`,"collection.filter.all":`Wszystkie`,"nav.home":`Start`,"nav.content":`Treści`,"nav.more":`Więcej`,"nav.approvals":`Zatwierdzenia`,"nav.settings":`Ustawienia`,"status.draft":`Szkice`,"status.review":`W recenzji`,"status.published":`Opublikowane`,"status.archived":`Zarchiwizowane`,"preferences.heading":`Preferencje`,"preferences.language":`Język panelu`,"preferences.language.search":`Szukaj języków...`,"preferences.language.noResults":`Nie znaleziono języków.`,"preferences.direction":`Kierunek tekstu`,"preferences.direction.auto":`Kierunek tekstu wynika z wybranego języka.`,"preferences.appearance":`Wygląd`,"preferences.light":`Jasny`,"preferences.dark":`Ciemny`,"preferences.system":`System`,"preferences.ltr":`Od lewej do prawej`,"preferences.rtl":`Od prawej do lewej`,"preferences.page.open":`Preferencje`,"preferences.page.title":`Preferencje osobiste`,"preferences.page.body":`Te preferencje są zapisane w tej przeglądarce. Zmieniają tylko konsolę administracyjną, nie ustawienia strony.`,"preferences.page.languageBody":`Wybierz język stron systemowych i interfejsu admina.`,"preferences.page.appearanceBody":`Wybierz jasny, ciemny lub zgodny z systemem.`},tr:{"auth.signIn.title":`Oturum aç`,"common.signOut":`Çıkış yap`,"common.viewSite":`Siteyi görüntüle`,"common.copy":`Kopyala`,"common.open":`Aç`,"common.failedToLoad":`Yüklenemedi`,"common.signedIn":`Oturum açık`,"console.agent.title":`Sonraki: agent bağla`,"collection.filter.all":`Tümü`,"nav.home":`Ana sayfa`,"nav.content":`İçerik`,"nav.more":`Daha fazla`,"nav.approvals":`Onaylar`,"nav.settings":`Ayarlar`,"status.draft":`Taslaklar`,"status.review":`İncelemede`,"status.published":`Yayında`,"status.archived":`Arşivlendi`,"preferences.heading":`Tercihler`,"preferences.language":`Yönetici dili`,"preferences.language.search":`Dil ara...`,"preferences.language.noResults":`Dil bulunamadı.`,"preferences.direction":`Metin yönü`,"preferences.direction.auto":`Metin yönü seçilen dili izler.`,"preferences.appearance":`Görünüm`,"preferences.light":`Açık`,"preferences.dark":`Koyu`,"preferences.system":`Sistem`,"preferences.ltr":`Soldan sağa`,"preferences.rtl":`Sağdan sola`,"preferences.page.open":`Tercihler`,"preferences.page.title":`Kişisel tercihler`,"preferences.page.body":`Bu tercihler bu tarayıcıda kalır. Yalnızca yönetim konsolunu değiştirir, site ayarlarını değiştirmez.`,"preferences.page.languageBody":`Sistem sayfaları ve yönetim arayüzü için dili seçin.`,"preferences.page.appearanceBody":`Açık, koyu veya işletim sistemini takip et seçeneğini seçin.`},vi:{"auth.signIn.title":`Đăng nhập`,"common.signOut":`Đăng xuất`,"common.viewSite":`Xem trang`,"common.copy":`Sao chép`,"common.open":`Mở`,"common.failedToLoad":`Tải thất bại`,"common.signedIn":`Đã đăng nhập`,"console.agent.title":`Tiếp theo: kết nối agent`,"collection.filter.all":`Tất cả`,"nav.home":`Trang chủ`,"nav.content":`Nội dung`,"nav.more":`Thêm`,"nav.approvals":`Phê duyệt`,"nav.settings":`Cài đặt`,"status.draft":`Bản nháp`,"status.review":`Đang duyệt`,"status.published":`Đã xuất bản`,"status.archived":`Đã lưu trữ`,"preferences.heading":`Tùy chọn`,"preferences.language":`Ngôn ngữ quản trị`,"preferences.language.search":`Tìm ngôn ngữ...`,"preferences.language.noResults":`Không tìm thấy ngôn ngữ.`,"preferences.direction":`Hướng văn bản`,"preferences.direction.auto":`Hướng văn bản theo ngôn ngữ đã chọn.`,"preferences.appearance":`Giao diện`,"preferences.light":`Sáng`,"preferences.dark":`Tối`,"preferences.system":`Hệ thống`,"preferences.ltr":`Trái sang phải`,"preferences.rtl":`Phải sang trái`,"preferences.page.open":`Tùy chọn`,"preferences.page.title":`Tùy chọn cá nhân`,"preferences.page.body":`Các tùy chọn này chỉ lưu trong trình duyệt này. Chúng chỉ thay đổi admin console và không sửa cài đặt trang.`,"preferences.page.languageBody":`Chọn ngôn ngữ cho trang hệ thống và giao diện quản trị.`,"preferences.page.appearanceBody":`Chọn sáng, tối hoặc theo hệ điều hành.`},cs:{"auth.signIn.title":`Přihlásit se`,"common.signOut":`Odhlásit se`,"common.viewSite":`Zobrazit web`,"common.copy":`Kopírovat`,"common.open":`Otevřít`,"common.failedToLoad":`Načtení selhalo`,"common.signedIn":`Přihlášeno`,"console.agent.title":`Další: připojit agenta`,"collection.filter.all":`Vše`,"nav.home":`Domů`,"nav.content":`Obsah`,"nav.more":`Více`,"nav.approvals":`Schválení`,"nav.settings":`Nastavení`,"status.draft":`Koncepty`,"status.review":`V kontrole`,"status.published":`Publikováno`,"status.archived":`Archivováno`,"preferences.heading":`Předvolby`,"preferences.language":`Jazyk administrace`,"preferences.language.search":`Hledat jazyky...`,"preferences.language.noResults":`Nenalezeny žádné jazyky.`,"preferences.direction":`Směr textu`,"preferences.direction.auto":`Směr textu se řídí vybraným jazykem.`,"preferences.appearance":`Vzhled`,"preferences.light":`Světlý`,"preferences.dark":`Tmavý`,"preferences.system":`Systém`,"preferences.ltr":`Zleva doprava`,"preferences.rtl":`Zprava doleva`,"preferences.page.open":`Předvolby`,"preferences.page.title":`Osobní předvolby`,"preferences.page.body":`Tyto předvolby zůstávají v tomto prohlížeči. Mění jen administrační konzoli, ne nastavení webu.`,"preferences.page.languageBody":`Vyberte jazyk systémových stránek a administračního rozhraní.`,"preferences.page.appearanceBody":`Vyberte světlý, tmavý nebo systémový režim.`},uk:{"auth.signIn.title":`Увійти`,"common.signOut":`Вийти`,"common.viewSite":`Переглянути сайт`,"common.copy":`Копіювати`,"common.open":`Відкрити`,"common.failedToLoad":`Не вдалося завантажити`,"common.signedIn":`Ви увійшли`,"console.agent.title":`Далі: підключіть агента`,"collection.filter.all":`Усі`,"nav.home":`Головна`,"nav.content":`Контент`,"nav.more":`Більше`,"nav.approvals":`Схвалення`,"nav.settings":`Налаштування`,"status.draft":`Чернетки`,"status.review":`На перевірці`,"status.published":`Опубліковано`,"status.archived":`Архівовано`,"preferences.heading":`Параметри`,"preferences.language":`Мова адмінки`,"preferences.language.search":`Пошук мов...`,"preferences.language.noResults":`Мови не знайдено.`,"preferences.direction":`Напрям тексту`,"preferences.direction.auto":`Напрям тексту відповідає вибраній мові.`,"preferences.appearance":`Вигляд`,"preferences.light":`Світла`,"preferences.dark":`Темна`,"preferences.system":`Система`,"preferences.ltr":`Зліва направо`,"preferences.rtl":`Справа наліво`,"preferences.page.open":`Параметри`,"preferences.page.title":`Особисті параметри`,"preferences.page.body":`Ці параметри зберігаються в цьому браузері. Вони змінюють лише адмін-консоль, а не налаштування сайту.`,"preferences.page.languageBody":`Виберіть мову системних сторінок та адмін-інтерфейсу.`,"preferences.page.appearanceBody":`Виберіть світлу, темну тему або тему системи.`},ar:{"auth.signIn.title":`تسجيل الدخول`,"common.signOut":`تسجيل الخروج`,"common.viewSite":`عرض الموقع`,"common.copy":`نسخ`,"common.open":`فتح`,"common.failedToLoad":`فشل التحميل`,"common.signedIn":`تم تسجيل الدخول`,"console.agent.title":`التالي: وصّل الوكيل`,"collection.filter.all":`الكل`,"nav.home":`الرئيسية`,"nav.content":`المحتوى`,"nav.more":`المزيد`,"nav.approvals":`الموافقات`,"nav.settings":`الإعدادات`,"status.draft":`مسودات`,"status.review":`قيد المراجعة`,"status.published":`منشور`,"status.archived":`مؤرشف`,"preferences.heading":`التفضيلات`,"preferences.language":`لغة الإدارة`,"preferences.language.search":`ابحث عن اللغات...`,"preferences.language.noResults":`لم يتم العثور على لغات.`,"preferences.direction":`اتجاه النص`,"preferences.direction.auto":`يتبع اتجاه النص اللغة المحددة.`,"preferences.appearance":`المظهر`,"preferences.light":`فاتح`,"preferences.dark":`داكن`,"preferences.system":`النظام`,"preferences.ltr":`من اليسار إلى اليمين`,"preferences.rtl":`من اليمين إلى اليسار`,"preferences.page.open":`التفضيلات`,"preferences.page.title":`التفضيلات الشخصية`,"preferences.page.body":`تبقى هذه التفضيلات في هذا المتصفح. إنها تغيّر وحدة الإدارة فقط ولا تعدّل إعدادات الموقع.`,"preferences.page.languageBody":`اختر لغة صفحات النظام وواجهة الإدارة.`,"preferences.page.appearanceBody":`اختر الوضع الفاتح أو الداكن أو اتبع نظام التشغيل.`},he:{"auth.signIn.title":`כניסה`,"common.signOut":`יציאה`,"common.viewSite":`הצג אתר`,"common.copy":`העתק`,"common.open":`פתח`,"common.failedToLoad":`הטעינה נכשלה`,"common.signedIn":`מחובר`,"console.agent.title":`הבא: חבר agent`,"collection.filter.all":`הכול`,"nav.home":`בית`,"nav.content":`תוכן`,"nav.more":`עוד`,"nav.approvals":`אישורים`,"nav.settings":`הגדרות`,"status.draft":`טיוטות`,"status.review":`בבדיקה`,"status.published":`פורסם`,"status.archived":`בארכיון`,"preferences.heading":`העדפות`,"preferences.language":`שפת ניהול`,"preferences.language.search":`חפש שפות...`,"preferences.language.noResults":`לא נמצאו שפות.`,"preferences.direction":`כיוון טקסט`,"preferences.direction.auto":`כיוון הטקסט נקבע לפי השפה שנבחרה.`,"preferences.appearance":`מראה`,"preferences.light":`בהיר`,"preferences.dark":`כהה`,"preferences.system":`מערכת`,"preferences.ltr":`משמאל לימין`,"preferences.rtl":`מימין לשמאל`,"preferences.page.open":`העדפות`,"preferences.page.title":`העדפות אישיות`,"preferences.page.body":`העדפות אלה נשמרות בדפדפן הזה. הן משנות רק את מסוף הניהול ולא את הגדרות האתר.`,"preferences.page.languageBody":`בחר את שפת דפי המערכת וממשק הניהול.`,"preferences.page.appearanceBody":`בחר בהיר, כהה או לפי מערכת ההפעלה.`},fa:{"auth.signIn.title":`ورود`,"common.signOut":`خروج`,"common.viewSite":`مشاهده سایت`,"common.copy":`کپی`,"common.open":`باز کردن`,"common.failedToLoad":`بارگذاری ناموفق بود`,"common.signedIn":`وارد شده‌اید`,"console.agent.title":`بعدی: اتصال agent`,"collection.filter.all":`همه`,"nav.home":`خانه`,"nav.content":`محتوا`,"nav.more":`بیشتر`,"nav.approvals":`تأییدها`,"nav.settings":`تنظیمات`,"status.draft":`پیش‌نویس‌ها`,"status.review":`در بازبینی`,"status.published":`منتشر شده`,"status.archived":`بایگانی شده`,"preferences.heading":`ترجیحات`,"preferences.language":`زبان مدیریت`,"preferences.language.search":`جستجوی زبان‌ها...`,"preferences.language.noResults":`زبانی پیدا نشد.`,"preferences.direction":`جهت متن`,"preferences.direction.auto":`جهت متن از زبان انتخاب‌شده پیروی می‌کند.`,"preferences.appearance":`ظاهر`,"preferences.light":`روشن`,"preferences.dark":`تیره`,"preferences.system":`سیستم`,"preferences.ltr":`چپ به راست`,"preferences.rtl":`راست به چپ`,"preferences.page.open":`ترجیحات`,"preferences.page.title":`ترجیحات شخصی`,"preferences.page.body":`این ترجیحات در همین مرورگر ذخیره می‌شود. فقط کنسول مدیریت را تغییر می‌دهد و تنظیمات سایت را تغییر نمی‌دهد.`,"preferences.page.languageBody":`زبان صفحات سیستمی و رابط مدیریت را انتخاب کنید.`,"preferences.page.appearanceBody":`روشن، تیره یا پیروی از سیستم‌عامل را انتخاب کنید.`},th:{"auth.signIn.title":`เข้าสู่ระบบ`,"common.signOut":`ออกจากระบบ`,"common.viewSite":`ดูเว็บไซต์`,"common.copy":`คัดลอก`,"common.open":`เปิด`,"common.failedToLoad":`โหลดไม่สำเร็จ`,"common.signedIn":`เข้าสู่ระบบแล้ว`,"console.agent.title":`ถัดไป: เชื่อมต่อ agent`,"collection.filter.all":`ทั้งหมด`,"nav.home":`หน้าแรก`,"nav.content":`เนื้อหา`,"nav.more":`เพิ่มเติม`,"nav.approvals":`การอนุมัติ`,"nav.settings":`การตั้งค่า`,"status.draft":`ฉบับร่าง`,"status.review":`กำลังตรวจสอบ`,"status.published":`เผยแพร่แล้ว`,"status.archived":`เก็บถาวร`,"preferences.heading":`ค่ากำหนด`,"preferences.language":`ภาษาผู้ดูแล`,"preferences.language.search":`ค้นหาภาษา...`,"preferences.language.noResults":`ไม่พบภาษา`,"preferences.direction":`ทิศทางข้อความ`,"preferences.direction.auto":`ทิศทางข้อความจะตามภาษาที่เลือก`,"preferences.appearance":`รูปลักษณ์`,"preferences.light":`สว่าง`,"preferences.dark":`มืด`,"preferences.system":`ระบบ`,"preferences.ltr":`ซ้ายไปขวา`,"preferences.rtl":`ขวาไปซ้าย`,"preferences.page.open":`ค่ากำหนด`,"preferences.page.title":`ค่ากำหนดส่วนตัว`,"preferences.page.body":`ค่ากำหนดเหล่านี้จะอยู่ในเบราว์เซอร์นี้เท่านั้น และมีผลกับ admin console โดยไม่แก้การตั้งค่าเว็บไซต์`,"preferences.page.languageBody":`เลือกภาษาสำหรับหน้าระบบและส่วนติดต่อผู้ดูแล`,"preferences.page.appearanceBody":`เลือกสว่าง มืด หรือใช้ตามระบบปฏิบัติการ`},id:{"auth.signIn.title":`Masuk`,"common.signOut":`Keluar`,"common.viewSite":`Lihat situs`,"common.copy":`Salin`,"common.open":`Buka`,"common.failedToLoad":`Gagal memuat`,"common.signedIn":`Sudah masuk`,"console.agent.title":`Berikutnya: hubungkan agent`,"collection.filter.all":`Semua`,"nav.home":`Beranda`,"nav.content":`Konten`,"nav.more":`Lainnya`,"nav.approvals":`Persetujuan`,"nav.settings":`Pengaturan`,"status.draft":`Draf`,"status.review":`Dalam ulasan`,"status.published":`Terbit`,"status.archived":`Arsip`,"preferences.heading":`Preferensi`,"preferences.language":`Bahasa admin`,"preferences.language.search":`Cari bahasa...`,"preferences.language.noResults":`Bahasa tidak ditemukan.`,"preferences.direction":`Arah teks`,"preferences.direction.auto":`Arah teks mengikuti bahasa yang dipilih.`,"preferences.appearance":`Tampilan`,"preferences.light":`Terang`,"preferences.dark":`Gelap`,"preferences.system":`Sistem`,"preferences.ltr":`Kiri ke kanan`,"preferences.rtl":`Kanan ke kiri`,"preferences.page.open":`Preferensi`,"preferences.page.title":`Preferensi pribadi`,"preferences.page.body":`Preferensi ini tetap di browser ini. Preferensi hanya mengubah konsol admin dan tidak mengubah pengaturan situs.`,"preferences.page.languageBody":`Pilih bahasa untuk halaman sistem dan antarmuka admin.`,"preferences.page.appearanceBody":`Pilih terang, gelap, atau ikuti sistem operasi.`}};function K(e,t,n={}){let r=ll[e]?.[t]??ll.en[t];for(let[e,t]of Object.entries(n))r=r.split(`{${e}}`).join(t);return r}function ul({brand:e}){let{setOpenMobile:t}=uc(),{language:n}=G();return(0,N.jsx)(bc,{children:(0,N.jsx)(xc,{children:(0,N.jsx)(Cc,{asChild:!0,size:`lg`,className:`data-[slot=sidebar-menu-button]:!p-1.5`,children:(0,N.jsxs)(`a`,{href:e.href??`/admin`,onClick:()=>t(!1),children:[(0,N.jsx)(`span`,{className:`text-primary flex aspect-square size-8 items-center justify-center`,children:(0,N.jsx)(sl,{className:`size-5`})}),(0,N.jsx)(`div`,{"data-sidebar-label":!0,className:`grid flex-1 text-start text-sm leading-tight`,children:(0,N.jsx)(`span`,{className:`truncate font-semibold`,children:K(n,`admin.consoleTitle`)})})]})})})})}var dl=`Collapsible`,[fl,pl]=Bi(dl),[ml,hl]=fl(dl),gl=M.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=qi({prop:r,defaultProp:i??!1,onChange:o,caller:dl});return(0,N.jsx)(ml,{scope:n,disabled:a,contentId:Gi(),open:c,onOpenToggle:M.useCallback(()=>l(e=>!e),[l]),children:(0,N.jsx)(ra.div,{"data-state":Sl(c),"data-disabled":a?``:void 0,...s,ref:t})})});gl.displayName=dl;var _l=`CollapsibleTrigger`,vl=M.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=hl(_l,n);return(0,N.jsx)(ra.button,{type:`button`,"aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Sl(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:H(e.onClick,i.onOpenToggle)})});vl.displayName=_l;var yl=`CollapsibleContent`,bl=M.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=hl(yl,e.__scopeCollapsible);return(0,N.jsx)(za,{present:n||i.open,children:({present:e})=>(0,N.jsx)(xl,{...r,ref:t,present:e})})});bl.displayName=yl;var xl=M.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=hl(yl,n),[s,c]=M.useState(r),l=M.useRef(null),u=nr(t,l),d=M.useRef(0),f=d.current,p=M.useRef(0),m=p.current,h=o.open||s,g=M.useRef(h),_=M.useRef(void 0);return M.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),Hi(()=>{let e=l.current;if(e){_.current=_.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=_.current.transitionDuration,e.style.animationName=_.current.animationName),c(r)}},[o.open,r]),(0,N.jsx)(ra.div,{"data-state":Sl(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function Sl(e){return e?`open`:`closed`}var Cl=gl,wl=vl,Tl=bl;function El(e){let t=e+`CollectionProvider`,[n,r]=Bi(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=M.useRef(null),a=M.useRef(new Map).current;return(0,N.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Zi(s),l=M.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,N.jsx)(c,{ref:nr(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Zi(u),p=M.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=M.useRef(null),s=nr(t,o),c=a(u,n);return M.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,N.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return M.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var Dl=M.createContext(void 0);function Ol(e){let t=M.useContext(Dl);return e||t||`ltr`}var kl=[`top`,`right`,`bottom`,`left`],Al=Math.min,jl=Math.max,Ml=Math.round,Nl=Math.floor,Pl=e=>({x:e,y:e}),Fl={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Il(e,t,n){return jl(e,Al(t,n))}function Ll(e,t){return typeof e==`function`?e(t):e}function q(e){return e.split(`-`)[0]}function J(e){return e.split(`-`)[1]}function Y(e){return e===`x`?`y`:`x`}function X(e){return e===`y`?`height`:`width`}function Z(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Rl(e){return Y(Z(e))}function zl(e,t,n){n===void 0&&(n=!1);let r=J(e),i=Rl(e),a=X(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Jl(o)),[o,Jl(o)]}function Bl(e){let t=Jl(e);return[Vl(e),t,Vl(t)]}function Vl(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Hl=[`left`,`right`],Ul=[`right`,`left`],Wl=[`top`,`bottom`],Gl=[`bottom`,`top`];function Kl(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Ul:Hl:t?Hl:Ul;case`left`:case`right`:return t?Wl:Gl;default:return[]}}function ql(e,t,n,r){let i=J(e),a=Kl(q(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Vl)))),a}function Jl(e){let t=q(e);return Fl[t]+e.slice(t.length)}function Yl(e){return{top:0,right:0,bottom:0,left:0,...e}}function Xl(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Yl(e)}function Zl(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Ql(e,t,n){let{reference:r,floating:i}=e,a=Z(t),o=Rl(t),s=X(o),c=q(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(J(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function $l(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Ll(t,e),p=Xl(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Zl(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Zl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var eu=50,tu=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:$l},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ql(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<eu&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Ql(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},nu=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Ll(e,t)||{};if(l==null)return{};let d=Xl(u),f={x:n,y:r},p=Rl(i),m=X(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,ee=Al(d[_],T),te=Al(d[v],T),E=ee,ne=C-h[m]-te,re=C/2-h[m]/2+w,ie=Il(E,re,ne),D=!c.arrow&&J(i)!=null&&re!==ie&&a.reference[m]/2-(re<E?ee:te)-h[m]/2<0,ae=D?re<E?re-E:re-ne:0;return{[p]:f[p]+ae,data:{[p]:ie,centerOffset:re-ie-ae,...D&&{alignmentOffset:ae}},reset:D}}}),ru=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Ll(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=q(r),_=Z(o),v=q(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Jl(o)]:Bl(o)),x=p!==`none`;!d&&x&&b.push(...ql(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=zl(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==Z(t))||T.every(e=>Z(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Z(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function iu(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function au(e){return kl.some(t=>e[t]>=0)}var ou=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Ll(e,t);switch(i){case`referenceHidden`:{let e=iu(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:au(e)}}}case`escaped`:{let e=iu(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:au(e)}}}default:return{}}}}},su=new Set([`left`,`top`]);async function cu(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=q(n),s=J(n),c=Z(n)===`y`,l=su.has(o)?-1:1,u=a&&c?-1:1,d=Ll(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var lu=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await cu(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},uu=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Ll(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Z(q(i)),p=Y(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Il(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Il(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},du=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Ll(e,t),u={x:n,y:r},d=Z(i),f=Y(d),p=u[f],m=u[d],h=Ll(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=su.has(q(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},fu=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Ll(e,t),u=await o.detectOverflow(t,l),d=q(i),f=J(i),p=Z(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Al(h-u[g],v),x=Al(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=jl(u.left,0),t=jl(u.right,0),n=jl(u.top,0),r=jl(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:jl(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:jl(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function pu(){return typeof window<`u`}function mu(e){return _u(e)?(e.nodeName||``).toLowerCase():`#document`}function hu(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gu(e){return((_u(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function _u(e){return pu()?e instanceof Node||e instanceof hu(e).Node:!1}function vu(e){return pu()?e instanceof Element||e instanceof hu(e).Element:!1}function yu(e){return pu()?e instanceof HTMLElement||e instanceof hu(e).HTMLElement:!1}function bu(e){return!pu()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof hu(e).ShadowRoot}function xu(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Mu(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Su(e){return/^(table|td|th)$/.test(mu(e))}function Cu(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var wu=/transform|translate|scale|rotate|perspective|filter/,Tu=/paint|layout|strict|content/,Eu=e=>!!e&&e!==`none`,Du;function Ou(e){let t=vu(e)?Mu(e):e;return Eu(t.transform)||Eu(t.translate)||Eu(t.scale)||Eu(t.rotate)||Eu(t.perspective)||!Au()&&(Eu(t.backdropFilter)||Eu(t.filter))||wu.test(t.willChange||``)||Tu.test(t.contain||``)}function ku(e){let t=Pu(e);for(;yu(t)&&!ju(t);){if(Ou(t))return t;if(Cu(t))return null;t=Pu(t)}return null}function Au(){return Du??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Du}function ju(e){return/^(html|body|#document)$/.test(mu(e))}function Mu(e){return hu(e).getComputedStyle(e)}function Nu(e){return vu(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pu(e){if(mu(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||bu(e)&&e.host||gu(e);return bu(t)?t.host:t}function Fu(e){let t=Pu(e);return ju(t)?e.ownerDocument?e.ownerDocument.body:e.body:yu(t)&&xu(t)?t:Fu(t)}function Iu(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Fu(e),i=r===e.ownerDocument?.body,a=hu(r);if(i){let e=Lu(a);return t.concat(a,a.visualViewport||[],xu(r)?r:[],e&&n?Iu(e):[])}else return t.concat(r,Iu(r,[],n))}function Lu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ru(e){let t=Mu(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=yu(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Ml(n)!==a||Ml(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function zu(e){return vu(e)?e:e.contextElement}function Bu(e){let t=zu(e);if(!yu(t))return Pl(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Ru(t),o=(a?Ml(n.width):n.width)/r,s=(a?Ml(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Vu=Pl(0);function Hu(e){let t=hu(e);return!Au()||!t.visualViewport?Vu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Uu(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==hu(e)?!1:t}function Q(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=zu(e),o=Pl(1);t&&(r?vu(r)&&(o=Bu(r)):o=Bu(e));let s=Uu(a,n,r)?Hu(a):Pl(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=hu(a),t=r&&vu(r)?hu(r):r,n=e,i=Lu(n);for(;i&&r&&t!==n;){let e=Bu(i),t=i.getBoundingClientRect(),r=Mu(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=hu(i),i=Lu(n)}}return Zl({width:u,height:d,x:c,y:l})}function Wu(e,t){let n=Nu(e).scrollLeft;return t?t.left+n:Q(gu(e)).left+n}function Gu(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Wu(e,n),y:n.top+t.scrollTop}}function Ku(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=gu(r),s=t?Cu(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Pl(1),u=Pl(0),d=yu(r);if((d||!d&&!a)&&((mu(r)!==`body`||xu(o))&&(c=Nu(r)),d)){let e=Q(r);l=Bu(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Gu(o,c):Pl(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function qu(e){return Array.from(e.getClientRects())}function Ju(e){let t=gu(e),n=Nu(e),r=e.ownerDocument.body,i=jl(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=jl(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Wu(e),s=-n.scrollTop;return Mu(r).direction===`rtl`&&(o+=jl(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Yu=25;function Xu(e,t){let n=hu(e),r=gu(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Au();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Wu(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Yu&&(a-=o)}else l<=Yu&&(a+=l);return{width:a,height:o,x:s,y:c}}function Zu(e,t){let n=Q(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=yu(e)?Bu(e):Pl(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Qu(e,t,n){let r;if(t===`viewport`)r=Xu(e,n);else if(t===`document`)r=Ju(gu(e));else if(vu(t))r=Zu(t,n);else{let n=Hu(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Zl(r)}function $u(e,t){let n=Pu(e);return n===t||!vu(n)||ju(n)?!1:Mu(n).position===`fixed`||$u(n,t)}function ed(e,t){let n=t.get(e);if(n)return n;let r=Iu(e,[],!1).filter(e=>vu(e)&&mu(e)!==`body`),i=null,a=Mu(e).position===`fixed`,o=a?Pu(e):e;for(;vu(o)&&!ju(o);){let t=Mu(o),n=Ou(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||xu(o)&&!n&&$u(e,o))?r=r.filter(e=>e!==o):i=t,o=Pu(o)}return t.set(e,r),r}function td(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Cu(t)?[]:ed(t,this._c):[].concat(n),r],o=Qu(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Qu(t,a[e],i);s=jl(n.top,s),c=Al(n.right,c),l=Al(n.bottom,l),u=jl(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function nd(e){let{width:t,height:n}=Ru(e);return{width:t,height:n}}function rd(e,t,n){let r=yu(t),i=gu(t),a=n===`fixed`,o=Q(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Pl(0);function l(){c.x=Wu(i)}if(r||!r&&!a)if((mu(t)!==`body`||xu(i))&&(s=Nu(t)),r){let e=Q(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Gu(i,s):Pl(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function id(e){return Mu(e).position===`static`}function ad(e,t){if(!yu(e)||Mu(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return gu(e)===n&&(n=n.ownerDocument.body),n}function od(e,t){let n=hu(e);if(Cu(e))return n;if(!yu(e)){let t=Pu(e);for(;t&&!ju(t);){if(vu(t)&&!id(t))return t;t=Pu(t)}return n}let r=ad(e,t);for(;r&&Su(r)&&id(r);)r=ad(r,t);return r&&ju(r)&&id(r)&&!Ou(r)?n:r||ku(e)||n}var sd=async function(e){let t=this.getOffsetParent||od,n=this.getDimensions,r=await n(e.floating);return{reference:rd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function cd(e){return Mu(e).direction===`rtl`}var ld={convertOffsetParentRelativeRectToViewportRelativeRect:Ku,getDocumentElement:gu,getClippingRect:td,getOffsetParent:od,getElementRects:sd,getClientRects:qu,getDimensions:nd,getScale:Bu,isElement:vu,isRTL:cd};function ud(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function dd(e,t){let n=null,r,i=gu(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Nl(d),h=Nl(i.clientWidth-(u+f)),g=Nl(i.clientHeight-(d+p)),_=Nl(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:jl(0,Al(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!ud(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function fd(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=zu(e),u=i||a?[...l?Iu(l):[],...t?Iu(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?dd(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Q(e):null;c&&g();function g(){let t=Q(e);h&&!ud(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var pd=lu,md=uu,hd=ru,gd=fu,_d=ou,vd=nu,$=du,yd=(e,t,n)=>{let r=new Map,i={platform:ld,...n},a={...i.platform,_c:r};return tu(e,t,{...i,platform:a})},bd=typeof document<`u`?M.useLayoutEffect:function(){};function xd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!xd(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!xd(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Sd(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Cd(e,t){let n=Sd(e);return Math.round(t*n)/n}function wd(e){let t=M.useRef(e);return bd(()=>{t.current=e}),t}function Td(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=M.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=M.useState(r);xd(f,r)||p(r);let[m,h]=M.useState(null),[g,_]=M.useState(null),v=M.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=M.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=M.useRef(null),C=M.useRef(null),w=M.useRef(u),T=c!=null,ee=wd(c),te=wd(i),E=wd(l),ne=M.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};te.current&&(e.platform=te.current),yd(S.current,C.current,e).then(e=>{let t={...e,isPositioned:E.current!==!1};re.current&&!xd(w.current,t)&&(w.current=t,Xi.flushSync(()=>{d(t)}))})},[f,t,n,te,E]);bd(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let re=M.useRef(!1);bd(()=>(re.current=!0,()=>{re.current=!1}),[]),bd(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(ee.current)return ee.current(b,x,ne);ne()}},[b,x,ne,ee,T]);let ie=M.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),D=M.useMemo(()=>({reference:b,floating:x}),[b,x]),ae=M.useMemo(()=>{let e={position:n,left:0,top:0};if(!D.floating)return e;let t=Cd(D.floating,u.x),r=Cd(D.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Sd(D.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,D.floating,u.x,u.y]);return M.useMemo(()=>({...u,update:ne,refs:ie,elements:D,floatingStyles:ae}),[u,ne,ie,D,ae])}var Ed=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:vd({element:r.current,padding:i}).fn(n):r?vd({element:r,padding:i}).fn(n):{}}}},Dd=(e,t)=>{let n=pd(e);return{name:n.name,fn:n.fn,options:[e,t]}},Od=(e,t)=>{let n=md(e);return{name:n.name,fn:n.fn,options:[e,t]}},kd=(e,t)=>({fn:$(e).fn,options:[e,t]}),Ad=(e,t)=>{let n=hd(e);return{name:n.name,fn:n.fn,options:[e,t]}},jd=(e,t)=>{let n=gd(e);return{name:n.name,fn:n.fn,options:[e,t]}},Md=(e,t)=>{let n=_d(e);return{name:n.name,fn:n.fn,options:[e,t]}},Nd=(e,t)=>{let n=Ed(e);return{name:n.name,fn:n.fn,options:[e,t]}},Pd=`Arrow`,Fd=M.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,N.jsx)(ra.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,N.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Fd.displayName=Pd;var Id=Fd;function Ld(e){let[t,n]=M.useState(void 0);return Hi(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Rd=`Popper`,[zd,Bd]=Bi(Rd),[Vd,Hd]=zd(Rd),Ud=e=>{let{__scopePopper:t,children:n}=e,[r,i]=M.useState(null);return(0,N.jsx)(Vd,{scope:t,anchor:r,onAnchorChange:i,children:n})};Ud.displayName=Rd;var Wd=`PopperAnchor`,Gd=M.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Hd(Wd,n),o=M.useRef(null),s=nr(t,o),c=M.useRef(null);return M.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,N.jsx)(ra.div,{...i,ref:s})});Gd.displayName=Wd;var Kd=`PopperContent`,[qd,Jd]=zd(Kd),Yd=M.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=Hd(Kd,n),[_,v]=M.useState(null),y=nr(t,e=>v(e)),[b,x]=M.useState(null),S=Ld(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),ee=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},te=Array.isArray(l)?l:[l],E=te.length>0,ne={padding:ee,boundary:te.filter($d),altBoundary:E},{refs:re,floatingStyles:ie,placement:D,isPositioned:ae,middlewareData:oe}=Td({strategy:`fixed`,placement:T,whileElementsMounted:(...e)=>fd(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[Dd({mainAxis:i+w,alignmentAxis:o}),c&&Od({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?kd():void 0,...ne}),c&&Ad({...ne}),jd({...ne,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&Nd({element:b,padding:s}),ef({arrowWidth:C,arrowHeight:w}),f&&Md({strategy:`referenceHidden`,...ne})]}),[se,O]=tf(D),k=aa(m);Hi(()=>{ae&&k?.()},[ae,k]);let ce=oe.arrow?.x,le=oe.arrow?.y,ue=oe.arrow?.centerOffset!==0,[de,A]=M.useState();return Hi(()=>{_&&A(window.getComputedStyle(_).zIndex)},[_]),(0,N.jsx)(`div`,{ref:re.setFloating,"data-radix-popper-content-wrapper":``,style:{...ie,transform:ae?ie.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:de,"--radix-popper-transform-origin":[oe.transformOrigin?.x,oe.transformOrigin?.y].join(` `),...oe.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,N.jsx)(qd,{scope:n,placedSide:se,onArrowChange:x,arrowX:ce,arrowY:le,shouldHideArrow:ue,children:(0,N.jsx)(ra.div,{"data-side":se,"data-align":O,...h,ref:y,style:{...h.style,animation:ae?void 0:`none`}})})})});Yd.displayName=Kd;var Xd=`PopperArrow`,Zd={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Qd=M.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Jd(Xd,n),a=Zd[i.placedSide];return(0,N.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]: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:(0,N.jsx)(Id,{...r,ref:t,style:{...r.style,display:`block`}})})});Qd.displayName=Xd;function $d(e){return e!==null}var ef=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=tf(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function tf(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var nf=Ud,rf=Gd,af=Yd,of=Qd,sf=`rovingFocusGroup.onEntryFocus`,cf={bubbles:!1,cancelable:!0},lf=`RovingFocusGroup`,[uf,df,ff]=El(lf),[pf,mf]=Bi(lf,[ff]),[hf,gf]=pf(lf),_f=M.forwardRef((e,t)=>(0,N.jsx)(uf.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,N.jsx)(uf.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,N.jsx)(vf,{...e,ref:t})})}));_f.displayName=lf;var vf=M.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=M.useRef(null),p=nr(t,f),m=Ol(a),[h,g]=qi({prop:o,defaultProp:s??null,onChange:c,caller:lf}),[_,v]=M.useState(!1),y=aa(l),b=df(n),x=M.useRef(!1),[S,C]=M.useState(0);return M.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(sf,y),()=>e.removeEventListener(sf,y)},[y]),(0,N.jsx)(hf,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:M.useCallback(e=>g(e),[g]),onItemShiftTab:M.useCallback(()=>v(!0),[]),onFocusableItemAdd:M.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:M.useCallback(()=>C(e=>e-1),[]),children:(0,N.jsx)(ra.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:H(e.onMouseDown,()=>{x.current=!0}),onFocus:H(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(sf,cf);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);wf([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:H(e.onBlur,()=>v(!1))})})}),yf=`RovingFocusGroupItem`,bf=M.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Gi(),l=a||c,u=gf(yf,n),d=u.currentTabStopId===l,f=df(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return M.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,N.jsx)(uf.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,N.jsx)(ra.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:H(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:H(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:H(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Cf(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?Tf(n,r+1):n.slice(r+1)}setTimeout(()=>wf(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});bf.displayName=yf;var xf={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Sf(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Cf(e,t,n){let r=Sf(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return xf[r]}function wf(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Tf(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ef=_f,Df=bf,Of=[`Enter`,` `],kf=[`ArrowDown`,`PageUp`,`Home`],Af=[`ArrowUp`,`PageDown`,`End`],jf=[...kf,...Af],Mf={ltr:[...Of,`ArrowRight`],rtl:[...Of,`ArrowLeft`]},Nf={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},Pf=`Menu`,[Ff,If,Lf]=El(Pf),[Rf,zf]=Bi(Pf,[Lf,Bd,mf]),Bf=Bd(),Vf=mf(),[Hf,Uf]=Rf(Pf),[Wf,Gf]=Rf(Pf),Kf=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Bf(t),[c,l]=M.useState(null),u=M.useRef(!1),d=aa(a),f=Ol(i);return M.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,N.jsx)(nf,{...s,children:(0,N.jsx)(Hf,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,N.jsx)(Wf,{scope:t,onClose:M.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};Kf.displayName=Pf;var qf=`MenuAnchor`,Jf=M.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Bf(n);return(0,N.jsx)(rf,{...i,...r,ref:t})});Jf.displayName=qf;var Yf=`MenuPortal`,[Xf,Zf]=Rf(Yf,{forceMount:void 0}),Qf=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Uf(Yf,t);return(0,N.jsx)(Xf,{scope:t,forceMount:n,children:(0,N.jsx)(za,{present:n||a.open,children:(0,N.jsx)(La,{asChild:!0,container:i,children:r})})})};Qf.displayName=Yf;var $f=`MenuContent`,[ep,tp]=Rf($f),np=M.forwardRef((e,t)=>{let n=Zf($f,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Uf($f,e.__scopeMenu),o=Gf($f,e.__scopeMenu);return(0,N.jsx)(Ff.Provider,{scope:e.__scopeMenu,children:(0,N.jsx)(za,{present:r||a.open,children:(0,N.jsx)(Ff.Slot,{scope:e.__scopeMenu,children:o.modal?(0,N.jsx)(rp,{...i,ref:t}):(0,N.jsx)(ip,{...i,ref:t})})})})}),rp=M.forwardRef((e,t)=>{let n=Uf($f,e.__scopeMenu),r=M.useRef(null),i=nr(t,r);return M.useEffect(()=>{let e=r.current;if(e)return cs(e)},[]),(0,N.jsx)(op,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:H(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),ip=M.forwardRef((e,t)=>{let n=Uf($f,e.__scopeMenu);return(0,N.jsx)(op,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ap=Zi(`MenuContent.ScrollLock`),op=M.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=Uf($f,n),_=Gf($f,n),v=Bf(n),y=Vf(n),b=If(n),[x,S]=M.useState(null),C=M.useRef(null),w=nr(t,C,g.onContentChange),T=M.useRef(0),ee=M.useRef(``),te=M.useRef(0),E=M.useRef(null),ne=M.useRef(`right`),re=M.useRef(0),ie=m?$o:M.Fragment,D=m?{as:ap,allowPinchZoom:!0}:void 0,ae=e=>{let t=ee.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=Wp(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){ee.current=t,window.clearTimeout(T.current),t!==``&&(T.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};M.useEffect(()=>()=>window.clearTimeout(T.current),[]),Wa();let oe=M.useCallback(e=>ne.current===E.current?.side&&Kp(e,E.current?.area),[]);return(0,N.jsx)(ep,{scope:n,searchRef:ee,onItemEnter:M.useCallback(e=>{oe(e)&&e.preventDefault()},[oe]),onItemLeave:M.useCallback(e=>{oe(e)||(C.current?.focus(),S(null))},[oe]),onTriggerLeave:M.useCallback(e=>{oe(e)&&e.preventDefault()},[oe]),pointerGraceTimerRef:te,onPointerGraceIntentChange:M.useCallback(e=>{E.current=e},[]),children:(0,N.jsx)(ie,{...D,children:(0,N.jsx)(wa,{asChild:!0,trapped:i,onMountAutoFocus:H(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,N.jsx)(pa,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,N.jsx)(Ef,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:H(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,N.jsx)(af,{role:`menu`,"aria-orientation":`vertical`,"data-state":zp(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:w,style:{outline:`none`,...h.style},onKeyDown:H(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&ae(e.key));let i=C.current;if(e.target!==i||!jf.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);Af.includes(e.key)&&a.reverse(),Hp(a)}),onBlur:H(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(T.current),ee.current=``)}),onPointerMove:H(e.onPointerMove,qp(e=>{let t=e.target,n=re.current!==e.clientX;e.currentTarget.contains(t)&&n&&(ne.current=e.clientX>re.current?`right`:`left`,re.current=e.clientX)}))})})})})})})});np.displayName=$f;var sp=`MenuGroup`,cp=M.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,N.jsx)(ra.div,{role:`group`,...r,ref:t})});cp.displayName=sp;var lp=`MenuLabel`,up=M.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,N.jsx)(ra.div,{...r,ref:t})});up.displayName=lp;var dp=`MenuItem`,fp=`menu.itemSelect`,pp=M.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=M.useRef(null),o=Gf(dp,e.__scopeMenu),s=tp(dp,e.__scopeMenu),c=nr(t,a),l=M.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(fp,{bubbles:!0,cancelable:!0});e.addEventListener(fp,e=>r?.(e),{once:!0}),ia(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,N.jsx)(mp,{...i,ref:c,disabled:n,onClick:H(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:H(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:H(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||Of.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});pp.displayName=dp;var mp=M.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=tp(dp,n),s=Vf(n),c=M.useRef(null),l=nr(t,c),[u,d]=M.useState(!1),[f,p]=M.useState(``);return M.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,N.jsx)(Ff.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,N.jsx)(Df,{asChild:!0,...s,focusable:!r,children:(0,N.jsx)(ra.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:H(e.onPointerMove,qp(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:H(e.onPointerLeave,qp(e=>o.onItemLeave(e))),onFocus:H(e.onFocus,()=>d(!0)),onBlur:H(e.onBlur,()=>d(!1))})})})}),hp=`MenuCheckboxItem`,gp=M.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,N.jsx)(wp,{scope:e.__scopeMenu,checked:n,children:(0,N.jsx)(pp,{role:`menuitemcheckbox`,"aria-checked":Bp(n)?`mixed`:n,...i,ref:t,"data-state":Vp(n),onSelect:H(i.onSelect,()=>r?.(Bp(n)?!0:!n),{checkForDefaultPrevented:!1})})})});gp.displayName=hp;var _p=`MenuRadioGroup`,[vp,yp]=Rf(_p,{value:void 0,onValueChange:()=>{}}),bp=M.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=aa(r);return(0,N.jsx)(vp,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,N.jsx)(cp,{...i,ref:t})})});bp.displayName=_p;var xp=`MenuRadioItem`,Sp=M.forwardRef((e,t)=>{let{value:n,...r}=e,i=yp(xp,e.__scopeMenu),a=n===i.value;return(0,N.jsx)(wp,{scope:e.__scopeMenu,checked:a,children:(0,N.jsx)(pp,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Vp(a),onSelect:H(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Sp.displayName=xp;var Cp=`MenuItemIndicator`,[wp,Tp]=Rf(Cp,{checked:!1}),Ep=M.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=Tp(Cp,n);return(0,N.jsx)(za,{present:r||Bp(a.checked)||a.checked===!0,children:(0,N.jsx)(ra.span,{...i,ref:t,"data-state":Vp(a.checked)})})});Ep.displayName=Cp;var Dp=`MenuSeparator`,Op=M.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,N.jsx)(ra.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});Op.displayName=Dp;var kp=`MenuArrow`,Ap=M.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Bf(n);return(0,N.jsx)(of,{...i,...r,ref:t})});Ap.displayName=kp;var jp=`MenuSub`,[Mp,Np]=Rf(jp),Pp=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=Uf(jp,t),o=Bf(t),[s,c]=M.useState(null),[l,u]=M.useState(null),d=aa(i);return M.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,N.jsx)(nf,{...o,children:(0,N.jsx)(Hf,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,N.jsx)(Mp,{scope:t,contentId:Gi(),triggerId:Gi(),trigger:s,onTriggerChange:c,children:n})})})};Pp.displayName=jp;var Fp=`MenuSubTrigger`,Ip=M.forwardRef((e,t)=>{let n=Uf(Fp,e.__scopeMenu),r=Gf(Fp,e.__scopeMenu),i=Np(Fp,e.__scopeMenu),a=tp(Fp,e.__scopeMenu),o=M.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=M.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return M.useEffect(()=>u,[u]),M.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]),(0,N.jsx)(Jf,{asChild:!0,...l,children:(0,N.jsx)(mp,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":i.contentId,"data-state":zp(n.open),...e,ref:tr(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:H(e.onPointerMove,qp(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:H(e.onPointerLeave,qp(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:H(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||Mf[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});Ip.displayName=Fp;var Lp=`MenuSubContent`,Rp=M.forwardRef((e,t)=>{let n=Zf($f,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Uf($f,e.__scopeMenu),o=Gf($f,e.__scopeMenu),s=Np(Lp,e.__scopeMenu),c=M.useRef(null),l=nr(t,c);return(0,N.jsx)(Ff.Provider,{scope:e.__scopeMenu,children:(0,N.jsx)(za,{present:r||a.open,children:(0,N.jsx)(Ff.Slot,{scope:e.__scopeMenu,children:(0,N.jsx)(op,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:`start`,side:o.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{o.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:H(e.onFocusOutside,e=>{e.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:H(e.onEscapeKeyDown,e=>{o.onClose(),e.preventDefault()}),onKeyDown:H(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=Nf[o.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),s.trigger?.focus(),e.preventDefault())})})})})})});Rp.displayName=Lp;function zp(e){return e?`open`:`closed`}function Bp(e){return e===`indeterminate`}function Vp(e){return Bp(e)?`indeterminate`:e?`checked`:`unchecked`}function Hp(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Up(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Wp(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Up(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Gp(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Kp(e,t){return t?Gp({x:e.clientX,y:e.clientY},t):!1}function qp(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Jp=Kf,Yp=Jf,Xp=Qf,Zp=np,Qp=cp,$p=up,em=pp,tm=gp,nm=bp,rm=Sp,im=Ep,am=Op,om=Ap,sm=Ip,cm=Rp,lm=`DropdownMenu`,[um,dm]=Bi(lm,[zf]),fm=zf(),[pm,mm]=um(lm),hm=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=fm(t),l=M.useRef(null),[u,d]=qi({prop:i,defaultProp:a??!1,onChange:o,caller:lm});return(0,N.jsx)(pm,{scope:t,triggerId:Gi(),triggerRef:l,contentId:Gi(),open:u,onOpenChange:d,onOpenToggle:M.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,N.jsx)(Jp,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};hm.displayName=lm;var gm=`DropdownMenuTrigger`,_m=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=mm(gm,n),o=fm(n);return(0,N.jsx)(Yp,{asChild:!0,...o,children:(0,N.jsx)(ra.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:tr(t,a.triggerRef),onPointerDown:H(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:H(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});_m.displayName=gm;var vm=`DropdownMenuPortal`,ym=e=>{let{__scopeDropdownMenu:t,...n}=e,r=fm(t);return(0,N.jsx)(Xp,{...r,...n})};ym.displayName=vm;var bm=`DropdownMenuContent`,xm=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=mm(bm,n),a=fm(n),o=M.useRef(!1);return(0,N.jsx)(Zp,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:H(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:H(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});xm.displayName=bm;var Sm=`DropdownMenuGroup`,Cm=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=fm(n);return(0,N.jsx)(Qp,{...i,...r,ref:t})});Cm.displayName=Sm;var wm=`DropdownMenuLabel`,Tm=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=fm(n);return(0,N.jsx)($p,{...i,...r,ref:t})});Tm.displayName=wm;var Em=`DropdownMenuItem`,Dm=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=fm(n);return(0,N.jsx)(em,{...i,...r,ref:t})});Dm.displayName=Em;var Om=`DropdownMenuCheckboxItem`,km=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=fm(n);return(0,N.jsx)(tm,{...i,...r,ref:t})});km.displayName=Om;var Am=`DropdownMenuRadioGroup`,jm=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=fm(n);return(0,N.jsx)(nm,{...i,...r,ref:t})});jm.displayName=Am;var Mm=`DropdownMenuRadioItem`,Nm=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=fm(n);return(0,N.jsx)(rm,{...i,...r,ref:t})});Nm.displayName=Mm;var Pm=`DropdownMenuItemIndicator`,Fm=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=fm(n);return(0,N.jsx)(im,{...i,...r,ref:t})});Fm.displayName=Pm;var Im=`DropdownMenuSeparator`,Lm=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=fm(n);return(0,N.jsx)(am,{...i,...r,ref:t})});Lm.displayName=Im;var Rm=`DropdownMenuArrow`,zm=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=fm(n);return(0,N.jsx)(om,{...i,...r,ref:t})});zm.displayName=Rm;var Bm=`DropdownMenuSubTrigger`,Vm=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=fm(n);return(0,N.jsx)(sm,{...i,...r,ref:t})});Vm.displayName=Bm;var Hm=`DropdownMenuSubContent`,Um=M.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=fm(n);return(0,N.jsx)(cm,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Um.displayName=Hm;var Wm=hm,Gm=_m,Km=ym,qm=xm,Jm=Tm,Ym=Dm,Xm=Lm,Zm=Wm,Qm=Gm,$m=M.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,N.jsx)(Km,{children:(0,N.jsx)(qm,{ref:r,sideOffset:t,className:B(`z-50 min-w-[8rem] overflow-hidden rounded-lg border border-[var(--glass-border)] bg-card backdrop-blur-md p-1 text-foreground shadow-[var(--glass-shadow-lg)] 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 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`,e),...n})}));$m.displayName=qm.displayName;var eh=M.forwardRef(({className:e,inset:t,...n},r)=>(0,N.jsx)(Ym,{ref:r,className:B(`relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,t&&`ps-8`,e),...n}));eh.displayName=Ym.displayName;var th=M.forwardRef(({className:e,inset:t,...n},r)=>(0,N.jsx)(Jm,{ref:r,className:B(`px-2 py-1.5 text-sm font-semibold text-primary`,t&&`ps-8`,e),...n}));th.displayName=Jm.displayName;var nh=M.forwardRef(({className:e,...t},n)=>(0,N.jsx)(Xm,{ref:n,className:B(`-mx-1 my-1 h-px bg-[var(--glass-border)]`,e),...t}));nh.displayName=Xm.displayName;function rh(e){return Array.isArray(e.items)}function ih({group:e,pathname:t,search:n}){return(0,N.jsxs)(vc,{children:[e.title&&(0,N.jsx)(yc,{title:e.title,children:e.title}),(0,N.jsx)(bc,{children:e.items.map(e=>(0,N.jsx)(oh,{item:e,pathname:t,search:n},ah(e)))})]})}function ah(e){return rh(e)?`g:${e.title}`:`l:${e.url}`}function oh({item:e,pathname:t,search:n}){let{state:r,isMobile:i}=uc();return rh(e)?r===`collapsed`&&!i?(0,N.jsx)(dh,{item:e,pathname:t,search:n}):(0,N.jsx)(ch,{item:e,pathname:t,search:n}):(0,N.jsx)(sh,{item:e,pathname:t,search:n})}function sh({item:e,pathname:t,search:n}){let{setOpenMobile:r}=uc();return(0,N.jsx)(xc,{children:(0,N.jsx)(Cc,{asChild:!0,isActive:ph(e,t,n),children:(0,N.jsxs)(`a`,{href:e.url,title:e.title,"data-tour":uh(e.url),onClick:()=>r(!1),...e.external?{target:`_blank`,rel:`noreferrer`}:null,children:[e.icon&&(0,N.jsx)(e.icon,{"aria-hidden":!0}),(0,N.jsx)(`span`,{"data-sidebar-label":!0,className:`flex-1 truncate`,children:e.title}),e.marker&&(0,N.jsx)(e.marker,{"aria-hidden":!0,"data-sidebar-label":!0,className:`size-3.5 text-muted-foreground`}),e.badge&&(0,N.jsx)(fh,{sidebarLabel:!0,children:e.badge})]})})})}function ch({item:e,pathname:t,search:n}){let r=mh(e,t,n);return(0,N.jsx)(Cl,{defaultOpen:r,className:`group/collapsible`,asChild:!0,children:(0,N.jsxs)(xc,{children:[(0,N.jsx)(wl,{asChild:!0,children:(0,N.jsxs)(Cc,{isActive:r,"data-tour":uh(e.items[0]?.url),children:[e.icon&&(0,N.jsx)(e.icon,{"aria-hidden":!0}),(0,N.jsx)(`span`,{"data-sidebar-label":!0,className:`flex-1 truncate`,title:e.title,children:e.title}),e.marker&&(0,N.jsx)(e.marker,{"aria-hidden":!0,"data-sidebar-label":!0,className:`size-3.5 text-muted-foreground`}),e.badge&&(0,N.jsx)(fh,{sidebarLabel:!0,children:e.badge}),(0,N.jsx)(kt,{"aria-hidden":!0,"data-sidebar-label":!0,className:`transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90 rtl:rotate-180 rtl:group-data-[state=open]/collapsible:-rotate-90`})]})}),(0,N.jsx)(Tl,{children:(0,N.jsx)(wc,{children:e.items.map(e=>(0,N.jsx)(lh,{link:e,pathname:t,search:n},e.url))})})]})})}function lh({link:e,pathname:t,search:n}){let{setOpenMobile:r}=uc();return(0,N.jsx)(Tc,{children:(0,N.jsx)(Ec,{asChild:!0,isActive:ph(e,t,n),children:(0,N.jsxs)(`a`,{href:e.url,title:e.title,"data-tour":uh(e.url),onClick:()=>r(!1),children:[e.icon&&(0,N.jsx)(e.icon,{"aria-hidden":!0}),(0,N.jsx)(`span`,{children:e.title}),e.badge&&(0,N.jsx)(fh,{children:e.badge})]})})})}function uh(e){if(e){if(e===`/admin`)return`nav-home`;if(e.startsWith(`/admin/c/products`))return`nav-products`;if(e===`/admin/media`)return`nav-media`;if(e===`/admin/settings`)return`nav-settings`}}function dh({item:e,pathname:t,search:n}){let r=mh(e,t,n),{direction:i}=G();return(0,N.jsx)(xc,{children:(0,N.jsxs)(Zm,{children:[(0,N.jsx)(Qm,{asChild:!0,children:(0,N.jsxs)(Cc,{isActive:r,children:[e.icon&&(0,N.jsx)(e.icon,{"aria-hidden":!0}),(0,N.jsx)(`span`,{"data-sidebar-label":!0,title:e.title,children:e.title}),(0,N.jsx)(kt,{"aria-hidden":!0,"data-sidebar-label":!0,className:`ms-auto`})]})}),(0,N.jsxs)($m,{side:i===`rtl`?`left`:`right`,align:`start`,sideOffset:4,children:[(0,N.jsx)(th,{children:e.title}),(0,N.jsx)(nh,{}),e.items.map(e=>(0,N.jsx)(eh,{asChild:!0,children:(0,N.jsx)(`a`,{href:e.url,className:B(ph(e,t,n)&&`font-medium`),children:e.title})},e.url))]})]})})}function fh({children:e,sidebarLabel:t=!1}){return(0,N.jsx)(`span`,{"data-sidebar-label":t||void 0,className:`ms-auto rounded-full bg-accent px-2 py-0.5 text-xs text-accent-foreground`,children:e})}function ph(e,t,n){let r=new URL(e.url,`http://x`);if(r.pathname!==t)return!1;if(!r.search)return!0;let i=new URLSearchParams(r.search),a=new URLSearchParams(n);for(let[e,t]of i.entries())if(a.get(e)!==t)return!1;return!0}function mh(e,t,n){return e.items.some(e=>ph(e,t,n))?!0:e.items.some(e=>new URL(e.url,`http://x`).pathname===t)}function hh({login:e,role:t}){let{isMobile:n}=uc(),{language:r}=G(),i=(e??`?`).charAt(0).toUpperCase(),a=e?`https://github.com/${encodeURIComponent(e)}.png?size=80`:null;return(0,N.jsx)(bc,{children:(0,N.jsx)(xc,{children:(0,N.jsxs)(Zm,{children:[(0,N.jsx)(Qm,{asChild:!0,children:(0,N.jsxs)(Cc,{size:`lg`,className:`data-[state=open]:bg-accent/40`,children:[(0,N.jsx)(gh,{avatarUrl:a,initial:i}),(0,N.jsxs)(`div`,{"data-sidebar-label":!0,className:`grid flex-1 text-start text-sm leading-tight`,children:[(0,N.jsx)(`span`,{className:`truncate font-semibold`,children:e??`—`}),(0,N.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:t??K(r,`common.signedIn`)})]}),(0,N.jsx)(At,{"data-sidebar-label":!0,className:`ms-auto size-4 text-muted-foreground`,"aria-hidden":!0})]})}),(0,N.jsxs)($m,{align:`end`,side:n?`bottom`:`right`,sideOffset:6,className:`w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg`,children:[(0,N.jsxs)(th,{className:`flex items-center gap-3 py-2`,children:[(0,N.jsx)(gh,{avatarUrl:a,initial:i,large:!0}),(0,N.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,N.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,children:e??`—`}),(0,N.jsx)(`span`,{className:`label-eyebrow truncate`,children:t??K(r,`common.signedIn`)})]})]}),(0,N.jsx)(nh,{}),(0,N.jsx)(eh,{asChild:!0,children:(0,N.jsxs)(`a`,{href:`/admin/preferences`,className:`flex items-center gap-2`,children:[(0,N.jsx)(gn,{className:`size-4`,"aria-hidden":!0}),K(r,`preferences.page.open`)]})}),(0,N.jsx)(nh,{}),(0,N.jsx)(eh,{asChild:!0,className:`text-destructive focus:text-destructive focus:bg-destructive/10`,children:(0,N.jsxs)(`button`,{type:`button`,onClick:_h,className:`flex w-full cursor-pointer items-center gap-2`,children:[(0,N.jsx)(tn,{className:`size-4`,"aria-hidden":!0}),K(r,`common.signOut`)]})})]})]})})})}function gh({avatarUrl:e,initial:t,large:n=!1}){let r=n?`size-9`:`size-8`,i=n?`text-sm`:`text-xs`;return(0,N.jsx)(`span`,{className:B(`shrink-0 inline-flex items-center justify-center rounded-lg`,`bg-primary/15 text-foreground/80 ring-1 ring-border`,r),"aria-hidden":!0,children:e?(0,N.jsx)(`img`,{src:e,alt:``,className:`size-full rounded-lg object-cover`,decoding:`async`}):(0,N.jsx)(`span`,{className:B(`font-medium`,i),children:t})})}function _h(){let e=document.createElement(`form`);e.method=`POST`,e.action=`/admin/logout`,document.body.appendChild(e),e.submit()}function vh({brand:e,groups:t,pathname:n,search:r,user:i}){let{variant:a}=Gn(),{direction:o}=G();return(0,N.jsxs)(dc,{side:o===`rtl`?`right`:`left`,variant:a===`floating`?`sidebar`:a,children:[(0,N.jsx)(mc,{children:(0,N.jsxs)(`div`,{className:`sidebar-chrome-row`,children:[(0,N.jsx)(ul,{brand:e}),(0,N.jsx)(fc,{})]})}),(0,N.jsx)(_c,{}),(0,N.jsx)(hc,{children:t.map((e,t)=>(0,N.jsx)(ih,{group:e,pathname:n,search:r},e.title??`g-${t}`))}),(0,N.jsx)(_c,{}),(0,N.jsx)(gc,{children:(0,N.jsx)(hh,{login:i.login,role:i.role})})]})}function yh({login:e,role:t}){let{language:n}=G(),r=(e??`?`).charAt(0).toUpperCase(),i=e?`https://github.com/${encodeURIComponent(e)}.png?size=80`:null;return(0,N.jsxs)(Zm,{children:[(0,N.jsx)(Qm,{"aria-label":`Account menu`,className:B(`relative inline-flex size-8 items-center justify-center rounded-full`,`outline-hidden ring-1 ring-border`,`hover:ring-primary/40 transition-all`,`data-[state=open]:ring-primary`),children:(0,N.jsx)(bh,{avatarUrl:i,initial:r})}),(0,N.jsxs)($m,{align:`end`,sideOffset:6,className:`w-56`,children:[(0,N.jsxs)(th,{className:`flex items-center gap-3 py-2`,children:[(0,N.jsx)(bh,{avatarUrl:i,initial:r,large:!0}),(0,N.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,N.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,children:e??`—`}),(0,N.jsx)(`span`,{className:`label-eyebrow truncate`,children:t??K(n,`common.signedIn`)})]})]}),(0,N.jsx)(nh,{}),(0,N.jsx)(eh,{asChild:!0,children:(0,N.jsxs)(`a`,{href:`/admin/preferences`,className:`flex items-center gap-2`,children:[(0,N.jsx)(gn,{className:`size-4`,"aria-hidden":!0}),K(n,`preferences.page.open`)]})}),(0,N.jsx)(nh,{}),(0,N.jsx)(eh,{asChild:!0,className:`text-destructive focus:text-destructive focus:bg-destructive/10`,children:(0,N.jsxs)(`button`,{type:`button`,onClick:xh,className:`flex w-full cursor-pointer items-center gap-2`,children:[(0,N.jsx)(tn,{className:`size-4`,"aria-hidden":!0}),K(n,`common.signOut`)]})})]})]})}function bh({avatarUrl:e,initial:t,large:n=!1}){let r=n?`size-9`:`size-8`,i=n?`text-sm`:`text-xs`;return(0,N.jsx)(`span`,{className:B(`shrink-0 inline-flex items-center justify-center rounded-full overflow-hidden`,`bg-primary/15 text-foreground/80`,r),"aria-hidden":!0,children:e?(0,N.jsx)(`img`,{src:e,alt:``,className:`size-full object-cover`,decoding:`async`}):(0,N.jsx)(`span`,{className:B(`font-medium`,i),children:t})})}function xh(){let e=document.createElement(`form`);e.method=`POST`,e.action=`/admin/logout`,document.body.appendChild(e),e.submit()}function Sh(){let{language:e,setLanguage:t}=G(),n=Bc.find(t=>t.value===e)??Bc[0];return(0,N.jsxs)(Zm,{children:[(0,N.jsx)(Qm,{asChild:!0,children:(0,N.jsxs)(V,{type:`button`,variant:`ghost`,size:`sm`,className:`h-8 gap-2 rounded-full border border-border/60 bg-background/30 px-2.5`,"aria-label":K(e,`preferences.language`),children:[(0,N.jsx)(Yt,{className:`size-4 text-primary`,"aria-hidden":!0}),(0,N.jsx)(`span`,{className:`hidden text-xs font-medium sm:inline`,children:n.nativeLabel})]})}),(0,N.jsxs)($m,{align:`end`,className:`max-h-[min(28rem,80vh)] w-52 overflow-y-auto`,children:[(0,N.jsx)(th,{className:`label-eyebrow opacity-70`,children:K(e,`preferences.language`)}),Bc.map(n=>(0,N.jsxs)(eh,{onSelect:()=>t(n.value),className:`justify-between`,children:[(0,N.jsx)(`span`,{children:n.nativeLabel}),(0,N.jsx)(Dt,{"aria-hidden":!0,className:B(`size-4 text-primary`,n.value===e?`opacity-100`:`opacity-0`)})]},n.value))]})]})}function Ch(){let{language:e,theme:t,setTheme:n}=G(),r=wh(e).find(e=>e.value===t),i=r?.icon??nn;return(0,N.jsxs)(Zm,{children:[(0,N.jsx)(Qm,{asChild:!0,children:(0,N.jsxs)(V,{type:`button`,variant:`ghost`,size:`sm`,className:`h-8 gap-2 rounded-full border border-border/60 bg-background/30 px-2.5`,"aria-label":K(e,`preferences.appearance`),children:[(0,N.jsx)(i,{className:`size-4 text-primary`,"aria-hidden":!0}),(0,N.jsx)(`span`,{className:`hidden text-xs font-medium sm:inline`,children:r?.label??K(e,`preferences.system`)})]})}),(0,N.jsxs)($m,{align:`end`,className:`w-44`,children:[(0,N.jsx)(th,{className:`label-eyebrow opacity-70`,children:K(e,`preferences.appearance`)}),wh(e).map(e=>{let r=e.icon;return(0,N.jsxs)(eh,{onSelect:()=>n(e.value),className:`justify-between`,children:[(0,N.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(r,{className:`size-4`,"aria-hidden":!0}),e.label]}),(0,N.jsx)(Dt,{"aria-hidden":!0,className:B(`size-4 text-primary`,e.value===t?`opacity-100`:`opacity-0`)})]},e.value)})]})]})}function wh(e){return[{value:`light`,label:K(e,`preferences.light`),icon:yn},{value:`dark`,label:K(e,`preferences.dark`),icon:rn},{value:`system`,label:K(e,`preferences.system`),icon:nn}]}function Th({fixed:e=!1,className:t,children:n,user:r,site:i,publicUrl:a,onOpenGuide:o}){let{language:s}=G(),[c,l]=M.useState(!1);return M.useEffect(()=>{if(!e)return;let t=()=>l(window.scrollY>10);return t(),window.addEventListener(`scroll`,t,{passive:!0}),()=>window.removeEventListener(`scroll`,t)},[e]),(0,N.jsxs)(`header`,{"data-slot":`header`,"data-scrolled":c||void 0,className:B(`admin-statusbar z-20 flex h-14 shrink-0 items-center gap-3 px-4`,e?`sticky top-0 w-[inherit] transition-shadow`:`border-b border-border/40`,c&&`shadow-sm`,t),children:[i?(0,N.jsxs)(`div`,{className:`admin-site-status`,"aria-label":`Current admin site`,children:[(0,N.jsx)(`span`,{children:i.title}),i.subtitle?(0,N.jsx)(`small`,{children:i.subtitle}):null]}):null,a?(0,N.jsx)(V,{asChild:!0,variant:`secondary`,size:`sm`,className:`shrink-0`,children:(0,N.jsxs)(`a`,{href:a,target:`_blank`,rel:`noreferrer`,title:K(s,`common.viewSite`),children:[(0,N.jsx)(zt,{className:`size-3.5`,"aria-hidden":!0}),(0,N.jsx)(`span`,{className:`hidden sm:inline`,children:K(s,`common.viewSite`)})]})}):null,n,r?(0,N.jsxs)(`div`,{className:B(`flex items-center gap-2`,n?``:`ms-auto`),children:[o?(0,N.jsxs)(V,{type:`button`,variant:`ghost`,size:`sm`,onClick:o,"data-tour":`guide-button`,title:K(s,`guide.open`),"aria-label":K(s,`guide.open`),children:[(0,N.jsx)(Mt,{className:`size-4`,"aria-hidden":!0}),(0,N.jsx)(`span`,{className:`hidden sm:inline`,children:K(s,`guide.open`)})]}):null,(0,N.jsx)(Sh,{}),(0,N.jsx)(Ch,{}),(0,N.jsx)(yh,{login:r.login,role:r.role})]}):null]})}var Eh=`content`;function Dh({className:e}){return(0,N.jsx)(`a`,{href:`#${Eh}`,className:B(`fixed inset-inline-start-3 top-3 z-[999]`,`-translate-y-52 rounded-md bg-primary px-3 py-2 text-sm font-medium`,`text-primary-foreground shadow`,`focus-visible:translate-y-0 transition-transform`,`outline-2 outline-offset-2 outline-ring/40`,e),children:`Skip to main content`})}function Oh({fixed:e=!1,fluid:t=!1,className:n,children:r}){return(0,N.jsx)(`div`,{id:Eh,"data-layout":e?`fixed`:`auto`,className:B(`@container/content`,`w-full px-4 py-6 sm:px-6`,e&&`flex grow flex-col overflow-hidden`,!t&&`mx-auto max-w-[1440px]`,`flex-1`,n),children:r})}function kh(e,t){switch(t){case`draft`:return K(e,`status.draft`);case`review`:return K(e,`status.review`);case`published`:return K(e,`status.published`);case`archived`:return K(e,`status.archived`)}}var Ah={products:{en:`Products`,"zh-TW":`商品`,"zh-CN":`商品`},"product-skus":{en:`Product SKUs`,"zh-TW":`商品規格`,"zh-CN":`商品规格`},pages:{en:`Pages`,"zh-TW":`頁面`,"zh-CN":`页面`},orders:{en:`Orders`,"zh-TW":`訂單`,"zh-CN":`订单`},order_items:{en:`Order line items`,"zh-TW":`訂單明細`,"zh-CN":`订单明细`},inventory_snapshots:{en:`Inventory snapshots`,"zh-TW":`庫存快照`,"zh-CN":`库存快照`}},jh={products:{en:`Manage product records, publishing state, and localized product copy.`,"zh-TW":`管理商品資料、發布狀態與多語商品內容。`,"zh-CN":`管理商品资料、发布状态与多语商品内容。`},"product-skus":{en:`Manage sellable variants, prices, inventory mode, and product options.`,"zh-TW":`管理可販售規格、價格、庫存模式與商品選項。`,"zh-CN":`管理可销售规格、价格、库存模式与商品选项。`},pages:{en:`Manage storefront pages, layout sections, and localized page copy.`,"zh-TW":`管理前台頁面、首頁區塊與多語文案。`,"zh-CN":`管理前台页面、首页区块与多语文案。`},orders:{en:`Review customer orders and fulfillment state.`,"zh-TW":`查看客戶訂單與履約狀態。`,"zh-CN":`查看客户订单与履约状态。`},order_items:{en:`Review purchased items captured at checkout time.`,"zh-TW":`查看結帳當下保存的購買項目明細。`,"zh-CN":`查看结账当下保存的购买项目明细。`},inventory_snapshots:{en:`Review inventory snapshots synced from the inventory actor.`,"zh-TW":`查看由庫存 actor 同步的庫存快照。`,"zh-CN":`查看由库存 actor 同步的库存快照。`}};function Mh(e,t){return Ah[e.name]?.[t]??e.title}function Nh(e,t){return e?jh[e.name]?.[t]??e.description:null}var Ph=`mantle.admin.guide.closed`,Fh=[{key:`products`,selector:`[data-tour="nav-products"]`},{key:`filters`,selector:`[data-tour="status-filter"]`,href:`/admin/c/products`},{key:`actions`,selector:`[data-tour="entry-actions"]`,href:`/admin/c/products`},{key:`reopen`,selector:`[data-tour="guide-button"]`}],Ih={products:{title:`guide.products.title`,body:`guide.products.body`},filters:{title:`guide.filters.title`,body:`guide.filters.body`},actions:{title:`guide.actions.title`,body:`guide.actions.body`},reopen:{title:`guide.reopen.title`,body:`guide.reopen.body`}};function Lh({language:e,onClose:t}){let[n,r]=M.useState(0),{location:i,navigate:a}=Rc(),o=Fh[n]??Fh[0],s=zh(o),c=M.useMemo(()=>Bh(s),[s]),l=n===Fh.length-1;return M.useEffect(()=>{!(`href`in o)||!o.href||`${i.pathname}${i.search}`!==o.href&&a(o.href)},[i.pathname,i.search,a,o]),(0,N.jsxs)(`div`,{className:`admin-guide-overlay`,role:`dialog`,"aria-modal":`false`,"aria-labelledby":`admin-guide-title`,children:[s?(0,N.jsx)(`div`,{className:`admin-guide-highlight`,style:{top:s.top-8,left:s.left-8,width:s.width+16,height:s.height+16}}):null,(0,N.jsxs)(`section`,{className:`admin-guide-popover`,style:c,children:[(0,N.jsxs)(`div`,{className:`admin-guide-progress`,children:[(0,N.jsx)(`span`,{children:n+1}),(0,N.jsx)(`small`,{children:Fh.length})]}),(0,N.jsxs)(`div`,{className:`admin-guide-copy`,children:[(0,N.jsx)(`p`,{className:`label-eyebrow`,children:`AotterMantle`}),(0,N.jsx)(`h2`,{id:`admin-guide-title`,children:K(e,Ih[o.key].title)}),(0,N.jsx)(`p`,{children:K(e,Ih[o.key].body)})]}),(0,N.jsxs)(`div`,{className:`admin-guide-controls`,children:[(0,N.jsx)(`button`,{type:`button`,className:`guide-icon-button`,onClick:()=>r(e=>Math.max(0,e-1)),disabled:n===0,title:K(e,`guide.prev`),children:(0,N.jsx)(Ot,{className:`size-4`,"aria-hidden":!0})}),(0,N.jsxs)(`button`,{type:`button`,className:`guide-primary-button`,onClick:()=>l?t():r(e=>Math.min(Fh.length-1,e+1)),children:[l?K(e,`guide.finish`):K(e,`guide.next`),l?null:(0,N.jsx)(kt,{className:`size-4`,"aria-hidden":!0})]}),(0,N.jsx)(`button`,{type:`button`,className:`guide-icon-button`,onClick:t,title:K(e,`guide.close`),children:(0,N.jsx)(Fn,{className:`size-4`,"aria-hidden":!0})})]})]})]})}function Rh(){let{language:e}=G(),[t,n]=M.useState(()=>Vh());return{language:e,open:t,showGuide:M.useCallback(()=>{try{localStorage.removeItem(Ph)}catch{}n(!0)},[]),closeGuide:M.useCallback(()=>{try{localStorage.setItem(Ph,`1`)}catch{}n(!1)},[])}}function zh(e){let[t,n]=M.useState(null);return M.useEffect(()=>{let t=0,r=()=>{cancelAnimationFrame(t),t=requestAnimationFrame(()=>{let t=document.querySelector(e.selector);if(!t){n(null);return}t.scrollIntoView({block:`nearest`,inline:`nearest`});let r=t.getBoundingClientRect();n({top:r.top,left:r.left,width:r.width,height:r.height})})};return r(),window.addEventListener(`resize`,r),window.addEventListener(`scroll`,r,!0),()=>{cancelAnimationFrame(t),window.removeEventListener(`resize`,r),window.removeEventListener(`scroll`,r,!0)}},[e]),t}function Bh(e){if(typeof window>`u`)return{};if(!e)return{top:`5rem`,left:`50%`,transform:`translateX(-50%)`};let t=Math.min(380,Math.max(280,window.innerWidth-32)),n=e.left+e.width+t+24<window.innerWidth,r=e.left-t-24>0,i=Math.min(window.innerHeight-220,Math.max(16,e.top));return n?{top:i,left:e.left+e.width+18}:r?{top:i,left:e.left-t-18}:{top:Math.min(window.innerHeight-220,e.top+e.height+18),left:`50%`,transform:`translateX(-50%)`}}function Vh(){if(typeof window>`u`)return!1;try{return localStorage.getItem(Ph)!==`1`}catch{return!0}}var Hh={title:`CMS`,subtitle:`admin`,href:`/admin`};function Uh({brand:e=Hh,fixed:t=!1,fluid:n=!1,children:r}){let{pathname:i,search:a}=zc(),{language:o}=G(),s=Rh(),c=P({queryKey:[`me`],queryFn:()=>Ac.get(`/me`),retry:!1}),l=P({queryKey:[`collections`],queryFn:async()=>(await Ac.get(`/collections`)).collections}),u=P({queryKey:[`site`],queryFn:()=>Ac.get(`/site`)}),d=M.useMemo(()=>({...e,title:u.data?.brand??e.title,subtitle:u.data?.canonicalLocale??e.subtitle}),[e,u.data]),f=M.useMemo(()=>Wh(l.data??[],o,c.data?.role??null),[l.data,o,c.data?.role]);return(0,N.jsx)(Wn,{children:(0,N.jsxs)(lc,{defaultOpen:qn()??!0,children:[(0,N.jsx)(Dh,{}),(0,N.jsx)(vh,{brand:d,groups:f,pathname:i,search:a,user:{login:c.data?.login??null,role:c.data?.role??null}}),(0,N.jsxs)(pc,{children:[(0,N.jsx)(Th,{fixed:!0,site:d,publicUrl:u.data?.publicUrl,onOpenGuide:s.showGuide,user:{login:c.data?.login??null,role:c.data?.role??null}}),(0,N.jsx)(Oh,{fixed:t,fluid:n,children:r})]}),(0,N.jsx)(cl,{}),s.open?(0,N.jsx)(Lh,{language:s.language,onClose:s.closeGuide}):null]})})}function Wh(e,t,n){let r=e.filter(e=>!e.parent);return[{items:[{title:K(t,`nav.home`),url:`/admin`,icon:Wt}]},{title:K(t,`nav.content`),items:r.map(e=>({title:Mh(e,t),icon:Vt,marker:e.hasTranslations?Ht:void 0,items:[{title:K(t,`collection.filter.all`),url:`/admin/c/${e.name}`},...Gh(e).map(n=>({title:kh(t,n),url:`/admin/c/${e.name}?status=${n}`}))]}))},{title:K(t,`nav.more`),items:[{title:K(t,`nav.media`),url:`/admin/media`,icon:qt},{title:K(t,`nav.approvals`),url:`/admin/approvals`,icon:Pt},{title:K(t,`nav.settings`),url:`/admin/settings`,icon:gn},...n===`owner`?[{title:K(t,`nav.staff`),url:`/admin/staff`,icon:Mn}]:[]]}]}function Gh(e){return e.lifecycle===`editorial`?Mc:Nc}function Kh(){return(0,N.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,N.jsxs)(`div`,{className:`glass-card w-full max-w-sm p-6`,children:[(0,N.jsx)(`div`,{className:`mb-4 h-4 w-24 animate-pulse rounded bg-muted`}),(0,N.jsxs)(`div`,{className:`space-y-2`,children:[(0,N.jsx)(`div`,{className:`h-3 w-full animate-pulse rounded bg-muted`}),(0,N.jsx)(`div`,{className:`h-3 w-2/3 animate-pulse rounded bg-muted`})]})]})})}function qh({error:e}){let{language:t}=G(),n=e instanceof Error?e.message:`Unknown error.`;return(0,N.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,N.jsxs)(`div`,{className:`glass-card animate-rise w-full max-w-sm p-8 text-center`,children:[(0,N.jsx)(`h1`,{className:`mb-2 text-xl`,children:K(t,`auth.error.title`)}),(0,N.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n})]})})}function Jh({login:e}){let{language:t}=G();return(0,N.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,N.jsxs)(`div`,{className:`glass-card animate-rise w-full max-w-md p-8 text-center`,children:[(0,N.jsx)(`div`,{className:`mx-auto mb-3 inline-flex size-10 items-center justify-center rounded-full bg-destructive/10 text-destructive`,children:(0,N.jsx)(En,{className:`size-5`,"aria-hidden":!0})}),(0,N.jsx)(`h1`,{className:`mb-2 text-xl`,children:K(t,`auth.accessDenied.title`)}),e?(0,N.jsxs)(`p`,{className:`mb-1 text-sm font-medium text-foreground`,children:[`GitHub: `,e]}):null,(0,N.jsx)(`p`,{className:`mb-1 text-sm text-muted-foreground`,children:K(t,`auth.accessDenied.noStaff`)}),(0,N.jsx)(`p`,{className:`mb-6 text-sm text-muted-foreground`,children:K(t,`auth.accessDenied.askOwner`)}),(0,N.jsxs)(V,{variant:`outline`,className:`w-full`,onClick:ag,children:[(0,N.jsx)(tn,{className:`me-2 size-4`,"aria-hidden":!0}),K(t,`common.signOut`)]})]})})}var Yh=`w-full rounded border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,Xh=`first:mt-0 mt-4`,Zh=`first:mt-0 first:border-t-0 first:pt-0 mt-6 border-t border-border pt-4`;function Qh(){let{language:e}=G(),t=new URLSearchParams(window.location.search).get(`return`)??`/admin`,[n,r]=M.useState(null),[i,a]=M.useState(null);return M.useEffect(()=>{let e=!1;async function t(){try{let t=await fetch(`/api/auth/methods`,{credentials:`include`});if(!t.ok)throw Error(`HTTP ${t.status}`);let n=await t.json();if(e)return;r(n.methods??[])}catch(t){if(e)return;a(t instanceof Error?t.message:String(t))}}return t(),()=>{e=!0}},[]),(0,N.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,N.jsxs)(`div`,{className:`glass-card animate-rise w-full max-w-sm p-8`,children:[(0,N.jsx)(`p`,{className:`label-eyebrow mb-2`,children:K(e,`auth.signIn.eyebrow`)}),(0,N.jsx)(`h1`,{className:`mb-2 text-xl`,children:K(e,`auth.signIn.title`)}),i?(0,N.jsx)(`p`,{className:`mb-4 text-sm text-destructive`,children:K(e,`auth.signIn.methodsLoadFailed`)}):null,n===null&&!i?(0,N.jsx)(`div`,{className:`space-y-2`,children:(0,N.jsx)(`div`,{className:`h-9 w-full animate-pulse rounded bg-muted`})}):null,n&&n.length===0?(0,N.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:K(e,`auth.signIn.noMethods`)}):null,n&&n.length>0?(0,N.jsx)(`div`,{children:n.map(e=>(0,N.jsx)($h,{method:e,returnTo:t},e.kind===`social`?`social:${e.provider}`:e.kind))}):null]})})}function $h({method:e,returnTo:t}){switch(e.kind){case`social`:return(0,N.jsx)(tg,{provider:e.provider,returnTo:t});case`email-otp`:return(0,N.jsx)(ng,{returnTo:t});case`magic-link`:return(0,N.jsx)(rg,{returnTo:t});default:return(0,N.jsx)(ig,{kind:e.kind})}}var eg={github:`GitHub`,google:`Google`,apple:`Apple`,"microsoft-entra-id":`Microsoft`,facebook:`Facebook`,discord:`Discord`,twitter:`Twitter / X`,linkedin:`LinkedIn`,spotify:`Spotify`,twitch:`Twitch`,gitlab:`GitLab`,tiktok:`TikTok`,reddit:`Reddit`,kick:`Kick`,vk:`VK`,naver:`Naver`,kakao:`Kakao`,line:`LINE`,slack:`Slack`,atlassian:`Atlassian`,zoom:`Zoom`,notion:`Notion`,figma:`Figma`,linear:`Linear`,vercel:`Vercel`,paypal:`PayPal`,huggingface:`Hugging Face`,cognito:`Cognito`,salesforce:`Salesforce`,polar:`Polar`,railway:`Railway`,roblox:`Roblox`,paybin:`Paybin`,wechat:`WeChat`,dropbox:`Dropbox`};function tg({provider:e,returnTo:t}){let{language:n}=G(),r=eg[e]??e,i=async()=>{let n=await fetch(`/api/auth/sign-in/social`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:e,callbackURL:t})});if(!n.ok)return;let r=await n.json();r.url&&(window.location.href=r.url)};return(0,N.jsx)(`div`,{className:Xh,children:(0,N.jsx)(V,{onClick:()=>void i(),className:`w-full`,children:K(n,`auth.signIn.method.social.button`,{provider:r})})})}function ng({returnTo:e}){let{language:t}=G(),[n,r]=M.useState(`email`),[i,a]=M.useState(``),[o,s]=M.useState(``),[c,l]=M.useState(!1),[u,d]=M.useState(null),f=async e=>{l(!0),d(null);try{await e()}finally{l(!1)}};return(0,N.jsxs)(`div`,{className:Zh,children:[(0,N.jsx)(`p`,{className:`mb-2 text-sm text-muted-foreground`,children:K(t,`auth.signIn.method.email-otp.body`)}),n===`email`?(0,N.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),i&&f(async()=>{if(!(await fetch(`/api/auth/email-otp/send-verification-otp`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({email:i,type:`sign-in`})})).ok){d(K(t,`auth.signIn.method.email-otp.sendFailed`));return}r(`otp`)})},className:`space-y-2`,children:[(0,N.jsx)(`label`,{htmlFor:`signin-email`,className:`sr-only`,children:K(t,`auth.signIn.method.email-otp.emailLabel`)}),(0,N.jsx)(`input`,{id:`signin-email`,type:`email`,value:i,onChange:e=>a(e.currentTarget.value),placeholder:K(t,`auth.signIn.method.email-otp.emailPlaceholder`),required:!0,autoComplete:`email`,className:Yh}),(0,N.jsx)(V,{type:`submit`,className:`w-full`,disabled:c||!i,children:K(t,`auth.signIn.method.email-otp.sendButton`)})]}):(0,N.jsxs)(`form`,{onSubmit:n=>{n.preventDefault(),o&&f(async()=>{if(!(await fetch(`/api/auth/sign-in/email-otp`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({email:i,otp:o})})).ok){d(K(t,`auth.signIn.method.email-otp.verifyFailed`));return}window.location.assign(e)})},className:`space-y-2`,children:[(0,N.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:K(t,`auth.signIn.method.email-otp.sentTo`,{email:i})}),(0,N.jsx)(`label`,{htmlFor:`signin-otp`,className:`sr-only`,children:K(t,`auth.signIn.method.email-otp.otpLabel`)}),(0,N.jsx)(`input`,{id:`signin-otp`,type:`text`,inputMode:`numeric`,autoComplete:`one-time-code`,value:o,onChange:e=>s(e.currentTarget.value),placeholder:K(t,`auth.signIn.method.email-otp.otpPlaceholder`),required:!0,className:Yh}),(0,N.jsx)(V,{type:`submit`,className:`w-full`,disabled:c||!o,children:K(t,`auth.signIn.method.email-otp.verifyButton`)}),(0,N.jsx)(`button`,{type:`button`,onClick:()=>r(`email`),className:`text-xs text-muted-foreground underline-offset-2 hover:underline`,children:K(t,`auth.signIn.method.email-otp.back`)})]}),u?(0,N.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:u}):null]})}function rg({returnTo:e}){let{language:t}=G(),[n,r]=M.useState(``),[i,a]=M.useState(!1),[o,s]=M.useState(!1),[c,l]=M.useState(null),u=async e=>{a(!0),l(null);try{await e()}finally{a(!1)}};return(0,N.jsxs)(`div`,{className:Zh,children:[(0,N.jsx)(`p`,{className:`mb-2 text-sm text-muted-foreground`,children:K(t,`auth.signIn.method.magic-link.body`)}),o?(0,N.jsxs)(`div`,{className:`space-y-2`,children:[(0,N.jsx)(`p`,{className:`text-sm text-foreground`,children:K(t,`auth.signIn.method.magic-link.sentTo`,{email:n})}),(0,N.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:K(t,`auth.signIn.method.magic-link.clickHint`)}),(0,N.jsx)(`button`,{type:`button`,onClick:()=>{s(!1),r(``)},className:`text-xs text-muted-foreground underline-offset-2 hover:underline`,children:K(t,`auth.signIn.method.magic-link.anotherEmail`)})]}):(0,N.jsxs)(`form`,{onSubmit:r=>{r.preventDefault(),n&&u(async()=>{if(!(await fetch(`/api/auth/sign-in/magic-link`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({email:n,callbackURL:e})})).ok){l(K(t,`auth.signIn.method.magic-link.sendFailed`));return}s(!0)})},className:`space-y-2`,children:[(0,N.jsx)(`label`,{htmlFor:`signin-mlink-email`,className:`sr-only`,children:K(t,`auth.signIn.method.magic-link.emailLabel`)}),(0,N.jsx)(`input`,{id:`signin-mlink-email`,type:`email`,value:n,onChange:e=>r(e.currentTarget.value),placeholder:K(t,`auth.signIn.method.magic-link.emailPlaceholder`),required:!0,autoComplete:`email`,className:Yh}),(0,N.jsx)(V,{type:`submit`,className:`w-full`,disabled:i||!n,children:K(t,`auth.signIn.method.magic-link.sendButton`)})]}),c?(0,N.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:c}):null]})}function ig({kind:e}){let{language:t}=G();return(0,N.jsx)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:K(t,`auth.signIn.unknownMethod`,{kind:e})})}function ag(){fetch(`/api/auth/sign-out`,{method:`POST`,credentials:`include`}).then(()=>{window.location.href=`/admin/sign-in`})}function og({eyebrow:e,title:t,description:n,actions:r}){return(0,N.jsxs)(`div`,{className:`mb-6 flex flex-wrap items-end justify-between gap-4`,children:[(0,N.jsxs)(`div`,{className:`min-w-0`,children:[e?(0,N.jsx)(`p`,{className:`label-eyebrow mb-1`,children:e}):null,(0,N.jsx)(`h1`,{className:`text-2xl`,children:t}),n?(0,N.jsx)(`div`,{className:`mt-1 max-w-3xl text-sm text-muted-foreground`,children:n}):null]}),r?(0,N.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:r}):null]})}function sg({className:e,children:t}){return(0,N.jsx)(`section`,{className:B(`glass-card p-5`,e),children:t})}function cg({icon:e=jt,title:t,description:n,action:r}){return(0,N.jsxs)(`div`,{className:`rounded-lg border border-dashed border-border p-8 text-center`,children:[(0,N.jsx)(`div`,{className:`mx-auto mb-3 inline-flex size-10 items-center justify-center rounded-full bg-accent text-accent-foreground`,children:(0,N.jsx)(e,{className:`size-5`,"aria-hidden":!0})}),(0,N.jsx)(`h2`,{className:`text-lg`,children:t}),n?(0,N.jsx)(`p`,{className:`mx-auto mt-1 max-w-md text-sm text-muted-foreground`,children:n}):null,r?(0,N.jsx)(`div`,{className:`mt-4`,children:r}):null]})}function lg({error:e}){let{language:t}=G(),n=e instanceof Oc&&e.status===401;if(M.useEffect(()=>{if(!n||typeof window>`u`)return;let e=window.location.pathname+window.location.search;window.location.href=`/admin/sign-in?return=${encodeURIComponent(e)}`},[n]),n)return null;let r=e instanceof Error?e.message:`Unknown error.`;return(0,N.jsxs)(`div`,{className:`rounded-lg border border-destructive/30 bg-destructive/5 p-4 text-sm text-destructive`,children:[K(t,`common.failedToLoad`),`: `,r]})}function ug(){let{language:e}=G(),t=P({queryKey:[`site`],queryFn:()=>Ac.get(`/site`)}),n=P({queryKey:[`collections`],queryFn:async()=>(await Ac.get(`/collections`)).collections}),r=(n.data??[]).filter(e=>!e.parent),i=t.data;return(0,N.jsxs)(`div`,{className:`space-y-6`,children:[(0,N.jsx)(og,{eyebrow:K(e,`console.eyebrow`),title:i?.brand??`AotterMantle`,description:i?K(e,`console.description`,{title:i.title}):K(e,`console.descriptionFallback`),actions:i?.publicUrl?(0,N.jsx)(V,{asChild:!0,variant:`outline`,children:(0,N.jsxs)(`a`,{href:i.publicUrl,target:`_blank`,rel:`noreferrer`,children:[(0,N.jsx)(Ht,{className:`size-4`,"aria-hidden":!0}),K(e,`common.viewSite`)]})}):null}),(0,N.jsx)(`div`,{className:`grid grid-cols-1 gap-4`,children:(0,N.jsxs)(sg,{className:`admin-dashboard-panel`,children:[(0,N.jsxs)(`div`,{className:`mb-4 flex items-start gap-3`,children:[(0,N.jsx)(`div`,{className:`rounded-xl bg-primary/15 p-2 text-primary`,children:(0,N.jsx)(cn,{className:`size-5`,"aria-hidden":!0})}),(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`h2`,{className:`text-lg`,children:K(e,`console.workspace.title`)}),(0,N.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:K(e,`console.workspace.body`)})]})]}),(0,N.jsxs)(`div`,{className:`grid grid-cols-1 gap-2 sm:grid-cols-3`,children:[(0,N.jsx)(dg,{href:`/admin/c/products`,icon:cn,label:K(e,`workspace.products`)}),(0,N.jsx)(dg,{href:`/admin/c/pages`,icon:Bt,label:K(e,`workspace.pages`)}),(0,N.jsx)(dg,{href:`/admin/media`,icon:qt,label:K(e,`workspace.media`)})]})]})}),(0,N.jsxs)(`section`,{children:[(0,N.jsx)(og,{eyebrow:K(e,`console.collections.eyebrow`),title:K(e,`console.collections.title`),description:K(e,`console.collections.body`)}),n.isLoading&&(0,N.jsx)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3`,children:[0,1,2].map(e=>(0,N.jsx)(`div`,{className:`glass-card h-36 animate-pulse`},e))}),n.isError&&(0,N.jsx)(lg,{error:n.error}),n.data&&r.length===0&&(0,N.jsx)(cg,{icon:Rt,title:K(e,`console.collections.emptyTitle`),description:K(e,`console.collections.emptyBody`)}),r.length>0&&(0,N.jsx)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3`,children:r.map(t=>(0,N.jsxs)(`a`,{href:`/admin/c/${encodeURIComponent(t.name)}`,className:`glass-card card-lift block p-5 no-underline text-foreground`,children:[(0,N.jsxs)(`div`,{className:`mb-3 flex items-start justify-between gap-3`,children:[(0,N.jsxs)(`div`,{className:`min-w-0`,children:[(0,N.jsx)(`h2`,{className:`truncate text-lg`,title:Mh(t,e),children:Mh(t,e)}),(0,N.jsx)(`p`,{className:`font-mono text-xs text-muted-foreground`,children:t.name})]}),(0,N.jsx)(Bt,{className:`size-5 shrink-0 text-muted-foreground`,"aria-hidden":!0})]}),Nh(t,e)?(0,N.jsx)(`p`,{className:`line-clamp-2 text-sm text-muted-foreground`,children:Nh(t,e)}):(0,N.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:K(e,`console.collections.noDescription`)}),(0,N.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-2`,children:[(0,N.jsx)(`span`,{className:`badge-status bg-accent text-accent-foreground`,children:t.lifecycle}),t.hasTranslations?(0,N.jsx)(`span`,{className:`badge-status bg-[color-mix(in_srgb,var(--info)_16%,transparent)] text-[color:var(--info)]`,children:`i18n`}):null,t.mediaFields?.length?(0,N.jsx)(`span`,{className:`badge-status bg-[color-mix(in_srgb,var(--success)_16%,transparent)] text-[color:var(--success)]`,children:`media`}):null,(0,N.jsx)(`span`,{className:`badge-status bg-muted text-muted-foreground`,children:kh(e,`published`)})]})]},t.name))})]})]})}function dg({href:e,icon:t,label:n}){return(0,N.jsxs)(`a`,{href:e,title:n,className:`quick-action`,children:[(0,N.jsx)(t,{className:`size-4`,"aria-hidden":!0}),(0,N.jsx)(`span`,{children:n})]})}function fg({children:e,className:t}){return(0,N.jsx)(`div`,{className:B(`glass-card overflow-hidden`,t),children:(0,N.jsx)(`div`,{className:`overflow-x-auto`,children:(0,N.jsx)(`table`,{className:`w-full min-w-[720px] text-sm`,children:e})})})}function pg({children:e,className:t}){return(0,N.jsx)(`th`,{className:B(`label-eyebrow px-3 py-2 text-left`,t),children:e})}function mg({children:e,className:t}){return(0,N.jsx)(`td`,{className:B(`px-3 py-2 align-middle`,t),children:e})}var hg={draft:`bg-muted text-muted-foreground`,review:`bg-[color-mix(in_srgb,var(--warning)_18%,transparent)] text-[color:var(--warning)]`,approved:`bg-[color-mix(in_srgb,var(--success)_18%,transparent)] text-[color:var(--success)]`,scheduled:`bg-[color-mix(in_srgb,var(--info)_18%,transparent)] text-[color:var(--info)]`,published:`bg-[color-mix(in_srgb,var(--success)_18%,transparent)] text-[color:var(--success)]`,archived:`bg-secondary text-muted-foreground`};function gg({status:e,className:t}){return(0,N.jsx)(`span`,{className:B(`badge-status`,_g(e)?hg[e]:`bg-accent text-accent-foreground`,t),children:e})}function _g(e){return e in hg}var vg=new Intl.DateTimeFormat(void 0,{dateStyle:`short`,timeStyle:`short`});function yg({collectionName:e}){let{language:t}=G(),n=zc(),r=Ze(),i=new URLSearchParams(n.search),a=i.get(`status`)??void 0,o=i.get(`search`)?.trim()??``,s=P({queryKey:[`collections`],queryFn:async()=>(await Ac.get(`/collections`)).collections}),c=P({queryKey:[`entries`,e,a??`all`,t],queryFn:()=>{let n=new URLSearchParams({collection:e,limit:`99`,locale:t});return a&&n.set(`status`,a),Ac.get(`/entries?${n.toString()}`)}}),[l,u]=M.useState(null);M.useEffect(()=>{c.data&&u(c.data)},[c.data]);let d=c.data??l,f=M.useMemo(()=>{if(!d||!o)return d;let e=o.toLocaleLowerCase();return{...d,items:d.items.filter(n=>{let r=kg(n.title,t);return[n.id,n.collection,n.status,n.locale??``,r].some(t=>String(t).toLocaleLowerCase().includes(e))})}},[d,t,o]),p=c.isLoading&&!d,m=s.data?.find(t=>t.name===e),h=m?Mh(m,t):e,g=M.useCallback(()=>{r.invalidateQueries({queryKey:[`entries`,e]})},[e,r]),_=ft({mutationFn:({id:e,title:t,version:n})=>Ac.patch(`/entries/${encodeURIComponent(e)}`,{data:{title:t},expectedVersion:n}),onSuccess:g}),v=ft({mutationFn:e=>Ac.delete(`/entries/${encodeURIComponent(e)}`),onSuccess:g});return(0,N.jsxs)(`div`,{children:[(0,N.jsx)(og,{eyebrow:(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`a`,{href:`/admin`,className:`hover:underline`,children:K(t,`collection.breadcrumb`)}),(0,N.jsx)(`span`,{className:`mx-2 text-foreground/30`,children:`/`}),(0,N.jsx)(`span`,{className:`text-foreground/70`,children:e})]}),title:h,description:xg(m,t),actions:(0,N.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:[a?(0,N.jsx)(gg,{status:a}):null,m?.hasTranslations?(0,N.jsx)(`span`,{className:`badge-status bg-accent text-accent-foreground`,children:`i18n`}):null,m?.mediaFields?.length?(0,N.jsx)(`span`,{className:`badge-status bg-[color-mix(in_srgb,var(--success)_16%,transparent)] text-[color:var(--success)]`,children:`media`}):null]})}),m?(0,N.jsx)(bg,{collectionName:m.name,status:a,searchTerm:o,language:t}):null,m?(0,N.jsx)(Cg,{collection:m,activeStatus:a,searchTerm:o,language:t}):null,p&&(0,N.jsx)(Eg,{}),c.isError&&!d&&(0,N.jsx)(lg,{error:c.error}),f&&f.items.length===0&&(0,N.jsx)(cg,{icon:Bt,title:K(t,`collection.empty.title`),description:o?K(t,`collection.empty.search`,{search:o}):a?K(t,`collection.empty.withStatus`,{status:a}):K(t,`collection.empty.all`)}),f&&f.items.length>0&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(fg,{children:[(0,N.jsx)(`thead`,{children:(0,N.jsxs)(`tr`,{className:`border-b border-[var(--glass-border)]`,children:[(0,N.jsx)(pg,{children:K(t,`collection.table.id`)}),(0,N.jsx)(pg,{children:K(t,`collection.table.title`)}),(0,N.jsx)(pg,{children:K(t,`collection.table.status`)}),(0,N.jsx)(pg,{children:K(t,`collection.table.locale`)}),(0,N.jsx)(pg,{children:K(t,`collection.table.version`)}),(0,N.jsx)(pg,{children:K(t,`collection.table.updated`)}),(0,N.jsx)(pg,{children:K(t,`collection.table.actions`)})]})}),(0,N.jsx)(`tbody`,{children:f.items.map(e=>(0,N.jsx)(Dg,{row:e,language:t,collection:m,onRename:t=>_.mutateAsync({id:e.id,title:t,version:e.version}),onDelete:()=>v.mutateAsync(e.id),busy:_.isPending&&_.variables?.id===e.id||v.isPending&&v.variables===e.id},e.id))})]}),c.isFetching&&!c.data?(0,N.jsx)(`p`,{className:`mt-3 text-xs text-muted-foreground`,children:K(t,`collection.refreshing`)}):null,f.next_cursor?(0,N.jsx)(`p`,{className:`mt-3 text-xs text-muted-foreground`,children:K(t,`collection.moreRows`)}):null]})]})}function bg({collectionName:e,status:t,searchTerm:n,language:r}){let[i,a]=M.useState(n);return M.useEffect(()=>a(n),[n]),(0,N.jsx)(`form`,{className:`mb-3 max-w-xl`,role:`search`,onSubmit:n=>{n.preventDefault();let r=i.trim(),a=new URLSearchParams;t&&a.set(`status`,t),r&&a.set(`search`,r);let o=a.toString();window.location.href=`/admin/c/${encodeURIComponent(e)}${o?`?${o}`:``}`},children:(0,N.jsxs)(`label`,{className:`relative block`,children:[(0,N.jsx)(mn,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground`,"aria-hidden":!0}),(0,N.jsx)(`input`,{className:`admin-input h-10 pl-9`,value:i,onChange:e=>a(e.target.value),placeholder:K(r,`collection.searchPlaceholder`)})]})})}function xg(e,t){let n=Nh(e,t)?.trim();return n?Sg(n)?(0,N.jsxs)(`div`,{className:`space-y-2`,children:[(0,N.jsx)(`p`,{children:K(t,`collection.schemaSummary`,{name:e?Mh(e,t):``})}),(0,N.jsxs)(`details`,{className:`group`,children:[(0,N.jsx)(`summary`,{className:`inline-flex cursor-pointer list-none items-center rounded-md border border-border bg-card/70 px-2.5 py-1 text-xs font-semibold text-foreground/70 transition hover:bg-accent hover:text-accent-foreground`,children:K(t,`collection.schemaDetails`)}),(0,N.jsx)(`p`,{className:`mt-2 max-w-3xl rounded-md border border-border bg-card/55 p-3 text-xs leading-relaxed text-muted-foreground`,children:n})]})]}):n:K(t,`collection.defaultDescription`)}function Sg(e){return e.length>180||/`|SKU|BCP|ISO|ContentState|column|field|schema|locale|inventory/i.test(e)}function Cg({collection:e,activeStatus:t,searchTerm:n,language:r}){let i=e.lifecycle===`editorial`?[`draft`,`review`,`published`,`archived`]:[`draft`,`published`,`archived`];return(0,N.jsxs)(`div`,{className:`mb-5 flex gap-2 overflow-x-auto pb-1`,"data-tour":`status-filter`,children:[(0,N.jsx)(Tg,{href:wg(e.name,void 0,n),active:!t,children:K(r,`collection.filter.all`)}),i.map(i=>(0,N.jsx)(Tg,{href:wg(e.name,i,n),active:t===i,children:kh(r,i)},i))]})}function wg(e,t,n){let r=new URLSearchParams;t&&r.set(`status`,t),n&&r.set(`search`,n);let i=r.toString();return`/admin/c/${encodeURIComponent(e)}${i?`?${i}`:``}`}function Tg({href:e,active:t,children:n}){return(0,N.jsx)(`a`,{href:e,"aria-current":t?`page`:void 0,className:B(`inline-flex h-8 shrink-0 items-center justify-center rounded-lg border px-3 text-xs font-medium`,`transition-colors duration-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,t?`border-[var(--glass-border)] bg-secondary text-secondary-foreground`:`border-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground`),children:n})}function Eg(){return(0,N.jsx)(`div`,{className:`glass-card overflow-hidden`,children:[0,1,2,3,4].map(e=>(0,N.jsxs)(`div`,{className:`flex items-center gap-4 border-b border-[var(--glass-border)] p-3 last:border-b-0`,children:[(0,N.jsx)(`div`,{className:`h-3 w-16 animate-pulse rounded bg-muted`}),(0,N.jsx)(`div`,{className:`h-3 flex-1 animate-pulse rounded bg-muted`}),(0,N.jsx)(`div`,{className:`h-6 w-20 animate-pulse rounded-full bg-muted`})]},e))})}function Dg({row:e,language:t,collection:n,onRename:r,onDelete:i,busy:a}){let o=kg(e.title,t),[s,c]=M.useState(!1),[l,u]=M.useState(o),[d,f]=M.useState(null);M.useEffect(()=>{s||u(o)},[s,o]);async function p(){let e=l.trim();if(!e||e===o){c(!1),u(o);return}f(null);try{await r(e),c(!1)}catch(e){f(e instanceof Error?e.message:String(e))}}async function m(){if(!(typeof window<`u`&&!window.confirm(K(t,`crud.deleteConfirm`,{name:o})))){f(null);try{await i()}catch(e){f(e instanceof Error?e.message:String(e))}}}return(0,N.jsxs)(`tr`,{className:`border-t border-[var(--glass-border)] hover:bg-accent/40`,children:[(0,N.jsx)(mg,{className:`font-mono text-xs text-muted-foreground`,children:String(e.id).slice(0,8)}),(0,N.jsx)(mg,{className:`max-w-[28rem]`,children:(0,N.jsxs)(`div`,{className:`min-w-[16rem]`,children:[s?(0,N.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,N.jsx)(`input`,{className:`admin-input h-9 min-w-0 flex-1`,value:l,autoFocus:!0,disabled:a,onChange:e=>u(e.target.value),onBlur:()=>void p(),onKeyDown:e=>{e.key===`Enter`&&p(),e.key===`Escape`&&(u(o),c(!1))}}),(0,N.jsx)(`button`,{type:`button`,className:`row-action`,title:K(t,`crud.saveTitle`),disabled:a,onMouseDown:e=>e.preventDefault(),onClick:()=>void p(),children:(0,N.jsx)(Dt,{className:`size-3.5`,"aria-hidden":!0})}),(0,N.jsx)(`button`,{type:`button`,className:`row-action`,title:K(t,`crud.cancelTitle`),disabled:a,onMouseDown:e=>e.preventDefault(),onClick:()=>{u(o),c(!1)},children:(0,N.jsx)(Fn,{className:`size-3.5`,"aria-hidden":!0})})]}):(0,N.jsxs)(`button`,{type:`button`,className:`group inline-flex max-w-full items-center gap-2 text-left`,onClick:()=>c(!0),title:o,children:[(0,N.jsx)(`span`,{className:`truncate`,children:Og(e.title,t)}),(0,N.jsx)(cn,{className:`size-3 shrink-0 opacity-0 transition-opacity group-hover:opacity-60`,"aria-hidden":!0})]}),d?(0,N.jsx)(`p`,{className:`mt-1 text-xs text-destructive`,children:d}):null]})}),(0,N.jsx)(mg,{children:(0,N.jsx)(gg,{status:e.status})}),(0,N.jsx)(mg,{className:`text-muted-foreground`,children:e.locale??`-`}),(0,N.jsxs)(mg,{className:`font-mono text-xs text-muted-foreground`,children:[`v`,e.version]}),(0,N.jsx)(mg,{className:`text-muted-foreground`,children:Ag(e.updated_at)}),(0,N.jsxs)(mg,{children:[(0,N.jsxs)(`div`,{className:`flex items-center gap-1`,"data-tour":`entry-actions`,children:[(0,N.jsx)(`a`,{className:`row-action`,title:K(t,`crud.editTooltip`,{name:o}),href:`/admin/c/${encodeURIComponent(e.collection)}/${encodeURIComponent(e.id)}`,children:(0,N.jsx)(cn,{className:`size-3.5`,"aria-hidden":!0})}),(0,N.jsx)(`button`,{type:`button`,className:`row-action`,title:K(t,`crud.deleteTooltip`,{name:o}),disabled:a,onClick:()=>void m(),children:(0,N.jsx)(Tn,{className:`size-3.5`,"aria-hidden":!0})})]}),(0,N.jsx)(`span`,{className:`sr-only`,children:n?Mh(n,t):``})]})]})}function Og(e,t){return e==null||e===``?(0,N.jsx)(`span`,{className:`text-muted-foreground`,children:K(t,`collection.untitled`)}):typeof e==`string`?e:(0,N.jsx)(`span`,{className:`font-mono text-xs`,children:JSON.stringify(e)})}function kg(e,t){return typeof e==`string`&&e?e:e==null||e===``?K(t,`collection.untitled`):JSON.stringify(e)}function Ag(e){if(!Number.isFinite(e))return`-`;try{return vg.format(new Date(e))}catch{return`-`}}var jg=[{name:`product-cover-01`,type:`image/webp`,tag:`product`,alt:`商品主視覺`,url:`/media/product-cover-01.webp`,size:`1920 x 1440`,createdAt:`2026-06-01`,tone:`linear-gradient(135deg,#e8dfcf,#a9c0b5 45%,#2b5b55)`},{name:`brand-story`,type:`image/jpeg`,tag:`brand`,alt:`品牌介紹圖片`,url:`/media/brand-story.jpg`,size:`1600 x 1200`,createdAt:`2026-05-31`,tone:`linear-gradient(135deg,#f3dccb,#d8aa72 48%,#213d59)`},{name:`workflow-map`,type:`image/png`,tag:`content`,alt:`流程示意圖`,url:`/media/workflow-map.png`,size:`1440 x 1080`,createdAt:`2026-05-30`,tone:`linear-gradient(135deg,#e9edf4,#9fb2ca 45%,#253453)`},{name:`homepage-hero`,type:`image/webp`,tag:`content`,alt:`首頁主視覺`,url:`/media/homepage-hero.webp`,size:`2400 x 1350`,createdAt:`2026-05-29`,tone:`linear-gradient(135deg,#f7f1df,#91b7a7 44%,#173f45)`}];async function Mg(e){let t=Ng(e.purposes,e.preferredPurpose);if(!t)throw Error(`No media upload purpose is configured for this site.`);let n=await Ig(e.file,t),r=await Ac.post(`/media/uploads`,{filename:e.file.name,purpose:t.name,variants:n.map(e=>({mimeType:e.mimeType,byteSize:e.blob.size,role:e.role})),alt:e.alt??Wg(e.file),caption:e.caption});for(let e of n){let t=r.capabilities.find(t=>t.mimeType===e.mimeType&&t.role===e.role);if(!t)throw Error(`Upload capability missing for ${e.mimeType}.`);await fetch(t.uploadUrl,{method:t.method,headers:t.requiredHeaders??{"Content-Type":e.mimeType},body:e.blob})}return Ac.post(`/media/uploads/${encodeURIComponent(r.uploadGroupId)}/commit`,{alt:e.alt??Wg(e.file),caption:e.caption})}function Ng(e,t){if(t){let n=e.find(e=>e.name===t);if(n)return n}return e.find(e=>e.name===`content`)??e[0]??null}function Pg(e,t,n){let r=n[n.length-1]??``,i=Ug(t.replace(/-translations$/,``)),a=[];/cover/i.test(r)&&a.push(`${i}-cover`),/image|asset|media/i.test(r)&&(a.push(`${i}-image`),a.push(`${i}-media`)),a.push(`content`);for(let t of a)if(e.some(e=>e.name===t))return t;return e[0]?.name}function Fg(e){return(e.variants.find(e=>e.role===`primary`)??e.variants[0])?.publicUrl??null}async function Ig(e,t){if(!e.type.startsWith(`image/`)||e.type===`image/svg+xml`)throw Error(`Only raster image uploads are supported in the admin UI.`);let n=Lg(t.required);if(n.length===0)throw Error(`Media purpose '${t.name}' does not declare required image variants.`);let r=await createImageBitmap(e);try{let e=n.map(e=>zg(e,t)),i=e.find(Hg)??e[0],a=[];for(let n of e){let e=t.maxBytes[n]??2**53-1;a.push({mimeType:n,role:n===i?`primary`:`alternate`,blob:await Bg(r,n,e)})}return a}finally{r.close?.()}}function Lg(e){return e.map(e=>e.split(`,`).map(Rg).filter(e=>!!e)).filter(e=>e.length>0)}function Rg(e){let t=e.trim().toLowerCase();return t?t===`jpg`||t===`jpeg`||t===`image/jpg`?`image/jpeg`:t===`png`?`image/png`:t===`webp`?`image/webp`:t===`avif`?`image/avif`:t===`gif`?`image/gif`:t.includes(`/`)?t:null:null}function zg(e,t){for(let n of e)if(n.startsWith(`image/`)&&t.maxBytes[n]!=null)return n;throw Error(`No browser-supported image mime in purpose '${t.name}'.`)}async function Bg(e,t,n){let r=1,i=t===`image/jpeg`?[.88,.78,.68,.58]:[.78,.68,.58,.48],a=null;for(let o=0;o<6;o+=1){for(let o of i){let i=await Vg(e,t,r,o);if(i.type===t&&(a=i,i.size<=n))return i}r*=.82}if(a)return a;throw Error(`This browser cannot encode ${t}.`)}async function Vg(e,t,n,r){let i=document.createElement(`canvas`);i.width=Math.max(1,Math.round(e.width*n)),i.height=Math.max(1,Math.round(e.height*n));let a=i.getContext(`2d`);if(!a)throw Error(`Could not prepare image upload.`);a.drawImage(e,0,0,i.width,i.height);let o=await new Promise(e=>i.toBlob(e,t,r));if(!o)throw Error(`This browser cannot encode ${t}.`);return o}function Hg(e){return e===`image/jpeg`||e===`image/png`||e===`image/gif`}function Ug(e){return e.endsWith(`ies`)?`${e.slice(0,-3)}y`:e.endsWith(`ses`)?e.slice(0,-2):e.endsWith(`s`)&&e.length>1?e.slice(0,-1):e}function Wg(e){return e.name.replace(/\.[^.]+$/,``)}function Gg({value:e,onChange:t,label:n,mode:r,onModeChange:i,compact:a=!1,showPreview:o=!1}){let{language:s}=G(),c=M.useRef(null),l=M.useRef(null),[u,d]=M.useState(!1),[f,p]=M.useState(!1),[m,h]=M.useState(!1),[g,_]=M.useState(null),v=r??`rich`,y=P({queryKey:[`site`],queryFn:()=>Ac.get(`/site`)}),b=M.useCallback((n,r=``,i=``)=>{let a=c.current;if(!a){t(`${e}${n}${i}${r}`);return}let o=a.selectionStart,s=a.selectionEnd,l=e.slice(o,s)||i;t(`${e.slice(0,o)}${n}${l}${r}${e.slice(s)}`),window.requestAnimationFrame(()=>{a.focus();let e=o+n.length,t=e+l.length;a.setSelectionRange(e,t)})},[t,e]),x=M.useCallback(t=>{b(`${e.endsWith(`
140
140
  `)||e.length===0?``:`
141
141
 
142
142
  `}${t}`,``,``)},[b,e]);async function S(e){h(!0),_(null);try{let t=await Mg({file:e,purposes:y.data?.media?.purposes??[],preferredPurpose:`content`}),n=Fg(t);if(!n)throw Error(`Uploaded media has no public URL.`);C(n,t.alt??e.name)}catch(e){_(e instanceof Error?e.message:String(e))}finally{h(!1),l.current&&(l.current.value=``)}}function C(e,t){x(`![${t||`image`}](${e})`)}function w(e){x($g(e)),p(!1)}function T(e){if(e!==`paragraph`){if(/^h[1-6]$/.test(e)){let t=Number(e.slice(1));b(`${`#`.repeat(t)} `,``,K(s,`editor.headingPlaceholder`));return}e===`quote`&&x(`> `),e===`code`&&b("```\n","\n```",`code`)}}return(0,N.jsxs)(`div`,{className:`rich-editor`,children:[(0,N.jsxs)(`div`,{className:`rich-editor-topline`,children:[n?(0,N.jsx)(`span`,{className:`text-sm font-semibold`,children:n}):null,i?(0,N.jsx)(`div`,{className:`segmented-control rich-editor-modes`,children:[`rich`,`markdown`,`html`].map(e=>(0,N.jsx)(`button`,{type:`button`,"data-active":v===e,onClick:()=>i(e),children:qg(s,e)},e))}):null]}),(0,N.jsxs)(`div`,{className:`rich-editor-toolbar`,"aria-label":K(s,`editor.toolbar`),children:[(0,N.jsx)(Kg,{title:K(s,`editor.undo`),onClick:()=>Qg(`undo`,c.current),children:(0,N.jsx)(kn,{className:`size-4`,"aria-hidden":!0})}),(0,N.jsx)(Kg,{title:K(s,`editor.redo`),onClick:()=>Qg(`redo`,c.current),children:(0,N.jsx)(dn,{className:`size-4`,"aria-hidden":!0})}),(0,N.jsx)(Jg,{}),(0,N.jsx)(Kg,{title:K(s,`editor.aiClean`),onClick:()=>x(`> 重點提示:`),children:(0,N.jsx)(Pn,{className:`size-4`,"aria-hidden":!0})}),(0,N.jsx)(Kg,{title:K(s,`editor.uploadImage`),onClick:()=>l.current?.click(),disabled:m,children:(0,N.jsx)(An,{className:`size-4`,"aria-hidden":!0})}),(0,N.jsx)(`input`,{ref:l,type:`file`,accept:`image/*`,className:`hidden`,onChange:e=>{let t=e.currentTarget.files?.[0];t&&S(t)}}),(0,N.jsx)(Jg,{}),(0,N.jsxs)(`label`,{className:`rich-editor-select`,title:K(s,`editor.textStyle`),children:[(0,N.jsx)(Dn,{className:`size-4`,"aria-hidden":!0}),(0,N.jsxs)(`select`,{onChange:e=>{T(e.target.value),e.target.value=`paragraph`},defaultValue:`paragraph`,children:[(0,N.jsx)(`option`,{value:`paragraph`,children:`Paragraph`}),(0,N.jsx)(`option`,{value:`h1`,children:`H1`}),(0,N.jsx)(`option`,{value:`h2`,children:`H2`}),(0,N.jsx)(`option`,{value:`h3`,children:`H3`}),(0,N.jsx)(`option`,{value:`h4`,children:`H4`}),(0,N.jsx)(`option`,{value:`h5`,children:`H5`}),(0,N.jsx)(`option`,{value:`h6`,children:`H6`}),(0,N.jsx)(`option`,{value:`quote`,children:`Quote`}),(0,N.jsx)(`option`,{value:`code`,children:`Code`})]})]}),(0,N.jsx)(Jg,{}),(0,N.jsx)(Kg,{title:K(s,`editor.bold`),onClick:()=>b(`**`,`**`,K(s,`editor.selectedText`)),children:(0,N.jsx)(Tt,{className:`size-4`,"aria-hidden":!0})}),(0,N.jsx)(Kg,{title:K(s,`editor.italic`),onClick:()=>b(`_`,`_`,K(s,`editor.selectedText`)),children:(0,N.jsx)(Jt,{className:`size-4`,"aria-hidden":!0})}),(0,N.jsx)(Kg,{title:K(s,`editor.underline`),onClick:()=>b(`<u>`,`</u>`,K(s,`editor.selectedText`)),children:(0,N.jsx)(On,{className:`size-4`,"aria-hidden":!0})}),(0,N.jsx)(Kg,{title:K(s,`editor.strike`),onClick:()=>b(`~~`,`~~`,K(s,`editor.selectedText`)),children:(0,N.jsx)(vn,{className:`size-4`,"aria-hidden":!0})}),(0,N.jsx)(Kg,{title:K(s,`editor.inlineCode`),onClick:()=>b("`","`",`code`),children:(0,N.jsx)(Ft,{className:`size-4`,"aria-hidden":!0})}),(0,N.jsx)(Kg,{title:K(s,`editor.textColor`),onClick:()=>b(`<span class="text-accent">`,`</span>`,K(s,`editor.selectedText`)),children:(0,N.jsx)(wt,{className:`size-4`,"aria-hidden":!0})}),(0,N.jsx)(Kg,{title:K(s,`editor.highlight`),onClick:()=>b(`<mark>`,`</mark>`,K(s,`editor.selectedText`)),children:(0,N.jsx)(Ut,{className:`size-4`,"aria-hidden":!0})}),(0,N.jsx)(Kg,{title:K(s,`editor.palette`),onClick:()=>b(`<span class="brand-tone">`,`</span>`,K(s,`editor.selectedText`)),children:(0,N.jsx)(on,{className:`size-4`,"aria-hidden":!0})}),(0,N.jsx)(Jg,{}),(0,N.jsx)(Kg,{title:K(s,`editor.alignLeft`),onClick:()=>x(`<p style="text-align:left"></p>`),children:(0,N.jsx)(wn,{className:`size-4`,"aria-hidden":!0})}),(0,N.jsx)(Kg,{title:K(s,`editor.alignCenter`),onClick:()=>x(`<p style="text-align:center"></p>`),children:(0,N.jsx)(Cn,{className:`size-4`,"aria-hidden":!0})}),(0,N.jsx)(Kg,{title:K(s,`editor.alignRight`),onClick:()=>x(`<p style="text-align:right"></p>`),children:(0,N.jsx)(Sn,{className:`size-4`,"aria-hidden":!0})}),(0,N.jsx)(Kg,{title:K(s,`editor.bulletList`),onClick:()=>x(`- `),children:(0,N.jsx)(en,{className:`size-4`,"aria-hidden":!0})}),(0,N.jsx)(Kg,{title:K(s,`editor.numberList`),onClick:()=>x(`1. `),children:(0,N.jsx)($t,{className:`size-4`,"aria-hidden":!0})}),(0,N.jsx)(Kg,{title:K(s,`editor.checkList`),onClick:()=>x(`- [ ] `),children:(0,N.jsx)(Zt,{className:`size-4`,"aria-hidden":!0})}),(0,N.jsx)(Kg,{title:K(s,`editor.indent`),onClick:()=>b(` `,``,``),children:(0,N.jsx)(Qt,{className:`size-4`,"aria-hidden":!0})}),(0,N.jsx)(Jg,{}),(0,N.jsx)(Kg,{title:K(s,`editor.link`),onClick:()=>b(`[`,`](https://)`,K(s,`editor.linkText`)),children:(0,N.jsx)(Xt,{className:`size-4`,"aria-hidden":!0})}),(0,N.jsx)(Kg,{title:K(s,`editor.table`),onClick:()=>x(`| 欄位 | 說明 |