efficient-shell 4.177.0 → 4.179.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 (65) hide show
  1. package/README.md +381 -6
  2. package/dist/{Browser-MFFTBGEB.js → Browser-LZMLL4CZ.js} +14 -14
  3. package/dist/Calculator-R5OEHQ67.js +29 -0
  4. package/dist/ConfirmDialog-CMNQZQA3.js +1 -0
  5. package/dist/{CurrencyConverter-KZPE7ZCC.js → CurrencyConverter-AMXUOQR2.js} +7 -7
  6. package/dist/{Documents-ZD227WZC.js → Documents-M4HKZAPJ.js} +7 -7
  7. package/dist/{Files-BLGT4RLF.js → Files-OY5GKCXA.js} +28 -28
  8. package/dist/{Notepad-LUK2IFHD.js → Notepad-JLDNTMVB.js} +10 -10
  9. package/dist/PdfViewer-3SC3LE4U.js +1 -0
  10. package/dist/{PomodoroTimer-LHPV6QXG.js → PomodoroTimer-LE6J2KUU.js} +26 -26
  11. package/dist/Preview-2KHLL6NP.js +188 -0
  12. package/dist/{Sidebar-4GIZSTD5.js → Sidebar-BQ4P5LBI.js} +21 -21
  13. package/dist/{Spreadsheet-F3VBCPHF.js → Spreadsheet-B5Z5MSX4.js} +14 -14
  14. package/dist/{Stock-XSDFN7U2.js → Stock-GWVG2INU.js} +4 -4
  15. package/dist/{Weather-7YDUDMCO.js → Weather-APBCG4TO.js} +14 -14
  16. package/dist/{WorldClock-Q2JHBKLS.js → WorldClock-2LMZYKWR.js} +7 -7
  17. package/dist/apps/index.d.ts +4 -2
  18. package/dist/apps/index.js +1 -1
  19. package/dist/bin/ui-check.js +1 -1
  20. package/dist/{chunk-L3U2R7DH.js → chunk-3DGTIWZP.js} +1 -1
  21. package/dist/{chunk-AZO5NPB4.js → chunk-47VJNVB6.js} +621 -621
  22. package/dist/{chunk-KS7OSQ3Y.js → chunk-5ZDM6WIC.js} +11 -11
  23. package/dist/{chunk-E2D54MVV.js → chunk-6CFBF543.js} +2 -2
  24. package/dist/{chunk-LCTSBQBJ.js → chunk-7WZEFHPS.js} +1 -1
  25. package/dist/chunk-AZURXTRB.js +1 -0
  26. package/dist/chunk-C3QOHMR6.js +1 -0
  27. package/dist/{chunk-YJRC6IKD.js → chunk-CIXQKCFA.js} +4 -4
  28. package/dist/chunk-CZK2VKIO.js +9 -0
  29. package/dist/{chunk-Q7UGGJ5X.js → chunk-FORN7LG7.js} +1 -1
  30. package/dist/chunk-J3LIIIHJ.js +1 -0
  31. package/dist/{chunk-7H6Q5TNN.js → chunk-KDRAU4XQ.js} +8 -8
  32. package/dist/{chunk-ZOPYAOUP.js → chunk-KVOFUFPP.js} +1 -1
  33. package/dist/{chunk-KDHXRJIX.js → chunk-LK7V32MR.js} +1 -1
  34. package/dist/{chunk-TZ2BPFCT.js → chunk-N6STBYXR.js} +111 -111
  35. package/dist/{chunk-54OP3M3K.js → chunk-NHIGOEZF.js} +1 -1
  36. package/dist/{chunk-PE6MTNFO.js → chunk-PE4F4MJE.js} +4 -4
  37. package/dist/chunk-R7EBJKN2.js +69 -0
  38. package/dist/{chunk-AI6HQ55O.js → chunk-SVO3ES2E.js} +1 -1
  39. package/dist/{chunk-RKR5V4QR.js → chunk-T4CFSGSL.js} +6 -6
  40. package/dist/{chunk-N6BJG6AL.js → chunk-UAIVAA5X.js} +11 -11
  41. package/dist/{chunk-REXHKIIJ.js → chunk-WNEO7TSP.js} +1 -1
  42. package/dist/{chunk-XJYXKO7K.js → chunk-ZAE6ROV7.js} +15 -15
  43. package/dist/file-intake/index.js +1 -1
  44. package/dist/i18n/index.d.ts +3 -2
  45. package/dist/i18n/index.js +1 -1
  46. package/dist/{index-BS_HzJCc.d.ts → index-DcUj0nXY.d.ts} +14 -2
  47. package/dist/index.d.ts +3 -3
  48. package/dist/index.js +656 -656
  49. package/dist/locales/zh-Hans.d.ts +59 -0
  50. package/dist/locales/zh-Hans.js +1 -0
  51. package/dist/map/index.js +3 -3
  52. package/dist/page-tabs/index.js +4 -4
  53. package/dist/pdf/index.js +1 -1
  54. package/dist/{strings-C3kt6WTH.d.ts → strings-ZbotP_I6.d.ts} +368 -0
  55. package/dist/ui/index.d.ts +2 -2
  56. package/dist/ui/index.js +1 -1
  57. package/package.json +6 -1
  58. package/dist/Calculator-AGQQYMMZ.js +0 -29
  59. package/dist/ConfirmDialog-6PVUVYXZ.js +0 -1
  60. package/dist/PdfViewer-RKRGO7Q2.js +0 -1
  61. package/dist/Preview-5CALO6PW.js +0 -187
  62. package/dist/chunk-3YTHR7IC.js +0 -1
  63. package/dist/chunk-4PCIZFDR.js +0 -9
  64. package/dist/chunk-MFXG5BWL.js +0 -1
  65. package/dist/chunk-VIIBZ6DE.js +0 -69
@@ -1,44 +1,44 @@
1
- import{useAuth as e,parseOpenSections as t,readStored as r,RAIL_OPEN_SECTIONS_KEY as a,toggleOpenSection as n,writeStored as i}from"./chunk-S2PS4IOT.js";import{partitionNav as l,BrandMark as o,openGlobalSearch as s,visibleNavChildren as c,visibleSectionItems as d,rowsContainRoute as m}from"./chunk-7H6Q5TNN.js";import{navSections as h,startMenuCategories as u,TAB_STRIP_H as p,navIcons as b,sectionIcons as g}from"./chunk-DSSLOQDW.js";import"./chunk-5A7MWTXX.js";import{PopupMenu as x,PopupMenuItem as f,PopupMenuDivider as y}from"./chunk-AA4TMQOS.js";import"./chunk-AFYQTVZO.js";import"./chunk-HZZNJHRH.js";import"./chunk-X4FJ54PP.js";import"./chunk-D65T4H6J.js";import{useShellStrings as v}from"./chunk-3YTHR7IC.js";import{useMemo as k,useState as N,useRef as w,useEffect as C,isValidElement as L,cloneElement as j}from"react";import{jsx as A,jsxs as S}from"react/jsx-runtime";var z="undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform),M=(e,t)=>["flex h-9 w-full items-center gap-2.5 rounded-md px-3 text-left text-[13.5px] font-medium transition-colors",t?"justify-center px-0":"",e?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"].join(" "),$="flex size-[18px] shrink-0 items-center justify-center [&>svg]:size-[18px]";function H({open:e}){/* @__PURE__ */
2
- return A("svg",{className:"size-4 shrink-0 text-gray-400 transition-transform "+(e?"rotate-180":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:/* @__PURE__ */A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})}function T({dir:e}){/* @__PURE__ */
1
+ import{useAuth as e,parseOpenSections as t,readStored as r,RAIL_OPEN_SECTIONS_KEY as a,toggleOpenSection as n,writeStored as i}from"./chunk-S2PS4IOT.js";import{partitionNav as l,BrandMark as o,openGlobalSearch as s,visibleNavChildren as c,visibleSectionItems as d,rowsContainRoute as m}from"./chunk-KDRAU4XQ.js";import{navSections as h,startMenuCategories as u,TAB_STRIP_H as p,navIcons as b,sectionIcons as g}from"./chunk-DSSLOQDW.js";import"./chunk-5A7MWTXX.js";import{PopupMenu as x,PopupMenuItem as f,PopupMenuDivider as y}from"./chunk-AA4TMQOS.js";import"./chunk-AFYQTVZO.js";import"./chunk-HZZNJHRH.js";import"./chunk-X4FJ54PP.js";import"./chunk-D65T4H6J.js";import{useShellStrings as v}from"./chunk-J3LIIIHJ.js";import"./chunk-C3QOHMR6.js";import{useMemo as k,useState as N,useRef as w,useEffect as C,isValidElement as L,cloneElement as j}from"react";import{jsx as A,jsxs as S}from"react/jsx-runtime";var z="undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform),M=(e,t)=>["flex h-9 w-full items-center gap-2.5 rounded-md px-3 text-left text-[13.5px] font-medium transition-colors",t?"justify-center px-0":"",e?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"].join(" "),$="flex size-[18px] shrink-0 items-center justify-center [&>svg]:size-[18px]";function H({open:e}){/* @__PURE__ */
2
+ return A("svg",{className:"size-4 shrink-0 text-gray-400 transition-transform "+(e?"rotate-180":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:/* @__PURE__ */A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})}function I({dir:e}){/* @__PURE__ */
3
3
  return A("svg",{className:"size-[18px]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"left"===e?"M18.75 19.5l-7.5-7.5 7.5-7.5m-6 15L5.25 12l7.5-7.5":"M5.25 4.5l7.5 7.5-7.5 7.5m6-15l7.5 7.5-7.5 7.5"})})}function B({className:e}){/* @__PURE__ */
4
- return A("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:/* @__PURE__ */A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})})}function W({width:W,collapsed:I,onToggleCollapsed:V,onOpen:O,activeRoute:R,profile:K,user:P,onLogout:_,onSwitchToDesktop:D,onReportBug:J,navSections:Q=h,navIcons:X=b,sectionIcons:Z=g,categories:F=u,productName:Y,productIcon:U,tagline:q,adaptiveLogo:E=!1,logoHasAlpha:G=null,logoIsLight:ee=null}){const te=v().layout,{hasAnyPerm:re}=e(),ae=k(()=>l(Q,F,re),[Q,F,re]),[ne,ie]=N(()=>t(r(a))),le=e=>ie(t=>{const r=n(t,e);return i(a,JSON.stringify([...r])),r}),[oe,se]=N(null),[ce,de]=N(!1),me=w(null);C(()=>{I||se(null)},[I]);const he=(e,t)=>{se(null),e.onSelect?e.onSelect():O(e.to,!!t&&(e=>e.metaKey||e.ctrlKey||1===e.button)(t))},ue=(e,t)=>{const r=t[e];/* @__PURE__ */
5
- return A("span",{className:$,"aria-hidden":"true",children:r&&L(r)?j(r,{className:"size-[18px]"}):r})},pe=(e,t)=>{const r=c(e,re),a=e.menuLabel??e.label;if(r.length>0){const n=`child:${e.to}`,i=ne.has(n),l=!i&&m(r,R,re);/* @__PURE__ */
4
+ return A("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:/* @__PURE__ */A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})})}function W({width:W,collapsed:T,onToggleCollapsed:O,onOpen:R,activeRoute:V,profile:K,user:D,onLogout:J,onSwitchToDesktop:P,onReportBug:_,navSections:Q=h,navIcons:X=b,sectionIcons:Z=g,categories:F=u,productName:U,productIcon:Y,tagline:q,adaptiveLogo:E=!1,logoHasAlpha:G=null,logoIsLight:ee=null}){const te=v().layout,{hasAnyPerm:re}=e(),ae=k(()=>l(Q,F,re),[Q,F,re]),[ne,ie]=N(()=>t(r(a))),le=e=>ie(t=>{const r=n(t,e);return i(a,JSON.stringify([...r])),r}),[oe,se]=N(null),[ce,de]=N(!1),me=w(null);C(()=>{T||se(null)},[T]);const he=(e,t)=>{se(null),e.onSelect?e.onSelect():R(e.to,!!t&&(e=>e.metaKey||e.ctrlKey||1===e.button)(t))},ue=(e,t)=>{const r=t[e];/* @__PURE__ */
5
+ return A("span",{className:$,"aria-hidden":"true",children:r&&L(r)?j(r,{className:"size-[18px]"}):r})},pe=(e,t)=>{const r=c(e,re),a=e.menuLabel??e.label;if(r.length>0){const n=`child:${e.to}`,i=ne.has(n),l=!i&&m(r,V,re);/* @__PURE__ */
6
6
  return S("div",{children:[
7
7
  /* @__PURE__ */S("button",{type:"button",onClick:()=>le(n),"aria-expanded":i,className:M(l,!1),style:t>0?{paddingLeft:.75+1.75*t+"rem"}:void 0,children:[0===t&&ue(e.to,X),
8
8
  /* @__PURE__ */A("span",{className:"min-w-0 flex-1 truncate",children:a}),
9
- /* @__PURE__ */A(H,{open:i})]}),i&&/* @__PURE__ */A("div",{className:"space-y-0.5 pt-0.5",children:r.map(e=>pe(e,t+1))}),e.dividerAfter&&/* @__PURE__ */A("div",{className:"mx-2 my-1.5 border-t border-gray-200","aria-hidden":"true"})]},e.to)}const n=e.to===R;/* @__PURE__ */
9
+ /* @__PURE__ */A(H,{open:i})]}),i&&/* @__PURE__ */A("div",{className:"space-y-0.5 pt-0.5",children:r.map(e=>pe(e,t+1))}),e.dividerAfter&&/* @__PURE__ */A("div",{className:"mx-2 my-1.5 border-t border-gray-200","aria-hidden":"true"})]},e.to)}const n=e.to===V;/* @__PURE__ */
10
10
  return S("div",{children:[
11
11
  /* @__PURE__ */S("button",{type:"button",onClick:t=>he(e,t),onAuxClick:t=>{1===t.button&&he(e,t)},"aria-current":n?"page":void 0,className:M(n,!1),style:t>0?{paddingLeft:.75+1.75*t+"rem"}:void 0,children:[0===t&&ue(e.to,X),
12
- /* @__PURE__ */A("span",{className:"min-w-0 flex-1 truncate",children:a})]}),e.dividerAfter&&/* @__PURE__ */A("div",{className:"mx-2 my-1.5 border-t border-gray-200","aria-hidden":"true"})]},e.to)},be=(e,t)=>{const r=t?e.items:d(e,re);if(0===r.length)return null;const a="icon"in e&&e.icon?/* @__PURE__ */A("span",{className:$,"aria-hidden":"true",children:e.icon}):ue(e.label,Z),n=e.menuLabel??e.label,i=m(r,R,re),l="dividerAfter"in e&&e.dividerAfter;if(I)/* @__PURE__ */
12
+ /* @__PURE__ */A("span",{className:"min-w-0 flex-1 truncate",children:a})]}),e.dividerAfter&&/* @__PURE__ */A("div",{className:"mx-2 my-1.5 border-t border-gray-200","aria-hidden":"true"})]},e.to)},be=(e,t)=>{const r=t?e.items:d(e,re);if(0===r.length)return null;const a="icon"in e&&e.icon?/* @__PURE__ */A("span",{className:$,"aria-hidden":"true",children:e.icon}):ue(e.label,Z),n=e.menuLabel??e.label,i=m(r,V,re),l="dividerAfter"in e&&e.dividerAfter;if(T)/* @__PURE__ */
13
13
  return S("div",{children:[
14
14
  /* @__PURE__ */A("button",{type:"button",title:n,"aria-label":n,"aria-haspopup":"menu","aria-expanded":oe?.label===e.label,onClick:t=>{const a=t.currentTarget.getBoundingClientRect();se(t=>t?.label===e.label?null:{label:e.label,items:r,top:a.top})},className:M(i||oe?.label===e.label,!0),children:a}),l&&/* @__PURE__ */A("div",{className:"mx-2 my-1.5 border-t border-gray-200","aria-hidden":"true"})]},e.label);const o=ne.has(e.label),s=`rosh-rail-${e.label.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}`;/* @__PURE__ */
15
15
  return S("div",{children:[
16
16
  /* @__PURE__ */S("button",{type:"button",onClick:()=>le(e.label),"aria-expanded":o,"aria-controls":s,className:M(!o&&i,!1),children:[a,
17
17
  /* @__PURE__ */A("span",{className:"min-w-0 flex-1 truncate",children:n}),
18
18
  /* @__PURE__ */A(H,{open:o})]}),
19
- /* @__PURE__ */A("div",{id:s,role:"group","aria-label":n,hidden:!o,className:"space-y-0.5 pt-0.5",children:o&&r.map(e=>pe(e,1))}),l&&/* @__PURE__ */A("div",{className:"mx-2 my-1.5 border-t border-gray-200","aria-hidden":"true"})]},e.label)},ge=K?.first_name?`${K.first_name} ${K.last_name||""}`.trim():P?.email||"",xe=(K?.first_name?.charAt(0)||P?.email?.charAt(0)||"?").toUpperCase(),fe=K?.avatar_url?/* @__PURE__ */A("img",{src:K.avatar_url,alt:"",className:"size-8 shrink-0 rounded-full object-cover"}):/* @__PURE__ */A("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white",children:xe}),ye=ce?me.current?.getBoundingClientRect():void 0,ve=I?"px-2.5":"px-3",ke=ae.erpSections.length>0||ae.systemSections.length>0||ae.virtualSections.length>0;/* @__PURE__ */
19
+ /* @__PURE__ */A("div",{id:s,role:"group","aria-label":n,hidden:!o,className:"space-y-0.5 pt-0.5",children:o&&r.map(e=>pe(e,1))}),l&&/* @__PURE__ */A("div",{className:"mx-2 my-1.5 border-t border-gray-200","aria-hidden":"true"})]},e.label)},ge=K?.first_name?`${K.first_name} ${K.last_name||""}`.trim():D?.email||"",xe=(K?.first_name?.charAt(0)||D?.email?.charAt(0)||"?").toUpperCase(),fe=K?.avatar_url?/* @__PURE__ */A("img",{src:K.avatar_url,alt:"",className:"size-8 shrink-0 rounded-full object-cover"}):/* @__PURE__ */A("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white",children:xe}),ye=ce?me.current?.getBoundingClientRect():void 0,ve=T?"px-2.5":"px-3",ke=ae.erpSections.length>0||ae.systemSections.length>0||ae.virtualSections.length>0;/* @__PURE__ */
20
20
  return S("aside",{"aria-label":te.navLabel,className:"fixed left-0 top-0 z-[260] flex h-dvh flex-col border-r border-gray-200 bg-white text-gray-800",style:{width:W},children:[
21
- /* @__PURE__ */S("div",{className:"flex shrink-0 items-center border-b border-gray-200 "+(I?"justify-center":"justify-between gap-2 pl-4 pr-2"),style:{height:p},children:[
22
- /* @__PURE__ */S("span",{className:"flex min-w-0 items-center gap-2",children:[U&&/* @__PURE__ */A(o,{src:U,alt:"",slot:"compact",surface:"light",adaptive:E,hasAlpha:G,isLight:ee,size:28,decorative:!0}),!I&&/* @__PURE__ */S("span",{className:"min-w-0 leading-tight",children:[
23
- /* @__PURE__ */A("span",{className:"block truncate text-[15px] font-bold tracking-wide text-gray-900",children:Y??"Apps"}),q&&/* @__PURE__ */A("span",{className:"block truncate text-[11px] font-medium text-gray-500",children:q})]})]}),!I&&/* @__PURE__ */A("button",{type:"button",onClick:V,"aria-label":te.collapseSidebar,title:`${te.collapseSidebar} (${z?"⌘":"Ctrl"} .)`,className:"flex size-8 shrink-0 items-center justify-center rounded-md text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900",children:/* @__PURE__ */A(T,{dir:"left"})})]}),
24
- /* @__PURE__ */A("div",{className:`shrink-0 pt-3 ${ve}`,children:I?/* @__PURE__ */A("button",{type:"button",onClick:s,"aria-label":te.search,title:`${te.search} (${z?"⌘K":"Ctrl K"})`,className:M(!1,!0),children:/* @__PURE__ */A(B,{className:"size-[18px]"})}):/* @__PURE__ */S("button",{type:"button",onClick:s,className:"flex h-[34px] w-full items-center gap-2 rounded-md border border-gray-200 bg-white px-2.5 text-left transition-colors hover:bg-gray-100",children:[
21
+ /* @__PURE__ */S("div",{className:"flex shrink-0 items-center border-b border-gray-200 "+(T?"justify-center":"justify-between gap-2 pl-4 pr-2"),style:{height:p},children:[
22
+ /* @__PURE__ */S("span",{className:"flex min-w-0 items-center gap-2",children:[Y&&/* @__PURE__ */A(o,{src:Y,alt:"",slot:"compact",surface:"light",adaptive:E,hasAlpha:G,isLight:ee,size:28,decorative:!0}),!T&&/* @__PURE__ */S("span",{className:"min-w-0 leading-tight",children:[
23
+ /* @__PURE__ */A("span",{className:"block truncate text-[15px] font-bold tracking-wide text-gray-900",children:U??"Apps"}),q&&/* @__PURE__ */A("span",{className:"block truncate text-[11px] font-medium text-gray-500",children:q})]})]}),!T&&/* @__PURE__ */A("button",{type:"button",onClick:O,"aria-label":te.collapseSidebar,title:`${te.collapseSidebar} (${z?"⌘":"Ctrl"} .)`,className:"flex size-8 shrink-0 items-center justify-center rounded-md text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900",children:/* @__PURE__ */A(I,{dir:"left"})})]}),
24
+ /* @__PURE__ */A("div",{className:`shrink-0 pt-3 ${ve}`,children:T?/* @__PURE__ */A("button",{type:"button",onClick:s,"aria-label":te.search,title:`${te.search} (${z?"⌘K":"Ctrl K"})`,className:M(!1,!0),children:/* @__PURE__ */A(B,{className:"size-[18px]"})}):/* @__PURE__ */S("button",{type:"button",onClick:s,className:"flex h-[34px] w-full items-center gap-2 rounded-md border border-gray-200 bg-white px-2.5 text-left transition-colors hover:bg-gray-100",children:[
25
25
  /* @__PURE__ */A(B,{className:"size-3.5 text-gray-500"}),
26
26
  /* @__PURE__ */A("span",{className:"min-w-0 flex-1 truncate text-[13px] text-gray-500",children:te.search}),
27
27
  /* @__PURE__ */A("kbd",{className:"rounded border border-gray-200 bg-gray-100 px-1.5 py-0.5 font-mono text-[11px] font-semibold text-gray-500",children:z?"⌘K":"Ctrl K"})]})}),
28
- /* @__PURE__ */S("nav",{"aria-label":te.navLabel,className:`min-h-0 flex-1 overflow-y-auto pb-4 pt-3 ${ve} ${I?"space-y-1":"space-y-0.5"}`,children:[I&&/* @__PURE__ */A("button",{type:"button",onClick:V,"aria-label":te.expandSidebar,title:`${te.expandSidebar} (${z?"⌘":"Ctrl"} .)`,className:`${M(!1,!0)} mb-3`,children:/* @__PURE__ */A(T,{dir:"right"})}),ae.topItems.map(e=>{if(!I)return pe(e,0);const t=c(e,re),r=e.to===R||m(t,R,re),a=e.menuLabel??e.label;/* @__PURE__ */
28
+ /* @__PURE__ */S("nav",{"aria-label":te.navLabel,className:`min-h-0 flex-1 overflow-y-auto pb-4 pt-3 ${ve} ${T?"space-y-1":"space-y-0.5"}`,children:[T&&/* @__PURE__ */A("button",{type:"button",onClick:O,"aria-label":te.expandSidebar,title:`${te.expandSidebar} (${z?"⌘":"Ctrl"} .)`,className:`${M(!1,!0)} mb-3`,children:/* @__PURE__ */A(I,{dir:"right"})}),ae.topItems.map(e=>{if(!T)return pe(e,0);const t=c(e,re),r=e.to===V||m(t,V,re),a=e.menuLabel??e.label;/* @__PURE__ */
29
29
  return S("div",{children:[
30
30
  /* @__PURE__ */A("button",{type:"button",title:a,"aria-label":a,onClick:r=>{if(0===t.length)return void he(e,r);const a=r.currentTarget.getBoundingClientRect();se(r=>r?.label===e.to?null:{label:e.to,items:t,top:a.top})},className:M(r,!0),children:ue(e.to,X)}),e.dividerAfter&&/* @__PURE__ */A("div",{className:"mx-2 my-1.5 border-t border-gray-200","aria-hidden":"true"})]},e.to)}),ae.topItems.length>0&&ke&&/* @__PURE__ */A("div",{className:"mx-2 my-1.5 border-t border-gray-200","aria-hidden":"true"}),ae.erpSections.map(e=>be(e,!1)),ae.systemSections.map(e=>be(e,!1)),ae.virtualSections.map(e=>be(e,!0)),ae.footerSections.length>0&&/* @__PURE__ */A("div",{className:"mx-2 my-1.5 border-t border-gray-200","aria-hidden":"true"}),ae.footerSections.map(e=>be(e,!1))]}),
31
- /* @__PURE__ */A("div",{className:`shrink-0 border-t border-gray-200 py-2 ${ve}`,children:/* @__PURE__ */S("button",{ref:me,type:"button",onClick:()=>de(e=>!e),"aria-haspopup":"menu","aria-expanded":ce,"aria-label":I?te.accountMenu(ge):void 0,className:"flex w-full items-center gap-2.5 rounded-md hover:bg-gray-100 "+(I?"justify-center py-2":"px-2 py-2"),children:[fe,!I&&/* @__PURE__ */S("span",{className:"min-w-0 flex-1 text-left",children:[
32
- /* @__PURE__ */A("span",{className:"block truncate text-[13px] font-semibold text-gray-800",children:ge}),P?.email&&ge!==P.email&&/* @__PURE__ */A("span",{className:"block truncate text-[11px] text-gray-500",children:P.email})]})]})}),ce&&ye&&/* @__PURE__ */S(x,{portal:!0,minWidth:224,onClose:()=>de(!1),style:{left:ye.left,bottom:window.innerHeight-ye.top+8},children:[I&&/* @__PURE__ */S("div",{className:"border-b border-gray-200 px-3 py-2.5",children:[
33
- /* @__PURE__ */A("p",{className:"truncate text-sm font-semibold text-gray-800",children:ge}),P?.email&&/* @__PURE__ */A("p",{className:"truncate text-xs text-gray-500",children:P.email})]}),
34
- /* @__PURE__ */S(f,{onClick:()=>{de(!1),O("/profile",!1)},children:[
31
+ /* @__PURE__ */A("div",{className:`shrink-0 border-t border-gray-200 py-2 ${ve}`,children:/* @__PURE__ */S("button",{ref:me,type:"button",onClick:()=>de(e=>!e),"aria-haspopup":"menu","aria-expanded":ce,"aria-label":T?te.accountMenu(ge):void 0,className:"flex w-full items-center gap-2.5 rounded-md hover:bg-gray-100 "+(T?"justify-center py-2":"px-2 py-2"),children:[fe,!T&&/* @__PURE__ */S("span",{className:"min-w-0 flex-1 text-left",children:[
32
+ /* @__PURE__ */A("span",{className:"block truncate text-[13px] font-semibold text-gray-800",children:ge}),D?.email&&ge!==D.email&&/* @__PURE__ */A("span",{className:"block truncate text-[11px] text-gray-500",children:D.email})]})]})}),ce&&ye&&/* @__PURE__ */S(x,{portal:!0,minWidth:224,onClose:()=>de(!1),style:{left:ye.left,bottom:window.innerHeight-ye.top+8},children:[T&&/* @__PURE__ */S("div",{className:"border-b border-gray-200 px-3 py-2.5",children:[
33
+ /* @__PURE__ */A("p",{className:"truncate text-sm font-semibold text-gray-800",children:ge}),D?.email&&/* @__PURE__ */A("p",{className:"truncate text-xs text-gray-500",children:D.email})]}),
34
+ /* @__PURE__ */S(f,{onClick:()=>{de(!1),R("/profile",!1)},children:[
35
35
  /* @__PURE__ */A("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})}),te.profile]}),ae.footerItems.map(e=>/* @__PURE__ */S(f,{onClick:()=>{de(!1),he(e)},children:[
36
- /* @__PURE__ */A("span",{className:"h-4 w-4 text-gray-400 [&>svg]:size-4","aria-hidden":"true",children:X[e.to]}),e.menuLabel??e.label]},e.to)),J&&/* @__PURE__ */S(f,{onClick:()=>{de(!1),J()},children:[
36
+ /* @__PURE__ */A("span",{className:"h-4 w-4 text-gray-400 [&>svg]:size-4","aria-hidden":"true",children:X[e.to]}),e.menuLabel??e.label]},e.to)),_&&/* @__PURE__ */S(f,{onClick:()=>{de(!1),_()},children:[
37
37
  /* @__PURE__ */A("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"})}),te.reportIssue]}),
38
38
  /* @__PURE__ */A(y,{}),
39
- /* @__PURE__ */S(f,{onClick:()=>{de(!1),D()},children:[
39
+ /* @__PURE__ */S(f,{onClick:()=>{de(!1),P()},children:[
40
40
  /* @__PURE__ */A("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 17.25v1.007a3 3 0 01-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0115 18.257V17.25m6-12V15a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 15V5.25m18 0A2.25 2.25 0 0018.75 3H5.25A2.25 2.25 0 003 5.25m18 0V12a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 12V5.25"})}),te.switchToDesktop]}),
41
41
  /* @__PURE__ */A(y,{}),
42
- /* @__PURE__ */S(f,{danger:!0,onClick:()=>{de(!1),_()},children:[
43
- /* @__PURE__ */A("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"})}),te.signOut]})]}),oe&&I&&/* @__PURE__ */A(x,{portal:!0,minWidth:220,onClose:()=>se(null),style:{left:W+6,top:Math.min(oe.top,window.innerHeight-48*Math.min(oe.items.length,10)-16)},children:oe.items.flatMap(e=>{const t=c(e,re);return(t.length>0?t:[e]).map(e=>/* @__PURE__ */S(f,{onClick:()=>he(e),children:[ue(e.to,X),
44
- /* @__PURE__ */A("span",{className:e.to===R?"font-semibold":"",children:e.menuLabel??e.label})]},e.to))})})]})}export{W as default};
42
+ /* @__PURE__ */S(f,{danger:!0,onClick:()=>{de(!1),J()},children:[
43
+ /* @__PURE__ */A("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"})}),te.signOut]})]}),oe&&T&&/* @__PURE__ */A(x,{portal:!0,minWidth:220,onClose:()=>se(null),style:{left:W+6,top:Math.min(oe.top,window.innerHeight-48*Math.min(oe.items.length,10)-16)},children:oe.items.flatMap(e=>{const t=c(e,re);return(t.length>0?t:[e]).map(e=>/* @__PURE__ */S(f,{onClick:()=>he(e),children:[ue(e.to,X),
44
+ /* @__PURE__ */A("span",{className:e.to===V?"font-semibold":"",children:e.menuLabel??e.label})]},e.to))})})]})}export{W as default};
@@ -1,19 +1,19 @@
1
- import{EditableGrid as e}from"./chunk-RKR5V4QR.js";import"./chunk-BR22X7E5.js";import{AboutApp as t}from"./chunk-4PCIZFDR.js";import{peekSpreadsheetPreviewStage as r,claimSpreadsheetPreviewStage as n,SPREADSHEET_PREVIEW_UPDATE_EVENT as o}from"./chunk-VTVSMRFX.js";import{WindowTitle as a}from"./chunk-TZ2BPFCT.js";import"./chunk-DSSLOQDW.js";import"./chunk-ZOPYAOUP.js";import"./chunk-MFXG5BWL.js";import"./chunk-YJRC6IKD.js";import"./chunk-5A7MWTXX.js";import"./chunk-OGXU7QFW.js";import"./chunk-XJYXKO7K.js";import"./chunk-AA4TMQOS.js";import"./chunk-AFYQTVZO.js";import"./chunk-HZZNJHRH.js";import"./chunk-X4FJ54PP.js";import"./chunk-D65T4H6J.js";import"./chunk-3YTHR7IC.js";import"./chunk-YKZHOXI4.js";import{useRef as l,useState as s,useEffect as c,useCallback as i}from"react";import{jsxs as u,jsx as d,Fragment as h}from"react/jsx-runtime";var m="ABCDEFGHIJKLMNOPQRSTUVWXYZ",p=10,x=30;function g(e){return e<26?m[e]:m[Math.floor(e/26)-1]+m[e%26]}function y(e){return Array.from({length:e},(e,t)=>({key:`col_${t}`,title:g(t),width:100}))}function b(e,t){return Array.from({length:e},()=>Array(t).fill(""))}function f(e){return{id:crypto.randomUUID(),name:e,columns:y(p),data:b(x,p),cellStyles:{}}}function v(e){return e.split("\n").map(e=>{if(e.includes("\t"))return e.split("\t").map(e=>e.trim());const t=[];let r="",n=!1;for(const o of e)'"'!==o?","!==o||n?r+=o:(t.push(r.trim()),r=""):n=!n;return t.push(r.trim()),t}).filter(e=>e.some(e=>e.trim()))}function k(e,t){const r=v(e);if(0===r.length)return null;const n=Math.max(p,r.reduce((e,t)=>Math.max(e,t.length),0)),o=r.map(e=>{for(;e.length<n;)e.push("");return e});for(;o.length<x;)o.push(Array(n).fill(""));return{id:crypto.randomUUID(),name:t,columns:y(n),data:o,cellStyles:{}}}function w(){const m=l(null),g=l(void 0);void 0===g.current&&(g.current=r());const w=l(g.current?.data??null),C=(()=>{const e=g.current;if(!e)return null;const t=k(e.data.csv,"Sheet 1");if(!t)return null;return{sheet:t,title:e.data.filename.replace(/\.(csv|tsv|txt)$/i,"")}})(),[N,S]=s(C?[C.sheet]:[f("Sheet 1")]),[j,$]=s(0),M=l([]),A=l(N),U=l(!1);c(()=>{U.current?U.current=!1:A.current!==N&&(M.current.push(A.current),M.current.length>50&&M.current.shift()),A.current=N},[N]);const D=i(()=>{const e=M.current.pop();e&&(U.current=!0,S(e))},[]);c(()=>{const e=e=>{if(!m.current?.contains(document.activeElement)&&!m.current?.matches(":focus-within"))return;(e.ctrlKey||e.metaKey)&&!e.shiftKey&&("z"===e.key||"Z"===e.key)&&(e.preventDefault(),D())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[D]);const[E,R]=s(C?.title??"Untitled"),[F,L]=s(()=>g.current?.data.onEmail),O=i(e=>{const t=k(e.csv,"Sheet 1");t&&(S([t]),$(0),R(e.filename.replace(/\.(csv|tsv|txt)$/i,"")),L(()=>e.onEmail))},[]);c(()=>{const e=g.current;null!=e&&(n(e),e.data!==w.current&&O(e.data))},[]),c(()=>{const e=g.current?.token;if(null==e)return;const t=t=>{const r=t.detail;r&&r.token===e&&O(r.data)};return window.addEventListener(o,t),()=>window.removeEventListener(o,t)},[]);const[X,I]=s(!1),[K,B]=s(null),[T,Z]=s(""),H=l(null),[P,Y]=s("1"),[J,Q]=s("10"),V=N[j]||N[0],W=V.data,z=V.columns,G=V.cellStyles??{},[_,q]=s(null),[ee,te]=s(null),re=i(()=>{if(ee){const e=Math.min(ee.anchor.row,ee.end.row),t=Math.max(ee.anchor.row,ee.end.row),r=Math.min(ee.anchor.col,ee.end.col),n=Math.max(ee.anchor.col,ee.end.col),o=[];for(let a=e;a<=t;a++)for(let e=r;e<=n;e++)o.push({row:a,col:e});return o}return _?[_]:[]},[ee,_]),ne=i((e,t)=>{const r=re();0!==r.length&&S(n=>n.map((n,o)=>{if(o!==j)return n;const a={...n.cellStyles??{}},l=`${r[0].row}:${r[0].col}`,s=void 0!==t?t:!(a[l]??{})[e];for(const{row:t,col:n}of r){const r=`${t}:${n}`;a[r]={...a[r]??{},[e]:s}}return{...n,cellStyles:a}}))},[re,j]),oe=ee?{row:ee.anchor.row,col:ee.anchor.col}:_,ae=oe?G[`${oe.row}:${oe.col}`]??{}:{},le=!!oe,se=i(e=>{S(t=>t.map((t,r)=>r===j?{...t,...e}:t))},[j]),ce=i(e=>{const t=e.reduce((e,t)=>Math.max(e,t.length),0);t!==z.length?se({data:e,columns:y(t)}):se({data:e})},[se,z.length]),ie=(e,t)=>{S(r=>r.map((r,n)=>n===e?{...r,name:t}:r)),B(null)},ue=()=>W.filter(e=>e.some(e=>e.trim())).map(e=>e.map(e=>e.includes(",")||e.includes('"')||e.includes("\n")?`"${e.replace(/"/g,'""')}"`:e).join(",")).join("\n"),de=[];W.forEach(e=>e.forEach(e=>{const t=parseFloat(e);!isNaN(t)&&e.trim()&&de.push(t)}));const he=W.reduce((e,t)=>e+t.filter(e=>e.trim()).length,0);/* @__PURE__ */
1
+ import{EditableGrid as e}from"./chunk-T4CFSGSL.js";import"./chunk-BR22X7E5.js";import{AboutApp as t}from"./chunk-CZK2VKIO.js";import{peekSpreadsheetPreviewStage as r,claimSpreadsheetPreviewStage as n,SPREADSHEET_PREVIEW_UPDATE_EVENT as o}from"./chunk-VTVSMRFX.js";import{WindowTitle as a}from"./chunk-N6STBYXR.js";import"./chunk-DSSLOQDW.js";import"./chunk-KVOFUFPP.js";import"./chunk-AZURXTRB.js";import"./chunk-CIXQKCFA.js";import"./chunk-5A7MWTXX.js";import"./chunk-OGXU7QFW.js";import"./chunk-ZAE6ROV7.js";import"./chunk-AA4TMQOS.js";import"./chunk-AFYQTVZO.js";import"./chunk-HZZNJHRH.js";import"./chunk-X4FJ54PP.js";import"./chunk-D65T4H6J.js";import"./chunk-J3LIIIHJ.js";import"./chunk-C3QOHMR6.js";import"./chunk-YKZHOXI4.js";import{useRef as l,useState as s,useEffect as c,useCallback as i}from"react";import{jsxs as u,jsx as d,Fragment as h}from"react/jsx-runtime";var m="ABCDEFGHIJKLMNOPQRSTUVWXYZ",p=10,x=30;function g(e){return e<26?m[e]:m[Math.floor(e/26)-1]+m[e%26]}function y(e){return Array.from({length:e},(e,t)=>({key:`col_${t}`,title:g(t),width:100}))}function b(e,t){return Array.from({length:e},()=>Array(t).fill(""))}function f(e){return{id:crypto.randomUUID(),name:e,columns:y(p),data:b(x,p),cellStyles:{}}}function v(e){return e.split("\n").map(e=>{if(e.includes("\t"))return e.split("\t").map(e=>e.trim());const t=[];let r="",n=!1;for(const o of e)'"'!==o?","!==o||n?r+=o:(t.push(r.trim()),r=""):n=!n;return t.push(r.trim()),t}).filter(e=>e.some(e=>e.trim()))}function k(e,t){const r=v(e);if(0===r.length)return null;const n=Math.max(p,r.reduce((e,t)=>Math.max(e,t.length),0)),o=r.map(e=>{for(;e.length<n;)e.push("");return e});for(;o.length<x;)o.push(Array(n).fill(""));return{id:crypto.randomUUID(),name:t,columns:y(n),data:o,cellStyles:{}}}function w(){const m=l(null),g=l(void 0);void 0===g.current&&(g.current=r());const w=l(g.current?.data??null),C=(()=>{const e=g.current;if(!e)return null;const t=k(e.data.csv,"Sheet 1");if(!t)return null;return{sheet:t,title:e.data.filename.replace(/\.(csv|tsv|txt)$/i,"")}})(),[N,S]=s(C?[C.sheet]:[f("Sheet 1")]),[j,A]=s(0),$=l([]),M=l(N),U=l(!1);c(()=>{U.current?U.current=!1:M.current!==N&&($.current.push(M.current),$.current.length>50&&$.current.shift()),M.current=N},[N]);const E=i(()=>{const e=$.current.pop();e&&(U.current=!0,S(e))},[]);c(()=>{const e=e=>{if(!m.current?.contains(document.activeElement)&&!m.current?.matches(":focus-within"))return;(e.ctrlKey||e.metaKey)&&!e.shiftKey&&("z"===e.key||"Z"===e.key)&&(e.preventDefault(),E())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[E]);const[F,L]=s(C?.title??"Untitled"),[R,D]=s(()=>g.current?.data.onEmail),I=i(e=>{const t=k(e.csv,"Sheet 1");t&&(S([t]),A(0),L(e.filename.replace(/\.(csv|tsv|txt)$/i,"")),D(()=>e.onEmail))},[]);c(()=>{const e=g.current;null!=e&&(n(e),e.data!==w.current&&I(e.data))},[]),c(()=>{const e=g.current?.token;if(null==e)return;const t=t=>{const r=t.detail;r&&r.token===e&&I(r.data)};return window.addEventListener(o,t),()=>window.removeEventListener(o,t)},[]);const[O,X]=s(!1),[K,B]=s(null),[H,T]=s(""),Z=l(null),[V,Q]=s("1"),[J,P]=s("10"),z=N[j]||N[0],W=z.data,Y=z.columns,G=z.cellStyles??{},[_,q]=s(null),[ee,te]=s(null),re=i(()=>{if(ee){const e=Math.min(ee.anchor.row,ee.end.row),t=Math.max(ee.anchor.row,ee.end.row),r=Math.min(ee.anchor.col,ee.end.col),n=Math.max(ee.anchor.col,ee.end.col),o=[];for(let a=e;a<=t;a++)for(let e=r;e<=n;e++)o.push({row:a,col:e});return o}return _?[_]:[]},[ee,_]),ne=i((e,t)=>{const r=re();0!==r.length&&S(n=>n.map((n,o)=>{if(o!==j)return n;const a={...n.cellStyles??{}},l=`${r[0].row}:${r[0].col}`,s=void 0!==t?t:!(a[l]??{})[e];for(const{row:t,col:n}of r){const r=`${t}:${n}`;a[r]={...a[r]??{},[e]:s}}return{...n,cellStyles:a}}))},[re,j]),oe=ee?{row:ee.anchor.row,col:ee.anchor.col}:_,ae=oe?G[`${oe.row}:${oe.col}`]??{}:{},le=!!oe,se=i(e=>{S(t=>t.map((t,r)=>r===j?{...t,...e}:t))},[j]),ce=i(e=>{const t=e.reduce((e,t)=>Math.max(e,t.length),0);t!==Y.length?se({data:e,columns:y(t)}):se({data:e})},[se,Y.length]),ie=(e,t)=>{S(r=>r.map((r,n)=>n===e?{...r,name:t}:r)),B(null)},ue=()=>W.filter(e=>e.some(e=>e.trim())).map(e=>e.map(e=>e.includes(",")||e.includes('"')||e.includes("\n")?`"${e.replace(/"/g,'""')}"`:e).join(",")).join("\n"),de=[];W.forEach(e=>e.forEach(e=>{const t=parseFloat(e);!isNaN(t)&&e.trim()&&de.push(t)}));const he=W.reduce((e,t)=>e+t.filter(e=>e.trim()).length,0);/* @__PURE__ */
2
2
  return u("div",{ref:m,className:"flex flex-col h-full",children:[
3
- /* @__PURE__ */d(a,{title:`${me=E||"Untitled",me.length>24?`${me.slice(0,23)}…`:me} - Spreadsheets`}),
3
+ /* @__PURE__ */d(a,{title:`${me=F||"Untitled",me.length>24?`${me.slice(0,23)}…`:me} - Spreadsheets`}),
4
4
  /* @__PURE__ */d(t,{app:"spreadsheet"}),
5
- /* @__PURE__ */u("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[X?/* @__PURE__ */d("input",{type:"text",value:E,onChange:e=>R(e.target.value),onBlur:()=>I(!1),onKeyDown:e=>{"Enter"===e.key&&I(!1)},autoFocus:!0,className:"text-sm font-medium text-gray-900 border border-gray-300 rounded px-2 py-0.5 w-40 focus:border-blue-500 focus:ring-blue-500"}):/* @__PURE__ */d("button",{onClick:()=>I(!0),className:"text-sm font-medium text-gray-900 hover:text-blue-600 truncate max-w-[200px]",title:"Click to rename",children:E||"Untitled"}),
5
+ /* @__PURE__ */u("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[O?/* @__PURE__ */d("input",{type:"text",value:F,onChange:e=>L(e.target.value),onBlur:()=>X(!1),onKeyDown:e=>{"Enter"===e.key&&X(!1)},autoFocus:!0,className:"text-sm font-medium text-gray-900 border border-gray-300 rounded px-2 py-0.5 w-40 focus:border-blue-500 focus:ring-blue-500"}):/* @__PURE__ */d("button",{onClick:()=>X(!0),className:"text-sm font-medium text-gray-900 hover:text-blue-600 truncate max-w-[200px]",title:"Click to rename",children:F||"Untitled"}),
6
6
  /* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
7
- /* @__PURE__ */d("input",{ref:H,type:"file",accept:".csv,.tsv,.txt,.xlsx,.xls,.ods",onChange:async e=>{const t=e.target.files?.[0];if(!t)return;const r=t.name.replace(/\.(csv|tsv|txt|xlsx|xls|ods)$/i,"");if(/\.(xlsx|xls|ods)$/i.test(t.name)){const e=new Uint8Array(await t.arrayBuffer()),n=await(import("xlsx")),o=n.read(e,{type:"array"}),a=o.SheetNames.map(e=>{const t=n.utils.sheet_to_json(o.Sheets[e],{header:1,defval:""}),r=Math.max(p,t.reduce((e,t)=>Math.max(e,t.length),0)),a=t.map(e=>{const t=e.map(e=>String(e??""));for(;t.length<r;)t.push("");return t});for(;a.length<x;)a.push(Array(r).fill(""));return{id:crypto.randomUUID(),name:e,columns:y(r),data:a}});S(a),$(0),R(r)}else{const e=v(await t.text());if(0===e.length)return;const n=Math.max(p,e.reduce((e,t)=>Math.max(e,t.length),0)),o=e.map(e=>{for(;e.length<n;)e.push("");return e});for(;o.length<x;)o.push(Array(n).fill(""));se({columns:y(n),data:o}),R(r)}H.current&&(H.current.value="")},className:"hidden"}),
8
- /* @__PURE__ */d("button",{onClick:()=>H.current?.click(),className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Open"}),
9
- /* @__PURE__ */d("button",{onClick:()=>{const e=new Blob([ue()],{type:"text/csv"}),t=URL.createObjectURL(e),r=document.createElement("a");r.href=t,r.download=`${E||"spreadsheet"}.csv`,r.click(),URL.revokeObjectURL(t)},className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Save CSV"}),F&&/* @__PURE__ */d("button",{onClick:()=>F(ue(),`${E||"spreadsheet"}.csv`),className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Email"}),
7
+ /* @__PURE__ */d("input",{ref:Z,type:"file",accept:".csv,.tsv,.txt,.xlsx,.xls,.ods",onChange:async e=>{const t=e.target.files?.[0];if(!t)return;const r=t.name.replace(/\.(csv|tsv|txt|xlsx|xls|ods)$/i,"");if(/\.(xlsx|xls|ods)$/i.test(t.name)){const e=new Uint8Array(await t.arrayBuffer()),n=await(import("xlsx")),o=n.read(e,{type:"array"}),a=o.SheetNames.map(e=>{const t=n.utils.sheet_to_json(o.Sheets[e],{header:1,defval:""}),r=Math.max(p,t.reduce((e,t)=>Math.max(e,t.length),0)),a=t.map(e=>{const t=e.map(e=>String(e??""));for(;t.length<r;)t.push("");return t});for(;a.length<x;)a.push(Array(r).fill(""));return{id:crypto.randomUUID(),name:e,columns:y(r),data:a}});S(a),A(0),L(r)}else{const e=v(await t.text());if(0===e.length)return;const n=Math.max(p,e.reduce((e,t)=>Math.max(e,t.length),0)),o=e.map(e=>{for(;e.length<n;)e.push("");return e});for(;o.length<x;)o.push(Array(n).fill(""));se({columns:y(n),data:o}),L(r)}Z.current&&(Z.current.value="")},className:"hidden"}),
8
+ /* @__PURE__ */d("button",{onClick:()=>Z.current?.click(),className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Open"}),
9
+ /* @__PURE__ */d("button",{onClick:()=>{const e=new Blob([ue()],{type:"text/csv"}),t=URL.createObjectURL(e),r=document.createElement("a");r.href=t,r.download=`${F||"spreadsheet"}.csv`,r.click(),URL.revokeObjectURL(t)},className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Save CSV"}),R&&/* @__PURE__ */d("button",{onClick:()=>R(ue(),`${F||"spreadsheet"}.csv`),className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Email"}),
10
10
  /* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
11
11
  /* @__PURE__ */u("div",{className:"flex items-center gap-1",children:[
12
- /* @__PURE__ */d("input",{type:"number",min:"1",max:"50",value:P,onChange:e=>Y(e.target.value),className:"w-10 text-xs text-center border border-gray-300 rounded px-1 py-0.5 focus:border-blue-500 focus:ring-blue-500"}),
13
- /* @__PURE__ */d("button",{onClick:()=>(e=>{const t=z.length+e;se({columns:y(t),data:W.map(t=>[...t,...Array(e).fill("")])})})(parseInt(P)||1),className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"+ Col"})]}),
12
+ /* @__PURE__ */d("input",{type:"number",min:"1",max:"50",value:V,onChange:e=>Q(e.target.value),className:"w-10 text-xs text-center border border-gray-300 rounded px-1 py-0.5 focus:border-blue-500 focus:ring-blue-500"}),
13
+ /* @__PURE__ */d("button",{onClick:()=>(e=>{const t=Y.length+e;se({columns:y(t),data:W.map(t=>[...t,...Array(e).fill("")])})})(parseInt(V)||1),className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"+ Col"})]}),
14
14
  /* @__PURE__ */u("div",{className:"flex items-center gap-1",children:[
15
- /* @__PURE__ */d("input",{type:"number",min:"1",max:"500",value:J,onChange:e=>Q(e.target.value),className:"w-10 text-xs text-center border border-gray-300 rounded px-1 py-0.5 focus:border-blue-500 focus:ring-blue-500"}),
16
- /* @__PURE__ */d("button",{onClick:()=>{return e=parseInt(J)||10,void se({data:[...W,...Array.from({length:e},()=>Array(z.length).fill(""))]});var e},className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"+ Row"})]}),
15
+ /* @__PURE__ */d("input",{type:"number",min:"1",max:"500",value:J,onChange:e=>P(e.target.value),className:"w-10 text-xs text-center border border-gray-300 rounded px-1 py-0.5 focus:border-blue-500 focus:ring-blue-500"}),
16
+ /* @__PURE__ */d("button",{onClick:()=>{return e=parseInt(J)||10,void se({data:[...W,...Array.from({length:e},()=>Array(Y.length).fill(""))]});var e},className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"+ Row"})]}),
17
17
  /* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
18
18
  /* @__PURE__ */d("button",{onClick:()=>{se({columns:y(p),data:b(x,p)})},className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Clear"}),
19
19
  /* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
@@ -26,12 +26,12 @@ return u("div",{ref:m,className:"flex flex-col h-full",children:[
26
26
  /* @__PURE__ */d("option",{value:"base",children:"S"}),
27
27
  /* @__PURE__ */d("option",{value:"lg",children:"M"}),
28
28
  /* @__PURE__ */d("option",{value:"xl",children:"L"})]})]})]}),
29
- /* @__PURE__ */d("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */d(e,{columns:z,data:W,onChange:ce,onColumnsChange:e=>se({columns:e}),cellStyles:G,onFocusChange:q,onSelectionChange:te,minRows:x,maxHeight:"100%"})}),
29
+ /* @__PURE__ */d("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */d(e,{columns:Y,data:W,onChange:ce,onColumnsChange:e=>se({columns:e}),cellStyles:G,onFocusChange:q,onSelectionChange:te,minRows:x,maxHeight:"100%"})}),
30
30
  /* @__PURE__ */u("div",{className:"flex items-center border-t border-gray-200 bg-gray-50 shrink-0",children:[
31
- /* @__PURE__ */u("div",{className:"flex items-center gap-0.5 px-1 py-1 overflow-x-auto flex-1 min-w-0",children:[N.map((e,t)=>/* @__PURE__ */d("button",{onClick:()=>$(t),onDoubleClick:()=>{B(t),Z(e.name)},onContextMenu:e=>{e.preventDefault(),N.length>1&&(e=>{N.length<=1||(S(t=>t.filter((t,r)=>r!==e)),j>=e&&j>0&&$(j-1))})(t)},className:"px-3 py-1 text-xs font-medium rounded-b whitespace-nowrap transition-colors "+(t===j?"bg-white text-blue-700 border border-t-0 border-gray-300 -mt-px relative z-10":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"),children:K===t?/* @__PURE__ */d("input",{type:"text",value:T,onChange:e=>Z(e.target.value),onBlur:()=>ie(t,T||e.name),onKeyDown:r=>{"Enter"===r.key&&ie(t,T||e.name),"Escape"===r.key&&B(null)},onClick:e=>e.stopPropagation(),autoFocus:!0,className:"w-20 text-xs border border-blue-400 rounded px-1 py-0 focus:ring-0 focus:outline-none"}):e.name},e.id)),
32
- /* @__PURE__ */d("button",{onClick:()=>{const e=`Sheet ${N.length+1}`;S(t=>[...t,f(e)]),$(N.length)},className:"px-2 py-1 text-xs text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded",title:"Add sheet",children:"+"})]}),
31
+ /* @__PURE__ */u("div",{className:"flex items-center gap-0.5 px-1 py-1 overflow-x-auto flex-1 min-w-0",children:[N.map((e,t)=>/* @__PURE__ */d("button",{onClick:()=>A(t),onDoubleClick:()=>{B(t),T(e.name)},onContextMenu:e=>{e.preventDefault(),N.length>1&&(e=>{N.length<=1||(S(t=>t.filter((t,r)=>r!==e)),j>=e&&j>0&&A(j-1))})(t)},className:"px-3 py-1 text-xs font-medium rounded-b whitespace-nowrap transition-colors "+(t===j?"bg-white text-blue-700 border border-t-0 border-gray-300 -mt-px relative z-10":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"),children:K===t?/* @__PURE__ */d("input",{type:"text",value:H,onChange:e=>T(e.target.value),onBlur:()=>ie(t,H||e.name),onKeyDown:r=>{"Enter"===r.key&&ie(t,H||e.name),"Escape"===r.key&&B(null)},onClick:e=>e.stopPropagation(),autoFocus:!0,className:"w-20 text-xs border border-blue-400 rounded px-1 py-0 focus:ring-0 focus:outline-none"}):e.name},e.id)),
32
+ /* @__PURE__ */d("button",{onClick:()=>{const e=`Sheet ${N.length+1}`;S(t=>[...t,f(e)]),A(N.length)},className:"px-2 py-1 text-xs text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded",title:"Add sheet",children:"+"})]}),
33
33
  /* @__PURE__ */u("div",{className:"flex items-center gap-4 px-3 py-1 text-xs text-gray-500 shrink-0 border-l border-gray-200",children:[
34
34
  /* @__PURE__ */u("span",{children:[he," cells"]}),de.length>0&&/* @__PURE__ */u(h,{children:[
35
35
  /* @__PURE__ */u("span",{children:["Sum: ",de.reduce((e,t)=>e+t,0).toLocaleString(void 0,{maximumFractionDigits:2})]}),
36
36
  /* @__PURE__ */u("span",{children:["Avg: ",(de.reduce((e,t)=>e+t,0)/de.length).toLocaleString(void 0,{maximumFractionDigits:2})]})]}),
37
- /* @__PURE__ */u("span",{children:[W.length," × ",z.length]})]})]})]});var me}export{w as default};
37
+ /* @__PURE__ */u("span",{children:[W.length," × ",Y.length]})]})]})]});var me}export{w as default};
@@ -1,16 +1,16 @@
1
- import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-AI6HQ55O.js";import{useWidgetSettings as a}from"./chunk-TZ2BPFCT.js";import"./chunk-DSSLOQDW.js";import"./chunk-ZOPYAOUP.js";import"./chunk-YJRC6IKD.js";import"./chunk-5A7MWTXX.js";import"./chunk-OGXU7QFW.js";import"./chunk-XJYXKO7K.js";import"./chunk-AA4TMQOS.js";import"./chunk-AFYQTVZO.js";import"./chunk-HZZNJHRH.js";import"./chunk-X4FJ54PP.js";import"./chunk-D65T4H6J.js";import"./chunk-3YTHR7IC.js";import"./chunk-YKZHOXI4.js";import{useState as r,useCallback as n}from"react";import{jsxs as c,Fragment as s,jsx as i}from"react/jsx-runtime";var l=["AAPL","MSFT","GOOGL","TSLA","NVDA"],o="stock_symbols",m="stock_appearance",p={AAPL:{price:229.87,change:1.42,changePct:.62},MSFT:{price:451.16,change:-2.31,changePct:-.51},GOOGL:{price:178.34,change:.89,changePct:.5},AMZN:{price:201.45,change:-1.08,changePct:-.53},TSLA:{price:248.92,change:6.74,changePct:2.78},NVDA:{price:134.81,change:-3.12,changePct:-2.26},META:{price:563.27,change:4.55,changePct:.81}},h=Object.keys(p);function d(){try{const e=JSON.parse(localStorage.getItem(o)||"");if(Array.isArray(e)&&e.length)return e.slice(0,8)}catch{}return l}var g=e=>`${e>=0?"+":""}${e.toFixed(2)}`;function x(){const[l,x]=r(d),[u,y]=r(()=>e(m)),[b,f]=r(!1),[N,k]=r([]),[v,A]=r(u),[j,O]=r(""),S=n(()=>{k([...l]),A({...u}),O(""),f(!0)},[l,u]);a(S);const P=()=>{const e=j.trim().toUpperCase();!e||N.includes(e)||N.length>=8||(k(t=>[...t,e]),O(""))},C=h.filter(e=>!N.includes(e));/* @__PURE__ */
1
+ import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-SVO3ES2E.js";import{useWidgetSettings as a}from"./chunk-N6STBYXR.js";import"./chunk-DSSLOQDW.js";import"./chunk-KVOFUFPP.js";import"./chunk-CIXQKCFA.js";import"./chunk-5A7MWTXX.js";import"./chunk-OGXU7QFW.js";import"./chunk-ZAE6ROV7.js";import"./chunk-AA4TMQOS.js";import"./chunk-AFYQTVZO.js";import"./chunk-HZZNJHRH.js";import"./chunk-X4FJ54PP.js";import"./chunk-D65T4H6J.js";import"./chunk-J3LIIIHJ.js";import"./chunk-C3QOHMR6.js";import"./chunk-YKZHOXI4.js";import{useState as r,useCallback as n}from"react";import{jsxs as c,Fragment as s,jsx as i}from"react/jsx-runtime";var o=["AAPL","MSFT","GOOGL","TSLA","NVDA"],l="stock_symbols",m="stock_appearance",p={AAPL:{price:229.87,change:1.42,changePct:.62},MSFT:{price:451.16,change:-2.31,changePct:-.51},GOOGL:{price:178.34,change:.89,changePct:.5},AMZN:{price:201.45,change:-1.08,changePct:-.53},TSLA:{price:248.92,change:6.74,changePct:2.78},NVDA:{price:134.81,change:-3.12,changePct:-2.26},META:{price:563.27,change:4.55,changePct:.81}},h=Object.keys(p);function d(){try{const e=JSON.parse(localStorage.getItem(l)||"");if(Array.isArray(e)&&e.length)return e.slice(0,8)}catch{}return o}var g=e=>`${e>=0?"+":""}${e.toFixed(2)}`;function x(){const[o,x]=r(d),[u,y]=r(()=>e(m)),[b,f]=r(!1),[N,k]=r([]),[v,A]=r(u),[S,j]=r(""),O=n(()=>{k([...o]),A({...u}),j(""),f(!0)},[o,u]);a(O);const P=()=>{const e=S.trim().toUpperCase();!e||N.includes(e)||N.length>=8||(k(t=>[...t,e]),j(""))},C=h.filter(e=>!N.includes(e));/* @__PURE__ */
2
2
  return c(s,{children:[
3
- /* @__PURE__ */i("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${u.activeOpacity/100})`,backdropFilter:u.activeBlur>0?`blur(${u.activeBlur}px)`:void 0},children:/* @__PURE__ */i("div",{className:"px-4 py-3",children:0===l.length?/* @__PURE__ */i("div",{className:"text-xs text-gray-500 text-center py-6",children:"No symbols yet — add some in settings."}):/* @__PURE__ */i("div",{className:"space-y-0.5",children:l.map(e=>{const t=p[e],a=(t?.change??0)>=0,r=t?t.change>0?"text-green-600":t.change<0?"text-red-600":"text-gray-500":"text-gray-400";/* @__PURE__ */
3
+ /* @__PURE__ */i("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${u.activeOpacity/100})`,backdropFilter:u.activeBlur>0?`blur(${u.activeBlur}px)`:void 0},children:/* @__PURE__ */i("div",{className:"px-4 py-3",children:0===o.length?/* @__PURE__ */i("div",{className:"text-xs text-gray-500 text-center py-6",children:"No symbols yet — add some in settings."}):/* @__PURE__ */i("div",{className:"space-y-0.5",children:o.map(e=>{const t=p[e],a=(t?.change??0)>=0,r=t?t.change>0?"text-green-600":t.change<0?"text-red-600":"text-gray-500":"text-gray-400";/* @__PURE__ */
4
4
  return c("div",{className:"flex items-center justify-between px-2 py-2 border-b border-gray-200 last:border-0",children:[
5
5
  /* @__PURE__ */i("span",{className:"text-sm font-bold text-gray-800 tracking-tight",children:e}),t?/* @__PURE__ */c("div",{className:"flex flex-col items-end leading-tight",children:[
6
6
  /* @__PURE__ */i("span",{className:"text-sm font-mono font-semibold text-gray-900 tabular-nums",children:(n=t.price,`$${n.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`)}),
7
7
  /* @__PURE__ */c("span",{className:`text-[11px] font-medium tabular-nums ${r}`,children:[a?"▲":"▼"," ",g(t.change)," (",g(t.changePct),"%)"]})]}):/* @__PURE__ */i("span",{className:"text-sm font-mono text-gray-400 tabular-nums",children:"—"})]},e);var n})})})}),
8
- /* @__PURE__ */i(t,{open:b,onClose:()=>f(!1),title:"Stock Settings",appearance:v,onAppearanceChange:A,onSave:()=>{const e=N.map(e=>e.toUpperCase()).slice(0,8);x(e),y(v),localStorage.setItem(o,JSON.stringify(e)),localStorage.setItem(m,JSON.stringify(v)),f(!1)},children:/* @__PURE__ */c("div",{children:[
8
+ /* @__PURE__ */i(t,{open:b,onClose:()=>f(!1),title:"Stock Settings",appearance:v,onAppearanceChange:A,onSave:()=>{const e=N.map(e=>e.toUpperCase()).slice(0,8);x(e),y(v),localStorage.setItem(l,JSON.stringify(e)),localStorage.setItem(m,JSON.stringify(v)),f(!1)},children:/* @__PURE__ */c("div",{children:[
9
9
  /* @__PURE__ */c("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:["Symbols ",
10
10
  /* @__PURE__ */c("span",{className:"text-[11px] font-normal text-gray-400",children:["(",N.length,"/",8,")"]})]}),
11
11
  /* @__PURE__ */c("div",{className:"space-y-1 mb-2",children:[N.map((e,t)=>/* @__PURE__ */c("div",{className:"flex items-center justify-between py-1 px-2 bg-gray-50 rounded",children:[
12
12
  /* @__PURE__ */i("span",{className:"text-sm font-semibold text-gray-700",children:e}),
13
13
  /* @__PURE__ */i("button",{onClick:()=>k(e=>e.filter((e,a)=>a!==t)),className:"text-red-400 hover:text-red-600",children:"×"})]},t)),0===N.length&&/* @__PURE__ */i("p",{className:"text-[11px] text-gray-400 italic",children:"No symbols — add a ticker below."})]}),N.length<8?/* @__PURE__ */c("div",{className:"flex items-center gap-2",children:[
14
- /* @__PURE__ */i("input",{value:j,onChange:e=>O(e.target.value),onKeyDown:e=>{"Enter"===e.key&&P()},placeholder:"e.g. NVDA",className:"flex-1 bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm uppercase focus:outline-none focus:ring-1 focus:ring-blue-500"}),
14
+ /* @__PURE__ */i("input",{value:S,onChange:e=>j(e.target.value),onKeyDown:e=>{"Enter"===e.key&&P()},placeholder:"e.g. NVDA",className:"flex-1 bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm uppercase focus:outline-none focus:ring-1 focus:ring-blue-500"}),
15
15
  /* @__PURE__ */i("button",{onClick:P,className:"text-sm font-medium text-blue-600 hover:text-blue-800 px-2",children:"+ Add"})]}):/* @__PURE__ */c("p",{className:"text-[11px] text-gray-400 italic",children:["Max ",8," symbols — remove one to add another."]}),C.length>0&&N.length<8&&/* @__PURE__ */i("div",{className:"flex flex-wrap gap-1.5 mt-2",children:C.map(e=>/* @__PURE__ */i("button",{onClick:()=>k(t=>t.length<8?[...t,e]:t),className:"text-[11px] font-medium text-gray-600 bg-gray-100 hover:bg-gray-200 rounded px-2 py-0.5 transition-colors",children:e},e))}),
16
16
  /* @__PURE__ */i("p",{className:"text-[11px] text-gray-400 mt-2",children:"Demo prices — static sample data, no live feed."})]})})]})}export{x as default};
@@ -1,4 +1,4 @@
1
- import{fetchCityWeather as e,getCondition as t,AVAILABLE_CITIES as a,toFahrenheit as r}from"./chunk-FBDZGO3V.js";import{loadAppearance as n,WidgetSettingsModal as i}from"./chunk-AI6HQ55O.js";import{useWidgetSettings as s}from"./chunk-TZ2BPFCT.js";import"./chunk-DSSLOQDW.js";import"./chunk-ZOPYAOUP.js";import{useShellPrefs as o}from"./chunk-YJRC6IKD.js";import"./chunk-5A7MWTXX.js";import"./chunk-OGXU7QFW.js";import"./chunk-XJYXKO7K.js";import"./chunk-AA4TMQOS.js";import"./chunk-AFYQTVZO.js";import"./chunk-HZZNJHRH.js";import"./chunk-X4FJ54PP.js";import"./chunk-D65T4H6J.js";import"./chunk-3YTHR7IC.js";import"./chunk-YKZHOXI4.js";import{useState as l,useEffect as c,useCallback as d}from"react";import{jsx as m,jsxs as p,Fragment as h}from"react/jsx-runtime";var f="weather_city",u="weather_appearance",y={useFahrenheit:!1,showLocalTime:!0,use24Hour:!1};function g(){const e="undefined"!=typeof localStorage?localStorage.getItem(f):null;if(e&&a[e])return e;try{const e=JSON.parse(localStorage.getItem("weather_cities")||"");if(Array.isArray(e)&&e[0]&&a[e[0]])return localStorage.setItem(f,e[0]),e[0]}catch{}return function(){try{const e=Intl.DateTimeFormat().resolvedOptions().timeZone;for(const[t,r]of Object.entries(a))if(r.tz===e)return t}catch{}return"London"}()}var x=r;function b(e,t=!1){try{if(t){const t=new Intl.DateTimeFormat("en-US",{timeZone:e,hour:"numeric",minute:"2-digit",hour12:!1}).formatToParts(/* @__PURE__ */new Date),a=parseInt(t.find(e=>"hour"===e.type)?.value||"0"),r=parseInt(t.find(e=>"minute"===e.type)?.value||"0");return`${String(a).padStart(2,"0")}:${String(r).padStart(2,"0")}`}const a=new Intl.DateTimeFormat("en-US",{timeZone:e,hour:"numeric",minute:"2-digit",hour12:!0}).formatToParts(/* @__PURE__ */new Date),r=parseInt(a.find(e=>"hour"===e.type)?.value||"12"),n=parseInt(a.find(e=>"minute"===e.type)?.value||"0"),i=a.find(e=>"dayPeriod"===e.type)?.value||"";return`${r}:${String(n).padStart(2,"0")} ${i}`}catch{return""}}function w(){/* @__PURE__ */
1
+ import{fetchCityWeather as e,getCondition as t,AVAILABLE_CITIES as a,toFahrenheit as r}from"./chunk-FBDZGO3V.js";import{loadAppearance as n,WidgetSettingsModal as i}from"./chunk-SVO3ES2E.js";import{useWidgetSettings as s}from"./chunk-N6STBYXR.js";import"./chunk-DSSLOQDW.js";import"./chunk-KVOFUFPP.js";import{useShellPrefs as o}from"./chunk-CIXQKCFA.js";import"./chunk-5A7MWTXX.js";import"./chunk-OGXU7QFW.js";import"./chunk-ZAE6ROV7.js";import"./chunk-AA4TMQOS.js";import"./chunk-AFYQTVZO.js";import"./chunk-HZZNJHRH.js";import"./chunk-X4FJ54PP.js";import"./chunk-D65T4H6J.js";import"./chunk-J3LIIIHJ.js";import"./chunk-C3QOHMR6.js";import"./chunk-YKZHOXI4.js";import{useState as l,useEffect as c,useCallback as d}from"react";import{jsx as m,jsxs as p,Fragment as h}from"react/jsx-runtime";var f="weather_city",u="weather_appearance",y={useFahrenheit:!1,showLocalTime:!0,use24Hour:!1};function g(){const e="undefined"!=typeof localStorage?localStorage.getItem(f):null;if(e&&a[e])return e;try{const e=JSON.parse(localStorage.getItem("weather_cities")||"");if(Array.isArray(e)&&e[0]&&a[e[0]])return localStorage.setItem(f,e[0]),e[0]}catch{}return function(){try{const e=Intl.DateTimeFormat().resolvedOptions().timeZone;for(const[t,r]of Object.entries(a))if(r.tz===e)return t}catch{}return"London"}()}var x=r;function b(e,t=!1){try{if(t){const t=new Intl.DateTimeFormat("en-US",{timeZone:e,hour:"numeric",minute:"2-digit",hour12:!1}).formatToParts(/* @__PURE__ */new Date),a=parseInt(t.find(e=>"hour"===e.type)?.value||"0"),r=parseInt(t.find(e=>"minute"===e.type)?.value||"0");return`${String(a).padStart(2,"0")}:${String(r).padStart(2,"0")}`}const a=new Intl.DateTimeFormat("en-US",{timeZone:e,hour:"numeric",minute:"2-digit",hour12:!0}).formatToParts(/* @__PURE__ */new Date),r=parseInt(a.find(e=>"hour"===e.type)?.value||"12"),n=parseInt(a.find(e=>"minute"===e.type)?.value||"0"),i=a.find(e=>"dayPeriod"===e.type)?.value||"";return`${r}:${String(n).padStart(2,"0")} ${i}`}catch{return""}}function w(){/* @__PURE__ */
2
2
  return p("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[
3
3
  /* @__PURE__ */m("div",{className:"absolute -top-5 -right-5 w-24 h-24",style:{animation:"wx-sun-rays 70s linear infinite"},children:/* @__PURE__ */m("svg",{viewBox:"0 0 100 100",className:"w-full h-full",children:Array.from({length:12}).map((e,t)=>/* @__PURE__ */m("rect",{x:49,y:3,width:2,height:14,rx:1,fill:"rgba(255, 232, 130, 0.55)",transform:`rotate(${30*t} 50 50)`},t))})}),
4
4
  /* @__PURE__ */m("div",{className:"absolute top-1 right-1 w-10 h-10 rounded-full",style:{background:"radial-gradient(circle at 35% 35%, #fff8cc 0%, #ffd84a 55%, #ff9e2a 100%)",boxShadow:"0 0 18px 5px rgba(255, 200, 80, 0.55)",animation:"wx-sun-pulse 4.5s ease-in-out infinite"}})]})}function v(){const e=Array.from({length:16}).map((e,t)=>({left:(53*t+11)%95+"%",top:(37*t+9)%78+"%",size:1+13*t%3,delay:.41*t%4+"s",duration:2.5+7*t%5*.6+"s"}));/* @__PURE__ */
@@ -25,36 +25,36 @@ return p("div",{className:"absolute inset-0 overflow-hidden pointer-events-none"
25
25
  /* @__PURE__ */m("div",{className:"absolute inset-0 bg-white",style:{animation:"wx-flash 6s ease-out infinite"}}),
26
26
  /* @__PURE__ */m("div",{className:"absolute inset-y-0 right-1/3 flex items-center justify-center pointer-events-none",style:{animation:"wx-bolt 6s ease-out infinite"},children:/* @__PURE__ */m("svg",{viewBox:"0 0 18 60",className:"h-4/5",style:{filter:"drop-shadow(0 0 6px rgba(255, 240, 150, 0.95)) drop-shadow(0 0 14px rgba(255, 220, 90, 0.7))"},children:/* @__PURE__ */m("path",{d:"M11 0 L2 28 L8 30 L4 60 L16 24 L9 22 Z",fill:"rgba(255, 250, 200, 0.98)",stroke:"rgba(255, 255, 255, 0.9)",strokeWidth:.3})})})]})}function $(){/* @__PURE__ */
27
27
  return m("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:Array.from({length:4}).map((e,t)=>/* @__PURE__ */m("div",{className:"absolute left-0 right-0",style:{top:10+22*t+"%",height:"14px",background:"linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.55) 50%, rgba(255,255,255,0) 100%)",filter:"blur(2px)",animation:`wx-fog-drift ${10+3*t}s ease-in-out ${.7*t}s infinite alternate`}},t))})}function I({code:e,isDay:t}){return 0===e||1===e?/* @__PURE__ */m(t?w:v,{}):2===e?/* @__PURE__ */p(h,{children:[/* @__PURE__ */m(t?w:v,{}),
28
- /* @__PURE__ */m(k,{tone:t?"light":"dark"})]}):3===e?/* @__PURE__ */m(k,{tone:t?"light":"dark"}):45===e||48===e?/* @__PURE__ */m($,{}):[51,53,61,80,81].includes(e)?/* @__PURE__ */m(N,{}):[55,63,65,82].includes(e)?/* @__PURE__ */m(N,{heavy:!0}):[71,73,75].includes(e)?/* @__PURE__ */m(S,{}):[95,96,99].includes(e)?/* @__PURE__ */m(j,{}):null}function T(){const[r,w]=l(g),[v,k]=l(()=>n(u)),[N,S]=l(null),[j,$]=l(!0),[,T]=l(0);c(()=>{const e=setInterval(()=>T(e=>e+1),6e4);return()=>clearInterval(e)},[]);const[O,A]=l(!1),[F,C]=l(r),[D,H]=l(v),{prefs:L,save:X}=o(),Z={...y,...L.weather_prefs??{}},[z,P]=l(Z);s(d(()=>{C(r),H({...v}),P({...Z}),A(!0)},[r,v,Z])),c(()=>{let t=!1;return $(!0),e(r).then(e=>{t||(S(e),$(!1))}),()=>{t=!0}},[r]);const B=e=>Z.useFahrenheit?`${x(e)}°F`:`${e}°`;if(j&&!N)/* @__PURE__ */
28
+ /* @__PURE__ */m(k,{tone:t?"light":"dark"})]}):3===e?/* @__PURE__ */m(k,{tone:t?"light":"dark"}):45===e||48===e?/* @__PURE__ */m($,{}):[51,53,61,80,81].includes(e)?/* @__PURE__ */m(N,{}):[55,63,65,82].includes(e)?/* @__PURE__ */m(N,{heavy:!0}):[71,73,75].includes(e)?/* @__PURE__ */m(S,{}):[95,96,99].includes(e)?/* @__PURE__ */m(j,{}):null}function F(){const[r,w]=l(g),[v,k]=l(()=>n(u)),[N,S]=l(null),[j,$]=l(!0),[,F]=l(0);c(()=>{const e=setInterval(()=>F(e=>e+1),6e4);return()=>clearInterval(e)},[]);const[O,A]=l(!1),[T,C]=l(r),[H,D]=l(v),{prefs:L,save:X}=o(),z={...y,...L.weather_prefs??{}},[Z,B]=l(z);s(d(()=>{C(r),D({...v}),B({...z}),A(!0)},[r,v,z])),c(()=>{let t=!1;return $(!0),e(r).then(e=>{t||(S(e),$(!1))}),()=>{t=!0}},[r]);const P=e=>z.useFahrenheit?`${x(e)}°F`:`${e}°`;if(j&&!N)/* @__PURE__ */
29
29
  return m("div",{className:"flex items-center justify-center h-full bg-gradient-to-b from-sky-400 to-blue-500 rounded-lg text-white/80 text-xs",style:{minHeight:110},children:"Loading…"});if(!N)/* @__PURE__ */
30
- return m("div",{className:"flex items-center justify-center h-full bg-slate-700 rounded-lg text-white/80 text-xs",style:{minHeight:110},children:"Couldn't load weather"});const[J,Y,M]=t(N.code,N.isDay);/* @__PURE__ */
30
+ return m("div",{className:"flex items-center justify-center h-full bg-slate-700 rounded-lg text-white/80 text-xs",style:{minHeight:110},children:"Couldn't load weather"});const[J,M,Q]=t(N.code,N.isDay);/* @__PURE__ */
31
31
  return p(h,{children:[
32
32
  /* @__PURE__ */m("style",{children:"\n@keyframes wx-rain-a { 0% { transform: translate(0,-20px); opacity: 0; } 10% { opacity: 0.95; } 100% { transform: translate(8px,140px); opacity: 0; } }\n@keyframes wx-rain-b { 0% { transform: translate(0,-20px); opacity: 0; } 12% { opacity: 0.85; } 100% { transform: translate(12px,140px); opacity: 0; } }\n@keyframes wx-rain-c { 0% { transform: translate(0,-20px); opacity: 0; } 10% { opacity: 1; } 100% { transform: translate(5px,140px); opacity: 0; } }\n@keyframes wx-snow-a { 0% { transform: translate(0,-12px) rotate(0deg); opacity: 0; } 10% { opacity: 0.9; } 50% { transform: translate(10px,55px) rotate(180deg); } 100% { transform: translate(-4px,140px) rotate(360deg); opacity: 0; } }\n@keyframes wx-snow-b { 0% { transform: translate(0,-12px) rotate(0deg); opacity: 0; } 10% { opacity: 0.85; } 50% { transform: translate(-12px,55px) rotate(-180deg); } 100% { transform: translate(6px,140px) rotate(-360deg); opacity: 0; } }\n@keyframes wx-snow-c { 0% { transform: translate(0,-12px); opacity: 0; } 10% { opacity: 0.7; } 100% { transform: translate(2px,140px); opacity: 0; } }\n@keyframes wx-drift-cloud { 0% { transform: translateX(-40%); } 100% { transform: translateX(140%); } }\n@keyframes wx-twinkle { 0%, 100% { opacity: 0.25; transform: scale(1); } 50% { opacity: 1; transform: scale(1.6); } }\n@keyframes wx-flash { 0%, 86%, 100% { opacity: 0; } 87% { opacity: 0.95; } 88% { opacity: 0.15; } 89% { opacity: 0.85; } 90% { opacity: 0; } }\n@keyframes wx-bolt { 0%, 86%, 90%, 100% { opacity: 0; } 87% { opacity: 1; } 89% { opacity: 0.85; } }\n@keyframes wx-sun-pulse { 0%, 100% { transform: scale(1); opacity: 0.65; } 50% { transform: scale(1.12); opacity: 0.95; } }\n@keyframes wx-sun-rays { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }\n@keyframes wx-fog-drift { 0% { transform: translateX(-25%); opacity: 0.3; } 50% { opacity: 0.65; } 100% { transform: translateX(25%); opacity: 0.3; } }\n@keyframes wx-shooting-star { 0%, 95% { opacity: 0; transform: translate(0,0) scale(0); } 96% { opacity: 1; transform: translate(0,0) scale(1); } 100% { opacity: 0; transform: translate(40px,30px) scale(1); } }\n"}),
33
- /* @__PURE__ */m("div",{className:"rounded-lg overflow-hidden",style:{backgroundColor:`rgba(15, 23, 42, ${v.activeOpacity/100})`,backdropFilter:v.activeBlur>0?`blur(${v.activeBlur}px)`:void 0},children:/* @__PURE__ */p("div",{className:`relative rounded-lg overflow-hidden text-white bg-gradient-to-br ${M}`,style:{height:110},children:[
33
+ /* @__PURE__ */m("div",{className:"rounded-lg overflow-hidden",style:{backgroundColor:`rgba(15, 23, 42, ${v.activeOpacity/100})`,backdropFilter:v.activeBlur>0?`blur(${v.activeBlur}px)`:void 0},children:/* @__PURE__ */p("div",{className:`relative rounded-lg overflow-hidden text-white bg-gradient-to-br ${Q}`,style:{height:110},children:[
34
34
  /* @__PURE__ */m(I,{code:N.code,isDay:N.isDay}),
35
35
  /* @__PURE__ */p("div",{className:"relative z-10 px-3 py-2.5 flex flex-col h-full justify-between",children:[
36
36
  /* @__PURE__ */p("div",{className:"flex items-start justify-between gap-2",children:[
37
37
  /* @__PURE__ */p("div",{className:"min-w-0 flex-1",children:[
38
- /* @__PURE__ */m("div",{className:"text-base font-semibold leading-tight truncate drop-shadow-sm",children:N.city}),Z.showLocalTime&&/* @__PURE__ */m("div",{className:"text-[10px] opacity-90 leading-tight tabular-nums drop-shadow-sm",children:b(N.timezone,Z.use24Hour)})]}),
39
- /* @__PURE__ */m("div",{className:"text-3xl font-extralight leading-none tracking-tight tabular-nums shrink-0 drop-shadow-sm",children:B(N.temp)})]}),
38
+ /* @__PURE__ */m("div",{className:"text-base font-semibold leading-tight truncate drop-shadow-sm",children:N.city}),z.showLocalTime&&/* @__PURE__ */m("div",{className:"text-[10px] opacity-90 leading-tight tabular-nums drop-shadow-sm",children:b(N.timezone,z.use24Hour)})]}),
39
+ /* @__PURE__ */m("div",{className:"text-3xl font-extralight leading-none tracking-tight tabular-nums shrink-0 drop-shadow-sm",children:P(N.temp)})]}),
40
40
  /* @__PURE__ */p("div",{className:"flex items-end justify-between gap-2",children:[
41
41
  /* @__PURE__ */p("div",{className:"flex items-center gap-1.5 min-w-0",children:[
42
- /* @__PURE__ */m("span",{className:"text-lg leading-none drop-shadow-sm",children:Y}),
42
+ /* @__PURE__ */m("span",{className:"text-lg leading-none drop-shadow-sm",children:M}),
43
43
  /* @__PURE__ */m("span",{className:"text-[11px] font-medium drop-shadow-sm truncate",children:J})]}),
44
- /* @__PURE__ */p("span",{className:"text-[10px] opacity-90 tabular-nums drop-shadow-sm shrink-0",children:["H:",B(N.high)," L:",B(N.low)]})]})]})]})}),
45
- /* @__PURE__ */p(i,{open:O,onClose:()=>A(!1),title:"Weather Settings",appearance:D,onAppearanceChange:H,onSave:()=>{w(F),k(D),X({weather_prefs:z}),localStorage.setItem(f,F),localStorage.setItem(u,JSON.stringify(D)),A(!1)},children:[
44
+ /* @__PURE__ */p("span",{className:"text-[10px] opacity-90 tabular-nums drop-shadow-sm shrink-0",children:["H:",P(N.high)," L:",P(N.low)]})]})]})]})}),
45
+ /* @__PURE__ */p(i,{open:O,onClose:()=>A(!1),title:"Weather Settings",appearance:H,onAppearanceChange:D,onSave:()=>{w(T),k(H),X({weather_prefs:Z}),localStorage.setItem(f,T),localStorage.setItem(u,JSON.stringify(H)),A(!1)},children:[
46
46
  /* @__PURE__ */m("div",{className:"space-y-3",children:/* @__PURE__ */p("div",{children:[
47
47
  /* @__PURE__ */m("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Display"}),
48
48
  /* @__PURE__ */p("div",{className:"flex items-center gap-3 mb-2",children:[
49
49
  /* @__PURE__ */m("span",{className:"text-sm text-gray-600 w-24",children:"Temperature"}),
50
- /* @__PURE__ */m("div",{className:"flex gap-1",children:[{key:!1,label:"°C"},{key:!0,label:"°F"}].map(e=>/* @__PURE__ */m("button",{onClick:()=>P(t=>({...t,useFahrenheit:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(z.useFahrenheit===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
50
+ /* @__PURE__ */m("div",{className:"flex gap-1",children:[{key:!1,label:"°C"},{key:!0,label:"°F"}].map(e=>/* @__PURE__ */m("button",{onClick:()=>B(t=>({...t,useFahrenheit:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(Z.useFahrenheit===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
51
51
  /* @__PURE__ */p("div",{className:"flex items-center gap-3 mb-2",children:[
52
52
  /* @__PURE__ */m("span",{className:"text-sm text-gray-600 w-24",children:"Time Format"}),
53
- /* @__PURE__ */m("div",{className:"flex gap-1",children:[{key:!1,label:"AM/PM"},{key:!0,label:"24H"}].map(e=>/* @__PURE__ */m("button",{onClick:()=>P(t=>({...t,use24Hour:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(z.use24Hour===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
53
+ /* @__PURE__ */m("div",{className:"flex gap-1",children:[{key:!1,label:"AM/PM"},{key:!0,label:"24H"}].map(e=>/* @__PURE__ */m("button",{onClick:()=>B(t=>({...t,use24Hour:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(Z.use24Hour===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
54
54
  /* @__PURE__ */p("label",{className:"flex items-center gap-2 cursor-pointer",children:[
55
- /* @__PURE__ */m("input",{type:"checkbox",checked:z.showLocalTime,onChange:e=>P(t=>({...t,showLocalTime:e.target.checked})),className:"rounded border-gray-300 text-blue-600 h-3.5 w-3.5"}),
55
+ /* @__PURE__ */m("input",{type:"checkbox",checked:Z.showLocalTime,onChange:e=>B(t=>({...t,showLocalTime:e.target.checked})),className:"rounded border-gray-300 text-blue-600 h-3.5 w-3.5"}),
56
56
  /* @__PURE__ */m("span",{className:"text-sm text-gray-600",children:"Show local time"})]})]})}),
57
57
  /* @__PURE__ */p("div",{children:[
58
58
  /* @__PURE__ */m("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"City"}),
59
- /* @__PURE__ */m("select",{value:F,onChange:e=>C(e.target.value),className:"w-full bg-gray-50 border border-gray-200 rounded px-2 py-1.5 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:Object.keys(a).map(e=>/* @__PURE__ */m("option",{value:e,children:e},e))}),
60
- /* @__PURE__ */m("p",{className:"mt-1 text-[10px] text-gray-400",children:"Auto-detected from your timezone; change if needed."})]})]})]})}export{T as default};
59
+ /* @__PURE__ */m("select",{value:T,onChange:e=>C(e.target.value),className:"w-full bg-gray-50 border border-gray-200 rounded px-2 py-1.5 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:Object.keys(a).map(e=>/* @__PURE__ */m("option",{value:e,children:e},e))}),
60
+ /* @__PURE__ */m("p",{className:"mt-1 text-[10px] text-gray-400",children:"Auto-detected from your timezone; change if needed."})]})]})]})}export{F as default};
@@ -1,16 +1,16 @@
1
- import{AVAILABLE_CITIES as e,fetchCityWeather as t,getCondition as a,toFahrenheit as r}from"./chunk-FBDZGO3V.js";import{loadAppearance as n,WidgetSettingsModal as i}from"./chunk-AI6HQ55O.js";import{useWidgetSettings as s}from"./chunk-TZ2BPFCT.js";import"./chunk-DSSLOQDW.js";import"./chunk-ZOPYAOUP.js";import{useShellPrefs as c}from"./chunk-YJRC6IKD.js";import"./chunk-5A7MWTXX.js";import"./chunk-OGXU7QFW.js";import"./chunk-XJYXKO7K.js";import"./chunk-AA4TMQOS.js";import"./chunk-AFYQTVZO.js";import"./chunk-HZZNJHRH.js";import"./chunk-X4FJ54PP.js";import"./chunk-D65T4H6J.js";import"./chunk-3YTHR7IC.js";import"./chunk-YKZHOXI4.js";import{useState as l,useEffect as o,useCallback as m}from"react";import{jsxs as h,Fragment as d,jsx as p}from"react/jsx-runtime";var u="world_clock_appearance",g=["London","Shanghai","New York"];function x(){const{prefs:x,save:y}=c(),[b,f]=l(()=>n(u)),[k,v]=l(!1),[N,j]=l([]),[w,F]=l(b),O={useFahrenheit:!!x.weather_prefs?.useFahrenheit},[C,S]=l(O),[T,D]=l(()=>/* @__PURE__ */new Date);o(()=>{const e=setInterval(()=>D(/* @__PURE__ */new Date),3e4);return()=>clearInterval(e)},[]);const A=Object.fromEntries(Object.entries(e).map(([e,t])=>[t.tz,e])),H=x.world_clocks,I=(()=>{if(!Array.isArray(H)||0===H.length)return g;const t=[];for(const a of H){const r=e[a]?a:A[a];r&&!t.includes(r)&&t.push(r)}return t.length?t:g})(),[P,Z]=l({}),[X,Y]=l(!0);o(()=>{let e=!1;return Y(!0),(async()=>{const a={};await Promise.all(I.map(async e=>{const r=await t(e);r&&(a[e]=r)})),e||(Z(a),Y(!1))})(),()=>{e=!0}},[I.join(",")]),s(m(()=>{j([...I]),F({...b}),S({...O}),v(!0)},[I.join(","),b,O.useFahrenheit]));const _=e=>O.useFahrenheit?`${r(e)}°`:`${e}°`;/* @__PURE__ */
1
+ import{AVAILABLE_CITIES as e,fetchCityWeather as t,getCondition as r,toFahrenheit as a}from"./chunk-FBDZGO3V.js";import{loadAppearance as n,WidgetSettingsModal as i}from"./chunk-SVO3ES2E.js";import{useWidgetSettings as s}from"./chunk-N6STBYXR.js";import"./chunk-DSSLOQDW.js";import"./chunk-KVOFUFPP.js";import{useShellPrefs as c}from"./chunk-CIXQKCFA.js";import"./chunk-5A7MWTXX.js";import"./chunk-OGXU7QFW.js";import"./chunk-ZAE6ROV7.js";import"./chunk-AA4TMQOS.js";import"./chunk-AFYQTVZO.js";import"./chunk-HZZNJHRH.js";import"./chunk-X4FJ54PP.js";import"./chunk-D65T4H6J.js";import"./chunk-J3LIIIHJ.js";import"./chunk-C3QOHMR6.js";import"./chunk-YKZHOXI4.js";import{useState as l,useEffect as o,useCallback as m}from"react";import{jsxs as h,Fragment as d,jsx as p}from"react/jsx-runtime";var u="world_clock_appearance",g=["London","Shanghai","New York"];function x(){const{prefs:x,save:y}=c(),[b,f]=l(()=>n(u)),[k,v]=l(!1),[N,j]=l([]),[w,F]=l(b),O={useFahrenheit:!!x.weather_prefs?.useFahrenheit},[S,C]=l(O),[A,D]=l(()=>/* @__PURE__ */new Date);o(()=>{const e=setInterval(()=>D(/* @__PURE__ */new Date),3e4);return()=>clearInterval(e)},[]);const I=Object.fromEntries(Object.entries(e).map(([e,t])=>[t.tz,e])),T=x.world_clocks,H=(()=>{if(!Array.isArray(T)||0===T.length)return g;const t=[];for(const r of T){const a=e[r]?r:I[r];a&&!t.includes(a)&&t.push(a)}return t.length?t:g})(),[P,X]=l({}),[Z,_]=l(!0);o(()=>{let e=!1;return _(!0),(async()=>{const r={};await Promise.all(H.map(async e=>{const a=await t(e);a&&(r[e]=a)})),e||(X(r),_(!1))})(),()=>{e=!0}},[H.join(",")]),s(m(()=>{j([...H]),F({...b}),C({...O}),v(!0)},[H.join(","),b,O.useFahrenheit]));const J=e=>O.useFahrenheit?`${a(e)}°`:`${e}°`;/* @__PURE__ */
2
2
  return h(d,{children:[
3
- /* @__PURE__ */p("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${b.activeOpacity/100})`,backdropFilter:b.activeBlur>0?`blur(${b.activeBlur}px)`:void 0},children:/* @__PURE__ */h("div",{className:"divide-y divide-gray-200",children:[X&&I.every(e=>!P[e])&&/* @__PURE__ */p("div",{className:"px-3 py-6 text-center text-xs text-gray-500",children:"Loading…"}),I.map(t=>{const r=P[t],n=e[t]?.tz??"UTC",{time:i,ampm:s}=function(e,t){try{const a=new Intl.DateTimeFormat("en-US",{timeZone:e,hour:"numeric",minute:"2-digit",hour12:!0}).formatToParts(t),r=a.find(e=>"hour"===e.type)?.value||"12";return{time:`${r}:${a.find(e=>"minute"===e.type)?.value||"00"}`,ampm:(a.find(e=>"dayPeriod"===e.type)?.value||"").toUpperCase()}}catch{return{time:"",ampm:""}}}(n,T);if(!r)/* @__PURE__ */
3
+ /* @__PURE__ */p("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${b.activeOpacity/100})`,backdropFilter:b.activeBlur>0?`blur(${b.activeBlur}px)`:void 0},children:/* @__PURE__ */h("div",{className:"divide-y divide-gray-200",children:[Z&&H.every(e=>!P[e])&&/* @__PURE__ */p("div",{className:"px-3 py-6 text-center text-xs text-gray-500",children:"Loading…"}),H.map(t=>{const a=P[t],n=e[t]?.tz??"UTC",{time:i,ampm:s}=function(e,t){try{const r=new Intl.DateTimeFormat("en-US",{timeZone:e,hour:"numeric",minute:"2-digit",hour12:!0}).formatToParts(t),a=r.find(e=>"hour"===e.type)?.value||"12";return{time:`${a}:${r.find(e=>"minute"===e.type)?.value||"00"}`,ampm:(r.find(e=>"dayPeriod"===e.type)?.value||"").toUpperCase()}}catch{return{time:"",ampm:""}}}(n,A);if(!a)/* @__PURE__ */
4
4
  return h("div",{className:"px-4 py-3",children:[
5
5
  /* @__PURE__ */h("div",{className:"flex items-baseline justify-between gap-2",children:[
6
6
  /* @__PURE__ */p("span",{className:"text-[15px] font-semibold tracking-tight text-gray-900 truncate",children:t}),
7
7
  /* @__PURE__ */h("span",{className:"tabular-nums text-[13px] font-medium text-gray-500",children:[i,
8
8
  /* @__PURE__ */p("span",{className:"text-[9px] ml-0.5 opacity-70",children:s})]})]}),
9
- /* @__PURE__ */p("div",{className:"text-[11px] text-gray-400 mt-1",children:"Loading weather…"})]},t);const[c,l]=a(r.code,r.isDay);/* @__PURE__ */
9
+ /* @__PURE__ */p("div",{className:"text-[11px] text-gray-400 mt-1",children:"Loading weather…"})]},t);const[c,l]=r(a.code,a.isDay);/* @__PURE__ */
10
10
  return h("div",{className:"px-4 py-3",children:[
11
11
  /* @__PURE__ */h("div",{className:"flex items-baseline justify-between gap-2",children:[
12
12
  /* @__PURE__ */p("span",{className:"text-[15px] font-semibold tracking-tight text-gray-900 truncate",children:t}),
13
- /* @__PURE__ */p("span",{className:"text-[26px] font-extralight leading-none tabular-nums tracking-tight text-gray-900 shrink-0",children:_(r.temp)})]}),
13
+ /* @__PURE__ */p("span",{className:"text-[26px] font-extralight leading-none tabular-nums tracking-tight text-gray-900 shrink-0",children:J(a.temp)})]}),
14
14
  /* @__PURE__ */h("div",{className:"flex items-center justify-between gap-2 mt-1.5 text-[11px]",children:[
15
15
  /* @__PURE__ */h("div",{className:"flex items-center gap-1.5 min-w-0 text-gray-500",children:[
16
16
  /* @__PURE__ */p("span",{className:"text-base leading-none shrink-0",children:l}),
@@ -18,13 +18,13 @@ return h("div",{className:"px-4 py-3",children:[
18
18
  /* @__PURE__ */p("span",{className:"text-[9px] font-medium ml-0.5 opacity-70",children:s})]}),
19
19
  /* @__PURE__ */p("span",{className:"text-gray-300 shrink-0",children:"·"}),
20
20
  /* @__PURE__ */p("span",{className:"truncate",children:c})]}),
21
- /* @__PURE__ */h("span",{className:"tabular-nums text-gray-500 shrink-0",children:["H:",_(r.high)," L:",_(r.low)]})]})]},t)})]})}),
22
- /* @__PURE__ */h(i,{open:k,onClose:()=>v(!1),title:"World Clock Settings",appearance:w,onAppearanceChange:F,onSave:()=>{0!==N.length&&(y({world_clocks:N,weather_prefs:{...x.weather_prefs??{},useFahrenheit:C.useFahrenheit}}),f(w),localStorage.setItem(u,JSON.stringify(w)),v(!1))},children:[
21
+ /* @__PURE__ */h("span",{className:"tabular-nums text-gray-500 shrink-0",children:["H:",J(a.high)," L:",J(a.low)]})]})]},t)})]})}),
22
+ /* @__PURE__ */h(i,{open:k,onClose:()=>v(!1),title:"World Clock Settings",appearance:w,onAppearanceChange:F,onSave:()=>{0!==N.length&&(y({world_clocks:N,weather_prefs:{...x.weather_prefs??{},useFahrenheit:S.useFahrenheit}}),f(w),localStorage.setItem(u,JSON.stringify(w)),v(!1))},children:[
23
23
  /* @__PURE__ */h("div",{children:[
24
24
  /* @__PURE__ */p("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Display"}),
25
25
  /* @__PURE__ */h("div",{className:"flex items-center gap-3 mb-2",children:[
26
26
  /* @__PURE__ */p("span",{className:"text-sm text-gray-600 w-24",children:"Temperature"}),
27
- /* @__PURE__ */p("div",{className:"flex gap-1",children:[{key:!1,label:"°C"},{key:!0,label:"°F"}].map(e=>/* @__PURE__ */p("button",{onClick:()=>S(t=>({...t,useFahrenheit:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(C.useFahrenheit===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
27
+ /* @__PURE__ */p("div",{className:"flex gap-1",children:[{key:!1,label:"°C"},{key:!0,label:"°F"}].map(e=>/* @__PURE__ */p("button",{onClick:()=>C(t=>({...t,useFahrenheit:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(S.useFahrenheit===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
28
28
  /* @__PURE__ */p("p",{className:"text-[10px] text-gray-400 mt-1",children:"Shared with the Weather widget."})]}),
29
29
  /* @__PURE__ */h("div",{children:[
30
30
  /* @__PURE__ */p("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Cities"}),
@@ -41,7 +41,8 @@ interface BuiltinAppInfo {
41
41
  name: string;
42
42
  /** App version, independent of the package version. */
43
43
  version: string;
44
- /** One-line summary shown in the About dialog. */
44
+ /** One-line summary, in English. The About dialog reads the string catalog's
45
+ * line for the app (`aboutApp.<id>`), which is this one with no provider. */
45
46
  description: string;
46
47
  /** Registry route — used to look up the consumer-registered nav icon. */
47
48
  route: string;
@@ -184,7 +185,8 @@ interface OpenAttachmentOptions {
184
185
  * Reject with an Error whose message the reader should see.
185
186
  */
186
187
  fetchBlob?: (att: OpenableAttachment) => Promise<Blob>;
187
- /** Placeholder headline while `fetchBlob` runs. Default: "LOADING FILE". */
188
+ /** Placeholder headline while `fetchBlob` runs. Default: "LOADING FILE",
189
+ * from the string catalog (`attachment.loading`). */
188
190
  loadingMessage?: string;
189
191
  }
190
192
  /** Which viewer renders this file, or `null` for one neither app can show. */
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{openFilesInTrashMode,setFilesDemoTree}from"../chunk-ILTSTULF.js";export{setBrowserStartUrl}from"../chunk-LWLCNQY7.js";export{BUILTIN_APP_INFO}from"../chunk-4PCIZFDR.js";import"../chunk-C2A4PIGZ.js";import{setPdfPreview as e}from"../chunk-ESL5TDNA.js";export{setPdfPreview}from"../chunk-ESL5TDNA.js";import{setSpreadsheetPreview as t}from"../chunk-VTVSMRFX.js";export{setSpreadsheetPreview}from"../chunk-VTVSMRFX.js";import"../chunk-TZ2BPFCT.js";import"../chunk-DSSLOQDW.js";import"../chunk-ZOPYAOUP.js";import"../chunk-MFXG5BWL.js";import{toast_default as o}from"../chunk-L3U2R7DH.js";import"../chunk-YJRC6IKD.js";import"../chunk-5A7MWTXX.js";import"../chunk-OGXU7QFW.js";import"../chunk-XJYXKO7K.js";import"../chunk-AA4TMQOS.js";import"../chunk-AFYQTVZO.js";import"../chunk-HZZNJHRH.js";import"../chunk-X4FJ54PP.js";import"../chunk-D65T4H6J.js";import"../chunk-3YTHR7IC.js";import"../chunk-YKZHOXI4.js";import{lazy as i}from"react";function n(e){const t=/\.([a-z0-9]+)(?:[?#].*)?$/i.exec((e||"").trim());return t?t[1].toLowerCase():""}var r=/* @__PURE__ */new Set(["csv","tsv"]),s=/* @__PURE__ */new Set(["xlsx","xls","xlsm","ods"]),a=/* @__PURE__ */new Set(["png","jpg","jpeg","gif","webp","bmp","svg","avif"]),l=/* @__PURE__ */new Set(["step","stp","stl","obj","gltf","glb","3mf","iges","igs"]);function c(e){const t=n(e);return"pdf"===t?"pdf":"dxf"===t?"dxf":r.has(t)?"csv":a.has(t)?"image":l.has(t)?"3d":null}function p(e){window.open(e,"_blank","noopener,noreferrer")}async function m(e,t,o){if(t.fetchBlob)return(await t.fetchBlob(o)).text();const i=await fetch(e);if(!i.ok)throw new Error(`fetch failed: ${i.status}`);return i.text()}function u(e,t){return(e instanceof Error?e.message:"")||t}async function h(i,r,a={}){const l=i?.url||"",h=i?.filename||"attachment";if(!l&&!a.fetchBlob)return void o.error("This attachment has no download link.");const d=c(h)??c(l);if("csv"===d){try{t({csv:await m(l,a,i),filename:h}),r("/spreadsheet")}catch{o.error("Could not open the spreadsheet — opening the file instead."),l&&p(l)}return}if(s.has(n(h)||n(l)))return o.error("Spreadsheet preview is unavailable for this file type. Opening the file instead."),void(l&&p(l));if(!d)return l?(o.info("Opening this file outside the app — no viewer can show it here."),void p(l)):void o.error("This attachment has no download link.");if(!a.fetchBlob)return e({url:l,filename:h,kind:d}),void r("/preview");const f=e({filename:h,kind:d,converting:!0,convertingMessage:a.loadingMessage||"LOADING FILE"});r("/preview");try{const e=await a.fetchBlob(i);f.update({url:URL.createObjectURL(e),filename:h,kind:d})}catch(e){f.update({filename:h,kind:d,converting:!1,convertingMessage:u(e,"Failed to load this file.")})}}var d=i(()=>import("../Calculator-AGQQYMMZ.js")),f=i(()=>import("../Spreadsheet-F3VBCPHF.js")),j=i(()=>import("../Weather-7YDUDMCO.js")),w=i(()=>import("../CurrencyConverter-KZPE7ZCC.js")),k=i(()=>import("../PomodoroTimer-LHPV6QXG.js")),g=i(()=>import("../Notepad-LUK2IFHD.js")),v=i(()=>import("../WorldClock-Q2JHBKLS.js")),S=i(()=>import("../Stock-XSDFN7U2.js")),b=i(()=>import("../Preview-5CALO6PW.js")),T=i(()=>import("../PdfViewer-RKRGO7Q2.js")),F=i(()=>import("../Documents-ZD227WZC.js")),P=i(()=>import("../Files-BLGT4RLF.js")),C=i(()=>import("../Browser-MFFTBGEB.js")),L={"/calculator":{component:d,label:"Calculator",size:"sm",allowPinOnTop:!0,utility:!0,widget:!0,dimensions:[280,420]},"/spreadsheet":{component:f,label:"Spreadsheets",size:"2xl",appStyle:!0,multiInstance:!0},"/notepad":{component:g,label:"Notepad",size:"lg",allowPinOnTop:!0,flushBody:!0},"/weather":{component:j,label:"Weather",size:"sm",utility:!0,widget:!0,autoHeight:!0,dimensions:[320,400]},"/currency":{component:w,label:"Currency Converter",size:"sm",utility:!0,widget:!0,autoHeight:!0,dimensions:[320,480]},"/pomodoro":{component:k,label:"Pomodoro Timer",size:"sm",utility:!0,widget:!0,dimensions:[320,600]},"/world-clock":{component:v,label:"World Clock",size:"sm",utility:!0,widget:!0,autoHeight:!0,dimensions:[320,480]},"/stock":{component:S,label:"Stocks",size:"sm",utility:!0,widget:!0,autoHeight:!0,dimensions:[320,360]}},x={"/preview":{component:b,label:"Preview",size:"2xl",appStyle:!0,multiInstance:!0},"/documents":{component:F,label:"Documents",size:"xl",appStyle:!0,multiInstance:!0},"/files":{component:P,label:"Files",size:"xl",appStyle:!0}},y={"/browser":{component:C,label:"Browser",size:"2xl",appStyle:!0,multiInstance:!0}},O={...L,...x,...y};export{C as Browser,d as Calculator,w as CurrencyConverter,F as Documents,P as Files,g as Notepad,T as PdfViewer,k as PomodoroTimer,b as Preview,f as Spreadsheet,S as Stock,j as Weather,v as WorldClock,c as attachmentKind,O as bundledApps,x as documentApps,h as openAttachment,L as utilityApps,y as webApps};
2
+ export{openFilesInTrashMode,setFilesDemoTree}from"../chunk-ILTSTULF.js";export{setBrowserStartUrl}from"../chunk-LWLCNQY7.js";export{BUILTIN_APP_INFO}from"../chunk-CZK2VKIO.js";import"../chunk-C2A4PIGZ.js";import{setPdfPreview as e}from"../chunk-ESL5TDNA.js";export{setPdfPreview}from"../chunk-ESL5TDNA.js";import{setSpreadsheetPreview as t}from"../chunk-VTVSMRFX.js";export{setSpreadsheetPreview}from"../chunk-VTVSMRFX.js";import"../chunk-N6STBYXR.js";import"../chunk-DSSLOQDW.js";import"../chunk-KVOFUFPP.js";import"../chunk-AZURXTRB.js";import{toast_default as o}from"../chunk-3DGTIWZP.js";import"../chunk-CIXQKCFA.js";import"../chunk-5A7MWTXX.js";import"../chunk-OGXU7QFW.js";import"../chunk-ZAE6ROV7.js";import"../chunk-AA4TMQOS.js";import"../chunk-AFYQTVZO.js";import"../chunk-HZZNJHRH.js";import"../chunk-X4FJ54PP.js";import"../chunk-D65T4H6J.js";import{currentShellStrings as r}from"../chunk-J3LIIIHJ.js";import"../chunk-C3QOHMR6.js";import"../chunk-YKZHOXI4.js";import{lazy as n}from"react";function i(e){const t=/\.([a-z0-9]+)(?:[?#].*)?$/i.exec((e||"").trim());return t?t[1].toLowerCase():""}var s=/* @__PURE__ */new Set(["csv","tsv"]),l=/* @__PURE__ */new Set(["xlsx","xls","xlsm","ods"]),a=/* @__PURE__ */new Set(["png","jpg","jpeg","gif","webp","bmp","svg","avif"]),c=/* @__PURE__ */new Set(["step","stp","stl","obj","gltf","glb","3mf","iges","igs"]);function m(e){const t=i(e);return"pdf"===t?"pdf":"dxf"===t?"dxf":s.has(t)?"csv":a.has(t)?"image":c.has(t)?"3d":null}function p(e){window.open(e,"_blank","noopener,noreferrer")}async function u(e,t,o){if(t.fetchBlob)return(await t.fetchBlob(o)).text();const r=await fetch(e);if(!r.ok)throw new Error(`fetch failed: ${r.status}`);return r.text()}function d(e,t){return(e instanceof Error?e.message:"")||t}async function h(n,s,a={}){const c=r().attachment,h=n?.url||"",f=n?.filename||c.fallbackName;if(!h&&!a.fetchBlob)return void o.error(c.noLink);const j=m(f)??m(h);if("csv"===j){try{t({csv:await u(h,a,n),filename:f}),s("/spreadsheet")}catch{o.error(c.spreadsheetFailed),h&&p(h)}return}if(l.has(i(f)||i(h)))return o.error(c.workbookUnavailable),void(h&&p(h));if(!j)return h?(o.info(c.noViewer),void p(h)):void o.error(c.noLink);if(!a.fetchBlob)return e({url:h,filename:f,kind:j}),void s("/preview");const k=e({filename:f,kind:j,converting:!0,convertingMessage:a.loadingMessage||c.loading});s("/preview");try{const e=await a.fetchBlob(n);k.update({url:URL.createObjectURL(e),filename:f,kind:j})}catch(e){k.update({filename:f,kind:j,converting:!1,convertingMessage:d(e,c.loadFailed)})}}var f=n(()=>import("../Calculator-R5OEHQ67.js")),j=n(()=>import("../Spreadsheet-B5Z5MSX4.js")),k=n(()=>import("../Weather-APBCG4TO.js")),w=n(()=>import("../CurrencyConverter-AMXUOQR2.js")),g=n(()=>import("../PomodoroTimer-LE6J2KUU.js")),v=n(()=>import("../Notepad-JLDNTMVB.js")),b=n(()=>import("../WorldClock-2LMZYKWR.js")),S=n(()=>import("../Stock-GWVG2INU.js")),L=n(()=>import("../Preview-2KHLL6NP.js")),T=n(()=>import("../PdfViewer-3SC3LE4U.js")),P=n(()=>import("../Documents-M4HKZAPJ.js")),x=n(()=>import("../Files-OY5GKCXA.js")),y=n(()=>import("../Browser-LZMLL4CZ.js")),C={"/calculator":{component:f,label:"Calculator",size:"sm",allowPinOnTop:!0,utility:!0,widget:!0,dimensions:[280,420]},"/spreadsheet":{component:j,label:"Spreadsheets",size:"2xl",appStyle:!0,multiInstance:!0},"/notepad":{component:v,label:"Notepad",size:"lg",allowPinOnTop:!0,flushBody:!0},"/weather":{component:k,label:"Weather",size:"sm",utility:!0,widget:!0,autoHeight:!0,dimensions:[320,400]},"/currency":{component:w,label:"Currency Converter",size:"sm",utility:!0,widget:!0,autoHeight:!0,dimensions:[320,480]},"/pomodoro":{component:g,label:"Pomodoro Timer",size:"sm",utility:!0,widget:!0,dimensions:[320,600]},"/world-clock":{component:b,label:"World Clock",size:"sm",utility:!0,widget:!0,autoHeight:!0,dimensions:[320,480]},"/stock":{component:S,label:"Stocks",size:"sm",utility:!0,widget:!0,autoHeight:!0,dimensions:[320,360]}},I={"/preview":{component:L,label:"Preview",size:"2xl",appStyle:!0,multiInstance:!0},"/documents":{component:P,label:"Documents",size:"xl",appStyle:!0,multiInstance:!0},"/files":{component:x,label:"Files",size:"xl",appStyle:!0}},O={"/browser":{component:y,label:"Browser",size:"2xl",appStyle:!0,multiInstance:!0}},F={...C,...I,...O};export{y as Browser,f as Calculator,w as CurrencyConverter,P as Documents,x as Files,v as Notepad,T as PdfViewer,g as PomodoroTimer,L as Preview,j as Spreadsheet,S as Stock,k as Weather,b as WorldClock,m as attachmentKind,F as bundledApps,I as documentApps,h as openAttachment,C as utilityApps,O as webApps};