efficient-shell 7.21.1 → 7.22.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.
- package/README.md +47 -0
- package/dist/{Browser-XPRHVZJS.js → Browser-CHVGSLN7.js} +15 -15
- package/dist/Calculator-RKOELZ6W.js +29 -0
- package/dist/ConfirmDialog-JSVEON35.js +1 -0
- package/dist/{CurrencyConverter-MELIA5ZN.js → CurrencyConverter-PLQ664ZV.js} +9 -9
- package/dist/{Documents-BC5M2PBJ.js → Documents-CKQCMALX.js} +15 -15
- package/dist/{Files-AOQNEOZ7.js → Files-XSUFZ7ZR.js} +79 -79
- package/dist/{Notepad-DWVT66EF.js → Notepad-3EGD2WCN.js} +11 -11
- package/dist/PdfViewer-VIX2NDCO.js +1 -0
- package/dist/PomodoroTimer-N7L7HBYO.js +91 -0
- package/dist/{Preview-7LYC662F.js → Preview-RRXQS5BI.js} +29 -29
- package/dist/Sidebar-77VZQLKP.js +44 -0
- package/dist/{Spreadsheet-PDA4JIJ6.js → Spreadsheet-X677FCIY.js} +12 -12
- package/dist/{Stock-44LXLO2A.js → Stock-UOPST3LH.js} +7 -7
- package/dist/{Weather-TCGDUHYK.js → Weather-HXZK2AYT.js} +17 -17
- package/dist/{WorldClock-GIRESICQ.js → WorldClock-MCDW7P6Q.js} +4 -4
- package/dist/apps/index.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/chunk-4EIZZYLK.js +1 -0
- package/dist/{chunk-2GJNH4XW.js → chunk-4M7DEG4E.js} +50 -50
- package/dist/chunk-5VNBEMZQ.js +1 -0
- package/dist/{chunk-RBKIYZ7H.js → chunk-6J7HKGHL.js} +1 -1
- package/dist/{chunk-ITCBLL72.js → chunk-AKEMYW3H.js} +2 -2
- package/dist/{chunk-Z2TTHY7G.js → chunk-ARB5MUWA.js} +1 -1
- package/dist/{chunk-BVYOUFSW.js → chunk-AV5XPUKR.js} +9 -9
- package/dist/{chunk-ZGUQLVY4.js → chunk-B427NVDP.js} +28 -12
- package/dist/{chunk-RN3NG35J.js → chunk-BZD3UC4R.js} +1 -1
- package/dist/{chunk-BQ7GR7H6.js → chunk-E7WPTZE3.js} +11 -11
- package/dist/{chunk-RUHUTZN4.js → chunk-EA7QO447.js} +1 -1
- package/dist/{chunk-JQRIAZDP.js → chunk-FM6TPY42.js} +30 -30
- package/dist/{chunk-SCJT2XXU.js → chunk-FS27CODA.js} +1 -1
- package/dist/{chunk-IQDY2YFN.js → chunk-GNW45MGV.js} +10 -10
- package/dist/{chunk-G3WYQP4R.js → chunk-J65OSKCY.js} +523 -518
- package/dist/chunk-K7PQXJO7.js +1 -0
- package/dist/{chunk-GNCH3JEH.js → chunk-MBHQQFSZ.js} +7 -7
- package/dist/{chunk-2QC3VXCS.js → chunk-MRE4Y2YJ.js} +1 -1
- package/dist/{chunk-7HLTPMQV.js → chunk-MZHH3MC7.js} +1 -1
- package/dist/{chunk-M4TRVJTO.js → chunk-N2OO2ZYF.js} +1 -1
- package/dist/{chunk-B4PGVDB6.js → chunk-OALCYDHN.js} +1 -1
- package/dist/{chunk-XM2IIPJO.js → chunk-OFHMRWST.js} +1 -1
- package/dist/{chunk-FTJ2G343.js → chunk-ONDFYXHG.js} +13 -13
- package/dist/{chunk-VOFDPOB6.js → chunk-RVPQRXC4.js} +1 -1
- package/dist/{chunk-IJ7RXIWX.js → chunk-SZTKBF3D.js} +8 -8
- package/dist/{chunk-KBOYLXAT.js → chunk-TTUVL25O.js} +1 -1
- package/dist/{chunk-76VCH7N6.js → chunk-XFE43ZU5.js} +19 -19
- package/dist/{chunk-XN7CAWSZ.js → chunk-Y6UUDJNU.js} +2 -2
- package/dist/{chunk-JUISSKJW.js → chunk-Y7T3OW2A.js} +1 -1
- package/dist/{chunk-ZRU5F2XT.js → chunk-ZMQ3GBEX.js} +4 -4
- package/dist/{chunk-GIWC2ZTG.js → chunk-ZU47TGM3.js} +2 -2
- package/dist/file-intake/index.js +1 -1
- package/dist/i18n/index.d.ts +1 -1
- package/dist/icons/efficient-looks.js +189 -177
- package/dist/icons/efficient.d.ts +16 -1
- package/dist/icons/efficient.js +92 -86
- package/dist/icons/index.d.ts +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/{index-DbNqOkOy.d.ts → index-CMwbvwiY.d.ts} +73 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +113 -113
- package/dist/locales/zh-Hans.d.ts +1 -1
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +8 -8
- package/dist/markdown/index.js +1 -1
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/{strings-BQtq9300.d.ts → strings-BfHOx-Bl.d.ts} +26 -0
- package/dist/telemetry/index.js +1 -1
- package/dist/themes.css +20 -20
- package/dist/ui/index.d.ts +2 -2
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +122 -7
- package/package.json +1 -1
- package/dist/Calculator-BLKI5RDH.js +0 -29
- package/dist/ConfirmDialog-AVFQGXKL.js +0 -1
- package/dist/PdfViewer-PHABUM7K.js +0 -1
- package/dist/PomodoroTimer-RHJHTLSU.js +0 -91
- package/dist/Sidebar-PYURV2S2.js +0 -44
- package/dist/chunk-IDJPDSA3.js +0 -1
- package/dist/chunk-JTNKC4CR.js +0 -1
- package/dist/chunk-QRCDQPJA.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{toast_default as t}from"./chunk-
|
|
2
|
-
return(new Date).toISOString()}var
|
|
1
|
+
import{toast_default as t}from"./chunk-EA7QO447.js";import{useShellPrefs as e}from"./chunk-ZMQ3GBEX.js";import{useSyncExternalStore as n,useCallback as o,useMemo as a}from"react";var r=[{id:"bell",label:"Bell",description:"Soft bell with one harmonic"},{id:"chime",label:"Chime",description:"Two-note ascending chime"},{id:"bowl",label:"Singing Bowl",description:"Long-decay meditation tone"},{id:"wind-chimes",label:"Wind Chimes",description:"Four soft tones in succession"},{id:"off",label:"Off (silent)",description:"No sound — only desktop notification"}],i=[{id:"none",label:"None"},{id:"tick-fast",label:"Ticking Fast"},{id:"tick-slow",label:"Ticking Slow"},{id:"rain",label:"Rain"},{id:"fireplace",label:"Fireplace"},{id:"white",label:"White Noise"},{id:"pink",label:"Pink Noise"},{id:"brown",label:"Brown Noise"}],c=()=>`pomodoro-${/* @__PURE__ */(new Date).toISOString().slice(0,10)}`,l={focus:1500,short:300,long:900},s="bell",u=100,d=1,f="none",m=50,h={autoStartBreaks:!1,autoStartPomodoros:!1,longBreakInterval:4},g={running:!1,remaining:l.focus,mode:"focus",total:l.focus,streak:0,count:"undefined"!=typeof localStorage?(()=>{try{return parseInt(localStorage.getItem(c())||"0",10)||0}catch{return 0}})():0},p=null,k=/* @__PURE__ */new Set,w=t=>{g={...g,...t},k.forEach(t=>t())};function M(){return g}function S(t){return k.add(t),()=>{k.delete(t)}}function b(t){l=t,g.running||g.remaining!==g.total||w({remaining:t[g.mode],total:t[g.mode]})}function y(t){s=t}function v(t,e){u=Math.max(0,Math.min(100,Math.round(t))),d=Math.max(1,Math.min(5,Math.round(e)))}function T(t){h={autoStartBreaks:!!t.autoStartBreaks,autoStartPomodoros:!!t.autoStartPomodoros,longBreakInterval:Math.max(1,Math.min(20,Math.round(t.longBreakInterval||4)))}}function A(t,e){f=t,m=Math.max(0,Math.min(100,Math.round(e))),g.running&&"focus"===g.mode?(R(),G()):"none"!==t&&0!==m||R()}function I(){g.running||(w({running:!0}),p=setInterval(C,1e3),"focus"===g.mode&&G())}function x(){(g.running||null!==p)&&(null!==p&&(clearInterval(p),p=null),w({running:!1}),R())}function B(t){x(),w({mode:t,remaining:l[t],total:l[t]})}function C(){g.remaining<=1?function(){null!==p&&(clearInterval(p),p=null);R(),N(s,{volume:u,repeat:d});const e="focus"===g.mode?"Pomodoro complete — time for a break! 🍅":"Break's over — back to work!";if("undefined"!=typeof Notification&&"granted"===Notification.permission)try{new Notification(e)}catch{}try{t.info(e)}catch{}if("focus"===g.mode){const t=g.streak+1,e=g.count+1;(t=>{try{localStorage.setItem(c(),String(t))}catch{}})(e);const n=t%h.longBreakInterval===0?"long":"short";w({running:!1,streak:t,count:e,mode:n,remaining:l[n],total:l[n]}),h.autoStartBreaks&&setTimeout(()=>I(),50)}else w({running:!1,mode:"focus",remaining:l.focus,total:l.focus}),h.autoStartPomodoros&&setTimeout(()=>I(),50)}():w({remaining:g.remaining-1})}function N(t=s,e={}){if("off"===t)return;const n=Math.max(0,Math.min(100,e.volume??100))/100;if(0===n)return;const o=Math.max(1,Math.min(5,e.repeat??1));for(let e=0;e<o;e++)setTimeout(()=>P(t,n),2500*e)}function P(t,e){try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=(t,n,a,r=.22,i="sine")=>{const c=o.createOscillator(),l=o.createGain();c.connect(l),l.connect(o.destination),c.type=i,c.frequency.value=t;const s=o.currentTime+n;l.gain.setValueAtTime(0,s),l.gain.linearRampToValueAtTime(r*e,s+.03),l.gain.exponentialRampToValueAtTime(1e-4,s+a),c.start(s),c.stop(s+a)};let r=2;"bell"===t?(a(880,0,1.8),a(1320,0,1.4,.1),r=2):"chime"===t?(a(659.25,0,.7),a(880,.2,1.3),r=2):"bowl"===t?(a(440,0,3.4,.22),a(660,0,3,.08),a(880,.05,2.8,.05),r=4):"wind-chimes"===t&&(a(1175,0,1.1,.16),a(880,.15,1.3,.16),a(1318,.3,1.5,.16),a(1047,.5,1.7,.13),r=3),setTimeout(()=>{try{o.close()}catch{}},1e3*r+500)}catch{}}var D=null,O={none:0,white:.3,pink:.3,brown:.3,"tick-fast":.6,"tick-slow":.6,rain:.4,fireplace:.5};function _(t,e){if("none"===e)return null;const n=t.sampleRate,o="white"===e||"pink"===e||"brown"===e?2:4,a=n*o,r=t.createBuffer(1,a,n),i=r.getChannelData(0);if("white"===e)for(let t=0;t<a;t++)i[t]=.5*(2*Math.random()-1);else if("pink"===e){let t=0,e=0,n=0,o=0,r=0,c=0,l=0;for(let s=0;s<a;s++){const a=2*Math.random()-1;t=.99886*t+.0555179*a,e=.99332*e+.0750759*a,n=.969*n+.153852*a,o=.8665*o+.3104856*a,r=.55*r+.5329522*a,c=-.7616*c-.016898*a,i[s]=.11*(t+e+n+o+r+c+l+.5362*a)*.55,l=.115926*a}}else if("brown"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=3.5*t*.5}}else if("tick-fast"===e||"tick-slow"===e){const t="tick-fast"===e?.5:1,r=Math.floor(.045*n);for(let e=0;e<o;e+=t){const t=Math.floor(e*n);for(let e=0;e<r&&t+e<a;e++){const o=Math.exp(-e/n*180),a=2*Math.random()-1,r=Math.sin(2*Math.PI*1100*(e/n));i[t+e]+=(.7*a+.25*r)*o*.55}}}else if("rain"===e){let t=0;for(let e=0;e<a;e++){const o=2*Math.random()-1,a=o-.93*t;t=o;const r=.7+.3*Math.sin(e/n*2*Math.PI*.25);i[e]=a*r*.4}}else if("fireplace"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=1.6*t}let e=.4*Math.random()*n;for(;e<a;){const t=Math.floor((.012+.05*Math.random())*n),o=.35+.45*Math.random(),r=Math.floor(e);for(let e=0;e<t&&r+e<a;e++){const t=Math.exp(-e/n*90);i[r+e]+=(2*Math.random()-1)*t*o}e+=(.08+.62*Math.random())*n}}return r}function G(){if(!D&&"none"!==f&&0!==m)try{const t=window.AudioContext||window.webkitAudioContext;if(!t)return;const e=new t,n=_(e,f);if(!n){try{e.close()}catch{}return}const o=e.createBufferSource();o.buffer=n,o.loop=!0;const a=e.createGain();a.gain.value=m/100*O[f],o.connect(a).connect(e.destination),o.start(),D={ctx:e,src:o,gain:a}}catch{}}function R(){if(D){try{D.src.stop()}catch{}try{D.ctx.close()}catch{}D=null}}function E(t,e){if("none"!==t&&0!==e)try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=_(o,t);if(!a){try{o.close()}catch{}return}const r=o.createBufferSource();r.buffer=a,r.loop=!0;const i=o.createGain();i.gain.value=e/100*O[t],r.connect(i).connect(o.destination),r.start(),setTimeout(()=>{try{r.stop()}catch{}try{o.close()}catch{}},3e3)}catch{}}var F="pomodoro_tasks",V="pomodoro_tasks_migrated";function j(){return Math.random().toString(36).slice(2,11)}function Q(){/* @__PURE__ */
|
|
2
|
+
return(new Date).toISOString()}var W=null,q=[],J=!1,L=null,X=/* @__PURE__ */new Set;function Z(){for(const t of X)t()}function $(t){q=t,Z()}function z(){const t=W;return t?L=t.list().then(e=>{W===t&&(q=e,J=!0,Z())}).catch(()=>{W===t&&(J=!0,Z())}).finally(()=>{L=null}):(q=[],J=!0,Z(),Promise.resolve())}function H(t){W=t,q=[],J=!1,t?z():Z()}function K(t){return X.add(t),!W||J||L||z(),()=>{X.delete(t)}}function U(){return q}function Y(){const t=function(){const{prefs:t,save:n}=e(),r=a(()=>{const e=t.todo_tasks;return Array.isArray(e)?e:[]},[t.todo_tasks]),i=o(t=>{n({todo_tasks:t})},[n]),c=o(t=>{const e=j(),n=Q(),o={done:!1,...t,name:t.name.trim(),id:e,createdAt:n,updatedAt:n};return i([...r,o]),e},[r,i]),l=o((t,e)=>{i(r.map(n=>n.id===t?{...n,...e,id:n.id,updatedAt:Q()}:n))},[r,i]),s=o(t=>{i(r.filter(e=>e.id!==t))},[r,i]),u=o(t=>{const e=r.find(e=>e.id===t);e&&l(t,{done:!e.done})},[r,l]);return{tasks:r,addTask:c,updateTask:l,removeTask:s,toggleDone:u,setAllTasks:i}}(),r=n(K,U,U),i=o(e=>{const n=W;if(!n)return t.addTask(e);const o="tmp-"+j(),a=Q(),r={done:!1,...e,name:e.name.trim(),id:o,createdAt:a,updatedAt:a};return $([...q,r]),n.create({...e,name:e.name.trim()}).then(t=>$(q.map(e=>e.id===o?{...r,...t}:e))).catch(()=>$(q.filter(t=>t.id!==o))),o},[t]),c=o((e,n)=>{const o=W;if(!o)return t.updateTask(e,n);$(q.map(t=>t.id===e?{...t,...n,id:e,updatedAt:Q()}:t)),o.update(e,n).catch(()=>{z()})},[t]),l=o(e=>{const n=W;if(!n)return t.removeTask(e);const o=q;$(q.filter(t=>t.id!==e)),n.remove(e).catch(()=>$(o))},[t]),s=o(e=>{if(!W)return t.toggleDone(e);const n=q.find(t=>t.id===e);n&&c(e,{done:!n.done})},[t,c]),u=o(e=>{W||t.setAllTasks(e)},[t]);return null===W?t:{tasks:r,addTask:i,updateTask:c,removeTask:l,toggleDone:s,setAllTasks:u}}function tt(t,e){try{if(localStorage.getItem(V))return;const n=localStorage.getItem(F);if(!n)return void localStorage.setItem(V,"1");const o=JSON.parse(n);if(!Array.isArray(o)||0===o.length)return localStorage.removeItem(F),void localStorage.setItem(V,"1");const a=Q(),r=o.filter(t=>"string"==typeof t?.name).map(t=>({id:t.id||j(),name:String(t.name),done:!!t.done,estimated:"number"==typeof t.estimated?t.estimated:void 0,completed:"number"==typeof t.completed?t.completed:void 0,createdAt:a,updatedAt:a})),i=new Set(t.map(t=>t.id));e([...r.filter(t=>!i.has(t.id)),...t]),localStorage.removeItem(F),localStorage.setItem(V,"1")}catch{try{localStorage.setItem(V,"1")}catch{}}}export{r as ALARM_OPTIONS,i as FOCUS_SOUND_OPTIONS,M as getPomoSnapshot,tt as migratePomodoroTasksOnce,N as playAlarm,x as pomoPause,I as pomoStart,B as pomoSwitchMode,E as previewFocusSound,y as setPomoAlarm,v as setPomoAlarmConfig,T as setPomoBehaviour,b as setPomoDurations,A as setPomoFocusSound,H as setShellTodoProvider,S as subscribePomo,Y as useTodoTasks};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useShellStrings as e}from"./chunk-
|
|
1
|
+
import{useShellStrings as e}from"./chunk-4EIZZYLK.js";import{Icon as i}from"./chunk-B427NVDP.js";import{Fragment as t}from"react";import{jsx as n,jsxs as a}from"react/jsx-runtime";var s=/* @__PURE__ */n(i,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 text-gray-300","aria-hidden":!0}),r="inline-flex min-w-0 items-center gap-1 truncate rounded px-1 -mx-1 text-gray-500 transition-colors hover:text-gray-900 hover:underline rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]";function l({items:i,separator:l,maxItems:c=0,className:m}){const o=e().breadcrumbs;if(0===i.length)return null;const h=l??s,d=[],u=i.length-1;if(c>0&&i.length>c&&c>=2){const e=Math.max(1,c-1);d.push({kind:"item",item:i[0],isLast:!1}),d.push({kind:"ellipsis"});for(let t=i.length-e;t<=u;t++)d.push({kind:"item",item:i[t],isLast:t===u})}else i.forEach((e,i)=>d.push({kind:"item",item:e,isLast:i===u}));/* @__PURE__ */
|
|
2
2
|
return n("nav",{"aria-label":o.label,className:`min-w-0 ${m??""}`,children:/* @__PURE__ */n("ol",{className:"flex items-center gap-2 text-sm",children:d.map((e,i)=>/* @__PURE__ */a(t,{children:[i>0&&/* @__PURE__ */n("li",{"aria-hidden":!0,className:"flex items-center",children:h}),
|
|
3
3
|
/* @__PURE__ */n("li",{className:"flex min-w-0 items-center",children:"ellipsis"===e.kind?/* @__PURE__ */n("span",{className:"px-0.5 text-gray-400 select-none","aria-label":o.hidden,children:"…"}):e.isLast||!e.item.href&&!e.item.onClick?/* @__PURE__ */a("span",{"aria-current":e.isLast?"page":void 0,className:"inline-flex min-w-0 items-center gap-1 truncate "+(e.isLast?"font-medium text-gray-900":"text-gray-500"),children:[e.item.icon,
|
|
4
4
|
/* @__PURE__ */n("span",{className:"truncate",children:e.item.label})]}):e.item.href?/* @__PURE__ */a("a",{href:e.item.href,onClick:e.item.onClick,className:r,children:[e.item.icon,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import{escapeHtml as e}from"./chunk-BR22X7E5.js";import{TH_ONE_LINE as t}from"./chunk-
|
|
2
|
-
return h("div",{...n,dangerouslySetInnerHTML:r})}function m({columns:e,data:m,onChange:p,onColumnsChange:f,fixedRows:y=!1,minRows:b=15,maxHeight:v="260px",cellStyles:x,onFocusChange:M,onSelectionChange:D}){const k=o(null),C=r().grid,[E
|
|
1
|
+
import{escapeHtml as e}from"./chunk-BR22X7E5.js";import{TH_ONE_LINE as t}from"./chunk-RVPQRXC4.js";import{useBrowserLayoutEffect as n}from"./chunk-D65T4H6J.js";import{useShellStrings as r}from"./chunk-4EIZZYLK.js";import{useRef as o,useState as l,useEffect as c,useCallback as a,useMemo as s}from"react";import{createPortal as i}from"react-dom";import{jsxs as u,jsx as h,Fragment as d}from"react/jsx-runtime";function w(e,t){const n=e[e.length-1];return n&&!n.some(e=>e.trim())?e:[...e,Array(t).fill("")]}function g({text:t,...n}){const r=s(()=>({__html:e(t)}),[t]);/* @__PURE__ */
|
|
2
|
+
return h("div",{...n,dangerouslySetInnerHTML:r})}function m({columns:e,data:m,onChange:p,onColumnsChange:f,fixedRows:y=!1,minRows:b=15,maxHeight:v="260px",cellStyles:x,onFocusChange:M,onSelectionChange:D}){const k=o(null),C=r().grid,[E,L]=l(null);c(()=>{M?.(E)},[E,M]);const[$,S]=l({}),z=o(null),[N,A]=l({}),R=o(null),[O,T]=l(null),[K,P]=l(null),[F,I]=l(null),[X,Y]=l(null),[j,H]=l(null),q=o(null);n(()=>{const e=q.current;if(!e||e.row!==j?.row||e.col!==j?.col)return;q.current=null;const t=k.current?.querySelector(`[data-row="${e.row}"][data-col="${e.col}"]`);if(!t)return;t.focus();const n=document.createRange();n.selectNodeContents(t),n.collapse(!1);const r=window.getSelection();r?.removeAllRanges(),r?.addRange(n)},[j]);const[B,W]=l(null),[V,Z]=l(null);c(()=>{D?.(B&&V?{anchor:B,end:V}:null)},[B,V,D]);const _=o(!1),[J,Q]=l(null),U=o(!1),G=o({a:null,e:null});G.current={a:B,e:V};const ee=B&&V&&(B.row!==V.row||B.col!==V.col),te=[...m];if(!y)for(;te.length<b;)te.push(Array(e.length).fill(""));const ne=a((t,n,r)=>{const o=te.map(e=>[...e]);for(;o.length<=t;)o.push(Array(e.length).fill(""));for(;o[t].length<e.length;)o[t].push("");o[t][n]=r,p(o)},[te,e.length,p]),re=a((e,t,n)=>{if(0!==e.button)return;const r=document.activeElement;if(r?.dataset?.row&&r?.dataset?.col){const e=parseInt(r.dataset.row),t=parseInt(r.dataset.col),n=r.textContent||"";if(n!==(te[e]?.[t]||"")){const r=te.map(e=>[...e]);r[e]&&(r[e][t]=n,p(r))}}_.current=!0,e.shiftKey&&B||W({row:t,col:n}),Z({row:t,col:n})},[te,p,B]),oe=a((e,t)=>{_.current&&Z({row:e,col:t})},[]);c(()=>{const e=()=>{_.current=!1};return window.addEventListener("mouseup",e),()=>window.removeEventListener("mouseup",e)},[]),c(()=>{const e=e=>{if(!e.ctrlKey&&!e.metaKey||"c"!==e.key)return;if(!B||!V)return;const t=window.getSelection();if(t&&t.toString().length>0&&!ee)return;const n=Math.min(B.row,V.row),r=Math.max(B.row,V.row),o=Math.min(B.col,V.col),l=Math.max(B.col,V.col),c=[];for(let e=n;e<=r;e++){const t=[];for(let n=o;n<=l;n++)t.push(te[e]?.[n]||"");c.push(t.join("\t"))}const a=c.join("\n");a&&(e.preventDefault(),navigator.clipboard.writeText(a))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[B,V,te,ee]),c(()=>{const t=t=>{if(!E)return;const n=document.activeElement;if(n?.isContentEditable)return;if(!k.current?.contains(n))return;const r=t.clipboardData?.getData("text/plain");if(!r)return;t.preventDefault();const o=r.split("\n").filter(e=>e).map(e=>e.split("\t")),l=te.map(e=>[...e]);for(let t=0;t<o.length;t++){const n=E.row+t;for(;l.length<=n;)l.push(Array(e.length).fill(""));for(;l[n].length<e.length;)l[n].push("");for(let r=0;r<o[t].length;r++){const c=E.col+r;if(c>=e.length)break;e[c].readOnly||(l[n][c]=o[t][r].trim())}}p(y?l:w(l,e.length)),W({row:E.row,col:E.col}),Z({row:Math.min(E.row+o.length-1,l.length-1),col:Math.min(E.col+(o[0]?.length||1)-1,e.length-1)})};return window.addEventListener("paste",t),()=>window.removeEventListener("paste",t)},[E,te,e,p,y]);const le=a((t,n,r)=>{const o=t.clipboardData.getData("text/plain");if(!o)return;const l=o.split("\n").map(e=>e.split("\t"));if(l.length<=1&&l[0]?.length<=1)return;t.preventDefault();const c=te.map(e=>[...e]);for(let t=0;t<l.length;t++){const o=n+t;for(;c.length<=o;)c.push(Array(e.length).fill(""));for(;c[o].length<e.length;)c[o].push("");for(let n=0;n<l[t].length;n++){const a=r+n;if(a>=e.length)break;e[a].readOnly||(c[o][a]=l[t][n].trim())}}p(y?c:w(c,e.length))},[te,e,p,y]),ce=a((t,n,r)=>{let o=n,l=r;if("Tab"===t.key)t.preventDefault(),l=t.shiftKey?r-1:r+1,l>=e.length&&(l=0,o=n+1),l<0&&(l=e.length-1,o=n-1);else if("Enter"===t.key)t.preventDefault(),o=t.shiftKey?n-1:n+1;else if("ArrowDown"===t.key)t.preventDefault(),o=n+1;else if("ArrowUp"===t.key)t.preventDefault(),o=n-1;else if("ArrowLeft"===t.key)t.preventDefault(),l=r-1;else{if("ArrowRight"!==t.key){if("Delete"===t.key||"Backspace"===t.key){const o=t.target;if(o.isContentEditable)return void(o.textContent&&window.getSelection()?.toString()===o.textContent&&(t.preventDefault(),ne(n,r,"")));if(t.preventDefault(),B&&V){const t=Math.min(B.row,V.row),n=Math.max(B.row,V.row),r=Math.min(B.col,V.col),o=Math.max(B.col,V.col),l=te.map(e=>[...e]);for(let c=t;c<=n;c++)for(let t=r;t<=o;t++)l[c]&&!e[t]?.readOnly&&(l[c][t]="");p(l)}else ne(n,r,"");return}return}t.preventDefault(),l=r+1}for(;l>=0&&l<e.length&&e[l].readOnly;)l+="Tab"===t.key&&t.shiftKey?-1:1;if(o>=0&&o<te.length&&l>=0&&l<e.length){const e=k.current?.querySelector(`[data-row="${o}"][data-col="${l}"]`);e&&(e.focus({preventScroll:!0}),e.scrollIntoView({block:"nearest",inline:"nearest"}),L({row:o,col:l}),H(null),W({row:o,col:l}),Z({row:o,col:l}))}},[e,te,te.length,ne,B,V,p]),ae=a(t=>{if(!y&&t>=te.length-2){const t=te.map(e=>[...e]);for(let n=0;n<5;n++)t.push(Array(e.length).fill(""));p(t)}},[y,te,e.length,p]),[se,ie]=l(null);c(()=>{if(!se)return;const e=()=>ie(null);return window.addEventListener("pointerdown",e),()=>window.removeEventListener("pointerdown",e)},[se]);const ue=a(t=>{const n=te.map(e=>[...e]);n.splice(t,0,Array(e.length).fill("")),p(n)},[te,e.length,p]),he=a(e=>{if(te.length<=1)return;const t=te.filter((t,n)=>n!==e);p(t)},[te,p]),de=a(e=>{const t=te.map(t=>{const n=[...t];return n.splice(e,0,""),n});p(t)},[te,p]),we=a(t=>{if(e.length<=1)return;const n=te.map(e=>{const n=[...e];return n.splice(t,1),n});p(n)},[te,e.length,p]),ge=a((e,t)=>{e.preventDefault(),y||ie({x:e.clientX,y:e.clientY,items:[{label:C.insertRowAbove,onClick:()=>{ue(t),ie(null)}},{label:C.insertRowBelow,onClick:()=>{ue(t+1),ie(null)}},{label:C.deleteRow(t+1),onClick:()=>{he(t),ie(null)}}]})},[y,ue,he,C]),me=a((t,n)=>{t.preventDefault(),y||ie({x:t.clientX,y:t.clientY,items:[{label:C.insertColumnLeft,onClick:()=>{de(n),ie(null)}},{label:C.insertColumnRight,onClick:()=>{de(n+1),ie(null)}},{label:C.deleteColumn(String(e[n]?.title||n+1)),onClick:()=>{we(n),ie(null)}}]})},[y,e,de,we,C]),pe=t=>$[t]??e[t]?.width??150;c(()=>{const t=e=>{if(!z.current)return;const t=e.clientX-z.current.startX,n=Math.max(40,z.current.startW+t);S(e=>({...e,[z.current.col]:n}))},n=()=>{if(z.current&&f){const t=e.map((e,t)=>({...e,width:$[t]??e.width}));t[z.current.col]={...t[z.current.col],width:$[z.current.col]??e[z.current.col].width},f(t)}z.current=null,document.body.style.cursor=""};return window.addEventListener("mousemove",t),window.addEventListener("mouseup",n),()=>{window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",n)}},[e,$,f]);const fe=e=>N[e]??28;c(()=>{const e=e=>{if(!R.current)return;const t=e.clientY-R.current.startY,n=Math.max(20,R.current.startH+t);A(e=>({...e,[R.current.row]:n}))},t=()=>{R.current=null,document.body.style.cursor=""};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[]);const ye=a(t=>{const n=document.createElement("canvas").getContext("2d");if(!n)return;n.font="12px ui-monospace, SFMono-Regular, Menlo, monospace";let r=0;for(const e of te){const o=String(e[t]??"").replace(/<[^>]*>/g,""),l=n.measureText(o).width;l>r&&(r=l)}const o=n.measureText(e[t]?.title??"").width;o>r&&(r=o);const l=Math.max(40,Math.ceil(r+24));if(S(e=>({...e,[t]:l})),f){const n=e.map((e,n)=>({...e,width:n===t?l:$[n]??e.width}));f(n)}},[te,e,$,f]),be=a(e=>{A(t=>{const n={...t};return delete n[e],n})},[]),ve=a(t=>{const{a:n,e:r}=G.current;if(!n||!r)return;const o=Math.min(n.row,r.row),l=Math.max(n.row,r.row),c=Math.min(n.col,r.col),a=Math.max(n.col,r.col);let s=o,i=l,u=c,h=a;t.row>l?i=t.row:t.row<o&&(s=t.row),t.col>a?h=t.col:t.col<c&&(u=t.col);const d=l-o+1,w=a-c+1,g=te.map(e=>[...e]);for(;g.length<=i;)g.push(Array(e.length).fill(""));for(const e of g)for(;e.length<=h;)e.push("");function m(e){const t=e.map(e=>parseFloat(e));if(t.length<2||t.some(e=>Number.isNaN(e)))return null;const n=t[1]-t[0];for(let e=2;e<t.length;e++)if(Math.abs(t[e]-t[e-1]-n)>1e-9)return null;return{step:n}}for(let e=s;e<=i;e++)for(let t=u;t<=h;t++){if(e>=o&&e<=l&&t>=c&&t<=a)continue;let n;if(1===w&&u===c&&h===a){const r=m(Array.from({length:d},(e,n)=>g[o+n]?.[t]??""));if(r){const c=parseFloat(g[l]?.[t]??"0"),a=parseFloat(g[o]?.[t]??"0"),s=e>l?e-l:-(o-e);n=String((e>l?c:a)+r.step*s)}else{const r=((e-o)%d+d)%d;n=g[o+r]?.[t]??""}}else if(1===d&&s===o&&i===l){const r=m(Array.from({length:w},(t,n)=>g[e]?.[c+n]??""));if(r){const o=parseFloat(g[e]?.[a]??"0"),l=parseFloat(g[e]?.[c]??"0"),s=t>a?t-a:-(c-t);n=String((t>a?o:l)+r.step*s)}else{const r=((t-c)%w+w)%w;n=g[e]?.[c+r]??""}}else{const r=((e-o)%d+d)%d,l=((t-c)%w+w)%w;n=g[o+r]?.[c+l]??""}g[e][t]=n}p(g),W({row:s,col:u}),Z({row:i,col:h})},[te,e.length,p]);c(()=>{const e=e=>{if(!U.current)return;const t=document.elementFromPoint(e.clientX,e.clientY),n=t?.closest?.("[data-row][data-col]");if(!n)return;const r=parseInt(n.dataset.row),o=parseInt(n.dataset.col);Q({row:r,col:o})},t=()=>{U.current&&J&&ve(J),U.current=!1,Q(null),document.body.style.cursor=""};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[J,ve]);const xe=e=>{e.preventDefault(),e.stopPropagation(),U.current=!0,document.body.style.cursor="crosshair"},Me=o(null),[De,ke]=l(0),[Ce,Ee]=l(800);c(()=>{const e=Me.current;if(!e)return;const t=()=>Ee(e.clientHeight||800);t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]);const Le=te.length>100,$e=Le?Math.max(0,Math.floor(De/28)-20):0,Se=Le?Math.min(te.length,Math.ceil((De+Ce)/28)+20):te.length,ze=s(()=>te.slice($e,Se),[te,$e,Se]),Ne=28*$e,Ae=28*(te.length-Se),Re="px-2 h-8 text-left text-xs font-medium text-gray-500 uppercase bg-gray-100 border-b border-r border-gray-200 select-none";/* @__PURE__ */
|
|
3
3
|
return u("div",{ref:Me,className:"border border-gray-300 rounded overflow-scroll grid-scroll",style:{maxHeight:v,height:v},onScroll:e=>ke(e.target.scrollTop),children:[
|
|
4
4
|
/* @__PURE__ */u("table",{ref:k,className:"border-collapse select-none",style:{tableLayout:"fixed",minWidth:36+e.reduce((t,n)=>t+pe(e.indexOf(n)),0)},children:[
|
|
5
5
|
/* @__PURE__ */u("colgroup",{children:[
|
|
6
6
|
/* @__PURE__ */h("col",{style:{width:36}}),e.map((e,t)=>/* @__PURE__ */h("col",{style:{width:pe(t)}},e.key))]}),
|
|
7
7
|
/* @__PURE__ */h("thead",{className:"sticky top-0 z-10",children:/* @__PURE__ */u("tr",{children:[
|
|
8
|
-
/* @__PURE__ */h("th",{className:`${t} ${
|
|
9
|
-
return u("th",{className:`${t} ${
|
|
8
|
+
/* @__PURE__ */h("th",{className:`${t} ${Re} text-center w-9 cursor-pointer hover:bg-gray-200`,onClick:()=>{W({row:0,col:0}),Z({row:te.length-1,col:e.length-1})},title:C.selectAll,children:"#"}),e.map((n,r)=>{const o=B&&V&&Math.min(B.col,V.col)<=r&&r<=Math.max(B.col,V.col)&&0===Math.min(B.row,V.row)&&Math.max(B.row,V.row)===te.length-1;/* @__PURE__ */
|
|
9
|
+
return u("th",{className:`${t} ${Re} cursor-pointer hover:bg-gray-200 relative${o?" !bg-blue-200":""}${X===r?" !bg-blue-100":""}`,style:{width:pe(r)},draggable:!0,onDragStart:()=>(e=>I(e))(r),onDragOver:e=>((e,t)=>{e.preventDefault(),Y(t)})(e,r),onDrop:()=>(t=>{if(null===F||F===t)return I(null),void Y(null);const n=te.map(e=>{const n=[...e],[r]=n.splice(F,1);return n.splice(t,0,r),n});if(p(n),f){const n=[...e],[r]=n.splice(F,1);n.splice(t,0,r),f(n)}I(null),Y(null)})(r),onDragEnd:()=>{I(null),Y(null)},onClick:e=>{e.shiftKey&&B||W({row:0,col:r}),Z({row:te.length-1,col:r})},onContextMenu:e=>me(e,r),children:[n.title,
|
|
10
10
|
/* @__PURE__ */h("div",{className:"absolute -right-1 top-0 bottom-0 w-2 cursor-col-resize z-20",onMouseDown:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),z.current={col:t,startX:e.clientX,startW:pe(t)},document.body.style.cursor="col-resize"})(e,r),onDoubleClick:e=>{e.stopPropagation(),ye(r)},title:C.resize})]},n.key)})]})}),
|
|
11
|
-
/* @__PURE__ */u("tbody",{children:[
|
|
11
|
+
/* @__PURE__ */u("tbody",{children:[Ne>0&&/* @__PURE__ */h("tr",{style:{height:Ne}}),ze.map((t,n)=>{const r=$e+n,o=B&&V&&Math.min(B.row,V.row)<=r&&r<=Math.max(B.row,V.row)&&0===Math.min(B.col,V.col)&&Math.max(B.col,V.col)===e.length-1;/* @__PURE__ */
|
|
12
12
|
return u("tr",{style:{height:fe(r)},children:[
|
|
13
|
-
/* @__PURE__ */u("td",{className:`relative px-1 py-1 text-center text-2xs text-gray-400 border-b border-r border-gray-200 bg-gray-50 select-none cursor-pointer hover:bg-gray-200${o?" !bg-blue-200 !text-gray-700":""}${K===r?" !bg-blue-100":""}`,draggable:!0,onDragStart:()=>(e=>T(e))(r),onDragOver:e=>((e,t)=>{e.preventDefault(),P(t)})(e,r),onDrop:()=>(e=>{if(null===
|
|
14
|
-
/* @__PURE__ */h("div",{className:"absolute -bottom-1 left-0 right-0 h-2 cursor-row-resize z-20",onMouseDown:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),
|
|
15
|
-
return u("td",{className:`relative px-0 py-0 border-b border-r border-gray-200 text-sm${e.readOnly?" bg-gray-50 text-gray-500 cursor-default":" cursor-cell"}${o?" !bg-blue-100":""}${c&&!o?" ring-2 ring-inset ring-blue-400":""}${w?" !bg-blue-50 ring-1 ring-inset ring-blue-300":""}`,onMouseDown:e=>{if(e.target===e.currentTarget){re(e,r,n);const t=e.currentTarget.querySelector("[data-row][data-col]");t?.focus()}},onMouseEnter:()=>oe(r,n),onClick:e=>{if(e.target===e.currentTarget){const t=e.currentTarget.querySelector("[data-row][data-col]");t?.focus()}},onDoubleClick:t=>{t.target!==t.currentTarget||e.readOnly||
|
|
16
|
-
/* @__PURE__ */h(g,{contentEditable:l,suppressContentEditableWarning:!0,tabIndex:0,"data-row":r,"data-col":n,className:`w-full h-full px-2 py-1 rosh-focus-ring whitespace-nowrap overflow-hidden ${"right"===e.align?"text-right":"center"===e.align?"text-center":""} ${e.readOnly?"cursor-default":"cursor-cell"} font-mono ${m}${p}`,onMouseDown:e=>re(e,r,n),onMouseEnter:()=>oe(r,n),onDoubleClick:()=>{e.readOnly||
|
|
13
|
+
/* @__PURE__ */u("td",{className:`relative px-1 py-1 text-center text-2xs text-gray-400 border-b border-r border-gray-200 bg-gray-50 select-none cursor-pointer hover:bg-gray-200${o?" !bg-blue-200 !text-gray-700":""}${K===r?" !bg-blue-100":""}`,draggable:!0,onDragStart:()=>(e=>T(e))(r),onDragOver:e=>((e,t)=>{e.preventDefault(),P(t)})(e,r),onDrop:()=>(e=>{if(null===O||O===e)return T(null),void P(null);const t=te.map(e=>[...e]),[n]=t.splice(O,1);t.splice(e,0,n),p(t),T(null),P(null)})(r),onDragEnd:()=>{T(null),P(null)},onClick:t=>{t.shiftKey&&B||W({row:r,col:0}),Z({row:r,col:e.length-1})},onContextMenu:e=>ge(e,r),children:[r+1,
|
|
14
|
+
/* @__PURE__ */h("div",{className:"absolute -bottom-1 left-0 right-0 h-2 cursor-row-resize z-20",onMouseDown:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),R.current={row:t,startY:e.clientY,startH:fe(t)},document.body.style.cursor="row-resize"})(e,r),onDoubleClick:e=>{e.stopPropagation(),be(r)},title:C.resize})]}),e.map((e,n)=>{const o=B&&V&&function(e,t,n,r){const o=Math.min(e.row,t.row),l=Math.max(e.row,t.row),c=Math.min(e.col,t.col),a=Math.max(e.col,t.col);return n>=o&&n<=l&&r>=c&&r<=a}(B,V,r,n),l=j?.row===r&&j?.col===n&&!e.readOnly,c=E?.row===r&&E?.col===n,a=x?.[`${r}:${n}`],s=B&&V?Math.max(B.row,V.row):-1,i=B&&V?Math.max(B.col,V.col):-1,d=B&&V&&r===s&&n===i,w=U.current&&J&&B&&V&&(()=>{const e=Math.min(B.row,V.row),t=Math.max(B.row,V.row),o=Math.min(B.col,V.col),l=Math.max(B.col,V.col);let c=e,a=t,s=o,i=l;return J.row>t?a=J.row:J.row<e&&(c=J.row),J.col>l?i=J.col:J.col<o&&(s=J.col),r>=c&&r<=a&&n>=s&&n<=i&&!(r>=e&&r<=t&&n>=o&&n<=l)})(),m="sm"===a?.fontSize?"text-2xs":"lg"===a?.fontSize?"text-sm":"xl"===a?.fontSize?"text-base":"text-xs",p=`${a?.bold?" font-bold":""}${a?.italic?" italic":""}${a?.underline?" underline":""}`;/* @__PURE__ */
|
|
15
|
+
return u("td",{className:`relative px-0 py-0 border-b border-r border-gray-200 text-sm${e.readOnly?" bg-gray-50 text-gray-500 cursor-default":" cursor-cell"}${o?" !bg-blue-100":""}${c&&!o?" ring-2 ring-inset ring-blue-400":""}${w?" !bg-blue-50 ring-1 ring-inset ring-blue-300":""}`,onMouseDown:e=>{if(e.target===e.currentTarget){re(e,r,n);const t=e.currentTarget.querySelector("[data-row][data-col]");t?.focus()}},onMouseEnter:()=>oe(r,n),onClick:e=>{if(e.target===e.currentTarget){const t=e.currentTarget.querySelector("[data-row][data-col]");t?.focus()}},onDoubleClick:t=>{t.target!==t.currentTarget||e.readOnly||H({row:r,col:n})},children:[
|
|
16
|
+
/* @__PURE__ */h(g,{contentEditable:l,suppressContentEditableWarning:!0,tabIndex:0,"data-row":r,"data-col":n,className:`w-full h-full px-2 py-1 rosh-focus-ring whitespace-nowrap overflow-hidden ${"right"===e.align?"text-right":"center"===e.align?"text-center":""} ${e.readOnly?"cursor-default":"cursor-cell"} font-mono ${m}${p}`,onMouseDown:e=>re(e,r,n),onMouseEnter:()=>oe(r,n),onDoubleClick:()=>{e.readOnly||H({row:r,col:n})},onFocus:()=>{L({row:r,col:n}),_.current||(W({row:r,col:n}),Z({row:r,col:n}))},onBlur:e=>{const o=e.currentTarget.textContent||"";o!==(t[n]||"")&&ne(r,n,o),H(null)},onInput:()=>ae(r),onPaste:e=>le(e,r,n),onKeyDown:t=>{if(!(l||e.readOnly||1!==t.key.length||t.ctrlKey||t.metaKey||t.altKey))return t.preventDefault(),ne(r,n,t.key),q.current={row:r,col:n},void H({row:r,col:n});ce(t,r,n)},text:t[n]||""}),d&&/* @__PURE__ */h("div",{onMouseDown:xe,title:C.fill,className:"absolute -bottom-[3px] -right-[3px] w-[7px] h-[7px] bg-blue-500 border border-white cursor-crosshair z-30 hover:bg-blue-600"})]},n)})]},r)}),Ae>0&&/* @__PURE__ */h("tr",{style:{height:Ae}})]})]}),se&&i(
|
|
17
17
|
/* @__PURE__ */u(d,{children:[
|
|
18
18
|
/* @__PURE__ */h("div",{className:"fixed inset-0 z-(--z-popup)",onPointerDown:()=>ie(null)}),
|
|
19
19
|
/* @__PURE__ */h("div",{className:"fixed z-(--z-popup) bg-white rounded-lg shadow-lg border border-gray-200 py-1 min-w-[160px]",style:{left:se.x,top:se.y},children:se.items.map((e,t)=>/* @__PURE__ */h("button",{onPointerDown:t=>{t.stopPropagation(),e.onClick()},className:"w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-700 hover:bg-gray-100",children:e.label},t))})]}),document.body)]})}export{m as EditableGrid,w as withSpareRow};
|
|
@@ -1,19 +1,27 @@
|
|
|
1
|
-
import{useSyncExternalStore as e}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";var n=/* @__PURE__ */new Map,o=null,t=null,d=0,h=/* @__PURE__ */new Set;function a(){d+=1;for(const e of[...h])e()}function
|
|
1
|
+
import{useSyncExternalStore as e}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";var n=/* @__PURE__ */new Map,o=null,t=null,d=0,h=/* @__PURE__ */new Set;function a(){d+=1;for(const e of[...h])e()}function u(e){return h.add(e),()=>{h.delete(e)}}function s(){return d}function l(e){let r=n.get(e.name),i=!1;r?r.label!==e.label&&(r.label=e.label,i=!0):(r={label:e.label,icons:/* @__PURE__ */new Map,looks:/* @__PURE__ */new Map},n.set(e.name,r),o??=e.name,i=!0);for(const[n,o]of Object.entries(e.icons))r.icons.get(n)!==o&&(r.icons.set(n,o),i=!0);for(const[n,o]of Object.entries(e.looks??{})){let e=r.looks.get(n);e||r.looks.set(n,e=/* @__PURE__ */new Map);for(const[r,n]of Object.entries(o))e.get(r)!==n&&(e.set(r,n),i=!0)}i&&a()}function c(e,r){l({name:e,label:n.get(e)?.label??"",icons:r})}function k(e){o!==e&&(o=e,a())}function v(e){const r=e||null;t!==r&&(t=r,a())}function L(){return t&&n.has(t)?t:o}function f(){return[...n].filter(([,e])=>""!==e.label).map(([e,r])=>({name:e,label:r.label}))}function g(e,r){const i=[L(),o,...n.keys()];for(const o of i){const i=o?n.get(o):void 0,t=(r?i?.looks.get(r)?.get(e):void 0)??i?.icons.get(e);if(t)return t}}var p={account:function({size:e=18,...i}){/* @__PURE__ */
|
|
2
2
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z"})})},add:function({size:e=18,...i}){/* @__PURE__ */
|
|
3
3
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})})},"add-circle":function({size:e=18,...i}){/* @__PURE__ */
|
|
4
4
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v6m3-3H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})})},adjust:function({size:e=18,...i}){/* @__PURE__ */
|
|
5
|
-
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"})})},"
|
|
5
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"})})},"align-center":function({size:e=18,...i}){/* @__PURE__ */
|
|
6
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{d:"M3.75 6.75L20.25 6.75M7.5 12L16.5 12M5.25 17.25L18.75 17.25"})})},"align-justify":function({size:e=18,...i}){/* @__PURE__ */
|
|
7
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{d:"M6.75 6.75L17.25 6.75M6.75 12L17.25 12M6.75 17.25L17.25 17.25M3 5.25L3 18.75M21 5.25L21 18.75"})})},"align-left":function({size:e=18,...i}){/* @__PURE__ */
|
|
8
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{d:"M3.75 6.75L20.25 6.75M3.75 12L14.25 12M3.75 17.25L17.25 17.25"})})},"align-right":function({size:e=18,...i}){/* @__PURE__ */
|
|
9
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{d:"M3.75 6.75L20.25 6.75M9.75 12L20.25 12M6.75 17.25L20.25 17.25"})})},"arrow-left":function({size:e=18,...i}){/* @__PURE__ */
|
|
6
10
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"})})},"arrow-right":function({size:e=18,...i}){/* @__PURE__ */
|
|
7
11
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"})})},attach:function({size:e=18,...i}){/* @__PURE__ */
|
|
8
12
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m18.375 12.739-7.693 7.693a4.5 4.5 0 0 1-6.364-6.364l10.94-10.94A3 3 0 1 1 19.5 7.372L8.552 18.32m.009-.01-.01.01m5.699-9.941-7.81 7.81a1.5 1.5 0 0 0 2.112 2.13"})})},bell:function({size:e=18,...i}){/* @__PURE__ */
|
|
9
|
-
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0"})})},
|
|
13
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0"})})},bold:function({size:e=18,...i}){/* @__PURE__ */
|
|
14
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinejoin:"round",d:"M6.75 3.744h-.753v8.25h7.125a4.125 4.125 0 0 0 0-8.25H6.75Zm0 0v.38m0 16.122h6.747a4.5 4.5 0 0 0 0-9.001h-7.5v9h.753Zm0 0v-.37m0-15.751h6a3.75 3.75 0 1 1 0 7.5h-6m0-7.5v7.5m0 0v8.25m0-8.25h6.375a4.125 4.125 0 0 1 0 8.25H6.75m.747-15.38h4.875a3.375 3.375 0 0 1 0 6.75H7.497v-6.75Zm0 7.5h5.25a3.75 3.75 0 0 1 0 7.5h-5.25v-7.5Z"})})},bookmark:function({size:e=18,...i}){/* @__PURE__ */
|
|
10
15
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.593 3.322c1.1.128 1.907 1.077 1.907 2.185V21L12 17.25 4.5 21V5.507c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0 1 11.186 0Z"})})},"bookmark-square":function({size:e=18,...i}){/* @__PURE__ */
|
|
11
16
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 3.75V16.5L12 14.25 7.5 16.5V3.75m9 0H18A2.25 2.25 0 0 1 20.25 6v12A2.25 2.25 0 0 1 18 20.25H6A2.25 2.25 0 0 1 3.75 18V6A2.25 2.25 0 0 1 6 3.75h1.5m9 0h-9"})})},"bookmark:solid":function({size:e=18,...i}){/* @__PURE__ */
|
|
12
17
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{fillRule:"evenodd",d:"M6.32 2.577a49.255 49.255 0 0 1 11.36 0c1.497.174 2.57 1.46 2.57 2.93V21a.75.75 0 0 1-1.085.67L12 18.089l-7.165 3.583A.75.75 0 0 1 3.75 21V5.507c0-1.47 1.073-2.756 2.57-2.93Z",clipRule:"evenodd"})})},camera:function({size:e=18,...n}){/* @__PURE__ */
|
|
13
18
|
return i("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...n,children:[
|
|
14
19
|
/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.827 6.175A2.31 2.31 0 0 1 5.186 7.23c-.38.054-.757.112-1.134.175C2.999 7.58 2.25 8.507 2.25 9.574V18a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9.574c0-1.067-.75-1.994-1.802-2.169a47.865 47.865 0 0 0-1.134-.175 2.31 2.31 0 0 1-1.64-1.055l-.822-1.316a2.192 2.192 0 0 0-1.736-1.039 48.774 48.774 0 0 0-5.232 0 2.192 2.192 0 0 0-1.736 1.039l-.821 1.316Z"}),
|
|
15
20
|
/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 12.75a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0ZM18.75 10.5h.008v.008h-.008V10.5Z"})]})},"camera:mini":function({size:e=18,...i}){/* @__PURE__ */
|
|
16
|
-
return r("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{fillRule:"evenodd",d:"M1 8a2 2 0 0 1 2-2h.93a2 2 0 0 0 1.664-.89l.812-1.22A2 2 0 0 1 8.07 3h3.86a2 2 0 0 1 1.664.89l.812 1.22A2 2 0 0 0 16.07 6H17a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8Zm13.5 3a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0ZM10 14a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z",clipRule:"evenodd"})})},"
|
|
21
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{fillRule:"evenodd",d:"M1 8a2 2 0 0 1 2-2h.93a2 2 0 0 0 1.664-.89l.812-1.22A2 2 0 0 1 8.07 3h3.86a2 2 0 0 1 1.664.89l.812 1.22A2 2 0 0 0 16.07 6H17a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8Zm13.5 3a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0ZM10 14a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z",clipRule:"evenodd"})})},"case-lower":function({size:e=18,...i}){/* @__PURE__ */
|
|
22
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{d:"M4.875 14.25a3 3 0 1 0 6 0a3 3 0 1 0 -6 0ZM10.875 11.25L10.875 17.25M13.5 14.25a3 3 0 1 0 6 0a3 3 0 1 0 -6 0ZM19.5 11.25L19.5 17.25"})})},"case-normal":function({size:e=18,...i}){/* @__PURE__ */
|
|
23
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{d:"M3.84 17.25L8.25 6.75L12.66 17.25M5.516 13.47L10.984 13.47M14.344 14.625a2.625 2.625 0 1 0 5.25 0a2.625 2.625 0 1 0 -5.25 0ZM19.594 12L19.594 17.25"})})},"case-upper":function({size:e=18,...i}){/* @__PURE__ */
|
|
24
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{d:"M3.09 17.25L7.5 6.75L11.91 17.25M4.766 13.47L10.234 13.47M12.09 17.25L16.5 6.75L20.91 17.25M13.766 13.47L19.234 13.47"})})},"chart-bar":function({size:e=18,...i}){/* @__PURE__ */
|
|
17
25
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z"})})},check:function({size:e=18,...i}){/* @__PURE__ */
|
|
18
26
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"})})},"check-circle":function({size:e=18,...i}){/* @__PURE__ */
|
|
19
27
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})})},"check-circle:mini":function({size:e=18,...i}){/* @__PURE__ */
|
|
@@ -58,10 +66,12 @@ return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"current
|
|
|
58
66
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{d:"M6 3.75h12a2.25 2.25 0 0 1 2.25 2.25v12a2.25 2.25 0 0 1 -2.25 2.25h-12a2.25 2.25 0 0 1 -2.25 -2.25v-12a2.25 2.25 0 0 1 2.25 -2.25ZM3.75 17.075L8.114 12.71A1.903 1.903 0 0 1 10.806 12.71L15.171 17.075M13.902 15.806L15.094 14.613A1.903 1.903 0 0 1 17.785 14.613L20.247 17.075M14.995 8.255a0.75 0.75 0 1 0 1.5 0a0.75 0.75 0 1 0 -1.5 0Z"})})},inbox:function({size:e=18,...i}){/* @__PURE__ */
|
|
59
67
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 13.5h3.86a2.25 2.25 0 0 1 2.012 1.244l.256.512a2.25 2.25 0 0 0 2.013 1.244h3.218a2.25 2.25 0 0 0 2.013-1.244l.256-.512a2.25 2.25 0 0 1 2.013-1.244h3.859m-19.5.338V18a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18v-4.162c0-.224-.034-.447-.1-.661L19.24 5.338a2.25 2.25 0 0 0-2.15-1.588H6.911a2.25 2.25 0 0 0-2.15 1.588L2.35 13.177a2.25 2.25 0 0 0-.1.661Z"})})},info:function({size:e=18,...i}){/* @__PURE__ */
|
|
60
68
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"})})},"info:mini":function({size:e=18,...i}){/* @__PURE__ */
|
|
61
|
-
return r("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z",clipRule:"evenodd"})})},
|
|
69
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z",clipRule:"evenodd"})})},italic:function({size:e=18,...i}){/* @__PURE__ */
|
|
70
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.248 20.246H9.05m0 0h3.696m-3.696 0 5.893-16.502m0 0h-3.697m3.697 0h3.803"})})},layers:function({size:e=18,...i}){/* @__PURE__ */
|
|
62
71
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.429 9.75 2.25 12l4.179 2.25m0-4.5 5.571 3 5.571-3m-11.142 0L2.25 7.5 12 2.25l9.75 5.25-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0 4.179 2.25L12 21.75 2.25 16.5l4.179-2.25m11.142 0-5.571 3-5.571-3"})})},layout:function({size:e=18,...i}){/* @__PURE__ */
|
|
63
72
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 7.125C2.25 6.504 2.754 6 3.375 6h6c.621 0 1.125.504 1.125 1.125v3.75c0 .621-.504 1.125-1.125 1.125h-6a1.125 1.125 0 0 1-1.125-1.125v-3.75ZM14.25 8.625c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v8.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 0 1-1.125-1.125v-8.25ZM3.75 16.125c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v2.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 0 1-1.125-1.125v-2.25Z"})})},link:function({size:e=18,...i}){/* @__PURE__ */
|
|
64
|
-
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"})})},
|
|
73
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"})})},list:function({size:e=18,...i}){/* @__PURE__ */
|
|
74
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"})})},logout:function({size:e=18,...i}){/* @__PURE__ */
|
|
65
75
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15m3 0 3-3m0 0-3-3m3 3H9"})})},menu:function({size:e=18,...i}){/* @__PURE__ */
|
|
66
76
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})})},moon:function({size:e=18,...i}){/* @__PURE__ */
|
|
67
77
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"})})},"moon:solid":function({size:e=18,...i}){/* @__PURE__ */
|
|
@@ -69,7 +79,8 @@ return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-h
|
|
|
69
79
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 12.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 18.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5Z"})})},"more-vertical:solid":function({size:e=18,...i}){/* @__PURE__ */
|
|
70
80
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{fillRule:"evenodd",d:"M10.5 6a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Zm0 6a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Zm0 6a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Z",clipRule:"evenodd"})})},"no-symbol":function({size:e=18,...i}){/* @__PURE__ */
|
|
71
81
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 0 0 5.636 5.636m12.728 12.728A9 9 0 0 1 5.636 5.636m12.728 12.728L5.636 5.636"})})},note:function({size:e=18,...i}){/* @__PURE__ */
|
|
72
|
-
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{d:"M20.25 13.5V6A2.25 2.25 0 0 0 18 3.75H6A2.25 2.25 0 0 0 3.75 6v12A2.25 2.25 0 0 0 6 20.25h7.5l6.75-6.75ZM13.5 20.25V15.75a2.25 2.25 0 0 1 2.25-2.25h4.5"})})},
|
|
82
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{d:"M20.25 13.5V6A2.25 2.25 0 0 0 18 3.75H6A2.25 2.25 0 0 0 3.75 6v12A2.25 2.25 0 0 0 6 20.25h7.5l6.75-6.75ZM13.5 20.25V15.75a2.25 2.25 0 0 1 2.25-2.25h4.5"})})},"numbered-list":function({size:e=18,...i}){/* @__PURE__ */
|
|
83
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.242 5.992h12m-12 6.003H20.24m-12 5.999h12M4.117 7.495v-3.75H2.99m1.125 3.75H2.99m1.125 0H5.24m-1.92 2.577a1.125 1.125 0 1 1 1.591 1.59l-1.83 1.83h2.16M2.99 15.745h1.125a1.125 1.125 0 0 1 0 2.25H3.74m0-.002h.375a1.125 1.125 0 0 1 0 2.25H2.99"})})},page:function({size:e=18,...i}){/* @__PURE__ */
|
|
73
84
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})})},pause:function({size:e=18,...i}){/* @__PURE__ */
|
|
74
85
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 5.25v13.5m-7.5-13.5v13.5"})})},play:function({size:e=18,...i}){/* @__PURE__ */
|
|
75
86
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z"})})},print:function({size:e=18,...i}){/* @__PURE__ */
|
|
@@ -81,13 +92,18 @@ return r("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"currentColor","aria-h
|
|
|
81
92
|
return i("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...n,children:[
|
|
82
93
|
/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),
|
|
83
94
|
/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})]})},star:function({size:e=18,...i}){/* @__PURE__ */
|
|
84
|
-
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z"})})},
|
|
85
|
-
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"
|
|
86
|
-
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"
|
|
95
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z"})})},strike:function({size:e=18,...i}){/* @__PURE__ */
|
|
96
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 12a8.912 8.912 0 0 1-.318-.079c-1.585-.424-2.904-1.247-3.76-2.236-.873-1.009-1.265-2.19-.968-3.301.59-2.2 3.663-3.29 6.863-2.432A8.186 8.186 0 0 1 16.5 5.21M6.42 17.81c.857.99 2.176 1.812 3.761 2.237 3.2.858 6.274-.23 6.863-2.431.233-.868.044-1.779-.465-2.617M3.75 12h16.5"})})},styles:function({size:e=18,...i}){/* @__PURE__ */
|
|
97
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.53 16.122a3 3 0 0 0-5.78 1.128 2.25 2.25 0 0 1-2.4 2.245 4.5 4.5 0 0 0 8.4-2.245c0-.399-.078-.78-.22-1.128Zm0 0a15.998 15.998 0 0 0 3.388-1.62m-5.043-.025a15.994 15.994 0 0 1 1.622-3.395m3.42 3.42a15.995 15.995 0 0 0 4.764-4.648l3.876-5.814a1.151 1.151 0 0 0-1.597-1.597L14.146 6.32a15.996 15.996 0 0 0-4.649 4.763m3.42 3.42a6.776 6.776 0 0 0-3.42-3.42"})})},subscript:function({size:e=18,...i}){/* @__PURE__ */
|
|
98
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{d:"M4.59 15.75L9 5.25L13.41 15.75M6.266 11.97L11.734 11.97M15.75 17.156a1.40625 1.40625 0 1 1 2.813 0c0 .75-0.75 1.2-2.813 3.281h2.813"})})},superscript:function({size:e=18,...i}){/* @__PURE__ */
|
|
99
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{d:"M4.59 19.5L9 9L13.41 19.5M6.266 15.72L11.734 15.72M15.75 5.156a1.40625 1.40625 0 1 1 2.813 0c0 .75-0.75 1.2-2.813 3.281h2.813"})})},"text-color":function({size:e=18,...i}){/* @__PURE__ */
|
|
100
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{"data-part":"swatch",d:"M10 3L14 3L21 21L17 21L15.44 17L8.56 17L7 21L3 21ZM9.92 13.5L14.08 13.5L12 8.14Z"})})},trash:function({size:e=18,...i}){/* @__PURE__ */
|
|
101
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"})})},underline:function({size:e=18,...i}){/* @__PURE__ */
|
|
102
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.995 3.744v7.5a6 6 0 1 1-12 0v-7.5m-2.25 16.502h16.5"})})},upload:function({size:e=18,...i}){/* @__PURE__ */
|
|
87
103
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"})})},warning:function({size:e=18,...i}){/* @__PURE__ */
|
|
88
104
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"})})},"warning:mini":function({size:e=18,...i}){/* @__PURE__ */
|
|
89
105
|
return r("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"})})},widgets:function({size:e=18,...i}){/* @__PURE__ */
|
|
90
106
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.25 6.087c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.036-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959v0a.64.64 0 0 1-.657.643 48.39 48.39 0 0 1-4.163-.3c.186 1.613.293 3.25.315 4.907a.656.656 0 0 1-.658.663v0c-.355 0-.676-.186-.959-.401a1.647 1.647 0 0 0-1.003-.349c-1.036 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401v0c.31 0 .555.26.532.57a48.039 48.039 0 0 1-.642 5.056c1.518.19 3.058.309 4.616.354a.64.64 0 0 0 .657-.643v0c0-.355-.186-.676-.401-.959a1.647 1.647 0 0 1-.349-1.003c0-1.035 1.008-1.875 2.25-1.875 1.243 0 2.25.84 2.25 1.875 0 .369-.128.713-.349 1.003-.215.283-.4.604-.4.959v0c0 .333.277.599.61.58a48.1 48.1 0 0 0 5.427-.63 48.05 48.05 0 0 0 .582-4.717.532.532 0 0 0-.533-.57v0c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.035 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.37 0 .713.128 1.003.349.283.215.604.401.96.401v0a.656.656 0 0 0 .658-.663 48.422 48.422 0 0 0-.37-5.36c-1.886.342-3.81.574-5.766.689a.578.578 0 0 1-.61-.58v0Z"})})},window:function({size:e=18,...i}){/* @__PURE__ */
|
|
91
107
|
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 8.25V18a2.25 2.25 0 0 0 2.25 2.25h13.5A2.25 2.25 0 0 0 21 18V8.25m-18 0V6a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 6v2.25m-18 0h18M5.25 6h.008v.008H5.25V6ZM7.5 6h.008v.008H7.5V6Zm2.25 0h.008v.008H9.75V6Z"})})},"zoom-in":function({size:e=18,...i}){/* @__PURE__ */
|
|
92
|
-
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607ZM10.5 7.5v6m3-3h-6"})})}};var w={muted:"text-gray-500",accent:"text-blue-600",danger:"text-red-600",success:"text-green-600",warning:"text-amber-600"},m=/* @__PURE__ */new Set;function M({name:i,glyph:n,size:o,tone:t,look:d,title:h,fallback:a,className:
|
|
93
|
-
return r(v,{width:o??"1em",height:o??"1em","data-icon":k,"aria-hidden":!
|
|
108
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",...i,children:/* @__PURE__ */r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607ZM10.5 7.5v6m3-3h-6"})})}};var w={muted:"text-gray-500",accent:"text-blue-600",danger:"text-red-600",success:"text-green-600",warning:"text-amber-600"},m=/* @__PURE__ */new Set;function M({name:i,glyph:n,size:o,tone:t,look:d,title:h,fallback:a,className:l,...c}){e(u,s,s);const k=i??n,v=g(k,d)??a??function(e,r){return(r?p[`${e}:${r}`]:void 0)??p[e]}(k,d);if(!v)return m.has(k)||(m.add(k),console.warn(`efficient-shell/icons: no registered icon set draws "${k}". Register one at startup, for example registerIconSet(efficient) from 'efficient-shell/icons/efficient'.`)),null;const L=void 0!==h||void 0!==c["aria-label"]||void 0!==c["aria-labelledby"],f=[t?w[t]:"",l??""].filter(Boolean).join(" ");/* @__PURE__ */
|
|
109
|
+
return r(v,{width:o??"1em",height:o??"1em","data-icon":k,"aria-hidden":!L||void 0,role:L?"img":void 0,"aria-label":h,...c,className:f||void 0})}export{M as Icon,L as activeIconSet,f as iconSets,s as iconsVersion,l as registerIconSet,c as registerIcons,g as resolveIcon,k as setDefaultIconSet,v as setIconSet,u as subscribeIcons};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useWindowMenuItem as e,Modal as t}from"./chunk-
|
|
1
|
+
import{useWindowMenuItem as e,Modal as t}from"./chunk-4M7DEG4E.js";import{navIcons as r}from"./chunk-DSSLOQDW.js";import{VERSION as s}from"./chunk-5VNBEMZQ.js";import{DEFAULT_SHELL_STRINGS as o,useShellStrings as n,splitAround as i}from"./chunk-4EIZZYLK.js";import{Icon as a}from"./chunk-B427NVDP.js";import{useState as m,useCallback as c,isValidElement as l,cloneElement as d}from"react";import{jsx as p,jsxs as h}from"react/jsx-runtime";var u=o.aboutApp,f={spreadsheet:{name:"Spreadsheets",version:"1.1.3",route:"/spreadsheet",description:u.spreadsheet},notepad:{name:"Notepad",version:"1.0.2",route:"/notepad",description:u.notepad},documents:{name:"Documents",version:"1.1.1",route:"/documents",description:u.documents},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:u.preview},files:{name:"Files",version:"1.1.3",route:"/files",description:u.files},browser:{name:"Browser",version:"1.0.2",route:"/browser",description:u.browser}},x=/* @__PURE__ */p(a,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),v=/* @__PURE__ */p(a,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function w({app:o}){const a=f[o],[u,w]=m(!1),N=c(()=>w(!0),[]),g=n().aboutApp,b=g.title(a.name);if(e(b,N,x),!u)return null;const y=r[a.route],k=l(y)?d(y,{className:"h-9 w-9"}):v,[j,D]=i(g.partOf);/* @__PURE__ */
|
|
2
2
|
return p(t,{open:!0,onClose:()=>w(!1),title:b,size:"sm",compact:!0,bodyScroll:!1,autoHeight:!0,dimensions:[320,320],children:/* @__PURE__ */h("div",{className:"flex flex-col items-center text-center px-5 pt-5 pb-4",children:[
|
|
3
3
|
/* @__PURE__ */p("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-gray-100 text-gray-600 shrink-0",children:k}),
|
|
4
4
|
/* @__PURE__ */p("h2",{className:"mt-3 text-lg font-bold text-gray-900",children:a.name}),
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import{navVisible as e,isReachable as t,visibleChildren as n,isSection as r}from"./chunk-5A7MWTXX.js";import{useDismissPopupsOnOpen as a}from"./chunk-UVBK6YSR.js";import{glassStyle as l}from"./chunk-7IQ3B77H.js";import{Z_LAYERS as o}from"./chunk-FIEA5CGB.js";import{useShellStrings as s}from"./chunk-
|
|
1
|
+
import{navVisible as e,isReachable as t,visibleChildren as n,isSection as r}from"./chunk-5A7MWTXX.js";import{useDismissPopupsOnOpen as a}from"./chunk-UVBK6YSR.js";import{glassStyle as l}from"./chunk-7IQ3B77H.js";import{Z_LAYERS as o}from"./chunk-FIEA5CGB.js";import{useShellStrings as s}from"./chunk-4EIZZYLK.js";import{useState as i,useEffect as c,useRef as d,useMemo as u,useId as p,useCallback as y}from"react";import{jsx as f,jsxs as m}from"react/jsx-runtime";import{createPortal as h}from"react-dom";var b={favicon:"h-8 w-8",compact:"h-10 w-10",wordmark:"h-10 w-40"};function g(e){return e.trim().charAt(0).toLocaleUpperCase()||"·"}function k(e,t,n){return!1===e?"framed":null==e||null==t?"plate-light":t?"light"===n?"plate-dark":"bare":"dark"===n?"plate-light":"bare"}var x={"plate-light":"bg-white shadow-[0_2px_12px_var(--rosh-mark-plate-shadow)]","plate-dark":"bg-neutral-900 shadow-[0_2px_12px_var(--rosh-mark-plate-shadow-strong)]",framed:"border border-black/10 shadow-[0_2px_12px_var(--rosh-mark-plate-shadow)]",bare:""};function v(e,t,n){return"bare"===e?{}:"framed"===e?{borderRadius:t}:{borderRadius:t,padding:n}}function w({src:e,fallbackSrc:t,fallbackHasAlpha:n=null,fallbackIsLight:r=null,fallbackAdaptive:a,alt:l,slot:o="compact",surface:s="light",size:d,width:u,height:p,decorative:y=!1,fallbackMode:m="monogram",adaptive:h=!1,hasAlpha:w=null,isLight:N=null,treatmentPadding:L=4,treatmentRadius:_=8,className:A="",style:C}){const[E,$]=i(e||t||"");c(()=>{$(e||t||"")},[e,t]);const I=Boolean(t&&E===t&&E!==e),T=(I?a??h:h)?k(I?n:w,I?r:N,s):"bare",j=["inline-flex shrink-0 items-center justify-center overflow-hidden",null==d&&null==u&&null==p?b[o]:"","dark"===s?"text-white":"text-gray-700",x[T],A].filter(Boolean).join(" "),S={...v(T,_,L),...null==d?{width:u,height:p}:{width:d,height:d},...C};return E?/* @__PURE__ */f("span",{className:j,"data-brand-treatment":T,style:S,children:/* @__PURE__ */f("img",{src:E,alt:y?"":l,"data-brand-slot":o,className:"block max-h-full max-w-full",style:{objectFit:"contain"},onError:()=>$(e=>t&&e!==t?t:"")})}):"none"===m?null:/* @__PURE__ */f("span",{"data-brand-fallback":!0,"data-brand-slot":o,"aria-label":y?void 0:l,"aria-hidden":y||void 0,role:y?void 0:"img",className:`${j} rounded-md bg-gray-100 font-semibold`,style:S,children:y?null:g(l)})}function N(n,r){return e(n,r)?n.items.filter(n=>e(n,r)&&t(n,r)):[]}function L(e,r){return n(e,r).filter(e=>t(e,r))}function _(n,a,l){const o=new Set(a.erp),s=new Set(a.system),i=new Set(a.footer??[]),c=n.filter(r),d=e=>c.filter(t=>e.has(t.label)&&N(t,l).length>0);return{topItems:n.filter(e=>!r(e)).filter(n=>e(n,l)&&t(n,l)),erpSections:d(o),systemSections:d(s),virtualSections:(a.virtual??[]).filter(e=>e.items.length>0),footerSections:d(i),footerItems:(a.footerItems??[]).filter(n=>e(n,l)&&t(n,l))}}function A(e,t,n){return!!t&&e.some(e=>e.to===t||A(L(e,n),t,n))}var C="__page__";function E(e){const t=e.indexOf("?");if(t<0)return{path:e,search:""};const n=new URLSearchParams(e.slice(t+1));return{path:e.slice(0,t),search:n.get("search")??""}}function $(e,t,n){const r=function(e,t){const n=[],r=e=>{const a=L(e,t);0===a.length?n.push(e):a.forEach(r)};e.topItems.forEach(r);for(const n of[...e.erpSections,...e.systemSections,...e.footerSections])N(n,t).forEach(r);for(const t of e.virtualSections)t.items.forEach(r);return e.footerItems.forEach(r),n}(e,t);return Object.assign(async e=>{const t=e.trim().toLowerCase();if(!t)return[];const a=/* @__PURE__ */new Set,l=[];for(const e of r){const r=e.menuLabel??e.label;a.has(e.to)||!e.label.toLowerCase().includes(t)&&!r.toLowerCase().includes(t)||(a.add(e.to),l.push({type:n,label:e.label,entity_type:C,entity_id:e.to}))}return l.slice(0,8)},{destinations:r})}function I(e,t){if(!Array.isArray(e))return[];const n=[];for(const r of e){if(!r||"string"!=typeof r.entityType||"string"!=typeof r.entityId||"string"!=typeof r.label)continue;if("preview-file"===r.entityType)continue;const e="page"===r.entityType;n.push({type:e?t:"",label:r.label,entity_type:e?C:r.entityType,entity_id:r.entityId})}return n}var T="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z";function j(e){return e.typeKey??e.type}function S(e,t){return t?.[j(e)]??e.type}function M(e,t,n){return 0===n.length?null:{key:e,title:t,rows:n.map((e,t)=>({kind:"action",key:`action:${t}:${e.label}`,label:e.label,icon:e.icon,action:e})),count:n.length}}function K(e,t,n,r){return{type:e,label:t,entity_type:C,entity_id:`${n}?search=${encodeURIComponent(r.trim())}`}}function R(e,t,n,r,a){const l=function(e){const t=/* @__PURE__ */new Map;for(const n of e){const e=j(n),r=t.get(e);r?r.results.push(n):t.set(e,{type:n.type,results:[n]})}return Array.from(t,([e,t])=>({key:e,...t}))}(e).map(e=>{const t=e.results.map((t,n)=>({kind:"result",key:`result:${e.key}:${t.entity_type}:${t.entity_id}:${n}`,label:t.label,sub:t.sub,result:t})),r=!!a?.truncatedTypes?.includes(e.key),l=r?a?.listRoutes?.[e.key]:void 0,o=a?.typeLabels?.[e.key]??e.type;if(a&&l){const r=a.seeAllLabel(l.label);t.push({kind:"seeAll",key:`seeall:${e.key}`,label:r,result:K(o,r,l.path,n)})}return{key:`type:${e.key}`,title:o,rows:t,count:e.results.length,truncated:r}}),o=M("actions",r,function(e,t){const n=t.trim().toLowerCase();return e&&n?e.filter(e=>e.label.toLowerCase().includes(n)||(e.keywords??[]).some(e=>e.toLowerCase().includes(n))):[]}(t,n));return o?[...l,o]:l}function B(e,t,n){return 0===n?0:Math.min(Math.max(e+t,0),n-1)}var D=(e,t)=>e.entity_type===t.entity_type&&e.entity_id===t.entity_id;function P(e,t,n=8){return[t,...e.filter(e=>!D(e,t))].slice(0,n)}function z(e){if(!Array.isArray(e))return[];const t=[];for(const n of e){if(!n||"object"!=typeof n)continue;const e=n;if("string"!=typeof e.type||"string"!=typeof e.label||"string"!=typeof e.entity_type||"string"!=typeof e.entity_id)continue;const r={type:e.type,label:e.label,entity_type:e.entity_type,entity_id:e.entity_id};"string"==typeof e.sub&&(r.sub=e.sub),"string"==typeof e.typeKey&&(r.typeKey=e.typeKey),t.some(e=>D(e,r))||t.push(r)}return t.slice(0,8)}function H(e){if(Array.isArray(e))return{results:e,truncatedTypes:[]};if(e&&"object"==typeof e&&Array.isArray(e.results)){const{results:t,truncatedTypes:n}=e;return{results:t,truncatedTypes:Array.isArray(n)?n:[]}}return{results:[],truncatedTypes:[]}}var U=[];function F(e,t,n){const[r,a]=i([]),[l,o]=i(U),[s,u]=i(!1),[p,f]=i("none"),m=d(function(){let e=0,t=null;const n=()=>{e+=1,t?.abort(),t=null};return{begin:()=>{n();const r=e,a=new AbortController;return t=a,{signal:a.signal,isCurrent:()=>r===e}},cancel:n}}());c(()=>{const r=m.current;if(e.length<n||!t||0===t.length)return r.cancel(),a(e=>0===e.length?e:[]),o(U),f("none"),void u(!1);u(!0);const l=setTimeout(async()=>{const n=r.begin(),l=await async function(e,t,n){const r=await Promise.all(e.map(async e=>{try{return{failed:!1,...H(await e(t,{signal:n}))}}catch(e){const t=n.aborted||function(e){if(!e||"object"!=typeof e)return!1;const{name:t,code:n}=e;return"AbortError"===t||"CanceledError"===t||"ERR_CANCELED"===n}(e);return{failed:!t,results:[],truncatedTypes:[]}}}));return{results:r.flatMap(e=>e.results),truncatedTypes:Array.from(new Set(r.flatMap(e=>e.truncatedTypes))),failed:r.filter(e=>e.failed).length}}(t,e,n.signal);n.isCurrent()&&(a(l.results),o(l.truncatedTypes),f(0===l.failed?"none":l.failed>=t.length?"all":"some"),u(!1))},250);return()=>{clearTimeout(l),r.cancel()}},[e,t,n]);return{results:r,truncatedTypes:l,loading:s,failure:p,reset:y(()=>{m.current.cancel(),a(e=>0===e.length?e:[]),o(U),f("none"),u(!1)},[])}}var W=(e,t)=>`${e}-opt-${t}`;function G(e,t){if("seeAll"===e.kind)return"M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3";if("action"===e.kind)return e.icon??T;if(e.icon)return e.icon;const n=t?.[j(e.result)];return n||T}function O({sections:e,activeIdx:t,listId:n,label:r,typeIcons:a,groupCount:l,groupLabel:o,onHover:s,onPick:i}){let c=0;/* @__PURE__ */
|
|
2
2
|
return f("div",{id:n,role:"listbox","aria-label":r,className:"py-1",children:e.map(e=>/* @__PURE__ */m("div",{role:"group","aria-label":o(e.title,e.count,!!e.truncated),children:[
|
|
3
3
|
/* @__PURE__ */m("div",{"aria-hidden":"true",className:"flex items-center justify-between px-4 pt-2 pb-1 text-2xs font-semibold uppercase tracking-wide text-gray-400",children:[
|
|
4
4
|
/* @__PURE__ */f("span",{children:e.title}),
|
|
5
5
|
/* @__PURE__ */f("span",{className:"font-medium normal-case tracking-normal",children:l(e.count,!!e.truncated)})]}),e.rows.map(e=>{const r=c++,l=r===t,o="action"===e.kind||"seeAll"===e.kind?void 0:e.badge,d="action"===e.kind||"seeAll"===e.kind?void 0:e.sub,u="seeAll"===e.kind;/* @__PURE__ */
|
|
6
|
-
return m("div",{id:
|
|
7
|
-
/* @__PURE__ */f("svg",{className:"h-4 w-4 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */f("path",{strokeLinecap:"round",strokeLinejoin:"round",d:
|
|
6
|
+
return m("div",{id:W(n,r),role:"option","aria-selected":l,className:"flex items-center gap-3 w-full px-4 py-3 text-left cursor-pointer transition-colors "+(l?"bg-blue-50":"hover:bg-gray-50"),onMouseDown:e=>e.preventDefault(),onClick:()=>i(e),onMouseEnter:()=>s(r),children:[
|
|
7
|
+
/* @__PURE__ */f("svg",{className:"h-4 w-4 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */f("path",{strokeLinecap:"round",strokeLinejoin:"round",d:G(e,a)})}),
|
|
8
8
|
/* @__PURE__ */m("div",{className:"flex-1 min-w-0",children:[
|
|
9
|
-
/* @__PURE__ */f("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */f("p",{className:"text-xs text-gray-400 truncate",children:d})]}),o&&/* @__PURE__ */f("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-gray-500",children:o})]},e.key)})]},e.key))})}var
|
|
9
|
+
/* @__PURE__ */f("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */f("p",{className:"text-xs text-gray-400 truncate",children:d})]}),o&&/* @__PURE__ */f("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-gray-500",children:o})]},e.key)})]},e.key))})}var V="react-os-shell:open-global-search";function X(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(V))}function Y({providers:e,typeIcons:t,typeLabels:n,listRoutes:r,placeholder:b,quickActions:g,onSelect:k,recent:x,onRecord:v,favorites:w,hotkey:N=!0}={}){const L=s().search,_=b??L.placeholder,[A,C]=i(!1),[E,$]=i(""),[I,j]=i(0),K=d(null),{results:D,truncatedTypes:P,loading:z,failure:H,reset:U}=F(E,e,2);c(()=>{const e=e=>{N&&!e.defaultPrevented&&(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),C(e=>!e)),"Escape"===e.key&&A&&C(!1)},t=()=>C(!0);return window.addEventListener("keydown",e),window.addEventListener(V,t),()=>{window.removeEventListener("keydown",e),window.removeEventListener(V,t)}},[A,N]),a(A);const[G,X]=i(!1);A!==G&&(X(A),A&&($(""),j(0),U())),c(()=>{A?setTimeout(()=>K.current?.focus(),50):$("")},[A]),c(()=>{j(0)},[D]);const Y=E.length>=2,Z=u(()=>Y?R(D,g,E,L.actions,{truncatedTypes:P,listRoutes:r,typeLabels:n,seeAllLabel:L.seeAll}):function(e,t){const n=[];e.recent?.length&&n.push({key:"recent",title:t.recent,rows:e.recent.map((t,n)=>({kind:"recent",key:`recent:${t.entity_type}:${t.entity_id}:${n}`,label:t.label,sub:t.sub,badge:S(t,e.typeLabels),result:t})),count:e.recent.length}),e.favorites?.length&&n.push({key:"favorites",title:t.favorites,rows:e.favorites.map((t,n)=>({kind:"favorite",key:`favorite:${t.entity_type}:${t.entity_id}:${n}`,label:t.label,sub:t.sub,badge:S(t,e.typeLabels)||void 0,icon:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z",result:t})),count:e.favorites.length});const r=M("actions",t.actions,e.actions??[]);return r&&n.push(r),n}({recent:x,favorites:w,actions:g,typeLabels:n},L),[Y,D,P,r,n,g,E,x,w,L]),q=u(()=>function(e){return e.flatMap(e=>e.rows)}(Z),[Z]),Q=Math.min(I,Math.max(q.length-1,0)),J=p(),ee=q.length>0;c(()=>{A&&0!==q.length&&document.getElementById(W(J,Q))?.scrollIntoView?.({block:"nearest"})},[A,Q,q.length,J]);const te=y(e=>{C(!1),"action"!==e.kind?("result"!==e.kind&&"recent"!==e.kind||v?.(e.result),k?.(e.result)):e.action.onSelect()},[k,v]);return A?h(
|
|
10
10
|
/* @__PURE__ */m("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:o.overlay},onClick:()=>C(!1),children:[
|
|
11
11
|
/* @__PURE__ */f("div",{"data-global-search-backdrop":"",className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),
|
|
12
12
|
/* @__PURE__ */m("div",{className:"relative z-10 w-full max-w-xl rounded-(--radius-popup) overflow-hidden",onClick:e=>e.stopPropagation(),style:l(),children:[
|
|
13
13
|
/* @__PURE__ */m("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-gray-200",children:[
|
|
14
14
|
/* @__PURE__ */f("svg",{className:"h-5 w-5 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */f("path",{strokeLinecap:"round",strokeLinejoin:"round",d:T})}),
|
|
15
|
-
/* @__PURE__ */f("input",{ref:
|
|
16
|
-
/* @__PURE__ */f("kbd",{className:"hidden sm:inline-flex items-center rounded border border-gray-300 px-2 py-0.5 text-2xs font-medium text-gray-400",children:
|
|
17
|
-
/* @__PURE__ */m("div",{className:"max-h-[50vh] overflow-y-auto",children:[z&&0===
|
|
15
|
+
/* @__PURE__ */f("input",{ref:K,type:"text",value:E,onChange:e=>{$(e.target.value),j(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),j(B(Q,1,q.length))):"ArrowUp"===e.key?(e.preventDefault(),j(B(Q,-1,q.length))):"Tab"===e.key&&q.length>0?(e.preventDefault(),j(function(e,t,n){const r=e.length;if(0===r)return 0;const a=[];let l=0;for(const t of e)a.push(l),l+=t;let o=0;for(let e=0;e<r;e++)t>=a[e]&&(o=e);return a[(o+n+r)%r]}(Z.map(e=>e.rows.length),Q,e.shiftKey?-1:1))):"Enter"===e.key&&q[Q]&&te(q[Q])},placeholder:_,role:"combobox","aria-expanded":ee,"aria-controls":ee?J:void 0,"aria-activedescendant":ee?W(J,Q):void 0,"aria-autocomplete":"list",className:"flex-1 text-sm bg-transparent border-0 rosh-focus-ring placeholder-gray-400"}),z&&/* @__PURE__ */f("span",{"data-global-search-spinner":"",role:"status","aria-label":L.searching,className:"h-4 w-4 shrink-0 animate-spin rounded-full border-2 border-gray-300 border-t-gray-500"}),
|
|
16
|
+
/* @__PURE__ */f("kbd",{className:"hidden sm:inline-flex items-center rounded border border-gray-300 px-2 py-0.5 text-2xs font-medium text-gray-400",children:L.escBadge})]}),
|
|
17
|
+
/* @__PURE__ */m("div",{className:"max-h-[50vh] overflow-y-auto",children:[z&&0===q.length&&/* @__PURE__ */f("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:L.searching}),!z&&"all"===H&&Y&&/* @__PURE__ */f("div",{role:"alert",className:"px-4 py-3 text-center text-sm text-red-600",children:L.searchFailed}),!z&&Y&&0===q.length&&"all"!==H&&/* @__PURE__ */f("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:L.noResults}),ee&&/* @__PURE__ */f(O,{sections:Z,activeIdx:Q,listId:J,label:L.listLabel,typeIcons:t,groupCount:L.groupCount,groupLabel:L.groupLabel,onHover:j,onPick:te}),!z&&"some"===H&&Y&&/* @__PURE__ */f("div",{role:"status",className:"px-4 py-2 text-xs text-amber-600",children:L.partialFailure}),!z&&!Y&&0===q.length&&/* @__PURE__ */f("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:L.minChars(2)})]}),
|
|
18
18
|
/* @__PURE__ */m("div",{className:"flex items-center justify-between px-4 py-2 border-t border-gray-100 bg-gray-50 text-2xs text-gray-400",children:[
|
|
19
19
|
/* @__PURE__ */m("div",{className:"flex items-center gap-3",children:[
|
|
20
20
|
/* @__PURE__ */m("span",{className:"flex items-center gap-1",children:[
|
|
21
21
|
/* @__PURE__ */f("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:"↑"}),
|
|
22
|
-
/* @__PURE__ */f("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:"↓"}),` ${
|
|
22
|
+
/* @__PURE__ */f("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:"↓"}),` ${L.navigate}`]}),
|
|
23
23
|
/* @__PURE__ */m("span",{className:"flex items-center gap-1",children:[
|
|
24
|
-
/* @__PURE__ */f("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:
|
|
25
|
-
/* @__PURE__ */f("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:
|
|
24
|
+
/* @__PURE__ */f("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:L.enterKey}),` ${L.open}`]}),Z.length>1&&/* @__PURE__ */m("span",{className:"flex items-center gap-1",children:[
|
|
25
|
+
/* @__PURE__ */f("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:L.tabKey}),` ${L.nextGroup}`]})]}),
|
|
26
26
|
/* @__PURE__ */m("span",{className:"flex items-center gap-1",children:[
|
|
27
|
-
/* @__PURE__ */f("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:
|
|
27
|
+
/* @__PURE__ */f("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:L.escKey}),` ${L.close}`]})]})]})]}),document.body):null}export{w as BrandMark,Y as GlobalSearch,C as PAGE_RESULT_ENTITY,I as favoritesToResults,$ as navPagesProvider,X as openGlobalSearch,E as parsePageResultTarget,_ as partitionNav,P as pushRecent,k as resolveBrandMarkTreatment,A as rowsContainRoute,z as sanitizeRecent,L as visibleNavChildren,N as visibleSectionItems};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{currentShellStrings as t}from"./chunk-
|
|
1
|
+
import{currentShellStrings as t}from"./chunk-4EIZZYLK.js";var e="http://www.w3.org/2000/svg",n={},o=/* @__PURE__ */new Map;function s(t,e){let n=document.getElementById(t);return n||(n=document.createElement("div"),n.id=t,n.className=e,document.body.appendChild(n)),n}var r={success:"M5 13l4 4L19 7",error:"M6 18L18 6M6 6l12 12",warning:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",loading:"M12 3a9 9 0 019 9",bell:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0"};function i(t,n){const o=document.createElementNS(e,"svg");o.setAttribute("class",n),o.setAttribute("fill","none"),o.setAttribute("viewBox","0 0 24 24"),o.setAttribute("stroke","currentColor"),o.setAttribute("stroke-width","2");const s=document.createElementNS(e,"path");return s.setAttribute("stroke-linecap","round"),"loading"!==t&&s.setAttribute("stroke-linejoin","round"),s.setAttribute("d",r[t]),o.appendChild(s),o}function a(t,e){const n=document.createElement("div");return n.className=t,void 0!==e&&(n.textContent=e),n}function c(t,e,r){const c={...n,...r},l=c.placement??"top",d=c.sticky??!1,u=`${l}|${t}|${e}`;if(c.dedupe){const t=o.get(u);if(t)return t.restart(),{dismiss:t.dismiss}}"loading"!==t&&!1!==c.sound&&import("./sounds-FO772MN2.js").then(e=>{"success"===t?e.playSuccess():"error"===t?e.playError():e.playNotification()}).catch(()=>{});const m="bottom"===l?s("toast-container-bottom","fixed bottom-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col-reverse gap-2 items-center pointer-events-none"):s("toast-container","fixed top-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col gap-2 items-center pointer-events-none"),p="bottom"===l?"translateY(10px)":"translateY(-10px)",f=a("pointer-events-auto cursor-pointer rosh-toast");f.style.opacity="0",f.style.transform=`${p} scale(0.95)`,f.setAttribute("role","error"===t?"alert":"status"),f.setAttribute("aria-atomic","true"),f.appendChild(i(t,`h-4 w-4 rosh-tone-${t}${"loading"===t?" animate-spin":""}`));const h=document.createElement("span");let y;h.textContent=e,f.appendChild(h),m.appendChild(f),requestAnimationFrame(()=>{f.style.opacity="1",f.style.transform="translateY(0) scale(1)"});let v=!1;const g=()=>{v||(v=!0,y&&clearTimeout(y),o.delete(u),f.style.opacity="0",f.style.transform=`${p} scale(0.95)`,setTimeout(()=>f.remove(),300))},b=c.duration??("info"===t?4500:3e3),x=()=>{y&&clearTimeout(y),d||(y=setTimeout(g,b))};return x(),f.addEventListener("mouseenter",()=>{y&&clearTimeout(y)}),f.addEventListener("mouseleave",()=>{v||x()}),f.addEventListener("click",g),o.set(u,{el:f,restart:x,dismiss:g}),{dismiss:g}}var l={success:(t,e)=>c("success",t,e),error:(t,e)=>c("error",t,e),warning:(t,e)=>c("warning",t,e),info:(t,e)=>c("info",t,e),notify:(e,o)=>function(e,o){!1!==(o?.sound??n.sound)&&import("./sounds-FO772MN2.js").then(t=>t.playNotification()).catch(()=>{});const r=s("notif-container","fixed top-4 right-4 z-(--z-toast) flex flex-col gap-3 items-end pointer-events-none"),c=a("pointer-events-auto cursor-pointer rosh-notif");c.style.opacity="0",c.style.transform="translateX(30px) scale(0.95)";const l=a("rosh-notif-badge");l.appendChild(i("bell","h-5 w-5"));const d=a("rosh-notif-body");d.append(a("rosh-notif-title",t().toast.notification),a("notif-msg rosh-notif-msg",e));const u=document.createElement("button");u.className="rosh-notif-close",u.textContent="×",c.append(l,d,u);const m=()=>{c.style.opacity="0",c.style.transform="translateX(30px) scale(0.95)",setTimeout(()=>c.remove(),300)};u.addEventListener("click",t=>{t.stopPropagation(),m()}),c.addEventListener("click",m),r.appendChild(c),requestAnimationFrame(()=>{c.style.opacity="1",c.style.transform="translateX(0) scale(1)"}),setTimeout(m,o?.duration??1e4)}(e,o),promise:(t,e,n)=>{const o=c("loading",e.loading,{...n,sticky:!0});return t.then(t=>{o.dismiss(),c("success","function"==typeof e.success?e.success(t):e.success,n)},t=>{o.dismiss(),c("error","function"==typeof e.error?e.error(t):e.error,n)}),t},configure:t=>{n={...t}}};export{l as toast_default};
|