orbcafe-ui 3.1.7 → 3.1.9
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/dist/index.d.mts +82 -11
- package/dist/index.d.ts +82 -11
- package/dist/index.js +21 -20
- package/dist/index.mjs +20 -19
- package/dist/orbis.css +477 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var jsxRuntime=require('react/jsx-runtime'),ogl=require('ogl'),
|
|
1
|
+
'use strict';var jsxRuntime=require('react/jsx-runtime'),ogl=require('ogl'),to=require('react'),Oo=require('@radix-ui/react-dropdown-menu'),Jo=require('@radix-ui/react-tooltip'),reactDom=require('react-dom'),To=require('@radix-ui/react-dialog'),Cr=require('@radix-ui/react-popover'),ir=require('dayjs'),kf=require('dayjs/plugin/customParseFormat'),navigation=require('next/navigation'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),reactSlot=require('@radix-ui/react-slot'),classVarianceAuthority=require('class-variance-authority'),core=require('@dnd-kit/core'),modifiers=require('@dnd-kit/modifiers'),sortable=require('@dnd-kit/sortable'),Hb=require('dayjs/plugin/isBetween'),zb=require('dayjs/plugin/localizedFormat');require('dayjs/locale/zh-cn'),require('dayjs/locale/fr'),require('dayjs/locale/de'),require('dayjs/locale/ja'),require('dayjs/locale/ko');var Qy=require('next/dynamic'),framerMotion=require('framer-motion'),px=require('react-markdown'),ux=require('remark-gfm'),mx=require('remark-math'),gx=require('rehype-katex'),hx=require('rehype-raw'),reactSyntaxHighlighter=require('react-syntax-highlighter'),prism=require('react-syntax-highlighter/dist/esm/styles/prism'),zm=require('mermaid'),K0=require('dayjs/plugin/isoWeek');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var to__namespace=/*#__PURE__*/_interopNamespace(to);var Oo__namespace=/*#__PURE__*/_interopNamespace(Oo);var Jo__namespace=/*#__PURE__*/_interopNamespace(Jo);var To__namespace=/*#__PURE__*/_interopNamespace(To);var Cr__namespace=/*#__PURE__*/_interopNamespace(Cr);var ir__default=/*#__PURE__*/_interopDefault(ir);var kf__default=/*#__PURE__*/_interopDefault(kf);var Hb__default=/*#__PURE__*/_interopDefault(Hb);var zb__default=/*#__PURE__*/_interopDefault(zb);var Qy__default=/*#__PURE__*/_interopDefault(Qy);var px__default=/*#__PURE__*/_interopDefault(px);var ux__default=/*#__PURE__*/_interopDefault(ux);var mx__default=/*#__PURE__*/_interopDefault(mx);var gx__default=/*#__PURE__*/_interopDefault(gx);var hx__default=/*#__PURE__*/_interopDefault(hx);var zm__default=/*#__PURE__*/_interopDefault(zm);var K0__default=/*#__PURE__*/_interopDefault(K0);var Ac=Object.defineProperty;var ph=(t,o,r)=>o in t?Ac(t,o,{enumerable:true,configurable:true,writable:true,value:r}):t[o]=r;var qs=(t,o,r)=>()=>{if(r)throw r[0];try{return t&&(o=t(t=0)),o}catch(n){throw r=[n],n}};var uh=(t,o)=>{for(var r in o)Ac(t,r,{get:o[r],enumerable:true});};var Ec=(t,o,r)=>ph(t,o+"",r);var La,hh,vt,Oa,Lc,fh,bh,Oc,Fc,vh,Zs,yh,Bc,Ch,Hn,Ue,Gt=qs(()=>{"use strict";La={xs:0,sm:600,md:900,lg:1200,xl:1536},hh=t=>({palette:{mode:t,primary:{main:"var(--orb-primary)",light:"var(--orb-p300)",dark:"var(--orb-p700)",contrastText:"var(--orb-on-primary)"},secondary:{main:t==="dark"?"var(--orb-p300)":"var(--orb-fg)",contrastText:t==="dark"?"var(--orb-canvas)":"var(--orb-on-primary)"},error:{main:"var(--orb-err)",contrastText:"var(--orb-on-primary)"},warning:{main:"var(--orb-accent)",contrastText:"var(--orb-on-primary)"},info:{main:t==="dark"?"var(--orb-p300)":"var(--orb-primary)",contrastText:"var(--orb-on-primary)"},success:{main:t==="dark"?"var(--orb-p300)":"var(--orb-primary)",contrastText:"var(--orb-on-primary)"},text:{primary:"var(--orb-fg)",secondary:"var(--orb-muted)",disabled:"var(--orb-disabled-fg)"},background:{default:"var(--orb-canvas)",paper:"var(--orb-surface)"},action:{hover:"var(--orb-hover)",selected:"var(--orb-selected)",focus:"var(--orb-focus-ring)",disabled:"var(--orb-disabled-fg)",disabledBackground:"var(--orb-disabled-bg)",active:t==="dark"?"var(--orb-p300)":"var(--orb-primary)"},divider:"var(--orb-border)",common:{white:"#ffffff",black:"#01091a"},grey:{50:"var(--orb-surface)",100:"var(--orb-surface)",200:"var(--orb-border)",300:"var(--orb-border)",400:"var(--orb-muted)",500:"var(--orb-muted)",600:"var(--orb-fg)",700:"var(--orb-fg)",800:"var(--orb-surface-3)",900:"var(--orb-canvas)"}},shape:{borderRadius:10},breakpoints:{up:o=>`@media (min-width:${La[o]}px)`,down:o=>`@media (max-width:${Math.max(0,La[o]-.05)}px)`},spacing:(...o)=>o.map(r=>`${r*8}px`).join(" "),transitions:{create:(o="all",r={})=>(Array.isArray(o)?o:[o]).map(a=>`${a} ${r.duration??200}ms ${r.easing??"ease"}`).join(", "),duration:{shortest:150,shorter:180,short:200,standard:300}},zIndex:{modal:1300,drawer:1200,appBar:1100,tooltip:1500}}),vt=()=>typeof document>"u"?"light":document.documentElement.dataset.orbMode==="dark"||document.documentElement.classList.contains("orb-dark")?"dark":"light",Oa=()=>hh(vt()),Lc={m:["margin"],mt:["marginTop"],mr:["marginRight"],mb:["marginBottom"],ml:["marginLeft"],mx:["marginLeft","marginRight"],my:["marginTop","marginBottom"],p:["padding"],pt:["paddingTop"],pr:["paddingRight"],pb:["paddingBottom"],pl:["paddingLeft"],px:["paddingLeft","paddingRight"],py:["paddingTop","paddingBottom"],bgcolor:["backgroundColor"]},fh=new Set(["animationIterationCount","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridArea","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","gridRow","gridRowEnd","gridRowSpan","gridRowStart","fontWeight","lineClamp","lineHeight","opacity","order","orphans","scale","tabSize","widows","zIndex","zoom"]),bh=(t,o)=>{if(typeof o!="string")return o;let r={"background.default":"var(--orb-canvas)","background.paper":"var(--orb-surface)","text.primary":"var(--orb-fg)","text.secondary":"var(--orb-muted)","text.disabled":"var(--orb-disabled-fg)","primary.main":"var(--orb-primary)","primary.light":"var(--orb-p300)","primary.dark":"var(--orb-p700)","secondary.main":"var(--orb-muted)",divider:"var(--orb-border)","error.main":"var(--orb-err)","warning.main":"var(--orb-accent)","success.main":"var(--orb-primary)","info.main":"var(--orb-primary)","action.hover":"var(--orb-hover)","action.selected":"var(--orb-selected)","action.disabled":"var(--orb-disabled-fg)"};return r[o]?r[o]:o},Oc=t=>t.startsWith("--")?t:t.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`),Fc=(t,o)=>{if(o==null||o===!1)return null;let r=bh(t,o);return typeof r=="number"&&r!==0&&!fh.has(t)?["margin","marginTop","marginRight","marginBottom","marginLeft","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","gap","rowGap","columnGap"].includes(t)?`${r*8}px`:`${r}px`:String(r)},vh=t=>t?(Array.isArray(t)?t:[t]).reduce((r,n)=>{if(!n)return r;let a=typeof n=="function"?n(Oa()):n;return {...r,...a}},{}):{},Zs=t=>!t||typeof t!="object"?JSON.stringify(t):Array.isArray(t)?`[${t.map(Zs).join(",")}]`:`{${Object.keys(t).sort().map(o=>`${JSON.stringify(o)}:${Zs(t[o])}`).join(",")}}`,yh=t=>{let o=2166136261;for(let r=0;r<t.length;r+=1)o^=t.charCodeAt(r),o=Math.imul(o,16777619);return (o>>>0).toString(36)},Bc=new Set,Ch=t=>{if(typeof document>"u"||Bc.has(t))return;Bc.add(t);let o=document.querySelector("style[data-orb-sx]");o||(o=document.createElement("style"),o.dataset.orbSx="true",document.head.appendChild(o)),o.appendChild(document.createTextNode(t));},Hn=(t,o)=>{let r=[],n=[];return Object.entries(o).forEach(([a,i])=>{let s=typeof i=="function"?i(Oa()):i;if(s==null||s===!1)return;if(a.startsWith("@media")&&typeof s=="object"){n.push(`${a}{${Hn(t,s)}}`);return}if(a.startsWith("&")&&typeof s=="object"){n.push(Hn(a.split("&").join(t),s));return}if((a.startsWith(":")||a.startsWith(">")||a.startsWith("["))&&typeof s=="object"){n.push(Hn(`${t}${a}`,s));return}if(typeof s=="object"){let d=s,p=Object.keys(d).filter(m=>m in La);p.length>0?p.forEach(m=>{let f=(Lc[a]??[a]).map(u=>{let b=Fc(u,d[m]);return b===null?"":`${Oc(u)}:${b};`}).join("");f&&(m==="xs"?n.push(`${t}{${f}}`):n.push(`@media (min-width:${La[m]}px){${t}{${f}}}`));}):n.push(Hn(`${t} ${a}`,d));return}(Lc[a]??[a]).forEach(d=>{let p=Fc(d,s);p!==null&&r.push(`${Oc(d)}:${p};`);});}),`${r.length?`${t}{${r.join("")}}`:""}${n.join("")}`},Ue=(t,o,r)=>{let n=vh(t);if(Object.keys(n).length===0)return {className:o,style:r};let a=`orb-sx-${yh(Zs(n))}`;return Ch(Hn(`.${a}`,n)),{className:[a,o].filter(Boolean).join(" "),style:r}};});var Hc,e,c,M=qs(()=>{"use strict";Gt();Hc=(t,o)=>{if(!o||typeof t!="string")return [t,o];let r={...o},n=r.component??t;delete r.component;let a=r.sx;delete r.sx;let i=Ue(a,r.className,r.style);return r.className=[i.className,r.hover?"orb-hoverable":void 0,r.selected?"orb-selected":void 0,r.noWrap?"orb-nowrap":void 0,r.padding==="checkbox"?"orb-cell-checkbox":void 0].filter(Boolean).join(" ")||void 0,r.style=i.style,["hover","selected","noWrap","stickyHeader","padding","flexItem","item","container","xs","sm","md","lg","xl","sortDirection","scrollButtons","disableSticky","columns","primaryTypographyProps","secondaryTypographyProps","position"].forEach(s=>delete r[s]),[n,r]},e=(t,o,r)=>{let[n,a]=Hc(t,o);return jsxRuntime.jsx(n,a,r)},c=(t,o,r)=>{let[n,a]=Hc(t,o);return jsxRuntime.jsxs(n,a,r)};});var Im={};uh(Im,{COrbCanvas:()=>Yy});function Yy({hue:t=0,hoverIntensity:o=.2,rotateOnHover:r=true,forceHoverState:n=false,backgroundColor:a="transparent"}){let i=to.useRef(null),s=`
|
|
2
2
|
precision highp float;
|
|
3
3
|
attribute vec2 position;
|
|
4
4
|
attribute vec2 uv;
|
|
@@ -180,26 +180,27 @@
|
|
|
180
180
|
vec4 col = mainImage(fragCoord);
|
|
181
181
|
gl_FragColor = vec4(col.rgb * col.a, col.a);
|
|
182
182
|
}
|
|
183
|
-
`;return eo.useEffect(()=>{let d=i.current;if(!d)return;let p=new ogl.Renderer({alpha:true,premultipliedAlpha:false}),m=p.gl;m.clearColor(0,0,0,0),d.appendChild(m.canvas);let f=new ogl.Triangle(m),h=new ogl.Program(m,{vertex:s,fragment:l,uniforms:{iTime:{value:0},iResolution:{value:new ogl.Vec3(m.canvas.width,m.canvas.height,m.canvas.width/m.canvas.height)},hue:{value:t},hover:{value:0},rot:{value:0},hoverIntensity:{value:o},backgroundColor:{value:xm(a)}}}),u=new ogl.Mesh(m,{geometry:f,program:h});function v(){if(!d)return;let I=window.devicePixelRatio||1,w=d.clientWidth,M=d.clientHeight;p.setSize(w*I,M*I),m.canvas.style.width=w+"px",m.canvas.style.height=M+"px",h.uniforms.iResolution.value.set(m.canvas.width,m.canvas.height,m.canvas.width/m.canvas.height);}window.addEventListener("resize",v),v();let y=0,g=0,x=0,b=.3,C=I=>{let w=d.getBoundingClientRect(),M=I.clientX-w.left,A=I.clientY-w.top,R=w.width,D=w.height,E=Math.min(R,D),O=R/2,_=D/2,J=(M-O)/E*2,F=(A-_)/E*2;Math.sqrt(J*J+F*F)<.8?y=1:y=0;},k=()=>{y=0;};d.addEventListener("mousemove",C),d.addEventListener("mouseleave",k);let S,T=I=>{S=requestAnimationFrame(T);let w=(I-g)*.001;g=I,h.uniforms.iTime.value=I*.001,h.uniforms.hue.value=t,h.uniforms.hoverIntensity.value=o,h.uniforms.backgroundColor.value=xm(a);let M=n?1:y;h.uniforms.hover.value+=(M-h.uniforms.hover.value)*.1,r&&M>.5&&(x+=w*b),h.uniforms.rot.value=x,p.render({scene:u});};return S=requestAnimationFrame(T),()=>{cancelAnimationFrame(S),window.removeEventListener("resize",v),d.removeEventListener("mousemove",C),d.removeEventListener("mouseleave",k),m.canvas.parentNode===d&&d.removeChild(m.canvas),m.getExtension("WEBGL_lose_context")?.loseContext();}},[t,o,r,n,a]),e("div",{ref:i,className:"w-full h-full"})}function Hy(t,o,r){let n,a,i;if(o===0)n=a=i=r;else {let s=(p,m,f)=>(f<0&&(f+=1),f>1&&(f-=1),f<.16666666666666666?p+(m-p)*6*f:f<.5?m:f<.6666666666666666?p+(m-p)*(.6666666666666666-f)*6:p),l=r<.5?r*(1+o):r+o-r*o,d=2*r-l;n=s(d,l,t+1/3),a=s(d,l,t),i=s(d,l,t-1/3);}return new ogl.Vec3(n,a,i)}function xm(t){if(t==="transparent")return new ogl.Vec3(0,0,0);if(t.startsWith("#")){let n=parseInt(t.slice(1,3),16)/255,a=parseInt(t.slice(3,5),16)/255,i=parseInt(t.slice(5,7),16)/255;return new ogl.Vec3(n,a,i)}let o=t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(o)return new ogl.Vec3(parseInt(o[1])/255,parseInt(o[2])/255,parseInt(o[3])/255);let r=t.match(/hsla?\((\d+),\s*(\d+)%,\s*(\d+)%/);if(r){let n=parseInt(r[1])/360,a=parseInt(r[2])/100,i=parseInt(r[3])/100;return Hy(n,a,i)}return new ogl.Vec3(0,0,0)}var Sm=zs(()=>{"use strict";"use client";P();});var ef={canvas:"#ffffff",surface:"#f5f5f5",surface2:"#f5f5f5",surface3:"#f5f5f5",fg:"#555555",muted:"#8c8c8c",border:"#dbdbdb",primary:"#154194",onPrimary:"#ffffff",link:"#154194",p50:"#f0f3f9",p100:"#dce4f1",p200:"#bac9e3",p300:"#91a8d1",p600:"#0f3276",p700:"#08255a",accent:"#fc4c02",err:"#ac3101",errBg:"#fff4f0",warnBg:"#fff2ee",hover:"rgba(21, 65, 148, 0.06)",selected:"rgba(21, 65, 148, 0.10)",focusRing:"rgba(21, 65, 148, 0.18)",focusSolid:"#154194",disabledFg:"#aeaeae",disabledBg:"#f0f0f0",chartGrid:"#dbdbdb",chartText:"#8c8c8c",track:"#f5f5f5",shadow1:"0 1px 2px rgba(1,9,26,.05),0 2px 6px rgba(1,9,26,.06)",shadow2:"0 4px 14px rgba(1,9,26,.10)",shadow3:"0 12px 32px rgba(1,9,26,.16)",fontBrand:"Montserrat",inverseSurface:"#01091a",inverseFg:"#ffffff",inverseLink:"#91a8d1",aiAccent:"#21bcff",statusFg:"#475569",statusPrimary:"#1d4ed8",statusSuccess:"#047857",statusWarning:"#b45309",statusError:"#b91c1c",statusInfo:"#0369a1",chart1:"#154194",chart2:"#91a8d1",chart3:"#8c8c8c",chart4:"#08255a",chart5:"#fc4c02",chart6:"#bac9e3",chartPositive:"#66bb6a",chartNegative:"#ef5350"},tf={canvas:"#01091a",surface:"#0a1526",surface2:"#061324",surface3:"#0e1b2b",fg:"#ffffff",muted:"rgba(255,255,255,0.7)",border:"rgba(255,255,255,0.12)",primary:"#154194",onPrimary:"#ffffff",link:"#91a8d1",p50:"#021432",p100:"#021a3d",p200:"#bac9e3",p300:"#91a8d1",p600:"#375ea5",p700:"#6e8cc1",accent:"#fc4c02",err:"#d53f01",errBg:"#16163b",warnBg:"#19173f",hover:"rgba(255,255,255,0.08)",selected:"rgba(21, 65, 148, 0.45)",focusRing:"rgba(145, 168, 209, 0.45)",focusSolid:"#91a8d1",disabledFg:"rgba(255,255,255,0.38)",disabledBg:"rgba(255,255,255,0.07)",chartGrid:"rgba(255,255,255,0.12)",chartText:"rgba(255,255,255,0.7)",track:"rgba(255,255,255,0.1)",shadow1:"0 1px 2px rgba(0,0,0,.4),0 2px 8px rgba(0,0,0,.35)",shadow2:"0 4px 16px rgba(0,0,0,.5)",shadow3:"0 12px 32px rgba(0,0,0,.55)",fontBrand:"Montserrat",inverseSurface:"#01091a",inverseFg:"#ffffff",inverseLink:"#91a8d1",aiAccent:"#21bcff",statusFg:"#94a3b8",statusPrimary:"#60a5fa",statusSuccess:"#34d399",statusWarning:"#fbbf24",statusError:"#f87171",statusInfo:"#38bdf8",chart1:"#154194",chart2:"#91a8d1",chart3:"rgba(255,255,255,0.7)",chart4:"#a4b8dd",chart5:"#fc4c02",chart6:"#bac9e3",chartPositive:"#66bb6a",chartNegative:"#ef5350"},Vs={light:ef,dark:tf},$0='"Montserrat", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif',_0=t=>{let o=Vs[t];return [o.primary,o.p300,o.muted,o.p700]},G0=10,U0="0.2s ease";P();var Ec=eo.createContext({mode:"light",setting:"light"}),gf=t=>{if(typeof document>"u")return;let o=document.documentElement;o.classList.toggle("orb-dark",t==="dark"),o.dataset.orbMode=t,o.style.colorScheme=t;},Bn=({mode:t,defaultMode:o="light",children:r})=>{let n=t??o,[a,i]=eo.useState("light"),[s,l]=eo.useState(false);eo.useEffect(()=>{l(true);let m=window.matchMedia("(prefers-color-scheme: dark)"),f=()=>i(m.matches?"dark":"light");return f(),m.addEventListener("change",f),()=>m.removeEventListener("change",f)},[]);let d=n==="system"?s?a:"light":n;eo.useEffect(()=>{gf(d);},[d]);let p=eo.useMemo(()=>({mode:d,setting:n}),[d,n]);return e(Ec.Provider,{value:p,children:r})},fo=()=>eo.useContext(Ec).mode,$s=()=>Vs[fo()];var ot=(t,o)=>{let r=Math.min(1,Math.max(0,o)),n=t.trim(),a=d=>d.split("").map(p=>p+p).join(""),i=n.startsWith("#")?n.slice(1):"",s=i.length===3?a(i):i;if(/^[0-9a-fA-F]{6}$/.test(s)){let d=parseInt(s.slice(0,2),16),p=parseInt(s.slice(2,4),16),m=parseInt(s.slice(4,6),16);return `rgba(${d}, ${p}, ${m}, ${r})`}let l=`${Math.round(r*100)}%`;return `color-mix(in oklch, ${t} ${l}, transparent)`};var No=t=>{let o=t.startsWith("up:")?`(min-width:${t.slice(3)}px)`:t.startsWith("down:")?`(max-width:${t.slice(5)}px)`:t,[r,n]=eo.useState(()=>typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia(o).matches);return eo.useEffect(()=>{if(typeof window.matchMedia!="function")return;let a=window.matchMedia(o),i=()=>n(a.matches);return i(),a.addEventListener("change",i),()=>a.removeEventListener("change",i)},[o]),r};P();var bf={accept:57435,activate:57864,activity:57769,add:57432,barChart:57417,calendar:57414,camera:57413,checklist:57952,collapseAll:57988,command:57997,copy:57925,darkMode:58122,decline:57406,delete:57405,dimension:57718,document:57780,down:57827,download:57402,duplicate:57401,edit:57400,email:57399,employee:57398,error:57836,expandAll:57987,factory:57464,favorite:57445,filter:57462,fullScreen:57702,grid:57457,hide:57834,home:57456,information:57993,inventory:57693,ipad:57491,lightMode:58121,lightbulb:57380,lineChart:57740,locked:57683,log:57378,map:57377,menu:57822,message:57884,microphone:57586,move:57832,navigationLeft:57447,navigationRight:57446,overflow:57842,overview:57551,paperPlane:57548,picture:57366,pieChart:57365,play:57499,process:57543,product:57361,pushpin:57503,qrCode:57999,receipt:57541,refresh:57360,save:57498,search:57357,show:57833,shipping:57523,slimDown:57839,slimUp:57840,sort:57853,sound:57895,splitOne:57919,splitTwo:57920,stop:57861,sum:57998,synchronize:57354,table:57530,tableColumn:57983,tableRow:57982,thumbDown:57891,thumbUp:57890,time:57508,translate:57995,tree:57588,trendDown:57931,up:57828,upload:57881,warning:57492,world:57489,wrench:57346},vf=t=>typeof t=="number"?`${t}px`:t,yf={"2.5":10,3:12,"3.5":14,4:16,5:20,6:24,7:28,8:32,10:40,12:48},Cf=t=>{if(!t)return;let o=t.match(/(?:^|\s)(?:h|w)-(2\.5|3(?:\.5)?|4|5|6|7|8|10|12)(?:\s|$)/);return o?yf[o[1]]:void 0},Tt=eo.forwardRef(({name:t,size:o,title:r,className:n,style:a,strokeWidth:i,fill:s,...l},d)=>{let p=l["aria-label"]??r,m=vf(o??Cf(n)??"1em"),f={fontFamily:"SAP-icons",fontSize:m,fontStyle:"normal",fontWeight:"normal",lineHeight:1,width:m,height:m,display:"inline-flex",alignItems:"center",justifyContent:"center",flex:"0 0 auto",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...a};return e("span",{ref:d,role:p?"img":void 0,"aria-hidden":p?void 0:true,title:r,className:n,"data-sap-icon":t,style:f,...l,children:String.fromCodePoint(bf[t])})});Tt.displayName="SapIcon";var ae=(t,o)=>{let r=eo.forwardRef((n,a)=>e(Tt,{ref:a,name:t,...n}));return r.displayName=o??`SapIcon(${t})`,r};var Oc=ae("activity","Activity"),Da=ae("error","AlertCircle"),Fc=ae("warning","AlertTriangle"),mw=ae("down","ArrowDown"),gw=ae("navigationRight","ArrowRight"),Bc=ae("up","ArrowUp"),_s=ae("barChart","BarChart"),fw=ae("activate","Bot"),Gs=ae("calendar","Calendar"),hw=Gs,bw=ae("camera","Camera"),vw=ae("lineChart","ChartNoAxesCombined"),Ao=ae("accept","Check"),Na=ae("accept","CheckCircle"),Ho=ae("slimDown","ChevronDown"),Aa=ae("navigationLeft","ChevronLeft"),zo=ae("navigationRight","ChevronRight"),yw=ae("slimUp","ChevronUp"),Cw=ae("expandAll","ChevronsDown"),xw=ae("collapseAll","ChevronsUp"),Ea=ae("error","CircleAlert"),Hn=ae("accept","CircleCheck"),ww=Hn,Hc=ae("stop","CircleStop"),zc=ae("copy","Clipboard"),Sw=ae("checklist","ClipboardCheck"),kw=ae("checklist","ClipboardList"),Vc=ae("time","Clock"),Pw=ae("tableColumn","Columns3"),Yo=ae("copy","Copy"),Tw=ae("duplicate","CopyPlus"),Iw=ae("delete","Delete"),La=ae("download","Download"),Wc=ae("edit","Edit"),$c=ae("fullScreen","Expand"),Rw=ae("show","Eye"),Mw=ae("hide","EyeOff"),Oa=ae("document","File"),_c=ae("document","FileText"),Dw=ae("filter","Filter"),zn=ae("tree","FolderTree"),Gc=ae("process","GitBranch"),Vn=ae("world","Globe"),Uc=ae("grid","Grid"),Nw=ae("move","GripVertical"),Aw=ae("wrench","Hammer"),Kc=ae("picture","Image"),Fa=ae("information","Info"),Ew=ae("translate","Languages"),Lw=ae("dimension","Layers"),Ow=ae("home","LayoutDashboard"),Ba=ae("lightbulb","Lightbulb"),qc=ae("lineChart","LineChart"),Xc=ae("synchronize","Loader2"),Ha=ae("locked","Lock"),Fw=Ha,Yc=ae("log","LogOut"),Us=ae("email","Mail"),Zc=ae("map","MapPin"),jc=ae("menu","Menu"),xf=ae("message","MessageCircle"),Qc=xf,za=ae("microphone","Mic"),Bw=ae("microphone","MicOff"),Jc=ae("darkMode","Moon"),Hw=ae("overflow","MoreHorizontal"),zw=ae("accept","PackageCheck"),Vw=ae("product","PackageSearch"),Va=ae("splitOne","PanelLeftOpen"),Wa=ae("splitTwo","PanelRight"),Ww=ae("overview","PanelsTopLeft"),ed=ae("pieChart","PieChart"),Jr=ae("pushpin","Pin"),$w=ae("play","Play"),en=ae("add","Plus"),_w=ae("qrCode","QrCode"),Gw=ae("receipt","ReceiptText"),$a=ae("refresh","RefreshCw"),Uw=ae("activate","Rocket"),Kw=ae("refresh","RotateCcw"),td=ae("refresh","RotateCw"),qw=ae("tableRow","Rows3"),Xw=ae("save","Save"),Yw=ae("qrCode","ScanLine"),Vo=ae("search","Search"),wf=ae("paperPlane","Send"),od=wf,tn=ae("wrench","Settings"),Zw=ae("accept","ShieldCheck"),jw=ae("sum","Sigma"),Qw=ae("sort","SortAsc"),Jw=ae("splitTwo","SquareSplitHorizontal"),eS=ae("favorite","Star"),rd=ae("lightMode","Sun"),tS=ae("table","Table2"),oS=ae("ipad","TabletSmartphone"),Wn=ae("command","Terminal"),nd=ae("thumbDown","ThumbsDown"),ad=ae("thumbUp","ThumbsUp"),id=ae("delete","Trash2"),rS=ae("tree","TreePine"),sd=ae("trendDown","TrendingDown"),_a=ae("warning","TriangleAlert"),nS=ae("shipping","Truck"),ld=ae("upload","UploadCloud"),Ks=ae("employee","User"),cd=ae("sound","Volume2"),aS=ae("factory","Warehouse"),iS=ae("process","Workflow"),qt=ae("decline","X"),Ga=ae("error","XCircle");_t();P();var kf={contained:"primary",outlined:"secondary",text:"ghost"},Pf={small:"orb-btn-sm",medium:void 0,large:"orb-btn-lg"},ke=eo.forwardRef(({variant:t="primary",size:o="medium",block:r=false,loading:n=false,startIcon:a,endIcon:i,component:s,href:l,sx:d,className:p,children:m,disabled:f,type:h="button",...u},v)=>{let y=kf[t]??t,g=["orb-btn",`orb-btn-${y}`,Pf[o],r?"orb-btn-block":void 0,n?"orb-is-loading":void 0,p].filter(Boolean).join(" "),x=Ue(d,g),b=s??(l?"a":"button");return c(b,{ref:v,type:b==="button"?h:void 0,href:l,className:x.className,style:x.style,disabled:b==="button"?f||n:void 0,"aria-disabled":b!=="button"&&(f||n)?true:void 0,...u,children:[n&&e("span",{className:`orb-spin ${y==="primary"?"orb-spin-light":""}`,"aria-hidden":true}),!n&&a,m,!n&&i]})});ke.displayName="CButton";_t();P();var ze=eo.forwardRef(({label:t,value:o,defaultValue:r,onChange:n,onFocus:a,onBlur:i,onKeyDown:s,type:l="text",placeholder:d,disabled:p,readOnly:m,required:f,autoFocus:h,autoComplete:u,name:v,id:y,error:g,helperText:x,dense:b=false,size:C,fullWidth:k=true,select:S=false,multiline:T=false,rows:I,children:w,variant:M,margin:A,onClick:R,startAdornment:D,endAdornment:E,InputProps:O,inputProps:_,InputLabelProps:J,SelectProps:F,sx:V,className:z},X)=>{let W=eo.useId(),H=y??`orb-tf-${W}`,U=D??O?.startAdornment,Y=E??O?.endAdornment,re=(typeof g=="string"?g:void 0)??x,we={id:H,className:`orb-inp ${b||C==="small"?"orb-inp-dense":""}`,style:k?void 0:{width:"auto"},value:o,defaultValue:r,onChange:n,onFocus:a,onBlur:i,onKeyDown:s,placeholder:d,disabled:p,required:f,autoFocus:h,autoComplete:u,name:v,onClick:R,"aria-invalid":!!g},Ve=S?e("select",{...we,ref:X,onChange:n,children:w}):T?e("textarea",{...we,ref:X,onChange:n,rows:I,readOnly:m||O?.readOnly}):e("input",{...we,ref:X,onChange:n,type:l,readOnly:m||O?.readOnly,..._}),Te=Ue(V,`orb-fld ${g?"orb-is-error":""} ${z??""}`,{width:k?"100%":void 0});return c("div",{className:Te.className,style:Te.style,children:[t&&e("label",{htmlFor:H,children:t}),U||Y?c("div",{className:"orb-inp-adornment-wrap",children:[U&&e("span",{className:"orb-inp-adornment",children:U}),Y&&e("span",{className:"orb-inp-adornment orb-inp-adornment-end",children:Y}),Ve]}):Ve,re&&e("span",{className:"orb-fld-msg",children:re})]})});ze.displayName="CTextField";_t();P();var $n=eo.forwardRef(({label:t,value:o,defaultValue:r,onChange:n,placeholder:a,disabled:i,readOnly:s,rows:l,minRows:d=3,multiline:p,error:m,helperText:f,fullWidth:h=true,name:u,id:v,inputProps:y,sx:g,className:x},b)=>{let C=eo.useId(),k=v??`orb-ta-${C}`,T=(typeof m=="string"?m:void 0)??f,I=Ue(g,`orb-fld ${m?"orb-is-error":""} ${x??""}`,{width:h?"100%":void 0});return c("div",{className:I.className,style:I.style,children:[t&&e("label",{htmlFor:k,children:t}),e("textarea",{ref:b,id:k,className:"orb-inp",value:o,defaultValue:r,onChange:n,placeholder:a,disabled:i,readOnly:s,rows:l??d,name:u,"aria-invalid":!!m,...y}),T&&e("span",{className:"orb-fld-msg",children:T})]})});$n.displayName="CTextArea";_t();P();var zt=eo.forwardRef(({label:t,options:o,children:r,value:n,defaultValue:a,onChange:i,disabled:s,size:l,dense:d=true,fullWidth:p=true,minWidth:m,placeholder:f,displayEmpty:h,renderValue:u,multiple:v,MenuProps:y,variant:g,disableUnderline:x,onClick:b,onMouseDown:C,error:k,helperText:S,name:T,id:I,"aria-label":w,sx:M,className:A},R)=>{let D=eo.useId(),E=I??`orb-sel-${D}`,_=(typeof k=="string"?k:void 0)??S,J=eo.useRef(null),F=eo.useRef(null),[V,z]=eo.useState(false),[X,W]=eo.useState(180),[H,U]=eo.useState(a??"");eo.useImperativeHandle(R,()=>J.current);let Y=eo.useMemo(()=>eo.Children.toArray(r).flatMap(ce=>{if(!eo.isValidElement(ce)||ce.type!=="option")return [];let be=ce;return [{value:Array.isArray(be.props.value)?be.props.value[0]??"":be.props.value??"",label:be.props.children,disabled:be.props.disabled}]}),[r]),ue=o??Y,re=n??H,ge=Array.isArray(re)?re[0]??"":re,we=String(ge??""),Ve=ue.find(ce=>String(ce.value)===we),Te=u?u(re):Ve?.label??(we||(f??"")),Ie=Ue(M,`orb-fld ${k?"orb-is-error":""} ${A??""}`,{width:p?"100%":void 0,minWidth:typeof m=="number"?`${m}px`:m});if(v)return c("div",{className:Ie.className,style:Ie.style,children:[t&&e("label",{htmlFor:E,children:t}),c("select",{ref:R,id:E,className:`orb-inp ${d||l==="small"?"orb-inp-dense":""}`,value:n,defaultValue:a,onChange:i,disabled:s,name:T,multiple:true,onClick:b,onMouseDown:C,"aria-invalid":!!k,"aria-label":w,children:[f!==void 0&&e("option",{value:"",children:f}),o?o.map(ce=>e("option",{value:ce.value,disabled:ce.disabled,children:ce.label},ce.value)):r]}),_&&e("span",{className:"orb-fld-msg",children:_})]});let He=ce=>{n===void 0&&U(ce);let be=J.current;be&&(Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,"value")?.set?.call(be,ce),i?.({target:be,currentTarget:be}));};return c("div",{className:Ie.className,style:Ie.style,children:[t&&e("label",{htmlFor:E,children:t}),e("select",{ref:J,className:"orb-visually-hidden",tabIndex:-1,"aria-hidden":"true",name:T,value:we,disabled:s,onChange:()=>{},children:ue.map(ce=>e("option",{value:ce.value,disabled:ce.disabled,children:ce.label},String(ce.value)))}),c(Eo__namespace.Root,{open:V,onOpenChange:ce=>{ce&&W(F.current?.getBoundingClientRect().width??180),z(ce);},children:[e(Eo__namespace.Trigger,{asChild:true,children:c("button",{ref:F,id:E,type:"button",className:`orb-inp orb-select-trigger ${d||l==="small"?"orb-inp-dense":""}`,disabled:s,"aria-invalid":!!k,"aria-label":w,"aria-haspopup":"listbox","data-placeholder":!Ve&&!we?"":void 0,onClick:b,onMouseDown:C,children:[e("span",{className:"orb-select-value",children:Te}),e(Tt,{className:"orb-select-chevron",name:"slimDown",size:12})]})}),e(Eo__namespace.Portal,{children:e(Eo__namespace.Content,{className:"orb-pop orb-select-menu",align:"start",sideOffset:5,collisionPadding:8,style:{minWidth:X},children:e(Eo__namespace.RadioGroup,{value:we,onValueChange:He,children:ue.map(ce=>c(Eo__namespace.RadioItem,{className:"orb-select-option",value:String(ce.value),disabled:ce.disabled,children:[e("span",{className:"orb-select-check","aria-hidden":"true",children:String(ce.value)===we?e(Tt,{name:"accept",size:13}):null}),e("span",{children:ce.label})]},String(ce.value)))})})})]}),_&&e("span",{className:"orb-fld-msg",children:_})]})});zt.displayName="CSelect";_t();P();var It=eo.forwardRef(({label:t,checked:o,defaultChecked:r,onChange:n,disabled:a,indeterminate:i,name:s,value:l,id:d,size:p,color:m,onClick:f,inputProps:h,sx:u,className:v},y)=>{let g=Ue([{...p==="small"?{fontSize:13}:void 0,...m?{color:m}:void 0},...Array.isArray(u)?u:u?[u]:[]],`orb-chk ${v??""}`),x=e("input",{ref:b=>{b&&(b.indeterminate=!!i),typeof y=="function"?y(b):y&&(y.current=b);},type:"checkbox",id:d,checked:o,defaultChecked:r,onChange:n,readOnly:o!==void 0&&n===void 0,disabled:a,name:s,value:l,onClick:f,...h});return t==null?e("span",{className:g.className,style:g.style,children:x}):c("label",{className:g.className,style:g.style,children:[x,e("span",{children:t})]})});It.displayName="CCheckbox";P();var Hf=({label:t,options:o,value:r,defaultValue:n,onChange:a,name:i,row:s=false,disabled:l,sx:d,className:p})=>{let m=eo.useId(),f=i??`orb-rdo-${m}`;return c("div",{className:`orb-fld ${p??""}`,style:d,role:"radiogroup",children:[t&&e("span",{className:"orb-fld-label",children:t}),e("div",{style:{display:"flex",flexDirection:s?"row":"column",gap:s?24:8,flexWrap:"wrap"},children:o.map(h=>c("label",{className:"orb-rdo",children:[e("input",{type:"radio",name:f,value:h.value,checked:r!==void 0?r===h.value:void 0,defaultChecked:n!==void 0?n===h.value:void 0,onChange:a?u=>a(u,h.value):void 0,disabled:l||h.disabled}),e("span",{children:h.label})]},h.value))})]})};_t();P();var Ua=eo.forwardRef(({label:t,checked:o,defaultChecked:r,onChange:n,disabled:a,name:i,id:s,size:l,sx:d,className:p},m)=>{let f=Ue([{...l==="small"?{transform:"scale(.86)",transformOrigin:"center"}:void 0},...Array.isArray(d)?d:d?[d]:[]],`orb-sw ${p??""}`),h=e("input",{ref:m,type:"checkbox",role:"switch",id:s,checked:o,defaultChecked:r,onChange:n?u=>n(u,u.target.checked):void 0,disabled:a,name:i});return t==null?e("span",{className:f.className,style:f.style,children:h}):c("label",{className:f.className,style:f.style,children:[h,e("span",{children:t})]})});Ua.displayName="CSwitch";_t();P();var Wf={default:"gray",primary:"blue",success:"blue",info:"blue",warning:"orange",error:"orange"},xt=eo.forwardRef(({label:t,children:o,tone:r,color:n="default",variant:a,size:i="medium",clickable:s,avatar:l,icon:d,onDelete:p,onClick:m,sx:f,className:h},u)=>{let v=r??(a==="outlined"&&n==="default"?"outline":Wf[n]??"gray"),y=s??!!m,g=Ue([{cursor:y?"pointer":void 0,...i==="small"?{height:24,fontSize:11,px:1}:void 0},...Array.isArray(f)?f:f?[f]:[]],`orb-chip orb-chip-${v} ${h??""}`);return c("span",{ref:u,className:g.className,style:g.style,onClick:m,role:y?"button":void 0,tabIndex:y?0:void 0,onKeyDown:y?x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),m?.(x));}:void 0,children:[l??d,e("span",{className:"orb-chip-label",children:o??t}),p&&e("button",{type:"button","aria-label":"Remove",onClick:x=>{x.stopPropagation(),p(x);},style:{background:"none",border:"none",padding:0,display:"inline-flex",cursor:"pointer",color:"inherit"},children:e(qt,{size:13,strokeWidth:2})})]})});xt.displayName="CChip";_t();P();var Ka=eo.forwardRef(({badgeContent:t,color:o="primary",children:r,invisible:n=false,sx:a,className:i},s)=>{let l=Ue(a,i,{display:"inline-flex",position:r?"relative":void 0}),d=!n&&t!==void 0&&t!==null&&e("span",{className:`orb-badge ${o==="error"?"orb-badge-err":o==="muted"?"orb-badge-muted":""}`,style:r?{position:"absolute",top:-6,right:-6,zIndex:1}:void 0,children:t});return r?c("span",{ref:s,className:l.className,style:l.style,children:[r,d]}):e("span",{ref:s,className:l.className,style:l.style,children:d})});Ka.displayName="CBadge";_t();P();var on=eo.forwardRef(({children:t,src:o,alt:r,size:n=28,sx:a,className:i},s)=>{let l=Ue([{width:n,height:n,fontSize:n*.4},...Array.isArray(a)?a:a?[a]:[]],`orb-avatar ${i??""}`);return e("span",{ref:s,className:l.className,style:l.style,children:o?e("img",{src:o,alt:r??"",style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"cover"}}):t})});on.displayName="CAvatar";_t();P();var rn=eo.forwardRef(({severity:t="info",title:o,children:r,onClose:n,sx:a,className:i},s)=>{let l=Ue(a,`orb-alert orb-alert-${t} ${i??""}`);return c("div",{ref:s,role:"alert",className:l.className,style:l.style,children:[c("div",{style:{flex:1,minWidth:0},children:[o&&e("b",{children:o}),r&&e("span",{children:r})]}),n&&e("button",{type:"button","aria-label":"Close",onClick:n,style:{background:"none",border:"none",padding:0,cursor:"pointer",color:"inherit",font:"500 14px/1 var(--orb-font)",opacity:.7},children:"\u2715"})]})});rn.displayName="CAlert";_t();P();var _n=({value:t,variant:o,color:r,sx:n,className:a})=>{let i=o==="indeterminate"||t===void 0,s=Ue(n,`orb-prog ${a??""}`);return c("div",{className:s.className,role:"progressbar","aria-valuenow":i?void 0:Math.round(t),"aria-valuemin":i?void 0:0,"aria-valuemax":i?void 0:100,style:s.style,children:[e("i",{style:i?{width:"40%",animation:"orb-prog-ind 1.2s ease-in-out infinite"}:{width:`${Math.min(100,Math.max(0,t))}%`,background:r}}),i&&e("style",{children:"@keyframes orb-prog-ind { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }"})]})},Uf=({width:t,height:o=14,variant:r="rectangular",sx:n,className:a})=>e("div",{className:`orb-skel ${a??""}`,style:{width:t,height:o,borderRadius:r==="circular"?"50%":r==="text"?6:"var(--orb-r)",...n}}),Zo=({size:t=12,onPrimary:o=false,sx:r,className:n})=>e("span",{className:`orb-spin ${o?"orb-spin-light":""} ${n??""}`,style:{width:t,height:t,...r},role:"status","aria-label":"Loading"});P();var ct=({title:t,children:o,enterDelay:r=300,side:n="top",align:a="center",disabled:i})=>!t||i?e(jsxRuntime.Fragment,{children:o}):e(jo__namespace.Provider,{delayDuration:r,skipDelayDuration:200,children:c(jo__namespace.Root,{children:[e(jo__namespace.Trigger,{asChild:true,children:o}),e(jo__namespace.Portal,{children:e(jo__namespace.Content,{className:"orb-tooltip",side:n,align:a,sideOffset:6,children:t})})]})});_t();P();var ie=eo.forwardRef(({tooltip:t,size:o="small",active:r=false,edge:n,color:a,sx:i,className:s,children:l,type:d="button",...p},m)=>{let f=Ue([{color:r?"var(--orb-primary)":a,...n==="start"?{marginLeft:-8}:n==="end"?{marginRight:-8}:void 0},...Array.isArray(i)?i:i?[i]:[]],`orb-icon-btn ${o==="small"?"orb-icon-btn-sm":""} ${s??""}`),h=e("button",{ref:m,type:d,className:f.className,style:f.style,...p,children:l});return t?e(ct,{title:t,children:h}):h});ie.displayName="CIconButton";_t();P();var Gn=({value:t,options:o,onValueChange:r,size:n="medium",sx:a,className:i,...s})=>{let l=eo.useRef([]),d=o.findIndex(u=>!u.disabled),p=o.findIndex(u=>u.value===t),m=(u,v)=>{let y=o.map((b,C)=>b.disabled?-1:C).filter(b=>b>=0);if(y.length===0)return;let g=y.indexOf(v),x;u.key==="Home"&&(x=y[0]),u.key==="End"&&(x=y[y.length-1]),(u.key==="ArrowRight"||u.key==="ArrowDown")&&(x=y[(g+1+y.length)%y.length]),(u.key==="ArrowLeft"||u.key==="ArrowUp")&&(x=y[(g-1+y.length)%y.length]),x!==void 0&&(u.preventDefault(),l.current[x]?.focus(),r(o[x].value));},f=Ue(a,["orb-segmented-control",n==="small"?"orb-segmented-control-sm":"",i].filter(Boolean).join(" ")),h={...f.style,"--orb-segmented-count":Math.max(o.length,1),"--orb-segmented-index":Math.max(p,0)};return c("div",{role:"radiogroup",className:f.className,style:h,"data-has-selection":p>=0?"true":"false",...s,children:[e("span",{className:"orb-segmented-control-thumb","aria-hidden":"true"}),o.map((u,v)=>{let y=u.value===t;return e(ie,{ref:g=>{l.current[v]=g;},className:["orb-segmented-control-item",u.icon?"":"orb-segmented-control-item-label"].filter(Boolean).join(" "),size:n,tooltip:u.label,role:"radio","aria-label":u.label,"aria-checked":y,"data-selected":y?"true":void 0,disabled:u.disabled,tabIndex:y||t==null&&v===d?0:-1,onClick:()=>r(u.value),onKeyDown:g=>m(g,v),children:u.icon??e("span",{className:"orb-segmented-control-label",children:u.label})},u.value)})]})};_t();P();var Qt=({triggerLabel:t,items:o=[],trigger:r,align:n="start",anchorEl:a,open:i,onClose:s,children:l,slotProps:d,PaperProps:p,anchorPosition:m,sx:f})=>{let h=eo.useRef(null);if(eo.useEffect(()=>{if(i!==true)return;let u=y=>{let g=y.composedPath();h.current&&g.includes(h.current)||a&&g.includes(a)||s?.();},v=y=>{y.key==="Escape"&&s?.();};return document.addEventListener("pointerdown",u,true),document.addEventListener("keydown",v,true),()=>{document.removeEventListener("pointerdown",u,true),document.removeEventListener("keydown",v,true);}},[a,s,i]),i!==void 0){if(!i||typeof document>"u")return null;let u=a?.getBoundingClientRect(),v=window.innerWidth,y=u?.left??16,g=u?.right??y,x=d?.paper?.sx??p?.sx,b=Ue([...Array.isArray(x)?x:x?[x]:[],...Array.isArray(f)?f:f?[f]:[]],"orb-pop orb-menu",d?.paper?.style??p?.style),C=eo.Children.map(l,k=>{if(!eo.isValidElement(k)||k.type!=="option")return k;let S=k.props,{children:T,disabled:I,selected:w}=S,M=Ue(S.sx,`orb-menu-item ${w?"orb-selected":""} ${S.className??""}`,S.style);return e("div",{role:"menuitem","aria-disabled":I||void 0,"aria-selected":w||void 0,tabIndex:I?-1:0,id:S.id,title:S.title,className:M.className,style:M.style,onClick:I?void 0:S.onClick,onKeyDown:A=>{!I&&(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),S.onClick?.(A));},children:T})});return reactDom.createPortal(e("div",{ref:h,role:"menu",className:b.className,style:{...b.style,position:"fixed",left:n==="end"&&!m?void 0:m?.left??y,right:n==="end"&&!m?Math.max(16,v-g):void 0,top:m?.top??(u?.bottom??16)+6,maxWidth:"calc(100vw - 32px)",zIndex:1301},children:C}),document.body)}return c(Eo__namespace.Root,{children:[e(Eo__namespace.Trigger,{asChild:true,children:r??e(ke,{variant:"primary",children:t})}),e(Eo__namespace.Portal,{children:e(Eo__namespace.Content,{className:"orb-pop orb-menu",align:n,sideOffset:6,children:o.map((u,v)=>c(Eo__namespace.Item,{className:"orb-menu-item",disabled:u.disabled,onSelect:()=>u.onClick?.(),children:[u.icon,u.label]},v))})})]})};_t();P();var Ae=eo.forwardRef(({elevation:t=1,variant:o,component:r,sx:n,style:a,className:i,children:s,...l},d)=>{let p=r??"div",m=Ue(n,`orb-card ${t>0&&o!=="outlined"?"orb-card-raised":""} ${i??""}`,a);return e(p,{ref:d,className:m.className,style:m.style,...l,children:s})});Ae.displayName="CPaper";_t();P();var Dt=eo.forwardRef(({orientation:t="horizontal",flexItem:o,sx:r,className:n},a)=>{let i=Ue([{...t==="vertical"?{alignSelf:"stretch",height:"auto"}:{width:"100%"},...o?{alignSelf:"stretch"}:void 0},...Array.isArray(r)?r:r?[r]:[]],`${t==="vertical"?"orb-divider-v":"orb-divider"} ${n??""}`);return e("hr",{ref:a,"aria-orientation":t,className:i.className,style:i.style})});Dt.displayName="CDivider";_t();P();var oh={h1:"orb-h1",h2:"orb-h2",h3:"orb-h3",h4:"orb-h3",h5:"orb-subtitle",h6:"orb-subtitle",subtitle1:"orb-subtitle",subtitle2:"orb-label",body1:"orb-body",body2:"orb-body-dense",label:"orb-label",caption:"orb-meta",overline:"orb-overline"},rh={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6"},L=eo.forwardRef(({variant:t="body1",component:o,muted:r=false,numeric:n=false,color:a,noWrap:i=false,fontWeight:s,sx:l,className:d,children:p,...m},f)=>{let h=o??rh[t]??"span",v=[t==="inherit"?void 0:oh[t],d].filter(Boolean).join(" "),y=Ue([{...r?{color:"var(--orb-muted)"}:void 0,...a?{color:a}:void 0,...n?{fontVariantNumeric:"tabular-nums"}:void 0,...s?{fontWeight:s}:void 0,...i?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:void 0},...Array.isArray(l)?l:l?[l]:[]],v);return e(h,{ref:f,className:y.className,style:y.style,...m,children:p})});L.displayName="CTypography";_t();P();var ah=t=>{if(t!==void 0)return typeof t=="number"?`${t*8}px`:t},se=eo.forwardRef(({direction:t="column",spacing:o,alignItems:r,justifyContent:n,flexWrap:a,flex:i,useFlexGap:s,sx:l,className:d,children:p,...m},f)=>{let h=Ue([{display:"flex",flexDirection:t,gap:ah(o),alignItems:r,justifyContent:n,flexWrap:a,flex:i},...Array.isArray(l)?l:l?[l]:[]],d);return e("div",{ref:f,className:h.className,style:h.style,...m,children:p})});se.displayName="CStack";_t();P();var Lt=({open:t,onClose:o,title:r,children:n,actions:a,maxWidth:i=560,fullWidth:s=false,fullScreen:l=false,PaperProps:d,slotProps:p,disableRestoreFocus:m,keepMounted:f,hideCloseButton:h=false,sx:u,className:v})=>{let y=Ue([{width:l?"100vw":s?"min(920px, calc(100vw - 32px))":void 0,height:l?"100vh":void 0,maxWidth:l?"none":typeof i=="number"?`${i}px`:i},...Array.isArray(d?.sx??p?.paper?.sx)?d?.sx??p?.paper?.sx:d?.sx??p?.paper?.sx?[d?.sx??p?.paper?.sx]:[],...Array.isArray(u)?u:u?[u]:[]],`orb-dialog ${v??""}`);return e(ko__namespace.Root,{open:t,onOpenChange:g=>{g||o?.();},children:c(ko__namespace.Portal,{children:[e(ko__namespace.Overlay,{className:"orb-overlay"}),c(ko__namespace.Content,{className:y.className,style:y.style,children:[(r||!h)&&c("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:16},children:[r?e(ko__namespace.Title,{className:"orb-dialog-title",children:r}):e(ko__namespace.Title,{className:"orb-visually-hidden",children:"Dialog"}),!h&&e(ko__namespace.Close,{asChild:true,children:e("button",{type:"button",className:"orb-icon-btn orb-icon-btn-sm","aria-label":"Close",style:{marginTop:-4,marginRight:-4},children:e(qt,{size:16,strokeWidth:2})})})]}),e("div",{style:{minWidth:0},children:n}),a&&e("div",{className:"orb-dialog-actions",children:a})]})]})})};P();var Xs=({open:t,defaultOpen:o,onOpenChange:r,trigger:n,children:a,align:i="start",side:s="bottom",sideOffset:l=6,matchTriggerWidth:d=false,sx:p,className:m})=>c(yr__namespace.Root,{open:t,defaultOpen:o,onOpenChange:r,children:[e(yr__namespace.Trigger,{asChild:true,children:n}),e(yr__namespace.Portal,{children:e(yr__namespace.Content,{className:`orb-pop ${m??""}`,align:i,side:s,sideOffset:l,style:{minWidth:d?"var(--radix-popover-trigger-width)":void 0,...p},onOpenAutoFocus:f=>f.preventDefault(),children:a})})]});P();var lh=({items:t,value:o,defaultValue:r,onChange:n,sx:a,className:i})=>{let s=o!==void 0,[l,d]=eo.useState(r??t[0]?.value),p=s?o:l,m=eo.useRef([]),f=u=>{s||d(u),n?.(u);},h=u=>{if(u.key!=="ArrowRight"&&u.key!=="ArrowLeft")return;u.preventDefault();let v=t.filter(b=>!b.disabled),y=v.findIndex(b=>b.value===p),g=u.key==="ArrowRight"?1:-1,x=v[(y+g+v.length)%v.length];if(x){f(x.value);let b=t.findIndex(C=>C.value===x.value);m.current[b]?.focus();}};return e("div",{className:`orb-tabs ${i??""}`,role:"tablist",style:a,onKeyDown:h,children:t.map((u,v)=>{let y=u.value===p;return c("button",{ref:g=>{m.current[v]=g;},type:"button",role:"tab","aria-selected":y,disabled:u.disabled,className:`orb-tab ${y?"orb-is-active":""}`,style:{display:"inline-flex",alignItems:"center",gap:6},onClick:()=>f(u.value),children:[u.icon,u.label]},u.value)})})};P();var dh=["su","mo","tu","we","th","fr","sa"],Un=(t,o)=>!!(t&&o&&t.isSame(o,"day")),Kn=({value:t,rangeStart:o,rangeEnd:r,onChange:n,month:a,defaultMonth:i,onMonthChange:s,minDate:l,maxDate:d,locale:p,renderDay:m})=>{let f=a!==void 0,[h,u]=eo.useState(()=>i??t??o??ar__default.default()),v=(f?a:h).startOf("month"),y=S=>{f||u(S),s?.(S);},g=eo.useMemo(()=>p?v.locale(p):v,[v,p]),x=eo.useMemo(()=>{let T=v.startOf("month").startOf("week"),I=[],w=T;for(let M=0;M<6;M+=1){let A=[];for(let R=0;R<7;R+=1)A.push(w),w=w.add(1,"day");if(I.push(A),w.isAfter(v.endOf("month"))&&M>=3)break}return I},[v]),b=eo.useMemo(()=>{let S=p?ar__default.default().locale(p):ar__default.default();return dh.map((T,I)=>S.startOf("week").add(I,"day").format("dd"))},[p]),C=S=>!!(l&&S.isBefore(l.startOf("day"))||d&&S.isAfter(d.startOf("day"))),k=o!==void 0||r!==void 0;return c("div",{className:"orb-cal",children:[c("div",{className:"orb-cal-head",children:[e("button",{type:"button",className:"orb-icon-btn orb-icon-btn-sm","aria-label":"Previous month",onClick:()=>y(v.subtract(1,"month")),children:e(Aa,{size:16,strokeWidth:2})}),e("span",{className:"orb-cal-title","aria-live":"polite",children:g.format("MMMM YYYY")}),e("button",{type:"button",className:"orb-icon-btn orb-icon-btn-sm","aria-label":"Next month",onClick:()=>y(v.add(1,"month")),children:e(zo,{size:16,strokeWidth:2})})]}),c("div",{className:"orb-cal-grid",role:"grid",children:[b.map((S,T)=>e("span",{className:"orb-cal-dow",children:S},`${S}-${T}`)),x.flat().map(S=>{let T=!S.isSame(v,"month"),I=C(S),w=k?Un(S,o)||Un(S,r):Un(S,t),M=S.isSame(ar__default.default(),"day"),A=k&&o&&r&&S.isAfter(o.startOf("day"))&&S.isBefore(r.startOf("day")),R=k&&Un(S,o)&&!!r,D=k&&Un(S,r)&&!!o,E=["orb-cal-day",T?"orb-is-outside":void 0,M?"orb-is-today":void 0,w?"orb-is-selected":void 0,A?"orb-is-in-range":void 0,R?"orb-is-range-start":void 0,D?"orb-is-range-end":void 0].filter(Boolean).join(" ");return m?e("span",{className:"orb-cal-day-slot",children:m(S,{outsideCurrentMonth:T,selected:w,today:M,disabled:I})},S.format("YYYY-MM-DD")):e("button",{type:"button",role:"gridcell","aria-selected":w,"aria-current":M?"date":void 0,className:E,disabled:I,onClick:()=>n?.(S),children:S.date()},S.format("YYYY-MM-DD"))})]})]})};P();ar__default.default.extend(ph__default.default);var uh=({label:t,value:o,defaultValue:r,onChange:n,minDate:a,maxDate:i,disabled:s,format:l="YYYY-MM-DD",placeholder:d,locale:p,dense:m=false,error:f,helperText:h,sx:u,className:v})=>{let y=o!==void 0,[g,x]=eo.useState(r??null),b=y?o:g,[C,k]=eo.useState(false),[S,T]=eo.useState(null),I=D=>{y||x(D),n?.(D);},w=S??(b?(p?b.locale(p):b).format(l):""),M=()=>{if(S===null)return;let D=S.trim();if(!D)I(null);else {let E=ar__default.default(D,l,true);E.isValid()&&!(a&&E.isBefore(a.startOf("day")))&&!(i&&E.isAfter(i.startOf("day")))&&I(E);}T(null);},R=(typeof f=="string"?f:void 0)??h;return c("div",{className:`orb-fld ${f?"orb-is-error":""} ${v??""}`,style:u,children:[t&&e("label",{children:t}),e(Xs,{open:C,onOpenChange:k,trigger:c("div",{className:"orb-inp-adornment-wrap",style:{width:"100%"},children:[e("span",{className:"orb-inp-adornment",children:e(Gs,{size:15,strokeWidth:1.8})}),e("input",{className:`orb-inp ${m?"orb-inp-dense":""}`,value:w,placeholder:d??l,disabled:s,onFocus:()=>k(true),onChange:D=>T(D.target.value),onBlur:M,onKeyDown:D=>{D.key==="Enter"&&(M(),k(false)),D.key==="Escape"&&k(false);}})]}),children:e(Kn,{value:b,onChange:D=>{I(D),T(null),k(false);},minDate:a,maxDate:i,locale:p,defaultMonth:b??void 0})}),R&&e("span",{className:"orb-fld-msg",children:R})]})};P();var gh=({onFilesSelected:t,multiple:o=false,accept:r="*",maxSize:n,title:a="Drag and drop files here or click to upload",subtitle:i="Support for bulk upload",sx:s})=>{let[l,d]=eo.useState(false),[p,m]=eo.useState([]),f=eo.useRef(null),h=b=>{b.preventDefault(),d(true);},u=b=>{b.preventDefault(),d(false);},v=b=>{b.preventDefault(),d(false),g(Array.from(b.dataTransfer.files));},y=b=>{b.target.files&&g(Array.from(b.target.files));},g=b=>{let C=n?b.filter(S=>S.size<=n):b;C.length<b.length&&console.warn(`Some files were rejected because they exceed the maximum size of ${n} bytes.`);let k=o?[...p,...C]:C;o&&(k=k.filter((S,T,I)=>T===I.findIndex(w=>w.name===S.name&&w.size===S.size&&w.lastModified===S.lastModified))),m(k),t?.(k),f.current&&(f.current.value="");},x=b=>{let C=p.filter((k,S)=>S!==b);m(C),t?.(C);};return c("div",{style:{width:"100%",...s},children:[c("div",{onClick:()=>f.current?.click(),onDragOver:h,onDragLeave:u,onDrop:v,role:"button",tabIndex:0,onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),f.current?.click());},style:{border:`2px dashed ${l?"var(--orb-primary)":"var(--orb-border)"}`,borderRadius:"var(--orb-r)",padding:32,textAlign:"center",cursor:"pointer",backgroundColor:l?"var(--orb-hover)":"var(--orb-canvas)",transition:"border-color var(--orb-t-fast), background-color var(--orb-t-fast)"},children:[e("input",{type:"file",ref:f,style:{display:"none"},multiple:o,accept:r,onChange:y}),c("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"center"},children:[e(ld,{size:40,strokeWidth:1.5,color:l?"var(--orb-primary)":"var(--orb-muted)"}),e("span",{className:"orb-subtitle",children:a}),e("span",{className:"orb-meta",children:i})]})]}),p.length>0&&e("div",{style:{display:"flex",flexDirection:"column",gap:8,marginTop:16},children:p.map((b,C)=>c("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",border:"1px solid var(--orb-border)",borderRadius:"var(--orb-r)",backgroundColor:"var(--orb-surface)"},children:[c("div",{style:{display:"flex",alignItems:"center",gap:8,overflow:"hidden"},children:[e(_c,{size:16,strokeWidth:1.8,color:"var(--orb-muted)"}),e("span",{className:"orb-body-dense",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:b.name}),c("span",{className:"orb-meta",children:["(",(b.size/1024).toFixed(1)," KB)"]})]}),e(ie,{"aria-label":`Remove ${b.name}`,onClick:()=>x(C),children:e(id,{size:15,strokeWidth:1.8})})]},`${b.name}-${C}`))})]})};function vo(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var Xa={primary:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground"},qn={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",full:"rounded-full"},md=()=>"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50";P();var yh=classVarianceAuthority.cva(md(),{variants:{variant:{default:`${Xa.primary} shadow-sm`,destructive:"bg-[var(--orb-status-error)] text-[var(--orb-on-primary)] hover:opacity-90 active:opacity-80 shadow-sm",outline:`${Xa.outline} shadow-sm`,secondary:"bg-[var(--orb-surface-2)] text-[var(--orb-fg)] hover:bg-[var(--orb-hover)] active:bg-[var(--orb-selected)] shadow-sm",ghost:Xa.ghost,link:"text-[var(--orb-status-primary)] underline-offset-4 hover:underline hover:text-[var(--orb-status-primary)] active:text-[var(--orb-p700)]","chat-tool":"bg-[var(--orbai-surface-2)] border border-[var(--orbai-border-soft)] text-[var(--orbai-text-2)] hover:bg-[var(--orbai-surface-3)] hover:border-[var(--orbai-border-strong)] hover:text-[var(--orbai-text-1)] active:scale-95 transition-all duration-200","chat-send":"bg-[var(--orb-primary)] hover:bg-[var(--orb-p600)] text-[var(--orb-on-primary)] border border-[var(--orbai-border-strong)] shadow-[var(--orbai-shadow-soft-sm)] hover:shadow-[var(--orbai-shadow-soft-md)] active:scale-95 transition-all duration-200","chat-stop":"bg-[var(--orb-status-error)] hover:opacity-90 border border-[var(--orbai-border-strong)] shadow-[var(--orbai-shadow-soft-sm)] hover:shadow-[var(--orbai-shadow-soft-md)] active:scale-95 text-[var(--orb-on-primary)] transition-all duration-200","chat-disabled":"cursor-not-allowed opacity-50 bg-[var(--orbai-surface-2)] border border-[var(--orbai-border-soft)] text-[var(--orbai-muted)]"},size:{default:"h-10 px-4 py-2",sm:"h-9 px-3",lg:"h-11 px-8",icon:"h-10 w-10","chat-sm":"h-8 w-8 rounded-full","chat-md":"h-10 w-10 rounded-full","chat-lg":"h-12 w-12 rounded-full"},rounded:{none:qn.none,sm:qn.sm,md:qn.md,full:qn.full}},defaultVariants:{variant:"default",size:"default",rounded:"md"}}),js=eo__namespace.forwardRef(({className:t,variant:o,size:r,asChild:n=false,...a},i)=>e(n?reactSlot.Slot:"button",{className:vo(yh({variant:o,size:r,className:t})),ref:i,...a}));js.displayName="Button";var Ch={"common.cancel":"Cancel","common.save":"Save","common.ok":"OK","common.done":"Done","common.search":"Search","common.none":"None","common.all":"All","common.noData":"No data","common.copy":"Copy","common.delete":"Delete","common.loading":"Loading...","header.searchPlaceholder":"Ask me...","header.searchAddFeature":"Add feature","header.searchStartVoice":"Start voice input","header.searchStopVoice":"Stop voice input","header.searchOpenPanel":"Open conversation","header.theme.system":"Theme: System","header.theme.dark":"Theme: Dark","header.theme.light":"Theme: Light","header.menu.setting":"Setting","header.menu.refresh":"Refresh","header.menu.logout":"Logout","navigation.expand":"Expand navigation","navigation.collapse":"Collapse navigation","navigation.searchPlaceholder":"Search menu...","navigation.noMatch":"No matching menu items","navigation.noAccessibleApp":"No accessible applications","navigation.noItems":"No items to display","navigation.expandView":"Expand {title}","navigation.mode.switchToFixed":"Switch to fixed navigation","navigation.mode.switchToFloating":"Switch to floating navigation","navigation.pinned":"Pinned","navigation.pin.add":"Pin to top","navigation.pin.remove":"Unpin","table.toolbar.searchPlaceholder":"Search...","table.title.default":"Data Table","table.toolbar.groupBy":"Group By","table.toolbar.summary":"Summary","table.toolbar.columns":"Columns","table.toolbar.export":"Export","table.toolbar.itemsPerPage":"Items per page:","table.toolbar.pageOf":"Page {current} of {total}","table.toolbar.newItem":"New Item","table.toolbar.editItem":"Edit Item","table.toolbar.deleteItem":"Delete Item","table.toolbar.graphicReport":"Graphic Report","table.toolbar.saveLayout":"Save Layout","table.menu.groupBy":"Group By","table.menu.clearAll":"Clear All","table.menu.visibleColumns":"Visible Columns","table.menu.showSummaryRow":"Show Summary Row","table.menu.noNumericColumns":"No numeric columns","table.group.expandAll":"Expand All Groups","table.group.collapseAll":"Collapse All Groups","table.mobile.notImplemented":"Mobile View Not Implemented","table.headerMenu.sortAsc":"Sort Ascending","table.headerMenu.sortDesc":"Sort Descending","table.headerMenu.clearSort":"Clear Sort","table.headerMenu.configureSort":"Configure Sort...","table.headerMenu.group":"Group by this column","table.headerMenu.ungroup":"Remove from grouping","table.headerMenu.addSummary":"Include in Summary","table.headerMenu.removeSummary":"Remove from Summary","table.headerMenu.hideColumn":"Hide Column","table.sortDialog.title":"Sort Settings","table.sortDialog.empty":"No sort rules. Add one to start ordering rows.","table.sortDialog.addRule":"Add Sort Rule","table.sortDialog.clearAll":"Clear All","table.sortDialog.asc":"Ascending","table.sortDialog.desc":"Descending","pivot.title.default":"Pivot Table Builder","pivot.subtitle.default":"Drag fields to configure the pivot table.","pivot.empty":"Drag at least one field into Values to render the pivot result.","pivot.records":"Records","pivot.afterFilter":"After filter","pivot.grandTotal":"Grand Total","pivot.resultLabel":"Result","pivot.valueLabel":"Value","pivot.table.dimensions":"Dimensions","pivot.config.title":"Configuration","pivot.fieldList":"Field List","pivot.availableDimensions":"Available dimensions","pivot.allFieldsInUse":"All fields are in use.","pivot.zone.rows":"Rows","pivot.zone.columns":"Columns","pivot.zone.filters":"Filters","pivot.zone.values":"Values","pivot.hint.rows":"Drag fields here to build row hierarchy","pivot.hint.columns":"Drag fields here to build column hierarchy","pivot.hint.filters":"Drag fields here for report filters","pivot.hint.values":"Drag numeric fields here for aggregation","pivot.clearArea":"Clear area","pivot.filter.na":"N/A","pivot.filter.noValues":"No values","pivot.filter.noneSelected":"None selected","pivot.filter.allValues":"All values","pivot.filter.selectedCount":"{selected} / {total} selected","pivot.filter.selectAll":"Select All","pivot.filter.deselectAll":"Deselect All","pivot.filter.noResults":"No results","pivot.collapse.ariaExpand":"Expand configuration area","pivot.collapse.ariaCollapse":"Collapse configuration area","pivot.agg.sum":"Sum","pivot.agg.count":"Count","pivot.agg.avg":"Average","pivot.agg.min":"Min","pivot.agg.max":"Max","pivot.preset.selectPlaceholder":"Select preset","pivot.preset.save":"Save preset","pivot.preset.delete":"Delete preset","pivot.preset.saveDialogTitle":"Save current preset","pivot.preset.nameLabel":"Preset name","pivot.preset.defaultName":"Preset {index}","pivot.table.sectionTitle":"Pivot Result","pivot.table.expandRowsAll":"Expand rows","pivot.table.collapseRowsAll":"Collapse rows","pivot.table.expandColumnsAll":"Expand columns","pivot.table.collapseColumnsAll":"Collapse columns","pivot.table.collapse.ariaExpand":"Expand pivot result","pivot.table.collapse.ariaCollapse":"Collapse pivot result","pivot.chart.title":"Pivot Chart","pivot.chart.subtitle":"Map one dimension and up to two measures into a compact chart.","pivot.chart.subtitleReady":"{dimension} by {measure}","pivot.chart.emptyNoDimension":"Add at least one row or column field to render the chart.","pivot.chart.emptyNoValue":"Add at least one value field to render the chart.","pivot.chart.emptyNoData":"No data available for the current chart selection.","pivot.chart.dimension":"Dimension","pivot.chart.primaryMeasure":"Measure","pivot.chart.secondaryMeasure":"Compare measure","pivot.chart.chartType":"Chart type","pivot.chart.style.barVertical":"Vertical bars","pivot.chart.style.barHorizontal":"Horizontal bars","pivot.chart.style.line":"Line","pivot.chart.style.scatter":"Scatter","pivot.chart.collapse.ariaExpand":"Expand chart area","pivot.chart.collapse.ariaCollapse":"Collapse chart area","smartFilter.adaptFilters":"Adapt Filters","smartFilter.addFilters":"Add Filters","smartFilter.go":"Go","smartFilter.visibleFilters":"Visible Filters","smartFilter.searchPlaceholder":"Search...","smartFilter.noOptionsFound":"No options found","smartFilter.min":"Min","smartFilter.max":"Max","smartFilter.minMaxPlaceholder":"Min - Max","smartFilter.operator.equals":"Equals","smartFilter.operator.contains":"Contains","smartFilter.operator.notContains":"Does Not Contain","smartFilter.operator.wildcard":"Wildcard Search","smartFilter.operator.notEquals":"Not Equals","smartFilter.operator.greaterThan":"Greater Than","smartFilter.operator.lessThan":"Less Than","smartFilter.operator.greaterOrEqual":"Greater Than or Equal","smartFilter.operator.lessOrEqual":"Less Than or Equal","smartFilter.operator.between":"Between","variant.noOptions":"No options","variant.defaultSuffix":"Default","variant.selectVariant":"Select Variant","variant.saveView":"Save View","variant.newVariant":"New Variant","variant.viewName":"View Name","variant.setDefault":"Set as Default","variant.publicAllUsers":"Public (All Users)","variant.toast.fetchFailed":"Failed to load variants","variant.toast.saveFailed":"Failed to save variant","variant.toast.saveSuccess":"Variant saved successfully","variant.toast.deleteFailed":"Failed to delete variant","variant.toast.deleteSuccess":"Variant deleted successfully","variant.toast.defaultFailed":"Failed to update default variant","variant.toast.defaultSuccess":"Default variant updated","layout.saveLayout":"Save Layout","layout.layoutOptions":"Layout Options","layout.selectLayout":"Select Layout","layout.saveCurrentLayout":"Save Current Layout...","layout.noSavedLayouts":"No saved layouts","layout.removeDefault":"Remove Default","layout.setAsDefault":"Set as Default","layout.layoutName":"Layout Name","layout.layoutDescription":"Description","layout.layoutNameHelper":"e.g., 'Compact View'","layout.warningOverwrite":"Warning: Existing layout will be overwritten","layout.useAsDefault":"Use as Default Layout","layout.publicAllUsers":"Public (Visible to all users)","layout.toast.loadFallback":"Failed to load layouts from backend, fallback to local storage","layout.toast.saveSuccess":"Layout saved successfully","layout.toast.saveLocalSuccess":"Layout saved to local storage","layout.toast.backendUnavailableSavedLocal":"Backend unavailable, saved to local storage","layout.toast.deleteSuccess":"Layout deleted successfully","layout.toast.deleteLocalSuccess":"Layout deleted from local storage","layout.toast.backendUnavailableDeletedLocal":"Backend unavailable, deleted from local storage","layout.toast.defaultSuccess":"Default layout set","layout.toast.defaultLocalSuccess":"Default layout set in local storage","layout.toast.backendUnavailableDefaultLocal":"Backend unavailable, default saved to local storage","dateRange.label":"Date Range","dateRange.startDate":"Start Date","dateRange.endDate":"End Date","dateRange.select":"Select...","dateRange.today":"Today","dateRange.thisWeek":"This Week","dateRange.thisMonth":"This Month","graph.records":"{count} records","graph.kpi.totalRecords":"Total Records","graph.kpi.totalReport":"Total Report","graph.kpi.totalBillable":"Total Billable","graph.kpi.efficiency":"Efficiency","graph.kpi.amount":"Amount","graph.kpi.flagged":"Flagged","graph.chart.billable.title":"Billable by Dimension","graph.chart.billable.subtitle":"Top values by billable hours","graph.chart.efficiency.title":"Efficiency by Person","graph.chart.efficiency.subtitle":"Lowest efficiency first","graph.chart.status.title":"Status Distribution","graph.chart.status.subtitle":"Record ratio by status","graph.dataBody":"Data Body","graph.reportTitle":"Graphic Report","graph.unassigned":"Unassigned","graph.column.reportHours":"Report Hours","graph.column.billableHours":"Billable Hours","detail.searchAi.placeholder":"Search fields, or ask AI if no match...","detail.searchAi.matches":"{count} matches found","detail.searchAi.noMatch":"No matching field found.","detail.searchAi.autoAiFallback":"No direct match. Triggering AI analysis...","detail.searchAi.aiResultTitle":"AI Insight","detail.table.title":"Related Records","kanban.empty":"Drop cards here","kanban.bucket.limit":"Limit","kanban.bucket.dropHere":"Release to move into this bucket","kanban.bucket.add":"Add bucket","kanban.bucket.rename":"Rename bucket","kanban.bucket.saveRename":"Save bucket name","kanban.bucket.cancelRename":"Cancel renaming","kanban.search.placeholder":"Search cards and buckets","kanban.search.clear":"Clear search","kanban.search.results":"{count} matching cards","kanban.search.noMatch":"No matching cards","kanban.card.progress":"Progress","kanban.card.openDetail":"Open Detail","kanban.priority.critical":"Critical","kanban.priority.high":"High","kanban.priority.medium":"Medium","kanban.priority.low":"Low","quickCreate.newItem":"New Item","quickCreate.createWithTitle":"Create {title}","quickEdit.editWithTitle":"Edit {title}","quickDelete.confirmTitle":"Confirm Delete","quickDelete.confirmMessageSingle":"Are you sure you want to delete the selected record?","quickDelete.confirmMessageMultiple":"Are you sure you want to delete {count} selected records?","cardPage.viewDetails":"View Details","cardPage.download":"Download","cardPage.close":"Close","cardPage.empty":"No items found","messageBox.confirm":"OK","messageBox.cancel":"Cancel","omph.status.idle":"Idle","omph.status.pending":"Pending","omph.status.running":"Working","omph.status.success":"Success","omph.status.error":"Error","omph.working":"Working","omph.workingFor":"Working for {duration}","omph.loadOlder":"Load earlier","omph.loadingOlder":"Loading earlier\u2026","omph.toBottom":"Back to bottom","omph.copy":"Copy","omph.copied":"Copied","omph.turnActions":"Reply actions","omph.usage":"Usage","omph.inputTokens":"Input","omph.outputTokens":"Output","omph.duration":"Duration","omph.send":"Send","omph.stop":"Stop","omph.turnRail":"Turns","omph.secondUnit":"s","omph.minuteUnit":"m","omph.preview.title":"File preview","omph.preview.close":"Close preview","omph.preview.back":"Back to conversation","omph.preview.expand":"Expand preview","omph.preview.collapse":"Restore preview size","omph.preview.copyContent":"Copy content","omph.preview.copyPath":"Copy path","omph.preview.download":"Download","omph.preview.openExternal":"Open externally","omph.preview.wrap":"Wrap","omph.preview.loading":"Loading file","omph.preview.missing":"File not found","omph.preview.failed":"Could not load this file","omph.preview.unsupported":"No preview for this file type","omph.preview.retry":"Try again","omph.preview.resize":"Resize preview","omph.preview.line":"Line {start}","omph.preview.lines":"Lines {start}\u2013{end}","omph.preview.truncated":"Showing the first {shown} of {total} lines","omph.preview.imageFailed":"The image could not be displayed","omph.preview.zoomIn":"Zoom in","omph.preview.zoomOut":"Zoom out","omph.preview.zoomFit":"Fit to width","omph.newConversation":"New conversation","omph.conversationList":"Conversation list","omph.conversations":"Conversations","omph.noConversations":"No conversations yet","omph.approval.waiting":"Waiting for approval","omph.approval.choose":"Choose an action","omph.approval.details":"Approval details","omph.approval.choices":"Actions","omph.approval.reject":"Reject","omph.approval.allowOnce":"Allow once","omph.approval.confirm":"Continue","omph.approval.other":"Other","omph.approval.otherPlaceholder":"Describe the action to take","omph.approval.escalation":"Tool {toolName} requests privileged execution","omph.input.placeholder":"Type a message...","omph.input.upload":"Upload file","omph.input.send":"Send message","omph.input.stop":"Stop generating","omph.input.message":"Message input","omph.input.tools":"Input tools","agentui.html.defaultTitle":"Interactive HTML","agentui.html.open":"Open","agentui.html.preview":"Preview","agentui.html.code":"Code","agentui.html.toggle":"Switch between code and preview","agentui.html.copy":"Copy code","agentui.html.copied":"Copied","agentui.html.download":"Download","agentui.html.close":"Close"},xh={"common.cancel":"\u53D6\u6D88","common.save":"\u4FDD\u5B58","common.ok":"\u786E\u5B9A","common.done":"\u5B8C\u6210","common.search":"\u641C\u7D22","common.none":"\u65E0","common.all":"\u5168\u90E8","common.noData":"\u6682\u65E0\u6570\u636E","common.copy":"\u590D\u5236","common.delete":"\u5220\u9664","common.loading":"\u52A0\u8F7D\u4E2D...","header.searchPlaceholder":"\u95EE\u6211\u70B9\u4EC0\u4E48...","header.searchAddFeature":"\u589E\u52A0\u529F\u80FD","header.searchStartVoice":"\u5F00\u59CB\u8BED\u97F3\u8F93\u5165","header.searchStopVoice":"\u505C\u6B62\u8BED\u97F3\u8F93\u5165","header.searchOpenPanel":"\u6253\u5F00\u5BF9\u8BDD","header.theme.system":"\u4E3B\u9898\uFF1A\u8DDF\u968F\u7CFB\u7EDF","header.theme.dark":"\u4E3B\u9898\uFF1A\u6DF1\u8272","header.theme.light":"\u4E3B\u9898\uFF1A\u6D45\u8272","header.menu.setting":"\u8BBE\u7F6E","header.menu.refresh":"\u5237\u65B0","header.menu.logout":"\u6CE8\u9500","navigation.expand":"\u5C55\u5F00\u5BFC\u822A","navigation.collapse":"\u6298\u53E0\u5BFC\u822A","navigation.searchPlaceholder":"\u641C\u7D22\u83DC\u5355...","navigation.noMatch":"\u672A\u627E\u5230\u5339\u914D\u7684\u83DC\u5355\u9879","navigation.noAccessibleApp":"\u6682\u65E0\u53EF\u8BBF\u95EE\u7684\u5E94\u7528","navigation.noItems":"\u6682\u65E0\u53EF\u663E\u793A\u9879","navigation.expandView":"\u5C55\u5F00\u67E5\u770B {title}","navigation.mode.switchToFixed":"\u5207\u6362\u4E3A\u56FA\u5B9A\u5BFC\u822A","navigation.mode.switchToFloating":"\u5207\u6362\u4E3A\u60AC\u6D6E\u5BFC\u822A","navigation.pinned":"\u5DF2\u56FA\u5B9A","navigation.pin.add":"\u56FA\u5B9A\u5230\u9876\u90E8","navigation.pin.remove":"\u53D6\u6D88\u56FA\u5B9A","table.toolbar.searchPlaceholder":"\u641C\u7D22...","table.title.default":"\u6570\u636E\u8868","table.toolbar.groupBy":"\u5206\u7EC4","table.toolbar.summary":"\u6C47\u603B","table.toolbar.columns":"\u5217","table.toolbar.export":"\u5BFC\u51FA","table.toolbar.itemsPerPage":"\u6BCF\u9875\u6761\u6570\uFF1A","table.toolbar.pageOf":"\u7B2C {current} / {total} \u9875","table.toolbar.newItem":"\u65B0\u5EFA\u6761\u76EE","table.toolbar.editItem":"\u7F16\u8F91\u6761\u76EE","table.toolbar.deleteItem":"\u5220\u9664\u6761\u76EE","table.toolbar.graphicReport":"\u56FE\u8868\u62A5\u8868","table.toolbar.saveLayout":"\u4FDD\u5B58\u5E03\u5C40","table.menu.groupBy":"\u5206\u7EC4","table.menu.clearAll":"\u6E05\u7A7A","table.menu.visibleColumns":"\u53EF\u89C1\u5217","table.menu.showSummaryRow":"\u663E\u793A\u6C47\u603B\u884C","table.menu.noNumericColumns":"\u6CA1\u6709\u6570\u503C\u5217","table.group.expandAll":"\u5C55\u5F00\u5168\u90E8\u5206\u7EC4","table.group.collapseAll":"\u6298\u53E0\u5168\u90E8\u5206\u7EC4","table.mobile.notImplemented":"\u79FB\u52A8\u7AEF\u89C6\u56FE\u6682\u672A\u5B9E\u73B0","table.headerMenu.sortAsc":"\u5347\u5E8F\u6392\u5217","table.headerMenu.sortDesc":"\u964D\u5E8F\u6392\u5217","table.headerMenu.clearSort":"\u6E05\u9664\u6392\u5E8F","table.headerMenu.configureSort":"\u6392\u5E8F\u8BBE\u7F6E...","table.headerMenu.group":"\u6309\u6B64\u5217\u5206\u7EC4","table.headerMenu.ungroup":"\u53D6\u6D88\u5206\u7EC4","table.headerMenu.addSummary":"\u52A0\u5165\u6C47\u603B","table.headerMenu.removeSummary":"\u4ECE\u6C47\u603B\u4E2D\u79FB\u9664","table.headerMenu.hideColumn":"\u9690\u85CF\u8BE5\u5217","table.sortDialog.title":"\u6392\u5E8F\u8BBE\u7F6E","table.sortDialog.empty":"\u6682\u65E0\u6392\u5E8F\u89C4\u5219\uFF0C\u8BF7\u6DFB\u52A0\u89C4\u5219\u8FDB\u884C\u6392\u5E8F\u3002","table.sortDialog.addRule":"\u6DFB\u52A0\u6392\u5E8F\u89C4\u5219","table.sortDialog.clearAll":"\u6E05\u7A7A\u89C4\u5219","table.sortDialog.asc":"\u5347\u5E8F","table.sortDialog.desc":"\u964D\u5E8F","pivot.title.default":"\u6570\u636E\u900F\u89C6\u8868","pivot.subtitle.default":"\u62D6\u62FD\u5B57\u6BB5\u4EE5\u914D\u7F6E\u900F\u89C6\u8868\u3002","pivot.empty":"\u8BF7\u81F3\u5C11\u62D6\u5165\u4E00\u4E2A\u503C\u5B57\u6BB5\u540E\u518D\u67E5\u770B\u900F\u89C6\u7ED3\u679C\u3002","pivot.records":"\u8BB0\u5F55\u6570","pivot.afterFilter":"\u7B5B\u9009\u540E","pivot.grandTotal":"\u603B\u8BA1","pivot.resultLabel":"\u7ED3\u679C","pivot.valueLabel":"\u503C","pivot.table.dimensions":"\u7EF4\u5EA6","pivot.config.title":"\u5E03\u5C40\u914D\u7F6E","pivot.fieldList":"\u5B57\u6BB5\u5217\u8868","pivot.availableDimensions":"\u53EF\u7528\u7EF4\u5EA6","pivot.allFieldsInUse":"\u6240\u6709\u5B57\u6BB5\u90FD\u5DF2\u4F7F\u7528\u3002","pivot.zone.rows":"\u884C","pivot.zone.columns":"\u5217","pivot.zone.filters":"\u7B5B\u9009","pivot.zone.values":"\u503C","pivot.hint.rows":"\u5C06\u5B57\u6BB5\u62D6\u5230\u8FD9\u91CC\u6784\u5EFA\u884C\u5C42\u7EA7","pivot.hint.columns":"\u5C06\u5B57\u6BB5\u62D6\u5230\u8FD9\u91CC\u6784\u5EFA\u5217\u5C42\u7EA7","pivot.hint.filters":"\u5C06\u5B57\u6BB5\u62D6\u5230\u8FD9\u91CC\u4F5C\u4E3A\u62A5\u8868\u7B5B\u9009","pivot.hint.values":"\u5C06\u6570\u503C\u5B57\u6BB5\u62D6\u5230\u8FD9\u91CC\u8FDB\u884C\u805A\u5408","pivot.clearArea":"\u6E05\u7A7A\u533A\u57DF","pivot.filter.na":"\u4E0D\u53EF\u7528","pivot.filter.noValues":"\u65E0\u53EF\u9009\u503C","pivot.filter.noneSelected":"\u672A\u9009\u62E9","pivot.filter.allValues":"\u5168\u90E8\u503C","pivot.filter.selectedCount":"\u5DF2\u9009 {selected} / {total}","pivot.filter.selectAll":"\u5168\u9009","pivot.filter.deselectAll":"\u53D6\u6D88\u5168\u9009","pivot.filter.noResults":"\u65E0\u5339\u914D\u7ED3\u679C","pivot.collapse.ariaExpand":"\u5C55\u5F00\u914D\u7F6E\u533A\u57DF","pivot.collapse.ariaCollapse":"\u6298\u53E0\u914D\u7F6E\u533A\u57DF","pivot.agg.sum":"\u6C42\u548C","pivot.agg.count":"\u8BA1\u6570","pivot.agg.avg":"\u5E73\u5747\u503C","pivot.agg.min":"\u6700\u5C0F\u503C","pivot.agg.max":"\u6700\u5927\u503C","pivot.preset.selectPlaceholder":"\u9009\u62E9\u65B9\u6848","pivot.preset.save":"\u4FDD\u5B58\u65B9\u6848","pivot.preset.delete":"\u5220\u9664\u65B9\u6848","pivot.preset.saveDialogTitle":"\u4FDD\u5B58\u5F53\u524D\u65B9\u6848","pivot.preset.nameLabel":"\u65B9\u6848\u540D\u79F0","pivot.preset.defaultName":"\u65B9\u6848 {index}","pivot.table.sectionTitle":"\u900F\u89C6\u7ED3\u679C","pivot.table.expandRowsAll":"\u884C\u5168\u90E8\u6253\u5F00","pivot.table.collapseRowsAll":"\u884C\u5168\u90E8\u6298\u53E0","pivot.table.expandColumnsAll":"\u5217\u5168\u90E8\u6253\u5F00","pivot.table.collapseColumnsAll":"\u5217\u5168\u90E8\u6298\u53E0","pivot.table.collapse.ariaExpand":"\u5C55\u5F00\u900F\u89C6\u7ED3\u679C","pivot.table.collapse.ariaCollapse":"\u6298\u53E0\u900F\u89C6\u7ED3\u679C","pivot.chart.title":"\u900F\u89C6\u56FE\u8868","pivot.chart.subtitle":"\u5C06\u4E00\u4E2A\u7EF4\u5EA6\u4E0E\u6700\u591A\u4E24\u4E2A\u5EA6\u91CF\u6620\u5C04\u4E3A\u7D27\u51D1\u56FE\u8868\u3002","pivot.chart.subtitleReady":"{dimension} \xB7 {measure}","pivot.chart.emptyNoDimension":"\u8BF7\u81F3\u5C11\u653E\u5165\u4E00\u4E2A\u884C\u6216\u5217\u5B57\u6BB5\u540E\u518D\u67E5\u770B\u56FE\u8868\u3002","pivot.chart.emptyNoValue":"\u8BF7\u81F3\u5C11\u653E\u5165\u4E00\u4E2A\u503C\u5B57\u6BB5\u540E\u518D\u67E5\u770B\u56FE\u8868\u3002","pivot.chart.emptyNoData":"\u5F53\u524D\u56FE\u8868\u9009\u62E9\u4E0B\u6682\u65E0\u53EF\u5C55\u793A\u6570\u636E\u3002","pivot.chart.dimension":"\u56FE\u8868\u7EF4\u5EA6","pivot.chart.primaryMeasure":"\u4E3B\u5EA6\u91CF","pivot.chart.secondaryMeasure":"\u5BF9\u6BD4\u5EA6\u91CF","pivot.chart.chartType":"\u56FE\u8868\u7C7B\u578B","pivot.chart.style.barVertical":"\u7EB5\u5411\u67F1\u72B6\u56FE","pivot.chart.style.barHorizontal":"\u6A2A\u5411\u67F1\u72B6\u56FE","pivot.chart.style.line":"\u6298\u7EBF\u56FE","pivot.chart.style.scatter":"\u6563\u70B9\u56FE","pivot.chart.collapse.ariaExpand":"\u5C55\u5F00\u56FE\u8868\u533A\u57DF","pivot.chart.collapse.ariaCollapse":"\u6298\u53E0\u56FE\u8868\u533A\u57DF","smartFilter.adaptFilters":"\u7B5B\u9009\u8BBE\u7F6E","smartFilter.addFilters":"\u6DFB\u52A0\u7B5B\u9009","smartFilter.go":"\u6267\u884C","smartFilter.visibleFilters":"\u53EF\u89C1\u7B5B\u9009\u9879","smartFilter.searchPlaceholder":"\u641C\u7D22...","smartFilter.noOptionsFound":"\u672A\u627E\u5230\u9009\u9879","smartFilter.min":"\u6700\u5C0F\u503C","smartFilter.max":"\u6700\u5927\u503C","smartFilter.minMaxPlaceholder":"\u6700\u5C0F\u503C - \u6700\u5927\u503C","smartFilter.operator.equals":"\u7B49\u4E8E","smartFilter.operator.contains":"\u5305\u542B","smartFilter.operator.notContains":"\u4E0D\u5305\u542B","smartFilter.operator.wildcard":"\u901A\u914D\u7B26\u641C\u7D22","smartFilter.operator.notEquals":"\u4E0D\u7B49\u4E8E","smartFilter.operator.greaterThan":"\u5927\u4E8E","smartFilter.operator.lessThan":"\u5C0F\u4E8E","smartFilter.operator.greaterOrEqual":"\u5927\u4E8E\u7B49\u4E8E","smartFilter.operator.lessOrEqual":"\u5C0F\u4E8E\u7B49\u4E8E","smartFilter.operator.between":"\u533A\u95F4","variant.noOptions":"\u65E0\u9009\u9879","variant.defaultSuffix":"\u9ED8\u8BA4","variant.selectVariant":"\u9009\u62E9\u89C6\u56FE","variant.saveView":"\u4FDD\u5B58\u89C6\u56FE","variant.newVariant":"\u65B0\u89C6\u56FE","variant.viewName":"\u89C6\u56FE\u540D\u79F0","variant.setDefault":"\u8BBE\u4E3A\u9ED8\u8BA4","variant.publicAllUsers":"\u516C\u5F00\uFF08\u6240\u6709\u7528\u6237\uFF09","variant.toast.fetchFailed":"\u52A0\u8F7D\u89C6\u56FE\u5931\u8D25","variant.toast.saveFailed":"\u4FDD\u5B58\u89C6\u56FE\u5931\u8D25","variant.toast.saveSuccess":"\u89C6\u56FE\u4FDD\u5B58\u6210\u529F","variant.toast.deleteFailed":"\u5220\u9664\u89C6\u56FE\u5931\u8D25","variant.toast.deleteSuccess":"\u89C6\u56FE\u5220\u9664\u6210\u529F","variant.toast.defaultFailed":"\u66F4\u65B0\u9ED8\u8BA4\u89C6\u56FE\u5931\u8D25","variant.toast.defaultSuccess":"\u9ED8\u8BA4\u89C6\u56FE\u5DF2\u66F4\u65B0","layout.saveLayout":"\u4FDD\u5B58\u5E03\u5C40","layout.layoutOptions":"\u5E03\u5C40\u9009\u9879","layout.selectLayout":"\u9009\u62E9\u5E03\u5C40","layout.saveCurrentLayout":"\u4FDD\u5B58\u5F53\u524D\u5E03\u5C40...","layout.noSavedLayouts":"\u6682\u65E0\u5DF2\u4FDD\u5B58\u5E03\u5C40","layout.removeDefault":"\u53D6\u6D88\u9ED8\u8BA4","layout.setAsDefault":"\u8BBE\u4E3A\u9ED8\u8BA4","layout.layoutName":"\u5E03\u5C40\u540D\u79F0","layout.layoutDescription":"\u63CF\u8FF0","layout.layoutNameHelper":"\u4F8B\u5982\uFF1A\u7D27\u51D1\u89C6\u56FE","layout.warningOverwrite":"\u8B66\u544A\uFF1A\u5C06\u8986\u76D6\u540C\u540D\u5E03\u5C40","layout.useAsDefault":"\u7528\u4F5C\u9ED8\u8BA4\u5E03\u5C40","layout.publicAllUsers":"\u516C\u5F00\uFF08\u6240\u6709\u7528\u6237\u53EF\u89C1\uFF09","layout.toast.loadFallback":"\u540E\u7AEF\u52A0\u8F7D\u5E03\u5C40\u5931\u8D25\uFF0C\u5DF2\u56DE\u9000\u5230\u672C\u5730\u5B58\u50A8","layout.toast.saveSuccess":"\u5E03\u5C40\u4FDD\u5B58\u6210\u529F","layout.toast.saveLocalSuccess":"\u5E03\u5C40\u5DF2\u4FDD\u5B58\u5230\u672C\u5730\u5B58\u50A8","layout.toast.backendUnavailableSavedLocal":"\u540E\u7AEF\u4E0D\u53EF\u7528\uFF0C\u5DF2\u4FDD\u5B58\u5230\u672C\u5730\u5B58\u50A8","layout.toast.deleteSuccess":"\u5E03\u5C40\u5220\u9664\u6210\u529F","layout.toast.deleteLocalSuccess":"\u5E03\u5C40\u5DF2\u4ECE\u672C\u5730\u5B58\u50A8\u5220\u9664","layout.toast.backendUnavailableDeletedLocal":"\u540E\u7AEF\u4E0D\u53EF\u7528\uFF0C\u5DF2\u4ECE\u672C\u5730\u5B58\u50A8\u5220\u9664","layout.toast.defaultSuccess":"\u9ED8\u8BA4\u5E03\u5C40\u5DF2\u8BBE\u7F6E","layout.toast.defaultLocalSuccess":"\u9ED8\u8BA4\u5E03\u5C40\u5DF2\u5728\u672C\u5730\u5B58\u50A8\u8BBE\u7F6E","layout.toast.backendUnavailableDefaultLocal":"\u540E\u7AEF\u4E0D\u53EF\u7528\uFF0C\u9ED8\u8BA4\u5E03\u5C40\u5DF2\u4FDD\u5B58\u5230\u672C\u5730\u5B58\u50A8","dateRange.label":"\u65E5\u671F\u8303\u56F4","dateRange.startDate":"\u5F00\u59CB\u65E5\u671F","dateRange.endDate":"\u7ED3\u675F\u65E5\u671F","dateRange.select":"\u8BF7\u9009\u62E9...","dateRange.today":"\u4ECA\u5929","dateRange.thisWeek":"\u672C\u5468","dateRange.thisMonth":"\u672C\u6708","graph.records":"{count} \u6761\u8BB0\u5F55","graph.kpi.totalRecords":"\u603B\u8BB0\u5F55\u6570","graph.kpi.totalReport":"\u603B\u7533\u62A5\u5DE5\u65F6","graph.kpi.totalBillable":"\u603B\u53EF\u8BA1\u8D39\u5DE5\u65F6","graph.kpi.efficiency":"\u6548\u7387","graph.kpi.amount":"\u91D1\u989D","graph.kpi.flagged":"\u6807\u8BB0","graph.chart.billable.title":"\u7EF4\u5EA6\u8BA1\u8D39\u5DE5\u65F6","graph.chart.billable.subtitle":"\u6309\u53EF\u8BA1\u8D39\u5DE5\u65F6\u6392\u5E8F\u524D\u5217","graph.chart.efficiency.title":"\u4EBA\u5458\u6548\u7387","graph.chart.efficiency.subtitle":"\u6309\u6700\u4F4E\u6548\u7387\u4F18\u5148","graph.chart.status.title":"\u72B6\u6001\u5206\u5E03","graph.chart.status.subtitle":"\u6309\u72B6\u6001\u8BB0\u5F55\u5360\u6BD4","graph.dataBody":"\u6570\u636E\u660E\u7EC6","graph.reportTitle":"\u56FE\u8868\u62A5\u8868","graph.unassigned":"\u672A\u5206\u914D","graph.column.reportHours":"\u7533\u62A5\u5DE5\u65F6","graph.column.billableHours":"\u53EF\u8BA1\u8D39\u5DE5\u65F6","detail.searchAi.placeholder":"\u641C\u7D22\u5B57\u6BB5\uFF1B\u5982\u65E0\u7ED3\u679C\u5219\u81EA\u52A8\u89E6\u53D1 AI...","detail.searchAi.matches":"{count} \u6761\u5339\u914D\u7ED3\u679C","detail.searchAi.noMatch":"\u672A\u627E\u5230\u5339\u914D\u5B57\u6BB5\u3002","detail.searchAi.autoAiFallback":"\u672A\u547D\u4E2D\u5B57\u6BB5\uFF0C\u6B63\u5728\u89E6\u53D1 AI \u5206\u6790...","detail.searchAi.aiResultTitle":"AI \u5206\u6790\u7ED3\u679C","detail.table.title":"\u5173\u8054\u8BB0\u5F55","kanban.empty":"\u5C06\u5361\u7247\u62D6\u5230\u8FD9\u91CC","kanban.bucket.limit":"\u4E0A\u9650","kanban.bucket.dropHere":"\u91CA\u653E\u540E\u79FB\u52A8\u5230\u8BE5 bucket","kanban.bucket.add":"\u65B0\u589E bucket","kanban.bucket.rename":"\u91CD\u547D\u540D bucket","kanban.bucket.saveRename":"\u4FDD\u5B58 bucket \u540D\u79F0","kanban.bucket.cancelRename":"\u53D6\u6D88\u91CD\u547D\u540D","kanban.search.placeholder":"\u641C\u7D22\u5361\u7247\u548C bucket","kanban.search.clear":"\u6E05\u9664\u641C\u7D22","kanban.search.results":"{count} \u5F20\u5339\u914D\u5361\u7247","kanban.search.noMatch":"\u6CA1\u6709\u5339\u914D\u7684\u5361\u7247","kanban.card.progress":"\u8FDB\u5EA6","kanban.card.openDetail":"\u6253\u5F00\u8BE6\u60C5","kanban.priority.critical":"\u7D27\u6025","kanban.priority.high":"\u9AD8","kanban.priority.medium":"\u4E2D","kanban.priority.low":"\u4F4E","quickCreate.newItem":"\u65B0\u5EFA\u6761\u76EE","quickCreate.createWithTitle":"\u521B\u5EFA{title}","quickEdit.editWithTitle":"\u7F16\u8F91{title}","quickDelete.confirmTitle":"\u786E\u8BA4\u5220\u9664","quickDelete.confirmMessageSingle":"\u786E\u8BA4\u5220\u9664\u5F53\u524D\u9009\u4E2D\u8BB0\u5F55\u5417\uFF1F","quickDelete.confirmMessageMultiple":"\u786E\u8BA4\u5220\u9664\u5DF2\u9009\u4E2D\u7684 {count} \u6761\u8BB0\u5F55\u5417\uFF1F","cardPage.viewDetails":"\u67E5\u770B\u8BE6\u60C5","cardPage.download":"\u4E0B\u8F7D","cardPage.close":"\u5173\u95ED","cardPage.empty":"\u672A\u627E\u5230\u6761\u76EE","messageBox.confirm":"\u786E\u5B9A","messageBox.cancel":"\u53D6\u6D88","omph.status.idle":"\u7A7A\u95F2","omph.status.pending":"\u7B49\u5F85\u4E2D","omph.status.running":"\u5904\u7406\u4E2D","omph.status.success":"\u5DF2\u5B8C\u6210","omph.status.error":"\u51FA\u9519","omph.working":"\u5904\u7406\u4E2D","omph.workingFor":"\u5DF2\u5904\u7406 {duration}","omph.loadOlder":"\u52A0\u8F7D\u66F4\u65E9\u6D88\u606F","omph.loadingOlder":"\u6B63\u5728\u52A0\u8F7D\u66F4\u65E9\u6D88\u606F\u2026","omph.toBottom":"\u56DE\u5230\u5E95\u90E8","omph.copy":"\u590D\u5236","omph.copied":"\u5DF2\u590D\u5236","omph.turnActions":"\u56DE\u590D\u64CD\u4F5C","omph.usage":"\u7528\u91CF","omph.inputTokens":"\u8F93\u5165","omph.outputTokens":"\u8F93\u51FA","omph.duration":"\u7528\u65F6","omph.send":"\u53D1\u9001","omph.stop":"\u505C\u6B62","omph.turnRail":"\u8F6E\u6B21","omph.secondUnit":"\u79D2","omph.minuteUnit":"\u5206","omph.preview.title":"\u6587\u4EF6\u9884\u89C8","omph.preview.close":"\u5173\u95ED\u9884\u89C8","omph.preview.back":"\u8FD4\u56DE\u5BF9\u8BDD","omph.preview.expand":"\u5C55\u5F00\u9884\u89C8","omph.preview.collapse":"\u8FD8\u539F\u9884\u89C8\u5927\u5C0F","omph.preview.copyContent":"\u590D\u5236\u5185\u5BB9","omph.preview.copyPath":"\u590D\u5236\u8DEF\u5F84","omph.preview.download":"\u4E0B\u8F7D","omph.preview.openExternal":"\u5728\u5916\u90E8\u6253\u5F00","omph.preview.wrap":"\u81EA\u52A8\u6362\u884C","omph.preview.loading":"\u6B63\u5728\u52A0\u8F7D\u6587\u4EF6","omph.preview.missing":"\u6587\u4EF6\u4E0D\u5B58\u5728","omph.preview.failed":"\u65E0\u6CD5\u52A0\u8F7D\u6B64\u6587\u4EF6","omph.preview.unsupported":"\u6B64\u6587\u4EF6\u7C7B\u578B\u4E0D\u652F\u6301\u9884\u89C8","omph.preview.retry":"\u91CD\u8BD5","omph.preview.resize":"\u8C03\u6574\u9884\u89C8\u5927\u5C0F","omph.preview.line":"\u7B2C {start} \u884C","omph.preview.lines":"\u7B2C {start}\u2013{end} \u884C","omph.preview.truncated":"\u5171 {total} \u884C\uFF0C\u4EC5\u663E\u793A\u524D {shown} \u884C","omph.preview.imageFailed":"\u56FE\u7247\u65E0\u6CD5\u663E\u793A","omph.preview.zoomIn":"\u653E\u5927","omph.preview.zoomOut":"\u7F29\u5C0F","omph.preview.zoomFit":"\u9002\u5E94\u5BBD\u5EA6","omph.newConversation":"\u65B0\u5EFA\u4F1A\u8BDD","omph.conversationList":"\u4F1A\u8BDD\u5217\u8868","omph.conversations":"\u4F1A\u8BDD","omph.noConversations":"\u8FD8\u6CA1\u6709\u4F1A\u8BDD","omph.approval.waiting":"\u7B49\u5F85\u5BA1\u6279","omph.approval.choose":"\u8BF7\u9009\u62E9\u64CD\u4F5C","omph.approval.details":"\u5BA1\u6279\u8BE6\u60C5","omph.approval.choices":"\u53EF\u9009\u64CD\u4F5C","omph.approval.reject":"\u62D2\u7EDD","omph.approval.allowOnce":"\u4EC5\u6B64\u4E00\u6B21","omph.approval.confirm":"\u7EE7\u7EED","omph.approval.other":"\u5176\u4ED6","omph.approval.otherPlaceholder":"\u63CF\u8FF0\u8981\u6267\u884C\u7684\u64CD\u4F5C","omph.approval.escalation":"\u5DE5\u5177 {toolName} \u8BF7\u6C42\u7279\u6743\u6267\u884C","omph.input.placeholder":"\u8F93\u5165\u6D88\u606F\u2026","omph.input.upload":"\u4E0A\u4F20\u6587\u4EF6","omph.input.send":"\u53D1\u9001\u6D88\u606F","omph.input.stop":"\u505C\u6B62\u751F\u6210","omph.input.message":"\u6D88\u606F\u8F93\u5165","omph.input.tools":"\u8F93\u5165\u5DE5\u5177","agentui.html.defaultTitle":"\u4EA4\u4E92\u5F0F HTML","agentui.html.open":"\u6253\u5F00","agentui.html.preview":"\u9884\u89C8","agentui.html.code":"\u4EE3\u7801","agentui.html.toggle":"\u5207\u6362\u4EE3\u7801\u4E0E\u9884\u89C8","agentui.html.copy":"\u590D\u5236\u4EE3\u7801","agentui.html.copied":"\u5DF2\u590D\u5236","agentui.html.download":"\u4E0B\u8F7D","agentui.html.close":"\u5173\u95ED"},wh={"common.cancel":"Annuler","common.save":"Enregistrer","common.ok":"OK","common.done":"Terminer","common.search":"Rechercher","common.none":"Aucun","common.all":"Tout","common.noData":"Aucune donn\xE9e","common.copy":"Copier","common.delete":"Supprimer","common.loading":"Chargement...","header.searchPlaceholder":"Demandez-moi...","header.searchAddFeature":"Ajouter une fonction","header.searchStartVoice":"D\xE9marrer la saisie vocale","header.searchStopVoice":"Arr\xEAter la saisie vocale","header.searchOpenPanel":"Ouvrir la conversation","header.theme.system":"Th\xE8me : Syst\xE8me","header.theme.dark":"Th\xE8me : Sombre","header.theme.light":"Th\xE8me : Clair","header.menu.setting":"Param\xE8tres","header.menu.refresh":"Actualiser","header.menu.logout":"Se d\xE9connecter","navigation.expand":"D\xE9velopper la navigation","navigation.collapse":"R\xE9duire la navigation","navigation.searchPlaceholder":"Rechercher dans le menu...","navigation.noMatch":"Aucun \xE9l\xE9ment correspondant","navigation.noAccessibleApp":"Aucune application accessible","navigation.noItems":"Aucun \xE9l\xE9ment \xE0 afficher","navigation.expandView":"D\xE9velopper {title}","navigation.mode.switchToFixed":"Basculer vers la navigation fixe","navigation.mode.switchToFloating":"Basculer vers la navigation flottante","navigation.pinned":"\xC9pingl\xE9s","navigation.pin.add":"\xC9pingler en haut","navigation.pin.remove":"D\xE9s\xE9pingler","table.toolbar.searchPlaceholder":"Rechercher...","table.title.default":"Tableau de donn\xE9es","table.toolbar.groupBy":"Grouper","table.toolbar.summary":"R\xE9sum\xE9","table.toolbar.columns":"Colonnes","table.toolbar.export":"Exporter","table.toolbar.itemsPerPage":"Lignes par page :","table.toolbar.pageOf":"Page {current} sur {total}","table.toolbar.newItem":"Nouvel \xE9l\xE9ment","table.toolbar.editItem":"Modifier l'\xE9l\xE9ment","table.toolbar.deleteItem":"Supprimer l'\xE9l\xE9ment","table.toolbar.graphicReport":"Rapport graphique","table.toolbar.saveLayout":"Enregistrer la vue","table.menu.groupBy":"Grouper","table.menu.clearAll":"Tout effacer","table.menu.visibleColumns":"Colonnes visibles","table.menu.showSummaryRow":"Afficher la ligne de r\xE9sum\xE9","table.menu.noNumericColumns":"Aucune colonne num\xE9rique","table.group.expandAll":"D\xE9velopper tous les groupes","table.group.collapseAll":"R\xE9duire tous les groupes","table.mobile.notImplemented":"Vue mobile non impl\xE9ment\xE9e","table.headerMenu.sortAsc":"Trier ascendant","table.headerMenu.sortDesc":"Trier descendant","table.headerMenu.clearSort":"Effacer le tri","table.headerMenu.configureSort":"Configurer le tri...","table.headerMenu.group":"Grouper par cette colonne","table.headerMenu.ungroup":"Retirer du groupement","table.headerMenu.addSummary":"Inclure dans le r\xE9sum\xE9","table.headerMenu.removeSummary":"Retirer du r\xE9sum\xE9","table.headerMenu.hideColumn":"Masquer la colonne","table.sortDialog.title":"Param\xE8tres de tri","table.sortDialog.empty":"Aucune r\xE8gle de tri. Ajoutez-en une pour commencer.","table.sortDialog.addRule":"Ajouter une r\xE8gle","table.sortDialog.clearAll":"Tout effacer","table.sortDialog.asc":"Ascendant","table.sortDialog.desc":"Descendant","pivot.title.default":"Tableau crois\xE9 dynamique","pivot.subtitle.default":"Faites glisser les champs pour configurer le tableau crois\xE9.","pivot.empty":"Ajoutez au moins un champ de valeur pour afficher le r\xE9sultat.","pivot.records":"Enregistrements","pivot.afterFilter":"Apr\xE8s filtre","pivot.grandTotal":"Total g\xE9n\xE9ral","pivot.resultLabel":"R\xE9sultat","pivot.valueLabel":"Valeur","pivot.table.dimensions":"Dimensions","pivot.config.title":"Configuration","pivot.fieldList":"Liste des champs","pivot.availableDimensions":"Dimensions disponibles","pivot.allFieldsInUse":"Tous les champs sont d\xE9j\xE0 utilis\xE9s.","pivot.zone.rows":"Lignes","pivot.zone.columns":"Colonnes","pivot.zone.filters":"Filtres","pivot.zone.values":"Valeurs","pivot.hint.rows":"D\xE9posez les champs ici pour construire la hi\xE9rarchie des lignes","pivot.hint.columns":"D\xE9posez les champs ici pour construire la hi\xE9rarchie des colonnes","pivot.hint.filters":"D\xE9posez les champs ici pour les filtres du rapport","pivot.hint.values":"D\xE9posez les champs num\xE9riques ici pour les agr\xE9gations","pivot.clearArea":"Vider la zone","pivot.filter.na":"N/A","pivot.filter.noValues":"Aucune valeur","pivot.filter.noneSelected":"Aucune s\xE9lection","pivot.filter.allValues":"Toutes les valeurs","pivot.filter.selectedCount":"{selected} / {total} s\xE9lectionn\xE9es","pivot.filter.selectAll":"Tout s\xE9lectionner","pivot.filter.deselectAll":"Tout d\xE9s\xE9lectionner","pivot.filter.noResults":"Aucun r\xE9sultat","pivot.collapse.ariaExpand":"D\xE9velopper la zone de configuration","pivot.collapse.ariaCollapse":"R\xE9duire la zone de configuration","pivot.agg.sum":"Somme","pivot.agg.count":"Compte","pivot.agg.avg":"Moyenne","pivot.agg.min":"Min","pivot.agg.max":"Max","pivot.preset.selectPlaceholder":"S\xE9lectionner un preset","pivot.preset.save":"Enregistrer le preset","pivot.preset.delete":"Supprimer le preset","pivot.preset.saveDialogTitle":"Enregistrer le preset actuel","pivot.preset.nameLabel":"Nom du preset","pivot.preset.defaultName":"Preset {index}","pivot.table.sectionTitle":"R\xE9sultat du pivot","pivot.table.expandRowsAll":"Expand rows","pivot.table.collapseRowsAll":"Collapse rows","pivot.table.expandColumnsAll":"Expand columns","pivot.table.collapseColumnsAll":"Collapse columns","pivot.table.collapse.ariaExpand":"D\xE9velopper le r\xE9sultat du pivot","pivot.table.collapse.ariaCollapse":"R\xE9duire le r\xE9sultat du pivot","pivot.chart.title":"Graphique pivot","pivot.chart.subtitle":"Associez une dimension et jusqu\u2019\xE0 deux mesures dans un graphique compact.","pivot.chart.subtitleReady":"{dimension} par {measure}","pivot.chart.emptyNoDimension":"Ajoutez au moins un champ de ligne ou de colonne pour afficher le graphique.","pivot.chart.emptyNoValue":"Ajoutez au moins un champ de valeur pour afficher le graphique.","pivot.chart.emptyNoData":"Aucune donn\xE9e disponible pour la s\xE9lection actuelle du graphique.","pivot.chart.dimension":"Dimension","pivot.chart.primaryMeasure":"Mesure","pivot.chart.secondaryMeasure":"Mesure de comparaison","pivot.chart.chartType":"Type de graphique","pivot.chart.style.barVertical":"Barres verticales","pivot.chart.style.barHorizontal":"Barres horizontales","pivot.chart.style.line":"Ligne","pivot.chart.style.scatter":"Nuage de points","pivot.chart.collapse.ariaExpand":"D\xE9velopper la zone du graphique","pivot.chart.collapse.ariaCollapse":"R\xE9duire la zone du graphique","smartFilter.adaptFilters":"Adapter les filtres","smartFilter.addFilters":"Ajouter des filtres","smartFilter.go":"Ex\xE9cuter","smartFilter.visibleFilters":"Filtres visibles","smartFilter.searchPlaceholder":"Rechercher...","smartFilter.noOptionsFound":"Aucune option trouv\xE9e","smartFilter.min":"Min","smartFilter.max":"Max","smartFilter.minMaxPlaceholder":"Min - Max","smartFilter.operator.equals":"\xC9gal \xE0","smartFilter.operator.contains":"Contient","smartFilter.operator.notContains":"Ne contient pas","smartFilter.operator.wildcard":"Recherche g\xE9n\xE9rique","smartFilter.operator.notEquals":"Diff\xE9rent de","smartFilter.operator.greaterThan":"Sup\xE9rieur \xE0","smartFilter.operator.lessThan":"Inf\xE9rieur \xE0","smartFilter.operator.greaterOrEqual":"Sup\xE9rieur ou \xE9gal","smartFilter.operator.lessOrEqual":"Inf\xE9rieur ou \xE9gal","smartFilter.operator.between":"Entre","variant.noOptions":"Aucune option","variant.defaultSuffix":"Par d\xE9faut","variant.selectVariant":"S\xE9lectionner une vue","variant.saveView":"Enregistrer la vue","variant.newVariant":"Nouvelle vue","variant.viewName":"Nom de la vue","variant.setDefault":"D\xE9finir par d\xE9faut","variant.publicAllUsers":"Public (tous les utilisateurs)","variant.toast.fetchFailed":"\xC9chec du chargement des vues","variant.toast.saveFailed":"\xC9chec de l'enregistrement de la vue","variant.toast.saveSuccess":"Vue enregistr\xE9e avec succ\xE8s","variant.toast.deleteFailed":"\xC9chec de la suppression de la vue","variant.toast.deleteSuccess":"Vue supprim\xE9e avec succ\xE8s","variant.toast.defaultFailed":"\xC9chec de la mise \xE0 jour de la vue par d\xE9faut","variant.toast.defaultSuccess":"Vue par d\xE9faut mise \xE0 jour","layout.saveLayout":"Enregistrer la vue","layout.layoutOptions":"Options de vue","layout.selectLayout":"S\xE9lectionner une vue","layout.saveCurrentLayout":"Enregistrer la vue actuelle...","layout.noSavedLayouts":"Aucune vue enregistr\xE9e","layout.removeDefault":"Retirer le d\xE9faut","layout.setAsDefault":"D\xE9finir par d\xE9faut","layout.layoutName":"Nom de la vue","layout.layoutDescription":"Description","layout.layoutNameHelper":"ex. : Vue compacte","layout.warningOverwrite":"Attention : la vue existante sera \xE9cras\xE9e","layout.useAsDefault":"Utiliser comme vue par d\xE9faut","layout.publicAllUsers":"Public (visible par tous les utilisateurs)","layout.toast.loadFallback":"\xC9chec du chargement depuis le backend, bascule vers le stockage local","layout.toast.saveSuccess":"Vue enregistr\xE9e avec succ\xE8s","layout.toast.saveLocalSuccess":"Vue enregistr\xE9e dans le stockage local","layout.toast.backendUnavailableSavedLocal":"Backend indisponible, enregistr\xE9 en local","layout.toast.deleteSuccess":"Vue supprim\xE9e avec succ\xE8s","layout.toast.deleteLocalSuccess":"Vue supprim\xE9e du stockage local","layout.toast.backendUnavailableDeletedLocal":"Backend indisponible, supprim\xE9 en local","layout.toast.defaultSuccess":"Vue par d\xE9faut d\xE9finie","layout.toast.defaultLocalSuccess":"Vue par d\xE9faut d\xE9finie en local","layout.toast.backendUnavailableDefaultLocal":"Backend indisponible, d\xE9faut enregistr\xE9 en local","dateRange.label":"Plage de dates","dateRange.startDate":"Date de d\xE9but","dateRange.endDate":"Date de fin","dateRange.select":"S\xE9lectionner...","dateRange.today":"Aujourd'hui","dateRange.thisWeek":"Cette semaine","dateRange.thisMonth":"Ce mois-ci","graph.records":"{count} enregistrements","graph.kpi.totalRecords":"Total des enregistrements","graph.kpi.totalReport":"Total d\xE9clar\xE9","graph.kpi.totalBillable":"Total facturable","graph.kpi.efficiency":"Efficacit\xE9","graph.kpi.amount":"Montant","graph.kpi.flagged":"Signal\xE9","graph.chart.billable.title":"Facturable par dimension","graph.chart.billable.subtitle":"Top valeurs par heures facturables","graph.chart.efficiency.title":"Efficacit\xE9 par personne","graph.chart.efficiency.subtitle":"Efficacit\xE9 la plus faible en premier","graph.chart.status.title":"R\xE9partition des statuts","graph.chart.status.subtitle":"Ratio des enregistrements par statut","graph.dataBody":"Donn\xE9es","graph.reportTitle":"Rapport graphique","graph.unassigned":"Non attribu\xE9","graph.column.reportHours":"Heures d\xE9clar\xE9es","graph.column.billableHours":"Heures facturables","detail.searchAi.placeholder":"Rechercher des champs, ou interroger l\u2019IA en cas d\u2019absence de r\xE9sultat...","detail.searchAi.matches":"{count} correspondances trouv\xE9es","detail.searchAi.noMatch":"Aucun champ correspondant trouv\xE9.","detail.searchAi.autoAiFallback":"Aucune correspondance directe. Analyse IA en cours...","detail.searchAi.aiResultTitle":"Analyse IA","detail.table.title":"Enregistrements li\xE9s","kanban.empty":"D\xE9posez les cartes ici","kanban.bucket.limit":"Limite","kanban.bucket.dropHere":"Rel\xE2chez pour d\xE9placer dans cette colonne","kanban.bucket.add":"Ajouter une colonne","kanban.bucket.rename":"Renommer la colonne","kanban.bucket.saveRename":"Enregistrer le nom","kanban.bucket.cancelRename":"Annuler le renommage","kanban.search.placeholder":"Rechercher des cartes et colonnes","kanban.search.clear":"Effacer la recherche","kanban.search.results":"{count} cartes correspondantes","kanban.search.noMatch":"Aucune carte correspondante","kanban.card.progress":"Progression","kanban.card.openDetail":"Ouvrir le d\xE9tail","kanban.priority.critical":"Critique","kanban.priority.high":"\xC9lev\xE9e","kanban.priority.medium":"Moyenne","kanban.priority.low":"Faible","quickCreate.newItem":"Nouvel \xE9l\xE9ment","quickCreate.createWithTitle":"Cr\xE9er {title}","quickEdit.editWithTitle":"Modifier {title}","quickDelete.confirmTitle":"Confirmer la suppression","quickDelete.confirmMessageSingle":"Voulez-vous vraiment supprimer l\u2019enregistrement s\xE9lectionn\xE9 ?","quickDelete.confirmMessageMultiple":"Voulez-vous vraiment supprimer les {count} enregistrements s\xE9lectionn\xE9s ?","cardPage.viewDetails":"Voir les d\xE9tails","cardPage.download":"T\xE9l\xE9charger","cardPage.close":"Fermer","cardPage.empty":"Aucun \xE9l\xE9ment trouv\xE9","messageBox.confirm":"OK","messageBox.cancel":"Annuler","omph.status.idle":"Inactif","omph.status.pending":"En attente","omph.status.running":"En cours","omph.status.success":"Termin\xE9","omph.status.error":"Erreur","omph.working":"En cours","omph.workingFor":"En cours depuis {duration}","omph.loadOlder":"Charger les messages pr\xE9c\xE9dents","omph.loadingOlder":"Chargement des messages pr\xE9c\xE9dents\u2026","omph.toBottom":"Revenir en bas","omph.copy":"Copier","omph.copied":"Copi\xE9","omph.turnActions":"Actions de r\xE9ponse","omph.usage":"Utilisation","omph.inputTokens":"Entr\xE9e","omph.outputTokens":"Sortie","omph.duration":"Dur\xE9e","omph.send":"Envoyer","omph.stop":"Arr\xEAter","omph.turnRail":"Tours","omph.secondUnit":"s","omph.minuteUnit":"min","omph.preview.title":"Aper\xE7u du fichier","omph.preview.close":"Fermer l'aper\xE7u","omph.preview.back":"Retour \xE0 la conversation","omph.preview.expand":"Agrandir l\u2019aper\xE7u","omph.preview.collapse":"R\xE9duire l\u2019aper\xE7u","omph.preview.copyContent":"Copier le contenu","omph.preview.copyPath":"Copier le chemin","omph.preview.download":"T\xE9l\xE9charger","omph.preview.openExternal":"Ouvrir \xE0 l\u2019ext\xE9rieur","omph.preview.wrap":"Retour \xE0 la ligne","omph.preview.loading":"Chargement du fichier","omph.preview.missing":"Fichier introuvable","omph.preview.failed":"Impossible de charger ce fichier","omph.preview.unsupported":"Aucun aper\xE7u pour ce type de fichier","omph.preview.retry":"R\xE9essayer","omph.preview.resize":"Redimensionner l\u2019aper\xE7u","omph.preview.line":"Ligne {start}","omph.preview.lines":"Lignes {start}\u2013{end}","omph.preview.truncated":"Affichage des {shown} premi\xE8res lignes sur {total}","omph.preview.imageFailed":"Impossible d'afficher l'image","omph.preview.zoomIn":"Zoom avant","omph.preview.zoomOut":"Zoom arri\xE8re","omph.preview.zoomFit":"Ajuster \xE0 la largeur","omph.newConversation":"Nouvelle conversation","omph.conversationList":"Liste des conversations","omph.conversations":"Conversations","omph.noConversations":"Aucune conversation","omph.approval.waiting":"En attente d'approbation","omph.approval.choose":"Choisir une action","omph.approval.details":"D\xE9tails de l'approbation","omph.approval.choices":"Actions","omph.approval.reject":"Refuser","omph.approval.allowOnce":"Autoriser une fois","omph.approval.confirm":"Continuer","omph.approval.other":"Autre","omph.approval.otherPlaceholder":"D\xE9crire l'action \xE0 effectuer","omph.approval.escalation":"L'outil {toolName} demande une ex\xE9cution privil\xE9gi\xE9e","omph.input.placeholder":"Saisir un message\u2026","omph.input.upload":"T\xE9l\xE9verser un fichier","omph.input.send":"Envoyer le message","omph.input.stop":"Arr\xEAter la g\xE9n\xE9ration","omph.input.message":"Saisie de message","omph.input.tools":"Outils de saisie","agentui.html.defaultTitle":"HTML interactif","agentui.html.open":"Ouvrir","agentui.html.preview":"Aper\xE7u","agentui.html.code":"Code","agentui.html.toggle":"Basculer entre code et aper\xE7u","agentui.html.copy":"Copier le code","agentui.html.copied":"Copi\xE9","agentui.html.download":"T\xE9l\xE9charger","agentui.html.close":"Fermer"},Sh={"common.cancel":"Abbrechen","common.save":"Speichern","common.ok":"OK","common.done":"Fertig","common.search":"Suchen","common.none":"Keine","common.all":"Alle","common.noData":"Keine Daten","common.copy":"Kopieren","common.delete":"L\xF6schen","common.loading":"Wird geladen...","header.searchPlaceholder":"Frag mich...","header.searchAddFeature":"Funktion hinzuf\xFCgen","header.searchStartVoice":"Spracheingabe starten","header.searchStopVoice":"Spracheingabe stoppen","header.searchOpenPanel":"Unterhaltung \xF6ffnen","header.theme.system":"Theme: System","header.theme.dark":"Theme: Dunkel","header.theme.light":"Theme: Hell","header.menu.setting":"Einstellungen","header.menu.refresh":"Aktualisieren","header.menu.logout":"Abmelden","navigation.expand":"Navigation erweitern","navigation.collapse":"Navigation einklappen","navigation.searchPlaceholder":"Men\xFC suchen...","navigation.noMatch":"Keine passenden Men\xFCeintr\xE4ge","navigation.noAccessibleApp":"Keine verf\xFCgbaren Anwendungen","navigation.noItems":"Keine Eintr\xE4ge vorhanden","navigation.expandView":"{title} aufklappen","navigation.mode.switchToFixed":"Zu fester Navigation wechseln","navigation.mode.switchToFloating":"Zu schwebender Navigation wechseln","navigation.pinned":"Angeheftet","navigation.pin.add":"Oben anheften","navigation.pin.remove":"L\xF6sen","table.toolbar.searchPlaceholder":"Suchen...","table.title.default":"Datentabelle","table.toolbar.groupBy":"Gruppieren","table.toolbar.summary":"Zusammenfassung","table.toolbar.columns":"Spalten","table.toolbar.export":"Export","table.toolbar.itemsPerPage":"Zeilen pro Seite:","table.toolbar.pageOf":"Seite {current} von {total}","table.toolbar.newItem":"Neuer Eintrag","table.toolbar.editItem":"Eintrag bearbeiten","table.toolbar.deleteItem":"Eintrag l\xF6schen","table.toolbar.graphicReport":"Grafikbericht","table.toolbar.saveLayout":"Layout speichern","table.menu.groupBy":"Gruppieren","table.menu.clearAll":"Alles l\xF6schen","table.menu.visibleColumns":"Sichtbare Spalten","table.menu.showSummaryRow":"Summenzeile anzeigen","table.menu.noNumericColumns":"Keine numerischen Spalten","table.group.expandAll":"Alle Gruppen aufklappen","table.group.collapseAll":"Alle Gruppen zuklappen","table.mobile.notImplemented":"Mobile Ansicht nicht implementiert","table.headerMenu.sortAsc":"Aufsteigend sortieren","table.headerMenu.sortDesc":"Absteigend sortieren","table.headerMenu.clearSort":"Sortierung entfernen","table.headerMenu.configureSort":"Sortierung konfigurieren...","table.headerMenu.group":"Nach dieser Spalte gruppieren","table.headerMenu.ungroup":"Aus Gruppierung entfernen","table.headerMenu.addSummary":"In Summe einbeziehen","table.headerMenu.removeSummary":"Aus Summe entfernen","table.headerMenu.hideColumn":"Spalte ausblenden","table.sortDialog.title":"Sortiereinstellungen","table.sortDialog.empty":"Keine Sortierregeln. F\xFCgen Sie eine hinzu, um zu sortieren.","table.sortDialog.addRule":"Regel hinzuf\xFCgen","table.sortDialog.clearAll":"Alle l\xF6schen","table.sortDialog.asc":"Aufsteigend","table.sortDialog.desc":"Absteigend","pivot.title.default":"Pivot-Tabelle","pivot.subtitle.default":"Ziehen Sie Felder, um die Pivot-Tabelle zu konfigurieren.","pivot.empty":"Ziehen Sie mindestens ein Wertefeld, um das Ergebnis anzuzeigen.","pivot.records":"Datens\xE4tze","pivot.afterFilter":"Nach Filter","pivot.grandTotal":"Gesamtsumme","pivot.resultLabel":"Ergebnis","pivot.valueLabel":"Wert","pivot.table.dimensions":"Dimensionen","pivot.config.title":"Konfiguration","pivot.fieldList":"Feldliste","pivot.availableDimensions":"Verf\xFCgbare Dimensionen","pivot.allFieldsInUse":"Alle Felder sind bereits verwendet.","pivot.zone.rows":"Zeilen","pivot.zone.columns":"Spalten","pivot.zone.filters":"Filter","pivot.zone.values":"Werte","pivot.hint.rows":"Felder hierhin ziehen, um die Zeilenhierarchie zu erstellen","pivot.hint.columns":"Felder hierhin ziehen, um die Spaltenhierarchie zu erstellen","pivot.hint.filters":"Felder hierhin ziehen f\xFCr Berichtsfilter","pivot.hint.values":"Numerische Felder hierhin ziehen f\xFCr Aggregation","pivot.clearArea":"Bereich leeren","pivot.filter.na":"N/V","pivot.filter.noValues":"Keine Werte","pivot.filter.noneSelected":"Nichts ausgew\xE4hlt","pivot.filter.allValues":"Alle Werte","pivot.filter.selectedCount":"{selected} / {total} ausgew\xE4hlt","pivot.filter.selectAll":"Alle ausw\xE4hlen","pivot.filter.deselectAll":"Alle abw\xE4hlen","pivot.filter.noResults":"Keine Ergebnisse","pivot.collapse.ariaExpand":"Konfigurationsbereich erweitern","pivot.collapse.ariaCollapse":"Konfigurationsbereich reduzieren","pivot.agg.sum":"Summe","pivot.agg.count":"Anzahl","pivot.agg.avg":"Durchschnitt","pivot.agg.min":"Min","pivot.agg.max":"Max","pivot.preset.selectPlaceholder":"Preset w\xE4hlen","pivot.preset.save":"Preset speichern","pivot.preset.delete":"Preset l\xF6schen","pivot.preset.saveDialogTitle":"Aktuelles Preset speichern","pivot.preset.nameLabel":"Preset-Name","pivot.preset.defaultName":"Preset {index}","pivot.table.sectionTitle":"Pivot-Ergebnis","pivot.table.expandRowsAll":"Expand rows","pivot.table.collapseRowsAll":"Collapse rows","pivot.table.expandColumnsAll":"Expand columns","pivot.table.collapseColumnsAll":"Collapse columns","pivot.table.collapse.ariaExpand":"Pivot-Ergebnis erweitern","pivot.table.collapse.ariaCollapse":"Pivot-Ergebnis reduzieren","pivot.chart.title":"Pivot-Diagramm","pivot.chart.subtitle":"Eine Dimension und bis zu zwei Kennzahlen in einem kompakten Diagramm abbilden.","pivot.chart.subtitleReady":"{dimension} nach {measure}","pivot.chart.emptyNoDimension":"F\xFCgen Sie mindestens ein Zeilen- oder Spaltenfeld hinzu, um das Diagramm anzuzeigen.","pivot.chart.emptyNoValue":"F\xFCgen Sie mindestens ein Wertefeld hinzu, um das Diagramm anzuzeigen.","pivot.chart.emptyNoData":"F\xFCr die aktuelle Diagrammauswahl sind keine Daten verf\xFCgbar.","pivot.chart.dimension":"Dimension","pivot.chart.primaryMeasure":"Kennzahl","pivot.chart.secondaryMeasure":"Vergleichskennzahl","pivot.chart.chartType":"Diagrammtyp","pivot.chart.style.barVertical":"Vertikale Balken","pivot.chart.style.barHorizontal":"Horizontale Balken","pivot.chart.style.line":"Linie","pivot.chart.style.scatter":"Streudiagramm","pivot.chart.collapse.ariaExpand":"Diagrammbereich erweitern","pivot.chart.collapse.ariaCollapse":"Diagrammbereich reduzieren","smartFilter.adaptFilters":"Filter anpassen","smartFilter.addFilters":"Filter hinzuf\xFCgen","smartFilter.go":"Los","smartFilter.visibleFilters":"Sichtbare Filter","smartFilter.searchPlaceholder":"Suchen...","smartFilter.noOptionsFound":"Keine Optionen gefunden","smartFilter.min":"Min","smartFilter.max":"Max","smartFilter.minMaxPlaceholder":"Min - Max","smartFilter.operator.equals":"Gleich","smartFilter.operator.contains":"Enth\xE4lt","smartFilter.operator.notContains":"Enth\xE4lt nicht","smartFilter.operator.wildcard":"Wildcard-Suche","smartFilter.operator.notEquals":"Ungleich","smartFilter.operator.greaterThan":"Gr\xF6\xDFer als","smartFilter.operator.lessThan":"Kleiner als","smartFilter.operator.greaterOrEqual":"Gr\xF6\xDFer gleich","smartFilter.operator.lessOrEqual":"Kleiner gleich","smartFilter.operator.between":"Zwischen","variant.noOptions":"Keine Optionen","variant.defaultSuffix":"Standard","variant.selectVariant":"Variante w\xE4hlen","variant.saveView":"Ansicht speichern","variant.newVariant":"Neue Variante","variant.viewName":"Ansichtsname","variant.setDefault":"Als Standard setzen","variant.publicAllUsers":"\xD6ffentlich (alle Benutzer)","variant.toast.fetchFailed":"Varianten konnten nicht geladen werden","variant.toast.saveFailed":"Variante konnte nicht gespeichert werden","variant.toast.saveSuccess":"Variante erfolgreich gespeichert","variant.toast.deleteFailed":"Variante konnte nicht gel\xF6scht werden","variant.toast.deleteSuccess":"Variante erfolgreich gel\xF6scht","variant.toast.defaultFailed":"Standardvariante konnte nicht aktualisiert werden","variant.toast.defaultSuccess":"Standardvariante aktualisiert","layout.saveLayout":"Layout speichern","layout.layoutOptions":"Layout-Optionen","layout.selectLayout":"Layout w\xE4hlen","layout.saveCurrentLayout":"Aktuelles Layout speichern...","layout.noSavedLayouts":"Keine gespeicherten Layouts","layout.removeDefault":"Standard entfernen","layout.setAsDefault":"Als Standard setzen","layout.layoutName":"Layoutname","layout.layoutDescription":"Beschreibung","layout.layoutNameHelper":"z. B. Kompaktansicht","layout.warningOverwrite":"Warnung: Vorhandenes Layout wird \xFCberschrieben","layout.useAsDefault":"Als Standardlayout verwenden","layout.publicAllUsers":"\xD6ffentlich (f\xFCr alle sichtbar)","layout.toast.loadFallback":"Layouts konnten nicht vom Backend geladen werden, Wechsel zu lokalem Speicher","layout.toast.saveSuccess":"Layout erfolgreich gespeichert","layout.toast.saveLocalSuccess":"Layout im lokalen Speicher gespeichert","layout.toast.backendUnavailableSavedLocal":"Backend nicht verf\xFCgbar, lokal gespeichert","layout.toast.deleteSuccess":"Layout erfolgreich gel\xF6scht","layout.toast.deleteLocalSuccess":"Layout aus lokalem Speicher gel\xF6scht","layout.toast.backendUnavailableDeletedLocal":"Backend nicht verf\xFCgbar, lokal gel\xF6scht","layout.toast.defaultSuccess":"Standardlayout gesetzt","layout.toast.defaultLocalSuccess":"Standardlayout lokal gesetzt","layout.toast.backendUnavailableDefaultLocal":"Backend nicht verf\xFCgbar, Standard lokal gespeichert","dateRange.label":"Datumsbereich","dateRange.startDate":"Startdatum","dateRange.endDate":"Enddatum","dateRange.select":"Ausw\xE4hlen...","dateRange.today":"Heute","dateRange.thisWeek":"Diese Woche","dateRange.thisMonth":"Diesen Monat","graph.records":"{count} Datens\xE4tze","graph.kpi.totalRecords":"Gesamt Datens\xE4tze","graph.kpi.totalReport":"Gesamt Report","graph.kpi.totalBillable":"Gesamt abrechenbar","graph.kpi.efficiency":"Effizienz","graph.kpi.amount":"Betrag","graph.kpi.flagged":"Markiert","graph.chart.billable.title":"Abrechenbar nach Dimension","graph.chart.billable.subtitle":"Top-Werte nach abrechenbaren Stunden","graph.chart.efficiency.title":"Effizienz pro Person","graph.chart.efficiency.subtitle":"Niedrigste Effizienz zuerst","graph.chart.status.title":"Statusverteilung","graph.chart.status.subtitle":"Anteil je Status","graph.dataBody":"Datentabelle","graph.reportTitle":"Grafikbericht","graph.unassigned":"Nicht zugewiesen","graph.column.reportHours":"Melde-Stunden","graph.column.billableHours":"Abrechenbare Stunden","detail.searchAi.placeholder":"Felder suchen, oder bei keinem Treffer die KI fragen...","detail.searchAi.matches":"{count} Treffer gefunden","detail.searchAi.noMatch":"Kein passendes Feld gefunden.","detail.searchAi.autoAiFallback":"Keine direkte \xDCbereinstimmung. KI-Analyse wird gestartet...","detail.searchAi.aiResultTitle":"KI-Ergebnis","detail.table.title":"Verkn\xFCpfte Eintr\xE4ge","kanban.empty":"Karten hier ablegen","kanban.bucket.limit":"Limit","kanban.bucket.dropHere":"Loslassen, um in diese Spalte zu verschieben","kanban.bucket.add":"Spalte hinzuf\xFCgen","kanban.bucket.rename":"Spalte umbenennen","kanban.bucket.saveRename":"Spaltennamen speichern","kanban.bucket.cancelRename":"Umbenennen abbrechen","kanban.search.placeholder":"Karten und Spalten durchsuchen","kanban.search.clear":"Suche l\xF6schen","kanban.search.results":"{count} passende Karten","kanban.search.noMatch":"Keine passenden Karten","kanban.card.progress":"Fortschritt","kanban.card.openDetail":"Detail \xF6ffnen","kanban.priority.critical":"Kritisch","kanban.priority.high":"Hoch","kanban.priority.medium":"Mittel","kanban.priority.low":"Niedrig","quickCreate.newItem":"Neuer Eintrag","quickCreate.createWithTitle":"{title} erstellen","quickEdit.editWithTitle":"{title} bearbeiten","quickDelete.confirmTitle":"L\xF6schen best\xE4tigen","quickDelete.confirmMessageSingle":"M\xF6chten Sie den ausgew\xE4hlten Datensatz wirklich l\xF6schen?","quickDelete.confirmMessageMultiple":"M\xF6chten Sie die {count} ausgew\xE4hlten Datens\xE4tze wirklich l\xF6schen?","cardPage.viewDetails":"Details anzeigen","cardPage.download":"Herunterladen","cardPage.close":"Schlie\xDFen","cardPage.empty":"Keine Eintr\xE4ge gefunden","messageBox.confirm":"OK","messageBox.cancel":"Abbrechen","omph.status.idle":"Inaktiv","omph.status.pending":"Ausstehend","omph.status.running":"L\xE4uft","omph.status.success":"Erfolgt","omph.status.error":"Fehler","omph.working":"In Arbeit","omph.workingFor":"In Arbeit seit {duration}","omph.loadOlder":"Fr\xFChere Nachrichten laden","omph.loadingOlder":"Fr\xFChere Nachrichten werden geladen\u2026","omph.toBottom":"Nach unten","omph.copy":"Kopieren","omph.copied":"Kopiert","omph.turnActions":"Antwortaktionen","omph.usage":"Nutzung","omph.inputTokens":"Eingabe","omph.outputTokens":"Ausgabe","omph.duration":"Dauer","omph.send":"Senden","omph.stop":"Stoppen","omph.turnRail":"Runden","omph.secondUnit":"s","omph.minuteUnit":"min","omph.preview.title":"Dateivorschau","omph.preview.close":"Vorschau schlie\xDFen","omph.preview.back":"Zur\xFCck zur Konversation","omph.preview.expand":"Vorschau vergr\xF6\xDFern","omph.preview.collapse":"Vorschau wiederherstellen","omph.preview.copyContent":"Inhalt kopieren","omph.preview.copyPath":"Pfad kopieren","omph.preview.download":"Herunterladen","omph.preview.openExternal":"Extern \xF6ffnen","omph.preview.wrap":"Zeilenumbruch","omph.preview.loading":"Datei wird geladen","omph.preview.missing":"Datei nicht gefunden","omph.preview.failed":"Datei konnte nicht geladen werden","omph.preview.unsupported":"Keine Vorschau f\xFCr diesen Dateityp","omph.preview.retry":"Erneut versuchen","omph.preview.resize":"Vorschaugr\xF6\xDFe \xE4ndern","omph.preview.line":"Zeile {start}","omph.preview.lines":"Zeilen {start}\u2013{end}","omph.preview.truncated":"Die ersten {shown} von {total} Zeilen werden angezeigt","omph.preview.imageFailed":"Bild konnte nicht angezeigt werden","omph.preview.zoomIn":"Vergr\xF6\xDFern","omph.preview.zoomOut":"Verkleinern","omph.preview.zoomFit":"An Breite anpassen","omph.newConversation":"Neue Konversation","omph.conversationList":"Konversationsliste","omph.conversations":"Konversationen","omph.noConversations":"Noch keine Konversationen","omph.approval.waiting":"Auf Genehmigung wartend","omph.approval.choose":"Aktion w\xE4hlen","omph.approval.details":"Genehmigungsdetails","omph.approval.choices":"Aktionen","omph.approval.reject":"Ablehnen","omph.approval.allowOnce":"Einmal erlauben","omph.approval.confirm":"Fortfahren","omph.approval.other":"Sonstiges","omph.approval.otherPlaceholder":"Aktion beschreiben","omph.approval.escalation":"Tool {toolName} fordert privilegierte Ausf\xFChrung","omph.input.placeholder":"Nachricht eingeben\u2026","omph.input.upload":"Datei hochladen","omph.input.send":"Nachricht senden","omph.input.stop":"Generierung stoppen","omph.input.message":"Nachrichteneingabe","omph.input.tools":"Eingabewerkzeuge","agentui.html.defaultTitle":"Interaktives HTML","agentui.html.open":"\xD6ffnen","agentui.html.preview":"Vorschau","agentui.html.code":"Code","agentui.html.toggle":"Zwischen Code und Vorschau wechseln","agentui.html.copy":"Code kopieren","agentui.html.copied":"Kopiert","agentui.html.download":"Herunterladen","agentui.html.close":"Schlie\xDFen"},kh={"common.cancel":"\u30AD\u30E3\u30F3\u30BB\u30EB","common.save":"\u4FDD\u5B58","common.ok":"OK","common.done":"\u5B8C\u4E86","common.search":"\u691C\u7D22","common.none":"\u306A\u3057","common.all":"\u3059\u3079\u3066","common.noData":"\u30C7\u30FC\u30BF\u306A\u3057","common.copy":"\u30B3\u30D4\u30FC","common.delete":"\u524A\u9664","common.loading":"\u8AAD\u307F\u8FBC\u307F\u4E2D...","header.searchPlaceholder":"\u4F55\u304B\u805E\u3044\u3066\u304F\u3060\u3055\u3044...","header.searchAddFeature":"\u6A5F\u80FD\u3092\u8FFD\u52A0","header.searchStartVoice":"\u97F3\u58F0\u5165\u529B\u3092\u958B\u59CB","header.searchStopVoice":"\u97F3\u58F0\u5165\u529B\u3092\u505C\u6B62","header.searchOpenPanel":"\u4F1A\u8A71\u3092\u958B\u304F","header.theme.system":"\u30C6\u30FC\u30DE\uFF1A\u30B7\u30B9\u30C6\u30E0","header.theme.dark":"\u30C6\u30FC\u30DE\uFF1A\u30C0\u30FC\u30AF","header.theme.light":"\u30C6\u30FC\u30DE\uFF1A\u30E9\u30A4\u30C8","header.menu.setting":"\u8A2D\u5B9A","header.menu.refresh":"\u518D\u8AAD\u307F\u8FBC\u307F","header.menu.logout":"\u30ED\u30B0\u30A2\u30A6\u30C8","navigation.expand":"\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u3092\u5C55\u958B","navigation.collapse":"\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u3092\u6298\u308A\u305F\u305F\u3080","navigation.searchPlaceholder":"\u30E1\u30CB\u30E5\u30FC\u3092\u691C\u7D22...","navigation.noMatch":"\u4E00\u81F4\u3059\u308B\u30E1\u30CB\u30E5\u30FC\u304C\u3042\u308A\u307E\u305B\u3093","navigation.noAccessibleApp":"\u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u306A\u30A2\u30D7\u30EA\u304C\u3042\u308A\u307E\u305B\u3093","navigation.noItems":"\u8868\u793A\u3067\u304D\u308B\u9805\u76EE\u304C\u3042\u308A\u307E\u305B\u3093","navigation.expandView":"{title} \u3092\u5C55\u958B","navigation.mode.switchToFixed":"\u56FA\u5B9A\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u306B\u5207\u308A\u66FF\u3048","navigation.mode.switchToFloating":"\u30D5\u30ED\u30FC\u30C6\u30A3\u30F3\u30B0\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u306B\u5207\u308A\u66FF\u3048","navigation.pinned":"\u30D4\u30F3\u7559\u3081","navigation.pin.add":"\u4E0A\u90E8\u306B\u30D4\u30F3\u7559\u3081","navigation.pin.remove":"\u30D4\u30F3\u7559\u3081\u3092\u89E3\u9664","table.toolbar.searchPlaceholder":"\u691C\u7D22...","table.title.default":"\u30C7\u30FC\u30BF\u30C6\u30FC\u30D6\u30EB","table.toolbar.groupBy":"\u30B0\u30EB\u30FC\u30D7\u5316","table.toolbar.summary":"\u96C6\u8A08","table.toolbar.columns":"\u5217","table.toolbar.export":"\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8","table.toolbar.itemsPerPage":"1\u30DA\u30FC\u30B8\u306E\u4EF6\u6570\uFF1A","table.toolbar.pageOf":"{current} / {total} \u30DA\u30FC\u30B8","table.toolbar.newItem":"\u65B0\u898F\u4F5C\u6210","table.toolbar.editItem":"\u7DE8\u96C6","table.toolbar.deleteItem":"\u524A\u9664","table.toolbar.graphicReport":"\u30B0\u30E9\u30D5\u30A3\u30C3\u30AF\u30EC\u30DD\u30FC\u30C8","table.toolbar.saveLayout":"\u30EC\u30A4\u30A2\u30A6\u30C8\u4FDD\u5B58","table.menu.groupBy":"\u30B0\u30EB\u30FC\u30D7\u5316","table.menu.clearAll":"\u3059\u3079\u3066\u30AF\u30EA\u30A2","table.menu.visibleColumns":"\u8868\u793A\u5217","table.menu.showSummaryRow":"\u96C6\u8A08\u884C\u3092\u8868\u793A","table.menu.noNumericColumns":"\u6570\u5024\u5217\u304C\u3042\u308A\u307E\u305B\u3093","table.group.expandAll":"\u3059\u3079\u3066\u306E\u30B0\u30EB\u30FC\u30D7\u3092\u5C55\u958B","table.group.collapseAll":"\u3059\u3079\u3066\u306E\u30B0\u30EB\u30FC\u30D7\u3092\u6298\u308A\u305F\u305F\u3080","table.mobile.notImplemented":"\u30E2\u30D0\u30A4\u30EB\u8868\u793A\u306F\u672A\u5B9F\u88C5\u3067\u3059","table.headerMenu.sortAsc":"\u6607\u9806\u3067\u4E26\u3079\u66FF\u3048","table.headerMenu.sortDesc":"\u964D\u9806\u3067\u4E26\u3079\u66FF\u3048","table.headerMenu.clearSort":"\u4E26\u3079\u66FF\u3048\u3092\u89E3\u9664","table.headerMenu.configureSort":"\u4E26\u3079\u66FF\u3048\u3092\u8A2D\u5B9A...","table.headerMenu.group":"\u3053\u306E\u5217\u3067\u30B0\u30EB\u30FC\u30D7\u5316","table.headerMenu.ungroup":"\u30B0\u30EB\u30FC\u30D7\u304B\u3089\u5916\u3059","table.headerMenu.addSummary":"\u96C6\u8A08\u306B\u8FFD\u52A0","table.headerMenu.removeSummary":"\u96C6\u8A08\u304B\u3089\u524A\u9664","table.headerMenu.hideColumn":"\u5217\u3092\u975E\u8868\u793A","table.sortDialog.title":"\u4E26\u3079\u66FF\u3048\u8A2D\u5B9A","table.sortDialog.empty":"\u4E26\u3079\u66FF\u3048\u30EB\u30FC\u30EB\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002","table.sortDialog.addRule":"\u30EB\u30FC\u30EB\u3092\u8FFD\u52A0","table.sortDialog.clearAll":"\u3059\u3079\u3066\u30AF\u30EA\u30A2","table.sortDialog.asc":"\u6607\u9806","table.sortDialog.desc":"\u964D\u9806","pivot.title.default":"\u30D4\u30DC\u30C3\u30C8\u30C6\u30FC\u30D6\u30EB","pivot.subtitle.default":"\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u30D4\u30DC\u30C3\u30C8\u30C6\u30FC\u30D6\u30EB\u3092\u8A2D\u5B9A\u3057\u307E\u3059\u3002","pivot.empty":"\u7D50\u679C\u3092\u8868\u793A\u3059\u308B\u306B\u306F\u3001\u5024\u30A8\u30EA\u30A2\u306B\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002","pivot.records":"\u30EC\u30B3\u30FC\u30C9","pivot.afterFilter":"\u30D5\u30A3\u30EB\u30BF\u30FC\u5F8C","pivot.grandTotal":"\u7DCF\u8A08","pivot.resultLabel":"\u7D50\u679C","pivot.valueLabel":"\u5024","pivot.table.dimensions":"\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3","pivot.config.title":"\u8A2D\u5B9A","pivot.fieldList":"\u30D5\u30A3\u30FC\u30EB\u30C9\u4E00\u89A7","pivot.availableDimensions":"\u5229\u7528\u53EF\u80FD\u306A\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3","pivot.allFieldsInUse":"\u3059\u3079\u3066\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u304C\u4F7F\u7528\u4E2D\u3067\u3059\u3002","pivot.zone.rows":"\u884C","pivot.zone.columns":"\u5217","pivot.zone.filters":"\u30D5\u30A3\u30EB\u30BF\u30FC","pivot.zone.values":"\u5024","pivot.hint.rows":"\u3053\u3053\u306B\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u884C\u968E\u5C64\u3092\u4F5C\u6210","pivot.hint.columns":"\u3053\u3053\u306B\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u5217\u968E\u5C64\u3092\u4F5C\u6210","pivot.hint.filters":"\u3053\u3053\u306B\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u30EC\u30DD\u30FC\u30C8\u30D5\u30A3\u30EB\u30BF\u30FC\u3092\u8A2D\u5B9A","pivot.hint.values":"\u3053\u3053\u306B\u6570\u5024\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u96C6\u8A08","pivot.clearArea":"\u30A8\u30EA\u30A2\u3092\u30AF\u30EA\u30A2","pivot.filter.na":"N/A","pivot.filter.noValues":"\u5024\u304C\u3042\u308A\u307E\u305B\u3093","pivot.filter.noneSelected":"\u672A\u9078\u629E","pivot.filter.allValues":"\u3059\u3079\u3066\u306E\u5024","pivot.filter.selectedCount":"{selected} / {total} \u3092\u9078\u629E","pivot.filter.selectAll":"\u3059\u3079\u3066\u9078\u629E","pivot.filter.deselectAll":"\u3059\u3079\u3066\u89E3\u9664","pivot.filter.noResults":"\u7D50\u679C\u304C\u3042\u308A\u307E\u305B\u3093","pivot.collapse.ariaExpand":"\u8A2D\u5B9A\u30A8\u30EA\u30A2\u3092\u5C55\u958B","pivot.collapse.ariaCollapse":"\u8A2D\u5B9A\u30A8\u30EA\u30A2\u3092\u6298\u308A\u305F\u305F\u3080","pivot.agg.sum":"\u5408\u8A08","pivot.agg.count":"\u4EF6\u6570","pivot.agg.avg":"\u5E73\u5747","pivot.agg.min":"\u6700\u5C0F","pivot.agg.max":"\u6700\u5927","pivot.preset.selectPlaceholder":"\u30D7\u30EA\u30BB\u30C3\u30C8\u3092\u9078\u629E","pivot.preset.save":"\u30D7\u30EA\u30BB\u30C3\u30C8\u3092\u4FDD\u5B58","pivot.preset.delete":"\u30D7\u30EA\u30BB\u30C3\u30C8\u3092\u524A\u9664","pivot.preset.saveDialogTitle":"\u73FE\u5728\u306E\u30D7\u30EA\u30BB\u30C3\u30C8\u3092\u4FDD\u5B58","pivot.preset.nameLabel":"\u30D7\u30EA\u30BB\u30C3\u30C8\u540D","pivot.preset.defaultName":"\u30D7\u30EA\u30BB\u30C3\u30C8 {index}","pivot.table.sectionTitle":"\u30D4\u30DC\u30C3\u30C8\u7D50\u679C","pivot.table.expandRowsAll":"Expand rows","pivot.table.collapseRowsAll":"Collapse rows","pivot.table.expandColumnsAll":"Expand columns","pivot.table.collapseColumnsAll":"Collapse columns","pivot.table.collapse.ariaExpand":"\u30D4\u30DC\u30C3\u30C8\u7D50\u679C\u3092\u5C55\u958B","pivot.table.collapse.ariaCollapse":"\u30D4\u30DC\u30C3\u30C8\u7D50\u679C\u3092\u6298\u308A\u305F\u305F\u3080","pivot.chart.title":"\u30D4\u30DC\u30C3\u30C8\u30C1\u30E3\u30FC\u30C8","pivot.chart.subtitle":"1\u3064\u306E\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3\u3068\u6700\u59272\u3064\u306E\u6307\u6A19\u3092\u30B3\u30F3\u30D1\u30AF\u30C8\u306A\u30C1\u30E3\u30FC\u30C8\u306B\u307E\u3068\u3081\u307E\u3059\u3002","pivot.chart.subtitleReady":"{dimension} \u3054\u3068\u306E {measure}","pivot.chart.emptyNoDimension":"\u30C1\u30E3\u30FC\u30C8\u3092\u8868\u793A\u3059\u308B\u306B\u306F\u3001\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u884C\u307E\u305F\u306F\u5217\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002","pivot.chart.emptyNoValue":"\u30C1\u30E3\u30FC\u30C8\u3092\u8868\u793A\u3059\u308B\u306B\u306F\u3001\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u5024\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002","pivot.chart.emptyNoData":"\u73FE\u5728\u306E\u30C1\u30E3\u30FC\u30C8\u9078\u629E\u3067\u306F\u8868\u793A\u3067\u304D\u308B\u30C7\u30FC\u30BF\u304C\u3042\u308A\u307E\u305B\u3093\u3002","pivot.chart.dimension":"\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3","pivot.chart.primaryMeasure":"\u6307\u6A19","pivot.chart.secondaryMeasure":"\u6BD4\u8F03\u6307\u6A19","pivot.chart.chartType":"\u30C1\u30E3\u30FC\u30C8\u7A2E\u5225","pivot.chart.style.barVertical":"\u7E26\u68D2\u30B0\u30E9\u30D5","pivot.chart.style.barHorizontal":"\u6A2A\u68D2\u30B0\u30E9\u30D5","pivot.chart.style.line":"\u6298\u308C\u7DDA\u30B0\u30E9\u30D5","pivot.chart.style.scatter":"\u6563\u5E03\u56F3","pivot.chart.collapse.ariaExpand":"\u30C1\u30E3\u30FC\u30C8\u9818\u57DF\u3092\u5C55\u958B","pivot.chart.collapse.ariaCollapse":"\u30C1\u30E3\u30FC\u30C8\u9818\u57DF\u3092\u6298\u308A\u305F\u305F\u3080","smartFilter.adaptFilters":"\u30D5\u30A3\u30EB\u30BF\u30FC\u8ABF\u6574","smartFilter.addFilters":"\u30D5\u30A3\u30EB\u30BF\u30FC\u8FFD\u52A0","smartFilter.go":"\u5B9F\u884C","smartFilter.visibleFilters":"\u8868\u793A\u30D5\u30A3\u30EB\u30BF\u30FC","smartFilter.searchPlaceholder":"\u691C\u7D22...","smartFilter.noOptionsFound":"\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093","smartFilter.min":"\u6700\u5C0F","smartFilter.max":"\u6700\u5927","smartFilter.minMaxPlaceholder":"\u6700\u5C0F - \u6700\u5927","smartFilter.operator.equals":"\u7B49\u3057\u3044","smartFilter.operator.contains":"\u542B\u3080","smartFilter.operator.notContains":"\u542B\u307E\u306A\u3044","smartFilter.operator.wildcard":"\u30EF\u30A4\u30EB\u30C9\u30AB\u30FC\u30C9\u691C\u7D22","smartFilter.operator.notEquals":"\u7B49\u3057\u304F\u306A\u3044","smartFilter.operator.greaterThan":"\u3088\u308A\u5927\u304D\u3044","smartFilter.operator.lessThan":"\u3088\u308A\u5C0F\u3055\u3044","smartFilter.operator.greaterOrEqual":"\u4EE5\u4E0A","smartFilter.operator.lessOrEqual":"\u4EE5\u4E0B","smartFilter.operator.between":"\u7BC4\u56F2","variant.noOptions":"\u30AA\u30D7\u30B7\u30E7\u30F3\u306A\u3057","variant.defaultSuffix":"\u30C7\u30D5\u30A9\u30EB\u30C8","variant.selectVariant":"\u30D3\u30E5\u30FC\u3092\u9078\u629E","variant.saveView":"\u30D3\u30E5\u30FC\u4FDD\u5B58","variant.newVariant":"\u65B0\u3057\u3044\u30D3\u30E5\u30FC","variant.viewName":"\u30D3\u30E5\u30FC\u540D","variant.setDefault":"\u30C7\u30D5\u30A9\u30EB\u30C8\u306B\u8A2D\u5B9A","variant.publicAllUsers":"\u516C\u958B\uFF08\u5168\u30E6\u30FC\u30B6\u30FC\uFF09","variant.toast.fetchFailed":"\u30D3\u30E5\u30FC\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F","variant.toast.saveFailed":"\u30D3\u30E5\u30FC\u306E\u4FDD\u5B58\u306B\u5931\u6557\u3057\u307E\u3057\u305F","variant.toast.saveSuccess":"\u30D3\u30E5\u30FC\u3092\u4FDD\u5B58\u3057\u307E\u3057\u305F","variant.toast.deleteFailed":"\u30D3\u30E5\u30FC\u306E\u524A\u9664\u306B\u5931\u6557\u3057\u307E\u3057\u305F","variant.toast.deleteSuccess":"\u30D3\u30E5\u30FC\u3092\u524A\u9664\u3057\u307E\u3057\u305F","variant.toast.defaultFailed":"\u30C7\u30D5\u30A9\u30EB\u30C8\u30D3\u30E5\u30FC\u306E\u66F4\u65B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F","variant.toast.defaultSuccess":"\u30C7\u30D5\u30A9\u30EB\u30C8\u30D3\u30E5\u30FC\u3092\u66F4\u65B0\u3057\u307E\u3057\u305F","layout.saveLayout":"\u30EC\u30A4\u30A2\u30A6\u30C8\u4FDD\u5B58","layout.layoutOptions":"\u30EC\u30A4\u30A2\u30A6\u30C8\u30AA\u30D7\u30B7\u30E7\u30F3","layout.selectLayout":"\u30EC\u30A4\u30A2\u30A6\u30C8\u9078\u629E","layout.saveCurrentLayout":"\u73FE\u5728\u306E\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u4FDD\u5B58...","layout.noSavedLayouts":"\u4FDD\u5B58\u6E08\u307F\u30EC\u30A4\u30A2\u30A6\u30C8\u306A\u3057","layout.removeDefault":"\u30C7\u30D5\u30A9\u30EB\u30C8\u89E3\u9664","layout.setAsDefault":"\u30C7\u30D5\u30A9\u30EB\u30C8\u306B\u8A2D\u5B9A","layout.layoutName":"\u30EC\u30A4\u30A2\u30A6\u30C8\u540D","layout.layoutDescription":"\u8AAC\u660E","layout.layoutNameHelper":"\u4F8B\uFF1A\u30B3\u30F3\u30D1\u30AF\u30C8\u8868\u793A","layout.warningOverwrite":"\u8B66\u544A\uFF1A\u65E2\u5B58\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u4E0A\u66F8\u304D\u3057\u307E\u3059","layout.useAsDefault":"\u30C7\u30D5\u30A9\u30EB\u30C8\u30EC\u30A4\u30A2\u30A6\u30C8\u3068\u3057\u3066\u4F7F\u7528","layout.publicAllUsers":"\u516C\u958B\uFF08\u5168\u30E6\u30FC\u30B6\u30FC\u306B\u8868\u793A\uFF09","layout.toast.loadFallback":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9\u304B\u3089\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u3001\u30ED\u30FC\u30AB\u30EB\u4FDD\u5B58\u306B\u5207\u308A\u66FF\u3048\u307E\u3057\u305F","layout.toast.saveSuccess":"\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u4FDD\u5B58\u3057\u307E\u3057\u305F","layout.toast.saveLocalSuccess":"\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u30ED\u30FC\u30AB\u30EB\u4FDD\u5B58\u3057\u307E\u3057\u305F","layout.toast.backendUnavailableSavedLocal":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9\u672A\u63A5\u7D9A\u306E\u305F\u3081\u30ED\u30FC\u30AB\u30EB\u306B\u4FDD\u5B58\u3057\u307E\u3057\u305F","layout.toast.deleteSuccess":"\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u524A\u9664\u3057\u307E\u3057\u305F","layout.toast.deleteLocalSuccess":"\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u30ED\u30FC\u30AB\u30EB\u304B\u3089\u524A\u9664\u3057\u307E\u3057\u305F","layout.toast.backendUnavailableDeletedLocal":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9\u672A\u63A5\u7D9A\u306E\u305F\u3081\u30ED\u30FC\u30AB\u30EB\u304B\u3089\u524A\u9664\u3057\u307E\u3057\u305F","layout.toast.defaultSuccess":"\u30C7\u30D5\u30A9\u30EB\u30C8\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u8A2D\u5B9A\u3057\u307E\u3057\u305F","layout.toast.defaultLocalSuccess":"\u30C7\u30D5\u30A9\u30EB\u30C8\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u30ED\u30FC\u30AB\u30EB\u306B\u8A2D\u5B9A\u3057\u307E\u3057\u305F","layout.toast.backendUnavailableDefaultLocal":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9\u672A\u63A5\u7D9A\u306E\u305F\u3081\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u30ED\u30FC\u30AB\u30EB\u4FDD\u5B58\u3057\u307E\u3057\u305F","dateRange.label":"\u65E5\u4ED8\u7BC4\u56F2","dateRange.startDate":"\u958B\u59CB\u65E5","dateRange.endDate":"\u7D42\u4E86\u65E5","dateRange.select":"\u9078\u629E...","dateRange.today":"\u4ECA\u65E5","dateRange.thisWeek":"\u4ECA\u9031","dateRange.thisMonth":"\u4ECA\u6708","graph.records":"{count} \u4EF6","graph.kpi.totalRecords":"\u7DCF\u30EC\u30B3\u30FC\u30C9","graph.kpi.totalReport":"\u7DCF\u5831\u544A\u6642\u9593","graph.kpi.totalBillable":"\u7DCF\u8ACB\u6C42\u53EF\u80FD\u6642\u9593","graph.kpi.efficiency":"\u52B9\u7387","graph.kpi.amount":"\u91D1\u984D","graph.kpi.flagged":"\u8981\u78BA\u8A8D","graph.chart.billable.title":"\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3\u5225\u8ACB\u6C42\u53EF\u80FD\u6642\u9593","graph.chart.billable.subtitle":"\u8ACB\u6C42\u53EF\u80FD\u6642\u9593\u306E\u4E0A\u4F4D","graph.chart.efficiency.title":"\u62C5\u5F53\u8005\u5225\u52B9\u7387","graph.chart.efficiency.subtitle":"\u52B9\u7387\u306E\u4F4E\u3044\u9806","graph.chart.status.title":"\u30B9\u30C6\u30FC\u30BF\u30B9\u5206\u5E03","graph.chart.status.subtitle":"\u30B9\u30C6\u30FC\u30BF\u30B9\u5225\u6BD4\u7387","graph.dataBody":"\u30C7\u30FC\u30BF\u672C\u4F53","graph.reportTitle":"\u30B0\u30E9\u30D5\u30A3\u30C3\u30AF\u30EC\u30DD\u30FC\u30C8","graph.unassigned":"\u672A\u5272\u308A\u5F53\u3066","graph.column.reportHours":"\u5831\u544A\u6642\u9593","graph.column.billableHours":"\u8ACB\u6C42\u53EF\u80FD\u6642\u9593","detail.searchAi.placeholder":"\u9805\u76EE\u3092\u691C\u7D22\u3002\u898B\u3064\u304B\u3089\u306A\u3044\u5834\u5408\u306FAI\u306B\u8CEA\u554F\u3057\u307E\u3059...","detail.searchAi.matches":"{count} \u4EF6\u306E\u4E00\u81F4","detail.searchAi.noMatch":"\u4E00\u81F4\u3059\u308B\u9805\u76EE\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002","detail.searchAi.autoAiFallback":"\u4E00\u81F4\u306A\u3057\u3002AI\u5206\u6790\u3092\u5B9F\u884C\u3057\u307E\u3059...","detail.searchAi.aiResultTitle":"AI\u5206\u6790\u7D50\u679C","detail.table.title":"\u95A2\u9023\u30EC\u30B3\u30FC\u30C9","kanban.empty":"\u3053\u3053\u306B\u30AB\u30FC\u30C9\u3092\u30C9\u30ED\u30C3\u30D7","kanban.bucket.limit":"\u4E0A\u9650","kanban.bucket.dropHere":"\u96E2\u3059\u3068\u3053\u306E bucket \u306B\u79FB\u52D5\u3057\u307E\u3059","kanban.bucket.add":"bucket \u3092\u8FFD\u52A0","kanban.bucket.rename":"bucket \u540D\u3092\u5909\u66F4","kanban.bucket.saveRename":"bucket \u540D\u3092\u4FDD\u5B58","kanban.bucket.cancelRename":"\u540D\u524D\u5909\u66F4\u3092\u30AD\u30E3\u30F3\u30BB\u30EB","kanban.search.placeholder":"\u30AB\u30FC\u30C9\u3068 bucket \u3092\u691C\u7D22","kanban.search.clear":"\u691C\u7D22\u3092\u30AF\u30EA\u30A2","kanban.search.results":"{count} \u4EF6\u306E\u30AB\u30FC\u30C9\u304C\u4E00\u81F4","kanban.search.noMatch":"\u4E00\u81F4\u3059\u308B\u30AB\u30FC\u30C9\u306F\u3042\u308A\u307E\u305B\u3093","kanban.card.progress":"\u9032\u6357","kanban.card.openDetail":"\u8A73\u7D30\u3092\u958B\u304F","kanban.priority.critical":"\u7DCA\u6025","kanban.priority.high":"\u9AD8","kanban.priority.medium":"\u4E2D","kanban.priority.low":"\u4F4E","quickCreate.newItem":"\u65B0\u898F\u4F5C\u6210","quickCreate.createWithTitle":"{title} \u3092\u4F5C\u6210","quickEdit.editWithTitle":"{title} \u3092\u7DE8\u96C6","quickDelete.confirmTitle":"\u524A\u9664\u306E\u78BA\u8A8D","quickDelete.confirmMessageSingle":"\u9078\u629E\u3057\u305F\u30EC\u30B3\u30FC\u30C9\u3092\u524A\u9664\u3057\u3066\u3082\u3088\u308D\u3057\u3044\u3067\u3059\u304B\uFF1F","quickDelete.confirmMessageMultiple":"\u9078\u629E\u3057\u305F {count} \u4EF6\u306E\u30EC\u30B3\u30FC\u30C9\u3092\u524A\u9664\u3057\u3066\u3082\u3088\u308D\u3057\u3044\u3067\u3059\u304B\uFF1F","cardPage.viewDetails":"\u8A73\u7D30\u3092\u8868\u793A","cardPage.download":"\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9","cardPage.close":"\u9589\u3058\u308B","cardPage.empty":"\u9805\u76EE\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093","messageBox.confirm":"OK","messageBox.cancel":"\u30AD\u30E3\u30F3\u30BB\u30EB","omph.status.idle":"\u5F85\u6A5F\u4E2D","omph.status.pending":"\u51E6\u7406\u5F85\u3061","omph.status.running":"\u51E6\u7406\u4E2D","omph.status.success":"\u5B8C\u4E86","omph.status.error":"\u30A8\u30E9\u30FC","omph.working":"\u51E6\u7406\u4E2D","omph.workingFor":"\u51E6\u7406\u4E2D\uFF08{duration} \u7D4C\u904E\uFF09","omph.loadOlder":"\u904E\u53BB\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8AAD\u307F\u8FBC\u3080","omph.loadingOlder":"\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026","omph.toBottom":"\u4E00\u756A\u4E0B\u3078","omph.copy":"\u30B3\u30D4\u30FC","omph.copied":"\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F","omph.turnActions":"\u8FD4\u4FE1\u30A2\u30AF\u30B7\u30E7\u30F3","omph.usage":"\u4F7F\u7528\u91CF","omph.inputTokens":"\u5165\u529B","omph.outputTokens":"\u51FA\u529B","omph.duration":"\u6240\u8981\u6642\u9593","omph.send":"\u9001\u4FE1","omph.stop":"\u505C\u6B62","omph.turnRail":"\u30BF\u30FC\u30F3","omph.secondUnit":"\u79D2","omph.minuteUnit":"\u5206","omph.preview.title":"\u30D5\u30A1\u30A4\u30EB\u30D7\u30EC\u30D3\u30E5\u30FC","omph.preview.close":"\u30D7\u30EC\u30D3\u30E5\u30FC\u3092\u9589\u3058\u308B","omph.preview.back":"\u4F1A\u8A71\u306B\u623B\u308B","omph.preview.expand":"\u30D7\u30EC\u30D3\u30E5\u30FC\u3092\u62E1\u5927","omph.preview.collapse":"\u30D7\u30EC\u30D3\u30E5\u30FC\u306E\u30B5\u30A4\u30BA\u3092\u623B\u3059","omph.preview.copyContent":"\u5185\u5BB9\u3092\u30B3\u30D4\u30FC","omph.preview.copyPath":"\u30D1\u30B9\u3092\u30B3\u30D4\u30FC","omph.preview.download":"\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9","omph.preview.openExternal":"\u5916\u90E8\u3067\u958B\u304F","omph.preview.wrap":"\u6298\u308A\u8FD4\u3057","omph.preview.loading":"\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D","omph.preview.missing":"\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093","omph.preview.failed":"\u3053\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F","omph.preview.unsupported":"\u3053\u306E\u30D5\u30A1\u30A4\u30EB\u5F62\u5F0F\u306F\u30D7\u30EC\u30D3\u30E5\u30FC\u3067\u304D\u307E\u305B\u3093","omph.preview.retry":"\u518D\u8A66\u884C","omph.preview.resize":"\u30D7\u30EC\u30D3\u30E5\u30FC\u30B5\u30A4\u30BA\u306E\u5909\u66F4","omph.preview.line":"{start} \u884C\u76EE","omph.preview.lines":"{start}\u2013{end} \u884C","omph.preview.truncated":"\u5168 {total} \u884C\u4E2D\u5148\u982D {shown} \u884C\u3092\u8868\u793A","omph.preview.imageFailed":"\u753B\u50CF\u3092\u8868\u793A\u3067\u304D\u307E\u305B\u3093","omph.preview.zoomIn":"\u62E1\u5927","omph.preview.zoomOut":"\u7E2E\u5C0F","omph.preview.zoomFit":"\u5E45\u306B\u5408\u308F\u305B\u308B","omph.newConversation":"\u65B0\u3057\u3044\u4F1A\u8A71","omph.conversationList":"\u4F1A\u8A71\u30EA\u30B9\u30C8","omph.conversations":"\u4F1A\u8A71","omph.noConversations":"\u4F1A\u8A71\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093","omph.approval.waiting":"\u627F\u8A8D\u5F85\u3061","omph.approval.choose":"\u64CD\u4F5C\u3092\u9078\u629E","omph.approval.details":"\u627F\u8A8D\u306E\u8A73\u7D30","omph.approval.choices":"\u64CD\u4F5C","omph.approval.reject":"\u62D2\u5426","omph.approval.allowOnce":"\u4ECA\u56DE\u306E\u307F\u8A31\u53EF","omph.approval.confirm":"\u7D9A\u884C","omph.approval.other":"\u305D\u306E\u4ED6","omph.approval.otherPlaceholder":"\u5B9F\u884C\u3059\u308B\u64CD\u4F5C\u3092\u5165\u529B","omph.approval.escalation":"\u30C4\u30FC\u30EB {toolName} \u304C\u7279\u6A29\u5B9F\u884C\u3092\u8981\u6C42\u3057\u3066\u3044\u307E\u3059","omph.input.placeholder":"\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u5165\u529B\u2026","omph.input.upload":"\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9","omph.input.send":"\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u9001\u4FE1","omph.input.stop":"\u751F\u6210\u3092\u505C\u6B62","omph.input.message":"\u30E1\u30C3\u30BB\u30FC\u30B8\u5165\u529B","omph.input.tools":"\u5165\u529B\u30C4\u30FC\u30EB","agentui.html.defaultTitle":"\u30A4\u30F3\u30BF\u30E9\u30AF\u30C6\u30A3\u30D6 HTML","agentui.html.open":"\u958B\u304F","agentui.html.preview":"\u30D7\u30EC\u30D3\u30E5\u30FC","agentui.html.code":"\u30B3\u30FC\u30C9","agentui.html.toggle":"\u30B3\u30FC\u30C9\u3068\u30D7\u30EC\u30D3\u30E5\u30FC\u3092\u5207\u308A\u66FF\u3048\u308B","agentui.html.copy":"\u30B3\u30FC\u30C9\u3092\u30B3\u30D4\u30FC","agentui.html.copied":"\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F","agentui.html.download":"\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9","agentui.html.close":"\u9589\u3058\u308B"},Ph={"common.cancel":"\uCDE8\uC18C","common.save":"\uC800\uC7A5","common.ok":"\uD655\uC778","common.done":"\uC644\uB8CC","common.search":"\uAC80\uC0C9","common.none":"\uC5C6\uC74C","common.all":"\uC804\uCCB4","common.noData":"\uB370\uC774\uD130 \uC5C6\uC74C","common.copy":"\uBCF5\uC0AC","common.delete":"\uC0AD\uC81C","common.loading":"\uB85C\uB529 \uC911...","header.searchPlaceholder":"\uBB34\uC5C7\uC774\uB4E0 \uBB3C\uC5B4\uBCF4\uC138\uC694...","header.searchAddFeature":"\uAE30\uB2A5 \uCD94\uAC00","header.searchStartVoice":"\uC74C\uC131 \uC785\uB825 \uC2DC\uC791","header.searchStopVoice":"\uC74C\uC131 \uC785\uB825 \uC911\uC9C0","header.searchOpenPanel":"\uB300\uD654 \uC5F4\uAE30","header.theme.system":"\uD14C\uB9C8: \uC2DC\uC2A4\uD15C","header.theme.dark":"\uD14C\uB9C8: \uB2E4\uD06C","header.theme.light":"\uD14C\uB9C8: \uB77C\uC774\uD2B8","header.menu.setting":"\uC124\uC815","header.menu.refresh":"\uC0C8\uB85C \uACE0\uCE68","header.menu.logout":"\uB85C\uADF8\uC544\uC6C3","navigation.expand":"\uD0D0\uC0C9 \uD3BC\uCE58\uAE30","navigation.collapse":"\uD0D0\uC0C9 \uC811\uAE30","navigation.searchPlaceholder":"\uBA54\uB274 \uAC80\uC0C9...","navigation.noMatch":"\uC77C\uCE58\uD558\uB294 \uBA54\uB274\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4","navigation.noAccessibleApp":"\uC811\uADFC \uAC00\uB2A5\uD55C \uC571\uC774 \uC5C6\uC2B5\uB2C8\uB2E4","navigation.noItems":"\uD45C\uC2DC\uD560 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4","navigation.expandView":"{title} \uD3BC\uCE58\uAE30","navigation.mode.switchToFixed":"\uACE0\uC815 \uD0D0\uC0C9\uC73C\uB85C \uC804\uD658","navigation.mode.switchToFloating":"\uD50C\uB85C\uD305 \uD0D0\uC0C9\uC73C\uB85C \uC804\uD658","navigation.pinned":"\uACE0\uC815\uB428","navigation.pin.add":"\uC0C1\uB2E8\uC5D0 \uACE0\uC815","navigation.pin.remove":"\uACE0\uC815 \uD574\uC81C","table.toolbar.searchPlaceholder":"\uAC80\uC0C9...","table.title.default":"\uB370\uC774\uD130 \uD14C\uC774\uBE14","table.toolbar.groupBy":"\uADF8\uB8F9","table.toolbar.summary":"\uC694\uC57D","table.toolbar.columns":"\uC5F4","table.toolbar.export":"\uB0B4\uBCF4\uB0B4\uAE30","table.toolbar.itemsPerPage":"\uD398\uC774\uC9C0\uB2F9 \uD589 \uC218:","table.toolbar.pageOf":"{current} / {total} \uD398\uC774\uC9C0","table.toolbar.newItem":"\uC2E0\uADDC \uD56D\uBAA9","table.toolbar.editItem":"\uD56D\uBAA9 \uC218\uC815","table.toolbar.deleteItem":"\uD56D\uBAA9 \uC0AD\uC81C","table.toolbar.graphicReport":"\uADF8\uB798\uD504 \uB9AC\uD3EC\uD2B8","table.toolbar.saveLayout":"\uB808\uC774\uC544\uC6C3 \uC800\uC7A5","table.menu.groupBy":"\uADF8\uB8F9","table.menu.clearAll":"\uBAA8\uB450 \uC9C0\uC6B0\uAE30","table.menu.visibleColumns":"\uD45C\uC2DC \uC5F4","table.menu.showSummaryRow":"\uC694\uC57D \uD589 \uD45C\uC2DC","table.menu.noNumericColumns":"\uC22B\uC790 \uC5F4 \uC5C6\uC74C","table.group.expandAll":"\uBAA8\uB4E0 \uADF8\uB8F9 \uD3BC\uCE58\uAE30","table.group.collapseAll":"\uBAA8\uB4E0 \uADF8\uB8F9 \uC811\uAE30","table.mobile.notImplemented":"\uBAA8\uBC14\uC77C \uBDF0\uB294 \uC544\uC9C1 \uAD6C\uD604\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4","table.headerMenu.sortAsc":"\uC624\uB984\uCC28\uC21C \uC815\uB82C","table.headerMenu.sortDesc":"\uB0B4\uB9BC\uCC28\uC21C \uC815\uB82C","table.headerMenu.clearSort":"\uC815\uB82C \uD574\uC81C","table.headerMenu.configureSort":"\uC815\uB82C \uC124\uC815...","table.headerMenu.group":"\uC774 \uC5F4\uB85C \uADF8\uB8F9\uD654","table.headerMenu.ungroup":"\uADF8\uB8F9\uC5D0\uC11C \uC81C\uAC70","table.headerMenu.addSummary":"\uC694\uC57D\uC5D0 \uCD94\uAC00","table.headerMenu.removeSummary":"\uC694\uC57D\uC5D0\uC11C \uC81C\uAC70","table.headerMenu.hideColumn":"\uC5F4 \uC228\uAE30\uAE30","table.sortDialog.title":"\uC815\uB82C \uC124\uC815","table.sortDialog.empty":"\uC815\uB82C \uADDC\uCE59\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. \uCD94\uAC00\uD558\uC138\uC694.","table.sortDialog.addRule":"\uADDC\uCE59 \uCD94\uAC00","table.sortDialog.clearAll":"\uBAA8\uB450 \uC9C0\uC6B0\uAE30","table.sortDialog.asc":"\uC624\uB984\uCC28\uC21C","table.sortDialog.desc":"\uB0B4\uB9BC\uCC28\uC21C","pivot.title.default":"\uD53C\uBC97 \uD14C\uC774\uBE14","pivot.subtitle.default":"\uD544\uB4DC\uB97C \uB4DC\uB798\uADF8\uD558\uC5EC \uD53C\uBC97 \uD14C\uC774\uBE14\uC744 \uAD6C\uC131\uD558\uC138\uC694.","pivot.empty":"\uACB0\uACFC\uB97C \uBCF4\uB824\uBA74 \uAC12 \uC601\uC5ED\uC5D0 \uCD5C\uC18C \uD55C \uAC1C\uC758 \uD544\uB4DC\uB97C \uCD94\uAC00\uD558\uC138\uC694.","pivot.records":"\uB808\uCF54\uB4DC","pivot.afterFilter":"\uD544\uD130 \uD6C4","pivot.grandTotal":"\uCD1D\uD569","pivot.resultLabel":"\uACB0\uACFC","pivot.valueLabel":"\uAC12","pivot.table.dimensions":"\uCC28\uC6D0","pivot.config.title":"\uAD6C\uC131","pivot.fieldList":"\uD544\uB4DC \uBAA9\uB85D","pivot.availableDimensions":"\uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uCC28\uC6D0","pivot.allFieldsInUse":"\uBAA8\uB4E0 \uD544\uB4DC\uAC00 \uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC785\uB2C8\uB2E4.","pivot.zone.rows":"\uD589","pivot.zone.columns":"\uC5F4","pivot.zone.filters":"\uD544\uD130","pivot.zone.values":"\uAC12","pivot.hint.rows":"\uC5EC\uAE30\uC5D0 \uD544\uB4DC\uB97C \uB4DC\uB798\uADF8\uD558\uC5EC \uD589 \uACC4\uCE35\uC744 \uAD6C\uC131","pivot.hint.columns":"\uC5EC\uAE30\uC5D0 \uD544\uB4DC\uB97C \uB4DC\uB798\uADF8\uD558\uC5EC \uC5F4 \uACC4\uCE35\uC744 \uAD6C\uC131","pivot.hint.filters":"\uC5EC\uAE30\uC5D0 \uD544\uB4DC\uB97C \uB4DC\uB798\uADF8\uD558\uC5EC \uBCF4\uACE0\uC11C \uD544\uD130\uB85C \uC0AC\uC6A9","pivot.hint.values":"\uC22B\uC790 \uD544\uB4DC\uB97C \uC5EC\uAE30\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC9D1\uACC4","pivot.clearArea":"\uC601\uC5ED \uBE44\uC6B0\uAE30","pivot.filter.na":"\uD574\uB2F9 \uC5C6\uC74C","pivot.filter.noValues":"\uAC12 \uC5C6\uC74C","pivot.filter.noneSelected":"\uC120\uD0DD \uC5C6\uC74C","pivot.filter.allValues":"\uBAA8\uB4E0 \uAC12","pivot.filter.selectedCount":"{selected} / {total} \uC120\uD0DD\uB428","pivot.filter.selectAll":"\uC804\uCCB4 \uC120\uD0DD","pivot.filter.deselectAll":"\uC804\uCCB4 \uD574\uC81C","pivot.filter.noResults":"\uAC80\uC0C9 \uACB0\uACFC \uC5C6\uC74C","pivot.collapse.ariaExpand":"\uAD6C\uC131 \uC601\uC5ED \uD3BC\uCE58\uAE30","pivot.collapse.ariaCollapse":"\uAD6C\uC131 \uC601\uC5ED \uC811\uAE30","pivot.agg.sum":"\uD569\uACC4","pivot.agg.count":"\uAC1C\uC218","pivot.agg.avg":"\uD3C9\uADE0","pivot.agg.min":"\uCD5C\uC18C","pivot.agg.max":"\uCD5C\uB300","pivot.preset.selectPlaceholder":"\uD504\uB9AC\uC14B \uC120\uD0DD","pivot.preset.save":"\uD504\uB9AC\uC14B \uC800\uC7A5","pivot.preset.delete":"\uD504\uB9AC\uC14B \uC0AD\uC81C","pivot.preset.saveDialogTitle":"\uD604\uC7AC \uD504\uB9AC\uC14B \uC800\uC7A5","pivot.preset.nameLabel":"\uD504\uB9AC\uC14B \uC774\uB984","pivot.preset.defaultName":"\uD504\uB9AC\uC14B {index}","pivot.table.sectionTitle":"\uD53C\uBC97 \uACB0\uACFC","pivot.table.expandRowsAll":"Expand rows","pivot.table.collapseRowsAll":"Collapse rows","pivot.table.expandColumnsAll":"Expand columns","pivot.table.collapseColumnsAll":"Collapse columns","pivot.table.collapse.ariaExpand":"\uD53C\uBC97 \uACB0\uACFC \uD3BC\uCE58\uAE30","pivot.table.collapse.ariaCollapse":"\uD53C\uBC97 \uACB0\uACFC \uC811\uAE30","pivot.chart.title":"\uD53C\uBC97 \uCC28\uD2B8","pivot.chart.subtitle":"\uD558\uB098\uC758 \uCC28\uC6D0\uACFC \uCD5C\uB300 \uB450 \uAC1C\uC758 \uCE21\uC815\uAC12\uC744 \uAC04\uACB0\uD55C \uCC28\uD2B8\uB85C \uD45C\uC2DC\uD569\uB2C8\uB2E4.","pivot.chart.subtitleReady":"{dimension}\uBCC4 {measure}","pivot.chart.emptyNoDimension":"\uCC28\uD2B8\uB97C \uBCF4\uB824\uBA74 \uCD5C\uC18C \uD55C \uAC1C\uC758 \uD589 \uB610\uB294 \uC5F4 \uD544\uB4DC\uB97C \uCD94\uAC00\uD558\uC138\uC694.","pivot.chart.emptyNoValue":"\uCC28\uD2B8\uB97C \uBCF4\uB824\uBA74 \uCD5C\uC18C \uD55C \uAC1C\uC758 \uAC12 \uD544\uB4DC\uB97C \uCD94\uAC00\uD558\uC138\uC694.","pivot.chart.emptyNoData":"\uD604\uC7AC \uCC28\uD2B8 \uC120\uD0DD\uC5D0 \uD45C\uC2DC\uD560 \uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.","pivot.chart.dimension":"\uCC28\uD2B8 \uCC28\uC6D0","pivot.chart.primaryMeasure":"\uC8FC \uCE21\uC815\uAC12","pivot.chart.secondaryMeasure":"\uBE44\uAD50 \uCE21\uC815\uAC12","pivot.chart.chartType":"\uCC28\uD2B8 \uC720\uD615","pivot.chart.style.barVertical":"\uC138\uB85C \uB9C9\uB300","pivot.chart.style.barHorizontal":"\uAC00\uB85C \uB9C9\uB300","pivot.chart.style.line":"\uC120\uD615 \uCC28\uD2B8","pivot.chart.style.scatter":"\uC0B0\uC810\uB3C4","pivot.chart.collapse.ariaExpand":"\uCC28\uD2B8 \uC601\uC5ED \uD3BC\uCE58\uAE30","pivot.chart.collapse.ariaCollapse":"\uCC28\uD2B8 \uC601\uC5ED \uC811\uAE30","smartFilter.adaptFilters":"\uD544\uD130 \uC870\uC815","smartFilter.addFilters":"\uD544\uD130 \uCD94\uAC00","smartFilter.go":"\uC2E4\uD589","smartFilter.visibleFilters":"\uD45C\uC2DC \uD544\uD130","smartFilter.searchPlaceholder":"\uAC80\uC0C9...","smartFilter.noOptionsFound":"\uC635\uC158\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4","smartFilter.min":"\uCD5C\uC18C","smartFilter.max":"\uCD5C\uB300","smartFilter.minMaxPlaceholder":"\uCD5C\uC18C - \uCD5C\uB300","smartFilter.operator.equals":"\uAC19\uC74C","smartFilter.operator.contains":"\uD3EC\uD568","smartFilter.operator.notContains":"\uBBF8\uD3EC\uD568","smartFilter.operator.wildcard":"\uC640\uC77C\uB4DC\uCE74\uB4DC \uAC80\uC0C9","smartFilter.operator.notEquals":"\uAC19\uC9C0 \uC54A\uC74C","smartFilter.operator.greaterThan":"\uBCF4\uB2E4 \uD07C","smartFilter.operator.lessThan":"\uBCF4\uB2E4 \uC791\uC74C","smartFilter.operator.greaterOrEqual":"\uC774\uC0C1","smartFilter.operator.lessOrEqual":"\uC774\uD558","smartFilter.operator.between":"\uBC94\uC704","variant.noOptions":"\uC635\uC158 \uC5C6\uC74C","variant.defaultSuffix":"\uAE30\uBCF8","variant.selectVariant":"\uBDF0 \uC120\uD0DD","variant.saveView":"\uBDF0 \uC800\uC7A5","variant.newVariant":"\uC0C8 \uBDF0","variant.viewName":"\uBDF0 \uC774\uB984","variant.setDefault":"\uAE30\uBCF8\uC73C\uB85C \uC124\uC815","variant.publicAllUsers":"\uACF5\uAC1C(\uC804\uCCB4 \uC0AC\uC6A9\uC790)","variant.toast.fetchFailed":"\uBDF0\uB97C \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4","variant.toast.saveFailed":"\uBDF0\uB97C \uC800\uC7A5\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4","variant.toast.saveSuccess":"\uBDF0\uAC00 \uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4","variant.toast.deleteFailed":"\uBDF0\uB97C \uC0AD\uC81C\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4","variant.toast.deleteSuccess":"\uBDF0\uAC00 \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4","variant.toast.defaultFailed":"\uAE30\uBCF8 \uBDF0\uB97C \uC5C5\uB370\uC774\uD2B8\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4","variant.toast.defaultSuccess":"\uAE30\uBCF8 \uBDF0\uAC00 \uC5C5\uB370\uC774\uD2B8\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.saveLayout":"\uB808\uC774\uC544\uC6C3 \uC800\uC7A5","layout.layoutOptions":"\uB808\uC774\uC544\uC6C3 \uC635\uC158","layout.selectLayout":"\uB808\uC774\uC544\uC6C3 \uC120\uD0DD","layout.saveCurrentLayout":"\uD604\uC7AC \uB808\uC774\uC544\uC6C3 \uC800\uC7A5...","layout.noSavedLayouts":"\uC800\uC7A5\uB41C \uB808\uC774\uC544\uC6C3 \uC5C6\uC74C","layout.removeDefault":"\uAE30\uBCF8 \uD574\uC81C","layout.setAsDefault":"\uAE30\uBCF8\uC73C\uB85C \uC124\uC815","layout.layoutName":"\uB808\uC774\uC544\uC6C3 \uC774\uB984","layout.layoutDescription":"\uC124\uBA85","layout.layoutNameHelper":"\uC608: \uCEF4\uD329\uD2B8 \uBDF0","layout.warningOverwrite":"\uACBD\uACE0: \uAE30\uC874 \uB808\uC774\uC544\uC6C3\uC774 \uB36E\uC5B4\uC4F0\uAE30 \uB429\uB2C8\uB2E4","layout.useAsDefault":"\uAE30\uBCF8 \uB808\uC774\uC544\uC6C3\uC73C\uB85C \uC0AC\uC6A9","layout.publicAllUsers":"\uACF5\uAC1C(\uBAA8\uB4E0 \uC0AC\uC6A9\uC790\uC5D0\uAC8C \uD45C\uC2DC)","layout.toast.loadFallback":"\uBC31\uC5D4\uB4DC\uC5D0\uC11C \uB808\uC774\uC544\uC6C3\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD574 \uB85C\uCEEC \uC800\uC7A5\uC18C\uB85C \uC804\uD658\uD588\uC2B5\uB2C8\uB2E4","layout.toast.saveSuccess":"\uB808\uC774\uC544\uC6C3\uC774 \uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.toast.saveLocalSuccess":"\uB808\uC774\uC544\uC6C3\uC774 \uB85C\uCEEC \uC800\uC7A5\uC18C\uC5D0 \uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.toast.backendUnavailableSavedLocal":"\uBC31\uC5D4\uB4DC\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC5B4 \uB85C\uCEEC\uC5D0 \uC800\uC7A5\uD588\uC2B5\uB2C8\uB2E4","layout.toast.deleteSuccess":"\uB808\uC774\uC544\uC6C3\uC774 \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.toast.deleteLocalSuccess":"\uB808\uC774\uC544\uC6C3\uC774 \uB85C\uCEEC \uC800\uC7A5\uC18C\uC5D0\uC11C \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.toast.backendUnavailableDeletedLocal":"\uBC31\uC5D4\uB4DC\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC5B4 \uB85C\uCEEC\uC5D0\uC11C \uC0AD\uC81C\uD588\uC2B5\uB2C8\uB2E4","layout.toast.defaultSuccess":"\uAE30\uBCF8 \uB808\uC774\uC544\uC6C3\uC774 \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.toast.defaultLocalSuccess":"\uAE30\uBCF8 \uB808\uC774\uC544\uC6C3\uC774 \uB85C\uCEEC\uC5D0 \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.toast.backendUnavailableDefaultLocal":"\uBC31\uC5D4\uB4DC\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC5B4 \uAE30\uBCF8\uAC12\uC744 \uB85C\uCEEC\uC5D0 \uC800\uC7A5\uD588\uC2B5\uB2C8\uB2E4","dateRange.label":"\uB0A0\uC9DC \uBC94\uC704","dateRange.startDate":"\uC2DC\uC791\uC77C","dateRange.endDate":"\uC885\uB8CC\uC77C","dateRange.select":"\uC120\uD0DD...","dateRange.today":"\uC624\uB298","dateRange.thisWeek":"\uC774\uBC88 \uC8FC","dateRange.thisMonth":"\uC774\uBC88 \uB2EC","graph.records":"{count}\uAC74","graph.kpi.totalRecords":"\uCD1D \uB808\uCF54\uB4DC","graph.kpi.totalReport":"\uCD1D \uBCF4\uACE0 \uC2DC\uAC04","graph.kpi.totalBillable":"\uCD1D \uCCAD\uAD6C \uAC00\uB2A5 \uC2DC\uAC04","graph.kpi.efficiency":"\uD6A8\uC728","graph.kpi.amount":"\uAE08\uC561","graph.kpi.flagged":"\uD50C\uB798\uADF8","graph.chart.billable.title":"\uCC28\uC6D0\uBCC4 \uCCAD\uAD6C \uAC00\uB2A5 \uC2DC\uAC04","graph.chart.billable.subtitle":"\uCCAD\uAD6C \uAC00\uB2A5 \uC2DC\uAC04 \uC0C1\uC704 \uAC12","graph.chart.efficiency.title":"\uB2F4\uB2F9\uC790\uBCC4 \uD6A8\uC728","graph.chart.efficiency.subtitle":"\uB0AE\uC740 \uD6A8\uC728 \uC6B0\uC120","graph.chart.status.title":"\uC0C1\uD0DC \uBD84\uD3EC","graph.chart.status.subtitle":"\uC0C1\uD0DC\uBCC4 \uBE44\uC728","graph.dataBody":"\uB370\uC774\uD130 \uBCF8\uBB38","graph.reportTitle":"\uADF8\uB798\uD504 \uB9AC\uD3EC\uD2B8","graph.unassigned":"\uBBF8\uC9C0\uC815","graph.column.reportHours":"\uBCF4\uACE0 \uC2DC\uAC04","graph.column.billableHours":"\uCCAD\uAD6C \uAC00\uB2A5 \uC2DC\uAC04","detail.searchAi.placeholder":"\uD544\uB4DC\uB97C \uAC80\uC0C9\uD558\uACE0, \uACB0\uACFC\uAC00 \uC5C6\uC73C\uBA74 AI\uC5D0 \uC9C8\uBB38\uD558\uC138\uC694...","detail.searchAi.matches":"{count}\uAC1C \uC77C\uCE58 \uD56D\uBAA9","detail.searchAi.noMatch":"\uC77C\uCE58\uD558\uB294 \uD544\uB4DC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.","detail.searchAi.autoAiFallback":"\uC77C\uCE58 \uD56D\uBAA9\uC774 \uC5C6\uC5B4 AI \uBD84\uC11D\uC744 \uC2E4\uD589\uD569\uB2C8\uB2E4...","detail.searchAi.aiResultTitle":"AI \uBD84\uC11D \uACB0\uACFC","detail.table.title":"\uAD00\uB828 \uB808\uCF54\uB4DC","kanban.empty":"\uC5EC\uAE30\uC5D0 \uCE74\uB4DC\uB97C \uB193\uC73C\uC138\uC694","kanban.bucket.limit":"\uD55C\uB3C4","kanban.bucket.dropHere":"\uB193\uC73C\uBA74 \uC774 \uBC84\uD0B7\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4","kanban.bucket.add":"\uBC84\uD0B7 \uCD94\uAC00","kanban.bucket.rename":"\uBC84\uD0B7 \uC774\uB984 \uBCC0\uACBD","kanban.bucket.saveRename":"\uBC84\uD0B7 \uC774\uB984 \uC800\uC7A5","kanban.bucket.cancelRename":"\uC774\uB984 \uBCC0\uACBD \uCDE8\uC18C","kanban.search.placeholder":"\uCE74\uB4DC \uBC0F \uBC84\uD0B7 \uAC80\uC0C9","kanban.search.clear":"\uAC80\uC0C9 \uC9C0\uC6B0\uAE30","kanban.search.results":"\uC77C\uCE58\uD558\uB294 \uCE74\uB4DC {count}\uAC1C","kanban.search.noMatch":"\uC77C\uCE58\uD558\uB294 \uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4","kanban.card.progress":"\uC9C4\uD589\uB960","kanban.card.openDetail":"\uC0C1\uC138 \uC5F4\uAE30","kanban.priority.critical":"\uAE34\uAE09","kanban.priority.high":"\uB192\uC74C","kanban.priority.medium":"\uBCF4\uD1B5","kanban.priority.low":"\uB0AE\uC74C","quickCreate.newItem":"\uC2E0\uADDC \uD56D\uBAA9","quickCreate.createWithTitle":"{title} \uC0DD\uC131","quickEdit.editWithTitle":"{title} \uC218\uC815","quickDelete.confirmTitle":"\uC0AD\uC81C \uD655\uC778","quickDelete.confirmMessageSingle":"\uC120\uD0DD\uD55C \uD56D\uBAA9\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?","quickDelete.confirmMessageMultiple":"\uC120\uD0DD\uD55C {count}\uAC1C \uD56D\uBAA9\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?","cardPage.viewDetails":"\uC0C1\uC138 \uBCF4\uAE30","cardPage.download":"\uB2E4\uC6B4\uB85C\uB4DC","cardPage.close":"\uB2EB\uAE30","cardPage.empty":"\uD56D\uBAA9\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4","messageBox.confirm":"\uD655\uC778","messageBox.cancel":"\uCDE8\uC18C","omph.status.idle":"\uB300\uAE30","omph.status.pending":"\uB300\uAE30 \uC911","omph.status.running":"\uCC98\uB9AC \uC911","omph.status.success":"\uC644\uB8CC","omph.status.error":"\uC624\uB958","omph.working":"\uCC98\uB9AC \uC911","omph.workingFor":"\uCC98\uB9AC \uC911 {duration} \uACBD\uACFC","omph.loadOlder":"\uC774\uC804 \uBA54\uC2DC\uC9C0 \uBD88\uB7EC\uC624\uAE30","omph.loadingOlder":"\uBD88\uB7EC\uC624\uB294 \uC911\u2026","omph.toBottom":"\uB9E8 \uC544\uB798\uB85C","omph.copy":"\uBCF5\uC0AC","omph.copied":"\uBCF5\uC0AC\uB428","omph.turnActions":"\uC751\uB2F5 \uC791\uC5C5","omph.usage":"\uC0AC\uC6A9\uB7C9","omph.inputTokens":"\uC785\uB825","omph.outputTokens":"\uCD9C\uB825","omph.duration":"\uC18C\uC694 \uC2DC\uAC04","omph.send":"\uBCF4\uB0B4\uAE30","omph.stop":"\uC911\uC9C0","omph.turnRail":"\uD134","omph.secondUnit":"\uCD08","omph.minuteUnit":"\uBD84","omph.preview.title":"\uD30C\uC77C \uBBF8\uB9AC\uBCF4\uAE30","omph.preview.close":"\uBBF8\uB9AC\uBCF4\uAE30 \uB2EB\uAE30","omph.preview.back":"\uB300\uD654\uB85C \uB3CC\uC544\uAC00\uAE30","omph.preview.expand":"\uBBF8\uB9AC\uBCF4\uAE30 \uD655\uB300","omph.preview.collapse":"\uBBF8\uB9AC\uBCF4\uAE30 \uD06C\uAE30 \uBCF5\uC6D0","omph.preview.copyContent":"\uB0B4\uC6A9 \uBCF5\uC0AC","omph.preview.copyPath":"\uACBD\uB85C \uBCF5\uC0AC","omph.preview.download":"\uB2E4\uC6B4\uB85C\uB4DC","omph.preview.openExternal":"\uC678\uBD80\uC5D0\uC11C \uC5F4\uAE30","omph.preview.wrap":"\uC904 \uBC14\uAFC8","omph.preview.loading":"\uD30C\uC77C \uB85C\uB4DC \uC911","omph.preview.missing":"\uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC74C","omph.preview.failed":"\uC774 \uD30C\uC77C\uC744 \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4","omph.preview.unsupported":"\uC774 \uD30C\uC77C \uD615\uC2DD\uC740 \uBBF8\uB9AC\uBCFC \uC218 \uC5C6\uC2B5\uB2C8\uB2E4","omph.preview.retry":"\uB2E4\uC2DC \uC2DC\uB3C4","omph.preview.resize":"\uBBF8\uB9AC\uBCF4\uAE30 \uD06C\uAE30 \uC870\uC815","omph.preview.line":"{start}\uC904","omph.preview.lines":"{start}\u2013{end}\uC904","omph.preview.truncated":"\uC804\uCCB4 {total}\uC904 \uC911 \uCC98\uC74C {shown}\uC904 \uD45C\uC2DC","omph.preview.imageFailed":"\uC774\uBBF8\uC9C0\uB97C \uD45C\uC2DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4","omph.preview.zoomIn":"\uD655\uB300","omph.preview.zoomOut":"\uCD95\uC18C","omph.preview.zoomFit":"\uB108\uBE44\uC5D0 \uB9DE\uCD94\uAE30","omph.newConversation":"\uC0C8 \uB300\uD654","omph.conversationList":"\uB300\uD654 \uBAA9\uB85D","omph.conversations":"\uB300\uD654","omph.noConversations":"\uC544\uC9C1 \uB300\uD654\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4","omph.approval.waiting":"\uC2B9\uC778 \uB300\uAE30 \uC911","omph.approval.choose":"\uC791\uC5C5\uC744 \uC120\uD0DD\uD558\uC138\uC694","omph.approval.details":"\uC2B9\uC778 \uC138\uBD80 \uC815\uBCF4","omph.approval.choices":"\uC791\uC5C5","omph.approval.reject":"\uAC70\uBD80","omph.approval.allowOnce":"\uD55C \uBC88\uB9CC \uD5C8\uC6A9","omph.approval.confirm":"\uACC4\uC18D","omph.approval.other":"\uAE30\uD0C0","omph.approval.otherPlaceholder":"\uC218\uD589\uD560 \uC791\uC5C5\uC744 \uC124\uBA85\uD558\uC138\uC694","omph.approval.escalation":"\uB3C4\uAD6C {toolName}\uC774(\uAC00) \uAD8C\uD55C \uC788\uB294 \uC2E4\uD589\uC744 \uC694\uCCAD\uD569\uB2C8\uB2E4","omph.input.placeholder":"\uBA54\uC2DC\uC9C0 \uC785\uB825\u2026","omph.input.upload":"\uD30C\uC77C \uC5C5\uB85C\uB4DC","omph.input.send":"\uBA54\uC2DC\uC9C0 \uBCF4\uB0B4\uAE30","omph.input.stop":"\uC0DD\uC131 \uC911\uC9C0","omph.input.message":"\uBA54\uC2DC\uC9C0 \uC785\uB825","omph.input.tools":"\uC785\uB825 \uB3C4\uAD6C","agentui.html.defaultTitle":"\uC778\uD130\uB799\uD2F0\uBE0C HTML","agentui.html.open":"\uC5F4\uAE30","agentui.html.preview":"\uBBF8\uB9AC \uBCF4\uAE30","agentui.html.code":"\uCF54\uB4DC","agentui.html.toggle":"\uCF54\uB4DC\uC640 \uBBF8\uB9AC \uBCF4\uAE30 \uC804\uD658","agentui.html.copy":"\uCF54\uB4DC \uBCF5\uC0AC","agentui.html.copied":"\uBCF5\uC0AC\uB428","agentui.html.download":"\uB2E4\uC6B4\uB85C\uB4DC","agentui.html.close":"\uB2EB\uAE30"},Xn={en:Ch,zh:xh,fr:wh,de:Sh,ja:kh,ko:Ph};P();var fd=(t,o)=>o?t.replace(/\{(\w+)\}/g,(r,n)=>{let a=o[n];return a==null?"":String(a)}):t,Mh={locale:"en",t:(t,o)=>fd(Xn.en[t]||t,o)},hd=eo.createContext(Mh),Ya=({locale:t="en",messages:o,children:r})=>{let n=eo.useMemo(()=>{let a=Xn[t]||Xn.en,i=o?.[t]||{},s={...Xn.en,...a,...i};return {locale:t,t:(l,d)=>fd(s[l]||l,d)}},[t,o]);return e(hd.Provider,{value:n,children:r})},le=()=>eo.useContext(hd);P();function Yn({items:t,onItemClick:o,className:r="",level:n=0,expandedIds:a,onToggleExpand:i,colorMode:s="light",enablePinning:l=false,pinnedIds:d,onTogglePin:p}){let{t:m}=le(),f=s==="dark",h=navigation.usePathname(),[u,v]=eo.useState(false),[y,g]=eo.useState(new Set),x=a!==void 0&&i!==void 0,b=x?a:y;eo.useEffect(()=>{v(true);},[]);let C=S=>{if(x)i(S);else {let T=new Set(y);T.has(S)?T.delete(S):T.add(S),g(T);}},k=S=>{S.children&&S.children.length>0&&C(S.id),o&&o(S);};return !t||!Array.isArray(t)?e("div",{className:vo("tree-menu",r),children:e("div",{className:"text-sm text-[var(--orb-muted)] p-2",children:m("navigation.noItems")})}):e("div",{className:vo("tree-menu",r),children:t.map(S=>{let T=b.has(S.id)||S.isExpanded,I=S.children&&S.children.length>0,M=56+Math.max(0,n-1)*8,A=n===0?12:I?M-24:M,R=S.appurl||S.href,D=u&&R?h===R:false,E=d?.has(S.id)??false,O=l&&S.pinnable!==false&&!!R&&!I;return c("div",{className:"tree-menu-item relative",children:[D&&e("div",{className:vo("absolute left-0 top-2 bottom-2 w-[3px] rounded-r-full z-10","bg-[var(--orb-nav-active-fg)]")}),c(js,{variant:"ghost",className:vo("w-full justify-start h-auto py-2 relative overflow-hidden group",n>0?"gap-1":"gap-2",I&&T&&!D?f?"bg-[color-mix(in_oklch,var(--orb-inverse-fg)_5%,transparent)] text-[var(--orb-fg)] hover:bg-[color-mix(in_oklch,var(--orb-inverse-fg)_8%,transparent)]":"bg-[color-mix(in_oklch,var(--orb-surface)_70%,transparent)] text-[var(--orb-fg)] hover:bg-[var(--orb-surface)]":"",n>=2?"min-h-9 py-1.5 rounded-md":n>0?"min-h-10 rounded-lg":"rounded-lg",D?f?"bg-transparent text-[var(--orb-nav-active-fg)] hover:bg-[color-mix(in_oklch,var(--orb-surface-2)_35%,transparent)]":"bg-transparent text-[var(--orb-nav-active-fg)] hover:bg-[color-mix(in_oklch,var(--orb-surface)_60%,transparent)]":f?"hover:bg-[color-mix(in_oklch,var(--orb-surface-2)_50%,transparent)] text-[var(--orb-fg)]":"hover:bg-[color-mix(in_oklch,var(--orb-surface)_50%,transparent)] text-[var(--orb-fg)]"),style:{paddingLeft:`${A}px`,paddingRight:O?"34px":"10px"},onClick:()=>k(S),children:[I&&e("div",{className:vo("flex-shrink-0 transition-transform duration-200",T&&"rotate-90",D?"text-[var(--orb-nav-active-fg)]":f?"text-[var(--orb-muted)] group-hover:text-[var(--orb-fg)]":"text-[var(--orb-muted)] group-hover:text-[var(--orb-muted)]"),children:e(zo,{className:"h-4 w-4"})}),S.icon&&e("div",{className:vo("flex h-4 w-4 flex-shrink-0 items-center justify-center transition-colors duration-200",D?"text-[var(--orb-nav-active-fg)]":f?"text-[var(--orb-muted)] group-hover:text-[var(--orb-fg)]":"text-[var(--orb-muted)] group-hover:text-[var(--orb-muted)]"),children:S.icon}),c("div",{className:"flex-1 text-left overflow-hidden z-10",children:[e("div",{className:vo("text-sm truncate transition-colors duration-200",D?"font-semibold":"font-medium"),children:S.title||S.label}),S.description&&e("div",{className:vo("text-xs truncate transition-colors duration-200",D?f?"text-[color-mix(in_oklch,var(--orb-nav-active-fg)_70%,transparent)]":"text-[color-mix(in_oklch,var(--orb-nav-active-fg)_75%,transparent)]":"text-[var(--orb-muted)]"),title:S.description,children:S.description})]})]}),O&&p&&e("button",{type:"button","aria-label":m(E?"navigation.pin.remove":"navigation.pin.add"),"aria-pressed":E,title:m(E?"navigation.pin.remove":"navigation.pin.add"),onClick:_=>{_.preventDefault(),_.stopPropagation(),p(S);},className:vo("orb-navigation-pin-button absolute right-1 top-1/2 z-20 flex h-7 w-7 -translate-y-1/2 items-center justify-center rounded-md transition-colors duration-150",E&&"orb-is-pinned"),children:e(Jr,{className:vo("h-3.5 w-3.5",E&&"fill-current")})}),I&&e("div",{className:vo("grid transition-[grid-template-rows] duration-300 ease-in-out",T?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:e("div",{className:vo("overflow-hidden",T&&"pt-1"),children:e(Yn,{items:S.children,onItemClick:o,level:n+1,expandedIds:a,onToggleExpand:i,colorMode:s,enablePinning:l,pinnedIds:d,onTogglePin:p})})})]},S.id)})})}P();var Eh="orbcafe:navigation-island:pinned-items",Qs="orbcafe-navigation-pinned",Lh=t=>t.appurl||t.href,vd=t=>{let o=[];return t.forEach(r=>{let n=!!r.children?.length;r.pinnable!==false&&Lh(r)&&!n&&o.push({...r,children:void 0}),r.children?.length&&o.push(...vd(r.children));}),o},yd=({collapsed:t,onToggle:o,className:r="",maxHeight:n,menuData:a=[],colorMode:i="light",displayMode:s="fixed",onDisplayModeChange:l,showDisplayModeToggle:d=true,enablePinning:p=true,pinStorageKey:m=Eh,pinnedItemIds:f,defaultPinnedItemIds:h=[],onPinnedItemIdsChange:u,pinnedSectionTitle:v})=>{let{t:y}=le(),g=i==="dark",x=s==="floating",b=navigation.useRouter(),[C,k]=eo.useState(""),[S,T]=eo.useState(new Set),[I,w]=eo.useState(h),[M,A]=eo.useState(false),R=f!==void 0,D=eo.useMemo(()=>f??I,[f,I]),E=eo.useMemo(()=>new Set(D),[D]);eo.useEffect(()=>{t&&T(new Set);},[t]),eo.useEffect(()=>{if(!p||R){A(true);return}try{let H=window.localStorage.getItem(m);if(H){let U=JSON.parse(H);Array.isArray(U)&&w(U.filter(Y=>typeof Y=="string"));}}catch{}finally{A(true);}},[p,R,m]),eo.useEffect(()=>{if(!(!p||R||!M))try{window.localStorage.setItem(m,JSON.stringify(D));}catch{}},[D,p,R,m,M]),eo.useEffect(()=>{!p||t||D.length===0||T(H=>{if(H.has(Qs))return H;let U=new Set(H);return U.add(Qs),U});},[t,D.length,p]);let O=eo.useCallback(H=>{let U=Array.from(new Set(H));R||w(U),u?.(U);},[R,u]),_=eo.useCallback(H=>{let U=H.id,Y=E.has(U)?D.filter(ue=>ue!==U):[...D,U];O(Y);},[D,E,O]),J=eo.useMemo(()=>{if(!p||D.length===0)return a;let H=new Map(vd(a).map(Y=>[Y.id,Y])),U=D.map(Y=>H.get(Y)).filter(Y=>!!Y);return U.length===0?a:[{id:Qs,title:v||y("navigation.pinned"),icon:e(Jr,{className:"w-4 h-4"}),children:U,pinnable:false},...a]},[D,p,a,v,y]),F=eo.useCallback(H=>{let U=[],Y=ue=>{ue.forEach(re=>{U.push(re.id),re.children&&Y(re.children);});};return Y(H),U},[]),V=eo.useMemo(()=>{if(!C.trim())return J;let H=U=>U.reduce((Y,ue)=>{let re=ue.title?.toLowerCase().includes(C.toLowerCase())||ue.description?.toLowerCase().includes(C.toLowerCase()),ge=ue.children?H(ue.children):[];return (re||ge.length>0)&&Y.push({...ue,children:ge.length>0?ge:ue.children}),Y},[]);return H(J)},[C,J]),z=eo.useMemo(()=>C.trim()?new Set(F(J)):S,[C,J,S,F]),X=eo.useCallback(async H=>{if(console.log("\u{1F5B1}\uFE0F \u5BFC\u822A\u83DC\u5355\u9879\u70B9\u51FB:",H),H.id==="chat"||H.appurl==="/chat"){console.log("\u{1F4AC} \u68C0\u6D4B\u5230chat\u83DC\u5355\u70B9\u51FB\uFF0C\u8DF3\u8F6C\u5230\u65B0\u7684\u804A\u5929\u89C6\u56FE");try{b.push("/chat?new=true");}catch(Y){console.error("\u274C \u65E0\u6CD5\u8DF3\u8F6C\u5230\u65B0\u804A\u5929\u89C6\u56FE:",Y),b.push("/chat");}return}let U=H.appurl||H.href;U&&(U.startsWith("http://")||U.startsWith("https://")?window.open(U,"_blank"):b.push(U));},[b]),W=eo.useCallback(()=>{l?.(s==="fixed"?"floating":"fixed");},[s,l]);return c("div",{className:`flex flex-col backdrop-blur-xl border ${x?"shadow-[0_28px_80px_rgba(15,23,42,0.34)]":"shadow-[0_4px_8px_0_rgba(31,38,135,0.1)]"} ${t?"w-14 rounded-full":"w-[234px] rounded-2xl"} relative ${r} ${g?x?"border-white/25":"bg-[var(--orb-nav-bg)] border-white/10":x?"border-white/70":"bg-[color-mix(in_oklch,var(--orb-canvas)_70%,transparent)] border-white/30"}`,style:{backdropFilter:x?"blur(34px) saturate(230%) contrast(1.12)":"blur(16px) saturate(180%)",WebkitBackdropFilter:x?"blur(34px) saturate(230%) contrast(1.12)":"blur(16px) saturate(180%)",backgroundColor:x?g?"rgba(8, 12, 18, 0.34)":"rgba(255, 255, 255, 0.24)":void 0,backgroundImage:x?g?"radial-gradient(circle at 28% 8%, rgba(255,255,255,0.14), rgba(255,255,255,0) 44%), linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.015) 50%, color-mix(in oklch, var(--orb-ai-accent) 5%, transparent))":"radial-gradient(circle at 28% 8%, rgba(255,255,255,0.42), rgba(255,255,255,0) 46%), linear-gradient(145deg, rgba(255,255,255,0.22), rgba(255,255,255,0.07) 50%, color-mix(in oklch, var(--orb-ai-accent) 8%, transparent))":void 0,boxShadow:x?g?"inset 0 1px 0 rgba(255,255,255,0.20), inset 0 -1px 0 rgba(255,255,255,0.08), 0 26px 90px rgba(0,0,0,0.52), 0 0 0 1px rgba(255,255,255,0.06)":"inset 0 1px 0 rgba(255,255,255,0.88), inset 0 -1px 0 rgba(255,255,255,0.34), 0 26px 90px rgba(15,23,42,0.24), 0 0 0 1px rgba(255,255,255,0.35)":void 0,transition:"width 400ms cubic-bezier(0.4, 0.0, 0.2, 1), border-radius 0ms cubic-bezier(0.4, 0.0, 0.2, 1), box-shadow 400ms ease-out, background-color 220ms ease-out, backdrop-filter 220ms ease-out",maxHeight:n?`${n}px`:void 0},children:[e("div",{className:`pt-4 pb-2 transition-all duration-500 ease-in-out ${t?"px-1":"px-2"}`,children:t?e("div",{className:"flex justify-center",children:e("button",{onClick:o,className:`w-10 h-10 flex items-center justify-center rounded-lg transition-colors duration-200 ${g?"text-[var(--orb-fg)] hover:bg-[var(--orb-surface-2)]":"text-[var(--orb-muted)] hover:bg-[var(--orb-surface)]"}`,title:y("navigation.expand"),children:e(Vo,{className:"h-5 w-5"})})}):c("div",{className:`relative transition-opacity duration-300 ${t?"opacity-0":"opacity-100 delay-200"}`,children:[e("input",{type:"text",placeholder:y("navigation.searchPlaceholder"),value:C,onChange:H=>k(H.target.value),className:`w-full pl-10 pr-4 py-2 text-sm border rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--orb-primary)] focus:border-transparent ${g?"border-[var(--orb-border)] bg-[var(--orb-surface-2)] text-[var(--orb-fg)] placeholder-[var(--orb-muted)]":"border-[var(--orb-border)] bg-[var(--orb-canvas)] text-[var(--orb-fg)] placeholder-[var(--orb-muted)]"}`}),e("div",{className:"absolute left-3 top-1/2 transform -translate-y-1/2 pointer-events-none",children:e(Vo,{className:"h-4 w-4 text-[var(--orb-muted)]"})})]})}),e("nav",{className:`flex-1 pb-4 transition-all duration-500 ease-in-out overflow-y-auto min-h-0 ${t?"px-1":"px-2"}`,children:V.length===0?e("div",{className:"flex items-center justify-center py-8 text-[var(--orb-muted)] text-sm",children:t?e(zn,{className:"h-5 w-5"}):y(C?"navigation.noMatch":"navigation.noAccessibleApp")}):c(jsxRuntime.Fragment,{children:[!t&&e("div",{className:`transition-opacity duration-300 ${t?"opacity-0":"opacity-100 delay-200"}`,children:e(Yn,{items:V,onItemClick:X,className:"space-y-1",expandedIds:z,colorMode:i,enablePinning:p,pinnedIds:E,onTogglePin:_,onToggleExpand:H=>{let U=new Set(S);V.some(ue=>ue.id===H)?U.has(H)?U.delete(H):(V.forEach(ue=>{ue.id!==H&&U.has(ue.id)&&U.delete(ue.id);}),U.add(H)):U.has(H)?U.delete(H):U.add(H),T(U);}})}),t&&e("div",{className:"space-y-2",children:J.map(H=>e("div",{className:"space-y-1",children:e("button",{onClick:()=>{o();let U=new Set([H.id]);T(U);},className:`w-full flex items-center justify-center p-2 rounded-lg cursor-pointer transition-colors duration-200 ${g?"text-[var(--orb-muted)] hover:bg-[var(--orb-surface-2)]":"text-[var(--orb-muted)] hover:bg-[var(--orb-surface)]"}`,title:y("navigation.expandView",{title:H.title||""}),children:H.icon||e("div",{className:`w-6 h-6 rounded text-xs flex items-center justify-center font-medium ${g?"bg-[var(--orb-nav-active-fg)] text-[#0b0b0b]":"bg-[var(--orb-primary)] text-[var(--orb-on-primary)]"}`,children:H.title?.charAt(0)||"?"})})},H.id))})]})}),!t&&e("button",{onClick:o,className:`absolute -bottom-1 -right-1 w-6 h-6 bg-transparent rounded-full flex items-center justify-center transition-all duration-300 ease-in-out z-20 ${g?"hover:bg-[color-mix(in_oklch,var(--orb-surface-2)_50%,transparent)]":"hover:bg-[color-mix(in_oklch,var(--orb-canvas)_20%,transparent)]"}`,title:y("navigation.collapse"),children:e("div",{className:"absolute",style:{bottom:"0px",right:"0px",width:"16px",height:"16px",overflow:"hidden"},children:e("div",{className:g?"border-[var(--orb-status-warning)]":"",style:{width:"32px",height:"32px",borderRadius:"16px",border:"3px solid var(--orb-ai-accent)",backgroundColor:"transparent",position:"absolute",top:"-16px",left:"-16px"}})})}),d&&t&&e("button",{type:"button",onClick:W,className:`absolute -bottom-4 left-1/2 z-30 flex h-9 w-9 -translate-x-1/2 items-center justify-center rounded-full border shadow-md transition-colors focus:outline-none focus:ring-2 focus:ring-[color-mix(in_oklch,var(--orb-primary)_45%,transparent)] ${g?"border-[var(--orb-border)] bg-[var(--orb-surface-2)] text-[var(--orb-fg)] hover:bg-[var(--orb-hover)]":"border-[var(--orb-border)] bg-[var(--orb-canvas)] text-[var(--orb-status-fg)] hover:bg-[var(--orb-p50)] hover:text-[var(--orb-status-primary)]"}`,style:{touchAction:"manipulation"},title:y(x?"navigation.mode.switchToFixed":"navigation.mode.switchToFloating"),"aria-label":y(x?"navigation.mode.switchToFixed":"navigation.mode.switchToFloating"),children:x?e(Va,{className:"h-4 w-4"}):e(Wa,{className:"h-4 w-4"})})]})};P();var Fh="orbcafe:navigation-island:pinned-items",Js="orbcafe-navigation-pinned",Cd=t=>t.appurl||t.href,xd=t=>t.flatMap(o=>{let r=!!o.children?.length,n=o.pinnable!==false&&Cd(o)&&!r?[{...o,children:void 0}]:[];return o.children?.length?[...n,...xd(o.children)]:n}),wd=t=>t.flatMap(o=>[o.id,...o.children?wd(o.children):[]]),Sd=(t,o)=>t.reduce((r,n)=>{let a=n.children?Sd(n.children,o):[];return ([n.title,n.label,n.description].some(s=>s?.toLocaleLowerCase().includes(o))||a.length>0)&&r.push({...n,children:a.length>0?a:n.children}),r},[]),el=({collapsed:t,onToggle:o,className:r="",maxHeight:n,menuData:a=[],colorMode:i="light",displayMode:s="fixed",onDisplayModeChange:l,showDisplayModeToggle:d=true,enablePinning:p=true,pinStorageKey:m=Fh,pinnedItemIds:f,defaultPinnedItemIds:h=[],onPinnedItemIdsChange:u,pinnedSectionTitle:v})=>{let{t:y}=le(),g=navigation.useRouter(),x=s==="floating",[b,C]=eo.useState(""),[k,S]=eo.useState(new Set),[T,I]=eo.useState(h),[w,M]=eo.useState(false),A=f!==void 0,R=f??T,D=eo.useMemo(()=>new Set(R),[R]);eo.useEffect(()=>{t&&S(new Set);},[t]),eo.useEffect(()=>{if(!p||A){M(true);return}try{let H=window.localStorage.getItem(m);if(H){let U=JSON.parse(H);Array.isArray(U)&&I(U.filter(Y=>typeof Y=="string"));}}catch{}finally{M(true);}},[p,A,m]),eo.useEffect(()=>{if(!(!p||A||!w))try{window.localStorage.setItem(m,JSON.stringify(R));}catch{}},[R,p,A,m,w]),eo.useEffect(()=>{!p||t||R.length===0||S(H=>{if(H.has(Js))return H;let U=new Set(H);return U.add(Js),U});},[t,R.length,p]);let E=eo.useCallback(H=>{let U=Array.from(new Set(H));A||I(U),u?.(U);},[A,u]),O=eo.useCallback(H=>{E(D.has(H.id)?R.filter(U=>U!==H.id):[...R,H.id]);},[R,D,E]),_=eo.useMemo(()=>{if(!p||R.length===0)return a;let H=new Map(xd(a).map(Y=>[Y.id,Y])),U=R.map(Y=>H.get(Y)).filter(Y=>!!Y);return U.length===0?a:[{id:Js,title:v||y("navigation.pinned"),icon:e(Jr,{className:"h-4 w-4"}),children:U,pinnable:false},...a]},[R,p,a,v,y]),J=b.trim().toLocaleLowerCase(),F=eo.useMemo(()=>J?Sd(_,J):_,[_,J]),V=eo.useMemo(()=>J?new Set(wd(F)):k,[k,F,J]),z=eo.useCallback(H=>{S(U=>{let Y=new Set(U),ue=F.some(re=>re.id===H);return Y.has(H)?Y.delete(H):(ue&&F.forEach(re=>Y.delete(re.id)),Y.add(H)),Y});},[F]),X=eo.useCallback(H=>{let U=Cd(H);U&&(H.id==="chat"||H.appurl==="/chat"?g.push("/chat?new=true"):/^https?:\/\//.test(U)?window.open(U,"_blank","noopener,noreferrer"):g.push(U));},[g]),W=H=>{o(),S(new Set([H.id]));};return c("aside",{"data-navigation-island":"v2","data-collapsed":t||void 0,className:`orb-navigation-island-v2 relative flex flex-col border ${t?"w-14":"w-[234px]"} ${r}`,style:{maxHeight:n?`${n}px`:void 0,transition:"width 320ms cubic-bezier(0.4, 0, 0.2, 1), border-radius 220ms ease, box-shadow 220ms ease"},"aria-label":"Navigation",children:[e("div",{className:`orb-navigation-island-v2-search ${t?"px-1":"px-2"}`,children:t?e("button",{type:"button",onClick:o,className:"mx-auto flex h-10 w-10 items-center justify-center rounded-lg text-[var(--orb-muted)] transition-colors hover:bg-[var(--orb-p50)] hover:text-[var(--orb-status-primary)]",title:y("navigation.expand"),"aria-label":y("navigation.expand"),children:e(Vo,{className:"h-5 w-5"})}):c("label",{className:"relative block",children:[e("span",{className:"orb-visually-hidden",children:y("navigation.searchPlaceholder")}),e(Vo,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[var(--orb-muted)]"}),e("input",{type:"search",value:b,onChange:H=>C(H.target.value),placeholder:y("navigation.searchPlaceholder"),className:"w-full py-2 pl-10 pr-3 text-sm outline-none"})]})}),e("nav",{className:`min-h-0 flex-1 overflow-y-auto pb-2 ${t?"px-1":"px-2"}`,children:F.length===0?e("div",{className:"flex items-center justify-center py-8 text-sm text-[var(--orb-muted)]",children:t?e(zn,{className:"h-5 w-5"}):y(J?"navigation.noMatch":"navigation.noAccessibleApp")}):t?e("div",{className:"space-y-1",children:_.map(H=>e("button",{type:"button",onClick:()=>W(H),className:"flex h-10 w-full items-center justify-center rounded-lg text-[var(--orb-muted)] transition-colors hover:bg-[var(--orb-p50)] hover:text-[var(--orb-status-primary)]",title:y("navigation.expandView",{title:H.title||H.label||""}),children:H.icon||e(zn,{className:"h-5 w-5"})},H.id))}):e(Yn,{items:F,onItemClick:X,className:"space-y-1",expandedIds:V,onToggleExpand:z,colorMode:i,enablePinning:p,pinnedIds:D,onTogglePin:O})}),d&&t&&e("div",{className:"orb-navigation-island-v2-footer flex flex-col items-center gap-1 border-t px-1 py-2",children:e("button",{type:"button",onClick:()=>l?.(x?"fixed":"floating"),className:"flex h-9 w-9 items-center justify-center rounded-lg text-[var(--orb-muted)] transition-colors hover:bg-[var(--orb-p50)] hover:text-[var(--orb-status-primary)]",title:y(x?"navigation.mode.switchToFixed":"navigation.mode.switchToFloating"),"aria-label":y(x?"navigation.mode.switchToFixed":"navigation.mode.switchToFloating"),children:x?e(Va,{className:"h-4 w-4"}):e(Wa,{className:"h-4 w-4"})})}),!t&&e("button",{type:"button",onClick:o,className:"absolute -bottom-1 -right-1 z-20 flex h-6 w-6 items-center justify-center rounded-full bg-transparent transition-all duration-300 ease-in-out",title:y("navigation.collapse"),"aria-label":y("navigation.collapse"),children:e("span",{"aria-hidden":"true",className:"absolute overflow-hidden",style:{bottom:0,right:0,width:16,height:16},children:e("span",{className:"absolute rounded-full border-[3px] border-[var(--orb-ai-accent)]",style:{width:32,height:32,top:-16,left:-16}})})})]})};el.displayName="NavigationIsland2";var Pd=(t={})=>{let{initialCollapsed:o=false,initialDisplayMode:r="fixed",content:n=[],enablePinning:a,pinStorageKey:i,pinnedItemIds:s,defaultPinnedItemIds:l,onPinnedItemIdsChange:d,pinnedSectionTitle:p}=t,[m,f]=eo.useState(o),[h,u]=eo.useState(r),[v,y]=eo.useState(n),g=eo.useCallback(()=>{f(C=>!C);},[]),x=eo.useCallback(()=>{u(C=>C==="fixed"?"floating":"fixed");},[]),b=eo.useMemo(()=>({collapsed:m,onToggle:g,menuData:v,displayMode:h,onDisplayModeChange:u,enablePinning:a,pinStorageKey:i,pinnedItemIds:s,defaultPinnedItemIds:l,onPinnedItemIdsChange:d,pinnedSectionTitle:p}),[m,g,v,h,u,a,i,s,l,d,p]);return {collapsed:m,setCollapsed:f,toggleCollapsed:g,displayMode:h,setDisplayMode:u,toggleDisplayMode:x,menuData:v,setMenuData:y,navigationIslandProps:b}};var ol=class{constructor(){Pc(this,"listener",null);}register(o){this.listener=o;}unregister(){this.listener=null;}show(o,r,n){this.listener&&this.listener({type:o,content:r,options:n});}hide(){this.listener&&this.listener(null);}},lr=new ol,IT={success:(t,o)=>lr.show("success",t,o),error:(t,o)=>lr.show("error",t,o),warning:(t,o)=>lr.show("warning",t,o),info:(t,o)=>lr.show("info",t,o),show:(t,o,r)=>lr.show(t,o,r),hide:()=>lr.hide()};P();var Hh={success:{icon:e(Hn,{size:40}),color:"var(--orb-success-bg)",iconColor:"var(--orb-success)"},warning:{icon:e(_a,{size:40}),color:"var(--orb-warn-bg)",iconColor:"var(--orb-warn)"},error:{icon:e(Ea,{size:40}),color:"var(--orb-err-bg)",iconColor:"var(--orb-err)"},info:{icon:e(Fa,{size:40}),color:"var(--orb-info-bg)",iconColor:"var(--orb-info)"},default:{icon:null,color:"transparent",iconColor:"inherit"}},Qn=({open:t,title:o,message:r,onClose:n,onConfirm:a,confirmText:i,cancelText:s,showCancel:l=true,maxWidth:d="xs",type:p="default"})=>{let{t:m}=le(),f=i||m("messageBox.confirm"),h=s||m("messageBox.cancel"),u=()=>{a?a():n();},v=Hh[p],y=p!=="default";return c(Lt,{open:t,onClose:n,maxWidth:d,sx:y?{borderTop:`6px solid ${v.iconColor}`}:void 0,children:[y&&e("div",{style:{display:"flex",justifyContent:"center",paddingTop:24,color:v.iconColor},children:v.icon}),o&&e("div",{className:"orb-dialog-title",style:{textAlign:y?"center":"left",paddingTop:y?8:16},children:o}),e("div",{className:"orb-dialog-content",style:{textAlign:y?"center":"left"},children:typeof r=="string"?e("p",{style:{margin:0,color:"var(--orb-muted)"},children:r}):r}),c("div",{className:"orb-dialog-actions",style:{display:"flex",justifyContent:y?"center":"flex-end",gap:8,paddingBottom:24,paddingLeft:24,paddingRight:24},children:[l&&e(ke,{onClick:n,variant:"text",children:h}),e(ke,{onClick:u,variant:"contained",color:y&&p==="error"?"error":"primary",autoFocus:true,children:f})]})]})},OT=()=>{let[t,o]=eo__namespace.default.useState(null),[r,n]=eo__namespace.default.useState(false);eo__namespace.default.useEffect(()=>{let s=l=>{l?(o(l),n(true)):(n(false),o(null));};return lr.register(s),()=>lr.unregister()},[]);let a=()=>{n(false),t?.options?.onClose&&t.options.onClose(),o(null);},i=()=>{t?.options?.onConfirm&&t.options.onConfirm(),n(false),o(null);};return t?e(Qn,{open:r,type:t.type,message:t.content,title:t.options?.title,onClose:a,onConfirm:i,confirmText:t.options?.confirmText,cancelText:t.options?.cancelText,showCancel:t.options?.showCancel,maxWidth:t.options?.maxWidth}):null};P();var VT=({status:t,showIcon:o=true})=>{let r="gray",n,a=t;return t==="OK"?(r="blue",n=e(Hn,{size:14,strokeWidth:2}),a="Success"):t==="Error"?(r="orange",n=e(Ea,{size:14,strokeWidth:2}),a="Error"):t==="Warning"&&(r="orange",n=e(_a,{size:14,strokeWidth:2}),a="Warning"),e(xt,{label:a,tone:r,icon:o&&n?n:void 0})};P();var _T=({dense:t,sx:o,className:r,children:n,...a})=>e("ul",{...a,className:r,style:{listStyle:"none",margin:0,padding:0,...o},children:n}),GT=({button:t,divider:o,sx:r,className:n,children:a,...i})=>e("li",{...i,className:n,style:{display:"flex",alignItems:"center",padding:"8px 16px",minHeight:40,borderBottom:o?"1px solid var(--orb-border)":void 0,cursor:t?"pointer":void 0,transition:"var(--orb-t-fast)",...r},onMouseEnter:t?s=>{s.currentTarget.style.background="var(--orb-hover)";}:void 0,onMouseLeave:t?s=>{s.currentTarget.style.background="";}:void 0,children:a}),UT=({sx:t,className:o,children:r,...n})=>e("button",{...n,type:"button",className:o,style:{width:"100%",display:"flex",alignItems:"center",padding:"8px 16px",border:"none",background:"transparent",textAlign:"left",cursor:"pointer",transition:"var(--orb-t-fast)",...t},children:r}),KT=({children:t,sx:o})=>e("div",{style:{marginRight:16,display:"flex",alignItems:"center",minWidth:40,...o},children:t}),qT=({primary:t,secondary:o,sx:r})=>c("div",{style:{flex:1,minWidth:0,...r},children:[e("div",{className:"orb-body",style:{fontWeight:500},children:t}),o&&e("div",{className:"orb-meta",style:{marginTop:2},children:o})]}),XT=({sx:t,className:o,children:r,...n})=>e("li",{...n,className:o,style:{padding:"8px 16px",fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.06em",color:"var(--orb-muted)",...t},children:r}),YT=({children:t,sx:o})=>e("div",{style:{marginRight:12,display:"flex",alignItems:"center",...o},children:t});P();var QT=({xs:t,md:o,lg:r,sx:n,children:a,className:i,...s})=>{let l=r?`span ${r}`:o?`span ${o}`:t?`span ${t}`:"span 12";return e("div",{...s,className:i,style:{gridColumn:l,minWidth:0,...n},children:a})};_t();P();var Lo=ot,io=(t,o)=>eo.forwardRef(({component:r,sx:n,className:a,style:i,children:s,...l},d)=>{let p=r??t,m=Ue(n,[o,a].filter(Boolean).join(" "),i);return e(p,{ref:d,className:m.className,style:m.style,...l,children:s})}),Re=io("div"),Id=io("a","orb-link"),Br=Ae,Rd=se,yo=L;var Md=ie;var Dd=Dt,Jo=rn,ri=on,ni=Ka;var ai=Ua,Nd=Zo,Ad=({value:t,variant:o,color:r,sx:n})=>e(_n,{value:o==="determinate"?t:void 0,color:r,sx:n}),Ed=io("table","orb-tbl"),Ld=io("tbody"),al=io("td"),Od=io("div","orb-table-container"),Fd=io("thead"),il=io("tr");io("tfoot");io("div","orb-dialog-title");io("div","orb-dialog-content");io("div","orb-dialog-actions");io("p","orb-body-dense");var cr=io("span","orb-input-adornment"),Bd=eo.forwardRef(({sx:t,fullWidth:o,className:r,style:n,...a},i)=>{let s=Ue(t,["orb-input-base",r].filter(Boolean).join(" "),n);return e("input",{ref:i,className:s.className,style:{width:o?"100%":void 0,...s.style},...a})});var Cr=io("div","orb-form-control"),Jn=({control:t,label:o,...r})=>c("label",{className:"orb-form-control-label",...r,children:[t,e("span",{children:o})]}),Gh=({primary:t,secondary:o,children:r,primaryTypographyProps:n,secondaryTypographyProps:a,...i})=>c("span",{className:"orb-list-item-text",...i,children:[t??r,o?e("small",{children:o}):null]}),Uh=io("span","orb-list-item-icon"),Gt=Gh,Wo=Uh;io("div","orb-list-subheader");var sl=({container:t,item:o,spacing:r,xs:n,sm:a,md:i,lg:s,xl:l,sx:d,...p})=>{let m={},f=h=>typeof h=="number"?`${h/12*100}%`:h?"100%":void 0;return n!==void 0&&(m.xs=f(n)),a!==void 0&&(m.sm=f(a)),i!==void 0&&(m.md=f(i)),s!==void 0&&(m.lg=f(s)),l!==void 0&&(m.xl=f(l)),e(Re,{...p,sx:{display:t?"flex":void 0,flexWrap:t?"wrap":void 0,gap:t&&r?r:void 0,width:o?m:void 0,...d??{}}})},nn=({in:t,children:o,unmountOnExit:r,...n})=>!t&&r?null:e("div",{hidden:!t,...n,children:o}),Hd=({children:t,container:o})=>typeof document>"u"?null:reactDom.createPortal(t,o??document.body),zd=io("div","orb-toolbar"),Vd=({active:t,direction:o="asc",children:r,sx:n,className:a,style:i,...s})=>{let l=Ue(n,["orb-table-sort-label",t?"orb-is-active":"",a].filter(Boolean).join(" "),i);return c("button",{type:"button",className:l.className,style:l.style,"data-direction":o,...s,children:[e("span",{className:"orb-table-sort-content",children:r}),e(Tt,{className:"orb-table-sort-icon",name:o==="desc"?"down":"up",size:11})]})},ii=({open:t,anchorEl:o,onClose:r,children:n,anchorOrigin:a,transformOrigin:i,slotProps:s,PaperProps:l,sx:d,className:p,style:m,...f})=>{let h=eo.useRef(null);if(eo.useEffect(()=>{if(!t)return;let x=C=>{let k=C.composedPath();h.current&&k.includes(h.current)||o&&k.includes(o)||r?.();},b=C=>{C.key==="Escape"&&r?.();};return document.addEventListener("pointerdown",x,true),document.addEventListener("keydown",b,true),()=>{document.removeEventListener("pointerdown",x,true),document.removeEventListener("keydown",b,true);}},[o,r,t]),!t||typeof document>"u")return null;let u=o?.getBoundingClientRect(),v=s?.paper??l,y=[...Array.isArray(v?.sx)?v.sx:v?.sx?[v.sx]:[],...Array.isArray(d)?d:d?[d]:[]],g=Ue(y,["orb-pop",v?.className,p].filter(Boolean).join(" "),{...v?.style,...m});return reactDom.createPortal(e("div",{...f,ref:h,className:g.className,style:{position:"fixed",left:u?.left??16,top:(u?.bottom??16)+6,zIndex:1301,...g.style},children:n}),document.body)},Wd=({open:t,onClose:o,anchor:r="left",children:n,PaperProps:a})=>{if(!t||typeof document>"u")return null;let i=r==="right"?{right:0,top:0,bottom:0}:r==="top"?{left:0,right:0,top:0}:r==="bottom"?{left:0,right:0,bottom:0}:{left:0,top:0,bottom:0},s=Ue(a?.sx,"orb-drawer");return reactDom.createPortal(c(jsxRuntime.Fragment,{children:[e("button",{type:"button",className:"orb-overlay","aria-label":"Close drawer",onClick:o}),e("aside",{className:s.className,style:{position:"fixed",zIndex:1201,...i},children:n})]}),document.body)},$d=({value:t,onChange:o,children:r,variant:n,scrollButtons:a,...i})=>e("div",{role:"tablist",className:"orb-tabs",...i,children:eo.Children.map(r,s=>eo.isValidElement(s)?eo.cloneElement(s,{selected:s.props.value===t,onSelect:l=>o?.(null,l)}):s)}),_d=({value:t,label:o,children:r,selected:n,onSelect:a,...i})=>e("button",{type:"button",role:"tab","aria-selected":n,className:`orb-tab ${n?"orb-is-active":""}`,onClick:()=>a?.(t),...i,children:o??r});var so=()=>Ma(),xr=(t,o)=>No(t);var Gd=({day:t,onDaySelect:o,selected:r,outsideCurrentMonth:n,disableMargin:a,sx:i,className:s,...l})=>{let d=Ue(i,`orb-cal-day ${r?"orb-is-selected":""} ${n?"orb-is-outside":""} ${s??""}`);return e("button",{type:"button",className:d.className,style:d.style,onClick:()=>o?.(t),...l,children:t.date()})},Ud=({value:t,referenceDate:o,onChange:r,onMonthChange:n,onYearChange:a,minDate:i,maxDate:s,slots:l,...d})=>e(Kn,{value:t,month:o,onChange:p=>r?.(p),onMonthChange:p=>{n?.(p),a?.(p);},minDate:i,maxDate:s,renderDay:l?.day?(p,m)=>l.day?.({day:p,selected:m.selected,outsideCurrentMonth:m.outsideCurrentMonth,onDaySelect:f=>r?.(f)}):void 0,...d}),Kd=({children:t})=>e(jsxRuntime.Fragment,{children:t}),oi=class{};_t();P();var Kh=(t,o)=>o!==void 0?o:typeof t=="number"?t:t==="small"?18:t==="large"?30:t==="inherit"?"1em":22,Se=t=>({fontSize:r,size:n,sx:a,className:i,style:s,titleAccess:l,...d})=>{let p=Ue(a,i,s);return e(Tt,{name:t,size:Kh(r,n),className:p.className,style:p.style,"aria-label":d["aria-label"]??l,...d})},wr=Se("tree"),Hr=Se("add"),qd=Se("duplicate"),ll=Se("down"),Xd=Se("navigationRight"),Yd=Se("navigationRight"),cl=Se("up"),Zd=Se("delete"),jd=Se("camera"),Qd=Se("accept"),Jd=Se("accept"),si=Se("navigationRight"),ep=Se("dimension"),tp=Se("decline"),Sr=Se("decline"),op=Se("decline"),rp=Se("decline"),li=Se("delete"),ci=Se("delete"),np=Se("download"),ap=Se("move"),ip=Se("edit"),an=Se("slimDown"),sp=Se("filter"),sn=Se("sum"),lp=Se("lineChart"),cp=Se("document"),$o=Se("slimDown"),dp=Se("navigationLeft"),kr=Se("navigationRight"),di=Se("slimUp"),pi=Se("navigationLeft"),ui=Se("navigationRight"),pp=Se("dimension"),up=Se("splitOne"),mi=Se("menu"),mp=Se("microphone"),gp=Se("microphone"),fp=Se("microphone"),hp=Se("qrCode"),Pr=Se("save"),zr=Se("search"),bp=Se("search"),vp=Se("paperPlane"),yp=Se("paperPlane"),Cp=Se("wrench"),xp=Se("sort"),gi=Se("splitTwo"),wp=Se("favorite"),Sp=Se("favorite"),kp=Se("stop"),Pp=Se("tableRow"),fi=Se("collapseAll"),hi=Se("expandAll"),ln=Se("tableColumn"),Tp=Se("overview"),Ip=Se("hide");P();var Xh=[{field:"value",label:"Value",minWidth:120},{field:"label",label:"Description",minWidth:180}],Mp=t=>Array.isArray(t)?t:t==null||t===""?[]:[t],Po=t=>String(t),Dp=(t,o)=>t[o],Np=t=>{let o=t.value??t.id??t.key??t.code;return typeof o=="number"||typeof o=="string"?o:""},Yh=t=>{let o=t.label??t.description??t.name??t.title;return String(typeof o=="number"||typeof o=="string"?o:Np(t))},Zh=t=>{let o=t.description??t.subtitle;return typeof o=="number"||typeof o=="string"?String(o):void 0},Ap=({value:t=null,items:o=[],columns:r,mode:n="single",dialogTitle:a="Value Help",searchPlaceholder:i="Search values...",selectLabel:s="Select",clearLabel:l="Clear",cancelLabel:d="Cancel",valueHelpLabel:p="Open value help",noResultsText:m="No matching values",loading:f=false,clearable:h=true,allowManualInput:u=true,validateManualInput:v=true,manualInputErrorText:y="Enter a valid value.",selectedItems:g=[],displayValue:x,getOptionValue:b=Np,getOptionLabel:C=Yh,getOptionDescription:k=Zh,onChange:S,onSearch:T,disabled:I,InputProps:w,onFocus:M,onBlur:A,onKeyDown:R,error:D,helperText:E,...O})=>{let _=fo(),J=n==="multiple",[F,V]=eo.useState(false),[z,X]=eo.useState(false),[W,H]=eo.useState(""),[U,Y]=eo.useState(null),[ue,re]=eo.useState(false),[ge,we]=eo.useState(()=>Mp(t)),[Ve,Te]=eo.useState(""),[Ie,He]=eo.useState(""),ce=eo.useMemo(()=>r&&r.length>0?r:Xh,[r]),be=U??o,We=eo.useMemo(()=>{let te=[...g,...o,...U??[]],ve=new Map;return te.forEach(Ne=>{ve.set(Po(b(Ne)),Ne);}),ve},[b,o,U,g]),tt=eo.useMemo(()=>Mp(t),[t]),nt=eo.useMemo(()=>tt.map(String).join(", "),[tt]);eo.useEffect(()=>{F||we(tt);},[F,tt]),eo.useEffect(()=>{!z&&!Ie&&Te(nt);},[z,nt,Ie]);let it=eo.useMemo(()=>{let te=W.trim().toLowerCase();if(!te||T)return be;let ve=ce.filter(Ne=>Ne.searchable!==false);return be.filter(Ne=>[b(Ne),C(Ne),k(Ne),...ve.map(st=>Dp(Ne,st.field))].some(st=>String(st??"").toLowerCase().includes(te)))},[be,k,C,b,T,W,ce]),q=eo.useMemo(()=>{if(x!==void 0)return x;if(tt.length===0)return "";let te=ve=>{let Ne=We.get(Po(ve));if(!Ne)return String(ve);let Je=C(Ne);return Je&&Je!==String(ve)?`${ve} - ${Je}`:String(ve)};return J?tt.length>2?`${tt.length} selected`:tt.map(te).join(", "):te(tt[0])},[x,C,J,We,tt]),De=eo.useCallback(async()=>{if(T){re(true);try{let te=await T(W);Array.isArray(te)&&Y(te);}finally{re(false);}}},[T,W]),Ce=()=>{I||(we(tt),V(true));},Fe=()=>{V(false);},at=()=>{S?.(J?[]:null,J?[]:null),we([]),Te(""),He("");},Ze=te=>{let ve=b(te);if(J){we(Ne=>Ne.some(st=>Po(st)===Po(ve))?Ne.filter(st=>Po(st)!==Po(ve)):[...Ne,ve]);return}we([ve]);},wt=()=>{let te=ge.map(ve=>We.get(Po(ve))).filter(ve=>!!ve);J?S?.(ge,te):S?.(ge[0]??null,te[0]??null),He(""),V(false);},Rt=te=>{if(te.key==="F4"){te.preventDefault(),Ce();return}if(te.key==="Enter"&&u&&!At(Ve,true)){te.preventDefault();return}R?.(te);},Ot=te=>v?te.every(ve=>We.has(Po(ve))):true,At=(te,ve)=>{if(J){let Je=te.split(/[,;\n]/).map(pt=>pt.trim()).filter(Boolean);if(Je.length===0)return He(""),S?.([],[]),true;if(!Ot(Je))return ve&&He(y),false;He("");let st=Je.map(pt=>We.get(Po(pt))).filter(pt=>!!pt);return S?.(Je,st),true}let Ne=te.trim();return Ne?Ot([Ne])?(He(""),S?.(Ne,We.get(Po(Ne))??null),true):(ve&&He(y),false):(He(""),S?.(null,null),true)},oe=te=>{if(!u)return;let ve=te.target.value;Te(ve),He(""),At(ve,false);},Ke=f||ue,Oe=tt.length>0,ye=u&&(z||!!Ie)?Ve:q;return c(jsxRuntime.Fragment,{children:[e(ze,{...O,className:["orb-value-help-field",h&&Oe&&!I?"orb-value-help-has-clear":"",O.className??""].filter(Boolean).join(" "),disabled:I,value:ye,error:!!Ie||D,helperText:Ie||E,onChange:oe,onFocus:te=>{X(true),Te(nt),M?.(te);},onBlur:te=>{u&&At(Ve,true),X(false),A?.(te);},onKeyDown:Rt,InputProps:{...w,readOnly:!u,endAdornment:c("span",{className:"orb-value-help-actions",children:[Ke?e(Zo,{size:18}):null,h&&Oe&&!I?e(ie,{className:"orb-value-help-clear-trigger",size:"small",tooltip:l,"aria-label":l,onMouseDown:te=>te.preventDefault(),onClick:te=>{te.stopPropagation(),at();},children:e(Tt,{name:"decline",size:14})}):null,e(ie,{className:"orb-value-help-search-trigger",size:"small",tooltip:p,"aria-label":p,onMouseDown:te=>te.preventDefault(),onClick:te=>{te.stopPropagation(),Ce();},disabled:I,children:e(Tt,{name:"search",size:16})})]})}}),c(Lt,{open:F,onClose:Fe,fullWidth:true,maxWidth:820,hideCloseButton:true,PaperProps:{sx:te=>({borderRadius:2,overflow:"hidden",border:`1px solid ${te.palette.divider}`,boxShadow:_==="dark"?`0 24px 80px ${ot(te.palette.common.black,.72)}`:`0 24px 80px ${ot(te.palette.common.black,.18)}`})},children:[c("div",{className:"orb-dialog-title",sx:te=>({display:"flex",alignItems:"center",justifyContent:"space-between",gap:2,px:2.5,py:2,pr:1.5,borderBottom:`1px solid ${te.palette.divider}`,bgcolor:te.palette.background.paper}),children:[c("div",{children:[e(L,{sx:{fontSize:"1.05rem",fontWeight:800,lineHeight:1.25},children:a}),J?e(L,{variant:"body2",color:"text.secondary",sx:{mt:.25},children:`${ge.length} selected`}):null]}),e(ie,{"aria-label":"Close",onClick:Fe,size:"small",children:e(Sr,{fontSize:"small"})})]}),c("div",{className:"orb-dialog-content",sx:{p:0},children:[c(se,{direction:{xs:"column",sm:"row"},spacing:1,sx:te=>({px:2.5,py:1.5,borderBottom:`1px solid ${te.palette.divider}`,bgcolor:_==="dark"?ot(te.palette.common.white,.025):ot(te.palette.primary.main,.035)}),children:[e(ze,{size:"small",fullWidth:true,autoFocus:true,value:W,placeholder:i,onChange:te=>H(te.target.value),onKeyDown:te=>{te.key==="Enter"&&(te.preventDefault(),De());},InputProps:{startAdornment:e(cr,{position:"start",children:e(Tt,{name:"search",size:16})}),sx:te=>({borderRadius:1,bgcolor:te.palette.background.paper,"& fieldset":{borderColor:ot(te.palette.text.primary,_==="dark"?.2:.16)},"&:hover fieldset":{borderColor:ot(te.palette.primary.main,.52)},"&:focus-within fieldset":{borderColor:te.palette.primary.main}})}}),T?e(ke,{variant:"outlined",onClick:()=>{De();},disabled:Ke,sx:{minWidth:96,textTransform:"none",fontWeight:700},children:Ke?e(Zo,{size:18}):"Search"}):null]}),e("div",{sx:{maxHeight:420},children:c("table",{className:"orb-tbl",stickyHeader:true,size:"small",children:[e("thead",{children:c("tr",{children:[e("td",{padding:"checkbox",sx:te=>({bgcolor:_==="dark"?"var(--orb-canvas)":te.palette.background.paper,borderBottom:`1px solid ${te.palette.divider}`})}),ce.map(te=>e("td",{align:te.align==="inherit"?void 0:te.align,sx:ve=>({minWidth:te.minWidth,width:te.width,fontSize:"0.78rem",fontWeight:800,bgcolor:_==="dark"?"var(--orb-canvas)":ve.palette.background.paper,borderBottom:`1px solid ${ve.palette.divider}`}),children:te.label},String(te.field)))]})}),c("tbody",{children:[it.map(te=>{let ve=b(te),Ne=ge.some(Je=>Po(Je)===Po(ve));return c("tr",{hover:true,selected:Ne,onClick:()=>Ze(te),onDoubleClick:()=>{J||(we([ve]),S?.(ve,te),V(false));},sx:Je=>({cursor:"pointer","&.orb-selected":{bgcolor:ot(Je.palette.primary.main,_==="dark"?.22:.12)},"&.orb-selected:hover":{bgcolor:ot(Je.palette.primary.main,_==="dark"?.28:.18)}}),children:[e("td",{padding:"checkbox",children:e(It,{size:"small",checked:Ne})}),ce.map(Je=>{let st=Dp(te,Je.field);return e("td",{align:Je.align==="inherit"?void 0:Je.align,sx:{fontSize:"0.82rem",py:1},children:Je.render?Je.render(st,te):String(st??"")},String(Je.field))})]},Po(ve))}),it.length===0?e("tr",{children:e("td",{colSpan:ce.length+1,children:e("div",{sx:{py:5,textAlign:"center",color:"text.secondary"},children:m})})}):null]})]})})]}),c("div",{className:"orb-dialog-actions",sx:te=>({px:2.5,py:1.5,borderTop:`1px solid ${te.palette.divider}`,bgcolor:te.palette.background.paper,"& .orb-btn":{textTransform:"none",fontWeight:700}}),children:[h&&(Oe||ge.length>0)?e(ke,{onClick:at,children:l}):null,e("div",{sx:{flex:1}}),e(ke,{onClick:Fe,children:d}),e(ke,{variant:"contained",onClick:wt,disabled:!J&&ge.length===0,children:s})]})]})]})};P();var bi=({title:t,hideHeader:o,children:r})=>c("div",{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[!o&&e("div",{sx:{mb:2},children:e(L,{variant:"h4",children:t})}),e("div",{sx:{flex:1,overflow:"hidden"},children:r})]});var dl={width:56,minWidth:56,maxWidth:56,paddingLeft:"4px !important",paddingRight:"4px !important",paddingTop:"0 !important",paddingBottom:"0 !important",textAlign:"center",verticalAlign:"middle",boxSizing:"border-box"},pl={width:72,minWidth:72,maxWidth:72,paddingLeft:"4px !important",paddingRight:"4px !important",paddingTop:"0 !important",paddingBottom:"0 !important",textAlign:"center",verticalAlign:"middle",boxSizing:"border-box"},ea={width:30,height:30,p:.25,flex:"0 0 auto","& svg":{fontSize:20}},ta={width:30,height:30,minWidth:30,minHeight:30,p:.25,flex:"0 0 auto","& svg":{fontSize:20}},Ep={display:"flex",alignItems:"center",justifyContent:"center",gap:.25,width:"100%",minWidth:0},uo={width:32,height:32,minWidth:32,minHeight:32,p:0,flex:"0 0 auto",borderRadius:1,color:"text.secondary","& svg, & [data-sap-icon]":{width:16,height:16,fontSize:16,strokeWidth:1.8}};P();var jh={fontSize:"0.85rem",width:62,minWidth:62,"& .orb-select-trigger":{minHeight:"32px !important",height:"32px !important",padding:"0 8px !important"},"& .orb-select-chevron":{width:"11px !important",height:"11px !important",fontSize:"11px !important"}},vi=({rowsPerPage:t=20,rowsPerPageOptions:o=[20,50,100,-1],page:r=0,count:n=0,onRowsPerPageChange:a,onPageChange:i})=>{let{t:s}=le(),l=o.length>0?o:[20,50,100,-1],d=Math.max(0,r),p=t===-1?1:Math.max(1,Math.ceil(n/t)),m=Math.min(d+1,p),f=d>0,h=d<p-1&&t!==-1;return c("div",{className:"orb-table-pager",children:[e(L,{className:"orb-table-pager-label",children:s("table.toolbar.itemsPerPage")}),e(ct,{title:s("table.toolbar.itemsPerPage"),children:e(zt,{size:"small",variant:"standard",value:t,"aria-label":s("table.toolbar.itemsPerPage"),fullWidth:false,disableUnderline:true,onChange:u=>a?.(Number(u.target.value)),sx:jh,children:l.map(u=>e("option",{value:u,children:u===-1?s("common.all"):u},`rows-per-page-${u}`))})}),e("span",{className:"orb-table-pager-divider"}),e(ie,{className:"orb-table-pager-button","aria-label":"Previous page",size:"small",onClick:()=>i?.(Math.max(d-1,0)),disabled:!f,sx:uo,children:e(dp,{})}),c(L,{className:"orb-table-pager-page",title:s("table.toolbar.pageOf",{current:m,total:p}),children:[m," / ",p]}),e(ie,{className:"orb-table-pager-button","aria-label":"Next page",size:"small",onClick:()=>i?.(Math.min(d+1,p-1)),disabled:!h,sx:uo,children:e(kr,{})})]})};P();var yi=({value:t="",onChange:o})=>{let{t:r}=le();return e("div",{className:"orb-table-toolbar-search",children:e(ze,{className:"orb-table-toolbar-search-field",size:"small",placeholder:r("table.toolbar.searchPlaceholder"),value:t,onChange:n=>o?.(n.target.value),InputProps:{startAdornment:e(cr,{position:"start",children:e(zr,{size:16})})}})})};P();var Ci=t=>{let{t:o}=le(),r=Array.isArray(t.actions)?t.actions:t.actions?[t.actions]:[],n=Array.isArray(t.extraTools)?t.extraTools:t.extraTools?[t.extraTools]:[],a=[...r,...n],i=!!(t.showCreateButton||t.showEditButton||t.showDeleteButton),s=!!(t.onOpenGraphReport||t.onLayoutSave&&!t.layoutManager||t.layoutManager);return e(zd,{className:"orb-table-toolbar",role:"toolbar","aria-label":o("table.title.default"),children:c("div",{className:"orb-table-toolbar-primary",children:[e(yi,{value:t.filterText,onChange:l=>{t.setFilterText(l),t.onPageChange?.(0);}}),e(vi,{rowsPerPage:t.rowsPerPage,rowsPerPageOptions:t.rowsPerPageOptions,page:t.page,count:t.count,onRowsPerPageChange:t.onRowsPerPageChange,onPageChange:t.onPageChange}),a.length>0?e("div",{className:"orb-table-toolbar-custom",children:a.map((l,d)=>e(eo__namespace.default.Fragment,{children:l},`toolbar-custom-${d}`))}):null,e("span",{className:"orb-table-toolbar-spacer"}),c("div",{className:"orb-table-toolbar-actions",children:[c("div",{className:"orb-table-tool-group",children:[!t.disableGrouping&&e(ct,{title:o("table.toolbar.groupBy"),children:e(ie,{className:"orb-table-tool-button",sx:uo,onClick:l=>t.setGroupAnchorEl(t.groupAnchorEl?null:l.currentTarget),children:e(ni,{badgeContent:t.grouping?.length,color:"primary",invisible:!t.grouping?.length,children:e(wr,{})})})}),e(ct,{title:o("table.toolbar.summary"),children:e(ie,{className:`orb-table-tool-button ${t.showSummary?"orb-is-active":""}`,active:!!t.showSummary,sx:uo,onClick:l=>t.setSummaryAnchorEl(t.summaryAnchorEl?null:l.currentTarget),children:e(sn,{})})}),e(ct,{title:o("table.toolbar.columns"),children:e(ie,{className:"orb-table-tool-button",sx:uo,onClick:l=>t.setAnchorEl(t.anchorEl?null:l.currentTarget),children:e(ln,{})})}),e(ct,{title:o("table.toolbar.export"),children:e(ie,{className:"orb-table-tool-button",sx:uo,onClick:t.handleExport,children:e(np,{})})})]}),i&&c("div",{className:"orb-table-tool-group",children:[t.showCreateButton&&e(ct,{title:o("table.toolbar.newItem"),children:e(ie,{className:"orb-table-tool-button",onClick:t.onOpenCreateDialog,color:"primary.main",sx:uo,children:e(Hr,{})})}),t.showEditButton&&e(ct,{title:o("table.toolbar.editItem"),children:e("span",{children:e(ie,{className:"orb-table-tool-button",onClick:t.onOpenEditDialog,color:"primary.main",disabled:!!t.editDisabled,sx:uo,children:e(ip,{})})})}),t.showDeleteButton&&e(ct,{title:o("table.toolbar.deleteItem"),children:e("span",{children:e(ie,{className:"orb-table-tool-button",onClick:t.onOpenDeleteConfirm,disabled:!!t.deleteDisabled,sx:{...uo,color:"error.main"},children:e(li,{})})})})]}),s&&c("div",{className:"orb-table-tool-group",children:[t.onOpenGraphReport&&e(ct,{title:o("table.toolbar.graphicReport"),children:e(ie,{className:"orb-table-tool-button",sx:uo,onClick:t.onOpenGraphReport,children:e(lp,{})})}),t.onLayoutSave&&!t.layoutManager&&e(ct,{title:o("table.toolbar.saveLayout"),children:e(ie,{className:"orb-table-tool-button",sx:uo,onClick:l=>t.onLayoutSave(l),children:e(Pr,{})})}),t.layoutManager]})]})]})})};var xi=Object.freeze({Translate:{toString(t){if(!t)return;let{x:o,y:r}=t;return "translate3d("+(o?Math.round(o):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;let{scaleX:o,scaleY:r}=t;return "scaleX("+o+") scaleY("+r+")"}},Transform:{toString(t){if(t)return [xi.Translate.toString(t),xi.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:o,duration:r,easing:n}=t;return o+" "+r+"ms "+n}}});P();var wi=t=>{let{t:o}=le(),{onSelectAllClick:r,order:n,orderBy:a,sortBy:i=[],numSelected:s=0,rowCount:l=0,onRequestSort:d,onContextMenu:p,columns:m,visibleColumns:f,selectionMode:h,grouping:u=[],isAllExpanded:v=false,handleToggleAll:y,onColumnResize:g,columnWidths:x,enableColumnReorder:b=false,disableSorting:C=false}=t,[k,S]=eo.useState(null),T=eo.useRef(null),I=z=>X=>{C||k||d(z);},w=(z,X,W)=>{z.preventDefault(),z.stopPropagation(),S(X),T.current={startX:z.clientX,startWidth:W,colId:X},document.addEventListener("mousemove",M),document.addEventListener("mouseup",A),document.body.style.cursor="col-resize";},M=z=>{if(!T.current)return;let{startX:X,startWidth:W,colId:H}=T.current,U=z.clientX-X,Y=Math.max(50,W+U);g&&g(H,Y);},A=()=>{S(null),T.current=null,document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",A),document.body.style.cursor="";};eo.useEffect(()=>()=>{document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",A);},[]);let R=h==="multiple"||h==="single",D=u.length>0&&!!y,E=o(v?"table.group.collapseAll":"table.group.expandAll"),O=m.filter(z=>f.includes(z.id)),_=new Map(i.map((z,X)=>[z.field,{...z,priority:X+1}])),J=O.map(z=>{let X=x?.[z.id]||z.minWidth||100,W=_.get(z.id);return e(ab,{headCell:z,width:typeof X=="number"?X:100,order:n,orderBy:a,multiSortInfo:C?void 0:W,onRequestSort:I(z.id),onContextMenu:p,onResizeMouseDown:H=>w(H,z.id,typeof X=="number"?X:100),enableColumnReorder:b,disableSorting:C},z.id)}),F=O.map(z=>z.id),V=c("tr",{children:[R&&e("th",{className:"orb-table-control-head",style:{width:56,minWidth:56,maxWidth:56},children:e(It,{color:"primary",indeterminate:s>0&&s<l,checked:l>0&&s===l,onChange:r,disabled:h==="single",sx:ea})}),D&&e("th",{className:"orb-table-control-head",style:{width:72,minWidth:72,maxWidth:72},children:e(ct,{title:E,children:e(ie,{size:"small",onClick:z=>{z.stopPropagation(),y?.(!v);},sx:ta,children:v?e(fi,{}):e(hi,{})})})}),b?e(sortable.SortableContext,{items:F,strategy:sortable.horizontalListSortingStrategy,children:J}):J]});return e("thead",{children:V})},ab=({headCell:t,width:o,order:r,orderBy:n,multiSortInfo:a,onRequestSort:i,onContextMenu:s,onResizeMouseDown:l,enableColumnReorder:d,disableSorting:p})=>{let{setNodeRef:m,attributes:f,listeners:h,transform:u,transition:v,isDragging:y}=sortable.useSortable({id:t.id,disabled:!d}),g=d?{transform:xi.Transform.toString(u),transition:v,opacity:y?.6:1}:{},x=p?"asc":a?.direction??(n===t.id?r:"asc"),b=!p&&(!!a||n===t.id);return c("th",{ref:d?m:void 0,className:`orb-table-head-cell ${t.numeric?"orb-num":""} ${d?"orb-is-reorderable":""} ${y?"orb-is-dragging":""}`,"aria-sort":b?x==="asc"?"ascending":"descending":"none",onContextMenu:s?C=>s(C,t.id):void 0,style:{width:o,minWidth:o,maxWidth:o,...g},...d?f:{},...d?h:{},children:[p?e("span",{className:"orb-table-head-label",children:t.label}):e(Vd,{className:"orb-table-head-sort",active:b,direction:x,onClick:i,children:c("span",{className:"orb-table-head-label",children:[t.label,a&&e("span",{className:"orb-table-sort-priority",children:a.priority})]})}),e("div",{className:"orb-table-resize-handle",onMouseDown:l,onPointerDown:C=>C.stopPropagation(),onClick:C=>C.stopPropagation()})]})};P();var Si=t=>{let{t:o}=le(),{visibleRows:r,visibleColumns:n,selected:a=[],handleClick:i,columns:s,toggleGroupExpand:l,expandedGroups:d=new Set,selectionMode:p,grouping:m=[],isGroupFullyExpanded:f,handleExpandGroupRecursively:h,handleCollapseGroupRecursively:u,emptyLabel:v,getRowDataKey:y,getRowProps:g,getGroupRowProps:x}=t,b=T=>a.indexOf(T)!==-1,C=p==="multiple"||p==="single",k=m.length>0,S=n.length+(C?1:0)+(k?1:0);return c("tbody",{children:[r.map((T,I)=>{if(T.type==="group"){let w=d.has(T.id),M=T.childIds||[],A=M.filter(z=>b(z)).length,R=M.length>0&&A===M.length,D=A>0&&A<M.length,E={entry:T,data:T,id:T.id,index:I,selected:R,group:true},O=x?.(E)||{},{className:_,onClick:J,...F}=O,V=z=>{if(z.stopPropagation(),!!t.onSelectionChange)if(R){let X=a.filter(W=>!M.includes(W));t.onSelectionChange(X);}else {let X=Array.from(new Set([...a,...M]));t.onSelectionChange(X);}};return c("tr",{...F,"data-ctable-row-key":y?.(E),className:["orb-table-group-row",_].filter(Boolean).join(" "),onClick:J,sx:z=>({backgroundColor:"var(--orb-surface)","& th, & td":{color:z.palette.text.primary,borderBottomColor:z.palette.divider},"& .orb-icon-btn":{color:z.palette.text.primary},"& .orb-chk":{color:z.palette.text.secondary},"& .orb-chk:has(input:checked), & .orb-chk:has(input:indeterminate)":{color:z.palette.primary.main}}),children:[C&&e("td",{padding:"checkbox",sx:dl,children:e(It,{size:"small",checked:R,indeterminate:D,onChange:V,onClick:z=>z.stopPropagation(),sx:ea})}),k&&e("td",{padding:"checkbox",sx:pl,children:c("div",{sx:Ep,children:[m.length>1&&T.level<m.length-1&&e(ct,{title:f?.(T.id)?o("table.group.collapseAll"):o("table.group.expandAll"),children:e(ie,{size:"small",onClick:()=>{f?.(T.id)?u?.(T.id):h?.(T.id);},sx:ta,children:f?.(T.id)?e(fi,{}):e(hi,{})})}),e(ie,{size:"small",onClick:()=>l&&l(T.id),sx:ta,children:w?e($o,{}):e(kr,{})})]})}),e("td",{colSpan:n.length,sx:{py:1,pl:T.level*3+1},children:c(L,{variant:"body2",fontWeight:"bold",color:"text.primary",sx:{fontSize:"0.85rem"},children:[T.field,": ",T.value," (",T.count,")"]})})]},T.id)}else {let w=T.data||T,M=T.id||w.id||I,A=b(M),R=`enhanced-table-checkbox-${I}`,D={entry:T,data:w,id:M,index:I,selected:A,group:false},E=g?.(D)||{},{className:O,onClick:_,...J}=E,V=(T.level!==void 0?T.level:0)*4;return c("tr",{...J,"data-ctable-row-key":y?.(D),className:[A?"orb-is-selected":"",O].filter(Boolean).join(" "),onClick:z=>{_?.(z),z.defaultPrevented||i?.(z,w);},role:C?"checkbox":J.role,"aria-checked":C?A:J["aria-checked"],tabIndex:J.tabIndex??-1,children:[C&&e("td",{padding:"checkbox",sx:dl,children:e(It,{color:"primary",checked:A,inputProps:{"aria-labelledby":R},sx:ea})}),k&&e("td",{padding:"checkbox",sx:pl}),s.filter(z=>n.includes(z.id)).map((z,X)=>{let H=X===0&&V>0?{pl:V+2}:{};return e("td",{className:z.numeric?"orb-num":void 0,align:z.numeric?"right":"left",sx:H,children:z.render?z.render(w[z.id],w):(function(){let Y=w[z.id];if(z.numeric){if(typeof Y=="number")return Y.toLocaleString();if(typeof Y=="string"&&Y.trim()!==""&&!isNaN(Number(Y)))return Number(Y).toLocaleString()}return Y})()},z.id)})]},M)}}),r.length===0&&e("tr",{children:e("td",{colSpan:S,align:"center",children:v??o("common.noData")})})]})};P();var Lp=t=>{let{columns:o=[],visibleColumns:r,summaryRow:n,selectionMode:a,grouping:i=[],columnWidths:s={}}=t;if(!t.showSummary)return null;let l=a==="multiple"||a==="single",d=i.length>0,p=o.filter(m=>r.includes(m.id));return e("tfoot",{className:"orb-table-footer",style:{zIndex:t.zIndex},children:c("tr",{children:[l&&e("td",{className:"orb-table-footer-control",style:{width:56,minWidth:56,maxWidth:56}}),d&&e("td",{className:"orb-table-footer-control",style:{width:72,minWidth:72,maxWidth:72}}),p.map(m=>e("td",{className:`orb-table-footer-cell ${m.numeric?"orb-num":""}`,style:{width:s[m.id]||m.minWidth||100,minWidth:s[m.id]||m.minWidth||100,maxWidth:s[m.id]||m.minWidth||100},children:(function(){let h=n[m.id];return h==null||h===""?"":typeof h=="number"?h.toLocaleString():typeof h=="string"&&h.trim()!==""&&!isNaN(Number(h))?Number(h).toLocaleString():h})()},m.id))]})})};P();var Op=t=>{let{t:o}=le();return e("div",{sx:{p:2},children:e(L,{children:o("table.mobile.notImplemented")})})};P();var pn=({groupAnchorEl:t,setGroupAnchorEl:o,grouping:r,setGrouping:n,columns:a})=>{let{t:i}=le(),[s,l]=eo.useState(r);eo.useEffect(()=>{t&&l(r);},[t,r]);let d=()=>{l(r),o(null);},p=f=>{l(h=>h.includes(f)?h.filter(u=>u!==f):[...h,f]);},m=()=>{n(s),o(null);};return c(Qt,{anchorEl:t,open:!!t,onClose:d,sx:{width:224,minWidth:224,maxHeight:360,overflowY:"auto"},children:[c("div",{className:"orb-table-group-menu-header",onClick:f=>f.stopPropagation(),children:[e(L,{className:"orb-table-group-menu-title",variant:"subtitle2",children:i("table.menu.groupBy")}),s.length>0&&e(ke,{className:"orb-table-group-menu-clear",size:"small",color:"error",onClick:f=>{f.stopPropagation(),l([]);},children:i("table.menu.clearAll")})]}),e(Dt,{className:"orb-table-group-menu-divider"}),a.map(f=>{let h=s.includes(f.id),u=s.indexOf(f.id)+1;return e("option",{className:"orb-table-group-menu-option",selected:h,onClick:v=>{v.stopPropagation(),p(f.id);},children:c("div",{className:"orb-table-group-menu-option-content",children:[e(It,{className:"orb-table-group-menu-checkbox",checked:h,size:"small"}),e(Gt,{className:"orb-table-group-menu-label",primary:f.label}),h&&e("span",{className:"orb-table-group-menu-order","aria-label":`${i("table.menu.groupBy")} ${u}`,children:u})]})},f.id)}),c("div",{className:"orb-table-group-menu-footer",children:[e(ke,{size:"small",variant:"ghost",onClick:d,children:i("common.cancel")}),e(ke,{size:"small",variant:"primary",onClick:m,children:i("common.ok")})]})]})},un=({anchorEl:t,setAnchorEl:o,columns:r,visibleColumns:n,toggleColumnVisibility:a})=>{let{t:i}=le();return c(Qt,{anchorEl:t,open:!!t,onClose:()=>o(null),children:[e("option",{disabled:true,children:e(Gt,{primary:i("table.menu.visibleColumns")})}),e(Dt,{}),r.map(s=>c("option",{onClick:()=>a(s.id),children:[e(It,{checked:n.includes(s.id),size:"small"}),e(Gt,{primary:s.label})]},s.id))]})},ki=({anchorEl:t,setAnchorEl:o,showSummary:r,setShowSummary:n,columns:a,summaryColumns:i,toggleSummaryColumn:s})=>{let{t:l}=le();return c(Qt,{anchorEl:t,open:!!t,onClose:()=>o(null),children:[e("option",{children:e(Jn,{control:e(ai,{checked:r,onChange:d=>n(d.target.checked),size:"small"}),label:l("table.menu.showSummaryRow")})}),e(Dt,{}),a.filter(d=>d.numeric).map(d=>c("option",{onClick:()=>s(d.id),disabled:!r,children:[e(It,{checked:i.includes(d.id),size:"small"}),e(Gt,{primary:d.label})]},d.id)),a.filter(d=>d.numeric).length===0&&e("option",{disabled:true,children:e(Gt,{primary:l("table.menu.noNumericColumns")})})]})},Pi=({contextMenu:t,handleCloseContextMenu:o,columns:r,visibleColumns:n,toggleColumnVisibility:a})=>{let{t:i}=le();return c(Qt,{open:t!==null,onClose:o,anchorReference:"anchorPosition",anchorPosition:t!==null?{top:t.mouseY,left:t.mouseX}:void 0,children:[e("option",{onClick:o,children:i("common.copy")}),e(Dt,{}),e("option",{disabled:true,children:i("table.menu.visibleColumns")}),r.map(s=>c("option",{onClick:()=>a(s.id),children:[e(Wo,{children:n.includes(s.id)&&e(Qd,{fontSize:"small"})}),e(Gt,{children:s.label})]},s.id))]})},zp=({contextMenu:t,handleClose:o,columns:r,visibleColumns:n,grouping:a,summaryColumns:i,showSummary:s,sortBy:l,orderBy:d,order:p,onSortAsc:m,onSortDesc:f,onClearSort:h,onHideColumn:u,onToggleGroup:v,onToggleSummary:y,onOpenSortDialog:g})=>{let{t:x}=le(),b=t?.columnId??"",C=r.find(R=>R.id===b),k=a.includes(b),S=i.includes(b),T=!!C?.numeric,I=l.find(R=>R.field===b),w=I?I.direction==="asc":d===b&&p==="asc",M=I?I.direction==="desc":d===b&&p==="desc",A=w||M;return c(Qt,{open:t!==null,onClose:o,anchorReference:"anchorPosition",anchorPosition:t!==null?{top:t.mouseY,left:t.mouseX}:void 0,children:[e("option",{disabled:true,sx:{opacity:"1 !important",fontWeight:700},children:e(Gt,{primary:C?.label??b})}),e(Dt,{}),c("option",{onClick:()=>{m(b),o();},selected:w,children:[e(Wo,{children:e(cl,{fontSize:"small"})}),e(Gt,{primary:x("table.headerMenu.sortAsc")})]}),c("option",{onClick:()=>{f(b),o();},selected:M,children:[e(Wo,{children:e(ll,{fontSize:"small"})}),e(Gt,{primary:x("table.headerMenu.sortDesc")})]}),A&&c("option",{onClick:()=>{h(b),o();},children:[e(Wo,{children:e(ep,{fontSize:"small"})}),e(Gt,{primary:x("table.headerMenu.clearSort")})]}),c("option",{onClick:()=>{g(),o();},children:[e(Wo,{children:e(Hr,{fontSize:"small"})}),e(Gt,{primary:x("table.headerMenu.configureSort")})]}),e(Dt,{}),c("option",{onClick:()=>{v(b),o();},selected:k,children:[e(Wo,{children:e(wr,{fontSize:"small"})}),e(Gt,{primary:x(k?"table.headerMenu.ungroup":"table.headerMenu.group")})]}),T&&s&&c("option",{onClick:()=>{y(b),o();},selected:S,children:[e(Wo,{children:e(sn,{fontSize:"small"})}),e(Gt,{primary:x(S?"table.headerMenu.removeSummary":"table.headerMenu.addSummary")})]}),e(Dt,{}),c("option",{onClick:()=>{u(b),o();},children:[e(Wo,{children:e(Ip,{fontSize:"small"})}),e(Gt,{primary:x("table.headerMenu.hideColumn")})]})]})},Vp=({open:t,onClose:o,columns:r,initialRules:n,onApply:a,onClear:i})=>{let{t:s}=le(),[l,d]=eo.useState([]);eo.useEffect(()=>{t&&d(n.length>0?n.map(y=>({...y})):[]);},[t,n]);let p=eo.useMemo(()=>new Set(l.map(y=>y.field)),[l]),m=eo.useMemo(()=>r.filter(y=>!p.has(y.id)),[r,p]),f=()=>{let y=m[0];y&&d(g=>[...g,{field:y.id,direction:"asc"}]);},h=y=>{d(g=>g.filter((x,b)=>b!==y));},u=(y,g)=>{d(x=>x.map((b,C)=>C===y?{...b,...g}:b));},v=(y,g)=>{d(x=>{let b=y+g;if(b<0||b>=x.length)return x;let C=[...x],[k]=C.splice(y,1);return C.splice(b,0,k),C});};return e(Lt,{open:t,onClose:o,maxWidth:620,fullWidth:true,className:"orb-table-sort-dialog",title:s("table.sortDialog.title"),actions:c(jsxRuntime.Fragment,{children:[e(ke,{className:"orb-table-sort-clear",variant:"neutral",disabled:l.length===0&&n.length===0,onClick:()=>{i(),o();},children:s("table.sortDialog.clearAll")}),e("span",{className:"orb-table-sort-action-spacer"}),e(ke,{variant:"neutral",onClick:o,children:s("common.cancel")}),e(ke,{variant:"primary",onClick:()=>{a(l),o();},children:s("common.ok")})]}),children:c("div",{className:"orb-table-sort-dialog-content",children:[l.length===0?e(L,{className:"orb-table-sort-empty",variant:"body2",children:s("table.sortDialog.empty")}):e(se,{className:"orb-table-sort-rules",spacing:1,children:l.map((y,g)=>{let x=new Set(l.filter((C,k)=>k!==g).map(C=>C.field)),b=r.filter(C=>!x.has(C.id));return c("div",{className:"orb-table-sort-rule",children:[e(ni,{className:"orb-table-sort-order",badgeContent:g+1,color:"primary"}),e(zt,{size:"small",value:y.field,onChange:C=>u(g,{field:C.target.value}),options:b.map(C=>({value:C.id,label:C.label}))}),e(zt,{size:"small",value:y.direction,onChange:C=>u(g,{direction:C.target.value}),options:[{value:"asc",label:s("table.sortDialog.asc")},{value:"desc",label:s("table.sortDialog.desc")}]}),e(ie,{className:"orb-table-sort-icon-button",size:"small",onClick:()=>v(g,-1),disabled:g===0,children:e(cl,{fontSize:"small"})}),e(ie,{className:"orb-table-sort-icon-button",size:"small",onClick:()=>v(g,1),disabled:g===l.length-1,children:e(ll,{fontSize:"small"})}),e(ie,{className:"orb-table-sort-icon-button orb-table-sort-delete",size:"small",onClick:()=>h(g),children:e(ci,{fontSize:"small"})})]},`sort-rule-${g}`)})}),e(ke,{size:"small",onClick:f,disabled:m.length===0,startIcon:e(Hr,{}),variant:"secondary",className:"orb-table-sort-add",children:s("table.sortDialog.addRule")})]})})};P();var oa=(t,o=2)=>t.toLocaleString(void 0,{maximumFractionDigits:o}),Wp=({kpis:t})=>{let{t:o}=le(),r=[{label:o("graph.kpi.totalRecords"),value:oa(t.totalRecords,0),color:"var(--orb-fg)"},{label:o("graph.kpi.totalReport"),value:oa(t.totalReportHours),color:"var(--orb-fg)"},{label:o("graph.kpi.totalBillable"),value:oa(t.totalBillableHours),color:"var(--orb-primary)"},{label:o("graph.kpi.efficiency"),value:`${t.efficiency.toFixed(2)}%`,color:"var(--orb-accent)"},{label:o("graph.kpi.amount"),value:oa(t.totalAmount),color:"var(--orb-primary)"},{label:o("graph.kpi.flagged"),value:oa(t.flaggedCount,0),color:"var(--orb-err)"}];return e("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(140px, 1fr))",gap:12},children:r.map(n=>c(Ae,{elevation:0,sx:{padding:12,minHeight:96,display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[e(L,{variant:"caption",muted:true,children:n.label}),e(L,{variant:"h3",sx:{fontWeight:800,color:n.color,fontVariantNumeric:"tabular-nums"},children:n.value})]},n.label))})};P();var Ti=({title:t,subtitle:o,children:r})=>c(Ae,{elevation:0,sx:{padding:16},children:[e(L,{variant:"h4",sx:{fontWeight:700},children:t}),o&&e(L,{variant:"body2",muted:true,sx:{marginBottom:16},children:o}),r]});P();var ra=({data:t,orientation:o="horizontal",valueSuffix:r="",minHeight:n=210,activeName:a,onItemClick:i})=>{if(t.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let s=Math.max(...t.map(l=>l.value),1);return o==="vertical"?e("div",{style:{display:"flex",gap:1,alignItems:"flex-end",minHeight:n},children:t.map(l=>c("div",{style:{flex:1,minWidth:0},children:[e("div",{onClick:()=>i?.(l),sx:{height:`${Math.max(l.value/s*180,6)}px`,background:l.name===a?"primary.dark":"primary.main",borderRadius:"8px 8px 0 0",cursor:i?"pointer":"default",opacity:a&&l.name!==a?.45:1}}),e(L,{variant:"caption",title:l.name,sx:{display:"block",mt:.5},children:l.name}),c(L,{variant:"caption",muted:true,children:[l.value.toFixed(1),r]})]},l.name))}):e(se,{spacing:1,children:t.map(l=>c("div",{style:{display:"grid",gridTemplateColumns:"140px 1fr 64px",gap:1},children:[e(L,{variant:"caption",muted:true,title:l.name,children:l.name}),e("div",{onClick:()=>i?.(l),sx:{alignSelf:"center",background:"action.hover",height:10,borderRadius:999,overflow:"hidden",cursor:i?"pointer":"default",opacity:a&&l.name!==a?.45:1},children:e("div",{style:{width:`${l.value/s*100}%`,height:"100%",background:l.name===a?"primary.dark":"primary.main"}})}),c(L,{variant:"caption",sx:{textAlign:"right",fontWeight:600},children:[l.value.toFixed(1),r]})]},l.name))})};P();var $p=({data:t,color:o="var(--orb-chart-1)",valueSuffix:r="",height:n=220})=>{if(t.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let a=640,i=28,s=t.map(h=>h.value),l=Math.min(...s,0),p=Math.max(...s,1)-l||1,m=t.map((h,u)=>{let v=i+u*(a-i*2)/Math.max(t.length-1,1),y=n-i-(h.value-l)/p*(n-i*2);return {x:v,y,...h}}),f=m.map(h=>`${h.x},${h.y}`).join(" ");return c("div",{children:[c("div",{component:"svg",viewBox:`0 0 ${a} ${n}`,style:{width:"100%",height:n},children:[e("line",{x1:i,y1:n-i,x2:a-i,y2:n-i,style:{stroke:"var(--orb-chart-grid)"}}),e("polyline",{fill:"none",style:{stroke:o},strokeWidth:3,points:f}),m.map(h=>e("circle",{cx:h.x,cy:h.y,r:4,style:{fill:o}},h.name))]}),e("div",{sx:{mt:1,display:"grid",gridTemplateColumns:`repeat(${t.length}, minmax(0, 1fr))`,gap:1},children:t.map(h=>c("div",{style:{minWidth:0},children:[e(L,{variant:"caption",title:h.name,sx:{display:"block"},children:h.name}),c(L,{variant:"caption",muted:true,children:[h.value.toFixed(1),r]})]},h.name))})]})};P();var _p=({data:t,barColor:o="var(--orb-chart-1)",lineColor:r="var(--orb-chart-5)",height:n=220})=>{if(t.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let a=640,i=28,s=Math.max(...t.map(m=>m.barValue),1),l=Math.max(...t.map(m=>m.lineValue),1),d=t.map((m,f)=>{let h=(a-i*2)/t.length,u=Math.max(h*.5,8),v=i+f*h+(h-u)/2,y=m.barValue/s*(n-i*2),g=n-i-y;return {x:v,y:g,barHeight:y,barWidth:u,item:m}}),p=t.map((m,f)=>{let h=(a-i*2)/t.length,u=i+f*h+h/2,v=n-i-m.lineValue/l*(n-i*2);return {x:u,y:v,item:m}});return c(se,{spacing:1.25,children:[c("div",{component:"svg",viewBox:`0 0 ${a} ${n}`,style:{width:"100%",height:n},children:[e("line",{x1:i,y1:n-i,x2:a-i,y2:n-i,style:{stroke:"var(--orb-chart-grid)"}}),d.map(m=>e("rect",{x:m.x,y:m.y,width:m.barWidth,height:Math.max(m.barHeight,4),rx:6,style:{fill:o}},m.item.name)),e("polyline",{fill:"none",style:{stroke:r},strokeWidth:3,points:p.map(m=>`${m.x},${m.y}`).join(" ")}),p.map(m=>e("circle",{cx:m.x,cy:m.y,r:3.5,style:{fill:r}},`${m.item.name}-line`))]}),e("div",{style:{display:"grid",gridTemplateColumns:`repeat(${t.length}, minmax(0, 1fr))`,gap:1},children:t.map(m=>c("div",{style:{minWidth:0},children:[e(L,{variant:"caption",title:m.name,sx:{display:"block"},children:m.name}),c(L,{variant:"caption",muted:true,sx:{display:"block"},children:["Bar: ",m.barValue.toFixed(1)]}),c(L,{variant:"caption",muted:true,sx:{display:"block"},children:["Line: ",m.lineValue.toFixed(1)]})]},m.name))})]})};P();var ib=t=>{let r=.2+Math.max(0,Math.min(1,t))*.8;return `color-mix(in oklch, var(--orb-chart-1) ${Math.round(r*100)}%, transparent)`},Gp=({data:t})=>{if(t.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let o=Array.from(new Set(t.map(i=>i.x))),r=Array.from(new Set(t.map(i=>i.y))),n=Math.max(...t.map(i=>i.value),1),a=new Map(t.map(i=>[`${i.y}__${i.x}`,i.value]));return e("div",{style:{overflowX:"auto"},children:c("div",{style:{display:"grid",gridTemplateColumns:`120px repeat(${o.length}, minmax(64px, 1fr))`,gap:1,minWidth:120+o.length*64},children:[e("div",{}),o.map(i=>e(L,{variant:"caption",sx:{textAlign:"center",fontWeight:600},children:i},i)),r.map(i=>c("div",{style:{display:"contents"},children:[e(L,{variant:"caption",sx:{alignSelf:"center"},children:i}),o.map(s=>{let l=a.get(`${i}__${s}`)||0,d=l/n;return e("div",{sx:{height:36,borderRadius:1,background:ib(d),border:"1px solid color-mix(in oklch, var(--orb-muted) 20%, transparent)",display:"flex",alignItems:"center",justifyContent:"center"},children:e(L,{variant:"caption",sx:{fontWeight:700},children:l.toFixed(1)})},`${i}-${s}`)})]},i))]})})};P();var sb=["var(--orb-chart-1)","var(--orb-chart-2)","var(--orb-chart-5)","var(--orb-chart-negative)","var(--orb-chart-4)","var(--orb-chart-3)"],Ii=({data:t,variant:o="donut",colors:r=sb,size:n=180,activeName:a,onItemClick:i})=>{if(t.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let s=0,l=t.map((d,p)=>{let m=s;return s+=d.percent,`${r[p%r.length]} ${m}% ${s}%`});return c(se,{direction:{xs:"column",sm:"row"},spacing:2,alignItems:"center",children:[e("div",{style:{width:n,height:n,borderRadius:"50%",background:`conic-gradient(${l.join(", ")})`,position:"relative",flexShrink:0},children:o==="donut"&&e("div",{style:{position:"absolute",inset:Math.round(n*.18),background:"background.paper",borderRadius:"50%"}})}),e(se,{spacing:1,sx:{minWidth:180},children:t.map((d,p)=>c("div",{onClick:()=>i?.(d),sx:{display:"flex",alignItems:"center",gap:1,cursor:i?"pointer":"default",opacity:a&&d.name!==a?.45:1},children:[e("div",{style:{width:10,height:10,borderRadius:"50%",background:r[p%r.length]}}),e(L,{variant:"caption",sx:{flex:1},children:d.name}),c(L,{variant:"caption",sx:{fontWeight:700},children:[d.percent.toFixed(0),"%"]})]},d.name))})]})};P();var Up=({effect:t,branches:o})=>{if(o.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let r=o.filter((a,i)=>i%2===0),n=o.filter((a,i)=>i%2===1);return c(se,{spacing:1.5,children:[e("div",{style:{display:"grid",gridTemplateColumns:`repeat(${Math.max(r.length,1)}, minmax(0, 1fr))`,gap:1},children:r.map(a=>c("div",{sx:{borderLeft:"2px solid",borderColor:"divider",pl:1},children:[e(L,{variant:"caption",sx:{fontWeight:700},children:a.title}),a.causes.map(i=>e(L,{variant:"caption",muted:true,sx:{display:"block"},children:i},i))]},a.title))}),c("div",{style:{position:"relative",height:32},children:[e("div",{style:{position:"absolute",inset:"50% 0 auto 0",borderTop:"2px solid",borderColor:"primary.main"}}),e("div",{sx:{position:"absolute",right:0,top:"calc(50% - 12px)",px:1,py:.25,borderRadius:1,background:"primary.main",color:"primary.contrastText"},children:e(L,{variant:"caption",sx:{fontWeight:700},children:t})})]}),e("div",{style:{display:"grid",gridTemplateColumns:`repeat(${Math.max(n.length,1)}, minmax(0, 1fr))`,gap:1},children:n.map(a=>c("div",{sx:{borderLeft:"2px solid",borderColor:"divider",pl:1},children:[e(L,{variant:"caption",sx:{fontWeight:700},children:a.title}),a.causes.map(i=>e(L,{variant:"caption",muted:true,sx:{display:"block"},children:i},i))]},a.title))})]})};P();var Kp=({data:t,height:o=240})=>{if(t.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let r=0,n=t.map(f=>{let h=f.type==="total"?0:r,u=f.type==="total"?f.value:r+f.value;return f.type!=="total"&&(r=u),{...f,start:h,end:u,delta:u-h}}),a=n.flatMap(f=>[f.start,f.end]),i=Math.min(...a,0),s=Math.max(...a,1),l=680,d=30,p=s-i||1,m=f=>o-d-(f-i)/p*(o-d*2);return c("div",{children:[c("div",{component:"svg",viewBox:`0 0 ${l} ${o}`,style:{width:"100%",height:o},children:[e("line",{x1:d,y1:m(0),x2:l-d,y2:m(0),style:{stroke:"var(--orb-chart-grid)"}}),n.map((f,h)=>{let u=(l-d*2)/n.length,v=Math.max(u*.55,8),y=d+h*u+(u-v)/2,g=m(Math.max(f.start,f.end)),x=m(Math.min(f.start,f.end)),b=f.type==="total"?"var(--orb-chart-1)":f.delta>=0?"var(--orb-chart-positive)":"var(--orb-chart-negative)";return c("g",{children:[e("rect",{x:y,y:g,width:v,height:Math.max(x-g,4),rx:6,style:{fill:b}}),e("text",{x:y+v/2,y:g-6,textAnchor:"middle",fill:"currentColor",fontSize:"11",children:f.end.toFixed(1)})]},f.name)})]}),e("div",{sx:{mt:1,display:"grid",gridTemplateColumns:`repeat(${n.length}, minmax(0, 1fr))`,gap:1},children:n.map(f=>e(L,{variant:"caption",title:f.name,children:f.name},f.name))})]})};var na=({apiKey:t,query:o,zoom:r=14,mapType:n="roadmap"})=>{let a=encodeURIComponent(o);return `https://www.google.com/maps/embed/v1/place?key=${encodeURIComponent(t)}&q=${a}&zoom=${r}&maptype=${n}`},IM=(t,o=360)=>{let r=na(t);return `<iframe width="100%" height="${o}" style="border:0" loading="lazy" allowfullscreen referrerpolicy="no-referrer-when-downgrade" src="${r}"></iframe>`};P();var qp=({apiKey:t,query:o,embedUrl:r,zoom:n=14,mapType:a="roadmap",height:i=320})=>{let s=r||(t&&o?na({apiKey:t,query:o,zoom:n,mapType:a}):"");return s?c("div",{children:[e("div",{component:"iframe",src:s,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",sx:{width:"100%",height:i,border:0,borderRadius:2}}),c(L,{variant:"caption",muted:true,sx:{mt:.75,display:"block"},children:["If iframe is blocked, open directly: ",e("a",{href:s,target:"_blank",rel:"noreferrer",children:"Google Maps"})]})]}):e("div",{children:e(L,{variant:"body2",muted:true,children:"Google Map requires `embedUrl` or (`apiKey` + `query`)."})})};var Ri=({keyword:t,location:o,src:r="orbcafe-ui"})=>{if(o){let n=encodeURIComponent(o.name||t||"Location");return `https://uri.amap.com/marker?position=${o.lng},${o.lat}&name=${n}&src=${encodeURIComponent(r)}&coordinate=gaode&callnative=0`}return t?`https://uri.amap.com/search?keyword=${encodeURIComponent(t)}&src=${encodeURIComponent(r)}&callnative=0`:"https://uri.amap.com/search?keyword=%E5%8C%97%E4%BA%AC&src=orbcafe-ui&callnative=0"};P();var Xp=({keyword:t,location:o,embedUrl:r,height:n=320})=>{let a=r||Ri({keyword:t,location:o?{lng:o.lng,lat:o.lat,name:o.name}:void 0});return c("div",{children:[e("div",{component:"iframe",src:a,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",sx:{width:"100%",height:n,border:0,borderRadius:2}}),c(L,{variant:"caption",muted:true,sx:{mt:.75,display:"block"},children:["If iframe is blocked, open directly: ",e("a",{href:a,target:"_blank",rel:"noreferrer",children:"AMap"})]})]})};P();var Yp=({billableByPrimary:t,efficiencyBySecondary:o,statusDistribution:r,interaction:n})=>{let{t:a}=le();return c("div",{style:{display:"grid",gap:12,gridTemplateColumns:"repeat(auto-fit, minmax(320px, 1fr))"},children:[e(Ti,{title:a("graph.chart.billable.title"),subtitle:a("graph.chart.billable.subtitle"),children:e(ra,{data:t,orientation:"horizontal",activeName:n?.filters?.primaryDimension,onItemClick:i=>n?.onPrimaryDimensionClick?.(i.name)})}),e(Ti,{title:a("graph.chart.efficiency.title"),subtitle:a("graph.chart.efficiency.subtitle"),children:e(ra,{data:o,orientation:"vertical",valueSuffix:"%",activeName:n?.filters?.secondaryDimension,onItemClick:i=>n?.onSecondaryDimensionClick?.(i.name)})}),e(Ti,{title:a("graph.chart.status.title"),subtitle:a("graph.chart.status.subtitle"),children:e(Ii,{data:r,variant:"donut",activeName:n?.filters?.status,onItemClick:i=>n?.onStatusClick?.(i.name)})})]})};P();var cb=["doubao-lite","gpt-4o-mini","gpt-4.1-mini","claude-3.5-sonnet"],db=["zh","en","de","fr","ja","ko"],Zp=({open:t,onClose:o,value:r,onSaveAll:n,modelOptions:a=cb,promptLangOptions:i=db,analysisTemplateOptions:s=[],responseTemplateOptions:l=[],defaultAnalysisTemplateId:d,defaultResponseTemplateId:p})=>{let[m,f]=eo.useState(r),[h,u]=eo.useState(d||""),[v,y]=eo.useState(p||""),[g,x]=eo.useState(false);eo.useEffect(()=>{t&&(f(r),u(d||""),y(p||""));},[t,r,d,p]);let b=(k,S)=>{f(T=>({...T,[k]:S}));},C=async()=>{if(n)try{x(!0),await n({settings:m,analysisTemplateId:h||void 0,responseTemplateId:v||void 0});}finally{x(false);}};return c(Lt,{open:t,onClose:o,fullWidth:true,maxWidth:"lg",children:[c("div",{className:"orb-dialog-title",sx:{pr:7,pb:2.2},children:[e(L,{variant:"h5",sx:{fontWeight:800},children:"AI Settings"}),e(L,{variant:"body2",color:"text.secondary",sx:{mt:.5},children:"Configure LLM settings and editable agent prompts by language."}),e(ie,{onClick:o,sx:{position:"absolute",right:12,top:12},children:e(Sr,{})})]}),e("div",{className:"orb-dialog-content",sx:{pt:"18px !important"},children:c(se,{spacing:2.2,children:[c("div",{sx:{mt:.8,display:"grid",gap:1.5,gridTemplateColumns:{xs:"1fr",md:"repeat(2, minmax(0, 1fr))"}},children:[e("div",{children:e(ze,{size:"small",value:m.baseUrl,onChange:k=>b("baseUrl",k.target.value),fullWidth:true,label:"Base URL"})}),e("div",{children:e(ze,{size:"small",type:"password",value:m.apiKey,onChange:k=>b("apiKey",k.target.value),fullWidth:true,label:"API Key"})}),e("div",{children:e(ze,{size:"small",value:m.model,onChange:k=>b("model",k.target.value),fullWidth:true,select:true,label:"Model",children:a.map(k=>e("option",{value:k,children:k},k))})}),e("div",{children:e(ze,{size:"small",value:m.promptLang,onChange:k=>b("promptLang",k.target.value),fullWidth:true,select:true,label:"Prompt Lang",children:i.map(k=>e("option",{value:k,children:k},k))})})]}),c("div",{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[c(ze,{size:"small",value:h,onChange:k=>u(k.target.value),fullWidth:true,select:true,label:"Analysis Template",children:[e("option",{value:"",children:"Default"}),s.map(k=>e("option",{value:k.id,children:k.label},k.id))]}),e($n,{multiline:true,minRows:8,value:m.analysisPrompt,onChange:k=>b("analysisPrompt",k.target.value),fullWidth:true,label:"Analysis Prompt",sx:{"& textarea":{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"}}}),c(ze,{size:"small",value:v,onChange:k=>y(k.target.value),fullWidth:true,select:true,label:"Response Template",children:[e("option",{value:"",children:"Default"}),l.map(k=>e("option",{value:k.id,children:k.label},k.id))]}),e($n,{multiline:true,minRows:8,value:m.responsePrompt,onChange:k=>b("responsePrompt",k.target.value),fullWidth:true,label:"Response Prompt",sx:{"& textarea":{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"}}})]})]})}),c("div",{className:"orb-dialog-actions",sx:{px:3,pb:2.5,pt:1.2,gap:1},children:[e(ke,{variant:"outlined",onClick:o,children:"Cancel"}),e(ke,{variant:"contained",onClick:C,disabled:!n||g,children:"Save"})]})]})};P();var Di=({open:t,onClose:o,model:r,tableContent:n,extraCharts:a,interaction:i,aiAssistant:s})=>{let{t:l}=le(),[d,p]=eo.useState(s?.defaultPrompt||""),[m,f]=eo.useState(false),[h,u]=eo.useState(false),v=i?.enabled!==false&&!!i,y=s?.enabled!==false,g=i?.filters||{},x=!!(g.primaryDimension||g.secondaryDimension||g.status),b=s?.placeholder||"Ask AI to analyze data, create charts, or find insights...";eo.useEffect(()=>{t&&p(s?.defaultPrompt||"");},[t,s?.defaultPrompt]);let C=s?.settings||{baseUrl:"/llm-api",apiKey:"",model:"doubao-lite",promptLang:"zh",analysisPrompt:"",responsePrompt:""},k=async()=>{let S=d.trim();if(!(!S||!s?.onSubmit))try{f(!0),await s.onSubmit(S,{filters:g,model:r});}finally{f(false);}};return e(Lt,{open:t,onClose:o,fullWidth:true,maxWidth:1400,hideCloseButton:true,children:c("div",{style:{height:"80vh",display:"flex",flexDirection:"column",background:"var(--orb-canvas)"},children:[e("div",{style:{padding:16,borderBottom:"1px solid var(--orb-border)"},children:c(se,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:12,children:[c(se,{direction:"row",spacing:10,alignItems:"center",sx:{flexWrap:"wrap"},children:[e(L,{variant:"h3",sx:{fontWeight:800},children:r.title}),e(xt,{label:l("graph.records",{count:r.kpis.totalRecords})}),v&&g.primaryDimension&&e(xt,{tone:"outline",label:`${i?.fieldMapping.primaryDimension}: ${g.primaryDimension}`,onDelete:()=>i?.onClearFilter("primaryDimension")}),v&&g.secondaryDimension&&e(xt,{tone:"outline",label:`${i?.fieldMapping.secondaryDimension}: ${g.secondaryDimension}`,onDelete:()=>i?.onClearFilter("secondaryDimension")}),v&&g.status&&e(xt,{tone:"outline",label:`${i?.fieldMapping.status}: ${g.status}`,onDelete:()=>i?.onClearFilter("status")}),v&&x&&e(ke,{size:"small",variant:"ghost",onClick:()=>i?.onClearAll(),children:"Clear"})]}),c(se,{direction:"row",spacing:10,alignItems:"center",children:[y&&c("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 10px",borderRadius:999,border:"1px solid var(--orb-border)",background:"var(--orb-surface)",minWidth:320},children:[e(ie,{size:"small",onClick:s?.onVoiceInput,children:e(za,{size:16,strokeWidth:1.8})}),e("input",{className:"orb-inp orb-inp-dense",value:d,onChange:S=>p(S.target.value),onKeyDown:S=>{S.key==="Enter"&&(S.preventDefault(),k());},placeholder:b,style:{fontSize:14,border:"none",background:"transparent",flex:1,minWidth:0}}),e(ie,{size:"small",onClick:k,disabled:m||!d.trim(),children:e(od,{size:16,strokeWidth:1.8})}),e(ie,{size:"small",onClick:()=>u(true),children:e(tn,{size:16,strokeWidth:1.8})})]}),e(ie,{onClick:o,children:e(qt,{size:18,strokeWidth:2})})]})]})}),c("div",{style:{padding:16,display:"flex",flexDirection:"column",gap:12,overflow:"auto",minHeight:0},children:[e(Wp,{kpis:r.kpis}),e(Yp,{billableByPrimary:r.charts.billableByPrimary,efficiencyBySecondary:r.charts.efficiencyBySecondary,statusDistribution:r.charts.statusDistribution,interaction:v?{filters:g,onPrimaryDimensionClick:S=>i?.onPrimaryDimensionClick(S),onSecondaryDimensionClick:S=>i?.onSecondaryDimensionClick(S),onStatusClick:S=>i?.onStatusClick(S)}:void 0}),a,n]}),e(Zp,{open:h,onClose:()=>u(false),value:C,onSaveAll:s?.onSaveAll,modelOptions:s?.modelOptions,promptLangOptions:s?.promptLangOptions,analysisTemplateOptions:s?.analysisTemplateOptions,responseTemplateOptions:s?.responseTemplateOptions,defaultAnalysisTemplateId:s?.defaultAnalysisTemplateId,defaultResponseTemplateId:s?.defaultResponseTemplateId})]})})};var Rr={primaryDimension:["Client","Customer","Category","Project"],secondaryDimension:["Person","Consultant","Owner","Name"],status:["Status","state"],date:["Date","WorkDate","CreatedAt"],description:["Description","Task","Title","Memo"],reportHours:["Report_Hour","Report Hours","Hours","ReportHours"],billableHours:["Billable_Hour","Billable Hours","BillableHours"],amount:["Amount","Billable_Amount","Total_Amount","Value"]},ub=5,jp=t=>t.toLowerCase().replace(/[\s_-]/g,""),Mr=(t,o,r,n)=>{if(o)return o;if(t.length===0)return n;let a=Object.keys(t[0]),i=new Map(a.map(s=>[jp(s),s]));for(let s of r){let l=i.get(jp(s));if(l)return l}return a[0]||n},To=t=>{if(typeof t=="number")return Number.isFinite(t)?t:0;if(typeof t=="string"){let o=Number(t.replace(/,/g,"").trim());return Number.isFinite(o)?o:0}return 0},ho=(t,o)=>t==null||t===""?o:String(t),mb=(t,o,r,n,a)=>{let i=new Map;return t.forEach(s=>{let l=ho(s[o],a);i.set(l,(i.get(l)||0)+To(s[r]));}),Array.from(i.entries()).map(([s,l])=>({name:s,value:l})).sort((s,l)=>l.value-s.value).slice(0,n)},gb=(t,o,r,n,a,i)=>{let s=new Map;return t.forEach(l=>{let d=ho(l[o],i),p=s.get(d)||{report:0,billable:0};p.report+=To(l[r]),p.billable+=To(l[n]),s.set(d,p);}),Array.from(s.entries()).map(([l,d])=>({name:l,value:d.report>0?d.billable/d.report*100:0})).sort((l,d)=>l.value-d.value).slice(0,a)},fb=(t,o,r)=>{let n=t.length;if(n===0)return [];let a=new Map;return t.forEach(i=>{let s=ho(i[o],r);a.set(s,(a.get(s)||0)+1);}),Array.from(a.entries()).map(([i,s])=>({name:i,value:s,percent:s/n*100}))},Qp=(t,o,r)=>{let n=new Map;return t.forEach(a=>{let i=ho(a[o],"N/A");n.set(i,(n.get(i)||0)+To(a[r]));}),Array.from(n.entries()).sort(([a],[i])=>a.localeCompare(i)).map(([a,i])=>({name:a,value:i}))},hb=(t,o,r,n,a,i)=>{let s=new Map;return t.forEach(l=>{let d=ho(l[o],i),p=s.get(d)||{report:0,billable:0};p.report+=To(l[r]),p.billable+=To(l[n]),s.set(d,p);}),Array.from(s.entries()).map(([l,d])=>({name:l,barValue:d.billable,lineValue:d.report>0?d.billable/d.report*100:0})).sort((l,d)=>d.barValue-l.barValue).slice(0,a)},bb=(t,o,r,n,a)=>{let i=new Map;return t.forEach(s=>{let l=ho(s[o],a),d=ho(s[r],a),p=`${l}__${d}`;i.set(p,(i.get(p)||0)+To(s[n]));}),Array.from(i.entries()).map(([s,l])=>{let[d,p]=s.split("__");return {x:d,y:p,value:l}})},vb=(t,o,r)=>{let n=Qp(t,o,r),a=n.map(s=>({name:s.name,value:s.value,type:"delta"})),i=n.reduce((s,l)=>s+l.value,0);return [...a,{name:"Total",value:i,type:"total"}]},yb=(t,o,r,n,a,i)=>{let s=new Map;return t.forEach(l=>{let d=ho(l[o],i),p=`${ho(l[r],i)} / ${ho(l[n],i)}`,m=s.get(d)||new Map;m.set(p,(m.get(p)||0)+1),s.set(d,m);}),Array.from(s.entries()).map(([l,d])=>({title:l,causes:Array.from(d.entries()).sort((p,m)=>m[1]-p[1]).slice(0,a).map(([p,m])=>`${p} (${m})`)})).slice(0,6)},mn=({rows:t,config:o})=>{let{t:r}=le(),n=r("graph.unassigned"),a=eo.useMemo(()=>{let m=o?.fieldMapping;return {primaryDimension:Mr(t,m?.primaryDimension,Rr.primaryDimension,"Category"),secondaryDimension:Mr(t,m?.secondaryDimension,Rr.secondaryDimension,"Owner"),status:Mr(t,m?.status,Rr.status,"Status"),date:Mr(t,m?.date,Rr.date,"Date"),description:Mr(t,m?.description,Rr.description,"Description"),reportHours:Mr(t,m?.reportHours,Rr.reportHours,"ReportHours"),billableHours:Mr(t,m?.billableHours,Rr.billableHours,"BillableHours"),amount:Mr(t,m?.amount,Rr.amount,"Amount")}},[t,o?.fieldMapping]),i=eo.useMemo(()=>t.map((m,f)=>{let h=To(m[a.reportHours]),u=To(m[a.billableHours]),v=To(m[a.amount]),y=h>0?u/h*100:0;return {id:`graph-row-${f}`,Date:ho(m[a.date],""),Primary:ho(m[a.primaryDimension],n),Secondary:ho(m[a.secondaryDimension],n),Description:ho(m[a.description],""),ReportHours:h,BillableHours:u,Amount:v,Efficiency:y,Status:ho(m[a.status],n)}}),[t,a,n]),s=eo.useMemo(()=>{let m=i.length,f=i.reduce((x,b)=>x+To(b.ReportHours),0),h=i.reduce((x,b)=>x+To(b.BillableHours),0),u=i.reduce((x,b)=>x+To(b.Amount),0),v=f>0?h/f*100:0,y=o?.statusFlagValues||["flag","flagged","warning","risk"],g=i.filter(x=>y.includes(ho(x.Status,"").toLowerCase())).length;return {totalRecords:m,totalReportHours:f,totalBillableHours:h,efficiency:v,totalAmount:u,flaggedCount:g}},[i,o?.statusFlagValues]),l=o?.topN||ub,d=eo.useMemo(()=>({billableByPrimary:mb(i,"Primary","BillableHours",l,n),efficiencyBySecondary:gb(i,"Secondary","ReportHours","BillableHours",l,n),statusDistribution:fb(i,"Status",n),lineByDate:Qp(i,"Date","BillableHours"),comboByPrimary:hb(i,"Primary","ReportHours","BillableHours",l,n),heatmapPrimarySecondary:bb(i,"Primary","Secondary","BillableHours",n),waterfallBillable:vb(i,"Date","BillableHours"),fishboneStatusCauses:yb(i,"Status","Primary","Secondary",3,n)}),[i,l,n]),p=eo.useMemo(()=>({title:o?.title||r("graph.reportTitle"),kpis:s,charts:d,table:{columns:[{id:"Date",label:a.date},{id:"Primary",label:a.primaryDimension},{id:"Secondary",label:a.secondaryDimension},{id:"Description",label:a.description},{id:"ReportHours",label:r("graph.column.reportHours"),align:"right"},{id:"BillableHours",label:r("graph.column.billableHours"),align:"right"},{id:"Amount",label:"Amount",align:"right"},{id:"Efficiency",label:"Efficiency",align:"right"},{id:"Status",label:a.status}],rows:i}}),[d,o?.title,a,s,i,r]);return {fieldMapping:a,model:p}};var gn=t=>String(t??"").trim(),Ai=(t={})=>{let[o,r]=eo.useState(t),n=eo.useCallback((d,p)=>{r(m=>{let f=p?.trim();if(!f){let h={...m};return delete h[d],h}if(m[d]===f){let h={...m};return delete h[d],h}return {...m,[d]:f}});},[]),a=eo.useCallback(d=>{r(p=>{if(!p[d])return p;let m={...p};return delete m[d],m});},[]),i=eo.useCallback(()=>{r({});},[]),s=eo.useMemo(()=>!!(o.primaryDimension||o.secondaryDimension||o.status),[o]),l=eo.useCallback((d,p)=>d.filter(m=>!(o.primaryDimension&&gn(m[p.primaryDimension])!==gn(o.primaryDimension)||o.secondaryDimension&&gn(m[p.secondaryDimension])!==gn(o.secondaryDimension)||o.status&&gn(m[p.status])!==gn(o.status))),[o]);return {filters:o,setFilter:n,clearFilter:a,clearAll:i,hasActiveFilters:s,applyRows:l}};P();var Li=({variants:t,currentVariantId:o,onLoad:r,onSave:n,onDelete:a,onSetDefault:i})=>{let{t:s}=le(),[l,d]=eo.useState(false),[p,m]=eo.useState(""),[f,h]=eo.useState(false),[u,v]=eo.useState(false),y=t.find(b=>b.id===o),g=()=>{m(y?.name||s("variant.newVariant")),h(y?.isDefault||false),v(y?.isPublic||false),d(true);},x=()=>{n({name:p,isDefault:f,isPublic:u,description:""}),d(false);};return c("div",{className:"orb-variant-management",children:[e(zt,{size:"small",fullWidth:false,sx:{width:"min(240px, 100%)","& .orb-inp":{fontSize:"0.85rem",backgroundColor:"var(--orb-p50)",borderColor:"color-mix(in oklch, var(--orb-primary) 30%, var(--orb-border))"}},value:o||"",options:[{value:"",label:s("variant.selectVariant"),disabled:true},...t.map(b=>({value:b.id,label:b.name+(b.isDefault?` (${s("variant.defaultSuffix")})`:"")}))],onChange:b=>{let C=t.find(k=>k.id===b.target.value);C&&r(C);}}),e(ct,{title:s("variant.saveView"),children:e(ie,{className:"orb-variant-save-button",onClick:g,size:"small",color:"primary",children:e(Pr,{fontSize:"small"})})}),c(Lt,{open:l,onClose:()=>d(false),children:[e("div",{className:"orb-dialog-title",children:s("variant.saveView")}),c("div",{className:"orb-dialog-content",children:[e(ze,{autoFocus:true,margin:"dense",label:s("variant.viewName"),fullWidth:true,variant:"outlined",value:p,onChange:b=>m(b.target.value)}),e(Jn,{control:e(It,{checked:f,onChange:b=>h(b.target.checked)}),label:s("variant.setDefault")}),e(Jn,{control:e(It,{checked:u,onChange:b=>v(b.target.checked)}),label:s("variant.publicAllUsers")})]}),c("div",{className:"orb-dialog-actions",children:[e(ke,{onClick:()=>d(false),children:s("common.cancel")}),e(ke,{onClick:x,variant:"contained",children:s("common.save")})]})]})]})};P();var eu=({appId:t,tableKey:o="default",currentFilters:r,currentLayoutId:n,layoutRefs:a,onLoad:i,variantService:s,serviceUrl:l,onError:d,onSuccess:p,currentVariantId:m,onVariantChange:f})=>{let{t:h}=le(),[u,v]=eo.useState([]),[y,g]=eo.useState(""),x=`orbcafe.variants.${t}.${o}`,b=m!==void 0?m:y,C=D=>{m===void 0&&g(D),f&&f(D);},k=eo.useCallback(()=>{try{let D=localStorage.getItem(x);if(!D)return [];let E=JSON.parse(D);return Array.isArray(E)?E:[]}catch{return []}},[x]),S=eo.useCallback(D=>{try{localStorage.setItem(x,JSON.stringify(D));}catch{}},[x]),T=eo.useCallback(D=>{v(D);let E=D.find(O=>O.isDefault);E&&!b&&(C(E.id),i(E));},[b,i,C]),I=eo.useCallback(async()=>{if(!t)return [];try{let D=[];if(s)D=await s.getVariants(t,o);else if(l){let E=await fetch(`${l}/api/variants?appId=${encodeURIComponent(t)}&tableKey=${encodeURIComponent(o)}`);if(!E.ok)throw new Error(h("variant.toast.fetchFailed"));D=await E.json();}else D=k();return T(D),D}catch(D){console.error("Error fetching variants",D);let E=k();return T(E),d&&d(h("variant.toast.fetchFailed")),E}},[t,o,s,l,k,T,d,h]);return eo.useEffect(()=>{I();},[t,o]),e(Li,{variants:u,currentVariantId:b,onLoad:D=>{C(D.id),i(D);},onSave:async D=>{let E=Date.now().toString(),O;try{let _=D.scope||"Both",J=u.find(X=>X.name===D.name);E=J?J.id:Date.now().toString();let F=[];if(J&&(Array.isArray(J.filters)?F=[...J.filters]:J.filters&&(F=[{scope:"default",filters:J.filters}])),_==="Search"||_==="Both"){let X=(Array.isArray(r),r);if(X)if(Array.isArray(X)&&X.length>0&&X[0].scope)X.forEach(W=>{let H=F.findIndex(U=>U.scope===W.scope);H>=0?F[H]=W:F.push(W);});else {let W={scope:o,filters:X},H=F.findIndex(U=>U.scope===o);H>=0?F[H]=W:F.push(W);}}let V=J?.layout||{},z=[];if(J&&Array.isArray(J.layoutRefs)&&(z=[...J.layoutRefs]),_==="Layout"||_==="Both")if(a&&a.length>0)a.forEach(X=>{let W=z.findIndex(H=>H.tableKey===X.tableKey);W>=0?z[W]=X:z.push(X);});else {let X={tableKey:o,layoutId:n||null},W=z.findIndex(H=>H.tableKey===o);W>=0?z[W]=X:z.push(X);}if(O={appId:t,tableKey:o,...D,scope:_,id:E,createdAt:new Date().toISOString(),filters:F,layout:V,layoutRefs:z},s)await s.saveVariant(O,t,o);else if(l){if(!(await fetch(`${l}/api/variants`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(O)})).ok)throw new Error(h("variant.toast.saveFailed"))}else {let W=u.some(H=>H.id===E)?u.map(H=>H.id===E?O:H):[...u,O];v(W),S(W);}p&&p(h("variant.toast.saveSuccess")),(s||l)&&await I(),C(E),i(O);}catch(_){console.error("Error saving variant",_);let F=u.some(V=>V.id===E)?u.map(V=>V.id===E?O:V):[...u,O];v(F),S(F),C(E),i(O),d&&d(h("variant.toast.saveFailed"));}},onDelete:async D=>{try{if(s)await s.deleteVariant(D);else if(l){if(!(await fetch(`${l}/api/variants/${D}`,{method:"DELETE"})).ok)throw new Error(h("variant.toast.deleteFailed"))}else {let E=u.filter(O=>O.id!==D);v(E),S(E);}b===D&&C(""),(s||l)&&I(),p&&p(h("variant.toast.deleteSuccess"));}catch(E){console.error("Error deleting variant",E);let O=u.filter(_=>_.id!==D);v(O),S(O),b===D&&C(""),d&&d(h("variant.toast.deleteFailed"));}},onSetDefault:async D=>{try{let E=u.find(_=>_.id===D);if(!E)return;let O={appId:t,tableKey:o,...E,isDefault:!0};if(s)await s.setDefaultVariant(D,t,o);else if(l){if(!(await fetch(`${l}/api/variants`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(O)})).ok)throw new Error(h("variant.toast.defaultFailed"))}else {let _=u.map(J=>({...J,isDefault:J.id===D}));v(_),S(_);}(s||l)&&await I(),p&&p(h("variant.toast.defaultSuccess"));}catch(E){console.error("Error setting default variant",E);let O=u.map(_=>({..._,isDefault:_.id===D}));v(O),S(O),d&&d(h("variant.toast.defaultFailed"));}}})};P();ar__default.default.extend(Pb__default.default);ar__default.default.extend(Tb__default.default);ar__default.default.extend(ph__default.default);var ia="YYYY-MM-DD",Rb=[null,null],Vr="0.85rem",Mb={en:"en",zh:"zh-cn",fr:"fr",de:"de",ja:"ja",ko:"ko"},Db=({isInRange:t,isStart:o,isEnd:r,isHovered:n,disableMargin:a,sx:i,...s})=>{let l=so();return e(Gd,{...s,sx:[...Array.isArray(i)?i:i?[i]:[],t?{borderRadius:0,backgroundColor:l.palette.primary.light,color:l.palette.primary.contrastText}:{},n&&!t&&!o&&!r?{borderRadius:0,backgroundColor:l.palette.action.hover,border:`1px dashed ${l.palette.primary.main}`}:{},o?{borderRadius:"50% 0 0 50%",backgroundColor:l.palette.primary.main,color:l.palette.primary.contrastText}:{},r?{borderRadius:"0 50% 50% 0",backgroundColor:l.palette.primary.main,color:l.palette.primary.contrastText}:{},o&&r?{borderRadius:"50%"}:{}]})},ou=({label:t,value:o=Rb,onChange:r})=>{let{t:n,locale:a}=le(),i=Mb[a]||"en",s=t||n("dateRange.label"),[l,d]=eo.useState(null),[p,m]=eo.useState(o),[f,h]=eo.useState("start"),[u,v]=eo.useState(null),[y,g]=eo.useState((o[0]||ar__default.default()).locale(i)),[x,b]=eo.useState(""),[C,k]=eo.useState(""),[S,T]=eo.useState(false),[I,w]=eo.useState(false),M=eo__namespace.default.useRef(o);eo.useEffect(()=>{let[X,W]=o,[H,U]=M.current,Y=ge=>ge&&typeof ge.isSame=="function",ue=!(X===null&&H===null||Y(X)&&Y(H)&&X.isSame(H,"day")),re=!(W===null&&U===null||Y(W)&&Y(U)&&W.isSame(U,"day"));(ue||re)&&(m(o),o[0]&&Y(o[0])&&g(o[0].locale(i))),M.current=o;},[o,i]),eo.useEffect(()=>{b(p[0]?p[0].locale(i).format(ia):""),k(p[1]?p[1].locale(i).format(ia):""),T(false),w(false);},[p,i]);let A=(X,W)=>{let H=W.trim(),U=X==="start"?T:w;if(!H){let re=X==="start"?[null,p[1]]:[p[0],null];U(false),m(re);return}let Y=ar__default.default(H,ia,true).locale(i);if(!Y.isValid()){U(true);return}U(false);let ue=[...p];if(X==="start")ue[0]=Y,ue[1]&&Y.isAfter(ue[1],"day")&&(ue[1]=null),h(ue[1]?"start":"end");else {let re=ue[0];re&&Y.isBefore(re,"day")?(ue=[Y,null],h("end")):(ue[1]=Y,h("start"));}m(ue),g(Y);},R=X=>{d(X.currentTarget);},D=()=>{d(null),h("start"),v(null);},E=!!l,O=X=>{if(!X)return;let W=[...p];if(f==="start")W=[X,null],h("end");else {let H=W[0];H&&X.isBefore(H)?(W=[X,null],h("end")):(W=[H,X],h("start"));}m(W);},_=X=>{let W=ar__default.default().locale(i),H=[null,null];switch(X){case "today":H=[W,W];break;case "week":H=[W.startOf("week"),W.endOf("week")];break;case "month":H=[W.startOf("month"),W.endOf("month")];break}m(H),h("start"),g(W);},J=()=>{r&&r(p),D();},F=()=>{m(o),h("start"),D();},V=eo.useCallback(X=>{let{day:W,...H}=X,[U,Y]=p,ue=U?W.isSame(U,"day"):false,re=Y?W.isSame(Y,"day"):false,ge=U&&Y?W.isBetween(U,Y,"day","()"):false,we=false;return f==="end"&&U&&!Y&&u&&W.isAfter(U,"day")&&W.isBefore(u.add(1,"day"),"day")&&(we=true),e(Db,{...H,day:W,disableMargin:true,isStart:ue,isEnd:re,isInRange:ge||we,onMouseEnter:()=>v(W)})},[p,f,u]),z=X=>X?X.locale(i).format("YYYY-MM-DD"):"";return c("div",{className:"orb-date-range-picker",children:[e(ze,{className:"orb-date-range-field",label:s,value:p[0]?`${z(p[0])} - ${z(p[1])}`:"",onClick:R,fullWidth:true,size:"small",InputLabelProps:{sx:{fontSize:Vr}},InputProps:{readOnly:true,sx:{fontSize:Vr,"& .orb-inp":{fontSize:Vr},paddingRight:"4px"},endAdornment:e(ie,{className:"orb-date-range-calendar-trigger",size:"small",onClick:R,tooltip:s,children:e(Tt,{name:"calendar",size:16})})}}),c(ii,{open:E,anchorEl:l,onClose:D,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},className:"orb-date-range-popover",children:[e("div",{className:"orb-date-range-inputs",children:c(se,{className:"orb-date-range-input-row",direction:"row",alignItems:"center",spacing:1.5,justifyContent:"space-between",children:[e(ze,{className:"orb-date-range-manual-field",label:n("dateRange.startDate"),placeholder:ia,value:x,error:S,size:"small",onFocus:()=>h("start"),onChange:X=>{b(X.target.value),S&&T(false);},onBlur:()=>A("start",x),onKeyDown:X=>{X.key==="Enter"&&(X.preventDefault(),A("start",x));},sx:{"& .orb-inp":{fontSize:Vr,py:.75},"& label":{fontSize:Vr}}}),e(Xd,{color:"action",fontSize:"small"}),e(ze,{className:"orb-date-range-manual-field",label:n("dateRange.endDate"),placeholder:ia,value:C,error:I,size:"small",onFocus:()=>{p[0]&&h("end");},onChange:X=>{k(X.target.value),I&&w(false);},onBlur:()=>A("end",C),onKeyDown:X=>{X.key==="Enter"&&(X.preventDefault(),A("end",C));},sx:{"& .orb-inp":{fontSize:Vr,py:.75},"& label":{fontSize:Vr}}})]})}),e("div",{className:"orb-date-range-shortcuts",children:c(se,{direction:"row",spacing:1,justifyContent:"center",children:[e(xt,{label:n("dateRange.today"),onClick:()=>_("today"),clickable:true,size:"small",variant:"outlined"}),e(xt,{label:n("dateRange.thisWeek"),onClick:()=>_("week"),clickable:true,size:"small",variant:"outlined"}),e(xt,{label:n("dateRange.thisMonth"),onClick:()=>_("month"),clickable:true,size:"small",variant:"outlined"})]})}),e("div",{className:"orb-date-range-calendar",children:e(Kd,{dateAdapter:oi,adapterLocale:i,children:e(Ud,{value:null,referenceDate:y,onMonthChange:g,onYearChange:g,onChange:O,slots:{day:V},views:["year","month","day"],openTo:"day",showDaysOutsideCurrentMonth:true})})}),e(Dt,{}),c(se,{direction:"row",justifyContent:"flex-end",spacing:1,sx:{p:2},children:[e(ke,{size:"small",onClick:F,color:"inherit",children:n("common.cancel")}),e(ke,{size:"small",variant:"contained",onClick:J,children:n("common.done")})]})]})]})};P();var Fi={equals:"=",contains:"\u2287",notContains:"\u2285",wildcard:"*","=":"=","!=":"!=",">":">","<":"<",">=":"\u2265","<=":"\u2264",between:"\u2194"},Eb={equals:"smartFilter.operator.equals",contains:"smartFilter.operator.contains",notContains:"smartFilter.operator.notContains",wildcard:"smartFilter.operator.wildcard","=":"smartFilter.operator.equals","!=":"smartFilter.operator.notEquals",">":"smartFilter.operator.greaterThan","<":"smartFilter.operator.lessThan",">=":"smartFilter.operator.greaterOrEqual","<=":"smartFilter.operator.lessOrEqual",between:"smartFilter.operator.between"},Lb=["contains","notContains",">",">=","<","<=","equals"],nu=["=","!=",">","<",">=","<=","between"],ro="0.85rem",Ob=({field:t,value:o,onChange:r})=>{let{t:n}=le(),[a,i]=eo.useState(null),[s,l]=eo.useState(null),[d,p]=eo.useState(null),[m,f]=eo.useState(""),[h,u]=eo.useState(""),[v,y]=eo.useState(""),[g,x]=eo.useState("");eo.useEffect(()=>{let R=setTimeout(()=>{x(v);},1e3);return ()=>clearTimeout(R)},[v]);let b=o?.operator||(t.type==="number"?"=":"equals"),C=o?.value,k=R=>{let D=Eb[R];return D?n(D):R},S=R=>{i(a?null:R.currentTarget);},T=R=>{r({...o,operator:R,value:C}),i(null);},I={size:"small",fullWidth:true,variant:"outlined",InputLabelProps:{sx:{fontSize:ro}},InputProps:{sx:{fontSize:ro}},SelectProps:{MenuProps:{PaperProps:{sx:{"& .orb-menu-item, & option":{fontSize:ro,paddingTop:"4px",paddingBottom:"4px",minHeight:"auto"}}}}}},w=t.type||"text";if(w==="date"){let D=(E=>{if(!E)return [null,null];if(Array.isArray(E)&&E.length===2){let O=E[0]?ar__default.default.isDayjs(E[0])?E[0]:ar__default.default(E[0]):null,_=E[1]?ar__default.default.isDayjs(E[1])?E[1]:ar__default.default(E[1]):null;return [O,_]}return ar__default.default.isDayjs(E)||typeof E=="string"?[ar__default.default.isDayjs(E)?E:ar__default.default(E),null]:[null,null]})(C);return e(ou,{label:t.label,value:D,onChange:E=>r({value:E,operator:"between"})})}if(w==="number"&&b==="between"){let R=()=>{r({value:[m,h],operator:"between"}),l(null);},D=Array.isArray(C)?`${C[0]||""} - ${C[1]||""}`:"";return c(jsxRuntime.Fragment,{children:[e(ze,{...I,label:t.label,value:D,placeholder:n("smartFilter.minMaxPlaceholder"),InputProps:{...I.InputProps,startAdornment:e(cr,{position:"start",children:e(ct,{title:k("between"),children:e(ie,{size:"small",onClick:S,sx:{width:24,height:24,fontSize:ro},children:Fi.between})})}),readOnly:true},onClick:E=>l(s?null:E.currentTarget)}),e(Qt,{anchorEl:a,open:!!a,onClose:()=>i(null),PaperProps:{sx:{"& .orb-menu-item, & option":{fontSize:ro,minHeight:"auto",py:.5}}},children:nu.map(E=>c("option",{selected:E===b,onClick:()=>T(E),children:[e("div",{sx:{width:24,display:"inline-block",fontWeight:"bold"},children:Fi[E]}),e(Gt,{primary:k(E),primaryTypographyProps:{fontSize:ro}})]},E))}),e(ii,{open:!!s,anchorEl:s,onClose:()=>l(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},children:c("div",{sx:{p:2,display:"flex",gap:1,alignItems:"center"},children:[e(ze,{size:"small",label:n("smartFilter.min"),type:"number",value:m,onChange:E=>f(E.target.value),sx:{width:100},InputLabelProps:{sx:{fontSize:ro}},InputProps:{sx:{fontSize:ro}}}),e(Yd,{color:"action"}),e(ze,{size:"small",label:n("smartFilter.max"),type:"number",value:h,onChange:E=>u(E.target.value),sx:{width:100},InputLabelProps:{sx:{fontSize:ro}},InputProps:{sx:{fontSize:ro}}}),e(ke,{variant:"contained",size:"small",onClick:R,children:n("common.ok")})]})})]})}if(t.isValueHelp||w==="value-help"){let R=t.valueHelp?.mode||"single";return e(Ap,{...I,...t.valueHelp,label:t.label,placeholder:t.placeholder||t.valueHelp?.placeholder,value:C??(R==="multiple"?[]:null),mode:R,onChange:D=>r({value:D,operator:R==="multiple"?"anyOf":"equals"})})}if(w==="select")return c(zt,{size:"small",fullWidth:true,label:t.label,value:C||"",onChange:R=>r({...o,value:R.target.value,operator:"equals"}),children:[e("option",{value:"",children:n("common.none")}),t.options?.map(R=>e("option",{value:R.value,children:R.label},R.value))]});if(w==="multi-select"){let R=Array.isArray(C)?C:[],D=t.options?.filter(V=>V.label.toLowerCase().includes(g.toLowerCase()))||[],E=V=>t.options?.find(z=>z.value===V)?.label||V,O=R.map(E),_=O.length===0?n("common.none"):O.length>2?`${O.slice(0,2).join(", ")} +${O.length-2}`:O.join(", "),J=()=>{p(null),y(""),x("");},F=V=>{let z=R.includes(V)?R.filter(X=>X!==V):[...R,V];r({...o,value:z,operator:"anyOf"});};return c("div",{className:"orb-fld",children:[e("label",{children:t.label}),c(ke,{variant:"outlined",size:"small",onClick:V=>p(d?null:V.currentTarget),sx:{width:"100%",minHeight:36,justifyContent:"space-between",fontSize:ro,fontWeight:400},children:[e("span",{sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:_}),e($o,{fontSize:"small"})]}),e(Qt,{anchorEl:d,open:!!d,onClose:J,PaperProps:{sx:{width:280,maxHeight:340,overflowY:"auto",p:.5}},children:c("div",{onClick:V=>V.stopPropagation(),sx:{display:"grid",gap:.35},children:[e(ze,{size:"small",autoFocus:true,placeholder:n("smartFilter.searchPlaceholder"),fullWidth:true,InputProps:{startAdornment:e(cr,{position:"start",children:e(zr,{fontSize:"small"})}),sx:{fontSize:ro}},value:v,onChange:V=>y(V.target.value),onKeyDown:V=>V.stopPropagation()}),D.length>0?D.map(V=>{let z=R.includes(V.value);return c("div",{role:"option","aria-selected":z,tabIndex:0,className:`orb-menu-item ${z?"orb-selected":""}`,onClick:()=>F(V.value),onKeyDown:X=>{(X.key==="Enter"||X.key===" ")&&(X.preventDefault(),F(V.value));},children:[e(It,{checked:z,size:"small",inputProps:{tabIndex:-1},sx:{pointerEvents:"none"}}),e(Gt,{primary:V.label})]},String(V.value))}):e("div",{className:"orb-menu-item","aria-disabled":"true",children:n("smartFilter.noOptionsFound")})]})})]})}let M=w==="number"?nu:Lb;return c(jsxRuntime.Fragment,{children:[e(ze,{...I,className:"orb-filter-operator-field",label:t.label,sx:{minWidth:"120px"},value:C||"",type:w==="number"?"number":"text",onChange:R=>r({...o,value:R.target.value,operator:b}),InputProps:{...I.InputProps,startAdornment:e(cr,{position:"start",children:e(ct,{title:k(b),children:e(ie,{className:"orb-filter-operator-trigger",size:"small",onClick:S,onMouseDown:R=>R.preventDefault(),sx:{width:24,height:24,fontSize:ro,fontWeight:"bold",color:"primary.main",bgcolor:"action.hover"},children:Fi[b]})})}),endAdornment:t.hasSearchIcon?e(cr,{position:"end",children:e(zr,{color:"action"})}):void 0}}),e(Qt,{anchorEl:a,open:!!a,onClose:()=>i(null),PaperProps:{sx:{"& .orb-menu-item, & option":{fontSize:ro,minHeight:"auto",py:.5}}},children:M.map(R=>c("option",{selected:R===b,onClick:()=>T(R),children:[e("span",{className:"orb-filter-operator-symbol",children:Fi[R]}),e(Gt,{primary:k(R),primaryTypographyProps:{fontSize:ro}})]},R))})]})},_o=({fields:t,filters:o,onFilterChange:r,variants:n=[],currentVariantId:a,onVariantLoad:i,onVariantSave:s,onVariantDelete:l,onVariantSetDefault:d,onSearch:p,loading:m=false,appId:f,tableKey:h,currentLayout:u,currentLayoutId:v,layoutRefs:y,variantService:g,serviceUrl:x})=>{let{t:b}=le(),[C,k]=eo.useState(true),[S,T]=eo.useState(null),[I,w]=eo.useState(t.filter(D=>!D.hidden).map(D=>D.id)),M=(D,E)=>{r({...o,[D]:E});},A=D=>{I.includes(D)?w(I.filter(E=>E!==D)):w([...I,D]);};return c(Ae,{className:`orb-smart-filter ${C?"orb-smart-filter-expanded":"orb-smart-filter-collapsed"}`,sx:{mb:0,display:"flex",flexDirection:"column",overflow:"visible",position:"relative"},children:[C?c(jsxRuntime.Fragment,{children:[c("div",{className:"orb-smart-filter-header",children:[f?e(eu,{appId:f,tableKey:h,currentFilters:{values:o,visibleFields:I},currentLayout:u,currentLayoutId:v,layoutRefs:y,onLoad:D=>{if(!D.filters)return;let E=null;if(Array.isArray(D.filters)){let O=h||"default",_=D.filters.find(J=>J.scope===O);E=_?_.filters:null;}else E=D.filters;E&&(E.values||E.visibleFields?(E.visibleFields&&Array.isArray(E.visibleFields)&&w(E.visibleFields),E.values&&r(E.values)):r(E)),i&&i(D);},variantService:g,serviceUrl:x,currentVariantId:a}):e(Li,{variants:n,currentVariantId:a,onLoad:i,onSave:D=>{s&&s({...D,filters:{values:o,visibleFields:I}});},onDelete:l,onSetDefault:d}),c("div",{className:"orb-smart-filter-actions",children:[e(ct,{title:b("smartFilter.addFilters"),children:e(ke,{className:"orb-smart-filter-adapt",onClick:D=>T(S?null:D.currentTarget),size:"small",color:"primary",startIcon:e(Cp,{fontSize:"small"}),sx:{textTransform:"none",fontSize:ro,whiteSpace:"nowrap",minWidth:"fit-content"},children:b("smartFilter.adaptFilters")})}),e(ie,{className:"orb-smart-filter-go",tooltip:b("smartFilter.go"),"aria-label":b("smartFilter.go"),onClick:p,disabled:m,children:m?e(Zo,{size:16}):e(Tt,{name:"play",size:16})}),c(Qt,{anchorEl:S,open:!!S,onClose:()=>T(null),slotProps:{paper:{style:{maxHeight:400,width:"25ch"},sx:{"& .orb-menu-item, & option":{fontSize:ro,minHeight:32}}}},children:[e("option",{disabled:true,children:e(Gt,{primary:b("smartFilter.visibleFilters"),primaryTypographyProps:{fontSize:ro}})}),e(Dt,{}),t.map(D=>c("option",{onClick:()=>A(D.id),children:[e(It,{checked:I.includes(D.id),size:"small"}),e(Gt,{primary:D.label,primaryTypographyProps:{fontSize:ro}})]},D.id))]})]})]}),e("div",{className:"orb-smart-filter-grid",children:e(sl,{container:true,spacing:2,columns:{xs:2,sm:3,md:4,lg:6},children:t.filter(D=>I.includes(D.id)).map(D=>e(sl,{size:1,children:e(Ob,{field:D,value:o[D.id]||{value:"",operator:D.type==="number"?"=":"equals"},onChange:E=>M(D.id,E)})},D.id))})})]}):null,e("div",{className:"orb-smart-filter-toggle",children:e(ie,{className:"orb-smart-filter-toggle-button",size:"small",onClick:()=>k(!C),sx:{bgcolor:"background.paper",boxShadow:2,border:"1px solid",borderColor:"divider",width:30,height:30,minWidth:30,minHeight:0,p:0,"&:hover":{bgcolor:"background.paper"}},children:C?e(di,{className:"orb-smart-filter-toggle-icon",sx:{fontSize:20},color:"action"}):e($o,{className:"orb-smart-filter-toggle-icon",sx:{fontSize:20},color:"action"})})})]})};P();var au=({layouts:t,currentLayoutId:o,onLoad:r,onSave:n,onDelete:a,onSetDefault:i})=>{let{t:s}=le(),[l,d]=eo.useState(null),[p,m]=eo.useState(false),[f,h]=eo.useState(""),[u,v]=eo.useState(""),[y,g]=eo.useState({isDefault:false,isPublic:false}),x=t.find(I=>I.id===o),b=I=>{d(I.currentTarget);},C=()=>{d(null);},k=I=>{r(I),C();},S=()=>{h(""),v(""),g({isDefault:false,isPublic:false}),m(true),C();},T=()=>{f.trim()&&(n({name:f,description:u,...y}),m(false));};return c("div",{className:"orb-layout-actions",sx:{display:"flex",alignItems:"center",gap:.25},children:[e(ct,{title:s("layout.layoutOptions"),children:e(ie,{onClick:b,color:x?"primary":"default",size:"small",children:e(Tp,{fontSize:"small"})})}),c(Qt,{anchorEl:l,open:!!l,onClose:C,align:"end",PaperProps:{sx:{width:320,maxHeight:400}},children:[e("option",{disabled:true,children:e(L,{variant:"caption",children:s("layout.selectLayout")})}),c("option",{onClick:S,children:[e(Wo,{children:e(Pr,{fontSize:"small"})}),e(Gt,{children:s("layout.saveCurrentLayout")})]}),e(Dt,{}),t.length===0&&e("option",{disabled:true,children:e(L,{variant:"body2",color:"text.secondary",children:s("layout.noSavedLayouts")})}),t.map((I,w)=>e("option",{onClick:()=>k(I),selected:I.id===o,children:c("div",{sx:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"},children:[c("div",{sx:{display:"flex",flexDirection:"column",overflow:"hidden",mr:1},children:[e("div",{sx:{display:"flex",alignItems:"center",gap:1},children:e(L,{variant:"body2",fontWeight:I.id===o?"bold":"normal",noWrap:true,children:I.name})}),I.description&&e(L,{variant:"caption",color:"text.secondary",noWrap:true,children:I.description})]}),c("div",{sx:{display:"flex",alignItems:"center"},onClick:M=>M.stopPropagation(),children:[e(ct,{title:I.isDefault?s("layout.removeDefault"):s("layout.setAsDefault"),children:e(ie,{size:"small",onClick:M=>{M.stopPropagation(),i(I.id);},children:I.isDefault?e(Sp,{fontSize:"small",color:"warning"}):e(wp,{fontSize:"small"})})}),e(ct,{title:s("common.delete"),children:e(ie,{size:"small",color:"error",onClick:M=>{M.stopPropagation(),a(I.id);},children:e(li,{fontSize:"small"})})})]})]})},I.id||w))]}),e(Lt,{open:p,onClose:()=>m(false),maxWidth:"xs",fullWidth:true,className:"orb-layout-save-dialog",title:s("layout.saveLayout"),actions:c(jsxRuntime.Fragment,{children:[e(ke,{variant:"ghost",onClick:()=>m(false),children:s("common.cancel")}),e(ke,{onClick:T,variant:"primary",disabled:!f.trim(),children:s("common.save")})]}),children:c("div",{className:"orb-layout-save-form",children:[e(ze,{label:s("layout.layoutName"),value:f,onChange:I=>h(I.target.value),fullWidth:true,autoFocus:true,size:"small",helperText:s("layout.layoutNameHelper")}),t.some(I=>I.name===f)&&e(L,{className:"orb-layout-save-warning",variant:"caption",color:"warning.main",children:s("layout.warningOverwrite")}),e(ze,{label:s("layout.layoutDescription"),value:u,onChange:I=>v(I.target.value),fullWidth:true,size:"small"}),e(It,{className:"orb-layout-save-option",checked:y.isDefault,onChange:I=>g({...y,isDefault:I.target.checked}),label:s("layout.useAsDefault")}),e(It,{className:"orb-layout-save-option",checked:y.isPublic,onChange:I=>g({...y,isPublic:I.target.checked}),label:s("layout.publicAllUsers")})]})})]})};P();var hn=({appId:t,tableKey:o="default",currentLayoutData:r,onLayoutLoad:n,targetLayoutId:a,activeLayoutId:i,serviceUrl:s,onError:l,onSuccess:d})=>{let{t:p}=le(),[m,f]=eo.useState([]),[h,u]=eo.useState(""),v=`orbcafe.layouts.${t}.${o}`,y=w=>({id:w.layoutId,name:w.name,description:w.description??"",isDefault:!!w.isDefault,isPublic:!!w.isPublic,createdAt:w.createdAt??new Date().toISOString(),layoutData:w.layout??{}}),g=w=>({appId:t,tableKey:o,layoutId:w.id,name:w.name,description:w.description??"",isDefault:!!w.isDefault,isPublic:!!w.isPublic,createdAt:w.createdAt,layout:w.layoutData}),x=eo.useCallback(()=>{try{let w=localStorage.getItem(v);if(!w)return [];let M=JSON.parse(w);return Array.isArray(M)?M:[]}catch{return []}},[v]),b=eo.useCallback(w=>{try{localStorage.setItem(v,JSON.stringify(w));}catch{}},[v]);eo.useEffect(()=>{i!==void 0&&u(i);},[i]),eo.useEffect(()=>{if(a&&m.length>0){let w=m.find(M=>M.id===a);w&&(u(w.id),n(w));}},[a,m,n]);let C=eo.useCallback(async()=>{if(t){if(!s){let w=x();f(w);let M=w.find(A=>A.isDefault);M&&!h&&!a&&(u(M.id),n(M));return}try{let w=await fetch(`${s}/api/layouts?appId=${encodeURIComponent(t)}&tableKey=${encodeURIComponent(o)}`);if(!w.ok)throw new Error("LAYOUT_FETCH_FAILED");let A=(await w.json()).map(y);f(A);let R=A.find(D=>D.isDefault);R&&!h&&!a&&(u(R.id),n(R));}catch(w){console.error("Error fetching layouts",w);let M=x();f(M);let A=M.find(R=>R.isDefault);A&&!h&&!a&&(u(A.id),n(A)),l&&l(p("layout.toast.loadFallback"));}}},[t,o,s,l,h,n,a,x,p]);return eo.useEffect(()=>{C();},[t,o]),e(au,{layouts:m,currentLayoutId:h,onLoad:w=>{u(w.id),n(w);},onSave:async w=>{let M=m.find(D=>D.name===w.name),A=M?M.id:Date.now().toString(),R={id:A,...w,createdAt:new Date().toISOString(),layoutData:r,isDefault:w.isDefault??false,isPublic:w.isPublic??false};if(!s){let E=m.some(O=>O.id===A)?m.map(O=>O.id===A?R:O):[...m,R];f(E),b(E),u(A),n(R),d&&d(p("layout.toast.saveLocalSuccess"));return}try{if(!(await fetch(`${s}/api/layouts`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g(R))})).ok)throw new Error("LAYOUT_SAVE_FAILED");d&&d(p("layout.toast.saveSuccess")),await C(),u(A),n(R);}catch(D){console.error("Error saving layout",D);let O=m.some(_=>_.id===A)?m.map(_=>_.id===A?R:_):[...m,R];f(O),b(O),u(A),n(R),d&&d(p("layout.toast.saveLocalSuccess")),l&&l(p("layout.toast.backendUnavailableSavedLocal"));}},onDelete:async w=>{if(!s){let M=m.filter(A=>A.id!==w);f(M),b(M),h===w&&u(""),d&&d(p("layout.toast.deleteLocalSuccess"));return}try{if(!(await fetch(`${s}/api/layouts/${encodeURIComponent(w)}`,{method:"DELETE"})).ok)throw new Error("LAYOUT_DELETE_FAILED");h===w&&u(""),d&&d(p("layout.toast.deleteSuccess")),await C();}catch(M){console.error("Error deleting layout",M);let A=m.filter(R=>R.id!==w);f(A),b(A),h===w&&u(""),d&&d(p("layout.toast.deleteLocalSuccess")),l&&l(p("layout.toast.backendUnavailableDeletedLocal"));}},onSetDefault:async w=>{if(!s){let M=m.map(A=>({...A,isDefault:A.id===w}));f(M),b(M),d&&d(p("layout.toast.defaultLocalSuccess"));return}try{let M=m.find(R=>R.id===w);if(!M)return;if(!(await fetch(`${s}/api/layouts`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g({...M,isDefault:!0}))})).ok)throw new Error("LAYOUT_DEFAULT_FAILED");d&&d(p("layout.toast.defaultSuccess")),await C();}catch(M){console.error("Error setting default",M);let A=m.map(R=>({...R,isDefault:R.id===w}));f(A),b(A),d&&d(p("layout.toast.defaultLocalSuccess")),l&&l(p("layout.toast.backendUnavailableDefaultLocal"));}}})};var Bi=(t,o)=>{if(!t||!t.filters)return null;if(Array.isArray(t.filters)){let r=t.filters.find(a=>a.scope===o);if(r)return r.filters;let n=t.filters.find(a=>a.scope==="default");return n?n.filters:null}return typeof t.filters=="object"?t.filters:null},Hi=(t,o)=>{if(!t)return {layout:null,layoutId:null};let r=null,n=null;if(Array.isArray(t.layoutRefs)){let a=t.layoutRefs.find(i=>i.tableKey===o);a&&(r=a.layoutId);}return !r&&t.layoutId&&(r=t.layoutId),t.layout&&typeof t.layout=="object"&&!Array.isArray(t.layout)&&(n=t.layout),{layoutId:r,layout:n}};function su(t,o,r){return o[r]<t[r]?-1:o[r]>t[r]?1:0}function Fb(t,o){return t==="desc"?(r,n)=>su(r,n,o):(r,n)=>-su(r,n,o)}function Bb(t,o){let r=t.map((n,a)=>[n,a]);return r.sort((n,a)=>{let i=o(n[0],a[0]);return i!==0?i:n[1]-a[1]}),r.map(n=>n[0])}var bn=t=>{let o=!!t.disableGrouping,r=!!t.disableSorting,n=eo.useCallback(Z=>{let j=String(Z?.label??Z?.id??"").length*9+64,he=typeof Z?.minWidth=="number"?Z.minWidth:0;return Math.max(100,he,j)},[]),a=eo.useCallback(()=>(t.columns||[]).filter(Z=>!!Z?.numeric).map(Z=>Z.id),[t.columns]),[i,s]=eo.useState(""),[l,d]=eo.useState(t.order||"asc"),[p,m]=eo.useState(t.orderBy||""),[f,h]=eo.useState([]),[u,v]=eo.useState(t.page||0),[y,g]=eo.useState(t.rowsPerPage||20),[x,b]=eo.useState(t.selected||[]),[C,k]=eo.useState(t.columns?t.columns.map(Z=>Z.id):[]),[S,T]=eo.useState(t.columns?t.columns.map(Z=>Z.id):[]),[I,w]=eo.useState(t.showSummary||false),[M,A]=eo.useState(()=>a()),[R,D]=eo.useState([]),[E,O]=eo.useState(new Set),[_,J]=eo.useState(()=>{let Z={};return (t.columns||[]).forEach($=>{Z[$.id]=n($);}),Z}),[F,V]=eo.useState(null),[z,X]=eo.useState(null),[W,H]=eo.useState(null),[U,Y]=eo.useState(null),[ue,re]=eo.useState(false),[ge,we]=eo.useState(""),[Ve,Te]=eo.useState(""),Ie=o?[]:R,He=eo.useCallback(Z=>{if(o){D([]),O(new Set),X(null);return}D(Z);},[o]);eo.useEffect(()=>{o&&(D([]),O(new Set),X(null));},[o]),eo.useEffect(()=>{r&&(d("asc"),m(""),h([]));},[r]),eo.useEffect(()=>{t.layout&&St(t.layout);},[t.layout]),eo.useEffect(()=>{if(r){d("asc"),m("");return}t.order!==void 0&&d(t.order),t.orderBy!==void 0&&m(t.orderBy);},[t.order,t.orderBy,r]),eo.useEffect(()=>{t.selected!==void 0&&b(t.selected);},[t.selected]),eo.useEffect(()=>{t.page!==void 0&&v(t.page);},[t.page]),eo.useEffect(()=>{t.rowsPerPage!==void 0&&g(t.rowsPerPage);},[t.rowsPerPage]),eo.useEffect(()=>{let Z=a();A($=>$.filter(he=>Z.includes(he)));},[a]),eo.useEffect(()=>{J(Z=>{let $={...Z};return (t.columns||[]).forEach(j=>{$[j.id]===void 0&&($[j.id]=n(j));}),$});},[t.columns,n]),eo.useEffect(()=>{T(Z=>{let $=(t.columns||[]).map(qe=>qe.id),j=new Set($),he=Z.filter(qe=>j.has(qe)),xe=new Set(he),Ee=$.filter(qe=>!xe.has(qe)),_e=[...he,...Ee];return _e.length===Z.length&&_e.every((qe,je)=>qe===Z[je])?Z:_e});},[t.columns]);let ce=eo.useMemo(()=>{let Z=t.columns||[];if(S.length===0)return Z;let $=new Map(Z.map(xe=>[xe.id,xe])),j=[],he=new Set;return S.forEach(xe=>{let Ee=$.get(xe);Ee&&(j.push(Ee),he.add(xe));}),Z.forEach(xe=>{he.has(xe.id)||j.push(xe);}),j},[t.columns,S]),be=eo.useMemo(()=>{let Z=t.rows||[];return i&&(Z=Z.filter($=>Object.keys($).some(j=>String($[j]).toLowerCase().includes(i.toLowerCase())))),Z},[t.rows,i]),We=eo.useMemo(()=>{if(r||t.onSortChange)return be;if(f.length>0){let Z=[...be];return Z.sort(($,j)=>{for(let he of f){let xe=$?.[he.field],Ee=j?.[he.field];if(!(xe==null&&Ee==null)){if(xe==null)return he.direction==="asc"?-1:1;if(Ee==null)return he.direction==="asc"?1:-1;if(xe<Ee)return he.direction==="asc"?-1:1;if(xe>Ee)return he.direction==="asc"?1:-1}}return 0}),Z}return p?Bb(be,Fb(l,p)):be},[be,l,p,f,t.onSortChange,r]),tt=eo.useCallback(Z=>{if(Ie.length===0)return Z.map(Ee=>({type:"row",data:Ee,id:Ee[t.rowKey||"id"]}));let $=[...Z].sort((Ee,_e)=>{for(let qe of Ie){if(Ee[qe]<_e[qe])return -1;if(Ee[qe]>_e[qe])return 1}return 0}),j=(Ee,_e=0)=>{if(_e>=Ie.length)return Ee;let qe=Ie[_e],je={},mt=[];return Ee.forEach(ft=>{let Mt=ft[qe],yt=`${qe}:${Mt}`;je[yt]||(je[yt]={key:yt,field:qe,value:Mt,children:[],count:0,level:_e},mt.push(je[yt])),je[yt].children.push(ft),je[yt].count++;}),mt.forEach(ft=>{ft.children&&(ft.children=j(ft.children,_e+1));}),mt},he=j($),xe=(Ee,_e="")=>{let qe=[];return Ee.forEach(je=>{if(je.children){let mt=_e?`${_e}>${je.key}`:je.key,ft=E.has(mt);qe.push({type:"group",id:mt,field:je.field,value:je.value,level:je.level,count:je.count,isExpanded:ft,childIds:(function Mt(yt){let B=[];return yt.children.forEach(Q=>{Q.children?B=B.concat(Mt(Q)):B.push(Q[t.rowKey||"id"]);}),B})(je)}),ft&&(qe=qe.concat(xe(je.children,mt)));}else qe.push({type:"row",data:je,id:je[t.rowKey||"id"],level:Ie.length});}),qe};return xe(he)},[Ie,E,t.rowKey]),nt=eo.useCallback(Z=>{if(Ie.length===0)return [];let $=[...Z].sort((xe,Ee)=>{for(let _e of Ie){if(xe[_e]<Ee[_e])return -1;if(xe[_e]>Ee[_e])return 1}return 0}),j=[],he=(xe,Ee,_e)=>{if(Ee>=Ie.length)return;let qe=Ie[Ee],je=new Map;xe.forEach(mt=>{let ft=mt[qe],Mt=je.get(ft);Mt?Mt.push(mt):je.set(ft,[mt]);}),je.forEach((mt,ft)=>{let Mt=`${qe}:${ft}`,yt=_e?`${_e}>${Mt}`:Mt;j.push(yt),he(mt,Ee+1,yt);});};return he($,0,""),j},[Ie]),it=eo.useMemo(()=>tt(We),[We,tt]),q=eo.useMemo(()=>nt(We),[We,nt]),De=eo.useMemo(()=>{let Z=(t.rows||[]).length;return typeof t.count=="number"&&t.count>Z},[t.count,t.rows]),Ce=eo.useMemo(()=>De?it:y>0?it.slice(u*y,u*y+y):it,[it,u,y,De]),Fe=eo.useMemo(()=>De&&typeof t.count=="number"?t.count:it.length,[it.length,De,t.count]),at=Z=>{O($=>{let j=new Set($);return j.has(Z)?j.delete(Z):j.add(Z),j});},Ze=Z=>{let $=q.filter(j=>j===Z||j.startsWith(`${Z}>`));O(j=>{let he=new Set(j);return $.forEach(xe=>he.add(xe)),he});},wt=Z=>{O($=>{let j=new Set($);return Array.from(j).forEach(he=>{(he===Z||he.startsWith(`${Z}>`))&&j.delete(he);}),j});},Rt=Z=>{if(!Z){O(new Set);return}O(new Set(q));},Ot=Z=>{let $=q.filter(j=>j.startsWith(`${Z}>`));return $.length===0?E.has(Z):E.has(Z)&&$.every(j=>E.has(j))},At=Z=>{if(r)return;f.length>0&&h([]);let $=p===Z&&l==="asc",j=p===Z&&l==="desc";if(t.onSortChange){$?t.onSortChange(Z,"desc"):j?t.onSortChange("","asc"):t.onSortChange(Z,"asc");return}$?(d("desc"),m(Z)):j?(d("asc"),m("")):(d("asc"),m(Z));},oe=Z=>{if(r){d("asc"),m(""),h([]);return}let $=Z.filter(j=>j&&j.field);h($),$.length>0&&m("");},Ke=()=>{h([]);},Oe=(Z,$)=>{J(j=>({...j,[Z]:$}));},de=Z=>{if(Z.target.checked){let $=be.map(j=>j[t.rowKey||"id"]);b($),t.onSelectionChange&&t.onSelectionChange($);return}b([]),t.onSelectionChange&&t.onSelectionChange([]);},ye=(Z,$)=>{let j=$[t.rowKey||"id"],he=x.indexOf(j),xe=[];he===-1?xe=xe.concat(x,j):he===0?xe=xe.concat(x.slice(1)):he===x.length-1?xe=xe.concat(x.slice(0,-1)):he>0&&(xe=xe.concat(x.slice(0,he),x.slice(he+1))),b(xe),t.onSelectionChange&&t.onSelectionChange(xe);},te=Z=>{v(Z),t.onPageChange&&t.onPageChange(Z);},ve=Z=>{g(Z),v(0),t.onPageChange&&t.onPageChange(0),t.onRowsPerPageChange&&t.onRowsPerPageChange(Z);},Ne=Z=>{let $=C.indexOf(Z),j=[...C];$===-1?j.push(Z):j.splice($,1),k(j);},Je=Z=>{if(o)return;let $=Ie.indexOf(Z),j=[...Ie];$===-1?j.push(Z):j.splice($,1),He(j);},st=Z=>{a().includes(Z)&&A(j=>j.includes(Z)?j.filter(he=>he!==Z):[...j,Z]);},pt=(Z,$)=>{!Z||!$||Z===$||T(j=>{let he=j.indexOf(Z),xe=j.indexOf($);if(he===-1||xe===-1)return j;let Ee=[...j];return Ee.splice(he,1),Ee.splice(xe,0,Z),Ee});},Bt=Z=>{let $=Z?.active?.id,j=Z?.over?.id;typeof $=="string"&&typeof j=="string"&&pt($,j);},Yt=Z=>{t.onLayoutSave&&t.onLayoutSave({visibleColumns:C,columnOrder:S,order:r?"asc":l,orderBy:r?"":p,sortBy:r?[]:f,grouping:Ie,columnWidths:_,showSummary:I,summaryColumns:M});},Vt=Z=>{let{layout:$,layoutId:j}=Hi(Z,t.tableKey||"default");j?(Te(j),we(j)):(Te(""),we("")),$&&($.visibleColumns&&k($.visibleColumns),Array.isArray($.columnOrder)&&T($.columnOrder),r?(d("asc"),m(""),h([])):($.order&&d($.order),$.orderBy&&m($.orderBy),Array.isArray($.sortBy)&&h($.sortBy)),$.grouping&&He($.grouping),$.columnWidths&&J($.columnWidths),$.showSummary!==void 0&&w(!!$.showSummary),Array.isArray($.summaryColumns)&&A($.summaryColumns));},St=Z=>{let $=Z?.layoutData||Z?.layout||Z||{};$.visibleColumns&&k($.visibleColumns),Array.isArray($.columnOrder)&&T($.columnOrder),r?(d("asc"),m(""),h([])):($.order&&d($.order),$.orderBy!==void 0&&m($.orderBy),Array.isArray($.sortBy)&&h($.sortBy)),$.grouping&&He($.grouping),$.columnWidths&&J($.columnWidths),$.showSummary!==void 0&&w(!!$.showSummary),Array.isArray($.summaryColumns)&&A($.summaryColumns),O(new Set),v(0),Z?.id&&we(Z.id),Te("");};eo.useEffect(()=>{t.layout&&Vt({layout:t.layout});},[t.layout]);let Wt=Z=>{Z.preventDefault(),Y(U===null?{mouseX:Z.clientX+2,mouseY:Z.clientY-6}:null);},bt=()=>{Y(null);},Nt=eo.useMemo(()=>{if(!I)return {};let Z={};t.columns.forEach(j=>{if(j.numeric&&M.includes(j.id)){let he=be.reduce((xe,Ee)=>{let _e=parseFloat(Ee[j.id]);return xe+(isNaN(_e)?0:_e)},0);Z[j.id]=he.toFixed(2);}else Z[j.id]="";});let $=t.columns.find(j=>C.includes(j.id)&&!j.numeric);return $&&!$.numeric&&(Z[$.id]="Total"),Z},[be,t.columns,I,M,C]),lt=()=>{if(!t.columns||!be)return;let Z=t.columns.map(Ee=>Ee.label).join(","),$=be.map(Ee=>t.columns.map(_e=>{let qe=Ee[_e.id];return `"${(qe==null?"":String(qe)).replace(/"/g,'""')}"`}).join(",")).join(`
|
|
184
|
-
`),
|
|
185
|
-
${$}`,he=encodeURI(j),xe=document.createElement("a");xe.setAttribute("href",he),xe.setAttribute("download",`${t.title||"export"}.csv`),document.body.appendChild(xe),xe.click(),document.body.removeChild(xe);},Ft=()=>{re(true);},Zt=()=>{re(false);};return {isMobile:false,columns:ce,order:l,setOrder:d,orderBy:p,setOrderBy:m,sortBy:f,setSortBy:h,applyMultiSort:oe,clearMultiSort:Ke,columnOrder:S,setColumnOrder:T,filterText:i,setFilterText:s,visibleColumns:C,setVisibleColumns:k,showSummary:I,setShowSummary:w,summaryColumns:M,grouping:Ie,setGrouping:He,expandedGroups:E,setExpandedGroups:O,groupAnchorEl:z,setGroupAnchorEl:X,summaryAnchorEl:W,setSummaryAnchorEl:H,columnWidths:_,setColumnWidths:J,anchorEl:F,setAnchorEl:V,contextMenu:U,setContextMenu:Y,sensors:void 0,sortedAndFilteredRows:We,visibleRows:Ce,summaryRow:Nt,page:u,setPage:te,rowsPerPage:y,setRowsPerPage:ve,totalDisplayCount:Fe,selected:x,setSelected:b,isAllExpanded:q.length>0&&q.every(Z=>E.has(Z)),handleColumnResize:Oe,handleRequestSort:At,handleSelectAllClick:de,handleClick:ye,toggleSummaryColumn:st,handleDragEnd:Bt,handleColumnReorder:pt,handleExport:lt,handleContextMenu:Wt,handleCloseContextMenu:bt,toggleColumnVisibility:Ne,toggleGroupExpand:at,toggleGroupField:Je,handleToggleAll:Rt,handleExpandGroupRecursively:Ze,handleCollapseGroupRecursively:wt,isGroupFullyExpanded:Ot,handleLayoutLoad:St,handleVariantLoad:Vt,handleLayoutSave:Yt,effectiveAppId:t.appId||"",currentLayoutData:{visibleColumns:C,order:r?"asc":l,orderBy:r?"":p,sortBy:r?[]:f,columnOrder:S,grouping:Ie,columnWidths:_,showSummary:I,summaryColumns:M},currentLayoutId:ge,layoutIdToLoad:Ve,onPageChange:te,onRowsPerPageChange:ve,graphReportOpen:ue,handleOpenGraphReport:Ft,handleCloseGraphReport:Zt}};P();var ND=t=>e("tbody",{...t}),AD=({align:t,...o})=>e("td",{align:t==="inherit"?void 0:t,...o}),ED=t=>e("div",{...t}),LD=t=>e("thead",{...t}),OD=t=>e("tr",{...t}),tr=t=>{let{t:o}=le(),r="0.85rem",{title:n,showToolbar:a=true,selectionMode:i,selected:s=[],onSelectionChange:l,actions:d,extraTools:p,fitContainer:m=false,fullWidth:f=false,maxHeight:h,loading:u=false,rowsPerPageOptions:v=[20,50,100,-1],onLayoutSave:y,filterConfig:g,rowKey:x,tableKey:b="default",graphReport:C,quickCreate:k,quickEdit:S,quickDelete:T,serviceUrl:I,disableGrouping:w=false,disableSorting:M=false}=t,A=n||o("table.title.default"),{isMobile:R,columns:D,order:E,orderBy:O,filterText:_,setFilterText:J,visibleColumns:F,showSummary:V,setShowSummary:z,summaryColumns:X,grouping:W,setGrouping:H,expandedGroups:U,groupAnchorEl:Y,setGroupAnchorEl:ue,summaryAnchorEl:re,setSummaryAnchorEl:ge,columnWidths:we,anchorEl:Ve,setAnchorEl:Te,contextMenu:Ie,sensors:He,sortedAndFilteredRows:ce,summaryRow:be,visibleRows:We,isAllExpanded:tt,page:nt,setPage:it,rowsPerPage:q,setRowsPerPage:De,totalDisplayCount:Ce,setSelected:Fe,handleColumnResize:at,handleRequestSort:Ze,handleSelectAllClick:wt,handleClick:Rt,toggleSummaryColumn:Ot,handleDragEnd:At,handleExport:oe,handleContextMenu:Ke,handleCloseContextMenu:Oe,toggleColumnVisibility:de,toggleGroupExpand:ye,handleToggleAll:te,handleExpandGroupRecursively:ve,handleCollapseGroupRecursively:Ne,isGroupFullyExpanded:Je,handleLayoutLoad:st,handleVariantLoad:pt,handleLayoutSave:Bt,effectiveAppId:Yt,currentLayoutData:Vt,currentLayoutId:St,layoutIdToLoad:Wt,graphReportOpen:bt,handleOpenGraphReport:Nt,handleCloseGraphReport:lt}=bn(t),Ft=C?.enabled??false,Zt=Ft&&(C?.interaction?.enabled??true),Z=Ai(),$=!!k?.enabled,j=!!S?.enabled,he=!!T?.enabled,xe=k?.fields,Ee=k?.excludeFields||[],_e=k?.initialValues||{},[qe,je]=eo__namespace.default.useState(false),[mt,ft]=eo__namespace.default.useState(false),[Mt,yt]=eo__namespace.default.useState({}),[B,Q]=eo__namespace.default.useState(false),[fe,Pe]=eo__namespace.default.useState(false),[et,Xe]=eo__namespace.default.useState({}),[kt,ht]=eo__namespace.default.useState(false),[gt,Ct]=eo__namespace.default.useState(false),no=u||mt||fe||gt,Et=eo__namespace.default.useMemo(()=>{let ne=[...D];if(Array.isArray(xe)&&xe.length>0){let me=new Set(xe);ne=ne.filter(ee=>me.has(ee.id));}if(Ee.length>0){let me=new Set(Ee);ne=ne.filter(ee=>!me.has(ee.id));}return ne.filter(me=>!!me?.id)},[D,Ee,xe]),jt=x||"id",Ht=eo__namespace.default.useMemo(()=>{let ne=new Set(s);return ce.filter(me=>ne.has(me?.[jt]))},[s,ce,jt]),Kt=Ht.length===1?Ht[0]:null,$t=S?.fields,oo=S?.excludeFields||[],ao=S?.editableFields||[],bo=S?.nonEditableFields||[],Ro=S?.primaryKeys?.length?S.primaryKeys:[jt],Mo=eo__namespace.default.useMemo(()=>{let ne=[...D];if(Array.isArray($t)&&$t.length>0){let me=new Set($t);ne=ne.filter(ee=>me.has(ee.id));}if(oo.length>0){let me=new Set(oo);ne=ne.filter(ee=>!me.has(ee.id));}return ne.filter(me=>!!me?.id)},[D,oo,$t]),ir=eo__namespace.default.useMemo(()=>new Set(Ro),[Ro]),xo=eo__namespace.default.useMemo(()=>new Set(ao),[ao]),Bo=eo__namespace.default.useMemo(()=>new Set(bo),[bo]),qr=eo__namespace.default.useCallback(ne=>xo.size>0?xo.has(ne):!(Bo.has(ne)||ir.has(ne)),[xo,Bo,ir]);eo__namespace.default.useEffect(()=>{!bt&&Z.hasActiveFilters&&Z.clearAll();},[bt,Z.hasActiveFilters,Z.clearAll]);let Xr=()=>{let ne={};Et.forEach(me=>{ne[me.id]=_e[me.id]??"";}),yt(ne),je(true);},Lr=()=>{mt||je(false);},Yr=(ne,me)=>{yt(ee=>({...ee,[ne]:me}));},Zr=async()=>{if(!k?.onSubmit){je(false);return}try{ft(!0),await k.onSubmit(Mt),je(!1);}finally{ft(false);}},Do=()=>{if(!Kt)return;let ne={};Mo.forEach(ee=>{ne[ee.id]=Kt[ee.id]??"";});let me=S?.getInitialValues?{...ne,...S.getInitialValues(Kt)}:ne;Xe(me),Q(true);},Or=()=>{fe||Q(false);},jr=(ne,me)=>{Xe(ee=>({...ee,[ne]:me}));},Xo=async()=>{if(Kt){if(!S?.onSubmit){Q(false);return}try{Pe(!0),await S.onSubmit(et,Kt),Q(!1);}finally{Pe(false);}}},sr=()=>{Ht.length!==0&&ht(true);},On=()=>{gt||ht(false);},Fr=async()=>{if(Ht.length===0){ht(false);return}if(!T?.onConfirm){ht(false),Fe([]),l?.([]);return}try{Ct(!0),await T.onConfirm(Ht),ht(!1),Fe([]),l?.([]);}finally{Ct(false);}},N=ce,{fieldMapping:G}=mn({rows:N,config:{...C,title:C?.title||`${A} ${o("graph.reportTitle")}`}}),K=eo__namespace.default.useMemo(()=>Zt?Z.applyRows(N,G):N,[Zt,Z.applyRows,N,G]),{model:pe}=mn({rows:K,config:{...C,title:C?.title||`${A} ${o("graph.reportTitle")}`,fieldMapping:G}}),Be=pe.table.columns.map(ne=>({id:ne.id,label:ne.label,align:ne.align||"left",minWidth:120,numeric:ne.align==="right"})),rt=Yt?e(hn,{appId:Yt,tableKey:b,currentLayoutData:Vt,onLayoutLoad:st,targetLayoutId:Wt,activeLayoutId:St,serviceUrl:I??g?.serviceUrl}):null,Ge=c(jsxRuntime.Fragment,{children:[!w&&e(pn,{groupAnchorEl:Y,setGroupAnchorEl:ue,grouping:W,setGrouping:H,columns:D}),e(un,{anchorEl:Ve,setAnchorEl:Te,columns:D,visibleColumns:F,toggleColumnVisibility:de}),e(ki,{anchorEl:re,setAnchorEl:ge,showSummary:V,setShowSummary:z,columns:D,summaryColumns:X,toggleSummaryColumn:Ot}),e(Pi,{contextMenu:Ie,handleCloseContextMenu:Oe,columns:D,visibleColumns:F,toggleColumnVisibility:de})]});return R?c("div",{sx:{display:"flex",flexDirection:"column",gap:2,height:"100%"},children:[g&&e(_o,{fields:g.fields,filters:g.filters,onFilterChange:g.onFilterChange,onSearch:g.onSearch,variants:g.variants||[],currentVariantId:g.currentVariantId,onVariantLoad:g.onVariantLoad,onVariantSave:g.onVariantSave,onVariantDelete:g.onVariantDelete,onVariantSetDefault:g.onVariantSetDefault,appId:g.appId,tableKey:b,currentLayout:[{tableKey:b,layoutData:Vt}],variantService:g.variantService,serviceUrl:I??g.serviceUrl}),e(Op,{title:A,loading:u,showSummary:V,setShowSummary:z,setAnchorEl:Te,setSummaryAnchorEl:ge,filterText:_,setFilterText:J,sortedAndFilteredRows:ce,selected:s,columns:D,visibleColumns:F,summaryRow:be,handleClick:Rt,selectionMode:i}),Ge]}):c("div",{sx:{width:f?"100%":"auto",mb:m?0:2,...m?{flex:1,display:"flex",flexDirection:"column",minHeight:0,height:"100%",overflow:"hidden"}:{}},children:[g&&e("div",{sx:{mb:2},children:e(_o,{fields:g.fields,filters:g.filters,onFilterChange:g.onFilterChange,onSearch:g.onSearch,variants:g.variants||[],currentVariantId:g.currentVariantId,onVariantLoad:ne=>{pt(ne),g.onVariantLoad&&g.onVariantLoad(ne);},onVariantSave:g.onVariantSave,onVariantDelete:g.onVariantDelete,onVariantSetDefault:g.onVariantSetDefault,loading:u,appId:g.appId,tableKey:b,currentLayout:[{tableKey:b,layoutData:Vt}],currentLayoutId:St,layoutRefs:[{tableKey:b,layoutId:St}],variantService:g.variantService,serviceUrl:I??g.serviceUrl})}),c(Ae,{className:"orb-ctable-surface",sx:{width:f?"100%":"auto",mb:m?0:2,display:"flex",flexDirection:"column",overflow:"hidden",position:"relative","&::before":no?{content:'""',position:"absolute",top:0,left:0,width:"100%",height:"3px",background:"linear-gradient(90deg, color-mix(in oklch, var(--orb-primary) 0%, transparent) 0%, color-mix(in oklch, var(--orb-primary) 25%, transparent) 25%, var(--orb-primary) 50%, color-mix(in oklch, var(--orb-primary) 25%, transparent) 75%, color-mix(in oklch, var(--orb-primary) 0%, transparent) 100%)",backgroundSize:"220% 100%",animation:"cTableTopMarquee 1.2s linear infinite",zIndex:6,pointerEvents:"none"}:{},"@keyframes cTableTopMarquee":{"0%":{backgroundPosition:"220% 0"},"100%":{backgroundPosition:"-120% 0"}},...h?{height:h}:m?{flex:1,minHeight:0,height:"100%"}:{}},children:[a&&e(Ci,{filterText:_,setFilterText:J,onRowsPerPageChange:De,rowsPerPage:q,rowsPerPageOptions:v,page:nt,count:Ce,onPageChange:it,actions:d,extraTools:p,grouping:W,disableGrouping:w,groupAnchorEl:Y,setGroupAnchorEl:ue,showSummary:V,setShowSummary:z,anchorEl:Ve,setAnchorEl:Te,summaryAnchorEl:re,setSummaryAnchorEl:ge,handleExport:oe,showCreateButton:$,onOpenCreateDialog:Xr,showEditButton:j,onOpenEditDialog:Do,editDisabled:Ht.length!==1,showDeleteButton:he,onOpenDeleteConfirm:sr,deleteDisabled:Ht.length===0,onLayoutSave:y||g?.variantService&&g?.appId?Bt:void 0,loading:u,layoutManager:rt,onOpenGraphReport:Ft?Nt:void 0}),e("div",{sx:{flex:1,...h?{maxHeight:h,height:h}:m?{height:0,maxHeight:"none"}:{maxHeight:"calc(100vh - 320px)"},overflowY:"auto",overflowX:"auto",position:"relative",minHeight:0},children:e(core.DndContext,{sensors:He,collisionDetection:core.closestCenter,onDragEnd:At,modifiers:[modifiers.restrictToHorizontalAxis],children:c("table",{className:"orb-tbl orb-ctable",style:{minWidth:f?750:void 0,width:f?"100%":"auto",tableLayout:Object.keys(we).length>0?"fixed":"auto",borderCollapse:"separate",borderSpacing:0,fontSize:r},"aria-labelledby":"tableTitle",children:[e(wi,{columns:D,visibleColumns:F,order:E,orderBy:O,onRequestSort:Ze,disableSorting:M,onContextMenu:Ke,selectionMode:i,grouping:W,isAllExpanded:tt,handleToggleAll:te,rowCount:ce.length,numSelected:s.length,onSelectAllClick:wt,columnWidths:we,onColumnResize:at}),e(Si,{visibleRows:We,columns:D,visibleColumns:F,selectionMode:i,selected:s,orderBy:O,loading:u,expandedGroups:U,toggleGroupExpand:ye,handleExpandGroupRecursively:ve,handleCollapseGroupRecursively:Ne,isGroupFullyExpanded:Je,handleClick:Rt,onSelectionChange:l,grouping:W,rowKeyProp:x,page:nt,rowsPerPage:q}),V&&e(Lp,{showSummary:V,columns:D,visibleColumns:F,summaryRow:be,selectionMode:i?.toString(),grouping:W,columnWidths:we,orderBy:O,zIndex:3})]})})})]}),$&&c(Lt,{open:qe,onClose:Lr,fullWidth:true,maxWidth:"sm",slotProps:{paper:{sx:{borderRadius:2,border:ne=>`1px solid ${ne.palette.divider}`,bgcolor:"background.paper"}}},children:[e("div",{className:"orb-dialog-title",sx:{fontSize:"0.85rem",fontWeight:700,pb:1},children:k?.title||o("quickCreate.createWithTitle",{title:A})}),e("div",{className:"orb-dialog-content",sx:{pt:"8px !important"},children:c("div",{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[Et.map(ne=>{let me=ne.type==="number"||ne.numeric?"number":ne.type==="date"?"date":"text",ee=ne.label||ne.id;return e(ze,{label:ee,value:Mt[ne.id]??"",onChange:Le=>Yr(ne.id,Le.target.value),type:me,size:"small",fullWidth:true,InputLabelProps:{shrink:me==="date"?true:void 0,sx:{fontSize:"0.85rem"}},InputProps:{sx:{fontSize:"0.85rem"}}},`quick-create-${ne.id}`)}),k?.description&&e(Jo,{severity:"info",sx:{fontSize:"0.85rem","& span":{fontSize:"0.85rem"}},children:k.description})]})}),c("div",{className:"orb-dialog-actions",sx:{px:3,pb:2},children:[e(ke,{onClick:Lr,sx:{fontSize:"0.85rem"},disabled:mt,children:k?.cancelLabel||o("common.cancel")}),e(ke,{onClick:Zr,variant:"contained",sx:{fontSize:"0.85rem",fontWeight:700},disabled:mt,children:k?.submitLabel||o("common.save")})]})]}),j&&c(Lt,{open:B,onClose:Or,fullWidth:true,maxWidth:"sm",slotProps:{paper:{sx:{borderRadius:2,border:ne=>`1px solid ${ne.palette.divider}`,bgcolor:"background.paper"}}},children:[e("div",{className:"orb-dialog-title",sx:{fontSize:"0.85rem",fontWeight:700,pb:1},children:S?.title||o("quickEdit.editWithTitle",{title:A})}),e("div",{className:"orb-dialog-content",sx:{pt:"8px !important"},children:c("div",{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[Mo.map(ne=>{let me=ne.type==="number"||ne.numeric?"number":ne.type==="date"?"date":"text",ee=ne.label||ne.id,Le=qr(ne.id);return e(ze,{label:ee,value:et[ne.id]??"",onChange:Qe=>jr(ne.id,Qe.target.value),type:me,size:"small",fullWidth:true,disabled:!Le,InputLabelProps:{shrink:me==="date"?true:void 0,sx:{fontSize:"0.85rem"}},InputProps:{sx:{fontSize:"0.85rem"}}},`quick-edit-${ne.id}`)}),S?.description&&e(Jo,{severity:"info",sx:{fontSize:"0.85rem","& span":{fontSize:"0.85rem"}},children:S.description})]})}),c("div",{className:"orb-dialog-actions",sx:{px:3,pb:2},children:[e(ke,{onClick:Or,sx:{fontSize:"0.85rem"},disabled:fe,children:S?.cancelLabel||o("common.cancel")}),e(ke,{onClick:Xo,variant:"contained",sx:{fontSize:"0.85rem",fontWeight:700},disabled:fe||!Kt,children:S?.submitLabel||o("common.save")})]})]}),he&&e(Qn,{open:kt,type:"warning",title:T?.title||o("quickDelete.confirmTitle"),message:T?.message||(Ht.length>1?o("quickDelete.confirmMessageMultiple",{count:Ht.length}):o("quickDelete.confirmMessageSingle")),confirmText:T?.confirmText||o("common.delete"),cancelText:T?.cancelText||o("common.cancel"),onClose:On,onConfirm:Fr}),Ge,Ft&&e(Di,{open:bt,onClose:lt,model:pe,aiAssistant:C?.aiAssistant,interaction:Zt?{enabled:true,filters:Z.filters,fieldMapping:G,onPrimaryDimensionClick:ne=>Z.setFilter("primaryDimension",ne),onSecondaryDimensionClick:ne=>Z.setFilter("secondaryDimension",ne),onStatusClick:ne=>Z.setFilter("status",ne),onClearFilter:Z.clearFilter,onClearAll:Z.clearAll}:void 0,tableContent:e(tr,{appId:Yt||"graph-report-internal",title:o("graph.dataBody"),columns:Be,rows:pe.table.rows,rowKey:"id",fullWidth:true,maxHeight:"420px",rowsPerPage:20,rowsPerPageOptions:[20,50,100],graphReport:{enabled:false}})})]})},FD=tr;P();var _D=({id:t,title:o,hideHeader:r=true,filterConfig:n,tableProps:a,children:i,spacing:s=1,mode:l="separated"})=>{let d=n?{...n,appId:n.appId||t}:void 0,p={...a,appId:a.appId||t};return c(bi,{title:o,hideHeader:r,children:[c(se,{spacing:s,sx:{height:"100%",overflow:"hidden"},children:[l==="separated"&&d&&e("div",{sx:{flexShrink:0},children:e(_o,{...d})}),e("div",{sx:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:e(tr,{...p,fitContainer:true,filterConfig:l==="integrated"?d:void 0})})]}),i]})};var YD=({metadata:t,fetchData:o,initialRowsPerPage:r=20,rowsPerPageOptions:n=[20,50,100,-1],tableKey:a="default",mode:i="integrated",serviceUrl:s,variantService:l})=>{let{t:d}=le(),[p,m]=eo.useState(false),[f,h]=eo.useState([]),[u,v]=eo.useState({}),[y,g]=eo.useState(t.variants||[]),[x,b]=eo.useState(t.layout||null),[C,k]=eo.useState(""),[S,T]=eo.useState(0),[I,w]=eo.useState(0),[M,A]=eo.useState(r),[R,D]=eo.useState([]),[E,O]=eo.useState("asc"),[_,J]=eo.useState("");eo.useEffect(()=>{let re={};t.filters.forEach(ge=>{ge.defaultValue!==void 0&&(re[ge.id]=ge.defaultValue);}),v(re);},[t.filters]);let F=eo.useCallback(async(re,ge,we,Ve,Te)=>{m(true);try{let Ie={...re,page:ge+1,limit:we,sort:Te,order:Ve},He;o?He=await o(Ie):typeof t.api=="function"?He=await t.api(Ie):t.api&&typeof t.api=="object"?(console.log("Fetching from URL:",t.api.url,Ie),He={rows:[],total:0}):(console.warn("No API configured for report"),He={rows:[],total:0}),He&&(h(He.rows||[]),T(He.total||0));}catch(Ie){console.error("Failed to fetch report data",Ie);}finally{m(false);}},[t.api,o]);eo.useEffect(()=>{F(u,I,M,E,_);},[F,I,M,E,_]);let V=()=>{w(0),F(u,0,M,E,_);},z=re=>{w(0),A(re);},X=(re,ge)=>{O(ge),J(re);},W=re=>{v(re);},H=re=>{k(re?.id||"");let ge=Bi(re,a);if(ge){let Ve=ge.values??ge;v(Ve),F(Ve,0,M,E,_),w(0);}let{layout:we}=Hi(re,a);we&&b(we);},U=re=>{let ge={...re,id:Date.now().toString(),createdAt:new Date().toISOString()};g(we=>[...we,ge]);},Y=re=>{b(re);};return {pageProps:{id:t.id,title:t.title,mode:i,filterConfig:{appId:t.id,tableKey:a,fields:t.filters,filters:u,onFilterChange:W,onSearch:V,onVariantLoad:H,onVariantSave:U,onVariantDelete:re=>g(ge=>ge.filter(we=>we.id!==re)),onVariantSetDefault:re=>{g(ge=>ge.map(we=>({...we,isDefault:we.id===re})));},variants:y,currentVariantId:C,variantService:l,serviceUrl:s},tableProps:{appId:t.id,tableKey:a,columns:t.columns,rows:f,loading:p,rowKey:"id",count:S,page:I,rowsPerPage:M,rowsPerPageOptions:n,onPageChange:w,onRowsPerPageChange:z,selectionMode:"multiple",selected:R,onSelectionChange:D,onLayoutSave:Y,layout:x,title:t.title,showSummary:true,order:E,orderBy:_,serviceUrl:s,onSortChange:X,graphReport:t.graphReport||{enabled:true,title:`${t.title} ${d("graph.reportTitle")}`}}},filters:u,rows:f,loading:p,refresh:V}};P();var Gb=new Set(["id","title","description","icon","iconNode","meta"]),Ub=t=>t.replace(/([A-Z])/g," $1").replace(/[._-]+/g," ").replace(/^\w/,o=>o.toUpperCase()).trim(),Kb=t=>Object.entries(t).filter(([o,r])=>!Gb.has(o)&&r!==null&&r!==void 0&&["string","number","boolean"].includes(typeof r)).map(([o,r])=>({key:o,label:Ub(o),value:String(r)})),cu=({item:t,open:o,onClose:r,onDownloadClick:n,renderContent:a,downloadTooltip:i,closeTooltip:s})=>{let{t:l}=le(),p=fo()==="dark"?"var(--orb-p300)":"var(--orb-primary)";eo__namespace.default.useEffect(()=>{if(!o)return;let f=h=>{h.key==="Escape"&&r();};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[o,r]);let m=Kb(t);return typeof document>"u"?null:reactDom.createPortal(c(jsxRuntime.Fragment,{children:[e("div",{"aria-hidden":"true",onClick:r,sx:{position:"fixed",inset:0,zIndex:1299,backgroundColor:"rgba(1, 9, 26, 0.4)",opacity:o?1:0,pointerEvents:o?"auto":"none",transition:"opacity 200ms ease"}}),c("div",{role:"dialog","aria-modal":"true","aria-label":t.title,sx:{position:"fixed",top:"50%",left:"50%",zIndex:1300,width:"min(520px, 92vw)",maxHeight:"82vh",display:"flex",flexDirection:"column",bgcolor:"background.paper",border:"1px solid",borderColor:"divider",borderRadius:3,boxShadow:"0 24px 64px rgba(1, 9, 26, 0.3)",transform:o?"translate(-50%, -50%) scale(1)":"translate(-50%, -47%) scale(0.96)",opacity:o?1:0,transition:"transform 200ms ease, opacity 180ms ease"},children:[c(se,{direction:"row",spacing:1.5,alignItems:"center",sx:{p:2.5,pb:2,borderBottom:"1px solid",borderColor:"divider",flexShrink:0},children:[e("div",{sx:{width:56,height:56,flex:"0 0 auto",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:3,border:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:t.iconNode??e(Tt,{name:t.icon??"product",size:30,style:{color:p}})}),c("div",{sx:{flex:1,minWidth:0},children:[e(L,{component:"div",sx:{fontWeight:700,fontSize:"1.1rem",lineHeight:1.3,wordBreak:"break-word"},children:t.title}),t.meta?e(L,{component:"div",sx:{fontSize:"0.8rem",color:"text.secondary"},children:t.meta}):null]}),e(ie,{tooltip:s??l("cardPage.close"),"aria-label":s??l("cardPage.close"),onClick:r,children:e(Tt,{name:"decline",size:18})})]}),e("div",{sx:{flex:1,minHeight:0,overflowY:"auto",p:2.5},children:a?a(t):c(jsxRuntime.Fragment,{children:[t.description?e(L,{component:"div",sx:{fontSize:"0.9rem",lineHeight:1.6,color:"text.primary"},children:t.description}):null,m.length>0?e("div",{sx:{mt:t.description?2.5:0,display:"grid",gap:1.5},children:m.map(f=>c("div",{children:[e(L,{component:"div",sx:{fontSize:"0.72rem",fontWeight:600,color:"text.secondary",textTransform:"uppercase",letterSpacing:"0.04em"},children:f.label}),e(L,{component:"div",sx:{fontSize:"0.88rem",color:"text.primary",wordBreak:"break-word"},children:f.value})]},f.key))}):null]})}),n?e("div",{sx:{p:2.5,pt:2,borderTop:"1px solid",borderColor:"divider",flexShrink:0},children:e(ke,{variant:"contained",sx:{width:"100%"},startIcon:e(Tt,{name:"download",size:16}),onClick:()=>n(t),children:i??l("cardPage.download")})}):null]})]}),document.body)};P();var qb={display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"3",overflow:"hidden"},Xb=({item:t,onDetailClick:o,onDownloadClick:r,detailTooltip:n,downloadTooltip:a})=>{let{t:i}=le(),l=fo()==="dark"?"var(--orb-p300)":"var(--orb-primary)",d=t.iconNode??e(Tt,{name:t.icon??"product",size:26,style:{color:l}});return c(Ae,{elevation:0,sx:{p:2,height:"100%",display:"flex",flexDirection:"column",borderRadius:3,border:"1px solid",borderColor:"divider",bgcolor:"background.paper",boxShadow:"0 8px 20px rgba(15, 23, 42, 0.06)",transition:"transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease","&:hover":{transform:"translateY(-2px)",borderColor:"primary.main",boxShadow:"0 14px 32px rgba(15, 23, 42, 0.12)"}},children:[c(se,{direction:"row",spacing:1.5,alignItems:"center",children:[e("div",{sx:{width:48,height:48,flex:"0 0 auto",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:2.5,border:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:d}),c("div",{sx:{flex:1,minWidth:0},children:[e(L,{component:"div",noWrap:true,sx:{fontWeight:700,fontSize:"0.98rem",lineHeight:1.3},children:t.title}),t.meta?e(L,{component:"div",noWrap:true,sx:{fontSize:"0.75rem",color:"text.secondary"},children:t.meta}):null]})]}),e("div",{sx:{mt:1.5,flex:1,minHeight:0},children:e(L,{component:"div",sx:{fontSize:"0.84rem",lineHeight:1.45,color:"text.primary",...qb},children:t.description||"\xA0"})}),c(se,{direction:"row",spacing:.5,justifyContent:"flex-end",sx:{mt:1.5},children:[e(ie,{tooltip:n??i("cardPage.viewDetails"),"aria-label":n??i("cardPage.viewDetails"),onClick:()=>o?.(t),children:e(Tt,{name:"show",size:18})}),e(ie,{tooltip:a??i("cardPage.download"),"aria-label":a??i("cardPage.download"),onClick:()=>r?.(t),children:e(Tt,{name:"download",size:18})})]})]})},pu=({items:t,loading:o=false,onDetailClick:r,onDownloadClick:n,minCardWidth:a=260,detailTooltip:i,downloadTooltip:s,emptyText:l,detailPanel:d=true,renderDetailContent:p})=>{let{t:m}=le(),[f,h]=eo__namespace.default.useState(null),[u,v]=eo__namespace.default.useState(false),y=x=>{r?.(x),d&&(h(x),requestAnimationFrame(()=>requestAnimationFrame(()=>v(true))));},g=()=>{v(false),setTimeout(()=>h(null),260);};return o?e("div",{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",minHeight:240},children:e(Zo,{})}):t.length?c(jsxRuntime.Fragment,{children:[e("div",{sx:{flex:1,minHeight:0,overflowY:"auto",display:"grid",gridTemplateColumns:`repeat(auto-fill, minmax(${a}px, 1fr))`,gap:2,alignContent:"start",p:.5},children:t.map(x=>e(Xb,{item:x,onDetailClick:y,onDownloadClick:n,detailTooltip:i,downloadTooltip:s},x.id))}),d&&f?e(cu,{item:f,open:u,onClose:g,onDownloadClick:n,renderContent:p,downloadTooltip:s}):null]}):e("div",{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",minHeight:240},children:e(L,{sx:{color:"text.secondary"},children:l??m("cardPage.empty")})})};P();var bN=({id:t,title:o,hideHeader:r=true,filterConfig:n,gridProps:a,children:i,spacing:s=1})=>{let l=n?{...n,appId:n.appId||t}:void 0;return c(bi,{title:o,hideHeader:r,children:[c(se,{spacing:s,sx:{height:"100%",overflow:"hidden"},children:[l&&e("div",{sx:{flexShrink:0},children:e(_o,{...l})}),e("div",{sx:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:e(pu,{...a})})]}),i]})};var wN=({metadata:t,fetchData:o,tableKey:r="default",variantService:n,serviceUrl:a,onDetailClick:i,onDownloadClick:s,minCardWidth:l})=>{let[d,p]=eo.useState(false),[m,f]=eo.useState([]),[h,u]=eo.useState(0),[v,y]=eo.useState({}),[g,x]=eo.useState(t.variants||[]),[b,C]=eo.useState("");eo.useEffect(()=>{let A={};t.filters.forEach(R=>{R.defaultValue!==void 0&&(A[R.id]=R.defaultValue);}),y(A);},[t.filters]);let k=eo.useCallback(async A=>{p(true);try{let R=o?await o({...A}):{rows:[],total:0};f(R?.rows||[]),u(R?.total||0);}catch(R){console.error("Failed to fetch card page data",R);}finally{p(false);}},[o]);eo.useEffect(()=>{k(v);},[k]);let S=()=>{k(v);},T=A=>{y(A);},I=A=>{C(A?.id||"");let R=Bi(A,r);if(R){let D=R.values??R;y(D),k(D);}},w=A=>{let R={...A,id:Date.now().toString(),createdAt:new Date().toISOString()};x(D=>[...D,R]);};return {pageProps:{id:t.id,title:t.title,filterConfig:{appId:t.id,tableKey:r,fields:t.filters,filters:v,onFilterChange:T,onSearch:S,onVariantLoad:I,onVariantSave:w,onVariantDelete:A=>x(R=>R.filter(D=>D.id!==A)),onVariantSetDefault:A=>{x(R=>R.map(D=>({...D,isDefault:D.id===A})));},variants:g,currentVariantId:b,variantService:n,serviceUrl:a},gridProps:{items:m,loading:d,onDetailClick:i,onDownloadClick:s,minCardWidth:l}},items:m,total:h,filters:v,loading:d,refresh:S}};var Zb=t=>[...t].sort((o,r)=>r.value-o.value),PN=({bars:t=[],lines:o=[],combos:r=[],heatmap:n=[],pies:a=[],waterfalls:i=[]})=>{let s=eo.useMemo(()=>Zb(t),[t]),l=eo.useMemo(()=>[...o],[o]),d=eo.useMemo(()=>[...r],[r]),p=eo.useMemo(()=>[...n],[n]),m=eo.useMemo(()=>{let h=a.reduce((u,v)=>u+v.value,0);return a.map(u=>({...u,percent:h>0?u.value/h*100:u.percent}))},[a]),f=eo.useMemo(()=>[...i],[i]);return {bars:s,lines:l,combos:d,heatmap:p,pies:m,waterfalls:f}};var DN=({apiKey:t,query:o,zoom:r=14,mapType:n="roadmap"})=>eo.useMemo(()=>!t||!o?"":na({apiKey:t,query:o,zoom:r,mapType:n}),[t,o,r,n]),NN=({keyword:t,location:o})=>eo.useMemo(()=>Ri({keyword:t,location:o?{lng:o.lng,lat:o.lat,name:o.name}:void 0}),[t,o]);P();var ca=({code:t,language:o="text",copyable:r=true,showLineNumbers:n=false,wrapLongLines:a=false,maxHeight:i})=>{let[s,l]=eo.useState(false),d=eo.useMemo(()=>t.replace(/\n$/,"").split(`
|
|
186
|
-
`),[t]);return c("div",{style:{border:"1px solid var(--orb-border)",borderRadius:12,overflow:"hidden",background:"var(--orb-canvas)"},children:[c("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"4.8px 8px",background:"var(--orb-hover)",borderBottom:"1px solid var(--orb-border)"},children:[e("span",{style:{fontSize:12,fontWeight:500,textTransform:"uppercase",letterSpacing:.5,color:"var(--orb-muted)",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},children:o}),r&&e(
|
|
187
|
-
`).map(s=>s.trim()).filter(Boolean);if(o.length<2)return null;let r=
|
|
183
|
+
`;return to.useEffect(()=>{let d=i.current;if(!d)return;let p=new ogl.Renderer({alpha:true,premultipliedAlpha:false}),m=p.gl;m.clearColor(0,0,0,0),d.appendChild(m.canvas);let h=new ogl.Triangle(m),f=new ogl.Program(m,{vertex:s,fragment:l,uniforms:{iTime:{value:0},iResolution:{value:new ogl.Vec3(m.canvas.width,m.canvas.height,m.canvas.width/m.canvas.height)},hue:{value:t},hover:{value:0},rot:{value:0},hoverIntensity:{value:o},backgroundColor:{value:Tm(a)}}}),u=new ogl.Mesh(m,{geometry:h,program:f});function b(){if(!d)return;let R=window.devicePixelRatio||1,w=d.clientWidth,A=d.clientHeight;p.setSize(w*R,A*R),m.canvas.style.width=w+"px",m.canvas.style.height=A+"px",f.uniforms.iResolution.value.set(m.canvas.width,m.canvas.height,m.canvas.width/m.canvas.height);}window.addEventListener("resize",b),b();let y=0,g=0,x=0,v=.3,C=R=>{let w=d.getBoundingClientRect(),A=R.clientX-w.left,D=R.clientY-w.top,T=w.width,k=w.height,E=Math.min(T,k),O=T/2,$=k/2,ee=(A-O)/E*2,F=(D-$)/E*2;Math.sqrt(ee*ee+F*F)<.8?y=1:y=0;},P=()=>{y=0;};d.addEventListener("mousemove",C),d.addEventListener("mouseleave",P);let S,I=R=>{S=requestAnimationFrame(I);let w=(R-g)*.001;g=R,f.uniforms.iTime.value=R*.001,f.uniforms.hue.value=t,f.uniforms.hoverIntensity.value=o,f.uniforms.backgroundColor.value=Tm(a);let A=n?1:y;f.uniforms.hover.value+=(A-f.uniforms.hover.value)*.1,r&&A>.5&&(x+=w*v),f.uniforms.rot.value=x,p.render({scene:u});};return S=requestAnimationFrame(I),()=>{cancelAnimationFrame(S),window.removeEventListener("resize",b),d.removeEventListener("mousemove",C),d.removeEventListener("mouseleave",P),m.canvas.parentNode===d&&d.removeChild(m.canvas),m.getExtension("WEBGL_lose_context")?.loseContext();}},[t,o,r,n,a]),e("div",{ref:i,className:"w-full h-full"})}function jy(t,o,r){let n,a,i;if(o===0)n=a=i=r;else {let s=(p,m,h)=>(h<0&&(h+=1),h>1&&(h-=1),h<.16666666666666666?p+(m-p)*6*h:h<.5?m:h<.6666666666666666?p+(m-p)*(.6666666666666666-h)*6:p),l=r<.5?r*(1+o):r+o-r*o,d=2*r-l;n=s(d,l,t+1/3),a=s(d,l,t),i=s(d,l,t-1/3);}return new ogl.Vec3(n,a,i)}function Tm(t){if(t==="transparent")return new ogl.Vec3(0,0,0);if(t.startsWith("#")){let n=parseInt(t.slice(1,3),16)/255,a=parseInt(t.slice(3,5),16)/255,i=parseInt(t.slice(5,7),16)/255;return new ogl.Vec3(n,a,i)}let o=t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(o)return new ogl.Vec3(parseInt(o[1])/255,parseInt(o[2])/255,parseInt(o[3])/255);let r=t.match(/hsla?\((\d+),\s*(\d+)%,\s*(\d+)%/);if(r){let n=parseInt(r[1])/360,a=parseInt(r[2])/100,i=parseInt(r[3])/100;return jy(n,a,i)}return new ogl.Vec3(0,0,0)}var Mm=qs(()=>{"use strict";"use client";M();});var mh={canvas:"#ffffff",surface:"#f5f5f5",surface2:"#f5f5f5",surface3:"#f5f5f5",fg:"#555555",muted:"#8c8c8c",border:"#dbdbdb",primary:"#154194",onPrimary:"#ffffff",link:"#154194",p50:"#f0f3f9",p100:"#dce4f1",p200:"#bac9e3",p300:"#91a8d1",p600:"#0f3276",p700:"#08255a",accent:"#fc4c02",err:"#ac3101",errBg:"#fff4f0",warnBg:"#fff2ee",hover:"rgba(21, 65, 148, 0.06)",selected:"rgba(21, 65, 148, 0.10)",focusRing:"rgba(21, 65, 148, 0.18)",focusSolid:"#154194",disabledFg:"#aeaeae",disabledBg:"#f0f0f0",chartGrid:"#dbdbdb",chartText:"#8c8c8c",track:"#f5f5f5",shadow1:"0 1px 2px rgba(1,9,26,.05),0 2px 6px rgba(1,9,26,.06)",shadow2:"0 4px 14px rgba(1,9,26,.10)",shadow3:"0 12px 32px rgba(1,9,26,.16)",fontBrand:"Montserrat",inverseSurface:"#01091a",inverseFg:"#ffffff",inverseLink:"#91a8d1",aiAccent:"#21bcff",statusFg:"#475569",statusPrimary:"#1d4ed8",statusSuccess:"#047857",statusWarning:"#b45309",statusError:"#b91c1c",statusInfo:"#0369a1",chart1:"#154194",chart2:"#91a8d1",chart3:"#8c8c8c",chart4:"#08255a",chart5:"#fc4c02",chart6:"#bac9e3",chartPositive:"#66bb6a",chartNegative:"#ef5350"},gh={canvas:"#01091a",surface:"#0a1526",surface2:"#061324",surface3:"#0e1b2b",fg:"#ffffff",muted:"rgba(255,255,255,0.7)",border:"rgba(255,255,255,0.12)",primary:"#154194",onPrimary:"#ffffff",link:"#91a8d1",p50:"#021432",p100:"#021a3d",p200:"#bac9e3",p300:"#91a8d1",p600:"#375ea5",p700:"#6e8cc1",accent:"#fc4c02",err:"#d53f01",errBg:"#16163b",warnBg:"#19173f",hover:"rgba(255,255,255,0.08)",selected:"rgba(21, 65, 148, 0.45)",focusRing:"rgba(145, 168, 209, 0.45)",focusSolid:"#91a8d1",disabledFg:"rgba(255,255,255,0.38)",disabledBg:"rgba(255,255,255,0.07)",chartGrid:"rgba(255,255,255,0.12)",chartText:"rgba(255,255,255,0.7)",track:"rgba(255,255,255,0.1)",shadow1:"0 1px 2px rgba(0,0,0,.4),0 2px 8px rgba(0,0,0,.35)",shadow2:"0 4px 16px rgba(0,0,0,.5)",shadow3:"0 12px 32px rgba(0,0,0,.55)",fontBrand:"Montserrat",inverseSurface:"#01091a",inverseFg:"#ffffff",inverseLink:"#91a8d1",aiAccent:"#21bcff",statusFg:"#94a3b8",statusPrimary:"#60a5fa",statusSuccess:"#34d399",statusWarning:"#fbbf24",statusError:"#f87171",statusInfo:"#38bdf8",chart1:"#154194",chart2:"#91a8d1",chart3:"rgba(255,255,255,0.7)",chart4:"#a4b8dd",chart5:"#fc4c02",chart6:"#bac9e3",chartPositive:"#66bb6a",chartNegative:"#ef5350"},Xs={light:mh,dark:gh},pw='"Montserrat", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif',uw=t=>{let o=Xs[t];return [o.primary,o.p300,o.muted,o.p700]},mw=10,gw="0.2s ease";M();var Wc=to.createContext({mode:"light",setting:"light"}),Th=t=>{if(typeof document>"u")return;let o=document.documentElement;o.classList.toggle("orb-dark",t==="dark"),o.dataset.orbMode=t,o.style.colorScheme=t;},zn=({mode:t,defaultMode:o="light",children:r})=>{let n=t??o,[a,i]=to.useState("light"),[s,l]=to.useState(false);to.useEffect(()=>{l(true);let m=window.matchMedia("(prefers-color-scheme: dark)"),h=()=>i(m.matches?"dark":"light");return h(),m.addEventListener("change",h),()=>m.removeEventListener("change",h)},[]);let d=n==="system"?s?a:"light":n;to.useEffect(()=>{Th(d);},[d]);let p=to.useMemo(()=>({mode:d,setting:n}),[d,n]);return e(Wc.Provider,{value:p,children:r})},bo=()=>to.useContext(Wc).mode,Ys=()=>Xs[bo()];var ot=(t,o)=>{let r=Math.min(1,Math.max(0,o)),n=t.trim(),a=d=>d.split("").map(p=>p+p).join(""),i=n.startsWith("#")?n.slice(1):"",s=i.length===3?a(i):i;if(/^[0-9a-fA-F]{6}$/.test(s)){let d=parseInt(s.slice(0,2),16),p=parseInt(s.slice(2,4),16),m=parseInt(s.slice(4,6),16);return `rgba(${d}, ${p}, ${m}, ${r})`}let l=`${Math.round(r*100)}%`;return `color-mix(in oklch, ${t} ${l}, transparent)`};var Eo=t=>{let o=t.startsWith("up:")?`(min-width:${t.slice(3)}px)`:t.startsWith("down:")?`(max-width:${t.slice(5)}px)`:t,[r,n]=to.useState(()=>typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia(o).matches);return to.useEffect(()=>{if(typeof window.matchMedia!="function")return;let a=window.matchMedia(o),i=()=>n(a.matches);return i(),a.addEventListener("change",i),()=>a.removeEventListener("change",i)},[o]),r};M();var Rh={accept:57435,activate:57864,activity:57769,add:57432,barChart:57417,calendar:57414,camera:57413,checklist:57952,collapseAll:57988,command:57997,copy:57925,darkMode:58122,decline:57406,delete:57405,dimension:57718,document:57780,down:57827,download:57402,duplicate:57401,edit:57400,email:57399,employee:57398,error:57836,expandAll:57987,factory:57464,favorite:57445,filter:57462,fullScreen:57702,grid:57457,hide:57834,home:57456,information:57993,inventory:57693,ipad:57491,lightMode:58121,lightbulb:57380,lineChart:57740,locked:57683,log:57378,map:57377,menu:57822,message:57884,microphone:57586,move:57832,navigationLeft:57447,navigationRight:57446,overflow:57842,overview:57551,paperPlane:57548,picture:57366,pieChart:57365,play:57499,process:57543,product:57361,pushpin:57503,qrCode:57999,receipt:57541,refresh:57360,save:57498,search:57357,show:57833,shipping:57523,slimDown:57839,slimUp:57840,sort:57853,sound:57895,splitOne:57919,splitTwo:57920,stop:57861,sum:57998,synchronize:57354,table:57530,tableColumn:57983,tableRow:57982,thumbDown:57891,thumbUp:57890,time:57508,translate:57995,tree:57588,trendDown:57931,up:57828,upload:57881,warning:57492,world:57489,wrench:57346},Nh=t=>typeof t=="number"?`${t}px`:t,Dh={"2.5":10,3:12,"3.5":14,4:16,5:20,6:24,7:28,8:32,10:40,12:48},Ah=t=>{if(!t)return;let o=t.match(/(?:^|\s)(?:h|w)-(2\.5|3(?:\.5)?|4|5|6|7|8|10|12)(?:\s|$)/);return o?Dh[o[1]]:void 0},Tt=to.forwardRef(({name:t,size:o,title:r,className:n,style:a,strokeWidth:i,fill:s,...l},d)=>{let p=l["aria-label"]??r,m=Nh(o??Ah(n)??"1em"),h={fontFamily:"SAP-icons",fontSize:m,fontStyle:"normal",fontWeight:"normal",lineHeight:1,width:m,height:m,display:"inline-flex",alignItems:"center",justifyContent:"center",flex:"0 0 auto",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...a};return e("span",{ref:d,role:p?"img":void 0,"aria-hidden":p?void 0:true,title:r,className:n,"data-sap-icon":t,style:h,...l,children:String.fromCodePoint(Rh[t])})});Tt.displayName="SapIcon";var ie=(t,o)=>{let r=to.forwardRef((n,a)=>e(Tt,{ref:a,name:t,...n}));return r.displayName=o??`SapIcon(${t})`,r};var _c=ie("activity","Activity"),Fa=ie("error","AlertCircle"),Gc=ie("warning","AlertTriangle"),Fw=ie("down","ArrowDown"),Bw=ie("navigationRight","ArrowRight"),Uc=ie("up","ArrowUp"),js=ie("barChart","BarChart"),Hw=ie("activate","Bot"),Qs=ie("calendar","Calendar"),zw=Qs,Vw=ie("camera","Camera"),Ww=ie("lineChart","ChartNoAxesCombined"),ko=ie("accept","Check"),Ba=ie("accept","CheckCircle"),Vo=ie("slimDown","ChevronDown"),Ha=ie("navigationLeft","ChevronLeft"),Wo=ie("navigationRight","ChevronRight"),$w=ie("slimUp","ChevronUp"),_w=ie("expandAll","ChevronsDown"),Gw=ie("collapseAll","ChevronsUp"),za=ie("error","CircleAlert"),Vn=ie("accept","CircleCheck"),Uw=Vn,Js=ie("stop","CircleStop"),Kc=ie("copy","Clipboard"),Kw=ie("checklist","ClipboardCheck"),qw=ie("checklist","ClipboardList"),qc=ie("time","Clock"),Xw=ie("tableColumn","Columns3"),Lo=ie("copy","Copy"),Zw=ie("duplicate","CopyPlus"),Yw=ie("delete","Delete"),Wn=ie("download","Download"),Xc=ie("edit","Edit"),Zc=ie("fullScreen","Expand"),jw=ie("show","Eye"),Qw=ie("hide","EyeOff"),Va=ie("document","File"),Yc=ie("document","FileText"),Jw=ie("filter","Filter"),$n=ie("tree","FolderTree"),jc=ie("process","GitBranch"),_n=ie("world","Globe"),Qc=ie("grid","Grid"),eS=ie("move","GripVertical"),tS=ie("wrench","Hammer"),Jc=ie("picture","Image"),Wa=ie("information","Info"),oS=ie("translate","Languages"),rS=ie("dimension","Layers"),nS=ie("home","LayoutDashboard"),$a=ie("lightbulb","Lightbulb"),ed=ie("lineChart","LineChart"),td=ie("synchronize","Loader2"),_a=ie("locked","Lock"),aS=_a,od=ie("log","LogOut"),el=ie("email","Mail"),rd=ie("map","MapPin"),nd=ie("menu","Menu"),Eh=ie("message","MessageCircle"),ad=Eh,Ga=ie("microphone","Mic"),iS=ie("microphone","MicOff"),id=ie("darkMode","Moon"),sS=ie("overflow","MoreHorizontal"),lS=ie("accept","PackageCheck"),cS=ie("product","PackageSearch"),Ua=ie("splitOne","PanelLeftOpen"),Ka=ie("splitTwo","PanelRight"),dS=ie("overview","PanelsTopLeft"),sd=ie("pieChart","PieChart"),en=ie("pushpin","Pin"),pS=ie("play","Play"),tn=ie("add","Plus"),uS=ie("qrCode","QrCode"),mS=ie("receipt","ReceiptText"),qa=ie("refresh","RefreshCw"),gS=ie("activate","Rocket"),hS=ie("refresh","RotateCcw"),ld=ie("refresh","RotateCw"),fS=ie("tableRow","Rows3"),bS=ie("save","Save"),vS=ie("qrCode","ScanLine"),$o=ie("search","Search"),Lh=ie("paperPlane","Send"),cd=Lh,on=ie("wrench","Settings"),yS=ie("accept","ShieldCheck"),CS=ie("sum","Sigma"),xS=ie("sort","SortAsc"),wS=ie("splitTwo","SquareSplitHorizontal"),SS=ie("favorite","Star"),dd=ie("lightMode","Sun"),kS=ie("table","Table2"),PS=ie("ipad","TabletSmartphone"),Gn=ie("command","Terminal"),pd=ie("thumbDown","ThumbsDown"),ud=ie("thumbUp","ThumbsUp"),md=ie("delete","Trash2"),TS=ie("tree","TreePine"),gd=ie("trendDown","TrendingDown"),Xa=ie("warning","TriangleAlert"),IS=ie("shipping","Truck"),hd=ie("upload","UploadCloud"),tl=ie("employee","User"),fd=ie("sound","Volume2"),MS=ie("factory","Warehouse"),RS=ie("process","Workflow"),Xt=ie("decline","X"),Za=ie("error","XCircle");Gt();M();var Fh={contained:"primary",outlined:"secondary",text:"ghost"},Bh={small:"orb-btn-sm",medium:void 0,large:"orb-btn-lg"},Te=to.forwardRef(({variant:t="primary",size:o="medium",block:r=false,loading:n=false,startIcon:a,endIcon:i,component:s,href:l,sx:d,className:p,children:m,disabled:h,type:f="button",...u},b)=>{let y=Fh[t]??t,g=["orb-btn",`orb-btn-${y}`,Bh[o],r?"orb-btn-block":void 0,n?"orb-is-loading":void 0,p].filter(Boolean).join(" "),x=Ue(d,g),v=s??(l?"a":"button");return c(v,{ref:b,type:v==="button"?f:void 0,href:l,className:x.className,style:x.style,disabled:v==="button"?h||n:void 0,"aria-disabled":v!=="button"&&(h||n)?true:void 0,...u,children:[n&&e("span",{className:`orb-spin ${y==="primary"?"orb-spin-light":""}`,"aria-hidden":true}),!n&&a,m,!n&&i]})});Te.displayName="CButton";Gt();M();var ze=to.forwardRef(({label:t,value:o,defaultValue:r,onChange:n,onFocus:a,onBlur:i,onKeyDown:s,type:l="text",placeholder:d,disabled:p,readOnly:m,required:h,autoFocus:f,autoComplete:u,name:b,id:y,error:g,helperText:x,dense:v=false,size:C,fullWidth:P=true,select:S=false,multiline:I=false,rows:R,children:w,variant:A,margin:D,onClick:T,startAdornment:k,endAdornment:E,InputProps:O,inputProps:$,InputLabelProps:ee,SelectProps:F,sx:G,className:W},Q)=>{let z=to.useId(),H=y??`orb-tf-${z}`,X=k??O?.startAdornment,Y=E??O?.endAdornment,te=(typeof g=="string"?g:void 0)??x,fe={id:H,className:`orb-inp ${v||C==="small"?"orb-inp-dense":""}`,style:P?void 0:{width:"auto"},value:o,defaultValue:r,onChange:n,onFocus:a,onBlur:i,onKeyDown:s,placeholder:d,disabled:p,required:h,autoFocus:f,autoComplete:u,name:b,onClick:T,"aria-invalid":!!g},Ve=S?e("select",{...fe,ref:Q,onChange:n,children:w}):I?e("textarea",{...fe,ref:Q,onChange:n,rows:R,readOnly:m||O?.readOnly}):e("input",{...fe,ref:Q,onChange:n,type:l,readOnly:m||O?.readOnly,...$}),ve=Ue(G,`orb-fld ${g?"orb-is-error":""} ${W??""}`,{width:P?"100%":void 0});return c("div",{className:ve.className,style:ve.style,children:[t&&e("label",{htmlFor:H,children:t}),X||Y?c("div",{className:"orb-inp-adornment-wrap",children:[X&&e("span",{className:"orb-inp-adornment",children:X}),Y&&e("span",{className:"orb-inp-adornment orb-inp-adornment-end",children:Y}),Ve]}):Ve,te&&e("span",{className:"orb-fld-msg",children:te})]})});ze.displayName="CTextField";Gt();M();var Un=to.forwardRef(({label:t,value:o,defaultValue:r,onChange:n,placeholder:a,disabled:i,readOnly:s,rows:l,minRows:d=3,multiline:p,error:m,helperText:h,fullWidth:f=true,name:u,id:b,inputProps:y,sx:g,className:x},v)=>{let C=to.useId(),P=b??`orb-ta-${C}`,I=(typeof m=="string"?m:void 0)??h,R=Ue(g,`orb-fld ${m?"orb-is-error":""} ${x??""}`,{width:f?"100%":void 0});return c("div",{className:R.className,style:R.style,children:[t&&e("label",{htmlFor:P,children:t}),e("textarea",{ref:v,id:P,className:"orb-inp",value:o,defaultValue:r,onChange:n,placeholder:a,disabled:i,readOnly:s,rows:l??d,name:u,"aria-invalid":!!m,...y}),I&&e("span",{className:"orb-fld-msg",children:I})]})});Un.displayName="CTextArea";Gt();M();var Vt=to.forwardRef(({label:t,options:o,children:r,value:n,defaultValue:a,onChange:i,disabled:s,size:l,dense:d=true,fullWidth:p=true,minWidth:m,placeholder:h,displayEmpty:f,renderValue:u,multiple:b,MenuProps:y,variant:g,disableUnderline:x,onClick:v,onMouseDown:C,error:P,helperText:S,name:I,id:R,"aria-label":w,sx:A,className:D},T)=>{let k=to.useId(),E=R??`orb-sel-${k}`,$=(typeof P=="string"?P:void 0)??S,ee=to.useRef(null),F=to.useRef(null),[G,W]=to.useState(false),[Q,z]=to.useState(180),[H,X]=to.useState(a??"");to.useImperativeHandle(T,()=>ee.current);let Y=to.useMemo(()=>to.Children.toArray(r).flatMap(pe=>{if(!to.isValidElement(pe)||pe.type!=="option")return [];let ye=pe;return [{value:Array.isArray(ye.props.value)?ye.props.value[0]??"":ye.props.value??"",label:ye.props.children,disabled:ye.props.disabled}]}),[r]),j=o??Y,te=n??H,ce=Array.isArray(te)?te[0]??"":te,fe=String(ce??""),Ve=j.find(pe=>String(pe.value)===fe),ve=u?u(te):Ve?.label??(fe||(h??"")),xe=Ue(A,`orb-fld ${P?"orb-is-error":""} ${D??""}`,{width:p?"100%":void 0,minWidth:typeof m=="number"?`${m}px`:m});if(b)return c("div",{className:xe.className,style:xe.style,children:[t&&e("label",{htmlFor:E,children:t}),c("select",{ref:T,id:E,className:`orb-inp ${d||l==="small"?"orb-inp-dense":""}`,value:n,defaultValue:a,onChange:i,disabled:s,name:I,multiple:true,onClick:v,onMouseDown:C,"aria-invalid":!!P,"aria-label":w,children:[h!==void 0&&e("option",{value:"",children:h}),o?o.map(pe=>e("option",{value:pe.value,disabled:pe.disabled,children:pe.label},pe.value)):r]}),$&&e("span",{className:"orb-fld-msg",children:$})]});let He=pe=>{n===void 0&&X(pe);let ye=ee.current;ye&&(Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,"value")?.set?.call(ye,pe),i?.({target:ye,currentTarget:ye}));};return c("div",{className:xe.className,style:xe.style,children:[t&&e("label",{htmlFor:E,children:t}),e("select",{ref:ee,className:"orb-visually-hidden",tabIndex:-1,"aria-hidden":"true",name:I,value:fe,disabled:s,onChange:()=>{},children:j.map(pe=>e("option",{value:pe.value,disabled:pe.disabled,children:pe.label},String(pe.value)))}),c(Oo__namespace.Root,{open:G,onOpenChange:pe=>{pe&&z(F.current?.getBoundingClientRect().width??180),W(pe);},children:[e(Oo__namespace.Trigger,{asChild:true,children:c("button",{ref:F,id:E,type:"button",className:`orb-inp orb-select-trigger ${d||l==="small"?"orb-inp-dense":""}`,disabled:s,"aria-invalid":!!P,"aria-label":w,"aria-haspopup":"listbox","data-placeholder":!Ve&&!fe?"":void 0,onClick:v,onMouseDown:C,children:[e("span",{className:"orb-select-value",children:ve}),e(Tt,{className:"orb-select-chevron",name:"slimDown",size:12})]})}),e(Oo__namespace.Portal,{children:e(Oo__namespace.Content,{className:"orb-pop orb-select-menu",align:"start",sideOffset:5,collisionPadding:8,style:{minWidth:Q},children:e(Oo__namespace.RadioGroup,{value:fe,onValueChange:He,children:j.map(pe=>c(Oo__namespace.RadioItem,{className:"orb-select-option",value:String(pe.value),disabled:pe.disabled,children:[e("span",{className:"orb-select-check","aria-hidden":"true",children:String(pe.value)===fe?e(Tt,{name:"accept",size:13}):null}),e("span",{children:pe.label})]},String(pe.value)))})})})]}),$&&e("span",{className:"orb-fld-msg",children:$})]})});Vt.displayName="CSelect";Gt();M();var It=to.forwardRef(({label:t,checked:o,defaultChecked:r,onChange:n,disabled:a,indeterminate:i,name:s,value:l,id:d,size:p,color:m,onClick:h,inputProps:f,sx:u,className:b},y)=>{let g=Ue([{...p==="small"?{fontSize:13}:void 0,...m?{color:m}:void 0},...Array.isArray(u)?u:u?[u]:[]],`orb-chk ${b??""}`),x=e("input",{ref:v=>{v&&(v.indeterminate=!!i),typeof y=="function"?y(v):y&&(y.current=v);},type:"checkbox",id:d,checked:o,defaultChecked:r,onChange:n,readOnly:o!==void 0&&n===void 0,disabled:a,name:s,value:l,onClick:h,...f});return t==null?e("span",{className:g.className,style:g.style,children:x}):c("label",{className:g.className,style:g.style,children:[x,e("span",{children:t})]})});It.displayName="CCheckbox";M();var Yh=({label:t,options:o,value:r,defaultValue:n,onChange:a,name:i,row:s=false,disabled:l,sx:d,className:p})=>{let m=to.useId(),h=i??`orb-rdo-${m}`;return c("div",{className:`orb-fld ${p??""}`,style:d,role:"radiogroup",children:[t&&e("span",{className:"orb-fld-label",children:t}),e("div",{style:{display:"flex",flexDirection:s?"row":"column",gap:s?24:8,flexWrap:"wrap"},children:o.map(f=>c("label",{className:"orb-rdo",children:[e("input",{type:"radio",name:h,value:f.value,checked:r!==void 0?r===f.value:void 0,defaultChecked:n!==void 0?n===f.value:void 0,onChange:a?u=>a(u,f.value):void 0,disabled:l||f.disabled}),e("span",{children:f.label})]},f.value))})]})};Gt();M();var Ya=to.forwardRef(({label:t,checked:o,defaultChecked:r,onChange:n,disabled:a,name:i,id:s,size:l,sx:d,className:p},m)=>{let h=Ue([{...l==="small"?{transform:"scale(.86)",transformOrigin:"center"}:void 0},...Array.isArray(d)?d:d?[d]:[]],`orb-sw ${p??""}`),f=e("input",{ref:m,type:"checkbox",role:"switch",id:s,checked:o,defaultChecked:r,onChange:n?u=>n(u,u.target.checked):void 0,disabled:a,name:i});return t==null?e("span",{className:h.className,style:h.style,children:f}):c("label",{className:h.className,style:h.style,children:[f,e("span",{children:t})]})});Ya.displayName="CSwitch";Gt();M();var Jh={default:"gray",primary:"blue",success:"blue",info:"blue",warning:"orange",error:"orange"},xt=to.forwardRef(({label:t,children:o,tone:r,color:n="default",variant:a,size:i="medium",clickable:s,avatar:l,icon:d,onDelete:p,onClick:m,sx:h,className:f},u)=>{let b=r??(a==="outlined"&&n==="default"?"outline":Jh[n]??"gray"),y=s??!!m,g=Ue([{cursor:y?"pointer":void 0,...i==="small"?{height:24,fontSize:11,px:1}:void 0},...Array.isArray(h)?h:h?[h]:[]],`orb-chip orb-chip-${b} ${f??""}`);return c("span",{ref:u,className:g.className,style:g.style,onClick:m,role:y?"button":void 0,tabIndex:y?0:void 0,onKeyDown:y?x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),m?.(x));}:void 0,children:[l??d,e("span",{className:"orb-chip-label",children:o??t}),p&&e("button",{type:"button","aria-label":"Remove",onClick:x=>{x.stopPropagation(),p(x);},style:{background:"none",border:"none",padding:0,display:"inline-flex",cursor:"pointer",color:"inherit"},children:e(Xt,{size:13,strokeWidth:2})})]})});xt.displayName="CChip";Gt();M();var ja=to.forwardRef(({badgeContent:t,color:o="primary",children:r,invisible:n=false,sx:a,className:i},s)=>{let l=Ue(a,i,{display:"inline-flex",position:r?"relative":void 0}),d=!n&&t!==void 0&&t!==null&&e("span",{className:`orb-badge ${o==="error"?"orb-badge-err":o==="muted"?"orb-badge-muted":""}`,style:r?{position:"absolute",top:-6,right:-6,zIndex:1}:void 0,children:t});return r?c("span",{ref:s,className:l.className,style:l.style,children:[r,d]}):e("span",{ref:s,className:l.className,style:l.style,children:d})});ja.displayName="CBadge";Gt();M();var rn=to.forwardRef(({children:t,src:o,alt:r,size:n=28,sx:a,className:i},s)=>{let l=Ue([{width:n,height:n,fontSize:n*.4},...Array.isArray(a)?a:a?[a]:[]],`orb-avatar ${i??""}`);return e("span",{ref:s,className:l.className,style:l.style,children:o?e("img",{src:o,alt:r??"",style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"cover"}}):t})});rn.displayName="CAvatar";Gt();M();var nn=to.forwardRef(({severity:t="info",title:o,children:r,onClose:n,sx:a,className:i},s)=>{let l=Ue(a,`orb-alert orb-alert-${t} ${i??""}`);return c("div",{ref:s,role:"alert",className:l.className,style:l.style,children:[c("div",{style:{flex:1,minWidth:0},children:[o&&e("b",{children:o}),r&&e("span",{children:r})]}),n&&e("button",{type:"button","aria-label":"Close",onClick:n,style:{background:"none",border:"none",padding:0,cursor:"pointer",color:"inherit",font:"500 14px/1 var(--orb-font)",opacity:.7},children:"\u2715"})]})});nn.displayName="CAlert";Gt();M();var Kn=({value:t,variant:o,color:r,sx:n,className:a})=>{let i=o==="indeterminate"||t===void 0,s=Ue(n,`orb-prog ${a??""}`);return c("div",{className:s.className,role:"progressbar","aria-valuenow":i?void 0:Math.round(t),"aria-valuemin":i?void 0:0,"aria-valuemax":i?void 0:100,style:s.style,children:[e("i",{style:i?{width:"40%",animation:"orb-prog-ind 1.2s ease-in-out infinite"}:{width:`${Math.min(100,Math.max(0,t))}%`,background:r}}),i&&e("style",{children:"@keyframes orb-prog-ind { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }"})]})},rf=({width:t,height:o=14,variant:r="rectangular",sx:n,className:a})=>e("div",{className:`orb-skel ${a??""}`,style:{width:t,height:o,borderRadius:r==="circular"?"50%":r==="text"?6:"var(--orb-r)",...n}}),Qo=({size:t=12,onPrimary:o=false,sx:r,className:n})=>e("span",{className:`orb-spin ${o?"orb-spin-light":""} ${n??""}`,style:{width:t,height:t,...r},role:"status","aria-label":"Loading"});M();var dt=({title:t,children:o,enterDelay:r=300,side:n="top",align:a="center",disabled:i})=>!t||i?e(jsxRuntime.Fragment,{children:o}):e(Jo__namespace.Provider,{delayDuration:r,skipDelayDuration:200,children:c(Jo__namespace.Root,{children:[e(Jo__namespace.Trigger,{asChild:true,children:o}),e(Jo__namespace.Portal,{children:e(Jo__namespace.Content,{className:"orb-tooltip",side:n,align:a,sideOffset:6,children:t})})]})});Gt();M();var se=to.forwardRef(({tooltip:t,size:o="small",active:r=false,edge:n,color:a,sx:i,className:s,children:l,type:d="button",...p},m)=>{let h=Ue([{color:r?"var(--orb-primary)":a,...n==="start"?{marginLeft:-8}:n==="end"?{marginRight:-8}:void 0},...Array.isArray(i)?i:i?[i]:[]],`orb-icon-btn ${o==="small"?"orb-icon-btn-sm":""} ${s??""}`),f=e("button",{ref:m,type:d,className:h.className,style:h.style,...p,children:l});return t?e(dt,{title:t,children:f}):f});se.displayName="CIconButton";Gt();M();var qn=({value:t,options:o,onValueChange:r,size:n="medium",sx:a,className:i,...s})=>{let l=to.useRef([]),d=o.findIndex(u=>!u.disabled),p=o.findIndex(u=>u.value===t),m=(u,b)=>{let y=o.map((v,C)=>v.disabled?-1:C).filter(v=>v>=0);if(y.length===0)return;let g=y.indexOf(b),x;u.key==="Home"&&(x=y[0]),u.key==="End"&&(x=y[y.length-1]),(u.key==="ArrowRight"||u.key==="ArrowDown")&&(x=y[(g+1+y.length)%y.length]),(u.key==="ArrowLeft"||u.key==="ArrowUp")&&(x=y[(g-1+y.length)%y.length]),x!==void 0&&(u.preventDefault(),l.current[x]?.focus(),r(o[x].value));},h=Ue(a,["orb-segmented-control",n==="small"?"orb-segmented-control-sm":"",i].filter(Boolean).join(" ")),f={...h.style,"--orb-segmented-count":Math.max(o.length,1),"--orb-segmented-index":Math.max(p,0)};return c("div",{role:"radiogroup",className:h.className,style:f,"data-has-selection":p>=0?"true":"false",...s,children:[e("span",{className:"orb-segmented-control-thumb","aria-hidden":"true"}),o.map((u,b)=>{let y=u.value===t;return e(se,{ref:g=>{l.current[b]=g;},className:["orb-segmented-control-item",u.icon?"":"orb-segmented-control-item-label"].filter(Boolean).join(" "),size:n,tooltip:u.label,role:"radio","aria-label":u.label,"aria-checked":y,"data-selected":y?"true":void 0,disabled:u.disabled,tabIndex:y||t==null&&b===d?0:-1,onClick:()=>r(u.value),onKeyDown:g=>m(g,b),children:u.icon??e("span",{className:"orb-segmented-control-label",children:u.label})},u.value)})]})};Gt();M();var Jt=({triggerLabel:t,items:o=[],trigger:r,align:n="start",anchorEl:a,open:i,onClose:s,children:l,slotProps:d,PaperProps:p,anchorPosition:m,sx:h})=>{let f=to.useRef(null);if(to.useEffect(()=>{if(i!==true)return;let u=y=>{let g=y.composedPath();f.current&&g.includes(f.current)||a&&g.includes(a)||s?.();},b=y=>{y.key==="Escape"&&s?.();};return document.addEventListener("pointerdown",u,true),document.addEventListener("keydown",b,true),()=>{document.removeEventListener("pointerdown",u,true),document.removeEventListener("keydown",b,true);}},[a,s,i]),i!==void 0){if(!i||typeof document>"u")return null;let u=a?.getBoundingClientRect(),b=window.innerWidth,y=u?.left??16,g=u?.right??y,x=d?.paper?.sx??p?.sx,v=Ue([...Array.isArray(x)?x:x?[x]:[],...Array.isArray(h)?h:h?[h]:[]],"orb-pop orb-menu",d?.paper?.style??p?.style),C=to.Children.map(l,P=>{if(!to.isValidElement(P)||P.type!=="option")return P;let S=P.props,{children:I,disabled:R,selected:w}=S,A=Ue(S.sx,`orb-menu-item ${w?"orb-selected":""} ${S.className??""}`,S.style);return e("div",{role:"menuitem","aria-disabled":R||void 0,"aria-selected":w||void 0,tabIndex:R?-1:0,id:S.id,title:S.title,className:A.className,style:A.style,onClick:R?void 0:S.onClick,onKeyDown:D=>{!R&&(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),S.onClick?.(D));},children:I})});return reactDom.createPortal(e("div",{ref:f,role:"menu",className:v.className,style:{...v.style,position:"fixed",left:n==="end"&&!m?void 0:m?.left??y,right:n==="end"&&!m?Math.max(16,b-g):void 0,top:m?.top??(u?.bottom??16)+6,maxWidth:"calc(100vw - 32px)",zIndex:1301},children:C}),document.body)}return c(Oo__namespace.Root,{children:[e(Oo__namespace.Trigger,{asChild:true,children:r??e(Te,{variant:"primary",children:t})}),e(Oo__namespace.Portal,{children:e(Oo__namespace.Content,{className:"orb-pop orb-menu",align:n,sideOffset:6,children:o.map((u,b)=>c(Oo__namespace.Item,{className:"orb-menu-item",disabled:u.disabled,onSelect:()=>u.onClick?.(),children:[u.icon,u.label]},b))})})]})};Gt();M();var Ae=to.forwardRef(({elevation:t=1,variant:o,component:r,sx:n,style:a,className:i,children:s,...l},d)=>{let p=r??"div",m=Ue(n,`orb-card ${t>0&&o!=="outlined"?"orb-card-raised":""} ${i??""}`,a);return e(p,{ref:d,className:m.className,style:m.style,...l,children:s})});Ae.displayName="CPaper";Gt();M();var Nt=to.forwardRef(({orientation:t="horizontal",flexItem:o,sx:r,className:n},a)=>{let i=Ue([{...t==="vertical"?{alignSelf:"stretch",height:"auto"}:{width:"100%"},...o?{alignSelf:"stretch"}:void 0},...Array.isArray(r)?r:r?[r]:[]],`${t==="vertical"?"orb-divider-v":"orb-divider"} ${n??""}`);return e("hr",{ref:a,"aria-orientation":t,className:i.className,style:i.style})});Nt.displayName="CDivider";Gt();M();var hf={h1:"orb-h1",h2:"orb-h2",h3:"orb-h3",h4:"orb-h3",h5:"orb-subtitle",h6:"orb-subtitle",subtitle1:"orb-subtitle",subtitle2:"orb-label",body1:"orb-body",body2:"orb-body-dense",label:"orb-label",caption:"orb-meta",overline:"orb-overline"},ff={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6"},L=to.forwardRef(({variant:t="body1",component:o,muted:r=false,numeric:n=false,color:a,noWrap:i=false,fontWeight:s,sx:l,className:d,children:p,...m},h)=>{let f=o??ff[t]??"span",b=[t==="inherit"?void 0:hf[t],d].filter(Boolean).join(" "),y=Ue([{...r?{color:"var(--orb-muted)"}:void 0,...a?{color:a}:void 0,...n?{fontVariantNumeric:"tabular-nums"}:void 0,...s?{fontWeight:s}:void 0,...i?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:void 0},...Array.isArray(l)?l:l?[l]:[]],b);return e(f,{ref:h,className:y.className,style:y.style,...m,children:p})});L.displayName="CTypography";Gt();M();var vf=t=>{if(t!==void 0)return typeof t=="number"?`${t*8}px`:t},le=to.forwardRef(({direction:t="column",spacing:o,alignItems:r,justifyContent:n,flexWrap:a,flex:i,useFlexGap:s,sx:l,className:d,children:p,...m},h)=>{let f=Ue([{display:"flex",flexDirection:t,gap:vf(o),alignItems:r,justifyContent:n,flexWrap:a,flex:i},...Array.isArray(l)?l:l?[l]:[]],d);return e("div",{ref:h,className:f.className,style:f.style,...m,children:p})});le.displayName="CStack";Gt();M();var Ot=({open:t,onClose:o,title:r,children:n,actions:a,maxWidth:i=560,fullWidth:s=false,fullScreen:l=false,PaperProps:d,slotProps:p,disableRestoreFocus:m,keepMounted:h,hideCloseButton:f=false,sx:u,className:b})=>{let y=Ue([{width:l?"100vw":s?"min(920px, calc(100vw - 32px))":void 0,height:l?"100vh":void 0,maxWidth:l?"none":typeof i=="number"?`${i}px`:i},...Array.isArray(d?.sx??p?.paper?.sx)?d?.sx??p?.paper?.sx:d?.sx??p?.paper?.sx?[d?.sx??p?.paper?.sx]:[],...Array.isArray(u)?u:u?[u]:[]],`orb-dialog ${b??""}`);return e(To__namespace.Root,{open:t,onOpenChange:g=>{g||o?.();},children:c(To__namespace.Portal,{children:[e(To__namespace.Overlay,{className:"orb-overlay"}),c(To__namespace.Content,{className:y.className,style:y.style,children:[(r||!f)&&c("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:16},children:[r?e(To__namespace.Title,{className:"orb-dialog-title",children:r}):e(To__namespace.Title,{className:"orb-visually-hidden",children:"Dialog"}),!f&&e(To__namespace.Close,{asChild:true,children:e("button",{type:"button",className:"orb-icon-btn orb-icon-btn-sm","aria-label":"Close",style:{marginTop:-4,marginRight:-4},children:e(Xt,{size:16,strokeWidth:2})})})]}),e("div",{style:{minWidth:0},children:n}),a&&e("div",{className:"orb-dialog-actions",children:a})]})]})})};M();var rl=({open:t,defaultOpen:o,onOpenChange:r,trigger:n,children:a,align:i="start",side:s="bottom",sideOffset:l=6,matchTriggerWidth:d=false,sx:p,className:m})=>c(Cr__namespace.Root,{open:t,defaultOpen:o,onOpenChange:r,children:[e(Cr__namespace.Trigger,{asChild:true,children:n}),e(Cr__namespace.Portal,{children:e(Cr__namespace.Content,{className:`orb-pop ${m??""}`,align:i,side:s,sideOffset:l,style:{minWidth:d?"var(--radix-popover-trigger-width)":void 0,...p},onOpenAutoFocus:h=>h.preventDefault(),children:a})})]});M();var xf=({items:t,value:o,defaultValue:r,onChange:n,sx:a,className:i})=>{let s=o!==void 0,[l,d]=to.useState(r??t[0]?.value),p=s?o:l,m=to.useRef([]),h=u=>{s||d(u),n?.(u);},f=u=>{if(u.key!=="ArrowRight"&&u.key!=="ArrowLeft")return;u.preventDefault();let b=t.filter(v=>!v.disabled),y=b.findIndex(v=>v.value===p),g=u.key==="ArrowRight"?1:-1,x=b[(y+g+b.length)%b.length];if(x){h(x.value);let v=t.findIndex(C=>C.value===x.value);m.current[v]?.focus();}};return e("div",{className:`orb-tabs ${i??""}`,role:"tablist",style:a,onKeyDown:f,children:t.map((u,b)=>{let y=u.value===p;return c("button",{ref:g=>{m.current[b]=g;},type:"button",role:"tab","aria-selected":y,disabled:u.disabled,className:`orb-tab ${y?"orb-is-active":""}`,style:{display:"inline-flex",alignItems:"center",gap:6},onClick:()=>h(u.value),children:[u.icon,u.label]},u.value)})})};M();var Sf=["su","mo","tu","we","th","fr","sa"],Xn=(t,o)=>!!(t&&o&&t.isSame(o,"day")),Zn=({value:t,rangeStart:o,rangeEnd:r,onChange:n,month:a,defaultMonth:i,onMonthChange:s,minDate:l,maxDate:d,locale:p,renderDay:m})=>{let h=a!==void 0,[f,u]=to.useState(()=>i??t??o??ir__default.default()),b=(h?a:f).startOf("month"),y=S=>{h||u(S),s?.(S);},g=to.useMemo(()=>p?b.locale(p):b,[b,p]),x=to.useMemo(()=>{let I=b.startOf("month").startOf("week"),R=[],w=I;for(let A=0;A<6;A+=1){let D=[];for(let T=0;T<7;T+=1)D.push(w),w=w.add(1,"day");if(R.push(D),w.isAfter(b.endOf("month"))&&A>=3)break}return R},[b]),v=to.useMemo(()=>{let S=p?ir__default.default().locale(p):ir__default.default();return Sf.map((I,R)=>S.startOf("week").add(R,"day").format("dd"))},[p]),C=S=>!!(l&&S.isBefore(l.startOf("day"))||d&&S.isAfter(d.startOf("day"))),P=o!==void 0||r!==void 0;return c("div",{className:"orb-cal",children:[c("div",{className:"orb-cal-head",children:[e("button",{type:"button",className:"orb-icon-btn orb-icon-btn-sm","aria-label":"Previous month",onClick:()=>y(b.subtract(1,"month")),children:e(Ha,{size:16,strokeWidth:2})}),e("span",{className:"orb-cal-title","aria-live":"polite",children:g.format("MMMM YYYY")}),e("button",{type:"button",className:"orb-icon-btn orb-icon-btn-sm","aria-label":"Next month",onClick:()=>y(b.add(1,"month")),children:e(Wo,{size:16,strokeWidth:2})})]}),c("div",{className:"orb-cal-grid",role:"grid",children:[v.map((S,I)=>e("span",{className:"orb-cal-dow",children:S},`${S}-${I}`)),x.flat().map(S=>{let I=!S.isSame(b,"month"),R=C(S),w=P?Xn(S,o)||Xn(S,r):Xn(S,t),A=S.isSame(ir__default.default(),"day"),D=P&&o&&r&&S.isAfter(o.startOf("day"))&&S.isBefore(r.startOf("day")),T=P&&Xn(S,o)&&!!r,k=P&&Xn(S,r)&&!!o,E=["orb-cal-day",I?"orb-is-outside":void 0,A?"orb-is-today":void 0,w?"orb-is-selected":void 0,D?"orb-is-in-range":void 0,T?"orb-is-range-start":void 0,k?"orb-is-range-end":void 0].filter(Boolean).join(" ");return m?e("span",{className:"orb-cal-day-slot",children:m(S,{outsideCurrentMonth:I,selected:w,today:A,disabled:R})},S.format("YYYY-MM-DD")):e("button",{type:"button",role:"gridcell","aria-selected":w,"aria-current":A?"date":void 0,className:E,disabled:R,onClick:()=>n?.(S),children:S.date()},S.format("YYYY-MM-DD"))})]})]})};M();ir__default.default.extend(kf__default.default);var Pf=({label:t,value:o,defaultValue:r,onChange:n,minDate:a,maxDate:i,disabled:s,format:l="YYYY-MM-DD",placeholder:d,locale:p,dense:m=false,error:h,helperText:f,sx:u,className:b})=>{let y=o!==void 0,[g,x]=to.useState(r??null),v=y?o:g,[C,P]=to.useState(false),[S,I]=to.useState(null),R=k=>{y||x(k),n?.(k);},w=S??(v?(p?v.locale(p):v).format(l):""),A=()=>{if(S===null)return;let k=S.trim();if(!k)R(null);else {let E=ir__default.default(k,l,true);E.isValid()&&!(a&&E.isBefore(a.startOf("day")))&&!(i&&E.isAfter(i.startOf("day")))&&R(E);}I(null);},T=(typeof h=="string"?h:void 0)??f;return c("div",{className:`orb-fld ${h?"orb-is-error":""} ${b??""}`,style:u,children:[t&&e("label",{children:t}),e(rl,{open:C,onOpenChange:P,trigger:c("div",{className:"orb-inp-adornment-wrap",style:{width:"100%"},children:[e("span",{className:"orb-inp-adornment",children:e(Qs,{size:15,strokeWidth:1.8})}),e("input",{className:`orb-inp ${m?"orb-inp-dense":""}`,value:w,placeholder:d??l,disabled:s,onFocus:()=>P(true),onChange:k=>I(k.target.value),onBlur:A,onKeyDown:k=>{k.key==="Enter"&&(A(),P(false)),k.key==="Escape"&&P(false);}})]}),children:e(Zn,{value:v,onChange:k=>{R(k),I(null),P(false);},minDate:a,maxDate:i,locale:p,defaultMonth:v??void 0})}),T&&e("span",{className:"orb-fld-msg",children:T})]})};M();var If=({onFilesSelected:t,multiple:o=false,accept:r="*",maxSize:n,title:a="Drag and drop files here or click to upload",subtitle:i="Support for bulk upload",sx:s})=>{let[l,d]=to.useState(false),[p,m]=to.useState([]),h=to.useRef(null),f=v=>{v.preventDefault(),d(true);},u=v=>{v.preventDefault(),d(false);},b=v=>{v.preventDefault(),d(false),g(Array.from(v.dataTransfer.files));},y=v=>{v.target.files&&g(Array.from(v.target.files));},g=v=>{let C=n?v.filter(S=>S.size<=n):v;C.length<v.length&&console.warn(`Some files were rejected because they exceed the maximum size of ${n} bytes.`);let P=o?[...p,...C]:C;o&&(P=P.filter((S,I,R)=>I===R.findIndex(w=>w.name===S.name&&w.size===S.size&&w.lastModified===S.lastModified))),m(P),t?.(P),h.current&&(h.current.value="");},x=v=>{let C=p.filter((P,S)=>S!==v);m(C),t?.(C);};return c("div",{style:{width:"100%",...s},children:[c("div",{onClick:()=>h.current?.click(),onDragOver:f,onDragLeave:u,onDrop:b,role:"button",tabIndex:0,onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),h.current?.click());},style:{border:`2px dashed ${l?"var(--orb-primary)":"var(--orb-border)"}`,borderRadius:"var(--orb-r)",padding:32,textAlign:"center",cursor:"pointer",backgroundColor:l?"var(--orb-hover)":"var(--orb-canvas)",transition:"border-color var(--orb-t-fast), background-color var(--orb-t-fast)"},children:[e("input",{type:"file",ref:h,style:{display:"none"},multiple:o,accept:r,onChange:y}),c("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"center"},children:[e(hd,{size:40,strokeWidth:1.5,color:l?"var(--orb-primary)":"var(--orb-muted)"}),e("span",{className:"orb-subtitle",children:a}),e("span",{className:"orb-meta",children:i})]})]}),p.length>0&&e("div",{style:{display:"flex",flexDirection:"column",gap:8,marginTop:16},children:p.map((v,C)=>c("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",border:"1px solid var(--orb-border)",borderRadius:"var(--orb-r)",backgroundColor:"var(--orb-surface)"},children:[c("div",{style:{display:"flex",alignItems:"center",gap:8,overflow:"hidden"},children:[e(Yc,{size:16,strokeWidth:1.8,color:"var(--orb-muted)"}),e("span",{className:"orb-body-dense",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:v.name}),c("span",{className:"orb-meta",children:["(",(v.size/1024).toFixed(1)," KB)"]})]}),e(se,{"aria-label":`Remove ${v.name}`,onClick:()=>x(C),children:e(md,{size:15,strokeWidth:1.8})})]},`${v.name}-${C}`))})]})};function Co(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var Ja={primary:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground"},Yn={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",full:"rounded-full"},Cd=()=>"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50";M();var Af=classVarianceAuthority.cva(Cd(),{variants:{variant:{default:`${Ja.primary} shadow-sm`,destructive:"bg-[var(--orb-status-error)] text-[var(--orb-on-primary)] hover:opacity-90 active:opacity-80 shadow-sm",outline:`${Ja.outline} shadow-sm`,secondary:"bg-[var(--orb-surface-2)] text-[var(--orb-fg)] hover:bg-[var(--orb-hover)] active:bg-[var(--orb-selected)] shadow-sm",ghost:Ja.ghost,link:"text-[var(--orb-status-primary)] underline-offset-4 hover:underline hover:text-[var(--orb-status-primary)] active:text-[var(--orb-p700)]","chat-tool":"bg-[var(--orbai-surface-2)] border border-[var(--orbai-border-soft)] text-[var(--orbai-text-2)] hover:bg-[var(--orbai-surface-3)] hover:border-[var(--orbai-border-strong)] hover:text-[var(--orbai-text-1)] active:scale-95 transition-all duration-200","chat-send":"bg-[var(--orb-primary)] hover:bg-[var(--orb-p600)] text-[var(--orb-on-primary)] border border-[var(--orbai-border-strong)] shadow-[var(--orbai-shadow-soft-sm)] hover:shadow-[var(--orbai-shadow-soft-md)] active:scale-95 transition-all duration-200","chat-stop":"bg-[var(--orb-status-error)] hover:opacity-90 border border-[var(--orbai-border-strong)] shadow-[var(--orbai-shadow-soft-sm)] hover:shadow-[var(--orbai-shadow-soft-md)] active:scale-95 text-[var(--orb-on-primary)] transition-all duration-200","chat-disabled":"cursor-not-allowed opacity-50 bg-[var(--orbai-surface-2)] border border-[var(--orbai-border-soft)] text-[var(--orbai-muted)]"},size:{default:"h-10 px-4 py-2",sm:"h-9 px-3",lg:"h-11 px-8",icon:"h-10 w-10","chat-sm":"h-8 w-8 rounded-full","chat-md":"h-10 w-10 rounded-full","chat-lg":"h-12 w-12 rounded-full"},rounded:{none:Yn.none,sm:Yn.sm,md:Yn.md,full:Yn.full}},defaultVariants:{variant:"default",size:"default",rounded:"md"}}),il=to__namespace.forwardRef(({className:t,variant:o,size:r,asChild:n=false,...a},i)=>e(n?reactSlot.Slot:"button",{className:Co(Af({variant:o,size:r,className:t})),ref:i,...a}));il.displayName="Button";var Ef={"common.cancel":"Cancel","common.save":"Save","common.ok":"OK","common.done":"Done","common.search":"Search","common.none":"None","common.all":"All","common.noData":"No data","common.copy":"Copy","common.delete":"Delete","common.loading":"Loading...","header.searchPlaceholder":"Ask me...","header.searchAddFeature":"Add feature","header.searchStartVoice":"Start voice input","header.searchStopVoice":"Stop voice input","header.searchOpenPanel":"Open conversation","header.theme.system":"Theme: System","header.theme.dark":"Theme: Dark","header.theme.light":"Theme: Light","header.menu.setting":"Setting","header.menu.refresh":"Refresh","header.menu.logout":"Logout","navigation.expand":"Expand navigation","navigation.collapse":"Collapse navigation","navigation.searchPlaceholder":"Search menu...","navigation.noMatch":"No matching menu items","navigation.noAccessibleApp":"No accessible applications","navigation.noItems":"No items to display","navigation.expandView":"Expand {title}","navigation.mode.switchToFixed":"Switch to fixed navigation","navigation.mode.switchToFloating":"Switch to floating navigation","navigation.pinned":"Pinned","navigation.pin.add":"Pin to top","navigation.pin.remove":"Unpin","table.toolbar.searchPlaceholder":"Search...","table.title.default":"Data Table","table.toolbar.groupBy":"Group By","table.toolbar.summary":"Summary","table.toolbar.columns":"Columns","table.toolbar.export":"Export","table.toolbar.itemsPerPage":"Items per page:","table.toolbar.pageOf":"Page {current} of {total}","table.toolbar.newItem":"New Item","table.toolbar.editItem":"Edit Item","table.toolbar.deleteItem":"Delete Item","table.toolbar.graphicReport":"Graphic Report","table.toolbar.saveLayout":"Save Layout","table.menu.groupBy":"Group By","table.menu.clearAll":"Clear All","table.menu.visibleColumns":"Visible Columns","table.menu.showSummaryRow":"Show Summary Row","table.menu.noNumericColumns":"No numeric columns","table.group.expandAll":"Expand All Groups","table.group.collapseAll":"Collapse All Groups","table.mobile.notImplemented":"Mobile View Not Implemented","table.headerMenu.sortAsc":"Sort Ascending","table.headerMenu.sortDesc":"Sort Descending","table.headerMenu.clearSort":"Clear Sort","table.headerMenu.configureSort":"Configure Sort...","table.headerMenu.group":"Group by this column","table.headerMenu.ungroup":"Remove from grouping","table.headerMenu.addSummary":"Include in Summary","table.headerMenu.removeSummary":"Remove from Summary","table.headerMenu.hideColumn":"Hide Column","table.sortDialog.title":"Sort Settings","table.sortDialog.empty":"No sort rules. Add one to start ordering rows.","table.sortDialog.addRule":"Add Sort Rule","table.sortDialog.clearAll":"Clear All","table.sortDialog.asc":"Ascending","table.sortDialog.desc":"Descending","pivot.title.default":"Pivot Table Builder","pivot.subtitle.default":"Drag fields to configure the pivot table.","pivot.empty":"Drag at least one field into Values to render the pivot result.","pivot.records":"Records","pivot.afterFilter":"After filter","pivot.grandTotal":"Grand Total","pivot.resultLabel":"Result","pivot.valueLabel":"Value","pivot.table.dimensions":"Dimensions","pivot.config.title":"Configuration","pivot.fieldList":"Field List","pivot.availableDimensions":"Available dimensions","pivot.allFieldsInUse":"All fields are in use.","pivot.zone.rows":"Rows","pivot.zone.columns":"Columns","pivot.zone.filters":"Filters","pivot.zone.values":"Values","pivot.hint.rows":"Drag fields here to build row hierarchy","pivot.hint.columns":"Drag fields here to build column hierarchy","pivot.hint.filters":"Drag fields here for report filters","pivot.hint.values":"Drag numeric fields here for aggregation","pivot.clearArea":"Clear area","pivot.filter.na":"N/A","pivot.filter.noValues":"No values","pivot.filter.noneSelected":"None selected","pivot.filter.allValues":"All values","pivot.filter.selectedCount":"{selected} / {total} selected","pivot.filter.selectAll":"Select All","pivot.filter.deselectAll":"Deselect All","pivot.filter.noResults":"No results","pivot.collapse.ariaExpand":"Expand configuration area","pivot.collapse.ariaCollapse":"Collapse configuration area","pivot.agg.sum":"Sum","pivot.agg.count":"Count","pivot.agg.avg":"Average","pivot.agg.min":"Min","pivot.agg.max":"Max","pivot.preset.selectPlaceholder":"Select preset","pivot.preset.save":"Save preset","pivot.preset.delete":"Delete preset","pivot.preset.saveDialogTitle":"Save current preset","pivot.preset.nameLabel":"Preset name","pivot.preset.defaultName":"Preset {index}","pivot.table.sectionTitle":"Pivot Result","pivot.table.expandRowsAll":"Expand rows","pivot.table.collapseRowsAll":"Collapse rows","pivot.table.expandColumnsAll":"Expand columns","pivot.table.collapseColumnsAll":"Collapse columns","pivot.table.collapse.ariaExpand":"Expand pivot result","pivot.table.collapse.ariaCollapse":"Collapse pivot result","pivot.chart.title":"Pivot Chart","pivot.chart.subtitle":"Map one dimension and up to two measures into a compact chart.","pivot.chart.subtitleReady":"{dimension} by {measure}","pivot.chart.emptyNoDimension":"Add at least one row or column field to render the chart.","pivot.chart.emptyNoValue":"Add at least one value field to render the chart.","pivot.chart.emptyNoData":"No data available for the current chart selection.","pivot.chart.dimension":"Dimension","pivot.chart.primaryMeasure":"Measure","pivot.chart.secondaryMeasure":"Compare measure","pivot.chart.chartType":"Chart type","pivot.chart.style.barVertical":"Vertical bars","pivot.chart.style.barHorizontal":"Horizontal bars","pivot.chart.style.line":"Line","pivot.chart.style.scatter":"Scatter","pivot.chart.collapse.ariaExpand":"Expand chart area","pivot.chart.collapse.ariaCollapse":"Collapse chart area","smartFilter.adaptFilters":"Adapt Filters","smartFilter.addFilters":"Add Filters","smartFilter.go":"Go","smartFilter.visibleFilters":"Visible Filters","smartFilter.searchPlaceholder":"Search...","smartFilter.noOptionsFound":"No options found","smartFilter.min":"Min","smartFilter.max":"Max","smartFilter.minMaxPlaceholder":"Min - Max","smartFilter.operator.equals":"Equals","smartFilter.operator.contains":"Contains","smartFilter.operator.notContains":"Does Not Contain","smartFilter.operator.wildcard":"Wildcard Search","smartFilter.operator.notEquals":"Not Equals","smartFilter.operator.greaterThan":"Greater Than","smartFilter.operator.lessThan":"Less Than","smartFilter.operator.greaterOrEqual":"Greater Than or Equal","smartFilter.operator.lessOrEqual":"Less Than or Equal","smartFilter.operator.between":"Between","variant.noOptions":"No options","variant.defaultSuffix":"Default","variant.selectVariant":"Select Variant","variant.saveView":"Save View","variant.newVariant":"New Variant","variant.viewName":"View Name","variant.setDefault":"Set as Default","variant.publicAllUsers":"Public (All Users)","variant.toast.fetchFailed":"Failed to load variants","variant.toast.saveFailed":"Failed to save variant","variant.toast.saveSuccess":"Variant saved successfully","variant.toast.deleteFailed":"Failed to delete variant","variant.toast.deleteSuccess":"Variant deleted successfully","variant.toast.defaultFailed":"Failed to update default variant","variant.toast.defaultSuccess":"Default variant updated","layout.saveLayout":"Save Layout","layout.layoutOptions":"Layout Options","layout.selectLayout":"Select Layout","layout.saveCurrentLayout":"Save Current Layout...","layout.noSavedLayouts":"No saved layouts","layout.removeDefault":"Remove Default","layout.setAsDefault":"Set as Default","layout.layoutName":"Layout Name","layout.layoutDescription":"Description","layout.layoutNameHelper":"e.g., 'Compact View'","layout.warningOverwrite":"Warning: Existing layout will be overwritten","layout.useAsDefault":"Use as Default Layout","layout.publicAllUsers":"Public (Visible to all users)","layout.toast.loadFallback":"Failed to load layouts from backend, fallback to local storage","layout.toast.saveSuccess":"Layout saved successfully","layout.toast.saveLocalSuccess":"Layout saved to local storage","layout.toast.backendUnavailableSavedLocal":"Backend unavailable, saved to local storage","layout.toast.deleteSuccess":"Layout deleted successfully","layout.toast.deleteLocalSuccess":"Layout deleted from local storage","layout.toast.backendUnavailableDeletedLocal":"Backend unavailable, deleted from local storage","layout.toast.defaultSuccess":"Default layout set","layout.toast.defaultLocalSuccess":"Default layout set in local storage","layout.toast.backendUnavailableDefaultLocal":"Backend unavailable, default saved to local storage","dateRange.label":"Date Range","dateRange.startDate":"Start Date","dateRange.endDate":"End Date","dateRange.select":"Select...","dateRange.today":"Today","dateRange.thisWeek":"This Week","dateRange.thisMonth":"This Month","graph.records":"{count} records","graph.kpi.totalRecords":"Total Records","graph.kpi.totalReport":"Total Report","graph.kpi.totalBillable":"Total Billable","graph.kpi.efficiency":"Efficiency","graph.kpi.amount":"Amount","graph.kpi.flagged":"Flagged","graph.chart.billable.title":"Billable by Dimension","graph.chart.billable.subtitle":"Top values by billable hours","graph.chart.efficiency.title":"Efficiency by Person","graph.chart.efficiency.subtitle":"Lowest efficiency first","graph.chart.status.title":"Status Distribution","graph.chart.status.subtitle":"Record ratio by status","graph.dataBody":"Data Body","graph.reportTitle":"Graphic Report","graph.unassigned":"Unassigned","graph.column.reportHours":"Report Hours","graph.column.billableHours":"Billable Hours","detail.searchAi.placeholder":"Search fields, or ask AI if no match...","detail.searchAi.matches":"{count} matches found","detail.searchAi.noMatch":"No matching field found.","detail.searchAi.autoAiFallback":"No direct match. Triggering AI analysis...","detail.searchAi.aiResultTitle":"AI Insight","detail.table.title":"Related Records","kanban.empty":"Drop cards here","kanban.bucket.limit":"Limit","kanban.bucket.dropHere":"Release to move into this bucket","kanban.bucket.add":"Add bucket","kanban.bucket.rename":"Rename bucket","kanban.bucket.saveRename":"Save bucket name","kanban.bucket.cancelRename":"Cancel renaming","kanban.search.placeholder":"Search cards and buckets","kanban.search.clear":"Clear search","kanban.search.results":"{count} matching cards","kanban.search.noMatch":"No matching cards","kanban.card.progress":"Progress","kanban.card.openDetail":"Open Detail","kanban.priority.critical":"Critical","kanban.priority.high":"High","kanban.priority.medium":"Medium","kanban.priority.low":"Low","quickCreate.newItem":"New Item","quickCreate.createWithTitle":"Create {title}","quickEdit.editWithTitle":"Edit {title}","quickDelete.confirmTitle":"Confirm Delete","quickDelete.confirmMessageSingle":"Are you sure you want to delete the selected record?","quickDelete.confirmMessageMultiple":"Are you sure you want to delete {count} selected records?","cardPage.viewDetails":"View Details","cardPage.download":"Download","cardPage.close":"Close","cardPage.empty":"No items found","messageBox.confirm":"OK","messageBox.cancel":"Cancel","omph.status.idle":"Idle","omph.status.pending":"Pending","omph.status.running":"Working","omph.status.success":"Success","omph.status.error":"Error","omph.working":"Working","omph.workingFor":"Working for {duration}","omph.loadOlder":"Load earlier","omph.loadingOlder":"Loading earlier\u2026","omph.toBottom":"Back to bottom","omph.copy":"Copy","omph.copied":"Copied","omph.turnActions":"Reply actions","omph.usage":"Usage","omph.inputTokens":"Input","omph.outputTokens":"Output","omph.duration":"Duration","omph.send":"Send","omph.stop":"Stop","omph.supplement.queued":"Added to the running task","omph.turnRail":"Turns","omph.secondUnit":"s","omph.minuteUnit":"m","omph.preview.title":"File preview","omph.preview.close":"Close preview","omph.preview.back":"Back to conversation","omph.preview.expand":"Expand preview","omph.preview.collapse":"Restore preview size","omph.preview.copyContent":"Copy content","omph.preview.copyPath":"Copy path","omph.preview.download":"Download","omph.preview.openExternal":"Open externally","omph.preview.wrap":"Wrap","omph.preview.loading":"Loading file","omph.preview.missing":"File not found","omph.preview.failed":"Could not load this file","omph.preview.unsupported":"No preview for this file type","omph.preview.retry":"Try again","omph.preview.resize":"Resize preview","omph.preview.line":"Line {start}","omph.preview.lines":"Lines {start}\u2013{end}","omph.preview.truncated":"Showing the first {shown} of {total} lines","omph.preview.sheetTruncated":"Showing the first {shown} of {total} rows","omph.preview.imageFailed":"The image could not be displayed","omph.preview.zoomIn":"Zoom in","omph.preview.zoomOut":"Zoom out","omph.preview.zoomFit":"Fit to width","omph.newConversation":"New conversation","omph.conversationList":"Conversation list","omph.conversations":"Conversations","omph.noConversations":"No conversations yet","omph.initial.suggestions":"Suggested questions","omph.approval.waiting":"Waiting for approval","omph.approval.choose":"Choose an action","omph.approval.details":"Approval details","omph.approval.choices":"Actions","omph.approval.reject":"Reject","omph.approval.allowOnce":"Allow once","omph.approval.confirm":"Continue","omph.approval.other":"Other","omph.approval.otherPlaceholder":"Describe the action to take","omph.approval.escalation":"Tool {toolName} requests privileged execution","omph.approval.recommended":"(Recommended)","omph.approval.allowOnceException":"Allow this exception once","omph.approval.allowSession":"Allow this kind for the rest of the session","omph.approval.abandon":"Abandon","omph.input.placeholder":"Type a message...","omph.input.upload":"Upload file","omph.input.send":"Send message","omph.input.stop":"Stop generating","omph.input.queue.ask":"Agent is running. Send this now or after the turn?","omph.input.queue.sendNow":"Send now","omph.input.queue.afterTurn":"Send after this turn","omph.input.queue.queued":"Queued \u2014 sends after this turn","omph.input.queue.cancel":"Cancel","omph.input.message":"Message input","omph.input.tools":"Input tools","agentui.html.defaultTitle":"Interactive HTML","agentui.html.open":"Open","agentui.html.preview":"Preview","agentui.html.code":"Code","agentui.html.toggle":"Switch between code and preview","agentui.html.copy":"Copy code","agentui.html.copied":"Copied","agentui.html.download":"Download","agentui.html.close":"Close"},Lf={"common.cancel":"\u53D6\u6D88","common.save":"\u4FDD\u5B58","common.ok":"\u786E\u5B9A","common.done":"\u5B8C\u6210","common.search":"\u641C\u7D22","common.none":"\u65E0","common.all":"\u5168\u90E8","common.noData":"\u6682\u65E0\u6570\u636E","common.copy":"\u590D\u5236","common.delete":"\u5220\u9664","common.loading":"\u52A0\u8F7D\u4E2D...","header.searchPlaceholder":"\u95EE\u6211\u70B9\u4EC0\u4E48...","header.searchAddFeature":"\u589E\u52A0\u529F\u80FD","header.searchStartVoice":"\u5F00\u59CB\u8BED\u97F3\u8F93\u5165","header.searchStopVoice":"\u505C\u6B62\u8BED\u97F3\u8F93\u5165","header.searchOpenPanel":"\u6253\u5F00\u5BF9\u8BDD","header.theme.system":"\u4E3B\u9898\uFF1A\u8DDF\u968F\u7CFB\u7EDF","header.theme.dark":"\u4E3B\u9898\uFF1A\u6DF1\u8272","header.theme.light":"\u4E3B\u9898\uFF1A\u6D45\u8272","header.menu.setting":"\u8BBE\u7F6E","header.menu.refresh":"\u5237\u65B0","header.menu.logout":"\u6CE8\u9500","navigation.expand":"\u5C55\u5F00\u5BFC\u822A","navigation.collapse":"\u6298\u53E0\u5BFC\u822A","navigation.searchPlaceholder":"\u641C\u7D22\u83DC\u5355...","navigation.noMatch":"\u672A\u627E\u5230\u5339\u914D\u7684\u83DC\u5355\u9879","navigation.noAccessibleApp":"\u6682\u65E0\u53EF\u8BBF\u95EE\u7684\u5E94\u7528","navigation.noItems":"\u6682\u65E0\u53EF\u663E\u793A\u9879","navigation.expandView":"\u5C55\u5F00\u67E5\u770B {title}","navigation.mode.switchToFixed":"\u5207\u6362\u4E3A\u56FA\u5B9A\u5BFC\u822A","navigation.mode.switchToFloating":"\u5207\u6362\u4E3A\u60AC\u6D6E\u5BFC\u822A","navigation.pinned":"\u5DF2\u56FA\u5B9A","navigation.pin.add":"\u56FA\u5B9A\u5230\u9876\u90E8","navigation.pin.remove":"\u53D6\u6D88\u56FA\u5B9A","table.toolbar.searchPlaceholder":"\u641C\u7D22...","table.title.default":"\u6570\u636E\u8868","table.toolbar.groupBy":"\u5206\u7EC4","table.toolbar.summary":"\u6C47\u603B","table.toolbar.columns":"\u5217","table.toolbar.export":"\u5BFC\u51FA","table.toolbar.itemsPerPage":"\u6BCF\u9875\u6761\u6570\uFF1A","table.toolbar.pageOf":"\u7B2C {current} / {total} \u9875","table.toolbar.newItem":"\u65B0\u5EFA\u6761\u76EE","table.toolbar.editItem":"\u7F16\u8F91\u6761\u76EE","table.toolbar.deleteItem":"\u5220\u9664\u6761\u76EE","table.toolbar.graphicReport":"\u56FE\u8868\u62A5\u8868","table.toolbar.saveLayout":"\u4FDD\u5B58\u5E03\u5C40","table.menu.groupBy":"\u5206\u7EC4","table.menu.clearAll":"\u6E05\u7A7A","table.menu.visibleColumns":"\u53EF\u89C1\u5217","table.menu.showSummaryRow":"\u663E\u793A\u6C47\u603B\u884C","table.menu.noNumericColumns":"\u6CA1\u6709\u6570\u503C\u5217","table.group.expandAll":"\u5C55\u5F00\u5168\u90E8\u5206\u7EC4","table.group.collapseAll":"\u6298\u53E0\u5168\u90E8\u5206\u7EC4","table.mobile.notImplemented":"\u79FB\u52A8\u7AEF\u89C6\u56FE\u6682\u672A\u5B9E\u73B0","table.headerMenu.sortAsc":"\u5347\u5E8F\u6392\u5217","table.headerMenu.sortDesc":"\u964D\u5E8F\u6392\u5217","table.headerMenu.clearSort":"\u6E05\u9664\u6392\u5E8F","table.headerMenu.configureSort":"\u6392\u5E8F\u8BBE\u7F6E...","table.headerMenu.group":"\u6309\u6B64\u5217\u5206\u7EC4","table.headerMenu.ungroup":"\u53D6\u6D88\u5206\u7EC4","table.headerMenu.addSummary":"\u52A0\u5165\u6C47\u603B","table.headerMenu.removeSummary":"\u4ECE\u6C47\u603B\u4E2D\u79FB\u9664","table.headerMenu.hideColumn":"\u9690\u85CF\u8BE5\u5217","table.sortDialog.title":"\u6392\u5E8F\u8BBE\u7F6E","table.sortDialog.empty":"\u6682\u65E0\u6392\u5E8F\u89C4\u5219\uFF0C\u8BF7\u6DFB\u52A0\u89C4\u5219\u8FDB\u884C\u6392\u5E8F\u3002","table.sortDialog.addRule":"\u6DFB\u52A0\u6392\u5E8F\u89C4\u5219","table.sortDialog.clearAll":"\u6E05\u7A7A\u89C4\u5219","table.sortDialog.asc":"\u5347\u5E8F","table.sortDialog.desc":"\u964D\u5E8F","pivot.title.default":"\u6570\u636E\u900F\u89C6\u8868","pivot.subtitle.default":"\u62D6\u62FD\u5B57\u6BB5\u4EE5\u914D\u7F6E\u900F\u89C6\u8868\u3002","pivot.empty":"\u8BF7\u81F3\u5C11\u62D6\u5165\u4E00\u4E2A\u503C\u5B57\u6BB5\u540E\u518D\u67E5\u770B\u900F\u89C6\u7ED3\u679C\u3002","pivot.records":"\u8BB0\u5F55\u6570","pivot.afterFilter":"\u7B5B\u9009\u540E","pivot.grandTotal":"\u603B\u8BA1","pivot.resultLabel":"\u7ED3\u679C","pivot.valueLabel":"\u503C","pivot.table.dimensions":"\u7EF4\u5EA6","pivot.config.title":"\u5E03\u5C40\u914D\u7F6E","pivot.fieldList":"\u5B57\u6BB5\u5217\u8868","pivot.availableDimensions":"\u53EF\u7528\u7EF4\u5EA6","pivot.allFieldsInUse":"\u6240\u6709\u5B57\u6BB5\u90FD\u5DF2\u4F7F\u7528\u3002","pivot.zone.rows":"\u884C","pivot.zone.columns":"\u5217","pivot.zone.filters":"\u7B5B\u9009","pivot.zone.values":"\u503C","pivot.hint.rows":"\u5C06\u5B57\u6BB5\u62D6\u5230\u8FD9\u91CC\u6784\u5EFA\u884C\u5C42\u7EA7","pivot.hint.columns":"\u5C06\u5B57\u6BB5\u62D6\u5230\u8FD9\u91CC\u6784\u5EFA\u5217\u5C42\u7EA7","pivot.hint.filters":"\u5C06\u5B57\u6BB5\u62D6\u5230\u8FD9\u91CC\u4F5C\u4E3A\u62A5\u8868\u7B5B\u9009","pivot.hint.values":"\u5C06\u6570\u503C\u5B57\u6BB5\u62D6\u5230\u8FD9\u91CC\u8FDB\u884C\u805A\u5408","pivot.clearArea":"\u6E05\u7A7A\u533A\u57DF","pivot.filter.na":"\u4E0D\u53EF\u7528","pivot.filter.noValues":"\u65E0\u53EF\u9009\u503C","pivot.filter.noneSelected":"\u672A\u9009\u62E9","pivot.filter.allValues":"\u5168\u90E8\u503C","pivot.filter.selectedCount":"\u5DF2\u9009 {selected} / {total}","pivot.filter.selectAll":"\u5168\u9009","pivot.filter.deselectAll":"\u53D6\u6D88\u5168\u9009","pivot.filter.noResults":"\u65E0\u5339\u914D\u7ED3\u679C","pivot.collapse.ariaExpand":"\u5C55\u5F00\u914D\u7F6E\u533A\u57DF","pivot.collapse.ariaCollapse":"\u6298\u53E0\u914D\u7F6E\u533A\u57DF","pivot.agg.sum":"\u6C42\u548C","pivot.agg.count":"\u8BA1\u6570","pivot.agg.avg":"\u5E73\u5747\u503C","pivot.agg.min":"\u6700\u5C0F\u503C","pivot.agg.max":"\u6700\u5927\u503C","pivot.preset.selectPlaceholder":"\u9009\u62E9\u65B9\u6848","pivot.preset.save":"\u4FDD\u5B58\u65B9\u6848","pivot.preset.delete":"\u5220\u9664\u65B9\u6848","pivot.preset.saveDialogTitle":"\u4FDD\u5B58\u5F53\u524D\u65B9\u6848","pivot.preset.nameLabel":"\u65B9\u6848\u540D\u79F0","pivot.preset.defaultName":"\u65B9\u6848 {index}","pivot.table.sectionTitle":"\u900F\u89C6\u7ED3\u679C","pivot.table.expandRowsAll":"\u884C\u5168\u90E8\u6253\u5F00","pivot.table.collapseRowsAll":"\u884C\u5168\u90E8\u6298\u53E0","pivot.table.expandColumnsAll":"\u5217\u5168\u90E8\u6253\u5F00","pivot.table.collapseColumnsAll":"\u5217\u5168\u90E8\u6298\u53E0","pivot.table.collapse.ariaExpand":"\u5C55\u5F00\u900F\u89C6\u7ED3\u679C","pivot.table.collapse.ariaCollapse":"\u6298\u53E0\u900F\u89C6\u7ED3\u679C","pivot.chart.title":"\u900F\u89C6\u56FE\u8868","pivot.chart.subtitle":"\u5C06\u4E00\u4E2A\u7EF4\u5EA6\u4E0E\u6700\u591A\u4E24\u4E2A\u5EA6\u91CF\u6620\u5C04\u4E3A\u7D27\u51D1\u56FE\u8868\u3002","pivot.chart.subtitleReady":"{dimension} \xB7 {measure}","pivot.chart.emptyNoDimension":"\u8BF7\u81F3\u5C11\u653E\u5165\u4E00\u4E2A\u884C\u6216\u5217\u5B57\u6BB5\u540E\u518D\u67E5\u770B\u56FE\u8868\u3002","pivot.chart.emptyNoValue":"\u8BF7\u81F3\u5C11\u653E\u5165\u4E00\u4E2A\u503C\u5B57\u6BB5\u540E\u518D\u67E5\u770B\u56FE\u8868\u3002","pivot.chart.emptyNoData":"\u5F53\u524D\u56FE\u8868\u9009\u62E9\u4E0B\u6682\u65E0\u53EF\u5C55\u793A\u6570\u636E\u3002","pivot.chart.dimension":"\u56FE\u8868\u7EF4\u5EA6","pivot.chart.primaryMeasure":"\u4E3B\u5EA6\u91CF","pivot.chart.secondaryMeasure":"\u5BF9\u6BD4\u5EA6\u91CF","pivot.chart.chartType":"\u56FE\u8868\u7C7B\u578B","pivot.chart.style.barVertical":"\u7EB5\u5411\u67F1\u72B6\u56FE","pivot.chart.style.barHorizontal":"\u6A2A\u5411\u67F1\u72B6\u56FE","pivot.chart.style.line":"\u6298\u7EBF\u56FE","pivot.chart.style.scatter":"\u6563\u70B9\u56FE","pivot.chart.collapse.ariaExpand":"\u5C55\u5F00\u56FE\u8868\u533A\u57DF","pivot.chart.collapse.ariaCollapse":"\u6298\u53E0\u56FE\u8868\u533A\u57DF","smartFilter.adaptFilters":"\u7B5B\u9009\u8BBE\u7F6E","smartFilter.addFilters":"\u6DFB\u52A0\u7B5B\u9009","smartFilter.go":"\u6267\u884C","smartFilter.visibleFilters":"\u53EF\u89C1\u7B5B\u9009\u9879","smartFilter.searchPlaceholder":"\u641C\u7D22...","smartFilter.noOptionsFound":"\u672A\u627E\u5230\u9009\u9879","smartFilter.min":"\u6700\u5C0F\u503C","smartFilter.max":"\u6700\u5927\u503C","smartFilter.minMaxPlaceholder":"\u6700\u5C0F\u503C - \u6700\u5927\u503C","smartFilter.operator.equals":"\u7B49\u4E8E","smartFilter.operator.contains":"\u5305\u542B","smartFilter.operator.notContains":"\u4E0D\u5305\u542B","smartFilter.operator.wildcard":"\u901A\u914D\u7B26\u641C\u7D22","smartFilter.operator.notEquals":"\u4E0D\u7B49\u4E8E","smartFilter.operator.greaterThan":"\u5927\u4E8E","smartFilter.operator.lessThan":"\u5C0F\u4E8E","smartFilter.operator.greaterOrEqual":"\u5927\u4E8E\u7B49\u4E8E","smartFilter.operator.lessOrEqual":"\u5C0F\u4E8E\u7B49\u4E8E","smartFilter.operator.between":"\u533A\u95F4","variant.noOptions":"\u65E0\u9009\u9879","variant.defaultSuffix":"\u9ED8\u8BA4","variant.selectVariant":"\u9009\u62E9\u89C6\u56FE","variant.saveView":"\u4FDD\u5B58\u89C6\u56FE","variant.newVariant":"\u65B0\u89C6\u56FE","variant.viewName":"\u89C6\u56FE\u540D\u79F0","variant.setDefault":"\u8BBE\u4E3A\u9ED8\u8BA4","variant.publicAllUsers":"\u516C\u5F00\uFF08\u6240\u6709\u7528\u6237\uFF09","variant.toast.fetchFailed":"\u52A0\u8F7D\u89C6\u56FE\u5931\u8D25","variant.toast.saveFailed":"\u4FDD\u5B58\u89C6\u56FE\u5931\u8D25","variant.toast.saveSuccess":"\u89C6\u56FE\u4FDD\u5B58\u6210\u529F","variant.toast.deleteFailed":"\u5220\u9664\u89C6\u56FE\u5931\u8D25","variant.toast.deleteSuccess":"\u89C6\u56FE\u5220\u9664\u6210\u529F","variant.toast.defaultFailed":"\u66F4\u65B0\u9ED8\u8BA4\u89C6\u56FE\u5931\u8D25","variant.toast.defaultSuccess":"\u9ED8\u8BA4\u89C6\u56FE\u5DF2\u66F4\u65B0","layout.saveLayout":"\u4FDD\u5B58\u5E03\u5C40","layout.layoutOptions":"\u5E03\u5C40\u9009\u9879","layout.selectLayout":"\u9009\u62E9\u5E03\u5C40","layout.saveCurrentLayout":"\u4FDD\u5B58\u5F53\u524D\u5E03\u5C40...","layout.noSavedLayouts":"\u6682\u65E0\u5DF2\u4FDD\u5B58\u5E03\u5C40","layout.removeDefault":"\u53D6\u6D88\u9ED8\u8BA4","layout.setAsDefault":"\u8BBE\u4E3A\u9ED8\u8BA4","layout.layoutName":"\u5E03\u5C40\u540D\u79F0","layout.layoutDescription":"\u63CF\u8FF0","layout.layoutNameHelper":"\u4F8B\u5982\uFF1A\u7D27\u51D1\u89C6\u56FE","layout.warningOverwrite":"\u8B66\u544A\uFF1A\u5C06\u8986\u76D6\u540C\u540D\u5E03\u5C40","layout.useAsDefault":"\u7528\u4F5C\u9ED8\u8BA4\u5E03\u5C40","layout.publicAllUsers":"\u516C\u5F00\uFF08\u6240\u6709\u7528\u6237\u53EF\u89C1\uFF09","layout.toast.loadFallback":"\u540E\u7AEF\u52A0\u8F7D\u5E03\u5C40\u5931\u8D25\uFF0C\u5DF2\u56DE\u9000\u5230\u672C\u5730\u5B58\u50A8","layout.toast.saveSuccess":"\u5E03\u5C40\u4FDD\u5B58\u6210\u529F","layout.toast.saveLocalSuccess":"\u5E03\u5C40\u5DF2\u4FDD\u5B58\u5230\u672C\u5730\u5B58\u50A8","layout.toast.backendUnavailableSavedLocal":"\u540E\u7AEF\u4E0D\u53EF\u7528\uFF0C\u5DF2\u4FDD\u5B58\u5230\u672C\u5730\u5B58\u50A8","layout.toast.deleteSuccess":"\u5E03\u5C40\u5220\u9664\u6210\u529F","layout.toast.deleteLocalSuccess":"\u5E03\u5C40\u5DF2\u4ECE\u672C\u5730\u5B58\u50A8\u5220\u9664","layout.toast.backendUnavailableDeletedLocal":"\u540E\u7AEF\u4E0D\u53EF\u7528\uFF0C\u5DF2\u4ECE\u672C\u5730\u5B58\u50A8\u5220\u9664","layout.toast.defaultSuccess":"\u9ED8\u8BA4\u5E03\u5C40\u5DF2\u8BBE\u7F6E","layout.toast.defaultLocalSuccess":"\u9ED8\u8BA4\u5E03\u5C40\u5DF2\u5728\u672C\u5730\u5B58\u50A8\u8BBE\u7F6E","layout.toast.backendUnavailableDefaultLocal":"\u540E\u7AEF\u4E0D\u53EF\u7528\uFF0C\u9ED8\u8BA4\u5E03\u5C40\u5DF2\u4FDD\u5B58\u5230\u672C\u5730\u5B58\u50A8","dateRange.label":"\u65E5\u671F\u8303\u56F4","dateRange.startDate":"\u5F00\u59CB\u65E5\u671F","dateRange.endDate":"\u7ED3\u675F\u65E5\u671F","dateRange.select":"\u8BF7\u9009\u62E9...","dateRange.today":"\u4ECA\u5929","dateRange.thisWeek":"\u672C\u5468","dateRange.thisMonth":"\u672C\u6708","graph.records":"{count} \u6761\u8BB0\u5F55","graph.kpi.totalRecords":"\u603B\u8BB0\u5F55\u6570","graph.kpi.totalReport":"\u603B\u7533\u62A5\u5DE5\u65F6","graph.kpi.totalBillable":"\u603B\u53EF\u8BA1\u8D39\u5DE5\u65F6","graph.kpi.efficiency":"\u6548\u7387","graph.kpi.amount":"\u91D1\u989D","graph.kpi.flagged":"\u6807\u8BB0","graph.chart.billable.title":"\u7EF4\u5EA6\u8BA1\u8D39\u5DE5\u65F6","graph.chart.billable.subtitle":"\u6309\u53EF\u8BA1\u8D39\u5DE5\u65F6\u6392\u5E8F\u524D\u5217","graph.chart.efficiency.title":"\u4EBA\u5458\u6548\u7387","graph.chart.efficiency.subtitle":"\u6309\u6700\u4F4E\u6548\u7387\u4F18\u5148","graph.chart.status.title":"\u72B6\u6001\u5206\u5E03","graph.chart.status.subtitle":"\u6309\u72B6\u6001\u8BB0\u5F55\u5360\u6BD4","graph.dataBody":"\u6570\u636E\u660E\u7EC6","graph.reportTitle":"\u56FE\u8868\u62A5\u8868","graph.unassigned":"\u672A\u5206\u914D","graph.column.reportHours":"\u7533\u62A5\u5DE5\u65F6","graph.column.billableHours":"\u53EF\u8BA1\u8D39\u5DE5\u65F6","detail.searchAi.placeholder":"\u641C\u7D22\u5B57\u6BB5\uFF1B\u5982\u65E0\u7ED3\u679C\u5219\u81EA\u52A8\u89E6\u53D1 AI...","detail.searchAi.matches":"{count} \u6761\u5339\u914D\u7ED3\u679C","detail.searchAi.noMatch":"\u672A\u627E\u5230\u5339\u914D\u5B57\u6BB5\u3002","detail.searchAi.autoAiFallback":"\u672A\u547D\u4E2D\u5B57\u6BB5\uFF0C\u6B63\u5728\u89E6\u53D1 AI \u5206\u6790...","detail.searchAi.aiResultTitle":"AI \u5206\u6790\u7ED3\u679C","detail.table.title":"\u5173\u8054\u8BB0\u5F55","kanban.empty":"\u5C06\u5361\u7247\u62D6\u5230\u8FD9\u91CC","kanban.bucket.limit":"\u4E0A\u9650","kanban.bucket.dropHere":"\u91CA\u653E\u540E\u79FB\u52A8\u5230\u8BE5 bucket","kanban.bucket.add":"\u65B0\u589E bucket","kanban.bucket.rename":"\u91CD\u547D\u540D bucket","kanban.bucket.saveRename":"\u4FDD\u5B58 bucket \u540D\u79F0","kanban.bucket.cancelRename":"\u53D6\u6D88\u91CD\u547D\u540D","kanban.search.placeholder":"\u641C\u7D22\u5361\u7247\u548C bucket","kanban.search.clear":"\u6E05\u9664\u641C\u7D22","kanban.search.results":"{count} \u5F20\u5339\u914D\u5361\u7247","kanban.search.noMatch":"\u6CA1\u6709\u5339\u914D\u7684\u5361\u7247","kanban.card.progress":"\u8FDB\u5EA6","kanban.card.openDetail":"\u6253\u5F00\u8BE6\u60C5","kanban.priority.critical":"\u7D27\u6025","kanban.priority.high":"\u9AD8","kanban.priority.medium":"\u4E2D","kanban.priority.low":"\u4F4E","quickCreate.newItem":"\u65B0\u5EFA\u6761\u76EE","quickCreate.createWithTitle":"\u521B\u5EFA{title}","quickEdit.editWithTitle":"\u7F16\u8F91{title}","quickDelete.confirmTitle":"\u786E\u8BA4\u5220\u9664","quickDelete.confirmMessageSingle":"\u786E\u8BA4\u5220\u9664\u5F53\u524D\u9009\u4E2D\u8BB0\u5F55\u5417\uFF1F","quickDelete.confirmMessageMultiple":"\u786E\u8BA4\u5220\u9664\u5DF2\u9009\u4E2D\u7684 {count} \u6761\u8BB0\u5F55\u5417\uFF1F","cardPage.viewDetails":"\u67E5\u770B\u8BE6\u60C5","cardPage.download":"\u4E0B\u8F7D","cardPage.close":"\u5173\u95ED","cardPage.empty":"\u672A\u627E\u5230\u6761\u76EE","messageBox.confirm":"\u786E\u5B9A","messageBox.cancel":"\u53D6\u6D88","omph.status.idle":"\u7A7A\u95F2","omph.status.pending":"\u7B49\u5F85\u4E2D","omph.status.running":"\u5904\u7406\u4E2D","omph.status.success":"\u5DF2\u5B8C\u6210","omph.status.error":"\u51FA\u9519","omph.working":"\u5904\u7406\u4E2D","omph.workingFor":"\u5DF2\u5904\u7406 {duration}","omph.loadOlder":"\u52A0\u8F7D\u66F4\u65E9\u6D88\u606F","omph.loadingOlder":"\u6B63\u5728\u52A0\u8F7D\u66F4\u65E9\u6D88\u606F\u2026","omph.toBottom":"\u56DE\u5230\u5E95\u90E8","omph.copy":"\u590D\u5236","omph.copied":"\u5DF2\u590D\u5236","omph.turnActions":"\u56DE\u590D\u64CD\u4F5C","omph.usage":"\u7528\u91CF","omph.inputTokens":"\u8F93\u5165","omph.outputTokens":"\u8F93\u51FA","omph.duration":"\u7528\u65F6","omph.send":"\u53D1\u9001","omph.stop":"\u505C\u6B62","omph.supplement.queued":"\u5DF2\u52A0\u5165\u5F53\u524D\u4EFB\u52A1","omph.turnRail":"\u8F6E\u6B21","omph.secondUnit":"\u79D2","omph.minuteUnit":"\u5206","omph.preview.title":"\u6587\u4EF6\u9884\u89C8","omph.preview.close":"\u5173\u95ED\u9884\u89C8","omph.preview.back":"\u8FD4\u56DE\u5BF9\u8BDD","omph.preview.expand":"\u5C55\u5F00\u9884\u89C8","omph.preview.collapse":"\u8FD8\u539F\u9884\u89C8\u5927\u5C0F","omph.preview.copyContent":"\u590D\u5236\u5185\u5BB9","omph.preview.copyPath":"\u590D\u5236\u8DEF\u5F84","omph.preview.download":"\u4E0B\u8F7D","omph.preview.openExternal":"\u5728\u5916\u90E8\u6253\u5F00","omph.preview.wrap":"\u81EA\u52A8\u6362\u884C","omph.preview.loading":"\u6B63\u5728\u52A0\u8F7D\u6587\u4EF6","omph.preview.missing":"\u6587\u4EF6\u4E0D\u5B58\u5728","omph.preview.failed":"\u65E0\u6CD5\u52A0\u8F7D\u6B64\u6587\u4EF6","omph.preview.unsupported":"\u6B64\u6587\u4EF6\u7C7B\u578B\u4E0D\u652F\u6301\u9884\u89C8","omph.preview.retry":"\u91CD\u8BD5","omph.preview.resize":"\u8C03\u6574\u9884\u89C8\u5927\u5C0F","omph.preview.line":"\u7B2C {start} \u884C","omph.preview.lines":"\u7B2C {start}\u2013{end} \u884C","omph.preview.truncated":"\u5171 {total} \u884C\uFF0C\u4EC5\u663E\u793A\u524D {shown} \u884C","omph.preview.sheetTruncated":"\u5171 {total} \u884C\uFF0C\u4EC5\u663E\u793A\u524D {shown} \u884C","omph.preview.imageFailed":"\u56FE\u7247\u65E0\u6CD5\u663E\u793A","omph.preview.zoomIn":"\u653E\u5927","omph.preview.zoomOut":"\u7F29\u5C0F","omph.preview.zoomFit":"\u9002\u5E94\u5BBD\u5EA6","omph.newConversation":"\u65B0\u5EFA\u4F1A\u8BDD","omph.conversationList":"\u4F1A\u8BDD\u5217\u8868","omph.conversations":"\u4F1A\u8BDD","omph.noConversations":"\u8FD8\u6CA1\u6709\u4F1A\u8BDD","omph.initial.suggestions":"\u5019\u9009\u95EE\u9898","omph.approval.waiting":"\u7B49\u5F85\u5BA1\u6279","omph.approval.choose":"\u8BF7\u9009\u62E9\u64CD\u4F5C","omph.approval.details":"\u5BA1\u6279\u8BE6\u60C5","omph.approval.choices":"\u53EF\u9009\u64CD\u4F5C","omph.approval.reject":"\u62D2\u7EDD","omph.approval.allowOnce":"\u4EC5\u6B64\u4E00\u6B21","omph.approval.confirm":"\u7EE7\u7EED","omph.approval.other":"\u5176\u4ED6","omph.approval.otherPlaceholder":"\u63CF\u8FF0\u8981\u6267\u884C\u7684\u64CD\u4F5C","omph.approval.escalation":"\u5DE5\u5177 {toolName} \u8BF7\u6C42\u7279\u6743\u6267\u884C","omph.approval.recommended":"\uFF08\u63A8\u8350\uFF09","omph.approval.allowOnceException":"\u4EC5\u672C\u6B21\u7834\u4F8B","omph.approval.allowSession":"\u672C\u4F1A\u8BDD\u540C\u7C7B\u90FD\u5141\u8BB8","omph.approval.abandon":"\u653E\u5F03","omph.input.placeholder":"\u8F93\u5165\u6D88\u606F\u2026","omph.input.upload":"\u4E0A\u4F20\u6587\u4EF6","omph.input.send":"\u53D1\u9001\u6D88\u606F","omph.input.stop":"\u505C\u6B62\u751F\u6210","omph.input.queue.ask":"Agent \u6B63\u5728\u8FD0\u884C\uFF0C\u8FD9\u6761\u6D88\u606F\u600E\u4E48\u53D1\uFF1F","omph.input.queue.sendNow":"\u7ACB\u5373\u53D1\u9001","omph.input.queue.afterTurn":"\u672C\u8F6E\u7ED3\u675F\u540E\u53D1\u9001","omph.input.queue.queued":"\u5DF2\u6392\u961F\uFF0C\u672C\u8F6E\u7ED3\u675F\u540E\u81EA\u52A8\u53D1\u9001","omph.input.queue.cancel":"\u53D6\u6D88","omph.input.message":"\u6D88\u606F\u8F93\u5165","omph.input.tools":"\u8F93\u5165\u5DE5\u5177","agentui.html.defaultTitle":"\u4EA4\u4E92\u5F0F HTML","agentui.html.open":"\u6253\u5F00","agentui.html.preview":"\u9884\u89C8","agentui.html.code":"\u4EE3\u7801","agentui.html.toggle":"\u5207\u6362\u4EE3\u7801\u4E0E\u9884\u89C8","agentui.html.copy":"\u590D\u5236\u4EE3\u7801","agentui.html.copied":"\u5DF2\u590D\u5236","agentui.html.download":"\u4E0B\u8F7D","agentui.html.close":"\u5173\u95ED"},Of={"common.cancel":"Annuler","common.save":"Enregistrer","common.ok":"OK","common.done":"Terminer","common.search":"Rechercher","common.none":"Aucun","common.all":"Tout","common.noData":"Aucune donn\xE9e","common.copy":"Copier","common.delete":"Supprimer","common.loading":"Chargement...","header.searchPlaceholder":"Demandez-moi...","header.searchAddFeature":"Ajouter une fonction","header.searchStartVoice":"D\xE9marrer la saisie vocale","header.searchStopVoice":"Arr\xEAter la saisie vocale","header.searchOpenPanel":"Ouvrir la conversation","header.theme.system":"Th\xE8me : Syst\xE8me","header.theme.dark":"Th\xE8me : Sombre","header.theme.light":"Th\xE8me : Clair","header.menu.setting":"Param\xE8tres","header.menu.refresh":"Actualiser","header.menu.logout":"Se d\xE9connecter","navigation.expand":"D\xE9velopper la navigation","navigation.collapse":"R\xE9duire la navigation","navigation.searchPlaceholder":"Rechercher dans le menu...","navigation.noMatch":"Aucun \xE9l\xE9ment correspondant","navigation.noAccessibleApp":"Aucune application accessible","navigation.noItems":"Aucun \xE9l\xE9ment \xE0 afficher","navigation.expandView":"D\xE9velopper {title}","navigation.mode.switchToFixed":"Basculer vers la navigation fixe","navigation.mode.switchToFloating":"Basculer vers la navigation flottante","navigation.pinned":"\xC9pingl\xE9s","navigation.pin.add":"\xC9pingler en haut","navigation.pin.remove":"D\xE9s\xE9pingler","table.toolbar.searchPlaceholder":"Rechercher...","table.title.default":"Tableau de donn\xE9es","table.toolbar.groupBy":"Grouper","table.toolbar.summary":"R\xE9sum\xE9","table.toolbar.columns":"Colonnes","table.toolbar.export":"Exporter","table.toolbar.itemsPerPage":"Lignes par page :","table.toolbar.pageOf":"Page {current} sur {total}","table.toolbar.newItem":"Nouvel \xE9l\xE9ment","table.toolbar.editItem":"Modifier l'\xE9l\xE9ment","table.toolbar.deleteItem":"Supprimer l'\xE9l\xE9ment","table.toolbar.graphicReport":"Rapport graphique","table.toolbar.saveLayout":"Enregistrer la vue","table.menu.groupBy":"Grouper","table.menu.clearAll":"Tout effacer","table.menu.visibleColumns":"Colonnes visibles","table.menu.showSummaryRow":"Afficher la ligne de r\xE9sum\xE9","table.menu.noNumericColumns":"Aucune colonne num\xE9rique","table.group.expandAll":"D\xE9velopper tous les groupes","table.group.collapseAll":"R\xE9duire tous les groupes","table.mobile.notImplemented":"Vue mobile non impl\xE9ment\xE9e","table.headerMenu.sortAsc":"Trier ascendant","table.headerMenu.sortDesc":"Trier descendant","table.headerMenu.clearSort":"Effacer le tri","table.headerMenu.configureSort":"Configurer le tri...","table.headerMenu.group":"Grouper par cette colonne","table.headerMenu.ungroup":"Retirer du groupement","table.headerMenu.addSummary":"Inclure dans le r\xE9sum\xE9","table.headerMenu.removeSummary":"Retirer du r\xE9sum\xE9","table.headerMenu.hideColumn":"Masquer la colonne","table.sortDialog.title":"Param\xE8tres de tri","table.sortDialog.empty":"Aucune r\xE8gle de tri. Ajoutez-en une pour commencer.","table.sortDialog.addRule":"Ajouter une r\xE8gle","table.sortDialog.clearAll":"Tout effacer","table.sortDialog.asc":"Ascendant","table.sortDialog.desc":"Descendant","pivot.title.default":"Tableau crois\xE9 dynamique","pivot.subtitle.default":"Faites glisser les champs pour configurer le tableau crois\xE9.","pivot.empty":"Ajoutez au moins un champ de valeur pour afficher le r\xE9sultat.","pivot.records":"Enregistrements","pivot.afterFilter":"Apr\xE8s filtre","pivot.grandTotal":"Total g\xE9n\xE9ral","pivot.resultLabel":"R\xE9sultat","pivot.valueLabel":"Valeur","pivot.table.dimensions":"Dimensions","pivot.config.title":"Configuration","pivot.fieldList":"Liste des champs","pivot.availableDimensions":"Dimensions disponibles","pivot.allFieldsInUse":"Tous les champs sont d\xE9j\xE0 utilis\xE9s.","pivot.zone.rows":"Lignes","pivot.zone.columns":"Colonnes","pivot.zone.filters":"Filtres","pivot.zone.values":"Valeurs","pivot.hint.rows":"D\xE9posez les champs ici pour construire la hi\xE9rarchie des lignes","pivot.hint.columns":"D\xE9posez les champs ici pour construire la hi\xE9rarchie des colonnes","pivot.hint.filters":"D\xE9posez les champs ici pour les filtres du rapport","pivot.hint.values":"D\xE9posez les champs num\xE9riques ici pour les agr\xE9gations","pivot.clearArea":"Vider la zone","pivot.filter.na":"N/A","pivot.filter.noValues":"Aucune valeur","pivot.filter.noneSelected":"Aucune s\xE9lection","pivot.filter.allValues":"Toutes les valeurs","pivot.filter.selectedCount":"{selected} / {total} s\xE9lectionn\xE9es","pivot.filter.selectAll":"Tout s\xE9lectionner","pivot.filter.deselectAll":"Tout d\xE9s\xE9lectionner","pivot.filter.noResults":"Aucun r\xE9sultat","pivot.collapse.ariaExpand":"D\xE9velopper la zone de configuration","pivot.collapse.ariaCollapse":"R\xE9duire la zone de configuration","pivot.agg.sum":"Somme","pivot.agg.count":"Compte","pivot.agg.avg":"Moyenne","pivot.agg.min":"Min","pivot.agg.max":"Max","pivot.preset.selectPlaceholder":"S\xE9lectionner un preset","pivot.preset.save":"Enregistrer le preset","pivot.preset.delete":"Supprimer le preset","pivot.preset.saveDialogTitle":"Enregistrer le preset actuel","pivot.preset.nameLabel":"Nom du preset","pivot.preset.defaultName":"Preset {index}","pivot.table.sectionTitle":"R\xE9sultat du pivot","pivot.table.expandRowsAll":"Expand rows","pivot.table.collapseRowsAll":"Collapse rows","pivot.table.expandColumnsAll":"Expand columns","pivot.table.collapseColumnsAll":"Collapse columns","pivot.table.collapse.ariaExpand":"D\xE9velopper le r\xE9sultat du pivot","pivot.table.collapse.ariaCollapse":"R\xE9duire le r\xE9sultat du pivot","pivot.chart.title":"Graphique pivot","pivot.chart.subtitle":"Associez une dimension et jusqu\u2019\xE0 deux mesures dans un graphique compact.","pivot.chart.subtitleReady":"{dimension} par {measure}","pivot.chart.emptyNoDimension":"Ajoutez au moins un champ de ligne ou de colonne pour afficher le graphique.","pivot.chart.emptyNoValue":"Ajoutez au moins un champ de valeur pour afficher le graphique.","pivot.chart.emptyNoData":"Aucune donn\xE9e disponible pour la s\xE9lection actuelle du graphique.","pivot.chart.dimension":"Dimension","pivot.chart.primaryMeasure":"Mesure","pivot.chart.secondaryMeasure":"Mesure de comparaison","pivot.chart.chartType":"Type de graphique","pivot.chart.style.barVertical":"Barres verticales","pivot.chart.style.barHorizontal":"Barres horizontales","pivot.chart.style.line":"Ligne","pivot.chart.style.scatter":"Nuage de points","pivot.chart.collapse.ariaExpand":"D\xE9velopper la zone du graphique","pivot.chart.collapse.ariaCollapse":"R\xE9duire la zone du graphique","smartFilter.adaptFilters":"Adapter les filtres","smartFilter.addFilters":"Ajouter des filtres","smartFilter.go":"Ex\xE9cuter","smartFilter.visibleFilters":"Filtres visibles","smartFilter.searchPlaceholder":"Rechercher...","smartFilter.noOptionsFound":"Aucune option trouv\xE9e","smartFilter.min":"Min","smartFilter.max":"Max","smartFilter.minMaxPlaceholder":"Min - Max","smartFilter.operator.equals":"\xC9gal \xE0","smartFilter.operator.contains":"Contient","smartFilter.operator.notContains":"Ne contient pas","smartFilter.operator.wildcard":"Recherche g\xE9n\xE9rique","smartFilter.operator.notEquals":"Diff\xE9rent de","smartFilter.operator.greaterThan":"Sup\xE9rieur \xE0","smartFilter.operator.lessThan":"Inf\xE9rieur \xE0","smartFilter.operator.greaterOrEqual":"Sup\xE9rieur ou \xE9gal","smartFilter.operator.lessOrEqual":"Inf\xE9rieur ou \xE9gal","smartFilter.operator.between":"Entre","variant.noOptions":"Aucune option","variant.defaultSuffix":"Par d\xE9faut","variant.selectVariant":"S\xE9lectionner une vue","variant.saveView":"Enregistrer la vue","variant.newVariant":"Nouvelle vue","variant.viewName":"Nom de la vue","variant.setDefault":"D\xE9finir par d\xE9faut","variant.publicAllUsers":"Public (tous les utilisateurs)","variant.toast.fetchFailed":"\xC9chec du chargement des vues","variant.toast.saveFailed":"\xC9chec de l'enregistrement de la vue","variant.toast.saveSuccess":"Vue enregistr\xE9e avec succ\xE8s","variant.toast.deleteFailed":"\xC9chec de la suppression de la vue","variant.toast.deleteSuccess":"Vue supprim\xE9e avec succ\xE8s","variant.toast.defaultFailed":"\xC9chec de la mise \xE0 jour de la vue par d\xE9faut","variant.toast.defaultSuccess":"Vue par d\xE9faut mise \xE0 jour","layout.saveLayout":"Enregistrer la vue","layout.layoutOptions":"Options de vue","layout.selectLayout":"S\xE9lectionner une vue","layout.saveCurrentLayout":"Enregistrer la vue actuelle...","layout.noSavedLayouts":"Aucune vue enregistr\xE9e","layout.removeDefault":"Retirer le d\xE9faut","layout.setAsDefault":"D\xE9finir par d\xE9faut","layout.layoutName":"Nom de la vue","layout.layoutDescription":"Description","layout.layoutNameHelper":"ex. : Vue compacte","layout.warningOverwrite":"Attention : la vue existante sera \xE9cras\xE9e","layout.useAsDefault":"Utiliser comme vue par d\xE9faut","layout.publicAllUsers":"Public (visible par tous les utilisateurs)","layout.toast.loadFallback":"\xC9chec du chargement depuis le backend, bascule vers le stockage local","layout.toast.saveSuccess":"Vue enregistr\xE9e avec succ\xE8s","layout.toast.saveLocalSuccess":"Vue enregistr\xE9e dans le stockage local","layout.toast.backendUnavailableSavedLocal":"Backend indisponible, enregistr\xE9 en local","layout.toast.deleteSuccess":"Vue supprim\xE9e avec succ\xE8s","layout.toast.deleteLocalSuccess":"Vue supprim\xE9e du stockage local","layout.toast.backendUnavailableDeletedLocal":"Backend indisponible, supprim\xE9 en local","layout.toast.defaultSuccess":"Vue par d\xE9faut d\xE9finie","layout.toast.defaultLocalSuccess":"Vue par d\xE9faut d\xE9finie en local","layout.toast.backendUnavailableDefaultLocal":"Backend indisponible, d\xE9faut enregistr\xE9 en local","dateRange.label":"Plage de dates","dateRange.startDate":"Date de d\xE9but","dateRange.endDate":"Date de fin","dateRange.select":"S\xE9lectionner...","dateRange.today":"Aujourd'hui","dateRange.thisWeek":"Cette semaine","dateRange.thisMonth":"Ce mois-ci","graph.records":"{count} enregistrements","graph.kpi.totalRecords":"Total des enregistrements","graph.kpi.totalReport":"Total d\xE9clar\xE9","graph.kpi.totalBillable":"Total facturable","graph.kpi.efficiency":"Efficacit\xE9","graph.kpi.amount":"Montant","graph.kpi.flagged":"Signal\xE9","graph.chart.billable.title":"Facturable par dimension","graph.chart.billable.subtitle":"Top valeurs par heures facturables","graph.chart.efficiency.title":"Efficacit\xE9 par personne","graph.chart.efficiency.subtitle":"Efficacit\xE9 la plus faible en premier","graph.chart.status.title":"R\xE9partition des statuts","graph.chart.status.subtitle":"Ratio des enregistrements par statut","graph.dataBody":"Donn\xE9es","graph.reportTitle":"Rapport graphique","graph.unassigned":"Non attribu\xE9","graph.column.reportHours":"Heures d\xE9clar\xE9es","graph.column.billableHours":"Heures facturables","detail.searchAi.placeholder":"Rechercher des champs, ou interroger l\u2019IA en cas d\u2019absence de r\xE9sultat...","detail.searchAi.matches":"{count} correspondances trouv\xE9es","detail.searchAi.noMatch":"Aucun champ correspondant trouv\xE9.","detail.searchAi.autoAiFallback":"Aucune correspondance directe. Analyse IA en cours...","detail.searchAi.aiResultTitle":"Analyse IA","detail.table.title":"Enregistrements li\xE9s","kanban.empty":"D\xE9posez les cartes ici","kanban.bucket.limit":"Limite","kanban.bucket.dropHere":"Rel\xE2chez pour d\xE9placer dans cette colonne","kanban.bucket.add":"Ajouter une colonne","kanban.bucket.rename":"Renommer la colonne","kanban.bucket.saveRename":"Enregistrer le nom","kanban.bucket.cancelRename":"Annuler le renommage","kanban.search.placeholder":"Rechercher des cartes et colonnes","kanban.search.clear":"Effacer la recherche","kanban.search.results":"{count} cartes correspondantes","kanban.search.noMatch":"Aucune carte correspondante","kanban.card.progress":"Progression","kanban.card.openDetail":"Ouvrir le d\xE9tail","kanban.priority.critical":"Critique","kanban.priority.high":"\xC9lev\xE9e","kanban.priority.medium":"Moyenne","kanban.priority.low":"Faible","quickCreate.newItem":"Nouvel \xE9l\xE9ment","quickCreate.createWithTitle":"Cr\xE9er {title}","quickEdit.editWithTitle":"Modifier {title}","quickDelete.confirmTitle":"Confirmer la suppression","quickDelete.confirmMessageSingle":"Voulez-vous vraiment supprimer l\u2019enregistrement s\xE9lectionn\xE9 ?","quickDelete.confirmMessageMultiple":"Voulez-vous vraiment supprimer les {count} enregistrements s\xE9lectionn\xE9s ?","cardPage.viewDetails":"Voir les d\xE9tails","cardPage.download":"T\xE9l\xE9charger","cardPage.close":"Fermer","cardPage.empty":"Aucun \xE9l\xE9ment trouv\xE9","messageBox.confirm":"OK","messageBox.cancel":"Annuler","omph.status.idle":"Inactif","omph.status.pending":"En attente","omph.status.running":"En cours","omph.status.success":"Termin\xE9","omph.status.error":"Erreur","omph.working":"En cours","omph.workingFor":"En cours depuis {duration}","omph.loadOlder":"Charger les messages pr\xE9c\xE9dents","omph.loadingOlder":"Chargement des messages pr\xE9c\xE9dents\u2026","omph.toBottom":"Revenir en bas","omph.copy":"Copier","omph.copied":"Copi\xE9","omph.turnActions":"Actions de r\xE9ponse","omph.usage":"Utilisation","omph.inputTokens":"Entr\xE9e","omph.outputTokens":"Sortie","omph.duration":"Dur\xE9e","omph.send":"Envoyer","omph.stop":"Arr\xEAter","omph.supplement.queued":"Ajout\xE9 \xE0 la t\xE2che en cours","omph.turnRail":"Tours","omph.secondUnit":"s","omph.minuteUnit":"min","omph.preview.title":"Aper\xE7u du fichier","omph.preview.close":"Fermer l'aper\xE7u","omph.preview.back":"Retour \xE0 la conversation","omph.preview.expand":"Agrandir l\u2019aper\xE7u","omph.preview.collapse":"R\xE9duire l\u2019aper\xE7u","omph.preview.copyContent":"Copier le contenu","omph.preview.copyPath":"Copier le chemin","omph.preview.download":"T\xE9l\xE9charger","omph.preview.openExternal":"Ouvrir \xE0 l\u2019ext\xE9rieur","omph.preview.wrap":"Retour \xE0 la ligne","omph.preview.loading":"Chargement du fichier","omph.preview.missing":"Fichier introuvable","omph.preview.failed":"Impossible de charger ce fichier","omph.preview.unsupported":"Aucun aper\xE7u pour ce type de fichier","omph.preview.retry":"R\xE9essayer","omph.preview.resize":"Redimensionner l\u2019aper\xE7u","omph.preview.line":"Ligne {start}","omph.preview.lines":"Lignes {start}\u2013{end}","omph.preview.truncated":"Affichage des {shown} premi\xE8res lignes sur {total}","omph.preview.sheetTruncated":"Affichage des {shown} premi\xE8res lignes sur {total}","omph.preview.imageFailed":"Impossible d'afficher l'image","omph.preview.zoomIn":"Zoom avant","omph.preview.zoomOut":"Zoom arri\xE8re","omph.preview.zoomFit":"Ajuster \xE0 la largeur","omph.newConversation":"Nouvelle conversation","omph.conversationList":"Liste des conversations","omph.conversations":"Conversations","omph.noConversations":"Aucune conversation","omph.initial.suggestions":"Questions sugg\xE9r\xE9es","omph.approval.waiting":"En attente d'approbation","omph.approval.choose":"Choisir une action","omph.approval.details":"D\xE9tails de l'approbation","omph.approval.choices":"Actions","omph.approval.reject":"Refuser","omph.approval.allowOnce":"Autoriser une fois","omph.approval.confirm":"Continuer","omph.approval.other":"Autre","omph.approval.otherPlaceholder":"D\xE9crire l'action \xE0 effectuer","omph.approval.escalation":"L'outil {toolName} demande une ex\xE9cution privil\xE9gi\xE9e","omph.approval.recommended":"(Recommand\xE9)","omph.approval.allowOnceException":"Autoriser cette exception une fois","omph.approval.allowSession":"Autoriser ce type pour le reste de la session","omph.approval.abandon":"Abandonner","omph.input.placeholder":"Saisir un message\u2026","omph.input.upload":"T\xE9l\xE9verser un fichier","omph.input.send":"Envoyer le message","omph.input.stop":"Arr\xEAter la g\xE9n\xE9ration","omph.input.queue.ask":"L'agent travaille. Envoyer maintenant ou apr\xE8s ce tour ?","omph.input.queue.sendNow":"Envoyer maintenant","omph.input.queue.afterTurn":"Envoyer apr\xE8s ce tour","omph.input.queue.queued":"En file d'attente \u2014 envoi apr\xE8s ce tour","omph.input.queue.cancel":"Annuler","omph.input.message":"Saisie de message","omph.input.tools":"Outils de saisie","agentui.html.defaultTitle":"HTML interactif","agentui.html.open":"Ouvrir","agentui.html.preview":"Aper\xE7u","agentui.html.code":"Code","agentui.html.toggle":"Basculer entre code et aper\xE7u","agentui.html.copy":"Copier le code","agentui.html.copied":"Copi\xE9","agentui.html.download":"T\xE9l\xE9charger","agentui.html.close":"Fermer"},Ff={"common.cancel":"Abbrechen","common.save":"Speichern","common.ok":"OK","common.done":"Fertig","common.search":"Suchen","common.none":"Keine","common.all":"Alle","common.noData":"Keine Daten","common.copy":"Kopieren","common.delete":"L\xF6schen","common.loading":"Wird geladen...","header.searchPlaceholder":"Frag mich...","header.searchAddFeature":"Funktion hinzuf\xFCgen","header.searchStartVoice":"Spracheingabe starten","header.searchStopVoice":"Spracheingabe stoppen","header.searchOpenPanel":"Unterhaltung \xF6ffnen","header.theme.system":"Theme: System","header.theme.dark":"Theme: Dunkel","header.theme.light":"Theme: Hell","header.menu.setting":"Einstellungen","header.menu.refresh":"Aktualisieren","header.menu.logout":"Abmelden","navigation.expand":"Navigation erweitern","navigation.collapse":"Navigation einklappen","navigation.searchPlaceholder":"Men\xFC suchen...","navigation.noMatch":"Keine passenden Men\xFCeintr\xE4ge","navigation.noAccessibleApp":"Keine verf\xFCgbaren Anwendungen","navigation.noItems":"Keine Eintr\xE4ge vorhanden","navigation.expandView":"{title} aufklappen","navigation.mode.switchToFixed":"Zu fester Navigation wechseln","navigation.mode.switchToFloating":"Zu schwebender Navigation wechseln","navigation.pinned":"Angeheftet","navigation.pin.add":"Oben anheften","navigation.pin.remove":"L\xF6sen","table.toolbar.searchPlaceholder":"Suchen...","table.title.default":"Datentabelle","table.toolbar.groupBy":"Gruppieren","table.toolbar.summary":"Zusammenfassung","table.toolbar.columns":"Spalten","table.toolbar.export":"Export","table.toolbar.itemsPerPage":"Zeilen pro Seite:","table.toolbar.pageOf":"Seite {current} von {total}","table.toolbar.newItem":"Neuer Eintrag","table.toolbar.editItem":"Eintrag bearbeiten","table.toolbar.deleteItem":"Eintrag l\xF6schen","table.toolbar.graphicReport":"Grafikbericht","table.toolbar.saveLayout":"Layout speichern","table.menu.groupBy":"Gruppieren","table.menu.clearAll":"Alles l\xF6schen","table.menu.visibleColumns":"Sichtbare Spalten","table.menu.showSummaryRow":"Summenzeile anzeigen","table.menu.noNumericColumns":"Keine numerischen Spalten","table.group.expandAll":"Alle Gruppen aufklappen","table.group.collapseAll":"Alle Gruppen zuklappen","table.mobile.notImplemented":"Mobile Ansicht nicht implementiert","table.headerMenu.sortAsc":"Aufsteigend sortieren","table.headerMenu.sortDesc":"Absteigend sortieren","table.headerMenu.clearSort":"Sortierung entfernen","table.headerMenu.configureSort":"Sortierung konfigurieren...","table.headerMenu.group":"Nach dieser Spalte gruppieren","table.headerMenu.ungroup":"Aus Gruppierung entfernen","table.headerMenu.addSummary":"In Summe einbeziehen","table.headerMenu.removeSummary":"Aus Summe entfernen","table.headerMenu.hideColumn":"Spalte ausblenden","table.sortDialog.title":"Sortiereinstellungen","table.sortDialog.empty":"Keine Sortierregeln. F\xFCgen Sie eine hinzu, um zu sortieren.","table.sortDialog.addRule":"Regel hinzuf\xFCgen","table.sortDialog.clearAll":"Alle l\xF6schen","table.sortDialog.asc":"Aufsteigend","table.sortDialog.desc":"Absteigend","pivot.title.default":"Pivot-Tabelle","pivot.subtitle.default":"Ziehen Sie Felder, um die Pivot-Tabelle zu konfigurieren.","pivot.empty":"Ziehen Sie mindestens ein Wertefeld, um das Ergebnis anzuzeigen.","pivot.records":"Datens\xE4tze","pivot.afterFilter":"Nach Filter","pivot.grandTotal":"Gesamtsumme","pivot.resultLabel":"Ergebnis","pivot.valueLabel":"Wert","pivot.table.dimensions":"Dimensionen","pivot.config.title":"Konfiguration","pivot.fieldList":"Feldliste","pivot.availableDimensions":"Verf\xFCgbare Dimensionen","pivot.allFieldsInUse":"Alle Felder sind bereits verwendet.","pivot.zone.rows":"Zeilen","pivot.zone.columns":"Spalten","pivot.zone.filters":"Filter","pivot.zone.values":"Werte","pivot.hint.rows":"Felder hierhin ziehen, um die Zeilenhierarchie zu erstellen","pivot.hint.columns":"Felder hierhin ziehen, um die Spaltenhierarchie zu erstellen","pivot.hint.filters":"Felder hierhin ziehen f\xFCr Berichtsfilter","pivot.hint.values":"Numerische Felder hierhin ziehen f\xFCr Aggregation","pivot.clearArea":"Bereich leeren","pivot.filter.na":"N/V","pivot.filter.noValues":"Keine Werte","pivot.filter.noneSelected":"Nichts ausgew\xE4hlt","pivot.filter.allValues":"Alle Werte","pivot.filter.selectedCount":"{selected} / {total} ausgew\xE4hlt","pivot.filter.selectAll":"Alle ausw\xE4hlen","pivot.filter.deselectAll":"Alle abw\xE4hlen","pivot.filter.noResults":"Keine Ergebnisse","pivot.collapse.ariaExpand":"Konfigurationsbereich erweitern","pivot.collapse.ariaCollapse":"Konfigurationsbereich reduzieren","pivot.agg.sum":"Summe","pivot.agg.count":"Anzahl","pivot.agg.avg":"Durchschnitt","pivot.agg.min":"Min","pivot.agg.max":"Max","pivot.preset.selectPlaceholder":"Preset w\xE4hlen","pivot.preset.save":"Preset speichern","pivot.preset.delete":"Preset l\xF6schen","pivot.preset.saveDialogTitle":"Aktuelles Preset speichern","pivot.preset.nameLabel":"Preset-Name","pivot.preset.defaultName":"Preset {index}","pivot.table.sectionTitle":"Pivot-Ergebnis","pivot.table.expandRowsAll":"Expand rows","pivot.table.collapseRowsAll":"Collapse rows","pivot.table.expandColumnsAll":"Expand columns","pivot.table.collapseColumnsAll":"Collapse columns","pivot.table.collapse.ariaExpand":"Pivot-Ergebnis erweitern","pivot.table.collapse.ariaCollapse":"Pivot-Ergebnis reduzieren","pivot.chart.title":"Pivot-Diagramm","pivot.chart.subtitle":"Eine Dimension und bis zu zwei Kennzahlen in einem kompakten Diagramm abbilden.","pivot.chart.subtitleReady":"{dimension} nach {measure}","pivot.chart.emptyNoDimension":"F\xFCgen Sie mindestens ein Zeilen- oder Spaltenfeld hinzu, um das Diagramm anzuzeigen.","pivot.chart.emptyNoValue":"F\xFCgen Sie mindestens ein Wertefeld hinzu, um das Diagramm anzuzeigen.","pivot.chart.emptyNoData":"F\xFCr die aktuelle Diagrammauswahl sind keine Daten verf\xFCgbar.","pivot.chart.dimension":"Dimension","pivot.chart.primaryMeasure":"Kennzahl","pivot.chart.secondaryMeasure":"Vergleichskennzahl","pivot.chart.chartType":"Diagrammtyp","pivot.chart.style.barVertical":"Vertikale Balken","pivot.chart.style.barHorizontal":"Horizontale Balken","pivot.chart.style.line":"Linie","pivot.chart.style.scatter":"Streudiagramm","pivot.chart.collapse.ariaExpand":"Diagrammbereich erweitern","pivot.chart.collapse.ariaCollapse":"Diagrammbereich reduzieren","smartFilter.adaptFilters":"Filter anpassen","smartFilter.addFilters":"Filter hinzuf\xFCgen","smartFilter.go":"Los","smartFilter.visibleFilters":"Sichtbare Filter","smartFilter.searchPlaceholder":"Suchen...","smartFilter.noOptionsFound":"Keine Optionen gefunden","smartFilter.min":"Min","smartFilter.max":"Max","smartFilter.minMaxPlaceholder":"Min - Max","smartFilter.operator.equals":"Gleich","smartFilter.operator.contains":"Enth\xE4lt","smartFilter.operator.notContains":"Enth\xE4lt nicht","smartFilter.operator.wildcard":"Wildcard-Suche","smartFilter.operator.notEquals":"Ungleich","smartFilter.operator.greaterThan":"Gr\xF6\xDFer als","smartFilter.operator.lessThan":"Kleiner als","smartFilter.operator.greaterOrEqual":"Gr\xF6\xDFer gleich","smartFilter.operator.lessOrEqual":"Kleiner gleich","smartFilter.operator.between":"Zwischen","variant.noOptions":"Keine Optionen","variant.defaultSuffix":"Standard","variant.selectVariant":"Variante w\xE4hlen","variant.saveView":"Ansicht speichern","variant.newVariant":"Neue Variante","variant.viewName":"Ansichtsname","variant.setDefault":"Als Standard setzen","variant.publicAllUsers":"\xD6ffentlich (alle Benutzer)","variant.toast.fetchFailed":"Varianten konnten nicht geladen werden","variant.toast.saveFailed":"Variante konnte nicht gespeichert werden","variant.toast.saveSuccess":"Variante erfolgreich gespeichert","variant.toast.deleteFailed":"Variante konnte nicht gel\xF6scht werden","variant.toast.deleteSuccess":"Variante erfolgreich gel\xF6scht","variant.toast.defaultFailed":"Standardvariante konnte nicht aktualisiert werden","variant.toast.defaultSuccess":"Standardvariante aktualisiert","layout.saveLayout":"Layout speichern","layout.layoutOptions":"Layout-Optionen","layout.selectLayout":"Layout w\xE4hlen","layout.saveCurrentLayout":"Aktuelles Layout speichern...","layout.noSavedLayouts":"Keine gespeicherten Layouts","layout.removeDefault":"Standard entfernen","layout.setAsDefault":"Als Standard setzen","layout.layoutName":"Layoutname","layout.layoutDescription":"Beschreibung","layout.layoutNameHelper":"z. B. Kompaktansicht","layout.warningOverwrite":"Warnung: Vorhandenes Layout wird \xFCberschrieben","layout.useAsDefault":"Als Standardlayout verwenden","layout.publicAllUsers":"\xD6ffentlich (f\xFCr alle sichtbar)","layout.toast.loadFallback":"Layouts konnten nicht vom Backend geladen werden, Wechsel zu lokalem Speicher","layout.toast.saveSuccess":"Layout erfolgreich gespeichert","layout.toast.saveLocalSuccess":"Layout im lokalen Speicher gespeichert","layout.toast.backendUnavailableSavedLocal":"Backend nicht verf\xFCgbar, lokal gespeichert","layout.toast.deleteSuccess":"Layout erfolgreich gel\xF6scht","layout.toast.deleteLocalSuccess":"Layout aus lokalem Speicher gel\xF6scht","layout.toast.backendUnavailableDeletedLocal":"Backend nicht verf\xFCgbar, lokal gel\xF6scht","layout.toast.defaultSuccess":"Standardlayout gesetzt","layout.toast.defaultLocalSuccess":"Standardlayout lokal gesetzt","layout.toast.backendUnavailableDefaultLocal":"Backend nicht verf\xFCgbar, Standard lokal gespeichert","dateRange.label":"Datumsbereich","dateRange.startDate":"Startdatum","dateRange.endDate":"Enddatum","dateRange.select":"Ausw\xE4hlen...","dateRange.today":"Heute","dateRange.thisWeek":"Diese Woche","dateRange.thisMonth":"Diesen Monat","graph.records":"{count} Datens\xE4tze","graph.kpi.totalRecords":"Gesamt Datens\xE4tze","graph.kpi.totalReport":"Gesamt Report","graph.kpi.totalBillable":"Gesamt abrechenbar","graph.kpi.efficiency":"Effizienz","graph.kpi.amount":"Betrag","graph.kpi.flagged":"Markiert","graph.chart.billable.title":"Abrechenbar nach Dimension","graph.chart.billable.subtitle":"Top-Werte nach abrechenbaren Stunden","graph.chart.efficiency.title":"Effizienz pro Person","graph.chart.efficiency.subtitle":"Niedrigste Effizienz zuerst","graph.chart.status.title":"Statusverteilung","graph.chart.status.subtitle":"Anteil je Status","graph.dataBody":"Datentabelle","graph.reportTitle":"Grafikbericht","graph.unassigned":"Nicht zugewiesen","graph.column.reportHours":"Melde-Stunden","graph.column.billableHours":"Abrechenbare Stunden","detail.searchAi.placeholder":"Felder suchen, oder bei keinem Treffer die KI fragen...","detail.searchAi.matches":"{count} Treffer gefunden","detail.searchAi.noMatch":"Kein passendes Feld gefunden.","detail.searchAi.autoAiFallback":"Keine direkte \xDCbereinstimmung. KI-Analyse wird gestartet...","detail.searchAi.aiResultTitle":"KI-Ergebnis","detail.table.title":"Verkn\xFCpfte Eintr\xE4ge","kanban.empty":"Karten hier ablegen","kanban.bucket.limit":"Limit","kanban.bucket.dropHere":"Loslassen, um in diese Spalte zu verschieben","kanban.bucket.add":"Spalte hinzuf\xFCgen","kanban.bucket.rename":"Spalte umbenennen","kanban.bucket.saveRename":"Spaltennamen speichern","kanban.bucket.cancelRename":"Umbenennen abbrechen","kanban.search.placeholder":"Karten und Spalten durchsuchen","kanban.search.clear":"Suche l\xF6schen","kanban.search.results":"{count} passende Karten","kanban.search.noMatch":"Keine passenden Karten","kanban.card.progress":"Fortschritt","kanban.card.openDetail":"Detail \xF6ffnen","kanban.priority.critical":"Kritisch","kanban.priority.high":"Hoch","kanban.priority.medium":"Mittel","kanban.priority.low":"Niedrig","quickCreate.newItem":"Neuer Eintrag","quickCreate.createWithTitle":"{title} erstellen","quickEdit.editWithTitle":"{title} bearbeiten","quickDelete.confirmTitle":"L\xF6schen best\xE4tigen","quickDelete.confirmMessageSingle":"M\xF6chten Sie den ausgew\xE4hlten Datensatz wirklich l\xF6schen?","quickDelete.confirmMessageMultiple":"M\xF6chten Sie die {count} ausgew\xE4hlten Datens\xE4tze wirklich l\xF6schen?","cardPage.viewDetails":"Details anzeigen","cardPage.download":"Herunterladen","cardPage.close":"Schlie\xDFen","cardPage.empty":"Keine Eintr\xE4ge gefunden","messageBox.confirm":"OK","messageBox.cancel":"Abbrechen","omph.status.idle":"Inaktiv","omph.status.pending":"Ausstehend","omph.status.running":"L\xE4uft","omph.status.success":"Erfolgt","omph.status.error":"Fehler","omph.working":"In Arbeit","omph.workingFor":"In Arbeit seit {duration}","omph.loadOlder":"Fr\xFChere Nachrichten laden","omph.loadingOlder":"Fr\xFChere Nachrichten werden geladen\u2026","omph.toBottom":"Nach unten","omph.copy":"Kopieren","omph.copied":"Kopiert","omph.turnActions":"Antwortaktionen","omph.usage":"Nutzung","omph.inputTokens":"Eingabe","omph.outputTokens":"Ausgabe","omph.duration":"Dauer","omph.send":"Senden","omph.stop":"Stoppen","omph.supplement.queued":"Zum laufenden Vorgang hinzugef\xFCgt","omph.turnRail":"Runden","omph.secondUnit":"s","omph.minuteUnit":"min","omph.preview.title":"Dateivorschau","omph.preview.close":"Vorschau schlie\xDFen","omph.preview.back":"Zur\xFCck zur Konversation","omph.preview.expand":"Vorschau vergr\xF6\xDFern","omph.preview.collapse":"Vorschau wiederherstellen","omph.preview.copyContent":"Inhalt kopieren","omph.preview.copyPath":"Pfad kopieren","omph.preview.download":"Herunterladen","omph.preview.openExternal":"Extern \xF6ffnen","omph.preview.wrap":"Zeilenumbruch","omph.preview.loading":"Datei wird geladen","omph.preview.missing":"Datei nicht gefunden","omph.preview.failed":"Datei konnte nicht geladen werden","omph.preview.unsupported":"Keine Vorschau f\xFCr diesen Dateityp","omph.preview.retry":"Erneut versuchen","omph.preview.resize":"Vorschaugr\xF6\xDFe \xE4ndern","omph.preview.line":"Zeile {start}","omph.preview.lines":"Zeilen {start}\u2013{end}","omph.preview.truncated":"Die ersten {shown} von {total} Zeilen werden angezeigt","omph.preview.sheetTruncated":"Die ersten {shown} von {total} Zeilen werden angezeigt","omph.preview.imageFailed":"Bild konnte nicht angezeigt werden","omph.preview.zoomIn":"Vergr\xF6\xDFern","omph.preview.zoomOut":"Verkleinern","omph.preview.zoomFit":"An Breite anpassen","omph.newConversation":"Neue Konversation","omph.conversationList":"Konversationsliste","omph.conversations":"Konversationen","omph.noConversations":"Noch keine Konversationen","omph.initial.suggestions":"Vorgeschlagene Fragen","omph.approval.waiting":"Auf Genehmigung wartend","omph.approval.choose":"Aktion w\xE4hlen","omph.approval.details":"Genehmigungsdetails","omph.approval.choices":"Aktionen","omph.approval.reject":"Ablehnen","omph.approval.allowOnce":"Einmal erlauben","omph.approval.confirm":"Fortfahren","omph.approval.other":"Sonstiges","omph.approval.otherPlaceholder":"Aktion beschreiben","omph.approval.escalation":"Tool {toolName} fordert privilegierte Ausf\xFChrung","omph.approval.recommended":"(Empfohlen)","omph.approval.allowOnceException":"Diese Ausnahme einmal erlauben","omph.approval.allowSession":"Diese Art f\xFCr den Rest der Sitzung erlauben","omph.approval.abandon":"Aufgeben","omph.input.placeholder":"Nachricht eingeben\u2026","omph.input.upload":"Datei hochladen","omph.input.send":"Nachricht senden","omph.input.stop":"Generierung stoppen","omph.input.queue.ask":"Der Agent arbeitet. Jetzt oder nach diesem Zug senden?","omph.input.queue.sendNow":"Jetzt senden","omph.input.queue.afterTurn":"Nach diesem Zug senden","omph.input.queue.queued":"In Warteschlange \u2014 Senden nach diesem Zug","omph.input.queue.cancel":"Abbrechen","omph.input.message":"Nachrichteneingabe","omph.input.tools":"Eingabewerkzeuge","agentui.html.defaultTitle":"Interaktives HTML","agentui.html.open":"\xD6ffnen","agentui.html.preview":"Vorschau","agentui.html.code":"Code","agentui.html.toggle":"Zwischen Code und Vorschau wechseln","agentui.html.copy":"Code kopieren","agentui.html.copied":"Kopiert","agentui.html.download":"Herunterladen","agentui.html.close":"Schlie\xDFen"},Bf={"common.cancel":"\u30AD\u30E3\u30F3\u30BB\u30EB","common.save":"\u4FDD\u5B58","common.ok":"OK","common.done":"\u5B8C\u4E86","common.search":"\u691C\u7D22","common.none":"\u306A\u3057","common.all":"\u3059\u3079\u3066","common.noData":"\u30C7\u30FC\u30BF\u306A\u3057","common.copy":"\u30B3\u30D4\u30FC","common.delete":"\u524A\u9664","common.loading":"\u8AAD\u307F\u8FBC\u307F\u4E2D...","header.searchPlaceholder":"\u4F55\u304B\u805E\u3044\u3066\u304F\u3060\u3055\u3044...","header.searchAddFeature":"\u6A5F\u80FD\u3092\u8FFD\u52A0","header.searchStartVoice":"\u97F3\u58F0\u5165\u529B\u3092\u958B\u59CB","header.searchStopVoice":"\u97F3\u58F0\u5165\u529B\u3092\u505C\u6B62","header.searchOpenPanel":"\u4F1A\u8A71\u3092\u958B\u304F","header.theme.system":"\u30C6\u30FC\u30DE\uFF1A\u30B7\u30B9\u30C6\u30E0","header.theme.dark":"\u30C6\u30FC\u30DE\uFF1A\u30C0\u30FC\u30AF","header.theme.light":"\u30C6\u30FC\u30DE\uFF1A\u30E9\u30A4\u30C8","header.menu.setting":"\u8A2D\u5B9A","header.menu.refresh":"\u518D\u8AAD\u307F\u8FBC\u307F","header.menu.logout":"\u30ED\u30B0\u30A2\u30A6\u30C8","navigation.expand":"\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u3092\u5C55\u958B","navigation.collapse":"\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u3092\u6298\u308A\u305F\u305F\u3080","navigation.searchPlaceholder":"\u30E1\u30CB\u30E5\u30FC\u3092\u691C\u7D22...","navigation.noMatch":"\u4E00\u81F4\u3059\u308B\u30E1\u30CB\u30E5\u30FC\u304C\u3042\u308A\u307E\u305B\u3093","navigation.noAccessibleApp":"\u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u306A\u30A2\u30D7\u30EA\u304C\u3042\u308A\u307E\u305B\u3093","navigation.noItems":"\u8868\u793A\u3067\u304D\u308B\u9805\u76EE\u304C\u3042\u308A\u307E\u305B\u3093","navigation.expandView":"{title} \u3092\u5C55\u958B","navigation.mode.switchToFixed":"\u56FA\u5B9A\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u306B\u5207\u308A\u66FF\u3048","navigation.mode.switchToFloating":"\u30D5\u30ED\u30FC\u30C6\u30A3\u30F3\u30B0\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u306B\u5207\u308A\u66FF\u3048","navigation.pinned":"\u30D4\u30F3\u7559\u3081","navigation.pin.add":"\u4E0A\u90E8\u306B\u30D4\u30F3\u7559\u3081","navigation.pin.remove":"\u30D4\u30F3\u7559\u3081\u3092\u89E3\u9664","table.toolbar.searchPlaceholder":"\u691C\u7D22...","table.title.default":"\u30C7\u30FC\u30BF\u30C6\u30FC\u30D6\u30EB","table.toolbar.groupBy":"\u30B0\u30EB\u30FC\u30D7\u5316","table.toolbar.summary":"\u96C6\u8A08","table.toolbar.columns":"\u5217","table.toolbar.export":"\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8","table.toolbar.itemsPerPage":"1\u30DA\u30FC\u30B8\u306E\u4EF6\u6570\uFF1A","table.toolbar.pageOf":"{current} / {total} \u30DA\u30FC\u30B8","table.toolbar.newItem":"\u65B0\u898F\u4F5C\u6210","table.toolbar.editItem":"\u7DE8\u96C6","table.toolbar.deleteItem":"\u524A\u9664","table.toolbar.graphicReport":"\u30B0\u30E9\u30D5\u30A3\u30C3\u30AF\u30EC\u30DD\u30FC\u30C8","table.toolbar.saveLayout":"\u30EC\u30A4\u30A2\u30A6\u30C8\u4FDD\u5B58","table.menu.groupBy":"\u30B0\u30EB\u30FC\u30D7\u5316","table.menu.clearAll":"\u3059\u3079\u3066\u30AF\u30EA\u30A2","table.menu.visibleColumns":"\u8868\u793A\u5217","table.menu.showSummaryRow":"\u96C6\u8A08\u884C\u3092\u8868\u793A","table.menu.noNumericColumns":"\u6570\u5024\u5217\u304C\u3042\u308A\u307E\u305B\u3093","table.group.expandAll":"\u3059\u3079\u3066\u306E\u30B0\u30EB\u30FC\u30D7\u3092\u5C55\u958B","table.group.collapseAll":"\u3059\u3079\u3066\u306E\u30B0\u30EB\u30FC\u30D7\u3092\u6298\u308A\u305F\u305F\u3080","table.mobile.notImplemented":"\u30E2\u30D0\u30A4\u30EB\u8868\u793A\u306F\u672A\u5B9F\u88C5\u3067\u3059","table.headerMenu.sortAsc":"\u6607\u9806\u3067\u4E26\u3079\u66FF\u3048","table.headerMenu.sortDesc":"\u964D\u9806\u3067\u4E26\u3079\u66FF\u3048","table.headerMenu.clearSort":"\u4E26\u3079\u66FF\u3048\u3092\u89E3\u9664","table.headerMenu.configureSort":"\u4E26\u3079\u66FF\u3048\u3092\u8A2D\u5B9A...","table.headerMenu.group":"\u3053\u306E\u5217\u3067\u30B0\u30EB\u30FC\u30D7\u5316","table.headerMenu.ungroup":"\u30B0\u30EB\u30FC\u30D7\u304B\u3089\u5916\u3059","table.headerMenu.addSummary":"\u96C6\u8A08\u306B\u8FFD\u52A0","table.headerMenu.removeSummary":"\u96C6\u8A08\u304B\u3089\u524A\u9664","table.headerMenu.hideColumn":"\u5217\u3092\u975E\u8868\u793A","table.sortDialog.title":"\u4E26\u3079\u66FF\u3048\u8A2D\u5B9A","table.sortDialog.empty":"\u4E26\u3079\u66FF\u3048\u30EB\u30FC\u30EB\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002","table.sortDialog.addRule":"\u30EB\u30FC\u30EB\u3092\u8FFD\u52A0","table.sortDialog.clearAll":"\u3059\u3079\u3066\u30AF\u30EA\u30A2","table.sortDialog.asc":"\u6607\u9806","table.sortDialog.desc":"\u964D\u9806","pivot.title.default":"\u30D4\u30DC\u30C3\u30C8\u30C6\u30FC\u30D6\u30EB","pivot.subtitle.default":"\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u30D4\u30DC\u30C3\u30C8\u30C6\u30FC\u30D6\u30EB\u3092\u8A2D\u5B9A\u3057\u307E\u3059\u3002","pivot.empty":"\u7D50\u679C\u3092\u8868\u793A\u3059\u308B\u306B\u306F\u3001\u5024\u30A8\u30EA\u30A2\u306B\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002","pivot.records":"\u30EC\u30B3\u30FC\u30C9","pivot.afterFilter":"\u30D5\u30A3\u30EB\u30BF\u30FC\u5F8C","pivot.grandTotal":"\u7DCF\u8A08","pivot.resultLabel":"\u7D50\u679C","pivot.valueLabel":"\u5024","pivot.table.dimensions":"\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3","pivot.config.title":"\u8A2D\u5B9A","pivot.fieldList":"\u30D5\u30A3\u30FC\u30EB\u30C9\u4E00\u89A7","pivot.availableDimensions":"\u5229\u7528\u53EF\u80FD\u306A\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3","pivot.allFieldsInUse":"\u3059\u3079\u3066\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u304C\u4F7F\u7528\u4E2D\u3067\u3059\u3002","pivot.zone.rows":"\u884C","pivot.zone.columns":"\u5217","pivot.zone.filters":"\u30D5\u30A3\u30EB\u30BF\u30FC","pivot.zone.values":"\u5024","pivot.hint.rows":"\u3053\u3053\u306B\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u884C\u968E\u5C64\u3092\u4F5C\u6210","pivot.hint.columns":"\u3053\u3053\u306B\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u5217\u968E\u5C64\u3092\u4F5C\u6210","pivot.hint.filters":"\u3053\u3053\u306B\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u30EC\u30DD\u30FC\u30C8\u30D5\u30A3\u30EB\u30BF\u30FC\u3092\u8A2D\u5B9A","pivot.hint.values":"\u3053\u3053\u306B\u6570\u5024\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u96C6\u8A08","pivot.clearArea":"\u30A8\u30EA\u30A2\u3092\u30AF\u30EA\u30A2","pivot.filter.na":"N/A","pivot.filter.noValues":"\u5024\u304C\u3042\u308A\u307E\u305B\u3093","pivot.filter.noneSelected":"\u672A\u9078\u629E","pivot.filter.allValues":"\u3059\u3079\u3066\u306E\u5024","pivot.filter.selectedCount":"{selected} / {total} \u3092\u9078\u629E","pivot.filter.selectAll":"\u3059\u3079\u3066\u9078\u629E","pivot.filter.deselectAll":"\u3059\u3079\u3066\u89E3\u9664","pivot.filter.noResults":"\u7D50\u679C\u304C\u3042\u308A\u307E\u305B\u3093","pivot.collapse.ariaExpand":"\u8A2D\u5B9A\u30A8\u30EA\u30A2\u3092\u5C55\u958B","pivot.collapse.ariaCollapse":"\u8A2D\u5B9A\u30A8\u30EA\u30A2\u3092\u6298\u308A\u305F\u305F\u3080","pivot.agg.sum":"\u5408\u8A08","pivot.agg.count":"\u4EF6\u6570","pivot.agg.avg":"\u5E73\u5747","pivot.agg.min":"\u6700\u5C0F","pivot.agg.max":"\u6700\u5927","pivot.preset.selectPlaceholder":"\u30D7\u30EA\u30BB\u30C3\u30C8\u3092\u9078\u629E","pivot.preset.save":"\u30D7\u30EA\u30BB\u30C3\u30C8\u3092\u4FDD\u5B58","pivot.preset.delete":"\u30D7\u30EA\u30BB\u30C3\u30C8\u3092\u524A\u9664","pivot.preset.saveDialogTitle":"\u73FE\u5728\u306E\u30D7\u30EA\u30BB\u30C3\u30C8\u3092\u4FDD\u5B58","pivot.preset.nameLabel":"\u30D7\u30EA\u30BB\u30C3\u30C8\u540D","pivot.preset.defaultName":"\u30D7\u30EA\u30BB\u30C3\u30C8 {index}","pivot.table.sectionTitle":"\u30D4\u30DC\u30C3\u30C8\u7D50\u679C","pivot.table.expandRowsAll":"Expand rows","pivot.table.collapseRowsAll":"Collapse rows","pivot.table.expandColumnsAll":"Expand columns","pivot.table.collapseColumnsAll":"Collapse columns","pivot.table.collapse.ariaExpand":"\u30D4\u30DC\u30C3\u30C8\u7D50\u679C\u3092\u5C55\u958B","pivot.table.collapse.ariaCollapse":"\u30D4\u30DC\u30C3\u30C8\u7D50\u679C\u3092\u6298\u308A\u305F\u305F\u3080","pivot.chart.title":"\u30D4\u30DC\u30C3\u30C8\u30C1\u30E3\u30FC\u30C8","pivot.chart.subtitle":"1\u3064\u306E\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3\u3068\u6700\u59272\u3064\u306E\u6307\u6A19\u3092\u30B3\u30F3\u30D1\u30AF\u30C8\u306A\u30C1\u30E3\u30FC\u30C8\u306B\u307E\u3068\u3081\u307E\u3059\u3002","pivot.chart.subtitleReady":"{dimension} \u3054\u3068\u306E {measure}","pivot.chart.emptyNoDimension":"\u30C1\u30E3\u30FC\u30C8\u3092\u8868\u793A\u3059\u308B\u306B\u306F\u3001\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u884C\u307E\u305F\u306F\u5217\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002","pivot.chart.emptyNoValue":"\u30C1\u30E3\u30FC\u30C8\u3092\u8868\u793A\u3059\u308B\u306B\u306F\u3001\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u5024\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002","pivot.chart.emptyNoData":"\u73FE\u5728\u306E\u30C1\u30E3\u30FC\u30C8\u9078\u629E\u3067\u306F\u8868\u793A\u3067\u304D\u308B\u30C7\u30FC\u30BF\u304C\u3042\u308A\u307E\u305B\u3093\u3002","pivot.chart.dimension":"\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3","pivot.chart.primaryMeasure":"\u6307\u6A19","pivot.chart.secondaryMeasure":"\u6BD4\u8F03\u6307\u6A19","pivot.chart.chartType":"\u30C1\u30E3\u30FC\u30C8\u7A2E\u5225","pivot.chart.style.barVertical":"\u7E26\u68D2\u30B0\u30E9\u30D5","pivot.chart.style.barHorizontal":"\u6A2A\u68D2\u30B0\u30E9\u30D5","pivot.chart.style.line":"\u6298\u308C\u7DDA\u30B0\u30E9\u30D5","pivot.chart.style.scatter":"\u6563\u5E03\u56F3","pivot.chart.collapse.ariaExpand":"\u30C1\u30E3\u30FC\u30C8\u9818\u57DF\u3092\u5C55\u958B","pivot.chart.collapse.ariaCollapse":"\u30C1\u30E3\u30FC\u30C8\u9818\u57DF\u3092\u6298\u308A\u305F\u305F\u3080","smartFilter.adaptFilters":"\u30D5\u30A3\u30EB\u30BF\u30FC\u8ABF\u6574","smartFilter.addFilters":"\u30D5\u30A3\u30EB\u30BF\u30FC\u8FFD\u52A0","smartFilter.go":"\u5B9F\u884C","smartFilter.visibleFilters":"\u8868\u793A\u30D5\u30A3\u30EB\u30BF\u30FC","smartFilter.searchPlaceholder":"\u691C\u7D22...","smartFilter.noOptionsFound":"\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093","smartFilter.min":"\u6700\u5C0F","smartFilter.max":"\u6700\u5927","smartFilter.minMaxPlaceholder":"\u6700\u5C0F - \u6700\u5927","smartFilter.operator.equals":"\u7B49\u3057\u3044","smartFilter.operator.contains":"\u542B\u3080","smartFilter.operator.notContains":"\u542B\u307E\u306A\u3044","smartFilter.operator.wildcard":"\u30EF\u30A4\u30EB\u30C9\u30AB\u30FC\u30C9\u691C\u7D22","smartFilter.operator.notEquals":"\u7B49\u3057\u304F\u306A\u3044","smartFilter.operator.greaterThan":"\u3088\u308A\u5927\u304D\u3044","smartFilter.operator.lessThan":"\u3088\u308A\u5C0F\u3055\u3044","smartFilter.operator.greaterOrEqual":"\u4EE5\u4E0A","smartFilter.operator.lessOrEqual":"\u4EE5\u4E0B","smartFilter.operator.between":"\u7BC4\u56F2","variant.noOptions":"\u30AA\u30D7\u30B7\u30E7\u30F3\u306A\u3057","variant.defaultSuffix":"\u30C7\u30D5\u30A9\u30EB\u30C8","variant.selectVariant":"\u30D3\u30E5\u30FC\u3092\u9078\u629E","variant.saveView":"\u30D3\u30E5\u30FC\u4FDD\u5B58","variant.newVariant":"\u65B0\u3057\u3044\u30D3\u30E5\u30FC","variant.viewName":"\u30D3\u30E5\u30FC\u540D","variant.setDefault":"\u30C7\u30D5\u30A9\u30EB\u30C8\u306B\u8A2D\u5B9A","variant.publicAllUsers":"\u516C\u958B\uFF08\u5168\u30E6\u30FC\u30B6\u30FC\uFF09","variant.toast.fetchFailed":"\u30D3\u30E5\u30FC\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F","variant.toast.saveFailed":"\u30D3\u30E5\u30FC\u306E\u4FDD\u5B58\u306B\u5931\u6557\u3057\u307E\u3057\u305F","variant.toast.saveSuccess":"\u30D3\u30E5\u30FC\u3092\u4FDD\u5B58\u3057\u307E\u3057\u305F","variant.toast.deleteFailed":"\u30D3\u30E5\u30FC\u306E\u524A\u9664\u306B\u5931\u6557\u3057\u307E\u3057\u305F","variant.toast.deleteSuccess":"\u30D3\u30E5\u30FC\u3092\u524A\u9664\u3057\u307E\u3057\u305F","variant.toast.defaultFailed":"\u30C7\u30D5\u30A9\u30EB\u30C8\u30D3\u30E5\u30FC\u306E\u66F4\u65B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F","variant.toast.defaultSuccess":"\u30C7\u30D5\u30A9\u30EB\u30C8\u30D3\u30E5\u30FC\u3092\u66F4\u65B0\u3057\u307E\u3057\u305F","layout.saveLayout":"\u30EC\u30A4\u30A2\u30A6\u30C8\u4FDD\u5B58","layout.layoutOptions":"\u30EC\u30A4\u30A2\u30A6\u30C8\u30AA\u30D7\u30B7\u30E7\u30F3","layout.selectLayout":"\u30EC\u30A4\u30A2\u30A6\u30C8\u9078\u629E","layout.saveCurrentLayout":"\u73FE\u5728\u306E\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u4FDD\u5B58...","layout.noSavedLayouts":"\u4FDD\u5B58\u6E08\u307F\u30EC\u30A4\u30A2\u30A6\u30C8\u306A\u3057","layout.removeDefault":"\u30C7\u30D5\u30A9\u30EB\u30C8\u89E3\u9664","layout.setAsDefault":"\u30C7\u30D5\u30A9\u30EB\u30C8\u306B\u8A2D\u5B9A","layout.layoutName":"\u30EC\u30A4\u30A2\u30A6\u30C8\u540D","layout.layoutDescription":"\u8AAC\u660E","layout.layoutNameHelper":"\u4F8B\uFF1A\u30B3\u30F3\u30D1\u30AF\u30C8\u8868\u793A","layout.warningOverwrite":"\u8B66\u544A\uFF1A\u65E2\u5B58\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u4E0A\u66F8\u304D\u3057\u307E\u3059","layout.useAsDefault":"\u30C7\u30D5\u30A9\u30EB\u30C8\u30EC\u30A4\u30A2\u30A6\u30C8\u3068\u3057\u3066\u4F7F\u7528","layout.publicAllUsers":"\u516C\u958B\uFF08\u5168\u30E6\u30FC\u30B6\u30FC\u306B\u8868\u793A\uFF09","layout.toast.loadFallback":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9\u304B\u3089\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u3001\u30ED\u30FC\u30AB\u30EB\u4FDD\u5B58\u306B\u5207\u308A\u66FF\u3048\u307E\u3057\u305F","layout.toast.saveSuccess":"\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u4FDD\u5B58\u3057\u307E\u3057\u305F","layout.toast.saveLocalSuccess":"\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u30ED\u30FC\u30AB\u30EB\u4FDD\u5B58\u3057\u307E\u3057\u305F","layout.toast.backendUnavailableSavedLocal":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9\u672A\u63A5\u7D9A\u306E\u305F\u3081\u30ED\u30FC\u30AB\u30EB\u306B\u4FDD\u5B58\u3057\u307E\u3057\u305F","layout.toast.deleteSuccess":"\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u524A\u9664\u3057\u307E\u3057\u305F","layout.toast.deleteLocalSuccess":"\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u30ED\u30FC\u30AB\u30EB\u304B\u3089\u524A\u9664\u3057\u307E\u3057\u305F","layout.toast.backendUnavailableDeletedLocal":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9\u672A\u63A5\u7D9A\u306E\u305F\u3081\u30ED\u30FC\u30AB\u30EB\u304B\u3089\u524A\u9664\u3057\u307E\u3057\u305F","layout.toast.defaultSuccess":"\u30C7\u30D5\u30A9\u30EB\u30C8\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u8A2D\u5B9A\u3057\u307E\u3057\u305F","layout.toast.defaultLocalSuccess":"\u30C7\u30D5\u30A9\u30EB\u30C8\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u30ED\u30FC\u30AB\u30EB\u306B\u8A2D\u5B9A\u3057\u307E\u3057\u305F","layout.toast.backendUnavailableDefaultLocal":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9\u672A\u63A5\u7D9A\u306E\u305F\u3081\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u30ED\u30FC\u30AB\u30EB\u4FDD\u5B58\u3057\u307E\u3057\u305F","dateRange.label":"\u65E5\u4ED8\u7BC4\u56F2","dateRange.startDate":"\u958B\u59CB\u65E5","dateRange.endDate":"\u7D42\u4E86\u65E5","dateRange.select":"\u9078\u629E...","dateRange.today":"\u4ECA\u65E5","dateRange.thisWeek":"\u4ECA\u9031","dateRange.thisMonth":"\u4ECA\u6708","graph.records":"{count} \u4EF6","graph.kpi.totalRecords":"\u7DCF\u30EC\u30B3\u30FC\u30C9","graph.kpi.totalReport":"\u7DCF\u5831\u544A\u6642\u9593","graph.kpi.totalBillable":"\u7DCF\u8ACB\u6C42\u53EF\u80FD\u6642\u9593","graph.kpi.efficiency":"\u52B9\u7387","graph.kpi.amount":"\u91D1\u984D","graph.kpi.flagged":"\u8981\u78BA\u8A8D","graph.chart.billable.title":"\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3\u5225\u8ACB\u6C42\u53EF\u80FD\u6642\u9593","graph.chart.billable.subtitle":"\u8ACB\u6C42\u53EF\u80FD\u6642\u9593\u306E\u4E0A\u4F4D","graph.chart.efficiency.title":"\u62C5\u5F53\u8005\u5225\u52B9\u7387","graph.chart.efficiency.subtitle":"\u52B9\u7387\u306E\u4F4E\u3044\u9806","graph.chart.status.title":"\u30B9\u30C6\u30FC\u30BF\u30B9\u5206\u5E03","graph.chart.status.subtitle":"\u30B9\u30C6\u30FC\u30BF\u30B9\u5225\u6BD4\u7387","graph.dataBody":"\u30C7\u30FC\u30BF\u672C\u4F53","graph.reportTitle":"\u30B0\u30E9\u30D5\u30A3\u30C3\u30AF\u30EC\u30DD\u30FC\u30C8","graph.unassigned":"\u672A\u5272\u308A\u5F53\u3066","graph.column.reportHours":"\u5831\u544A\u6642\u9593","graph.column.billableHours":"\u8ACB\u6C42\u53EF\u80FD\u6642\u9593","detail.searchAi.placeholder":"\u9805\u76EE\u3092\u691C\u7D22\u3002\u898B\u3064\u304B\u3089\u306A\u3044\u5834\u5408\u306FAI\u306B\u8CEA\u554F\u3057\u307E\u3059...","detail.searchAi.matches":"{count} \u4EF6\u306E\u4E00\u81F4","detail.searchAi.noMatch":"\u4E00\u81F4\u3059\u308B\u9805\u76EE\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002","detail.searchAi.autoAiFallback":"\u4E00\u81F4\u306A\u3057\u3002AI\u5206\u6790\u3092\u5B9F\u884C\u3057\u307E\u3059...","detail.searchAi.aiResultTitle":"AI\u5206\u6790\u7D50\u679C","detail.table.title":"\u95A2\u9023\u30EC\u30B3\u30FC\u30C9","kanban.empty":"\u3053\u3053\u306B\u30AB\u30FC\u30C9\u3092\u30C9\u30ED\u30C3\u30D7","kanban.bucket.limit":"\u4E0A\u9650","kanban.bucket.dropHere":"\u96E2\u3059\u3068\u3053\u306E bucket \u306B\u79FB\u52D5\u3057\u307E\u3059","kanban.bucket.add":"bucket \u3092\u8FFD\u52A0","kanban.bucket.rename":"bucket \u540D\u3092\u5909\u66F4","kanban.bucket.saveRename":"bucket \u540D\u3092\u4FDD\u5B58","kanban.bucket.cancelRename":"\u540D\u524D\u5909\u66F4\u3092\u30AD\u30E3\u30F3\u30BB\u30EB","kanban.search.placeholder":"\u30AB\u30FC\u30C9\u3068 bucket \u3092\u691C\u7D22","kanban.search.clear":"\u691C\u7D22\u3092\u30AF\u30EA\u30A2","kanban.search.results":"{count} \u4EF6\u306E\u30AB\u30FC\u30C9\u304C\u4E00\u81F4","kanban.search.noMatch":"\u4E00\u81F4\u3059\u308B\u30AB\u30FC\u30C9\u306F\u3042\u308A\u307E\u305B\u3093","kanban.card.progress":"\u9032\u6357","kanban.card.openDetail":"\u8A73\u7D30\u3092\u958B\u304F","kanban.priority.critical":"\u7DCA\u6025","kanban.priority.high":"\u9AD8","kanban.priority.medium":"\u4E2D","kanban.priority.low":"\u4F4E","quickCreate.newItem":"\u65B0\u898F\u4F5C\u6210","quickCreate.createWithTitle":"{title} \u3092\u4F5C\u6210","quickEdit.editWithTitle":"{title} \u3092\u7DE8\u96C6","quickDelete.confirmTitle":"\u524A\u9664\u306E\u78BA\u8A8D","quickDelete.confirmMessageSingle":"\u9078\u629E\u3057\u305F\u30EC\u30B3\u30FC\u30C9\u3092\u524A\u9664\u3057\u3066\u3082\u3088\u308D\u3057\u3044\u3067\u3059\u304B\uFF1F","quickDelete.confirmMessageMultiple":"\u9078\u629E\u3057\u305F {count} \u4EF6\u306E\u30EC\u30B3\u30FC\u30C9\u3092\u524A\u9664\u3057\u3066\u3082\u3088\u308D\u3057\u3044\u3067\u3059\u304B\uFF1F","cardPage.viewDetails":"\u8A73\u7D30\u3092\u8868\u793A","cardPage.download":"\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9","cardPage.close":"\u9589\u3058\u308B","cardPage.empty":"\u9805\u76EE\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093","messageBox.confirm":"OK","messageBox.cancel":"\u30AD\u30E3\u30F3\u30BB\u30EB","omph.status.idle":"\u5F85\u6A5F\u4E2D","omph.status.pending":"\u51E6\u7406\u5F85\u3061","omph.status.running":"\u51E6\u7406\u4E2D","omph.status.success":"\u5B8C\u4E86","omph.status.error":"\u30A8\u30E9\u30FC","omph.working":"\u51E6\u7406\u4E2D","omph.workingFor":"\u51E6\u7406\u4E2D\uFF08{duration} \u7D4C\u904E\uFF09","omph.loadOlder":"\u904E\u53BB\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8AAD\u307F\u8FBC\u3080","omph.loadingOlder":"\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026","omph.toBottom":"\u4E00\u756A\u4E0B\u3078","omph.copy":"\u30B3\u30D4\u30FC","omph.copied":"\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F","omph.turnActions":"\u8FD4\u4FE1\u30A2\u30AF\u30B7\u30E7\u30F3","omph.usage":"\u4F7F\u7528\u91CF","omph.inputTokens":"\u5165\u529B","omph.outputTokens":"\u51FA\u529B","omph.duration":"\u6240\u8981\u6642\u9593","omph.send":"\u9001\u4FE1","omph.stop":"\u505C\u6B62","omph.supplement.queued":"\u5B9F\u884C\u4E2D\u306E\u30BF\u30B9\u30AF\u306B\u8FFD\u52A0\u3057\u307E\u3057\u305F","omph.turnRail":"\u30BF\u30FC\u30F3","omph.secondUnit":"\u79D2","omph.minuteUnit":"\u5206","omph.preview.title":"\u30D5\u30A1\u30A4\u30EB\u30D7\u30EC\u30D3\u30E5\u30FC","omph.preview.close":"\u30D7\u30EC\u30D3\u30E5\u30FC\u3092\u9589\u3058\u308B","omph.preview.back":"\u4F1A\u8A71\u306B\u623B\u308B","omph.preview.expand":"\u30D7\u30EC\u30D3\u30E5\u30FC\u3092\u62E1\u5927","omph.preview.collapse":"\u30D7\u30EC\u30D3\u30E5\u30FC\u306E\u30B5\u30A4\u30BA\u3092\u623B\u3059","omph.preview.copyContent":"\u5185\u5BB9\u3092\u30B3\u30D4\u30FC","omph.preview.copyPath":"\u30D1\u30B9\u3092\u30B3\u30D4\u30FC","omph.preview.download":"\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9","omph.preview.openExternal":"\u5916\u90E8\u3067\u958B\u304F","omph.preview.wrap":"\u6298\u308A\u8FD4\u3057","omph.preview.loading":"\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D","omph.preview.missing":"\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093","omph.preview.failed":"\u3053\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F","omph.preview.unsupported":"\u3053\u306E\u30D5\u30A1\u30A4\u30EB\u5F62\u5F0F\u306F\u30D7\u30EC\u30D3\u30E5\u30FC\u3067\u304D\u307E\u305B\u3093","omph.preview.retry":"\u518D\u8A66\u884C","omph.preview.resize":"\u30D7\u30EC\u30D3\u30E5\u30FC\u30B5\u30A4\u30BA\u306E\u5909\u66F4","omph.preview.line":"{start} \u884C\u76EE","omph.preview.lines":"{start}\u2013{end} \u884C","omph.preview.truncated":"\u5168 {total} \u884C\u4E2D\u5148\u982D {shown} \u884C\u3092\u8868\u793A","omph.preview.sheetTruncated":"\u5168 {total} \u884C\u4E2D\u5148\u982D {shown} \u884C\u3092\u8868\u793A","omph.preview.imageFailed":"\u753B\u50CF\u3092\u8868\u793A\u3067\u304D\u307E\u305B\u3093","omph.preview.zoomIn":"\u62E1\u5927","omph.preview.zoomOut":"\u7E2E\u5C0F","omph.preview.zoomFit":"\u5E45\u306B\u5408\u308F\u305B\u308B","omph.newConversation":"\u65B0\u3057\u3044\u4F1A\u8A71","omph.conversationList":"\u4F1A\u8A71\u30EA\u30B9\u30C8","omph.conversations":"\u4F1A\u8A71","omph.noConversations":"\u4F1A\u8A71\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093","omph.initial.suggestions":"\u5019\u88DC\u306E\u8CEA\u554F","omph.approval.waiting":"\u627F\u8A8D\u5F85\u3061","omph.approval.choose":"\u64CD\u4F5C\u3092\u9078\u629E","omph.approval.details":"\u627F\u8A8D\u306E\u8A73\u7D30","omph.approval.choices":"\u64CD\u4F5C","omph.approval.reject":"\u62D2\u5426","omph.approval.allowOnce":"\u4ECA\u56DE\u306E\u307F\u8A31\u53EF","omph.approval.confirm":"\u7D9A\u884C","omph.approval.other":"\u305D\u306E\u4ED6","omph.approval.otherPlaceholder":"\u5B9F\u884C\u3059\u308B\u64CD\u4F5C\u3092\u5165\u529B","omph.approval.escalation":"\u30C4\u30FC\u30EB {toolName} \u304C\u7279\u6A29\u5B9F\u884C\u3092\u8981\u6C42\u3057\u3066\u3044\u307E\u3059","omph.approval.recommended":"\uFF08\u63A8\u5968\uFF09","omph.approval.allowOnceException":"\u4ECA\u56DE\u306E\u307F\u4F8B\u5916\u3092\u8A31\u53EF","omph.approval.allowSession":"\u3053\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u3067\u306F\u540C\u7A2E\u3092\u8A31\u53EF","omph.approval.abandon":"\u653E\u68C4","omph.input.placeholder":"\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u5165\u529B\u2026","omph.input.upload":"\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9","omph.input.send":"\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u9001\u4FE1","omph.input.stop":"\u751F\u6210\u3092\u505C\u6B62","omph.input.queue.ask":"\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u304C\u5B9F\u884C\u4E2D\u3067\u3059\u3002\u4ECA\u3059\u3050\u9001\u4FE1\u3057\u307E\u3059\u304B\u3001\u3053\u306E\u30BF\u30FC\u30F3\u306E\u5F8C\u306B\u9001\u4FE1\u3057\u307E\u3059\u304B\uFF1F","omph.input.queue.sendNow":"\u4ECA\u3059\u3050\u9001\u4FE1","omph.input.queue.afterTurn":"\u3053\u306E\u30BF\u30FC\u30F3\u306E\u5F8C\u306B\u9001\u4FE1","omph.input.queue.queued":"\u5F85\u6A5F\u4E2D \u2014 \u3053\u306E\u30BF\u30FC\u30F3\u306E\u5F8C\u306B\u81EA\u52D5\u9001\u4FE1","omph.input.queue.cancel":"\u30AD\u30E3\u30F3\u30BB\u30EB","omph.input.message":"\u30E1\u30C3\u30BB\u30FC\u30B8\u5165\u529B","omph.input.tools":"\u5165\u529B\u30C4\u30FC\u30EB","agentui.html.defaultTitle":"\u30A4\u30F3\u30BF\u30E9\u30AF\u30C6\u30A3\u30D6 HTML","agentui.html.open":"\u958B\u304F","agentui.html.preview":"\u30D7\u30EC\u30D3\u30E5\u30FC","agentui.html.code":"\u30B3\u30FC\u30C9","agentui.html.toggle":"\u30B3\u30FC\u30C9\u3068\u30D7\u30EC\u30D3\u30E5\u30FC\u3092\u5207\u308A\u66FF\u3048\u308B","agentui.html.copy":"\u30B3\u30FC\u30C9\u3092\u30B3\u30D4\u30FC","agentui.html.copied":"\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F","agentui.html.download":"\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9","agentui.html.close":"\u9589\u3058\u308B"},Hf={"common.cancel":"\uCDE8\uC18C","common.save":"\uC800\uC7A5","common.ok":"\uD655\uC778","common.done":"\uC644\uB8CC","common.search":"\uAC80\uC0C9","common.none":"\uC5C6\uC74C","common.all":"\uC804\uCCB4","common.noData":"\uB370\uC774\uD130 \uC5C6\uC74C","common.copy":"\uBCF5\uC0AC","common.delete":"\uC0AD\uC81C","common.loading":"\uB85C\uB529 \uC911...","header.searchPlaceholder":"\uBB34\uC5C7\uC774\uB4E0 \uBB3C\uC5B4\uBCF4\uC138\uC694...","header.searchAddFeature":"\uAE30\uB2A5 \uCD94\uAC00","header.searchStartVoice":"\uC74C\uC131 \uC785\uB825 \uC2DC\uC791","header.searchStopVoice":"\uC74C\uC131 \uC785\uB825 \uC911\uC9C0","header.searchOpenPanel":"\uB300\uD654 \uC5F4\uAE30","header.theme.system":"\uD14C\uB9C8: \uC2DC\uC2A4\uD15C","header.theme.dark":"\uD14C\uB9C8: \uB2E4\uD06C","header.theme.light":"\uD14C\uB9C8: \uB77C\uC774\uD2B8","header.menu.setting":"\uC124\uC815","header.menu.refresh":"\uC0C8\uB85C \uACE0\uCE68","header.menu.logout":"\uB85C\uADF8\uC544\uC6C3","navigation.expand":"\uD0D0\uC0C9 \uD3BC\uCE58\uAE30","navigation.collapse":"\uD0D0\uC0C9 \uC811\uAE30","navigation.searchPlaceholder":"\uBA54\uB274 \uAC80\uC0C9...","navigation.noMatch":"\uC77C\uCE58\uD558\uB294 \uBA54\uB274\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4","navigation.noAccessibleApp":"\uC811\uADFC \uAC00\uB2A5\uD55C \uC571\uC774 \uC5C6\uC2B5\uB2C8\uB2E4","navigation.noItems":"\uD45C\uC2DC\uD560 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4","navigation.expandView":"{title} \uD3BC\uCE58\uAE30","navigation.mode.switchToFixed":"\uACE0\uC815 \uD0D0\uC0C9\uC73C\uB85C \uC804\uD658","navigation.mode.switchToFloating":"\uD50C\uB85C\uD305 \uD0D0\uC0C9\uC73C\uB85C \uC804\uD658","navigation.pinned":"\uACE0\uC815\uB428","navigation.pin.add":"\uC0C1\uB2E8\uC5D0 \uACE0\uC815","navigation.pin.remove":"\uACE0\uC815 \uD574\uC81C","table.toolbar.searchPlaceholder":"\uAC80\uC0C9...","table.title.default":"\uB370\uC774\uD130 \uD14C\uC774\uBE14","table.toolbar.groupBy":"\uADF8\uB8F9","table.toolbar.summary":"\uC694\uC57D","table.toolbar.columns":"\uC5F4","table.toolbar.export":"\uB0B4\uBCF4\uB0B4\uAE30","table.toolbar.itemsPerPage":"\uD398\uC774\uC9C0\uB2F9 \uD589 \uC218:","table.toolbar.pageOf":"{current} / {total} \uD398\uC774\uC9C0","table.toolbar.newItem":"\uC2E0\uADDC \uD56D\uBAA9","table.toolbar.editItem":"\uD56D\uBAA9 \uC218\uC815","table.toolbar.deleteItem":"\uD56D\uBAA9 \uC0AD\uC81C","table.toolbar.graphicReport":"\uADF8\uB798\uD504 \uB9AC\uD3EC\uD2B8","table.toolbar.saveLayout":"\uB808\uC774\uC544\uC6C3 \uC800\uC7A5","table.menu.groupBy":"\uADF8\uB8F9","table.menu.clearAll":"\uBAA8\uB450 \uC9C0\uC6B0\uAE30","table.menu.visibleColumns":"\uD45C\uC2DC \uC5F4","table.menu.showSummaryRow":"\uC694\uC57D \uD589 \uD45C\uC2DC","table.menu.noNumericColumns":"\uC22B\uC790 \uC5F4 \uC5C6\uC74C","table.group.expandAll":"\uBAA8\uB4E0 \uADF8\uB8F9 \uD3BC\uCE58\uAE30","table.group.collapseAll":"\uBAA8\uB4E0 \uADF8\uB8F9 \uC811\uAE30","table.mobile.notImplemented":"\uBAA8\uBC14\uC77C \uBDF0\uB294 \uC544\uC9C1 \uAD6C\uD604\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4","table.headerMenu.sortAsc":"\uC624\uB984\uCC28\uC21C \uC815\uB82C","table.headerMenu.sortDesc":"\uB0B4\uB9BC\uCC28\uC21C \uC815\uB82C","table.headerMenu.clearSort":"\uC815\uB82C \uD574\uC81C","table.headerMenu.configureSort":"\uC815\uB82C \uC124\uC815...","table.headerMenu.group":"\uC774 \uC5F4\uB85C \uADF8\uB8F9\uD654","table.headerMenu.ungroup":"\uADF8\uB8F9\uC5D0\uC11C \uC81C\uAC70","table.headerMenu.addSummary":"\uC694\uC57D\uC5D0 \uCD94\uAC00","table.headerMenu.removeSummary":"\uC694\uC57D\uC5D0\uC11C \uC81C\uAC70","table.headerMenu.hideColumn":"\uC5F4 \uC228\uAE30\uAE30","table.sortDialog.title":"\uC815\uB82C \uC124\uC815","table.sortDialog.empty":"\uC815\uB82C \uADDC\uCE59\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. \uCD94\uAC00\uD558\uC138\uC694.","table.sortDialog.addRule":"\uADDC\uCE59 \uCD94\uAC00","table.sortDialog.clearAll":"\uBAA8\uB450 \uC9C0\uC6B0\uAE30","table.sortDialog.asc":"\uC624\uB984\uCC28\uC21C","table.sortDialog.desc":"\uB0B4\uB9BC\uCC28\uC21C","pivot.title.default":"\uD53C\uBC97 \uD14C\uC774\uBE14","pivot.subtitle.default":"\uD544\uB4DC\uB97C \uB4DC\uB798\uADF8\uD558\uC5EC \uD53C\uBC97 \uD14C\uC774\uBE14\uC744 \uAD6C\uC131\uD558\uC138\uC694.","pivot.empty":"\uACB0\uACFC\uB97C \uBCF4\uB824\uBA74 \uAC12 \uC601\uC5ED\uC5D0 \uCD5C\uC18C \uD55C \uAC1C\uC758 \uD544\uB4DC\uB97C \uCD94\uAC00\uD558\uC138\uC694.","pivot.records":"\uB808\uCF54\uB4DC","pivot.afterFilter":"\uD544\uD130 \uD6C4","pivot.grandTotal":"\uCD1D\uD569","pivot.resultLabel":"\uACB0\uACFC","pivot.valueLabel":"\uAC12","pivot.table.dimensions":"\uCC28\uC6D0","pivot.config.title":"\uAD6C\uC131","pivot.fieldList":"\uD544\uB4DC \uBAA9\uB85D","pivot.availableDimensions":"\uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uCC28\uC6D0","pivot.allFieldsInUse":"\uBAA8\uB4E0 \uD544\uB4DC\uAC00 \uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC785\uB2C8\uB2E4.","pivot.zone.rows":"\uD589","pivot.zone.columns":"\uC5F4","pivot.zone.filters":"\uD544\uD130","pivot.zone.values":"\uAC12","pivot.hint.rows":"\uC5EC\uAE30\uC5D0 \uD544\uB4DC\uB97C \uB4DC\uB798\uADF8\uD558\uC5EC \uD589 \uACC4\uCE35\uC744 \uAD6C\uC131","pivot.hint.columns":"\uC5EC\uAE30\uC5D0 \uD544\uB4DC\uB97C \uB4DC\uB798\uADF8\uD558\uC5EC \uC5F4 \uACC4\uCE35\uC744 \uAD6C\uC131","pivot.hint.filters":"\uC5EC\uAE30\uC5D0 \uD544\uB4DC\uB97C \uB4DC\uB798\uADF8\uD558\uC5EC \uBCF4\uACE0\uC11C \uD544\uD130\uB85C \uC0AC\uC6A9","pivot.hint.values":"\uC22B\uC790 \uD544\uB4DC\uB97C \uC5EC\uAE30\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC9D1\uACC4","pivot.clearArea":"\uC601\uC5ED \uBE44\uC6B0\uAE30","pivot.filter.na":"\uD574\uB2F9 \uC5C6\uC74C","pivot.filter.noValues":"\uAC12 \uC5C6\uC74C","pivot.filter.noneSelected":"\uC120\uD0DD \uC5C6\uC74C","pivot.filter.allValues":"\uBAA8\uB4E0 \uAC12","pivot.filter.selectedCount":"{selected} / {total} \uC120\uD0DD\uB428","pivot.filter.selectAll":"\uC804\uCCB4 \uC120\uD0DD","pivot.filter.deselectAll":"\uC804\uCCB4 \uD574\uC81C","pivot.filter.noResults":"\uAC80\uC0C9 \uACB0\uACFC \uC5C6\uC74C","pivot.collapse.ariaExpand":"\uAD6C\uC131 \uC601\uC5ED \uD3BC\uCE58\uAE30","pivot.collapse.ariaCollapse":"\uAD6C\uC131 \uC601\uC5ED \uC811\uAE30","pivot.agg.sum":"\uD569\uACC4","pivot.agg.count":"\uAC1C\uC218","pivot.agg.avg":"\uD3C9\uADE0","pivot.agg.min":"\uCD5C\uC18C","pivot.agg.max":"\uCD5C\uB300","pivot.preset.selectPlaceholder":"\uD504\uB9AC\uC14B \uC120\uD0DD","pivot.preset.save":"\uD504\uB9AC\uC14B \uC800\uC7A5","pivot.preset.delete":"\uD504\uB9AC\uC14B \uC0AD\uC81C","pivot.preset.saveDialogTitle":"\uD604\uC7AC \uD504\uB9AC\uC14B \uC800\uC7A5","pivot.preset.nameLabel":"\uD504\uB9AC\uC14B \uC774\uB984","pivot.preset.defaultName":"\uD504\uB9AC\uC14B {index}","pivot.table.sectionTitle":"\uD53C\uBC97 \uACB0\uACFC","pivot.table.expandRowsAll":"Expand rows","pivot.table.collapseRowsAll":"Collapse rows","pivot.table.expandColumnsAll":"Expand columns","pivot.table.collapseColumnsAll":"Collapse columns","pivot.table.collapse.ariaExpand":"\uD53C\uBC97 \uACB0\uACFC \uD3BC\uCE58\uAE30","pivot.table.collapse.ariaCollapse":"\uD53C\uBC97 \uACB0\uACFC \uC811\uAE30","pivot.chart.title":"\uD53C\uBC97 \uCC28\uD2B8","pivot.chart.subtitle":"\uD558\uB098\uC758 \uCC28\uC6D0\uACFC \uCD5C\uB300 \uB450 \uAC1C\uC758 \uCE21\uC815\uAC12\uC744 \uAC04\uACB0\uD55C \uCC28\uD2B8\uB85C \uD45C\uC2DC\uD569\uB2C8\uB2E4.","pivot.chart.subtitleReady":"{dimension}\uBCC4 {measure}","pivot.chart.emptyNoDimension":"\uCC28\uD2B8\uB97C \uBCF4\uB824\uBA74 \uCD5C\uC18C \uD55C \uAC1C\uC758 \uD589 \uB610\uB294 \uC5F4 \uD544\uB4DC\uB97C \uCD94\uAC00\uD558\uC138\uC694.","pivot.chart.emptyNoValue":"\uCC28\uD2B8\uB97C \uBCF4\uB824\uBA74 \uCD5C\uC18C \uD55C \uAC1C\uC758 \uAC12 \uD544\uB4DC\uB97C \uCD94\uAC00\uD558\uC138\uC694.","pivot.chart.emptyNoData":"\uD604\uC7AC \uCC28\uD2B8 \uC120\uD0DD\uC5D0 \uD45C\uC2DC\uD560 \uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.","pivot.chart.dimension":"\uCC28\uD2B8 \uCC28\uC6D0","pivot.chart.primaryMeasure":"\uC8FC \uCE21\uC815\uAC12","pivot.chart.secondaryMeasure":"\uBE44\uAD50 \uCE21\uC815\uAC12","pivot.chart.chartType":"\uCC28\uD2B8 \uC720\uD615","pivot.chart.style.barVertical":"\uC138\uB85C \uB9C9\uB300","pivot.chart.style.barHorizontal":"\uAC00\uB85C \uB9C9\uB300","pivot.chart.style.line":"\uC120\uD615 \uCC28\uD2B8","pivot.chart.style.scatter":"\uC0B0\uC810\uB3C4","pivot.chart.collapse.ariaExpand":"\uCC28\uD2B8 \uC601\uC5ED \uD3BC\uCE58\uAE30","pivot.chart.collapse.ariaCollapse":"\uCC28\uD2B8 \uC601\uC5ED \uC811\uAE30","smartFilter.adaptFilters":"\uD544\uD130 \uC870\uC815","smartFilter.addFilters":"\uD544\uD130 \uCD94\uAC00","smartFilter.go":"\uC2E4\uD589","smartFilter.visibleFilters":"\uD45C\uC2DC \uD544\uD130","smartFilter.searchPlaceholder":"\uAC80\uC0C9...","smartFilter.noOptionsFound":"\uC635\uC158\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4","smartFilter.min":"\uCD5C\uC18C","smartFilter.max":"\uCD5C\uB300","smartFilter.minMaxPlaceholder":"\uCD5C\uC18C - \uCD5C\uB300","smartFilter.operator.equals":"\uAC19\uC74C","smartFilter.operator.contains":"\uD3EC\uD568","smartFilter.operator.notContains":"\uBBF8\uD3EC\uD568","smartFilter.operator.wildcard":"\uC640\uC77C\uB4DC\uCE74\uB4DC \uAC80\uC0C9","smartFilter.operator.notEquals":"\uAC19\uC9C0 \uC54A\uC74C","smartFilter.operator.greaterThan":"\uBCF4\uB2E4 \uD07C","smartFilter.operator.lessThan":"\uBCF4\uB2E4 \uC791\uC74C","smartFilter.operator.greaterOrEqual":"\uC774\uC0C1","smartFilter.operator.lessOrEqual":"\uC774\uD558","smartFilter.operator.between":"\uBC94\uC704","variant.noOptions":"\uC635\uC158 \uC5C6\uC74C","variant.defaultSuffix":"\uAE30\uBCF8","variant.selectVariant":"\uBDF0 \uC120\uD0DD","variant.saveView":"\uBDF0 \uC800\uC7A5","variant.newVariant":"\uC0C8 \uBDF0","variant.viewName":"\uBDF0 \uC774\uB984","variant.setDefault":"\uAE30\uBCF8\uC73C\uB85C \uC124\uC815","variant.publicAllUsers":"\uACF5\uAC1C(\uC804\uCCB4 \uC0AC\uC6A9\uC790)","variant.toast.fetchFailed":"\uBDF0\uB97C \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4","variant.toast.saveFailed":"\uBDF0\uB97C \uC800\uC7A5\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4","variant.toast.saveSuccess":"\uBDF0\uAC00 \uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4","variant.toast.deleteFailed":"\uBDF0\uB97C \uC0AD\uC81C\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4","variant.toast.deleteSuccess":"\uBDF0\uAC00 \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4","variant.toast.defaultFailed":"\uAE30\uBCF8 \uBDF0\uB97C \uC5C5\uB370\uC774\uD2B8\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4","variant.toast.defaultSuccess":"\uAE30\uBCF8 \uBDF0\uAC00 \uC5C5\uB370\uC774\uD2B8\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.saveLayout":"\uB808\uC774\uC544\uC6C3 \uC800\uC7A5","layout.layoutOptions":"\uB808\uC774\uC544\uC6C3 \uC635\uC158","layout.selectLayout":"\uB808\uC774\uC544\uC6C3 \uC120\uD0DD","layout.saveCurrentLayout":"\uD604\uC7AC \uB808\uC774\uC544\uC6C3 \uC800\uC7A5...","layout.noSavedLayouts":"\uC800\uC7A5\uB41C \uB808\uC774\uC544\uC6C3 \uC5C6\uC74C","layout.removeDefault":"\uAE30\uBCF8 \uD574\uC81C","layout.setAsDefault":"\uAE30\uBCF8\uC73C\uB85C \uC124\uC815","layout.layoutName":"\uB808\uC774\uC544\uC6C3 \uC774\uB984","layout.layoutDescription":"\uC124\uBA85","layout.layoutNameHelper":"\uC608: \uCEF4\uD329\uD2B8 \uBDF0","layout.warningOverwrite":"\uACBD\uACE0: \uAE30\uC874 \uB808\uC774\uC544\uC6C3\uC774 \uB36E\uC5B4\uC4F0\uAE30 \uB429\uB2C8\uB2E4","layout.useAsDefault":"\uAE30\uBCF8 \uB808\uC774\uC544\uC6C3\uC73C\uB85C \uC0AC\uC6A9","layout.publicAllUsers":"\uACF5\uAC1C(\uBAA8\uB4E0 \uC0AC\uC6A9\uC790\uC5D0\uAC8C \uD45C\uC2DC)","layout.toast.loadFallback":"\uBC31\uC5D4\uB4DC\uC5D0\uC11C \uB808\uC774\uC544\uC6C3\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD574 \uB85C\uCEEC \uC800\uC7A5\uC18C\uB85C \uC804\uD658\uD588\uC2B5\uB2C8\uB2E4","layout.toast.saveSuccess":"\uB808\uC774\uC544\uC6C3\uC774 \uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.toast.saveLocalSuccess":"\uB808\uC774\uC544\uC6C3\uC774 \uB85C\uCEEC \uC800\uC7A5\uC18C\uC5D0 \uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.toast.backendUnavailableSavedLocal":"\uBC31\uC5D4\uB4DC\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC5B4 \uB85C\uCEEC\uC5D0 \uC800\uC7A5\uD588\uC2B5\uB2C8\uB2E4","layout.toast.deleteSuccess":"\uB808\uC774\uC544\uC6C3\uC774 \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.toast.deleteLocalSuccess":"\uB808\uC774\uC544\uC6C3\uC774 \uB85C\uCEEC \uC800\uC7A5\uC18C\uC5D0\uC11C \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.toast.backendUnavailableDeletedLocal":"\uBC31\uC5D4\uB4DC\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC5B4 \uB85C\uCEEC\uC5D0\uC11C \uC0AD\uC81C\uD588\uC2B5\uB2C8\uB2E4","layout.toast.defaultSuccess":"\uAE30\uBCF8 \uB808\uC774\uC544\uC6C3\uC774 \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.toast.defaultLocalSuccess":"\uAE30\uBCF8 \uB808\uC774\uC544\uC6C3\uC774 \uB85C\uCEEC\uC5D0 \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.toast.backendUnavailableDefaultLocal":"\uBC31\uC5D4\uB4DC\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC5B4 \uAE30\uBCF8\uAC12\uC744 \uB85C\uCEEC\uC5D0 \uC800\uC7A5\uD588\uC2B5\uB2C8\uB2E4","dateRange.label":"\uB0A0\uC9DC \uBC94\uC704","dateRange.startDate":"\uC2DC\uC791\uC77C","dateRange.endDate":"\uC885\uB8CC\uC77C","dateRange.select":"\uC120\uD0DD...","dateRange.today":"\uC624\uB298","dateRange.thisWeek":"\uC774\uBC88 \uC8FC","dateRange.thisMonth":"\uC774\uBC88 \uB2EC","graph.records":"{count}\uAC74","graph.kpi.totalRecords":"\uCD1D \uB808\uCF54\uB4DC","graph.kpi.totalReport":"\uCD1D \uBCF4\uACE0 \uC2DC\uAC04","graph.kpi.totalBillable":"\uCD1D \uCCAD\uAD6C \uAC00\uB2A5 \uC2DC\uAC04","graph.kpi.efficiency":"\uD6A8\uC728","graph.kpi.amount":"\uAE08\uC561","graph.kpi.flagged":"\uD50C\uB798\uADF8","graph.chart.billable.title":"\uCC28\uC6D0\uBCC4 \uCCAD\uAD6C \uAC00\uB2A5 \uC2DC\uAC04","graph.chart.billable.subtitle":"\uCCAD\uAD6C \uAC00\uB2A5 \uC2DC\uAC04 \uC0C1\uC704 \uAC12","graph.chart.efficiency.title":"\uB2F4\uB2F9\uC790\uBCC4 \uD6A8\uC728","graph.chart.efficiency.subtitle":"\uB0AE\uC740 \uD6A8\uC728 \uC6B0\uC120","graph.chart.status.title":"\uC0C1\uD0DC \uBD84\uD3EC","graph.chart.status.subtitle":"\uC0C1\uD0DC\uBCC4 \uBE44\uC728","graph.dataBody":"\uB370\uC774\uD130 \uBCF8\uBB38","graph.reportTitle":"\uADF8\uB798\uD504 \uB9AC\uD3EC\uD2B8","graph.unassigned":"\uBBF8\uC9C0\uC815","graph.column.reportHours":"\uBCF4\uACE0 \uC2DC\uAC04","graph.column.billableHours":"\uCCAD\uAD6C \uAC00\uB2A5 \uC2DC\uAC04","detail.searchAi.placeholder":"\uD544\uB4DC\uB97C \uAC80\uC0C9\uD558\uACE0, \uACB0\uACFC\uAC00 \uC5C6\uC73C\uBA74 AI\uC5D0 \uC9C8\uBB38\uD558\uC138\uC694...","detail.searchAi.matches":"{count}\uAC1C \uC77C\uCE58 \uD56D\uBAA9","detail.searchAi.noMatch":"\uC77C\uCE58\uD558\uB294 \uD544\uB4DC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.","detail.searchAi.autoAiFallback":"\uC77C\uCE58 \uD56D\uBAA9\uC774 \uC5C6\uC5B4 AI \uBD84\uC11D\uC744 \uC2E4\uD589\uD569\uB2C8\uB2E4...","detail.searchAi.aiResultTitle":"AI \uBD84\uC11D \uACB0\uACFC","detail.table.title":"\uAD00\uB828 \uB808\uCF54\uB4DC","kanban.empty":"\uC5EC\uAE30\uC5D0 \uCE74\uB4DC\uB97C \uB193\uC73C\uC138\uC694","kanban.bucket.limit":"\uD55C\uB3C4","kanban.bucket.dropHere":"\uB193\uC73C\uBA74 \uC774 \uBC84\uD0B7\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4","kanban.bucket.add":"\uBC84\uD0B7 \uCD94\uAC00","kanban.bucket.rename":"\uBC84\uD0B7 \uC774\uB984 \uBCC0\uACBD","kanban.bucket.saveRename":"\uBC84\uD0B7 \uC774\uB984 \uC800\uC7A5","kanban.bucket.cancelRename":"\uC774\uB984 \uBCC0\uACBD \uCDE8\uC18C","kanban.search.placeholder":"\uCE74\uB4DC \uBC0F \uBC84\uD0B7 \uAC80\uC0C9","kanban.search.clear":"\uAC80\uC0C9 \uC9C0\uC6B0\uAE30","kanban.search.results":"\uC77C\uCE58\uD558\uB294 \uCE74\uB4DC {count}\uAC1C","kanban.search.noMatch":"\uC77C\uCE58\uD558\uB294 \uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4","kanban.card.progress":"\uC9C4\uD589\uB960","kanban.card.openDetail":"\uC0C1\uC138 \uC5F4\uAE30","kanban.priority.critical":"\uAE34\uAE09","kanban.priority.high":"\uB192\uC74C","kanban.priority.medium":"\uBCF4\uD1B5","kanban.priority.low":"\uB0AE\uC74C","quickCreate.newItem":"\uC2E0\uADDC \uD56D\uBAA9","quickCreate.createWithTitle":"{title} \uC0DD\uC131","quickEdit.editWithTitle":"{title} \uC218\uC815","quickDelete.confirmTitle":"\uC0AD\uC81C \uD655\uC778","quickDelete.confirmMessageSingle":"\uC120\uD0DD\uD55C \uD56D\uBAA9\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?","quickDelete.confirmMessageMultiple":"\uC120\uD0DD\uD55C {count}\uAC1C \uD56D\uBAA9\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?","cardPage.viewDetails":"\uC0C1\uC138 \uBCF4\uAE30","cardPage.download":"\uB2E4\uC6B4\uB85C\uB4DC","cardPage.close":"\uB2EB\uAE30","cardPage.empty":"\uD56D\uBAA9\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4","messageBox.confirm":"\uD655\uC778","messageBox.cancel":"\uCDE8\uC18C","omph.status.idle":"\uB300\uAE30","omph.status.pending":"\uB300\uAE30 \uC911","omph.status.running":"\uCC98\uB9AC \uC911","omph.status.success":"\uC644\uB8CC","omph.status.error":"\uC624\uB958","omph.working":"\uCC98\uB9AC \uC911","omph.workingFor":"\uCC98\uB9AC \uC911 {duration} \uACBD\uACFC","omph.loadOlder":"\uC774\uC804 \uBA54\uC2DC\uC9C0 \uBD88\uB7EC\uC624\uAE30","omph.loadingOlder":"\uBD88\uB7EC\uC624\uB294 \uC911\u2026","omph.toBottom":"\uB9E8 \uC544\uB798\uB85C","omph.copy":"\uBCF5\uC0AC","omph.copied":"\uBCF5\uC0AC\uB428","omph.turnActions":"\uC751\uB2F5 \uC791\uC5C5","omph.usage":"\uC0AC\uC6A9\uB7C9","omph.inputTokens":"\uC785\uB825","omph.outputTokens":"\uCD9C\uB825","omph.duration":"\uC18C\uC694 \uC2DC\uAC04","omph.send":"\uBCF4\uB0B4\uAE30","omph.stop":"\uC911\uC9C0","omph.supplement.queued":"\uC2E4\uD589 \uC911\uC778 \uC791\uC5C5\uC5D0 \uCD94\uAC00\uB428","omph.turnRail":"\uD134","omph.secondUnit":"\uCD08","omph.minuteUnit":"\uBD84","omph.preview.title":"\uD30C\uC77C \uBBF8\uB9AC\uBCF4\uAE30","omph.preview.close":"\uBBF8\uB9AC\uBCF4\uAE30 \uB2EB\uAE30","omph.preview.back":"\uB300\uD654\uB85C \uB3CC\uC544\uAC00\uAE30","omph.preview.expand":"\uBBF8\uB9AC\uBCF4\uAE30 \uD655\uB300","omph.preview.collapse":"\uBBF8\uB9AC\uBCF4\uAE30 \uD06C\uAE30 \uBCF5\uC6D0","omph.preview.copyContent":"\uB0B4\uC6A9 \uBCF5\uC0AC","omph.preview.copyPath":"\uACBD\uB85C \uBCF5\uC0AC","omph.preview.download":"\uB2E4\uC6B4\uB85C\uB4DC","omph.preview.openExternal":"\uC678\uBD80\uC5D0\uC11C \uC5F4\uAE30","omph.preview.wrap":"\uC904 \uBC14\uAFC8","omph.preview.loading":"\uD30C\uC77C \uB85C\uB4DC \uC911","omph.preview.missing":"\uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC74C","omph.preview.failed":"\uC774 \uD30C\uC77C\uC744 \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4","omph.preview.unsupported":"\uC774 \uD30C\uC77C \uD615\uC2DD\uC740 \uBBF8\uB9AC\uBCFC \uC218 \uC5C6\uC2B5\uB2C8\uB2E4","omph.preview.retry":"\uB2E4\uC2DC \uC2DC\uB3C4","omph.preview.resize":"\uBBF8\uB9AC\uBCF4\uAE30 \uD06C\uAE30 \uC870\uC815","omph.preview.line":"{start}\uC904","omph.preview.lines":"{start}\u2013{end}\uC904","omph.preview.truncated":"\uC804\uCCB4 {total}\uC904 \uC911 \uCC98\uC74C {shown}\uC904 \uD45C\uC2DC","omph.preview.sheetTruncated":"\uC804\uCCB4 {total}\uD589 \uC911 \uCC98\uC74C {shown}\uD589 \uD45C\uC2DC","omph.preview.imageFailed":"\uC774\uBBF8\uC9C0\uB97C \uD45C\uC2DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4","omph.preview.zoomIn":"\uD655\uB300","omph.preview.zoomOut":"\uCD95\uC18C","omph.preview.zoomFit":"\uB108\uBE44\uC5D0 \uB9DE\uCD94\uAE30","omph.newConversation":"\uC0C8 \uB300\uD654","omph.conversationList":"\uB300\uD654 \uBAA9\uB85D","omph.conversations":"\uB300\uD654","omph.noConversations":"\uC544\uC9C1 \uB300\uD654\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4","omph.initial.suggestions":"\uCD94\uCC9C \uC9C8\uBB38","omph.approval.waiting":"\uC2B9\uC778 \uB300\uAE30 \uC911","omph.approval.choose":"\uC791\uC5C5\uC744 \uC120\uD0DD\uD558\uC138\uC694","omph.approval.details":"\uC2B9\uC778 \uC138\uBD80 \uC815\uBCF4","omph.approval.choices":"\uC791\uC5C5","omph.approval.reject":"\uAC70\uBD80","omph.approval.allowOnce":"\uD55C \uBC88\uB9CC \uD5C8\uC6A9","omph.approval.confirm":"\uACC4\uC18D","omph.approval.other":"\uAE30\uD0C0","omph.approval.otherPlaceholder":"\uC218\uD589\uD560 \uC791\uC5C5\uC744 \uC124\uBA85\uD558\uC138\uC694","omph.approval.escalation":"\uB3C4\uAD6C {toolName}\uC774(\uAC00) \uAD8C\uD55C \uC788\uB294 \uC2E4\uD589\uC744 \uC694\uCCAD\uD569\uB2C8\uB2E4","omph.approval.recommended":"(\uAD8C\uC7A5)","omph.approval.allowOnceException":"\uC774\uBC88\uB9CC \uC608\uC678 \uD5C8\uC6A9","omph.approval.allowSession":"\uC774 \uC138\uC158\uC5D0\uC11C \uAC19\uC740 \uC885\uB958 \uD5C8\uC6A9","omph.approval.abandon":"\uD3EC\uAE30","omph.input.placeholder":"\uBA54\uC2DC\uC9C0 \uC785\uB825\u2026","omph.input.upload":"\uD30C\uC77C \uC5C5\uB85C\uB4DC","omph.input.send":"\uBA54\uC2DC\uC9C0 \uBCF4\uB0B4\uAE30","omph.input.stop":"\uC0DD\uC131 \uC911\uC9C0","omph.input.queue.ask":"\uC5D0\uC774\uC804\uD2B8\uAC00 \uC2E4\uD589 \uC911\uC785\uB2C8\uB2E4. \uC9C0\uAE08 \uBCF4\uB0BC\uAE4C\uC694, \uC774\uBC88 \uD134\uC774 \uB05D\uB09C \uD6C4\uC5D0 \uBCF4\uB0BC\uAE4C\uC694?","omph.input.queue.sendNow":"\uC9C0\uAE08 \uBCF4\uB0B4\uAE30","omph.input.queue.afterTurn":"\uC774\uBC88 \uD134 \uD6C4\uC5D0 \uBCF4\uB0B4\uAE30","omph.input.queue.queued":"\uB300\uAE30 \uC911 \u2014 \uC774\uBC88 \uD134 \uD6C4 \uC790\uB3D9 \uC804\uC1A1","omph.input.queue.cancel":"\uCDE8\uC18C","omph.input.message":"\uBA54\uC2DC\uC9C0 \uC785\uB825","omph.input.tools":"\uC785\uB825 \uB3C4\uAD6C","agentui.html.defaultTitle":"\uC778\uD130\uB799\uD2F0\uBE0C HTML","agentui.html.open":"\uC5F4\uAE30","agentui.html.preview":"\uBBF8\uB9AC \uBCF4\uAE30","agentui.html.code":"\uCF54\uB4DC","agentui.html.toggle":"\uCF54\uB4DC\uC640 \uBBF8\uB9AC \uBCF4\uAE30 \uC804\uD658","agentui.html.copy":"\uCF54\uB4DC \uBCF5\uC0AC","agentui.html.copied":"\uBCF5\uC0AC\uB428","agentui.html.download":"\uB2E4\uC6B4\uB85C\uB4DC","agentui.html.close":"\uB2EB\uAE30"},jn={en:Ef,zh:Lf,fr:Of,de:Ff,ja:Bf,ko:Hf};M();var wd=(t,o)=>o?t.replace(/\{(\w+)\}/g,(r,n)=>{let a=o[n];return a==null?"":String(a)}):t,$f={locale:"en",t:(t,o)=>wd(jn.en[t]||t,o)},Sd=to.createContext($f),ei=({locale:t="en",messages:o,children:r})=>{let n=to.useMemo(()=>{let a=jn[t]||jn.en,i=o?.[t]||{},s={...jn.en,...a,...i};return {locale:t,t:(l,d)=>wd(s[l]||l,d)}},[t,o]);return e(Sd.Provider,{value:n,children:r})},de=()=>to.useContext(Sd);M();function Qn({items:t,onItemClick:o,className:r="",level:n=0,expandedIds:a,onToggleExpand:i,colorMode:s="light",enablePinning:l=false,pinnedIds:d,onTogglePin:p}){let{t:m}=de(),h=s==="dark",f=navigation.usePathname(),[u,b]=to.useState(false),[y,g]=to.useState(new Set),x=a!==void 0&&i!==void 0,v=x?a:y;to.useEffect(()=>{b(true);},[]);let C=S=>{if(x)i(S);else {let I=new Set(y);I.has(S)?I.delete(S):I.add(S),g(I);}},P=S=>{S.children&&S.children.length>0&&C(S.id),o&&o(S);};return !t||!Array.isArray(t)?e("div",{className:Co("tree-menu",r),children:e("div",{className:"text-sm text-[var(--orb-muted)] p-2",children:m("navigation.noItems")})}):e("div",{className:Co("tree-menu",r),children:t.map(S=>{let I=v.has(S.id)||S.isExpanded,R=S.children&&S.children.length>0,A=56+Math.max(0,n-1)*8,D=n===0?12:R?A-24:A,T=S.appurl||S.href,k=u&&T?f===T:false,E=d?.has(S.id)??false,O=l&&S.pinnable!==false&&!!T&&!R;return c("div",{className:"tree-menu-item relative",children:[k&&e("div",{className:Co("absolute left-0 top-2 bottom-2 w-[3px] rounded-r-full z-10","bg-[var(--orb-nav-active-fg)]")}),c(il,{variant:"ghost",className:Co("w-full justify-start h-auto py-2 relative overflow-hidden group",n>0?"gap-1":"gap-2",R&&I&&!k?h?"bg-[color-mix(in_oklch,var(--orb-inverse-fg)_5%,transparent)] text-[var(--orb-fg)] hover:bg-[color-mix(in_oklch,var(--orb-inverse-fg)_8%,transparent)]":"bg-[color-mix(in_oklch,var(--orb-surface)_70%,transparent)] text-[var(--orb-fg)] hover:bg-[var(--orb-surface)]":"",n>=2?"min-h-9 py-1.5 rounded-md":n>0?"min-h-10 rounded-lg":"rounded-lg",k?h?"bg-transparent text-[var(--orb-nav-active-fg)] hover:bg-[color-mix(in_oklch,var(--orb-surface-2)_35%,transparent)]":"bg-transparent text-[var(--orb-nav-active-fg)] hover:bg-[color-mix(in_oklch,var(--orb-surface)_60%,transparent)]":h?"hover:bg-[color-mix(in_oklch,var(--orb-surface-2)_50%,transparent)] text-[var(--orb-fg)]":"hover:bg-[color-mix(in_oklch,var(--orb-surface)_50%,transparent)] text-[var(--orb-fg)]"),style:{paddingLeft:`${D}px`,paddingRight:O?"34px":"10px"},onClick:()=>P(S),children:[R&&e("div",{className:Co("flex-shrink-0 transition-transform duration-200",I&&"rotate-90",k?"text-[var(--orb-nav-active-fg)]":h?"text-[var(--orb-muted)] group-hover:text-[var(--orb-fg)]":"text-[var(--orb-muted)] group-hover:text-[var(--orb-muted)]"),children:e(Wo,{className:"h-4 w-4"})}),S.icon&&e("div",{className:Co("flex h-4 w-4 flex-shrink-0 items-center justify-center transition-colors duration-200",k?"text-[var(--orb-nav-active-fg)]":h?"text-[var(--orb-muted)] group-hover:text-[var(--orb-fg)]":"text-[var(--orb-muted)] group-hover:text-[var(--orb-muted)]"),children:S.icon}),c("div",{className:"flex-1 text-left overflow-hidden z-10",children:[e("div",{className:Co("text-sm truncate transition-colors duration-200",k?"font-semibold":"font-medium"),children:S.title||S.label}),S.description&&e("div",{className:Co("text-xs truncate transition-colors duration-200",k?h?"text-[color-mix(in_oklch,var(--orb-nav-active-fg)_70%,transparent)]":"text-[color-mix(in_oklch,var(--orb-nav-active-fg)_75%,transparent)]":"text-[var(--orb-muted)]"),title:S.description,children:S.description})]})]}),O&&p&&e("button",{type:"button","aria-label":m(E?"navigation.pin.remove":"navigation.pin.add"),"aria-pressed":E,title:m(E?"navigation.pin.remove":"navigation.pin.add"),onClick:$=>{$.preventDefault(),$.stopPropagation(),p(S);},className:Co("orb-navigation-pin-button absolute right-1 top-1/2 z-20 flex h-7 w-7 -translate-y-1/2 items-center justify-center rounded-md transition-colors duration-150",E&&"orb-is-pinned"),children:e(en,{className:Co("h-3.5 w-3.5",E&&"fill-current")})}),R&&e("div",{className:Co("grid transition-[grid-template-rows] duration-300 ease-in-out",I?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:e("div",{className:Co("overflow-hidden",I&&"pt-1"),children:e(Qn,{items:S.children,onItemClick:o,level:n+1,expandedIds:a,onToggleExpand:i,colorMode:s,enablePinning:l,pinnedIds:d,onTogglePin:p})})})]},S.id)})})}M();var Kf="orbcafe:navigation-island:pinned-items",sl="orbcafe-navigation-pinned",qf=t=>t.appurl||t.href,Pd=t=>{let o=[];return t.forEach(r=>{let n=!!r.children?.length;r.pinnable!==false&&qf(r)&&!n&&o.push({...r,children:void 0}),r.children?.length&&o.push(...Pd(r.children));}),o},Td=({collapsed:t,onToggle:o,className:r="",maxHeight:n,menuData:a=[],colorMode:i="light",displayMode:s="fixed",onDisplayModeChange:l,showDisplayModeToggle:d=true,enablePinning:p=true,pinStorageKey:m=Kf,pinnedItemIds:h,defaultPinnedItemIds:f=[],onPinnedItemIdsChange:u,pinnedSectionTitle:b})=>{let{t:y}=de(),g=i==="dark",x=s==="floating",v=navigation.useRouter(),[C,P]=to.useState(""),[S,I]=to.useState(new Set),[R,w]=to.useState(f),[A,D]=to.useState(false),T=h!==void 0,k=to.useMemo(()=>h??R,[h,R]),E=to.useMemo(()=>new Set(k),[k]);to.useEffect(()=>{t&&I(new Set);},[t]),to.useEffect(()=>{if(!p||T){D(true);return}try{let H=window.localStorage.getItem(m);if(H){let X=JSON.parse(H);Array.isArray(X)&&w(X.filter(Y=>typeof Y=="string"));}}catch{}finally{D(true);}},[p,T,m]),to.useEffect(()=>{if(!(!p||T||!A))try{window.localStorage.setItem(m,JSON.stringify(k));}catch{}},[k,p,T,m,A]),to.useEffect(()=>{!p||t||k.length===0||I(H=>{if(H.has(sl))return H;let X=new Set(H);return X.add(sl),X});},[t,k.length,p]);let O=to.useCallback(H=>{let X=Array.from(new Set(H));T||w(X),u?.(X);},[T,u]),$=to.useCallback(H=>{let X=H.id,Y=E.has(X)?k.filter(j=>j!==X):[...k,X];O(Y);},[k,E,O]),ee=to.useMemo(()=>{if(!p||k.length===0)return a;let H=new Map(Pd(a).map(Y=>[Y.id,Y])),X=k.map(Y=>H.get(Y)).filter(Y=>!!Y);return X.length===0?a:[{id:sl,title:b||y("navigation.pinned"),icon:e(en,{className:"w-4 h-4"}),children:X,pinnable:false},...a]},[k,p,a,b,y]),F=to.useCallback(H=>{let X=[],Y=j=>{j.forEach(te=>{X.push(te.id),te.children&&Y(te.children);});};return Y(H),X},[]),G=to.useMemo(()=>{if(!C.trim())return ee;let H=X=>X.reduce((Y,j)=>{let te=j.title?.toLowerCase().includes(C.toLowerCase())||j.description?.toLowerCase().includes(C.toLowerCase()),ce=j.children?H(j.children):[];return (te||ce.length>0)&&Y.push({...j,children:ce.length>0?ce:j.children}),Y},[]);return H(ee)},[C,ee]),W=to.useMemo(()=>C.trim()?new Set(F(ee)):S,[C,ee,S,F]),Q=to.useCallback(async H=>{if(console.log("\u{1F5B1}\uFE0F \u5BFC\u822A\u83DC\u5355\u9879\u70B9\u51FB:",H),H.id==="chat"||H.appurl==="/chat"){console.log("\u{1F4AC} \u68C0\u6D4B\u5230chat\u83DC\u5355\u70B9\u51FB\uFF0C\u8DF3\u8F6C\u5230\u65B0\u7684\u804A\u5929\u89C6\u56FE");try{v.push("/chat?new=true");}catch(Y){console.error("\u274C \u65E0\u6CD5\u8DF3\u8F6C\u5230\u65B0\u804A\u5929\u89C6\u56FE:",Y),v.push("/chat");}return}let X=H.appurl||H.href;X&&(X.startsWith("http://")||X.startsWith("https://")?window.open(X,"_blank"):v.push(X));},[v]),z=to.useCallback(()=>{l?.(s==="fixed"?"floating":"fixed");},[s,l]);return c("div",{className:`flex flex-col backdrop-blur-xl border ${x?"shadow-[0_28px_80px_rgba(15,23,42,0.34)]":"shadow-[0_4px_8px_0_rgba(31,38,135,0.1)]"} ${t?"w-14 rounded-full":"w-[234px] rounded-2xl"} relative ${r} ${g?x?"border-white/25":"bg-[var(--orb-nav-bg)] border-white/10":x?"border-white/70":"bg-[color-mix(in_oklch,var(--orb-canvas)_70%,transparent)] border-white/30"}`,style:{backdropFilter:x?"blur(34px) saturate(230%) contrast(1.12)":"blur(16px) saturate(180%)",WebkitBackdropFilter:x?"blur(34px) saturate(230%) contrast(1.12)":"blur(16px) saturate(180%)",backgroundColor:x?g?"rgba(8, 12, 18, 0.34)":"rgba(255, 255, 255, 0.24)":void 0,backgroundImage:x?g?"radial-gradient(circle at 28% 8%, rgba(255,255,255,0.14), rgba(255,255,255,0) 44%), linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.015) 50%, color-mix(in oklch, var(--orb-ai-accent) 5%, transparent))":"radial-gradient(circle at 28% 8%, rgba(255,255,255,0.42), rgba(255,255,255,0) 46%), linear-gradient(145deg, rgba(255,255,255,0.22), rgba(255,255,255,0.07) 50%, color-mix(in oklch, var(--orb-ai-accent) 8%, transparent))":void 0,boxShadow:x?g?"inset 0 1px 0 rgba(255,255,255,0.20), inset 0 -1px 0 rgba(255,255,255,0.08), 0 26px 90px rgba(0,0,0,0.52), 0 0 0 1px rgba(255,255,255,0.06)":"inset 0 1px 0 rgba(255,255,255,0.88), inset 0 -1px 0 rgba(255,255,255,0.34), 0 26px 90px rgba(15,23,42,0.24), 0 0 0 1px rgba(255,255,255,0.35)":void 0,transition:"width 400ms cubic-bezier(0.4, 0.0, 0.2, 1), border-radius 0ms cubic-bezier(0.4, 0.0, 0.2, 1), box-shadow 400ms ease-out, background-color 220ms ease-out, backdrop-filter 220ms ease-out",maxHeight:n?`${n}px`:void 0},children:[e("div",{className:`pt-4 pb-2 transition-all duration-500 ease-in-out ${t?"px-1":"px-2"}`,children:t?e("div",{className:"flex justify-center",children:e("button",{onClick:o,className:`w-10 h-10 flex items-center justify-center rounded-lg transition-colors duration-200 ${g?"text-[var(--orb-fg)] hover:bg-[var(--orb-surface-2)]":"text-[var(--orb-muted)] hover:bg-[var(--orb-surface)]"}`,title:y("navigation.expand"),children:e($o,{className:"h-5 w-5"})})}):c("div",{className:`relative transition-opacity duration-300 ${t?"opacity-0":"opacity-100 delay-200"}`,children:[e("input",{type:"text",placeholder:y("navigation.searchPlaceholder"),value:C,onChange:H=>P(H.target.value),className:`w-full pl-10 pr-4 py-2 text-sm border rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--orb-primary)] focus:border-transparent ${g?"border-[var(--orb-border)] bg-[var(--orb-surface-2)] text-[var(--orb-fg)] placeholder-[var(--orb-muted)]":"border-[var(--orb-border)] bg-[var(--orb-canvas)] text-[var(--orb-fg)] placeholder-[var(--orb-muted)]"}`}),e("div",{className:"absolute left-3 top-1/2 transform -translate-y-1/2 pointer-events-none",children:e($o,{className:"h-4 w-4 text-[var(--orb-muted)]"})})]})}),e("nav",{className:`flex-1 pb-4 transition-all duration-500 ease-in-out overflow-y-auto min-h-0 ${t?"px-1":"px-2"}`,children:G.length===0?e("div",{className:"flex items-center justify-center py-8 text-[var(--orb-muted)] text-sm",children:t?e($n,{className:"h-5 w-5"}):y(C?"navigation.noMatch":"navigation.noAccessibleApp")}):c(jsxRuntime.Fragment,{children:[!t&&e("div",{className:`transition-opacity duration-300 ${t?"opacity-0":"opacity-100 delay-200"}`,children:e(Qn,{items:G,onItemClick:Q,className:"space-y-1",expandedIds:W,colorMode:i,enablePinning:p,pinnedIds:E,onTogglePin:$,onToggleExpand:H=>{let X=new Set(S);G.some(j=>j.id===H)?X.has(H)?X.delete(H):(G.forEach(j=>{j.id!==H&&X.has(j.id)&&X.delete(j.id);}),X.add(H)):X.has(H)?X.delete(H):X.add(H),I(X);}})}),t&&e("div",{className:"space-y-2",children:ee.map(H=>e("div",{className:"space-y-1",children:e("button",{onClick:()=>{o();let X=new Set([H.id]);I(X);},className:`w-full flex items-center justify-center p-2 rounded-lg cursor-pointer transition-colors duration-200 ${g?"text-[var(--orb-muted)] hover:bg-[var(--orb-surface-2)]":"text-[var(--orb-muted)] hover:bg-[var(--orb-surface)]"}`,title:y("navigation.expandView",{title:H.title||""}),children:H.icon||e("div",{className:`w-6 h-6 rounded text-xs flex items-center justify-center font-medium ${g?"bg-[var(--orb-nav-active-fg)] text-[#0b0b0b]":"bg-[var(--orb-primary)] text-[var(--orb-on-primary)]"}`,children:H.title?.charAt(0)||"?"})})},H.id))})]})}),!t&&e("button",{onClick:o,className:`absolute -bottom-1 -right-1 w-6 h-6 bg-transparent rounded-full flex items-center justify-center transition-all duration-300 ease-in-out z-20 ${g?"hover:bg-[color-mix(in_oklch,var(--orb-surface-2)_50%,transparent)]":"hover:bg-[color-mix(in_oklch,var(--orb-canvas)_20%,transparent)]"}`,title:y("navigation.collapse"),children:e("div",{className:"absolute",style:{bottom:"0px",right:"0px",width:"16px",height:"16px",overflow:"hidden"},children:e("div",{className:g?"border-[var(--orb-status-warning)]":"",style:{width:"32px",height:"32px",borderRadius:"16px",border:"3px solid var(--orb-ai-accent)",backgroundColor:"transparent",position:"absolute",top:"-16px",left:"-16px"}})})}),d&&t&&e("button",{type:"button",onClick:z,className:`absolute -bottom-4 left-1/2 z-30 flex h-9 w-9 -translate-x-1/2 items-center justify-center rounded-full border shadow-md transition-colors focus:outline-none focus:ring-2 focus:ring-[color-mix(in_oklch,var(--orb-primary)_45%,transparent)] ${g?"border-[var(--orb-border)] bg-[var(--orb-surface-2)] text-[var(--orb-fg)] hover:bg-[var(--orb-hover)]":"border-[var(--orb-border)] bg-[var(--orb-canvas)] text-[var(--orb-status-fg)] hover:bg-[var(--orb-p50)] hover:text-[var(--orb-status-primary)]"}`,style:{touchAction:"manipulation"},title:y(x?"navigation.mode.switchToFixed":"navigation.mode.switchToFloating"),"aria-label":y(x?"navigation.mode.switchToFixed":"navigation.mode.switchToFloating"),children:x?e(Ua,{className:"h-4 w-4"}):e(Ka,{className:"h-4 w-4"})})]})};M();var Zf="orbcafe:navigation-island:pinned-items",ll="orbcafe-navigation-pinned",Id=t=>t.appurl||t.href,Md=t=>t.flatMap(o=>{let r=!!o.children?.length,n=o.pinnable!==false&&Id(o)&&!r?[{...o,children:void 0}]:[];return o.children?.length?[...n,...Md(o.children)]:n}),Rd=t=>t.flatMap(o=>[o.id,...o.children?Rd(o.children):[]]),Nd=(t,o)=>t.reduce((r,n)=>{let a=n.children?Nd(n.children,o):[];return ([n.title,n.label,n.description].some(s=>s?.toLocaleLowerCase().includes(o))||a.length>0)&&r.push({...n,children:a.length>0?a:n.children}),r},[]),cl=({collapsed:t,onToggle:o,className:r="",maxHeight:n,menuData:a=[],colorMode:i="light",displayMode:s="fixed",onDisplayModeChange:l,showDisplayModeToggle:d=true,enablePinning:p=true,pinStorageKey:m=Zf,pinnedItemIds:h,defaultPinnedItemIds:f=[],onPinnedItemIdsChange:u,pinnedSectionTitle:b})=>{let{t:y}=de(),g=navigation.useRouter(),x=s==="floating",[v,C]=to.useState(""),[P,S]=to.useState(new Set),[I,R]=to.useState(f),[w,A]=to.useState(false),D=h!==void 0,T=h??I,k=to.useMemo(()=>new Set(T),[T]);to.useEffect(()=>{t&&S(new Set);},[t]),to.useEffect(()=>{if(!p||D){A(true);return}try{let H=window.localStorage.getItem(m);if(H){let X=JSON.parse(H);Array.isArray(X)&&R(X.filter(Y=>typeof Y=="string"));}}catch{}finally{A(true);}},[p,D,m]),to.useEffect(()=>{if(!(!p||D||!w))try{window.localStorage.setItem(m,JSON.stringify(T));}catch{}},[T,p,D,m,w]),to.useEffect(()=>{!p||t||T.length===0||S(H=>{if(H.has(ll))return H;let X=new Set(H);return X.add(ll),X});},[t,T.length,p]);let E=to.useCallback(H=>{let X=Array.from(new Set(H));D||R(X),u?.(X);},[D,u]),O=to.useCallback(H=>{E(k.has(H.id)?T.filter(X=>X!==H.id):[...T,H.id]);},[T,k,E]),$=to.useMemo(()=>{if(!p||T.length===0)return a;let H=new Map(Md(a).map(Y=>[Y.id,Y])),X=T.map(Y=>H.get(Y)).filter(Y=>!!Y);return X.length===0?a:[{id:ll,title:b||y("navigation.pinned"),icon:e(en,{className:"h-4 w-4"}),children:X,pinnable:false},...a]},[T,p,a,b,y]),ee=v.trim().toLocaleLowerCase(),F=to.useMemo(()=>ee?Nd($,ee):$,[$,ee]),G=to.useMemo(()=>ee?new Set(Rd(F)):P,[P,F,ee]),W=to.useCallback(H=>{S(X=>{let Y=new Set(X),j=F.some(te=>te.id===H);return Y.has(H)?Y.delete(H):(j&&F.forEach(te=>Y.delete(te.id)),Y.add(H)),Y});},[F]),Q=to.useCallback(H=>{let X=Id(H);X&&(H.id==="chat"||H.appurl==="/chat"?g.push("/chat?new=true"):/^https?:\/\//.test(X)?window.open(X,"_blank","noopener,noreferrer"):g.push(X));},[g]),z=H=>{o(),S(new Set([H.id]));};return c("aside",{"data-navigation-island":"v2","data-collapsed":t||void 0,className:`orb-navigation-island-v2 relative flex flex-col border ${t?"w-14":"w-[234px]"} ${r}`,style:{maxHeight:n?`${n}px`:void 0,transition:"width 320ms cubic-bezier(0.4, 0, 0.2, 1), border-radius 220ms ease, box-shadow 220ms ease"},"aria-label":"Navigation",children:[e("div",{className:`orb-navigation-island-v2-search ${t?"px-1":"px-2"}`,children:t?e("button",{type:"button",onClick:o,className:"mx-auto flex h-10 w-10 items-center justify-center rounded-lg text-[var(--orb-muted)] transition-colors hover:bg-[var(--orb-p50)] hover:text-[var(--orb-status-primary)]",title:y("navigation.expand"),"aria-label":y("navigation.expand"),children:e($o,{className:"h-5 w-5"})}):c("label",{className:"relative block",children:[e("span",{className:"orb-visually-hidden",children:y("navigation.searchPlaceholder")}),e($o,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[var(--orb-muted)]"}),e("input",{type:"search",value:v,onChange:H=>C(H.target.value),placeholder:y("navigation.searchPlaceholder"),className:"w-full py-2 pl-10 pr-3 text-sm outline-none"})]})}),e("nav",{className:`min-h-0 flex-1 overflow-y-auto pb-2 ${t?"px-1":"px-2"}`,children:F.length===0?e("div",{className:"flex items-center justify-center py-8 text-sm text-[var(--orb-muted)]",children:t?e($n,{className:"h-5 w-5"}):y(ee?"navigation.noMatch":"navigation.noAccessibleApp")}):t?e("div",{className:"space-y-1",children:$.map(H=>e("button",{type:"button",onClick:()=>z(H),className:"flex h-10 w-full items-center justify-center rounded-lg text-[var(--orb-muted)] transition-colors hover:bg-[var(--orb-p50)] hover:text-[var(--orb-status-primary)]",title:y("navigation.expandView",{title:H.title||H.label||""}),children:H.icon||e($n,{className:"h-5 w-5"})},H.id))}):e(Qn,{items:F,onItemClick:Q,className:"space-y-1",expandedIds:G,onToggleExpand:W,colorMode:i,enablePinning:p,pinnedIds:k,onTogglePin:O})}),d&&t&&e("div",{className:"orb-navigation-island-v2-footer flex flex-col items-center gap-1 border-t px-1 py-2",children:e("button",{type:"button",onClick:()=>l?.(x?"fixed":"floating"),className:"flex h-9 w-9 items-center justify-center rounded-lg text-[var(--orb-muted)] transition-colors hover:bg-[var(--orb-p50)] hover:text-[var(--orb-status-primary)]",title:y(x?"navigation.mode.switchToFixed":"navigation.mode.switchToFloating"),"aria-label":y(x?"navigation.mode.switchToFixed":"navigation.mode.switchToFloating"),children:x?e(Ua,{className:"h-4 w-4"}):e(Ka,{className:"h-4 w-4"})})}),!t&&e("button",{type:"button",onClick:o,className:"absolute -bottom-1 -right-1 z-20 flex h-6 w-6 items-center justify-center rounded-full bg-transparent transition-all duration-300 ease-in-out",title:y("navigation.collapse"),"aria-label":y("navigation.collapse"),children:e("span",{"aria-hidden":"true",className:"absolute overflow-hidden",style:{bottom:0,right:0,width:16,height:16},children:e("span",{className:"absolute rounded-full border-[3px] border-[var(--orb-ai-accent)]",style:{width:32,height:32,top:-16,left:-16}})})})]})};cl.displayName="NavigationIsland2";var Ad=(t={})=>{let{initialCollapsed:o=false,initialDisplayMode:r="fixed",content:n=[],enablePinning:a,pinStorageKey:i,pinnedItemIds:s,defaultPinnedItemIds:l,onPinnedItemIdsChange:d,pinnedSectionTitle:p}=t,[m,h]=to.useState(o),[f,u]=to.useState(r),[b,y]=to.useState(n),g=to.useCallback(()=>{h(C=>!C);},[]),x=to.useCallback(()=>{u(C=>C==="fixed"?"floating":"fixed");},[]),v=to.useMemo(()=>({collapsed:m,onToggle:g,menuData:b,displayMode:f,onDisplayModeChange:u,enablePinning:a,pinStorageKey:i,pinnedItemIds:s,defaultPinnedItemIds:l,onPinnedItemIdsChange:d,pinnedSectionTitle:p}),[m,g,b,f,u,a,i,s,l,d,p]);return {collapsed:m,setCollapsed:h,toggleCollapsed:g,displayMode:f,setDisplayMode:u,toggleDisplayMode:x,menuData:b,setMenuData:y,navigationIslandProps:v}};var pl=class{constructor(){Ec(this,"listener",null);}register(o){this.listener=o;}unregister(){this.listener=null;}show(o,r,n){this.listener&&this.listener({type:o,content:r,options:n});}hide(){this.listener&&this.listener(null);}},cr=new pl,YT={success:(t,o)=>cr.show("success",t,o),error:(t,o)=>cr.show("error",t,o),warning:(t,o)=>cr.show("warning",t,o),info:(t,o)=>cr.show("info",t,o),show:(t,o,r)=>cr.show(t,o,r),hide:()=>cr.hide()};M();var jf={success:{icon:e(Vn,{size:40}),color:"var(--orb-success-bg)",iconColor:"var(--orb-success)"},warning:{icon:e(Xa,{size:40}),color:"var(--orb-warn-bg)",iconColor:"var(--orb-warn)"},error:{icon:e(za,{size:40}),color:"var(--orb-err-bg)",iconColor:"var(--orb-err)"},info:{icon:e(Wa,{size:40}),color:"var(--orb-info-bg)",iconColor:"var(--orb-info)"},default:{icon:null,color:"transparent",iconColor:"inherit"}},ta=({open:t,title:o,message:r,onClose:n,onConfirm:a,confirmText:i,cancelText:s,showCancel:l=true,maxWidth:d="xs",type:p="default"})=>{let{t:m}=de(),h=i||m("messageBox.confirm"),f=s||m("messageBox.cancel"),u=()=>{a?a():n();},b=jf[p],y=p!=="default";return c(Ot,{open:t,onClose:n,maxWidth:d,sx:y?{borderTop:`6px solid ${b.iconColor}`}:void 0,children:[y&&e("div",{style:{display:"flex",justifyContent:"center",paddingTop:24,color:b.iconColor},children:b.icon}),o&&e("div",{className:"orb-dialog-title",style:{textAlign:y?"center":"left",paddingTop:y?8:16},children:o}),e("div",{className:"orb-dialog-content",style:{textAlign:y?"center":"left"},children:typeof r=="string"?e("p",{style:{margin:0,color:"var(--orb-muted)"},children:r}):r}),c("div",{className:"orb-dialog-actions",style:{display:"flex",justifyContent:y?"center":"flex-end",gap:8,paddingBottom:24,paddingLeft:24,paddingRight:24},children:[l&&e(Te,{onClick:n,variant:"text",children:f}),e(Te,{onClick:u,variant:"contained",color:y&&p==="error"?"error":"primary",autoFocus:true,children:h})]})]})},nI=()=>{let[t,o]=to__namespace.default.useState(null),[r,n]=to__namespace.default.useState(false);to__namespace.default.useEffect(()=>{let s=l=>{l?(o(l),n(true)):(n(false),o(null));};return cr.register(s),()=>cr.unregister()},[]);let a=()=>{n(false),t?.options?.onClose&&t.options.onClose(),o(null);},i=()=>{t?.options?.onConfirm&&t.options.onConfirm(),n(false),o(null);};return t?e(ta,{open:r,type:t.type,message:t.content,title:t.options?.title,onClose:a,onConfirm:i,confirmText:t.options?.confirmText,cancelText:t.options?.cancelText,showCancel:t.options?.showCancel,maxWidth:t.options?.maxWidth}):null};M();var cI=({status:t,showIcon:o=true})=>{let r="gray",n,a=t;return t==="OK"?(r="blue",n=e(Vn,{size:14,strokeWidth:2}),a="Success"):t==="Error"?(r="orange",n=e(za,{size:14,strokeWidth:2}),a="Error"):t==="Warning"&&(r="orange",n=e(Xa,{size:14,strokeWidth:2}),a="Warning"),e(xt,{label:a,tone:r,icon:o&&n?n:void 0})};M();var uI=({dense:t,sx:o,className:r,children:n,...a})=>e("ul",{...a,className:r,style:{listStyle:"none",margin:0,padding:0,...o},children:n}),mI=({button:t,divider:o,sx:r,className:n,children:a,...i})=>e("li",{...i,className:n,style:{display:"flex",alignItems:"center",padding:"8px 16px",minHeight:40,borderBottom:o?"1px solid var(--orb-border)":void 0,cursor:t?"pointer":void 0,transition:"var(--orb-t-fast)",...r},onMouseEnter:t?s=>{s.currentTarget.style.background="var(--orb-hover)";}:void 0,onMouseLeave:t?s=>{s.currentTarget.style.background="";}:void 0,children:a}),gI=({sx:t,className:o,children:r,...n})=>e("button",{...n,type:"button",className:o,style:{width:"100%",display:"flex",alignItems:"center",padding:"8px 16px",border:"none",background:"transparent",textAlign:"left",cursor:"pointer",transition:"var(--orb-t-fast)",...t},children:r}),hI=({children:t,sx:o})=>e("div",{style:{marginRight:16,display:"flex",alignItems:"center",minWidth:40,...o},children:t}),fI=({primary:t,secondary:o,sx:r})=>c("div",{style:{flex:1,minWidth:0,...r},children:[e("div",{className:"orb-body",style:{fontWeight:500},children:t}),o&&e("div",{className:"orb-meta",style:{marginTop:2},children:o})]}),bI=({sx:t,className:o,children:r,...n})=>e("li",{...n,className:o,style:{padding:"8px 16px",fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.06em",color:"var(--orb-muted)",...t},children:r}),vI=({children:t,sx:o})=>e("div",{style:{marginRight:12,display:"flex",alignItems:"center",...o},children:t});M();var xI=({xs:t,md:o,lg:r,sx:n,children:a,className:i,...s})=>{let l=r?`span ${r}`:o?`span ${o}`:t?`span ${t}`:"span 12";return e("div",{...s,className:i,style:{gridColumn:l,minWidth:0,...n},children:a})};Gt();M();var Fo=ot,so=(t,o)=>to.forwardRef(({component:r,sx:n,className:a,style:i,children:s,...l},d)=>{let p=r??t,m=Ue(n,[o,a].filter(Boolean).join(" "),i);return e(p,{ref:d,className:m.className,style:m.style,...l,children:s})}),Me=so("div"),Ld=so("a","orb-link"),Hr=Ae,Od=le,xo=L;var Fd=se;var Bd=Nt,tr=nn,li=rn,ci=ja;var di=Ya,Hd=Qo,zd=({value:t,variant:o,color:r,sx:n})=>e(Kn,{value:o==="determinate"?t:void 0,color:r,sx:n}),Vd=so("table","orb-tbl"),Wd=so("tbody"),gl=so("td"),$d=so("div","orb-table-container"),_d=so("thead"),hl=so("tr");so("tfoot");so("div","orb-dialog-title");so("div","orb-dialog-content");so("div","orb-dialog-actions");so("p","orb-body-dense");var dr=so("span","orb-input-adornment"),Gd=to.forwardRef(({sx:t,fullWidth:o,className:r,style:n,...a},i)=>{let s=Ue(t,["orb-input-base",r].filter(Boolean).join(" "),n);return e("input",{ref:i,className:s.className,style:{width:o?"100%":void 0,...s.style},...a})});var xr=so("div","orb-form-control"),oa=({control:t,label:o,...r})=>c("label",{className:"orb-form-control-label",...r,children:[t,e("span",{children:o})]}),rb=({primary:t,secondary:o,children:r,primaryTypographyProps:n,secondaryTypographyProps:a,...i})=>c("span",{className:"orb-list-item-text",...i,children:[t??r,o?e("small",{children:o}):null]}),nb=so("span","orb-list-item-icon"),Ut=rb,_o=nb;so("div","orb-list-subheader");var fl=({container:t,item:o,spacing:r,xs:n,sm:a,md:i,lg:s,xl:l,sx:d,...p})=>{let m={},h=f=>typeof f=="number"?`${f/12*100}%`:f?"100%":void 0;return n!==void 0&&(m.xs=h(n)),a!==void 0&&(m.sm=h(a)),i!==void 0&&(m.md=h(i)),s!==void 0&&(m.lg=h(s)),l!==void 0&&(m.xl=h(l)),e(Me,{...p,sx:{display:t?"flex":void 0,flexWrap:t?"wrap":void 0,gap:t&&r?r:void 0,width:o?m:void 0,...d??{}}})},an=({in:t,children:o,unmountOnExit:r,...n})=>!t&&r?null:e("div",{hidden:!t,...n,children:o}),Ud=({children:t,container:o})=>typeof document>"u"?null:reactDom.createPortal(t,o??document.body),Kd=so("div","orb-toolbar"),qd=({active:t,direction:o="asc",children:r,sx:n,className:a,style:i,...s})=>{let l=Ue(n,["orb-table-sort-label",t?"orb-is-active":"",a].filter(Boolean).join(" "),i);return c("button",{type:"button",className:l.className,style:l.style,"data-direction":o,...s,children:[e("span",{className:"orb-table-sort-content",children:r}),e(Tt,{className:"orb-table-sort-icon",name:o==="desc"?"down":"up",size:11})]})},pi=({open:t,anchorEl:o,onClose:r,children:n,anchorOrigin:a,transformOrigin:i,slotProps:s,PaperProps:l,sx:d,className:p,style:m,...h})=>{let f=to.useRef(null);if(to.useEffect(()=>{if(!t)return;let x=C=>{let P=C.composedPath();f.current&&P.includes(f.current)||o&&P.includes(o)||r?.();},v=C=>{C.key==="Escape"&&r?.();};return document.addEventListener("pointerdown",x,true),document.addEventListener("keydown",v,true),()=>{document.removeEventListener("pointerdown",x,true),document.removeEventListener("keydown",v,true);}},[o,r,t]),!t||typeof document>"u")return null;let u=o?.getBoundingClientRect(),b=s?.paper??l,y=[...Array.isArray(b?.sx)?b.sx:b?.sx?[b.sx]:[],...Array.isArray(d)?d:d?[d]:[]],g=Ue(y,["orb-pop",b?.className,p].filter(Boolean).join(" "),{...b?.style,...m});return reactDom.createPortal(e("div",{...h,ref:f,className:g.className,style:{position:"fixed",left:u?.left??16,top:(u?.bottom??16)+6,zIndex:1301,...g.style},children:n}),document.body)},Xd=({open:t,onClose:o,anchor:r="left",children:n,PaperProps:a})=>{if(!t||typeof document>"u")return null;let i=r==="right"?{right:0,top:0,bottom:0}:r==="top"?{left:0,right:0,top:0}:r==="bottom"?{left:0,right:0,bottom:0}:{left:0,top:0,bottom:0},s=Ue(a?.sx,"orb-drawer");return reactDom.createPortal(c(jsxRuntime.Fragment,{children:[e("button",{type:"button",className:"orb-overlay","aria-label":"Close drawer",onClick:o}),e("aside",{className:s.className,style:{position:"fixed",zIndex:1201,...i},children:n})]}),document.body)},Zd=({value:t,onChange:o,children:r,variant:n,scrollButtons:a,...i})=>e("div",{role:"tablist",className:"orb-tabs",...i,children:to.Children.map(r,s=>to.isValidElement(s)?to.cloneElement(s,{selected:s.props.value===t,onSelect:l=>o?.(null,l)}):s)}),Yd=({value:t,label:o,children:r,selected:n,onSelect:a,...i})=>e("button",{type:"button",role:"tab","aria-selected":n,className:`orb-tab ${n?"orb-is-active":""}`,onClick:()=>a?.(t),...i,children:o??r});var lo=()=>Oa(),wr=(t,o)=>Eo(t);var jd=({day:t,onDaySelect:o,selected:r,outsideCurrentMonth:n,disableMargin:a,sx:i,className:s,...l})=>{let d=Ue(i,`orb-cal-day ${r?"orb-is-selected":""} ${n?"orb-is-outside":""} ${s??""}`);return e("button",{type:"button",className:d.className,style:d.style,onClick:()=>o?.(t),...l,children:t.date()})},Qd=({value:t,referenceDate:o,onChange:r,onMonthChange:n,onYearChange:a,minDate:i,maxDate:s,slots:l,...d})=>e(Zn,{value:t,month:o,onChange:p=>r?.(p),onMonthChange:p=>{n?.(p),a?.(p);},minDate:i,maxDate:s,renderDay:l?.day?(p,m)=>l.day?.({day:p,selected:m.selected,outsideCurrentMonth:m.outsideCurrentMonth,onDaySelect:h=>r?.(h)}):void 0,...d}),Jd=({children:t})=>e(jsxRuntime.Fragment,{children:t}),si=class{};Gt();M();var ab=(t,o)=>o!==void 0?o:typeof t=="number"?t:t==="small"?18:t==="large"?30:t==="inherit"?"1em":22,Pe=t=>({fontSize:r,size:n,sx:a,className:i,style:s,titleAccess:l,...d})=>{let p=Ue(a,i,s);return e(Tt,{name:t,size:ab(r,n),className:p.className,style:p.style,"aria-label":d["aria-label"]??l,...d})},Sr=Pe("tree"),zr=Pe("add"),ep=Pe("duplicate"),bl=Pe("down"),tp=Pe("navigationRight"),op=Pe("navigationRight"),vl=Pe("up"),rp=Pe("delete"),np=Pe("camera"),ap=Pe("accept"),ip=Pe("accept"),ui=Pe("navigationRight"),sp=Pe("dimension"),yl=Pe("decline"),kr=Pe("decline"),lp=Pe("decline"),cp=Pe("decline"),mi=Pe("delete"),gi=Pe("delete"),dp=Pe("download"),pp=Pe("move"),up=Pe("edit"),sn=Pe("slimDown"),mp=Pe("filter"),ln=Pe("sum"),gp=Pe("lineChart"),hp=Pe("document"),Go=Pe("slimDown"),fp=Pe("navigationLeft"),Pr=Pe("navigationRight"),hi=Pe("slimUp"),fi=Pe("navigationLeft"),bi=Pe("navigationRight"),bp=Pe("dimension"),vp=Pe("splitOne"),vi=Pe("menu"),yp=Pe("microphone"),Cp=Pe("microphone"),xp=Pe("microphone"),wp=Pe("qrCode"),Tr=Pe("save"),Vr=Pe("search"),Sp=Pe("search"),kp=Pe("paperPlane"),Pp=Pe("paperPlane"),Tp=Pe("wrench"),Ip=Pe("sort"),yi=Pe("splitTwo"),Mp=Pe("favorite"),Rp=Pe("favorite"),Cl=Pe("stop"),Np=Pe("tableRow"),Ci=Pe("collapseAll"),xi=Pe("expandAll"),cn=Pe("tableColumn"),Dp=Pe("overview"),Ap=Pe("hide");M();var sb=[{field:"value",label:"Value",minWidth:120},{field:"label",label:"Description",minWidth:180}],Lp=t=>Array.isArray(t)?t:t==null||t===""?[]:[t],Io=t=>String(t),Op=(t,o)=>t[o],Fp=t=>{let o=t.value??t.id??t.key??t.code;return typeof o=="number"||typeof o=="string"?o:""},lb=t=>{let o=t.label??t.description??t.name??t.title;return String(typeof o=="number"||typeof o=="string"?o:Fp(t))},cb=t=>{let o=t.description??t.subtitle;return typeof o=="number"||typeof o=="string"?String(o):void 0},Bp=({value:t=null,items:o=[],columns:r,mode:n="single",dialogTitle:a="Value Help",searchPlaceholder:i="Search values...",selectLabel:s="Select",clearLabel:l="Clear",cancelLabel:d="Cancel",valueHelpLabel:p="Open value help",noResultsText:m="No matching values",loading:h=false,clearable:f=true,allowManualInput:u=true,validateManualInput:b=true,manualInputErrorText:y="Enter a valid value.",selectedItems:g=[],displayValue:x,getOptionValue:v=Fp,getOptionLabel:C=lb,getOptionDescription:P=cb,onChange:S,onSearch:I,disabled:R,InputProps:w,onFocus:A,onBlur:D,onKeyDown:T,error:k,helperText:E,...O})=>{let $=bo(),ee=n==="multiple",[F,G]=to.useState(false),[W,Q]=to.useState(false),[z,H]=to.useState(""),[X,Y]=to.useState(null),[j,te]=to.useState(false),[ce,fe]=to.useState(()=>Lp(t)),[Ve,ve]=to.useState(""),[xe,He]=to.useState(""),pe=to.useMemo(()=>r&&r.length>0?r:sb,[r]),ye=X??o,$e=to.useMemo(()=>{let re=[...g,...o,...X??[]],Ce=new Map;return re.forEach(De=>{Ce.set(Io(v(De)),De);}),Ce},[v,o,X,g]),tt=to.useMemo(()=>Lp(t),[t]),at=to.useMemo(()=>tt.map(String).join(", "),[tt]);to.useEffect(()=>{F||fe(tt);},[F,tt]),to.useEffect(()=>{!W&&!xe&&ve(at);},[W,at,xe]);let st=to.useMemo(()=>{let re=z.trim().toLowerCase();if(!re||I)return ye;let Ce=pe.filter(De=>De.searchable!==false);return ye.filter(De=>[v(De),C(De),P(De),...Ce.map(lt=>Op(De,lt.field))].some(lt=>String(lt??"").toLowerCase().includes(re)))},[ye,P,C,v,I,z,pe]),K=to.useMemo(()=>{if(x!==void 0)return x;if(tt.length===0)return "";let re=Ce=>{let De=$e.get(Io(Ce));if(!De)return String(Ce);let Je=C(De);return Je&&Je!==String(Ce)?`${Ce} - ${Je}`:String(Ce)};return ee?tt.length>2?`${tt.length} selected`:tt.map(re).join(", "):re(tt[0])},[x,C,ee,$e,tt]),Ne=to.useCallback(async()=>{if(I){te(true);try{let re=await I(z);Array.isArray(re)&&Y(re);}finally{te(false);}}},[I,z]),Se=()=>{R||(fe(tt),G(true));},Fe=()=>{G(false);},it=()=>{S?.(ee?[]:null,ee?[]:null),fe([]),ve(""),He("");},Ye=re=>{let Ce=v(re);if(ee){fe(De=>De.some(lt=>Io(lt)===Io(Ce))?De.filter(lt=>Io(lt)!==Io(Ce)):[...De,Ce]);return}fe([Ce]);},wt=()=>{let re=ce.map(Ce=>$e.get(Io(Ce))).filter(Ce=>!!Ce);ee?S?.(ce,re):S?.(ce[0]??null,re[0]??null),He(""),G(false);},Mt=re=>{if(re.key==="F4"){re.preventDefault(),Se();return}if(re.key==="Enter"&&u&&!Et(Ve,true)){re.preventDefault();return}T?.(re);},Ft=re=>b?re.every(Ce=>$e.has(Io(Ce))):true,Et=(re,Ce)=>{if(ee){let Je=re.split(/[,;\n]/).map(ut=>ut.trim()).filter(Boolean);if(Je.length===0)return He(""),S?.([],[]),true;if(!Ft(Je))return Ce&&He(y),false;He("");let lt=Je.map(ut=>$e.get(Io(ut))).filter(ut=>!!ut);return S?.(Je,lt),true}let De=re.trim();return De?Ft([De])?(He(""),S?.(De,$e.get(Io(De))??null),true):(Ce&&He(y),false):(He(""),S?.(null,null),true)},ne=re=>{if(!u)return;let Ce=re.target.value;ve(Ce),He(""),Et(Ce,false);},Ke=h||j,Oe=tt.length>0,we=u&&(W||!!xe)?Ve:K;return c(jsxRuntime.Fragment,{children:[e(ze,{...O,className:["orb-value-help-field",f&&Oe&&!R?"orb-value-help-has-clear":"",O.className??""].filter(Boolean).join(" "),disabled:R,value:we,error:!!xe||k,helperText:xe||E,onChange:ne,onFocus:re=>{Q(true),ve(at),A?.(re);},onBlur:re=>{u&&Et(Ve,true),Q(false),D?.(re);},onKeyDown:Mt,InputProps:{...w,readOnly:!u,endAdornment:c("span",{className:"orb-value-help-actions",children:[Ke?e(Qo,{size:18}):null,f&&Oe&&!R?e(se,{className:"orb-value-help-clear-trigger",size:"small",tooltip:l,"aria-label":l,onMouseDown:re=>re.preventDefault(),onClick:re=>{re.stopPropagation(),it();},children:e(Tt,{name:"decline",size:14})}):null,e(se,{className:"orb-value-help-search-trigger",size:"small",tooltip:p,"aria-label":p,onMouseDown:re=>re.preventDefault(),onClick:re=>{re.stopPropagation(),Se();},disabled:R,children:e(Tt,{name:"search",size:16})})]})}}),c(Ot,{open:F,onClose:Fe,fullWidth:true,maxWidth:820,hideCloseButton:true,PaperProps:{sx:re=>({borderRadius:2,overflow:"hidden",border:`1px solid ${re.palette.divider}`,boxShadow:$==="dark"?`0 24px 80px ${ot(re.palette.common.black,.72)}`:`0 24px 80px ${ot(re.palette.common.black,.18)}`})},children:[c("div",{className:"orb-dialog-title",sx:re=>({display:"flex",alignItems:"center",justifyContent:"space-between",gap:2,px:2.5,py:2,pr:1.5,borderBottom:`1px solid ${re.palette.divider}`,bgcolor:re.palette.background.paper}),children:[c("div",{children:[e(L,{sx:{fontSize:"1.05rem",fontWeight:800,lineHeight:1.25},children:a}),ee?e(L,{variant:"body2",color:"text.secondary",sx:{mt:.25},children:`${ce.length} selected`}):null]}),e(se,{"aria-label":"Close",onClick:Fe,size:"small",children:e(kr,{fontSize:"small"})})]}),c("div",{className:"orb-dialog-content",sx:{p:0},children:[c(le,{direction:{xs:"column",sm:"row"},spacing:1,sx:re=>({px:2.5,py:1.5,borderBottom:`1px solid ${re.palette.divider}`,bgcolor:$==="dark"?ot(re.palette.common.white,.025):ot(re.palette.primary.main,.035)}),children:[e(ze,{size:"small",fullWidth:true,autoFocus:true,value:z,placeholder:i,onChange:re=>H(re.target.value),onKeyDown:re=>{re.key==="Enter"&&(re.preventDefault(),Ne());},InputProps:{startAdornment:e(dr,{position:"start",children:e(Tt,{name:"search",size:16})}),sx:re=>({borderRadius:1,bgcolor:re.palette.background.paper,"& fieldset":{borderColor:ot(re.palette.text.primary,$==="dark"?.2:.16)},"&:hover fieldset":{borderColor:ot(re.palette.primary.main,.52)},"&:focus-within fieldset":{borderColor:re.palette.primary.main}})}}),I?e(Te,{variant:"outlined",onClick:()=>{Ne();},disabled:Ke,sx:{minWidth:96,textTransform:"none",fontWeight:700},children:Ke?e(Qo,{size:18}):"Search"}):null]}),e("div",{sx:{maxHeight:420},children:c("table",{className:"orb-tbl",stickyHeader:true,size:"small",children:[e("thead",{children:c("tr",{children:[e("td",{padding:"checkbox",sx:re=>({bgcolor:$==="dark"?"var(--orb-canvas)":re.palette.background.paper,borderBottom:`1px solid ${re.palette.divider}`})}),pe.map(re=>e("td",{align:re.align==="inherit"?void 0:re.align,sx:Ce=>({minWidth:re.minWidth,width:re.width,fontSize:"0.78rem",fontWeight:800,bgcolor:$==="dark"?"var(--orb-canvas)":Ce.palette.background.paper,borderBottom:`1px solid ${Ce.palette.divider}`}),children:re.label},String(re.field)))]})}),c("tbody",{children:[st.map(re=>{let Ce=v(re),De=ce.some(Je=>Io(Je)===Io(Ce));return c("tr",{hover:true,selected:De,onClick:()=>Ye(re),onDoubleClick:()=>{ee||(fe([Ce]),S?.(Ce,re),G(false));},sx:Je=>({cursor:"pointer","&.orb-selected":{bgcolor:ot(Je.palette.primary.main,$==="dark"?.22:.12)},"&.orb-selected:hover":{bgcolor:ot(Je.palette.primary.main,$==="dark"?.28:.18)}}),children:[e("td",{padding:"checkbox",children:e(It,{size:"small",checked:De})}),pe.map(Je=>{let lt=Op(re,Je.field);return e("td",{align:Je.align==="inherit"?void 0:Je.align,sx:{fontSize:"0.82rem",py:1},children:Je.render?Je.render(lt,re):String(lt??"")},String(Je.field))})]},Io(Ce))}),st.length===0?e("tr",{children:e("td",{colSpan:pe.length+1,children:e("div",{sx:{py:5,textAlign:"center",color:"text.secondary"},children:m})})}):null]})]})})]}),c("div",{className:"orb-dialog-actions",sx:re=>({px:2.5,py:1.5,borderTop:`1px solid ${re.palette.divider}`,bgcolor:re.palette.background.paper,"& .orb-btn":{textTransform:"none",fontWeight:700}}),children:[f&&(Oe||ce.length>0)?e(Te,{onClick:it,children:l}):null,e("div",{sx:{flex:1}}),e(Te,{onClick:Fe,children:d}),e(Te,{variant:"contained",onClick:wt,disabled:!ee&&ce.length===0,children:s})]})]})]})};M();var wi=({title:t,hideHeader:o,children:r})=>c("div",{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[!o&&e("div",{sx:{mb:2},children:e(L,{variant:"h4",children:t})}),e("div",{sx:{flex:1,overflow:"hidden"},children:r})]});var xl={width:56,minWidth:56,maxWidth:56,paddingLeft:"4px !important",paddingRight:"4px !important",paddingTop:"0 !important",paddingBottom:"0 !important",textAlign:"center",verticalAlign:"middle",boxSizing:"border-box"},wl={width:72,minWidth:72,maxWidth:72,paddingLeft:"4px !important",paddingRight:"4px !important",paddingTop:"0 !important",paddingBottom:"0 !important",textAlign:"center",verticalAlign:"middle",boxSizing:"border-box"},ra={width:30,height:30,p:.25,flex:"0 0 auto","& svg":{fontSize:20}},na={width:30,height:30,minWidth:30,minHeight:30,p:.25,flex:"0 0 auto","& svg":{fontSize:20}},Hp={display:"flex",alignItems:"center",justifyContent:"center",gap:.25,width:"100%",minWidth:0},mo={width:32,height:32,minWidth:32,minHeight:32,p:0,flex:"0 0 auto",borderRadius:1,color:"text.secondary","& svg, & [data-sap-icon]":{width:16,height:16,fontSize:16,strokeWidth:1.8}};M();var db={fontSize:"0.85rem",width:62,minWidth:62,"& .orb-select-trigger":{minHeight:"32px !important",height:"32px !important",padding:"0 8px !important"},"& .orb-select-chevron":{width:"11px !important",height:"11px !important",fontSize:"11px !important"}},Si=({rowsPerPage:t=20,rowsPerPageOptions:o=[20,50,100,-1],page:r=0,count:n=0,onRowsPerPageChange:a,onPageChange:i})=>{let{t:s}=de(),l=o.length>0?o:[20,50,100,-1],d=Math.max(0,r),p=t===-1?1:Math.max(1,Math.ceil(n/t)),m=Math.min(d+1,p),h=d>0,f=d<p-1&&t!==-1;return c("div",{className:"orb-table-pager",children:[e(L,{className:"orb-table-pager-label",children:s("table.toolbar.itemsPerPage")}),e(dt,{title:s("table.toolbar.itemsPerPage"),children:e(Vt,{size:"small",variant:"standard",value:t,"aria-label":s("table.toolbar.itemsPerPage"),fullWidth:false,disableUnderline:true,onChange:u=>a?.(Number(u.target.value)),sx:db,children:l.map(u=>e("option",{value:u,children:u===-1?s("common.all"):u},`rows-per-page-${u}`))})}),e("span",{className:"orb-table-pager-divider"}),e(se,{className:"orb-table-pager-button","aria-label":"Previous page",size:"small",onClick:()=>i?.(Math.max(d-1,0)),disabled:!h,sx:mo,children:e(fp,{})}),c(L,{className:"orb-table-pager-page",title:s("table.toolbar.pageOf",{current:m,total:p}),children:[m," / ",p]}),e(se,{className:"orb-table-pager-button","aria-label":"Next page",size:"small",onClick:()=>i?.(Math.min(d+1,p-1)),disabled:!f,sx:mo,children:e(Pr,{})})]})};M();var ki=({value:t="",onChange:o})=>{let{t:r}=de();return e("div",{className:"orb-table-toolbar-search",children:e(ze,{className:"orb-table-toolbar-search-field",size:"small",placeholder:r("table.toolbar.searchPlaceholder"),value:t,onChange:n=>o?.(n.target.value),InputProps:{startAdornment:e(dr,{position:"start",children:e(Vr,{size:16})})}})})};M();var Pi=t=>{let{t:o}=de(),r=Array.isArray(t.actions)?t.actions:t.actions?[t.actions]:[],n=Array.isArray(t.extraTools)?t.extraTools:t.extraTools?[t.extraTools]:[],a=[...r,...n],i=!!(t.showCreateButton||t.showEditButton||t.showDeleteButton),s=!!(t.onOpenGraphReport||t.onLayoutSave&&!t.layoutManager||t.layoutManager);return e(Kd,{className:"orb-table-toolbar",role:"toolbar","aria-label":o("table.title.default"),children:c("div",{className:"orb-table-toolbar-primary",children:[e(ki,{value:t.filterText,onChange:l=>{t.setFilterText(l),t.onPageChange?.(0);}}),e(Si,{rowsPerPage:t.rowsPerPage,rowsPerPageOptions:t.rowsPerPageOptions,page:t.page,count:t.count,onRowsPerPageChange:t.onRowsPerPageChange,onPageChange:t.onPageChange}),a.length>0?e("div",{className:"orb-table-toolbar-custom",children:a.map((l,d)=>e(to__namespace.default.Fragment,{children:l},`toolbar-custom-${d}`))}):null,e("span",{className:"orb-table-toolbar-spacer"}),c("div",{className:"orb-table-toolbar-actions",children:[c("div",{className:"orb-table-tool-group",children:[!t.disableGrouping&&e(dt,{title:o("table.toolbar.groupBy"),children:e(se,{className:"orb-table-tool-button",sx:mo,onClick:l=>t.setGroupAnchorEl(t.groupAnchorEl?null:l.currentTarget),children:e(ci,{badgeContent:t.grouping?.length,color:"primary",invisible:!t.grouping?.length,children:e(Sr,{})})})}),e(dt,{title:o("table.toolbar.summary"),children:e(se,{className:`orb-table-tool-button ${t.showSummary?"orb-is-active":""}`,active:!!t.showSummary,sx:mo,onClick:l=>t.setSummaryAnchorEl(t.summaryAnchorEl?null:l.currentTarget),children:e(ln,{})})}),e(dt,{title:o("table.toolbar.columns"),children:e(se,{className:"orb-table-tool-button",sx:mo,onClick:l=>t.setAnchorEl(t.anchorEl?null:l.currentTarget),children:e(cn,{})})}),e(dt,{title:o("table.toolbar.export"),children:e(se,{className:"orb-table-tool-button",sx:mo,onClick:t.handleExport,children:e(dp,{})})})]}),i&&c("div",{className:"orb-table-tool-group",children:[t.showCreateButton&&e(dt,{title:o("table.toolbar.newItem"),children:e(se,{className:"orb-table-tool-button",onClick:t.onOpenCreateDialog,color:"primary.main",sx:mo,children:e(zr,{})})}),t.showEditButton&&e(dt,{title:o("table.toolbar.editItem"),children:e("span",{children:e(se,{className:"orb-table-tool-button",onClick:t.onOpenEditDialog,color:"primary.main",disabled:!!t.editDisabled,sx:mo,children:e(up,{})})})}),t.showDeleteButton&&e(dt,{title:o("table.toolbar.deleteItem"),children:e("span",{children:e(se,{className:"orb-table-tool-button",onClick:t.onOpenDeleteConfirm,disabled:!!t.deleteDisabled,sx:{...mo,color:"error.main"},children:e(mi,{})})})})]}),s&&c("div",{className:"orb-table-tool-group",children:[t.onOpenGraphReport&&e(dt,{title:o("table.toolbar.graphicReport"),children:e(se,{className:"orb-table-tool-button",sx:mo,onClick:t.onOpenGraphReport,children:e(gp,{})})}),t.onLayoutSave&&!t.layoutManager&&e(dt,{title:o("table.toolbar.saveLayout"),children:e(se,{className:"orb-table-tool-button",sx:mo,onClick:l=>t.onLayoutSave(l),children:e(Tr,{})})}),t.layoutManager]})]})]})})};var Ti=Object.freeze({Translate:{toString(t){if(!t)return;let{x:o,y:r}=t;return "translate3d("+(o?Math.round(o):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;let{scaleX:o,scaleY:r}=t;return "scaleX("+o+") scaleY("+r+")"}},Transform:{toString(t){if(t)return [Ti.Translate.toString(t),Ti.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:o,duration:r,easing:n}=t;return o+" "+r+"ms "+n}}});M();var Ii=t=>{let{t:o}=de(),{onSelectAllClick:r,order:n,orderBy:a,sortBy:i=[],numSelected:s=0,rowCount:l=0,onRequestSort:d,onContextMenu:p,columns:m,visibleColumns:h,selectionMode:f,grouping:u=[],isAllExpanded:b=false,handleToggleAll:y,onColumnResize:g,columnWidths:x,enableColumnReorder:v=false,disableSorting:C=false}=t,[P,S]=to.useState(null),I=to.useRef(null),R=W=>Q=>{C||P||d(W);},w=(W,Q,z)=>{W.preventDefault(),W.stopPropagation(),S(Q),I.current={startX:W.clientX,startWidth:z,colId:Q},document.addEventListener("mousemove",A),document.addEventListener("mouseup",D),document.body.style.cursor="col-resize";},A=W=>{if(!I.current)return;let{startX:Q,startWidth:z,colId:H}=I.current,X=W.clientX-Q,Y=Math.max(50,z+X);g&&g(H,Y);},D=()=>{S(null),I.current=null,document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",D),document.body.style.cursor="";};to.useEffect(()=>()=>{document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",D);},[]);let T=f==="multiple"||f==="single",k=u.length>0&&!!y,E=o(b?"table.group.collapseAll":"table.group.expandAll"),O=m.filter(W=>h.includes(W.id)),$=new Map(i.map((W,Q)=>[W.field,{...W,priority:Q+1}])),ee=O.map(W=>{let Q=x?.[W.id]||W.minWidth||100,z=$.get(W.id);return e(vb,{headCell:W,width:typeof Q=="number"?Q:100,order:n,orderBy:a,multiSortInfo:C?void 0:z,onRequestSort:R(W.id),onContextMenu:p,onResizeMouseDown:H=>w(H,W.id,typeof Q=="number"?Q:100),enableColumnReorder:v,disableSorting:C},W.id)}),F=O.map(W=>W.id),G=c("tr",{children:[T&&e("th",{className:"orb-table-control-head",style:{width:56,minWidth:56,maxWidth:56},children:e(It,{color:"primary",indeterminate:s>0&&s<l,checked:l>0&&s===l,onChange:r,disabled:f==="single",sx:ra})}),k&&e("th",{className:"orb-table-control-head",style:{width:72,minWidth:72,maxWidth:72},children:e(dt,{title:E,children:e(se,{size:"small",onClick:W=>{W.stopPropagation(),y?.(!b);},sx:na,children:b?e(Ci,{}):e(xi,{})})})}),v?e(sortable.SortableContext,{items:F,strategy:sortable.horizontalListSortingStrategy,children:ee}):ee]});return e("thead",{children:G})},vb=({headCell:t,width:o,order:r,orderBy:n,multiSortInfo:a,onRequestSort:i,onContextMenu:s,onResizeMouseDown:l,enableColumnReorder:d,disableSorting:p})=>{let{setNodeRef:m,attributes:h,listeners:f,transform:u,transition:b,isDragging:y}=sortable.useSortable({id:t.id,disabled:!d}),g=d?{transform:Ti.Transform.toString(u),transition:b,opacity:y?.6:1}:{},x=p?"asc":a?.direction??(n===t.id?r:"asc"),v=!p&&(!!a||n===t.id);return c("th",{ref:d?m:void 0,className:`orb-table-head-cell ${t.numeric?"orb-num":""} ${d?"orb-is-reorderable":""} ${y?"orb-is-dragging":""}`,"aria-sort":v?x==="asc"?"ascending":"descending":"none",onContextMenu:s?C=>s(C,t.id):void 0,style:{width:o,minWidth:o,maxWidth:o,...g},...d?h:{},...d?f:{},children:[p?e("span",{className:"orb-table-head-label",children:t.label}):e(qd,{className:"orb-table-head-sort",active:v,direction:x,onClick:i,children:c("span",{className:"orb-table-head-label",children:[t.label,a&&e("span",{className:"orb-table-sort-priority",children:a.priority})]})}),e("div",{className:"orb-table-resize-handle",onMouseDown:l,onPointerDown:C=>C.stopPropagation(),onClick:C=>C.stopPropagation()})]})};M();var Mi=t=>{let{t:o}=de(),{visibleRows:r,visibleColumns:n,selected:a=[],handleClick:i,columns:s,toggleGroupExpand:l,expandedGroups:d=new Set,selectionMode:p,grouping:m=[],isGroupFullyExpanded:h,handleExpandGroupRecursively:f,handleCollapseGroupRecursively:u,emptyLabel:b,getRowDataKey:y,getRowProps:g,getGroupRowProps:x}=t,v=I=>a.indexOf(I)!==-1,C=p==="multiple"||p==="single",P=m.length>0,S=n.length+(C?1:0)+(P?1:0);return c("tbody",{children:[r.map((I,R)=>{if(I.type==="group"){let w=d.has(I.id),A=I.childIds||[],D=A.filter(W=>v(W)).length,T=A.length>0&&D===A.length,k=D>0&&D<A.length,E={entry:I,data:I,id:I.id,index:R,selected:T,group:true},O=x?.(E)||{},{className:$,onClick:ee,...F}=O,G=W=>{if(W.stopPropagation(),!!t.onSelectionChange)if(T){let Q=a.filter(z=>!A.includes(z));t.onSelectionChange(Q);}else {let Q=Array.from(new Set([...a,...A]));t.onSelectionChange(Q);}};return c("tr",{...F,"data-ctable-row-key":y?.(E),className:["orb-table-group-row",$].filter(Boolean).join(" "),onClick:ee,sx:W=>({backgroundColor:"var(--orb-surface)","& th, & td":{color:W.palette.text.primary,borderBottomColor:W.palette.divider},"& .orb-icon-btn":{color:W.palette.text.primary},"& .orb-chk":{color:W.palette.text.secondary},"& .orb-chk:has(input:checked), & .orb-chk:has(input:indeterminate)":{color:W.palette.primary.main}}),children:[C&&e("td",{padding:"checkbox",sx:xl,children:e(It,{size:"small",checked:T,indeterminate:k,onChange:G,onClick:W=>W.stopPropagation(),sx:ra})}),P&&e("td",{padding:"checkbox",sx:wl,children:c("div",{sx:Hp,children:[m.length>1&&I.level<m.length-1&&e(dt,{title:h?.(I.id)?o("table.group.collapseAll"):o("table.group.expandAll"),children:e(se,{size:"small",onClick:()=>{h?.(I.id)?u?.(I.id):f?.(I.id);},sx:na,children:h?.(I.id)?e(Ci,{}):e(xi,{})})}),e(se,{size:"small",onClick:()=>l&&l(I.id),sx:na,children:w?e(Go,{}):e(Pr,{})})]})}),e("td",{colSpan:n.length,sx:{py:1,pl:I.level*3+1},children:c(L,{variant:"body2",fontWeight:"bold",color:"text.primary",sx:{fontSize:"0.85rem"},children:[I.field,": ",I.value," (",I.count,")"]})})]},I.id)}else {let w=I.data||I,A=I.id||w.id||R,D=v(A),T=`enhanced-table-checkbox-${R}`,k={entry:I,data:w,id:A,index:R,selected:D,group:false},E=g?.(k)||{},{className:O,onClick:$,...ee}=E,G=(I.level!==void 0?I.level:0)*4;return c("tr",{...ee,"data-ctable-row-key":y?.(k),className:[D?"orb-is-selected":"",O].filter(Boolean).join(" "),onClick:W=>{$?.(W),W.defaultPrevented||i?.(W,w);},role:C?"checkbox":ee.role,"aria-checked":C?D:ee["aria-checked"],tabIndex:ee.tabIndex??-1,children:[C&&e("td",{padding:"checkbox",sx:xl,children:e(It,{color:"primary",checked:D,inputProps:{"aria-labelledby":T},sx:ra})}),P&&e("td",{padding:"checkbox",sx:wl}),s.filter(W=>n.includes(W.id)).map((W,Q)=>{let H=Q===0&&G>0?{pl:G+2}:{};return e("td",{className:W.numeric?"orb-num":void 0,align:W.numeric?"right":"left",sx:H,children:W.render?W.render(w[W.id],w):(function(){let Y=w[W.id];if(W.numeric){if(typeof Y=="number")return Y.toLocaleString();if(typeof Y=="string"&&Y.trim()!==""&&!isNaN(Number(Y)))return Number(Y).toLocaleString()}return Y})()},W.id)})]},A)}}),r.length===0&&e("tr",{children:e("td",{colSpan:S,align:"center",children:b??o("common.noData")})})]})};M();var zp=t=>{let{columns:o=[],visibleColumns:r,summaryRow:n,selectionMode:a,grouping:i=[],columnWidths:s={}}=t;if(!t.showSummary)return null;let l=a==="multiple"||a==="single",d=i.length>0,p=o.filter(m=>r.includes(m.id));return e("tfoot",{className:"orb-table-footer",style:{zIndex:t.zIndex},children:c("tr",{children:[l&&e("td",{className:"orb-table-footer-control",style:{width:56,minWidth:56,maxWidth:56}}),d&&e("td",{className:"orb-table-footer-control",style:{width:72,minWidth:72,maxWidth:72}}),p.map(m=>e("td",{className:`orb-table-footer-cell ${m.numeric?"orb-num":""}`,style:{width:s[m.id]||m.minWidth||100,minWidth:s[m.id]||m.minWidth||100,maxWidth:s[m.id]||m.minWidth||100},children:(function(){let f=n[m.id];return f==null||f===""?"":typeof f=="number"?f.toLocaleString():typeof f=="string"&&f.trim()!==""&&!isNaN(Number(f))?Number(f).toLocaleString():f})()},m.id))]})})};M();var Vp=t=>{let{t:o}=de();return e("div",{sx:{p:2},children:e(L,{children:o("table.mobile.notImplemented")})})};M();var un=({groupAnchorEl:t,setGroupAnchorEl:o,grouping:r,setGrouping:n,columns:a})=>{let{t:i}=de(),[s,l]=to.useState(r);to.useEffect(()=>{t&&l(r);},[t,r]);let d=()=>{l(r),o(null);},p=h=>{l(f=>f.includes(h)?f.filter(u=>u!==h):[...f,h]);},m=()=>{n(s),o(null);};return c(Jt,{anchorEl:t,open:!!t,onClose:d,sx:{width:224,minWidth:224,maxHeight:360,overflowY:"auto"},children:[c("div",{className:"orb-table-group-menu-header",onClick:h=>h.stopPropagation(),children:[e(L,{className:"orb-table-group-menu-title",variant:"subtitle2",children:i("table.menu.groupBy")}),s.length>0&&e(Te,{className:"orb-table-group-menu-clear",size:"small",color:"error",onClick:h=>{h.stopPropagation(),l([]);},children:i("table.menu.clearAll")})]}),e(Nt,{className:"orb-table-group-menu-divider"}),a.map(h=>{let f=s.includes(h.id),u=s.indexOf(h.id)+1;return e("option",{className:"orb-table-group-menu-option",selected:f,onClick:b=>{b.stopPropagation(),p(h.id);},children:c("div",{className:"orb-table-group-menu-option-content",children:[e(It,{className:"orb-table-group-menu-checkbox",checked:f,size:"small"}),e(Ut,{className:"orb-table-group-menu-label",primary:h.label}),f&&e("span",{className:"orb-table-group-menu-order","aria-label":`${i("table.menu.groupBy")} ${u}`,children:u})]})},h.id)}),c("div",{className:"orb-table-group-menu-footer",children:[e(Te,{size:"small",variant:"ghost",onClick:d,children:i("common.cancel")}),e(Te,{size:"small",variant:"primary",onClick:m,children:i("common.ok")})]})]})},mn=({anchorEl:t,setAnchorEl:o,columns:r,visibleColumns:n,toggleColumnVisibility:a})=>{let{t:i}=de();return c(Jt,{anchorEl:t,open:!!t,onClose:()=>o(null),children:[e("option",{disabled:true,children:e(Ut,{primary:i("table.menu.visibleColumns")})}),e(Nt,{}),r.map(s=>c("option",{onClick:()=>a(s.id),children:[e(It,{checked:n.includes(s.id),size:"small"}),e(Ut,{primary:s.label})]},s.id))]})},Ri=({anchorEl:t,setAnchorEl:o,showSummary:r,setShowSummary:n,columns:a,summaryColumns:i,toggleSummaryColumn:s})=>{let{t:l}=de();return c(Jt,{anchorEl:t,open:!!t,onClose:()=>o(null),children:[e("option",{children:e(oa,{control:e(di,{checked:r,onChange:d=>n(d.target.checked),size:"small"}),label:l("table.menu.showSummaryRow")})}),e(Nt,{}),a.filter(d=>d.numeric).map(d=>c("option",{onClick:()=>s(d.id),disabled:!r,children:[e(It,{checked:i.includes(d.id),size:"small"}),e(Ut,{primary:d.label})]},d.id)),a.filter(d=>d.numeric).length===0&&e("option",{disabled:true,children:e(Ut,{primary:l("table.menu.noNumericColumns")})})]})},Ni=({contextMenu:t,handleCloseContextMenu:o,columns:r,visibleColumns:n,toggleColumnVisibility:a})=>{let{t:i}=de();return c(Jt,{open:t!==null,onClose:o,anchorReference:"anchorPosition",anchorPosition:t!==null?{top:t.mouseY,left:t.mouseX}:void 0,children:[e("option",{onClick:o,children:i("common.copy")}),e(Nt,{}),e("option",{disabled:true,children:i("table.menu.visibleColumns")}),r.map(s=>c("option",{onClick:()=>a(s.id),children:[e(_o,{children:n.includes(s.id)&&e(ap,{fontSize:"small"})}),e(Ut,{children:s.label})]},s.id))]})},Gp=({contextMenu:t,handleClose:o,columns:r,visibleColumns:n,grouping:a,summaryColumns:i,showSummary:s,sortBy:l,orderBy:d,order:p,onSortAsc:m,onSortDesc:h,onClearSort:f,onHideColumn:u,onToggleGroup:b,onToggleSummary:y,onOpenSortDialog:g})=>{let{t:x}=de(),v=t?.columnId??"",C=r.find(T=>T.id===v),P=a.includes(v),S=i.includes(v),I=!!C?.numeric,R=l.find(T=>T.field===v),w=R?R.direction==="asc":d===v&&p==="asc",A=R?R.direction==="desc":d===v&&p==="desc",D=w||A;return c(Jt,{open:t!==null,onClose:o,anchorReference:"anchorPosition",anchorPosition:t!==null?{top:t.mouseY,left:t.mouseX}:void 0,children:[e("option",{disabled:true,sx:{opacity:"1 !important",fontWeight:700},children:e(Ut,{primary:C?.label??v})}),e(Nt,{}),c("option",{onClick:()=>{m(v),o();},selected:w,children:[e(_o,{children:e(vl,{fontSize:"small"})}),e(Ut,{primary:x("table.headerMenu.sortAsc")})]}),c("option",{onClick:()=>{h(v),o();},selected:A,children:[e(_o,{children:e(bl,{fontSize:"small"})}),e(Ut,{primary:x("table.headerMenu.sortDesc")})]}),D&&c("option",{onClick:()=>{f(v),o();},children:[e(_o,{children:e(sp,{fontSize:"small"})}),e(Ut,{primary:x("table.headerMenu.clearSort")})]}),c("option",{onClick:()=>{g(),o();},children:[e(_o,{children:e(zr,{fontSize:"small"})}),e(Ut,{primary:x("table.headerMenu.configureSort")})]}),e(Nt,{}),c("option",{onClick:()=>{b(v),o();},selected:P,children:[e(_o,{children:e(Sr,{fontSize:"small"})}),e(Ut,{primary:x(P?"table.headerMenu.ungroup":"table.headerMenu.group")})]}),I&&s&&c("option",{onClick:()=>{y(v),o();},selected:S,children:[e(_o,{children:e(ln,{fontSize:"small"})}),e(Ut,{primary:x(S?"table.headerMenu.removeSummary":"table.headerMenu.addSummary")})]}),e(Nt,{}),c("option",{onClick:()=>{u(v),o();},children:[e(_o,{children:e(Ap,{fontSize:"small"})}),e(Ut,{primary:x("table.headerMenu.hideColumn")})]})]})},Up=({open:t,onClose:o,columns:r,initialRules:n,onApply:a,onClear:i})=>{let{t:s}=de(),[l,d]=to.useState([]);to.useEffect(()=>{t&&d(n.length>0?n.map(y=>({...y})):[]);},[t,n]);let p=to.useMemo(()=>new Set(l.map(y=>y.field)),[l]),m=to.useMemo(()=>r.filter(y=>!p.has(y.id)),[r,p]),h=()=>{let y=m[0];y&&d(g=>[...g,{field:y.id,direction:"asc"}]);},f=y=>{d(g=>g.filter((x,v)=>v!==y));},u=(y,g)=>{d(x=>x.map((v,C)=>C===y?{...v,...g}:v));},b=(y,g)=>{d(x=>{let v=y+g;if(v<0||v>=x.length)return x;let C=[...x],[P]=C.splice(y,1);return C.splice(v,0,P),C});};return e(Ot,{open:t,onClose:o,maxWidth:620,fullWidth:true,className:"orb-table-sort-dialog",title:s("table.sortDialog.title"),actions:c(jsxRuntime.Fragment,{children:[e(Te,{className:"orb-table-sort-clear",variant:"neutral",disabled:l.length===0&&n.length===0,onClick:()=>{i(),o();},children:s("table.sortDialog.clearAll")}),e("span",{className:"orb-table-sort-action-spacer"}),e(Te,{variant:"neutral",onClick:o,children:s("common.cancel")}),e(Te,{variant:"primary",onClick:()=>{a(l),o();},children:s("common.ok")})]}),children:c("div",{className:"orb-table-sort-dialog-content",children:[l.length===0?e(L,{className:"orb-table-sort-empty",variant:"body2",children:s("table.sortDialog.empty")}):e(le,{className:"orb-table-sort-rules",spacing:1,children:l.map((y,g)=>{let x=new Set(l.filter((C,P)=>P!==g).map(C=>C.field)),v=r.filter(C=>!x.has(C.id));return c("div",{className:"orb-table-sort-rule",children:[e(ci,{className:"orb-table-sort-order",badgeContent:g+1,color:"primary"}),e(Vt,{size:"small",value:y.field,onChange:C=>u(g,{field:C.target.value}),options:v.map(C=>({value:C.id,label:C.label}))}),e(Vt,{size:"small",value:y.direction,onChange:C=>u(g,{direction:C.target.value}),options:[{value:"asc",label:s("table.sortDialog.asc")},{value:"desc",label:s("table.sortDialog.desc")}]}),e(se,{className:"orb-table-sort-icon-button",size:"small",onClick:()=>b(g,-1),disabled:g===0,children:e(vl,{fontSize:"small"})}),e(se,{className:"orb-table-sort-icon-button",size:"small",onClick:()=>b(g,1),disabled:g===l.length-1,children:e(bl,{fontSize:"small"})}),e(se,{className:"orb-table-sort-icon-button orb-table-sort-delete",size:"small",onClick:()=>f(g),children:e(gi,{fontSize:"small"})})]},`sort-rule-${g}`)})}),e(Te,{size:"small",onClick:h,disabled:m.length===0,startIcon:e(zr,{}),variant:"secondary",className:"orb-table-sort-add",children:s("table.sortDialog.addRule")})]})})};M();var aa=(t,o=2)=>t.toLocaleString(void 0,{maximumFractionDigits:o}),Kp=({kpis:t})=>{let{t:o}=de(),r=[{label:o("graph.kpi.totalRecords"),value:aa(t.totalRecords,0),color:"var(--orb-fg)"},{label:o("graph.kpi.totalReport"),value:aa(t.totalReportHours),color:"var(--orb-fg)"},{label:o("graph.kpi.totalBillable"),value:aa(t.totalBillableHours),color:"var(--orb-primary)"},{label:o("graph.kpi.efficiency"),value:`${t.efficiency.toFixed(2)}%`,color:"var(--orb-accent)"},{label:o("graph.kpi.amount"),value:aa(t.totalAmount),color:"var(--orb-primary)"},{label:o("graph.kpi.flagged"),value:aa(t.flaggedCount,0),color:"var(--orb-err)"}];return e("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(140px, 1fr))",gap:12},children:r.map(n=>c(Ae,{elevation:0,sx:{padding:12,minHeight:96,display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[e(L,{variant:"caption",muted:true,children:n.label}),e(L,{variant:"h3",sx:{fontWeight:800,color:n.color,fontVariantNumeric:"tabular-nums"},children:n.value})]},n.label))})};M();var Di=({title:t,subtitle:o,children:r})=>c(Ae,{elevation:0,sx:{padding:16},children:[e(L,{variant:"h4",sx:{fontWeight:700},children:t}),o&&e(L,{variant:"body2",muted:true,sx:{marginBottom:16},children:o}),r]});M();var ia=({data:t,orientation:o="horizontal",valueSuffix:r="",minHeight:n=210,activeName:a,onItemClick:i})=>{if(t.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let s=Math.max(...t.map(l=>l.value),1);return o==="vertical"?e("div",{style:{display:"flex",gap:1,alignItems:"flex-end",minHeight:n},children:t.map(l=>c("div",{style:{flex:1,minWidth:0},children:[e("div",{onClick:()=>i?.(l),sx:{height:`${Math.max(l.value/s*180,6)}px`,background:l.name===a?"primary.dark":"primary.main",borderRadius:"8px 8px 0 0",cursor:i?"pointer":"default",opacity:a&&l.name!==a?.45:1}}),e(L,{variant:"caption",title:l.name,sx:{display:"block",mt:.5},children:l.name}),c(L,{variant:"caption",muted:true,children:[l.value.toFixed(1),r]})]},l.name))}):e(le,{spacing:1,children:t.map(l=>c("div",{style:{display:"grid",gridTemplateColumns:"140px 1fr 64px",gap:1},children:[e(L,{variant:"caption",muted:true,title:l.name,children:l.name}),e("div",{onClick:()=>i?.(l),sx:{alignSelf:"center",background:"action.hover",height:10,borderRadius:999,overflow:"hidden",cursor:i?"pointer":"default",opacity:a&&l.name!==a?.45:1},children:e("div",{style:{width:`${l.value/s*100}%`,height:"100%",background:l.name===a?"primary.dark":"primary.main"}})}),c(L,{variant:"caption",sx:{textAlign:"right",fontWeight:600},children:[l.value.toFixed(1),r]})]},l.name))})};M();var qp=({data:t,color:o="var(--orb-chart-1)",valueSuffix:r="",height:n=220})=>{if(t.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let a=640,i=28,s=t.map(f=>f.value),l=Math.min(...s,0),p=Math.max(...s,1)-l||1,m=t.map((f,u)=>{let b=i+u*(a-i*2)/Math.max(t.length-1,1),y=n-i-(f.value-l)/p*(n-i*2);return {x:b,y,...f}}),h=m.map(f=>`${f.x},${f.y}`).join(" ");return c("div",{children:[c("div",{component:"svg",viewBox:`0 0 ${a} ${n}`,style:{width:"100%",height:n},children:[e("line",{x1:i,y1:n-i,x2:a-i,y2:n-i,style:{stroke:"var(--orb-chart-grid)"}}),e("polyline",{fill:"none",style:{stroke:o},strokeWidth:3,points:h}),m.map(f=>e("circle",{cx:f.x,cy:f.y,r:4,style:{fill:o}},f.name))]}),e("div",{sx:{mt:1,display:"grid",gridTemplateColumns:`repeat(${t.length}, minmax(0, 1fr))`,gap:1},children:t.map(f=>c("div",{style:{minWidth:0},children:[e(L,{variant:"caption",title:f.name,sx:{display:"block"},children:f.name}),c(L,{variant:"caption",muted:true,children:[f.value.toFixed(1),r]})]},f.name))})]})};M();var Xp=({data:t,barColor:o="var(--orb-chart-1)",lineColor:r="var(--orb-chart-5)",height:n=220})=>{if(t.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let a=640,i=28,s=Math.max(...t.map(m=>m.barValue),1),l=Math.max(...t.map(m=>m.lineValue),1),d=t.map((m,h)=>{let f=(a-i*2)/t.length,u=Math.max(f*.5,8),b=i+h*f+(f-u)/2,y=m.barValue/s*(n-i*2),g=n-i-y;return {x:b,y:g,barHeight:y,barWidth:u,item:m}}),p=t.map((m,h)=>{let f=(a-i*2)/t.length,u=i+h*f+f/2,b=n-i-m.lineValue/l*(n-i*2);return {x:u,y:b,item:m}});return c(le,{spacing:1.25,children:[c("div",{component:"svg",viewBox:`0 0 ${a} ${n}`,style:{width:"100%",height:n},children:[e("line",{x1:i,y1:n-i,x2:a-i,y2:n-i,style:{stroke:"var(--orb-chart-grid)"}}),d.map(m=>e("rect",{x:m.x,y:m.y,width:m.barWidth,height:Math.max(m.barHeight,4),rx:6,style:{fill:o}},m.item.name)),e("polyline",{fill:"none",style:{stroke:r},strokeWidth:3,points:p.map(m=>`${m.x},${m.y}`).join(" ")}),p.map(m=>e("circle",{cx:m.x,cy:m.y,r:3.5,style:{fill:r}},`${m.item.name}-line`))]}),e("div",{style:{display:"grid",gridTemplateColumns:`repeat(${t.length}, minmax(0, 1fr))`,gap:1},children:t.map(m=>c("div",{style:{minWidth:0},children:[e(L,{variant:"caption",title:m.name,sx:{display:"block"},children:m.name}),c(L,{variant:"caption",muted:true,sx:{display:"block"},children:["Bar: ",m.barValue.toFixed(1)]}),c(L,{variant:"caption",muted:true,sx:{display:"block"},children:["Line: ",m.lineValue.toFixed(1)]})]},m.name))})]})};M();var yb=t=>{let r=.2+Math.max(0,Math.min(1,t))*.8;return `color-mix(in oklch, var(--orb-chart-1) ${Math.round(r*100)}%, transparent)`},Zp=({data:t})=>{if(t.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let o=Array.from(new Set(t.map(i=>i.x))),r=Array.from(new Set(t.map(i=>i.y))),n=Math.max(...t.map(i=>i.value),1),a=new Map(t.map(i=>[`${i.y}__${i.x}`,i.value]));return e("div",{style:{overflowX:"auto"},children:c("div",{style:{display:"grid",gridTemplateColumns:`120px repeat(${o.length}, minmax(64px, 1fr))`,gap:1,minWidth:120+o.length*64},children:[e("div",{}),o.map(i=>e(L,{variant:"caption",sx:{textAlign:"center",fontWeight:600},children:i},i)),r.map(i=>c("div",{style:{display:"contents"},children:[e(L,{variant:"caption",sx:{alignSelf:"center"},children:i}),o.map(s=>{let l=a.get(`${i}__${s}`)||0,d=l/n;return e("div",{sx:{height:36,borderRadius:1,background:yb(d),border:"1px solid color-mix(in oklch, var(--orb-muted) 20%, transparent)",display:"flex",alignItems:"center",justifyContent:"center"},children:e(L,{variant:"caption",sx:{fontWeight:700},children:l.toFixed(1)})},`${i}-${s}`)})]},i))]})})};M();var Cb=["var(--orb-chart-1)","var(--orb-chart-2)","var(--orb-chart-5)","var(--orb-chart-negative)","var(--orb-chart-4)","var(--orb-chart-3)"],Ai=({data:t,variant:o="donut",colors:r=Cb,size:n=180,activeName:a,onItemClick:i})=>{if(t.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let s=0,l=t.map((d,p)=>{let m=s;return s+=d.percent,`${r[p%r.length]} ${m}% ${s}%`});return c(le,{direction:{xs:"column",sm:"row"},spacing:2,alignItems:"center",children:[e("div",{style:{width:n,height:n,borderRadius:"50%",background:`conic-gradient(${l.join(", ")})`,position:"relative",flexShrink:0},children:o==="donut"&&e("div",{style:{position:"absolute",inset:Math.round(n*.18),background:"background.paper",borderRadius:"50%"}})}),e(le,{spacing:1,sx:{minWidth:180},children:t.map((d,p)=>c("div",{onClick:()=>i?.(d),sx:{display:"flex",alignItems:"center",gap:1,cursor:i?"pointer":"default",opacity:a&&d.name!==a?.45:1},children:[e("div",{style:{width:10,height:10,borderRadius:"50%",background:r[p%r.length]}}),e(L,{variant:"caption",sx:{flex:1},children:d.name}),c(L,{variant:"caption",sx:{fontWeight:700},children:[d.percent.toFixed(0),"%"]})]},d.name))})]})};M();var Yp=({effect:t,branches:o})=>{if(o.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let r=o.filter((a,i)=>i%2===0),n=o.filter((a,i)=>i%2===1);return c(le,{spacing:1.5,children:[e("div",{style:{display:"grid",gridTemplateColumns:`repeat(${Math.max(r.length,1)}, minmax(0, 1fr))`,gap:1},children:r.map(a=>c("div",{sx:{borderLeft:"2px solid",borderColor:"divider",pl:1},children:[e(L,{variant:"caption",sx:{fontWeight:700},children:a.title}),a.causes.map(i=>e(L,{variant:"caption",muted:true,sx:{display:"block"},children:i},i))]},a.title))}),c("div",{style:{position:"relative",height:32},children:[e("div",{style:{position:"absolute",inset:"50% 0 auto 0",borderTop:"2px solid",borderColor:"primary.main"}}),e("div",{sx:{position:"absolute",right:0,top:"calc(50% - 12px)",px:1,py:.25,borderRadius:1,background:"primary.main",color:"primary.contrastText"},children:e(L,{variant:"caption",sx:{fontWeight:700},children:t})})]}),e("div",{style:{display:"grid",gridTemplateColumns:`repeat(${Math.max(n.length,1)}, minmax(0, 1fr))`,gap:1},children:n.map(a=>c("div",{sx:{borderLeft:"2px solid",borderColor:"divider",pl:1},children:[e(L,{variant:"caption",sx:{fontWeight:700},children:a.title}),a.causes.map(i=>e(L,{variant:"caption",muted:true,sx:{display:"block"},children:i},i))]},a.title))})]})};M();var jp=({data:t,height:o=240})=>{if(t.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let r=0,n=t.map(h=>{let f=h.type==="total"?0:r,u=h.type==="total"?h.value:r+h.value;return h.type!=="total"&&(r=u),{...h,start:f,end:u,delta:u-f}}),a=n.flatMap(h=>[h.start,h.end]),i=Math.min(...a,0),s=Math.max(...a,1),l=680,d=30,p=s-i||1,m=h=>o-d-(h-i)/p*(o-d*2);return c("div",{children:[c("div",{component:"svg",viewBox:`0 0 ${l} ${o}`,style:{width:"100%",height:o},children:[e("line",{x1:d,y1:m(0),x2:l-d,y2:m(0),style:{stroke:"var(--orb-chart-grid)"}}),n.map((h,f)=>{let u=(l-d*2)/n.length,b=Math.max(u*.55,8),y=d+f*u+(u-b)/2,g=m(Math.max(h.start,h.end)),x=m(Math.min(h.start,h.end)),v=h.type==="total"?"var(--orb-chart-1)":h.delta>=0?"var(--orb-chart-positive)":"var(--orb-chart-negative)";return c("g",{children:[e("rect",{x:y,y:g,width:b,height:Math.max(x-g,4),rx:6,style:{fill:v}}),e("text",{x:y+b/2,y:g-6,textAnchor:"middle",fill:"currentColor",fontSize:"11",children:h.end.toFixed(1)})]},h.name)})]}),e("div",{sx:{mt:1,display:"grid",gridTemplateColumns:`repeat(${n.length}, minmax(0, 1fr))`,gap:1},children:n.map(h=>e(L,{variant:"caption",title:h.name,children:h.name},h.name))})]})};var sa=({apiKey:t,query:o,zoom:r=14,mapType:n="roadmap"})=>{let a=encodeURIComponent(o);return `https://www.google.com/maps/embed/v1/place?key=${encodeURIComponent(t)}&q=${a}&zoom=${r}&maptype=${n}`},YR=(t,o=360)=>{let r=sa(t);return `<iframe width="100%" height="${o}" style="border:0" loading="lazy" allowfullscreen referrerpolicy="no-referrer-when-downgrade" src="${r}"></iframe>`};M();var Qp=({apiKey:t,query:o,embedUrl:r,zoom:n=14,mapType:a="roadmap",height:i=320})=>{let s=r||(t&&o?sa({apiKey:t,query:o,zoom:n,mapType:a}):"");return s?c("div",{children:[e("div",{component:"iframe",src:s,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",sx:{width:"100%",height:i,border:0,borderRadius:2}}),c(L,{variant:"caption",muted:true,sx:{mt:.75,display:"block"},children:["If iframe is blocked, open directly: ",e("a",{href:s,target:"_blank",rel:"noreferrer",children:"Google Maps"})]})]}):e("div",{children:e(L,{variant:"body2",muted:true,children:"Google Map requires `embedUrl` or (`apiKey` + `query`)."})})};var Ei=({keyword:t,location:o,src:r="orbcafe-ui"})=>{if(o){let n=encodeURIComponent(o.name||t||"Location");return `https://uri.amap.com/marker?position=${o.lng},${o.lat}&name=${n}&src=${encodeURIComponent(r)}&coordinate=gaode&callnative=0`}return t?`https://uri.amap.com/search?keyword=${encodeURIComponent(t)}&src=${encodeURIComponent(r)}&callnative=0`:"https://uri.amap.com/search?keyword=%E5%8C%97%E4%BA%AC&src=orbcafe-ui&callnative=0"};M();var Jp=({keyword:t,location:o,embedUrl:r,height:n=320})=>{let a=r||Ei({keyword:t,location:o?{lng:o.lng,lat:o.lat,name:o.name}:void 0});return c("div",{children:[e("div",{component:"iframe",src:a,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",sx:{width:"100%",height:n,border:0,borderRadius:2}}),c(L,{variant:"caption",muted:true,sx:{mt:.75,display:"block"},children:["If iframe is blocked, open directly: ",e("a",{href:a,target:"_blank",rel:"noreferrer",children:"AMap"})]})]})};M();var eu=({billableByPrimary:t,efficiencyBySecondary:o,statusDistribution:r,interaction:n})=>{let{t:a}=de();return c("div",{style:{display:"grid",gap:12,gridTemplateColumns:"repeat(auto-fit, minmax(320px, 1fr))"},children:[e(Di,{title:a("graph.chart.billable.title"),subtitle:a("graph.chart.billable.subtitle"),children:e(ia,{data:t,orientation:"horizontal",activeName:n?.filters?.primaryDimension,onItemClick:i=>n?.onPrimaryDimensionClick?.(i.name)})}),e(Di,{title:a("graph.chart.efficiency.title"),subtitle:a("graph.chart.efficiency.subtitle"),children:e(ia,{data:o,orientation:"vertical",valueSuffix:"%",activeName:n?.filters?.secondaryDimension,onItemClick:i=>n?.onSecondaryDimensionClick?.(i.name)})}),e(Di,{title:a("graph.chart.status.title"),subtitle:a("graph.chart.status.subtitle"),children:e(Ai,{data:r,variant:"donut",activeName:n?.filters?.status,onItemClick:i=>n?.onStatusClick?.(i.name)})})]})};M();var wb=["doubao-lite","gpt-4o-mini","gpt-4.1-mini","claude-3.5-sonnet"],Sb=["zh","en","de","fr","ja","ko"],tu=({open:t,onClose:o,value:r,onSaveAll:n,modelOptions:a=wb,promptLangOptions:i=Sb,analysisTemplateOptions:s=[],responseTemplateOptions:l=[],defaultAnalysisTemplateId:d,defaultResponseTemplateId:p})=>{let[m,h]=to.useState(r),[f,u]=to.useState(d||""),[b,y]=to.useState(p||""),[g,x]=to.useState(false);to.useEffect(()=>{t&&(h(r),u(d||""),y(p||""));},[t,r,d,p]);let v=(P,S)=>{h(I=>({...I,[P]:S}));},C=async()=>{if(n)try{x(!0),await n({settings:m,analysisTemplateId:f||void 0,responseTemplateId:b||void 0});}finally{x(false);}};return c(Ot,{open:t,onClose:o,fullWidth:true,maxWidth:"lg",children:[c("div",{className:"orb-dialog-title",sx:{pr:7,pb:2.2},children:[e(L,{variant:"h5",sx:{fontWeight:800},children:"AI Settings"}),e(L,{variant:"body2",color:"text.secondary",sx:{mt:.5},children:"Configure LLM settings and editable agent prompts by language."}),e(se,{onClick:o,sx:{position:"absolute",right:12,top:12},children:e(kr,{})})]}),e("div",{className:"orb-dialog-content",sx:{pt:"18px !important"},children:c(le,{spacing:2.2,children:[c("div",{sx:{mt:.8,display:"grid",gap:1.5,gridTemplateColumns:{xs:"1fr",md:"repeat(2, minmax(0, 1fr))"}},children:[e("div",{children:e(ze,{size:"small",value:m.baseUrl,onChange:P=>v("baseUrl",P.target.value),fullWidth:true,label:"Base URL"})}),e("div",{children:e(ze,{size:"small",type:"password",value:m.apiKey,onChange:P=>v("apiKey",P.target.value),fullWidth:true,label:"API Key"})}),e("div",{children:e(ze,{size:"small",value:m.model,onChange:P=>v("model",P.target.value),fullWidth:true,select:true,label:"Model",children:a.map(P=>e("option",{value:P,children:P},P))})}),e("div",{children:e(ze,{size:"small",value:m.promptLang,onChange:P=>v("promptLang",P.target.value),fullWidth:true,select:true,label:"Prompt Lang",children:i.map(P=>e("option",{value:P,children:P},P))})})]}),c("div",{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[c(ze,{size:"small",value:f,onChange:P=>u(P.target.value),fullWidth:true,select:true,label:"Analysis Template",children:[e("option",{value:"",children:"Default"}),s.map(P=>e("option",{value:P.id,children:P.label},P.id))]}),e(Un,{multiline:true,minRows:8,value:m.analysisPrompt,onChange:P=>v("analysisPrompt",P.target.value),fullWidth:true,label:"Analysis Prompt",sx:{"& textarea":{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"}}}),c(ze,{size:"small",value:b,onChange:P=>y(P.target.value),fullWidth:true,select:true,label:"Response Template",children:[e("option",{value:"",children:"Default"}),l.map(P=>e("option",{value:P.id,children:P.label},P.id))]}),e(Un,{multiline:true,minRows:8,value:m.responsePrompt,onChange:P=>v("responsePrompt",P.target.value),fullWidth:true,label:"Response Prompt",sx:{"& textarea":{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"}}})]})]})}),c("div",{className:"orb-dialog-actions",sx:{px:3,pb:2.5,pt:1.2,gap:1},children:[e(Te,{variant:"outlined",onClick:o,children:"Cancel"}),e(Te,{variant:"contained",onClick:C,disabled:!n||g,children:"Save"})]})]})};M();var Oi=({open:t,onClose:o,model:r,tableContent:n,extraCharts:a,interaction:i,aiAssistant:s})=>{let{t:l}=de(),[d,p]=to.useState(s?.defaultPrompt||""),[m,h]=to.useState(false),[f,u]=to.useState(false),b=i?.enabled!==false&&!!i,y=s?.enabled!==false,g=i?.filters||{},x=!!(g.primaryDimension||g.secondaryDimension||g.status),v=s?.placeholder||"Ask AI to analyze data, create charts, or find insights...";to.useEffect(()=>{t&&p(s?.defaultPrompt||"");},[t,s?.defaultPrompt]);let C=s?.settings||{baseUrl:"/llm-api",apiKey:"",model:"doubao-lite",promptLang:"zh",analysisPrompt:"",responsePrompt:""},P=async()=>{let S=d.trim();if(!(!S||!s?.onSubmit))try{h(!0),await s.onSubmit(S,{filters:g,model:r});}finally{h(false);}};return e(Ot,{open:t,onClose:o,fullWidth:true,maxWidth:1400,hideCloseButton:true,children:c("div",{style:{height:"80vh",display:"flex",flexDirection:"column",background:"var(--orb-canvas)"},children:[e("div",{style:{padding:16,borderBottom:"1px solid var(--orb-border)"},children:c(le,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:12,children:[c(le,{direction:"row",spacing:10,alignItems:"center",sx:{flexWrap:"wrap"},children:[e(L,{variant:"h3",sx:{fontWeight:800},children:r.title}),e(xt,{label:l("graph.records",{count:r.kpis.totalRecords})}),b&&g.primaryDimension&&e(xt,{tone:"outline",label:`${i?.fieldMapping.primaryDimension}: ${g.primaryDimension}`,onDelete:()=>i?.onClearFilter("primaryDimension")}),b&&g.secondaryDimension&&e(xt,{tone:"outline",label:`${i?.fieldMapping.secondaryDimension}: ${g.secondaryDimension}`,onDelete:()=>i?.onClearFilter("secondaryDimension")}),b&&g.status&&e(xt,{tone:"outline",label:`${i?.fieldMapping.status}: ${g.status}`,onDelete:()=>i?.onClearFilter("status")}),b&&x&&e(Te,{size:"small",variant:"ghost",onClick:()=>i?.onClearAll(),children:"Clear"})]}),c(le,{direction:"row",spacing:10,alignItems:"center",children:[y&&c("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 10px",borderRadius:999,border:"1px solid var(--orb-border)",background:"var(--orb-surface)",minWidth:320},children:[e(se,{size:"small",onClick:s?.onVoiceInput,children:e(Ga,{size:16,strokeWidth:1.8})}),e("input",{className:"orb-inp orb-inp-dense",value:d,onChange:S=>p(S.target.value),onKeyDown:S=>{S.key==="Enter"&&(S.preventDefault(),P());},placeholder:v,style:{fontSize:14,border:"none",background:"transparent",flex:1,minWidth:0}}),e(se,{size:"small",onClick:P,disabled:m||!d.trim(),children:e(cd,{size:16,strokeWidth:1.8})}),e(se,{size:"small",onClick:()=>u(true),children:e(on,{size:16,strokeWidth:1.8})})]}),e(se,{onClick:o,children:e(Xt,{size:18,strokeWidth:2})})]})]})}),c("div",{style:{padding:16,display:"flex",flexDirection:"column",gap:12,overflow:"auto",minHeight:0},children:[e(Kp,{kpis:r.kpis}),e(eu,{billableByPrimary:r.charts.billableByPrimary,efficiencyBySecondary:r.charts.efficiencyBySecondary,statusDistribution:r.charts.statusDistribution,interaction:b?{filters:g,onPrimaryDimensionClick:S=>i?.onPrimaryDimensionClick(S),onSecondaryDimensionClick:S=>i?.onSecondaryDimensionClick(S),onStatusClick:S=>i?.onStatusClick(S)}:void 0}),a,n]}),e(tu,{open:f,onClose:()=>u(false),value:C,onSaveAll:s?.onSaveAll,modelOptions:s?.modelOptions,promptLangOptions:s?.promptLangOptions,analysisTemplateOptions:s?.analysisTemplateOptions,responseTemplateOptions:s?.responseTemplateOptions,defaultAnalysisTemplateId:s?.defaultAnalysisTemplateId,defaultResponseTemplateId:s?.defaultResponseTemplateId})]})})};var Rr={primaryDimension:["Client","Customer","Category","Project"],secondaryDimension:["Person","Consultant","Owner","Name"],status:["Status","state"],date:["Date","WorkDate","CreatedAt"],description:["Description","Task","Title","Memo"],reportHours:["Report_Hour","Report Hours","Hours","ReportHours"],billableHours:["Billable_Hour","Billable Hours","BillableHours"],amount:["Amount","Billable_Amount","Total_Amount","Value"]},Pb=5,ou=t=>t.toLowerCase().replace(/[\s_-]/g,""),Nr=(t,o,r,n)=>{if(o)return o;if(t.length===0)return n;let a=Object.keys(t[0]),i=new Map(a.map(s=>[ou(s),s]));for(let s of r){let l=i.get(ou(s));if(l)return l}return a[0]||n},Mo=t=>{if(typeof t=="number")return Number.isFinite(t)?t:0;if(typeof t=="string"){let o=Number(t.replace(/,/g,"").trim());return Number.isFinite(o)?o:0}return 0},vo=(t,o)=>t==null||t===""?o:String(t),Tb=(t,o,r,n,a)=>{let i=new Map;return t.forEach(s=>{let l=vo(s[o],a);i.set(l,(i.get(l)||0)+Mo(s[r]));}),Array.from(i.entries()).map(([s,l])=>({name:s,value:l})).sort((s,l)=>l.value-s.value).slice(0,n)},Ib=(t,o,r,n,a,i)=>{let s=new Map;return t.forEach(l=>{let d=vo(l[o],i),p=s.get(d)||{report:0,billable:0};p.report+=Mo(l[r]),p.billable+=Mo(l[n]),s.set(d,p);}),Array.from(s.entries()).map(([l,d])=>({name:l,value:d.report>0?d.billable/d.report*100:0})).sort((l,d)=>l.value-d.value).slice(0,a)},Mb=(t,o,r)=>{let n=t.length;if(n===0)return [];let a=new Map;return t.forEach(i=>{let s=vo(i[o],r);a.set(s,(a.get(s)||0)+1);}),Array.from(a.entries()).map(([i,s])=>({name:i,value:s,percent:s/n*100}))},ru=(t,o,r)=>{let n=new Map;return t.forEach(a=>{let i=vo(a[o],"N/A");n.set(i,(n.get(i)||0)+Mo(a[r]));}),Array.from(n.entries()).sort(([a],[i])=>a.localeCompare(i)).map(([a,i])=>({name:a,value:i}))},Rb=(t,o,r,n,a,i)=>{let s=new Map;return t.forEach(l=>{let d=vo(l[o],i),p=s.get(d)||{report:0,billable:0};p.report+=Mo(l[r]),p.billable+=Mo(l[n]),s.set(d,p);}),Array.from(s.entries()).map(([l,d])=>({name:l,barValue:d.billable,lineValue:d.report>0?d.billable/d.report*100:0})).sort((l,d)=>d.barValue-l.barValue).slice(0,a)},Nb=(t,o,r,n,a)=>{let i=new Map;return t.forEach(s=>{let l=vo(s[o],a),d=vo(s[r],a),p=`${l}__${d}`;i.set(p,(i.get(p)||0)+Mo(s[n]));}),Array.from(i.entries()).map(([s,l])=>{let[d,p]=s.split("__");return {x:d,y:p,value:l}})},Db=(t,o,r)=>{let n=ru(t,o,r),a=n.map(s=>({name:s.name,value:s.value,type:"delta"})),i=n.reduce((s,l)=>s+l.value,0);return [...a,{name:"Total",value:i,type:"total"}]},Ab=(t,o,r,n,a,i)=>{let s=new Map;return t.forEach(l=>{let d=vo(l[o],i),p=`${vo(l[r],i)} / ${vo(l[n],i)}`,m=s.get(d)||new Map;m.set(p,(m.get(p)||0)+1),s.set(d,m);}),Array.from(s.entries()).map(([l,d])=>({title:l,causes:Array.from(d.entries()).sort((p,m)=>m[1]-p[1]).slice(0,a).map(([p,m])=>`${p} (${m})`)})).slice(0,6)},gn=({rows:t,config:o})=>{let{t:r}=de(),n=r("graph.unassigned"),a=to.useMemo(()=>{let m=o?.fieldMapping;return {primaryDimension:Nr(t,m?.primaryDimension,Rr.primaryDimension,"Category"),secondaryDimension:Nr(t,m?.secondaryDimension,Rr.secondaryDimension,"Owner"),status:Nr(t,m?.status,Rr.status,"Status"),date:Nr(t,m?.date,Rr.date,"Date"),description:Nr(t,m?.description,Rr.description,"Description"),reportHours:Nr(t,m?.reportHours,Rr.reportHours,"ReportHours"),billableHours:Nr(t,m?.billableHours,Rr.billableHours,"BillableHours"),amount:Nr(t,m?.amount,Rr.amount,"Amount")}},[t,o?.fieldMapping]),i=to.useMemo(()=>t.map((m,h)=>{let f=Mo(m[a.reportHours]),u=Mo(m[a.billableHours]),b=Mo(m[a.amount]),y=f>0?u/f*100:0;return {id:`graph-row-${h}`,Date:vo(m[a.date],""),Primary:vo(m[a.primaryDimension],n),Secondary:vo(m[a.secondaryDimension],n),Description:vo(m[a.description],""),ReportHours:f,BillableHours:u,Amount:b,Efficiency:y,Status:vo(m[a.status],n)}}),[t,a,n]),s=to.useMemo(()=>{let m=i.length,h=i.reduce((x,v)=>x+Mo(v.ReportHours),0),f=i.reduce((x,v)=>x+Mo(v.BillableHours),0),u=i.reduce((x,v)=>x+Mo(v.Amount),0),b=h>0?f/h*100:0,y=o?.statusFlagValues||["flag","flagged","warning","risk"],g=i.filter(x=>y.includes(vo(x.Status,"").toLowerCase())).length;return {totalRecords:m,totalReportHours:h,totalBillableHours:f,efficiency:b,totalAmount:u,flaggedCount:g}},[i,o?.statusFlagValues]),l=o?.topN||Pb,d=to.useMemo(()=>({billableByPrimary:Tb(i,"Primary","BillableHours",l,n),efficiencyBySecondary:Ib(i,"Secondary","ReportHours","BillableHours",l,n),statusDistribution:Mb(i,"Status",n),lineByDate:ru(i,"Date","BillableHours"),comboByPrimary:Rb(i,"Primary","ReportHours","BillableHours",l,n),heatmapPrimarySecondary:Nb(i,"Primary","Secondary","BillableHours",n),waterfallBillable:Db(i,"Date","BillableHours"),fishboneStatusCauses:Ab(i,"Status","Primary","Secondary",3,n)}),[i,l,n]),p=to.useMemo(()=>({title:o?.title||r("graph.reportTitle"),kpis:s,charts:d,table:{columns:[{id:"Date",label:a.date},{id:"Primary",label:a.primaryDimension},{id:"Secondary",label:a.secondaryDimension},{id:"Description",label:a.description},{id:"ReportHours",label:r("graph.column.reportHours"),align:"right"},{id:"BillableHours",label:r("graph.column.billableHours"),align:"right"},{id:"Amount",label:"Amount",align:"right"},{id:"Efficiency",label:"Efficiency",align:"right"},{id:"Status",label:a.status}],rows:i}}),[d,o?.title,a,s,i,r]);return {fieldMapping:a,model:p}};var hn=t=>String(t??"").trim(),Bi=(t={})=>{let[o,r]=to.useState(t),n=to.useCallback((d,p)=>{r(m=>{let h=p?.trim();if(!h){let f={...m};return delete f[d],f}if(m[d]===h){let f={...m};return delete f[d],f}return {...m,[d]:h}});},[]),a=to.useCallback(d=>{r(p=>{if(!p[d])return p;let m={...p};return delete m[d],m});},[]),i=to.useCallback(()=>{r({});},[]),s=to.useMemo(()=>!!(o.primaryDimension||o.secondaryDimension||o.status),[o]),l=to.useCallback((d,p)=>d.filter(m=>!(o.primaryDimension&&hn(m[p.primaryDimension])!==hn(o.primaryDimension)||o.secondaryDimension&&hn(m[p.secondaryDimension])!==hn(o.secondaryDimension)||o.status&&hn(m[p.status])!==hn(o.status))),[o]);return {filters:o,setFilter:n,clearFilter:a,clearAll:i,hasActiveFilters:s,applyRows:l}};M();var zi=({variants:t,currentVariantId:o,onLoad:r,onSave:n,onDelete:a,onSetDefault:i})=>{let{t:s}=de(),[l,d]=to.useState(false),[p,m]=to.useState(""),[h,f]=to.useState(false),[u,b]=to.useState(false),y=t.find(v=>v.id===o),g=()=>{m(y?.name||s("variant.newVariant")),f(y?.isDefault||false),b(y?.isPublic||false),d(true);},x=()=>{n({name:p,isDefault:h,isPublic:u,description:""}),d(false);};return c("div",{className:"orb-variant-management",children:[e(Vt,{size:"small",fullWidth:false,sx:{width:"min(240px, 100%)","& .orb-inp":{fontSize:"0.85rem",backgroundColor:"var(--orb-p50)",borderColor:"color-mix(in oklch, var(--orb-primary) 30%, var(--orb-border))"}},value:o||"",options:[{value:"",label:s("variant.selectVariant"),disabled:true},...t.map(v=>({value:v.id,label:v.name+(v.isDefault?` (${s("variant.defaultSuffix")})`:"")}))],onChange:v=>{let C=t.find(P=>P.id===v.target.value);C&&r(C);}}),e(dt,{title:s("variant.saveView"),children:e(se,{className:"orb-variant-save-button",onClick:g,size:"small",color:"primary",children:e(Tr,{fontSize:"small"})})}),c(Ot,{open:l,onClose:()=>d(false),children:[e("div",{className:"orb-dialog-title",children:s("variant.saveView")}),c("div",{className:"orb-dialog-content",children:[e(ze,{autoFocus:true,margin:"dense",label:s("variant.viewName"),fullWidth:true,variant:"outlined",value:p,onChange:v=>m(v.target.value)}),e(oa,{control:e(It,{checked:h,onChange:v=>f(v.target.checked)}),label:s("variant.setDefault")}),e(oa,{control:e(It,{checked:u,onChange:v=>b(v.target.checked)}),label:s("variant.publicAllUsers")})]}),c("div",{className:"orb-dialog-actions",children:[e(Te,{onClick:()=>d(false),children:s("common.cancel")}),e(Te,{onClick:x,variant:"contained",children:s("common.save")})]})]})]})};M();var au=({appId:t,tableKey:o="default",currentFilters:r,currentLayoutId:n,layoutRefs:a,onLoad:i,variantService:s,serviceUrl:l,onError:d,onSuccess:p,currentVariantId:m,onVariantChange:h})=>{let{t:f}=de(),[u,b]=to.useState([]),[y,g]=to.useState(""),x=`orbcafe.variants.${t}.${o}`,v=m!==void 0?m:y,C=k=>{m===void 0&&g(k),h&&h(k);},P=to.useCallback(()=>{try{let k=localStorage.getItem(x);if(!k)return [];let E=JSON.parse(k);return Array.isArray(E)?E:[]}catch{return []}},[x]),S=to.useCallback(k=>{try{localStorage.setItem(x,JSON.stringify(k));}catch{}},[x]),I=to.useCallback(k=>{b(k);let E=k.find(O=>O.isDefault);E&&!v&&(C(E.id),i(E));},[v,i,C]),R=to.useCallback(async()=>{if(!t)return [];try{let k=[];if(s)k=await s.getVariants(t,o);else if(l){let E=await fetch(`${l}/api/variants?appId=${encodeURIComponent(t)}&tableKey=${encodeURIComponent(o)}`);if(!E.ok)throw new Error(f("variant.toast.fetchFailed"));k=await E.json();}else k=P();return I(k),k}catch(k){console.error("Error fetching variants",k);let E=P();return I(E),d&&d(f("variant.toast.fetchFailed")),E}},[t,o,s,l,P,I,d,f]);return to.useEffect(()=>{R();},[t,o]),e(zi,{variants:u,currentVariantId:v,onLoad:k=>{C(k.id),i(k);},onSave:async k=>{let E=Date.now().toString(),O;try{let $=k.scope||"Both",ee=u.find(Q=>Q.name===k.name);E=ee?ee.id:Date.now().toString();let F=[];if(ee&&(Array.isArray(ee.filters)?F=[...ee.filters]:ee.filters&&(F=[{scope:"default",filters:ee.filters}])),$==="Search"||$==="Both"){let Q=(Array.isArray(r),r);if(Q)if(Array.isArray(Q)&&Q.length>0&&Q[0].scope)Q.forEach(z=>{let H=F.findIndex(X=>X.scope===z.scope);H>=0?F[H]=z:F.push(z);});else {let z={scope:o,filters:Q},H=F.findIndex(X=>X.scope===o);H>=0?F[H]=z:F.push(z);}}let G=ee?.layout||{},W=[];if(ee&&Array.isArray(ee.layoutRefs)&&(W=[...ee.layoutRefs]),$==="Layout"||$==="Both")if(a&&a.length>0)a.forEach(Q=>{let z=W.findIndex(H=>H.tableKey===Q.tableKey);z>=0?W[z]=Q:W.push(Q);});else {let Q={tableKey:o,layoutId:n||null},z=W.findIndex(H=>H.tableKey===o);z>=0?W[z]=Q:W.push(Q);}if(O={appId:t,tableKey:o,...k,scope:$,id:E,createdAt:new Date().toISOString(),filters:F,layout:G,layoutRefs:W},s)await s.saveVariant(O,t,o);else if(l){if(!(await fetch(`${l}/api/variants`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(O)})).ok)throw new Error(f("variant.toast.saveFailed"))}else {let z=u.some(H=>H.id===E)?u.map(H=>H.id===E?O:H):[...u,O];b(z),S(z);}p&&p(f("variant.toast.saveSuccess")),(s||l)&&await R(),C(E),i(O);}catch($){console.error("Error saving variant",$);let F=u.some(G=>G.id===E)?u.map(G=>G.id===E?O:G):[...u,O];b(F),S(F),C(E),i(O),d&&d(f("variant.toast.saveFailed"));}},onDelete:async k=>{try{if(s)await s.deleteVariant(k);else if(l){if(!(await fetch(`${l}/api/variants/${k}`,{method:"DELETE"})).ok)throw new Error(f("variant.toast.deleteFailed"))}else {let E=u.filter(O=>O.id!==k);b(E),S(E);}v===k&&C(""),(s||l)&&R(),p&&p(f("variant.toast.deleteSuccess"));}catch(E){console.error("Error deleting variant",E);let O=u.filter($=>$.id!==k);b(O),S(O),v===k&&C(""),d&&d(f("variant.toast.deleteFailed"));}},onSetDefault:async k=>{try{let E=u.find($=>$.id===k);if(!E)return;let O={appId:t,tableKey:o,...E,isDefault:!0};if(s)await s.setDefaultVariant(k,t,o);else if(l){if(!(await fetch(`${l}/api/variants`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(O)})).ok)throw new Error(f("variant.toast.defaultFailed"))}else {let $=u.map(ee=>({...ee,isDefault:ee.id===k}));b($),S($);}(s||l)&&await R(),p&&p(f("variant.toast.defaultSuccess"));}catch(E){console.error("Error setting default variant",E);let O=u.map($=>({...$,isDefault:$.id===k}));b(O),S(O),d&&d(f("variant.toast.defaultFailed"));}}})};M();ir__default.default.extend(Hb__default.default);ir__default.default.extend(zb__default.default);ir__default.default.extend(kf__default.default);var ca="YYYY-MM-DD",Wb=[null,null],Wr="0.85rem",$b={en:"en",zh:"zh-cn",fr:"fr",de:"de",ja:"ja",ko:"ko"},_b=({isInRange:t,isStart:o,isEnd:r,isHovered:n,disableMargin:a,sx:i,...s})=>{let l=lo();return e(jd,{...s,sx:[...Array.isArray(i)?i:i?[i]:[],t?{borderRadius:0,backgroundColor:l.palette.primary.light,color:l.palette.primary.contrastText}:{},n&&!t&&!o&&!r?{borderRadius:0,backgroundColor:l.palette.action.hover,border:`1px dashed ${l.palette.primary.main}`}:{},o?{borderRadius:"50% 0 0 50%",backgroundColor:l.palette.primary.main,color:l.palette.primary.contrastText}:{},r?{borderRadius:"0 50% 50% 0",backgroundColor:l.palette.primary.main,color:l.palette.primary.contrastText}:{},o&&r?{borderRadius:"50%"}:{}]})},su=({label:t,value:o=Wb,onChange:r})=>{let{t:n,locale:a}=de(),i=$b[a]||"en",s=t||n("dateRange.label"),[l,d]=to.useState(null),[p,m]=to.useState(o),[h,f]=to.useState("start"),[u,b]=to.useState(null),[y,g]=to.useState((o[0]||ir__default.default()).locale(i)),[x,v]=to.useState(""),[C,P]=to.useState(""),[S,I]=to.useState(false),[R,w]=to.useState(false),A=to__namespace.default.useRef(o);to.useEffect(()=>{let[Q,z]=o,[H,X]=A.current,Y=ce=>ce&&typeof ce.isSame=="function",j=!(Q===null&&H===null||Y(Q)&&Y(H)&&Q.isSame(H,"day")),te=!(z===null&&X===null||Y(z)&&Y(X)&&z.isSame(X,"day"));(j||te)&&(m(o),o[0]&&Y(o[0])&&g(o[0].locale(i))),A.current=o;},[o,i]),to.useEffect(()=>{v(p[0]?p[0].locale(i).format(ca):""),P(p[1]?p[1].locale(i).format(ca):""),I(false),w(false);},[p,i]);let D=(Q,z)=>{let H=z.trim(),X=Q==="start"?I:w;if(!H){let te=Q==="start"?[null,p[1]]:[p[0],null];X(false),m(te);return}let Y=ir__default.default(H,ca,true).locale(i);if(!Y.isValid()){X(true);return}X(false);let j=[...p];if(Q==="start")j[0]=Y,j[1]&&Y.isAfter(j[1],"day")&&(j[1]=null),f(j[1]?"start":"end");else {let te=j[0];te&&Y.isBefore(te,"day")?(j=[Y,null],f("end")):(j[1]=Y,f("start"));}m(j),g(Y);},T=Q=>{d(Q.currentTarget);},k=()=>{d(null),f("start"),b(null);},E=!!l,O=Q=>{if(!Q)return;let z=[...p];if(h==="start")z=[Q,null],f("end");else {let H=z[0];H&&Q.isBefore(H)?(z=[Q,null],f("end")):(z=[H,Q],f("start"));}m(z);},$=Q=>{let z=ir__default.default().locale(i),H=[null,null];switch(Q){case "today":H=[z,z];break;case "week":H=[z.startOf("week"),z.endOf("week")];break;case "month":H=[z.startOf("month"),z.endOf("month")];break}m(H),f("start"),g(z);},ee=()=>{r&&r(p),k();},F=()=>{m(o),f("start"),k();},G=to.useCallback(Q=>{let{day:z,...H}=Q,[X,Y]=p,j=X?z.isSame(X,"day"):false,te=Y?z.isSame(Y,"day"):false,ce=X&&Y?z.isBetween(X,Y,"day","()"):false,fe=false;return h==="end"&&X&&!Y&&u&&z.isAfter(X,"day")&&z.isBefore(u.add(1,"day"),"day")&&(fe=true),e(_b,{...H,day:z,disableMargin:true,isStart:j,isEnd:te,isInRange:ce||fe,onMouseEnter:()=>b(z)})},[p,h,u]),W=Q=>Q?Q.locale(i).format("YYYY-MM-DD"):"";return c("div",{className:"orb-date-range-picker",children:[e(ze,{className:"orb-date-range-field",label:s,value:p[0]?`${W(p[0])} - ${W(p[1])}`:"",onClick:T,fullWidth:true,size:"small",InputLabelProps:{sx:{fontSize:Wr}},InputProps:{readOnly:true,sx:{fontSize:Wr,"& .orb-inp":{fontSize:Wr},paddingRight:"4px"},endAdornment:e(se,{className:"orb-date-range-calendar-trigger",size:"small",onClick:T,tooltip:s,children:e(Tt,{name:"calendar",size:16})})}}),c(pi,{open:E,anchorEl:l,onClose:k,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},className:"orb-date-range-popover",children:[e("div",{className:"orb-date-range-inputs",children:c(le,{className:"orb-date-range-input-row",direction:"row",alignItems:"center",spacing:1.5,justifyContent:"space-between",children:[e(ze,{className:"orb-date-range-manual-field",label:n("dateRange.startDate"),placeholder:ca,value:x,error:S,size:"small",onFocus:()=>f("start"),onChange:Q=>{v(Q.target.value),S&&I(false);},onBlur:()=>D("start",x),onKeyDown:Q=>{Q.key==="Enter"&&(Q.preventDefault(),D("start",x));},sx:{"& .orb-inp":{fontSize:Wr,py:.75},"& label":{fontSize:Wr}}}),e(tp,{color:"action",fontSize:"small"}),e(ze,{className:"orb-date-range-manual-field",label:n("dateRange.endDate"),placeholder:ca,value:C,error:R,size:"small",onFocus:()=>{p[0]&&f("end");},onChange:Q=>{P(Q.target.value),R&&w(false);},onBlur:()=>D("end",C),onKeyDown:Q=>{Q.key==="Enter"&&(Q.preventDefault(),D("end",C));},sx:{"& .orb-inp":{fontSize:Wr,py:.75},"& label":{fontSize:Wr}}})]})}),e("div",{className:"orb-date-range-shortcuts",children:c(le,{direction:"row",spacing:1,justifyContent:"center",children:[e(xt,{label:n("dateRange.today"),onClick:()=>$("today"),clickable:true,size:"small",variant:"outlined"}),e(xt,{label:n("dateRange.thisWeek"),onClick:()=>$("week"),clickable:true,size:"small",variant:"outlined"}),e(xt,{label:n("dateRange.thisMonth"),onClick:()=>$("month"),clickable:true,size:"small",variant:"outlined"})]})}),e("div",{className:"orb-date-range-calendar",children:e(Jd,{dateAdapter:si,adapterLocale:i,children:e(Qd,{value:null,referenceDate:y,onMonthChange:g,onYearChange:g,onChange:O,slots:{day:G},views:["year","month","day"],openTo:"day",showDaysOutsideCurrentMonth:true})})}),e(Nt,{}),c(le,{direction:"row",justifyContent:"flex-end",spacing:1,sx:{p:2},children:[e(Te,{size:"small",onClick:F,color:"inherit",children:n("common.cancel")}),e(Te,{size:"small",variant:"contained",onClick:ee,children:n("common.done")})]})]})]})};M();var Wi={equals:"=",contains:"\u2287",notContains:"\u2285",wildcard:"*","=":"=","!=":"!=",">":">","<":"<",">=":"\u2265","<=":"\u2264",between:"\u2194"},Kb={equals:"smartFilter.operator.equals",contains:"smartFilter.operator.contains",notContains:"smartFilter.operator.notContains",wildcard:"smartFilter.operator.wildcard","=":"smartFilter.operator.equals","!=":"smartFilter.operator.notEquals",">":"smartFilter.operator.greaterThan","<":"smartFilter.operator.lessThan",">=":"smartFilter.operator.greaterOrEqual","<=":"smartFilter.operator.lessOrEqual",between:"smartFilter.operator.between"},qb=["contains","notContains",">",">=","<","<=","equals"],cu=["=","!=",">","<",">=","<=","between"],no="0.85rem",Xb=({field:t,value:o,onChange:r})=>{let{t:n}=de(),[a,i]=to.useState(null),[s,l]=to.useState(null),[d,p]=to.useState(null),[m,h]=to.useState(""),[f,u]=to.useState(""),[b,y]=to.useState(""),[g,x]=to.useState("");to.useEffect(()=>{let T=setTimeout(()=>{x(b);},1e3);return ()=>clearTimeout(T)},[b]);let v=o?.operator||(t.type==="number"?"=":"equals"),C=o?.value,P=T=>{let k=Kb[T];return k?n(k):T},S=T=>{i(a?null:T.currentTarget);},I=T=>{r({...o,operator:T,value:C}),i(null);},R={size:"small",fullWidth:true,variant:"outlined",InputLabelProps:{sx:{fontSize:no}},InputProps:{sx:{fontSize:no}},SelectProps:{MenuProps:{PaperProps:{sx:{"& .orb-menu-item, & option":{fontSize:no,paddingTop:"4px",paddingBottom:"4px",minHeight:"auto"}}}}}},w=t.type||"text";if(w==="date"){let k=(E=>{if(!E)return [null,null];if(Array.isArray(E)&&E.length===2){let O=E[0]?ir__default.default.isDayjs(E[0])?E[0]:ir__default.default(E[0]):null,$=E[1]?ir__default.default.isDayjs(E[1])?E[1]:ir__default.default(E[1]):null;return [O,$]}return ir__default.default.isDayjs(E)||typeof E=="string"?[ir__default.default.isDayjs(E)?E:ir__default.default(E),null]:[null,null]})(C);return e(su,{label:t.label,value:k,onChange:E=>r({value:E,operator:"between"})})}if(w==="number"&&v==="between"){let T=()=>{r({value:[m,f],operator:"between"}),l(null);},k=Array.isArray(C)?`${C[0]||""} - ${C[1]||""}`:"";return c(jsxRuntime.Fragment,{children:[e(ze,{...R,label:t.label,value:k,placeholder:n("smartFilter.minMaxPlaceholder"),InputProps:{...R.InputProps,startAdornment:e(dr,{position:"start",children:e(dt,{title:P("between"),children:e(se,{size:"small",onClick:S,sx:{width:24,height:24,fontSize:no},children:Wi.between})})}),readOnly:true},onClick:E=>l(s?null:E.currentTarget)}),e(Jt,{anchorEl:a,open:!!a,onClose:()=>i(null),PaperProps:{sx:{"& .orb-menu-item, & option":{fontSize:no,minHeight:"auto",py:.5}}},children:cu.map(E=>c("option",{selected:E===v,onClick:()=>I(E),children:[e("div",{sx:{width:24,display:"inline-block",fontWeight:"bold"},children:Wi[E]}),e(Ut,{primary:P(E),primaryTypographyProps:{fontSize:no}})]},E))}),e(pi,{open:!!s,anchorEl:s,onClose:()=>l(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},children:c("div",{sx:{p:2,display:"flex",gap:1,alignItems:"center"},children:[e(ze,{size:"small",label:n("smartFilter.min"),type:"number",value:m,onChange:E=>h(E.target.value),sx:{width:100},InputLabelProps:{sx:{fontSize:no}},InputProps:{sx:{fontSize:no}}}),e(op,{color:"action"}),e(ze,{size:"small",label:n("smartFilter.max"),type:"number",value:f,onChange:E=>u(E.target.value),sx:{width:100},InputLabelProps:{sx:{fontSize:no}},InputProps:{sx:{fontSize:no}}}),e(Te,{variant:"contained",size:"small",onClick:T,children:n("common.ok")})]})})]})}if(t.isValueHelp||w==="value-help"){let T=t.valueHelp?.mode||"single";return e(Bp,{...R,...t.valueHelp,label:t.label,placeholder:t.placeholder||t.valueHelp?.placeholder,value:C??(T==="multiple"?[]:null),mode:T,onChange:k=>r({value:k,operator:T==="multiple"?"anyOf":"equals"})})}if(w==="select")return c(Vt,{size:"small",fullWidth:true,label:t.label,value:C||"",onChange:T=>r({...o,value:T.target.value,operator:"equals"}),children:[e("option",{value:"",children:n("common.none")}),t.options?.map(T=>e("option",{value:T.value,children:T.label},T.value))]});if(w==="multi-select"){let T=Array.isArray(C)?C:[],k=t.options?.filter(G=>G.label.toLowerCase().includes(g.toLowerCase()))||[],E=G=>t.options?.find(W=>W.value===G)?.label||G,O=T.map(E),$=O.length===0?n("common.none"):O.length>2?`${O.slice(0,2).join(", ")} +${O.length-2}`:O.join(", "),ee=()=>{p(null),y(""),x("");},F=G=>{let W=T.includes(G)?T.filter(Q=>Q!==G):[...T,G];r({...o,value:W,operator:"anyOf"});};return c("div",{className:"orb-fld",children:[e("label",{children:t.label}),c(Te,{variant:"outlined",size:"small",onClick:G=>p(d?null:G.currentTarget),sx:{width:"100%",minHeight:36,justifyContent:"space-between",fontSize:no,fontWeight:400},children:[e("span",{sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:$}),e(Go,{fontSize:"small"})]}),e(Jt,{anchorEl:d,open:!!d,onClose:ee,PaperProps:{sx:{width:280,maxHeight:340,overflowY:"auto",p:.5}},children:c("div",{onClick:G=>G.stopPropagation(),sx:{display:"grid",gap:.35},children:[e(ze,{size:"small",autoFocus:true,placeholder:n("smartFilter.searchPlaceholder"),fullWidth:true,InputProps:{startAdornment:e(dr,{position:"start",children:e(Vr,{fontSize:"small"})}),sx:{fontSize:no}},value:b,onChange:G=>y(G.target.value),onKeyDown:G=>G.stopPropagation()}),k.length>0?k.map(G=>{let W=T.includes(G.value);return c("div",{role:"option","aria-selected":W,tabIndex:0,className:`orb-menu-item ${W?"orb-selected":""}`,onClick:()=>F(G.value),onKeyDown:Q=>{(Q.key==="Enter"||Q.key===" ")&&(Q.preventDefault(),F(G.value));},children:[e(It,{checked:W,size:"small",inputProps:{tabIndex:-1},sx:{pointerEvents:"none"}}),e(Ut,{primary:G.label})]},String(G.value))}):e("div",{className:"orb-menu-item","aria-disabled":"true",children:n("smartFilter.noOptionsFound")})]})})]})}let A=w==="number"?cu:qb;return c(jsxRuntime.Fragment,{children:[e(ze,{...R,className:"orb-filter-operator-field",label:t.label,sx:{minWidth:"120px"},value:C||"",type:w==="number"?"number":"text",onChange:T=>r({...o,value:T.target.value,operator:v}),InputProps:{...R.InputProps,startAdornment:e(dr,{position:"start",children:e(dt,{title:P(v),children:e(se,{className:"orb-filter-operator-trigger",size:"small",onClick:S,onMouseDown:T=>T.preventDefault(),sx:{width:24,height:24,fontSize:no,fontWeight:"bold",color:"primary.main",bgcolor:"action.hover"},children:Wi[v]})})}),endAdornment:t.hasSearchIcon?e(dr,{position:"end",children:e(Vr,{color:"action"})}):void 0}}),e(Jt,{anchorEl:a,open:!!a,onClose:()=>i(null),PaperProps:{sx:{"& .orb-menu-item, & option":{fontSize:no,minHeight:"auto",py:.5}}},children:A.map(T=>c("option",{selected:T===v,onClick:()=>I(T),children:[e("span",{className:"orb-filter-operator-symbol",children:Wi[T]}),e(Ut,{primary:P(T),primaryTypographyProps:{fontSize:no}})]},T))})]})},Uo=({fields:t,filters:o,onFilterChange:r,variants:n=[],currentVariantId:a,onVariantLoad:i,onVariantSave:s,onVariantDelete:l,onVariantSetDefault:d,onSearch:p,loading:m=false,appId:h,tableKey:f,currentLayout:u,currentLayoutId:b,layoutRefs:y,variantService:g,serviceUrl:x})=>{let{t:v}=de(),[C,P]=to.useState(true),[S,I]=to.useState(null),[R,w]=to.useState(t.filter(k=>!k.hidden).map(k=>k.id)),A=(k,E)=>{r({...o,[k]:E});},D=k=>{R.includes(k)?w(R.filter(E=>E!==k)):w([...R,k]);};return c(Ae,{className:`orb-smart-filter ${C?"orb-smart-filter-expanded":"orb-smart-filter-collapsed"}`,sx:{mb:0,display:"flex",flexDirection:"column",overflow:"visible",position:"relative"},children:[C?c(jsxRuntime.Fragment,{children:[c("div",{className:"orb-smart-filter-header",children:[h?e(au,{appId:h,tableKey:f,currentFilters:{values:o,visibleFields:R},currentLayout:u,currentLayoutId:b,layoutRefs:y,onLoad:k=>{if(!k.filters)return;let E=null;if(Array.isArray(k.filters)){let O=f||"default",$=k.filters.find(ee=>ee.scope===O);E=$?$.filters:null;}else E=k.filters;E&&(E.values||E.visibleFields?(E.visibleFields&&Array.isArray(E.visibleFields)&&w(E.visibleFields),E.values&&r(E.values)):r(E)),i&&i(k);},variantService:g,serviceUrl:x,currentVariantId:a}):e(zi,{variants:n,currentVariantId:a,onLoad:i,onSave:k=>{s&&s({...k,filters:{values:o,visibleFields:R}});},onDelete:l,onSetDefault:d}),c("div",{className:"orb-smart-filter-actions",children:[e(dt,{title:v("smartFilter.addFilters"),children:e(Te,{className:"orb-smart-filter-adapt",onClick:k=>I(S?null:k.currentTarget),size:"small",color:"primary",startIcon:e(Tp,{fontSize:"small"}),sx:{textTransform:"none",fontSize:no,whiteSpace:"nowrap",minWidth:"fit-content"},children:v("smartFilter.adaptFilters")})}),e(se,{className:"orb-smart-filter-go",tooltip:v("smartFilter.go"),"aria-label":v("smartFilter.go"),onClick:p,disabled:m,children:m?e(Qo,{size:16}):e(Tt,{name:"play",size:16})}),c(Jt,{anchorEl:S,open:!!S,onClose:()=>I(null),slotProps:{paper:{style:{maxHeight:400,width:"25ch"},sx:{"& .orb-menu-item, & option":{fontSize:no,minHeight:32}}}},children:[e("option",{disabled:true,children:e(Ut,{primary:v("smartFilter.visibleFilters"),primaryTypographyProps:{fontSize:no}})}),e(Nt,{}),t.map(k=>c("option",{onClick:()=>D(k.id),children:[e(It,{checked:R.includes(k.id),size:"small"}),e(Ut,{primary:k.label,primaryTypographyProps:{fontSize:no}})]},k.id))]})]})]}),e("div",{className:"orb-smart-filter-grid",children:e(fl,{container:true,spacing:2,columns:{xs:2,sm:3,md:4,lg:6},children:t.filter(k=>R.includes(k.id)).map(k=>e(fl,{size:1,children:e(Xb,{field:k,value:o[k.id]||{value:"",operator:k.type==="number"?"=":"equals"},onChange:E=>A(k.id,E)})},k.id))})})]}):null,e("div",{className:"orb-smart-filter-toggle",children:e(se,{className:"orb-smart-filter-toggle-button",size:"small",onClick:()=>P(!C),sx:{bgcolor:"background.paper",boxShadow:2,border:"1px solid",borderColor:"divider",width:30,height:30,minWidth:30,minHeight:0,p:0,"&:hover":{bgcolor:"background.paper"}},children:C?e(hi,{className:"orb-smart-filter-toggle-icon",sx:{fontSize:20},color:"action"}):e(Go,{className:"orb-smart-filter-toggle-icon",sx:{fontSize:20},color:"action"})})})]})};M();var du=({layouts:t,currentLayoutId:o,onLoad:r,onSave:n,onDelete:a,onSetDefault:i})=>{let{t:s}=de(),[l,d]=to.useState(null),[p,m]=to.useState(false),[h,f]=to.useState(""),[u,b]=to.useState(""),[y,g]=to.useState({isDefault:false,isPublic:false}),x=t.find(R=>R.id===o),v=R=>{d(R.currentTarget);},C=()=>{d(null);},P=R=>{r(R),C();},S=()=>{f(""),b(""),g({isDefault:false,isPublic:false}),m(true),C();},I=()=>{h.trim()&&(n({name:h,description:u,...y}),m(false));};return c("div",{className:"orb-layout-actions",sx:{display:"flex",alignItems:"center",gap:.25},children:[e(dt,{title:s("layout.layoutOptions"),children:e(se,{onClick:v,color:x?"primary":"default",size:"small",children:e(Dp,{fontSize:"small"})})}),c(Jt,{anchorEl:l,open:!!l,onClose:C,align:"end",PaperProps:{sx:{width:320,maxHeight:400}},children:[e("option",{disabled:true,children:e(L,{variant:"caption",children:s("layout.selectLayout")})}),c("option",{onClick:S,children:[e(_o,{children:e(Tr,{fontSize:"small"})}),e(Ut,{children:s("layout.saveCurrentLayout")})]}),e(Nt,{}),t.length===0&&e("option",{disabled:true,children:e(L,{variant:"body2",color:"text.secondary",children:s("layout.noSavedLayouts")})}),t.map((R,w)=>e("option",{onClick:()=>P(R),selected:R.id===o,children:c("div",{sx:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"},children:[c("div",{sx:{display:"flex",flexDirection:"column",overflow:"hidden",mr:1},children:[e("div",{sx:{display:"flex",alignItems:"center",gap:1},children:e(L,{variant:"body2",fontWeight:R.id===o?"bold":"normal",noWrap:true,children:R.name})}),R.description&&e(L,{variant:"caption",color:"text.secondary",noWrap:true,children:R.description})]}),c("div",{sx:{display:"flex",alignItems:"center"},onClick:A=>A.stopPropagation(),children:[e(dt,{title:R.isDefault?s("layout.removeDefault"):s("layout.setAsDefault"),children:e(se,{size:"small",onClick:A=>{A.stopPropagation(),i(R.id);},children:R.isDefault?e(Rp,{fontSize:"small",color:"warning"}):e(Mp,{fontSize:"small"})})}),e(dt,{title:s("common.delete"),children:e(se,{size:"small",color:"error",onClick:A=>{A.stopPropagation(),a(R.id);},children:e(mi,{fontSize:"small"})})})]})]})},R.id||w))]}),e(Ot,{open:p,onClose:()=>m(false),maxWidth:"xs",fullWidth:true,className:"orb-layout-save-dialog",title:s("layout.saveLayout"),actions:c(jsxRuntime.Fragment,{children:[e(Te,{variant:"ghost",onClick:()=>m(false),children:s("common.cancel")}),e(Te,{onClick:I,variant:"primary",disabled:!h.trim(),children:s("common.save")})]}),children:c("div",{className:"orb-layout-save-form",children:[e(ze,{label:s("layout.layoutName"),value:h,onChange:R=>f(R.target.value),fullWidth:true,autoFocus:true,size:"small",helperText:s("layout.layoutNameHelper")}),t.some(R=>R.name===h)&&e(L,{className:"orb-layout-save-warning",variant:"caption",color:"warning.main",children:s("layout.warningOverwrite")}),e(ze,{label:s("layout.layoutDescription"),value:u,onChange:R=>b(R.target.value),fullWidth:true,size:"small"}),e(It,{className:"orb-layout-save-option",checked:y.isDefault,onChange:R=>g({...y,isDefault:R.target.checked}),label:s("layout.useAsDefault")}),e(It,{className:"orb-layout-save-option",checked:y.isPublic,onChange:R=>g({...y,isPublic:R.target.checked}),label:s("layout.publicAllUsers")})]})})]})};M();var bn=({appId:t,tableKey:o="default",currentLayoutData:r,onLayoutLoad:n,targetLayoutId:a,activeLayoutId:i,serviceUrl:s,onError:l,onSuccess:d})=>{let{t:p}=de(),[m,h]=to.useState([]),[f,u]=to.useState(""),b=`orbcafe.layouts.${t}.${o}`,y=w=>({id:w.layoutId,name:w.name,description:w.description??"",isDefault:!!w.isDefault,isPublic:!!w.isPublic,createdAt:w.createdAt??new Date().toISOString(),layoutData:w.layout??{}}),g=w=>({appId:t,tableKey:o,layoutId:w.id,name:w.name,description:w.description??"",isDefault:!!w.isDefault,isPublic:!!w.isPublic,createdAt:w.createdAt,layout:w.layoutData}),x=to.useCallback(()=>{try{let w=localStorage.getItem(b);if(!w)return [];let A=JSON.parse(w);return Array.isArray(A)?A:[]}catch{return []}},[b]),v=to.useCallback(w=>{try{localStorage.setItem(b,JSON.stringify(w));}catch{}},[b]);to.useEffect(()=>{i!==void 0&&u(i);},[i]),to.useEffect(()=>{if(a&&m.length>0){let w=m.find(A=>A.id===a);w&&(u(w.id),n(w));}},[a,m,n]);let C=to.useCallback(async()=>{if(t){if(!s){let w=x();h(w);let A=w.find(D=>D.isDefault);A&&!f&&!a&&(u(A.id),n(A));return}try{let w=await fetch(`${s}/api/layouts?appId=${encodeURIComponent(t)}&tableKey=${encodeURIComponent(o)}`);if(!w.ok)throw new Error("LAYOUT_FETCH_FAILED");let D=(await w.json()).map(y);h(D);let T=D.find(k=>k.isDefault);T&&!f&&!a&&(u(T.id),n(T));}catch(w){console.error("Error fetching layouts",w);let A=x();h(A);let D=A.find(T=>T.isDefault);D&&!f&&!a&&(u(D.id),n(D)),l&&l(p("layout.toast.loadFallback"));}}},[t,o,s,l,f,n,a,x,p]);return to.useEffect(()=>{C();},[t,o]),e(du,{layouts:m,currentLayoutId:f,onLoad:w=>{u(w.id),n(w);},onSave:async w=>{let A=m.find(k=>k.name===w.name),D=A?A.id:Date.now().toString(),T={id:D,...w,createdAt:new Date().toISOString(),layoutData:r,isDefault:w.isDefault??false,isPublic:w.isPublic??false};if(!s){let E=m.some(O=>O.id===D)?m.map(O=>O.id===D?T:O):[...m,T];h(E),v(E),u(D),n(T),d&&d(p("layout.toast.saveLocalSuccess"));return}try{if(!(await fetch(`${s}/api/layouts`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g(T))})).ok)throw new Error("LAYOUT_SAVE_FAILED");d&&d(p("layout.toast.saveSuccess")),await C(),u(D),n(T);}catch(k){console.error("Error saving layout",k);let O=m.some($=>$.id===D)?m.map($=>$.id===D?T:$):[...m,T];h(O),v(O),u(D),n(T),d&&d(p("layout.toast.saveLocalSuccess")),l&&l(p("layout.toast.backendUnavailableSavedLocal"));}},onDelete:async w=>{if(!s){let A=m.filter(D=>D.id!==w);h(A),v(A),f===w&&u(""),d&&d(p("layout.toast.deleteLocalSuccess"));return}try{if(!(await fetch(`${s}/api/layouts/${encodeURIComponent(w)}`,{method:"DELETE"})).ok)throw new Error("LAYOUT_DELETE_FAILED");f===w&&u(""),d&&d(p("layout.toast.deleteSuccess")),await C();}catch(A){console.error("Error deleting layout",A);let D=m.filter(T=>T.id!==w);h(D),v(D),f===w&&u(""),d&&d(p("layout.toast.deleteLocalSuccess")),l&&l(p("layout.toast.backendUnavailableDeletedLocal"));}},onSetDefault:async w=>{if(!s){let A=m.map(D=>({...D,isDefault:D.id===w}));h(A),v(A),d&&d(p("layout.toast.defaultLocalSuccess"));return}try{let A=m.find(T=>T.id===w);if(!A)return;if(!(await fetch(`${s}/api/layouts`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g({...A,isDefault:!0}))})).ok)throw new Error("LAYOUT_DEFAULT_FAILED");d&&d(p("layout.toast.defaultSuccess")),await C();}catch(A){console.error("Error setting default",A);let D=m.map(T=>({...T,isDefault:T.id===w}));h(D),v(D),d&&d(p("layout.toast.defaultLocalSuccess")),l&&l(p("layout.toast.backendUnavailableDefaultLocal"));}}})};var $i=(t,o)=>{if(!t||!t.filters)return null;if(Array.isArray(t.filters)){let r=t.filters.find(a=>a.scope===o);if(r)return r.filters;let n=t.filters.find(a=>a.scope==="default");return n?n.filters:null}return typeof t.filters=="object"?t.filters:null},_i=(t,o)=>{if(!t)return {layout:null,layoutId:null};let r=null,n=null;if(Array.isArray(t.layoutRefs)){let a=t.layoutRefs.find(i=>i.tableKey===o);a&&(r=a.layoutId);}return !r&&t.layoutId&&(r=t.layoutId),t.layout&&typeof t.layout=="object"&&!Array.isArray(t.layout)&&(n=t.layout),{layoutId:r,layout:n}};function uu(t,o,r){return o[r]<t[r]?-1:o[r]>t[r]?1:0}function Zb(t,o){return t==="desc"?(r,n)=>uu(r,n,o):(r,n)=>-uu(r,n,o)}function Yb(t,o){let r=t.map((n,a)=>[n,a]);return r.sort((n,a)=>{let i=o(n[0],a[0]);return i!==0?i:n[1]-a[1]}),r.map(n=>n[0])}var vn=t=>{let o=!!t.disableGrouping,r=!!t.disableSorting,n=to.useCallback(q=>{let Z=String(q?.label??q?.id??"").length*9+64,be=typeof q?.minWidth=="number"?q.minWidth:0;return Math.max(100,be,Z)},[]),a=to.useCallback(()=>(t.columns||[]).filter(q=>!!q?.numeric).map(q=>q.id),[t.columns]),[i,s]=to.useState(""),[l,d]=to.useState(t.order||"asc"),[p,m]=to.useState(t.orderBy||""),[h,f]=to.useState([]),[u,b]=to.useState(t.page||0),[y,g]=to.useState(t.rowsPerPage||20),[x,v]=to.useState(t.selected||[]),[C,P]=to.useState(t.columns?t.columns.map(q=>q.id):[]),[S,I]=to.useState(t.columns?t.columns.map(q=>q.id):[]),[R,w]=to.useState(t.showSummary||false),[A,D]=to.useState(()=>a()),[T,k]=to.useState([]),[E,O]=to.useState(new Set),[$,ee]=to.useState(()=>{let q={};return (t.columns||[]).forEach(V=>{q[V.id]=n(V);}),q}),[F,G]=to.useState(null),[W,Q]=to.useState(null),[z,H]=to.useState(null),[X,Y]=to.useState(null),[j,te]=to.useState(false),[ce,fe]=to.useState(""),[Ve,ve]=to.useState(""),xe=o?[]:T,He=to.useCallback(q=>{if(o){k([]),O(new Set),Q(null);return}k(q);},[o]);to.useEffect(()=>{o&&(k([]),O(new Set),Q(null));},[o]),to.useEffect(()=>{r&&(d("asc"),m(""),f([]));},[r]),to.useEffect(()=>{t.layout&&St(t.layout);},[t.layout]),to.useEffect(()=>{if(r){d("asc"),m("");return}t.order!==void 0&&d(t.order),t.orderBy!==void 0&&m(t.orderBy);},[t.order,t.orderBy,r]),to.useEffect(()=>{t.selected!==void 0&&v(t.selected);},[t.selected]),to.useEffect(()=>{t.page!==void 0&&b(t.page);},[t.page]),to.useEffect(()=>{t.rowsPerPage!==void 0&&g(t.rowsPerPage);},[t.rowsPerPage]),to.useEffect(()=>{let q=a();D(V=>V.filter(be=>q.includes(be)));},[a]),to.useEffect(()=>{ee(q=>{let V={...q};return (t.columns||[]).forEach(Z=>{V[Z.id]===void 0&&(V[Z.id]=n(Z));}),V});},[t.columns,n]),to.useEffect(()=>{I(q=>{let V=(t.columns||[]).map(qe=>qe.id),Z=new Set(V),be=q.filter(qe=>Z.has(qe)),ke=new Set(be),Ee=V.filter(qe=>!ke.has(qe)),_e=[...be,...Ee];return _e.length===q.length&&_e.every((qe,je)=>qe===q[je])?q:_e});},[t.columns]);let pe=to.useMemo(()=>{let q=t.columns||[];if(S.length===0)return q;let V=new Map(q.map(ke=>[ke.id,ke])),Z=[],be=new Set;return S.forEach(ke=>{let Ee=V.get(ke);Ee&&(Z.push(Ee),be.add(ke));}),q.forEach(ke=>{be.has(ke.id)||Z.push(ke);}),Z},[t.columns,S]),ye=to.useMemo(()=>{let q=t.rows||[];return i&&(q=q.filter(V=>Object.keys(V).some(Z=>String(V[Z]).toLowerCase().includes(i.toLowerCase())))),q},[t.rows,i]),$e=to.useMemo(()=>{if(r||t.onSortChange)return ye;if(h.length>0){let q=[...ye];return q.sort((V,Z)=>{for(let be of h){let ke=V?.[be.field],Ee=Z?.[be.field];if(!(ke==null&&Ee==null)){if(ke==null)return be.direction==="asc"?-1:1;if(Ee==null)return be.direction==="asc"?1:-1;if(ke<Ee)return be.direction==="asc"?-1:1;if(ke>Ee)return be.direction==="asc"?1:-1}}return 0}),q}return p?Yb(ye,Zb(l,p)):ye},[ye,l,p,h,t.onSortChange,r]),tt=to.useCallback(q=>{if(xe.length===0)return q.map(Ee=>({type:"row",data:Ee,id:Ee[t.rowKey||"id"]}));let V=[...q].sort((Ee,_e)=>{for(let qe of xe){if(Ee[qe]<_e[qe])return -1;if(Ee[qe]>_e[qe])return 1}return 0}),Z=(Ee,_e=0)=>{if(_e>=xe.length)return Ee;let qe=xe[_e],je={},mt=[];return Ee.forEach(ht=>{let Rt=ht[qe],yt=`${qe}:${Rt}`;je[yt]||(je[yt]={key:yt,field:qe,value:Rt,children:[],count:0,level:_e},mt.push(je[yt])),je[yt].children.push(ht),je[yt].count++;}),mt.forEach(ht=>{ht.children&&(ht.children=Z(ht.children,_e+1));}),mt},be=Z(V),ke=(Ee,_e="")=>{let qe=[];return Ee.forEach(je=>{if(je.children){let mt=_e?`${_e}>${je.key}`:je.key,ht=E.has(mt);qe.push({type:"group",id:mt,field:je.field,value:je.value,level:je.level,count:je.count,isExpanded:ht,childIds:(function Rt(yt){let B=[];return yt.children.forEach(J=>{J.children?B=B.concat(Rt(J)):B.push(J[t.rowKey||"id"]);}),B})(je)}),ht&&(qe=qe.concat(ke(je.children,mt)));}else qe.push({type:"row",data:je,id:je[t.rowKey||"id"],level:xe.length});}),qe};return ke(be)},[xe,E,t.rowKey]),at=to.useCallback(q=>{if(xe.length===0)return [];let V=[...q].sort((ke,Ee)=>{for(let _e of xe){if(ke[_e]<Ee[_e])return -1;if(ke[_e]>Ee[_e])return 1}return 0}),Z=[],be=(ke,Ee,_e)=>{if(Ee>=xe.length)return;let qe=xe[Ee],je=new Map;ke.forEach(mt=>{let ht=mt[qe],Rt=je.get(ht);Rt?Rt.push(mt):je.set(ht,[mt]);}),je.forEach((mt,ht)=>{let Rt=`${qe}:${ht}`,yt=_e?`${_e}>${Rt}`:Rt;Z.push(yt),be(mt,Ee+1,yt);});};return be(V,0,""),Z},[xe]),st=to.useMemo(()=>tt($e),[$e,tt]),K=to.useMemo(()=>at($e),[$e,at]),Ne=to.useMemo(()=>{let q=(t.rows||[]).length;return typeof t.count=="number"&&t.count>q},[t.count,t.rows]),Se=to.useMemo(()=>Ne?st:y>0?st.slice(u*y,u*y+y):st,[st,u,y,Ne]),Fe=to.useMemo(()=>Ne&&typeof t.count=="number"?t.count:st.length,[st.length,Ne,t.count]),it=q=>{O(V=>{let Z=new Set(V);return Z.has(q)?Z.delete(q):Z.add(q),Z});},Ye=q=>{let V=K.filter(Z=>Z===q||Z.startsWith(`${q}>`));O(Z=>{let be=new Set(Z);return V.forEach(ke=>be.add(ke)),be});},wt=q=>{O(V=>{let Z=new Set(V);return Array.from(Z).forEach(be=>{(be===q||be.startsWith(`${q}>`))&&Z.delete(be);}),Z});},Mt=q=>{if(!q){O(new Set);return}O(new Set(K));},Ft=q=>{let V=K.filter(Z=>Z.startsWith(`${q}>`));return V.length===0?E.has(q):E.has(q)&&V.every(Z=>E.has(Z))},Et=q=>{if(r)return;h.length>0&&f([]);let V=p===q&&l==="asc",Z=p===q&&l==="desc";if(t.onSortChange){V?t.onSortChange(q,"desc"):Z?t.onSortChange("","asc"):t.onSortChange(q,"asc");return}V?(d("desc"),m(q)):Z?(d("asc"),m("")):(d("asc"),m(q));},ne=q=>{if(r){d("asc"),m(""),f([]);return}let V=q.filter(Z=>Z&&Z.field);f(V),V.length>0&&m("");},Ke=()=>{f([]);},Oe=(q,V)=>{ee(Z=>({...Z,[q]:V}));},ue=q=>{if(q.target.checked){let V=ye.map(Z=>Z[t.rowKey||"id"]);v(V),t.onSelectionChange&&t.onSelectionChange(V);return}v([]),t.onSelectionChange&&t.onSelectionChange([]);},we=(q,V)=>{let Z=V[t.rowKey||"id"],be=x.indexOf(Z),ke=[];be===-1?ke=ke.concat(x,Z):be===0?ke=ke.concat(x.slice(1)):be===x.length-1?ke=ke.concat(x.slice(0,-1)):be>0&&(ke=ke.concat(x.slice(0,be),x.slice(be+1))),v(ke),t.onSelectionChange&&t.onSelectionChange(ke);},re=q=>{b(q),t.onPageChange&&t.onPageChange(q);},Ce=q=>{g(q),b(0),t.onPageChange&&t.onPageChange(0),t.onRowsPerPageChange&&t.onRowsPerPageChange(q);},De=q=>{let V=C.indexOf(q),Z=[...C];V===-1?Z.push(q):Z.splice(V,1),P(Z);},Je=q=>{if(o)return;let V=xe.indexOf(q),Z=[...xe];V===-1?Z.push(q):Z.splice(V,1),He(Z);},lt=q=>{a().includes(q)&&D(Z=>Z.includes(q)?Z.filter(be=>be!==q):[...Z,q]);},ut=(q,V)=>{!q||!V||q===V||I(Z=>{let be=Z.indexOf(q),ke=Z.indexOf(V);if(be===-1||ke===-1)return Z;let Ee=[...Z];return Ee.splice(be,1),Ee.splice(ke,0,q),Ee});},Ht=q=>{let V=q?.active?.id,Z=q?.over?.id;typeof V=="string"&&typeof Z=="string"&&ut(V,Z);},Yt=q=>{t.onLayoutSave&&t.onLayoutSave({visibleColumns:C,columnOrder:S,order:r?"asc":l,orderBy:r?"":p,sortBy:r?[]:h,grouping:xe,columnWidths:$,showSummary:R,summaryColumns:A});},Wt=q=>{let{layout:V,layoutId:Z}=_i(q,t.tableKey||"default");Z?(ve(Z),fe(Z)):(ve(""),fe("")),V&&(V.visibleColumns&&P(V.visibleColumns),Array.isArray(V.columnOrder)&&I(V.columnOrder),r?(d("asc"),m(""),f([])):(V.order&&d(V.order),V.orderBy&&m(V.orderBy),Array.isArray(V.sortBy)&&f(V.sortBy)),V.grouping&&He(V.grouping),V.columnWidths&&ee(V.columnWidths),V.showSummary!==void 0&&w(!!V.showSummary),Array.isArray(V.summaryColumns)&&D(V.summaryColumns));},St=q=>{let V=q?.layoutData||q?.layout||q||{};V.visibleColumns&&P(V.visibleColumns),Array.isArray(V.columnOrder)&&I(V.columnOrder),r?(d("asc"),m(""),f([])):(V.order&&d(V.order),V.orderBy!==void 0&&m(V.orderBy),Array.isArray(V.sortBy)&&f(V.sortBy)),V.grouping&&He(V.grouping),V.columnWidths&&ee(V.columnWidths),V.showSummary!==void 0&&w(!!V.showSummary),Array.isArray(V.summaryColumns)&&D(V.summaryColumns),O(new Set),b(0),q?.id&&fe(q.id),ve("");};to.useEffect(()=>{t.layout&&Wt({layout:t.layout});},[t.layout]);let $t=q=>{q.preventDefault(),Y(X===null?{mouseX:q.clientX+2,mouseY:q.clientY-6}:null);},bt=()=>{Y(null);},At=to.useMemo(()=>{if(!R)return {};let q={};t.columns.forEach(Z=>{if(Z.numeric&&A.includes(Z.id)){let be=ye.reduce((ke,Ee)=>{let _e=parseFloat(Ee[Z.id]);return ke+(isNaN(_e)?0:_e)},0);q[Z.id]=be.toFixed(2);}else q[Z.id]="";});let V=t.columns.find(Z=>C.includes(Z.id)&&!Z.numeric);return V&&!V.numeric&&(q[V.id]="Total"),q},[ye,t.columns,R,A,C]),ct=()=>{if(!t.columns||!ye)return;let q=t.columns.map(Ee=>Ee.label).join(","),V=ye.map(Ee=>t.columns.map(_e=>{let qe=Ee[_e.id];return `"${(qe==null?"":String(qe)).replace(/"/g,'""')}"`}).join(",")).join(`
|
|
184
|
+
`),Z=`data:text/csv;charset=utf-8,${q}
|
|
185
|
+
${V}`,be=encodeURI(Z),ke=document.createElement("a");ke.setAttribute("href",be),ke.setAttribute("download",`${t.title||"export"}.csv`),document.body.appendChild(ke),ke.click(),document.body.removeChild(ke);},Bt=()=>{te(true);},jt=()=>{te(false);};return {isMobile:false,columns:pe,order:l,setOrder:d,orderBy:p,setOrderBy:m,sortBy:h,setSortBy:f,applyMultiSort:ne,clearMultiSort:Ke,columnOrder:S,setColumnOrder:I,filterText:i,setFilterText:s,visibleColumns:C,setVisibleColumns:P,showSummary:R,setShowSummary:w,summaryColumns:A,grouping:xe,setGrouping:He,expandedGroups:E,setExpandedGroups:O,groupAnchorEl:W,setGroupAnchorEl:Q,summaryAnchorEl:z,setSummaryAnchorEl:H,columnWidths:$,setColumnWidths:ee,anchorEl:F,setAnchorEl:G,contextMenu:X,setContextMenu:Y,sensors:void 0,sortedAndFilteredRows:$e,visibleRows:Se,summaryRow:At,page:u,setPage:re,rowsPerPage:y,setRowsPerPage:Ce,totalDisplayCount:Fe,selected:x,setSelected:v,isAllExpanded:K.length>0&&K.every(q=>E.has(q)),handleColumnResize:Oe,handleRequestSort:Et,handleSelectAllClick:ue,handleClick:we,toggleSummaryColumn:lt,handleDragEnd:Ht,handleColumnReorder:ut,handleExport:ct,handleContextMenu:$t,handleCloseContextMenu:bt,toggleColumnVisibility:De,toggleGroupExpand:it,toggleGroupField:Je,handleToggleAll:Mt,handleExpandGroupRecursively:Ye,handleCollapseGroupRecursively:wt,isGroupFullyExpanded:Ft,handleLayoutLoad:St,handleVariantLoad:Wt,handleLayoutSave:Yt,effectiveAppId:t.appId||"",currentLayoutData:{visibleColumns:C,order:r?"asc":l,orderBy:r?"":p,sortBy:r?[]:h,columnOrder:S,grouping:xe,columnWidths:$,showSummary:R,summaryColumns:A},currentLayoutId:ce,layoutIdToLoad:Ve,onPageChange:re,onRowsPerPageChange:Ce,graphReportOpen:j,handleOpenGraphReport:Bt,handleCloseGraphReport:jt}};M();var eD=t=>e("tbody",{...t}),tD=({align:t,...o})=>e("td",{align:t==="inherit"?void 0:t,...o}),oD=t=>e("div",{...t}),rD=t=>e("thead",{...t}),nD=t=>e("tr",{...t}),rr=t=>{let{t:o}=de(),r="0.85rem",{title:n,showToolbar:a=true,selectionMode:i,selected:s=[],onSelectionChange:l,actions:d,extraTools:p,fitContainer:m=false,fullWidth:h=false,maxHeight:f,loading:u=false,rowsPerPageOptions:b=[20,50,100,-1],onLayoutSave:y,filterConfig:g,rowKey:x,tableKey:v="default",graphReport:C,quickCreate:P,quickEdit:S,quickDelete:I,serviceUrl:R,disableGrouping:w=false,disableSorting:A=false}=t,D=n||o("table.title.default"),{isMobile:T,columns:k,order:E,orderBy:O,filterText:$,setFilterText:ee,visibleColumns:F,showSummary:G,setShowSummary:W,summaryColumns:Q,grouping:z,setGrouping:H,expandedGroups:X,groupAnchorEl:Y,setGroupAnchorEl:j,summaryAnchorEl:te,setSummaryAnchorEl:ce,columnWidths:fe,anchorEl:Ve,setAnchorEl:ve,contextMenu:xe,sensors:He,sortedAndFilteredRows:pe,summaryRow:ye,visibleRows:$e,isAllExpanded:tt,page:at,setPage:st,rowsPerPage:K,setRowsPerPage:Ne,totalDisplayCount:Se,setSelected:Fe,handleColumnResize:it,handleRequestSort:Ye,handleSelectAllClick:wt,handleClick:Mt,toggleSummaryColumn:Ft,handleDragEnd:Et,handleExport:ne,handleContextMenu:Ke,handleCloseContextMenu:Oe,toggleColumnVisibility:ue,toggleGroupExpand:we,handleToggleAll:re,handleExpandGroupRecursively:Ce,handleCollapseGroupRecursively:De,isGroupFullyExpanded:Je,handleLayoutLoad:lt,handleVariantLoad:ut,handleLayoutSave:Ht,effectiveAppId:Yt,currentLayoutData:Wt,currentLayoutId:St,layoutIdToLoad:$t,graphReportOpen:bt,handleOpenGraphReport:At,handleCloseGraphReport:ct}=vn(t),Bt=C?.enabled??false,jt=Bt&&(C?.interaction?.enabled??true),q=Bi(),V=!!P?.enabled,Z=!!S?.enabled,be=!!I?.enabled,ke=P?.fields,Ee=P?.excludeFields||[],_e=P?.initialValues||{},[qe,je]=to__namespace.default.useState(false),[mt,ht]=to__namespace.default.useState(false),[Rt,yt]=to__namespace.default.useState({}),[B,J]=to__namespace.default.useState(false),[he,Ie]=to__namespace.default.useState(false),[et,Xe]=to__namespace.default.useState({}),[kt,ft]=to__namespace.default.useState(false),[gt,Ct]=to__namespace.default.useState(false),ao=u||mt||he||gt,Lt=to__namespace.default.useMemo(()=>{let ae=[...k];if(Array.isArray(ke)&&ke.length>0){let ge=new Set(ke);ae=ae.filter(oe=>ge.has(oe.id));}if(Ee.length>0){let ge=new Set(Ee);ae=ae.filter(oe=>!ge.has(oe.id));}return ae.filter(ge=>!!ge?.id)},[k,Ee,ke]),Qt=x||"id",zt=to__namespace.default.useMemo(()=>{let ae=new Set(s);return pe.filter(ge=>ae.has(ge?.[Qt]))},[s,pe,Qt]),qt=zt.length===1?zt[0]:null,_t=S?.fields,ro=S?.excludeFields||[],io=S?.editableFields||[],yo=S?.nonEditableFields||[],No=S?.primaryKeys?.length?S.primaryKeys:[Qt],Do=to__namespace.default.useMemo(()=>{let ae=[...k];if(Array.isArray(_t)&&_t.length>0){let ge=new Set(_t);ae=ae.filter(oe=>ge.has(oe.id));}if(ro.length>0){let ge=new Set(ro);ae=ae.filter(oe=>!ge.has(oe.id));}return ae.filter(ge=>!!ge?.id)},[k,ro,_t]),sr=to__namespace.default.useMemo(()=>new Set(No),[No]),So=to__namespace.default.useMemo(()=>new Set(io),[io]),zo=to__namespace.default.useMemo(()=>new Set(yo),[yo]),Xr=to__namespace.default.useCallback(ae=>So.size>0?So.has(ae):!(zo.has(ae)||sr.has(ae)),[So,zo,sr]);to__namespace.default.useEffect(()=>{!bt&&q.hasActiveFilters&&q.clearAll();},[bt,q.hasActiveFilters,q.clearAll]);let Zr=()=>{let ae={};Lt.forEach(ge=>{ae[ge.id]=_e[ge.id]??"";}),yt(ae),je(true);},Or=()=>{mt||je(false);},Yr=(ae,ge)=>{yt(oe=>({...oe,[ae]:ge}));},jr=async()=>{if(!P?.onSubmit){je(false);return}try{ht(!0),await P.onSubmit(Rt),je(!1);}finally{ht(false);}},Ao=()=>{if(!qt)return;let ae={};Do.forEach(oe=>{ae[oe.id]=qt[oe.id]??"";});let ge=S?.getInitialValues?{...ae,...S.getInitialValues(qt)}:ae;Xe(ge),J(true);},Fr=()=>{he||J(false);},Qr=(ae,ge)=>{Xe(oe=>({...oe,[ae]:ge}));},jo=async()=>{if(qt){if(!S?.onSubmit){J(false);return}try{Ie(!0),await S.onSubmit(et,qt),J(!1);}finally{Ie(false);}}},lr=()=>{zt.length!==0&&ft(true);},Bn=()=>{gt||ft(false);},Br=async()=>{if(zt.length===0){ft(false);return}if(!I?.onConfirm){ft(false),Fe([]),l?.([]);return}try{Ct(!0),await I.onConfirm(zt),ft(!1),Fe([]),l?.([]);}finally{Ct(false);}},N=pe,{fieldMapping:_}=gn({rows:N,config:{...C,title:C?.title||`${D} ${o("graph.reportTitle")}`}}),U=to__namespace.default.useMemo(()=>jt?q.applyRows(N,_):N,[jt,q.applyRows,N,_]),{model:me}=gn({rows:U,config:{...C,title:C?.title||`${D} ${o("graph.reportTitle")}`,fieldMapping:_}}),Be=me.table.columns.map(ae=>({id:ae.id,label:ae.label,align:ae.align||"left",minWidth:120,numeric:ae.align==="right"})),nt=Yt?e(bn,{appId:Yt,tableKey:v,currentLayoutData:Wt,onLayoutLoad:lt,targetLayoutId:$t,activeLayoutId:St,serviceUrl:R??g?.serviceUrl}):null,Ge=c(jsxRuntime.Fragment,{children:[!w&&e(un,{groupAnchorEl:Y,setGroupAnchorEl:j,grouping:z,setGrouping:H,columns:k}),e(mn,{anchorEl:Ve,setAnchorEl:ve,columns:k,visibleColumns:F,toggleColumnVisibility:ue}),e(Ri,{anchorEl:te,setAnchorEl:ce,showSummary:G,setShowSummary:W,columns:k,summaryColumns:Q,toggleSummaryColumn:Ft}),e(Ni,{contextMenu:xe,handleCloseContextMenu:Oe,columns:k,visibleColumns:F,toggleColumnVisibility:ue})]});return T?c("div",{sx:{display:"flex",flexDirection:"column",gap:2,height:"100%"},children:[g&&e(Uo,{fields:g.fields,filters:g.filters,onFilterChange:g.onFilterChange,onSearch:g.onSearch,variants:g.variants||[],currentVariantId:g.currentVariantId,onVariantLoad:g.onVariantLoad,onVariantSave:g.onVariantSave,onVariantDelete:g.onVariantDelete,onVariantSetDefault:g.onVariantSetDefault,appId:g.appId,tableKey:v,currentLayout:[{tableKey:v,layoutData:Wt}],variantService:g.variantService,serviceUrl:R??g.serviceUrl}),e(Vp,{title:D,loading:u,showSummary:G,setShowSummary:W,setAnchorEl:ve,setSummaryAnchorEl:ce,filterText:$,setFilterText:ee,sortedAndFilteredRows:pe,selected:s,columns:k,visibleColumns:F,summaryRow:ye,handleClick:Mt,selectionMode:i}),Ge]}):c("div",{sx:{width:h?"100%":"auto",mb:m?0:2,...m?{flex:1,display:"flex",flexDirection:"column",minHeight:0,height:"100%",overflow:"hidden"}:{}},children:[g&&e("div",{sx:{mb:2},children:e(Uo,{fields:g.fields,filters:g.filters,onFilterChange:g.onFilterChange,onSearch:g.onSearch,variants:g.variants||[],currentVariantId:g.currentVariantId,onVariantLoad:ae=>{ut(ae),g.onVariantLoad&&g.onVariantLoad(ae);},onVariantSave:g.onVariantSave,onVariantDelete:g.onVariantDelete,onVariantSetDefault:g.onVariantSetDefault,loading:u,appId:g.appId,tableKey:v,currentLayout:[{tableKey:v,layoutData:Wt}],currentLayoutId:St,layoutRefs:[{tableKey:v,layoutId:St}],variantService:g.variantService,serviceUrl:R??g.serviceUrl})}),c(Ae,{className:"orb-ctable-surface",sx:{width:h?"100%":"auto",mb:m?0:2,display:"flex",flexDirection:"column",overflow:"hidden",position:"relative","&::before":ao?{content:'""',position:"absolute",top:0,left:0,width:"100%",height:"3px",background:"linear-gradient(90deg, color-mix(in oklch, var(--orb-primary) 0%, transparent) 0%, color-mix(in oklch, var(--orb-primary) 25%, transparent) 25%, var(--orb-primary) 50%, color-mix(in oklch, var(--orb-primary) 25%, transparent) 75%, color-mix(in oklch, var(--orb-primary) 0%, transparent) 100%)",backgroundSize:"220% 100%",animation:"cTableTopMarquee 1.2s linear infinite",zIndex:6,pointerEvents:"none"}:{},"@keyframes cTableTopMarquee":{"0%":{backgroundPosition:"220% 0"},"100%":{backgroundPosition:"-120% 0"}},...f?{height:f}:m?{flex:1,minHeight:0,height:"100%"}:{}},children:[a&&e(Pi,{filterText:$,setFilterText:ee,onRowsPerPageChange:Ne,rowsPerPage:K,rowsPerPageOptions:b,page:at,count:Se,onPageChange:st,actions:d,extraTools:p,grouping:z,disableGrouping:w,groupAnchorEl:Y,setGroupAnchorEl:j,showSummary:G,setShowSummary:W,anchorEl:Ve,setAnchorEl:ve,summaryAnchorEl:te,setSummaryAnchorEl:ce,handleExport:ne,showCreateButton:V,onOpenCreateDialog:Zr,showEditButton:Z,onOpenEditDialog:Ao,editDisabled:zt.length!==1,showDeleteButton:be,onOpenDeleteConfirm:lr,deleteDisabled:zt.length===0,onLayoutSave:y||g?.variantService&&g?.appId?Ht:void 0,loading:u,layoutManager:nt,onOpenGraphReport:Bt?At:void 0}),e("div",{sx:{flex:1,...f?{maxHeight:f,height:f}:m?{height:0,maxHeight:"none"}:{maxHeight:"calc(100vh - 320px)"},overflowY:"auto",overflowX:"auto",position:"relative",minHeight:0},children:e(core.DndContext,{sensors:He,collisionDetection:core.closestCenter,onDragEnd:Et,modifiers:[modifiers.restrictToHorizontalAxis],children:c("table",{className:"orb-tbl orb-ctable",style:{minWidth:h?750:void 0,width:h?"100%":"auto",tableLayout:Object.keys(fe).length>0?"fixed":"auto",borderCollapse:"separate",borderSpacing:0,fontSize:r},"aria-labelledby":"tableTitle",children:[e(Ii,{columns:k,visibleColumns:F,order:E,orderBy:O,onRequestSort:Ye,disableSorting:A,onContextMenu:Ke,selectionMode:i,grouping:z,isAllExpanded:tt,handleToggleAll:re,rowCount:pe.length,numSelected:s.length,onSelectAllClick:wt,columnWidths:fe,onColumnResize:it}),e(Mi,{visibleRows:$e,columns:k,visibleColumns:F,selectionMode:i,selected:s,orderBy:O,loading:u,expandedGroups:X,toggleGroupExpand:we,handleExpandGroupRecursively:Ce,handleCollapseGroupRecursively:De,isGroupFullyExpanded:Je,handleClick:Mt,onSelectionChange:l,grouping:z,rowKeyProp:x,page:at,rowsPerPage:K}),G&&e(zp,{showSummary:G,columns:k,visibleColumns:F,summaryRow:ye,selectionMode:i?.toString(),grouping:z,columnWidths:fe,orderBy:O,zIndex:3})]})})})]}),V&&c(Ot,{open:qe,onClose:Or,fullWidth:true,maxWidth:"sm",slotProps:{paper:{sx:{borderRadius:2,border:ae=>`1px solid ${ae.palette.divider}`,bgcolor:"background.paper"}}},children:[e("div",{className:"orb-dialog-title",sx:{fontSize:"0.85rem",fontWeight:700,pb:1},children:P?.title||o("quickCreate.createWithTitle",{title:D})}),e("div",{className:"orb-dialog-content",sx:{pt:"8px !important"},children:c("div",{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[Lt.map(ae=>{let ge=ae.type==="number"||ae.numeric?"number":ae.type==="date"?"date":"text",oe=ae.label||ae.id;return e(ze,{label:oe,value:Rt[ae.id]??"",onChange:Le=>Yr(ae.id,Le.target.value),type:ge,size:"small",fullWidth:true,InputLabelProps:{shrink:ge==="date"?true:void 0,sx:{fontSize:"0.85rem"}},InputProps:{sx:{fontSize:"0.85rem"}}},`quick-create-${ae.id}`)}),P?.description&&e(tr,{severity:"info",sx:{fontSize:"0.85rem","& span":{fontSize:"0.85rem"}},children:P.description})]})}),c("div",{className:"orb-dialog-actions",sx:{px:3,pb:2},children:[e(Te,{onClick:Or,sx:{fontSize:"0.85rem"},disabled:mt,children:P?.cancelLabel||o("common.cancel")}),e(Te,{onClick:jr,variant:"contained",sx:{fontSize:"0.85rem",fontWeight:700},disabled:mt,children:P?.submitLabel||o("common.save")})]})]}),Z&&c(Ot,{open:B,onClose:Fr,fullWidth:true,maxWidth:"sm",slotProps:{paper:{sx:{borderRadius:2,border:ae=>`1px solid ${ae.palette.divider}`,bgcolor:"background.paper"}}},children:[e("div",{className:"orb-dialog-title",sx:{fontSize:"0.85rem",fontWeight:700,pb:1},children:S?.title||o("quickEdit.editWithTitle",{title:D})}),e("div",{className:"orb-dialog-content",sx:{pt:"8px !important"},children:c("div",{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[Do.map(ae=>{let ge=ae.type==="number"||ae.numeric?"number":ae.type==="date"?"date":"text",oe=ae.label||ae.id,Le=Xr(ae.id);return e(ze,{label:oe,value:et[ae.id]??"",onChange:Qe=>Qr(ae.id,Qe.target.value),type:ge,size:"small",fullWidth:true,disabled:!Le,InputLabelProps:{shrink:ge==="date"?true:void 0,sx:{fontSize:"0.85rem"}},InputProps:{sx:{fontSize:"0.85rem"}}},`quick-edit-${ae.id}`)}),S?.description&&e(tr,{severity:"info",sx:{fontSize:"0.85rem","& span":{fontSize:"0.85rem"}},children:S.description})]})}),c("div",{className:"orb-dialog-actions",sx:{px:3,pb:2},children:[e(Te,{onClick:Fr,sx:{fontSize:"0.85rem"},disabled:he,children:S?.cancelLabel||o("common.cancel")}),e(Te,{onClick:jo,variant:"contained",sx:{fontSize:"0.85rem",fontWeight:700},disabled:he||!qt,children:S?.submitLabel||o("common.save")})]})]}),be&&e(ta,{open:kt,type:"warning",title:I?.title||o("quickDelete.confirmTitle"),message:I?.message||(zt.length>1?o("quickDelete.confirmMessageMultiple",{count:zt.length}):o("quickDelete.confirmMessageSingle")),confirmText:I?.confirmText||o("common.delete"),cancelText:I?.cancelText||o("common.cancel"),onClose:Bn,onConfirm:Br}),Ge,Bt&&e(Oi,{open:bt,onClose:ct,model:me,aiAssistant:C?.aiAssistant,interaction:jt?{enabled:true,filters:q.filters,fieldMapping:_,onPrimaryDimensionClick:ae=>q.setFilter("primaryDimension",ae),onSecondaryDimensionClick:ae=>q.setFilter("secondaryDimension",ae),onStatusClick:ae=>q.setFilter("status",ae),onClearFilter:q.clearFilter,onClearAll:q.clearAll}:void 0,tableContent:e(rr,{appId:Yt||"graph-report-internal",title:o("graph.dataBody"),columns:Be,rows:me.table.rows,rowKey:"id",fullWidth:true,maxHeight:"420px",rowsPerPage:20,rowsPerPageOptions:[20,50,100],graphReport:{enabled:false}})})]})},aD=rr;M();var uD=({id:t,title:o,hideHeader:r=true,filterConfig:n,tableProps:a,children:i,spacing:s=1,mode:l="separated"})=>{let d=n?{...n,appId:n.appId||t}:void 0,p={...a,appId:a.appId||t};return c(wi,{title:o,hideHeader:r,children:[c(le,{spacing:s,sx:{height:"100%",overflow:"hidden"},children:[l==="separated"&&d&&e("div",{sx:{flexShrink:0},children:e(Uo,{...d})}),e("div",{sx:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:e(rr,{...p,fitContainer:true,filterConfig:l==="integrated"?d:void 0})})]}),i]})};var vD=({metadata:t,fetchData:o,initialRowsPerPage:r=20,rowsPerPageOptions:n=[20,50,100,-1],tableKey:a="default",mode:i="integrated",serviceUrl:s,variantService:l})=>{let{t:d}=de(),[p,m]=to.useState(false),[h,f]=to.useState([]),[u,b]=to.useState({}),[y,g]=to.useState(t.variants||[]),[x,v]=to.useState(t.layout||null),[C,P]=to.useState(""),[S,I]=to.useState(0),[R,w]=to.useState(0),[A,D]=to.useState(r),[T,k]=to.useState([]),[E,O]=to.useState("asc"),[$,ee]=to.useState("");to.useEffect(()=>{let te={};t.filters.forEach(ce=>{ce.defaultValue!==void 0&&(te[ce.id]=ce.defaultValue);}),b(te);},[t.filters]);let F=to.useCallback(async(te,ce,fe,Ve,ve)=>{m(true);try{let xe={...te,page:ce+1,limit:fe,sort:ve,order:Ve},He;o?He=await o(xe):typeof t.api=="function"?He=await t.api(xe):t.api&&typeof t.api=="object"?(console.log("Fetching from URL:",t.api.url,xe),He={rows:[],total:0}):(console.warn("No API configured for report"),He={rows:[],total:0}),He&&(f(He.rows||[]),I(He.total||0));}catch(xe){console.error("Failed to fetch report data",xe);}finally{m(false);}},[t.api,o]);to.useEffect(()=>{F(u,R,A,E,$);},[F,R,A,E,$]);let G=()=>{w(0),F(u,0,A,E,$);},W=te=>{w(0),D(te);},Q=(te,ce)=>{O(ce),ee(te);},z=te=>{b(te);},H=te=>{P(te?.id||"");let ce=$i(te,a);if(ce){let Ve=ce.values??ce;b(Ve),F(Ve,0,A,E,$),w(0);}let{layout:fe}=_i(te,a);fe&&v(fe);},X=te=>{let ce={...te,id:Date.now().toString(),createdAt:new Date().toISOString()};g(fe=>[...fe,ce]);},Y=te=>{v(te);};return {pageProps:{id:t.id,title:t.title,mode:i,filterConfig:{appId:t.id,tableKey:a,fields:t.filters,filters:u,onFilterChange:z,onSearch:G,onVariantLoad:H,onVariantSave:X,onVariantDelete:te=>g(ce=>ce.filter(fe=>fe.id!==te)),onVariantSetDefault:te=>{g(ce=>ce.map(fe=>({...fe,isDefault:fe.id===te})));},variants:y,currentVariantId:C,variantService:l,serviceUrl:s},tableProps:{appId:t.id,tableKey:a,columns:t.columns,rows:h,loading:p,rowKey:"id",count:S,page:R,rowsPerPage:A,rowsPerPageOptions:n,onPageChange:w,onRowsPerPageChange:W,selectionMode:"multiple",selected:T,onSelectionChange:k,onLayoutSave:Y,layout:x,title:t.title,showSummary:true,order:E,orderBy:$,serviceUrl:s,onSortChange:Q,graphReport:t.graphReport||{enabled:true,title:`${t.title} ${d("graph.reportTitle")}`}}},filters:u,rows:h,loading:p,refresh:G}};M();var rv=new Set(["id","title","description","icon","iconNode","meta"]),nv=t=>t.replace(/([A-Z])/g," $1").replace(/[._-]+/g," ").replace(/^\w/,o=>o.toUpperCase()).trim(),av=t=>Object.entries(t).filter(([o,r])=>!rv.has(o)&&r!==null&&r!==void 0&&["string","number","boolean"].includes(typeof r)).map(([o,r])=>({key:o,label:nv(o),value:String(r)})),gu=({item:t,open:o,onClose:r,onDownloadClick:n,renderContent:a,downloadTooltip:i,closeTooltip:s})=>{let{t:l}=de(),p=bo()==="dark"?"var(--orb-p300)":"var(--orb-primary)";to__namespace.default.useEffect(()=>{if(!o)return;let h=f=>{f.key==="Escape"&&r();};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[o,r]);let m=av(t);return typeof document>"u"?null:reactDom.createPortal(c(jsxRuntime.Fragment,{children:[e("div",{"aria-hidden":"true",onClick:r,sx:{position:"fixed",inset:0,zIndex:1299,backgroundColor:"rgba(1, 9, 26, 0.4)",opacity:o?1:0,pointerEvents:o?"auto":"none",transition:"opacity 200ms ease"}}),c("div",{role:"dialog","aria-modal":"true","aria-label":t.title,sx:{position:"fixed",top:"50%",left:"50%",zIndex:1300,width:"min(520px, 92vw)",maxHeight:"82vh",display:"flex",flexDirection:"column",bgcolor:"background.paper",border:"1px solid",borderColor:"divider",borderRadius:3,boxShadow:"0 24px 64px rgba(1, 9, 26, 0.3)",transform:o?"translate(-50%, -50%) scale(1)":"translate(-50%, -47%) scale(0.96)",opacity:o?1:0,transition:"transform 200ms ease, opacity 180ms ease"},children:[c(le,{direction:"row",spacing:1.5,alignItems:"center",sx:{p:2.5,pb:2,borderBottom:"1px solid",borderColor:"divider",flexShrink:0},children:[e("div",{sx:{width:56,height:56,flex:"0 0 auto",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:3,border:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:t.iconNode??e(Tt,{name:t.icon??"product",size:30,style:{color:p}})}),c("div",{sx:{flex:1,minWidth:0},children:[e(L,{component:"div",sx:{fontWeight:700,fontSize:"1.1rem",lineHeight:1.3,wordBreak:"break-word"},children:t.title}),t.meta?e(L,{component:"div",sx:{fontSize:"0.8rem",color:"text.secondary"},children:t.meta}):null]}),e(se,{tooltip:s??l("cardPage.close"),"aria-label":s??l("cardPage.close"),onClick:r,children:e(Tt,{name:"decline",size:18})})]}),e("div",{sx:{flex:1,minHeight:0,overflowY:"auto",p:2.5},children:a?a(t):c(jsxRuntime.Fragment,{children:[t.description?e(L,{component:"div",sx:{fontSize:"0.9rem",lineHeight:1.6,color:"text.primary"},children:t.description}):null,m.length>0?e("div",{sx:{mt:t.description?2.5:0,display:"grid",gap:1.5},children:m.map(h=>c("div",{children:[e(L,{component:"div",sx:{fontSize:"0.72rem",fontWeight:600,color:"text.secondary",textTransform:"uppercase",letterSpacing:"0.04em"},children:h.label}),e(L,{component:"div",sx:{fontSize:"0.88rem",color:"text.primary",wordBreak:"break-word"},children:h.value})]},h.key))}):null]})}),n?e("div",{sx:{p:2.5,pt:2,borderTop:"1px solid",borderColor:"divider",flexShrink:0},children:e(Te,{variant:"contained",sx:{width:"100%"},startIcon:e(Tt,{name:"download",size:16}),onClick:()=>n(t),children:i??l("cardPage.download")})}):null]})]}),document.body)};M();var iv={display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"3",overflow:"hidden"},sv=({item:t,onDetailClick:o,onDownloadClick:r,detailTooltip:n,downloadTooltip:a})=>{let{t:i}=de(),l=bo()==="dark"?"var(--orb-p300)":"var(--orb-primary)",d=t.iconNode??e(Tt,{name:t.icon??"product",size:26,style:{color:l}});return c(Ae,{elevation:0,sx:{p:2,height:"100%",display:"flex",flexDirection:"column",borderRadius:3,border:"1px solid",borderColor:"divider",bgcolor:"background.paper",boxShadow:"0 8px 20px rgba(15, 23, 42, 0.06)",transition:"transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease","&:hover":{transform:"translateY(-2px)",borderColor:"primary.main",boxShadow:"0 14px 32px rgba(15, 23, 42, 0.12)"}},children:[c(le,{direction:"row",spacing:1.5,alignItems:"center",children:[e("div",{sx:{width:48,height:48,flex:"0 0 auto",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:2.5,border:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:d}),c("div",{sx:{flex:1,minWidth:0},children:[e(L,{component:"div",noWrap:true,sx:{fontWeight:700,fontSize:"0.98rem",lineHeight:1.3},children:t.title}),t.meta?e(L,{component:"div",noWrap:true,sx:{fontSize:"0.75rem",color:"text.secondary"},children:t.meta}):null]})]}),e("div",{sx:{mt:1.5,flex:1,minHeight:0},children:e(L,{component:"div",sx:{fontSize:"0.84rem",lineHeight:1.45,color:"text.primary",...iv},children:t.description||"\xA0"})}),c(le,{direction:"row",spacing:.5,justifyContent:"flex-end",sx:{mt:1.5},children:[e(se,{tooltip:n??i("cardPage.viewDetails"),"aria-label":n??i("cardPage.viewDetails"),onClick:()=>o?.(t),children:e(Tt,{name:"show",size:18})}),e(se,{tooltip:a??i("cardPage.download"),"aria-label":a??i("cardPage.download"),onClick:()=>r?.(t),children:e(Tt,{name:"download",size:18})})]})]})},fu=({items:t,loading:o=false,onDetailClick:r,onDownloadClick:n,minCardWidth:a=260,detailTooltip:i,downloadTooltip:s,emptyText:l,detailPanel:d=true,renderDetailContent:p})=>{let{t:m}=de(),[h,f]=to__namespace.default.useState(null),[u,b]=to__namespace.default.useState(false),y=x=>{r?.(x),d&&(f(x),requestAnimationFrame(()=>requestAnimationFrame(()=>b(true))));},g=()=>{b(false),setTimeout(()=>f(null),260);};return o?e("div",{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",minHeight:240},children:e(Qo,{})}):t.length?c(jsxRuntime.Fragment,{children:[e("div",{sx:{flex:1,minHeight:0,overflowY:"auto",display:"grid",gridTemplateColumns:`repeat(auto-fill, minmax(${a}px, 1fr))`,gap:2,alignContent:"start",p:.5},children:t.map(x=>e(sv,{item:x,onDetailClick:y,onDownloadClick:n,detailTooltip:i,downloadTooltip:s},x.id))}),d&&h?e(gu,{item:h,open:u,onClose:g,onDownloadClick:n,renderContent:p,downloadTooltip:s}):null]}):e("div",{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",minHeight:240},children:e(L,{sx:{color:"text.secondary"},children:l??m("cardPage.empty")})})};M();var VD=({id:t,title:o,hideHeader:r=true,filterConfig:n,gridProps:a,children:i,spacing:s=1})=>{let l=n?{...n,appId:n.appId||t}:void 0;return c(wi,{title:o,hideHeader:r,children:[c(le,{spacing:s,sx:{height:"100%",overflow:"hidden"},children:[l&&e("div",{sx:{flexShrink:0},children:e(Uo,{...l})}),e("div",{sx:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:e(fu,{...a})})]}),i]})};var UD=({metadata:t,fetchData:o,tableKey:r="default",variantService:n,serviceUrl:a,onDetailClick:i,onDownloadClick:s,minCardWidth:l})=>{let[d,p]=to.useState(false),[m,h]=to.useState([]),[f,u]=to.useState(0),[b,y]=to.useState({}),[g,x]=to.useState(t.variants||[]),[v,C]=to.useState("");to.useEffect(()=>{let D={};t.filters.forEach(T=>{T.defaultValue!==void 0&&(D[T.id]=T.defaultValue);}),y(D);},[t.filters]);let P=to.useCallback(async D=>{p(true);try{let T=o?await o({...D}):{rows:[],total:0};h(T?.rows||[]),u(T?.total||0);}catch(T){console.error("Failed to fetch card page data",T);}finally{p(false);}},[o]);to.useEffect(()=>{P(b);},[P]);let S=()=>{P(b);},I=D=>{y(D);},R=D=>{C(D?.id||"");let T=$i(D,r);if(T){let k=T.values??T;y(k),P(k);}},w=D=>{let T={...D,id:Date.now().toString(),createdAt:new Date().toISOString()};x(k=>[...k,T]);};return {pageProps:{id:t.id,title:t.title,filterConfig:{appId:t.id,tableKey:r,fields:t.filters,filters:b,onFilterChange:I,onSearch:S,onVariantLoad:R,onVariantSave:w,onVariantDelete:D=>x(T=>T.filter(k=>k.id!==D)),onVariantSetDefault:D=>{x(T=>T.map(k=>({...k,isDefault:k.id===D})));},variants:g,currentVariantId:v,variantService:n,serviceUrl:a},gridProps:{items:m,loading:d,onDetailClick:i,onDownloadClick:s,minCardWidth:l}},items:m,total:f,filters:b,loading:d,refresh:S}};var cv=t=>[...t].sort((o,r)=>r.value-o.value),XD=({bars:t=[],lines:o=[],combos:r=[],heatmap:n=[],pies:a=[],waterfalls:i=[]})=>{let s=to.useMemo(()=>cv(t),[t]),l=to.useMemo(()=>[...o],[o]),d=to.useMemo(()=>[...r],[r]),p=to.useMemo(()=>[...n],[n]),m=to.useMemo(()=>{let f=a.reduce((u,b)=>u+b.value,0);return a.map(u=>({...u,percent:f>0?u.value/f*100:u.percent}))},[a]),h=to.useMemo(()=>[...i],[i]);return {bars:s,lines:l,combos:d,heatmap:p,pies:m,waterfalls:h}};var JD=({apiKey:t,query:o,zoom:r=14,mapType:n="roadmap"})=>to.useMemo(()=>!t||!o?"":sa({apiKey:t,query:o,zoom:r,mapType:n}),[t,o,r,n]),eA=({keyword:t,location:o})=>to.useMemo(()=>Ei({keyword:t,location:o?{lng:o.lng,lat:o.lat,name:o.name}:void 0}),[t,o]);M();var ua=({code:t,language:o="text",copyable:r=true,showLineNumbers:n=false,wrapLongLines:a=false,maxHeight:i})=>{let[s,l]=to.useState(false),d=to.useMemo(()=>t.replace(/\n$/,"").split(`
|
|
186
|
+
`),[t]);return c("div",{style:{border:"1px solid var(--orb-border)",borderRadius:12,overflow:"hidden",background:"var(--orb-canvas)"},children:[c("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"4.8px 8px",background:"var(--orb-hover)",borderBottom:"1px solid var(--orb-border)"},children:[e("span",{style:{fontSize:12,fontWeight:500,textTransform:"uppercase",letterSpacing:.5,color:"var(--orb-muted)",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},children:o}),r&&e(se,{size:"small",tooltip:s?"Copied":"Copy",onClick:async()=>{try{await navigator.clipboard.writeText(t),l(!0),window.setTimeout(()=>l(!1),1400);}catch{l(false);}},children:s?e(ko,{size:14,strokeWidth:1.8}):e(Lo,{size:14,strokeWidth:1.8})})]}),e("pre",{style:{margin:0,padding:10,fontSize:"0.82rem",lineHeight:1.55,overflow:"auto",maxHeight:i,background:"var(--orb-surface)",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},children:n?d.map((m,h)=>c("div",{style:{display:"flex"},children:[e("span",{style:{width:34,flexShrink:0,textAlign:"right",paddingRight:8,color:"var(--orb-disabled-fg)",userSelect:"none"},children:h+1}),e("span",{style:{whiteSpace:a?"pre-wrap":"pre",wordBreak:a?"break-word":"normal"},children:m})]},`${h}-${m}`)):e("code",{style:{display:"block",whiteSpace:a?"pre-wrap":"pre",wordBreak:a?"break-word":"normal"},children:t})})]})};M();var hv=t=>{let o=t.trim();return o.startsWith("$$")&&o.endsWith("$$")&&o.length>=4&&(o=o.slice(2,-2).trim()),o.startsWith("$")&&o.endsWith("$")&&o.length>=2&&(o=o.slice(1,-1).trim()),o},fv=async t=>new Function("m","return import(m)")(t),ma=({expression:t,inline:o=false,allowKatex:r=false})=>{let n=to.useMemo(()=>hv(t),[t]),[a,i]=to.useState("");return to.useEffect(()=>{let s=true;return (async()=>{if(!r||!n){i("");return}try{let d=await fv("katex"),m=(d?.default||d)?.renderToString?.(n,{displayMode:!o,throwOnError:!1,strict:"warn"});s&&typeof m=="string"&&i(m);}catch{s&&i("");}})(),()=>{s=false;}},[r,n,o]),n?a?e(Me,{component:o?"span":"div",sx:{display:o?"inline-flex":"block",my:o?0:.5,overflowX:"auto"},dangerouslySetInnerHTML:{__html:a}}):o?e(Me,{component:"code",sx:{px:.4,py:.05,borderRadius:.8,bgcolor:"action.hover",fontSize:"0.82em",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},children:n}):e(Me,{sx:{my:1,p:1,borderRadius:1.2,border:"1px dashed",borderColor:"divider",bgcolor:"background.paper"},children:e(xo,{component:"pre",sx:{m:0,whiteSpace:"pre-wrap",fontSize:"0.9rem",lineHeight:1.5,fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},children:n})}):null};M();var yv=async t=>new Function("m","return import(m)")(t),Il=({code:t,title:o="Mermaid Diagram",height:r=320,enabled:n=true})=>{let[a,i]=to.useState(""),[s,l]=to.useState(""),[d,p]=to.useState(false),m=to.useMemo(()=>t.trim(),[t]);return to.useEffect(()=>{let h=true;return (async()=>{if(!n||!m){i(""),l("");return}p(true),l(""),i("");try{let u=await yv("mermaid"),b=u?.default||u;if(!b||typeof b.render!="function")throw new Error("Mermaid runtime is not available");b.initialize?.({startOnLoad:!1,securityLevel:"loose",theme:"default"});let y=await b.render(`orbcafe-mermaid-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,m),g=typeof y=="string"?y:y?.svg;h&&typeof g=="string"&&i(g);}catch(u){if(h){let b=u instanceof Error?u.message:"Failed to render Mermaid diagram";l(b);}}finally{h&&p(false);}})(),()=>{h=false;}},[n,m]),c(Hr,{variant:"outlined",sx:{borderRadius:1.5,overflow:"hidden",my:1},children:[e(Me,{sx:{px:1,py:.6,borderBottom:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:e(xo,{variant:"caption",color:"text.secondary",sx:{letterSpacing:.4,textTransform:"uppercase"},children:o})}),c(Me,{sx:{p:1},children:[d&&e(Me,{sx:{minHeight:120,display:"flex",alignItems:"center",justifyContent:"center"},children:e(Hd,{size:20})}),!d&&a&&e(Me,{sx:{maxHeight:r,overflow:"auto","& svg":{display:"block",mx:"auto",maxWidth:"100%",height:"auto"}},dangerouslySetInnerHTML:{__html:a}}),!d&&!a&&c(Me,{children:[s&&e(tr,{severity:"info",sx:{mb:1},children:s}),e(ua,{code:m,language:"mermaid",copyable:true,showLineNumbers:true,wrapLongLines:true})]})]})]})};M();var Ml=t=>t.trim().replace(/^\|/,"").replace(/\|$/,"").split("|").map(r=>r.trim()),xv=t=>/^:?-{3,}:?$/.test(t.trim()),wv=t=>{let o=t.trim(),r=o.startsWith(":"),n=o.endsWith(":");return r&&n?"center":n?"right":"left"},Gi=t=>{let o=t.split(`
|
|
187
|
+
`).map(s=>s.trim()).filter(Boolean);if(o.length<2)return null;let r=Ml(o[0]),n=Ml(o[1]);if(r.length===0||n.length!==r.length||!n.every(xv))return null;let a=n.map(wv),i=o.slice(2).filter(s=>s.includes("|")).map(s=>{let l=Ml(s);return l.length<r.length?[...l,...Array.from({length:r.length-l.length},()=>"")]:l.slice(0,r.length)});return {headers:r,aligns:a,rows:i}},Rl=({markdown:t,table:o,maxHeight:r=360})=>{let n=to.useMemo(()=>o||(t?Gi(t):null),[o,t]);return !n||n.headers.length===0?e(Hr,{variant:"outlined",sx:{p:1.2,borderRadius:1.5},children:e(xo,{variant:"body2",color:"text.secondary",children:"Invalid table block"})}):e(Hr,{variant:"outlined",sx:{borderRadius:1.5,overflow:"hidden",my:1},children:e($d,{sx:{maxHeight:r},children:c(Vd,{size:"small",stickyHeader:true,children:[e(_d,{children:e(hl,{children:n.headers.map((a,i)=>e(gl,{align:n.aligns[i],sx:{fontWeight:700,bgcolor:"background.paper"},children:a},`${a}-${i}`))})}),e(Wd,{children:n.rows.map((a,i)=>e(hl,{hover:true,children:a.map((s,l)=>e(gl,{align:n.aligns[l],sx:{whiteSpace:"pre-wrap",wordBreak:"break-word"},children:s||e(Me,{component:"span",sx:{color:"text.disabled"},children:"-"})},`cell-${i}-${l}`))},`row-${i}`))})]})})})};M();var Ui=({content:t,title:o="Thinking",defaultExpanded:r=false,isStreaming:n=false})=>{let[a,i]=to.useState(r);return c(Me,{sx:{borderLeft:"2px solid",borderColor:"divider",pl:1,my:.8},children:[c(Od,{direction:"row",alignItems:"center",spacing:.6,children:[e(Fd,{size:"small",onClick:()=>i(s=>!s),sx:{transform:a?"rotate(180deg)":"rotate(0deg)",transition:"transform .15s ease"},children:e(sn,{fontSize:"inherit"})}),c(xo,{variant:"caption",color:"text.secondary",sx:{fontStyle:"italic"},children:[o,n?" ...":""]})]}),e(an,{in:a,children:e(xo,{variant:"body2",sx:{pl:4,pt:.4,whiteSpace:"pre-wrap",color:"text.secondary",fontStyle:"italic",lineHeight:1.55},children:t})})]})};M();var Nl=/(\*\*[^*]+\*\*|`[^`]+`|\[[^\]]+\]\([^)]+\)|\*[^*]+\*|\$[^$\n]+\$)/g,Ki=t=>t.trim().startsWith("```"),Cu=t=>/^#{1,6}\s+/.test(t.trim()),Dl=t=>/^[-*+]\s+/.test(t.trim()),Al=t=>/^\d+\.\s+/.test(t.trim()),xu=t=>/^(?:-{3,}|\*{3,}|_{3,})$/.test(t.trim()),El=t=>t.trim().startsWith(">"),wu=(t,o)=>{if(o+1>=t.length)return false;let r=t[o],n=t[o+1];return !r.includes("|")||!n.includes("|")?false:/^\s*\|?\s*:?-{3,}:?\s*(\|\s*:?-{3,}:?\s*)+\|?\s*$/.test(n.trim())},Su=t=>t.trim().startsWith("<think>")||t.trim()===":::think",ga=(t,o,r)=>{let n=[],a=0,i=0;Nl.lastIndex=0;let s=Nl.exec(t);for(;s;){s.index>a&&n.push(t.slice(a,s.index));let l=s[0],d=`${r}-${i}`;if(l.startsWith("**")&&l.endsWith("**"))n.push(e("strong",{children:l.slice(2,-2)},d));else if(l.startsWith("*")&&l.endsWith("*"))n.push(e("em",{children:l.slice(1,-1)},d));else if(l.startsWith("`")&&l.endsWith("`"))n.push(e(Me,{component:"code",sx:{px:.45,py:.08,borderRadius:.8,bgcolor:"action.hover",fontSize:"0.82em",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},children:l.slice(1,-1)},d));else if(l.startsWith("[")&&l.includes("](")&&l.endsWith(")")){let p=l.match(/^\[([^\]]+)\]\(([^)]+)\)$/);p?n.push(e(Ld,{href:p[2],target:"_blank",rel:"noreferrer",children:p[1]},d)):n.push(l);}else l.startsWith("$")&&l.endsWith("$")&&o.enableMath?n.push(e(ma,{expression:l,inline:true,allowKatex:true},d)):n.push(l);a=s.index+l.length,i+=1,s=Nl.exec(t);}return a<t.length&&n.push(t.slice(a)),n.length>0?n:[t]},ha=({markdown:t,content:o,className:r,enableMath:n=true,enableMermaid:a=true,enableThinkBlock:i=true,codeCopyable:s=true,codeLineNumbers:l=false})=>{let d=t??o??"",p=to.useMemo(()=>{let m=[],h=d.replace(/\r\n/g,`
|
|
188
188
|
`).split(`
|
|
189
|
-
`),
|
|
190
|
-
`).trim()},`think-tag-${u}`));continue}u+=1;let x=[];for(;u<
|
|
191
|
-
`).trim()},`think-fence-${u}`));continue}if(
|
|
192
|
-
`);if(a&&x==="mermaid"){m.push(e(
|
|
193
|
-
`).trim(),allowKatex:true},`math-${u}`));continue}if(
|
|
194
|
-
`),C=zi(b);if(C){m.push(e(vl,{table:C},`table-${u}`)),u=x;continue}}if(wl(v)){let x=[];for(;u<f.length&&wl(f[u]);)x.push(f[u].replace(/^\s*>\s?/,"")),u+=1;m.push(e(Br,{variant:"outlined",sx:{px:1,py:.8,my:.9,borderLeftWidth:3,borderLeftStyle:"solid",borderLeftColor:"primary.main",bgcolor:"action.hover"},children:e(yo,{variant:"body2",sx:{whiteSpace:"pre-wrap"},children:x.map((b,C)=>c(eo.Fragment,{children:[C>0&&e("br",{}),pa(b,h,`q-${u}-${C}`)]},`quote-line-${C}`))})},`quote-${u}`));continue}if(Cl(v)){let x=[];for(;u<f.length&&Cl(f[u]);)x.push(f[u].trim().replace(/^[-*+]\s+/,"")),u+=1;m.push(e(Re,{component:"ul",sx:{my:.8,pl:2.5},children:x.map((b,C)=>e(Re,{component:"li",sx:{mb:.45},children:e(yo,{variant:"body2",children:pa(b,h,`ul-${u}-${C}`)})},`ul-item-${C}`))},`ul-${u}`));continue}if(xl(v)){let x=[];for(;u<f.length&&xl(f[u]);)x.push(f[u].trim().replace(/^\d+\.\s+/,"")),u+=1;m.push(e(Re,{component:"ol",sx:{my:.8,pl:2.7},children:x.map((b,C)=>e(Re,{component:"li",sx:{mb:.45},children:e(yo,{variant:"body2",children:pa(b,h,`ol-${u}-${C}`)})},`ol-item-${C}`))},`ol-${u}`));continue}let g=[];for(;u<f.length;){let x=f[u],b=x.trim();if(!b||Wi(x)||fu(x)||hu(x)||Cl(x)||xl(x)||wl(x)||bu(f,u)||i&&vu(x)||n&&b.startsWith("$$"))break;g.push(x),u+=1;}g.length>0?m.push(e(yo,{variant:"body2",sx:{my:.65,lineHeight:1.65},children:g.map((x,b)=>c(eo.Fragment,{children:[b>0&&e("br",{}),pa(x,h,`p-${u}-${b}`)]},`p-line-${b}`))},`p-${u}`)):u+=1;}return m},[d,n,a,i,s,l]);return e(Re,{className:r,sx:{"& strong":{fontWeight:700},"& em":{fontStyle:"italic"},"& a":{wordBreak:"break-all"}},children:p})};P();var pA=(t,o)=>e(ua,{markdown:t,...o});P();var yu=({value:t,onChange:o,onSubmit:r,onVoiceInput:n,onClear:a,placeholder:i,statusText:s,loading:l=false,compact:d=false,showStatusText:p=true})=>c(se,{spacing:.75,children:[c("div",{sx:{display:"flex",alignItems:"center",gap:1,px:1.2,py:d?.25:.4,borderRadius:999,border:"1px solid",borderColor:"divider",bgcolor:"background.paper",minHeight:d?38:44},children:[e(zr,{sx:{fontSize:d?16:18,color:"text.secondary"}}),e(Bd,{fullWidth:true,value:t,onChange:m=>o(m.target.value),onKeyDown:m=>{m.key==="Enter"&&(m.preventDefault(),r());},placeholder:i,sx:{fontSize:d?"0.84rem":"0.9rem"}}),t&&a&&e(ie,{size:"small",onClick:a,children:e(Sr,{sx:{fontSize:d?16:18}})}),n&&e(ie,{size:"small",onClick:n,children:e(mp,{sx:{fontSize:d?16:18}})}),e(ie,{size:"small",onClick:r,disabled:l||!t.trim(),children:e(vp,{sx:{fontSize:d?16:18}})})]}),p&&s&&e(L,{variant:"caption",color:"text.secondary",children:s})]});P();var Cu=(t,o)=>{let r=o.trim();if(!r)return t;let n=t.toLowerCase(),a=r.toLowerCase(),i=n.indexOf(a);return i<0?t:c(jsxRuntime.Fragment,{children:[t.slice(0,i),e("div",{component:"mark",sx:{bgcolor:"warning.light",color:"warning.contrastText",px:.15,borderRadius:.4},children:t.slice(i,i+r.length)}),t.slice(i+r.length)]})},$i=({section:t,highlightQuery:o=""})=>{let r=t.columns||2;return c(Ae,{variant:"outlined",sx:{p:1.8,borderRadius:2},children:[e(L,{variant:"subtitle1",sx:{fontWeight:700,mb:1.4},children:t.title}),e("div",{sx:{display:"grid",gap:1.15,gridTemplateColumns:{xs:"1fr",md:r===3?"repeat(3, minmax(0, 1fr))":r===1?"1fr":"repeat(2, minmax(0, 1fr))"}},children:t.fields.map(n=>{let a=typeof n.value=="string"||typeof n.value=="number"?String(n.value):null;return c("div",{sx:{minWidth:0},children:[e(L,{variant:"caption",color:"text.secondary",sx:{display:"block"},children:Cu(n.label,o)}),e(L,{component:"div",variant:"body2",sx:{mt:.2,fontWeight:500,wordBreak:"break-word"},children:a?Cu(a,o):n.value})]},n.id)})})]})};var Sl=t=>t==null?"":typeof t=="string"||typeof t=="number"||typeof t=="boolean"?String(t):"",Gi=t=>t.trim().toLowerCase(),gv=(t,o)=>{let r=[];return t.forEach(n=>{n.fields.forEach(a=>{let i=a.searchableText||Sl(a.value),s={source:"section",sourceId:n.id,sourceSectionId:n.id,sourceTitle:n.title,fieldId:a.id,fieldLabel:a.label,fieldValue:i};r.push({hit:s,text:Gi(`${n.title} ${a.label} ${i}`)});});}),o.forEach(n=>{(n.fields||[]).forEach(a=>{let i=a.searchableText||Sl(a.value),s={source:"tab",sourceId:n.id,sourceTitle:n.label,fieldId:a.id,fieldLabel:a.label,fieldValue:i};r.push({hit:s,text:Gi(`${n.label} ${a.label} ${i}`)});}),(n.sections||[]).forEach(a=>{a.fields.forEach(i=>{let s=i.searchableText||Sl(i.value),l={source:"tab",sourceId:n.id,sourceSectionId:a.id,sourceTitle:`${n.label} / ${a.title}`,fieldId:i.id,fieldLabel:i.label,fieldValue:s};r.push({hit:l,text:Gi(`${n.label} ${a.title} ${i.label} ${s}`)});});});}),r},xu=({sections:t,tabs:o=[],defaultTabId:r,ai:n})=>{let{t:a}=le(),[i,s]=eo.useState(""),[l,d]=eo.useState(r||o[0]?.id),[p,m]=eo.useState("idle"),[f,h]=eo.useState([]),[u,v]=eo.useState(""),[y,g]=eo.useState(""),[x,b]=eo.useState(false),C=eo.useMemo(()=>gv(t,o),[t,o]);eo.useEffect(()=>{if(o.length===0){d(void 0);return}o.some(M=>M.id===l)||d(r||o[0]?.id);},[o,l,r]);let k=eo.useCallback(()=>{m("idle"),h([]),v(""),g("");},[]),S=eo.useCallback(w=>{s(w),w.trim()||(m("idle"),h([]),v(""),g(""));},[]),T=eo.useCallback(w=>{let M=Gi(w);return M?C.filter(A=>A.text.includes(M)).map(A=>A.hit):[]},[C]),I=eo.useCallback(async()=>{let w=i.trim();if(!w)return;b(true);let M=T(w);if(h(M),M.length>0){m("search"),g(""),v(a("detail.searchAi.matches",{count:M.length})),b(false);return}if(n?.enabled!==false&&n?.onSubmit){m("ai"),v(a("detail.searchAi.autoAiFallback"));try{let R=await n.onSubmit(w,{query:w,hits:M,activeTabId:l,sections:t,tabs:o});g(typeof R=="string"?R:"");}finally{b(false);}return}m("search"),g(""),v(a("detail.searchAi.noMatch")),b(false);},[i,T,a,n,l,t,o]);return {query:i,setQuery:S,activeTabId:l,setActiveTabId:d,searchMode:p,hits:f,statusText:u,aiResponse:y,searching:x,handleSubmit:I,clearResult:k}};P();var zA=({title:t,subtitle:o,sections:r,tabs:n=[],defaultTabId:a,table:i,ai:s,rightHeaderSlot:l,searchBarWidth:d=460,onClose:p,closeLabel:m="Close"})=>{let{t:f}=le(),{query:h,setQuery:u,activeTabId:v,setActiveTabId:y,searchMode:g,hits:x,statusText:b,aiResponse:C,searching:k,handleSubmit:S,clearResult:T}=xu({sections:r,tabs:n,defaultTabId:a,ai:s}),I=eo.useMemo(()=>n.find(A=>A.id===v)||n[0],[n,v]),w=eo.useCallback(A=>{let R=D=>{let E=document.getElementById(A);if(E){E.scrollIntoView({behavior:"smooth",block:"center"});return}D<4&&setTimeout(()=>R(D+1),60);};requestAnimationFrame(()=>R(0));},[]),M=eo.useCallback((A,R)=>{if(n.some(D=>D.id===A)){y(A),w(R?`detail-tab-${A}-section-${R}`:`detail-tab-${A}`);return}w(`detail-section-${A}`);},[n,y,w]);return c("div",{sx:{display:"flex",flexDirection:"column",gap:1.5,minHeight:"100%"},children:[c(se,{direction:{xs:"column",md:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",md:"center"},spacing:1,children:[c("div",{sx:{minWidth:0},children:[e(L,{variant:"h5",sx:{fontWeight:800,color:"text.primary"},children:t}),o&&e(L,{variant:"body2",color:"text.secondary",sx:{mt:.35},children:o})]}),c(se,{direction:"row",spacing:.6,alignItems:"center",sx:{width:{xs:"100%",md:"auto"},ml:{xs:0,md:"auto"}},children:[e("div",{sx:{width:{xs:"100%",md:d},maxWidth:"100%",minWidth:{md:320}},children:e(yu,{value:h,onChange:u,onSubmit:S,onVoiceInput:s?.onVoiceInput,onClear:()=>{u(""),T();},placeholder:s?.placeholder||f("detail.searchAi.placeholder"),statusText:b,loading:k,compact:true,showStatusText:false})}),p&&e(ct,{title:m,children:e(ie,{size:"small",onClick:p,children:e(op,{fontSize:"small"})})}),l]})]}),b&&e(L,{variant:"caption",color:"text.secondary",sx:{mt:-0.7},children:b}),g==="search"&&x.length>0&&c(Ae,{variant:"outlined",sx:{p:1.5,borderRadius:2},children:[e(L,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.6},children:f("detail.searchAi.matches",{count:x.length})}),e(se,{spacing:.35,children:x.slice(0,8).map(A=>e("div",{component:"button",type:"button",onClick:()=>M(A.sourceId,A.sourceSectionId),sx:{textAlign:"left",border:0,bgcolor:"transparent",p:.2,cursor:"pointer",color:"text.primary",borderRadius:1,"&:hover":{bgcolor:"action.hover"}},children:c(L,{variant:"body2",sx:{fontSize:"0.84rem"},children:[e("div",{component:"span",sx:{color:"text.secondary"},children:A.sourceTitle})," \xB7 ",e("div",{component:"span",sx:{fontWeight:700},children:A.fieldLabel})," = ",e("div",{component:"span",children:A.fieldValue||"-"})]})},`${A.source}|${A.sourceId}|${A.fieldId}`))})]}),g==="ai"&&C&&c(Ae,{variant:"outlined",sx:{p:1.5,borderRadius:2},children:[e(L,{variant:"subtitle2",sx:{fontWeight:700,mb:.7},children:f("detail.searchAi.aiResultTitle")}),e("div",{sx:{fontSize:"0.9rem",lineHeight:1.6,"& p":{m:0,mb:.8},"& h1, & h2, & h3, & h4":{mt:1.2,mb:.6,lineHeight:1.3},"& ul, & ol":{mt:.4,mb:.8,pl:2.6},"& code":{px:.5,py:.1,borderRadius:.8,bgcolor:"action.hover",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},"& pre":{m:0,mt:.8,mb:.8,p:1.1,borderRadius:1.2,bgcolor:"action.hover",overflowX:"auto"},"& pre code":{p:0,bgcolor:"transparent"}},children:e(ua,{markdown:C})})]}),e("div",{sx:{display:"grid",gap:1.5,gridTemplateColumns:{xs:"1fr",lg:"repeat(2, minmax(0, 1fr))"}},children:r.map(A=>e("div",{id:`detail-section-${A.id}`,children:e($i,{section:A,highlightQuery:h})},A.id))}),n.length>0&&c(Ae,{variant:"outlined",sx:{borderRadius:2,overflow:"hidden"},children:[e($d,{value:I?.id||false,onChange:(A,R)=>y(String(R)),variant:"scrollable",scrollButtons:"auto",sx:{borderBottom:"1px solid",borderColor:"divider"},children:n.map(A=>e(_d,{value:A.id,label:A.label,sx:{textTransform:"none"}},A.id))}),c("div",{sx:{p:1.5},children:[e("div",{id:`detail-tab-${I?.id||""}`}),I?.description&&e(L,{variant:"body2",color:"text.secondary",sx:{mb:1.2},children:I.description}),I?.content?I.content:c(se,{spacing:1.5,children:[(I?.sections||[]).map(A=>e("div",{id:`detail-tab-${I?.id}-section-${A.id}`,children:e($i,{section:A,highlightQuery:h})},A.id)),I?.fields&&I.fields.length>0&&e($i,{section:{id:`${I.id}-fields`,title:I.label,fields:I.fields,columns:2},highlightQuery:h})]})]})]}),i&&e(tr,{title:i.title||f("detail.table.title"),...i.tableProps,filterConfig:void 0,fitContainer:false})]})};P();var ku=({bucket:t,cardCount:o,highlighted:r=false,children:n,emptyLabel:a,height:i,maxHeight:s,onRename:l,renameLabel:d,sx:p})=>{let{t:m}=le(),[f,h]=eo.useState(false),[u,v]=eo.useState(t.title),y=()=>{v(t.title),h(false);},g=x=>{x.preventDefault();let b=u.trim();b&&(b!==t.title&&l?.(b),v(b),h(false));};return e(Ae,{elevation:0,sx:[x=>{let b=t.accentColor??x.palette.primary.main;return {position:"relative",display:"flex",flexDirection:"column",minWidth:0,minHeight:0,height:i??s??560,maxHeight:s,borderRadius:"var(--orb-r-container)",overflow:"hidden",border:r?`1px solid ${ot(b,.65)}`:"1px solid var(--orb-border)",bgcolor:"var(--orb-canvas)",boxShadow:r?`0 0 0 2px ${ot(b,.16)}, var(--orb-shadow-2)`:"none",transition:"border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease","&::before":{content:'""',display:"block",flexShrink:0,height:3,bgcolor:b}}},...Array.isArray(p)?p:p?[p]:[]],children:c(se,{spacing:1.25,sx:{flex:1,minHeight:0,overflow:"hidden",p:1.5},children:[c(Re,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:1.25},children:[e(Re,{sx:{minWidth:0,flex:1},children:c(Re,{sx:{display:"flex",alignItems:"center",gap:.75,minHeight:28},children:[t.icon&&e(Re,{sx:{display:"inline-flex",flexShrink:0,color:t.accentColor??"var(--orb-primary)"},children:t.icon}),f?c(Re,{component:"form",onSubmit:g,sx:{display:"flex",alignItems:"center",gap:.5,flex:1,minWidth:0},children:[e(ze,{dense:true,autoFocus:true,value:u,onChange:x=>v(x.target.value),onKeyDown:x=>{x.key==="Escape"&&(x.preventDefault(),y());},inputProps:{"aria-label":d??m("kanban.bucket.rename")},error:!u.trim(),sx:{flex:1,minWidth:0}}),e(ie,{type:"submit",size:"small",tooltip:m("kanban.bucket.saveRename"),"aria-label":m("kanban.bucket.saveRename"),disabled:!u.trim(),children:e(Ao,{size:14})}),e(ie,{size:"small",tooltip:m("kanban.bucket.cancelRename"),"aria-label":m("kanban.bucket.cancelRename"),onClick:y,children:e(qt,{size:14})})]}):e(L,{component:"div",sx:{fontSize:15,fontWeight:600,lineHeight:1.35,color:"text.primary"},children:t.title})]})}),!f&&c(se,{direction:"row",spacing:.75,sx:{flexShrink:0},children:[e(xt,{size:"small",label:o,sx:{minWidth:24,justifyContent:"center",fontWeight:600}}),typeof t.limit=="number"&&e(xt,{size:"small",label:`${m("kanban.bucket.limit")} ${t.limit}`,color:o>t.limit?"warning":"default",variant:"outlined"}),l&&e(ie,{size:"small",tooltip:d??m("kanban.bucket.rename"),"aria-label":d??m("kanban.bucket.rename"),onClick:()=>{v(t.title),h(true);},sx:{width:26,height:26},children:e(Wc,{size:14})})]})]}),r&&e(L,{component:"div",sx:{fontSize:12,color:t.accentColor??"var(--orb-primary)",fontWeight:500},children:m("kanban.bucket.dropHere")}),e(Re,{sx:{flex:1,height:0,minHeight:0,overflowY:"auto",overscrollBehavior:"contain",pr:.4,scrollbarGutter:"stable"},children:o>0?n:e(Re,{sx:{minHeight:"100%",borderRadius:"var(--orb-r-container)",border:"1px dashed var(--orb-border)",bgcolor:"transparent",display:"grid",placeItems:"center",px:2,textAlign:"center"},children:e(L,{sx:{fontSize:13,color:"text.secondary"},children:a??t.emptyLabel??m("kanban.empty")})})})]})})};P();var hv={success:"success",warning:"warning",info:"info",error:"error"},bv={critical:"error",high:"warning",medium:"info",low:"success"},vv={default:"var(--orb-primary)",success:"var(--orb-primary)",warning:"var(--orb-accent)",info:"var(--orb-primary)",error:"var(--orb-err)"},yv=(t,o)=>{switch(t){case "critical":return o("kanban.priority.critical");case "high":return o("kanban.priority.high");case "medium":return o("kanban.priority.medium");case "low":return o("kanban.priority.low");default:return t}},Cv=t=>t?t.split(/\s+/).map(o=>o.charAt(0).toUpperCase()).slice(0,2).join(""):"NA",kl=({card:t,bucket:o,dragging:r=false,overlay:n=false,onClick:a,sx:i})=>{let{t:s}=le(),l=!!(a&&o),d=t.tone??(t.priority?bv[t.priority]:"default"),p=d==="default"?"primary":hv[d],m=vv[d],f=o?{card:t,bucket:o}:void 0;return e(Ae,{onClick:l?()=>f&&a?.(f):void 0,onKeyDown:l?h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),f&&a?.(f));}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,sx:[{position:"relative",minWidth:0,overflow:"hidden",p:1.5,pl:1.75,borderRadius:"var(--orb-r-container)",border:`1px solid ${ot(m,.24)}`,bgcolor:"var(--orb-canvas)",boxShadow:n?"var(--orb-shadow-3)":r?"none":"var(--orb-shadow-1)",transform:n?"rotate(1deg) scale(1.01)":"none",transition:"transform var(--orb-t-fast), box-shadow var(--orb-t-fast), border-color var(--orb-t-fast)",cursor:l?"pointer":"default",opacity:r?.5:1,"&::before":{content:'""',position:"absolute",inset:"0 auto 0 0",width:3,bgcolor:m},"&:hover":l?{transform:"translateY(-1px)",borderColor:ot(m,.48),boxShadow:"var(--orb-shadow-2)"}:void 0,"&:focus-visible":l?{outline:"2px solid var(--orb-focus-solid)",outlineOffset:2}:void 0},...Array.isArray(i)?i:i?[i]:[]],elevation:0,children:c(se,{spacing:1.25,children:[c(Re,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:1},children:[c(Re,{sx:{minWidth:0,flex:1},children:[(t.kicker||o?.title)&&e(L,{component:"div",sx:{fontSize:11,fontWeight:500,color:"text.secondary",textTransform:"uppercase"},children:t.kicker??o?.title}),e(L,{component:"div",sx:{mt:.25,fontSize:14,fontWeight:600,lineHeight:1.4,color:"text.primary"},children:t.title})]}),t.priority&&e(xt,{size:"small",color:p,label:yv(t.priority,s),variant:d==="default"?"outlined":"filled",sx:{height:22,flexShrink:0,fontWeight:500}})]}),t.summary&&e(L,{component:"div",sx:{fontSize:13,fontWeight:300,color:"text.secondary",lineHeight:1.5},children:t.summary}),t.metrics&&t.metrics.length>0&&e(Re,{sx:{display:"grid",gridTemplateColumns:`repeat(${Math.min(t.metrics.length,3)}, minmax(0, 1fr))`,gap:.75},children:t.metrics.slice(0,3).map(h=>c(Re,{sx:{minWidth:0,borderRadius:"var(--orb-r)",px:1,py:.75,bgcolor:"var(--orb-surface)",border:"1px solid var(--orb-border)"},children:[e(L,{component:"div",noWrap:true,sx:{fontSize:11,fontWeight:500,color:"text.secondary",textTransform:"uppercase"},children:h.label}),e(L,{component:"div",noWrap:true,numeric:true,sx:{mt:.25,fontSize:13,fontWeight:600},children:h.value})]},h.id))}),typeof t.progress=="number"&&c(Re,{children:[c(Re,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:.5},children:[e(L,{sx:{fontSize:12,color:"text.secondary"},children:s("kanban.card.progress")}),c(L,{numeric:true,sx:{fontSize:12,fontWeight:600},children:[Math.round(t.progress),"%"]})]}),e(Ad,{variant:"determinate",value:Math.max(0,Math.min(100,t.progress)),color:m,sx:{height:4,borderRadius:2}})]}),(t.tags?.length||t.assignee||t.dueDate||t.footer||l)&&c(se,{spacing:.9,children:[t.tags&&t.tags.length>0&&e(Re,{sx:{display:"flex",flexWrap:"wrap",gap:.75},children:t.tags.map(h=>e(xt,{size:"small",label:h.label,color:h.color??"default",variant:"outlined"},h.id))}),c(Re,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,flexWrap:"wrap"},children:[c(Re,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0},children:[t.assignee&&c(jsxRuntime.Fragment,{children:[e(ri,{src:t.assignee.avatarSrc,sx:{width:28,height:28,fontSize:11},children:t.assignee.initials??Cv(t.assignee.name)}),c(Re,{sx:{minWidth:0},children:[e(L,{component:"div",sx:{fontSize:13,fontWeight:500,lineHeight:1.3},noWrap:true,children:t.assignee.name}),t.dueDate&&e(L,{component:"div",sx:{fontSize:11,color:"text.secondary",lineHeight:1.35},noWrap:true,children:t.dueDate})]})]}),!t.assignee&&t.dueDate&&e(L,{sx:{fontSize:12,color:"text.secondary"},children:t.dueDate})]}),l&&e(L,{sx:{fontSize:12,color:"var(--orb-link)",fontWeight:500,whiteSpace:"nowrap"},children:s("kanban.card.openDetail")})]}),t.footer]})]})})};var Pu=(t,o)=>{let r=o.title.trim();return !o.id||!r||t.buckets.some(n=>n.id===o.id)?t:{buckets:[...t.buckets,{...o,title:r,cards:[]}]}},Tu=(t,o,r)=>{let n=r.trim();if(!n)return t;let a=t.buckets.find(i=>i.id===o);return !a||a.title===n?t:{buckets:t.buckets.map(i=>i.id===o?{...i,title:n}:i)}},xv=(t,o)=>Number.isNaN(t)||t<0?0:t>o?o:t,Iu=({buckets:t,cards:o})=>{let r=new Map;return o.forEach((n,a)=>{let i=r.get(n.bucketId)??[];i.push({card:n,sourceIndex:a}),r.set(n.bucketId,i);}),{buckets:t.map(n=>{let a=[...r.get(n.id)??[]].sort((i,s)=>i.card.position===void 0&&s.card.position===void 0?i.sourceIndex-s.sourceIndex:i.card.position===void 0?1:s.card.position===void 0?-1:i.card.position-s.card.position||i.sourceIndex-s.sourceIndex).map(({card:i},s)=>({...i,bucketId:n.id,position:s}));return {...n,cards:a}})}},Uo=(t,o)=>{for(let r=0;r<t.buckets.length;r+=1){let n=t.buckets[r],a=n.cards.findIndex(i=>i.id===o);if(a>=0)return {card:n.cards[a],bucket:n,bucketIndex:r,cardIndex:a}}},Ui=(t,o)=>{let r=Uo(t,o.cardId);if(!r)return t;let n=t.buckets.findIndex(p=>p.id===o.toBucketId);if(n<0)return t;let a=t.buckets.map(p=>({...p,cards:p.cards.map(m=>({...m}))})),i=a[r.bucketIndex],[s]=i.cards.splice(r.cardIndex,1);if(!s)return t;let l=a[n],d=xv(o.targetIndex??l.cards.length,l.cards.length);return l.cards.splice(d,0,{...s,bucketId:o.toBucketId}),{buckets:a.map(p=>({...p,cards:p.cards.map((m,f)=>({...m,bucketId:p.id,position:f}))}))}};P();var Il="kanban-card|",Rl="kanban-bucket|",Du=t=>`${Il}${t}`,Av=t=>`${Rl}${t}`,Ki=t=>t?.startsWith(Il)?t.slice(Il.length):void 0,Mu=t=>t?.startsWith(Rl)?t.slice(Rl.length):void 0,Ev=({card:t,bucket:o,onCardClick:r})=>{let{setNodeRef:n,attributes:a,listeners:i,transform:s,transition:l,isDragging:d}=sortable.useSortable({id:Du(t.id)}),p={transform:s?`translate3d(${s.x}px, ${s.y}px, 0)`:void 0,transition:l,zIndex:d?2:1,touchAction:"none",cursor:d?"grabbing":"grab"};return e("div",{ref:n,style:p,...a,...i,children:e(kl,{card:t,bucket:o,dragging:d,onClick:r})})},Lv=({bucket:t,highlighted:o,bucketHeight:r,emptyBucketLabel:n,onBucketRename:a,onCardClick:i})=>{let{isOver:s,setNodeRef:l}=core.useDroppable({id:Av(t.id)});return e(Re,{ref:l,sx:{minWidth:0,minHeight:0,height:r},children:e(ku,{bucket:t,cardCount:t.cards.length,highlighted:o||s,emptyLabel:n,height:r,onRename:a,children:e(sortable.SortableContext,{items:t.cards.map(d=>Du(d.id)),strategy:sortable.verticalListSortingStrategy,children:e(se,{spacing:1,children:t.cards.map(d=>e(Ev,{card:d,bucket:t,onCardClick:i},d.id))})})})})},Nu=t=>String(t??"").toLocaleLowerCase(),Ov=(t,o)=>[t.id,t.title,t.summary,t.kicker,t.priority,t.tone,t.progress,t.dueDate,t.assignee?.id,t.assignee?.name,...t.tags?.flatMap(n=>[n.id,n.label])??[],...t.metrics?.flatMap(n=>[n.label,n.value])??[]].some(n=>Nu(n).includes(o)),mE=({model:t,onCardMove:o,onCardClick:r,cardFilter:n,onBucketAdd:a,onBucketRename:i,addBucketLabel:s,minBucketWidth:l=320,bucketHeight:d,bucketMaxHeight:p,searchable:m=false,searchValue:f,defaultSearchValue:h="",onSearchValueChange:u,searchPlaceholder:v,emptyBucketLabel:y,sx:g})=>{let{t:x}=le(),[b,C]=eo.useState(null),[k,S]=eo.useState(),[T,I]=eo.useState(h),w=f??T,M=w.trim().toLocaleLowerCase(),A=d??p??560,R=eo.useMemo(()=>({buckets:t.buckets.map(W=>{let H=n?W.cards.filter(Y=>n(Y,W)):W.cards;if(!M)return {...W,cards:H};let U=[W.id,W.title,W.description].some(Y=>Nu(Y).includes(M));return {...W,cards:U?H:H.filter(Y=>Ov(Y,M))}})}),[n,t,M]),D=eo.useMemo(()=>R.buckets.reduce((W,H)=>W+H.cards.length,0),[R]),E=eo.useCallback(W=>{f===void 0&&I(W),u?.(W);},[u,f]),O=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:6}}),core.useSensor(core.TouchSensor,{activationConstraint:{delay:120,tolerance:8}})),_=eo.useMemo(()=>b?Uo(t,b):void 0,[b,t]),J=eo.useCallback(()=>{C(null),S(void 0);},[]),F=eo.useCallback(W=>{if(!W)return;let H=Ki(W);return H?Uo(t,H)?.bucket.id:Mu(W)},[t]),V=eo.useCallback(W=>{C(Ki(String(W.active.id))??null);},[]),z=eo.useCallback(W=>{S(F(W.over?String(W.over.id):void 0));},[F]),X=eo.useCallback(W=>{let H=Ki(String(W.active.id)),U=W.over?String(W.over.id):void 0;if(!H||!U){J();return}let Y=Uo(t,H);if(!Y){J();return}let ue=Y.bucket.id,re=Y.cardIndex,ge=Ki(U);if(ge){let Te=Uo(t,ge);if(!Te){J();return}ue=Te.bucket.id,re=Te.cardIndex;}else {let Te=Mu(U),Ie=t.buckets.find(He=>He.id===Te);if(!Te||!Ie){J();return}ue=Te,re=Ie.cards.length;}if(Y.bucket.id===ue&&Y.cardIndex===re){J();return}let we=Ui(t,{cardId:H,fromBucketId:Y.bucket.id,toBucketId:ue,targetIndex:re}),Ve=Uo(we,H);Ve&&!(Ve.bucket.id===Y.bucket.id&&Ve.cardIndex===Y.cardIndex)&&o?.({cardId:H,fromBucketId:Y.bucket.id,toBucketId:Ve.bucket.id,targetIndex:Ve.cardIndex,card:Ve.card,model:we}),J();},[t,o,J]);return c(core.DndContext,{sensors:O,collisionDetection:core.closestCorners,onDragStart:V,onDragOver:z,onDragEnd:X,onDragCancel:J,children:[c(Re,{sx:{display:"flex",flexDirection:"column",minWidth:0,minHeight:0,height:"100%",overflow:"hidden"},children:[(m||a)&&c(Re,{role:m?"search":void 0,sx:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:1.5,mb:1.25,minWidth:0},children:[m&&e(Re,{sx:{width:"100%",maxWidth:360,flex:"1 1 240px"},children:e(ze,{dense:true,value:w,onChange:W=>E(W.target.value),placeholder:v??x("kanban.search.placeholder"),autoComplete:"off",sx:{"& .orb-inp":{paddingLeft:"38px",paddingRight:w?"42px":"12px"},"& .orb-inp-adornment-end":{pointerEvents:"auto"}},startAdornment:e(Vo,{size:16,"aria-hidden":"true"}),endAdornment:w?e(ie,{size:"small",tooltip:x("kanban.search.clear"),"aria-label":x("kanban.search.clear"),onClick:()=>E(""),sx:{width:26,height:26},children:e(qt,{size:15})}):void 0})}),c(Re,{sx:{display:"flex",alignItems:"center",gap:1,ml:"auto"},children:[M&&e(L,{component:"div","aria-live":"polite",sx:{flexShrink:0,fontSize:12,fontWeight:500,color:"text.secondary"},children:D>0?x("kanban.search.results",{count:D}):x("kanban.search.noMatch")}),a&&e(ke,{size:"small",variant:"secondary",startIcon:e(en,{size:15}),onClick:a,children:s??x("kanban.bucket.add")})]})]}),e(Re,{sx:[{display:"grid",gridAutoFlow:"column",gridAutoColumns:`minmax(${l}px, ${Math.max(l,360)}px)`,gap:1.5,gridAutoRows:A==="100%"?"minmax(0, 1fr)":void 0,alignItems:"stretch",justifyContent:"start",flex:"1 1 0",height:"100%",minHeight:0,overflowX:"auto",overflowY:"hidden",overscrollBehavior:"contain",scrollbarGutter:"stable both-edges",pb:.5},...Array.isArray(g)?g:g?[g]:[]],children:R.buckets.map(W=>e(Lv,{bucket:W,highlighted:W.id===k,bucketHeight:A,emptyBucketLabel:M?x("kanban.search.noMatch"):y,onBucketRename:i?H=>i(W.id,H):void 0,onCardClick:r},W.id))})]}),e(core.DragOverlay,{children:_?e(Re,{sx:{width:Math.max(l-24,260)},children:e(kl,{card:_.card,bucket:_.bucket,overlay:true})}):null})]})};var Hv=({initialModel:t,initialBuckets:o,initialCards:r})=>t||Iu({buckets:o??[],cards:r??[]}),vE=t=>{let{onCardMove:o,onCardClick:r}=t,[n,a]=eo.useState(()=>Hv(t)),i=eo.useCallback(h=>{a(u=>typeof h=="function"?h(u):h);},[]),s=eo.useCallback(h=>Uo(n,h),[n]),l=eo.useCallback((h,u,v)=>{let y=Uo(n,h);if(!y)return;let g=Ui(n,{cardId:h,fromBucketId:y.bucket.id,toBucketId:u,targetIndex:v}),x=Uo(g,h);if(!x||x.bucket.id===y.bucket.id&&x.cardIndex===y.cardIndex)return;a(g);let b={cardId:h,fromBucketId:y.bucket.id,toBucketId:x.bucket.id,targetIndex:x.cardIndex,card:x.card,model:g};return o?.(b),b},[n,o]),d=eo.useCallback((h,u)=>{a(v=>({buckets:v.buckets.map(y=>({...y,cards:y.cards.map(g=>g.id!==h?g:typeof u=="function"?u(g):{...g,...u})}))}));},[]),p=eo.useCallback(h=>{let u=Pu(n,h);return u===n?false:(a(u),true)},[n]),m=eo.useCallback((h,u)=>{let v=Tu(n,h,u);return v===n?false:(a(v),true)},[n]),f=eo.useMemo(()=>({model:n,onCardMove:h=>{l(h.cardId,h.toBucketId,h.targetIndex);},onCardClick:r}),[n,l,r]);return {model:n,actions:{replaceModel:i,moveCard:l,updateCard:d,addBucket:p,renameBucket:m,getCard:s},boardProps:f}};function wn({onTextUpdate:t,onComplete:o,onError:r,wsUrl:n="ws://localhost:8765",silenceThresholdMs:a=2e3,minVolumeRms:i=.015}){let[s,l]=eo.useState(false),d=eo.useRef(null),p=eo.useRef(null),m=eo.useRef(null),f=eo.useRef(null),h=eo.useRef(null),u=eo.useRef(0),v=eo.useRef(false),y=eo.useRef(false),g=eo.useCallback(()=>{d.current&&(d.current.close(),d.current=null),f.current&&(f.current.disconnect(),f.current=null),h.current&&(h.current.disconnect(),h.current=null),p.current&&(p.current.getTracks().forEach(C=>C.stop()),p.current=null),m.current&&(m.current.close(),m.current=null),y.current=false,l(false);},[]),x=eo.useCallback(()=>{v.current||(v.current=true,d.current?.readyState===WebSocket.OPEN&&d.current.send(JSON.stringify({type:"stop"})),setTimeout(g,500));},[g]),b=eo.useCallback(async()=>{if(!(s||y.current)){y.current=true,v.current=false,u.current=Date.now();try{let C=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,sampleRate:16e3,echoCancellation:!0,noiseSuppression:!0}});p.current=C;let k=new WebSocket(n);d.current=k,k.onopen=()=>{l(!0),y.current=!1;},k.onmessage=M=>{try{let A=JSON.parse(M.data);if(A.type==="recognition")A.is_final?o(A.text):t?.(A.text);else if(A.type==="error"){let R=A.message||"Voice recognition error";r?.(R),x();}}catch{r?.("Failed to parse voice message");}},k.onerror=()=>{r?.("Voice service connection failed"),g();},k.onclose=()=>{g();};let S=window.AudioContext||window.webkitAudioContext;if(!S)throw new Error("AudioContext is not supported in this browser");let T=new S({sampleRate:16e3});m.current=T;let I=T.createMediaStreamSource(C);h.current=I;let w=T.createScriptProcessor(4096,1,1);f.current=w,w.onaudioprocess=M=>{if(d.current?.readyState!==WebSocket.OPEN)return;let A=M.inputBuffer.getChannelData(0),R=0;for(let O=0;O<A.length;O+=1)R+=A[O]*A[O];if(Math.sqrt(R/A.length)>i)u.current=Date.now();else if(Date.now()-u.current>a&&!v.current){x();return}let E=new Int16Array(A.length);for(let O=0;O<A.length;O+=1){let _=Math.max(-1,Math.min(1,A[O]));E[O]=_<0?_*32768:_*32767;}d.current.send(E.buffer);},I.connect(w),w.connect(T.destination);}catch{r?.("Cannot access microphone"),g();}}},[g,s,i,o,r,t,a,x,n]);return eo.useEffect(()=>g,[g]),{isRecording:s,startRecording:b,stopRecording:x}}P();var $v=["en","zh","fr","de","ja","ko"],Eu={en:"EN",zh:"\u4E2D\u6587",fr:"FR",de:"DE",ja:"\u65E5\u672C\u8A9E",ko:"\uD55C\uAD6D\uC5B4"},Dl=({searchPlaceholder:t,onSearch:o,onSearchAdd:r,onOpenPanel:n,panelOpen:a=false,maxWidth:i=540,sx:s})=>{let{t:l}=le(),[d,p]=eo.useState(""),m=eo.useCallback((x=d)=>{let b=x.trim();b&&(p(""),o?.(b));},[o,d]),f=x=>{x.preventDefault(),m();},{isRecording:h,startRecording:u,stopRecording:v}=wn({onTextUpdate:p,onComplete:x=>{p(x),m(x);},onError:x=>{console.error("Header voice input error:",x);}}),y=eo.useCallback(async()=>{if(h){v();return}await u();},[h,u,v]),g=t||l("header.searchPlaceholder");return e("form",{className:"orb-app-header-search",onSubmit:f,style:{width:"100%",maxWidth:typeof i=="number"?`${i}px`:i,...s},children:c("div",{className:"orb-inp-adornment-wrap orb-app-header-search-shell",style:{background:"var(--orb-surface)",border:"1px solid var(--orb-border)",borderRadius:999,paddingRight:4},children:[e("div",{className:"orb-inp-adornment",children:e(ie,{className:"orb-app-header-ai-action",size:"small",onClick:r,tooltip:l("header.searchAddFeature"),children:e(Tt,{name:"add",size:16})})}),e("input",{className:"orb-inp orb-inp-dense orb-app-header-ai-input",value:d,onChange:x=>p(x.target.value),placeholder:g,style:{border:"none",background:"transparent",flex:1,minWidth:0}}),c("div",{className:"orb-inp-adornment orb-inp-adornment-end",children:[n&&!a&&e(ie,{className:"orb-app-header-ai-action",size:"small","aria-label":l("header.searchOpenPanel"),tooltip:l("header.searchOpenPanel"),onClick:n,children:e(Tt,{name:"message",size:16})}),e(ie,{className:"orb-app-header-ai-action",size:"small",onClick:()=>{y();},tooltip:l(h?"header.searchStopVoice":"header.searchStartVoice"),sx:{color:h?"var(--orb-err)":void 0},children:e(Tt,{name:"microphone",size:16})})]})]})})},qi=({appTitle:t,logo:o,onToggleMode:r,locale:n,localeLabel:a,localeOptions:i,onLocaleChange:s,searchPlaceholder:l,showSearch:d=false,onSearch:p,onSearchAdd:m,onOpenPanel:f,panelOpen:h,user:u,onUserRefresh:v,onUserSetting:y,onUserLogout:g,userMenuItems:x,leftSlot:b,rightSlot:C})=>{let{t:k,locale:S}=le(),T=fo(),I=n||S,w=a||Eu[I],M=i||$v,A=T==="dark"?e(Jc,{size:15}):e(rd,{size:15}),R=k(T==="dark"?"header.theme.dark":"header.theme.light"),D=[...v?[{key:"refresh",label:k("header.menu.refresh"),icon:e($a,{size:15}),onClick:v}]:[],...y?[{key:"settings",label:k("header.menu.setting"),icon:e(tn,{size:16}),onClick:y}]:[],...g?[{key:"logout",label:k("header.menu.logout"),icon:e(Yc,{size:16}),onClick:g}]:[]],E=x||D,O=M.map(_=>({label:Eu[_],onClick:()=>{s?.(_),window.requestAnimationFrame(()=>{document.activeElement instanceof HTMLElement&&document.activeElement.blur();});},disabled:_===I}));return c("header",{className:"orb-app-header",children:[c("div",{className:"orb-app-header-brand",children:[b,o===null?null:o||e("div",{className:"orb-app-header-default-logo","aria-label":"ORBCAFE",children:e(Tt,{name:"product",size:20})}),t&&e(L,{variant:"h4",sx:{fontWeight:700},children:t})]}),e("div",{className:"orb-app-header-center",children:d&&e(Dl,{searchPlaceholder:l,onSearch:p,onSearchAdd:m,onOpenPanel:f,panelOpen:h})}),c("div",{className:"orb-app-header-actions",children:[c("div",{className:"orb-app-header-utilities",children:[s?e(Qt,{triggerLabel:w,trigger:c("button",{type:"button",className:"orb-icon-btn orb-app-header-locale",children:[e(Vn,{size:15}),e("span",{className:"orb-label",children:w})]}),items:O,align:"end"}):c("div",{className:"orb-app-header-locale","aria-label":w,children:[e(Vn,{size:15}),e("span",{className:"orb-label",children:w})]}),e(ie,{className:"orb-app-header-theme",size:"small",onClick:r,tooltip:R,children:A})]}),u&&e("span",{className:"orb-app-header-divider","aria-hidden":"true"}),u&&e(Qt,{triggerLabel:u.name,trigger:c("button",{type:"button",className:"orb-app-header-user-trigger",children:[c("span",{className:"orb-app-header-user-copy",children:[e(L,{variant:"body2",className:"orb-app-header-user-name",children:u.name}),u.subtitle&&e(L,{variant:"caption",muted:true,className:"orb-app-header-user-subtitle",title:u.subtitle,children:u.subtitle})]}),e(on,{src:u.avatarSrc,alt:u.name,size:32,children:u.avatarText||u.name.slice(0,1).toUpperCase()})]}),items:E.map(_=>({label:_.label,onClick:_.onClick,disabled:_.disabled,icon:_.icon})),align:"end"}),C]})]})};var Lu=({menuData:t=[],initialNavigationCollapsed:o=false,initialNavigationMode:r="fixed",enableNavigationPinning:n,navigationPinStorageKey:a,pinnedNavigationItemIds:i,defaultPinnedNavigationItemIds:s,onPinnedNavigationItemIdsChange:l,pinnedNavigationSectionTitle:d}={})=>{let{navigationIslandProps:p}=Pd({initialCollapsed:o,initialDisplayMode:r,content:t,enablePinning:n,pinStorageKey:a,pinnedItemIds:i,defaultPinnedItemIds:s,onPinnedItemIdsChange:l,pinnedSectionTitle:d}),[m,f]=eo.useState(900);eo.useEffect(()=>{let u=()=>f(window.innerHeight);return u(),window.addEventListener("resize",u),()=>window.removeEventListener("resize",u)},[]);let h=eo.useMemo(()=>Math.max(280,m-100),[m]);return {navigationIslandProps:p,navigationMaxHeight:h}};P();var Fo=12,Fu=56,Bu=234,qv="orbcafe:page-layout-locale",Hu=["en","zh","fr","de","ja","ko"],Xv=t=>encodeURIComponent(t.trim().toLowerCase()).replace(/%/g,"").replace(/[^a-z0-9._~-]+/g,"-")||"app",Xi=(t,o)=>`orbcafe:page-layout:${Xv(t)}:${o}`,Yv=t=>`orbcafe:page-layout:${t.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-")||"app"}:pinned-navigation-items`,Zv=t=>t==="system"?"dark":t==="dark"?"light":"system",Yi=(t,o,r)=>Math.min(Math.max(t,o),Math.max(o,r)),jv=t=>t instanceof HTMLElement?!!t.closest('button,input,a,textarea,select,[role="button"],[contenteditable="true"]'):false,WE=({appId:t,appTitle:o,menuData:r=[],children:n,showNavigation:a=true,locale:i="en",localeLabel:s,localeOptions:l,onLocaleChange:d,mode:p,defaultMode:m="system",onModeChange:f,user:h,onUserRefresh:u,onUserSetting:v,onUserLogout:y,userMenuItems:g,logo:x,searchPlaceholder:b,searchPlacement:C="hidden",floatingSearchSx:k,onSearch:S,onSearchAdd:T,onOpenPanel:I,panelOpen:w,rightHeaderSlot:M,leftHeaderSlot:A,contentSx:R,navigationVariant:D="classic",navigationMode:E,defaultNavigationMode:O="fixed",onNavigationModeChange:_,showNavigationModeToggle:J=true,enableNavigationPinning:F=true,navigationPinStorageKey:V,pinnedNavigationItemIds:z,defaultPinnedNavigationItemIds:X,onPinnedNavigationItemIdsChange:W,pinnedNavigationSectionTitle:H})=>{let U=t?Xi(t,"mode"):"orbcafe:page-layout-mode",Y=t?Xi(t,"locale"):qv,ue=t?Xi(t,"navigation-mode"):"orbcafe:page-layout-navigation-mode",[re,ge]=eo.useState(m),[we,Ve]=eo.useState("light"),[Te,Ie]=eo.useState(false),[He,ce]=eo.useState(i),[be,We]=eo.useState(false),[tt,nt]=eo.useState(false),[it,q]=eo.useState(O),[De,Ce]=eo.useState({x:Fo,y:Fo}),[Fe,at]=eo.useState("left"),[Ze,wt]=eo.useState(false),Rt=eo.useRef(null),Ot=eo.useRef(null),At=p!==void 0,oe=p??re,Ke=d!==void 0,Oe=Ke?i:He,de=l?.join("|")??"",ye=E!==void 0,te=E??it,ve=te==="floating",Ne=D==="v2"?el:yd,Je=C==="header",st=oe==="system"?Te?we:"light":oe;eo.useEffect(()=>{if(!At)try{let he=window.localStorage.getItem(U);(he==="light"||he==="dark"||he==="system")&&ge(he);}catch{}Ie(true);let $=window.matchMedia("(prefers-color-scheme: dark)"),j=()=>{Ve($.matches?"dark":"light");};return j(),$.addEventListener("change",j),()=>$.removeEventListener("change",j)},[At,U]),eo.useEffect(()=>{if(!(At||!Te))try{window.localStorage.setItem(U,oe);}catch{}},[Te,At,oe,U]),eo.useEffect(()=>{if(Ke){We(true);return}try{let $=window.localStorage.getItem(Y),j=l??Hu;$&&Hu.includes($)&&j.includes($)&&ce($);}catch{}finally{We(true);}},[Ke,de,Y]),eo.useEffect(()=>{if(!(Ke||!be))try{window.localStorage.setItem(Y,Oe);}catch{}},[Oe,Ke,be,Y]),eo.useEffect(()=>{if(ye){nt(true);return}try{let $=window.localStorage.getItem(ue);($==="fixed"||$==="floating")&&q($);}catch{}finally{nt(true);}},[ye]),eo.useEffect(()=>{if(tt)try{window.localStorage.setItem(ue,te);}catch{}},[te,tt]),eo.useEffect(()=>{st==="dark"?(document.documentElement.classList.add("dark"),document.documentElement.style.colorScheme="dark"):(document.documentElement.classList.remove("dark"),document.documentElement.style.colorScheme="light");},[st]);let pt=eo.useCallback($=>{ye||q($),_?.($);},[ye,_]),Bt=eo.useCallback($=>{At||ge($),f?.($);},[At,f]),Yt=eo.useCallback($=>{Ke||ce($),d?.($);},[Ke,d]),{navigationIslandProps:Vt,navigationMaxHeight:St}=Lu({menuData:r,initialNavigationCollapsed:false,initialNavigationMode:te,enableNavigationPinning:F,navigationPinStorageKey:V??(t?Xi(t,"pinned-navigation-items"):Yv(o)),pinnedNavigationItemIds:z,defaultPinnedNavigationItemIds:X,onPinnedNavigationItemIdsChange:W,pinnedNavigationSectionTitle:H}),Wt=Vt.collapsed,bt=eo.useCallback($=>{let j=Rt.current,he=j?.parentElement;if(!j||!he)return $;let xe=he.getBoundingClientRect(),Ee=j.getBoundingClientRect(),_e=Fo,qe=Fo,je=Math.max(_e,xe.width-Ee.width-Fo),mt=Math.max(qe,xe.height-Ee.height-Fo);return {x:Yi($.x,_e,je),y:Yi($.y,qe,mt)}},[]),Nt=eo.useCallback($=>{let j=Rt.current,he=j?.parentElement;if(!j||!he)return $;let xe=he.getBoundingClientRect(),Ee=j.getBoundingClientRect(),_e=Fo,qe=Fo,je=Math.max(_e,xe.width-Ee.width-Fo),mt=Math.max(qe,xe.height-Ee.height-Fo),ft={x:Yi($.x,_e,je),y:Yi($.y,qe,mt)},yt=[{distance:Math.abs(ft.x-_e),position:{x:_e,y:ft.y}},{distance:Math.abs(ft.x-je),position:{x:je,y:ft.y}},{distance:Math.abs(ft.y-qe),position:{x:ft.x,y:qe}},{distance:Math.abs(ft.y-mt),position:{x:ft.x,y:mt}}].reduce((B,Q)=>Q.distance<B.distance?Q:B).position;return at(yt.x>=(_e+je)/2?"right":"left"),yt},[]),lt=eo.useMemo(()=>{if(!ve||Ze)return De.x;if(Fe==="right"){let he=Rt.current?.parentElement?.getBoundingClientRect().width,xe=Wt?Fu:Bu;return he?Math.max(Fo,he-xe-Fo):Wt?De.x:De.x-(Bu-Fu)}return De.x},[Fe,De.x,Ze,ve,Wt]),Ft=eo.useCallback($=>{if(!ve||!Wt||jv($.target))return;$.preventDefault(),$.currentTarget.setPointerCapture($.pointerId);let j=bt({x:lt,y:De.y});at("left"),Ce(j),Ot.current={pointerId:$.pointerId,startClientX:$.clientX,startClientY:$.clientY,startX:j.x,startY:j.y,currentX:j.x,currentY:j.y},wt(true);},[bt,lt,De.y,ve,Wt]),Zt=eo.useCallback($=>{let j=Ot.current;if(!j||j.pointerId!==$.pointerId)return;let he=bt({x:j.startX+$.clientX-j.startClientX,y:j.startY+$.clientY-j.startClientY});j.currentX=he.x,j.currentY=he.y,Ce(he);},[bt]),Z=eo.useCallback($=>{let j=Ot.current;if(!(!j||j.pointerId!==$.pointerId)){try{$.currentTarget.releasePointerCapture($.pointerId);}catch{}Ot.current=null,Ce(Nt({x:j.currentX,y:j.currentY})),wt(false);}},[Nt]);return eo.useEffect(()=>{if(!ve)return;let $=()=>{Ce(xe=>bt(xe));},j=window.requestAnimationFrame($),he=window.setTimeout($,430);return ()=>{window.cancelAnimationFrame(j),window.clearTimeout(he);}},[bt,ve,Wt,St]),e(Bn,{mode:oe,children:e(Ya,{locale:Oe,children:c("div",{className:"orb-root",style:{minHeight:"100vh",width:"100%",display:"flex",flexDirection:"column",overflowX:"hidden",background:"var(--orb-canvas)"},children:[e(qi,{appTitle:o,logo:x,mode:oe,onToggleMode:()=>Bt(Zv(oe)),locale:Oe,localeLabel:Ke||Oe===i?s:void 0,localeOptions:l,onLocaleChange:Yt,user:h,onUserRefresh:u,onUserSetting:v,onUserLogout:y,userMenuItems:g,searchPlaceholder:b,showSearch:Je,onSearch:S,onSearchAdd:T,onOpenPanel:I,panelOpen:w,leftSlot:A,rightSlot:M}),C==="floating"&&e("div",{className:"orb-float-search",style:k,children:e(Dl,{searchPlaceholder:b,onSearch:S,onSearchAdd:T,onOpenPanel:I,panelOpen:w,maxWidth:"100%"})}),c("div",{style:{flex:1,minHeight:0,minWidth:0,display:"flex",overflowX:"hidden",position:"relative"},children:[a&&!ve&&e("div",{style:{paddingTop:12,paddingBottom:12,paddingLeft:12,paddingRight:Wt?4:12,display:"flex",alignItems:"flex-start",flexShrink:0},children:e(Ne,{...Vt,maxHeight:St,colorMode:st,displayMode:te,onDisplayModeChange:pt,showDisplayModeToggle:J&&Wt})}),a&&ve&&e("div",{ref:Rt,onPointerDown:Ft,onPointerMove:Zt,onPointerUp:Z,onPointerCancel:Z,style:{position:"absolute",top:De.y,left:lt,zIndex:1205,display:"flex",alignItems:"flex-start",cursor:Wt?Ze?"grabbing":"grab":"default",touchAction:Wt?"none":"auto",userSelect:Ze?"none":void 0,transition:Ze?"none":"left 180ms ease-out, top 180ms ease-out"},children:e(Ne,{...Vt,maxHeight:St,colorMode:st,displayMode:te,onDisplayModeChange:pt,showDisplayModeToggle:J&&Wt})}),e("div",{style:{flex:1,minWidth:0,minHeight:0,overflow:"auto",paddingTop:12,paddingBottom:12,paddingRight:12,paddingLeft:a&&!ve&&Wt?4:12,...R},children:n})]})]})})})};var Zi="(blank)",zu="Result",Vu="Grand Total",Wu={sum:"Sum",count:"Count",avg:"Average",min:"Min",max:"Max"},$u=["sum","count","avg","min","max"];var _u=["palette","rows","columns","filters","values"];var Gu=t=>_u.includes(t),Uu=t=>t==="rows"||t==="columns"||t==="filters",ji=t=>{let o=t.split("|");return o.length===2&&o[0]==="container"&&Gu(o[1])?{kind:"container",zone:o[1]}:o.length===3&&o[0]==="item"&&Gu(o[1])&&o[2]?{kind:"item",zone:o[1],key:o[2]}:null},ur=t=>t==null||t===""?Zi:t instanceof Date?t.toISOString().slice(0,10):String(t),_r=t=>JSON.stringify(t),Ku=(t,o)=>{let r=t.join(""),n=o.join("");return r.localeCompare(n,void 0,{sensitivity:"base"})},Qv=t=>{if(typeof t=="number"&&Number.isFinite(t))return t;if(typeof t=="string"&&t.trim()!==""){let o=Number(t);return Number.isFinite(o)?o:null}return null},Sn=(t,o,r)=>{if(r==="count")return t.length;let n=t.map(a=>Qv(a[o])).filter(a=>a!==null);return n.length===0?0:r==="sum"?n.reduce((a,i)=>a+i,0):r==="avg"?n.reduce((a,i)=>a+i,0)/n.length:r==="min"?Math.min(...n):Math.max(...n)},lo=(t,o)=>{if(!t||t.length===0)return [];let r=new Set,n=[];return t.forEach(a=>{!o.has(a)||r.has(a)||(r.add(a),n.push(a));}),n},mr=(t,o)=>t.length!==o.length?false:t.every((r,n)=>r===o[n]),qu=(t,o)=>{let r=Object.keys(t),n=Object.keys(o);return r.length!==n.length?false:r.every(a=>{let i=t[a]??[],s=o[a]??[];return mr(i,s)})},Qi=(t,o)=>t.length!==o.length?false:t.every((r,n)=>{let a=o[n];return r.tokenId===a.tokenId&&r.fieldId===a.fieldId&&r.aggregation===a.aggregation}),Nl=t=>!t?.aggregations||t.aggregations.length===0?$u:t.aggregations,Co=(t,o)=>{let r=Nl(o);return t&&r.includes(t)?t:o?.type==="number"&&r.includes("sum")?"sum":r.includes("count")?"count":r[0]},ma=(t,o,r)=>{let n=r.get(o.fieldId);return n?.formatValue?n.formatValue(t):o.aggregation==="count"?Math.round(t).toLocaleString():t.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:2})};P();var Yu=({options:t,selectedValues:o,onChange:r,minWidth:n=96})=>{let{t:a}=le(),[i,s]=eo.useState(""),[l,d]=eo.useState(null),p=eo.useMemo(()=>{let u=i.trim().toLowerCase();return u?t.filter(v=>v.toLowerCase().includes(u)):t},[t,i]),m=t.length>0&&o.length===t.length,f=t.length===0?a("pivot.filter.na"):o.length===0?a("common.none"):m?a("common.all"):`${o.length}/${t.length}`,h=u=>{r(o.includes(u)?o.filter(v=>v!==u):[...o,u]);};return c("div",{sx:{minWidth:n},onClick:u=>u.stopPropagation(),onMouseDown:u=>u.stopPropagation(),children:[e(ke,{variant:"outlined",size:"small",onClick:u=>d(u.currentTarget),sx:{minWidth:n,height:26,px:1,py:.35,fontSize:"0.72rem",justifyContent:"space-between"},children:f}),e(Qt,{anchorEl:l,open:!!l,onClose:()=>d(null),PaperProps:{sx:{width:Math.max(n,220),maxHeight:320,overflowY:"auto",p:.5}},children:c("div",{onClick:u=>u.stopPropagation(),sx:{display:"grid",gap:.4},children:[e(ze,{size:"small",placeholder:`${a("common.search")}...`,fullWidth:true,value:i,onChange:u=>s(u.target.value),onKeyDown:u=>u.stopPropagation(),onClick:u=>u.stopPropagation(),sx:{m:0,"& .orb-inp":{fontSize:"0.75rem",py:.7}}}),e("div",{sx:{px:1,py:.5,borderBottom:"1px solid var(--orb-border)"},children:e(ke,{variant:"text",size:"small",onClick:u=>{u.preventDefault(),u.stopPropagation(),r(m?[]:t);},sx:{minWidth:"auto",px:0,py:.2,fontSize:"0.76rem",fontWeight:700,textTransform:"none"},children:a(m?"pivot.filter.deselectAll":"pivot.filter.selectAll")})}),p.length===0&&e("div",{className:"orb-menu-item","aria-disabled":"true",sx:{fontSize:"0.75rem"},children:a("pivot.filter.noResults")}),p.map(u=>{let v=o.includes(u);return c("div",{role:"option","aria-selected":v,tabIndex:0,className:`orb-menu-item ${v?"orb-selected":""}`,onClick:()=>h(u),onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),h(u));},sx:{display:"flex",alignItems:"center",fontSize:"0.75rem",py:.4},children:[e(It,{size:"small",checked:v,inputProps:{tabIndex:-1},sx:{p:.5,mr:.5,pointerEvents:"none"}}),e("span",{children:u})]},u)})]})})]})};P();var kn=({size:t=18,subtle:o=false})=>{let r=Math.max(2,Math.round(t/6));return e(Re,{"aria-hidden":"true",sx:{display:"grid",gridTemplateColumns:`repeat(2, ${r}px)`,gridAutoRows:`${r}px`,gap:`${Math.max(2,Math.round(r/1.5))}px`,placeItems:"center",width:t,height:t,flexShrink:0,color:o?"var(--orb-muted)":"var(--orb-primary)"},children:Array.from({length:6},(n,a)=>e(Re,{sx:{width:r,height:r,borderRadius:999,bgcolor:"currentColor"}},a))})};P();var Al=({label:t,subtitle:o,isDragging:r,dragRef:n,listeners:a,attributes:i,style:s})=>e(Ae,{ref:n,...a,...i,sx:{p:1,borderRadius:"var(--orb-r-container)",border:"1px solid",borderColor:"var(--orb-border)",bgcolor:"var(--orb-canvas)",boxShadow:"var(--orb-shadow-1)",touchAction:"none",transition:"border-color 140ms ease, background-color 140ms ease, transform 140ms ease","&:hover":{borderColor:"var(--orb-p200)",bgcolor:"var(--orb-p50)",transform:"translateY(-1px)"}},style:{...s,opacity:r?.3:1,cursor:r?"grabbing":"grab"},children:c("div",{sx:{display:"flex",alignItems:"center",gap:.9},children:[e("div",{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:"var(--orb-r)",bgcolor:"var(--orb-p50)",border:"1px solid var(--orb-p100)"},children:e(kn,{size:13,subtle:true})}),c("div",{sx:{minWidth:0,display:"flex",flexDirection:"column",gap:.15},children:[e(L,{component:"div",sx:{fontSize:"0.84rem",fontWeight:700,lineHeight:1.2,color:"var(--orb-fg-strong)"},children:t}),o&&e(L,{component:"div",sx:{fontSize:"0.73rem",fontWeight:400,color:"var(--orb-fg)",lineHeight:1.2},children:o})]})]})}),Zu=({id:t,label:o,subtitle:r})=>{let{setNodeRef:n,listeners:a,attributes:i,isDragging:s}=core.useDraggable({id:t});return e(Al,{label:o,subtitle:r,isDragging:s,dragRef:n,listeners:a,attributes:i})};P();var Pn=({zone:t,title:o,hint:r,icon:n,children:a,itemCount:i,onClear:s})=>{let l=`container|${t}`,{isOver:d,setNodeRef:p}=core.useDroppable({id:l}),{t:m}=le();return c(Ae,{ref:p,sx:f=>({p:1.1,borderRadius:"var(--orb-r-container)",border:"1px dashed",borderColor:d?"var(--orb-primary)":"var(--orb-p200)",bgcolor:d?"var(--orb-p100)":f.palette.mode==="dark"?"var(--orb-surface-2)":"var(--orb-p50)",transition:"border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease",boxShadow:d?"0 0 0 3px var(--orb-focus-ring)":"none",minHeight:120,display:"flex",flexDirection:"column"}),children:[c("div",{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[c("div",{sx:{display:"flex",alignItems:"center",gap:.8},children:[n,e(L,{component:"div",sx:{fontSize:"0.8rem",fontWeight:700,letterSpacing:.1,color:"var(--orb-fg-strong)"},children:o}),c(L,{component:"div",sx:{fontSize:"0.73rem",fontWeight:500,color:"var(--orb-fg)"},children:["(",i,")"]})]}),i>0&&s&&e(ct,{title:m("pivot.clearArea"),children:e(ie,{size:"small",onClick:s,sx:{width:24,height:24,p:0},children:e(pp,{size:13})})})]}),e(L,{component:"div",sx:{mt:.5,mb:.9,fontSize:"0.72rem",fontWeight:400,color:"var(--orb-fg)"},children:r}),e("div",{sx:{flex:1},children:a})]})};P();var ju={xs:1.2,md:1.6},Tn=({title:t,subtitle:o,collapsed:r,onToggleCollapse:n,expandAriaLabel:a,collapseAriaLabel:i,children:s,bodySx:l,unmountOnExit:d=false,headerActions:p})=>c(Ae,{sx:m=>({borderRadius:"var(--orb-r-container)",border:`1px solid ${m.palette.divider}`,overflow:"hidden",bgcolor:"var(--orb-surface)",boxShadow:"var(--orb-shadow-1)"}),children:[c("div",{sx:m=>({px:ju,py:1.15,display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,bgcolor:"var(--orb-canvas)",borderBottom:r?"none":`1px solid ${m.palette.divider}`}),children:[c("div",{sx:{minWidth:0,flex:1},children:[e(L,{component:"div",sx:{fontSize:"0.92rem",fontWeight:700,color:"var(--orb-fg-strong)"},children:t}),e(L,{component:"div",sx:{fontSize:"0.75rem",fontWeight:400,color:"var(--orb-fg)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:o})]}),c("div",{sx:{display:"flex",alignItems:"center",gap:.75,flexShrink:0},children:[p,e(ie,{size:"small","aria-label":r?a:i,onClick:n,sx:m=>({border:`1px solid ${m.palette.divider}`,bgcolor:"var(--orb-canvas)",color:"var(--orb-primary)",width:24,height:24,padding:0,borderRadius:999,flexShrink:0,"&:hover":{bgcolor:"var(--orb-p50)",borderColor:"var(--orb-p200)"}}),children:e(di,{size:13,sx:{transition:"transform 220ms cubic-bezier(0.2, 0, 0, 1)",transform:r?"rotate(180deg)":"rotate(0deg)"}})})]})]}),e(nn,{in:!r,timeout:260,easing:"cubic-bezier(0.2, 0, 0, 1)",unmountOnExit:d,children:e("div",{sx:[{px:ju,py:{xs:1.2,md:1.6}},...Array.isArray(l)?l:l?[l]:[]],children:s})})]});P();var Ji=({label:t,caption:o,onRemove:r,trailing:n,isDragging:a,dragRef:i,listeners:s,attributes:l,style:d})=>e(Ae,{ref:i,style:d,sx:{p:1,borderRadius:"var(--orb-r-container)",border:"1px solid",borderColor:"var(--orb-border)",bgcolor:"var(--orb-canvas)",boxShadow:"var(--orb-shadow-1)",touchAction:"none",opacity:a?0:1,transition:"border-color 140ms ease, background-color 140ms ease, transform 140ms ease","&:hover":{borderColor:"var(--orb-p200)",bgcolor:"var(--orb-p50)"}},children:c("div",{sx:{display:"flex",alignItems:"center",gap:.9},children:[e("div",{...l,...s,sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:"var(--orb-r)",bgcolor:"var(--orb-p50)",border:"1px solid var(--orb-p100)",cursor:"grab"},children:e(kn,{size:13,subtle:true})}),c("div",{sx:{minWidth:0,flex:1,display:"flex",flexDirection:"column",gap:.15},children:[e(L,{component:"div",sx:{fontSize:"0.82rem",fontWeight:700,lineHeight:1.2,color:"var(--orb-fg-strong)"},children:t}),o&&e(L,{component:"div",sx:{fontSize:"0.72rem",fontWeight:400,color:"var(--orb-fg)",lineHeight:1.2},children:o})]}),n,r&&e(ie,{size:"small",onClick:p=>{p.stopPropagation(),r();},sx:{width:24,height:24,p:0},children:e(Sr,{size:13})})]})}),ga=({id:t,label:o,caption:r,onRemove:n,trailing:a})=>{let{setNodeRef:i,attributes:s,listeners:l,transform:d,transition:p,isDragging:m}=sortable.useSortable({id:t}),f={transform:d?`translate3d(${d.x}px, ${d.y}px, 0)`:void 0,transition:p,zIndex:m?999:"auto"};return e(Ji,{label:o,caption:r,onRemove:n,trailing:a,isDragging:m,dragRef:i,listeners:l,attributes:s,style:f})};P();var os={rows:e(Pp,{size:16,sx:{color:"var(--orb-primary)"}}),columns:e(ln,{size:16,sx:{color:"var(--orb-primary)"}}),filters:e(sp,{size:16,sx:{color:"var(--orb-primary)"}}),values:e(sn,{size:16,sx:{color:"var(--orb-accent)"}})},Qu=({isConfiguratorCollapsed:t,onToggleCollapse:o,availableFields:r,fieldMap:n,filterFields:a,columnFields:i,rowFields:s,valueFields:l,clearZone:d,removeFieldFromZone:p,getFilterSelectionSummary:m,renderDimensionFilterSelect:f,renderAggregationSelect:h,getAggregationLabel:u})=>{let{t:v}=le(),y=[`${v("pivot.zone.rows")} ${s.length}`,`${v("pivot.zone.columns")} ${i.length}`,`${v("pivot.zone.filters")} ${a.length}`,`${v("pivot.zone.values")} ${l.length}`].join(" \xB7 ");return e(Tn,{title:v("pivot.config.title"),subtitle:y,collapsed:t,onToggleCollapse:o,expandAriaLabel:v("pivot.collapse.ariaExpand"),collapseAriaLabel:v("pivot.collapse.ariaCollapse"),unmountOnExit:true,children:c("div",{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",lg:"260px 1fr"},gap:2},children:[e(Pn,{zone:"palette",title:v("pivot.fieldList"),hint:v("pivot.availableDimensions"),itemCount:r.length,icon:e(kn,{size:18,subtle:true}),children:c(se,{spacing:.8,sx:{maxHeight:400,overflowY:"auto",pr:.5},children:[r.length===0&&e(L,{component:"div",sx:{fontSize:"0.74rem",fontWeight:400,color:"var(--orb-fg)",py:1},children:v("pivot.allFieldsInUse")}),r.map(g=>e(Zu,{id:`item|palette|${g.id}`,label:g.label,subtitle:g.type??"string"},g.id))]})}),c(se,{spacing:2,children:[c("div",{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[e(Pn,{zone:"filters",title:v("pivot.zone.filters"),hint:v("pivot.hint.filters"),icon:os.filters,itemCount:a.length,onClear:()=>d("filters"),children:e(sortable.SortableContext,{items:a.map(g=>`item|filters|${g}`),strategy:sortable.verticalListSortingStrategy,children:e(se,{spacing:.7,children:a.map(g=>e(ga,{id:`item|filters|${g}`,label:n.get(g)?.label??g,caption:m(g),trailing:f(g),onRemove:()=>p("filters",g)},g))})})}),e(Pn,{zone:"columns",title:v("pivot.zone.columns"),hint:v("pivot.hint.columns"),icon:os.columns,itemCount:i.length,onClear:()=>d("columns"),children:e(sortable.SortableContext,{items:i.map(g=>`item|columns|${g}`),strategy:sortable.verticalListSortingStrategy,children:e(se,{spacing:.7,children:i.map(g=>e(ga,{id:`item|columns|${g}`,label:n.get(g)?.label??g,caption:`${n.get(g)?.type??"dimension"} \u2022 ${m(g)}`,trailing:f(g),onRemove:()=>p("columns",g)},g))})})})]}),c("div",{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[e(Pn,{zone:"rows",title:v("pivot.zone.rows"),hint:v("pivot.hint.rows"),icon:os.rows,itemCount:s.length,onClear:()=>d("rows"),children:e(sortable.SortableContext,{items:s.map(g=>`item|rows|${g}`),strategy:sortable.verticalListSortingStrategy,children:e(se,{spacing:.7,children:s.map(g=>e(ga,{id:`item|rows|${g}`,label:n.get(g)?.label??g,caption:`${n.get(g)?.type??"dimension"} \u2022 ${m(g)}`,trailing:f(g),onRemove:()=>p("rows",g)},g))})})}),e(Pn,{zone:"values",title:v("pivot.zone.values"),hint:v("pivot.hint.values"),icon:os.values,itemCount:l.length,onClear:()=>d("values"),children:e(sortable.SortableContext,{items:l.map(g=>`item|values|${g.tokenId}`),strategy:sortable.verticalListSortingStrategy,children:e(se,{spacing:.7,children:l.map(g=>{let x=n.get(g.fieldId)?.label??g.fieldId,b=`${u(g.aggregation)}(${x})`;return e(ga,{id:`item|values|${g.tokenId}`,label:x,caption:b,trailing:h(g),onRemove:()=>p("values",g.tokenId)},g.tokenId)})})})})]})]})]})})};P();var Ju=t=>t.toLocaleString(void 0,{maximumFractionDigits:1}),em=({data:t,primaryLabel:o,secondaryLabel:r,formatPrimaryValue:n,formatSecondaryValue:a})=>{let i=so();if(t.length===0)return null;let s=720,l=250,d={top:20,right:24,bottom:40,left:52},p=r?t.map(g=>g.primaryValue):t.map((g,x)=>x+1),m=r?t.map(g=>g.secondaryValue??0):t.map(g=>g.primaryValue),f=Math.max(...p,1),h=Math.max(...m,1),u=s-d.left-d.right,v=l-d.top-d.bottom,y=t.map((g,x)=>{let b=r?g.primaryValue:x+1,C=r?g.secondaryValue??0:g.primaryValue,k=d.left+b/f*u,S=l-d.bottom-C/h*v;return {...g,x:k,y:S,rawX:b,rawY:C}});return c("div",{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[e("div",{sx:{overflowX:"auto"},children:c("div",{component:"svg",viewBox:`0 0 ${s} ${l}`,sx:{width:"100%",minWidth:s,height:l},children:[e("line",{x1:d.left,y1:l-d.bottom,x2:s-d.right,y2:l-d.bottom,stroke:Lo(i.palette.text.secondary,.35)}),e("line",{x1:d.left,y1:d.top,x2:d.left,y2:l-d.bottom,stroke:Lo(i.palette.text.secondary,.35)}),y.map(g=>c("g",{children:[e("circle",{cx:g.x,cy:g.y,r:7,fill:Lo(i.palette.primary.main,.18)}),e("circle",{cx:g.x,cy:g.y,r:4.5,fill:i.palette.primary.main,children:c("title",{children:[g.name,`
|
|
189
|
+
`),f={enableMath:n},u=0;for(;u<h.length;){let b=h[u],y=b.trim();if(!y){u+=1;continue}if(i&&Su(b)){if(y.startsWith("<think>")){let v=[],C=b;for(;;){let P=C.indexOf("<think>"),S=P>=0?C.slice(P+7):C,I=S.indexOf("</think>");if(I>=0){v.push(S.slice(0,I)),u+=1;break}if(v.push(S),u+=1,u>=h.length)break;C=h[u];}m.push(e(Ui,{content:v.join(`
|
|
190
|
+
`).trim()},`think-tag-${u}`));continue}u+=1;let x=[];for(;u<h.length&&h[u].trim()!==":::";)x.push(h[u]),u+=1;u<h.length&&h[u].trim()===":::"&&(u+=1),m.push(e(Ui,{content:x.join(`
|
|
191
|
+
`).trim()},`think-fence-${u}`));continue}if(Ki(b)){let x=y.slice(3).trim().toLowerCase(),v=[];for(u+=1;u<h.length&&!Ki(h[u]);)v.push(h[u]),u+=1;u<h.length&&Ki(h[u])&&(u+=1);let C=v.join(`
|
|
192
|
+
`);if(a&&x==="mermaid"){m.push(e(Il,{code:C},`mermaid-${u}`));continue}if(n&&["math","latex","katex"].includes(x)){m.push(e(ma,{expression:C,allowKatex:true},`math-fence-${u}`));continue}m.push(e(ua,{code:C,language:x||"text",copyable:s,showLineNumbers:l,wrapLongLines:true},`code-${u}`));continue}if(n&&y.startsWith("$$")){let x=[];if(y.endsWith("$$")&&y!=="$$")x.push(y.slice(2,-2)),u+=1;else {let C=b.slice(b.indexOf("$$")+2);for(C.trim()&&x.push(C),u+=1;u<h.length;){let P=h[u],S=P.indexOf("$$");if(S>=0){x.push(P.slice(0,S)),u+=1;break}x.push(P),u+=1;}}m.push(e(ma,{expression:x.join(`
|
|
193
|
+
`).trim(),allowKatex:true},`math-${u}`));continue}if(Cu(b)){let x=Math.min(6,b.match(/^#{1,6}/)?.[0]?.length||1),v=b.replace(/^#{1,6}\s+/,""),C=x===1?"h5":x===2?"h6":"subtitle1";m.push(e(xo,{variant:C,sx:{mt:x===1?1.2:.8,mb:.5,fontWeight:700},children:ga(v,f,`h-${u}`)},`heading-${u}`)),u+=1;continue}if(xu(b)){m.push(e(Bd,{sx:{my:1.2}},`hr-${u}`)),u+=1;continue}if(wu(h,u)){let x=u+2;for(;x<h.length&&h[x].trim()&&h[x].includes("|");)x+=1;let v=h.slice(u,x).join(`
|
|
194
|
+
`),C=Gi(v);if(C){m.push(e(Rl,{table:C},`table-${u}`)),u=x;continue}}if(El(b)){let x=[];for(;u<h.length&&El(h[u]);)x.push(h[u].replace(/^\s*>\s?/,"")),u+=1;m.push(e(Hr,{variant:"outlined",sx:{px:1,py:.8,my:.9,borderLeftWidth:3,borderLeftStyle:"solid",borderLeftColor:"primary.main",bgcolor:"action.hover"},children:e(xo,{variant:"body2",sx:{whiteSpace:"pre-wrap"},children:x.map((v,C)=>c(to.Fragment,{children:[C>0&&e("br",{}),ga(v,f,`q-${u}-${C}`)]},`quote-line-${C}`))})},`quote-${u}`));continue}if(Dl(b)){let x=[];for(;u<h.length&&Dl(h[u]);)x.push(h[u].trim().replace(/^[-*+]\s+/,"")),u+=1;m.push(e(Me,{component:"ul",sx:{my:.8,pl:2.5},children:x.map((v,C)=>e(Me,{component:"li",sx:{mb:.45},children:e(xo,{variant:"body2",children:ga(v,f,`ul-${u}-${C}`)})},`ul-item-${C}`))},`ul-${u}`));continue}if(Al(b)){let x=[];for(;u<h.length&&Al(h[u]);)x.push(h[u].trim().replace(/^\d+\.\s+/,"")),u+=1;m.push(e(Me,{component:"ol",sx:{my:.8,pl:2.7},children:x.map((v,C)=>e(Me,{component:"li",sx:{mb:.45},children:e(xo,{variant:"body2",children:ga(v,f,`ol-${u}-${C}`)})},`ol-item-${C}`))},`ol-${u}`));continue}let g=[];for(;u<h.length;){let x=h[u],v=x.trim();if(!v||Ki(x)||Cu(x)||xu(x)||Dl(x)||Al(x)||El(x)||wu(h,u)||i&&Su(x)||n&&v.startsWith("$$"))break;g.push(x),u+=1;}g.length>0?m.push(e(xo,{variant:"body2",sx:{my:.65,lineHeight:1.65},children:g.map((x,v)=>c(to.Fragment,{children:[v>0&&e("br",{}),ga(x,f,`p-${u}-${v}`)]},`p-line-${v}`))},`p-${u}`)):u+=1;}return m},[d,n,a,i,s,l]);return e(Me,{className:r,sx:{"& strong":{fontWeight:700},"& em":{fontStyle:"italic"},"& a":{wordBreak:"break-all"}},children:p})};M();var LA=(t,o)=>e(ha,{markdown:t,...o});M();var ku=({value:t,onChange:o,onSubmit:r,onVoiceInput:n,onClear:a,placeholder:i,statusText:s,loading:l=false,compact:d=false,showStatusText:p=true})=>c(le,{spacing:.75,children:[c("div",{sx:{display:"flex",alignItems:"center",gap:1,px:1.2,py:d?.25:.4,borderRadius:999,border:"1px solid",borderColor:"divider",bgcolor:"background.paper",minHeight:d?38:44},children:[e(Vr,{sx:{fontSize:d?16:18,color:"text.secondary"}}),e(Gd,{fullWidth:true,value:t,onChange:m=>o(m.target.value),onKeyDown:m=>{m.key==="Enter"&&(m.preventDefault(),r());},placeholder:i,sx:{fontSize:d?"0.84rem":"0.9rem"}}),t&&a&&e(se,{size:"small",onClick:a,children:e(kr,{sx:{fontSize:d?16:18}})}),n&&e(se,{size:"small",onClick:n,children:e(yp,{sx:{fontSize:d?16:18}})}),e(se,{size:"small",onClick:r,disabled:l||!t.trim(),children:e(kp,{sx:{fontSize:d?16:18}})})]}),p&&s&&e(L,{variant:"caption",color:"text.secondary",children:s})]});M();var Pu=(t,o)=>{let r=o.trim();if(!r)return t;let n=t.toLowerCase(),a=r.toLowerCase(),i=n.indexOf(a);return i<0?t:c(jsxRuntime.Fragment,{children:[t.slice(0,i),e("div",{component:"mark",sx:{bgcolor:"warning.light",color:"warning.contrastText",px:.15,borderRadius:.4},children:t.slice(i,i+r.length)}),t.slice(i+r.length)]})},qi=({section:t,highlightQuery:o=""})=>{let r=t.columns||2;return c(Ae,{variant:"outlined",sx:{p:1.8,borderRadius:2},children:[e(L,{variant:"subtitle1",sx:{fontWeight:700,mb:1.4},children:t.title}),e("div",{sx:{display:"grid",gap:1.15,gridTemplateColumns:{xs:"1fr",md:r===3?"repeat(3, minmax(0, 1fr))":r===1?"1fr":"repeat(2, minmax(0, 1fr))"}},children:t.fields.map(n=>{let a=typeof n.value=="string"||typeof n.value=="number"?String(n.value):null;return c("div",{sx:{minWidth:0},children:[e(L,{variant:"caption",color:"text.secondary",sx:{display:"block"},children:Pu(n.label,o)}),e(L,{component:"div",variant:"body2",sx:{mt:.2,fontWeight:500,wordBreak:"break-word"},children:a?Pu(a,o):n.value})]},n.id)})})]})};var Ll=t=>t==null?"":typeof t=="string"||typeof t=="number"||typeof t=="boolean"?String(t):"",Zi=t=>t.trim().toLowerCase(),Iv=(t,o)=>{let r=[];return t.forEach(n=>{n.fields.forEach(a=>{let i=a.searchableText||Ll(a.value),s={source:"section",sourceId:n.id,sourceSectionId:n.id,sourceTitle:n.title,fieldId:a.id,fieldLabel:a.label,fieldValue:i};r.push({hit:s,text:Zi(`${n.title} ${a.label} ${i}`)});});}),o.forEach(n=>{(n.fields||[]).forEach(a=>{let i=a.searchableText||Ll(a.value),s={source:"tab",sourceId:n.id,sourceTitle:n.label,fieldId:a.id,fieldLabel:a.label,fieldValue:i};r.push({hit:s,text:Zi(`${n.label} ${a.label} ${i}`)});}),(n.sections||[]).forEach(a=>{a.fields.forEach(i=>{let s=i.searchableText||Ll(i.value),l={source:"tab",sourceId:n.id,sourceSectionId:a.id,sourceTitle:`${n.label} / ${a.title}`,fieldId:i.id,fieldLabel:i.label,fieldValue:s};r.push({hit:l,text:Zi(`${n.label} ${a.title} ${i.label} ${s}`)});});});}),r},Tu=({sections:t,tabs:o=[],defaultTabId:r,ai:n})=>{let{t:a}=de(),[i,s]=to.useState(""),[l,d]=to.useState(r||o[0]?.id),[p,m]=to.useState("idle"),[h,f]=to.useState([]),[u,b]=to.useState(""),[y,g]=to.useState(""),[x,v]=to.useState(false),C=to.useMemo(()=>Iv(t,o),[t,o]);to.useEffect(()=>{if(o.length===0){d(void 0);return}o.some(A=>A.id===l)||d(r||o[0]?.id);},[o,l,r]);let P=to.useCallback(()=>{m("idle"),f([]),b(""),g("");},[]),S=to.useCallback(w=>{s(w),w.trim()||(m("idle"),f([]),b(""),g(""));},[]),I=to.useCallback(w=>{let A=Zi(w);return A?C.filter(D=>D.text.includes(A)).map(D=>D.hit):[]},[C]),R=to.useCallback(async()=>{let w=i.trim();if(!w)return;v(true);let A=I(w);if(f(A),A.length>0){m("search"),g(""),b(a("detail.searchAi.matches",{count:A.length})),v(false);return}if(n?.enabled!==false&&n?.onSubmit){m("ai"),b(a("detail.searchAi.autoAiFallback"));try{let T=await n.onSubmit(w,{query:w,hits:A,activeTabId:l,sections:t,tabs:o});g(typeof T=="string"?T:"");}finally{v(false);}return}m("search"),g(""),b(a("detail.searchAi.noMatch")),v(false);},[i,I,a,n,l,t,o]);return {query:i,setQuery:S,activeTabId:l,setActiveTabId:d,searchMode:p,hits:h,statusText:u,aiResponse:y,searching:x,handleSubmit:R,clearResult:P}};M();var lE=({title:t,subtitle:o,sections:r,tabs:n=[],defaultTabId:a,table:i,ai:s,rightHeaderSlot:l,searchBarWidth:d=460,onClose:p,closeLabel:m="Close"})=>{let{t:h}=de(),{query:f,setQuery:u,activeTabId:b,setActiveTabId:y,searchMode:g,hits:x,statusText:v,aiResponse:C,searching:P,handleSubmit:S,clearResult:I}=Tu({sections:r,tabs:n,defaultTabId:a,ai:s}),R=to.useMemo(()=>n.find(D=>D.id===b)||n[0],[n,b]),w=to.useCallback(D=>{let T=k=>{let E=document.getElementById(D);if(E){E.scrollIntoView({behavior:"smooth",block:"center"});return}k<4&&setTimeout(()=>T(k+1),60);};requestAnimationFrame(()=>T(0));},[]),A=to.useCallback((D,T)=>{if(n.some(k=>k.id===D)){y(D),w(T?`detail-tab-${D}-section-${T}`:`detail-tab-${D}`);return}w(`detail-section-${D}`);},[n,y,w]);return c("div",{sx:{display:"flex",flexDirection:"column",gap:1.5,minHeight:"100%"},children:[c(le,{direction:{xs:"column",md:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",md:"center"},spacing:1,children:[c("div",{sx:{minWidth:0},children:[e(L,{variant:"h5",sx:{fontWeight:800,color:"text.primary"},children:t}),o&&e(L,{variant:"body2",color:"text.secondary",sx:{mt:.35},children:o})]}),c(le,{direction:"row",spacing:.6,alignItems:"center",sx:{width:{xs:"100%",md:"auto"},ml:{xs:0,md:"auto"}},children:[e("div",{sx:{width:{xs:"100%",md:d},maxWidth:"100%",minWidth:{md:320}},children:e(ku,{value:f,onChange:u,onSubmit:S,onVoiceInput:s?.onVoiceInput,onClear:()=>{u(""),I();},placeholder:s?.placeholder||h("detail.searchAi.placeholder"),statusText:v,loading:P,compact:true,showStatusText:false})}),p&&e(dt,{title:m,children:e(se,{size:"small",onClick:p,children:e(lp,{fontSize:"small"})})}),l]})]}),v&&e(L,{variant:"caption",color:"text.secondary",sx:{mt:-0.7},children:v}),g==="search"&&x.length>0&&c(Ae,{variant:"outlined",sx:{p:1.5,borderRadius:2},children:[e(L,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.6},children:h("detail.searchAi.matches",{count:x.length})}),e(le,{spacing:.35,children:x.slice(0,8).map(D=>e("div",{component:"button",type:"button",onClick:()=>A(D.sourceId,D.sourceSectionId),sx:{textAlign:"left",border:0,bgcolor:"transparent",p:.2,cursor:"pointer",color:"text.primary",borderRadius:1,"&:hover":{bgcolor:"action.hover"}},children:c(L,{variant:"body2",sx:{fontSize:"0.84rem"},children:[e("div",{component:"span",sx:{color:"text.secondary"},children:D.sourceTitle})," \xB7 ",e("div",{component:"span",sx:{fontWeight:700},children:D.fieldLabel})," = ",e("div",{component:"span",children:D.fieldValue||"-"})]})},`${D.source}|${D.sourceId}|${D.fieldId}`))})]}),g==="ai"&&C&&c(Ae,{variant:"outlined",sx:{p:1.5,borderRadius:2},children:[e(L,{variant:"subtitle2",sx:{fontWeight:700,mb:.7},children:h("detail.searchAi.aiResultTitle")}),e("div",{sx:{fontSize:"0.9rem",lineHeight:1.6,"& p":{m:0,mb:.8},"& h1, & h2, & h3, & h4":{mt:1.2,mb:.6,lineHeight:1.3},"& ul, & ol":{mt:.4,mb:.8,pl:2.6},"& code":{px:.5,py:.1,borderRadius:.8,bgcolor:"action.hover",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},"& pre":{m:0,mt:.8,mb:.8,p:1.1,borderRadius:1.2,bgcolor:"action.hover",overflowX:"auto"},"& pre code":{p:0,bgcolor:"transparent"}},children:e(ha,{markdown:C})})]}),e("div",{sx:{display:"grid",gap:1.5,gridTemplateColumns:{xs:"1fr",lg:"repeat(2, minmax(0, 1fr))"}},children:r.map(D=>e("div",{id:`detail-section-${D.id}`,children:e(qi,{section:D,highlightQuery:f})},D.id))}),n.length>0&&c(Ae,{variant:"outlined",sx:{borderRadius:2,overflow:"hidden"},children:[e(Zd,{value:R?.id||false,onChange:(D,T)=>y(String(T)),variant:"scrollable",scrollButtons:"auto",sx:{borderBottom:"1px solid",borderColor:"divider"},children:n.map(D=>e(Yd,{value:D.id,label:D.label,sx:{textTransform:"none"}},D.id))}),c("div",{sx:{p:1.5},children:[e("div",{id:`detail-tab-${R?.id||""}`}),R?.description&&e(L,{variant:"body2",color:"text.secondary",sx:{mb:1.2},children:R.description}),R?.content?R.content:c(le,{spacing:1.5,children:[(R?.sections||[]).map(D=>e("div",{id:`detail-tab-${R?.id}-section-${D.id}`,children:e(qi,{section:D,highlightQuery:f})},D.id)),R?.fields&&R.fields.length>0&&e(qi,{section:{id:`${R.id}-fields`,title:R.label,fields:R.fields,columns:2},highlightQuery:f})]})]})]}),i&&e(rr,{title:i.title||h("detail.table.title"),...i.tableProps,filterConfig:void 0,fitContainer:false})]})};M();var Ru=({bucket:t,cardCount:o,highlighted:r=false,children:n,emptyLabel:a,height:i,maxHeight:s,onRename:l,renameLabel:d,sx:p})=>{let{t:m}=de(),[h,f]=to.useState(false),[u,b]=to.useState(t.title),y=()=>{b(t.title),f(false);},g=x=>{x.preventDefault();let v=u.trim();v&&(v!==t.title&&l?.(v),b(v),f(false));};return e(Ae,{elevation:0,sx:[x=>{let v=t.accentColor??x.palette.primary.main;return {position:"relative",display:"flex",flexDirection:"column",minWidth:0,minHeight:0,height:i??s??560,maxHeight:s,borderRadius:"var(--orb-r-container)",overflow:"hidden",border:r?`1px solid ${ot(v,.65)}`:"1px solid var(--orb-border)",bgcolor:"var(--orb-canvas)",boxShadow:r?`0 0 0 2px ${ot(v,.16)}, var(--orb-shadow-2)`:"none",transition:"border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease","&::before":{content:'""',display:"block",flexShrink:0,height:3,bgcolor:v}}},...Array.isArray(p)?p:p?[p]:[]],children:c(le,{spacing:1.25,sx:{flex:1,minHeight:0,overflow:"hidden",p:1.5},children:[c(Me,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:1.25},children:[e(Me,{sx:{minWidth:0,flex:1},children:c(Me,{sx:{display:"flex",alignItems:"center",gap:.75,minHeight:28},children:[t.icon&&e(Me,{sx:{display:"inline-flex",flexShrink:0,color:t.accentColor??"var(--orb-primary)"},children:t.icon}),h?c(Me,{component:"form",onSubmit:g,sx:{display:"flex",alignItems:"center",gap:.5,flex:1,minWidth:0},children:[e(ze,{dense:true,autoFocus:true,value:u,onChange:x=>b(x.target.value),onKeyDown:x=>{x.key==="Escape"&&(x.preventDefault(),y());},inputProps:{"aria-label":d??m("kanban.bucket.rename")},error:!u.trim(),sx:{flex:1,minWidth:0}}),e(se,{type:"submit",size:"small",tooltip:m("kanban.bucket.saveRename"),"aria-label":m("kanban.bucket.saveRename"),disabled:!u.trim(),children:e(ko,{size:14})}),e(se,{size:"small",tooltip:m("kanban.bucket.cancelRename"),"aria-label":m("kanban.bucket.cancelRename"),onClick:y,children:e(Xt,{size:14})})]}):e(L,{component:"div",sx:{fontSize:15,fontWeight:600,lineHeight:1.35,color:"text.primary"},children:t.title})]})}),!h&&c(le,{direction:"row",spacing:.75,sx:{flexShrink:0},children:[e(xt,{size:"small",label:o,sx:{minWidth:24,justifyContent:"center",fontWeight:600}}),typeof t.limit=="number"&&e(xt,{size:"small",label:`${m("kanban.bucket.limit")} ${t.limit}`,color:o>t.limit?"warning":"default",variant:"outlined"}),l&&e(se,{size:"small",tooltip:d??m("kanban.bucket.rename"),"aria-label":d??m("kanban.bucket.rename"),onClick:()=>{b(t.title),f(true);},sx:{width:26,height:26},children:e(Xc,{size:14})})]})]}),r&&e(L,{component:"div",sx:{fontSize:12,color:t.accentColor??"var(--orb-primary)",fontWeight:500},children:m("kanban.bucket.dropHere")}),e(Me,{sx:{flex:1,height:0,minHeight:0,overflowY:"auto",overscrollBehavior:"contain",pr:.4,scrollbarGutter:"stable"},children:o>0?n:e(Me,{sx:{minHeight:"100%",borderRadius:"var(--orb-r-container)",border:"1px dashed var(--orb-border)",bgcolor:"transparent",display:"grid",placeItems:"center",px:2,textAlign:"center"},children:e(L,{sx:{fontSize:13,color:"text.secondary"},children:a??t.emptyLabel??m("kanban.empty")})})})]})})};M();var Rv={success:"success",warning:"warning",info:"info",error:"error"},Nv={critical:"error",high:"warning",medium:"info",low:"success"},Dv={default:"var(--orb-primary)",success:"var(--orb-primary)",warning:"var(--orb-accent)",info:"var(--orb-primary)",error:"var(--orb-err)"},Av=(t,o)=>{switch(t){case "critical":return o("kanban.priority.critical");case "high":return o("kanban.priority.high");case "medium":return o("kanban.priority.medium");case "low":return o("kanban.priority.low");default:return t}},Ev=t=>t?t.split(/\s+/).map(o=>o.charAt(0).toUpperCase()).slice(0,2).join(""):"NA",Ol=({card:t,bucket:o,dragging:r=false,overlay:n=false,onClick:a,sx:i})=>{let{t:s}=de(),l=!!(a&&o),d=t.tone??(t.priority?Nv[t.priority]:"default"),p=d==="default"?"primary":Rv[d],m=Dv[d],h=o?{card:t,bucket:o}:void 0;return e(Ae,{onClick:l?()=>h&&a?.(h):void 0,onKeyDown:l?f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),h&&a?.(h));}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,sx:[{position:"relative",minWidth:0,overflow:"hidden",p:1.5,pl:1.75,borderRadius:"var(--orb-r-container)",border:`1px solid ${ot(m,.24)}`,bgcolor:"var(--orb-canvas)",boxShadow:n?"var(--orb-shadow-3)":r?"none":"var(--orb-shadow-1)",transform:n?"rotate(1deg) scale(1.01)":"none",transition:"transform var(--orb-t-fast), box-shadow var(--orb-t-fast), border-color var(--orb-t-fast)",cursor:l?"pointer":"default",opacity:r?.5:1,"&::before":{content:'""',position:"absolute",inset:"0 auto 0 0",width:3,bgcolor:m},"&:hover":l?{transform:"translateY(-1px)",borderColor:ot(m,.48),boxShadow:"var(--orb-shadow-2)"}:void 0,"&:focus-visible":l?{outline:"2px solid var(--orb-focus-solid)",outlineOffset:2}:void 0},...Array.isArray(i)?i:i?[i]:[]],elevation:0,children:c(le,{spacing:1.25,children:[c(Me,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:1},children:[c(Me,{sx:{minWidth:0,flex:1},children:[(t.kicker||o?.title)&&e(L,{component:"div",sx:{fontSize:11,fontWeight:500,color:"text.secondary",textTransform:"uppercase"},children:t.kicker??o?.title}),e(L,{component:"div",sx:{mt:.25,fontSize:14,fontWeight:600,lineHeight:1.4,color:"text.primary"},children:t.title})]}),t.priority&&e(xt,{size:"small",color:p,label:Av(t.priority,s),variant:d==="default"?"outlined":"filled",sx:{height:22,flexShrink:0,fontWeight:500}})]}),t.summary&&e(L,{component:"div",sx:{fontSize:13,fontWeight:300,color:"text.secondary",lineHeight:1.5},children:t.summary}),t.metrics&&t.metrics.length>0&&e(Me,{sx:{display:"grid",gridTemplateColumns:`repeat(${Math.min(t.metrics.length,3)}, minmax(0, 1fr))`,gap:.75},children:t.metrics.slice(0,3).map(f=>c(Me,{sx:{minWidth:0,borderRadius:"var(--orb-r)",px:1,py:.75,bgcolor:"var(--orb-surface)",border:"1px solid var(--orb-border)"},children:[e(L,{component:"div",noWrap:true,sx:{fontSize:11,fontWeight:500,color:"text.secondary",textTransform:"uppercase"},children:f.label}),e(L,{component:"div",noWrap:true,numeric:true,sx:{mt:.25,fontSize:13,fontWeight:600},children:f.value})]},f.id))}),typeof t.progress=="number"&&c(Me,{children:[c(Me,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:.5},children:[e(L,{sx:{fontSize:12,color:"text.secondary"},children:s("kanban.card.progress")}),c(L,{numeric:true,sx:{fontSize:12,fontWeight:600},children:[Math.round(t.progress),"%"]})]}),e(zd,{variant:"determinate",value:Math.max(0,Math.min(100,t.progress)),color:m,sx:{height:4,borderRadius:2}})]}),(t.tags?.length||t.assignee||t.dueDate||t.footer||l)&&c(le,{spacing:.9,children:[t.tags&&t.tags.length>0&&e(Me,{sx:{display:"flex",flexWrap:"wrap",gap:.75},children:t.tags.map(f=>e(xt,{size:"small",label:f.label,color:f.color??"default",variant:"outlined"},f.id))}),c(Me,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,flexWrap:"wrap"},children:[c(Me,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0},children:[t.assignee&&c(jsxRuntime.Fragment,{children:[e(li,{src:t.assignee.avatarSrc,sx:{width:28,height:28,fontSize:11},children:t.assignee.initials??Ev(t.assignee.name)}),c(Me,{sx:{minWidth:0},children:[e(L,{component:"div",sx:{fontSize:13,fontWeight:500,lineHeight:1.3},noWrap:true,children:t.assignee.name}),t.dueDate&&e(L,{component:"div",sx:{fontSize:11,color:"text.secondary",lineHeight:1.35},noWrap:true,children:t.dueDate})]})]}),!t.assignee&&t.dueDate&&e(L,{sx:{fontSize:12,color:"text.secondary"},children:t.dueDate})]}),l&&e(L,{sx:{fontSize:12,color:"var(--orb-link)",fontWeight:500,whiteSpace:"nowrap"},children:s("kanban.card.openDetail")})]}),t.footer]})]})})};var Nu=(t,o)=>{let r=o.title.trim();return !o.id||!r||t.buckets.some(n=>n.id===o.id)?t:{buckets:[...t.buckets,{...o,title:r,cards:[]}]}},Du=(t,o,r)=>{let n=r.trim();if(!n)return t;let a=t.buckets.find(i=>i.id===o);return !a||a.title===n?t:{buckets:t.buckets.map(i=>i.id===o?{...i,title:n}:i)}},Lv=(t,o)=>Number.isNaN(t)||t<0?0:t>o?o:t,Au=({buckets:t,cards:o})=>{let r=new Map;return o.forEach((n,a)=>{let i=r.get(n.bucketId)??[];i.push({card:n,sourceIndex:a}),r.set(n.bucketId,i);}),{buckets:t.map(n=>{let a=[...r.get(n.id)??[]].sort((i,s)=>i.card.position===void 0&&s.card.position===void 0?i.sourceIndex-s.sourceIndex:i.card.position===void 0?1:s.card.position===void 0?-1:i.card.position-s.card.position||i.sourceIndex-s.sourceIndex).map(({card:i},s)=>({...i,bucketId:n.id,position:s}));return {...n,cards:a}})}},qo=(t,o)=>{for(let r=0;r<t.buckets.length;r+=1){let n=t.buckets[r],a=n.cards.findIndex(i=>i.id===o);if(a>=0)return {card:n.cards[a],bucket:n,bucketIndex:r,cardIndex:a}}},Yi=(t,o)=>{let r=qo(t,o.cardId);if(!r)return t;let n=t.buckets.findIndex(p=>p.id===o.toBucketId);if(n<0)return t;let a=t.buckets.map(p=>({...p,cards:p.cards.map(m=>({...m}))})),i=a[r.bucketIndex],[s]=i.cards.splice(r.cardIndex,1);if(!s)return t;let l=a[n],d=Lv(o.targetIndex??l.cards.length,l.cards.length);return l.cards.splice(d,0,{...s,bucketId:o.toBucketId}),{buckets:a.map(p=>({...p,cards:p.cards.map((m,h)=>({...m,bucketId:p.id,position:h}))}))}};M();var Hl="kanban-card|",zl="kanban-bucket|",Ou=t=>`${Hl}${t}`,Uv=t=>`${zl}${t}`,ji=t=>t?.startsWith(Hl)?t.slice(Hl.length):void 0,Lu=t=>t?.startsWith(zl)?t.slice(zl.length):void 0,Kv=({card:t,bucket:o,onCardClick:r})=>{let{setNodeRef:n,attributes:a,listeners:i,transform:s,transition:l,isDragging:d}=sortable.useSortable({id:Ou(t.id)}),p={transform:s?`translate3d(${s.x}px, ${s.y}px, 0)`:void 0,transition:l,zIndex:d?2:1,touchAction:"none",cursor:d?"grabbing":"grab"};return e("div",{ref:n,style:p,...a,...i,children:e(Ol,{card:t,bucket:o,dragging:d,onClick:r})})},qv=({bucket:t,highlighted:o,bucketHeight:r,emptyBucketLabel:n,onBucketRename:a,onCardClick:i})=>{let{isOver:s,setNodeRef:l}=core.useDroppable({id:Uv(t.id)});return e(Me,{ref:l,sx:{minWidth:0,minHeight:0,height:r},children:e(Ru,{bucket:t,cardCount:t.cards.length,highlighted:o||s,emptyLabel:n,height:r,onRename:a,children:e(sortable.SortableContext,{items:t.cards.map(d=>Ou(d.id)),strategy:sortable.verticalListSortingStrategy,children:e(le,{spacing:1,children:t.cards.map(d=>e(Kv,{card:d,bucket:t,onCardClick:i},d.id))})})})})},Fu=t=>String(t??"").toLocaleLowerCase(),Xv=(t,o)=>[t.id,t.title,t.summary,t.kicker,t.priority,t.tone,t.progress,t.dueDate,t.assignee?.id,t.assignee?.name,...t.tags?.flatMap(n=>[n.id,n.label])??[],...t.metrics?.flatMap(n=>[n.label,n.value])??[]].some(n=>Fu(n).includes(o)),FE=({model:t,onCardMove:o,onCardClick:r,cardFilter:n,onBucketAdd:a,onBucketRename:i,addBucketLabel:s,minBucketWidth:l=320,bucketHeight:d,bucketMaxHeight:p,searchable:m=false,searchValue:h,defaultSearchValue:f="",onSearchValueChange:u,searchPlaceholder:b,emptyBucketLabel:y,sx:g})=>{let{t:x}=de(),[v,C]=to.useState(null),[P,S]=to.useState(),[I,R]=to.useState(f),w=h??I,A=w.trim().toLocaleLowerCase(),D=d??p??560,T=to.useMemo(()=>({buckets:t.buckets.map(z=>{let H=n?z.cards.filter(Y=>n(Y,z)):z.cards;if(!A)return {...z,cards:H};let X=[z.id,z.title,z.description].some(Y=>Fu(Y).includes(A));return {...z,cards:X?H:H.filter(Y=>Xv(Y,A))}})}),[n,t,A]),k=to.useMemo(()=>T.buckets.reduce((z,H)=>z+H.cards.length,0),[T]),E=to.useCallback(z=>{h===void 0&&R(z),u?.(z);},[u,h]),O=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:6}}),core.useSensor(core.TouchSensor,{activationConstraint:{delay:120,tolerance:8}})),$=to.useMemo(()=>v?qo(t,v):void 0,[v,t]),ee=to.useCallback(()=>{C(null),S(void 0);},[]),F=to.useCallback(z=>{if(!z)return;let H=ji(z);return H?qo(t,H)?.bucket.id:Lu(z)},[t]),G=to.useCallback(z=>{C(ji(String(z.active.id))??null);},[]),W=to.useCallback(z=>{S(F(z.over?String(z.over.id):void 0));},[F]),Q=to.useCallback(z=>{let H=ji(String(z.active.id)),X=z.over?String(z.over.id):void 0;if(!H||!X){ee();return}let Y=qo(t,H);if(!Y){ee();return}let j=Y.bucket.id,te=Y.cardIndex,ce=ji(X);if(ce){let ve=qo(t,ce);if(!ve){ee();return}j=ve.bucket.id,te=ve.cardIndex;}else {let ve=Lu(X),xe=t.buckets.find(He=>He.id===ve);if(!ve||!xe){ee();return}j=ve,te=xe.cards.length;}if(Y.bucket.id===j&&Y.cardIndex===te){ee();return}let fe=Yi(t,{cardId:H,fromBucketId:Y.bucket.id,toBucketId:j,targetIndex:te}),Ve=qo(fe,H);Ve&&!(Ve.bucket.id===Y.bucket.id&&Ve.cardIndex===Y.cardIndex)&&o?.({cardId:H,fromBucketId:Y.bucket.id,toBucketId:Ve.bucket.id,targetIndex:Ve.cardIndex,card:Ve.card,model:fe}),ee();},[t,o,ee]);return c(core.DndContext,{sensors:O,collisionDetection:core.closestCorners,onDragStart:G,onDragOver:W,onDragEnd:Q,onDragCancel:ee,children:[c(Me,{sx:{display:"flex",flexDirection:"column",minWidth:0,minHeight:0,height:"100%",overflow:"hidden"},children:[(m||a)&&c(Me,{role:m?"search":void 0,sx:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:1.5,mb:1.25,minWidth:0},children:[m&&e(Me,{sx:{width:"100%",maxWidth:360,flex:"1 1 240px"},children:e(ze,{dense:true,value:w,onChange:z=>E(z.target.value),placeholder:b??x("kanban.search.placeholder"),autoComplete:"off",sx:{"& .orb-inp":{paddingLeft:"38px",paddingRight:w?"42px":"12px"},"& .orb-inp-adornment-end":{pointerEvents:"auto"}},startAdornment:e($o,{size:16,"aria-hidden":"true"}),endAdornment:w?e(se,{size:"small",tooltip:x("kanban.search.clear"),"aria-label":x("kanban.search.clear"),onClick:()=>E(""),sx:{width:26,height:26},children:e(Xt,{size:15})}):void 0})}),c(Me,{sx:{display:"flex",alignItems:"center",gap:1,ml:"auto"},children:[A&&e(L,{component:"div","aria-live":"polite",sx:{flexShrink:0,fontSize:12,fontWeight:500,color:"text.secondary"},children:k>0?x("kanban.search.results",{count:k}):x("kanban.search.noMatch")}),a&&e(Te,{size:"small",variant:"secondary",startIcon:e(tn,{size:15}),onClick:a,children:s??x("kanban.bucket.add")})]})]}),e(Me,{sx:[{display:"grid",gridAutoFlow:"column",gridAutoColumns:`minmax(${l}px, ${Math.max(l,360)}px)`,gap:1.5,gridAutoRows:D==="100%"?"minmax(0, 1fr)":void 0,alignItems:"stretch",justifyContent:"start",flex:"1 1 0",height:"100%",minHeight:0,overflowX:"auto",overflowY:"hidden",overscrollBehavior:"contain",scrollbarGutter:"stable both-edges",pb:.5},...Array.isArray(g)?g:g?[g]:[]],children:T.buckets.map(z=>e(qv,{bucket:z,highlighted:z.id===P,bucketHeight:D,emptyBucketLabel:A?x("kanban.search.noMatch"):y,onBucketRename:i?H=>i(z.id,H):void 0,onCardClick:r},z.id))})]}),e(core.DragOverlay,{children:$?e(Me,{sx:{width:Math.max(l-24,260)},children:e(Ol,{card:$.card,bucket:$.bucket,overlay:true})}):null})]})};var jv=({initialModel:t,initialBuckets:o,initialCards:r})=>t||Au({buckets:o??[],cards:r??[]}),WE=t=>{let{onCardMove:o,onCardClick:r}=t,[n,a]=to.useState(()=>jv(t)),i=to.useCallback(f=>{a(u=>typeof f=="function"?f(u):f);},[]),s=to.useCallback(f=>qo(n,f),[n]),l=to.useCallback((f,u,b)=>{let y=qo(n,f);if(!y)return;let g=Yi(n,{cardId:f,fromBucketId:y.bucket.id,toBucketId:u,targetIndex:b}),x=qo(g,f);if(!x||x.bucket.id===y.bucket.id&&x.cardIndex===y.cardIndex)return;a(g);let v={cardId:f,fromBucketId:y.bucket.id,toBucketId:x.bucket.id,targetIndex:x.cardIndex,card:x.card,model:g};return o?.(v),v},[n,o]),d=to.useCallback((f,u)=>{a(b=>({buckets:b.buckets.map(y=>({...y,cards:y.cards.map(g=>g.id!==f?g:typeof u=="function"?u(g):{...g,...u})}))}));},[]),p=to.useCallback(f=>{let u=Nu(n,f);return u===n?false:(a(u),true)},[n]),m=to.useCallback((f,u)=>{let b=Du(n,f,u);return b===n?false:(a(b),true)},[n]),h=to.useMemo(()=>({model:n,onCardMove:f=>{l(f.cardId,f.toBucketId,f.targetIndex);},onCardClick:r}),[n,l,r]);return {model:n,actions:{replaceModel:i,moveCard:l,updateCard:d,addBucket:p,renameBucket:m,getCard:s},boardProps:h}};function Sn({onTextUpdate:t,onComplete:o,onError:r,wsUrl:n="ws://localhost:8765",silenceThresholdMs:a=2e3,minVolumeRms:i=.015}){let[s,l]=to.useState(false),d=to.useRef(null),p=to.useRef(null),m=to.useRef(null),h=to.useRef(null),f=to.useRef(null),u=to.useRef(0),b=to.useRef(false),y=to.useRef(false),g=to.useCallback(()=>{d.current&&(d.current.close(),d.current=null),h.current&&(h.current.disconnect(),h.current=null),f.current&&(f.current.disconnect(),f.current=null),p.current&&(p.current.getTracks().forEach(C=>C.stop()),p.current=null),m.current&&(m.current.close(),m.current=null),y.current=false,l(false);},[]),x=to.useCallback(()=>{b.current||(b.current=true,d.current?.readyState===WebSocket.OPEN&&d.current.send(JSON.stringify({type:"stop"})),setTimeout(g,500));},[g]),v=to.useCallback(async()=>{if(!(s||y.current)){y.current=true,b.current=false,u.current=Date.now();try{let C=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,sampleRate:16e3,echoCancellation:!0,noiseSuppression:!0}});p.current=C;let P=new WebSocket(n);d.current=P,P.onopen=()=>{l(!0),y.current=!1;},P.onmessage=A=>{try{let D=JSON.parse(A.data);if(D.type==="recognition")D.is_final?o(D.text):t?.(D.text);else if(D.type==="error"){let T=D.message||"Voice recognition error";r?.(T),x();}}catch{r?.("Failed to parse voice message");}},P.onerror=()=>{r?.("Voice service connection failed"),g();},P.onclose=()=>{g();};let S=window.AudioContext||window.webkitAudioContext;if(!S)throw new Error("AudioContext is not supported in this browser");let I=new S({sampleRate:16e3});m.current=I;let R=I.createMediaStreamSource(C);f.current=R;let w=I.createScriptProcessor(4096,1,1);h.current=w,w.onaudioprocess=A=>{if(d.current?.readyState!==WebSocket.OPEN)return;let D=A.inputBuffer.getChannelData(0),T=0;for(let O=0;O<D.length;O+=1)T+=D[O]*D[O];if(Math.sqrt(T/D.length)>i)u.current=Date.now();else if(Date.now()-u.current>a&&!b.current){x();return}let E=new Int16Array(D.length);for(let O=0;O<D.length;O+=1){let $=Math.max(-1,Math.min(1,D[O]));E[O]=$<0?$*32768:$*32767;}d.current.send(E.buffer);},R.connect(w),w.connect(I.destination);}catch{r?.("Cannot access microphone"),g();}}},[g,s,i,o,r,t,a,x,n]);return to.useEffect(()=>g,[g]),{isRecording:s,startRecording:v,stopRecording:x}}M();var ty=["en","zh","fr","de","ja","ko"],Hu={en:"EN",zh:"\u4E2D\u6587",fr:"FR",de:"DE",ja:"\u65E5\u672C\u8A9E",ko:"\uD55C\uAD6D\uC5B4"},Wl=({searchPlaceholder:t,onSearch:o,onSearchAdd:r,onOpenPanel:n,panelOpen:a=false,maxWidth:i=540,sx:s})=>{let{t:l}=de(),[d,p]=to.useState(""),m=to.useCallback((x=d)=>{let v=x.trim();v&&(p(""),o?.(v));},[o,d]),h=x=>{x.preventDefault(),m();},{isRecording:f,startRecording:u,stopRecording:b}=Sn({onTextUpdate:p,onComplete:x=>{p(x),m(x);},onError:x=>{console.error("Header voice input error:",x);}}),y=to.useCallback(async()=>{if(f){b();return}await u();},[f,u,b]),g=t||l("header.searchPlaceholder");return e("form",{className:"orb-app-header-search",onSubmit:h,style:{width:"100%",maxWidth:typeof i=="number"?`${i}px`:i,...s},children:c("div",{className:"orb-inp-adornment-wrap orb-app-header-search-shell",style:{background:"var(--orb-surface)",border:"1px solid var(--orb-border)",borderRadius:999,paddingRight:4},children:[e("div",{className:"orb-inp-adornment",children:e(se,{className:"orb-app-header-ai-action",size:"small",onClick:r,tooltip:l("header.searchAddFeature"),children:e(Tt,{name:"add",size:16})})}),e("input",{className:"orb-inp orb-inp-dense orb-app-header-ai-input",value:d,onChange:x=>p(x.target.value),placeholder:g,style:{border:"none",background:"transparent",flex:1,minWidth:0}}),c("div",{className:"orb-inp-adornment orb-inp-adornment-end",children:[n&&!a&&e(se,{className:"orb-app-header-ai-action",size:"small","aria-label":l("header.searchOpenPanel"),tooltip:l("header.searchOpenPanel"),onClick:n,children:e(Tt,{name:"message",size:16})}),e(se,{className:"orb-app-header-ai-action",size:"small",onClick:()=>{y();},tooltip:l(f?"header.searchStopVoice":"header.searchStartVoice"),sx:{color:f?"var(--orb-err)":void 0},children:e(Tt,{name:"microphone",size:16})})]})]})})},Qi=({appTitle:t,logo:o,onToggleMode:r,locale:n,localeLabel:a,localeOptions:i,onLocaleChange:s,searchPlaceholder:l,showSearch:d=false,onSearch:p,onSearchAdd:m,onOpenPanel:h,panelOpen:f,user:u,onUserRefresh:b,onUserSetting:y,onUserLogout:g,userMenuItems:x,leftSlot:v,rightSlot:C})=>{let{t:P,locale:S}=de(),I=bo(),R=n||S,w=a||Hu[R],A=i||ty,D=I==="dark"?e(id,{size:15}):e(dd,{size:15}),T=P(I==="dark"?"header.theme.dark":"header.theme.light"),k=[...b?[{key:"refresh",label:P("header.menu.refresh"),icon:e(qa,{size:15}),onClick:b}]:[],...y?[{key:"settings",label:P("header.menu.setting"),icon:e(on,{size:16}),onClick:y}]:[],...g?[{key:"logout",label:P("header.menu.logout"),icon:e(od,{size:16}),onClick:g}]:[]],E=x||k,O=A.map($=>({label:Hu[$],onClick:()=>{s?.($),window.requestAnimationFrame(()=>{document.activeElement instanceof HTMLElement&&document.activeElement.blur();});},disabled:$===R}));return c("header",{className:"orb-app-header",children:[c("div",{className:"orb-app-header-brand",children:[v,o===null?null:o||e("div",{className:"orb-app-header-default-logo","aria-label":"ORBCAFE",children:e(Tt,{name:"product",size:20})}),t&&e(L,{variant:"h4",sx:{fontWeight:700},children:t})]}),e("div",{className:"orb-app-header-center",children:d&&e(Wl,{searchPlaceholder:l,onSearch:p,onSearchAdd:m,onOpenPanel:h,panelOpen:f})}),c("div",{className:"orb-app-header-actions",children:[c("div",{className:"orb-app-header-utilities",children:[s?e(Jt,{triggerLabel:w,trigger:c("button",{type:"button",className:"orb-icon-btn orb-app-header-locale",children:[e(_n,{size:15}),e("span",{className:"orb-label",children:w})]}),items:O,align:"end"}):c("div",{className:"orb-app-header-locale","aria-label":w,children:[e(_n,{size:15}),e("span",{className:"orb-label",children:w})]}),e(se,{className:"orb-app-header-theme",size:"small",onClick:r,tooltip:T,children:D})]}),u&&e("span",{className:"orb-app-header-divider","aria-hidden":"true"}),u&&e(Jt,{triggerLabel:u.name,trigger:c("button",{type:"button",className:"orb-app-header-user-trigger",children:[c("span",{className:"orb-app-header-user-copy",children:[e(L,{variant:"body2",className:"orb-app-header-user-name",children:u.name}),u.subtitle&&e(L,{variant:"caption",muted:true,className:"orb-app-header-user-subtitle",title:u.subtitle,children:u.subtitle})]}),e(rn,{src:u.avatarSrc,alt:u.name,size:32,children:u.avatarText||u.name.slice(0,1).toUpperCase()})]}),items:E.map($=>({label:$.label,onClick:$.onClick,disabled:$.disabled,icon:$.icon})),align:"end"}),C]})]})};var zu=({menuData:t=[],initialNavigationCollapsed:o=false,initialNavigationMode:r="fixed",enableNavigationPinning:n,navigationPinStorageKey:a,pinnedNavigationItemIds:i,defaultPinnedNavigationItemIds:s,onPinnedNavigationItemIdsChange:l,pinnedNavigationSectionTitle:d}={})=>{let{navigationIslandProps:p}=Ad({initialCollapsed:o,initialDisplayMode:r,content:t,enablePinning:n,pinStorageKey:a,pinnedItemIds:i,defaultPinnedItemIds:s,onPinnedItemIdsChange:l,pinnedSectionTitle:d}),[m,h]=to.useState(900);to.useEffect(()=>{let u=()=>h(window.innerHeight);return u(),window.addEventListener("resize",u),()=>window.removeEventListener("resize",u)},[]);let f=to.useMemo(()=>Math.max(280,m-100),[m]);return {navigationIslandProps:p,navigationMaxHeight:f}};M();var Ho=12,Wu=56,$u=234,iy="orbcafe:page-layout-locale",_u=["en","zh","fr","de","ja","ko"],sy=t=>encodeURIComponent(t.trim().toLowerCase()).replace(/%/g,"").replace(/[^a-z0-9._~-]+/g,"-")||"app",Ji=(t,o)=>`orbcafe:page-layout:${sy(t)}:${o}`,ly=t=>`orbcafe:page-layout:${t.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-")||"app"}:pinned-navigation-items`,cy=t=>t==="system"?"dark":t==="dark"?"light":"system",es=(t,o,r)=>Math.min(Math.max(t,o),Math.max(o,r)),dy=t=>t instanceof HTMLElement?!!t.closest('button,input,a,textarea,select,[role="button"],[contenteditable="true"]'):false,dL=({appId:t,appTitle:o,menuData:r=[],children:n,showNavigation:a=true,locale:i="en",localeLabel:s,localeOptions:l,onLocaleChange:d,mode:p,defaultMode:m="system",onModeChange:h,user:f,onUserRefresh:u,onUserSetting:b,onUserLogout:y,userMenuItems:g,logo:x,searchPlaceholder:v,searchPlacement:C="hidden",floatingSearchSx:P,onSearch:S,onSearchAdd:I,onOpenPanel:R,panelOpen:w,rightHeaderSlot:A,leftHeaderSlot:D,contentSx:T,navigationVariant:k="classic",navigationMode:E,defaultNavigationMode:O="fixed",onNavigationModeChange:$,showNavigationModeToggle:ee=true,enableNavigationPinning:F=true,navigationPinStorageKey:G,pinnedNavigationItemIds:W,defaultPinnedNavigationItemIds:Q,onPinnedNavigationItemIdsChange:z,pinnedNavigationSectionTitle:H})=>{let X=t?Ji(t,"mode"):"orbcafe:page-layout-mode",Y=t?Ji(t,"locale"):iy,j=t?Ji(t,"navigation-mode"):"orbcafe:page-layout-navigation-mode",[te,ce]=to.useState(m),[fe,Ve]=to.useState("light"),[ve,xe]=to.useState(false),[He,pe]=to.useState(i),[ye,$e]=to.useState(false),[tt,at]=to.useState(false),[st,K]=to.useState(O),[Ne,Se]=to.useState({x:Ho,y:Ho}),[Fe,it]=to.useState("left"),[Ye,wt]=to.useState(false),Mt=to.useRef(null),Ft=to.useRef(null),Et=p!==void 0,ne=p??te,Ke=d!==void 0,Oe=Ke?i:He,ue=l?.join("|")??"",we=E!==void 0,re=E??st,Ce=re==="floating",De=k==="v2"?cl:Td,Je=C==="header",lt=ne==="system"?ve?fe:"light":ne;to.useEffect(()=>{if(!Et)try{let be=window.localStorage.getItem(X);(be==="light"||be==="dark"||be==="system")&&ce(be);}catch{}xe(true);let V=window.matchMedia("(prefers-color-scheme: dark)"),Z=()=>{Ve(V.matches?"dark":"light");};return Z(),V.addEventListener("change",Z),()=>V.removeEventListener("change",Z)},[Et,X]),to.useEffect(()=>{if(!(Et||!ve))try{window.localStorage.setItem(X,ne);}catch{}},[ve,Et,ne,X]),to.useEffect(()=>{if(Ke){$e(true);return}try{let V=window.localStorage.getItem(Y),Z=l??_u;V&&_u.includes(V)&&Z.includes(V)&&pe(V);}catch{}finally{$e(true);}},[Ke,ue,Y]),to.useEffect(()=>{if(!(Ke||!ye))try{window.localStorage.setItem(Y,Oe);}catch{}},[Oe,Ke,ye,Y]),to.useEffect(()=>{if(we){at(true);return}try{let V=window.localStorage.getItem(j);(V==="fixed"||V==="floating")&&K(V);}catch{}finally{at(true);}},[we]),to.useEffect(()=>{if(tt)try{window.localStorage.setItem(j,re);}catch{}},[re,tt]),to.useEffect(()=>{lt==="dark"?(document.documentElement.classList.add("dark"),document.documentElement.style.colorScheme="dark"):(document.documentElement.classList.remove("dark"),document.documentElement.style.colorScheme="light");},[lt]);let ut=to.useCallback(V=>{we||K(V),$?.(V);},[we,$]),Ht=to.useCallback(V=>{Et||ce(V),h?.(V);},[Et,h]),Yt=to.useCallback(V=>{Ke||pe(V),d?.(V);},[Ke,d]),{navigationIslandProps:Wt,navigationMaxHeight:St}=zu({menuData:r,initialNavigationCollapsed:false,initialNavigationMode:re,enableNavigationPinning:F,navigationPinStorageKey:G??(t?Ji(t,"pinned-navigation-items"):ly(o)),pinnedNavigationItemIds:W,defaultPinnedNavigationItemIds:Q,onPinnedNavigationItemIdsChange:z,pinnedNavigationSectionTitle:H}),$t=Wt.collapsed,bt=to.useCallback(V=>{let Z=Mt.current,be=Z?.parentElement;if(!Z||!be)return V;let ke=be.getBoundingClientRect(),Ee=Z.getBoundingClientRect(),_e=Ho,qe=Ho,je=Math.max(_e,ke.width-Ee.width-Ho),mt=Math.max(qe,ke.height-Ee.height-Ho);return {x:es(V.x,_e,je),y:es(V.y,qe,mt)}},[]),At=to.useCallback(V=>{let Z=Mt.current,be=Z?.parentElement;if(!Z||!be)return V;let ke=be.getBoundingClientRect(),Ee=Z.getBoundingClientRect(),_e=Ho,qe=Ho,je=Math.max(_e,ke.width-Ee.width-Ho),mt=Math.max(qe,ke.height-Ee.height-Ho),ht={x:es(V.x,_e,je),y:es(V.y,qe,mt)},yt=[{distance:Math.abs(ht.x-_e),position:{x:_e,y:ht.y}},{distance:Math.abs(ht.x-je),position:{x:je,y:ht.y}},{distance:Math.abs(ht.y-qe),position:{x:ht.x,y:qe}},{distance:Math.abs(ht.y-mt),position:{x:ht.x,y:mt}}].reduce((B,J)=>J.distance<B.distance?J:B).position;return it(yt.x>=(_e+je)/2?"right":"left"),yt},[]),ct=to.useMemo(()=>{if(!Ce||Ye)return Ne.x;if(Fe==="right"){let be=Mt.current?.parentElement?.getBoundingClientRect().width,ke=$t?Wu:$u;return be?Math.max(Ho,be-ke-Ho):$t?Ne.x:Ne.x-($u-Wu)}return Ne.x},[Fe,Ne.x,Ye,Ce,$t]),Bt=to.useCallback(V=>{if(!Ce||!$t||dy(V.target))return;V.preventDefault(),V.currentTarget.setPointerCapture(V.pointerId);let Z=bt({x:ct,y:Ne.y});it("left"),Se(Z),Ft.current={pointerId:V.pointerId,startClientX:V.clientX,startClientY:V.clientY,startX:Z.x,startY:Z.y,currentX:Z.x,currentY:Z.y},wt(true);},[bt,ct,Ne.y,Ce,$t]),jt=to.useCallback(V=>{let Z=Ft.current;if(!Z||Z.pointerId!==V.pointerId)return;let be=bt({x:Z.startX+V.clientX-Z.startClientX,y:Z.startY+V.clientY-Z.startClientY});Z.currentX=be.x,Z.currentY=be.y,Se(be);},[bt]),q=to.useCallback(V=>{let Z=Ft.current;if(!(!Z||Z.pointerId!==V.pointerId)){try{V.currentTarget.releasePointerCapture(V.pointerId);}catch{}Ft.current=null,Se(At({x:Z.currentX,y:Z.currentY})),wt(false);}},[At]);return to.useEffect(()=>{if(!Ce)return;let V=()=>{Se(ke=>bt(ke));},Z=window.requestAnimationFrame(V),be=window.setTimeout(V,430);return ()=>{window.cancelAnimationFrame(Z),window.clearTimeout(be);}},[bt,Ce,$t,St]),e(zn,{mode:ne,children:e(ei,{locale:Oe,children:c("div",{className:"orb-root",style:{minHeight:"100vh",width:"100%",display:"flex",flexDirection:"column",overflowX:"hidden",background:"var(--orb-canvas)"},children:[e(Qi,{appTitle:o,logo:x,mode:ne,onToggleMode:()=>Ht(cy(ne)),locale:Oe,localeLabel:Ke||Oe===i?s:void 0,localeOptions:l,onLocaleChange:Yt,user:f,onUserRefresh:u,onUserSetting:b,onUserLogout:y,userMenuItems:g,searchPlaceholder:v,showSearch:Je,onSearch:S,onSearchAdd:I,onOpenPanel:R,panelOpen:w,leftSlot:D,rightSlot:A}),C==="floating"&&e("div",{className:"orb-float-search",style:P,children:e(Wl,{searchPlaceholder:v,onSearch:S,onSearchAdd:I,onOpenPanel:R,panelOpen:w,maxWidth:"100%"})}),c("div",{style:{flex:1,minHeight:0,minWidth:0,display:"flex",overflowX:"hidden",position:"relative"},children:[a&&!Ce&&e("div",{style:{paddingTop:12,paddingBottom:12,paddingLeft:12,paddingRight:$t?4:12,display:"flex",alignItems:"flex-start",flexShrink:0},children:e(De,{...Wt,maxHeight:St,colorMode:lt,displayMode:re,onDisplayModeChange:ut,showDisplayModeToggle:ee&&$t})}),a&&Ce&&e("div",{ref:Mt,onPointerDown:Bt,onPointerMove:jt,onPointerUp:q,onPointerCancel:q,style:{position:"absolute",top:Ne.y,left:ct,zIndex:1205,display:"flex",alignItems:"flex-start",cursor:$t?Ye?"grabbing":"grab":"default",touchAction:$t?"none":"auto",userSelect:Ye?"none":void 0,transition:Ye?"none":"left 180ms ease-out, top 180ms ease-out"},children:e(De,{...Wt,maxHeight:St,colorMode:lt,displayMode:re,onDisplayModeChange:ut,showDisplayModeToggle:ee&&$t})}),e("div",{style:{flex:1,minWidth:0,minHeight:0,overflow:"auto",paddingTop:12,paddingBottom:12,paddingRight:12,paddingLeft:a&&!Ce&&$t?4:12,...T},children:n})]})]})})})};var ts="(blank)",Gu="Result",Uu="Grand Total",Ku={sum:"Sum",count:"Count",avg:"Average",min:"Min",max:"Max"},qu=["sum","count","avg","min","max"];var Xu=["palette","rows","columns","filters","values"];var Zu=t=>Xu.includes(t),Yu=t=>t==="rows"||t==="columns"||t==="filters",os=t=>{let o=t.split("|");return o.length===2&&o[0]==="container"&&Zu(o[1])?{kind:"container",zone:o[1]}:o.length===3&&o[0]==="item"&&Zu(o[1])&&o[2]?{kind:"item",zone:o[1],key:o[2]}:null},mr=t=>t==null||t===""?ts:t instanceof Date?t.toISOString().slice(0,10):String(t),Gr=t=>JSON.stringify(t),ju=(t,o)=>{let r=t.join(""),n=o.join("");return r.localeCompare(n,void 0,{sensitivity:"base"})},py=t=>{if(typeof t=="number"&&Number.isFinite(t))return t;if(typeof t=="string"&&t.trim()!==""){let o=Number(t);return Number.isFinite(o)?o:null}return null},kn=(t,o,r)=>{if(r==="count")return t.length;let n=t.map(a=>py(a[o])).filter(a=>a!==null);return n.length===0?0:r==="sum"?n.reduce((a,i)=>a+i,0):r==="avg"?n.reduce((a,i)=>a+i,0)/n.length:r==="min"?Math.min(...n):Math.max(...n)},co=(t,o)=>{if(!t||t.length===0)return [];let r=new Set,n=[];return t.forEach(a=>{!o.has(a)||r.has(a)||(r.add(a),n.push(a));}),n},gr=(t,o)=>t.length!==o.length?false:t.every((r,n)=>r===o[n]),Qu=(t,o)=>{let r=Object.keys(t),n=Object.keys(o);return r.length!==n.length?false:r.every(a=>{let i=t[a]??[],s=o[a]??[];return gr(i,s)})},rs=(t,o)=>t.length!==o.length?false:t.every((r,n)=>{let a=o[n];return r.tokenId===a.tokenId&&r.fieldId===a.fieldId&&r.aggregation===a.aggregation}),$l=t=>!t?.aggregations||t.aggregations.length===0?qu:t.aggregations,wo=(t,o)=>{let r=$l(o);return t&&r.includes(t)?t:o?.type==="number"&&r.includes("sum")?"sum":r.includes("count")?"count":r[0]},fa=(t,o,r)=>{let n=r.get(o.fieldId);return n?.formatValue?n.formatValue(t):o.aggregation==="count"?Math.round(t).toLocaleString():t.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:2})};M();var em=({options:t,selectedValues:o,onChange:r,minWidth:n=96})=>{let{t:a}=de(),[i,s]=to.useState(""),[l,d]=to.useState(null),p=to.useMemo(()=>{let u=i.trim().toLowerCase();return u?t.filter(b=>b.toLowerCase().includes(u)):t},[t,i]),m=t.length>0&&o.length===t.length,h=t.length===0?a("pivot.filter.na"):o.length===0?a("common.none"):m?a("common.all"):`${o.length}/${t.length}`,f=u=>{r(o.includes(u)?o.filter(b=>b!==u):[...o,u]);};return c("div",{sx:{minWidth:n},onClick:u=>u.stopPropagation(),onMouseDown:u=>u.stopPropagation(),children:[e(Te,{variant:"outlined",size:"small",onClick:u=>d(u.currentTarget),sx:{minWidth:n,height:26,px:1,py:.35,fontSize:"0.72rem",justifyContent:"space-between"},children:h}),e(Jt,{anchorEl:l,open:!!l,onClose:()=>d(null),PaperProps:{sx:{width:Math.max(n,220),maxHeight:320,overflowY:"auto",p:.5}},children:c("div",{onClick:u=>u.stopPropagation(),sx:{display:"grid",gap:.4},children:[e(ze,{size:"small",placeholder:`${a("common.search")}...`,fullWidth:true,value:i,onChange:u=>s(u.target.value),onKeyDown:u=>u.stopPropagation(),onClick:u=>u.stopPropagation(),sx:{m:0,"& .orb-inp":{fontSize:"0.75rem",py:.7}}}),e("div",{sx:{px:1,py:.5,borderBottom:"1px solid var(--orb-border)"},children:e(Te,{variant:"text",size:"small",onClick:u=>{u.preventDefault(),u.stopPropagation(),r(m?[]:t);},sx:{minWidth:"auto",px:0,py:.2,fontSize:"0.76rem",fontWeight:700,textTransform:"none"},children:a(m?"pivot.filter.deselectAll":"pivot.filter.selectAll")})}),p.length===0&&e("div",{className:"orb-menu-item","aria-disabled":"true",sx:{fontSize:"0.75rem"},children:a("pivot.filter.noResults")}),p.map(u=>{let b=o.includes(u);return c("div",{role:"option","aria-selected":b,tabIndex:0,className:`orb-menu-item ${b?"orb-selected":""}`,onClick:()=>f(u),onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),f(u));},sx:{display:"flex",alignItems:"center",fontSize:"0.75rem",py:.4},children:[e(It,{size:"small",checked:b,inputProps:{tabIndex:-1},sx:{p:.5,mr:.5,pointerEvents:"none"}}),e("span",{children:u})]},u)})]})})]})};M();var Pn=({size:t=18,subtle:o=false})=>{let r=Math.max(2,Math.round(t/6));return e(Me,{"aria-hidden":"true",sx:{display:"grid",gridTemplateColumns:`repeat(2, ${r}px)`,gridAutoRows:`${r}px`,gap:`${Math.max(2,Math.round(r/1.5))}px`,placeItems:"center",width:t,height:t,flexShrink:0,color:o?"var(--orb-muted)":"var(--orb-primary)"},children:Array.from({length:6},(n,a)=>e(Me,{sx:{width:r,height:r,borderRadius:999,bgcolor:"currentColor"}},a))})};M();var _l=({label:t,subtitle:o,isDragging:r,dragRef:n,listeners:a,attributes:i,style:s})=>e(Ae,{ref:n,...a,...i,sx:{p:1,borderRadius:"var(--orb-r-container)",border:"1px solid",borderColor:"var(--orb-border)",bgcolor:"var(--orb-canvas)",boxShadow:"var(--orb-shadow-1)",touchAction:"none",transition:"border-color 140ms ease, background-color 140ms ease, transform 140ms ease","&:hover":{borderColor:"var(--orb-p200)",bgcolor:"var(--orb-p50)",transform:"translateY(-1px)"}},style:{...s,opacity:r?.3:1,cursor:r?"grabbing":"grab"},children:c("div",{sx:{display:"flex",alignItems:"center",gap:.9},children:[e("div",{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:"var(--orb-r)",bgcolor:"var(--orb-p50)",border:"1px solid var(--orb-p100)"},children:e(Pn,{size:13,subtle:true})}),c("div",{sx:{minWidth:0,display:"flex",flexDirection:"column",gap:.15},children:[e(L,{component:"div",sx:{fontSize:"0.84rem",fontWeight:700,lineHeight:1.2,color:"var(--orb-fg-strong)"},children:t}),o&&e(L,{component:"div",sx:{fontSize:"0.73rem",fontWeight:400,color:"var(--orb-fg)",lineHeight:1.2},children:o})]})]})}),tm=({id:t,label:o,subtitle:r})=>{let{setNodeRef:n,listeners:a,attributes:i,isDragging:s}=core.useDraggable({id:t});return e(_l,{label:o,subtitle:r,isDragging:s,dragRef:n,listeners:a,attributes:i})};M();var Tn=({zone:t,title:o,hint:r,icon:n,children:a,itemCount:i,onClear:s})=>{let l=`container|${t}`,{isOver:d,setNodeRef:p}=core.useDroppable({id:l}),{t:m}=de();return c(Ae,{ref:p,sx:h=>({p:1.1,borderRadius:"var(--orb-r-container)",border:"1px dashed",borderColor:d?"var(--orb-primary)":"var(--orb-p200)",bgcolor:d?"var(--orb-p100)":h.palette.mode==="dark"?"var(--orb-surface-2)":"var(--orb-p50)",transition:"border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease",boxShadow:d?"0 0 0 3px var(--orb-focus-ring)":"none",minHeight:120,display:"flex",flexDirection:"column"}),children:[c("div",{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[c("div",{sx:{display:"flex",alignItems:"center",gap:.8},children:[n,e(L,{component:"div",sx:{fontSize:"0.8rem",fontWeight:700,letterSpacing:.1,color:"var(--orb-fg-strong)"},children:o}),c(L,{component:"div",sx:{fontSize:"0.73rem",fontWeight:500,color:"var(--orb-fg)"},children:["(",i,")"]})]}),i>0&&s&&e(dt,{title:m("pivot.clearArea"),children:e(se,{size:"small",onClick:s,sx:{width:24,height:24,p:0},children:e(bp,{size:13})})})]}),e(L,{component:"div",sx:{mt:.5,mb:.9,fontSize:"0.72rem",fontWeight:400,color:"var(--orb-fg)"},children:r}),e("div",{sx:{flex:1},children:a})]})};M();var om={xs:1.2,md:1.6},In=({title:t,subtitle:o,collapsed:r,onToggleCollapse:n,expandAriaLabel:a,collapseAriaLabel:i,children:s,bodySx:l,unmountOnExit:d=false,headerActions:p})=>c(Ae,{sx:m=>({borderRadius:"var(--orb-r-container)",border:`1px solid ${m.palette.divider}`,overflow:"hidden",bgcolor:"var(--orb-surface)",boxShadow:"var(--orb-shadow-1)"}),children:[c("div",{sx:m=>({px:om,py:1.15,display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,bgcolor:"var(--orb-canvas)",borderBottom:r?"none":`1px solid ${m.palette.divider}`}),children:[c("div",{sx:{minWidth:0,flex:1},children:[e(L,{component:"div",sx:{fontSize:"0.92rem",fontWeight:700,color:"var(--orb-fg-strong)"},children:t}),e(L,{component:"div",sx:{fontSize:"0.75rem",fontWeight:400,color:"var(--orb-fg)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:o})]}),c("div",{sx:{display:"flex",alignItems:"center",gap:.75,flexShrink:0},children:[p,e(se,{size:"small","aria-label":r?a:i,onClick:n,sx:m=>({border:`1px solid ${m.palette.divider}`,bgcolor:"var(--orb-canvas)",color:"var(--orb-primary)",width:24,height:24,padding:0,borderRadius:999,flexShrink:0,"&:hover":{bgcolor:"var(--orb-p50)",borderColor:"var(--orb-p200)"}}),children:e(hi,{size:13,sx:{transition:"transform 220ms cubic-bezier(0.2, 0, 0, 1)",transform:r?"rotate(180deg)":"rotate(0deg)"}})})]})]}),e(an,{in:!r,timeout:260,easing:"cubic-bezier(0.2, 0, 0, 1)",unmountOnExit:d,children:e("div",{sx:[{px:om,py:{xs:1.2,md:1.6}},...Array.isArray(l)?l:l?[l]:[]],children:s})})]});M();var ns=({label:t,caption:o,onRemove:r,trailing:n,isDragging:a,dragRef:i,listeners:s,attributes:l,style:d})=>e(Ae,{ref:i,style:d,sx:{p:1,borderRadius:"var(--orb-r-container)",border:"1px solid",borderColor:"var(--orb-border)",bgcolor:"var(--orb-canvas)",boxShadow:"var(--orb-shadow-1)",touchAction:"none",opacity:a?0:1,transition:"border-color 140ms ease, background-color 140ms ease, transform 140ms ease","&:hover":{borderColor:"var(--orb-p200)",bgcolor:"var(--orb-p50)"}},children:c("div",{sx:{display:"flex",alignItems:"center",gap:.9},children:[e("div",{...l,...s,sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:"var(--orb-r)",bgcolor:"var(--orb-p50)",border:"1px solid var(--orb-p100)",cursor:"grab"},children:e(Pn,{size:13,subtle:true})}),c("div",{sx:{minWidth:0,flex:1,display:"flex",flexDirection:"column",gap:.15},children:[e(L,{component:"div",sx:{fontSize:"0.82rem",fontWeight:700,lineHeight:1.2,color:"var(--orb-fg-strong)"},children:t}),o&&e(L,{component:"div",sx:{fontSize:"0.72rem",fontWeight:400,color:"var(--orb-fg)",lineHeight:1.2},children:o})]}),n,r&&e(se,{size:"small",onClick:p=>{p.stopPropagation(),r();},sx:{width:24,height:24,p:0},children:e(kr,{size:13})})]})}),ba=({id:t,label:o,caption:r,onRemove:n,trailing:a})=>{let{setNodeRef:i,attributes:s,listeners:l,transform:d,transition:p,isDragging:m}=sortable.useSortable({id:t}),h={transform:d?`translate3d(${d.x}px, ${d.y}px, 0)`:void 0,transition:p,zIndex:m?999:"auto"};return e(ns,{label:o,caption:r,onRemove:n,trailing:a,isDragging:m,dragRef:i,listeners:l,attributes:s,style:h})};M();var ss={rows:e(Np,{size:16,sx:{color:"var(--orb-primary)"}}),columns:e(cn,{size:16,sx:{color:"var(--orb-primary)"}}),filters:e(mp,{size:16,sx:{color:"var(--orb-primary)"}}),values:e(ln,{size:16,sx:{color:"var(--orb-accent)"}})},rm=({isConfiguratorCollapsed:t,onToggleCollapse:o,availableFields:r,fieldMap:n,filterFields:a,columnFields:i,rowFields:s,valueFields:l,clearZone:d,removeFieldFromZone:p,getFilterSelectionSummary:m,renderDimensionFilterSelect:h,renderAggregationSelect:f,getAggregationLabel:u})=>{let{t:b}=de(),y=[`${b("pivot.zone.rows")} ${s.length}`,`${b("pivot.zone.columns")} ${i.length}`,`${b("pivot.zone.filters")} ${a.length}`,`${b("pivot.zone.values")} ${l.length}`].join(" \xB7 ");return e(In,{title:b("pivot.config.title"),subtitle:y,collapsed:t,onToggleCollapse:o,expandAriaLabel:b("pivot.collapse.ariaExpand"),collapseAriaLabel:b("pivot.collapse.ariaCollapse"),unmountOnExit:true,children:c("div",{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",lg:"260px 1fr"},gap:2},children:[e(Tn,{zone:"palette",title:b("pivot.fieldList"),hint:b("pivot.availableDimensions"),itemCount:r.length,icon:e(Pn,{size:18,subtle:true}),children:c(le,{spacing:.8,sx:{maxHeight:400,overflowY:"auto",pr:.5},children:[r.length===0&&e(L,{component:"div",sx:{fontSize:"0.74rem",fontWeight:400,color:"var(--orb-fg)",py:1},children:b("pivot.allFieldsInUse")}),r.map(g=>e(tm,{id:`item|palette|${g.id}`,label:g.label,subtitle:g.type??"string"},g.id))]})}),c(le,{spacing:2,children:[c("div",{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[e(Tn,{zone:"filters",title:b("pivot.zone.filters"),hint:b("pivot.hint.filters"),icon:ss.filters,itemCount:a.length,onClear:()=>d("filters"),children:e(sortable.SortableContext,{items:a.map(g=>`item|filters|${g}`),strategy:sortable.verticalListSortingStrategy,children:e(le,{spacing:.7,children:a.map(g=>e(ba,{id:`item|filters|${g}`,label:n.get(g)?.label??g,caption:m(g),trailing:h(g),onRemove:()=>p("filters",g)},g))})})}),e(Tn,{zone:"columns",title:b("pivot.zone.columns"),hint:b("pivot.hint.columns"),icon:ss.columns,itemCount:i.length,onClear:()=>d("columns"),children:e(sortable.SortableContext,{items:i.map(g=>`item|columns|${g}`),strategy:sortable.verticalListSortingStrategy,children:e(le,{spacing:.7,children:i.map(g=>e(ba,{id:`item|columns|${g}`,label:n.get(g)?.label??g,caption:`${n.get(g)?.type??"dimension"} \u2022 ${m(g)}`,trailing:h(g),onRemove:()=>p("columns",g)},g))})})})]}),c("div",{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[e(Tn,{zone:"rows",title:b("pivot.zone.rows"),hint:b("pivot.hint.rows"),icon:ss.rows,itemCount:s.length,onClear:()=>d("rows"),children:e(sortable.SortableContext,{items:s.map(g=>`item|rows|${g}`),strategy:sortable.verticalListSortingStrategy,children:e(le,{spacing:.7,children:s.map(g=>e(ba,{id:`item|rows|${g}`,label:n.get(g)?.label??g,caption:`${n.get(g)?.type??"dimension"} \u2022 ${m(g)}`,trailing:h(g),onRemove:()=>p("rows",g)},g))})})}),e(Tn,{zone:"values",title:b("pivot.zone.values"),hint:b("pivot.hint.values"),icon:ss.values,itemCount:l.length,onClear:()=>d("values"),children:e(sortable.SortableContext,{items:l.map(g=>`item|values|${g.tokenId}`),strategy:sortable.verticalListSortingStrategy,children:e(le,{spacing:.7,children:l.map(g=>{let x=n.get(g.fieldId)?.label??g.fieldId,v=`${u(g.aggregation)}(${x})`;return e(ba,{id:`item|values|${g.tokenId}`,label:x,caption:v,trailing:f(g),onRemove:()=>p("values",g.tokenId)},g.tokenId)})})})})]})]})]})})};M();var nm=t=>t.toLocaleString(void 0,{maximumFractionDigits:1}),am=({data:t,primaryLabel:o,secondaryLabel:r,formatPrimaryValue:n,formatSecondaryValue:a})=>{let i=lo();if(t.length===0)return null;let s=720,l=250,d={top:20,right:24,bottom:40,left:52},p=r?t.map(g=>g.primaryValue):t.map((g,x)=>x+1),m=r?t.map(g=>g.secondaryValue??0):t.map(g=>g.primaryValue),h=Math.max(...p,1),f=Math.max(...m,1),u=s-d.left-d.right,b=l-d.top-d.bottom,y=t.map((g,x)=>{let v=r?g.primaryValue:x+1,C=r?g.secondaryValue??0:g.primaryValue,P=d.left+v/h*u,S=l-d.bottom-C/f*b;return {...g,x:P,y:S,rawX:v,rawY:C}});return c("div",{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[e("div",{sx:{overflowX:"auto"},children:c("div",{component:"svg",viewBox:`0 0 ${s} ${l}`,sx:{width:"100%",minWidth:s,height:l},children:[e("line",{x1:d.left,y1:l-d.bottom,x2:s-d.right,y2:l-d.bottom,stroke:Fo(i.palette.text.secondary,.35)}),e("line",{x1:d.left,y1:d.top,x2:d.left,y2:l-d.bottom,stroke:Fo(i.palette.text.secondary,.35)}),y.map(g=>c("g",{children:[e("circle",{cx:g.x,cy:g.y,r:7,fill:Fo(i.palette.primary.main,.18)}),e("circle",{cx:g.x,cy:g.y,r:4.5,fill:i.palette.primary.main,children:c("title",{children:[g.name,`
|
|
195
195
|
`,r?`${o}: ${n(g.primaryValue)}`:`${o}: ${n(g.primaryValue)}`,r?`
|
|
196
|
-
${r}: ${(a??n)(g.secondaryValue??0)}`:""]})}),e("text",{x:g.x,y:Math.max(g.y-12,d.top+8),textAnchor:"middle",fontSize:"10",fill:i.palette.text.secondary,children:g.name})]},g.name)),e("text",{x:s/2,y:l-10,textAnchor:"middle",fontSize:"11",fill:i.palette.text.secondary,children:r?o:"Index"}),e("text",{x:16,y:l/2,textAnchor:"middle",transform:`rotate(-90 16 ${l/2})`,fontSize:"11",fill:i.palette.text.secondary,children:r??o}),e("text",{x:d.left,y:d.top-4,fontSize:"10",fill:i.palette.text.secondary,children:
|
|
197
|
-
`,r,": ",a(
|
|
198
|
-
`,n,": ",(i??a)(b.item.secondaryValue??0)]})},`secondary-${b.item.name}`))]})]})}),e("div",{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(2, minmax(0, 1fr))",xl:"repeat(4, minmax(0, 1fr))"},gap:1},children:t.map(b=>c("div",{sx:C=>({borderRadius:"var(--orb-r-container)",px:1.1,py:.9,border:`1px solid ${Lo(C.palette.divider,.7)}`,bgcolor:Lo(C.palette.background.default,.35)}),children:[e(L,{component:"div",sx:{fontSize:"0.76rem",fontWeight:700,color:"var(--orb-fg-strong)"},noWrap:true,title:b.name,children:b.name}),e(L,{component:"div",sx:{fontSize:"0.71rem",color:"var(--orb-fg)"},children:a(b.primaryValue)}),n&&e(L,{component:"div",sx:{fontSize:"0.71rem",color:"var(--orb-fg)"},children:(i??a)(b.secondaryValue??0)})]},b.name))})]})};var om=(t,o,r)=>{let n=new Set,a=[];return t.forEach(i=>{n.has(i)||(n.add(i),a.push({fieldId:i,label:r.get(i)?.label??i,zone:"rows"}));}),o.forEach(i=>{n.has(i)||(n.add(i),a.push({fieldId:i,label:r.get(i)?.label??i,zone:"columns"}));}),a},rm=(t,o,r)=>t.map(n=>{let a=o.get(n.fieldId),i=a?.label??n.fieldId;return {fieldId:n.fieldId,label:`${r(n.aggregation)} \xB7 ${i}`,item:n,field:a}}),nm=({rows:t,dimensionFieldId:o,primaryValue:r,secondaryValue:n})=>{if(!o)return [];let a=new Map;return t.forEach(i=>{let s=ur(i[o]),l=a.get(s);if(l){l.push(i);return}a.set(s,[i]);}),Array.from(a.entries()).sort((i,s)=>i[0].localeCompare(s[0],void 0,{sensitivity:"base"})).map(([i,s])=>({name:i,primaryValue:Sn(s,r.fieldId,r.aggregation),secondaryValue:n?Sn(s,n.fieldId,n.aggregation):void 0}))};P();var am=({rows:t,fieldMap:o,rowFields:r,columnFields:n,valueFields:a,chartDimensionFieldId:i,chartPrimaryValueFieldId:s,chartSecondaryValueFieldId:l,chartType:d,isCollapsed:p,onChartDimensionFieldIdChange:m,onChartPrimaryValueFieldIdChange:f,onChartSecondaryValueFieldIdChange:h,onChartTypeChange:u,onToggleCollapse:v,getAggregationLabel:y})=>{let{t:g}=le(),x=eo.useMemo(()=>om(r,n,o),[n,o,r]),b=eo.useMemo(()=>rm(a,o,y),[o,y,a]),C=b.find(R=>R.fieldId===s)??b[0],k=b.find(R=>R.fieldId===l&&R.fieldId!==C?.fieldId)??null,S=x.find(R=>R.fieldId===i)??x[0],T=S&&C?g("pivot.chart.subtitleReady",{dimension:S.label,measure:k?`${C.label} / ${k.label}`:C.label}):g("pivot.chart.subtitle"),I=eo.useMemo(()=>!S||!C?[]:nm({rows:t,dimensionFieldId:S.fieldId,primaryValue:C.item,secondaryValue:k?.item}),[C,t,k,S]),w=R=>C?ma(R,C.item,o):R.toLocaleString(),M=R=>k?ma(R,k.item,o):R.toLocaleString(),A=x.length>1||b.length>1;return c(Tn,{title:g("pivot.chart.title"),subtitle:T,collapsed:p,onToggleCollapse:v,expandAriaLabel:g("pivot.chart.collapse.ariaExpand"),collapseAriaLabel:g("pivot.chart.collapse.ariaCollapse"),bodySx:{display:"flex",flexDirection:"column",gap:1.1},children:[A&&c("div",{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(2, minmax(0, 1fr))",xl:"repeat(4, minmax(0, 1fr))"},gap:1,alignItems:"start"},children:[c(Cr,{size:"small",sx:{minWidth:0,width:"100%"},children:[e(L,{component:"div",sx:{fontSize:"0.7rem",fontWeight:500,color:"var(--orb-fg)",mb:.45},children:g("pivot.chart.dimension")}),e(zt,{value:S?.fieldId??"",onChange:R=>m(String(R.target.value)),sx:{fontSize:"0.75rem",height:32},children:x.map(R=>e("option",{value:R.fieldId,sx:{fontSize:"0.75rem"},children:R.label},R.fieldId))})]}),c(Cr,{size:"small",sx:{minWidth:0,width:"100%"},children:[e(L,{component:"div",sx:{fontSize:"0.7rem",fontWeight:500,color:"var(--orb-fg)",mb:.45},children:g("pivot.chart.primaryMeasure")}),e(zt,{value:C?.fieldId??"",onChange:R=>f(String(R.target.value)),sx:{fontSize:"0.75rem",height:32},children:b.map(R=>e("option",{value:R.fieldId,sx:{fontSize:"0.75rem"},children:R.label},R.fieldId))})]}),c(Cr,{size:"small",sx:{minWidth:0,width:"100%"},children:[e(L,{component:"div",sx:{fontSize:"0.7rem",fontWeight:500,color:"var(--orb-fg)",mb:.45},children:g("pivot.chart.secondaryMeasure")}),c(zt,{value:k?.fieldId??"",onChange:R=>h(String(R.target.value)),sx:{fontSize:"0.75rem",height:32},children:[e("option",{value:"",sx:{fontSize:"0.75rem",color:"text.secondary"},children:g("common.none")}),b.filter(R=>R.fieldId!==C?.fieldId).map(R=>e("option",{value:R.fieldId,sx:{fontSize:"0.75rem"},children:R.label},R.fieldId))]})]}),c(Cr,{size:"small",sx:{minWidth:0,width:"100%"},children:[e(L,{component:"div",sx:{fontSize:"0.7rem",fontWeight:500,color:"var(--orb-fg)",mb:.45},children:g("pivot.chart.chartType")}),c(zt,{value:d,onChange:R=>u(R.target.value),sx:{fontSize:"0.75rem",height:32},children:[e("option",{value:"bar-vertical",sx:{fontSize:"0.75rem"},children:g("pivot.chart.style.barVertical")}),e("option",{value:"bar-horizontal",sx:{fontSize:"0.75rem"},children:g("pivot.chart.style.barHorizontal")}),e("option",{value:"line",sx:{fontSize:"0.75rem"},children:g("pivot.chart.style.line")}),e("option",{value:"scatter",sx:{fontSize:"0.75rem"},children:g("pivot.chart.style.scatter")})]})]})]}),e("div",{children:S?C?I.length===0?e("div",{sx:{py:5,textAlign:"center"},children:e(L,{component:"div",sx:{fontSize:"0.86rem",fontWeight:400,color:"var(--orb-fg)"},children:g("pivot.chart.emptyNoData")})}):d==="scatter"?e(em,{data:I,primaryLabel:C.label,secondaryLabel:k?.label,formatPrimaryValue:w,formatSecondaryValue:M}):e(tm,{data:I,chartType:d,primaryLabel:C.label,secondaryLabel:k?.label,formatPrimaryValue:w,formatSecondaryValue:M}):e("div",{sx:{py:5,textAlign:"center"},children:e(L,{component:"div",sx:{fontSize:"0.86rem",fontWeight:400,color:"var(--orb-fg)"},children:g("pivot.chart.emptyNoValue")})}):e("div",{sx:{py:5,textAlign:"center"},children:e(L,{component:"div",sx:{fontSize:"0.86rem",fontWeight:400,color:"var(--orb-fg)"},children:g("pivot.chart.emptyNoDimension")})})})]})};P();var rs=({node:t,dataColumns:o,fieldMap:r,level:n,expandedKeys:a,onToggle:i,getValue:s})=>{let l=a.has(t.key),d=t.children.length>0,p=t.isGrandTotal,m=d&&!l&&!p,f=p?800:m?700:d?600:500,h=p?800:m?600:500;return c(jsxRuntime.Fragment,{children:[c("tr",{sx:{bgcolor:p?vt()==="dark"?"color-mix(in oklch, var(--orb-primary) 22%, transparent)":"color-mix(in oklch, var(--orb-primary) 8%, transparent)":vt()==="dark"?"var(--orb-surface)":"background.paper","&:hover":{bgcolor:p?vt()==="dark"?"color-mix(in oklch, var(--orb-primary) 28%, transparent)":"color-mix(in oklch, var(--orb-primary) 12%, transparent)":"var(--orb-hover)"}},children:[c("td",{style:{fontWeight:f},sx:u=>({fontSize:"0.76rem",borderBottom:`1px solid ${u.palette.divider}`,whiteSpace:"nowrap",pl:n*2+1,display:"flex",alignItems:"center",height:40}),children:[d&&!p&&e(ie,{size:"small",onClick:()=>i(t.key),sx:{width:22,height:22,p:0,mr:.35,ml:-0.8},children:l?e($o,{size:12}):e(kr,{size:12})}),!d&&!p&&n>0&&e("div",{sx:{width:18}}),t.value]}),o.map(u=>e("td",{align:"right",style:{fontWeight:h},sx:{fontSize:"0.76rem",borderBottom:v=>`1px solid ${v.palette.divider}`,whiteSpace:"nowrap"},children:ma(s?s(t,u.id):t.aggregatedValues[u.id]??0,u.valueItem,r)},`${t.key}-${u.id}`))]}),l&&t.children.map(u=>e(rs,{node:u,dataColumns:o,fieldMap:r,level:n+1,expandedKeys:a,onToggle:i,getValue:s},u.key))]})};P();var Ol=(t,o,r)=>{let n=[...t,...o];return r&&n.includes(r)?r:n[0]??""},as=(t,o)=>o&&t.some(r=>r.fieldId===o)?o:t[0]?.fieldId??"",Fl=(t,o,r)=>r===""?"":r&&r!==o&&t.some(n=>n.fieldId===r)?r:t.find(n=>n.fieldId!==o)?.fieldId??"",sm=t=>{let o=new Set,r=n=>{n.forEach(a=>{a.children.length>0&&(o.add(a.key),r(a.children));});};return r(t),o},lm=(t,o,r=0)=>t.length===0?r:t.reduce((n,a)=>a.children.length===0||!o.has(a.key)?Math.max(n,r+1):Math.max(n,lm(a.children,o,r+1)),r),cy=(t,o)=>{let r=[],n=a=>{a.forEach(i=>{if(i.children.length>0&&o.has(i.key)){n(i.children);return}r.push(i);});};return n(t),r},MO=({title:t,rows:o,fields:r,initialLayout:n,initialChart:a,emptyText:i,maxPreviewHeight:s=520,initialChartCollapsed:l=false,initialTableCollapsed:d=false,model:p,enablePresetManagement:m=false,presets:f,defaultPresets:h,onPresetsChange:u,initialPresetId:v,onPresetApplied:y})=>{let{t:g}=le(),x=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:8}})),b=eo.useRef(0),C=eo.useRef(false),k=t??g("pivot.title.default"),S=i??g("pivot.empty"),T=eo.useMemo(()=>({sum:g("pivot.agg.sum"),count:g("pivot.agg.count"),avg:g("pivot.agg.avg"),min:g("pivot.agg.min"),max:g("pivot.agg.max")}),[g]),I=eo.useCallback(N=>T[N]??Wu[N],[T]),w=eo.useMemo(()=>new Set(r.map(N=>N.id)),[r]),M=eo.useMemo(()=>new Map(r.map(N=>[N.id,N])),[r]),[A,R]=eo.useState(()=>lo(n?.rows,w)),[D,E]=eo.useState(()=>lo(n?.columns,w)),[O,_]=eo.useState(()=>lo(n?.filters,w)),[J,F]=eo.useState(()=>{let N=n?.values??[],G=new Set,K=[];return N.forEach(pe=>{if(!w.has(pe.fieldId)||G.has(pe.fieldId))return;G.add(pe.fieldId),b.current+=1;let Be=M.get(pe.fieldId);K.push({tokenId:`v${b.current}`,fieldId:pe.fieldId,aggregation:Co(pe.aggregation,Be)});}),K}),[V,z]=eo.useState({}),[X,W]=eo.useState(true),[H,U]=eo.useState(false),[Y,ue]=eo.useState(()=>Ol(lo(n?.rows,w),lo(n?.columns,w),a?.dimensionFieldId)),[re,ge]=eo.useState(()=>{let N=(n?.values??[]).filter((G,K,pe)=>w.has(G.fieldId)&&pe.findIndex(Be=>Be.fieldId===G.fieldId)===K).map(G=>({tokenId:G.fieldId,fieldId:G.fieldId,aggregation:Co(G.aggregation,M.get(G.fieldId))}));return as(N,a?.primaryValueFieldId)}),[we,Ve]=eo.useState(()=>{let N=(n?.values??[]).filter((K,pe,Be)=>w.has(K.fieldId)&&Be.findIndex(rt=>rt.fieldId===K.fieldId)===pe).map(K=>({tokenId:K.fieldId,fieldId:K.fieldId,aggregation:Co(K.aggregation,M.get(K.fieldId))})),G=as(N,a?.primaryValueFieldId);return Fl(N,G,a?.secondaryValueFieldId)}),[Te,Ie]=eo.useState(a?.chartType??"bar-vertical"),[He,ce]=eo.useState(l),[be,We]=eo.useState(d),[tt,nt]=eo.useState(()=>h??[]),[it,q]=eo.useState(""),[De,Ce]=eo.useState(false),[Fe,at]=eo.useState(""),[Ze,wt]=eo.useState(null),[Rt,Ot]=eo.useState(new Set(["__grand_total__"])),[At,oe]=eo.useState(new Set),Ke=p?.rowFields??A,Oe=p?.columnFields??D,de=p?.filterFields??O,ye=p?.valueFields??J,te=p?.filterSelections??V,ve=p?.showGrandTotal??X,Ne=p?.isConfiguratorCollapsed??H,Je=p?.chartDimensionFieldId??Y,st=p?.chartPrimaryValueFieldId??re,pt=p?.chartSecondaryValueFieldId??we,Bt=p?.chartType??Te,Yt=p?.isChartCollapsed??He,Vt=p?.isTableCollapsed??be,St=f??tt,Wt=m||St.length>0||!!u,bt=eo.useCallback(N=>{if(p?.setRowFields){p.setRowFields(N);return}R(N);},[p]),Nt=eo.useCallback(N=>{if(p?.setColumnFields){p.setColumnFields(N);return}E(N);},[p]),lt=eo.useCallback(N=>{if(p?.setFilterFields){p.setFilterFields(N);return}_(N);},[p]),Ft=eo.useCallback(N=>{if(p?.setValueFields){p.setValueFields(N);return}F(N);},[p]),Zt=eo.useCallback(N=>{if(p?.setFilterSelections){p.setFilterSelections(N);return}z(N);},[p]),Z=eo.useCallback(N=>{if(p?.setShowGrandTotal){p.setShowGrandTotal(N);return}W(N);},[p]),$=eo.useCallback(N=>{if(p?.setIsConfiguratorCollapsed){p.setIsConfiguratorCollapsed(N);return}U(N);},[p]),j=eo.useCallback(N=>{if(p?.setChartDimensionFieldId){p.setChartDimensionFieldId(N);return}ue(N);},[p]),he=eo.useCallback(N=>{if(p?.setChartPrimaryValueFieldId){p.setChartPrimaryValueFieldId(N);return}ge(N);},[p]),xe=eo.useCallback(N=>{if(p?.setChartSecondaryValueFieldId){p.setChartSecondaryValueFieldId(N);return}Ve(N);},[p]),Ee=eo.useCallback(N=>{if(p?.setChartType){p.setChartType(N);return}Ie(N);},[p]),_e=eo.useCallback(N=>{if(p?.setIsChartCollapsed){p.setIsChartCollapsed(N);return}ce(N);},[p]),qe=eo.useCallback(N=>{if(p?.setIsTableCollapsed){p.setIsTableCollapsed(N);return}We(N);},[p]),je=eo.useCallback(N=>{let G=typeof N=="function"?N(St):N;f||nt(G),u?.(G);},[u,St,f]),mt=eo.useMemo(()=>new Set([...Ke,...Oe,...de]),[Ke,Oe,de]),ft=eo.useMemo(()=>r.filter(N=>!mt.has(N.id)),[r,mt]),Mt=eo.useMemo(()=>{let N=[...Ke,...Oe,...de],G=new Set,K=[];return N.forEach(pe=>{G.has(pe)||(G.add(pe),K.push(pe));}),K},[Oe,de,Ke]);eo.useEffect(()=>{bt(N=>{let G=N.filter(K=>w.has(K));return mr(N,G)?N:G}),Nt(N=>{let G=N.filter(K=>w.has(K));return mr(N,G)?N:G}),lt(N=>{let G=N.filter(K=>w.has(K));return mr(N,G)?N:G}),Ft(N=>{let G=N.filter(K=>w.has(K.fieldId)).map(K=>({...K,aggregation:Co(K.aggregation,M.get(K.fieldId))}));return Qi(N,G)?N:G});},[M,w]);let yt=eo.useMemo(()=>{let N={};return Mt.forEach(G=>{let K=new Set;o.forEach(pe=>{K.add(ur(pe[G]));}),N[G]=Array.from(K).sort((pe,Be)=>pe.localeCompare(Be));}),N},[Mt,o]);eo.useEffect(()=>{Zt(N=>{let G={};return Mt.forEach(K=>{let pe=yt[K]??[],rt=(N[K]??[]).filter(ne=>pe.includes(ne)),Ge=Object.prototype.hasOwnProperty.call(N,K);G[K]=Ge?rt:pe;}),qu(N,G)?N:G});},[Mt,yt]),eo.useEffect(()=>{j(N=>Ol(Ke,Oe,N));},[Oe,Ke,j]),eo.useEffect(()=>{he(N=>as(ye,N));},[he,ye]),eo.useEffect(()=>{xe(N=>Fl(ye,st,N));},[st,xe,ye]);let B=eo.useMemo(()=>o.filter(N=>Mt.every(G=>{let K=te[G]??[],pe=yt[G]??[];if(K.length===pe.length)return true;if(K.length===0)return false;let Be=ur(N[G]);return K.includes(Be)})),[Mt,yt,te,o]),Q=eo.useMemo(()=>{if(ye.length===0)return null;let N=new Map;if(B.forEach(Ge=>{let ne=Oe.length>0?Oe.map(ee=>ur(Ge[ee])):[g("pivot.valueLabel")],me=_r(ne);N.set(me,ne);}),N.size===0){let Ge=Oe.length>0?Oe.map(()=>Zi):[g("pivot.valueLabel")];N.set(_r(Ge),Ge);}let G=Array.from(N.entries()).sort((Ge,ne)=>Ku(Ge[1],ne[1])),K=G.flatMap(([Ge,ne])=>ye.map(me=>{let ee=M.get(me.fieldId),Le=`${I(me.aggregation)} ${ee?.label??me.fieldId}`,Qe=Oe.length===0||ye.length>1?`${ne.join(" / ")} \u2022 ${Le}`:ne.join(" / ");return {id:`${Ge}::${me.tokenId}`,colKey:Ge,valueItem:me,label:Qe}})),pe=[];Oe.length>0&&G.forEach(([Ge,ne])=>{let me=K.filter(Qe=>Qe.colKey===Ge),ee=pe,Le=[];ne.forEach((Qe,Me)=>{Le.push(`d${Me}:${Qe}`);let Ye=`col::${_r(Le)}`,Pt=ee.find(Qr=>Qr.key===Ye);Pt||(Pt={key:Ye,label:Qe,children:[],leafColumnIds:[],path:ne.slice(0,Me+1),depth:Me},ee.push(Pt)),me.forEach(Qr=>{Pt.leafColumnIds.includes(Qr.id)||Pt.leafColumnIds.push(Qr.id);}),ee=Pt.children;});});let Be=Ge=>{let ne={};return K.forEach(me=>{let ee=Ge.filter(Le=>{let Qe=Oe.length>0?Oe.map(Me=>ur(Le[Me])):[g("pivot.valueLabel")];return _r(Qe)===me.colKey});ne[me.id]=Sn(ee,me.valueItem.fieldId,me.valueItem.aggregation);}),ne},rt=[];if(Ke.length===0)rt.push({key:"root",value:g("pivot.resultLabel")||zu,children:[],isLeaf:true,aggregatedValues:Be(B),path:[],depth:0});else {let Ge=(ne,me,ee)=>{if(me>=Ke.length)return [];let Le=Ke[me],Qe=new Map;return ne.forEach(Me=>{let Ye=ur(Me[Le]);Qe.has(Ye)||Qe.set(Ye,[]),Qe.get(Ye).push(Me);}),Array.from(Qe.keys()).sort().map(Me=>{let Ye=Qe.get(Me),Pt=[...ee,Me];return {key:_r(Pt),value:Me,fieldId:Le,aggregatedValues:Be(Ye),children:Ge(Ye,me+1,Pt),isLeaf:me===Ke.length-1,path:Pt,depth:me}})};rt.push(...Ge(B,0,[]));}return {dataColumns:K,columnTree:pe,rowTree:rt}},[Oe,M,B,I,Ke,g,ye]),fe=eo.useCallback((N,G)=>(b.current+=1,{tokenId:`v${b.current}`,fieldId:N,aggregation:Co(G,M.get(N))}),[M]),Pe=eo.useCallback(N=>{if(N==="rows")return bt([]);if(N==="columns")return Nt([]);if(N==="filters")return lt([]);Ft([]);},[]),et=eo.useCallback((N,G)=>{if(N==="rows")return bt(K=>K.filter(pe=>pe!==G));if(N==="columns")return Nt(K=>K.filter(pe=>pe!==G));if(N==="filters")return lt(K=>K.filter(pe=>pe!==G));Ft(K=>K.filter(pe=>pe.tokenId!==G));},[]),Xe=eo.useCallback((N,G)=>{Ft(K=>K.map(pe=>pe.tokenId===N?{...pe,aggregation:Co(G,M.get(pe.fieldId))}:pe));},[M]),kt=eo.useCallback(N=>{wt(String(N.active.id));},[]),ht=eo.useCallback(N=>{if(wt(null),!N.over)return;let G=ji(String(N.active.id)),K=ji(String(N.over.id));if(!G||!K||G.kind!=="item"||!G.key)return;if(G.zone===K.zone&&K.kind==="item"){if(G.zone==="rows"){let Me=Ke.indexOf(G.key),Ye=Ke.indexOf(K.key??"");Me!==-1&&Ye!==-1&&Me!==Ye&&bt(Pt=>sortable.arrayMove(Pt,Me,Ye));return}if(G.zone==="columns"){let Me=Oe.indexOf(G.key),Ye=Oe.indexOf(K.key??"");Me!==-1&&Ye!==-1&&Me!==Ye&&Nt(Pt=>sortable.arrayMove(Pt,Me,Ye));return}if(G.zone==="filters"){let Me=de.indexOf(G.key),Ye=de.indexOf(K.key??"");Me!==-1&&Ye!==-1&&Me!==Ye&<(Pt=>sortable.arrayMove(Pt,Me,Ye));return}if(G.zone==="values"){let Me=ye.findIndex(Pt=>Pt.tokenId===G.key),Ye=ye.findIndex(Pt=>Pt.tokenId===(K.key??""));Me!==-1&&Ye!==-1&&Me!==Ye&&Ft(Pt=>sortable.arrayMove(Pt,Me,Ye));}return}let pe=K.zone,Be=[...Ke],rt=[...Oe],Ge=[...de],ne=[...ye],me="",ee=null;if(G.zone==="palette")me=G.key;else if(G.zone==="values"){let Me=ne.find(Ye=>Ye.tokenId===G.key);if(!Me)return;me=Me.fieldId,ee=Me,ne=ne.filter(Ye=>Ye.tokenId!==G.key);}else G.zone==="rows"?(me=G.key,Be=Be.filter(Me=>Me!==me)):G.zone==="columns"?(me=G.key,rt=rt.filter(Me=>Me!==me)):G.zone==="filters"&&(me=G.key,Ge=Ge.filter(Me=>Me!==me));if(!me)return;let Le=()=>{Be=Be.filter(Me=>Me!==me),rt=rt.filter(Me=>Me!==me),Ge=Ge.filter(Me=>Me!==me);},Qe=Me=>{if(K.kind!=="item"||!K.key)return Me==="rows"?Be.length:Me==="columns"?rt.length:Me==="filters"?Ge.length:Me==="values"?ne.length:0;if(Me==="rows"){let Ye=Be.indexOf(K.key);return Ye>=0?Ye:Be.length}if(Me==="columns"){let Ye=rt.indexOf(K.key);return Ye>=0?Ye:rt.length}if(Me==="filters"){let Ye=Ge.indexOf(K.key);return Ye>=0?Ye:Ge.length}if(Me==="values"){let Ye=ne.findIndex(Pt=>Pt.tokenId===K.key);return Ye>=0?Ye:ne.length}return 0};if(pe==="palette"){bt(Be),Nt(rt),lt(Ge),Ft(ne);return}if(pe==="values"){let Me=Qe("values"),Ye=ee??fe(me);ne.splice(Me,0,Ye),bt(Be),Nt(rt),lt(Ge),Ft(ne);return}if(Uu(pe)){Le();let Me=Qe(pe);pe==="rows"?Be.splice(Me,0,me):pe==="columns"?rt.splice(Me,0,me):Ge.splice(Me,0,me),bt(Be),Nt(rt),lt(Ge),Ft(ne);}},[Oe,fe,de,Ke,ye]),gt=eo.useCallback((N,G)=>{Zt(K=>({...K,[N]:G}));},[]),Ct=eo.useCallback(N=>{Ot(G=>{let K=new Set(G);return K.has(N)?K.delete(N):K.add(N),K});},[]),no=eo.useCallback(N=>{oe(G=>{let K=new Set(G);return K.has(N)?K.delete(N):K.add(N),K});},[]),Et=eo.useCallback(N=>{let G=M.get(N.fieldId),K=Nl(G);return e(Cr,{size:"small",sx:{minWidth:98},children:e(zt,{value:N.aggregation,onChange:pe=>Xe(N.tokenId,pe.target.value),onClick:pe=>pe.stopPropagation(),onMouseDown:pe=>pe.stopPropagation(),sx:{fontSize:"0.72rem",height:26,"& select.orb-inp":{py:.35}},children:K.map(pe=>e("option",{value:pe,sx:{fontSize:"0.75rem"},children:I(pe)},pe))})})},[M,I,Xe]),jt=eo.useCallback(N=>{let G=yt[N]??[],K=te[N]??G;return G.length===0?g("pivot.filter.noValues"):K.length===0?g("pivot.filter.noneSelected"):K.length===G.length?g("pivot.filter.allValues"):g("pivot.filter.selectedCount",{selected:K.length,total:G.length})},[yt,te,g]),Ht=eo.useCallback(N=>{let G=yt[N]??[],K=te[N]??G;return e(Yu,{options:G,selectedValues:K,onChange:pe=>gt(N,pe)})},[yt,te,gt]),Kt=eo.useCallback(()=>`pivot-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,[]),$t=eo.useCallback(()=>{let N={};return new Set([...Mt,...Object.keys(te)]).forEach(K=>{if(!w.has(K))return;let pe=te[K]??[];N[K]=[...pe];}),{layout:{rows:[...Ke],columns:[...Oe],filters:[...de],values:ye.map(K=>({fieldId:K.fieldId,aggregation:K.aggregation}))},filterSelections:N,showGrandTotal:ve,chart:{dimensionFieldId:Je,primaryValueFieldId:st,secondaryValueFieldId:pt,chartType:Bt}}},[Mt,Je,st,pt,Bt,Oe,de,te,Ke,ve,w,ye]),oo=eo.useCallback(N=>{let G=lo(N.layout.rows,w),K=lo(N.layout.columns,w),pe=lo(N.layout.filters,w),Be=new Set,rt=(N.layout.values??[]).filter(me=>!w.has(me.fieldId)||Be.has(me.fieldId)?false:(Be.add(me.fieldId),true)).map(me=>fe(me.fieldId,me.aggregation)),Ge={};Object.entries(N.filterSelections??{}).forEach(([me,ee])=>{!w.has(me)||!Array.isArray(ee)||(Ge[me]=Array.from(new Set(ee.map(Le=>String(Le)))));}),bt(G),Nt(K),lt(pe),Ft(rt),Zt(Ge),typeof N.showGrandTotal=="boolean"&&Z(N.showGrandTotal),j(Ol(G,K,N.chart?.dimensionFieldId));let ne=as(rt,N.chart?.primaryValueFieldId);he(ne),xe(Fl(rt,ne,N.chart?.secondaryValueFieldId)),Ee(N.chart?.chartType??"bar-vertical"),q(N.id),y?.(N);},[fe,y,j,he,xe,Ee,Nt,lt,Zt,bt,Z,Ft,w]),ao=eo.useCallback(N=>{if(!N){q("");return}let G=St.find(K=>K.id===N);if(!G){q("");return}oo(G);},[oo,St]),bo=eo.useCallback(()=>{let N=g("pivot.preset.defaultName",{index:St.length+1});at(N),Ce(true);},[St.length,g]),Ro=eo.useCallback(()=>{let N=Fe.trim();if(!N)return;let G={id:Kt(),name:N,...$t()};je(K=>[...K,G]),q(G.id),Ce(false);},[$t,Kt,Fe,je]),Mo=eo.useCallback(()=>{it&&(je(N=>N.filter(G=>G.id!==it)),q(""));},[it,je]);eo.useEffect(()=>{if(!v||C.current)return;let N=St.find(G=>G.id===v);N&&(C.current=true,oo(N));},[oo,v,St]),eo.useEffect(()=>{it&&(St.some(N=>N.id===it)||q(""));},[it,St]);let ir=eo.useMemo(()=>{if(!ve||!Q||!Ke.length)return null;let N={};return Q.dataColumns.forEach(G=>{let K=B.filter(pe=>{let Be=Oe.length>0?Oe.map(rt=>ur(pe[rt])):[g("pivot.valueLabel")];return _r(Be)===G.colKey});N[G.id]=Sn(K,G.valueItem.fieldId,G.valueItem.aggregation);}),{key:"__grand_total__",value:g("pivot.grandTotal")||Vu,children:[],isLeaf:false,isGrandTotal:true,aggregatedValues:N,path:[],depth:-1}},[ve,Q,B,Oe,Ke.length,g]),xo=eo.useMemo(()=>sm(Q?.rowTree??[]),[Q]),Bo=eo.useMemo(()=>sm(Q?.columnTree??[]),[Q]);eo.useEffect(()=>{Ot(N=>{let G=new Set;return N.has("__grand_total__")&&G.add("__grand_total__"),xo.forEach(K=>{N.has(K)&&G.add(K);}),G});},[xo]),eo.useEffect(()=>{oe(N=>{let G=new Set;return Bo.forEach(K=>{N.has(K)&&G.add(K);}),G});},[Bo]);let qr=eo.useCallback(()=>{Ot(N=>{let G=new Set(N);return xo.forEach(K=>G.add(K)),G});},[xo]),Xr=eo.useCallback(()=>{Ot(N=>{let G=new Set;return N.has("__grand_total__")&&G.add("__grand_total__"),G});},[]),Lr=eo.useCallback(()=>{oe(new Set(Bo));},[Bo]),Yr=eo.useCallback(()=>{oe(new Set);},[]),Zr=eo.useMemo(()=>!Q||Oe.length===0?[]:cy(Q.columnTree,At),[Oe.length,At,Q]),Do=eo.useMemo(()=>{if(!Q)return [];if(Oe.length===0)return Q.dataColumns.map(G=>({id:G.id,label:G.label,leafColumnIds:[G.id],valueItem:G.valueItem}));let N=new Map(Q.dataColumns.map(G=>[G.id,G]));return Zr.flatMap(G=>{let K=new Map;return G.leafColumnIds.forEach(pe=>{let Be=N.get(pe);if(!Be)return;let rt=Be.valueItem.tokenId,Ge=`${I(Be.valueItem.aggregation)} ${M.get(Be.valueItem.fieldId)?.label??Be.valueItem.fieldId}`,ne=K.get(rt);if(ne){ne.leafColumnIds.push(pe);return}K.set(rt,{id:`${G.key}::${rt}`,label:ye.length>1?Ge:G.label,leafColumnIds:[pe],valueItem:Be.valueItem});}),Array.from(K.values())})},[Oe.length,M,I,Q,ye.length,Zr]),Or=eo.useMemo(()=>new Map(Do.map(N=>[N.id,N])),[Do]),jr=eo.useMemo(()=>Do.map(N=>({id:N.id,colKey:N.id,valueItem:N.valueItem,label:N.label})),[Do]),Xo=eo.useMemo(()=>{if(!Q||Oe.length===0)return [];let N=[],G=lm(Q.columnTree,At),K=G+(ye.length>1?1:0),pe=(Be,rt)=>{N[rt]??(N[rt]=[]),Be.forEach(Ge=>{let ne=Ge.children.length>0&&At.has(Ge.key),me=Do.filter(Le=>Ge.leafColumnIds.some(Qe=>Le.leafColumnIds.includes(Qe))).length,ee=ne||ye.length>1?1:K-rt;N[rt].push({key:Ge.key,label:Ge.label,colSpan:me,rowSpan:ee,expandable:Ge.children.length>0,expanded:ne}),ne&&pe(Ge.children,rt+1);});};return pe(Q.columnTree,0),ye.length>1&&(N[G]=Do.map(Be=>({key:Be.id,label:Be.label,colSpan:1,rowSpan:1,expandable:false,expanded:false}))),N},[Oe.length,At,Q,ye.length,Do]),sr=eo.useCallback((N,G)=>G.leafColumnIds.reduce((K,pe)=>K+(N.aggregatedValues[pe]??0),0),[]),On=eo.useMemo(()=>c(jsxRuntime.Fragment,{children:[e(ke,{size:"small",variant:"text",onClick:qr,disabled:xo.size===0,sx:{minWidth:"auto",px:.8,fontSize:"0.72rem"},children:g("pivot.table.expandRowsAll")}),e(ke,{size:"small",variant:"text",onClick:Xr,disabled:xo.size===0,sx:{minWidth:"auto",px:.8,fontSize:"0.72rem"},children:g("pivot.table.collapseRowsAll")}),e(Dt,{orientation:"vertical",flexItem:true}),e(ke,{size:"small",variant:"text",onClick:Lr,disabled:Bo.size===0,sx:{minWidth:"auto",px:.8,fontSize:"0.72rem"},children:g("pivot.table.expandColumnsAll")}),e(ke,{size:"small",variant:"text",onClick:Yr,disabled:Oe.length===0,sx:{minWidth:"auto",px:.8,fontSize:"0.72rem"},children:g("pivot.table.collapseColumnsAll")})]}),[Oe.length,Bo.size,xo.size,Yr,Xr,Lr,qr,g]),Fr=()=>{if(!Ze)return null;let N=ji(Ze);if(!N||N.kind!=="item"||!N.key)return null;if(N.zone==="palette"){let Be=M.get(N.key);return Be?e(Al,{label:Be.label,subtitle:Be.type}):null}if(N.zone==="values"){let Be=ye.find(me=>me.tokenId===N.key);if(!Be)return null;let Ge=M.get(Be.fieldId)?.label??Be.fieldId,ne=`${I(Be.aggregation)}(${Ge})`;return e(Ji,{label:Ge,caption:ne})}let K=M.get(N.key)?.label??N.key,pe=jt(N.key);return e(Ji,{label:K,caption:pe})};return c(Ae,{sx:N=>({p:{xs:1.2,md:2},borderRadius:"var(--orb-r-container)",border:`1px solid ${N.palette.divider}`,bgcolor:"var(--orb-canvas)",boxShadow:"var(--orb-shadow-2)",display:"flex",flexDirection:"column",gap:2.25}),children:[c("div",{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1.5,flexWrap:"wrap"},children:[c("div",{sx:{minWidth:0,display:"flex",flexDirection:"column",gap:.35},children:[e(L,{component:"div",sx:{fontSize:"1.08rem",fontWeight:700,lineHeight:1.25,color:"var(--orb-fg-strong)"},children:k}),e(L,{component:"div",sx:{fontSize:"0.8rem",fontWeight:400,color:"var(--orb-fg)"},children:g("pivot.subtitle.default")})]}),c(se,{direction:"row",spacing:1.5,alignItems:"center",children:[Wt&&c(jsxRuntime.Fragment,{children:[e(Cr,{size:"small",sx:{minWidth:200},children:c(zt,{value:it,displayEmpty:true,onChange:N=>ao(String(N.target.value)),sx:{fontSize:"0.75rem",height:32},children:[e("option",{value:"",sx:{fontSize:"0.75rem",color:"text.secondary"},children:g("pivot.preset.selectPlaceholder")}),St.map(N=>e("option",{value:N.id,sx:{fontSize:"0.75rem"},children:N.name},N.id))]})}),e(ct,{title:g("pivot.preset.save"),children:e(ie,{size:"small",onClick:bo,"aria-label":g("pivot.preset.save"),sx:{width:28,height:28,p:0},children:e(Pr,{size:15})})}),e(ct,{title:g("pivot.preset.delete"),children:e("span",{children:e(ie,{size:"small",onClick:Mo,disabled:!it,"aria-label":g("pivot.preset.delete"),sx:{width:28,height:28,p:0},children:e(ci,{size:15})})})}),e(Dt,{flexItem:true,orientation:"vertical"})]}),c(L,{component:"div",sx:{fontSize:"0.75rem",fontWeight:400,color:"var(--orb-fg)"},children:[g("pivot.records"),": ",e("strong",{children:o.length.toLocaleString()})," / ",g("pivot.afterFilter"),":"," ",e("strong",{children:B.length.toLocaleString()})]}),e(Dt,{flexItem:true,orientation:"vertical"}),c("div",{sx:{display:"flex",alignItems:"center",gap:.6},children:[e(L,{component:"div",sx:{fontSize:"0.75rem",fontWeight:500,color:"var(--orb-fg-strong)"},children:g("pivot.grandTotal")}),e(ai,{size:"small",checked:ve,onChange:N=>Z(N.target.checked)})]})]})]}),e(Dt,{}),c(core.DndContext,{sensors:x,collisionDetection:core.closestCenter,onDragStart:kt,onDragEnd:ht,children:[e(Qu,{isConfiguratorCollapsed:Ne,onToggleCollapse:()=>$(N=>!N),availableFields:ft,fieldMap:M,filterFields:de,columnFields:Oe,rowFields:Ke,valueFields:ye,clearZone:Pe,removeFieldFromZone:et,getFilterSelectionSummary:jt,renderDimensionFilterSelect:Ht,renderAggregationSelect:Et,getAggregationLabel:I}),e(Hd,{children:e(core.DragOverlay,{dropAnimation:{duration:250,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:Fr()})})]}),e(am,{rows:B,fieldMap:M,rowFields:Ke,columnFields:Oe,valueFields:ye,chartDimensionFieldId:Je,chartPrimaryValueFieldId:st,chartSecondaryValueFieldId:pt,chartType:Bt,isCollapsed:Yt,onChartDimensionFieldIdChange:N=>j(N),onChartPrimaryValueFieldIdChange:N=>he(N),onChartSecondaryValueFieldIdChange:N=>xe(N),onChartTypeChange:N=>Ee(N),onToggleCollapse:()=>_e(N=>!N),getAggregationLabel:I}),e(Tn,{title:g("pivot.table.sectionTitle"),subtitle:Ke.length>0?Ke.map(N=>M.get(N)?.label??N).join(" > "):g("pivot.table.dimensions"),collapsed:Vt,onToggleCollapse:()=>qe(N=>!N),expandAriaLabel:g("pivot.table.collapse.ariaExpand"),collapseAriaLabel:g("pivot.table.collapse.ariaCollapse"),bodySx:{p:0},headerActions:On,children:Q===null?e("div",{sx:{py:5,px:{xs:1.2,md:1.6},textAlign:"center"},children:e(L,{component:"div",sx:{fontSize:"0.86rem",fontWeight:400,color:"var(--orb-fg)"},children:S})}):e("div",{sx:{maxHeight:s},children:c("table",{className:"orb-tbl",size:"small",stickyHeader:true,children:[e("thead",{children:(Xo.length>0?Xo:[[]]).map((N,G)=>c("tr",{children:[G===0&&e("td",{rowSpan:Math.max(Xo.length,1),sx:K=>({fontWeight:800,fontSize:"0.76rem",color:"text.primary",bgcolor:vt()==="dark"?"var(--orb-canvas)":"var(--orb-surface)",borderBottom:`1px solid ${K.palette.divider}`,pl:2,minWidth:220,verticalAlign:"middle"}),children:Ke.length>0?Ke.map(K=>M.get(K)?.label).join(" > "):g("pivot.table.dimensions")}),(N.length>0?N:Do.map(K=>({key:K.id,label:K.label,colSpan:1,rowSpan:1,expandable:false,expanded:false}))).map(K=>e("td",{align:"center",colSpan:K.colSpan,rowSpan:K.rowSpan,sx:pe=>({fontWeight:800,fontSize:"0.75rem",color:"text.primary",bgcolor:vt()==="dark"?"var(--orb-canvas)":"var(--orb-surface)",borderBottom:`1px solid ${pe.palette.divider}`,minWidth:148,verticalAlign:"middle"}),children:c("div",{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:.4},children:[K.expandable&&e(ie,{size:"small",onClick:()=>no(K.key),sx:{width:22,height:22,p:0,ml:-0.2},children:K.expanded?e($o,{size:12}):e(kr,{size:12})}),e("div",{component:"span",children:K.label})]})},K.key))]},`pivot-header-row-${G}`))}),c("tbody",{children:[Q.rowTree.map(N=>e(rs,{node:N,dataColumns:jr,fieldMap:M,level:0,expandedKeys:Rt,onToggle:Ct,getValue:(G,K)=>{let pe=Or.get(K);return pe?sr(G,pe):0}},N.key)),ir&&e(rs,{node:ir,dataColumns:jr,fieldMap:M,level:0,expandedKeys:Rt,onToggle:Ct,getValue:(N,G)=>{let K=Or.get(G);return K?sr(N,K):0}})]})]})})}),c(Lt,{open:De,onClose:()=>Ce(false),maxWidth:"xs",fullWidth:true,children:[e("div",{className:"orb-dialog-title",children:g("pivot.preset.saveDialogTitle")}),e("div",{className:"orb-dialog-content",children:e(ze,{autoFocus:true,fullWidth:true,margin:"dense",label:g("pivot.preset.nameLabel"),value:Fe,onChange:N=>at(N.target.value),onKeyDown:N=>{N.key==="Enter"&&(N.preventDefault(),Ro());}})}),c("div",{className:"orb-dialog-actions",children:[e(ke,{onClick:()=>Ce(false),children:g("common.cancel")}),e(ke,{variant:"contained",onClick:Ro,disabled:!Fe.trim(),children:g("common.save")})]})]})]})};var cm=(t,o,r)=>{let n=[...t,...o];return r&&n.includes(r)?r:n[0]??""},Hl=(t,o)=>o&&t.some(r=>r.fieldId===o)?o:t[0]?.fieldId??"",dm=(t,o,r)=>r===""?"":r&&r!==o&&t.some(n=>n.fieldId===r)?r:t.find(n=>n.fieldId!==o)?.fieldId??"",LO=({fields:t,initialLayout:o,initialFilterSelections:r={},initialShowGrandTotal:n=true,initialConfiguratorCollapsed:a=false,initialChart:i,initialChartCollapsed:s=false,initialTableCollapsed:l=false})=>{let d=eo.useRef(0),p=eo.useMemo(()=>new Set(t.map(q=>q.id)),[t]),m=eo.useMemo(()=>new Map(t.map(q=>[q.id,q])),[t]),[f,h]=eo.useState(()=>lo(o?.rows,p)),[u,v]=eo.useState(()=>lo(o?.columns,p)),[y,g]=eo.useState(()=>lo(o?.filters,p)),[x,b]=eo.useState(()=>{let q=o?.values??[],De=new Set,Ce=[];return q.forEach(Fe=>{!p.has(Fe.fieldId)||De.has(Fe.fieldId)||(De.add(Fe.fieldId),d.current+=1,Ce.push({tokenId:`v${d.current}`,fieldId:Fe.fieldId,aggregation:Co(Fe.aggregation,m.get(Fe.fieldId))}));}),Ce}),[C,k]=eo.useState(r),[S,T]=eo.useState(n),[I,w]=eo.useState(a),[M,A]=eo.useState(()=>cm(lo(o?.rows,p),lo(o?.columns,p),i?.dimensionFieldId)),[R,D]=eo.useState(()=>{let q=(()=>{let De=o?.values??[],Ce=new Set,Fe=[];return De.forEach(at=>{!p.has(at.fieldId)||Ce.has(at.fieldId)||(Ce.add(at.fieldId),Fe.push({tokenId:at.fieldId,fieldId:at.fieldId,aggregation:Co(at.aggregation,m.get(at.fieldId))}));}),Fe})();return Hl(q,i?.primaryValueFieldId)}),[E,O]=eo.useState(()=>{let q=(()=>{let Ce=o?.values??[],Fe=new Set,at=[];return Ce.forEach(Ze=>{!p.has(Ze.fieldId)||Fe.has(Ze.fieldId)||(Fe.add(Ze.fieldId),at.push({tokenId:Ze.fieldId,fieldId:Ze.fieldId,aggregation:Co(Ze.aggregation,m.get(Ze.fieldId))}));}),at})(),De=Hl(q,i?.primaryValueFieldId);return dm(q,De,i?.secondaryValueFieldId)}),[_,J]=eo.useState(i?.chartType??"bar-vertical"),[F,V]=eo.useState(s),[z,X]=eo.useState(l);eo.useEffect(()=>{h(q=>{let De=q.filter(Ce=>p.has(Ce));return mr(q,De)?q:De}),v(q=>{let De=q.filter(Ce=>p.has(Ce));return mr(q,De)?q:De}),g(q=>{let De=q.filter(Ce=>p.has(Ce));return mr(q,De)?q:De}),b(q=>{let De=q.filter(Ce=>p.has(Ce.fieldId)).map(Ce=>({...Ce,aggregation:Co(Ce.aggregation,m.get(Ce.fieldId))}));return Qi(q,De)?q:De});},[m,p]),eo.useEffect(()=>{A(q=>cm(f,u,q));},[u,f]),eo.useEffect(()=>{D(q=>Hl(x,q));},[x]),eo.useEffect(()=>{O(q=>dm(x,R,q));},[R,x]);let W=eo.useCallback(q=>{h(lo(q,p));},[p]),H=eo.useCallback(q=>{v(lo(q,p));},[p]),U=eo.useCallback(q=>{g(lo(q,p));},[p]),Y=eo.useCallback(q=>{b(De=>{let Ce=q??[],Fe=new Set,at=[];return Ce.forEach(Ze=>{if(!p.has(Ze.fieldId)||Fe.has(Ze.fieldId))return;Fe.add(Ze.fieldId);let wt=De.find(Rt=>Rt.fieldId===Ze.fieldId);if(wt){at.push({...wt,aggregation:Co(Ze.aggregation??wt.aggregation,m.get(Ze.fieldId))});return}d.current+=1,at.push({tokenId:`v${d.current}`,fieldId:Ze.fieldId,aggregation:Co(Ze.aggregation,m.get(Ze.fieldId))});}),at});},[m,p]),ue=eo.useCallback(q=>{W(q.rows??[]),H(q.columns??[]),U(q.filters??[]),Y(q.values??[]);},[H,U,W,Y]),re=eo.useCallback(q=>{if(q==="rows")return h([]);if(q==="columns")return v([]);if(q==="filters")return g([]);b([]);},[]),ge=eo.useCallback((q,De)=>{if(q==="rows")return h(Ce=>Ce.filter(Fe=>Fe!==De));if(q==="columns")return v(Ce=>Ce.filter(Fe=>Fe!==De));if(q==="filters")return g(Ce=>Ce.filter(Fe=>Fe!==De));b(Ce=>Ce.filter(Fe=>Fe.tokenId!==De));},[]),we=eo.useCallback((q,De)=>{b(Ce=>Ce.map(Fe=>Fe.tokenId===q?{...Fe,aggregation:Co(De,m.get(Fe.fieldId))}:Fe));},[m]),Ve=eo.useCallback((q,De)=>{k(Ce=>({...Ce,[q]:De}));},[]),Te=eo.useCallback(()=>{k({});},[]),Ie=eo.useCallback(()=>{T(q=>!q);},[]),He=eo.useCallback(()=>{w(q=>!q);},[]),ce=eo.useCallback(q=>{A(q);},[]),be=eo.useCallback(q=>{D(q);},[]),We=eo.useCallback(q=>{O(q);},[]),tt=eo.useCallback(()=>{V(q=>!q);},[]),nt=eo.useCallback(()=>{X(q=>!q);},[]);return {model:eo.useMemo(()=>({rowFields:f,setRowFields:h,columnFields:u,setColumnFields:v,filterFields:y,setFilterFields:g,valueFields:x,setValueFields:b,filterSelections:C,setFilterSelections:k,showGrandTotal:S,setShowGrandTotal:T,isConfiguratorCollapsed:I,setIsConfiguratorCollapsed:w,chartDimensionFieldId:M,setChartDimensionFieldId:A,chartPrimaryValueFieldId:R,setChartPrimaryValueFieldId:D,chartSecondaryValueFieldId:E,setChartSecondaryValueFieldId:O,chartType:_,setChartType:J,isChartCollapsed:F,setIsChartCollapsed:V,isTableCollapsed:z,setIsTableCollapsed:X}),[M,R,E,_,u,y,C,F,I,z,f,S,x]),actions:{setRows:W,setColumns:H,setFilters:U,setValues:Y,setLayout:ue,clearZone:re,removeFieldFromZone:ge,setAggregationForValue:we,setFilterSelection:Ve,resetFilterSelections:Te,toggleGrandTotal:Ie,toggleConfigurator:He,setChartDimension:ce,setChartPrimaryValue:be,setChartSecondaryValue:We,setChartType:J,toggleChart:tt,toggleTable:nt}}};var HO=({orientation:t="auto",defaultNavigationOpen:o,onNavOpenChange:r}={})=>{let n=so(),a=xr("(orientation: portrait)"),i=xr(n.breakpoints.down("md")),s=eo.useMemo(()=>t==="auto"?a||i?"portrait":"landscape":t,[i,a,t]),[l,d]=eo.useState(o??s==="landscape");eo.useEffect(()=>{d(o??s==="landscape");},[o,s]);let p=f=>{d(f),r?.(f);};return {resolvedOrientation:s,isPortraitViewport:a,isCompactViewport:i,navigationOpen:l,setNavigationOpen:p,toggleNavigationOpen:()=>p(!l)}};var fy=t=>{let o=Number(t||0);return Number.isFinite(o)?o:0},WO=({rows:t,rowKey:o="id",numericField:r,defaultSelectedId:n})=>{let i=t[0]?.[o],[s,l]=eo.useState(n??i),d=eo.useMemo(()=>t.find(u=>u[o]===s)||t[0],[o,t,s]),[p,m]=eo.useState(()=>{let u=d?.[r];return u==null?"0":String(u)});return {selectedId:s,selectedRecord:d,editorValue:p,setEditorValue:m,selectRecord:u=>{let v=u[o];l(v);let y=u[r];m(y==null?"0":String(y));},applyEditorValue:u=>{if(s===void 0)return;let v=fy(p),y=t.map(g=>g[o]===s?{...g,[r]:v}:g);u(y);}}};P();var hy=["code_128","ean_13","ean_8","qr_code","upc_a","upc_e"],um=(t,o,r,n)=>{o?.(t),n&&r?.();},qO=({open:t,onClose:o,title:r="Scan barcode",subtitle:n="Use the rear camera on the device. If scanning is unavailable, enter the code manually.",formats:a=hy,facingMode:i="environment",manualEntry:s=true,autoCloseOnDetect:l=true,scanIntervalMs:d=600,confirmLabel:p="Use code",cancelLabel:m="Close",manualPlaceholder:f="Enter barcode manually",onDetected:h,onError:u,sx:v})=>{let y=eo__namespace.default.useRef(null),g=eo__namespace.default.useRef(null),x=eo__namespace.default.useRef(null),b=eo__namespace.default.useRef(null),[C,k]=eo__namespace.default.useState("idle"),[S,T]=eo__namespace.default.useState(""),[I,w]=eo__namespace.default.useState(null),[M,A]=eo__namespace.default.useState(null),R=eo__namespace.default.useCallback(()=>{x.current!==null&&(window.clearInterval(x.current),x.current=null),g.current&&(g.current.getTracks().forEach(O=>O.stop()),g.current=null),y.current&&(y.current.srcObject=null);},[]),D=eo__namespace.default.useCallback(O=>{A(O),k("error"),u?.(O);},[u]);eo__namespace.default.useEffect(()=>{if(!t){R(),k("idle"),A(null),T("");return}let O=false;return (async()=>{if(!(typeof window>"u"||typeof navigator>"u")){if(!navigator.mediaDevices?.getUserMedia){k("unsupported"),A("Camera access is not supported in this browser.");return}k("starting"),A(null);try{let J=await navigator.mediaDevices.getUserMedia({audio:!1,video:{facingMode:{ideal:i}}});if(O){J.getTracks().forEach(F=>F.stop());return}if(g.current=J,y.current&&(y.current.srcObject=J,await y.current.play()),!window.BarcodeDetector){k("unsupported"),A("BarcodeDetector is not available. Camera preview is ready and manual entry is enabled.");return}b.current=new window.BarcodeDetector({formats:a}),k("ready"),x.current=window.setInterval(async()=>{if(!(!y.current||!b.current)&&!(y.current.readyState<HTMLMediaElement.HAVE_CURRENT_DATA))try{let V=(await b.current.detect(y.current)).find(X=>X.rawValue);if(!V?.rawValue)return;let z={rawValue:V.rawValue,format:V.format};w(z),R(),um(z,h,o,l);}catch(F){D(F instanceof Error?F.message:"Failed to detect barcode.");}},d);}catch(J){D(J instanceof Error?J.message:"Unable to start camera.");}}})(),()=>{O=true,R();}},[l,i,a,o,h,t,D,d,R]);let E=()=>{let O=S.trim();if(!O)return;let _={rawValue:O,format:"manual"};w(_),um(_,h,o,l);};return c(Lt,{open:t,onClose:o,fullWidth:true,maxWidth:"sm",children:[e("div",{className:"orb-dialog-title",sx:{fontSize:"1rem",fontWeight:900},children:r}),e("div",{className:"orb-dialog-content",sx:{pt:"8px !important"},children:c(se,{spacing:2,sx:v,children:[e(L,{sx:{fontSize:"0.88rem",color:"text.secondary",lineHeight:1.55},children:n}),c(Ae,{elevation:0,sx:{position:"relative",overflow:"hidden",borderRadius:4,border:"1px solid",borderColor:"divider",minHeight:280,background:vt()==="dark"?"linear-gradient(180deg, color-mix(in oklch, var(--orb-canvas) 92%, transparent), color-mix(in oklch, var(--orb-canvas) 96%, transparent))":"linear-gradient(180deg, var(--orb-surface), color-mix(in oklch, var(--orb-border) 92%, transparent))"},children:[e("video",{ref:y,muted:true,playsInline:true,autoPlay:true,style:{width:"100%",height:280,objectFit:"cover",display:"block"}}),e("div",{sx:{pointerEvents:"none",position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:e("div",{sx:{width:"72%",maxWidth:320,aspectRatio:"1.7 / 1",borderRadius:3,border:"2px solid rgba(255,255,255,0.95)",boxShadow:"0 0 0 999px rgba(15,23,42,0.24)",position:"relative"},children:e("div",{sx:{position:"absolute",top:"50%",left:0,right:0,height:2,bgcolor:"var(--orb-ai-accent)",boxShadow:"0 0 18px color-mix(in oklch, var(--orb-ai-accent) 85%, transparent)"}})})}),c("div",{sx:{position:"absolute",top:12,left:12,display:"flex",gap:1,flexWrap:"wrap"},children:[e(xt,{icon:e(jd,{}),label:C==="ready"?"Camera ready":C==="starting"?"Starting camera":C==="unsupported"?"Preview only":C==="error"?"Scanner error":"Idle",size:"small",color:C==="error"?"error":"primary",variant:"filled"}),I?e(xt,{icon:e(hp,{}),label:`${I.format||"barcode"}: ${I.rawValue}`,size:"small",color:"success",variant:"filled"}):null]})]}),M?e(Jo,{severity:C==="unsupported"?"info":"warning",children:M}):null,s?c(se,{direction:{xs:"column",sm:"row"},spacing:1.25,children:[e(ze,{fullWidth:true,label:"Barcode",placeholder:f,value:S,onChange:O=>T(O.target.value)}),e(ke,{variant:"contained",onClick:E,sx:{minHeight:56,px:2.5},children:p})]}):null]})}),e("div",{className:"orb-dialog-actions",sx:{px:3,pb:2},children:e(ke,{onClick:o,children:m})})]})};P();var by={default:"var(--orb-status-fg)",primary:"var(--orb-status-primary)",success:"var(--orb-status-success)",warning:"var(--orb-status-warning)",error:"var(--orb-status-error)",info:"var(--orb-status-info)"},eF=({title:t,description:o,kicker:r,icon:n,badges:a=[],metrics:i=[],footer:s,children:l,selected:d=false,draggable:p=false,isDragging:m=false,swipeThreshold:f=88,startAction:h,endAction:u,dragHandleProps:v,onClick:y,onSwipe:g,sx:x})=>{let[b,C]=eo.useState(0),[k,S]=eo.useState(false),T=eo.useRef(null),I=eo.useRef(0),w=eo.useRef(0),M=!!(h||u),A=132,R=()=>{C(0),S(false),T.current=null,I.current=0,w.current=0;},D=F=>{(F==="start"?h:u)?.onTrigger?.(),g?.(F),R();},E=F=>{!M||F.target.closest('button, a, input, textarea, [data-no-swipe="true"]')||(T.current=F.pointerId,I.current=F.clientX,w.current=F.clientX,S(true),F.currentTarget.setPointerCapture(F.pointerId));},O=F=>{if(!k||T.current!==F.pointerId)return;w.current=F.clientX;let V=w.current-I.current,z=Math.max(-A,Math.min(A,V));C(z);},_=F=>{if(!k||T.current!==F.pointerId)return;let V=w.current-I.current;if(V>=f&&h){D("start");return}if(V<=-f&&u){D("end");return}Math.abs(V)<12&&y?.(),R();},J=(F,V)=>{if(!F)return null;let z=F.backgroundColor||by[F.tone||"default"];return e("div",{sx:{position:"absolute",top:0,bottom:0,[V]:0,width:A,px:2,display:"flex",alignItems:"center",justifyContent:V==="left"?"flex-start":"flex-end",color:"var(--orb-on-primary)",background:`linear-gradient(135deg, ${z}, rgba(15,23,42,0.92))`},children:c(se,{direction:"row",spacing:1,alignItems:"center",children:[F.icon,e(L,{sx:{fontWeight:700,fontSize:"0.95rem"},children:F.label})]})})};return c("div",{sx:{position:"relative",overflow:"hidden",borderRadius:4,...x},children:[J(h,"left"),J(u,"right"),e(Ae,{elevation:0,onPointerDown:E,onPointerMove:O,onPointerUp:_,onPointerCancel:R,sx:{position:"relative",zIndex:1,p:2,borderRadius:4,border:"1px solid",borderColor:d?"primary.main":"divider",background:vt()==="dark"?"linear-gradient(180deg, color-mix(in oklch, var(--orb-surface-3) 96%, transparent), color-mix(in oklch, var(--orb-canvas) 92%, transparent))":"linear-gradient(180deg, var(--orb-canvas), var(--orb-surface))",color:"text.primary",boxShadow:d?"0 18px 42px color-mix(in oklch, var(--orb-primary) 18%, transparent)":"0 12px 28px rgba(15, 23, 42, 0.08)",transform:`translate3d(${b}px, 0, 0) scale(${m?.985:1})`,transition:k?"none":"transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease",touchAction:"pan-y",cursor:y?"pointer":"default",opacity:m?.9:1},children:c(se,{spacing:1.5,children:[c(se,{direction:"row",spacing:1.5,alignItems:"flex-start",children:[n?e("div",{sx:{mt:.25},children:n}):null,c("div",{sx:{flex:1,minWidth:0},children:[r?e(L,{sx:{fontSize:"0.72rem",fontWeight:700,letterSpacing:"0.08em",color:"text.secondary"},children:r}):null,e(L,{sx:{fontSize:"1.05rem",fontWeight:800,lineHeight:1.25},children:t}),o?e(L,{sx:{mt:.5,fontSize:"0.9rem",color:"text.secondary",lineHeight:1.45},children:o}):null]}),p?e("div",{"data-no-swipe":"true",...v,sx:{alignSelf:"center",display:"inline-flex",touchAction:"none"},children:e(ie,{size:"small",children:e(ap,{})})}):null]}),a.length>0?e(se,{direction:"row",spacing:1,useFlexGap:true,flexWrap:"wrap",children:a.map((F,V)=>e(xt,{label:F,size:"small",sx:{borderRadius:999,fontWeight:700,bgcolor:"action.hover",color:"text.primary"}},V))}):null,i.length>0?e("div",{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(110px, 1fr))",gap:1},children:i.map(F=>c(Ae,{elevation:0,sx:{p:1.25,borderRadius:3,bgcolor:"action.hover",border:"1px solid",borderColor:"divider",color:"text.primary"},children:[e(L,{sx:{fontSize:"0.72rem",color:"text.secondary"},children:F.label}),e(L,{sx:{fontSize:"1rem",fontWeight:800,lineHeight:1.2},children:F.value})]},F.id))}):null,l,s]})})]})};P();var fa=({label:t,onPress:o,emphasis:r="default"})=>e("div",{component:"button",type:"button",onClick:o,sx:n=>({minHeight:72,borderRadius:3,border:"1px solid",borderColor:r==="primary"?"primary.main":"divider",background:r==="primary"?n.palette.primary.main:r==="danger"?vt()==="dark"?"color-mix(in oklch, var(--orb-status-error) 18%, transparent)":"color-mix(in oklch, var(--orb-status-error) 10%, transparent)":vt()==="dark"?"rgba(255,255,255,0.04)":"var(--orb-canvas)",color:r==="primary"?"var(--orb-on-primary)":"text.primary",fontSize:"1.25rem",fontWeight:800,transition:"transform 120ms ease, box-shadow 160ms ease, background-color 160ms ease",cursor:"pointer",appearance:"none",WebkitAppearance:"none",WebkitTapHighlightColor:"transparent","&:active":{transform:"scale(0.98)"}}),children:t}),lF=({value:t,defaultValue:o="",title:r,subtitle:n,placeholder:a="0",allowDecimal:i=false,allowNegative:s=false,maxLength:l,confirmLabel:d,clearLabel:p,backspaceLabel:m,onChange:f,onSubmit:h,onClose:u,sx:v})=>{let{t:y}=le(),[g,x]=eo.useState(o),b=t??g,C=R=>{t===void 0&&x(R),f?.(R);},k=R=>{l&&b.length>=l||C(`${b}${R}`);},S=R=>{if(R==="00"){if(!b){C("0");return}k("00");return}k(R);},T=()=>{!i||b.includes(".")||C(b?`${b}.`:"0.");},I=()=>{if(s){if(b.startsWith("-")){C(b.slice(1));return}C(b?`-${b}`:"-");}},w=()=>{C(b.slice(0,-1));},M=()=>{C("");},A=()=>{h?.(b);};return e(Ae,{elevation:0,sx:{p:2,borderRadius:4,border:"1px solid",borderColor:"divider",bgcolor:"background.paper",...v},children:c(se,{spacing:2,children:[c(se,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",children:[c("div",{sx:{minWidth:0},children:[r?e(L,{sx:{fontSize:"1rem",fontWeight:800},children:r}):null,n?e(L,{sx:{mt:.5,fontSize:"0.86rem",color:"text.secondary"},children:n}):null]}),u?e(ie,{onClick:u,size:"small",children:e(rp,{})}):null]}),e(Ae,{elevation:0,sx:{p:2,borderRadius:3,border:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:e(L,{sx:{minHeight:38,fontSize:b?"1.9rem":"1.25rem",fontWeight:900,letterSpacing:"0.06em",color:b?"text.primary":"text.disabled"},children:b||a})}),c("div",{sx:{display:"grid",gridTemplateColumns:"repeat(3, minmax(0, 1fr))",gap:1.25},children:[["1","2","3","4","5","6","7","8","9"].map(R=>e(fa,{label:R,onPress:()=>S(R)},R)),e(fa,{label:s?"+/-":"00",onPress:s?I:()=>S("00")}),e(fa,{label:"0",onPress:()=>S("0")}),e(fa,{label:i?".":m?String(m):"DEL",onPress:i?T:w})]}),c("div",{sx:{display:"grid",gridTemplateColumns:"repeat(3, minmax(0, 1fr))",gap:1.25},children:[e("div",{component:"button",type:"button",onClick:w,sx:{minHeight:64,borderRadius:3,border:"1px solid",borderColor:"divider",bgcolor:"background.paper",cursor:"pointer",appearance:"none",WebkitAppearance:"none",WebkitTapHighlightColor:"transparent"},children:c(se,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:[e(Zd,{}),e(L,{sx:{fontWeight:700},children:m||"DEL"})]})}),e(fa,{label:String(p||"CLR"),onPress:M,emphasis:"danger"}),e("div",{component:"button",type:"button",onClick:A,sx:R=>({minHeight:64,borderRadius:3,border:"1px solid",borderColor:"primary.main",background:R.palette.primary.main,color:"var(--orb-on-primary)",cursor:"pointer",appearance:"none",WebkitAppearance:"none",WebkitTapHighlightColor:"transparent"}),children:c(se,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:[e(Jd,{}),e(L,{sx:{fontWeight:800},children:d||y("common.ok")})]})})]})]})})};P();var gm=({touchMode:t="comfortable",sx:o,...r})=>{let n=t==="expanded";return e("div",{sx:{"& .orb-card":{borderRadius:4},"& .orb-autocomplete":{minWidth:{xs:"100%",md:260}},"& .orb-autocomplete .orb-inp-adornment-wrap, & .orb-inp":{backgroundColor:"transparent !important"},"& .orb-inp-adornment-wrap, & .orb-inp":{minHeight:n?56:50,borderRadius:3,fontSize:n?"0.98rem":"0.92rem"},"& .orb-inp":{py:n?1.6:1.25,fontSize:n?"0.98rem":"0.92rem"},"& label":{fontSize:n?"0.95rem":"0.88rem"},"& .orb-btn":{minHeight:n?48:44,px:n?2.25:1.75,borderRadius:3,fontSize:n?"0.95rem":"0.88rem",fontWeight:700},"& .orb-icon-btn":{width:n?40:36,height:n?40:36},"& .orb-menu-item, & option":{minHeight:n?44:38,fontSize:n?"0.95rem":"0.88rem"},"& .orb-list-subheader":{py:1},"& .orb-chk":{p:n?1:.75},"& .orb-form-control-label > span":{fontSize:n?"0.95rem":"0.88rem"},"& .orb-dialog":{borderRadius:4},"& .orb-dialog-title":{fontSize:n?"1.05rem":"0.98rem",fontWeight:800},"& .orb-dialog-content .orb-inp-adornment-wrap, & .orb-inp":{minHeight:52},"& .orb-grid > *":{minWidth:0},...o},children:e(_o,{...r})})};P();var wy=(t,o,r)=>{if(r?.(o),!!o.href){if(o.href.startsWith("http://")||o.href.startsWith("https://")){window.open(o.href,"_blank");return}t.push(o.href);}},fm=({items:t,selectedId:o,orientation:r="auto",onItemSelect:n,sx:a})=>{let i=so(),[s,l]=eo.useState(false);eo.useEffect(()=>{l(true);},[]);let d=xr("(orientation: portrait)"),p=xr(i.breakpoints.down("md")),m=r==="auto"?d||p?"portrait":"landscape":r,f=navigation.useRouter();return e("div",{sx:{display:"grid",gridTemplateColumns:!s||m==="portrait"?"repeat(2, minmax(0, 1fr))":"repeat(auto-fit, minmax(180px, 1fr))",gap:1.5,...a},children:t.map(h=>{let u=h.id===o,v=h.color||(u?i.palette.primary.main:i.palette.divider);return e(Ae,{elevation:0,sx:{overflow:"hidden",borderRadius:4,border:"1px solid",borderColor:u?"primary.main":"divider",boxShadow:u?"0 18px 40px color-mix(in oklch, var(--orb-primary) 16%, transparent)":"none",bgcolor:vt()==="dark"?"color-mix(in oklch, var(--orb-surface-3) 60%, transparent)":"background.paper"},children:e("div",{component:"button",type:"button",disabled:h.disabled,onClick:()=>wy(f,h,n),sx:{width:"100%",p:2,minHeight:m==="portrait"?156:148,display:"block",border:0,background:"transparent",textAlign:"left",cursor:h.disabled?"not-allowed":"pointer",appearance:"none",WebkitAppearance:"none",WebkitTapHighlightColor:"transparent",color:"text.primary"},children:c(se,{spacing:1.5,sx:{height:"100%"},children:[c(se,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",children:[e("div",{sx:{width:44,height:44,borderRadius:3,display:"grid",placeItems:"center",color:u?"var(--orb-on-primary)":"text.primary",background:u?v:"action.hover"},children:h.icon||e(L,{sx:{fontSize:"1rem",fontWeight:900},children:h.title.slice(0,1).toUpperCase()})}),h.badge!==void 0?e("div",{sx:{minWidth:34,px:1,py:.4,borderRadius:999,bgcolor:u?"primary.main":"action.hover",color:u?"var(--orb-on-primary)":"text.secondary",textAlign:"center",fontWeight:800,fontSize:"0.8rem"},children:h.badge}):null]}),c("div",{sx:{flex:1,minWidth:0},children:[e(L,{sx:{fontSize:"1rem",fontWeight:800,lineHeight:1.25},children:h.title}),h.caption?e(L,{sx:{mt:.5,fontSize:"0.74rem",fontWeight:700,color:"text.secondary"},children:h.caption}):null,h.description?e(L,{sx:{mt:.75,fontSize:"0.84rem",lineHeight:1.45,color:"text.secondary"},children:h.description}):null]})]})})},h.id)})})};P();var vm=(t,o)=>o.trim()?t.reduce((r,n)=>{let a=n.title?.toLowerCase().includes(o.toLowerCase())||n.label?.toLowerCase().includes(o.toLowerCase())||n.description?.toLowerCase().includes(o.toLowerCase()),i=n.children?vm(n.children,o):[];return (a||i.length>0)&&r.push({...n,children:i.length>0?i:n.children}),r},[]):t,Ty=t=>{let o=new Set,r=n=>{n.forEach(a=>{a.children?.length&&(o.add(a.id),r(a.children));});};return r(t),o},ym=({collapsed:t=false,onToggle:o,className:r="",maxHeight:n,menuData:a=[],colorMode:i="light",orientation:s="auto",headerSlot:l,footerSlot:d,activeHref:p,onItemSelect:m})=>{let{t:f}=le(),h=so(),u=No("(orientation: portrait)"),v=No(h.breakpoints.down("md")),y=s==="auto"?u||v?"portrait":"landscape":s,g=i==="dark",x=navigation.useRouter(),b=navigation.usePathname(),[C,k]=eo.useState(""),[S,T]=eo.useState(new Set),I=eo.useMemo(()=>vm(a,C),[a,C]),w=eo.useMemo(()=>C.trim()?Ty(I):S,[S,I,C]);eo.useEffect(()=>{t&&T(new Set);},[t]);let M=O=>O.appurl||O.href||"",A=O=>{m?.(O);let _=M(O);if(_){if(_.startsWith("http://")||_.startsWith("https://")){window.open(_,"_blank");return}x.push(_);}},R=O=>{let _=!!O.children?.length;if(t&&_){o?.();return}if(_){T(J=>{let F=new Set(J);return F.has(O.id)?F.delete(O.id):F.add(O.id),F});return}A(O);},D=O=>{let _=p||b,J=M(O);return !!(J&&_===J)},E=(O,_=0)=>{let J=!!O.children?.length,F=w.has(O.id),V=D(O);return e("div",{sx:{pl:_===0?0:1.5},children:c(Ae,{elevation:0,sx:{mb:1,overflow:"hidden",borderRadius:3,border:"1px solid",borderColor:V?"primary.main":"divider",bgcolor:V?"action.selected":"background.paper"},children:[c("div",{component:"button",type:"button",onClick:()=>R(O),sx:{width:"100%",px:1.5,py:1.4,display:"flex",alignItems:"center",gap:1.25,border:0,background:"transparent",textAlign:"left",cursor:"pointer",appearance:"none",WebkitAppearance:"none",WebkitTapHighlightColor:"transparent"},children:[e(ri,{variant:"rounded",sx:{width:40,height:40,bgcolor:V?"primary.main":"action.hover",color:V?"var(--orb-on-primary)":"text.primary"},children:O.icon||(O.title||O.label||"?").slice(0,1).toUpperCase()}),c("div",{sx:{flex:1,minWidth:0},children:[e(L,{sx:{fontSize:"0.95rem",fontWeight:800,lineHeight:1.2},children:O.title||O.label}),O.description?e(L,{sx:{mt:.4,fontSize:"0.78rem",color:"text.secondary",lineHeight:1.35},children:O.description}):null]}),J?e(an,{sx:{transform:F?"rotate(180deg)":"rotate(0deg)",transition:"transform 180ms ease"}}):e(si,{color:"action"})]}),J?e(nn,{in:F,children:e("div",{sx:{px:1.25,pb:1.25},children:O.children?.map(z=>E(z,_+1))})}):null]})},O.id)};return t?e(Ae,{elevation:0,className:r,sx:{width:y==="portrait"?"100%":88,p:1,borderRadius:4,border:"1px solid",borderColor:"divider",bgcolor:g?"var(--orb-surface)":"color-mix(in oklch, var(--orb-canvas) 88%, transparent)",maxHeight:n?`${n}px`:void 0,overflowY:"auto"},children:c(se,{spacing:1,children:[e(ie,{onClick:o,sx:{width:48,height:48,alignSelf:"center",bgcolor:"action.hover"},title:f("navigation.expand"),children:e(mi,{})}),a.map(O=>e(ie,{onClick:()=>R(O),sx:{width:56,height:56,alignSelf:"center",borderRadius:3,bgcolor:D(O)?"primary.main":"action.hover",color:D(O)?"var(--orb-on-primary)":"text.primary"},children:O.icon||(O.title||O.label||"?").slice(0,1).toUpperCase()},O.id))]})}):e(Ae,{elevation:0,className:r,sx:{width:y==="portrait"?"100%":320,p:1.25,borderRadius:5,border:"1px solid",borderColor:"divider",bgcolor:g?"var(--orb-surface)":"color-mix(in oklch, var(--orb-canvas) 88%, transparent)",maxHeight:n?`${n}px`:void 0,overflow:"hidden",display:"flex",flexDirection:"column"},children:c(se,{spacing:1.25,sx:{flex:1,minHeight:0},children:[c(se,{direction:"row",spacing:1,alignItems:"center",children:[e(ze,{value:C,onChange:O=>k(O.target.value),placeholder:f("navigation.searchPlaceholder"),size:"small",fullWidth:true,InputProps:{startAdornment:e(bp,{fontSize:"small",color:"action"})}}),y==="landscape"&&!t?e(ie,{onClick:o,sx:{bgcolor:"action.hover"},children:e(up,{})}):null]}),l,e("div",{sx:{flex:1,minHeight:0,overflowY:"auto",pr:.25},children:I.length>0?I.map(O=>E(O)):e(L,{sx:{p:2,fontSize:"0.88rem",color:"text.secondary",textAlign:"center"},children:f("navigation.noMatch")})}),d]})})};P();var Cm=(t,o)=>{let r=o[t.id];if(t.render)return t.render(r,o);if(r==null||r==="")return "--";if(t.numeric){if(typeof r=="number")return r.toLocaleString();if(typeof r=="string"&&r.trim()!==""&&!Number.isNaN(Number(r)))return Number(r).toLocaleString()}return String(r)},Iy=t=>eo__namespace.default.isValidElement(t)?e("div",{sx:{display:"inline-flex",alignItems:"center"},children:t}):e(L,{sx:{mt:.2,fontSize:"0.88rem",fontWeight:800},children:t}),Ry=(t,o)=>{let r=o[t.id];if(r==null||r==="")return "--";if(t.numeric){if(typeof r=="number")return r.toLocaleString();if(typeof r=="string"&&r.trim()!==""&&!Number.isNaN(Number(r)))return Number(r).toLocaleString()}return String(r)},My=({summaryRow:t,visibleColumns:o,columns:r})=>{let n=r.filter(a=>o.includes(a.id)&&t[a.id]!=="");return n.length===0?null:e(Ae,{elevation:0,sx:{p:1.5,borderRadius:4,border:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:c(se,{spacing:1,children:[e(L,{sx:{fontSize:"0.82rem",fontWeight:800,color:"text.secondary"},children:"Summary"}),e("div",{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(132px, 1fr))",gap:1},children:n.map(a=>c(Ae,{elevation:0,sx:{p:1.1,borderRadius:3,border:"1px solid",borderColor:"divider"},children:[e(L,{sx:{fontSize:"0.72rem",color:"text.secondary"},children:a.label}),e(L,{sx:{mt:.25,fontSize:"0.96rem",fontWeight:800},children:t[a.id]})]},`summary-${a.id}`))})]})})},Dy=t=>{let{t:o}=le(),r=so(),{title:n,showToolbar:a=true,selectionMode:i,selected:s=[],onSelectionChange:l,actions:d,extraTools:p,fitContainer:m=false,fullWidth:f=false,maxHeight:h,loading:u=false,rowsPerPageOptions:v=[20,50,100,-1],onLayoutSave:y,filterConfig:g,rowKey:x,tableKey:b="default",graphReport:C,quickCreate:k,quickEdit:S,quickDelete:T,serviceUrl:I,orientation:w="auto",cardTitleField:M,cardSubtitleFields:A,toolbarSlot:R,emptyState:D,rowHeight:E="comfortable",cardActionSlot:O,renderCardFooter:_,onRowClick:J}=t,F=n||o("table.title.default"),V=No("(orientation: portrait)"),z=No(r.breakpoints.down("md")),X=w==="auto"?V||z?"portrait":"landscape":w,{columns:W,filterText:H,setFilterText:U,visibleColumns:Y,showSummary:ue,setShowSummary:re,summaryColumns:ge,grouping:we,setGrouping:Ve,expandedGroups:Te,groupAnchorEl:Ie,setGroupAnchorEl:He,summaryAnchorEl:ce,setSummaryAnchorEl:be,anchorEl:We,setAnchorEl:tt,contextMenu:nt,sortedAndFilteredRows:it,summaryRow:q,visibleRows:De,page:Ce,setPage:Fe,rowsPerPage:at,setRowsPerPage:Ze,totalDisplayCount:wt,setSelected:Rt,handleClick:Ot,toggleSummaryColumn:At,handleExport:oe,handleCloseContextMenu:Ke,toggleColumnVisibility:Oe,toggleGroupExpand:de,handleExpandGroupRecursively:ye,handleCollapseGroupRecursively:te,handleLayoutLoad:ve,handleVariantLoad:Ne,handleLayoutSave:Je,effectiveAppId:st,currentLayoutData:pt,currentLayoutId:Bt,layoutIdToLoad:Yt,graphReportOpen:Vt,handleOpenGraphReport:St,handleCloseGraphReport:Wt}=bn(t),bt=C?.enabled??false,Nt=bt&&(C?.interaction?.enabled??true),lt=Ai(),Ft=x||"id",Zt=eo__namespace.default.useMemo(()=>({borderRadius:999,fontWeight:700,borderColor:ot(r.palette.divider,vt()==="dark"?.55:.3),bgcolor:vt()==="dark"?ot(r.palette.common.white,.06):ot(r.palette.background.paper,.92),color:r.palette.text.primary,"& .orb-chip-label":{px:1.05}}),[r]),Z=eo__namespace.default.useMemo(()=>({...Zt,borderColor:ot(r.palette.primary.main,vt()==="dark"?.42:.24),bgcolor:vt()==="dark"?ot(r.palette.primary.main,.16):ot(r.palette.primary.main,.08)}),[Zt,r]),$=eo__namespace.default.useMemo(()=>{let ee=new Set(s);return it.filter(Le=>ee.has(Le?.[Ft]))},[Ft,s,it]),j=$.length===1?$[0]:null,he=!!k?.enabled,xe=!!S?.enabled,Ee=!!T?.enabled,_e=k?.fields,qe=k?.excludeFields||[],je=k?.initialValues||{},mt=S?.fields,ft=S?.excludeFields||[],Mt=S?.editableFields||[],yt=S?.nonEditableFields||[],B=S?.primaryKeys?.length?S.primaryKeys:[Ft],[Q,fe]=eo__namespace.default.useState(false),[Pe,et]=eo__namespace.default.useState(false),[Xe,kt]=eo__namespace.default.useState({}),[ht,gt]=eo__namespace.default.useState(false),[Ct,no]=eo__namespace.default.useState(false),[Et,jt]=eo__namespace.default.useState({}),[Ht,Kt]=eo__namespace.default.useState(false),[$t,oo]=eo__namespace.default.useState(false),ao=u||Pe||Ct||$t,bo=eo__namespace.default.useMemo(()=>{let ee=[...W];if(Array.isArray(_e)&&_e.length>0){let Le=new Set(_e);ee=ee.filter(Qe=>Le.has(Qe.id));}if(qe.length>0){let Le=new Set(qe);ee=ee.filter(Qe=>!Le.has(Qe.id));}return ee.filter(Le=>!!Le?.id)},[W,qe,_e]),Ro=eo__namespace.default.useMemo(()=>{let ee=[...W];if(Array.isArray(mt)&&mt.length>0){let Le=new Set(mt);ee=ee.filter(Qe=>Le.has(Qe.id));}if(ft.length>0){let Le=new Set(ft);ee=ee.filter(Qe=>!Le.has(Qe.id));}return ee.filter(Le=>!!Le?.id)},[W,ft,mt]),Mo=eo__namespace.default.useMemo(()=>new Set(B),[B]),ir=eo__namespace.default.useMemo(()=>new Set(Mt),[Mt]),xo=eo__namespace.default.useMemo(()=>new Set(yt),[yt]),Bo=eo__namespace.default.useCallback(ee=>ir.size>0?ir.has(ee):!(xo.has(ee)||Mo.has(ee)),[ir,xo,Mo]);eo__namespace.default.useEffect(()=>{!Vt&<.hasActiveFilters&<.clearAll();},[lt,Vt]);let qr=()=>{let ee={};bo.forEach(Le=>{ee[Le.id]=je[Le.id]??"";}),kt(ee),fe(true);},Xr=(ee,Le)=>{kt(Qe=>({...Qe,[ee]:Le}));},Lr=async()=>{if(!k?.onSubmit){fe(false);return}try{et(!0),await k.onSubmit(Xe),fe(!1);}finally{et(false);}},Yr=()=>{if(!j)return;let ee={};Ro.forEach(Qe=>{ee[Qe.id]=j[Qe.id]??"";});let Le=S?.getInitialValues?{...ee,...S.getInitialValues(j)}:ee;jt(Le),gt(true);},Zr=(ee,Le)=>{jt(Qe=>({...Qe,[ee]:Le}));},Do=async()=>{if(j){if(!S?.onSubmit){gt(false);return}try{no(!0),await S.onSubmit(Et,j),gt(!1);}finally{no(false);}}},Or=()=>{$.length!==0&&Kt(true);},jr=async()=>{if($.length===0){Kt(false);return}if(!T?.onConfirm){Kt(false),Rt([]),l?.([]);return}try{oo(!0),await T.onConfirm($),Kt(!1),Rt([]),l?.([]);}finally{oo(false);}},Xo=it,{fieldMapping:sr}=mn({rows:Xo,config:{...C,title:C?.title||`${F} ${o("graph.reportTitle")}`}}),On=eo__namespace.default.useMemo(()=>Nt?lt.applyRows(Xo,sr):Xo,[sr,lt,Nt,Xo]),{model:Fr}=mn({rows:On,config:{...C,title:C?.title||`${F} ${o("graph.reportTitle")}`,fieldMapping:sr}}),N=Fr.table.columns.map(ee=>({id:ee.id,label:ee.label,align:ee.align||"left",minWidth:120,numeric:ee.align==="right"})),G=st?e(hn,{appId:st,tableKey:b,currentLayoutData:pt,onLayoutLoad:ve,targetLayoutId:Yt,activeLayoutId:Bt,serviceUrl:I??g?.serviceUrl}):null,K=W.filter(ee=>Y.includes(ee.id)),pe=K.find(ee=>ee.id===M)||K[0],Be=A?.map(ee=>K.find(Le=>Le.id===ee)).filter(Boolean)||K.filter(ee=>ee.id!==pe?.id).slice(0,X==="portrait"?2:3),rt=K.filter(ee=>ee.id!==pe?.id&&!Be.some(Le=>Le.id===ee.id)),Ge=[R,p].filter(Boolean),ne=c(jsxRuntime.Fragment,{children:[e(pn,{groupAnchorEl:Ie,setGroupAnchorEl:He,grouping:we,setGrouping:Ve,columns:W}),e(un,{anchorEl:We,setAnchorEl:tt,columns:W,visibleColumns:Y,toggleColumnVisibility:Oe}),e(ki,{anchorEl:ce,setAnchorEl:be,showSummary:ue,setShowSummary:re,columns:W,summaryColumns:ge,toggleSummaryColumn:At}),e(Pi,{contextMenu:nt,handleCloseContextMenu:Ke,columns:W,visibleColumns:Y,toggleColumnVisibility:Oe})]}),me=(ee,Le,Qe)=>{let Me=s.includes(Le),Ye=X==="portrait"?"repeat(2, minmax(0, 1fr))":"repeat(auto-fit, minmax(140px, 1fr))",Pt=Qe%2===0?ot(r.palette.primary.main,vt()==="dark"?.09:.04):ot(r.palette.primary.main,vt()==="dark"?.05:.022),Qr=ot(r.palette.divider,.22);return e(Ae,{elevation:0,onClick:()=>{Ot({},ee),J?.(ee);},sx:{p:E==="compact"?1.25:1.5,borderRadius:4,border:"0.5px solid",borderColor:Me?ot(r.palette.primary.main,.38):Qr,background:Me?`linear-gradient(135deg, ${ot(r.palette.primary.main,.13)}, ${ot(r.palette.primary.main,.06)})`:`linear-gradient(135deg, ${Pt}, ${ot(r.palette.primary.main,.015)})`,boxShadow:Me?`0 12px 30px ${ot(r.palette.primary.main,.2)}`:`0 3px 10px ${ot(r.palette.common.black,.045)}`,cursor:"pointer",position:"relative",overflow:"hidden",transition:"border-color 160ms ease, box-shadow 160ms ease, transform 120ms ease, background 160ms ease","&::before":{content:'""',position:"absolute",left:0,top:0,bottom:0,width:4,background:Me?r.palette.primary.main:Qe%2===0?ot(r.palette.primary.main,.26):ot(r.palette.text.primary,.16)},"&:hover":{boxShadow:`0 10px 20px ${ot(r.palette.primary.main,.12)}`,transform:"translateY(-1px)"},"&:active":{transform:"scale(0.995)"}},children:c(se,{spacing:1.25,children:[c(se,{direction:"row",spacing:1.25,alignItems:"flex-start",children:[i?e(It,{checked:Me,onClick:So=>So.stopPropagation(),onChange:()=>Ot({},ee),sx:{mt:-0.6,ml:-0.6}}):null,c("div",{sx:{flex:1,minWidth:0},children:[pe?e(L,{sx:{fontSize:"1rem",fontWeight:900,lineHeight:1.25},children:Cm(pe,ee)}):null,Be.length>0?e(se,{direction:"row",spacing:.75,useFlexGap:true,flexWrap:"wrap",sx:{mt:.75},children:Be.map(So=>e(xt,{label:`${So.label}: ${Ry(So,ee)}`,size:"small",variant:"outlined",sx:Zt},`${Le}-${So.id}`))}):null]}),O?e("div",{onClick:So=>So.stopPropagation(),children:O(ee)}):null]}),rt.length>0?e("div",{sx:{display:"grid",gridTemplateColumns:Ye,gap:1},children:rt.map(So=>c(Ae,{elevation:0,sx:{p:1,borderRadius:3,bgcolor:vt()==="dark"?ot(r.palette.background.default,.7):ot(r.palette.background.paper,.92),border:"0.1px solid",borderColor:ot(r.palette.divider,.24)},children:[e(L,{sx:{fontSize:"0.72rem",color:"text.secondary"},children:So.label}),Iy(Cm(So,ee))]},`${Le}-${So.id}-detail`))}):null,_?c(jsxRuntime.Fragment,{children:[e(Dt,{}),e("div",{onClick:So=>So.stopPropagation(),children:_(ee)})]}):null]})},Le)};return c("div",{sx:{width:f?"100%":"auto",mb:m?0:2,...m?{flex:1,display:"flex",flexDirection:"column",minHeight:0,height:"100%",overflow:"hidden"}:{}},children:[g?e("div",{sx:{mb:2},children:e(gm,{...g,onVariantLoad:ee=>{Ne(ee),g.onVariantLoad?.(ee);},appId:g.appId,tableKey:b,currentLayout:[{tableKey:b,layoutData:pt}],currentLayoutId:Bt,layoutRefs:[{tableKey:b,layoutId:Bt}],variantService:g.variantService,serviceUrl:I??g.serviceUrl,touchMode:X==="portrait"?"expanded":"comfortable"})}):null,c(Ae,{sx:{width:f?"100%":"auto",mb:m?0:2,display:"flex",flexDirection:"column",overflow:"hidden",position:"relative",bgcolor:"transparent",backgroundImage:"none",boxShadow:"none","&::before":ao?{content:'""',position:"absolute",top:0,left:0,width:"100%",height:"3px",background:"linear-gradient(90deg, color-mix(in oklch, var(--orb-primary) 0%, transparent) 0%, color-mix(in oklch, var(--orb-primary) 25%, transparent) 25%, var(--orb-primary) 50%, color-mix(in oklch, var(--orb-primary) 25%, transparent) 75%, color-mix(in oklch, var(--orb-primary) 0%, transparent) 100%)",backgroundSize:"220% 100%",animation:"cTableTopMarquee 1.2s linear infinite",zIndex:6,pointerEvents:"none"}:{},"@keyframes cTableTopMarquee":{"0%":{backgroundPosition:"220% 0"},"100%":{backgroundPosition:"-120% 0"}},...h?{height:h}:m?{flex:1,minHeight:0,height:"100%"}:{}},children:[a?e("div",{sx:{"& .orb-toolbar":{minHeight:60,alignItems:{xs:"flex-start",md:"center"},flexWrap:"wrap",rowGap:1,columnGap:1},"& .orb-toolbar > :nth-of-type(1)":{width:{xs:"100%",md:"auto"},"& .orb-fld":{width:{xs:"100%",md:300}}},"& .orb-toolbar > :nth-of-type(2)":{flexShrink:0},"& .orb-toolbar > :nth-of-type(3)":{display:{xs:"none",md:"block"}},"& .orb-toolbar > :nth-of-type(4)":{ml:"auto",justifyContent:"flex-end",flexWrap:"wrap"},"& .orb-inp-adornment-wrap, & .orb-inp":{minHeight:46},"& .orb-icon-btn":{width:40,height:40},"& .orb-body, & .orb-body-dense, & .orb-label, & .orb-meta":{fontSize:"0.9rem"},"& button":{borderRadius:2.5}},children:e(Ci,{filterText:H,setFilterText:U,onRowsPerPageChange:Ze,rowsPerPage:at,rowsPerPageOptions:v,page:Ce,count:wt,onPageChange:Fe,actions:d,extraTools:Ge,grouping:we,setGroupAnchorEl:He,showSummary:ue,setShowSummary:re,setAnchorEl:tt,setSummaryAnchorEl:be,handleExport:oe,showCreateButton:he,onOpenCreateDialog:qr,showEditButton:xe,onOpenEditDialog:Yr,editDisabled:$.length!==1,showDeleteButton:Ee,onOpenDeleteConfirm:Or,deleteDisabled:$.length===0,onLayoutSave:y||g?.variantService&&g?.appId?Je:void 0,loading:u,layoutManager:G,onOpenGraphReport:bt?St:void 0})}):null,e("div",{sx:{flex:1,minHeight:0,overflow:"auto",p:1.5},children:c(se,{spacing:1.25,children:[De.length===0&&!u?D||e(Ae,{elevation:0,sx:{p:4,borderRadius:4,border:"1px dashed",borderColor:"divider",textAlign:"center"},children:e(L,{sx:{fontSize:"0.92rem",color:"text.secondary"},children:o("common.noData")})}):null,De.map((ee,Le)=>{if(ee.type==="group"){let Ye=Te.has(ee.id);return e(Ae,{elevation:0,sx:{borderRadius:4,border:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:c("div",{component:"button",type:"button",onClick:()=>de(ee.id),sx:{width:"100%",px:1.5,py:1.3,border:0,background:"transparent",display:"flex",alignItems:"center",gap:1,textAlign:"left",cursor:"pointer",appearance:"none",WebkitAppearance:"none",color:"text.primary"},children:[Ye?e(an,{}):e(si,{}),c("div",{sx:{flex:1,minWidth:0},children:[c(L,{sx:{fontSize:"0.94rem",fontWeight:800},children:[ee.field,": ",ee.value]}),c(L,{sx:{mt:.2,fontSize:"0.76rem",color:"text.secondary"},children:[ee.count," records"]})]}),we.length>1&&ee.level<we.length-1?c(se,{direction:"row",spacing:.5,children:[e(xt,{size:"small",label:o("table.group.expandAll"),onClick:Pt=>{Pt.stopPropagation(),ye(ee.id);},sx:Z}),e(xt,{size:"small",label:o("table.group.collapseAll"),onClick:Pt=>{Pt.stopPropagation(),te(ee.id);},sx:Z})]}):null]})},ee.id)}let Qe=ee.data||ee,Me=ee.id||Qe[Ft]||Le;return me(Qe,Me,Le)}),ue?e(My,{summaryRow:q,visibleColumns:Y,columns:W}):null,u?e(L,{sx:{py:1,fontSize:"0.84rem",color:"text.secondary",textAlign:"center"},children:o("common.loading")}):null]})})]}),he?c(Lt,{open:Q,onClose:()=>!Pe&&fe(false),fullWidth:true,maxWidth:"sm",children:[e("div",{className:"orb-dialog-title",sx:{fontSize:"1rem",fontWeight:800},children:k?.title||o("quickCreate.createWithTitle",{title:F})}),e("div",{className:"orb-dialog-content",sx:{pt:"8px !important"},children:c("div",{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[bo.map(ee=>{let Le=ee.type==="number"||ee.numeric?"number":ee.type==="date"?"date":"text";return e(ze,{label:ee.label||ee.id,value:Xe[ee.id]??"",onChange:Qe=>Xr(ee.id,Qe.target.value),type:Le,fullWidth:true,InputLabelProps:{shrink:Le==="date"?true:void 0}},`quick-create-${ee.id}`)}),k?.description?e(Jo,{severity:"info",children:k.description}):null]})}),c("div",{className:"orb-dialog-actions",sx:{px:3,pb:2},children:[e(ke,{onClick:()=>fe(false),disabled:Pe,children:k?.cancelLabel||o("common.cancel")}),e(ke,{onClick:Lr,variant:"contained",disabled:Pe,children:k?.submitLabel||o("common.save")})]})]}):null,xe?c(Lt,{open:ht,onClose:()=>!Ct&>(false),fullWidth:true,maxWidth:"sm",children:[e("div",{className:"orb-dialog-title",sx:{fontSize:"1rem",fontWeight:800},children:S?.title||o("quickEdit.editWithTitle",{title:F})}),e("div",{className:"orb-dialog-content",sx:{pt:"8px !important"},children:c("div",{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[Ro.map(ee=>{let Le=ee.type==="number"||ee.numeric?"number":ee.type==="date"?"date":"text";return e(ze,{label:ee.label||ee.id,value:Et[ee.id]??"",onChange:Qe=>Zr(ee.id,Qe.target.value),type:Le,disabled:!Bo(ee.id),fullWidth:true,InputLabelProps:{shrink:Le==="date"?true:void 0}},`quick-edit-${ee.id}`)}),S?.description?e(Jo,{severity:"info",children:S.description}):null]})}),c("div",{className:"orb-dialog-actions",sx:{px:3,pb:2},children:[e(ke,{onClick:()=>gt(false),disabled:Ct,children:S?.cancelLabel||o("common.cancel")}),e(ke,{onClick:Do,variant:"contained",disabled:Ct||!j,children:S?.submitLabel||o("common.save")})]})]}):null,Ee?e(Qn,{open:Ht,type:"warning",title:T?.title||o("quickDelete.confirmTitle"),message:T?.message||($.length>1?o("quickDelete.confirmMessageMultiple",{count:$.length}):o("quickDelete.confirmMessageSingle")),confirmText:T?.confirmText||o("common.delete"),cancelText:T?.cancelText||o("common.cancel"),onClose:()=>!$t&&Kt(false),onConfirm:jr}):null,ne,bt?e(Di,{open:Vt,onClose:Wt,model:Fr,aiAssistant:C?.aiAssistant,interaction:Nt?{enabled:true,filters:lt.filters,fieldMapping:sr,onPrimaryDimensionClick:ee=>lt.setFilter("primaryDimension",ee),onSecondaryDimensionClick:ee=>lt.setFilter("secondaryDimension",ee),onStatusClick:ee=>lt.setFilter("status",ee),onClearFilter:lt.clearFilter,onClearAll:lt.clearAll}:void 0,tableContent:e(Dy,{appId:st||"graph-report-internal",title:o("graph.dataBody"),columns:N,rows:Fr.table.rows,rowKey:"id",fullWidth:true,maxHeight:"420px",rowsPerPage:20,rowsPerPageOptions:[20,50,100],graphReport:{enabled:false},showSummary:false})}):null]})};P();var o2=({appTitle:t,children:o,menuData:r=[],workloadItems:n=[],workloadSelectedId:a,showNavigation:i=true,showWorkloadNav:s=true,orientation:l="auto",logo:d,headerSlot:p,actionSlot:m,portraitBottomSlot:f,contentSx:h,containerSx:u,user:v,onSearch:y,onSearchAdd:g,defaultNavigationOpen:x,navOpen:b,onNavOpenChange:C,onWorkloadSelect:k,locale:S="en",localeLabel:T,localeOptions:I,onLocaleChange:w,onUserSetting:M,onUserLogout:A,userMenuItems:R,leftHeaderSlot:D,rightHeaderSlot:E})=>{let O="orbcafe:page-layout-mode",[_,J]=eo.useState("system"),[F,V]=eo.useState("light"),[z,X]=eo.useState(false),[W,H]=eo.useState(false),U=_==="system"?W?F:"light":_;eo.useEffect(()=>{X(true);},[]),eo.useEffect(()=>{try{let nt=window.localStorage.getItem(O);(nt==="light"||nt==="dark"||nt==="system")&&J(nt);}catch{}H(true);let We=window.matchMedia("(prefers-color-scheme: dark)"),tt=()=>{V(We.matches?"dark":"light");};return tt(),We.addEventListener("change",tt),()=>We.removeEventListener("change",tt)},[]),eo.useEffect(()=>{if(W)try{window.localStorage.setItem(O,_);}catch{}},[W,_]),eo.useEffect(()=>{U==="dark"?(document.documentElement.classList.add("dark"),document.documentElement.classList.add("orb-dark"),document.documentElement.dataset.orbMode="dark",document.documentElement.style.colorScheme="dark"):(document.documentElement.classList.remove("dark"),document.documentElement.classList.remove("orb-dark"),document.documentElement.dataset.orbMode="light",document.documentElement.style.colorScheme="light");},[U]);let Y=No("(orientation: portrait)"),ue=No("(max-width: 899.95px)"),re=l==="auto"?!z||Y||ue?"portrait":"landscape":l,[ge,we]=eo.useState({landscape:x??true,portrait:false}),Ve=ge[re],Te=b??Ve,Ie=We=>{b===void 0&&we(tt=>({...tt,[re]:We})),C?.(We);},He=c(se,{direction:"row",spacing:1,alignItems:"center",children:[!z||i&&re==="portrait"?e(ie,{onClick:()=>Ie(!Te),sx:{bgcolor:"action.hover"},children:e(mi,{})}):null,D]}),ce=c(se,{direction:"row",spacing:1,alignItems:"center",children:[m,E]}),be=e(ym,{collapsed:re==="landscape"?!Te:false,onToggle:()=>Ie(!Te),menuData:r,orientation:re,colorMode:U,maxHeight:re==="landscape"?900:void 0});return e(Bn,{mode:_,children:e(Ya,{locale:S,children:c("div",{sx:[We=>({minHeight:"100vh",display:"flex",flexDirection:"column",background:We.palette.mode==="dark"?"linear-gradient(180deg, var(--orb-canvas) 0%, var(--orb-surface) 55%, var(--orb-surface-2) 100%)":We.palette.background.default}),...Array.isArray(u)?u:[u]],children:[e(qi,{appTitle:t,logo:d===void 0?null:d,mode:_,onToggleMode:()=>J(We=>We==="system"?"dark":We==="dark"?"light":"system"),locale:S,localeLabel:T,localeOptions:I,onLocaleChange:w,user:v,onUserSetting:M,onUserLogout:A,userMenuItems:R,onSearch:y,onSearchAdd:g,leftSlot:He,rightSlot:ce}),p?e("div",{sx:{px:{xs:2,md:3},py:1.5,borderBottom:"1px solid",borderColor:"divider"},children:p}):null,c("div",{sx:{flex:1,minHeight:0,display:"flex",position:"relative"},children:[z&&i&&re==="landscape"?e("div",{sx:{p:1.5,pr:0,flexShrink:0},children:be}):null,!z||i&&re==="portrait"?e(Wd,{open:Te,onClose:()=>Ie(false),PaperProps:{sx:{width:"min(88vw, 360px)",p:1.25,bgcolor:"transparent",boxShadow:"none"}},children:be}):null,e("div",{sx:{flex:1,minWidth:0,minHeight:0,overflow:"auto",p:1.5,...h},children:c(se,{spacing:1.5,children:[s&&n.length>0?e(fm,{items:n,selectedId:a,orientation:re,onItemSelect:k}):null,e(Ae,{elevation:0,sx:{flex:1,minHeight:re==="portrait"?420:560,p:{xs:1.25,md:1.5},borderRadius:5,border:"1px solid",borderColor:"divider",bgcolor:"color-mix(in oklch, var(--orb-canvas) 72%, transparent)",backdropFilter:"blur(12px)",color:"text.primary"},children:o})]})})]}),re==="portrait"&&f?c(jsxRuntime.Fragment,{children:[e(Dt,{}),e("div",{sx:{p:1.5},children:f})]}):null]})})})};P();var km=zy__default.default(()=>Promise.resolve().then(()=>(Sm(),wm)).then(t=>t.COrbCanvas),{ssr:false,loading:()=>e("div",{className:"h-full w-full bg-transparent"})});function Vl({isRecording:t}){return e(framerMotion.AnimatePresence,{children:t&&e(framerMotion.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.5},className:"pointer-events-none absolute inset-0 z-0 overflow-hidden",children:c("div",{className:"relative flex h-full w-full items-center justify-center",children:[e("div",{className:"absolute inset-0",children:e(km,{hue:0,hoverIntensity:.5,rotateOnHover:true,forceHoverState:true,backgroundColor:"transparent"})}),e("div",{className:"relative z-10 h-full w-1/3 mix-blend-overlay opacity-80",children:e(km,{hue:10,hoverIntensity:.8,rotateOnHover:true,forceHoverState:true,backgroundColor:"transparent"})})]})})})}var d2=Vl;P();var Tm=eo.createContext(null);function Ky(t){if(!t||!(t instanceof HTMLElement))return false;let o=t.tagName;return !!(o==="INPUT"||o==="TEXTAREA"||o==="SELECT"||t.isContentEditable||t.closest('[data-voice-hotkey-ignore="true"]'))}function qy({children:t,onVoiceSubmit:o,onVoicePartial:r,onVoiceError:n,longPressMs:a=200,disableSpaceTrigger:i=false,ignoreWhenFocusedInput:s=true,renderOverlay:l=true,wsUrl:d,silenceThresholdMs:p,minVolumeRms:m}){let[f,h]=eo.useState(false),[u,v]=eo.useState(false),y=eo.useRef(null),g=eo.useRef(false),x=eo.useRef(false),b=eo.useCallback(()=>{x.current=false,h(false);},[]),{isRecording:C,startRecording:k,stopRecording:S}=wn({wsUrl:d,silenceThresholdMs:p,minVolumeRms:m,onTextUpdate:M=>{r?.(M);},onComplete:async M=>{try{M.trim()&&(v(!0),await o(M.trim()));}catch(A){let R=A instanceof Error?A.message:"Failed to process voice command";n?.(R);}finally{v(!1),b();}},onError:M=>{n?.(M),v(!1),g.current||b();}}),T=eo.useCallback(async()=>{x.current=false,await k();},[k]),I=eo.useCallback(()=>{S();},[S]);eo.useEffect(()=>{if(i)return;let M=R=>{R.isComposing||(R.code==="Space"||R.key===" ")&&(g.current||R.repeat||s&&Ky(document.activeElement)||(g.current=true,R.preventDefault(),y.current=setTimeout(()=>{x.current=true,h(true),k();},a)));},A=R=>{(R.code==="Space"||R.key===" ")&&(y.current&&(clearTimeout(y.current),y.current=null),g.current=false,x.current&&(R.preventDefault(),h(false),S()));};return window.addEventListener("keydown",M),window.addEventListener("keyup",A),()=>{window.removeEventListener("keydown",M),window.removeEventListener("keyup",A),y.current&&(clearTimeout(y.current),y.current=null);}},[i,s,a,k,S]);let w=eo.useMemo(()=>({isRecording:C,isHotkeyRecording:f,isSubmitting:u,startRecording:T,stopRecording:I}),[f,C,u,T,I]);return c(Tm.Provider,{value:w,children:[l?e(Vl,{isRecording:f}):null,t]})}function Xy(){let t=eo.useContext(Tm);if(!t)throw new Error("useAINav must be used within CAINavProvider");return t}var h2=qy,b2=Xy;function ut(...t){return tailwindMerge.twMerge(clsx.clsx(t))}P();var Jy=({content:t,theme:o="light",size:r="base",defaultExpanded:n=false})=>{let[a,i]=eo.useState(n),s=eo.useMemo(()=>`${(r==="sm"?14:r==="lg"?18:16)-2}px`,[r]);return c("div",{className:`my-6 rounded-lg overflow-hidden transition-all duration-200 ${o==="dark"?"bg-[var(--orb-surface-2)]":"bg-[var(--orb-canvas)]"}`,style:{border:"0.5px solid var(--orb-border)"},children:[c("div",{className:"px-4 py-3 cursor-pointer flex items-center justify-between transition-colors duration-200 bg-[var(--orb-surface)] hover:bg-[var(--orb-hover)]",style:{borderBottom:"0.5px solid var(--orb-border)"},onClick:()=>i(!a),children:[c("span",{className:"flex items-center",children:[e(Ba,{className:"mr-2 h-4 w-4"}),e("span",{className:"font-medium text-[var(--orb-fg)]",style:{fontSize:r==="sm"?"14px":r==="lg"?"18px":"16px"},children:"\u601D\u8003\u8FC7\u7A0B"})]}),e(Ho,{className:`w-4 h-4 transition-transform duration-200 ${a?"rotate-180":""} text-[var(--orb-muted)]`})]}),a&&e("div",{className:"p-4 whitespace-pre-wrap italic font-light text-[var(--orb-muted)]",style:{fontSize:s,lineHeight:"1.3 !important"},children:t})]})},Im=Jy;P();var nC=({content:t,language:o="text",isStreaming:r=false,className:n=""})=>{let a=fo(),[i,s]=eo.useState(false),l=async()=>{try{await navigator.clipboard.writeText(t),s(!0),setTimeout(()=>s(!1),2e3);}catch(p){console.error("\u590D\u5236\u5931\u8D25:",p);}},d=a==="dark"?prism.oneDark:prism.oneLight;return c("div",{className:ut("rounded-lg overflow-hidden border border-[var(--orb-border)] my-4",n),children:[c("div",{className:"flex items-center justify-between px-4 py-2 bg-[var(--orb-surface)] border-b border-[var(--orb-border)]",children:[e("span",{className:"text-xs font-medium text-[var(--orb-muted)] uppercase",children:o}),e("button",{onClick:l,className:"p-1 hover:bg-[var(--orb-hover)] rounded transition-colors",disabled:r,title:i?"Copied":"Copy code",children:i?e(Ao,{size:14,className:"text-[var(--orb-status-success)]"}):e(zc,{size:14,className:"text-[var(--orb-muted)]"})})]}),e("div",{className:"text-sm",children:e(reactSyntaxHighlighter.Prism,{language:o,style:d,customStyle:{margin:0,padding:"16px",fontSize:"14px",lineHeight:"1.5",backgroundColor:a==="dark"?"var(--orb-surface-2)":"var(--orb-canvas)"},wrapLongLines:true,children:t})})]})},Rm=nC;P();var Dm="orb-html-demo",Nm="orb-html-demo-ping",ls=16,lC=2,cC=2e3,dC=300,pC=96,uC=200,mC=560,gC=320,_l=`<script>(function(){var post=function(){var body=document.body;var height=Math.ceil(document.documentElement.scrollHeight);if(body){var style=getComputedStyle(body);height=Math.ceil(Math.max(body.offsetHeight,body.scrollHeight)+parseFloat(style.marginTop||'0')+parseFloat(style.marginBottom||'0'))}parent.postMessage({source:${JSON.stringify(Dm)},height:height},'*')};addEventListener('load',post);addEventListener('resize',post);addEventListener('message',function(event){if(event.data&&event.data.source===${JSON.stringify(Nm)})post()});new MutationObserver(post).observe(document.documentElement,{subtree:true,childList:true,attributes:true,characterData:true});var retries=0;var timer=setInterval(function(){post();retries+=1;if(retries>5)clearInterval(timer)},250);post()})()</script>`,fC="html,body{margin:0;padding:12px;font:14px/1.5 system-ui,sans-serif;}",hC=t=>/<html[\s>]/i.test(t),bC=t=>{let o=t.trim();return hC(o)?/<\/body>/i.test(o)?o.replace(/<\/body>/i,`${_l}</body>`):`${o}${_l}`:`<!DOCTYPE html><html><head><meta charset="utf-8"><style>${fC}</style></head><body>${o}${_l}</body></html>`},vC=t=>{let o=/<title[^>]*>([^<]+)<\/title>/i.exec(t)?.[1]?.trim();return o||(/<h1[^>]*>([^<]+)<\/h1>/i.exec(t)?.[1]?.trim()??null)},yC=t=>{if(t<1024)return `${t} B`;let o=t/1024;if(o<1024)return `${o<10?o.toFixed(1):Math.round(o)} KB`;let r=o/1024;return `${r<10?r.toFixed(1):Math.round(r)} MB`},CC=t=>`${t.toLowerCase().replace(/[^\p{Letter}\p{Number}]+/gu,"-").replace(/^-+|-+$/g,"").slice(0,60)||"interactive-demo"}.html`,xC=(t,o)=>{let r=URL.createObjectURL(t),n=document.createElement("a");n.href=r,n.download=o,n.click(),window.setTimeout(()=>URL.revokeObjectURL(r),1e3);},ya=new Map,Ul="orb-html-demo-store",wC=t=>t.replace(/^\s+/,"").slice(0,pC),Gl=(t,o)=>{ya.set(t,o),window.dispatchEvent(new CustomEvent(Ul));},SC=({content:t,title:o})=>{let{t:r}=le(),n=fo(),a=wC(t),[i,s]=eo.useState(()=>ya.get(a)?.open??false),[l,d]=eo.useState(()=>ya.get(a)?.view??"preview"),[p,m]=eo.useState(false),[f,h]=eo.useState(gC),u=eo.useRef(null),v=eo.useRef(null),y=eo.useRef(false),g=eo.useRef(false),x=eo.useRef(t),b=D=>Gl(a,{open:D,view:l}),C=D=>Gl(a,{open:i,view:D}),k=()=>{g.current=true,b(false);};eo.useEffect(()=>{let D=()=>{let E=ya.get(a);s(E?.open??false),d(E?.view??"preview");};return window.addEventListener(Ul,D),()=>window.removeEventListener(Ul,D)},[a]),eo.useEffect(()=>{x.current!==t&&(x.current=t,ya.has(a)||Gl(a,{open:true,view:"preview"}));},[t,a]);let[S,T]=eo.useState(t);eo.useEffect(()=>{if(t===S)return;let D=window.setTimeout(()=>T(t),dC);return ()=>window.clearTimeout(D)},[t,S]);let I=eo.useMemo(()=>bC(S),[S]);eo.useEffect(()=>{if(!i)return;let D=E=>{let O=E.data;!O||O.source!==Dm||typeof O.height!="number"||v.current&&E.source!==v.current.contentWindow||h(Math.max(uC,Math.min(mC,Math.ceil(O.height))));};return window.addEventListener("message",D),v.current?.contentWindow?.postMessage({source:Nm},"*"),()=>window.removeEventListener("message",D)},[i]);let w=o??vC(t)??r("agentui.html.defaultTitle"),M=eo.useMemo(()=>new TextEncoder().encode(t).length,[t]);eo.useEffect(()=>{if(!p)return;let D=window.setTimeout(()=>m(false),cC);return ()=>window.clearTimeout(D)},[p]),eo.useEffect(()=>{if(i){y.current=true;return}y.current&&(y.current=false,g.current&&(g.current=false,u.current?.focus()));},[i]);let A=()=>{navigator.clipboard.writeText(t).then(()=>m(true));},R=()=>xC(new Blob([t],{type:"text/html;charset=utf-8"}),CC(w));return i?c("section",{className:"orb-html-demo","aria-label":w,"data-view":l,children:[c("header",{className:"orb-html-demo-head",children:[e("span",{className:"orb-html-demo-glyph","aria-hidden":"true",children:"</>"}),e("span",{className:"orb-html-demo-head-title",title:w,children:w}),c("div",{className:"orb-segmented-control orb-html-demo-segment",role:"group","aria-label":r("agentui.html.toggle"),"data-has-selection":"true",style:{"--orb-segmented-count":lC,"--orb-segmented-index":l==="code"?0:1},children:[e("span",{className:"orb-segmented-control-thumb","aria-hidden":"true"}),e("button",{type:"button",className:"orb-segmented-control-item orb-segmented-control-item-label","data-selected":l==="code","aria-pressed":l==="code",onClick:()=>C("code"),children:r("agentui.html.code")}),e("button",{type:"button",className:"orb-segmented-control-item orb-segmented-control-item-label","data-selected":l==="preview","aria-pressed":l==="preview",onClick:()=>C("preview"),children:r("agentui.html.preview")})]}),c("div",{className:"orb-html-demo-actions",children:[e("button",{type:"button",className:"orb-icon-btn orb-icon-btn-sm","aria-label":r(p?"agentui.html.copied":"agentui.html.copy"),title:r(p?"agentui.html.copied":"agentui.html.copy"),onClick:A,children:p?e(Ao,{size:ls}):e(Yo,{size:ls})}),e("button",{type:"button",className:"orb-icon-btn orb-icon-btn-sm","aria-label":r("agentui.html.download"),title:r("agentui.html.download"),onClick:R,children:e(La,{size:ls})}),e("button",{type:"button",className:"orb-icon-btn orb-icon-btn-sm","aria-label":r("agentui.html.close"),title:r("agentui.html.close"),onClick:k,children:e(qt,{size:ls})})]})]}),c("div",{className:"orb-html-demo-body",children:[e("iframe",{ref:v,className:"orb-html-demo-frame",title:w,sandbox:"allow-scripts",srcDoc:I,style:{height:f},hidden:l!=="preview"}),e("div",{className:"orb-html-demo-code",hidden:l!=="code",children:e(reactSyntaxHighlighter.Prism,{language:"html",style:n==="dark"?prism.oneDark:prism.oneLight,customStyle:{margin:0,padding:"16px 20px",background:"transparent",fontSize:"13px",lineHeight:"1.6"},wrapLongLines:true,children:t})})]})]}):c("button",{ref:u,type:"button",className:"orb-html-demo-card","aria-expanded":false,onClick:()=>b(true),children:[e("span",{className:"orb-html-demo-glyph","aria-hidden":"true",children:"</>"}),c("span",{className:"orb-html-demo-info",children:[e("span",{className:"orb-html-demo-title",children:w}),c("span",{className:"orb-html-demo-meta",children:["HTML \xB7 ",yC(M)]})]}),e("span",{className:"orb-html-demo-openpill",children:r("agentui.html.open")})]})},Am=SC;P();var TC=t=>{let o=/line (\d+)/i.exec(t)?.[1];return o?`Mermaid syntax error around line ${o} \u2014 expand for details`:"Mermaid syntax error \u2014 expand for details"},IC=({content:t,isLoading:o,className:r="",style:n})=>{let a=eo.useRef(null),[i,s]=eo.useState(false),[l,d]=eo.useState(null),p=fo();return eo.useEffect(()=>{let m=false,f=async()=>{if(!(!t.trim()||!a.current)){s(true),d(null);try{Lm__default.default.initialize({startOnLoad:!1,theme:p==="dark"?"dark":"default",securityLevel:"loose",fontFamily:"inherit",flowchart:{htmlLabels:!1}});let u=`mermaid-${Math.random().toString(36).substr(2,9)}`,v=t.replace(/```mermaid\n?|\n?```/g,"").trim(),{svg:y,bindFunctions:g}=await Lm__default.default.render(u,v);!m&&a.current&&(a.current.innerHTML=y,g?.(a.current));}catch(u){if(m)return;console.error("Mermaid render failed:",u),d(u instanceof Error?u.message:"Render failed");}finally{m||s(false);}}},h=setTimeout(()=>{f();},100);return ()=>{m=true,clearTimeout(h);}},[t,p]),c("div",{className:`mermaid-block ${r}`,style:n,children:[(o||i)&&c("div",{className:"flex items-center justify-center rounded border border-[var(--orb-border)] bg-[var(--orb-surface)] p-4 dark:bg-[var(--orb-surface-2)]",children:[e("div",{className:"mr-2 h-4 w-4 animate-spin rounded-full border-b-2 border-[var(--orb-primary)]"}),e("span",{className:"text-sm text-[var(--orb-muted)]",children:"Generating Diagram..."})]}),l&&c("div",{className:"rounded border border-[color-mix(in_oklch,var(--orb-status-error)_30%,transparent)] bg-[color-mix(in_oklch,var(--orb-status-error)_8%,transparent)] p-3 text-sm text-[var(--orb-status-error)]",children:[e("p",{className:"font-medium",children:TC(l)}),c("details",{className:"mt-1",children:[e("summary",{className:"cursor-pointer text-xs text-[var(--orb-muted)]",children:"Details & source"}),e("pre",{className:"mt-2 max-h-40 overflow-auto whitespace-pre-wrap break-words",children:l}),e("pre",{className:"mt-2 max-h-40 overflow-auto text-xs text-[var(--orb-muted)]",children:t})]})]}),e("div",{ref:a,className:`overflow-x-auto ${o||i||l?"hidden":""}`})]})},Om=IC;P();var RC=({title:t="\u53D1\u751F\u9519\u8BEF",content:o,errorCode:r,stack:n,icon:a,closable:i=true,onClose:s,onRetry:l,className:d="",...p})=>{let[m,f]=eo.useState(false),[h,u]=eo.useState(false),v=async()=>{if(l){u(true);try{await l();}catch(y){console.error("\u91CD\u8BD5\u5931\u8D25:",y);}finally{u(false);}}};return c("div",{className:`relative w-full overflow-hidden rounded-lg border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-sm transition-all hover:shadow-md ${d}`,...p,children:[c("div",{className:"flex p-4 border-l-4 border-l-[var(--orb-status-error)] bg-[color-mix(in_oklch,var(--orb-status-error)_8%,transparent)]",children:[e("div",{className:"flex-shrink-0 mr-3 text-[var(--orb-status-error)] mt-0.5",children:a||e(Da,{className:"w-5 h-5"})}),c("div",{className:"flex-1 min-w-0",children:[c("div",{className:"flex items-center space-x-2 mb-1",children:[e("h4",{className:"text-base font-semibold text-[var(--orb-fg)]",children:t}),r&&e("span",{className:"text-xs font-mono px-1.5 py-0.5 rounded bg-[color-mix(in_oklch,var(--orb-status-error)_14%,transparent)] text-[var(--orb-status-error)]",children:r})]}),o&&e("div",{className:"text-sm text-[var(--orb-muted)] mb-3 leading-relaxed",children:typeof o=="string"?e("p",{className:"whitespace-pre-wrap",children:o}):o}),(l||n)&&c("div",{className:"flex items-center space-x-4 mt-2",children:[l&&c("button",{onClick:v,disabled:h,className:"flex items-center text-xs font-medium text-[var(--orb-status-error)] hover:opacity-80 transition-colors disabled:opacity-50",children:[e(td,{className:`w-3.5 h-3.5 mr-1.5 ${h?"animate-spin":""}`}),h?"\u91CD\u8BD5\u4E2D...":"\u91CD\u8BD5"]}),n&&c("button",{onClick:()=>f(!m),className:"flex items-center text-xs font-medium text-[var(--orb-muted)] hover:text-[var(--orb-fg)] dark:text-[var(--orb-muted)] transition-colors",children:[m?e(Ho,{className:"w-3.5 h-3.5 mr-1"}):e(zo,{className:"w-3.5 h-3.5 mr-1"}),m?"\u9690\u85CF\u8BE6\u60C5":"\u67E5\u770B\u8BE6\u60C5"]})]})]}),i&&s&&e("button",{onClick:s,className:"flex-shrink-0 ml-3 text-[var(--orb-muted)] hover:text-[var(--orb-fg)] transition-colors self-start",children:e(qt,{className:"w-4 h-4"})})]}),n&&m&&e("div",{className:"bg-[var(--orb-surface)] dark:bg-[var(--orb-canvas)] p-3 border-t border-[var(--orb-border)]",children:e("pre",{className:"text-xs font-mono text-[var(--orb-muted)] overflow-x-auto whitespace-pre-wrap p-2 bg-[var(--orb-canvas)] rounded border border-[var(--orb-border)]",children:n})})]})},cs=RC;P();var MC=({title:t="\u8B66\u544A",content:o,warningType:r,severity:n="warning",warnings:a=[],icon:i,closable:s=true,onClose:l,onConfirm:d,actionText:p,className:m="",...f})=>{let h=()=>{switch(n){case "info":return {borderLeftColor:"border-l-blue-500",iconColor:"text-[var(--orb-primary)]",bgColor:"bg-[var(--orb-p50)]"};case "error":return {borderLeftColor:"border-l-[var(--orb-status-error)]",iconColor:"text-[var(--orb-status-error)]",bgColor:"bg-[color-mix(in_oklch,var(--orb-status-error)_8%,transparent)]"};case "success":return {borderLeftColor:"border-l-green-500",iconColor:"text-[var(--orb-status-success)]",bgColor:"bg-[color-mix(in_oklch,var(--orb-status-success)_8%,transparent)]"};default:return {borderLeftColor:"border-l-yellow-500",iconColor:"text-[var(--orb-status-warning)]",bgColor:"bg-[color-mix(in_oklch,var(--orb-status-warning)_8%,transparent)]"}}},u=()=>{switch(n){case "info":return e(Fa,{className:"w-5 h-5"});case "error":return e(Ga,{className:"w-5 h-5"});case "success":return e(Na,{className:"w-5 h-5"});default:return e(Fc,{className:"w-5 h-5"})}},v=h();return c("div",{className:`relative w-full overflow-hidden rounded-lg border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-sm transition-all hover:shadow-md ${m}`,...f,children:[c("div",{className:`flex p-4 border-l-4 ${v.borderLeftColor} ${v.bgColor}`,children:[e("div",{className:`flex-shrink-0 mr-3 ${v.iconColor}`,children:i||u()}),c("div",{className:"flex-1 min-w-0",children:[c("div",{className:"flex items-center justify-between mb-1",children:[e("h4",{className:"text-base font-semibold text-[var(--orb-fg)]",children:t}),r&&e("span",{className:"text-xs font-medium px-2 py-0.5 rounded-full bg-[var(--orb-surface)] text-[var(--orb-muted)]",children:r})]}),o&&e("div",{className:"text-sm text-[var(--orb-muted)] mb-2",children:o}),a&&a.length>0&&e("ul",{className:"mt-2 space-y-1",children:a.map((y,g)=>c("li",{className:"flex items-start text-sm text-[var(--orb-muted)]",children:[e("span",{className:"mr-2 mt-1.5 w-1 h-1 rounded-full bg-[var(--orb-muted)] flex-shrink-0"}),e("span",{children:y})]},g))})]}),s&&l&&e("button",{onClick:l,className:"flex-shrink-0 ml-3 text-[var(--orb-muted)] hover:text-[var(--orb-fg)] transition-colors",children:e(qt,{className:"w-4 h-4"})})]}),d&&e("div",{className:"bg-[color-mix(in_oklch,var(--orb-surface)_50%,transparent)] px-4 py-3 flex justify-end border-t border-[var(--orb-border)]",children:e("button",{onClick:d,className:"px-4 py-1.5 text-sm font-medium text-[var(--orb-on-primary)] bg-[var(--orb-primary)] hover:bg-[var(--orb-p600)] rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-[var(--orb-primary)] focus:ring-offset-2 dark:focus:ring-offset-gray-900",children:p||"\u786E\u8BA4"})})]})},ds=MC;P();var DC=({title:t="\u76F8\u5173\u63A8\u8350",content:o,suggestions:r,onSuggestionClick:n,maxDisplay:a=5,icon:i,closable:s=false,onClose:l,className:d="",...p})=>{let[m,f]=eo.useState(false),[h,u]=eo.useState(""),[v,y]=eo.useState(false),g=eo.useMemo(()=>h.trim()?r.filter(C=>C.toLowerCase().includes(h.toLowerCase())):r,[r,h]),x=eo.useMemo(()=>m?g:g.slice(0,a),[g,m,a]),b=C=>{n?.(C);};return !r||r.length===0?null:c("div",{className:`w-full overflow-hidden rounded-lg border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-sm transition-all hover:shadow-md ${d}`,...p,children:[c("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--orb-border)] bg-[var(--orb-p50)]",children:[c("div",{className:"flex items-center space-x-2.5",children:[e("div",{className:"text-[var(--orb-primary)] flex-shrink-0",children:i||e(Ba,{className:"w-5 h-5"})}),c("div",{className:"flex flex-col",children:[e("h4",{className:"text-sm font-semibold text-[var(--orb-fg)] leading-tight",children:t}),o&&e("span",{className:"text-xs text-[var(--orb-muted)] mt-0.5",children:o})]})]}),c("div",{className:"flex items-center space-x-1",children:[r.length>3&&e("button",{onClick:()=>y(!v),className:`p-1.5 rounded-md transition-colors ${v?"bg-[var(--orb-p100)] text-[var(--orb-status-primary)]":"text-[var(--orb-muted)] hover:text-[var(--orb-fg)] hover:bg-[var(--orb-hover)]"}`,title:v?"\u5173\u95ED\u641C\u7D22":"\u641C\u7D22\u95EE\u9898",children:e(Vo,{className:"w-4 h-4"})}),s&&l&&e("button",{onClick:l,className:"text-[var(--orb-muted)] hover:text-[var(--orb-fg)] p-1.5 rounded-md hover:bg-[var(--orb-hover)] transition-colors",title:"\u5173\u95ED",children:e(qt,{className:"w-4 h-4"})})]})]}),v&&e("div",{className:"px-4 py-2 border-b border-[var(--orb-border)] bg-[color-mix(in_oklch,var(--orb-surface)_50%,transparent)]",children:c("div",{className:"relative",children:[e("input",{type:"text",placeholder:"\u641C\u7D22\u76F8\u5173\u95EE\u9898...",value:h,onChange:C=>u(C.target.value),className:"w-full text-sm px-3 py-1.5 pl-8 rounded border border-[var(--orb-border)] bg-[var(--orb-canvas)] text-[var(--orb-fg)] focus:ring-1 focus:ring-[var(--orb-primary)] focus:border-[var(--orb-primary)] outline-none transition-shadow",autoFocus:true}),e(Vo,{className:"absolute left-2.5 top-2 w-3.5 h-3.5 text-[var(--orb-muted)]"})]})}),c("div",{className:"p-2",children:[e("ul",{className:"space-y-1",children:x.map((C,k)=>e("li",{children:c("button",{onClick:()=>b(C),className:"w-full text-left px-3 py-2 rounded-md text-sm text-[var(--orb-fg)] hover:bg-[var(--orb-hover)] hover:text-[var(--orb-status-primary)] transition-colors group flex items-start justify-between",children:[e("span",{children:C}),e(zo,{className:"w-4 h-4 text-[var(--orb-muted)] group-hover:text-[var(--orb-status-primary)] opacity-0 group-hover:opacity-100 transition-all transform group-hover:translate-x-0.5"})]})},k))}),g.length>a&&e("button",{onClick:()=>f(!m),className:"w-full text-center py-2 text-xs font-medium text-[var(--orb-muted)] hover:text-[var(--orb-fg)] transition-colors border-t border-[var(--orb-border)] mt-1",children:m?"\u6536\u8D77":`\u67E5\u770B\u5168\u90E8 (${g.length})`}),g.length===0&&h&&e("div",{className:"text-center py-4 text-sm text-[var(--orb-muted)]",children:"\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u5EFA\u8BAE"})]})]})},ps=DC;P();var NC=({title:t,content:o,toolName:r,parameters:n,result:a,status:i,duration:s,icon:l,closable:d=false,onClose:p,onAction:m,actionText:f,className:h="",...u})=>{let[v,y]=eo.useState(false),[g,x]=eo.useState(true),b=()=>{switch(i){case "pending":return {iconColor:"text-[var(--orb-primary)]",badgeBg:"bg-[var(--orb-p50)]",badgeText:"text-[var(--orb-status-primary)]",label:"\u6267\u884C\u4E2D"};case "error":return {iconColor:"text-[var(--orb-status-error)]",badgeBg:"bg-[color-mix(in_oklch,var(--orb-status-error)_10%,transparent)]",badgeText:"text-[var(--orb-status-error)]",label:"\u5931\u8D25"};default:return {iconColor:"text-[var(--orb-status-success)]",badgeBg:"bg-[color-mix(in_oklch,var(--orb-status-success)_8%,transparent)]",badgeText:"text-[var(--orb-status-success)]",label:"\u6210\u529F"}}},C=()=>{switch(i){case "pending":return e(Xc,{className:"w-5 h-5 animate-spin"});case "error":return e(Ga,{className:"w-5 h-5"});default:return e(Na,{className:"w-5 h-5"})}},k=I=>I?I<1e3?`${I}ms`:`${(I/1e3).toFixed(2)}s`:"",S=b(),T=t||r||"\u5DE5\u5177\u8C03\u7528";return c("div",{className:`w-full overflow-hidden rounded-lg border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-sm transition-all hover:shadow-md ${h}`,...u,children:[c("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--orb-border)] bg-[color-mix(in_oklch,var(--orb-surface)_50%,transparent)]",children:[c("div",{className:"flex items-center space-x-3",children:[e("div",{className:`flex-shrink-0 ${S.iconColor}`,children:l||C()}),c("div",{children:[c("div",{className:"flex items-center space-x-2",children:[e("h4",{className:"text-sm font-semibold text-[var(--orb-fg)]",children:T}),e("span",{className:`text-[10px] font-medium px-1.5 py-0.5 rounded ${S.badgeBg} ${S.badgeText}`,children:S.label})]}),r&&t&&c("div",{className:"text-xs text-[var(--orb-muted)] flex items-center mt-0.5",children:[e(Wn,{className:"w-3 h-3 mr-1"}),r]})]})]}),c("div",{className:"flex items-center space-x-2 text-xs text-[var(--orb-muted)]",children:[s&&c("div",{className:"flex items-center bg-[var(--orb-surface)] px-2 py-1 rounded",children:[e(Vc,{className:"w-3 h-3 mr-1"}),k(s)]}),d&&p&&e("button",{onClick:p,className:"text-[var(--orb-muted)] hover:text-[var(--orb-fg)] transition-colors p-1 rounded",children:e(qt,{className:"w-4 h-4"})})]})]}),c("div",{className:"p-4",children:[o&&e("div",{className:"text-sm text-[var(--orb-muted)] mb-4 leading-relaxed",children:o}),n&&c("div",{className:"mb-3",children:[c("button",{onClick:()=>y(!v),className:"flex items-center text-xs font-medium text-[var(--orb-muted)] hover:text-[var(--orb-fg)] dark:text-[var(--orb-muted)] mb-2",children:[v?e(Ho,{className:"w-3.5 h-3.5 mr-1"}):e(zo,{className:"w-3.5 h-3.5 mr-1"}),e("div",{className:"w-3.5 h-3.5 mr-1.5"}),"\u8F93\u5165\u53C2\u6570"]}),v&&e("div",{className:"bg-[var(--orb-surface)] dark:bg-[var(--orb-canvas)] rounded border border-[var(--orb-border)] overflow-hidden",children:e("pre",{className:"p-3 text-xs font-mono text-[var(--orb-muted)] overflow-x-auto",children:JSON.stringify(n,null,2)})})]}),a&&c("div",{children:[c("button",{onClick:()=>x(!g),className:"flex items-center text-xs font-medium text-[var(--orb-muted)] hover:text-[var(--orb-fg)] dark:text-[var(--orb-muted)] mb-2",children:[g?e(Ho,{className:"w-3.5 h-3.5 mr-1"}):e(zo,{className:"w-3.5 h-3.5 mr-1"}),e(Wn,{className:"w-3.5 h-3.5 mr-1.5"}),"\u6267\u884C\u7ED3\u679C"]}),g&&e("div",{className:"bg-[var(--orb-surface)] dark:bg-[var(--orb-canvas)] rounded border border-[var(--orb-border)] overflow-hidden",children:e("pre",{className:"p-3 text-xs font-mono text-[var(--orb-muted)] overflow-x-auto",children:typeof a=="string"?a:JSON.stringify(a,null,2)})})]}),m&&e("div",{className:"mt-3 pt-3 border-t border-[var(--orb-border)] flex justify-end",children:e("button",{onClick:m,className:"px-4 py-1.5 text-sm font-medium text-[var(--orb-on-primary)] bg-[var(--orb-primary)] hover:bg-[var(--orb-p600)] rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-[var(--orb-primary)] focus:ring-offset-2 dark:focus:ring-offset-gray-900",children:f||"\u6267\u884C\u64CD\u4F5C"})})]})]})},us=NC;P();var EC=({data:t})=>{if(!t)return null;let o=eo.useMemo(()=>{let r=[],n=[],a="\u6570\u636E\u8868\u683C";return Array.isArray(t)?(r=t,r.length>0&&(n=Object.keys(r[0]).map(i=>({id:i,label:i.charAt(0).toUpperCase()+i.slice(1),numeric:typeof r[0][i]=="number"})))):typeof t=="object"&&(a=t.title||a,r=Array.isArray(t.rows)?t.rows:Array.isArray(t.data)?t.data:[],Array.isArray(t.columns)?n=t.columns.map(s=>({id:s.key||s.id,label:s.title||s.label,numeric:s.dataType==="number"||s.numeric})):r.length>0&&(n=Object.keys(r[0]).map(s=>({id:s,label:s,numeric:typeof r[0][s]=="number"})))),r=r.map((i,s)=>({...i,id:i.id||`row_${s}`})),{title:a,columns:n,rows:r}},[t]);return o.rows.length===0?e("div",{className:"w-full my-4 p-4 border border-dashed border-[var(--orb-border)] rounded text-center text-[var(--orb-muted)]",children:"\u6682\u65E0\u8868\u683C\u6570\u636E"}):e("div",{className:"w-full my-4",children:e(tr,{appId:"agent-ui-table-card",title:o.title,columns:o.columns,rows:o.rows,count:o.rows.length,rowKey:"id",fitContainer:false,maxHeight:"500px",rowsPerPage:10,rowsPerPageOptions:[5,10,20,50]})})},ms=EC;P();var LC=({title:t,subtitle:o,data:r,type:n,config:a={}})=>{let i=()=>{switch(n){case "bar-chart-card":return e(_s,{className:"w-4 h-4 text-[var(--orb-chart-1)]"});case "line-chart-card":return e(qc,{className:"w-4 h-4 text-[var(--orb-chart-positive)]"});case "pie-chart-card":return e(ed,{className:"w-4 h-4 text-[var(--orb-chart-2)]"});case "combo-chart-card":return e(Oc,{className:"w-4 h-4 text-[var(--orb-chart-5)]"});case "heatmap-chart-card":return e(Uc,{className:"w-4 h-4 text-[var(--orb-chart-negative)]"});case "fishbone-chart-card":return e(Gc,{className:"w-4 h-4 text-[var(--orb-chart-4)]"});case "waterfall-chart-card":return e(sd,{className:"w-4 h-4 text-[var(--orb-chart-6)]"});case "google-map-card":return e(Vn,{className:"w-4 h-4 text-[var(--orb-status-primary)]"});case "amap-card":return e(Zc,{className:"w-4 h-4 text-[var(--orb-status-primary)]"});default:return e(_s,{className:"w-4 h-4"})}},s=()=>{if(!r&&n!=="google-map-card"&&n!=="amap-card")return e("div",{className:"text-[var(--orb-muted)] text-sm p-4 text-center",children:"No data available"});try{switch(n){case "bar-chart-card":return e(ra,{data:r,orientation:a.orientation||"horizontal",valueSuffix:a.valueSuffix||"",minHeight:a.minHeight});case "line-chart-card":return e($p,{data:r,color:a.color,valueSuffix:a.valueSuffix||"",height:a.height});case "pie-chart-card":let l=r.reduce((p,m)=>p+(Number(m.value)||0),0),d=r.map(p=>({name:p.name,value:Number(p.value)||0,percent:typeof p.percent=="number"?p.percent:l>0?(Number(p.value)||0)/l*100:0}));return e(Ii,{data:d,variant:a.variant||"donut",size:a.size,colors:a.colors});case "combo-chart-card":return e(_p,{data:r,barColor:a.barColor,lineColor:a.lineColor});case "heatmap-chart-card":return e(Gp,{data:r});case "fishbone-chart-card":return e(Up,{branches:r,effect:a.effect||t||"Problem"});case "waterfall-chart-card":return e(Kp,{data:r,height:a.height});case "google-map-card":return e(qp,{embedUrl:a.embedUrl||r&&r[0]?.embedUrl,apiKey:a.apiKey,query:a.query||r&&r[0]?.query||t,height:a.height});case "amap-card":return e(Xp,{embedUrl:a.embedUrl||r&&r[0]?.embedUrl,keyword:a.keyword||r&&r[0]?.keyword||t,height:a.height});default:return c("div",{className:"text-[var(--orb-muted)] text-sm p-4 text-center",children:["Unsupported chart type: ",n]})}}catch(l){return console.error("Error rendering chart:",l),e("div",{className:"text-[var(--orb-status-error)] text-sm p-4 text-center",children:"Error rendering chart"})}};return c("div",{className:"w-full overflow-hidden rounded-lg border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-sm transition-all hover:shadow-md",children:[c("div",{className:"flex items-center px-4 py-3 border-b border-[var(--orb-border)] bg-[color-mix(in_oklch,var(--orb-surface)_50%,transparent)]",children:[e("div",{className:"mr-2 flex-shrink-0",children:i()}),c("div",{className:"flex-1 min-w-0",children:[e("h3",{className:"text-sm font-semibold text-[var(--orb-fg)] truncate",children:t}),o&&e("p",{className:"text-xs text-[var(--orb-muted)] mt-0.5 truncate",children:o})]})]}),c("div",{className:"p-4",children:[e("div",{className:"overflow-x-auto",children:s()}),e("div",{className:"mt-3",children:c("details",{className:"text-xs text-[var(--orb-muted)]",children:[e("summary",{className:"cursor-pointer hover:text-[var(--orb-fg)] transition-colors select-none font-medium opacity-60 hover:opacity-100",children:"View Raw Data"}),e("pre",{className:"mt-2 p-2 bg-[var(--orb-surface)] dark:bg-[var(--orb-canvas)] rounded border border-[var(--orb-border)] overflow-x-auto max-h-40",children:JSON.stringify(r,null,2)})]})})]})]})},gs=LC;P();var ys=["bar","column","line","pie","donut","scatter","bubble","list","metric","progress"],OC={bar:"Bars",column:"Columns",line:"Line",pie:"Pie",donut:"Donut",scatter:"Scatter",bubble:"Bubble",list:"List",metric:"Metric",progress:"Progress"},bs=480,Mn=214,Ut={top:18,right:16,bottom:38,left:30},to=t=>typeof t=="number"&&Number.isFinite(t)?t:0,Wm=t=>t.toLocaleString(void 0,{maximumFractionDigits:1}),qo=(t,o)=>`${t.id||t.label}-${o}`,$m=(t,o=13)=>t.length>o?`${t.slice(0,Math.max(1,o-1))}\u2026`:t,vs=(t,o,r)=>Math.min(r,Math.max(o,t)),fr=(t,o,r)=>t.color??r[o%r.length],hr=(t,o)=>o?{onMouseEnter:()=>o.onItemHoverStart?.(t),onMouseMove:()=>o.onItemHoverStart?.(t),onMouseLeave:()=>o.onItemHoverEnd?.(t),onContextMenu:r=>o.onItemContextMenu?.(r,t)}:{},_m=t=>{let o=t.map(a=>to(a.value)),r=Math.min(0,...o),n=Math.max(0,...o);return {min:r,max:n===r?r+1:n,range:n===r?1:n-r}},FC=(t,o,r)=>{let n=bs-Ut.left-Ut.right,a=Mn-Ut.top-Ut.bottom,{max:i,range:s}=_m(r),l=Ut.left+t*n/Math.max(r.length-1,1),d=Ut.top+(i-to(o.value))/s*a,p=Ut.top+i/s*a;return {x:l,y:d,zeroY:p}},hs=(t,o,r,n)=>{let a=(n-90)*Math.PI/180;return {x:t+r*Math.cos(a),y:o+r*Math.sin(a)}},BC=(t,o,r,n,a,i)=>{let s=hs(t,o,r,i),l=hs(t,o,r,a),d=i-a>180?1:0;if(n===0)return `M ${t} ${o} L ${s.x} ${s.y} A ${r} ${r} 0 ${d} 0 ${l.x} ${l.y} Z`;let p=hs(t,o,n,i),m=hs(t,o,n,a);return `M ${s.x} ${s.y} A ${r} ${r} 0 ${d} 0 ${l.x} ${l.y} L ${m.x} ${m.y} A ${n} ${n} 0 ${d} 1 ${p.x} ${p.y} Z`},HC=({children:t})=>c("div",{className:"orb-metric-empty",role:"status",children:[e("span",{className:"orb-metric-empty-mark","aria-hidden":"true",children:"\u2014"}),e(L,{variant:"body2",muted:true,children:t})]}),zC=()=>c("div",{className:"orb-metric-loading",role:"status","aria-label":"Loading chart",children:[e("span",{className:"orb-metric-skeleton orb-metric-skeleton-wide"}),e("span",{className:"orb-metric-skeleton"}),e("span",{className:"orb-metric-skeleton orb-metric-skeleton-short"}),e("span",{className:"orb-metric-skeleton orb-metric-skeleton-wide"})]}),Xl=({item:t,onItemClick:o,interactions:r})=>{let n=()=>o?.(t);return {...o?{role:"button",tabIndex:0,onClick:n,onKeyDown:i=>{o&&(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),n());}}:{},...hr(t,r),style:{cursor:o||r?"pointer":"default"}}},VC=({loading:t,error:o,hasData:r,emptyState:n,children:a})=>t?e(zC,{}):o?e("div",{className:"orb-metric-error",role:"alert",children:o}):r?e(jsxRuntime.Fragment,{children:a}):e(HC,{children:n??"No data for the current selection."}),WC=({data:t,activeId:o,onItemClick:r,interactions:n,valueFormatter:a,colors:i})=>{let s=Math.max(...t.map(l=>Math.abs(to(l.value))),1);return e("div",{className:"orb-metric-bars",role:"list","aria-label":"Chart data",children:t.map((l,d)=>{let p=to(l.value),m=`${vs(Math.abs(p)/s*100,0,100)}%`,f=o===l.id,h=c(jsxRuntime.Fragment,{children:[e("span",{className:"orb-metric-bar-label",title:l.label,children:l.label}),e("span",{className:"orb-metric-bar-track","aria-hidden":"true",children:e("span",{className:`orb-metric-bar-fill${f?" is-active":""}`,style:{width:m,backgroundColor:fr(l,d,i)}})}),e("span",{className:"orb-metric-bar-value",children:a(p)})]});return r?e("button",{type:"button",className:`orb-metric-bar-row${f?" is-active":""}`,onClick:()=>r(l),title:`${l.label}: ${a(p)}`,"aria-pressed":f,...hr(l,n),children:h},qo(l,d)):e("div",{className:`orb-metric-bar-row${f?" is-active":""}`,role:"listitem",...hr(l,n),children:h},qo(l,d))})})},$C=({data:t,activeId:o,onItemClick:r,interactions:n,valueFormatter:a,colors:i})=>{let s=Math.max(t.reduce((l,d)=>l+Math.max(to(d.value),0),0),1);return e("div",{className:"orb-metric-progress",role:"list","aria-label":"Chart data",children:t.map((l,d)=>{let p=Math.max(to(l.value),0),m=vs(p/s*100,0,100),f=o===l.id,h=c(jsxRuntime.Fragment,{children:[c("span",{className:"orb-metric-progress-heading",children:[e("span",{title:l.label,children:l.label}),e("strong",{children:a(p)})]}),e("span",{className:"orb-metric-bar-track","aria-hidden":"true",children:e("span",{className:"orb-metric-bar-fill",style:{width:`${m}%`,backgroundColor:fr(l,d,i)}})})]});return r?e("button",{type:"button",className:`orb-metric-progress-row${f?" is-active":""}`,onClick:()=>r(l),"aria-pressed":f,...hr(l,n),children:h},qo(l,d)):e("div",{className:`orb-metric-progress-row${f?" is-active":""}`,role:"listitem",...hr(l,n),children:h},qo(l,d))})})},_C=({type:t,data:o,activeId:r,onItemClick:n,interactions:a,valueFormatter:i,secondaryValueFormatter:s,colors:l,ariaLabel:d})=>{let{min:p,max:m,range:f}=_m(o),h=bs-Ut.left-Ut.right,u=Mn-Ut.top-Ut.bottom,v=Ut.top+m/f*u,y=Math.max(1,Math.ceil(o.length/6)),g=o.map((C,k)=>FC(k,C,o)),x=g.map(C=>`${C.x},${C.y}`).join(" "),b=Math.max(...o.map(C=>Math.max(to(C.secondaryValue),0)),1);return e("div",{className:"orb-metric-svg-wrap",children:c("svg",{className:"orb-metric-svg",viewBox:`0 0 ${bs} ${Mn}`,role:"img","aria-label":d,children:[e("line",{className:"orb-metric-axis",x1:Ut.left,y1:v,x2:bs-Ut.right,y2:v}),e("line",{className:"orb-metric-grid",x1:Ut.left,y1:Ut.top,x2:Ut.left,y2:Mn-Ut.bottom}),t==="column"&&o.map((C,k)=>{let S=g[k],T=to(C.value),I=Math.max(Math.abs(S.y-v),T===0?2:0),w=S.x-Math.min(18,h/Math.max(o.length*2,1)),M=Math.min(36,Math.max(10,h/Math.max(o.length*1.8,1))),A=r===C.id;return c("g",{...Xl({item:C,onItemClick:n,interactions:a}),"aria-label":`${C.label}: ${i(T)}`,children:[e("rect",{className:`orb-metric-column${A?" is-active":""}`,x:w,y:Math.min(S.y,v),width:M,height:I,rx:4,fill:fr(C,k,l)}),c("title",{children:[C.label,": ",i(T)]}),(k%y===0||o.length<=6)&&e("text",{className:"orb-metric-svg-label",x:S.x,y:Mn-14,textAnchor:"middle",children:$m(C.label)})]},qo(C,k))}),(t==="line"||t==="scatter"||t==="bubble")&&c(jsxRuntime.Fragment,{children:[t==="line"&&e("polyline",{className:"orb-metric-line",fill:"none",points:x,stroke:l[0]}),o.map((C,k)=>{let S=g[k],T=r===C.id,I=t==="bubble"?7+Math.max(to(C.secondaryValue),0)/b*12:t==="scatter"?5:4;return c("g",{...Xl({item:C,onItemClick:n,interactions:a}),"aria-label":`${C.label}: ${i(to(C.value))}`,children:[t==="line"&&e("circle",{className:`orb-metric-point${T?" is-active":""}`,cx:S.x,cy:S.y,r:T?6:4,fill:fr(C,k,l)}),t!=="line"&&e("circle",{className:`orb-metric-point${T?" is-active":""}`,cx:S.x,cy:S.y,r:I,fill:fr(C,k,l),opacity:t==="bubble"?.82:.9}),c("title",{children:[C.label,": ",i(to(C.value)),t==="bubble"&&C.secondaryValue!==void 0?` \xB7 Size: ${s(to(C.secondaryValue))}`:""]}),(k%y===0||o.length<=6)&&e("text",{className:"orb-metric-svg-label",x:S.x,y:Math.max(Ut.top+8,S.y-I-7),textAnchor:"middle",children:$m(C.label)})]},qo(C,k))})]}),e("text",{className:"orb-metric-axis-label",x:Ut.left,y:Ut.top-5,children:i(m)}),p<0&&e("text",{className:"orb-metric-axis-label",x:Ut.left,y:Mn-Ut.bottom+14,children:i(p)})]})})},GC=({type:t,data:o,activeId:r,onItemClick:n,interactions:a,valueFormatter:i,colors:s,ariaLabel:l})=>{let d=o.map(u=>({...u,value:Math.max(to(u.value),0)})),p=d.reduce((u,v)=>u+v.value,0),m=72,f=92,h=0;return c("div",{className:"orb-metric-circular",children:[c("svg",{className:"orb-metric-donut",viewBox:"0 0 184 184",role:"img","aria-label":l,children:[d.map((u,v)=>{let y=u.value/p*360,g=h;h+=y;let x=r===u.id,b=y>=359.9?void 0:BC(f,f,m,t==="donut"?46:0,g,g+y),C=Xl({item:u,onItemClick:n,interactions:a});return b?e("path",{className:`orb-metric-slice${x?" is-active":""}`,d:b,fill:fr(u,v,s),...C,children:c("title",{children:[u.label,": ",i(u.value)," (",(u.value/p*100).toFixed(1),"%)"]})},qo(u,v)):e("circle",{className:`orb-metric-slice${x?" is-active":""}`,cx:f,cy:f,r:t==="donut"?60:m,fill:t==="donut"?"none":fr(u,v,s),stroke:t==="donut"?fr(u,v,s):void 0,strokeWidth:28,...C,children:c("title",{children:[u.label,": ",i(u.value)," (100%)"]})},qo(u,v))}),t==="donut"&&e("circle",{cx:f,cy:f,r:44,fill:"var(--orb-surface)"}),t==="donut"&&e("text",{className:"orb-metric-donut-total",x:f,y:f+5,textAnchor:"middle",children:i(p)})]}),e("div",{className:"orb-metric-legend",role:"list","aria-label":"Chart legend",children:d.map((u,v)=>{let y=r===u.id;return c("button",{type:"button",className:`orb-metric-legend-item${y?" is-active":""}`,onClick:()=>n?.(u),disabled:!n,title:u.label,...hr(u,a),children:[e("span",{className:"orb-metric-legend-dot",style:{backgroundColor:fr(u,v,s)}}),e("span",{className:"orb-metric-legend-label",children:u.label}),c("strong",{children:[(u.value/p*100).toFixed(0),"%"]})]},qo(u,v))})})]})},UC=({data:t,activeId:o,onItemClick:r,interactions:n,valueFormatter:a,secondaryValueFormatter:i})=>e("div",{className:"orb-metric-list",role:"list","aria-label":"Chart data",children:t.map((s,l)=>{let d=c(jsxRuntime.Fragment,{children:[e("span",{className:"orb-metric-list-label",title:s.label,children:s.label}),e("span",{className:"orb-metric-list-value",children:a(to(s.value))}),s.secondaryValue!==void 0&&e("span",{className:"orb-metric-list-secondary",children:i(to(s.secondaryValue))})]});return r?e("button",{type:"button",className:`orb-metric-list-row${o===s.id?" is-active":""}`,onClick:()=>r(s),"aria-pressed":o===s.id,...hr(s,n),children:d},qo(s,l)):e("div",{className:`orb-metric-list-row${o===s.id?" is-active":""}`,role:"listitem",...hr(s,n),children:d},qo(s,l))})}),Cs=({title:t,subtitle:o,data:r=[],chartType:n="bar",onChartTypeChange:a,onItemClick:i,onDataDetails:s,activeId:l,valueFormatter:d=Wm,secondaryValueFormatter:p=Wm,valueLabel:m,secondaryValueLabel:f,emptyState:h,loading:u=false,error:v,maxItems:y=8,showChartTypeControl:g=true,showDataDetails:x=true,dataRevealDelayMs:b=1e3,chartTypeOptions:C,chartTypeLabels:k,footer:S,ariaLabel:T,className:I,style:w,sx:M})=>{let A=$s(),R=eo.useRef(null),D=eo.useRef(null),[E,O]=eo.useState(n),[_,J]=eo.useState(false),[F,V]=eo.useState(null),[z,X]=eo.useState(null);eo.useEffect(()=>O(n),[n]);let W=eo.useCallback(()=>{D.current!==null&&(window.clearTimeout(D.current),D.current=null);},[]);eo.useEffect(()=>W,[W]),eo.useEffect(()=>{if(!z)return;let q=De=>{let Ce=De.target;Ce instanceof HTMLElement&&Ce.closest(".orb-metric-context-menu")||X(null);};return document.addEventListener("pointerdown",q),()=>document.removeEventListener("pointerdown",q)},[z]);let H=E,U=eo.useMemo(()=>[A.chart1,A.chart2,A.chart3,A.chart4,A.chart5,A.chart6],[A]),Y=eo.useMemo(()=>_?r:r.slice(0,Math.max(1,y)),[r,y,_]),ue=Math.max(0,r.length-Y.length),re=Y.some(q=>to(q.value)>0),ge=Y.length>0&&(H!=="pie"&&H!=="donut"?true:re),we=(C??[H,"bar","column","line","pie","donut","scatter","bubble","list"]).filter((q,De,Ce)=>ys.includes(q)&&Ce.indexOf(q)===De),Ve={...OC,...k},Te=Y[0],Ie=T??`${t} ${Ve[H]} chart`,He=q=>{O(q),a?.(q);},ce=eo.useCallback((q,De)=>{V({item:q,source:De}),X(null),s?.(q,De);},[s]),be=eo.useCallback(q=>{W(),!(!x||z)&&(D.current=window.setTimeout(()=>{ce(q,"hover"),D.current=null;},Math.max(0,b)));},[W,z,b,ce,x]),We=eo.useCallback(()=>{W();},[W]),tt=eo.useCallback((q,De)=>{if(!x)return;q.preventDefault(),W();let Ce=R.current?.getBoundingClientRect(),Fe=Ce?vs(q.clientX-Ce.left,8,Math.max(8,Ce.width-164)):8,at=Ce?vs(q.clientY-Ce.top,8,Math.max(8,Ce.height-72)):8;X({item:De,left:Fe,top:at});},[W,x]),nt=x?{onItemHoverStart:be,onItemHoverEnd:We,onItemContextMenu:tt}:void 0,it=H==="metric"?c("div",{className:"orb-metric-kpi",role:i?"button":"img",tabIndex:i?0:void 0,onClick:()=>Te&&i?.(Te),onKeyDown:q=>{Te&&i&&(q.key==="Enter"||q.key===" ")&&(q.preventDefault(),i(Te));},"aria-label":Ie,...Te?hr(Te,nt):{},children:[e("span",{className:"orb-metric-kpi-label",children:Te?.label??m??"Value"}),e("strong",{children:Te?d(to(Te.value)):"\u2014"}),Te?.secondaryValue!==void 0&&c("span",{className:"orb-metric-kpi-secondary",children:[f??"Compared with"," \xB7 ",p(to(Te.secondaryValue))]})]}):H==="progress"?e($C,{data:Y,activeId:l,onItemClick:i,interactions:nt,valueFormatter:d,colors:U}):H==="bar"?e(WC,{data:Y,activeId:l,onItemClick:i,interactions:nt,valueFormatter:d,colors:U}):H==="list"?e(UC,{data:Y,activeId:l,onItemClick:i,interactions:nt,valueFormatter:d,secondaryValueFormatter:p}):H==="pie"||H==="donut"?e(GC,{type:H,data:Y,activeId:l,onItemClick:i,interactions:nt,valueFormatter:d,colors:U,ariaLabel:Ie}):e(_C,{type:H,data:Y,activeId:l,onItemClick:i,interactions:nt,valueFormatter:d,secondaryValueFormatter:p,colors:U,ariaLabel:Ie});return c("div",{ref:R,className:"orb-metric-chart-shell",onMouseLeave:()=>{W(),F?.source==="hover"&&V(null);},children:[c(Ae,{elevation:1,variant:"outlined",className:`orb-metric-chart-card ${I??""}`,style:w,sx:M,children:[c("div",{className:"orb-metric-chart-header",children:[c("div",{className:"orb-metric-chart-heading",children:[e(L,{variant:"subtitle1",component:"h3",noWrap:true,title:t,children:t}),o&&e(L,{variant:"caption",muted:true,component:"div",noWrap:true,children:o})]}),g&&we.length>1&&e(zt,{"aria-label":`${t} chart type`,className:"orb-metric-chart-select",value:H,options:we.map(q=>({value:q,label:Ve[q]})),onChange:q=>He(q.target.value),minWidth:108,fullWidth:false,size:"small"})]}),c("div",{className:"orb-metric-chart-body",children:[e(VC,{loading:u,error:v,hasData:ge,emptyState:h,children:it}),ue>0&&!u&&!v&&e("button",{type:"button",className:"orb-metric-more",onClick:()=>J(q=>!q),children:_?"Show fewer":`Show all ${r.length}`})]}),S&&e("div",{className:"orb-metric-chart-footer",children:S})]}),z&&c("div",{className:"orb-metric-context-menu",role:"menu",onMouseEnter:W,onKeyDown:q=>{q.key==="Escape"&&X(null);},style:{left:z.left,top:z.top},onPointerDown:q=>q.stopPropagation(),children:[e("div",{className:"orb-metric-context-label",children:z.item.label}),e("button",{type:"button",role:"menuitem",onClick:q=>{q.preventDefault(),q.stopPropagation(),ce(z.item,"contextmenu");},children:"Show data"})]}),F&&c("div",{className:"orb-metric-data-details",role:"dialog","aria-label":`${F.item.label} data details`,onPointerDown:q=>q.stopPropagation(),children:[c("div",{className:"orb-metric-data-details-header",children:[e("strong",{children:F.item.label}),e("button",{type:"button","aria-label":"Close data details",onClick:()=>V(null),children:"\xD7"})]}),c("div",{className:"orb-metric-data-details-row",children:[e("span",{children:m??"Value"}),e("strong",{children:d(to(F.item.value))})]}),F.item.secondaryValue!==void 0&&c("div",{className:"orb-metric-data-details-row",children:[e("span",{children:f??"Secondary value"}),e("strong",{children:p(to(F.item.secondaryValue))})]}),e("span",{className:"orb-metric-data-details-hint",children:F.source==="hover"?`Shown after ${Math.max(0,b)/1e3} seconds of stillness`:"Shown from the context menu"})]})]})};Cs.displayName="CMetricChartCard";P();var KC=({messageId:t,cardHooks:o,valueSuffix:r,secondaryValueSuffix:n,...a})=>{let i=(l,d)=>{o?.onCardEvent?.({messageId:t,cardType:"metric-chart-card",action:l,title:a.title,payload:d,rawData:a});},s=(l,d)=>`${l.toLocaleString()}${d??""}`;return e(Cs,{...a,valueFormatter:l=>s(l,r),secondaryValueFormatter:l=>s(l,n),onChartTypeChange:l=>i("action",{chartType:l}),onItemClick:l=>i("action",{item:l}),onDataDetails:(l,d)=>i("show-data",{item:l,source:d})})},xs=KC;P();var qC=({type:t,manifest:o})=>c("div",{className:"w-full overflow-hidden rounded-lg border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-sm transition-all hover:shadow-md",children:[c("div",{className:"flex items-center px-4 py-3 border-b border-[var(--orb-border)] bg-[var(--orb-p50)]",children:[e("div",{className:"w-4 h-4 mr-2 text-[var(--orb-status-primary)]"}),c("h3",{className:"text-sm font-semibold text-[var(--orb-fg)]",children:["SAP Card: ",t]})]}),e("div",{className:"p-4",children:e("div",{className:"bg-[var(--orb-surface)] dark:bg-[var(--orb-canvas)] p-3 rounded border border-[var(--orb-border)] overflow-x-auto",children:e("pre",{className:"text-xs font-mono text-[var(--orb-muted)] whitespace-pre-wrap",children:JSON.stringify(o,null,2)})})})]}),ws=qC;var XC=t=>Array.isArray(t)?t.flatMap((o,r)=>{if(!o||typeof o!="object")return [];let n=o,a=String(n.label??n.name??n.id??`Item ${r+1}`),i=Number(n.value),s=Number.isFinite(i)?i:0,l=n.secondaryValue===void 0?void 0:Number(n.secondaryValue);return [{id:String(n.id??n.name??n.label??r),label:a,value:s,...l!==void 0&&Number.isFinite(l)?{secondaryValue:l}:{},...typeof n.color=="string"?{color:n.color}:{}}]}):[],Ss=t=>{let o;try{o=JSON.parse(t);}catch{return null}if(o&&typeof o=="object"){if(o.type==="metric-chart-card"&&o.title&&Array.isArray(o.data)){let r=ys.includes(o.chartType)?o.chartType:"bar";return {...o,type:"metric-chart-card",chartType:r,data:XC(o.data)}}if((o.type==="bar-chart-card"||o.type==="line-chart-card"||o.type==="pie-chart-card"||o.type==="combo-chart-card"||o.type==="heatmap-chart-card"||o.type==="fishbone-chart-card"||o.type==="waterfall-chart-card"||o.type==="google-map-card"||o.type==="amap-card")&&o.title||(o.type==="sap-analytical-card"||o.type==="sap-list-card"||o.type==="sap-object-card"||o.type==="sap-component-card")&&o.manifest||o.type==="error-card"||o.type==="warning-card"||o.type==="suggestions-card"||o.type==="tool-result-card"||o.type==="table"&&o.data)return o}return null};P();var tx=({content:t,theme:o,size:r="base",className:n,enableCodeHighlight:a=true,enableMermaid:i=true,messageId:s,cardHooks:l})=>{let d=eo.useRef(l);d.current=l;let p=!!l?.onCardEvent,m=eo.useMemo(()=>p?{onCardEvent:y=>d.current?.onCardEvent?.(y)}:void 0,[p]),f=eo.useMemo(()=>t?t.replace(/<think>([\s\S]*?)<\/think>/g,(y,g)=>`<div data-component="thinkbox" data-think-content="${encodeURIComponent(g.trim())}"></div>`):"",[t]),h=(y,g,x,b,C)=>{m?.onCardEvent?.({messageId:s,cardType:y,action:g,title:x,payload:b,rawData:C});},u=(y,g,x,b,C,k)=>{if(!(!C&&!m?.onCardEvent))return (...S)=>{let T=C?.(...S),I=k?k(...S):void 0;return h(y,g,x,I,b),T}},v=eo.useMemo(()=>({div(y){let{"data-component":g,"data-think-content":x,...b}=y;return g==="thinkbox"&&x?e(Im,{content:decodeURIComponent(x),theme:o,size:r,defaultExpanded:false}):e("div",{...b})},table({children:y}){return e("div",{className:"my-4 w-full overflow-x-auto rounded-lg border border-[var(--orb-border)]",children:e("table",{className:"w-full min-w-[520px] border-collapse text-sm",children:y})})},thead({children:y}){return e("thead",{className:"bg-[color-mix(in_oklch,var(--orb-surface)_60%,transparent)]",children:y})},tbody({children:y}){return e("tbody",{className:"bg-[var(--orb-canvas)] dark:bg-[var(--orb-canvas)]",children:y})},tr({children:y}){return e("tr",{className:"border-b border-[var(--orb-border)] last:border-b-0",children:y})},th({children:y,align:g}){return e("th",{className:`px-3 py-2 font-semibold text-[var(--orb-fg)] ${g==="center"?"text-center":g==="right"?"text-right":"text-left"}`,children:y})},td({children:y,align:g}){return e("td",{className:`px-3 py-2 text-[var(--orb-fg)] align-top ${g==="center"?"text-center":g==="right"?"text-right":"text-left"}`,children:y})},code({className:y,children:g,...x}){let b=/language-([\w-]+)/.exec(y||""),C=b?b[1]:"",k=String(g);if(!b&&!k.includes(`
|
|
199
|
-
`))return e("code",{children:g});let T=k.replace(/\n$/,"");if(i&&C==="mermaid")return e(Om,{content:T});if(C==="html"||C==="htm")return e(Am,{content:T});if(C==="json"){let I=Ss(T);if(I)switch(I.type){case "table":return e(ms,{data:I.data});case "metric-chart-card":return e(xs,{...I,messageId:s,cardHooks:m});case "bar-chart-card":case "line-chart-card":case "pie-chart-card":case "combo-chart-card":case "heatmap-chart-card":case "fishbone-chart-card":case "waterfall-chart-card":case "google-map-card":case "amap-card":return e(gs,{...I});case "sap-analytical-card":case "sap-list-card":case "sap-object-card":case "sap-component-card":return e(ws,{...I});case "error-card":{let w=I;return e(cs,{...w,onClose:u("error-card","close",w.title,w,w.onClose),onRetry:u("error-card","retry",w.title,w,w.onRetry)})}case "warning-card":{let w=I,M=w.onConfirm?u("warning-card","confirm",w.title,w,w.onConfirm):w.actionText&&m?.onCardEvent?u("warning-card","confirm",w.title,w):void 0;return e(ds,{...w,onClose:u("warning-card","close",w.title,w,w.onClose),onConfirm:M})}case "suggestions-card":{let w=I;return e(ps,{...w,onClose:u("suggestions-card","close",w.title,w,w.onClose),onSuggestionClick:u("suggestions-card","suggestion-click",w.title,w,w.onSuggestionClick,M=>({suggestion:M}))})}case "tool-result-card":{let w=I;return e(us,{...w,onClose:u("tool-result-card","close",w.title,w,w.onClose),onAction:u("tool-result-card","action",w.title,w,w.onAction)})}}}return a?e(Rm,{content:T,language:C,className:"not-prose"}):e("code",{className:y,...x,children:g})}}),[o,r,i,a,m,s]);return e("div",{className:ut("markdown-body max-w-none",n),children:e(ZC__default.default,{remarkPlugins:[jC__default.default,QC__default.default],rehypePlugins:[JC__default.default,ex__default.default],components:v,children:f})})},Dn=tx;P();var ox=({content:t,messageId:o,cardHooks:r})=>{let n=(s,l,d,p,m)=>{r?.onCardEvent?.({messageId:o,cardType:s,action:l,title:d,payload:p,rawData:m});},a=(s,l,d,p,m,f)=>{if(!(!m&&!r?.onCardEvent))return (...h)=>{let u=m?.(...h),v=f?f(...h):void 0;return n(s,l,d,v,p),u}},i=Ss(t);if(i)switch(i.type){case "table":return e(ms,{data:i.data});case "metric-chart-card":return e(xs,{...i,messageId:o,cardHooks:r});case "bar-chart-card":case "line-chart-card":case "pie-chart-card":case "combo-chart-card":case "heatmap-chart-card":case "fishbone-chart-card":case "waterfall-chart-card":case "google-map-card":case "amap-card":return e(gs,{...i});case "sap-analytical-card":case "sap-list-card":case "sap-object-card":case "sap-component-card":return e(ws,{...i});case "error-card":{let s=i;return e(cs,{...s,onClose:a("error-card","close",s.title,s,s.onClose),onRetry:a("error-card","retry",s.title,s,s.onRetry)})}case "warning-card":{let s=i,l=s.onConfirm?a("warning-card","confirm",s.title,s,s.onConfirm):s.actionText&&r?.onCardEvent?a("warning-card","confirm",s.title,s):void 0;return e(ds,{...s,onClose:a("warning-card","close",s.title,s,s.onClose),onConfirm:l})}case "suggestions-card":{let s=i;return e(ps,{...s,onClose:a("suggestions-card","close",s.title,s,s.onClose),onSuggestionClick:a("suggestions-card","suggestion-click",s.title,s,s.onSuggestionClick,l=>({suggestion:l}))})}case "tool-result-card":{let s=i;return e(us,{...s,onClose:a("tool-result-card","close",s.title,s,s.onClose),onAction:a("tool-result-card","action",s.title,s,s.onAction)})}}return e("div",{className:"dynamic-card-fallback",children:e(Dn,{content:t,enableCodeHighlight:true,enableMath:true,enableMermaid:true,messageId:o,cardHooks:r})})},Gm=ox;P();var Zl=class{static analyze(o){if(!o.trim())return {blocks:[],hasComplexContent:false,overallType:"simple"};let n=/```json\s*\{\s*"type":\s*"[^"]+"/g.test(o),a=/<[^>]+>[\s\S]*?<\/[^>]+>/.test(o),i=o.includes("NQ#")||o.includes("data-component");return n||a||i?{blocks:[{type:"mixed",content:o,startIndex:0,endIndex:o.length}],hasComplexContent:true,overallType:"complex"}:{blocks:[{type:"markdown",content:o,startIndex:0,endIndex:o.length}],hasComplexContent:false,overallType:"simple"}}},nx=({content:t,className:o="",messageId:r,cardHooks:n})=>{let a=eo__namespace.default.useMemo(()=>Zl.analyze(t),[t]);return e("div",{className:`universal-content-renderer ${o}`,children:a.blocks.map((i,s)=>i.type==="mixed"||i.type==="json-card"?e(Gm,{content:i.content,messageId:r,cardHooks:n},`block-${s}`):e(Dn,{content:i.content,enableCodeHighlight:true,enableMath:true,enableMermaid:true,messageId:r,cardHooks:n},`block-${s}`))})},ks=nx;P();var ax=({content:t,isStreaming:o=true,onComplete:r,className:n="",streamIntervalMs:a=24,streamChunkSize:i=3,messageId:s,cardHooks:l})=>{let[d,p]=eo.useState(o?0:t.length),[m,f]=eo.useState(!o);eo.useEffect(()=>{if(o){p(0),f(false);return}p(t.length),f(true);},[t,o]),eo.useEffect(()=>{if(!o||m)return;if(d>=t.length){f(true),r?.();return}let g=window.setTimeout(()=>{p(x=>Math.min(x+i,t.length));},a);return ()=>{window.clearTimeout(g);}},[t.length,m,o,r,i,a,d]);let h=()=>{o&&!m&&(p(t.length),f(true),r?.());},u=o?t.slice(0,d):t,v=o&&!m,y=o&&!m;return c("div",{className:`streaming-markdown ${n}`,onClick:h,style:{cursor:o?"pointer":"default"},children:[c("div",{className:"relative",children:[e(ks,{content:u,messageId:s,cardHooks:l}),v&&e("span",{className:"inline-block w-[2px] h-[13px] ml-0.5 animate-pulse",style:{verticalAlign:"text-bottom",backgroundColor:"var(--orb-primary, #154194)"}})]}),y&&e("div",{className:"streaming-hint",style:{fontSize:"9px",color:"var(--orb-muted)",marginTop:"8px",fontStyle:"italic",opacity:.7},children:"\u70B9\u51FB\u6B64\u5904\u663E\u793A\u5B8C\u6574\u5185\u5BB9"})]})},qm=ax;P();var Xm=({buttons:t,className:o})=>{let r=n=>{switch(n){case "copy":return e(Yo,{size:14});case "refresh":return e($a,{size:14});case "volume":return e(cd,{size:14});case "like":return e(ad,{size:14});case "dislike":return e(nd,{size:14});default:return null}};return e("div",{className:ut("flex items-center gap-1",o),children:t.map((n,a)=>e("button",{onClick:n.onClick,disabled:n.disabled,"aria-busy":n.loading||void 0,className:ut("p-1.5 rounded-md transition-colors","text-[var(--orb-muted)] hover:text-[var(--orb-fg)] dark:text-[var(--orb-muted)] dark:hover:text-[var(--orb-fg)]","hover:bg-[var(--orb-hover)]","disabled:opacity-50 disabled:cursor-not-allowed",n.active&&"text-[var(--orb-primary)] bg-[var(--orb-p50)]",n.type==="refresh"&&n.loading&&"animate-spin"),title:n.type,type:"button",children:r(n.type)},`${n.type}-${a}`))})};P();var Ps=({message:t,onStreamingComplete:o,assistantActions:r,streamIntervalMs:n,streamChunkSize:a,cardHooks:i})=>{let s={lineHeight:1.55,fontSize:13,fontWeight:300,fontFamily:'var(--orb-font, "Montserrat", system-ui, sans-serif)',color:"var(--orb-fg, #555555)",borderRadius:"var(--orb-r, 10px)",padding:"10px 14px"},l={marginTop:6,fontSize:11,color:"var(--orb-muted, #8c8c8c)"};if(t.type==="assistant"){let d=!!(r?.isResponding||t.isStreaming);return e("div",{className:"mb-4 flex justify-start",children:c("div",{className:"mr-auto w-full",style:{...s,background:"var(--orb-surface, #f5f5f5)",border:"1px solid var(--orb-border, #dbdbdb)"},children:[e(qm,{content:t.content,isStreaming:t.isStreaming??false,onComplete:o,streamIntervalMs:n,streamChunkSize:a,messageId:t.id,cardHooks:i}),t.content&&r?.isLatestAssistant&&e("div",{className:"mt-3 flex flex-row justify-start gap-2 border-t pt-2",style:{borderColor:"var(--orb-border, #dbdbdb)"},children:e(Xm,{buttons:[{type:"refresh",onClick:()=>{r?.onRegenerate?.();},disabled:d||!r?.onRegenerate,loading:d},{type:"copy",onClick:()=>navigator.clipboard.writeText(t.content),disabled:false},{type:"volume",onClick:()=>console.log("\u8BED\u97F3\u64AD\u653E"),disabled:false},{type:"like",onClick:()=>console.log("\u70B9\u8D5E"),disabled:false},{type:"dislike",onClick:()=>console.log("\u70B9\u8E29"),disabled:false}],size:"sm",variant:"default"})}),e("div",{style:l,children:t.timestamp.toLocaleTimeString()})]})})}return e("div",{className:"mb-4 flex justify-end",children:c("div",{className:"ml-auto max-w-[80%]",style:{...s,background:"var(--orb-p50, #eef2f9)",border:"1px solid var(--orb-p100, #e4e9f5)"},children:[e("div",{className:"whitespace-pre-wrap",children:t.content}),e("div",{style:l,children:t.timestamp.toLocaleTimeString()})]})})};P();var Ym=({onTextUpdate:t,onComplete:o,onCancel:r,disabled:n,className:a})=>{let{isRecording:i,startRecording:s,stopRecording:l}=wn({onTextUpdate:t,onComplete:p=>{o?.(p);},onError:p=>{console.error("Voice input error:",p),r?.();}});return e("button",{onClick:async()=>{i?l():await s();},disabled:n,className:ut("transition-all duration-200 flex items-center justify-center rounded-full",i?"bg-[color-mix(in_oklch,var(--orb-status-error)_12%,transparent)] text-[var(--orb-status-error)] hover:bg-[color-mix(in_oklch,var(--orb-status-error)_20%,transparent)] animate-pulse":"bg-transparent hover:bg-[var(--orb-hover)] text-[var(--orb-muted)] active:scale-95",n&&"opacity-50 cursor-not-allowed",a),title:i?"Stop recording":"Start recording",type:"button",children:i?e(gp,{size:16}):e(fp,{size:16})})};P();var po={container:"w-full max-w-4xl mx-auto",inputContainer:ut("w-full flex flex-col border border-[var(--orb-border,#dbdbdb)] bg-[color-mix(in_oklch,var(--orb-canvas)_64%,transparent)] backdrop-blur-[28px] transition-colors duration-200","orb-agent-input","focus-within:border-[var(--orb-primary,#154194)] focus-within:ring-1 focus-within:ring-[var(--orb-focus-ring,#e4e9f5)]"),dragActive:"border-[var(--orb-primary,#154194)] bg-[var(--orb-p50,#eef2f9)]",textareaWrapper:"flex-1 relative flex items-center",textarea:ut("w-full outline-none appearance-none resize-none bg-transparent border-none text-sm font-normal py-3 px-3","placeholder:text-[var(--orb-muted,#8c8c8c)] placeholder:font-normal","text-[var(--orb-fg,#555555)] selection:bg-[var(--orb-p100,#e4e9f5)]","focus:ring-0 focus:outline-none focus:border-none focus:shadow-none","min-h-[44px] max-h-[12em] overflow-y-auto scrollbar-thin scrollbar-thumb-[var(--orb-border)]"),filePreviewArea:"px-4 pt-3 pb-1 flex flex-wrap gap-2",fileTag:ut("flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs font-medium","bg-[var(--orb-surface,#f5f5f5)] text-[var(--orb-fg,#555555)]","border border-[var(--orb-border,#dbdbdb)]","transition-all hover:bg-[var(--orb-hover,#eef2f9)]"),buttonBase:"flex items-center justify-center transition-all duration-200 rounded-full",buttonSmall:"h-[38px] w-[38px] shrink-0 md:h-8 md:w-8",buttonNormal:ut("bg-transparent hover:bg-[var(--orb-hover,#eef2f9)] text-[var(--orb-muted,#8c8c8c)] hover:text-[var(--orb-fg,#555555)]","cursor-pointer active:scale-95"),sendButton:ut("cursor-pointer bg-[var(--orb-primary,#154194)] hover:bg-[var(--orb-p600,#0e2d63)] text-[var(--orb-on-primary)] shadow-none active:scale-95"),sendButtonDisabled:ut("cursor-not-allowed opacity-40 bg-[var(--orb-disabled-bg,#f5f5f5)] text-[var(--orb-disabled-fg,#8c8c8c)]"),stopButton:ut("cursor-pointer bg-[var(--orb-err,#c43f02)] hover:opacity-90 text-[var(--orb-on-primary)] shadow-none active:scale-95")},sx={padding:0,lineHeight:"1.5",border:"none !important",boxShadow:"none !important",backgroundColor:"transparent",height:"auto",fontFeatureSettings:'"liga" 1, "kern" 1',WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},lx=({enabled:t,onClick:o})=>{let{t:r}=le();return e("button",{className:ut(po.buttonBase,po.buttonSmall,po.buttonNormal),onClick:o,disabled:!t,"aria-label":r("omph.input.upload"),type:"button",children:e(qd,{size:16})})},cx=({canSend:t,isResponding:o,onSend:r,onStop:n})=>{let{t:a}=le();return o?e("button",{className:ut(po.buttonBase,po.buttonSmall,po.stopButton),onClick:n,"aria-label":a("omph.input.stop"),type:"button",children:e(kp,{size:15})}):e("button",{className:ut(po.buttonBase,po.buttonSmall,t?po.sendButton:po.sendButtonDisabled),onClick:r,disabled:!t,"aria-label":a("omph.input.send"),type:"button",children:e(yp,{size:16,className:t?"text-[var(--orb-on-primary,#ffffff)]":"text-[var(--orb-disabled-fg,#8c8c8c)]"})})},jl=({onSend:t,onStop:o,isResponding:r=false,placeholder:n,getText:a})=>{let[i,s]=eo.useState(""),[l,d]=eo.useState([]),[p,m]=eo.useState(false),[f,h]=eo.useState(false),u=eo.useRef(null),{t:v}=le(),y=v("omph.input.placeholder"),g=y!=="omph.input.placeholder"?y:"Type a message...",x=n||(a?a("00019",g):g),b=(i.trim().length>0||l.length>0)&&!r,C={enabled:true},k=eo.useCallback(V=>{s(V.target.value),V.target.style.height="auto",V.target.style.height=`${Math.min(V.target.scrollHeight,200)}px`;},[]),S=eo.useCallback(V=>{if(V.target.files&&V.target.files.length>0){let z=Array.from(V.target.files);d(X=>{let W=z.filter(U=>X.some(Y=>Y.name===U.name&&Y.size===U.size));W.length>0&&console.warn("Duplicate files ignored:",W.map(U=>U.name));let H=z.filter(U=>!X.some(Y=>Y.name===U.name&&Y.size===U.size));return [...X,...H]}),u.current&&(u.current.value="");}},[]),T=eo.useCallback(V=>{d(z=>z.filter((X,W)=>W!==V));},[]),I=eo.useCallback(()=>{u.current?.click();},[]),w=eo.useCallback(async()=>{if(!b)return;let V=i,z=[...l];s(""),d([]),u.current&&(u.current.value="");try{await t(V,z);}catch(X){console.error("Failed to send message:",X),s(V),d(z);}},[i,b,t,l]),M=eo.useCallback(V=>{V.key==="Enter"&&!V.shiftKey&&!p&&(V.preventDefault(),w());},[w,p]),A=eo.useCallback(()=>{m(true);},[]),R=eo.useCallback(()=>{m(false);},[]),D=eo.useCallback(V=>{s(V);},[]),E=eo.useCallback(V=>{s(V);},[]),O=eo.useCallback(()=>{},[]),_=eo.useCallback(V=>{V.preventDefault(),h(true);},[]),J=eo.useCallback(V=>{V.preventDefault(),h(false);},[]),F=eo.useCallback(V=>{if(V.preventDefault(),h(false),V.dataTransfer.files&&V.dataTransfer.files.length>0){let z=Array.from(V.dataTransfer.files);d(X=>[...X,...z]);}},[]);return e("div",{className:po.container,children:c("div",{className:"relative",children:[e("input",{type:"file",multiple:true,className:"hidden",ref:u,onChange:S}),c("div",{className:ut(po.inputContainer,f&&po.dragActive),onDragOver:_,onDragLeave:J,onDrop:F,children:[l.length>0&&e("div",{className:po.filePreviewArea,children:l.map((V,z)=>c("div",{className:po.fileTag,children:[e(cp,{sx:{fontSize:16},className:"text-[var(--orb-primary)]"}),e("span",{className:"truncate max-w-[150px]",children:V.name}),e("button",{onClick:()=>T(z),className:"ml-1 hover:text-[var(--orb-status-error)] focus:outline-none",type:"button",children:e(tp,{sx:{fontSize:16}})})]},`${V.name}-${z}`))}),c("div",{className:"flex w-full flex-col p-2",children:[e("div",{className:ut(po.textareaWrapper,"min-h-[52px] px-2 pb-2 pt-1.5 md:min-h-[44px]"),children:e("textarea",{className:ut(po.textarea,"min-h-[24px] py-0 px-0"),placeholder:x,value:i,onChange:k,onKeyDown:M,onCompositionStart:A,onCompositionEnd:R,style:sx,"aria-label":v("omph.input.message"),spellCheck:false,rows:1})}),c("div",{className:"flex items-center justify-between px-1 pb-0.5",children:[e("div",{className:"flex items-center gap-1",role:"toolbar","aria-label":v("omph.input.tools"),children:e(lx,{enabled:C.enabled,onClick:I})}),c("div",{className:"flex items-center gap-1",children:[e(Ym,{onTextUpdate:D,onComplete:E,onCancel:O,disabled:r,className:po.buttonSmall}),e(cx,{canSend:b,isResponding:r,onSend:w,onStop:o})]})]})]})]})]})})};P();var jm=({messages:t,onSend:o,onStop:r,onRegenerate:n,isResponding:a=false,className:i,placeholder:s,streamIntervalMs:l,streamChunkSize:d,onMessageStreamingComplete:p,cardHooks:m,showInput:f=true,statusLine:h})=>{let u=eo.useRef(null),v=eo.useRef(t.length);return eo.useEffect(()=>{t.length>v.current&&u.current?.scrollIntoView({behavior:"smooth"}),v.current=t.length;},[t]),c("div",{className:ut("flex flex-col h-full w-full relative",i),children:[c("div",{className:"flex-1 overflow-y-auto px-4 py-4 space-y-6 scrollbar-thin scrollbar-thumb-[var(--orb-border)]",children:[t.map((y,g)=>{let x=y.type==="assistant"&&g===t.length-1,b=y.type==="assistant"?{isLatestAssistant:x,isResponding:a,onRegenerate:n?()=>n(y.id):void 0}:void 0;return e(Ps,{message:y,assistantActions:b,onStreamingComplete:()=>p?.(y.id),streamIntervalMs:l,streamChunkSize:d,cardHooks:m},y.id)}),h,e("div",{ref:u})]}),f&&e("div",{className:"border-t border-[var(--orb-border,#dbdbdb)] bg-[var(--orb-canvas,#ffffff)] p-4 z-10",children:e(jl,{onSend:o||(async()=>{}),onStop:r||(()=>{}),isResponding:a,placeholder:s})})]})};P();var Qm={idle:"Idle",running:"Working",success:"Success",error:"Error",pending:"Pending"},Jm=({title:t="AI Agent",description:o,headerActions:r,className:n,agentStatus:a,statusText:i,onHeaderPointerDown:s,showInput:l=false,...d})=>{let p=a??(d.isResponding?"running":"idle"),m=p==="running"||p==="pending",f=[Qm[p],o].filter(Boolean).join(" \xB7 ");return c("div",{className:ut("orb-agent-panel",n),children:[c("div",{className:ut("orb-agent-header",s&&"cursor-grab active:cursor-grabbing"),onPointerDown:s,children:[e("span",{className:"orb-agent-avatar","aria-hidden":"true",children:"AI"}),c("div",{className:"min-w-0 flex-1",children:[e("div",{className:"orb-agent-title",children:t}),c("div",{className:"orb-agent-subtitle",children:[e("span",{className:"orb-agent-dot","data-active":m||void 0}),e("span",{className:"truncate",children:f||"Agent"})]})]}),r&&e("div",{className:"ml-auto flex flex-none items-center gap-1",children:r})]}),e("div",{className:"relative min-h-0 flex-1",children:e(jm,{...d,showInput:l,statusLine:m?c("div",{className:ut("orb-agent-status-line","mb-1"),children:[e("span",{className:"orb-agent-spinner","aria-hidden":"true"}),e("span",{children:i??`${Qm[p]}\u2026`})]}):void 0})})]})};P();var mx=t=>Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(t),tg=({conversations:t,activeConversationId:o,labels:r,onNewConversation:n,onSelectConversation:a})=>{let[i,s]=eo.useState(false),l=eo.useRef(null),d=eo.useRef(null),p=eo.useRef(null),m=eo.useId(),f=!!a;eo.useEffect(()=>{if(!i)return;let u=y=>{l.current?.contains(y.target)||s(false);},v=y=>{y.key==="Escape"&&(y.stopPropagation(),s(false),p.current?.focus());};return document.addEventListener("pointerdown",u),document.addEventListener("keydown",v),()=>{document.removeEventListener("pointerdown",u),document.removeEventListener("keydown",v);}},[i]),eo.useEffect(()=>{if(!i)return;let u=d.current?.querySelector('[aria-selected="true"]'),v=d.current?.querySelector('[role="option"]');(u??v)?.focus();},[i]);let h=u=>{let v=Array.from(d.current?.querySelectorAll('[role="option"]')??[]);if(v.length===0)return;let y=v.findIndex(x=>x===document.activeElement),g=y<0?u===1?0:v.length-1:(y+u+v.length)%v.length;v[g]?.focus();};return !n&&!f?null:c(jsxRuntime.Fragment,{children:[n&&e("button",{type:"button",className:"orb-omph-icon-btn","aria-label":r.newConversation,onClick:()=>{s(false),n();},children:e(en,{size:16})}),f&&a&&c("div",{className:"orb-omph-conversation-anchor",ref:l,children:[e("button",{ref:p,type:"button",className:"orb-omph-icon-btn","aria-label":r.conversationList,"aria-expanded":i,"aria-controls":m,onClick:()=>s(u=>!u),children:e(jc,{size:16})}),i&&e("div",{ref:d,id:m,className:"orb-omph-conversations",role:"listbox","aria-label":r.conversations,onKeyDown:u=>{u.key==="ArrowDown"?(u.preventDefault(),h(1)):u.key==="ArrowUp"&&(u.preventDefault(),h(-1));},children:t.length===0?e("p",{className:"orb-omph-conversation-empty",children:r.noConversations}):t.map(u=>{let v=u.updatedAt?mx(u.updatedAt):"",y=[u.preview,v].filter(x=>x&&x.length>0).join(" \xB7 "),g=u.id===o;return c("button",{type:"button",role:"option",className:"orb-omph-conversation","aria-selected":g,"data-active":g||void 0,onClick:()=>{a(u.id),s(false);},children:[e("span",{className:"orb-omph-conversation-title",children:u.title}),y&&e("span",{className:"orb-omph-conversation-meta",children:y})]},u.id)})})]})]})};P();var yx=2e3,Cx=1/3,Is=[.25,.5,.75,1,1.5,2,3,4],xx=100,og={color:"inherit",background:"transparent",textShadow:"none",fontFamily:"inherit",fontSize:"inherit",lineHeight:"inherit",textAlign:"left",wordSpacing:"normal",wordBreak:"normal",overflowWrap:"normal",tabSize:"inherit",hyphens:"none"},rg=({text:t,language:o,startLine:r,endLine:n,wrap:a,labels:i})=>{let s=eo.useRef(null),l=eo.useMemo(()=>{let m=t.split(`
|
|
200
|
-
`);
|
|
201
|
-
`),shownCount:f,total:m.length}},[t]),d=eo.useCallback(m=>{let f=n??r,h=r!==void 0&&f!==void 0&&m>=r&&m<=f;return {className:"orb-omph-code-line","data-line":m,...h?{"data-hit":"true"}:{}}},[n,r]);eo.useEffect(()=>{let m=s.current,f=m?.closest(".orb-omph-pv-body");if(!m||!f)return;if(r===void 0){f.scrollTop=0;return}let h=m.querySelector(`[data-line="${r}"]`);if(!h)return;let u=h.getBoundingClientRect().top-f.getBoundingClientRect().top+f.scrollTop;f.scrollTop=Math.max(0,u-f.clientHeight*Cx);},[r,l.shown]);let p={"--orb-omph-digits":String(l.shownCount).length};return c("div",{ref:s,className:"orb-omph-code","data-wrap":a||void 0,style:p,children:[e(reactSyntaxHighlighter.Prism,{language:o,useInlineStyles:false,PreTag:"div",CodeTag:"div",showLineNumbers:true,wrapLines:true,lineProps:d,customStyle:og,codeTagProps:{className:`language-${o}`,style:og},children:l.shown}),l.total>l.shownCount&&e("div",{className:"orb-omph-pv-note",children:i.previewTruncated(l.shownCount,l.total)})]})},ng=({text:t})=>e("div",{className:"orb-omph-pv-doc",children:e(Dn,{content:t})}),ag=({url:t,alt:o,labels:r})=>{let[n,a]=eo.useState("fit"),[i,s]=eo.useState(null),[l,d]=eo.useState(false),p=n==="fit"?1:n,m=Is.some(v=>v>p),f=Is.some(v=>v<p),h=v=>a(y=>{let g=y==="fit"?1:y;return (v>0?Is.find(b=>b>g):[...Is].reverse().find(b=>b<g))??y}),u=n==="fit"||i===null?{maxWidth:"100%",height:"auto"}:{width:i*n,maxWidth:"none",height:"auto"};return l?e("div",{className:"orb-omph-pv-note",role:"alert",children:o?`${r.imageFailed} \xB7 ${o}`:r.imageFailed}):c("div",{className:"orb-omph-img",children:[e("div",{className:"orb-omph-img-stage",children:e("img",{src:t,alt:o??"",draggable:false,style:u,onLoad:v=>s(v.currentTarget.naturalWidth),onError:()=>d(true)})}),c("div",{className:"orb-omph-img-zoom",role:"group","aria-label":r.zoomFit,children:[e("button",{type:"button","aria-label":r.zoomOut,disabled:!f,onClick:()=>h(-1),children:"\u2212"}),e("button",{type:"button","aria-label":r.zoomFit,"data-active":n==="fit"||void 0,onClick:()=>a("fit"),children:n==="fit"?r.zoomFit:`${Math.round(n*xx)}%`}),e("button",{type:"button","aria-label":r.zoomIn,disabled:!m,onClick:()=>h(1),children:"+"})]})]})};var wx=/^[a-z][a-z0-9+.-]*:/i,Sx=/^L(\d+)(?:-L?(\d+))?$/i;var ig=["B","KB","MB","GB"];var kx=t=>{try{return decodeURIComponent(t)}catch{return t}},ec=t=>{let o=t.trim();if(!o||o.startsWith("#")||o.startsWith("//")||wx.test(o))return null;let r=o.indexOf("#"),n=r>=0?o.slice(0,r):o,a=r>=0?o.slice(r+1):"",i=n.indexOf("?"),s=kx(i>=0?n.slice(0,i):n);if(!s||s.endsWith("/"))return null;let l=Sx.exec(a);if(!l)return {path:s};let d=Number(l[1]);if(d<1)return {path:s};let p=l[2]?Number(l[2]):d;return {path:s,startLine:d,endLine:Math.max(d,p)}},Rs=t=>t.split("/").filter(Boolean).pop()??t,lg=t=>{let o=t.split("/");return o.pop(),o.join("/")},tc=t=>{let o=Rs(t),r=o.lastIndexOf(".");return r>0?o.slice(r+1).toLowerCase():""},cg={prism:"text",label:"Text"},sg={ts:{prism:"typescript",label:"TypeScript"},tsx:{prism:"tsx",label:"TSX"},js:{prism:"javascript",label:"JavaScript"},mjs:{prism:"javascript",label:"JavaScript"},cjs:{prism:"javascript",label:"JavaScript"},jsx:{prism:"jsx",label:"JSX"},json:{prism:"json",label:"JSON"},py:{prism:"python",label:"Python"},java:{prism:"java",label:"Java"},go:{prism:"go",label:"Go"},rs:{prism:"rust",label:"Rust"},c:{prism:"c",label:"C"},h:{prism:"c",label:"C"},cpp:{prism:"cpp",label:"C++"},cs:{prism:"csharp",label:"C#"},sql:{prism:"sql",label:"SQL"},sh:{prism:"bash",label:"Shell"},bash:{prism:"bash",label:"Shell"},yml:{prism:"yaml",label:"YAML"},yaml:{prism:"yaml",label:"YAML"},xml:{prism:"markup",label:"XML"},html:{prism:"markup",label:"HTML"},css:{prism:"css",label:"CSS"},scss:{prism:"scss",label:"SCSS"},abap:{prism:"abap",label:"ABAP"},toml:{prism:"toml",label:"TOML"},ini:{prism:"ini",label:"INI"},md:{prism:"markdown",label:"Markdown"},csv:{prism:"text",label:"CSV"},log:{prism:"text",label:"Log"},txt:cg},oc=(t,o)=>o?Object.values(sg).find(n=>n.prism===o)??{prism:o,label:o}:sg[tc(t)]??cg,dg=t=>{let o=t,r=0;for(;o>=1024&&r<ig.length-1;)o/=1024,r+=1;return `${r>0&&o<10?o.toFixed(1):Math.round(o).toString()} ${ig[r]}`};P();var Px=1e3,Tx=9,rr=16,Ix={markdown:"text/markdown;charset=utf-8",code:"text/plain;charset=utf-8"},mg=(t,o)=>{let r=URL.createObjectURL(t),n=document.createElement("a");n.href=r,n.download=o,n.click(),window.setTimeout(()=>URL.revokeObjectURL(r),1e3);},rc=({tone:t,icon:o,title:r,text:n,action:a})=>c("div",{className:"orb-omph-pv-notice","data-tone":t,role:t==="error"?"alert":void 0,children:[e("span",{className:"orb-omph-pv-notice-icon","aria-hidden":"true",children:o}),e("div",{className:"orb-omph-pv-notice-title",children:r}),n&&e("p",{className:"orb-omph-pv-notice-text",children:n}),a]}),gg=({state:t,placement:o,expanded:r,canExpand:n,labels:a,gripProps:i,paneRef:s,onClose:l,onRetry:d,onToggleExpand:p,onOpenExternally:m})=>{let[f,h]=eo.useState(true),[u,v]=eo.useState(false),{open:y,ref:g,phase:x,data:b}=t,C=b?.body;eo.useEffect(()=>{if(!u)return;let F=window.setTimeout(()=>v(false),Px);return ()=>window.clearTimeout(F)},[u]),eo.useEffect(()=>{y&&s.current?.focus({preventScroll:true});},[y,s,g?.path]);let k=b?.absolutePath??g?.path??"",S=C&&(C.kind==="markdown"||C.kind==="code")?C.text:k,T=S===k?a.previewCopyPath:a.previewCopyContent,I=C?.kind==="code"&&g?oc(g.path,C.language):null,w=!!(C&&(C.kind==="markdown"||C.kind==="code")&&C.previewOnly),M=!!(g&&C&&!w&&(C.kind==="markdown"||C.kind==="code"||C.kind==="image"||C.kind==="embed")),A=()=>{if(!C||!g)return;let F=Rs(k);if(C.kind==="markdown"&&!/\.(md|markdown|txt)$/i.test(F)&&(F=`${F}.md`),C.kind==="markdown"||C.kind==="code"){mg(new Blob([C.text],{type:Ix[C.kind]}),F);return}(C.kind==="image"||C.kind==="embed")&&fetch(C.url).then(V=>{if(!V.ok)throw new Error(`HTTP ${V.status}`);return V.blob()}).then(V=>mg(V,F)).catch(()=>window.open(C.url,"_blank","noopener"));},R=[];I&&R.push(I.label),C?.kind==="markdown"&&R.push("Markdown"),C?.kind==="image"&&g&&R.push(tc(g.path).toUpperCase()),b?.size!==void 0&&R.push(dg(b.size)),C?.kind==="code"&&g?.startLine!==void 0&&R.push(a.previewLines(g.startLine,g.endLine??g.startLine));let D=F=>{F.key==="Escape"&&(F.stopPropagation(),l(true));},E=e("button",{type:"button",className:"orb-omph-pv-action",onClick:d,children:a.previewRetry}),O=()=>{if(!g)return null;if(x==="loading")return e("div",{className:"orb-omph-pv-skel",role:"status","aria-label":a.previewLoading,children:Array.from({length:Tx},(F,V)=>e("span",{},V))});if(x==="error"||!C)return e(rc,{tone:"error",icon:e(Da,{size:rr}),title:a.previewFailed,text:k,action:E});switch(C.kind){case "missing":return e(rc,{tone:"neutral",icon:e(Oa,{size:rr}),title:a.previewMissing,text:C.message??k});case "unsupported":return e(rc,{tone:"neutral",icon:e(Oa,{size:rr}),title:a.previewUnsupported,text:C.message??k,action:m&&e("button",{type:"button",className:"orb-omph-pv-action",onClick:()=>m(g),children:a.previewOpenExternal})});case "markdown":return e(ng,{text:C.text},g.path);case "code":return e(rg,{text:C.text,language:oc(g.path,C.language).prism,startLine:g.startLine,endLine:g.endLine,wrap:f,labels:a},g.path);case "image":return e(ag,{url:C.url,alt:C.alt,labels:a},C.url);case "embed":return e("iframe",{src:C.url,title:C.caption??a.previewTitle,className:"orb-omph-pv-embed"},C.url);default:return null}},_=o==="overlay",J=C?.kind==="image"?Kc:Oa;return c("aside",{ref:s,className:"orb-omph-preview","data-open":y||void 0,"data-placement":o,role:_?"dialog":"complementary","aria-label":a.previewTitle,"aria-hidden":!y||void 0,tabIndex:-1,onKeyDown:D,children:[!_&&y&&e("div",{className:"orb-omph-pv-grip","aria-label":a.previewResize,...i}),c("div",{className:"orb-omph-pv",children:[c("header",{className:"orb-omph-pv-head",children:[_&&e("button",{type:"button",className:"orb-omph-icon-button","aria-label":a.previewBack,onClick:()=>l(true),children:e(Aa,{size:rr})}),e("span",{className:"orb-omph-pv-glyph","aria-hidden":"true",children:e(J,{size:rr})}),c("div",{className:"orb-omph-pv-titles",children:[e("div",{className:"orb-omph-pv-name",title:k,children:g?Rs(g.path):""}),e("div",{className:"orb-omph-pv-path",title:k,children:e("bdi",{children:lg(k)})})]}),c("div",{className:"orb-omph-pv-actions",children:[C?.kind==="code"&&e("button",{type:"button",className:"orb-omph-text-button","aria-pressed":f,onClick:()=>h(F=>!F),children:a.previewWrap}),M&&e("button",{type:"button",className:"orb-omph-icon-button","aria-label":a.previewDownload,title:a.previewDownload,onClick:A,children:e(La,{size:rr})}),g&&e("button",{type:"button",className:"orb-omph-icon-button","aria-label":u?a.copied:T,title:u?a.copied:T,onClick:()=>{navigator.clipboard.writeText(S).then(()=>v(true));},children:u?e(Ao,{size:rr}):e(Yo,{size:rr})}),n&&e("button",{type:"button",className:"orb-omph-icon-button","aria-pressed":r,"aria-label":r?a.previewCollapse:a.previewExpand,title:r?a.previewCollapse:a.previewExpand,onClick:p,children:e($c,{size:rr})}),!_&&e("button",{type:"button",className:"orb-omph-icon-button","aria-label":a.previewClose,onClick:()=>l(true),children:e(qt,{size:rr})})]})]}),e("div",{className:"orb-omph-pv-meta",children:R.join(" \xB7 ")}),e("div",{className:"orb-omph-pv-body","data-kind":x==="ready"?C?.kind:void 0,children:O()})]})]})};P();var Mx=1e3,fg=50,Dx=1e3,Nx=t=>t==="tool"?tn:t==="command"?Wn:Qc,bg=t=>!!t.streaming||t.status==="running"||t.status==="pending",Ax=(t,o)=>o==="expanded"?true:bg(t),Ex=t=>t!==void 0&&(t.inputTokens!==void 0||t.outputTokens!==void 0||t.durationMs!==void 0),Lx=(t,o)=>`${Math.max(1,Math.round(t/Dx))}${o.secondUnit}`,Ox=({content:t})=>{let o=eo.useRef(null),[r,n]=eo.useState(false);return eo.useEffect(()=>{let a=o.current;if(!a)return;let i=()=>n(a.scrollHeight>a.clientHeight+1);i();let s=new ResizeObserver(i);return s.observe(a),()=>s.disconnect()},[t]),e("div",{ref:o,className:"orb-omph-process-body","data-overflow":r||void 0,children:t})},Fx=({turn:t,labels:o})=>{let[r,n]=eo.useState(false),[a,i]=eo.useState(false),s=t.assistant?.content??"",l=t.usage;return eo.useEffect(()=>{if(!r)return;let d=window.setTimeout(()=>n(false),Mx);return ()=>window.clearTimeout(d)},[r]),c("div",{className:"orb-omph-turn-actions",role:"group","aria-label":o.turnActions,children:[e("span",{className:"orb-omph-actions-time",children:t.assistant?.timestamp.toLocaleTimeString()}),Ex(l)&&c(jsxRuntime.Fragment,{children:[e("span",{className:"orb-omph-actions-divider","aria-hidden":"true"}),e("button",{type:"button",className:"orb-omph-text-button","aria-expanded":a,onClick:()=>i(d=>!d),children:o.usage})]}),e("button",{type:"button",className:"orb-omph-icon-button orb-omph-actions-end","aria-label":r?o.copied:o.copy,onClick:()=>{navigator.clipboard.writeText(s).then(()=>n(true));},children:r?e(Ao,{size:14}):e(Yo,{size:14})}),a&&l&&c("div",{className:"orb-omph-usage",children:[l.inputTokens!==void 0&&c("span",{children:[o.inputTokens," ",l.inputTokens.toLocaleString()]}),l.outputTokens!==void 0&&c("span",{children:[o.outputTokens," ",l.outputTokens.toLocaleString()]}),l.durationMs!==void 0&&c("span",{children:[o.duration," ",Lx(l.durationMs,o)]})]})]})},Bx=({item:t,display:o,open:r,onToggle:n})=>{let a=Nx(t.kind),i=bg(t),s=o!=="compact"&&!!t.summary,l=r&&!!t.content;return c("div",{className:"orb-omph-process","data-status":t.status,"data-open":r||void 0,children:[c("button",{type:"button",className:"orb-omph-process-toggle","aria-expanded":r,onClick:n,children:[e(Ho,{size:12,className:"orb-omph-process-chevron"}),e(a,{size:14}),e("span",{className:i?"orb-omph-shimmer":void 0,children:t.title}),s&&e("span",{className:"orb-omph-process-summary",children:t.summary})]}),l&&t.content&&e(Ox,{content:t.content}),r&&t.streaming&&e("span",{className:"orb-omph-caret","aria-hidden":"true"})]})},nc=t=>{let o=t.user?.content||t.assistant?.content||t.id,r=o.split(`
|
|
202
|
-
`).find(n=>n.trim())??o;return r.length>fg?`${r.slice(0,fg)}\u2026`:r},Hx=0,vg=({turns:t,labels:o,processDisplay:r,cardHooks:n,resolveFileLink:a,onOpenFile:i})=>{let[s,l]=eo.useState({}),d=p=>{if(!i||p.defaultPrevented||p.button!==Hx||p.metaKey||p.ctrlKey||p.shiftKey||p.altKey)return;let m=p.target.closest("a[href]");if(!m)return;let f=a(m.getAttribute("href")??"");f&&(p.preventDefault(),i(f,m));};return e(jsxRuntime.Fragment,{children:t.map((p,m)=>{let f=!!(p.assistant&&!p.assistant.streaming),u=m===t.length-1&&f?"always":"hover";return c("article",{className:"orb-omph-turn","data-omph-turn":p.id,"data-actions-reveal":u,children:[p.user&&c("div",{className:"orb-omph-user",children:[e("div",{className:"orb-omph-user-bubble",children:p.user.content}),e("div",{className:"orb-omph-clock",children:p.user.timestamp.toLocaleTimeString()})]}),p.process&&p.process.length>0&&e("div",{className:"orb-omph-process-list",children:p.process.map(v=>{let y=v.id in s?s[v.id]:Ax(v,r);return e(Bx,{item:v,display:r,open:y,onToggle:()=>l(g=>({...g,[v.id]:!y}))},v.id)})}),p.assistant&&c("div",{className:"orb-omph-assistant","data-file-links":i?"true":void 0,onClick:d,children:[e(ks,{content:p.assistant.content,messageId:p.assistant.id,cardHooks:n}),p.assistant.streaming&&e("span",{className:"orb-omph-caret","aria-hidden":"true"})]}),p.failure&&e("div",{className:"orb-omph-failure","data-severity":p.failure.severity,children:p.failure.content}),f&&e(Fx,{turn:p,labels:o})]},p.id)})})};var ac=t=>({idle:t("omph.status.idle"),pending:t("omph.status.pending"),running:t("omph.status.running"),success:t("omph.status.success"),error:t("omph.status.error"),working:t("omph.working"),workingFor:o=>t("omph.workingFor",{duration:o}),loadOlder:t("omph.loadOlder"),loadingOlder:t("omph.loadingOlder"),toBottom:t("omph.toBottom"),copy:t("omph.copy"),copied:t("omph.copied"),turnActions:t("omph.turnActions"),usage:t("omph.usage"),inputTokens:t("omph.inputTokens"),outputTokens:t("omph.outputTokens"),duration:t("omph.duration"),send:t("omph.send"),stop:t("omph.stop"),turnRail:t("omph.turnRail"),secondUnit:t("omph.secondUnit"),minuteUnit:t("omph.minuteUnit"),previewTitle:t("omph.preview.title"),previewClose:t("omph.preview.close"),previewBack:t("omph.preview.back"),previewExpand:t("omph.preview.expand"),previewCollapse:t("omph.preview.collapse"),previewCopyContent:t("omph.preview.copyContent"),previewCopyPath:t("omph.preview.copyPath"),previewDownload:t("omph.preview.download"),previewOpenExternal:t("omph.preview.openExternal"),previewWrap:t("omph.preview.wrap"),previewLoading:t("omph.preview.loading"),previewMissing:t("omph.preview.missing"),previewFailed:t("omph.preview.failed"),previewUnsupported:t("omph.preview.unsupported"),previewRetry:t("omph.preview.retry"),previewResize:t("omph.preview.resize"),previewLines:(o,r)=>t(o===r?"omph.preview.line":"omph.preview.lines",{start:o,end:r}),previewTruncated:(o,r)=>t("omph.preview.truncated",{shown:o,total:r}),imageFailed:t("omph.preview.imageFailed"),zoomIn:t("omph.preview.zoomIn"),zoomOut:t("omph.preview.zoomOut"),zoomFit:t("omph.preview.zoomFit"),newConversation:t("omph.newConversation"),conversationList:t("omph.conversationList"),conversations:t("omph.conversations"),noConversations:t("omph.noConversations")}),ic=t=>({waiting:t("omph.approval.waiting"),choose:t("omph.approval.choose"),details:t("omph.approval.details"),choices:t("omph.approval.choices"),reject:t("omph.approval.reject"),allowOnce:t("omph.approval.allowOnce"),confirm:t("omph.approval.confirm"),other:t("omph.approval.other"),otherPlaceholder:t("omph.approval.otherPlaceholder"),escalation:o=>t("omph.approval.escalation",{toolName:o})});var zx=1e3,yg=60,Vx=1e3,Cg=(t,o)=>{let r=Math.max(1,Math.round(Math.max(t,Vx)/zx)),n=Math.floor(r/yg),a=r%yg;return n<=0?`${r}${o.secondUnit}`:`${n}${o.minuteUnit} ${a}${o.secondUnit}`};var _x={open:false,ref:null,phase:"loading",data:null},xg=t=>{let[o,r]=eo.useState(_x),n=eo.useRef(o);n.current=o;let a=eo.useRef(t);a.current=t;let i=eo.useRef(null),s=eo.useRef(0),l=eo.useRef(null),d=eo.useCallback(h=>{let u=a.current;if(!u)return;i.current?.abort();let v=new AbortController;i.current=v,s.current+=1;let y=s.current;r({open:true,ref:h,phase:"loading",data:null}),u(h,v.signal).then(g=>{y===s.current&&r(x=>({...x,phase:"ready",data:g}));},()=>{y!==s.current||v.signal.aborted||r(g=>({...g,phase:"error",data:null}));});},[]),p=eo.useCallback((h,u)=>{l.current=u??null;let v=n.current;if(v.ref?.path===h.path&&v.phase==="ready"){r({...v,open:true,ref:h});return}d(h);},[d]),m=eo.useCallback((h=false)=>{s.current+=1,i.current?.abort(),r(v=>({...v,open:false}));let u=l.current;h&&u?.isConnected&&u.focus({preventScroll:true});},[]),f=eo.useCallback(()=>{let{ref:h}=n.current;h&&d(h);},[d]);return eo.useEffect(()=>()=>{i.current?.abort();},[]),{state:o,open:p,close:m,reload:f}};var lc="--orb-omph-pv-w",cc="--orb-omph-pv-pref",Kx=880,qx=560,Sg=400,Gr=320,Xx=.45,Yx=.7,kg=24,sc=(t,o,r)=>Math.min(Math.max(t,o),Math.max(o,r)),Pg=({open:t,layout:o})=>{let r=eo.useRef(null),n=eo.useRef(null),[a,i]=eo.useState(0),[s,l]=eo.useState(null),[d,p]=eo.useState(false),[m,f]=eo.useState(false);eo.useLayoutEffect(()=>{let T=r.current;if(!T)return;let I=()=>i(T.getBoundingClientRect().width);I();let w=new ResizeObserver(I);return w.observe(T),()=>w.disconnect()},[]),eo.useEffect(()=>{t||p(false);},[t]);let h=o==="overlay"?false:o==="split"?a>=Sg+Gr:a>=Kx,u=h&&!d?"split":"overlay",v=Math.max(Gr,Math.min(a*Yx,a-Sg)),y=sc(s??a*Xx,Gr,v),g=a>0&&a<qx,x=eo.useCallback(T=>{let I=r.current;I&&(I.style.setProperty(cc,`${T}px`),I.dataset.placement==="split"&&I.dataset.open==="true"&&I.style.setProperty(lc,`${T}px`));},[]),b=eo.useCallback(T=>{T.button===0&&(T.preventDefault(),T.currentTarget.setPointerCapture(T.pointerId),n.current={pointerId:T.pointerId,startX:T.clientX,startWidth:y,latest:y},f(true));},[y]),C=eo.useCallback(T=>{let I=n.current;!I||I.pointerId!==T.pointerId||(I.latest=sc(I.startWidth+(I.startX-T.clientX),Gr,v),x(I.latest));},[v,x]),k=eo.useCallback(T=>{let I=n.current;!I||I.pointerId!==T.pointerId||(n.current=null,T.currentTarget.hasPointerCapture(T.pointerId)&&T.currentTarget.releasePointerCapture(T.pointerId),l(I.latest),f(false));},[]),S=eo.useCallback(T=>{let I={ArrowLeft:y+kg,ArrowRight:y-kg,Home:Gr,End:v};T.key in I&&(T.preventDefault(),l(sc(I[T.key],Gr,v)));},[v,y]);return {mainRef:r,placement:u,width:y,compact:g,dragging:m,expanded:d,canExpand:h,toggleExpanded:()=>p(T=>!T),gripProps:{role:"separator","aria-orientation":"vertical","aria-valuemin":Gr,"aria-valuemax":Math.round(v),"aria-valuenow":Math.round(y),tabIndex:0,onPointerDown:b,onPointerMove:C,onPointerUp:k,onPointerCancel:k,onKeyDown:S}}};var As=48,jx=900,Ig=()=>typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,Rg=({turns:t,contentVersion:o,hasOlder:r=false,loadingOlder:n=false,onLoadOlder:a})=>{let i=eo.useRef(null),s=eo.useRef(null),l=eo.useRef(true),d=eo.useRef({height:0,top:0}),p=eo.useRef(void 0),m=eo.useRef(false),[f,h]=eo.useState(true),[u,v]=eo.useState(false),[y,g]=eo.useState(t[0]?.id),x=eo.useCallback(()=>{let T=i.current;T&&(d.current={height:T.scrollHeight,top:T.scrollTop});},[]),b=eo.useCallback(()=>{let T=i.current;if(!T)return;let I=T.getBoundingClientRect().top,w=T.querySelector("[data-omph-turn]")?.dataset.omphTurn;T.querySelectorAll("[data-omph-turn]").forEach(M=>{M.getBoundingClientRect().top-I<=As&&(w=M.dataset.omphTurn);}),g(w);},[]);eo.useEffect(()=>{let T=i.current,I=s.current;if(!T||!I)return;let w=()=>{v(T.clientWidth>jx),l.current&&(T.scrollTop=T.scrollHeight),x();};w();let M=new ResizeObserver(w);return M.observe(T),M.observe(I),()=>M.disconnect()},[x]),eo.useLayoutEffect(()=>{let T=i.current;if(!T)return;let I=t[0]?.id,w=p.current,M=w!==void 0&&t.some(D=>D.id===w),A=M&&I!==void 0&&I!==w,R=w!==void 0&&!M;if(p.current=I,R){l.current=true,h(true),T.scrollTop=T.scrollHeight,x(),b();return}if(A){l.current=false,h(false);let D=T.scrollHeight-d.current.height;T.scrollTop=d.current.top+Math.max(0,D),x(),b();return}l.current&&(T.scrollTop=T.scrollHeight),x(),b();},[o,x,t,b]),eo.useEffect(()=>{n||(m.current=false);},[n]);let C=eo.useCallback(()=>{let T=i.current;if(!T)return;let w=T.scrollHeight-T.scrollTop-T.clientHeight<=As;w!==l.current&&(l.current=w,h(w)),x(),b();let M=T.scrollHeight-T.clientHeight>As,A=T.scrollTop<=As;!M||!A||w||!r||n||!a||m.current||(m.current=true,a());},[r,n,a,x,b]),k=eo.useCallback(()=>{let T=i.current;T&&(l.current=true,h(true),T.scrollTo({top:T.scrollHeight,behavior:Ig()?"auto":"smooth"}));},[]),S=eo.useCallback(T=>{let w=i.current?.querySelector(`[data-omph-turn="${CSS.escape(T)}"]`);w&&(l.current=false,h(false),w.scrollIntoView({block:"start",behavior:Ig()?"auto":"smooth"}));},[]);return {scrollerRef:i,contentRef:s,following:f,railVisible:u,activeTurnId:y,onScroll:C,returnToBottom:k,scrollToTurn:S}};P();var Jx=1e3,e0=(t,o)=>o[t],t0=t=>t.map(o=>[o.id,o.user?.content.length??0,o.assistant?.content.length??0,o.assistant?.streaming?"1":"0",o.failure?.id??"",(o.process??[]).map(r=>`${r.id}:${r.status}:${r.content?.length??0}`).join(",")].join(":")).join("|"),o0=({startedAt:t,labels:o})=>{let[r,n]=eo.useState(()=>Date.now());eo.useEffect(()=>{n(Date.now());let i=window.setInterval(()=>n(Date.now()),Jx);return ()=>window.clearInterval(i)},[t]);let a=t===void 0?o.working:o.workingFor(Cg(Math.max(0,r-t),o));return c("div",{className:"orb-omph-running","data-omph-running":"true",children:[e("span",{className:"orb-visually-hidden",role:"status","aria-live":"polite",children:o.working}),e("span",{className:"orb-omph-running-rule","aria-hidden":"true"}),c("span",{className:"orb-omph-running-body",children:[e("span",{className:"orb-omph-spinner","aria-hidden":"true"}),e("span",{className:"orb-omph-shimmer",children:a})]})]})},qz=({turns:t,title:o,avatar:r,description:n,headerActions:a,agentStatus:i,isResponding:s=false,labels:l,processDisplay:d="standard",showInput:p=false,placeholder:m,className:f,cardHooks:h,hasOlder:u=false,loadingOlder:v=false,onLoadOlder:y,onSend:g,onStop:x,onHeaderPointerDown:b,conversations:C=[],activeConversationId:k,onNewConversation:S,onSelectConversation:T,loadFilePreview:I,resolveFileLink:w=ec,filePreviewLayout:M="auto",onOpenFileExternally:A})=>{let{t:R}=le(),D={...ac(R),...l},E=i??(s?"running":"idle"),O=E==="running"||E==="pending",_=[e0(E,D),n].filter(Boolean).join(" \xB7 "),J=eo.useMemo(()=>t0(t),[t]),F=Rg({turns:t,contentVersion:J,hasOlder:u,loadingOlder:v,onLoadOlder:y}),[V,z]=eo.useState(""),X=V.trim(),W=s&&X.length===0,H=[...t].reverse().find(ce=>!!ce.assistant?.streaming||ce.process?.some(be=>be.streaming||be.status==="running"||be.status==="pending")),U=O?H?.startedAt:void 0,Y=!!I,ue=xg(I),re=Pg({open:ue.state.open,layout:M}),ge=eo.useRef(null),we=eo.useRef(null),Ve=Y&&ue.state.open&&re.placement==="overlay",Te=re.placement==="split"&&ue.state.open,Ie={[cc]:`${re.width}px`,[lc]:Te?`${re.width}px`:"0px"};eo.useEffect(()=>{we.current?.toggleAttribute("inert",Ve);},[Ve]);let He=async()=>{if(!X||!g)return;let ce=X;z("");try{await g(ce);}catch{z(be=>be.trim().length===0?ce:be);}};return c("div",{className:ut("orb-omph-panel",f),"data-omph-panel":"","data-status":E,"data-compact":re.compact||void 0,children:[c("div",{className:ut("orb-omph-header",b&&"cursor-grab active:cursor-grabbing"),onPointerDown:b,children:[e("span",{className:"orb-omph-avatar","aria-hidden":"true",children:r??"AI"}),c("div",{className:"min-w-0 flex-1",children:[o&&e("div",{className:"orb-omph-title",children:o}),c("div",{className:"orb-omph-subtitle",children:[e("span",{className:"orb-omph-dot","data-active":O||void 0}),e("span",{className:"truncate",children:_||D.idle})]})]}),(S||T||a)&&c("div",{className:"orb-omph-header-actions",onPointerDown:ce=>ce.stopPropagation(),children:[e(tg,{conversations:C,activeConversationId:k,labels:D,onNewConversation:S,onSelectConversation:T}),a]})]}),c("div",{ref:re.mainRef,className:"orb-omph-main","data-placement":re.placement,"data-open":String(ue.state.open),"data-dragging":re.dragging||void 0,style:Ie,children:[c("div",{ref:we,className:"orb-omph-center",children:[c("div",{className:"orb-omph-stage","data-rail":F.railVisible||void 0,children:[e("div",{ref:F.scrollerRef,className:"orb-omph-scroll",onScroll:F.onScroll,children:c("div",{ref:F.contentRef,className:"orb-omph-column",children:[u&&y&&e("button",{type:"button",className:"orb-omph-older",disabled:v,onClick:y,children:v?D.loadingOlder:D.loadOlder}),e(vg,{turns:t,labels:D,processDisplay:d,cardHooks:h,resolveFileLink:w,onOpenFile:Y?ue.open:void 0}),O&&e(o0,{startedAt:U,labels:D})]})}),F.railVisible&&t.length>0&&e("nav",{className:"orb-omph-rail","aria-label":D.turnRail,children:t.map(ce=>e("button",{type:"button",className:"orb-omph-rail-mark","data-active":F.activeTurnId===ce.id||void 0,"aria-label":nc(ce),title:nc(ce),onClick:()=>F.scrollToTurn(ce.id)},ce.id))}),!F.following&&e("button",{type:"button",className:"orb-omph-to-bottom","aria-label":D.toBottom,onClick:F.returnToBottom,children:e(Ho,{size:16})})]}),p&&c("form",{className:"orb-omph-composer",onSubmit:ce=>{ce.preventDefault(),W?x?.():He();},children:[e("textarea",{className:"orb-omph-input",value:V,placeholder:m,rows:1,onChange:ce=>z(ce.target.value),onKeyDown:ce=>{ce.key!=="Enter"||ce.shiftKey||ce.nativeEvent.isComposing||(ce.preventDefault(),W?x?.():He());}}),e("button",{type:"submit",className:W?"orb-omph-stop":"orb-omph-send","aria-label":W?D.stop:D.send,disabled:!W&&X.length===0,children:W?e(Hc,{size:16}):e(Bc,{size:16})})]})]}),Y&&e(gg,{state:ue.state,placement:re.placement,expanded:re.expanded,canExpand:re.canExpand,labels:D,gripProps:re.gripProps,paneRef:ge,onClose:ue.close,onRetry:ue.reload,onToggleExpand:re.toggleExpanded,onOpenExternally:A})]})]})};P();var br="other",r0=t=>t instanceof HTMLElement&&t.closest('input, textarea, select, [contenteditable="true"], [contenteditable=""]')!==null,n0=({request:t,onDecide:o,labels:r})=>{let{t:n}=le(),a={...ic(n),...r},i=eo.useRef(null),s=eo.useRef(null),l=eo.useRef(false),d=eo.useRef(false),[p,m]=eo.useState(false),[f,h]=eo.useState(null),[u,v]=eo.useState(""),y=t.choices??[],g=t.allowOther??y.length>0,x=y.length>0||g,b=t.reason?.trim()||a.escalation(t.toolName),C=t.detail?.trim(),k=f===br&&u.trim().length>0,S=!x||f!==null&&f!==br||k;eo.useEffect(()=>{m(false),h(null),v(""),i.current?.focus();},[t.id]),eo.useEffect(()=>{f===br&&s.current?.focus();},[f]);let T=M=>{p||(m(true),o(M,t));},I=()=>{if(S){if(!x){T({kind:"allowed-once"});return}if(f===br){let M=u.trim();if(!M)return;T({kind:"other",text:M});return}f&&T({kind:"choice",choiceId:f});}},w=M=>{if(!(p||r0(M.target))&&!(M.key!=="Enter"&&M.key!=="Escape")&&!(M.key==="Enter"&&M.target instanceof HTMLElement&&M.target.closest('button, a[href], [role="button"]'))&&!(M.ctrlKey||M.metaKey||M.altKey||M.shiftKey)&&(M.preventDefault(),M.stopPropagation(),!(M.repeat||l.current||d.current||M.nativeEvent.isComposing))){if(M.key==="Escape"){T({kind:"rejected"});return}I();}};return e("div",{className:"orb-omph-approval","data-omph-approval":t.id,"aria-busy":p,onKeyDown:w,onKeyUpCapture:()=>{d.current=false;},onCompositionStartCapture:()=>{l.current=true;},onCompositionEndCapture:()=>{l.current=false,d.current=true;},children:c("div",{className:"orb-omph-approval-card",children:[c("div",{className:"orb-omph-approval-strip",children:[e("span",{className:"orb-omph-approval-dot","aria-hidden":"true"}),x?a.choose:a.waiting]}),c("div",{ref:i,className:"orb-omph-approval-body",tabIndex:0,role:"group","aria-label":a.details,children:[e("div",{className:"orb-omph-approval-headline",children:b}),C&&e("div",{className:"orb-omph-approval-detail",children:C}),x&&c("fieldset",{className:"orb-omph-approval-choices",disabled:p,children:[e("legend",{className:"orb-visually-hidden",children:a.choices}),y.map(M=>{let A=f===M.id;return c("label",{className:"orb-omph-approval-choice","data-selected":A,children:[e("input",{type:"radio",name:`omph-approval-${t.id}`,value:M.id,checked:A,onChange:()=>h(M.id)}),c("span",{className:"orb-omph-approval-choice-copy",children:[e("span",{children:M.label}),M.description&&e("span",{className:"orb-omph-approval-choice-description",children:M.description})]})]},M.id)}),g&&c("label",{className:"orb-omph-approval-choice","data-selected":f===br,children:[e("input",{type:"radio",name:`omph-approval-${t.id}`,value:br,checked:f===br,onChange:()=>h(br)}),e("span",{className:"orb-omph-approval-choice-copy",children:e("span",{children:a.other})})]}),g&&f===br&&e("textarea",{ref:s,className:"orb-omph-approval-other",value:u,placeholder:a.otherPlaceholder,rows:3,"aria-label":a.other,onChange:M=>v(M.target.value)})]})]}),c("div",{className:"orb-omph-approval-actions",children:[e("button",{type:"button",className:"orb-btn orb-btn-neutral orb-omph-approval-reject",disabled:p,onClick:()=>T({kind:"rejected"}),children:a.reject}),e("button",{type:"button",className:"orb-btn orb-btn-primary",disabled:p||!S,onClick:I,children:x?a.confirm:a.allowOnce})]})]})})};P();var Og=520,s0=88,l0=88,c0=24,Ls=640,Fg=(t,o,r)=>Math.min(Math.max(t,o),Math.max(o,r)),uc=t=>typeof t=="number"?`${t}px`:t,d0=t=>t instanceof HTMLElement?!!t.closest('button,input,a,textarea,select,[role="button"],[contenteditable="true"]'):false,a5=({anchor:t,defaultAnchor:o="right",onAnchorChange:r,width:n=Og,top:a=s0,bottom:i=l0,inset:s=c0,zIndex:l=1300,shellClassName:d,shellStyle:p,className:m,onHeaderPointerDown:f,...h})=>{let u=eo.useRef(null),v=eo.useRef(null),[y,g]=eo.useState(o),[x,b]=eo.useState(0),[C,k]=eo.useState(typeof n=="number"?n:Og),[S,T]=eo.useState(0),[I,w]=eo.useState(false),M=t??y;eo.useEffect(()=>{let F=()=>b(window.innerWidth);return F(),window.addEventListener("resize",F),()=>window.removeEventListener("resize",F)},[]),eo.useLayoutEffect(()=>{let F=()=>{let z=u.current?.getBoundingClientRect();z?.width?k(z.width):typeof n=="number"&&k(n);};if(F(),!u.current||typeof ResizeObserver>"u")return;let V=new ResizeObserver(F);return V.observe(u.current),()=>V.disconnect()},[n]);let A=eo.useCallback(F=>{if(!x)return s;let V=x<Ls?12:s,z=Math.max(V,x-C-V);return x<Ls||F==="left"?V:F==="center"?Fg((x-C)/2,V,z):z},[s,C,x]),R=eo.useCallback(F=>["left","center","right"].reduce((z,X)=>{let W=Math.abs(F-A(z));return Math.abs(F-A(X))<W?X:z},"right"),[A]),D=eo.useCallback(F=>{t===void 0&&g(F),r?.(F);},[t,r]);eo.useEffect(()=>{I||T(A(M));},[A,I,M]);let E=eo.useCallback(F=>{f?.(F),!(F.defaultPrevented||d0(F.target))&&(F.preventDefault(),F.currentTarget.setPointerCapture(F.pointerId),v.current={pointerId:F.pointerId,startClientX:F.clientX,startX:S,currentX:S,captureElement:F.currentTarget},w(true));},[f,S]),O=eo.useCallback(F=>{let V=v.current;if(!V||V.pointerId!==F.pointerId)return;let z=x<Ls?12:s,X=Math.max(z,x-C-z),W=Fg(V.startX+F.clientX-V.startClientX,z,X);V.currentX=W,T(W);},[s,C,x]),_=eo.useCallback(F=>{let V=v.current;if(!V||V.pointerId!==F.pointerId)return;try{V.captureElement.releasePointerCapture(F.pointerId);}catch{}let z=R(V.currentX);v.current=null,w(false),D(z),T(A(z));},[A,D,R]),J=eo.useMemo(()=>({position:"fixed",top:uc(a),bottom:uc(i),left:S,width:uc(n),maxWidth:`calc(100vw - ${x<Ls?24:s*2}px)`,zIndex:l,pointerEvents:"auto",transition:I?"none":"left 180ms ease-out",touchAction:"none",...p}),[i,s,I,S,p,a,x,n,l]);return e("div",{ref:u,className:ut("orbcafe-floating-agent-panel min-w-0",d),"data-anchor":M,"data-dragging":I?"true":"false",style:J,onPointerMove:O,onPointerUp:_,onPointerCancel:_,children:e(Jm,{...h,className:m,onHeaderPointerDown:E})})};P();var m0={"top-left":"bottom-right","top-right":"bottom-left","bottom-left":"top-right","bottom-right":"top-left"},m5=({messages:t,onSend:o,onRegenerate:r,isResponding:n=false,className:a,placeholder:i,title:s="Copilot",corner:l="bottom-right",onCollapse:d,onHeaderPointerDown:p,onPlusClick:m,onMicClick:f,streamIntervalMs:h,streamChunkSize:u,onMessageStreamingComplete:v,cardHooks:y})=>{let[g,x]=eo.useState(""),[b,C]=eo.useState(false),k=eo.useRef(null),S=m0[l];eo.useEffect(()=>{k.current?.scrollIntoView({behavior:"smooth"});},[t,n]);let T=eo.useCallback(async()=>{let w=g.trim();!w||n||(x(""),await o(w));},[n,o,g]),I=eo.useCallback(async w=>{w.key==="Enter"&&!b&&(w.preventDefault(),await T());},[T,b]);return c("div",{className:ut("relative flex h-full w-full min-h-[460px] min-w-[340px] flex-col overflow-hidden rounded-3xl border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-none dark:bg-[var(--orb-surface-2)]",a),children:[d&&e("button",{onClick:d,className:ut("absolute z-20 flex h-10 w-10 items-center justify-center rounded-full transition-colors hover:bg-transparent dark:hover:bg-transparent",S==="top-left"&&"-left-2 -top-2",S==="top-right"&&"-right-2 -top-2",S==="bottom-left"&&"-bottom-2 -left-2",S==="bottom-right"&&"-bottom-2 -right-2"),type:"button","aria-label":"Collapse Copilot",children:e("span",{className:ut("block h-4 w-4 border-[var(--orb-ai-accent)]",S==="top-left"&&"rounded-tl-full border-l-[3px] border-t-[3px]",S==="top-right"&&"rounded-tr-full border-r-[3px] border-t-[3px]",S==="bottom-left"&&"rounded-bl-full border-b-[3px] border-l-[3px]",S==="bottom-right"&&"rounded-br-full border-b-[3px] border-r-[3px]")})}),c("div",{className:"flex items-center justify-between border-b border-[var(--orb-border)] px-4 py-3",onPointerDown:p,children:[e("div",{className:"flex items-center",children:e("h3",{className:"text-base font-semibold tracking-tight text-[var(--orb-fg)]",children:s})}),e("div",{})]}),c("div",{className:"flex-1 overflow-y-auto px-3 py-3 space-y-5 scrollbar-thin scrollbar-thumb-[var(--orb-border)]",children:[t.map((w,M)=>{let A=w.type==="assistant"&&M===t.length-1,R=w.type==="assistant"?{isLatestAssistant:A,isResponding:n,onRegenerate:r?()=>r(w.id):void 0}:void 0;return e(Ps,{message:w,assistantActions:R,onStreamingComplete:()=>v?.(w.id),streamIntervalMs:h,streamChunkSize:u,cardHooks:y},w.id)}),e("div",{ref:k})]}),e("div",{className:"border-t border-[var(--orb-border)] px-3 py-3",children:c("div",{className:"flex items-center gap-2 rounded-xl border border-[var(--orb-p300)] bg-[var(--orb-canvas)] px-2 py-1.5 dark:bg-[var(--orb-surface-2)]",children:[e("button",{className:"flex h-8 w-8 items-center justify-center rounded-full text-[var(--orb-muted)] transition-colors hover:bg-[var(--orb-surface)] hover:text-[var(--orb-fg)] dark:text-[var(--orb-muted)] dark:hover:bg-[var(--orb-surface-2)]",onClick:m,type:"button","aria-label":"Add",children:e(en,{className:"h-4 w-4"})}),e("input",{className:"h-7 flex-1 border-none bg-transparent text-sm text-[var(--orb-fg)] outline-none placeholder:text-[var(--orb-muted)] dark:text-[var(--orb-fg)] dark:placeholder:text-[var(--orb-muted)]",placeholder:i||"Ask Copilot...",value:g,onChange:w=>x(w.target.value),onCompositionStart:()=>C(true),onCompositionEnd:()=>C(false),onKeyDown:I,"aria-label":"Copilot input",spellCheck:false}),e("button",{className:"flex h-8 w-8 items-center justify-center rounded-full text-[var(--orb-muted)] transition-colors hover:bg-[var(--orb-surface)] hover:text-[var(--orb-fg)] dark:text-[var(--orb-muted)] dark:hover:bg-[var(--orb-surface-2)]",onClick:f,type:"button","aria-label":"Microphone",children:e(za,{className:"h-4 w-4"})})]})})]})};P();var g0=["var(--orb-primary)","var(--orb-primary)","var(--orb-primary)"],f0=`
|
|
196
|
+
${r}: ${(a??n)(g.secondaryValue??0)}`:""]})}),e("text",{x:g.x,y:Math.max(g.y-12,d.top+8),textAnchor:"middle",fontSize:"10",fill:i.palette.text.secondary,children:g.name})]},g.name)),e("text",{x:s/2,y:l-10,textAnchor:"middle",fontSize:"11",fill:i.palette.text.secondary,children:r?o:"Index"}),e("text",{x:16,y:l/2,textAnchor:"middle",transform:`rotate(-90 16 ${l/2})`,fontSize:"11",fill:i.palette.text.secondary,children:r??o}),e("text",{x:d.left,y:d.top-4,fontSize:"10",fill:i.palette.text.secondary,children:nm(f)}),e("text",{x:s-d.right,y:l-d.bottom+16,textAnchor:"end",fontSize:"10",fill:i.palette.text.secondary,children:nm(h)})]})}),e("div",{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(2, minmax(0, 1fr))",lg:"repeat(3, minmax(0, 1fr))"},gap:1},children:t.map(g=>c("div",{sx:x=>({borderRadius:"var(--orb-r-container)",px:1.25,py:1,border:`1px solid ${Fo(x.palette.divider,.7)}`,bgcolor:Fo(x.palette.background.default,.35)}),children:[e(L,{component:"div",sx:{fontSize:"0.78rem",fontWeight:700,color:"var(--orb-fg-strong)"},noWrap:true,title:g.name,children:g.name}),c(L,{component:"div",sx:{fontSize:"0.72rem",color:"var(--orb-fg)"},children:[o,": ",n(g.primaryValue)]}),r&&c(L,{component:"div",sx:{fontSize:"0.72rem",color:"var(--orb-fg)"},children:[r,": ",(a??n)(g.secondaryValue??0)]})]},g.name))})]})};M();var Gl=t=>Math.max(...t,1),im=({data:t,chartType:o,primaryLabel:r,secondaryLabel:n,formatPrimaryValue:a,formatSecondaryValue:i})=>{let s=lo(),l=s.palette.primary.main,d=s.palette.warning.main;if(t.length===0)return null;if(o==="bar-horizontal"){let v=Gl(t.flatMap(C=>[C.primaryValue,C.secondaryValue??0]));return e(le,{spacing:1.1,children:t.map(C=>c("div",{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",md:"160px 1fr 128px"},gap:1.25,alignItems:"center"},children:[e(L,{component:"div",sx:{fontSize:"0.78rem",fontWeight:700,color:"var(--orb-fg-strong)"},noWrap:true,title:C.name,children:C.name}),c(le,{spacing:.65,children:[e("div",{sx:{height:10,borderRadius:999,overflow:"hidden",bgcolor:Fo(s.palette.action.active,.08)},children:e("div",{sx:{width:`${C.primaryValue/v*100}%`,height:"100%",bgcolor:l}})}),n&&e("div",{sx:{height:8,borderRadius:999,overflow:"hidden",bgcolor:Fo(s.palette.action.active,.08)},children:e("div",{sx:{width:`${(C.secondaryValue??0)/v*100}%`,height:"100%",bgcolor:d}})})]}),c("div",{sx:{minWidth:0},children:[e(L,{component:"div",sx:{fontSize:"0.72rem",textAlign:{xs:"left",md:"right"},fontWeight:700,color:"var(--orb-fg-strong)"},children:a(C.primaryValue)}),n&&e(L,{component:"div",sx:{fontSize:"0.72rem",textAlign:{xs:"left",md:"right"},color:"var(--orb-fg)"},children:(i??a)(C.secondaryValue??0)})]})]},C.name))})}if(o==="bar-vertical"){let v=Gl(t.flatMap(P=>[P.primaryValue,P.secondaryValue??0])),C=n?92:76;return e("div",{sx:{overflowX:"auto",pb:.5},children:e("div",{sx:{minWidth:Math.max(620,t.length*C),display:"grid",gridTemplateColumns:`repeat(${t.length}, minmax(56px, 1fr))`,gap:1,alignItems:"end"},children:t.map(P=>c("div",{sx:{minWidth:0},children:[c("div",{sx:{height:210,display:"flex",alignItems:"flex-end",justifyContent:"center",gap:.8},children:[e("div",{sx:{width:n?16:26,minHeight:8,height:`${Math.max(P.primaryValue/v*188,8)}px`,borderRadius:"10px 10px 2px 2px",bgcolor:l},title:`${r}: ${a(P.primaryValue)}`}),n&&e("div",{sx:{width:16,minHeight:8,height:`${Math.max((P.secondaryValue??0)/v*188,8)}px`,borderRadius:"10px 10px 2px 2px",bgcolor:d},title:`${n}: ${(i??a)(P.secondaryValue??0)}`})]}),e(L,{component:"div",sx:{fontSize:"0.76rem",fontWeight:700,color:"var(--orb-fg-strong)"},noWrap:true,title:P.name,children:P.name}),e(L,{component:"div",sx:{fontSize:"0.7rem",color:"var(--orb-fg)"},noWrap:true,title:a(P.primaryValue),children:a(P.primaryValue)}),n&&e(L,{component:"div",sx:{fontSize:"0.7rem",color:"var(--orb-fg)"},noWrap:true,title:(i??a)(P.secondaryValue??0),children:(i??a)(P.secondaryValue??0)})]},P.name))})})}let p=Math.max(680,t.length*74),m=240,h={top:20,right:18,bottom:36,left:18},f=Gl(t.flatMap(v=>[v.primaryValue,v.secondaryValue??0])),u=p-h.left-h.right,b=m-h.top-h.bottom,y=v=>t.map((C,P)=>{let S=h.left+P*u/Math.max(t.length-1,1),I=m-h.bottom-v(C)/f*b;return {x:S,y:I,item:C}}),g=y(v=>v.primaryValue),x=n?y(v=>v.secondaryValue??0):[];return c("div",{sx:{display:"flex",flexDirection:"column",gap:1.1},children:[e("div",{sx:{overflowX:"auto"},children:c("div",{component:"svg",viewBox:`0 0 ${p} ${m}`,sx:{width:"100%",minWidth:p,height:m},children:[e("line",{x1:h.left,y1:m-h.bottom,x2:p-h.right,y2:m-h.bottom,stroke:Fo(s.palette.text.secondary,.35)}),e("polyline",{fill:"none",stroke:l,strokeWidth:3,points:g.map(v=>`${v.x},${v.y}`).join(" ")}),g.map(v=>e("circle",{cx:v.x,cy:v.y,r:4,fill:l,children:c("title",{children:[v.item.name,`
|
|
197
|
+
`,r,": ",a(v.item.primaryValue)]})},`primary-${v.item.name}`)),n&&c(jsxRuntime.Fragment,{children:[e("polyline",{fill:"none",stroke:d,strokeWidth:2.5,strokeDasharray:"5 5",points:x.map(v=>`${v.x},${v.y}`).join(" ")}),x.map(v=>e("circle",{cx:v.x,cy:v.y,r:3.5,fill:d,children:c("title",{children:[v.item.name,`
|
|
198
|
+
`,n,": ",(i??a)(v.item.secondaryValue??0)]})},`secondary-${v.item.name}`))]})]})}),e("div",{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(2, minmax(0, 1fr))",xl:"repeat(4, minmax(0, 1fr))"},gap:1},children:t.map(v=>c("div",{sx:C=>({borderRadius:"var(--orb-r-container)",px:1.1,py:.9,border:`1px solid ${Fo(C.palette.divider,.7)}`,bgcolor:Fo(C.palette.background.default,.35)}),children:[e(L,{component:"div",sx:{fontSize:"0.76rem",fontWeight:700,color:"var(--orb-fg-strong)"},noWrap:true,title:v.name,children:v.name}),e(L,{component:"div",sx:{fontSize:"0.71rem",color:"var(--orb-fg)"},children:a(v.primaryValue)}),n&&e(L,{component:"div",sx:{fontSize:"0.71rem",color:"var(--orb-fg)"},children:(i??a)(v.secondaryValue??0)})]},v.name))})]})};var sm=(t,o,r)=>{let n=new Set,a=[];return t.forEach(i=>{n.has(i)||(n.add(i),a.push({fieldId:i,label:r.get(i)?.label??i,zone:"rows"}));}),o.forEach(i=>{n.has(i)||(n.add(i),a.push({fieldId:i,label:r.get(i)?.label??i,zone:"columns"}));}),a},lm=(t,o,r)=>t.map(n=>{let a=o.get(n.fieldId),i=a?.label??n.fieldId;return {fieldId:n.fieldId,label:`${r(n.aggregation)} \xB7 ${i}`,item:n,field:a}}),cm=({rows:t,dimensionFieldId:o,primaryValue:r,secondaryValue:n})=>{if(!o)return [];let a=new Map;return t.forEach(i=>{let s=mr(i[o]),l=a.get(s);if(l){l.push(i);return}a.set(s,[i]);}),Array.from(a.entries()).sort((i,s)=>i[0].localeCompare(s[0],void 0,{sensitivity:"base"})).map(([i,s])=>({name:i,primaryValue:kn(s,r.fieldId,r.aggregation),secondaryValue:n?kn(s,n.fieldId,n.aggregation):void 0}))};M();var dm=({rows:t,fieldMap:o,rowFields:r,columnFields:n,valueFields:a,chartDimensionFieldId:i,chartPrimaryValueFieldId:s,chartSecondaryValueFieldId:l,chartType:d,isCollapsed:p,onChartDimensionFieldIdChange:m,onChartPrimaryValueFieldIdChange:h,onChartSecondaryValueFieldIdChange:f,onChartTypeChange:u,onToggleCollapse:b,getAggregationLabel:y})=>{let{t:g}=de(),x=to.useMemo(()=>sm(r,n,o),[n,o,r]),v=to.useMemo(()=>lm(a,o,y),[o,y,a]),C=v.find(T=>T.fieldId===s)??v[0],P=v.find(T=>T.fieldId===l&&T.fieldId!==C?.fieldId)??null,S=x.find(T=>T.fieldId===i)??x[0],I=S&&C?g("pivot.chart.subtitleReady",{dimension:S.label,measure:P?`${C.label} / ${P.label}`:C.label}):g("pivot.chart.subtitle"),R=to.useMemo(()=>!S||!C?[]:cm({rows:t,dimensionFieldId:S.fieldId,primaryValue:C.item,secondaryValue:P?.item}),[C,t,P,S]),w=T=>C?fa(T,C.item,o):T.toLocaleString(),A=T=>P?fa(T,P.item,o):T.toLocaleString(),D=x.length>1||v.length>1;return c(In,{title:g("pivot.chart.title"),subtitle:I,collapsed:p,onToggleCollapse:b,expandAriaLabel:g("pivot.chart.collapse.ariaExpand"),collapseAriaLabel:g("pivot.chart.collapse.ariaCollapse"),bodySx:{display:"flex",flexDirection:"column",gap:1.1},children:[D&&c("div",{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(2, minmax(0, 1fr))",xl:"repeat(4, minmax(0, 1fr))"},gap:1,alignItems:"start"},children:[c(xr,{size:"small",sx:{minWidth:0,width:"100%"},children:[e(L,{component:"div",sx:{fontSize:"0.7rem",fontWeight:500,color:"var(--orb-fg)",mb:.45},children:g("pivot.chart.dimension")}),e(Vt,{value:S?.fieldId??"",onChange:T=>m(String(T.target.value)),sx:{fontSize:"0.75rem",height:32},children:x.map(T=>e("option",{value:T.fieldId,sx:{fontSize:"0.75rem"},children:T.label},T.fieldId))})]}),c(xr,{size:"small",sx:{minWidth:0,width:"100%"},children:[e(L,{component:"div",sx:{fontSize:"0.7rem",fontWeight:500,color:"var(--orb-fg)",mb:.45},children:g("pivot.chart.primaryMeasure")}),e(Vt,{value:C?.fieldId??"",onChange:T=>h(String(T.target.value)),sx:{fontSize:"0.75rem",height:32},children:v.map(T=>e("option",{value:T.fieldId,sx:{fontSize:"0.75rem"},children:T.label},T.fieldId))})]}),c(xr,{size:"small",sx:{minWidth:0,width:"100%"},children:[e(L,{component:"div",sx:{fontSize:"0.7rem",fontWeight:500,color:"var(--orb-fg)",mb:.45},children:g("pivot.chart.secondaryMeasure")}),c(Vt,{value:P?.fieldId??"",onChange:T=>f(String(T.target.value)),sx:{fontSize:"0.75rem",height:32},children:[e("option",{value:"",sx:{fontSize:"0.75rem",color:"text.secondary"},children:g("common.none")}),v.filter(T=>T.fieldId!==C?.fieldId).map(T=>e("option",{value:T.fieldId,sx:{fontSize:"0.75rem"},children:T.label},T.fieldId))]})]}),c(xr,{size:"small",sx:{minWidth:0,width:"100%"},children:[e(L,{component:"div",sx:{fontSize:"0.7rem",fontWeight:500,color:"var(--orb-fg)",mb:.45},children:g("pivot.chart.chartType")}),c(Vt,{value:d,onChange:T=>u(T.target.value),sx:{fontSize:"0.75rem",height:32},children:[e("option",{value:"bar-vertical",sx:{fontSize:"0.75rem"},children:g("pivot.chart.style.barVertical")}),e("option",{value:"bar-horizontal",sx:{fontSize:"0.75rem"},children:g("pivot.chart.style.barHorizontal")}),e("option",{value:"line",sx:{fontSize:"0.75rem"},children:g("pivot.chart.style.line")}),e("option",{value:"scatter",sx:{fontSize:"0.75rem"},children:g("pivot.chart.style.scatter")})]})]})]}),e("div",{children:S?C?R.length===0?e("div",{sx:{py:5,textAlign:"center"},children:e(L,{component:"div",sx:{fontSize:"0.86rem",fontWeight:400,color:"var(--orb-fg)"},children:g("pivot.chart.emptyNoData")})}):d==="scatter"?e(am,{data:R,primaryLabel:C.label,secondaryLabel:P?.label,formatPrimaryValue:w,formatSecondaryValue:A}):e(im,{data:R,chartType:d,primaryLabel:C.label,secondaryLabel:P?.label,formatPrimaryValue:w,formatSecondaryValue:A}):e("div",{sx:{py:5,textAlign:"center"},children:e(L,{component:"div",sx:{fontSize:"0.86rem",fontWeight:400,color:"var(--orb-fg)"},children:g("pivot.chart.emptyNoValue")})}):e("div",{sx:{py:5,textAlign:"center"},children:e(L,{component:"div",sx:{fontSize:"0.86rem",fontWeight:400,color:"var(--orb-fg)"},children:g("pivot.chart.emptyNoDimension")})})})]})};M();var ls=({node:t,dataColumns:o,fieldMap:r,level:n,expandedKeys:a,onToggle:i,getValue:s})=>{let l=a.has(t.key),d=t.children.length>0,p=t.isGrandTotal,m=d&&!l&&!p,h=p?800:m?700:d?600:500,f=p?800:m?600:500;return c(jsxRuntime.Fragment,{children:[c("tr",{sx:{bgcolor:p?vt()==="dark"?"color-mix(in oklch, var(--orb-primary) 22%, transparent)":"color-mix(in oklch, var(--orb-primary) 8%, transparent)":vt()==="dark"?"var(--orb-surface)":"background.paper","&:hover":{bgcolor:p?vt()==="dark"?"color-mix(in oklch, var(--orb-primary) 28%, transparent)":"color-mix(in oklch, var(--orb-primary) 12%, transparent)":"var(--orb-hover)"}},children:[c("td",{style:{fontWeight:h},sx:u=>({fontSize:"0.76rem",borderBottom:`1px solid ${u.palette.divider}`,whiteSpace:"nowrap",pl:n*2+1,display:"flex",alignItems:"center",height:40}),children:[d&&!p&&e(se,{size:"small",onClick:()=>i(t.key),sx:{width:22,height:22,p:0,mr:.35,ml:-0.8},children:l?e(Go,{size:12}):e(Pr,{size:12})}),!d&&!p&&n>0&&e("div",{sx:{width:18}}),t.value]}),o.map(u=>e("td",{align:"right",style:{fontWeight:f},sx:{fontSize:"0.76rem",borderBottom:b=>`1px solid ${b.palette.divider}`,whiteSpace:"nowrap"},children:fa(s?s(t,u.id):t.aggregatedValues[u.id]??0,u.valueItem,r)},`${t.key}-${u.id}`))]}),l&&t.children.map(u=>e(ls,{node:u,dataColumns:o,fieldMap:r,level:n+1,expandedKeys:a,onToggle:i,getValue:s},u.key))]})};M();var Kl=(t,o,r)=>{let n=[...t,...o];return r&&n.includes(r)?r:n[0]??""},ds=(t,o)=>o&&t.some(r=>r.fieldId===o)?o:t[0]?.fieldId??"",ql=(t,o,r)=>r===""?"":r&&r!==o&&t.some(n=>n.fieldId===r)?r:t.find(n=>n.fieldId!==o)?.fieldId??"",um=t=>{let o=new Set,r=n=>{n.forEach(a=>{a.children.length>0&&(o.add(a.key),r(a.children));});};return r(t),o},mm=(t,o,r=0)=>t.length===0?r:t.reduce((n,a)=>a.children.length===0||!o.has(a.key)?Math.max(n,r+1):Math.max(n,mm(a.children,o,r+1)),r),wy=(t,o)=>{let r=[],n=a=>{a.forEach(i=>{if(i.children.length>0&&o.has(i.key)){n(i.children);return}r.push(i);});};return n(t),r},QO=({title:t,rows:o,fields:r,initialLayout:n,initialChart:a,emptyText:i,maxPreviewHeight:s=520,initialChartCollapsed:l=false,initialTableCollapsed:d=false,model:p,enablePresetManagement:m=false,presets:h,defaultPresets:f,onPresetsChange:u,initialPresetId:b,onPresetApplied:y})=>{let{t:g}=de(),x=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:8}})),v=to.useRef(0),C=to.useRef(false),P=t??g("pivot.title.default"),S=i??g("pivot.empty"),I=to.useMemo(()=>({sum:g("pivot.agg.sum"),count:g("pivot.agg.count"),avg:g("pivot.agg.avg"),min:g("pivot.agg.min"),max:g("pivot.agg.max")}),[g]),R=to.useCallback(N=>I[N]??Ku[N],[I]),w=to.useMemo(()=>new Set(r.map(N=>N.id)),[r]),A=to.useMemo(()=>new Map(r.map(N=>[N.id,N])),[r]),[D,T]=to.useState(()=>co(n?.rows,w)),[k,E]=to.useState(()=>co(n?.columns,w)),[O,$]=to.useState(()=>co(n?.filters,w)),[ee,F]=to.useState(()=>{let N=n?.values??[],_=new Set,U=[];return N.forEach(me=>{if(!w.has(me.fieldId)||_.has(me.fieldId))return;_.add(me.fieldId),v.current+=1;let Be=A.get(me.fieldId);U.push({tokenId:`v${v.current}`,fieldId:me.fieldId,aggregation:wo(me.aggregation,Be)});}),U}),[G,W]=to.useState({}),[Q,z]=to.useState(true),[H,X]=to.useState(false),[Y,j]=to.useState(()=>Kl(co(n?.rows,w),co(n?.columns,w),a?.dimensionFieldId)),[te,ce]=to.useState(()=>{let N=(n?.values??[]).filter((_,U,me)=>w.has(_.fieldId)&&me.findIndex(Be=>Be.fieldId===_.fieldId)===U).map(_=>({tokenId:_.fieldId,fieldId:_.fieldId,aggregation:wo(_.aggregation,A.get(_.fieldId))}));return ds(N,a?.primaryValueFieldId)}),[fe,Ve]=to.useState(()=>{let N=(n?.values??[]).filter((U,me,Be)=>w.has(U.fieldId)&&Be.findIndex(nt=>nt.fieldId===U.fieldId)===me).map(U=>({tokenId:U.fieldId,fieldId:U.fieldId,aggregation:wo(U.aggregation,A.get(U.fieldId))})),_=ds(N,a?.primaryValueFieldId);return ql(N,_,a?.secondaryValueFieldId)}),[ve,xe]=to.useState(a?.chartType??"bar-vertical"),[He,pe]=to.useState(l),[ye,$e]=to.useState(d),[tt,at]=to.useState(()=>f??[]),[st,K]=to.useState(""),[Ne,Se]=to.useState(false),[Fe,it]=to.useState(""),[Ye,wt]=to.useState(null),[Mt,Ft]=to.useState(new Set(["__grand_total__"])),[Et,ne]=to.useState(new Set),Ke=p?.rowFields??D,Oe=p?.columnFields??k,ue=p?.filterFields??O,we=p?.valueFields??ee,re=p?.filterSelections??G,Ce=p?.showGrandTotal??Q,De=p?.isConfiguratorCollapsed??H,Je=p?.chartDimensionFieldId??Y,lt=p?.chartPrimaryValueFieldId??te,ut=p?.chartSecondaryValueFieldId??fe,Ht=p?.chartType??ve,Yt=p?.isChartCollapsed??He,Wt=p?.isTableCollapsed??ye,St=h??tt,$t=m||St.length>0||!!u,bt=to.useCallback(N=>{if(p?.setRowFields){p.setRowFields(N);return}T(N);},[p]),At=to.useCallback(N=>{if(p?.setColumnFields){p.setColumnFields(N);return}E(N);},[p]),ct=to.useCallback(N=>{if(p?.setFilterFields){p.setFilterFields(N);return}$(N);},[p]),Bt=to.useCallback(N=>{if(p?.setValueFields){p.setValueFields(N);return}F(N);},[p]),jt=to.useCallback(N=>{if(p?.setFilterSelections){p.setFilterSelections(N);return}W(N);},[p]),q=to.useCallback(N=>{if(p?.setShowGrandTotal){p.setShowGrandTotal(N);return}z(N);},[p]),V=to.useCallback(N=>{if(p?.setIsConfiguratorCollapsed){p.setIsConfiguratorCollapsed(N);return}X(N);},[p]),Z=to.useCallback(N=>{if(p?.setChartDimensionFieldId){p.setChartDimensionFieldId(N);return}j(N);},[p]),be=to.useCallback(N=>{if(p?.setChartPrimaryValueFieldId){p.setChartPrimaryValueFieldId(N);return}ce(N);},[p]),ke=to.useCallback(N=>{if(p?.setChartSecondaryValueFieldId){p.setChartSecondaryValueFieldId(N);return}Ve(N);},[p]),Ee=to.useCallback(N=>{if(p?.setChartType){p.setChartType(N);return}xe(N);},[p]),_e=to.useCallback(N=>{if(p?.setIsChartCollapsed){p.setIsChartCollapsed(N);return}pe(N);},[p]),qe=to.useCallback(N=>{if(p?.setIsTableCollapsed){p.setIsTableCollapsed(N);return}$e(N);},[p]),je=to.useCallback(N=>{let _=typeof N=="function"?N(St):N;h||at(_),u?.(_);},[u,St,h]),mt=to.useMemo(()=>new Set([...Ke,...Oe,...ue]),[Ke,Oe,ue]),ht=to.useMemo(()=>r.filter(N=>!mt.has(N.id)),[r,mt]),Rt=to.useMemo(()=>{let N=[...Ke,...Oe,...ue],_=new Set,U=[];return N.forEach(me=>{_.has(me)||(_.add(me),U.push(me));}),U},[Oe,ue,Ke]);to.useEffect(()=>{bt(N=>{let _=N.filter(U=>w.has(U));return gr(N,_)?N:_}),At(N=>{let _=N.filter(U=>w.has(U));return gr(N,_)?N:_}),ct(N=>{let _=N.filter(U=>w.has(U));return gr(N,_)?N:_}),Bt(N=>{let _=N.filter(U=>w.has(U.fieldId)).map(U=>({...U,aggregation:wo(U.aggregation,A.get(U.fieldId))}));return rs(N,_)?N:_});},[A,w]);let yt=to.useMemo(()=>{let N={};return Rt.forEach(_=>{let U=new Set;o.forEach(me=>{U.add(mr(me[_]));}),N[_]=Array.from(U).sort((me,Be)=>me.localeCompare(Be));}),N},[Rt,o]);to.useEffect(()=>{jt(N=>{let _={};return Rt.forEach(U=>{let me=yt[U]??[],nt=(N[U]??[]).filter(ae=>me.includes(ae)),Ge=Object.prototype.hasOwnProperty.call(N,U);_[U]=Ge?nt:me;}),Qu(N,_)?N:_});},[Rt,yt]),to.useEffect(()=>{Z(N=>Kl(Ke,Oe,N));},[Oe,Ke,Z]),to.useEffect(()=>{be(N=>ds(we,N));},[be,we]),to.useEffect(()=>{ke(N=>ql(we,lt,N));},[lt,ke,we]);let B=to.useMemo(()=>o.filter(N=>Rt.every(_=>{let U=re[_]??[],me=yt[_]??[];if(U.length===me.length)return true;if(U.length===0)return false;let Be=mr(N[_]);return U.includes(Be)})),[Rt,yt,re,o]),J=to.useMemo(()=>{if(we.length===0)return null;let N=new Map;if(B.forEach(Ge=>{let ae=Oe.length>0?Oe.map(oe=>mr(Ge[oe])):[g("pivot.valueLabel")],ge=Gr(ae);N.set(ge,ae);}),N.size===0){let Ge=Oe.length>0?Oe.map(()=>ts):[g("pivot.valueLabel")];N.set(Gr(Ge),Ge);}let _=Array.from(N.entries()).sort((Ge,ae)=>ju(Ge[1],ae[1])),U=_.flatMap(([Ge,ae])=>we.map(ge=>{let oe=A.get(ge.fieldId),Le=`${R(ge.aggregation)} ${oe?.label??ge.fieldId}`,Qe=Oe.length===0||we.length>1?`${ae.join(" / ")} \u2022 ${Le}`:ae.join(" / ");return {id:`${Ge}::${ge.tokenId}`,colKey:Ge,valueItem:ge,label:Qe}})),me=[];Oe.length>0&&_.forEach(([Ge,ae])=>{let ge=U.filter(Qe=>Qe.colKey===Ge),oe=me,Le=[];ae.forEach((Qe,Re)=>{Le.push(`d${Re}:${Qe}`);let Ze=`col::${Gr(Le)}`,Pt=oe.find(Jr=>Jr.key===Ze);Pt||(Pt={key:Ze,label:Qe,children:[],leafColumnIds:[],path:ae.slice(0,Re+1),depth:Re},oe.push(Pt)),ge.forEach(Jr=>{Pt.leafColumnIds.includes(Jr.id)||Pt.leafColumnIds.push(Jr.id);}),oe=Pt.children;});});let Be=Ge=>{let ae={};return U.forEach(ge=>{let oe=Ge.filter(Le=>{let Qe=Oe.length>0?Oe.map(Re=>mr(Le[Re])):[g("pivot.valueLabel")];return Gr(Qe)===ge.colKey});ae[ge.id]=kn(oe,ge.valueItem.fieldId,ge.valueItem.aggregation);}),ae},nt=[];if(Ke.length===0)nt.push({key:"root",value:g("pivot.resultLabel")||Gu,children:[],isLeaf:true,aggregatedValues:Be(B),path:[],depth:0});else {let Ge=(ae,ge,oe)=>{if(ge>=Ke.length)return [];let Le=Ke[ge],Qe=new Map;return ae.forEach(Re=>{let Ze=mr(Re[Le]);Qe.has(Ze)||Qe.set(Ze,[]),Qe.get(Ze).push(Re);}),Array.from(Qe.keys()).sort().map(Re=>{let Ze=Qe.get(Re),Pt=[...oe,Re];return {key:Gr(Pt),value:Re,fieldId:Le,aggregatedValues:Be(Ze),children:Ge(Ze,ge+1,Pt),isLeaf:ge===Ke.length-1,path:Pt,depth:ge}})};nt.push(...Ge(B,0,[]));}return {dataColumns:U,columnTree:me,rowTree:nt}},[Oe,A,B,R,Ke,g,we]),he=to.useCallback((N,_)=>(v.current+=1,{tokenId:`v${v.current}`,fieldId:N,aggregation:wo(_,A.get(N))}),[A]),Ie=to.useCallback(N=>{if(N==="rows")return bt([]);if(N==="columns")return At([]);if(N==="filters")return ct([]);Bt([]);},[]),et=to.useCallback((N,_)=>{if(N==="rows")return bt(U=>U.filter(me=>me!==_));if(N==="columns")return At(U=>U.filter(me=>me!==_));if(N==="filters")return ct(U=>U.filter(me=>me!==_));Bt(U=>U.filter(me=>me.tokenId!==_));},[]),Xe=to.useCallback((N,_)=>{Bt(U=>U.map(me=>me.tokenId===N?{...me,aggregation:wo(_,A.get(me.fieldId))}:me));},[A]),kt=to.useCallback(N=>{wt(String(N.active.id));},[]),ft=to.useCallback(N=>{if(wt(null),!N.over)return;let _=os(String(N.active.id)),U=os(String(N.over.id));if(!_||!U||_.kind!=="item"||!_.key)return;if(_.zone===U.zone&&U.kind==="item"){if(_.zone==="rows"){let Re=Ke.indexOf(_.key),Ze=Ke.indexOf(U.key??"");Re!==-1&&Ze!==-1&&Re!==Ze&&bt(Pt=>sortable.arrayMove(Pt,Re,Ze));return}if(_.zone==="columns"){let Re=Oe.indexOf(_.key),Ze=Oe.indexOf(U.key??"");Re!==-1&&Ze!==-1&&Re!==Ze&&At(Pt=>sortable.arrayMove(Pt,Re,Ze));return}if(_.zone==="filters"){let Re=ue.indexOf(_.key),Ze=ue.indexOf(U.key??"");Re!==-1&&Ze!==-1&&Re!==Ze&&ct(Pt=>sortable.arrayMove(Pt,Re,Ze));return}if(_.zone==="values"){let Re=we.findIndex(Pt=>Pt.tokenId===_.key),Ze=we.findIndex(Pt=>Pt.tokenId===(U.key??""));Re!==-1&&Ze!==-1&&Re!==Ze&&Bt(Pt=>sortable.arrayMove(Pt,Re,Ze));}return}let me=U.zone,Be=[...Ke],nt=[...Oe],Ge=[...ue],ae=[...we],ge="",oe=null;if(_.zone==="palette")ge=_.key;else if(_.zone==="values"){let Re=ae.find(Ze=>Ze.tokenId===_.key);if(!Re)return;ge=Re.fieldId,oe=Re,ae=ae.filter(Ze=>Ze.tokenId!==_.key);}else _.zone==="rows"?(ge=_.key,Be=Be.filter(Re=>Re!==ge)):_.zone==="columns"?(ge=_.key,nt=nt.filter(Re=>Re!==ge)):_.zone==="filters"&&(ge=_.key,Ge=Ge.filter(Re=>Re!==ge));if(!ge)return;let Le=()=>{Be=Be.filter(Re=>Re!==ge),nt=nt.filter(Re=>Re!==ge),Ge=Ge.filter(Re=>Re!==ge);},Qe=Re=>{if(U.kind!=="item"||!U.key)return Re==="rows"?Be.length:Re==="columns"?nt.length:Re==="filters"?Ge.length:Re==="values"?ae.length:0;if(Re==="rows"){let Ze=Be.indexOf(U.key);return Ze>=0?Ze:Be.length}if(Re==="columns"){let Ze=nt.indexOf(U.key);return Ze>=0?Ze:nt.length}if(Re==="filters"){let Ze=Ge.indexOf(U.key);return Ze>=0?Ze:Ge.length}if(Re==="values"){let Ze=ae.findIndex(Pt=>Pt.tokenId===U.key);return Ze>=0?Ze:ae.length}return 0};if(me==="palette"){bt(Be),At(nt),ct(Ge),Bt(ae);return}if(me==="values"){let Re=Qe("values"),Ze=oe??he(ge);ae.splice(Re,0,Ze),bt(Be),At(nt),ct(Ge),Bt(ae);return}if(Yu(me)){Le();let Re=Qe(me);me==="rows"?Be.splice(Re,0,ge):me==="columns"?nt.splice(Re,0,ge):Ge.splice(Re,0,ge),bt(Be),At(nt),ct(Ge),Bt(ae);}},[Oe,he,ue,Ke,we]),gt=to.useCallback((N,_)=>{jt(U=>({...U,[N]:_}));},[]),Ct=to.useCallback(N=>{Ft(_=>{let U=new Set(_);return U.has(N)?U.delete(N):U.add(N),U});},[]),ao=to.useCallback(N=>{ne(_=>{let U=new Set(_);return U.has(N)?U.delete(N):U.add(N),U});},[]),Lt=to.useCallback(N=>{let _=A.get(N.fieldId),U=$l(_);return e(xr,{size:"small",sx:{minWidth:98},children:e(Vt,{value:N.aggregation,onChange:me=>Xe(N.tokenId,me.target.value),onClick:me=>me.stopPropagation(),onMouseDown:me=>me.stopPropagation(),sx:{fontSize:"0.72rem",height:26,"& select.orb-inp":{py:.35}},children:U.map(me=>e("option",{value:me,sx:{fontSize:"0.75rem"},children:R(me)},me))})})},[A,R,Xe]),Qt=to.useCallback(N=>{let _=yt[N]??[],U=re[N]??_;return _.length===0?g("pivot.filter.noValues"):U.length===0?g("pivot.filter.noneSelected"):U.length===_.length?g("pivot.filter.allValues"):g("pivot.filter.selectedCount",{selected:U.length,total:_.length})},[yt,re,g]),zt=to.useCallback(N=>{let _=yt[N]??[],U=re[N]??_;return e(em,{options:_,selectedValues:U,onChange:me=>gt(N,me)})},[yt,re,gt]),qt=to.useCallback(()=>`pivot-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,[]),_t=to.useCallback(()=>{let N={};return new Set([...Rt,...Object.keys(re)]).forEach(U=>{if(!w.has(U))return;let me=re[U]??[];N[U]=[...me];}),{layout:{rows:[...Ke],columns:[...Oe],filters:[...ue],values:we.map(U=>({fieldId:U.fieldId,aggregation:U.aggregation}))},filterSelections:N,showGrandTotal:Ce,chart:{dimensionFieldId:Je,primaryValueFieldId:lt,secondaryValueFieldId:ut,chartType:Ht}}},[Rt,Je,lt,ut,Ht,Oe,ue,re,Ke,Ce,w,we]),ro=to.useCallback(N=>{let _=co(N.layout.rows,w),U=co(N.layout.columns,w),me=co(N.layout.filters,w),Be=new Set,nt=(N.layout.values??[]).filter(ge=>!w.has(ge.fieldId)||Be.has(ge.fieldId)?false:(Be.add(ge.fieldId),true)).map(ge=>he(ge.fieldId,ge.aggregation)),Ge={};Object.entries(N.filterSelections??{}).forEach(([ge,oe])=>{!w.has(ge)||!Array.isArray(oe)||(Ge[ge]=Array.from(new Set(oe.map(Le=>String(Le)))));}),bt(_),At(U),ct(me),Bt(nt),jt(Ge),typeof N.showGrandTotal=="boolean"&&q(N.showGrandTotal),Z(Kl(_,U,N.chart?.dimensionFieldId));let ae=ds(nt,N.chart?.primaryValueFieldId);be(ae),ke(ql(nt,ae,N.chart?.secondaryValueFieldId)),Ee(N.chart?.chartType??"bar-vertical"),K(N.id),y?.(N);},[he,y,Z,be,ke,Ee,At,ct,jt,bt,q,Bt,w]),io=to.useCallback(N=>{if(!N){K("");return}let _=St.find(U=>U.id===N);if(!_){K("");return}ro(_);},[ro,St]),yo=to.useCallback(()=>{let N=g("pivot.preset.defaultName",{index:St.length+1});it(N),Se(true);},[St.length,g]),No=to.useCallback(()=>{let N=Fe.trim();if(!N)return;let _={id:qt(),name:N,..._t()};je(U=>[...U,_]),K(_.id),Se(false);},[_t,qt,Fe,je]),Do=to.useCallback(()=>{st&&(je(N=>N.filter(_=>_.id!==st)),K(""));},[st,je]);to.useEffect(()=>{if(!b||C.current)return;let N=St.find(_=>_.id===b);N&&(C.current=true,ro(N));},[ro,b,St]),to.useEffect(()=>{st&&(St.some(N=>N.id===st)||K(""));},[st,St]);let sr=to.useMemo(()=>{if(!Ce||!J||!Ke.length)return null;let N={};return J.dataColumns.forEach(_=>{let U=B.filter(me=>{let Be=Oe.length>0?Oe.map(nt=>mr(me[nt])):[g("pivot.valueLabel")];return Gr(Be)===_.colKey});N[_.id]=kn(U,_.valueItem.fieldId,_.valueItem.aggregation);}),{key:"__grand_total__",value:g("pivot.grandTotal")||Uu,children:[],isLeaf:false,isGrandTotal:true,aggregatedValues:N,path:[],depth:-1}},[Ce,J,B,Oe,Ke.length,g]),So=to.useMemo(()=>um(J?.rowTree??[]),[J]),zo=to.useMemo(()=>um(J?.columnTree??[]),[J]);to.useEffect(()=>{Ft(N=>{let _=new Set;return N.has("__grand_total__")&&_.add("__grand_total__"),So.forEach(U=>{N.has(U)&&_.add(U);}),_});},[So]),to.useEffect(()=>{ne(N=>{let _=new Set;return zo.forEach(U=>{N.has(U)&&_.add(U);}),_});},[zo]);let Xr=to.useCallback(()=>{Ft(N=>{let _=new Set(N);return So.forEach(U=>_.add(U)),_});},[So]),Zr=to.useCallback(()=>{Ft(N=>{let _=new Set;return N.has("__grand_total__")&&_.add("__grand_total__"),_});},[]),Or=to.useCallback(()=>{ne(new Set(zo));},[zo]),Yr=to.useCallback(()=>{ne(new Set);},[]),jr=to.useMemo(()=>!J||Oe.length===0?[]:wy(J.columnTree,Et),[Oe.length,Et,J]),Ao=to.useMemo(()=>{if(!J)return [];if(Oe.length===0)return J.dataColumns.map(_=>({id:_.id,label:_.label,leafColumnIds:[_.id],valueItem:_.valueItem}));let N=new Map(J.dataColumns.map(_=>[_.id,_]));return jr.flatMap(_=>{let U=new Map;return _.leafColumnIds.forEach(me=>{let Be=N.get(me);if(!Be)return;let nt=Be.valueItem.tokenId,Ge=`${R(Be.valueItem.aggregation)} ${A.get(Be.valueItem.fieldId)?.label??Be.valueItem.fieldId}`,ae=U.get(nt);if(ae){ae.leafColumnIds.push(me);return}U.set(nt,{id:`${_.key}::${nt}`,label:we.length>1?Ge:_.label,leafColumnIds:[me],valueItem:Be.valueItem});}),Array.from(U.values())})},[Oe.length,A,R,J,we.length,jr]),Fr=to.useMemo(()=>new Map(Ao.map(N=>[N.id,N])),[Ao]),Qr=to.useMemo(()=>Ao.map(N=>({id:N.id,colKey:N.id,valueItem:N.valueItem,label:N.label})),[Ao]),jo=to.useMemo(()=>{if(!J||Oe.length===0)return [];let N=[],_=mm(J.columnTree,Et),U=_+(we.length>1?1:0),me=(Be,nt)=>{N[nt]??(N[nt]=[]),Be.forEach(Ge=>{let ae=Ge.children.length>0&&Et.has(Ge.key),ge=Ao.filter(Le=>Ge.leafColumnIds.some(Qe=>Le.leafColumnIds.includes(Qe))).length,oe=ae||we.length>1?1:U-nt;N[nt].push({key:Ge.key,label:Ge.label,colSpan:ge,rowSpan:oe,expandable:Ge.children.length>0,expanded:ae}),ae&&me(Ge.children,nt+1);});};return me(J.columnTree,0),we.length>1&&(N[_]=Ao.map(Be=>({key:Be.id,label:Be.label,colSpan:1,rowSpan:1,expandable:false,expanded:false}))),N},[Oe.length,Et,J,we.length,Ao]),lr=to.useCallback((N,_)=>_.leafColumnIds.reduce((U,me)=>U+(N.aggregatedValues[me]??0),0),[]),Bn=to.useMemo(()=>c(jsxRuntime.Fragment,{children:[e(Te,{size:"small",variant:"text",onClick:Xr,disabled:So.size===0,sx:{minWidth:"auto",px:.8,fontSize:"0.72rem"},children:g("pivot.table.expandRowsAll")}),e(Te,{size:"small",variant:"text",onClick:Zr,disabled:So.size===0,sx:{minWidth:"auto",px:.8,fontSize:"0.72rem"},children:g("pivot.table.collapseRowsAll")}),e(Nt,{orientation:"vertical",flexItem:true}),e(Te,{size:"small",variant:"text",onClick:Or,disabled:zo.size===0,sx:{minWidth:"auto",px:.8,fontSize:"0.72rem"},children:g("pivot.table.expandColumnsAll")}),e(Te,{size:"small",variant:"text",onClick:Yr,disabled:Oe.length===0,sx:{minWidth:"auto",px:.8,fontSize:"0.72rem"},children:g("pivot.table.collapseColumnsAll")})]}),[Oe.length,zo.size,So.size,Yr,Zr,Or,Xr,g]),Br=()=>{if(!Ye)return null;let N=os(Ye);if(!N||N.kind!=="item"||!N.key)return null;if(N.zone==="palette"){let Be=A.get(N.key);return Be?e(_l,{label:Be.label,subtitle:Be.type}):null}if(N.zone==="values"){let Be=we.find(ge=>ge.tokenId===N.key);if(!Be)return null;let Ge=A.get(Be.fieldId)?.label??Be.fieldId,ae=`${R(Be.aggregation)}(${Ge})`;return e(ns,{label:Ge,caption:ae})}let U=A.get(N.key)?.label??N.key,me=Qt(N.key);return e(ns,{label:U,caption:me})};return c(Ae,{sx:N=>({p:{xs:1.2,md:2},borderRadius:"var(--orb-r-container)",border:`1px solid ${N.palette.divider}`,bgcolor:"var(--orb-canvas)",boxShadow:"var(--orb-shadow-2)",display:"flex",flexDirection:"column",gap:2.25}),children:[c("div",{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1.5,flexWrap:"wrap"},children:[c("div",{sx:{minWidth:0,display:"flex",flexDirection:"column",gap:.35},children:[e(L,{component:"div",sx:{fontSize:"1.08rem",fontWeight:700,lineHeight:1.25,color:"var(--orb-fg-strong)"},children:P}),e(L,{component:"div",sx:{fontSize:"0.8rem",fontWeight:400,color:"var(--orb-fg)"},children:g("pivot.subtitle.default")})]}),c(le,{direction:"row",spacing:1.5,alignItems:"center",children:[$t&&c(jsxRuntime.Fragment,{children:[e(xr,{size:"small",sx:{minWidth:200},children:c(Vt,{value:st,displayEmpty:true,onChange:N=>io(String(N.target.value)),sx:{fontSize:"0.75rem",height:32},children:[e("option",{value:"",sx:{fontSize:"0.75rem",color:"text.secondary"},children:g("pivot.preset.selectPlaceholder")}),St.map(N=>e("option",{value:N.id,sx:{fontSize:"0.75rem"},children:N.name},N.id))]})}),e(dt,{title:g("pivot.preset.save"),children:e(se,{size:"small",onClick:yo,"aria-label":g("pivot.preset.save"),sx:{width:28,height:28,p:0},children:e(Tr,{size:15})})}),e(dt,{title:g("pivot.preset.delete"),children:e("span",{children:e(se,{size:"small",onClick:Do,disabled:!st,"aria-label":g("pivot.preset.delete"),sx:{width:28,height:28,p:0},children:e(gi,{size:15})})})}),e(Nt,{flexItem:true,orientation:"vertical"})]}),c(L,{component:"div",sx:{fontSize:"0.75rem",fontWeight:400,color:"var(--orb-fg)"},children:[g("pivot.records"),": ",e("strong",{children:o.length.toLocaleString()})," / ",g("pivot.afterFilter"),":"," ",e("strong",{children:B.length.toLocaleString()})]}),e(Nt,{flexItem:true,orientation:"vertical"}),c("div",{sx:{display:"flex",alignItems:"center",gap:.6},children:[e(L,{component:"div",sx:{fontSize:"0.75rem",fontWeight:500,color:"var(--orb-fg-strong)"},children:g("pivot.grandTotal")}),e(di,{size:"small",checked:Ce,onChange:N=>q(N.target.checked)})]})]})]}),e(Nt,{}),c(core.DndContext,{sensors:x,collisionDetection:core.closestCenter,onDragStart:kt,onDragEnd:ft,children:[e(rm,{isConfiguratorCollapsed:De,onToggleCollapse:()=>V(N=>!N),availableFields:ht,fieldMap:A,filterFields:ue,columnFields:Oe,rowFields:Ke,valueFields:we,clearZone:Ie,removeFieldFromZone:et,getFilterSelectionSummary:Qt,renderDimensionFilterSelect:zt,renderAggregationSelect:Lt,getAggregationLabel:R}),e(Ud,{children:e(core.DragOverlay,{dropAnimation:{duration:250,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:Br()})})]}),e(dm,{rows:B,fieldMap:A,rowFields:Ke,columnFields:Oe,valueFields:we,chartDimensionFieldId:Je,chartPrimaryValueFieldId:lt,chartSecondaryValueFieldId:ut,chartType:Ht,isCollapsed:Yt,onChartDimensionFieldIdChange:N=>Z(N),onChartPrimaryValueFieldIdChange:N=>be(N),onChartSecondaryValueFieldIdChange:N=>ke(N),onChartTypeChange:N=>Ee(N),onToggleCollapse:()=>_e(N=>!N),getAggregationLabel:R}),e(In,{title:g("pivot.table.sectionTitle"),subtitle:Ke.length>0?Ke.map(N=>A.get(N)?.label??N).join(" > "):g("pivot.table.dimensions"),collapsed:Wt,onToggleCollapse:()=>qe(N=>!N),expandAriaLabel:g("pivot.table.collapse.ariaExpand"),collapseAriaLabel:g("pivot.table.collapse.ariaCollapse"),bodySx:{p:0},headerActions:Bn,children:J===null?e("div",{sx:{py:5,px:{xs:1.2,md:1.6},textAlign:"center"},children:e(L,{component:"div",sx:{fontSize:"0.86rem",fontWeight:400,color:"var(--orb-fg)"},children:S})}):e("div",{sx:{maxHeight:s},children:c("table",{className:"orb-tbl",size:"small",stickyHeader:true,children:[e("thead",{children:(jo.length>0?jo:[[]]).map((N,_)=>c("tr",{children:[_===0&&e("td",{rowSpan:Math.max(jo.length,1),sx:U=>({fontWeight:800,fontSize:"0.76rem",color:"text.primary",bgcolor:vt()==="dark"?"var(--orb-canvas)":"var(--orb-surface)",borderBottom:`1px solid ${U.palette.divider}`,pl:2,minWidth:220,verticalAlign:"middle"}),children:Ke.length>0?Ke.map(U=>A.get(U)?.label).join(" > "):g("pivot.table.dimensions")}),(N.length>0?N:Ao.map(U=>({key:U.id,label:U.label,colSpan:1,rowSpan:1,expandable:false,expanded:false}))).map(U=>e("td",{align:"center",colSpan:U.colSpan,rowSpan:U.rowSpan,sx:me=>({fontWeight:800,fontSize:"0.75rem",color:"text.primary",bgcolor:vt()==="dark"?"var(--orb-canvas)":"var(--orb-surface)",borderBottom:`1px solid ${me.palette.divider}`,minWidth:148,verticalAlign:"middle"}),children:c("div",{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:.4},children:[U.expandable&&e(se,{size:"small",onClick:()=>ao(U.key),sx:{width:22,height:22,p:0,ml:-0.2},children:U.expanded?e(Go,{size:12}):e(Pr,{size:12})}),e("div",{component:"span",children:U.label})]})},U.key))]},`pivot-header-row-${_}`))}),c("tbody",{children:[J.rowTree.map(N=>e(ls,{node:N,dataColumns:Qr,fieldMap:A,level:0,expandedKeys:Mt,onToggle:Ct,getValue:(_,U)=>{let me=Fr.get(U);return me?lr(_,me):0}},N.key)),sr&&e(ls,{node:sr,dataColumns:Qr,fieldMap:A,level:0,expandedKeys:Mt,onToggle:Ct,getValue:(N,_)=>{let U=Fr.get(_);return U?lr(N,U):0}})]})]})})}),c(Ot,{open:Ne,onClose:()=>Se(false),maxWidth:"xs",fullWidth:true,children:[e("div",{className:"orb-dialog-title",children:g("pivot.preset.saveDialogTitle")}),e("div",{className:"orb-dialog-content",children:e(ze,{autoFocus:true,fullWidth:true,margin:"dense",label:g("pivot.preset.nameLabel"),value:Fe,onChange:N=>it(N.target.value),onKeyDown:N=>{N.key==="Enter"&&(N.preventDefault(),No());}})}),c("div",{className:"orb-dialog-actions",children:[e(Te,{onClick:()=>Se(false),children:g("common.cancel")}),e(Te,{variant:"contained",onClick:No,disabled:!Fe.trim(),children:g("common.save")})]})]})]})};var gm=(t,o,r)=>{let n=[...t,...o];return r&&n.includes(r)?r:n[0]??""},Zl=(t,o)=>o&&t.some(r=>r.fieldId===o)?o:t[0]?.fieldId??"",hm=(t,o,r)=>r===""?"":r&&r!==o&&t.some(n=>n.fieldId===r)?r:t.find(n=>n.fieldId!==o)?.fieldId??"",rF=({fields:t,initialLayout:o,initialFilterSelections:r={},initialShowGrandTotal:n=true,initialConfiguratorCollapsed:a=false,initialChart:i,initialChartCollapsed:s=false,initialTableCollapsed:l=false})=>{let d=to.useRef(0),p=to.useMemo(()=>new Set(t.map(K=>K.id)),[t]),m=to.useMemo(()=>new Map(t.map(K=>[K.id,K])),[t]),[h,f]=to.useState(()=>co(o?.rows,p)),[u,b]=to.useState(()=>co(o?.columns,p)),[y,g]=to.useState(()=>co(o?.filters,p)),[x,v]=to.useState(()=>{let K=o?.values??[],Ne=new Set,Se=[];return K.forEach(Fe=>{!p.has(Fe.fieldId)||Ne.has(Fe.fieldId)||(Ne.add(Fe.fieldId),d.current+=1,Se.push({tokenId:`v${d.current}`,fieldId:Fe.fieldId,aggregation:wo(Fe.aggregation,m.get(Fe.fieldId))}));}),Se}),[C,P]=to.useState(r),[S,I]=to.useState(n),[R,w]=to.useState(a),[A,D]=to.useState(()=>gm(co(o?.rows,p),co(o?.columns,p),i?.dimensionFieldId)),[T,k]=to.useState(()=>{let K=(()=>{let Ne=o?.values??[],Se=new Set,Fe=[];return Ne.forEach(it=>{!p.has(it.fieldId)||Se.has(it.fieldId)||(Se.add(it.fieldId),Fe.push({tokenId:it.fieldId,fieldId:it.fieldId,aggregation:wo(it.aggregation,m.get(it.fieldId))}));}),Fe})();return Zl(K,i?.primaryValueFieldId)}),[E,O]=to.useState(()=>{let K=(()=>{let Se=o?.values??[],Fe=new Set,it=[];return Se.forEach(Ye=>{!p.has(Ye.fieldId)||Fe.has(Ye.fieldId)||(Fe.add(Ye.fieldId),it.push({tokenId:Ye.fieldId,fieldId:Ye.fieldId,aggregation:wo(Ye.aggregation,m.get(Ye.fieldId))}));}),it})(),Ne=Zl(K,i?.primaryValueFieldId);return hm(K,Ne,i?.secondaryValueFieldId)}),[$,ee]=to.useState(i?.chartType??"bar-vertical"),[F,G]=to.useState(s),[W,Q]=to.useState(l);to.useEffect(()=>{f(K=>{let Ne=K.filter(Se=>p.has(Se));return gr(K,Ne)?K:Ne}),b(K=>{let Ne=K.filter(Se=>p.has(Se));return gr(K,Ne)?K:Ne}),g(K=>{let Ne=K.filter(Se=>p.has(Se));return gr(K,Ne)?K:Ne}),v(K=>{let Ne=K.filter(Se=>p.has(Se.fieldId)).map(Se=>({...Se,aggregation:wo(Se.aggregation,m.get(Se.fieldId))}));return rs(K,Ne)?K:Ne});},[m,p]),to.useEffect(()=>{D(K=>gm(h,u,K));},[u,h]),to.useEffect(()=>{k(K=>Zl(x,K));},[x]),to.useEffect(()=>{O(K=>hm(x,T,K));},[T,x]);let z=to.useCallback(K=>{f(co(K,p));},[p]),H=to.useCallback(K=>{b(co(K,p));},[p]),X=to.useCallback(K=>{g(co(K,p));},[p]),Y=to.useCallback(K=>{v(Ne=>{let Se=K??[],Fe=new Set,it=[];return Se.forEach(Ye=>{if(!p.has(Ye.fieldId)||Fe.has(Ye.fieldId))return;Fe.add(Ye.fieldId);let wt=Ne.find(Mt=>Mt.fieldId===Ye.fieldId);if(wt){it.push({...wt,aggregation:wo(Ye.aggregation??wt.aggregation,m.get(Ye.fieldId))});return}d.current+=1,it.push({tokenId:`v${d.current}`,fieldId:Ye.fieldId,aggregation:wo(Ye.aggregation,m.get(Ye.fieldId))});}),it});},[m,p]),j=to.useCallback(K=>{z(K.rows??[]),H(K.columns??[]),X(K.filters??[]),Y(K.values??[]);},[H,X,z,Y]),te=to.useCallback(K=>{if(K==="rows")return f([]);if(K==="columns")return b([]);if(K==="filters")return g([]);v([]);},[]),ce=to.useCallback((K,Ne)=>{if(K==="rows")return f(Se=>Se.filter(Fe=>Fe!==Ne));if(K==="columns")return b(Se=>Se.filter(Fe=>Fe!==Ne));if(K==="filters")return g(Se=>Se.filter(Fe=>Fe!==Ne));v(Se=>Se.filter(Fe=>Fe.tokenId!==Ne));},[]),fe=to.useCallback((K,Ne)=>{v(Se=>Se.map(Fe=>Fe.tokenId===K?{...Fe,aggregation:wo(Ne,m.get(Fe.fieldId))}:Fe));},[m]),Ve=to.useCallback((K,Ne)=>{P(Se=>({...Se,[K]:Ne}));},[]),ve=to.useCallback(()=>{P({});},[]),xe=to.useCallback(()=>{I(K=>!K);},[]),He=to.useCallback(()=>{w(K=>!K);},[]),pe=to.useCallback(K=>{D(K);},[]),ye=to.useCallback(K=>{k(K);},[]),$e=to.useCallback(K=>{O(K);},[]),tt=to.useCallback(()=>{G(K=>!K);},[]),at=to.useCallback(()=>{Q(K=>!K);},[]);return {model:to.useMemo(()=>({rowFields:h,setRowFields:f,columnFields:u,setColumnFields:b,filterFields:y,setFilterFields:g,valueFields:x,setValueFields:v,filterSelections:C,setFilterSelections:P,showGrandTotal:S,setShowGrandTotal:I,isConfiguratorCollapsed:R,setIsConfiguratorCollapsed:w,chartDimensionFieldId:A,setChartDimensionFieldId:D,chartPrimaryValueFieldId:T,setChartPrimaryValueFieldId:k,chartSecondaryValueFieldId:E,setChartSecondaryValueFieldId:O,chartType:$,setChartType:ee,isChartCollapsed:F,setIsChartCollapsed:G,isTableCollapsed:W,setIsTableCollapsed:Q}),[A,T,E,$,u,y,C,F,R,W,h,S,x]),actions:{setRows:z,setColumns:H,setFilters:X,setValues:Y,setLayout:j,clearZone:te,removeFieldFromZone:ce,setAggregationForValue:fe,setFilterSelection:Ve,resetFilterSelections:ve,toggleGrandTotal:xe,toggleConfigurator:He,setChartDimension:pe,setChartPrimaryValue:ye,setChartSecondaryValue:$e,setChartType:ee,toggleChart:tt,toggleTable:at}}};var sF=({orientation:t="auto",defaultNavigationOpen:o,onNavOpenChange:r}={})=>{let n=lo(),a=wr("(orientation: portrait)"),i=wr(n.breakpoints.down("md")),s=to.useMemo(()=>t==="auto"?a||i?"portrait":"landscape":t,[i,a,t]),[l,d]=to.useState(o??s==="landscape");to.useEffect(()=>{d(o??s==="landscape");},[o,s]);let p=h=>{d(h),r?.(h);};return {resolvedOrientation:s,isPortraitViewport:a,isCompactViewport:i,navigationOpen:l,setNavigationOpen:p,toggleNavigationOpen:()=>p(!l)}};var My=t=>{let o=Number(t||0);return Number.isFinite(o)?o:0},dF=({rows:t,rowKey:o="id",numericField:r,defaultSelectedId:n})=>{let i=t[0]?.[o],[s,l]=to.useState(n??i),d=to.useMemo(()=>t.find(u=>u[o]===s)||t[0],[o,t,s]),[p,m]=to.useState(()=>{let u=d?.[r];return u==null?"0":String(u)});return {selectedId:s,selectedRecord:d,editorValue:p,setEditorValue:m,selectRecord:u=>{let b=u[o];l(b);let y=u[r];m(y==null?"0":String(y));},applyEditorValue:u=>{if(s===void 0)return;let b=My(p),y=t.map(g=>g[o]===s?{...g,[r]:b}:g);u(y);}}};M();var Ry=["code_128","ean_13","ean_8","qr_code","upc_a","upc_e"],bm=(t,o,r,n)=>{o?.(t),n&&r?.();},fF=({open:t,onClose:o,title:r="Scan barcode",subtitle:n="Use the rear camera on the device. If scanning is unavailable, enter the code manually.",formats:a=Ry,facingMode:i="environment",manualEntry:s=true,autoCloseOnDetect:l=true,scanIntervalMs:d=600,confirmLabel:p="Use code",cancelLabel:m="Close",manualPlaceholder:h="Enter barcode manually",onDetected:f,onError:u,sx:b})=>{let y=to__namespace.default.useRef(null),g=to__namespace.default.useRef(null),x=to__namespace.default.useRef(null),v=to__namespace.default.useRef(null),[C,P]=to__namespace.default.useState("idle"),[S,I]=to__namespace.default.useState(""),[R,w]=to__namespace.default.useState(null),[A,D]=to__namespace.default.useState(null),T=to__namespace.default.useCallback(()=>{x.current!==null&&(window.clearInterval(x.current),x.current=null),g.current&&(g.current.getTracks().forEach(O=>O.stop()),g.current=null),y.current&&(y.current.srcObject=null);},[]),k=to__namespace.default.useCallback(O=>{D(O),P("error"),u?.(O);},[u]);to__namespace.default.useEffect(()=>{if(!t){T(),P("idle"),D(null),I("");return}let O=false;return (async()=>{if(!(typeof window>"u"||typeof navigator>"u")){if(!navigator.mediaDevices?.getUserMedia){P("unsupported"),D("Camera access is not supported in this browser.");return}P("starting"),D(null);try{let ee=await navigator.mediaDevices.getUserMedia({audio:!1,video:{facingMode:{ideal:i}}});if(O){ee.getTracks().forEach(F=>F.stop());return}if(g.current=ee,y.current&&(y.current.srcObject=ee,await y.current.play()),!window.BarcodeDetector){P("unsupported"),D("BarcodeDetector is not available. Camera preview is ready and manual entry is enabled.");return}v.current=new window.BarcodeDetector({formats:a}),P("ready"),x.current=window.setInterval(async()=>{if(!(!y.current||!v.current)&&!(y.current.readyState<HTMLMediaElement.HAVE_CURRENT_DATA))try{let G=(await v.current.detect(y.current)).find(Q=>Q.rawValue);if(!G?.rawValue)return;let W={rawValue:G.rawValue,format:G.format};w(W),T(),bm(W,f,o,l);}catch(F){k(F instanceof Error?F.message:"Failed to detect barcode.");}},d);}catch(ee){k(ee instanceof Error?ee.message:"Unable to start camera.");}}})(),()=>{O=true,T();}},[l,i,a,o,f,t,k,d,T]);let E=()=>{let O=S.trim();if(!O)return;let $={rawValue:O,format:"manual"};w($),bm($,f,o,l);};return c(Ot,{open:t,onClose:o,fullWidth:true,maxWidth:"sm",children:[e("div",{className:"orb-dialog-title",sx:{fontSize:"1rem",fontWeight:900},children:r}),e("div",{className:"orb-dialog-content",sx:{pt:"8px !important"},children:c(le,{spacing:2,sx:b,children:[e(L,{sx:{fontSize:"0.88rem",color:"text.secondary",lineHeight:1.55},children:n}),c(Ae,{elevation:0,sx:{position:"relative",overflow:"hidden",borderRadius:4,border:"1px solid",borderColor:"divider",minHeight:280,background:vt()==="dark"?"linear-gradient(180deg, color-mix(in oklch, var(--orb-canvas) 92%, transparent), color-mix(in oklch, var(--orb-canvas) 96%, transparent))":"linear-gradient(180deg, var(--orb-surface), color-mix(in oklch, var(--orb-border) 92%, transparent))"},children:[e("video",{ref:y,muted:true,playsInline:true,autoPlay:true,style:{width:"100%",height:280,objectFit:"cover",display:"block"}}),e("div",{sx:{pointerEvents:"none",position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:e("div",{sx:{width:"72%",maxWidth:320,aspectRatio:"1.7 / 1",borderRadius:3,border:"2px solid rgba(255,255,255,0.95)",boxShadow:"0 0 0 999px rgba(15,23,42,0.24)",position:"relative"},children:e("div",{sx:{position:"absolute",top:"50%",left:0,right:0,height:2,bgcolor:"var(--orb-ai-accent)",boxShadow:"0 0 18px color-mix(in oklch, var(--orb-ai-accent) 85%, transparent)"}})})}),c("div",{sx:{position:"absolute",top:12,left:12,display:"flex",gap:1,flexWrap:"wrap"},children:[e(xt,{icon:e(np,{}),label:C==="ready"?"Camera ready":C==="starting"?"Starting camera":C==="unsupported"?"Preview only":C==="error"?"Scanner error":"Idle",size:"small",color:C==="error"?"error":"primary",variant:"filled"}),R?e(xt,{icon:e(wp,{}),label:`${R.format||"barcode"}: ${R.rawValue}`,size:"small",color:"success",variant:"filled"}):null]})]}),A?e(tr,{severity:C==="unsupported"?"info":"warning",children:A}):null,s?c(le,{direction:{xs:"column",sm:"row"},spacing:1.25,children:[e(ze,{fullWidth:true,label:"Barcode",placeholder:h,value:S,onChange:O=>I(O.target.value)}),e(Te,{variant:"contained",onClick:E,sx:{minHeight:56,px:2.5},children:p})]}):null]})}),e("div",{className:"orb-dialog-actions",sx:{px:3,pb:2},children:e(Te,{onClick:o,children:m})})]})};M();var Ny={default:"var(--orb-status-fg)",primary:"var(--orb-status-primary)",success:"var(--orb-status-success)",warning:"var(--orb-status-warning)",error:"var(--orb-status-error)",info:"var(--orb-status-info)"},SF=({title:t,description:o,kicker:r,icon:n,badges:a=[],metrics:i=[],footer:s,children:l,selected:d=false,draggable:p=false,isDragging:m=false,swipeThreshold:h=88,startAction:f,endAction:u,dragHandleProps:b,onClick:y,onSwipe:g,sx:x})=>{let[v,C]=to.useState(0),[P,S]=to.useState(false),I=to.useRef(null),R=to.useRef(0),w=to.useRef(0),A=!!(f||u),D=132,T=()=>{C(0),S(false),I.current=null,R.current=0,w.current=0;},k=F=>{(F==="start"?f:u)?.onTrigger?.(),g?.(F),T();},E=F=>{!A||F.target.closest('button, a, input, textarea, [data-no-swipe="true"]')||(I.current=F.pointerId,R.current=F.clientX,w.current=F.clientX,S(true),F.currentTarget.setPointerCapture(F.pointerId));},O=F=>{if(!P||I.current!==F.pointerId)return;w.current=F.clientX;let G=w.current-R.current,W=Math.max(-D,Math.min(D,G));C(W);},$=F=>{if(!P||I.current!==F.pointerId)return;let G=w.current-R.current;if(G>=h&&f){k("start");return}if(G<=-h&&u){k("end");return}Math.abs(G)<12&&y?.(),T();},ee=(F,G)=>{if(!F)return null;let W=F.backgroundColor||Ny[F.tone||"default"];return e("div",{sx:{position:"absolute",top:0,bottom:0,[G]:0,width:D,px:2,display:"flex",alignItems:"center",justifyContent:G==="left"?"flex-start":"flex-end",color:"var(--orb-on-primary)",background:`linear-gradient(135deg, ${W}, rgba(15,23,42,0.92))`},children:c(le,{direction:"row",spacing:1,alignItems:"center",children:[F.icon,e(L,{sx:{fontWeight:700,fontSize:"0.95rem"},children:F.label})]})})};return c("div",{sx:{position:"relative",overflow:"hidden",borderRadius:4,...x},children:[ee(f,"left"),ee(u,"right"),e(Ae,{elevation:0,onPointerDown:E,onPointerMove:O,onPointerUp:$,onPointerCancel:T,sx:{position:"relative",zIndex:1,p:2,borderRadius:4,border:"1px solid",borderColor:d?"primary.main":"divider",background:vt()==="dark"?"linear-gradient(180deg, color-mix(in oklch, var(--orb-surface-3) 96%, transparent), color-mix(in oklch, var(--orb-canvas) 92%, transparent))":"linear-gradient(180deg, var(--orb-canvas), var(--orb-surface))",color:"text.primary",boxShadow:d?"0 18px 42px color-mix(in oklch, var(--orb-primary) 18%, transparent)":"0 12px 28px rgba(15, 23, 42, 0.08)",transform:`translate3d(${v}px, 0, 0) scale(${m?.985:1})`,transition:P?"none":"transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease",touchAction:"pan-y",cursor:y?"pointer":"default",opacity:m?.9:1},children:c(le,{spacing:1.5,children:[c(le,{direction:"row",spacing:1.5,alignItems:"flex-start",children:[n?e("div",{sx:{mt:.25},children:n}):null,c("div",{sx:{flex:1,minWidth:0},children:[r?e(L,{sx:{fontSize:"0.72rem",fontWeight:700,letterSpacing:"0.08em",color:"text.secondary"},children:r}):null,e(L,{sx:{fontSize:"1.05rem",fontWeight:800,lineHeight:1.25},children:t}),o?e(L,{sx:{mt:.5,fontSize:"0.9rem",color:"text.secondary",lineHeight:1.45},children:o}):null]}),p?e("div",{"data-no-swipe":"true",...b,sx:{alignSelf:"center",display:"inline-flex",touchAction:"none"},children:e(se,{size:"small",children:e(pp,{})})}):null]}),a.length>0?e(le,{direction:"row",spacing:1,useFlexGap:true,flexWrap:"wrap",children:a.map((F,G)=>e(xt,{label:F,size:"small",sx:{borderRadius:999,fontWeight:700,bgcolor:"action.hover",color:"text.primary"}},G))}):null,i.length>0?e("div",{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(110px, 1fr))",gap:1},children:i.map(F=>c(Ae,{elevation:0,sx:{p:1.25,borderRadius:3,bgcolor:"action.hover",border:"1px solid",borderColor:"divider",color:"text.primary"},children:[e(L,{sx:{fontSize:"0.72rem",color:"text.secondary"},children:F.label}),e(L,{sx:{fontSize:"1rem",fontWeight:800,lineHeight:1.2},children:F.value})]},F.id))}):null,l,s]})})]})};M();var va=({label:t,onPress:o,emphasis:r="default"})=>e("div",{component:"button",type:"button",onClick:o,sx:n=>({minHeight:72,borderRadius:3,border:"1px solid",borderColor:r==="primary"?"primary.main":"divider",background:r==="primary"?n.palette.primary.main:r==="danger"?vt()==="dark"?"color-mix(in oklch, var(--orb-status-error) 18%, transparent)":"color-mix(in oklch, var(--orb-status-error) 10%, transparent)":vt()==="dark"?"rgba(255,255,255,0.04)":"var(--orb-canvas)",color:r==="primary"?"var(--orb-on-primary)":"text.primary",fontSize:"1.25rem",fontWeight:800,transition:"transform 120ms ease, box-shadow 160ms ease, background-color 160ms ease",cursor:"pointer",appearance:"none",WebkitAppearance:"none",WebkitTapHighlightColor:"transparent","&:active":{transform:"scale(0.98)"}}),children:t}),DF=({value:t,defaultValue:o="",title:r,subtitle:n,placeholder:a="0",allowDecimal:i=false,allowNegative:s=false,maxLength:l,confirmLabel:d,clearLabel:p,backspaceLabel:m,onChange:h,onSubmit:f,onClose:u,sx:b})=>{let{t:y}=de(),[g,x]=to.useState(o),v=t??g,C=T=>{t===void 0&&x(T),h?.(T);},P=T=>{l&&v.length>=l||C(`${v}${T}`);},S=T=>{if(T==="00"){if(!v){C("0");return}P("00");return}P(T);},I=()=>{!i||v.includes(".")||C(v?`${v}.`:"0.");},R=()=>{if(s){if(v.startsWith("-")){C(v.slice(1));return}C(v?`-${v}`:"-");}},w=()=>{C(v.slice(0,-1));},A=()=>{C("");},D=()=>{f?.(v);};return e(Ae,{elevation:0,sx:{p:2,borderRadius:4,border:"1px solid",borderColor:"divider",bgcolor:"background.paper",...b},children:c(le,{spacing:2,children:[c(le,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",children:[c("div",{sx:{minWidth:0},children:[r?e(L,{sx:{fontSize:"1rem",fontWeight:800},children:r}):null,n?e(L,{sx:{mt:.5,fontSize:"0.86rem",color:"text.secondary"},children:n}):null]}),u?e(se,{onClick:u,size:"small",children:e(cp,{})}):null]}),e(Ae,{elevation:0,sx:{p:2,borderRadius:3,border:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:e(L,{sx:{minHeight:38,fontSize:v?"1.9rem":"1.25rem",fontWeight:900,letterSpacing:"0.06em",color:v?"text.primary":"text.disabled"},children:v||a})}),c("div",{sx:{display:"grid",gridTemplateColumns:"repeat(3, minmax(0, 1fr))",gap:1.25},children:[["1","2","3","4","5","6","7","8","9"].map(T=>e(va,{label:T,onPress:()=>S(T)},T)),e(va,{label:s?"+/-":"00",onPress:s?R:()=>S("00")}),e(va,{label:"0",onPress:()=>S("0")}),e(va,{label:i?".":m?String(m):"DEL",onPress:i?I:w})]}),c("div",{sx:{display:"grid",gridTemplateColumns:"repeat(3, minmax(0, 1fr))",gap:1.25},children:[e("div",{component:"button",type:"button",onClick:w,sx:{minHeight:64,borderRadius:3,border:"1px solid",borderColor:"divider",bgcolor:"background.paper",cursor:"pointer",appearance:"none",WebkitAppearance:"none",WebkitTapHighlightColor:"transparent"},children:c(le,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:[e(rp,{}),e(L,{sx:{fontWeight:700},children:m||"DEL"})]})}),e(va,{label:String(p||"CLR"),onPress:A,emphasis:"danger"}),e("div",{component:"button",type:"button",onClick:D,sx:T=>({minHeight:64,borderRadius:3,border:"1px solid",borderColor:"primary.main",background:T.palette.primary.main,color:"var(--orb-on-primary)",cursor:"pointer",appearance:"none",WebkitAppearance:"none",WebkitTapHighlightColor:"transparent"}),children:c(le,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:[e(ip,{}),e(L,{sx:{fontWeight:800},children:d||y("common.ok")})]})})]})]})})};M();var ym=({touchMode:t="comfortable",sx:o,...r})=>{let n=t==="expanded";return e("div",{sx:{"& .orb-card":{borderRadius:4},"& .orb-autocomplete":{minWidth:{xs:"100%",md:260}},"& .orb-autocomplete .orb-inp-adornment-wrap, & .orb-inp":{backgroundColor:"transparent !important"},"& .orb-inp-adornment-wrap, & .orb-inp":{minHeight:n?56:50,borderRadius:3,fontSize:n?"0.98rem":"0.92rem"},"& .orb-inp":{py:n?1.6:1.25,fontSize:n?"0.98rem":"0.92rem"},"& label":{fontSize:n?"0.95rem":"0.88rem"},"& .orb-btn":{minHeight:n?48:44,px:n?2.25:1.75,borderRadius:3,fontSize:n?"0.95rem":"0.88rem",fontWeight:700},"& .orb-icon-btn":{width:n?40:36,height:n?40:36},"& .orb-menu-item, & option":{minHeight:n?44:38,fontSize:n?"0.95rem":"0.88rem"},"& .orb-list-subheader":{py:1},"& .orb-chk":{p:n?1:.75},"& .orb-form-control-label > span":{fontSize:n?"0.95rem":"0.88rem"},"& .orb-dialog":{borderRadius:4},"& .orb-dialog-title":{fontSize:n?"1.05rem":"0.98rem",fontWeight:800},"& .orb-dialog-content .orb-inp-adornment-wrap, & .orb-inp":{minHeight:52},"& .orb-grid > *":{minWidth:0},...o},children:e(Uo,{...r})})};M();var Oy=(t,o,r)=>{if(r?.(o),!!o.href){if(o.href.startsWith("http://")||o.href.startsWith("https://")){window.open(o.href,"_blank");return}t.push(o.href);}},Cm=({items:t,selectedId:o,orientation:r="auto",onItemSelect:n,sx:a})=>{let i=lo(),[s,l]=to.useState(false);to.useEffect(()=>{l(true);},[]);let d=wr("(orientation: portrait)"),p=wr(i.breakpoints.down("md")),m=r==="auto"?d||p?"portrait":"landscape":r,h=navigation.useRouter();return e("div",{sx:{display:"grid",gridTemplateColumns:!s||m==="portrait"?"repeat(2, minmax(0, 1fr))":"repeat(auto-fit, minmax(180px, 1fr))",gap:1.5,...a},children:t.map(f=>{let u=f.id===o,b=f.color||(u?i.palette.primary.main:i.palette.divider);return e(Ae,{elevation:0,sx:{overflow:"hidden",borderRadius:4,border:"1px solid",borderColor:u?"primary.main":"divider",boxShadow:u?"0 18px 40px color-mix(in oklch, var(--orb-primary) 16%, transparent)":"none",bgcolor:vt()==="dark"?"color-mix(in oklch, var(--orb-surface-3) 60%, transparent)":"background.paper"},children:e("div",{component:"button",type:"button",disabled:f.disabled,onClick:()=>Oy(h,f,n),sx:{width:"100%",p:2,minHeight:m==="portrait"?156:148,display:"block",border:0,background:"transparent",textAlign:"left",cursor:f.disabled?"not-allowed":"pointer",appearance:"none",WebkitAppearance:"none",WebkitTapHighlightColor:"transparent",color:"text.primary"},children:c(le,{spacing:1.5,sx:{height:"100%"},children:[c(le,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",children:[e("div",{sx:{width:44,height:44,borderRadius:3,display:"grid",placeItems:"center",color:u?"var(--orb-on-primary)":"text.primary",background:u?b:"action.hover"},children:f.icon||e(L,{sx:{fontSize:"1rem",fontWeight:900},children:f.title.slice(0,1).toUpperCase()})}),f.badge!==void 0?e("div",{sx:{minWidth:34,px:1,py:.4,borderRadius:999,bgcolor:u?"primary.main":"action.hover",color:u?"var(--orb-on-primary)":"text.secondary",textAlign:"center",fontWeight:800,fontSize:"0.8rem"},children:f.badge}):null]}),c("div",{sx:{flex:1,minWidth:0},children:[e(L,{sx:{fontSize:"1rem",fontWeight:800,lineHeight:1.25},children:f.title}),f.caption?e(L,{sx:{mt:.5,fontSize:"0.74rem",fontWeight:700,color:"text.secondary"},children:f.caption}):null,f.description?e(L,{sx:{mt:.75,fontSize:"0.84rem",lineHeight:1.45,color:"text.secondary"},children:f.description}):null]})]})})},f.id)})})};M();var Sm=(t,o)=>o.trim()?t.reduce((r,n)=>{let a=n.title?.toLowerCase().includes(o.toLowerCase())||n.label?.toLowerCase().includes(o.toLowerCase())||n.description?.toLowerCase().includes(o.toLowerCase()),i=n.children?Sm(n.children,o):[];return (a||i.length>0)&&r.push({...n,children:i.length>0?i:n.children}),r},[]):t,zy=t=>{let o=new Set,r=n=>{n.forEach(a=>{a.children?.length&&(o.add(a.id),r(a.children));});};return r(t),o},km=({collapsed:t=false,onToggle:o,className:r="",maxHeight:n,menuData:a=[],colorMode:i="light",orientation:s="auto",headerSlot:l,footerSlot:d,activeHref:p,onItemSelect:m})=>{let{t:h}=de(),f=lo(),u=Eo("(orientation: portrait)"),b=Eo(f.breakpoints.down("md")),y=s==="auto"?u||b?"portrait":"landscape":s,g=i==="dark",x=navigation.useRouter(),v=navigation.usePathname(),[C,P]=to.useState(""),[S,I]=to.useState(new Set),R=to.useMemo(()=>Sm(a,C),[a,C]),w=to.useMemo(()=>C.trim()?zy(R):S,[S,R,C]);to.useEffect(()=>{t&&I(new Set);},[t]);let A=O=>O.appurl||O.href||"",D=O=>{m?.(O);let $=A(O);if($){if($.startsWith("http://")||$.startsWith("https://")){window.open($,"_blank");return}x.push($);}},T=O=>{let $=!!O.children?.length;if(t&&$){o?.();return}if($){I(ee=>{let F=new Set(ee);return F.has(O.id)?F.delete(O.id):F.add(O.id),F});return}D(O);},k=O=>{let $=p||v,ee=A(O);return !!(ee&&$===ee)},E=(O,$=0)=>{let ee=!!O.children?.length,F=w.has(O.id),G=k(O);return e("div",{sx:{pl:$===0?0:1.5},children:c(Ae,{elevation:0,sx:{mb:1,overflow:"hidden",borderRadius:3,border:"1px solid",borderColor:G?"primary.main":"divider",bgcolor:G?"action.selected":"background.paper"},children:[c("div",{component:"button",type:"button",onClick:()=>T(O),sx:{width:"100%",px:1.5,py:1.4,display:"flex",alignItems:"center",gap:1.25,border:0,background:"transparent",textAlign:"left",cursor:"pointer",appearance:"none",WebkitAppearance:"none",WebkitTapHighlightColor:"transparent"},children:[e(li,{variant:"rounded",sx:{width:40,height:40,bgcolor:G?"primary.main":"action.hover",color:G?"var(--orb-on-primary)":"text.primary"},children:O.icon||(O.title||O.label||"?").slice(0,1).toUpperCase()}),c("div",{sx:{flex:1,minWidth:0},children:[e(L,{sx:{fontSize:"0.95rem",fontWeight:800,lineHeight:1.2},children:O.title||O.label}),O.description?e(L,{sx:{mt:.4,fontSize:"0.78rem",color:"text.secondary",lineHeight:1.35},children:O.description}):null]}),ee?e(sn,{sx:{transform:F?"rotate(180deg)":"rotate(0deg)",transition:"transform 180ms ease"}}):e(ui,{color:"action"})]}),ee?e(an,{in:F,children:e("div",{sx:{px:1.25,pb:1.25},children:O.children?.map(W=>E(W,$+1))})}):null]})},O.id)};return t?e(Ae,{elevation:0,className:r,sx:{width:y==="portrait"?"100%":88,p:1,borderRadius:4,border:"1px solid",borderColor:"divider",bgcolor:g?"var(--orb-surface)":"color-mix(in oklch, var(--orb-canvas) 88%, transparent)",maxHeight:n?`${n}px`:void 0,overflowY:"auto"},children:c(le,{spacing:1,children:[e(se,{onClick:o,sx:{width:48,height:48,alignSelf:"center",bgcolor:"action.hover"},title:h("navigation.expand"),children:e(vi,{})}),a.map(O=>e(se,{onClick:()=>T(O),sx:{width:56,height:56,alignSelf:"center",borderRadius:3,bgcolor:k(O)?"primary.main":"action.hover",color:k(O)?"var(--orb-on-primary)":"text.primary"},children:O.icon||(O.title||O.label||"?").slice(0,1).toUpperCase()},O.id))]})}):e(Ae,{elevation:0,className:r,sx:{width:y==="portrait"?"100%":320,p:1.25,borderRadius:5,border:"1px solid",borderColor:"divider",bgcolor:g?"var(--orb-surface)":"color-mix(in oklch, var(--orb-canvas) 88%, transparent)",maxHeight:n?`${n}px`:void 0,overflow:"hidden",display:"flex",flexDirection:"column"},children:c(le,{spacing:1.25,sx:{flex:1,minHeight:0},children:[c(le,{direction:"row",spacing:1,alignItems:"center",children:[e(ze,{value:C,onChange:O=>P(O.target.value),placeholder:h("navigation.searchPlaceholder"),size:"small",fullWidth:true,InputProps:{startAdornment:e(Sp,{fontSize:"small",color:"action"})}}),y==="landscape"&&!t?e(se,{onClick:o,sx:{bgcolor:"action.hover"},children:e(vp,{})}):null]}),l,e("div",{sx:{flex:1,minHeight:0,overflowY:"auto",pr:.25},children:R.length>0?R.map(O=>E(O)):e(L,{sx:{p:2,fontSize:"0.88rem",color:"text.secondary",textAlign:"center"},children:h("navigation.noMatch")})}),d]})})};M();var Pm=(t,o)=>{let r=o[t.id];if(t.render)return t.render(r,o);if(r==null||r==="")return "--";if(t.numeric){if(typeof r=="number")return r.toLocaleString();if(typeof r=="string"&&r.trim()!==""&&!Number.isNaN(Number(r)))return Number(r).toLocaleString()}return String(r)},Vy=t=>to__namespace.default.isValidElement(t)?e("div",{sx:{display:"inline-flex",alignItems:"center"},children:t}):e(L,{sx:{mt:.2,fontSize:"0.88rem",fontWeight:800},children:t}),Wy=(t,o)=>{let r=o[t.id];if(r==null||r==="")return "--";if(t.numeric){if(typeof r=="number")return r.toLocaleString();if(typeof r=="string"&&r.trim()!==""&&!Number.isNaN(Number(r)))return Number(r).toLocaleString()}return String(r)},$y=({summaryRow:t,visibleColumns:o,columns:r})=>{let n=r.filter(a=>o.includes(a.id)&&t[a.id]!=="");return n.length===0?null:e(Ae,{elevation:0,sx:{p:1.5,borderRadius:4,border:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:c(le,{spacing:1,children:[e(L,{sx:{fontSize:"0.82rem",fontWeight:800,color:"text.secondary"},children:"Summary"}),e("div",{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(132px, 1fr))",gap:1},children:n.map(a=>c(Ae,{elevation:0,sx:{p:1.1,borderRadius:3,border:"1px solid",borderColor:"divider"},children:[e(L,{sx:{fontSize:"0.72rem",color:"text.secondary"},children:a.label}),e(L,{sx:{mt:.25,fontSize:"0.96rem",fontWeight:800},children:t[a.id]})]},`summary-${a.id}`))})]})})},_y=t=>{let{t:o}=de(),r=lo(),{title:n,showToolbar:a=true,selectionMode:i,selected:s=[],onSelectionChange:l,actions:d,extraTools:p,fitContainer:m=false,fullWidth:h=false,maxHeight:f,loading:u=false,rowsPerPageOptions:b=[20,50,100,-1],onLayoutSave:y,filterConfig:g,rowKey:x,tableKey:v="default",graphReport:C,quickCreate:P,quickEdit:S,quickDelete:I,serviceUrl:R,orientation:w="auto",cardTitleField:A,cardSubtitleFields:D,toolbarSlot:T,emptyState:k,rowHeight:E="comfortable",cardActionSlot:O,renderCardFooter:$,onRowClick:ee}=t,F=n||o("table.title.default"),G=Eo("(orientation: portrait)"),W=Eo(r.breakpoints.down("md")),Q=w==="auto"?G||W?"portrait":"landscape":w,{columns:z,filterText:H,setFilterText:X,visibleColumns:Y,showSummary:j,setShowSummary:te,summaryColumns:ce,grouping:fe,setGrouping:Ve,expandedGroups:ve,groupAnchorEl:xe,setGroupAnchorEl:He,summaryAnchorEl:pe,setSummaryAnchorEl:ye,anchorEl:$e,setAnchorEl:tt,contextMenu:at,sortedAndFilteredRows:st,summaryRow:K,visibleRows:Ne,page:Se,setPage:Fe,rowsPerPage:it,setRowsPerPage:Ye,totalDisplayCount:wt,setSelected:Mt,handleClick:Ft,toggleSummaryColumn:Et,handleExport:ne,handleCloseContextMenu:Ke,toggleColumnVisibility:Oe,toggleGroupExpand:ue,handleExpandGroupRecursively:we,handleCollapseGroupRecursively:re,handleLayoutLoad:Ce,handleVariantLoad:De,handleLayoutSave:Je,effectiveAppId:lt,currentLayoutData:ut,currentLayoutId:Ht,layoutIdToLoad:Yt,graphReportOpen:Wt,handleOpenGraphReport:St,handleCloseGraphReport:$t}=vn(t),bt=C?.enabled??false,At=bt&&(C?.interaction?.enabled??true),ct=Bi(),Bt=x||"id",jt=to__namespace.default.useMemo(()=>({borderRadius:999,fontWeight:700,borderColor:ot(r.palette.divider,vt()==="dark"?.55:.3),bgcolor:vt()==="dark"?ot(r.palette.common.white,.06):ot(r.palette.background.paper,.92),color:r.palette.text.primary,"& .orb-chip-label":{px:1.05}}),[r]),q=to__namespace.default.useMemo(()=>({...jt,borderColor:ot(r.palette.primary.main,vt()==="dark"?.42:.24),bgcolor:vt()==="dark"?ot(r.palette.primary.main,.16):ot(r.palette.primary.main,.08)}),[jt,r]),V=to__namespace.default.useMemo(()=>{let oe=new Set(s);return st.filter(Le=>oe.has(Le?.[Bt]))},[Bt,s,st]),Z=V.length===1?V[0]:null,be=!!P?.enabled,ke=!!S?.enabled,Ee=!!I?.enabled,_e=P?.fields,qe=P?.excludeFields||[],je=P?.initialValues||{},mt=S?.fields,ht=S?.excludeFields||[],Rt=S?.editableFields||[],yt=S?.nonEditableFields||[],B=S?.primaryKeys?.length?S.primaryKeys:[Bt],[J,he]=to__namespace.default.useState(false),[Ie,et]=to__namespace.default.useState(false),[Xe,kt]=to__namespace.default.useState({}),[ft,gt]=to__namespace.default.useState(false),[Ct,ao]=to__namespace.default.useState(false),[Lt,Qt]=to__namespace.default.useState({}),[zt,qt]=to__namespace.default.useState(false),[_t,ro]=to__namespace.default.useState(false),io=u||Ie||Ct||_t,yo=to__namespace.default.useMemo(()=>{let oe=[...z];if(Array.isArray(_e)&&_e.length>0){let Le=new Set(_e);oe=oe.filter(Qe=>Le.has(Qe.id));}if(qe.length>0){let Le=new Set(qe);oe=oe.filter(Qe=>!Le.has(Qe.id));}return oe.filter(Le=>!!Le?.id)},[z,qe,_e]),No=to__namespace.default.useMemo(()=>{let oe=[...z];if(Array.isArray(mt)&&mt.length>0){let Le=new Set(mt);oe=oe.filter(Qe=>Le.has(Qe.id));}if(ht.length>0){let Le=new Set(ht);oe=oe.filter(Qe=>!Le.has(Qe.id));}return oe.filter(Le=>!!Le?.id)},[z,ht,mt]),Do=to__namespace.default.useMemo(()=>new Set(B),[B]),sr=to__namespace.default.useMemo(()=>new Set(Rt),[Rt]),So=to__namespace.default.useMemo(()=>new Set(yt),[yt]),zo=to__namespace.default.useCallback(oe=>sr.size>0?sr.has(oe):!(So.has(oe)||Do.has(oe)),[sr,So,Do]);to__namespace.default.useEffect(()=>{!Wt&&ct.hasActiveFilters&&ct.clearAll();},[ct,Wt]);let Xr=()=>{let oe={};yo.forEach(Le=>{oe[Le.id]=je[Le.id]??"";}),kt(oe),he(true);},Zr=(oe,Le)=>{kt(Qe=>({...Qe,[oe]:Le}));},Or=async()=>{if(!P?.onSubmit){he(false);return}try{et(!0),await P.onSubmit(Xe),he(!1);}finally{et(false);}},Yr=()=>{if(!Z)return;let oe={};No.forEach(Qe=>{oe[Qe.id]=Z[Qe.id]??"";});let Le=S?.getInitialValues?{...oe,...S.getInitialValues(Z)}:oe;Qt(Le),gt(true);},jr=(oe,Le)=>{Qt(Qe=>({...Qe,[oe]:Le}));},Ao=async()=>{if(Z){if(!S?.onSubmit){gt(false);return}try{ao(!0),await S.onSubmit(Lt,Z),gt(!1);}finally{ao(false);}}},Fr=()=>{V.length!==0&&qt(true);},Qr=async()=>{if(V.length===0){qt(false);return}if(!I?.onConfirm){qt(false),Mt([]),l?.([]);return}try{ro(!0),await I.onConfirm(V),qt(!1),Mt([]),l?.([]);}finally{ro(false);}},jo=st,{fieldMapping:lr}=gn({rows:jo,config:{...C,title:C?.title||`${F} ${o("graph.reportTitle")}`}}),Bn=to__namespace.default.useMemo(()=>At?ct.applyRows(jo,lr):jo,[lr,ct,At,jo]),{model:Br}=gn({rows:Bn,config:{...C,title:C?.title||`${F} ${o("graph.reportTitle")}`,fieldMapping:lr}}),N=Br.table.columns.map(oe=>({id:oe.id,label:oe.label,align:oe.align||"left",minWidth:120,numeric:oe.align==="right"})),_=lt?e(bn,{appId:lt,tableKey:v,currentLayoutData:ut,onLayoutLoad:Ce,targetLayoutId:Yt,activeLayoutId:Ht,serviceUrl:R??g?.serviceUrl}):null,U=z.filter(oe=>Y.includes(oe.id)),me=U.find(oe=>oe.id===A)||U[0],Be=D?.map(oe=>U.find(Le=>Le.id===oe)).filter(Boolean)||U.filter(oe=>oe.id!==me?.id).slice(0,Q==="portrait"?2:3),nt=U.filter(oe=>oe.id!==me?.id&&!Be.some(Le=>Le.id===oe.id)),Ge=[T,p].filter(Boolean),ae=c(jsxRuntime.Fragment,{children:[e(un,{groupAnchorEl:xe,setGroupAnchorEl:He,grouping:fe,setGrouping:Ve,columns:z}),e(mn,{anchorEl:$e,setAnchorEl:tt,columns:z,visibleColumns:Y,toggleColumnVisibility:Oe}),e(Ri,{anchorEl:pe,setAnchorEl:ye,showSummary:j,setShowSummary:te,columns:z,summaryColumns:ce,toggleSummaryColumn:Et}),e(Ni,{contextMenu:at,handleCloseContextMenu:Ke,columns:z,visibleColumns:Y,toggleColumnVisibility:Oe})]}),ge=(oe,Le,Qe)=>{let Re=s.includes(Le),Ze=Q==="portrait"?"repeat(2, minmax(0, 1fr))":"repeat(auto-fit, minmax(140px, 1fr))",Pt=Qe%2===0?ot(r.palette.primary.main,vt()==="dark"?.09:.04):ot(r.palette.primary.main,vt()==="dark"?.05:.022),Jr=ot(r.palette.divider,.22);return e(Ae,{elevation:0,onClick:()=>{Ft({},oe),ee?.(oe);},sx:{p:E==="compact"?1.25:1.5,borderRadius:4,border:"0.5px solid",borderColor:Re?ot(r.palette.primary.main,.38):Jr,background:Re?`linear-gradient(135deg, ${ot(r.palette.primary.main,.13)}, ${ot(r.palette.primary.main,.06)})`:`linear-gradient(135deg, ${Pt}, ${ot(r.palette.primary.main,.015)})`,boxShadow:Re?`0 12px 30px ${ot(r.palette.primary.main,.2)}`:`0 3px 10px ${ot(r.palette.common.black,.045)}`,cursor:"pointer",position:"relative",overflow:"hidden",transition:"border-color 160ms ease, box-shadow 160ms ease, transform 120ms ease, background 160ms ease","&::before":{content:'""',position:"absolute",left:0,top:0,bottom:0,width:4,background:Re?r.palette.primary.main:Qe%2===0?ot(r.palette.primary.main,.26):ot(r.palette.text.primary,.16)},"&:hover":{boxShadow:`0 10px 20px ${ot(r.palette.primary.main,.12)}`,transform:"translateY(-1px)"},"&:active":{transform:"scale(0.995)"}},children:c(le,{spacing:1.25,children:[c(le,{direction:"row",spacing:1.25,alignItems:"flex-start",children:[i?e(It,{checked:Re,onClick:Po=>Po.stopPropagation(),onChange:()=>Ft({},oe),sx:{mt:-0.6,ml:-0.6}}):null,c("div",{sx:{flex:1,minWidth:0},children:[me?e(L,{sx:{fontSize:"1rem",fontWeight:900,lineHeight:1.25},children:Pm(me,oe)}):null,Be.length>0?e(le,{direction:"row",spacing:.75,useFlexGap:true,flexWrap:"wrap",sx:{mt:.75},children:Be.map(Po=>e(xt,{label:`${Po.label}: ${Wy(Po,oe)}`,size:"small",variant:"outlined",sx:jt},`${Le}-${Po.id}`))}):null]}),O?e("div",{onClick:Po=>Po.stopPropagation(),children:O(oe)}):null]}),nt.length>0?e("div",{sx:{display:"grid",gridTemplateColumns:Ze,gap:1},children:nt.map(Po=>c(Ae,{elevation:0,sx:{p:1,borderRadius:3,bgcolor:vt()==="dark"?ot(r.palette.background.default,.7):ot(r.palette.background.paper,.92),border:"0.1px solid",borderColor:ot(r.palette.divider,.24)},children:[e(L,{sx:{fontSize:"0.72rem",color:"text.secondary"},children:Po.label}),Vy(Pm(Po,oe))]},`${Le}-${Po.id}-detail`))}):null,$?c(jsxRuntime.Fragment,{children:[e(Nt,{}),e("div",{onClick:Po=>Po.stopPropagation(),children:$(oe)})]}):null]})},Le)};return c("div",{sx:{width:h?"100%":"auto",mb:m?0:2,...m?{flex:1,display:"flex",flexDirection:"column",minHeight:0,height:"100%",overflow:"hidden"}:{}},children:[g?e("div",{sx:{mb:2},children:e(ym,{...g,onVariantLoad:oe=>{De(oe),g.onVariantLoad?.(oe);},appId:g.appId,tableKey:v,currentLayout:[{tableKey:v,layoutData:ut}],currentLayoutId:Ht,layoutRefs:[{tableKey:v,layoutId:Ht}],variantService:g.variantService,serviceUrl:R??g.serviceUrl,touchMode:Q==="portrait"?"expanded":"comfortable"})}):null,c(Ae,{sx:{width:h?"100%":"auto",mb:m?0:2,display:"flex",flexDirection:"column",overflow:"hidden",position:"relative",bgcolor:"transparent",backgroundImage:"none",boxShadow:"none","&::before":io?{content:'""',position:"absolute",top:0,left:0,width:"100%",height:"3px",background:"linear-gradient(90deg, color-mix(in oklch, var(--orb-primary) 0%, transparent) 0%, color-mix(in oklch, var(--orb-primary) 25%, transparent) 25%, var(--orb-primary) 50%, color-mix(in oklch, var(--orb-primary) 25%, transparent) 75%, color-mix(in oklch, var(--orb-primary) 0%, transparent) 100%)",backgroundSize:"220% 100%",animation:"cTableTopMarquee 1.2s linear infinite",zIndex:6,pointerEvents:"none"}:{},"@keyframes cTableTopMarquee":{"0%":{backgroundPosition:"220% 0"},"100%":{backgroundPosition:"-120% 0"}},...f?{height:f}:m?{flex:1,minHeight:0,height:"100%"}:{}},children:[a?e("div",{sx:{"& .orb-toolbar":{minHeight:60,alignItems:{xs:"flex-start",md:"center"},flexWrap:"wrap",rowGap:1,columnGap:1},"& .orb-toolbar > :nth-of-type(1)":{width:{xs:"100%",md:"auto"},"& .orb-fld":{width:{xs:"100%",md:300}}},"& .orb-toolbar > :nth-of-type(2)":{flexShrink:0},"& .orb-toolbar > :nth-of-type(3)":{display:{xs:"none",md:"block"}},"& .orb-toolbar > :nth-of-type(4)":{ml:"auto",justifyContent:"flex-end",flexWrap:"wrap"},"& .orb-inp-adornment-wrap, & .orb-inp":{minHeight:46},"& .orb-icon-btn":{width:40,height:40},"& .orb-body, & .orb-body-dense, & .orb-label, & .orb-meta":{fontSize:"0.9rem"},"& button":{borderRadius:2.5}},children:e(Pi,{filterText:H,setFilterText:X,onRowsPerPageChange:Ye,rowsPerPage:it,rowsPerPageOptions:b,page:Se,count:wt,onPageChange:Fe,actions:d,extraTools:Ge,grouping:fe,setGroupAnchorEl:He,showSummary:j,setShowSummary:te,setAnchorEl:tt,setSummaryAnchorEl:ye,handleExport:ne,showCreateButton:be,onOpenCreateDialog:Xr,showEditButton:ke,onOpenEditDialog:Yr,editDisabled:V.length!==1,showDeleteButton:Ee,onOpenDeleteConfirm:Fr,deleteDisabled:V.length===0,onLayoutSave:y||g?.variantService&&g?.appId?Je:void 0,loading:u,layoutManager:_,onOpenGraphReport:bt?St:void 0})}):null,e("div",{sx:{flex:1,minHeight:0,overflow:"auto",p:1.5},children:c(le,{spacing:1.25,children:[Ne.length===0&&!u?k||e(Ae,{elevation:0,sx:{p:4,borderRadius:4,border:"1px dashed",borderColor:"divider",textAlign:"center"},children:e(L,{sx:{fontSize:"0.92rem",color:"text.secondary"},children:o("common.noData")})}):null,Ne.map((oe,Le)=>{if(oe.type==="group"){let Ze=ve.has(oe.id);return e(Ae,{elevation:0,sx:{borderRadius:4,border:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:c("div",{component:"button",type:"button",onClick:()=>ue(oe.id),sx:{width:"100%",px:1.5,py:1.3,border:0,background:"transparent",display:"flex",alignItems:"center",gap:1,textAlign:"left",cursor:"pointer",appearance:"none",WebkitAppearance:"none",color:"text.primary"},children:[Ze?e(sn,{}):e(ui,{}),c("div",{sx:{flex:1,minWidth:0},children:[c(L,{sx:{fontSize:"0.94rem",fontWeight:800},children:[oe.field,": ",oe.value]}),c(L,{sx:{mt:.2,fontSize:"0.76rem",color:"text.secondary"},children:[oe.count," records"]})]}),fe.length>1&&oe.level<fe.length-1?c(le,{direction:"row",spacing:.5,children:[e(xt,{size:"small",label:o("table.group.expandAll"),onClick:Pt=>{Pt.stopPropagation(),we(oe.id);},sx:q}),e(xt,{size:"small",label:o("table.group.collapseAll"),onClick:Pt=>{Pt.stopPropagation(),re(oe.id);},sx:q})]}):null]})},oe.id)}let Qe=oe.data||oe,Re=oe.id||Qe[Bt]||Le;return ge(Qe,Re,Le)}),j?e($y,{summaryRow:K,visibleColumns:Y,columns:z}):null,u?e(L,{sx:{py:1,fontSize:"0.84rem",color:"text.secondary",textAlign:"center"},children:o("common.loading")}):null]})})]}),be?c(Ot,{open:J,onClose:()=>!Ie&&he(false),fullWidth:true,maxWidth:"sm",children:[e("div",{className:"orb-dialog-title",sx:{fontSize:"1rem",fontWeight:800},children:P?.title||o("quickCreate.createWithTitle",{title:F})}),e("div",{className:"orb-dialog-content",sx:{pt:"8px !important"},children:c("div",{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[yo.map(oe=>{let Le=oe.type==="number"||oe.numeric?"number":oe.type==="date"?"date":"text";return e(ze,{label:oe.label||oe.id,value:Xe[oe.id]??"",onChange:Qe=>Zr(oe.id,Qe.target.value),type:Le,fullWidth:true,InputLabelProps:{shrink:Le==="date"?true:void 0}},`quick-create-${oe.id}`)}),P?.description?e(tr,{severity:"info",children:P.description}):null]})}),c("div",{className:"orb-dialog-actions",sx:{px:3,pb:2},children:[e(Te,{onClick:()=>he(false),disabled:Ie,children:P?.cancelLabel||o("common.cancel")}),e(Te,{onClick:Or,variant:"contained",disabled:Ie,children:P?.submitLabel||o("common.save")})]})]}):null,ke?c(Ot,{open:ft,onClose:()=>!Ct&>(false),fullWidth:true,maxWidth:"sm",children:[e("div",{className:"orb-dialog-title",sx:{fontSize:"1rem",fontWeight:800},children:S?.title||o("quickEdit.editWithTitle",{title:F})}),e("div",{className:"orb-dialog-content",sx:{pt:"8px !important"},children:c("div",{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[No.map(oe=>{let Le=oe.type==="number"||oe.numeric?"number":oe.type==="date"?"date":"text";return e(ze,{label:oe.label||oe.id,value:Lt[oe.id]??"",onChange:Qe=>jr(oe.id,Qe.target.value),type:Le,disabled:!zo(oe.id),fullWidth:true,InputLabelProps:{shrink:Le==="date"?true:void 0}},`quick-edit-${oe.id}`)}),S?.description?e(tr,{severity:"info",children:S.description}):null]})}),c("div",{className:"orb-dialog-actions",sx:{px:3,pb:2},children:[e(Te,{onClick:()=>gt(false),disabled:Ct,children:S?.cancelLabel||o("common.cancel")}),e(Te,{onClick:Ao,variant:"contained",disabled:Ct||!Z,children:S?.submitLabel||o("common.save")})]})]}):null,Ee?e(ta,{open:zt,type:"warning",title:I?.title||o("quickDelete.confirmTitle"),message:I?.message||(V.length>1?o("quickDelete.confirmMessageMultiple",{count:V.length}):o("quickDelete.confirmMessageSingle")),confirmText:I?.confirmText||o("common.delete"),cancelText:I?.cancelText||o("common.cancel"),onClose:()=>!_t&&qt(false),onConfirm:Qr}):null,ae,bt?e(Oi,{open:Wt,onClose:$t,model:Br,aiAssistant:C?.aiAssistant,interaction:At?{enabled:true,filters:ct.filters,fieldMapping:lr,onPrimaryDimensionClick:oe=>ct.setFilter("primaryDimension",oe),onSecondaryDimensionClick:oe=>ct.setFilter("secondaryDimension",oe),onStatusClick:oe=>ct.setFilter("status",oe),onClearFilter:ct.clearFilter,onClearAll:ct.clearAll}:void 0,tableContent:e(_y,{appId:lt||"graph-report-internal",title:o("graph.dataBody"),columns:N,rows:Br.table.rows,rowKey:"id",fullWidth:true,maxHeight:"420px",rowsPerPage:20,rowsPerPageOptions:[20,50,100],graphReport:{enabled:false},showSummary:false})}):null]})};M();var P2=({appTitle:t,children:o,menuData:r=[],workloadItems:n=[],workloadSelectedId:a,showNavigation:i=true,showWorkloadNav:s=true,orientation:l="auto",logo:d,headerSlot:p,actionSlot:m,portraitBottomSlot:h,contentSx:f,containerSx:u,user:b,onSearch:y,onSearchAdd:g,defaultNavigationOpen:x,navOpen:v,onNavOpenChange:C,onWorkloadSelect:P,locale:S="en",localeLabel:I,localeOptions:R,onLocaleChange:w,onUserSetting:A,onUserLogout:D,userMenuItems:T,leftHeaderSlot:k,rightHeaderSlot:E})=>{let O="orbcafe:page-layout-mode",[$,ee]=to.useState("system"),[F,G]=to.useState("light"),[W,Q]=to.useState(false),[z,H]=to.useState(false),X=$==="system"?z?F:"light":$;to.useEffect(()=>{Q(true);},[]),to.useEffect(()=>{try{let at=window.localStorage.getItem(O);(at==="light"||at==="dark"||at==="system")&&ee(at);}catch{}H(true);let $e=window.matchMedia("(prefers-color-scheme: dark)"),tt=()=>{G($e.matches?"dark":"light");};return tt(),$e.addEventListener("change",tt),()=>$e.removeEventListener("change",tt)},[]),to.useEffect(()=>{if(z)try{window.localStorage.setItem(O,$);}catch{}},[z,$]),to.useEffect(()=>{X==="dark"?(document.documentElement.classList.add("dark"),document.documentElement.classList.add("orb-dark"),document.documentElement.dataset.orbMode="dark",document.documentElement.style.colorScheme="dark"):(document.documentElement.classList.remove("dark"),document.documentElement.classList.remove("orb-dark"),document.documentElement.dataset.orbMode="light",document.documentElement.style.colorScheme="light");},[X]);let Y=Eo("(orientation: portrait)"),j=Eo("(max-width: 899.95px)"),te=l==="auto"?!W||Y||j?"portrait":"landscape":l,[ce,fe]=to.useState({landscape:x??true,portrait:false}),Ve=ce[te],ve=v??Ve,xe=$e=>{v===void 0&&fe(tt=>({...tt,[te]:$e})),C?.($e);},He=c(le,{direction:"row",spacing:1,alignItems:"center",children:[!W||i&&te==="portrait"?e(se,{onClick:()=>xe(!ve),sx:{bgcolor:"action.hover"},children:e(vi,{})}):null,k]}),pe=c(le,{direction:"row",spacing:1,alignItems:"center",children:[m,E]}),ye=e(km,{collapsed:te==="landscape"?!ve:false,onToggle:()=>xe(!ve),menuData:r,orientation:te,colorMode:X,maxHeight:te==="landscape"?900:void 0});return e(zn,{mode:$,children:e(ei,{locale:S,children:c("div",{sx:[$e=>({minHeight:"100vh",display:"flex",flexDirection:"column",background:$e.palette.mode==="dark"?"linear-gradient(180deg, var(--orb-canvas) 0%, var(--orb-surface) 55%, var(--orb-surface-2) 100%)":$e.palette.background.default}),...Array.isArray(u)?u:[u]],children:[e(Qi,{appTitle:t,logo:d===void 0?null:d,mode:$,onToggleMode:()=>ee($e=>$e==="system"?"dark":$e==="dark"?"light":"system"),locale:S,localeLabel:I,localeOptions:R,onLocaleChange:w,user:b,onUserSetting:A,onUserLogout:D,userMenuItems:T,onSearch:y,onSearchAdd:g,leftSlot:He,rightSlot:pe}),p?e("div",{sx:{px:{xs:2,md:3},py:1.5,borderBottom:"1px solid",borderColor:"divider"},children:p}):null,c("div",{sx:{flex:1,minHeight:0,display:"flex",position:"relative"},children:[W&&i&&te==="landscape"?e("div",{sx:{p:1.5,pr:0,flexShrink:0},children:ye}):null,!W||i&&te==="portrait"?e(Xd,{open:ve,onClose:()=>xe(false),PaperProps:{sx:{width:"min(88vw, 360px)",p:1.25,bgcolor:"transparent",boxShadow:"none"}},children:ye}):null,e("div",{sx:{flex:1,minWidth:0,minHeight:0,overflow:"auto",p:1.5,...f},children:c(le,{spacing:1.5,children:[s&&n.length>0?e(Cm,{items:n,selectedId:a,orientation:te,onItemSelect:P}):null,e(Ae,{elevation:0,sx:{flex:1,minHeight:te==="portrait"?420:560,p:{xs:1.25,md:1.5},borderRadius:5,border:"1px solid",borderColor:"divider",bgcolor:"color-mix(in oklch, var(--orb-canvas) 72%, transparent)",backdropFilter:"blur(12px)",color:"text.primary"},children:o})]})})]}),te==="portrait"&&h?c(jsxRuntime.Fragment,{children:[e(Nt,{}),e("div",{sx:{p:1.5},children:h})]}):null]})})})};M();var Rm=Qy__default.default(()=>Promise.resolve().then(()=>(Mm(),Im)).then(t=>t.COrbCanvas),{ssr:false,loading:()=>e("div",{className:"h-full w-full bg-transparent"})});function jl({isRecording:t}){return e(framerMotion.AnimatePresence,{children:t&&e(framerMotion.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.5},className:"pointer-events-none absolute inset-0 z-0 overflow-hidden",children:c("div",{className:"relative flex h-full w-full items-center justify-center",children:[e("div",{className:"absolute inset-0",children:e(Rm,{hue:0,hoverIntensity:.5,rotateOnHover:true,forceHoverState:true,backgroundColor:"transparent"})}),e("div",{className:"relative z-10 h-full w-1/3 mix-blend-overlay opacity-80",children:e(Rm,{hue:10,hoverIntensity:.8,rotateOnHover:true,forceHoverState:true,backgroundColor:"transparent"})})]})})})}var E2=jl;M();var Dm=to.createContext(null);function aC(t){if(!t||!(t instanceof HTMLElement))return false;let o=t.tagName;return !!(o==="INPUT"||o==="TEXTAREA"||o==="SELECT"||t.isContentEditable||t.closest('[data-voice-hotkey-ignore="true"]'))}function iC({children:t,onVoiceSubmit:o,onVoicePartial:r,onVoiceError:n,longPressMs:a=200,disableSpaceTrigger:i=false,ignoreWhenFocusedInput:s=true,renderOverlay:l=true,wsUrl:d,silenceThresholdMs:p,minVolumeRms:m}){let[h,f]=to.useState(false),[u,b]=to.useState(false),y=to.useRef(null),g=to.useRef(false),x=to.useRef(false),v=to.useCallback(()=>{x.current=false,f(false);},[]),{isRecording:C,startRecording:P,stopRecording:S}=Sn({wsUrl:d,silenceThresholdMs:p,minVolumeRms:m,onTextUpdate:A=>{r?.(A);},onComplete:async A=>{try{A.trim()&&(b(!0),await o(A.trim()));}catch(D){let T=D instanceof Error?D.message:"Failed to process voice command";n?.(T);}finally{b(!1),v();}},onError:A=>{n?.(A),b(!1),g.current||v();}}),I=to.useCallback(async()=>{x.current=false,await P();},[P]),R=to.useCallback(()=>{S();},[S]);to.useEffect(()=>{if(i)return;let A=T=>{T.isComposing||(T.code==="Space"||T.key===" ")&&(g.current||T.repeat||s&&aC(document.activeElement)||(g.current=true,T.preventDefault(),y.current=setTimeout(()=>{x.current=true,f(true),P();},a)));},D=T=>{(T.code==="Space"||T.key===" ")&&(y.current&&(clearTimeout(y.current),y.current=null),g.current=false,x.current&&(T.preventDefault(),f(false),S()));};return window.addEventListener("keydown",A),window.addEventListener("keyup",D),()=>{window.removeEventListener("keydown",A),window.removeEventListener("keyup",D),y.current&&(clearTimeout(y.current),y.current=null);}},[i,s,a,P,S]);let w=to.useMemo(()=>({isRecording:C,isHotkeyRecording:h,isSubmitting:u,startRecording:I,stopRecording:R}),[h,C,u,I,R]);return c(Dm.Provider,{value:w,children:[l?e(jl,{isRecording:h}):null,t]})}function sC(){let t=to.useContext(Dm);if(!t)throw new Error("useAINav must be used within CAINavProvider");return t}var z2=iC,V2=sC;function rt(...t){return tailwindMerge.twMerge(clsx.clsx(t))}M();var uC=({content:t,theme:o="light",size:r="base",defaultExpanded:n=false})=>{let[a,i]=to.useState(n),s=to.useMemo(()=>`${(r==="sm"?14:r==="lg"?18:16)-2}px`,[r]);return c("div",{className:`my-6 rounded-lg overflow-hidden transition-all duration-200 ${o==="dark"?"bg-[var(--orb-surface-2)]":"bg-[var(--orb-canvas)]"}`,style:{border:"0.5px solid var(--orb-border)"},children:[c("div",{className:"px-4 py-3 cursor-pointer flex items-center justify-between transition-colors duration-200 bg-[var(--orb-surface)] hover:bg-[var(--orb-hover)]",style:{borderBottom:"0.5px solid var(--orb-border)"},onClick:()=>i(!a),children:[c("span",{className:"flex items-center",children:[e($a,{className:"mr-2 h-4 w-4"}),e("span",{className:"font-medium text-[var(--orb-fg)]",style:{fontSize:r==="sm"?"14px":r==="lg"?"18px":"16px"},children:"\u601D\u8003\u8FC7\u7A0B"})]}),e(Vo,{className:`w-4 h-4 transition-transform duration-200 ${a?"rotate-180":""} text-[var(--orb-muted)]`})]}),a&&e("div",{className:"p-4 whitespace-pre-wrap italic font-light text-[var(--orb-muted)]",style:{fontSize:s,lineHeight:"1.3 !important"},children:t})]})},Am=uC;M();var bC=({content:t,language:o="text",isStreaming:r=false,className:n=""})=>{let a=bo(),[i,s]=to.useState(false),l=async()=>{try{await navigator.clipboard.writeText(t),s(!0),setTimeout(()=>s(!1),2e3);}catch(p){console.error("\u590D\u5236\u5931\u8D25:",p);}},d=a==="dark"?prism.oneDark:prism.oneLight;return c("div",{className:rt("rounded-lg overflow-hidden border border-[var(--orb-border)] my-4",n),children:[c("div",{className:"flex items-center justify-between px-4 py-2 bg-[var(--orb-surface)] border-b border-[var(--orb-border)]",children:[e("span",{className:"text-xs font-medium text-[var(--orb-muted)] uppercase",children:o}),e("button",{onClick:l,className:"p-1 hover:bg-[var(--orb-hover)] rounded transition-colors",disabled:r,title:i?"Copied":"Copy code",children:i?e(ko,{size:14,className:"text-[var(--orb-status-success)]"}):e(Kc,{size:14,className:"text-[var(--orb-muted)]"})})]}),e("div",{className:"text-sm",children:e(reactSyntaxHighlighter.Prism,{language:o,style:d,customStyle:{margin:0,padding:"16px",fontSize:"14px",lineHeight:"1.5",backgroundColor:a==="dark"?"var(--orb-surface-2)":"var(--orb-canvas)"},wrapLongLines:true,children:t})})]})},Em=bC;M();var Om="orb-html-demo",Fm="orb-html-demo-ping",ms=16,xC=2,wC=2e3,SC=300,kC=96,PC=200,TC=560,IC=320,ec=`<script>(function(){var post=function(){var body=document.body;var height=Math.ceil(document.documentElement.scrollHeight);if(body){var style=getComputedStyle(body);height=Math.ceil(Math.max(body.offsetHeight,body.scrollHeight)+parseFloat(style.marginTop||'0')+parseFloat(style.marginBottom||'0'))}parent.postMessage({source:${JSON.stringify(Om)},height:height},'*')};addEventListener('load',post);addEventListener('resize',post);addEventListener('message',function(event){if(event.data&&event.data.source===${JSON.stringify(Fm)})post()});new MutationObserver(post).observe(document.documentElement,{subtree:true,childList:true,attributes:true,characterData:true});var retries=0;var timer=setInterval(function(){post();retries+=1;if(retries>5)clearInterval(timer)},250);post()})()</script>`,MC="html,body{margin:0;padding:12px;font:14px/1.5 system-ui,sans-serif;}",RC=t=>/<html[\s>]/i.test(t),NC=t=>{let o=t.trim();return RC(o)?/<\/body>/i.test(o)?o.replace(/<\/body>/i,`${ec}</body>`):`${o}${ec}`:`<!DOCTYPE html><html><head><meta charset="utf-8"><style>${MC}</style></head><body>${o}${ec}</body></html>`},DC=t=>{let o=/<title[^>]*>([^<]+)<\/title>/i.exec(t)?.[1]?.trim();return o||(/<h1[^>]*>([^<]+)<\/h1>/i.exec(t)?.[1]?.trim()??null)},AC=t=>{if(t<1024)return `${t} B`;let o=t/1024;if(o<1024)return `${o<10?o.toFixed(1):Math.round(o)} KB`;let r=o/1024;return `${r<10?r.toFixed(1):Math.round(r)} MB`},EC=t=>`${t.toLowerCase().replace(/[^\p{Letter}\p{Number}]+/gu,"-").replace(/^-+|-+$/g,"").slice(0,60)||"interactive-demo"}.html`,LC=(t,o)=>{let r=URL.createObjectURL(t),n=document.createElement("a");n.href=r,n.download=o,n.click(),window.setTimeout(()=>URL.revokeObjectURL(r),1e3);},wa=new Map,oc="orb-html-demo-store",OC=t=>t.replace(/^\s+/,"").slice(0,kC),tc=(t,o)=>{wa.set(t,o),window.dispatchEvent(new CustomEvent(oc));},FC=({content:t,title:o})=>{let{t:r}=de(),n=bo(),a=OC(t),[i,s]=to.useState(()=>wa.get(a)?.open??false),[l,d]=to.useState(()=>wa.get(a)?.view??"preview"),[p,m]=to.useState(false),[h,f]=to.useState(IC),u=to.useRef(null),b=to.useRef(null),y=to.useRef(false),g=to.useRef(false),x=to.useRef(t),v=k=>tc(a,{open:k,view:l}),C=k=>tc(a,{open:i,view:k}),P=()=>{g.current=true,v(false);};to.useEffect(()=>{let k=()=>{let E=wa.get(a);s(E?.open??false),d(E?.view??"preview");};return window.addEventListener(oc,k),()=>window.removeEventListener(oc,k)},[a]),to.useEffect(()=>{x.current!==t&&(x.current=t,wa.has(a)||tc(a,{open:true,view:"preview"}));},[t,a]);let[S,I]=to.useState(t);to.useEffect(()=>{if(t===S)return;let k=window.setTimeout(()=>I(t),SC);return ()=>window.clearTimeout(k)},[t,S]);let R=to.useMemo(()=>NC(S),[S]);to.useEffect(()=>{if(!i)return;let k=E=>{let O=E.data;!O||O.source!==Om||typeof O.height!="number"||b.current&&E.source!==b.current.contentWindow||f(Math.max(PC,Math.min(TC,Math.ceil(O.height))));};return window.addEventListener("message",k),b.current?.contentWindow?.postMessage({source:Fm},"*"),()=>window.removeEventListener("message",k)},[i]);let w=o??DC(t)??r("agentui.html.defaultTitle"),A=to.useMemo(()=>new TextEncoder().encode(t).length,[t]);to.useEffect(()=>{if(!p)return;let k=window.setTimeout(()=>m(false),wC);return ()=>window.clearTimeout(k)},[p]),to.useEffect(()=>{if(i){y.current=true;return}y.current&&(y.current=false,g.current&&(g.current=false,u.current?.focus()));},[i]);let D=()=>{navigator.clipboard.writeText(t).then(()=>m(true));},T=()=>LC(new Blob([t],{type:"text/html;charset=utf-8"}),EC(w));return i?c("section",{className:"orb-html-demo","aria-label":w,"data-view":l,children:[c("header",{className:"orb-html-demo-head",children:[e("span",{className:"orb-html-demo-glyph","aria-hidden":"true",children:"</>"}),e("span",{className:"orb-html-demo-head-title",title:w,children:w}),c("div",{className:"orb-segmented-control orb-html-demo-segment",role:"group","aria-label":r("agentui.html.toggle"),"data-has-selection":"true",style:{"--orb-segmented-count":xC,"--orb-segmented-index":l==="code"?0:1},children:[e("span",{className:"orb-segmented-control-thumb","aria-hidden":"true"}),e("button",{type:"button",className:"orb-segmented-control-item orb-segmented-control-item-label","data-selected":l==="code","aria-pressed":l==="code",onClick:()=>C("code"),children:r("agentui.html.code")}),e("button",{type:"button",className:"orb-segmented-control-item orb-segmented-control-item-label","data-selected":l==="preview","aria-pressed":l==="preview",onClick:()=>C("preview"),children:r("agentui.html.preview")})]}),c("div",{className:"orb-html-demo-actions",children:[e("button",{type:"button",className:"orb-icon-btn orb-icon-btn-sm","aria-label":r(p?"agentui.html.copied":"agentui.html.copy"),title:r(p?"agentui.html.copied":"agentui.html.copy"),onClick:D,children:p?e(ko,{size:ms}):e(Lo,{size:ms})}),e("button",{type:"button",className:"orb-icon-btn orb-icon-btn-sm","aria-label":r("agentui.html.download"),title:r("agentui.html.download"),onClick:T,children:e(Wn,{size:ms})}),e("button",{type:"button",className:"orb-icon-btn orb-icon-btn-sm","aria-label":r("agentui.html.close"),title:r("agentui.html.close"),onClick:P,children:e(Xt,{size:ms})})]})]}),c("div",{className:"orb-html-demo-body",children:[e("iframe",{ref:b,className:"orb-html-demo-frame",title:w,sandbox:"allow-scripts",srcDoc:R,style:{height:h},hidden:l!=="preview"}),e("div",{className:"orb-html-demo-code",hidden:l!=="code",children:e(reactSyntaxHighlighter.Prism,{language:"html",style:n==="dark"?prism.oneDark:prism.oneLight,customStyle:{margin:0,padding:"16px 20px",background:"transparent",fontSize:"13px",lineHeight:"1.6"},wrapLongLines:true,children:t})})]})]}):c("button",{ref:u,type:"button",className:"orb-html-demo-card","aria-expanded":false,onClick:()=>v(true),children:[e("span",{className:"orb-html-demo-glyph","aria-hidden":"true",children:"</>"}),c("span",{className:"orb-html-demo-info",children:[e("span",{className:"orb-html-demo-title",children:w}),c("span",{className:"orb-html-demo-meta",children:["HTML \xB7 ",AC(A)]})]}),e("span",{className:"orb-html-demo-openpill",children:r("agentui.html.open")})]})},Bm=FC;M();var fo={useMaxWidth:false},zC=t=>{let o=t.closest(".markdown-body, .orb-omph-assistant")??t,r=getComputedStyle(o);return {fontSize:r.fontSize,fontFamily:r.fontFamily}},VC=t=>{let o=t.querySelector("svg");if(!o)return;let r=o.style.maxWidth;o.getAttribute("width")==="100%"&&r.endsWith("px")&&(o.setAttribute("width",r),o.style.width=r,o.style.maxWidth="none");},WC=t=>{let o=/line (\d+)/i.exec(t)?.[1];return o?`Mermaid syntax error around line ${o} \u2014 expand for details`:"Mermaid syntax error \u2014 expand for details"},$C=({content:t,isLoading:o,className:r="",style:n})=>{let a=to.useRef(null),[i,s]=to.useState(false),[l,d]=to.useState(null),p=bo();return to.useEffect(()=>{let m=false,h=async()=>{if(!(!t.trim()||!a.current)){s(true),d(null);try{let u=zC(a.current),b=Number.parseFloat(u.fontSize);zm__default.default.initialize({startOnLoad:!1,theme:p==="dark"?"dark":"default",securityLevel:"loose",fontFamily:u.fontFamily,themeVariables:{fontFamily:u.fontFamily,fontSize:u.fontSize},flowchart:{htmlLabels:!1,...fo},sequence:{...fo,actorFontSize:b,noteFontSize:b,messageFontSize:b,actorFontFamily:u.fontFamily,noteFontFamily:u.fontFamily,messageFontFamily:u.fontFamily},gantt:fo,journey:fo,class:fo,state:fo,er:fo,pie:fo,mindmap:fo,timeline:fo,gitGraph:fo,quadrantChart:fo,requirement:fo,sankey:fo,block:fo,c4:fo,xyChart:fo});let y=`mermaid-${Math.random().toString(36).substr(2,9)}`,g=t.replace(/```mermaid\n?|\n?```/g,"").trim(),{svg:x,bindFunctions:v}=await zm__default.default.render(y,g);!m&&a.current&&(a.current.innerHTML=x,VC(a.current),v?.(a.current));}catch(u){if(m)return;console.error("Mermaid render failed:",u),d(u instanceof Error?u.message:"Render failed");}finally{m||s(false);}}},f=setTimeout(()=>{h();},100);return ()=>{m=true,clearTimeout(f);}},[t,p]),c("div",{className:`mermaid-block ${r}`,style:n,children:[(o||i)&&c("div",{className:"flex items-center justify-center rounded border border-[var(--orb-border)] bg-[var(--orb-surface)] p-4 dark:bg-[var(--orb-surface-2)]",children:[e("div",{className:"mr-2 h-4 w-4 animate-spin rounded-full border-b-2 border-[var(--orb-primary)]"}),e("span",{className:"text-sm text-[var(--orb-muted)]",children:"Generating Diagram..."})]}),l&&c("div",{className:"rounded border border-[color-mix(in_oklch,var(--orb-status-error)_30%,transparent)] bg-[color-mix(in_oklch,var(--orb-status-error)_8%,transparent)] p-3 text-sm text-[var(--orb-status-error)]",children:[e("p",{className:"font-medium",children:WC(l)}),c("details",{className:"mt-1",children:[e("summary",{className:"cursor-pointer text-xs text-[var(--orb-muted)]",children:"Details & source"}),e("pre",{className:"mt-2 max-h-40 overflow-auto whitespace-pre-wrap break-words",children:l}),e("pre",{className:"mt-2 max-h-40 overflow-auto text-xs text-[var(--orb-muted)]",children:t})]})]}),e("div",{ref:a,className:`overflow-x-auto ${o||i||l?"hidden":""}`})]})},Vm=$C;M();var _C=({title:t="\u53D1\u751F\u9519\u8BEF",content:o,errorCode:r,stack:n,icon:a,closable:i=true,onClose:s,onRetry:l,className:d="",...p})=>{let[m,h]=to.useState(false),[f,u]=to.useState(false),b=async()=>{if(l){u(true);try{await l();}catch(y){console.error("\u91CD\u8BD5\u5931\u8D25:",y);}finally{u(false);}}};return c("div",{className:`relative w-full overflow-hidden rounded-lg border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-sm transition-all hover:shadow-md ${d}`,...p,children:[c("div",{className:"flex p-4 border-l-4 border-l-[var(--orb-status-error)] bg-[color-mix(in_oklch,var(--orb-status-error)_8%,transparent)]",children:[e("div",{className:"flex-shrink-0 mr-3 text-[var(--orb-status-error)] mt-0.5",children:a||e(Fa,{className:"w-5 h-5"})}),c("div",{className:"flex-1 min-w-0",children:[c("div",{className:"flex items-center space-x-2 mb-1",children:[e("h4",{className:"text-base font-semibold text-[var(--orb-fg)]",children:t}),r&&e("span",{className:"text-xs font-mono px-1.5 py-0.5 rounded bg-[color-mix(in_oklch,var(--orb-status-error)_14%,transparent)] text-[var(--orb-status-error)]",children:r})]}),o&&e("div",{className:"text-sm text-[var(--orb-muted)] mb-3 leading-relaxed",children:typeof o=="string"?e("p",{className:"whitespace-pre-wrap",children:o}):o}),(l||n)&&c("div",{className:"flex items-center space-x-4 mt-2",children:[l&&c("button",{onClick:b,disabled:f,className:"flex items-center text-xs font-medium text-[var(--orb-status-error)] hover:opacity-80 transition-colors disabled:opacity-50",children:[e(ld,{className:`w-3.5 h-3.5 mr-1.5 ${f?"animate-spin":""}`}),f?"\u91CD\u8BD5\u4E2D...":"\u91CD\u8BD5"]}),n&&c("button",{onClick:()=>h(!m),className:"flex items-center text-xs font-medium text-[var(--orb-muted)] hover:text-[var(--orb-fg)] dark:text-[var(--orb-muted)] transition-colors",children:[m?e(Vo,{className:"w-3.5 h-3.5 mr-1"}):e(Wo,{className:"w-3.5 h-3.5 mr-1"}),m?"\u9690\u85CF\u8BE6\u60C5":"\u67E5\u770B\u8BE6\u60C5"]})]})]}),i&&s&&e("button",{onClick:s,className:"flex-shrink-0 ml-3 text-[var(--orb-muted)] hover:text-[var(--orb-fg)] transition-colors self-start",children:e(Xt,{className:"w-4 h-4"})})]}),n&&m&&e("div",{className:"bg-[var(--orb-surface)] dark:bg-[var(--orb-canvas)] p-3 border-t border-[var(--orb-border)]",children:e("pre",{className:"text-xs font-mono text-[var(--orb-muted)] overflow-x-auto whitespace-pre-wrap p-2 bg-[var(--orb-canvas)] rounded border border-[var(--orb-border)]",children:n})})]})},gs=_C;M();var GC=({title:t="\u8B66\u544A",content:o,warningType:r,severity:n="warning",warnings:a=[],icon:i,closable:s=true,onClose:l,onConfirm:d,actionText:p,className:m="",...h})=>{let f=()=>{switch(n){case "info":return {borderLeftColor:"border-l-blue-500",iconColor:"text-[var(--orb-primary)]",bgColor:"bg-[var(--orb-p50)]"};case "error":return {borderLeftColor:"border-l-[var(--orb-status-error)]",iconColor:"text-[var(--orb-status-error)]",bgColor:"bg-[color-mix(in_oklch,var(--orb-status-error)_8%,transparent)]"};case "success":return {borderLeftColor:"border-l-green-500",iconColor:"text-[var(--orb-status-success)]",bgColor:"bg-[color-mix(in_oklch,var(--orb-status-success)_8%,transparent)]"};default:return {borderLeftColor:"border-l-yellow-500",iconColor:"text-[var(--orb-status-warning)]",bgColor:"bg-[color-mix(in_oklch,var(--orb-status-warning)_8%,transparent)]"}}},u=()=>{switch(n){case "info":return e(Wa,{className:"w-5 h-5"});case "error":return e(Za,{className:"w-5 h-5"});case "success":return e(Ba,{className:"w-5 h-5"});default:return e(Gc,{className:"w-5 h-5"})}},b=f();return c("div",{className:`relative w-full overflow-hidden rounded-lg border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-sm transition-all hover:shadow-md ${m}`,...h,children:[c("div",{className:`flex p-4 border-l-4 ${b.borderLeftColor} ${b.bgColor}`,children:[e("div",{className:`flex-shrink-0 mr-3 ${b.iconColor}`,children:i||u()}),c("div",{className:"flex-1 min-w-0",children:[c("div",{className:"flex items-center justify-between mb-1",children:[e("h4",{className:"text-base font-semibold text-[var(--orb-fg)]",children:t}),r&&e("span",{className:"text-xs font-medium px-2 py-0.5 rounded-full bg-[var(--orb-surface)] text-[var(--orb-muted)]",children:r})]}),o&&e("div",{className:"text-sm text-[var(--orb-muted)] mb-2",children:o}),a&&a.length>0&&e("ul",{className:"mt-2 space-y-1",children:a.map((y,g)=>c("li",{className:"flex items-start text-sm text-[var(--orb-muted)]",children:[e("span",{className:"mr-2 mt-1.5 w-1 h-1 rounded-full bg-[var(--orb-muted)] flex-shrink-0"}),e("span",{children:y})]},g))})]}),s&&l&&e("button",{onClick:l,className:"flex-shrink-0 ml-3 text-[var(--orb-muted)] hover:text-[var(--orb-fg)] transition-colors",children:e(Xt,{className:"w-4 h-4"})})]}),d&&e("div",{className:"bg-[color-mix(in_oklch,var(--orb-surface)_50%,transparent)] px-4 py-3 flex justify-end border-t border-[var(--orb-border)]",children:e("button",{onClick:d,className:"px-4 py-1.5 text-sm font-medium text-[var(--orb-on-primary)] bg-[var(--orb-primary)] hover:bg-[var(--orb-p600)] rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-[var(--orb-primary)] focus:ring-offset-2 dark:focus:ring-offset-gray-900",children:p||"\u786E\u8BA4"})})]})},hs=GC;M();var UC=({title:t="\u76F8\u5173\u63A8\u8350",content:o,suggestions:r,onSuggestionClick:n,maxDisplay:a=5,icon:i,closable:s=false,onClose:l,className:d="",...p})=>{let[m,h]=to.useState(false),[f,u]=to.useState(""),[b,y]=to.useState(false),g=to.useMemo(()=>f.trim()?r.filter(C=>C.toLowerCase().includes(f.toLowerCase())):r,[r,f]),x=to.useMemo(()=>m?g:g.slice(0,a),[g,m,a]),v=C=>{n?.(C);};return !r||r.length===0?null:c("div",{className:`w-full overflow-hidden rounded-lg border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-sm transition-all hover:shadow-md ${d}`,...p,children:[c("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--orb-border)] bg-[var(--orb-p50)]",children:[c("div",{className:"flex items-center space-x-2.5",children:[e("div",{className:"text-[var(--orb-primary)] flex-shrink-0",children:i||e($a,{className:"w-5 h-5"})}),c("div",{className:"flex flex-col",children:[e("h4",{className:"text-sm font-semibold text-[var(--orb-fg)] leading-tight",children:t}),o&&e("span",{className:"text-xs text-[var(--orb-muted)] mt-0.5",children:o})]})]}),c("div",{className:"flex items-center space-x-1",children:[r.length>3&&e("button",{onClick:()=>y(!b),className:`p-1.5 rounded-md transition-colors ${b?"bg-[var(--orb-p100)] text-[var(--orb-status-primary)]":"text-[var(--orb-muted)] hover:text-[var(--orb-fg)] hover:bg-[var(--orb-hover)]"}`,title:b?"\u5173\u95ED\u641C\u7D22":"\u641C\u7D22\u95EE\u9898",children:e($o,{className:"w-4 h-4"})}),s&&l&&e("button",{onClick:l,className:"text-[var(--orb-muted)] hover:text-[var(--orb-fg)] p-1.5 rounded-md hover:bg-[var(--orb-hover)] transition-colors",title:"\u5173\u95ED",children:e(Xt,{className:"w-4 h-4"})})]})]}),b&&e("div",{className:"px-4 py-2 border-b border-[var(--orb-border)] bg-[color-mix(in_oklch,var(--orb-surface)_50%,transparent)]",children:c("div",{className:"relative",children:[e("input",{type:"text",placeholder:"\u641C\u7D22\u76F8\u5173\u95EE\u9898...",value:f,onChange:C=>u(C.target.value),className:"w-full text-sm px-3 py-1.5 pl-8 rounded border border-[var(--orb-border)] bg-[var(--orb-canvas)] text-[var(--orb-fg)] focus:ring-1 focus:ring-[var(--orb-primary)] focus:border-[var(--orb-primary)] outline-none transition-shadow",autoFocus:true}),e($o,{className:"absolute left-2.5 top-2 w-3.5 h-3.5 text-[var(--orb-muted)]"})]})}),c("div",{className:"p-2",children:[e("ul",{className:"space-y-1",children:x.map((C,P)=>e("li",{children:c("button",{onClick:()=>v(C),className:"w-full text-left px-3 py-2 rounded-md text-sm text-[var(--orb-fg)] hover:bg-[var(--orb-hover)] hover:text-[var(--orb-status-primary)] transition-colors group flex items-start justify-between",children:[e("span",{children:C}),e(Wo,{className:"w-4 h-4 text-[var(--orb-muted)] group-hover:text-[var(--orb-status-primary)] opacity-0 group-hover:opacity-100 transition-all transform group-hover:translate-x-0.5"})]})},P))}),g.length>a&&e("button",{onClick:()=>h(!m),className:"w-full text-center py-2 text-xs font-medium text-[var(--orb-muted)] hover:text-[var(--orb-fg)] transition-colors border-t border-[var(--orb-border)] mt-1",children:m?"\u6536\u8D77":`\u67E5\u770B\u5168\u90E8 (${g.length})`}),g.length===0&&f&&e("div",{className:"text-center py-4 text-sm text-[var(--orb-muted)]",children:"\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u5EFA\u8BAE"})]})]})},fs=UC;M();var KC=({title:t,content:o,toolName:r,parameters:n,result:a,status:i,duration:s,icon:l,closable:d=false,onClose:p,onAction:m,actionText:h,className:f="",...u})=>{let[b,y]=to.useState(false),[g,x]=to.useState(true),v=()=>{switch(i){case "pending":return {iconColor:"text-[var(--orb-primary)]",badgeBg:"bg-[var(--orb-p50)]",badgeText:"text-[var(--orb-status-primary)]",label:"\u6267\u884C\u4E2D"};case "error":return {iconColor:"text-[var(--orb-status-error)]",badgeBg:"bg-[color-mix(in_oklch,var(--orb-status-error)_10%,transparent)]",badgeText:"text-[var(--orb-status-error)]",label:"\u5931\u8D25"};default:return {iconColor:"text-[var(--orb-status-success)]",badgeBg:"bg-[color-mix(in_oklch,var(--orb-status-success)_8%,transparent)]",badgeText:"text-[var(--orb-status-success)]",label:"\u6210\u529F"}}},C=()=>{switch(i){case "pending":return e(td,{className:"w-5 h-5 animate-spin"});case "error":return e(Za,{className:"w-5 h-5"});default:return e(Ba,{className:"w-5 h-5"})}},P=R=>R?R<1e3?`${R}ms`:`${(R/1e3).toFixed(2)}s`:"",S=v(),I=t||r||"\u5DE5\u5177\u8C03\u7528";return c("div",{className:`w-full overflow-hidden rounded-lg border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-sm transition-all hover:shadow-md ${f}`,...u,children:[c("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--orb-border)] bg-[color-mix(in_oklch,var(--orb-surface)_50%,transparent)]",children:[c("div",{className:"flex items-center space-x-3",children:[e("div",{className:`flex-shrink-0 ${S.iconColor}`,children:l||C()}),c("div",{children:[c("div",{className:"flex items-center space-x-2",children:[e("h4",{className:"text-sm font-semibold text-[var(--orb-fg)]",children:I}),e("span",{className:`text-[10px] font-medium px-1.5 py-0.5 rounded ${S.badgeBg} ${S.badgeText}`,children:S.label})]}),r&&t&&c("div",{className:"text-xs text-[var(--orb-muted)] flex items-center mt-0.5",children:[e(Gn,{className:"w-3 h-3 mr-1"}),r]})]})]}),c("div",{className:"flex items-center space-x-2 text-xs text-[var(--orb-muted)]",children:[s&&c("div",{className:"flex items-center bg-[var(--orb-surface)] px-2 py-1 rounded",children:[e(qc,{className:"w-3 h-3 mr-1"}),P(s)]}),d&&p&&e("button",{onClick:p,className:"text-[var(--orb-muted)] hover:text-[var(--orb-fg)] transition-colors p-1 rounded",children:e(Xt,{className:"w-4 h-4"})})]})]}),c("div",{className:"p-4",children:[o&&e("div",{className:"text-sm text-[var(--orb-muted)] mb-4 leading-relaxed",children:o}),n&&c("div",{className:"mb-3",children:[c("button",{onClick:()=>y(!b),className:"flex items-center text-xs font-medium text-[var(--orb-muted)] hover:text-[var(--orb-fg)] dark:text-[var(--orb-muted)] mb-2",children:[b?e(Vo,{className:"w-3.5 h-3.5 mr-1"}):e(Wo,{className:"w-3.5 h-3.5 mr-1"}),e("div",{className:"w-3.5 h-3.5 mr-1.5"}),"\u8F93\u5165\u53C2\u6570"]}),b&&e("div",{className:"bg-[var(--orb-surface)] dark:bg-[var(--orb-canvas)] rounded border border-[var(--orb-border)] overflow-hidden",children:e("pre",{className:"p-3 text-xs font-mono text-[var(--orb-muted)] overflow-x-auto",children:JSON.stringify(n,null,2)})})]}),a&&c("div",{children:[c("button",{onClick:()=>x(!g),className:"flex items-center text-xs font-medium text-[var(--orb-muted)] hover:text-[var(--orb-fg)] dark:text-[var(--orb-muted)] mb-2",children:[g?e(Vo,{className:"w-3.5 h-3.5 mr-1"}):e(Wo,{className:"w-3.5 h-3.5 mr-1"}),e(Gn,{className:"w-3.5 h-3.5 mr-1.5"}),"\u6267\u884C\u7ED3\u679C"]}),g&&e("div",{className:"bg-[var(--orb-surface)] dark:bg-[var(--orb-canvas)] rounded border border-[var(--orb-border)] overflow-hidden",children:e("pre",{className:"p-3 text-xs font-mono text-[var(--orb-muted)] overflow-x-auto",children:typeof a=="string"?a:JSON.stringify(a,null,2)})})]}),m&&e("div",{className:"mt-3 pt-3 border-t border-[var(--orb-border)] flex justify-end",children:e("button",{onClick:m,className:"px-4 py-1.5 text-sm font-medium text-[var(--orb-on-primary)] bg-[var(--orb-primary)] hover:bg-[var(--orb-p600)] rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-[var(--orb-primary)] focus:ring-offset-2 dark:focus:ring-offset-gray-900",children:h||"\u6267\u884C\u64CD\u4F5C"})})]})]})},bs=KC;M();var XC=({data:t})=>{if(!t)return null;let o=to.useMemo(()=>{let r=[],n=[],a="\u6570\u636E\u8868\u683C";return Array.isArray(t)?(r=t,r.length>0&&(n=Object.keys(r[0]).map(i=>({id:i,label:i.charAt(0).toUpperCase()+i.slice(1),numeric:typeof r[0][i]=="number"})))):typeof t=="object"&&(a=t.title||a,r=Array.isArray(t.rows)?t.rows:Array.isArray(t.data)?t.data:[],Array.isArray(t.columns)?n=t.columns.map(s=>({id:s.key||s.id,label:s.title||s.label,numeric:s.dataType==="number"||s.numeric})):r.length>0&&(n=Object.keys(r[0]).map(s=>({id:s,label:s,numeric:typeof r[0][s]=="number"})))),r=r.map((i,s)=>({...i,id:i.id||`row_${s}`})),{title:a,columns:n,rows:r}},[t]);return o.rows.length===0?e("div",{className:"w-full my-4 p-4 border border-dashed border-[var(--orb-border)] rounded text-center text-[var(--orb-muted)]",children:"\u6682\u65E0\u8868\u683C\u6570\u636E"}):e("div",{className:"w-full my-4",children:e(rr,{appId:"agent-ui-table-card",title:o.title,columns:o.columns,rows:o.rows,count:o.rows.length,rowKey:"id",fitContainer:false,maxHeight:"500px",rowsPerPage:10,rowsPerPageOptions:[5,10,20,50]})})},vs=XC;M();var ZC=({title:t,subtitle:o,data:r,type:n,config:a={}})=>{let i=()=>{switch(n){case "bar-chart-card":return e(js,{className:"w-4 h-4 text-[var(--orb-chart-1)]"});case "line-chart-card":return e(ed,{className:"w-4 h-4 text-[var(--orb-chart-positive)]"});case "pie-chart-card":return e(sd,{className:"w-4 h-4 text-[var(--orb-chart-2)]"});case "combo-chart-card":return e(_c,{className:"w-4 h-4 text-[var(--orb-chart-5)]"});case "heatmap-chart-card":return e(Qc,{className:"w-4 h-4 text-[var(--orb-chart-negative)]"});case "fishbone-chart-card":return e(jc,{className:"w-4 h-4 text-[var(--orb-chart-4)]"});case "waterfall-chart-card":return e(gd,{className:"w-4 h-4 text-[var(--orb-chart-6)]"});case "google-map-card":return e(_n,{className:"w-4 h-4 text-[var(--orb-status-primary)]"});case "amap-card":return e(rd,{className:"w-4 h-4 text-[var(--orb-status-primary)]"});default:return e(js,{className:"w-4 h-4"})}},s=()=>{if(!r&&n!=="google-map-card"&&n!=="amap-card")return e("div",{className:"text-[var(--orb-muted)] text-sm p-4 text-center",children:"No data available"});try{switch(n){case "bar-chart-card":return e(ia,{data:r,orientation:a.orientation||"horizontal",valueSuffix:a.valueSuffix||"",minHeight:a.minHeight});case "line-chart-card":return e(qp,{data:r,color:a.color,valueSuffix:a.valueSuffix||"",height:a.height});case "pie-chart-card":let l=r.reduce((p,m)=>p+(Number(m.value)||0),0),d=r.map(p=>({name:p.name,value:Number(p.value)||0,percent:typeof p.percent=="number"?p.percent:l>0?(Number(p.value)||0)/l*100:0}));return e(Ai,{data:d,variant:a.variant||"donut",size:a.size,colors:a.colors});case "combo-chart-card":return e(Xp,{data:r,barColor:a.barColor,lineColor:a.lineColor});case "heatmap-chart-card":return e(Zp,{data:r});case "fishbone-chart-card":return e(Yp,{branches:r,effect:a.effect||t||"Problem"});case "waterfall-chart-card":return e(jp,{data:r,height:a.height});case "google-map-card":return e(Qp,{embedUrl:a.embedUrl||r&&r[0]?.embedUrl,apiKey:a.apiKey,query:a.query||r&&r[0]?.query||t,height:a.height});case "amap-card":return e(Jp,{embedUrl:a.embedUrl||r&&r[0]?.embedUrl,keyword:a.keyword||r&&r[0]?.keyword||t,height:a.height});default:return c("div",{className:"text-[var(--orb-muted)] text-sm p-4 text-center",children:["Unsupported chart type: ",n]})}}catch(l){return console.error("Error rendering chart:",l),e("div",{className:"text-[var(--orb-status-error)] text-sm p-4 text-center",children:"Error rendering chart"})}};return c("div",{className:"w-full overflow-hidden rounded-lg border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-sm transition-all hover:shadow-md",children:[c("div",{className:"flex items-center px-4 py-3 border-b border-[var(--orb-border)] bg-[color-mix(in_oklch,var(--orb-surface)_50%,transparent)]",children:[e("div",{className:"mr-2 flex-shrink-0",children:i()}),c("div",{className:"flex-1 min-w-0",children:[e("h3",{className:"text-sm font-semibold text-[var(--orb-fg)] truncate",children:t}),o&&e("p",{className:"text-xs text-[var(--orb-muted)] mt-0.5 truncate",children:o})]})]}),c("div",{className:"p-4",children:[e("div",{className:"overflow-x-auto",children:s()}),e("div",{className:"mt-3",children:c("details",{className:"text-xs text-[var(--orb-muted)]",children:[e("summary",{className:"cursor-pointer hover:text-[var(--orb-fg)] transition-colors select-none font-medium opacity-60 hover:opacity-100",children:"View Raw Data"}),e("pre",{className:"mt-2 p-2 bg-[var(--orb-surface)] dark:bg-[var(--orb-canvas)] rounded border border-[var(--orb-border)] overflow-x-auto max-h-40",children:JSON.stringify(r,null,2)})]})})]})]})},ys=ZC;M();var ks=["bar","column","line","pie","donut","scatter","bubble","list","metric","progress"],YC={bar:"Bars",column:"Columns",line:"Line",pie:"Pie",donut:"Donut",scatter:"Scatter",bubble:"Bubble",list:"List",metric:"Metric",progress:"Progress"},ws=480,Nn=214,Kt={top:18,right:16,bottom:38,left:30},oo=t=>typeof t=="number"&&Number.isFinite(t)?t:0,Km=t=>t.toLocaleString(void 0,{maximumFractionDigits:1}),Zo=(t,o)=>`${t.id||t.label}-${o}`,qm=(t,o=13)=>t.length>o?`${t.slice(0,Math.max(1,o-1))}\u2026`:t,Ss=(t,o,r)=>Math.min(r,Math.max(o,t)),fr=(t,o,r)=>t.color??r[o%r.length],br=(t,o)=>o?{onMouseEnter:()=>o.onItemHoverStart?.(t),onMouseMove:()=>o.onItemHoverStart?.(t),onMouseLeave:()=>o.onItemHoverEnd?.(t),onContextMenu:r=>o.onItemContextMenu?.(r,t)}:{},Xm=t=>{let o=t.map(a=>oo(a.value)),r=Math.min(0,...o),n=Math.max(0,...o);return {min:r,max:n===r?r+1:n,range:n===r?1:n-r}},jC=(t,o,r)=>{let n=ws-Kt.left-Kt.right,a=Nn-Kt.top-Kt.bottom,{max:i,range:s}=Xm(r),l=Kt.left+t*n/Math.max(r.length-1,1),d=Kt.top+(i-oo(o.value))/s*a,p=Kt.top+i/s*a;return {x:l,y:d,zeroY:p}},xs=(t,o,r,n)=>{let a=(n-90)*Math.PI/180;return {x:t+r*Math.cos(a),y:o+r*Math.sin(a)}},QC=(t,o,r,n,a,i)=>{let s=xs(t,o,r,i),l=xs(t,o,r,a),d=i-a>180?1:0;if(n===0)return `M ${t} ${o} L ${s.x} ${s.y} A ${r} ${r} 0 ${d} 0 ${l.x} ${l.y} Z`;let p=xs(t,o,n,i),m=xs(t,o,n,a);return `M ${s.x} ${s.y} A ${r} ${r} 0 ${d} 0 ${l.x} ${l.y} L ${m.x} ${m.y} A ${n} ${n} 0 ${d} 1 ${p.x} ${p.y} Z`},JC=({children:t})=>c("div",{className:"orb-metric-empty",role:"status",children:[e("span",{className:"orb-metric-empty-mark","aria-hidden":"true",children:"\u2014"}),e(L,{variant:"body2",muted:true,children:t})]}),ex=()=>c("div",{className:"orb-metric-loading",role:"status","aria-label":"Loading chart",children:[e("span",{className:"orb-metric-skeleton orb-metric-skeleton-wide"}),e("span",{className:"orb-metric-skeleton"}),e("span",{className:"orb-metric-skeleton orb-metric-skeleton-short"}),e("span",{className:"orb-metric-skeleton orb-metric-skeleton-wide"})]}),ac=({item:t,onItemClick:o,interactions:r})=>{let n=()=>o?.(t);return {...o?{role:"button",tabIndex:0,onClick:n,onKeyDown:i=>{o&&(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),n());}}:{},...br(t,r),style:{cursor:o||r?"pointer":"default"}}},tx=({loading:t,error:o,hasData:r,emptyState:n,children:a})=>t?e(ex,{}):o?e("div",{className:"orb-metric-error",role:"alert",children:o}):r?e(jsxRuntime.Fragment,{children:a}):e(JC,{children:n??"No data for the current selection."}),ox=({data:t,activeId:o,onItemClick:r,interactions:n,valueFormatter:a,colors:i})=>{let s=Math.max(...t.map(l=>Math.abs(oo(l.value))),1);return e("div",{className:"orb-metric-bars",role:"list","aria-label":"Chart data",children:t.map((l,d)=>{let p=oo(l.value),m=`${Ss(Math.abs(p)/s*100,0,100)}%`,h=o===l.id,f=c(jsxRuntime.Fragment,{children:[e("span",{className:"orb-metric-bar-label",title:l.label,children:l.label}),e("span",{className:"orb-metric-bar-track","aria-hidden":"true",children:e("span",{className:`orb-metric-bar-fill${h?" is-active":""}`,style:{width:m,backgroundColor:fr(l,d,i)}})}),e("span",{className:"orb-metric-bar-value",children:a(p)})]});return r?e("button",{type:"button",className:`orb-metric-bar-row${h?" is-active":""}`,onClick:()=>r(l),title:`${l.label}: ${a(p)}`,"aria-pressed":h,...br(l,n),children:f},Zo(l,d)):e("div",{className:`orb-metric-bar-row${h?" is-active":""}`,role:"listitem",...br(l,n),children:f},Zo(l,d))})})},rx=({data:t,activeId:o,onItemClick:r,interactions:n,valueFormatter:a,colors:i})=>{let s=Math.max(t.reduce((l,d)=>l+Math.max(oo(d.value),0),0),1);return e("div",{className:"orb-metric-progress",role:"list","aria-label":"Chart data",children:t.map((l,d)=>{let p=Math.max(oo(l.value),0),m=Ss(p/s*100,0,100),h=o===l.id,f=c(jsxRuntime.Fragment,{children:[c("span",{className:"orb-metric-progress-heading",children:[e("span",{title:l.label,children:l.label}),e("strong",{children:a(p)})]}),e("span",{className:"orb-metric-bar-track","aria-hidden":"true",children:e("span",{className:"orb-metric-bar-fill",style:{width:`${m}%`,backgroundColor:fr(l,d,i)}})})]});return r?e("button",{type:"button",className:`orb-metric-progress-row${h?" is-active":""}`,onClick:()=>r(l),"aria-pressed":h,...br(l,n),children:f},Zo(l,d)):e("div",{className:`orb-metric-progress-row${h?" is-active":""}`,role:"listitem",...br(l,n),children:f},Zo(l,d))})})},nx=({type:t,data:o,activeId:r,onItemClick:n,interactions:a,valueFormatter:i,secondaryValueFormatter:s,colors:l,ariaLabel:d})=>{let{min:p,max:m,range:h}=Xm(o),f=ws-Kt.left-Kt.right,u=Nn-Kt.top-Kt.bottom,b=Kt.top+m/h*u,y=Math.max(1,Math.ceil(o.length/6)),g=o.map((C,P)=>jC(P,C,o)),x=g.map(C=>`${C.x},${C.y}`).join(" "),v=Math.max(...o.map(C=>Math.max(oo(C.secondaryValue),0)),1);return e("div",{className:"orb-metric-svg-wrap",children:c("svg",{className:"orb-metric-svg",viewBox:`0 0 ${ws} ${Nn}`,role:"img","aria-label":d,children:[e("line",{className:"orb-metric-axis",x1:Kt.left,y1:b,x2:ws-Kt.right,y2:b}),e("line",{className:"orb-metric-grid",x1:Kt.left,y1:Kt.top,x2:Kt.left,y2:Nn-Kt.bottom}),t==="column"&&o.map((C,P)=>{let S=g[P],I=oo(C.value),R=Math.max(Math.abs(S.y-b),I===0?2:0),w=S.x-Math.min(18,f/Math.max(o.length*2,1)),A=Math.min(36,Math.max(10,f/Math.max(o.length*1.8,1))),D=r===C.id;return c("g",{...ac({item:C,onItemClick:n,interactions:a}),"aria-label":`${C.label}: ${i(I)}`,children:[e("rect",{className:`orb-metric-column${D?" is-active":""}`,x:w,y:Math.min(S.y,b),width:A,height:R,rx:4,fill:fr(C,P,l)}),c("title",{children:[C.label,": ",i(I)]}),(P%y===0||o.length<=6)&&e("text",{className:"orb-metric-svg-label",x:S.x,y:Nn-14,textAnchor:"middle",children:qm(C.label)})]},Zo(C,P))}),(t==="line"||t==="scatter"||t==="bubble")&&c(jsxRuntime.Fragment,{children:[t==="line"&&e("polyline",{className:"orb-metric-line",fill:"none",points:x,stroke:l[0]}),o.map((C,P)=>{let S=g[P],I=r===C.id,R=t==="bubble"?7+Math.max(oo(C.secondaryValue),0)/v*12:t==="scatter"?5:4;return c("g",{...ac({item:C,onItemClick:n,interactions:a}),"aria-label":`${C.label}: ${i(oo(C.value))}`,children:[t==="line"&&e("circle",{className:`orb-metric-point${I?" is-active":""}`,cx:S.x,cy:S.y,r:I?6:4,fill:fr(C,P,l)}),t!=="line"&&e("circle",{className:`orb-metric-point${I?" is-active":""}`,cx:S.x,cy:S.y,r:R,fill:fr(C,P,l),opacity:t==="bubble"?.82:.9}),c("title",{children:[C.label,": ",i(oo(C.value)),t==="bubble"&&C.secondaryValue!==void 0?` \xB7 Size: ${s(oo(C.secondaryValue))}`:""]}),(P%y===0||o.length<=6)&&e("text",{className:"orb-metric-svg-label",x:S.x,y:Math.max(Kt.top+8,S.y-R-7),textAnchor:"middle",children:qm(C.label)})]},Zo(C,P))})]}),e("text",{className:"orb-metric-axis-label",x:Kt.left,y:Kt.top-5,children:i(m)}),p<0&&e("text",{className:"orb-metric-axis-label",x:Kt.left,y:Nn-Kt.bottom+14,children:i(p)})]})})},ax=({type:t,data:o,activeId:r,onItemClick:n,interactions:a,valueFormatter:i,colors:s,ariaLabel:l})=>{let d=o.map(u=>({...u,value:Math.max(oo(u.value),0)})),p=d.reduce((u,b)=>u+b.value,0),m=72,h=92,f=0;return c("div",{className:"orb-metric-circular",children:[c("svg",{className:"orb-metric-donut",viewBox:"0 0 184 184",role:"img","aria-label":l,children:[d.map((u,b)=>{let y=u.value/p*360,g=f;f+=y;let x=r===u.id,v=y>=359.9?void 0:QC(h,h,m,t==="donut"?46:0,g,g+y),C=ac({item:u,onItemClick:n,interactions:a});return v?e("path",{className:`orb-metric-slice${x?" is-active":""}`,d:v,fill:fr(u,b,s),...C,children:c("title",{children:[u.label,": ",i(u.value)," (",(u.value/p*100).toFixed(1),"%)"]})},Zo(u,b)):e("circle",{className:`orb-metric-slice${x?" is-active":""}`,cx:h,cy:h,r:t==="donut"?60:m,fill:t==="donut"?"none":fr(u,b,s),stroke:t==="donut"?fr(u,b,s):void 0,strokeWidth:28,...C,children:c("title",{children:[u.label,": ",i(u.value)," (100%)"]})},Zo(u,b))}),t==="donut"&&e("circle",{cx:h,cy:h,r:44,fill:"var(--orb-surface)"}),t==="donut"&&e("text",{className:"orb-metric-donut-total",x:h,y:h+5,textAnchor:"middle",children:i(p)})]}),e("div",{className:"orb-metric-legend",role:"list","aria-label":"Chart legend",children:d.map((u,b)=>{let y=r===u.id;return c("button",{type:"button",className:`orb-metric-legend-item${y?" is-active":""}`,onClick:()=>n?.(u),disabled:!n,title:u.label,...br(u,a),children:[e("span",{className:"orb-metric-legend-dot",style:{backgroundColor:fr(u,b,s)}}),e("span",{className:"orb-metric-legend-label",children:u.label}),c("strong",{children:[(u.value/p*100).toFixed(0),"%"]})]},Zo(u,b))})})]})},ix=({data:t,activeId:o,onItemClick:r,interactions:n,valueFormatter:a,secondaryValueFormatter:i})=>e("div",{className:"orb-metric-list",role:"list","aria-label":"Chart data",children:t.map((s,l)=>{let d=c(jsxRuntime.Fragment,{children:[e("span",{className:"orb-metric-list-label",title:s.label,children:s.label}),e("span",{className:"orb-metric-list-value",children:a(oo(s.value))}),s.secondaryValue!==void 0&&e("span",{className:"orb-metric-list-secondary",children:i(oo(s.secondaryValue))})]});return r?e("button",{type:"button",className:`orb-metric-list-row${o===s.id?" is-active":""}`,onClick:()=>r(s),"aria-pressed":o===s.id,...br(s,n),children:d},Zo(s,l)):e("div",{className:`orb-metric-list-row${o===s.id?" is-active":""}`,role:"listitem",...br(s,n),children:d},Zo(s,l))})}),Ps=({title:t,subtitle:o,data:r=[],chartType:n="bar",onChartTypeChange:a,onItemClick:i,onDataDetails:s,activeId:l,valueFormatter:d=Km,secondaryValueFormatter:p=Km,valueLabel:m,secondaryValueLabel:h,emptyState:f,loading:u=false,error:b,maxItems:y=8,showChartTypeControl:g=true,showDataDetails:x=true,dataRevealDelayMs:v=1e3,chartTypeOptions:C,chartTypeLabels:P,footer:S,ariaLabel:I,className:R,style:w,sx:A})=>{let D=Ys(),T=to.useRef(null),k=to.useRef(null),[E,O]=to.useState(n),[$,ee]=to.useState(false),[F,G]=to.useState(null),[W,Q]=to.useState(null);to.useEffect(()=>O(n),[n]);let z=to.useCallback(()=>{k.current!==null&&(window.clearTimeout(k.current),k.current=null);},[]);to.useEffect(()=>z,[z]),to.useEffect(()=>{if(!W)return;let K=Ne=>{let Se=Ne.target;Se instanceof HTMLElement&&Se.closest(".orb-metric-context-menu")||Q(null);};return document.addEventListener("pointerdown",K),()=>document.removeEventListener("pointerdown",K)},[W]);let H=E,X=to.useMemo(()=>[D.chart1,D.chart2,D.chart3,D.chart4,D.chart5,D.chart6],[D]),Y=to.useMemo(()=>$?r:r.slice(0,Math.max(1,y)),[r,y,$]),j=Math.max(0,r.length-Y.length),te=Y.some(K=>oo(K.value)>0),ce=Y.length>0&&(H!=="pie"&&H!=="donut"?true:te),fe=(C??[H,"bar","column","line","pie","donut","scatter","bubble","list"]).filter((K,Ne,Se)=>ks.includes(K)&&Se.indexOf(K)===Ne),Ve={...YC,...P},ve=Y[0],xe=I??`${t} ${Ve[H]} chart`,He=K=>{O(K),a?.(K);},pe=to.useCallback((K,Ne)=>{G({item:K,source:Ne}),Q(null),s?.(K,Ne);},[s]),ye=to.useCallback(K=>{z(),!(!x||W)&&(k.current=window.setTimeout(()=>{pe(K,"hover"),k.current=null;},Math.max(0,v)));},[z,W,v,pe,x]),$e=to.useCallback(()=>{z();},[z]),tt=to.useCallback((K,Ne)=>{if(!x)return;K.preventDefault(),z();let Se=T.current?.getBoundingClientRect(),Fe=Se?Ss(K.clientX-Se.left,8,Math.max(8,Se.width-164)):8,it=Se?Ss(K.clientY-Se.top,8,Math.max(8,Se.height-72)):8;Q({item:Ne,left:Fe,top:it});},[z,x]),at=x?{onItemHoverStart:ye,onItemHoverEnd:$e,onItemContextMenu:tt}:void 0,st=H==="metric"?c("div",{className:"orb-metric-kpi",role:i?"button":"img",tabIndex:i?0:void 0,onClick:()=>ve&&i?.(ve),onKeyDown:K=>{ve&&i&&(K.key==="Enter"||K.key===" ")&&(K.preventDefault(),i(ve));},"aria-label":xe,...ve?br(ve,at):{},children:[e("span",{className:"orb-metric-kpi-label",children:ve?.label??m??"Value"}),e("strong",{children:ve?d(oo(ve.value)):"\u2014"}),ve?.secondaryValue!==void 0&&c("span",{className:"orb-metric-kpi-secondary",children:[h??"Compared with"," \xB7 ",p(oo(ve.secondaryValue))]})]}):H==="progress"?e(rx,{data:Y,activeId:l,onItemClick:i,interactions:at,valueFormatter:d,colors:X}):H==="bar"?e(ox,{data:Y,activeId:l,onItemClick:i,interactions:at,valueFormatter:d,colors:X}):H==="list"?e(ix,{data:Y,activeId:l,onItemClick:i,interactions:at,valueFormatter:d,secondaryValueFormatter:p}):H==="pie"||H==="donut"?e(ax,{type:H,data:Y,activeId:l,onItemClick:i,interactions:at,valueFormatter:d,colors:X,ariaLabel:xe}):e(nx,{type:H,data:Y,activeId:l,onItemClick:i,interactions:at,valueFormatter:d,secondaryValueFormatter:p,colors:X,ariaLabel:xe});return c("div",{ref:T,className:"orb-metric-chart-shell",onMouseLeave:()=>{z(),F?.source==="hover"&&G(null);},children:[c(Ae,{elevation:1,variant:"outlined",className:`orb-metric-chart-card ${R??""}`,style:w,sx:A,children:[c("div",{className:"orb-metric-chart-header",children:[c("div",{className:"orb-metric-chart-heading",children:[e(L,{variant:"subtitle1",component:"h3",noWrap:true,title:t,children:t}),o&&e(L,{variant:"caption",muted:true,component:"div",noWrap:true,children:o})]}),g&&fe.length>1&&e(Vt,{"aria-label":`${t} chart type`,className:"orb-metric-chart-select",value:H,options:fe.map(K=>({value:K,label:Ve[K]})),onChange:K=>He(K.target.value),minWidth:108,fullWidth:false,size:"small"})]}),c("div",{className:"orb-metric-chart-body",children:[e(tx,{loading:u,error:b,hasData:ce,emptyState:f,children:st}),j>0&&!u&&!b&&e("button",{type:"button",className:"orb-metric-more",onClick:()=>ee(K=>!K),children:$?"Show fewer":`Show all ${r.length}`})]}),S&&e("div",{className:"orb-metric-chart-footer",children:S})]}),W&&c("div",{className:"orb-metric-context-menu",role:"menu",onMouseEnter:z,onKeyDown:K=>{K.key==="Escape"&&Q(null);},style:{left:W.left,top:W.top},onPointerDown:K=>K.stopPropagation(),children:[e("div",{className:"orb-metric-context-label",children:W.item.label}),e("button",{type:"button",role:"menuitem",onClick:K=>{K.preventDefault(),K.stopPropagation(),pe(W.item,"contextmenu");},children:"Show data"})]}),F&&c("div",{className:"orb-metric-data-details",role:"dialog","aria-label":`${F.item.label} data details`,onPointerDown:K=>K.stopPropagation(),children:[c("div",{className:"orb-metric-data-details-header",children:[e("strong",{children:F.item.label}),e("button",{type:"button","aria-label":"Close data details",onClick:()=>G(null),children:"\xD7"})]}),c("div",{className:"orb-metric-data-details-row",children:[e("span",{children:m??"Value"}),e("strong",{children:d(oo(F.item.value))})]}),F.item.secondaryValue!==void 0&&c("div",{className:"orb-metric-data-details-row",children:[e("span",{children:h??"Secondary value"}),e("strong",{children:p(oo(F.item.secondaryValue))})]}),e("span",{className:"orb-metric-data-details-hint",children:F.source==="hover"?`Shown after ${Math.max(0,v)/1e3} seconds of stillness`:"Shown from the context menu"})]})]})};Ps.displayName="CMetricChartCard";M();var sx=({messageId:t,cardHooks:o,valueSuffix:r,secondaryValueSuffix:n,...a})=>{let i=(l,d)=>{o?.onCardEvent?.({messageId:t,cardType:"metric-chart-card",action:l,title:a.title,payload:d,rawData:a});},s=(l,d)=>`${l.toLocaleString()}${d??""}`;return e(Ps,{...a,valueFormatter:l=>s(l,r),secondaryValueFormatter:l=>s(l,n),onChartTypeChange:l=>i("action",{chartType:l}),onItemClick:l=>i("action",{item:l}),onDataDetails:(l,d)=>i("show-data",{item:l,source:d})})},Ts=sx;M();var lx=({type:t,manifest:o})=>c("div",{className:"w-full overflow-hidden rounded-lg border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-sm transition-all hover:shadow-md",children:[c("div",{className:"flex items-center px-4 py-3 border-b border-[var(--orb-border)] bg-[var(--orb-p50)]",children:[e("div",{className:"w-4 h-4 mr-2 text-[var(--orb-status-primary)]"}),c("h3",{className:"text-sm font-semibold text-[var(--orb-fg)]",children:["SAP Card: ",t]})]}),e("div",{className:"p-4",children:e("div",{className:"bg-[var(--orb-surface)] dark:bg-[var(--orb-canvas)] p-3 rounded border border-[var(--orb-border)] overflow-x-auto",children:e("pre",{className:"text-xs font-mono text-[var(--orb-muted)] whitespace-pre-wrap",children:JSON.stringify(o,null,2)})})})]}),Is=lx;var cx=t=>Array.isArray(t)?t.flatMap((o,r)=>{if(!o||typeof o!="object")return [];let n=o,a=String(n.label??n.name??n.id??`Item ${r+1}`),i=Number(n.value),s=Number.isFinite(i)?i:0,l=n.secondaryValue===void 0?void 0:Number(n.secondaryValue);return [{id:String(n.id??n.name??n.label??r),label:a,value:s,...l!==void 0&&Number.isFinite(l)?{secondaryValue:l}:{},...typeof n.color=="string"?{color:n.color}:{}}]}):[],Ms=t=>{let o;try{o=JSON.parse(t);}catch{return null}if(o&&typeof o=="object"){if(o.type==="metric-chart-card"&&o.title&&Array.isArray(o.data)){let r=ks.includes(o.chartType)?o.chartType:"bar";return {...o,type:"metric-chart-card",chartType:r,data:cx(o.data)}}if((o.type==="bar-chart-card"||o.type==="line-chart-card"||o.type==="pie-chart-card"||o.type==="combo-chart-card"||o.type==="heatmap-chart-card"||o.type==="fishbone-chart-card"||o.type==="waterfall-chart-card"||o.type==="google-map-card"||o.type==="amap-card")&&o.title||(o.type==="sap-analytical-card"||o.type==="sap-list-card"||o.type==="sap-object-card"||o.type==="sap-component-card")&&o.manifest||o.type==="error-card"||o.type==="warning-card"||o.type==="suggestions-card"||o.type==="tool-result-card"||o.type==="table"&&o.data)return o}return null};M();var fx=({content:t,theme:o,size:r="base",className:n,enableCodeHighlight:a=true,enableMermaid:i=true,messageId:s,cardHooks:l})=>{let d=to.useRef(l);d.current=l;let p=!!l?.onCardEvent,m=to.useMemo(()=>p?{onCardEvent:y=>d.current?.onCardEvent?.(y)}:void 0,[p]),h=to.useMemo(()=>t?t.replace(/<think>([\s\S]*?)<\/think>/g,(y,g)=>`<div data-component="thinkbox" data-think-content="${encodeURIComponent(g.trim())}"></div>`):"",[t]),f=(y,g,x,v,C)=>{m?.onCardEvent?.({messageId:s,cardType:y,action:g,title:x,payload:v,rawData:C});},u=(y,g,x,v,C,P)=>{if(!(!C&&!m?.onCardEvent))return (...S)=>{let I=C?.(...S),R=P?P(...S):void 0;return f(y,g,x,R,v),I}},b=to.useMemo(()=>({div(y){let{"data-component":g,"data-think-content":x,...v}=y;return g==="thinkbox"&&x?e(Am,{content:decodeURIComponent(x),theme:o,size:r,defaultExpanded:false}):e("div",{...v})},table({children:y}){return e("div",{className:"my-4 w-full overflow-x-auto rounded-lg border border-[var(--orb-border)]",children:e("table",{className:"w-full min-w-[520px] border-collapse text-sm",children:y})})},thead({children:y}){return e("thead",{className:"bg-[color-mix(in_oklch,var(--orb-surface)_60%,transparent)]",children:y})},tbody({children:y}){return e("tbody",{className:"bg-[var(--orb-canvas)] dark:bg-[var(--orb-canvas)]",children:y})},tr({children:y}){return e("tr",{className:"border-b border-[var(--orb-border)] last:border-b-0",children:y})},th({children:y,align:g}){return e("th",{className:`px-3 py-2 font-semibold text-[var(--orb-fg)] ${g==="center"?"text-center":g==="right"?"text-right":"text-left"}`,children:y})},td({children:y,align:g}){return e("td",{className:`px-3 py-2 text-[var(--orb-fg)] align-top ${g==="center"?"text-center":g==="right"?"text-right":"text-left"}`,children:y})},code({className:y,children:g,...x}){let v=/language-([\w-]+)/.exec(y||""),C=v?v[1]:"",P=String(g);if(!v&&!P.includes(`
|
|
199
|
+
`))return e("code",{children:g});let I=P.replace(/\n$/,"");if(i&&C==="mermaid")return e(Vm,{content:I});if(C==="html"||C==="htm")return e(Bm,{content:I});if(C==="json"){let R=Ms(I);if(R)switch(R.type){case "table":return e(vs,{data:R.data});case "metric-chart-card":return e(Ts,{...R,messageId:s,cardHooks:m});case "bar-chart-card":case "line-chart-card":case "pie-chart-card":case "combo-chart-card":case "heatmap-chart-card":case "fishbone-chart-card":case "waterfall-chart-card":case "google-map-card":case "amap-card":return e(ys,{...R});case "sap-analytical-card":case "sap-list-card":case "sap-object-card":case "sap-component-card":return e(Is,{...R});case "error-card":{let w=R;return e(gs,{...w,onClose:u("error-card","close",w.title,w,w.onClose),onRetry:u("error-card","retry",w.title,w,w.onRetry)})}case "warning-card":{let w=R,A=w.onConfirm?u("warning-card","confirm",w.title,w,w.onConfirm):w.actionText&&m?.onCardEvent?u("warning-card","confirm",w.title,w):void 0;return e(hs,{...w,onClose:u("warning-card","close",w.title,w,w.onClose),onConfirm:A})}case "suggestions-card":{let w=R;return e(fs,{...w,onClose:u("suggestions-card","close",w.title,w,w.onClose),onSuggestionClick:u("suggestions-card","suggestion-click",w.title,w,w.onSuggestionClick,A=>({suggestion:A}))})}case "tool-result-card":{let w=R;return e(bs,{...w,onClose:u("tool-result-card","close",w.title,w,w.onClose),onAction:u("tool-result-card","action",w.title,w,w.onAction)})}}}return a?e(Em,{content:I,language:C,className:"not-prose"}):e("code",{className:y,...x,children:g})}}),[o,r,i,a,m,s]);return e("div",{className:rt("markdown-body max-w-none",n),children:e(px__default.default,{remarkPlugins:[ux__default.default,mx__default.default],rehypePlugins:[gx__default.default,hx__default.default],components:b,children:h})})},Dn=fx;M();var bx=({content:t,messageId:o,cardHooks:r})=>{let n=(s,l,d,p,m)=>{r?.onCardEvent?.({messageId:o,cardType:s,action:l,title:d,payload:p,rawData:m});},a=(s,l,d,p,m,h)=>{if(!(!m&&!r?.onCardEvent))return (...f)=>{let u=m?.(...f),b=h?h(...f):void 0;return n(s,l,d,b,p),u}},i=Ms(t);if(i)switch(i.type){case "table":return e(vs,{data:i.data});case "metric-chart-card":return e(Ts,{...i,messageId:o,cardHooks:r});case "bar-chart-card":case "line-chart-card":case "pie-chart-card":case "combo-chart-card":case "heatmap-chart-card":case "fishbone-chart-card":case "waterfall-chart-card":case "google-map-card":case "amap-card":return e(ys,{...i});case "sap-analytical-card":case "sap-list-card":case "sap-object-card":case "sap-component-card":return e(Is,{...i});case "error-card":{let s=i;return e(gs,{...s,onClose:a("error-card","close",s.title,s,s.onClose),onRetry:a("error-card","retry",s.title,s,s.onRetry)})}case "warning-card":{let s=i,l=s.onConfirm?a("warning-card","confirm",s.title,s,s.onConfirm):s.actionText&&r?.onCardEvent?a("warning-card","confirm",s.title,s):void 0;return e(hs,{...s,onClose:a("warning-card","close",s.title,s,s.onClose),onConfirm:l})}case "suggestions-card":{let s=i;return e(fs,{...s,onClose:a("suggestions-card","close",s.title,s,s.onClose),onSuggestionClick:a("suggestions-card","suggestion-click",s.title,s,s.onSuggestionClick,l=>({suggestion:l}))})}case "tool-result-card":{let s=i;return e(bs,{...s,onClose:a("tool-result-card","close",s.title,s,s.onClose),onAction:a("tool-result-card","action",s.title,s,s.onAction)})}}return e("div",{className:"dynamic-card-fallback",children:e(Dn,{content:t,enableCodeHighlight:true,enableMath:true,enableMermaid:true,messageId:o,cardHooks:r})})},Zm=bx;M();var sc=class{static analyze(o){if(!o.trim())return {blocks:[],hasComplexContent:false,overallType:"simple"};let n=/```json\s*\{\s*"type":\s*"[^"]+"/g.test(o),a=/<[^>]+>[\s\S]*?<\/[^>]+>/.test(o),i=o.includes("NQ#")||o.includes("data-component");return n||a||i?{blocks:[{type:"mixed",content:o,startIndex:0,endIndex:o.length}],hasComplexContent:true,overallType:"complex"}:{blocks:[{type:"markdown",content:o,startIndex:0,endIndex:o.length}],hasComplexContent:false,overallType:"simple"}}},yx=({content:t,className:o="",messageId:r,cardHooks:n})=>{let a=to__namespace.default.useMemo(()=>sc.analyze(t),[t]);return e("div",{className:`universal-content-renderer ${o}`,children:a.blocks.map((i,s)=>i.type==="mixed"||i.type==="json-card"?e(Zm,{content:i.content,messageId:r,cardHooks:n},`block-${s}`):e(Dn,{content:i.content,enableCodeHighlight:true,enableMath:true,enableMermaid:true,messageId:r,cardHooks:n},`block-${s}`))})},Rs=yx;M();var Cx=({content:t,isStreaming:o=true,onComplete:r,className:n="",streamIntervalMs:a=24,streamChunkSize:i=3,messageId:s,cardHooks:l})=>{let[d,p]=to.useState(o?0:t.length),[m,h]=to.useState(!o);to.useEffect(()=>{if(o){p(0),h(false);return}p(t.length),h(true);},[t,o]),to.useEffect(()=>{if(!o||m)return;if(d>=t.length){h(true),r?.();return}let g=window.setTimeout(()=>{p(x=>Math.min(x+i,t.length));},a);return ()=>{window.clearTimeout(g);}},[t.length,m,o,r,i,a,d]);let f=()=>{o&&!m&&(p(t.length),h(true),r?.());},u=o?t.slice(0,d):t,b=o&&!m,y=o&&!m;return c("div",{className:`streaming-markdown ${n}`,onClick:f,style:{cursor:o?"pointer":"default"},children:[c("div",{className:"relative",children:[e(Rs,{content:u,messageId:s,cardHooks:l}),b&&e("span",{className:"inline-block w-[2px] h-[13px] ml-0.5 animate-pulse",style:{verticalAlign:"text-bottom",backgroundColor:"var(--orb-primary, #154194)"}})]}),y&&e("div",{className:"streaming-hint",style:{fontSize:"9px",color:"var(--orb-muted)",marginTop:"8px",fontStyle:"italic",opacity:.7},children:"\u70B9\u51FB\u6B64\u5904\u663E\u793A\u5B8C\u6574\u5185\u5BB9"})]})},Qm=Cx;M();var Jm=({buttons:t,className:o})=>{let r=n=>{switch(n){case "copy":return e(Lo,{size:14});case "refresh":return e(qa,{size:14});case "volume":return e(fd,{size:14});case "like":return e(ud,{size:14});case "dislike":return e(pd,{size:14});default:return null}};return e("div",{className:rt("flex items-center gap-1",o),children:t.map((n,a)=>e("button",{onClick:n.onClick,disabled:n.disabled,"aria-busy":n.loading||void 0,className:rt("p-1.5 rounded-md transition-colors","text-[var(--orb-muted)] hover:text-[var(--orb-fg)] dark:text-[var(--orb-muted)] dark:hover:text-[var(--orb-fg)]","hover:bg-[var(--orb-hover)]","disabled:opacity-50 disabled:cursor-not-allowed",n.active&&"text-[var(--orb-primary)] bg-[var(--orb-p50)]",n.type==="refresh"&&n.loading&&"animate-spin"),title:n.type,type:"button",children:r(n.type)},`${n.type}-${a}`))})};M();var Ns=({message:t,onStreamingComplete:o,assistantActions:r,streamIntervalMs:n,streamChunkSize:a,cardHooks:i})=>{let s={lineHeight:1.55,fontSize:13,fontWeight:300,fontFamily:'var(--orb-font, "Montserrat", system-ui, sans-serif)',color:"var(--orb-fg, #555555)",borderRadius:"var(--orb-r, 10px)",padding:"10px 14px"},l={marginTop:6,fontSize:11,color:"var(--orb-muted, #8c8c8c)"};if(t.type==="assistant"){let d=!!(r?.isResponding||t.isStreaming);return e("div",{className:"mb-4 flex justify-start",children:c("div",{className:"mr-auto w-full",style:{...s,background:"var(--orb-surface, #f5f5f5)",border:"1px solid var(--orb-border, #dbdbdb)"},children:[e(Qm,{content:t.content,isStreaming:t.isStreaming??false,onComplete:o,streamIntervalMs:n,streamChunkSize:a,messageId:t.id,cardHooks:i}),t.content&&r?.isLatestAssistant&&e("div",{className:"mt-3 flex flex-row justify-start gap-2 border-t pt-2",style:{borderColor:"var(--orb-border, #dbdbdb)"},children:e(Jm,{buttons:[{type:"refresh",onClick:()=>{r?.onRegenerate?.();},disabled:d||!r?.onRegenerate,loading:d},{type:"copy",onClick:()=>navigator.clipboard.writeText(t.content),disabled:false},{type:"volume",onClick:()=>console.log("\u8BED\u97F3\u64AD\u653E"),disabled:false},{type:"like",onClick:()=>console.log("\u70B9\u8D5E"),disabled:false},{type:"dislike",onClick:()=>console.log("\u70B9\u8E29"),disabled:false}],size:"sm",variant:"default"})}),e("div",{style:l,children:t.timestamp.toLocaleTimeString()})]})})}return e("div",{className:"mb-4 flex justify-end",children:c("div",{className:"ml-auto max-w-[80%]",style:{...s,background:"var(--orb-p50, #eef2f9)",border:"1px solid var(--orb-p100, #e4e9f5)"},children:[e("div",{className:"whitespace-pre-wrap",children:t.content}),e("div",{style:l,children:t.timestamp.toLocaleTimeString()})]})})};M();var eg=({onTextUpdate:t,onComplete:o,onCancel:r,disabled:n,className:a})=>{let{isRecording:i,startRecording:s,stopRecording:l}=Sn({onTextUpdate:t,onComplete:p=>{o?.(p);},onError:p=>{console.error("Voice input error:",p),r?.();}});return e("button",{onClick:async()=>{i?l():await s();},disabled:n,className:rt("transition-all duration-200 flex items-center justify-center rounded-full",i?"bg-[color-mix(in_oklch,var(--orb-status-error)_12%,transparent)] text-[var(--orb-status-error)] hover:bg-[color-mix(in_oklch,var(--orb-status-error)_20%,transparent)] animate-pulse":"bg-transparent hover:bg-[var(--orb-hover)] text-[var(--orb-muted)] active:scale-95",n&&"opacity-50 cursor-not-allowed",a),title:i?"Stop recording":"Start recording",type:"button",children:i?e(Cp,{size:16}):e(xp,{size:16})})};M();var Dt={container:"w-full max-w-4xl mx-auto",inputContainer:rt("w-full flex flex-col border border-[var(--orb-border,#dbdbdb)] bg-[color-mix(in_oklch,var(--orb-canvas)_64%,transparent)] backdrop-blur-[28px] transition-colors duration-200","orb-agent-input","focus-within:border-[var(--orb-primary,#154194)] focus-within:ring-1 focus-within:ring-[var(--orb-focus-ring,#e4e9f5)]"),dragActive:"border-[var(--orb-primary,#154194)] bg-[var(--orb-p50,#eef2f9)]",textareaWrapper:"flex-1 relative flex items-center",textarea:rt("w-full outline-none appearance-none resize-none bg-transparent border-none text-sm font-normal py-3 px-3","placeholder:text-[var(--orb-muted,#8c8c8c)] placeholder:font-normal","text-[var(--orb-fg,#555555)] selection:bg-[var(--orb-p100,#e4e9f5)]","focus:ring-0 focus:outline-none focus:border-none focus:shadow-none","min-h-[44px] max-h-[12em] overflow-y-auto scrollbar-thin scrollbar-thumb-[var(--orb-border)]"),filePreviewArea:"px-4 pt-3 pb-1 flex flex-wrap gap-2",queueArea:"px-4 pt-3 flex flex-col gap-2",queueCard:rt("flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-2 rounded-lg","bg-[var(--orb-p50,#eef2f9)] border border-[var(--orb-p100,#dbdbdb)]","text-xs text-[var(--orb-fg,#555555)]"),queueContent:"min-w-0 flex-1 truncate font-medium",queueHint:"text-[var(--orb-muted,#8c8c8c)]",queueButton:rt("shrink-0 px-2 py-1 rounded-md text-xs font-semibold cursor-pointer active:scale-95","text-[var(--orb-primary,#154194)] hover:bg-[var(--orb-p50,#eef2f9)]"),queueCancelButton:rt("shrink-0 flex items-center justify-center h-5 w-5 rounded-full cursor-pointer","text-[var(--orb-muted,#8c8c8c)] hover:text-[var(--orb-fg,#555555)] hover:bg-[var(--orb-hover,#eef2f9)]"),fileTag:rt("flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs font-medium","bg-[var(--orb-surface,#f5f5f5)] text-[var(--orb-fg,#555555)]","border border-[var(--orb-border,#dbdbdb)]","transition-all hover:bg-[var(--orb-hover,#eef2f9)]"),buttonBase:"flex items-center justify-center transition-all duration-200 rounded-full",buttonSmall:"h-[38px] w-[38px] shrink-0 md:h-8 md:w-8",buttonNormal:rt("bg-transparent hover:bg-[var(--orb-hover,#eef2f9)] text-[var(--orb-muted,#8c8c8c)] hover:text-[var(--orb-fg,#555555)]","cursor-pointer active:scale-95"),sendButton:rt("cursor-pointer bg-[var(--orb-primary,#154194)] hover:bg-[var(--orb-p600,#0e2d63)] text-[var(--orb-on-primary)] shadow-none active:scale-95"),sendButtonDisabled:rt("cursor-not-allowed opacity-40 bg-[var(--orb-disabled-bg,#f5f5f5)] text-[var(--orb-disabled-fg,#8c8c8c)]"),stopButton:rt("cursor-pointer bg-[var(--orb-err,#c43f02)] hover:opacity-90 text-[var(--orb-on-primary)] shadow-none active:scale-95"),stopSecondary:rt("cursor-pointer border border-[var(--orb-border,#dbdbdb)] text-[var(--orb-muted,#8c8c8c)]","hover:border-[var(--orb-err,#c43f02)] hover:text-[var(--orb-err,#c43f02)] active:scale-95")},wx={padding:0,lineHeight:"1.5",border:"none !important",boxShadow:"none !important",backgroundColor:"transparent",height:"auto",fontFeatureSettings:'"liga" 1, "kern" 1',WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},Sx=({enabled:t,onClick:o})=>{let{t:r}=de();return e("button",{className:rt(Dt.buttonBase,Dt.buttonSmall,Dt.buttonNormal),onClick:o,disabled:!t,"aria-label":r("omph.input.upload"),type:"button",children:e(ep,{size:16})})},kx=({canSend:t,isResponding:o,onSend:r,onStop:n})=>{let{t:a}=de();return o&&!t?e("button",{className:rt(Dt.buttonBase,Dt.buttonSmall,Dt.stopButton),onClick:n,"aria-label":a("omph.input.stop"),type:"button",children:e(Cl,{size:15})}):c(jsxRuntime.Fragment,{children:[o&&e("button",{className:rt(Dt.buttonBase,Dt.buttonSmall,Dt.stopSecondary),onClick:n,"aria-label":a("omph.input.stop"),type:"button",children:e(Cl,{size:14})}),e("button",{className:rt(Dt.buttonBase,Dt.buttonSmall,t?Dt.sendButton:Dt.sendButtonDisabled),onClick:r,disabled:!t,"aria-label":a("omph.input.send"),type:"button",children:e(Pp,{size:16,className:t?"text-[var(--orb-on-primary,#ffffff)]":"text-[var(--orb-disabled-fg,#8c8c8c)]"})})]})},Pa=({onSend:t,onStop:o,isResponding:r=false,placeholder:n,getText:a})=>{let[i,s]=to.useState(""),[l,d]=to.useState([]),[p,m]=to.useState(false),[h,f]=to.useState(false),[u,b]=to.useState([]),y=to.useRef(null),g=to.useRef(0),{t:x}=de(),v=x("omph.input.placeholder"),C=v!=="omph.input.placeholder"?v:"Type a message...",P=n||(a?a("00019",C):C),S=i.trim().length>0||l.length>0,I={enabled:true},R=to.useCallback(j=>{s(j.target.value),j.target.style.height="auto",j.target.style.height=`${Math.min(j.target.scrollHeight,200)}px`;},[]),w=to.useCallback(j=>{if(j.target.files&&j.target.files.length>0){let te=Array.from(j.target.files);d(ce=>{let fe=te.filter(ve=>ce.some(xe=>xe.name===ve.name&&xe.size===ve.size));fe.length>0&&console.warn("Duplicate files ignored:",fe.map(ve=>ve.name));let Ve=te.filter(ve=>!ce.some(xe=>xe.name===ve.name&&xe.size===ve.size));return [...ce,...Ve]}),y.current&&(y.current.value="");}},[]),A=to.useCallback(j=>{d(te=>te.filter((ce,fe)=>fe!==j));},[]),D=to.useCallback(()=>{y.current?.click();},[]),T=to.useCallback(async()=>{if(!S)return;let j=i,te=[...l];if(r){g.current+=1,b(ce=>[...ce,{id:g.current,content:j,files:te,confirmed:false}]),s(""),d([]),y.current&&(y.current.value="");return}s(""),d([]),y.current&&(y.current.value="");try{await t(j,te);}catch(ce){console.error("Failed to send message:",ce),s(j),d(te);}},[i,S,r,t,l]),k=to.useCallback(j=>{let te=u.find(ce=>ce.id===j);te&&(b(ce=>ce.filter(fe=>fe.id!==j)),t(te.content,te.files).catch(()=>s(te.content)));},[u,t]),E=to.useCallback(j=>{b(te=>te.map(ce=>ce.id===j?{...ce,confirmed:true}:ce));},[]),O=to.useCallback(j=>{b(te=>te.filter(ce=>ce.id!==j));},[]);to.useEffect(()=>{if(r||u.length===0)return;let j=u;b([]),(async()=>{for(let te of j)try{await t(te.content,te.files);}catch(ce){console.error("Failed to send queued message:",ce),s(te.content);}})();},[r,u,t]);let $=to.useCallback(()=>{b([]),o();},[o]),ee=to.useCallback(j=>{j.key==="Enter"&&!j.shiftKey&&!p&&(j.preventDefault(),T());},[T,p]),F=to.useCallback(()=>{m(true);},[]),G=to.useCallback(()=>{m(false);},[]),W=to.useCallback(j=>{s(j);},[]),Q=to.useCallback(j=>{s(j);},[]),z=to.useCallback(()=>{},[]),H=to.useCallback(j=>{j.preventDefault(),f(true);},[]),X=to.useCallback(j=>{j.preventDefault(),f(false);},[]),Y=to.useCallback(j=>{if(j.preventDefault(),f(false),j.dataTransfer.files&&j.dataTransfer.files.length>0){let te=Array.from(j.dataTransfer.files);d(ce=>[...ce,...te]);}},[]);return e("div",{className:Dt.container,children:c("div",{className:"relative",children:[e("input",{type:"file",multiple:true,className:"hidden",ref:y,onChange:w}),c("div",{className:rt(Dt.inputContainer,h&&Dt.dragActive),onDragOver:H,onDragLeave:X,onDrop:Y,children:[u.length>0&&e("div",{className:Dt.queueArea,children:u.map(j=>c("div",{className:Dt.queueCard,"data-omph-queue":j.id,children:[e("span",{className:Dt.queueContent,title:j.content,children:j.content}),j.confirmed?e("span",{className:Dt.queueHint,children:x("omph.input.queue.queued")}):e("span",{className:Dt.queueHint,children:x("omph.input.queue.ask")}),e("button",{className:Dt.queueButton,onClick:()=>k(j.id),type:"button",children:x("omph.input.queue.sendNow")}),!j.confirmed&&e("button",{className:Dt.queueButton,onClick:()=>E(j.id),type:"button",children:x("omph.input.queue.afterTurn")}),e("button",{className:Dt.queueCancelButton,onClick:()=>O(j.id),"aria-label":x("omph.input.queue.cancel"),type:"button",children:e(yl,{sx:{fontSize:14}})})]},j.id))}),l.length>0&&e("div",{className:Dt.filePreviewArea,children:l.map((j,te)=>c("div",{className:Dt.fileTag,children:[e(hp,{sx:{fontSize:16},className:"text-[var(--orb-primary)]"}),e("span",{className:"truncate max-w-[150px]",children:j.name}),e("button",{onClick:()=>A(te),className:"ml-1 hover:text-[var(--orb-status-error)] focus:outline-none",type:"button",children:e(yl,{sx:{fontSize:16}})})]},`${j.name}-${te}`))}),c("div",{className:"flex w-full flex-col p-2",children:[e("div",{className:rt(Dt.textareaWrapper,"min-h-[52px] px-2 pb-2 pt-1.5 md:min-h-[44px]"),children:e("textarea",{className:rt(Dt.textarea,"min-h-[24px] py-0 px-0"),placeholder:P,value:i,onChange:R,onKeyDown:ee,onCompositionStart:F,onCompositionEnd:G,style:wx,"aria-label":x("omph.input.message"),spellCheck:false,rows:1})}),c("div",{className:"flex items-center justify-between px-1 pb-0.5",children:[e("div",{className:"flex items-center gap-1",role:"toolbar","aria-label":x("omph.input.tools"),children:e(Sx,{enabled:I.enabled,onClick:D})}),c("div",{className:"flex items-center gap-1",children:[e(eg,{onTextUpdate:W,onComplete:Q,onCancel:z,disabled:r,className:Dt.buttonSmall}),e(kx,{canSend:S,isResponding:r,onSend:T,onStop:$})]})]})]})]})]})})};M();var rg=({messages:t,onSend:o,onStop:r,onRegenerate:n,isResponding:a=false,className:i,placeholder:s,streamIntervalMs:l,streamChunkSize:d,onMessageStreamingComplete:p,cardHooks:m,showInput:h=true,statusLine:f})=>{let u=to.useRef(null),b=to.useRef(t.length);return to.useEffect(()=>{t.length>b.current&&u.current?.scrollIntoView({behavior:"smooth"}),b.current=t.length;},[t]),c("div",{className:rt("flex flex-col h-full w-full relative",i),children:[c("div",{className:"flex-1 overflow-y-auto px-4 py-4 space-y-6 scrollbar-thin scrollbar-thumb-[var(--orb-border)]",children:[t.map((y,g)=>{let x=y.type==="assistant"&&g===t.length-1,v=y.type==="assistant"?{isLatestAssistant:x,isResponding:a,onRegenerate:n?()=>n(y.id):void 0}:void 0;return e(Ns,{message:y,assistantActions:v,onStreamingComplete:()=>p?.(y.id),streamIntervalMs:l,streamChunkSize:d,cardHooks:m},y.id)}),f,e("div",{ref:u})]}),h&&e("div",{className:"border-t border-[var(--orb-border,#dbdbdb)] bg-[var(--orb-canvas,#ffffff)] p-4 z-10",children:e(Pa,{onSend:o||(async()=>{}),onStop:r||(()=>{}),isResponding:a,placeholder:s})})]})};M();var ng={idle:"Idle",running:"Working",success:"Success",error:"Error",pending:"Pending"},ag=({title:t="AI Agent",description:o,headerActions:r,className:n,agentStatus:a,statusText:i,onHeaderPointerDown:s,showInput:l=false,...d})=>{let p=a??(d.isResponding?"running":"idle"),m=p==="running"||p==="pending",h=[ng[p],o].filter(Boolean).join(" \xB7 ");return c("div",{className:rt("orb-agent-panel",n),children:[c("div",{className:rt("orb-agent-header",s&&"cursor-grab active:cursor-grabbing"),onPointerDown:s,children:[e("span",{className:"orb-agent-avatar","aria-hidden":"true",children:"AI"}),c("div",{className:"min-w-0 flex-1",children:[e("div",{className:"orb-agent-title",children:t}),c("div",{className:"orb-agent-subtitle",children:[e("span",{className:"orb-agent-dot","data-active":m||void 0}),e("span",{className:"truncate",children:h||"Agent"})]})]}),r&&e("div",{className:"ml-auto flex flex-none items-center gap-1",children:r})]}),e("div",{className:"relative min-h-0 flex-1",children:e(rg,{...d,showInput:l,statusLine:m?c("div",{className:rt("orb-agent-status-line","mb-1"),children:[e("span",{className:"orb-agent-spinner","aria-hidden":"true"}),e("span",{children:i??`${ng[p]}\u2026`})]}):void 0})})]})};M();var Mx=t=>Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(t),Ds=({conversations:t,activeConversationId:o,labels:r,onNewConversation:n,onSelectConversation:a})=>{let[i,s]=to.useState(false),l=to.useRef(null),d=to.useRef(null),p=to.useRef(null),m=to.useId(),h=!!a;to.useEffect(()=>{if(!i)return;let u=y=>{l.current?.contains(y.target)||s(false);},b=y=>{y.key==="Escape"&&(y.stopPropagation(),s(false),p.current?.focus());};return document.addEventListener("pointerdown",u),document.addEventListener("keydown",b),()=>{document.removeEventListener("pointerdown",u),document.removeEventListener("keydown",b);}},[i]),to.useEffect(()=>{if(!i)return;let u=d.current?.querySelector('[aria-selected="true"]'),b=d.current?.querySelector('[role="option"]');(u??b)?.focus();},[i]);let f=u=>{let b=Array.from(d.current?.querySelectorAll('[role="option"]')??[]);if(b.length===0)return;let y=b.findIndex(x=>x===document.activeElement),g=y<0?u===1?0:b.length-1:(y+u+b.length)%b.length;b[g]?.focus();};return !n&&!h?null:c(jsxRuntime.Fragment,{children:[n&&e("button",{type:"button",className:"orb-omph-icon-btn","aria-label":r.newConversation,onClick:()=>{s(false),n();},children:e(tn,{size:16})}),h&&a&&c("div",{className:"orb-omph-conversation-anchor",ref:l,children:[e("button",{ref:p,type:"button",className:"orb-omph-icon-btn","aria-label":r.conversationList,"aria-expanded":i,"aria-controls":m,onClick:()=>s(u=>!u),children:e(nd,{size:16})}),i&&e("div",{ref:d,id:m,className:"orb-omph-conversations",role:"listbox","aria-label":r.conversations,onKeyDown:u=>{u.key==="ArrowDown"?(u.preventDefault(),f(1)):u.key==="ArrowUp"&&(u.preventDefault(),f(-1));},children:t.length===0?e("p",{className:"orb-omph-conversation-empty",children:r.noConversations}):t.map(u=>{let b=u.updatedAt?Mx(u.updatedAt):"",y=[u.preview,b].filter(x=>x&&x.length>0).join(" \xB7 "),g=u.id===o;return c("button",{type:"button",role:"option",className:"orb-omph-conversation","aria-selected":g,"data-active":g||void 0,onClick:()=>{a(u.id),s(false);},children:[e("span",{className:"orb-omph-conversation-title",children:u.title}),y&&e("span",{className:"orb-omph-conversation-meta",children:y})]},u.id)})})]})]})};var Rx=t=>{let o=0;for(let r=0;r<t.length;r+=1){let n=t.charCodeAt(r);if(n<65||n>90)break;o=o*26+(n-64);}return o-1},Nx=/^\$?([A-Za-z]+)\$?\d+$/,sg=t=>{let o=[];return t.querySelectorAll("t").forEach(r=>o.push(r.textContent??"")),o.join("")},As=t=>new DOMParser().parseFromString(t,"application/xml"),Dx="http://schemas.openxmlformats.org/officeDocument/2006/relationships",lg=async t=>{let{default:o}=await import('jszip'),r=await o.loadAsync(t),n=[],a=r.file("xl/sharedStrings.xml");a&&As(await a.async("string")).querySelectorAll("si").forEach(u=>n.push(sg(u)));let i=r.file("xl/workbook.xml");if(!i)throw new Error("Not an xlsx workbook");let s=As(await i.async("string")),l=new Map,d=r.file("xl/_rels/workbook.xml.rels");d&&As(await d.async("string")).querySelectorAll("Relationship").forEach(u=>{let b=u.getAttribute("Id"),y=u.getAttribute("Target");b&&y&&l.set(b,y.startsWith("xl/")?y:`xl/${y.replace(/^\//,"")}`);});let p=2e5,m=[],h=Array.from(s.querySelectorAll("sheet"));for(let f of h){let u=f.getAttribute("name")??`Sheet${m.length+1}`,b=f.getAttributeNS(Dx,"id"),y=b&&l.get(b)||`xl/worksheets/sheet${m.length+1}.xml`,g=r.file(y);if(!g)continue;let x=As(await g.async("string")),v=[],C=false;for(x.querySelectorAll("row").forEach(P=>{if(v.length>=5e3||p<=0){C=true;return}let S=[];P.querySelectorAll("c").forEach(I=>{if(p<=0)return;let R=I.getAttribute("r")??"",w=Nx.exec(R),A=w?Rx(w[1].toUpperCase()):S.length;if(A<0)return;let D=I.getAttribute("t"),T="";if(D==="inlineStr"){let k=I.querySelector("is");T=k?sg(k):"";}else {let k=I.querySelector("v")?.textContent??"";D==="s"?T=n[Number(k)]??"":D==="b"?T=k==="1"?"TRUE":"FALSE":T=k;}T!==""&&(S[A]=T,p-=1);}),v.push(Array.from(S,I=>I??""));});v.length>0&&v[v.length-1].every(P=>P==="");)v.pop();m.push({name:u,rows:v,truncated:C});}if(m.length===0)throw new Error("No worksheets found");return m},cg=t=>t.map(o=>{let r=[...o];for(;r.length>0&&r[r.length-1]==="";)r.pop();return r.join(" ")}).join(`
|
|
200
|
+
`);M();var Ox=2e3,Fx=1/3,Es=[.25,.5,.75,1,1.5,2,3,4],Bx=100,Hx=500,zx=100,Vx=9,Wx=1e3,dg=14,pg={color:"inherit",background:"transparent",textShadow:"none",fontFamily:"inherit",fontSize:"inherit",lineHeight:"inherit",textAlign:"left",wordSpacing:"normal",wordBreak:"normal",overflowWrap:"normal",tabSize:"inherit",hyphens:"none"},mg=({text:t,language:o,startLine:r,endLine:n,wrap:a,labels:i})=>{let s=to.useRef(null),l=to.useMemo(()=>{let m=t.split(`
|
|
201
|
+
`);m.length>1&&m[m.length-1]===""&&m.pop();let h=Math.min(m.length,Ox);return {shown:m.slice(0,h).join(`
|
|
202
|
+
`),shownCount:h,total:m.length}},[t]),d=to.useCallback(m=>{let h=n??r,f=r!==void 0&&h!==void 0&&m>=r&&m<=h;return {className:"orb-omph-code-line","data-line":m,...f?{"data-hit":"true"}:{}}},[n,r]);to.useEffect(()=>{let m=s.current,h=m?.closest(".orb-omph-pv-body");if(!m||!h)return;if(r===void 0){h.scrollTop=0;return}let f=m.querySelector(`[data-line="${r}"]`);if(!f)return;let u=f.getBoundingClientRect().top-h.getBoundingClientRect().top+h.scrollTop;h.scrollTop=Math.max(0,u-h.clientHeight*Fx);},[r,l.shown]);let p={"--orb-omph-digits":String(l.shownCount).length};return c("div",{ref:s,className:"orb-omph-code","data-wrap":a||void 0,style:p,children:[e(reactSyntaxHighlighter.Prism,{language:o,useInlineStyles:false,PreTag:"div",CodeTag:"div",showLineNumbers:true,wrapLines:true,lineProps:d,customStyle:pg,codeTagProps:{className:`language-${o}`,style:pg},children:l.shown}),l.total>l.shownCount&&e("div",{className:"orb-omph-pv-note",children:i.previewTruncated(l.shownCount,l.total)})]})},gg=({text:t})=>e("div",{className:"orb-omph-pv-doc",children:e(Dn,{content:t})}),hg=({url:t,alt:o,labels:r})=>{let[n,a]=to.useState("fit"),[i,s]=to.useState(null),[l,d]=to.useState(false),p=n==="fit"?1:n,m=Es.some(b=>b>p),h=Es.some(b=>b<p),f=b=>a(y=>{let g=y==="fit"?1:y;return (b>0?Es.find(v=>v>g):[...Es].reverse().find(v=>v<g))??y}),u=n==="fit"||i===null?{maxWidth:"100%",height:"auto"}:{width:i*n,maxWidth:"none",height:"auto"};return l?e("div",{className:"orb-omph-pv-note",role:"alert",children:o?`${r.imageFailed} \xB7 ${o}`:r.imageFailed}):c("div",{className:"orb-omph-img",children:[e("div",{className:"orb-omph-img-stage",children:e("img",{src:t,alt:o??"",draggable:false,style:u,onLoad:b=>s(b.currentTarget.naturalWidth),onError:()=>d(true)})}),c("div",{className:"orb-omph-img-zoom",role:"group","aria-label":r.zoomFit,children:[e("button",{type:"button","aria-label":r.zoomOut,disabled:!h,onClick:()=>f(-1),children:"\u2212"}),e("button",{type:"button","aria-label":r.zoomFit,"data-active":n==="fit"||void 0,onClick:()=>a("fit"),children:n==="fit"?r.zoomFit:`${Math.round(n*Bx)}%`}),e("button",{type:"button","aria-label":r.zoomIn,disabled:!m,onClick:()=>f(1),children:"+"})]})]})},$x=t=>{let o=t+1,r="";for(;o>0;){let n=(o-1)%26;r=String.fromCharCode(65+n)+r,o=Math.floor((o-1)/26);}return r},fg=({body:t,labels:o})=>{let[r,n]=to.useState({status:"parsing"}),[a,i]=to.useState(0),[s,l]=to.useState(false);to.useEffect(()=>{let h=false,f=new AbortController;return n({status:"parsing"}),(async()=>{if(t.bytes)return t.bytes;if(!t.url)throw new Error("Sheet body has neither bytes nor url");let b=await fetch(t.url,{signal:f.signal});if(!b.ok)throw new Error(`HTTP ${b.status}`);return b.arrayBuffer()})().then(b=>lg(b)).then(b=>{h||(i(0),n({status:"ready",sheets:b}));}).catch(b=>{h||b instanceof DOMException&&b.name==="AbortError"||n({status:"error",message:b instanceof Error?b.message:String(b)});}),()=>{h=true,f.abort();}},[t]),to.useEffect(()=>{if(!s)return;let h=window.setTimeout(()=>l(false),Wx);return ()=>window.clearTimeout(h)},[s]);let d=r.status==="ready"?r.sheets[Math.min(a,r.sheets.length-1)]:null,p=to.useMemo(()=>{if(!d)return null;let h=Math.min(d.rows.reduce((u,b)=>Math.max(u,b.length),0),zx),f=d.rows.slice(0,Hx);return {columnCount:h,shownRows:f}},[d]);if(r.status==="parsing")return e("div",{className:"orb-omph-pv-skel",role:"status","aria-label":o.previewLoading,children:Array.from({length:Vx},(h,f)=>e("span",{},f))});if(r.status==="error")return c("div",{className:"orb-omph-pv-note",role:"alert",children:[o.previewFailed," \xB7 ",r.message]});if(!d||!p)return null;let m=d.truncated||d.rows.length>p.shownRows.length;return c("div",{className:"orb-omph-sheet",children:[c("div",{className:"orb-omph-sheet-bar",children:[e("div",{className:"orb-omph-sheet-tabs",role:"tablist",children:r.sheets.map((h,f)=>e("button",{type:"button",role:"tab","aria-selected":f===a,"data-active":f===a||void 0,className:"orb-omph-sheet-tab",onClick:()=>i(f),children:h.name},h.name))}),e("button",{type:"button",className:"orb-omph-icon-button","aria-label":s?o.copied:o.previewCopyContent,title:s?o.copied:o.previewCopyContent,onClick:()=>{navigator.clipboard.writeText(cg(d.rows)).then(()=>l(true));},children:s?e(ko,{size:dg}):e(Lo,{size:dg})})]}),c("div",{className:"orb-omph-sheet-scroll",children:[c("table",{className:"orb-omph-sheet-grid",children:[e("thead",{children:c("tr",{children:[e("th",{className:"orb-omph-sheet-corner","aria-label":d.name}),Array.from({length:p.columnCount},(h,f)=>e("th",{scope:"col",children:$x(f)},f))]})}),e("tbody",{children:p.shownRows.map((h,f)=>c("tr",{children:[e("th",{scope:"row",children:f+1}),Array.from({length:p.columnCount},(u,b)=>e("td",{children:h[b]??""},b))]},f))})]}),d.rows.length===0&&e("div",{className:"orb-omph-pv-note",children:o.previewUnsupported}),m&&e("div",{className:"orb-omph-pv-note",children:o.previewSheetTruncated(p.shownRows.length,d.rows.length)})]})]})};var _x=/^[a-z][a-z0-9+.-]*:/i,Gx=/^L(\d+)(?:-L?(\d+))?$/i;var bg=["B","KB","MB","GB"];var Ux=t=>{try{return decodeURIComponent(t)}catch{return t}},dc=t=>{let o=t.trim();if(!o||o.startsWith("#")||o.startsWith("//")||_x.test(o))return null;let r=o.indexOf("#"),n=r>=0?o.slice(0,r):o,a=r>=0?o.slice(r+1):"",i=n.indexOf("?"),s=Ux(i>=0?n.slice(0,i):n);if(!s||s.endsWith("/"))return null;let l=Gx.exec(a);if(!l)return {path:s};let d=Number(l[1]);if(d<1)return {path:s};let p=l[2]?Number(l[2]):d;return {path:s,startLine:d,endLine:Math.max(d,p)}},Ls=t=>t.split("/").filter(Boolean).pop()??t,yg=t=>{let o=t.split("/");return o.pop(),o.join("/")},Os=t=>{let o=Ls(t),r=o.lastIndexOf(".");return r>0?o.slice(r+1).toLowerCase():""},Cg={prism:"text",label:"Text"},vg={ts:{prism:"typescript",label:"TypeScript"},tsx:{prism:"tsx",label:"TSX"},js:{prism:"javascript",label:"JavaScript"},mjs:{prism:"javascript",label:"JavaScript"},cjs:{prism:"javascript",label:"JavaScript"},jsx:{prism:"jsx",label:"JSX"},json:{prism:"json",label:"JSON"},py:{prism:"python",label:"Python"},java:{prism:"java",label:"Java"},go:{prism:"go",label:"Go"},rs:{prism:"rust",label:"Rust"},c:{prism:"c",label:"C"},h:{prism:"c",label:"C"},cpp:{prism:"cpp",label:"C++"},cs:{prism:"csharp",label:"C#"},sql:{prism:"sql",label:"SQL"},sh:{prism:"bash",label:"Shell"},bash:{prism:"bash",label:"Shell"},yml:{prism:"yaml",label:"YAML"},yaml:{prism:"yaml",label:"YAML"},xml:{prism:"markup",label:"XML"},html:{prism:"markup",label:"HTML"},css:{prism:"css",label:"CSS"},scss:{prism:"scss",label:"SCSS"},abap:{prism:"abap",label:"ABAP"},toml:{prism:"toml",label:"TOML"},ini:{prism:"ini",label:"INI"},md:{prism:"markdown",label:"Markdown"},csv:{prism:"text",label:"CSV"},log:{prism:"text",label:"Log"},txt:Cg},pc=(t,o)=>o?Object.values(vg).find(n=>n.prism===o)??{prism:o,label:o}:vg[Os(t)]??Cg,xg=t=>{let o=t,r=0;for(;o>=1024&&r<bg.length-1;)o/=1024,r+=1;return `${r>0&&o<10?o.toFixed(1):Math.round(o).toString()} ${bg[r]}`};M();var Kx=1e3,qx=9,Yo=16,Xx={markdown:"text/markdown;charset=utf-8",code:"text/plain;charset=utf-8"},Zx="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",Fs=(t,o)=>{let r=URL.createObjectURL(t),n=document.createElement("a");n.href=r,n.download=o,n.click(),window.setTimeout(()=>URL.revokeObjectURL(r),1e3);},uc=({tone:t,icon:o,title:r,text:n,action:a})=>c("div",{className:"orb-omph-pv-notice","data-tone":t,role:t==="error"?"alert":void 0,children:[e("span",{className:"orb-omph-pv-notice-icon","aria-hidden":"true",children:o}),e("div",{className:"orb-omph-pv-notice-title",children:r}),n&&e("p",{className:"orb-omph-pv-notice-text",children:n}),a]}),kg=({state:t,placement:o,expanded:r,canExpand:n,labels:a,gripProps:i,paneRef:s,onClose:l,onRetry:d,onToggleExpand:p,onOpenExternally:m})=>{let[h,f]=to.useState(true),[u,b]=to.useState(false),{open:y,ref:g,phase:x,data:v}=t,C=v?.body;to.useEffect(()=>{if(!u)return;let F=window.setTimeout(()=>b(false),Kx);return ()=>window.clearTimeout(F)},[u]),to.useEffect(()=>{y&&s.current?.focus({preventScroll:true});},[y,s,g?.path]);let P=v?.absolutePath??g?.path??"",S=C&&(C.kind==="markdown"||C.kind==="code")?C.text:P,I=S===P?a.previewCopyPath:a.previewCopyContent,R=C?.kind==="code"&&g?pc(g.path,C.language):null,w=!!(C&&(C.kind==="markdown"||C.kind==="code")&&C.previewOnly),A=!!(g&&C&&!w&&(C.kind==="markdown"||C.kind==="code"||C.kind==="image"||C.kind==="embed"||C.kind==="sheet")),D=()=>{if(!C||!g)return;let F=Ls(P);if(C.kind==="markdown"&&!/\.(md|markdown|txt)$/i.test(F)&&(F=`${F}.md`),C.kind==="markdown"||C.kind==="code"){Fs(new Blob([C.text],{type:Xx[C.kind]}),F);return}if(C.kind==="sheet"){if(C.fileName&&(F=C.fileName),/\.(xlsx|xlsm|xls|csv)$/i.test(F)||(F=`${F}.xlsx`),C.bytes){let G=C.bytes instanceof Uint8Array?C.bytes.slice().buffer:C.bytes;Fs(new Blob([G],{type:Zx}),F);return}C.url&&fetch(C.url).then(G=>{if(!G.ok)throw new Error(`HTTP ${G.status}`);return G.blob()}).then(G=>Fs(G,F)).catch(()=>window.open(C.url,"_blank","noopener"));return}(C.kind==="image"||C.kind==="embed")&&fetch(C.url).then(G=>{if(!G.ok)throw new Error(`HTTP ${G.status}`);return G.blob()}).then(G=>Fs(G,F)).catch(()=>window.open(C.url,"_blank","noopener"));},T=[];R&&T.push(R.label),C?.kind==="markdown"&&T.push("Markdown"),C?.kind==="image"&&g&&T.push(Os(g.path).toUpperCase()),C?.kind==="sheet"&&g&&T.push(Os(g.path).toUpperCase()||"XLSX"),v?.size!==void 0&&T.push(xg(v.size)),C?.kind==="code"&&g?.startLine!==void 0&&T.push(a.previewLines(g.startLine,g.endLine??g.startLine));let k=F=>{F.key==="Escape"&&(F.stopPropagation(),l(true));},E=e("button",{type:"button",className:"orb-omph-pv-action",onClick:d,children:a.previewRetry}),O=()=>{if(!g)return null;if(x==="loading")return e("div",{className:"orb-omph-pv-skel",role:"status","aria-label":a.previewLoading,children:Array.from({length:qx},(F,G)=>e("span",{},G))});if(x==="error"||!C)return e(uc,{tone:"error",icon:e(Fa,{size:Yo}),title:a.previewFailed,text:P,action:E});switch(C.kind){case "missing":return e(uc,{tone:"neutral",icon:e(Va,{size:Yo}),title:a.previewMissing,text:C.message??P});case "unsupported":return e(uc,{tone:"neutral",icon:e(Va,{size:Yo}),title:a.previewUnsupported,text:C.message??P,action:m&&e("button",{type:"button",className:"orb-omph-pv-action",onClick:()=>m(g),children:a.previewOpenExternal})});case "markdown":return e(gg,{text:C.text},g.path);case "code":return e(mg,{text:C.text,language:pc(g.path,C.language).prism,startLine:g.startLine,endLine:g.endLine,wrap:h,labels:a},g.path);case "image":return e(hg,{url:C.url,alt:C.alt,labels:a},C.url);case "sheet":return e(fg,{body:C,labels:a},g.path);case "embed":return e("iframe",{src:C.url,title:C.caption??a.previewTitle,className:"orb-omph-pv-embed"},C.url);default:return null}},$=o==="overlay",ee=C?.kind==="image"?Jc:Va;return c("aside",{ref:s,className:"orb-omph-preview","data-open":y||void 0,"data-placement":o,role:$?"dialog":"complementary","aria-label":a.previewTitle,"aria-hidden":!y||void 0,tabIndex:-1,onKeyDown:k,children:[!$&&y&&e("div",{className:"orb-omph-pv-grip","aria-label":a.previewResize,...i}),c("div",{className:"orb-omph-pv",children:[c("header",{className:"orb-omph-pv-head",children:[$&&e("button",{type:"button",className:"orb-omph-icon-button","aria-label":a.previewBack,onClick:()=>l(true),children:e(Ha,{size:Yo})}),e("span",{className:"orb-omph-pv-glyph","aria-hidden":"true",children:e(ee,{size:Yo})}),c("div",{className:"orb-omph-pv-titles",children:[e("div",{className:"orb-omph-pv-name",title:P,children:g?Ls(P):""}),e("div",{className:"orb-omph-pv-path",title:P,children:e("bdi",{children:yg(P)})})]}),c("div",{className:"orb-omph-pv-actions",children:[C?.kind==="code"&&e("button",{type:"button",className:"orb-omph-text-button","aria-pressed":h,onClick:()=>f(F=>!F),children:a.previewWrap}),A&&e("button",{type:"button",className:"orb-omph-icon-button","aria-label":a.previewDownload,title:a.previewDownload,onClick:D,children:e(Wn,{size:Yo})}),w&&g&&m&&e("button",{type:"button",className:"orb-omph-icon-button","aria-label":a.previewOpenExternal,title:a.previewOpenExternal,onClick:()=>m(g),children:e(Wn,{size:Yo})}),g&&e("button",{type:"button",className:"orb-omph-icon-button","aria-label":u?a.copied:I,title:u?a.copied:I,onClick:()=>{navigator.clipboard.writeText(S).then(()=>b(true));},children:u?e(ko,{size:Yo}):e(Lo,{size:Yo})}),n&&e("button",{type:"button",className:"orb-omph-icon-button","aria-pressed":r,"aria-label":r?a.previewCollapse:a.previewExpand,title:r?a.previewCollapse:a.previewExpand,onClick:p,children:e(Zc,{size:Yo})}),!$&&e("button",{type:"button",className:"orb-omph-icon-button","aria-label":a.previewClose,onClick:()=>l(true),children:e(Xt,{size:Yo})})]})]}),e("div",{className:"orb-omph-pv-meta",children:T.join(" \xB7 ")}),e("div",{className:"orb-omph-pv-body","data-kind":x==="ready"?C?.kind:void 0,children:O()})]})]})};M();var jx=1e3,Pg=50,Qx=1e3,Jx=t=>t==="tool"?on:t==="command"?Gn:ad,Ig=t=>!!t.streaming||t.status==="running"||t.status==="pending",e0=(t,o)=>o==="expanded"?true:Ig(t),t0=t=>t!==void 0&&(t.inputTokens!==void 0||t.outputTokens!==void 0||t.durationMs!==void 0),o0=(t,o)=>`${Math.max(1,Math.round(t/Qx))}${o.secondUnit}`,r0=({content:t})=>{let o=to.useRef(null),[r,n]=to.useState(false);return to.useEffect(()=>{let a=o.current;if(!a)return;let i=()=>n(a.scrollHeight>a.clientHeight+1);i();let s=new ResizeObserver(i);return s.observe(a),()=>s.disconnect()},[t]),e("div",{ref:o,className:"orb-omph-process-body","data-overflow":r||void 0,children:t})},n0=({turn:t,labels:o})=>{let[r,n]=to.useState(false),[a,i]=to.useState(false),s=t.assistant?.content??"",l=t.usage;return to.useEffect(()=>{if(!r)return;let d=window.setTimeout(()=>n(false),jx);return ()=>window.clearTimeout(d)},[r]),c("div",{className:"orb-omph-turn-actions",role:"group","aria-label":o.turnActions,children:[e("span",{className:"orb-omph-actions-time",children:t.assistant?.timestamp.toLocaleTimeString()}),t0(l)&&c(jsxRuntime.Fragment,{children:[e("span",{className:"orb-omph-actions-divider","aria-hidden":"true"}),e("button",{type:"button",className:"orb-omph-text-button","aria-expanded":a,onClick:()=>i(d=>!d),children:o.usage})]}),e("button",{type:"button",className:"orb-omph-icon-button orb-omph-actions-end","aria-label":r?o.copied:o.copy,onClick:()=>{navigator.clipboard.writeText(s).then(()=>n(true));},children:r?e(ko,{size:14}):e(Lo,{size:14})}),a&&l&&c("div",{className:"orb-omph-usage",children:[l.inputTokens!==void 0&&c("span",{children:[o.inputTokens," ",l.inputTokens.toLocaleString()]}),l.outputTokens!==void 0&&c("span",{children:[o.outputTokens," ",l.outputTokens.toLocaleString()]}),l.durationMs!==void 0&&c("span",{children:[o.duration," ",o0(l.durationMs,o)]})]})]})},a0=({item:t,display:o,open:r,onToggle:n})=>{let a=Jx(t.kind),i=Ig(t),s=o!=="compact"&&!!t.summary,l=r&&!!t.content;return c("div",{className:"orb-omph-process","data-status":t.status,"data-open":r||void 0,children:[c("button",{type:"button",className:"orb-omph-process-toggle","aria-expanded":r,onClick:n,children:[e(Vo,{size:12,className:"orb-omph-process-chevron"}),e(a,{size:14}),e("span",{className:i?"orb-omph-shimmer":void 0,children:t.title}),s&&e("span",{className:"orb-omph-process-summary",children:t.summary})]}),l&&t.content&&e(r0,{content:t.content}),r&&t.streaming&&e("span",{className:"orb-omph-caret","aria-hidden":"true"})]})},mc=t=>{let o=t.user?.content||t.assistant?.content||t.id,r=o.split(`
|
|
203
|
+
`).find(n=>n.trim())??o;return r.length>Pg?`${r.slice(0,Pg)}\u2026`:r},i0=0,Mg=({turns:t,labels:o,processDisplay:r,cardHooks:n,resolveFileLink:a,onOpenFile:i})=>{let[s,l]=to.useState({}),d=p=>{if(!i||p.defaultPrevented||p.button!==i0||p.metaKey||p.ctrlKey||p.shiftKey||p.altKey)return;let m=p.target.closest("a[href]");if(!m)return;let h=a(m.getAttribute("href")??"");h&&(p.preventDefault(),i(h,m));};return e(jsxRuntime.Fragment,{children:t.map((p,m)=>{let h=!!(p.assistant&&!p.assistant.streaming),u=m===t.length-1&&h?"always":"hover";return c("article",{className:"orb-omph-turn","data-omph-turn":p.id,"data-actions-reveal":u,children:[p.user&&c("div",{className:"orb-omph-user",children:[e("div",{className:"orb-omph-user-bubble","data-queued":p.user.queued||void 0,children:p.user.content}),c("div",{className:"orb-omph-user-meta",children:[p.user.queued&&e("span",{className:"orb-omph-user-queued",children:o.supplementQueued}),e("span",{className:"orb-omph-clock",children:p.user.timestamp.toLocaleTimeString()})]})]}),p.process&&p.process.length>0&&e("div",{className:"orb-omph-process-list",children:p.process.map(b=>{let y=b.id in s?s[b.id]:e0(b,r);return e(a0,{item:b,display:r,open:y,onToggle:()=>l(g=>({...g,[b.id]:!y}))},b.id)})}),p.assistant&&c("div",{className:"orb-omph-assistant","data-file-links":i?"true":void 0,onClick:d,children:[e(Rs,{content:p.assistant.content,messageId:p.assistant.id,cardHooks:n}),p.assistant.streaming&&e("span",{className:"orb-omph-caret","aria-hidden":"true"})]}),p.failure&&e("div",{className:"orb-omph-failure","data-severity":p.failure.severity,children:p.failure.content}),h&&e(n0,{turn:p,labels:o})]},p.id)})})};var Ta=t=>({idle:t("omph.status.idle"),pending:t("omph.status.pending"),running:t("omph.status.running"),success:t("omph.status.success"),error:t("omph.status.error"),working:t("omph.working"),workingFor:o=>t("omph.workingFor",{duration:o}),loadOlder:t("omph.loadOlder"),loadingOlder:t("omph.loadingOlder"),toBottom:t("omph.toBottom"),copy:t("omph.copy"),copied:t("omph.copied"),turnActions:t("omph.turnActions"),usage:t("omph.usage"),inputTokens:t("omph.inputTokens"),outputTokens:t("omph.outputTokens"),duration:t("omph.duration"),send:t("omph.send"),stop:t("omph.stop"),supplementQueued:t("omph.supplement.queued"),turnRail:t("omph.turnRail"),secondUnit:t("omph.secondUnit"),minuteUnit:t("omph.minuteUnit"),previewTitle:t("omph.preview.title"),previewClose:t("omph.preview.close"),previewBack:t("omph.preview.back"),previewExpand:t("omph.preview.expand"),previewCollapse:t("omph.preview.collapse"),previewCopyContent:t("omph.preview.copyContent"),previewCopyPath:t("omph.preview.copyPath"),previewDownload:t("omph.preview.download"),previewOpenExternal:t("omph.preview.openExternal"),previewWrap:t("omph.preview.wrap"),previewLoading:t("omph.preview.loading"),previewMissing:t("omph.preview.missing"),previewFailed:t("omph.preview.failed"),previewUnsupported:t("omph.preview.unsupported"),previewRetry:t("omph.preview.retry"),previewResize:t("omph.preview.resize"),previewLines:(o,r)=>t(o===r?"omph.preview.line":"omph.preview.lines",{start:o,end:r}),previewTruncated:(o,r)=>t("omph.preview.truncated",{shown:o,total:r}),previewSheetTruncated:(o,r)=>t("omph.preview.sheetTruncated",{shown:o,total:r}),imageFailed:t("omph.preview.imageFailed"),zoomIn:t("omph.preview.zoomIn"),zoomOut:t("omph.preview.zoomOut"),zoomFit:t("omph.preview.zoomFit"),newConversation:t("omph.newConversation"),conversationList:t("omph.conversationList"),conversations:t("omph.conversations"),noConversations:t("omph.noConversations")}),gc=t=>({waiting:t("omph.approval.waiting"),choose:t("omph.approval.choose"),details:t("omph.approval.details"),choices:t("omph.approval.choices"),reject:t("omph.approval.reject"),allowOnce:t("omph.approval.allowOnce"),confirm:t("omph.approval.confirm"),other:t("omph.approval.other"),otherPlaceholder:t("omph.approval.otherPlaceholder"),recommended:t("omph.approval.recommended"),allowOnceException:t("omph.approval.allowOnceException"),allowSession:t("omph.approval.allowSession"),abandon:t("omph.approval.abandon"),escalation:o=>t("omph.approval.escalation",{toolName:o})});var s0=1e3,Rg=60,l0=1e3,Ng=(t,o)=>{let r=Math.max(1,Math.round(Math.max(t,l0)/s0)),n=Math.floor(r/Rg),a=r%Rg;return n<=0?`${r}${o.secondUnit}`:`${n}${o.minuteUnit} ${a}${o.secondUnit}`};var p0={open:false,ref:null,phase:"loading",data:null},Dg=t=>{let[o,r]=to.useState(p0),n=to.useRef(o);n.current=o;let a=to.useRef(t);a.current=t;let i=to.useRef(null),s=to.useRef(0),l=to.useRef(null),d=to.useCallback(f=>{let u=a.current;if(!u)return;i.current?.abort();let b=new AbortController;i.current=b,s.current+=1;let y=s.current;r({open:true,ref:f,phase:"loading",data:null}),u(f,b.signal).then(g=>{y===s.current&&r(x=>({...x,phase:"ready",data:g}));},()=>{y!==s.current||b.signal.aborted||r(g=>({...g,phase:"error",data:null}));});},[]),p=to.useCallback((f,u)=>{l.current=u??null;let b=n.current;if(b.ref?.path===f.path&&b.phase==="ready"){r({...b,open:true,ref:f});return}d(f);},[d]),m=to.useCallback((f=false)=>{s.current+=1,i.current?.abort(),r(b=>({...b,open:false}));let u=l.current;f&&u?.isConnected&&u.focus({preventScroll:true});},[]),h=to.useCallback(()=>{let{ref:f}=n.current;f&&d(f);},[d]);return to.useEffect(()=>()=>{i.current?.abort();},[]),{state:o,open:p,close:m,reload:h}};var fc="--orb-omph-pv-w",bc="--orb-omph-pv-pref",g0=880,h0=560,Eg=400,Ur=320,f0=.45,b0=.7,Lg=24,hc=(t,o,r)=>Math.min(Math.max(t,o),Math.max(o,r)),Og=({open:t,layout:o})=>{let r=to.useRef(null),n=to.useRef(null),[a,i]=to.useState(0),[s,l]=to.useState(null),[d,p]=to.useState(false),[m,h]=to.useState(false);to.useLayoutEffect(()=>{let I=r.current;if(!I)return;let R=()=>i(I.getBoundingClientRect().width);R();let w=new ResizeObserver(R);return w.observe(I),()=>w.disconnect()},[]),to.useEffect(()=>{t||p(false);},[t]);let f=o==="overlay"?false:o==="split"?a>=Eg+Ur:a>=g0,u=f&&!d?"split":"overlay",b=Math.max(Ur,Math.min(a*b0,a-Eg)),y=hc(s??a*f0,Ur,b),g=a>0&&a<h0,x=to.useCallback(I=>{let R=r.current;R&&(R.style.setProperty(bc,`${I}px`),R.dataset.placement==="split"&&R.dataset.open==="true"&&R.style.setProperty(fc,`${I}px`));},[]),v=to.useCallback(I=>{I.button===0&&(I.preventDefault(),I.currentTarget.setPointerCapture(I.pointerId),n.current={pointerId:I.pointerId,startX:I.clientX,startWidth:y,latest:y},h(true));},[y]),C=to.useCallback(I=>{let R=n.current;!R||R.pointerId!==I.pointerId||(R.latest=hc(R.startWidth+(R.startX-I.clientX),Ur,b),x(R.latest));},[b,x]),P=to.useCallback(I=>{let R=n.current;!R||R.pointerId!==I.pointerId||(n.current=null,I.currentTarget.hasPointerCapture(I.pointerId)&&I.currentTarget.releasePointerCapture(I.pointerId),l(R.latest),h(false));},[]),S=to.useCallback(I=>{let R={ArrowLeft:y+Lg,ArrowRight:y-Lg,Home:Ur,End:b};I.key in R&&(I.preventDefault(),l(hc(R[I.key],Ur,b)));},[b,y]);return {mainRef:r,placement:u,width:y,compact:g,dragging:m,expanded:d,canExpand:f,toggleExpanded:()=>p(I=>!I),gripProps:{role:"separator","aria-orientation":"vertical","aria-valuemin":Ur,"aria-valuemax":Math.round(b),"aria-valuenow":Math.round(y),tabIndex:0,onPointerDown:v,onPointerMove:C,onPointerUp:P,onPointerCancel:P,onKeyDown:S}}};var Vs=48,y0=900,Bg=()=>typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,Hg=({turns:t,contentVersion:o,hasOlder:r=false,loadingOlder:n=false,onLoadOlder:a})=>{let i=to.useRef(null),s=to.useRef(null),l=to.useRef(true),d=to.useRef({height:0,top:0}),p=to.useRef(void 0),m=to.useRef(false),[h,f]=to.useState(true),[u,b]=to.useState(false),[y,g]=to.useState(t[0]?.id),x=to.useCallback(()=>{let I=i.current;I&&(d.current={height:I.scrollHeight,top:I.scrollTop});},[]),v=to.useCallback(()=>{let I=i.current;if(!I)return;let R=I.getBoundingClientRect().top,w=I.querySelector("[data-omph-turn]")?.dataset.omphTurn;I.querySelectorAll("[data-omph-turn]").forEach(A=>{A.getBoundingClientRect().top-R<=Vs&&(w=A.dataset.omphTurn);}),g(w);},[]);to.useEffect(()=>{let I=i.current,R=s.current;if(!I||!R)return;let w=()=>{b(I.clientWidth>y0),l.current&&(I.scrollTop=I.scrollHeight),x();};w();let A=new ResizeObserver(w);return A.observe(I),A.observe(R),()=>A.disconnect()},[x]),to.useLayoutEffect(()=>{let I=i.current;if(!I)return;let R=t[0]?.id,w=p.current,A=w!==void 0&&t.some(k=>k.id===w),D=A&&R!==void 0&&R!==w,T=w!==void 0&&!A;if(p.current=R,T){l.current=true,f(true),I.scrollTop=I.scrollHeight,x(),v();return}if(D){l.current=false,f(false);let k=I.scrollHeight-d.current.height;I.scrollTop=d.current.top+Math.max(0,k),x(),v();return}l.current&&(I.scrollTop=I.scrollHeight),x(),v();},[o,x,t,v]),to.useEffect(()=>{n||(m.current=false);},[n]);let C=to.useCallback(()=>{let I=i.current;if(!I)return;let w=I.scrollHeight-I.scrollTop-I.clientHeight<=Vs;w!==l.current&&(l.current=w,f(w)),x(),v();let A=I.scrollHeight-I.clientHeight>Vs,D=I.scrollTop<=Vs;!A||!D||w||!r||n||!a||m.current||(m.current=true,a());},[r,n,a,x,v]),P=to.useCallback(()=>{let I=i.current;I&&(l.current=true,f(true),I.scrollTo({top:I.scrollHeight,behavior:Bg()?"auto":"smooth"}));},[]),S=to.useCallback(I=>{let w=i.current?.querySelector(`[data-omph-turn="${CSS.escape(I)}"]`);w&&(l.current=false,f(false),w.scrollIntoView({block:"start",behavior:Bg()?"auto":"smooth"}));},[]);return {scrollerRef:i,contentRef:s,following:h,railVisible:u,activeTurnId:y,onScroll:C,returnToBottom:P,scrollToTurn:S}};M();var x0=1e3,w0=(t,o)=>o[t],S0=t=>t.map(o=>[o.id,o.user?.content.length??0,o.assistant?.content.length??0,o.assistant?.streaming?"1":"0",o.failure?.id??"",(o.process??[]).map(r=>`${r.id}:${r.status}:${r.content?.length??0}`).join(",")].join(":")).join("|"),k0=({startedAt:t,labels:o})=>{let[r,n]=to.useState(()=>Date.now());to.useEffect(()=>{n(Date.now());let i=window.setInterval(()=>n(Date.now()),x0);return ()=>window.clearInterval(i)},[t]);let a=t===void 0?o.working:o.workingFor(Ng(Math.max(0,r-t),o));return c("div",{className:"orb-omph-running","data-omph-running":"true",children:[e("span",{className:"orb-visually-hidden",role:"status","aria-live":"polite",children:o.working}),e("span",{className:"orb-omph-running-rule","aria-hidden":"true"}),c("span",{className:"orb-omph-running-body",children:[e("span",{className:"orb-omph-spinner","aria-hidden":"true"}),e("span",{className:"orb-omph-shimmer",children:a})]})]})},y5=({turns:t,title:o,avatar:r,description:n,headerActions:a,agentStatus:i,isResponding:s=false,labels:l,processDisplay:d="standard",showInput:p=false,placeholder:m,className:h,cardHooks:f,hasOlder:u=false,loadingOlder:b=false,onLoadOlder:y,onSend:g,onStop:x,onHeaderPointerDown:v,conversations:C=[],activeConversationId:P,onNewConversation:S,onSelectConversation:I,loadFilePreview:R,resolveFileLink:w=dc,filePreviewLayout:A="auto",onOpenFileExternally:D})=>{let{t:T}=de(),k={...Ta(T),...l},E=i??(s?"running":"idle"),O=E==="running"||E==="pending",$=[w0(E,k),n].filter(Boolean).join(" \xB7 "),ee=to.useMemo(()=>S0(t),[t]),F=Hg({turns:t,contentVersion:ee,hasOlder:u,loadingOlder:b,onLoadOlder:y}),[G,W]=to.useState(""),Q=G.trim(),z=s&&Q.length===0,H=[...t].reverse().find(pe=>!!pe.assistant?.streaming||pe.process?.some(ye=>ye.streaming||ye.status==="running"||ye.status==="pending")),X=O?H?.startedAt:void 0,Y=!!R,j=Dg(R),te=Og({open:j.state.open,layout:A}),ce=to.useRef(null),fe=to.useRef(null),Ve=Y&&j.state.open&&te.placement==="overlay",ve=te.placement==="split"&&j.state.open,xe={[bc]:`${te.width}px`,[fc]:ve?`${te.width}px`:"0px"};to.useEffect(()=>{fe.current?.toggleAttribute("inert",Ve);},[Ve]);let He=async()=>{if(!Q||!g)return;let pe=Q;W("");try{await g(pe);}catch{W(ye=>ye.trim().length===0?pe:ye);}};return c("div",{className:rt("orb-omph-panel",h),"data-omph-panel":"","data-status":E,"data-compact":te.compact||void 0,children:[c("div",{className:rt("orb-omph-header",v&&"cursor-grab active:cursor-grabbing"),onPointerDown:v,children:[e("span",{className:"orb-omph-avatar","aria-hidden":"true",children:r??"AI"}),c("div",{className:"min-w-0 flex-1",children:[o&&e("div",{className:"orb-omph-title",children:o}),c("div",{className:"orb-omph-subtitle",children:[e("span",{className:"orb-omph-dot","data-active":O||void 0}),e("span",{className:"truncate",children:$||k.idle})]})]}),(S||I||a)&&c("div",{className:"orb-omph-header-actions",onPointerDown:pe=>pe.stopPropagation(),children:[e(Ds,{conversations:C,activeConversationId:P,labels:k,onNewConversation:S,onSelectConversation:I}),a]})]}),c("div",{ref:te.mainRef,className:"orb-omph-main","data-placement":te.placement,"data-open":String(j.state.open),"data-dragging":te.dragging||void 0,style:xe,children:[c("div",{ref:fe,className:"orb-omph-center",children:[c("div",{className:"orb-omph-stage","data-rail":F.railVisible||void 0,children:[e("div",{ref:F.scrollerRef,className:"orb-omph-scroll",onScroll:F.onScroll,children:c("div",{ref:F.contentRef,className:"orb-omph-column",children:[u&&y&&e("button",{type:"button",className:"orb-omph-older",disabled:b,onClick:y,children:b?k.loadingOlder:k.loadOlder}),e(Mg,{turns:t,labels:k,processDisplay:d,cardHooks:f,resolveFileLink:w,onOpenFile:Y?j.open:void 0}),O&&e(k0,{startedAt:X,labels:k})]})}),F.railVisible&&t.length>0&&e("nav",{className:"orb-omph-rail","aria-label":k.turnRail,children:t.map(pe=>e("button",{type:"button",className:"orb-omph-rail-mark","data-active":F.activeTurnId===pe.id||void 0,"aria-label":mc(pe),title:mc(pe),onClick:()=>F.scrollToTurn(pe.id)},pe.id))}),!F.following&&e("button",{type:"button",className:"orb-omph-to-bottom","aria-label":k.toBottom,onClick:F.returnToBottom,children:e(Vo,{size:16})})]}),p&&c("form",{className:"orb-omph-composer",onSubmit:pe=>{pe.preventDefault(),z?x?.():He();},children:[e("textarea",{className:"orb-omph-input",value:G,placeholder:m,rows:1,onChange:pe=>W(pe.target.value),onKeyDown:pe=>{pe.key!=="Enter"||pe.shiftKey||pe.nativeEvent.isComposing||(pe.preventDefault(),z?x?.():He());}}),!z&&s&&x&&e("button",{type:"button",className:"orb-omph-stop-secondary","aria-label":k.stop,title:k.stop,onClick:x,children:e(Js,{size:14})}),e("button",{type:"submit",className:z?"orb-omph-stop":"orb-omph-send","aria-label":z?k.stop:k.send,disabled:!z&&Q.length===0,children:z?e(Js,{size:16}):e(Uc,{size:16})})]})]}),Y&&e(kg,{state:j.state,placement:te.placement,expanded:te.expanded,canExpand:te.canExpand,labels:k,gripProps:te.gripProps,paneRef:ce,onClose:j.close,onRetry:j.reload,onToggleExpand:te.toggleExpanded,onOpenExternally:D})]})]})};M();var vr="other",_g="allow-once",Gg="allow-session",Ug="abandon",P0=t=>t instanceof HTMLElement&&t.closest('input, textarea, select, [contenteditable="true"], [contenteditable=""]')!==null,T0=({request:t,onDecide:o,labels:r})=>{let{t:n}=de(),a={...gc(n),...r},i=to.useRef(null),s=to.useRef(null),l=to.useRef(false),d=to.useRef(false),[p,m]=to.useState(false),[h,f]=to.useState(null),[u,b]=to.useState(""),y=t.kind,g=y==="authorize"?[{id:_g,label:a.allowOnceException,recommended:true},{id:Gg,label:a.allowSession},{id:Ug,label:a.abandon}]:[],x=y==="authorize"?g:t.choices??[],v=y==="authorize"?false:t.allowOther??x.length>0,C=x.length>0||v,P=k=>(y==="tradeoff"||y==="authorize")&&k===true,S=t.reason?.trim()||a.escalation(t.toolName),I=t.detail?.trim(),R=h===vr&&u.trim().length>0,w=!C||h!==null&&h!==vr||R;to.useEffect(()=>{m(false),f(null),b(""),i.current?.focus();},[t.id]),to.useEffect(()=>{h===vr&&s.current?.focus();},[h]);let A=k=>{p||(m(true),o(k,t));},D=()=>{if(w){if(!C){A({kind:"allowed-once"});return}if(h===vr){let k=u.trim();if(!k)return;A({kind:"other",text:k});return}if(y==="authorize"){h===_g?A({kind:"allowed-once"}):h===Gg?A({kind:"allowed-session"}):h===Ug&&A({kind:"rejected"});return}h&&A({kind:"choice",choiceId:h});}},T=k=>{if(!(p||P0(k.target))&&!(k.key!=="Enter"&&k.key!=="Escape")&&!(k.key==="Enter"&&k.target instanceof HTMLElement&&k.target.closest('button, a[href], [role="button"]'))&&!(k.ctrlKey||k.metaKey||k.altKey||k.shiftKey)&&(k.preventDefault(),k.stopPropagation(),!(k.repeat||l.current||d.current||k.nativeEvent.isComposing))){if(k.key==="Escape"){A({kind:"rejected"});return}D();}};return e("div",{className:"orb-omph-approval","data-omph-approval":t.id,"aria-busy":p,onKeyDown:T,onKeyUpCapture:()=>{d.current=false;},onCompositionStartCapture:()=>{l.current=true;},onCompositionEndCapture:()=>{l.current=false,d.current=true;},children:c("div",{className:"orb-omph-approval-card","data-kind":y,children:[c("div",{className:"orb-omph-approval-strip",children:[e("span",{className:"orb-omph-approval-dot","aria-hidden":"true"}),C?a.choose:a.waiting]}),c("div",{ref:i,className:"orb-omph-approval-body",tabIndex:0,role:"group","aria-label":a.details,children:[e("div",{className:"orb-omph-approval-headline",children:S}),I&&e("div",{className:"orb-omph-approval-detail",children:I}),C&&c("fieldset",{className:"orb-omph-approval-choices",disabled:p,children:[e("legend",{className:"orb-visually-hidden",children:a.choices}),x.map(k=>{let E=h===k.id;return c("label",{className:"orb-omph-approval-choice","data-selected":E,children:[e("input",{type:"radio",name:`omph-approval-${t.id}`,value:k.id,checked:E,onChange:()=>f(k.id)}),c("span",{className:"orb-omph-approval-choice-copy",children:[c("span",{children:[k.label,P(k.recommended)&&e("span",{className:"orb-omph-approval-recommended",children:a.recommended})]}),k.description&&e("span",{className:"orb-omph-approval-choice-description",children:k.description})]})]},k.id)}),v&&c("label",{className:"orb-omph-approval-choice","data-selected":h===vr,children:[e("input",{type:"radio",name:`omph-approval-${t.id}`,value:vr,checked:h===vr,onChange:()=>f(vr)}),e("span",{className:"orb-omph-approval-choice-copy",children:e("span",{children:a.other})})]}),v&&h===vr&&e("textarea",{ref:s,className:"orb-omph-approval-other",value:u,placeholder:a.otherPlaceholder,rows:3,"aria-label":a.other,onChange:k=>b(k.target.value)})]})]}),c("div",{className:"orb-omph-approval-actions",children:[e("button",{type:"button",className:"orb-btn orb-btn-neutral orb-omph-approval-reject",disabled:p,onClick:()=>A({kind:"rejected"}),children:a.reject}),e("button",{type:"button",className:"orb-btn orb-btn-primary",disabled:p||!w,onClick:D,children:C?a.confirm:a.allowOnce})]})]})})};M();var I0=({mark:t,hint:o,suggestions:r=[],placeholder:n,isResponding:a=false,labels:i,conversations:s=[],activeConversationId:l,onSelectConversation:d,onSend:p,onStop:m,className:h})=>{let{t:f}=de(),u={...Ta(f),...i},b=o?.trim(),y=r.filter(g=>g.label.trim().length>0);return c("section",{className:["orb-omph-initial",h].filter(Boolean).join(" "),children:[c("div",{className:"orb-omph-initial-stage","aria-hidden":"true",children:[e("span",{className:"orb-omph-initial-bloom orb-omph-initial-bloom-petrol"}),e("span",{className:"orb-omph-initial-bloom orb-omph-initial-bloom-blue"}),e("span",{className:"orb-omph-initial-bloom orb-omph-initial-bloom-pink"}),c("svg",{className:"orb-omph-initial-arc",viewBox:"0 0 1440 900",preserveAspectRatio:"xMidYMid slice",children:[e("path",{d:"M-80 690C240 180 680 1040 1520 260"}),e("path",{d:"M-40 780C300 320 760 1120 1500 390"})]})]}),c("div",{className:"orb-omph-initial-center",children:[t&&e("div",{className:"orb-omph-initial-mark",children:t}),c("div",{className:"orb-omph-initial-composer",children:[e(Pa,{placeholder:n,isResponding:a,onSend:async(g,x)=>{await p(g,x);},onStop:()=>m?.()}),d&&e("div",{className:"orb-omph-initial-menu",children:e(Ds,{conversations:s,activeConversationId:l,labels:u,onSelectConversation:d})})]}),y.length>0?e("div",{className:"orb-omph-initial-suggestions",role:"group","aria-label":f("omph.initial.suggestions"),children:y.map(g=>e("button",{type:"button",className:"orb-omph-initial-suggestion",disabled:a,onClick:()=>{p(g.label.trim());},children:g.label.trim()},g.id))}):b&&e("p",{className:"orb-omph-initial-hint",children:b})]})]})};M();var Xg=520,N0=88,D0=88,A0=24,$s=640,Zg=(t,o,r)=>Math.min(Math.max(t,o),Math.max(o,r)),Cc=t=>typeof t=="number"?`${t}px`:t,E0=t=>t instanceof HTMLElement?!!t.closest('button,input,a,textarea,select,[role="button"],[contenteditable="true"]'):false,B5=({anchor:t,defaultAnchor:o="right",onAnchorChange:r,width:n=Xg,top:a=N0,bottom:i=D0,inset:s=A0,zIndex:l=1300,shellClassName:d,shellStyle:p,className:m,onHeaderPointerDown:h,...f})=>{let u=to.useRef(null),b=to.useRef(null),[y,g]=to.useState(o),[x,v]=to.useState(0),[C,P]=to.useState(typeof n=="number"?n:Xg),[S,I]=to.useState(0),[R,w]=to.useState(false),A=t??y;to.useEffect(()=>{let F=()=>v(window.innerWidth);return F(),window.addEventListener("resize",F),()=>window.removeEventListener("resize",F)},[]),to.useLayoutEffect(()=>{let F=()=>{let W=u.current?.getBoundingClientRect();W?.width?P(W.width):typeof n=="number"&&P(n);};if(F(),!u.current||typeof ResizeObserver>"u")return;let G=new ResizeObserver(F);return G.observe(u.current),()=>G.disconnect()},[n]);let D=to.useCallback(F=>{if(!x)return s;let G=x<$s?12:s,W=Math.max(G,x-C-G);return x<$s||F==="left"?G:F==="center"?Zg((x-C)/2,G,W):W},[s,C,x]),T=to.useCallback(F=>["left","center","right"].reduce((W,Q)=>{let z=Math.abs(F-D(W));return Math.abs(F-D(Q))<z?Q:W},"right"),[D]),k=to.useCallback(F=>{t===void 0&&g(F),r?.(F);},[t,r]);to.useEffect(()=>{R||I(D(A));},[D,R,A]);let E=to.useCallback(F=>{h?.(F),!(F.defaultPrevented||E0(F.target))&&(F.preventDefault(),F.currentTarget.setPointerCapture(F.pointerId),b.current={pointerId:F.pointerId,startClientX:F.clientX,startX:S,currentX:S,captureElement:F.currentTarget},w(true));},[h,S]),O=to.useCallback(F=>{let G=b.current;if(!G||G.pointerId!==F.pointerId)return;let W=x<$s?12:s,Q=Math.max(W,x-C-W),z=Zg(G.startX+F.clientX-G.startClientX,W,Q);G.currentX=z,I(z);},[s,C,x]),$=to.useCallback(F=>{let G=b.current;if(!G||G.pointerId!==F.pointerId)return;try{G.captureElement.releasePointerCapture(F.pointerId);}catch{}let W=T(G.currentX);b.current=null,w(false),k(W),I(D(W));},[D,k,T]),ee=to.useMemo(()=>({position:"fixed",top:Cc(a),bottom:Cc(i),left:S,width:Cc(n),maxWidth:`calc(100vw - ${x<$s?24:s*2}px)`,zIndex:l,pointerEvents:"auto",transition:R?"none":"left 180ms ease-out",touchAction:"none",...p}),[i,s,R,S,p,a,x,n,l]);return e("div",{ref:u,className:rt("orbcafe-floating-agent-panel min-w-0",d),"data-anchor":A,"data-dragging":R?"true":"false",style:ee,onPointerMove:O,onPointerUp:$,onPointerCancel:$,children:e(ag,{...f,className:m,onHeaderPointerDown:E})})};M();var F0={"top-left":"bottom-right","top-right":"bottom-left","bottom-left":"top-right","bottom-right":"top-left"},U5=({messages:t,onSend:o,onRegenerate:r,isResponding:n=false,className:a,placeholder:i,title:s="Copilot",corner:l="bottom-right",onCollapse:d,onHeaderPointerDown:p,onPlusClick:m,onMicClick:h,streamIntervalMs:f,streamChunkSize:u,onMessageStreamingComplete:b,cardHooks:y})=>{let[g,x]=to.useState(""),[v,C]=to.useState(false),P=to.useRef(null),S=F0[l];to.useEffect(()=>{P.current?.scrollIntoView({behavior:"smooth"});},[t,n]);let I=to.useCallback(async()=>{let w=g.trim();!w||n||(x(""),await o(w));},[n,o,g]),R=to.useCallback(async w=>{w.key==="Enter"&&!v&&(w.preventDefault(),await I());},[I,v]);return c("div",{className:rt("relative flex h-full w-full min-h-[460px] min-w-[340px] flex-col overflow-hidden rounded-3xl border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-none dark:bg-[var(--orb-surface-2)]",a),children:[d&&e("button",{onClick:d,className:rt("absolute z-20 flex h-10 w-10 items-center justify-center rounded-full transition-colors hover:bg-transparent dark:hover:bg-transparent",S==="top-left"&&"-left-2 -top-2",S==="top-right"&&"-right-2 -top-2",S==="bottom-left"&&"-bottom-2 -left-2",S==="bottom-right"&&"-bottom-2 -right-2"),type:"button","aria-label":"Collapse Copilot",children:e("span",{className:rt("block h-4 w-4 border-[var(--orb-ai-accent)]",S==="top-left"&&"rounded-tl-full border-l-[3px] border-t-[3px]",S==="top-right"&&"rounded-tr-full border-r-[3px] border-t-[3px]",S==="bottom-left"&&"rounded-bl-full border-b-[3px] border-l-[3px]",S==="bottom-right"&&"rounded-br-full border-b-[3px] border-r-[3px]")})}),c("div",{className:"flex items-center justify-between border-b border-[var(--orb-border)] px-4 py-3",onPointerDown:p,children:[e("div",{className:"flex items-center",children:e("h3",{className:"text-base font-semibold tracking-tight text-[var(--orb-fg)]",children:s})}),e("div",{})]}),c("div",{className:"flex-1 overflow-y-auto px-3 py-3 space-y-5 scrollbar-thin scrollbar-thumb-[var(--orb-border)]",children:[t.map((w,A)=>{let D=w.type==="assistant"&&A===t.length-1,T=w.type==="assistant"?{isLatestAssistant:D,isResponding:n,onRegenerate:r?()=>r(w.id):void 0}:void 0;return e(Ns,{message:w,assistantActions:T,onStreamingComplete:()=>b?.(w.id),streamIntervalMs:f,streamChunkSize:u,cardHooks:y},w.id)}),e("div",{ref:P})]}),e("div",{className:"border-t border-[var(--orb-border)] px-3 py-3",children:c("div",{className:"flex items-center gap-2 rounded-xl border border-[var(--orb-p300)] bg-[var(--orb-canvas)] px-2 py-1.5 dark:bg-[var(--orb-surface-2)]",children:[e("button",{className:"flex h-8 w-8 items-center justify-center rounded-full text-[var(--orb-muted)] transition-colors hover:bg-[var(--orb-surface)] hover:text-[var(--orb-fg)] dark:text-[var(--orb-muted)] dark:hover:bg-[var(--orb-surface-2)]",onClick:m,type:"button","aria-label":"Add",children:e(tn,{className:"h-4 w-4"})}),e("input",{className:"h-7 flex-1 border-none bg-transparent text-sm text-[var(--orb-fg)] outline-none placeholder:text-[var(--orb-muted)] dark:text-[var(--orb-fg)] dark:placeholder:text-[var(--orb-muted)]",placeholder:i||"Ask Copilot...",value:g,onChange:w=>x(w.target.value),onCompositionStart:()=>C(true),onCompositionEnd:()=>C(false),onKeyDown:R,"aria-label":"Copilot input",spellCheck:false}),e("button",{className:"flex h-8 w-8 items-center justify-center rounded-full text-[var(--orb-muted)] transition-colors hover:bg-[var(--orb-surface)] hover:text-[var(--orb-fg)] dark:text-[var(--orb-muted)] dark:hover:bg-[var(--orb-surface-2)]",onClick:h,type:"button","aria-label":"Microphone",children:e(Ga,{className:"h-4 w-4"})})]})})]})};M();var B0=["var(--orb-primary)","var(--orb-primary)","var(--orb-primary)"],H0=`
|
|
203
204
|
.orbcafe-ai-browser-glow {
|
|
204
205
|
position: fixed;
|
|
205
206
|
inset: 0;
|
|
@@ -231,4 +232,4 @@ ${r}: ${(a??n)(g.secondaryValue??0)}`:""]})}),e("text",{x:g.x,y:Math.max(g.y-12,
|
|
|
231
232
|
0%, 100% { opacity: 0.5; }
|
|
232
233
|
50% { opacity: 1; }
|
|
233
234
|
}
|
|
234
|
-
`,h5=({active:t=false,colors:o=g0,zIndex:r=2147483e3})=>{let n={"--orbcafe-ai-glow-line":o[0],"--orbcafe-ai-glow-z-index":r};return c(jsxRuntime.Fragment,{children:[e("style",{children:f0}),e("div",{className:"orbcafe-ai-browser-glow","data-active":t?"true":"false",style:n,"aria-hidden":"true"})]})};var N5=({defaultMode:t="login",onLogin:o,onRegister:r,onForgotPassword:n}={})=>{let[a,i]=eo.useState(t),[s,l]=eo.useState(false),d=eo.useCallback(async u=>{l(true);try{await u?.();}finally{l(false);}},[]),p=eo.useCallback(u=>d(()=>o?.(u)),[o,d]),m=eo.useCallback(u=>d(()=>r?.(u)),[r,d]),f=eo.useCallback(u=>d(()=>n?.(u)),[n,d]),h=eo.useMemo(()=>({mode:a,loading:s,onModeChange:i,onLogin:p,onRegister:m,onForgotPassword:f}),[f,p,m,s,a]);return {mode:a,loading:s,setMode:i,authPageProps:h}};P();var v0={productName:"ORBCAFE \u2014 Enterprise suite",headline:"We digitalize you.",subheadline:"One sign-in for planning, production and analytics across your value chain.",brandMeta:"ORBCAFE \xB7 Enterprise manufacturing suite",loginTitle:"Sign in",loginSubtitle:"Use your corporate account to continue.",registerTitle:"Create account",registerSubtitle:"Request a demo workspace user for evaluation.",forgotTitle:"Reset password",forgotSubtitle:"Send a password reset request to your email address."},V5=({mode:t,defaultMode:o="login",onModeChange:r,onLogin:n,onRegister:a,onForgotPassword:i,loading:s=false,logo:l,copy:d,sx:p})=>{let m=t!==void 0,[f,h]=eo.useState(o),u=t??f,v=eo.useMemo(()=>({...v0,...d}),[d]),[y,g]=eo.useState({username:"demo@orbcafe.local",password:"orbcafe-demo",remember:true}),[x,b]=eo.useState({name:"",email:"",password:"",confirmPassword:"",acceptedTerms:false}),[C,k]=eo.useState({email:""}),[S,T]=eo.useState(""),I=E=>{m||h(E),T(""),r?.(E);},w=async E=>{E.preventDefault(),await n?.(y),T("Demo login accepted. No real authentication request was sent.");},M=async E=>{E.preventDefault(),await a?.(x),T("Demo registration saved locally for this screen.");},A=async E=>{E.preventDefault(),await i?.(C),T("Demo reset link request created. No email was sent.");},R=u==="login"?v.loginTitle:u==="register"?v.registerTitle:v.forgotTitle,D=u==="login"?v.loginSubtitle:u==="register"?v.registerSubtitle:v.forgotSubtitle;return c("div",{className:"orb-auth-frame orb-root",style:p,children:[c("div",{className:"orb-auth-brand",children:[e("span",{className:"orb-auth-dia",style:{width:230,height:230,right:-70,bottom:-60}}),e("span",{className:"orb-auth-dia orb-auth-dia-sm-hide",style:{width:140,height:140,right:120,bottom:80,borderColor:"rgba(255,255,255,.09)"}}),e("span",{className:"orb-auth-dia orb-auth-dia-sm-hide",style:{width:76,height:76,right:60,bottom:170,background:"color-mix(in oklch, var(--orb-primary) 35%, transparent)",borderColor:"rgba(255,255,255,.2)"}}),l?e("span",{style:{alignSelf:"flex-start",position:"relative"},children:l}):e("span",{className:"orb-logo-slot",children:"Host logo"}),c("div",{className:"orb-auth-claim",children:[e("div",{className:"orb-auth-rule"}),e("h2",{children:v.headline}),e("p",{children:v.subheadline})]}),e("div",{className:"orb-auth-meta",children:v.brandMeta})]}),e("div",{className:"orb-auth-form",children:c("div",{className:"orb-auth-card",children:[e("span",{className:"orb-overline",style:{letterSpacing:"0.12em"},children:v.productName}),e("h1",{className:"orb-h2",style:{margin:0},children:R}),e("p",{className:"orb-body-dense",style:{color:"var(--orb-muted)",margin:"-10px 0 0"},children:D}),S&&e(rn,{severity:"success",children:S}),u==="login"&&c("form",{onSubmit:w,style:{display:"flex",flexDirection:"column",gap:16},children:[e(ze,{label:"Email",type:"email",autoComplete:"username",value:y.username,onChange:E=>g(O=>({...O,username:E.target.value})),startAdornment:e(Ks,{size:15,strokeWidth:1.8})}),e(ze,{label:"Password",type:"password",autoComplete:"current-password",value:y.password,onChange:E=>g(O=>({...O,password:E.target.value})),startAdornment:e(Ha,{size:15,strokeWidth:1.8})}),c("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12},children:[e(It,{label:"Remember me",checked:y.remember,onChange:E=>g(O=>({...O,remember:E.target.checked}))}),e("button",{type:"button",className:"orb-link",onClick:()=>I("forgot"),children:"Forgot password?"})]}),e(ke,{type:"submit",size:"large",block:true,loading:s,children:s?"Signing in\u2026":"Sign in"}),c("p",{className:"orb-meta",style:{textAlign:"center",margin:0},children:["New user?"," ",e("button",{type:"button",className:"orb-link",onClick:()=>I("register"),children:"Register"})]})]}),u==="register"&&c("form",{onSubmit:M,style:{display:"flex",flexDirection:"column",gap:16},children:[e(ze,{label:"Full name",value:x.name,onChange:E=>b(O=>({...O,name:E.target.value})),startAdornment:e(Ks,{size:15,strokeWidth:1.8})}),e(ze,{label:"Work email",type:"email",autoComplete:"username",value:x.email,onChange:E=>b(O=>({...O,email:E.target.value})),startAdornment:e(Us,{size:15,strokeWidth:1.8})}),e(ze,{label:"Password",type:"password",autoComplete:"new-password",value:x.password,onChange:E=>b(O=>({...O,password:E.target.value})),startAdornment:e(Ha,{size:15,strokeWidth:1.8})}),e(ze,{label:"Confirm password",type:"password",autoComplete:"new-password",value:x.confirmPassword,onChange:E=>b(O=>({...O,confirmPassword:E.target.value}))}),e(It,{label:"I accept the demo workspace terms",checked:x.acceptedTerms,onChange:E=>b(O=>({...O,acceptedTerms:E.target.checked}))}),e(ke,{type:"submit",size:"large",block:true,loading:s,children:"Create demo account"}),c("p",{className:"orb-meta",style:{textAlign:"center",margin:0},children:["Already have an account?"," ",e("button",{type:"button",className:"orb-link",onClick:()=>I("login"),children:"Sign in"})]})]}),u==="forgot"&&c("form",{onSubmit:A,style:{display:"flex",flexDirection:"column",gap:16},children:[e(ze,{label:"Work email",type:"email",autoComplete:"username",value:C.email,onChange:E=>k({email:E.target.value}),startAdornment:e(Us,{size:15,strokeWidth:1.8})}),e(ke,{type:"submit",size:"large",block:true,loading:s,children:"Send reset request"}),c("p",{className:"orb-meta",style:{textAlign:"center",margin:0},children:["Remember your password?"," ",e("button",{type:"button",className:"orb-link",onClick:()=>I("login"),children:"Back to sign in"})]})]}),c("div",{style:{display:"flex",alignItems:"center",gap:12,font:"500 10px/1 var(--orb-font)",letterSpacing:"0.1em",textTransform:"uppercase",color:"var(--orb-muted)"},children:[e("span",{style:{flex:1,height:1,background:"var(--orb-border)"}}),"or",e("span",{style:{flex:1,height:1,background:"var(--orb-border)"}})]}),e(ke,{variant:"neutral",size:"large",block:true,children:"Continue with corporate SSO"}),c("p",{className:"orb-meta",style:{textAlign:"center",fontWeight:300,margin:0},children:["Protected by corporate single sign-on.",e("br",{}),"Demo credentials: demo@orbcafe.local / orbcafe-demo"]})]})})]})};var C0={keyword:{value:"",operator:"contains"},status:{value:"",operator:"equals"},owner:{value:"",operator:"contains"},workCenter:{value:"",operator:"contains"}},x0=[{id:"keyword",label:"Keyword",type:"text",placeholder:"Task/ID/Project",hasSearchIcon:true},{id:"status",label:"Status",type:"select",options:[{label:"In progress",value:"in-progress"},{label:"Blocked",value:"blocked"},{label:"Planned",value:"planned"},{label:"Not started",value:"not-started"}]},{id:"owner",label:"Owner",type:"text",placeholder:"Owner name"},{id:"workCenter",label:"Work Center",type:"text",placeholder:"CNC-02 / WH-A / ..."},{id:"dateRange",label:"Date Range",type:"date"}],Vg=({tasks:t,appId:o,tableKey:r,defaultScale:n="week",defaultSelectedTaskId:a,initialFilters:i,filterFields:s,filterAppId:l,filterTableKey:d,serviceUrl:p,variantService:m,layout:f,columns:h,page:u,rowsPerPage:v,rowsPerPageOptions:y,count:g,onPageChange:x,onRowsPerPageChange:b,onFilterSearch:C,onFilterVariantLoad:k,enableRowReorder:S,onTaskReorder:T,onLayoutIdChange:I,onLayoutSave:w})=>{let M=o??l??"planning-gantt",A=r??d??"planning",[R,D]=eo.useState(n),[E,O]=eo.useState(a??t[0]?.id??""),[_,J]=eo.useState(""),[F,V]=eo.useState(null),[z,X]=eo.useState({...C0,...i}),W=eo.useMemo(()=>{let ge=String(z.keyword?.value??"").trim().toLowerCase(),we=String(z.status?.value??"").trim(),Ve=String(z.owner?.value??"").trim().toLowerCase(),Te=String(z.workCenter?.value??"").trim().toLowerCase(),Ie=z.dateRange?.value,He=Ie?.[0]?ar__default.default(Ie[0]):null,ce=Ie?.[1]?ar__default.default(Ie[1]):null;return t.filter(be=>{if(ge&&![be.id,be.code,be.title,be.project,be.workCenter,be.owner?.name].join(" ").toLowerCase().includes(ge)||we&&be.status!==we||Ve&&!String(be.owner?.name??"").toLowerCase().includes(Ve)||Te&&!String(be.workCenter??"").toLowerCase().includes(Te))return false;if(He||ce){let We=ar__default.default(be.startDate),tt=ar__default.default(be.endDate),nt=He?tt.isAfter(He)||tt.isSame(He,"day"):true,it=ce?We.isBefore(ce)||We.isSame(ce,"day"):true;if(!nt||!it)return false}return true})},[z,t]);eo.useEffect(()=>{W.length!==0&&(W.some(ge=>ge.id===E)||O(W[0].id));},[W,E]);let H=eo.useCallback(ge=>{O(ge.id);},[]),U=eo.useCallback(ge=>{J(ge),I?.(ge);},[I]),Y=eo.useCallback(ge=>{V(we=>({key:(we?.key??0)+1,variant:ge})),k?.(ge);},[k]),ue=eo.useMemo(()=>({appId:M,tableKey:A,fields:s??x0,filters:z,onFilterChange:X,onVariantLoad:Y,onSearch:C??(()=>{}),currentLayoutId:_,layoutRefs:[{tableKey:A,layoutId:_||null}],variantService:m,serviceUrl:p}),[_,s,z,Y,C,M,A,p,m]),re=eo.useMemo(()=>({appId:M,tableKey:A,serviceUrl:p,tasks:W,columns:h,scale:R,onScaleChange:D,page:u,rowsPerPage:v,rowsPerPageOptions:y,count:g,onPageChange:x,onRowsPerPageChange:b,selectedTaskId:E,onTaskSelect:H,enableRowReorder:S,onTaskReorder:T,layout:f,layoutVariant:F?.variant,layoutVariantLoadKey:F?.key,onLayoutIdChange:U,onLayoutSave:w}),[h,g,S,W,U,f,F?.key,F?.variant,x,b,w,T,H,u,M,A,v,y,R,p,E]);return {scale:R,setScale:D,selectedTaskId:E,setSelectedTaskId:O,filters:z,setFilters:X,filteredTasks:W,smartFilterProps:ue,planningGanttProps:re}};var X5=t=>{let o=Vg(t),r=eo.useMemo(()=>({filterProps:o.smartFilterProps,ganttProps:o.planningGanttProps}),[o.planningGanttProps,o.smartFilterProps]);return {...o,layoutProps:r}};P();ar__default.default.extend(S0__default.default);var hc=[{value:"hour",label:"Hour",width:56},{value:"day",label:"Day",width:46},{value:"week",label:"Week",width:78},{value:"month",label:"Month",width:104}],bc=36,vc=58,Ia=8,yc=260,D0=320,Ur="220ms cubic-bezier(0.2, 0, 0, 1)",Wg={"not-started":{label:"Not started",color:"default"},planned:{label:"Planned",color:"info"},"in-progress":{label:"In progress",color:"primary"},blocked:{label:"Blocked",color:"error"},done:{label:"Done",color:"success"}},N0=t=>t?Wg[t]?.label??t:"Planned",A0=t=>t?Wg[t]?.color??"default":"info",$g=t=>Math.min(100,Math.max(0,t??0)),_g=(t,o=0)=>t.flatMap(r=>[{...r,level:o},..._g(r.children??[],o+1)]),E0=t=>({id:t.id,code:t.code??t.id,title:t.title,titleSub:t.project??t.workCenter??"General",project:t.project??"",workCenter:t.workCenter??"",owner:t.owner?.name??"Unassigned",status:N0(t.status),statusTone:t.status??"planned",progress:$g(t.progress),startDate:t.startDate,endDate:t.endDate,color:t.color,reorderable:t.reorderable!==false}),Gg=(t,o)=>o==="month"?t.startOf("month"):o==="week"?t.startOf("week"):o==="day"?t.startOf("day"):t.startOf("hour"),Ug=(t,o)=>o==="month"?t.endOf("month"):o==="week"?t.endOf("week"):o==="day"?t.endOf("day"):t.endOf("hour"),L0=(t,o,r)=>{let n=[],a=Gg(t,r),i=Ug(o,r);for(;a.isBefore(i)||a.isSame(i);){let s=r==="month"?a.add(1,"month"):r==="week"?a.add(1,"week"):r==="day"?a.add(1,"day"):a.add(1,"hour");n.push({key:`${r}-${a.valueOf()}`,label:r==="month"?a.format("MMM YYYY"):r==="week"?a.format("MMM D"):r==="day"?a.format("D"):a.format("HH:mm"),contextLabel:r==="hour"?a.format("MMM D"):r==="day"?a.format("MMM"):r==="week"?`W${a.isoWeek()}`:void 0,title:r==="hour"?a.format("MMM D, YYYY HH:mm"):r==="day"?a.format("MMM D, YYYY"):r==="week"?`${a.format("MMM D, YYYY")} - Week ${a.isoWeek()}`:void 0,start:a,end:s}),a=s;}return n},Cc=(t,o,r)=>{let n=0;for(let a of o){if(t.isBefore(a.start))return n;if(t.isBefore(a.end)){let i=Math.max(1,a.end.valueOf()-a.start.valueOf()),s=Math.max(0,t.valueOf()-a.start.valueOf());return n+s/i*r}n+=r;}return n},Kg=({appId:t="planning-gantt",tableKey:o="planning",serviceUrl:r,title:n="Project Plan",extraTools:a,bodyHeight:i=560,tasks:s,columns:l,scale:d="week",onScaleChange:p,page:m,rowsPerPage:f=20,rowsPerPageOptions:h=[20,50,100,-1],count:u,onPageChange:v,onRowsPerPageChange:y,timelineStart:g,timelineEnd:x,selectedTaskId:b,onTaskSelect:C,enableRowReorder:k=true,onTaskReorder:S,layout:T,layoutVariant:I,layoutVariantLoadKey:w,onLayoutIdChange:M,onLayoutSave:A,emptyLabel:R="No planning tasks available.",sx:D})=>{let E=so(),{t:O}=le(),_=eo.useRef(null),J=eo.useRef(null),F=eo.useRef(null),V=eo.useRef(false),[z,X]=eo.useState(null),[W,H]=eo.useState("content"),[U,Y]=eo.useState(null),[ue,re]=eo.useState(0),[ge,we]=eo.useState({}),[Ve,Te]=eo.useState(bc),[Ie,He]=eo.useState([]),ce=eo.useRef(void 0),[be,We]=eo.useState({activeId:null,overId:null}),[tt,nt]=eo.useState(null),[it,q]=eo.useState(false),De=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:4}})),Ce=eo.useRef(null),Fe=eo.useMemo(()=>_g(s),[s]),at=eo.useMemo(()=>{if(Ie.length===0)return Fe;let B=new Map(Fe.map(Pe=>[Pe.id,Pe])),Q=Ie.map(Pe=>B.get(Pe)).filter(Pe=>!!Pe),fe=new Set(Q.map(Pe=>Pe.id));return [...Q,...Fe.filter(Pe=>!fe.has(Pe.id))]},[Fe,Ie]),Ze=eo.useMemo(()=>new Map(at.map(B=>[B.id,B])),[at]),wt=eo.useMemo(()=>at.map(B=>E0(B)),[at]),Rt=eo.useMemo(()=>new Map(wt.map(B=>[B.id,B])),[wt]),Ot=eo.useMemo(()=>[{id:"code",label:"ID",minWidth:90},{id:"title",label:"Task",minWidth:260,render:(B,Q)=>c(se,{spacing:.2,children:[e(L,{sx:{fontSize:15,fontWeight:700,lineHeight:1.2},children:Q.title}),e(L,{sx:{fontSize:13,color:"text.secondary"},children:Q.titleSub})]})},{id:"owner",label:"Owner",minWidth:170},{id:"status",label:"Status",minWidth:130,render:(B,Q)=>e(xt,{label:Q.status,color:A0(Q.statusTone),size:"small"})},{id:"progress",label:"Progress",minWidth:140,numeric:true,render:B=>c(se,{spacing:.6,children:[c(L,{variant:"caption",sx:{color:"text.secondary"},children:[B,"%"]}),e(_n,{variant:"determinate",value:B,sx:{height:6,borderRadius:999}})]})},{id:"startDate",label:"Start",minWidth:120},{id:"endDate",label:"End",minWidth:120}],[]),At=eo.useMemo(()=>{if(!l||l.length===0)return Ot;let B=new Map(Ot.map(Q=>[Q.id,Q]));return l.map(Q=>{let fe=B.get(Q.id),Pe=Q.width??fe?.minWidth??120,et={id:Q.id,label:Q.label,minWidth:Pe};if(fe?.numeric&&(et.numeric=true),Q.render){let Xe=Q.render;return et.render=(kt,ht)=>{let gt=Ze.get(ht.id);return Xe(gt||ht)},et}return fe?.render?(et.render=fe.render,et):(et.render=(Xe,kt)=>{let ht=kt[Q.id];if(ht!=null&&String(ht).length>0)return String(ht);let Ct=Ze.get(kt.id)?.[Q.id];return Ct!=null&&String(Ct).length>0?String(Ct):"-"},et)})},[l,Ot,Ze]),oe=bn({appId:t,tableKey:o,title:n,columns:At,rows:wt,rowKey:"id",page:m,rowsPerPage:f,rowsPerPageOptions:h,count:u??wt.length,onPageChange:v,onRowsPerPageChange:y,showSummary:false,layout:T,onLayoutSave:A}),Ke=t?e(hn,{appId:t,tableKey:o,currentLayoutData:oe.currentLayoutData,onLayoutLoad:oe.handleLayoutLoad,targetLayoutId:oe.layoutIdToLoad,activeLayoutId:oe.currentLayoutId,serviceUrl:r}):null,Oe=oe.visibleRows;eo.useEffect(()=>{let B=Fe.map(Q=>Q.id);He(Q=>{let fe=new Set(B),Pe=Q.filter(ht=>fe.has(ht)),et=new Set(Pe),Xe=B.filter(ht=>!et.has(ht)),kt=[...Pe,...Xe];return kt.length===Q.length&&kt.every((ht,gt)=>ht===Q[gt])?Q:kt});},[Fe]),eo.useEffect(()=>{w===void 0||!I||ce.current!==w&&(ce.current=w,oe.handleVariantLoad(I));},[oe,I,w]),eo.useEffect(()=>{M?.(oe.currentLayoutId);},[oe.currentLayoutId,M]);let de=B=>B.type==="group"?`group-${B.id}`:`row-${(B.data||B)?.id}`,ye=eo.useMemo(()=>{let B=wt.map(gt=>ar__default.default(gt.startDate)),Q=wt.map(gt=>ar__default.default(gt.endDate)),fe=g?ar__default.default(g):B.reduce((gt,Ct)=>Ct.isBefore(gt)?Ct:gt,B[0]??ar__default.default()),Pe=x?ar__default.default(x):Q.reduce((gt,Ct)=>Ct.isAfter(gt)?Ct:gt,Q[0]??ar__default.default().add(30,"day")),et=d==="month"?"month":d==="week"?"week":d==="day"?"day":"hour",Xe=d==="month"?"month":d==="week"?"week":d==="day"?"day":"hour",kt=d==="hour"?12:1,ht=d==="hour"?12:1;return {start:Gg(fe.subtract(kt,et),d),end:Ug(Pe.add(ht,Xe),d)}},[wt,d,x,g]),te=hc.find(B=>B.value===d)??hc[1],ve=Array.isArray(a)?a:a?[a]:[],Ne=eo.useMemo(()=>L0(ye.start,ye.end,d),[ye.end,ye.start,d]),Je=Ne.length*te.width,st=Ne.length>0?100/Ne.length:100,pt=Ne.length>0?`repeat(${Ne.length}, minmax(${te.width}px, 1fr))`:"1fr",Bt=Ne.length>0?`calc(100% / ${Ne.length}) 100%`:"100% 100%",Yt=(oe.columns||[]).filter(B=>oe.visibleColumns.includes(B.id)).reduce((B,Q)=>B+(oe.columnWidths?.[Q.id]||Q.minWidth||100),0)+(oe.grouping.length>0?72:0),Vt=W==="manual"&&z!==null?z:Yt,St=U==="table",Wt=U==="timeline",bt=U==="timeline",Nt=U==="table",lt=!bt&&!Nt,Ft=()=>{let B=ue||_.current?.clientWidth||0;return B>0?Math.max(yc,B-Ia-D0):Math.max(yc,Yt)},Zt=B=>Math.min(Math.max(B,yc),Ft()),$=(()=>{if(ue<=0)return null;let B=lt?Ia:0;if(St)return {tableWidth:ue,splitterWidth:B,timelineWidth:0};if(Wt)return {tableWidth:0,splitterWidth:B,timelineWidth:ue};if(W==="even"){let fe=Math.max(0,(ue-B)/2);return {tableWidth:fe,splitterWidth:B,timelineWidth:Math.max(0,ue-B-fe)}}let Q=Zt(Vt);return {tableWidth:Q,splitterWidth:B,timelineWidth:Math.max(0,ue-B-Q)}})(),j=$?`${$.tableWidth}px ${$.splitterWidth}px ${$.timelineWidth}px`:St?"minmax(0, 1fr) 0px 0px":Wt?"0px 0px minmax(0, 1fr)":W==="even"?`minmax(0, 1fr) ${Ia}px minmax(0, 1fr)`:`${Vt}px ${Ia}px minmax(0, 1fr)`;eo.useEffect(()=>{W==="manual"&&X(B=>B===null?null:Zt(B));},[W,Yt,ue]);let he=B=>{B.preventDefault(),B.currentTarget.setPointerCapture(B.pointerId),Y(null),H("manual"),Ce.current={startX:B.clientX,startWidth:J.current?.getBoundingClientRect().width??Vt};let Q=Pe=>{let et=Ce.current;if(!et)return;let Xe=Zt(et.startWidth+Pe.clientX-et.startX);X(Xe);},fe=()=>{Ce.current=null,window.removeEventListener("pointermove",Q),window.removeEventListener("pointerup",fe),document.body.style.cursor="",document.body.style.userSelect="";};document.body.style.cursor="col-resize",document.body.style.userSelect="none",window.addEventListener("pointermove",Q),window.addEventListener("pointerup",fe);},xe=()=>{Y(null),H("even"),X(null);},Ee=B=>!k||!B?false:Rt.get(B)?.reorderable!==false,_e=(B,Q)=>{if(!B||!Q||B===Q||!Ee(B)||!Ee(Q))return false;if(oe.grouping.length===0)return true;let fe=Rt.get(B),Pe=Rt.get(Q);return !fe||!Pe?false:oe.grouping.every(et=>fe[et]===Pe[et])},qe=(B,Q)=>{if(!_e(B,Q))return;let fe=Oe.filter(Et=>Et.type!=="group").map(Et=>String((Et.data||Et)?.id)),Pe=fe.indexOf(B),et=fe.indexOf(Q);if(Pe<0||et<0)return;let Xe=[...fe];[Xe[Pe],Xe[et]]=[Xe[et],Xe[Pe]];let kt=new Set(fe),ht=at.map(Et=>Et.id),gt=[...Xe,...ht.filter(Et=>!kt.has(Et))],Ct=Ze.get(B),no=Ze.get(Q);if(oe.setOrder("asc"),oe.setOrderBy(""),He(gt),Ct&&no){let{level:Et,...jt}=Ct,{level:Ht,...Kt}=no,$t=gt.reduce((oo,ao)=>{let bo=Ze.get(ao);if(bo){let{level:Ro,...Mo}=bo;oo.push(Mo);}return oo},[]);S?.($t,{activeTask:jt,targetTask:Kt});}},je=(B,Q)=>{if(!Ee(Q.id)){B.preventDefault();return}B.stopPropagation(),B.dataTransfer.effectAllowed="move",B.dataTransfer.setData("text/plain",Q.id),We({activeId:Q.id,overId:null}),C?.(Ze.get(Q.id)||Q);},mt=(B,Q)=>{if(!_e(be.activeId,Q)){We(fe=>fe.overId===null?fe:{...fe,overId:null});return}B.preventDefault(),B.stopPropagation(),B.dataTransfer.dropEffect="move",We(fe=>fe.overId===Q?fe:{...fe,overId:Q});},ft=(B,Q)=>{let fe=be.activeId||B.dataTransfer.getData("text/plain");if(!_e(fe,Q)){We({activeId:null,overId:null});return}B.preventDefault(),B.stopPropagation(),qe(fe,Q),We({activeId:null,overId:null});},Mt=()=>{We({activeId:null,overId:null});},yt=B=>{if(V.current)return;let Q=B==="table"?J.current:F.current,fe=B==="table"?F.current:J.current;!Q||!fe||(V.current=true,fe.scrollTop=Q.scrollTop,window.requestAnimationFrame(()=>{V.current=false;}));};return eo.useLayoutEffect(()=>{let B=_.current;if(!B){re(0);return}let Q=0,fe=()=>{window.cancelAnimationFrame(Q),Q=window.requestAnimationFrame(()=>{let et=B.clientWidth;re(Xe=>Math.abs(Xe-et)<.5?Xe:et);});};if(fe(),typeof ResizeObserver>"u")return window.addEventListener("resize",fe),()=>{window.cancelAnimationFrame(Q),window.removeEventListener("resize",fe);};let Pe=new ResizeObserver(fe);return Pe.observe(B),window.addEventListener("resize",fe),()=>{window.cancelAnimationFrame(Q),Pe.disconnect(),window.removeEventListener("resize",fe);}},[wt.length]),eo.useLayoutEffect(()=>{if(!b||Nt)return;let B=F.current,Q=J.current;if(!B)return;let fe=`row-${b}`,Pe=Array.from(B.querySelectorAll("[data-planning-timeline-row-key]")).find(kt=>kt.dataset.planningTimelineRowKey===fe),et=Rt.get(b);if(!Pe||!et)return;let Xe=window.requestAnimationFrame(()=>{let kt=B.getBoundingClientRect(),ht=Pe.getBoundingClientRect(),gt=Math.max(1,B.clientHeight-Ve),Ct=B.scrollTop+ht.top-kt.top-Ve-(gt-ht.height)/2;V.current=true,B.scrollTop=Math.max(0,Ct),Q&&!bt&&(Q.scrollTop=B.scrollTop);let no=Math.max(1,B.scrollWidth),Et=Ne.length>0?no/Ne.length:te.width,jt=Cc(ar__default.default(et.startDate),Ne,Et),Ht=Math.max(0,jt-Et);B.scrollLeft=Math.min(Ht,Math.max(0,no-B.clientWidth)),window.requestAnimationFrame(()=>{V.current=false;});});return ()=>window.cancelAnimationFrame(Xe)},[te.width,Ve,b,bt,Rt,Nt,Oe,Ne]),eo.useLayoutEffect(()=>{let B=J.current;if(!B)return;let Q=0,fe=0,Pe=false,et=()=>{if(Pe)return;let Ht=B.querySelector("thead"),Kt=Array.from(B.querySelectorAll("tbody tr[data-ctable-row-key]"));if(Kt.length===0)return;let $t=Ht?.getBoundingClientRect().height||bc,oo={};Kt.forEach(ao=>{let bo=ao.dataset.ctableRowKey;bo&&(oo[bo]=ao.getBoundingClientRect().height);}),Te(ao=>Math.abs(ao-$t)<.01?ao:$t),we(ao=>{let bo=Object.keys(ao),Ro=Object.keys(oo);return bo.length===Ro.length&&Ro.every(Mo=>Math.abs((ao[Mo]??0)-oo[Mo])<.01)?ao:oo});},Xe=()=>{window.cancelAnimationFrame(Q),Q=window.requestAnimationFrame(et);};if(et(),window.cancelAnimationFrame(fe),fe=window.requestAnimationFrame(()=>{fe=window.requestAnimationFrame(et);}),typeof document<"u"&&document.fonts?.ready&&document.fonts.ready.then(()=>{Pe||Xe();}).catch(()=>{}),typeof ResizeObserver>"u")return window.addEventListener("resize",Xe),()=>{Pe=true,window.cancelAnimationFrame(Q),window.cancelAnimationFrame(fe),window.removeEventListener("resize",Xe);};let kt=new ResizeObserver(Xe),ht=B.querySelector("table"),gt=B.querySelector("tbody"),Ct=B.querySelector("thead");ht&&kt.observe(ht),Ct&&kt.observe(Ct);let no=new WeakSet,Et=()=>{B.querySelectorAll("tbody tr[data-ctable-row-key]").forEach(Ht=>{no.has(Ht)||(kt.observe(Ht),no.add(Ht));});};Et();let jt=null;return gt&&typeof MutationObserver<"u"&&(jt=new MutationObserver(()=>{Et(),Xe();}),jt.observe(gt,{childList:true,subtree:true,characterData:true})),window.addEventListener("resize",Xe),()=>{Pe=true,window.cancelAnimationFrame(Q),window.cancelAnimationFrame(fe),kt.disconnect(),jt?.disconnect(),window.removeEventListener("resize",Xe);}},[Oe,oe.visibleColumns,oe.grouping,oe.columnWidths]),c(Ae,{className:"orb-ctable-surface orb-planning-gantt",elevation:0,sx:{m:0,p:0,display:"flex",flexDirection:"column",minHeight:0,overflow:"hidden",borderRadius:"var(--orb-r-container)",border:`1px solid ${E.palette.divider}`,...D},children:[e("div",{className:"orb-table-toolbar orb-planning-table-toolbar",role:"toolbar","aria-label":O("table.title.default"),children:c("div",{className:"orb-table-toolbar-primary",children:[e(yi,{value:oe.filterText,onChange:B=>{oe.setFilterText(B),oe.setPage(0);}}),e(vi,{rowsPerPage:oe.rowsPerPage,rowsPerPageOptions:h,page:oe.page,count:oe.totalDisplayCount,onRowsPerPageChange:oe.setRowsPerPage,onPageChange:oe.setPage}),ve.length>0&&e("div",{className:"orb-table-toolbar-custom",children:ve.map((B,Q)=>e("div",{className:"orb-planning-extra-tool",children:B},`planning-extra-tool-${Q}`))}),e("span",{className:"orb-table-toolbar-spacer"}),c("div",{className:"orb-table-toolbar-actions",children:[c("div",{className:"orb-table-tool-group",children:[e(ie,{className:"orb-table-tool-button",tooltip:"Column visibility",onClick:B=>oe.setAnchorEl(B.currentTarget),sx:uo,children:e(ln,{fontSize:"small"})}),e(ie,{className:"orb-table-tool-button",tooltip:"Group by",onClick:B=>oe.setGroupAnchorEl(B.currentTarget),sx:uo,children:e(wr,{fontSize:"small"})}),e(ie,{className:`orb-table-tool-button ${oe.sortBy.length>0||oe.orderBy?"orb-is-active":""}`,tooltip:"Sort by...",active:oe.sortBy.length>0||!!oe.orderBy,onClick:()=>q(true),sx:uo,children:e(xp,{fontSize:"small"})})]}),Ke&&e("div",{className:"orb-table-tool-group",children:Ke}),e("div",{className:"orb-table-tool-group orb-planning-pane-controls",children:e(Gn,{"aria-label":"Planning pane layout",size:"small",value:U??(W==="even"?"split":null),options:[{value:"table",label:"Expand task table",icon:e(ui,{fontSize:"small"})},{value:"split",label:"Split evenly",icon:e(gi,{fontSize:"small"})},{value:"timeline",label:"Expand timeline",icon:e(pi,{fontSize:"small"})}],onValueChange:B=>{B==="split"?xe():Y(B);}})}),e("div",{className:"orb-table-tool-group orb-planning-scale-control",children:e(zt,{label:"",value:d,options:hc.map(B=>({value:B.value,label:B.label})),onChange:B=>p?.(B.target.value)})})]})]})}),wt.length===0?e("div",{sx:{minHeight:240,display:"grid",placeItems:"center",color:"text.secondary"},children:R}):e("div",{sx:{overflow:"hidden",flex:1,minHeight:0},children:c("div",{ref:_,sx:{height:"100%",display:"grid",gridTemplateColumns:j,minWidth:0,transition:`grid-template-columns ${Ur}`},children:[e("div",{"data-planning-scroll-pane":"table",ref:J,onScroll:()=>yt("table"),sx:{width:"100%",minWidth:0,maxWidth:"100%",height:i,overflowX:"auto",overflowY:"auto",opacity:bt?0:1,transform:bt?"translateX(-10px)":"translateX(0)",pointerEvents:bt?"none":"auto",transition:`opacity ${Ur}, transform ${Ur}`},children:e(core.DndContext,{sensors:De,collisionDetection:core.closestCenter,modifiers:[modifiers.restrictToHorizontalAxis],onDragEnd:B=>{let Q=B?.active?.id,fe=B?.over?.id;typeof Q=="string"&&typeof fe=="string"&&oe.handleColumnReorder(Q,fe);},children:c("table",{className:"orb-tbl orb-ctable orb-planning-table",sx:{tableLayout:"fixed",width:Yt,"& thead th":{height:bc,py:0,lineHeight:1.15,boxSizing:"border-box"}},children:[e(wi,{columns:oe.columns,visibleColumns:oe.visibleColumns,order:oe.order,orderBy:oe.orderBy,sortBy:oe.sortBy,onRequestSort:oe.handleRequestSort,onContextMenu:(B,Q)=>{B.preventDefault(),B.stopPropagation(),nt({mouseX:B.clientX+2,mouseY:B.clientY-6,columnId:Q});},grouping:oe.grouping,isAllExpanded:oe.isAllExpanded,handleToggleAll:oe.handleToggleAll,columnWidths:oe.columnWidths,onColumnResize:oe.handleColumnResize,enableColumnReorder:true}),e(Si,{visibleRows:Oe,columns:oe.columns,visibleColumns:oe.visibleColumns,selected:b?[b]:[],expandedGroups:oe.expandedGroups,toggleGroupExpand:oe.toggleGroupExpand,handleExpandGroupRecursively:oe.handleExpandGroupRecursively,handleCollapseGroupRecursively:oe.handleCollapseGroupRecursively,isGroupFullyExpanded:oe.isGroupFullyExpanded,grouping:oe.grouping,rowKeyProp:"id",page:oe.page,rowsPerPage:oe.rowsPerPage,emptyLabel:R,handleClick:(B,Q)=>{C?.(Ze.get(Q.id)||Q);},getRowDataKey:({entry:B})=>de(B),getGroupRowProps:()=>({style:{height:vc}}),getRowProps:({data:B})=>{let Q=B,fe=Ee(Q.id),Pe=be.activeId===Q.id,et=be.overId===Q.id&&_e(be.activeId,Q.id);return {draggable:fe,className:et?"orb-is-drop-target":void 0,style:{cursor:Pe?"grabbing":fe?"grab":C?"pointer":"default",height:vc,opacity:Pe?.56:1,transition:"background-color 120ms ease, opacity 120ms ease"},onDragStart:Xe=>je(Xe,Q),onDragOver:Xe=>mt(Xe,Q.id),onDragEnter:Xe=>mt(Xe,Q.id),onDrop:Xe=>ft(Xe,Q.id),onDragEnd:Mt}}})]})})}),e("div",{onPointerDown:lt?he:void 0,role:"separator","aria-orientation":"vertical",sx:{width:lt?Ia:0,cursor:lt?"col-resize":"default",opacity:lt?1:0,pointerEvents:lt?"auto":"none",borderLeft:lt?`1px solid ${E.palette.divider}`:"0 solid transparent",borderRight:lt?`1px solid ${E.palette.divider}`:"0 solid transparent",backgroundColor:vt()==="dark"?"color-mix(in oklch, var(--orb-muted) 10%, transparent)":"color-mix(in oklch, var(--orb-fg) 4%, transparent)",transition:`width ${Ur}, opacity ${Ur}, background-color 120ms ease`,position:"relative","&:hover":{backgroundColor:E.palette.action.selected},"&::before":{content:'""',position:"absolute",top:0,bottom:0,left:-6,right:-6,cursor:lt?"col-resize":"default"}}}),e("div",{sx:{minWidth:0,overflow:"hidden",opacity:Nt?0:1,transform:Nt?"translateX(10px)":"translateX(0)",pointerEvents:Nt?"none":"auto",transition:`opacity ${Ur}, transform ${Ur}`},children:e("div",{"data-planning-scroll-pane":"timeline",ref:F,onScroll:()=>yt("timeline"),sx:{width:"100%",height:i,overflowX:"auto",overflowY:"auto"},children:c("div",{sx:{width:"100%",minWidth:Je||"100%"},children:[e("div",{className:"orb-planning-timeline-header",sx:{display:"grid",gridTemplateColumns:pt,height:Ve,boxSizing:"border-box",borderBottom:`1px solid ${E.palette.divider}`,position:"sticky",top:0,zIndex:2},children:Ne.map(B=>c("div",{title:B.title,sx:{px:.75,display:"flex",flexDirection:B.contextLabel?"column":"row",alignItems:"center",justifyContent:"center",gap:B.contextLabel?.15:0,borderRight:`1px solid ${E.palette.divider}`,color:B.contextLabel?"text.primary":"text.secondary",overflow:"hidden"},children:[B.contextLabel&&e(L,{component:"span",sx:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"text.secondary",fontSize:11,fontWeight:700,lineHeight:1.1},children:B.contextLabel}),e(L,{component:"span",sx:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:12,fontWeight:700,lineHeight:1.15},children:B.label})]},B.key))}),e(se,{sx:{position:"relative"},children:Oe.map(B=>{let Q=de(B),fe=ge[Q]??vc;if(B.type==="group")return e("div",{className:"orb-planning-timeline-row orb-table-group-row","data-planning-timeline-row-key":Q,sx:{position:"relative",height:fe,boxSizing:"border-box",borderBottom:`1px solid ${E.palette.divider}`}},B.id);let Pe=B.data||B,et=ar__default.default(Pe.startDate),Xe=ar__default.default(Pe.endDate),kt=Cc(et,Ne,st),ht=Cc(Xe,Ne,st),gt=Math.max(0,ht-kt),Ct=$g(Pe.progress),no=Pe.id===b,Et=Ee(Pe.id),jt=be.activeId===Pe.id,Ht=be.overId===Pe.id&&_e(be.activeId,Pe.id),Kt=Pe.color??(Pe.statusTone==="blocked"?E.palette.error.main:E.palette.primary.main);return e("div",{className:`orb-planning-timeline-row ${no?"orb-is-selected":""}`,"data-planning-timeline-row-key":Q,draggable:Et,onDragStart:$t=>je($t,Pe),onDragOver:$t=>mt($t,Pe.id),onDragEnter:$t=>mt($t,Pe.id),onDrop:$t=>ft($t,Pe.id),onDragEnd:Mt,onClick:()=>C?.(Ze.get(Pe.id)||Pe),sx:{position:"relative",height:fe,boxSizing:"border-box",borderBottom:`1px solid ${E.palette.divider}`,opacity:jt?.56:1,"&::before":{content:'""',position:"absolute",top:0,left:0,right:0,height:2,backgroundColor:E.palette.primary.main,opacity:Ht?1:0,transition:"opacity 120ms ease",pointerEvents:"none",zIndex:3},backgroundImage:vt()==="dark"?"linear-gradient(90deg, color-mix(in oklch, var(--orb-muted) 8%, transparent) 1px, transparent 1px)":"linear-gradient(90deg, color-mix(in oklch, var(--orb-fg) 6%, transparent) 1px, transparent 1px)",backgroundSize:Bt,cursor:jt?"grabbing":Et?"grab":C?"pointer":"default",transition:"opacity 120ms ease"},children:e(ct,{title:`${Pe.title}: ${et.format("MMM D HH:mm")} - ${Xe.format("MMM D HH:mm")}`,children:c("div",{sx:{position:"absolute",left:`${kt}%`,top:Math.max(8,(fe-24)/2),width:`max(18px, ${gt}%)`,height:24,borderRadius:999,overflow:"hidden",backgroundColor:vt()==="dark"?"color-mix(in oklch, var(--orb-muted) 18%, transparent)":"color-mix(in oklch, var(--orb-fg) 10%, transparent)",outline:no?`2px solid ${E.palette.warning.main}`:"none",outlineOffset:2},children:[e("div",{sx:{height:"100%",width:`${Ct}%`,backgroundColor:Kt}}),e(L,{sx:{position:"absolute",inset:0,px:1,display:"flex",alignItems:"center",color:"var(--orb-on-primary)",fontSize:11,fontWeight:800,textShadow:"0 1px 4px rgba(0,0,0,0.45)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:Pe.code})]})})},Pe.id)})})]})})})]})}),e(pn,{groupAnchorEl:oe.groupAnchorEl,setGroupAnchorEl:oe.setGroupAnchorEl,grouping:oe.grouping,setGrouping:oe.setGrouping,columns:oe.columns}),e(un,{anchorEl:oe.anchorEl,setAnchorEl:oe.setAnchorEl,columns:oe.columns,visibleColumns:oe.visibleColumns,toggleColumnVisibility:oe.toggleColumnVisibility}),e(zp,{contextMenu:tt,handleClose:()=>nt(null),columns:oe.columns,visibleColumns:oe.visibleColumns,grouping:oe.grouping,summaryColumns:oe.summaryColumns,showSummary:oe.showSummary,sortBy:oe.sortBy,orderBy:oe.orderBy,order:oe.order,onSortAsc:B=>{oe.applyMultiSort([{field:B,direction:"asc"}]);},onSortDesc:B=>{oe.applyMultiSort([{field:B,direction:"desc"}]);},onClearSort:B=>{let Q=oe.sortBy.filter(fe=>fe.field!==B);Q.length>0?oe.applyMultiSort(Q):(oe.clearMultiSort(),oe.orderBy===B&&oe.setOrderBy(""));},onHideColumn:B=>{oe.visibleColumns.includes(B)&&oe.toggleColumnVisibility(B);},onToggleGroup:B=>oe.toggleGroupField(B),onToggleSummary:B=>oe.toggleSummaryColumn(B),onOpenSortDialog:()=>q(true)}),e(Vp,{open:it,onClose:()=>q(false),columns:oe.columns,initialRules:oe.sortBy.length>0?oe.sortBy:oe.orderBy?[{field:oe.orderBy,direction:oe.order}]:[],onApply:B=>oe.applyMultiSort(B),onClear:()=>{oe.clearMultiSort(),oe.setOrderBy("");}})]})};P();var IV=({filterProps:t,ganttProps:o,spacing:r=2,sx:n,children:a})=>{let i=n?[{height:"100%",overflow:"hidden"},n]:{height:"100%",overflow:"hidden"},s=o.sx?[{height:"100%"},o.sx]:{height:"100%"};return c(se,{spacing:r,sx:i,children:[e("div",{sx:{flexShrink:0},children:e(_o,{...t})}),e("div",{sx:{flex:1,minHeight:0,overflow:"hidden"},children:e(Kg,{...o,bodyHeight:o.bodyHeight??"100%",sx:s})}),a]})};P();var qg=640,O0=360,F0=360,Hs=8,Ln="220ms cubic-bezier(0.2, 0, 0, 1)",Sc=(t,o,r=0,n=[])=>t.flatMap(a=>{let i=a.children??[],s=[{node:a,level:r,hasChildren:i.length>0,parentIds:n}];return o.has(a.id)?[...s,...Sc(i,o,r+1,[...n,a.id])]:s}),Yg=t=>t.flatMap(o=>[o,...Yg(o.children??[])]),Zg=(t,o=0,r=[])=>t.flatMap(n=>{let a=n.children??[];return [{node:n,level:o,hasChildren:a.length>0,parentIds:r},...Zg(a,o+1,[...r,n.id])]}),jg=t=>t.flatMap(o=>{let r=o.children??[];return r.length===0?[]:[o.id,...jg(r)]}),Xg=t=>Object.entries(t).filter(([o])=>o!=="children").map(([,o])=>o==null?"":typeof o=="string"||typeof o=="number"||typeof o=="boolean"?String(o):"").join(" ").toLowerCase(),HV=({title:t,subtitle:o,nodes:r,columns:n,detail:a,selectedNodeId:i,defaultSelectedNodeId:s,onNodeSelect:l,expandedNodeIds:d,defaultExpandedNodeIds:p,onExpandedNodeIdsChange:m,defaultPaneMode:f="split",minTreePaneWidth:h=O0,minDetailPaneWidth:u=F0,tableAppId:v="ctree-comp",tableKey:y="default",tableTitle:g,filterConfig:x,searchQuery:b,searchToken:C,defaultRowsPerPage:k=-1,rowsPerPageOptions:S=[20,50,100,-1],serviceUrl:T,emptyLabel:I="No tree items available.",headerAction:w,sx:M,className:A})=>{let R=so(),D=eo.useRef(null),E=eo.useRef(null),O=eo.useRef(null),[_,J]=eo.useState(s??r[0]?.id??null),[F,V]=eo.useState(p??jg(r).slice(0,3)),[z,X]=eo.useState(f),[W,H]=eo.useState(qg),[U,Y]=eo.useState(0),[ue,re]=eo.useState(0),[ge,we]=eo.useState(k),Ve=eo.useMemo(()=>n&&n.length>0?n:[{id:"label",label:"Name",render:de=>c(se,{spacing:.3,children:[e(L,{sx:{fontSize:15,fontWeight:700,lineHeight:1.15},children:de.label}),de.subtitle&&e(L,{sx:{fontSize:13,color:"text.secondary",lineHeight:1.2},children:de.subtitle})]})}],[n]),Te=eo.useMemo(()=>new Set(d??F),[d,F]),Ie=eo.useMemo(()=>Sc(r,Te),[r,Te]),He=eo.useMemo(()=>Yg(r),[r]),ce=eo.useMemo(()=>Zg(r),[r]),be=i===void 0?_:i,We=eo.useMemo(()=>He.find(de=>de.id===be)??null,[be,He]),tt=de=>{let ye=E.current?.clientWidth??0,te=ye>0?Math.max(h,ye-Hs-u):Math.max(h,de);return Math.min(Math.max(de,h),te)},nt=z==="detail",it=z==="tree"||!a,q=z==="split"&&!!a,Ce=(()=>{if(U<=0)return null;if(z==="tree"||!a)return {treeWidth:U,splitterWidth:0,detailWidth:0};if(z==="detail")return {treeWidth:0,splitterWidth:0,detailWidth:U};let de=q?Hs:0,ye=tt(W);return {treeWidth:ye,splitterWidth:de,detailWidth:Math.max(0,U-de-ye)}})(),Fe=Ce?`${Ce.treeWidth}px ${Ce.splitterWidth}px ${Ce.detailWidth}px`:z==="tree"||!a?"minmax(0, 1fr) 0px 0px":z==="detail"?"0px 0px minmax(0, 1fr)":`minmax(${h}px, ${W}px) ${Hs}px minmax(${u}px, 1fr)`;eo.useEffect(()=>{let de=E.current;if(!de){Y(0);return}let ye=0,te=()=>{window.cancelAnimationFrame(ye),ye=window.requestAnimationFrame(()=>{let Ne=de.clientWidth;Y(Je=>Math.abs(Je-Ne)<.5?Je:Ne);});};if(te(),typeof ResizeObserver>"u")return window.addEventListener("resize",te),()=>{window.cancelAnimationFrame(ye),window.removeEventListener("resize",te);};let ve=new ResizeObserver(te);return ve.observe(de),window.addEventListener("resize",te),()=>{window.cancelAnimationFrame(ye),ve.disconnect(),window.removeEventListener("resize",te);}},[]);let at=de=>{d===void 0&&V(de),m?.(de);},Ze=de=>{let ye=new Set(Te);ye.has(de)?ye.delete(de):ye.add(de),at(Array.from(ye));},wt=de=>{i===void 0&&J(de.id),l?.(de);};eo.useEffect(()=>{re(0);},[r]),eo.useEffect(()=>{let de=b?.trim().toLowerCase();if(!de)return;let ye=ce.find(({node:pt})=>Xg(pt).includes(de));if(!ye)return;let te=new Set(Te);ye.parentIds.forEach(pt=>te.add(pt)),at(Array.from(te)),wt(ye.node);let Ne=Sc(r,te).findIndex(({node:pt})=>pt.id===ye.node.id);Ne>=0&&ge>0&&re(Math.floor(Ne/ge));let Je=0,st=0;return Je=window.requestAnimationFrame(()=>{st=window.requestAnimationFrame(()=>{let pt=D.current?.querySelector("tr.orb-selected"),Bt=pt?.closest(".orb-table-container");if(pt&&Bt){let Yt=Bt.getBoundingClientRect(),Vt=pt.getBoundingClientRect(),St=Vt.top-Yt.top+Bt.scrollTop;Bt.scrollTo({top:St-Bt.clientHeight/2+Vt.height/2,behavior:"smooth"});return}pt?.scrollIntoView({block:"center",behavior:"smooth"});});}),()=>{window.cancelAnimationFrame(Je),window.cancelAnimationFrame(st);}},[b,C,ce,r,ge]);let Rt=eo.useMemo(()=>Ie.map(({node:de,level:ye,hasChildren:te})=>({...de,id:de.id,__node:de,__level:ye,__hasChildren:te,__expanded:Te.has(de.id),__searchText:Xg(de)})),[Te,Ie]),Ot=eo.useMemo(()=>Ve.map((de,ye)=>({id:de.id,label:de.label,minWidth:typeof de.width=="number"?de.width:de.minWidth??(ye===0?320:120),numeric:de.numeric??de.align==="right",render:(te,ve)=>{let Ne=ve.__node,Je=de.render?de.render(Ne):Ne[de.id];if(ye!==0)return e(Re,{sx:{minWidth:0,color:de.align==="right"?"text.primary":"text.secondary",fontWeight:de.align==="right"?750:500,textAlign:de.align??"left"},children:Je});let st=Number(ve.__level??0),pt=!!ve.__hasChildren,Bt=!!ve.__expanded;return c(se,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0,pl:`${st*24}px`},children:[e(ie,{tooltip:pt?Bt?"Collapse":"Expand":"",onClick:Yt=>{Yt.stopPropagation(),pt&&Ze(Ne.id);},disabled:!pt,sx:{width:24,height:24,visibility:pt?"visible":"hidden",transform:Bt?"rotate(0deg)":"rotate(-90deg)",transition:"transform 160ms ease"},children:e($o,{sx:{fontSize:20}})}),e(Re,{sx:{width:10,height:10,borderRadius:"50%",flexShrink:0,backgroundColor:Ne.markerColor??R.palette.primary.main}}),e(Re,{sx:{minWidth:0},children:Je})]})}})),[Ve,Te,R.palette.primary.main]),At=de=>{if(!q)return;de.preventDefault(),de.currentTarget.setPointerCapture(de.pointerId),O.current={startX:de.clientX,startWidth:W};let ye=ve=>{let Ne=O.current;Ne&&H(tt(Ne.startWidth+ve.clientX-Ne.startX));},te=()=>{O.current=null,window.removeEventListener("pointermove",ye),window.removeEventListener("pointerup",te),document.body.style.cursor="",document.body.style.userSelect="";};document.body.style.cursor="col-resize",document.body.style.userSelect="none",window.addEventListener("pointermove",ye),window.addEventListener("pointerup",te);},oe=()=>{let de=E.current?.clientWidth??0,ye=de>0?Math.max(h,(de-Hs)/2):qg;X("split"),H(tt(ye));},Ke=()=>a?typeof a=="function"?a(We):a:null,Oe=a?e(Gn,{"aria-label":"Tree pane layout",value:z,options:[{value:"tree",label:"Expand tree",icon:e(ui,{fontSize:"small"})},{value:"split",label:"Split evenly",icon:e(gi,{fontSize:"small"})},{value:"detail",label:"Expand detail",icon:e(pi,{fontSize:"small"})}],onValueChange:de=>{de==="split"?oe():X(de);},sx:{position:"absolute",top:13,right:56,zIndex:3,backdropFilter:"blur(10px)"}}):null;return c(Re,{ref:D,className:["ctree_comp",A].filter(Boolean).join(" "),sx:{position:"relative",height:"100%",minHeight:0,border:`1px solid ${R.palette.divider}`,borderRadius:"var(--orb-r-container)",overflow:"hidden",backgroundColor:"background.paper",boxShadow:`0 18px 42px ${ot(R.palette.common.black,vt()==="dark"?.24:.08)}`,...M},children:[Oe,c(Re,{ref:E,sx:{height:"100%",display:"grid",gridTemplateColumns:Fe,transition:`grid-template-columns ${Ln}`,minWidth:0},children:[c(Re,{"aria-hidden":nt?true:void 0,sx:{minWidth:0,overflow:"hidden",display:"flex",flexDirection:"column",opacity:nt?0:1,transform:nt?"translateX(-12px)":"translateX(0)",pointerEvents:nt?"none":"auto",transition:`opacity ${Ln}, transform ${Ln}`,willChange:"opacity, transform"},children:[c(se,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:2,sx:{px:2,py:1.5,minHeight:74,borderBottom:`1px solid ${R.palette.divider}`},children:[c(se,{direction:"row",alignItems:"center",spacing:1.4,sx:{minWidth:0},children:[e(wr,{sx:{color:"primary.main",fontSize:28}}),c(Re,{sx:{minWidth:0},children:[e(L,{sx:{fontSize:20,fontWeight:750,lineHeight:1.12},noWrap:true,children:t}),o&&e(L,{sx:{fontSize:14,color:"text.secondary",mt:.3},noWrap:true,children:o})]})]}),w!==void 0?w:e(ie,{tooltip:"Add node",color:"default",children:e(Hr,{fontSize:"small"})})]}),c(Re,{sx:{flex:1,minHeight:0,overflow:"hidden"},children:[e(tr,{appId:v,tableKey:y,title:g??(typeof t=="string"?t:"Tree"),columns:Ot,rows:Rt,rowKey:"id",fitContainer:true,fullWidth:true,showSummary:false,selectionMode:"single",selected:be?[be]:[],onSelectionChange:de=>{let ye=de[de.length-1],te=He.find(ve=>ve.id===ye);te&&wt(te);},page:ue,rowsPerPage:ge,rowsPerPageOptions:S,count:Rt.length,onPageChange:re,onRowsPerPageChange:de=>{re(0),we(de);},filterConfig:x,serviceUrl:T,graphReport:{enabled:false},disableGrouping:true,disableSorting:true,maxHeight:"100%"}),Rt.length===0&&e(Re,{sx:{minHeight:220,display:"grid",placeItems:"center",color:"text.secondary"},children:I})]})]}),e(Re,{"data-ctree-splitter":"true",role:"separator","aria-orientation":"vertical",onPointerDown:q?At:void 0,sx:{width:"100%",cursor:q?"col-resize":"default",backgroundColor:q?ot(R.palette.text.primary,vt()==="dark"?.16:.08):"transparent",opacity:q?1:0,pointerEvents:q?"auto":"none",position:"relative",transition:`opacity ${Ln}, background-color 120ms ease`,"&:hover":{backgroundColor:q?ot(R.palette.primary.main,vt()==="dark"?.35:.18):"transparent"}}}),c(Re,{"aria-hidden":it?true:void 0,sx:{minWidth:0,overflow:"hidden",display:"flex",flexDirection:"column",opacity:it?0:1,transform:it?"translateX(12px)":"translateX(0)",pointerEvents:it?"none":"auto",transition:`opacity ${Ln}, transform ${Ln}`,willChange:"opacity, transform"},children:[e(Re,{sx:{px:2,pt:2,minHeight:74,display:"flex",alignItems:"flex-end"},children:e(Dt,{sx:{width:"100%"}})}),e(Re,{sx:{flex:1,minHeight:0,overflow:"auto",px:2,pb:2},children:Ke()})]})]})]})};P();var V0={none:{from:{},to:{}},fade:{from:{opacity:0},to:{opacity:1}},"slide-up":{from:{opacity:0,transform:"translate3d(0, 12px, 0)"},to:{opacity:1,transform:"translate3d(0, 0, 0)"}},"slide-left":{from:{opacity:0,transform:"translate3d(12px, 0, 0)"},to:{opacity:1,transform:"translate3d(0, 0, 0)"}},scale:{from:{opacity:0,transform:"scale(0.985)"},to:{opacity:1,transform:"scale(1)"}}},_V=({children:t,transitionKey:o,variant:r="fade",durationMs:n=220,delayMs:a=0,easing:i="cubic-bezier(0.22, 1, 0.36, 1)",disabled:s=false,sx:l})=>{let d=xr("(prefers-reduced-motion: reduce)"),[p,m]=eo.useState("to"),f=!s&&!d&&r!=="none";eo.useEffect(()=>{if(!f){m("to");return}m("from");let v=requestAnimationFrame(()=>{v=requestAnimationFrame(()=>{m("to");});});return ()=>cancelAnimationFrame(v)},[o,f]);let h=V0[r],u=eo.useMemo(()=>f?p==="from"?h.from:h.to:{opacity:1,transform:"none"},[f,p,h.from,h.to]);return e(Re,{sx:{willChange:f?"opacity, transform":"auto",transition:f?`opacity ${n}ms ${i} ${a}ms, transform ${n}ms ${i} ${a}ms`:"none",backfaceVisibility:"hidden",...u,...l},children:t})},GV={subtle:{variant:"fade",durationMs:180},smooth:{variant:"slide-up",durationMs:220},snappy:{variant:"scale",durationMs:160}};exports.AIBrowserGlow=h5;exports.Activity=Oc;exports.AgentPanel=Jm;exports.AlertCircle=Da;exports.AlertTriangle=Fc;exports.ArrowDown=mw;exports.ArrowRight=gw;exports.ArrowUp=Bc;exports.BarChart=_s;exports.Bot=fw;exports.Button=js;exports.CAINavProvider=qy;exports.CAlert=rn;exports.CAmapChart=Xp;exports.CAppHeader=qi;exports.CAppHeaderSearch=Dl;exports.CAppPageLayout=WE;exports.CAuthPage=V5;exports.CAvatar=on;exports.CBadge=Ka;exports.CBarChart=ra;exports.CButton=ke;exports.CCalendar=Kn;exports.CCardDetailPanel=cu;exports.CCardGrid=pu;exports.CCardGridCard=Xb;exports.CCardPage=bN;exports.CChartCard=Ti;exports.CCheckbox=It;exports.CChip=xt;exports.CComboChart=_p;exports.CCustomizeAgent=Zp;exports.CDatePicker=uh;exports.CDetailInfoPage=zA;exports.CDetailSearchAiBar=yu;exports.CDetailSectionCard=$i;exports.CDialog=Lt;exports.CDivider=Dt;exports.CFileUpload=gh;exports.CFilterField=QT;exports.CFishboneChart=Up;exports.CGoogleMapChart=qp;exports.CGraphCharts=Yp;exports.CGraphKpiCards=Wp;exports.CGraphReport=Di;exports.CHeatmapChart=Gp;exports.CIconButton=ie;exports.CKanbanBoard=mE;exports.CKanbanBucket=ku;exports.CKanbanCard=kl;exports.CLayoutManagement=au;exports.CLayoutManager=hn;exports.CLineChart=$p;exports.CList=_T;exports.CListItem=GT;exports.CListItemAvatar=YT;exports.CListItemButton=UT;exports.CListItemIcon=KT;exports.CListItemText=qT;exports.CListSubheader=XT;exports.CMenu=Qt;exports.CMessageBox=Qn;exports.CMetricChartCard=Cs;exports.COrbCanvas=By;exports.CPageLayout=bi;exports.CPageTransition=_V;exports.CPaper=Ae;exports.CPieChart=Ii;exports.CPivotTable=MO;exports.CPlanningGantt=Kg;exports.CPlanningLayout=IV;exports.CPopover=Xs;exports.CProgress=_n;exports.CRadioGroup=Hf;exports.CSegmentedControl=Gn;exports.CSelect=zt;exports.CSkeleton=Uf;exports.CSmartFilter=_o;exports.CSmartTable=FD;exports.CSpinner=Zo;exports.CStack=se;exports.CStandardPage=_D;exports.CStatusBadge=VT;exports.CSwitch=Ua;exports.CTable=tr;exports.CTableBody=ND;exports.CTableCell=AD;exports.CTableContainer=ED;exports.CTableHead=LD;exports.CTableRow=OD;exports.CTabs=lh;exports.CTextArea=$n;exports.CTextField=ze;exports.CTooltip=ct;exports.CTreeComp=HV;exports.CTypography=L;exports.CValueHelp=Ap;exports.CVariantManagement=Li;exports.CVariantManager=eu;exports.CVoiceWaveOverlay=Vl;exports.CWaterfallChart=Kp;exports.Calendar=Gs;exports.CalendarDays=hw;exports.Camera=bw;exports.ChartNoAxesCombined=vw;exports.Check=Ao;exports.CheckCircle=Na;exports.ChevronDown=Ho;exports.ChevronLeft=Aa;exports.ChevronRight=zo;exports.ChevronUp=yw;exports.ChevronsDown=Cw;exports.ChevronsUp=xw;exports.CircleAlert=Ea;exports.CircleCheck=Hn;exports.CircleCheckBig=ww;exports.CircleStop=Hc;exports.Clipboard=zc;exports.ClipboardCheck=Sw;exports.ClipboardList=kw;exports.Clock=Vc;exports.CodeBlock=ca;exports.Columns3=Pw;exports.CopilotChat=m5;exports.Copy=Yo;exports.CopyPlus=Tw;exports.Delete=Iw;exports.Download=La;exports.Edit=Wc;exports.Expand=$c;exports.Eye=Rw;exports.EyeOff=Mw;exports.File=Oa;exports.FileText=_c;exports.Filter=Dw;exports.FloatingAgentPanel=a5;exports.FolderTree=zn;exports.GitBranch=Gc;exports.GlobalMessage=OT;exports.Globe=Vn;exports.Grid=Uc;exports.GripVertical=Nw;exports.Hammer=Aw;exports.Image=Kc;exports.Info=Fa;exports.InputArea=jl;exports.Languages=Ew;exports.Layers=Lw;exports.LayoutDashboard=Ow;exports.Lightbulb=Ba;exports.LineChart=qc;exports.Loader2=Xc;exports.Lock=Ha;exports.LockKeyhole=Fw;exports.LogOut=Yc;exports.METRIC_CHART_TYPES=ys;exports.Mail=Us;exports.MapPin=Zc;exports.MarkdownRenderer=ua;exports.MathBlock=da;exports.Menu=jc;exports.MermaidBlock=hl;exports.MessageCircle=xf;exports.MessageSquare=Qc;exports.Mic=za;exports.MicOff=Bw;exports.Moon=Jc;exports.MoreHorizontal=Hw;exports.NavigationIsland=yd;exports.NavigationIsland2=el;exports.OMPHApprovalCard=n0;exports.OMPHPanel=qz;exports.ORBCAFE_I18N_MESSAGES=Xn;exports.ORB_DARK=tf;exports.ORB_FONT_STACK=$0;exports.ORB_LIGHT=ef;exports.ORB_RADIUS=G0;exports.ORB_TOKENS=Vs;exports.ORB_TRANSITION_FAST=U0;exports.OrbcafeI18nProvider=Ya;exports.OrbisModeProvider=Bn;exports.PAGE_TRANSITION_PRESETS=GV;exports.PAppPageLayout=o2;exports.PBarcodeScanner=qO;exports.PNavIsland=ym;exports.PNumericKeypad=lF;exports.PSmartFilter=gm;exports.PTable=Dy;exports.PTouchCard=eF;exports.PWorkloadNav=fm;exports.PackageCheck=zw;exports.PackageSearch=Vw;exports.PanelLeftOpen=Va;exports.PanelRight=Wa;exports.PanelsTopLeft=Ww;exports.PieChart=ed;exports.Pin=Jr;exports.PivotChartPanel=am;exports.Play=$w;exports.Plus=en;exports.QrCode=_w;exports.ReceiptText=Gw;exports.RefreshCw=$a;exports.Rocket=Uw;exports.RotateCcw=Kw;exports.RotateCw=td;exports.Rows3=qw;exports.SapIcon=Tt;exports.Save=Xw;exports.ScanLine=Yw;exports.Search=Vo;exports.Send=wf;exports.SendHorizontal=od;exports.Settings=tn;exports.ShieldCheck=Zw;exports.Sigma=jw;exports.SortAsc=Qw;exports.SquareSplitHorizontal=Jw;exports.Star=eS;exports.StdChat=jm;exports.Sun=rd;exports.Table2=tS;exports.TableBlock=vl;exports.TabletSmartphone=oS;exports.Terminal=Wn;exports.ThinkBlock=Vi;exports.ThumbsDown=nd;exports.ThumbsUp=ad;exports.Trash2=id;exports.TreeMenu=Yn;exports.TreePine=rS;exports.TrendingDown=sd;exports.TriangleAlert=_a;exports.Truck=nS;exports.UploadCloud=ld;exports.User=Ks;exports.VoiceNavigatorProvider=h2;exports.VoiceWaveOverlay=d2;exports.Volume2=cd;exports.Warehouse=aS;exports.Workflow=iS;exports.X=qt;exports.XCircle=Ga;exports.addKanbanBucket=Pu;exports.buildAmapEmbedUrl=Ri;exports.buildGoogleMapEmbedUrl=na;exports.buildGoogleMapIframe=IM;exports.buttonVariants=yh;exports.createKanbanBoardModel=Iu;exports.createSapIcon=ae;exports.findKanbanCard=Uo;exports.message=IT;exports.messageManager=lr;exports.moveKanbanCard=Ui;exports.omphApprovalLabelsFromI18n=ic;exports.omphLabelsFromI18n=ac;exports.orbAlpha=ot;exports.orbChartSeries=_0;exports.parseMarkdownTable=zi;exports.parseOmphFileHref=ec;exports.renameKanbanBucket=Tu;exports.renderMarkdown=pA;exports.resolveVariantFilters=Bi;exports.resolveVariantLayout=Hi;exports.useAINav=Xy;exports.useAmapEmbedUrl=NN;exports.useAuthPage=N5;exports.useCardPage=wN;exports.useDetailInfo=xu;exports.useGoogleMapEmbedUrl=DN;exports.useGraphChartData=PN;exports.useGraphInteraction=Ai;exports.useGraphReport=mn;exports.useKanbanBoard=vE;exports.useMediaQuery=No;exports.useNavigationIsland=Pd;exports.useOrbMode=fo;exports.useOrbTokens=$s;exports.useOrbcafeI18n=le;exports.usePadLayout=HO;exports.usePadRecordEditor=WO;exports.usePageLayout=Lu;exports.usePivotTable=LO;exports.usePlanningGantt=Vg;exports.usePlanningLayout=X5;exports.useStandardReport=YD;exports.useVoiceInput=wn;exports.useVoiceNavigator=b2;
|
|
235
|
+
`,X5=({active:t=false,colors:o=B0,zIndex:r=2147483e3})=>{let n={"--orbcafe-ai-glow-line":o[0],"--orbcafe-ai-glow-z-index":r};return c(jsxRuntime.Fragment,{children:[e("style",{children:H0}),e("div",{className:"orbcafe-ai-browser-glow","data-active":t?"true":"false",style:n,"aria-hidden":"true"})]})};var dV=({defaultMode:t="login",onLogin:o,onRegister:r,onForgotPassword:n}={})=>{let[a,i]=to.useState(t),[s,l]=to.useState(false),d=to.useCallback(async u=>{l(true);try{await u?.();}finally{l(false);}},[]),p=to.useCallback(u=>d(()=>o?.(u)),[o,d]),m=to.useCallback(u=>d(()=>r?.(u)),[r,d]),h=to.useCallback(u=>d(()=>n?.(u)),[n,d]),f=to.useMemo(()=>({mode:a,loading:s,onModeChange:i,onLogin:p,onRegister:m,onForgotPassword:h}),[h,p,m,s,a]);return {mode:a,loading:s,setMode:i,authPageProps:f}};M();var W0={productName:"ORBCAFE \u2014 Enterprise suite",headline:"We digitalize you.",subheadline:"One sign-in for planning, production and analytics across your value chain.",brandMeta:"ORBCAFE \xB7 Enterprise manufacturing suite",loginTitle:"Sign in",loginSubtitle:"Use your corporate account to continue.",registerTitle:"Create account",registerSubtitle:"Request a demo workspace user for evaluation.",forgotTitle:"Reset password",forgotSubtitle:"Send a password reset request to your email address."},yV=({mode:t,defaultMode:o="login",onModeChange:r,onLogin:n,onRegister:a,onForgotPassword:i,loading:s=false,logo:l,copy:d,sx:p})=>{let m=t!==void 0,[h,f]=to.useState(o),u=t??h,b=to.useMemo(()=>({...W0,...d}),[d]),[y,g]=to.useState({username:"demo@orbcafe.local",password:"orbcafe-demo",remember:true}),[x,v]=to.useState({name:"",email:"",password:"",confirmPassword:"",acceptedTerms:false}),[C,P]=to.useState({email:""}),[S,I]=to.useState(""),R=E=>{m||f(E),I(""),r?.(E);},w=async E=>{E.preventDefault(),await n?.(y),I("Demo login accepted. No real authentication request was sent.");},A=async E=>{E.preventDefault(),await a?.(x),I("Demo registration saved locally for this screen.");},D=async E=>{E.preventDefault(),await i?.(C),I("Demo reset link request created. No email was sent.");},T=u==="login"?b.loginTitle:u==="register"?b.registerTitle:b.forgotTitle,k=u==="login"?b.loginSubtitle:u==="register"?b.registerSubtitle:b.forgotSubtitle;return c("div",{className:"orb-auth-frame orb-root",style:p,children:[c("div",{className:"orb-auth-brand",children:[e("span",{className:"orb-auth-dia",style:{width:230,height:230,right:-70,bottom:-60}}),e("span",{className:"orb-auth-dia orb-auth-dia-sm-hide",style:{width:140,height:140,right:120,bottom:80,borderColor:"rgba(255,255,255,.09)"}}),e("span",{className:"orb-auth-dia orb-auth-dia-sm-hide",style:{width:76,height:76,right:60,bottom:170,background:"color-mix(in oklch, var(--orb-primary) 35%, transparent)",borderColor:"rgba(255,255,255,.2)"}}),l?e("span",{style:{alignSelf:"flex-start",position:"relative"},children:l}):e("span",{className:"orb-logo-slot",children:"Host logo"}),c("div",{className:"orb-auth-claim",children:[e("div",{className:"orb-auth-rule"}),e("h2",{children:b.headline}),e("p",{children:b.subheadline})]}),e("div",{className:"orb-auth-meta",children:b.brandMeta})]}),e("div",{className:"orb-auth-form",children:c("div",{className:"orb-auth-card",children:[e("span",{className:"orb-overline",style:{letterSpacing:"0.12em"},children:b.productName}),e("h1",{className:"orb-h2",style:{margin:0},children:T}),e("p",{className:"orb-body-dense",style:{color:"var(--orb-muted)",margin:"-10px 0 0"},children:k}),S&&e(nn,{severity:"success",children:S}),u==="login"&&c("form",{onSubmit:w,style:{display:"flex",flexDirection:"column",gap:16},children:[e(ze,{label:"Email",type:"email",autoComplete:"username",value:y.username,onChange:E=>g(O=>({...O,username:E.target.value})),startAdornment:e(tl,{size:15,strokeWidth:1.8})}),e(ze,{label:"Password",type:"password",autoComplete:"current-password",value:y.password,onChange:E=>g(O=>({...O,password:E.target.value})),startAdornment:e(_a,{size:15,strokeWidth:1.8})}),c("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12},children:[e(It,{label:"Remember me",checked:y.remember,onChange:E=>g(O=>({...O,remember:E.target.checked}))}),e("button",{type:"button",className:"orb-link",onClick:()=>R("forgot"),children:"Forgot password?"})]}),e(Te,{type:"submit",size:"large",block:true,loading:s,children:s?"Signing in\u2026":"Sign in"}),c("p",{className:"orb-meta",style:{textAlign:"center",margin:0},children:["New user?"," ",e("button",{type:"button",className:"orb-link",onClick:()=>R("register"),children:"Register"})]})]}),u==="register"&&c("form",{onSubmit:A,style:{display:"flex",flexDirection:"column",gap:16},children:[e(ze,{label:"Full name",value:x.name,onChange:E=>v(O=>({...O,name:E.target.value})),startAdornment:e(tl,{size:15,strokeWidth:1.8})}),e(ze,{label:"Work email",type:"email",autoComplete:"username",value:x.email,onChange:E=>v(O=>({...O,email:E.target.value})),startAdornment:e(el,{size:15,strokeWidth:1.8})}),e(ze,{label:"Password",type:"password",autoComplete:"new-password",value:x.password,onChange:E=>v(O=>({...O,password:E.target.value})),startAdornment:e(_a,{size:15,strokeWidth:1.8})}),e(ze,{label:"Confirm password",type:"password",autoComplete:"new-password",value:x.confirmPassword,onChange:E=>v(O=>({...O,confirmPassword:E.target.value}))}),e(It,{label:"I accept the demo workspace terms",checked:x.acceptedTerms,onChange:E=>v(O=>({...O,acceptedTerms:E.target.checked}))}),e(Te,{type:"submit",size:"large",block:true,loading:s,children:"Create demo account"}),c("p",{className:"orb-meta",style:{textAlign:"center",margin:0},children:["Already have an account?"," ",e("button",{type:"button",className:"orb-link",onClick:()=>R("login"),children:"Sign in"})]})]}),u==="forgot"&&c("form",{onSubmit:D,style:{display:"flex",flexDirection:"column",gap:16},children:[e(ze,{label:"Work email",type:"email",autoComplete:"username",value:C.email,onChange:E=>P({email:E.target.value}),startAdornment:e(el,{size:15,strokeWidth:1.8})}),e(Te,{type:"submit",size:"large",block:true,loading:s,children:"Send reset request"}),c("p",{className:"orb-meta",style:{textAlign:"center",margin:0},children:["Remember your password?"," ",e("button",{type:"button",className:"orb-link",onClick:()=>R("login"),children:"Back to sign in"})]})]}),c("div",{style:{display:"flex",alignItems:"center",gap:12,font:"500 10px/1 var(--orb-font)",letterSpacing:"0.1em",textTransform:"uppercase",color:"var(--orb-muted)"},children:[e("span",{style:{flex:1,height:1,background:"var(--orb-border)"}}),"or",e("span",{style:{flex:1,height:1,background:"var(--orb-border)"}})]}),e(Te,{variant:"neutral",size:"large",block:true,children:"Continue with corporate SSO"}),c("p",{className:"orb-meta",style:{textAlign:"center",fontWeight:300,margin:0},children:["Protected by corporate single sign-on.",e("br",{}),"Demo credentials: demo@orbcafe.local / orbcafe-demo"]})]})})]})};var _0={keyword:{value:"",operator:"contains"},status:{value:"",operator:"equals"},owner:{value:"",operator:"contains"},workCenter:{value:"",operator:"contains"}},G0=[{id:"keyword",label:"Keyword",type:"text",placeholder:"Task/ID/Project",hasSearchIcon:true},{id:"status",label:"Status",type:"select",options:[{label:"In progress",value:"in-progress"},{label:"Blocked",value:"blocked"},{label:"Planned",value:"planned"},{label:"Not started",value:"not-started"}]},{id:"owner",label:"Owner",type:"text",placeholder:"Owner name"},{id:"workCenter",label:"Work Center",type:"text",placeholder:"CNC-02 / WH-A / ..."},{id:"dateRange",label:"Date Range",type:"date"}],Jg=({tasks:t,appId:o,tableKey:r,defaultScale:n="week",defaultSelectedTaskId:a,initialFilters:i,filterFields:s,filterAppId:l,filterTableKey:d,serviceUrl:p,variantService:m,layout:h,columns:f,page:u,rowsPerPage:b,rowsPerPageOptions:y,count:g,onPageChange:x,onRowsPerPageChange:v,onFilterSearch:C,onFilterVariantLoad:P,enableRowReorder:S,onTaskReorder:I,onLayoutIdChange:R,onLayoutSave:w})=>{let A=o??l??"planning-gantt",D=r??d??"planning",[T,k]=to.useState(n),[E,O]=to.useState(a??t[0]?.id??""),[$,ee]=to.useState(""),[F,G]=to.useState(null),[W,Q]=to.useState({..._0,...i}),z=to.useMemo(()=>{let ce=String(W.keyword?.value??"").trim().toLowerCase(),fe=String(W.status?.value??"").trim(),Ve=String(W.owner?.value??"").trim().toLowerCase(),ve=String(W.workCenter?.value??"").trim().toLowerCase(),xe=W.dateRange?.value,He=xe?.[0]?ir__default.default(xe[0]):null,pe=xe?.[1]?ir__default.default(xe[1]):null;return t.filter(ye=>{if(ce&&![ye.id,ye.code,ye.title,ye.project,ye.workCenter,ye.owner?.name].join(" ").toLowerCase().includes(ce)||fe&&ye.status!==fe||Ve&&!String(ye.owner?.name??"").toLowerCase().includes(Ve)||ve&&!String(ye.workCenter??"").toLowerCase().includes(ve))return false;if(He||pe){let $e=ir__default.default(ye.startDate),tt=ir__default.default(ye.endDate),at=He?tt.isAfter(He)||tt.isSame(He,"day"):true,st=pe?$e.isBefore(pe)||$e.isSame(pe,"day"):true;if(!at||!st)return false}return true})},[W,t]);to.useEffect(()=>{z.length!==0&&(z.some(ce=>ce.id===E)||O(z[0].id));},[z,E]);let H=to.useCallback(ce=>{O(ce.id);},[]),X=to.useCallback(ce=>{ee(ce),R?.(ce);},[R]),Y=to.useCallback(ce=>{G(fe=>({key:(fe?.key??0)+1,variant:ce})),P?.(ce);},[P]),j=to.useMemo(()=>({appId:A,tableKey:D,fields:s??G0,filters:W,onFilterChange:Q,onVariantLoad:Y,onSearch:C??(()=>{}),currentLayoutId:$,layoutRefs:[{tableKey:D,layoutId:$||null}],variantService:m,serviceUrl:p}),[$,s,W,Y,C,A,D,p,m]),te=to.useMemo(()=>({appId:A,tableKey:D,serviceUrl:p,tasks:z,columns:f,scale:T,onScaleChange:k,page:u,rowsPerPage:b,rowsPerPageOptions:y,count:g,onPageChange:x,onRowsPerPageChange:v,selectedTaskId:E,onTaskSelect:H,enableRowReorder:S,onTaskReorder:I,layout:h,layoutVariant:F?.variant,layoutVariantLoadKey:F?.key,onLayoutIdChange:X,onLayoutSave:w}),[f,g,S,z,X,h,F?.key,F?.variant,x,v,w,I,H,u,A,D,b,y,T,p,E]);return {scale:T,setScale:k,selectedTaskId:E,setSelectedTaskId:O,filters:W,setFilters:Q,filteredTasks:z,smartFilterProps:j,planningGanttProps:te}};var IV=t=>{let o=Jg(t),r=to.useMemo(()=>({filterProps:o.smartFilterProps,ganttProps:o.planningGanttProps}),[o.planningGanttProps,o.smartFilterProps]);return {...o,layoutProps:r}};M();ir__default.default.extend(K0__default.default);var kc=[{value:"hour",label:"Hour",width:56},{value:"day",label:"Day",width:46},{value:"week",label:"Week",width:78},{value:"month",label:"Month",width:104}],Pc=36,Tc=58,Ea=8,Ic=260,J0=320,Kr="220ms cubic-bezier(0.2, 0, 0, 1)",eh={"not-started":{label:"Not started",color:"default"},planned:{label:"Planned",color:"info"},"in-progress":{label:"In progress",color:"primary"},blocked:{label:"Blocked",color:"error"},done:{label:"Done",color:"success"}},ew=t=>t?eh[t]?.label??t:"Planned",tw=t=>t?eh[t]?.color??"default":"info",th=t=>Math.min(100,Math.max(0,t??0)),oh=(t,o=0)=>t.flatMap(r=>[{...r,level:o},...oh(r.children??[],o+1)]),ow=t=>({id:t.id,code:t.code??t.id,title:t.title,titleSub:t.project??t.workCenter??"General",project:t.project??"",workCenter:t.workCenter??"",owner:t.owner?.name??"Unassigned",status:ew(t.status),statusTone:t.status??"planned",progress:th(t.progress),startDate:t.startDate,endDate:t.endDate,color:t.color,reorderable:t.reorderable!==false}),rh=(t,o)=>o==="month"?t.startOf("month"):o==="week"?t.startOf("week"):o==="day"?t.startOf("day"):t.startOf("hour"),nh=(t,o)=>o==="month"?t.endOf("month"):o==="week"?t.endOf("week"):o==="day"?t.endOf("day"):t.endOf("hour"),rw=(t,o,r)=>{let n=[],a=rh(t,r),i=nh(o,r);for(;a.isBefore(i)||a.isSame(i);){let s=r==="month"?a.add(1,"month"):r==="week"?a.add(1,"week"):r==="day"?a.add(1,"day"):a.add(1,"hour");n.push({key:`${r}-${a.valueOf()}`,label:r==="month"?a.format("MMM YYYY"):r==="week"?a.format("MMM D"):r==="day"?a.format("D"):a.format("HH:mm"),contextLabel:r==="hour"?a.format("MMM D"):r==="day"?a.format("MMM"):r==="week"?`W${a.isoWeek()}`:void 0,title:r==="hour"?a.format("MMM D, YYYY HH:mm"):r==="day"?a.format("MMM D, YYYY"):r==="week"?`${a.format("MMM D, YYYY")} - Week ${a.isoWeek()}`:void 0,start:a,end:s}),a=s;}return n},Mc=(t,o,r)=>{let n=0;for(let a of o){if(t.isBefore(a.start))return n;if(t.isBefore(a.end)){let i=Math.max(1,a.end.valueOf()-a.start.valueOf()),s=Math.max(0,t.valueOf()-a.start.valueOf());return n+s/i*r}n+=r;}return n},ah=({appId:t="planning-gantt",tableKey:o="planning",serviceUrl:r,title:n="Project Plan",extraTools:a,bodyHeight:i=560,tasks:s,columns:l,scale:d="week",onScaleChange:p,page:m,rowsPerPage:h=20,rowsPerPageOptions:f=[20,50,100,-1],count:u,onPageChange:b,onRowsPerPageChange:y,timelineStart:g,timelineEnd:x,selectedTaskId:v,onTaskSelect:C,enableRowReorder:P=true,onTaskReorder:S,layout:I,layoutVariant:R,layoutVariantLoadKey:w,onLayoutIdChange:A,onLayoutSave:D,emptyLabel:T="No planning tasks available.",sx:k})=>{let E=lo(),{t:O}=de(),$=to.useRef(null),ee=to.useRef(null),F=to.useRef(null),G=to.useRef(false),[W,Q]=to.useState(null),[z,H]=to.useState("content"),[X,Y]=to.useState(null),[j,te]=to.useState(0),[ce,fe]=to.useState({}),[Ve,ve]=to.useState(Pc),[xe,He]=to.useState([]),pe=to.useRef(void 0),[ye,$e]=to.useState({activeId:null,overId:null}),[tt,at]=to.useState(null),[st,K]=to.useState(false),Ne=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:4}})),Se=to.useRef(null),Fe=to.useMemo(()=>oh(s),[s]),it=to.useMemo(()=>{if(xe.length===0)return Fe;let B=new Map(Fe.map(Ie=>[Ie.id,Ie])),J=xe.map(Ie=>B.get(Ie)).filter(Ie=>!!Ie),he=new Set(J.map(Ie=>Ie.id));return [...J,...Fe.filter(Ie=>!he.has(Ie.id))]},[Fe,xe]),Ye=to.useMemo(()=>new Map(it.map(B=>[B.id,B])),[it]),wt=to.useMemo(()=>it.map(B=>ow(B)),[it]),Mt=to.useMemo(()=>new Map(wt.map(B=>[B.id,B])),[wt]),Ft=to.useMemo(()=>[{id:"code",label:"ID",minWidth:90},{id:"title",label:"Task",minWidth:260,render:(B,J)=>c(le,{spacing:.2,children:[e(L,{sx:{fontSize:15,fontWeight:700,lineHeight:1.2},children:J.title}),e(L,{sx:{fontSize:13,color:"text.secondary"},children:J.titleSub})]})},{id:"owner",label:"Owner",minWidth:170},{id:"status",label:"Status",minWidth:130,render:(B,J)=>e(xt,{label:J.status,color:tw(J.statusTone),size:"small"})},{id:"progress",label:"Progress",minWidth:140,numeric:true,render:B=>c(le,{spacing:.6,children:[c(L,{variant:"caption",sx:{color:"text.secondary"},children:[B,"%"]}),e(Kn,{variant:"determinate",value:B,sx:{height:6,borderRadius:999}})]})},{id:"startDate",label:"Start",minWidth:120},{id:"endDate",label:"End",minWidth:120}],[]),Et=to.useMemo(()=>{if(!l||l.length===0)return Ft;let B=new Map(Ft.map(J=>[J.id,J]));return l.map(J=>{let he=B.get(J.id),Ie=J.width??he?.minWidth??120,et={id:J.id,label:J.label,minWidth:Ie};if(he?.numeric&&(et.numeric=true),J.render){let Xe=J.render;return et.render=(kt,ft)=>{let gt=Ye.get(ft.id);return Xe(gt||ft)},et}return he?.render?(et.render=he.render,et):(et.render=(Xe,kt)=>{let ft=kt[J.id];if(ft!=null&&String(ft).length>0)return String(ft);let Ct=Ye.get(kt.id)?.[J.id];return Ct!=null&&String(Ct).length>0?String(Ct):"-"},et)})},[l,Ft,Ye]),ne=vn({appId:t,tableKey:o,title:n,columns:Et,rows:wt,rowKey:"id",page:m,rowsPerPage:h,rowsPerPageOptions:f,count:u??wt.length,onPageChange:b,onRowsPerPageChange:y,showSummary:false,layout:I,onLayoutSave:D}),Ke=t?e(bn,{appId:t,tableKey:o,currentLayoutData:ne.currentLayoutData,onLayoutLoad:ne.handleLayoutLoad,targetLayoutId:ne.layoutIdToLoad,activeLayoutId:ne.currentLayoutId,serviceUrl:r}):null,Oe=ne.visibleRows;to.useEffect(()=>{let B=Fe.map(J=>J.id);He(J=>{let he=new Set(B),Ie=J.filter(ft=>he.has(ft)),et=new Set(Ie),Xe=B.filter(ft=>!et.has(ft)),kt=[...Ie,...Xe];return kt.length===J.length&&kt.every((ft,gt)=>ft===J[gt])?J:kt});},[Fe]),to.useEffect(()=>{w===void 0||!R||pe.current!==w&&(pe.current=w,ne.handleVariantLoad(R));},[ne,R,w]),to.useEffect(()=>{A?.(ne.currentLayoutId);},[ne.currentLayoutId,A]);let ue=B=>B.type==="group"?`group-${B.id}`:`row-${(B.data||B)?.id}`,we=to.useMemo(()=>{let B=wt.map(gt=>ir__default.default(gt.startDate)),J=wt.map(gt=>ir__default.default(gt.endDate)),he=g?ir__default.default(g):B.reduce((gt,Ct)=>Ct.isBefore(gt)?Ct:gt,B[0]??ir__default.default()),Ie=x?ir__default.default(x):J.reduce((gt,Ct)=>Ct.isAfter(gt)?Ct:gt,J[0]??ir__default.default().add(30,"day")),et=d==="month"?"month":d==="week"?"week":d==="day"?"day":"hour",Xe=d==="month"?"month":d==="week"?"week":d==="day"?"day":"hour",kt=d==="hour"?12:1,ft=d==="hour"?12:1;return {start:rh(he.subtract(kt,et),d),end:nh(Ie.add(ft,Xe),d)}},[wt,d,x,g]),re=kc.find(B=>B.value===d)??kc[1],Ce=Array.isArray(a)?a:a?[a]:[],De=to.useMemo(()=>rw(we.start,we.end,d),[we.end,we.start,d]),Je=De.length*re.width,lt=De.length>0?100/De.length:100,ut=De.length>0?`repeat(${De.length}, minmax(${re.width}px, 1fr))`:"1fr",Ht=De.length>0?`calc(100% / ${De.length}) 100%`:"100% 100%",Yt=(ne.columns||[]).filter(B=>ne.visibleColumns.includes(B.id)).reduce((B,J)=>B+(ne.columnWidths?.[J.id]||J.minWidth||100),0)+(ne.grouping.length>0?72:0),Wt=z==="manual"&&W!==null?W:Yt,St=X==="table",$t=X==="timeline",bt=X==="timeline",At=X==="table",ct=!bt&&!At,Bt=()=>{let B=j||$.current?.clientWidth||0;return B>0?Math.max(Ic,B-Ea-J0):Math.max(Ic,Yt)},jt=B=>Math.min(Math.max(B,Ic),Bt()),V=(()=>{if(j<=0)return null;let B=ct?Ea:0;if(St)return {tableWidth:j,splitterWidth:B,timelineWidth:0};if($t)return {tableWidth:0,splitterWidth:B,timelineWidth:j};if(z==="even"){let he=Math.max(0,(j-B)/2);return {tableWidth:he,splitterWidth:B,timelineWidth:Math.max(0,j-B-he)}}let J=jt(Wt);return {tableWidth:J,splitterWidth:B,timelineWidth:Math.max(0,j-B-J)}})(),Z=V?`${V.tableWidth}px ${V.splitterWidth}px ${V.timelineWidth}px`:St?"minmax(0, 1fr) 0px 0px":$t?"0px 0px minmax(0, 1fr)":z==="even"?`minmax(0, 1fr) ${Ea}px minmax(0, 1fr)`:`${Wt}px ${Ea}px minmax(0, 1fr)`;to.useEffect(()=>{z==="manual"&&Q(B=>B===null?null:jt(B));},[z,Yt,j]);let be=B=>{B.preventDefault(),B.currentTarget.setPointerCapture(B.pointerId),Y(null),H("manual"),Se.current={startX:B.clientX,startWidth:ee.current?.getBoundingClientRect().width??Wt};let J=Ie=>{let et=Se.current;if(!et)return;let Xe=jt(et.startWidth+Ie.clientX-et.startX);Q(Xe);},he=()=>{Se.current=null,window.removeEventListener("pointermove",J),window.removeEventListener("pointerup",he),document.body.style.cursor="",document.body.style.userSelect="";};document.body.style.cursor="col-resize",document.body.style.userSelect="none",window.addEventListener("pointermove",J),window.addEventListener("pointerup",he);},ke=()=>{Y(null),H("even"),Q(null);},Ee=B=>!P||!B?false:Mt.get(B)?.reorderable!==false,_e=(B,J)=>{if(!B||!J||B===J||!Ee(B)||!Ee(J))return false;if(ne.grouping.length===0)return true;let he=Mt.get(B),Ie=Mt.get(J);return !he||!Ie?false:ne.grouping.every(et=>he[et]===Ie[et])},qe=(B,J)=>{if(!_e(B,J))return;let he=Oe.filter(Lt=>Lt.type!=="group").map(Lt=>String((Lt.data||Lt)?.id)),Ie=he.indexOf(B),et=he.indexOf(J);if(Ie<0||et<0)return;let Xe=[...he];[Xe[Ie],Xe[et]]=[Xe[et],Xe[Ie]];let kt=new Set(he),ft=it.map(Lt=>Lt.id),gt=[...Xe,...ft.filter(Lt=>!kt.has(Lt))],Ct=Ye.get(B),ao=Ye.get(J);if(ne.setOrder("asc"),ne.setOrderBy(""),He(gt),Ct&&ao){let{level:Lt,...Qt}=Ct,{level:zt,...qt}=ao,_t=gt.reduce((ro,io)=>{let yo=Ye.get(io);if(yo){let{level:No,...Do}=yo;ro.push(Do);}return ro},[]);S?.(_t,{activeTask:Qt,targetTask:qt});}},je=(B,J)=>{if(!Ee(J.id)){B.preventDefault();return}B.stopPropagation(),B.dataTransfer.effectAllowed="move",B.dataTransfer.setData("text/plain",J.id),$e({activeId:J.id,overId:null}),C?.(Ye.get(J.id)||J);},mt=(B,J)=>{if(!_e(ye.activeId,J)){$e(he=>he.overId===null?he:{...he,overId:null});return}B.preventDefault(),B.stopPropagation(),B.dataTransfer.dropEffect="move",$e(he=>he.overId===J?he:{...he,overId:J});},ht=(B,J)=>{let he=ye.activeId||B.dataTransfer.getData("text/plain");if(!_e(he,J)){$e({activeId:null,overId:null});return}B.preventDefault(),B.stopPropagation(),qe(he,J),$e({activeId:null,overId:null});},Rt=()=>{$e({activeId:null,overId:null});},yt=B=>{if(G.current)return;let J=B==="table"?ee.current:F.current,he=B==="table"?F.current:ee.current;!J||!he||(G.current=true,he.scrollTop=J.scrollTop,window.requestAnimationFrame(()=>{G.current=false;}));};return to.useLayoutEffect(()=>{let B=$.current;if(!B){te(0);return}let J=0,he=()=>{window.cancelAnimationFrame(J),J=window.requestAnimationFrame(()=>{let et=B.clientWidth;te(Xe=>Math.abs(Xe-et)<.5?Xe:et);});};if(he(),typeof ResizeObserver>"u")return window.addEventListener("resize",he),()=>{window.cancelAnimationFrame(J),window.removeEventListener("resize",he);};let Ie=new ResizeObserver(he);return Ie.observe(B),window.addEventListener("resize",he),()=>{window.cancelAnimationFrame(J),Ie.disconnect(),window.removeEventListener("resize",he);}},[wt.length]),to.useLayoutEffect(()=>{if(!v||At)return;let B=F.current,J=ee.current;if(!B)return;let he=`row-${v}`,Ie=Array.from(B.querySelectorAll("[data-planning-timeline-row-key]")).find(kt=>kt.dataset.planningTimelineRowKey===he),et=Mt.get(v);if(!Ie||!et)return;let Xe=window.requestAnimationFrame(()=>{let kt=B.getBoundingClientRect(),ft=Ie.getBoundingClientRect(),gt=Math.max(1,B.clientHeight-Ve),Ct=B.scrollTop+ft.top-kt.top-Ve-(gt-ft.height)/2;G.current=true,B.scrollTop=Math.max(0,Ct),J&&!bt&&(J.scrollTop=B.scrollTop);let ao=Math.max(1,B.scrollWidth),Lt=De.length>0?ao/De.length:re.width,Qt=Mc(ir__default.default(et.startDate),De,Lt),zt=Math.max(0,Qt-Lt);B.scrollLeft=Math.min(zt,Math.max(0,ao-B.clientWidth)),window.requestAnimationFrame(()=>{G.current=false;});});return ()=>window.cancelAnimationFrame(Xe)},[re.width,Ve,v,bt,Mt,At,Oe,De]),to.useLayoutEffect(()=>{let B=ee.current;if(!B)return;let J=0,he=0,Ie=false,et=()=>{if(Ie)return;let zt=B.querySelector("thead"),qt=Array.from(B.querySelectorAll("tbody tr[data-ctable-row-key]"));if(qt.length===0)return;let _t=zt?.getBoundingClientRect().height||Pc,ro={};qt.forEach(io=>{let yo=io.dataset.ctableRowKey;yo&&(ro[yo]=io.getBoundingClientRect().height);}),ve(io=>Math.abs(io-_t)<.01?io:_t),fe(io=>{let yo=Object.keys(io),No=Object.keys(ro);return yo.length===No.length&&No.every(Do=>Math.abs((io[Do]??0)-ro[Do])<.01)?io:ro});},Xe=()=>{window.cancelAnimationFrame(J),J=window.requestAnimationFrame(et);};if(et(),window.cancelAnimationFrame(he),he=window.requestAnimationFrame(()=>{he=window.requestAnimationFrame(et);}),typeof document<"u"&&document.fonts?.ready&&document.fonts.ready.then(()=>{Ie||Xe();}).catch(()=>{}),typeof ResizeObserver>"u")return window.addEventListener("resize",Xe),()=>{Ie=true,window.cancelAnimationFrame(J),window.cancelAnimationFrame(he),window.removeEventListener("resize",Xe);};let kt=new ResizeObserver(Xe),ft=B.querySelector("table"),gt=B.querySelector("tbody"),Ct=B.querySelector("thead");ft&&kt.observe(ft),Ct&&kt.observe(Ct);let ao=new WeakSet,Lt=()=>{B.querySelectorAll("tbody tr[data-ctable-row-key]").forEach(zt=>{ao.has(zt)||(kt.observe(zt),ao.add(zt));});};Lt();let Qt=null;return gt&&typeof MutationObserver<"u"&&(Qt=new MutationObserver(()=>{Lt(),Xe();}),Qt.observe(gt,{childList:true,subtree:true,characterData:true})),window.addEventListener("resize",Xe),()=>{Ie=true,window.cancelAnimationFrame(J),window.cancelAnimationFrame(he),kt.disconnect(),Qt?.disconnect(),window.removeEventListener("resize",Xe);}},[Oe,ne.visibleColumns,ne.grouping,ne.columnWidths]),c(Ae,{className:"orb-ctable-surface orb-planning-gantt",elevation:0,sx:{m:0,p:0,display:"flex",flexDirection:"column",minHeight:0,overflow:"hidden",borderRadius:"var(--orb-r-container)",border:`1px solid ${E.palette.divider}`,...k},children:[e("div",{className:"orb-table-toolbar orb-planning-table-toolbar",role:"toolbar","aria-label":O("table.title.default"),children:c("div",{className:"orb-table-toolbar-primary",children:[e(ki,{value:ne.filterText,onChange:B=>{ne.setFilterText(B),ne.setPage(0);}}),e(Si,{rowsPerPage:ne.rowsPerPage,rowsPerPageOptions:f,page:ne.page,count:ne.totalDisplayCount,onRowsPerPageChange:ne.setRowsPerPage,onPageChange:ne.setPage}),Ce.length>0&&e("div",{className:"orb-table-toolbar-custom",children:Ce.map((B,J)=>e("div",{className:"orb-planning-extra-tool",children:B},`planning-extra-tool-${J}`))}),e("span",{className:"orb-table-toolbar-spacer"}),c("div",{className:"orb-table-toolbar-actions",children:[c("div",{className:"orb-table-tool-group",children:[e(se,{className:"orb-table-tool-button",tooltip:"Column visibility",onClick:B=>ne.setAnchorEl(B.currentTarget),sx:mo,children:e(cn,{fontSize:"small"})}),e(se,{className:"orb-table-tool-button",tooltip:"Group by",onClick:B=>ne.setGroupAnchorEl(B.currentTarget),sx:mo,children:e(Sr,{fontSize:"small"})}),e(se,{className:`orb-table-tool-button ${ne.sortBy.length>0||ne.orderBy?"orb-is-active":""}`,tooltip:"Sort by...",active:ne.sortBy.length>0||!!ne.orderBy,onClick:()=>K(true),sx:mo,children:e(Ip,{fontSize:"small"})})]}),Ke&&e("div",{className:"orb-table-tool-group",children:Ke}),e("div",{className:"orb-table-tool-group orb-planning-pane-controls",children:e(qn,{"aria-label":"Planning pane layout",size:"small",value:X??(z==="even"?"split":null),options:[{value:"table",label:"Expand task table",icon:e(bi,{fontSize:"small"})},{value:"split",label:"Split evenly",icon:e(yi,{fontSize:"small"})},{value:"timeline",label:"Expand timeline",icon:e(fi,{fontSize:"small"})}],onValueChange:B=>{B==="split"?ke():Y(B);}})}),e("div",{className:"orb-table-tool-group orb-planning-scale-control",children:e(Vt,{label:"",value:d,options:kc.map(B=>({value:B.value,label:B.label})),onChange:B=>p?.(B.target.value)})})]})]})}),wt.length===0?e("div",{sx:{minHeight:240,display:"grid",placeItems:"center",color:"text.secondary"},children:T}):e("div",{sx:{overflow:"hidden",flex:1,minHeight:0},children:c("div",{ref:$,sx:{height:"100%",display:"grid",gridTemplateColumns:Z,minWidth:0,transition:`grid-template-columns ${Kr}`},children:[e("div",{"data-planning-scroll-pane":"table",ref:ee,onScroll:()=>yt("table"),sx:{width:"100%",minWidth:0,maxWidth:"100%",height:i,overflowX:"auto",overflowY:"auto",opacity:bt?0:1,transform:bt?"translateX(-10px)":"translateX(0)",pointerEvents:bt?"none":"auto",transition:`opacity ${Kr}, transform ${Kr}`},children:e(core.DndContext,{sensors:Ne,collisionDetection:core.closestCenter,modifiers:[modifiers.restrictToHorizontalAxis],onDragEnd:B=>{let J=B?.active?.id,he=B?.over?.id;typeof J=="string"&&typeof he=="string"&&ne.handleColumnReorder(J,he);},children:c("table",{className:"orb-tbl orb-ctable orb-planning-table",sx:{tableLayout:"fixed",width:Yt,"& thead th":{height:Pc,py:0,lineHeight:1.15,boxSizing:"border-box"}},children:[e(Ii,{columns:ne.columns,visibleColumns:ne.visibleColumns,order:ne.order,orderBy:ne.orderBy,sortBy:ne.sortBy,onRequestSort:ne.handleRequestSort,onContextMenu:(B,J)=>{B.preventDefault(),B.stopPropagation(),at({mouseX:B.clientX+2,mouseY:B.clientY-6,columnId:J});},grouping:ne.grouping,isAllExpanded:ne.isAllExpanded,handleToggleAll:ne.handleToggleAll,columnWidths:ne.columnWidths,onColumnResize:ne.handleColumnResize,enableColumnReorder:true}),e(Mi,{visibleRows:Oe,columns:ne.columns,visibleColumns:ne.visibleColumns,selected:v?[v]:[],expandedGroups:ne.expandedGroups,toggleGroupExpand:ne.toggleGroupExpand,handleExpandGroupRecursively:ne.handleExpandGroupRecursively,handleCollapseGroupRecursively:ne.handleCollapseGroupRecursively,isGroupFullyExpanded:ne.isGroupFullyExpanded,grouping:ne.grouping,rowKeyProp:"id",page:ne.page,rowsPerPage:ne.rowsPerPage,emptyLabel:T,handleClick:(B,J)=>{C?.(Ye.get(J.id)||J);},getRowDataKey:({entry:B})=>ue(B),getGroupRowProps:()=>({style:{height:Tc}}),getRowProps:({data:B})=>{let J=B,he=Ee(J.id),Ie=ye.activeId===J.id,et=ye.overId===J.id&&_e(ye.activeId,J.id);return {draggable:he,className:et?"orb-is-drop-target":void 0,style:{cursor:Ie?"grabbing":he?"grab":C?"pointer":"default",height:Tc,opacity:Ie?.56:1,transition:"background-color 120ms ease, opacity 120ms ease"},onDragStart:Xe=>je(Xe,J),onDragOver:Xe=>mt(Xe,J.id),onDragEnter:Xe=>mt(Xe,J.id),onDrop:Xe=>ht(Xe,J.id),onDragEnd:Rt}}})]})})}),e("div",{onPointerDown:ct?be:void 0,role:"separator","aria-orientation":"vertical",sx:{width:ct?Ea:0,cursor:ct?"col-resize":"default",opacity:ct?1:0,pointerEvents:ct?"auto":"none",borderLeft:ct?`1px solid ${E.palette.divider}`:"0 solid transparent",borderRight:ct?`1px solid ${E.palette.divider}`:"0 solid transparent",backgroundColor:vt()==="dark"?"color-mix(in oklch, var(--orb-muted) 10%, transparent)":"color-mix(in oklch, var(--orb-fg) 4%, transparent)",transition:`width ${Kr}, opacity ${Kr}, background-color 120ms ease`,position:"relative","&:hover":{backgroundColor:E.palette.action.selected},"&::before":{content:'""',position:"absolute",top:0,bottom:0,left:-6,right:-6,cursor:ct?"col-resize":"default"}}}),e("div",{sx:{minWidth:0,overflow:"hidden",opacity:At?0:1,transform:At?"translateX(10px)":"translateX(0)",pointerEvents:At?"none":"auto",transition:`opacity ${Kr}, transform ${Kr}`},children:e("div",{"data-planning-scroll-pane":"timeline",ref:F,onScroll:()=>yt("timeline"),sx:{width:"100%",height:i,overflowX:"auto",overflowY:"auto"},children:c("div",{sx:{width:"100%",minWidth:Je||"100%"},children:[e("div",{className:"orb-planning-timeline-header",sx:{display:"grid",gridTemplateColumns:ut,height:Ve,boxSizing:"border-box",borderBottom:`1px solid ${E.palette.divider}`,position:"sticky",top:0,zIndex:2},children:De.map(B=>c("div",{title:B.title,sx:{px:.75,display:"flex",flexDirection:B.contextLabel?"column":"row",alignItems:"center",justifyContent:"center",gap:B.contextLabel?.15:0,borderRight:`1px solid ${E.palette.divider}`,color:B.contextLabel?"text.primary":"text.secondary",overflow:"hidden"},children:[B.contextLabel&&e(L,{component:"span",sx:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"text.secondary",fontSize:11,fontWeight:700,lineHeight:1.1},children:B.contextLabel}),e(L,{component:"span",sx:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:12,fontWeight:700,lineHeight:1.15},children:B.label})]},B.key))}),e(le,{sx:{position:"relative"},children:Oe.map(B=>{let J=ue(B),he=ce[J]??Tc;if(B.type==="group")return e("div",{className:"orb-planning-timeline-row orb-table-group-row","data-planning-timeline-row-key":J,sx:{position:"relative",height:he,boxSizing:"border-box",borderBottom:`1px solid ${E.palette.divider}`}},B.id);let Ie=B.data||B,et=ir__default.default(Ie.startDate),Xe=ir__default.default(Ie.endDate),kt=Mc(et,De,lt),ft=Mc(Xe,De,lt),gt=Math.max(0,ft-kt),Ct=th(Ie.progress),ao=Ie.id===v,Lt=Ee(Ie.id),Qt=ye.activeId===Ie.id,zt=ye.overId===Ie.id&&_e(ye.activeId,Ie.id),qt=Ie.color??(Ie.statusTone==="blocked"?E.palette.error.main:E.palette.primary.main);return e("div",{className:`orb-planning-timeline-row ${ao?"orb-is-selected":""}`,"data-planning-timeline-row-key":J,draggable:Lt,onDragStart:_t=>je(_t,Ie),onDragOver:_t=>mt(_t,Ie.id),onDragEnter:_t=>mt(_t,Ie.id),onDrop:_t=>ht(_t,Ie.id),onDragEnd:Rt,onClick:()=>C?.(Ye.get(Ie.id)||Ie),sx:{position:"relative",height:he,boxSizing:"border-box",borderBottom:`1px solid ${E.palette.divider}`,opacity:Qt?.56:1,"&::before":{content:'""',position:"absolute",top:0,left:0,right:0,height:2,backgroundColor:E.palette.primary.main,opacity:zt?1:0,transition:"opacity 120ms ease",pointerEvents:"none",zIndex:3},backgroundImage:vt()==="dark"?"linear-gradient(90deg, color-mix(in oklch, var(--orb-muted) 8%, transparent) 1px, transparent 1px)":"linear-gradient(90deg, color-mix(in oklch, var(--orb-fg) 6%, transparent) 1px, transparent 1px)",backgroundSize:Ht,cursor:Qt?"grabbing":Lt?"grab":C?"pointer":"default",transition:"opacity 120ms ease"},children:e(dt,{title:`${Ie.title}: ${et.format("MMM D HH:mm")} - ${Xe.format("MMM D HH:mm")}`,children:c("div",{sx:{position:"absolute",left:`${kt}%`,top:Math.max(8,(he-24)/2),width:`max(18px, ${gt}%)`,height:24,borderRadius:999,overflow:"hidden",backgroundColor:vt()==="dark"?"color-mix(in oklch, var(--orb-muted) 18%, transparent)":"color-mix(in oklch, var(--orb-fg) 10%, transparent)",outline:ao?`2px solid ${E.palette.warning.main}`:"none",outlineOffset:2},children:[e("div",{sx:{height:"100%",width:`${Ct}%`,backgroundColor:qt}}),e(L,{sx:{position:"absolute",inset:0,px:1,display:"flex",alignItems:"center",color:"var(--orb-on-primary)",fontSize:11,fontWeight:800,textShadow:"0 1px 4px rgba(0,0,0,0.45)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:Ie.code})]})})},Ie.id)})})]})})})]})}),e(un,{groupAnchorEl:ne.groupAnchorEl,setGroupAnchorEl:ne.setGroupAnchorEl,grouping:ne.grouping,setGrouping:ne.setGrouping,columns:ne.columns}),e(mn,{anchorEl:ne.anchorEl,setAnchorEl:ne.setAnchorEl,columns:ne.columns,visibleColumns:ne.visibleColumns,toggleColumnVisibility:ne.toggleColumnVisibility}),e(Gp,{contextMenu:tt,handleClose:()=>at(null),columns:ne.columns,visibleColumns:ne.visibleColumns,grouping:ne.grouping,summaryColumns:ne.summaryColumns,showSummary:ne.showSummary,sortBy:ne.sortBy,orderBy:ne.orderBy,order:ne.order,onSortAsc:B=>{ne.applyMultiSort([{field:B,direction:"asc"}]);},onSortDesc:B=>{ne.applyMultiSort([{field:B,direction:"desc"}]);},onClearSort:B=>{let J=ne.sortBy.filter(he=>he.field!==B);J.length>0?ne.applyMultiSort(J):(ne.clearMultiSort(),ne.orderBy===B&&ne.setOrderBy(""));},onHideColumn:B=>{ne.visibleColumns.includes(B)&&ne.toggleColumnVisibility(B);},onToggleGroup:B=>ne.toggleGroupField(B),onToggleSummary:B=>ne.toggleSummaryColumn(B),onOpenSortDialog:()=>K(true)}),e(Up,{open:st,onClose:()=>K(false),columns:ne.columns,initialRules:ne.sortBy.length>0?ne.sortBy:ne.orderBy?[{field:ne.orderBy,direction:ne.order}]:[],onApply:B=>ne.applyMultiSort(B),onClear:()=>{ne.clearMultiSort(),ne.setOrderBy("");}})]})};M();var iW=({filterProps:t,ganttProps:o,spacing:r=2,sx:n,children:a})=>{let i=n?[{height:"100%",overflow:"hidden"},n]:{height:"100%",overflow:"hidden"},s=o.sx?[{height:"100%"},o.sx]:{height:"100%"};return c(le,{spacing:r,sx:i,children:[e("div",{sx:{flexShrink:0},children:e(Uo,{...t})}),e("div",{sx:{flex:1,minHeight:0,overflow:"hidden"},children:e(ah,{...o,bodyHeight:o.bodyHeight??"100%",sx:s})}),a]})};M();var ih=640,nw=360,aw=360,Ks=8,Fn="220ms cubic-bezier(0.2, 0, 0, 1)",Dc=(t,o,r=0,n=[])=>t.flatMap(a=>{let i=a.children??[],s=[{node:a,level:r,hasChildren:i.length>0,parentIds:n}];return o.has(a.id)?[...s,...Dc(i,o,r+1,[...n,a.id])]:s}),lh=t=>t.flatMap(o=>[o,...lh(o.children??[])]),ch=(t,o=0,r=[])=>t.flatMap(n=>{let a=n.children??[];return [{node:n,level:o,hasChildren:a.length>0,parentIds:r},...ch(a,o+1,[...r,n.id])]}),dh=t=>t.flatMap(o=>{let r=o.children??[];return r.length===0?[]:[o.id,...dh(r)]}),sh=t=>Object.entries(t).filter(([o])=>o!=="children").map(([,o])=>o==null?"":typeof o=="string"||typeof o=="number"||typeof o=="boolean"?String(o):"").join(" ").toLowerCase(),bW=({title:t,subtitle:o,nodes:r,columns:n,detail:a,selectedNodeId:i,defaultSelectedNodeId:s,onNodeSelect:l,expandedNodeIds:d,defaultExpandedNodeIds:p,onExpandedNodeIdsChange:m,defaultPaneMode:h="split",minTreePaneWidth:f=nw,minDetailPaneWidth:u=aw,tableAppId:b="ctree-comp",tableKey:y="default",tableTitle:g,filterConfig:x,searchQuery:v,searchToken:C,defaultRowsPerPage:P=-1,rowsPerPageOptions:S=[20,50,100,-1],serviceUrl:I,emptyLabel:R="No tree items available.",headerAction:w,sx:A,className:D})=>{let T=lo(),k=to.useRef(null),E=to.useRef(null),O=to.useRef(null),[$,ee]=to.useState(s??r[0]?.id??null),[F,G]=to.useState(p??dh(r).slice(0,3)),[W,Q]=to.useState(h),[z,H]=to.useState(ih),[X,Y]=to.useState(0),[j,te]=to.useState(0),[ce,fe]=to.useState(P),Ve=to.useMemo(()=>n&&n.length>0?n:[{id:"label",label:"Name",render:ue=>c(le,{spacing:.3,children:[e(L,{sx:{fontSize:15,fontWeight:700,lineHeight:1.15},children:ue.label}),ue.subtitle&&e(L,{sx:{fontSize:13,color:"text.secondary",lineHeight:1.2},children:ue.subtitle})]})}],[n]),ve=to.useMemo(()=>new Set(d??F),[d,F]),xe=to.useMemo(()=>Dc(r,ve),[r,ve]),He=to.useMemo(()=>lh(r),[r]),pe=to.useMemo(()=>ch(r),[r]),ye=i===void 0?$:i,$e=to.useMemo(()=>He.find(ue=>ue.id===ye)??null,[ye,He]),tt=ue=>{let we=E.current?.clientWidth??0,re=we>0?Math.max(f,we-Ks-u):Math.max(f,ue);return Math.min(Math.max(ue,f),re)},at=W==="detail",st=W==="tree"||!a,K=W==="split"&&!!a,Se=(()=>{if(X<=0)return null;if(W==="tree"||!a)return {treeWidth:X,splitterWidth:0,detailWidth:0};if(W==="detail")return {treeWidth:0,splitterWidth:0,detailWidth:X};let ue=K?Ks:0,we=tt(z);return {treeWidth:we,splitterWidth:ue,detailWidth:Math.max(0,X-ue-we)}})(),Fe=Se?`${Se.treeWidth}px ${Se.splitterWidth}px ${Se.detailWidth}px`:W==="tree"||!a?"minmax(0, 1fr) 0px 0px":W==="detail"?"0px 0px minmax(0, 1fr)":`minmax(${f}px, ${z}px) ${Ks}px minmax(${u}px, 1fr)`;to.useEffect(()=>{let ue=E.current;if(!ue){Y(0);return}let we=0,re=()=>{window.cancelAnimationFrame(we),we=window.requestAnimationFrame(()=>{let De=ue.clientWidth;Y(Je=>Math.abs(Je-De)<.5?Je:De);});};if(re(),typeof ResizeObserver>"u")return window.addEventListener("resize",re),()=>{window.cancelAnimationFrame(we),window.removeEventListener("resize",re);};let Ce=new ResizeObserver(re);return Ce.observe(ue),window.addEventListener("resize",re),()=>{window.cancelAnimationFrame(we),Ce.disconnect(),window.removeEventListener("resize",re);}},[]);let it=ue=>{d===void 0&&G(ue),m?.(ue);},Ye=ue=>{let we=new Set(ve);we.has(ue)?we.delete(ue):we.add(ue),it(Array.from(we));},wt=ue=>{i===void 0&&ee(ue.id),l?.(ue);};to.useEffect(()=>{te(0);},[r]),to.useEffect(()=>{let ue=v?.trim().toLowerCase();if(!ue)return;let we=pe.find(({node:ut})=>sh(ut).includes(ue));if(!we)return;let re=new Set(ve);we.parentIds.forEach(ut=>re.add(ut)),it(Array.from(re)),wt(we.node);let De=Dc(r,re).findIndex(({node:ut})=>ut.id===we.node.id);De>=0&&ce>0&&te(Math.floor(De/ce));let Je=0,lt=0;return Je=window.requestAnimationFrame(()=>{lt=window.requestAnimationFrame(()=>{let ut=k.current?.querySelector("tr.orb-selected"),Ht=ut?.closest(".orb-table-container");if(ut&&Ht){let Yt=Ht.getBoundingClientRect(),Wt=ut.getBoundingClientRect(),St=Wt.top-Yt.top+Ht.scrollTop;Ht.scrollTo({top:St-Ht.clientHeight/2+Wt.height/2,behavior:"smooth"});return}ut?.scrollIntoView({block:"center",behavior:"smooth"});});}),()=>{window.cancelAnimationFrame(Je),window.cancelAnimationFrame(lt);}},[v,C,pe,r,ce]);let Mt=to.useMemo(()=>xe.map(({node:ue,level:we,hasChildren:re})=>({...ue,id:ue.id,__node:ue,__level:we,__hasChildren:re,__expanded:ve.has(ue.id),__searchText:sh(ue)})),[ve,xe]),Ft=to.useMemo(()=>Ve.map((ue,we)=>({id:ue.id,label:ue.label,minWidth:typeof ue.width=="number"?ue.width:ue.minWidth??(we===0?320:120),numeric:ue.numeric??ue.align==="right",render:(re,Ce)=>{let De=Ce.__node,Je=ue.render?ue.render(De):De[ue.id];if(we!==0)return e(Me,{sx:{minWidth:0,color:ue.align==="right"?"text.primary":"text.secondary",fontWeight:ue.align==="right"?750:500,textAlign:ue.align??"left"},children:Je});let lt=Number(Ce.__level??0),ut=!!Ce.__hasChildren,Ht=!!Ce.__expanded;return c(le,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0,pl:`${lt*24}px`},children:[e(se,{tooltip:ut?Ht?"Collapse":"Expand":"",onClick:Yt=>{Yt.stopPropagation(),ut&&Ye(De.id);},disabled:!ut,sx:{width:24,height:24,visibility:ut?"visible":"hidden",transform:Ht?"rotate(0deg)":"rotate(-90deg)",transition:"transform 160ms ease"},children:e(Go,{sx:{fontSize:20}})}),e(Me,{sx:{width:10,height:10,borderRadius:"50%",flexShrink:0,backgroundColor:De.markerColor??T.palette.primary.main}}),e(Me,{sx:{minWidth:0},children:Je})]})}})),[Ve,ve,T.palette.primary.main]),Et=ue=>{if(!K)return;ue.preventDefault(),ue.currentTarget.setPointerCapture(ue.pointerId),O.current={startX:ue.clientX,startWidth:z};let we=Ce=>{let De=O.current;De&&H(tt(De.startWidth+Ce.clientX-De.startX));},re=()=>{O.current=null,window.removeEventListener("pointermove",we),window.removeEventListener("pointerup",re),document.body.style.cursor="",document.body.style.userSelect="";};document.body.style.cursor="col-resize",document.body.style.userSelect="none",window.addEventListener("pointermove",we),window.addEventListener("pointerup",re);},ne=()=>{let ue=E.current?.clientWidth??0,we=ue>0?Math.max(f,(ue-Ks)/2):ih;Q("split"),H(tt(we));},Ke=()=>a?typeof a=="function"?a($e):a:null,Oe=a?e(qn,{"aria-label":"Tree pane layout",value:W,options:[{value:"tree",label:"Expand tree",icon:e(bi,{fontSize:"small"})},{value:"split",label:"Split evenly",icon:e(yi,{fontSize:"small"})},{value:"detail",label:"Expand detail",icon:e(fi,{fontSize:"small"})}],onValueChange:ue=>{ue==="split"?ne():Q(ue);},sx:{position:"absolute",top:13,right:56,zIndex:3,backdropFilter:"blur(10px)"}}):null;return c(Me,{ref:k,className:["ctree_comp",D].filter(Boolean).join(" "),sx:{position:"relative",height:"100%",minHeight:0,border:`1px solid ${T.palette.divider}`,borderRadius:"var(--orb-r-container)",overflow:"hidden",backgroundColor:"background.paper",boxShadow:`0 18px 42px ${ot(T.palette.common.black,vt()==="dark"?.24:.08)}`,...A},children:[Oe,c(Me,{ref:E,sx:{height:"100%",display:"grid",gridTemplateColumns:Fe,transition:`grid-template-columns ${Fn}`,minWidth:0},children:[c(Me,{"aria-hidden":at?true:void 0,sx:{minWidth:0,overflow:"hidden",display:"flex",flexDirection:"column",opacity:at?0:1,transform:at?"translateX(-12px)":"translateX(0)",pointerEvents:at?"none":"auto",transition:`opacity ${Fn}, transform ${Fn}`,willChange:"opacity, transform"},children:[c(le,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:2,sx:{px:2,py:1.5,minHeight:74,borderBottom:`1px solid ${T.palette.divider}`},children:[c(le,{direction:"row",alignItems:"center",spacing:1.4,sx:{minWidth:0},children:[e(Sr,{sx:{color:"primary.main",fontSize:28}}),c(Me,{sx:{minWidth:0},children:[e(L,{sx:{fontSize:20,fontWeight:750,lineHeight:1.12},noWrap:true,children:t}),o&&e(L,{sx:{fontSize:14,color:"text.secondary",mt:.3},noWrap:true,children:o})]})]}),w!==void 0?w:e(se,{tooltip:"Add node",color:"default",children:e(zr,{fontSize:"small"})})]}),c(Me,{sx:{flex:1,minHeight:0,overflow:"hidden"},children:[e(rr,{appId:b,tableKey:y,title:g??(typeof t=="string"?t:"Tree"),columns:Ft,rows:Mt,rowKey:"id",fitContainer:true,fullWidth:true,showSummary:false,selectionMode:"single",selected:ye?[ye]:[],onSelectionChange:ue=>{let we=ue[ue.length-1],re=He.find(Ce=>Ce.id===we);re&&wt(re);},page:j,rowsPerPage:ce,rowsPerPageOptions:S,count:Mt.length,onPageChange:te,onRowsPerPageChange:ue=>{te(0),fe(ue);},filterConfig:x,serviceUrl:I,graphReport:{enabled:false},disableGrouping:true,disableSorting:true,maxHeight:"100%"}),Mt.length===0&&e(Me,{sx:{minHeight:220,display:"grid",placeItems:"center",color:"text.secondary"},children:R})]})]}),e(Me,{"data-ctree-splitter":"true",role:"separator","aria-orientation":"vertical",onPointerDown:K?Et:void 0,sx:{width:"100%",cursor:K?"col-resize":"default",backgroundColor:K?ot(T.palette.text.primary,vt()==="dark"?.16:.08):"transparent",opacity:K?1:0,pointerEvents:K?"auto":"none",position:"relative",transition:`opacity ${Fn}, background-color 120ms ease`,"&:hover":{backgroundColor:K?ot(T.palette.primary.main,vt()==="dark"?.35:.18):"transparent"}}}),c(Me,{"aria-hidden":st?true:void 0,sx:{minWidth:0,overflow:"hidden",display:"flex",flexDirection:"column",opacity:st?0:1,transform:st?"translateX(12px)":"translateX(0)",pointerEvents:st?"none":"auto",transition:`opacity ${Fn}, transform ${Fn}`,willChange:"opacity, transform"},children:[e(Me,{sx:{px:2,pt:2,minHeight:74,display:"flex",alignItems:"flex-end"},children:e(Nt,{sx:{width:"100%"}})}),e(Me,{sx:{flex:1,minHeight:0,overflow:"auto",px:2,pb:2},children:Ke()})]})]})]})};M();var cw={none:{from:{},to:{}},fade:{from:{opacity:0},to:{opacity:1}},"slide-up":{from:{opacity:0,transform:"translate3d(0, 12px, 0)"},to:{opacity:1,transform:"translate3d(0, 0, 0)"}},"slide-left":{from:{opacity:0,transform:"translate3d(12px, 0, 0)"},to:{opacity:1,transform:"translate3d(0, 0, 0)"}},scale:{from:{opacity:0,transform:"scale(0.985)"},to:{opacity:1,transform:"scale(1)"}}},wW=({children:t,transitionKey:o,variant:r="fade",durationMs:n=220,delayMs:a=0,easing:i="cubic-bezier(0.22, 1, 0.36, 1)",disabled:s=false,sx:l})=>{let d=wr("(prefers-reduced-motion: reduce)"),[p,m]=to.useState("to"),h=!s&&!d&&r!=="none";to.useEffect(()=>{if(!h){m("to");return}m("from");let b=requestAnimationFrame(()=>{b=requestAnimationFrame(()=>{m("to");});});return ()=>cancelAnimationFrame(b)},[o,h]);let f=cw[r],u=to.useMemo(()=>h?p==="from"?f.from:f.to:{opacity:1,transform:"none"},[h,p,f.from,f.to]);return e(Me,{sx:{willChange:h?"opacity, transform":"auto",transition:h?`opacity ${n}ms ${i} ${a}ms, transform ${n}ms ${i} ${a}ms`:"none",backfaceVisibility:"hidden",...u,...l},children:t})},SW={subtle:{variant:"fade",durationMs:180},smooth:{variant:"slide-up",durationMs:220},snappy:{variant:"scale",durationMs:160}};exports.AIBrowserGlow=X5;exports.Activity=_c;exports.AgentPanel=ag;exports.AlertCircle=Fa;exports.AlertTriangle=Gc;exports.ArrowDown=Fw;exports.ArrowRight=Bw;exports.ArrowUp=Uc;exports.BarChart=js;exports.Bot=Hw;exports.Button=il;exports.CAINavProvider=iC;exports.CAlert=nn;exports.CAmapChart=Jp;exports.CAppHeader=Qi;exports.CAppHeaderSearch=Wl;exports.CAppPageLayout=dL;exports.CAuthPage=yV;exports.CAvatar=rn;exports.CBadge=ja;exports.CBarChart=ia;exports.CButton=Te;exports.CCalendar=Zn;exports.CCardDetailPanel=gu;exports.CCardGrid=fu;exports.CCardGridCard=sv;exports.CCardPage=VD;exports.CChartCard=Di;exports.CCheckbox=It;exports.CChip=xt;exports.CComboChart=Xp;exports.CCustomizeAgent=tu;exports.CDatePicker=Pf;exports.CDetailInfoPage=lE;exports.CDetailSearchAiBar=ku;exports.CDetailSectionCard=qi;exports.CDialog=Ot;exports.CDivider=Nt;exports.CFileUpload=If;exports.CFilterField=xI;exports.CFishboneChart=Yp;exports.CGoogleMapChart=Qp;exports.CGraphCharts=eu;exports.CGraphKpiCards=Kp;exports.CGraphReport=Oi;exports.CHeatmapChart=Zp;exports.CIconButton=se;exports.CKanbanBoard=FE;exports.CKanbanBucket=Ru;exports.CKanbanCard=Ol;exports.CLayoutManagement=du;exports.CLayoutManager=bn;exports.CLineChart=qp;exports.CList=uI;exports.CListItem=mI;exports.CListItemAvatar=vI;exports.CListItemButton=gI;exports.CListItemIcon=hI;exports.CListItemText=fI;exports.CListSubheader=bI;exports.CMenu=Jt;exports.CMessageBox=ta;exports.CMetricChartCard=Ps;exports.COrbCanvas=Yy;exports.CPageLayout=wi;exports.CPageTransition=wW;exports.CPaper=Ae;exports.CPieChart=Ai;exports.CPivotTable=QO;exports.CPlanningGantt=ah;exports.CPlanningLayout=iW;exports.CPopover=rl;exports.CProgress=Kn;exports.CRadioGroup=Yh;exports.CSegmentedControl=qn;exports.CSelect=Vt;exports.CSkeleton=rf;exports.CSmartFilter=Uo;exports.CSmartTable=aD;exports.CSpinner=Qo;exports.CStack=le;exports.CStandardPage=uD;exports.CStatusBadge=cI;exports.CSwitch=Ya;exports.CTable=rr;exports.CTableBody=eD;exports.CTableCell=tD;exports.CTableContainer=oD;exports.CTableHead=rD;exports.CTableRow=nD;exports.CTabs=xf;exports.CTextArea=Un;exports.CTextField=ze;exports.CTooltip=dt;exports.CTreeComp=bW;exports.CTypography=L;exports.CValueHelp=Bp;exports.CVariantManagement=zi;exports.CVariantManager=au;exports.CVoiceWaveOverlay=jl;exports.CWaterfallChart=jp;exports.Calendar=Qs;exports.CalendarDays=zw;exports.Camera=Vw;exports.ChartNoAxesCombined=Ww;exports.Check=ko;exports.CheckCircle=Ba;exports.ChevronDown=Vo;exports.ChevronLeft=Ha;exports.ChevronRight=Wo;exports.ChevronUp=$w;exports.ChevronsDown=_w;exports.ChevronsUp=Gw;exports.CircleAlert=za;exports.CircleCheck=Vn;exports.CircleCheckBig=Uw;exports.CircleStop=Js;exports.Clipboard=Kc;exports.ClipboardCheck=Kw;exports.ClipboardList=qw;exports.Clock=qc;exports.CodeBlock=ua;exports.Columns3=Xw;exports.CopilotChat=U5;exports.Copy=Lo;exports.CopyPlus=Zw;exports.Delete=Yw;exports.Download=Wn;exports.Edit=Xc;exports.Expand=Zc;exports.Eye=jw;exports.EyeOff=Qw;exports.File=Va;exports.FileText=Yc;exports.Filter=Jw;exports.FloatingAgentPanel=B5;exports.FolderTree=$n;exports.GitBranch=jc;exports.GlobalMessage=nI;exports.Globe=_n;exports.Grid=Qc;exports.GripVertical=eS;exports.Hammer=tS;exports.Image=Jc;exports.Info=Wa;exports.InputArea=Pa;exports.Languages=oS;exports.Layers=rS;exports.LayoutDashboard=nS;exports.Lightbulb=$a;exports.LineChart=ed;exports.Loader2=td;exports.Lock=_a;exports.LockKeyhole=aS;exports.LogOut=od;exports.METRIC_CHART_TYPES=ks;exports.Mail=el;exports.MapPin=rd;exports.MarkdownRenderer=ha;exports.MathBlock=ma;exports.Menu=nd;exports.MermaidBlock=Il;exports.MessageCircle=Eh;exports.MessageSquare=ad;exports.Mic=Ga;exports.MicOff=iS;exports.Moon=id;exports.MoreHorizontal=sS;exports.NavigationIsland=Td;exports.NavigationIsland2=cl;exports.OMPHApprovalCard=T0;exports.OMPHInitial=I0;exports.OMPHPanel=y5;exports.ORBCAFE_I18N_MESSAGES=jn;exports.ORB_DARK=gh;exports.ORB_FONT_STACK=pw;exports.ORB_LIGHT=mh;exports.ORB_RADIUS=mw;exports.ORB_TOKENS=Xs;exports.ORB_TRANSITION_FAST=gw;exports.OrbcafeI18nProvider=ei;exports.OrbisModeProvider=zn;exports.PAGE_TRANSITION_PRESETS=SW;exports.PAppPageLayout=P2;exports.PBarcodeScanner=fF;exports.PNavIsland=km;exports.PNumericKeypad=DF;exports.PSmartFilter=ym;exports.PTable=_y;exports.PTouchCard=SF;exports.PWorkloadNav=Cm;exports.PackageCheck=lS;exports.PackageSearch=cS;exports.PanelLeftOpen=Ua;exports.PanelRight=Ka;exports.PanelsTopLeft=dS;exports.PieChart=sd;exports.Pin=en;exports.PivotChartPanel=dm;exports.Play=pS;exports.Plus=tn;exports.QrCode=uS;exports.ReceiptText=mS;exports.RefreshCw=qa;exports.Rocket=gS;exports.RotateCcw=hS;exports.RotateCw=ld;exports.Rows3=fS;exports.SapIcon=Tt;exports.Save=bS;exports.ScanLine=vS;exports.Search=$o;exports.Send=Lh;exports.SendHorizontal=cd;exports.Settings=on;exports.ShieldCheck=yS;exports.Sigma=CS;exports.SortAsc=xS;exports.SquareSplitHorizontal=wS;exports.Star=SS;exports.StdChat=rg;exports.Sun=dd;exports.Table2=kS;exports.TableBlock=Rl;exports.TabletSmartphone=PS;exports.Terminal=Gn;exports.ThinkBlock=Ui;exports.ThumbsDown=pd;exports.ThumbsUp=ud;exports.Trash2=md;exports.TreeMenu=Qn;exports.TreePine=TS;exports.TrendingDown=gd;exports.TriangleAlert=Xa;exports.Truck=IS;exports.UploadCloud=hd;exports.User=tl;exports.VoiceNavigatorProvider=z2;exports.VoiceWaveOverlay=E2;exports.Volume2=fd;exports.Warehouse=MS;exports.Workflow=RS;exports.X=Xt;exports.XCircle=Za;exports.addKanbanBucket=Nu;exports.buildAmapEmbedUrl=Ei;exports.buildGoogleMapEmbedUrl=sa;exports.buildGoogleMapIframe=YR;exports.buttonVariants=Af;exports.createKanbanBoardModel=Au;exports.createSapIcon=ie;exports.findKanbanCard=qo;exports.message=YT;exports.messageManager=cr;exports.moveKanbanCard=Yi;exports.omphApprovalLabelsFromI18n=gc;exports.omphLabelsFromI18n=Ta;exports.orbAlpha=ot;exports.orbChartSeries=uw;exports.parseMarkdownTable=Gi;exports.parseOmphFileHref=dc;exports.renameKanbanBucket=Du;exports.renderMarkdown=LA;exports.resolveVariantFilters=$i;exports.resolveVariantLayout=_i;exports.useAINav=sC;exports.useAmapEmbedUrl=eA;exports.useAuthPage=dV;exports.useCardPage=UD;exports.useDetailInfo=Tu;exports.useGoogleMapEmbedUrl=JD;exports.useGraphChartData=XD;exports.useGraphInteraction=Bi;exports.useGraphReport=gn;exports.useKanbanBoard=WE;exports.useMediaQuery=Eo;exports.useNavigationIsland=Ad;exports.useOrbMode=bo;exports.useOrbTokens=Ys;exports.useOrbcafeI18n=de;exports.usePadLayout=sF;exports.usePadRecordEditor=dF;exports.usePageLayout=zu;exports.usePivotTable=rF;exports.usePlanningGantt=Jg;exports.usePlanningLayout=IV;exports.useStandardReport=vD;exports.useVoiceInput=Sn;exports.useVoiceNavigator=V2;
|