efficient-shell 12.37.0 → 12.37.1

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 (48) hide show
  1. package/dist/{Browser-ZASLQGZ4.js → Browser-L6R53COY.js} +14 -14
  2. package/dist/{Files-JJQEEV4R.js → Files-5EL5Q4B7.js} +129 -129
  3. package/dist/{Notepad-7IR5MNDM.js → Notepad-FIHNDNX3.js} +9 -9
  4. package/dist/{Preview-PRS7KB74.js → Preview-BUCAP4O7.js} +17 -17
  5. package/dist/ai/index.js +1 -1
  6. package/dist/apps/index.js +1 -1
  7. package/dist/bin/media-host-check.js +1 -1
  8. package/dist/bin/ui-check.js +1 -1
  9. package/dist/charts/PieChart.js +1 -1
  10. package/dist/charts/RadarChart.js +1 -1
  11. package/dist/charts/RadialBarChart.js +1 -1
  12. package/dist/charts/SpecChart.js +1 -1
  13. package/dist/charts/TimeSeriesChart.js +1 -1
  14. package/dist/{chunk-3LGNMVW6.js → chunk-3W3FXX42.js} +2 -2
  15. package/dist/chunk-BXZTH7RX.js +1 -0
  16. package/dist/{chunk-DYOFTZOC.js → chunk-CUJA3HBZ.js} +2 -2
  17. package/dist/{chunk-JTMR3EH3.js → chunk-JZY2RBPX.js} +6 -6
  18. package/dist/{chunk-E6PDAYBR.js → chunk-O5UD3ZWM.js} +4 -4
  19. package/dist/{chunk-DGFFDZCY.js → chunk-OZV5P5A7.js} +5 -5
  20. package/dist/{chunk-R76YLWTY.js → chunk-PK4R5S7U.js} +1 -1
  21. package/dist/{chunk-KZQRUVII.js → chunk-TZBNN6HD.js} +5 -5
  22. package/dist/{chunk-EEFUXXYJ.js → chunk-UF76AFFY.js} +13 -13
  23. package/dist/{chunk-LPAOHDUE.js → chunk-WAKWESOR.js} +1 -1
  24. package/dist/{chunk-TBNQZVH2.js → chunk-YFOSWCXT.js} +1 -1
  25. package/dist/{chunk-APGIPXR7.js → chunk-YHABPVWU.js} +2 -2
  26. package/dist/data/Gantt.js +1 -1
  27. package/dist/forms/BrandAssetEditor.js +1 -1
  28. package/dist/forms/DateRangePicker.d.ts +1 -0
  29. package/dist/forms/MediaLibrary.js +1 -1
  30. package/dist/forms/WidthsBar.d.ts +2 -2
  31. package/dist/icons/glyphs/SpinnerIcon.d.ts +1 -1
  32. package/dist/icons/index.js +1 -1
  33. package/dist/index.d.ts +4 -3
  34. package/dist/index.js +61 -61
  35. package/dist/shell/Dialog.d.ts +1 -1
  36. package/dist/shell/EmptyState.d.ts +2 -2
  37. package/dist/shell/LanguageSelect.js +1 -1
  38. package/dist/shell/PageHeader.d.ts +1 -1
  39. package/dist/shell/SettingRow.js +1 -1
  40. package/dist/shell/SidebarActionButton.d.ts +1 -0
  41. package/dist/shell/SortableList.d.ts +1 -1
  42. package/dist/shell/strings.d.ts +4 -4
  43. package/dist/telemetry/index.js +1 -1
  44. package/dist/templates/DashboardTemplate.js +1 -1
  45. package/dist/ui/index.js +1 -1
  46. package/dist/version.js +1 -1
  47. package/package.json +1 -1
  48. package/dist/chunk-PJXHSY5G.js +0 -1
@@ -1,20 +1,20 @@
1
- import{Tree as e,TreeRow as n,TreeGroup as l}from"./chunk-FCWBO7I3.js";import{ImageLightbox as r}from"./chunk-HWJQLLJA.js";import{MarqueeBox as a}from"./chunk-IC72MGON.js";import{EmptyState as i}from"./chunk-3TCGXYUC.js";import{DescriptionList as t}from"./chunk-SACUSHVN.js";import{Drawer as o}from"./chunk-3RX5KCUH.js";import{Breadcrumbs as d}from"./chunk-YM7AWNMY.js";import{ROOT_KEY as s,mediaLibraryMenu as c}from"./chunk-3YCU6V3U.js";import{useMediaMoveItems as u}from"./chunk-JWUNK2PW.js";import{RenameField as m}from"./chunk-QIPO4EVJ.js";import{NativeSelect as p}from"./chunk-KITSIQCV.js";import{MediaUploadGrid as h}from"./chunk-BNPJHOAC.js";import{MediaUsedInList as f}from"./chunk-ZDDMFFQK.js";import{useGridSelection as g}from"./chunk-VLKDWKVR.js";import{useMarquee as v}from"./chunk-OLFYNMTD.js";import{Segmented as k}from"./chunk-HNIIDDLJ.js";import{copyToClipboard as y}from"./chunk-HTHNDX32.js";import{Checkbox_default as b}from"./chunk-CGZBDI6C.js";import{useContextMenu as w,ContextMenu as C}from"./chunk-QMBMK6PP.js";import{Banner as x}from"./chunk-ID35S5Y6.js";import{Input_default as I}from"./chunk-PT4GMPUB.js";import{DropdownMenu as N}from"./chunk-3DSGJIC7.js";import{IconButton_default as D}from"./chunk-SV5RRBVA.js";import{useFileIntake as S,FileIntakeAlert as j}from"./chunk-ITEOA45V.js";import{setModalDragAside as T,modalIdHolding as z}from"./chunk-EIFNESXS.js";import{ColoredBadge as F}from"./chunk-ZGIAMYTI.js";import{Button_default as L}from"./chunk-EVYD6UFQ.js";import{Icon as O}from"./chunk-ISVODSRP.js";import{Tooltip as E}from"./chunk-SOZCWT6I.js";import{buttonClasses as P}from"./chunk-UQYNPYF4.js";import{usePlotWidth as A}from"./chunk-MAFUXCPZ.js";import{useShellStrings as M}from"./chunk-DEJIH3ZQ.js";import{useRef as U,useMemo as R,useCallback as K,useState as B,useEffect as V}from"react";import{jsxs as J,Fragment as H,jsx as W}from"react/jsx-runtime";var Y="application/x-efficient-media-files",Q="application/x-efficient-media-folder",G="application/x-efficient-media-file";function $(e){if(!e||!Array.from(e.types).includes(G))return null;try{const n=JSON.parse(e.getData(G));if(n&&"string"==typeof n.id&&"string"==typeof n.url&&"string"==typeof n.name&&("image"===n.kind||"video"===n.kind))return{id:n.id,url:n.url,kind:n.kind,name:n.name}}catch{}return null}var Z={type:"all",use:"any",sort:"newest"},X={lock:/* @__PURE__ */W(O,{name:"lock","aria-hidden":"true",className:"h-4 w-4"}),folder:/* @__PURE__ */W(O,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),folderOpen:/* @__PURE__ */W(O,{name:"folder-open","aria-hidden":"true",className:"h-4 w-4"}),folderPlus:/* @__PURE__ */W(O,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */W(O,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),upload:/* @__PURE__ */W(O,{name:"upload","aria-hidden":"true",className:"h-4 w-4"}),search:/* @__PURE__ */W(O,{name:"search","aria-hidden":"true",className:"h-4 w-4"}),grid:/* @__PURE__ */W(O,{name:"grid","aria-hidden":"true",className:"h-4 w-4"}),list:/* @__PURE__ */W(O,{name:"list","aria-hidden":"true",className:"h-4 w-4"}),more:/* @__PURE__ */W(O,{name:"more","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */W(O,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */W(O,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */W(O,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),crop:/* @__PURE__ */W(O,{name:"crop","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */W(O,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */W(O,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},q={link:/* @__PURE__ */W(O,{name:"link","aria-hidden":"true",className:"h-3 w-3"}),email:/* @__PURE__ */W(O,{name:"email","aria-hidden":"true",className:"h-3 w-3"}),lock:/* @__PURE__ */W(O,{name:"lock","aria-hidden":"true",className:"h-3 w-3"}),clock:/* @__PURE__ */W(O,{name:"clock","aria-hidden":"true",className:"h-3 w-3"})};function _(O){const{mode:$="manage",layout:_="auto",location:ee,onLocationChange:ne,folders:le,products:re,allFilesCount:ae,trashCount:ie,files:te,query:oe,onQueryChange:de,filters:se=Z,onFiltersChange:ce,extraFilters:ue,view:me="grid",onViewChange:pe,selectedIds:he,onSelectionChange:fe,usedIn:ge,denied:ve={},accept:ke="image/*,video/*",maxSizeBytes:ye,busy:be,progress:we,onUpload:Ce,onNewFolder:xe,onRename:Ie,onMove:Ne,onTrash:De,onDeleteFolder:Se,onRestore:je,onDeleteForever:Te,onEmptyTrash:ze,onReplace:Fe,onCropEdit:Le,onOpenInDesign:Oe,onChoose:Ee,onCancel:Pe,pickNote:Ae,onDragOut:Me,className:Ue=""}=O,Re=M().mediaLibrary,Ke=M().media,Be="pick"===$,Ve=!Be,Je=U(null),He=A(Je,"phone"===_?343:1200),We="phone"===_||"auto"===_&&He<640,Ye=R(()=>function(e=[]){const n=/* @__PURE__ */new Map,l=(e,r)=>{for(const a of e){const e=[...r,a];n.set(a.id,{node:a,path:e}),a.children&&l(a.children,e)}};return l(e,[]),n}(re),[re]),Qe=R(()=>new Map(le.map(e=>[e.id,e])),[le]),Ge=R(()=>{const e=/* @__PURE__ */new Map;for(const n of le){const l=n.parentId&&Qe.has(n.parentId)?n.parentId:null;e.set(l,[...e.get(l)??[],n])}return e},[le,Qe]),$e=K(e=>{const n=[];for(let l=e?Qe.get(e):void 0;l&&(n.unshift(l),!(n.length>le.length));l=l.parentId?Qe.get(l.parentId):void 0);return n},[Qe,le.length]),Ze=K((e,n)=>$e(e).some(e=>e.id===n),[$e]),[Xe,qe]=B(()=>/* @__PURE__ */new Set(["@files"])),_e=e=>qe(n=>{const l=new Set(n);return l.has(e)?l.delete(e):l.add(e),l}),en=K(e=>{qe(n=>e.every(e=>n.has(e))?n:/* @__PURE__ */new Set([...n,...e]))},[]),nn="files"===(ln=ee).place?`files:${ln.folderId??""}`:"products"===ln.place?`products:${ln.nodeId??""}`:"trash";var ln;V(()=>{if("files"===ee.place)en(["@files",...$e(ee.folderId).slice(0,-1).map(e=>e.id)]);else if("products"===ee.place){const e=ee.nodeId?Ye.get(ee.nodeId)?.path??[]:[];en(["@products",...e.slice(0,-1).map(e=>`p:${e.id}`)])}},[nn]);const rn="products"===ee.place,an="trash"===ee.place,tn="files"===ee.place,on=tn?ee.folderId:null,dn=rn&&ee.nodeId?Ye.get(ee.nodeId)?.path[0]:void 0,sn=e=>e?.sharedFrom?`${Re.readOnly} ${Re.editedAtHq(e.sharedFrom)}`:Re.readOnly,cn=R(()=>te.map(e=>e.id),[te]),un=R(()=>new Map(te.map(e=>[e.id,e])),[te]),mn=g(cn),pn=R(()=>cn.filter(e=>mn.selected.has(e)),[cn,mn.selected]),hn=1===pn.length?un.get(pn[0]):void 0,fn=U(!0);V(()=>{fn.current?fn.current=!1:mn.clear()},[nn]);const gn=he?.join("\0");V(()=>{he&&mn.setSelection(he)},[gn]);const vn=U(gn??""),kn=pn.join("\0");V(()=>{vn.current!==kn&&(vn.current=kn,fe?.(pn))},[kn]);const yn=(e,n={})=>{Be?mn.select(e):mn.select(e,{ctrl:!(!n.ctrlKey&&!n.metaKey),shift:!!n.shiftKey})},[bn,wn]=B(null),Cn=e=>{const n=bn;if(wn(null),!n||null==e)return;e!==("folder"===n.kind?Qe.get(n.id)?.name:un.get(n.id)?.name)&&Ie?.(n,e)},xn=async e=>{if(!xe)return;const n=await xe(e);en(["@files",...e?[e]:[]]),"string"==typeof n&&wn({kind:"folder",id:n})},In=K(e=>{const n=[],l=n=>{if("files"===e.kind)return n===on&&tn?Re.alreadyHere:void 0;const l=Qe.get(e.id);return n===e.id||n&&Ze(n,e.id)?Re.notIntoItself:(l?.parentId??null)===n?Re.folderAlreadyHere:void 0};n.push({key:s,label:Re.allFiles,disabledReason:l(null)});const r=(e,a)=>{for(const i of Ge.get(e)??[])n.push({key:i.id,label:i.name,depth:a,disabledReason:l(i.id)}),r(i.id,a+1)};return r(null,1),n},[Ge,Qe,tn,Ze,on,Re]),Nn=K(e=>{const n=new Set(e.map(e=>un.get(e)?.kind??"image"));return 1===n.size?[...n][0]:"file"},[un]),[Dn,Sn]=B(null),jn={words:Re,media:Ke,denied:ve,moveTargets:In,kindOf:Nn,urlOf:e=>un.get(e)?.url,newSubfolder:xe&&Ve?e=>{xn(e)}:void 0,rename:Ie&&Ve?e=>{"file"!==e.kind||mn.isSelected(e.id)||mn.select(e.id),wn(e)}:void 0,move:Ne&&Ve?Ne:void 0,trash:De&&Ve?De:void 0,deleteFolder:Se&&Ve?Se:void 0,folderNotEmpty:e=>!!Qe.get(e)?.notEmpty,replace:Fe&&Ve?Fe:void 0,copyUrl:e=>{const n=un.get(e)?.url;n&&y(Re.urlLabel,n)},openInDesign:Oe,restore:je,deleteForever:Te},Tn=e=>c(e,jn),zn=w(),Fn=(e,n)=>{Be||(mn.isSelected(e)||mn.select(e),zn.open(n,(e=>{const n=mn.isSelected(e)?pn:[e];return rn?{kind:"render",id:e}:an?{kind:"trashed",ids:n}:{kind:"files",ids:n}})(e)))},[Ln,On]=B(null),[En,Pn]=B(null),[An,Mn]=B(null);V(()=>{if(!En&&!Ln)return;const e=()=>{Pn(null),On(null)};return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[En,Ln]);const Un=(e,n)=>Array.from(e.dataTransfer?.types??[]).includes(n),Rn=(e,n)=>!(!Ne||ve.move||Be)&&(!!Un(e,Y)||!(!Un(e,Q)||!An)&&(n!==An&&!(n&&Ze(n,An)))),Kn=(e,n)=>({onDragEnter:l=>{Rn(l,n)&&(l.preventDefault(),On(e))},onDragOver:l=>{Rn(l,n)&&(l.preventDefault(),l.dataTransfer.dropEffect="move",Ln!==e&&On(e))},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||On(n=>n===e?null:n)},onDrop:e=>{if(Rn(e,n))if(e.preventDefault(),On(null),Un(e,Y)){let l;try{l=JSON.parse(e.dataTransfer.getData(Y))}catch{l=null}Array.isArray(l)&&l.length&&Ne({kind:"files",ids:l.map(String)},n)}else An&&(Ne({kind:"folder",id:An},n),Mn(null))}}),Bn=e=>{const n=e=>Un(e,Y)||Un(e,Q)||Un(e,"Files");return{onDragEnter:l=>{n(l)&&Pn(e)},onDragOver:l=>{n(l)&&En!==e&&Pn(e)},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Pn(n=>n===e?null:n)}}},Vn=(e,n,l)=>/* @__PURE__ */W(E,{side:"right",content:En===e?Re.noDropProducts:sn(l),open:En===e||!En&&void 0,children:/* @__PURE__ */W("span",{children:n})}),Jn=e=>({onContextMenu:n=>{zn.open(n,e)}}),Hn=(e,r,a)=>e.map(e=>{const i=`p:${e.id}`,t=a??e,o=Xe.has(i),d=e.children?.length?e.children:null;/* @__PURE__ */
1
+ import{Tree as e,TreeRow as n,TreeGroup as l}from"./chunk-FCWBO7I3.js";import{ImageLightbox as r}from"./chunk-HWJQLLJA.js";import{MarqueeBox as a}from"./chunk-IC72MGON.js";import{EmptyState as i}from"./chunk-3TCGXYUC.js";import{DescriptionList as t}from"./chunk-SACUSHVN.js";import{Drawer as o}from"./chunk-3RX5KCUH.js";import{Breadcrumbs as d}from"./chunk-YM7AWNMY.js";import{useGridSelection as s}from"./chunk-VLKDWKVR.js";import{useMarquee as c}from"./chunk-OLFYNMTD.js";import{ROOT_KEY as u,mediaLibraryMenu as m}from"./chunk-3YCU6V3U.js";import{useMediaMoveItems as p}from"./chunk-JWUNK2PW.js";import{RenameField as h}from"./chunk-QIPO4EVJ.js";import{NativeSelect as f}from"./chunk-KITSIQCV.js";import{MediaUploadGrid as g}from"./chunk-BNPJHOAC.js";import{MediaUsedInList as v}from"./chunk-ZDDMFFQK.js";import{Segmented as k}from"./chunk-HNIIDDLJ.js";import{copyToClipboard as y}from"./chunk-HTHNDX32.js";import{Checkbox_default as b}from"./chunk-CGZBDI6C.js";import{useContextMenu as w,ContextMenu as C}from"./chunk-QMBMK6PP.js";import{Banner as x}from"./chunk-ID35S5Y6.js";import{Input_default as I}from"./chunk-PT4GMPUB.js";import{DropdownMenu as N}from"./chunk-3DSGJIC7.js";import{IconButton_default as D}from"./chunk-SV5RRBVA.js";import{useFileIntake as S,FileIntakeAlert as j}from"./chunk-ITEOA45V.js";import{setModalDragAside as T,modalIdHolding as z}from"./chunk-EIFNESXS.js";import{ColoredBadge as F}from"./chunk-ZGIAMYTI.js";import{Button_default as L}from"./chunk-EVYD6UFQ.js";import{Icon as O}from"./chunk-ISVODSRP.js";import{Tooltip as E}from"./chunk-SOZCWT6I.js";import{buttonClasses as P}from"./chunk-UQYNPYF4.js";import{usePlotWidth as A}from"./chunk-MAFUXCPZ.js";import{useShellStrings as M}from"./chunk-DEJIH3ZQ.js";import{useRef as U,useMemo as R,useCallback as K,useState as B,useEffect as V}from"react";import{jsxs as J,Fragment as H,jsx as W}from"react/jsx-runtime";var Y="application/x-efficient-media-files",Q="application/x-efficient-media-folder",G="application/x-efficient-media-file";function $(e){if(!e||!Array.from(e.types).includes(G))return null;try{const n=JSON.parse(e.getData(G));if(n&&"string"==typeof n.id&&"string"==typeof n.url&&"string"==typeof n.name&&("image"===n.kind||"video"===n.kind))return{id:n.id,url:n.url,kind:n.kind,name:n.name}}catch{}return null}var Z={type:"all",use:"any",sort:"newest"},X={lock:/* @__PURE__ */W(O,{name:"lock","aria-hidden":"true",className:"h-4 w-4"}),folder:/* @__PURE__ */W(O,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),folderOpen:/* @__PURE__ */W(O,{name:"folder-open","aria-hidden":"true",className:"h-4 w-4"}),folderPlus:/* @__PURE__ */W(O,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */W(O,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),upload:/* @__PURE__ */W(O,{name:"upload","aria-hidden":"true",className:"h-4 w-4"}),search:/* @__PURE__ */W(O,{name:"search","aria-hidden":"true",className:"h-4 w-4"}),grid:/* @__PURE__ */W(O,{name:"grid","aria-hidden":"true",className:"h-4 w-4"}),list:/* @__PURE__ */W(O,{name:"list","aria-hidden":"true",className:"h-4 w-4"}),more:/* @__PURE__ */W(O,{name:"more","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */W(O,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */W(O,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */W(O,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),crop:/* @__PURE__ */W(O,{name:"crop","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */W(O,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */W(O,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},q={link:/* @__PURE__ */W(O,{name:"link","aria-hidden":"true",className:"h-3 w-3"}),email:/* @__PURE__ */W(O,{name:"email","aria-hidden":"true",className:"h-3 w-3"}),lock:/* @__PURE__ */W(O,{name:"lock","aria-hidden":"true",className:"h-3 w-3"}),clock:/* @__PURE__ */W(O,{name:"clock","aria-hidden":"true",className:"h-3 w-3"})};function _(O){const{mode:$="manage",layout:_="auto",location:ee,onLocationChange:ne,folders:le,products:re,allFilesCount:ae,trashCount:ie,files:te,query:oe,onQueryChange:de,filters:se=Z,onFiltersChange:ce,extraFilters:ue,view:me="grid",onViewChange:pe,selectedIds:he,onSelectionChange:fe,usedIn:ge,denied:ve={},accept:ke="image/*,video/*",maxSizeBytes:ye,busy:be,progress:we,onUpload:Ce,onNewFolder:xe,onRename:Ie,onMove:Ne,onTrash:De,onDeleteFolder:Se,onRestore:je,onDeleteForever:Te,onEmptyTrash:ze,onReplace:Fe,onCropEdit:Le,onOpenInDesign:Oe,onChoose:Ee,onCancel:Pe,pickNote:Ae,onDragOut:Me,className:Ue=""}=O,Re=M().mediaLibrary,Ke=M().media,Be="pick"===$,Ve=!Be,Je=U(null),He=A(Je,"phone"===_?343:1200),We="phone"===_||"auto"===_&&He<640,Ye=R(()=>function(e=[]){const n=/* @__PURE__ */new Map,l=(e,r)=>{for(const a of e){const e=[...r,a];n.set(a.id,{node:a,path:e}),a.children&&l(a.children,e)}};return l(e,[]),n}(re),[re]),Qe=R(()=>new Map(le.map(e=>[e.id,e])),[le]),Ge=R(()=>{const e=/* @__PURE__ */new Map;for(const n of le){const l=n.parentId&&Qe.has(n.parentId)?n.parentId:null;e.set(l,[...e.get(l)??[],n])}return e},[le,Qe]),$e=K(e=>{const n=[];for(let l=e?Qe.get(e):void 0;l&&(n.unshift(l),!(n.length>le.length));l=l.parentId?Qe.get(l.parentId):void 0);return n},[Qe,le.length]),Ze=K((e,n)=>$e(e).some(e=>e.id===n),[$e]),[Xe,qe]=B(()=>/* @__PURE__ */new Set(["@files"])),_e=e=>qe(n=>{const l=new Set(n);return l.has(e)?l.delete(e):l.add(e),l}),en=K(e=>{qe(n=>e.every(e=>n.has(e))?n:/* @__PURE__ */new Set([...n,...e]))},[]),nn="files"===(ln=ee).place?`files:${ln.folderId??""}`:"products"===ln.place?`products:${ln.nodeId??""}`:"trash";var ln;V(()=>{if("files"===ee.place)en(["@files",...$e(ee.folderId).slice(0,-1).map(e=>e.id)]);else if("products"===ee.place){const e=ee.nodeId?Ye.get(ee.nodeId)?.path??[]:[];en(["@products",...e.slice(0,-1).map(e=>`p:${e.id}`)])}},[nn]);const rn="products"===ee.place,an="trash"===ee.place,tn="files"===ee.place,on=tn?ee.folderId:null,dn=rn&&ee.nodeId?Ye.get(ee.nodeId)?.path[0]:void 0,sn=e=>e?.sharedFrom?`${Re.readOnly} ${Re.editedAtHq(e.sharedFrom)}`:Re.readOnly,cn=R(()=>te.map(e=>e.id),[te]),un=R(()=>new Map(te.map(e=>[e.id,e])),[te]),mn=s(cn),pn=R(()=>cn.filter(e=>mn.selected.has(e)),[cn,mn.selected]),hn=1===pn.length?un.get(pn[0]):void 0,fn=U(!0);V(()=>{fn.current?fn.current=!1:mn.clear()},[nn]);const gn=he?.join("\0");V(()=>{he&&mn.setSelection(he)},[gn]);const vn=U(gn??""),kn=pn.join("\0");V(()=>{vn.current!==kn&&(vn.current=kn,fe?.(pn))},[kn]);const yn=(e,n={})=>{Be?mn.select(e):mn.select(e,{ctrl:!(!n.ctrlKey&&!n.metaKey),shift:!!n.shiftKey})},[bn,wn]=B(null),Cn=e=>{const n=bn;if(wn(null),!n||null==e)return;e!==("folder"===n.kind?Qe.get(n.id)?.name:un.get(n.id)?.name)&&Ie?.(n,e)},xn=async e=>{if(!xe)return;const n=await xe(e);en(["@files",...e?[e]:[]]),"string"==typeof n&&wn({kind:"folder",id:n})},In=K(e=>{const n=[],l=n=>{if("files"===e.kind)return n===on&&tn?Re.alreadyHere:void 0;const l=Qe.get(e.id);return n===e.id||n&&Ze(n,e.id)?Re.notIntoItself:(l?.parentId??null)===n?Re.folderAlreadyHere:void 0};n.push({key:u,label:Re.allFiles,disabledReason:l(null)});const r=(e,a)=>{for(const i of Ge.get(e)??[])n.push({key:i.id,label:i.name,depth:a,disabledReason:l(i.id)}),r(i.id,a+1)};return r(null,1),n},[Ge,Qe,tn,Ze,on,Re]),Nn=K(e=>{const n=new Set(e.map(e=>un.get(e)?.kind??"image"));return 1===n.size?[...n][0]:"file"},[un]),[Dn,Sn]=B(null),jn={words:Re,media:Ke,denied:ve,moveTargets:In,kindOf:Nn,urlOf:e=>un.get(e)?.url,newSubfolder:xe&&Ve?e=>{xn(e)}:void 0,rename:Ie&&Ve?e=>{"file"!==e.kind||mn.isSelected(e.id)||mn.select(e.id),wn(e)}:void 0,move:Ne&&Ve?Ne:void 0,trash:De&&Ve?De:void 0,deleteFolder:Se&&Ve?Se:void 0,folderNotEmpty:e=>!!Qe.get(e)?.notEmpty,replace:Fe&&Ve?Fe:void 0,copyUrl:e=>{const n=un.get(e)?.url;n&&y(Re.urlLabel,n)},openInDesign:Oe,restore:je,deleteForever:Te},Tn=e=>m(e,jn),zn=w(),Fn=(e,n)=>{Be||(mn.isSelected(e)||mn.select(e),zn.open(n,(e=>{const n=mn.isSelected(e)?pn:[e];return rn?{kind:"render",id:e}:an?{kind:"trashed",ids:n}:{kind:"files",ids:n}})(e)))},[Ln,On]=B(null),[En,Pn]=B(null),[An,Mn]=B(null);V(()=>{if(!En&&!Ln)return;const e=()=>{Pn(null),On(null)};return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[En,Ln]);const Un=(e,n)=>Array.from(e.dataTransfer?.types??[]).includes(n),Rn=(e,n)=>!(!Ne||ve.move||Be)&&(!!Un(e,Y)||!(!Un(e,Q)||!An)&&(n!==An&&!(n&&Ze(n,An)))),Kn=(e,n)=>({onDragEnter:l=>{Rn(l,n)&&(l.preventDefault(),On(e))},onDragOver:l=>{Rn(l,n)&&(l.preventDefault(),l.dataTransfer.dropEffect="move",Ln!==e&&On(e))},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||On(n=>n===e?null:n)},onDrop:e=>{if(Rn(e,n))if(e.preventDefault(),On(null),Un(e,Y)){let l;try{l=JSON.parse(e.dataTransfer.getData(Y))}catch{l=null}Array.isArray(l)&&l.length&&Ne({kind:"files",ids:l.map(String)},n)}else An&&(Ne({kind:"folder",id:An},n),Mn(null))}}),Bn=e=>{const n=e=>Un(e,Y)||Un(e,Q)||Un(e,"Files");return{onDragEnter:l=>{n(l)&&Pn(e)},onDragOver:l=>{n(l)&&En!==e&&Pn(e)},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Pn(n=>n===e?null:n)}}},Vn=(e,n,l)=>/* @__PURE__ */W(E,{side:"right",content:En===e?Re.noDropProducts:sn(l),open:En===e||!En&&void 0,children:/* @__PURE__ */W("span",{children:n})}),Jn=e=>({onContextMenu:n=>{zn.open(n,e)}}),Hn=(e,r,a)=>e.map(e=>{const i=`p:${e.id}`,t=a??e,o=Xe.has(i),d=e.children?.length?e.children:null;/* @__PURE__ */
2
2
  return J("div",{role:"none",className:"contents",children:[
3
3
  /* @__PURE__ */W(n,{label:Vn(i,e.name,t),level:r,icon:d&&o?X.folderOpen:X.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Re.fileCount(e.count):void 0,selected:rn&&ee.nodeId===e.id,expanded:d?o:void 0,onToggle:d?()=>_e(i):void 0,onSelect:()=>ne({place:"products",nodeId:e.id}),rowProps:{"data-media-row":i,...Bn(i),...Ve?Jn({kind:"product-node",id:e.id}):{}}}),d&&o&&/* @__PURE__ */W(l,{children:Hn(d,r+1,t)})]},e.id)}),Wn=(e,r)=>(Ge.get(e)??[]).map(e=>{const a=Ge.get(e.id),i=Xe.has(e.id),t="folder"===bn?.kind&&bn.id===e.id,o=Tn({kind:"folder",id:e.id});/* @__PURE__ */
4
4
  return J("div",{role:"none",className:"contents",children:[
5
- /* @__PURE__ */W(n,{label:e.name,level:r,icon:a&&i?X.folderOpen:X.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Re.fileCount(e.count):void 0,selected:t||tn&&ee.folderId===e.id,expanded:a?i:void 0,onToggle:a?()=>_e(e.id):void 0,onSelect:()=>ne({place:"files",folderId:e.id}),drop:Ln===e.id?"into":void 0,dragging:An===e.id,draggable:Ve&&!!Ne&&!ve.move,rename:t?/* @__PURE__ */W(m,{value:e.name,label:Re.folderName,onDone:Cn}):void 0,actions:Ve&&o.length?/* @__PURE__ */W(N,{align:"end","aria-label":Re.folderActions,trigger:X.more,items:o}):void 0,rowProps:{"data-media-row":e.id,...Kn(e.id,e.id),...Ve?Jn({kind:"folder",id:e.id}):{},...Ve&&Ne&&!ve.move?{draggable:!0,onDragStart:n=>{n.dataTransfer.effectAllowed="move",n.dataTransfer.setData(Q,e.id),Mn(e.id)},onDragEnd:()=>{Mn(null),On(null)}}:{}}}),a&&i&&/* @__PURE__ */W(l,{children:Wn(e.id,r+1)})]},e.id)}),Yn=Xe.has("@files"),Qn=Xe.has("@products"),Gn=/* @__PURE__ */J(e,{"aria-label":Re.folders,children:[re&&/* @__PURE__ */J(H,{children:[
5
+ /* @__PURE__ */W(n,{label:e.name,level:r,icon:a&&i?X.folderOpen:X.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Re.fileCount(e.count):void 0,selected:t||tn&&ee.folderId===e.id,expanded:a?i:void 0,onToggle:a?()=>_e(e.id):void 0,onSelect:()=>ne({place:"files",folderId:e.id}),drop:Ln===e.id?"into":void 0,dragging:An===e.id,draggable:Ve&&!!Ne&&!ve.move,rename:t?/* @__PURE__ */W(h,{value:e.name,label:Re.folderName,onDone:Cn}):void 0,actions:Ve&&o.length?/* @__PURE__ */W(N,{align:"end","aria-label":Re.folderActions,trigger:X.more,items:o}):void 0,rowProps:{"data-media-row":e.id,...Kn(e.id,e.id),...Ve?Jn({kind:"folder",id:e.id}):{},...Ve&&Ne&&!ve.move?{draggable:!0,onDragStart:n=>{n.dataTransfer.effectAllowed="move",n.dataTransfer.setData(Q,e.id),Mn(e.id)},onDragEnd:()=>{Mn(null),On(null)}}:{}}}),a&&i&&/* @__PURE__ */W(l,{children:Wn(e.id,r+1)})]},e.id)}),Yn=Xe.has("@files"),Qn=Xe.has("@products"),Gn=/* @__PURE__ */J(e,{"aria-label":Re.folders,children:[re&&/* @__PURE__ */J(H,{children:[
6
6
  /* @__PURE__ */W(n,{label:Vn("@products",Re.products),level:1,icon:X.lock,badge:{label:Re.readOnlyBadge,tone:"neutral"},expanded:re.length?Qn:void 0,onToggle:()=>_e("@products"),selected:rn&&null==ee.nodeId,onSelect:()=>ne({place:"products",nodeId:null}),rowProps:{"data-media-row":"@products",...Bn("@products")}}),Qn&&re.length>0&&/* @__PURE__ */W(l,{children:Hn(re,2)})]}),
7
- /* @__PURE__ */W(n,{label:Re.allFiles,level:1,icon:Yn?X.folderOpen:X.folder,count:ae,countLabel:null!=ae?Re.fileCount(ae):void 0,expanded:Ge.get(null)?.length?Yn:void 0,onToggle:()=>_e("@files"),selected:tn&&null==ee.folderId,onSelect:()=>ne({place:"files",folderId:null}),drop:"@files"===Ln?"into":void 0,rowProps:{"data-media-row":"@files",...Kn("@files",null)}}),Yn&&(Ge.get(null)?.length??0)>0&&/* @__PURE__ */W(l,{children:Wn(null,2)}),Ve&&/* @__PURE__ */W(n,{label:Re.trash,level:1,icon:X.trash,count:ie,countLabel:null!=ie?Re.fileCount(ie):void 0,selected:an,onSelect:()=>ne({place:"trash"}),rowProps:{"data-media-row":"@trash"}})]}),$n=(()=>{if(an)return[{label:Re.trash}];if(rn){const e=ee.nodeId?Ye.get(ee.nodeId)?.path??[]:[];return[{label:Re.products,onClick:e.length?()=>ne({place:"products",nodeId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>ne({place:"products",nodeId:n.id}):void 0}))]}const e=$e(on);return[{label:Re.allFiles,onClick:e.length?()=>ne({place:"files",folderId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>ne({place:"files",folderId:n.id}):void 0}))]})(),Zn=rn?Re.readOnly:ve.upload,Xn=!!Ce&&!an&&!Zn,qn=S({accept:ke,maxSizeBytes:ye,multiple:!0,disabled:!Xn,onAccept:e=>Ce?.(e,on)}),_n=rn?Re.noProductFolder:ve.newFolder,el=e=>e?{"aria-disabled":!0,disabledReason:e}:{},nl=/* @__PURE__ */J("div",{className:"flex flex-wrap items-center gap-2",children:[Ve&&xe&&!an&&/* @__PURE__ */W(L,{variant:"secondary",size:"sm",leftIcon:X.folderPlus,onClick:()=>{xn(on)},...el(_n),children:Re.newFolder}),Ce&&!an&&/* @__PURE__ */W(L,{variant:"primary",size:"sm",leftIcon:X.upload,onClick:()=>qn.open(),...el(Zn),children:Re.upload}),Ve&&an&&ze&&te.length>0&&/* @__PURE__ */W(L,{variant:"danger",size:"sm",onClick:ze,...el(ve.deleteForever),children:Re.emptyTrash})]}),ll=(e,n,l,r,a)=>/* @__PURE__ */W("div",{style:{width:We?void 0:a,flex:We?"1 1 120px":"0 0 auto",minWidth:0},children:/* @__PURE__ */W(p,{size:"sm","aria-label":e,value:n,onChange:r,options:l})},e),rl=e=>n=>ce?.({...se,[e]:n}),al=/* @__PURE__ */J("div",{className:"flex flex-wrap items-center gap-2",children:[de&&/* @__PURE__ */W("div",{style:{flex:"1 1 200px",minWidth:0},children:/* @__PURE__ */W(I,{size:"sm",type:"search",leftIcon:X.search,placeholder:rn?Re.searchProducts:Re.search,"aria-label":rn?Re.searchProducts:Re.search,value:oe??"",onChange:e=>de(e.target.value)})}),ce&&ll(Re.mediaType,se.type,[{value:"all",label:Re.allTypes},{value:"image",label:Re.images},{value:"video",label:Re.videos},{value:"svg",label:"SVG"},{value:"gif",label:"GIF"}],rl("type"),130),ce&&!rn&&!an&&ll(Re.use,se.use,[{value:"any",label:Re.anyUse},{value:"email",label:Re.emailOnly},{value:"website",label:Re.websiteOnly},{value:"unused",label:Re.notUsed}],rl("use"),130),ce&&Ve&&ll(Re.sort,se.sort,[{value:"newest",label:Re.newest},{value:"name",label:Re.byName},{value:"size",label:Re.bySize}],rl("sort"),110),ue?.map(e=>ll(e.label,e.value,e.options,e.onChange,120)),pe&&/* @__PURE__ */W(k,{size:"sm",label:Re.view,value:me,onChange:pe,options:[{value:"grid",label:Re.grid,icon:X.grid},{value:"list",label:Re.list,icon:X.list}]})]}),il=e=>{const n=[];return null!=e.trashedDaysAgo&&n.push({key:"t",label:Re.daysAgo(e.trashedDaysAgo),count:e.trashedDaysAgo,icon:q.clock,tone:"neutral"}),e.usedCount&&n.push({key:"u",label:Re.used(e.usedCount),count:e.usedCount,icon:q.link,tone:"active"}),e.email&&n.push({key:"e",label:Re.email,icon:q.email,tone:"queued"}),e.private&&n.push({key:"p",label:Re.private,icon:q.lock,tone:"neutral"}),n},tl=e=>il(e).map(e=>/* @__PURE__ */W(F,{tone:e.tone,size:"xs",children:e.label},e.key)),ol=Ve&&tn&&!!Ne&&!ve.move,dl=!!Me&&!an,sl=U(""),cl=U(null),ul=()=>cl.current?.dropped?"dropped":"cancelled",ml=U(Me);ml.current=Me;const pl=K(e=>{const n=cl.current;n&&(cl.current=null,n.stop(),T(sl.current,!1),e&&ml.current?.(e))},[]),hl=K(e=>{pl(ul());const n=Je.current?.ownerDocument;if(!n)return;sl.current=z(Je.current);const l=Je.current?.closest("[data-modal-panel]"),r=e=>{sl.current&&!l?.contains(e.target)&&T(sl.current,!0)},a=()=>!!e&&!e.isConnected,i=()=>{const e=cl.current;if(e){if(a())return pl("dropped");e.dropped=!0,T(sl.current,!1)}},t=e=>{const n=e.dataTransfer?.dropEffect;pl(n&&"none"!==n?"dropped":a()?ul():"cancelled")},o=()=>{a()&&pl(ul())},d=["pointermove","pointerdown","mousemove","mousedown"];n.addEventListener("dragover",r,!0),n.addEventListener("drop",i,!0),n.addEventListener("dragend",t,!0);for(const e of d)n.addEventListener(e,o,!0);cl.current={dropped:!1,stop:()=>{n.removeEventListener("dragover",r,!0),n.removeEventListener("drop",i,!0),n.removeEventListener("dragend",t,!0);for(const e of d)n.removeEventListener(e,o,!0)}}},[pl]);V(()=>()=>pl(ul()),[pl]);const fl=(e,n,l)=>{if("start"!==e)return;const r=un.get(n);r&&gl(r)&&(hl(l??null),Me(e))},gl=e=>!dl||e.private||e.pickDisabledReason?void 0:JSON.stringify({id:e.id,url:e.url,kind:"video"===e.kind?"video":"image",name:e.name}),vl=te.map(e=>({id:e.id,url:e.thumbUrl??e.url,name:e.name,kind:e.kind,caption:e.name,badges:il(e),dragData:ol?JSON.stringify(mn.isSelected(e.id)?pn:[e.id]):gl(e),...ol&&gl(e)?{dragAlso:{[G]:gl(e)}}:{}})),kl=We?Math.max(72,Math.floor((He-24-16-1)/3)):112,yl=U(null),bl=v({containerRef:yl,enabled:Ve&&!We&&te.length>0,selected:mn.selected,setSelection:e=>mn.setSelection(e),clearSelection:mn.clear}),wl=e=>{if(Be){const n=un.get(e);return void(!n||n.private||n.pickDisabledReason||Ee?.(n))}const n=cn.indexOf(e);n>=0&&Sn(n)},Cl=te.length?null:oe?/* @__PURE__ */W(i,{variant:"dashed",title:Re.noMatches}):rn?/* @__PURE__ */W(i,{variant:"dashed",title:Re.emptyProducts,description:sn(dn)}):an?/* @__PURE__ */W(i,{variant:"dashed",title:Re.trashEmpty}):!Xn||Be?/* @__PURE__ */W(i,{variant:"dashed",title:Re.emptyFolder}):null,xl="list"===me&&te.length>0,Il=Cl??(xl?/* @__PURE__ */W("ul",{role:"listbox","aria-multiselectable":Ve||void 0,"aria-label":Re.folders,className:"flex flex-col gap-1",children:te.map(e=>/* @__PURE__ */J("li",{role:"option","aria-selected":mn.isSelected(e.id),tabIndex:0,"data-grid-item":"","data-grid-id":e.id,onClick:n=>yn(e.id,n),onDoubleClick:()=>wl(e.id),onContextMenu:n=>Fn(e.id,n),draggable:!!gl(e)||void 0,onDragStart:gl(e)?n=>{n.dataTransfer.effectAllowed="link",n.dataTransfer.setData(G,gl(e)),fl("start",e.id,n.currentTarget)}:void 0,onKeyDown:n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),yn(e.id,n))},className:"flex h-12 cursor-pointer items-center gap-3 rounded-md px-2 text-sm rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(mn.isSelected(e.id)?"bg-accent-tint text-blue-700":"text-ink hover:bg-gray-100"),children:[
7
+ /* @__PURE__ */W(n,{label:Re.allFiles,level:1,icon:Yn?X.folderOpen:X.folder,count:ae,countLabel:null!=ae?Re.fileCount(ae):void 0,expanded:Ge.get(null)?.length?Yn:void 0,onToggle:()=>_e("@files"),selected:tn&&null==ee.folderId,onSelect:()=>ne({place:"files",folderId:null}),drop:"@files"===Ln?"into":void 0,rowProps:{"data-media-row":"@files",...Kn("@files",null)}}),Yn&&(Ge.get(null)?.length??0)>0&&/* @__PURE__ */W(l,{children:Wn(null,2)}),Ve&&/* @__PURE__ */W(n,{label:Re.trash,level:1,icon:X.trash,count:ie,countLabel:null!=ie?Re.fileCount(ie):void 0,selected:an,onSelect:()=>ne({place:"trash"}),rowProps:{"data-media-row":"@trash"}})]}),$n=(()=>{if(an)return[{label:Re.trash}];if(rn){const e=ee.nodeId?Ye.get(ee.nodeId)?.path??[]:[];return[{label:Re.products,onClick:e.length?()=>ne({place:"products",nodeId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>ne({place:"products",nodeId:n.id}):void 0}))]}const e=$e(on);return[{label:Re.allFiles,onClick:e.length?()=>ne({place:"files",folderId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>ne({place:"files",folderId:n.id}):void 0}))]})(),Zn=rn?Re.readOnly:ve.upload,Xn=!!Ce&&!an&&!Zn,qn=S({accept:ke,maxSizeBytes:ye,multiple:!0,disabled:!Xn,onAccept:e=>Ce?.(e,on)}),_n=rn?Re.noProductFolder:ve.newFolder,el=e=>e?{"aria-disabled":!0,disabledReason:e}:{},nl=/* @__PURE__ */J("div",{className:"flex flex-wrap items-center gap-2",children:[Ve&&xe&&!an&&/* @__PURE__ */W(L,{variant:"secondary",size:"sm",leftIcon:X.folderPlus,onClick:()=>{xn(on)},...el(_n),children:Re.newFolder}),Ce&&!an&&/* @__PURE__ */W(L,{variant:"primary",size:"sm",leftIcon:X.upload,onClick:()=>qn.open(),...el(Zn),children:Re.upload}),Ve&&an&&ze&&te.length>0&&/* @__PURE__ */W(L,{variant:"danger",size:"sm",onClick:ze,...el(ve.deleteForever),children:Re.emptyTrash})]}),ll=(e,n,l,r,a)=>/* @__PURE__ */W("div",{style:{width:We?void 0:a,flex:We?"1 1 120px":"0 0 auto",minWidth:0},children:/* @__PURE__ */W(f,{size:"sm","aria-label":e,value:n,onChange:r,options:l})},e),rl=e=>n=>ce?.({...se,[e]:n}),al=/* @__PURE__ */J("div",{className:"flex flex-wrap items-center gap-2",children:[de&&/* @__PURE__ */W("div",{style:{flex:"1 1 200px",minWidth:0},children:/* @__PURE__ */W(I,{size:"sm",type:"search",leftIcon:X.search,placeholder:rn?Re.searchProducts:Re.search,"aria-label":rn?Re.searchProducts:Re.search,value:oe??"",onChange:e=>de(e.target.value)})}),ce&&ll(Re.mediaType,se.type,[{value:"all",label:Re.allTypes},{value:"image",label:Re.images},{value:"video",label:Re.videos},{value:"svg",label:"SVG"},{value:"gif",label:"GIF"}],rl("type"),130),ce&&!rn&&!an&&ll(Re.use,se.use,[{value:"any",label:Re.anyUse},{value:"email",label:Re.emailOnly},{value:"website",label:Re.websiteOnly},{value:"unused",label:Re.notUsed}],rl("use"),130),ce&&Ve&&ll(Re.sort,se.sort,[{value:"newest",label:Re.newest},{value:"name",label:Re.byName},{value:"size",label:Re.bySize}],rl("sort"),110),ue?.map(e=>ll(e.label,e.value,e.options,e.onChange,120)),pe&&/* @__PURE__ */W(k,{size:"sm",label:Re.view,value:me,onChange:pe,options:[{value:"grid",label:Re.grid,icon:X.grid},{value:"list",label:Re.list,icon:X.list}]})]}),il=e=>{const n=[];return null!=e.trashedDaysAgo&&n.push({key:"t",label:Re.daysAgo(e.trashedDaysAgo),count:e.trashedDaysAgo,icon:q.clock,tone:"neutral"}),e.usedCount&&n.push({key:"u",label:Re.used(e.usedCount),count:e.usedCount,icon:q.link,tone:"active"}),e.email&&n.push({key:"e",label:Re.email,icon:q.email,tone:"queued"}),e.private&&n.push({key:"p",label:Re.private,icon:q.lock,tone:"neutral"}),n},tl=e=>il(e).map(e=>/* @__PURE__ */W(F,{tone:e.tone,size:"xs",children:e.label},e.key)),ol=Ve&&tn&&!!Ne&&!ve.move,dl=!!Me&&!an,sl=U(""),cl=U(null),ul=()=>cl.current?.dropped?"dropped":"cancelled",ml=U(Me);ml.current=Me;const pl=K(e=>{const n=cl.current;n&&(cl.current=null,n.stop(),T(sl.current,!1),e&&ml.current?.(e))},[]),hl=K(e=>{pl(ul());const n=Je.current?.ownerDocument;if(!n)return;sl.current=z(Je.current);const l=Je.current?.closest("[data-modal-panel]"),r=e=>{sl.current&&!l?.contains(e.target)&&T(sl.current,!0)},a=()=>!!e&&!e.isConnected,i=()=>{const e=cl.current;if(e){if(a())return pl("dropped");e.dropped=!0,T(sl.current,!1)}},t=e=>{const n=e.dataTransfer?.dropEffect;pl(n&&"none"!==n?"dropped":a()?ul():"cancelled")},o=()=>{a()&&pl(ul())},d=["pointermove","pointerdown","mousemove","mousedown"];n.addEventListener("dragover",r,!0),n.addEventListener("drop",i,!0),n.addEventListener("dragend",t,!0);for(const e of d)n.addEventListener(e,o,!0);cl.current={dropped:!1,stop:()=>{n.removeEventListener("dragover",r,!0),n.removeEventListener("drop",i,!0),n.removeEventListener("dragend",t,!0);for(const e of d)n.removeEventListener(e,o,!0)}}},[pl]);V(()=>()=>pl(ul()),[pl]);const fl=(e,n,l)=>{if("start"!==e)return;const r=un.get(n);r&&gl(r)&&(hl(l??null),Me(e))},gl=e=>!dl||e.private||e.pickDisabledReason?void 0:JSON.stringify({id:e.id,url:e.url,kind:"video"===e.kind?"video":"image",name:e.name}),vl=te.map(e=>({id:e.id,url:e.thumbUrl??e.url,name:e.name,kind:e.kind,caption:e.name,badges:il(e),dragData:ol?JSON.stringify(mn.isSelected(e.id)?pn:[e.id]):gl(e),...ol&&gl(e)?{dragAlso:{[G]:gl(e)}}:{}})),kl=We?Math.max(72,Math.floor((He-24-16-1)/3)):112,yl=U(null),bl=c({containerRef:yl,enabled:Ve&&!We&&te.length>0,selected:mn.selected,setSelection:e=>mn.setSelection(e),clearSelection:mn.clear}),wl=e=>{if(Be){const n=un.get(e);return void(!n||n.private||n.pickDisabledReason||Ee?.(n))}const n=cn.indexOf(e);n>=0&&Sn(n)},Cl=te.length?null:oe?/* @__PURE__ */W(i,{variant:"dashed",title:Re.noMatches}):rn?/* @__PURE__ */W(i,{variant:"dashed",title:Re.emptyProducts,description:sn(dn)}):an?/* @__PURE__ */W(i,{variant:"dashed",title:Re.trashEmpty}):!Xn||Be?/* @__PURE__ */W(i,{variant:"dashed",title:Re.emptyFolder}):null,xl="list"===me&&te.length>0,Il=Cl??(xl?/* @__PURE__ */W("ul",{role:"listbox","aria-multiselectable":Ve||void 0,"aria-label":Re.folders,className:"flex flex-col gap-1",children:te.map(e=>/* @__PURE__ */J("li",{role:"option","aria-selected":mn.isSelected(e.id),tabIndex:0,"data-grid-item":"","data-grid-id":e.id,onClick:n=>yn(e.id,n),onDoubleClick:()=>wl(e.id),onContextMenu:n=>Fn(e.id,n),draggable:!!gl(e)||void 0,onDragStart:gl(e)?n=>{n.dataTransfer.effectAllowed="link",n.dataTransfer.setData(G,gl(e)),fl("start",e.id,n.currentTarget)}:void 0,onKeyDown:n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),yn(e.id,n))},className:"flex h-12 cursor-pointer items-center gap-3 rounded-md px-2 text-sm rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(mn.isSelected(e.id)?"bg-accent-tint text-blue-700":"text-ink hover:bg-gray-100"),children:[
8
8
  /* @__PURE__ */W("img",{src:e.thumbUrl??e.url,alt:"",className:"h-10 w-10 shrink-0 rounded bg-gray-100 object-contain"}),
9
9
  /* @__PURE__ */W("span",{className:"min-w-0 flex-1 truncate",children:e.name}),
10
- /* @__PURE__ */W("span",{className:"flex shrink-0 items-center gap-1",children:tl(e)}),e.sizeLabel&&/* @__PURE__ */W("span",{className:"w-16 shrink-0 text-right text-xs text-ink-faint",children:e.sizeLabel})]},e.id))}):/* @__PURE__ */W(h,{items:vl,readOnly:!Xn||Be,onFiles:Xn&&!Be?e=>Ce(e,on):void 0,accept:ke,maxSizeBytes:ye,busy:be,progress:we,fit:"contain",thumbSize:kl,dragType:ol?Y:dl?G:void 0,onDragOutChange:dl?(e,n,l)=>fl(e,n,l):void 0,selected:mn.selected,onItemClick:yn,onItemDoubleClick:wl,onItemContextMenu:Ve?Fn:void 0,menuOnMedia:Ve})),Nl=u({count:pn.length,kind:Nn(pn),targets:In({kind:"files",ids:pn}),onPick:e=>Ne?.({kind:"files",ids:pn},e.key===s?null:e.key)}),Dl=P({variant:"secondary",size:"sm"}),Sl=/* @__PURE__ */W(N,{align:"start",triggerClassName:Dl,trigger:/* @__PURE__ */J(H,{children:[X.folder,Re.moveTo]}),items:Nl,disabled:!!ve.move}),jl=Ve&&pn.length>1&&!rn?/* @__PURE__ */J("div",{"data-media-bulk":"",className:"flex flex-wrap items-center gap-2 rounded-lg border border-line px-3 py-2",children:[
10
+ /* @__PURE__ */W("span",{className:"flex shrink-0 items-center gap-1",children:tl(e)}),e.sizeLabel&&/* @__PURE__ */W("span",{className:"w-16 shrink-0 text-right text-xs text-ink-faint",children:e.sizeLabel})]},e.id))}):/* @__PURE__ */W(g,{items:vl,readOnly:!Xn||Be,onFiles:Xn&&!Be?e=>Ce(e,on):void 0,accept:ke,maxSizeBytes:ye,busy:be,progress:we,fit:"contain",thumbSize:kl,dragType:ol?Y:dl?G:void 0,onDragOutChange:dl?(e,n,l)=>fl(e,n,l):void 0,selected:mn.selected,onItemClick:yn,onItemDoubleClick:wl,onItemContextMenu:Ve?Fn:void 0,menuOnMedia:Ve})),Nl=p({count:pn.length,kind:Nn(pn),targets:In({kind:"files",ids:pn}),onPick:e=>Ne?.({kind:"files",ids:pn},e.key===u?null:e.key)}),Dl=P({variant:"secondary",size:"sm"}),Sl=/* @__PURE__ */W(N,{align:"start",triggerClassName:Dl,trigger:/* @__PURE__ */J(H,{children:[X.folder,Re.moveTo]}),items:Nl,disabled:!!ve.move}),jl=Ve&&pn.length>1&&!rn?/* @__PURE__ */J("div",{"data-media-bulk":"",className:"flex flex-wrap items-center gap-2 rounded-lg border border-line px-3 py-2",children:[
11
11
  /* @__PURE__ */W(b,{checked:pn.length===te.length,indeterminate:pn.length<te.length,onChange:e=>e?mn.selectAll():mn.clear(),label:Re.selected(pn.length)}),/* @__PURE__ */J(H,an?{children:[je&&/* @__PURE__ */W(L,{variant:"secondary",size:"sm",leftIcon:X.undo,onClick:()=>je(pn),...el(ve.restore),children:Re.restore}),Te&&/* @__PURE__ */W(L,{variant:"secondary-danger",size:"sm",onClick:()=>Te(pn),...el(ve.deleteForever),children:Re.deleteForever})]}:{children:[Ne&&Sl,Ie&&/* @__PURE__ */W(L,{variant:"secondary",size:"sm",leftIcon:X.edit,disabled:!0,children:Re.rename}),De&&/* @__PURE__ */W(L,{variant:"secondary",size:"sm",leftIcon:X.trash,onClick:()=>De({kind:"files",ids:pn}),...el(ve.trash),children:Re.moveFilesToTrash(pn.length)})]}),
12
- /* @__PURE__ */W(L,{variant:"ghost",size:"sm",onClick:mn.clear,children:Re.clearSelection})]}):null,Tl=e=>{const n=[],l=(e,l,r)=>{null!=r&&""!==r&&n.push({key:e,label:l,value:r})},r="file"===bn?.kind&&bn.id===e.id;l("name",Re.name,r?/* @__PURE__ */W(m,{value:e.name,label:Re.fileName,onDone:Cn}):e.name),l("type",Re.type,e.typeLabel),l("size",Re.size,e.sizeLabel),l("resolution",Re.resolution,e.resolution),rn?(l("design",Re.design,e.design),l("finish",Re.finish,e.finish),l("angle",Re.angleLug,e.angleLug),l("owner",Re.owner,e.owner)):(l("added",Re.addedBy,e.addedBy),l("folder",Re.folder,e.folderPath)),l("used",Re.usedIn,null!=e.usedCount?Re.places(e.usedCount):void 0);const a=c({kind:"files",ids:[e.id]},jn).find(e=>"submenu"===e.type);/* @__PURE__ */
12
+ /* @__PURE__ */W(L,{variant:"ghost",size:"sm",onClick:mn.clear,children:Re.clearSelection})]}):null,Tl=e=>{const n=[],l=(e,l,r)=>{null!=r&&""!==r&&n.push({key:e,label:l,value:r})},r="file"===bn?.kind&&bn.id===e.id;l("name",Re.name,r?/* @__PURE__ */W(h,{value:e.name,label:Re.fileName,onDone:Cn}):e.name),l("type",Re.type,e.typeLabel),l("size",Re.size,e.sizeLabel),l("resolution",Re.resolution,e.resolution),rn?(l("design",Re.design,e.design),l("finish",Re.finish,e.finish),l("angle",Re.angleLug,e.angleLug),l("owner",Re.owner,e.owner)):(l("added",Re.addedBy,e.addedBy),l("folder",Re.folder,e.folderPath)),l("used",Re.usedIn,null!=e.usedCount?Re.places(e.usedCount):void 0);const a=m({kind:"files",ids:[e.id]},jn).find(e=>"submenu"===e.type);/* @__PURE__ */
13
13
  return J("div",{"data-media-details":"",className:"flex flex-col gap-3",children:[
14
14
  /* @__PURE__ */W("img",{src:e.url,alt:e.name,className:"aspect-square w-full rounded-lg bg-gray-100 object-contain"}),rn&&/* @__PURE__ */W(x,{tone:"neutral",title:Re.readOnlyBadge,children:sn(dn)}),
15
15
  /* @__PURE__ */W(t,{size:"sm",columns:1,items:n}),!an&&/* @__PURE__ */J("div",{className:"flex gap-2",children:[
16
16
  /* @__PURE__ */W("div",{style:{flex:"1 1 0",minWidth:0},children:/* @__PURE__ */W(I,{size:"sm",readOnly:!0,value:e.url,"aria-label":Re.fileUrl,onFocus:e=>e.currentTarget.select()})}),
17
- /* @__PURE__ */W(L,{variant:"secondary",size:"sm",leftIcon:X.copy,onClick:()=>jn.copyUrl(e.id),children:Re.copyUrl})]}),tn&&Ve&&/* @__PURE__ */J("div",{className:"flex flex-wrap gap-2",children:[Fe&&/* @__PURE__ */W(L,{variant:"secondary",size:"sm",leftIcon:X.swap,onClick:()=>Fe(e.id),...el(ve.replace),children:Re.replace}),Le&&/* @__PURE__ */W(L,{variant:"secondary",size:"sm",leftIcon:X.crop,onClick:()=>Le(e.id),children:Re.cropEdit}),Ne&&"submenu"===a?.type&&/* @__PURE__ */W(N,{align:"start",triggerClassName:Dl,trigger:/* @__PURE__ */J(H,{children:[X.folder,Re.moveTo]}),items:a.items,disabled:!!ve.move}),Ie&&/* @__PURE__ */W(L,{variant:"secondary",size:"sm",leftIcon:X.edit,onClick:()=>wn({kind:"file",id:e.id}),...el(ve.rename),children:Re.rename}),De&&/* @__PURE__ */W(D,{"aria-label":Re.moveToTrash,size:"sm",onClick:()=>De({kind:"files",ids:[e.id]}),disabledReason:ve.trash,"aria-disabled":!!ve.trash||void 0,children:X.trash})]}),an&&Ve&&/* @__PURE__ */J("div",{className:"flex flex-wrap gap-2",children:[je&&/* @__PURE__ */W(L,{variant:"primary",size:"sm",leftIcon:X.undo,onClick:()=>je([e.id]),...el(ve.restore),children:Re.restore}),Te&&/* @__PURE__ */W(L,{variant:"danger",size:"sm",onClick:()=>Te([e.id]),...el(ve.deleteForever),children:Re.deleteForever})]}),rn&&Oe&&/* @__PURE__ */W(L,{variant:"secondary",size:"sm",leftIcon:X.external,onClick:()=>Oe({kind:"render",id:e.id}),children:Re.openInDesign}),ge&&/* @__PURE__ */W(f,{items:ge})]})},zl=hn?hn.private?Re.privateNoPick:hn.pickDisabledReason:void 0,Fl=Be?/* @__PURE__ */J("div",{"data-media-picker-footer":"",className:"flex flex-wrap items-center justify-between gap-2 border-t border-line px-3 py-2",children:[
17
+ /* @__PURE__ */W(L,{variant:"secondary",size:"sm",leftIcon:X.copy,onClick:()=>jn.copyUrl(e.id),children:Re.copyUrl})]}),tn&&Ve&&/* @__PURE__ */J("div",{className:"flex flex-wrap gap-2",children:[Fe&&/* @__PURE__ */W(L,{variant:"secondary",size:"sm",leftIcon:X.swap,onClick:()=>Fe(e.id),...el(ve.replace),children:Re.replace}),Le&&/* @__PURE__ */W(L,{variant:"secondary",size:"sm",leftIcon:X.crop,onClick:()=>Le(e.id),children:Re.cropEdit}),Ne&&"submenu"===a?.type&&/* @__PURE__ */W(N,{align:"start",triggerClassName:Dl,trigger:/* @__PURE__ */J(H,{children:[X.folder,Re.moveTo]}),items:a.items,disabled:!!ve.move}),Ie&&/* @__PURE__ */W(L,{variant:"secondary",size:"sm",leftIcon:X.edit,onClick:()=>wn({kind:"file",id:e.id}),...el(ve.rename),children:Re.rename}),De&&/* @__PURE__ */W(D,{"aria-label":Re.moveToTrash,size:"sm",onClick:()=>De({kind:"files",ids:[e.id]}),disabledReason:ve.trash,"aria-disabled":!!ve.trash||void 0,children:X.trash})]}),an&&Ve&&/* @__PURE__ */J("div",{className:"flex flex-wrap gap-2",children:[je&&/* @__PURE__ */W(L,{variant:"primary",size:"sm",leftIcon:X.undo,onClick:()=>je([e.id]),...el(ve.restore),children:Re.restore}),Te&&/* @__PURE__ */W(L,{variant:"danger",size:"sm",onClick:()=>Te([e.id]),...el(ve.deleteForever),children:Re.deleteForever})]}),rn&&Oe&&/* @__PURE__ */W(L,{variant:"secondary",size:"sm",leftIcon:X.external,onClick:()=>Oe({kind:"render",id:e.id}),children:Re.openInDesign}),ge&&/* @__PURE__ */W(v,{items:ge})]})},zl=hn?hn.private?Re.privateNoPick:hn.pickDisabledReason:void 0,Fl=Be?/* @__PURE__ */J("div",{"data-media-picker-footer":"",className:"flex flex-wrap items-center justify-between gap-2 border-t border-line px-3 py-2",children:[
18
18
  /* @__PURE__ */W("span",{className:"min-w-0 truncate text-sm text-ink-faint",children:hn?Re.oneChosen(hn.name):Re.noneChosen}),
19
19
  /* @__PURE__ */J("div",{className:"flex gap-2",children:[Pe&&/* @__PURE__ */W(L,{variant:"secondary",size:"sm",onClick:Pe,children:Re.cancel}),
20
20
  /* @__PURE__ */W(L,{variant:"primary",size:"sm",disabled:!hn,...el(zl),onClick:()=>{hn&&!zl&&Ee?.(hn)},children:Re.chooseImage})]})]}):null,Ll=Ve&&!!hn,Ol=/* @__PURE__ */J("div",{className:"flex min-w-0 flex-col gap-3",children:[Ae&&/* @__PURE__ */W(x,{tone:"neutral",children:Ae}),
@@ -1,9 +1,9 @@
1
- import{CountBadge as e}from"./chunk-F3MO56N4.js";import{SettingRowNameContext as i,SettingAutoContext as n}from"./chunk-2NMW66P5.js";import{isShown as a}from"./chunk-HCP7WOAL.js";import{useShellStrings as t}from"./chunk-DEJIH3ZQ.js";import{isValidElement as l}from"react";import{jsx as s,jsxs as r,Fragment as d}from"react/jsx-runtime";var c={pad:"p-4",gap:"gap-4",text:"text-sm",bodyTop:"mt-4",bodyPad:"pt-3"},m=e=>Array.isArray(e)?e.some(m):l(e);function o({label:l,icon:o,action:h,value:u,readout:f,changed:p=!1,description:x,children:N,controlId:v,labelId:g,unknownText:b="—",quiet:y=!1,size:k="default",viewState:w,divider:$=!0,showWhen:j,values:P,context:A,className:F=""}){const I=t();if(!a(j,P,A))return null;const T="auto"===w?/* @__PURE__ */s("span",{"data-setting-auto":"","aria-hidden":"true",className:"shrink-0 rounded-sm border border-line px-1 text-2xs font-normal leading-4 text-ink-faint",children:I.settingView.auto}):"edited"===w?/* @__PURE__ */r("span",{"data-setting-edited":"",className:"inline-flex shrink-0 items-center",children:[
1
+ import{CountBadge as e}from"./chunk-F3MO56N4.js";import{isShown as i}from"./chunk-HCP7WOAL.js";import{SettingRowNameContext as n,SettingAutoContext as a}from"./chunk-2NMW66P5.js";import{useShellStrings as t}from"./chunk-DEJIH3ZQ.js";import{isValidElement as l}from"react";import{jsx as s,jsxs as r,Fragment as d}from"react/jsx-runtime";var c={pad:"p-4",gap:"gap-4",text:"text-sm",bodyTop:"mt-4",bodyPad:"pt-3"},m=e=>Array.isArray(e)?e.some(m):l(e);function o({label:l,icon:o,action:h,value:u,readout:f,changed:p=!1,description:x,children:N,controlId:v,labelId:g,unknownText:b="—",quiet:y=!1,size:k="default",viewState:w,divider:$=!0,showWhen:j,values:P,context:A,className:F=""}){const I=t();if(!i(j,P,A))return null;const T="auto"===w?/* @__PURE__ */s("span",{"data-setting-auto":"","aria-hidden":"true",className:"shrink-0 rounded-sm border border-line px-1 text-2xs font-normal leading-4 text-ink-faint",children:I.settingView.auto}):"edited"===w?/* @__PURE__ */r("span",{"data-setting-edited":"",className:"inline-flex shrink-0 items-center",children:[
2
2
  /* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex",children:/* @__PURE__ */s(e,{dot:!0,tone:"accent"})}),
3
- /* @__PURE__ */s("span",{className:"sr-only",children:I.settingView.edited})]}):null,W=null!=f&&!1!==f;if("compact"===k){const e=m(u),a=m(h);if(!e&&!a)return null;const t=g,c=["es-field"];e||c.push("is-inline"),p&&c.push("is-changed"),F&&c.push(F);const b=/* @__PURE__ */r(d,{children:[null!=o&&/* @__PURE__ */s("span",{className:"es-field-icon","aria-hidden":"true",children:o}),
4
- /* @__PURE__ */s("span",{className:"es-field-label",id:t,children:l}),T]}),y=e=>/* @__PURE__ */s(i.Provider,{value:t,children:/* @__PURE__ */s(n.Provider,{value:"auto"===w,children:e})});/* @__PURE__ */
3
+ /* @__PURE__ */s("span",{className:"sr-only",children:I.settingView.edited})]}):null,W=null!=f&&!1!==f;if("compact"===k){const e=m(u),i=m(h);if(!e&&!i)return null;const t=g,c=["es-field"];e||c.push("is-inline"),p&&c.push("is-changed"),F&&c.push(F);const b=/* @__PURE__ */r(d,{children:[null!=o&&/* @__PURE__ */s("span",{className:"es-field-icon","aria-hidden":"true",children:o}),
4
+ /* @__PURE__ */s("span",{className:"es-field-label",id:t,children:l}),T]}),y=e=>/* @__PURE__ */s(n.Provider,{value:t,children:/* @__PURE__ */s(a.Provider,{value:"auto"===w,children:e})});/* @__PURE__ */
5
5
  return r("div",{className:c.join(" "),children:[
6
- /* @__PURE__ */r("div",{className:"es-field-head",children:[v?/* @__PURE__ */s("label",{className:"es-field-name",htmlFor:v,children:b}):/* @__PURE__ */s("span",{className:"es-field-name",children:b}),W&&/* @__PURE__ */s("span",{className:"es-field-value",children:f}),a&&y(h)]}),e&&/* @__PURE__ */s("div",{className:"es-field-ctl",children:y(u)}),x?/* @__PURE__ */s("p",{className:"es-field-hint",children:x}):null,N]})}const H=c,M=void 0!==u||void 0===N&&null==h,O=null==u||""===u,V=y?"text-gray-500":"text-gray-800",q=O?"text-gray-400":y?"text-gray-500":"text-gray-900",z=`${H.text} font-medium ${V}`,B=v?/* @__PURE__ */s("label",{htmlFor:v,id:g,className:z,children:l}):/* @__PURE__ */s("span",{id:g,className:z,children:l}),C=/* @__PURE__ */s(i.Provider,{value:g,children:/* @__PURE__ */s(n.Provider,{value:"auto"===w,children:O?b:u})}),D=[$?"border-t border-line-subtle first:border-t-0":"",H.pad,F].filter(Boolean).join(" "),E=null!=N&&!1!==N&&/* @__PURE__ */s("div",{className:`${H.bodyTop} border-t border-line-subtle ${H.bodyPad}`,children:N});/* @__PURE__ */
6
+ /* @__PURE__ */r("div",{className:"es-field-head",children:[v?/* @__PURE__ */s("label",{className:"es-field-name",htmlFor:v,children:b}):/* @__PURE__ */s("span",{className:"es-field-name",children:b}),W&&/* @__PURE__ */s("span",{className:"es-field-value",children:f}),i&&y(h)]}),e&&/* @__PURE__ */s("div",{className:"es-field-ctl",children:y(u)}),x?/* @__PURE__ */s("p",{className:"es-field-hint",children:x}):null,N]})}const H=c,M=void 0!==u||void 0===N&&null==h,O=null==u||""===u,V=y?"text-gray-500":"text-gray-800",q=O?"text-gray-400":y?"text-gray-500":"text-gray-900",z=`${H.text} font-medium ${V}`,B=v?/* @__PURE__ */s("label",{htmlFor:v,id:g,className:z,children:l}):/* @__PURE__ */s("span",{id:g,className:z,children:l}),C=/* @__PURE__ */s(n.Provider,{value:g,children:/* @__PURE__ */s(a.Provider,{value:"auto"===w,children:O?b:u})}),D=[$?"border-t border-line-subtle first:border-t-0":"",H.pad,F].filter(Boolean).join(" "),E=null!=N&&!1!==N&&/* @__PURE__ */s("div",{className:`${H.bodyTop} border-t border-line-subtle ${H.bodyPad}`,children:N});/* @__PURE__ */
7
7
  return r("div",W?{className:D,children:[
8
8
  /* @__PURE__ */r("div",{"data-setting-line":"",className:"flex flex-wrap items-center justify-between gap-x-2 gap-y-2",children:[
9
9
  /* @__PURE__ */s("div",{className:"flex-1 basis-0",children:/* @__PURE__ */r("div",{className:`flex min-w-0 items-center gap-2 ${V}`,children:[null!=o&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:o}),B,T]})}),
@@ -1,14 +1,14 @@
1
- import{AccessibleTable as e}from"./chunk-HY6CBG4M.js";import{polygonPoints as t}from"./chunk-VFC6QUEN.js";import{ChartDefs as r,maskId as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{angleScale as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{CHART_INK as i,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{useShellStrings as m,useShellLocale as c}from"./chunk-DEJIH3ZQ.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useId as p,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";var k=3,g=e=>`${e.map(([e,t],r)=>`${0===r?"M":"L"}${e.toFixed(2)},${t.toFixed(2)}`).join(" ")} Z`;function x({axes:k,series:x,size:y=300,mode:b="area",grid:v="polygon",rings:M=4,formatValue:N,animate:j=!0,className:$,emptyLabel:C}){const W=m().charts,F=c(),w=N??(e=>h(e,F)),R=C??W.nothingToCompare,A=p(),[E,H]=u(null),{highlighted:L}=a(),Q=x;if(k.length<3||0===Q.length)/* @__PURE__ */
1
+ import{AccessibleTable as e}from"./chunk-HY6CBG4M.js";import{ChartDefs as t,maskId as r}from"./chunk-465RRWBY.js";import{polygonPoints as l}from"./chunk-VFC6QUEN.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{angleScale as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{CHART_INK as i,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{useShellStrings as m,useShellLocale as c}from"./chunk-DEJIH3ZQ.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useId as p,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";var k=3,g=e=>`${e.map(([e,t],r)=>`${0===r?"M":"L"}${e.toFixed(2)},${t.toFixed(2)}`).join(" ")} Z`;function x({axes:k,series:x,size:y=300,mode:b="area",grid:v="polygon",rings:M=4,formatValue:N,animate:j=!0,className:$,emptyLabel:C}){const W=m().charts,F=c(),w=N??(e=>h(e,F)),R=C??W.nothingToCompare,A=p(),[E,H]=u(null),{highlighted:L}=a(),Q=x;if(k.length<3||0===Q.length)/* @__PURE__ */
2
2
  return d("p",{className:`text-sm text-gray-500 ${$??""}`,children:R});const Y=y/2,z=y/2,B=y/2-46,T=o(k.length),U=k.map((e,t)=>null!=e.max&&Number.isFinite(e.max)&&e.max>0?e.max:Math.max(1,...Q.map(e=>e.values[t]??0).filter(Number.isFinite))),V=(e,t)=>{const r=Math.max(0,Math.min(1,t/U[e])),l=T.center(e)-T.step/2;return[Y+B*r*Math.cos(l),z+B*r*Math.sin(l)]},Z=(e,t)=>null!==E?E!==e:null!==L&&L!==t,D=null!==E?Q[E]:void 0;/* @__PURE__ */
3
3
  return f("div",{className:`relative ${$??""}`,children:[
4
4
  /* @__PURE__ */f("svg",{width:"100%",height:y,viewBox:`0 0 ${y} ${y}`,role:"img","aria-labelledby":A,onMouseLeave:()=>H(null),children:[
5
- /* @__PURE__ */d("title",{id:A,children:W.acrossMeasures(Q.map(e=>e.label),k.length)}),Array.from({length:M},(e,r)=>{const l=B*(r+1)/M;return"circle"===v?/* @__PURE__ */d("circle",{cx:Y,cy:z,r:l,fill:"none",stroke:i.grid,strokeWidth:1},r):/* @__PURE__ */d("path",{d:g(t(Y,z,l,k.length)),fill:"none",stroke:i.grid,strokeWidth:1},r)}),k.map((e,t)=>{const[r,l]=V(t,U[t]);/* @__PURE__ */
5
+ /* @__PURE__ */d("title",{id:A,children:W.acrossMeasures(Q.map(e=>e.label),k.length)}),Array.from({length:M},(e,t)=>{const r=B*(t+1)/M;return"circle"===v?/* @__PURE__ */d("circle",{cx:Y,cy:z,r:r,fill:"none",stroke:i.grid,strokeWidth:1},t):/* @__PURE__ */d("path",{d:g(l(Y,z,r,k.length)),fill:"none",stroke:i.grid,strokeWidth:1},t)}),k.map((e,t)=>{const[r,l]=V(t,U[t]);/* @__PURE__ */
6
6
  return f("g",{children:[
7
7
  /* @__PURE__ */d("line",{x1:Y,y1:z,x2:r,y2:l,stroke:i.grid,strokeWidth:1}),
8
8
  /* @__PURE__ */d("text",{x:Y+(B+18)*Math.cos(T.center(t)-T.step/2),y:z+(B+18)*Math.sin(T.center(t)-T.step/2)+4,textAnchor:"middle",fontSize:11,fill:i.label,children:e.label})]},e.key)}),
9
- /* @__PURE__ */d(r,{id:A,reveal:!!j&&"center-out"}),Q.map((e,t)=>{const r=s(t,3,e.color,e.tone),a=k.map((t,r)=>V(r,e.values[r]??0));/* @__PURE__ */
10
- return f("g",{opacity:Z(t,e.key)?.3:1,onMouseEnter:()=>H(t),mask:j?`url(#${l(A)})`:void 0,children:["area"===b&&/* @__PURE__ */d("path",{d:g(a),fill:r,fillOpacity:.18,stroke:"none"}),
11
- /* @__PURE__ */d("path",{d:g(a),fill:"none",stroke:r,strokeWidth:2,strokeLinejoin:"round"}),a.map(([e,t],l)=>/* @__PURE__ */d("circle",{cx:e,cy:t,r:3.5,fill:r,stroke:i.surface,strokeWidth:1.5},l))]},e.key)})]}),D&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:D.label,rows:k.map((e,t)=>({key:e.key,label:e.label,color:s(E,3,D.color,D.tone),value:w(D.values[t]??0)}))})}),
9
+ /* @__PURE__ */d(t,{id:A,reveal:!!j&&"center-out"}),Q.map((e,t)=>{const l=s(t,3,e.color,e.tone),a=k.map((t,r)=>V(r,e.values[r]??0));/* @__PURE__ */
10
+ return f("g",{opacity:Z(t,e.key)?.3:1,onMouseEnter:()=>H(t),mask:j?`url(#${r(A)})`:void 0,children:["area"===b&&/* @__PURE__ */d("path",{d:g(a),fill:l,fillOpacity:.18,stroke:"none"}),
11
+ /* @__PURE__ */d("path",{d:g(a),fill:"none",stroke:l,strokeWidth:2,strokeLinejoin:"round"}),a.map(([e,t],r)=>/* @__PURE__ */d("circle",{cx:e,cy:t,r:3.5,fill:l,stroke:i.surface,strokeWidth:1.5},r))]},e.key)})]}),D&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:D.label,rows:k.map((e,t)=>({key:e.key,label:e.label,color:s(E,3,D.color,D.tone),value:w(D.values[t]??0)}))})}),
12
12
  /* @__PURE__ */d("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:Q.map((e,t)=>/* @__PURE__ */f("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
13
13
  /* @__PURE__ */d("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:s(t,3,e.color,e.tone)}}),
14
14
  /* @__PURE__ */d("span",{className:"flex-1 truncate",children:e.label})]},e.key))}),
@@ -1 +1 @@
1
- import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-PJXHSY5G.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},C=class{l},E=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);E(()=>{const s=p(t,C),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,_=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},Z=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},F=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();E(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,_),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,F,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{Z(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,F,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],B=[800,1800],N=e=>{document.prerendering?E(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};var U=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,H=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,O=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},J=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,K=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,V=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,W=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,D=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,X=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,Y=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Q(e,t,n){const i=e.replace(X,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=Y.exec(n.trim()),i=e&&Q(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&H.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(X,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&U.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);E(()=>{let d,l=h(),u=g("LCP");const f=p(t,j),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,x,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,x,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;Z(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),R(e),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),P(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,B,t.reportAllChanges);N(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,B,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,B,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&O.test(e.app),n="string"==typeof e.release&&O.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:O.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(J,"[redacted]").replace(K,"[redacted]").replace(V,"[url]").replace(W,"[id]").replace(D,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
1
+ import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-BXZTH7RX.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},C=class{l},E=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);E(()=>{const s=p(t,C),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,Z=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},_=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},R=[200,500],F=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();E(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,Z),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,R,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{_(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,R,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],B=[800,1800],N=e=>{document.prerendering?E(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};var U=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,H=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,O=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},J=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,K=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,V=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,W=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,D=/\d{4,}/g,X=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,G=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,Q=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(G,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=Q.exec(n.trim()),i=e&&Y(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&H.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(G,"").split(/[?#]/,1)[0].replace(X,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&U.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);E(()=>{let d,l=h(),u=g("LCP");const f=p(t,j),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,x,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,x,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;_(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),F(e),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),P(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,B,t.reportAllChanges);N(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,B,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,B,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&O.test(e.app),n="string"==typeof e.release&&O.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:O.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(J,"[redacted]").replace(K,"[redacted]").replace(V,"[url]").replace(W,"[id]").replace(D,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
@@ -1,11 +1,11 @@
1
- import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as a}from"./chunk-465RRWBY.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{angleScale as r}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as o,CHART_INK as i}from"./chunk-TZFACUMR.js";import{useShellStrings as s,useShellLocale as c}from"./chunk-DEJIH3ZQ.js";import{formatPlain as m}from"./chunk-C3QOHMR6.js";import{useId as h,useState as u}from"react";import{jsx as p,jsxs as d}from"react/jsx-runtime";var f=300*Math.PI/180;function g({rows:g,variant:k="track",size:v=300,max:x,formatValue:y,animate:M=!0,className:N,emptyLabel:b,trackGap:j=6}){const C=s().charts,w=c(),E=y??(e=>m(e,w)),R=b??C.nothingToPlot,I=h(),[P,Q]=u(null),{highlighted:T}=l();if(0===g.length)/* @__PURE__ */return p("p",{className:`text-sm text-gray-500 ${N??""}`,children:R});const $=v/2,F=v/2,H=v/2-10,U=x??Math.max(...g.map(e=>e.value),1),V="track"===k?Math.max(6,(H-.16*v)/g.length):0,W=Math.max(1,Math.floor((H-.16*v)/V||1)),Y="track"===k?g.slice(0,W):g,z=Math.min(j,Math.max(1,V-2)),A=r(Y.length,.03),B=null!==P?Y[P]:void 0;/* @__PURE__ */
1
+ import{MOTION as e,stagger as t}from"./chunk-465RRWBY.js";import{arcPath as a}from"./chunk-VFC6QUEN.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{angleScale as r}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as o,CHART_INK as i}from"./chunk-TZFACUMR.js";import{useShellStrings as s,useShellLocale as c}from"./chunk-DEJIH3ZQ.js";import{formatPlain as m}from"./chunk-C3QOHMR6.js";import{useId as h,useState as u}from"react";import{jsx as p,jsxs as d}from"react/jsx-runtime";var f=300*Math.PI/180;function g({rows:g,variant:k="track",size:v=300,max:x,formatValue:y,animate:M=!0,className:N,emptyLabel:b,trackGap:j=6}){const C=s().charts,w=c(),E=y??(e=>m(e,w)),R=b??C.nothingToPlot,I=h(),[P,Q]=u(null),{highlighted:T}=l();if(0===g.length)/* @__PURE__ */return p("p",{className:`text-sm text-gray-500 ${N??""}`,children:R});const $=v/2,F=v/2,H=v/2-10,U=x??Math.max(...g.map(e=>e.value),1),V="track"===k?Math.max(6,(H-.16*v)/g.length):0,W=Math.max(1,Math.floor((H-.16*v)/V||1)),Y="track"===k?g.slice(0,W):g,z=Math.min(j,Math.max(1,V-2)),A=r(Y.length,.03),B=null!==P?Y[P]:void 0;/* @__PURE__ */
2
2
  return d("div",{className:`relative ${N??""}`,children:[
3
3
  /* @__PURE__ */d("svg",{width:"100%",height:v,viewBox:`0 0 ${v} ${v}`,role:"img","aria-labelledby":I,onMouseLeave:()=>Q(null),children:[
4
4
  /* @__PURE__ */p("title",{id:I,children:"track"===k?C.radialTrack(Y.length):C.radialCycle(Y.length)}),Y.map((l,r)=>{const n=o(r,l.color,l.tone),s=Math.max(0,Math.min(1,l.value/U)),c=((e,t)=>null!==P?P!==e:null!==T&&T!==t)(r,l.key);if("track"===k){const o=H-r*V,m=o-V+z,h=-Math.PI/2;/* @__PURE__ */
5
- return d("g",{opacity:c?.4:1,onMouseEnter:()=>Q(r),className:M?t.sweep:void 0,style:M?a(r,70):void 0,children:[
6
- /* @__PURE__ */p("path",{d:e($,F,m,o,h,h+f),fill:i.grid}),
7
- /* @__PURE__ */p("path",{d:e($,F,m,o,h,h+f*s),fill:n})]},l.key)}const m=.14*v;/* @__PURE__ */
8
- return p("g",{opacity:c?.4:1,onMouseEnter:()=>Q(r),children:/* @__PURE__ */p("path",{d:e($,F,m,m+(H-m)*s,A(r),A(r)+A.step),fill:n})},l.key)})]}),B&&null!==P&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(n,{title:B.label,rows:[{key:"value",label:C.value,color:o(P,B.color,B.tone),value:E(B.value)}]})}),
5
+ return d("g",{opacity:c?.4:1,onMouseEnter:()=>Q(r),className:M?e.sweep:void 0,style:M?t(r,70):void 0,children:[
6
+ /* @__PURE__ */p("path",{d:a($,F,m,o,h,h+f),fill:i.grid}),
7
+ /* @__PURE__ */p("path",{d:a($,F,m,o,h,h+f*s),fill:n})]},l.key)}const m=.14*v;/* @__PURE__ */
8
+ return p("g",{opacity:c?.4:1,onMouseEnter:()=>Q(r),children:/* @__PURE__ */p("path",{d:a($,F,m,m+(H-m)*s,A(r),A(r)+A.step),fill:n})},l.key)})]}),B&&null!==P&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(n,{title:B.label,rows:[{key:"value",label:C.value,color:o(P,B.color,B.tone),value:E(B.value)}]})}),
9
9
  /* @__PURE__ */p("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(150px,1fr))"},children:g.map((e,t)=>/* @__PURE__ */d("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
10
10
  /* @__PURE__ */p("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:o(t,e.color,e.tone)}}),
11
11
  /* @__PURE__ */p("span",{className:"flex-1 truncate",children:e.label}),
@@ -1,22 +1,22 @@
1
- import{ChartBrush as t}from"./chunk-FEQQMRHJ.js";import{ChartDot as e}from"./chunk-CK2YOGUS.js";import{stepPath as a,curvePath as r,areaBetween as o,areaFrom as l}from"./chunk-VFC6QUEN.js";import{ChartDefs as n,MOTION as i,stagger as s,fillFor as c,dashFor as d,maskId as m}from"./chunk-465RRWBY.js";import{ChartSkeleton as h}from"./chunk-NLHGFQ54.js";import{useHighlight as u,highlightOpacity as f}from"./chunk-CNYAHYE6.js";import{useDragZoom as p,DragBand as g,ChartZoomSummary as y,tooltipBesideBand as k}from"./chunk-2UBR4YUF.js";import{usePlotWidth as x}from"./chunk-MAFUXCPZ.js";import{pairedAxes as v,niceAxis as b,niceMax as M,linearScale as N,axisGutter as w,bandScale as j,ladderScale as $}from"./chunk-2JWPNR2U.js";import{ChartTooltip as V}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as z,CHART_INK as R,STATUS_VARS as A}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as E}from"./chunk-TWVUQUUD.js";import{useShellStrings as L,useShellLocale as W}from"./chunk-DEJIH3ZQ.js";import{formatPercent as D,formatPlain as S}from"./chunk-C3QOHMR6.js";import{useRef as C,useState as U,useId as F,useEffect as I}from"react";import{jsx as T,jsxs as Q}from"react/jsx-runtime";var P=12,B=16,H=26,O=52,Y=t=>"number"==typeof t&&Number.isFinite(t);function J({series:J,labels:Z,height:G=200,stacked:K=!1,stackMode:X="value",levels:q,curve:_="linear",tension:tt=0,max:et,yTickCount:at=4,formatValue:rt,formatTooltipValue:ot,tooltipLabels:lt,yAxisLabel:nt,referenceLines:it,labelEndpoints:st=!1,dots:ct,dotVariant:dt="border",pulse:mt=!1,brush:ht=!1,range:ut,onRangeChange:ft,zoomable:pt=!0,columnStrip:gt,onSelect:yt,loading:kt=!1,animate:xt=!0,reveal:vt="left-to-right",fillVariant:bt="gradient",gridStyle:Mt="solid",width:Nt,className:wt,emptyLabel:jt}){const $t=L().charts,Vt=W(),zt=rt??(t=>S(t,Vt)),Rt=ot??zt,At=jt??$t.noData,Et=C(null),Lt=x(Et),Wt=Nt??Lt,[Dt,St]=U(null),[Ct,Ut]=U(null),{highlighted:Ft}=u(),It=F(),Tt=ut??Ct,Qt=p(ht&&Tt?Tt[1]-Tt[0]+1:Z.length,pt);if(I(()=>{if(null!==Dt)return E(t=>"Escape"===t.key&&(St(null),!0))},[Dt]),kt)/* @__PURE__ */
2
- return T("div",{className:wt,ref:Et,children:/* @__PURE__ */T(h,{height:G,width:Nt??Lt})});const Pt=Z,Bt=ut??Ct??[0,Math.max(0,Pt.length-1)],[Ht,Ot]=Bt,Yt=t=>Qt.slice(ht?t.slice(Ht,Ot+1):t),Jt=lt?Yt(lt):void 0,Zt=J.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(Y)).map(t=>({...t,data:Yt(t.data),pointTones:t.pointTones?Yt(t.pointTones):void 0})),Gt=t=>(ht?Ht:0)+(Qt.view?.[0]??0)+t;if(Z=Yt(Pt),0===Zt.length||0===Z.length)/* @__PURE__ */
1
+ import{ChartDefs as t,MOTION as e,stagger as a,fillFor as r,dashFor as o,maskId as l}from"./chunk-465RRWBY.js";import{ChartBrush as n}from"./chunk-FEQQMRHJ.js";import{ChartDot as i}from"./chunk-CK2YOGUS.js";import{ChartSkeleton as s}from"./chunk-NLHGFQ54.js";import{stepPath as c,curvePath as d,areaBetween as m,areaFrom as h}from"./chunk-VFC6QUEN.js";import{useHighlight as u,highlightOpacity as f}from"./chunk-CNYAHYE6.js";import{useDragZoom as p,DragBand as g,ChartZoomSummary as y,tooltipBesideBand as k}from"./chunk-2UBR4YUF.js";import{usePlotWidth as x}from"./chunk-MAFUXCPZ.js";import{pairedAxes as v,niceAxis as b,niceMax as M,linearScale as N,axisGutter as w,bandScale as j,ladderScale as $}from"./chunk-2JWPNR2U.js";import{ChartTooltip as V}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as z,CHART_INK as R,STATUS_VARS as A}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as E}from"./chunk-TWVUQUUD.js";import{useShellStrings as L,useShellLocale as W}from"./chunk-DEJIH3ZQ.js";import{formatPercent as D,formatPlain as S}from"./chunk-C3QOHMR6.js";import{useRef as C,useState as U,useId as F,useEffect as I}from"react";import{jsx as T,jsxs as Q}from"react/jsx-runtime";var P=12,B=16,H=26,O=52,Y=t=>"number"==typeof t&&Number.isFinite(t);function J({series:J,labels:Z,height:G=200,stacked:K=!1,stackMode:X="value",levels:q,curve:_="linear",tension:tt=0,max:et,yTickCount:at=4,formatValue:rt,formatTooltipValue:ot,tooltipLabels:lt,yAxisLabel:nt,referenceLines:it,labelEndpoints:st=!1,dots:ct,dotVariant:dt="border",pulse:mt=!1,brush:ht=!1,range:ut,onRangeChange:ft,zoomable:pt=!0,columnStrip:gt,onSelect:yt,loading:kt=!1,animate:xt=!0,reveal:vt="left-to-right",fillVariant:bt="gradient",gridStyle:Mt="solid",width:Nt,className:wt,emptyLabel:jt}){const $t=L().charts,Vt=W(),zt=rt??(t=>S(t,Vt)),Rt=ot??zt,At=jt??$t.noData,Et=C(null),Lt=x(Et),Wt=Nt??Lt,[Dt,St]=U(null),[Ct,Ut]=U(null),{highlighted:Ft}=u(),It=F(),Tt=ut??Ct,Qt=p(ht&&Tt?Tt[1]-Tt[0]+1:Z.length,pt);if(I(()=>{if(null!==Dt)return E(t=>"Escape"===t.key&&(St(null),!0))},[Dt]),kt)/* @__PURE__ */
2
+ return T("div",{className:wt,ref:Et,children:/* @__PURE__ */T(s,{height:G,width:Nt??Lt})});const Pt=Z,Bt=ut??Ct??[0,Math.max(0,Pt.length-1)],[Ht,Ot]=Bt,Yt=t=>Qt.slice(ht?t.slice(Ht,Ot+1):t),Jt=lt?Yt(lt):void 0,Zt=J.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(Y)).map(t=>({...t,data:Yt(t.data),pointTones:t.pointTones?Yt(t.pointTones):void 0})),Gt=t=>(ht?Ht:0)+(Qt.view?.[0]??0)+t;if(Z=Yt(Pt),0===Zt.length||0===Z.length)/* @__PURE__ */
3
3
  return T("div",{className:wt,ref:Et,children:/* @__PURE__ */T("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:G},children:At})});const Kt=Z.map((t,e)=>Zt.reduce((t,a)=>t+(Y(a.data[e])?a.data[e]:0),0)),Xt=(t,e)=>Kt[e]>0?t/Kt[e]:null,qt=[];if(K){let t=Z.map(()=>0);for(const e of Zt)t=t.map((t,a)=>t+(Y(e.data[a])?e.data[a]:0)),qt.push("percent"===X?t.map((t,e)=>Xt(t,e)):[...t])}const _t=!!q&&q.length>0,te=t=>"right"===t.axis,ee=!K&&!_t&&void 0===et&&Zt.some(te)&&Zt.some(t=>!te(t)),ae=gt&&!K?gt:null,re=t=>!!ae&&"column"===t.mode,oe=(ee?Zt.filter(t=>!te(t)):Zt).filter(t=>!re(t)),le=ee?Zt.filter(te).flatMap(t=>t.data.filter(Y)):[],ne=K?(qt.at(-1)??[]).filter(Y):oe.flatMap(t=>t.data.filter(Y)),ie=ee?v([Math.min(0,...ne),Math.max(0,...ne)],[Math.min(0,...le),Math.max(0,...le)],{intervals:at+1,integerLeft:ne.every(Number.isInteger),integerRight:le.every(Number.isInteger)}):null,se=ie?ie.left:K&&"percent"===X||_t||void 0!==et?null:b(K?0:Math.min(0,...ne),Math.max(0,...ne),{intervals:at+1,integer:ne.every(Number.isInteger)}),ce=se?se.lo:0,de=K&&"percent"===X?1:se?se.hi:et??M(Math.max(...ne,0)),me=K&&"percent"===X?t=>D(Math.round(100*t),0,Vt):zt,he=_t?q:se?se.ticks:N([ce,de],{from:0,to:1}).ticks(at+1),ue=w(he.map(me),O),fe=ie?w(ie.right.ticks.map(zt),B):B,pe={left:ue,right:Math.max(ue+1,Wt-fe),top:P,bottom:G-H},ge=j(Z.length,{from:pe.left,to:pe.right}),ye=_t?$(q,{from:pe.bottom,to:pe.top}):null,ke=N([ce,de],{from:pe.bottom,to:pe.top}),xe=ke(Math.max(ce,0)),ve=t=>ye?ye(t):ke(t),be=Zt.filter(re),Me=Math.max(0,...Z.map((t,e)=>be.reduce((t,a)=>t+Math.max(0,Y(a.data[e])?a.data[e]:0),0))),Ne=t=>xe-(Me>0?t/Me:0)*(pe.bottom-pe.top)*(ae??0),we=ie?N([ie.right.lo,ie.right.hi],{from:pe.bottom,to:pe.top}):null,je=t=>we&&te(t)?we:ve,$e=ye?ye.levels.map(t=>({value:t,y:ye(t)})):he.map(t=>({value:t,y:ke(t)})),Ve=t=>e=>{e.preventDefault(),St(e=>{const a=(e??0)+t;return Math.min(Z.length-1,Math.max(0,a))})},ze=Math.max(1,Math.ceil(Z.length/Math.max(1,Math.floor(Wt/96))));/* @__PURE__ */
4
4
  return Q("div",{className:`relative ${wt??""}`,ref:Et,children:[
5
5
  /* @__PURE__ */Q("svg",{width:"100%",height:G,viewBox:`0 0 ${Wt} ${G}`,role:"img","aria-label":$t.overIntervals(Zt.map(t=>t.label),Z.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>St(null),onBlur:()=>St(null),style:pt?{userSelect:"none",touchAction:"pan-y"}:void 0,onKeyDown:t=>{if(yt&&null!==Dt&&("Enter"===t.key||" "===t.key))return t.preventDefault(),void yt(Gt(Dt));"ArrowRight"===t.key&&Ve(1)(t),"ArrowLeft"===t.key&&Ve(-1)(t)},children:[
6
6
  /* @__PURE__ */T("defs",{children:/* @__PURE__ */T("clipPath",{id:It,children:/* @__PURE__ */T("rect",{x:pe.left,y:pe.top,width:pe.right-pe.left,height:pe.bottom-pe.top})})}),
7
- /* @__PURE__ */T(n,{id:It,fills:Zt.map((t,e)=>({color:z(t.slot,t.color,t.tone),variant:t.fillVariant??bt})),fadeFrom:K?.42:.3,reveal:!!xt&&vt}),$e.map(t=>/* @__PURE__ */T("line",{x1:pe.left,y1:t.y,x2:pe.right,y2:t.y,stroke:R.grid,strokeWidth:1,shapeRendering:"crispEdges",strokeDasharray:"dashed"===Mt?"3 3":void 0},`grid-${t.value}`)),
7
+ /* @__PURE__ */T(t,{id:It,fills:Zt.map((t,e)=>({color:z(t.slot,t.color,t.tone),variant:t.fillVariant??bt})),fadeFrom:K?.42:.3,reveal:!!xt&&vt}),$e.map(t=>/* @__PURE__ */T("line",{x1:pe.left,y1:t.y,x2:pe.right,y2:t.y,stroke:R.grid,strokeWidth:1,shapeRendering:"crispEdges",strokeDasharray:"dashed"===Mt?"3 3":void 0},`grid-${t.value}`)),
8
8
  /* @__PURE__ */T("line",{x1:pe.left,y1:xe,x2:pe.right,y2:xe,stroke:R.axis,strokeWidth:1,shapeRendering:"crispEdges"}),$e.map(t=>/* @__PURE__ */T("text",{x:pe.left-8,y:t.y+4,textAnchor:"end","data-axis-tick":"true",fontSize:11,fill:R.label,style:{fontVariantNumeric:"tabular-nums"},children:me(t.value)},`ytick-${t.value}`)),ie&&$e.map((t,e)=>/* @__PURE__ */T("text",{x:pe.right+8,y:t.y+4,textAnchor:"start","data-axis-tick":"true",fontSize:11,fill:R.label,style:{fontVariantNumeric:"tabular-nums"},children:zt(ie.right.ticks[e])},`ytick-r-${t.value}`)),nt&&/* @__PURE__ */T("text",{x:12,y:(pe.top+pe.bottom)/2,transform:`rotate(-90 12 ${(pe.top+pe.bottom)/2})`,textAnchor:"middle",fontSize:11,fill:R.label,children:nt}),
9
- /* @__PURE__ */T("g",{clipPath:`url(#${It})`,mask:xt&&vt?`url(#${m(It)})`:void 0,children:Zt.map((t,e)=>{const n=z(t.slot,t.color,t.tone),m=t.mode??(K?"area":"line"),h=f(t.key,Ft);if("step"===m){const e=Z.map((e,a)=>({start:ge(a),end:ge.end(a),value:t.data[a]})).filter(t=>Y(t.value)).map(e=>({start:e.start,end:e.end,y:je(t)(e.value)}));/* @__PURE__ */
10
- return T("path",{d:a(e),fill:"none",stroke:n,strokeWidth:2.5,strokeLinecap:"butt",strokeLinejoin:"miter",opacity:h??void 0,className:"rosh-viz-mark"},t.key)}const u=Z.map((a,r)=>{const o=K?qt[e]?.[r]:t.data[r];return Y(o)?[ge.center(r),je(t)(o)]:null}).filter(t=>null!==t);if(0===u.length)return null;if("column"===m){const a=Math.max(1,.62*ge.bandwidth),r="solid"===t.fillVariant,o=je(t);return re(t)?/* @__PURE__ */T("g",{opacity:h??void 0,className:"rosh-viz-mark",children:Z.map((o,l)=>{const i=t.data[l];if(!Y(i)||i<=0)return null;const s=((t,e)=>be.slice(0,be.findIndex(e=>e.key===Zt[t]?.key)).reduce((t,a)=>t+Math.max(0,Y(a.data[e])?a.data[e]:0),0))(e,l),c=Ne(s+i),d=Ne(s)-(s>0?1:0);/* @__PURE__ */
11
- return T("rect",{x:ge.center(l)-a/2,y:c,width:a,height:Math.max(0,d-c),rx:2,fill:t.pointTones?.[l]?A[t.pointTones[l]]:n,fillOpacity:r?1:.55},l)})},t.key):/* @__PURE__ */T("g",{opacity:h??void 0,className:"rosh-viz-mark",children:Z.map((l,c)=>{const d=K?qt[e]?.[c]:t.data[c];if(!Y(d))return null;const m=o(d);/* @__PURE__ */
12
- return T("rect",{x:ge.center(c)-a/2,y:Math.min(m,xe),width:a,height:Math.abs(xe-m),rx:2,fill:n,fillOpacity:r?1:.35,className:xt?i.rise:void 0,style:xt?s(c,26):void 0},c)})},t.key)}const p=r(u,_,tt),g=K&&e>0?Z.map((t,a)=>[ge.center(a),ve(qt[e-1]?.[a]??0)-2]):null,y=g?o(p,g):l(p,u,xe);/* @__PURE__ */
13
- return Q("g",{opacity:h??void 0,className:"rosh-viz-mark",children:[("area"===m||K)&&
14
- /* @__PURE__ */T("path",{d:y,fill:c(It,e,t.fillVariant??bt,n),stroke:"none"}),
15
- /* @__PURE__ */T("path",{d:p,fill:"none",stroke:n,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",strokeDasharray:d(t.stroke??(t.forecast?"animated-dashed":"solid")),className:xt&&("animated-dashed"===t.stroke||t.forecast&&!t.stroke)?i.march:void 0})]},t.key)})}),it?.map((t,e)=>{const a=t.color??A[t.tone??"critical"],r=ve(t.value);/* @__PURE__ */
9
+ /* @__PURE__ */T("g",{clipPath:`url(#${It})`,mask:xt&&vt?`url(#${l(It)})`:void 0,children:Zt.map((t,l)=>{const n=z(t.slot,t.color,t.tone),i=t.mode??(K?"area":"line"),s=f(t.key,Ft);if("step"===i){const e=Z.map((e,a)=>({start:ge(a),end:ge.end(a),value:t.data[a]})).filter(t=>Y(t.value)).map(e=>({start:e.start,end:e.end,y:je(t)(e.value)}));/* @__PURE__ */
10
+ return T("path",{d:c(e),fill:"none",stroke:n,strokeWidth:2.5,strokeLinecap:"butt",strokeLinejoin:"miter",opacity:s??void 0,className:"rosh-viz-mark"},t.key)}const u=Z.map((e,a)=>{const r=K?qt[l]?.[a]:t.data[a];return Y(r)?[ge.center(a),je(t)(r)]:null}).filter(t=>null!==t);if(0===u.length)return null;if("column"===i){const r=Math.max(1,.62*ge.bandwidth),o="solid"===t.fillVariant,i=je(t);return re(t)?/* @__PURE__ */T("g",{opacity:s??void 0,className:"rosh-viz-mark",children:Z.map((e,a)=>{const i=t.data[a];if(!Y(i)||i<=0)return null;const s=((t,e)=>be.slice(0,be.findIndex(e=>e.key===Zt[t]?.key)).reduce((t,a)=>t+Math.max(0,Y(a.data[e])?a.data[e]:0),0))(l,a),c=Ne(s+i),d=Ne(s)-(s>0?1:0);/* @__PURE__ */
11
+ return T("rect",{x:ge.center(a)-r/2,y:c,width:r,height:Math.max(0,d-c),rx:2,fill:t.pointTones?.[a]?A[t.pointTones[a]]:n,fillOpacity:o?1:.55},a)})},t.key):/* @__PURE__ */T("g",{opacity:s??void 0,className:"rosh-viz-mark",children:Z.map((s,c)=>{const d=K?qt[l]?.[c]:t.data[c];if(!Y(d))return null;const m=i(d);/* @__PURE__ */
12
+ return T("rect",{x:ge.center(c)-r/2,y:Math.min(m,xe),width:r,height:Math.abs(xe-m),rx:2,fill:n,fillOpacity:o?1:.35,className:xt?e.rise:void 0,style:xt?a(c,26):void 0},c)})},t.key)}const p=d(u,_,tt),g=K&&l>0?Z.map((t,e)=>[ge.center(e),ve(qt[l-1]?.[e]??0)-2]):null,y=g?m(p,g):h(p,u,xe);/* @__PURE__ */
13
+ return Q("g",{opacity:s??void 0,className:"rosh-viz-mark",children:[("area"===i||K)&&
14
+ /* @__PURE__ */T("path",{d:y,fill:r(It,l,t.fillVariant??bt,n),stroke:"none"}),
15
+ /* @__PURE__ */T("path",{d:p,fill:"none",stroke:n,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",strokeDasharray:o(t.stroke??(t.forecast?"animated-dashed":"solid")),className:xt&&("animated-dashed"===t.stroke||t.forecast&&!t.stroke)?e.march:void 0})]},t.key)})}),it?.map((t,e)=>{const a=t.color??A[t.tone??"critical"],r=ve(t.value);/* @__PURE__ */
16
16
  return Q("g",{children:[
17
- /* @__PURE__ */T("line",{x1:pe.left,y1:r,x2:pe.right,y2:r,stroke:a,strokeWidth:1,strokeDasharray:"5 4"}),t.label&&/* @__PURE__ */T("text",{x:pe.right-4,y:r-5,textAnchor:"end",fontSize:11,fontWeight:600,fill:a,children:t.label})]},`rule-${e}`)}),"none"!==(ct??(st?"last":"none"))&&Zt.map((t,a)=>{if("column"===t.mode)return null;const r=ct??(st?"last":"none"),o=z(t.slot,t.color,t.tone),l=[...t.data].map(Y).lastIndexOf(!0),n="all"===r?Z.map((t,e)=>e).filter(e=>Y(K?qt[a]?.[e]:t.data[e])):l>=0?[l]:[];/* @__PURE__ */
18
- return Q("g",{children:[n.map(r=>{const n=K?qt[a]?.[r]:t.data[r];return Y(n)?/* @__PURE__ */T(e,{cx:ge.center(r),cy:je(t)(n),color:o,variant:dt,pulse:mt&&r===l,title:`${Z[r]}: ${t.label} ${zt(n)}`},r):null}),st&&l>=0&&Y(K?qt[a]?.[l]:t.data[l])&&/* @__PURE__ */T("text",{x:ge.center(l)-10,y:je(t)(K?qt[a]?.[l]:t.data[l])-9,textAnchor:"end",fontSize:12,fontWeight:600,fill:R.label,style:{fontVariantNumeric:"tabular-nums"},children:zt(K?qt[a]?.[l]:t.data[l])})]},`dots-${t.key}`)}),Z.map((t,e)=>e%ze===0?/* @__PURE__ */T("text",{x:ge.center(e),y:G-8,textAnchor:"middle",fontSize:11,fill:R.label,style:{fontVariantNumeric:"tabular-nums"},children:t},`xtick-${e}`):null),null!==Dt&&/* @__PURE__ */T("line",{x1:ge.center(Dt),y1:pe.top,x2:ge.center(Dt),y2:pe.bottom,stroke:R.axis,strokeWidth:1}),ae&&Me>0&&
17
+ /* @__PURE__ */T("line",{x1:pe.left,y1:r,x2:pe.right,y2:r,stroke:a,strokeWidth:1,strokeDasharray:"5 4"}),t.label&&/* @__PURE__ */T("text",{x:pe.right-4,y:r-5,textAnchor:"end",fontSize:11,fontWeight:600,fill:a,children:t.label})]},`rule-${e}`)}),"none"!==(ct??(st?"last":"none"))&&Zt.map((t,e)=>{if("column"===t.mode)return null;const a=ct??(st?"last":"none"),r=z(t.slot,t.color,t.tone),o=[...t.data].map(Y).lastIndexOf(!0),l="all"===a?Z.map((t,e)=>e).filter(a=>Y(K?qt[e]?.[a]:t.data[a])):o>=0?[o]:[];/* @__PURE__ */
18
+ return Q("g",{children:[l.map(a=>{const l=K?qt[e]?.[a]:t.data[a];return Y(l)?/* @__PURE__ */T(i,{cx:ge.center(a),cy:je(t)(l),color:r,variant:dt,pulse:mt&&a===o,title:`${Z[a]}: ${t.label} ${zt(l)}`},a):null}),st&&o>=0&&Y(K?qt[e]?.[o]:t.data[o])&&/* @__PURE__ */T("text",{x:ge.center(o)-10,y:je(t)(K?qt[e]?.[o]:t.data[o])-9,textAnchor:"end",fontSize:12,fontWeight:600,fill:R.label,style:{fontVariantNumeric:"tabular-nums"},children:zt(K?qt[e]?.[o]:t.data[o])})]},`dots-${t.key}`)}),Z.map((t,e)=>e%ze===0?/* @__PURE__ */T("text",{x:ge.center(e),y:G-8,textAnchor:"middle",fontSize:11,fill:R.label,style:{fontVariantNumeric:"tabular-nums"},children:t},`xtick-${e}`):null),null!==Dt&&/* @__PURE__ */T("line",{x1:ge.center(Dt),y1:pe.top,x2:ge.center(Dt),y2:pe.bottom,stroke:R.axis,strokeWidth:1}),ae&&Me>0&&
19
19
  /* @__PURE__ */Q("g",{pointerEvents:"none","data-column-strip":"true",children:[
20
20
  /* @__PURE__ */T("line",{x1:pe.left,y1:Ne(Me),x2:pe.right,y2:Ne(Me),stroke:R.grid,strokeWidth:1,strokeDasharray:"2 3",shapeRendering:"crispEdges"}),
21
- /* @__PURE__ */T("text",{x:pe.left+4,y:Ne(Me)-4,fontSize:11,fill:R.label,style:{fontVariantNumeric:"tabular-nums"},children:zt(Me)})]}),Qt.drag&&/* @__PURE__ */T(g,{x0:ge(Qt.drag[0]),x1:ge(Qt.drag[1])+ge.bandwidth,top:pe.top,bottom:pe.bottom}),Z.map((t,e)=>/* @__PURE__ */T("rect",{x:ge(e),y:pe.top,width:Math.max(1,ge.bandwidth),height:pe.bottom-pe.top,fill:"transparent",onMouseEnter:()=>St(e),onPointerDown:()=>Qt.press(e),onPointerEnter:()=>Qt.over(e),onPointerUp:Qt.release,onClick:yt?()=>yt(Gt(e)):void 0,style:yt?{cursor:"pointer"}:void 0},`hit-${e}`))]}),Qt.view&&/* @__PURE__ */T(y,{from:Jt?.[0]??Z[0],to:Jt?.at(-1)??Z[Z.length-1],count:Z.length,total:K&&"percent"!==X?Rt(Kt.reduce((t,e)=>t+e,0)):ae?Rt(be.reduce((t,e)=>t+e.data.filter(Y).reduce((t,e)=>t+e,0),0)):void 0,rows:(ae?be:Zt).filter(t=>t.data.some(Y)).map(t=>{const e=t.data.filter(Y),a=z(t.slot,t.color,t.tone);if(0===e.length)return{key:t.key,label:t.label,color:a,value:"—"};const r=e.reduce((t,e)=>t+e,0),o=K||"column"===t.mode?Rt(r):$t.zoomLevel(Rt(r/e.length),Rt(Math.max(...e)));return{key:t.key,label:t.label,color:a,value:o}}),onClear:Qt.clear}),ht&&Pt.length>2&&/* @__PURE__ */T(t,{className:"mt-1",labels:Pt,width:Wt,data:J[0]?.data??[],range:Bt,onRangeChange:t=>{ft?ft(t):Ut(t)}}),null!==Dt&&
21
+ /* @__PURE__ */T("text",{x:pe.left+4,y:Ne(Me)-4,fontSize:11,fill:R.label,style:{fontVariantNumeric:"tabular-nums"},children:zt(Me)})]}),Qt.drag&&/* @__PURE__ */T(g,{x0:ge(Qt.drag[0]),x1:ge(Qt.drag[1])+ge.bandwidth,top:pe.top,bottom:pe.bottom}),Z.map((t,e)=>/* @__PURE__ */T("rect",{x:ge(e),y:pe.top,width:Math.max(1,ge.bandwidth),height:pe.bottom-pe.top,fill:"transparent",onMouseEnter:()=>St(e),onPointerDown:()=>Qt.press(e),onPointerEnter:()=>Qt.over(e),onPointerUp:Qt.release,onClick:yt?()=>yt(Gt(e)):void 0,style:yt?{cursor:"pointer"}:void 0},`hit-${e}`))]}),Qt.view&&/* @__PURE__ */T(y,{from:Jt?.[0]??Z[0],to:Jt?.at(-1)??Z[Z.length-1],count:Z.length,total:K&&"percent"!==X?Rt(Kt.reduce((t,e)=>t+e,0)):ae?Rt(be.reduce((t,e)=>t+e.data.filter(Y).reduce((t,e)=>t+e,0),0)):void 0,rows:(ae?be:Zt).filter(t=>t.data.some(Y)).map(t=>{const e=t.data.filter(Y),a=z(t.slot,t.color,t.tone);if(0===e.length)return{key:t.key,label:t.label,color:a,value:"—"};const r=e.reduce((t,e)=>t+e,0),o=K||"column"===t.mode?Rt(r):$t.zoomLevel(Rt(r/e.length),Rt(Math.max(...e)));return{key:t.key,label:t.label,color:a,value:o}}),onClear:Qt.clear}),ht&&Pt.length>2&&/* @__PURE__ */T(n,{className:"mt-1",labels:Pt,width:Wt,data:J[0]?.data??[],range:Bt,onRangeChange:t=>{ft?ft(t):Ut(t)}}),null!==Dt&&
22
22
  /* @__PURE__ */T("div",{className:"pointer-events-none absolute top-2 z-10",style:k(ge.center(Dt),ge.bandwidth,Wt),children:/* @__PURE__ */T(V,{title:Jt?.[Dt]??Z[Dt],rows:Zt.map((t,e)=>({key:t.key,label:t.label,color:z(t.slot,t.color,t.tone),value:Y(t.data[Dt])?K&&"percent"===X?`${D(100*(Xt(t.data[Dt],Dt)??0),1,Vt)} · ${Rt(t.data[Dt])}`:Rt(t.data[Dt]):void 0})),footnote:K&&"percent"===X?$t.inBucket(Rt(Kt[Dt])):void 0})})]})}export{J as TimeSeriesChart};
@@ -1,4 +1,4 @@
1
- import{StatCard as e,Card as a}from"./chunk-CVXJKHPD.js";import{Sparkline as t}from"./chunk-CKCDGSTC.js";import{PieChart as r}from"./chunk-DYOFTZOC.js";import{Avatar as s}from"./chunk-YAM3L5N4.js";import{ColumnChart as l}from"./chunk-PA3OU3Y7.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-JMGDGNM7.js";import{Button_default as c}from"./chunk-EVYD6UFQ.js";import{TH_ONE_LINE as n}from"./chunk-G67CJAQ2.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";var u={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},h=[12,18,14,22,19,27,24,31,28,35,30,38],p=["J","F","M","A","M","J","J","A","S","O","N","D"],g=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],x=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function v(){/* @__PURE__ */
1
+ import{StatCard as e,Card as a}from"./chunk-CVXJKHPD.js";import{Sparkline as t}from"./chunk-CKCDGSTC.js";import{PieChart as r}from"./chunk-CUJA3HBZ.js";import{Avatar as s}from"./chunk-YAM3L5N4.js";import{ColumnChart as l}from"./chunk-PA3OU3Y7.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-JMGDGNM7.js";import{Button_default as c}from"./chunk-EVYD6UFQ.js";import{TH_ONE_LINE as n}from"./chunk-G67CJAQ2.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";var u={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},h=[12,18,14,22,19,27,24,31,28,35,30,38],p=["J","F","M","A","M","J","J","A","S","O","N","D"],g=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],x=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function v(){/* @__PURE__ */
2
2
  return o(i,{groups:u,children:/* @__PURE__ */o("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */m("div",{className:"mx-auto max-w-6xl space-y-6",children:[
3
3
  /* @__PURE__ */m("div",{className:"flex items-center justify-between gap-4",children:[
4
4
  /* @__PURE__ */m("div",{children:[
@@ -1,4 +1,4 @@
1
- import{useWindowMenuItem as e,Modal as t}from"./chunk-FCILLVVT.js";import{navIcons as r}from"./chunk-4LXCCZDM.js";import{VERSION as n}from"./chunk-PJXHSY5G.js";import{Icon as s}from"./chunk-ISVODSRP.js";import{DEFAULT_SHELL_STRINGS as i,useShellStrings as o,splitAround as a}from"./chunk-DEJIH3ZQ.js";import{useState as l,useCallback as m,isValidElement as c,cloneElement as p}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";var h=i.aboutApp,x={notepad:{name:"Notepad",version:"1.1.0",route:"/notepad",description:h.notepad},preview:{name:"Preview",version:"1.5.0",route:"/preview",description:h.preview},files:{name:"Files",version:"2.0.0",route:"/files",description:h.files},browser:{name:"Browser",version:"1.0.3",route:"/browser",description:h.browser}},u=/* @__PURE__ */d(s,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),w=/* @__PURE__ */d(s,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function v({app:s}){const i=x[s],[h,v]=l(!1),N=m(()=>v(!0),[]),b=o().aboutApp,k=b.title(i.name);if(e(k,N,u),!h)return null;const g=r[i.route],y=c(g)?p(g,{className:"h-9 w-9"}):w,[j,C]=a(b.partOf);/* @__PURE__ */
1
+ import{useWindowMenuItem as e,Modal as t}from"./chunk-FCILLVVT.js";import{navIcons as r}from"./chunk-4LXCCZDM.js";import{VERSION as n}from"./chunk-BXZTH7RX.js";import{Icon as s}from"./chunk-ISVODSRP.js";import{DEFAULT_SHELL_STRINGS as i,useShellStrings as o,splitAround as a}from"./chunk-DEJIH3ZQ.js";import{useState as l,useCallback as m,isValidElement as c,cloneElement as p}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";var h=i.aboutApp,x={notepad:{name:"Notepad",version:"1.1.0",route:"/notepad",description:h.notepad},preview:{name:"Preview",version:"1.5.0",route:"/preview",description:h.preview},files:{name:"Files",version:"2.0.0",route:"/files",description:h.files},browser:{name:"Browser",version:"1.0.3",route:"/browser",description:h.browser}},u=/* @__PURE__ */d(s,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),w=/* @__PURE__ */d(s,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function v({app:s}){const i=x[s],[h,v]=l(!1),N=m(()=>v(!0),[]),b=o().aboutApp,k=b.title(i.name);if(e(k,N,u),!h)return null;const g=r[i.route],y=c(g)?p(g,{className:"h-9 w-9"}):w,[j,C]=a(b.partOf);/* @__PURE__ */
2
2
  return d(t,{open:!0,onClose:()=>v(!1),title:k,size:"sm",compact:!0,bodyScroll:!1,autoHeight:!0,dimensions:[320,320],children:/* @__PURE__ */f("div",{className:"flex flex-col items-center text-center px-5 pt-5 pb-4",children:[
3
3
  /* @__PURE__ */d("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-gray-100 text-gray-600 shrink-0",children:y}),
4
4
  /* @__PURE__ */d("h2",{className:"mt-3 text-lg font-bold text-gray-900",children:i.name}),
@@ -1,7 +1,7 @@
1
- import{formatMoney as e}from"./chunk-GEYM4WN3.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-EEFUXXYJ.js";import{ChartFrame as a}from"./chunk-VWYICGVA.js";import{ColumnChart as l}from"./chunk-PA3OU3Y7.js";import{TH_ONE_LINE as s}from"./chunk-G67CJAQ2.js";import{jsxs as o,jsx as i}from"react/jsx-runtime";function n({spec:n,height:c=200,width:m,animate:d=!0,className:h}){const u=function(r){if(r.currency)return t=>e(t,r.currency);const t=r.unit?` ${r.unit}`:"";return e=>`${e.toLocaleString("en-US",{maximumFractionDigits:2})}${t}`}(n),p=n.currency?r=>e(r,n.currency,{whole:!0}):u,b=n.series.map((e,r)=>({key:`s${r}`,label:e.name,data:e.values})),y=n.title??n.series.map(e=>e.name).join(", "),f=/* @__PURE__ */o("table",{className:"w-full border-collapse text-sm",children:[
1
+ import{formatMoney as e}from"./chunk-GEYM4WN3.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-UF76AFFY.js";import{ColumnChart as a}from"./chunk-PA3OU3Y7.js";import{ChartFrame as l}from"./chunk-VWYICGVA.js";import{TH_ONE_LINE as s}from"./chunk-G67CJAQ2.js";import{jsxs as o,jsx as i}from"react/jsx-runtime";function n({spec:n,height:c=200,width:m,animate:d=!0,className:h}){const u=function(r){if(r.currency)return t=>e(t,r.currency);const t=r.unit?` ${r.unit}`:"";return e=>`${e.toLocaleString("en-US",{maximumFractionDigits:2})}${t}`}(n),p=n.currency?r=>e(r,n.currency,{whole:!0}):u,b=n.series.map((e,r)=>({key:`s${r}`,label:e.name,data:e.values})),y=n.title??n.series.map(e=>e.name).join(", "),f=/* @__PURE__ */o("table",{className:"w-full border-collapse text-sm",children:[
2
2
  /* @__PURE__ */i("thead",{children:/* @__PURE__ */o("tr",{children:[
3
3
  /* @__PURE__ */i("td",{className:"border-b border-gray-200"}),n.series.map((e,r)=>/* @__PURE__ */i("th",{scope:"col",className:`${s} border-b border-gray-200 px-2 py-1 text-right font-semibold text-gray-700`,children:e.name},r))]})}),
4
4
  /* @__PURE__ */i("tbody",{children:n.x.map((e,t)=>/* @__PURE__ */o("tr",{children:[
5
5
  /* @__PURE__ */i("th",{scope:"row",className:`${s} border-t border-gray-100 px-2 py-1 text-left font-normal text-gray-700`,children:e}),n.series.map((e,a)=>{const l=e.values[t];/* @__PURE__ */
6
6
  return i("td",{className:"border-t border-gray-100 px-2 py-1 text-right tabular-nums text-gray-700",children:null===l?r:u(l)},a)})]},t))})]});/* @__PURE__ */
7
- return i(a,{title:y,legend:b.map(e=>({key:e.key,label:e.label,swatch:"line"===n.type?"bar":"square"})),table:f,className:h,children:"line"===n.type?/* @__PURE__ */i(t,{series:b,labels:n.x,height:c,width:m,animate:d,dots:"all",formatValue:p,formatTooltipValue:u}):/* @__PURE__ */i(l,{series:b,labels:n.x,stacked:n.stacked,height:c,width:m,animate:d,formatValue:p,formatTooltipValue:u})})}export{n as SpecChart};
7
+ return i(l,{title:y,legend:b.map(e=>({key:e.key,label:e.label,swatch:"line"===n.type?"bar":"square"})),table:f,className:h,children:"line"===n.type?/* @__PURE__ */i(t,{series:b,labels:n.x,height:c,width:m,animate:d,dots:"all",formatValue:p,formatTooltipValue:u}):/* @__PURE__ */i(a,{series:b,labels:n.x,stacked:n.stacked,height:c,width:m,animate:d,formatValue:p,formatTooltipValue:u})})}export{n as SpecChart};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{Gantt as default}from"../chunk-3LGNMVW6.js";import"../chunk-HNIIDDLJ.js";import"../chunk-EFKJLUYP.js";import"../chunk-3HU63I3K.js";import"../chunk-Y3JW2GW5.js";import"../chunk-36BRD5J3.js";import"../chunk-LF27WIN2.js";import"../chunk-R2VKEMZH.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-DEJIH3ZQ.js";import"../chunk-C3QOHMR6.js";
2
+ export{Gantt as default}from"../chunk-3W3FXX42.js";import"../chunk-3HU63I3K.js";import"../chunk-HNIIDDLJ.js";import"../chunk-EFKJLUYP.js";import"../chunk-Y3JW2GW5.js";import"../chunk-36BRD5J3.js";import"../chunk-LF27WIN2.js";import"../chunk-R2VKEMZH.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-DEJIH3ZQ.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{BrandAssetEditor as default}from"../chunk-QO7UHTUE.js";import"../chunk-UHQBHSWL.js";import"../chunk-6KBDNYRW.js";import"../chunk-YMUHIJDJ.js";import"../chunk-MI67DI3H.js";import"../chunk-25RR3GQW.js";import"../chunk-HNIIDDLJ.js";import"../chunk-EFKJLUYP.js";import"../chunk-CCPUNN4F.js";import"../chunk-ROKUEMAK.js";import"../chunk-ITEOA45V.js";import"../chunk-JMGDGNM7.js";import"../chunk-EVYD6UFQ.js";import"../chunk-M5K4AX4E.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-G67CJAQ2.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-DEJIH3ZQ.js";import"../chunk-C3QOHMR6.js";
2
+ export{BrandAssetEditor as default}from"../chunk-QO7UHTUE.js";import"../chunk-UHQBHSWL.js";import"../chunk-6KBDNYRW.js";import"../chunk-YMUHIJDJ.js";import"../chunk-25RR3GQW.js";import"../chunk-MI67DI3H.js";import"../chunk-HNIIDDLJ.js";import"../chunk-EFKJLUYP.js";import"../chunk-CCPUNN4F.js";import"../chunk-ROKUEMAK.js";import"../chunk-ITEOA45V.js";import"../chunk-JMGDGNM7.js";import"../chunk-EVYD6UFQ.js";import"../chunk-M5K4AX4E.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-G67CJAQ2.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-DEJIH3ZQ.js";import"../chunk-C3QOHMR6.js";
@@ -118,6 +118,7 @@ declare const PRESETS: readonly ["last2Weeks", "lastMonth", "last3Months", "last
118
118
  * in the previous UTC day east of Greenwich, so it never goes through UTC.
119
119
  *
120
120
  * @deprecated Use `toDateKey` (`efficient-shell/ui` or `efficient-shell/format`).
121
+ * Delete by 2027-02-26, after admin-portal imports `toDateKey`.
121
122
  */
122
123
  declare const toISODate: typeof toDateKey;
123
124
  /**
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{MEDIA_FILES_DRAG_TYPE,MEDIA_FILE_DRAG_TYPE,MEDIA_FOLDER_DRAG_TYPE,MediaLibrary as default,readMediaFileDrag}from"../chunk-JTMR3EH3.js";import"../chunk-FCWBO7I3.js";import"../chunk-FXG7TOZN.js";import"../chunk-HWJQLLJA.js";import"../chunk-CGUMJZUB.js";import"../chunk-IC72MGON.js";import"../chunk-3TCGXYUC.js";import"../chunk-SACUSHVN.js";import"../chunk-3RX5KCUH.js";import"../chunk-YM7AWNMY.js";import"../chunk-3YCU6V3U.js";import"../chunk-JWUNK2PW.js";import"../chunk-QIPO4EVJ.js";import"../chunk-KITSIQCV.js";import"../chunk-EO5RLFRX.js";import"../chunk-K5YT5PMJ.js";import"../chunk-BNPJHOAC.js";import"../chunk-ZDDMFFQK.js";import"../chunk-2NMW66P5.js";import"../chunk-6KBDNYRW.js";import"../chunk-VLKDWKVR.js";import"../chunk-OLFYNMTD.js";import"../chunk-LACL4MAR.js";import"../chunk-HNIIDDLJ.js";import"../chunk-EFKJLUYP.js";import"../chunk-HTHNDX32.js";import"../chunk-CGZBDI6C.js";import"../chunk-QMBMK6PP.js";import"../chunk-ID35S5Y6.js";import"../chunk-PT4GMPUB.js";import"../chunk-3DSGJIC7.js";import"../chunk-UZFFSZFI.js";import"../chunk-SV5RRBVA.js";import"../chunk-AYZY3YNC.js";import"../chunk-CCPUNN4F.js";import"../chunk-ROKUEMAK.js";import"../chunk-ITEOA45V.js";import"../chunk-EIFNESXS.js";import"../chunk-PR6FNBKR.js";import"../chunk-RIG5FEVS.js";import"../chunk-NDWX5Z4D.js";import"../chunk-VWGWZY7A.js";import"../chunk-7QSDPSXP.js";import"../chunk-ZGIAMYTI.js";import"../chunk-F3ZOO23R.js";import"../chunk-UGTRSRIW.js";import"../chunk-DWGYC7OD.js";import"../chunk-JMGDGNM7.js";import"../chunk-GOAFMGUI.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-EVYD6UFQ.js";import"../chunk-M5K4AX4E.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-G67CJAQ2.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-TMSSR5UH.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-DEJIH3ZQ.js";import"../chunk-C3QOHMR6.js";
2
+ export{MEDIA_FILES_DRAG_TYPE,MEDIA_FILE_DRAG_TYPE,MEDIA_FOLDER_DRAG_TYPE,MediaLibrary as default,readMediaFileDrag}from"../chunk-JZY2RBPX.js";import"../chunk-FCWBO7I3.js";import"../chunk-FXG7TOZN.js";import"../chunk-HWJQLLJA.js";import"../chunk-CGUMJZUB.js";import"../chunk-IC72MGON.js";import"../chunk-3TCGXYUC.js";import"../chunk-SACUSHVN.js";import"../chunk-3RX5KCUH.js";import"../chunk-YM7AWNMY.js";import"../chunk-VLKDWKVR.js";import"../chunk-OLFYNMTD.js";import"../chunk-LACL4MAR.js";import"../chunk-3YCU6V3U.js";import"../chunk-JWUNK2PW.js";import"../chunk-QIPO4EVJ.js";import"../chunk-KITSIQCV.js";import"../chunk-EO5RLFRX.js";import"../chunk-K5YT5PMJ.js";import"../chunk-BNPJHOAC.js";import"../chunk-ZDDMFFQK.js";import"../chunk-2NMW66P5.js";import"../chunk-6KBDNYRW.js";import"../chunk-HNIIDDLJ.js";import"../chunk-EFKJLUYP.js";import"../chunk-HTHNDX32.js";import"../chunk-CGZBDI6C.js";import"../chunk-QMBMK6PP.js";import"../chunk-ID35S5Y6.js";import"../chunk-PT4GMPUB.js";import"../chunk-3DSGJIC7.js";import"../chunk-UZFFSZFI.js";import"../chunk-SV5RRBVA.js";import"../chunk-AYZY3YNC.js";import"../chunk-CCPUNN4F.js";import"../chunk-ROKUEMAK.js";import"../chunk-ITEOA45V.js";import"../chunk-EIFNESXS.js";import"../chunk-PR6FNBKR.js";import"../chunk-RIG5FEVS.js";import"../chunk-NDWX5Z4D.js";import"../chunk-VWGWZY7A.js";import"../chunk-7QSDPSXP.js";import"../chunk-ZGIAMYTI.js";import"../chunk-F3ZOO23R.js";import"../chunk-UGTRSRIW.js";import"../chunk-DWGYC7OD.js";import"../chunk-JMGDGNM7.js";import"../chunk-GOAFMGUI.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-EVYD6UFQ.js";import"../chunk-M5K4AX4E.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-G67CJAQ2.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-TMSSR5UH.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-DEJIH3ZQ.js";import"../chunk-C3QOHMR6.js";
@@ -24,8 +24,8 @@ interface WidthsBarProps {
24
24
  disabled?: boolean;
25
25
  /**
26
26
  * @deprecated Ignored: the bar draws no ↺ any more, whatever this says —
27
- * the reset is the host row's (`SettingRow` `action`, see above). Delete
28
- * at the next shell major.
27
+ * the reset is the host row's (`SettingRow` `action`, see above). Delete by
28
+ * 2027-02-26, after admin-portal stops passing it.
29
29
  */
30
30
  footer?: boolean;
31
31
  className?: string;
@@ -3,7 +3,7 @@ import { E as EfficientIconProps } from '../../props-3FkowdA2.js';
3
3
  import 'react';
4
4
 
5
5
  /** `spinner`. Heroicons drawings: Copyright (c) Tailwind Labs, Inc., MIT licence. */
6
- /** @deprecated use SpinnerRing; removed in the next major. Draws the shell's one spinner ring. */
6
+ /** @deprecated use SpinnerRing; delete by 2026-12-31 (the icon sets' spinner entry moves to SpinnerRing first). Draws the shell's one spinner ring. */
7
7
  declare function SpinnerIcon({ size, className }: EfficientIconProps): react_jsx_runtime.JSX.Element;
8
8
 
9
9
  export { SpinnerIcon };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{BRAND_ICON_NAMES,ICON_NAMES,isBrandIconName,isIconName}from"../chunk-HNBMBC77.js";export{BRAND_MAX_HEIGHT,BRAND_MIN_HEIGHT_PX,brandBox}from"../chunk-64ACCUNN.js";export{ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,loadIconSet}from"../chunk-VQCKMT5F.js";export{Icon}from"../chunk-ISVODSRP.js";export{activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-J75ZT2JQ.js";
2
+ export{BRAND_ICON_NAMES,ICON_NAMES,isBrandIconName,isIconName}from"../chunk-HNBMBC77.js";export{ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,loadIconSet}from"../chunk-VQCKMT5F.js";export{BRAND_MAX_HEIGHT,BRAND_MIN_HEIGHT_PX,brandBox}from"../chunk-64ACCUNN.js";export{Icon}from"../chunk-ISVODSRP.js";export{activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-J75ZT2JQ.js";
package/dist/index.d.ts CHANGED
@@ -387,7 +387,8 @@ declare function WindowTitle({ title }: {
387
387
  title: string;
388
388
  }): react_jsx_runtime.JSX.Element;
389
389
  /** @deprecated Use <WindowTitle> instead — the hook variant doesn't work
390
- * across bundle boundaries (apps barrel has its own ModalIdContext). */
390
+ * across bundle boundaries (apps barrel has its own ModalIdContext).
391
+ * Delete by 2026-12-31. */
391
392
  declare function useWindowTitle(_title: string): void;
392
393
 
393
394
  /**
@@ -977,7 +978,7 @@ interface MinimizedContextType {
977
978
  * strip's, and is saved with the session. */
978
979
  reorderWindows: (order: readonly string[]) => void;
979
980
  closeEntity: (id: string) => void;
980
- /** @deprecated kept for backward compat — aliases openEntity/closeEntity */
981
+ /** @deprecated kept for backward compat — aliases openEntity/closeEntity. Delete by 2026-12-31. */
981
982
  minimize: (item: MinimizedItem) => void;
982
983
  items: MinimizedItem[];
983
984
  restore: (item: MinimizedItem) => void;
@@ -1564,7 +1565,7 @@ interface DesktopHostConfig {
1564
1565
  saveStickies?: (stickies: unknown[]) => void | Promise<void>;
1565
1566
  /** @deprecated since the stickies left Notepad's store (`saveStickies`):
1566
1567
  * the desktop no longer reads or writes `notepad_notes`, so this is never
1567
- * called. Kept so an existing host still type-checks. */
1568
+ * called. Kept so an existing host still type-checks. Delete by 2026-12-31. */
1568
1569
  saveNotes?: (notes: unknown[]) => void | Promise<void>;
1569
1570
  /** Desktop right-click menu items to hide (all shown by default). Pass keys
1570
1571
  * here when the consumer surfaces them elsewhere — e.g. under Preferences. */