efficient-shell 4.145.0 → 4.147.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/README.md +8 -3
  2. package/dist/{Browser-24YNRTKT.js → Browser-52FZDK3P.js} +14 -14
  3. package/dist/{Calculator-LER6KUQC.js → Calculator-4S44DK45.js} +22 -22
  4. package/dist/{ConfirmDialog-GAYETRMG.js → ConfirmDialog-KJNNVFK7.js} +1 -1
  5. package/dist/{CurrencyConverter-Y35GFDFF.js → CurrencyConverter-TH6ISVZ5.js} +5 -5
  6. package/dist/{Documents-7FYX2CGT.js → Documents-TEV6WUCC.js} +11 -11
  7. package/dist/{Files-RZOML2N6.js → Files-T3VMQAO3.js} +31 -31
  8. package/dist/{Notepad-VVDCBDUA.js → Notepad-LYNVGUHK.js} +9 -9
  9. package/dist/{PomodoroTimer-VAM3AJOX.js → PomodoroTimer-IEZ3ALBW.js} +24 -24
  10. package/dist/{Preview-HZ37D7QJ.js → Preview-SJCMGRUS.js} +5 -5
  11. package/dist/{Spreadsheet-6WX3P6AB.js → Spreadsheet-GR6GJTDP.js} +12 -12
  12. package/dist/{Stock-AUWI3TUX.js → Stock-MYXAUZJY.js} +3 -3
  13. package/dist/{Weather-HU75TH7T.js → Weather-HKCFNPV6.js} +15 -15
  14. package/dist/{WorldClock-T64MDRMJ.js → WorldClock-6XVXM4L2.js} +7 -7
  15. package/dist/apps/index.js +1 -1
  16. package/dist/brand.css +1 -1
  17. package/dist/chunk-6JXLEPRE.js +1 -0
  18. package/dist/{chunk-LVFMK5OQ.js → chunk-D4HWQ3ET.js} +1 -1
  19. package/dist/{chunk-2RHMSFZV.js → chunk-JNL7A5HC.js} +7 -7
  20. package/dist/{chunk-GDSGXDET.js → chunk-NUPXFPQW.js} +1 -1
  21. package/dist/{chunk-RJ4LACFH.js → chunk-NV35RTZK.js} +1 -1
  22. package/dist/{chunk-NBBOFQPL.js → chunk-ZFJH3P24.js} +63 -59
  23. package/dist/{chunk-7DAQ3WVP.js → chunk-ZR72F7TE.js} +24 -24
  24. package/dist/{index-NhR7frRu.d.ts → index-DIQYwgxx.d.ts} +38 -4
  25. package/dist/index.d.ts +2 -2
  26. package/dist/index.js +46 -46
  27. package/dist/page-tabs/index.js +10 -10
  28. package/dist/ui/index.d.ts +1 -1
  29. package/dist/ui/index.js +1 -1
  30. package/package.json +1 -1
  31. package/dist/chunk-TWV42Q3K.js +0 -1
@@ -1,4 +1,4 @@
1
- import{isStaleChunkError as e,CMD_Z as t,CMD_SHIFT_Z as n,LoadingSpinner as r,Result as o,useIsMobile as i,useShellPrefs as a}from"./chunk-V453E4KU.js";import{useShellAuth as l,navIcons as s}from"./chunk-UB4JIOLD.js";import{Button_default as c}from"./chunk-PH3PRIFP.js";import{PopupMenu as d,PopupMenuItem as u,PopupMenuDivider as h,PopupMenuLabel as m}from"./chunk-2RHMSFZV.js";import{Z_LAYERS as p,confirm as w,runEscapeInterceptors as f}from"./chunk-LVFMK5OQ.js";import{useShellStrings as y}from"./chunk-TR6PLN7W.js";import{createContext as g,Component as v,useContext as b,useLayoutEffect as x,useRef as k,useEffect as C,useState as E,useCallback as M,useSyncExternalStore as L,useMemo as N,isValidElement as S,cloneElement as T,useReducer as A,useId as z,Suspense as P}from"react";import{jsxs as I,jsx as D,Fragment as W}from"react/jsx-runtime";import{createPortal as $}from"react-dom";import{XMarkIcon as K}from"@heroicons/react/24/outline";import{useLocation as R}from"react-router-dom";import{useQueryClient as B,useQuery as j}from"@tanstack/react-query";function O(e){return"component"in e}function H(e){return"endpoint"in e}var V={};function F(e){V=e}var q=new Proxy({},{get:(e,t)=>V[t],has:(e,t)=>t in V,ownKeys:()=>Object.keys(V),getOwnPropertyDescriptor(e,t){if(t in V)return{configurable:!0,enumerable:!0,value:V[t]}}}),Y=null;function U(e){Y=e}function X(){return null!==Y}var _=/* @__PURE__ */new Set(["get","post","put","patch","delete","head","options","request"]),J=new Proxy({},{get:(e,t)=>Y?Y[t]:"string"==typeof t&&_.has(t)?()=>Promise.resolve({data:null,status:0,statusText:"",headers:{},config:{}}):void 0});function G({error:t,onReload:n}){const r=e(t);/* @__PURE__ */
1
+ import{isStaleChunkError as e,CMD_Z as t,CMD_SHIFT_Z as n,LoadingSpinner as r,Result as o,useIsMobile as i,useShellPrefs as a}from"./chunk-V453E4KU.js";import{useShellAuth as l,navIcons as s}from"./chunk-UB4JIOLD.js";import{Button_default as c}from"./chunk-PH3PRIFP.js";import{PopupMenu as d,PopupMenuItem as u,PopupMenuDivider as h,PopupMenuLabel as m}from"./chunk-JNL7A5HC.js";import{Z_LAYERS as p,confirm as w,runEscapeInterceptors as f}from"./chunk-D4HWQ3ET.js";import{useShellStrings as y}from"./chunk-TR6PLN7W.js";import{createContext as g,Component as v,useContext as b,useLayoutEffect as x,useRef as k,useEffect as C,useState as E,useCallback as M,useSyncExternalStore as L,useMemo as N,isValidElement as S,cloneElement as T,useReducer as A,useId as z,Suspense as P}from"react";import{jsxs as I,jsx as D,Fragment as W}from"react/jsx-runtime";import{createPortal as $}from"react-dom";import{XMarkIcon as K}from"@heroicons/react/24/outline";import{useLocation as R}from"react-router-dom";import{useQueryClient as B,useQuery as j}from"@tanstack/react-query";function H(e){return"component"in e}function O(e){return"endpoint"in e}var V={};function F(e){V=e}var q=new Proxy({},{get:(e,t)=>V[t],has:(e,t)=>t in V,ownKeys:()=>Object.keys(V),getOwnPropertyDescriptor(e,t){if(t in V)return{configurable:!0,enumerable:!0,value:V[t]}}}),Y=null;function U(e){Y=e}function X(){return null!==Y}var _=/* @__PURE__ */new Set(["get","post","put","patch","delete","head","options","request"]),J=new Proxy({},{get:(e,t)=>Y?Y[t]:"string"==typeof t&&_.has(t)?()=>Promise.resolve({data:null,status:0,statusText:"",headers:{},config:{}}):void 0});function G({error:t,onReload:n}){const r=e(t);/* @__PURE__ */
2
2
  return I("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 py-12 text-center",children:[
3
3
  /* @__PURE__ */D("svg",{className:"h-8 w-8 text-amber-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})}),
4
4
  /* @__PURE__ */I("div",{className:"min-w-0",children:[
@@ -14,9 +14,9 @@ return D(o,{status:"warning",title:"Sign in required",subTitle:"Your session may
14
14
  return D(o,{status:"403",className:le});if(404===e||410===e)/* @__PURE__ */
15
15
  return D(o,{status:"404",title:"Record not found",className:le});const t=null==e||408===e||429===e||e>=500;/* @__PURE__ */
16
16
  return D(o,{status:"500",title:"Couldn't load record",subTitle:t?"Check your connection and try again.":"The server rejected this request.",extra:t?/* @__PURE__ */D(c,{variant:"secondary",size:"sm",onClick:i,children:"Try again"}):void 0,className:le})}/* @__PURE__ */
17
- return D(o,{status:"404",title:"Record not found",className:le})}function ue({entity:e,children:t,...n}){return null!=e?/* @__PURE__ */D(W,{children:t(e)}):/* @__PURE__ */D(de,{...n})}var he=/^[a-z]+(?:-[a-z]+)*-\d{13}$/;function me(e){return"string"==typeof e&&(e.startsWith("new-")||he.test(e))}function pe(e){if(me(e.entityId))return!0;const t=e.entitySnapshot;return!(!t||"object"!=typeof t||!t._new&&!t._duplicate)}var we=g({openWindows:[],openEntity:()=>{},openPage:()=>{},closeEntity:()=>{},minimize:()=>{},items:[],restore:()=>{},remove:()=>{},restoreIfMinimized:()=>!1,openItems:[]}),fe=g(null);function ye(e){const t=b(fe),n=k(null);null===n.current&&(n.current=/* @__PURE__ */Symbol("window-dirty")),x(()=>{if(t)return t(n.current,e)},[t,e]),C(()=>{if(!t||!e)return;const n=e=>{e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",n),()=>window.removeEventListener("beforeunload",n)},[t,e])}function ge(){const e=k(/* @__PURE__ */new Map),[t,n]=E(!1);return{dirty:t,registerDirty:M((t,r)=>{const o=()=>{const t=Array.from(e.current.values()).some(Boolean);n(e=>e===t?e:t)};return e.current.set(t,r),o(),()=>{e.current.delete(t),o()}},[])}}function ve(){return b(we)}function be(e){if("page"!==e.type&&pe(e))return null;const t="page"===e.type?"page":e.entityType||"",n="page"===e.type?e.route||"":e.entityId||"";return t&&n?{entityType:t,entityId:n,label:e.label}:null}function xe({item:e,onClose:t,accentRgb:n}){const{dirty:r,registerDirty:o}=ge(),i=q[e.route];if(!i||!O(i))return null;const a=i,l=a.component;/* @__PURE__ */
17
+ return D(o,{status:"404",title:"Record not found",className:le})}function ue({entity:e,children:t,...n}){return null!=e?/* @__PURE__ */D(W,{children:t(e)}):/* @__PURE__ */D(de,{...n})}var he=/^[a-z]+(?:-[a-z]+)*-\d{13}$/;function me(e){return"string"==typeof e&&(e.startsWith("new-")||he.test(e))}function pe(e){if(me(e.entityId))return!0;const t=e.entitySnapshot;return!(!t||"object"!=typeof t||!t._new&&!t._duplicate)}var we=g({openWindows:[],openEntity:()=>{},openPage:()=>{},closeEntity:()=>{},minimize:()=>{},items:[],restore:()=>{},remove:()=>{},restoreIfMinimized:()=>!1,openItems:[]}),fe=g(null);function ye(e){const t=b(fe),n=k(null);null===n.current&&(n.current=/* @__PURE__ */Symbol("window-dirty")),x(()=>{if(t)return t(n.current,e)},[t,e]),C(()=>{if(!t||!e)return;const n=e=>{e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",n),()=>window.removeEventListener("beforeunload",n)},[t,e])}function ge(){const e=k(/* @__PURE__ */new Map),[t,n]=E(!1);return{dirty:t,registerDirty:M((t,r)=>{const o=()=>{const t=Array.from(e.current.values()).some(Boolean);n(e=>e===t?e:t)};return e.current.set(t,r),o(),()=>{e.current.delete(t),o()}},[])}}function ve(){return b(we)}function be(e){if("page"!==e.type&&pe(e))return null;const t="page"===e.type?"page":e.entityType||"",n="page"===e.type?e.route||"":e.entityId||"";return t&&n?{entityType:t,entityId:n,label:e.label}:null}function xe({item:e,onClose:t,accentRgb:n}){const{dirty:r,registerDirty:o}=ge(),i=q[e.route];if(!i||!H(i))return null;const a=i,l=a.component;/* @__PURE__ */
18
18
  return D(Vn,{open:!0,onClose:t,icon:s[e.route],title:a.label,size:a.size||"2xl",dirty:r,allowPinOnTop:a.allowPinOnTop,initialPosition:a.initialPosition,widget:a.widget,compact:a.compact,appStyle:a.appStyle,flushBody:a.flushBody,autoHeight:a.autoHeight,autoMinHeight:a.autoMinHeight,autoWidth:a.autoWidth,dimensions:a.dimensions,windowKey:e.id,openedFromKey:e.openedFrom,accentRgb:n,children:/* @__PURE__ */D(fe.Provider,{value:o,children:/* @__PURE__ */D(P,{fallback:/* @__PURE__ */D("div",{className:"flex items-center justify-center py-12",children:/* @__PURE__ */D(ae,{})}),children:/* @__PURE__ */D(l,{})})})})}function ke({entityType:e,entityId:t,label:n}){const r=y(),o=B(),{data:i}=j({queryKey:["my-profile-sidebar"],enabled:X(),queryFn:()=>J.get("/auth/me/").then(e=>e.data)}),a=(i?.preferences||{}).favorite_documents||[],l=a.some(n=>n.entityType===e&&n.entityId===t);/* @__PURE__ */
19
- return D("button",{onClick:()=>{const r=l?a.filter(n=>!(n.entityType===e&&n.entityId===t)):[...a,{entityType:e,entityId:t,label:n}];J.patch("/auth/me/",{preferences:{favorite_documents:r}}).then(()=>{o.invalidateQueries({queryKey:["my-profile-sidebar"]})})},title:l?r.taskbar.removeFromDesktop:r.taskbar.addToDesktop,className:"shrink-0 transition-colors "+(l?"text-yellow-500 hover:text-yellow-600":"text-gray-300 hover:text-yellow-400"),children:/* @__PURE__ */D("svg",{className:"h-4 w-4",fill:l?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"})})})}function Ce({item:e,onClose:t,onMinimize:n,accentRgb:r}){const o=q[e.entityType];if(!o||!H(o))return null;const i=o,[a,l]=E(!1),{dirty:c,registerDirty:d}=ge(),u=i.queryKey||i.endpoint.replace(/^\/|\/$/g,"").split("/").pop()||e.entityType,h=e.entitySnapshot?._duplicate,m=me(e.entityId),p=!i.selfFetching&&!h&&!m&&X(),w=j({queryKey:[u,e.entityId],queryFn:()=>{return J.get((t=i.endpoint,n=String(e.entityId),`${t}${encodeURIComponent(n)}/`)).then(e=>e.data);var t,n},initialData:ce(e.entitySnapshot),initialDataUpdatedAt:0,enabled:p,staleTime:0,refetchOnWindowFocus:!0,refetchOnMount:"always",refetchInterval:e=>!oe(e.state.error)&&6e4,refetchIntervalInBackground:!1,retry:ie}),f=w.data,y=w.refetch;C(()=>{if(i.selfFetching||h||m)return;const e=()=>{y()};return window.addEventListener("modal-reorder",e),()=>window.removeEventListener("modal-reorder",e)},[y,i.selfFetching,h,m]);const g=M(()=>{a&&!c?l(!1):t()},[a,c,t]),v=i.selfFetching?e.label:f?i.title(f,a,l):e.label,b=i.icon,x=b?s[b]:null,k=v,L=!i.selfFetching&&f&&i.footer&&!h?i.footer(f):void 0;return i.rendersOwnModal?i.selfFetching?/* @__PURE__ */D(P,{fallback:/* @__PURE__ */D(ae,{}),children:i.render(f??e.entitySnapshot,t,e.entityId,a,l)}):null!=f?/* @__PURE__ */D(P,{fallback:/* @__PURE__ */D(Vn,{open:!0,onClose:t,title:e.label,size:i.size||"2xl",children:/* @__PURE__ */D(se,{})}),children:i.render(f,t,e.entityId,a,l)}):/* @__PURE__ */D(Vn,{open:!0,onClose:t,title:e.label,size:i.size||"2xl",children:/* @__PURE__ */D(de,{isPending:w.isPending,isFetching:w.isFetching,enabled:p,error:w.error,onRetry:y})}):/* @__PURE__ */D(Vn,{open:!0,onClose:g,onMinimize:n,initialBox:e.savedBox,icon:x,title:k,footer:L,copyText:e.label,windowKey:e.id,openedFromKey:e.openedFrom,size:i.size||"2xl",dirty:c,editing:a||m||h,dimensions:i.dimensions,autoHeight:i.autoHeight,autoMinHeight:i.autoMinHeight,autoWidth:i.autoWidth,appStyle:i.appStyle,flushBody:i.flushBody,accentRgb:r,children:/* @__PURE__ */D(fe.Provider,{value:d,children:/* @__PURE__ */D(P,{fallback:/* @__PURE__ */D(se,{}),children:i.selfFetching?i.render(null,t,e.entityId,a,l):/* @__PURE__ */D(ue,{entity:f,isPending:w.isPending,isFetching:w.isFetching,enabled:p,error:w.error,onRetry:y,children:n=>i.render(n,t,e.entityId,a,l)})})})})}function Ee(e){return document.querySelector(`[data-modal-panel][data-window-key="${e}"]`)}function Me(){const e=vn();if(!e)return;const t=document.querySelector(`[data-modal-panel][data-modal-id="${e}"]`);return t?.getAttribute("data-window-key")??void 0}var Le=/* @__PURE__ */new Map;function Ne(){const e=Me();if(e)return Le.get(e)}function Se(e){const t=document.querySelectorAll("[data-modal-panel]");for(const n of Array.from(t)){const t=n.querySelector("[data-window-title]");if(t?.textContent?.includes(e))return n}return null}var Te="rosh-peek-style";function Ae(e){"undefined"!=typeof document&&(!function(){if("undefined"==typeof document||document.getElementById(Te))return;const e=document.createElement("style");e.id=Te,e.textContent="body.rosh-peeking [data-modal-panel]{transition:opacity .18s ease}body.rosh-peeking [data-modal-panel]:not([data-peek-focus]){opacity:.4}body.rosh-peeking [data-modal-panel][data-peek-focus]{opacity:1}body.rosh-peeking [data-modal-panel][data-peek-focus]:not([data-pinned-top]){z-index:249!important}html.rosh-reduce-transparency body.rosh-peeking [data-modal-panel]:not([data-peek-focus]){opacity:.92}@media (prefers-reduced-motion:reduce){body.rosh-peeking [data-modal-panel]{transition:none}}",document.head.appendChild(e)}(),document.querySelectorAll("[data-modal-panel][data-peek-focus]").forEach(e=>e.removeAttribute("data-peek-focus")),e&&e.setAttribute("data-peek-focus",""),document.body.classList.toggle("rosh-peeking",!!e))}function ze(){"undefined"!=typeof document&&(document.body.classList.remove("rosh-peeking"),document.querySelectorAll("[data-modal-panel][data-peek-focus]").forEach(e=>e.removeAttribute("data-peek-focus")))}function Pe({id:e,label:t,maxW:n,maxH:r,titleAbove:o=!1,onClick:i,onClose:a}){const l=y(),s=k(null),[c,d]=E({w:n,h:Math.round(.75*r)}),[u,h]=E(!1);return x(()=>{const o=s.current;if(!o)return;const i=Ee(e)??Se(t);if(!i)return void h(!1);const a=i.getBoundingClientRect();if(0===a.width||0===a.height)return void h(!1);const l=Math.min(n/a.width,r/a.height),c=Math.max(80,Math.round(a.width*l)),u=Math.max(60,Math.round(a.height*l));d({w:c,h:u}),h(!0);const m=i.cloneNode(!0);return m.style.position="absolute",m.style.top="0",m.style.left="0",m.style.right="auto",m.style.bottom="auto",m.style.width=a.width+"px",m.style.height=a.height+"px",m.style.transform=`scale(${l})`,m.style.transformOrigin="top left",m.style.pointerEvents="none",m.style.animation="none",m.style.zIndex="auto",m.removeAttribute("data-modal-panel"),m.removeAttribute("data-modal-id"),m.removeAttribute("data-window-key"),m.querySelectorAll('[role="dialog"], [data-portal]').forEach(e=>{e.style.display="none"}),o.innerHTML="",o.appendChild(m),()=>{o.innerHTML=""}},[e,t,n,r]),/* @__PURE__ */I("div",{style:{width:c.w,height:c.h},className:"relative rounded-md overflow-hidden bg-white/95 border border-gray-300 shadow-md cursor-pointer ring-2 ring-transparent group-hover:ring-blue-400 transition shrink-0",onClick:i,children:[
19
+ return D("button",{onClick:()=>{const r=l?a.filter(n=>!(n.entityType===e&&n.entityId===t)):[...a,{entityType:e,entityId:t,label:n}];J.patch("/auth/me/",{preferences:{favorite_documents:r}}).then(()=>{o.invalidateQueries({queryKey:["my-profile-sidebar"]})})},title:l?r.taskbar.removeFromDesktop:r.taskbar.addToDesktop,className:"shrink-0 transition-colors "+(l?"text-yellow-500 hover:text-yellow-600":"text-gray-300 hover:text-yellow-400"),children:/* @__PURE__ */D("svg",{className:"h-4 w-4",fill:l?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"})})})}function Ce({item:e,onClose:t,onMinimize:n,accentRgb:r}){const o=q[e.entityType];if(!o||!O(o))return null;const i=o,[a,l]=E(!1),{dirty:c,registerDirty:d}=ge(),u=i.queryKey||i.endpoint.replace(/^\/|\/$/g,"").split("/").pop()||e.entityType,h=e.entitySnapshot?._duplicate,m=me(e.entityId),p=!i.selfFetching&&!h&&!m&&X(),w=j({queryKey:[u,e.entityId],queryFn:()=>{return J.get((t=i.endpoint,n=String(e.entityId),`${t}${encodeURIComponent(n)}/`)).then(e=>e.data);var t,n},initialData:ce(e.entitySnapshot),initialDataUpdatedAt:0,enabled:p,staleTime:0,refetchOnWindowFocus:!0,refetchOnMount:"always",refetchInterval:e=>!oe(e.state.error)&&6e4,refetchIntervalInBackground:!1,retry:ie}),f=w.data,y=w.refetch;C(()=>{if(i.selfFetching||h||m)return;const e=()=>{y()};return window.addEventListener("modal-reorder",e),()=>window.removeEventListener("modal-reorder",e)},[y,i.selfFetching,h,m]);const g=M(()=>{a&&!c?l(!1):t()},[a,c,t]),v=i.selfFetching?e.label:f?i.title(f,a,l):e.label,b=i.icon,x=b?s[b]:null,k=v,L=!i.selfFetching&&f&&i.footer&&!h?i.footer(f):void 0;return i.rendersOwnModal?i.selfFetching?/* @__PURE__ */D(P,{fallback:/* @__PURE__ */D(ae,{}),children:i.render(f??e.entitySnapshot,t,e.entityId,a,l)}):null!=f?/* @__PURE__ */D(P,{fallback:/* @__PURE__ */D(Vn,{open:!0,onClose:t,title:e.label,size:i.size||"2xl",children:/* @__PURE__ */D(se,{})}),children:i.render(f,t,e.entityId,a,l)}):/* @__PURE__ */D(Vn,{open:!0,onClose:t,title:e.label,size:i.size||"2xl",children:/* @__PURE__ */D(de,{isPending:w.isPending,isFetching:w.isFetching,enabled:p,error:w.error,onRetry:y})}):/* @__PURE__ */D(Vn,{open:!0,onClose:g,onMinimize:n,initialBox:e.savedBox,icon:x,title:k,footer:L,copyText:e.label,windowKey:e.id,openedFromKey:e.openedFrom,size:i.size||"2xl",dirty:c,editing:a||m||h,dimensions:i.dimensions,autoHeight:i.autoHeight,autoMinHeight:i.autoMinHeight,autoWidth:i.autoWidth,appStyle:i.appStyle,flushBody:i.flushBody,accentRgb:r,children:/* @__PURE__ */D(fe.Provider,{value:d,children:/* @__PURE__ */D(P,{fallback:/* @__PURE__ */D(se,{}),children:i.selfFetching?i.render(null,t,e.entityId,a,l):/* @__PURE__ */D(ue,{entity:f,isPending:w.isPending,isFetching:w.isFetching,enabled:p,error:w.error,onRetry:y,children:n=>i.render(n,t,e.entityId,a,l)})})})})}function Ee(e){return document.querySelector(`[data-modal-panel][data-window-key="${e}"]`)}function Me(){const e=vn();if(!e)return;const t=document.querySelector(`[data-modal-panel][data-modal-id="${e}"]`);return t?.getAttribute("data-window-key")??void 0}var Le=/* @__PURE__ */new Map;function Ne(){const e=Me();if(e)return Le.get(e)}function Se(e){const t=document.querySelectorAll("[data-modal-panel]");for(const n of Array.from(t)){const t=n.querySelector("[data-window-title]");if(t?.textContent?.includes(e))return n}return null}var Te="rosh-peek-style";function Ae(e){"undefined"!=typeof document&&(!function(){if("undefined"==typeof document||document.getElementById(Te))return;const e=document.createElement("style");e.id=Te,e.textContent="body.rosh-peeking [data-modal-panel]{transition:opacity .18s ease}body.rosh-peeking [data-modal-panel]:not([data-peek-focus]){opacity:.4}body.rosh-peeking [data-modal-panel][data-peek-focus]{opacity:1}body.rosh-peeking [data-modal-panel][data-peek-focus]:not([data-pinned-top]){z-index:249!important}html.rosh-reduce-transparency body.rosh-peeking [data-modal-panel]:not([data-peek-focus]){opacity:.92}@media (prefers-reduced-motion:reduce){body.rosh-peeking [data-modal-panel]{transition:none}}",document.head.appendChild(e)}(),document.querySelectorAll("[data-modal-panel][data-peek-focus]").forEach(e=>e.removeAttribute("data-peek-focus")),e&&e.setAttribute("data-peek-focus",""),document.body.classList.toggle("rosh-peeking",!!e))}function ze(){"undefined"!=typeof document&&(document.body.classList.remove("rosh-peeking"),document.querySelectorAll("[data-modal-panel][data-peek-focus]").forEach(e=>e.removeAttribute("data-peek-focus")))}function Pe({id:e,label:t,maxW:n,maxH:r,titleAbove:o=!1,onClick:i,onClose:a}){const l=y(),s=k(null),[c,d]=E({w:n,h:Math.round(.75*r)}),[u,h]=E(!1);return x(()=>{const o=s.current;if(!o)return;const i=Ee(e)??Se(t);if(!i)return void h(!1);const a=i.getBoundingClientRect();if(0===a.width||0===a.height)return void h(!1);const l=Math.min(n/a.width,r/a.height),c=Math.max(80,Math.round(a.width*l)),u=Math.max(60,Math.round(a.height*l));d({w:c,h:u}),h(!0);const m=i.cloneNode(!0);return m.style.position="absolute",m.style.top="0",m.style.left="0",m.style.right="auto",m.style.bottom="auto",m.style.width=a.width+"px",m.style.height=a.height+"px",m.style.transform=`scale(${l})`,m.style.transformOrigin="top left",m.style.pointerEvents="none",m.style.animation="none",m.style.zIndex="auto",m.removeAttribute("data-modal-panel"),m.removeAttribute("data-modal-id"),m.removeAttribute("data-window-key"),m.querySelectorAll('[role="dialog"], [data-portal]').forEach(e=>{e.style.display="none"}),o.innerHTML="",o.appendChild(m),()=>{o.innerHTML=""}},[e,t,n,r]),/* @__PURE__ */I("div",{style:{width:c.w,height:c.h},className:"relative rounded-md overflow-hidden bg-white/95 border border-gray-300 shadow-md cursor-pointer ring-2 ring-transparent group-hover:ring-blue-400 transition shrink-0",onClick:i,children:[
20
20
  /* @__PURE__ */D("div",{ref:s,className:"absolute inset-0 z-0 overflow-hidden"}),!u&&/* @__PURE__ */I("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-gray-400 bg-gray-50",children:[
21
21
  /* @__PURE__ */D("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75A2.25 2.25 0 016 4.5h12a2.25 2.25 0 012.25 2.25v10.5A2.25 2.25 0 0118 19.5H6a2.25 2.25 0 01-2.25-2.25V6.75z M3.75 9h16.5"})}),
22
22
  /* @__PURE__ */D("span",{className:"mt-1 text-[10px] uppercase tracking-wide",children:"Hidden"})]}),!o&&/* @__PURE__ */D("div",{className:"absolute bottom-0 left-0 right-0 z-10 px-2 py-1 text-[10px] font-medium text-white bg-gradient-to-t from-black/80 to-transparent truncate pointer-events-none",children:t}),a&&/* @__PURE__ */D("button",{onClick:e=>{e.stopPropagation(),a()},className:"absolute top-1 right-1 z-20 h-5 w-5 rounded-full bg-gray-900/90 ring-1 ring-white/80 shadow-sm hover:bg-red-500 text-white flex items-center justify-center",title:l.taskbar.closeWindow,children:/* @__PURE__ */D("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]})}function Ie({items:e,anchorEl:t,onActivate:n,onClose:r,onMouseEnter:o,onMouseLeave:i}){const a=y(),l=e.length>1,s=k(null),[c,d]=E({left:-9999,top:-9999,ready:!1}),[u,h]=E(()=>"undefined"!=typeof document&&getComputedStyle(document.documentElement).getPropertyValue("--taskbar-position")?.trim()||"bottom");x(()=>{const e=s.current;if(!e)return;const n=()=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),o=getComputedStyle(document.documentElement).getPropertyValue("--taskbar-position")?.trim()||"bottom";h(o);let i,a=n.left+n.width/2-r.width/2;"top"===o?i=n.bottom+8:"left"===o?(a=n.right+8,i=n.top+n.height/2-r.height/2):"right"===o?(a=n.left-r.width-8,i=n.top+n.height/2-r.height/2):i=n.top-r.height-8,a=Math.max(8,Math.min(a,window.innerWidth-r.width-8)),i=Math.max(8,Math.min(i,window.innerHeight-r.height-8)),d({left:a,top:i,ready:!0})};n();const r=new ResizeObserver(n);return r.observe(e),()=>r.disconnect()},[t,e.length]),C(()=>ze,[]);const m="top"===u,p=(m?"mt-1":"mb-1")+" max-w-[240px] truncate text-[11px] font-medium text-gray-900 bg-white/80 px-2 py-0.5 rounded shadow-sm ring-2 ring-transparent transition group-hover:ring-blue-400";return $(
@@ -40,26 +40,26 @@ return I("button",{onClick:()=>o(r.id),onMouseEnter:t=>{return n=e.items,r=t.cur
40
40
  /* @__PURE__ */D("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75h6.5v6.5h-6.5zM13.75 8.75h6.5v6.5h-6.5z"})}),i.taskbar.restoreAllWindows]}),
41
41
  /* @__PURE__ */D(h,{}),
42
42
  /* @__PURE__ */I(u,{danger:!0,onClick:()=>{N(null),M.items.forEach(e=>t(e.id))},children:[
43
- /* @__PURE__ */D("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),`${i.taskbar.closeAllWindows} (${M.items.length})`]})]}),g&&b&&/* @__PURE__ */D(Ie,{items:g,anchorEl:b,onActivate:e=>{o(e),v(null),x(null)},onClose:e=>{t(e),v(null),x(null)},onMouseEnter:()=>{A.current&&(clearTimeout(A.current),A.current=null)},onMouseLeave:z})]}),a)}var $e=["/login","/forgot-password","/reset-password","/force-change-password"];function Ke({children:e,windowAccentForRoute:t}){const n=R(),r=$e.some(e=>n.pathname.startsWith(e)),[o,i]=E([]),a=k(o);x(()=>{a.current=o},[o]),C(()=>{Le.clear();for(const e of o)e.route&&Le.set(e.id,e.route)},[o]);const l=M(e=>{i(t=>t.filter(t=>t.id!==e))},[]),s=M(e=>{var t;Ee(e)?(t=e,window.dispatchEvent(new CustomEvent(xn,{detail:{windowKey:t}}))):l(e)},[l]),c=e=>{setTimeout(()=>{const t=document.querySelector(`[data-modal-panel][data-window-key="${e}"]`),n=t?.getAttribute("data-modal-id");n&&Ut(n)},50)},d=M((e,t,n,r,o)=>{if(!q[e]||!H(q[e]))return;const a=`${e}:${t}`,l=Me();i(i=>{const s=i.find(n=>n.entityType===e&&String(n.entityId)===String(t));return s?(c(s.id),i):(c(a),[...i,{id:a,type:"modal",label:r||t,route:o||window.location.pathname,entityType:e,entityId:t,entitySnapshot:ce(n),openedFrom:l}])})},[]),u=M(e=>{if(!q[e]||!O(q[e]))return;const t=q[e];if(t.widget){const t=a.current.find(t=>"page"===t.type&&t.route===e);if(t)return void s(t.id)}const n=Me();i(r=>{if(t.multiInstance){const o=`page:${e}:${Math.random().toString(36).slice(2,8)}`;return c(o),[...r,{id:o,type:"page",label:t.label,route:e,openedFrom:n}]}const o=r.find(t=>"page"===t.type&&t.route===e);if(o)return t.widget||c(o.id),r;const i=`page:${e}`;return c(i),[...r,{id:i,type:"page",label:t.label,route:e,openedFrom:n}]})},[s]),h=M(()=>{},[]),m=M(()=>{},[]),p=s,w=s;/* @__PURE__ */
43
+ /* @__PURE__ */D("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),`${i.taskbar.closeAllWindows} (${M.items.length})`]})]}),g&&b&&/* @__PURE__ */D(Ie,{items:g,anchorEl:b,onActivate:e=>{o(e),v(null),x(null)},onClose:e=>{t(e),v(null),x(null)},onMouseEnter:()=>{A.current&&(clearTimeout(A.current),A.current=null)},onMouseLeave:z})]}),a)}var $e=["/login","/forgot-password","/reset-password","/force-change-password"];function Ke({children:e,windowAccentForRoute:t}){const n=R(),r=$e.some(e=>n.pathname.startsWith(e)),[o,i]=E([]),a=k(o);x(()=>{a.current=o},[o]),C(()=>{Le.clear();for(const e of o)e.route&&Le.set(e.id,e.route)},[o]);const l=M(e=>{i(t=>t.filter(t=>t.id!==e))},[]),s=M(e=>{var t;Ee(e)?(t=e,window.dispatchEvent(new CustomEvent(xn,{detail:{windowKey:t}}))):l(e)},[l]),c=e=>{setTimeout(()=>{const t=document.querySelector(`[data-modal-panel][data-window-key="${e}"]`),n=t?.getAttribute("data-modal-id");n&&Ut(n)},50)},d=M((e,t,n,r,o)=>{if(!q[e]||!O(q[e]))return;const a=`${e}:${t}`,l=Me();i(i=>{const s=i.find(n=>n.entityType===e&&String(n.entityId)===String(t));return s?(c(s.id),i):(c(a),[...i,{id:a,type:"modal",label:r||t,route:o||window.location.pathname,entityType:e,entityId:t,entitySnapshot:ce(n),openedFrom:l}])})},[]),u=M(e=>{if(!q[e]||!H(q[e]))return;const t=q[e];if(t.widget){const t=a.current.find(t=>"page"===t.type&&t.route===e);if(t)return void s(t.id)}const n=Me();i(r=>{if(t.multiInstance){const o=`page:${e}:${Math.random().toString(36).slice(2,8)}`;return c(o),[...r,{id:o,type:"page",label:t.label,route:e,openedFrom:n}]}const o=r.find(t=>"page"===t.type&&t.route===e);if(o)return t.widget||c(o.id),r;const i=`page:${e}`;return c(i),[...r,{id:i,type:"page",label:t.label,route:e,openedFrom:n}]})},[s]),h=M(()=>{},[]),m=M(()=>{},[]),p=s,w=s;/* @__PURE__ */
44
44
  return I(we.Provider,{value:{openWindows:o,openEntity:d,openPage:u,closeEntity:p,minimize:h,items:[],openItems:o,restore:m,remove:w,restoreIfMinimized:()=>!1},children:[e,
45
- /* @__PURE__ */D(We,{openWindows:o,onRemove:s,onSplitView:On,onActivate:e=>{document.querySelectorAll("[data-modal-panel]").forEach(t=>{const n=t.querySelector("[data-window-title]");if(n?.textContent?.includes(e)){const e=t.getAttribute("data-modal-id");e&&Ut(e)}})},onActivateById:e=>{const t=document.querySelector(`[data-modal-panel][data-window-key="${e}"]`);if(!t)return;if(!on(t))return n=e,void window.dispatchEvent(new CustomEvent("modal-reveal",{detail:{windowKey:n}}));var n;const r=t.getAttribute("data-modal-id");r&&Ut(r)}}),
46
- /* @__PURE__ */D(Hn,{}),!r&&o.map(e=>{const n=e.route?t?.(e.route):void 0;/* @__PURE__ */
47
- return D(Q,{fallback:(t,n)=>/* @__PURE__ */D(Vn,{open:!0,onClose:()=>l(e.id),title:e.label,size:"md",autoHeight:!0,windowKey:e.id,children:/* @__PURE__ */D(G,{error:t,onReload:n})}),children:/* @__PURE__ */D(rt,{spec:be(e),children:/* @__PURE__ */D(Jn,{windowId:e.id,children:"page"===e.type?/* @__PURE__ */D(xe,{item:e,onClose:()=>l(e.id),accentRgb:n}):/* @__PURE__ */D(Ce,{item:e,onClose:()=>l(e.id),onMinimize:()=>{},accentRgb:n})})})},e.id)})]})}var Re=null,Be=/* @__PURE__ */new Set;function je(){return Re}function Oe(e){if(Re!==e){Re=e;for(const e of Be)e()}}function He(e){return Be.add(e),()=>{Be.delete(e)}}var Ve=!1,Fe={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0},qe=()=>{};function Ye(e){Ve=e,Fe={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0}}function Ue(e,t){Ve&&("submenu"===e?Fe.submenus++:Fe.menus++,Fe.menuKey=t)}function Xe(e){if(!Ve)return qe;const t=performance.now();let n=!1;return()=>{if(n)return;if(n=!0,!Ve)return;const r=performance.now()-t;"move"===e?Fe.moveMs+=r:Fe.resizeMs+=r}}function _e(){const e=Fe;return Fe={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0},e}var Je=280;function Ge(){const e=getComputedStyle(document.documentElement),t=parseInt(e.getPropertyValue("--taskbar-height"))||0,n=parseInt(e.getPropertyValue("--taskbar-width"))||0,r=e.getPropertyValue("--taskbar-position")?.trim()||"bottom",o=parseInt(e.getPropertyValue("--sidebar-width"))||0;return{x:("left"===r?n:0)+o,y:"top"===r?t:0,w:window.innerWidth-("left"===r||"right"===r?n:0)-o,h:window.innerHeight-("top"===r||"bottom"===r?t:0)}}function Qe(e,t,n){const r=n?t.w+280:t.w-280,o=Math.abs(e.w-t.w)<=4||Math.abs(e.w-r)<=4;return Math.abs(e.h-t.h)<=4&&o}function Ze({over:e,residual:t},n){return t<=1||e-t>=n-2}function et(){return"undefined"!=typeof document&&"sidebar"===getComputedStyle(document.documentElement).getPropertyValue("--layout-mode")?.trim()}var tt=g(""),nt=g(null);function rt({spec:e,children:t}){/* @__PURE__ */
45
+ /* @__PURE__ */D(We,{openWindows:o,onRemove:s,onSplitView:Hn,onActivate:e=>{document.querySelectorAll("[data-modal-panel]").forEach(t=>{const n=t.querySelector("[data-window-title]");if(n?.textContent?.includes(e)){const e=t.getAttribute("data-modal-id");e&&Ut(e)}})},onActivateById:e=>{const t=document.querySelector(`[data-modal-panel][data-window-key="${e}"]`);if(!t)return;if(!on(t))return n=e,void window.dispatchEvent(new CustomEvent("modal-reveal",{detail:{windowKey:n}}));var n;const r=t.getAttribute("data-modal-id");r&&Ut(r)}}),
46
+ /* @__PURE__ */D(On,{}),!r&&o.map(e=>{const n=e.route?t?.(e.route):void 0;/* @__PURE__ */
47
+ return D(Q,{fallback:(t,n)=>/* @__PURE__ */D(Vn,{open:!0,onClose:()=>l(e.id),title:e.label,size:"md",autoHeight:!0,windowKey:e.id,children:/* @__PURE__ */D(G,{error:t,onReload:n})}),children:/* @__PURE__ */D(rt,{spec:be(e),children:/* @__PURE__ */D(Jn,{windowId:e.id,children:"page"===e.type?/* @__PURE__ */D(xe,{item:e,onClose:()=>l(e.id),accentRgb:n}):/* @__PURE__ */D(Ce,{item:e,onClose:()=>l(e.id),onMinimize:()=>{},accentRgb:n})})})},e.id)})]})}var Re=null,Be=/* @__PURE__ */new Set;function je(){return Re}function He(e){if(Re!==e){Re=e;for(const e of Be)e()}}function Oe(e){return Be.add(e),()=>{Be.delete(e)}}var Ve=!1,Fe={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0},qe=()=>{};function Ye(e){Ve=e,Fe={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0}}function Ue(e,t){Ve&&("submenu"===e?Fe.submenus++:Fe.menus++,Fe.menuKey=t)}function Xe(e){if(!Ve)return qe;const t=performance.now();let n=!1;return()=>{if(n)return;if(n=!0,!Ve)return;const r=performance.now()-t;"move"===e?Fe.moveMs+=r:Fe.resizeMs+=r}}function _e(){const e=Fe;return Fe={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0},e}var Je=280;function Ge(){const e=getComputedStyle(document.documentElement),t=parseInt(e.getPropertyValue("--taskbar-height"))||0,n=parseInt(e.getPropertyValue("--taskbar-width"))||0,r=e.getPropertyValue("--taskbar-position")?.trim()||"bottom",o=parseInt(e.getPropertyValue("--sidebar-width"))||0;return{x:("left"===r?n:0)+o,y:"top"===r?t:0,w:window.innerWidth-("left"===r||"right"===r?n:0)-o,h:window.innerHeight-("top"===r||"bottom"===r?t:0)}}function Qe(e,t,n){const r=n?t.w+280:t.w-280,o=Math.abs(e.w-t.w)<=4||Math.abs(e.w-r)<=4;return Math.abs(e.h-t.h)<=4&&o}function Ze({over:e,residual:t},n){return t<=1||e-t>=n-2}function et(){return"undefined"!=typeof document&&"sidebar"===getComputedStyle(document.documentElement).getPropertyValue("--layout-mode")?.trim()}var tt=g(""),nt=g(null);function rt({spec:e,children:t}){/* @__PURE__ */
48
48
  return D(nt.Provider,{value:e,children:t})}var ot=/* @__PURE__ */new Set(["button","input","textarea","select","kbd","svg"]),it='button[type="submit"], button[data-submit], button.btn-submit, button.bg-green-600, button.bg-blue-600';function at(e){if(null==e||"boolean"==typeof e)return"";if("string"==typeof e)return e;if("number"==typeof e)return String(e);if(Array.isArray(e))return e.map(at).join("");if(S(e)){const t=e,n="string"==typeof t.type?t.type:"";return ot.has(n)?"":at(t.props?.children)}return""}function lt(e){const t=b(tt);C(()=>{if(!t)return;const n=n=>{n.detail===t&&e()};return window.addEventListener("widget-open-settings",n),()=>window.removeEventListener("widget-open-settings",n)},[e,t])}var st={};function ct(e,t,n){const r=b(tt);C(()=>{if(!r)return;st[r]||(st[r]=[]);const o={label:e,icon:n,onClick:t};return st[r].push(o),()=>{st[r]=(st[r]||[]).filter(e=>e!==o)}},[r,e,t,n])}function dt({title:e}){const t=k(null);return C(()=>{const n=setTimeout(()=>{const n=t.current?.closest("[data-modal-id]"),r=n?.getAttribute("data-modal-id");r&&window.dispatchEvent(new CustomEvent("window-title-update",{detail:{id:r,title:e}}))},0);return()=>clearTimeout(n)},[e]),/* @__PURE__ */D("span",{ref:t,style:{display:"none"},"aria-hidden":"true"})}function ut(e){}function ht({text:e}){const[t,n]=E(!1);/* @__PURE__ */
49
49
  return D("button",{onClick:t=>{t.stopPropagation(),navigator.clipboard.writeText(e).then(()=>{n(!0),setTimeout(()=>n(!1),1500)})},title:t?"Copied!":`Copy ${e}`,className:"shrink-0 text-gray-400 hover:text-gray-600 transition-colors",children:/* @__PURE__ */D("svg",t?{className:"w-4 h-4 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}:{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})})}var mt=g(null);function pt(){return b(tt)}function wt(){const e=L(bn,vn),t=b(mt);return t?.active??(Dt.length<=1||null!=e)}function ft({children:e,position:t="right",quiet:n=!1}){const r=b(mt),[o,i]=E(null);return C(()=>{if(!r)return;const e="left"===t?r.leftRef:r.rightRef,o=()=>!!e.current&&(i(e.current),n||r.notify(),!0);if(o())return;const a=setInterval(()=>{o()&&clearInterval(a)},50),l=setTimeout(()=>clearInterval(a),2e3);return()=>{clearInterval(a),clearTimeout(l)}},[r,t,n]),o?$(e,o):null}function yt({onClick:e,children:t,className:n}){const r=b(mt);/* @__PURE__ */
50
- return D("button",{type:"button",onClick:async()=>{if(r?.isDirty){const{confirm:e}=await(import("./ConfirmDialog-GAYETRMG.js"));if(!await e({title:"Discard changes?",message:"You have unsaved changes. Are you sure you want to cancel? All changes will be lost.",confirmLabel:"Discard",cancelLabel:"Keep Editing",variant:"warning"}))return}e()},className:n||"bg-white text-gray-700 border border-gray-300 px-4 py-2 text-sm font-medium rounded-lg hover:bg-gray-50",children:t||"Cancel"})}var gt="erp_window_positions",vt={};try{const e=localStorage.getItem(gt);e&&(vt=JSON.parse(e))}catch{}var bt=null;function xt(){bt&&clearTimeout(bt),bt=setTimeout(()=>{try{localStorage.setItem(gt,JSON.stringify(vt))}catch{}},500)}var kt="erp_activation_order",Ct=[];try{const e=localStorage.getItem(kt),t=e?JSON.parse(e):null;Array.isArray(t)&&t.every(e=>"string"==typeof e)&&(Ct=t)}catch{}var Et=null;function Mt(){Et&&clearTimeout(Et),Et=setTimeout(()=>{try{localStorage.setItem(kt,JSON.stringify(Ct))}catch{}},500)}function Lt(e,t){vt[e]||(vt[e]=t,xt())}function Nt(e){return vt[e]?{...vt[e]}:null}function St(e,t){vt[e]=t,xt()}function Tt(){const e=Ge(),t=(parseInt(getComputedStyle(document.documentElement).getPropertyValue("--sidebar-width"))||0)>0;let n=!1;for(const r of Object.keys(vt))Qe(vt[r],e,t)&&(delete vt[r],n=!0);n&&xt()}var At={sm:384,md:512,lg:672,xl:896,"2xl":1152,"3xl":1408},zt=4e3,Pt=()=>{if("undefined"==typeof document)return"large";const e=getComputedStyle(document.documentElement).getPropertyValue("--default-window-size")?.trim();return"small"===e||"medium"===e||"maximized"===e?e:"large"},It={small:.8,medium:1,large:1.25,maximized:1.25},Dt=[],Wt=/* @__PURE__ */new Set,$t=/* @__PURE__ */new Set,Kt=0;function Rt(){return Kt}function Bt(){Kt++,Wt.forEach(e=>e())}var jt=/* @__PURE__ */new Map,Ot=/* @__PURE__ */new Map;var Ht=null;function Vt(e){Ht=null,Ut(e)}function Ft(e){Ht=e;const t=jt.get(e);t&&Vt(t)}function qt(e){Ht===e&&(Ht=null)}function Yt(e,t){t?(jt.set(t,e),Ot.set(e,t),function(e,t){const n=Ct.indexOf(t);if(-1===n)return void Dt.push(e);let r=Dt.length;for(let e=0;e<Dt.length;e++){const t=Ot.get(Dt[e]);if(t&&Ct.indexOf(t)>n){r=e;break}}Dt.splice(r,0,e)}(e,t),-1===Ct.indexOf(t)&&(Ct.push(t),Mt())):Dt.push(e),Bt(),window.dispatchEvent(new CustomEvent("modal-reorder")),t&&Ht===t&&Vt(e)}function Ut(e){const t=Dt.indexOf(e);-1!==t&&Dt.splice(t,1),Dt.push(e),$t.delete(e);const n=Ot.get(e);if(n){const e=Ct.indexOf(n);-1!==e&&Ct.splice(e,1),Ct.push(n),Mt(),Ht&&Ht!==n&&(Ht=null)}Bt(),window.dispatchEvent(new CustomEvent("modal-reorder"))}function Xt(e){const t=Dt.indexOf(e);-1!==t&&Dt.splice(t,1),$t.add(e);const n=Ot.get(e);if(n){const e=Ct.indexOf(n);-1!==e&&(Ct.splice(e,1),Mt())}Bt(),window.dispatchEvent(new CustomEvent("modal-reorder"))}var _t=/* @__PURE__ */new Set;var Jt=8,Gt=32;function Qt(){const e=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-height"))||0,t=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-width"))||0,n=getComputedStyle(document.documentElement).getPropertyValue("--taskbar-position")?.trim()||"bottom";return{x:"left"===n?t:0,y:"top"===n?e:0,w:window.innerWidth-("left"===n||"right"===n?t:0),h:window.innerHeight-("top"===n||"bottom"===n?e:0)}}var Zt=40,en=80,tn=384,nn=400;function rn(e,t=Qt()){const n=Math.min(Math.max(e.x,t.x+en-e.w),t.x+t.w-en),r=Math.min(Math.max(e.y,t.y),t.y+t.h-Zt);return n===e.x&&r===e.y?e:{...e,x:n,y:r}}function on(e){const t=e.getBoundingClientRect();if(0===t.width||0===t.height)return!0;const n=Qt();return t.left>=n.x-1&&t.top>=n.y-1&&t.right<=n.x+n.w+1&&t.bottom<=n.y+n.h+1}function an(e){const t=Qt(),n=Math.floor(t.w/2),r=Math.floor(t.h/2);switch(e){case"top":return{x:t.x,y:t.y,w:t.w,h:t.h};case"left":return{x:t.x,y:t.y,w:n,h:t.h};case"right":return{x:t.x+n,y:t.y,w:t.w-n,h:t.h};case"tl":return{x:t.x,y:t.y,w:n,h:r};case"tr":return{x:t.x+n,y:t.y,w:t.w-n,h:r};case"bl":return{x:t.x,y:t.y+r,w:n,h:t.h-r};case"br":return{x:t.x+n,y:t.y+r,w:t.w-n,h:t.h-r}}}var ln=null;function sn(e){const t=(ln||((ln=document.createElement("div")).style.cssText=["position: fixed","pointer-events: none","z-index: 40","border-radius: 8px","background: rgba(59, 130, 246, 0.18)","border: 2px solid rgb(59, 130, 246)","transition: left 120ms ease, top 120ms ease, width 120ms ease, height 120ms ease, opacity 120ms ease","opacity: 0","display: none"].join(";"),document.body.appendChild(ln)),ln);t.style.display="block",t.style.left=`${e.x}px`,t.style.top=`${e.y}px`,t.style.width=`${e.w}px`,t.style.height=`${e.h}px`,t.style.opacity="1"}function cn(){ln&&(ln.style.opacity="0",ln.style.display="none")}var dn=[{zone:"left",labelKey:"snapLeft",region:"inset-y-0 left-0 w-1/2"},{zone:"right",labelKey:"snapRight",region:"inset-y-0 right-0 w-1/2"},{zone:"tl",labelKey:"snapTopLeft",region:"top-0 left-0 h-1/2 w-1/2"},{zone:"tr",labelKey:"snapTopRight",region:"top-0 right-0 h-1/2 w-1/2"},{zone:"bl",labelKey:"snapBottomLeft",region:"bottom-0 left-0 h-1/2 w-1/2"},{zone:"br",labelKey:"snapBottomRight",region:"bottom-0 right-0 h-1/2 w-1/2"}],un=350,hn=200;function mn({maximized:e,onToggleMax:t,onSnap:n,buttonClassName:r,strings:o}){const[i,a]=E(!1),l=k(void 0),s=k(void 0);C(()=>()=>{clearTimeout(l.current),clearTimeout(s.current)},[]);const c=()=>{clearTimeout(s.current),l.current=setTimeout(()=>a(!0),un)},d=()=>{clearTimeout(l.current),s.current=setTimeout(()=>a(!1),hn)};/* @__PURE__ */
50
+ return D("button",{type:"button",onClick:async()=>{if(r?.isDirty){const{confirm:e}=await(import("./ConfirmDialog-KJNNVFK7.js"));if(!await e({title:"Discard changes?",message:"You have unsaved changes. Are you sure you want to cancel? All changes will be lost.",confirmLabel:"Discard",cancelLabel:"Keep Editing",variant:"warning"}))return}e()},className:n||"bg-white text-gray-700 border border-gray-300 px-4 py-2 text-sm font-medium rounded-lg hover:bg-gray-50",children:t||"Cancel"})}var gt="erp_window_positions",vt={};try{const e=localStorage.getItem(gt);e&&(vt=JSON.parse(e))}catch{}var bt=null;function xt(){bt&&clearTimeout(bt),bt=setTimeout(()=>{try{localStorage.setItem(gt,JSON.stringify(vt))}catch{}},500)}var kt="erp_activation_order",Ct=[];try{const e=localStorage.getItem(kt),t=e?JSON.parse(e):null;Array.isArray(t)&&t.every(e=>"string"==typeof e)&&(Ct=t)}catch{}var Et=null;function Mt(){Et&&clearTimeout(Et),Et=setTimeout(()=>{try{localStorage.setItem(kt,JSON.stringify(Ct))}catch{}},500)}function Lt(e,t){vt[e]||(vt[e]=t,xt())}function Nt(e){return vt[e]?{...vt[e]}:null}function St(e,t){vt[e]=t,xt()}function Tt(){const e=Ge(),t=(parseInt(getComputedStyle(document.documentElement).getPropertyValue("--sidebar-width"))||0)>0;let n=!1;for(const r of Object.keys(vt))Qe(vt[r],e,t)&&(delete vt[r],n=!0);n&&xt()}var At={sm:384,md:512,lg:672,xl:896,"2xl":1152,"3xl":1408},zt=4e3,Pt=()=>{if("undefined"==typeof document)return"large";const e=getComputedStyle(document.documentElement).getPropertyValue("--default-window-size")?.trim();return"small"===e||"medium"===e||"maximized"===e?e:"large"},It={small:.8,medium:1,large:1.25,maximized:1.25},Dt=[],Wt=/* @__PURE__ */new Set,$t=/* @__PURE__ */new Set,Kt=0;function Rt(){return Kt}function Bt(){Kt++,Wt.forEach(e=>e())}var jt=/* @__PURE__ */new Map,Ht=/* @__PURE__ */new Map;var Ot=null;function Vt(e){Ot=null,Ut(e)}function Ft(e){Ot=e;const t=jt.get(e);t&&Vt(t)}function qt(e){Ot===e&&(Ot=null)}function Yt(e,t){t?(jt.set(t,e),Ht.set(e,t),function(e,t){const n=Ct.indexOf(t);if(-1===n)return void Dt.push(e);let r=Dt.length;for(let e=0;e<Dt.length;e++){const t=Ht.get(Dt[e]);if(t&&Ct.indexOf(t)>n){r=e;break}}Dt.splice(r,0,e)}(e,t),-1===Ct.indexOf(t)&&(Ct.push(t),Mt())):Dt.push(e),Bt(),window.dispatchEvent(new CustomEvent("modal-reorder")),t&&Ot===t&&Vt(e)}function Ut(e){const t=Dt.indexOf(e);-1!==t&&Dt.splice(t,1),Dt.push(e),$t.delete(e);const n=Ht.get(e);if(n){const e=Ct.indexOf(n);-1!==e&&Ct.splice(e,1),Ct.push(n),Mt(),Ot&&Ot!==n&&(Ot=null)}Bt(),window.dispatchEvent(new CustomEvent("modal-reorder"))}function Xt(e){const t=Dt.indexOf(e);-1!==t&&Dt.splice(t,1),$t.add(e);const n=Ht.get(e);if(n){const e=Ct.indexOf(n);-1!==e&&(Ct.splice(e,1),Mt())}Bt(),window.dispatchEvent(new CustomEvent("modal-reorder"))}var _t=/* @__PURE__ */new Set;var Jt=8,Gt=32;function Qt(){const e=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-height"))||0,t=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-width"))||0,n=getComputedStyle(document.documentElement).getPropertyValue("--taskbar-position")?.trim()||"bottom";return{x:"left"===n?t:0,y:"top"===n?e:0,w:window.innerWidth-("left"===n||"right"===n?t:0),h:window.innerHeight-("top"===n||"bottom"===n?e:0)}}var Zt=40,en=80,tn=384,nn=400;function rn(e,t=Qt()){const n=Math.min(Math.max(e.x,t.x+en-e.w),t.x+t.w-en),r=Math.min(Math.max(e.y,t.y),t.y+t.h-Zt);return n===e.x&&r===e.y?e:{...e,x:n,y:r}}function on(e){const t=e.getBoundingClientRect();if(0===t.width||0===t.height)return!0;const n=Qt();return t.left>=n.x-1&&t.top>=n.y-1&&t.right<=n.x+n.w+1&&t.bottom<=n.y+n.h+1}function an(e){const t=Qt(),n=Math.floor(t.w/2),r=Math.floor(t.h/2);switch(e){case"top":return{x:t.x,y:t.y,w:t.w,h:t.h};case"left":return{x:t.x,y:t.y,w:n,h:t.h};case"right":return{x:t.x+n,y:t.y,w:t.w-n,h:t.h};case"tl":return{x:t.x,y:t.y,w:n,h:r};case"tr":return{x:t.x+n,y:t.y,w:t.w-n,h:r};case"bl":return{x:t.x,y:t.y+r,w:n,h:t.h-r};case"br":return{x:t.x+n,y:t.y+r,w:t.w-n,h:t.h-r}}}var ln=null;function sn(e){const t=(ln||((ln=document.createElement("div")).style.cssText=["position: fixed","pointer-events: none","z-index: 40","border-radius: 8px","background: rgba(59, 130, 246, 0.18)","border: 2px solid rgb(59, 130, 246)","transition: left 120ms ease, top 120ms ease, width 120ms ease, height 120ms ease, opacity 120ms ease","opacity: 0","display: none"].join(";"),document.body.appendChild(ln)),ln);t.style.display="block",t.style.left=`${e.x}px`,t.style.top=`${e.y}px`,t.style.width=`${e.w}px`,t.style.height=`${e.h}px`,t.style.opacity="1"}function cn(){ln&&(ln.style.opacity="0",ln.style.display="none")}var dn=[{zone:"left",labelKey:"snapLeft",region:"inset-y-0 left-0 w-1/2"},{zone:"right",labelKey:"snapRight",region:"inset-y-0 right-0 w-1/2"},{zone:"tl",labelKey:"snapTopLeft",region:"top-0 left-0 h-1/2 w-1/2"},{zone:"tr",labelKey:"snapTopRight",region:"top-0 right-0 h-1/2 w-1/2"},{zone:"bl",labelKey:"snapBottomLeft",region:"bottom-0 left-0 h-1/2 w-1/2"},{zone:"br",labelKey:"snapBottomRight",region:"bottom-0 right-0 h-1/2 w-1/2"}],un=350,hn=200;function mn({maximized:e,onToggleMax:t,onSnap:n,buttonClassName:r,strings:o}){const[i,a]=E(!1),l=k(void 0),s=k(void 0);C(()=>()=>{clearTimeout(l.current),clearTimeout(s.current)},[]);const c=()=>{clearTimeout(s.current),l.current=setTimeout(()=>a(!0),un)},d=()=>{clearTimeout(l.current),s.current=setTimeout(()=>a(!1),hn)};/* @__PURE__ */
51
51
  return I("span",{className:"relative inline-flex",onMouseEnter:c,onMouseLeave:d,children:[
52
- /* @__PURE__ */D("button",{onClick:t,onFocus:c,onBlur:d,title:e?o.windowed:o.maximize,className:r,children:e?"❐":"⤢"}),i&&/* @__PURE__ */D("div",{role:"group","aria-label":o.snapLayouts,onMouseEnter:()=>clearTimeout(s.current),onMouseLeave:d,className:"absolute right-0 top-full z-30 mt-1 grid w-max grid-cols-2 gap-1 rounded-lg border border-gray-200 bg-white p-1.5 shadow-lg",children:dn.map(({zone:e,labelKey:t,region:r})=>/* @__PURE__ */D("button",{type:"button","aria-label":o[t],title:o[t],onClick:()=>{a(!1),n(e)},onFocus:()=>clearTimeout(s.current),onBlur:d,className:"relative h-7 w-11 rounded border border-gray-300 bg-gray-50 hover:border-blue-400 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-400",children:/* @__PURE__ */D("span",{"aria-hidden":"true",className:`absolute rounded-sm bg-blue-500/70 ${r}`,style:{margin:2}})},e))})]})}var pn="rosh-gesture-style";var wn={se:"nwse-resize",nw:"nwse-resize",sw:"nesw-resize",ne:"nesw-resize",n:"ns-resize",s:"ns-resize",e:"ew-resize",w:"ew-resize"},fn=4;function yn(e,t,n,r){!function(){if("undefined"==typeof document||document.getElementById(pn))return;const e=document.createElement("style");e.id=pn,e.textContent="body.rosh-gesturing [data-modal-panel]{will-change:transform}",document.head.appendChild(e)}();try{e.setPointerCapture(t)}catch{}document.body.classList.add("rosh-gesturing");const o=document.createElement("div");o.setAttribute("data-drag-shield",""),o.style.cssText=`position:fixed;inset:0;z-index:2147483647;cursor:${n};background:transparent;touch-action:none`,document.body.appendChild(o);const i=Xe(r);let a=!1;return()=>{if(!a){a=!0,i();try{e.releasePointerCapture(t)}catch{}o.remove(),document.body.classList.remove("rosh-gesturing")}}}function gn(e){const t=Dt.indexOf(e);return-1===t?-1:p.window+t*p.windowStep}function vn(){return Dt[Dt.length-1]||null}function bn(e){return Wt.add(e),()=>{Wt.delete(e)}}"undefined"!=typeof window&&window.addEventListener("deactivate-all-modals",function(){for(let e=Dt.length-1;e>=0;e--)_t.has(Dt[e])||Dt.splice(e,1);Ct=Ct.filter(e=>{const t=jt.get(e);return null!=t&&_t.has(t)}),Mt(),Bt(),window.dispatchEvent(new CustomEvent("modal-reorder"))});var xn="modal-close-request";function kn(e){L(bn,Rt);const t=b(mt);if(Dt.length<=1)return!0;if(e){const t=jt.get(e);if(null!=t)return vn()===t}return t?.active??null!=vn()}var Cn=!1,En=/* @__PURE__ */new Set;function Mn(e){return En.add(e),()=>En.delete(e)}function Ln(){return Cn}function Nn(e){Cn!==e&&(Cn=e,En.forEach(e=>e()))}function Sn(){Nn(!Cn)}function Tn(){Nn(!1)}var An=null,zn=/* @__PURE__ */new Set;function Pn(e){return zn.add(e),()=>zn.delete(e)}function In(){return An}function Dn(e){An!==e&&(An=e,zn.forEach(e=>e()))}var Wn=null,$n=/* @__PURE__ */new Set;function Kn(e){return $n.add(e),()=>$n.delete(e)}function Rn(){return Wn}function Bn(e){Wn!==e&&(Wn=e,$n.forEach(e=>e()))}function jn(){if(!Wn)return void Nn(!1);Dn(Wn),Bn(null),Nn(!1)}function On(){Nn(!Cn),window.dispatchEvent(new CustomEvent("modal-split-view"))}function Hn(){const e=L(Mn,Ln),[t,n]=E(e),[r,o]=E(e);return C(()=>{if(e){n(!0);const e=requestAnimationFrame(()=>o(!0));return()=>cancelAnimationFrame(e)}o(!1);const t=setTimeout(()=>n(!1),280);return()=>clearTimeout(t)},[e]),t&&"undefined"!=typeof document?$(
53
- /* @__PURE__ */D("div",{onMouseDown:e=>{e.stopPropagation(),Nn(!1)},style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.55)",backdropFilter:"blur(2px)",WebkitBackdropFilter:"blur(2px)",zIndex:2e3,cursor:"pointer",opacity:r?1:0,transition:"opacity 260ms cubic-bezier(0.2, 0.8, 0.2, 1)",pointerEvents:r?"auto":"none"}}),document.body):null}function Vn({open:e,onClose:t,title:n,icon:r,copyText:o,size:l="lg",dirty:s=!1,onNext:c,onPrev:m,footer:g,bodyScroll:v,onMinimize:A,initialBox:z,actions:P,actionsLeft:R,editing:B=!1,allowPinOnTop:j,initialPosition:O,widget:H,compact:V,appStyle:F,flushBody:q,autoHeight:Y,autoMinHeight:U,autoWidth:X,widgetMenu:_,dimensions:J,windowKey:G,openedFromKey:ee,accentRgb:ne,children:re}){const oe=i(),[ie,ae]=E(0),[le,se]=E(!1),ce=k(null),de=k(0);C(()=>{de.current=ie},[ie]);const ue=M(e=>{oe&&(ce.current={startX:e.clientX,startY:e.clientY,pointerId:e.pointerId},se(!0),Oe(ee??null))},[oe,ee]),he=L(He,je);C(()=>{if(!le)return;const e=e=>{if(!ce.current)return;const t=e.clientX-ce.current.startX;if(Math.abs(e.clientY-ce.current.startY)>Math.abs(t)+12)return ce.current=null,se(!1),ae(0),void Oe(null);ae(Math.max(0,t))},n=()=>{if(!ce.current)return;const e=.3*window.innerWidth,n=de.current>e;ce.current=null,se(!1),n?(ae(window.innerWidth),setTimeout(()=>{t(),ae(0),Oe(null)},180)):(ae(0),Oe(null))};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",n),window.addEventListener("pointercancel",n),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",n),window.removeEventListener("pointercancel",n)}},[le]);const[me,pe]=E(n),we=y(),fe=we.window;C(()=>{pe(n)},[n]);const ge=N(()=>at(me).trim()||void 0,[me]),[be,xe]=E(!1),ke=k(!1),[Ce,Ee]=E(!1),[Me,Le]=E(null),Ne=b(nt),{prefs:Se,save:Te}=a(),Ae=!!Se.window_accent_stripe,ze=Se.favorite_documents||[],Pe=!!Ne&&ze.some(e=>e.entityType===Ne.entityType&&e.entityId===Ne.entityId),Ie=M(()=>{if(!Ne)return;const e=Pe?ze.filter(e=>!(e.entityType===Ne.entityType&&e.entityId===Ne.entityId)):[...ze,{entityType:Ne.entityType,entityId:Ne.entityId,label:Ne.label}];Te({favorite_documents:e})},[Ne,Pe,ze,Te]),[De,We]=E(null),[$e,Ke]=E("top-right"===O?"right":"left"),Re=k(!1),Be=k(null);x(()=>{const e=Be.current;e&&(ne?e.style.setProperty("--window-accent-rgb",ne):e.style.removeProperty("--window-accent-rgb"))},[ne]);const Ve=k(!1),Fe=k(null),qe=k(null),Ye=k(null),[Ue,Xe]=E(!1),_e=k(null),Je=!!(g||P||R)||Ue,Qe=b(Z),rt=""!==b(tt),ot=!!Qe&&!rt&&Qe.enabled&&Qe.hasState&&(B||Qe.declaredEditable)&&!Qe.handMounted&&Je&&!H&&!V&&!F&&!oe,lt=/* @__PURE__ */D("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75A2.25 2.25 0 016 4.5h12a2.25 2.25 0 012.25 2.25v10.5A2.25 2.25 0 0118 19.5H6a2.25 2.25 0 01-2.25-2.25V6.75z M3.75 9h16.5"})}),ct=r&&S(r)?T(r,{className:`h-4 w-4 ${r.props?.className??""}`.trim()}):r??lt,dt=()=>/* @__PURE__ */D("button",{onPointerDown:e=>e.stopPropagation(),onClick:e=>{e.stopPropagation();const t=e.currentTarget.getBoundingClientRect();Le(e=>e?null:{x:t.left,y:t.bottom+4})},className:"shrink-0 p-0.5 rounded hover:bg-gray-200/50 transition-colors",title:"Window menu",children:ct}),ut=40,{minimize:ht,items:pt,restoreIfMinimized:wt,openWindows:ft}=ve(),yt=k(`modal-${Math.random().toString(36).slice(2,8)}`).current;C(()=>{if(H)return _t.add(yt),()=>{_t.delete(yt)}},[H,yt]),C(()=>{const e=e=>{const t=e.detail;t?.id===yt&&pe(t.title)};return window.addEventListener("window-title-update",e),()=>window.removeEventListener("window-title-update",e)},[yt]);const[gt,bt]=E(p.window),kt=function(e){const t=L(bn,vn);return Dt.length<=1||t===e}(yt),Ct=function(e){return L(bn,()=>$t.has(e))}(yt),Et=L(Mn,Ln),Mt=L(Pn,In),Lt=L(Kn,Rn),Nt=!j&&!H,St=Et&&Nt,[Tt,Wt]=E(!1),Kt=St&&Lt===yt,[Rt,Ht]=E(!1),Vt=Rt&&Nt&&Mt===yt?"picked":null,Ft=k(St);C(()=>{if(Ft.current&&!St){Ht(!0);const e=setTimeout(()=>{Ht(!1),An===yt&&Dn(null)},700);return Ft.current=St,()=>clearTimeout(e)}Ft.current=St},[St,yt]),C(()=>{St||Wt(!1)},[St]),C(()=>{const e=qe.current,t=Ye.current;if(!e&&!t)return;const n=e=>e?Array.from(e.children).filter(e=>"shell"!==e.dataset.undoControls).length:0,r=()=>Xe(n(e)+n(t)>0);r();const o=new MutationObserver(r);return e&&o.observe(e,{childList:!0}),t&&o.observe(t,{childList:!0}),()=>o.disconnect()},[e]),C(()=>{const e=e=>{if(e.target.closest('button[type="submit"]')&&Be.current){const t=Be.current.querySelector("form");t&&(e.preventDefault(),t.requestSubmit())}},t=qe.current,n=Ye.current;return t&&t.addEventListener("click",e),n&&n.addEventListener("click",e),()=>{t&&t.removeEventListener("click",e),n&&n.removeEventListener("click",e)}},[e]);const qt=k(!1),Zt=M(Ge,[]),en=M(()=>{const e=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-height"))||0,t=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-width"))||0,n=getComputedStyle(document.documentElement).getPropertyValue("--taskbar-position")?.trim()||"bottom",r="left"===n?t:0,o="right"===n?t:0,i=J?J[0]:At[l]||672,a=window.innerWidth-0-r-o-80,s=window.innerHeight-e-80,c=Math.min(i,a),d=It[Pt()],u=J?Math.min(J[1],s):(()=>{const t=("sm"===l?500:"md"===l?600:"lg"===l?700:"xl"===l?800:920)*d;return Math.max(320,Math.min(t,window.innerHeight-e-80))})(),h="cascade"===(getComputedStyle(document.documentElement).getPropertyValue("--window-position")?.trim()||"cascade")?30*(Dt.length-1):0,m=a-c,p=s-u;return"top-right"===O?{x:window.innerWidth-c-ut,y:ut,w:c,h:u}:"top-left"===O?{x:40,y:ut,w:c,h:u}:{x:0+Math.max(ut,(a-c)/2+ut)+Math.min(h,Math.max(0,m)),y:Math.max(ut,(s-u)/2)+Math.min(h,Math.max(0,p)),w:c,h:u}},[l]),on=k(!1);e||(on.current=!1);const ln=G||o||null;C(()=>{if(!e)return;Yt(yt,ln),G||Ut(yt),qt.current=!1,bt(gn(yt));const t=()=>{bt(gn(yt))},n=()=>{},r=e=>{if(!e)return!1;if(e.windowKey)return e.windowKey===G;if(!e.label)return!1;const t=Be.current?.querySelector("[data-window-title]");return!!t?.textContent?.includes(e.label)},o=e=>{if(!r(e.detail))return;Ut(yt);const t=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-height"))||0,n=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-width"))||0,o=getComputedStyle(document.documentElement).getPropertyValue("--taskbar-position")?.trim()||"bottom",i="left"===o?n:0,a="right"===o?n:0,l=window.innerWidth-i-a,s=window.innerHeight-t,c=Math.min(Wn.current.w,l-40),d=Math.min(Wn.current.h,s-40);hn({x:i+(l-c)/2,y:("top"===o?t:0)+(s-d)/2,w:c,h:d}),zn(!1)},i=e=>{const t=e.detail;r(t)&&(Ut(yt),Le({x:t.x,y:t.y}))},a=e=>{if(e.detail?.windowKey!==G)return;Ut(yt);const t=Wn.current,n=function(e,t=Qt()){const n=Math.min(e.w,t.w),r=Math.min(e.h,t.h);return{w:n,h:r,x:Math.min(Math.max(e.x,t.x),t.x+t.w-n),y:Math.min(Math.max(e.y,t.y),t.y+t.h-r)}}(t);if(n.x===t.x&&n.y===t.y&&n.w===t.w&&n.h===t.h)return;const r=Be.current,o="function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;if(r&&!o){let e=!1;const t=()=>{e||(e=!0,r.style.transition="",window.dispatchEvent(new CustomEvent("modal-geometry")))};r.style.transition="left .28s ease, top .28s ease, width .28s ease, height .28s ease",r.addEventListener("transitionend",t,{once:!0}),window.setTimeout(t,400)}hn(n)};return window.addEventListener("modal-reorder",t),window.addEventListener("modal-split-view",n),window.addEventListener("modal-center",o),window.addEventListener("modal-reveal",a),window.addEventListener("modal-context-menu",i),()=>{!function(e){const t=Dt.indexOf(e);-1!==t&&(Dt.splice(t,1),Bt()),$t.delete(e);const n=Ot.get(e);n&&(Ot.delete(e),jt.delete(n))}(yt),window.removeEventListener("modal-reorder",t),window.removeEventListener("modal-split-view",n),window.removeEventListener("modal-center",o),window.removeEventListener("modal-reveal",a),window.removeEventListener("modal-context-menu",i),window.dispatchEvent(new CustomEvent("modal-reorder"))}},[e,yt,ln,Zt]);const dn=!H&&"maximized"===Pt(),[un,hn]=E(()=>{if(ln&&vt[ln]){const e={...vt[ln]};return J&&(e.w=J[0],Y||(e.h=J[1])),rn(e)}return z?{x:z.x,y:z.y,w:z.w,h:z.h}:dn?Zt():en()}),[pn,kn]=E(()=>!Y),[Cn,En]=E(()=>et());C(()=>{const e=()=>En(et());return window.addEventListener("react-os-shell:layout-mode-changed",e),()=>window.removeEventListener("react-os-shell:layout-mode-changed",e)},[]);const Sn=Cn&&!H,[Tn,zn]=E(()=>ln&&vt[ln]||z?Sn:Sn||dn),Wn=k(un);Wn.current=un,x(()=>{if(pn)return;const e=Be.current,t=Fe.current;if(!e||!t)return;const n=U??(H?0:240),r=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-height"))||0;let o=0,i=null,a=null;const l=()=>{const c=t.firstElementChild;if(!c||e.offsetHeight<=0)return;c!==a&&(a&&s.unobserve(a),s.observe(c),a=c);const d=e.offsetHeight-t.offsetHeight,u=t.style.flex,h=t.style.overflowY,m=t.style.height;t.style.flex="0 0 auto",t.style.height="auto",t.style.overflowY="visible";const p=t.offsetHeight,w=c.offsetHeight;t.style.flex=u,t.style.height=m,t.style.overflowY=h;const f=c.offsetHeight>w+4,y=Math.max(n,window.innerHeight-r-Math.max(0,Wn.current.y)-24),g=f?Math.min(Wn.current.h,y):Math.min(Math.max(n,d+p),y),v=Math.abs(g-o)>1;v&&(o=g,hn(e=>Math.abs(e.h-g)>1?{...e,h:g}:e)),H||(g<=n?i&&(clearTimeout(i),i=null):(v||null===i)&&(i&&clearTimeout(i),i=setTimeout(()=>{const e=o;l(),o===e&&kn(!0)},160)))},s=new ResizeObserver(l);l(),_e.current&&s.observe(_e.current);const c=new MutationObserver(l);return c.observe(t,{childList:!0,subtree:!0,characterData:!0}),()=>{s.disconnect(),c.disconnect(),i&&clearTimeout(i)}},[pn,H,U,Je]),x(()=>{if(!Y||!pn||H||!e)return;const t=_e.current;if(!t)return;let n=t.offsetHeight;const r=new ResizeObserver(()=>{if(!t.isConnected)return;const e=t.offsetHeight,r=e-n,o=e>0!=n>0;if(n=e,!o||0===r||Tn)return;if(document.body.classList.contains("rosh-gesturing"))return;const i=U??240,a=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-height"))||0,l=Math.max(i,window.innerHeight-a-Math.max(0,Wn.current.y)-24);hn(e=>({...e,h:Math.min(Math.max(i,e.h+r),l)}))});return r.observe(t),()=>r.disconnect()},[Y,pn,H,e,Tn,U]);const $n=!1!==X&&!H&&!F&&!oe,[Bn,jn]=E(()=>!$n);x(()=>{if(Bn||!e)return;if(!$n||Tn)return void jn(!0);const t=Be.current,n=Fe.current;if(!t||!n)return;const r=/* @__PURE__ */new WeakSet;let o=Wn.current.w,i=0;const a=()=>jn(!0),l=()=>{i=0;const e=Wn.current;if(Math.abs(e.w-o)>1||document.body.classList.contains("rosh-gesturing"))return void a();const l=Ge(),s=l.w-80;if(e.w>=s)return void a();const c=[],d=[];for(const e of[n,...Array.from(n.querySelectorAll("*"))]){const t=e.scrollWidth-e.clientWidth;if(t<=4||r.has(e))continue;const n=getComputedStyle(e).overflowX;"auto"!==n&&"scroll"!==n||(c.push(e),d.push(t))}if(!c.length)return;const u=Math.min(s,e.w+Math.max(...d)),h=u-e.w,m=t.style.width;t.style.width=`${u}px`;const p=c.map((e,t)=>({over:d[t],residual:e.scrollWidth-e.clientWidth}));t.style.width=m,p.forEach((e,t)=>{Ze(e,h)||r.add(c[t])});const w=function(e,t,n,r){const o=Math.min(t,n.w-2*r);if(o<=e.w+1)return e;const i=n.x+r,a=n.x+n.w-r-o,l=Math.min(Math.max(e.x-(o-e.w)/2,i),a);return{...e,x:Math.round(l),w:Math.round(o)}}(e,function(e,t,n){let r=e;for(const o of n)Ze(o,t)&&(r=Math.max(r,e+o.over));return Math.ceil(r)}(e.w,h,p),l,ut);w!==e&&(o=w.w,hn(w))};l();const s=new MutationObserver(()=>{i||(i=requestAnimationFrame(l))});s.observe(n,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["style","class","hidden"]});const c=setTimeout(a,zt);return()=>{s.disconnect(),i&&cancelAnimationFrame(i),clearTimeout(c)}},[Bn,e,$n,Tn]),C(()=>{Sn&&(zn(!0),hn(Zt()))},[Sn,Zt]),C(()=>{if(H)return;const e=()=>{zn(!1),hn(en())};return window.addEventListener("react-os-shell:restore-windowed",e),()=>window.removeEventListener("react-os-shell:restore-windowed",e)},[H,en]),C(()=>{e&&ln&&(vt[ln]=un,xt()),e&&window.dispatchEvent(new CustomEvent("modal-geometry"))},[un,e,ln]),C(()=>{if(!e)return;const t=()=>{Tn?hn(Zt()):document.body.classList.contains("rosh-gesturing")||hn(rn)};window.addEventListener("resize",t);let n=null;return Tn&&(n=new MutationObserver(t),n.observe(document.body,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["class"]})),()=>{window.removeEventListener("resize",t),n?.disconnect()}},[e,Tn,Zt]),C(()=>{if(e){if(xe(!1),ke.current=!1,Re.current=!1,jn(!$n),ln&&vt[ln]){const e=vt[ln];return void hn(t=>rn({...e,...Y?{h:t.h}:{},...$n?{x:t.x,w:t.w}:{}}))}z&&(hn({x:z.x,y:z.y,w:z.w,h:z.h}),zn(z.maximized))}},[e]),C(()=>{if(!e||"auto"!==s)return;let t;const n=e=>{Be.current?.contains(e.target)&&!ke.current&&(ke.current=!0,t=setTimeout(()=>xe(!0),0))};return document.addEventListener("input",n,!0),document.addEventListener("change",n,!0),()=>{clearTimeout(t),document.removeEventListener("input",n,!0),document.removeEventListener("change",n,!0)}},[e,s]);const On="auto"===s?be:!0===s;ye(!(G||!e)&&On);const Hn=M(async()=>{if(!Re.current){if(On||"auto"===s&&ke.current){Re.current=!0;const e=ge,t=await w({title:"Discard changes?",message:e?`“${e}” has unsaved changes. Are you sure you want to close? All changes will be lost.`:"You have unsaved changes. Are you sure you want to close? All changes will be lost.",confirmLabel:"Discard",cancelLabel:"Keep Editing",variant:"warning"});if(Re.current=!1,!t)return}t()}},[On,s,t,ge]);x(()=>{if(!e||!G)return;const t=e=>{e.detail?.windowKey===G&&Hn()};return window.addEventListener(xn,t),()=>window.removeEventListener(xn,t)},[e,G,Hn]);const Vn=k(null),Fn=M(e=>{if(0!==e.button)return;if(e.target.closest("button, input, a, kbd, select, textarea"))return;if(Le(null),Ut(yt),Sn)return void e.preventDefault();e.preventDefault();const t=e.currentTarget,n=e.pointerId;let r=null;const o=e.clientX,i=e.clientY,a=Be.current,l=a?.getBoundingClientRect();let s,c,d,u;if(Vn.current){const t=Vn.current;Vn.current=null,u=t.w,d=t.h;const n=l?Math.min(Math.max(20,e.clientX-l.left),t.w-20):t.w/2;s=e.clientX-n,c=e.clientY-12,a&&(a.style.width=`${u}px`,a.style.height=`${d}px`,a.style.left=`${s}px`,a.style.top=`${c}px`)}else s=l?l.left:Wn.current.x,c=l?l.top:Wn.current.y,d=l?l.height:Wn.current.h,u=l?l.width:Wn.current.w;zn(!1),hn(e=>({...e,x:s,y:c,w:u,h:d}));let h=null;const m=e=>{if(!r){if(Math.abs(e.clientX-o)<fn&&Math.abs(e.clientY-i)<fn)return;r=yn(t,n,"move","move"),a&&(a.style.transition="none")}const l=s+e.clientX-o,d=Math.max(0,c+e.clientY-i);if(a&&(a.style.transform=`translate(${l-s}px, ${d-c}px)`),Wn.current={...Wn.current,x:l,y:d},!H){const t=function(e,t){const n=Qt(),r=e<=n.x+Jt,o=e>=n.x+n.w-Jt,i=t<=n.y+Jt,a=t>=n.y+n.h-Jt,l=e<=n.x+Gt,s=e>=n.x+n.w-Gt,c=t<=n.y+Gt,d=t>=n.y+n.h-Gt;return i&&l?"tl":i&&s?"tr":a&&l?"bl":a&&s?"br":c&&r?"tl":c&&o?"tr":d&&r?"bl":d&&o?"br":i?"top":r?"left":o?"right":null}(e.clientX,e.clientY);t!==h&&(h=t,t?sn(an(t)):cn())}},p=()=>{window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",p),r?.(),cn();const e=rn({...Wn.current});if(Wn.current=e,!H&&h){Vn.current={x:s,y:c,w:u,h:d};const e=an(h);return a&&(a.style.left=`${e.x}px`,a.style.top=`${e.y}px`,a.style.width=`${e.w}px`,a.style.height=`${e.h}px`,a.style.transform="",a.style.transition=""),void hn(e)}if(H){const t=e.x+e.w/2,n=window.innerWidth/2;Ke(t>n?"right":"left")}a&&(a.style.left=`${e.x}px`,a.style.top=`${e.y}px`,a.style.transform="",a.style.transition=""),hn(e)};window.addEventListener("pointermove",m),window.addEventListener("pointerup",p)},[]),qn=M((e,t)=>{if(0!==e.button)return;e.preventDefault(),e.stopPropagation();const n=e.currentTarget,r=e.pointerId;let o=null;const i=e.clientX,a=e.clientY,l=Be.current,s=l?.getBoundingClientRect(),c=s?s.left:Wn.current.x,d=s?s.top:Wn.current.y,u=s?s.width:Wn.current.w,h=s?s.height:Wn.current.h,m="sw"===t||"nw"===t||"w"===t,p="ne"===t||"nw"===t||"n"===t,w="se"===t||"ne"===t||"e"===t,f="se"===t||"sw"===t||"s"===t;zn(!1),hn({x:c,y:d,w:u,h:h}),Wn.current={x:c,y:d,w:u,h:h};let y=0,g=null;const v=()=>{if(y=0,!g)return;const e=g;g=null,Wn.current=e,l&&(l.style.left=`${e.x}px`,l.style.top=`${e.y}px`,l.style.width=`${e.w}px`,l.style.height=`${e.h}px`)},b=e=>{if(!o){if(Math.abs(e.clientX-i)<fn&&Math.abs(e.clientY-a)<fn)return;o=yn(n,r,wn[t],"resize")}g=((e,t)=>{let n=c,r=d,o=u,i=h;if(w&&(o=Math.max(tn,u+e)),f&&(i=Math.max(nn,h+t)),m){const t=Math.max(tn,u-e);n=c+u-t,o=t}if(p){const e=Math.max(nn,h-t);r=d+h-e,i=e}return{x:n,y:r,w:o,h:i}})(e.clientX-i,e.clientY-a),y||(y=requestAnimationFrame(v))},x=()=>{window.removeEventListener("pointermove",b),window.removeEventListener("pointerup",x),y&&cancelAnimationFrame(y),v(),o?.(),hn({...Wn.current})};window.addEventListener("pointermove",b),window.addEventListener("pointerup",x)},[]),Yn=M(e=>{if(e.target.closest("button, input, a, kbd, select, textarea"))return;const t={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]}[e.key];if(!t&&"Enter"!==e.key)return;if(e.preventDefault(),e.stopPropagation(),Ut(yt),"Enter"===e.key)return void(Tn?(zn(!1),hn(en())):(zn(!0),hn(Zt())));const[n,r]=t;if(e.ctrlKey||e.metaKey){const e=()=>{Vn.current||(Vn.current={...Wn.current})};if(r<0)return e(),zn(!0),void hn(Zt());if(r>0){if(Tn)return zn(!1),void hn(en());if(Vn.current){const e=rn(Vn.current);return Vn.current=null,Wn.current=e,void hn(e)}return void Xt(yt)}e(),zn(!1);const t=an(n<0?"left":"right");return Wn.current=t,void hn(t)}if(Tn)return;const o=Wn.current,i=e.shiftKey?{...o,w:Math.max(tn,o.w+24*n),h:Math.max(nn,o.h+24*r)}:rn({...o,x:o.x+24*n,y:Math.max(0,o.y+24*r)});Wn.current=i,hn(i)},[yt,Tn,en,Zt]),Un=M(e=>{Vn.current||(Vn.current={...Wn.current}),zn(!1);const t=an(e);Wn.current=t,hn(t),Ut(yt)},[yt]),Xn=Sn||St?{}:{tabIndex:0,role:"group","aria-label":ge?`${ge} — ${fe.windowSuffix}`:fe.windowSuffix,"aria-keyshortcuts":"ArrowUp ArrowDown ArrowLeft ArrowRight Shift+ArrowUp Shift+ArrowDown Shift+ArrowLeft Shift+ArrowRight Control+ArrowUp Control+ArrowDown Control+ArrowLeft Control+ArrowRight Enter",onKeyDown:Yn},_n=()=>{zn(!0),hn(Zt())},Jn=M(()=>{const e=Be.current;if(!e)return;const t=e.querySelector("form");if(t)t.requestSubmit();else{const t=e.querySelector(it);t&&!t.disabled&&t.click()}},[]);C(()=>{if(!e)return;const t=e=>{if(Dt[Dt.length-1]===yt&&"Enter"===e.key){const t=e.target;if("TEXTAREA"===t.tagName||t.isContentEditable)return;if(e.metaKey||e.ctrlKey)e.preventDefault(),Jn();else{if("INPUT"===t.tagName&&t.closest("form"))return;e.preventDefault()}}};return window.addEventListener("keydown",t,!0),()=>window.removeEventListener("keydown",t,!0)},[e,Jn,yt]),C(()=>{if(!e)return;const t=e=>{Dt[Dt.length-1]===yt&&((e.metaKey||e.ctrlKey)&&"s"===e.key?(e.preventDefault(),document.dispatchEvent(new CustomEvent("modal-save",{detail:{modalId:yt}})),ke.current=!1,xe(!1)):e.altKey&&e.shiftKey&&("KeyD"===e.code||"D"===e.key||"d"===e.key)&&(e.preventDefault(),document.dispatchEvent(new CustomEvent("modal-duplicate",{detail:{modalId:yt}}))))};return window.addEventListener("keydown",t,!0),()=>window.removeEventListener("keydown",t,!0)},[e]),C(()=>{if(!e)return;if(H)return;const t=e=>{if("Escape"===e.key&&Dt[Dt.length-1]===yt){if(f(e))return e.preventDefault(),void e.stopPropagation();e.preventDefault(),e.stopPropagation(),Hn()}};return window.addEventListener("keydown",t,!0),()=>window.removeEventListener("keydown",t,!0)},[e,Hn,yt,H]);const Gn=e&&(void 0!==c||void 0!==m),Qn=M(e=>{const t=document.getElementById("nav-boundary-toast");t&&t.remove();const n="bottom"===e?["That's the last one, chief.","You've hit rock bottom... of the list.","End of the line, buddy.","Nothing left. Go outside.","Congratulations, you scrolled to the void.","There's no more. I checked.","You've reached the edge of the known universe.","Plot twist: there is no next one.","Even scrolling has limits. Unlike your ambition.","Last one. Time to touch grass."]:["Already at the top. Overachiever.","There is no item above this. Trust me.","You're #1. Literally.","Can't go higher. You've peaked.","This is it. The summit. The top.","First item. No VIP lounge above this.","Going up? Nope. Elevator's broken.","You want negative indexes? Bold.","Top of the list. Top of the world.","The only way is down from here."],r=n[Math.floor(Math.random()*n.length)],o=document.createElement("div");o.id="nav-boundary-toast",o.className="fixed bottom-6 left-1/2 -translate-x-1/2 z-[9999] bg-gray-900 text-white px-5 py-2.5 rounded-lg shadow-lg text-sm font-medium transition-opacity duration-300",o.textContent=r,document.body.appendChild(o),setTimeout(()=>{o.style.opacity="0",setTimeout(()=>o.remove(),300)},2e3)},[]);if(C(()=>{if(!e)return;const t=e=>{if(Dt[Dt.length-1]!==yt)return;const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.target.isContentEditable||("j"===e.key&&Gn&&(e.preventDefault(),c?c():Qn("bottom")),"k"===e.key&&Gn&&(e.preventDefault(),m?m():Qn("top"))))};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,c,m,Gn,Qn,yt]),!e||on.current)return null;const Zn=St?function(e){if("undefined"==typeof document)return null;const t=Array.from(document.querySelectorAll("[data-modal-panel]")).filter(e=>{const t=e;return!t.hasAttribute("data-utility")&&!t.hasAttribute("data-widget")&&"none"!==t.style.display});t.sort((e,t)=>(e.getAttribute("data-modal-id")||"").localeCompare(t.getAttribute("data-modal-id")||""));const n=t.findIndex(t=>t.getAttribute("data-modal-id")===e),r=t.length;if(n<0||r<1)return null;const o=Math.ceil(Math.sqrt(r)),i=Math.ceil(r/o),a=Math.floor(n/o),l=n%o,s=r-o*(i-1),c=a===i-1&&s<o,d=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-height"))||0,u=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-width"))||0,h=(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-position")||"bottom").trim(),m="left"===h?u:0,p="right"===h?u:0,w="top"===h?d:0,f="top"===h||"left"===h||"right"===h?0:d,y=m,g=w,v=(window.innerWidth-m-p-20*(o+1))/o,b=(window.innerHeight-w-f-14*(i+1)-22*i)/i;return{x:y+20+l*(v+20)+(c?(o-s)*(v+20)/2:0),y:g+14+a*(b+14+22),w:v,h:b}}(yt):null,er=St&&Zn?Math.min(Zn.w/un.w,Zn.h/un.h):1,tr=(()=>{if(St&&Zn){const e=er,t=un.w*e,n=un.h*e,r=Zn.x+(Zn.w-t)/2-un.x,o=Zn.y+(Zn.h-n)/2-un.y,i=Tt||Kt;return{transform:`translate(${r}px, ${o}px) scale(${e})`,transformOrigin:"top left",transition:"transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 280ms",cursor:"pointer",zIndex:i?2020:2010,boxShadow:i?"0 24px 72px rgba(0,0,0,0.6), 0 0 0 2px rgba(255,255,255,0.55), 0 0 36px 12px rgba(96,165,250,0.85), 0 0 96px 28px rgba(96,165,250,0.55)":"0 16px 48px rgba(0,0,0,0.55)",pointerEvents:"auto"}}if(Rt&&Nt){const e="picked"===Vt;return{transition:e?"transform 640ms cubic-bezier(0.34, 1.42, 0.64, 1), box-shadow 600ms":"transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 600ms",...e?{zIndex:2030}:{}}}return null})(),nr=/* @__PURE__ */I("div",{children:[
54
- /* @__PURE__ */I("div",{ref:Be,"data-modal-panel":!0,"data-modal-id":yt,"data-window-key":G||void 0,...j?{"data-utility":""}:{},...Ce?{"data-pinned-top":""}:{},...H?{"data-widget":""}:{},className:"fixed rounded-2xl flex flex-col overflow-hidden "+(H?kt?"shadow-2xl":"shadow-lg":"border "+(kt?"shadow-2xl border-gray-200":"shadow-lg border-gray-300")),onMouseDownCapture:e=>{if(Ve.current=!1,St){if(e.target.closest("[data-expose-close]"))return;return e.preventDefault(),e.stopPropagation(),Dn(yt),Nn(!1),void Ut(yt)}if(!kt&&!H&&!Ce&&0===e.button){const t=e.target;t.closest("[data-modal-panel]")===Be.current&&t.closest("button, input, a, select, textarea")&&!t.closest("[data-window-chrome]")&&(e.preventDefault(),e.stopPropagation(),Ve.current=!0,Le(null),Ut(yt),window.addEventListener("mouseup",()=>{setTimeout(()=>{Ve.current=!1},0)},{once:!0}))}},onClickCapture:e=>{Ve.current&&(Ve.current=!1,e.preventDefault(),e.stopPropagation())},onMouseDown:e=>{if(St)return;Le(null);e.target.closest("[data-modal-panel]")===Be.current&&(e.target.closest("button, input, a, select, textarea")||Ut(yt))},style:oe?{zIndex:gt+1,top:0,left:0,right:0,bottom:"var(--mobile-bottom-nav, 56px)",width:"auto",height:"auto",transform:`translateX(${ie}px)`,transition:le?"none":"transform 180ms ease-out",...H?{display:"none"}:{},...gt<0?{display:"none"}:{},...kt||Ce||he&&G===he?{}:{display:"none"}}:{zIndex:Ce?p.pinnedWindow:gt+1,width:un.w,height:un.h,top:un.y,...H&&"right"===$e?{right:window.innerWidth-un.x-un.w}:{left:un.x},...gt<0&&!Ce?{display:"none"}:{},...tr??{}},children:[oe&&!H&&/* @__PURE__ */D("div",{onPointerDown:ue,className:"absolute top-0 bottom-0 left-0 w-[22px] z-[5]",style:{touchAction:"pan-y"},"aria-hidden":"true"}),H||oe?null:
52
+ /* @__PURE__ */D("button",{onClick:t,onFocus:c,onBlur:d,title:e?o.windowed:o.maximize,className:r,children:e?"❐":"⤢"}),i&&/* @__PURE__ */D("div",{role:"group","aria-label":o.snapLayouts,onMouseEnter:()=>clearTimeout(s.current),onMouseLeave:d,className:"absolute right-0 top-full z-30 mt-1 grid w-max grid-cols-2 gap-1 rounded-lg border border-gray-200 bg-white p-1.5 shadow-lg",children:dn.map(({zone:e,labelKey:t,region:r})=>/* @__PURE__ */D("button",{type:"button","aria-label":o[t],title:o[t],onClick:()=>{a(!1),n(e)},onFocus:()=>clearTimeout(s.current),onBlur:d,className:"relative h-7 w-11 rounded border border-gray-300 bg-gray-50 hover:border-blue-400 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-400",children:/* @__PURE__ */D("span",{"aria-hidden":"true",className:`absolute rounded-sm bg-blue-500/70 ${r}`,style:{margin:2}})},e))})]})}var pn="rosh-gesture-style";var wn={se:"nwse-resize",nw:"nwse-resize",sw:"nesw-resize",ne:"nesw-resize",n:"ns-resize",s:"ns-resize",e:"ew-resize",w:"ew-resize"},fn=4;function yn(e,t,n,r){!function(){if("undefined"==typeof document||document.getElementById(pn))return;const e=document.createElement("style");e.id=pn,e.textContent="body.rosh-gesturing [data-modal-panel]{will-change:transform}",document.head.appendChild(e)}();try{e.setPointerCapture(t)}catch{}document.body.classList.add("rosh-gesturing");const o=document.createElement("div");o.setAttribute("data-drag-shield",""),o.style.cssText=`position:fixed;inset:0;z-index:2147483647;cursor:${n};background:transparent;touch-action:none`,document.body.appendChild(o);const i=Xe(r);let a=!1;return()=>{if(!a){a=!0,i();try{e.releasePointerCapture(t)}catch{}o.remove(),document.body.classList.remove("rosh-gesturing")}}}function gn(e){const t=Dt.indexOf(e);return-1===t?-1:p.window+t*p.windowStep}function vn(){return Dt[Dt.length-1]||null}function bn(e){return Wt.add(e),()=>{Wt.delete(e)}}"undefined"!=typeof window&&window.addEventListener("deactivate-all-modals",function(){for(let e=Dt.length-1;e>=0;e--)_t.has(Dt[e])||Dt.splice(e,1);Ct=Ct.filter(e=>{const t=jt.get(e);return null!=t&&_t.has(t)}),Mt(),Bt(),window.dispatchEvent(new CustomEvent("modal-reorder"))});var xn="modal-close-request";function kn(e){L(bn,Rt);const t=b(mt);if(Dt.length<=1)return!0;if(e){const t=jt.get(e);if(null!=t)return vn()===t}return t?.active??null!=vn()}var Cn=!1,En=/* @__PURE__ */new Set;function Mn(e){return En.add(e),()=>En.delete(e)}function Ln(){return Cn}function Nn(e){Cn!==e&&(Cn=e,En.forEach(e=>e()))}function Sn(){Nn(!Cn)}function Tn(){Nn(!1)}var An=null,zn=/* @__PURE__ */new Set;function Pn(e){return zn.add(e),()=>zn.delete(e)}function In(){return An}function Dn(e){An!==e&&(An=e,zn.forEach(e=>e()))}var Wn=null,$n=/* @__PURE__ */new Set;function Kn(e){return $n.add(e),()=>$n.delete(e)}function Rn(){return Wn}function Bn(e){Wn!==e&&(Wn=e,$n.forEach(e=>e()))}function jn(){if(!Wn)return void Nn(!1);Dn(Wn),Bn(null),Nn(!1)}function Hn(){Nn(!Cn),window.dispatchEvent(new CustomEvent("modal-split-view"))}function On(){const e=L(Mn,Ln),[t,n]=E(e),[r,o]=E(e);return C(()=>{if(e){n(!0);const e=requestAnimationFrame(()=>o(!0));return()=>cancelAnimationFrame(e)}o(!1);const t=setTimeout(()=>n(!1),280);return()=>clearTimeout(t)},[e]),t&&"undefined"!=typeof document?$(
53
+ /* @__PURE__ */D("div",{onMouseDown:e=>{e.stopPropagation(),Nn(!1)},style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.55)",backdropFilter:"blur(2px)",WebkitBackdropFilter:"blur(2px)",zIndex:2e3,cursor:"pointer",opacity:r?1:0,transition:"opacity 260ms cubic-bezier(0.2, 0.8, 0.2, 1)",pointerEvents:r?"auto":"none"}}),document.body):null}function Vn({open:e,onClose:t,title:n,icon:r,copyText:o,size:l="lg",dirty:s=!1,onNext:c,onPrev:m,footer:g,bodyScroll:v,onMinimize:A,initialBox:z,actions:P,actionsLeft:R,editing:B=!1,allowPinOnTop:j,initialPosition:H,widget:O,compact:V,appStyle:F,flushBody:q,autoHeight:Y,autoMinHeight:U,autoWidth:X,widgetMenu:_,dimensions:J,windowKey:G,openedFromKey:ee,accentRgb:ne,children:re}){const oe=i(),[ie,ae]=E(0),[le,se]=E(!1),ce=k(null),de=k(0);C(()=>{de.current=ie},[ie]);const ue=M(e=>{oe&&(ce.current={startX:e.clientX,startY:e.clientY,pointerId:e.pointerId},se(!0),He(ee??null))},[oe,ee]),he=L(Oe,je);C(()=>{if(!le)return;const e=e=>{if(!ce.current)return;const t=e.clientX-ce.current.startX;if(Math.abs(e.clientY-ce.current.startY)>Math.abs(t)+12)return ce.current=null,se(!1),ae(0),void He(null);ae(Math.max(0,t))},n=()=>{if(!ce.current)return;const e=.3*window.innerWidth,n=de.current>e;ce.current=null,se(!1),n?(ae(window.innerWidth),setTimeout(()=>{t(),ae(0),He(null)},180)):(ae(0),He(null))};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",n),window.addEventListener("pointercancel",n),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",n),window.removeEventListener("pointercancel",n)}},[le]);const[me,pe]=E(n),we=y(),fe=we.window;C(()=>{pe(n)},[n]);const ge=N(()=>at(me).trim()||void 0,[me]),[be,xe]=E(!1),ke=k(!1),[Ce,Ee]=E(!1),[Me,Le]=E(null),Ne=b(nt),{prefs:Se,save:Te}=a(),Ae=!!Se.window_accent_stripe,ze=Se.favorite_documents||[],Pe=!!Ne&&ze.some(e=>e.entityType===Ne.entityType&&e.entityId===Ne.entityId),Ie=M(()=>{if(!Ne)return;const e=Pe?ze.filter(e=>!(e.entityType===Ne.entityType&&e.entityId===Ne.entityId)):[...ze,{entityType:Ne.entityType,entityId:Ne.entityId,label:Ne.label}];Te({favorite_documents:e})},[Ne,Pe,ze,Te]),[De,We]=E(null),[$e,Ke]=E("top-right"===H?"right":"left"),Re=k(!1),Be=k(null);x(()=>{const e=Be.current;e&&(ne?e.style.setProperty("--window-accent-rgb",ne):e.style.removeProperty("--window-accent-rgb"))},[ne]);const Ve=k(!1),Fe=k(null),qe=k(null),Ye=k(null),[Ue,Xe]=E(!1),_e=k(null),Je=!!(g||P||R)||Ue,Qe=b(Z),rt=""!==b(tt),ot=!!Qe&&!rt&&Qe.enabled&&Qe.hasState&&(B||Qe.declaredEditable)&&!Qe.handMounted&&Je&&!O&&!V&&!F&&!oe,lt=/* @__PURE__ */D("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75A2.25 2.25 0 016 4.5h12a2.25 2.25 0 012.25 2.25v10.5A2.25 2.25 0 0118 19.5H6a2.25 2.25 0 01-2.25-2.25V6.75z M3.75 9h16.5"})}),ct=r&&S(r)?T(r,{className:`h-4 w-4 ${r.props?.className??""}`.trim()}):r??lt,dt=()=>/* @__PURE__ */D("button",{onPointerDown:e=>e.stopPropagation(),onClick:e=>{e.stopPropagation();const t=e.currentTarget.getBoundingClientRect();Le(e=>e?null:{x:t.left,y:t.bottom+4})},className:"shrink-0 p-0.5 rounded hover:bg-gray-200/50 transition-colors",title:"Window menu",children:ct}),ut=40,{minimize:ht,items:pt,restoreIfMinimized:wt,openWindows:ft}=ve(),yt=k(`modal-${Math.random().toString(36).slice(2,8)}`).current;C(()=>{if(O)return _t.add(yt),()=>{_t.delete(yt)}},[O,yt]),C(()=>{const e=e=>{const t=e.detail;t?.id===yt&&pe(t.title)};return window.addEventListener("window-title-update",e),()=>window.removeEventListener("window-title-update",e)},[yt]);const[gt,bt]=E(p.window),kt=function(e){const t=L(bn,vn);return Dt.length<=1||t===e}(yt),Ct=function(e){return L(bn,()=>$t.has(e))}(yt),Et=L(Mn,Ln),Mt=L(Pn,In),Lt=L(Kn,Rn),Nt=!j&&!O,St=Et&&Nt,[Tt,Wt]=E(!1),Kt=St&&Lt===yt,[Rt,Ot]=E(!1),Vt=Rt&&Nt&&Mt===yt?"picked":null,Ft=k(St);C(()=>{if(Ft.current&&!St){Ot(!0);const e=setTimeout(()=>{Ot(!1),An===yt&&Dn(null)},700);return Ft.current=St,()=>clearTimeout(e)}Ft.current=St},[St,yt]),C(()=>{St||Wt(!1)},[St]),C(()=>{const e=qe.current,t=Ye.current;if(!e&&!t)return;const n=e=>e?Array.from(e.children).filter(e=>"shell"!==e.dataset.undoControls).length:0,r=()=>Xe(n(e)+n(t)>0);r();const o=new MutationObserver(r);return e&&o.observe(e,{childList:!0}),t&&o.observe(t,{childList:!0}),()=>o.disconnect()},[e]),C(()=>{const e=e=>{if(e.target.closest('button[type="submit"]')&&Be.current){const t=Be.current.querySelector("form");t&&(e.preventDefault(),t.requestSubmit())}},t=qe.current,n=Ye.current;return t&&t.addEventListener("click",e),n&&n.addEventListener("click",e),()=>{t&&t.removeEventListener("click",e),n&&n.removeEventListener("click",e)}},[e]);const qt=k(!1),Zt=M(Ge,[]),en=M(()=>{const e=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-height"))||0,t=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-width"))||0,n=getComputedStyle(document.documentElement).getPropertyValue("--taskbar-position")?.trim()||"bottom",r="left"===n?t:0,o="right"===n?t:0,i=J?J[0]:At[l]||672,a=window.innerWidth-0-r-o-80,s=window.innerHeight-e-80,c=Math.min(i,a),d=It[Pt()],u=J?Math.min(J[1],s):(()=>{const t=("sm"===l?500:"md"===l?600:"lg"===l?700:"xl"===l?800:920)*d;return Math.max(320,Math.min(t,window.innerHeight-e-80))})(),h="cascade"===(getComputedStyle(document.documentElement).getPropertyValue("--window-position")?.trim()||"cascade")?30*(Dt.length-1):0,m=a-c,p=s-u;return"top-right"===H?{x:window.innerWidth-c-ut,y:ut,w:c,h:u}:"top-left"===H?{x:40,y:ut,w:c,h:u}:{x:0+Math.max(ut,(a-c)/2+ut)+Math.min(h,Math.max(0,m)),y:Math.max(ut,(s-u)/2)+Math.min(h,Math.max(0,p)),w:c,h:u}},[l]),on=k(!1);e||(on.current=!1);const ln=G||o||null;C(()=>{if(!e)return;Yt(yt,ln),G||Ut(yt),qt.current=!1,bt(gn(yt));const t=()=>{bt(gn(yt))},n=()=>{},r=e=>{if(!e)return!1;if(e.windowKey)return e.windowKey===G;if(!e.label)return!1;const t=Be.current?.querySelector("[data-window-title]");return!!t?.textContent?.includes(e.label)},o=e=>{if(!r(e.detail))return;Ut(yt);const t=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-height"))||0,n=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-width"))||0,o=getComputedStyle(document.documentElement).getPropertyValue("--taskbar-position")?.trim()||"bottom",i="left"===o?n:0,a="right"===o?n:0,l=window.innerWidth-i-a,s=window.innerHeight-t,c=Math.min(Wn.current.w,l-40),d=Math.min(Wn.current.h,s-40);hn({x:i+(l-c)/2,y:("top"===o?t:0)+(s-d)/2,w:c,h:d}),zn(!1)},i=e=>{const t=e.detail;r(t)&&(Ut(yt),Le({x:t.x,y:t.y}))},a=e=>{if(e.detail?.windowKey!==G)return;Ut(yt);const t=Wn.current,n=function(e,t=Qt()){const n=Math.min(e.w,t.w),r=Math.min(e.h,t.h);return{w:n,h:r,x:Math.min(Math.max(e.x,t.x),t.x+t.w-n),y:Math.min(Math.max(e.y,t.y),t.y+t.h-r)}}(t);if(n.x===t.x&&n.y===t.y&&n.w===t.w&&n.h===t.h)return;const r=Be.current,o="function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;if(r&&!o){let e=!1;const t=()=>{e||(e=!0,r.style.transition="",window.dispatchEvent(new CustomEvent("modal-geometry")))};r.style.transition="left .28s ease, top .28s ease, width .28s ease, height .28s ease",r.addEventListener("transitionend",t,{once:!0}),window.setTimeout(t,400)}hn(n)};return window.addEventListener("modal-reorder",t),window.addEventListener("modal-split-view",n),window.addEventListener("modal-center",o),window.addEventListener("modal-reveal",a),window.addEventListener("modal-context-menu",i),()=>{!function(e){const t=Dt.indexOf(e);-1!==t&&(Dt.splice(t,1),Bt()),$t.delete(e);const n=Ht.get(e);n&&(Ht.delete(e),jt.delete(n))}(yt),window.removeEventListener("modal-reorder",t),window.removeEventListener("modal-split-view",n),window.removeEventListener("modal-center",o),window.removeEventListener("modal-reveal",a),window.removeEventListener("modal-context-menu",i),window.dispatchEvent(new CustomEvent("modal-reorder"))}},[e,yt,ln,Zt]);const dn=!O&&"maximized"===Pt(),[un,hn]=E(()=>{if(ln&&vt[ln]){const e={...vt[ln]};return J&&(e.w=J[0],Y||(e.h=J[1])),rn(e)}return z?{x:z.x,y:z.y,w:z.w,h:z.h}:dn?Zt():en()}),[pn,kn]=E(()=>!Y),[Cn,En]=E(()=>et());C(()=>{const e=()=>En(et());return window.addEventListener("react-os-shell:layout-mode-changed",e),()=>window.removeEventListener("react-os-shell:layout-mode-changed",e)},[]);const Sn=Cn&&!O,[Tn,zn]=E(()=>ln&&vt[ln]||z?Sn:Sn||dn),Wn=k(un);Wn.current=un,x(()=>{if(pn)return;const e=Be.current,t=Fe.current;if(!e||!t)return;const n=U??(O?0:240),r=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-height"))||0;let o=0,i=null,a=null;const l=()=>{const c=t.firstElementChild;if(!c||e.offsetHeight<=0)return;c!==a&&(a&&s.unobserve(a),s.observe(c),a=c);const d=e.offsetHeight-t.offsetHeight,u=t.style.flex,h=t.style.overflowY,m=t.style.height;t.style.flex="0 0 auto",t.style.height="auto",t.style.overflowY="visible";const p=t.offsetHeight,w=c.offsetHeight;t.style.flex=u,t.style.height=m,t.style.overflowY=h;const f=c.offsetHeight>w+4,y=Math.max(n,window.innerHeight-r-Math.max(0,Wn.current.y)-24),g=f?Math.min(Wn.current.h,y):Math.min(Math.max(n,d+p),y),v=Math.abs(g-o)>1;v&&(o=g,hn(e=>Math.abs(e.h-g)>1?{...e,h:g}:e)),O||(g<=n?i&&(clearTimeout(i),i=null):(v||null===i)&&(i&&clearTimeout(i),i=setTimeout(()=>{const e=o;l(),o===e&&kn(!0)},160)))},s=new ResizeObserver(l);l(),_e.current&&s.observe(_e.current);const c=new MutationObserver(l);return c.observe(t,{childList:!0,subtree:!0,characterData:!0}),()=>{s.disconnect(),c.disconnect(),i&&clearTimeout(i)}},[pn,O,U,Je]),x(()=>{if(!Y||!pn||O||!e)return;const t=_e.current;if(!t)return;let n=t.offsetHeight;const r=new ResizeObserver(()=>{if(!t.isConnected)return;const e=t.offsetHeight,r=e-n,o=e>0!=n>0;if(n=e,!o||0===r||Tn)return;if(document.body.classList.contains("rosh-gesturing"))return;const i=U??240,a=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-height"))||0,l=Math.max(i,window.innerHeight-a-Math.max(0,Wn.current.y)-24);hn(e=>({...e,h:Math.min(Math.max(i,e.h+r),l)}))});return r.observe(t),()=>r.disconnect()},[Y,pn,O,e,Tn,U]);const $n=!1!==X&&!O&&!F&&!oe,[Bn,jn]=E(()=>!$n);x(()=>{if(Bn||!e)return;if(!$n||Tn)return void jn(!0);const t=Be.current,n=Fe.current;if(!t||!n)return;const r=/* @__PURE__ */new WeakSet;let o=Wn.current.w,i=0;const a=()=>jn(!0),l=()=>{i=0;const e=Wn.current;if(Math.abs(e.w-o)>1||document.body.classList.contains("rosh-gesturing"))return void a();const l=Ge(),s=l.w-80;if(e.w>=s)return void a();const c=[],d=[];for(const e of[n,...Array.from(n.querySelectorAll("*"))]){const t=e.scrollWidth-e.clientWidth;if(t<=4||r.has(e))continue;const n=getComputedStyle(e).overflowX;"auto"!==n&&"scroll"!==n||(c.push(e),d.push(t))}if(!c.length)return;const u=Math.min(s,e.w+Math.max(...d)),h=u-e.w,m=t.style.width;t.style.width=`${u}px`;const p=c.map((e,t)=>({over:d[t],residual:e.scrollWidth-e.clientWidth}));t.style.width=m,p.forEach((e,t)=>{Ze(e,h)||r.add(c[t])});const w=function(e,t,n,r){const o=Math.min(t,n.w-2*r);if(o<=e.w+1)return e;const i=n.x+r,a=n.x+n.w-r-o,l=Math.min(Math.max(e.x-(o-e.w)/2,i),a);return{...e,x:Math.round(l),w:Math.round(o)}}(e,function(e,t,n){let r=e;for(const o of n)Ze(o,t)&&(r=Math.max(r,e+o.over));return Math.ceil(r)}(e.w,h,p),l,ut);w!==e&&(o=w.w,hn(w))};l();const s=new MutationObserver(()=>{i||(i=requestAnimationFrame(l))});s.observe(n,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["style","class","hidden"]});const c=setTimeout(a,zt);return()=>{s.disconnect(),i&&cancelAnimationFrame(i),clearTimeout(c)}},[Bn,e,$n,Tn]),C(()=>{Sn&&(zn(!0),hn(Zt()))},[Sn,Zt]),C(()=>{if(O)return;const e=()=>{zn(!1),hn(en())};return window.addEventListener("react-os-shell:restore-windowed",e),()=>window.removeEventListener("react-os-shell:restore-windowed",e)},[O,en]),C(()=>{e&&ln&&(vt[ln]=un,xt()),e&&window.dispatchEvent(new CustomEvent("modal-geometry"))},[un,e,ln]),C(()=>{if(!e)return;const t=()=>{Tn?hn(Zt()):document.body.classList.contains("rosh-gesturing")||hn(rn)};window.addEventListener("resize",t);let n=null;return Tn&&(n=new MutationObserver(t),n.observe(document.body,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["class"]})),()=>{window.removeEventListener("resize",t),n?.disconnect()}},[e,Tn,Zt]),C(()=>{if(e){if(xe(!1),ke.current=!1,Re.current=!1,jn(!$n),ln&&vt[ln]){const e=vt[ln];return void hn(t=>rn({...e,...Y?{h:t.h}:{},...$n?{x:t.x,w:t.w}:{}}))}z&&(hn({x:z.x,y:z.y,w:z.w,h:z.h}),zn(z.maximized))}},[e]),C(()=>{if(!e||"auto"!==s)return;let t;const n=e=>{Be.current?.contains(e.target)&&!ke.current&&(ke.current=!0,t=setTimeout(()=>xe(!0),0))};return document.addEventListener("input",n,!0),document.addEventListener("change",n,!0),()=>{clearTimeout(t),document.removeEventListener("input",n,!0),document.removeEventListener("change",n,!0)}},[e,s]);const Hn="auto"===s?be:!0===s;ye(!(G||!e)&&Hn);const On=M(async()=>{if(!Re.current){if(Hn||"auto"===s&&ke.current){Re.current=!0;const e=ge,t=await w({title:"Discard changes?",message:e?`“${e}” has unsaved changes. Are you sure you want to close? All changes will be lost.`:"You have unsaved changes. Are you sure you want to close? All changes will be lost.",confirmLabel:"Discard",cancelLabel:"Keep Editing",variant:"warning"});if(Re.current=!1,!t)return}t()}},[Hn,s,t,ge]);x(()=>{if(!e||!G)return;const t=e=>{e.detail?.windowKey===G&&On()};return window.addEventListener(xn,t),()=>window.removeEventListener(xn,t)},[e,G,On]);const Vn=k(null),Fn=M(e=>{if(0!==e.button)return;if(e.target.closest("button, input, a, kbd, select, textarea"))return;if(Le(null),Ut(yt),Sn)return void e.preventDefault();e.preventDefault();const t=e.currentTarget,n=e.pointerId;let r=null;const o=e.clientX,i=e.clientY,a=Be.current,l=a?.getBoundingClientRect();let s,c,d,u;if(Vn.current){const t=Vn.current;Vn.current=null,u=t.w,d=t.h;const n=l?Math.min(Math.max(20,e.clientX-l.left),t.w-20):t.w/2;s=e.clientX-n,c=e.clientY-12,a&&(a.style.width=`${u}px`,a.style.height=`${d}px`,a.style.left=`${s}px`,a.style.top=`${c}px`)}else s=l?l.left:Wn.current.x,c=l?l.top:Wn.current.y,d=l?l.height:Wn.current.h,u=l?l.width:Wn.current.w;zn(!1),hn(e=>({...e,x:s,y:c,w:u,h:d}));let h=null;const m=e=>{if(!r){if(Math.abs(e.clientX-o)<fn&&Math.abs(e.clientY-i)<fn)return;r=yn(t,n,"move","move"),a&&(a.style.transition="none")}const l=s+e.clientX-o,d=Math.max(0,c+e.clientY-i);if(a&&(a.style.transform=`translate(${l-s}px, ${d-c}px)`),Wn.current={...Wn.current,x:l,y:d},!O){const t=function(e,t){const n=Qt(),r=e<=n.x+Jt,o=e>=n.x+n.w-Jt,i=t<=n.y+Jt,a=t>=n.y+n.h-Jt,l=e<=n.x+Gt,s=e>=n.x+n.w-Gt,c=t<=n.y+Gt,d=t>=n.y+n.h-Gt;return i&&l?"tl":i&&s?"tr":a&&l?"bl":a&&s?"br":c&&r?"tl":c&&o?"tr":d&&r?"bl":d&&o?"br":i?"top":r?"left":o?"right":null}(e.clientX,e.clientY);t!==h&&(h=t,t?sn(an(t)):cn())}},p=()=>{window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",p),r?.(),cn();const e=rn({...Wn.current});if(Wn.current=e,!O&&h){Vn.current={x:s,y:c,w:u,h:d};const e=an(h);return a&&(a.style.left=`${e.x}px`,a.style.top=`${e.y}px`,a.style.width=`${e.w}px`,a.style.height=`${e.h}px`,a.style.transform="",a.style.transition=""),void hn(e)}if(O){const t=e.x+e.w/2,n=window.innerWidth/2;Ke(t>n?"right":"left")}a&&(a.style.left=`${e.x}px`,a.style.top=`${e.y}px`,a.style.transform="",a.style.transition=""),hn(e)};window.addEventListener("pointermove",m),window.addEventListener("pointerup",p)},[]),qn=M((e,t)=>{if(0!==e.button)return;e.preventDefault(),e.stopPropagation();const n=e.currentTarget,r=e.pointerId;let o=null;const i=e.clientX,a=e.clientY,l=Be.current,s=l?.getBoundingClientRect(),c=s?s.left:Wn.current.x,d=s?s.top:Wn.current.y,u=s?s.width:Wn.current.w,h=s?s.height:Wn.current.h,m="sw"===t||"nw"===t||"w"===t,p="ne"===t||"nw"===t||"n"===t,w="se"===t||"ne"===t||"e"===t,f="se"===t||"sw"===t||"s"===t;zn(!1),hn({x:c,y:d,w:u,h:h}),Wn.current={x:c,y:d,w:u,h:h};let y=0,g=null;const v=()=>{if(y=0,!g)return;const e=g;g=null,Wn.current=e,l&&(l.style.left=`${e.x}px`,l.style.top=`${e.y}px`,l.style.width=`${e.w}px`,l.style.height=`${e.h}px`)},b=e=>{if(!o){if(Math.abs(e.clientX-i)<fn&&Math.abs(e.clientY-a)<fn)return;o=yn(n,r,wn[t],"resize")}g=((e,t)=>{let n=c,r=d,o=u,i=h;if(w&&(o=Math.max(tn,u+e)),f&&(i=Math.max(nn,h+t)),m){const t=Math.max(tn,u-e);n=c+u-t,o=t}if(p){const e=Math.max(nn,h-t);r=d+h-e,i=e}return{x:n,y:r,w:o,h:i}})(e.clientX-i,e.clientY-a),y||(y=requestAnimationFrame(v))},x=()=>{window.removeEventListener("pointermove",b),window.removeEventListener("pointerup",x),y&&cancelAnimationFrame(y),v(),o?.(),hn({...Wn.current})};window.addEventListener("pointermove",b),window.addEventListener("pointerup",x)},[]),Yn=M(e=>{if(e.target.closest("button, input, a, kbd, select, textarea"))return;const t={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]}[e.key];if(!t&&"Enter"!==e.key)return;if(e.preventDefault(),e.stopPropagation(),Ut(yt),"Enter"===e.key)return void(Tn?(zn(!1),hn(en())):(zn(!0),hn(Zt())));const[n,r]=t;if(e.ctrlKey||e.metaKey){const e=()=>{Vn.current||(Vn.current={...Wn.current})};if(r<0)return e(),zn(!0),void hn(Zt());if(r>0){if(Tn)return zn(!1),void hn(en());if(Vn.current){const e=rn(Vn.current);return Vn.current=null,Wn.current=e,void hn(e)}return void Xt(yt)}e(),zn(!1);const t=an(n<0?"left":"right");return Wn.current=t,void hn(t)}if(Tn)return;const o=Wn.current,i=e.shiftKey?{...o,w:Math.max(tn,o.w+24*n),h:Math.max(nn,o.h+24*r)}:rn({...o,x:o.x+24*n,y:Math.max(0,o.y+24*r)});Wn.current=i,hn(i)},[yt,Tn,en,Zt]),Un=M(e=>{Vn.current||(Vn.current={...Wn.current}),zn(!1);const t=an(e);Wn.current=t,hn(t),Ut(yt)},[yt]),Xn=Sn||St?{}:{tabIndex:0,role:"group","aria-label":ge?`${ge} — ${fe.windowSuffix}`:fe.windowSuffix,"aria-keyshortcuts":"ArrowUp ArrowDown ArrowLeft ArrowRight Shift+ArrowUp Shift+ArrowDown Shift+ArrowLeft Shift+ArrowRight Control+ArrowUp Control+ArrowDown Control+ArrowLeft Control+ArrowRight Enter",onKeyDown:Yn},_n=()=>{zn(!0),hn(Zt())},Jn=M(()=>{const e=Be.current;if(!e)return;const t=e.querySelector("form");if(t)t.requestSubmit();else{const t=e.querySelector(it);t&&!t.disabled&&t.click()}},[]);C(()=>{if(!e)return;const t=e=>{if(Dt[Dt.length-1]===yt&&"Enter"===e.key){const t=e.target;if("TEXTAREA"===t.tagName||t.isContentEditable)return;if(e.metaKey||e.ctrlKey)e.preventDefault(),Jn();else{if("INPUT"===t.tagName&&t.closest("form"))return;e.preventDefault()}}};return window.addEventListener("keydown",t,!0),()=>window.removeEventListener("keydown",t,!0)},[e,Jn,yt]),C(()=>{if(!e)return;const t=e=>{Dt[Dt.length-1]===yt&&((e.metaKey||e.ctrlKey)&&"s"===e.key?(e.preventDefault(),document.dispatchEvent(new CustomEvent("modal-save",{detail:{modalId:yt}})),ke.current=!1,xe(!1)):e.altKey&&e.shiftKey&&("KeyD"===e.code||"D"===e.key||"d"===e.key)&&(e.preventDefault(),document.dispatchEvent(new CustomEvent("modal-duplicate",{detail:{modalId:yt}}))))};return window.addEventListener("keydown",t,!0),()=>window.removeEventListener("keydown",t,!0)},[e]),C(()=>{if(!e)return;if(O)return;const t=e=>{if("Escape"===e.key&&Dt[Dt.length-1]===yt){if(f(e))return e.preventDefault(),void e.stopPropagation();e.preventDefault(),e.stopPropagation(),On()}};return window.addEventListener("keydown",t,!0),()=>window.removeEventListener("keydown",t,!0)},[e,On,yt,O]);const Gn=e&&(void 0!==c||void 0!==m),Qn=M(e=>{const t=document.getElementById("nav-boundary-toast");t&&t.remove();const n="bottom"===e?["That's the last one, chief.","You've hit rock bottom... of the list.","End of the line, buddy.","Nothing left. Go outside.","Congratulations, you scrolled to the void.","There's no more. I checked.","You've reached the edge of the known universe.","Plot twist: there is no next one.","Even scrolling has limits. Unlike your ambition.","Last one. Time to touch grass."]:["Already at the top. Overachiever.","There is no item above this. Trust me.","You're #1. Literally.","Can't go higher. You've peaked.","This is it. The summit. The top.","First item. No VIP lounge above this.","Going up? Nope. Elevator's broken.","You want negative indexes? Bold.","Top of the list. Top of the world.","The only way is down from here."],r=n[Math.floor(Math.random()*n.length)],o=document.createElement("div");o.id="nav-boundary-toast",o.className="fixed bottom-6 left-1/2 -translate-x-1/2 z-[9999] bg-gray-900 text-white px-5 py-2.5 rounded-lg shadow-lg text-sm font-medium transition-opacity duration-300",o.textContent=r,document.body.appendChild(o),setTimeout(()=>{o.style.opacity="0",setTimeout(()=>o.remove(),300)},2e3)},[]);if(C(()=>{if(!e)return;const t=e=>{if(Dt[Dt.length-1]!==yt)return;const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.target.isContentEditable||("j"===e.key&&Gn&&(e.preventDefault(),c?c():Qn("bottom")),"k"===e.key&&Gn&&(e.preventDefault(),m?m():Qn("top"))))};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,c,m,Gn,Qn,yt]),!e||on.current)return null;const Zn=St?function(e){if("undefined"==typeof document)return null;const t=Array.from(document.querySelectorAll("[data-modal-panel]")).filter(e=>{const t=e;return!t.hasAttribute("data-utility")&&!t.hasAttribute("data-widget")&&"none"!==t.style.display});t.sort((e,t)=>(e.getAttribute("data-modal-id")||"").localeCompare(t.getAttribute("data-modal-id")||""));const n=t.findIndex(t=>t.getAttribute("data-modal-id")===e),r=t.length;if(n<0||r<1)return null;const o=Math.ceil(Math.sqrt(r)),i=Math.ceil(r/o),a=Math.floor(n/o),l=n%o,s=r-o*(i-1),c=a===i-1&&s<o,d=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-height"))||0,u=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-width"))||0,h=(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-position")||"bottom").trim(),m="left"===h?u:0,p="right"===h?u:0,w="top"===h?d:0,f="top"===h||"left"===h||"right"===h?0:d,y=m,g=w,v=(window.innerWidth-m-p-20*(o+1))/o,b=(window.innerHeight-w-f-14*(i+1)-22*i)/i;return{x:y+20+l*(v+20)+(c?(o-s)*(v+20)/2:0),y:g+14+a*(b+14+22),w:v,h:b}}(yt):null,er=St&&Zn?Math.min(Zn.w/un.w,Zn.h/un.h):1,tr=(()=>{if(St&&Zn){const e=er,t=un.w*e,n=un.h*e,r=Zn.x+(Zn.w-t)/2-un.x,o=Zn.y+(Zn.h-n)/2-un.y,i=Tt||Kt;return{transform:`translate(${r}px, ${o}px) scale(${e})`,transformOrigin:"top left",transition:"transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 280ms",cursor:"pointer",zIndex:i?2020:2010,boxShadow:i?"0 24px 72px rgba(0,0,0,0.6), 0 0 0 2px rgba(255,255,255,0.55), 0 0 36px 12px rgba(96,165,250,0.85), 0 0 96px 28px rgba(96,165,250,0.55)":"0 16px 48px rgba(0,0,0,0.55)",pointerEvents:"auto"}}if(Rt&&Nt){const e="picked"===Vt;return{transition:e?"transform 640ms cubic-bezier(0.34, 1.42, 0.64, 1), box-shadow 600ms":"transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 600ms",...e?{zIndex:2030}:{}}}return null})(),nr=/* @__PURE__ */I("div",{children:[
54
+ /* @__PURE__ */I("div",{ref:Be,"data-modal-panel":!0,"data-modal-id":yt,"data-window-key":G||void 0,...j?{"data-utility":""}:{},...Ce?{"data-pinned-top":""}:{},...O?{"data-widget":""}:{},className:"fixed rounded-2xl flex flex-col overflow-hidden "+(O?kt?"shadow-2xl":"shadow-lg":"border "+(kt?"shadow-2xl border-gray-200":"shadow-lg border-gray-300")),onMouseDownCapture:e=>{if(Ve.current=!1,St){if(e.target.closest("[data-expose-close]"))return;return e.preventDefault(),e.stopPropagation(),Dn(yt),Nn(!1),void Ut(yt)}if(!kt&&!O&&!Ce&&0===e.button){const t=e.target;t.closest("[data-modal-panel]")===Be.current&&t.closest("button, input, a, select, textarea")&&!t.closest("[data-window-chrome]")&&(e.preventDefault(),e.stopPropagation(),Ve.current=!0,Le(null),Ut(yt),window.addEventListener("mouseup",()=>{setTimeout(()=>{Ve.current=!1},0)},{once:!0}))}},onClickCapture:e=>{Ve.current&&(Ve.current=!1,e.preventDefault(),e.stopPropagation())},onMouseDown:e=>{if(St)return;Le(null);e.target.closest("[data-modal-panel]")===Be.current&&(e.target.closest("button, input, a, select, textarea")||Ut(yt))},style:oe?{zIndex:gt+1,top:0,left:0,right:0,bottom:"var(--mobile-bottom-nav, 56px)",width:"auto",height:"auto",transform:`translateX(${ie}px)`,transition:le?"none":"transform 180ms ease-out",...O?{display:"none"}:{},...gt<0?{display:"none"}:{},...kt||Ce||he&&G===he?{}:{display:"none"}}:{zIndex:Ce?p.pinnedWindow:gt+1,width:un.w,height:un.h,top:un.y,...O&&"right"===$e?{right:window.innerWidth-un.x-un.w}:{left:un.x},...gt<0&&!Ce?{display:"none"}:{},...tr??{}},children:[oe&&!O&&/* @__PURE__ */D("div",{onPointerDown:ue,className:"absolute top-0 bottom-0 left-0 w-[22px] z-[5]",style:{touchAction:"pan-y"},"aria-hidden":"true"}),O||oe?null:
55
55
  /* @__PURE__ */I("div",V?{onPointerDown:Fn,"data-window-chrome":"",...Xn,className:"flex items-center justify-between px-3 py-1.5 border-b border-gray-200 shrink-0 cursor-move select-none rounded-t-2xl focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400 "+(kt?"backdrop-blur-sm":""),style:{touchAction:"none",backgroundColor:kt?"rgb(var(--window-header-rgb) / var(--active-header-opacity, 0.8))":"rgb(var(--window-header-rgb) / var(--inactive-header-opacity, 0.7))"},children:[
56
56
  /* @__PURE__ */I("div",{"data-window-title":!0,title:ge,className:"text-sm font-medium min-w-0 flex-1 truncate flex items-center gap-1.5",style:{color:kt?"var(--window-title-active, rgb(17 24 39))":"var(--window-title-inactive, rgb(156 163 175))"},children:[!St&&dt(),
57
57
  /* @__PURE__ */D("span",{className:"truncate",children:St?at(me):me})]}),!St&&/* @__PURE__ */I("div",{className:"flex items-center gap-1 shrink-0 ml-2",children:[j&&/* @__PURE__ */D("button",{onClick:()=>Ee(e=>!e),title:Ce?fe.unpin:fe.pinOnTop,className:"p-0.5 rounded hover:bg-gray-200 "+(Ce?"text-blue-600":"text-gray-400 hover:text-gray-600"),children:/* @__PURE__ */D("svg",{className:"h-3 w-3",fill:Ce?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 3.75V16.5L12 14.25 7.5 16.5V3.75m9 0H18A2.25 2.25 0 0120.25 6v12A2.25 2.25 0 0118 20.25H6A2.25 2.25 0 013.75 18V6A2.25 2.25 0 016 3.75h1.5m9 0h-9"})})}),
58
- /* @__PURE__ */D("button",{type:"button",onClick:Hn,className:"rounded p-0.5 text-gray-400 hover:text-gray-600 hover:bg-gray-200",children:/* @__PURE__ */D(K,{className:"h-4 w-4"})})]})]}:F?{onPointerDown:Fn,"data-window-chrome":"",...Xn,className:"flex items-center justify-between px-3 py-1.5 border-b border-gray-200 shrink-0 cursor-move select-none rounded-t-2xl focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400 "+(kt?"backdrop-blur-sm":""),style:{touchAction:"none",backgroundColor:kt?"rgb(var(--window-header-rgb) / var(--active-header-opacity, 0.8))":"rgb(var(--window-header-rgb) / var(--inactive-header-opacity, 0.7))"},children:[
58
+ /* @__PURE__ */D("button",{type:"button",onClick:On,className:"rounded p-0.5 text-gray-400 hover:text-gray-600 hover:bg-gray-200",children:/* @__PURE__ */D(K,{className:"h-4 w-4"})})]})]}:F?{onPointerDown:Fn,"data-window-chrome":"",...Xn,className:"flex items-center justify-between px-3 py-1.5 border-b border-gray-200 shrink-0 cursor-move select-none rounded-t-2xl focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400 "+(kt?"backdrop-blur-sm":""),style:{touchAction:"none",backgroundColor:kt?"rgb(var(--window-header-rgb) / var(--active-header-opacity, 0.8))":"rgb(var(--window-header-rgb) / var(--inactive-header-opacity, 0.7))"},children:[
59
59
  /* @__PURE__ */I("div",{"data-window-title":!0,title:ge,className:"text-sm font-medium min-w-0 flex-1 truncate flex items-center gap-1.5",style:{color:kt?"var(--window-title-active, rgb(17 24 39))":"var(--window-title-inactive, rgb(156 163 175))"},children:[!St&&dt(),
60
60
  /* @__PURE__ */D("span",{className:"truncate",children:St?at(me):me})]}),!St&&/* @__PURE__ */I("div",{className:"flex items-center gap-0.5 shrink-0 ml-2",children:[j&&/* @__PURE__ */D("button",{onClick:()=>Ee(e=>!e),title:Ce?fe.unpin:fe.pinOnTop,className:"p-0.5 rounded hover:bg-gray-200 "+(Ce?"text-blue-600":"text-gray-400 hover:text-gray-600"),children:/* @__PURE__ */D("svg",{className:"h-3 w-3",fill:Ce?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 3.75V16.5L12 14.25 7.5 16.5V3.75m9 0H18A2.25 2.25 0 0120.25 6v12A2.25 2.25 0 0118 20.25H6A2.25 2.25 0 013.75 18V6A2.25 2.25 0 016 3.75h1.5m9 0h-9"})})}),
61
61
  /* @__PURE__ */D("button",{onClick:()=>Xt(yt),title:fe.minimize,className:"text-gray-400 hover:text-gray-600 px-1 py-0.5 rounded hover:bg-gray-200 text-xs leading-none",children:"─"}),!Sn&&/* @__PURE__ */D(mn,{maximized:Tn,onToggleMax:()=>{Tn?(zn(!1),hn(en())):_n()},onSnap:Un,buttonClassName:"text-gray-400 hover:text-gray-600 px-1 py-0.5 rounded hover:bg-gray-200 text-xs leading-none",strings:fe}),
62
- /* @__PURE__ */D("button",{type:"button",onClick:Hn,className:"rounded p-0.5 text-gray-400 hover:text-gray-600 hover:bg-gray-200",children:/* @__PURE__ */D(K,{className:"h-4 w-4"})})]})]}:{onPointerDown:Fn,"data-window-chrome":"",...Xn,className:"flex items-center justify-between px-4 py-2.5 border-b border-gray-200 shrink-0 cursor-move select-none rounded-t-2xl focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400 "+(kt?"backdrop-blur-sm":""),style:{touchAction:"none",backgroundColor:kt?"rgb(var(--window-header-rgb) / var(--active-header-opacity, 0.8))":"rgb(var(--window-header-rgb) / var(--inactive-header-opacity, 0.7))"},children:[
62
+ /* @__PURE__ */D("button",{type:"button",onClick:On,className:"rounded p-0.5 text-gray-400 hover:text-gray-600 hover:bg-gray-200",children:/* @__PURE__ */D(K,{className:"h-4 w-4"})})]})]}:{onPointerDown:Fn,"data-window-chrome":"",...Xn,className:"flex items-center justify-between px-4 py-2.5 border-b border-gray-200 shrink-0 cursor-move select-none rounded-t-2xl focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400 "+(kt?"backdrop-blur-sm":""),style:{touchAction:"none",backgroundColor:kt?"rgb(var(--window-header-rgb) / var(--active-header-opacity, 0.8))":"rgb(var(--window-header-rgb) / var(--inactive-header-opacity, 0.7))"},children:[
63
63
  /* @__PURE__ */I("div",{"data-window-title":!0,title:ge,className:"text-base font-medium min-w-0 flex-1 truncate flex items-center gap-2",style:{color:kt?"var(--window-title-active, rgb(17 24 39))":"var(--window-title-inactive, rgb(156 163 175))"},children:[!St&&dt(),
64
64
  /* @__PURE__ */D("span",{className:"truncate",children:St?at(me):me})]}),!St&&/* @__PURE__ */I("div",{className:"flex items-center gap-1.5 shrink-0 ml-4",children:[Gn&&/* @__PURE__ */I("span",{className:"flex items-center gap-1 mr-1 text-[10px] text-gray-400",children:[
65
65
  /* @__PURE__ */D("kbd",{className:"rounded border border-gray-300 bg-gray-200 px-1.5 py-0.5 font-medium text-gray-500",children:"K"}),
@@ -68,20 +68,20 @@ return I("span",{className:"relative inline-flex",onMouseEnter:c,onMouseLeave:d,
68
68
  /* @__PURE__ */D("span",{children:fe.next})]}),j&&/* @__PURE__ */D("button",{onClick:()=>Ee(e=>!e),title:Ce?fe.unpin:fe.pinOnTop,className:"text-xs px-2 py-1 rounded hover:bg-gray-200 "+(Ce?"text-blue-600":"text-gray-400 hover:text-gray-600"),children:/* @__PURE__ */D("svg",{className:"h-3.5 w-3.5",fill:Ce?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 3.75V16.5L12 14.25 7.5 16.5V3.75m9 0H18A2.25 2.25 0 0120.25 6v12A2.25 2.25 0 0118 20.25H6A2.25 2.25 0 013.75 18V6A2.25 2.25 0 016 3.75h1.5m9 0h-9"})})}),
69
69
  /* @__PURE__ */D("button",{onClick:()=>Xt(yt),title:fe.minimize,className:"text-gray-400 hover:text-gray-600 text-xs px-2 py-1 rounded hover:bg-gray-200",children:"─"}),!Sn&&/* @__PURE__ */D(mn,{maximized:Tn,onToggleMax:()=>{Tn?(zn(!1),hn(en())):_n()},onSnap:Un,buttonClassName:"text-gray-400 hover:text-gray-600 text-xs px-2 py-1 rounded hover:bg-gray-200",strings:fe}),
70
70
  /* @__PURE__ */D("kbd",{className:"rounded border border-gray-300 bg-gray-200 px-1.5 py-0.5 text-[10px] font-medium text-gray-400",children:"ESC"}),
71
- /* @__PURE__ */D("button",{type:"button",onClick:Hn,className:"rounded-md text-gray-400 hover:text-gray-600",children:/* @__PURE__ */D(K,{className:"h-5 w-5"})})]})]}),ne&&Ae&&!H&&!oe&&/* @__PURE__ */D("div",{"aria-hidden":"true",className:"h-[3px] shrink-0 pointer-events-none",style:{backgroundColor:`rgb(var(--window-accent-rgb) / ${kt?.9:.55})`}}),
72
- /* @__PURE__ */D(tt.Provider,{value:yt,children:/* @__PURE__ */D(mt.Provider,{value:{rightRef:qe,leftRef:Ye,notify:()=>Xe(!0),active:kt,isDirty:On,footerOpen:Je&&!H&&!V&&!F&&!oe},children:/* @__PURE__ */D("div",{ref:Fe,...H?{onPointerDown:Fn,onContextMenu:e=>{e.preventDefault(),We({x:e.clientX,y:e.clientY})}}:{},className:`flex-1 min-h-0 flex flex-col ${H?"p-0 cursor-move":F||q?"p-0":V?"p-2":"p-4"} ${H?"":"backdrop-blur-sm"} ${!1===v||F||q?"overflow-hidden":"overflow-y-auto overscroll-contain"} ${H?"rounded-2xl select-none":""}`,style:{...H?{touchAction:"none"}:{},backgroundColor:H?"transparent":kt?"rgb(var(--window-content-rgb) / var(--active-content-opacity, 0.9))":"rgb(var(--window-content-rgb) / var(--inactive-content-opacity, 0.8))"},children:/* @__PURE__ */D(Q,{children:re})})})}),H&&De&&/* @__PURE__ */I(d,{minWidth:160,style:{left:De.x,top:De.y},onClose:()=>We(null),children:[
71
+ /* @__PURE__ */D("button",{type:"button",onClick:On,className:"rounded-md text-gray-400 hover:text-gray-600",children:/* @__PURE__ */D(K,{className:"h-5 w-5"})})]})]}),ne&&Ae&&!O&&!oe&&/* @__PURE__ */D("div",{"aria-hidden":"true",className:"h-[3px] shrink-0 pointer-events-none",style:{backgroundColor:`rgb(var(--window-accent-rgb) / ${kt?.9:.55})`}}),
72
+ /* @__PURE__ */D(tt.Provider,{value:yt,children:/* @__PURE__ */D(mt.Provider,{value:{rightRef:qe,leftRef:Ye,notify:()=>Xe(!0),active:kt,isDirty:Hn,footerOpen:Je&&!O&&!V&&!F&&!oe},children:/* @__PURE__ */D("div",{ref:Fe,...O?{onPointerDown:Fn,onContextMenu:e=>{e.preventDefault(),We({x:e.clientX,y:e.clientY})}}:{},className:`flex-1 min-h-0 flex flex-col ${O?"p-0 cursor-move":F||q?"p-0":V?"p-2":"p-4"} ${O?"":"backdrop-blur-sm"} ${!1===v||F||q?"overflow-hidden":"overflow-y-auto overscroll-contain"} ${O?"rounded-2xl select-none":""}`,style:{...O?{touchAction:"none"}:{},backgroundColor:O?"transparent":kt?"rgb(var(--window-content-rgb) / var(--active-content-opacity, 0.9))":"rgb(var(--window-content-rgb) / var(--inactive-content-opacity, 0.8))"},children:/* @__PURE__ */D(Q,{children:re})})})}),O&&De&&/* @__PURE__ */I(d,{minWidth:160,style:{left:De.x,top:De.y},onClose:()=>We(null),children:[
73
73
  /* @__PURE__ */D(u,{onClick:()=>{We(null),window.dispatchEvent(new CustomEvent("widget-open-settings",{detail:yt}))},children:"Settings"}),
74
74
  /* @__PURE__ */D(h,{}),_&&/* @__PURE__ */I(W,{children:[_,
75
75
  /* @__PURE__ */D(h,{})]}),
76
76
  /* @__PURE__ */I(u,{onClick:()=>{We(null),Ee(e=>!e)},children:[
77
77
  /* @__PURE__ */D("span",{className:"flex-1",children:"Always on Top"}),Ce&&/* @__PURE__ */D("svg",{className:"h-4 w-4 text-blue-600 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})]}),
78
78
  /* @__PURE__ */D(h,{}),
79
- /* @__PURE__ */D(u,{onClick:()=>{We(null),Hn()},children:"Close"})]}),
80
- /* @__PURE__ */I("div",{onPointerDown:Fn,ref:_e,className:`px-4 py-2 border-t border-gray-200 shrink-0 flex items-center justify-between text-xs select-none cursor-move${kt?" backdrop-blur-sm":""}${H||V||F||oe||!Je?" hidden":""}`,style:{touchAction:"none",backgroundColor:kt?"rgb(var(--window-footer-rgb) / var(--active-header-opacity, 0.8))":"rgb(var(--window-footer-rgb) / var(--inactive-header-opacity, 0.7))"},children:[
79
+ /* @__PURE__ */D(u,{onClick:()=>{We(null),On()},children:"Close"})]}),
80
+ /* @__PURE__ */I("div",{onPointerDown:Fn,ref:_e,className:`px-4 py-2 border-t border-gray-200 shrink-0 flex items-center justify-between text-xs select-none cursor-move${kt?" backdrop-blur-sm":""}${O||V||F||oe||!Je?" hidden":""}`,style:{touchAction:"none",backgroundColor:kt?"rgb(var(--window-footer-rgb) / var(--active-header-opacity, 0.8))":"rgb(var(--window-footer-rgb) / var(--inactive-header-opacity, 0.7))"},children:[
81
81
  /* @__PURE__ */I("div",{className:"flex items-center gap-2 min-w-0",children:[ot&&/* @__PURE__ */D(te,{auto:!0}),R,
82
82
  /* @__PURE__ */D("div",{ref:Ye,"data-modal-actions-left":!0,className:"flex items-center gap-2"}),g]}),
83
83
  /* @__PURE__ */I("div",{className:"flex items-center gap-2 ml-auto",children:[
84
- /* @__PURE__ */D("div",{ref:qe,"data-modal-actions":!0,className:"flex items-center gap-2"}),P]})]}),!H&&!oe&&!St&&kt&&/* @__PURE__ */I(W,{children:[
84
+ /* @__PURE__ */D("div",{ref:qe,"data-modal-actions":!0,className:"flex items-center gap-2"}),P]})]}),!O&&!oe&&!St&&kt&&/* @__PURE__ */I(W,{children:[
85
85
  /* @__PURE__ */D("div",{onPointerDown:e=>qn(e,"se"),className:"absolute bottom-0 right-0 w-3 h-3 cursor-nwse-resize z-10"}),
86
86
  /* @__PURE__ */D("div",{onPointerDown:e=>qn(e,"sw"),className:"absolute bottom-0 left-0 w-3 h-3 cursor-nesw-resize z-10"}),
87
87
  /* @__PURE__ */D("div",{onPointerDown:e=>qn(e,"ne"),className:"absolute top-0 right-0 w-3 h-3 cursor-nesw-resize z-10"}),
@@ -89,7 +89,7 @@ return I("span",{className:"relative inline-flex",onMouseEnter:c,onMouseLeave:d,
89
89
  /* @__PURE__ */D("div",{onPointerDown:e=>qn(e,"n"),className:"absolute top-0 left-3 right-3 h-1 cursor-ns-resize"}),
90
90
  /* @__PURE__ */D("div",{onPointerDown:e=>qn(e,"s"),className:"absolute bottom-0 left-3 right-3 h-1 cursor-ns-resize"}),
91
91
  /* @__PURE__ */D("div",{onPointerDown:e=>qn(e,"e"),className:"absolute top-3 bottom-3 right-0 w-1 cursor-ew-resize"}),
92
- /* @__PURE__ */D("div",{onPointerDown:e=>qn(e,"w"),className:"absolute top-3 bottom-3 left-0 w-1 cursor-ew-resize"})]}),St&&/* @__PURE__ */D("div",{className:"absolute inset-0",style:{zIndex:9999,cursor:"pointer",background:"transparent"},onMouseEnter:()=>Wt(!0),onMouseLeave:()=>Wt(!1),onMouseDown:e=>{e.stopPropagation(),e.preventDefault(),Ut(yt),Nn(!1)},onClick:e=>{e.stopPropagation(),e.preventDefault()},children:Tt&&/* @__PURE__ */D("button",{type:"button","data-expose-close":!0,"aria-label":we.taskbar.closeWindow,title:"Close",className:"absolute flex items-center justify-center rounded-full bg-black/55 text-white shadow-lg ring-1 ring-white/40 transition-colors hover:bg-red-500",style:{top:8,right:8,width:30,height:30,transform:`scale(${1/er})`,transformOrigin:"top right",zIndex:1e4},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onClick:e=>{e.stopPropagation(),e.preventDefault(),Hn()},children:/* @__PURE__ */D("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.2,children:/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})})]}),St&&Zn&&/* @__PURE__ */D("div",{className:"fixed pointer-events-none select-none truncate text-center",style:{left:Zn.x,top:Zn.y+Zn.h+4,width:Zn.w,zIndex:Tt?2021:2011,color:"white",fontSize:12,fontWeight:500,textShadow:"0 1px 2px rgba(0,0,0,0.6)"},children:at(me)})]}),rr=Me&&/* @__PURE__ */I(d,{style:{left:Me.x,top:Me.y},onClose:()=>Le(null),minWidth:160,children:[!H&&!V&&/* @__PURE__ */I(W,{children:[
92
+ /* @__PURE__ */D("div",{onPointerDown:e=>qn(e,"w"),className:"absolute top-3 bottom-3 left-0 w-1 cursor-ew-resize"})]}),St&&/* @__PURE__ */D("div",{className:"absolute inset-0",style:{zIndex:9999,cursor:"pointer",background:"transparent"},onMouseEnter:()=>Wt(!0),onMouseLeave:()=>Wt(!1),onMouseDown:e=>{e.stopPropagation(),e.preventDefault(),Ut(yt),Nn(!1)},onClick:e=>{e.stopPropagation(),e.preventDefault()},children:Tt&&/* @__PURE__ */D("button",{type:"button","data-expose-close":!0,"aria-label":we.taskbar.closeWindow,title:"Close",className:"absolute flex items-center justify-center rounded-full bg-black/55 text-white shadow-lg ring-1 ring-white/40 transition-colors hover:bg-red-500",style:{top:8,right:8,width:30,height:30,transform:`scale(${1/er})`,transformOrigin:"top right",zIndex:1e4},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onClick:e=>{e.stopPropagation(),e.preventDefault(),On()},children:/* @__PURE__ */D("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.2,children:/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})})]}),St&&Zn&&/* @__PURE__ */D("div",{className:"fixed pointer-events-none select-none truncate text-center",style:{left:Zn.x,top:Zn.y+Zn.h+4,width:Zn.w,zIndex:Tt?2021:2011,color:"white",fontSize:12,fontWeight:500,textShadow:"0 1px 2px rgba(0,0,0,0.6)"},children:at(me)})]}),rr=Me&&/* @__PURE__ */I(d,{style:{left:Me.x,top:Me.y},onClose:()=>Le(null),minWidth:160,children:[!O&&!V&&/* @__PURE__ */I(W,{children:[
93
93
  /* @__PURE__ */I(u,{onClick:()=>{Xt(yt),Le(null)},children:[
94
94
  /* @__PURE__ */D("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 12h-15"})}),fe.minimize]}),!Sn&&/* @__PURE__ */I(u,Tn?{onClick:()=>{zn(!1),hn(en()),Le(null)},children:[
95
95
  /* @__PURE__ */D("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 4.5v15m6-15v15M4.5 9h15M4.5 15h15"})}),fe.windowed]}:{onClick:()=>{_n(),Le(null)},children:[
@@ -97,10 +97,10 @@ return I("span",{className:"relative inline-flex",onMouseEnter:c,onMouseLeave:d,
97
97
  /* @__PURE__ */D("svg",{className:"h-4 w-4 "+(Ce?"text-blue-600":"text-gray-400"),fill:Ce?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 3.75V16.5L12 14.25 7.5 16.5V3.75m9 0H18A2.25 2.25 0 0120.25 6v12A2.25 2.25 0 0118 20.25H6A2.25 2.25 0 013.75 18V6A2.25 2.25 0 016 3.75h1.5m9 0h-9"})}),Ce?fe.unpin:fe.pinOnTop]}),Ne&&/* @__PURE__ */I(u,{onClick:()=>{Le(null),Ie()},children:[
98
98
  /* @__PURE__ */D("svg",{className:"h-4 w-4 "+(Pe?"text-yellow-500":"text-gray-400"),fill:Pe?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */D("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"})}),Pe?we.taskbar.removeFromDesktop:we.taskbar.addToDesktop]}),(st[yt]||[]).length>0&&/* @__PURE__ */D(W,{children:(st[yt]||[]).map((e,t)=>/* @__PURE__ */I(u,{onClick:()=>{Le(null),e.onClick()},children:[e.icon,e.label]},t))}),
99
99
  /* @__PURE__ */D(h,{}),
100
- /* @__PURE__ */I(u,{danger:!0,onClick:()=>{Le(null),Hn()},children:[
101
- /* @__PURE__ */D(K,{className:"h-4 w-4"}),fe.close]})]}),or=!!G&&ft.some(e=>e.id===G),ir=!Ct||or||H?null:/* @__PURE__ */I("div",{"data-modal-restore-tab":!0,"data-modal-id":yt,className:"fixed left-1/2 z-[1200] flex -translate-x-1/2 items-center gap-1 rounded-lg border border-gray-300 bg-white px-1.5 py-1 shadow-lg",style:{bottom:"calc(var(--taskbar-height, 0px) + 12px)"},children:[
100
+ /* @__PURE__ */I(u,{danger:!0,onClick:()=>{Le(null),On()},children:[
101
+ /* @__PURE__ */D(K,{className:"h-4 w-4"}),fe.close]})]}),or=!!G&&ft.some(e=>e.id===G),ir=!Ct||or||O?null:/* @__PURE__ */I("div",{"data-modal-restore-tab":!0,"data-modal-id":yt,className:"fixed left-1/2 z-[1200] flex -translate-x-1/2 items-center gap-1 rounded-lg border border-gray-300 bg-white px-1.5 py-1 shadow-lg",style:{bottom:"calc(var(--taskbar-height, 0px) + 12px)"},children:[
102
102
  /* @__PURE__ */D("button",{type:"button",onClick:()=>Ut(yt),title:fe.restore,className:"max-w-[16rem] truncate rounded px-2 py-0.5 text-sm font-medium text-gray-700 hover:bg-gray-100 hover:text-gray-900",children:ge||fe.windowSuffix}),
103
103
  /* @__PURE__ */D("button",{type:"button",onClick:()=>Ut(yt),title:fe.restore,"aria-label":fe.restore,className:"rounded px-1.5 py-0.5 text-xs leading-none text-gray-400 hover:bg-gray-100 hover:text-gray-600",children:"▴"}),
104
- /* @__PURE__ */D("button",{type:"button",onClick:()=>{Hn()},title:fe.close,"aria-label":fe.close,className:"rounded px-1.5 py-0.5 text-xs leading-none text-gray-400 hover:bg-gray-100 hover:text-gray-600",children:"✕"})]});return $(
105
- /* @__PURE__ */I(nt.Provider,{value:null,children:[nr,rr,ir]}),document.body)}"undefined"!=typeof window&&window.addEventListener("keydown",e=>{Cn&&"Escape"===e.key&&(Bn(null),Nn(!1))});var Fn=100,qn={past:[],future:[]};function Yn(e,t){switch(t.type){case"record":{const n=e.past[e.past.length-1];if(null!==t.step.coalesceKey&&n?.coalesceKey===t.step.coalesceKey)return 0===e.future.length?e:{...e,future:[]};const r=[...e.past,t.step];return{past:r.length>Fn?r.slice(r.length-Fn):r,future:[]}}case"undo":return 0===e.past.length?e:{past:e.past.slice(0,-1),future:[t.redoStep,...e.future]};case"redo":return 0===e.future.length?e:{past:[...e.past,t.undoStep],future:e.future.slice(1)};case"clear":return 0===e.past.length&&0===e.future.length?e:qn}}var Un=/* @__PURE__ */new Set(["INPUT","TEXTAREA","SELECT"]);var Xn=500,_n=250;function Jn({children:e,canEdit:t=!0,perms:n,windowId:r}){const[o,i]=A(Yn,qn),a=k(/* @__PURE__ */new Map),[s,c]=E(0),d=s>0,[u,h]=E(0),[m,p]=E(0),w=m>0,{hasAnyPerm:f}=l(),y=t&&0===u&&(!(n&&n.length>0)||f(n)),g=k(null),v=k(!1),x=M(()=>{const e={};for(const[t,n]of a.current)e[t]=n.getLast();return e},[]),L=M((e,t)=>{a.current.has(e)||c(e=>e+1),a.current.set(e,t)},[]),S=M(e=>{a.current.delete(e)&&c(e=>e-1)},[]),T=M(e=>{h(t=>t+(e?1:-1))},[]),z=M(e=>{p(t=>t+(e?1:-1))},[]),[P,W]=E(0),$=P>0,K=M(e=>{W(t=>t+(e?1:-1))},[]),R=b(Z),B=R?.claimReadOnly;C(()=>{if(B&&!y)return B(!0),()=>B(!1)},[B,y]);const j=R?.claimOwnMount;C(()=>{if(j&&$)return j(!0),()=>j(!1)},[j,$]);const O=k({last:0,count:0,tripped:!1}),H=k(!1),V=M((e,t,n)=>{if(v.current)return void(n&&function(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||"object"!=typeof t||null===e||null===t)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;try{return JSON.stringify(e)===JSON.stringify(t)}catch{return!1}}(n.prev,n.next)||(H.current=!0));if(!y||g.current)return;const r=O.current;if(r.tripped)return;const o=Date.now();if(o-r.last>_n&&(r.count=0),r.last=o,++r.count>Xn)return r.tripped=!0,void console.error(`[efficient-shell] UndoProvider: "${e}" recorded ${Xn} undo steps with no pause between them, which no user action can do. The value passed to useUndoable for this slice is almost certainly rebuilt on every render (a .map/.filter/object literal in the call) rather than held in state, so it reads as changed every time — and since recording a step re-renders the form, that is a loop. Undo recording is now off for this form to keep the tab responsive.`);g.current={values:x(),label:e,coalesceKey:t},queueMicrotask(()=>{const e=g.current;g.current=null,e&&i({type:"record",step:e})})},[y,x]),F=M(e=>{for(const[t,n]of Object.entries(e)){const e=a.current.get(t);e&&(e.setLast(n),e.apply(n))}},[]),q=M(()=>{const e=o.past[o.past.length-1];if(!e)return;const t={values:x(),label:e.label,coalesceKey:null};F(e.values),i({type:"undo",redoStep:t})},[o.past,x,F]),Y=M(()=>{const e=o.future[0];if(!e)return;const t={values:x(),label:e.label,coalesceKey:null};F(e.values),i({type:"redo",undoStep:t})},[o.future,x,F]),[U,X]=E(0),_=k(0),J=k(0),G=k(!1),Q=M(()=>{v.current=!0,H.current=!1,g.current=null,_.current+=1,J.current=_.current,X(_.current)},[]),ee=k(void 0),ne=M(e=>{void 0!==e&&(void 0!==ee.current&&e!==ee.current&&(G.current=!0),ee.current=e),Q()},[Q]);C(()=>{v.current&&U===J.current&&(v.current=!1,g.current=null,(H.current||G.current)&&i({type:"clear"}),H.current=!1,G.current=!1)},[U]);const re=M(()=>{G.current=!0,i({type:"clear"}),Q()},[Q]),oe=y&&o.past.length>0,ie=y&&o.future.length>0,ae=kn(r),le=k({undo:q,redo:Y,canUndo:oe,canRedo:ie});le.current={undo:q,redo:Y,canUndo:oe,canRedo:ie},C(()=>{if(!ae||!y)return;const e=e=>{const t=function(e){if(!e.metaKey&&!e.ctrlKey||e.altKey)return null;const t=e.key.toLowerCase(),n="z"===t?e.shiftKey?"redo":"undo":"y"!==t||!e.ctrlKey||e.metaKey||e.shiftKey?null:"redo";if(!n)return null;const r=e.target;return r?.isContentEditable||r?.tagName&&Un.has(r.tagName.toUpperCase())?null:n}(e);if(!t)return;const n=le.current;("undo"===t?n.canUndo:n.canRedo)&&(e.preventDefault(),"undo"===t?n.undo():n.redo())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[ae,y]);const se=N(()=>({register:L,unregister:S,record:V,undo:q,redo:Y,clear:re,baseline:ne,canUndo:oe,canRedo:ie,enabled:y,hasState:d,handMounted:$,claimOwnMount:K,claimReadOnly:T,declaredEditable:w,claimEditable:z,undoLabel:oe?o.past[o.past.length-1].label:null,redoLabel:ie?o.future[0].label:null}),[L,S,V,q,Y,re,ne,oe,ie,y,d,$,K,T,w,z,o.past,o.future]),ce=""!==pt(),de=b(mt)?.footerOpen??!1,ue=ce&&y&&d&&!$&&de;/* @__PURE__ */
106
- return I(Z.Provider,{value:se,children:[ue&&/* @__PURE__ */D(ft,{position:"left",quiet:!0,children:/* @__PURE__ */D(te,{auto:!0})}),e]})}function Gn(){const e=b(Z),t=M(()=>{},[]);return{undo:e?.undo??t,redo:e?.redo??t,clear:e?.clear??t,baseline:e?.baseline??t,canUndo:e?.canUndo??!1,canRedo:e?.canRedo??!1,undoLabel:e?.undoLabel??null,redoLabel:e?.redoLabel??null,enabled:e?.enabled??!1,hasState:e?.hasState??!1}}function Qn(e){const t=b(Z),n=t?.claimReadOnly,r=t?.claimEditable;C(()=>{const t=e?r:n;if(t)return t(!0),()=>t(!1)},[n,r,e])}function Zn(e,t,n){const r=b(Z),o=z(),i=k(e),a=k(t);a.current=t,C(()=>{if(r)return r.register(o,{getLast:()=>i.current,setLast:e=>{i.current=e},apply:e=>a.current(e)}),()=>r.unregister(o)},[r,o]);const{label:l,coalesceKey:s=null}=n,c=k(r);c.current=r;const d=k({label:l,coalesceKey:s});d.current={label:l,coalesceKey:s},C(()=>{const t=c.current;t&&(Object.is(e,i.current)||(t.record(d.current.label,d.current.coalesceKey,{prev:i.current,next:e}),i.current=e))},[e])}function er(e,t){const[n,r]=E(e);return Zn(n,e=>r(()=>e),t),[n,r]}export{yt as CancelButton,ht as CopyButton,ke as DocFavStar,de as EntityWindowFallback,se as EntityWindowLoading,ue as EntityWindowState,ae as LoadingSpinner,it as MODAL_SUBMIT_SELECTOR,Vn as Modal,ft as ModalActions,Je as SIDEBAR_STRIP_W,te as UndoControls,Jn as UndoProvider,q as WINDOW_REGISTRY,G as WindowCrashedFallback,Q as WindowErrorBoundary,Ke as WindowManagerProvider,dt as WindowTitle,Xe as beginWindowGesture,qt as cancelWindowFront,J as client_default,jn as commitExposeHighlight,_e as drainPerfEvents,Tn as exitExposeMode,Tt as forgetMaximizedWindowBoxes,vn as getActiveModalId,Ne as getActiveWindowRoute,Rn as getExposeHighlight,Nt as getWindowPosition,me as isDraftEntityId,pe as isDraftEntityWindow,H as isEntityEntry,O as isPageEntry,X as isShellApiClientConfigured,Ue as markMenuOpen,Ft as requestWindowFront,Bn as setExposeHighlight,Ye as setPerfCollecting,U as setShellApiClient,F as setShellWindowRegistry,Lt as setWindowDefaultPosition,St as setWindowPosition,Kn as subscribeExposeHighlight,Sn as toggleExposeMode,pt as useEnclosingModalId,kn as useIsActiveWindow,wt as useModalActive,Gn as useUndo,Qn as useUndoCanEdit,Zn as useUndoable,er as useUndoableState,lt as useWidgetSettings,ye as useWindowDirty,ve as useWindowManager,ct as useWindowMenuItem,ut as useWindowTitle};
104
+ /* @__PURE__ */D("button",{type:"button",onClick:()=>{On()},title:fe.close,"aria-label":fe.close,className:"rounded px-1.5 py-0.5 text-xs leading-none text-gray-400 hover:bg-gray-100 hover:text-gray-600",children:"✕"})]});return $(
105
+ /* @__PURE__ */I(nt.Provider,{value:null,children:[nr,rr,ir]}),document.body)}"undefined"!=typeof window&&window.addEventListener("keydown",e=>{Cn&&"Escape"===e.key&&(Bn(null),Nn(!1))});var Fn=100,qn={past:[],future:[]};function Yn(e,t){switch(t.type){case"record":{const n=e.past[e.past.length-1];if(null!==t.step.coalesceKey&&n?.coalesceKey===t.step.coalesceKey)return 0===e.future.length?e:{...e,future:[]};const r=[...e.past,t.step];return{past:r.length>Fn?r.slice(r.length-Fn):r,future:[]}}case"undo":return 0===e.past.length?e:{past:e.past.slice(0,-1),future:[t.redoStep,...e.future]};case"redo":return 0===e.future.length?e:{past:[...e.past,t.undoStep],future:e.future.slice(1)};case"clear":return 0===e.past.length&&0===e.future.length?e:qn}}var Un=/* @__PURE__ */new Set(["INPUT","TEXTAREA","SELECT"]);var Xn=500,_n=250;function Jn({children:e,canEdit:t=!0,perms:n,windowId:r}){const[o,i]=A(Yn,qn),a=k(/* @__PURE__ */new Map),[s,c]=E(0),d=s>0,[u,h]=E(0),[m,p]=E(0),w=m>0,{hasAnyPerm:f}=l(),y=t&&0===u&&(!(n&&n.length>0)||f(n)),g=k(null),v=k(!1),x=M(()=>{const e={};for(const[t,n]of a.current)e[t]=n.getLast();return e},[]),L=M((e,t)=>{a.current.has(e)||c(e=>e+1),a.current.set(e,t)},[]),S=M(e=>{a.current.delete(e)&&c(e=>e-1)},[]),T=M(e=>{h(t=>t+(e?1:-1))},[]),z=M(e=>{p(t=>t+(e?1:-1))},[]),[P,W]=E(0),$=P>0,K=M(e=>{W(t=>t+(e?1:-1))},[]),R=b(Z),B=R?.claimReadOnly;C(()=>{if(B&&!y)return B(!0),()=>B(!1)},[B,y]);const j=R?.claimOwnMount;C(()=>{if(j&&$)return j(!0),()=>j(!1)},[j,$]);const H=k({last:0,count:0,tripped:!1}),O=k(!1),V=M((e,t,n)=>{if(v.current)return void(n&&function(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||"object"!=typeof t||null===e||null===t)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;try{return JSON.stringify(e)===JSON.stringify(t)}catch{return!1}}(n.prev,n.next)||(O.current=!0));if(!y||g.current)return;const r=H.current;if(r.tripped)return;const o=Date.now();if(o-r.last>_n&&(r.count=0),r.last=o,++r.count>Xn)return r.tripped=!0,void console.error(`[efficient-shell] UndoProvider: "${e}" recorded ${Xn} undo steps with no pause between them, which no user action can do. The value passed to useUndoable for this slice is almost certainly rebuilt on every render (a .map/.filter/object literal in the call) rather than held in state, so it reads as changed every time — and since recording a step re-renders the form, that is a loop. Undo recording is now off for this form to keep the tab responsive.`);g.current={values:x(),label:e,coalesceKey:t},queueMicrotask(()=>{const e=g.current;g.current=null,e&&i({type:"record",step:e})})},[y,x]),F=M(e=>{for(const[t,n]of Object.entries(e)){const e=a.current.get(t);e&&(e.setLast(n),e.apply(n))}},[]),q=M(()=>{const e=o.past[o.past.length-1];if(!e)return;const t={values:x(),label:e.label,coalesceKey:null};F(e.values),i({type:"undo",redoStep:t})},[o.past,x,F]),Y=M(()=>{const e=o.future[0];if(!e)return;const t={values:x(),label:e.label,coalesceKey:null};F(e.values),i({type:"redo",undoStep:t})},[o.future,x,F]),[U,X]=E(0),_=k(0),J=k(0),G=k(!1),Q=M(()=>{v.current=!0,O.current=!1,g.current=null,_.current+=1,J.current=_.current,X(_.current)},[]),ee=k(void 0),ne=M(e=>{void 0!==e&&(void 0!==ee.current&&e!==ee.current&&(G.current=!0),ee.current=e),Q()},[Q]);C(()=>{v.current&&U===J.current&&(v.current=!1,g.current=null,(O.current||G.current)&&i({type:"clear"}),O.current=!1,G.current=!1)},[U]);const re=M(()=>{G.current=!0,i({type:"clear"}),Q()},[Q]),oe=y&&o.past.length>0,ie=y&&o.future.length>0,ae=kn(r),le=k({undo:q,redo:Y,canUndo:oe,canRedo:ie});le.current={undo:q,redo:Y,canUndo:oe,canRedo:ie},C(()=>{if(!ae||!y)return;const e=e=>{const t=function(e){if(!e.metaKey&&!e.ctrlKey||e.altKey)return null;const t=e.key.toLowerCase(),n="z"===t?e.shiftKey?"redo":"undo":"y"!==t||!e.ctrlKey||e.metaKey||e.shiftKey?null:"redo";if(!n)return null;const r=e.target;return r?.isContentEditable||r?.tagName&&Un.has(r.tagName.toUpperCase())?null:n}(e);if(!t)return;const n=le.current;("undo"===t?n.canUndo:n.canRedo)&&(e.preventDefault(),"undo"===t?n.undo():n.redo())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[ae,y]);const se=N(()=>({register:L,unregister:S,record:V,undo:q,redo:Y,clear:re,baseline:ne,canUndo:oe,canRedo:ie,enabled:y,hasState:d,handMounted:$,claimOwnMount:K,claimReadOnly:T,declaredEditable:w,claimEditable:z,undoLabel:oe?o.past[o.past.length-1].label:null,redoLabel:ie?o.future[0].label:null}),[L,S,V,q,Y,re,ne,oe,ie,y,d,$,K,T,w,z,o.past,o.future]),ce=""!==pt(),de=b(mt)?.footerOpen??!1,ue=ce&&y&&d&&!$&&de;/* @__PURE__ */
106
+ return I(Z.Provider,{value:se,children:[ue&&/* @__PURE__ */D(ft,{position:"left",quiet:!0,children:/* @__PURE__ */D(te,{auto:!0})}),e]})}function Gn(){const e=b(Z),t=M(()=>{},[]);return{undo:e?.undo??t,redo:e?.redo??t,clear:e?.clear??t,baseline:e?.baseline??t,canUndo:e?.canUndo??!1,canRedo:e?.canRedo??!1,undoLabel:e?.undoLabel??null,redoLabel:e?.redoLabel??null,enabled:e?.enabled??!1,hasState:e?.hasState??!1}}function Qn(e){const t=b(Z),n=t?.claimReadOnly,r=t?.claimEditable;C(()=>{const t=e?r:n;if(t)return t(!0),()=>t(!1)},[n,r,e])}function Zn(e,t,n){const r=b(Z),o=z(),i=k(e),a=k(t);a.current=t,C(()=>{if(r)return r.register(o,{getLast:()=>i.current,setLast:e=>{i.current=e},apply:e=>a.current(e)}),()=>r.unregister(o)},[r,o]);const{label:l,coalesceKey:s=null}=n,c=k(r);c.current=r;const d=k({label:l,coalesceKey:s});d.current={label:l,coalesceKey:s},C(()=>{const t=c.current;t&&(Object.is(e,i.current)||(t.record(d.current.label,d.current.coalesceKey,{prev:i.current,next:e}),i.current=e))},[e])}function er(e,t){const[n,r]=E(e);return Zn(n,e=>r(()=>e),t),[n,r]}export{yt as CancelButton,ht as CopyButton,ke as DocFavStar,de as EntityWindowFallback,se as EntityWindowLoading,ue as EntityWindowState,ae as LoadingSpinner,it as MODAL_SUBMIT_SELECTOR,Vn as Modal,ft as ModalActions,Je as SIDEBAR_STRIP_W,te as UndoControls,Jn as UndoProvider,q as WINDOW_REGISTRY,G as WindowCrashedFallback,Q as WindowErrorBoundary,Ke as WindowManagerProvider,dt as WindowTitle,Xe as beginWindowGesture,qt as cancelWindowFront,J as client_default,jn as commitExposeHighlight,_e as drainPerfEvents,Tn as exitExposeMode,Tt as forgetMaximizedWindowBoxes,vn as getActiveModalId,Ne as getActiveWindowRoute,Rn as getExposeHighlight,Nt as getWindowPosition,me as isDraftEntityId,pe as isDraftEntityWindow,O as isEntityEntry,H as isPageEntry,X as isShellApiClientConfigured,Ue as markMenuOpen,Ft as requestWindowFront,Bn as setExposeHighlight,Ye as setPerfCollecting,U as setShellApiClient,F as setShellWindowRegistry,Lt as setWindowDefaultPosition,St as setWindowPosition,Kn as subscribeExposeHighlight,Sn as toggleExposeMode,pt as useEnclosingModalId,kn as useIsActiveWindow,wt as useModalActive,Gn as useUndo,Qn as useUndoCanEdit,Zn as useUndoable,er as useUndoableState,lt as useWidgetSettings,ye as useWindowDirty,ve as useWindowManager,ct as useWindowMenuItem,ut as useWindowTitle};
@@ -1883,6 +1883,12 @@ interface SegmentedOption<T extends string = string> {
1883
1883
  label: ReactNode;
1884
1884
  icon?: ReactNode;
1885
1885
  disabled?: boolean;
1886
+ /**
1887
+ * What choosing it means, on hover — "Standard: on every provider's page" —
1888
+ * for an option whose one word cannot say it all. A supplement only: the
1889
+ * label is still what names the option.
1890
+ */
1891
+ title?: string;
1886
1892
  }
1887
1893
  interface SegmentedProps<T extends string = string> {
1888
1894
  value: T;
@@ -1895,9 +1901,16 @@ interface SegmentedProps<T extends string = string> {
1895
1901
  block?: boolean;
1896
1902
  /** Accessible name for the group. */
1897
1903
  label?: string;
1904
+ /**
1905
+ * Names the group by an element already on the page — the row's own heading,
1906
+ * a field label above it — instead of repeating its words in `label`.
1907
+ */
1908
+ 'aria-labelledby'?: string;
1909
+ /** A note that describes the group, read after its name. */
1910
+ 'aria-describedby'?: string;
1898
1911
  className?: string;
1899
1912
  }
1900
- declare function Segmented<T extends string = string>({ value, onChange, options, name, size, block, label, className, }: SegmentedProps<T>): react_jsx_runtime.JSX.Element;
1913
+ declare function Segmented<T extends string = string>({ value, onChange, options, name, size, block, label, className, 'aria-labelledby': labelledBy, 'aria-describedby': describedBy, }: SegmentedProps<T>): react_jsx_runtime.JSX.Element;
1901
1914
 
1902
1915
  type SwitchSize = 'sm' | 'md' | 'touch';
1903
1916
  interface SwitchProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onChange' | 'type' | 'className'> {
@@ -4197,7 +4210,22 @@ interface DropdownMenuRadioItem {
4197
4210
  icon?: ReactNode;
4198
4211
  disabled?: boolean;
4199
4212
  }
4200
- type DropdownMenuEntry = DropdownMenuItem | DropdownMenuLinkItem | DropdownMenuLabelItem | DropdownMenuDividerItem | DropdownMenuRadioItem;
4213
+ /** One of several that may each be on — the languages someone speaks, the
4214
+ * columns a table shows. Choosing it TOGGLES it and the menu stays open, so
4215
+ * several can be ticked in one visit (`role="menuitemcheckbox"`); Escape, Tab
4216
+ * or a click elsewhere puts it away. Consecutive check boxes form one group,
4217
+ * named by the label above them, as radios do. `onSelect` is the toggle: the
4218
+ * caller flips `checked` itself, as for a radio. */
4219
+ interface DropdownMenuCheckboxItem {
4220
+ type: 'checkbox';
4221
+ key: string;
4222
+ label: ReactNode;
4223
+ checked: boolean;
4224
+ onSelect: () => void;
4225
+ icon?: ReactNode;
4226
+ disabled?: boolean;
4227
+ }
4228
+ type DropdownMenuEntry = DropdownMenuItem | DropdownMenuLinkItem | DropdownMenuLabelItem | DropdownMenuDividerItem | DropdownMenuRadioItem | DropdownMenuCheckboxItem;
4201
4229
  interface DropdownMenuProps {
4202
4230
  /** What opens the menu. Rendered inside the trigger button. */
4203
4231
  trigger: ReactNode;
@@ -4215,6 +4243,12 @@ interface DropdownMenuProps {
4215
4243
  /** Names the trigger, and the menu. Needed when the trigger is an icon;
4216
4244
  * without it both are named by the trigger's content. */
4217
4245
  'aria-label'?: string;
4246
+ /** On the trigger BUTTON, so a form's `<label htmlFor>` names it — a menu
4247
+ * of check boxes that is one field of a form (a button is labelable, and
4248
+ * clicking the label focuses it). */
4249
+ id?: string;
4250
+ /** On the trigger: a field's hint, or its error, read after its name. */
4251
+ 'aria-describedby'?: string;
4218
4252
  /** On the element around the trigger. */
4219
4253
  className?: string;
4220
4254
  /** REPLACES the trigger button's own classes, for a trigger drawn as the
@@ -4230,7 +4264,7 @@ interface DropdownMenuProps {
4230
4264
  linkAs?: ElementType;
4231
4265
  disabled?: boolean;
4232
4266
  }
4233
- declare function DropdownMenu({ trigger, items, align, side, 'aria-label': ariaLabel, className, triggerClassName, menuClassName, minWidth, linkAs, disabled, }: DropdownMenuProps): react_jsx_runtime.JSX.Element;
4267
+ declare function DropdownMenu({ trigger, items, align, side, 'aria-label': ariaLabel, className, triggerClassName, menuClassName, minWidth, linkAs, disabled, id, 'aria-describedby': describedBy, }: DropdownMenuProps): react_jsx_runtime.JSX.Element;
4234
4268
 
4235
4269
  /**
4236
4270
  * Unified popup menu component — used for all context menus, dropdowns, and flyouts.
@@ -6936,4 +6970,4 @@ declare function ChordChart({ labels, matrix, size, maxNodes, padAngle, arcWidth
6936
6970
  * string when the source is consumed without a build (e.g. tests). */
6937
6971
  declare const VERSION: string;
6938
6972
 
6939
- export { type BudgetBarProps as $, ALT as A, type BackgroundVariant as B, type ColumnDef as C, type BandScale as D, Banner as E, type BannerEmphasis as F, type BannerProps as G, type BannerTone as H, BarChart as I, type BarChartProps as J, type BoxPlotBox as K, BoxPlotChart as L, type BoxPlotChartProps as M, BrandAssetEditor as N, type BrandAssetEditorProps as O, type PaginatedResponse as P, type BrandAssetPreview as Q, BrandMark as R, type SearchConfig as S, type BrandMarkProps as T, type BrandMarkSlot as U, type BrandMarkSurface as V, type BrandMarkTreatment as W, type BreadcrumbItem as X, Breadcrumbs as Y, type BreadcrumbsProps as Z, BudgetBar as _, type SortState as a, ContainerFillChart as a$, type BudgetState as a0, Button as a1, type ButtonClassesOptions as a2, type ButtonProps as a3, type ButtonSize as a4, type ButtonVariant as a5, CHART_INK as a6, CMD_A as a7, CMD_DOT as a8, CMD_ENTER as a9, ChartHighlightProvider as aA, type ChartLegendEntry as aB, type ChartLegendSwatch as aC, type ChartRange as aD, type ChartReferenceLine as aE, type ChartRevealDirection as aF, ChartSkeleton as aG, type ChartSkeletonProps as aH, type ChartStatusTone as aI, type ChartStrokeVariant as aJ, ChartTooltip as aK, type ChartTooltipProps as aL, type ChartTooltipRow as aM, ChatTemplate as aN, Checkbox as aO, type CheckboxProps as aP, CheckoutTemplate as aQ, ChordChart as aR, type ChordChartProps as aS, ColoredBadge as aT, type ColoredBadgeProps as aU, ColumnChart as aV, type ColumnChartProps as aW, type ColumnSeries as aX, ComposerAttachments as aY, type ComposerAttachmentsProps as aZ, ConfirmProvider as a_, CMD_K as aa, CMD_S as ab, Calendar as ac, type CalendarMode as ad, type CalendarProps as ae, type Candle as af, CandlestickChart as ag, type CandlestickChartProps as ah, Card as ai, type CardPadding as aj, type CardProps as ak, CartesianPlot as al, type CartesianPlotProps as am, type CellStyle as an, type ChartBackgroundVariant as ao, ChartBrush as ap, type ChartBrushProps as aq, type ChartCurve as ar, ChartDefs as as, type ChartDefsProps as at, ChartDot as au, type ChartDotProps as av, type ChartDotVariant as aw, type ChartFillVariant as ax, ChartFrame as ay, type ChartFrameProps as az, ALT_SHIFT_D as b, type FillVariant as b$, type ContainerFillChartProps as b0, type ContainerFillItem as b1, CountBadge as b2, type CountBadgeProps as b3, type CountBadgeTone as b4, type Curve as b5, DAY_MS as b6, DEFAULT_SHELL_STRINGS as b7, DashboardTemplate as b8, DataTable as b9, type DrawerProps as bA, type DrawerSide as bB, type DrawerSize as bC, DropdownMenu as bD, type DropdownMenuAlign as bE, type DropdownMenuDividerItem as bF, type DropdownMenuEntry as bG, type DropdownMenuItem as bH, type DropdownMenuLabelItem as bI, type DropdownMenuLinkItem as bJ, type DropdownMenuProps as bK, type DropdownMenuRadioItem as bL, type DropdownMenuSide as bM, type DropdownPositionOptions as bN, ENTER as bO, EditableGrid as bP, type EditableGridProps as bQ, EmailTemplate as bR, EmptyState as bS, type EmptyStateProps as bT, ErrorBoundary as bU, type ErrorBoundaryProps as bV, ErrorPage as bW, type ErrorPageProps as bX, type FileIntake as bY, FilePicker as bZ, type FilePickerProps as b_, type DataTableColumn as ba, type DataTableColumnGroup as bb, type DataTableHeader as bc, DataTablePage as bd, type DataTableProps as be, type DataTableRowProps as bf, DatePicker as bg, type DatePickerProps as bh, DateRangePicker as bi, type DateRangePickerProps as bj, DateTimePicker as bk, type DateTimePickerProps as bl, type DescriptionColumns as bm, type DescriptionItem as bn, DescriptionList as bo, type DescriptionListProps as bp, Dialog as bq, type DialogProps as br, type DialogSize as bs, Divider as bt, type DividerProps as bu, type DividerSpacing as bv, DonutChart as bw, type DonutChartProps as bx, type DonutSegment as by, Drawer as bz, ALT_SHIFT_E as c, MOD as c$, type FormError as c0, FormErrorSummary as c1, type FormErrorSummaryProps as c2, FormField as c3, type FormFieldProps as c4, FormLayoutPage as c5, type FormatDateOptions as c6, FunnelChart as c7, type FunnelChartProps as c8, type FunnelStage as c9, type InlineProps as cA, Input as cB, InputNumber as cC, type InputNumberProps as cD, type InputProps as cE, type InputSize as cF, type Justify as cG, Kanban as cH, type KanbanColumn as cI, type KanbanProps as cJ, Kbd as cK, type KbdProps as cL, type KbdSize as cM, Label as cN, type LabelProps as cO, type LadderScale as cP, LineChart as cQ, type LineChartProps as cR, type LineChartSeries as cS, type LinearScale as cT, ListFooter as cU, ListLoadError as cV, type ListLoadErrorProps as cW, LoadingSpinner as cX, type LoadingSpinnerProps as cY, MAX_FRACTION_DIGITS as cZ, MENU_MAX_HEIGHT as c_, GLASS_DIVIDER as ca, GLASS_INPUT_BG as cb, GROUP_COLORS as cc, GROUP_COLORS_SOLID as cd, GalleryTemplate as ce, type Gap as cf, GlobalSearch as cg, type GlobalSearchProps as ch, Grid as ci, type GridCols as cj, type GridColumn as ck, type GridProps as cl, HeatmapChart as cm, type HeatmapChartProps as cn, HelpCenter as co, type HelpCenterDoc as cp, type HelpCenterProps as cq, type HistogramBin as cr, HistogramChart as cs, type HistogramChartProps as ct, INPUT_BASE as cu, INPUT_SIZES as cv, IconButton as cw, type IconButtonClassesOptions as cx, type IconButtonProps as cy, Inline as cz, ALT_SHIFT_N as d, RadioGroup as d$, MOTION as d0, Markdown as d1, type MarkdownProps as d2, MediaUploadField as d3, type MediaUploadFieldProps as d4, MediaUploadGrid as d5, type MediaUploadGridItem as d6, type MediaUploadGridProps as d7, type MenuPos as d8, Meter as d9, type Point as dA, PopupMenu as dB, PopupMenuDivider as dC, PopupMenuItem as dD, type PopupMenuItemProps as dE, PopupMenuLabel as dF, type PopupMenuProps as dG, PopupSubmenu as dH, type PopupSubmenuProps as dI, type PortalBrandingContextValue as dJ, PortalBrandingProvider as dK, type PortalBrandingProviderProps as dL, ProductionTimeline as dM, type ProductionTimelineProps as dN, type ProductionTimelineSnapshot as dO, type ProgressItem as dP, type PublicPortal as dQ, type PublicPortalBranding as dR, RADAR_SERIES_CAP as dS, type RadarAxis as dT, RadarChart as dU, type RadarChartProps as dV, type RadarSeries as dW, RadialBarChart as dX, type RadialBarChartProps as dY, type RadialBarRow as dZ, Radio as d_, type MeterProps as da, MetricBar as db, type MetricBarProps as dc, type Milestone as dd, type MilestoneKind as de, MilestoneTimeline as df, type MilestoneTimelineProps as dg, NEXT_CHUNK_PATH_PREFIX as dh, NativeSelect as di, NumericKeypad as dj, type NumericKeypadProps as dk, OVERLAY_OPEN_EVENT as dl, POPUP_MAX_WIDTH as dm, POST_PRODUCTION_STATUSES as dn, PageHeader as dp, type PageHeaderProps as dq, Pagination as dr, type PaginationProps as ds, PaperclipGlyph as dt, Paragraph as du, type ParagraphProps as dv, PieChart as dw, type PieChartProps as dx, type PieSegment as dy, type PlotGeometry as dz, APP_UPDATE_POLL_MS as e, Snippet as e$, type RadioGroupOption as e0, type RadioGroupOrientation as e1, type RadioGroupProps as e2, type RadioProps as e3, type Range as e4, RangeChart as e5, type RangeChartProps as e6, type RangeRow as e7, RankedBars as e8, type RankedBarsProps as e9, type SearchableSelectProps as eA, Segmented as eB, type SegmentedOption as eC, type SegmentedProps as eD, type SegmentedSize as eE, Select as eF, type SelectOption as eG, type SelectProps as eH, type SemanticGroup as eI, SettingRow as eJ, type SettingRowProps as eK, type SeverityTone as eL, type ShellPrefsAdapter as eM, ShellPrefsProvider as eN, type ShellStrings as eO, type ShellStringsOverride as eP, ShellStringsProvider as eQ, SidebarActionButton as eR, type SidebarActionButtonProps as eS, SidebarGroupLabel as eT, SidebarLayout as eU, type SidebarLayoutProps as eV, SidebarNavItem as eW, type SidebarNavItemProps as eX, Skeleton as eY, type SkeletonProps as eZ, type SkeletonVariant as e_, type RankedBarsRow as ea, type ResolvedPortalBrandAsset as eb, Result as ec, type ResultProps as ed, type ResultStatus as ee, type RevealDirection as ef, SCATTER_SERIES_CAP as eg, SERIES_SLOT_COUNT as eh, SERIES_VARS as ei, SHIFT as ej, STAGES as ek, STALE_CHUNK_RELOAD_COOLDOWN_MS as el, STALE_CHUNK_RELOAD_KEY as em, STATUS_VARS as en, SankeyChart as eo, type SankeyChartProps as ep, type SankeyLink as eq, type SankeyNode as er, ScatterChart as es, type ScatterChartProps as et, type ScatterPoint as eu, type ScatterSeries as ev, type SearchProvider as ew, type SearchResult as ex, type SearchableOption as ey, SearchableSelect as ez, Accordion as f, Title as f$, type SnippetProps as f0, type SnippetSize as f1, type SnippetVariant as f2, Sparkline as f3, type SparklineProps as f4, Stack as f5, type StackProps as f6, type StaleChunkReloadOptions as f7, StatCard as f8, type StatCardProps as f9, type TextProps as fA, type TextSize as fB, type TextTone as fC, type TextWeight as fD, Textarea as fE, type TextareaProps as fF, type Theme as fG, TileButton as fH, type TileButtonProps as fI, type TileSize as fJ, TimePicker as fK, type TimePickerProps as fL, TimeSeriesChart as fM, type TimeSeriesChartProps as fN, type TimeSeriesSeries as fO, type TimelineMarker as fP, type TimelineMarkerKind as fQ, type TimelineReport as fR, type TimelineScrubProgress as fS, TimelineTrack as fT, type TimelineTrackItem as fU, type TimelineTrackKind as fV, type TimelineTrackPending as fW, type TimelineTrackPhase as fX, type TimelineTrackPlayback as fY, type TimelineTrackProps as fZ, type TimelineTrackThumb as f_, StatTile as fa, type StatTileProps as fb, Statistic as fc, type StatisticProps as fd, type StatisticSize as fe, type StatisticTone as ff, StatusBadge as fg, StatusBadgeProvider as fh, type StatusEmphasis as fi, type StepItem as fj, Stepper as fk, type StepperProps as fl, type StrokeVariant as fm, SunburstChart as fn, type SunburstChartProps as fo, type SunburstNode as fp, Switch as fq, type SwitchProps as fr, type SwitchSize as fs, type TabItem as ft, Tabs as fu, type TabsProps as fv, TagInput as fw, type TagInputOption as fx, type TagInputProps as fy, Text as fz, type AccordionItem as g, maskId as g$, type TitleLevel as g0, type TitleProps as g1, type ToastOptions as g2, type ToastPlacement as g3, Tooltip as g4, type TooltipProps as g5, TopNav as g6, type TopNavItem as g7, type TopNavProps as g8, TreemapChart as g9, calcReportOverall as gA, confirm as gB, confirmDestructive as gC, curvePath as gD, dashFor as gE, dismissPopups as gF, fillFor as gG, fillId as gH, firstDayOfWeek as gI, fmtSliderDate as gJ, formatDate as gK, fromKey as gL, glassStyle as gM, glowId as gN, groundId as gO, groupColors as gP, highlightOpacity as gQ, iconButtonClasses as gR, inputClasses as gS, installStaleChunkReload as gT, isMac as gU, isSeverityTone as gV, isStaleChunkError as gW, ladderScale as gX, linearPath as gY, linearScale as gZ, logScale as g_, type TreemapChartProps as ga, type TreemapItem as gb, type TreemapTile as gc, type UseAppUpdateOptions as gd, type UseProductionTimelineOpts as ge, VERSION as gf, VITE_PRELOAD_ERROR_EVENT as gg, WaterfallChart as gh, type WaterfallChartProps as gi, type WaterfallStep as gj, type ZLayer as gk, Z_LAYERS as gl, angleScale as gm, appendKey as gn, applyThemePrefs as go, arcPath as gp, areaBetween as gq, areaFrom as gr, autoHighlightIndex as gs, backspace as gt, bandScale as gu, binValues as gv, budgetState as gw, bumpPath as gx, buttonClasses as gy, calcOverall as gz, type AccordionProps as h, mediaFileName as h0, monotonePath as h1, niceMax as h2, polygonPoints as h3, popupBounds as h4, prompt as h5, radiusScale as h6, resolveBrandMarkTreatment as h7, resolvePortalBrandAsset as h8, resolveSeriesColor as h9, useShellPrefs as hA, useShellStrings as hB, useTheme as hC, resolveTheme as ha, seriesColor as hb, severityOf as hc, splinePath as hd, squarify as he, stagger as hf, stepPath as hg, tabButtonId as hh, tabPanelId as hi, toKey as hj, toDayMs as hk, toISODate as hl, toast as hm, useAppUpdate as hn, useClickOutside as ho, useConfirm as hp, useDropdownPosition as hq, useFocusTrap as hr, useHighlight as hs, useIsMobile as ht, useLocalStoragePrefs as hu, usePlotWidth as hv, usePortalBranding as hw, useProductionTimeline as hx, useScrollLock as hy, useShellLocale as hz, type Align as i, type AngleScale as j, AppUpdateBanner as k, type AppUpdateBannerProps as l, AttachButton as m, type AttachButtonProps as n, AttachmentDropZone as o, type AttachmentDropZoneProps as p, AttachmentList as q, type AttachmentListProps as r, AuthScreen as s, type AuthScreenProps as t, Avatar as u, AvatarGroup as v, type AvatarGroupProps as w, type AvatarProps as x, type AvatarSize as y, type AvatarStatus as z };
6973
+ export { type BudgetBarProps as $, ALT as A, type BackgroundVariant as B, type ColumnDef as C, type BandScale as D, Banner as E, type BannerEmphasis as F, type BannerProps as G, type BannerTone as H, BarChart as I, type BarChartProps as J, type BoxPlotBox as K, BoxPlotChart as L, type BoxPlotChartProps as M, BrandAssetEditor as N, type BrandAssetEditorProps as O, type PaginatedResponse as P, type BrandAssetPreview as Q, BrandMark as R, type SearchConfig as S, type BrandMarkProps as T, type BrandMarkSlot as U, type BrandMarkSurface as V, type BrandMarkTreatment as W, type BreadcrumbItem as X, Breadcrumbs as Y, type BreadcrumbsProps as Z, BudgetBar as _, type SortState as a, ContainerFillChart as a$, type BudgetState as a0, Button as a1, type ButtonClassesOptions as a2, type ButtonProps as a3, type ButtonSize as a4, type ButtonVariant as a5, CHART_INK as a6, CMD_A as a7, CMD_DOT as a8, CMD_ENTER as a9, ChartHighlightProvider as aA, type ChartLegendEntry as aB, type ChartLegendSwatch as aC, type ChartRange as aD, type ChartReferenceLine as aE, type ChartRevealDirection as aF, ChartSkeleton as aG, type ChartSkeletonProps as aH, type ChartStatusTone as aI, type ChartStrokeVariant as aJ, ChartTooltip as aK, type ChartTooltipProps as aL, type ChartTooltipRow as aM, ChatTemplate as aN, Checkbox as aO, type CheckboxProps as aP, CheckoutTemplate as aQ, ChordChart as aR, type ChordChartProps as aS, ColoredBadge as aT, type ColoredBadgeProps as aU, ColumnChart as aV, type ColumnChartProps as aW, type ColumnSeries as aX, ComposerAttachments as aY, type ComposerAttachmentsProps as aZ, ConfirmProvider as a_, CMD_K as aa, CMD_S as ab, Calendar as ac, type CalendarMode as ad, type CalendarProps as ae, type Candle as af, CandlestickChart as ag, type CandlestickChartProps as ah, Card as ai, type CardPadding as aj, type CardProps as ak, CartesianPlot as al, type CartesianPlotProps as am, type CellStyle as an, type ChartBackgroundVariant as ao, ChartBrush as ap, type ChartBrushProps as aq, type ChartCurve as ar, ChartDefs as as, type ChartDefsProps as at, ChartDot as au, type ChartDotProps as av, type ChartDotVariant as aw, type ChartFillVariant as ax, ChartFrame as ay, type ChartFrameProps as az, ALT_SHIFT_D as b, type FilePickerProps as b$, type ContainerFillChartProps as b0, type ContainerFillItem as b1, CountBadge as b2, type CountBadgeProps as b3, type CountBadgeTone as b4, type Curve as b5, DAY_MS as b6, DEFAULT_SHELL_STRINGS as b7, DashboardTemplate as b8, DataTable as b9, type DrawerProps as bA, type DrawerSide as bB, type DrawerSize as bC, DropdownMenu as bD, type DropdownMenuAlign as bE, type DropdownMenuCheckboxItem as bF, type DropdownMenuDividerItem as bG, type DropdownMenuEntry as bH, type DropdownMenuItem as bI, type DropdownMenuLabelItem as bJ, type DropdownMenuLinkItem as bK, type DropdownMenuProps as bL, type DropdownMenuRadioItem as bM, type DropdownMenuSide as bN, type DropdownPositionOptions as bO, ENTER as bP, EditableGrid as bQ, type EditableGridProps as bR, EmailTemplate as bS, EmptyState as bT, type EmptyStateProps as bU, ErrorBoundary as bV, type ErrorBoundaryProps as bW, ErrorPage as bX, type ErrorPageProps as bY, type FileIntake as bZ, FilePicker as b_, type DataTableColumn as ba, type DataTableColumnGroup as bb, type DataTableHeader as bc, DataTablePage as bd, type DataTableProps as be, type DataTableRowProps as bf, DatePicker as bg, type DatePickerProps as bh, DateRangePicker as bi, type DateRangePickerProps as bj, DateTimePicker as bk, type DateTimePickerProps as bl, type DescriptionColumns as bm, type DescriptionItem as bn, DescriptionList as bo, type DescriptionListProps as bp, Dialog as bq, type DialogProps as br, type DialogSize as bs, Divider as bt, type DividerProps as bu, type DividerSpacing as bv, DonutChart as bw, type DonutChartProps as bx, type DonutSegment as by, Drawer as bz, ALT_SHIFT_E as c, MENU_MAX_HEIGHT as c$, type FillVariant as c0, type FormError as c1, FormErrorSummary as c2, type FormErrorSummaryProps as c3, FormField as c4, type FormFieldProps as c5, FormLayoutPage as c6, type FormatDateOptions as c7, FunnelChart as c8, type FunnelChartProps as c9, Inline as cA, type InlineProps as cB, Input as cC, InputNumber as cD, type InputNumberProps as cE, type InputProps as cF, type InputSize as cG, type Justify as cH, Kanban as cI, type KanbanColumn as cJ, type KanbanProps as cK, Kbd as cL, type KbdProps as cM, type KbdSize as cN, Label as cO, type LabelProps as cP, type LadderScale as cQ, LineChart as cR, type LineChartProps as cS, type LineChartSeries as cT, type LinearScale as cU, ListFooter as cV, ListLoadError as cW, type ListLoadErrorProps as cX, LoadingSpinner as cY, type LoadingSpinnerProps as cZ, MAX_FRACTION_DIGITS as c_, type FunnelStage as ca, GLASS_DIVIDER as cb, GLASS_INPUT_BG as cc, GROUP_COLORS as cd, GROUP_COLORS_SOLID as ce, GalleryTemplate as cf, type Gap as cg, GlobalSearch as ch, type GlobalSearchProps as ci, Grid as cj, type GridCols as ck, type GridColumn as cl, type GridProps as cm, HeatmapChart as cn, type HeatmapChartProps as co, HelpCenter as cp, type HelpCenterDoc as cq, type HelpCenterProps as cr, type HistogramBin as cs, HistogramChart as ct, type HistogramChartProps as cu, INPUT_BASE as cv, INPUT_SIZES as cw, IconButton as cx, type IconButtonClassesOptions as cy, type IconButtonProps as cz, ALT_SHIFT_N as d, Radio as d$, MOD as d0, MOTION as d1, Markdown as d2, type MarkdownProps as d3, MediaUploadField as d4, type MediaUploadFieldProps as d5, MediaUploadGrid as d6, type MediaUploadGridItem as d7, type MediaUploadGridProps as d8, type MenuPos as d9, type PlotGeometry as dA, type Point as dB, PopupMenu as dC, PopupMenuDivider as dD, PopupMenuItem as dE, type PopupMenuItemProps as dF, PopupMenuLabel as dG, type PopupMenuProps as dH, PopupSubmenu as dI, type PopupSubmenuProps as dJ, type PortalBrandingContextValue as dK, PortalBrandingProvider as dL, type PortalBrandingProviderProps as dM, ProductionTimeline as dN, type ProductionTimelineProps as dO, type ProductionTimelineSnapshot as dP, type ProgressItem as dQ, type PublicPortal as dR, type PublicPortalBranding as dS, RADAR_SERIES_CAP as dT, type RadarAxis as dU, RadarChart as dV, type RadarChartProps as dW, type RadarSeries as dX, RadialBarChart as dY, type RadialBarChartProps as dZ, type RadialBarRow as d_, Meter as da, type MeterProps as db, MetricBar as dc, type MetricBarProps as dd, type Milestone as de, type MilestoneKind as df, MilestoneTimeline as dg, type MilestoneTimelineProps as dh, NEXT_CHUNK_PATH_PREFIX as di, NativeSelect as dj, NumericKeypad as dk, type NumericKeypadProps as dl, OVERLAY_OPEN_EVENT as dm, POPUP_MAX_WIDTH as dn, POST_PRODUCTION_STATUSES as dp, PageHeader as dq, type PageHeaderProps as dr, Pagination as ds, type PaginationProps as dt, PaperclipGlyph as du, Paragraph as dv, type ParagraphProps as dw, PieChart as dx, type PieChartProps as dy, type PieSegment as dz, APP_UPDATE_POLL_MS as e, type SkeletonVariant as e$, RadioGroup as e0, type RadioGroupOption as e1, type RadioGroupOrientation as e2, type RadioGroupProps as e3, type RadioProps as e4, type Range as e5, RangeChart as e6, type RangeChartProps as e7, type RangeRow as e8, RankedBars as e9, SearchableSelect as eA, type SearchableSelectProps as eB, Segmented as eC, type SegmentedOption as eD, type SegmentedProps as eE, type SegmentedSize as eF, Select as eG, type SelectOption as eH, type SelectProps as eI, type SemanticGroup as eJ, SettingRow as eK, type SettingRowProps as eL, type SeverityTone as eM, type ShellPrefsAdapter as eN, ShellPrefsProvider as eO, type ShellStrings as eP, type ShellStringsOverride as eQ, ShellStringsProvider as eR, SidebarActionButton as eS, type SidebarActionButtonProps as eT, SidebarGroupLabel as eU, SidebarLayout as eV, type SidebarLayoutProps as eW, SidebarNavItem as eX, type SidebarNavItemProps as eY, Skeleton as eZ, type SkeletonProps as e_, type RankedBarsProps as ea, type RankedBarsRow as eb, type ResolvedPortalBrandAsset as ec, Result as ed, type ResultProps as ee, type ResultStatus as ef, type RevealDirection as eg, SCATTER_SERIES_CAP as eh, SERIES_SLOT_COUNT as ei, SERIES_VARS as ej, SHIFT as ek, STAGES as el, STALE_CHUNK_RELOAD_COOLDOWN_MS as em, STALE_CHUNK_RELOAD_KEY as en, STATUS_VARS as eo, SankeyChart as ep, type SankeyChartProps as eq, type SankeyLink as er, type SankeyNode as es, ScatterChart as et, type ScatterChartProps as eu, type ScatterPoint as ev, type ScatterSeries as ew, type SearchProvider as ex, type SearchResult as ey, type SearchableOption as ez, Accordion as f, type TimelineTrackThumb as f$, Snippet as f0, type SnippetProps as f1, type SnippetSize as f2, type SnippetVariant as f3, Sparkline as f4, type SparklineProps as f5, Stack as f6, type StackProps as f7, type StaleChunkReloadOptions as f8, StatCard as f9, Text as fA, type TextProps as fB, type TextSize as fC, type TextTone as fD, type TextWeight as fE, Textarea as fF, type TextareaProps as fG, type Theme as fH, TileButton as fI, type TileButtonProps as fJ, type TileSize as fK, TimePicker as fL, type TimePickerProps as fM, TimeSeriesChart as fN, type TimeSeriesChartProps as fO, type TimeSeriesSeries as fP, type TimelineMarker as fQ, type TimelineMarkerKind as fR, type TimelineReport as fS, type TimelineScrubProgress as fT, TimelineTrack as fU, type TimelineTrackItem as fV, type TimelineTrackKind as fW, type TimelineTrackPending as fX, type TimelineTrackPhase as fY, type TimelineTrackPlayback as fZ, type TimelineTrackProps as f_, type StatCardProps as fa, StatTile as fb, type StatTileProps as fc, Statistic as fd, type StatisticProps as fe, type StatisticSize as ff, type StatisticTone as fg, StatusBadge as fh, StatusBadgeProvider as fi, type StatusEmphasis as fj, type StepItem as fk, Stepper as fl, type StepperProps as fm, type StrokeVariant as fn, SunburstChart as fo, type SunburstChartProps as fp, type SunburstNode as fq, Switch as fr, type SwitchProps as fs, type SwitchSize as ft, type TabItem as fu, Tabs as fv, type TabsProps as fw, TagInput as fx, type TagInputOption as fy, type TagInputProps as fz, type AccordionItem as g, logScale as g$, Title as g0, type TitleLevel as g1, type TitleProps as g2, type ToastOptions as g3, type ToastPlacement as g4, Tooltip as g5, type TooltipProps as g6, TopNav as g7, type TopNavItem as g8, type TopNavProps as g9, calcOverall as gA, calcReportOverall as gB, confirm as gC, confirmDestructive as gD, curvePath as gE, dashFor as gF, dismissPopups as gG, fillFor as gH, fillId as gI, firstDayOfWeek as gJ, fmtSliderDate as gK, formatDate as gL, fromKey as gM, glassStyle as gN, glowId as gO, groundId as gP, groupColors as gQ, highlightOpacity as gR, iconButtonClasses as gS, inputClasses as gT, installStaleChunkReload as gU, isMac as gV, isSeverityTone as gW, isStaleChunkError as gX, ladderScale as gY, linearPath as gZ, linearScale as g_, TreemapChart as ga, type TreemapChartProps as gb, type TreemapItem as gc, type TreemapTile as gd, type UseAppUpdateOptions as ge, type UseProductionTimelineOpts as gf, VERSION as gg, VITE_PRELOAD_ERROR_EVENT as gh, WaterfallChart as gi, type WaterfallChartProps as gj, type WaterfallStep as gk, type ZLayer as gl, Z_LAYERS as gm, angleScale as gn, appendKey as go, applyThemePrefs as gp, arcPath as gq, areaBetween as gr, areaFrom as gs, autoHighlightIndex as gt, backspace as gu, bandScale as gv, binValues as gw, budgetState as gx, bumpPath as gy, buttonClasses as gz, type AccordionProps as h, maskId as h0, mediaFileName as h1, monotonePath as h2, niceMax as h3, polygonPoints as h4, popupBounds as h5, prompt as h6, radiusScale as h7, resolveBrandMarkTreatment as h8, resolvePortalBrandAsset as h9, useShellLocale as hA, useShellPrefs as hB, useShellStrings as hC, useTheme as hD, resolveSeriesColor as ha, resolveTheme as hb, seriesColor as hc, severityOf as hd, splinePath as he, squarify as hf, stagger as hg, stepPath as hh, tabButtonId as hi, tabPanelId as hj, toKey as hk, toDayMs as hl, toISODate as hm, toast as hn, useAppUpdate as ho, useClickOutside as hp, useConfirm as hq, useDropdownPosition as hr, useFocusTrap as hs, useHighlight as ht, useIsMobile as hu, useLocalStoragePrefs as hv, usePlotWidth as hw, usePortalBranding as hx, useProductionTimeline as hy, useScrollLock as hz, type Align as i, type AngleScale as j, AppUpdateBanner as k, type AppUpdateBannerProps as l, AttachButton as m, type AttachButtonProps as n, AttachmentDropZone as o, type AttachmentDropZoneProps as p, AttachmentList as q, type AttachmentListProps as r, AuthScreen as s, type AuthScreenProps as t, Avatar as u, AvatarGroup as v, type AvatarGroupProps as w, type AvatarProps as x, type AvatarSize as y, type AvatarStatus as z };