efficient-shell 4.180.0 → 4.181.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/dist/Browser-QYHW6I6J.js +43 -0
- package/dist/Calculator-4K53PFBL.js +29 -0
- package/dist/ConfirmDialog-X2DPOYWO.js +1 -0
- package/dist/{CurrencyConverter-AMXUOQR2.js → CurrencyConverter-QEG6RFAS.js} +9 -9
- package/dist/Documents-SFNMDRYU.js +52 -0
- package/dist/Files-OX2UBSQQ.js +87 -0
- package/dist/Notepad-CNZEWFCR.js +25 -0
- package/dist/PdfViewer-UZGDE4HD.js +1 -0
- package/dist/PomodoroTimer-T6YAQFIE.js +91 -0
- package/dist/Preview-OOVIIQQG.js +182 -0
- package/dist/Sidebar-3NZRIL7F.js +44 -0
- package/dist/Spreadsheet-7NUDGOSX.js +37 -0
- package/dist/{Stock-GWVG2INU.js → Stock-BZFC2ROU.js} +6 -6
- package/dist/{Weather-APBCG4TO.js → Weather-S3N5OWYF.js} +17 -17
- package/dist/{WorldClock-2LMZYKWR.js → WorldClock-ACC3S6OA.js} +4 -4
- package/dist/apps/index.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/{chunk-FORN7LG7.js → chunk-2DX65GOO.js} +1 -1
- package/dist/{chunk-6CFBF543.js → chunk-5IWSOLLY.js} +2 -2
- package/dist/chunk-FOEVG7RT.js +21 -0
- package/dist/chunk-GMMTTWHB.js +3 -0
- package/dist/chunk-LMIQV3NB.js +13 -0
- package/dist/{chunk-SVO3ES2E.js → chunk-MIAJQGWE.js} +1 -1
- package/dist/chunk-MSIN5HKX.js +9 -0
- package/dist/chunk-OD5KLVU5.js +1 -0
- package/dist/{chunk-ILTSTULF.js → chunk-P4SGJTK3.js} +1 -1
- package/dist/chunk-PQLVWCUI.js +11 -0
- package/dist/chunk-QRV7RNQX.js +24 -0
- package/dist/chunk-R3PCJLQF.js +993 -0
- package/dist/chunk-SBDIHKLU.js +108 -0
- package/dist/chunk-VJP3R52B.js +6 -0
- package/dist/chunk-XUF7VW4U.js +136 -0
- package/dist/chunk-ZDF5AR5W.js +10 -0
- package/dist/chunk-ZZKIKW62.js +29 -0
- package/dist/index.js +639 -656
- package/dist/map/index.js +22 -22
- package/dist/markdown/index.js +6 -6
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/ui/index.js +1 -1
- package/package.json +1 -1
- package/dist/Browser-RZFOKBSF.js +0 -43
- package/dist/Calculator-R5OEHQ67.js +0 -29
- package/dist/ConfirmDialog-CMNQZQA3.js +0 -1
- package/dist/Documents-VD32HWDQ.js +0 -52
- package/dist/Files-NAY3WK6O.js +0 -89
- package/dist/Notepad-AHRPMF57.js +0 -25
- package/dist/PdfViewer-3SC3LE4U.js +0 -1
- package/dist/PomodoroTimer-LE6J2KUU.js +0 -99
- package/dist/Preview-OKR5QRQP.js +0 -188
- package/dist/Sidebar-BQ4P5LBI.js +0 -44
- package/dist/Spreadsheet-RME4IQ43.js +0 -37
- package/dist/chunk-4VTHXNGZ.js +0 -1003
- package/dist/chunk-5ZDM6WIC.js +0 -24
- package/dist/chunk-7WZEFHPS.js +0 -6
- package/dist/chunk-AA4TMQOS.js +0 -10
- package/dist/chunk-BSJIBRWC.js +0 -1
- package/dist/chunk-C2A4PIGZ.js +0 -13
- package/dist/chunk-CIXQKCFA.js +0 -11
- package/dist/chunk-KVOFUFPP.js +0 -3
- package/dist/chunk-N6STBYXR.js +0 -112
- package/dist/chunk-RQOP5JAJ.js +0 -9
- package/dist/chunk-UAIVAA5X.js +0 -21
- package/dist/chunk-ZAE6ROV7.js +0 -29
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import{computeMaximizedBox as e,isSidebarStripReserved as t,boxFillsWorkArea as n,readAlwaysMaximizedFlag as r,WORK_AREA_CHANGED_EVENT as o,useShellAuth as i,scrollerIsFluid as a,growBoxToWidth as l,widthToFit as s,navIcons as c}from"./chunk-DSSLOQDW.js";import{CopyButton as d}from"./chunk-GMMTTWHB.js";import{isStaleChunkError as u,CMD_Z as h,CMD_SHIFT_Z as m,LoadingSpinner as p,Result as f,useIsMobile as w,useShellPrefs as y}from"./chunk-PQLVWCUI.js";import{Button_default as g}from"./chunk-OGXU7QFW.js";import{confirm as b}from"./chunk-ZZKIKW62.js";import{PopupMenu as v,PopupMenuItem as x,PopupMenuDivider as k,PopupMenuLabel as E}from"./chunk-ZDF5AR5W.js";import{Z_LAYERS as C,runEscapeInterceptors as M}from"./chunk-X4FJ54PP.js";import{WarningFallback as N,StarFallback as S,BookmarkSquareFallback as L,CheckFallbackB as T,CloseFallback as z,RemoveFallback as A,ExpandFallback as D,WindowFallback as I,ExpandFallbackB as P,GridFallbackC as W,ArrowRightFallbackB as K}from"./chunk-XUF7VW4U.js";import{useShellStrings as O}from"./chunk-J3LIIIHJ.js";import{Icon as $}from"./chunk-YKZHOXI4.js";import{createContext as R,useContext as F,Component as q,useLayoutEffect as j,useRef as B,useEffect as H,useState as Y,useSyncExternalStore as U,useCallback as X,isValidElement as V,Fragment as _,Children as J,cloneElement as G,useMemo as Q,useReducer as Z,useId as ee,Suspense as te}from"react";import{jsxs as ne,jsx as re,Fragment as oe}from"react/jsx-runtime";import{createPortal as ie}from"react-dom";import{XMarkIcon as ae}from"@heroicons/react/24/outline";import{useLocation as le}from"react-router-dom";import{useQueryClient as se,useQuery as ce}from"@tanstack/react-query";function de(e){return"component"in e}function ue(e){return"endpoint"in e}var he={};function me(e){he=e}var pe=new Proxy({},{get:(e,t)=>he[t],has:(e,t)=>t in he,ownKeys:()=>Object.keys(he),getOwnPropertyDescriptor(e,t){if(t in he)return{configurable:!0,enumerable:!0,value:he[t]}}}),fe=null;function we(e){fe=e}function ye(){return null!==fe}var ge=/* @__PURE__ */new Set(["get","post","put","patch","delete","head","options","request"]),be=new Proxy({},{get:(e,t)=>fe?fe[t]:"string"==typeof t&&ge.has(t)?()=>Promise.resolve({data:null,status:0,statusText:"",headers:{},config:{}}):void 0}),ve=R(null);function xe(){return F(ve)?.pageSearch??""}var ke=null,Ee=/* @__PURE__ */new Set;function Ce(e){ke!==e&&(ke=e,Ee.forEach(e=>e()))}function Me(){return ke}function Ne(e){return Ee.add(e),()=>{Ee.delete(e)}}function Se({error:e,onReload:t}){const n=u(e);/* @__PURE__ */
|
|
2
|
+
return ne("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 py-12 text-center",children:[
|
|
3
|
+
/* @__PURE__ */re($,{name:"warning",fallback:N,className:"h-8 w-8 text-amber-500",strokeWidth:1.5}),
|
|
4
|
+
/* @__PURE__ */ne("div",{className:"min-w-0",children:[
|
|
5
|
+
/* @__PURE__ */re("p",{className:"text-sm font-medium text-gray-700",children:n?"This window needs the latest version of the app":"This window crashed"}),
|
|
6
|
+
/* @__PURE__ */re("p",{className:"mt-1 text-xs text-gray-400 max-w-sm break-words",children:n?"A new version was deployed while this tab was open. Reload the page to pick it up.":e.message||String(e)})]}),
|
|
7
|
+
/* @__PURE__ */re("button",{type:"button",onClick:n?()=>window.location.reload():t,className:"bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 text-sm font-medium rounded-lg",children:n?"Reload page":"Reload window"})]})}var Le=class extends q{state={error:null};static getDerivedStateFromError(e){return{error:e instanceof Error?e:new Error(String(e))}}componentDidCatch(e,t){console.error("[efficient-shell] window content crashed:",e,t.componentStack)}reset=()=>this.setState({error:null});render(){const{error:e}=this.state;return e?this.props.fallback?this.props.fallback(e,this.reset):/* @__PURE__ */re(Se,{error:e,onReload:this.reset}):this.props.children}},Te=R(null),ze="text-xs text-gray-500 hover:text-gray-700 disabled:opacity-40 disabled:hover:text-gray-500 disabled:cursor-default";function Ae({className:e="",auto:t=!1}){const n=F(Te),r=O().undo,o=n?.claimOwnMount;if(j(()=>{if(!t&&o)return o(!0),()=>o(!1)},[t,o]),!n||!n.enabled)return null;const{undo:i,redo:a,canUndo:l,canRedo:s,undoLabel:c,redoLabel:d}=n;/* @__PURE__ */
|
|
8
|
+
return ne("div",{className:`flex items-center gap-2 ${e}`,"data-undo-controls":t?"shell":"form",children:[
|
|
9
|
+
/* @__PURE__ */re("button",{type:"button",onClick:i,disabled:!l,title:l?r.undoStep(c??"",h):r.nothingToUndo,className:ze,children:r.undo}),
|
|
10
|
+
/* @__PURE__ */re("button",{type:"button",onClick:a,disabled:!s,title:s?r.redoStep(d??"",m):r.nothingToRedo,className:ze,children:r.redo})]})}var De=/* @__PURE__ */new Set([408,429]);function Ie(e){const t=e?.response?.status;return"number"==typeof t?t:void 0}function Pe(e){const t=Ie(e);return null!=t&&(t>=400&&t<500&&!De.has(t))}function We(e,t){return!Pe(t)&&e<3}function Ke(){const e=O().loading;/* @__PURE__ */
|
|
11
|
+
return re("div",{className:"flex items-center justify-center p-8 text-sm text-gray-400",children:e.label})}var Oe="flex-1 min-h-0";function $e(){const e=O().record;/* @__PURE__ */
|
|
12
|
+
return re(p,{label:e.loading,padding:"",className:Oe})}function Re(e){return e??void 0}function Fe({isPending:e,isFetching:t,enabled:n=!0,error:r,onRetry:o}){const i=O().record;if(t||e&&n)/* @__PURE__ */return re($e,{});if(r){const e=Ie(r);if(401===e)/* @__PURE__ */
|
|
13
|
+
return re(f,{status:"warning",title:i.signInRequired,subTitle:i.signInBody,className:Oe});if(403===e)/* @__PURE__ */
|
|
14
|
+
return re(f,{status:"403",className:Oe});if(404===e||410===e)/* @__PURE__ */
|
|
15
|
+
return re(f,{status:"404",title:i.notFound,className:Oe});const t=null==e||408===e||429===e||e>=500;/* @__PURE__ */
|
|
16
|
+
return re(f,{status:"500",title:i.loadFailed,subTitle:t?i.checkConnection:i.rejected,extra:t?/* @__PURE__ */re(g,{variant:"secondary",size:"sm",onClick:o,children:i.retry}):void 0,className:Oe})}/* @__PURE__ */
|
|
17
|
+
return re(f,{status:"404",title:i.notFound,className:Oe})}function qe({entity:e,children:t,...n}){return null!=e?/* @__PURE__ */re(oe,{children:t(e)}):/* @__PURE__ */re(Fe,{...n})}var je=/^[a-z]+(?:-[a-z]+)*-\d{13}$/;function Be(e){return"string"==typeof e&&(e.startsWith("new-")||je.test(e))}function He(e){if(Be(e.entityId))return!0;const t=e.entitySnapshot;return!(!t||"object"!=typeof t||!t._new&&!t._duplicate)}var Ye=R({openWindows:[],openEntity:()=>{},openPage:()=>{},closeEntity:()=>{},minimize:()=>{},items:[],restore:()=>{},remove:()=>{},restoreIfMinimized:()=>!1,openItems:[]}),Ue=R(null);function Xe(e){const t=F(Ue),n=B(null);null===n.current&&(n.current=/* @__PURE__ */Symbol("window-dirty")),j(()=>{if(t)return t(n.current,e)},[t,e]),H(()=>{if(!t||!e)return;const n=e=>{e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",n),()=>window.removeEventListener("beforeunload",n)},[t,e])}function Ve(){const e=B(/* @__PURE__ */new Map),[t,n]=Y(!1);return{dirty:t,registerDirty:X((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 _e(){return F(Ye)}function Je(e){if("page"!==e.type&&He(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 Ge({item:e,onClose:t,accentRgb:n}){const{dirty:r,registerDirty:o}=Ve(),i=pe[e.route];if(!i||!de(i))return null;const a=i,l=a.component;/* @__PURE__ */
|
|
18
|
+
return re($r,{open:!0,onClose:t,icon:c[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__ */re(Ue.Provider,{value:o,children:/* @__PURE__ */re(te,{fallback:/* @__PURE__ */re("div",{className:"flex items-center justify-center py-12",children:/* @__PURE__ */re(Ke,{})}),children:/* @__PURE__ */re(l,{})})})})}function Qe({entityType:e,entityId:t,label:n}){const r=O(),o=se(),{data:i}=ce({queryKey:["my-profile-sidebar"],enabled:ye(),queryFn:()=>be.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 re("button",{onClick:()=>{const r=l?a.filter(n=>!(n.entityType===e&&n.entityId===t)):[...a,{entityType:e,entityId:t,label:n}];be.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__ */re($,{name:"star",fallback:S,className:"h-4 w-4",fill:l?"currentColor":"none",strokeWidth:1.5})})}var Ze=/* @__PURE__ */new Set;function et({item:e,onClose:t,onMinimize:n,accentRgb:r}){const o=pe[e.entityType];if(!o||!ue(o))return null;const i=o,[a,l]=Y(!1),{dirty:s,registerDirty:d}=Ve(),u=i.queryKey||i.endpoint.replace(/^\/|\/$/g,"").split("/").pop()||e.entityType,h=e.entitySnapshot?._duplicate,m=Be(e.entityId),p=!i.selfFetching&&!h&&!m&&ye(),f=ce({queryKey:[u,e.entityId],queryFn:()=>{return be.get((t=i.endpoint,n=String(e.entityId),`${t}${encodeURIComponent(n)}/`)).then(e=>e.data);var t,n},initialData:Re(e.entitySnapshot),initialDataUpdatedAt:0,enabled:p,staleTime:0,refetchOnWindowFocus:!0,refetchOnMount:"always",refetchInterval:e=>!Pe(e.state.error)&&6e4,refetchIntervalInBackground:!1,retry:We}),w=f.data,y=f.refetch;H(()=>{var t;if(p)return t=t=>{t!==e.id||Ze.has(t)||y({cancelRefetch:!1})},jn.add(t),()=>{jn.delete(t)}},[y,e.id,p]);const g=X(()=>{a&&!s?l(!1):t()},[a,s,t]),b=i.selfFetching?e.label:w?i.title(w,a,l):e.label,v=i.icon,x=v?c[v]:null,k=b,E=!i.selfFetching&&w&&i.footer&&!h?i.footer(w):void 0;return i.rendersOwnModal?i.selfFetching?/* @__PURE__ */re(te,{fallback:/* @__PURE__ */re(Ke,{}),children:i.render(w??e.entitySnapshot,t,e.entityId,a,l)}):null!=w?/* @__PURE__ */re(te,{fallback:/* @__PURE__ */re($r,{open:!0,onClose:t,title:e.label,size:i.size||"2xl",children:/* @__PURE__ */re($e,{})}),children:i.render(w,t,e.entityId,a,l)}):/* @__PURE__ */re($r,{open:!0,onClose:t,title:e.label,size:i.size||"2xl",children:/* @__PURE__ */re(Fe,{isPending:f.isPending,isFetching:f.isFetching,enabled:p,error:f.error,onRetry:y})}):/* @__PURE__ */re($r,{open:!0,onClose:g,onMinimize:n,initialBox:e.savedBox,icon:x,title:k,footer:E,copyText:e.label,windowKey:e.id,openedFromKey:e.openedFrom,size:i.size||"2xl",dirty:s,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__ */re(Ue.Provider,{value:d,children:/* @__PURE__ */re(te,{fallback:/* @__PURE__ */re($e,{}),children:i.selfFetching?i.render(null,t,e.entityId,a,l):/* @__PURE__ */re(qe,{entity:w,isPending:f.isPending,isFetching:f.isFetching,enabled:p,error:f.error,onRetry:y,children:n=>i.render(n,t,e.entityId,a,l)})})})})}function tt(e){return document.querySelector(`[data-modal-panel][data-window-key="${e}"]`)}function nt(e){return document.querySelector(`[data-modal-panel][data-window-root][data-window-owner="${e}"]`)}function rt(e){const t=tt(e),n=t??nt(e);if(!n)return;if(t&&!er(t))return r=e,void window.dispatchEvent(new CustomEvent("modal-reveal",{detail:{windowKey:r}}));var r;const o=n.getAttribute("data-modal-id");o&&Bn(o)}function ot(e){if("page"!==e.type)return!0;const t=e.route?pe[e.route]:void 0;if(!t||!de(t))return!0;const n=t;return!n.widget&&!n.utility}function it(){const e=pr();if(!e)return;const t=document.querySelector(`[data-modal-panel][data-modal-id="${e}"]`);return t?.getAttribute("data-window-key")??void 0}var at=/* @__PURE__ */new Map;function lt(){const e=it();if(e)return at.get(e)}function st(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 ct="rosh-peek-style";function dt(e){"undefined"!=typeof document&&(!function(){if("undefined"==typeof document||document.getElementById(ct))return;const e=document.createElement("style");e.id=ct,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 ut(){"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 ht({id:e,label:t,maxW:n,maxH:r,titleAbove:o=!1,onClick:i,onClose:a}){const l=O(),s=B(null),[c,d]=Y({w:n,h:Math.round(.75*r)}),[u,h]=Y(!1);return j(()=>{const o=s.current;if(!o)return;const i=tt(e)??st(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__ */ne("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
|
+
/* @__PURE__ */re("div",{ref:s,className:"absolute inset-0 z-0 overflow-hidden"}),!u&&/* @__PURE__ */ne("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-gray-400 bg-gray-50",children:[
|
|
21
|
+
/* @__PURE__ */re($,{name:"window",fallback:I,className:"h-6 w-6",strokeWidth:1.5}),
|
|
22
|
+
/* @__PURE__ */re("span",{className:"mt-1 text-[10px] uppercase tracking-wide",children:"Hidden"})]}),!o&&/* @__PURE__ */re("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__ */re("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__ */re($,{name:"close",fallback:z,className:"h-3 w-3",strokeWidth:3})})]})}function mt({items:e,anchorEl:t,onActivate:n,onClose:r,onMouseEnter:o,onMouseLeave:i}){const a=O(),l=e.length>1,s=B(null),[c,d]=Y({left:-9999,top:-9999,ready:!1}),[u,h]=Y(()=>"undefined"!=typeof document&&getComputedStyle(document.documentElement).getPropertyValue("--taskbar-position")?.trim()||"bottom");j(()=>{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]),H(()=>ut,[]);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 ie(
|
|
23
|
+
/* @__PURE__ */re("div",{ref:s,"data-taskbar-preview":"",style:{position:"fixed",left:c.left,top:c.top,zIndex:300,maxWidth:"calc(100vw - 16px)",opacity:c.ready?1:0},className:l?"flex gap-2 flex-wrap":"",onMouseEnter:o,onMouseLeave:()=>{ut(),i()},children:e.map(e=>{const t=tt(e.id)??st(e.label),o=t?function(e){if(er(e))return null;const t=e.getBoundingClientRect(),n=Vn(),r=t.left+t.width/2-(n.x+n.w/2),o=t.top+t.height/2-(n.y+n.h/2);return 180*Math.atan2(o,r)/Math.PI}(t):null;/* @__PURE__ */
|
|
24
|
+
return ne("div",{className:"group flex flex-col items-center",onMouseEnter:()=>dt(t),children:[!m&&/* @__PURE__ */re("span",{className:p,children:e.label}),
|
|
25
|
+
/* @__PURE__ */re(ht,{id:e.id,label:e.label,maxW:240,maxH:160,titleAbove:!0,onClick:()=>n(e.id),onClose:()=>r(e.id)}),m&&/* @__PURE__ */re("span",{className:p,children:e.label}),null!==o&&/* @__PURE__ */ne("span",{title:a.taskbar.offscreenHint,className:"mt-1 inline-flex items-center gap-1 rounded bg-amber-500 px-1.5 py-0.5 text-[10px] font-semibold text-white shadow-sm",children:[
|
|
26
|
+
/* @__PURE__ */re($,{name:"arrow-right",fallback:K,className:"h-3 w-3",style:{transform:`rotate(${o}deg)`},strokeWidth:3}),"Off screen"]})]},e.id)})}),document.body)}function pt(e,t){const n=getComputedStyle(document.documentElement).getPropertyValue("--taskbar-position")?.trim()||"bottom";return"top"===n?{left:Math.min(e,window.innerWidth-220),top:t+4}:"left"===n?{left:e+4,top:Math.min(t,window.innerHeight-160)}:"right"===n?{right:window.innerWidth-e+4,top:Math.min(t,window.innerHeight-160)}:{left:Math.min(e,window.innerWidth-220),bottom:window.innerHeight-t+4}}function ft({openWindows:e,onRemove:t,onSplitView:n,onActivate:r,onActivateById:o}){const i=O(),[a,l]=Y(null);H(()=>{let e,t;const n=()=>{clearInterval(e),clearTimeout(t),e=void 0},r=()=>{const e=document.getElementById("taskbar-windows");return l(t=>t===e?t:e),!!e},o=()=>{n(),r()||(e=setInterval(()=>{r()&&n()},100),t=setTimeout(n,5e3))};return o(),window.addEventListener("react-os-shell:layout-mode-changed",o),()=>{n(),window.removeEventListener("react-os-shell:layout-mode-changed",o)}},[]);const s=U(fr,pr),[,d]=Y(0);H(()=>{const e=()=>d(e=>e+1);return window.addEventListener("modal-geometry",e),window.addEventListener("resize",e),()=>{window.removeEventListener("modal-geometry",e),window.removeEventListener("resize",e)}},[]);const[,u]=Y(0);H(()=>{const e=()=>u(e=>e+1);return window.addEventListener("window-title-update",e),()=>window.removeEventListener("window-title-update",e)},[]);const h=e=>{const t=st(e),n=t?.querySelector("[data-window-title]");return n?.textContent?.trim()||e},[m,p]=Y(null),[f,w]=Y(null),[y,g]=Y(null),b=B(null),C=()=>{b.current&&(clearTimeout(b.current),b.current=null),b.current=setTimeout(()=>{p(null),w(null)},150)},M=e.filter(e=>!e.route||!pe[e.route]?.utility);if(!a||!a.isConnected||0===M.length)return null;const N=[],S=/* @__PURE__ */new Map;for(const e of M){const t=e.route?pe[e.route]:void 0,n=t?.taskbarGroup,r=n?.key??e.route??`entity:${e.id}`,o=S.get(r);if(void 0!==o)N[o].items.push(e);else{S.set(r,N.length);const o=n?.label??t?.label??e.label;N.push({key:r,route:n?.icon??e.route,label:o,items:[e]})}}return ie(
|
|
27
|
+
/* @__PURE__ */ne(oe,{children:[N.map(e=>{const n=e.route?c[e.route]:null,r=e.items[e.items.length-1];let a=!1;if(s){const t=document.querySelector(`[data-modal-id="${s}"]`);if(t){const n=t.querySelector("[data-window-title]"),r=n?.textContent??"";a=e.items.some(e=>r.includes(e.label))}}const l=e.items.length>1,d=e.items.some(e=>{const t=tt(e.id)??st(e.label);return!!t&&!er(t)});/* @__PURE__ */
|
|
28
|
+
return ne("button",{onClick:()=>o(r.id),onMouseEnter:t=>{return n=e.items,r=t.currentTarget,void(y||(b.current&&(clearTimeout(b.current),b.current=null),b.current=setTimeout(()=>{p(n),w(r)},350)));var n,r},onMouseLeave:C,onDoubleClick:e=>{e.stopPropagation(),window.dispatchEvent(new CustomEvent("modal-center",{detail:{windowKey:r.id,label:r.label}}))},onContextMenu:t=>{t.preventDefault(),t.stopPropagation(),b.current&&(clearTimeout(b.current),b.current=null),p(null),w(null),l?g({x:t.clientX,y:t.clientY,items:e.items,label:e.label}):window.dispatchEvent(new CustomEvent("modal-context-menu",{detail:{windowKey:r.id,label:r.label,x:t.clientX,y:t.clientY}}))},style:{width:"var(--window-tab-width, 200px)",fontSize:"var(--window-tab-font-size, 12px)"},"data-tab-group":e.key,className:"group relative flex items-center gap-1.5 rounded-lg px-3 py-2 font-medium transition-all min-w-0 shrink "+(a?"bg-blue-100/60 border border-blue-400/60 text-blue-700":"bg-gray-50/40 border border-gray-200/40 text-gray-700 hover:bg-gray-200/40"),children:[n&&V(n)?G(n,{className:"h-3.5 w-3.5 shrink-0 "+(a?"text-blue-600":"text-gray-400")}):/* @__PURE__ */re($,{name:"expand",fallback:P,className:"h-3.5 w-3.5 shrink-0 "+(a?"text-blue-600":"text-gray-400"),strokeWidth:2}),
|
|
29
|
+
/* @__PURE__ */re("span",{className:"truncate flex-1",children:l?e.label:h(r.label)}),d&&/* @__PURE__ */re("span",{title:i.taskbar.offscreenDot,className:"shrink-0 h-1.5 w-1.5 rounded-full bg-amber-500"}),l&&/* @__PURE__ */re("span",{className:"shrink-0 px-1.5 py-0.5 rounded-full bg-blue-500/80 text-white text-[10px] font-bold leading-none",children:e.items.length}),!l&&/* @__PURE__ */re("span",{role:"button",onClick:e=>{e.stopPropagation(),t(r.id)},className:"ml-auto text-gray-400 hover:text-red-500 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:/* @__PURE__ */re($,{name:"close",fallback:z,className:"h-3 w-3",strokeWidth:2})})]},e.key)}),
|
|
30
|
+
/* @__PURE__ */re("div",{className:"flex-1"}),M.length>=2&&/* @__PURE__ */ne("button",{onClick:n,title:i.taskbar.expose,className:"flex items-center gap-1 rounded px-2 py-1 text-[11px] font-medium text-blue-600 border border-blue-300 hover:bg-blue-50 transition-colors shrink-0",children:[
|
|
31
|
+
/* @__PURE__ */re($,{name:"grid",fallback:W,className:"h-3 w-3",strokeWidth:2}),"Exposé"]}),y&&/* @__PURE__ */ne(v,{portal:!0,minWidth:200,style:pt(y.x,y.y),onClose:()=>g(null),children:[
|
|
32
|
+
/* @__PURE__ */re(E,{children:y.label}),
|
|
33
|
+
/* @__PURE__ */ne(x,{onClick:()=>{g(null),y.items.forEach(e=>function(e){const t=zn.get(e);t&&Hn(t)}(e.id))},children:[
|
|
34
|
+
/* @__PURE__ */re($,{name:"remove",fallback:A,className:"h-4 w-4 text-gray-400",strokeWidth:1.5}),i.taskbar.minimizeAllWindows]}),
|
|
35
|
+
/* @__PURE__ */ne(x,{onClick:()=>{g(null),y.items.forEach(e=>o(e.id))},children:[
|
|
36
|
+
/* @__PURE__ */re("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */re("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75h6.5v6.5h-6.5zM13.75 8.75h6.5v6.5h-6.5z"})}),i.taskbar.restoreAllWindows]}),
|
|
37
|
+
/* @__PURE__ */re(k,{}),
|
|
38
|
+
/* @__PURE__ */ne(x,{danger:!0,onClick:()=>{g(null),y.items.forEach(e=>t(e.id))},children:[
|
|
39
|
+
/* @__PURE__ */re($,{name:"close",fallback:z,className:"h-4 w-4",strokeWidth:2}),`${i.taskbar.closeAllWindows} (${y.items.length})`]})]}),m&&f&&/* @__PURE__ */re(mt,{items:m,anchorEl:f,onActivate:e=>{o(e),p(null),w(null)},onClose:e=>{t(e),p(null),w(null)},onMouseEnter:()=>{b.current&&(clearTimeout(b.current),b.current=null)},onMouseLeave:C})]}),a)}var wt=["/login","/forgot-password","/reset-password","/force-change-password"];function yt({children:e,windowAccentForRoute:t}){const n=le(),r=wt.some(e=>n.pathname.startsWith(e)),[o,i]=Y([]),a=B(o);j(()=>{a.current=o},[o]);const l=U(Ne,Me,Me),s=B(/* @__PURE__ */new Map),c=e=>{const t=ot(e),n=!!l&&"page"===e.type&&e.route===l,r=e.pageSearch||void 0,o=s.current.get(e.id);if(o&&o.tab===t&&o.home===n&&o.pageSearch===r)return o;const i={key:e.id,tab:t,home:n,...r?{pageSearch:r}:{}};return s.current.set(e.id,i),i};H(()=>{at.clear();for(const e of o)e.route&&at.set(e.id,e.route)},[o]);const d=X(e=>{i(t=>t.filter(t=>t.id!==e))},[]),u=X(e=>{var t;tt(e)||nt(e)?(t=e,window.dispatchEvent(new CustomEvent(wr,{detail:{windowKey:t}}))):d(e)},[d]),h=(e,t=!1)=>{const n=Mn;t&&Ze.add(e),setTimeout(()=>{const r=document.querySelector(`[data-modal-panel][data-window-key="${e}"]`),o=r?.getAttribute("data-modal-id");var i,a;!o||(i=o,a=n,(Nn.get(i)??-1)>a)||Bn(o),t&&Ze.delete(e)},50)},m=X((e,t,n,r,o)=>{if(!pe[e]||!ue(pe[e]))return;const a=`${e}:${t}`,l=it();i(i=>{const s=i.find(n=>n.entityType===e&&String(n.entityId)===String(t));return s?(h(s.id),i):(h(a,!0),[...i,{id:a,type:"modal",label:r||t,route:o||window.location.pathname,entityType:e,entityId:t,entitySnapshot:Re(n),openedFrom:l}])})},[]),p=X((e,t={})=>{if(!pe[e]||!de(pe[e]))return;const n=pe[e],{reuse:r=!1,background:o=!1,shellOwned:l,search:s}=t,c=e=>{var t;o?(t=e,Wn.add(t)):h(e)};if(n.widget){const t=a.current.find(t=>"page"===t.type&&t.route===e);if(t)return void u(t.id)}const d=it();i(t=>{if(n.multiInstance){const i=t.filter(t=>"page"===t.type&&t.route===e);if(r&&!s&&i.length>0)return o||h(i[i.length-1].id),t;const a=`page:${e}:${Math.random().toString(36).slice(2,8)}`;return c(a),[...t,{id:a,type:"page",label:n.label,route:e,openedFrom:d,...l?{shellOwned:l}:{},...s?{pageSearch:s}:{}}]}const i=t.find(t=>"page"===t.type&&t.route===e);if(i)return n.widget?t:(o||h(i.id),s&&i.pageSearch!==s?t.map(e=>e===i?{...e,pageSearch:s}:e):t);const a=`page:${e}`;return c(a),[...t,{id:a,type:"page",label:n.label,route:e,openedFrom:d,...l?{shellOwned:l}:{},...s?{pageSearch:s}:{}}]})},[u]),f=X(()=>{},[]),w=X(()=>{},[]),y=u,g=u;/* @__PURE__ */
|
|
40
|
+
return ne(Ye.Provider,{value:{openWindows:o,openEntity:m,openPage:p,closeEntity:y,minimize:f,items:[],openItems:o,restore:w,remove:g,restoreIfMinimized:()=>!1},children:[e,
|
|
41
|
+
/* @__PURE__ */re(ft,{openWindows:o,onRemove:u,onSplitView:Kr,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&&Bn(e)}})},onActivateById:rt}),
|
|
42
|
+
/* @__PURE__ */re(Or,{}),!r&&o.map(e=>{const n=e.route?t?.(e.route):void 0;
|
|
43
|
+
/* @__PURE__ */
|
|
44
|
+
return re(ve.Provider,{value:c(e),children:/* @__PURE__ */re(Le,{fallback:(t,n)=>/* @__PURE__ */re($r,{open:!0,onClose:()=>d(e.id),title:e.label,size:"md",autoHeight:!0,windowKey:e.id,children:/* @__PURE__ */re(Se,{error:t,onReload:n})}),children:/* @__PURE__ */re(Bt,{spec:Je(e),children:/* @__PURE__ */re(Yr,{windowId:e.id,children:"page"===e.type?/* @__PURE__ */re(Ge,{item:e,onClose:()=>d(e.id),accentRgb:n}):/* @__PURE__ */re(et,{item:e,onClose:()=>d(e.id),onMinimize:()=>{},accentRgb:n})})})})},e.id)})]})}var gt=null,bt=/* @__PURE__ */new Set;function vt(){return gt}function xt(e){if(gt!==e){gt=e;for(const e of bt)e()}}function kt(e){return bt.add(e),()=>{bt.delete(e)}}var Et=!1,Ct={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0},Mt=()=>{};function Nt(e){Et=e,Ct={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0}}function St(e,t){Et&&("submenu"===e?Ct.submenus++:Ct.menus++,Ct.menuKey=t)}function Lt(e){if(!Et)return Mt;const t=performance.now();let n=!1;return()=>{if(n)return;if(n=!0,!Et)return;const r=performance.now()-t;"move"===e?Ct.moveMs+=r:Ct.resizeMs+=r}}function Tt(){const e=Ct;return Ct={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0},e}var zt=/* @__PURE__ */new Set(["button","a","input","select","textarea","kbd"]),At=/* @__PURE__ */new Set(["svg"]);function Dt(e){const t=[],n={text:"",accessories:[]};return It(e,n,t),n.text=t.join("").replace(/\s+/g," ").trim(),n}function It(e,t,n){if(null==e||"boolean"==typeof e)return;if("string"==typeof e||"number"==typeof e)return void n.push(String(e));if(Array.isArray(e))return void e.forEach(e=>It(e,t,n));if(!V(e))return;const r=e;if(r.type!==d)if(r.type!==_){if("string"==typeof r.type){if(At.has(r.type))return;if(!zt.has(r.type))return n.push(" "),J.toArray(r.props.children).forEach(e=>It(e,t,n)),void n.push(" ")}t.accessories.push(G(r,{key:`title-part-${t.accessories.length}`}))}else J.toArray(r.props.children).forEach(e=>It(e,t,n));else void 0===t.copy&&"string"==typeof r.props.text&&r.props.text&&(t.copy=r.props.text)}var Pt=/* @__PURE__ */new Map,Wt=/* @__PURE__ */new Set,Kt=0;function Ot(){Kt++,Wt.forEach(e=>e())}function $t(e){return Pt.get(e)}function Rt(e){return Wt.add(e),()=>{Wt.delete(e)}}function Ft(){return Kt}var qt=R(""),jt=R(null);function Bt({spec:e,children:t}){/* @__PURE__ */
|
|
45
|
+
return re(jt.Provider,{value:e,children:t})}var Ht=/* @__PURE__ */new Set(["button","input","textarea","select","kbd","svg"]),Yt='button[type="submit"], button[data-submit], button.btn-submit, button.bg-green-600, button.bg-blue-600',Ut='button, a[href], summary, [role="button"], [role="link"], [role="menuitem"], select';function Xt(e){return Vt(e).replace(/\s+/g," ").trim()}function Vt(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(Vt).join("");if(V(e)){const t=e,n="string"==typeof t.type?t.type:"";return Ht.has(n)?"":` ${Vt(t.props?.children)} `}return""}function _t(e){const t=F(qt);H(()=>{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 Jt={};function Gt(e,t,n){const r=F(qt);H(()=>{if(!r)return;Jt[r]||(Jt[r]=[]);const o={label:e,icon:n,onClick:t};return Jt[r].push(o),()=>{Jt[r]=(Jt[r]||[]).filter(e=>e!==o)}},[r,e,t,n])}function Qt({title:e}){const t=B(null);return H(()=>{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__ */re("span",{ref:t,style:{display:"none"},"aria-hidden":"true"})}function Zt(e){}var en=R(null);function tn(){return F(qt)}function nn(){const e=U(fr,pr),t=F(en);return t?.active??(kn.length<=1||null!=e)}function rn({children:e,position:t="right",quiet:n=!1}){const r=F(en),[o,i]=Y(null);return H(()=>{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?ie(e,o):null}function on({onClick:e,children:t,className:n}){const r=F(en);/* @__PURE__ */
|
|
46
|
+
return re("button",{type:"button",onClick:async()=>{if(r?.isDirty){const{confirm:e}=await(import("./ConfirmDialog-X2DPOYWO.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 an="erp_window_positions",ln={};try{const e=localStorage.getItem(an);e&&(ln=JSON.parse(e))}catch{}var sn=null;function cn(){sn&&clearTimeout(sn),sn=setTimeout(()=>{try{localStorage.setItem(an,JSON.stringify(ln))}catch{}},500)}var dn="erp_activation_order",un=[];try{const e=localStorage.getItem(dn),t=e?JSON.parse(e):null;Array.isArray(t)&&t.every(e=>"string"==typeof e)&&(un=t)}catch{}var hn=null;function mn(){hn&&clearTimeout(hn),hn=setTimeout(()=>{try{localStorage.setItem(dn,JSON.stringify(un))}catch{}},500)}function pn(e,t){ln[e]||(ln[e]=t,cn())}function fn(e){return ln[e]?{...ln[e]}:null}function wn(e,t){ln[e]=t,cn()}function yn(){const r=e(),o=t();let i=!1;for(const e of Object.keys(ln))n(ln[e],r,o)&&(delete ln[e],i=!0);i&&cn()}var gn={sm:384,md:512,lg:672,xl:896,"2xl":1152,"3xl":1408},bn=4e3,vn=()=>{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"},xn={small:.8,medium:1,large:1.25,maximized:1.25},kn=[],En=/* @__PURE__ */new Set,Cn=/* @__PURE__ */new Set,Mn=0,Nn=/* @__PURE__ */new Map;var Sn=0;function Ln(){return Sn}function Tn(){Sn++,En.forEach(e=>e())}var zn=/* @__PURE__ */new Map,An=/* @__PURE__ */new Map,Dn=/* @__PURE__ */new Map;function In(){for(let e=kn.length-1;e>=0;e--){const t=Dn.get(kn[e]);if(t?.tab)return t.owner}return null}function Pn(){return U(fr,In,()=>null)}var Wn=/* @__PURE__ */new Set;var Kn=null;function On(e){Kn=null,Bn(e)}function $n(e){Kn=e;const t=zn.get(e);t&&On(t)}function Rn(e){Kn===e&&(Kn=null)}function Fn(e,t,n){if(n&&Dn.set(e,n),t)if(zn.set(t,e),An.set(e,t),Wn.delete(t)){kn.unshift(e);const n=un.indexOf(t);-1!==n&&un.splice(n,1),un.unshift(t),mn()}else!function(e,t){const n=un.indexOf(t);if(-1===n)return void kn.push(e);let r=kn.length;for(let e=0;e<kn.length;e++){const t=An.get(kn[e]);if(t&&un.indexOf(t)>n){r=e;break}}kn.splice(r,0,e)}(e,t),-1===un.indexOf(t)&&(un.push(t),mn());else kn.push(e);Tn(),window.dispatchEvent(new CustomEvent("modal-reorder")),t&&Kn===t&&On(e)}function qn(e){return e?Dn.get(e)?.owner??An.get(e)??null:null}var jn=/* @__PURE__ */new Set;function Bn(e){const t=qn(pr()),n=kn.indexOf(e);-1!==n&&kn.splice(n,1),kn.push(e);const o=Dn.get(e);if(o?.root&&o.tab&&r()){const e=kn.filter(e=>{const t=Dn.get(e);return!!t&&!t.root&&t.owner===o.owner});for(const t of e)kn.splice(kn.indexOf(t),1),kn.push(t)}Cn.delete(e);const i=An.get(e);if(i){const e=un.indexOf(i);-1!==e&&un.splice(e,1),un.push(i),mn(),Kn&&Kn!==i&&(Kn=null)}Tn(),window.dispatchEvent(new CustomEvent("modal-reorder"));const a=qn(pr());a&&a!==t&&jn.forEach(e=>e(a))}function Hn(e){const t=kn.indexOf(e);-1!==t&&kn.splice(t,1),Cn.add(e),Nn.set(e,++Mn);const n=An.get(e);if(n){const e=un.indexOf(n);-1!==e&&(un.splice(e,1),mn())}Tn(),window.dispatchEvent(new CustomEvent("modal-reorder"))}var Yn=/* @__PURE__ */new Set;var Un=8,Xn=32;function Vn(){return e()}var _n=40,Jn=80,Gn=384,Qn=400;function Zn(e,t=Vn()){const n=Math.min(Math.max(e.x,t.x+Jn-e.w),t.x+t.w-Jn),r=Math.min(Math.max(e.y,t.y),t.y+t.h-_n);return n===e.x&&r===e.y?e:{...e,x:n,y:r}}function er(e){const t=e.getBoundingClientRect();if(0===t.width||0===t.height)return!0;const n=Vn();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 tr(e){const t=Vn(),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 nr=null;function rr(e){const t=(nr||((nr=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(nr)),nr);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 or(){nr&&(nr.style.opacity="0",nr.style.display="none")}var ir=[{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"}],ar=350,lr=200;function sr({maximized:e,onToggleMax:t,onSnap:n,buttonClassName:r,strings:o}){const[i,a]=Y(!1),l=B(void 0),s=B(void 0);H(()=>()=>{clearTimeout(l.current),clearTimeout(s.current)},[]);const c=()=>{clearTimeout(s.current),l.current=setTimeout(()=>a(!0),ar)},d=()=>{clearTimeout(l.current),s.current=setTimeout(()=>a(!1),lr)};/* @__PURE__ */
|
|
47
|
+
return ne("span",{className:"relative inline-flex",onMouseEnter:c,onMouseLeave:d,children:[
|
|
48
|
+
/* @__PURE__ */re("button",{onClick:t,onFocus:c,onBlur:d,title:e?o.windowed:o.maximize,className:r,children:e?"❐":"⤢"}),i&&/* @__PURE__ */re("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:ir.map(({zone:e,labelKey:t,region:r})=>/* @__PURE__ */re("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__ */re("span",{"aria-hidden":"true",className:`absolute rounded-sm bg-blue-500/70 ${r}`,style:{margin:2}})},e))})]})}var cr="rosh-gesture-style";var dr={se:"nwse-resize",nw:"nwse-resize",sw:"nesw-resize",ne:"nesw-resize",n:"ns-resize",s:"ns-resize",e:"ew-resize",w:"ew-resize"},ur=4;function hr(e,t,n,r){!function(){if("undefined"==typeof document||document.getElementById(cr))return;const e=document.createElement("style");e.id=cr,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=Lt(r);let a=!1;return()=>{if(!a){a=!0,i();try{e.releasePointerCapture(t)}catch{}o.remove(),document.body.classList.remove("rosh-gesturing")}}}function mr(e){const t=kn.indexOf(e);if(-1===t)return-1;const n=C.window+t*C.windowStep,o=Dn.get(e);if(!o||o.root||!o.tab||!r())return n;let i=-1;for(const[e,t]of Dn){if(!t.root||t.owner!==o.owner)continue;const n=kn.indexOf(e);-1!==n&&(i=Math.max(i,C.window+n*C.windowStep))}return i>=n?i+2+Math.min(t,7):n}function pr(){return kn[kn.length-1]||null}function fr(e){return En.add(e),()=>{En.delete(e)}}"undefined"!=typeof window&&window.addEventListener("deactivate-all-modals",function(){for(let e=kn.length-1;e>=0;e--)Yn.has(kn[e])||kn.splice(e,1);un=un.filter(e=>{const t=zn.get(e);return null!=t&&Yn.has(t)}),mn(),Tn(),window.dispatchEvent(new CustomEvent("modal-reorder"))});var wr="modal-close-request";function yr(e){U(fr,Ln);const t=F(en);if(kn.length<=1)return!0;if(e){const t=zn.get(e);if(null!=t)return pr()===t}return t?.active??null!=pr()}var gr=!1,br=/* @__PURE__ */new Set;function vr(e){return br.add(e),()=>br.delete(e)}function xr(){return gr}function kr(e){gr!==e&&(gr=e,br.forEach(e=>e()))}function Er(){kr(!gr)}function Cr(){kr(!1)}var Mr=null,Nr=/* @__PURE__ */new Set;function Sr(e){return Nr.add(e),()=>Nr.delete(e)}function Lr(){return Mr}function Tr(e){Mr!==e&&(Mr=e,Nr.forEach(e=>e()))}var zr=null,Ar=/* @__PURE__ */new Set;function Dr(e){return Ar.add(e),()=>Ar.delete(e)}function Ir(){return zr}function Pr(e){zr!==e&&(zr=e,Ar.forEach(e=>e()))}function Wr(){if(!zr)return void kr(!1);Tr(zr),Pr(null),kr(!1)}function Kr(){kr(!gr),window.dispatchEvent(new CustomEvent("modal-split-view"))}function Or(){const e=U(vr,xr),[t,n]=Y(e),[r,o]=Y(e);return H(()=>{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?ie(
|
|
49
|
+
/* @__PURE__ */re("div",{onMouseDown:e=>{e.stopPropagation(),kr(!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 $r({open:t,onClose:i,title:c,icon:d,copyText:u,size:h="lg",dirty:m=!1,onNext:p,onPrev:f,footer:g,bodyScroll:E,onMinimize:N,initialBox:P,actions:W,actionsLeft:K,editing:R=!1,allowPinOnTop:q,initialPosition:_,widget:J,compact:Z,appStyle:ee,flushBody:te,autoHeight:le,autoMinHeight:se,autoWidth:ce,widgetMenu:de,dimensions:ue,windowKey:he,openedFromKey:me,accentRgb:pe,children:fe}){const we=w(),[ye,ge]=Y(0),[be,xe]=Y(!1),ke=B(null),Ee=B(0);H(()=>{Ee.current=ye},[ye]);const Ce=X(e=>{we&&(ke.current={startX:e.clientX,startY:e.clientY,pointerId:e.pointerId},xe(!0),xt(me??null))},[we,me]),Me=U(kt,vt);H(()=>{if(!be)return;const e=e=>{if(!ke.current)return;const t=e.clientX-ke.current.startX;if(Math.abs(e.clientY-ke.current.startY)>Math.abs(t)+12)return ke.current=null,xe(!1),ge(0),void xt(null);ge(Math.max(0,t))},t=()=>{if(!ke.current)return;const e=.3*window.innerWidth,t=Ee.current>e;ke.current=null,xe(!1),t?(ge(window.innerWidth),setTimeout(()=>{i(),ge(0),xt(null)},180)):(ge(0),xt(null))};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),window.addEventListener("pointercancel",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t),window.removeEventListener("pointercancel",t)}},[be]);const[Ne,Se]=Y(c),ze=O(),De=ze.window;H(()=>{Se(c)},[c]);const Ie=Q(()=>Xt(Ne).trim()||void 0,[Ne]),[Pe,We]=Y(!1),Ke=B(!1),[Oe,$e]=Y(!1),[Re,Fe]=Y(null),qe=F(jt),je=F(ve),{prefs:Be,save:He}=y(),Ye=!!Be.window_accent_stripe,Ue=Be.favorite_documents||[],Ve=!!qe&&Ue.some(e=>e.entityType===qe.entityType&&e.entityId===qe.entityId),Je=X(()=>{if(!qe)return;const e=Ve?Ue.filter(e=>!(e.entityType===qe.entityType&&e.entityId===qe.entityId)):[...Ue,{entityType:qe.entityType,entityId:qe.entityId,label:qe.label}];He({favorite_documents:e})},[qe,Ve,Ue,He]),[Ge,Qe]=Y(null),[Ze,et]=Y("top-right"===_?"right":"left"),tt=B(!1),nt=B(null);j(()=>{const e=nt.current;e&&(pe?e.style.setProperty("--window-accent-rgb",pe):e.style.removeProperty("--window-accent-rgb"))},[pe]);const rt=B(!1),ot=B(null),it=B(null),at=B(null),[lt,st]=Y(!1),ct=B(null),dt=!!(g||W||K)||lt,ut=F(Te),ht=""!==F(qt),mt=B(null);mt.current=je?{owner:je.key,tab:je.tab,root:!ht}:null;const pt=he||(je&&!ht?je.key:null),ft=!!ut&&!ht&&ut.enabled&&ut.hasState&&(R||ut.declaredEditable)&&!ut.handMounted&&dt&&!J&&!Z&&!ee&&!we,wt=/* @__PURE__ */re($,{name:"window",fallback:I,className:"h-4 w-4 text-gray-400",strokeWidth:1.5}),yt=d&&V(d)?G(d,{className:`h-4 w-4 ${d.props?.className??""}`.trim()}):d??wt,gt=()=>/* @__PURE__ */re("button",{onPointerDown:e=>e.stopPropagation(),onClick:e=>{e.stopPropagation();const t=e.currentTarget.getBoundingClientRect();Fe(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:yt}),bt=40,{minimize:Et,items:Ct,restoreIfMinimized:Mt,openWindows:Nt}=_e(),St=B(`modal-${Math.random().toString(36).slice(2,8)}`).current;H(()=>{if(J)return Yn.add(St),()=>{Yn.delete(St)}},[J,St]),H(()=>{const e=e=>{const t=e.detail;t?.id===St&&Se(t.title)};return window.addEventListener("window-title-update",e),()=>window.removeEventListener("window-title-update",e)},[St]);const[Lt,Tt]=Y(C.window),zt=function(e){const t=U(fr,pr);return kn.length<=1||t===e}(St),At=function(e){return U(fr,()=>Cn.has(e))}(St),It=U(vr,xr),Wt=U(Sr,Lr),Kt=U(Dr,Ir),$t=!q&&!J,Rt=It&&$t,[Ft,Bt]=Y(!1),Ht=Rt&&Kt===St,[Vt,_t]=Y(!1),Gt=Vt&&$t&&Wt===St?"picked":null,Qt=B(Rt);H(()=>{if(Qt.current&&!Rt){_t(!0);const e=setTimeout(()=>{_t(!1),Mr===St&&Tr(null)},700);return Qt.current=Rt,()=>clearTimeout(e)}Qt.current=Rt},[Rt,St]),H(()=>{Rt||Bt(!1)},[Rt]),H(()=>{const e=it.current,t=at.current;if(!e&&!t)return;const n=e=>e?Array.from(e.children).filter(e=>"shell"!==e.dataset.undoControls).length:0,r=()=>st(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()},[t]),H(()=>{const e=e=>{if(e.target.closest('button[type="submit"]')&&nt.current){const t=nt.current.querySelector("form");t&&(e.preventDefault(),t.requestSubmit())}},t=it.current,n=at.current;return t&&t.addEventListener("click",e),n&&n.addEventListener("click",e),()=>{t&&t.removeEventListener("click",e),n&&n.removeEventListener("click",e)}},[t]);const Zt=B(!1),tn=X(e,[]),nn=X(()=>{const t=e(),n=ue?ue[0]:gn[h]||672,o=t.w-80,i=t.h-80,a=Math.min(n,o),l=xn[vn()],s=ue?Math.min(ue[1],i):(()=>{const e=("sm"===h?500:"md"===h?600:"lg"===h?700:"xl"===h?800:920)*l;return Math.max(320,Math.min(e,t.h-80))})(),c="cascade"!==(getComputedStyle(document.documentElement).getPropertyValue("--window-position")?.trim()||"cascade")||r()?0:30*(kn.length-1),d=Math.max(bt,(i-s)/2),u=(o-a)/2,m=t.h-bt-s-d;return"top-right"===_?{x:t.x+t.w-a-bt,y:t.y+bt,w:a,h:s}:"top-left"===_?{x:t.x+bt,y:t.y+bt,w:a,h:s}:{x:t.x+Math.max(bt,(o-a)/2+bt)+Math.min(c,Math.max(0,u)),y:t.y+d+Math.min(c,Math.max(0,m)),w:a,h:s}},[h]),rn=B(!1);t||(rn.current=!1);const on=he||u||null;H(()=>{if(!t)return;Fn(St,on,mt.current??void 0),he||Bn(St),Zt.current=!1,Tt(mr(St));const e=()=>{Tt(mr(St))},n=()=>{},r=e=>{if(!e)return!1;if(e.windowKey)return e.windowKey===he;if(!e.label)return!1;const t=nt.current?.querySelector("[data-window-title]");return!!t?.textContent?.includes(e.label)},o=e=>{if(!r(e.detail))return;if(Bn(St),Mn.current)return;const t=Vn(),n=Math.min(Kn.current.w,t.w-40),o=Math.min(Kn.current.h,t.h-40),i=t.x+(t.w-n)/2,a=t.y+(t.h-o)/2;dn({x:i,y:a,w:n,h:o}),Wn(!1)},i=e=>{const t=e.detail;r(t)&&(Bn(St),Fe({x:t.x,y:t.y}))},a=e=>{if(e.detail?.windowKey!==he)return;Bn(St);const t=Kn.current,n=function(e,t=Vn()){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=nt.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)}dn(n)};return window.addEventListener("modal-reorder",e),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=kn.indexOf(e);-1!==t&&(kn.splice(t,1),Tn()),Cn.delete(e),Nn.delete(e),Dn.delete(e);const n=An.get(e);n&&(An.delete(e),zn.delete(n))}(St),window.removeEventListener("modal-reorder",e),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"))}},[t,St,on,tn]);const an=!J&&"maximized"===vn(),[sn,dn]=Y(()=>{if(on&&ln[on]){const e={...ln[on]};return ue&&(e.w=ue[0],le||(e.h=ue[1])),Zn(e)}return P?{x:P.x,y:P.y,w:P.w,h:P.h}:an?tn():nn()}),[un,hn]=Y(()=>!le),[mn,pn]=Y(()=>r()),fn=B(mn),wn=B(null);H(()=>{const e=()=>{const e=r();e!==fn.current&&wn.current?.(e),fn.current=e,pn(e),Tt(mr(St))};return window.addEventListener("react-os-shell:layout-mode-changed",e),()=>window.removeEventListener("react-os-shell:layout-mode-changed",e)},[St]);const yn=mn&&!!je?.tab&&!ht&&!J&&!we,En=yn,Mn=B(En);Mn.current=En;const Sn=Pn(),Ln=mn&&!!je?.tab&&!J&&!we&&!It&&Sn!==je.key,[In,Wn]=Y(()=>on&&ln[on]||P?En:En||an),Kn=B(sn);Kn.current=sn;const On=B(In);j(()=>{On.current=In},[In]),j(()=>{if(un||yn)return;const e=nt.current,t=ot.current;if(!e||!t)return;const n=se??(J?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,f=c.offsetHeight;t.style.flex=u,t.style.height=m,t.style.overflowY=h;const w=c.offsetHeight>f+4,y=Math.max(n,window.innerHeight-r-Math.max(0,Kn.current.y)-24),g=w?Math.min(Kn.current.h,y):Math.min(Math.max(n,d+p),y),b=Math.abs(g-o)>1;b&&(o=g,dn(e=>Math.abs(e.h-g)>1?{...e,h:g}:e)),J||(g<=n?i&&(clearTimeout(i),i=null):(b||null===i)&&(i&&clearTimeout(i),i=setTimeout(()=>{const e=o;l(),o===e&&hn(!0)},160)))},s=new ResizeObserver(l);l(),ct.current&&s.observe(ct.current);const c=new MutationObserver(l);return c.observe(t,{childList:!0,subtree:!0,characterData:!0}),()=>{s.disconnect(),c.disconnect(),i&&clearTimeout(i)}},[un,J,se,dt,yn]),j(()=>{if(!le||!un||J||!t)return;const e=ct.current;if(!e)return;let n=e.offsetHeight;const r=new ResizeObserver(()=>{if(!e.isConnected)return;const t=e.offsetHeight,r=t-n,o=t>0!=n>0;if(n=t,!o||0===r||In)return;if(document.body.classList.contains("rosh-gesturing"))return;const i=se??240,a=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-height"))||0,l=Math.max(i,window.innerHeight-a-Math.max(0,Kn.current.y)-24);dn(e=>({...e,h:Math.min(Math.max(i,e.h+r),l)}))});return r.observe(e),()=>r.disconnect()},[le,un,J,t,In,se]);const $n=!1!==ce&&!J&&!ee&&!we,[Rn,qn]=Y(()=>!$n);j(()=>{if(Rn||!t)return;if(!$n||In)return void qn(!0);const n=nt.current,r=ot.current;if(!n||!r)return;const o=/* @__PURE__ */new WeakSet;let i=Kn.current.w,c=0;const d=()=>qn(!0),u=()=>{c=0;const t=Kn.current;if(Math.abs(t.w-i)>1||document.body.classList.contains("rosh-gesturing"))return void d();const u=e(),h=u.w-80;if(t.w>=h)return void d();const m=[],p=[];for(const e of[r,...Array.from(r.querySelectorAll("*"))]){const t=e.scrollWidth-e.clientWidth;if(t<=4||o.has(e))continue;const n=getComputedStyle(e).overflowX;"auto"!==n&&"scroll"!==n||(m.push(e),p.push(t))}if(!m.length)return;const f=Math.min(h,t.w+Math.max(...p)),w=f-t.w,y=n.style.width;n.style.width=`${f}px`;const g=m.map((e,t)=>({over:p[t],residual:e.scrollWidth-e.clientWidth}));n.style.width=y,g.forEach((e,t)=>{a(e,w)||o.add(m[t])});const b=l(t,s(t.w,w,g),u,bt);b!==t&&(i=b.w,dn(b))};u();const h=new MutationObserver(()=>{c||(c=requestAnimationFrame(u))});h.observe(r,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["style","class","hidden"]});const m=setTimeout(d,bn);return()=>{h.disconnect(),c&&cancelAnimationFrame(c),clearTimeout(m)}},[Rn,t,$n,In]);const jn=B(null),_n=!(!je?.tab||ht||J||we);wn.current=t=>{if(!_n)return;if(t)return jn.current||(jn.current={box:{...Kn.current},maximized:On.current}),void(On.current=!0);const r=jn.current;jn.current=null;const o=e();if(r?.maximized)return On.current=!0,Wn(!0),void dn(o);const i=r?.box??(on?ln[on]:void 0);if(On.current=!1,Wn(!1),i&&!n(i,o,!1)){const e={...i};ue&&(e.w=ue[0],le||(e.h=ue[1])),dn(Zn(e))}else dn(nn())},H(()=>{En&&(On.current=!0,Wn(!0),dn(tn()))},[En,tn]),H(()=>{if(J)return;const e=()=>{const e=on?ln[on]:void 0;if(On.current=!1,Wn(!1),e){const t={...e};ue&&(t.w=ue[0],le||(t.h=ue[1])),dn(Zn(t))}else dn(nn())};return window.addEventListener("react-os-shell:restore-windowed",e),()=>window.removeEventListener("react-os-shell:restore-windowed",e)},[J,nn,on]),H(()=>{t&&on&&!yn&&(ln[on]=sn,cn()),t&&window.dispatchEvent(new CustomEvent("modal-geometry"))},[sn,t,on,yn]),H(()=>{if(!t)return;const e=()=>{On.current?dn(tn()):document.body.classList.contains("rosh-gesturing")||dn(Zn)};window.addEventListener("resize",e),window.addEventListener(o,e);let n=null;return In&&(n=new MutationObserver(e),n.observe(document.body,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["class"]})),()=>{window.removeEventListener("resize",e),window.removeEventListener(o,e),n?.disconnect()}},[t,In,tn]),H(()=>{if(t&&(We(!1),Ke.current=!1,tt.current=!1,qn(!$n),!Mn.current)){if(on&&ln[on]){const e=ln[on];return void dn(t=>Zn({...e,...le?{h:t.h}:{},...$n?{x:t.x,w:t.w}:{}}))}P&&(dn({x:P.x,y:P.y,w:P.w,h:P.h}),Wn(P.maximized))}},[t]),H(()=>{if(!t||"auto"!==m)return;let e;const n=t=>{nt.current?.contains(t.target)&&!Ke.current&&(Ke.current=!0,e=setTimeout(()=>We(!0),0))};return document.addEventListener("input",n,!0),document.addEventListener("change",n,!0),()=>{clearTimeout(e),document.removeEventListener("input",n,!0),document.removeEventListener("change",n,!0)}},[t,m]);const Jn="auto"===m?Pe:!0===m,er=je&&!ht?je.key:null,nr=Q(()=>Dt(Ne),[Ne]),ir=B({shortcutSpec:qe,isOnDesktop:Ve,toggleDesktopShortcut:Je,taskbarStrings:ze.taskbar});j(()=>{ir.current={shortcutSpec:qe,isOnDesktop:Ve,toggleDesktopShortcut:Je,taskbarStrings:ze.taskbar}});const ar=B(null);ar.current||(ar.current={open:(e,t)=>Fe({x:e,y:t}),items:()=>{const e=ir.current,t=[];e.shortcutSpec&&t.push({label:e.isOnDesktop?e.taskbarStrings.removeFromDesktop:e.taskbarStrings.addToDesktop,onSelect:e.toggleDesktopShortcut});for(const e of Jt[St]||[])t.push({label:e.label,icon:e.icon,onSelect:e.onClick});return t}}),H(()=>{t&&er&&function(e,t){const n=Pt.get(e);n&&n.title===t.title&&n.dirty===t.dirty&&n.copy===t.copy&&n.menu===t.menu||(Pt.set(e,t),Ot())}(er,{title:nr.text||Ie,dirty:Jn,copy:nr.copy,menu:ar.current??void 0})},[t,er,Ie,Jn,nr.text,nr.copy]),H(()=>{if(t&&er)return()=>{return e=er,void(Pt.delete(e)&&Ot());var e}},[t,er]),Xe(!(he||!t)&&Jn);const lr=X(async()=>{if(!tt.current){if(Jn||"auto"===m&&Ke.current){tt.current=!0;const e=Ie,t=await b({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(tt.current=!1,!t)return}i()}},[Jn,m,i,Ie]);j(()=>{if(!t||!pt)return;const e=e=>{e.detail?.windowKey===pt&&lr()};return window.addEventListener(wr,e),()=>window.removeEventListener(wr,e)},[t,pt,lr]);const cr=B(null),yr=X(e=>{if(0!==e.button)return;if(e.target.closest("button, input, a, kbd, select, textarea"))return;if(Fe(null),Bn(St),Mn.current)return void e.preventDefault();e.preventDefault();const t=e.currentTarget,n=e.pointerId;let r=null;const o=e.clientX,i=e.clientY,a=nt.current,l=a?.getBoundingClientRect();let s,c,d,u;if(cr.current){const t=cr.current;cr.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:Kn.current.x,c=l?l.top:Kn.current.y,d=l?l.height:Kn.current.h,u=l?l.width:Kn.current.w;Wn(!1),dn(e=>({...e,x:s,y:c,w:u,h:d}));let h=null;const m=e=>{if(!r){if(Math.abs(e.clientX-o)<ur&&Math.abs(e.clientY-i)<ur)return;r=hr(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)`),Kn.current={...Kn.current,x:l,y:d},!J){const t=function(e,t){const n=Vn(),r=e<=n.x+Un,o=e>=n.x+n.w-Un,i=t<=n.y+Un,a=t>=n.y+n.h-Un,l=e<=n.x+Xn,s=e>=n.x+n.w-Xn,c=t<=n.y+Xn,d=t>=n.y+n.h-Xn;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?rr(tr(t)):or())}},p=()=>{window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",p),r?.(),or();const e=Zn({...Kn.current});if(Kn.current=e,!J&&h){cr.current={x:s,y:c,w:u,h:d};const e=tr(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 dn(e)}if(J){const t=e.x+e.w/2,n=window.innerWidth/2;et(t>n?"right":"left")}a&&(a.style.left=`${e.x}px`,a.style.top=`${e.y}px`,a.style.transform="",a.style.transition=""),dn(e)};window.addEventListener("pointermove",m),window.addEventListener("pointerup",p)},[]),gr=X((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=nt.current,s=l?.getBoundingClientRect(),c=s?s.left:Kn.current.x,d=s?s.top:Kn.current.y,u=s?s.width:Kn.current.w,h=s?s.height:Kn.current.h,m="sw"===t||"nw"===t||"w"===t,p="ne"===t||"nw"===t||"n"===t,f="se"===t||"ne"===t||"e"===t,w="se"===t||"sw"===t||"s"===t;Wn(!1),dn({x:c,y:d,w:u,h:h}),Kn.current={x:c,y:d,w:u,h:h};let y=0,g=null;const b=()=>{if(y=0,!g)return;const e=g;g=null,Kn.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`)},v=e=>{if(!o){if(Math.abs(e.clientX-i)<ur&&Math.abs(e.clientY-a)<ur)return;o=hr(n,r,dr[t],"resize")}g=((e,t)=>{let n=c,r=d,o=u,i=h;if(f&&(o=Math.max(Gn,u+e)),w&&(i=Math.max(Qn,h+t)),m){const t=Math.max(Gn,u-e);n=c+u-t,o=t}if(p){const e=Math.max(Qn,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(b))},x=()=>{window.removeEventListener("pointermove",v),window.removeEventListener("pointerup",x),y&&cancelAnimationFrame(y),b(),o?.(),dn({...Kn.current})};window.addEventListener("pointermove",v),window.addEventListener("pointerup",x)},[]),br=X(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(),Bn(St),"Enter"===e.key)return void(In?(Wn(!1),dn(nn())):(Wn(!0),dn(tn())));const[n,r]=t;if(e.ctrlKey||e.metaKey){const e=()=>{cr.current||(cr.current={...Kn.current})};if(r<0)return e(),Wn(!0),void dn(tn());if(r>0){if(In)return Wn(!1),void dn(nn());if(cr.current){const e=Zn(cr.current);return cr.current=null,Kn.current=e,void dn(e)}return void Hn(St)}e(),Wn(!1);const t=tr(n<0?"left":"right");return Kn.current=t,void dn(t)}if(In)return;const o=Kn.current,i=e.shiftKey?{...o,w:Math.max(Gn,o.w+24*n),h:Math.max(Qn,o.h+24*r)}:Zn({...o,x:o.x+24*n,y:Math.max(0,o.y+24*r)});Kn.current=i,dn(i)},[St,In,nn,tn]),Er=X(e=>{cr.current||(cr.current={...Kn.current}),Wn(!1);const t=tr(e);Kn.current=t,dn(t),Bn(St)},[St]),Cr=En||Rt?{}:{tabIndex:0,role:"group","aria-label":Ie?`${Ie} — ${De.windowSuffix}`:De.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:br},Nr=()=>{Wn(!0),dn(tn())},zr=X(()=>{const e=nt.current;if(!e)return;const t=e.querySelector("form");if(t)t.requestSubmit();else{const t=e.querySelector(Yt);t&&!t.disabled&&t.click()}},[]);H(()=>{if(!t)return;if(J)return;const e=e=>{if(kn[kn.length-1]===St&&"Enter"===e.key){const t=e.target;if("TEXTAREA"===t.tagName||t.isContentEditable)return;if(e.metaKey||e.ctrlKey)e.preventDefault(),zr();else{if("INPUT"===t.tagName&&t.closest("form"))return;if(!(t instanceof Element&&nt.current?.contains(t)))return;if(t.closest(Ut))return;e.preventDefault()}}};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[t,zr,St,J]),H(()=>{if(!t)return;const e=e=>{kn[kn.length-1]===St&&((e.metaKey||e.ctrlKey)&&"s"===e.key?(e.preventDefault(),document.dispatchEvent(new CustomEvent("modal-save",{detail:{modalId:St}})),Ke.current=!1,We(!1)):e.altKey&&e.shiftKey&&("KeyD"===e.code||"D"===e.key||"d"===e.key)&&(e.preventDefault(),document.dispatchEvent(new CustomEvent("modal-duplicate",{detail:{modalId:St}}))))};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[t]),H(()=>{if(!t)return;if(J)return;const e=e=>{if("Escape"===e.key&&kn[kn.length-1]===St){if(M(e))return e.preventDefault(),void e.stopPropagation();if(yn&&!R)return;e.preventDefault(),e.stopPropagation(),lr()}};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[t,lr,St,J,yn,R]);const Ar=t&&(void 0!==p||void 0!==f),Pr=X(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(H(()=>{if(!t)return;const e=e=>{if(kn[kn.length-1]!==St)return;const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.target.isContentEditable||("j"===e.key&&Ar&&(e.preventDefault(),p?p():Pr("bottom")),"k"===e.key&&Ar&&(e.preventDefault(),f?f():Pr("top"))))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t,p,f,Ar,Pr,St]),!t||rn.current)return null;const Wr=Rt?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=Vn(),u=(d.w-20*(o+1))/o,h=(d.h-14*(i+1)-22*i)/i,m=c?(o-s)*(u+20)/2:0;return{x:d.x+20+l*(u+20)+m,y:d.y+14+a*(h+14+22),w:u,h:h}}(St):null,Kr=Rt&&Wr?Math.min(Wr.w/sn.w,Wr.h/sn.h):1,Or=(()=>{if(Rt&&Wr){const e=Kr,t=sn.w*e,n=sn.h*e,r=Wr.x+(Wr.w-t)/2-sn.x,o=Wr.y+(Wr.h-n)/2-sn.y,i=Ft||Ht;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(Vt&&$t){const e="picked"===Gt;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})(),$r=/* @__PURE__ */ne("div",{children:[
|
|
50
|
+
/* @__PURE__ */ne("div",{ref:nt,"data-modal-panel":!0,"data-modal-id":St,"data-window-key":he||void 0,...q?{"data-utility":""}:{},...Oe?{"data-pinned-top":""}:{},...J?{"data-widget":""}:{},...je?{"data-window-owner":je.key}:{},...je&&!ht?{"data-window-root":""}:{},...yn?{"data-window-tab":""}:{},className:yn?"fixed flex flex-col overflow-hidden":"fixed rounded-(--radius-window) flex flex-col overflow-hidden "+(J?zt?"shadow-2xl":"shadow-lg":"border "+(zt?"shadow-2xl border-gray-200":"shadow-lg border-gray-300")),onMouseDownCapture:e=>{if(rt.current=!1,Rt){if(e.target.closest("[data-expose-close]"))return;return e.preventDefault(),e.stopPropagation(),Tr(St),kr(!1),void Bn(St)}if(!zt&&!J&&!Oe&&0===e.button){const t=e.target;t.closest("[data-modal-panel]")===nt.current&&t.closest("button, input, a, select, textarea")&&!t.closest("[data-window-chrome]")&&(e.preventDefault(),e.stopPropagation(),rt.current=!0,Fe(null),Bn(St),window.addEventListener("mouseup",()=>{setTimeout(()=>{rt.current=!1},0)},{once:!0}))}},onClickCapture:e=>{rt.current&&(rt.current=!1,e.preventDefault(),e.stopPropagation())},onMouseDown:e=>{if(Rt)return;Fe(null);e.target.closest("[data-modal-panel]")===nt.current&&(e.target.closest("button, input, a, select, textarea")||Bn(St))},style:we?{zIndex:Lt+1,top:0,left:0,right:0,bottom:"var(--mobile-bottom-nav, 56px)",width:"auto",height:"auto",transform:`translateX(${ye}px)`,transition:be?"none":"transform 180ms ease-out",...J?{display:"none"}:{},...Lt<0?{display:"none"}:{},...zt||Oe||Me&&he===Me?{}:{display:"none"}}:{zIndex:Oe?C.pinnedWindow:Lt+1,width:sn.w,height:sn.h,top:sn.y,...J&&"right"===Ze?{right:window.innerWidth-sn.x-sn.w}:{left:sn.x},...Lt<0&&!Oe?{display:"none"}:{},...Ln?{visibility:"hidden",pointerEvents:"none"}:{},...Or??{}},children:[we&&!J&&/* @__PURE__ */re("div",{onPointerDown:Ce,className:"absolute top-0 bottom-0 left-0 w-[22px] z-[5]",style:{touchAction:"pan-y"},"aria-hidden":"true"}),J?null:yn?je?.home?null:/* @__PURE__ */ne(oe,{children:[
|
|
51
|
+
/* @__PURE__ */re("h2",{"data-window-title":!0,className:"sr-only",children:nr.text||Ie}),(nr.accessories.length>0||Ar)&&/* @__PURE__ */ne("div",{"data-window-chrome":"","data-record-bar":"",className:"flex h-9 shrink-0 select-none items-center gap-3 border-b border-gray-200 px-4",style:{backgroundColor:"rgb(var(--window-content-rgb))"},children:[
|
|
52
|
+
/* @__PURE__ */re("div",{className:"flex min-w-0 flex-1 items-center gap-2 overflow-hidden",children:nr.accessories}),Ar&&/* @__PURE__ */ne("span",{className:"flex items-center gap-1 shrink-0 text-[10px] text-gray-400",children:[
|
|
53
|
+
/* @__PURE__ */re("kbd",{className:"rounded border border-gray-300 bg-gray-100 px-1.5 py-0.5 font-medium text-gray-500",children:"K"}),
|
|
54
|
+
/* @__PURE__ */re("span",{children:De.prev}),
|
|
55
|
+
/* @__PURE__ */re("kbd",{className:"rounded border border-gray-300 bg-gray-100 px-1.5 py-0.5 font-medium ml-1 text-gray-500",children:"J"}),
|
|
56
|
+
/* @__PURE__ */re("span",{children:De.next})]})]})]}):we?null:
|
|
57
|
+
/* @__PURE__ */ne("div",Z?{onPointerDown:yr,"data-window-chrome":"",...Cr,className:"flex items-center justify-between px-3 py-1.5 border-b border-gray-200 shrink-0 cursor-move select-none rounded-t-(--radius-window) focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400 "+(zt?"backdrop-blur-sm":""),style:{touchAction:"none",backgroundColor:zt?"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__ */ne("div",{"data-window-title":!0,title:Ie,className:"text-sm font-medium min-w-0 flex-1 truncate flex items-center gap-1.5",style:{color:zt?"var(--window-title-active, rgb(17 24 39))":"var(--window-title-inactive, rgb(156 163 175))"},children:[!Rt&>(),
|
|
59
|
+
/* @__PURE__ */re("span",{className:"truncate",children:Rt?Xt(Ne):Ne})]}),!Rt&&/* @__PURE__ */ne("div",{className:"flex items-center gap-1 shrink-0 ml-2",children:[q&&/* @__PURE__ */re("button",{onClick:()=>$e(e=>!e),title:Oe?De.unpin:De.pinOnTop,className:"p-0.5 rounded hover:bg-gray-200 "+(Oe?"text-blue-600":"text-gray-400 hover:text-gray-600"),children:/* @__PURE__ */re($,{name:"bookmark-square",fallback:L,className:"h-3 w-3",fill:Oe?"currentColor":"none",strokeWidth:1.5})}),
|
|
60
|
+
/* @__PURE__ */re("button",{type:"button",onClick:lr,className:"rounded p-0.5 text-gray-400 hover:text-gray-600 hover:bg-gray-200",children:/* @__PURE__ */re($,{name:"close",fallback:ae,className:"h-4 w-4"})})]})]}:ee?{onPointerDown:yr,"data-window-chrome":"",...Cr,className:"flex items-center justify-between px-3 py-1.5 border-b border-gray-200 shrink-0 cursor-move select-none rounded-t-(--radius-window) focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400 "+(zt?"backdrop-blur-sm":""),style:{touchAction:"none",backgroundColor:zt?"rgb(var(--window-header-rgb) / var(--active-header-opacity, 0.8))":"rgb(var(--window-header-rgb) / var(--inactive-header-opacity, 0.7))"},children:[
|
|
61
|
+
/* @__PURE__ */ne("div",{"data-window-title":!0,title:Ie,className:"text-sm font-medium min-w-0 flex-1 truncate flex items-center gap-1.5",style:{color:zt?"var(--window-title-active, rgb(17 24 39))":"var(--window-title-inactive, rgb(156 163 175))"},children:[!Rt&>(),
|
|
62
|
+
/* @__PURE__ */re("span",{className:"truncate",children:Rt?Xt(Ne):Ne})]}),!Rt&&/* @__PURE__ */ne("div",{className:"flex items-center gap-0.5 shrink-0 ml-2",children:[q&&/* @__PURE__ */re("button",{onClick:()=>$e(e=>!e),title:Oe?De.unpin:De.pinOnTop,className:"p-0.5 rounded hover:bg-gray-200 "+(Oe?"text-blue-600":"text-gray-400 hover:text-gray-600"),children:/* @__PURE__ */re($,{name:"bookmark-square",fallback:L,className:"h-3 w-3",fill:Oe?"currentColor":"none",strokeWidth:1.5})}),
|
|
63
|
+
/* @__PURE__ */re("button",{onClick:()=>Hn(St),title:De.minimize,className:"text-gray-400 hover:text-gray-600 px-1 py-0.5 rounded hover:bg-gray-200 text-xs leading-none",children:"─"}),!En&&/* @__PURE__ */re(sr,{maximized:In,onToggleMax:()=>{In?(Wn(!1),dn(nn())):Nr()},onSnap:Er,buttonClassName:"text-gray-400 hover:text-gray-600 px-1 py-0.5 rounded hover:bg-gray-200 text-xs leading-none",strings:De}),
|
|
64
|
+
/* @__PURE__ */re("button",{type:"button",onClick:lr,className:"rounded p-0.5 text-gray-400 hover:text-gray-600 hover:bg-gray-200",children:/* @__PURE__ */re($,{name:"close",fallback:ae,className:"h-4 w-4"})})]})]}:{onPointerDown:yr,"data-window-chrome":"",...Cr,className:"flex items-center justify-between px-4 py-2.5 border-b border-gray-200 shrink-0 cursor-move select-none rounded-t-(--radius-window) focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400 "+(zt?"backdrop-blur-sm":""),style:{touchAction:"none",backgroundColor:zt?"rgb(var(--window-header-rgb) / var(--active-header-opacity, 0.8))":"rgb(var(--window-header-rgb) / var(--inactive-header-opacity, 0.7))"},children:[
|
|
65
|
+
/* @__PURE__ */ne("div",{"data-window-title":!0,title:Ie,className:"text-base font-medium min-w-0 flex-1 truncate flex items-center gap-2",style:{color:zt?"var(--window-title-active, rgb(17 24 39))":"var(--window-title-inactive, rgb(156 163 175))"},children:[!Rt&>(),
|
|
66
|
+
/* @__PURE__ */re("span",{className:"truncate",children:Rt?Xt(Ne):Ne})]}),!Rt&&/* @__PURE__ */ne("div",{className:"flex items-center gap-1.5 shrink-0 ml-4",children:[Ar&&/* @__PURE__ */ne("span",{className:"flex items-center gap-1 mr-1 text-[10px] text-gray-400",children:[
|
|
67
|
+
/* @__PURE__ */re("kbd",{className:"rounded border border-gray-300 bg-gray-200 px-1.5 py-0.5 font-medium text-gray-500",children:"K"}),
|
|
68
|
+
/* @__PURE__ */re("span",{children:De.prev}),
|
|
69
|
+
/* @__PURE__ */re("kbd",{className:"rounded border border-gray-300 bg-gray-200 px-1.5 py-0.5 font-medium ml-1 text-gray-500",children:"J"}),
|
|
70
|
+
/* @__PURE__ */re("span",{children:De.next})]}),q&&/* @__PURE__ */re("button",{onClick:()=>$e(e=>!e),title:Oe?De.unpin:De.pinOnTop,className:"text-xs px-2 py-1 rounded hover:bg-gray-200 "+(Oe?"text-blue-600":"text-gray-400 hover:text-gray-600"),children:/* @__PURE__ */re($,{name:"bookmark-square",fallback:L,className:"h-3.5 w-3.5",fill:Oe?"currentColor":"none",strokeWidth:1.5})}),
|
|
71
|
+
/* @__PURE__ */re("button",{onClick:()=>Hn(St),title:De.minimize,className:"text-gray-400 hover:text-gray-600 text-xs px-2 py-1 rounded hover:bg-gray-200",children:"─"}),!En&&/* @__PURE__ */re(sr,{maximized:In,onToggleMax:()=>{In?(Wn(!1),dn(nn())):Nr()},onSnap:Er,buttonClassName:"text-gray-400 hover:text-gray-600 text-xs px-2 py-1 rounded hover:bg-gray-200",strings:De}),
|
|
72
|
+
/* @__PURE__ */re("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"}),
|
|
73
|
+
/* @__PURE__ */re("button",{type:"button",onClick:lr,className:"rounded-(--radius-control) text-gray-400 hover:text-gray-600",children:/* @__PURE__ */re($,{name:"close",fallback:ae,className:"h-5 w-5"})})]})]}),pe&&Ye&&!J&&!we&&/* @__PURE__ */re("div",{"aria-hidden":"true",className:"h-[3px] shrink-0 pointer-events-none",style:{backgroundColor:`rgb(var(--window-accent-rgb) / ${zt?.9:.55})`}}),
|
|
74
|
+
/* @__PURE__ */re(qt.Provider,{value:St,children:/* @__PURE__ */re(en.Provider,{value:{rightRef:it,leftRef:at,notify:()=>st(!0),active:zt,isDirty:Jn,footerOpen:dt&&!J&&!Z&&!ee&&!we},children:/* @__PURE__ */re("div",{ref:ot,...J?{onPointerDown:yr,onContextMenu:e=>{e.preventDefault(),Qe({x:e.clientX,y:e.clientY})}}:{},className:`flex-1 min-h-0 flex flex-col ${J?"p-0 cursor-move":ee||te?"p-0":Z?"p-2":"p-4"} ${J||yn?"":"backdrop-blur-sm"} ${!1===E||ee||te?"overflow-hidden":"overflow-y-auto overscroll-contain"} ${J?"rounded-2xl select-none":""}`,style:{...J?{touchAction:"none"}:{},backgroundColor:J?"transparent":yn?"rgb(var(--window-content-rgb))":zt?"rgb(var(--window-content-rgb) / var(--active-content-opacity, 0.9))":"rgb(var(--window-content-rgb) / var(--inactive-content-opacity, 0.8))"},children:/* @__PURE__ */re(Le,{children:fe})})})}),J&&Ge&&/* @__PURE__ */ne(v,{minWidth:160,style:{left:Ge.x,top:Ge.y},onClose:()=>Qe(null),children:[
|
|
75
|
+
/* @__PURE__ */re(x,{onClick:()=>{Qe(null),window.dispatchEvent(new CustomEvent("widget-open-settings",{detail:St}))},children:"Settings"}),
|
|
76
|
+
/* @__PURE__ */re(k,{}),de&&/* @__PURE__ */ne(oe,{children:[de,
|
|
77
|
+
/* @__PURE__ */re(k,{})]}),
|
|
78
|
+
/* @__PURE__ */ne(x,{onClick:()=>{Qe(null),$e(e=>!e)},children:[
|
|
79
|
+
/* @__PURE__ */re("span",{className:"flex-1",children:"Always on Top"}),Oe&&/* @__PURE__ */re($,{name:"check",fallback:T,className:"h-4 w-4 text-blue-600 shrink-0",strokeWidth:2})]}),
|
|
80
|
+
/* @__PURE__ */re(k,{}),
|
|
81
|
+
/* @__PURE__ */re(x,{onClick:()=>{Qe(null),lr()},children:"Close"})]}),
|
|
82
|
+
/* @__PURE__ */ne("div",{onPointerDown:yr,ref:ct,className:`px-4 py-2 border-t border-gray-200 shrink-0 flex items-center justify-between text-xs select-none${yn?"":" cursor-move"}${zt&&!yn?" backdrop-blur-sm":""}${J||Z||ee||we||!dt?" hidden":""}`,style:{touchAction:"none",backgroundColor:yn?"rgb(var(--window-footer-rgb))":zt?"rgb(var(--window-footer-rgb) / var(--active-header-opacity, 0.8))":"rgb(var(--window-footer-rgb) / var(--inactive-header-opacity, 0.7))"},children:[
|
|
83
|
+
/* @__PURE__ */ne("div",{className:"flex items-center gap-2 min-w-0",children:[ft&&/* @__PURE__ */re(Ae,{auto:!0}),K,
|
|
84
|
+
/* @__PURE__ */re("div",{ref:at,"data-modal-actions-left":!0,className:"flex items-center gap-2"}),g]}),
|
|
85
|
+
/* @__PURE__ */ne("div",{className:"flex items-center gap-2 ml-auto",children:[
|
|
86
|
+
/* @__PURE__ */re("div",{ref:it,"data-modal-actions":!0,className:"flex items-center gap-2"}),W]})]}),!J&&!we&&!Rt&&zt&&!En&&/* @__PURE__ */ne(oe,{children:[
|
|
87
|
+
/* @__PURE__ */re("div",{onPointerDown:e=>gr(e,"se"),className:"absolute bottom-0 right-0 w-3 h-3 cursor-nwse-resize z-10"}),
|
|
88
|
+
/* @__PURE__ */re("div",{onPointerDown:e=>gr(e,"sw"),className:"absolute bottom-0 left-0 w-3 h-3 cursor-nesw-resize z-10"}),
|
|
89
|
+
/* @__PURE__ */re("div",{onPointerDown:e=>gr(e,"ne"),className:"absolute top-0 right-0 w-3 h-3 cursor-nesw-resize z-10"}),
|
|
90
|
+
/* @__PURE__ */re("div",{onPointerDown:e=>gr(e,"nw"),className:"absolute top-0 left-0 w-3 h-3 cursor-nwse-resize z-10"}),
|
|
91
|
+
/* @__PURE__ */re("div",{onPointerDown:e=>gr(e,"n"),className:"absolute top-0 left-3 right-3 h-1 cursor-ns-resize"}),
|
|
92
|
+
/* @__PURE__ */re("div",{onPointerDown:e=>gr(e,"s"),className:"absolute bottom-0 left-3 right-3 h-1 cursor-ns-resize"}),
|
|
93
|
+
/* @__PURE__ */re("div",{onPointerDown:e=>gr(e,"e"),className:"absolute top-3 bottom-3 right-0 w-1 cursor-ew-resize"}),
|
|
94
|
+
/* @__PURE__ */re("div",{onPointerDown:e=>gr(e,"w"),className:"absolute top-3 bottom-3 left-0 w-1 cursor-ew-resize"})]}),Rt&&/* @__PURE__ */re("div",{className:"absolute inset-0",style:{zIndex:9999,cursor:"pointer",background:"transparent"},onMouseEnter:()=>Bt(!0),onMouseLeave:()=>Bt(!1),onMouseDown:e=>{e.stopPropagation(),e.preventDefault(),Bn(St),kr(!1)},onClick:e=>{e.stopPropagation(),e.preventDefault()},children:Ft&&/* @__PURE__ */re("button",{type:"button","data-expose-close":!0,"aria-label":ze.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/Kr})`,transformOrigin:"top right",zIndex:1e4},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onClick:e=>{e.stopPropagation(),e.preventDefault(),lr()},children:/* @__PURE__ */re($,{name:"close",fallback:z,className:"h-4 w-4",strokeWidth:2.2})})})]}),Rt&&Wr&&/* @__PURE__ */re("div",{className:"fixed pointer-events-none select-none truncate text-center",style:{left:Wr.x,top:Wr.y+Wr.h+4,width:Wr.w,zIndex:Ft?2021:2011,color:"white",fontSize:12,fontWeight:500,textShadow:"0 1px 2px rgba(0,0,0,0.6)"},children:Xt(Ne)})]}),Rr=Re&&/* @__PURE__ */ne(v,{style:{left:Re.x,top:Re.y},onClose:()=>Fe(null),minWidth:160,children:[!J&&!Z&&!yn&&/* @__PURE__ */ne(oe,{children:[
|
|
95
|
+
/* @__PURE__ */ne(x,{onClick:()=>{Hn(St),Fe(null)},children:[
|
|
96
|
+
/* @__PURE__ */re($,{name:"remove",fallback:A,className:"h-4 w-4 text-gray-400",strokeWidth:1.5}),De.minimize]}),!En&&/* @__PURE__ */ne(x,In?{onClick:()=>{Wn(!1),dn(nn()),Fe(null)},children:[
|
|
97
|
+
/* @__PURE__ */re("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */re("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 4.5v15m6-15v15M4.5 9h15M4.5 15h15"})}),De.windowed]}:{onClick:()=>{Nr(),Fe(null)},children:[
|
|
98
|
+
/* @__PURE__ */re($,{name:"expand",fallback:D,className:"h-4 w-4 text-gray-400",strokeWidth:1.5}),De.maximize]})]}),q&&!yn&&/* @__PURE__ */ne(x,{onClick:()=>{$e(e=>!e),Fe(null)},children:[
|
|
99
|
+
/* @__PURE__ */re($,{name:"bookmark-square",fallback:L,className:"h-4 w-4 "+(Oe?"text-blue-600":"text-gray-400"),fill:Oe?"currentColor":"none",strokeWidth:1.5}),Oe?De.unpin:De.pinOnTop]}),qe&&/* @__PURE__ */ne(x,{onClick:()=>{Fe(null),Je()},children:[
|
|
100
|
+
/* @__PURE__ */re($,{name:"star",fallback:S,className:"h-4 w-4 "+(Ve?"text-yellow-500":"text-gray-400"),fill:Ve?"currentColor":"none",strokeWidth:1.5}),Ve?ze.taskbar.removeFromDesktop:ze.taskbar.addToDesktop]}),(Jt[St]||[]).length>0&&/* @__PURE__ */re(oe,{children:(Jt[St]||[]).map((e,t)=>/* @__PURE__ */ne(x,{onClick:()=>{Fe(null),e.onClick()},children:[e.icon,e.label]},t))}),!(yn&&je?.home)&&/* @__PURE__ */ne(oe,{children:[
|
|
101
|
+
/* @__PURE__ */re(k,{}),
|
|
102
|
+
/* @__PURE__ */ne(x,{danger:!0,onClick:()=>{Fe(null),lr()},children:[
|
|
103
|
+
/* @__PURE__ */re($,{name:"close",fallback:ae,className:"h-4 w-4"}),De.close]})]})]}),Fr=!!he&&Nt.some(e=>e.id===he),qr=!At||Fr||J?null:/* @__PURE__ */ne("div",{"data-modal-restore-tab":!0,"data-modal-id":St,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:[
|
|
104
|
+
/* @__PURE__ */re("button",{type:"button",onClick:()=>Bn(St),title:De.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:Ie||De.windowSuffix}),
|
|
105
|
+
/* @__PURE__ */re("button",{type:"button",onClick:()=>Bn(St),title:De.restore,"aria-label":De.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:"▴"}),
|
|
106
|
+
/* @__PURE__ */re("button",{type:"button",onClick:()=>{lr()},title:De.close,"aria-label":De.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 ie(
|
|
107
|
+
/* @__PURE__ */ne(jt.Provider,{value:null,children:[$r,Rr,qr]}),document.body)}"undefined"!=typeof window&&window.addEventListener("keydown",e=>{gr&&"Escape"===e.key&&(Pr(null),kr(!1))});var Rr=100,Fr={past:[],future:[]};function qr(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>Rr?r.slice(r.length-Rr):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:Fr}}var jr=/* @__PURE__ */new Set(["INPUT","TEXTAREA","SELECT"]);var Br=500,Hr=250;function Yr({children:e,canEdit:t=!0,perms:n,windowId:r}){const[o,a]=Z(qr,Fr),l=B(/* @__PURE__ */new Map),[s,c]=Y(0),d=s>0,[u,h]=Y(0),[m,p]=Y(0),f=m>0,{hasAnyPerm:w}=i(),y=t&&0===u&&(!(n&&n.length>0)||w(n)),g=B(null),b=B(!1),v=X(()=>{const e={};for(const[t,n]of l.current)e[t]=n.getLast();return e},[]),x=X((e,t)=>{l.current.has(e)||c(e=>e+1),l.current.set(e,t)},[]),k=X(e=>{l.current.delete(e)&&c(e=>e-1)},[]),E=X(e=>{h(t=>t+(e?1:-1))},[]),C=X(e=>{p(t=>t+(e?1:-1))},[]),[M,N]=Y(0),S=M>0,L=X(e=>{N(t=>t+(e?1:-1))},[]),T=F(Te),z=T?.claimReadOnly;H(()=>{if(z&&!y)return z(!0),()=>z(!1)},[z,y]);const A=T?.claimOwnMount;H(()=>{if(A&&S)return A(!0),()=>A(!1)},[A,S]);const D=B({last:0,count:0,tripped:!1}),I=B(!1),P=X((e,t,n)=>{if(b.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)||(I.current=!0));if(!y||g.current)return;const r=D.current;if(r.tripped)return;const o=Date.now();if(o-r.last>Hr&&(r.count=0),r.last=o,++r.count>Br)return r.tripped=!0,void console.error(`[efficient-shell] UndoProvider: "${e}" recorded ${Br} 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:v(),label:e,coalesceKey:t},queueMicrotask(()=>{const e=g.current;g.current=null,e&&a({type:"record",step:e})})},[y,v]),W=X(e=>{for(const[t,n]of Object.entries(e)){const e=l.current.get(t);e&&(e.setLast(n),e.apply(n))}},[]),K=X(()=>{const e=o.past[o.past.length-1];if(!e)return;const t={values:v(),label:e.label,coalesceKey:null};W(e.values),a({type:"undo",redoStep:t})},[o.past,v,W]),O=X(()=>{const e=o.future[0];if(!e)return;const t={values:v(),label:e.label,coalesceKey:null};W(e.values),a({type:"redo",undoStep:t})},[o.future,v,W]),[$,R]=Y(0),q=B(0),j=B(0),U=B(!1),V=X(()=>{b.current=!0,I.current=!1,g.current=null,q.current+=1,j.current=q.current,R(q.current)},[]),_=B(void 0),J=X(e=>{void 0!==e&&(void 0!==_.current&&e!==_.current&&(U.current=!0),_.current=e),V()},[V]);H(()=>{b.current&&$===j.current&&(b.current=!1,g.current=null,(I.current||U.current)&&a({type:"clear"}),I.current=!1,U.current=!1)},[$]);const G=X(()=>{U.current=!0,a({type:"clear"}),V()},[V]),ee=y&&o.past.length>0,te=y&&o.future.length>0,oe=yr(r),ie=B({undo:K,redo:O,canUndo:ee,canRedo:te});ie.current={undo:K,redo:O,canUndo:ee,canRedo:te},H(()=>{if(!oe||!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&&jr.has(r.tagName.toUpperCase())?null:n}(e);if(!t)return;const n=ie.current;("undo"===t?n.canUndo:n.canRedo)&&(e.preventDefault(),"undo"===t?n.undo():n.redo())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[oe,y]);const ae=Q(()=>({register:x,unregister:k,record:P,undo:K,redo:O,clear:G,baseline:J,canUndo:ee,canRedo:te,enabled:y,hasState:d,handMounted:S,claimOwnMount:L,claimReadOnly:E,declaredEditable:f,claimEditable:C,undoLabel:ee?o.past[o.past.length-1].label:null,redoLabel:te?o.future[0].label:null}),[x,k,P,K,O,G,J,ee,te,y,d,S,L,E,f,C,o.past,o.future]),le=""!==tn(),se=F(en)?.footerOpen??!1,ce=le&&y&&d&&!S&&se;/* @__PURE__ */
|
|
108
|
+
return ne(Te.Provider,{value:ae,children:[ce&&/* @__PURE__ */re(rn,{position:"left",quiet:!0,children:/* @__PURE__ */re(Ae,{auto:!0})}),e]})}function Ur(){const e=F(Te),t=X(()=>{},[]);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 Xr(e){const t=F(Te),n=t?.claimReadOnly,r=t?.claimEditable;H(()=>{const t=e?r:n;if(t)return t(!0),()=>t(!1)},[n,r,e])}function Vr(e,t,n){const r=F(Te),o=ee(),i=B(e),a=B(t);a.current=t,H(()=>{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=B(r);c.current=r;const d=B({label:l,coalesceKey:s});d.current={label:l,coalesceKey:s},H(()=>{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 _r(e,t){const[n,r]=Y(e);return Vr(n,e=>r(()=>e),t),[n,r]}export{on as CancelButton,Qe as DocFavStar,Fe as EntityWindowFallback,$e as EntityWindowLoading,qe as EntityWindowState,Ut as KEY_ACTIVATED_SELECTOR,Ke as LoadingSpinner,Yt as MODAL_SUBMIT_SELECTOR,$r as Modal,rn as ModalActions,Ae as UndoControls,Yr as UndoProvider,pe as WINDOW_REGISTRY,Se as WindowCrashedFallback,Le as WindowErrorBoundary,yt as WindowManagerProvider,Qt as WindowTitle,rt as activateWindowById,Lt as beginWindowGesture,Rn as cancelWindowFront,be as client_default,Wr as commitExposeHighlight,Tt as drainPerfEvents,Cr as exitExposeMode,yn as forgetMaximizedWindowBoxes,pr as getActiveModalId,lt as getActiveWindowRoute,Ir as getExposeHighlight,Ft as getWindowChromeVersion,fn as getWindowPosition,Be as isDraftEntityId,He as isDraftEntityWindow,ue as isEntityEntry,de as isPageEntry,ye as isShellApiClientConfigured,ot as isTabWindow,St as markMenuOpen,$t as readWindowChrome,$n as requestWindowFront,Pr as setExposeHighlight,Nt as setPerfCollecting,we as setShellApiClient,Ce as setShellHomeRoute,me as setShellWindowRegistry,pn as setWindowDefaultPosition,wn as setWindowPosition,Dt as splitTitle,Dr as subscribeExposeHighlight,Rt as subscribeWindowChrome,Er as toggleExposeMode,Pn as useCurrentTabKey,tn as useEnclosingModalId,yr as useIsActiveWindow,nn as useModalActive,xe as usePageSearch,Ur as useUndo,Xr as useUndoCanEdit,Vr as useUndoable,_r as useUndoableState,_t as useWidgetSettings,Xe as useWindowDirty,_e as useWindowManager,Gt as useWindowMenuItem,Zt as useWindowTitle};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{ChevronRightFallbackC as e}from"./chunk-XUF7VW4U.js";import{useShellStrings as i}from"./chunk-J3LIIIHJ.js";import{Icon as t}from"./chunk-YKZHOXI4.js";import{Fragment as a}from"react";import{jsx as n,jsxs as s}from"react/jsx-runtime";var r=/* @__PURE__ */n(t,{name:"chevron-right",fallback:e,className:"h-3.5 w-3.5 shrink-0 text-gray-300","aria-hidden":!0}),l="inline-flex min-w-0 items-center gap-1 truncate rounded px-1 -mx-1 text-gray-500 transition-colors hover:text-gray-900 hover:underline rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]";function c({items:e,separator:t,maxItems:c=0,className:m}){const o=i().breadcrumbs;if(0===e.length)return null;const h=t??r,d=[],u=e.length-1;if(c>0&&e.length>c&&c>=2){const i=Math.max(1,c-1);d.push({kind:"item",item:e[0],isLast:!1}),d.push({kind:"ellipsis"});for(let t=e.length-i;t<=u;t++)d.push({kind:"item",item:e[t],isLast:t===u})}else e.forEach((e,i)=>d.push({kind:"item",item:e,isLast:i===u}));/* @__PURE__ */
|
|
2
|
+
return n("nav",{"aria-label":o.label,className:`min-w-0 ${m??""}`,children:/* @__PURE__ */n("ol",{className:"flex items-center gap-1.5 text-sm",children:d.map((e,i)=>/* @__PURE__ */s(a,{children:[i>0&&/* @__PURE__ */n("li",{"aria-hidden":!0,className:"flex items-center",children:h}),
|
|
3
|
+
/* @__PURE__ */n("li",{className:"flex min-w-0 items-center",children:"ellipsis"===e.kind?/* @__PURE__ */n("span",{className:"px-0.5 text-gray-400 select-none","aria-label":o.hidden,children:"…"}):e.isLast||!e.item.href&&!e.item.onClick?/* @__PURE__ */s("span",{"aria-current":e.isLast?"page":void 0,className:"inline-flex min-w-0 items-center gap-1 truncate "+(e.isLast?"font-medium text-gray-900":"text-gray-500"),children:[e.item.icon,
|
|
4
|
+
/* @__PURE__ */n("span",{className:"truncate",children:e.item.label})]}):e.item.href?/* @__PURE__ */s("a",{href:e.item.href,onClick:e.item.onClick,className:l,children:[e.item.icon,
|
|
5
|
+
/* @__PURE__ */n("span",{className:"truncate",children:e.item.label})]}):/* @__PURE__ */s("button",{type:"button",onClick:e.item.onClick,className:l,children:[e.item.icon,
|
|
6
|
+
/* @__PURE__ */n("span",{className:"truncate",children:e.item.label})]})})]},i))})})}export{c as Breadcrumbs};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import{jsx as n,jsxs as r}from"react/jsx-runtime";function o(r){/* @__PURE__ */
|
|
2
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})})}function e(r){/* @__PURE__ */
|
|
3
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})})}function t(r){/* @__PURE__ */
|
|
4
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",d:"M12 5v14M5 12h14"})})}function i(o){/* @__PURE__ */
|
|
5
|
+
return r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...o,children:[
|
|
6
|
+
/* @__PURE__ */n("circle",{cx:"12",cy:"12",r:"10"}),
|
|
7
|
+
/* @__PURE__ */n("path",{strokeLinecap:"round",d:"M8 12h8M12 8v8"})]})}function l(r){/* @__PURE__ */
|
|
8
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 11-3 0m3 0a1.5 1.5 0 10-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 01-3 0m3 0a1.5 1.5 0 00-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 01-3 0m3 0a1.5 1.5 0 00-3 0m-9.75 0h9.75"})})}function c(r){/* @__PURE__ */
|
|
9
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18"})})}function u(r){/* @__PURE__ */
|
|
10
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"})})}function d(r){/* @__PURE__ */
|
|
11
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14m0 0l-5-5m5 5l-5 5"})})}function a(r){/* @__PURE__ */
|
|
12
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{d:"M21 11.5l-8.5 8.5a5.5 5.5 0 0 1-7.8-7.8l9-9a3.5 3.5 0 0 1 5 5l-9 9a1.5 1.5 0 0 1-2.1-2.1l8-8"})})}function s(r){/* @__PURE__ */
|
|
13
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0"})})}function h(r){/* @__PURE__ */
|
|
14
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"currentColor",...r,children:/* @__PURE__ */n("path",{d:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z"})})}function v(r){/* @__PURE__ */
|
|
15
|
+
return n("svg",{viewBox:"0 0 24 24",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z"})})}function k(r){/* @__PURE__ */
|
|
16
|
+
return n("svg",{viewBox:"0 0 24 24",stroke:"currentColor",...r,children:/* @__PURE__ */n("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"})})}function L(r){/* @__PURE__ */
|
|
17
|
+
return n("svg",{viewBox:"0 0 20 20",fill:"currentColor",...r,children:/* @__PURE__ */n("path",{d:"M3 6a1.5 1.5 0 0 1 1.5-1.5h1.1l.4-.9a1 1 0 0 1 .9-.6h6.2a1 1 0 0 1 .9.6l.4.9h1.1A1.5 1.5 0 0 1 18 6v8.5A1.5 1.5 0 0 1 16.5 16h-13A1.5 1.5 0 0 1 2 14.5V6Zm7.5 1.5a3.25 3.25 0 1 0 0 6.5 3.25 3.25 0 0 0 0-6.5Z"})})}function f(o){/* @__PURE__ */
|
|
18
|
+
return r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...o,children:[
|
|
19
|
+
/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.827 6.175A2.31 2.31 0 015.186 7.23c-.38.054-.757.112-1.134.175C2.999 7.58 2.25 8.507 2.25 9.574V18a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9.574c0-1.067-.75-1.994-1.802-2.169a47.865 47.865 0 00-1.134-.175 2.31 2.31 0 01-1.64-1.055l-.822-1.316a2.192 2.192 0 00-1.736-1.039 48.774 48.774 0 00-5.232 0 2.192 2.192 0 00-1.736 1.039l-.821 1.316z"}),
|
|
20
|
+
/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 12.75a4.5 4.5 0 11-9 0 4.5 4.5 0 019 0zM18.75 10.5h.008v.008h-.008V10.5z"})]})}function p(r){/* @__PURE__ */
|
|
21
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 20.25V15m5.25 5.25V9.75m5.25 10.5V4.5m5.25 15.75v-7.5"})})}function M(r){/* @__PURE__ */
|
|
22
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})})}function m(r){/* @__PURE__ */
|
|
23
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}function x(r){/* @__PURE__ */
|
|
24
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}function g(r){/* @__PURE__ */
|
|
25
|
+
return n("svg",{viewBox:"0 0 12 12",fill:"none",...r,children:/* @__PURE__ */n("path",{d:"M2.5 6.5L5 9l4.5-5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})}function w(r){/* @__PURE__ */
|
|
26
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}function C(r){/* @__PURE__ */
|
|
27
|
+
return n("svg",{viewBox:"0 0 20 20",fill:"currentColor",...r,children:/* @__PURE__ */n("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.7-9.3a1 1 0 00-1.4-1.4L9 10.6 7.7 9.3a1 1 0 00-1.4 1.4l2 2a1 1 0 001.4 0l4-4z",clipRule:"evenodd"})})}function B(r){/* @__PURE__ */
|
|
28
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.75 19.5l-7.5-7.5 7.5-7.5m-6 15L5.25 12l7.5-7.5"})})}function j(r){/* @__PURE__ */
|
|
29
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 4.5l7.5 7.5-7.5 7.5m6-15l7.5 7.5-7.5 7.5"})})}function A(r){/* @__PURE__ */
|
|
30
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})}function V(r){/* @__PURE__ */
|
|
31
|
+
return n("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{d:"M6 8l4 4 4-4",strokeLinecap:"round",strokeLinejoin:"round"})})}function z(r){/* @__PURE__ */
|
|
32
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 9l6 6 6-6"})})}function H(r){/* @__PURE__ */
|
|
33
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})})}function y(r){/* @__PURE__ */
|
|
34
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})})}function R(r){/* @__PURE__ */
|
|
35
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})}function Z(r){/* @__PURE__ */
|
|
36
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})}function W(r){/* @__PURE__ */
|
|
37
|
+
return n("svg",{viewBox:"0 0 20 20",fill:"currentColor",...r,children:/* @__PURE__ */n("path",{fillRule:"evenodd",d:"M7.21 14.77a.75.75 0 0 1 .02-1.06L11.168 10 7.23 6.29a.75.75 0 1 1 1.04-1.08l4.5 4.25a.75.75 0 0 1 0 1.08l-4.5 4.25a.75.75 0 0 1-1.06-.02Z",clipRule:"evenodd"})})}function S(r){/* @__PURE__ */
|
|
38
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 15.75l7.5-7.5 7.5 7.5"})})}function b(r){/* @__PURE__ */
|
|
39
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 9l3.75-3.75L15.75 9M8.25 15l3.75 3.75L15.75 15"})})}function q(r){/* @__PURE__ */
|
|
40
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}function D(r){/* @__PURE__ */
|
|
41
|
+
return n("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{d:"M6 6l8 8M14 6l-8 8"})})}function E(r){/* @__PURE__ */
|
|
42
|
+
return n("svg",{viewBox:"0 0 20 20",fill:"currentColor",...r,children:/* @__PURE__ */n("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"})})}function F(r){/* @__PURE__ */
|
|
43
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{d:"M6 6l12 12M18 6L6 18"})})}function G(o){/* @__PURE__ */
|
|
44
|
+
return r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...o,children:[
|
|
45
|
+
/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 5.636l-12.728 12.728M5.636 5.636l12.728 12.728"}),
|
|
46
|
+
/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9 9 0 100-18 9 9 0 000 18z"})]})}function I(r){/* @__PURE__ */
|
|
47
|
+
return n("svg",{viewBox:"0 0 20 20",fill:"currentColor",...r,children:/* @__PURE__ */n("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.7 7.3a1 1 0 00-1.4 1.4L8.6 10l-1.3 1.3a1 1 0 101.4 1.4L10 11.4l1.3 1.3a1 1 0 001.4-1.4L11.4 10l1.3-1.3a1 1 0 10-1.4-1.4L10 8.6 8.7 7.3z",clipRule:"evenodd"})})}function J(r){/* @__PURE__ */
|
|
48
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"})})}function K(r){/* @__PURE__ */
|
|
49
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"})})}function N(r){/* @__PURE__ */
|
|
50
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("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"})})}function O(r){/* @__PURE__ */
|
|
51
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",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"})})}function P(r){/* @__PURE__ */
|
|
52
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 7V3m8 4V3M4 11h16M5 7h14a1 1 0 011 1v11a1 1 0 01-1 1H5a1 1 0 01-1-1V8a1 1 0 011-1z"})})}function Q(r){/* @__PURE__ */
|
|
53
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})})}function T(r){/* @__PURE__ */
|
|
54
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 17.25v1.007a3 3 0 01-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0115 18.257V17.25m6-12V15a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 15V5.25m18 0A2.25 2.25 0 0018.75 3H5.25A2.25 2.25 0 003 5.25m18 0V12a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 12V5.25"})})}function U(r){/* @__PURE__ */
|
|
55
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})})}function X(r){/* @__PURE__ */
|
|
56
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 01-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 011.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 00-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 01-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 00-3.375-3.375h-1.5a1.125 1.125 0 01-1.125-1.125v-1.5a3.375 3.375 0 00-3.375-3.375H9.75"})})}function Y(r){/* @__PURE__ */
|
|
57
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L6.832 19.82a4.5 4.5 0 01-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 011.13-1.897L16.863 4.487zm0 0L19.5 7.125"})})}function $(r){/* @__PURE__ */
|
|
58
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})})}function _(r){/* @__PURE__ */
|
|
59
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"})})}function nn(r){/* @__PURE__ */
|
|
60
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"})})}function rn(r){/* @__PURE__ */
|
|
61
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"})})}function on(r){/* @__PURE__ */
|
|
62
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-7.5-9L21 3m0 0v6m0-6L9.75 14.25"})})}function en(o){/* @__PURE__ */
|
|
63
|
+
return r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...o,children:[
|
|
64
|
+
/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"}),
|
|
65
|
+
/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}function tn(r){/* @__PURE__ */
|
|
66
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"})})}function ln(r){/* @__PURE__ */
|
|
67
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"currentColor",...r,children:/* @__PURE__ */n("path",{d:"M2.25 7.125A2.25 2.25 0 014.5 4.875h4.504c.61 0 1.193.243 1.624.673l1.494 1.494a.75.75 0 00.53.22h7.098A2.25 2.25 0 0122 9.51v8.366A2.25 2.25 0 0119.75 20.125H4.25A2.25 2.25 0 012 17.875V7.125z"})})}function cn(r){/* @__PURE__ */
|
|
68
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})})}function un(r){/* @__PURE__ */
|
|
69
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 9.776c.112-.017.227-.026.344-.026h15.812c.117 0 .232.009.344.026m-16.5 0a2.25 2.25 0 00-1.883 2.542l.857 6a2.25 2.25 0 002.227 1.932H19.05a2.25 2.25 0 002.227-1.932l.857-6a2.25 2.25 0 00-1.883-2.542m-16.5 0V6A2.25 2.25 0 016 3.75h3.879a1.5 1.5 0 011.06.44l2.122 2.12a1.5 1.5 0 001.06.44H18A2.25 2.25 0 0120.25 9v.776"})})}function dn(r){/* @__PURE__ */
|
|
70
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 10.5v6m3-3H9m4.06-7.19l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})})}function an(o){/* @__PURE__ */
|
|
71
|
+
return r("svg",{viewBox:"0 0 24 24",fill:"none",...o,children:[
|
|
72
|
+
/* @__PURE__ */n("circle",{cx:"12",cy:"12",r:"10"}),
|
|
73
|
+
/* @__PURE__ */n("path",{d:"M2 12h20"}),
|
|
74
|
+
/* @__PURE__ */n("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]})}function sn(o){/* @__PURE__ */
|
|
75
|
+
return r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",...o,children:[
|
|
76
|
+
/* @__PURE__ */n("circle",{cx:"12",cy:"12",r:"9"}),
|
|
77
|
+
/* @__PURE__ */n("path",{d:"M3 12h18M12 3c2.5 2.6 3.8 5.6 3.8 9s-1.3 6.4-3.8 9c-2.5-2.6-3.8-5.6-3.8-9S9.5 5.6 12 3Z"})]})}function hn(o){/* @__PURE__ */
|
|
78
|
+
return r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...o,children:[
|
|
79
|
+
/* @__PURE__ */n("rect",{x:"3.5",y:"3.5",width:"7",height:"7",rx:"1.5"}),
|
|
80
|
+
/* @__PURE__ */n("rect",{x:"13.5",y:"3.5",width:"7",height:"7",rx:"1.5"}),
|
|
81
|
+
/* @__PURE__ */n("rect",{x:"3.5",y:"13.5",width:"7",height:"7",rx:"1.5"}),
|
|
82
|
+
/* @__PURE__ */n("rect",{x:"13.5",y:"13.5",width:"7",height:"7",rx:"1.5"})]})}function vn(r){/* @__PURE__ */
|
|
83
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z"})})}function kn(o){/* @__PURE__ */
|
|
84
|
+
return r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...o,children:[
|
|
85
|
+
/* @__PURE__ */n("rect",{x:"3.5",y:"3.5",width:"7",height:"7",rx:"1"}),
|
|
86
|
+
/* @__PURE__ */n("rect",{x:"13.5",y:"3.5",width:"7",height:"7",rx:"1"}),
|
|
87
|
+
/* @__PURE__ */n("rect",{x:"3.5",y:"13.5",width:"7",height:"7",rx:"1"}),
|
|
88
|
+
/* @__PURE__ */n("rect",{x:"13.5",y:"13.5",width:"7",height:"7",rx:"1"})]})}function Ln(r){/* @__PURE__ */
|
|
89
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"})})}function fn(r){/* @__PURE__ */
|
|
90
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12l8.954-8.955a1.5 1.5 0 012.122 0l8.954 8.955M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"})})}function pn(r){/* @__PURE__ */
|
|
91
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"})})}function Mn(r){/* @__PURE__ */
|
|
92
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"})})}function mn(r){/* @__PURE__ */
|
|
93
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"})})}function xn(r){/* @__PURE__ */
|
|
94
|
+
return n("svg",{viewBox:"0 0 20 20",fill:"currentColor",...r,children:/* @__PURE__ */n("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM9 9a1 1 0 012 0v4a1 1 0 11-2 0V9zm1-4a1 1 0 100 2 1 1 0 000-2z",clipRule:"evenodd"})})}function gn(r){/* @__PURE__ */
|
|
95
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.429 9.75L2.25 12l4.179 2.25m0-4.5l5.571 3 5.571-3m-11.142 0L2.25 7.5 12 2.25l9.75 5.25-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0l4.179 2.25L12 21.75 2.25 16.5l4.179-2.25m11.142 0l-5.571 3-5.571-3"})})}function wn(r){/* @__PURE__ */
|
|
96
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75h4.5v16.5h-4.5zM11.25 3.75h9v4.5h-9z"})})}function Cn(r){/* @__PURE__ */
|
|
97
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"})})}function Bn(r){/* @__PURE__ */
|
|
98
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})})}function jn(r){/* @__PURE__ */
|
|
99
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"currentColor",...r,children:/* @__PURE__ */n("path",{d:"M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z"})})}function An(r){/* @__PURE__ */
|
|
100
|
+
return n("svg",{viewBox:"0 0 24 24",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z"})})}function Vn(o){/* @__PURE__ */
|
|
101
|
+
return r("svg",{viewBox:"0 0 24 24",fill:"currentColor",...o,children:[
|
|
102
|
+
/* @__PURE__ */n("circle",{cx:"12",cy:"5",r:"1.4"}),
|
|
103
|
+
/* @__PURE__ */n("circle",{cx:"12",cy:"12",r:"1.4"}),
|
|
104
|
+
/* @__PURE__ */n("circle",{cx:"12",cy:"19",r:"1.4"})]})}function zn(r){/* @__PURE__ */
|
|
105
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728L5.636 5.636m12.728 12.728L21 21M5.636 5.636L3 3m9 9a9 9 0 110-18 9 9 0 010 18z"})})}function Hn(r){/* @__PURE__ */
|
|
106
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})})}function yn(o){/* @__PURE__ */
|
|
107
|
+
return r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...o,children:[
|
|
108
|
+
/* @__PURE__ */n("path",{d:"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"}),
|
|
109
|
+
/* @__PURE__ */n("path",{d:"M14 3v5h5"})]})}function Rn(r){/* @__PURE__ */
|
|
110
|
+
return n("svg",{viewBox:"0 0 10 10",...r,children:/* @__PURE__ */n("path",{d:"M2 1.5h2.3v7H2zM5.7 1.5H8v7H5.7z"})})}function Zn(r){/* @__PURE__ */
|
|
111
|
+
return n("svg",{viewBox:"0 0 10 10",...r,children:/* @__PURE__ */n("path",{d:"M2 1.2 8.4 5 2 8.8z"})})}function Wn(r){/* @__PURE__ */
|
|
112
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.72 13.829c-.24.03-.48.062-.72.096m.72-.096a42.415 42.415 0 0110.56 0m-10.56 0L6.34 18m10.94-4.171c.24.03.48.062.72.096m-.72-.096L17.66 18m0 0l.229 2.523a1.125 1.125 0 01-1.12 1.227H7.231c-.662 0-1.18-.568-1.12-1.227L6.34 18m11.318 0h1.091A2.25 2.25 0 0021 15.75V9.456c0-1.081-.768-2.015-1.837-2.175a48.055 48.055 0 00-1.913-.247M6.34 18H5.25A2.25 2.25 0 013 15.75V9.456c0-1.081.768-2.015 1.837-2.175a48.041 48.041 0 011.913-.247m10.5 0a48.536 48.536 0 00-10.5 0m10.5 0V3.375c0-.621-.504-1.125-1.125-1.125h-8.25c-.621 0-1.125.504-1.125 1.125v3.659M18 10.5h.008v.008H18V10.5zm-3 0h.008v.008H15V10.5z"})})}function Sn(r){/* @__PURE__ */
|
|
113
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992V4.356M2.985 19.644v-4.992h4.992M3.05 9.348a9 9 0 0114.85-3.36L21.015 9.348m0 5.304a9 9 0 01-14.85 3.36l-3.115-3.36"})})}function bn(r){/* @__PURE__ */
|
|
114
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h5M20 20v-5h-5M5.5 9A7 7 0 0 1 17 6.5M18.5 15A7 7 0 0 1 7 17.5"})})}function qn(r){/* @__PURE__ */
|
|
115
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 12h-15"})})}function Dn(r){/* @__PURE__ */
|
|
116
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})})}function En(r){/* @__PURE__ */
|
|
117
|
+
return n("svg",{viewBox:"0 0 20 20",fill:"currentColor",...r,children:/* @__PURE__ */n("path",{fillRule:"evenodd",d:"M9 3.5a5.5 5.5 0 1 0 3.36 9.85l3.14 3.15a.75.75 0 1 0 1.06-1.06l-3.15-3.14A5.5 5.5 0 0 0 9 3.5ZM5 9a4 4 0 1 1 8 0 4 4 0 0 1-8 0Z",clipRule:"evenodd"})})}function Fn(o){/* @__PURE__ */
|
|
118
|
+
return r("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",...o,children:[
|
|
119
|
+
/* @__PURE__ */n("circle",{cx:"9",cy:"9",r:"6"}),
|
|
120
|
+
/* @__PURE__ */n("path",{d:"M14 14l3 3",strokeLinecap:"round"})]})}function Gn(o){/* @__PURE__ */
|
|
121
|
+
return r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...o,children:[
|
|
122
|
+
/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z"}),
|
|
123
|
+
/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}function In(r){/* @__PURE__ */
|
|
124
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("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 Jn(r){/* @__PURE__ */
|
|
125
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.53 16.122a3 3 0 00-5.78 1.128 2.25 2.25 0 01-2.4 2.245 4.5 4.5 0 008.4-2.245c0-.399-.078-.78-.22-1.128zm0 0a15.998 15.998 0 003.388-1.62m-5.043-.025a15.994 15.994 0 011.622-3.395m3.42 3.42a15.995 15.995 0 004.764-4.648l3.876-5.814a1.151 1.151 0 00-1.597-1.597L14.146 6.32a15.996 15.996 0 00-4.649 4.763m3.42 3.42a6.776 6.776 0 00-3.42-3.42"})})}function Kn(r){/* @__PURE__ */
|
|
126
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"})})}function Nn(o){/* @__PURE__ */
|
|
127
|
+
return r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...o,children:[
|
|
128
|
+
/* @__PURE__ */n("path",{d:"M12 15V4"}),
|
|
129
|
+
/* @__PURE__ */n("path",{d:"M8 8l4-4 4 4"}),
|
|
130
|
+
/* @__PURE__ */n("path",{d:"M4 15v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3"})]})}function On(r){/* @__PURE__ */
|
|
131
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M7.5 7.5L12 3m0 0l4.5 4.5M12 3v13.5"})})}function Pn(r){/* @__PURE__ */
|
|
132
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("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"})})}function Qn(r){/* @__PURE__ */
|
|
133
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m0 3.75h.008M10.34 3.94l-8.4 14.55A1.5 1.5 0 003.24 21h17.52a1.5 1.5 0 001.3-2.51l-8.4-14.55a1.5 1.5 0 00-2.6 0z"})})}function Tn(r){/* @__PURE__ */
|
|
134
|
+
return n("svg",{viewBox:"0 0 20 20",fill:"currentColor",...r,children:/* @__PURE__ */n("path",{fillRule:"evenodd",d:"M8.3 2.8a2 2 0 013.4 0l6 10A2 2 0 0116 16H4a2 2 0 01-1.7-3.2l6-10zM10 7a1 1 0 00-1 1v3a1 1 0 102 0V8a1 1 0 00-1-1zm0 7a1 1 0 100 2 1 1 0 000-2z",clipRule:"evenodd"})})}function Un(r){/* @__PURE__ */
|
|
135
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("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"})})}function Xn(r){/* @__PURE__ */
|
|
136
|
+
return n("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",...r,children:/* @__PURE__ */n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607zM10.5 7.5v6m3-3h-6"})})}export{o as AccountFallback,i as AddCircleFallback,e as AddFallback,t as AddFallbackB,l as AdjustFallback,c as ArrowLeftFallback,u as ArrowRightFallback,d as ArrowRightFallbackB,a as AttachFallback,s as BellFallback,h as BookmarkFallback,v as BookmarkFallbackB,k as BookmarkSquareFallback,L as CameraFallback,f as CameraFallbackB,p as ChartBarFallback,w as CheckCircleFallback,C as CheckCircleFallbackB,M as CheckFallback,m as CheckFallbackB,x as CheckFallbackC,g as CheckFallbackD,B as ChevronDoubleLeftFallback,j as ChevronDoubleRightFallback,A as ChevronDownFallback,V as ChevronDownFallbackB,z as ChevronDownFallbackC,H as ChevronLeftFallback,y as ChevronLeftFallbackB,R as ChevronRightFallback,Z as ChevronRightFallbackB,W as ChevronRightFallbackC,b as ChevronUpDownFallback,S as ChevronUpFallback,G as CloseCircleFallback,I as CloseCircleFallbackB,q as CloseFallback,D as CloseFallbackB,E as CloseFallbackC,F as CloseFallbackD,J as CodeFallback,K as CollapseFallback,N as CopyFallback,O as CopyFallbackB,P as DateFallback,Q as DateFallbackB,T as DesktopFallback,U as DownloadFallback,X as DuplicateFallback,Y as EditFallback,$ as EmailFallback,_ as ErrorFallback,nn as ExpandFallback,rn as ExpandFallbackB,on as ExternalFallback,en as EyeFallback,tn as EyeOffFallback,ln as FolderFallback,cn as FolderFallbackB,un as FolderOpenFallback,dn as FolderPlusFallback,an as GlobeFallback,sn as GlobeFallbackB,hn as GridFallback,vn as GridFallbackB,kn as GridFallbackC,Ln as HelpFallback,fn as HomeFallback,pn as ImageFallback,Mn as InboxFallback,mn as InfoFallback,xn as InfoFallbackB,gn as LayersFallback,wn as LayoutFallback,Cn as LogoutFallback,Bn as MenuFallback,jn as MoonFallback,An as MoonFallbackB,Vn as MoreVerticalFallback,zn as NoSymbolFallback,Hn as PageFallback,yn as PageFallbackB,Rn as PauseFallback,Zn as PlayFallback,Wn as PrintFallback,Sn as RefreshFallback,bn as RefreshFallbackB,qn as RemoveFallback,Dn as SearchFallback,En as SearchFallbackB,Fn as SearchFallbackC,Gn as SettingsFallback,In as StarFallback,Jn as StylesFallback,Kn as TrashFallback,Nn as UploadFallback,On as UploadFallbackB,Pn as WarningFallback,Qn as WarningFallbackB,Tn as WarningFallbackC,Un as WindowFallback,Xn as ZoomInFallback};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{glassStyle as e,GLASS_DIVIDER as t}from"./chunk-HZZNJHRH.js";import{onOverlayOpen as n,registerModalEscapeInterceptor as r,Z_LAYERS as o}from"./chunk-X4FJ54PP.js";import{useHydrated as i,useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{CheckFallback as l,ChevronRightFallback as u}from"./chunk-XUF7VW4U.js";import{Icon as c}from"./chunk-YKZHOXI4.js";import{createContext as s,forwardRef as d,useContext as p,useRef as m,useId as h,useState as f,useEffect as g,useMemo as y,useCallback as x}from"react";import{createPortal as w}from"react-dom";import{jsxs as b,jsx as v,Fragment as k}from"react/jsx-runtime";var C=/* @__PURE__ */new Set(["text","search","url","tel","email","password","number","date","datetime-local","month","week","time"]),N="data-native-context-menu";function T(e,t){return e&&"function"==typeof e.closest?e.closest(t):null}function E(e){const t=e;if(!t||"function"!=typeof t.closest)return!1;if(T(t,`[${N}]`))return!0;if(T(t,"textarea"))return!0;if(T(t,"img, picture, canvas, video, audio"))return!0;const n=T(t,"input");if(n){const e=(n.type||"text").toLowerCase();if(C.has(e))return!0}const r=T(t,"[contenteditable]");if(r){const e=(r.getAttribute("contenteditable")||"").toLowerCase();if(""===e||"true"===e||"plaintext-only"===e)return!0}return!1}var L=/* @__PURE__ */new Set(["http:","https:","mailto:","tel:","blob:"]);function M(e,t,n){const r=T(e,"a[href]"),o=(t||"").trim(),i=function(e,t){if(e&&"#"!==e)try{const n=new URL(e,t??("undefined"!=typeof document?document.baseURI:void 0));return L.has(n.protocol)?n.href:void 0}catch{return}}(r?.getAttribute("href"),n);return{kind:o?"selection":i?"link":"default",...o?{selectionText:o}:{},...i?{linkUrl:i}:{}}}function W(e){if(e.defaultPrevented)return!0;if(e.shiftKey)return!0;if("touch"===e.pointerType)return!0;return E(("function"==typeof e.composedPath?e.composedPath()[0]:void 0)??e.target)}function $(e,t,n){return e.length===t+1&&e[t].key===n.key?e:[...e.slice(0,t),n]}function H(e,t){const n=Math.max(0,t);return e.length>n?e.slice(0,n):e}function P(e,t,n){if(0===t.length||0===e.length)return[];const r=[e];for(let e=1;e<t.length;e++){const o=r[e-1].find(n=>n.to===t[e].key),i=o?n(o):[];if(0===i.length)break;r.push(i)}return r}function R(e,t,n,r){const o=Math.max(0,r-n),i=Math.min(t,o),a=e-i/2;return a<n?n:a+i>r?Math.max(n,r-i):a}function A(e,t,n,r,o,i=!1,a=8){const l=t+o,u=e-o-n,c=u>=a;return i&&c?{left:u,flipped:!0}:l+n<=r-a?{left:l,flipped:!1}:c?{left:u,flipped:!0}:i?{left:a,flipped:!0}:{left:Math.max(a,r-a-n),flipped:!1}}function B(){try{return getComputedStyle(document.documentElement).getPropertyValue("--menu-density")?.trim()||"normal"}catch{return"normal"}}var j=s(null),D=s(!1);function F({children:t,style:a,className:l="",onClose:u,minWidth:c=180,portal:s=!1}){const d=m(null),p=h(),[x,b]=f([]),k=m();g(()=>()=>clearTimeout(k.current),[]);const C=i(),N=y(()=>{const e=()=>clearTimeout(k.current);return{id:p,depth:0,path:x,open:(t,n)=>{e(),b(e=>$(e,t,n))},scheduleClose:t=>{e(),k.current=setTimeout(()=>b(e=>H(e,t)),200)},closeBelow:t=>{e(),b(e=>H(e,t))},cancelClose:e,closeTree:()=>{e(),b([]),u?.()},root:d}},[p,x,u]);g(()=>{if(!u)return;const e=e=>{e.target.closest("[data-menu-toggle]")||e.target.closest?.(`[data-popup-menu-tree="${p}"]`)||d.current&&!d.current.contains(e.target)&&u()},t=e=>{"Escape"===e.key&&u()};window.addEventListener("pointerdown",e),window.addEventListener("keydown",t);const o=n(u),i=r(()=>!1,()=>d.current);return()=>{window.removeEventListener("pointerdown",e),window.removeEventListener("keydown",t),o(),i()}},[u,p]),g(()=>{const e=d.current;e&&requestAnimationFrame(()=>{const t=e.getBoundingClientRect();if(t.right>window.innerWidth-8){const n=t.right-window.innerWidth+8;e.style.left?e.style.left=parseFloat(e.style.left)-n+"px":e.style.right||(e.style.left=t.left-n+"px")}if(t.left<8&&(e.style.left?e.style.left="8px":e.style.right&&(e.style.right=window.innerWidth-t.width-8+"px")),t.bottom>window.innerHeight-8){const n=t.bottom-window.innerHeight+8;e.style.top?e.style.top=parseFloat(e.style.top)-n+"px":e.style.bottom?e.style.bottom="8px":e.style.top=t.top-n+"px"}t.top<8&&(e.style.top?e.style.top="8px":e.style.bottom&&(e.style.bottom=window.innerHeight-t.height-8+"px"))})});const T=B(),L=/(^|[\s:])!?z-/.test(l),M=/* @__PURE__ */v("div",{ref:d,"data-popup-menu-tree":p,className:`fixed rounded-(--radius-popup) ${"tight"===T?"py-1":"large"===T?"py-2":"py-1.5"} ${l}`,onContextMenu:e=>{E(e.target)||e.preventDefault()},style:{...L?{}:{zIndex:o.menu},minWidth:c,animation:"popup-in 0.12s ease-out",...e(),...a},children:/* @__PURE__ */v(j.Provider,{value:N,children:t})});return s?C?w(M,document.body):null:M}function I(e,t,n,r=!1){const o=B(),i="tight"===o?"0.25rem":"large"===o?"0.6rem":"max(0.25rem, calc(var(--menu-padding-y, 0.5rem) - 0.1rem))";return{className:`w-full flex items-center gap-2 text-left transition-colors rounded-lg mx-auto\n ${e?"text-red-600 hover:bg-red-50":r?"bg-blue-50 text-blue-700":"text-gray-700 hover:bg-blue-50 hover:text-blue-700"}\n ${t?"opacity-40 cursor-not-allowed":""}\n ${n}`,style:{width:"calc(100% - 8px)",marginLeft:4,marginRight:4,fontSize:"var(--menu-font-size, 14px)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:i,paddingBottom:i}}}var S=/* @__PURE__ */v(c,{name:"check",fallback:l,"aria-hidden":!0,className:"h-4 w-4",strokeWidth:2});function z({kind:e,checked:t}){/* @__PURE__ */
|
|
2
|
+
return v("span","checkbox"===e?{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded border "+(t?"border-blue-600 bg-blue-600 text-white":"border-gray-400"),children:t&&S}:{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:t&&S})}var U=d(function({onClick:e,children:t,className:n="",danger:r,disabled:o,role:i,checked:a,tabIndex:l,id:u,onMouseEnter:c},s){const d=p(j),m=p(D),h=I(r,o,n),f=void 0===a?null:"menuitemradio"===i?"radio":"checkbox";/* @__PURE__ */
|
|
3
|
+
return b("button",{ref:s,id:u,role:"radio"===f?"menuitemradio":"checkbox"===f?"menuitemcheckbox":i??(m?"menuitem":void 0),"aria-checked":f?a:void 0,tabIndex:l,onClick:()=>{e?.(),d&&d.depth>0&&"checkbox"!==f&&d.closeTree()},onMouseEnter:()=>{d?.scheduleClose(d.depth),c?.()},disabled:o,className:h.className,style:h.style,children:[f&&/* @__PURE__ */v(z,{kind:f,checked:!!a}),t]})}),q=/* @__PURE__ */v(c,{name:"chevron-right",fallback:u,"aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 ml-auto text-gray-500",strokeWidth:2});function K(e){let t=o.menu;for(let n=e;n&&n!==document.body;n=n.parentElement){const e=parseInt(getComputedStyle(n).zIndex,10);Number.isNaN(e)||(t=e)}return t}function J(e){return e?[...e.querySelectorAll("button:not([disabled])")].filter(t=>t.closest("[data-popup-submenu-panel]")===e):[]}function X({label:t,icon:n,children:o,disabled:i,className:l="",minWidth:u=180,maxHeight:c}){const s=p(j),d=h(),f=m(null),C=m(null),N=m(),T=m(!1),L=`${d}-menu`;g(()=>()=>clearTimeout(N.current),[]);const M=s?.depth??0,W=s?.path[M],$=!!W&&W.key===d&&!i,H=x(e=>{if(!s||i||!f.current)return;clearTimeout(N.current),T.current=e;const t=f.current.getBoundingClientRect(),n=f.current.closest("[data-popup-submenu-panel]")??f.current.closest("[data-popup-menu-tree]"),r=n?.getBoundingClientRect()??t,o=M>0&&(s.path[M-1]?.flipped??!1),a=A(r.left,r.right,u,window.innerWidth,4,o);s.open(M,{key:d,y:t.top,...a})},[s,i,M,d,u]),P=e=>{s?.closeBelow(M),f.current?.focus()};g(()=>{if($)return r(e=>"Escape"===e.key&&(!(s&&s.path.length>M+1)&&(P(),!0)),()=>C.current)}),a(()=>{if(!$||!W)return;const e=()=>{const e=C.current;if(!e||!f.current)return;const t=f.current.closest("[data-popup-submenu-panel]")??f.current.closest("[data-popup-menu-tree]"),n=t?.getBoundingClientRect()??f.current.getBoundingClientRect(),r=M>0&&(s?.path[M-1]?.flipped??!1),o=e.offsetWidth||u,i=A(n.left,n.right,o,window.innerWidth,4,r,8),a=e.offsetHeight,l=R(f.current.getBoundingClientRect().top+a/2,a,8,window.innerHeight-8);e.style.left=`${i.left}px`,e.style.top=`${l}px`,e.dataset.flipped=String(i.flipped)};e();let t=0;const n=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>{cancelAnimationFrame(n),cancelAnimationFrame(t)}}),g(()=>{$&&T.current&&(T.current=!1,J(C.current)[0]?.focus())},[$]);const D=y(()=>s&&{...s,depth:M+1},[s,M]);if(!s)throw new Error("PopupSubmenu must be rendered inside a PopupMenu");const F=I(!1,i,l,$),S=B();/* @__PURE__ */
|
|
4
|
+
return b(k,{children:[
|
|
5
|
+
/* @__PURE__ */b("button",{ref:f,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":$,"aria-controls":$?L:void 0,disabled:i,"data-popup-submenu-row":!0,className:F.className,style:F.style,onClick:e=>{const t=0===e.detail;$?t&&J(C.current)[0]?.focus():H(t)},onKeyDown:e=>{"ArrowRight"===e.key&&(e.preventDefault(),e.stopPropagation(),H(!0))},onMouseEnter:()=>{i||(s.cancelClose(),$?s.closeBelow(M+1):(clearTimeout(N.current),N.current=setTimeout(()=>H(!1),120)))},onMouseLeave:()=>{clearTimeout(N.current),s.scheduleClose(M)},children:[n,
|
|
6
|
+
/* @__PURE__ */v("span",{className:"min-w-0 flex-1 truncate",children:t}),q]}),$&&w(
|
|
7
|
+
/* @__PURE__ */v("div",{ref:C,id:L,role:"menu","data-popup-menu-tree":s.id,"data-popup-submenu-panel":!0,className:"fixed rounded-(--radius-popup) overflow-x-hidden overflow-y-auto overscroll-contain "+("tight"===S?"py-1":"large"===S?"py-2":"py-1.5"),style:{left:W.left,top:W.y,minWidth:u,maxHeight:void 0===c?"calc(100vh - 16px)":`min(${"number"==typeof c?`${c}px`:c}, calc(100vh - 16px))`,zIndex:K(s.root.current)+M+1,animation:(W.flipped?"popup-submenu-in-left":"popup-submenu-in")+" 0.1s ease-out",...e()},onKeyDown:e=>{if(e.target.closest("[data-popup-submenu-panel]")!==e.currentTarget)return;const t=J(C.current),n=t.indexOf(document.activeElement),r=n=>{e.preventDefault(),e.stopPropagation(),t[(n+t.length)%t.length]?.focus()};"ArrowDown"===e.key?r(n+1):"ArrowUp"===e.key?r(n<0?t.length-1:n-1):"Home"===e.key?r(0):"End"===e.key?r(t.length-1):"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),P())},onMouseEnter:()=>{s.cancelClose(),clearTimeout(N.current)},onMouseLeave:()=>s.scheduleClose(M+1),onContextMenu:e=>{E(e.target)||e.preventDefault()},children:/* @__PURE__ */v(j.Provider,{value:D,children:o})}),document.body)]})}function Z(){const e=B();/* @__PURE__ */
|
|
8
|
+
return v("div",{className:`border-t ${t} ${"tight"===e?"my-0.5":"large"===e?"my-1.5":"my-1"} mx-3`})}function O({children:e}){const t=B(),n="tight"===t?"0.125rem":"large"===t?"0.375rem":"0.25rem";/* @__PURE__ */
|
|
9
|
+
return v("div",{className:"text-xs font-medium uppercase tracking-wide",style:{color:"var(--ink-muted)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:n,paddingBottom:n},children:e})}function V({d:e,className:t="h-4 w-4 text-gray-400"}){/* @__PURE__ */
|
|
10
|
+
return v("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */v("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})})}export{z as MenuCheckMark,V as MenuIcon,D as MenuSemanticsContext,N as NATIVE_MENU_ATTR,F as PopupMenu,Z as PopupMenuDivider,U as PopupMenuItem,O as PopupMenuLabel,X as PopupSubmenu,R as clampMenuTop,H as closeMenuBelow,M as describeContextTarget,I as itemLook,E as keepsNativeMenu,W as leavesContextMenuAlone,A as menuPanelLeft,$ as openMenuLevel,P as resolveMenuLevels};
|