efficient-shell 7.54.0 → 7.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/README.md +17 -9
  2. package/dist/{Browser-ZSP7T7AA.js → Browser-6SOGC27E.js} +14 -14
  3. package/dist/{Calculator-5MVTWQWV.js → Calculator-Z6JA6D6Q.js} +12 -12
  4. package/dist/ConfirmDialog-ZWVAYCJQ.js +1 -0
  5. package/dist/{CurrencyConverter-VYC463F4.js → CurrencyConverter-XFICWUGP.js} +7 -7
  6. package/dist/{Documents-URKLA3VN.js → Documents-C7DJOE4M.js} +10 -10
  7. package/dist/Files-Q5HVPRVK.js +87 -0
  8. package/dist/{Notepad-HWM57JW5.js → Notepad-3XPZIKLE.js} +11 -11
  9. package/dist/PdfViewer-NW6NQ6NP.js +1 -0
  10. package/dist/{PomodoroTimer-MXKIOXM7.js → PomodoroTimer-ZEPPQYCU.js} +64 -64
  11. package/dist/{Preview-AP3AOSFW.js → Preview-HV2KJRRI.js} +46 -46
  12. package/dist/{Sidebar-CWUGH47O.js → Sidebar-LKER76LS.js} +36 -36
  13. package/dist/Spreadsheet-URLX55NC.js +37 -0
  14. package/dist/{Stock-S5HULMS7.js → Stock-M6GGO7XF.js} +3 -3
  15. package/dist/{Weather-5GWQJ4VD.js → Weather-VU7VGUDO.js} +20 -20
  16. package/dist/{WorldClock-3UZK5M7S.js → WorldClock-QAMG23XA.js} +6 -6
  17. package/dist/ai/index.js +18 -18
  18. package/dist/apps/index.js +1 -1
  19. package/dist/bin/ui-check.js +1 -1
  20. package/dist/brand.css +1 -1
  21. package/dist/chunk-2H3XIWVB.js +14 -0
  22. package/dist/{chunk-K73JEGD5.js → chunk-4AHFABYE.js} +9 -9
  23. package/dist/{chunk-SGIM64RL.js → chunk-54LUMK66.js} +1 -1
  24. package/dist/{chunk-EQZ7DF3J.js → chunk-56DUNIS6.js} +19 -19
  25. package/dist/{chunk-FDZP4YPX.js → chunk-5H3MONF5.js} +1 -1
  26. package/dist/{chunk-BMKGFJR7.js → chunk-63RTIL66.js} +1 -1
  27. package/dist/{chunk-TXLJEUYC.js → chunk-6ST5FSQF.js} +4 -4
  28. package/dist/{chunk-UB2IV2II.js → chunk-7ZYZDQ5V.js} +7 -7
  29. package/dist/chunk-BLMDTJOK.js +1 -0
  30. package/dist/{chunk-HXU6LDQB.js → chunk-DCMTTLLV.js} +4 -4
  31. package/dist/{chunk-7SNZKUCI.js → chunk-DRQF3Z2O.js} +1 -1
  32. package/dist/{chunk-3ZZ2UPNR.js → chunk-EVSRRTEN.js} +1 -1
  33. package/dist/{chunk-6HJPHOUV.js → chunk-FP4N53XC.js} +1 -1
  34. package/dist/{chunk-YDDG7MXB.js → chunk-GEHGFIQ6.js} +1 -1
  35. package/dist/{chunk-LBZF6GCK.js → chunk-H4SBJXBL.js} +1 -1
  36. package/dist/{chunk-O5R4V3KH.js → chunk-HCC7EJUD.js} +1 -1
  37. package/dist/{chunk-ANYZYIEY.js → chunk-J4NEE4AO.js} +27 -27
  38. package/dist/{chunk-VOUSFISE.js → chunk-J5USRYOM.js} +17 -17
  39. package/dist/{chunk-S5XQ5DBA.js → chunk-KNOKDBRY.js} +9 -9
  40. package/dist/{chunk-SFO2M76G.js → chunk-L37CPWIB.js} +13 -13
  41. package/dist/chunk-MRQLTNG6.js +1017 -0
  42. package/dist/{chunk-R42GJPQL.js → chunk-NKOABAWD.js} +1 -1
  43. package/dist/{chunk-2ZSSYQFK.js → chunk-OWXCXFL6.js} +2 -2
  44. package/dist/chunk-QGMHTEJ2.js +21 -0
  45. package/dist/{chunk-4FQTMGCA.js → chunk-T3YRSGP6.js} +2 -2
  46. package/dist/chunk-T6D5LTQR.js +1 -0
  47. package/dist/{chunk-YT4B3NSV.js → chunk-TAUIAKU3.js} +4 -3
  48. package/dist/chunk-WFQIEKM3.js +106 -0
  49. package/dist/{chunk-OUURHOIS.js → chunk-YIIFH7CK.js} +1 -1
  50. package/dist/file-intake/index.js +1 -1
  51. package/dist/i18n/index.d.ts +1 -1
  52. package/dist/icons/efficient-looks.js +19 -17
  53. package/dist/icons/efficient.d.ts +4 -2
  54. package/dist/icons/efficient.js +95 -94
  55. package/dist/icons/iconoir.js +4 -1
  56. package/dist/icons/index.d.ts +1 -1
  57. package/dist/icons/index.js +1 -1
  58. package/dist/icons/lucide.js +6 -1
  59. package/dist/icons/phosphor.js +2 -1
  60. package/dist/icons/tabler.js +8 -1
  61. package/dist/{index-EuZDrQc_.d.ts → index-pjuTiAkS.d.ts} +5 -3
  62. package/dist/index.d.ts +21 -9
  63. package/dist/index.js +297 -297
  64. package/dist/locales/zh-Hans.d.ts +1 -1
  65. package/dist/locales/zh-Hans.js +1 -1
  66. package/dist/map/index.js +8 -8
  67. package/dist/markdown/index.js +1 -1
  68. package/dist/page-tabs/index.js +5 -5
  69. package/dist/pdf/index.js +1 -1
  70. package/dist/{strings-IB8gUtul.d.ts → strings-C7ZZ22PO.d.ts} +4 -0
  71. package/dist/telemetry/index.js +1 -1
  72. package/dist/ui/index.d.ts +2 -2
  73. package/dist/ui/index.js +1 -1
  74. package/package.json +1 -1
  75. package/dist/ConfirmDialog-5LHOXDQS.js +0 -1
  76. package/dist/Files-HTROHCLI.js +0 -87
  77. package/dist/PdfViewer-EUW7YVAH.js +0 -1
  78. package/dist/Spreadsheet-2XAXIZ36.js +0 -37
  79. package/dist/chunk-2ZRV46PX.js +0 -108
  80. package/dist/chunk-3RSAW3BM.js +0 -21
  81. package/dist/chunk-FNR5SPQM.js +0 -10
  82. package/dist/chunk-HQLDTFAF.js +0 -1
  83. package/dist/chunk-NZBX24NL.js +0 -1
  84. package/dist/chunk-RC27X4SF.js +0 -1
  85. package/dist/chunk-VA4OTNJP.js +0 -1021
@@ -0,0 +1,14 @@
1
+ import{useInsideTooltip as t,Tooltip as e}from"./chunk-RDLWLATO.js";import{useHydrated as r,useBrowserState as n}from"./chunk-D65T4H6J.js";import{Icon as o}from"./chunk-TAUIAKU3.js";import{useShellStrings as s}from"./chunk-BLMDTJOK.js";import{createContext as a,useSyncExternalStore as i,useRef as l,useState as c,useContext as u,useCallback as d,useMemo as f}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";var v="(max-width: 767px), (pointer: coarse)",g="(max-width: 767px)";function p(t){return!("undefined"==typeof window||!window.matchMedia)&&window.matchMedia(t).matches}var w=()=>p(v),x=()=>p(g);function b(){return!1}var y=t=>_(v,t),C=t=>_(g,t);function _(t,e){if("undefined"==typeof window||!window.matchMedia)return()=>{};const r=window.matchMedia(t);return r.addEventListener?(r.addEventListener("change",e),()=>r.removeEventListener("change",e)):(r.addListener(e),()=>r.removeListener(e))}function k(){return i(y,w,b)}function L(){return i(C,x,b)}var N="whitespace-nowrap";function D({children:r}){const n=t(),o=l(null),[s,a]=c(!1),i=/* @__PURE__ */m("span",{ref:o,className:"min-w-0 truncate",onMouseEnter:()=>{const t=o.current;a(!!t&&t.scrollWidth>t.clientWidth+1)},children:r});return n?i:/* @__PURE__ */m(e,{content:s?r:null,describe:!1,className:"relative inline-flex min-w-0 max-w-full",children:i})}var E="inline-flex max-w-full items-center whitespace-nowrap rounded-full",M={success:"bg-[var(--status-success-soft)] text-[color:var(--status-success-soft-ink)]",active:"bg-[var(--status-active-soft)] text-[color:var(--status-active-soft-ink)]",queued:"bg-[var(--status-queued-soft)] text-[color:var(--status-queued-soft-ink)]",info:"bg-[var(--status-info-soft)] text-[color:var(--status-info-soft-ink)]",pending:"bg-[var(--status-pending-soft)] text-[color:var(--status-pending-soft-ink)]",warning:"bg-[var(--status-warning-soft)] text-[color:var(--status-warning-soft-ink)]",danger:"bg-[var(--status-danger-soft)] text-[color:var(--status-danger-soft-ink)]",draft:"bg-[var(--status-draft-soft)] text-[color:var(--status-draft-soft-ink)]",neutral:"bg-[var(--status-neutral-soft)] text-[color:var(--status-neutral-soft-ink)]"},S={success:"bg-[var(--status-success-solid)] text-[color:var(--status-on-solid)]",active:"bg-[var(--status-active-solid)] text-[color:var(--status-on-solid)]",queued:"bg-[var(--status-queued-solid)] text-[color:var(--status-on-solid)]",info:"bg-[var(--status-info-solid)] text-[color:var(--status-on-solid)]",pending:"bg-[var(--status-pending-solid)] text-[color:var(--status-on-solid)]",warning:"bg-[var(--status-warning-solid)] text-[color:var(--status-on-solid)]",danger:"bg-[var(--status-danger-solid)] text-[color:var(--status-on-solid)]",draft:"bg-[var(--status-draft-solid)] text-[color:var(--status-on-solid)]",neutral:"bg-[var(--status-neutral-solid)] text-[color:var(--status-on-solid)]"};function T(t,e="subtle"){return"solid"===e?S[t]:M[t]}var A=a({}),I=a(void 0);function j(t){return t.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}function F({groups:t,labelFor:e,children:r}){/* @__PURE__ */
2
+ return m(A.Provider,{value:t,children:/* @__PURE__ */m(I.Provider,{value:e,children:r})})}function H(){const t=u(I);return d(e=>t?.(e)??j(e),[t])}function O({status:t,label:e,emphasis:r="subtle"}){const n=T(u(A)[t]??"neutral",r),o=u(I),s=e??o?.(t)??j(t);/* @__PURE__ */
3
+ return m("span",{className:`${E} px-3 py-0.5 text-xs font-medium ${n}`,children:/* @__PURE__ */m(D,{children:s})})}var P={success:"success",error:"error",warning:"warning",info:"info",404:"info",403:"warning",500:"error"},Z={success:"text-green-600 bg-green-100",error:"text-red-600 bg-red-100",warning:"text-amber-600 bg-amber-100",info:"text-blue-600 bg-blue-100"},z={404:t=>t.notFound,403:t=>t.noAccess,500:t=>t.serverError};function K({tone:t}){const e={className:"h-6 w-6",strokeWidth:1.5,"aria-hidden":!0};switch(t){case"success":/* @__PURE__ */
4
+ return m(o,{name:"check",...e});case"error":/* @__PURE__ */
5
+ return m(o,{name:"close",...e});case"warning":/* @__PURE__ */
6
+ return m(o,{name:"error",...e});default:/* @__PURE__ */
7
+ return m(o,{name:"info",...e})}}function U({status:t="info",title:e,subTitle:r,extra:n,icon:o,children:a,className:i=""}){const l=P[t],c=s().errors;/* @__PURE__ */
8
+ return h("div",{role:"error"===l?"alert":void 0,className:`flex flex-col items-center justify-center px-6 py-12 text-center ${i}`.trim(),children:[
9
+ /* @__PURE__ */m("div",{className:`flex h-14 w-14 items-center justify-center rounded-full ${Z[l]}`,children:o??/* @__PURE__ */m(K,{tone:l})}),
10
+ /* @__PURE__ */m("h2",{className:"mt-4 text-lg font-semibold text-gray-900",children:e??z[t]?.(c)??""}),r&&/* @__PURE__ */m("p",{className:"mt-1 max-w-md text-sm text-gray-500",children:r}),a&&/* @__PURE__ */m("div",{className:"mt-4 w-full max-w-md text-left",children:a}),n&&/* @__PURE__ */m("div",{className:"mt-6 flex flex-wrap items-center justify-center gap-3",children:n})]})}function q({colorClass:t,tone:e,children:r,size:n="sm",capitalize:a=!1,closable:i=!1,onClose:l,closeLabel:c,className:u=""}){const d=t??M[e??"neutral"],f="xs"===n?"px-2 py-0.5 text-3xs":"md"===n?"px-3 py-0.5 text-xs":"px-2 py-0.5 text-xs",v=a?"capitalize":"",g=s().badge,p=c??("string"==typeof r?g.removeItem(r):g.remove),w="xs"===n?"h-2.5 w-2.5":"h-3 w-3";/* @__PURE__ */
11
+ return h("span",{className:[E,"font-medium",f,v,d,u].filter(Boolean).join(" "),children:[
12
+ /* @__PURE__ */m(D,{children:r}),i&&/* @__PURE__ */m("button",{type:"button",onClick:l,"aria-label":p,className:"-mr-0.5 ml-1 inline-flex shrink-0 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-strong)]",children:/* @__PURE__ */m(o,{name:"close",look:"mini",className:w,"aria-hidden":"true"})})]})}var R="undefined"!=typeof window&&"undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform||navigator.userAgent),W={MOD:["⌘","Ctrl"],ALT:["⌥","Alt"],CMD_ENTER:["⌘⏎","Ctrl⏎"],CMD_S:["⌘S","Ctrl+S"],CMD_K:["⌘K","Ctrl+K"],CMD_DOT:["⌘.","Ctrl+."],CMD_A:["⌘A","Ctrl+A"],CMD_Z:["⌘Z","Ctrl+Z"],CMD_SHIFT_Z:["⌘⇧Z","Ctrl+Shift+Z"],ALT_SHIFT_D:["⌥⇧D","Alt+Shift+D"],ALT_SHIFT_E:["⌥⇧E","Alt+Shift+E"],ALT_SHIFT_N:["⌥⇧N","Alt+Shift+N"]},J=R?0:1,$=W.MOD[J],B=W.ALT[J],G="⇧",Q="⏎",V=W.CMD_ENTER[J],X=W.CMD_S[J],Y=W.CMD_K[J],tt=W.CMD_DOT[J],et=W.CMD_A[J],rt=W.CMD_Z[J],nt=W.CMD_SHIFT_Z[J],ot=W.ALT_SHIFT_D[J],st=W.ALT_SHIFT_E[J],at=W.ALT_SHIFT_N[J],it=new Map(R?Object.values(W).map(([t,e])=>[t,e]):[]);function lt(t){return r()?t:it.get(t)??t}var ct={neutral:"inline-flex items-center justify-center rounded border border-gray-200 bg-gray-50 font-medium text-gray-500",accent:"inline-flex items-center justify-center rounded border kbd-submit font-medium",warning:"inline-flex items-center justify-center rounded border border-amber-300 bg-amber-100 font-medium"},ut={sm:"px-1 py-0.5 text-2xs",md:"px-2 py-0.5 text-2xs"};function dt({keys:t,size:e="md",tone:r="neutral",className:n=""}){const o=lt(t);/* @__PURE__ */
13
+ return m("kbd",{className:[ct[r],ut[e],n].filter(Boolean).join(" "),children:o})}var ft=a(null);function mt({value:t,children:e}){/* @__PURE__ */
14
+ return m(ft.Provider,{value:t,children:e})}function ht(t="react-os-shell:prefs",e){const[r,o]=n(()=>{try{const r=JSON.parse(localStorage.getItem(t)||"{}");return{...e??{},...r}}catch{return{...e??{}}}},{...e??{}});return{prefs:r,save:d(e=>{o(r=>{const n={...r,...e};try{localStorage.setItem(t,JSON.stringify(n))}catch{}return n})},[t])}}var vt={prefs:{},save:()=>{}};function gt(){return u(ft)??vt}function pt(){const{prefs:t,save:e}=gt(),r=d(t=>{const r=e(t);return r&&"function"==typeof r.then?r.catch(()=>{}):r},[e]);return f(()=>({prefs:t,save:r}),[t,r])}var wt="react-os-shell:stale-chunk-reload-at",xt=3e4,bt="vite:preloadError",yt="/_next/static/",Ct=/Failed to fetch dynamically imported module|error loading dynamically imported module|Importing a module script failed|Unable to preload CSS/i;function _t(t){if(t instanceof Error&&"ChunkLoadError"===t.name)return!0;const e=t instanceof Error?t.message:"string"==typeof t?t:"";return Ct.test(e)}function kt(t={}){if("undefined"==typeof window)return()=>{};const e=t.cooldownMs??3e4,r=t.reload??(()=>window.location.reload()),n=t.now??Date.now,o=void 0===t.storage?function(){try{const t=window.sessionStorage;return t.getItem(wt),t}catch{return null}}():t.storage,s=void 0===t.chunkPathPrefix?yt:t.chunkPathPrefix,a=t=>{const r=n(),s=function(t){if(!t)return null;try{const e=t.getItem(wt),r=null===e?NaN:Number(e);return Number.isFinite(r)?r:null}catch{return null}}(o);return null!==s&&r-s<e?(console.error("[efficient-shell] a lazy chunk is still missing after a reload; letting the failure through:",t),!1):(function(t,e){if(t)try{t.setItem(wt,String(e))}catch{}}(o,r),console.warn("[efficient-shell] a lazy chunk is no longer on the server (new deploy?); reloading onto the current build:",t),!0)},i=t=>{const e=t.payload;_t(e)&&a(e)&&(t.preventDefault(),r())};let l=!0,c=!1;const u=/* @__PURE__ */new Set,d=null===s?null:t=>{const e=function(t,e){const r=t.target;let n="";if(r instanceof window.HTMLScriptElement?n=r.src:r instanceof window.HTMLLinkElement&&function(t){const e=t.rel.toLowerCase().split(/\s+/);if(e.includes("stylesheet")||e.includes("modulepreload"))return!0;const r=(t.getAttribute("as")??"").toLowerCase();return e.includes("preload")&&("script"===r||"style"===r)}(r)?n=r.href:t instanceof window.ErrorEvent&&"SyntaxError"===t.error?.name&&(n=t.filename),!n)return null;try{const t=new URL(e,window.location.origin).href,r=new URL(n,window.location.href).href;return r.startsWith(t)?r:null}catch{return null}}(t,s);!e||c||u.has(e)||(u.add(e),async function(t){try{const e=await fetch(t,{method:"HEAD",cache:"no-store"});return 404===e.status||410===e.status||e.ok&&/\btext\/html\b/i.test(e.headers.get("content-type")??"")}catch{return!1}}(e).then(t=>{u.delete(e),t&&l&&!c&&a(e)&&(c=!0,r())}))};return window.addEventListener(bt,i),d&&window.addEventListener("error",d,!0),()=>{l=!1,window.removeEventListener(bt,i),d&&window.removeEventListener("error",d,!0)}}export{B as ALT,ot as ALT_SHIFT_D,st as ALT_SHIFT_E,at as ALT_SHIFT_N,et as CMD_A,tt as CMD_DOT,V as CMD_ENTER,Y as CMD_K,X as CMD_S,nt as CMD_SHIFT_Z,rt as CMD_Z,q as ColoredBadge,Q as ENTER,M as GROUP_COLORS,S as GROUP_COLORS_SOLID,dt as Kbd,$ as MOD,yt as NEXT_CHUNK_PATH_PREFIX,D as OneLineLabel,U as Result,G as SHIFT,xt as STALE_CHUNK_RELOAD_COOLDOWN_MS,wt as STALE_CHUNK_RELOAD_KEY,mt as ShellPrefsProvider,O as StatusBadge,F as StatusBadgeProvider,N as TH_ONE_LINE,bt as VITE_PRELOAD_ERROR_EVENT,T as groupColors,kt as installStaleChunkReload,R as isMac,_t as isStaleChunkError,k as useIsMobile,L as useIsPhone,ht as useLocalStoragePrefs,pt as useShellPrefs,gt as useShellPrefsAdapter,lt as useShortcutLabel,H as useStatusLabel};
@@ -1,10 +1,10 @@
1
- import{glassStyle as e,GLASS_DIVIDER as t}from"./chunk-7IQ3B77H.js";import{useHydrated as n,useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{onOverlayOpen as o,registerModalEscapeInterceptor as i,Z_LAYERS as a}from"./chunk-FIEA5CGB.js";import{Icon as l}from"./chunk-YT4B3NSV.js";import{createContext as u,forwardRef as c,useContext as s,useRef as d,useId as p,useState as m,useEffect as h,useMemo as f,useCallback as g}from"react";import{createPortal as y}from"react-dom";import{jsxs as b,jsx as w,Fragment as x}from"react/jsx-runtime";var v=/* @__PURE__ */new Set(["text","search","url","tel","email","password","number","date","datetime-local","month","week","time"]),k="data-native-context-menu";function C(e,t){return e&&"function"==typeof e.closest?e.closest(t):null}function N(e){const t=e;if(!t||"function"!=typeof t.closest)return!1;if(C(t,`[${k}]`))return!0;if(C(t,"textarea"))return!0;if(C(t,"img, picture, canvas, video, audio"))return!0;const n=C(t,"input");if(n){const e=(n.type||"text").toLowerCase();if(v.has(e))return!0}const r=C(t,"[contenteditable]");if(r){const e=(r.getAttribute("contenteditable")||"").toLowerCase();if(""===e||"true"===e||"plaintext-only"===e)return!0}return!1}var T=/* @__PURE__ */new Set(["http:","https:","mailto:","tel:","blob:"]);function E(e,t,n){const r=C(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 T.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 B(e){if(e.defaultPrevented)return!0;if(e.shiftKey)return!0;if("touch"===e.pointerType)return!0;return N(("function"==typeof e.composedPath?e.composedPath()[0]:void 0)??e.target)}function L(e,t,n){return e.length===t+1&&e[t].key===n.key?e:[...e.slice(0,t),n]}function M(e,t){const n=Math.max(0,t);return e.length>n?e.slice(0,n):e}function $(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 A(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 W(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 R(){try{return getComputedStyle(document.documentElement).getPropertyValue("--menu-density")?.trim()||"normal"}catch{return"normal"}}var H=u(null),P=u(!1);function D({children:t,style:r,className:l="",onClose:u,minWidth:c=180,portal:s=!1}){const g=d(null),b=p(),[x,v]=m([]),k=d();h(()=>()=>clearTimeout(k.current),[]);const C=n(),T=f(()=>{const e=()=>clearTimeout(k.current);return{id:b,depth:0,path:x,open:(t,n)=>{e(),v(e=>L(e,t,n))},scheduleClose:t=>{e(),k.current=setTimeout(()=>v(e=>M(e,t)),200)},closeBelow:t=>{e(),v(e=>M(e,t))},cancelClose:e,closeTree:()=>{e(),v([]),u?.()},root:g}},[b,x,u]);h(()=>{if(!u)return;const e=e=>{e.target.closest("[data-menu-toggle]")||e.target.closest?.(`[data-popup-menu-tree="${b}"]`)||g.current&&!g.current.contains(e.target)&&u()},t=e=>{"Escape"===e.key&&u()};window.addEventListener("pointerdown",e),window.addEventListener("keydown",t);const n=o(u),r=i(()=>!1,()=>g.current);return()=>{window.removeEventListener("pointerdown",e),window.removeEventListener("keydown",t),n(),r()}},[u,b]),h(()=>{const e=g.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 E=R(),B=/(^|[\s:])!?z-/.test(l),$=/* @__PURE__ */w("div",{ref:g,"data-popup-menu-tree":b,className:`fixed rounded-(--radius-popup) ${"tight"===E?"py-1":"large"===E?"py-2":"py-1"} ${l}`,onContextMenu:e=>{N(e.target)||e.preventDefault()},style:{...B?{}:{zIndex:a.menu},minWidth:c,animation:"popup-in 0.12s ease-out",...e(),...r},children:/* @__PURE__ */w(H.Provider,{value:T,children:t})});return s?C?y($,document.body):null:$}function I(e,t,n,r=!1){const o=R(),i="tight"===o?"0.25rem":"large"===o?"0.6rem":0;return{className:`w-full flex items-center gap-2 text-left transition-colors rounded-lg mx-auto\n ${e?"text-red-600 not-disabled:not-aria-disabled:hover:bg-red-50":r?"bg-blue-50 text-blue-700":"text-gray-700 not-disabled:not-aria-disabled:hover:bg-blue-50 not-disabled:not-aria-disabled: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,..."normal"===o?{minHeight:"calc(var(--row-height-menu, 2.25rem) + 2 * (var(--menu-padding-y, 0.5rem) - 0.5rem))"}:{}}}}var S=/* @__PURE__ */w(l,{name:"check","aria-hidden":!0,className:"h-4 w-4",strokeWidth:2});function j({kind:e,checked:t}){/* @__PURE__ */
2
- return w("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 F=c(function({onClick:e,children:t,className:n="",danger:r,disabled:o,role:i,checked:a,tabIndex:l,id:u,onMouseEnter:c},d){const p=s(H),m=s(P),h=I(r,o,n),f=void 0===a?null:"menuitemradio"===i?"radio":"checkbox";/* @__PURE__ */
3
- return b("button",{ref:d,id:u,role:"radio"===f?"menuitemradio":"checkbox"===f?"menuitemcheckbox":i??(m?"menuitem":void 0),"aria-checked":f?a:void 0,tabIndex:l,onClick:()=>{e?.(),p&&p.depth>0&&"checkbox"!==f&&p.closeTree()},onMouseEnter:()=>{p?.scheduleClose(p.depth),c?.()},disabled:o,className:h.className,style:h.style,children:[f&&/* @__PURE__ */w(j,{kind:f,checked:!!a}),t]})}),z=/* @__PURE__ */w(l,{name:"chevron-right","aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 ml-auto",strokeWidth:2});function q(e){let t=a.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 U(e){return e?[...e.querySelectorAll("button:not([disabled])")].filter(t=>t.closest("[data-popup-submenu-panel]")===e):[]}function K({label:t,icon:n,children:o,disabled:a,className:l="",minWidth:u=180,maxHeight:c}){const m=s(H),v=p(),k=d(null),C=d(null),T=d(),E=d(!1),B=`${v}-menu`;h(()=>()=>clearTimeout(T.current),[]);const L=m?.depth??0,M=m?.path[L],$=!!M&&M.key===v&&!a,P=g(e=>{if(!m||a||!k.current)return;clearTimeout(T.current),E.current=e;const t=k.current.getBoundingClientRect(),n=k.current.closest("[data-popup-submenu-panel]")??k.current.closest("[data-popup-menu-tree]"),r=n?.getBoundingClientRect()??t,o=L>0&&(m.path[L-1]?.flipped??!1),i=W(r.left,r.right,u,window.innerWidth,4,o);m.open(L,{key:v,y:t.top,...i})},[m,a,L,v,u]),D=e=>{m?.closeBelow(L),k.current?.focus()};h(()=>{if($)return i(e=>"Escape"===e.key&&(!(m&&m.path.length>L+1)&&(D(),!0)),()=>C.current)}),r(()=>{if(!$||!M)return;const e=()=>{const e=C.current;if(!e||!k.current)return;const t=k.current.closest("[data-popup-submenu-panel]")??k.current.closest("[data-popup-menu-tree]"),n=t?.getBoundingClientRect()??k.current.getBoundingClientRect(),r=L>0&&(m?.path[L-1]?.flipped??!1),o=e.offsetWidth||u,i=W(n.left,n.right,o,window.innerWidth,4,r,8),a=e.offsetHeight,l=A(k.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)}}),h(()=>{$&&E.current&&(E.current=!1,U(C.current)[0]?.focus())},[$]);const S=f(()=>m&&{...m,depth:L+1},[m,L]);if(!m)throw new Error("PopupSubmenu must be rendered inside a PopupMenu");const j=I(!1,a,l,$),F=R();/* @__PURE__ */
1
+ import{glassStyle as e,GLASS_DIVIDER as t}from"./chunk-7IQ3B77H.js";import{useHydrated as n,useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{onOverlayOpen as o,registerModalEscapeInterceptor as i,Z_LAYERS as a}from"./chunk-FIEA5CGB.js";import{Icon as l}from"./chunk-TAUIAKU3.js";import{createContext as u,forwardRef as c,useContext as s,useRef as d,useId as p,useState as m,useEffect as h,useMemo as f,useCallback as g}from"react";import{createPortal as y}from"react-dom";import{jsxs as b,jsx as w,Fragment as x}from"react/jsx-runtime";var v=/* @__PURE__ */new Set(["text","search","url","tel","email","password","number","date","datetime-local","month","week","time"]),k="data-native-context-menu";function C(e,t){return e&&"function"==typeof e.closest?e.closest(t):null}function N(e){const t=e;if(!t||"function"!=typeof t.closest)return!1;if(C(t,`[${k}]`))return!0;if(C(t,"textarea"))return!0;if(C(t,"img, picture, canvas, video, audio"))return!0;const n=C(t,"input");if(n){const e=(n.type||"text").toLowerCase();if(v.has(e))return!0}const r=C(t,"[contenteditable]");if(r){const e=(r.getAttribute("contenteditable")||"").toLowerCase();if(""===e||"true"===e||"plaintext-only"===e)return!0}return!1}var T=/* @__PURE__ */new Set(["http:","https:","mailto:","tel:","blob:"]);function E(e,t,n){const r=C(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 T.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 A(e){if(e.defaultPrevented)return!0;if(e.shiftKey)return!0;if("touch"===e.pointerType)return!0;return N(("function"==typeof e.composedPath?e.composedPath()[0]:void 0)??e.target)}function L(e,t,n){return e.length===t+1&&e[t].key===n.key?e:[...e.slice(0,t),n]}function B(e,t){const n=Math.max(0,t);return e.length>n?e.slice(0,n):e}function M(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 $(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 W(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 R(){try{return getComputedStyle(document.documentElement).getPropertyValue("--menu-density")?.trim()||"normal"}catch{return"normal"}}var H=u(null),P=u(!1);function I({children:t,style:r,className:l="",onClose:u,minWidth:c=180,portal:s=!1}){const g=d(null),b=p(),[x,v]=m([]),k=d();h(()=>()=>clearTimeout(k.current),[]);const C=n(),T=f(()=>{const e=()=>clearTimeout(k.current);return{id:b,depth:0,path:x,open:(t,n)=>{e(),v(e=>L(e,t,n))},scheduleClose:t=>{e(),k.current=setTimeout(()=>v(e=>B(e,t)),200)},closeBelow:t=>{e(),v(e=>B(e,t))},cancelClose:e,closeTree:()=>{e(),v([]),u?.()},root:g}},[b,x,u]);h(()=>{if(!u)return;const e=e=>{e.target.closest("[data-menu-toggle]")||e.target.closest?.(`[data-popup-menu-tree="${b}"]`)||g.current&&!g.current.contains(e.target)&&u()},t=e=>{"Escape"===e.key&&u()};window.addEventListener("pointerdown",e),window.addEventListener("keydown",t);const n=o(u),r=i(()=>!1,()=>g.current);return()=>{window.removeEventListener("pointerdown",e),window.removeEventListener("keydown",t),n(),r()}},[u,b]),h(()=>{const e=g.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 E=R(),A=/(^|[\s:])!?z-/.test(l),M=/* @__PURE__ */w("div",{ref:g,"data-popup-menu-tree":b,className:`fixed rounded-(--radius-popup) ${"tight"===E?"py-1":"large"===E?"py-2":"py-1"} ${l}`,onContextMenu:e=>{N(e.target)||e.preventDefault()},style:{...A?{}:{zIndex:a.menu},minWidth:c,animation:"popup-in 0.12s ease-out",...e(),...r},children:/* @__PURE__ */w(H.Provider,{value:T,children:t})});return s?C?y(M,document.body):null:M}function D(e,t,n,r=!1){const o=R(),i="tight"===o?"0.25rem":"large"===o?"0.6rem":0;return{className:`w-full flex items-center gap-2 text-left transition-colors rounded-lg mx-auto\n ${e?"text-red-600 not-disabled:not-aria-disabled:hover:bg-red-50":r?"bg-blue-50 text-blue-700":"text-gray-700 not-disabled:not-aria-disabled:hover:bg-blue-50 not-disabled:not-aria-disabled: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,..."normal"===o?{minHeight:"calc(var(--row-height-menu, 2.25rem) + 2 * (var(--menu-padding-y, 0.5rem) - 0.5rem))"}:{}}}}var j=/* @__PURE__ */w(l,{name:"check","aria-hidden":!0,className:"h-4 w-4",strokeWidth:2});function F({kind:e,checked:t}){/* @__PURE__ */
2
+ return w("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&&j}:{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:t&&j})}var S=c(function({onClick:e,children:t,className:n="",danger:r,disabled:o,role:i,checked:a,tabIndex:l,id:u,onMouseEnter:c},d){const p=s(H),m=s(P),h=D(r,o,n),f=void 0===a?null:"menuitemradio"===i?"radio":"checkbox";/* @__PURE__ */
3
+ return b("button",{ref:d,id:u,role:"radio"===f?"menuitemradio":"checkbox"===f?"menuitemcheckbox":i??(m?"menuitem":void 0),"aria-checked":f?a:void 0,tabIndex:l,onClick:()=>{e?.(),p&&p.depth>0&&"checkbox"!==f&&p.closeTree()},onMouseEnter:()=>{p?.scheduleClose(p.depth),c?.()},disabled:o,className:h.className,style:h.style,children:[f&&/* @__PURE__ */w(F,{kind:f,checked:!!a}),t]})}),z=/* @__PURE__ */w(l,{name:"chevron-right","aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 ml-auto",strokeWidth:2});function U(e){let t=a.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 q(e){return e?[...e.querySelectorAll("button:not([disabled])")].filter(t=>t.closest("[data-popup-submenu-panel]")===e):[]}function K({label:t,icon:n,children:o,disabled:a,className:l="",minWidth:u=180,maxHeight:c}){const m=s(H),v=p(),k=d(null),C=d(null),T=d(),E=d(!1),A=`${v}-menu`;h(()=>()=>clearTimeout(T.current),[]);const L=m?.depth??0,B=m?.path[L],M=!!B&&B.key===v&&!a,P=g(e=>{if(!m||a||!k.current)return;clearTimeout(T.current),E.current=e;const t=k.current.getBoundingClientRect(),n=k.current.closest("[data-popup-submenu-panel]")??k.current.closest("[data-popup-menu-tree]"),r=n?.getBoundingClientRect()??t,o=L>0&&(m.path[L-1]?.flipped??!1),i=W(r.left,r.right,u,window.innerWidth,4,o);m.open(L,{key:v,y:t.top,...i})},[m,a,L,v,u]),I=e=>{m?.closeBelow(L),k.current?.focus()};h(()=>{if(M)return i(e=>"Escape"===e.key&&(!(m&&m.path.length>L+1)&&(I(),!0)),()=>C.current)}),r(()=>{if(!M||!B)return;const e=()=>{const e=C.current;if(!e||!k.current)return;const t=k.current.closest("[data-popup-submenu-panel]")??k.current.closest("[data-popup-menu-tree]"),n=t?.getBoundingClientRect()??k.current.getBoundingClientRect(),r=L>0&&(m?.path[L-1]?.flipped??!1),o=e.offsetWidth||u,i=W(n.left,n.right,o,window.innerWidth,4,r,8),a=e.offsetHeight,l=$(k.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)}}),h(()=>{M&&E.current&&(E.current=!1,q(C.current)[0]?.focus())},[M]);const j=f(()=>m&&{...m,depth:L+1},[m,L]);if(!m)throw new Error("PopupSubmenu must be rendered inside a PopupMenu");const F=D(!1,a,l,M),S=R();/* @__PURE__ */
4
4
  return b(x,{children:[
5
- /* @__PURE__ */b("button",{ref:k,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":$,"aria-controls":$?B:void 0,disabled:a,"data-popup-submenu-row":!0,className:j.className,style:j.style,onClick:e=>{const t=0===e.detail;$?t&&U(C.current)[0]?.focus():P(t)},onKeyDown:e=>{"ArrowRight"===e.key&&(e.preventDefault(),e.stopPropagation(),P(!0))},onMouseEnter:()=>{a||(m.cancelClose(),$?m.closeBelow(L+1):(clearTimeout(T.current),T.current=setTimeout(()=>P(!1),120)))},onMouseLeave:()=>{clearTimeout(T.current),m.scheduleClose(L)},children:[n,
6
- /* @__PURE__ */w("span",{className:"min-w-0 flex-1 truncate",children:t}),z]}),$&&y(
7
- /* @__PURE__ */w("div",{ref:C,id:B,role:"menu","data-popup-menu-tree":m.id,"data-popup-submenu-panel":!0,className:"fixed rounded-(--radius-popup) overflow-x-hidden overflow-y-auto overscroll-contain "+("tight"===F?"py-1":"large"===F?"py-2":"py-1"),style:{left:M.left,top:M.y,minWidth:u,maxHeight:void 0===c?"calc(100vh - 16px)":`min(${"number"==typeof c?`${c}px`:c}, calc(100vh - 16px))`,zIndex:q(m.root.current)+L+1,animation:(M.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=U(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(),D())},onMouseEnter:()=>{m.cancelClose(),clearTimeout(T.current)},onMouseLeave:()=>m.scheduleClose(L+1),onContextMenu:e=>{N(e.target)||e.preventDefault()},children:/* @__PURE__ */w(H.Provider,{value:S,children:o})}),document.body)]})}function V(){const e=R();/* @__PURE__ */
8
- return w("div",{className:`border-t ${t} ${"tight"===e?"my-0.5":"large"===e?"my-2":"my-1"} mx-3`})}function G(){const e=R(),t="tight"===e?"0.125rem":"large"===e?"0.375rem":"0.25rem";return{color:"var(--ink-muted)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:t,paddingBottom:t}}function J({children:e}){/* @__PURE__ */
9
- return w("div",{className:"text-xs font-medium uppercase tracking-wide",style:G(),children:e})}function O({d:e,className:t="h-4 w-4"}){/* @__PURE__ */
10
- return w("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})})}export{j as MenuCheckMark,O as MenuIcon,P as MenuSemanticsContext,k as NATIVE_MENU_ATTR,D as PopupMenu,V as PopupMenuDivider,F as PopupMenuItem,J as PopupMenuLabel,K as PopupSubmenu,A as clampMenuTop,M as closeMenuBelow,E as describeContextTarget,I as itemLook,N as keepsNativeMenu,B as leavesContextMenuAlone,W as menuPanelLeft,G as menuTextRowStyle,L as openMenuLevel,$ as resolveMenuLevels};
5
+ /* @__PURE__ */b("button",{ref:k,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":M,"aria-controls":M?A:void 0,disabled:a,"data-popup-submenu-row":!0,className:F.className,style:F.style,onClick:e=>{const t=0===e.detail;M?t&&q(C.current)[0]?.focus():P(t)},onKeyDown:e=>{"ArrowRight"===e.key&&(e.preventDefault(),e.stopPropagation(),P(!0))},onMouseEnter:()=>{a||(m.cancelClose(),M?m.closeBelow(L+1):(clearTimeout(T.current),T.current=setTimeout(()=>P(!1),120)))},onMouseLeave:()=>{clearTimeout(T.current),m.scheduleClose(L)},children:[n,
6
+ /* @__PURE__ */w("span",{className:"min-w-0 flex-1 truncate",children:t}),z]}),M&&y(
7
+ /* @__PURE__ */w("div",{ref:C,id:A,role:"menu","data-popup-menu-tree":m.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"),style:{left:B.left,top:B.y,minWidth:u,maxHeight:void 0===c?"calc(100vh - 16px)":`min(${"number"==typeof c?`${c}px`:c}, calc(100vh - 16px))`,zIndex:U(m.root.current)+L+1,animation:(B.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=q(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(),I())},onMouseEnter:()=>{m.cancelClose(),clearTimeout(T.current)},onMouseLeave:()=>m.scheduleClose(L+1),onContextMenu:e=>{N(e.target)||e.preventDefault()},children:/* @__PURE__ */w(H.Provider,{value:j,children:o})}),document.body)]})}function G(){const e=R();/* @__PURE__ */
8
+ return w("div",{className:`border-t ${t} ${"tight"===e?"my-0.5":"large"===e?"my-2":"my-1"} mx-3`})}function J(){const e=R(),t="tight"===e?"0.125rem":"large"===e?"0.375rem":"0.25rem";return{color:"var(--ink-muted)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:t,paddingBottom:t}}function O({children:e}){/* @__PURE__ */
9
+ return w("div",{className:"text-xs font-medium uppercase tracking-wide",style:J(),children:e})}function Q({d:e,className:t="h-4 w-4"}){/* @__PURE__ */
10
+ return w("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})})}export{F as MenuCheckMark,Q as MenuIcon,P as MenuSemanticsContext,k as NATIVE_MENU_ATTR,I as PopupMenu,G as PopupMenuDivider,S as PopupMenuItem,O as PopupMenuLabel,K as PopupSubmenu,$ as clampMenuTop,B as closeMenuBelow,E as describeContextTarget,D as itemLook,N as keepsNativeMenu,A as leavesContextMenuAlone,W as menuPanelLeft,J as menuTextRowStyle,L as openMenuLevel,M as resolveMenuLevels};
@@ -1 +1 @@
1
- import{DEFAULT_SHELL_STRINGS as e,useShellStrings as t}from"./chunk-HQLDTFAF.js";import{useRef as r,useState as n,useCallback as s}from"react";import{jsx as a}from"react/jsx-runtime";function o(e,t){const r=(t??"").split(",").map(e=>e.trim().toLocaleLowerCase()).filter(Boolean);if(0===r.length||r.includes("*")||r.includes("*/*"))return!0;const n=e.name.toLocaleLowerCase(),s=e.type.toLocaleLowerCase();return r.some(e=>e.startsWith(".")?n.endsWith(e):e.endsWith("/*")?s.startsWith(e.slice(0,-1)):s===e)}var l=(t,r=e.files)=>t<1024?r.bytes(t):t<1048576?r.kilobytes(Math.round(t/1024)):r.megabytes(t/1048576),i=e=>Array.from(e.dataTransfer?.types??[]).includes("Files");function c({onAccept:e,accept:a,maxSizeBytes:c,maxFiles:u,multiple:f=!0,currentCount:p=0,acceptHint:m,disabled:d=!1}){const h=t().files,g=r(null),[y,x]=n(!1),[v,D]=n([]),L=r(0),A="string"==typeof m?m:"",b=s(t=>{if(d||!t)return;const r=Array.from(t);if(0===r.length)return;const n=[],s=[];for(const e of f?r:r.slice(0,1))o(e,a)?null!=c&&e.size>c?s.push({file:e,reason:"size",message:h.tooLarge(e.name,l(e.size,h),l(c,h))}):f&&null!=u&&p+n.length>=u?s.push({file:e,reason:"count",message:h.tooMany(e.name,u)}):n.push(e):s.push({file:e,reason:"type",message:h.notAccepted(e.name,A)});D(s),n.length&&e(n),g.current&&(g.current.value="")},[d,f,a,A,c,u,p,e,h]),j=s(()=>{d||g.current?.click()},[d]),k=s(()=>D([]),[]);return{inputRef:g,inputProps:{ref:g,type:"file",accept:a||void 0,multiple:f,disabled:d,tabIndex:-1,"aria-hidden":!0,className:"hidden",onChange:e=>b(e.target.files)},zoneProps:d?{}:{onDragEnter:e=>{i(e)&&(e.preventDefault(),L.current+=1,x(!0))},onDragOver:e=>{i(e)&&(e.preventDefault(),y||x(!0))},onDragLeave:e=>{i(e)&&(L.current=Math.max(0,L.current-1),0===L.current&&x(!1))},onDrop:e=>{i(e)&&(e.preventDefault(),L.current=0,x(!1),b(e.dataTransfer.files))}},pasteProps:d?{}:{onPaste:e=>{const t=function(e){const t=e.clipboardData;if(!t)return[];if(t.files&&t.files.length>0)return Array.from(t.files);const r=[];for(const e of Array.from(t.items??[]))if("file"===e.kind){const t=e.getAsFile();t&&r.push(t)}return r}(e);0!==t.length&&(e.preventDefault(),b(t))}},open:j,take:b,dragOver:y,rejections:v,clearRejections:k}}function u({rejections:e,className:t="mt-2"}){return 0===e.length?null:/* @__PURE__ */a("ul",{role:"alert",className:`${t} flex flex-col gap-0.5`,children:e.map(({file:e,message:t},r)=>/* @__PURE__ */a("li",{className:"text-xs text-red-600",children:t},`${e.name}-${r}`))})}export{u as FileIntakeAlert,o as acceptsFile,l as humanSize,c as useFileIntake};
1
+ import{DEFAULT_SHELL_STRINGS as e,useShellStrings as t}from"./chunk-BLMDTJOK.js";import{useRef as r,useState as n,useCallback as s}from"react";import{jsx as a}from"react/jsx-runtime";function o(e,t){const r=(t??"").split(",").map(e=>e.trim().toLocaleLowerCase()).filter(Boolean);if(0===r.length||r.includes("*")||r.includes("*/*"))return!0;const n=e.name.toLocaleLowerCase(),s=e.type.toLocaleLowerCase();return r.some(e=>e.startsWith(".")?n.endsWith(e):e.endsWith("/*")?s.startsWith(e.slice(0,-1)):s===e)}var l=(t,r=e.files)=>t<1024?r.bytes(t):t<1048576?r.kilobytes(Math.round(t/1024)):r.megabytes(t/1048576),i=e=>Array.from(e.dataTransfer?.types??[]).includes("Files");function c({onAccept:e,accept:a,maxSizeBytes:c,maxFiles:u,multiple:f=!0,currentCount:p=0,acceptHint:m,disabled:d=!1}){const h=t().files,g=r(null),[y,x]=n(!1),[v,D]=n([]),L=r(0),b="string"==typeof m?m:"",A=s(t=>{if(d||!t)return;const r=Array.from(t);if(0===r.length)return;const n=[],s=[];for(const e of f?r:r.slice(0,1))o(e,a)?null!=c&&e.size>c?s.push({file:e,reason:"size",message:h.tooLarge(e.name,l(e.size,h),l(c,h))}):f&&null!=u&&p+n.length>=u?s.push({file:e,reason:"count",message:h.tooMany(e.name,u)}):n.push(e):s.push({file:e,reason:"type",message:h.notAccepted(e.name,b)});D(s),n.length&&e(n),g.current&&(g.current.value="")},[d,f,a,b,c,u,p,e,h]),j=s(()=>{d||g.current?.click()},[d]),k=s(()=>D([]),[]);return{inputRef:g,inputProps:{ref:g,type:"file",accept:a||void 0,multiple:f,disabled:d,tabIndex:-1,"aria-hidden":!0,className:"hidden",onChange:e=>A(e.target.files)},zoneProps:d?{}:{onDragEnter:e=>{i(e)&&(e.preventDefault(),L.current+=1,x(!0))},onDragOver:e=>{i(e)&&(e.preventDefault(),y||x(!0))},onDragLeave:e=>{i(e)&&(L.current=Math.max(0,L.current-1),0===L.current&&x(!1))},onDrop:e=>{i(e)&&(e.preventDefault(),L.current=0,x(!1),A(e.dataTransfer.files))}},pasteProps:d?{}:{onPaste:e=>{const t=function(e){const t=e.clipboardData;if(!t)return[];if(t.files&&t.files.length>0)return Array.from(t.files);const r=[];for(const e of Array.from(t.items??[]))if("file"===e.kind){const t=e.getAsFile();t&&r.push(t)}return r}(e);0!==t.length&&(e.preventDefault(),A(t))}},open:j,take:A,dragOver:y,rejections:v,clearRejections:k}}function u({rejections:e,className:t="mt-2"}){return 0===e.length?null:/* @__PURE__ */a("ul",{role:"alert",className:`${t} flex flex-col gap-0.5`,children:e.map(({file:e,message:t},r)=>/* @__PURE__ */a("li",{className:"text-xs text-red-600",children:t},`${e.name}-${r}`))})}export{u as FileIntakeAlert,o as acceptsFile,l as humanSize,c as useFileIntake};
@@ -1,24 +1,24 @@
1
- import{inputClasses as e}from"./chunk-HJQAE6SP.js";import{isSafeLinkHref as t}from"./chunk-PJPK2ADX.js";import{Icon as r}from"./chunk-YT4B3NSV.js";import{useShellStrings as n}from"./chunk-HQLDTFAF.js";import{SpinnerRing as a}from"./chunk-2J6F4EE7.js";import{forwardRef as s,useCallback as i,useState as l,useId as o}from"react";import{jsx as c,jsxs as d,Fragment as m}from"react/jsx-runtime";var u=s(function({invalid:t,autoGrow:r,className:n="",onInput:a,rows:s=3,size:l,readOnly:o,...d},m){const u=i(e=>{if(r){const t=e.currentTarget;t.style.height="auto",t.style.height=`${t.scrollHeight}px`}a?.(e)},[r,a]);/* @__PURE__ */
1
+ import{inputClasses as e}from"./chunk-HJQAE6SP.js";import{isSafeLinkHref as t}from"./chunk-PJPK2ADX.js";import{SpinnerRing as r}from"./chunk-2J6F4EE7.js";import{Icon as n}from"./chunk-TAUIAKU3.js";import{useShellStrings as a}from"./chunk-BLMDTJOK.js";import{forwardRef as s,useCallback as i,useState as l,useId as o}from"react";import{jsx as c,jsxs as d,Fragment as m}from"react/jsx-runtime";var u=s(function({invalid:t,autoGrow:r,className:n="",onInput:a,rows:s=3,size:l,readOnly:o,...d},m){const u=i(e=>{if(r){const t=e.currentTarget;t.style.height="auto",t.style.height=`${t.scrollHeight}px`}a?.(e)},[r,a]);/* @__PURE__ */
2
2
  return c("textarea",{ref:m,"aria-invalid":t||void 0,rows:s,onInput:u,readOnly:o,className:e({invalid:t,size:l,readOnly:o,multiline:!0,className:`${r?"resize-none overflow-hidden":""} ${n}`.trim()}),...d})}),h={info:{box:"bg-blue-50 border-blue-200",icon:"text-blue-600"},success:{box:"bg-green-50 border-green-200",icon:"text-green-600"},warning:{box:"bg-amber-50 border-amber-200",icon:"text-amber-600"},danger:{box:"bg-red-50 border-red-200",icon:"text-red-600"},neutral:{box:"bg-[var(--status-neutral-soft)] border-[color:var(--line)]",icon:"text-[color:var(--status-neutral-soft-ink)]"}},p={info:"bg-blue-700 border-blue-700 text-white",success:"bg-green-700 border-green-700 text-white",warning:"bg-amber-700 border-amber-700 text-white",danger:"bg-red-700 border-red-700 text-white",neutral:"bg-[var(--status-neutral-solid)] border-[color:var(--status-neutral-solid)] text-[color:var(--status-on-solid)]"};function g({tone:e}){const t={className:"h-5 w-5","aria-hidden":!0};switch(e){case"success":/* @__PURE__ */
3
- return c(r,{name:"check-circle",look:"mini",...t});case"warning":/* @__PURE__ */
4
- return c(r,{name:"warning",look:"mini",...t});case"danger":/* @__PURE__ */
5
- return c(r,{name:"close-circle",look:"mini",...t});default:/* @__PURE__ */
6
- return c(r,{name:"info",look:"mini",...t})}}function x({tone:e="info",emphasis:t="subtle",title:a,children:s,icon:i,action:l,onDismiss:o,sticky:u=!1,className:x=""}){const b=h[e],f="solid"===t,y=n().banner,v=f?p[e]:b.box,N=u?"sticky top-0 z-30":"",k=/* @__PURE__ */d(m,{children:[a&&/* @__PURE__ */c("div",{className:("font-semibold "+(f?"":"text-gray-900")).trim(),children:a}),s&&/* @__PURE__ */c("div",{className:`${f?"":"text-gray-700"} ${a?"mt-0.5":""}`.trim(),children:s})]});/* @__PURE__ */
3
+ return c(n,{name:"check-circle",look:"mini",...t});case"warning":/* @__PURE__ */
4
+ return c(n,{name:"warning",look:"mini",...t});case"danger":/* @__PURE__ */
5
+ return c(n,{name:"close-circle",look:"mini",...t});default:/* @__PURE__ */
6
+ return c(n,{name:"info",look:"mini",...t})}}function x({tone:e="info",emphasis:t="subtle",title:r,children:s,icon:i,action:l,onDismiss:o,sticky:u=!1,className:x=""}){const b=h[e],f="solid"===t,y=a().banner,v=f?p[e]:b.box,N=u?"sticky top-0 z-30":"",k=/* @__PURE__ */d(m,{children:[r&&/* @__PURE__ */c("div",{className:("font-semibold "+(f?"":"text-gray-900")).trim(),children:r}),s&&/* @__PURE__ */c("div",{className:`${f?"":"text-gray-700"} ${r?"mt-0.5":""}`.trim(),children:s})]});/* @__PURE__ */
7
7
  return d("div",{role:"danger"===e?"alert":"status",className:`${N} flex items-start gap-3 rounded-lg border px-4 py-3 ${v} ${x}`.trim(),children:[
8
8
  /* @__PURE__ */c("span",{className:`mt-0.5 shrink-0 ${f?"":b.icon}`.trim(),children:i??/* @__PURE__ */c(g,{tone:e})}),null==l?/* @__PURE__ */c("div",{className:"min-w-0 flex-1 text-sm",children:k}):
9
9
  /* @__PURE__ */d("div",{className:"flex min-w-0 flex-1 flex-wrap items-start gap-x-3 gap-y-2",children:[
10
10
  /* @__PURE__ */c("div",{className:"min-w-0 grow basis-48 text-sm",children:k}),
11
- /* @__PURE__ */c("div",{className:"shrink-0 self-center",children:l})]}),o&&/* @__PURE__ */c("button",{type:"button",onClick:o,"aria-label":y.dismiss,className:"shrink-0 "+(f?"opacity-80 hover:opacity-100":"text-gray-400 hover:text-gray-600"),children:/* @__PURE__ */c(r,{name:"close",className:"h-4 w-4",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})}function b({summary:e,busy:t=!1,open:n,onOpenChange:a,label:s="Steps",className:i="",children:m}){const[u,h]=l(null),p=o(),g=n??u??t;/* @__PURE__ */
11
+ /* @__PURE__ */c("div",{className:"shrink-0 self-center",children:l})]}),o&&/* @__PURE__ */c("button",{type:"button",onClick:o,"aria-label":y.dismiss,className:"shrink-0 "+(f?"opacity-80 hover:opacity-100":"text-gray-400 hover:text-gray-600"),children:/* @__PURE__ */c(n,{name:"close",className:"h-4 w-4",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})}function b({summary:e,busy:t=!1,open:r,onOpenChange:a,label:s="Steps",className:i="",children:m}){const[u,h]=l(null),p=o(),g=r??u??t;/* @__PURE__ */
12
12
  return d("div",{className:`text-xs text-gray-500 ${i}`.trim(),children:[
13
13
  /* @__PURE__ */d("button",{type:"button",onClick:()=>{h(!g),a?.(!g)},"aria-expanded":g,"aria-controls":g?p:void 0,className:"flex w-full items-center gap-2 rounded text-left hover:text-gray-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-blue-600",children:[
14
- /* @__PURE__ */c(r,{name:"chevron-right",size:12,className:"shrink-0 motion-safe:transition-transform "+(g?"rotate-90":"")}),
14
+ /* @__PURE__ */c(n,{name:"chevron-right",size:12,className:"shrink-0 motion-safe:transition-transform "+(g?"rotate-90":"")}),
15
15
  /* @__PURE__ */c("span",{"aria-live":"polite",className:"min-w-0 flex-1 truncate",children:e})]}),g&&/* @__PURE__ */c("ol",{id:p,"aria-label":s,className:"mt-2 ml-2 space-y-2 border-l border-gray-200 pl-3",children:m})]})}var f={pending:"text-gray-400",active:"text-gray-800",complete:"text-gray-600",failed:"text-red-600",stopped:"text-gray-500",waiting:"text-amber-700",skipped:"text-gray-400"},y={pending:"Pending",active:"In progress",complete:"Done",failed:"Failed",stopped:"Stopped",waiting:"Waiting for you",skipped:"Skipped"};function v({status:e}){switch(e){case"active":/* @__PURE__ */
16
- return c(a,{className:"size-3 motion-reduce:animate-none"});case"complete":/* @__PURE__ */
17
- return c(r,{name:"check-circle",size:14,tone:"success"});case"failed":/* @__PURE__ */
18
- return c(r,{name:"close-circle",size:14,tone:"danger"});case"stopped":/* @__PURE__ */
19
- return c(r,{name:"no-symbol",size:14,tone:"muted"});case"waiting":/* @__PURE__ */
20
- return c(r,{name:"pause",size:14,tone:"warning"});case"skipped":/* @__PURE__ */
21
- return c(r,{name:"remove",size:14,tone:"muted"});default:/* @__PURE__ */
16
+ return c(r,{className:"size-3 motion-reduce:animate-none"});case"complete":/* @__PURE__ */
17
+ return c(n,{name:"check-circle",size:14,tone:"success"});case"failed":/* @__PURE__ */
18
+ return c(n,{name:"close-circle",size:14,tone:"danger"});case"stopped":/* @__PURE__ */
19
+ return c(n,{name:"no-symbol",size:14,tone:"muted"});case"waiting":/* @__PURE__ */
20
+ return c(n,{name:"pause",size:14,tone:"warning"});case"skipped":/* @__PURE__ */
21
+ return c(n,{name:"remove",size:14,tone:"muted"});default:/* @__PURE__ */
22
22
  return c("span",{className:"block size-3 rounded-full border border-gray-300"})}}function N({label:e,description:t,status:r="complete",statusWord:n,icon:a,children:s}){/* @__PURE__ */
23
23
  return d("li",{className:`flex items-start gap-2 ${f[r]}`,"data-status":r,children:[
24
24
  /* @__PURE__ */c("span",{"aria-hidden":"true",className:"mt-1 flex size-3.5 shrink-0 items-center justify-center",children:a??/* @__PURE__ */c(v,{status:r})}),
@@ -28,11 +28,11 @@ return d("li",{className:`flex items-start gap-2 ${f[r]}`,"data-status":r,childr
28
28
  /* @__PURE__ */d("span",{className:"text-gray-400",children:["[",r[1],"]"]},a++)):void 0!==r[3]?t.push(
29
29
  /* @__PURE__ */c("a",{href:w(r[4])?r[4]:void 0,target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:underline",children:r[3]},a++)):void 0!==r[5]?t.push(
30
30
  /* @__PURE__ */c("strong",{className:"font-semibold text-gray-900",children:r[5]},a++)):void 0!==r[6]?t.push(
31
- /* @__PURE__ */c("code",{className:"rounded bg-gray-200 px-1 py-0.5 font-mono text-[0.85em] text-gray-800",children:r[6]},a++)):void 0!==r[7]&&t.push(/* @__PURE__ */c("em",{children:r[7]},a++)),n=k.lastIndex;return n<e.length&&t.push(e.slice(n)),t}function z({alt:e}){const t=e.replace(/^screenshot:\s*/i,""),a=n().markdown;/* @__PURE__ */
31
+ /* @__PURE__ */c("code",{className:"rounded bg-gray-200 px-1 py-0.5 font-mono text-[0.85em] text-gray-800",children:r[6]},a++)):void 0!==r[7]&&t.push(/* @__PURE__ */c("em",{children:r[7]},a++)),n=k.lastIndex;return n<e.length&&t.push(e.slice(n)),t}function z({alt:e}){const t=e.replace(/^screenshot:\s*/i,""),r=a().markdown;/* @__PURE__ */
32
32
  return d("div",{className:"my-1 flex items-start gap-2 rounded-lg border border-dashed border-gray-300 bg-gray-50 px-3 py-3 text-gray-500",children:[
33
- /* @__PURE__ */c(r,{name:"camera",look:"mini",className:"mt-0.5 h-4 w-4 shrink-0","aria-hidden":"true"}),
33
+ /* @__PURE__ */c(n,{name:"camera",look:"mini",className:"mt-0.5 h-4 w-4 shrink-0","aria-hidden":"true"}),
34
34
  /* @__PURE__ */d("span",{className:"text-xs",children:[
35
- /* @__PURE__ */c("span",{className:"font-medium text-gray-600",children:`${a.screenshot} — `}),t]})]})}function j(e,t){const r=[];for(const n of e){const e=t.exec(n);e?r.push(e[1]):r.length&&(r[r.length-1]+=" "+n.trim())}return r}var I=e=>e.replace(/^\s*\|/,"").replace(/\|\s*$/,"").split("|").map(e=>e.trim());function S(e,t){const r=e.split("\n"),n=r[0],a=/^(#{2,4})\s+(.*)$/.exec(n);if(a&&1===r.length){const e=a[1].length;/* @__PURE__ */
35
+ /* @__PURE__ */c("span",{className:"font-medium text-gray-600",children:`${r.screenshot} — `}),t]})]})}function j(e,t){const r=[];for(const n of e){const e=t.exec(n);e?r.push(e[1]):r.length&&(r[r.length-1]+=" "+n.trim())}return r}var I=e=>e.replace(/^\s*\|/,"").replace(/\|\s*$/,"").split("|").map(e=>e.trim());function O(e,t){const r=e.split("\n"),n=r[0],a=/^(#{2,4})\s+(.*)$/.exec(n);if(a&&1===r.length){const e=a[1].length;/* @__PURE__ */
36
36
  return c(`h${e}`,{className:2===e?"mt-2 text-sm font-semibold uppercase tracking-wide text-gray-500":3===e?"mt-1 text-base font-semibold text-gray-900":"mt-1 text-sm font-semibold text-gray-900",children:$(a[2])},t)}if(1===r.length&&/^---+$/.test(n))/* @__PURE__ */
37
37
  return c("hr",{className:"border-gray-200"},t);if(function(e){return e.length>=2&&e[0].includes("|")&&/^\s*\|?[\s:|-]*-[\s:|-]*\|?\s*$/.test(e[1])&&e[1].includes("-")}(r))return function(e,t){const r=I(e[0]),n=e.slice(2).map(I);/* @__PURE__ */
38
38
  return c("div",{className:"my-1 overflow-x-auto rounded-lg border border-gray-200",children:/* @__PURE__ */d("table",{className:"w-full border-collapse text-sm",children:[
@@ -42,6 +42,6 @@ return c("div",{className:"my-1 rounded-r-lg border-l-4 border-blue-300 bg-blue-
42
42
  return c(z,{alt:s[1]},t);if(/^[-*]\s+/.test(n)){const e=j(r,/^[-*]\s+(.*)$/);/* @__PURE__ */
43
43
  return c("ul",{className:"list-disc space-y-1 pl-5 marker:text-gray-400",children:e.map((e,t)=>/* @__PURE__ */c("li",{children:$(e)},t))},t)}const i=/^(\d+)\.\s+/.exec(n);if(i){const e=j(r,/^\d+\.\s+(.*)$/);/* @__PURE__ */
44
44
  return c("ol",{start:Number(i[1]),className:"list-decimal space-y-1 pl-5 marker:text-gray-400",children:e.map((e,t)=>/* @__PURE__ */c("li",{className:"pl-1",children:$(e)},t))},t)}/* @__PURE__ */
45
- return c("p",{children:$(r.join(" "))},t)}var D=/^( {0,3})(`{3,}|~{3,})[ \t]*(.*?)[ \t]*$/;function E(e){const t=e.replace(/\r\n/g,"\n").split("\n"),r=[];let n=[];const a=()=>{for(const e of n.join("\n").split(/\n{2,}/)){const t=e.replace(/\s+$/,"");""!==t.trim()&&r.push({text:t})}n=[]};for(let e=0;e<t.length;e+=1){const s=D.exec(t[e]);if(!(null!==s&&!("`"===s[2][0]&&s[3].includes("`")))){n.push(t[e]);continue}a();const[,i,l,o]=s,c=[];for(e+=1;e<t.length;e+=1){const r=D.exec(t[e]);if(null!==r&&r[2][0]===l[0]&&r[2].length>=l.length&&""===r[3])break;c.push(i?t[e].replace(new RegExp(`^ {0,${i.length}}`),""):t[e])}r.push({fence:{lang:o.split(/[ \t]/)[0],code:c.join("\n")}})}return a(),r}function F({children:e,className:t}){/* @__PURE__ */
46
- return c("div",{className:`space-y-3 text-sm leading-relaxed text-gray-700 ${t??""}`.trim(),children:E(e??"").map((e,t)=>"fence"in e?function({lang:e,code:t},r){/* @__PURE__ */
47
- return c("pre",{"data-language":e||void 0,className:"my-1 overflow-x-auto rounded-lg border border-gray-200 bg-gray-50 p-3 font-mono text-xs text-gray-800",children:/* @__PURE__ */c("code",{children:t})},r)}(e.fence,t):S(e.text,t))})}export{x as Banner,F as Markdown,b as StepChain,N as StepChainItem,u as Textarea_default};
45
+ return c("p",{children:$(r.join(" "))},t)}var A=/^( {0,3})(`{3,}|~{3,})[ \t]*(.*?)[ \t]*$/;function D(e){const t=e.replace(/\r\n/g,"\n").split("\n"),r=[];let n=[];const a=()=>{for(const e of n.join("\n").split(/\n{2,}/)){const t=e.replace(/\s+$/,"");""!==t.trim()&&r.push({text:t})}n=[]};for(let e=0;e<t.length;e+=1){const s=A.exec(t[e]);if(!(null!==s&&!("`"===s[2][0]&&s[3].includes("`")))){n.push(t[e]);continue}a();const[,i,l,o]=s,c=[];for(e+=1;e<t.length;e+=1){const r=A.exec(t[e]);if(null!==r&&r[2][0]===l[0]&&r[2].length>=l.length&&""===r[3])break;c.push(i?t[e].replace(new RegExp(`^ {0,${i.length}}`),""):t[e])}r.push({fence:{lang:o.split(/[ \t]/)[0],code:c.join("\n")}})}return a(),r}function E({children:e,className:t}){/* @__PURE__ */
46
+ return c("div",{className:`space-y-3 text-sm leading-relaxed text-gray-700 ${t??""}`.trim(),children:D(e??"").map((e,t)=>"fence"in e?function({lang:e,code:t},r){/* @__PURE__ */
47
+ return c("pre",{"data-language":e||void 0,className:"my-1 overflow-x-auto rounded-lg border border-gray-200 bg-gray-50 p-3 font-mono text-xs text-gray-800",children:/* @__PURE__ */c("code",{children:t})},r)}(e.fence,t):O(e.text,t))})}export{x as Banner,E as Markdown,b as StepChain,N as StepChainItem,u as Textarea_default};
@@ -1 +1 @@
1
- import{VERSION as e}from"./chunk-RC27X4SF.js";import{setBoundaryErrorReporter as t}from"./chunk-KNUR2UEG.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},C=class{l},E=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);E(()=>{const s=p(t,C),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,_=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},F=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},R=[200,500],Z=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();E(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,_),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,R,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{F(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,R,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},x=class{p;l;h(e){this.p?.(e)}},j=[2500,4e3],B=[800,1800],N=e=>{document.prerendering?E(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};var U=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,O=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,H=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},J=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,K=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,W=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,D=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,V=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,X=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,Q=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(X,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=Q.exec(n.trim()),i=e&&Y(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&O.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(X,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&U.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=t.getAccessToken();i&&n(t.endpoint??"/api/client-telemetry/web-batches/",{method:"POST",keepalive:!0,credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`},body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&H.test(e.app),n="string"==typeof e.release&&H.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const d=n.fetch??window.fetch.bind(window),l=new q({app:n.app,release:n.release,shell_version:H.test(e)?e:""}),u=ne(n.routeKey()),f=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let v=!1;const m=()=>{for(const e of l.drain())oe(e,n,d)},C=e=>{v||(l.addError(e),l.size>=50&&m())},L=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(J,"[redacted]").replace(K,"[redacted]").replace(W,"[url]").replace(D,"[id]").replace(V,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a},k=e=>{v||(l.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,u,()=>ne(n.routeKey()),f)),l.size>=50&&m())},S=n.vitalsSampleRate??1;S>0&&(S>=1||(n.random??Math.random)()<S)&&(((e,t={})=>{let n=!1;const s=w(t);E(()=>{let d,l=h(),u=g("LCP");const f=p(t,x),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,j,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,j,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;F(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,j,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(k),Z(k),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(k),P(k),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,B,t.reportAllChanges);N(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,B,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,B,t.reportAllChanges),d(!0))})},t)}})})(k));const z=e=>{const{error:t,message:n,filename:i,lineno:a,colno:r}=e;if(null!=t)return void C(L(t,"onerror"));const o=i?ee(`at ${i}:${a??0}:${r??0}`):[];C({...L(n??"","onerror"),frames:o})},M=e=>C(L(e.reason,"unhandledrejection")),$=()=>{"hidden"===document.visibilityState&&m()};window.addEventListener("error",z),window.addEventListener("unhandledrejection",M),document.addEventListener("visibilitychange",$),window.addEventListener("pagehide",m);const _=window.setInterval(m,n.flushIntervalMs??6e4),R=t(e=>C(L(e,"boundary"))),U={flush:m,reportError:e=>C(L(e,"boundary")),stop(){v||(m(),v=!0,window.removeEventListener("error",z),window.removeEventListener("unhandledrejection",M),document.removeEventListener("visibilitychange",$),window.removeEventListener("pagehide",m),window.clearInterval(_),R(),ae===U&&(ae=null))}};return ae=U,U}export{se as startClientTelemetry};
1
+ import{VERSION as e}from"./chunk-T6D5LTQR.js";import{setBoundaryErrorReporter as t}from"./chunk-KNUR2UEG.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},E=class{l},C=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);C(()=>{const s=p(t,E),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,_=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},R=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},Z=[200,500],F=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();C(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,_),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,Z,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{R(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,Z,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},x=class{p;l;h(e){this.p?.(e)}},j=[2500,4e3],B=[800,1800],N=e=>{document.prerendering?C(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};var U=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,O=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,H=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},J=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,K=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,D=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,W=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,V=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,Q=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,X=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(Q,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=X.exec(n.trim()),i=e&&Y(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&O.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(Q,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&U.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=t.getAccessToken();i&&n(t.endpoint??"/api/client-telemetry/web-batches/",{method:"POST",keepalive:!0,credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`},body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&H.test(e.app),n="string"==typeof e.release&&H.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const d=n.fetch??window.fetch.bind(window),l=new q({app:n.app,release:n.release,shell_version:H.test(e)?e:""}),u=ne(n.routeKey()),f=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let v=!1;const m=()=>{for(const e of l.drain())oe(e,n,d)},E=e=>{v||(l.addError(e),l.size>=50&&m())},L=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(J,"[redacted]").replace(K,"[redacted]").replace(D,"[url]").replace(W,"[id]").replace(V,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a},k=e=>{v||(l.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,u,()=>ne(n.routeKey()),f)),l.size>=50&&m())},S=n.vitalsSampleRate??1;S>0&&(S>=1||(n.random??Math.random)()<S)&&(((e,t={})=>{let n=!1;const s=w(t);C(()=>{let d,l=h(),u=g("LCP");const f=p(t,x),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,j,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,j,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;R(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,j,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(k),F(k),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(k),P(k),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,B,t.reportAllChanges);N(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,B,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,B,t.reportAllChanges),d(!0))})},t)}})})(k));const z=e=>{const{error:t,message:n,filename:i,lineno:a,colno:r}=e;if(null!=t)return void E(L(t,"onerror"));const o=i?ee(`at ${i}:${a??0}:${r??0}`):[];E({...L(n??"","onerror"),frames:o})},M=e=>E(L(e.reason,"unhandledrejection")),$=()=>{"hidden"===document.visibilityState&&m()};window.addEventListener("error",z),window.addEventListener("unhandledrejection",M),document.addEventListener("visibilitychange",$),window.addEventListener("pagehide",m);const _=window.setInterval(m,n.flushIntervalMs??6e4),Z=t(e=>E(L(e,"boundary"))),U={flush:m,reportError:e=>E(L(e,"boundary")),stop(){v||(m(),v=!0,window.removeEventListener("error",z),window.removeEventListener("unhandledrejection",M),document.removeEventListener("visibilitychange",$),window.removeEventListener("pagehide",m),window.clearInterval(_),Z(),ae===U&&(ae=null))}};return ae=U,U}export{se as startClientTelemetry};
@@ -1 +1 @@
1
- import{loadThemeIconSet as e}from"./chunk-YT4B3NSV.js";var r=["academic-cap","accent","account","account-circle","add","add-circle","add-person","adjust","align-center","align-justify","align-left","align-right","align-separate","alignment","anchor","animation","apps","archive-box","arrow","arrow-down","arrow-left","arrow-left-end-on-rectangle","arrow-long-right","arrow-right","arrow-trending-down","arrow-trending-up","arrow-up","arrow-up-right","at-symbol","attach","background","bag","bank","bars-3-bottom-left","battery","beaker","bell","bell-alert","bell-plus","billing","black-and-white","block-badge","block-banner","block-box","block-button","block-column","block-coupon","block-divider","block-footer","block-heading","block-image","block-included-list","block-layered-images","block-product","block-product-title","block-section","block-social","block-spacer","block-text","block-video","blog-post","bold","bolt","book-open","bookmark","bookmark-square","border-all","border-bottom","border-left","border-right","border-top","braces","breadcrumb","briefcase","bug","bug-ant","building-library","building-office-2","button","button-arrow","button-icon","calculator","calendar","calendar-check","camera","caption","car","card-payment","caret","cart","case","case-capitalized","case-lower","case-normal","case-upper","category","chart","chart-bar","chart-bar-square","chart-line","chat","chat-bubble-left-right","chat-bubble-oval-left-ellipsis","check","check-circle","checkbox","chevron","chevron-double","chevron-double-left","chevron-double-right","chevron-down","chevron-left","chevron-right","chevron-up","chevron-up-down","circle-stack","clear-marks","clipboard","clipboard-check","clipboard-document-list","clipboard-list","clock","close","close-circle","cloud","cloud-alert","cloud-arrow-up","cloud-check","cloud-download","cloud-pause","cloud-slash","code","code-bracket","collapse","collapse-all","column-gap","column-widths","columns","company","compose","contrast","cookie","copied","copy","copy-style","copy-to-page","corner","crop","cube-transparent","cursor","cursor-arrow-rays","cursor-click","dashboard","date","desktop","diagram","direction","direction-down","direction-left","direction-right","direction-up","document","document-check","document-magnifying-glass","dollar","dot","download","drag","drop","duplicate","edit","email","emphasis","eraser","error","expand","external","eye","eye-off","face-smile","filter","finish","fire","flag","flag-au","flag-ca","flag-eu","flag-gb","flag-nz","flag-us","folder","folder-open","folder-plus","forward","full-width","gap","gem","gift","globe","grid","ground","hand","hand-thumb-up","hash","headquarters","heart","height","help","help-off","hexagon","home","hover","icon-after-text","icon-before-text","identification","image","image-off","images","inbox","info","italic","key","layers","layout","letter-spacing","lightbulb","line-between","line-dashed","line-dotted","line-solid","line-spacing","line-style","link","link-slash","list","list-format","list-none","location","lock","logo","logout","map","media","media-layout-big-two","media-layout-inset","media-layout-side-by-side","media-layout-stacked","megaphone","menu","meta","microphone","money","moon","more","more-vertical","move-down","move-up","newspaper","no-symbol","note","nudge","numbered-list","opacity","own-text","package","package-open","padding-all","padding-bottom","padding-left","padding-left-right","padding-right","padding-top","padding-x","padding-y","page","paint-brush","panel-left","panel-right","paragraph-spacing","parcel","paste","paste-style","pause","pen","people","percent","phone","phone-hidden","placement","play","plus-minus","power","presentation-chart-bar","print","product","product-field","product-size","progress","quiet","radio-dot","radius","receipt","receipt-percent","receipt-refund","rectangle-group","redo","refresh","remove","remove-circle","rename","reply","reply-all","revert","robot","rotate","scale","scroll-point","scroll-text","search","select-all","send","server","settings","shadow","shape-ellipse","shape-rect","share","shield-check","shield-exclamation","sides-each","signal","signal-slash","sitemap","slide-arrows-bare","slide-arrows-round","slide-arrows-square","slide-picker-bar","slide-picker-cards","slide-picker-dots","slide-picker-numbers","slide-picker-squares","sort","sparkles","speaker","speaker-wave","spec-table","spinner","split","square","star","state","status-circle","status-dot","sticky","stop-circle","store","strike","styles","subscript","success-burst","sun","superscript","swap","swatch","table","tablet","tabs","tag","target","team","telephone","template","text-color","text-lines","text-size","text-small","text-value","texture","theme","ticket","title","trash","trigger","truck","tv","type","tyre","underline","undo","upload","v-align","verified","video-off","view-columns","wallet","warning","weight","wheel","widgets","width","window","windows","words-from","wrap","wrench","wrench-screwdriver","zoom-in"],a=new Set(r),o=e=>"string"==typeof e&&a.has(e),t=[{name:"phosphor",label:"Phosphor"},{name:"iconoir",label:"Iconoir"},{name:"lucide",label:"Lucide"},{name:"tabler",label:"Tabler"}],l={pink:"phosphor",green:"iconoir",grey:"lucide",blue:"tabler"};function c(r){return e(r)}function i(e,r,a){return a?"string"==typeof r&&r?r:null:l[e]??null}export{r as ICON_NAMES,l as ICON_SET_FOR_THEME,t as THEME_ICON_SETS,i as iconSetFor,o as isIconName,c as loadIconSet};
1
+ import{loadThemeIconSet as e}from"./chunk-TAUIAKU3.js";var r=["academic-cap","accent","account","account-circle","add","add-circle","add-person","adjust","align-center","align-justify","align-left","align-right","align-separate","alignment","anchor","animation","apps","archive-box","arrow","arrow-down","arrow-left","arrow-left-end-on-rectangle","arrow-long-right","arrow-right","arrow-trending-down","arrow-trending-up","arrow-up","arrow-up-right","at-symbol","attach","background","bag","bank","bars-3-bottom-left","battery","beaker","bell","bell-alert","bell-plus","billing","black-and-white","block-badge","block-banner","block-box","block-button","block-column","block-coupon","block-divider","block-footer","block-heading","block-image","block-included-list","block-layered-images","block-product","block-product-title","block-section","block-social","block-spacer","block-text","block-video","blog-post","bold","bolt","book-open","bookmark","bookmark-square","border-all","border-bottom","border-left","border-right","border-top","braces","breadcrumb","briefcase","bug","bug-ant","building-library","building-office-2","button","button-arrow","button-icon","calculator","calendar","calendar-check","camera","caption","car","card-payment","caret","cart","case","case-capitalized","case-lower","case-normal","case-upper","category","chart","chart-bar","chart-bar-square","chart-line","chat","chat-bubble-left-right","chat-bubble-oval-left-ellipsis","check","check-circle","checkbox","chevron","chevron-double","chevron-double-left","chevron-double-right","chevron-down","chevron-left","chevron-right","chevron-up","chevron-up-down","circle-stack","clear-marks","clipboard","clipboard-check","clipboard-document-list","clipboard-list","clock","close","close-circle","cloud","cloud-alert","cloud-arrow-up","cloud-check","cloud-download","cloud-pause","cloud-slash","code","code-bracket","collapse","collapse-all","column-gap","column-widths","columns","company","compose","contrast","cookie","copied","copy","copy-style","copy-to-page","corner","crop","cube-transparent","cursor","cursor-arrow-rays","cursor-click","dashboard","date","desktop","diagram","direction","direction-down","direction-left","direction-right","direction-up","document","document-check","document-magnifying-glass","dollar","dot","download","drag","drop","duplicate","edit","email","emphasis","eraser","error","expand","external","eye","eye-off","face-smile","filter","finish","fire","flag","flag-au","flag-ca","flag-eu","flag-gb","flag-nz","flag-us","folder","folder-open","folder-plus","forward","full-width","gap","gem","gift","globe","grid","ground","hand","hand-thumb-up","hash","headquarters","heart","height","help","help-off","hexagon","home","hover","icon-after-text","icon-before-text","identification","image","image-off","images","inbox","info","italic","key","layers","layout","letter-spacing","lightbulb","line-between","line-dashed","line-dotted","line-solid","line-spacing","line-style","link","link-slash","list","list-format","list-none","location","lock","logo","logout","map","media","media-layout-big-two","media-layout-inset","media-layout-side-by-side","media-layout-stacked","megaphone","menu","meta","microphone","money","moon","more","more-vertical","move-down","move-up","newspaper","no-symbol","note","nudge","numbered-list","opacity","own-text","package","package-open","padding-all","padding-bottom","padding-left","padding-left-right","padding-right","padding-top","padding-x","padding-y","page","paint-brush","panel-left","panel-right","paragraph-spacing","parcel","paste","paste-style","pause","pen","people","percent","phone","phone-hidden","placement","play","plus-minus","power","presentation-chart-bar","print","product","product-field","product-size","progress","quiet","quote","radio-dot","radius","receipt","receipt-percent","receipt-refund","rectangle-group","redo","refresh","remove","remove-circle","rename","reply","reply-all","revert","robot","rotate","scale","scroll-point","scroll-text","search","select-all","send","server","settings","shadow","shape-ellipse","shape-rect","share","shield-check","shield-exclamation","sides-each","signal","signal-slash","sitemap","slide-arrows-bare","slide-arrows-round","slide-arrows-square","slide-picker-bar","slide-picker-cards","slide-picker-dots","slide-picker-numbers","slide-picker-squares","sort","sparkles","speaker","speaker-wave","spec-table","spinner","split","square","star","state","status-circle","status-dot","sticky","stop-circle","store","strike","styles","subscript","success-burst","sun","superscript","swap","swatch","table","tablet","tabs","tag","target","team","telephone","template","text-color","text-lines","text-size","text-small","text-value","texture","theme","ticket","title","trash","trigger","truck","tv","type","tyre","underline","undo","upload","v-align","verified","video-off","view-columns","wallet","warning","weight","wheel","widgets","width","window","windows","words-from","wrap","wrench","wrench-screwdriver","zoom-in"],a=new Set(r),o=e=>"string"==typeof e&&a.has(e),t=[{name:"phosphor",label:"Phosphor"},{name:"iconoir",label:"Iconoir"},{name:"lucide",label:"Lucide"},{name:"tabler",label:"Tabler"}],l={pink:"phosphor",green:"iconoir",grey:"lucide",blue:"tabler"};function c(r){return e(r)}function i(e,r,a){return a?"string"==typeof r&&r?r:null:l[e]??null}export{r as ICON_NAMES,l as ICON_SET_FOR_THEME,t as THEME_ICON_SETS,i as iconSetFor,o as isIconName,c as loadIconSet};
@@ -1,5 +1,5 @@
1
- import{Tooltip as e}from"./chunk-RDLWLATO.js";import{useBrowserLayoutEffect as r,useBrowserState as t}from"./chunk-D65T4H6J.js";import{useShellStrings as o}from"./chunk-HQLDTFAF.js";import{useRef as n,useEffect as i,useCallback as l}from"react";import{jsx as s,jsxs as a,Fragment as c}from"react/jsx-runtime";var u=(e,r,t)=>Math.min(t,Math.max(r,e));function d(e,r,t,o,n){return Math.round(u("left"===t||"top"===t?e+r:e-r,o,n))}function h(e,r,t){let o=null;try{o=window.localStorage.getItem(e)}catch{return null}const n=o?parseInt(o,10):NaN;return Number.isNaN(n)?null:u(n,r,t)}function f({width:t,onResize:a,orientation:c="vertical",side:f,min:m,max:v,defaultWidth:g=m,step:b=16,storageKey:p,label:w,hint:x,controls:y,className:z=""}){const N="horizontal"===c,k=o().resizeHandle,P=n(null),$=n({onResize:a,min:m,max:v,side:f});$.current={onResize:a,min:m,max:v,side:f},r(()=>{if(!p)return;const e=h(p,m,v);null!==e&&e!==t&&a(e)},[p]),i(()=>{if(!p)return;const e=window.setTimeout(()=>{try{window.localStorage.setItem(p,String(Math.round(t)))}catch{}},200);return()=>window.clearTimeout(e)},[t,p]);const D=l(()=>{P.current=null,document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")},[]);i(()=>D,[D]);const M=e=>{P.current&&(e.currentTarget.hasPointerCapture?.(P.current.pointer)&&e.currentTarget.releasePointerCapture(P.current.pointer),D())},T="left"===f?"right-0":"right"===f?"left-0":"top"===f?"bottom-0":"top-0",C="left"===f?"right":"right"===f?"left":"top"===f?"bottom":"top",R=N?`absolute inset-x-0 ${T} z-10 flex h-2`:`absolute inset-y-0 ${T} z-10 flex w-2`;/* @__PURE__ */
2
- return s(e,{content:x??k.hint,side:C,delay:600,className:`${R} ${z}`.trim(),children:/* @__PURE__ */s("div",{role:"separator",tabIndex:0,"aria-orientation":c,"aria-label":w??k.label,"aria-valuenow":Math.round(t),"aria-valuemin":m,"aria-valuemax":v,"aria-controls":y,"data-resize-handle":f,onPointerDown:e=>{0===e.button&&(e.preventDefault(),P.current={x:N?e.clientY:e.clientX,width:t,moved:!1,pointer:e.pointerId},e.currentTarget.setPointerCapture?.(e.pointerId),document.body.style.cursor=N?"row-resize":"col-resize",document.body.style.userSelect="none")},onPointerMove:e=>{const r=P.current;if(!r)return;if(0===e.buttons)return void D();const t=(N?e.clientY:e.clientX)-r.x;if(!r.moved){if(Math.abs(t)<3)return;r.moved=!0}const{onResize:o,min:n,max:i,side:l}=$.current;o(d(r.width,t,l,n,i))},onPointerUp:M,onPointerCancel:M,onLostPointerCapture:()=>{P.current&&D()},onDoubleClick:()=>a(u(g,m,v)),onKeyDown:e=>{const r=N?"ArrowDown":"ArrowRight",o=N?"ArrowUp":"ArrowLeft",n=e.key===r?b:e.key===o?-b:null,i=null!==n?d(t,n,f,m,v):"Home"===e.key?m:"End"===e.key?v:"Enter"===e.key?u(g,m,v):null;null!==i&&(e.preventDefault(),i!==t&&a(i))},className:N?"group/resize relative h-full w-full cursor-row-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"group/resize relative h-full w-full cursor-col-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */s("div",{"aria-hidden":"true",className:N?`absolute inset-x-0 ${T} h-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:h-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`:`absolute inset-y-0 ${T} w-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:w-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`})})})}var m=(e,r,t)=>Math.min(Math.max(e,r),t);function v({sidebar:e,sidebarTop:r,sidebarBottom:n,children:i,side:l="left",storageKey:u,defaultWidth:d=256,minWidth:v=180,maxWidth:g=480,className:b="",sidebarClassName:p=("right"===l?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:w="bg-white"}){const x="right"===l,y=o().sidebar,[z,N]=t(()=>(u?h(u,v,g):null)??m(d,v,g),m(d,v,g)),k=null!=r||null!=n,P=/* @__PURE__ */a("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:z},children:[
1
+ import{Tooltip as e}from"./chunk-RDLWLATO.js";import{useBrowserLayoutEffect as r,useBrowserState as t}from"./chunk-D65T4H6J.js";import{useShellStrings as o}from"./chunk-BLMDTJOK.js";import{useRef as n,useEffect as i,useCallback as l}from"react";import{jsx as s,jsxs as a,Fragment as c}from"react/jsx-runtime";var u=(e,r,t)=>Math.min(t,Math.max(r,e));function d(e,r,t,o,n){return Math.round(u("left"===t||"top"===t?e+r:e-r,o,n))}function h(e,r,t){let o=null;try{o=window.localStorage.getItem(e)}catch{return null}const n=o?parseInt(o,10):NaN;return Number.isNaN(n)?null:u(n,r,t)}function f({width:t,onResize:a,orientation:c="vertical",side:f,min:m,max:v,defaultWidth:g=m,step:b=16,storageKey:p,label:w,hint:x,controls:y,className:z=""}){const N="horizontal"===c,k=o().resizeHandle,M=n(null),P=n({onResize:a,min:m,max:v,side:f});P.current={onResize:a,min:m,max:v,side:f},r(()=>{if(!p)return;const e=h(p,m,v);null!==e&&e!==t&&a(e)},[p]),i(()=>{if(!p)return;const e=window.setTimeout(()=>{try{window.localStorage.setItem(p,String(Math.round(t)))}catch{}},200);return()=>window.clearTimeout(e)},[t,p]);const $=l(()=>{M.current=null,document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")},[]);i(()=>$,[$]);const D=e=>{M.current&&(e.currentTarget.hasPointerCapture?.(M.current.pointer)&&e.currentTarget.releasePointerCapture(M.current.pointer),$())},T="left"===f?"right-0":"right"===f?"left-0":"top"===f?"bottom-0":"top-0",C="left"===f?"right":"right"===f?"left":"top"===f?"bottom":"top",R=N?`absolute inset-x-0 ${T} z-10 flex h-2`:`absolute inset-y-0 ${T} z-10 flex w-2`;/* @__PURE__ */
2
+ return s(e,{content:x??k.hint,side:C,delay:600,className:`${R} ${z}`.trim(),children:/* @__PURE__ */s("div",{role:"separator",tabIndex:0,"aria-orientation":c,"aria-label":w??k.label,"aria-valuenow":Math.round(t),"aria-valuemin":m,"aria-valuemax":v,"aria-controls":y,"data-resize-handle":f,onPointerDown:e=>{0===e.button&&(e.preventDefault(),M.current={x:N?e.clientY:e.clientX,width:t,moved:!1,pointer:e.pointerId},e.currentTarget.setPointerCapture?.(e.pointerId),document.body.style.cursor=N?"row-resize":"col-resize",document.body.style.userSelect="none")},onPointerMove:e=>{const r=M.current;if(!r)return;if(0===e.buttons)return void $();const t=(N?e.clientY:e.clientX)-r.x;if(!r.moved){if(Math.abs(t)<3)return;r.moved=!0}const{onResize:o,min:n,max:i,side:l}=P.current;o(d(r.width,t,l,n,i))},onPointerUp:D,onPointerCancel:D,onLostPointerCapture:()=>{M.current&&$()},onDoubleClick:()=>a(u(g,m,v)),onKeyDown:e=>{const r=N?"ArrowDown":"ArrowRight",o=N?"ArrowUp":"ArrowLeft",n=e.key===r?b:e.key===o?-b:null,i=null!==n?d(t,n,f,m,v):"Home"===e.key?m:"End"===e.key?v:"Enter"===e.key?u(g,m,v):null;null!==i&&(e.preventDefault(),i!==t&&a(i))},className:N?"group/resize relative h-full w-full cursor-row-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"group/resize relative h-full w-full cursor-col-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */s("div",{"aria-hidden":"true",className:N?`absolute inset-x-0 ${T} h-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:h-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`:`absolute inset-y-0 ${T} w-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:w-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`})})})}var m=(e,r,t)=>Math.min(Math.max(e,r),t);function v({sidebar:e,sidebarTop:r,sidebarBottom:n,children:i,side:l="left",storageKey:u,defaultWidth:d=256,minWidth:v=180,maxWidth:g=480,className:b="",sidebarClassName:p=("right"===l?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:w="bg-white"}){const x="right"===l,y=o().sidebar,[z,N]=t(()=>(u?h(u,v,g):null)??m(d,v,g),m(d,v,g)),k=null!=r||null!=n,M=/* @__PURE__ */a("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:z},children:[
3
3
  /* @__PURE__ */a("div",{className:`flex h-full flex-col ${k?"overflow-hidden":"overflow-y-auto"} ${p}`,children:[null!=r&&/* @__PURE__ */s("div",{className:"flex shrink-0 flex-col gap-2 px-2 pt-3 pb-2",children:r}),k?/* @__PURE__ */s("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e}):e,null!=n&&/* @__PURE__ */s("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:n})]}),
4
- /* @__PURE__ */s(f,{side:l,width:z,onResize:N,min:v,max:g,defaultWidth:m(d,v,g),storageKey:u,hint:y.resize})]}),$=/* @__PURE__ */s("div",{className:`flex min-w-0 flex-1 flex-col ${w}`,children:i});/* @__PURE__ */
5
- return s("div",{className:`flex h-full w-full overflow-hidden ${b}`,children:/* @__PURE__ */a(c,x?{children:[$,P]}:{children:[P,$]})})}export{f as ResizeHandle,v as SidebarLayout};
4
+ /* @__PURE__ */s(f,{side:l,width:z,onResize:N,min:v,max:g,defaultWidth:m(d,v,g),storageKey:u,hint:y.resize})]}),P=/* @__PURE__ */s("div",{className:`flex min-w-0 flex-1 flex-col ${w}`,children:i});/* @__PURE__ */
5
+ return s("div",{className:`flex h-full w-full overflow-hidden ${b}`,children:/* @__PURE__ */a(c,x?{children:[P,M]}:{children:[M,P]})})}export{f as ResizeHandle,v as SidebarLayout};
@@ -1,20 +1,20 @@
1
- import{navVisible as e,isReachable as t,visibleChildren as n,isSection as r}from"./chunk-5A7MWTXX.js";import{useDismissPopupsOnOpen as a}from"./chunk-UVBK6YSR.js";import{glassStyle as l}from"./chunk-7IQ3B77H.js";import{Z_LAYERS as o}from"./chunk-FIEA5CGB.js";import{useShellStrings as s}from"./chunk-HQLDTFAF.js";import{SpinnerRing as i,LoadingSpinner as c}from"./chunk-2J6F4EE7.js";import{useState as d,useEffect as u,useRef as p,useMemo as y,useId as f,useCallback as m}from"react";import{jsx as h,jsxs as b}from"react/jsx-runtime";import{createPortal as g}from"react-dom";var k={favicon:"h-8 w-8",compact:"h-10 w-10",wordmark:"h-10 w-40"};function x(e){return e.trim().charAt(0).toLocaleUpperCase()||"·"}function v(e,t,n){return!1===e?"framed":null==e||null==t?"plate-light":t?"light"===n?"plate-dark":"bare":"dark"===n?"plate-light":"bare"}var w={"plate-light":"bg-white shadow-[0_2px_12px_var(--rosh-mark-plate-shadow)]","plate-dark":"bg-neutral-900 shadow-[0_2px_12px_var(--rosh-mark-plate-shadow-strong)]",framed:"border border-black/10 shadow-[0_2px_12px_var(--rosh-mark-plate-shadow)]",bare:""};function N(e,t,n){return"bare"===e?{}:"framed"===e?{borderRadius:t}:{borderRadius:t,padding:n}}function L({src:e,fallbackSrc:t,fallbackHasAlpha:n=null,fallbackIsLight:r=null,fallbackAdaptive:a,alt:l,slot:o="compact",surface:s="light",size:i,width:c,height:p,decorative:y=!1,fallbackMode:f="monogram",adaptive:m=!1,hasAlpha:b=null,isLight:g=null,treatmentPadding:L=4,treatmentRadius:_=8,className:A="",style:C}){const[E,$]=d(e||t||"");u(()=>{$(e||t||"")},[e,t]);const T=Boolean(t&&E===t&&E!==e),I=(T?a??m:m)?v(T?n:b,T?r:g,s):"bare",j=["inline-flex shrink-0 items-center justify-center overflow-hidden",null==i&&null==c&&null==p?k[o]:"","dark"===s?"text-white":"text-gray-700",w[I],A].filter(Boolean).join(" "),S={...N(I,_,L),...null==i?{width:c,height:p}:{width:i,height:i},...C};return E?/* @__PURE__ */h("span",{className:j,"data-brand-treatment":I,style:S,children:/* @__PURE__ */h("img",{src:E,alt:y?"":l,"data-brand-slot":o,className:"block max-h-full max-w-full",style:{objectFit:"contain"},onError:()=>$(e=>t&&e!==t?t:"")})}):"none"===f?null:/* @__PURE__ */h("span",{"data-brand-fallback":!0,"data-brand-slot":o,"aria-label":y?void 0:l,"aria-hidden":y||void 0,role:y?void 0:"img",className:`${j} rounded-md bg-gray-100 font-semibold`,style:S,children:y?null:x(l)})}function _(n,r){return e(n,r)?n.items.filter(n=>e(n,r)&&t(n,r)):[]}function A(e,r){return n(e,r).filter(e=>t(e,r))}function C(n,a,l){const o=new Set(a.erp),s=new Set(a.system),i=new Set(a.footer??[]),c=n.filter(r),d=e=>c.filter(t=>e.has(t.label)&&_(t,l).length>0);return{topItems:n.filter(e=>!r(e)).filter(n=>e(n,l)&&t(n,l)),erpSections:d(o),systemSections:d(s),virtualSections:(a.virtual??[]).filter(e=>e.items.length>0),footerSections:d(i),footerItems:(a.footerItems??[]).filter(n=>e(n,l)&&t(n,l))}}function E(e,t,n){return!!t&&e.some(e=>e.to===t||E(A(e,n),t,n))}var $="__page__";function T(e){const t=e.indexOf("?");if(t<0)return{path:e,search:""};const n=new URLSearchParams(e.slice(t+1));return{path:e.slice(0,t),search:n.get("search")??""}}function I(e,t,n){const r=function(e,t){const n=[],r=e=>{const a=A(e,t);0===a.length?n.push(e):a.forEach(r)};e.topItems.forEach(r);for(const n of[...e.erpSections,...e.systemSections,...e.footerSections])_(n,t).forEach(r);for(const t of e.virtualSections)t.items.forEach(r);return e.footerItems.forEach(r),n}(e,t);return Object.assign(async e=>{const t=e.trim().toLowerCase();if(!t)return[];const a=/* @__PURE__ */new Set,l=[];for(const e of r){const r=e.menuLabel??e.label;a.has(e.to)||!e.label.toLowerCase().includes(t)&&!r.toLowerCase().includes(t)||(a.add(e.to),l.push({type:n,label:e.label,entity_type:$,entity_id:e.to}))}return l.slice(0,8)},{destinations:r})}function j(e,t){if(!Array.isArray(e))return[];const n=[];for(const r of e){if(!r||"string"!=typeof r.entityType||"string"!=typeof r.entityId||"string"!=typeof r.label)continue;if("preview-file"===r.entityType)continue;const e="page"===r.entityType;n.push({type:e?t:"",label:r.label,entity_type:e?$:r.entityType,entity_id:r.entityId})}return n}var S="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z";function M(e){return e.typeKey??e.type}function R(e,t){return t?.[M(e)]??e.type}function K(e,t,n){return 0===n.length?null:{key:e,title:t,rows:n.map((e,t)=>({kind:"action",key:`action:${t}:${e.label}`,label:e.label,icon:e.icon,action:e})),count:n.length}}function D(e,t,n,r){return{type:e,label:t,entity_type:$,entity_id:`${n}?search=${encodeURIComponent(r.trim())}`}}function B(e,t,n,r,a){const l=function(e){const t=/* @__PURE__ */new Map;for(const n of e){const e=M(n),r=t.get(e);r?r.results.push(n):t.set(e,{type:n.type,results:[n]})}return Array.from(t,([e,t])=>({key:e,...t}))}(e).map(e=>{const t=e.results.map((t,n)=>({kind:"result",key:`result:${e.key}:${t.entity_type}:${t.entity_id}:${n}`,label:t.label,sub:t.sub,result:t})),r=!!a?.truncatedTypes?.includes(e.key),l=r?a?.listRoutes?.[e.key]:void 0,o=a?.typeLabels?.[e.key]??e.type;if(a&&l){const r=a.seeAllLabel(l.label);t.push({kind:"seeAll",key:`seeall:${e.key}`,label:r,result:D(o,r,l.path,n)})}return{key:`type:${e.key}`,title:o,rows:t,count:e.results.length,truncated:r}}),o=K("actions",r,function(e,t){const n=t.trim().toLowerCase();return e&&n?e.filter(e=>e.label.toLowerCase().includes(n)||(e.keywords??[]).some(e=>e.toLowerCase().includes(n))):[]}(t,n));return o?[...l,o]:l}function F(e,t,n){return 0===n?0:Math.min(Math.max(e+t,0),n-1)}var P=(e,t)=>e.entity_type===t.entity_type&&e.entity_id===t.entity_id;function z(e,t,n=8){return[t,...e.filter(e=>!P(e,t))].slice(0,n)}function H(e){if(!Array.isArray(e))return[];const t=[];for(const n of e){if(!n||"object"!=typeof n)continue;const e=n;if("string"!=typeof e.type||"string"!=typeof e.label||"string"!=typeof e.entity_type||"string"!=typeof e.entity_id)continue;const r={type:e.type,label:e.label,entity_type:e.entity_type,entity_id:e.entity_id};"string"==typeof e.sub&&(r.sub=e.sub),"string"==typeof e.typeKey&&(r.typeKey=e.typeKey),t.some(e=>P(e,r))||t.push(r)}return t.slice(0,8)}function U(e){if(Array.isArray(e))return{results:e,truncatedTypes:[]};if(e&&"object"==typeof e&&Array.isArray(e.results)){const{results:t,truncatedTypes:n}=e;return{results:t,truncatedTypes:Array.isArray(n)?n:[]}}return{results:[],truncatedTypes:[]}}var W=[];function G(e,t,n){const[r,a]=d([]),[l,o]=d(W),[s,i]=d(!1),[c,y]=d("none"),f=p(function(){let e=0,t=null;const n=()=>{e+=1,t?.abort(),t=null};return{begin:()=>{n();const r=e,a=new AbortController;return t=a,{signal:a.signal,isCurrent:()=>r===e}},cancel:n}}());u(()=>{const r=f.current;if(e.length<n||!t||0===t.length)return r.cancel(),a(e=>0===e.length?e:[]),o(W),y("none"),void i(!1);i(!0);const l=setTimeout(async()=>{const n=r.begin(),l=await async function(e,t,n){const r=await Promise.all(e.map(async e=>{try{return{failed:!1,...U(await e(t,{signal:n}))}}catch(e){const t=n.aborted||function(e){if(!e||"object"!=typeof e)return!1;const{name:t,code:n}=e;return"AbortError"===t||"CanceledError"===t||"ERR_CANCELED"===n}(e);return{failed:!t,results:[],truncatedTypes:[]}}}));return{results:r.flatMap(e=>e.results),truncatedTypes:Array.from(new Set(r.flatMap(e=>e.truncatedTypes))),failed:r.filter(e=>e.failed).length}}(t,e,n.signal);n.isCurrent()&&(a(l.results),o(l.truncatedTypes),y(0===l.failed?"none":l.failed>=t.length?"all":"some"),i(!1))},250);return()=>{clearTimeout(l),r.cancel()}},[e,t,n]);return{results:r,truncatedTypes:l,loading:s,failure:c,reset:m(()=>{f.current.cancel(),a(e=>0===e.length?e:[]),o(W),y("none"),i(!1)},[])}}var O=(e,t)=>`${e}-opt-${t}`;function Q(e,t){if("seeAll"===e.kind)return"M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3";if("action"===e.kind)return e.icon??S;if(e.icon)return e.icon;const n=t?.[M(e.result)];return n||S}function V({sections:e,activeIdx:t,listId:n,label:r,typeIcons:a,groupCount:l,groupLabel:o,onHover:s,onPick:i}){let c=0;/* @__PURE__ */
1
+ import{navVisible as e,isReachable as t,visibleChildren as n,isSection as r}from"./chunk-5A7MWTXX.js";import{useDismissPopupsOnOpen as a}from"./chunk-UVBK6YSR.js";import{glassStyle as l}from"./chunk-7IQ3B77H.js";import{Z_LAYERS as o}from"./chunk-FIEA5CGB.js";import{SpinnerRing as s,LoadingSpinner as i}from"./chunk-2J6F4EE7.js";import{useShellStrings as c}from"./chunk-BLMDTJOK.js";import{useState as d,useEffect as u,useRef as p,useMemo as y,useId as f,useCallback as m}from"react";import{jsx as h,jsxs as b}from"react/jsx-runtime";import{createPortal as g}from"react-dom";var k={favicon:"h-8 w-8",compact:"h-10 w-10",wordmark:"h-10 w-40"};function x(e){return e.trim().charAt(0).toLocaleUpperCase()||"·"}function v(e,t,n){return!1===e?"framed":null==e||null==t?"plate-light":t?"light"===n?"plate-dark":"bare":"dark"===n?"plate-light":"bare"}var w={"plate-light":"bg-white shadow-[0_2px_12px_var(--rosh-mark-plate-shadow)]","plate-dark":"bg-neutral-900 shadow-[0_2px_12px_var(--rosh-mark-plate-shadow-strong)]",framed:"border border-black/10 shadow-[0_2px_12px_var(--rosh-mark-plate-shadow)]",bare:""};function N(e,t,n){return"bare"===e?{}:"framed"===e?{borderRadius:t}:{borderRadius:t,padding:n}}function L({src:e,fallbackSrc:t,fallbackHasAlpha:n=null,fallbackIsLight:r=null,fallbackAdaptive:a,alt:l,slot:o="compact",surface:s="light",size:i,width:c,height:p,decorative:y=!1,fallbackMode:f="monogram",adaptive:m=!1,hasAlpha:b=null,isLight:g=null,treatmentPadding:L=4,treatmentRadius:_=8,className:A="",style:C}){const[E,$]=d(e||t||"");u(()=>{$(e||t||"")},[e,t]);const T=Boolean(t&&E===t&&E!==e),I=(T?a??m:m)?v(T?n:b,T?r:g,s):"bare",j=["inline-flex shrink-0 items-center justify-center overflow-hidden",null==i&&null==c&&null==p?k[o]:"","dark"===s?"text-white":"text-gray-700",w[I],A].filter(Boolean).join(" "),S={...N(I,_,L),...null==i?{width:c,height:p}:{width:i,height:i},...C};return E?/* @__PURE__ */h("span",{className:j,"data-brand-treatment":I,style:S,children:/* @__PURE__ */h("img",{src:E,alt:y?"":l,"data-brand-slot":o,className:"block max-h-full max-w-full",style:{objectFit:"contain"},onError:()=>$(e=>t&&e!==t?t:"")})}):"none"===f?null:/* @__PURE__ */h("span",{"data-brand-fallback":!0,"data-brand-slot":o,"aria-label":y?void 0:l,"aria-hidden":y||void 0,role:y?void 0:"img",className:`${j} rounded-md bg-gray-100 font-semibold`,style:S,children:y?null:x(l)})}function _(n,r){return e(n,r)?n.items.filter(n=>e(n,r)&&t(n,r)):[]}function A(e,r){return n(e,r).filter(e=>t(e,r))}function C(n,a,l){const o=new Set(a.erp),s=new Set(a.system),i=new Set(a.footer??[]),c=n.filter(r),d=e=>c.filter(t=>e.has(t.label)&&_(t,l).length>0);return{topItems:n.filter(e=>!r(e)).filter(n=>e(n,l)&&t(n,l)),erpSections:d(o),systemSections:d(s),virtualSections:(a.virtual??[]).filter(e=>e.items.length>0),footerSections:d(i),footerItems:(a.footerItems??[]).filter(n=>e(n,l)&&t(n,l))}}function E(e,t,n){return!!t&&e.some(e=>e.to===t||E(A(e,n),t,n))}var $="__page__";function T(e){const t=e.indexOf("?");if(t<0)return{path:e,search:""};const n=new URLSearchParams(e.slice(t+1));return{path:e.slice(0,t),search:n.get("search")??""}}function I(e,t,n){const r=function(e,t){const n=[],r=e=>{const a=A(e,t);0===a.length?n.push(e):a.forEach(r)};e.topItems.forEach(r);for(const n of[...e.erpSections,...e.systemSections,...e.footerSections])_(n,t).forEach(r);for(const t of e.virtualSections)t.items.forEach(r);return e.footerItems.forEach(r),n}(e,t);return Object.assign(async e=>{const t=e.trim().toLowerCase();if(!t)return[];const a=/* @__PURE__ */new Set,l=[];for(const e of r){const r=e.menuLabel??e.label;a.has(e.to)||!e.label.toLowerCase().includes(t)&&!r.toLowerCase().includes(t)||(a.add(e.to),l.push({type:n,label:e.label,entity_type:$,entity_id:e.to}))}return l.slice(0,8)},{destinations:r})}function j(e,t){if(!Array.isArray(e))return[];const n=[];for(const r of e){if(!r||"string"!=typeof r.entityType||"string"!=typeof r.entityId||"string"!=typeof r.label)continue;if("preview-file"===r.entityType)continue;const e="page"===r.entityType;n.push({type:e?t:"",label:r.label,entity_type:e?$:r.entityType,entity_id:r.entityId})}return n}var S="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z";function M(e){return e.typeKey??e.type}function K(e,t){return t?.[M(e)]??e.type}function R(e,t,n){return 0===n.length?null:{key:e,title:t,rows:n.map((e,t)=>({kind:"action",key:`action:${t}:${e.label}`,label:e.label,icon:e.icon,action:e})),count:n.length}}function B(e,t,n,r){return{type:e,label:t,entity_type:$,entity_id:`${n}?search=${encodeURIComponent(r.trim())}`}}function D(e,t,n,r,a){const l=function(e){const t=/* @__PURE__ */new Map;for(const n of e){const e=M(n),r=t.get(e);r?r.results.push(n):t.set(e,{type:n.type,results:[n]})}return Array.from(t,([e,t])=>({key:e,...t}))}(e).map(e=>{const t=e.results.map((t,n)=>({kind:"result",key:`result:${e.key}:${t.entity_type}:${t.entity_id}:${n}`,label:t.label,sub:t.sub,result:t})),r=!!a?.truncatedTypes?.includes(e.key),l=r?a?.listRoutes?.[e.key]:void 0,o=a?.typeLabels?.[e.key]??e.type;if(a&&l){const r=a.seeAllLabel(l.label);t.push({kind:"seeAll",key:`seeall:${e.key}`,label:r,result:B(o,r,l.path,n)})}return{key:`type:${e.key}`,title:o,rows:t,count:e.results.length,truncated:r}}),o=R("actions",r,function(e,t){const n=t.trim().toLowerCase();return e&&n?e.filter(e=>e.label.toLowerCase().includes(n)||(e.keywords??[]).some(e=>e.toLowerCase().includes(n))):[]}(t,n));return o?[...l,o]:l}function P(e,t,n){return 0===n?0:Math.min(Math.max(e+t,0),n-1)}var z=(e,t)=>e.entity_type===t.entity_type&&e.entity_id===t.entity_id;function F(e,t,n=8){return[t,...e.filter(e=>!z(e,t))].slice(0,n)}function H(e){if(!Array.isArray(e))return[];const t=[];for(const n of e){if(!n||"object"!=typeof n)continue;const e=n;if("string"!=typeof e.type||"string"!=typeof e.label||"string"!=typeof e.entity_type||"string"!=typeof e.entity_id)continue;const r={type:e.type,label:e.label,entity_type:e.entity_type,entity_id:e.entity_id};"string"==typeof e.sub&&(r.sub=e.sub),"string"==typeof e.typeKey&&(r.typeKey=e.typeKey),t.some(e=>z(e,r))||t.push(r)}return t.slice(0,8)}function U(e){if(Array.isArray(e))return{results:e,truncatedTypes:[]};if(e&&"object"==typeof e&&Array.isArray(e.results)){const{results:t,truncatedTypes:n}=e;return{results:t,truncatedTypes:Array.isArray(n)?n:[]}}return{results:[],truncatedTypes:[]}}var O=[];function W(e,t,n){const[r,a]=d([]),[l,o]=d(O),[s,i]=d(!1),[c,y]=d("none"),f=p(function(){let e=0,t=null;const n=()=>{e+=1,t?.abort(),t=null};return{begin:()=>{n();const r=e,a=new AbortController;return t=a,{signal:a.signal,isCurrent:()=>r===e}},cancel:n}}());u(()=>{const r=f.current;if(e.length<n||!t||0===t.length)return r.cancel(),a(e=>0===e.length?e:[]),o(O),y("none"),void i(!1);i(!0);const l=setTimeout(async()=>{const n=r.begin(),l=await async function(e,t,n){const r=await Promise.all(e.map(async e=>{try{return{failed:!1,...U(await e(t,{signal:n}))}}catch(e){const t=n.aborted||function(e){if(!e||"object"!=typeof e)return!1;const{name:t,code:n}=e;return"AbortError"===t||"CanceledError"===t||"ERR_CANCELED"===n}(e);return{failed:!t,results:[],truncatedTypes:[]}}}));return{results:r.flatMap(e=>e.results),truncatedTypes:Array.from(new Set(r.flatMap(e=>e.truncatedTypes))),failed:r.filter(e=>e.failed).length}}(t,e,n.signal);n.isCurrent()&&(a(l.results),o(l.truncatedTypes),y(0===l.failed?"none":l.failed>=t.length?"all":"some"),i(!1))},250);return()=>{clearTimeout(l),r.cancel()}},[e,t,n]);return{results:r,truncatedTypes:l,loading:s,failure:c,reset:m(()=>{f.current.cancel(),a(e=>0===e.length?e:[]),o(O),y("none"),i(!1)},[])}}var G=(e,t)=>`${e}-opt-${t}`;function J(e,t){if("seeAll"===e.kind)return"M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3";if("action"===e.kind)return e.icon??S;if(e.icon)return e.icon;const n=t?.[M(e.result)];return n||S}function V({sections:e,activeIdx:t,listId:n,label:r,typeIcons:a,groupCount:l,groupLabel:o,onHover:s,onPick:i}){let c=0;/* @__PURE__ */
2
2
  return h("div",{id:n,role:"listbox","aria-label":r,className:"py-1",children:e.map(e=>/* @__PURE__ */b("div",{role:"group","aria-label":o(e.title,e.count,!!e.truncated),children:[
3
3
  /* @__PURE__ */b("div",{"aria-hidden":"true",className:"flex items-center justify-between px-4 pt-2 pb-1 text-2xs font-semibold uppercase tracking-wide text-gray-400",children:[
4
4
  /* @__PURE__ */h("span",{children:e.title}),
5
5
  /* @__PURE__ */h("span",{className:"font-medium normal-case tracking-normal",children:l(e.count,!!e.truncated)})]}),e.rows.map(e=>{const r=c++,l=r===t,o="action"===e.kind||"seeAll"===e.kind?void 0:e.badge,d="action"===e.kind||"seeAll"===e.kind?void 0:e.sub,u="seeAll"===e.kind;/* @__PURE__ */
6
- return b("div",{id:O(n,r),role:"option","aria-selected":l,className:"flex items-center gap-3 w-full px-4 py-3 text-left cursor-pointer transition-colors "+(l?"bg-blue-50":"hover:bg-gray-50"),onMouseDown:e=>e.preventDefault(),onClick:()=>i(e),onMouseEnter:()=>s(r),children:[
7
- /* @__PURE__ */h("svg",{className:"h-4 w-4 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */h("path",{strokeLinecap:"round",strokeLinejoin:"round",d:Q(e,a)})}),
6
+ return b("div",{id:G(n,r),role:"option","aria-selected":l,className:"flex items-center gap-3 w-full px-4 py-3 text-left cursor-pointer transition-colors "+(l?"bg-blue-50":"hover:bg-gray-50"),onMouseDown:e=>e.preventDefault(),onClick:()=>i(e),onMouseEnter:()=>s(r),children:[
7
+ /* @__PURE__ */h("svg",{className:"h-4 w-4 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */h("path",{strokeLinecap:"round",strokeLinejoin:"round",d:J(e,a)})}),
8
8
  /* @__PURE__ */b("div",{className:"flex-1 min-w-0",children:[
9
- /* @__PURE__ */h("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */h("p",{className:"text-xs text-gray-400 truncate",children:d})]}),o&&/* @__PURE__ */h("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-gray-500",children:o})]},e.key)})]},e.key))})}var X="react-os-shell:open-global-search";function q(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(X))}function J({providers:e,typeIcons:t,typeLabels:n,listRoutes:r,placeholder:k,quickActions:x,onSelect:v,recent:w,onRecord:N,favorites:L,hotkey:_=!0}={}){const A=s().search,C=k??A.placeholder,[E,$]=d(!1),[T,I]=d(""),[j,M]=d(0),D=p(null),{results:P,truncatedTypes:z,loading:H,failure:U,reset:W}=G(T,e,2);u(()=>{const e=e=>{_&&!e.defaultPrevented&&(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),$(e=>!e)),"Escape"===e.key&&E&&$(!1)},t=()=>$(!0);return window.addEventListener("keydown",e),window.addEventListener(X,t),()=>{window.removeEventListener("keydown",e),window.removeEventListener(X,t)}},[E,_]),a(E);const[Q,q]=d(!1);E!==Q&&(q(E),E&&(I(""),M(0),W())),u(()=>{E?setTimeout(()=>D.current?.focus(),50):I("")},[E]),u(()=>{M(0)},[P]);const J=T.length>=2,Y=y(()=>J?B(P,x,T,A.actions,{truncatedTypes:z,listRoutes:r,typeLabels:n,seeAllLabel:A.seeAll}):function(e,t){const n=[];e.recent?.length&&n.push({key:"recent",title:t.recent,rows:e.recent.map((t,n)=>({kind:"recent",key:`recent:${t.entity_type}:${t.entity_id}:${n}`,label:t.label,sub:t.sub,badge:R(t,e.typeLabels),result:t})),count:e.recent.length}),e.favorites?.length&&n.push({key:"favorites",title:t.favorites,rows:e.favorites.map((t,n)=>({kind:"favorite",key:`favorite:${t.entity_type}:${t.entity_id}:${n}`,label:t.label,sub:t.sub,badge:R(t,e.typeLabels)||void 0,icon:"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",result:t})),count:e.favorites.length});const r=K("actions",t.actions,e.actions??[]);return r&&n.push(r),n}({recent:w,favorites:L,actions:x,typeLabels:n},A),[J,P,z,r,n,x,T,w,L,A]),Z=y(()=>function(e){return e.flatMap(e=>e.rows)}(Y),[Y]),ee=Math.min(j,Math.max(Z.length-1,0)),te=f(),ne=Z.length>0;u(()=>{E&&0!==Z.length&&document.getElementById(O(te,ee))?.scrollIntoView?.({block:"nearest"})},[E,ee,Z.length,te]);const re=m(e=>{$(!1),"action"!==e.kind?("result"!==e.kind&&"recent"!==e.kind||N?.(e.result),v?.(e.result)):e.action.onSelect()},[v,N]);return E?g(
9
+ /* @__PURE__ */h("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */h("p",{className:"text-xs text-gray-400 truncate",children:d})]}),o&&/* @__PURE__ */h("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-gray-500",children:o})]},e.key)})]},e.key))})}var X="react-os-shell:open-global-search";function q(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(X))}function Q({providers:e,typeIcons:t,typeLabels:n,listRoutes:r,placeholder:k,quickActions:x,onSelect:v,recent:w,onRecord:N,favorites:L,hotkey:_=!0}={}){const A=c().search,C=k??A.placeholder,[E,$]=d(!1),[T,I]=d(""),[j,M]=d(0),B=p(null),{results:z,truncatedTypes:F,loading:H,failure:U,reset:O}=W(T,e,2);u(()=>{const e=e=>{_&&!e.defaultPrevented&&(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),$(e=>!e)),"Escape"===e.key&&E&&$(!1)},t=()=>$(!0);return window.addEventListener("keydown",e),window.addEventListener(X,t),()=>{window.removeEventListener("keydown",e),window.removeEventListener(X,t)}},[E,_]),a(E);const[J,q]=d(!1);E!==J&&(q(E),E&&(I(""),M(0),O())),u(()=>{E?setTimeout(()=>B.current?.focus(),50):I("")},[E]),u(()=>{M(0)},[z]);const Q=T.length>=2,Y=y(()=>Q?D(z,x,T,A.actions,{truncatedTypes:F,listRoutes:r,typeLabels:n,seeAllLabel:A.seeAll}):function(e,t){const n=[];e.recent?.length&&n.push({key:"recent",title:t.recent,rows:e.recent.map((t,n)=>({kind:"recent",key:`recent:${t.entity_type}:${t.entity_id}:${n}`,label:t.label,sub:t.sub,badge:K(t,e.typeLabels),result:t})),count:e.recent.length}),e.favorites?.length&&n.push({key:"favorites",title:t.favorites,rows:e.favorites.map((t,n)=>({kind:"favorite",key:`favorite:${t.entity_type}:${t.entity_id}:${n}`,label:t.label,sub:t.sub,badge:K(t,e.typeLabels)||void 0,icon:"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",result:t})),count:e.favorites.length});const r=R("actions",t.actions,e.actions??[]);return r&&n.push(r),n}({recent:w,favorites:L,actions:x,typeLabels:n},A),[Q,z,F,r,n,x,T,w,L,A]),Z=y(()=>function(e){return e.flatMap(e=>e.rows)}(Y),[Y]),ee=Math.min(j,Math.max(Z.length-1,0)),te=f(),ne=Z.length>0;u(()=>{E&&0!==Z.length&&document.getElementById(G(te,ee))?.scrollIntoView?.({block:"nearest"})},[E,ee,Z.length,te]);const re=m(e=>{$(!1),"action"!==e.kind?("result"!==e.kind&&"recent"!==e.kind||N?.(e.result),v?.(e.result)):e.action.onSelect()},[v,N]);return E?g(
10
10
  /* @__PURE__ */b("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:o.overlay},onClick:()=>$(!1),children:[
11
11
  /* @__PURE__ */h("div",{"data-global-search-backdrop":"",className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),
12
12
  /* @__PURE__ */b("div",{className:"relative z-10 w-full max-w-xl rounded-(--radius-popup) overflow-hidden",onClick:e=>e.stopPropagation(),style:l(),children:[
13
13
  /* @__PURE__ */b("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-gray-200",children:[
14
14
  /* @__PURE__ */h("svg",{className:"h-5 w-5 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */h("path",{strokeLinecap:"round",strokeLinejoin:"round",d:S})}),
15
- /* @__PURE__ */h("input",{ref:D,type:"text",value:T,onChange:e=>{I(e.target.value),M(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),M(F(ee,1,Z.length))):"ArrowUp"===e.key?(e.preventDefault(),M(F(ee,-1,Z.length))):"Tab"===e.key&&Z.length>0?(e.preventDefault(),M(function(e,t,n){const r=e.length;if(0===r)return 0;const a=[];let l=0;for(const t of e)a.push(l),l+=t;let o=0;for(let e=0;e<r;e++)t>=a[e]&&(o=e);return a[(o+n+r)%r]}(Y.map(e=>e.rows.length),ee,e.shiftKey?-1:1))):"Enter"===e.key&&Z[ee]&&re(Z[ee])},placeholder:C,role:"combobox","aria-expanded":ne,"aria-controls":ne?te:void 0,"aria-activedescendant":ne?O(te,ee):void 0,"aria-autocomplete":"list",className:"flex-1 text-sm bg-transparent border-0 rosh-focus-ring placeholder-gray-400"}),H&&/* @__PURE__ */h("span",{"data-global-search-spinner":"",role:"status","aria-label":A.searching,className:"flex shrink-0",children:/* @__PURE__ */h(i,{className:"h-4 w-4",ink:"text-gray-500"})}),
15
+ /* @__PURE__ */h("input",{ref:B,type:"text",value:T,onChange:e=>{I(e.target.value),M(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),M(P(ee,1,Z.length))):"ArrowUp"===e.key?(e.preventDefault(),M(P(ee,-1,Z.length))):"Tab"===e.key&&Z.length>0?(e.preventDefault(),M(function(e,t,n){const r=e.length;if(0===r)return 0;const a=[];let l=0;for(const t of e)a.push(l),l+=t;let o=0;for(let e=0;e<r;e++)t>=a[e]&&(o=e);return a[(o+n+r)%r]}(Y.map(e=>e.rows.length),ee,e.shiftKey?-1:1))):"Enter"===e.key&&Z[ee]&&re(Z[ee])},placeholder:C,role:"combobox","aria-expanded":ne,"aria-controls":ne?te:void 0,"aria-activedescendant":ne?G(te,ee):void 0,"aria-autocomplete":"list",className:"flex-1 text-sm bg-transparent border-0 rosh-focus-ring placeholder-gray-400"}),H&&/* @__PURE__ */h("span",{"data-global-search-spinner":"",role:"status","aria-label":A.searching,className:"flex shrink-0",children:/* @__PURE__ */h(s,{className:"h-4 w-4",ink:"text-gray-500"})}),
16
16
  /* @__PURE__ */h("kbd",{className:"hidden sm:inline-flex items-center rounded border border-gray-300 px-2 py-0.5 text-2xs font-medium text-gray-400",children:A.escBadge})]}),
17
- /* @__PURE__ */b("div",{className:"max-h-[50vh] overflow-y-auto",children:[H&&0===Z.length&&/* @__PURE__ */h(c,{size:"sm",padding:"py-6",label:A.searching}),!H&&"all"===U&&J&&/* @__PURE__ */h("div",{role:"alert",className:"px-4 py-3 text-center text-sm text-red-600",children:A.searchFailed}),!H&&J&&0===Z.length&&"all"!==U&&/* @__PURE__ */h("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:A.noResults}),ne&&/* @__PURE__ */h(V,{sections:Y,activeIdx:ee,listId:te,label:A.listLabel,typeIcons:t,groupCount:A.groupCount,groupLabel:A.groupLabel,onHover:M,onPick:re}),!H&&"some"===U&&J&&/* @__PURE__ */h("div",{role:"status",className:"px-4 py-2 text-xs text-amber-600",children:A.partialFailure}),!H&&!J&&0===Z.length&&/* @__PURE__ */h("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:A.minChars(2)})]}),
17
+ /* @__PURE__ */b("div",{className:"max-h-[50vh] overflow-y-auto",children:[H&&0===Z.length&&/* @__PURE__ */h(i,{size:"sm",padding:"py-6",label:A.searching}),!H&&"all"===U&&Q&&/* @__PURE__ */h("div",{role:"alert",className:"px-4 py-3 text-center text-sm text-red-600",children:A.searchFailed}),!H&&Q&&0===Z.length&&"all"!==U&&/* @__PURE__ */h("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:A.noResults}),ne&&/* @__PURE__ */h(V,{sections:Y,activeIdx:ee,listId:te,label:A.listLabel,typeIcons:t,groupCount:A.groupCount,groupLabel:A.groupLabel,onHover:M,onPick:re}),!H&&"some"===U&&Q&&/* @__PURE__ */h("div",{role:"status",className:"px-4 py-2 text-xs text-amber-600",children:A.partialFailure}),!H&&!Q&&0===Z.length&&/* @__PURE__ */h("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:A.minChars(2)})]}),
18
18
  /* @__PURE__ */b("div",{className:"flex items-center justify-between px-4 py-2 border-t border-gray-100 bg-gray-50 text-2xs text-gray-400",children:[
19
19
  /* @__PURE__ */b("div",{className:"flex items-center gap-3",children:[
20
20
  /* @__PURE__ */b("span",{className:"flex items-center gap-1",children:[
@@ -24,4 +24,4 @@ return b("div",{id:O(n,r),role:"option","aria-selected":l,className:"flex items-
24
24
  /* @__PURE__ */h("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:A.enterKey}),` ${A.open}`]}),Y.length>1&&/* @__PURE__ */b("span",{className:"flex items-center gap-1",children:[
25
25
  /* @__PURE__ */h("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:A.tabKey}),` ${A.nextGroup}`]})]}),
26
26
  /* @__PURE__ */b("span",{className:"flex items-center gap-1",children:[
27
- /* @__PURE__ */h("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:A.escKey}),` ${A.close}`]})]})]})]}),document.body):null}export{L as BrandMark,J as GlobalSearch,$ as PAGE_RESULT_ENTITY,j as favoritesToResults,I as navPagesProvider,q as openGlobalSearch,T as parsePageResultTarget,C as partitionNav,z as pushRecent,v as resolveBrandMarkTreatment,E as rowsContainRoute,H as sanitizeRecent,A as visibleNavChildren,_ as visibleSectionItems};
27
+ /* @__PURE__ */h("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:A.escKey}),` ${A.close}`]})]})]})]}),document.body):null}export{L as BrandMark,Q as GlobalSearch,$ as PAGE_RESULT_ENTITY,j as favoritesToResults,I as navPagesProvider,q as openGlobalSearch,T as parsePageResultTarget,C as partitionNav,F as pushRecent,v as resolveBrandMarkTreatment,E as rowsContainRoute,H as sanitizeRecent,A as visibleNavChildren,_ as visibleSectionItems};