orbcafe-ui 1.4.5 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -17
- package/dist/COrbCanvas-4PZFJUYO.mjs +1 -0
- package/dist/chunk-7TUSE6H4.mjs +183 -0
- package/dist/fonts/NOTICE.txt +7 -0
- package/dist/fonts/SAP-icons-LICENSE.txt +202 -0
- package/dist/fonts/SAP-icons.ttf +0 -0
- package/dist/fonts/SAP-icons.woff2 +0 -0
- package/dist/index.d.mts +1252 -202
- package/dist/index.d.ts +1252 -202
- package/dist/index.js +26 -47
- package/dist/index.mjs +25 -46
- package/dist/orbis.css +2519 -0
- package/package.json +26 -10
- package/dist/COrbCanvas-EGX5NO3Y.mjs +0 -1
- package/dist/chunk-74Z76O3S.mjs +0 -183
- package/dist/index.css +0 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var ogl=require('ogl'),Qt=require('react'),jsxRuntime=require('react/jsx-runtime'),navigation=require('next/navigation'),lucideReact=require('lucide-react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),reactSlot=require('@radix-ui/react-slot'),classVarianceAuthority=require('class-variance-authority'),Jp=require('@mui/material/Dialog'),em=require('@mui/material/DialogTitle'),tm=require('@mui/material/DialogContent'),ob=require('@mui/material/DialogContentText'),om=require('@mui/material/DialogActions'),Ri=require('@mui/material/Box'),nb=require('@mui/icons-material/CheckCircle'),ib=require('@mui/icons-material/Warning'),lb=require('@mui/icons-material/Error'),sb=require('@mui/icons-material/Info'),material=require('@mui/material'),styles=require('@mui/material/styles'),Cb=require('@mui/icons-material/Clear'),Sb=require('@mui/icons-material/Close'),Bu=require('@mui/icons-material/Search'),F0=require('@mui/material/Paper'),L0=require('@mui/material/Table'),N0=require('@mui/material/TableBody'),vc=require('@mui/material/TableCell'),nm=require('@mui/material/TableContainer'),Yb=require('@mui/material/TableHead'),Qb=require('@mui/material/TableRow'),rm=require('@mui/material/TextField'),Kl=require('@mui/material/Button'),am=require('@mui/material/Alert'),core=require('@dnd-kit/core'),modifiers=require('@dnd-kit/modifiers'),zb=require('@mui/icons-material/ViewColumn'),jp=require('@mui/icons-material/Save'),Vb=require('@mui/icons-material/Download'),Wb=require('@mui/icons-material/AccountTree'),Hb=require('@mui/icons-material/Functions'),$b=require('@mui/icons-material/Insights'),Ju=require('@mui/icons-material/Add'),Ub=require('@mui/icons-material/Edit'),_b=require('@mui/icons-material/Delete'),Kb=require('@mui/icons-material/KeyboardArrowLeft'),ch=require('@mui/icons-material/KeyboardArrowRight'),Jb=require('@mui/material/Checkbox'),ey=require('@mui/material/TableSortLabel'),ty=require('@mui/material/IconButton'),oy=require('@mui/material/Tooltip'),ry=require('@mui/icons-material/UnfoldMore'),ay=require('@mui/icons-material/UnfoldLess'),sortable=require('@dnd-kit/sortable'),gy=require('@mui/icons-material/KeyboardArrowDown'),Ry=require('@mui/icons-material/Check'),Zu=require('@mui/icons-material/ClearAll'),Yu=require('@mui/icons-material/ArrowUpward'),Qu=require('@mui/icons-material/ArrowDownward'),My=require('@mui/icons-material/VisibilityOff'),By=require('@mui/icons-material/DeleteOutline'),fx=require('@mui/icons-material/MicNoneOutlined'),hx=require('@mui/icons-material/SettingsOutlined'),bx=require('@mui/icons-material/SendOutlined'),p0=require('@mui/icons-material/Settings'),m0=require('@mui/icons-material/KeyboardArrowUp'),f0=require('@mui/icons-material/ArrowRightAlt'),Ox=require('@mui/icons-material/Star'),DateCalendar=require('@mui/x-date-pickers/DateCalendar'),PickersDay=require('@mui/x-date-pickers/PickersDay'),LocalizationProvider=require('@mui/x-date-pickers/LocalizationProvider'),AdapterDayjs=require('@mui/x-date-pickers/AdapterDayjs'),Yx=require('@mui/icons-material/CalendarMonth'),Jx=require('@mui/icons-material/ArrowForward'),zr=require('dayjs'),e0=require('dayjs/plugin/isBetween'),t0=require('dayjs/plugin/localizedFormat'),o0=require('dayjs/plugin/customParseFormat');require('dayjs/locale/zh-cn'),require('dayjs/locale/fr'),require('dayjs/locale/de'),require('dayjs/locale/ja'),require('dayjs/locale/ko');var M0=require('@mui/icons-material/StarBorder'),D0=require('@mui/icons-material/ViewQuilt'),Qv=require('@mui/icons-material/CloseOutlined'),Q0=require('@mui/icons-material/ContentCopyOutlined'),J0=require('@mui/icons-material/CheckOutlined'),Rv=require('@mui/icons-material/ExpandMore'),VC=require('@mui/icons-material/AddRounded'),Vm=require('@mui/icons-material/Language'),WC=require('@mui/icons-material/DesktopWindows'),HC=require('@mui/icons-material/DarkMode'),$C=require('@mui/icons-material/LightMode'),UC=require('@mui/icons-material/Logout'),mS=require('@mui/icons-material/DragIndicator'),AS=require('@mui/icons-material/FilterList'),BS=require('@mui/icons-material/TableRows'),yS=require('@mui/icons-material/LayersClear'),Dk=require('@mui/icons-material/CameraAltRounded'),Ak=require('@mui/icons-material/QrCodeScannerRounded'),Lk=require('@mui/icons-material/DragIndicatorRounded'),Vk=require('@mui/icons-material/BackspaceRounded'),Wk=require('@mui/icons-material/CloseRounded'),Hk=require('@mui/icons-material/CheckRounded'),ow=require('@mui/icons-material/SearchRounded'),rw=require('@mui/icons-material/MenuOpenRounded'),aw=require('@mui/icons-material/MenuRounded'),nw=require('@mui/icons-material/ExpandMoreRounded'),iw=require('@mui/icons-material/ChevronRightRounded'),Lw=require('next/dynamic'),framerMotion=require('framer-motion'),q1=require('react-markdown'),j1=require('remark-gfm'),X1=require('remark-math'),Z1=require('rehype-katex'),Y1=require('rehype-raw'),reactSyntaxHighlighter=require('react-syntax-highlighter'),prism=require('react-syntax-highlighter/dist/esm/styles/prism'),nextThemes=require('next-themes'),vf=require('mermaid'),sT=require('@mui/icons-material/MicRounded'),cT=require('@mui/icons-material/MicOffRounded'),iconsMaterial=require('@mui/icons-material'),gT=require('@mui/icons-material/SendRounded'),hT=require('@mui/icons-material/HardwareRounded'),XT=require('@mui/icons-material/LockOutlined'),oh=require('@mui/icons-material/MailOutline'),rh=require('@mui/icons-material/PersonOutline'),ZT=require('@mui/icons-material/VpnKeyOutlined'),mI=require('dayjs/plugin/isoWeek'),AI=require('@mui/icons-material/KeyboardDoubleArrowLeftOutlined'),BI=require('@mui/icons-material/KeyboardDoubleArrowRightOutlined'),EI=require('@mui/icons-material/SplitscreenOutlined'),FI=require('@mui/icons-material/Sort');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 Qt__namespace=/*#__PURE__*/_interopNamespace(Qt);var Jp__default=/*#__PURE__*/_interopDefault(Jp);var em__default=/*#__PURE__*/_interopDefault(em);var tm__default=/*#__PURE__*/_interopDefault(tm);var ob__default=/*#__PURE__*/_interopDefault(ob);var om__default=/*#__PURE__*/_interopDefault(om);var Ri__default=/*#__PURE__*/_interopDefault(Ri);var nb__default=/*#__PURE__*/_interopDefault(nb);var ib__default=/*#__PURE__*/_interopDefault(ib);var lb__default=/*#__PURE__*/_interopDefault(lb);var sb__default=/*#__PURE__*/_interopDefault(sb);var Cb__default=/*#__PURE__*/_interopDefault(Cb);var Sb__default=/*#__PURE__*/_interopDefault(Sb);var Bu__default=/*#__PURE__*/_interopDefault(Bu);var F0__default=/*#__PURE__*/_interopDefault(F0);var L0__default=/*#__PURE__*/_interopDefault(L0);var N0__default=/*#__PURE__*/_interopDefault(N0);var vc__default=/*#__PURE__*/_interopDefault(vc);var nm__default=/*#__PURE__*/_interopDefault(nm);var Yb__default=/*#__PURE__*/_interopDefault(Yb);var Qb__default=/*#__PURE__*/_interopDefault(Qb);var rm__default=/*#__PURE__*/_interopDefault(rm);var Kl__default=/*#__PURE__*/_interopDefault(Kl);var am__default=/*#__PURE__*/_interopDefault(am);var zb__default=/*#__PURE__*/_interopDefault(zb);var jp__default=/*#__PURE__*/_interopDefault(jp);var Vb__default=/*#__PURE__*/_interopDefault(Vb);var Wb__default=/*#__PURE__*/_interopDefault(Wb);var Hb__default=/*#__PURE__*/_interopDefault(Hb);var $b__default=/*#__PURE__*/_interopDefault($b);var Ju__default=/*#__PURE__*/_interopDefault(Ju);var Ub__default=/*#__PURE__*/_interopDefault(Ub);var _b__default=/*#__PURE__*/_interopDefault(_b);var Kb__default=/*#__PURE__*/_interopDefault(Kb);var ch__default=/*#__PURE__*/_interopDefault(ch);var Jb__default=/*#__PURE__*/_interopDefault(Jb);var ey__default=/*#__PURE__*/_interopDefault(ey);var ty__default=/*#__PURE__*/_interopDefault(ty);var oy__default=/*#__PURE__*/_interopDefault(oy);var ry__default=/*#__PURE__*/_interopDefault(ry);var ay__default=/*#__PURE__*/_interopDefault(ay);var gy__default=/*#__PURE__*/_interopDefault(gy);var Ry__default=/*#__PURE__*/_interopDefault(Ry);var Zu__default=/*#__PURE__*/_interopDefault(Zu);var Yu__default=/*#__PURE__*/_interopDefault(Yu);var Qu__default=/*#__PURE__*/_interopDefault(Qu);var My__default=/*#__PURE__*/_interopDefault(My);var By__default=/*#__PURE__*/_interopDefault(By);var fx__default=/*#__PURE__*/_interopDefault(fx);var hx__default=/*#__PURE__*/_interopDefault(hx);var bx__default=/*#__PURE__*/_interopDefault(bx);var p0__default=/*#__PURE__*/_interopDefault(p0);var m0__default=/*#__PURE__*/_interopDefault(m0);var f0__default=/*#__PURE__*/_interopDefault(f0);var Ox__default=/*#__PURE__*/_interopDefault(Ox);var Yx__default=/*#__PURE__*/_interopDefault(Yx);var Jx__default=/*#__PURE__*/_interopDefault(Jx);var zr__default=/*#__PURE__*/_interopDefault(zr);var e0__default=/*#__PURE__*/_interopDefault(e0);var t0__default=/*#__PURE__*/_interopDefault(t0);var o0__default=/*#__PURE__*/_interopDefault(o0);var M0__default=/*#__PURE__*/_interopDefault(M0);var D0__default=/*#__PURE__*/_interopDefault(D0);var Qv__default=/*#__PURE__*/_interopDefault(Qv);var Q0__default=/*#__PURE__*/_interopDefault(Q0);var J0__default=/*#__PURE__*/_interopDefault(J0);var Rv__default=/*#__PURE__*/_interopDefault(Rv);var VC__default=/*#__PURE__*/_interopDefault(VC);var Vm__default=/*#__PURE__*/_interopDefault(Vm);var WC__default=/*#__PURE__*/_interopDefault(WC);var HC__default=/*#__PURE__*/_interopDefault(HC);var $C__default=/*#__PURE__*/_interopDefault($C);var UC__default=/*#__PURE__*/_interopDefault(UC);var mS__default=/*#__PURE__*/_interopDefault(mS);var AS__default=/*#__PURE__*/_interopDefault(AS);var BS__default=/*#__PURE__*/_interopDefault(BS);var yS__default=/*#__PURE__*/_interopDefault(yS);var Dk__default=/*#__PURE__*/_interopDefault(Dk);var Ak__default=/*#__PURE__*/_interopDefault(Ak);var Lk__default=/*#__PURE__*/_interopDefault(Lk);var Vk__default=/*#__PURE__*/_interopDefault(Vk);var Wk__default=/*#__PURE__*/_interopDefault(Wk);var Hk__default=/*#__PURE__*/_interopDefault(Hk);var ow__default=/*#__PURE__*/_interopDefault(ow);var rw__default=/*#__PURE__*/_interopDefault(rw);var aw__default=/*#__PURE__*/_interopDefault(aw);var nw__default=/*#__PURE__*/_interopDefault(nw);var iw__default=/*#__PURE__*/_interopDefault(iw);var Lw__default=/*#__PURE__*/_interopDefault(Lw);var q1__default=/*#__PURE__*/_interopDefault(q1);var j1__default=/*#__PURE__*/_interopDefault(j1);var X1__default=/*#__PURE__*/_interopDefault(X1);var Z1__default=/*#__PURE__*/_interopDefault(Z1);var Y1__default=/*#__PURE__*/_interopDefault(Y1);var vf__default=/*#__PURE__*/_interopDefault(vf);var sT__default=/*#__PURE__*/_interopDefault(sT);var cT__default=/*#__PURE__*/_interopDefault(cT);var gT__default=/*#__PURE__*/_interopDefault(gT);var hT__default=/*#__PURE__*/_interopDefault(hT);var XT__default=/*#__PURE__*/_interopDefault(XT);var oh__default=/*#__PURE__*/_interopDefault(oh);var rh__default=/*#__PURE__*/_interopDefault(rh);var ZT__default=/*#__PURE__*/_interopDefault(ZT);var mI__default=/*#__PURE__*/_interopDefault(mI);var AI__default=/*#__PURE__*/_interopDefault(AI);var BI__default=/*#__PURE__*/_interopDefault(BI);var EI__default=/*#__PURE__*/_interopDefault(EI);var FI__default=/*#__PURE__*/_interopDefault(FI);var mu=Object.defineProperty;var kh=(e,t,o)=>t in e?mu(e,t,{enumerable:true,configurable:true,writable:true,value:o}):e[t]=o;var wh=(e,t)=>()=>(e&&(t=e(e=0)),t);var Th=(e,t)=>{for(var o in t)mu(e,o,{get:t[o],enumerable:true});};var gu=(e,t,o)=>kh(e,t+"",o);var uf={};Th(uf,{COrbCanvas:()=>Bw});function Bw({hue:e=0,hoverIntensity:t=.2,rotateOnHover:o=true,forceHoverState:r=false,backgroundColor:a="transparent"}){let n=Qt.useRef(null),i=`
|
|
1
|
+
'use strict';var jsxRuntime=require('react/jsx-runtime'),ogl=require('ogl'),jt=require('react'),Mo=require('@radix-ui/react-dropdown-menu'),Wo=require('@radix-ui/react-tooltip'),reactDom=require('react-dom'),Co=require('@radix-ui/react-dialog'),lr=require('@radix-ui/react-popover'),Xo=require('dayjs'),sg=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'),Sf=require('dayjs/plugin/isBetween'),wf=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 kb=require('next/dynamic'),framerMotion=require('framer-motion'),ry=require('react-markdown'),ny=require('remark-gfm'),ay=require('remark-math'),iy=require('rehype-katex'),sy=require('rehype-raw'),reactSyntaxHighlighter=require('react-syntax-highlighter'),prism=require('react-syntax-highlighter/dist/esm/styles/prism'),nextThemes=require('next-themes'),pu=require('mermaid'),By=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 jt__namespace=/*#__PURE__*/_interopNamespace(jt);var Mo__namespace=/*#__PURE__*/_interopNamespace(Mo);var Wo__namespace=/*#__PURE__*/_interopNamespace(Wo);var Co__namespace=/*#__PURE__*/_interopNamespace(Co);var lr__namespace=/*#__PURE__*/_interopNamespace(lr);var Xo__default=/*#__PURE__*/_interopDefault(Xo);var sg__default=/*#__PURE__*/_interopDefault(sg);var Sf__default=/*#__PURE__*/_interopDefault(Sf);var wf__default=/*#__PURE__*/_interopDefault(wf);var kb__default=/*#__PURE__*/_interopDefault(kb);var ry__default=/*#__PURE__*/_interopDefault(ry);var ny__default=/*#__PURE__*/_interopDefault(ny);var ay__default=/*#__PURE__*/_interopDefault(ay);var iy__default=/*#__PURE__*/_interopDefault(iy);var sy__default=/*#__PURE__*/_interopDefault(sy);var pu__default=/*#__PURE__*/_interopDefault(pu);var By__default=/*#__PURE__*/_interopDefault(By);var ul=Object.defineProperty;var Xu=(t,o,r)=>o in t?ul(t,o,{enumerable:true,configurable:true,writable:true,value:r}):t[o]=r;var Xi=(t,o,r)=>()=>{if(r)throw r[0];try{return t&&(o=t(t=0)),o}catch(n){throw r=[n],n}};var Zu=(t,o)=>{for(var r in o)ul(t,r,{get:o[r],enumerable:true});};var ml=(t,o,r)=>Xu(t,o+"",r);var ta,ju,Ne,oa,gl,Ju,em,fl,hl,tm,Yi,om,bl,rm,bn,Ue,Wt=Xi(()=>{"use strict";ta={xs:0,sm:600,md:900,lg:1200,xl:1536},ju=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:${ta[o]}px)`,down:o=>`@media (max-width:${Math.max(0,ta[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}}),Ne=()=>typeof document>"u"?"light":document.documentElement.dataset.orbMode==="dark"||document.documentElement.classList.contains("orb-dark")?"dark":"light",oa=()=>ju(Ne()),gl={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"]},Ju=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"]),em=(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},fl=t=>t.startsWith("--")?t:t.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`),hl=(t,o)=>{if(o==null||o===!1)return null;let r=em(t,o);return typeof r=="number"&&r!==0&&!Ju.has(t)?["margin","marginTop","marginRight","marginBottom","marginLeft","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","gap","rowGap","columnGap"].includes(t)?`${r*8}px`:`${r}px`:String(r)},tm=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}},{}):{},Yi=t=>!t||typeof t!="object"?JSON.stringify(t):Array.isArray(t)?`[${t.map(Yi).join(",")}]`:`{${Object.keys(t).sort().map(o=>`${JSON.stringify(o)}:${Yi(t[o])}`).join(",")}}`,om=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)},bl=new Set,rm=t=>{if(typeof document>"u"||bl.has(t))return;bl.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));},bn=(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}{${bn(t,s)}}`);return}if(a.startsWith("&")&&typeof s=="object"){n.push(bn(a.split("&").join(t),s));return}if((a.startsWith(":")||a.startsWith(">")||a.startsWith("["))&&typeof s=="object"){n.push(bn(`${t}${a}`,s));return}if(typeof s=="object"){let p=s,u=Object.keys(p).filter(d=>d in ta);u.length>0?u.forEach(d=>{let h=(gl[a]??[a]).map(m=>{let y=hl(m,p[d]);return y===null?"":`${fl(m)}:${y};`}).join("");h&&(d==="xs"?n.push(`${t}{${h}}`):n.push(`@media (min-width:${ta[d]}px){${t}{${h}}}`));}):n.push(bn(`${t} ${a}`,p));return}(gl[a]??[a]).forEach(p=>{let u=hl(p,s);u!==null&&r.push(`${fl(p)}:${u};`);});}),`${r.length?`${t}{${r.join("")}}`:""}${n.join("")}`},Ue=(t,o,r)=>{let n=tm(t);if(Object.keys(n).length===0)return {className:o,style:r};let a=`orb-sx-${om(Yi(n))}`;return rm(bn(`.${a}`,n)),{className:[a,o].filter(Boolean).join(" "),style:r}};});var yl,e,l,w=Xi(()=>{"use strict";Wt();yl=(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]=yl(t,o);return jsxRuntime.jsx(n,a,r)},l=(t,o,r)=>{let[n,a]=yl(t,o);return jsxRuntime.jsxs(n,a,r)};});var ru={};Zu(ru,{COrbCanvas:()=>Sb});function Sb({hue:t=0,hoverIntensity:o=.2,rotateOnHover:r=true,forceHoverState:n=false,backgroundColor:a="transparent"}){let i=jt.useRef(null),s=`
|
|
2
2
|
precision highp float;
|
|
3
3
|
attribute vec2 position;
|
|
4
4
|
attribute vec2 uv;
|
|
@@ -180,22 +180,23 @@
|
|
|
180
180
|
vec4 col = mainImage(fragCoord);
|
|
181
181
|
gl_FragColor = vec4(col.rgb * col.a, col.a);
|
|
182
182
|
}
|
|
183
|
-
`;return Qt.useEffect(()=>{let d=n.current;if(!d)return;let l=new ogl.Renderer({alpha:true,premultipliedAlpha:false}),s=l.gl;s.clearColor(0,0,0,0),d.appendChild(s.canvas);let g=new ogl.Triangle(s),f=new ogl.Program(s,{vertex:i,fragment:c,uniforms:{iTime:{value:0},iResolution:{value:new ogl.Vec3(s.canvas.width,s.canvas.height,s.canvas.width/s.canvas.height)},hue:{value:e},hover:{value:0},rot:{value:0},hoverIntensity:{value:t},backgroundColor:{value:df(a)}}}),p=new ogl.Mesh(s,{geometry:g,program:f});function b(){if(!d)return;let R=window.devicePixelRatio||1,T=d.clientWidth,I=d.clientHeight;l.setSize(T*R,I*R),s.canvas.style.width=T+"px",s.canvas.style.height=I+"px",f.uniforms.iResolution.value.set(s.canvas.width,s.canvas.height,s.canvas.width/s.canvas.height);}window.addEventListener("resize",b),b();let y=0,u=0,C=0,m=.3,h=R=>{let T=d.getBoundingClientRect(),I=R.clientX-T.left,k=R.clientY-T.top,S=T.width,D=T.height,P=Math.min(S,D),M=S/2,B=D/2,X=(I-M)/P*2,L=(k-B)/P*2;Math.sqrt(X*X+L*L)<.8?y=1:y=0;},x=()=>{y=0;};d.addEventListener("mousemove",h),d.addEventListener("mouseleave",x);let w,E=R=>{w=requestAnimationFrame(E);let T=(R-u)*.001;u=R,f.uniforms.iTime.value=R*.001,f.uniforms.hue.value=e,f.uniforms.hoverIntensity.value=t,f.uniforms.backgroundColor.value=df(a);let I=r?1:y;f.uniforms.hover.value+=(I-f.uniforms.hover.value)*.1,o&&I>.5&&(C+=T*m),f.uniforms.rot.value=C,l.render({scene:p});};return w=requestAnimationFrame(E),()=>{cancelAnimationFrame(w),window.removeEventListener("resize",b),d.removeEventListener("mousemove",h),d.removeEventListener("mouseleave",x),s.canvas.parentNode===d&&d.removeChild(s.canvas),s.getExtension("WEBGL_lose_context")?.loseContext();}},[e,t,o,r,a]),jsxRuntime.jsx("div",{ref:n,className:"w-full h-full"})}function Ew(e,t,o){let r,a,n;if(t===0)r=a=n=o;else {let i=(l,s,g)=>(g<0&&(g+=1),g>1&&(g-=1),g<.16666666666666666?l+(s-l)*6*g:g<.5?s:g<.6666666666666666?l+(s-l)*(.6666666666666666-g)*6:l),c=o<.5?o*(1+t):o+t-o*t,d=2*o-c;r=i(d,c,e+1/3),a=i(d,c,e),n=i(d,c,e-1/3);}return new ogl.Vec3(r,a,n)}function df(e){if(e==="transparent")return new ogl.Vec3(0,0,0);if(e.startsWith("#")){let r=parseInt(e.slice(1,3),16)/255,a=parseInt(e.slice(3,5),16)/255,n=parseInt(e.slice(5,7),16)/255;return new ogl.Vec3(r,a,n)}let t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(t)return new ogl.Vec3(parseInt(t[1])/255,parseInt(t[2])/255,parseInt(t[3])/255);let o=e.match(/hsla?\((\d+),\s*(\d+)%,\s*(\d+)%/);if(o){let r=parseInt(o[1])/360,a=parseInt(o[2])/100,n=parseInt(o[3])/100;return Ew(r,a,n)}return new ogl.Vec3(0,0,0)}var pf=wh(()=>{"use client";});function Ho(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var nc={primary:"#000000",primaryHover:"#333333"},sl={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"},ii={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",full:"rounded-full"},fu=()=>"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";var Dh=classVarianceAuthority.cva(fu(),{variants:{variant:{default:`${sl.primary} shadow-sm`,destructive:"bg-red-500 text-white hover:bg-red-600 active:bg-red-700 dark:bg-red-600 dark:hover:bg-red-500 dark:active:bg-red-700 shadow-sm",outline:`${sl.outline} shadow-sm`,secondary:"bg-gray-200 text-gray-700 hover:bg-gray-300 active:bg-gray-400 dark:bg-gray-700 dark:text-gray-200 dark:hover:bg-gray-600 dark:active:bg-gray-500 shadow-sm",ghost:sl.ghost,link:"text-blue-600 dark:text-blue-400 underline-offset-4 hover:underline hover:text-blue-700 dark:hover:text-blue-300 active:text-blue-800 dark:active:text-blue-200","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-[${nc.primary}] hover:bg-[${nc.primaryHover}] text-white 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-red-500 hover:bg-red-600 border border-[var(--orbai-border-strong)] shadow-[var(--orbai-shadow-soft-sm)] hover:shadow-[var(--orbai-shadow-soft-md)] active:scale-95 text-white 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:ii.none,sm:ii.sm,md:ii.md,full:ii.full}},defaultVariants:{variant:"default",size:"default",rounded:"md"}}),ic=Qt__namespace.forwardRef(({className:e,variant:t,size:o,asChild:r=false,...a},n)=>jsxRuntime.jsx(r?reactSlot.Slot:"button",{className:Ho(Dh({variant:t,size:o,className:e})),ref:n,...a}));ic.displayName="Button";var Bh={"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.searchSend":"Send","header.searchStartVoice":"Start voice input","header.searchStopVoice":"Stop voice input","header.theme.system":"Theme: System","header.theme.dark":"Theme: Dark","header.theme.light":"Theme: Light","header.menu.setting":"Setting","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","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.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?","messageBox.confirm":"OK","messageBox.cancel":"Cancel"},Eh={"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.searchSend":"\u53D1\u9001","header.searchStartVoice":"\u5F00\u59CB\u8BED\u97F3\u8F93\u5165","header.searchStopVoice":"\u505C\u6B62\u8BED\u97F3\u8F93\u5165","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.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","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.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","messageBox.confirm":"\u786E\u5B9A","messageBox.cancel":"\u53D6\u6D88"},Fh={"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.searchSend":"Envoyer","header.searchStartVoice":"D\xE9marrer la saisie vocale","header.searchStopVoice":"Arr\xEAter la saisie vocale","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.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","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.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 ?","messageBox.confirm":"OK","messageBox.cancel":"Annuler"},Lh={"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.searchSend":"Senden","header.searchStartVoice":"Spracheingabe starten","header.searchStopVoice":"Spracheingabe stoppen","header.theme.system":"Theme: System","header.theme.dark":"Theme: Dunkel","header.theme.light":"Theme: Hell","header.menu.setting":"Einstellungen","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","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.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?","messageBox.confirm":"OK","messageBox.cancel":"Abbrechen"},Nh={"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.searchSend":"\u9001\u4FE1","header.searchStartVoice":"\u97F3\u58F0\u5165\u529B\u3092\u958B\u59CB","header.searchStopVoice":"\u97F3\u58F0\u5165\u529B\u3092\u505C\u6B62","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.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","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.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","messageBox.confirm":"OK","messageBox.cancel":"\u30AD\u30E3\u30F3\u30BB\u30EB"},zh={"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.searchSend":"\uBCF4\uB0B4\uAE30","header.searchStartVoice":"\uC74C\uC131 \uC785\uB825 \uC2DC\uC791","header.searchStopVoice":"\uC74C\uC131 \uC785\uB825 \uC911\uC9C0","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.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","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.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?","messageBox.confirm":"\uD655\uC778","messageBox.cancel":"\uCDE8\uC18C"},li={en:Bh,zh:Eh,fr:Fh,de:Lh,ja:Nh,ko:zh};var bu=(e,t)=>t?e.replace(/\{(\w+)\}/g,(o,r)=>{let a=t[r];return a==null?"":String(a)}):e,Hh={locale:"en",t:(e,t)=>bu(li.en[e]||e,t)},yu=Qt.createContext(Hh),cl=({locale:e="en",messages:t,children:o})=>{let r=Qt.useMemo(()=>{let a=li[e]||li.en,n=t?.[e]||{},i={...li.en,...a,...n};return {locale:e,t:(c,d)=>bu(i[c]||c,d)}},[e,t]);return jsxRuntime.jsx(yu.Provider,{value:r,children:o})},ne=()=>Qt.useContext(yu);function sc({items:e,onItemClick:t,className:o="",level:r=0,expandedIds:a,onToggleExpand:n,colorMode:i="light"}){let{t:c}=ne(),d=i==="dark",l=navigation.usePathname(),[s,g]=Qt.useState(false),[f,p]=Qt.useState(new Set),b=a!==void 0&&n!==void 0,y=b?a:f;Qt.useEffect(()=>{g(true);},[]);let u=m=>{if(b)n(m);else {let h=new Set(f);h.has(m)?h.delete(m):h.add(m),p(h);}},C=m=>{m.children&&m.children.length>0&&u(m.id),t&&t(m);};return !e||!Array.isArray(e)?jsxRuntime.jsx("div",{className:Ho("tree-menu",o),children:jsxRuntime.jsx("div",{className:"text-sm text-gray-500 p-2",children:c("navigation.noItems")})}):jsxRuntime.jsx("div",{className:Ho("tree-menu",o),children:e.map(m=>{let h=y.has(m.id)||m.isExpanded,x=m.children&&m.children.length>0,E=56+Math.max(0,r-1)*8,R=r===0?12:x?E-24:E,T=m.appurl||m.href,I=s&&T?l===T:false;return jsxRuntime.jsxs("div",{className:"tree-menu-item relative",children:[I&&jsxRuntime.jsx("div",{className:Ho("absolute left-0 top-2 bottom-2 w-[3px] rounded-r-full z-10",d?"bg-[#90caf9]":"bg-[#1976d2]")}),jsxRuntime.jsxs(ic,{variant:"ghost",className:Ho("w-full justify-start h-auto py-2 relative overflow-hidden group",r>0?"gap-1":"gap-2",x&&h&&!I?d?"bg-white/5 text-gray-100 hover:bg-white/8":"bg-slate-50/70 text-slate-800 hover:bg-slate-100/80":"",r>=2?"min-h-9 py-1.5 rounded-md":r>0?"min-h-10 rounded-lg":"rounded-lg",I?d?"bg-transparent text-[#90caf9] hover:bg-gray-800/35":"bg-transparent text-[#1976d2] hover:bg-gray-100/60":d?"hover:bg-gray-800/50 text-gray-300":"hover:bg-gray-100/50 text-gray-700"),style:{paddingLeft:`${R}px`,paddingRight:"10px"},onClick:()=>C(m),children:[x&&jsxRuntime.jsx("div",{className:Ho("flex-shrink-0 transition-transform duration-200",h&&"rotate-90",I?d?"text-[#90caf9]":"text-[#1976d2]":d?"text-gray-500 group-hover:text-gray-300":"text-gray-400 group-hover:text-gray-600"),children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})}),m.icon&&jsxRuntime.jsx("div",{className:Ho("flex h-4 w-4 flex-shrink-0 items-center justify-center transition-colors duration-200",I?d?"text-[#90caf9]":"text-[#1976d2]":d?"text-gray-500 group-hover:text-gray-300":"text-gray-400 group-hover:text-gray-600"),children:m.icon}),jsxRuntime.jsxs("div",{className:"flex-1 text-left overflow-hidden z-10",children:[jsxRuntime.jsx("div",{className:Ho("text-sm truncate transition-colors duration-200",I?"font-semibold":"font-medium"),children:m.title||m.label}),m.description&&jsxRuntime.jsx("div",{className:Ho("text-xs truncate transition-colors duration-200",I?d?"text-[#90caf9]/70":"text-[#1976d2]/75":d?"text-gray-400":"text-gray-500"),title:m.description,children:m.description})]})]}),x&&jsxRuntime.jsx("div",{className:Ho("grid transition-[grid-template-rows] duration-300 ease-in-out",h?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:jsxRuntime.jsx("div",{className:Ho("overflow-hidden",h&&"pt-1"),children:jsxRuntime.jsx(sc,{items:m.children,onItemClick:t,level:r+1,expandedIds:a,onToggleExpand:n,colorMode:i})})})]},m.id)})})}var dc=({collapsed:e,onToggle:t,className:o="",maxHeight:r,menuData:a=[],colorMode:n="light",displayMode:i="fixed",onDisplayModeChange:c,showDisplayModeToggle:d=true})=>{let{t:l}=ne(),s=n==="dark",g=i==="floating",f=Qt__namespace.default.useId().replace(/:/g,""),p=`orbcafe-nav-mode-arc-${f}`,b=`orbcafe-nav-mode-glow-${f}`,y=navigation.useRouter(),[u,C]=Qt.useState(""),[m,h]=Qt.useState(new Set);Qt.useEffect(()=>{e&&h(new Set);},[e]);let x=Qt.useCallback(I=>{let k=[],S=D=>{D.forEach(P=>{k.push(P.id),P.children&&S(P.children);});};return S(I),k},[]),w=Qt.useMemo(()=>{if(!u.trim())return a;let I=k=>k.reduce((S,D)=>{let P=D.title?.toLowerCase().includes(u.toLowerCase())||D.description?.toLowerCase().includes(u.toLowerCase()),M=D.children?I(D.children):[];return (P||M.length>0)&&S.push({...D,children:M.length>0?M:D.children}),S},[]);return I(a)},[u,a]),E=Qt.useMemo(()=>u.trim()?new Set(x(a)):m,[u,a,m,x]),R=Qt.useCallback(async I=>{if(console.log("\u{1F5B1}\uFE0F \u5BFC\u822A\u83DC\u5355\u9879\u70B9\u51FB:",I),I.id==="chat"||I.appurl==="/chat"){console.log("\u{1F4AC} \u68C0\u6D4B\u5230chat\u83DC\u5355\u70B9\u51FB\uFF0C\u8DF3\u8F6C\u5230\u65B0\u7684\u804A\u5929\u89C6\u56FE");try{y.push("/chat?new=true");}catch(S){console.error("\u274C \u65E0\u6CD5\u8DF3\u8F6C\u5230\u65B0\u804A\u5929\u89C6\u56FE:",S),y.push("/chat");}return}let k=I.appurl||I.href;k&&(k.startsWith("http://")||k.startsWith("https://")?window.open(k,"_blank"):y.push(k));},[y]),T=Qt.useCallback(()=>{c?.(i==="fixed"?"floating":"fixed");},[i,c]);return jsxRuntime.jsxs("div",{className:`flex flex-col backdrop-blur-xl border ${g?"shadow-[0_28px_80px_rgba(15,23,42,0.34)]":"shadow-[0_4px_8px_0_rgba(31,38,135,0.1)]"} ${e?"w-14 rounded-full":"w-[234px] rounded-2xl"} relative ${o} ${s?g?"border-white/25":"bg-[#111111] border-white/10":g?"border-white/70":"bg-white/70 border-white/30"}`,style:{backdropFilter:g?"blur(34px) saturate(230%) contrast(1.12)":"blur(16px) saturate(180%)",WebkitBackdropFilter:g?"blur(34px) saturate(230%) contrast(1.12)":"blur(16px) saturate(180%)",backgroundColor:g?s?"rgba(8, 12, 18, 0.34)":"rgba(255, 255, 255, 0.24)":void 0,backgroundImage:g?s?"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%, rgba(33,188,255,0.05))":"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%, rgba(33,188,255,0.08))":void 0,boxShadow:g?s?"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:r?`${r}px`:void 0},children:[jsxRuntime.jsx("div",{className:`pt-4 pb-2 transition-all duration-500 ease-in-out ${e?"px-1":"px-2"}`,children:e?jsxRuntime.jsx("div",{className:"flex justify-center",children:jsxRuntime.jsx("button",{onClick:t,className:`w-10 h-10 flex items-center justify-center rounded-lg transition-colors duration-200 ${s?"text-gray-300 hover:bg-gray-800":"text-gray-500 hover:bg-gray-50"}`,title:l("navigation.expand"),children:jsxRuntime.jsx(lucideReact.Search,{className:"h-5 w-5"})})}):jsxRuntime.jsxs("div",{className:`relative transition-opacity duration-300 ${e?"opacity-0":"opacity-100 delay-200"}`,children:[jsxRuntime.jsx("input",{type:"text",placeholder:l("navigation.searchPlaceholder"),value:u,onChange:I=>C(I.target.value),className:`w-full pl-10 pr-4 py-2 text-sm border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent ${s?"border-gray-700 bg-[#1A1A1A] text-white placeholder-gray-400":"border-gray-300 bg-white text-gray-900 placeholder-gray-500"}`}),jsxRuntime.jsx("div",{className:"absolute left-3 top-1/2 transform -translate-y-1/2 pointer-events-none",children:jsxRuntime.jsx(lucideReact.Search,{className:`h-4 w-4 ${s?"text-gray-500":"text-gray-400"}`})})]})}),jsxRuntime.jsx("nav",{className:`flex-1 pb-4 transition-all duration-500 ease-in-out overflow-y-auto min-h-0 ${e?"px-1":"px-2"}`,children:w.length===0?jsxRuntime.jsx("div",{className:"flex items-center justify-center py-8 text-gray-500 text-sm",children:e?"\u{1F4C2}":l(u?"navigation.noMatch":"navigation.noAccessibleApp")}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!e&&jsxRuntime.jsx("div",{className:`transition-opacity duration-300 ${e?"opacity-0":"opacity-100 delay-200"}`,children:jsxRuntime.jsx(sc,{items:w,onItemClick:R,className:"space-y-1",expandedIds:E,colorMode:n,onToggleExpand:I=>{let k=new Set(m);w.some(D=>D.id===I)?k.has(I)?k.delete(I):(w.forEach(D=>{D.id!==I&&k.has(D.id)&&k.delete(D.id);}),k.add(I)):k.has(I)?k.delete(I):k.add(I),h(k);}})}),e&&jsxRuntime.jsx("div",{className:"space-y-2",children:a.map(I=>jsxRuntime.jsx("div",{className:"space-y-1",children:jsxRuntime.jsx("button",{onClick:()=>{t();let k=new Set([I.id]);h(k);},className:`w-full flex items-center justify-center p-2 rounded-lg cursor-pointer transition-colors duration-200 ${s?"text-gray-400 hover:bg-gray-800":"text-gray-600 hover:bg-gray-50"}`,title:l("navigation.expandView",{title:I.title||""}),children:I.icon||jsxRuntime.jsx("div",{className:`w-6 h-6 rounded text-xs flex items-center justify-center font-medium ${s?"bg-[#90caf9] text-[#0b0b0b]":"bg-[#1976d2] text-white"}`,children:I.title?.charAt(0)||"?"})})},I.id))})]})}),!e&&jsxRuntime.jsx("button",{onClick:t,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 ${s?"hover:bg-gray-800/50":"hover:bg-white/20"}`,title:l("navigation.collapse"),children:jsxRuntime.jsx("div",{className:"absolute",style:{bottom:"0px",right:"0px",width:"16px",height:"16px",overflow:"hidden"},children:jsxRuntime.jsx("div",{className:s?"border-yellow-400":"",style:{width:"32px",height:"32px",borderRadius:"16px",border:"3px solid #21BCFF",backgroundColor:"transparent",position:"absolute",top:"-16px",left:"-16px"}})})}),d&&e&&jsxRuntime.jsx("button",{type:"button",onClick:T,className:"absolute -bottom-5 left-1/2 z-30 flex h-11 -translate-x-1/2 items-end justify-center rounded-full bg-transparent px-2 pb-1 transition-opacity duration-200 hover:opacity-95 focus:outline-none focus:ring-2 focus:ring-cyan-400/70",style:{width:"62px",touchAction:"manipulation"},title:l(g?"navigation.mode.switchToFixed":"navigation.mode.switchToFloating"),"aria-label":l(g?"navigation.mode.switchToFixed":"navigation.mode.switchToFloating"),children:jsxRuntime.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 118 34",preserveAspectRatio:"none",className:"h-[34px] w-full overflow-visible",children:[jsxRuntime.jsxs("defs",{children:[jsxRuntime.jsxs("linearGradient",{id:p,x1:"0",x2:"1",y1:"0",y2:"0",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:"#21BCFF"}),jsxRuntime.jsx("stop",{offset:"52%",stopColor:"#7C3AED"}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:"#F59E0B"})]}),jsxRuntime.jsxs("filter",{id:b,x:"-70%",y:"-180%",width:"240%",height:"460%",children:[jsxRuntime.jsx("feGaussianBlur",{stdDeviation:"8.5",result:"coloredBlur"}),jsxRuntime.jsxs("feMerge",{children:[jsxRuntime.jsx("feMergeNode",{in:"coloredBlur"}),jsxRuntime.jsx("feMergeNode",{in:"SourceGraphic"})]})]})]}),jsxRuntime.jsx("path",{d:"M8 4 C27 21 91 21 110 4",fill:"none",stroke:`url(#${p})`,strokeLinecap:"round",strokeWidth:"18",opacity:g?.28:.2,filter:`url(#${b})`}),jsxRuntime.jsx("path",{d:"M8 4 C27 21 91 21 110 4",fill:"none",stroke:`url(#${p})`,strokeLinecap:"round",strokeWidth:"12",opacity:g?.4:.3,filter:`url(#${b})`}),jsxRuntime.jsx("path",{d:"M8 4 C27 21 91 21 110 4",fill:"none",stroke:`url(#${p})`,strokeLinecap:"round",strokeWidth:"6",opacity:g?.34:.25,filter:`url(#${b})`}),jsxRuntime.jsx("path",{d:"M8 4 C27 21 91 21 110 4",fill:"none",stroke:`url(#${p})`,strokeLinecap:"round",strokeWidth:"1",opacity:g?.28:.18})]})})]})};var wu=(e={})=>{let{initialCollapsed:t=false,initialDisplayMode:o="fixed",content:r=[]}=e,[a,n]=Qt.useState(t),[i,c]=Qt.useState(o),[d,l]=Qt.useState(r),s=Qt.useCallback(()=>{n(p=>!p);},[]),g=Qt.useCallback(()=>{c(p=>p==="fixed"?"floating":"fixed");},[]),f=Qt.useMemo(()=>({collapsed:a,onToggle:s,menuData:d,displayMode:i,onDisplayModeChange:c}),[a,s,d,i,c]);return {collapsed:a,setCollapsed:n,toggleCollapsed:s,displayMode:i,setDisplayMode:c,toggleDisplayMode:g,menuData:d,setMenuData:l,navigationIslandProps:f}};var ur=e=>jsxRuntime.jsx(material.Button,{...e,variant:e.variant||"contained",size:e.size||"medium",sx:{textTransform:"none",...e.sx}});var pc=class{constructor(){gu(this,"listener",null);}register(t){this.listener=t;}unregister(){this.listener=null;}show(t,o,r){this.listener&&this.listener({type:t,content:o,options:r});}hide(){this.listener&&this.listener(null);}},Vr=new pc,_P={success:(e,t)=>Vr.show("success",e,t),error:(e,t)=>Vr.show("error",e,t),warning:(e,t)=>Vr.show("warning",e,t),info:(e,t)=>Vr.show("info",e,t),show:(e,t,o)=>Vr.show(e,t,o),hide:()=>Vr.hide()};var cb={success:{icon:jsxRuntime.jsx(nb__default.default,{sx:{fontSize:40}}),color:"#e8f5e9",iconColor:"#66bb6a",borderColor:"#a5d6a7"},warning:{icon:jsxRuntime.jsx(ib__default.default,{sx:{fontSize:40}}),color:"#fff3e0",iconColor:"#ffa726",borderColor:"#ffcc80"},error:{icon:jsxRuntime.jsx(lb__default.default,{sx:{fontSize:40}}),color:"#ffebee",iconColor:"#ef5350",borderColor:"#ef9a9a"},info:{icon:jsxRuntime.jsx(sb__default.default,{sx:{fontSize:40}}),color:"#e3f2fd",iconColor:"#42a5f5",borderColor:"#90caf9"},default:{icon:null,color:"transparent",iconColor:"inherit",borderColor:"transparent"}},si=({open:e,title:t,message:o,onClose:r,onConfirm:a,confirmText:n,cancelText:i,showCancel:c=true,maxWidth:d="xs",type:l="default"})=>{let{t:s}=ne(),g=n||s("messageBox.confirm"),f=i||s("messageBox.cancel"),p=()=>{a?a():r();},b=cb[l],y=l!=="default";return jsxRuntime.jsxs(Jp__default.default,{open:e,onClose:r,maxWidth:d,fullWidth:true,PaperProps:{sx:{borderRadius:3,...y&&{borderTop:`6px solid ${b.iconColor}`}}},children:[y&&jsxRuntime.jsx(Ri__default.default,{sx:{display:"flex",justifyContent:"center",pt:3,color:b.iconColor},children:b.icon}),t&&jsxRuntime.jsx(em__default.default,{sx:{textAlign:y?"center":"left",pt:y?1:2},children:t}),jsxRuntime.jsx(tm__default.default,{sx:{textAlign:y?"center":"left"},children:typeof o=="string"?jsxRuntime.jsx(ob__default.default,{children:o}):o}),jsxRuntime.jsxs(om__default.default,{sx:{justifyContent:y?"center":"flex-end",pb:3,px:3},children:[c&&jsxRuntime.jsx(ur,{onClick:r,variant:"text",color:"inherit",children:f}),jsxRuntime.jsx(ur,{onClick:p,variant:"contained",sx:{bgcolor:y?b.iconColor:void 0,"&:hover":{bgcolor:y?b.iconColor:void 0,filter:"brightness(0.9)"}},autoFocus:true,children:g})]})]})},sR=()=>{let[e,t]=Qt__namespace.default.useState(null),[o,r]=Qt__namespace.default.useState(false);Qt__namespace.default.useEffect(()=>{let i=c=>{c?(t(c),r(true)):(r(false),t(null));};return Vr.register(i),()=>Vr.unregister()},[]);let a=()=>{r(false),e?.options?.onClose&&e.options.onClose(),t(null);},n=()=>{e?.options?.onConfirm&&e.options.onConfirm(),r(false),t(null);};return e?jsxRuntime.jsx(si,{open:o,type:e.type,message:e.content,title:e.options?.title,onClose:a,onConfirm:n,confirmText:e.options?.confirmText,cancelText:e.options?.cancelText,showCancel:e.options?.showCancel,maxWidth:e.options?.maxWidth}):null};var kb=[{field:"value",label:"Value",minWidth:120},{field:"label",label:"Description",minWidth:180}],Eu=e=>Array.isArray(e)?e:e==null||e===""?[]:[e],$o=e=>String(e),Fu=(e,t)=>e[t],Lu=e=>{let t=e.value??e.id??e.key??e.code;return typeof t=="number"||typeof t=="string"?t:""},wb=e=>{let t=e.label??e.description??e.name??e.title;return String(typeof t=="number"||typeof t=="string"?t:Lu(e))},Tb=e=>{let t=e.description??e.subtitle;return typeof t=="number"||typeof t=="string"?String(t):void 0},Nu=({value:e=null,items:t=[],columns:o,mode:r="single",dialogTitle:a="Value Help",searchPlaceholder:n="Search values...",selectLabel:i="Select",clearLabel:c="Clear",cancelLabel:d="Cancel",valueHelpLabel:l="Open value help",noResultsText:s="No matching values",loading:g=false,clearable:f=true,allowManualInput:p=true,validateManualInput:b=true,manualInputErrorText:y="Enter a valid value.",selectedItems:u=[],displayValue:C,getOptionValue:m=Lu,getOptionLabel:h=wb,getOptionDescription:x=Tb,onChange:w,onSearch:E,disabled:R,InputProps:T,onFocus:I,onBlur:k,onKeyDown:S,error:D,helperText:P,...M})=>{let B=r==="multiple",[X,L]=Qt.useState(false),[Z,$]=Qt.useState(false),[q,H]=Qt.useState(""),[re,de]=Qt.useState(null),[Ce,ve]=Qt.useState(false),[le,oe]=Qt.useState(()=>Eu(e)),[Ie,Ze]=Qt.useState(""),[Ge,ce]=Qt.useState(""),Ve=Qt.useMemo(()=>o&&o.length>0?o:kb,[o]),et=re??t,ye=Qt.useMemo(()=>{let N=[...u,...t,...re??[]],J=new Map;return N.forEach(we=>{J.set($o(m(we)),we);}),J},[m,t,re,u]),We=Qt.useMemo(()=>Eu(e),[e]),qe=Qt.useMemo(()=>We.map(String).join(", "),[We]);Qt.useEffect(()=>{X||oe(We);},[X,We]),Qt.useEffect(()=>{!Z&&!Ge&&Ze(qe);},[Z,qe,Ge]);let st=Qt.useMemo(()=>{let N=q.trim().toLowerCase();if(!N||E)return et;let J=Ve.filter(we=>we.searchable!==false);return et.filter(we=>[m(we),h(we),x(we),...J.map(tt=>Fu(we,tt.field))].some(tt=>String(tt??"").toLowerCase().includes(N)))},[et,x,h,m,E,q,Ve]),Pe=Qt.useMemo(()=>{if(C!==void 0)return C;if(We.length===0)return "";let N=J=>{let we=ye.get($o(J));if(!we)return String(J);let Me=h(we);return Me&&Me!==String(J)?`${J} - ${Me}`:String(J)};return B?We.length>2?`${We.length} selected`:We.map(N).join(", "):N(We[0])},[C,h,B,ye,We]),K=Qt.useCallback(async()=>{if(E){ve(true);try{let N=await E(q);Array.isArray(N)&&de(N);}finally{ve(false);}}},[E,q]),Ee=()=>{R||(oe(We),L(true));},ge=()=>{L(false);},ke=()=>{w?.(B?[]:null,B?[]:null),oe([]),Ze(""),ce("");},rt=N=>{let J=m(N);if(B){oe(we=>we.some(tt=>$o(tt)===$o(J))?we.filter(tt=>$o(tt)!==$o(J)):[...we,J]);return}oe([J]);},Ue=()=>{let N=le.map(J=>ye.get($o(J))).filter(J=>!!J);B?w?.(le,N):w?.(le[0]??null,N[0]??null),ce(""),L(false);},ae=N=>{if(N.key==="F4"){N.preventDefault(),Ee();return}if(N.key==="Enter"&&p&&!je(Ie,true)){N.preventDefault();return}S?.(N);},fe=N=>b?N.every(J=>ye.has($o(J))):true,je=(N,J)=>{if(B){let Me=N.split(/[,;\n]/).map(bt=>bt.trim()).filter(Boolean);if(Me.length===0)return ce(""),w?.([],[]),true;if(!fe(Me))return J&&ce(y),false;ce("");let tt=Me.map(bt=>ye.get($o(bt))).filter(bt=>!!bt);return w?.(Me,tt),true}let we=N.trim();return we?fe([we])?(ce(""),w?.(we,ye.get($o(we))??null),true):(J&&ce(y),false):(ce(""),w?.(null,null),true)},It=N=>{if(!p)return;let J=N.target.value;Ze(J),ce(""),je(J,false);},_=g||Ce,ze=We.length>0;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(material.TextField,{...M,disabled:R,value:p&&(Z||!!Ge)?Ie:Pe,error:!!Ge||D,helperText:Ge||P,onChange:It,onFocus:N=>{$(true),Ze(qe),I?.(N);},onBlur:N=>{p&&je(Ie,true),$(false),k?.(N);},onKeyDown:ae,InputProps:{...T,readOnly:!p,endAdornment:jsxRuntime.jsxs(material.InputAdornment,{position:"end",children:[_?jsxRuntime.jsx(material.CircularProgress,{size:18}):null,f&&ze&&!R?jsxRuntime.jsx(material.Tooltip,{title:c,children:jsxRuntime.jsx(material.IconButton,{size:"small",edge:"end","aria-label":c,onClick:ke,children:jsxRuntime.jsx(Cb__default.default,{fontSize:"small"})})}):null,jsxRuntime.jsx(material.Tooltip,{title:l,children:jsxRuntime.jsx("span",{children:jsxRuntime.jsx(material.IconButton,{size:"small",edge:"end","aria-label":l,onClick:Ee,disabled:R,children:jsxRuntime.jsx(Bu__default.default,{fontSize:"small"})})})})]})}}),jsxRuntime.jsxs(material.Dialog,{open:X,onClose:ge,fullWidth:true,maxWidth:"md",PaperProps:{sx:N=>({borderRadius:2,overflow:"hidden",border:`1px solid ${N.palette.divider}`,boxShadow:N.palette.mode==="dark"?`0 24px 80px ${styles.alpha(N.palette.common.black,.72)}`:`0 24px 80px ${styles.alpha(N.palette.common.black,.18)}`})},children:[jsxRuntime.jsxs(material.DialogTitle,{sx:N=>({display:"flex",alignItems:"center",justifyContent:"space-between",gap:2,px:2.5,py:2,pr:1.5,borderBottom:`1px solid ${N.palette.divider}`,bgcolor:N.palette.background.paper}),children:[jsxRuntime.jsxs(material.Box,{children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:"1.05rem",fontWeight:800,lineHeight:1.25},children:a}),B?jsxRuntime.jsx(material.Typography,{variant:"body2",color:"text.secondary",sx:{mt:.25},children:`${le.length} selected`}):null]}),jsxRuntime.jsx(material.IconButton,{"aria-label":"Close",onClick:ge,size:"small",children:jsxRuntime.jsx(Sb__default.default,{fontSize:"small"})})]}),jsxRuntime.jsxs(material.DialogContent,{sx:{p:0},children:[jsxRuntime.jsxs(material.Stack,{direction:{xs:"column",sm:"row"},spacing:1,sx:N=>({px:2.5,py:1.5,borderBottom:`1px solid ${N.palette.divider}`,bgcolor:N.palette.mode==="dark"?styles.alpha(N.palette.common.white,.025):styles.alpha(N.palette.primary.main,.035)}),children:[jsxRuntime.jsx(material.TextField,{size:"small",fullWidth:true,value:q,placeholder:n,onChange:N=>H(N.target.value),onKeyDown:N=>{N.key==="Enter"&&(N.preventDefault(),K());},InputProps:{startAdornment:jsxRuntime.jsx(material.InputAdornment,{position:"start",children:jsxRuntime.jsx(Bu__default.default,{fontSize:"small"})}),sx:N=>({borderRadius:1,bgcolor:N.palette.background.paper,"& fieldset":{borderColor:styles.alpha(N.palette.text.primary,N.palette.mode==="dark"?.2:.16)},"&:hover fieldset":{borderColor:styles.alpha(N.palette.primary.main,.52)},"&.Mui-focused fieldset":{borderColor:N.palette.primary.main}})}}),E?jsxRuntime.jsx(material.Button,{variant:"outlined",onClick:()=>{K();},disabled:_,sx:{minWidth:96,textTransform:"none",fontWeight:700},children:_?jsxRuntime.jsx(material.CircularProgress,{size:18}):"Search"}):null]}),jsxRuntime.jsx(material.TableContainer,{sx:{maxHeight:420},children:jsxRuntime.jsxs(material.Table,{stickyHeader:true,size:"small",children:[jsxRuntime.jsx(material.TableHead,{children:jsxRuntime.jsxs(material.TableRow,{children:[jsxRuntime.jsx(material.TableCell,{padding:"checkbox",sx:N=>({bgcolor:N.palette.mode==="dark"?"#111111":N.palette.background.paper,borderBottom:`1px solid ${N.palette.divider}`})}),Ve.map(N=>jsxRuntime.jsx(material.TableCell,{align:N.align,sx:J=>({minWidth:N.minWidth,width:N.width,fontSize:"0.78rem",fontWeight:800,bgcolor:J.palette.mode==="dark"?"#111111":J.palette.background.paper,borderBottom:`1px solid ${J.palette.divider}`}),children:N.label},String(N.field)))]})}),jsxRuntime.jsxs(material.TableBody,{children:[st.map(N=>{let J=m(N),we=le.some(Me=>$o(Me)===$o(J));return jsxRuntime.jsxs(material.TableRow,{hover:true,selected:we,onClick:()=>rt(N),onDoubleClick:()=>{B||(oe([J]),w?.(J,N),L(false));},sx:Me=>({cursor:"pointer","&.Mui-selected":{bgcolor:styles.alpha(Me.palette.primary.main,Me.palette.mode==="dark"?.22:.12)},"&.Mui-selected:hover":{bgcolor:styles.alpha(Me.palette.primary.main,Me.palette.mode==="dark"?.28:.18)}}),children:[jsxRuntime.jsx(material.TableCell,{padding:"checkbox",children:jsxRuntime.jsx(material.Checkbox,{size:"small",checked:we})}),Ve.map(Me=>{let tt=Fu(N,Me.field);return jsxRuntime.jsx(material.TableCell,{align:Me.align,sx:{fontSize:"0.82rem",py:1},children:Me.render?Me.render(tt,N):String(tt??"")},String(Me.field))})]},$o(J))}),st.length===0?jsxRuntime.jsx(material.TableRow,{children:jsxRuntime.jsx(material.TableCell,{colSpan:Ve.length+1,children:jsxRuntime.jsx(material.Box,{sx:{py:5,textAlign:"center",color:"text.secondary"},children:s})})}):null]})]})})]}),jsxRuntime.jsxs(material.DialogActions,{sx:N=>({px:2.5,py:1.5,borderTop:`1px solid ${N.palette.divider}`,bgcolor:N.palette.background.paper,"& .MuiButton-root":{textTransform:"none",fontWeight:700}}),children:[f&&(ze||le.length>0)?jsxRuntime.jsx(material.Button,{onClick:ke,children:c}):null,jsxRuntime.jsx(material.Box,{sx:{flex:1}}),jsxRuntime.jsx(material.Button,{onClick:ge,children:d}),jsxRuntime.jsx(material.Button,{variant:"contained",onClick:Ue,disabled:!B&&le.length===0,children:i})]})]})]})};var zu=({title:e,hideHeader:t,children:o})=>jsxRuntime.jsxs(material.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[!t&&jsxRuntime.jsx(material.Box,{sx:{mb:2},children:jsxRuntime.jsx(material.Typography,{variant:"h4",children:e})}),jsxRuntime.jsx(material.Box,{sx:{flex:1,overflow:"hidden"},children:o})]});var Pa={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"},Tr={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"},di={width:30,height:30,p:.25,flex:"0 0 auto","& .MuiSvgIcon-root":{fontSize:20}},Ir={width:30,height:30,minWidth:30,minHeight:30,p:.25,flex:"0 0 auto","& .MuiSvgIcon-root":{fontSize:20}},Ou={display:"flex",alignItems:"center",justifyContent:"center",gap:.25,width:"100%",minWidth:0},tr={...Ir,borderRadius:1};var ul=e=>{let{t}=ne(),o="0.85rem",r=Array.isArray(e.actions)?e.actions:e.actions?[e.actions]:[],a=Array.isArray(e.extraTools)?e.extraTools:e.extraTools?[e.extraTools]:[],n=[...r,...a],i=typeof e.rowsPerPage=="number"?e.rowsPerPage:20,c=Array.isArray(e.rowsPerPageOptions)&&e.rowsPerPageOptions.length>0?e.rowsPerPageOptions:[20,50,100,-1],d=typeof e.count=="number"?e.count:0,l=Math.max(0,typeof e.page=="number"?e.page:0),s=i===-1?1:Math.max(1,Math.ceil(d/i)),g=Math.min(l+1,s),f=l>0,p=l<s-1&&i!==-1,b={fontSize:o,fontWeight:600,color:"text.primary",minWidth:64,height:30,display:"flex",alignItems:"center","& .MuiSelect-select":{py:0,pl:.75,pr:"22px !important",minHeight:`${30}px !important`,height:30,display:"flex",alignItems:"center",boxSizing:"border-box"},"& .MuiSelect-icon":{right:0,fontSize:20,color:"text.primary"}};return jsxRuntime.jsxs(material.Toolbar,{sx:{pl:{sm:2},pr:{xs:1,sm:1},alignItems:"center",gap:1},children:[jsxRuntime.jsx(material.TextField,{size:"small",placeholder:t("table.toolbar.searchPlaceholder"),value:e.filterText,onChange:y=>e.setFilterText(y.target.value),InputProps:{sx:{fontSize:o,"& .MuiInputBase-input":{fontSize:o,color:"text.primary"},"& .MuiInputBase-input::placeholder":{fontSize:o,opacity:1}},startAdornment:jsxRuntime.jsx(material.InputAdornment,{position:"start",children:jsxRuntime.jsx(Bu__default.default,{fontSize:"small"})})},sx:{width:300}}),jsxRuntime.jsxs(material.Box,{sx:{display:"flex",alignItems:"center",gap:1,ml:1},children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:o,color:"text.secondary",whiteSpace:"nowrap"},children:t("table.toolbar.itemsPerPage")}),jsxRuntime.jsx(material.Select,{size:"small",variant:"standard",value:i,disableUnderline:true,onChange:y=>e.onRowsPerPageChange?.(Number(y.target.value)),sx:b,children:c.map(y=>jsxRuntime.jsx(material.MenuItem,{value:y,sx:{fontSize:o},children:y===-1?t("common.all"):y},`rows-per-page-${y}`))}),jsxRuntime.jsx(material.IconButton,{size:"small",onClick:()=>e.onPageChange?.(Math.max(l-1,0)),disabled:!f,sx:{...tr,color:"text.primary"},children:jsxRuntime.jsx(Kb__default.default,{})}),jsxRuntime.jsx(material.Typography,{sx:{fontSize:o,fontWeight:600,minWidth:88,textAlign:"center",color:"text.primary"},children:t("table.toolbar.pageOf",{current:g,total:s})}),jsxRuntime.jsx(material.IconButton,{size:"small",onClick:()=>e.onPageChange?.(Math.min(l+1,s-1)),disabled:!p,sx:{...tr,color:"text.primary"},children:jsxRuntime.jsx(ch__default.default,{})})]}),jsxRuntime.jsx(material.Box,{sx:{flex:1}}),jsxRuntime.jsxs(material.Box,{sx:{display:"flex",gap:1,alignItems:"center"},children:[n.length>0&&jsxRuntime.jsx(material.Box,{sx:{display:"flex",gap:1,alignItems:"center"},children:n.map((y,u)=>jsxRuntime.jsx(Qt__namespace.default.Fragment,{children:y},`toolbar-custom-${u}`))}),jsxRuntime.jsx(material.Box,{sx:{width:"1px",height:20,bgcolor:"divider",mx:.5}}),!e.disableGrouping&&jsxRuntime.jsx(material.Tooltip,{title:t("table.toolbar.groupBy"),children:jsxRuntime.jsx(material.IconButton,{sx:{...tr,color:"text.primary"},onClick:y=>e.setGroupAnchorEl(y.currentTarget),children:jsxRuntime.jsx(material.Badge,{badgeContent:e.grouping?.length,color:"primary",children:jsxRuntime.jsx(Wb__default.default,{})})})}),jsxRuntime.jsx(material.Tooltip,{title:t("table.toolbar.summary"),children:jsxRuntime.jsx(material.IconButton,{sx:{...tr,color:e.showSummary?"primary.main":"text.primary"},onClick:y=>e.setSummaryAnchorEl(y.currentTarget),children:jsxRuntime.jsx(Hb__default.default,{})})}),jsxRuntime.jsx(material.Tooltip,{title:t("table.toolbar.columns"),children:jsxRuntime.jsx(material.IconButton,{sx:{...tr,color:"text.primary"},onClick:y=>e.setAnchorEl(y.currentTarget),children:jsxRuntime.jsx(zb__default.default,{})})}),jsxRuntime.jsx(material.Tooltip,{title:t("table.toolbar.export"),children:jsxRuntime.jsx(material.IconButton,{sx:{...tr,color:"text.primary"},onClick:e.handleExport,children:jsxRuntime.jsx(Vb__default.default,{})})}),e.showCreateButton&&jsxRuntime.jsx(material.Tooltip,{title:t("table.toolbar.newItem"),children:jsxRuntime.jsx(material.IconButton,{onClick:e.onOpenCreateDialog,color:"primary",sx:tr,children:jsxRuntime.jsx(Ju__default.default,{})})}),e.showEditButton&&jsxRuntime.jsx(material.Tooltip,{title:t("table.toolbar.editItem"),children:jsxRuntime.jsx("span",{children:jsxRuntime.jsx(material.IconButton,{onClick:e.onOpenEditDialog,color:"primary",disabled:!!e.editDisabled,sx:tr,children:jsxRuntime.jsx(Ub__default.default,{})})})}),e.showDeleteButton&&jsxRuntime.jsx(material.Tooltip,{title:t("table.toolbar.deleteItem"),children:jsxRuntime.jsx("span",{children:jsxRuntime.jsx(material.IconButton,{onClick:e.onOpenDeleteConfirm,color:"error",disabled:!!e.deleteDisabled,sx:tr,children:jsxRuntime.jsx(_b__default.default,{})})})}),e.onOpenGraphReport&&jsxRuntime.jsx(material.Tooltip,{title:t("table.toolbar.graphicReport"),children:jsxRuntime.jsx(material.IconButton,{sx:{...tr,color:"text.primary"},onClick:e.onOpenGraphReport,children:jsxRuntime.jsx($b__default.default,{})})}),e.onLayoutSave&&!e.layoutManager&&jsxRuntime.jsx(material.Tooltip,{title:t("table.toolbar.saveLayout"),children:jsxRuntime.jsx(material.IconButton,{sx:{...tr,color:"text.primary"},onClick:y=>e.onLayoutSave(y),children:jsxRuntime.jsx(jp__default.default,{})})}),e.layoutManager]})]})};var pl=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:o}=e;return "translate3d("+(t?Math.round(t):0)+"px, "+(o?Math.round(o):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:o}=e;return "scaleX("+t+") scaleY("+o+")"}},Transform:{toString(e){if(e)return [pl.Translate.toString(e),pl.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:o,easing:r}=e;return t+" "+o+"ms "+r}}});var gl=e=>{let{t}=ne(),{onSelectAllClick:o,order:r,orderBy:a,sortBy:n=[],numSelected:i=0,rowCount:c=0,onRequestSort:d,onContextMenu:l,columns:s,visibleColumns:g,selectionMode:f,grouping:p=[],isAllExpanded:b=false,handleToggleAll:y,onColumnResize:u,columnWidths:C,enableColumnReorder:m=false,disableSorting:h=false}=e,[x,w]=Qt.useState(null),E=Qt.useRef(null),R=$=>q=>{h||x||d($);},T=($,q,H)=>{$.preventDefault(),$.stopPropagation(),w(q),E.current={startX:$.clientX,startWidth:H,colId:q},document.addEventListener("mousemove",I),document.addEventListener("mouseup",k),document.body.style.cursor="col-resize";},I=$=>{if(!E.current)return;let{startX:q,startWidth:H,colId:re}=E.current,de=$.clientX-q,Ce=Math.max(50,H+de);u&&u(re,Ce);},k=()=>{w(null),E.current=null,document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",k),document.body.style.cursor="";};Qt.useEffect(()=>()=>{document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",k);},[]);let S=f==="multiple"||f==="single",D=p.length>0&&!!y,P=t(b?"table.group.collapseAll":"table.group.expandAll"),M=s.filter($=>g.includes($.id)),B=new Map(n.map(($,q)=>[$.field,{...$,priority:q+1}])),X=M.map($=>{let q=C?.[$.id]||$.minWidth||100,H=B.get($.id);return jsxRuntime.jsx(sy,{headCell:$,width:typeof q=="number"?q:100,order:r,orderBy:a,multiSortInfo:h?void 0:H,onRequestSort:R($.id),onContextMenu:l,onResizeMouseDown:re=>T(re,$.id,typeof q=="number"?q:100),enableColumnReorder:m,disableSorting:h},$.id)}),L=M.map($=>$.id),Z=jsxRuntime.jsxs(Qb__default.default,{children:[S&&jsxRuntime.jsx(vc__default.default,{padding:"checkbox",sx:$=>({...Pa,position:"sticky",top:0,zIndex:4,backgroundColor:$.palette.mode==="dark"?"#000000":"#f5f5f5",color:$.palette.mode==="dark"?"#ffffff":$.palette.text.primary}),children:jsxRuntime.jsx(Jb__default.default,{color:"primary",indeterminate:i>0&&i<c,checked:c>0&&i===c,onChange:o,disabled:f==="single",sx:di})}),D&&jsxRuntime.jsx(vc__default.default,{align:"center",padding:"checkbox",sx:$=>({...Tr,position:"sticky",top:0,zIndex:4,backgroundColor:$.palette.mode==="dark"?"#000000":"#f5f5f5",color:$.palette.mode==="dark"?"#ffffff":$.palette.text.primary}),children:jsxRuntime.jsx(oy__default.default,{title:P,children:jsxRuntime.jsx(ty__default.default,{size:"small",onClick:$=>{$.stopPropagation(),y?.(!b);},sx:Ir,children:b?jsxRuntime.jsx(ay__default.default,{}):jsxRuntime.jsx(ry__default.default,{})})})}),m?jsxRuntime.jsx(sortable.SortableContext,{items:L,strategy:sortable.horizontalListSortingStrategy,children:X}):X]});return jsxRuntime.jsx(Yb__default.default,{children:Z})},sy=({headCell:e,width:t,order:o,orderBy:r,multiSortInfo:a,onRequestSort:n,onContextMenu:i,onResizeMouseDown:c,enableColumnReorder:d,disableSorting:l})=>{let{setNodeRef:s,attributes:g,listeners:f,transform:p,transition:b,isDragging:y}=sortable.useSortable({id:e.id,disabled:!d}),u=d?{transform:pl.Transform.toString(p),transition:b,opacity:y?.6:1}:{},C=l?"asc":a?.direction??(r===e.id?o:"asc"),m=!l&&(!!a||r===e.id);return jsxRuntime.jsxs(vc__default.default,{ref:d?s:void 0,align:"left",padding:e.disablePadding?"none":"normal",sortDirection:m?C:false,onContextMenu:i?h=>i(h,e.id):void 0,style:{width:t,minWidth:t,maxWidth:t,...u},sx:h=>({position:"sticky",top:0,zIndex:4,backgroundColor:h.palette.mode==="dark"?"#000000":"#f5f5f5",color:h.palette.mode==="dark"?"#ffffff":h.palette.text.primary,fontWeight:"bold",userSelect:"none",cursor:d?y?"grabbing":"grab":void 0}),...d?g:{},...d?f:{},children:[l?jsxRuntime.jsx(Ri__default.default,{component:"span",sx:h=>({overflow:"visible",textOverflow:"clip",whiteSpace:"normal",lineHeight:1.2,wordBreak:"break-word",pr:1,display:"inline-flex",alignItems:"center",gap:.5,fontWeight:"bold",fontSize:"0.85rem",color:h.palette.mode==="dark"?"#ffffff":h.palette.text.primary}),children:e.label}):jsxRuntime.jsx(ey__default.default,{active:m,direction:C,onClick:n,sx:h=>({"&.MuiTableSortLabel-root":{width:"100%"},"& .MuiTableSortLabel-icon":{color:h.palette.mode==="dark"?"#ffffff":h.palette.text.primary,opacity:m?1:0,transition:"opacity 0.2s"},"&:hover .MuiTableSortLabel-icon":{opacity:.5},"&.Mui-active .MuiTableSortLabel-icon":{opacity:1,color:h.palette.mode==="dark"?"#ffffff":h.palette.text.primary},fontWeight:"bold",fontSize:"0.85rem",color:h.palette.mode==="dark"?"#ffffff":h.palette.text.primary}),children:jsxRuntime.jsxs(Ri__default.default,{component:"span",sx:{overflow:"visible",textOverflow:"clip",whiteSpace:"normal",lineHeight:1.2,wordBreak:"break-word",pr:1,display:"inline-flex",alignItems:"center",gap:.5},children:[e.label,a&&jsxRuntime.jsx(Ri__default.default,{component:"span",sx:h=>({display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:16,height:16,px:.5,borderRadius:999,fontSize:10,fontWeight:700,color:"#fff",backgroundColor:h.palette.primary.main}),children:a.priority})]})}),jsxRuntime.jsx(Ri__default.default,{onMouseDown:c,onPointerDown:h=>h.stopPropagation(),onClick:h=>h.stopPropagation(),sx:h=>({position:"absolute",right:0,top:0,bottom:0,width:5,cursor:"col-resize",backgroundColor:"transparent",transition:"background-color 120ms ease","&:hover":{backgroundColor:h.palette.mode==="dark"?"rgba(148,163,184,0.28)":"rgba(15,23,42,0.12)"},zIndex:1})})]})};var $u=e=>{let{t}=ne(),{visibleRows:o,visibleColumns:r,selected:a=[],handleClick:n,columns:i,toggleGroupExpand:c,expandedGroups:d=new Set,selectionMode:l,grouping:s=[],isGroupFullyExpanded:g,handleExpandGroupRecursively:f,handleCollapseGroupRecursively:p}=e,b=m=>a.indexOf(m)!==-1,y=l==="multiple"||l==="single",u=s.length>0,C=r.length+(y?1:0)+(u?1:0);return jsxRuntime.jsxs(material.TableBody,{children:[o.map((m,h)=>{if(m.type==="group"){let x=d.has(m.id),w=m.childIds||[],E=w.filter(k=>b(k)).length,R=w.length>0&&E===w.length,T=E>0&&E<w.length;return jsxRuntime.jsxs(material.TableRow,{sx:k=>({backgroundColor:k.palette.mode==="dark"?"#111111":"#f5f5f5","& .MuiTableCell-root":{color:k.palette.text.primary,borderBottomColor:k.palette.divider},"& .MuiIconButton-root":{color:k.palette.text.primary},"& .MuiCheckbox-root":{color:k.palette.text.secondary},"& .MuiCheckbox-root.Mui-checked, & .MuiCheckbox-root.MuiCheckbox-indeterminate":{color:k.palette.primary.main}}),children:[y&&jsxRuntime.jsx(material.TableCell,{padding:"checkbox",sx:Pa,children:jsxRuntime.jsx(material.Checkbox,{size:"small",checked:R,indeterminate:T,onChange:k=>{if(k.stopPropagation(),!!e.onSelectionChange)if(R){let S=a.filter(D=>!w.includes(D));e.onSelectionChange(S);}else {let S=Array.from(new Set([...a,...w]));e.onSelectionChange(S);}},onClick:k=>k.stopPropagation(),sx:di})}),u&&jsxRuntime.jsx(material.TableCell,{padding:"checkbox",sx:Tr,children:jsxRuntime.jsxs(material.Box,{sx:Ou,children:[s.length>1&&m.level<s.length-1&&jsxRuntime.jsx(material.Tooltip,{title:g?.(m.id)?t("table.group.collapseAll"):t("table.group.expandAll"),children:jsxRuntime.jsx(material.IconButton,{size:"small",onClick:()=>{g?.(m.id)?p?.(m.id):f?.(m.id);},sx:Ir,children:g?.(m.id)?jsxRuntime.jsx(ay__default.default,{}):jsxRuntime.jsx(ry__default.default,{})})}),jsxRuntime.jsx(material.IconButton,{size:"small",onClick:()=>c&&c(m.id),sx:Ir,children:x?jsxRuntime.jsx(gy__default.default,{}):jsxRuntime.jsx(ch__default.default,{})})]})}),jsxRuntime.jsx(material.TableCell,{colSpan:r.length,sx:{py:1,pl:m.level*3+1},children:jsxRuntime.jsxs(material.Typography,{variant:"body2",fontWeight:"bold",color:"text.primary",sx:{fontSize:"0.85rem"},children:[m.field,": ",m.value," (",m.count,")"]})})]},m.id)}else {let x=m.data||m,w=m.id||x.id||h,E=b(w),R=`enhanced-table-checkbox-${h}`,I=(m.level!==void 0?m.level:0)*4;return jsxRuntime.jsxs(material.TableRow,{hover:true,onClick:k=>n&&n(k,x),role:"checkbox","aria-checked":E,tabIndex:-1,selected:E,sx:{cursor:"pointer"},children:[y&&jsxRuntime.jsx(material.TableCell,{padding:"checkbox",sx:Pa,children:jsxRuntime.jsx(material.Checkbox,{color:"primary",checked:E,inputProps:{"aria-labelledby":R},sx:di})}),u&&jsxRuntime.jsx(material.TableCell,{padding:"checkbox",sx:Tr}),i.filter(k=>r.includes(k.id)).map((k,S)=>{let P=S===0&&I>0?{pl:I+2}:{};return jsxRuntime.jsx(material.TableCell,{align:"left",sx:P,children:k.render?k.render(x[k.id],x):(function(){let B=x[k.id];if(k.numeric){if(typeof B=="number")return B.toLocaleString();if(typeof B=="string"&&B.trim()!==""&&!isNaN(Number(B)))return Number(B).toLocaleString()}return B})()},k.id)})]},w)}}),o.length===0&&jsxRuntime.jsx(material.TableRow,{children:jsxRuntime.jsx(material.TableCell,{colSpan:C,align:"center",children:t("common.noData")})})]})};var Gu=e=>{let{visibleColumns:t,summaryRow:o,selectionMode:r,grouping:a=[]}=e;if(!e.showSummary)return null;let n=r==="multiple"||r==="single",i=a.length>0;return jsxRuntime.jsx(material.TableFooter,{sx:{position:"sticky",bottom:0,zIndex:e.zIndex,bgcolor:"background.paper"},children:jsxRuntime.jsxs(material.TableRow,{children:[n&&jsxRuntime.jsx(material.TableCell,{padding:"checkbox",sx:{...Pa,bgcolor:"background.paper"}}),i&&jsxRuntime.jsx(material.TableCell,{padding:"checkbox",sx:{...Tr,bgcolor:"background.paper"}}),t.map(c=>jsxRuntime.jsx(material.TableCell,{sx:{fontWeight:"bold",fontSize:"0.85rem",bgcolor:"background.paper",color:"text.primary"},children:(function(){let l=o[c];return l==null||l===""?"":typeof l=="number"?l.toLocaleString():typeof l=="string"&&l.trim()!==""&&!isNaN(Number(l))?Number(l).toLocaleString():l})()},c))]})})};var _u=e=>{let{t}=ne();return jsxRuntime.jsx(material.Box,{sx:{p:2},children:jsxRuntime.jsx(material.Typography,{children:t("table.mobile.notImplemented")})})};var sn=({groupAnchorEl:e,setGroupAnchorEl:t,grouping:o,setGrouping:r,columns:a,toggleGroupField:n})=>{let{t:i}=ne();return jsxRuntime.jsxs(material.Menu,{anchorEl:e,open:!!e,onClose:()=>t(null),children:[jsxRuntime.jsxs(material.Box,{sx:{p:1,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[jsxRuntime.jsx(material.Typography,{variant:"subtitle2",sx:{px:1},children:i("table.menu.groupBy")}),o.length>0&&jsxRuntime.jsx(material.Button,{size:"small",color:"error",onClick:()=>r([]),startIcon:jsxRuntime.jsx(Zu__default.default,{}),children:i("table.menu.clearAll")})]}),jsxRuntime.jsx(material.Divider,{}),a.map(c=>{let d=o.includes(c.id),l=o.indexOf(c.id)+1;return jsxRuntime.jsx(material.MenuItem,{onClick:()=>n(c.id),children:jsxRuntime.jsxs(material.Box,{sx:{display:"flex",alignItems:"center",width:"100%"},children:[jsxRuntime.jsx(material.Checkbox,{checked:d,size:"small"}),jsxRuntime.jsx(material.ListItemText,{primary:c.label}),d&&jsxRuntime.jsx(material.Badge,{badgeContent:l,color:"primary",sx:{mr:2}})]})},c.id)})]})},cn=({anchorEl:e,setAnchorEl:t,columns:o,visibleColumns:r,toggleColumnVisibility:a})=>{let{t:n}=ne();return jsxRuntime.jsxs(material.Menu,{anchorEl:e,open:!!e,onClose:()=>t(null),children:[jsxRuntime.jsx(material.MenuItem,{disabled:true,children:jsxRuntime.jsx(material.ListItemText,{primary:n("table.menu.visibleColumns")})}),jsxRuntime.jsx(material.Divider,{}),o.map(i=>jsxRuntime.jsxs(material.MenuItem,{onClick:()=>a(i.id),children:[jsxRuntime.jsx(material.Checkbox,{checked:r.includes(i.id),size:"small"}),jsxRuntime.jsx(material.ListItemText,{primary:i.label})]},i.id))]})},bl=({anchorEl:e,setAnchorEl:t,showSummary:o,setShowSummary:r,columns:a,summaryColumns:n,toggleSummaryColumn:i})=>{let{t:c}=ne();return jsxRuntime.jsxs(material.Menu,{anchorEl:e,open:!!e,onClose:()=>t(null),children:[jsxRuntime.jsx(material.MenuItem,{children:jsxRuntime.jsx(material.FormControlLabel,{control:jsxRuntime.jsx(material.Switch,{checked:o,onChange:d=>r(d.target.checked),size:"small"}),label:c("table.menu.showSummaryRow")})}),jsxRuntime.jsx(material.Divider,{}),a.filter(d=>d.numeric).map(d=>jsxRuntime.jsxs(material.MenuItem,{onClick:()=>i(d.id),disabled:!o,children:[jsxRuntime.jsx(material.Checkbox,{checked:n.includes(d.id),size:"small"}),jsxRuntime.jsx(material.ListItemText,{primary:d.label})]},d.id)),a.filter(d=>d.numeric).length===0&&jsxRuntime.jsx(material.MenuItem,{disabled:true,children:jsxRuntime.jsx(material.ListItemText,{primary:c("table.menu.noNumericColumns")})})]})},yl=({contextMenu:e,handleCloseContextMenu:t,columns:o,visibleColumns:r,toggleColumnVisibility:a})=>{let{t:n}=ne();return jsxRuntime.jsxs(material.Menu,{open:e!==null,onClose:t,anchorReference:"anchorPosition",anchorPosition:e!==null?{top:e.mouseY,left:e.mouseX}:void 0,children:[jsxRuntime.jsx(material.MenuItem,{onClick:t,children:n("common.copy")}),jsxRuntime.jsx(material.Divider,{}),jsxRuntime.jsx(material.MenuItem,{disabled:true,children:n("table.menu.visibleColumns")}),o.map(i=>jsxRuntime.jsxs(material.MenuItem,{onClick:()=>a(i.id),children:[jsxRuntime.jsx(material.ListItemIcon,{children:r.includes(i.id)&&jsxRuntime.jsx(Ry__default.default,{fontSize:"small"})}),jsxRuntime.jsx(material.ListItemText,{children:i.label})]},i.id))]})},ep=({contextMenu:e,handleClose:t,columns:o,visibleColumns:r,grouping:a,summaryColumns:n,showSummary:i,sortBy:c,orderBy:d,order:l,onSortAsc:s,onSortDesc:g,onClearSort:f,onHideColumn:p,onToggleGroup:b,onToggleSummary:y,onOpenSortDialog:u})=>{let{t:C}=ne(),m=e?.columnId??"",h=o.find(S=>S.id===m),x=a.includes(m),w=n.includes(m),E=!!h?.numeric,R=c.find(S=>S.field===m),T=R?R.direction==="asc":d===m&&l==="asc",I=R?R.direction==="desc":d===m&&l==="desc",k=T||I;return jsxRuntime.jsxs(material.Menu,{open:e!==null,onClose:t,anchorReference:"anchorPosition",anchorPosition:e!==null?{top:e.mouseY,left:e.mouseX}:void 0,children:[jsxRuntime.jsx(material.MenuItem,{disabled:true,sx:{opacity:"1 !important",fontWeight:700},children:jsxRuntime.jsx(material.ListItemText,{primary:h?.label??m})}),jsxRuntime.jsx(material.Divider,{}),jsxRuntime.jsxs(material.MenuItem,{onClick:()=>{s(m),t();},selected:T,children:[jsxRuntime.jsx(material.ListItemIcon,{children:jsxRuntime.jsx(Yu__default.default,{fontSize:"small"})}),jsxRuntime.jsx(material.ListItemText,{primary:C("table.headerMenu.sortAsc")})]}),jsxRuntime.jsxs(material.MenuItem,{onClick:()=>{g(m),t();},selected:I,children:[jsxRuntime.jsx(material.ListItemIcon,{children:jsxRuntime.jsx(Qu__default.default,{fontSize:"small"})}),jsxRuntime.jsx(material.ListItemText,{primary:C("table.headerMenu.sortDesc")})]}),k&&jsxRuntime.jsxs(material.MenuItem,{onClick:()=>{f(m),t();},children:[jsxRuntime.jsx(material.ListItemIcon,{children:jsxRuntime.jsx(Zu__default.default,{fontSize:"small"})}),jsxRuntime.jsx(material.ListItemText,{primary:C("table.headerMenu.clearSort")})]}),jsxRuntime.jsxs(material.MenuItem,{onClick:()=>{u(),t();},children:[jsxRuntime.jsx(material.ListItemIcon,{children:jsxRuntime.jsx(Ju__default.default,{fontSize:"small"})}),jsxRuntime.jsx(material.ListItemText,{primary:C("table.headerMenu.configureSort")})]}),jsxRuntime.jsx(material.Divider,{}),jsxRuntime.jsxs(material.MenuItem,{onClick:()=>{b(m),t();},selected:x,children:[jsxRuntime.jsx(material.ListItemIcon,{children:jsxRuntime.jsx(Wb__default.default,{fontSize:"small"})}),jsxRuntime.jsx(material.ListItemText,{primary:C(x?"table.headerMenu.ungroup":"table.headerMenu.group")})]}),E&&i&&jsxRuntime.jsxs(material.MenuItem,{onClick:()=>{y(m),t();},selected:w,children:[jsxRuntime.jsx(material.ListItemIcon,{children:jsxRuntime.jsx(Hb__default.default,{fontSize:"small"})}),jsxRuntime.jsx(material.ListItemText,{primary:C(w?"table.headerMenu.removeSummary":"table.headerMenu.addSummary")})]}),jsxRuntime.jsx(material.Divider,{}),jsxRuntime.jsxs(material.MenuItem,{onClick:()=>{p(m),t();},children:[jsxRuntime.jsx(material.ListItemIcon,{children:jsxRuntime.jsx(My__default.default,{fontSize:"small"})}),jsxRuntime.jsx(material.ListItemText,{primary:C("table.headerMenu.hideColumn")})]})]})},tp=({open:e,onClose:t,columns:o,initialRules:r,onApply:a,onClear:n})=>{let{t:i}=ne(),[c,d]=Qt.useState([]);Qt.useEffect(()=>{e&&d(r.length>0?r.map(y=>({...y})):[]);},[e,r]);let l=Qt.useMemo(()=>new Set(c.map(y=>y.field)),[c]),s=Qt.useMemo(()=>o.filter(y=>!l.has(y.id)),[o,l]),g=()=>{let y=s[0];y&&d(u=>[...u,{field:y.id,direction:"asc"}]);},f=y=>{d(u=>u.filter((C,m)=>m!==y));},p=(y,u)=>{d(C=>C.map((m,h)=>h===y?{...m,...u}:m));},b=(y,u)=>{d(C=>{let m=y+u;if(m<0||m>=C.length)return C;let h=[...C],[x]=h.splice(y,1);return h.splice(m,0,x),h});};return jsxRuntime.jsxs(material.Dialog,{open:e,onClose:t,maxWidth:"sm",fullWidth:true,children:[jsxRuntime.jsx(material.DialogTitle,{children:i("table.sortDialog.title")}),jsxRuntime.jsxs(material.DialogContent,{dividers:true,children:[c.length===0?jsxRuntime.jsx(material.Typography,{variant:"body2",sx:{color:"text.secondary",py:2},children:i("table.sortDialog.empty")}):jsxRuntime.jsx(material.Stack,{spacing:1,children:c.map((y,u)=>{let C=new Set(c.filter((h,x)=>x!==u).map(h=>h.field)),m=o.filter(h=>!C.has(h.id));return jsxRuntime.jsxs(material.Box,{sx:{display:"grid",gridTemplateColumns:"24px 1fr 110px auto auto",alignItems:"center",gap:1},children:[jsxRuntime.jsx(material.Badge,{badgeContent:u+1,color:"primary",sx:{ml:.5}}),jsxRuntime.jsx("select",{value:y.field,onChange:h=>p(u,{field:h.target.value}),style:{padding:6,fontSize:13,borderRadius:4},children:m.map(h=>jsxRuntime.jsx("option",{value:h.id,children:h.label},h.id))}),jsxRuntime.jsxs("select",{value:y.direction,onChange:h=>p(u,{direction:h.target.value}),style:{padding:6,fontSize:13,borderRadius:4},children:[jsxRuntime.jsx("option",{value:"asc",children:i("table.sortDialog.asc")}),jsxRuntime.jsx("option",{value:"desc",children:i("table.sortDialog.desc")})]}),jsxRuntime.jsx(material.IconButton,{size:"small",onClick:()=>b(u,-1),disabled:u===0,children:jsxRuntime.jsx(Yu__default.default,{fontSize:"small"})}),jsxRuntime.jsxs(material.Stack,{direction:"row",children:[jsxRuntime.jsx(material.IconButton,{size:"small",onClick:()=>b(u,1),disabled:u===c.length-1,children:jsxRuntime.jsx(Qu__default.default,{fontSize:"small"})}),jsxRuntime.jsx(material.IconButton,{size:"small",onClick:()=>f(u),children:jsxRuntime.jsx(By__default.default,{fontSize:"small"})})]})]},`sort-rule-${u}`)})}),jsxRuntime.jsx(material.Button,{size:"small",onClick:g,disabled:s.length===0,startIcon:jsxRuntime.jsx(Ju__default.default,{}),sx:{mt:2},children:i("table.sortDialog.addRule")})]}),jsxRuntime.jsxs(material.DialogActions,{children:[jsxRuntime.jsx(material.Button,{color:"inherit",onClick:()=>{n(),t();},children:i("table.sortDialog.clearAll")}),jsxRuntime.jsx(material.Box,{sx:{flex:1}}),jsxRuntime.jsx(material.Button,{onClick:t,children:i("common.cancel")}),jsxRuntime.jsx(material.Button,{variant:"contained",onClick:()=>{a(c),t();},children:i("common.ok")})]})]})};var hi=(e,t=2)=>e.toLocaleString(void 0,{maximumFractionDigits:t}),rp=({kpis:e})=>{let{t}=ne(),o=[{label:t("graph.kpi.totalRecords"),value:hi(e.totalRecords,0),color:"text.primary"},{label:t("graph.kpi.totalReport"),value:hi(e.totalReportHours),color:"text.primary"},{label:t("graph.kpi.totalBillable"),value:hi(e.totalBillableHours),color:"success.main"},{label:t("graph.kpi.efficiency"),value:`${e.efficiency.toFixed(2)}%`,color:"warning.main"},{label:t("graph.kpi.amount"),value:hi(e.totalAmount),color:"info.main"},{label:t("graph.kpi.flagged"),value:hi(e.flaggedCount,0),color:"error.main"}];return jsxRuntime.jsx(material.Box,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(2, minmax(0, 1fr))",lg:"repeat(6, minmax(0, 1fr))"},gap:1.5},children:o.map(r=>jsxRuntime.jsxs(material.Paper,{variant:"outlined",sx:{p:1.5,borderRadius:2,minHeight:96,display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[jsxRuntime.jsx(material.Typography,{variant:"caption",color:"text.secondary",children:r.label}),jsxRuntime.jsx(material.Typography,{variant:"h4",fontWeight:800,sx:{color:r.color},children:r.value})]},r.label))})};var xl=({title:e,subtitle:t,children:o})=>jsxRuntime.jsxs(material.Paper,{variant:"outlined",sx:{p:2,borderRadius:2},children:[jsxRuntime.jsx(material.Typography,{variant:"subtitle1",fontWeight:700,children:e}),t&&jsxRuntime.jsx(material.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:t}),o]});var yi=({data:e,orientation:t="horizontal",valueSuffix:o="",minHeight:r=210,activeName:a,onItemClick:n})=>{if(e.length===0)return jsxRuntime.jsx(material.Typography,{variant:"body2",color:"text.secondary",children:"No data"});let i=Math.max(...e.map(c=>c.value),1);return t==="vertical"?jsxRuntime.jsx(material.Box,{sx:{display:"flex",gap:1,alignItems:"flex-end",minHeight:r},children:e.map(c=>jsxRuntime.jsxs(material.Box,{sx:{flex:1,minWidth:0},children:[jsxRuntime.jsx(material.Box,{onClick:()=>n?.(c),sx:{height:`${Math.max(c.value/i*180,6)}px`,bgcolor:c.name===a?"primary.dark":"primary.main",borderRadius:"8px 8px 0 0",cursor:n?"pointer":"default",opacity:a&&c.name!==a?.45:1}}),jsxRuntime.jsx(material.Typography,{variant:"caption",noWrap:true,title:c.name,sx:{display:"block",mt:.5},children:c.name}),jsxRuntime.jsxs(material.Typography,{variant:"caption",color:"text.secondary",children:[c.value.toFixed(1),o]})]},c.name))}):jsxRuntime.jsx(material.Stack,{spacing:1,children:e.map(c=>jsxRuntime.jsxs(material.Box,{sx:{display:"grid",gridTemplateColumns:"140px 1fr 64px",gap:1},children:[jsxRuntime.jsx(material.Typography,{variant:"caption",color:"text.secondary",noWrap:true,title:c.name,children:c.name}),jsxRuntime.jsx(material.Box,{onClick:()=>n?.(c),sx:{alignSelf:"center",bgcolor:"action.hover",height:10,borderRadius:999,overflow:"hidden",cursor:n?"pointer":"default",opacity:a&&c.name!==a?.45:1},children:jsxRuntime.jsx(material.Box,{sx:{width:`${c.value/i*100}%`,height:"100%",bgcolor:c.name===a?"primary.dark":"primary.main"}})}),jsxRuntime.jsxs(material.Typography,{variant:"caption",sx:{textAlign:"right",fontWeight:600},children:[c.value.toFixed(1),o]})]},c.name))})};var ip=({data:e,color:t="#42A5F5",valueSuffix:o="",height:r=220})=>{if(e.length===0)return jsxRuntime.jsx(material.Typography,{variant:"body2",color:"text.secondary",children:"No data"});let a=640,n=28,i=e.map(f=>f.value),c=Math.min(...i,0),l=Math.max(...i,1)-c||1,s=e.map((f,p)=>{let b=n+p*(a-n*2)/Math.max(e.length-1,1),y=r-n-(f.value-c)/l*(r-n*2);return {x:b,y,...f}}),g=s.map(f=>`${f.x},${f.y}`).join(" ");return jsxRuntime.jsxs(material.Box,{children:[jsxRuntime.jsxs(material.Box,{component:"svg",viewBox:`0 0 ${a} ${r}`,sx:{width:"100%",height:r},children:[jsxRuntime.jsx("line",{x1:n,y1:r-n,x2:a-n,y2:r-n,stroke:"rgba(148,163,184,0.4)"}),jsxRuntime.jsx("polyline",{fill:"none",stroke:t,strokeWidth:3,points:g}),s.map(f=>jsxRuntime.jsx("circle",{cx:f.x,cy:f.y,r:4,fill:t},f.name))]}),jsxRuntime.jsx(material.Box,{sx:{mt:1,display:"grid",gridTemplateColumns:`repeat(${e.length}, minmax(0, 1fr))`,gap:1},children:e.map(f=>jsxRuntime.jsxs(material.Box,{sx:{minWidth:0},children:[jsxRuntime.jsx(material.Typography,{variant:"caption",noWrap:true,title:f.name,sx:{display:"block"},children:f.name}),jsxRuntime.jsxs(material.Typography,{variant:"caption",color:"text.secondary",children:[f.value.toFixed(1),o]})]},f.name))})]})};var lp=({data:e,barColor:t="#64B5F6",lineColor:o="#FFB74D",height:r=220})=>{if(e.length===0)return jsxRuntime.jsx(material.Typography,{variant:"body2",color:"text.secondary",children:"No data"});let a=640,n=28,i=Math.max(...e.map(s=>s.barValue),1),c=Math.max(...e.map(s=>s.lineValue),1),d=e.map((s,g)=>{let f=(a-n*2)/e.length,p=Math.max(f*.5,8),b=n+g*f+(f-p)/2,y=s.barValue/i*(r-n*2),u=r-n-y;return {x:b,y:u,barHeight:y,barWidth:p,item:s}}),l=e.map((s,g)=>{let f=(a-n*2)/e.length,p=n+g*f+f/2,b=r-n-s.lineValue/c*(r-n*2);return {x:p,y:b,item:s}});return jsxRuntime.jsxs(material.Stack,{spacing:1.25,children:[jsxRuntime.jsxs(material.Box,{component:"svg",viewBox:`0 0 ${a} ${r}`,sx:{width:"100%",height:r},children:[jsxRuntime.jsx("line",{x1:n,y1:r-n,x2:a-n,y2:r-n,stroke:"rgba(148,163,184,0.4)"}),d.map(s=>jsxRuntime.jsx("rect",{x:s.x,y:s.y,width:s.barWidth,height:Math.max(s.barHeight,4),rx:6,fill:t},s.item.name)),jsxRuntime.jsx("polyline",{fill:"none",stroke:o,strokeWidth:3,points:l.map(s=>`${s.x},${s.y}`).join(" ")}),l.map(s=>jsxRuntime.jsx("circle",{cx:s.x,cy:s.y,r:3.5,fill:o},`${s.item.name}-line`))]}),jsxRuntime.jsx(material.Box,{sx:{display:"grid",gridTemplateColumns:`repeat(${e.length}, minmax(0, 1fr))`,gap:1},children:e.map(s=>jsxRuntime.jsxs(material.Box,{sx:{minWidth:0},children:[jsxRuntime.jsx(material.Typography,{variant:"caption",noWrap:true,title:s.name,sx:{display:"block"},children:s.name}),jsxRuntime.jsxs(material.Typography,{variant:"caption",color:"text.secondary",sx:{display:"block"},children:["Bar: ",s.barValue.toFixed(1)]}),jsxRuntime.jsxs(material.Typography,{variant:"caption",color:"text.secondary",sx:{display:"block"},children:["Line: ",s.lineValue.toFixed(1)]})]},s.name))})]})};var $y=e=>`rgba(30, 136, 229, ${.2+Math.max(0,Math.min(1,e))*.8})`,cp=({data:e})=>{if(e.length===0)return jsxRuntime.jsx(material.Typography,{variant:"body2",color:"text.secondary",children:"No data"});let t=Array.from(new Set(e.map(n=>n.x))),o=Array.from(new Set(e.map(n=>n.y))),r=Math.max(...e.map(n=>n.value),1),a=new Map(e.map(n=>[`${n.y}__${n.x}`,n.value]));return jsxRuntime.jsx(material.Box,{sx:{overflowX:"auto"},children:jsxRuntime.jsxs(material.Box,{sx:{display:"grid",gridTemplateColumns:`120px repeat(${t.length}, minmax(64px, 1fr))`,gap:1,minWidth:120+t.length*64},children:[jsxRuntime.jsx(material.Box,{}),t.map(n=>jsxRuntime.jsx(material.Typography,{variant:"caption",sx:{textAlign:"center",fontWeight:600},children:n},n)),o.map(n=>jsxRuntime.jsxs(material.Box,{sx:{display:"contents"},children:[jsxRuntime.jsx(material.Typography,{variant:"caption",sx:{alignSelf:"center"},children:n}),t.map(i=>{let c=a.get(`${n}__${i}`)||0,d=c/r;return jsxRuntime.jsx(material.Box,{sx:{height:36,borderRadius:1,bgcolor:$y(d),border:"1px solid rgba(148,163,184,0.2)",display:"flex",alignItems:"center",justifyContent:"center"},children:jsxRuntime.jsx(material.Typography,{variant:"caption",fontWeight:700,children:c.toFixed(1)})},`${n}-${i}`)})]},n))]})})};var Gy=["#1E88E5","#1ABC9C","#FBC02D","#EF5350","#7E57C2","#78909C"],Il=({data:e,variant:t="donut",colors:o=Gy,size:r=180,activeName:a,onItemClick:n})=>{if(e.length===0)return jsxRuntime.jsx(material.Typography,{variant:"body2",color:"text.secondary",children:"No data"});let i=0,c=e.map((d,l)=>{let s=i;return i+=d.percent,`${o[l%o.length]} ${s}% ${i}%`});return jsxRuntime.jsxs(material.Stack,{direction:{xs:"column",sm:"row"},spacing:2,alignItems:"center",children:[jsxRuntime.jsx(material.Box,{sx:{width:r,height:r,borderRadius:"50%",background:`conic-gradient(${c.join(", ")})`,position:"relative",flexShrink:0},children:t==="donut"&&jsxRuntime.jsx(material.Box,{sx:{position:"absolute",inset:Math.round(r*.18),bgcolor:"background.paper",borderRadius:"50%"}})}),jsxRuntime.jsx(material.Stack,{spacing:1,sx:{minWidth:180},children:e.map((d,l)=>jsxRuntime.jsxs(material.Box,{onClick:()=>n?.(d),sx:{display:"flex",alignItems:"center",gap:1,cursor:n?"pointer":"default",opacity:a&&d.name!==a?.45:1},children:[jsxRuntime.jsx(material.Box,{sx:{width:10,height:10,borderRadius:"50%",bgcolor:o[l%o.length]}}),jsxRuntime.jsx(material.Typography,{variant:"caption",sx:{flex:1},children:d.name}),jsxRuntime.jsxs(material.Typography,{variant:"caption",sx:{fontWeight:700},children:[d.percent.toFixed(0),"%"]})]},d.name))})]})};var up=({effect:e,branches:t})=>{if(t.length===0)return jsxRuntime.jsx(material.Typography,{variant:"body2",color:"text.secondary",children:"No data"});let o=t.filter((a,n)=>n%2===0),r=t.filter((a,n)=>n%2===1);return jsxRuntime.jsxs(material.Stack,{spacing:1.5,children:[jsxRuntime.jsx(material.Box,{sx:{display:"grid",gridTemplateColumns:`repeat(${Math.max(o.length,1)}, minmax(0, 1fr))`,gap:1},children:o.map(a=>jsxRuntime.jsxs(material.Box,{sx:{borderLeft:"2px solid",borderColor:"divider",pl:1},children:[jsxRuntime.jsx(material.Typography,{variant:"caption",fontWeight:700,children:a.title}),a.causes.map(n=>jsxRuntime.jsx(material.Typography,{variant:"caption",color:"text.secondary",sx:{display:"block"},children:n},n))]},a.title))}),jsxRuntime.jsxs(material.Box,{sx:{position:"relative",height:32},children:[jsxRuntime.jsx(material.Box,{sx:{position:"absolute",inset:"50% 0 auto 0",borderTop:"2px solid",borderColor:"primary.main"}}),jsxRuntime.jsx(material.Box,{sx:{position:"absolute",right:0,top:"calc(50% - 12px)",px:1,py:.25,borderRadius:1,bgcolor:"primary.main",color:"primary.contrastText"},children:jsxRuntime.jsx(material.Typography,{variant:"caption",fontWeight:700,children:e})})]}),jsxRuntime.jsx(material.Box,{sx:{display:"grid",gridTemplateColumns:`repeat(${Math.max(r.length,1)}, minmax(0, 1fr))`,gap:1},children:r.map(a=>jsxRuntime.jsxs(material.Box,{sx:{borderLeft:"2px solid",borderColor:"divider",pl:1},children:[jsxRuntime.jsx(material.Typography,{variant:"caption",fontWeight:700,children:a.title}),a.causes.map(n=>jsxRuntime.jsx(material.Typography,{variant:"caption",color:"text.secondary",sx:{display:"block"},children:n},n))]},a.title))})]})};var mp=({data:e,height:t=240})=>{if(e.length===0)return jsxRuntime.jsx(material.Typography,{variant:"body2",color:"text.secondary",children:"No data"});let o=0,r=e.map(g=>{let f=g.type==="total"?0:o,p=g.type==="total"?g.value:o+g.value;return g.type!=="total"&&(o=p),{...g,start:f,end:p,delta:p-f}}),a=r.flatMap(g=>[g.start,g.end]),n=Math.min(...a,0),i=Math.max(...a,1),c=680,d=30,l=i-n||1,s=g=>t-d-(g-n)/l*(t-d*2);return jsxRuntime.jsxs(material.Box,{children:[jsxRuntime.jsxs(material.Box,{component:"svg",viewBox:`0 0 ${c} ${t}`,sx:{width:"100%",height:t},children:[jsxRuntime.jsx("line",{x1:d,y1:s(0),x2:c-d,y2:s(0),stroke:"rgba(148,163,184,0.4)"}),r.map((g,f)=>{let p=(c-d*2)/r.length,b=Math.max(p*.55,8),y=d+f*p+(p-b)/2,u=s(Math.max(g.start,g.end)),C=s(Math.min(g.start,g.end)),m=g.type==="total"?"#42A5F5":g.delta>=0?"#66BB6A":"#EF5350";return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("rect",{x:y,y:u,width:b,height:Math.max(C-u,4),rx:6,fill:m}),jsxRuntime.jsx("text",{x:y+b/2,y:u-6,textAnchor:"middle",fill:"currentColor",fontSize:"11",children:g.end.toFixed(1)})]},g.name)})]}),jsxRuntime.jsx(material.Box,{sx:{mt:1,display:"grid",gridTemplateColumns:`repeat(${r.length}, minmax(0, 1fr))`,gap:1},children:r.map(g=>jsxRuntime.jsx(material.Typography,{variant:"caption",noWrap:true,title:g.name,children:g.name},g.name))})]})};var Ci=({apiKey:e,query:t,zoom:o=14,mapType:r="roadmap"})=>{let a=encodeURIComponent(t);return `https://www.google.com/maps/embed/v1/place?key=${encodeURIComponent(e)}&q=${a}&zoom=${o}&maptype=${r}`},yD=(e,t=360)=>{let o=Ci(e);return `<iframe width="100%" height="${t}" style="border:0" loading="lazy" allowfullscreen referrerpolicy="no-referrer-when-downgrade" src="${o}"></iframe>`};var hp=({apiKey:e,query:t,embedUrl:o,zoom:r=14,mapType:a="roadmap",height:n=320})=>{let i=o||(e&&t?Ci({apiKey:e,query:t,zoom:r,mapType:a}):"");return i?jsxRuntime.jsxs(material.Box,{children:[jsxRuntime.jsx(material.Box,{component:"iframe",src:i,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",sx:{width:"100%",height:n,border:0,borderRadius:2}}),jsxRuntime.jsxs(material.Typography,{variant:"caption",color:"text.secondary",sx:{mt:.75,display:"block"},children:["If iframe is blocked, open directly: ",jsxRuntime.jsx(material.Link,{href:i,target:"_blank",rel:"noreferrer",children:"Google Maps"})]})]}):jsxRuntime.jsx(material.Box,{children:jsxRuntime.jsx(material.Typography,{variant:"body2",color:"text.secondary",children:"Google Map requires `embedUrl` or (`apiKey` + `query`)."})})};var Ml=({keyword:e,location:t,src:o="orbcafe-ui"})=>{if(t){let r=encodeURIComponent(t.name||e||"Location");return `https://uri.amap.com/marker?position=${t.lng},${t.lat}&name=${r}&src=${encodeURIComponent(o)}&coordinate=gaode&callnative=0`}return e?`https://uri.amap.com/search?keyword=${encodeURIComponent(e)}&src=${encodeURIComponent(o)}&callnative=0`:"https://uri.amap.com/search?keyword=%E5%8C%97%E4%BA%AC&src=orbcafe-ui&callnative=0"};var vp=({keyword:e,location:t,embedUrl:o,height:r=320})=>{let a=o||Ml({keyword:e,location:t?{lng:t.lng,lat:t.lat,name:t.name}:void 0});return jsxRuntime.jsxs(material.Box,{children:[jsxRuntime.jsx(material.Box,{component:"iframe",src:a,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",sx:{width:"100%",height:r,border:0,borderRadius:2}}),jsxRuntime.jsxs(material.Typography,{variant:"caption",color:"text.secondary",sx:{mt:.75,display:"block"},children:["If iframe is blocked, open directly: ",jsxRuntime.jsx(material.Link,{href:a,target:"_blank",rel:"noreferrer",children:"AMap"})]})]})};var Cp=({billableByPrimary:e,efficiencyBySecondary:t,statusDistribution:o,interaction:r})=>{let{t:a}=ne();return jsxRuntime.jsxs(material.Box,{sx:{display:"grid",gap:1.5,gridTemplateColumns:{xs:"1fr",lg:"1.2fr 1.2fr 1fr"}},children:[jsxRuntime.jsx(xl,{title:a("graph.chart.billable.title"),subtitle:a("graph.chart.billable.subtitle"),children:jsxRuntime.jsx(yi,{data:e,orientation:"horizontal",activeName:r?.filters?.primaryDimension,onItemClick:n=>r?.onPrimaryDimensionClick?.(n.name)})}),jsxRuntime.jsx(xl,{title:a("graph.chart.efficiency.title"),subtitle:a("graph.chart.efficiency.subtitle"),children:jsxRuntime.jsx(yi,{data:t,orientation:"vertical",valueSuffix:"%",activeName:r?.filters?.secondaryDimension,onItemClick:n=>r?.onSecondaryDimensionClick?.(n.name)})}),jsxRuntime.jsx(xl,{title:a("graph.chart.status.title"),subtitle:a("graph.chart.status.subtitle"),children:jsxRuntime.jsx(Il,{data:o,variant:"donut",activeName:r?.filters?.status,onItemClick:n=>r?.onStatusClick?.(n.name)})})]})};var Io=e=>jsxRuntime.jsx(material.TextField,{...e,variant:e.variant||"outlined",size:e.size||"small",fullWidth:e.fullWidth!==void 0?e.fullWidth:true});var Fc=e=>jsxRuntime.jsx(material.TextField,{...e,multiline:true,minRows:3,fullWidth:true,variant:"outlined"});var sx=["doubao-lite","gpt-4o-mini","gpt-4.1-mini","claude-3.5-sonnet"],cx=["zh","en","de","fr","ja","ko"],wp=({open:e,onClose:t,value:o,onSaveAll:r,modelOptions:a=sx,promptLangOptions:n=cx,analysisTemplateOptions:i=[],responseTemplateOptions:c=[],defaultAnalysisTemplateId:d,defaultResponseTemplateId:l})=>{let[s,g]=Qt.useState(o),[f,p]=Qt.useState(d||""),[b,y]=Qt.useState(l||""),[u,C]=Qt.useState(false);Qt.useEffect(()=>{e&&(g(o),p(d||""),y(l||""));},[e,o,d,l]);let m=(x,w)=>{g(E=>({...E,[x]:w}));},h=async()=>{if(r)try{C(!0),await r({settings:s,analysisTemplateId:f||void 0,responseTemplateId:b||void 0});}finally{C(false);}};return jsxRuntime.jsxs(material.Dialog,{open:e,onClose:t,fullWidth:true,maxWidth:"lg",children:[jsxRuntime.jsxs(material.DialogTitle,{sx:{pr:7,pb:2.2},children:[jsxRuntime.jsx(material.Typography,{variant:"h5",sx:{fontWeight:800},children:"AI Settings"}),jsxRuntime.jsx(material.Typography,{variant:"body2",color:"text.secondary",sx:{mt:.5},children:"Configure LLM settings and editable agent prompts by language."}),jsxRuntime.jsx(material.IconButton,{onClick:t,sx:{position:"absolute",right:12,top:12},children:jsxRuntime.jsx(Sb__default.default,{})})]}),jsxRuntime.jsx(material.DialogContent,{sx:{pt:"18px !important"},children:jsxRuntime.jsxs(material.Stack,{spacing:2.2,children:[jsxRuntime.jsxs(material.Box,{sx:{mt:.8,display:"grid",gap:1.5,gridTemplateColumns:{xs:"1fr",md:"repeat(2, minmax(0, 1fr))"}},children:[jsxRuntime.jsx(material.Box,{children:jsxRuntime.jsx(Io,{size:"small",value:s.baseUrl,onChange:x=>m("baseUrl",x.target.value),fullWidth:true,label:"Base URL"})}),jsxRuntime.jsx(material.Box,{children:jsxRuntime.jsx(Io,{size:"small",type:"password",value:s.apiKey,onChange:x=>m("apiKey",x.target.value),fullWidth:true,label:"API Key"})}),jsxRuntime.jsx(material.Box,{children:jsxRuntime.jsx(Io,{size:"small",value:s.model,onChange:x=>m("model",x.target.value),fullWidth:true,select:true,label:"Model",children:a.map(x=>jsxRuntime.jsx(material.MenuItem,{value:x,children:x},x))})}),jsxRuntime.jsx(material.Box,{children:jsxRuntime.jsx(Io,{size:"small",value:s.promptLang,onChange:x=>m("promptLang",x.target.value),fullWidth:true,select:true,label:"Prompt Lang",children:n.map(x=>jsxRuntime.jsx(material.MenuItem,{value:x,children:x},x))})})]}),jsxRuntime.jsxs(material.Box,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[jsxRuntime.jsxs(Io,{size:"small",value:f,onChange:x=>p(x.target.value),fullWidth:true,select:true,label:"Analysis Template",children:[jsxRuntime.jsx(material.MenuItem,{value:"",children:"Default"}),i.map(x=>jsxRuntime.jsx(material.MenuItem,{value:x.id,children:x.label},x.id))]}),jsxRuntime.jsx(Fc,{multiline:true,minRows:8,value:s.analysisPrompt,onChange:x=>m("analysisPrompt",x.target.value),fullWidth:true,label:"Analysis Prompt",sx:{"& .MuiInputBase-root":{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"}}}),jsxRuntime.jsxs(Io,{size:"small",value:b,onChange:x=>y(x.target.value),fullWidth:true,select:true,label:"Response Template",children:[jsxRuntime.jsx(material.MenuItem,{value:"",children:"Default"}),c.map(x=>jsxRuntime.jsx(material.MenuItem,{value:x.id,children:x.label},x.id))]}),jsxRuntime.jsx(Fc,{multiline:true,minRows:8,value:s.responsePrompt,onChange:x=>m("responsePrompt",x.target.value),fullWidth:true,label:"Response Prompt",sx:{"& .MuiInputBase-root":{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"}}})]})]})}),jsxRuntime.jsxs(material.DialogActions,{sx:{px:3,pb:2.5,pt:1.2,gap:1},children:[jsxRuntime.jsx(material.Button,{variant:"outlined",onClick:t,children:"Cancel"}),jsxRuntime.jsx(material.Button,{variant:"contained",onClick:h,disabled:!r||u,children:"Save"})]})]})};var Fl=({open:e,onClose:t,model:o,tableContent:r,extraCharts:a,interaction:n,aiAssistant:i})=>{let{t:c}=ne(),[d,l]=Qt.useState(i?.defaultPrompt||""),[s,g]=Qt.useState(false),[f,p]=Qt.useState(false),b=n?.enabled!==false&&!!n,y=i?.enabled!==false,u=n?.filters||{},C=!!(u.primaryDimension||u.secondaryDimension||u.status),m=i?.placeholder||"Ask AI to analyze data, create charts, or find insights...";Qt.useEffect(()=>{e&&l(i?.defaultPrompt||"");},[e,i?.defaultPrompt]);let h=i?.settings||{baseUrl:"/llm-api",apiKey:"",model:"doubao-lite",promptLang:"zh",analysisPrompt:"",responsePrompt:""},x=async()=>{let w=d.trim();if(!(!w||!i?.onSubmit))try{g(!0),await i.onSubmit(w,{filters:u,model:o});}finally{g(false);}};return jsxRuntime.jsx(material.Dialog,{open:e,onClose:t,fullScreen:true,children:jsxRuntime.jsxs(material.Box,{sx:{height:"100%",display:"flex",flexDirection:"column",bgcolor:"background.default"},children:[jsxRuntime.jsx(material.Box,{sx:{p:2,borderBottom:1,borderColor:"divider"},children:jsxRuntime.jsxs(material.Stack,{direction:{xs:"column",lg:"row"},alignItems:{xs:"stretch",lg:"center"},justifyContent:"space-between",spacing:1.5,children:[jsxRuntime.jsxs(material.Stack,{direction:"row",spacing:1.25,alignItems:"center",sx:{flexWrap:"wrap"},children:[jsxRuntime.jsx(material.Typography,{variant:"h5",fontWeight:800,children:o.title}),jsxRuntime.jsx(material.Chip,{size:"small",label:c("graph.records",{count:o.kpis.totalRecords})}),b&&u.primaryDimension&&jsxRuntime.jsx(material.Chip,{size:"small",variant:"outlined",label:`${n?.fieldMapping.primaryDimension}: ${u.primaryDimension}`,onDelete:()=>n?.onClearFilter("primaryDimension")}),b&&u.secondaryDimension&&jsxRuntime.jsx(material.Chip,{size:"small",variant:"outlined",label:`${n?.fieldMapping.secondaryDimension}: ${u.secondaryDimension}`,onDelete:()=>n?.onClearFilter("secondaryDimension")}),b&&u.status&&jsxRuntime.jsx(material.Chip,{size:"small",variant:"outlined",label:`${n?.fieldMapping.status}: ${u.status}`,onDelete:()=>n?.onClearFilter("status")}),b&&C&&jsxRuntime.jsx(material.Button,{size:"small",onClick:()=>n?.onClearAll(),children:"Clear"})]}),jsxRuntime.jsxs(material.Stack,{direction:"row",spacing:1.25,alignItems:"center",sx:{width:{xs:"100%",lg:"auto"}},children:[y&&jsxRuntime.jsxs(material.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.2,py:.4,borderRadius:999,border:"1px solid",borderColor:"divider",bgcolor:"background.paper",minWidth:{xs:0,lg:520},flex:{xs:1,lg:"0 0 auto"}},children:[jsxRuntime.jsx(material.IconButton,{size:"small",onClick:i?.onVoiceInput,children:jsxRuntime.jsx(fx__default.default,{sx:{fontSize:18,color:"text.secondary"}})}),jsxRuntime.jsx(material.InputBase,{fullWidth:true,value:d,onChange:w=>l(w.target.value),onKeyDown:w=>{w.key==="Enter"&&(w.preventDefault(),x());},placeholder:m,sx:{fontSize:"0.9rem"}}),jsxRuntime.jsx(material.IconButton,{size:"small",onClick:x,disabled:s||!d.trim(),children:jsxRuntime.jsx(bx__default.default,{sx:{fontSize:18}})}),jsxRuntime.jsx(material.IconButton,{size:"small",onClick:()=>p(true),children:jsxRuntime.jsx(hx__default.default,{sx:{fontSize:18}})})]}),jsxRuntime.jsx(material.IconButton,{onClick:t,children:jsxRuntime.jsx(Sb__default.default,{})})]})]})}),jsxRuntime.jsxs(material.Box,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5,overflow:"auto",minHeight:0},children:[jsxRuntime.jsx(rp,{kpis:o.kpis}),jsxRuntime.jsx(Cp,{billableByPrimary:o.charts.billableByPrimary,efficiencyBySecondary:o.charts.efficiencyBySecondary,statusDistribution:o.charts.statusDistribution,interaction:b?{filters:u,onPrimaryDimensionClick:w=>n?.onPrimaryDimensionClick(w),onSecondaryDimensionClick:w=>n?.onSecondaryDimensionClick(w),onStatusClick:w=>n?.onStatusClick(w)}:void 0}),a,r]}),jsxRuntime.jsx(wp,{open:f,onClose:()=>p(false),value:h,onSaveAll:i?.onSaveAll,modelOptions:i?.modelOptions,promptLangOptions:i?.promptLangOptions,analysisTemplateOptions:i?.analysisTemplateOptions,responseTemplateOptions:i?.responseTemplateOptions,defaultAnalysisTemplateId:i?.defaultAnalysisTemplateId,defaultResponseTemplateId:i?.defaultResponseTemplateId})]})})};var da={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"]},xx=5,Tp=e=>e.toLowerCase().replace(/[\s_-]/g,""),ua=(e,t,o,r)=>{if(t)return t;if(e.length===0)return r;let a=Object.keys(e[0]),n=new Map(a.map(i=>[Tp(i),i]));for(let i of o){let c=n.get(Tp(i));if(c)return c}return a[0]||r},Go=e=>{if(typeof e=="number")return Number.isFinite(e)?e:0;if(typeof e=="string"){let t=Number(e.replace(/,/g,"").trim());return Number.isFinite(t)?t:0}return 0},vo=(e,t)=>e==null||e===""?t:String(e),vx=(e,t,o,r,a)=>{let n=new Map;return e.forEach(i=>{let c=vo(i[t],a);n.set(c,(n.get(c)||0)+Go(i[o]));}),Array.from(n.entries()).map(([i,c])=>({name:i,value:c})).sort((i,c)=>c.value-i.value).slice(0,r)},Cx=(e,t,o,r,a,n)=>{let i=new Map;return e.forEach(c=>{let d=vo(c[t],n),l=i.get(d)||{report:0,billable:0};l.report+=Go(c[o]),l.billable+=Go(c[r]),i.set(d,l);}),Array.from(i.entries()).map(([c,d])=>({name:c,value:d.report>0?d.billable/d.report*100:0})).sort((c,d)=>c.value-d.value).slice(0,a)},Sx=(e,t,o)=>{let r=e.length;if(r===0)return [];let a=new Map;return e.forEach(n=>{let i=vo(n[t],o);a.set(i,(a.get(i)||0)+1);}),Array.from(a.entries()).map(([n,i])=>({name:n,value:i,percent:i/r*100}))},Ip=(e,t,o)=>{let r=new Map;return e.forEach(a=>{let n=vo(a[t],"N/A");r.set(n,(r.get(n)||0)+Go(a[o]));}),Array.from(r.entries()).sort(([a],[n])=>a.localeCompare(n)).map(([a,n])=>({name:a,value:n}))},kx=(e,t,o,r,a,n)=>{let i=new Map;return e.forEach(c=>{let d=vo(c[t],n),l=i.get(d)||{report:0,billable:0};l.report+=Go(c[o]),l.billable+=Go(c[r]),i.set(d,l);}),Array.from(i.entries()).map(([c,d])=>({name:c,barValue:d.billable,lineValue:d.report>0?d.billable/d.report*100:0})).sort((c,d)=>d.barValue-c.barValue).slice(0,a)},wx=(e,t,o,r,a)=>{let n=new Map;return e.forEach(i=>{let c=vo(i[t],a),d=vo(i[o],a),l=`${c}__${d}`;n.set(l,(n.get(l)||0)+Go(i[r]));}),Array.from(n.entries()).map(([i,c])=>{let[d,l]=i.split("__");return {x:d,y:l,value:c}})},Tx=(e,t,o)=>{let r=Ip(e,t,o),a=r.map(i=>({name:i.name,value:i.value,type:"delta"})),n=r.reduce((i,c)=>i+c.value,0);return [...a,{name:"Total",value:n,type:"total"}]},Ix=(e,t,o,r,a,n)=>{let i=new Map;return e.forEach(c=>{let d=vo(c[t],n),l=`${vo(c[o],n)} / ${vo(c[r],n)}`,s=i.get(d)||new Map;s.set(l,(s.get(l)||0)+1),i.set(d,s);}),Array.from(i.entries()).map(([c,d])=>({title:c,causes:Array.from(d.entries()).sort((l,s)=>s[1]-l[1]).slice(0,a).map(([l,s])=>`${l} (${s})`)})).slice(0,6)},xn=({rows:e,config:t})=>{let{t:o}=ne(),r=o("graph.unassigned"),a=Qt.useMemo(()=>{let s=t?.fieldMapping;return {primaryDimension:ua(e,s?.primaryDimension,da.primaryDimension,"Category"),secondaryDimension:ua(e,s?.secondaryDimension,da.secondaryDimension,"Owner"),status:ua(e,s?.status,da.status,"Status"),date:ua(e,s?.date,da.date,"Date"),description:ua(e,s?.description,da.description,"Description"),reportHours:ua(e,s?.reportHours,da.reportHours,"ReportHours"),billableHours:ua(e,s?.billableHours,da.billableHours,"BillableHours"),amount:ua(e,s?.amount,da.amount,"Amount")}},[e,t?.fieldMapping]),n=Qt.useMemo(()=>e.map((s,g)=>{let f=Go(s[a.reportHours]),p=Go(s[a.billableHours]),b=Go(s[a.amount]),y=f>0?p/f*100:0;return {id:`graph-row-${g}`,Date:vo(s[a.date],""),Primary:vo(s[a.primaryDimension],r),Secondary:vo(s[a.secondaryDimension],r),Description:vo(s[a.description],""),ReportHours:f,BillableHours:p,Amount:b,Efficiency:y,Status:vo(s[a.status],r)}}),[e,a,r]),i=Qt.useMemo(()=>{let s=n.length,g=n.reduce((C,m)=>C+Go(m.ReportHours),0),f=n.reduce((C,m)=>C+Go(m.BillableHours),0),p=n.reduce((C,m)=>C+Go(m.Amount),0),b=g>0?f/g*100:0,y=t?.statusFlagValues||["flag","flagged","warning","risk"],u=n.filter(C=>y.includes(vo(C.Status,"").toLowerCase())).length;return {totalRecords:s,totalReportHours:g,totalBillableHours:f,efficiency:b,totalAmount:p,flaggedCount:u}},[n,t?.statusFlagValues]),c=t?.topN||xx,d=Qt.useMemo(()=>({billableByPrimary:vx(n,"Primary","BillableHours",c,r),efficiencyBySecondary:Cx(n,"Secondary","ReportHours","BillableHours",c,r),statusDistribution:Sx(n,"Status",r),lineByDate:Ip(n,"Date","BillableHours"),comboByPrimary:kx(n,"Primary","ReportHours","BillableHours",c,r),heatmapPrimarySecondary:wx(n,"Primary","Secondary","BillableHours",r),waterfallBillable:Tx(n,"Date","BillableHours"),fishboneStatusCauses:Ix(n,"Status","Primary","Secondary",3,r)}),[n,c,r]),l=Qt.useMemo(()=>({title:t?.title||o("graph.reportTitle"),kpis:i,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:o("graph.column.reportHours"),align:"right"},{id:"BillableHours",label:o("graph.column.billableHours"),align:"right"},{id:"Amount",label:"Amount",align:"right"},{id:"Efficiency",label:"Efficiency",align:"right"},{id:"Status",label:a.status}],rows:n}}),[d,t?.title,a,i,n,o]);return {fieldMapping:a,model:l}};var vn=e=>String(e??"").trim(),Nl=(e={})=>{let[t,o]=Qt.useState(e),r=Qt.useCallback((d,l)=>{o(s=>{let g=l?.trim();if(!g){let f={...s};return delete f[d],f}if(s[d]===g){let f={...s};return delete f[d],f}return {...s,[d]:g}});},[]),a=Qt.useCallback(d=>{o(l=>{if(!l[d])return l;let s={...l};return delete s[d],s});},[]),n=Qt.useCallback(()=>{o({});},[]),i=Qt.useMemo(()=>!!(t.primaryDimension||t.secondaryDimension||t.status),[t]),c=Qt.useCallback((d,l)=>d.filter(s=>!(t.primaryDimension&&vn(s[l.primaryDimension])!==vn(t.primaryDimension)||t.secondaryDimension&&vn(s[l.secondaryDimension])!==vn(t.secondaryDimension)||t.status&&vn(s[l.status])!==vn(t.status))),[t]);return {filters:t,setFilter:r,clearFilter:a,clearAll:n,hasActiveFilters:i,applyRows:c}};var Ol=({variants:e,currentVariantId:t,onLoad:o,onSave:r,onDelete:a,onSetDefault:n})=>{let{t:i}=ne(),d=material.useTheme().palette.mode==="dark",l="0.85rem",s={xs:"calc((100% - 1 * 16px) / 2)",sm:"calc((100% - 2 * 16px) / 3)",md:"calc((100% - 3 * 16px) / 4)",lg:"calc((100% - 5 * 16px) / 6)"},[g,f]=Qt.useState(false),[p,b]=Qt.useState(""),[y,u]=Qt.useState(false),[C,m]=Qt.useState(false),h=e.find(E=>E.id===t),x=()=>{b(h?.name||i("variant.newVariant")),u(h?.isDefault||false),m(h?.isPublic||false),f(true);},w=()=>{r({name:p,isDefault:y,isPublic:C,description:""}),f(false);};return jsxRuntime.jsxs(material.Box,{sx:{display:"flex",gap:1,alignItems:"center",width:"100%",maxWidth:"100%"},children:[jsxRuntime.jsx(material.Autocomplete,{size:"small",sx:{width:s,"& .MuiInputBase-root":{fontSize:l,bgcolor:d?"rgba(25, 118, 210, 0.2)":"#e7f1ff","& .MuiOutlinedInput-notchedOutline":{borderColor:d?"rgba(144,202,249,0.45)":"rgba(25,118,210,0.45)"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:d?"rgba(144,202,249,0.7)":"rgba(25,118,210,0.65)"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:d?"rgba(144,202,249,0.9)":"rgba(25,118,210,0.85)"}},"& .MuiInputBase-input":{fontSize:l},"& .MuiAutocomplete-noOptions":{fontSize:l}},noOptionsText:jsxRuntime.jsx(material.Typography,{sx:{fontSize:l},children:i("variant.noOptions")}),options:e,getOptionLabel:E=>E.name+(E.isDefault?` (${i("variant.defaultSuffix")})`:""),value:h||null,onChange:(E,R)=>{R&&o(R);},renderInput:E=>jsxRuntime.jsx(material.TextField,{...E,variant:"outlined",size:"small",InputProps:{...E.InputProps,sx:{fontSize:l,color:d?"#E3F2FD":"#0D47A1"}},placeholder:i("variant.selectVariant")}),renderOption:(E,R)=>{let{key:T,...I}=E;return jsxRuntime.jsx("li",{...I,children:jsxRuntime.jsxs(material.Box,{sx:{display:"flex",alignItems:"center",width:"100%"},children:[jsxRuntime.jsx(material.Typography,{sx:{flex:1,fontSize:l},children:R.name}),R.isDefault&&jsxRuntime.jsx(Ox__default.default,{fontSize:"small",color:"action"})]})},T)}}),jsxRuntime.jsx(material.Tooltip,{title:i("variant.saveView"),children:jsxRuntime.jsx(material.IconButton,{onClick:x,size:"small",color:"primary",children:jsxRuntime.jsx(jp__default.default,{fontSize:"small"})})}),jsxRuntime.jsxs(material.Dialog,{open:g,onClose:()=>f(false),children:[jsxRuntime.jsx(material.DialogTitle,{children:i("variant.saveView")}),jsxRuntime.jsxs(material.DialogContent,{children:[jsxRuntime.jsx(material.TextField,{autoFocus:true,margin:"dense",label:i("variant.viewName"),fullWidth:true,variant:"outlined",value:p,onChange:E=>b(E.target.value)}),jsxRuntime.jsx(material.FormControlLabel,{control:jsxRuntime.jsx(material.Checkbox,{checked:y,onChange:E=>u(E.target.checked)}),label:i("variant.setDefault")}),jsxRuntime.jsx(material.FormControlLabel,{control:jsxRuntime.jsx(material.Checkbox,{checked:C,onChange:E=>m(E.target.checked)}),label:i("variant.publicAllUsers")})]}),jsxRuntime.jsxs(material.DialogActions,{children:[jsxRuntime.jsx(material.Button,{onClick:()=>f(false),children:i("common.cancel")}),jsxRuntime.jsx(material.Button,{onClick:w,variant:"contained",children:i("common.save")})]})]})]})};var Fp=({appId:e,tableKey:t="default",currentFilters:o,currentLayoutId:r,layoutRefs:a,onLoad:n,variantService:i,serviceUrl:c,onError:d,onSuccess:l,currentVariantId:s,onVariantChange:g})=>{let{t:f}=ne(),[p,b]=Qt.useState([]),[y,u]=Qt.useState(""),C=`orbcafe.variants.${e}.${t}`,m=s!==void 0?s:y,h=D=>{s===void 0&&u(D),g&&g(D);},x=Qt.useCallback(()=>{try{let D=localStorage.getItem(C);if(!D)return [];let P=JSON.parse(D);return Array.isArray(P)?P:[]}catch{return []}},[C]),w=Qt.useCallback(D=>{try{localStorage.setItem(C,JSON.stringify(D));}catch{}},[C]),E=Qt.useCallback(D=>{b(D);let P=D.find(M=>M.isDefault);P&&!m&&(h(P.id),n(P));},[m,n,h]),R=Qt.useCallback(async()=>{if(!e)return [];try{let D=[];if(i)D=await i.getVariants(e,t);else if(c){let P=await fetch(`${c}/api/variants?appId=${encodeURIComponent(e)}&tableKey=${encodeURIComponent(t)}`);if(!P.ok)throw new Error(f("variant.toast.fetchFailed"));D=await P.json();}else D=x();return E(D),D}catch(D){console.error("Error fetching variants",D);let P=x();return E(P),d&&d(f("variant.toast.fetchFailed")),P}},[e,t,i,c,x,E,d,f]);return Qt.useEffect(()=>{R();},[e,t]),jsxRuntime.jsx(Ol,{variants:p,currentVariantId:m,onLoad:D=>{h(D.id),n(D);},onSave:async D=>{let P=Date.now().toString(),M;try{let B=D.scope||"Both",X=p.find(q=>q.name===D.name);P=X?X.id:Date.now().toString();let L=[];if(X&&(Array.isArray(X.filters)?L=[...X.filters]:X.filters&&(L=[{scope:"default",filters:X.filters}])),B==="Search"||B==="Both"){let q=(Array.isArray(o),o);if(q)if(Array.isArray(q)&&q.length>0&&q[0].scope)q.forEach(H=>{let re=L.findIndex(de=>de.scope===H.scope);re>=0?L[re]=H:L.push(H);});else {let H={scope:t,filters:q},re=L.findIndex(de=>de.scope===t);re>=0?L[re]=H:L.push(H);}}let Z=X?.layout||{},$=[];if(X&&Array.isArray(X.layoutRefs)&&($=[...X.layoutRefs]),B==="Layout"||B==="Both")if(a&&a.length>0)a.forEach(q=>{let H=$.findIndex(re=>re.tableKey===q.tableKey);H>=0?$[H]=q:$.push(q);});else {let q={tableKey:t,layoutId:r||null},H=$.findIndex(re=>re.tableKey===t);H>=0?$[H]=q:$.push(q);}if(M={appId:e,tableKey:t,...D,scope:B,id:P,createdAt:new Date().toISOString(),filters:L,layout:Z,layoutRefs:$},i)await i.saveVariant(M,e,t);else if(c){if(!(await fetch(`${c}/api/variants`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(M)})).ok)throw new Error(f("variant.toast.saveFailed"))}else {let H=p.some(re=>re.id===P)?p.map(re=>re.id===P?M:re):[...p,M];b(H),w(H);}l&&l(f("variant.toast.saveSuccess")),(i||c)&&await R(),h(P),n(M);}catch(B){console.error("Error saving variant",B);let L=p.some(Z=>Z.id===P)?p.map(Z=>Z.id===P?M:Z):[...p,M];b(L),w(L),h(P),n(M),d&&d(f("variant.toast.saveFailed"));}},onDelete:async D=>{try{if(i)await i.deleteVariant(D);else if(c){if(!(await fetch(`${c}/api/variants/${D}`,{method:"DELETE"})).ok)throw new Error(f("variant.toast.deleteFailed"))}else {let P=p.filter(M=>M.id!==D);b(P),w(P);}m===D&&h(""),(i||c)&&R(),l&&l(f("variant.toast.deleteSuccess"));}catch(P){console.error("Error deleting variant",P);let M=p.filter(B=>B.id!==D);b(M),w(M),m===D&&h(""),d&&d(f("variant.toast.deleteFailed"));}},onSetDefault:async D=>{try{let P=p.find(B=>B.id===D);if(!P)return;let M={appId:e,tableKey:t,...P,isDefault:!0};if(i)await i.setDefaultVariant(D,e,t);else if(c){if(!(await fetch(`${c}/api/variants`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(M)})).ok)throw new Error(f("variant.toast.defaultFailed"))}else {let B=p.map(X=>({...X,isDefault:X.id===D}));b(B),w(B);}(i||c)&&await R(),l&&l(f("variant.toast.defaultSuccess"));}catch(P){console.error("Error setting default variant",P);let M=p.map(B=>({...B,isDefault:B.id===D}));b(M),w(M),d&&d(f("variant.toast.defaultFailed"));}}})};zr__default.default.extend(e0__default.default);zr__default.default.extend(t0__default.default);zr__default.default.extend(o0__default.default);var wi="YYYY-MM-DD",r0=[null,null],Ea="0.85rem",a0={en:"en",zh:"zh-cn",fr:"fr",de:"de",ja:"ja",ko:"ko"},n0=material.styled(PickersDay.PickersDay,{shouldForwardProp:e=>e!=="isInRange"&&e!=="isStart"&&e!=="isEnd"&&e!=="isHovered"})(({theme:e,isInRange:t,isStart:o,isEnd:r,isHovered:a})=>({...t&&{borderRadius:0,backgroundColor:e.palette.primary.light,color:e.palette.primary.contrastText,"&:hover":{backgroundColor:e.palette.primary.main}},...a&&!t&&!o&&!r&&{borderRadius:0,backgroundColor:e.palette.action.hover,border:`1px dashed ${e.palette.primary.main}`},...o&&{borderRadius:"50% 0 0 50%",backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText,"&:hover":{backgroundColor:e.palette.primary.dark}},...r&&{borderRadius:"0 50% 50% 0",backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText,"&:hover":{backgroundColor:e.palette.primary.dark}},...o&&r&&{borderRadius:"50%"}})),Op=({label:e,value:t=r0,onChange:o})=>{let{t:r,locale:a}=ne(),n=a0[a]||"en",i=e||r("dateRange.label"),[c,d]=Qt.useState(null),[l,s]=Qt.useState(t),[g,f]=Qt.useState("start"),[p,b]=Qt.useState(null),[y,u]=Qt.useState((t[0]||zr__default.default()).locale(n)),[C,m]=Qt.useState(""),[h,x]=Qt.useState(""),[w,E]=Qt.useState(false),[R,T]=Qt.useState(false),I=Qt__namespace.default.useRef(t);Qt.useEffect(()=>{let[H,re]=t,[de,Ce]=I.current,ve=Ie=>Ie&&typeof Ie.isSame=="function",le=!(H===null&&de===null||ve(H)&&ve(de)&&H.isSame(de,"day")),oe=!(re===null&&Ce===null||ve(re)&&ve(Ce)&&re.isSame(Ce,"day"));(le||oe)&&(s(t),t[0]&&ve(t[0])&&u(t[0].locale(n))),I.current=t;},[t,n]),Qt.useEffect(()=>{m(l[0]?l[0].locale(n).format(wi):""),x(l[1]?l[1].locale(n).format(wi):""),E(false),T(false);},[l,n]);let k=(H,re)=>{let de=re.trim(),Ce=H==="start"?E:T;if(!de){let oe=H==="start"?[null,l[1]]:[l[0],null];Ce(false),s(oe);return}let ve=zr__default.default(de,wi,true).locale(n);if(!ve.isValid()){Ce(true);return}Ce(false);let le=[...l];if(H==="start")le[0]=ve,le[1]&&ve.isAfter(le[1],"day")&&(le[1]=null),f(le[1]?"start":"end");else {let oe=le[0];oe&&ve.isBefore(oe,"day")?(le=[ve,null],f("end")):(le[1]=ve,f("start"));}s(le),u(ve);},S=H=>{d(H.currentTarget);},D=()=>{d(null),f("start"),b(null);},P=!!c,M=H=>{if(!H)return;let re=[...l];if(g==="start")re=[H,null],f("end");else {let de=re[0];de&&H.isBefore(de)?(re=[H,null],f("end")):(re=[de,H],f("start"));}s(re);},B=H=>{let re=zr__default.default().locale(n),de=[null,null];switch(H){case "today":de=[re,re];break;case "week":de=[re.startOf("week"),re.endOf("week")];break;case "month":de=[re.startOf("month"),re.endOf("month")];break}s(de),f("start"),u(re);},X=()=>{s([null,null]),f("start"),u(zr__default.default().locale(n));},L=()=>{o&&o(l),D();},Z=()=>{s(t),f("start"),D();},$=Qt.useCallback(H=>{let{day:re,...de}=H,[Ce,ve]=l,le=Ce?re.isSame(Ce,"day"):false,oe=ve?re.isSame(ve,"day"):false,Ie=Ce&&ve?re.isBetween(Ce,ve,"day","()"):false,Ze=false;return g==="end"&&Ce&&!ve&&p&&re.isAfter(Ce,"day")&&re.isBefore(p.add(1,"day"),"day")&&(Ze=true),jsxRuntime.jsx(n0,{...de,day:re,disableMargin:true,isStart:le,isEnd:oe,isInRange:Ie||Ze,onMouseEnter:()=>b(re)})},[l,g,p]),q=H=>H?H.locale(n).format("YYYY-MM-DD"):"";return jsxRuntime.jsxs(material.Box,{children:[jsxRuntime.jsx(material.TextField,{label:i,value:l[0]?`${q(l[0])} - ${q(l[1])}`:"",onClick:S,fullWidth:true,size:"small",InputLabelProps:{sx:{fontSize:Ea}},InputProps:{readOnly:true,sx:{fontSize:Ea,"& .MuiOutlinedInput-input":{fontSize:Ea},paddingRight:"4px"},endAdornment:jsxRuntime.jsxs(material.InputAdornment,{position:"end",sx:{ml:0},children:[(l[0]||l[1])&&jsxRuntime.jsx(material.IconButton,{size:"small",onClick:H=>{H.stopPropagation(),X();},edge:"end",sx:{mr:.5,padding:"2px"},children:jsxRuntime.jsx(Cb__default.default,{sx:{fontSize:"1rem"}})}),jsxRuntime.jsx(material.IconButton,{size:"small",edge:"end",onClick:S,sx:{padding:"2px"},children:jsxRuntime.jsx(Yx__default.default,{sx:{fontSize:"1rem"},color:"action"})})]})}}),jsxRuntime.jsxs(material.Popover,{open:P,anchorEl:c,onClose:D,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{sx:{display:"flex",flexDirection:"column",p:0,width:320}}},children:[jsxRuntime.jsx(material.Box,{sx:{p:2,bgcolor:"background.default",borderBottom:1,borderColor:"divider"},children:jsxRuntime.jsxs(material.Stack,{direction:"row",alignItems:"center",spacing:1.5,justifyContent:"space-between",children:[jsxRuntime.jsx(material.TextField,{label:r("dateRange.startDate"),placeholder:wi,value:C,error:w,size:"small",onFocus:()=>f("start"),onChange:H=>{m(H.target.value),w&&E(false);},onBlur:()=>k("start",C),onKeyDown:H=>{H.key==="Enter"&&(H.preventDefault(),k("start",C));},sx:{flex:1,"& .MuiInputBase-input":{fontSize:Ea,py:.75},"& .MuiInputLabel-root":{fontSize:Ea}}}),jsxRuntime.jsx(Jx__default.default,{color:"action",fontSize:"small"}),jsxRuntime.jsx(material.TextField,{label:r("dateRange.endDate"),placeholder:wi,value:h,error:R,size:"small",onFocus:()=>{l[0]&&f("end");},onChange:H=>{x(H.target.value),R&&T(false);},onBlur:()=>k("end",h),onKeyDown:H=>{H.key==="Enter"&&(H.preventDefault(),k("end",h));},sx:{flex:1,"& .MuiInputBase-input":{fontSize:Ea,py:.75},"& .MuiInputLabel-root":{fontSize:Ea}}})]})}),jsxRuntime.jsx(material.Box,{sx:{p:2,pb:0},children:jsxRuntime.jsxs(material.Stack,{direction:"row",spacing:1,justifyContent:"center",children:[jsxRuntime.jsx(material.Chip,{label:r("dateRange.today"),onClick:()=>B("today"),clickable:true,size:"small",variant:"outlined"}),jsxRuntime.jsx(material.Chip,{label:r("dateRange.thisWeek"),onClick:()=>B("week"),clickable:true,size:"small",variant:"outlined"}),jsxRuntime.jsx(material.Chip,{label:r("dateRange.thisMonth"),onClick:()=>B("month"),clickable:true,size:"small",variant:"outlined"})]})}),jsxRuntime.jsx(LocalizationProvider.LocalizationProvider,{dateAdapter:AdapterDayjs.AdapterDayjs,adapterLocale:n,children:jsxRuntime.jsx(DateCalendar.DateCalendar,{value:null,referenceDate:y,onMonthChange:u,onYearChange:u,onChange:M,slots:{day:$},views:["year","month","day"],openTo:"day",showDaysOutsideCurrentMonth:true,sx:{m:0}})}),jsxRuntime.jsx(material.Divider,{}),jsxRuntime.jsxs(material.Stack,{direction:"row",justifyContent:"flex-end",spacing:1,sx:{p:2},children:[jsxRuntime.jsx(material.Button,{size:"small",onClick:Z,color:"inherit",children:r("common.cancel")}),jsxRuntime.jsx(material.Button,{size:"small",variant:"contained",onClick:L,children:r("common.done")})]})]})]})};var Hl={equals:"=",contains:"\u2287",notContains:"\u2285",wildcard:"*","=":"=","!=":"!=",">":">","<":"<",">=":"\u2265","<=":"\u2264",between:"\u2194"},h0={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"},b0=["equals","contains","notContains","wildcard"],Hp=["=","!=",">","<",">=","<=","between"],_t="0.85rem",y0=({field:e,value:t,onChange:o})=>{let{t:r}=ne(),[a,n]=Qt.useState(null),[i,c]=Qt.useState(null),[d,l]=Qt.useState(""),[s,g]=Qt.useState(""),[f,p]=Qt.useState(false),[b,y]=Qt.useState(""),[u,C]=Qt.useState("");Qt.useEffect(()=>{let S=setTimeout(()=>{C(b);},1e3);return ()=>clearTimeout(S)},[b]);let m=t?.operator||(e.type==="number"?"=":"equals"),h=t?.value,x=S=>{let D=h0[S];return D?r(D):S},w=S=>{n(S.currentTarget);},E=S=>{o({...t,operator:S,value:h}),n(null);},R={size:"small",fullWidth:true,variant:"outlined",InputLabelProps:{sx:{fontSize:_t}},InputProps:{sx:{fontSize:_t}},SelectProps:{MenuProps:{PaperProps:{sx:{"& .MuiMenuItem-root":{fontSize:_t,paddingTop:"4px",paddingBottom:"4px",minHeight:"auto"}}}}}},T=e.type||"text";if(T==="date"){let D=(P=>{if(!P)return [null,null];if(Array.isArray(P)&&P.length===2){let M=P[0]?zr__default.default.isDayjs(P[0])?P[0]:zr__default.default(P[0]):null,B=P[1]?zr__default.default.isDayjs(P[1])?P[1]:zr__default.default(P[1]):null;return [M,B]}return zr__default.default.isDayjs(P)||typeof P=="string"?[zr__default.default.isDayjs(P)?P:zr__default.default(P),null]:[null,null]})(h);return jsxRuntime.jsx(Op,{label:e.label,value:D,onChange:P=>o({value:P,operator:"between"})})}if(T==="number"&&m==="between"){let S=()=>{o({value:[d,s],operator:"between"}),c(null);},D=Array.isArray(h)?`${h[0]||""} - ${h[1]||""}`:"";return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(material.TextField,{...R,label:e.label,value:D,placeholder:r("smartFilter.minMaxPlaceholder"),InputProps:{...R.InputProps,startAdornment:jsxRuntime.jsx(material.InputAdornment,{position:"start",children:jsxRuntime.jsx(material.Tooltip,{title:x("between"),children:jsxRuntime.jsx(material.IconButton,{size:"small",onClick:w,sx:{width:24,height:24,fontSize:_t},children:Hl.between})})}),readOnly:true},onClick:P=>c(P.currentTarget)}),jsxRuntime.jsx(material.Menu,{anchorEl:a,open:!!a,onClose:()=>n(null),PaperProps:{sx:{"& .MuiMenuItem-root":{fontSize:_t,minHeight:"auto",py:.5}}},children:Hp.map(P=>jsxRuntime.jsxs(material.MenuItem,{selected:P===m,onClick:()=>E(P),children:[jsxRuntime.jsx(material.Box,{sx:{width:24,display:"inline-block",fontWeight:"bold"},children:Hl[P]}),jsxRuntime.jsx(material.ListItemText,{primary:x(P),primaryTypographyProps:{fontSize:_t}})]},P))}),jsxRuntime.jsx(material.Popover,{open:!!i,anchorEl:i,onClose:()=>c(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},children:jsxRuntime.jsxs(material.Box,{sx:{p:2,display:"flex",gap:1,alignItems:"center"},children:[jsxRuntime.jsx(material.TextField,{size:"small",label:r("smartFilter.min"),type:"number",value:d,onChange:P=>l(P.target.value),sx:{width:100},InputLabelProps:{sx:{fontSize:_t}},InputProps:{sx:{fontSize:_t}}}),jsxRuntime.jsx(f0__default.default,{color:"action"}),jsxRuntime.jsx(material.TextField,{size:"small",label:r("smartFilter.max"),type:"number",value:s,onChange:P=>g(P.target.value),sx:{width:100},InputLabelProps:{sx:{fontSize:_t}},InputProps:{sx:{fontSize:_t}}}),jsxRuntime.jsx(material.Button,{variant:"contained",size:"small",onClick:S,children:r("common.ok")})]})})]})}if(e.isValueHelp||T==="value-help"){let S=e.valueHelp?.mode||"single";return jsxRuntime.jsx(Nu,{...R,...e.valueHelp,label:e.label,placeholder:e.placeholder||e.valueHelp?.placeholder,value:h??(S==="multiple"?[]:null),mode:S,onChange:D=>o({value:D,operator:S==="multiple"?"anyOf":"equals"})})}if(T==="select")return jsxRuntime.jsxs(material.TextField,{...R,select:true,label:e.label,value:h||"",onChange:S=>o({...t,value:S.target.value,operator:"equals"}),children:[jsxRuntime.jsx(material.MenuItem,{value:"",children:jsxRuntime.jsx("em",{children:r("common.none")})}),e.options?.map(S=>jsxRuntime.jsx(material.MenuItem,{value:S.value,children:S.label},S.value))]});if(T==="multi-select"){let S=Array.isArray(h)?h:[],D=e.options?.filter(P=>P.label.toLowerCase().includes(u.toLowerCase()))||[];return jsxRuntime.jsxs(material.TextField,{...R,select:true,label:e.label,value:S,onChange:P=>o({...t,value:P.target.value,operator:"anyOf"}),SelectProps:{...R.SelectProps,multiple:true,onClose:()=>{y(""),C("");},renderValue:P=>{if(!Array.isArray(P)||P.length===0)return jsxRuntime.jsx("em",{children:r("common.none")});let M=X=>e.options?.find(L=>L.value===X)?.label||X,B=P.map(M);return B.length>2?`${B.slice(0,2).join(", ")} +${B.length-2}`:B.join(", ")}},children:[jsxRuntime.jsx(material.ListSubheader,{children:jsxRuntime.jsx(material.TextField,{size:"small",autoFocus:true,placeholder:r("smartFilter.searchPlaceholder"),fullWidth:true,InputProps:{startAdornment:jsxRuntime.jsx(material.InputAdornment,{position:"start",children:jsxRuntime.jsx(Bu__default.default,{fontSize:"small"})}),sx:{fontSize:_t}},value:b,onChange:P=>y(P.target.value),onKeyDown:P=>{P.key!=="Escape"&&P.stopPropagation();},onClick:P=>P.stopPropagation()})}),D.length>0?D.map(P=>jsxRuntime.jsxs(material.MenuItem,{value:P.value,children:[jsxRuntime.jsx(material.Checkbox,{checked:S.indexOf(P.value)>-1,size:"small"}),jsxRuntime.jsx(material.ListItemText,{primary:P.label,primaryTypographyProps:{fontSize:_t}})]},P.value)):jsxRuntime.jsx(material.MenuItem,{disabled:true,children:jsxRuntime.jsx(material.ListItemText,{primary:r("smartFilter.noOptionsFound"),primaryTypographyProps:{fontSize:_t}})})]})}let I=T==="number"?Hp:b0,k=f||h!==void 0&&h!==""&&h!==null||!!a;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(material.TextField,{...R,label:e.label,sx:{minWidth:"120px"},value:h||"",type:T==="number"?"number":"text",onChange:S=>o({...t,value:S.target.value,operator:m}),onFocus:()=>p(true),onBlur:()=>p(false),InputProps:{...R.InputProps,startAdornment:k?jsxRuntime.jsx(material.InputAdornment,{position:"start",children:jsxRuntime.jsx(material.Tooltip,{title:x(m),children:jsxRuntime.jsx(material.IconButton,{size:"small",onClick:w,onMouseDown:S=>S.preventDefault(),sx:{width:24,height:24,fontSize:_t,fontWeight:"bold",color:"primary.main",bgcolor:"action.hover"},children:Hl[m]})})}):null,endAdornment:e.hasSearchIcon?jsxRuntime.jsx(material.InputAdornment,{position:"end",children:jsxRuntime.jsx(Bu__default.default,{color:"action"})}):void 0}}),jsxRuntime.jsx(material.Menu,{anchorEl:a,open:!!a,onClose:()=>n(null),PaperProps:{sx:{"& .MuiMenuItem-root":{fontSize:_t,minHeight:"auto",py:.5}}},children:I.map(S=>jsxRuntime.jsxs(material.MenuItem,{selected:S===m,onClick:()=>E(S),children:[jsxRuntime.jsx(material.Box,{sx:{width:24,display:"inline-block",fontWeight:"bold"},children:Hl[S]}),jsxRuntime.jsx(material.ListItemText,{primary:x(S),primaryTypographyProps:{fontSize:_t}})]},S))})]})},$r=({fields:e,filters:t,onFilterChange:o,variants:r=[],currentVariantId:a,onVariantLoad:n,onVariantSave:i,onVariantDelete:c,onVariantSetDefault:d,onSearch:l,loading:s=false,appId:g,tableKey:f,currentLayout:p,currentLayoutId:b,layoutRefs:y,variantService:u,serviceUrl:C})=>{let{t:m}=ne(),[h,x]=Qt.useState(true),[w,E]=Qt.useState(null),[R,T]=Qt.useState(e.filter(D=>!D.hidden).map(D=>D.id)),I=(D,P)=>{o({...t,[D]:P});},k=D=>{R.includes(D)?T(R.filter(P=>P!==D)):T([...R,D]);};return jsxRuntime.jsxs(material.Paper,{sx:{mb:0,display:"flex",flexDirection:"column",overflow:"visible",position:"relative"},children:[jsxRuntime.jsxs(material.Box,{sx:{p:2,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[g?jsxRuntime.jsx(Fp,{appId:g,tableKey:f,currentFilters:{values:t,visibleFields:R},currentLayout:p,currentLayoutId:b,layoutRefs:y,onLoad:D=>{if(!D.filters)return;let P=null;if(Array.isArray(D.filters)){let M=f||"default",B=D.filters.find(X=>X.scope===M);P=B?B.filters:null;}else P=D.filters;P&&(P.values||P.visibleFields?(P.visibleFields&&Array.isArray(P.visibleFields)&&T(P.visibleFields),P.values&&o(P.values)):o(P)),n&&n(D);},variantService:u,serviceUrl:C,currentVariantId:a}):jsxRuntime.jsx(Ol,{variants:r,currentVariantId:a,onLoad:n,onSave:D=>{i&&i({...D,filters:{values:t,visibleFields:R}});},onDelete:c,onSetDefault:d}),jsxRuntime.jsxs(material.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsxRuntime.jsx(material.Tooltip,{title:m("smartFilter.addFilters"),children:jsxRuntime.jsx(material.Button,{onClick:D=>E(D.currentTarget),size:"small",color:"primary",startIcon:jsxRuntime.jsx(p0__default.default,{fontSize:"small"}),sx:{textTransform:"none",fontSize:_t,whiteSpace:"nowrap",minWidth:"fit-content"},children:m("smartFilter.adaptFilters")})}),jsxRuntime.jsx(material.Button,{variant:"contained",size:"small",onClick:l,disabled:s,sx:{minWidth:"52px",fontWeight:"bold",fontSize:_t},children:m(s?"common.loading":"smartFilter.go")}),jsxRuntime.jsxs(material.Menu,{anchorEl:w,open:!!w,onClose:()=>E(null),slotProps:{paper:{style:{maxHeight:400,width:"25ch"},sx:{"& .MuiMenuItem-root":{fontSize:_t,minHeight:32}}}},children:[jsxRuntime.jsx(material.MenuItem,{disabled:true,children:jsxRuntime.jsx(material.ListItemText,{primary:m("smartFilter.visibleFilters"),primaryTypographyProps:{fontSize:_t}})}),jsxRuntime.jsx(material.Divider,{}),e.map(D=>jsxRuntime.jsxs(material.MenuItem,{onClick:()=>k(D.id),children:[jsxRuntime.jsx(material.Checkbox,{checked:R.includes(D.id),size:"small"}),jsxRuntime.jsx(material.ListItemText,{primary:D.label,primaryTypographyProps:{fontSize:_t}})]},D.id))]})]})]}),jsxRuntime.jsx(material.Collapse,{in:h,children:jsxRuntime.jsx(material.Box,{sx:{px:2,pb:2},children:jsxRuntime.jsx(material.Grid,{container:true,spacing:2,columns:{xs:2,sm:3,md:4,lg:6},children:e.filter(D=>R.includes(D.id)).map(D=>jsxRuntime.jsx(material.Grid,{size:1,children:jsxRuntime.jsx(y0,{field:D,value:t[D.id]||{value:"",operator:D.type==="number"?"=":"equals"},onChange:P=>I(D.id,P)})},D.id))})})}),jsxRuntime.jsx(material.Box,{sx:{position:"absolute",bottom:0,left:"50%",transform:"translate(-50%, 50%)",zIndex:10},children:jsxRuntime.jsx(material.IconButton,{size:"small",onClick:()=>x(!h),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:h?jsxRuntime.jsx(m0__default.default,{sx:{fontSize:20},color:"action"}):jsxRuntime.jsx(gy__default.default,{sx:{fontSize:20},color:"action"})})})]})};var Xp=({layouts:e,currentLayoutId:t,onLoad:o,onSave:r,onDelete:a,onSetDefault:n})=>{let{t:i}=ne(),[c,d]=Qt.useState(null),[l,s]=Qt.useState(false),[g,f]=Qt.useState(""),[p,b]=Qt.useState(""),[y,u]=Qt.useState({isDefault:false,isPublic:false}),C=e.find(R=>R.id===t),m=R=>{d(R.currentTarget);},h=()=>{d(null);},x=R=>{o(R),h();},w=()=>{f(""),b(""),u({isDefault:false,isPublic:false}),s(true),h();},E=()=>{g.trim()&&(r({name:g,description:p,...y}),s(false));};return jsxRuntime.jsxs(material.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsxRuntime.jsx(material.Tooltip,{title:i("layout.saveLayout"),children:jsxRuntime.jsx(material.IconButton,{onClick:w,color:"primary",size:"small",children:jsxRuntime.jsx(jp__default.default,{fontSize:"small"})})}),jsxRuntime.jsx(material.Tooltip,{title:i("layout.layoutOptions"),children:jsxRuntime.jsx(material.IconButton,{onClick:m,color:C?"primary":"default",size:"small",children:jsxRuntime.jsx(D0__default.default,{fontSize:"small"})})}),jsxRuntime.jsxs(material.Menu,{anchorEl:c,open:!!c,onClose:h,PaperProps:{sx:{width:320,maxHeight:400}},children:[jsxRuntime.jsx(material.MenuItem,{disabled:true,children:jsxRuntime.jsx(material.Typography,{variant:"caption",children:i("layout.selectLayout")})}),jsxRuntime.jsxs(material.MenuItem,{onClick:w,children:[jsxRuntime.jsx(material.ListItemIcon,{children:jsxRuntime.jsx(jp__default.default,{fontSize:"small"})}),jsxRuntime.jsx(material.ListItemText,{children:i("layout.saveCurrentLayout")})]}),jsxRuntime.jsx(material.Divider,{}),e.length===0&&jsxRuntime.jsx(material.MenuItem,{disabled:true,children:jsxRuntime.jsx(material.Typography,{variant:"body2",color:"text.secondary",children:i("layout.noSavedLayouts")})}),e.map((R,T)=>jsxRuntime.jsx(material.MenuItem,{onClick:()=>x(R),selected:R.id===t,children:jsxRuntime.jsxs(material.Box,{sx:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"},children:[jsxRuntime.jsxs(material.Box,{sx:{display:"flex",flexDirection:"column",overflow:"hidden",mr:1},children:[jsxRuntime.jsx(material.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:jsxRuntime.jsx(material.Typography,{variant:"body2",fontWeight:R.id===t?"bold":"normal",noWrap:true,children:R.name})}),R.description&&jsxRuntime.jsx(material.Typography,{variant:"caption",color:"text.secondary",noWrap:true,children:R.description})]}),jsxRuntime.jsxs(material.Box,{sx:{display:"flex",alignItems:"center"},onClick:I=>I.stopPropagation(),children:[jsxRuntime.jsx(material.Tooltip,{title:R.isDefault?i("layout.removeDefault"):i("layout.setAsDefault"),children:jsxRuntime.jsx(material.IconButton,{size:"small",onClick:I=>{I.stopPropagation(),n(R.id);},children:R.isDefault?jsxRuntime.jsx(Ox__default.default,{fontSize:"small",color:"warning"}):jsxRuntime.jsx(M0__default.default,{fontSize:"small"})})}),jsxRuntime.jsx(material.Tooltip,{title:i("common.delete"),children:jsxRuntime.jsx(material.IconButton,{size:"small",color:"error",onClick:I=>{I.stopPropagation(),a(R.id);},children:jsxRuntime.jsx(_b__default.default,{fontSize:"small"})})})]})]})},R.id||T))]}),jsxRuntime.jsxs(material.Dialog,{open:l,onClose:()=>s(false),maxWidth:"xs",fullWidth:true,children:[jsxRuntime.jsx(material.DialogTitle,{children:i("layout.saveLayout")}),jsxRuntime.jsx(material.DialogContent,{children:jsxRuntime.jsxs(material.Box,{sx:{display:"flex",flexDirection:"column",gap:2,mt:1},children:[jsxRuntime.jsx(material.TextField,{label:i("layout.layoutName"),value:g,onChange:R=>f(R.target.value),fullWidth:true,autoFocus:true,size:"small",helperText:i("layout.layoutNameHelper")}),e.some(R=>R.name===g)&&jsxRuntime.jsx(material.Typography,{variant:"caption",color:"warning.main",sx:{ml:1},children:i("layout.warningOverwrite")}),jsxRuntime.jsx(material.TextField,{label:i("layout.layoutDescription"),value:p,onChange:R=>b(R.target.value),fullWidth:true,size:"small"}),jsxRuntime.jsx(material.FormControlLabel,{control:jsxRuntime.jsx(material.Checkbox,{checked:y.isDefault,onChange:R=>u({...y,isDefault:R.target.checked})}),label:i("layout.useAsDefault")}),jsxRuntime.jsx(material.FormControlLabel,{control:jsxRuntime.jsx(material.Checkbox,{checked:y.isPublic,onChange:R=>u({...y,isPublic:R.target.checked})}),label:i("layout.publicAllUsers")})]})}),jsxRuntime.jsxs(material.DialogActions,{children:[jsxRuntime.jsx(material.Button,{onClick:()=>s(false),children:i("common.cancel")}),jsxRuntime.jsx(material.Button,{onClick:E,variant:"contained",disabled:!g,children:i("common.save")})]})]})]})};var wn=({appId:e,tableKey:t="default",currentLayoutData:o,onLayoutLoad:r,targetLayoutId:a,activeLayoutId:n,serviceUrl:i,onError:c,onSuccess:d})=>{let{t:l}=ne(),[s,g]=Qt.useState([]),[f,p]=Qt.useState(""),b=`orbcafe.layouts.${e}.${t}`,y=T=>({id:T.layoutId,name:T.name,description:T.description??"",isDefault:!!T.isDefault,isPublic:!!T.isPublic,createdAt:T.createdAt??new Date().toISOString(),layoutData:T.layout??{}}),u=T=>({appId:e,tableKey:t,layoutId:T.id,name:T.name,description:T.description??"",isDefault:!!T.isDefault,isPublic:!!T.isPublic,createdAt:T.createdAt,layout:T.layoutData}),C=Qt.useCallback(()=>{try{let T=localStorage.getItem(b);if(!T)return [];let I=JSON.parse(T);return Array.isArray(I)?I:[]}catch{return []}},[b]),m=Qt.useCallback(T=>{try{localStorage.setItem(b,JSON.stringify(T));}catch{}},[b]);Qt.useEffect(()=>{n!==void 0&&p(n);},[n]),Qt.useEffect(()=>{if(a&&s.length>0){let T=s.find(I=>I.id===a);T&&(p(T.id),r(T));}},[a,s,r]);let h=Qt.useCallback(async()=>{if(e){if(!i){let T=C();g(T);let I=T.find(k=>k.isDefault);I&&!f&&!a&&(p(I.id),r(I));return}try{let T=await fetch(`${i}/api/layouts?appId=${encodeURIComponent(e)}&tableKey=${encodeURIComponent(t)}`);if(!T.ok)throw new Error("LAYOUT_FETCH_FAILED");let k=(await T.json()).map(y);g(k);let S=k.find(D=>D.isDefault);S&&!f&&!a&&(p(S.id),r(S));}catch(T){console.error("Error fetching layouts",T);let I=C();g(I);let k=I.find(S=>S.isDefault);k&&!f&&!a&&(p(k.id),r(k)),c&&c(l("layout.toast.loadFallback"));}}},[e,t,i,c,f,r,a,C,l]);return Qt.useEffect(()=>{h();},[e,t]),jsxRuntime.jsx(Xp,{layouts:s,currentLayoutId:f,onLoad:T=>{p(T.id),r(T);},onSave:async T=>{let I=s.find(D=>D.name===T.name),k=I?I.id:Date.now().toString(),S={id:k,...T,createdAt:new Date().toISOString(),layoutData:o,isDefault:T.isDefault??false,isPublic:T.isPublic??false};if(!i){let P=s.some(M=>M.id===k)?s.map(M=>M.id===k?S:M):[...s,S];g(P),m(P),p(k),r(S),d&&d(l("layout.toast.saveLocalSuccess"));return}try{if(!(await fetch(`${i}/api/layouts`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(u(S))})).ok)throw new Error("LAYOUT_SAVE_FAILED");d&&d(l("layout.toast.saveSuccess")),await h(),p(k),r(S);}catch(D){console.error("Error saving layout",D);let M=s.some(B=>B.id===k)?s.map(B=>B.id===k?S:B):[...s,S];g(M),m(M),p(k),r(S),d&&d(l("layout.toast.saveLocalSuccess")),c&&c(l("layout.toast.backendUnavailableSavedLocal"));}},onDelete:async T=>{if(!i){let I=s.filter(k=>k.id!==T);g(I),m(I),f===T&&p(""),d&&d(l("layout.toast.deleteLocalSuccess"));return}try{if(!(await fetch(`${i}/api/layouts/${encodeURIComponent(T)}`,{method:"DELETE"})).ok)throw new Error("LAYOUT_DELETE_FAILED");f===T&&p(""),d&&d(l("layout.toast.deleteSuccess")),await h();}catch(I){console.error("Error deleting layout",I);let k=s.filter(S=>S.id!==T);g(k),m(k),f===T&&p(""),d&&d(l("layout.toast.deleteLocalSuccess")),c&&c(l("layout.toast.backendUnavailableDeletedLocal"));}},onSetDefault:async T=>{if(!i){let I=s.map(k=>({...k,isDefault:k.id===T}));g(I),m(I),d&&d(l("layout.toast.defaultLocalSuccess"));return}try{let I=s.find(S=>S.id===T);if(!I)return;if(!(await fetch(`${i}/api/layouts`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(u({...I,isDefault:!0}))})).ok)throw new Error("LAYOUT_DEFAULT_FAILED");d&&d(l("layout.toast.defaultSuccess")),await h();}catch(I){console.error("Error setting default",I);let k=s.map(S=>({...S,isDefault:S.id===T}));g(k),m(k),d&&d(l("layout.toast.defaultLocalSuccess")),c&&c(l("layout.toast.backendUnavailableDefaultLocal"));}}})};var Yp=(e,t)=>{if(!e||!e.filters)return null;if(Array.isArray(e.filters)){let o=e.filters.find(a=>a.scope===t);if(o)return o.filters;let r=e.filters.find(a=>a.scope==="default");return r?r.filters:null}return typeof e.filters=="object"?e.filters:null},_l=(e,t)=>{if(!e)return {layout:null,layoutId:null};let o=null,r=null;if(Array.isArray(e.layoutRefs)){let a=e.layoutRefs.find(n=>n.tableKey===t);a&&(o=a.layoutId);}return !o&&e.layoutId&&(o=e.layoutId),e.layout&&typeof e.layout=="object"&&!Array.isArray(e.layout)&&(r=e.layout),{layoutId:o,layout:r}};function Qp(e,t,o){return t[o]<e[o]?-1:t[o]>e[o]?1:0}function B0(e,t){return e==="desc"?(o,r)=>Qp(o,r,t):(o,r)=>-Qp(o,r,t)}function E0(e,t){let o=e.map((r,a)=>[r,a]);return o.sort((r,a)=>{let n=t(r[0],a[0]);return n!==0?n:r[1]-a[1]}),o.map(r=>r[0])}var Tn=e=>{let t=!!e.disableGrouping,o=!!e.disableSorting,r=Qt.useCallback(O=>{let U=String(O?.label??O?.id??"").length*9+64,me=typeof O?.minWidth=="number"?O.minWidth:0;return Math.max(100,me,U)},[]),a=Qt.useCallback(()=>(e.columns||[]).filter(O=>!!O?.numeric).map(O=>O.id),[e.columns]),[n,i]=Qt.useState(""),[c,d]=Qt.useState(e.order||"asc"),[l,s]=Qt.useState(e.orderBy||""),[g,f]=Qt.useState([]),[p,b]=Qt.useState(e.page||0),[y,u]=Qt.useState(e.rowsPerPage||20),[C,m]=Qt.useState(e.selected||[]),[h,x]=Qt.useState(e.columns?e.columns.map(O=>O.id):[]),[w,E]=Qt.useState(e.columns?e.columns.map(O=>O.id):[]),[R,T]=Qt.useState(e.showSummary||false),[I,k]=Qt.useState(()=>a()),[S,D]=Qt.useState([]),[P,M]=Qt.useState(new Set),[B,X]=Qt.useState(()=>{let O={};return (e.columns||[]).forEach(W=>{O[W.id]=r(W);}),O}),[L,Z]=Qt.useState(null),[$,q]=Qt.useState(null),[H,re]=Qt.useState(null),[de,Ce]=Qt.useState(null),[ve,le]=Qt.useState(false),[oe,Ie]=Qt.useState(""),[Ze,Ge]=Qt.useState(""),ce=t?[]:S,Ve=Qt.useCallback(O=>{if(t){D([]),M(new Set),q(null);return}D(O);},[t]);Qt.useEffect(()=>{t&&(D([]),M(new Set),q(null));},[t]),Qt.useEffect(()=>{o&&(d("asc"),s(""),f([]));},[o]),Qt.useEffect(()=>{e.layout&&Ct(e.layout);},[e.layout]),Qt.useEffect(()=>{if(o){d("asc"),s("");return}e.order!==void 0&&d(e.order),e.orderBy!==void 0&&s(e.orderBy);},[e.order,e.orderBy,o]),Qt.useEffect(()=>{e.selected!==void 0&&m(e.selected);},[e.selected]),Qt.useEffect(()=>{e.page!==void 0&&b(e.page);},[e.page]),Qt.useEffect(()=>{e.rowsPerPage!==void 0&&u(e.rowsPerPage);},[e.rowsPerPage]),Qt.useEffect(()=>{let O=a();k(W=>W.filter(me=>O.includes(me)));},[a]),Qt.useEffect(()=>{X(O=>{let W={...O};return (e.columns||[]).forEach(U=>{W[U.id]===void 0&&(W[U.id]=r(U));}),W});},[e.columns,r]),Qt.useEffect(()=>{E(O=>{let W=(e.columns||[]).map(Ye=>Ye.id),U=new Set(W),me=O.filter(Ye=>U.has(Ye)),pe=new Set(me),Fe=W.filter(Ye=>!pe.has(Ye)),Xe=[...me,...Fe];return Xe.length===O.length&&Xe.every((Ye,ot)=>Ye===O[ot])?O:Xe});},[e.columns]);let et=Qt.useMemo(()=>{let O=e.columns||[];if(w.length===0)return O;let W=new Map(O.map(pe=>[pe.id,pe])),U=[],me=new Set;return w.forEach(pe=>{let Fe=W.get(pe);Fe&&(U.push(Fe),me.add(pe));}),O.forEach(pe=>{me.has(pe.id)||U.push(pe);}),U},[e.columns,w]),ye=Qt.useMemo(()=>{let O=e.rows||[];return n&&(O=O.filter(W=>Object.keys(W).some(U=>String(W[U]).toLowerCase().includes(n.toLowerCase())))),O},[e.rows,n]),We=Qt.useMemo(()=>{if(o||e.onSortChange)return ye;if(g.length>0){let O=[...ye];return O.sort((W,U)=>{for(let me of g){let pe=W?.[me.field],Fe=U?.[me.field];if(!(pe==null&&Fe==null)){if(pe==null)return me.direction==="asc"?-1:1;if(Fe==null)return me.direction==="asc"?1:-1;if(pe<Fe)return me.direction==="asc"?-1:1;if(pe>Fe)return me.direction==="asc"?1:-1}}return 0}),O}return l?E0(ye,B0(c,l)):ye},[ye,c,l,g,e.onSortChange,o]),qe=Qt.useCallback(O=>{if(ce.length===0)return O.map(Fe=>({type:"row",data:Fe,id:Fe[e.rowKey||"id"]}));let W=[...O].sort((Fe,Xe)=>{for(let Ye of ce){if(Fe[Ye]<Xe[Ye])return -1;if(Fe[Ye]>Xe[Ye])return 1}return 0}),U=(Fe,Xe=0)=>{if(Xe>=ce.length)return Fe;let Ye=ce[Xe],ot={},Dt=[];return Fe.forEach(pt=>{let mt=pt[Ye],St=`${Ye}:${mt}`;ot[St]||(ot[St]={key:St,field:Ye,value:mt,children:[],count:0,level:Xe},Dt.push(ot[St])),ot[St].children.push(pt),ot[St].count++;}),Dt.forEach(pt=>{pt.children&&(pt.children=U(pt.children,Xe+1));}),Dt},me=U(W),pe=(Fe,Xe="")=>{let Ye=[];return Fe.forEach(ot=>{if(ot.children){let Dt=Xe?`${Xe}>${ot.key}`:ot.key,pt=P.has(Dt);Ye.push({type:"group",id:Dt,field:ot.field,value:ot.value,level:ot.level,count:ot.count,isExpanded:pt,childIds:(function mt(St){let Wt=[];return St.children.forEach(ct=>{ct.children?Wt=Wt.concat(mt(ct)):Wt.push(ct[e.rowKey||"id"]);}),Wt})(ot)}),pt&&(Ye=Ye.concat(pe(ot.children,Dt)));}else Ye.push({type:"row",data:ot,id:ot[e.rowKey||"id"],level:ce.length});}),Ye};return pe(me)},[ce,P,e.rowKey]),st=Qt.useCallback(O=>{if(ce.length===0)return [];let W=[...O].sort((pe,Fe)=>{for(let Xe of ce){if(pe[Xe]<Fe[Xe])return -1;if(pe[Xe]>Fe[Xe])return 1}return 0}),U=[],me=(pe,Fe,Xe)=>{if(Fe>=ce.length)return;let Ye=ce[Fe],ot=new Map;pe.forEach(Dt=>{let pt=Dt[Ye],mt=ot.get(pt);mt?mt.push(Dt):ot.set(pt,[Dt]);}),ot.forEach((Dt,pt)=>{let mt=`${Ye}:${pt}`,St=Xe?`${Xe}>${mt}`:mt;U.push(St),me(Dt,Fe+1,St);});};return me(W,0,""),U},[ce]),Pe=Qt.useMemo(()=>qe(We),[We,qe]),K=Qt.useMemo(()=>st(We),[We,st]),Ee=Qt.useMemo(()=>{let O=(e.rows||[]).length;return typeof e.count=="number"&&e.count>O},[e.count,e.rows]),ge=Qt.useMemo(()=>Ee?Pe:y>0?Pe.slice(p*y,p*y+y):Pe,[Pe,p,y,Ee]),ke=Qt.useMemo(()=>Ee&&typeof e.count=="number"?e.count:Pe.length,[Pe.length,Ee,e.count]),rt=O=>{M(W=>{let U=new Set(W);return U.has(O)?U.delete(O):U.add(O),U});},Ue=O=>{let W=K.filter(U=>U===O||U.startsWith(`${O}>`));M(U=>{let me=new Set(U);return W.forEach(pe=>me.add(pe)),me});},ae=O=>{M(W=>{let U=new Set(W);return Array.from(U).forEach(me=>{(me===O||me.startsWith(`${O}>`))&&U.delete(me);}),U});},fe=O=>{if(!O){M(new Set);return}M(new Set(K));},je=O=>{let W=K.filter(U=>U.startsWith(`${O}>`));return W.length===0?P.has(O):P.has(O)&&W.every(U=>P.has(U))},It=O=>{if(o)return;g.length>0&&f([]);let W=l===O&&c==="asc",U=l===O&&c==="desc";if(e.onSortChange){W?e.onSortChange(O,"desc"):U?e.onSortChange("","asc"):e.onSortChange(O,"asc");return}W?(d("desc"),s(O)):U?(d("asc"),s("")):(d("asc"),s(O));},_=O=>{if(o){d("asc"),s(""),f([]);return}let W=O.filter(U=>U&&U.field);f(W),W.length>0&&s("");},ze=()=>{f([]);},xe=(O,W)=>{X(U=>({...U,[O]:W}));},Y=O=>{if(O.target.checked){let W=ye.map(U=>U[e.rowKey||"id"]);m(W),e.onSelectionChange&&e.onSelectionChange(W);return}m([]),e.onSelectionChange&&e.onSelectionChange([]);},N=(O,W)=>{let U=W[e.rowKey||"id"],me=C.indexOf(U),pe=[];me===-1?pe=pe.concat(C,U):me===0?pe=pe.concat(C.slice(1)):me===C.length-1?pe=pe.concat(C.slice(0,-1)):me>0&&(pe=pe.concat(C.slice(0,me),C.slice(me+1))),m(pe),e.onSelectionChange&&e.onSelectionChange(pe);},J=O=>{b(O),e.onPageChange&&e.onPageChange(O);},we=O=>{u(O),b(0),e.onPageChange&&e.onPageChange(0),e.onRowsPerPageChange&&e.onRowsPerPageChange(O);},Me=O=>{let W=h.indexOf(O),U=[...h];W===-1?U.push(O):U.splice(W,1),x(U);},tt=O=>{if(t)return;let W=ce.indexOf(O),U=[...ce];W===-1?U.push(O):U.splice(W,1),Ve(U);},bt=O=>{a().includes(O)&&k(U=>U.includes(O)?U.filter(me=>me!==O):[...U,O]);},dt=(O,W)=>{!O||!W||O===W||E(U=>{let me=U.indexOf(O),pe=U.indexOf(W);if(me===-1||pe===-1)return U;let Fe=[...U];return Fe.splice(me,1),Fe.splice(pe,0,O),Fe});},Vt=O=>{let W=O?.active?.id,U=O?.over?.id;typeof W=="string"&&typeof U=="string"&&dt(W,U);},vt=O=>{e.onLayoutSave&&e.onLayoutSave({visibleColumns:h,columnOrder:w,order:o?"asc":c,orderBy:o?"":l,sortBy:o?[]:g,grouping:ce,columnWidths:B,showSummary:R,summaryColumns:I});},ko=O=>{let{layout:W,layoutId:U}=_l(O,e.tableKey||"default");U?(Ge(U),Ie(U)):(Ge(""),Ie("")),W&&(W.visibleColumns&&x(W.visibleColumns),Array.isArray(W.columnOrder)&&E(W.columnOrder),o?(d("asc"),s(""),f([])):(W.order&&d(W.order),W.orderBy&&s(W.orderBy),Array.isArray(W.sortBy)&&f(W.sortBy)),W.grouping&&Ve(W.grouping),W.columnWidths&&X(W.columnWidths),W.showSummary!==void 0&&T(!!W.showSummary),Array.isArray(W.summaryColumns)&&k(W.summaryColumns));},Ct=O=>{let W=O?.layoutData||O?.layout||O||{};W.visibleColumns&&x(W.visibleColumns),Array.isArray(W.columnOrder)&&E(W.columnOrder),o?(d("asc"),s(""),f([])):(W.order&&d(W.order),W.orderBy!==void 0&&s(W.orderBy),Array.isArray(W.sortBy)&&f(W.sortBy)),W.grouping&&Ve(W.grouping),W.columnWidths&&X(W.columnWidths),W.showSummary!==void 0&&T(!!W.showSummary),Array.isArray(W.summaryColumns)&&k(W.summaryColumns),M(new Set),b(0),O?.id&&Ie(O.id),Ge("");};Qt.useEffect(()=>{e.layout&&ko({layout:e.layout});},[e.layout]);let sr=O=>{O.preventDefault(),Ce(de===null?{mouseX:O.clientX+2,mouseY:O.clientY-6}:null);},lo=()=>{Ce(null);},Et=Qt.useMemo(()=>{if(!R)return {};let O={};e.columns.forEach(U=>{if(U.numeric&&I.includes(U.id)){let me=ye.reduce((pe,Fe)=>{let Xe=parseFloat(Fe[U.id]);return pe+(isNaN(Xe)?0:Xe)},0);O[U.id]=me.toFixed(2);}else O[U.id]="";});let W=e.columns.find(U=>h.includes(U.id));return W&&!W.numeric&&(O[W.id]="Total"),O},[ye,e.columns,R,I,h]),Gt=()=>{if(!e.columns||!ye)return;let O=e.columns.map(Fe=>Fe.label).join(","),W=ye.map(Fe=>e.columns.map(Xe=>{let Ye=Fe[Xe.id];return `"${(Ye==null?"":String(Ye)).replace(/"/g,'""')}"`}).join(",")).join(`
|
|
184
|
-
`),
|
|
185
|
-
${W}`,me=encodeURI(U),pe=document.createElement("a");pe.setAttribute("href",me),pe.setAttribute("download",`${e.title||"export"}.csv`),document.body.appendChild(pe),pe.click(),document.body.removeChild(pe);},yt=()=>{le(true);},ao=()=>{le(false);};return {isMobile:false,columns:et,order:c,setOrder:d,orderBy:l,setOrderBy:s,sortBy:g,setSortBy:f,applyMultiSort:_,clearMultiSort:ze,columnOrder:w,setColumnOrder:E,filterText:n,setFilterText:i,visibleColumns:h,setVisibleColumns:x,showSummary:R,setShowSummary:T,summaryColumns:I,grouping:ce,setGrouping:Ve,expandedGroups:P,setExpandedGroups:M,groupAnchorEl:$,setGroupAnchorEl:q,summaryAnchorEl:H,setSummaryAnchorEl:re,columnWidths:B,setColumnWidths:X,anchorEl:L,setAnchorEl:Z,contextMenu:de,setContextMenu:Ce,sensors:void 0,sortedAndFilteredRows:We,visibleRows:ge,summaryRow:Et,page:p,setPage:J,rowsPerPage:y,setRowsPerPage:we,totalDisplayCount:ke,selected:C,setSelected:m,isAllExpanded:K.length>0&&K.every(O=>P.has(O)),handleColumnResize:xe,handleRequestSort:It,handleSelectAllClick:Y,handleClick:N,toggleSummaryColumn:bt,handleDragEnd:Vt,handleColumnReorder:dt,handleExport:Gt,handleContextMenu:sr,handleCloseContextMenu:lo,toggleColumnVisibility:Me,toggleGroupExpand:rt,toggleGroupField:tt,handleToggleAll:fe,handleExpandGroupRecursively:Ue,handleCollapseGroupRecursively:ae,isGroupFullyExpanded:je,handleLayoutLoad:Ct,handleVariantLoad:ko,handleLayoutSave:vt,effectiveAppId:e.appId||"",currentLayoutData:{visibleColumns:h,order:o?"asc":c,orderBy:o?"":l,sortBy:o?[]:g,columnOrder:w,grouping:ce,columnWidths:B,showSummary:R,summaryColumns:I},currentLayoutId:oe,layoutIdToLoad:Ze,onPageChange:J,onRowsPerPageChange:we,graphReportOpen:ve,handleOpenGraphReport:yt,handleCloseGraphReport:ao}};var lB=e=>jsxRuntime.jsx(N0__default.default,{...e}),sB=e=>jsxRuntime.jsx(vc__default.default,{...e}),cB=e=>jsxRuntime.jsx(nm__default.default,{...e}),dB=e=>jsxRuntime.jsx(Yb__default.default,{...e}),uB=e=>jsxRuntime.jsx(Qb__default.default,{...e}),Dr=e=>{let{t}=ne(),o="0.85rem",{title:r,showToolbar:a=true,selectionMode:n,selected:i=[],onSelectionChange:c,actions:d,extraTools:l,fitContainer:s=false,fullWidth:g=false,maxHeight:f,loading:p=false,rowsPerPageOptions:b=[20,50,100,-1],onLayoutSave:y,filterConfig:u,rowKey:C,tableKey:m="default",graphReport:h,quickCreate:x,quickEdit:w,quickDelete:E,serviceUrl:R,disableGrouping:T=false,disableSorting:I=false}=e,k=r||t("table.title.default"),{isMobile:S,columns:D,order:P,orderBy:M,filterText:B,setFilterText:X,visibleColumns:L,showSummary:Z,setShowSummary:$,summaryColumns:q,grouping:H,setGrouping:re,expandedGroups:de,groupAnchorEl:Ce,setGroupAnchorEl:ve,summaryAnchorEl:le,setSummaryAnchorEl:oe,columnWidths:Ie,anchorEl:Ze,setAnchorEl:Ge,contextMenu:ce,sensors:Ve,sortedAndFilteredRows:et,summaryRow:ye,visibleRows:We,isAllExpanded:qe,page:st,setPage:Pe,rowsPerPage:K,setRowsPerPage:Ee,totalDisplayCount:ge,setSelected:ke,handleColumnResize:rt,handleRequestSort:Ue,handleSelectAllClick:ae,handleClick:fe,toggleSummaryColumn:je,handleDragEnd:It,handleExport:_,handleContextMenu:ze,handleCloseContextMenu:xe,toggleColumnVisibility:Y,toggleGroupExpand:N,toggleGroupField:J,handleToggleAll:we,handleExpandGroupRecursively:Me,handleCollapseGroupRecursively:tt,isGroupFullyExpanded:bt,handleLayoutLoad:dt,handleVariantLoad:Vt,handleLayoutSave:vt,effectiveAppId:ko,currentLayoutData:Ct,currentLayoutId:sr,layoutIdToLoad:lo,graphReportOpen:Et,handleOpenGraphReport:Gt,handleCloseGraphReport:yt}=Tn(e),ao=h?.enabled??false,O=ao&&(h?.interaction?.enabled??true),W=Nl(),U=!!x?.enabled,me=!!w?.enabled,pe=!!E?.enabled,Fe=x?.fields,Xe=x?.excludeFields||[],Ye=x?.initialValues||{},[ot,Dt]=Qt__namespace.default.useState(false),[pt,mt]=Qt__namespace.default.useState(false),[St,Wt]=Qt__namespace.default.useState({}),[ct,Ao]=Qt__namespace.default.useState(false),[wo,Yo]=Qt__namespace.default.useState(false),[A,j]=Qt__namespace.default.useState({}),[ee,se]=Qt__namespace.default.useState(false),[Le,_e]=Qt__namespace.default.useState(false),gt=p||pt||wo||Le,Re=Qt__namespace.default.useMemo(()=>{let G=[...D];if(Array.isArray(Fe)&&Fe.length>0){let Ne=new Set(Fe);G=G.filter(V=>Ne.has(V.id));}if(Xe.length>0){let Ne=new Set(Xe);G=G.filter(V=>!Ne.has(V.id));}return G.filter(Ne=>!!Ne?.id)},[D,Xe,Fe]),ut=C||"id",nt=Qt__namespace.default.useMemo(()=>{let G=new Set(i);return et.filter(Ne=>G.has(Ne?.[ut]))},[i,et,ut]),Pt=nt.length===1?nt[0]:null,ht=w?.fields,eo=w?.excludeFields||[],so=w?.editableFields||[],To=w?.nonEditableFields||[],Xt=w?.primaryKeys?.length?w.primaryKeys:[ut],xo=Qt__namespace.default.useMemo(()=>{let G=[...D];if(Array.isArray(ht)&&ht.length>0){let Ne=new Set(ht);G=G.filter(V=>Ne.has(V.id));}if(eo.length>0){let Ne=new Set(eo);G=G.filter(V=>!Ne.has(V.id));}return G.filter(Ne=>!!Ne?.id)},[D,eo,ht]),Rt=Qt__namespace.default.useMemo(()=>new Set(Xt),[Xt]),Ut=Qt__namespace.default.useMemo(()=>new Set(so),[so]),cr=Qt__namespace.default.useMemo(()=>new Set(To),[To]),dr=Qt__namespace.default.useCallback(G=>Ut.size>0?Ut.has(G):!(cr.has(G)||Rt.has(G)),[Ut,cr,Rt]);Qt__namespace.default.useEffect(()=>{!Et&&W.hasActiveFilters&&W.clearAll();},[Et,W.hasActiveFilters,W.clearAll]);let rn=()=>{let G={};Re.forEach(Ne=>{G[Ne.id]=Ye[Ne.id]??"";}),Wt(G),Dt(true);},wa=()=>{pt||Dt(false);},an=(G,Ne)=>{Wt(V=>({...V,[G]:Ne}));},Qo=async()=>{if(!x?.onSubmit){Dt(false);return}try{mt(!0),await x.onSubmit(St),Dt(!1);}finally{mt(false);}},nn=()=>{if(!Pt)return;let G={};xo.forEach(V=>{G[V.id]=Pt[V.id]??"";});let Ne=w?.getInitialValues?{...G,...w.getInitialValues(Pt)}:G;j(Ne),Ao(true);},Ta=()=>{wo||Ao(false);},Ia=(G,Ne)=>{j(V=>({...V,[G]:Ne}));},Or=async()=>{if(Pt){if(!w?.onSubmit){Ao(false);return}try{Yo(!0),await w.onSubmit(A,Pt),Ao(!1);}finally{Yo(false);}}},ra=()=>{nt.length!==0&&se(true);},ni=()=>{Le||se(false);},v=async()=>{if(nt.length===0){se(false);return}if(!E?.onConfirm){se(false),ke([]),c?.([]);return}try{_e(!0),await E.onConfirm(nt),se(!1),ke([]),c?.([]);}finally{_e(false);}},F=et,{fieldMapping:z}=xn({rows:F,config:{...h,title:h?.title||`${k} ${t("graph.reportTitle")}`}}),Q=Qt__namespace.default.useMemo(()=>O?W.applyRows(F,z):F,[O,W.applyRows,F,z]),{model:he}=xn({rows:Q,config:{...h,title:h?.title||`${k} ${t("graph.reportTitle")}`,fieldMapping:z}}),Ke=he.table.columns.map(G=>({id:G.id,label:G.label,align:G.align||"left",minWidth:120,numeric:G.align==="right"})),De=ko?jsxRuntime.jsx(wn,{appId:ko,tableKey:m,currentLayoutData:Ct,onLayoutLoad:dt,targetLayoutId:lo,activeLayoutId:sr,serviceUrl:R??u?.serviceUrl}):null,He=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!T&&jsxRuntime.jsx(sn,{groupAnchorEl:Ce,setGroupAnchorEl:ve,grouping:H,setGrouping:re,columns:D,toggleGroupField:J}),jsxRuntime.jsx(cn,{anchorEl:Ze,setAnchorEl:Ge,columns:D,visibleColumns:L,toggleColumnVisibility:Y}),jsxRuntime.jsx(bl,{anchorEl:le,setAnchorEl:oe,showSummary:Z,setShowSummary:$,columns:D,summaryColumns:q,toggleSummaryColumn:je}),jsxRuntime.jsx(yl,{contextMenu:ce,handleCloseContextMenu:xe,columns:D,visibleColumns:L,toggleColumnVisibility:Y})]});return S?jsxRuntime.jsxs(Ri__default.default,{sx:{display:"flex",flexDirection:"column",gap:2,height:"100%"},children:[u&&jsxRuntime.jsx($r,{fields:u.fields,filters:u.filters,onFilterChange:u.onFilterChange,onSearch:u.onSearch,variants:u.variants||[],currentVariantId:u.currentVariantId,onVariantLoad:u.onVariantLoad,onVariantSave:u.onVariantSave,onVariantDelete:u.onVariantDelete,onVariantSetDefault:u.onVariantSetDefault,appId:u.appId,tableKey:m,currentLayout:[{tableKey:m,layoutData:Ct}],variantService:u.variantService,serviceUrl:R??u.serviceUrl}),jsxRuntime.jsx(_u,{title:k,loading:p,showSummary:Z,setShowSummary:$,setAnchorEl:Ge,setSummaryAnchorEl:oe,filterText:B,setFilterText:X,sortedAndFilteredRows:et,selected:i,columns:D,visibleColumns:L,summaryRow:ye,handleClick:fe,selectionMode:n}),He]}):jsxRuntime.jsxs(Ri__default.default,{sx:{width:g?"100%":"auto",mb:s?0:2,...s?{flex:1,display:"flex",flexDirection:"column",minHeight:0,height:"100%",overflow:"hidden"}:{}},children:[u&&jsxRuntime.jsx(Ri__default.default,{sx:{mb:2},children:jsxRuntime.jsx($r,{fields:u.fields,filters:u.filters,onFilterChange:u.onFilterChange,onSearch:u.onSearch,variants:u.variants||[],currentVariantId:u.currentVariantId,onVariantLoad:G=>{Vt(G),u.onVariantLoad&&u.onVariantLoad(G);},onVariantSave:u.onVariantSave,onVariantDelete:u.onVariantDelete,onVariantSetDefault:u.onVariantSetDefault,loading:p,appId:u.appId,tableKey:m,currentLayout:[{tableKey:m,layoutData:Ct}],currentLayoutId:sr,layoutRefs:[{tableKey:m,layoutId:sr}],variantService:u.variantService,serviceUrl:R??u.serviceUrl})}),jsxRuntime.jsxs(F0__default.default,{sx:{width:g?"100%":"auto",mb:s?0:2,display:"flex",flexDirection:"column",overflow:"hidden",position:"relative","&::before":gt?{content:'""',position:"absolute",top:0,left:0,width:"100%",height:"3px",background:"linear-gradient(90deg, rgba(25, 118, 210, 0) 0%, rgba(25, 118, 210, 0.25) 25%, rgba(25, 118, 210, 1) 50%, rgba(25, 118, 210, 0.25) 75%, rgba(25, 118, 210, 0) 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}:s?{flex:1,minHeight:0,height:"100%"}:{}},children:[a&&jsxRuntime.jsx(ul,{filterText:B,setFilterText:X,onRowsPerPageChange:Ee,rowsPerPage:K,rowsPerPageOptions:b,page:st,count:ge,onPageChange:Pe,actions:d,extraTools:l,grouping:H,disableGrouping:T,setGroupAnchorEl:ve,showSummary:Z,setShowSummary:$,setAnchorEl:Ge,setSummaryAnchorEl:oe,handleExport:_,showCreateButton:U,onOpenCreateDialog:rn,showEditButton:me,onOpenEditDialog:nn,editDisabled:nt.length!==1,showDeleteButton:pe,onOpenDeleteConfirm:ra,deleteDisabled:nt.length===0,onLayoutSave:y||u?.variantService&&u?.appId?vt:void 0,loading:p,layoutManager:De,onOpenGraphReport:ao?Gt:void 0}),jsxRuntime.jsx(nm__default.default,{sx:{flex:1,...f?{maxHeight:f,height:f}:s?{height:0,maxHeight:"none"}:{maxHeight:"calc(100vh - 320px)"},overflowY:"auto",overflowX:"auto",position:"relative",minHeight:0},children:jsxRuntime.jsx(core.DndContext,{sensors:Ve,collisionDetection:core.closestCenter,onDragEnd:It,modifiers:[modifiers.restrictToHorizontalAxis],children:jsxRuntime.jsxs(L0__default.default,{sx:{minWidth:g?750:"auto",width:g?"100%":"auto",tableLayout:Object.keys(Ie).length>0?"fixed":"auto",borderCollapse:"separate",borderSpacing:0,"& .MuiTableCell-root":{fontSize:o}},"aria-labelledby":"tableTitle",size:"small",stickyHeader:true,children:[jsxRuntime.jsx(gl,{columns:D,visibleColumns:L,order:P,orderBy:M,onRequestSort:Ue,disableSorting:I,onContextMenu:ze,selectionMode:n,grouping:H,isAllExpanded:qe,handleToggleAll:we,rowCount:et.length,numSelected:i.length,onSelectAllClick:ae,columnWidths:Ie,onColumnResize:rt}),jsxRuntime.jsx($u,{visibleRows:We,columns:D,visibleColumns:L,selectionMode:n,selected:i,orderBy:M,loading:p,expandedGroups:de,toggleGroupExpand:N,handleExpandGroupRecursively:Me,handleCollapseGroupRecursively:tt,isGroupFullyExpanded:bt,handleClick:fe,onSelectionChange:c,grouping:H,rowKeyProp:C,page:st,rowsPerPage:K}),Z&&jsxRuntime.jsx(Gu,{showSummary:Z,columns:D,visibleColumns:L,summaryRow:ye,selectionMode:n?.toString(),grouping:H,orderBy:M,zIndex:3})]})})})]}),U&&jsxRuntime.jsxs(Jp__default.default,{open:ot,onClose:wa,fullWidth:true,maxWidth:"sm",slotProps:{paper:{sx:{borderRadius:2,border:G=>`1px solid ${G.palette.divider}`,bgcolor:"background.paper"}}},children:[jsxRuntime.jsx(em__default.default,{sx:{fontSize:"0.85rem",fontWeight:700,pb:1},children:x?.title||t("quickCreate.createWithTitle",{title:k})}),jsxRuntime.jsx(tm__default.default,{sx:{pt:"8px !important"},children:jsxRuntime.jsxs(Ri__default.default,{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[Re.map(G=>{let Ne=G.type==="number"||G.numeric?"number":G.type==="date"?"date":"text",V=G.label||G.id;return jsxRuntime.jsx(rm__default.default,{label:V,value:St[G.id]??"",onChange:ue=>an(G.id,ue.target.value),type:Ne,size:"small",fullWidth:true,InputLabelProps:{shrink:Ne==="date"?true:void 0,sx:{fontSize:"0.85rem"}},InputProps:{sx:{fontSize:"0.85rem"}}},`quick-create-${G.id}`)}),x?.description&&jsxRuntime.jsx(am__default.default,{severity:"info",sx:{fontSize:"0.85rem","& .MuiAlert-message":{fontSize:"0.85rem"}},children:x.description})]})}),jsxRuntime.jsxs(om__default.default,{sx:{px:3,pb:2},children:[jsxRuntime.jsx(Kl__default.default,{onClick:wa,sx:{fontSize:"0.85rem"},disabled:pt,children:x?.cancelLabel||t("common.cancel")}),jsxRuntime.jsx(Kl__default.default,{onClick:Qo,variant:"contained",sx:{fontSize:"0.85rem",fontWeight:700},disabled:pt,children:x?.submitLabel||t("common.save")})]})]}),me&&jsxRuntime.jsxs(Jp__default.default,{open:ct,onClose:Ta,fullWidth:true,maxWidth:"sm",slotProps:{paper:{sx:{borderRadius:2,border:G=>`1px solid ${G.palette.divider}`,bgcolor:"background.paper"}}},children:[jsxRuntime.jsx(em__default.default,{sx:{fontSize:"0.85rem",fontWeight:700,pb:1},children:w?.title||t("quickEdit.editWithTitle",{title:k})}),jsxRuntime.jsx(tm__default.default,{sx:{pt:"8px !important"},children:jsxRuntime.jsxs(Ri__default.default,{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[xo.map(G=>{let Ne=G.type==="number"||G.numeric?"number":G.type==="date"?"date":"text",V=G.label||G.id,ue=dr(G.id);return jsxRuntime.jsx(rm__default.default,{label:V,value:A[G.id]??"",onChange:te=>Ia(G.id,te.target.value),type:Ne,size:"small",fullWidth:true,disabled:!ue,InputLabelProps:{shrink:Ne==="date"?true:void 0,sx:{fontSize:"0.85rem"}},InputProps:{sx:{fontSize:"0.85rem"}}},`quick-edit-${G.id}`)}),w?.description&&jsxRuntime.jsx(am__default.default,{severity:"info",sx:{fontSize:"0.85rem","& .MuiAlert-message":{fontSize:"0.85rem"}},children:w.description})]})}),jsxRuntime.jsxs(om__default.default,{sx:{px:3,pb:2},children:[jsxRuntime.jsx(Kl__default.default,{onClick:Ta,sx:{fontSize:"0.85rem"},disabled:wo,children:w?.cancelLabel||t("common.cancel")}),jsxRuntime.jsx(Kl__default.default,{onClick:Or,variant:"contained",sx:{fontSize:"0.85rem",fontWeight:700},disabled:wo||!Pt,children:w?.submitLabel||t("common.save")})]})]}),pe&&jsxRuntime.jsx(si,{open:ee,type:"warning",title:E?.title||t("quickDelete.confirmTitle"),message:E?.message||(nt.length>1?t("quickDelete.confirmMessageMultiple",{count:nt.length}):t("quickDelete.confirmMessageSingle")),confirmText:E?.confirmText||t("common.delete"),cancelText:E?.cancelText||t("common.cancel"),onClose:ni,onConfirm:v}),He,ao&&jsxRuntime.jsx(Fl,{open:Et,onClose:yt,model:he,aiAssistant:h?.aiAssistant,interaction:O?{enabled:true,filters:W.filters,fieldMapping:z,onPrimaryDimensionClick:G=>W.setFilter("primaryDimension",G),onSecondaryDimensionClick:G=>W.setFilter("secondaryDimension",G),onStatusClick:G=>W.setFilter("status",G),onClearFilter:W.clearFilter,onClearAll:W.clearAll}:void 0,tableContent:jsxRuntime.jsx(Dr,{appId:ko||"graph-report-internal",title:t("graph.dataBody"),columns:Ke,rows:he.table.rows,rowKey:"id",fullWidth:true,maxHeight:"420px",rowsPerPage:20,rowsPerPageOptions:[20,50,100],graphReport:{enabled:false}})})]})},pB=Dr;var xB=({id:e,title:t,hideHeader:o=true,filterConfig:r,tableProps:a,children:n,spacing:i=1,mode:c="separated"})=>{let d=r?{...r,appId:r.appId||e}:void 0,l={...a,appId:a.appId||e};return jsxRuntime.jsxs(zu,{title:t,hideHeader:o,children:[jsxRuntime.jsxs(material.Stack,{spacing:i,sx:{height:"100%",overflow:"hidden"},children:[c==="separated"&&d&&jsxRuntime.jsx(material.Box,{sx:{flexShrink:0},children:jsxRuntime.jsx($r,{...d})}),jsxRuntime.jsx(material.Box,{sx:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:jsxRuntime.jsx(Dr,{...l,fitContainer:true,filterConfig:c==="integrated"?d:void 0})})]}),n]})};var TB=({metadata:e,fetchData:t,initialRowsPerPage:o=20,rowsPerPageOptions:r=[20,50,100,-1],tableKey:a="default",mode:n="integrated",serviceUrl:i,variantService:c})=>{let{t:d}=ne(),[l,s]=Qt.useState(false),[g,f]=Qt.useState([]),[p,b]=Qt.useState({}),[y,u]=Qt.useState(e.variants||[]),[C,m]=Qt.useState(e.layout||null),[h,x]=Qt.useState(""),[w,E]=Qt.useState(0),[R,T]=Qt.useState(0),[I,k]=Qt.useState(o),[S,D]=Qt.useState([]),[P,M]=Qt.useState("asc"),[B,X]=Qt.useState("");Qt.useEffect(()=>{let le={};e.filters.forEach(oe=>{oe.defaultValue!==void 0&&(le[oe.id]=oe.defaultValue);}),b(le);},[e.filters]);let L=Qt.useCallback(async(le,oe,Ie,Ze,Ge)=>{s(true);try{let ce={...le,page:oe+1,limit:Ie,sort:Ge,order:Ze},Ve;t?Ve=await t(ce):typeof e.api=="function"?Ve=await e.api(ce):e.api&&typeof e.api=="object"?(console.log("Fetching from URL:",e.api.url,ce),Ve={rows:[],total:0}):(console.warn("No API configured for report"),Ve={rows:[],total:0}),Ve&&(f(Ve.rows||[]),E(Ve.total||0));}catch(ce){console.error("Failed to fetch report data",ce);}finally{s(false);}},[e.api,t]);Qt.useEffect(()=>{L(p,R,I,P,B);},[L,R,I,P,B]);let Z=()=>{T(0),L(p,0,I,P,B);},$=le=>{T(0),k(le);},q=(le,oe)=>{M(oe),X(le);},H=le=>{b(le);},re=le=>{x(le?.id||"");let oe=Yp(le,a);if(oe){let Ze=oe.values??oe;b(Ze),L(Ze,0,I,P,B),T(0);}let{layout:Ie}=_l(le,a);Ie&&m(Ie);},de=le=>{let oe={...le,id:Date.now().toString(),createdAt:new Date().toISOString()};u(Ie=>[...Ie,oe]);},Ce=le=>{m(le);};return {pageProps:{id:e.id,title:e.title,mode:n,filterConfig:{appId:e.id,tableKey:a,fields:e.filters,filters:p,onFilterChange:H,onSearch:Z,onVariantLoad:re,onVariantSave:de,onVariantDelete:le=>u(oe=>oe.filter(Ie=>Ie.id!==le)),onVariantSetDefault:le=>{u(oe=>oe.map(Ie=>({...Ie,isDefault:Ie.id===le})));},variants:y,currentVariantId:h,variantService:c,serviceUrl:i},tableProps:{appId:e.id,tableKey:a,columns:e.columns,rows:g,loading:l,rowKey:"id",count:w,page:R,rowsPerPage:I,rowsPerPageOptions:r,onPageChange:T,onRowsPerPageChange:$,selectionMode:"multiple",selected:S,onSelectionChange:D,onLayoutSave:Ce,layout:C,title:e.title,showSummary:true,order:P,orderBy:B,serviceUrl:i,onSortChange:q,graphReport:e.graphReport||{enabled:true,title:`${e.title} ${d("graph.reportTitle")}`}}},filters:p,rows:g,loading:l,refresh:Z}};var K0=e=>[...e].sort((t,o)=>o.value-t.value),RB=({bars:e=[],lines:t=[],combos:o=[],heatmap:r=[],pies:a=[],waterfalls:n=[]})=>{let i=Qt.useMemo(()=>K0(e),[e]),c=Qt.useMemo(()=>[...t],[t]),d=Qt.useMemo(()=>[...o],[o]),l=Qt.useMemo(()=>[...r],[r]),s=Qt.useMemo(()=>{let f=a.reduce((p,b)=>p+b.value,0);return a.map(p=>({...p,percent:f>0?p.value/f*100:p.percent}))},[a]),g=Qt.useMemo(()=>[...n],[n]);return {bars:i,lines:c,combos:d,heatmap:l,pies:s,waterfalls:g}};var EB=({apiKey:e,query:t,zoom:o=14,mapType:r="roadmap"})=>Qt.useMemo(()=>!e||!t?"":Ci({apiKey:e,query:t,zoom:o,mapType:r}),[e,t,o,r]),FB=({keyword:e,location:t})=>Qt.useMemo(()=>Ml({keyword:e,location:t?{lng:t.lng,lat:t.lat,name:t.name}:void 0}),[e,t]);var Mi=({code:e,language:t="text",copyable:o=true,showLineNumbers:r=false,wrapLongLines:a=false,maxHeight:n})=>{let[i,c]=Qt.useState(false),d=Qt.useMemo(()=>e.replace(/\n$/,"").split(`
|
|
186
|
-
`),[
|
|
187
|
-
`).map(
|
|
183
|
+
`;return jt.useEffect(()=>{let p=i.current;if(!p)return;let u=new ogl.Renderer({alpha:true,premultipliedAlpha:false}),d=u.gl;d.clearColor(0,0,0,0),p.appendChild(d.canvas);let f=new ogl.Triangle(d),h=new ogl.Program(d,{vertex:s,fragment:c,uniforms:{iTime:{value:0},iResolution:{value:new ogl.Vec3(d.canvas.width,d.canvas.height,d.canvas.width/d.canvas.height)},hue:{value:t},hover:{value:0},rot:{value:0},hoverIntensity:{value:o},backgroundColor:{value:ou(a)}}}),m=new ogl.Mesh(d,{geometry:f,program:h});function y(){if(!p)return;let M=window.devicePixelRatio||1,I=p.clientWidth,N=p.clientHeight;u.setSize(I*M,N*M),d.canvas.style.width=I+"px",d.canvas.style.height=N+"px",h.uniforms.iResolution.value.set(d.canvas.width,d.canvas.height,d.canvas.width/d.canvas.height);}window.addEventListener("resize",y),y();let v=0,g=0,S=0,b=.3,C=M=>{let I=p.getBoundingClientRect(),N=M.clientX-I.left,A=M.clientY-I.top,T=I.width,D=I.height,R=Math.min(T,D),F=T/2,z=D/2,Z=(N-F)/R*2,B=(A-z)/R*2;Math.sqrt(Z*Z+B*B)<.8?v=1:v=0;},k=()=>{v=0;};p.addEventListener("mousemove",C),p.addEventListener("mouseleave",k);let x,E=M=>{x=requestAnimationFrame(E);let I=(M-g)*.001;g=M,h.uniforms.iTime.value=M*.001,h.uniforms.hue.value=t,h.uniforms.hoverIntensity.value=o,h.uniforms.backgroundColor.value=ou(a);let N=n?1:v;h.uniforms.hover.value+=(N-h.uniforms.hover.value)*.1,r&&N>.5&&(S+=I*b),h.uniforms.rot.value=S,u.render({scene:m});};return x=requestAnimationFrame(E),()=>{cancelAnimationFrame(x),window.removeEventListener("resize",y),p.removeEventListener("mousemove",C),p.removeEventListener("mouseleave",k),d.canvas.parentNode===p&&p.removeChild(d.canvas),d.getExtension("WEBGL_lose_context")?.loseContext();}},[t,o,r,n,a]),e("div",{ref:i,className:"w-full h-full"})}function wb(t,o,r){let n,a,i;if(o===0)n=a=i=r;else {let s=(u,d,f)=>(f<0&&(f+=1),f>1&&(f-=1),f<.16666666666666666?u+(d-u)*6*f:f<.5?d:f<.6666666666666666?u+(d-u)*(.6666666666666666-f)*6:u),c=r<.5?r*(1+o):r+o-r*o,p=2*r-c;n=s(p,c,t+1/3),a=s(p,c,t),i=s(p,c,t-1/3);}return new ogl.Vec3(n,a,i)}function ou(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 wb(n,a,i)}return new ogl.Vec3(0,0,0)}var nu=Xi(()=>{"use strict";"use client";w();});var Yu={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:"#fbf1ee",warnBg:"#fef3ef",hover:"rgba(21, 65, 148, 0.06)",selected:"rgba(21, 65, 148, 0.10)",focusRing:"rgba(21, 65, 148, 0.18)",focusSolid:"#154194",disabledFg:"#a3a3a3",disabledBg:"#ececec",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)"},Qu={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:"#0d1f42",p100:"#12305f",p200:"#bac9e3",p300:"#91a8d1",p600:"#c1cee7",p700:"#a4b8dd",accent:"#fc4c02",err:"#d53f01",errBg:"#2a150c",warnBg:"#2b170d",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)"},Zi={light:Yu,dark:Qu},ov='"Montserrat", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif',rv=t=>{let o=Zi[t];return [o.primary,o.p300,o.muted,o.p700]},nv=10,av="0.2s ease";w();var Cl=jt.createContext({mode:"light",setting:"light"}),cm=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;},Qi=({mode:t,defaultMode:o="light",children:r})=>{let n=t??o,[a,i]=jt.useState("light"),[s,c]=jt.useState(false);jt.useEffect(()=>{c(true);let d=window.matchMedia("(prefers-color-scheme: dark)"),f=()=>i(d.matches?"dark":"light");return f(),d.addEventListener("change",f),()=>d.removeEventListener("change",f)},[]);let p=n==="system"?s?a:"light":n;jt.useEffect(()=>{cm(p);},[p]);let u=jt.useMemo(()=>({mode:p,setting:n}),[p,n]);return e(Cl.Provider,{value:u,children:r})},$r=()=>jt.useContext(Cl).mode,dm=()=>Zi[$r()];var Ee=(t,o)=>{let r=Math.min(1,Math.max(0,o)),n=t.trim(),a=p=>p.split("").map(u=>u+u).join(""),i=n.startsWith("#")?n.slice(1):"",s=i.length===3?a(i):i;if(/^[0-9a-fA-F]{6}$/.test(s)){let p=parseInt(s.slice(0,2),16),u=parseInt(s.slice(2,4),16),d=parseInt(s.slice(4,6),16);return `rgba(${p}, ${u}, ${d}, ${r})`}let c=`${Math.round(r*100)}%`;return `color-mix(in oklch, ${t} ${c}, transparent)`};var Ro=t=>{let o=t.startsWith("up:")?`(min-width:${t.slice(3)}px)`:t.startsWith("down:")?`(max-width:${t.slice(5)}px)`:t,[r,n]=jt.useState(()=>typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia(o).matches);return jt.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};w();var mm={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},gm=t=>typeof t=="number"?`${t}px`:t,fm={"2.5":10,3:12,"3.5":14,4:16,5:20,6:24,7:28,8:32,10:40,12:48},hm=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?fm[o[1]]:void 0},Kt=jt.forwardRef(({name:t,size:o,title:r,className:n,style:a,strokeWidth:i,fill:s,...c},p)=>{let u=c["aria-label"]??r,d=gm(o??hm(n)??"1em"),f={fontFamily:"SAP-icons",fontSize:d,fontStyle:"normal",fontWeight:"normal",lineHeight:1,width:d,height:d,display:"inline-flex",alignItems:"center",justifyContent:"center",flex:"0 0 auto",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...a};return e("span",{ref:p,role:u?"img":void 0,"aria-hidden":u?void 0:true,title:r,className:n,"data-sap-icon":t,style:f,...c,children:String.fromCodePoint(mm[t])})});Kt.displayName="SapIcon";var re=(t,o)=>{let r=jt.forwardRef((n,a)=>e(Kt,{ref:a,name:t,...n}));return r.displayName=o??`SapIcon(${t})`,r};var wl=re("activity","Activity"),kl=re("error","AlertCircle"),Tl=re("warning","AlertTriangle"),Iv=re("down","ArrowDown"),Rv=re("navigationRight","ArrowRight"),Mv=re("up","ArrowUp"),ji=re("barChart","BarChart"),Dv=re("activate","Bot"),Ji=re("calendar","Calendar"),Av=Ji,Nv=re("camera","Camera"),Ev=re("lineChart","ChartNoAxesCombined"),ra=re("accept","Check"),na=re("accept","CheckCircle"),Tr=re("slimDown","ChevronDown"),Pl=re("navigationLeft","ChevronLeft"),Lo=re("navigationRight","ChevronRight"),Lv=re("slimUp","ChevronUp"),Fv=re("expandAll","ChevronsDown"),Ov=re("collapseAll","ChevronsUp"),aa=re("error","CircleAlert"),yn=re("accept","CircleCheck"),Bv=yn,zv=re("stop","CircleStop"),Il=re("copy","Clipboard"),Vv=re("checklist","ClipboardCheck"),Hv=re("checklist","ClipboardList"),Rl=re("time","Clock"),Wv=re("tableColumn","Columns3"),ia=re("copy","Copy"),$v=re("duplicate","CopyPlus"),Gv=re("delete","Delete"),Uv=re("download","Download"),_v=re("edit","Edit"),Kv=re("fullScreen","Expand"),qv=re("show","Eye"),Xv=re("hide","EyeOff"),Zv=re("document","File"),Ml=re("document","FileText"),Yv=re("filter","Filter"),vn=re("tree","FolderTree"),Dl=re("process","GitBranch"),xn=re("world","Globe"),Al=re("grid","Grid"),Qv=re("move","GripVertical"),jv=re("wrench","Hammer"),Jv=re("picture","Image"),sa=re("information","Info"),ex=re("translate","Languages"),tx=re("dimension","Layers"),ox=re("home","LayoutDashboard"),la=re("lightbulb","Lightbulb"),Nl=re("lineChart","LineChart"),El=re("synchronize","Loader2"),ca=re("locked","Lock"),rx=ca,Ll=re("log","LogOut"),es=re("email","Mail"),Fl=re("map","MapPin"),nx=re("menu","Menu"),bm=re("message","MessageCircle"),ax=bm,da=re("microphone","Mic"),ix=re("microphone","MicOff"),Ol=re("darkMode","Moon"),sx=re("overflow","MoreHorizontal"),lx=re("accept","PackageCheck"),cx=re("product","PackageSearch"),pa=re("splitOne","PanelLeftOpen"),ua=re("splitTwo","PanelRight"),dx=re("overview","PanelsTopLeft"),Bl=re("pieChart","PieChart"),Gr=re("pushpin","Pin"),px=re("play","Play"),zl=re("add","Plus"),ux=re("qrCode","QrCode"),mx=re("receipt","ReceiptText"),ma=re("refresh","RefreshCw"),gx=re("activate","Rocket"),fx=re("refresh","RotateCcw"),Vl=re("refresh","RotateCw"),hx=re("tableRow","Rows3"),bx=re("save","Save"),yx=re("qrCode","ScanLine"),Qo=re("search","Search"),ym=re("paperPlane","Send"),Hl=ym,ga=re("wrench","Settings"),vx=re("accept","ShieldCheck"),xx=re("sum","Sigma"),Cx=re("sort","SortAsc"),Sx=re("splitTwo","SquareSplitHorizontal"),wx=re("favorite","Star"),Wl=re("lightMode","Sun"),kx=re("table","Table2"),Tx=re("ipad","TabletSmartphone"),ts=re("command","Terminal"),$l=re("thumbDown","ThumbsDown"),Gl=re("thumbUp","ThumbsUp"),Ul=re("delete","Trash2"),Px=re("tree","TreePine"),_l=re("trendDown","TrendingDown"),fa=re("warning","TriangleAlert"),Ix=re("shipping","Truck"),Kl=re("upload","UploadCloud"),os=re("employee","User"),ql=re("sound","Volume2"),Rx=re("factory","Warehouse"),Mx=re("process","Workflow"),yo=re("decline","X"),ha=re("error","XCircle");Wt();w();var xm={contained:"primary",outlined:"secondary",text:"ghost"},Cm={small:"orb-btn-sm",medium:void 0,large:"orb-btn-lg"},we=jt.forwardRef(({variant:t="primary",size:o="medium",block:r=false,loading:n=false,startIcon:a,endIcon:i,component:s,href:c,sx:p,className:u,children:d,disabled:f,type:h="button",...m},y)=>{let v=xm[t]??t,g=["orb-btn",`orb-btn-${v}`,Cm[o],r?"orb-btn-block":void 0,n?"orb-is-loading":void 0,u].filter(Boolean).join(" "),S=Ue(p,g),b=s??(c?"a":"button");return l(b,{ref:y,type:b==="button"?h:void 0,href:c,className:S.className,style:S.style,disabled:b==="button"?f||n:void 0,"aria-disabled":b!=="button"&&(f||n)?true:void 0,...m,children:[n&&e("span",{className:`orb-spin ${v==="primary"?"orb-spin-light":""}`,"aria-hidden":true}),!n&&a,d,!n&&i]})});we.displayName="CButton";Wt();w();var He=jt.forwardRef(({label:t,value:o,defaultValue:r,onChange:n,onFocus:a,onBlur:i,onKeyDown:s,type:c="text",placeholder:p,disabled:u,readOnly:d,required:f,autoFocus:h,autoComplete:m,name:y,id:v,error:g,helperText:S,dense:b=false,size:C,fullWidth:k=true,select:x=false,multiline:E=false,rows:M,children:I,variant:N,margin:A,onClick:T,startAdornment:D,endAdornment:R,InputProps:F,inputProps:z,InputLabelProps:Z,SelectProps:B,sx:_,className:V},K)=>{let Y=jt.useId(),G=v??`orb-tf-${Y}`,Q=D??F?.startAdornment,ne=R??F?.endAdornment,le=(typeof g=="string"?g:void 0)??S,Ie={id:G,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:p,disabled:u,required:f,autoFocus:h,autoComplete:m,name:y,onClick:T,"aria-invalid":!!g},nt=x?e("select",{...Ie,ref:K,onChange:n,children:I}):E?e("textarea",{...Ie,ref:K,onChange:n,rows:M,readOnly:d||F?.readOnly}):e("input",{...Ie,ref:K,onChange:n,type:c,readOnly:d||F?.readOnly,...z}),Xe=Ue(_,`orb-fld ${g?"orb-is-error":""} ${V??""}`,{width:k?"100%":void 0});return l("div",{className:Xe.className,style:Xe.style,children:[t&&e("label",{htmlFor:G,children:t}),Q||ne?l("div",{className:"orb-inp-adornment-wrap",children:[Q&&e("span",{className:"orb-inp-adornment",children:Q}),ne&&e("span",{className:"orb-inp-adornment orb-inp-adornment-end",children:ne}),nt]}):nt,le&&e("span",{className:"orb-fld-msg",children:le})]})});He.displayName="CTextField";Wt();w();var Cn=jt.forwardRef(({label:t,value:o,defaultValue:r,onChange:n,placeholder:a,disabled:i,readOnly:s,rows:c,minRows:p=3,multiline:u,error:d,helperText:f,fullWidth:h=true,name:m,id:y,inputProps:v,sx:g,className:S},b)=>{let C=jt.useId(),k=y??`orb-ta-${C}`,E=(typeof d=="string"?d:void 0)??f,M=Ue(g,`orb-fld ${d?"orb-is-error":""} ${S??""}`,{width:h?"100%":void 0});return l("div",{className:M.className,style:M.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:c??p,name:m,"aria-invalid":!!d,...v}),E&&e("span",{className:"orb-fld-msg",children:E})]})});Cn.displayName="CTextArea";Wt();w();var Ut=jt.forwardRef(({label:t,options:o,children:r,value:n,defaultValue:a,onChange:i,disabled:s,size:c,dense:p=true,fullWidth:u=true,minWidth:d,placeholder:f,displayEmpty:h,renderValue:m,multiple:y,MenuProps:v,variant:g,disableUnderline:S,onClick:b,onMouseDown:C,error:k,helperText:x,name:E,id:M,"aria-label":I,sx:N,className:A},T)=>{let D=jt.useId(),R=M??`orb-sel-${D}`,z=(typeof k=="string"?k:void 0)??x,Z=jt.useRef(null),B=jt.useRef(null),[_,V]=jt.useState(false),[K,Y]=jt.useState(180),[G,Q]=jt.useState(a??"");jt.useImperativeHandle(T,()=>Z.current);let ne=jt.useMemo(()=>jt.Children.toArray(r).flatMap(xe=>{if(!jt.isValidElement(xe)||xe.type!=="option")return [];let ye=xe;return [{value:Array.isArray(ye.props.value)?ye.props.value[0]??"":ye.props.value??"",label:ye.props.children,disabled:ye.props.disabled}]}),[r]),be=o??ne,le=n??G,me=Array.isArray(le)?le[0]??"":le,Ie=String(me??""),nt=be.find(xe=>String(xe.value)===Ie),Xe=m?m(le):nt?.label??(Ie||(f??"")),De=Ue(N,`orb-fld ${k?"orb-is-error":""} ${A??""}`,{width:u?"100%":void 0,minWidth:typeof d=="number"?`${d}px`:d});if(y)return l("div",{className:De.className,style:De.style,children:[t&&e("label",{htmlFor:R,children:t}),l("select",{ref:T,id:R,className:`orb-inp ${p||c==="small"?"orb-inp-dense":""}`,value:n,defaultValue:a,onChange:i,disabled:s,name:E,multiple:true,onClick:b,onMouseDown:C,"aria-invalid":!!k,"aria-label":I,children:[f!==void 0&&e("option",{value:"",children:f}),o?o.map(xe=>e("option",{value:xe.value,disabled:xe.disabled,children:xe.label},xe.value)):r]}),z&&e("span",{className:"orb-fld-msg",children:z})]});let Ge=xe=>{n===void 0&&Q(xe);let ye=Z.current;ye&&(Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,"value")?.set?.call(ye,xe),i?.({target:ye,currentTarget:ye}));};return l("div",{className:De.className,style:De.style,children:[t&&e("label",{htmlFor:R,children:t}),e("select",{ref:Z,className:"orb-visually-hidden",tabIndex:-1,"aria-hidden":"true",name:E,value:Ie,disabled:s,onChange:()=>{},children:be.map(xe=>e("option",{value:xe.value,disabled:xe.disabled,children:xe.label},String(xe.value)))}),l(Mo__namespace.Root,{open:_,onOpenChange:xe=>{xe&&Y(B.current?.getBoundingClientRect().width??180),V(xe);},children:[e(Mo__namespace.Trigger,{asChild:true,children:l("button",{ref:B,id:R,type:"button",className:`orb-inp orb-select-trigger ${p||c==="small"?"orb-inp-dense":""}`,disabled:s,"aria-invalid":!!k,"aria-label":I,"aria-haspopup":"listbox","data-placeholder":!nt&&!Ie?"":void 0,onClick:b,onMouseDown:C,children:[e("span",{className:"orb-select-value",children:Xe}),e(Kt,{className:"orb-select-chevron",name:"slimDown",size:12})]})}),e(Mo__namespace.Portal,{children:e(Mo__namespace.Content,{className:"orb-pop orb-select-menu",align:"start",sideOffset:5,collisionPadding:8,style:{minWidth:K},children:e(Mo__namespace.RadioGroup,{value:Ie,onValueChange:Ge,children:be.map(xe=>l(Mo__namespace.RadioItem,{className:"orb-select-option",value:String(xe.value),disabled:xe.disabled,children:[e("span",{className:"orb-select-check","aria-hidden":"true",children:String(xe.value)===Ie?e(Kt,{name:"accept",size:13}):null}),e("span",{children:xe.label})]},String(xe.value)))})})})]}),z&&e("span",{className:"orb-fld-msg",children:z})]})});Ut.displayName="CSelect";Wt();w();var Mt=jt.forwardRef(({label:t,checked:o,defaultChecked:r,onChange:n,disabled:a,indeterminate:i,name:s,value:c,id:p,size:u,color:d,onClick:f,inputProps:h,sx:m,className:y},v)=>{let g=Ue([{...u==="small"?{fontSize:13}:void 0,...d?{color:d}:void 0},...Array.isArray(m)?m:m?[m]:[]],`orb-chk ${y??""}`),S=e("input",{ref:b=>{b&&(b.indeterminate=!!i),typeof v=="function"?v(b):v&&(v.current=b);},type:"checkbox",id:p,checked:o,defaultChecked:r,onChange:n,readOnly:o!==void 0&&n===void 0,disabled:a,name:s,value:c,onClick:f,...h});return t==null?e("span",{className:g.className,style:g.style,children:S}):l("label",{className:g.className,style:g.style,children:[S,e("span",{children:t})]})});Mt.displayName="CCheckbox";w();var Lm=({label:t,options:o,value:r,defaultValue:n,onChange:a,name:i,row:s=false,disabled:c,sx:p,className:u})=>{let d=jt.useId(),f=i??`orb-rdo-${d}`;return l("div",{className:`orb-fld ${u??""}`,style:p,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=>l("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?m=>a(m,h.value):void 0,disabled:c||h.disabled}),e("span",{children:h.label})]},h.value))})]})};Wt();w();var ba=jt.forwardRef(({label:t,checked:o,defaultChecked:r,onChange:n,disabled:a,name:i,id:s,size:c,sx:p,className:u},d)=>{let f=Ue([{...c==="small"?{transform:"scale(.86)",transformOrigin:"center"}:void 0},...Array.isArray(p)?p:p?[p]:[]],`orb-sw ${u??""}`),h=e("input",{ref:d,type:"checkbox",role:"switch",id:s,checked:o,defaultChecked:r,onChange:n?m=>n(m,m.target.checked):void 0,disabled:a,name:i});return t==null?e("span",{className:f.className,style:f.style,children:h}):l("label",{className:f.className,style:f.style,children:[h,e("span",{children:t})]})});ba.displayName="CSwitch";Wt();w();var Bm={default:"gray",primary:"blue",success:"blue",info:"blue",warning:"orange",error:"orange"},Tt=jt.forwardRef(({label:t,children:o,tone:r,color:n="default",variant:a,size:i="medium",clickable:s,avatar:c,icon:p,onDelete:u,onClick:d,sx:f,className:h},m)=>{let y=r??(a==="outlined"&&n==="default"?"outline":Bm[n]??"gray"),v=s??!!d,g=Ue([{cursor:v?"pointer":void 0,...i==="small"?{height:24,fontSize:11,px:1}:void 0},...Array.isArray(f)?f:f?[f]:[]],`orb-chip orb-chip-${y} ${h??""}`);return l("span",{ref:m,className:g.className,style:g.style,onClick:d,role:v?"button":void 0,tabIndex:v?0:void 0,onKeyDown:v?S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),d?.(S));}:void 0,children:[c??p,e("span",{className:"orb-chip-label",children:o??t}),u&&e("button",{type:"button","aria-label":"Remove",onClick:S=>{S.stopPropagation(),u(S);},style:{background:"none",border:"none",padding:0,display:"inline-flex",cursor:"pointer",color:"inherit"},children:e(yo,{size:13,strokeWidth:2})})]})});Tt.displayName="CChip";Wt();w();var ya=jt.forwardRef(({badgeContent:t,color:o="primary",children:r,invisible:n=false,sx:a,className:i},s)=>{let c=Ue(a,i,{display:"inline-flex",position:r?"relative":void 0}),p=!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?l("span",{ref:s,className:c.className,style:c.style,children:[r,p]}):e("span",{ref:s,className:c.className,style:c.style,children:p})});ya.displayName="CBadge";Wt();w();var Ur=jt.forwardRef(({children:t,src:o,alt:r,size:n=28,sx:a,className:i},s)=>{let c=Ue([{width:n,height:n,fontSize:n*.4},...Array.isArray(a)?a:a?[a]:[]],`orb-avatar ${i??""}`);return e("span",{ref:s,className:c.className,style:c.style,children:o?e("img",{src:o,alt:r??"",style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"cover"}}):t})});Ur.displayName="CAvatar";Wt();w();var _r=jt.forwardRef(({severity:t="info",title:o,children:r,onClose:n,sx:a,className:i},s)=>{let c=Ue(a,`orb-alert orb-alert-${t} ${i??""}`);return l("div",{ref:s,role:"alert",className:c.className,style:c.style,children:[l("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"})]})});_r.displayName="CAlert";Wt();w();var Sn=({value:t,variant:o,color:r,sx:n,className:a})=>{let i=o==="indeterminate"||t===void 0,s=Ue(n,`orb-prog ${a??""}`);return l("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%; } }"})]})},Wm=({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}}),sr=({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"});w();var st=({title:t,children:o,enterDelay:r=300,side:n="top",align:a="center",disabled:i})=>!t||i?e(jsxRuntime.Fragment,{children:o}):e(Wo__namespace.Provider,{delayDuration:r,skipDelayDuration:200,children:l(Wo__namespace.Root,{children:[e(Wo__namespace.Trigger,{asChild:true,children:o}),e(Wo__namespace.Portal,{children:e(Wo__namespace.Content,{className:"orb-tooltip",side:n,align:a,sideOffset:6,children:t})})]})});Wt();w();var ie=jt.forwardRef(({tooltip:t,size:o="small",active:r=false,edge:n,color:a,sx:i,className:s,children:c,type:p="button",...u},d)=>{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:d,type:p,className:f.className,style:f.style,...u,children:c});return t?e(st,{title:t,children:h}):h});ie.displayName="CIconButton";Wt();w();var wn=({value:t,options:o,onValueChange:r,size:n="medium",sx:a,className:i,...s})=>{let c=jt.useRef([]),p=o.findIndex(m=>!m.disabled),u=o.findIndex(m=>m.value===t),d=(m,y)=>{let v=o.map((b,C)=>b.disabled?-1:C).filter(b=>b>=0);if(v.length===0)return;let g=v.indexOf(y),S;m.key==="Home"&&(S=v[0]),m.key==="End"&&(S=v[v.length-1]),(m.key==="ArrowRight"||m.key==="ArrowDown")&&(S=v[(g+1+v.length)%v.length]),(m.key==="ArrowLeft"||m.key==="ArrowUp")&&(S=v[(g-1+v.length)%v.length]),S!==void 0&&(m.preventDefault(),c.current[S]?.focus(),r(o[S].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(u,0)};return l("div",{role:"radiogroup",className:f.className,style:h,"data-has-selection":u>=0?"true":"false",...s,children:[e("span",{className:"orb-segmented-control-thumb","aria-hidden":"true"}),o.map((m,y)=>{let v=m.value===t;return e(ie,{ref:g=>{c.current[y]=g;},className:["orb-segmented-control-item",m.icon?"":"orb-segmented-control-item-label"].filter(Boolean).join(" "),size:n,tooltip:m.label,role:"radio","aria-label":m.label,"aria-checked":v,"data-selected":v?"true":void 0,disabled:m.disabled,tabIndex:v||t==null&&y===p?0:-1,onClick:()=>r(m.value),onKeyDown:g=>d(g,y),children:m.icon??e("span",{className:"orb-segmented-control-label",children:m.label})},m.value)})]})};Wt();w();var Yt=({triggerLabel:t,items:o=[],trigger:r,align:n="start",anchorEl:a,open:i,onClose:s,children:c,slotProps:p,PaperProps:u,anchorPosition:d,sx:f})=>{let h=jt.useRef(null);if(jt.useEffect(()=>{if(i!==true)return;let m=v=>{let g=v.composedPath();h.current&&g.includes(h.current)||a&&g.includes(a)||s?.();},y=v=>{v.key==="Escape"&&s?.();};return document.addEventListener("pointerdown",m,true),document.addEventListener("keydown",y,true),()=>{document.removeEventListener("pointerdown",m,true),document.removeEventListener("keydown",y,true);}},[a,s,i]),i!==void 0){if(!i||typeof document>"u")return null;let m=a?.getBoundingClientRect(),y=window.innerWidth,v=m?.left??16,g=m?.right??v,S=p?.paper?.sx??u?.sx,b=Ue([...Array.isArray(S)?S:S?[S]:[],...Array.isArray(f)?f:f?[f]:[]],"orb-pop orb-menu",p?.paper?.style??u?.style),C=jt.Children.map(c,k=>{if(!jt.isValidElement(k)||k.type!=="option")return k;let x=k.props,{children:E,disabled:M,selected:I}=x,N=Ue(x.sx,`orb-menu-item ${I?"orb-selected":""} ${x.className??""}`,x.style);return e("div",{role:"menuitem","aria-disabled":M||void 0,"aria-selected":I||void 0,tabIndex:M?-1:0,id:x.id,title:x.title,className:N.className,style:N.style,onClick:M?void 0:x.onClick,onKeyDown:A=>{!M&&(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),x.onClick?.(A));},children:E})});return reactDom.createPortal(e("div",{ref:h,role:"menu",className:b.className,style:{...b.style,position:"fixed",left:n==="end"&&!d?void 0:d?.left??v,right:n==="end"&&!d?Math.max(16,y-g):void 0,top:d?.top??(m?.bottom??16)+6,maxWidth:"calc(100vw - 32px)",zIndex:1301},children:C}),document.body)}return l(Mo__namespace.Root,{children:[e(Mo__namespace.Trigger,{asChild:true,children:r??e(we,{variant:"primary",children:t})}),e(Mo__namespace.Portal,{children:e(Mo__namespace.Content,{className:"orb-pop orb-menu",align:n,sideOffset:6,children:o.map((m,y)=>l(Mo__namespace.Item,{className:"orb-menu-item",disabled:m.disabled,onSelect:()=>m.onClick?.(),children:[m.icon,m.label]},y))})})]})};Wt();w();var Le=jt.forwardRef(({elevation:t=1,variant:o,component:r,sx:n,style:a,className:i,children:s,...c},p)=>{let u=r??"div",d=Ue(n,`orb-card ${t>0&&o!=="outlined"?"orb-card-raised":""} ${i??""}`,a);return e(u,{ref:p,className:d.className,style:d.style,...c,children:s})});Le.displayName="CPaper";Wt();w();var At=jt.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})});At.displayName="CDivider";Wt();w();var jm={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"},Jm={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6"},L=jt.forwardRef(({variant:t="body1",component:o,muted:r=false,numeric:n=false,color:a,noWrap:i=false,fontWeight:s,sx:c,className:p,children:u,...d},f)=>{let h=o??Jm[t]??"span",y=[t==="inherit"?void 0:jm[t],p].filter(Boolean).join(" "),v=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(c)?c:c?[c]:[]],y);return e(h,{ref:f,className:v.className,style:v.style,...d,children:u})});L.displayName="CTypography";Wt();w();var tg=t=>{if(t!==void 0)return typeof t=="number"?`${t*8}px`:t},ae=jt.forwardRef(({direction:t="column",spacing:o,alignItems:r,justifyContent:n,flexWrap:a,flex:i,useFlexGap:s,sx:c,className:p,children:u,...d},f)=>{let h=Ue([{display:"flex",flexDirection:t,gap:tg(o),alignItems:r,justifyContent:n,flexWrap:a,flex:i},...Array.isArray(c)?c:c?[c]:[]],p);return e("div",{ref:f,className:h.className,style:h.style,...d,children:u})});ae.displayName="CStack";Wt();w();var Ft=({open:t,onClose:o,title:r,children:n,actions:a,maxWidth:i=560,fullWidth:s=false,fullScreen:c=false,PaperProps:p,slotProps:u,disableRestoreFocus:d,keepMounted:f,hideCloseButton:h=false,sx:m,className:y})=>{let v=Ue([{width:c?"100vw":s?"min(920px, calc(100vw - 32px))":void 0,height:c?"100vh":void 0,maxWidth:c?"none":typeof i=="number"?`${i}px`:i},...Array.isArray(p?.sx??u?.paper?.sx)?p?.sx??u?.paper?.sx:p?.sx??u?.paper?.sx?[p?.sx??u?.paper?.sx]:[],...Array.isArray(m)?m:m?[m]:[]],`orb-dialog ${y??""}`);return e(Co__namespace.Root,{open:t,onOpenChange:g=>{g||o?.();},children:l(Co__namespace.Portal,{children:[e(Co__namespace.Overlay,{className:"orb-overlay"}),l(Co__namespace.Content,{className:v.className,style:v.style,children:[(r||!h)&&l("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:16},children:[r?e(Co__namespace.Title,{className:"orb-dialog-title",children:r}):e(Co__namespace.Title,{className:"orb-visually-hidden",children:"Dialog"}),!h&&e(Co__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(yo,{size:16,strokeWidth:2})})})]}),e("div",{style:{minWidth:0},children:n}),a&&e("div",{className:"orb-dialog-actions",children:a})]})]})})};w();var ns=({open:t,defaultOpen:o,onOpenChange:r,trigger:n,children:a,align:i="start",side:s="bottom",sideOffset:c=6,matchTriggerWidth:p=false,sx:u,className:d})=>l(lr__namespace.Root,{open:t,defaultOpen:o,onOpenChange:r,children:[e(lr__namespace.Trigger,{asChild:true,children:n}),e(lr__namespace.Portal,{children:e(lr__namespace.Content,{className:`orb-pop ${d??""}`,align:i,side:s,sideOffset:c,style:{minWidth:p?"var(--radix-popover-trigger-width)":void 0,...u},onOpenAutoFocus:f=>f.preventDefault(),children:a})})]});w();var ng=({items:t,value:o,defaultValue:r,onChange:n,sx:a,className:i})=>{let s=o!==void 0,[c,p]=jt.useState(r??t[0]?.value),u=s?o:c,d=jt.useRef([]),f=m=>{s||p(m),n?.(m);},h=m=>{if(m.key!=="ArrowRight"&&m.key!=="ArrowLeft")return;m.preventDefault();let y=t.filter(b=>!b.disabled),v=y.findIndex(b=>b.value===u),g=m.key==="ArrowRight"?1:-1,S=y[(v+g+y.length)%y.length];if(S){f(S.value);let b=t.findIndex(C=>C.value===S.value);d.current[b]?.focus();}};return e("div",{className:`orb-tabs ${i??""}`,role:"tablist",style:a,onKeyDown:h,children:t.map((m,y)=>{let v=m.value===u;return l("button",{ref:g=>{d.current[y]=g;},type:"button",role:"tab","aria-selected":v,disabled:m.disabled,className:`orb-tab ${v?"orb-is-active":""}`,style:{display:"inline-flex",alignItems:"center",gap:6},onClick:()=>f(m.value),children:[m.icon,m.label]},m.value)})})};w();var ig=["su","mo","tu","we","th","fr","sa"],kn=(t,o)=>!!(t&&o&&t.isSame(o,"day")),Tn=({value:t,rangeStart:o,rangeEnd:r,onChange:n,month:a,defaultMonth:i,onMonthChange:s,minDate:c,maxDate:p,locale:u,renderDay:d})=>{let f=a!==void 0,[h,m]=jt.useState(()=>i??t??o??Xo__default.default()),y=(f?a:h).startOf("month"),v=x=>{f||m(x),s?.(x);},g=jt.useMemo(()=>u?y.locale(u):y,[y,u]),S=jt.useMemo(()=>{let E=y.startOf("month").startOf("week"),M=[],I=E;for(let N=0;N<6;N+=1){let A=[];for(let T=0;T<7;T+=1)A.push(I),I=I.add(1,"day");if(M.push(A),I.isAfter(y.endOf("month"))&&N>=3)break}return M},[y]),b=jt.useMemo(()=>{let x=u?Xo__default.default().locale(u):Xo__default.default();return ig.map((E,M)=>x.startOf("week").add(M,"day").format("dd"))},[u]),C=x=>!!(c&&x.isBefore(c.startOf("day"))||p&&x.isAfter(p.startOf("day"))),k=o!==void 0||r!==void 0;return l("div",{className:"orb-cal",children:[l("div",{className:"orb-cal-head",children:[e("button",{type:"button",className:"orb-icon-btn orb-icon-btn-sm","aria-label":"Previous month",onClick:()=>v(y.subtract(1,"month")),children:e(Pl,{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:()=>v(y.add(1,"month")),children:e(Lo,{size:16,strokeWidth:2})})]}),l("div",{className:"orb-cal-grid",role:"grid",children:[b.map((x,E)=>e("span",{className:"orb-cal-dow",children:x},`${x}-${E}`)),S.flat().map(x=>{let E=!x.isSame(y,"month"),M=C(x),I=k?kn(x,o)||kn(x,r):kn(x,t),N=x.isSame(Xo__default.default(),"day"),A=k&&o&&r&&x.isAfter(o.startOf("day"))&&x.isBefore(r.startOf("day")),T=k&&kn(x,o)&&!!r,D=k&&kn(x,r)&&!!o,R=["orb-cal-day",E?"orb-is-outside":void 0,N?"orb-is-today":void 0,I?"orb-is-selected":void 0,A?"orb-is-in-range":void 0,T?"orb-is-range-start":void 0,D?"orb-is-range-end":void 0].filter(Boolean).join(" ");return d?e("span",{className:"orb-cal-day-slot",children:d(x,{outsideCurrentMonth:E,selected:I,today:N,disabled:M})},x.format("YYYY-MM-DD")):e("button",{type:"button",role:"gridcell","aria-selected":I,"aria-current":N?"date":void 0,className:R,disabled:M,onClick:()=>n?.(x),children:x.date()},x.format("YYYY-MM-DD"))})]})]})};w();Xo__default.default.extend(sg__default.default);var lg=({label:t,value:o,defaultValue:r,onChange:n,minDate:a,maxDate:i,disabled:s,format:c="YYYY-MM-DD",placeholder:p,locale:u,dense:d=false,error:f,helperText:h,sx:m,className:y})=>{let v=o!==void 0,[g,S]=jt.useState(r??null),b=v?o:g,[C,k]=jt.useState(false),[x,E]=jt.useState(null),M=D=>{v||S(D),n?.(D);},I=x??(b?(u?b.locale(u):b).format(c):""),N=()=>{if(x===null)return;let D=x.trim();if(!D)M(null);else {let R=Xo__default.default(D,c,true);R.isValid()&&!(a&&R.isBefore(a.startOf("day")))&&!(i&&R.isAfter(i.startOf("day")))&&M(R);}E(null);},T=(typeof f=="string"?f:void 0)??h;return l("div",{className:`orb-fld ${f?"orb-is-error":""} ${y??""}`,style:m,children:[t&&e("label",{children:t}),e(ns,{open:C,onOpenChange:k,trigger:l("div",{className:"orb-inp-adornment-wrap",style:{width:"100%"},children:[e("span",{className:"orb-inp-adornment",children:e(Ji,{size:15,strokeWidth:1.8})}),e("input",{className:`orb-inp ${d?"orb-inp-dense":""}`,value:I,placeholder:p??c,disabled:s,onFocus:()=>k(true),onChange:D=>E(D.target.value),onBlur:N,onKeyDown:D=>{D.key==="Enter"&&(N(),k(false)),D.key==="Escape"&&k(false);}})]}),children:e(Tn,{value:b,onChange:D=>{M(D),E(null),k(false);},minDate:a,maxDate:i,locale:u,defaultMonth:b??void 0})}),T&&e("span",{className:"orb-fld-msg",children:T})]})};w();var dg=({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[c,p]=jt.useState(false),[u,d]=jt.useState([]),f=jt.useRef(null),h=b=>{b.preventDefault(),p(true);},m=b=>{b.preventDefault(),p(false);},y=b=>{b.preventDefault(),p(false),g(Array.from(b.dataTransfer.files));},v=b=>{b.target.files&&g(Array.from(b.target.files));},g=b=>{let C=n?b.filter(x=>x.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?[...u,...C]:C;o&&(k=k.filter((x,E,M)=>E===M.findIndex(I=>I.name===x.name&&I.size===x.size&&I.lastModified===x.lastModified))),d(k),t?.(k),f.current&&(f.current.value="");},S=b=>{let C=u.filter((k,x)=>x!==b);d(C),t?.(C);};return l("div",{style:{width:"100%",...s},children:[l("div",{onClick:()=>f.current?.click(),onDragOver:h,onDragLeave:m,onDrop:y,role:"button",tabIndex:0,onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),f.current?.click());},style:{border:`2px dashed ${c?"var(--orb-primary)":"var(--orb-border)"}`,borderRadius:"var(--orb-r)",padding:32,textAlign:"center",cursor:"pointer",backgroundColor:c?"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:v}),l("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"center"},children:[e(Kl,{size:40,strokeWidth:1.5,color:c?"var(--orb-primary)":"var(--orb-muted)"}),e("span",{className:"orb-subtitle",children:a}),e("span",{className:"orb-meta",children:i})]})]}),u.length>0&&e("div",{style:{display:"flex",flexDirection:"column",gap:8,marginTop:16},children:u.map((b,C)=>l("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:[l("div",{style:{display:"flex",alignItems:"center",gap:8,overflow:"hidden"},children:[e(Ml,{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}),l("span",{className:"orb-meta",children:["(",(b.size/1024).toFixed(1)," KB)"]})]}),e(ie,{"aria-label":`Remove ${b.name}`,onClick:()=>S(C),children:e(Ul,{size:15,strokeWidth:1.8})})]},`${b.name}-${C}`))})]})};function go(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var ss={primary:"#000000",primaryHover:"#333333"},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"},Pn={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",full:"rounded-full"},Ql=()=>"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";w();var fg=classVarianceAuthority.cva(Ql(),{variants:{variant:{default:`${xa.primary} shadow-sm`,destructive:"bg-red-500 text-white hover:bg-red-600 active:bg-red-700 dark:bg-red-600 dark:hover:bg-red-500 dark:active:bg-red-700 shadow-sm",outline:`${xa.outline} shadow-sm`,secondary:"bg-gray-200 text-gray-700 hover:bg-gray-300 active:bg-gray-400 dark:bg-gray-700 dark:text-gray-200 dark:hover:bg-gray-600 dark:active:bg-gray-500 shadow-sm",ghost:xa.ghost,link:"text-blue-600 dark:text-blue-400 underline-offset-4 hover:underline hover:text-blue-700 dark:hover:text-blue-300 active:text-blue-800 dark:active:text-blue-200","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-[${ss.primary}] hover:bg-[${ss.primaryHover}] text-white 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-red-500 hover:bg-red-600 border border-[var(--orbai-border-strong)] shadow-[var(--orbai-shadow-soft-sm)] hover:shadow-[var(--orbai-shadow-soft-md)] active:scale-95 text-white 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:Pn.none,sm:Pn.sm,md:Pn.md,full:Pn.full}},defaultVariants:{variant:"default",size:"default",rounded:"md"}}),ls=jt__namespace.forwardRef(({className:t,variant:o,size:r,asChild:n=false,...a},i)=>e(n?reactSlot.Slot:"button",{className:go(fg({variant:o,size:r,className:t})),ref:i,...a}));ls.displayName="Button";var hg={"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.searchSend":"Send","header.searchStartVoice":"Start voice input","header.searchStopVoice":"Stop voice input","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.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?","messageBox.confirm":"OK","messageBox.cancel":"Cancel"},bg={"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.searchSend":"\u53D1\u9001","header.searchStartVoice":"\u5F00\u59CB\u8BED\u97F3\u8F93\u5165","header.searchStopVoice":"\u505C\u6B62\u8BED\u97F3\u8F93\u5165","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.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","messageBox.confirm":"\u786E\u5B9A","messageBox.cancel":"\u53D6\u6D88"},yg={"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.searchSend":"Envoyer","header.searchStartVoice":"D\xE9marrer la saisie vocale","header.searchStopVoice":"Arr\xEAter la saisie vocale","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.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 ?","messageBox.confirm":"OK","messageBox.cancel":"Annuler"},vg={"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.searchSend":"Senden","header.searchStartVoice":"Spracheingabe starten","header.searchStopVoice":"Spracheingabe stoppen","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.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?","messageBox.confirm":"OK","messageBox.cancel":"Abbrechen"},xg={"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.searchSend":"\u9001\u4FE1","header.searchStartVoice":"\u97F3\u58F0\u5165\u529B\u3092\u958B\u59CB","header.searchStopVoice":"\u97F3\u58F0\u5165\u529B\u3092\u505C\u6B62","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.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","messageBox.confirm":"OK","messageBox.cancel":"\u30AD\u30E3\u30F3\u30BB\u30EB"},Cg={"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.searchSend":"\uBCF4\uB0B4\uAE30","header.searchStartVoice":"\uC74C\uC131 \uC785\uB825 \uC2DC\uC791","header.searchStopVoice":"\uC74C\uC131 \uC785\uB825 \uC911\uC9C0","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.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?","messageBox.confirm":"\uD655\uC778","messageBox.cancel":"\uCDE8\uC18C"},In={en:hg,zh:bg,fr:yg,de:vg,ja:xg,ko:Cg};w();var Jl=(t,o)=>o?t.replace(/\{(\w+)\}/g,(r,n)=>{let a=o[n];return a==null?"":String(a)}):t,Tg={locale:"en",t:(t,o)=>Jl(In.en[t]||t,o)},ec=jt.createContext(Tg),Ca=({locale:t="en",messages:o,children:r})=>{let n=jt.useMemo(()=>{let a=In[t]||In.en,i=o?.[t]||{},s={...In.en,...a,...i};return {locale:t,t:(c,p)=>Jl(s[c]||c,p)}},[t,o]);return e(ec.Provider,{value:n,children:r})},ue=()=>jt.useContext(ec);w();function Rn({items:t,onItemClick:o,className:r="",level:n=0,expandedIds:a,onToggleExpand:i,colorMode:s="light",enablePinning:c=false,pinnedIds:p,onTogglePin:u}){let{t:d}=ue(),f=s==="dark",h=navigation.usePathname(),[m,y]=jt.useState(false),[v,g]=jt.useState(new Set),S=a!==void 0&&i!==void 0,b=S?a:v;jt.useEffect(()=>{y(true);},[]);let C=x=>{if(S)i(x);else {let E=new Set(v);E.has(x)?E.delete(x):E.add(x),g(E);}},k=x=>{x.children&&x.children.length>0&&C(x.id),o&&o(x);};return !t||!Array.isArray(t)?e("div",{className:go("tree-menu",r),children:e("div",{className:"text-sm text-gray-500 p-2",children:d("navigation.noItems")})}):e("div",{className:go("tree-menu",r),children:t.map(x=>{let E=b.has(x.id)||x.isExpanded,M=x.children&&x.children.length>0,N=56+Math.max(0,n-1)*8,A=n===0?12:M?N-24:N,T=x.appurl||x.href,D=m&&T?h===T:false,R=p?.has(x.id)??false,F=c&&x.pinnable!==false&&!!T&&!M;return l("div",{className:"tree-menu-item relative",children:[D&&e("div",{className:go("absolute left-0 top-2 bottom-2 w-[3px] rounded-r-full z-10",f?"bg-[#91a8d1]":"bg-[#154194]")}),l(ls,{variant:"ghost",className:go("w-full justify-start h-auto py-2 relative overflow-hidden group",n>0?"gap-1":"gap-2",M&&E&&!D?f?"bg-white/5 text-gray-100 hover:bg-white/8":"bg-slate-50/70 text-slate-800 hover:bg-slate-100/80":"",n>=2?"min-h-9 py-1.5 rounded-md":n>0?"min-h-10 rounded-lg":"rounded-lg",D?f?"bg-transparent text-[#91a8d1] hover:bg-gray-800/35":"bg-transparent text-[#154194] hover:bg-gray-100/60":f?"hover:bg-gray-800/50 text-gray-300":"hover:bg-gray-100/50 text-gray-700"),style:{paddingLeft:`${A}px`,paddingRight:F?"34px":"10px"},onClick:()=>k(x),children:[M&&e("div",{className:go("flex-shrink-0 transition-transform duration-200",E&&"rotate-90",D?f?"text-[#91a8d1]":"text-[#154194]":f?"text-gray-500 group-hover:text-gray-300":"text-gray-400 group-hover:text-gray-600"),children:e(Lo,{className:"h-4 w-4"})}),x.icon&&e("div",{className:go("flex h-4 w-4 flex-shrink-0 items-center justify-center transition-colors duration-200",D?f?"text-[#91a8d1]":"text-[#154194]":f?"text-gray-500 group-hover:text-gray-300":"text-gray-400 group-hover:text-gray-600"),children:x.icon}),l("div",{className:"flex-1 text-left overflow-hidden z-10",children:[e("div",{className:go("text-sm truncate transition-colors duration-200",D?"font-semibold":"font-medium"),children:x.title||x.label}),x.description&&e("div",{className:go("text-xs truncate transition-colors duration-200",D?f?"text-[#91a8d1]/70":"text-[#154194]/75":f?"text-gray-400":"text-gray-500"),title:x.description,children:x.description})]})]}),F&&u&&e("button",{type:"button","aria-label":d(R?"navigation.pin.remove":"navigation.pin.add"),"aria-pressed":R,title:d(R?"navigation.pin.remove":"navigation.pin.add"),onClick:z=>{z.preventDefault(),z.stopPropagation(),u(x);},className:go("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",R&&"orb-is-pinned"),children:e(Gr,{className:go("h-3.5 w-3.5",R&&"fill-current")})}),M&&e("div",{className:go("grid transition-[grid-template-rows] duration-300 ease-in-out",E?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:e("div",{className:go("overflow-hidden",E&&"pt-1"),children:e(Rn,{items:x.children,onItemClick:o,level:n+1,expandedIds:a,onToggleExpand:i,colorMode:s,enablePinning:c,pinnedIds:p,onTogglePin:u})})})]},x.id)})})}w();var Mg="orbcafe:navigation-island:pinned-items",cs="orbcafe-navigation-pinned",Dg=t=>t.appurl||t.href,oc=t=>{let o=[];return t.forEach(r=>{let n=!!r.children?.length;r.pinnable!==false&&Dg(r)&&!n&&o.push({...r,children:void 0}),r.children?.length&&o.push(...oc(r.children));}),o},rc=({collapsed:t,onToggle:o,className:r="",maxHeight:n,menuData:a=[],colorMode:i="light",displayMode:s="fixed",onDisplayModeChange:c,showDisplayModeToggle:p=true,enablePinning:u=true,pinStorageKey:d=Mg,pinnedItemIds:f,defaultPinnedItemIds:h=[],onPinnedItemIdsChange:m,pinnedSectionTitle:y})=>{let{t:v}=ue(),g=i==="dark",S=s==="floating",b=navigation.useRouter(),[C,k]=jt.useState(""),[x,E]=jt.useState(new Set),[M,I]=jt.useState(h),[N,A]=jt.useState(false),T=f!==void 0,D=jt.useMemo(()=>f??M,[f,M]),R=jt.useMemo(()=>new Set(D),[D]);jt.useEffect(()=>{t&&E(new Set);},[t]),jt.useEffect(()=>{if(!u||T){A(true);return}try{let G=window.localStorage.getItem(d);if(G){let Q=JSON.parse(G);Array.isArray(Q)&&I(Q.filter(ne=>typeof ne=="string"));}}catch{}finally{A(true);}},[u,T,d]),jt.useEffect(()=>{if(!(!u||T||!N))try{window.localStorage.setItem(d,JSON.stringify(D));}catch{}},[D,u,T,d,N]),jt.useEffect(()=>{!u||t||D.length===0||E(G=>{if(G.has(cs))return G;let Q=new Set(G);return Q.add(cs),Q});},[t,D.length,u]);let F=jt.useCallback(G=>{let Q=Array.from(new Set(G));T||I(Q),m?.(Q);},[T,m]),z=jt.useCallback(G=>{let Q=G.id,ne=R.has(Q)?D.filter(be=>be!==Q):[...D,Q];F(ne);},[D,R,F]),Z=jt.useMemo(()=>{if(!u||D.length===0)return a;let G=new Map(oc(a).map(ne=>[ne.id,ne])),Q=D.map(ne=>G.get(ne)).filter(ne=>!!ne);return Q.length===0?a:[{id:cs,title:y||v("navigation.pinned"),icon:e(Gr,{className:"w-4 h-4"}),children:Q,pinnable:false},...a]},[D,u,a,y,v]),B=jt.useCallback(G=>{let Q=[],ne=be=>{be.forEach(le=>{Q.push(le.id),le.children&&ne(le.children);});};return ne(G),Q},[]),_=jt.useMemo(()=>{if(!C.trim())return Z;let G=Q=>Q.reduce((ne,be)=>{let le=be.title?.toLowerCase().includes(C.toLowerCase())||be.description?.toLowerCase().includes(C.toLowerCase()),me=be.children?G(be.children):[];return (le||me.length>0)&&ne.push({...be,children:me.length>0?me:be.children}),ne},[]);return G(Z)},[C,Z]),V=jt.useMemo(()=>C.trim()?new Set(B(Z)):x,[C,Z,x,B]),K=jt.useCallback(async G=>{if(console.log("\u{1F5B1}\uFE0F \u5BFC\u822A\u83DC\u5355\u9879\u70B9\u51FB:",G),G.id==="chat"||G.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(ne){console.error("\u274C \u65E0\u6CD5\u8DF3\u8F6C\u5230\u65B0\u804A\u5929\u89C6\u56FE:",ne),b.push("/chat");}return}let Q=G.appurl||G.href;Q&&(Q.startsWith("http://")||Q.startsWith("https://")?window.open(Q,"_blank"):b.push(Q));},[b]),Y=jt.useCallback(()=>{c?.(s==="fixed"?"floating":"fixed");},[s,c]);return l("div",{className:`flex flex-col backdrop-blur-xl border ${S?"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?S?"border-white/25":"bg-[#111111] border-white/10":S?"border-white/70":"bg-white/70 border-white/30"}`,style:{backdropFilter:S?"blur(34px) saturate(230%) contrast(1.12)":"blur(16px) saturate(180%)",WebkitBackdropFilter:S?"blur(34px) saturate(230%) contrast(1.12)":"blur(16px) saturate(180%)",backgroundColor:S?g?"rgba(8, 12, 18, 0.34)":"rgba(255, 255, 255, 0.24)":void 0,backgroundImage:S?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%, rgba(33,188,255,0.05))":"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%, rgba(33,188,255,0.08))":void 0,boxShadow:S?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-gray-300 hover:bg-gray-800":"text-gray-500 hover:bg-gray-50"}`,title:v("navigation.expand"),children:e(Qo,{className:"h-5 w-5"})})}):l("div",{className:`relative transition-opacity duration-300 ${t?"opacity-0":"opacity-100 delay-200"}`,children:[e("input",{type:"text",placeholder:v("navigation.searchPlaceholder"),value:C,onChange:G=>k(G.target.value),className:`w-full pl-10 pr-4 py-2 text-sm border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent ${g?"border-gray-700 bg-[#1A1A1A] text-white placeholder-gray-400":"border-gray-300 bg-white text-gray-900 placeholder-gray-500"}`}),e("div",{className:"absolute left-3 top-1/2 transform -translate-y-1/2 pointer-events-none",children:e(Qo,{className:`h-4 w-4 ${g?"text-gray-500":"text-gray-400"}`})})]})}),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:_.length===0?e("div",{className:"flex items-center justify-center py-8 text-gray-500 text-sm",children:t?e(vn,{className:"h-5 w-5"}):v(C?"navigation.noMatch":"navigation.noAccessibleApp")}):l(jsxRuntime.Fragment,{children:[!t&&e("div",{className:`transition-opacity duration-300 ${t?"opacity-0":"opacity-100 delay-200"}`,children:e(Rn,{items:_,onItemClick:K,className:"space-y-1",expandedIds:V,colorMode:i,enablePinning:u,pinnedIds:R,onTogglePin:z,onToggleExpand:G=>{let Q=new Set(x);_.some(be=>be.id===G)?Q.has(G)?Q.delete(G):(_.forEach(be=>{be.id!==G&&Q.has(be.id)&&Q.delete(be.id);}),Q.add(G)):Q.has(G)?Q.delete(G):Q.add(G),E(Q);}})}),t&&e("div",{className:"space-y-2",children:Z.map(G=>e("div",{className:"space-y-1",children:e("button",{onClick:()=>{o();let Q=new Set([G.id]);E(Q);},className:`w-full flex items-center justify-center p-2 rounded-lg cursor-pointer transition-colors duration-200 ${g?"text-gray-400 hover:bg-gray-800":"text-gray-600 hover:bg-gray-50"}`,title:v("navigation.expandView",{title:G.title||""}),children:G.icon||e("div",{className:`w-6 h-6 rounded text-xs flex items-center justify-center font-medium ${g?"bg-[#91a8d1] text-[#0b0b0b]":"bg-[#154194] text-white"}`,children:G.title?.charAt(0)||"?"})})},G.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-gray-800/50":"hover:bg-white/20"}`,title:v("navigation.collapse"),children:e("div",{className:"absolute",style:{bottom:"0px",right:"0px",width:"16px",height:"16px",overflow:"hidden"},children:e("div",{className:g?"border-yellow-400":"",style:{width:"32px",height:"32px",borderRadius:"16px",border:"3px solid #21BCFF",backgroundColor:"transparent",position:"absolute",top:"-16px",left:"-16px"}})})}),p&&t&&e("button",{type:"button",onClick:Y,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-blue-400/70 ${g?"border-slate-700 bg-slate-900 text-slate-300 hover:bg-slate-800":"border-slate-200 bg-white text-slate-600 hover:bg-blue-50 hover:text-blue-700"}`,style:{touchAction:"manipulation"},title:v(S?"navigation.mode.switchToFixed":"navigation.mode.switchToFloating"),"aria-label":v(S?"navigation.mode.switchToFixed":"navigation.mode.switchToFloating"),children:S?e(pa,{className:"h-4 w-4"}):e(ua,{className:"h-4 w-4"})})]})};w();var Ng="orbcafe:navigation-island:pinned-items",ds="orbcafe-navigation-pinned",nc=t=>t.appurl||t.href,ac=t=>t.flatMap(o=>{let r=!!o.children?.length,n=o.pinnable!==false&&nc(o)&&!r?[{...o,children:void 0}]:[];return o.children?.length?[...n,...ac(o.children)]:n}),ic=t=>t.flatMap(o=>[o.id,...o.children?ic(o.children):[]]),sc=(t,o)=>t.reduce((r,n)=>{let a=n.children?sc(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},[]),ps=({collapsed:t,onToggle:o,className:r="",maxHeight:n,menuData:a=[],colorMode:i="light",displayMode:s="fixed",onDisplayModeChange:c,showDisplayModeToggle:p=true,enablePinning:u=true,pinStorageKey:d=Ng,pinnedItemIds:f,defaultPinnedItemIds:h=[],onPinnedItemIdsChange:m,pinnedSectionTitle:y})=>{let{t:v}=ue(),g=navigation.useRouter(),S=s==="floating",[b,C]=jt.useState(""),[k,x]=jt.useState(new Set),[E,M]=jt.useState(h),[I,N]=jt.useState(false),A=f!==void 0,T=f??E,D=jt.useMemo(()=>new Set(T),[T]);jt.useEffect(()=>{t&&x(new Set);},[t]),jt.useEffect(()=>{if(!u||A){N(true);return}try{let G=window.localStorage.getItem(d);if(G){let Q=JSON.parse(G);Array.isArray(Q)&&M(Q.filter(ne=>typeof ne=="string"));}}catch{}finally{N(true);}},[u,A,d]),jt.useEffect(()=>{if(!(!u||A||!I))try{window.localStorage.setItem(d,JSON.stringify(T));}catch{}},[T,u,A,d,I]),jt.useEffect(()=>{!u||t||T.length===0||x(G=>{if(G.has(ds))return G;let Q=new Set(G);return Q.add(ds),Q});},[t,T.length,u]);let R=jt.useCallback(G=>{let Q=Array.from(new Set(G));A||M(Q),m?.(Q);},[A,m]),F=jt.useCallback(G=>{R(D.has(G.id)?T.filter(Q=>Q!==G.id):[...T,G.id]);},[T,D,R]),z=jt.useMemo(()=>{if(!u||T.length===0)return a;let G=new Map(ac(a).map(ne=>[ne.id,ne])),Q=T.map(ne=>G.get(ne)).filter(ne=>!!ne);return Q.length===0?a:[{id:ds,title:y||v("navigation.pinned"),icon:e(Gr,{className:"h-4 w-4"}),children:Q,pinnable:false},...a]},[T,u,a,y,v]),Z=b.trim().toLocaleLowerCase(),B=jt.useMemo(()=>Z?sc(z,Z):z,[z,Z]),_=jt.useMemo(()=>Z?new Set(ic(B)):k,[k,B,Z]),V=jt.useCallback(G=>{x(Q=>{let ne=new Set(Q),be=B.some(le=>le.id===G);return ne.has(G)?ne.delete(G):(be&&B.forEach(le=>ne.delete(le.id)),ne.add(G)),ne});},[B]),K=jt.useCallback(G=>{let Q=nc(G);Q&&(G.id==="chat"||G.appurl==="/chat"?g.push("/chat?new=true"):/^https?:\/\//.test(Q)?window.open(Q,"_blank","noopener,noreferrer"):g.push(Q));},[g]),Y=G=>{o(),x(new Set([G.id]));};return l("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-gray-500 transition-colors hover:bg-blue-50 hover:text-blue-700",title:v("navigation.expand"),"aria-label":v("navigation.expand"),children:e(Qo,{className:"h-5 w-5"})}):l("label",{className:"relative block",children:[e("span",{className:"orb-visually-hidden",children:v("navigation.searchPlaceholder")}),e(Qo,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"}),e("input",{type:"search",value:b,onChange:G=>C(G.target.value),placeholder:v("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:B.length===0?e("div",{className:"flex items-center justify-center py-8 text-sm text-gray-500",children:t?e(vn,{className:"h-5 w-5"}):v(Z?"navigation.noMatch":"navigation.noAccessibleApp")}):t?e("div",{className:"space-y-1",children:z.map(G=>e("button",{type:"button",onClick:()=>Y(G),className:"flex h-10 w-full items-center justify-center rounded-lg text-gray-500 transition-colors hover:bg-blue-50 hover:text-blue-700",title:v("navigation.expandView",{title:G.title||G.label||""}),children:G.icon||e(vn,{className:"h-5 w-5"})},G.id))}):e(Rn,{items:B,onItemClick:K,className:"space-y-1",expandedIds:_,onToggleExpand:V,colorMode:i,enablePinning:u,pinnedIds:D,onTogglePin:F})}),p&&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:()=>c?.(S?"fixed":"floating"),className:"flex h-9 w-9 items-center justify-center rounded-lg text-gray-500 transition-colors hover:bg-blue-50 hover:text-blue-700",title:v(S?"navigation.mode.switchToFixed":"navigation.mode.switchToFloating"),"aria-label":v(S?"navigation.mode.switchToFixed":"navigation.mode.switchToFloating"),children:S?e(pa,{className:"h-4 w-4"}):e(ua,{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:v("navigation.collapse"),"aria-label":v("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-[#21BCFF]",style:{width:32,height:32,top:-16,left:-16}})})})]})};ps.displayName="NavigationIsland2";var cc=(t={})=>{let{initialCollapsed:o=false,initialDisplayMode:r="fixed",content:n=[],enablePinning:a,pinStorageKey:i,pinnedItemIds:s,defaultPinnedItemIds:c,onPinnedItemIdsChange:p,pinnedSectionTitle:u}=t,[d,f]=jt.useState(o),[h,m]=jt.useState(r),[y,v]=jt.useState(n),g=jt.useCallback(()=>{f(C=>!C);},[]),S=jt.useCallback(()=>{m(C=>C==="fixed"?"floating":"fixed");},[]),b=jt.useMemo(()=>({collapsed:d,onToggle:g,menuData:y,displayMode:h,onDisplayModeChange:m,enablePinning:a,pinStorageKey:i,pinnedItemIds:s,defaultPinnedItemIds:c,onPinnedItemIdsChange:p,pinnedSectionTitle:u}),[d,g,y,h,m,a,i,s,c,p,u]);return {collapsed:d,setCollapsed:f,toggleCollapsed:g,displayMode:h,setDisplayMode:m,toggleDisplayMode:S,menuData:y,setMenuData:v,navigationIslandProps:b}};var ms=class{constructor(){ml(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);}},jo=new ms,YS={success:(t,o)=>jo.show("success",t,o),error:(t,o)=>jo.show("error",t,o),warning:(t,o)=>jo.show("warning",t,o),info:(t,o)=>jo.show("info",t,o),show:(t,o,r)=>jo.show(t,o,r),hide:()=>jo.hide()};w();var Lg={success:{icon:e(yn,{size:40}),color:"var(--orb-success-bg)",iconColor:"var(--orb-success)"},warning:{icon:e(fa,{size:40}),color:"var(--orb-warn-bg)",iconColor:"var(--orb-warn)"},error:{icon:e(aa,{size:40}),color:"var(--orb-err-bg)",iconColor:"var(--orb-err)"},info:{icon:e(sa,{size:40}),color:"var(--orb-info-bg)",iconColor:"var(--orb-info)"},default:{icon:null,color:"transparent",iconColor:"inherit"}},An=({open:t,title:o,message:r,onClose:n,onConfirm:a,confirmText:i,cancelText:s,showCancel:c=true,maxWidth:p="xs",type:u="default"})=>{let{t:d}=ue(),f=i||d("messageBox.confirm"),h=s||d("messageBox.cancel"),m=()=>{a?a():n();},y=Lg[u],v=u!=="default";return l(Ft,{open:t,onClose:n,maxWidth:p,sx:v?{borderTop:`6px solid ${y.iconColor}`}:void 0,children:[v&&e("div",{style:{display:"flex",justifyContent:"center",paddingTop:24,color:y.iconColor},children:y.icon}),o&&e("div",{className:"orb-dialog-title",style:{textAlign:v?"center":"left",paddingTop:v?8:16},children:o}),e("div",{className:"orb-dialog-content",style:{textAlign:v?"center":"left"},children:typeof r=="string"?e("p",{style:{margin:0,color:"var(--orb-muted)"},children:r}):r}),l("div",{className:"orb-dialog-actions",style:{display:"flex",justifyContent:v?"center":"flex-end",gap:8,paddingBottom:24,paddingLeft:24,paddingRight:24},children:[c&&e(we,{onClick:n,variant:"text",children:h}),e(we,{onClick:m,variant:"contained",color:v&&u==="error"?"error":"primary",autoFocus:true,children:f})]})]})},nw=()=>{let[t,o]=jt__namespace.default.useState(null),[r,n]=jt__namespace.default.useState(false);jt__namespace.default.useEffect(()=>{let s=c=>{c?(o(c),n(true)):(n(false),o(null));};return jo.register(s),()=>jo.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(An,{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};w();var cw=({status:t,showIcon:o=true})=>{let r="gray",n,a=t;return t==="OK"?(r="blue",n=e(yn,{size:14,strokeWidth:2}),a="Success"):t==="Error"?(r="orange",n=e(aa,{size:14,strokeWidth:2}),a="Error"):t==="Warning"&&(r="orange",n=e(fa,{size:14,strokeWidth:2}),a="Warning"),e(Tt,{label:a,tone:r,icon:o&&n?n:void 0})};w();var uw=({dense:t,sx:o,className:r,children:n,...a})=>e("ul",{...a,className:r,style:{listStyle:"none",margin:0,padding:0,...o},children:n}),mw=({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}),gw=({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}),fw=({children:t,sx:o})=>e("div",{style:{marginRight:16,display:"flex",alignItems:"center",minWidth:40,...o},children:t}),hw=({primary:t,secondary:o,sx:r})=>l("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})]}),bw=({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}),yw=({children:t,sx:o})=>e("div",{style:{marginRight:12,display:"flex",alignItems:"center",...o},children:t});w();var Cw=({xs:t,md:o,lg:r,sx:n,children:a,className:i,...s})=>{let c=r?`span ${r}`:o?`span ${o}`:t?`span ${t}`:"span 12";return e("div",{...s,className:i,style:{gridColumn:c,minWidth:0,...n},children:a})};Wt();w();var Do=Ee,no=(t,o)=>jt.forwardRef(({component:r,sx:n,className:a,style:i,children:s,...c},p)=>{let u=r??t,d=Ue(n,[o,a].filter(Boolean).join(" "),i);return e(u,{ref:p,className:d.className,style:d.style,...c,children:s})}),dt=no("div"),pc=no("a","orb-link"),Pr=Le,uc=ae,fo=L;var mc=ie;var gc=At,Go=_r,Ma=Ur,Da=ya;var Aa=ba,fc=sr,hc=({value:t,variant:o,color:r,sx:n})=>e(Sn,{value:o==="determinate"?t:void 0,color:r,sx:n}),bc=no("table","orb-tbl"),yc=no("tbody"),hs=no("td"),vc=no("div","orb-table-container"),xc=no("thead"),bs=no("tr");no("tfoot");no("div","orb-dialog-title");no("div","orb-dialog-content");no("div","orb-dialog-actions");no("p","orb-body-dense");var Jo=no("span","orb-input-adornment"),Cc=jt.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=no("div","orb-form-control"),Nn=({control:t,label:o,...r})=>l("label",{className:"orb-form-control-label",...r,children:[t,e("span",{children:o})]}),Hg=({primary:t,secondary:o,children:r,primaryTypographyProps:n,secondaryTypographyProps:a,...i})=>l("span",{className:"orb-list-item-text",...i,children:[t??r,o?e("small",{children:o}):null]}),Wg=no("span","orb-list-item-icon"),$t=Hg,Fo=Wg;no("div","orb-list-subheader");var ys=({container:t,item:o,spacing:r,xs:n,sm:a,md:i,lg:s,xl:c,sx:p,...u})=>{let d={},f=h=>typeof h=="number"?`${h/12*100}%`:h?"100%":void 0;return n!==void 0&&(d.xs=f(n)),a!==void 0&&(d.sm=f(a)),i!==void 0&&(d.md=f(i)),s!==void 0&&(d.lg=f(s)),c!==void 0&&(d.xl=f(c)),e(dt,{...u,sx:{display:t?"flex":void 0,flexWrap:t?"wrap":void 0,gap:t&&r?r:void 0,width:o?d:void 0,...p??{}}})},Kr=({in:t,children:o,unmountOnExit:r,...n})=>!t&&r?null:e("div",{hidden:!t,...n,children:o}),Sc=({children:t,container:o})=>typeof document>"u"?null:reactDom.createPortal(t,o??document.body),wc=no("div","orb-toolbar"),kc=({active:t,direction:o="asc",children:r,sx:n,className:a,style:i,...s})=>{let c=Ue(n,["orb-table-sort-label",t?"orb-is-active":"",a].filter(Boolean).join(" "),i);return l("button",{type:"button",className:c.className,style:c.style,"data-direction":o,...s,children:[e("span",{className:"orb-table-sort-content",children:r}),e(Kt,{className:"orb-table-sort-icon",name:o==="desc"?"down":"up",size:11})]})},Na=({open:t,anchorEl:o,onClose:r,children:n,anchorOrigin:a,transformOrigin:i,slotProps:s,PaperProps:c,sx:p,className:u,style:d,...f})=>{let h=jt.useRef(null);if(jt.useEffect(()=>{if(!t)return;let S=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",S,true),document.addEventListener("keydown",b,true),()=>{document.removeEventListener("pointerdown",S,true),document.removeEventListener("keydown",b,true);}},[o,r,t]),!t||typeof document>"u")return null;let m=o?.getBoundingClientRect(),y=s?.paper??c,v=[...Array.isArray(y?.sx)?y.sx:y?.sx?[y.sx]:[],...Array.isArray(p)?p:p?[p]:[]],g=Ue(v,["orb-pop",y?.className,u].filter(Boolean).join(" "),{...y?.style,...d});return reactDom.createPortal(e("div",{...f,ref:h,className:g.className,style:{position:"fixed",left:m?.left??16,top:(m?.bottom??16)+6,zIndex:1301,...g.style},children:n}),document.body)},Tc=({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(l(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)},Pc=({value:t,onChange:o,children:r,variant:n,scrollButtons:a,...i})=>e("div",{role:"tablist",className:"orb-tabs",...i,children:jt.Children.map(r,s=>jt.isValidElement(s)?jt.cloneElement(s,{selected:s.props.value===t,onSelect:c=>o?.(null,c)}):s)}),Ic=({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 ao=()=>oa(),dr=(t,o)=>Ro(t);var Rc=({day:t,onDaySelect:o,selected:r,outsideCurrentMonth:n,disableMargin:a,sx:i,className:s,...c})=>{let p=Ue(i,`orb-cal-day ${r?"orb-is-selected":""} ${n?"orb-is-outside":""} ${s??""}`);return e("button",{type:"button",className:p.className,style:p.style,onClick:()=>o?.(t),...c,children:t.date()})},Mc=({value:t,referenceDate:o,onChange:r,onMonthChange:n,onYearChange:a,minDate:i,maxDate:s,slots:c,...p})=>e(Tn,{value:t,month:o,onChange:u=>r?.(u),onMonthChange:u=>{n?.(u),a?.(u);},minDate:i,maxDate:s,renderDay:c?.day?(u,d)=>c.day?.({day:u,selected:d.selected,outsideCurrentMonth:d.outsideCurrentMonth,onDaySelect:f=>r?.(f)}):void 0,...p}),Dc=({children:t})=>e(jsxRuntime.Fragment,{children:t}),Ra=class{};Wt();w();var $g=(t,o)=>o!==void 0?o:typeof t=="number"?t:t==="small"?18:t==="large"?30:t==="inherit"?"1em":22,he=t=>({fontSize:r,size:n,sx:a,className:i,style:s,titleAccess:c,...p})=>{let u=Ue(a,i,s);return e(Kt,{name:t,size:$g(r,n),className:u.className,style:u.style,"aria-label":p["aria-label"]??c,...p})},pr=he("tree"),Ir=he("add"),Ac=he("duplicate"),vs=he("down"),Nc=he("navigationRight"),Ec=he("navigationRight"),xs=he("up"),Lc=he("delete"),Fc=he("camera"),Oc=he("accept"),Bc=he("accept"),Ea=he("navigationRight"),zc=he("dimension"),Vc=he("decline"),ur=he("decline"),Hc=he("decline"),Wc=he("decline"),La=he("delete"),Fa=he("delete"),$c=he("download"),qr=he("move"),Gc=he("move"),Uc=he("edit"),Xr=he("slimDown"),_c=he("filter"),Zr=he("sum"),Kc=he("wrench"),qc=he("lineChart"),Xc=he("document"),Oo=he("slimDown"),Zc=he("navigationLeft"),mr=he("navigationRight"),Oa=he("slimUp"),Ba=he("navigationLeft"),za=he("navigationRight"),Yc=he("dimension"),Qc=he("splitOne"),Va=he("menu"),jc=he("microphone"),Jc=he("microphone"),ed=he("microphone"),td=he("qrCode"),gr=he("save"),Rr=he("search"),od=he("search"),rd=he("paperPlane"),nd=he("paperPlane"),ad=he("wrench"),id=he("sort"),Ha=he("splitTwo"),sd=he("favorite"),ld=he("favorite"),cd=he("stop"),dd=he("tableRow"),Wa=he("collapseAll"),$a=he("expandAll"),Yr=he("tableColumn"),pd=he("overview"),ud=he("hide");w();var Ug=[{field:"value",label:"Value",minWidth:120},{field:"label",label:"Description",minWidth:180}],gd=t=>Array.isArray(t)?t:t==null||t===""?[]:[t],So=t=>String(t),fd=(t,o)=>t[o],hd=t=>{let o=t.value??t.id??t.key??t.code;return typeof o=="number"||typeof o=="string"?o:""},_g=t=>{let o=t.label??t.description??t.name??t.title;return String(typeof o=="number"||typeof o=="string"?o:hd(t))},Kg=t=>{let o=t.description??t.subtitle;return typeof o=="number"||typeof o=="string"?String(o):void 0},bd=({value:t=null,items:o=[],columns:r,mode:n="single",dialogTitle:a="Value Help",searchPlaceholder:i="Search values...",selectLabel:s="Select",clearLabel:c="Clear",cancelLabel:p="Cancel",valueHelpLabel:u="Open value help",noResultsText:d="No matching values",loading:f=false,clearable:h=true,allowManualInput:m=true,validateManualInput:y=true,manualInputErrorText:v="Enter a valid value.",selectedItems:g=[],displayValue:S,getOptionValue:b=hd,getOptionLabel:C=_g,getOptionDescription:k=Kg,onChange:x,onSearch:E,disabled:M,InputProps:I,onFocus:N,onBlur:A,onKeyDown:T,error:D,helperText:R,...F})=>{let z=$r(),Z=n==="multiple",[B,_]=jt.useState(false),[V,K]=jt.useState(false),[Y,G]=jt.useState(""),[Q,ne]=jt.useState(null),[be,le]=jt.useState(false),[me,Ie]=jt.useState(()=>gd(t)),[nt,Xe]=jt.useState(""),[De,Ge]=jt.useState(""),xe=jt.useMemo(()=>r&&r.length>0?r:Ug,[r]),ye=Q??o,We=jt.useMemo(()=>{let U=[...g,...o,...Q??[]],fe=new Map;return U.forEach(Pe=>{fe.set(So(b(Pe)),Pe);}),fe},[b,o,Q,g]),tt=jt.useMemo(()=>gd(t),[t]),gt=jt.useMemo(()=>tt.map(String).join(", "),[tt]);jt.useEffect(()=>{B||Ie(tt);},[B,tt]),jt.useEffect(()=>{!V&&!De&&Xe(gt);},[V,gt,De]);let ct=jt.useMemo(()=>{let U=Y.trim().toLowerCase();if(!U||E)return ye;let fe=xe.filter(Pe=>Pe.searchable!==false);return ye.filter(Pe=>[b(Pe),C(Pe),k(Pe),...fe.map(ft=>fd(Pe,ft.field))].some(ft=>String(ft??"").toLowerCase().includes(U)))},[ye,k,C,b,E,Y,xe]),ee=jt.useMemo(()=>{if(S!==void 0)return S;if(tt.length===0)return "";let U=fe=>{let Pe=We.get(So(fe));if(!Pe)return String(fe);let _e=C(Pe);return _e&&_e!==String(fe)?`${fe} - ${_e}`:String(fe)};return Z?tt.length>2?`${tt.length} selected`:tt.map(U).join(", "):U(tt[0])},[S,C,Z,We,tt]),Ve=jt.useCallback(async()=>{if(E){le(true);try{let U=await E(Y);Array.isArray(U)&&ne(U);}finally{le(false);}}},[E,Y]),Te=()=>{M||(Ie(tt),_(true));},Ae=()=>{_(false);},pt=()=>{x?.(Z?[]:null,Z?[]:null),Ie([]),Xe(""),Ge("");},Qe=U=>{let fe=b(U);if(Z){Ie(Pe=>Pe.some(ft=>So(ft)===So(fe))?Pe.filter(ft=>So(ft)!==So(fe)):[...Pe,fe]);return}Ie([fe]);},vt=()=>{let U=me.map(fe=>We.get(So(fe))).filter(fe=>!!fe);Z?x?.(me,U):x?.(me[0]??null,U[0]??null),Ge(""),_(false);},xt=U=>{if(U.key==="F4"){U.preventDefault(),Te();return}if(U.key==="Enter"&&m&&!_t(nt,true)){U.preventDefault();return}T?.(U);},Vt=U=>y?U.every(fe=>We.has(So(fe))):true,_t=(U,fe)=>{if(Z){let _e=U.split(/[,;\n]/).map(ut=>ut.trim()).filter(Boolean);if(_e.length===0)return Ge(""),x?.([],[]),true;if(!Vt(_e))return fe&&Ge(v),false;Ge("");let ft=_e.map(ut=>We.get(So(ut))).filter(ut=>!!ut);return x?.(_e,ft),true}let Pe=U.trim();return Pe?Vt([Pe])?(Ge(""),x?.(Pe,We.get(So(Pe))??null),true):(fe&&Ge(v),false):(Ge(""),x?.(null,null),true)},J=U=>{if(!m)return;let fe=U.target.value;Xe(fe),Ge(""),_t(fe,false);},Je=f||be,Be=tt.length>0,ge=m&&(V||!!De)?nt:ee;return l(jsxRuntime.Fragment,{children:[e(He,{...F,className:["orb-value-help-field",h&&Be&&!M?"orb-value-help-has-clear":"",F.className??""].filter(Boolean).join(" "),disabled:M,value:ge,error:!!De||D,helperText:De||R,onChange:J,onFocus:U=>{K(true),Xe(gt),N?.(U);},onBlur:U=>{m&&_t(nt,true),K(false),A?.(U);},onKeyDown:xt,InputProps:{...I,readOnly:!m,endAdornment:l("span",{className:"orb-value-help-actions",children:[Je?e(sr,{size:18}):null,h&&Be&&!M?e(ie,{className:"orb-value-help-clear-trigger",size:"small",tooltip:c,"aria-label":c,onMouseDown:U=>U.preventDefault(),onClick:U=>{U.stopPropagation(),pt();},children:e(Kt,{name:"decline",size:14})}):null,e(ie,{className:"orb-value-help-search-trigger",size:"small",tooltip:u,"aria-label":u,onMouseDown:U=>U.preventDefault(),onClick:U=>{U.stopPropagation(),Te();},disabled:M,children:e(Kt,{name:"search",size:16})})]})}}),l(Ft,{open:B,onClose:Ae,fullWidth:true,maxWidth:820,hideCloseButton:true,PaperProps:{sx:U=>({borderRadius:2,overflow:"hidden",border:`1px solid ${U.palette.divider}`,boxShadow:z==="dark"?`0 24px 80px ${Ee(U.palette.common.black,.72)}`:`0 24px 80px ${Ee(U.palette.common.black,.18)}`})},children:[l("div",{className:"orb-dialog-title",sx:U=>({display:"flex",alignItems:"center",justifyContent:"space-between",gap:2,px:2.5,py:2,pr:1.5,borderBottom:`1px solid ${U.palette.divider}`,bgcolor:U.palette.background.paper}),children:[l("div",{children:[e(L,{sx:{fontSize:"1.05rem",fontWeight:800,lineHeight:1.25},children:a}),Z?e(L,{variant:"body2",color:"text.secondary",sx:{mt:.25},children:`${me.length} selected`}):null]}),e(ie,{"aria-label":"Close",onClick:Ae,size:"small",children:e(ur,{fontSize:"small"})})]}),l("div",{className:"orb-dialog-content",sx:{p:0},children:[l(ae,{direction:{xs:"column",sm:"row"},spacing:1,sx:U=>({px:2.5,py:1.5,borderBottom:`1px solid ${U.palette.divider}`,bgcolor:z==="dark"?Ee(U.palette.common.white,.025):Ee(U.palette.primary.main,.035)}),children:[e(He,{size:"small",fullWidth:true,autoFocus:true,value:Y,placeholder:i,onChange:U=>G(U.target.value),onKeyDown:U=>{U.key==="Enter"&&(U.preventDefault(),Ve());},InputProps:{startAdornment:e(Jo,{position:"start",children:e(Kt,{name:"search",size:16})}),sx:U=>({borderRadius:1,bgcolor:U.palette.background.paper,"& fieldset":{borderColor:Ee(U.palette.text.primary,z==="dark"?.2:.16)},"&:hover fieldset":{borderColor:Ee(U.palette.primary.main,.52)},"&:focus-within fieldset":{borderColor:U.palette.primary.main}})}}),E?e(we,{variant:"outlined",onClick:()=>{Ve();},disabled:Je,sx:{minWidth:96,textTransform:"none",fontWeight:700},children:Je?e(sr,{size:18}):"Search"}):null]}),e("div",{sx:{maxHeight:420},children:l("table",{className:"orb-tbl",stickyHeader:true,size:"small",children:[e("thead",{children:l("tr",{children:[e("td",{padding:"checkbox",sx:U=>({bgcolor:z==="dark"?"#01091a":U.palette.background.paper,borderBottom:`1px solid ${U.palette.divider}`})}),xe.map(U=>e("td",{align:U.align==="inherit"?void 0:U.align,sx:fe=>({minWidth:U.minWidth,width:U.width,fontSize:"0.78rem",fontWeight:800,bgcolor:z==="dark"?"#01091a":fe.palette.background.paper,borderBottom:`1px solid ${fe.palette.divider}`}),children:U.label},String(U.field)))]})}),l("tbody",{children:[ct.map(U=>{let fe=b(U),Pe=me.some(_e=>So(_e)===So(fe));return l("tr",{hover:true,selected:Pe,onClick:()=>Qe(U),onDoubleClick:()=>{Z||(Ie([fe]),x?.(fe,U),_(false));},sx:_e=>({cursor:"pointer","&.orb-selected":{bgcolor:Ee(_e.palette.primary.main,z==="dark"?.22:.12)},"&.orb-selected:hover":{bgcolor:Ee(_e.palette.primary.main,z==="dark"?.28:.18)}}),children:[e("td",{padding:"checkbox",children:e(Mt,{size:"small",checked:Pe})}),xe.map(_e=>{let ft=fd(U,_e.field);return e("td",{align:_e.align==="inherit"?void 0:_e.align,sx:{fontSize:"0.82rem",py:1},children:_e.render?_e.render(ft,U):String(ft??"")},String(_e.field))})]},So(fe))}),ct.length===0?e("tr",{children:e("td",{colSpan:xe.length+1,children:e("div",{sx:{py:5,textAlign:"center",color:"text.secondary"},children:d})})}):null]})]})})]}),l("div",{className:"orb-dialog-actions",sx:U=>({px:2.5,py:1.5,borderTop:`1px solid ${U.palette.divider}`,bgcolor:U.palette.background.paper,"& .orb-btn":{textTransform:"none",fontWeight:700}}),children:[h&&(Be||me.length>0)?e(we,{onClick:pt,children:c}):null,e("div",{sx:{flex:1}}),e(we,{onClick:Ae,children:p}),e(we,{variant:"contained",onClick:vt,disabled:!Z&&me.length===0,children:s})]})]})]})};w();var yd=({title:t,hideHeader:o,children:r})=>l("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 Cs={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"},Ss={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"},En={width:30,height:30,p:.25,flex:"0 0 auto","& svg":{fontSize:20}},Ln={width:30,height:30,minWidth:30,minHeight:30,p:.25,flex:"0 0 auto","& svg":{fontSize:20}},vd={display:"flex",alignItems:"center",justifyContent:"center",gap:.25,width:"100%",minWidth:0},lo={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}};w();var qg={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"}},Ga=({rowsPerPage:t=20,rowsPerPageOptions:o=[20,50,100,-1],page:r=0,count:n=0,onRowsPerPageChange:a,onPageChange:i})=>{let{t:s}=ue(),c=o.length>0?o:[20,50,100,-1],p=Math.max(0,r),u=t===-1?1:Math.max(1,Math.ceil(n/t)),d=Math.min(p+1,u),f=p>0,h=p<u-1&&t!==-1;return l("div",{className:"orb-table-pager",children:[e(L,{className:"orb-table-pager-label",children:s("table.toolbar.itemsPerPage")}),e(st,{title:s("table.toolbar.itemsPerPage"),children:e(Ut,{size:"small",variant:"standard",value:t,"aria-label":s("table.toolbar.itemsPerPage"),fullWidth:false,disableUnderline:true,onChange:m=>a?.(Number(m.target.value)),sx:qg,children:c.map(m=>e("option",{value:m,children:m===-1?s("common.all"):m},`rows-per-page-${m}`))})}),e("span",{className:"orb-table-pager-divider"}),e(ie,{className:"orb-table-pager-button","aria-label":"Previous page",size:"small",onClick:()=>i?.(Math.max(p-1,0)),disabled:!f,sx:lo,children:e(Zc,{})}),l(L,{className:"orb-table-pager-page",title:s("table.toolbar.pageOf",{current:d,total:u}),children:[d," / ",u]}),e(ie,{className:"orb-table-pager-button","aria-label":"Next page",size:"small",onClick:()=>i?.(Math.min(p+1,u-1)),disabled:!h,sx:lo,children:e(mr,{})})]})};w();var Ua=({value:t="",onChange:o})=>{let{t:r}=ue();return e("div",{className:"orb-table-toolbar-search",children:e(He,{className:"orb-table-toolbar-search-field",size:"small",placeholder:r("table.toolbar.searchPlaceholder"),value:t,onChange:n=>o?.(n.target.value),InputProps:{startAdornment:e(Jo,{position:"start",children:e(Rr,{size:16})})}})})};w();var _a=t=>{let{t:o}=ue(),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(wc,{className:"orb-table-toolbar",role:"toolbar","aria-label":o("table.title.default"),children:l("div",{className:"orb-table-toolbar-primary",children:[e(Ua,{value:t.filterText,onChange:c=>{t.setFilterText(c),t.onPageChange?.(0);}}),e(Ga,{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((c,p)=>e(jt__namespace.default.Fragment,{children:c},`toolbar-custom-${p}`))}):null,e("span",{className:"orb-table-toolbar-spacer"}),l("div",{className:"orb-table-toolbar-actions",children:[l("div",{className:"orb-table-tool-group",children:[!t.disableGrouping&&e(st,{title:o("table.toolbar.groupBy"),children:e(ie,{className:"orb-table-tool-button",sx:lo,onClick:c=>t.setGroupAnchorEl(t.groupAnchorEl?null:c.currentTarget),children:e(Da,{badgeContent:t.grouping?.length,color:"primary",invisible:!t.grouping?.length,children:e(pr,{})})})}),e(st,{title:o("table.toolbar.summary"),children:e(ie,{className:`orb-table-tool-button ${t.showSummary?"orb-is-active":""}`,active:!!t.showSummary,sx:lo,onClick:c=>t.setSummaryAnchorEl(t.summaryAnchorEl?null:c.currentTarget),children:e(Zr,{})})}),e(st,{title:o("table.toolbar.columns"),children:e(ie,{className:"orb-table-tool-button",sx:lo,onClick:c=>t.setAnchorEl(t.anchorEl?null:c.currentTarget),children:e(Yr,{})})}),e(st,{title:o("table.toolbar.export"),children:e(ie,{className:"orb-table-tool-button",sx:lo,onClick:t.handleExport,children:e($c,{})})})]}),i&&l("div",{className:"orb-table-tool-group",children:[t.showCreateButton&&e(st,{title:o("table.toolbar.newItem"),children:e(ie,{className:"orb-table-tool-button",onClick:t.onOpenCreateDialog,color:"primary.main",sx:lo,children:e(Ir,{})})}),t.showEditButton&&e(st,{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:lo,children:e(Uc,{})})})}),t.showDeleteButton&&e(st,{title:o("table.toolbar.deleteItem"),children:e("span",{children:e(ie,{className:"orb-table-tool-button",onClick:t.onOpenDeleteConfirm,disabled:!!t.deleteDisabled,sx:{...lo,color:"error.main"},children:e(La,{})})})})]}),s&&l("div",{className:"orb-table-tool-group",children:[t.onOpenGraphReport&&e(st,{title:o("table.toolbar.graphicReport"),children:e(ie,{className:"orb-table-tool-button",sx:lo,onClick:t.onOpenGraphReport,children:e(qc,{})})}),t.onLayoutSave&&!t.layoutManager&&e(st,{title:o("table.toolbar.saveLayout"),children:e(ie,{className:"orb-table-tool-button",sx:lo,onClick:c=>t.onLayoutSave(c),children:e(gr,{})})}),t.layoutManager]})]})]})})};var Ka=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 [Ka.Translate.toString(t),Ka.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:o,duration:r,easing:n}=t;return o+" "+r+"ms "+n}}});w();var qa=t=>{let{t:o}=ue(),{onSelectAllClick:r,order:n,orderBy:a,sortBy:i=[],numSelected:s=0,rowCount:c=0,onRequestSort:p,onContextMenu:u,columns:d,visibleColumns:f,selectionMode:h,grouping:m=[],isAllExpanded:y=false,handleToggleAll:v,onColumnResize:g,columnWidths:S,enableColumnReorder:b=false,disableSorting:C=false}=t,[k,x]=jt.useState(null),E=jt.useRef(null),M=V=>K=>{C||k||p(V);},I=(V,K,Y)=>{V.preventDefault(),V.stopPropagation(),x(K),E.current={startX:V.clientX,startWidth:Y,colId:K},document.addEventListener("mousemove",N),document.addEventListener("mouseup",A),document.body.style.cursor="col-resize";},N=V=>{if(!E.current)return;let{startX:K,startWidth:Y,colId:G}=E.current,Q=V.clientX-K,ne=Math.max(50,Y+Q);g&&g(G,ne);},A=()=>{x(null),E.current=null,document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",A),document.body.style.cursor="";};jt.useEffect(()=>()=>{document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",A);},[]);let T=h==="multiple"||h==="single",D=m.length>0&&!!v,R=o(y?"table.group.collapseAll":"table.group.expandAll"),F=d.filter(V=>f.includes(V.id)),z=new Map(i.map((V,K)=>[V.field,{...V,priority:K+1}])),Z=F.map(V=>{let K=S?.[V.id]||V.minWidth||100,Y=z.get(V.id);return e(tf,{headCell:V,width:typeof K=="number"?K:100,order:n,orderBy:a,multiSortInfo:C?void 0:Y,onRequestSort:M(V.id),onContextMenu:u,onResizeMouseDown:G=>I(G,V.id,typeof K=="number"?K:100),enableColumnReorder:b,disableSorting:C},V.id)}),B=F.map(V=>V.id),_=l("tr",{children:[T&&e("th",{className:"orb-table-control-head",style:{width:56,minWidth:56,maxWidth:56},children:e(Mt,{color:"primary",indeterminate:s>0&&s<c,checked:c>0&&s===c,onChange:r,disabled:h==="single",sx:En})}),D&&e("th",{className:"orb-table-control-head",style:{width:72,minWidth:72,maxWidth:72},children:e(st,{title:R,children:e(ie,{size:"small",onClick:V=>{V.stopPropagation(),v?.(!y);},sx:Ln,children:y?e(Wa,{}):e($a,{})})})}),b?e(sortable.SortableContext,{items:B,strategy:sortable.horizontalListSortingStrategy,children:Z}):Z]});return e("thead",{children:_})},tf=({headCell:t,width:o,order:r,orderBy:n,multiSortInfo:a,onRequestSort:i,onContextMenu:s,onResizeMouseDown:c,enableColumnReorder:p,disableSorting:u})=>{let{setNodeRef:d,attributes:f,listeners:h,transform:m,transition:y,isDragging:v}=sortable.useSortable({id:t.id,disabled:!p}),g=p?{transform:Ka.Transform.toString(m),transition:y,opacity:v?.6:1}:{},S=u?"asc":a?.direction??(n===t.id?r:"asc"),b=!u&&(!!a||n===t.id);return l("th",{ref:p?d:void 0,className:`orb-table-head-cell ${t.numeric?"orb-num":""} ${p?"orb-is-reorderable":""} ${v?"orb-is-dragging":""}`,"aria-sort":b?S==="asc"?"ascending":"descending":"none",onContextMenu:s?C=>s(C,t.id):void 0,style:{width:o,minWidth:o,maxWidth:o,...g},...p?f:{},...p?h:{},children:[u?e("span",{className:"orb-table-head-label",children:t.label}):e(kc,{className:"orb-table-head-sort",active:b,direction:S,onClick:i,children:l("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:c,onPointerDown:C=>C.stopPropagation(),onClick:C=>C.stopPropagation()})]})};w();var Xa=t=>{let{t:o}=ue(),{visibleRows:r,visibleColumns:n,selected:a=[],handleClick:i,columns:s,toggleGroupExpand:c,expandedGroups:p=new Set,selectionMode:u,grouping:d=[],isGroupFullyExpanded:f,handleExpandGroupRecursively:h,handleCollapseGroupRecursively:m,emptyLabel:y,getRowDataKey:v,getRowProps:g,getGroupRowProps:S}=t,b=E=>a.indexOf(E)!==-1,C=u==="multiple"||u==="single",k=d.length>0,x=n.length+(C?1:0)+(k?1:0);return l("tbody",{children:[r.map((E,M)=>{if(E.type==="group"){let I=p.has(E.id),N=E.childIds||[],A=N.filter(V=>b(V)).length,T=N.length>0&&A===N.length,D=A>0&&A<N.length,R={entry:E,data:E,id:E.id,index:M,selected:T,group:true},F=S?.(R)||{},{className:z,onClick:Z,...B}=F,_=V=>{if(V.stopPropagation(),!!t.onSelectionChange)if(T){let K=a.filter(Y=>!N.includes(Y));t.onSelectionChange(K);}else {let K=Array.from(new Set([...a,...N]));t.onSelectionChange(K);}};return l("tr",{...B,"data-ctable-row-key":v?.(R),className:["orb-table-group-row",z].filter(Boolean).join(" "),onClick:Z,sx:V=>({backgroundColor:Ne()==="dark"?"#111111":"#f5f5f5","& th, & td":{color:V.palette.text.primary,borderBottomColor:V.palette.divider},"& .orb-icon-btn":{color:V.palette.text.primary},"& .orb-chk":{color:V.palette.text.secondary},"& .orb-chk:has(input:checked), & .orb-chk:has(input:indeterminate)":{color:V.palette.primary.main}}),children:[C&&e("td",{padding:"checkbox",sx:Cs,children:e(Mt,{size:"small",checked:T,indeterminate:D,onChange:_,onClick:V=>V.stopPropagation(),sx:En})}),k&&e("td",{padding:"checkbox",sx:Ss,children:l("div",{sx:vd,children:[d.length>1&&E.level<d.length-1&&e(st,{title:f?.(E.id)?o("table.group.collapseAll"):o("table.group.expandAll"),children:e(ie,{size:"small",onClick:()=>{f?.(E.id)?m?.(E.id):h?.(E.id);},sx:Ln,children:f?.(E.id)?e(Wa,{}):e($a,{})})}),e(ie,{size:"small",onClick:()=>c&&c(E.id),sx:Ln,children:I?e(Oo,{}):e(mr,{})})]})}),e("td",{colSpan:n.length,sx:{py:1,pl:E.level*3+1},children:l(L,{variant:"body2",fontWeight:"bold",color:"text.primary",sx:{fontSize:"0.85rem"},children:[E.field,": ",E.value," (",E.count,")"]})})]},E.id)}else {let I=E.data||E,N=E.id||I.id||M,A=b(N),T=`enhanced-table-checkbox-${M}`,D={entry:E,data:I,id:N,index:M,selected:A,group:false},R=g?.(D)||{},{className:F,onClick:z,...Z}=R,_=(E.level!==void 0?E.level:0)*4;return l("tr",{...Z,"data-ctable-row-key":v?.(D),className:[A?"orb-is-selected":"",F].filter(Boolean).join(" "),onClick:V=>{z?.(V),V.defaultPrevented||i?.(V,I);},role:C?"checkbox":Z.role,"aria-checked":C?A:Z["aria-checked"],tabIndex:Z.tabIndex??-1,children:[C&&e("td",{padding:"checkbox",sx:Cs,children:e(Mt,{color:"primary",checked:A,inputProps:{"aria-labelledby":T},sx:En})}),k&&e("td",{padding:"checkbox",sx:Ss}),s.filter(V=>n.includes(V.id)).map((V,K)=>{let G=K===0&&_>0?{pl:_+2}:{};return e("td",{className:V.numeric?"orb-num":void 0,align:V.numeric?"right":"left",sx:G,children:V.render?V.render(I[V.id],I):(function(){let ne=I[V.id];if(V.numeric){if(typeof ne=="number")return ne.toLocaleString();if(typeof ne=="string"&&ne.trim()!==""&&!isNaN(Number(ne)))return Number(ne).toLocaleString()}return ne})()},V.id)})]},N)}}),r.length===0&&e("tr",{children:e("td",{colSpan:x,align:"center",children:y??o("common.noData")})})]})};w();var xd=t=>{let{columns:o=[],visibleColumns:r,summaryRow:n,selectionMode:a,grouping:i=[],columnWidths:s={}}=t;if(!t.showSummary)return null;let c=a==="multiple"||a==="single",p=i.length>0,u=o.filter(d=>r.includes(d.id));return e("tfoot",{className:"orb-table-footer",style:{zIndex:t.zIndex},children:l("tr",{children:[c&&e("td",{className:"orb-table-footer-control",style:{width:56,minWidth:56,maxWidth:56}}),p&&e("td",{className:"orb-table-footer-control",style:{width:72,minWidth:72,maxWidth:72}}),u.map(d=>e("td",{className:`orb-table-footer-cell ${d.numeric?"orb-num":""}`,style:{width:s[d.id]||d.minWidth||100,minWidth:s[d.id]||d.minWidth||100,maxWidth:s[d.id]||d.minWidth||100},children:(function(){let h=n[d.id];return h==null||h===""?"":typeof h=="number"?h.toLocaleString():typeof h=="string"&&h.trim()!==""&&!isNaN(Number(h))?Number(h).toLocaleString():h})()},d.id))]})})};w();var Cd=t=>{let{t:o}=ue();return e("div",{sx:{p:2},children:e(L,{children:o("table.mobile.notImplemented")})})};w();var Jr=({groupAnchorEl:t,setGroupAnchorEl:o,grouping:r,setGrouping:n,columns:a})=>{let{t:i}=ue(),[s,c]=jt.useState(r);jt.useEffect(()=>{t&&c(r);},[t,r]);let p=()=>{c(r),o(null);},u=f=>{c(h=>h.includes(f)?h.filter(m=>m!==f):[...h,f]);},d=()=>{n(s),o(null);};return l(Yt,{anchorEl:t,open:!!t,onClose:p,sx:{width:224,minWidth:224,maxHeight:360,overflowY:"auto"},children:[l("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(we,{className:"orb-table-group-menu-clear",size:"small",color:"error",onClick:f=>{f.stopPropagation(),c([]);},children:i("table.menu.clearAll")})]}),e(At,{className:"orb-table-group-menu-divider"}),a.map(f=>{let h=s.includes(f.id),m=s.indexOf(f.id)+1;return e("option",{className:"orb-table-group-menu-option",selected:h,onClick:y=>{y.stopPropagation(),u(f.id);},children:l("div",{className:"orb-table-group-menu-option-content",children:[e(Mt,{className:"orb-table-group-menu-checkbox",checked:h,size:"small"}),e($t,{className:"orb-table-group-menu-label",primary:f.label}),h&&e("span",{className:"orb-table-group-menu-order","aria-label":`${i("table.menu.groupBy")} ${m}`,children:m})]})},f.id)}),l("div",{className:"orb-table-group-menu-footer",children:[e(we,{size:"small",variant:"ghost",onClick:p,children:i("common.cancel")}),e(we,{size:"small",variant:"primary",onClick:d,children:i("common.ok")})]})]})},en=({anchorEl:t,setAnchorEl:o,columns:r,visibleColumns:n,toggleColumnVisibility:a})=>{let{t:i}=ue();return l(Yt,{anchorEl:t,open:!!t,onClose:()=>o(null),children:[e("option",{disabled:true,children:e($t,{primary:i("table.menu.visibleColumns")})}),e(At,{}),r.map(s=>l("option",{onClick:()=>a(s.id),children:[e(Mt,{checked:n.includes(s.id),size:"small"}),e($t,{primary:s.label})]},s.id))]})},Za=({anchorEl:t,setAnchorEl:o,showSummary:r,setShowSummary:n,columns:a,summaryColumns:i,toggleSummaryColumn:s})=>{let{t:c}=ue();return l(Yt,{anchorEl:t,open:!!t,onClose:()=>o(null),children:[e("option",{children:e(Nn,{control:e(Aa,{checked:r,onChange:p=>n(p.target.checked),size:"small"}),label:c("table.menu.showSummaryRow")})}),e(At,{}),a.filter(p=>p.numeric).map(p=>l("option",{onClick:()=>s(p.id),disabled:!r,children:[e(Mt,{checked:i.includes(p.id),size:"small"}),e($t,{primary:p.label})]},p.id)),a.filter(p=>p.numeric).length===0&&e("option",{disabled:true,children:e($t,{primary:c("table.menu.noNumericColumns")})})]})},Ya=({contextMenu:t,handleCloseContextMenu:o,columns:r,visibleColumns:n,toggleColumnVisibility:a})=>{let{t:i}=ue();return l(Yt,{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(At,{}),e("option",{disabled:true,children:i("table.menu.visibleColumns")}),r.map(s=>l("option",{onClick:()=>a(s.id),children:[e(Fo,{children:n.includes(s.id)&&e(Oc,{fontSize:"small"})}),e($t,{children:s.label})]},s.id))]})},Td=({contextMenu:t,handleClose:o,columns:r,visibleColumns:n,grouping:a,summaryColumns:i,showSummary:s,sortBy:c,orderBy:p,order:u,onSortAsc:d,onSortDesc:f,onClearSort:h,onHideColumn:m,onToggleGroup:y,onToggleSummary:v,onOpenSortDialog:g})=>{let{t:S}=ue(),b=t?.columnId??"",C=r.find(T=>T.id===b),k=a.includes(b),x=i.includes(b),E=!!C?.numeric,M=c.find(T=>T.field===b),I=M?M.direction==="asc":p===b&&u==="asc",N=M?M.direction==="desc":p===b&&u==="desc",A=I||N;return l(Yt,{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($t,{primary:C?.label??b})}),e(At,{}),l("option",{onClick:()=>{d(b),o();},selected:I,children:[e(Fo,{children:e(xs,{fontSize:"small"})}),e($t,{primary:S("table.headerMenu.sortAsc")})]}),l("option",{onClick:()=>{f(b),o();},selected:N,children:[e(Fo,{children:e(vs,{fontSize:"small"})}),e($t,{primary:S("table.headerMenu.sortDesc")})]}),A&&l("option",{onClick:()=>{h(b),o();},children:[e(Fo,{children:e(zc,{fontSize:"small"})}),e($t,{primary:S("table.headerMenu.clearSort")})]}),l("option",{onClick:()=>{g(),o();},children:[e(Fo,{children:e(Ir,{fontSize:"small"})}),e($t,{primary:S("table.headerMenu.configureSort")})]}),e(At,{}),l("option",{onClick:()=>{y(b),o();},selected:k,children:[e(Fo,{children:e(pr,{fontSize:"small"})}),e($t,{primary:S(k?"table.headerMenu.ungroup":"table.headerMenu.group")})]}),E&&s&&l("option",{onClick:()=>{v(b),o();},selected:x,children:[e(Fo,{children:e(Zr,{fontSize:"small"})}),e($t,{primary:S(x?"table.headerMenu.removeSummary":"table.headerMenu.addSummary")})]}),e(At,{}),l("option",{onClick:()=>{m(b),o();},children:[e(Fo,{children:e(ud,{fontSize:"small"})}),e($t,{primary:S("table.headerMenu.hideColumn")})]})]})},Pd=({open:t,onClose:o,columns:r,initialRules:n,onApply:a,onClear:i})=>{let{t:s}=ue(),[c,p]=jt.useState([]);jt.useEffect(()=>{t&&p(n.length>0?n.map(v=>({...v})):[]);},[t,n]);let u=jt.useMemo(()=>new Set(c.map(v=>v.field)),[c]),d=jt.useMemo(()=>r.filter(v=>!u.has(v.id)),[r,u]),f=()=>{let v=d[0];v&&p(g=>[...g,{field:v.id,direction:"asc"}]);},h=v=>{p(g=>g.filter((S,b)=>b!==v));},m=(v,g)=>{p(S=>S.map((b,C)=>C===v?{...b,...g}:b));},y=(v,g)=>{p(S=>{let b=v+g;if(b<0||b>=S.length)return S;let C=[...S],[k]=C.splice(v,1);return C.splice(b,0,k),C});};return e(Ft,{open:t,onClose:o,maxWidth:620,fullWidth:true,className:"orb-table-sort-dialog",title:s("table.sortDialog.title"),actions:l(jsxRuntime.Fragment,{children:[e(we,{className:"orb-table-sort-clear",variant:"neutral",disabled:c.length===0&&n.length===0,onClick:()=>{i(),o();},children:s("table.sortDialog.clearAll")}),e("span",{className:"orb-table-sort-action-spacer"}),e(we,{variant:"neutral",onClick:o,children:s("common.cancel")}),e(we,{variant:"primary",onClick:()=>{a(c),o();},children:s("common.ok")})]}),children:l("div",{className:"orb-table-sort-dialog-content",children:[c.length===0?e(L,{className:"orb-table-sort-empty",variant:"body2",children:s("table.sortDialog.empty")}):e(ae,{className:"orb-table-sort-rules",spacing:1,children:c.map((v,g)=>{let S=new Set(c.filter((C,k)=>k!==g).map(C=>C.field)),b=r.filter(C=>!S.has(C.id));return l("div",{className:"orb-table-sort-rule",children:[e(Da,{className:"orb-table-sort-order",badgeContent:g+1,color:"primary"}),e(Ut,{size:"small",value:v.field,onChange:C=>m(g,{field:C.target.value}),options:b.map(C=>({value:C.id,label:C.label}))}),e(Ut,{size:"small",value:v.direction,onChange:C=>m(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:()=>y(g,-1),disabled:g===0,children:e(xs,{fontSize:"small"})}),e(ie,{className:"orb-table-sort-icon-button",size:"small",onClick:()=>y(g,1),disabled:g===c.length-1,children:e(vs,{fontSize:"small"})}),e(ie,{className:"orb-table-sort-icon-button orb-table-sort-delete",size:"small",onClick:()=>h(g),children:e(Fa,{fontSize:"small"})})]},`sort-rule-${g}`)})}),e(we,{size:"small",onClick:f,disabled:d.length===0,startIcon:e(Ir,{}),variant:"secondary",className:"orb-table-sort-add",children:s("table.sortDialog.addRule")})]})})};w();var Fn=(t,o=2)=>t.toLocaleString(void 0,{maximumFractionDigits:o}),Id=({kpis:t})=>{let{t:o}=ue(),r=[{label:o("graph.kpi.totalRecords"),value:Fn(t.totalRecords,0),color:"var(--orb-fg)"},{label:o("graph.kpi.totalReport"),value:Fn(t.totalReportHours),color:"var(--orb-fg)"},{label:o("graph.kpi.totalBillable"),value:Fn(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:Fn(t.totalAmount),color:"var(--orb-primary)"},{label:o("graph.kpi.flagged"),value:Fn(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=>l(Le,{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))})};w();var Qa=({title:t,subtitle:o,children:r})=>l(Le,{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]});w();var On=({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(c=>c.value),1);return o==="vertical"?e("div",{style:{display:"flex",gap:1,alignItems:"flex-end",minHeight:n},children:t.map(c=>l("div",{style:{flex:1,minWidth:0},children:[e("div",{onClick:()=>i?.(c),sx:{height:`${Math.max(c.value/s*180,6)}px`,background:c.name===a?"primary.dark":"primary.main",borderRadius:"8px 8px 0 0",cursor:i?"pointer":"default",opacity:a&&c.name!==a?.45:1}}),e(L,{variant:"caption",title:c.name,sx:{display:"block",mt:.5},children:c.name}),l(L,{variant:"caption",muted:true,children:[c.value.toFixed(1),r]})]},c.name))}):e(ae,{spacing:1,children:t.map(c=>l("div",{style:{display:"grid",gridTemplateColumns:"140px 1fr 64px",gap:1},children:[e(L,{variant:"caption",muted:true,title:c.name,children:c.name}),e("div",{onClick:()=>i?.(c),sx:{alignSelf:"center",background:"action.hover",height:10,borderRadius:999,overflow:"hidden",cursor:i?"pointer":"default",opacity:a&&c.name!==a?.45:1},children:e("div",{style:{width:`${c.value/s*100}%`,height:"100%",background:c.name===a?"primary.dark":"primary.main"}})}),l(L,{variant:"caption",sx:{textAlign:"right",fontWeight:600},children:[c.value.toFixed(1),r]})]},c.name))})};w();var Rd=({data:t,color:o="#42A5F5",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),c=Math.min(...s,0),u=Math.max(...s,1)-c||1,d=t.map((h,m)=>{let y=i+m*(a-i*2)/Math.max(t.length-1,1),v=n-i-(h.value-c)/u*(n-i*2);return {x:y,y:v,...h}}),f=d.map(h=>`${h.x},${h.y}`).join(" ");return l("div",{children:[l("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,stroke:"rgba(148,163,184,0.4)"}),e("polyline",{fill:"none",stroke:o,strokeWidth:3,points:f}),d.map(h=>e("circle",{cx:h.x,cy:h.y,r:4,fill:o},h.name))]}),e("div",{sx:{mt:1,display:"grid",gridTemplateColumns:`repeat(${t.length}, minmax(0, 1fr))`,gap:1},children:t.map(h=>l("div",{style:{minWidth:0},children:[e(L,{variant:"caption",title:h.name,sx:{display:"block"},children:h.name}),l(L,{variant:"caption",muted:true,children:[h.value.toFixed(1),r]})]},h.name))})]})};w();var Md=({data:t,barColor:o="#64B5F6",lineColor:r="#FFB74D",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(d=>d.barValue),1),c=Math.max(...t.map(d=>d.lineValue),1),p=t.map((d,f)=>{let h=(a-i*2)/t.length,m=Math.max(h*.5,8),y=i+f*h+(h-m)/2,v=d.barValue/s*(n-i*2),g=n-i-v;return {x:y,y:g,barHeight:v,barWidth:m,item:d}}),u=t.map((d,f)=>{let h=(a-i*2)/t.length,m=i+f*h+h/2,y=n-i-d.lineValue/c*(n-i*2);return {x:m,y,item:d}});return l(ae,{spacing:1.25,children:[l("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,stroke:"rgba(148,163,184,0.4)"}),p.map(d=>e("rect",{x:d.x,y:d.y,width:d.barWidth,height:Math.max(d.barHeight,4),rx:6,fill:o},d.item.name)),e("polyline",{fill:"none",stroke:r,strokeWidth:3,points:u.map(d=>`${d.x},${d.y}`).join(" ")}),u.map(d=>e("circle",{cx:d.x,cy:d.y,r:3.5,fill:r},`${d.item.name}-line`))]}),e("div",{style:{display:"grid",gridTemplateColumns:`repeat(${t.length}, minmax(0, 1fr))`,gap:1},children:t.map(d=>l("div",{style:{minWidth:0},children:[e(L,{variant:"caption",title:d.name,sx:{display:"block"},children:d.name}),l(L,{variant:"caption",muted:true,sx:{display:"block"},children:["Bar: ",d.barValue.toFixed(1)]}),l(L,{variant:"caption",muted:true,sx:{display:"block"},children:["Line: ",d.lineValue.toFixed(1)]})]},d.name))})]})};w();var of=t=>`rgba(30, 136, 229, ${.2+Math.max(0,Math.min(1,t))*.8})`,Dd=({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:l("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=>l("div",{style:{display:"contents"},children:[e(L,{variant:"caption",sx:{alignSelf:"center"},children:i}),o.map(s=>{let c=a.get(`${i}__${s}`)||0,p=c/n;return e("div",{sx:{height:36,borderRadius:1,background:of(p),border:"1px solid rgba(148,163,184,0.2)",display:"flex",alignItems:"center",justifyContent:"center"},children:e(L,{variant:"caption",sx:{fontWeight:700},children:c.toFixed(1)})},`${i}-${s}`)})]},i))]})})};w();var rf=["#1E88E5","#1ABC9C","#FBC02D","#EF5350","#7E57C2","#78909C"],ja=({data:t,variant:o="donut",colors:r=rf,size:n=180,activeName:a,onItemClick:i})=>{if(t.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let s=0,c=t.map((p,u)=>{let d=s;return s+=p.percent,`${r[u%r.length]} ${d}% ${s}%`});return l(ae,{direction:{xs:"column",sm:"row"},spacing:2,alignItems:"center",children:[e("div",{style:{width:n,height:n,borderRadius:"50%",background:`conic-gradient(${c.join(", ")})`,position:"relative",flexShrink:0},children:o==="donut"&&e("div",{style:{position:"absolute",inset:Math.round(n*.18),background:"background.paper",borderRadius:"50%"}})}),e(ae,{spacing:1,sx:{minWidth:180},children:t.map((p,u)=>l("div",{onClick:()=>i?.(p),sx:{display:"flex",alignItems:"center",gap:1,cursor:i?"pointer":"default",opacity:a&&p.name!==a?.45:1},children:[e("div",{style:{width:10,height:10,borderRadius:"50%",background:r[u%r.length]}}),e(L,{variant:"caption",sx:{flex:1},children:p.name}),l(L,{variant:"caption",sx:{fontWeight:700},children:[p.percent.toFixed(0),"%"]})]},p.name))})]})};w();var Ad=({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 l(ae,{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=>l("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))}),l("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=>l("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))})]})};w();var Nd=({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,m=f.type==="total"?f.value:r+f.value;return f.type!=="total"&&(r=m),{...f,start:h,end:m,delta:m-h}}),a=n.flatMap(f=>[f.start,f.end]),i=Math.min(...a,0),s=Math.max(...a,1),c=680,p=30,u=s-i||1,d=f=>o-p-(f-i)/u*(o-p*2);return l("div",{children:[l("div",{component:"svg",viewBox:`0 0 ${c} ${o}`,style:{width:"100%",height:o},children:[e("line",{x1:p,y1:d(0),x2:c-p,y2:d(0),stroke:"rgba(148,163,184,0.4)"}),n.map((f,h)=>{let m=(c-p*2)/n.length,y=Math.max(m*.55,8),v=p+h*m+(m-y)/2,g=d(Math.max(f.start,f.end)),S=d(Math.min(f.start,f.end)),b=f.type==="total"?"#42A5F5":f.delta>=0?"#66BB6A":"#EF5350";return l("g",{children:[e("rect",{x:v,y:g,width:y,height:Math.max(S-g,4),rx:6,fill:b}),e("text",{x:v+y/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 Bn=({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}`},ZT=(t,o=360)=>{let r=Bn(t);return `<iframe width="100%" height="${o}" style="border:0" loading="lazy" allowfullscreen referrerpolicy="no-referrer-when-downgrade" src="${r}"></iframe>`};w();var Ed=({apiKey:t,query:o,embedUrl:r,zoom:n=14,mapType:a="roadmap",height:i=320})=>{let s=r||(t&&o?Bn({apiKey:t,query:o,zoom:n,mapType:a}):"");return s?l("div",{children:[e("div",{component:"iframe",src:s,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",sx:{width:"100%",height:i,border:0,borderRadius:2}}),l(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 Ja=({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"};w();var Ld=({keyword:t,location:o,embedUrl:r,height:n=320})=>{let a=r||Ja({keyword:t,location:o?{lng:o.lng,lat:o.lat,name:o.name}:void 0});return l("div",{children:[e("div",{component:"iframe",src:a,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",sx:{width:"100%",height:n,border:0,borderRadius:2}}),l(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"})]})]})};w();var Fd=({billableByPrimary:t,efficiencyBySecondary:o,statusDistribution:r,interaction:n})=>{let{t:a}=ue();return l("div",{style:{display:"grid",gap:12,gridTemplateColumns:"repeat(auto-fit, minmax(320px, 1fr))"},children:[e(Qa,{title:a("graph.chart.billable.title"),subtitle:a("graph.chart.billable.subtitle"),children:e(On,{data:t,orientation:"horizontal",activeName:n?.filters?.primaryDimension,onItemClick:i=>n?.onPrimaryDimensionClick?.(i.name)})}),e(Qa,{title:a("graph.chart.efficiency.title"),subtitle:a("graph.chart.efficiency.subtitle"),children:e(On,{data:o,orientation:"vertical",valueSuffix:"%",activeName:n?.filters?.secondaryDimension,onItemClick:i=>n?.onSecondaryDimensionClick?.(i.name)})}),e(Qa,{title:a("graph.chart.status.title"),subtitle:a("graph.chart.status.subtitle"),children:e(ja,{data:r,variant:"donut",activeName:n?.filters?.status,onItemClick:i=>n?.onStatusClick?.(i.name)})})]})};w();var af=["doubao-lite","gpt-4o-mini","gpt-4.1-mini","claude-3.5-sonnet"],sf=["zh","en","de","fr","ja","ko"],Od=({open:t,onClose:o,value:r,onSaveAll:n,modelOptions:a=af,promptLangOptions:i=sf,analysisTemplateOptions:s=[],responseTemplateOptions:c=[],defaultAnalysisTemplateId:p,defaultResponseTemplateId:u})=>{let[d,f]=jt.useState(r),[h,m]=jt.useState(p||""),[y,v]=jt.useState(u||""),[g,S]=jt.useState(false);jt.useEffect(()=>{t&&(f(r),m(p||""),v(u||""));},[t,r,p,u]);let b=(k,x)=>{f(E=>({...E,[k]:x}));},C=async()=>{if(n)try{S(!0),await n({settings:d,analysisTemplateId:h||void 0,responseTemplateId:y||void 0});}finally{S(false);}};return l(Ft,{open:t,onClose:o,fullWidth:true,maxWidth:"lg",children:[l("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(ur,{})})]}),e("div",{className:"orb-dialog-content",sx:{pt:"18px !important"},children:l(ae,{spacing:2.2,children:[l("div",{sx:{mt:.8,display:"grid",gap:1.5,gridTemplateColumns:{xs:"1fr",md:"repeat(2, minmax(0, 1fr))"}},children:[e("div",{children:e(He,{size:"small",value:d.baseUrl,onChange:k=>b("baseUrl",k.target.value),fullWidth:true,label:"Base URL"})}),e("div",{children:e(He,{size:"small",type:"password",value:d.apiKey,onChange:k=>b("apiKey",k.target.value),fullWidth:true,label:"API Key"})}),e("div",{children:e(He,{size:"small",value:d.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(He,{size:"small",value:d.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))})})]}),l("div",{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[l(He,{size:"small",value:h,onChange:k=>m(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(Cn,{multiline:true,minRows:8,value:d.analysisPrompt,onChange:k=>b("analysisPrompt",k.target.value),fullWidth:true,label:"Analysis Prompt",sx:{"& textarea":{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"}}}),l(He,{size:"small",value:y,onChange:k=>v(k.target.value),fullWidth:true,select:true,label:"Response Template",children:[e("option",{value:"",children:"Default"}),c.map(k=>e("option",{value:k.id,children:k.label},k.id))]}),e(Cn,{multiline:true,minRows:8,value:d.responsePrompt,onChange:k=>b("responsePrompt",k.target.value),fullWidth:true,label:"Response Prompt",sx:{"& textarea":{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"}}})]})]})}),l("div",{className:"orb-dialog-actions",sx:{px:3,pb:2.5,pt:1.2,gap:1},children:[e(we,{variant:"outlined",onClick:o,children:"Cancel"}),e(we,{variant:"contained",onClick:C,disabled:!n||g,children:"Save"})]})]})};w();var ti=({open:t,onClose:o,model:r,tableContent:n,extraCharts:a,interaction:i,aiAssistant:s})=>{let{t:c}=ue(),[p,u]=jt.useState(s?.defaultPrompt||""),[d,f]=jt.useState(false),[h,m]=jt.useState(false),y=i?.enabled!==false&&!!i,v=s?.enabled!==false,g=i?.filters||{},S=!!(g.primaryDimension||g.secondaryDimension||g.status),b=s?.placeholder||"Ask AI to analyze data, create charts, or find insights...";jt.useEffect(()=>{t&&u(s?.defaultPrompt||"");},[t,s?.defaultPrompt]);let C=s?.settings||{baseUrl:"/llm-api",apiKey:"",model:"doubao-lite",promptLang:"zh",analysisPrompt:"",responsePrompt:""},k=async()=>{let x=p.trim();if(!(!x||!s?.onSubmit))try{f(!0),await s.onSubmit(x,{filters:g,model:r});}finally{f(false);}};return e(Ft,{open:t,onClose:o,fullWidth:true,maxWidth:1400,hideCloseButton:true,children:l("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:l(ae,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:12,children:[l(ae,{direction:"row",spacing:10,alignItems:"center",sx:{flexWrap:"wrap"},children:[e(L,{variant:"h3",sx:{fontWeight:800},children:r.title}),e(Tt,{label:c("graph.records",{count:r.kpis.totalRecords})}),y&&g.primaryDimension&&e(Tt,{tone:"outline",label:`${i?.fieldMapping.primaryDimension}: ${g.primaryDimension}`,onDelete:()=>i?.onClearFilter("primaryDimension")}),y&&g.secondaryDimension&&e(Tt,{tone:"outline",label:`${i?.fieldMapping.secondaryDimension}: ${g.secondaryDimension}`,onDelete:()=>i?.onClearFilter("secondaryDimension")}),y&&g.status&&e(Tt,{tone:"outline",label:`${i?.fieldMapping.status}: ${g.status}`,onDelete:()=>i?.onClearFilter("status")}),y&&S&&e(we,{size:"small",variant:"ghost",onClick:()=>i?.onClearAll(),children:"Clear"})]}),l(ae,{direction:"row",spacing:10,alignItems:"center",children:[v&&l("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(da,{size:16,strokeWidth:1.8})}),e("input",{className:"orb-inp orb-inp-dense",value:p,onChange:x=>u(x.target.value),onKeyDown:x=>{x.key==="Enter"&&(x.preventDefault(),k());},placeholder:b,style:{fontSize:14,border:"none",background:"transparent",flex:1,minWidth:0}}),e(ie,{size:"small",onClick:k,disabled:d||!p.trim(),children:e(Hl,{size:16,strokeWidth:1.8})}),e(ie,{size:"small",onClick:()=>m(true),children:e(ga,{size:16,strokeWidth:1.8})})]}),e(ie,{onClick:o,children:e(yo,{size:18,strokeWidth:2})})]})]})}),l("div",{style:{padding:16,display:"flex",flexDirection:"column",gap:12,overflow:"auto",minHeight:0},children:[e(Id,{kpis:r.kpis}),e(Fd,{billableByPrimary:r.charts.billableByPrimary,efficiencyBySecondary:r.charts.efficiencyBySecondary,statusDistribution:r.charts.statusDistribution,interaction:y?{filters:g,onPrimaryDimensionClick:x=>i?.onPrimaryDimensionClick(x),onSecondaryDimensionClick:x=>i?.onSecondaryDimensionClick(x),onStatusClick:x=>i?.onStatusClick(x)}:void 0}),a,n]}),e(Od,{open:h,onClose:()=>m(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 br={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"]},cf=5,Bd=t=>t.toLowerCase().replace(/[\s_-]/g,""),yr=(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=>[Bd(s),s]));for(let s of r){let c=i.get(Bd(s));if(c)return c}return a[0]||n},wo=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},uo=(t,o)=>t==null||t===""?o:String(t),df=(t,o,r,n,a)=>{let i=new Map;return t.forEach(s=>{let c=uo(s[o],a);i.set(c,(i.get(c)||0)+wo(s[r]));}),Array.from(i.entries()).map(([s,c])=>({name:s,value:c})).sort((s,c)=>c.value-s.value).slice(0,n)},pf=(t,o,r,n,a,i)=>{let s=new Map;return t.forEach(c=>{let p=uo(c[o],i),u=s.get(p)||{report:0,billable:0};u.report+=wo(c[r]),u.billable+=wo(c[n]),s.set(p,u);}),Array.from(s.entries()).map(([c,p])=>({name:c,value:p.report>0?p.billable/p.report*100:0})).sort((c,p)=>c.value-p.value).slice(0,a)},uf=(t,o,r)=>{let n=t.length;if(n===0)return [];let a=new Map;return t.forEach(i=>{let s=uo(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}))},zd=(t,o,r)=>{let n=new Map;return t.forEach(a=>{let i=uo(a[o],"N/A");n.set(i,(n.get(i)||0)+wo(a[r]));}),Array.from(n.entries()).sort(([a],[i])=>a.localeCompare(i)).map(([a,i])=>({name:a,value:i}))},mf=(t,o,r,n,a,i)=>{let s=new Map;return t.forEach(c=>{let p=uo(c[o],i),u=s.get(p)||{report:0,billable:0};u.report+=wo(c[r]),u.billable+=wo(c[n]),s.set(p,u);}),Array.from(s.entries()).map(([c,p])=>({name:c,barValue:p.billable,lineValue:p.report>0?p.billable/p.report*100:0})).sort((c,p)=>p.barValue-c.barValue).slice(0,a)},gf=(t,o,r,n,a)=>{let i=new Map;return t.forEach(s=>{let c=uo(s[o],a),p=uo(s[r],a),u=`${c}__${p}`;i.set(u,(i.get(u)||0)+wo(s[n]));}),Array.from(i.entries()).map(([s,c])=>{let[p,u]=s.split("__");return {x:p,y:u,value:c}})},ff=(t,o,r)=>{let n=zd(t,o,r),a=n.map(s=>({name:s.name,value:s.value,type:"delta"})),i=n.reduce((s,c)=>s+c.value,0);return [...a,{name:"Total",value:i,type:"total"}]},hf=(t,o,r,n,a,i)=>{let s=new Map;return t.forEach(c=>{let p=uo(c[o],i),u=`${uo(c[r],i)} / ${uo(c[n],i)}`,d=s.get(p)||new Map;d.set(u,(d.get(u)||0)+1),s.set(p,d);}),Array.from(s.entries()).map(([c,p])=>({title:c,causes:Array.from(p.entries()).sort((u,d)=>d[1]-u[1]).slice(0,a).map(([u,d])=>`${u} (${d})`)})).slice(0,6)},tn=({rows:t,config:o})=>{let{t:r}=ue(),n=r("graph.unassigned"),a=jt.useMemo(()=>{let d=o?.fieldMapping;return {primaryDimension:yr(t,d?.primaryDimension,br.primaryDimension,"Category"),secondaryDimension:yr(t,d?.secondaryDimension,br.secondaryDimension,"Owner"),status:yr(t,d?.status,br.status,"Status"),date:yr(t,d?.date,br.date,"Date"),description:yr(t,d?.description,br.description,"Description"),reportHours:yr(t,d?.reportHours,br.reportHours,"ReportHours"),billableHours:yr(t,d?.billableHours,br.billableHours,"BillableHours"),amount:yr(t,d?.amount,br.amount,"Amount")}},[t,o?.fieldMapping]),i=jt.useMemo(()=>t.map((d,f)=>{let h=wo(d[a.reportHours]),m=wo(d[a.billableHours]),y=wo(d[a.amount]),v=h>0?m/h*100:0;return {id:`graph-row-${f}`,Date:uo(d[a.date],""),Primary:uo(d[a.primaryDimension],n),Secondary:uo(d[a.secondaryDimension],n),Description:uo(d[a.description],""),ReportHours:h,BillableHours:m,Amount:y,Efficiency:v,Status:uo(d[a.status],n)}}),[t,a,n]),s=jt.useMemo(()=>{let d=i.length,f=i.reduce((S,b)=>S+wo(b.ReportHours),0),h=i.reduce((S,b)=>S+wo(b.BillableHours),0),m=i.reduce((S,b)=>S+wo(b.Amount),0),y=f>0?h/f*100:0,v=o?.statusFlagValues||["flag","flagged","warning","risk"],g=i.filter(S=>v.includes(uo(S.Status,"").toLowerCase())).length;return {totalRecords:d,totalReportHours:f,totalBillableHours:h,efficiency:y,totalAmount:m,flaggedCount:g}},[i,o?.statusFlagValues]),c=o?.topN||cf,p=jt.useMemo(()=>({billableByPrimary:df(i,"Primary","BillableHours",c,n),efficiencyBySecondary:pf(i,"Secondary","ReportHours","BillableHours",c,n),statusDistribution:uf(i,"Status",n),lineByDate:zd(i,"Date","BillableHours"),comboByPrimary:mf(i,"Primary","ReportHours","BillableHours",c,n),heatmapPrimarySecondary:gf(i,"Primary","Secondary","BillableHours",n),waterfallBillable:ff(i,"Date","BillableHours"),fishboneStatusCauses:hf(i,"Status","Primary","Secondary",3,n)}),[i,c,n]),u=jt.useMemo(()=>({title:o?.title||r("graph.reportTitle"),kpis:s,charts:p,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}}),[p,o?.title,a,s,i,r]);return {fieldMapping:a,model:u}};var on=t=>String(t??"").trim(),ri=(t={})=>{let[o,r]=jt.useState(t),n=jt.useCallback((p,u)=>{r(d=>{let f=u?.trim();if(!f){let h={...d};return delete h[p],h}if(d[p]===f){let h={...d};return delete h[p],h}return {...d,[p]:f}});},[]),a=jt.useCallback(p=>{r(u=>{if(!u[p])return u;let d={...u};return delete d[p],d});},[]),i=jt.useCallback(()=>{r({});},[]),s=jt.useMemo(()=>!!(o.primaryDimension||o.secondaryDimension||o.status),[o]),c=jt.useCallback((p,u)=>p.filter(d=>!(o.primaryDimension&&on(d[u.primaryDimension])!==on(o.primaryDimension)||o.secondaryDimension&&on(d[u.secondaryDimension])!==on(o.secondaryDimension)||o.status&&on(d[u.status])!==on(o.status))),[o]);return {filters:o,setFilter:n,clearFilter:a,clearAll:i,hasActiveFilters:s,applyRows:c}};w();var ai=({variants:t,currentVariantId:o,onLoad:r,onSave:n,onDelete:a,onSetDefault:i})=>{let{t:s}=ue(),[c,p]=jt.useState(false),[u,d]=jt.useState(""),[f,h]=jt.useState(false),[m,y]=jt.useState(false),v=t.find(b=>b.id===o),g=()=>{d(v?.name||s("variant.newVariant")),h(v?.isDefault||false),y(v?.isPublic||false),p(true);},S=()=>{n({name:u,isDefault:f,isPublic:m,description:""}),p(false);};return l("div",{className:"orb-variant-management",children:[e(Ut,{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(st,{title:s("variant.saveView"),children:e(ie,{className:"orb-variant-save-button",onClick:g,size:"small",color:"primary",children:e(gr,{fontSize:"small"})})}),l(Ft,{open:c,onClose:()=>p(false),children:[e("div",{className:"orb-dialog-title",children:s("variant.saveView")}),l("div",{className:"orb-dialog-content",children:[e(He,{autoFocus:true,margin:"dense",label:s("variant.viewName"),fullWidth:true,variant:"outlined",value:u,onChange:b=>d(b.target.value)}),e(Nn,{control:e(Mt,{checked:f,onChange:b=>h(b.target.checked)}),label:s("variant.setDefault")}),e(Nn,{control:e(Mt,{checked:m,onChange:b=>y(b.target.checked)}),label:s("variant.publicAllUsers")})]}),l("div",{className:"orb-dialog-actions",children:[e(we,{onClick:()=>p(false),children:s("common.cancel")}),e(we,{onClick:S,variant:"contained",children:s("common.save")})]})]})]})};w();var Hd=({appId:t,tableKey:o="default",currentFilters:r,currentLayoutId:n,layoutRefs:a,onLoad:i,variantService:s,serviceUrl:c,onError:p,onSuccess:u,currentVariantId:d,onVariantChange:f})=>{let{t:h}=ue(),[m,y]=jt.useState([]),[v,g]=jt.useState(""),S=`orbcafe.variants.${t}.${o}`,b=d!==void 0?d:v,C=D=>{d===void 0&&g(D),f&&f(D);},k=jt.useCallback(()=>{try{let D=localStorage.getItem(S);if(!D)return [];let R=JSON.parse(D);return Array.isArray(R)?R:[]}catch{return []}},[S]),x=jt.useCallback(D=>{try{localStorage.setItem(S,JSON.stringify(D));}catch{}},[S]),E=jt.useCallback(D=>{y(D);let R=D.find(F=>F.isDefault);R&&!b&&(C(R.id),i(R));},[b,i,C]),M=jt.useCallback(async()=>{if(!t)return [];try{let D=[];if(s)D=await s.getVariants(t,o);else if(c){let R=await fetch(`${c}/api/variants?appId=${encodeURIComponent(t)}&tableKey=${encodeURIComponent(o)}`);if(!R.ok)throw new Error(h("variant.toast.fetchFailed"));D=await R.json();}else D=k();return E(D),D}catch(D){console.error("Error fetching variants",D);let R=k();return E(R),p&&p(h("variant.toast.fetchFailed")),R}},[t,o,s,c,k,E,p,h]);return jt.useEffect(()=>{M();},[t,o]),e(ai,{variants:m,currentVariantId:b,onLoad:D=>{C(D.id),i(D);},onSave:async D=>{let R=Date.now().toString(),F;try{let z=D.scope||"Both",Z=m.find(K=>K.name===D.name);R=Z?Z.id:Date.now().toString();let B=[];if(Z&&(Array.isArray(Z.filters)?B=[...Z.filters]:Z.filters&&(B=[{scope:"default",filters:Z.filters}])),z==="Search"||z==="Both"){let K=(Array.isArray(r),r);if(K)if(Array.isArray(K)&&K.length>0&&K[0].scope)K.forEach(Y=>{let G=B.findIndex(Q=>Q.scope===Y.scope);G>=0?B[G]=Y:B.push(Y);});else {let Y={scope:o,filters:K},G=B.findIndex(Q=>Q.scope===o);G>=0?B[G]=Y:B.push(Y);}}let _=Z?.layout||{},V=[];if(Z&&Array.isArray(Z.layoutRefs)&&(V=[...Z.layoutRefs]),z==="Layout"||z==="Both")if(a&&a.length>0)a.forEach(K=>{let Y=V.findIndex(G=>G.tableKey===K.tableKey);Y>=0?V[Y]=K:V.push(K);});else {let K={tableKey:o,layoutId:n||null},Y=V.findIndex(G=>G.tableKey===o);Y>=0?V[Y]=K:V.push(K);}if(F={appId:t,tableKey:o,...D,scope:z,id:R,createdAt:new Date().toISOString(),filters:B,layout:_,layoutRefs:V},s)await s.saveVariant(F,t,o);else if(c){if(!(await fetch(`${c}/api/variants`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)})).ok)throw new Error(h("variant.toast.saveFailed"))}else {let Y=m.some(G=>G.id===R)?m.map(G=>G.id===R?F:G):[...m,F];y(Y),x(Y);}u&&u(h("variant.toast.saveSuccess")),(s||c)&&await M(),C(R),i(F);}catch(z){console.error("Error saving variant",z);let B=m.some(_=>_.id===R)?m.map(_=>_.id===R?F:_):[...m,F];y(B),x(B),C(R),i(F),p&&p(h("variant.toast.saveFailed"));}},onDelete:async D=>{try{if(s)await s.deleteVariant(D);else if(c){if(!(await fetch(`${c}/api/variants/${D}`,{method:"DELETE"})).ok)throw new Error(h("variant.toast.deleteFailed"))}else {let R=m.filter(F=>F.id!==D);y(R),x(R);}b===D&&C(""),(s||c)&&M(),u&&u(h("variant.toast.deleteSuccess"));}catch(R){console.error("Error deleting variant",R);let F=m.filter(z=>z.id!==D);y(F),x(F),b===D&&C(""),p&&p(h("variant.toast.deleteFailed"));}},onSetDefault:async D=>{try{let R=m.find(z=>z.id===D);if(!R)return;let F={appId:t,tableKey:o,...R,isDefault:!0};if(s)await s.setDefaultVariant(D,t,o);else if(c){if(!(await fetch(`${c}/api/variants`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)})).ok)throw new Error(h("variant.toast.defaultFailed"))}else {let z=m.map(Z=>({...Z,isDefault:Z.id===D}));y(z),x(z);}(s||c)&&await M(),u&&u(h("variant.toast.defaultSuccess"));}catch(R){console.error("Error setting default variant",R);let F=m.map(z=>({...z,isDefault:z.id===D}));y(F),x(F),p&&p(h("variant.toast.defaultFailed"));}}})};w();Xo__default.default.extend(Sf__default.default);Xo__default.default.extend(wf__default.default);Xo__default.default.extend(sg__default.default);var Vn="YYYY-MM-DD",Tf=[null,null],Mr="0.85rem",Pf={en:"en",zh:"zh-cn",fr:"fr",de:"de",ja:"ja",ko:"ko"},If=({isInRange:t,isStart:o,isEnd:r,isHovered:n,disableMargin:a,sx:i,...s})=>{let c=ao();return e(Rc,{...s,sx:[...Array.isArray(i)?i:i?[i]:[],t?{borderRadius:0,backgroundColor:c.palette.primary.light,color:c.palette.primary.contrastText}:{},n&&!t&&!o&&!r?{borderRadius:0,backgroundColor:c.palette.action.hover,border:`1px dashed ${c.palette.primary.main}`}:{},o?{borderRadius:"50% 0 0 50%",backgroundColor:c.palette.primary.main,color:c.palette.primary.contrastText}:{},r?{borderRadius:"0 50% 50% 0",backgroundColor:c.palette.primary.main,color:c.palette.primary.contrastText}:{},o&&r?{borderRadius:"50%"}:{}]})},$d=({label:t,value:o=Tf,onChange:r})=>{let{t:n,locale:a}=ue(),i=Pf[a]||"en",s=t||n("dateRange.label"),[c,p]=jt.useState(null),[u,d]=jt.useState(o),[f,h]=jt.useState("start"),[m,y]=jt.useState(null),[v,g]=jt.useState((o[0]||Xo__default.default()).locale(i)),[S,b]=jt.useState(""),[C,k]=jt.useState(""),[x,E]=jt.useState(false),[M,I]=jt.useState(false),N=jt__namespace.default.useRef(o);jt.useEffect(()=>{let[K,Y]=o,[G,Q]=N.current,ne=me=>me&&typeof me.isSame=="function",be=!(K===null&&G===null||ne(K)&&ne(G)&&K.isSame(G,"day")),le=!(Y===null&&Q===null||ne(Y)&&ne(Q)&&Y.isSame(Q,"day"));(be||le)&&(d(o),o[0]&&ne(o[0])&&g(o[0].locale(i))),N.current=o;},[o,i]),jt.useEffect(()=>{b(u[0]?u[0].locale(i).format(Vn):""),k(u[1]?u[1].locale(i).format(Vn):""),E(false),I(false);},[u,i]);let A=(K,Y)=>{let G=Y.trim(),Q=K==="start"?E:I;if(!G){let le=K==="start"?[null,u[1]]:[u[0],null];Q(false),d(le);return}let ne=Xo__default.default(G,Vn,true).locale(i);if(!ne.isValid()){Q(true);return}Q(false);let be=[...u];if(K==="start")be[0]=ne,be[1]&&ne.isAfter(be[1],"day")&&(be[1]=null),h(be[1]?"start":"end");else {let le=be[0];le&&ne.isBefore(le,"day")?(be=[ne,null],h("end")):(be[1]=ne,h("start"));}d(be),g(ne);},T=K=>{p(K.currentTarget);},D=()=>{p(null),h("start"),y(null);},R=!!c,F=K=>{if(!K)return;let Y=[...u];if(f==="start")Y=[K,null],h("end");else {let G=Y[0];G&&K.isBefore(G)?(Y=[K,null],h("end")):(Y=[G,K],h("start"));}d(Y);},z=K=>{let Y=Xo__default.default().locale(i),G=[null,null];switch(K){case "today":G=[Y,Y];break;case "week":G=[Y.startOf("week"),Y.endOf("week")];break;case "month":G=[Y.startOf("month"),Y.endOf("month")];break}d(G),h("start"),g(Y);},Z=()=>{r&&r(u),D();},B=()=>{d(o),h("start"),D();},_=jt.useCallback(K=>{let{day:Y,...G}=K,[Q,ne]=u,be=Q?Y.isSame(Q,"day"):false,le=ne?Y.isSame(ne,"day"):false,me=Q&&ne?Y.isBetween(Q,ne,"day","()"):false,Ie=false;return f==="end"&&Q&&!ne&&m&&Y.isAfter(Q,"day")&&Y.isBefore(m.add(1,"day"),"day")&&(Ie=true),e(If,{...G,day:Y,disableMargin:true,isStart:be,isEnd:le,isInRange:me||Ie,onMouseEnter:()=>y(Y)})},[u,f,m]),V=K=>K?K.locale(i).format("YYYY-MM-DD"):"";return l("div",{className:"orb-date-range-picker",children:[e(He,{className:"orb-date-range-field",label:s,value:u[0]?`${V(u[0])} - ${V(u[1])}`:"",onClick:T,fullWidth:true,size:"small",InputLabelProps:{sx:{fontSize:Mr}},InputProps:{readOnly:true,sx:{fontSize:Mr,"& .orb-inp":{fontSize:Mr},paddingRight:"4px"},endAdornment:e(ie,{className:"orb-date-range-calendar-trigger",size:"small",onClick:T,tooltip:s,children:e(Kt,{name:"calendar",size:16})})}}),l(Na,{open:R,anchorEl:c,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:l(ae,{className:"orb-date-range-input-row",direction:"row",alignItems:"center",spacing:1.5,justifyContent:"space-between",children:[e(He,{className:"orb-date-range-manual-field",label:n("dateRange.startDate"),placeholder:Vn,value:S,error:x,size:"small",onFocus:()=>h("start"),onChange:K=>{b(K.target.value),x&&E(false);},onBlur:()=>A("start",S),onKeyDown:K=>{K.key==="Enter"&&(K.preventDefault(),A("start",S));},sx:{"& .orb-inp":{fontSize:Mr,py:.75},"& label":{fontSize:Mr}}}),e(Nc,{color:"action",fontSize:"small"}),e(He,{className:"orb-date-range-manual-field",label:n("dateRange.endDate"),placeholder:Vn,value:C,error:M,size:"small",onFocus:()=>{u[0]&&h("end");},onChange:K=>{k(K.target.value),M&&I(false);},onBlur:()=>A("end",C),onKeyDown:K=>{K.key==="Enter"&&(K.preventDefault(),A("end",C));},sx:{"& .orb-inp":{fontSize:Mr,py:.75},"& label":{fontSize:Mr}}})]})}),e("div",{className:"orb-date-range-shortcuts",children:l(ae,{direction:"row",spacing:1,justifyContent:"center",children:[e(Tt,{label:n("dateRange.today"),onClick:()=>z("today"),clickable:true,size:"small",variant:"outlined"}),e(Tt,{label:n("dateRange.thisWeek"),onClick:()=>z("week"),clickable:true,size:"small",variant:"outlined"}),e(Tt,{label:n("dateRange.thisMonth"),onClick:()=>z("month"),clickable:true,size:"small",variant:"outlined"})]})}),e("div",{className:"orb-date-range-calendar",children:e(Dc,{dateAdapter:Ra,adapterLocale:i,children:e(Mc,{value:null,referenceDate:v,onMonthChange:g,onYearChange:g,onChange:F,slots:{day:_},views:["year","month","day"],openTo:"day",showDaysOutsideCurrentMonth:true})})}),e(At,{}),l(ae,{direction:"row",justifyContent:"flex-end",spacing:1,sx:{p:2},children:[e(we,{size:"small",onClick:B,color:"inherit",children:n("common.cancel")}),e(we,{size:"small",variant:"contained",onClick:Z,children:n("common.done")})]})]})]})};w();var si={equals:"=",contains:"\u2287",notContains:"\u2285",wildcard:"*","=":"=","!=":"!=",">":">","<":"<",">=":"\u2265","<=":"\u2264",between:"\u2194"},Df={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"},Af=["contains","notContains",">",">=","<","<=","equals"],Ud=["=","!=",">","<",">=","<=","between"],to="0.85rem",Nf=({field:t,value:o,onChange:r})=>{let{t:n}=ue(),[a,i]=jt.useState(null),[s,c]=jt.useState(null),[p,u]=jt.useState(null),[d,f]=jt.useState(""),[h,m]=jt.useState(""),[y,v]=jt.useState(""),[g,S]=jt.useState("");jt.useEffect(()=>{let T=setTimeout(()=>{S(y);},1e3);return ()=>clearTimeout(T)},[y]);let b=o?.operator||(t.type==="number"?"=":"equals"),C=o?.value,k=T=>{let D=Df[T];return D?n(D):T},x=T=>{i(a?null:T.currentTarget);},E=T=>{r({...o,operator:T,value:C}),i(null);},M={size:"small",fullWidth:true,variant:"outlined",InputLabelProps:{sx:{fontSize:to}},InputProps:{sx:{fontSize:to}},SelectProps:{MenuProps:{PaperProps:{sx:{"& .orb-menu-item, & option":{fontSize:to,paddingTop:"4px",paddingBottom:"4px",minHeight:"auto"}}}}}},I=t.type||"text";if(I==="date"){let D=(R=>{if(!R)return [null,null];if(Array.isArray(R)&&R.length===2){let F=R[0]?Xo__default.default.isDayjs(R[0])?R[0]:Xo__default.default(R[0]):null,z=R[1]?Xo__default.default.isDayjs(R[1])?R[1]:Xo__default.default(R[1]):null;return [F,z]}return Xo__default.default.isDayjs(R)||typeof R=="string"?[Xo__default.default.isDayjs(R)?R:Xo__default.default(R),null]:[null,null]})(C);return e($d,{label:t.label,value:D,onChange:R=>r({value:R,operator:"between"})})}if(I==="number"&&b==="between"){let T=()=>{r({value:[d,h],operator:"between"}),c(null);},D=Array.isArray(C)?`${C[0]||""} - ${C[1]||""}`:"";return l(jsxRuntime.Fragment,{children:[e(He,{...M,label:t.label,value:D,placeholder:n("smartFilter.minMaxPlaceholder"),InputProps:{...M.InputProps,startAdornment:e(Jo,{position:"start",children:e(st,{title:k("between"),children:e(ie,{size:"small",onClick:x,sx:{width:24,height:24,fontSize:to},children:si.between})})}),readOnly:true},onClick:R=>c(s?null:R.currentTarget)}),e(Yt,{anchorEl:a,open:!!a,onClose:()=>i(null),PaperProps:{sx:{"& .orb-menu-item, & option":{fontSize:to,minHeight:"auto",py:.5}}},children:Ud.map(R=>l("option",{selected:R===b,onClick:()=>E(R),children:[e("div",{sx:{width:24,display:"inline-block",fontWeight:"bold"},children:si[R]}),e($t,{primary:k(R),primaryTypographyProps:{fontSize:to}})]},R))}),e(Na,{open:!!s,anchorEl:s,onClose:()=>c(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},children:l("div",{sx:{p:2,display:"flex",gap:1,alignItems:"center"},children:[e(He,{size:"small",label:n("smartFilter.min"),type:"number",value:d,onChange:R=>f(R.target.value),sx:{width:100},InputLabelProps:{sx:{fontSize:to}},InputProps:{sx:{fontSize:to}}}),e(Ec,{color:"action"}),e(He,{size:"small",label:n("smartFilter.max"),type:"number",value:h,onChange:R=>m(R.target.value),sx:{width:100},InputLabelProps:{sx:{fontSize:to}},InputProps:{sx:{fontSize:to}}}),e(we,{variant:"contained",size:"small",onClick:T,children:n("common.ok")})]})})]})}if(t.isValueHelp||I==="value-help"){let T=t.valueHelp?.mode||"single";return e(bd,{...M,...t.valueHelp,label:t.label,placeholder:t.placeholder||t.valueHelp?.placeholder,value:C??(T==="multiple"?[]:null),mode:T,onChange:D=>r({value:D,operator:T==="multiple"?"anyOf":"equals"})})}if(I==="select")return l(Ut,{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(I==="multi-select"){let T=Array.isArray(C)?C:[],D=t.options?.filter(_=>_.label.toLowerCase().includes(g.toLowerCase()))||[],R=_=>t.options?.find(V=>V.value===_)?.label||_,F=T.map(R),z=F.length===0?n("common.none"):F.length>2?`${F.slice(0,2).join(", ")} +${F.length-2}`:F.join(", "),Z=()=>{u(null),v(""),S("");},B=_=>{let V=T.includes(_)?T.filter(K=>K!==_):[...T,_];r({...o,value:V,operator:"anyOf"});};return l("div",{className:"orb-fld",children:[e("label",{children:t.label}),l(we,{variant:"outlined",size:"small",onClick:_=>u(p?null:_.currentTarget),sx:{width:"100%",minHeight:36,justifyContent:"space-between",fontSize:to,fontWeight:400},children:[e("span",{sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:z}),e(Oo,{fontSize:"small"})]}),e(Yt,{anchorEl:p,open:!!p,onClose:Z,PaperProps:{sx:{width:280,maxHeight:340,overflowY:"auto",p:.5}},children:l("div",{onClick:_=>_.stopPropagation(),sx:{display:"grid",gap:.35},children:[e(He,{size:"small",autoFocus:true,placeholder:n("smartFilter.searchPlaceholder"),fullWidth:true,InputProps:{startAdornment:e(Jo,{position:"start",children:e(Rr,{fontSize:"small"})}),sx:{fontSize:to}},value:y,onChange:_=>v(_.target.value),onKeyDown:_=>_.stopPropagation()}),D.length>0?D.map(_=>{let V=T.includes(_.value);return l("div",{role:"option","aria-selected":V,tabIndex:0,className:`orb-menu-item ${V?"orb-selected":""}`,onClick:()=>B(_.value),onKeyDown:K=>{(K.key==="Enter"||K.key===" ")&&(K.preventDefault(),B(_.value));},children:[e(Mt,{checked:V,size:"small",inputProps:{tabIndex:-1},sx:{pointerEvents:"none"}}),e($t,{primary:_.label})]},String(_.value))}):e("div",{className:"orb-menu-item","aria-disabled":"true",children:n("smartFilter.noOptionsFound")})]})})]})}let N=I==="number"?Ud:Af;return l(jsxRuntime.Fragment,{children:[e(He,{...M,className:"orb-filter-operator-field",label:t.label,sx:{minWidth:"120px"},value:C||"",type:I==="number"?"number":"text",onChange:T=>r({...o,value:T.target.value,operator:b}),InputProps:{...M.InputProps,startAdornment:e(Jo,{position:"start",children:e(st,{title:k(b),children:e(ie,{className:"orb-filter-operator-trigger",size:"small",onClick:x,onMouseDown:T=>T.preventDefault(),sx:{width:24,height:24,fontSize:to,fontWeight:"bold",color:"primary.main",bgcolor:"action.hover"},children:si[b]})})}),endAdornment:t.hasSearchIcon?e(Jo,{position:"end",children:e(Rr,{color:"action"})}):void 0}}),e(Yt,{anchorEl:a,open:!!a,onClose:()=>i(null),PaperProps:{sx:{"& .orb-menu-item, & option":{fontSize:to,minHeight:"auto",py:.5}}},children:N.map(T=>l("option",{selected:T===b,onClick:()=>E(T),children:[e("span",{className:"orb-filter-operator-symbol",children:si[T]}),e($t,{primary:k(T),primaryTypographyProps:{fontSize:to}})]},T))})]})},tr=({fields:t,filters:o,onFilterChange:r,variants:n=[],currentVariantId:a,onVariantLoad:i,onVariantSave:s,onVariantDelete:c,onVariantSetDefault:p,onSearch:u,loading:d=false,appId:f,tableKey:h,currentLayout:m,currentLayoutId:y,layoutRefs:v,variantService:g,serviceUrl:S})=>{let{t:b}=ue(),[C,k]=jt.useState(true),[x,E]=jt.useState(null),[M,I]=jt.useState(t.filter(D=>!D.hidden).map(D=>D.id)),N=(D,R)=>{r({...o,[D]:R});},A=D=>{M.includes(D)?I(M.filter(R=>R!==D)):I([...M,D]);};return l(Le,{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?l(jsxRuntime.Fragment,{children:[l("div",{className:"orb-smart-filter-header",children:[f?e(Hd,{appId:f,tableKey:h,currentFilters:{values:o,visibleFields:M},currentLayout:m,currentLayoutId:y,layoutRefs:v,onLoad:D=>{if(!D.filters)return;let R=null;if(Array.isArray(D.filters)){let F=h||"default",z=D.filters.find(Z=>Z.scope===F);R=z?z.filters:null;}else R=D.filters;R&&(R.values||R.visibleFields?(R.visibleFields&&Array.isArray(R.visibleFields)&&I(R.visibleFields),R.values&&r(R.values)):r(R)),i&&i(D);},variantService:g,serviceUrl:S,currentVariantId:a}):e(ai,{variants:n,currentVariantId:a,onLoad:i,onSave:D=>{s&&s({...D,filters:{values:o,visibleFields:M}});},onDelete:c,onSetDefault:p}),l("div",{className:"orb-smart-filter-actions",children:[e(st,{title:b("smartFilter.addFilters"),children:e(we,{className:"orb-smart-filter-adapt",onClick:D=>E(x?null:D.currentTarget),size:"small",color:"primary",startIcon:e(ad,{fontSize:"small"}),sx:{textTransform:"none",fontSize:to,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:u,disabled:d,children:d?e(sr,{size:16}):e(Kt,{name:"play",size:16})}),l(Yt,{anchorEl:x,open:!!x,onClose:()=>E(null),slotProps:{paper:{style:{maxHeight:400,width:"25ch"},sx:{"& .orb-menu-item, & option":{fontSize:to,minHeight:32}}}},children:[e("option",{disabled:true,children:e($t,{primary:b("smartFilter.visibleFilters"),primaryTypographyProps:{fontSize:to}})}),e(At,{}),t.map(D=>l("option",{onClick:()=>A(D.id),children:[e(Mt,{checked:M.includes(D.id),size:"small"}),e($t,{primary:D.label,primaryTypographyProps:{fontSize:to}})]},D.id))]})]})]}),e("div",{className:"orb-smart-filter-grid",children:e(ys,{container:true,spacing:2,columns:{xs:2,sm:3,md:4,lg:6},children:t.filter(D=>M.includes(D.id)).map(D=>e(ys,{size:1,children:e(Nf,{field:D,value:o[D.id]||{value:"",operator:D.type==="number"?"=":"equals"},onChange:R=>N(D.id,R)})},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(Oa,{className:"orb-smart-filter-toggle-icon",sx:{fontSize:20},color:"action"}):e(Oo,{className:"orb-smart-filter-toggle-icon",sx:{fontSize:20},color:"action"})})})]})};w();var _d=({layouts:t,currentLayoutId:o,onLoad:r,onSave:n,onDelete:a,onSetDefault:i})=>{let{t:s}=ue(),[c,p]=jt.useState(null),[u,d]=jt.useState(false),[f,h]=jt.useState(""),[m,y]=jt.useState(""),[v,g]=jt.useState({isDefault:false,isPublic:false}),S=t.find(M=>M.id===o),b=M=>{p(M.currentTarget);},C=()=>{p(null);},k=M=>{r(M),C();},x=()=>{h(""),y(""),g({isDefault:false,isPublic:false}),d(true),C();},E=()=>{f.trim()&&(n({name:f,description:m,...v}),d(false));};return l("div",{className:"orb-layout-actions",sx:{display:"flex",alignItems:"center",gap:.25},children:[e(st,{title:s("layout.layoutOptions"),children:e(ie,{onClick:b,color:S?"primary":"default",size:"small",children:e(pd,{fontSize:"small"})})}),l(Yt,{anchorEl:c,open:!!c,onClose:C,align:"end",PaperProps:{sx:{width:320,maxHeight:400}},children:[e("option",{disabled:true,children:e(L,{variant:"caption",children:s("layout.selectLayout")})}),l("option",{onClick:x,children:[e(Fo,{children:e(gr,{fontSize:"small"})}),e($t,{children:s("layout.saveCurrentLayout")})]}),e(At,{}),t.length===0&&e("option",{disabled:true,children:e(L,{variant:"body2",color:"text.secondary",children:s("layout.noSavedLayouts")})}),t.map((M,I)=>e("option",{onClick:()=>k(M),selected:M.id===o,children:l("div",{sx:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"},children:[l("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:M.id===o?"bold":"normal",noWrap:true,children:M.name})}),M.description&&e(L,{variant:"caption",color:"text.secondary",noWrap:true,children:M.description})]}),l("div",{sx:{display:"flex",alignItems:"center"},onClick:N=>N.stopPropagation(),children:[e(st,{title:M.isDefault?s("layout.removeDefault"):s("layout.setAsDefault"),children:e(ie,{size:"small",onClick:N=>{N.stopPropagation(),i(M.id);},children:M.isDefault?e(ld,{fontSize:"small",color:"warning"}):e(sd,{fontSize:"small"})})}),e(st,{title:s("common.delete"),children:e(ie,{size:"small",color:"error",onClick:N=>{N.stopPropagation(),a(M.id);},children:e(La,{fontSize:"small"})})})]})]})},M.id||I))]}),e(Ft,{open:u,onClose:()=>d(false),maxWidth:"xs",fullWidth:true,className:"orb-layout-save-dialog",title:s("layout.saveLayout"),actions:l(jsxRuntime.Fragment,{children:[e(we,{variant:"ghost",onClick:()=>d(false),children:s("common.cancel")}),e(we,{onClick:E,variant:"primary",disabled:!f.trim(),children:s("common.save")})]}),children:l("div",{className:"orb-layout-save-form",children:[e(He,{label:s("layout.layoutName"),value:f,onChange:M=>h(M.target.value),fullWidth:true,autoFocus:true,size:"small",helperText:s("layout.layoutNameHelper")}),t.some(M=>M.name===f)&&e(L,{className:"orb-layout-save-warning",variant:"caption",color:"warning.main",children:s("layout.warningOverwrite")}),e(He,{label:s("layout.layoutDescription"),value:m,onChange:M=>y(M.target.value),fullWidth:true,size:"small"}),e(Mt,{className:"orb-layout-save-option",checked:v.isDefault,onChange:M=>g({...v,isDefault:M.target.checked}),label:s("layout.useAsDefault")}),e(Mt,{className:"orb-layout-save-option",checked:v.isPublic,onChange:M=>g({...v,isPublic:M.target.checked}),label:s("layout.publicAllUsers")})]})})]})};w();var nn=({appId:t,tableKey:o="default",currentLayoutData:r,onLayoutLoad:n,targetLayoutId:a,activeLayoutId:i,serviceUrl:s,onError:c,onSuccess:p})=>{let{t:u}=ue(),[d,f]=jt.useState([]),[h,m]=jt.useState(""),y=`orbcafe.layouts.${t}.${o}`,v=I=>({id:I.layoutId,name:I.name,description:I.description??"",isDefault:!!I.isDefault,isPublic:!!I.isPublic,createdAt:I.createdAt??new Date().toISOString(),layoutData:I.layout??{}}),g=I=>({appId:t,tableKey:o,layoutId:I.id,name:I.name,description:I.description??"",isDefault:!!I.isDefault,isPublic:!!I.isPublic,createdAt:I.createdAt,layout:I.layoutData}),S=jt.useCallback(()=>{try{let I=localStorage.getItem(y);if(!I)return [];let N=JSON.parse(I);return Array.isArray(N)?N:[]}catch{return []}},[y]),b=jt.useCallback(I=>{try{localStorage.setItem(y,JSON.stringify(I));}catch{}},[y]);jt.useEffect(()=>{i!==void 0&&m(i);},[i]),jt.useEffect(()=>{if(a&&d.length>0){let I=d.find(N=>N.id===a);I&&(m(I.id),n(I));}},[a,d,n]);let C=jt.useCallback(async()=>{if(t){if(!s){let I=S();f(I);let N=I.find(A=>A.isDefault);N&&!h&&!a&&(m(N.id),n(N));return}try{let I=await fetch(`${s}/api/layouts?appId=${encodeURIComponent(t)}&tableKey=${encodeURIComponent(o)}`);if(!I.ok)throw new Error("LAYOUT_FETCH_FAILED");let A=(await I.json()).map(v);f(A);let T=A.find(D=>D.isDefault);T&&!h&&!a&&(m(T.id),n(T));}catch(I){console.error("Error fetching layouts",I);let N=S();f(N);let A=N.find(T=>T.isDefault);A&&!h&&!a&&(m(A.id),n(A)),c&&c(u("layout.toast.loadFallback"));}}},[t,o,s,c,h,n,a,S,u]);return jt.useEffect(()=>{C();},[t,o]),e(_d,{layouts:d,currentLayoutId:h,onLoad:I=>{m(I.id),n(I);},onSave:async I=>{let N=d.find(D=>D.name===I.name),A=N?N.id:Date.now().toString(),T={id:A,...I,createdAt:new Date().toISOString(),layoutData:r,isDefault:I.isDefault??false,isPublic:I.isPublic??false};if(!s){let R=d.some(F=>F.id===A)?d.map(F=>F.id===A?T:F):[...d,T];f(R),b(R),m(A),n(T),p&&p(u("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");p&&p(u("layout.toast.saveSuccess")),await C(),m(A),n(T);}catch(D){console.error("Error saving layout",D);let F=d.some(z=>z.id===A)?d.map(z=>z.id===A?T:z):[...d,T];f(F),b(F),m(A),n(T),p&&p(u("layout.toast.saveLocalSuccess")),c&&c(u("layout.toast.backendUnavailableSavedLocal"));}},onDelete:async I=>{if(!s){let N=d.filter(A=>A.id!==I);f(N),b(N),h===I&&m(""),p&&p(u("layout.toast.deleteLocalSuccess"));return}try{if(!(await fetch(`${s}/api/layouts/${encodeURIComponent(I)}`,{method:"DELETE"})).ok)throw new Error("LAYOUT_DELETE_FAILED");h===I&&m(""),p&&p(u("layout.toast.deleteSuccess")),await C();}catch(N){console.error("Error deleting layout",N);let A=d.filter(T=>T.id!==I);f(A),b(A),h===I&&m(""),p&&p(u("layout.toast.deleteLocalSuccess")),c&&c(u("layout.toast.backendUnavailableDeletedLocal"));}},onSetDefault:async I=>{if(!s){let N=d.map(A=>({...A,isDefault:A.id===I}));f(N),b(N),p&&p(u("layout.toast.defaultLocalSuccess"));return}try{let N=d.find(T=>T.id===I);if(!N)return;if(!(await fetch(`${s}/api/layouts`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g({...N,isDefault:!0}))})).ok)throw new Error("LAYOUT_DEFAULT_FAILED");p&&p(u("layout.toast.defaultSuccess")),await C();}catch(N){console.error("Error setting default",N);let A=d.map(T=>({...T,isDefault:T.id===I}));f(A),b(A),p&&p(u("layout.toast.defaultLocalSuccess")),c&&c(u("layout.toast.backendUnavailableDefaultLocal"));}}})};var qd=(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},li=(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 Xd(t,o,r){return o[r]<t[r]?-1:o[r]>t[r]?1:0}function Ef(t,o){return t==="desc"?(r,n)=>Xd(r,n,o):(r,n)=>-Xd(r,n,o)}function Lf(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 an=t=>{let o=!!t.disableGrouping,r=!!t.disableSorting,n=jt.useCallback(W=>{let te=String(W?.label??W?.id??"").length*9+64,Re=typeof W?.minWidth=="number"?W.minWidth:0;return Math.max(100,Re,te)},[]),a=jt.useCallback(()=>(t.columns||[]).filter(W=>!!W?.numeric).map(W=>W.id),[t.columns]),[i,s]=jt.useState(""),[c,p]=jt.useState(t.order||"asc"),[u,d]=jt.useState(t.orderBy||""),[f,h]=jt.useState([]),[m,y]=jt.useState(t.page||0),[v,g]=jt.useState(t.rowsPerPage||20),[S,b]=jt.useState(t.selected||[]),[C,k]=jt.useState(t.columns?t.columns.map(W=>W.id):[]),[x,E]=jt.useState(t.columns?t.columns.map(W=>W.id):[]),[M,I]=jt.useState(t.showSummary||false),[N,A]=jt.useState(()=>a()),[T,D]=jt.useState([]),[R,F]=jt.useState(new Set),[z,Z]=jt.useState(()=>{let W={};return (t.columns||[]).forEach(j=>{W[j.id]=n(j);}),W}),[B,_]=jt.useState(null),[V,K]=jt.useState(null),[Y,G]=jt.useState(null),[Q,ne]=jt.useState(null),[be,le]=jt.useState(false),[me,Ie]=jt.useState(""),[nt,Xe]=jt.useState(""),De=o?[]:T,Ge=jt.useCallback(W=>{if(o){D([]),F(new Set),K(null);return}D(W);},[o]);jt.useEffect(()=>{o&&(D([]),F(new Set),K(null));},[o]),jt.useEffect(()=>{r&&(p("asc"),d(""),h([]));},[r]),jt.useEffect(()=>{t.layout&&Ze(t.layout);},[t.layout]),jt.useEffect(()=>{if(r){p("asc"),d("");return}t.order!==void 0&&p(t.order),t.orderBy!==void 0&&d(t.orderBy);},[t.order,t.orderBy,r]),jt.useEffect(()=>{t.selected!==void 0&&b(t.selected);},[t.selected]),jt.useEffect(()=>{t.page!==void 0&&y(t.page);},[t.page]),jt.useEffect(()=>{t.rowsPerPage!==void 0&&g(t.rowsPerPage);},[t.rowsPerPage]),jt.useEffect(()=>{let W=a();A(j=>j.filter(Re=>W.includes(Re)));},[a]),jt.useEffect(()=>{Z(W=>{let j={...W};return (t.columns||[]).forEach(te=>{j[te.id]===void 0&&(j[te.id]=n(te));}),j});},[t.columns,n]),jt.useEffect(()=>{E(W=>{let j=(t.columns||[]).map(at=>at.id),te=new Set(j),Re=W.filter(at=>te.has(at)),ke=new Set(Re),ze=j.filter(at=>!ke.has(at)),ot=[...Re,...ze];return ot.length===W.length&&ot.every((at,it)=>at===W[it])?W:ot});},[t.columns]);let xe=jt.useMemo(()=>{let W=t.columns||[];if(x.length===0)return W;let j=new Map(W.map(ke=>[ke.id,ke])),te=[],Re=new Set;return x.forEach(ke=>{let ze=j.get(ke);ze&&(te.push(ze),Re.add(ke));}),W.forEach(ke=>{Re.has(ke.id)||te.push(ke);}),te},[t.columns,x]),ye=jt.useMemo(()=>{let W=t.rows||[];return i&&(W=W.filter(j=>Object.keys(j).some(te=>String(j[te]).toLowerCase().includes(i.toLowerCase())))),W},[t.rows,i]),We=jt.useMemo(()=>{if(r||t.onSortChange)return ye;if(f.length>0){let W=[...ye];return W.sort((j,te)=>{for(let Re of f){let ke=j?.[Re.field],ze=te?.[Re.field];if(!(ke==null&&ze==null)){if(ke==null)return Re.direction==="asc"?-1:1;if(ze==null)return Re.direction==="asc"?1:-1;if(ke<ze)return Re.direction==="asc"?-1:1;if(ke>ze)return Re.direction==="asc"?1:-1}}return 0}),W}return u?Lf(ye,Ef(c,u)):ye},[ye,c,u,f,t.onSortChange,r]),tt=jt.useCallback(W=>{if(De.length===0)return W.map(ze=>({type:"row",data:ze,id:ze[t.rowKey||"id"]}));let j=[...W].sort((ze,ot)=>{for(let at of De){if(ze[at]<ot[at])return -1;if(ze[at]>ot[at])return 1}return 0}),te=(ze,ot=0)=>{if(ot>=De.length)return ze;let at=De[ot],it={},wt=[];return ze.forEach(Et=>{let Nt=Et[at],Dt=`${at}:${Nt}`;it[Dt]||(it[Dt]={key:Dt,field:at,value:Nt,children:[],count:0,level:ot},wt.push(it[Dt])),it[Dt].children.push(Et),it[Dt].count++;}),wt.forEach(Et=>{Et.children&&(Et.children=te(Et.children,ot+1));}),wt},Re=te(j),ke=(ze,ot="")=>{let at=[];return ze.forEach(it=>{if(it.children){let wt=ot?`${ot}>${it.key}`:it.key,Et=R.has(wt);at.push({type:"group",id:wt,field:it.field,value:it.value,level:it.level,count:it.count,isExpanded:Et,childIds:(function Nt(Dt){let O=[];return Dt.children.forEach(q=>{q.children?O=O.concat(Nt(q)):O.push(q[t.rowKey||"id"]);}),O})(it)}),Et&&(at=at.concat(ke(it.children,wt)));}else at.push({type:"row",data:it,id:it[t.rowKey||"id"],level:De.length});}),at};return ke(Re)},[De,R,t.rowKey]),gt=jt.useCallback(W=>{if(De.length===0)return [];let j=[...W].sort((ke,ze)=>{for(let ot of De){if(ke[ot]<ze[ot])return -1;if(ke[ot]>ze[ot])return 1}return 0}),te=[],Re=(ke,ze,ot)=>{if(ze>=De.length)return;let at=De[ze],it=new Map;ke.forEach(wt=>{let Et=wt[at],Nt=it.get(Et);Nt?Nt.push(wt):it.set(Et,[wt]);}),it.forEach((wt,Et)=>{let Nt=`${at}:${Et}`,Dt=ot?`${ot}>${Nt}`:Nt;te.push(Dt),Re(wt,ze+1,Dt);});};return Re(j,0,""),te},[De]),ct=jt.useMemo(()=>tt(We),[We,tt]),ee=jt.useMemo(()=>gt(We),[We,gt]),Ve=jt.useMemo(()=>{let W=(t.rows||[]).length;return typeof t.count=="number"&&t.count>W},[t.count,t.rows]),Te=jt.useMemo(()=>Ve?ct:v>0?ct.slice(m*v,m*v+v):ct,[ct,m,v,Ve]),Ae=jt.useMemo(()=>Ve&&typeof t.count=="number"?t.count:ct.length,[ct.length,Ve,t.count]),pt=W=>{F(j=>{let te=new Set(j);return te.has(W)?te.delete(W):te.add(W),te});},Qe=W=>{let j=ee.filter(te=>te===W||te.startsWith(`${W}>`));F(te=>{let Re=new Set(te);return j.forEach(ke=>Re.add(ke)),Re});},vt=W=>{F(j=>{let te=new Set(j);return Array.from(te).forEach(Re=>{(Re===W||Re.startsWith(`${W}>`))&&te.delete(Re);}),te});},xt=W=>{if(!W){F(new Set);return}F(new Set(ee));},Vt=W=>{let j=ee.filter(te=>te.startsWith(`${W}>`));return j.length===0?R.has(W):R.has(W)&&j.every(te=>R.has(te))},_t=W=>{if(r)return;f.length>0&&h([]);let j=u===W&&c==="asc",te=u===W&&c==="desc";if(t.onSortChange){j?t.onSortChange(W,"desc"):te?t.onSortChange("","asc"):t.onSortChange(W,"asc");return}j?(p("desc"),d(W)):te?(p("asc"),d("")):(p("asc"),d(W));},J=W=>{if(r){p("asc"),d(""),h([]);return}let j=W.filter(te=>te&&te.field);h(j),j.length>0&&d("");},Je=()=>{h([]);},Be=(W,j)=>{Z(te=>({...te,[W]:j}));},se=W=>{if(W.target.checked){let j=ye.map(te=>te[t.rowKey||"id"]);b(j),t.onSelectionChange&&t.onSelectionChange(j);return}b([]),t.onSelectionChange&&t.onSelectionChange([]);},ge=(W,j)=>{let te=j[t.rowKey||"id"],Re=S.indexOf(te),ke=[];Re===-1?ke=ke.concat(S,te):Re===0?ke=ke.concat(S.slice(1)):Re===S.length-1?ke=ke.concat(S.slice(0,-1)):Re>0&&(ke=ke.concat(S.slice(0,Re),S.slice(Re+1))),b(ke),t.onSelectionChange&&t.onSelectionChange(ke);},U=W=>{y(W),t.onPageChange&&t.onPageChange(W);},fe=W=>{g(W),y(0),t.onPageChange&&t.onPageChange(0),t.onRowsPerPageChange&&t.onRowsPerPageChange(W);},Pe=W=>{let j=C.indexOf(W),te=[...C];j===-1?te.push(W):te.splice(j,1),k(te);},_e=W=>{if(o)return;let j=De.indexOf(W),te=[...De];j===-1?te.push(W):te.splice(j,1),Ge(te);},ft=W=>{a().includes(W)&&A(te=>te.includes(W)?te.filter(Re=>Re!==W):[...te,W]);},ut=(W,j)=>{!W||!j||W===j||E(te=>{let Re=te.indexOf(W),ke=te.indexOf(j);if(Re===-1||ke===-1)return te;let ze=[...te];return ze.splice(Re,1),ze.splice(ke,0,W),ze});},Ot=W=>{let j=W?.active?.id,te=W?.over?.id;typeof j=="string"&&typeof te=="string"&&ut(j,te);},Ce=W=>{t.onLayoutSave&&t.onLayoutSave({visibleColumns:C,columnOrder:x,order:r?"asc":c,orderBy:r?"":u,sortBy:r?[]:f,grouping:De,columnWidths:z,showSummary:M,summaryColumns:N});},Oe=W=>{let{layout:j,layoutId:te}=li(W,t.tableKey||"default");te?(Xe(te),Ie(te)):(Xe(""),Ie("")),j&&(j.visibleColumns&&k(j.visibleColumns),Array.isArray(j.columnOrder)&&E(j.columnOrder),r?(p("asc"),d(""),h([])):(j.order&&p(j.order),j.orderBy&&d(j.orderBy),Array.isArray(j.sortBy)&&h(j.sortBy)),j.grouping&&Ge(j.grouping),j.columnWidths&&Z(j.columnWidths),j.showSummary!==void 0&&I(!!j.showSummary),Array.isArray(j.summaryColumns)&&A(j.summaryColumns));},Ze=W=>{let j=W?.layoutData||W?.layout||W||{};j.visibleColumns&&k(j.visibleColumns),Array.isArray(j.columnOrder)&&E(j.columnOrder),r?(p("asc"),d(""),h([])):(j.order&&p(j.order),j.orderBy!==void 0&&d(j.orderBy),Array.isArray(j.sortBy)&&h(j.sortBy)),j.grouping&&Ge(j.grouping),j.columnWidths&&Z(j.columnWidths),j.showSummary!==void 0&&I(!!j.showSummary),Array.isArray(j.summaryColumns)&&A(j.summaryColumns),F(new Set),y(0),W?.id&&Ie(W.id),Xe("");};jt.useEffect(()=>{t.layout&&Oe({layout:t.layout});},[t.layout]);let Xt=W=>{W.preventDefault(),ne(Q===null?{mouseX:W.clientX+2,mouseY:W.clientY-6}:null);},St=()=>{ne(null);},Ct=jt.useMemo(()=>{if(!M)return {};let W={};t.columns.forEach(te=>{if(te.numeric&&N.includes(te.id)){let Re=ye.reduce((ke,ze)=>{let ot=parseFloat(ze[te.id]);return ke+(isNaN(ot)?0:ot)},0);W[te.id]=Re.toFixed(2);}else W[te.id]="";});let j=t.columns.find(te=>C.includes(te.id)&&!te.numeric);return j&&!j.numeric&&(W[j.id]="Total"),W},[ye,t.columns,M,N,C]),et=()=>{if(!t.columns||!ye)return;let W=t.columns.map(ze=>ze.label).join(","),j=ye.map(ze=>t.columns.map(ot=>{let at=ze[ot.id];return `"${(at==null?"":String(at)).replace(/"/g,'""')}"`}).join(",")).join(`
|
|
184
|
+
`),te=`data:text/csv;charset=utf-8,${W}
|
|
185
|
+
${j}`,Re=encodeURI(te),ke=document.createElement("a");ke.setAttribute("href",Re),ke.setAttribute("download",`${t.title||"export"}.csv`),document.body.appendChild(ke),ke.click(),document.body.removeChild(ke);},Pt=()=>{le(true);},Bt=()=>{le(false);};return {isMobile:false,columns:xe,order:c,setOrder:p,orderBy:u,setOrderBy:d,sortBy:f,setSortBy:h,applyMultiSort:J,clearMultiSort:Je,columnOrder:x,setColumnOrder:E,filterText:i,setFilterText:s,visibleColumns:C,setVisibleColumns:k,showSummary:M,setShowSummary:I,summaryColumns:N,grouping:De,setGrouping:Ge,expandedGroups:R,setExpandedGroups:F,groupAnchorEl:V,setGroupAnchorEl:K,summaryAnchorEl:Y,setSummaryAnchorEl:G,columnWidths:z,setColumnWidths:Z,anchorEl:B,setAnchorEl:_,contextMenu:Q,setContextMenu:ne,sensors:void 0,sortedAndFilteredRows:We,visibleRows:Te,summaryRow:Ct,page:m,setPage:U,rowsPerPage:v,setRowsPerPage:fe,totalDisplayCount:Ae,selected:S,setSelected:b,isAllExpanded:ee.length>0&&ee.every(W=>R.has(W)),handleColumnResize:Be,handleRequestSort:_t,handleSelectAllClick:se,handleClick:ge,toggleSummaryColumn:ft,handleDragEnd:Ot,handleColumnReorder:ut,handleExport:et,handleContextMenu:Xt,handleCloseContextMenu:St,toggleColumnVisibility:Pe,toggleGroupExpand:pt,toggleGroupField:_e,handleToggleAll:xt,handleExpandGroupRecursively:Qe,handleCollapseGroupRecursively:vt,isGroupFullyExpanded:Vt,handleLayoutLoad:Ze,handleVariantLoad:Oe,handleLayoutSave:Ce,effectiveAppId:t.appId||"",currentLayoutData:{visibleColumns:C,order:r?"asc":c,orderBy:r?"":u,sortBy:r?[]:f,columnOrder:x,grouping:De,columnWidths:z,showSummary:M,summaryColumns:N},currentLayoutId:me,layoutIdToLoad:nt,onPageChange:U,onRowsPerPageChange:fe,graphReportOpen:be,handleOpenGraphReport:Pt,handleCloseGraphReport:Bt}};w();var J1=t=>e("tbody",{...t}),eI=({align:t,...o})=>e("td",{align:t==="inherit"?void 0:t,...o}),tI=t=>e("div",{...t}),oI=t=>e("thead",{...t}),rI=t=>e("tr",{...t}),_o=t=>{let{t:o}=ue(),r="0.85rem",{title:n,showToolbar:a=true,selectionMode:i,selected:s=[],onSelectionChange:c,actions:p,extraTools:u,fitContainer:d=false,fullWidth:f=false,maxHeight:h,loading:m=false,rowsPerPageOptions:y=[20,50,100,-1],onLayoutSave:v,filterConfig:g,rowKey:S,tableKey:b="default",graphReport:C,quickCreate:k,quickEdit:x,quickDelete:E,serviceUrl:M,disableGrouping:I=false,disableSorting:N=false}=t,A=n||o("table.title.default"),{isMobile:T,columns:D,order:R,orderBy:F,filterText:z,setFilterText:Z,visibleColumns:B,showSummary:_,setShowSummary:V,summaryColumns:K,grouping:Y,setGrouping:G,expandedGroups:Q,groupAnchorEl:ne,setGroupAnchorEl:be,summaryAnchorEl:le,setSummaryAnchorEl:me,columnWidths:Ie,anchorEl:nt,setAnchorEl:Xe,contextMenu:De,sensors:Ge,sortedAndFilteredRows:xe,summaryRow:ye,visibleRows:We,isAllExpanded:tt,page:gt,setPage:ct,rowsPerPage:ee,setRowsPerPage:Ve,totalDisplayCount:Te,setSelected:Ae,handleColumnResize:pt,handleRequestSort:Qe,handleSelectAllClick:vt,handleClick:xt,toggleSummaryColumn:Vt,handleDragEnd:_t,handleExport:J,handleContextMenu:Je,handleCloseContextMenu:Be,toggleColumnVisibility:se,toggleGroupExpand:ge,handleToggleAll:U,handleExpandGroupRecursively:fe,handleCollapseGroupRecursively:Pe,isGroupFullyExpanded:_e,handleLayoutLoad:ft,handleVariantLoad:ut,handleLayoutSave:Ot,effectiveAppId:Ce,currentLayoutData:Oe,currentLayoutId:Ze,layoutIdToLoad:Xt,graphReportOpen:St,handleOpenGraphReport:Ct,handleCloseGraphReport:et}=an(t),Pt=C?.enabled??false,Bt=Pt&&(C?.interaction?.enabled??true),W=ri(),j=!!k?.enabled,te=!!x?.enabled,Re=!!E?.enabled,ke=k?.fields,ze=k?.excludeFields||[],ot=k?.initialValues||{},[at,it]=jt__namespace.default.useState(false),[wt,Et]=jt__namespace.default.useState(false),[Nt,Dt]=jt__namespace.default.useState({}),[O,q]=jt__namespace.default.useState(false),[pe,ve]=jt__namespace.default.useState(false),[je,Ke]=jt__namespace.default.useState({}),[It,yt]=jt__namespace.default.useState(false),[ht,kt]=jt__namespace.default.useState(false),oo=m||wt||pe||ht,Lt=jt__namespace.default.useMemo(()=>{let oe=[...D];if(Array.isArray(ke)&&ke.length>0){let de=new Set(ke);oe=oe.filter(X=>de.has(X.id));}if(ze.length>0){let de=new Set(ze);oe=oe.filter(X=>!de.has(X.id));}return oe.filter(de=>!!de?.id)},[D,ze,ke]),Zt=S||"id",zt=jt__namespace.default.useMemo(()=>{let oe=new Set(s);return xe.filter(de=>oe.has(de?.[Zt]))},[s,xe,Zt]),Gt=zt.length===1?zt[0]:null,Ht=x?.fields,eo=x?.excludeFields||[],ro=x?.editableFields||[],mo=x?.nonEditableFields||[],To=x?.primaryKeys?.length?x.primaryKeys:[Zt],Po=jt__namespace.default.useMemo(()=>{let oe=[...D];if(Array.isArray(Ht)&&Ht.length>0){let de=new Set(Ht);oe=oe.filter(X=>de.has(X.id));}if(eo.length>0){let de=new Set(eo);oe=oe.filter(X=>!de.has(X.id));}return oe.filter(de=>!!de?.id)},[D,eo,Ht]),Zo=jt__namespace.default.useMemo(()=>new Set(To),[To]),bo=jt__namespace.default.useMemo(()=>new Set(ro),[ro]),Eo=jt__namespace.default.useMemo(()=>new Set(mo),[mo]),Or=jt__namespace.default.useCallback(oe=>bo.size>0?bo.has(oe):!(Eo.has(oe)||Zo.has(oe)),[bo,Eo,Zo]);jt__namespace.default.useEffect(()=>{!St&&W.hasActiveFilters&&W.clearAll();},[St,W.hasActiveFilters,W.clearAll]);let Br=()=>{let oe={};Lt.forEach(de=>{oe[de.id]=ot[de.id]??"";}),Dt(oe),it(true);},Sr=()=>{wt||it(false);},zr=(oe,de)=>{Dt(X=>({...X,[oe]:de}));},Vr=async()=>{if(!k?.onSubmit){it(false);return}try{Et(!0),await k.onSubmit(Nt),it(!1);}finally{Et(false);}},Io=()=>{if(!Gt)return;let oe={};Po.forEach(X=>{oe[X.id]=Gt[X.id]??"";});let de=x?.getInitialValues?{...oe,...x.getInitialValues(Gt)}:oe;Ke(de),q(true);},wr=()=>{pe||q(false);},Hr=(oe,de)=>{Ke(X=>({...X,[oe]:de}));},Ho=async()=>{if(Gt){if(!x?.onSubmit){q(false);return}try{ve(!0),await x.onSubmit(je,Gt),q(!1);}finally{ve(false);}}},Yo=()=>{zt.length!==0&&yt(true);},hn=()=>{ht||yt(false);},kr=async()=>{if(zt.length===0){yt(false);return}if(!E?.onConfirm){yt(false),Ae([]),c?.([]);return}try{kt(!0),await E.onConfirm(zt),yt(!1),Ae([]),c?.([]);}finally{kt(false);}},P=xe,{fieldMapping:H}=tn({rows:P,config:{...C,title:C?.title||`${A} ${o("graph.reportTitle")}`}}),$=jt__namespace.default.useMemo(()=>Bt?W.applyRows(P,H):P,[Bt,W.applyRows,P,H]),{model:ce}=tn({rows:$,config:{...C,title:C?.title||`${A} ${o("graph.reportTitle")}`,fieldMapping:H}}),Fe=ce.table.columns.map(oe=>({id:oe.id,label:oe.label,align:oe.align||"left",minWidth:120,numeric:oe.align==="right"})),rt=Ce?e(nn,{appId:Ce,tableKey:b,currentLayoutData:Oe,onLayoutLoad:ft,targetLayoutId:Xt,activeLayoutId:Ze,serviceUrl:M??g?.serviceUrl}):null,$e=l(jsxRuntime.Fragment,{children:[!I&&e(Jr,{groupAnchorEl:ne,setGroupAnchorEl:be,grouping:Y,setGrouping:G,columns:D}),e(en,{anchorEl:nt,setAnchorEl:Xe,columns:D,visibleColumns:B,toggleColumnVisibility:se}),e(Za,{anchorEl:le,setAnchorEl:me,showSummary:_,setShowSummary:V,columns:D,summaryColumns:K,toggleSummaryColumn:Vt}),e(Ya,{contextMenu:De,handleCloseContextMenu:Be,columns:D,visibleColumns:B,toggleColumnVisibility:se})]});return T?l("div",{sx:{display:"flex",flexDirection:"column",gap:2,height:"100%"},children:[g&&e(tr,{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:Oe}],variantService:g.variantService,serviceUrl:M??g.serviceUrl}),e(Cd,{title:A,loading:m,showSummary:_,setShowSummary:V,setAnchorEl:Xe,setSummaryAnchorEl:me,filterText:z,setFilterText:Z,sortedAndFilteredRows:xe,selected:s,columns:D,visibleColumns:B,summaryRow:ye,handleClick:xt,selectionMode:i}),$e]}):l("div",{sx:{width:f?"100%":"auto",mb:d?0:2,...d?{flex:1,display:"flex",flexDirection:"column",minHeight:0,height:"100%",overflow:"hidden"}:{}},children:[g&&e("div",{sx:{mb:2},children:e(tr,{fields:g.fields,filters:g.filters,onFilterChange:g.onFilterChange,onSearch:g.onSearch,variants:g.variants||[],currentVariantId:g.currentVariantId,onVariantLoad:oe=>{ut(oe),g.onVariantLoad&&g.onVariantLoad(oe);},onVariantSave:g.onVariantSave,onVariantDelete:g.onVariantDelete,onVariantSetDefault:g.onVariantSetDefault,loading:m,appId:g.appId,tableKey:b,currentLayout:[{tableKey:b,layoutData:Oe}],currentLayoutId:Ze,layoutRefs:[{tableKey:b,layoutId:Ze}],variantService:g.variantService,serviceUrl:M??g.serviceUrl})}),l(Le,{className:"orb-ctable-surface",sx:{width:f?"100%":"auto",mb:d?0:2,display:"flex",flexDirection:"column",overflow:"hidden",position:"relative","&::before":oo?{content:'""',position:"absolute",top:0,left:0,width:"100%",height:"3px",background:"linear-gradient(90deg, rgba(25, 118, 210, 0) 0%, rgba(25, 118, 210, 0.25) 25%, rgba(25, 118, 210, 1) 50%, rgba(25, 118, 210, 0.25) 75%, rgba(25, 118, 210, 0) 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}:d?{flex:1,minHeight:0,height:"100%"}:{}},children:[a&&e(_a,{filterText:z,setFilterText:Z,onRowsPerPageChange:Ve,rowsPerPage:ee,rowsPerPageOptions:y,page:gt,count:Te,onPageChange:ct,actions:p,extraTools:u,grouping:Y,disableGrouping:I,groupAnchorEl:ne,setGroupAnchorEl:be,showSummary:_,setShowSummary:V,anchorEl:nt,setAnchorEl:Xe,summaryAnchorEl:le,setSummaryAnchorEl:me,handleExport:J,showCreateButton:j,onOpenCreateDialog:Br,showEditButton:te,onOpenEditDialog:Io,editDisabled:zt.length!==1,showDeleteButton:Re,onOpenDeleteConfirm:Yo,deleteDisabled:zt.length===0,onLayoutSave:v||g?.variantService&&g?.appId?Ot:void 0,loading:m,layoutManager:rt,onOpenGraphReport:Pt?Ct:void 0}),e("div",{sx:{flex:1,...h?{maxHeight:h,height:h}:d?{height:0,maxHeight:"none"}:{maxHeight:"calc(100vh - 320px)"},overflowY:"auto",overflowX:"auto",position:"relative",minHeight:0},children:e(core.DndContext,{sensors:Ge,collisionDetection:core.closestCenter,onDragEnd:_t,modifiers:[modifiers.restrictToHorizontalAxis],children:l("table",{className:"orb-tbl orb-ctable",style:{minWidth:f?750:void 0,width:f?"100%":"auto",tableLayout:Object.keys(Ie).length>0?"fixed":"auto",borderCollapse:"separate",borderSpacing:0,fontSize:r},"aria-labelledby":"tableTitle",children:[e(qa,{columns:D,visibleColumns:B,order:R,orderBy:F,onRequestSort:Qe,disableSorting:N,onContextMenu:Je,selectionMode:i,grouping:Y,isAllExpanded:tt,handleToggleAll:U,rowCount:xe.length,numSelected:s.length,onSelectAllClick:vt,columnWidths:Ie,onColumnResize:pt}),e(Xa,{visibleRows:We,columns:D,visibleColumns:B,selectionMode:i,selected:s,orderBy:F,loading:m,expandedGroups:Q,toggleGroupExpand:ge,handleExpandGroupRecursively:fe,handleCollapseGroupRecursively:Pe,isGroupFullyExpanded:_e,handleClick:xt,onSelectionChange:c,grouping:Y,rowKeyProp:S,page:gt,rowsPerPage:ee}),_&&e(xd,{showSummary:_,columns:D,visibleColumns:B,summaryRow:ye,selectionMode:i?.toString(),grouping:Y,columnWidths:Ie,orderBy:F,zIndex:3})]})})})]}),j&&l(Ft,{open:at,onClose:Sr,fullWidth:true,maxWidth:"sm",slotProps:{paper:{sx:{borderRadius:2,border:oe=>`1px solid ${oe.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:l("div",{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[Lt.map(oe=>{let de=oe.type==="number"||oe.numeric?"number":oe.type==="date"?"date":"text",X=oe.label||oe.id;return e(He,{label:X,value:Nt[oe.id]??"",onChange:Me=>zr(oe.id,Me.target.value),type:de,size:"small",fullWidth:true,InputLabelProps:{shrink:de==="date"?true:void 0,sx:{fontSize:"0.85rem"}},InputProps:{sx:{fontSize:"0.85rem"}}},`quick-create-${oe.id}`)}),k?.description&&e(Go,{severity:"info",sx:{fontSize:"0.85rem","& span":{fontSize:"0.85rem"}},children:k.description})]})}),l("div",{className:"orb-dialog-actions",sx:{px:3,pb:2},children:[e(we,{onClick:Sr,sx:{fontSize:"0.85rem"},disabled:wt,children:k?.cancelLabel||o("common.cancel")}),e(we,{onClick:Vr,variant:"contained",sx:{fontSize:"0.85rem",fontWeight:700},disabled:wt,children:k?.submitLabel||o("common.save")})]})]}),te&&l(Ft,{open:O,onClose:wr,fullWidth:true,maxWidth:"sm",slotProps:{paper:{sx:{borderRadius:2,border:oe=>`1px solid ${oe.palette.divider}`,bgcolor:"background.paper"}}},children:[e("div",{className:"orb-dialog-title",sx:{fontSize:"0.85rem",fontWeight:700,pb:1},children:x?.title||o("quickEdit.editWithTitle",{title:A})}),e("div",{className:"orb-dialog-content",sx:{pt:"8px !important"},children:l("div",{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[Po.map(oe=>{let de=oe.type==="number"||oe.numeric?"number":oe.type==="date"?"date":"text",X=oe.label||oe.id,Me=Or(oe.id);return e(He,{label:X,value:je[oe.id]??"",onChange:Ye=>Hr(oe.id,Ye.target.value),type:de,size:"small",fullWidth:true,disabled:!Me,InputLabelProps:{shrink:de==="date"?true:void 0,sx:{fontSize:"0.85rem"}},InputProps:{sx:{fontSize:"0.85rem"}}},`quick-edit-${oe.id}`)}),x?.description&&e(Go,{severity:"info",sx:{fontSize:"0.85rem","& span":{fontSize:"0.85rem"}},children:x.description})]})}),l("div",{className:"orb-dialog-actions",sx:{px:3,pb:2},children:[e(we,{onClick:wr,sx:{fontSize:"0.85rem"},disabled:pe,children:x?.cancelLabel||o("common.cancel")}),e(we,{onClick:Ho,variant:"contained",sx:{fontSize:"0.85rem",fontWeight:700},disabled:pe||!Gt,children:x?.submitLabel||o("common.save")})]})]}),Re&&e(An,{open:It,type:"warning",title:E?.title||o("quickDelete.confirmTitle"),message:E?.message||(zt.length>1?o("quickDelete.confirmMessageMultiple",{count:zt.length}):o("quickDelete.confirmMessageSingle")),confirmText:E?.confirmText||o("common.delete"),cancelText:E?.cancelText||o("common.cancel"),onClose:hn,onConfirm:kr}),$e,Pt&&e(ti,{open:St,onClose:et,model:ce,aiAssistant:C?.aiAssistant,interaction:Bt?{enabled:true,filters:W.filters,fieldMapping:H,onPrimaryDimensionClick:oe=>W.setFilter("primaryDimension",oe),onSecondaryDimensionClick:oe=>W.setFilter("secondaryDimension",oe),onStatusClick:oe=>W.setFilter("status",oe),onClearFilter:W.clearFilter,onClearAll:W.clearAll}:void 0,tableContent:e(_o,{appId:Ce||"graph-report-internal",title:o("graph.dataBody"),columns:Fe,rows:ce.table.rows,rowKey:"id",fullWidth:true,maxHeight:"420px",rowsPerPage:20,rowsPerPageOptions:[20,50,100],graphReport:{enabled:false}})})]})},nI=_o;w();var pI=({id:t,title:o,hideHeader:r=true,filterConfig:n,tableProps:a,children:i,spacing:s=1,mode:c="separated"})=>{let p=n?{...n,appId:n.appId||t}:void 0,u={...a,appId:a.appId||t};return l(yd,{title:o,hideHeader:r,children:[l(ae,{spacing:s,sx:{height:"100%",overflow:"hidden"},children:[c==="separated"&&p&&e("div",{sx:{flexShrink:0},children:e(tr,{...p})}),e("div",{sx:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:e(_o,{...u,fitContainer:true,filterConfig:c==="integrated"?p:void 0})})]}),i]})};var bI=({metadata:t,fetchData:o,initialRowsPerPage:r=20,rowsPerPageOptions:n=[20,50,100,-1],tableKey:a="default",mode:i="integrated",serviceUrl:s,variantService:c})=>{let{t:p}=ue(),[u,d]=jt.useState(false),[f,h]=jt.useState([]),[m,y]=jt.useState({}),[v,g]=jt.useState(t.variants||[]),[S,b]=jt.useState(t.layout||null),[C,k]=jt.useState(""),[x,E]=jt.useState(0),[M,I]=jt.useState(0),[N,A]=jt.useState(r),[T,D]=jt.useState([]),[R,F]=jt.useState("asc"),[z,Z]=jt.useState("");jt.useEffect(()=>{let le={};t.filters.forEach(me=>{me.defaultValue!==void 0&&(le[me.id]=me.defaultValue);}),y(le);},[t.filters]);let B=jt.useCallback(async(le,me,Ie,nt,Xe)=>{d(true);try{let De={...le,page:me+1,limit:Ie,sort:Xe,order:nt},Ge;o?Ge=await o(De):typeof t.api=="function"?Ge=await t.api(De):t.api&&typeof t.api=="object"?(console.log("Fetching from URL:",t.api.url,De),Ge={rows:[],total:0}):(console.warn("No API configured for report"),Ge={rows:[],total:0}),Ge&&(h(Ge.rows||[]),E(Ge.total||0));}catch(De){console.error("Failed to fetch report data",De);}finally{d(false);}},[t.api,o]);jt.useEffect(()=>{B(m,M,N,R,z);},[B,M,N,R,z]);let _=()=>{I(0),B(m,0,N,R,z);},V=le=>{I(0),A(le);},K=(le,me)=>{F(me),Z(le);},Y=le=>{y(le);},G=le=>{k(le?.id||"");let me=qd(le,a);if(me){let nt=me.values??me;y(nt),B(nt,0,N,R,z),I(0);}let{layout:Ie}=li(le,a);Ie&&b(Ie);},Q=le=>{let me={...le,id:Date.now().toString(),createdAt:new Date().toISOString()};g(Ie=>[...Ie,me]);},ne=le=>{b(le);};return {pageProps:{id:t.id,title:t.title,mode:i,filterConfig:{appId:t.id,tableKey:a,fields:t.filters,filters:m,onFilterChange:Y,onSearch:_,onVariantLoad:G,onVariantSave:Q,onVariantDelete:le=>g(me=>me.filter(Ie=>Ie.id!==le)),onVariantSetDefault:le=>{g(me=>me.map(Ie=>({...Ie,isDefault:Ie.id===le})));},variants:v,currentVariantId:C,variantService:c,serviceUrl:s},tableProps:{appId:t.id,tableKey:a,columns:t.columns,rows:f,loading:u,rowKey:"id",count:x,page:M,rowsPerPage:N,rowsPerPageOptions:n,onPageChange:I,onRowsPerPageChange:V,selectionMode:"multiple",selected:T,onSelectionChange:D,onLayoutSave:ne,layout:S,title:t.title,showSummary:true,order:R,orderBy:z,serviceUrl:s,onSortChange:K,graphReport:t.graphReport||{enabled:true,title:`${t.title} ${p("graph.reportTitle")}`}}},filters:m,rows:f,loading:u,refresh:_}};var Vf=t=>[...t].sort((o,r)=>r.value-o.value),xI=({bars:t=[],lines:o=[],combos:r=[],heatmap:n=[],pies:a=[],waterfalls:i=[]})=>{let s=jt.useMemo(()=>Vf(t),[t]),c=jt.useMemo(()=>[...o],[o]),p=jt.useMemo(()=>[...r],[r]),u=jt.useMemo(()=>[...n],[n]),d=jt.useMemo(()=>{let h=a.reduce((m,y)=>m+y.value,0);return a.map(m=>({...m,percent:h>0?m.value/h*100:m.percent}))},[a]),f=jt.useMemo(()=>[...i],[i]);return {bars:s,lines:c,combos:p,heatmap:u,pies:d,waterfalls:f}};var TI=({apiKey:t,query:o,zoom:r=14,mapType:n="roadmap"})=>jt.useMemo(()=>!t||!o?"":Bn({apiKey:t,query:o,zoom:r,mapType:n}),[t,o,r,n]),PI=({keyword:t,location:o})=>jt.useMemo(()=>Ja({keyword:t,location:o?{lng:o.lng,lat:o.lat,name:o.name}:void 0}),[t,o]);w();var $n=({code:t,language:o="text",copyable:r=true,showLineNumbers:n=false,wrapLongLines:a=false,maxHeight:i})=>{let[s,c]=jt.useState(false),p=jt.useMemo(()=>t.replace(/\n$/,"").split(`
|
|
186
|
+
`),[t]);return l("div",{style:{border:"1px solid var(--orb-border)",borderRadius:12,overflow:"hidden",background:"var(--orb-canvas)"},children:[l("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(ie,{size:"small",tooltip:s?"Copied":"Copy",onClick:async()=>{try{await navigator.clipboard.writeText(t),c(!0),window.setTimeout(()=>c(!1),1400);}catch{c(false);}},children:s?e(ra,{size:14,strokeWidth:1.8}):e(ia,{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?p.map((d,f)=>l("div",{style:{display:"flex"},children:[e("span",{style:{width:34,flexShrink:0,textAlign:"right",paddingRight:8,color:"var(--orb-disabled-fg)",userSelect:"none"},children:f+1}),e("span",{style:{whiteSpace:a?"pre-wrap":"pre",wordBreak:a?"break-word":"normal"},children:d})]},`${f}-${d}`)):e("code",{style:{display:"block",whiteSpace:a?"pre-wrap":"pre",wordBreak:a?"break-word":"normal"},children:t})})]})};w();var _f=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},Kf=async t=>new Function("m","return import(m)")(t),Gn=({expression:t,inline:o=false,allowKatex:r=false})=>{let n=jt.useMemo(()=>_f(t),[t]),[a,i]=jt.useState("");return jt.useEffect(()=>{let s=true;return (async()=>{if(!r||!n){i("");return}try{let p=await Kf("katex"),d=(p?.default||p)?.renderToString?.(n,{displayMode:!o,throwOnError:!1,strict:"warn"});s&&typeof d=="string"&&i(d);}catch{s&&i("");}})(),()=>{s=false;}},[r,n,o]),n?a?e(dt,{component:o?"span":"div",sx:{display:o?"inline-flex":"block",my:o?0:.5,overflowX:"auto"},dangerouslySetInnerHTML:{__html:a}}):o?e(dt,{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(dt,{sx:{my:1,p:1,borderRadius:1.2,border:"1px dashed",borderColor:"divider",bgcolor:"background.paper"},children:e(fo,{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};w();var Zf=async t=>new Function("m","return import(m)")(t),Is=({code:t,title:o="Mermaid Diagram",height:r=320,enabled:n=true})=>{let[a,i]=jt.useState(""),[s,c]=jt.useState(""),[p,u]=jt.useState(false),d=jt.useMemo(()=>t.trim(),[t]);return jt.useEffect(()=>{let f=true;return (async()=>{if(!n||!d){i(""),c("");return}u(true),c(""),i("");try{let m=await Zf("mermaid"),y=m?.default||m;if(!y||typeof y.render!="function")throw new Error("Mermaid runtime is not available");y.initialize?.({startOnLoad:!1,securityLevel:"loose",theme:"default"});let v=await y.render(`orbcafe-mermaid-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,d),g=typeof v=="string"?v:v?.svg;f&&typeof g=="string"&&i(g);}catch(m){if(f){let y=m instanceof Error?m.message:"Failed to render Mermaid diagram";c(y);}}finally{f&&u(false);}})(),()=>{f=false;}},[n,d]),l(Pr,{variant:"outlined",sx:{borderRadius:1.5,overflow:"hidden",my:1},children:[e(dt,{sx:{px:1,py:.6,borderBottom:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:e(fo,{variant:"caption",color:"text.secondary",sx:{letterSpacing:.4,textTransform:"uppercase"},children:o})}),l(dt,{sx:{p:1},children:[p&&e(dt,{sx:{minHeight:120,display:"flex",alignItems:"center",justifyContent:"center"},children:e(fc,{size:20})}),!p&&a&&e(dt,{sx:{maxHeight:r,overflow:"auto","& svg":{display:"block",mx:"auto",maxWidth:"100%",height:"auto"}},dangerouslySetInnerHTML:{__html:a}}),!p&&!a&&l(dt,{children:[s&&e(Go,{severity:"info",sx:{mb:1},children:s}),e($n,{code:d,language:"mermaid",copyable:true,showLineNumbers:true,wrapLongLines:true})]})]})]})};w();var Rs=t=>t.trim().replace(/^\|/,"").replace(/\|$/,"").split("|").map(r=>r.trim()),Qf=t=>/^:?-{3,}:?$/.test(t.trim()),jf=t=>{let o=t.trim(),r=o.startsWith(":"),n=o.endsWith(":");return r&&n?"center":n?"right":"left"},ci=t=>{let o=t.split(`
|
|
187
|
+
`).map(s=>s.trim()).filter(Boolean);if(o.length<2)return null;let r=Rs(o[0]),n=Rs(o[1]);if(r.length===0||n.length!==r.length||!n.every(Qf))return null;let a=n.map(jf),i=o.slice(2).filter(s=>s.includes("|")).map(s=>{let c=Rs(s);return c.length<r.length?[...c,...Array.from({length:r.length-c.length},()=>"")]:c.slice(0,r.length)});return {headers:r,aligns:a,rows:i}},Ms=({markdown:t,table:o,maxHeight:r=360})=>{let n=jt.useMemo(()=>o||(t?ci(t):null),[o,t]);return !n||n.headers.length===0?e(Pr,{variant:"outlined",sx:{p:1.2,borderRadius:1.5},children:e(fo,{variant:"body2",color:"text.secondary",children:"Invalid table block"})}):e(Pr,{variant:"outlined",sx:{borderRadius:1.5,overflow:"hidden",my:1},children:e(vc,{sx:{maxHeight:r},children:l(bc,{size:"small",stickyHeader:true,children:[e(xc,{children:e(bs,{children:n.headers.map((a,i)=>e(hs,{align:n.aligns[i],sx:{fontWeight:700,bgcolor:"background.paper"},children:a},`${a}-${i}`))})}),e(yc,{children:n.rows.map((a,i)=>e(bs,{hover:true,children:a.map((s,c)=>e(hs,{align:n.aligns[c],sx:{whiteSpace:"pre-wrap",wordBreak:"break-word"},children:s||e(dt,{component:"span",sx:{color:"text.disabled"},children:"-"})},`cell-${i}-${c}`))},`row-${i}`))})]})})})};w();var di=({content:t,title:o="Thinking",defaultExpanded:r=false,isStreaming:n=false})=>{let[a,i]=jt.useState(r);return l(dt,{sx:{borderLeft:"2px solid",borderColor:"divider",pl:1,my:.8},children:[l(uc,{direction:"row",alignItems:"center",spacing:.6,children:[e(mc,{size:"small",onClick:()=>i(s=>!s),sx:{transform:a?"rotate(180deg)":"rotate(0deg)",transition:"transform .15s ease"},children:e(Xr,{fontSize:"inherit"})}),l(fo,{variant:"caption",color:"text.secondary",sx:{fontStyle:"italic"},children:[o,n?" ...":""]})]}),e(Kr,{in:a,children:e(fo,{variant:"body2",sx:{pl:4,pt:.4,whiteSpace:"pre-wrap",color:"text.secondary",fontStyle:"italic",lineHeight:1.55},children:t})})]})};w();var Ds=/(\*\*[^*]+\*\*|`[^`]+`|\[[^\]]+\]\([^)]+\)|\*[^*]+\*|\$[^$\n]+\$)/g,pi=t=>t.trim().startsWith("```"),jd=t=>/^#{1,6}\s+/.test(t.trim()),As=t=>/^[-*+]\s+/.test(t.trim()),Ns=t=>/^\d+\.\s+/.test(t.trim()),Jd=t=>/^(?:-{3,}|\*{3,}|_{3,})$/.test(t.trim()),Es=t=>t.trim().startsWith(">"),ep=(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())},tp=t=>t.trim().startsWith("<think>")||t.trim()===":::think",Un=(t,o,r)=>{let n=[],a=0,i=0;Ds.lastIndex=0;let s=Ds.exec(t);for(;s;){s.index>a&&n.push(t.slice(a,s.index));let c=s[0],p=`${r}-${i}`;if(c.startsWith("**")&&c.endsWith("**"))n.push(e("strong",{children:c.slice(2,-2)},p));else if(c.startsWith("*")&&c.endsWith("*"))n.push(e("em",{children:c.slice(1,-1)},p));else if(c.startsWith("`")&&c.endsWith("`"))n.push(e(dt,{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:c.slice(1,-1)},p));else if(c.startsWith("[")&&c.includes("](")&&c.endsWith(")")){let u=c.match(/^\[([^\]]+)\]\(([^)]+)\)$/);u?n.push(e(pc,{href:u[2],target:"_blank",rel:"noreferrer",children:u[1]},p)):n.push(c);}else c.startsWith("$")&&c.endsWith("$")&&o.enableMath?n.push(e(Gn,{expression:c,inline:true,allowKatex:true},p)):n.push(c);a=s.index+c.length,i+=1,s=Ds.exec(t);}return a<t.length&&n.push(t.slice(a)),n.length>0?n:[t]},_n=({markdown:t,content:o,className:r,enableMath:n=true,enableMermaid:a=true,enableThinkBlock:i=true,codeCopyable:s=true,codeLineNumbers:c=false})=>{let p=t??o??"",u=jt.useMemo(()=>{let d=[],f=p.replace(/\r\n/g,`
|
|
188
188
|
`).split(`
|
|
189
|
-
`),
|
|
190
|
-
`).trim()},`think-tag-${
|
|
191
|
-
`).trim()},`think-fence-${
|
|
192
|
-
`);if(a&&
|
|
193
|
-
`).trim(),allowKatex:true},`math-${
|
|
194
|
-
`),h=Xl(m);if(h){s.push(jsxRuntime.jsx(Jc,{table:h},`table-${p}`)),p=C;continue}}if(ad(b)){let C=[];for(;p<g.length&&ad(g[p]);)C.push(g[p].replace(/^\s*>\s?/,"")),p+=1;s.push(jsxRuntime.jsx(material.Paper,{variant:"outlined",sx:{px:1,py:.8,my:.9,borderLeftWidth:3,borderLeftStyle:"solid",borderLeftColor:"primary.main",bgcolor:"action.hover"},children:jsxRuntime.jsx(material.Typography,{variant:"body2",sx:{whiteSpace:"pre-wrap"},children:C.map((m,h)=>jsxRuntime.jsxs(Qt.Fragment,{children:[h>0&&jsxRuntime.jsx("br",{}),Ei(m,f,`q-${p}-${h}`)]},`quote-line-${h}`))})},`quote-${p}`));continue}if(od(b)){let C=[];for(;p<g.length&&od(g[p]);)C.push(g[p].trim().replace(/^[-*+]\s+/,"")),p+=1;s.push(jsxRuntime.jsx(material.Box,{component:"ul",sx:{my:.8,pl:2.5},children:C.map((m,h)=>jsxRuntime.jsx(material.Box,{component:"li",sx:{mb:.45},children:jsxRuntime.jsx(material.Typography,{variant:"body2",children:Ei(m,f,`ul-${p}-${h}`)})},`ul-item-${h}`))},`ul-${p}`));continue}if(rd(b)){let C=[];for(;p<g.length&&rd(g[p]);)C.push(g[p].trim().replace(/^\d+\.\s+/,"")),p+=1;s.push(jsxRuntime.jsx(material.Box,{component:"ol",sx:{my:.8,pl:2.7},children:C.map((m,h)=>jsxRuntime.jsx(material.Box,{component:"li",sx:{mb:.45},children:jsxRuntime.jsx(material.Typography,{variant:"body2",children:Ei(m,f,`ol-${p}-${h}`)})},`ol-item-${h}`))},`ol-${p}`));continue}let u=[];for(;p<g.length;){let C=g[p],m=C.trim();if(!m||Ql(C)||fm(C)||hm(C)||od(C)||rd(C)||ad(C)||bm(g,p)||n&&ym(C)||r&&m.startsWith("$$"))break;u.push(C),p+=1;}u.length>0?s.push(jsxRuntime.jsx(material.Typography,{variant:"body2",sx:{my:.65,lineHeight:1.65},children:u.map((C,m)=>jsxRuntime.jsxs(Qt.Fragment,{children:[m>0&&jsxRuntime.jsx("br",{}),Ei(C,f,`p-${p}-${m}`)]},`p-line-${m}`))},`p-${p}`)):p+=1;}return s},[d,r,a,n,i,c]);return jsxRuntime.jsx(material.Box,{className:o,sx:{"& strong":{fontWeight:700},"& em":{fontStyle:"italic"},"& a":{wordBreak:"break-all"}},children:l})};var h5=(e,t)=>jsxRuntime.jsx(Fi,{markdown:e,...t});var Cm=({value:e,onChange:t,onSubmit:o,onVoiceInput:r,onClear:a,placeholder:n,statusText:i,loading:c=false,compact:d=false,showStatusText:l=true})=>jsxRuntime.jsxs(material.Stack,{spacing:.75,children:[jsxRuntime.jsxs(material.Box,{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:[jsxRuntime.jsx(Bu__default.default,{sx:{fontSize:d?16:18,color:"text.secondary"}}),jsxRuntime.jsx(material.InputBase,{fullWidth:true,value:e,onChange:s=>t(s.target.value),onKeyDown:s=>{s.key==="Enter"&&(s.preventDefault(),o());},placeholder:n,sx:{fontSize:d?"0.84rem":"0.9rem"}}),e&&a&&jsxRuntime.jsx(material.IconButton,{size:"small",onClick:a,children:jsxRuntime.jsx(Sb__default.default,{sx:{fontSize:d?16:18}})}),r&&jsxRuntime.jsx(material.IconButton,{size:"small",onClick:r,children:jsxRuntime.jsx(fx__default.default,{sx:{fontSize:d?16:18}})}),jsxRuntime.jsx(material.IconButton,{size:"small",onClick:o,disabled:c||!e.trim(),children:jsxRuntime.jsx(bx__default.default,{sx:{fontSize:d?16:18}})})]}),l&&i&&jsxRuntime.jsx(material.Typography,{variant:"caption",color:"text.secondary",children:i})]});var Sm=(e,t)=>{let o=t.trim();if(!o)return e;let r=e.toLowerCase(),a=o.toLowerCase(),n=r.indexOf(a);return n<0?e:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[e.slice(0,n),jsxRuntime.jsx(material.Box,{component:"mark",sx:{bgcolor:"warning.light",color:"warning.contrastText",px:.15,borderRadius:.4},children:e.slice(n,n+o.length)}),e.slice(n+o.length)]})},Jl=({section:e,highlightQuery:t=""})=>{let o=e.columns||2;return jsxRuntime.jsxs(material.Paper,{variant:"outlined",sx:{p:1.8,borderRadius:2},children:[jsxRuntime.jsx(material.Typography,{variant:"subtitle1",sx:{fontWeight:700,mb:1.4},children:e.title}),jsxRuntime.jsx(material.Box,{sx:{display:"grid",gap:1.15,gridTemplateColumns:{xs:"1fr",md:o===3?"repeat(3, minmax(0, 1fr))":o===1?"1fr":"repeat(2, minmax(0, 1fr))"}},children:e.fields.map(r=>{let a=typeof r.value=="string"||typeof r.value=="number"?String(r.value):null;return jsxRuntime.jsxs(material.Box,{sx:{minWidth:0},children:[jsxRuntime.jsx(material.Typography,{variant:"caption",color:"text.secondary",sx:{display:"block"},children:Sm(r.label,t)}),jsxRuntime.jsx(material.Typography,{component:"div",variant:"body2",sx:{mt:.2,fontWeight:500,wordBreak:"break-word"},children:a?Sm(a,t):r.value})]},r.id)})})]})};var cd=e=>e==null?"":typeof e=="string"||typeof e=="number"||typeof e=="boolean"?String(e):"",ts=e=>e.trim().toLowerCase(),Kv=(e,t)=>{let o=[];return e.forEach(r=>{r.fields.forEach(a=>{let n=a.searchableText||cd(a.value),i={source:"section",sourceId:r.id,sourceSectionId:r.id,sourceTitle:r.title,fieldId:a.id,fieldLabel:a.label,fieldValue:n};o.push({hit:i,text:ts(`${r.title} ${a.label} ${n}`)});});}),t.forEach(r=>{(r.fields||[]).forEach(a=>{let n=a.searchableText||cd(a.value),i={source:"tab",sourceId:r.id,sourceTitle:r.label,fieldId:a.id,fieldLabel:a.label,fieldValue:n};o.push({hit:i,text:ts(`${r.label} ${a.label} ${n}`)});}),(r.sections||[]).forEach(a=>{a.fields.forEach(n=>{let i=n.searchableText||cd(n.value),c={source:"tab",sourceId:r.id,sourceSectionId:a.id,sourceTitle:`${r.label} / ${a.title}`,fieldId:n.id,fieldLabel:n.label,fieldValue:i};o.push({hit:c,text:ts(`${r.label} ${a.title} ${n.label} ${i}`)});});});}),o},km=({sections:e,tabs:t=[],defaultTabId:o,ai:r})=>{let{t:a}=ne(),[n,i]=Qt.useState(""),[c,d]=Qt.useState(o||t[0]?.id),[l,s]=Qt.useState("idle"),[g,f]=Qt.useState([]),[p,b]=Qt.useState(""),[y,u]=Qt.useState(""),[C,m]=Qt.useState(false),h=Qt.useMemo(()=>Kv(e,t),[e,t]);Qt.useEffect(()=>{if(t.length===0){d(void 0);return}t.some(I=>I.id===c)||d(o||t[0]?.id);},[t,c,o]);let x=Qt.useCallback(()=>{s("idle"),f([]),b(""),u("");},[]),w=Qt.useCallback(T=>{i(T),T.trim()||(s("idle"),f([]),b(""),u(""));},[]),E=Qt.useCallback(T=>{let I=ts(T);return I?h.filter(k=>k.text.includes(I)).map(k=>k.hit):[]},[h]),R=Qt.useCallback(async()=>{let T=n.trim();if(!T)return;m(true);let I=E(T);if(f(I),I.length>0){s("search"),u(""),b(a("detail.searchAi.matches",{count:I.length})),m(false);return}if(r?.enabled!==false&&r?.onSubmit){s("ai"),b(a("detail.searchAi.autoAiFallback"));try{let S=await r.onSubmit(T,{query:T,hits:I,activeTabId:c,sections:e,tabs:t});u(typeof S=="string"?S:"");}finally{m(false);}return}s("search"),u(""),b(a("detail.searchAi.noMatch")),m(false);},[n,E,a,r,c,e,t]);return {query:n,setQuery:w,activeTabId:c,setActiveTabId:d,searchMode:l,hits:g,statusText:p,aiResponse:y,searching:C,handleSubmit:R,clearResult:x}};var q5=({title:e,subtitle:t,sections:o,tabs:r=[],defaultTabId:a,table:n,ai:i,rightHeaderSlot:c,searchBarWidth:d=460,onClose:l,closeLabel:s="Close"})=>{let{t:g}=ne(),{query:f,setQuery:p,activeTabId:b,setActiveTabId:y,searchMode:u,hits:C,statusText:m,aiResponse:h,searching:x,handleSubmit:w,clearResult:E}=km({sections:o,tabs:r,defaultTabId:a,ai:i}),R=Qt.useMemo(()=>r.find(k=>k.id===b)||r[0],[r,b]),T=Qt.useCallback(k=>{let S=D=>{let P=document.getElementById(k);if(P){P.scrollIntoView({behavior:"smooth",block:"center"});return}D<4&&setTimeout(()=>S(D+1),60);};requestAnimationFrame(()=>S(0));},[]),I=Qt.useCallback((k,S)=>{if(r.some(D=>D.id===k)){y(k),T(S?`detail-tab-${k}-section-${S}`:`detail-tab-${k}`);return}T(`detail-section-${k}`);},[r,y,T]);return jsxRuntime.jsxs(material.Box,{sx:{display:"flex",flexDirection:"column",gap:1.5,minHeight:"100%"},children:[jsxRuntime.jsxs(material.Stack,{direction:{xs:"column",md:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",md:"center"},spacing:1,children:[jsxRuntime.jsxs(material.Box,{sx:{minWidth:0},children:[jsxRuntime.jsx(material.Typography,{variant:"h5",sx:{fontWeight:800,color:"text.primary"},children:e}),t&&jsxRuntime.jsx(material.Typography,{variant:"body2",color:"text.secondary",sx:{mt:.35},children:t})]}),jsxRuntime.jsxs(material.Stack,{direction:"row",spacing:.6,alignItems:"center",sx:{width:{xs:"100%",md:"auto"},ml:{xs:0,md:"auto"}},children:[jsxRuntime.jsx(material.Box,{sx:{width:{xs:"100%",md:d},maxWidth:"100%",minWidth:{md:320}},children:jsxRuntime.jsx(Cm,{value:f,onChange:p,onSubmit:w,onVoiceInput:i?.onVoiceInput,onClear:()=>{p(""),E();},placeholder:i?.placeholder||g("detail.searchAi.placeholder"),statusText:m,loading:x,compact:true,showStatusText:false})}),l&&jsxRuntime.jsx(material.Tooltip,{title:s,children:jsxRuntime.jsx(material.IconButton,{size:"small",onClick:l,children:jsxRuntime.jsx(Qv__default.default,{fontSize:"small"})})}),c]})]}),m&&jsxRuntime.jsx(material.Typography,{variant:"caption",color:"text.secondary",sx:{mt:-0.7},children:m}),u==="search"&&C.length>0&&jsxRuntime.jsxs(material.Paper,{variant:"outlined",sx:{p:1.5,borderRadius:2},children:[jsxRuntime.jsx(material.Typography,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.6},children:g("detail.searchAi.matches",{count:C.length})}),jsxRuntime.jsx(material.Stack,{spacing:.35,children:C.slice(0,8).map(k=>jsxRuntime.jsx(material.Box,{component:"button",type:"button",onClick:()=>I(k.sourceId,k.sourceSectionId),sx:{textAlign:"left",border:0,bgcolor:"transparent",p:.2,cursor:"pointer",color:"text.primary",borderRadius:1,"&:hover":{bgcolor:"action.hover"}},children:jsxRuntime.jsxs(material.Typography,{variant:"body2",sx:{fontSize:"0.84rem"},children:[jsxRuntime.jsx(material.Box,{component:"span",sx:{color:"text.secondary"},children:k.sourceTitle})," \xB7 ",jsxRuntime.jsx(material.Box,{component:"span",sx:{fontWeight:700},children:k.fieldLabel})," = ",jsxRuntime.jsx(material.Box,{component:"span",children:k.fieldValue||"-"})]})},`${k.source}|${k.sourceId}|${k.fieldId}`))})]}),u==="ai"&&h&&jsxRuntime.jsxs(material.Paper,{variant:"outlined",sx:{p:1.5,borderRadius:2},children:[jsxRuntime.jsx(material.Typography,{variant:"subtitle2",sx:{fontWeight:700,mb:.7},children:g("detail.searchAi.aiResultTitle")}),jsxRuntime.jsx(material.Box,{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:jsxRuntime.jsx(Fi,{markdown:h})})]}),jsxRuntime.jsx(material.Box,{sx:{display:"grid",gap:1.5,gridTemplateColumns:{xs:"1fr",lg:"repeat(2, minmax(0, 1fr))"}},children:o.map(k=>jsxRuntime.jsx(material.Box,{id:`detail-section-${k.id}`,children:jsxRuntime.jsx(Jl,{section:k,highlightQuery:f})},k.id))}),r.length>0&&jsxRuntime.jsxs(material.Paper,{variant:"outlined",sx:{borderRadius:2,overflow:"hidden"},children:[jsxRuntime.jsx(material.Tabs,{value:R?.id||false,onChange:(k,S)=>y(S),variant:"scrollable",scrollButtons:"auto",sx:{borderBottom:"1px solid",borderColor:"divider"},children:r.map(k=>jsxRuntime.jsx(material.Tab,{value:k.id,label:k.label,sx:{textTransform:"none"}},k.id))}),jsxRuntime.jsxs(material.Box,{sx:{p:1.5},children:[jsxRuntime.jsx(material.Box,{id:`detail-tab-${R?.id||""}`}),R?.description&&jsxRuntime.jsx(material.Typography,{variant:"body2",color:"text.secondary",sx:{mb:1.2},children:R.description}),R?.content?R.content:jsxRuntime.jsxs(material.Stack,{spacing:1.5,children:[(R?.sections||[]).map(k=>jsxRuntime.jsx(material.Box,{id:`detail-tab-${R?.id}-section-${k.id}`,children:jsxRuntime.jsx(Jl,{section:k,highlightQuery:f})},k.id)),R?.fields&&R.fields.length>0&&jsxRuntime.jsx(Jl,{section:{id:`${R.id}-fields`,title:R.label,fields:R.fields,columns:2},highlightQuery:f})]})]})]}),n&&jsxRuntime.jsx(Dr,{title:n.title||g("detail.table.title"),...n.tableProps,filterConfig:void 0,fitContainer:false})]})};var Pm=({bucket:e,cardCount:t,highlighted:o=false,children:r,emptyLabel:a,maxHeight:n,sx:i})=>{let{t:c}=ne();return jsxRuntime.jsx(material.Paper,{sx:[d=>{let l=e.accentColor??d.palette.primary.main;return {position:"relative",minWidth:0,borderRadius:4,overflow:"hidden",border:`1px solid ${styles.alpha(l,o?.58:d.palette.mode==="dark"?.28:.18)}`,bgcolor:styles.alpha(d.palette.background.paper,d.palette.mode==="dark"?.92:.97),boxShadow:o?`0 18px 40px ${styles.alpha(l,.22)}`:`0 10px 28px ${styles.alpha(d.palette.common.black,d.palette.mode==="dark"?.18:.08)}`,transition:"border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease","&::before":{content:'""',display:"block",height:4,bgcolor:l}}},...Array.isArray(i)?i:i?[i]:[]],children:jsxRuntime.jsxs(material.Stack,{spacing:1.2,sx:{p:1.5},children:[jsxRuntime.jsxs(material.Box,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:1},children:[jsxRuntime.jsxs(material.Box,{sx:{minWidth:0},children:[jsxRuntime.jsxs(material.Box,{sx:{display:"flex",alignItems:"center",gap:.8},children:[e.icon,jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.96rem",fontWeight:800},children:e.title})]}),e.description&&jsxRuntime.jsx(material.Typography,{sx:{mt:.45,fontSize:"0.76rem",color:"text.secondary",lineHeight:1.45},children:e.description})]}),jsxRuntime.jsxs(material.Stack,{direction:"row",spacing:.8,sx:{flexShrink:0},children:[jsxRuntime.jsx(material.Chip,{size:"small",label:t,sx:{fontWeight:700}}),typeof e.limit=="number"&&jsxRuntime.jsx(material.Chip,{size:"small",label:`${c("kanban.bucket.limit")} ${e.limit}`,color:t>e.limit?"warning":"default",variant:"outlined"})]})]}),o&&jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.72rem",color:"primary.main",fontWeight:700},children:c("kanban.bucket.dropHere")}),jsxRuntime.jsx(material.Box,{sx:{minHeight:220,maxHeight:n,overflowY:n?"auto":"visible",pr:n?.4:0},children:t>0?r:jsxRuntime.jsx(material.Box,{sx:d=>({minHeight:160,borderRadius:3,border:`1px dashed ${styles.alpha(d.palette.divider,.9)}`,bgcolor:d.palette.mode==="dark"?styles.alpha(d.palette.common.white,.02):styles.alpha(d.palette.primary.main,.03),display:"grid",placeItems:"center",px:2,textAlign:"center"}),children:jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.78rem",color:"text.secondary"},children:a??e.emptyLabel??c("kanban.empty")})})})]})})};var rC={success:"success",warning:"warning",info:"info",error:"error"},aC={critical:"error",high:"warning",medium:"info",low:"success"},nC=(e,t)=>{switch(e){case "critical":return t("kanban.priority.critical");case "high":return t("kanban.priority.high");case "medium":return t("kanban.priority.medium");case "low":return t("kanban.priority.low");default:return e}},iC=e=>e?e.split(/\s+/).map(t=>t.charAt(0).toUpperCase()).slice(0,2).join(""):"NA",ud=({card:e,bucket:t,dragging:o=false,overlay:r=false,onClick:a,sx:n})=>{let{t:i}=ne(),c=!!(a&&t),d=e.tone??(e.priority?aC[e.priority]:"default"),l=d==="default"?"primary":rC[d],s=t?{card:e,bucket:t}:void 0;return jsxRuntime.jsx(material.Paper,{onClick:c?()=>s&&a?.(s):void 0,onKeyDown:c?g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),s&&a?.(s));}:void 0,role:c?"button":void 0,tabIndex:c?0:void 0,sx:[g=>{let f=d==="default"?g.palette.primary.main:g.palette[l].main;return {position:"relative",overflow:"hidden",p:1.4,borderRadius:3,border:`1px solid ${styles.alpha(f,g.palette.mode==="dark"?.42:.2)}`,bgcolor:styles.alpha(g.palette.background.paper,g.palette.mode==="dark"?.96:.98),boxShadow:r?`0 20px 45px ${styles.alpha(g.palette.common.black,.24)}`:o?"none":`0 8px 24px ${styles.alpha(g.palette.common.black,g.palette.mode==="dark"?.18:.08)}`,transform:r?"rotate(1deg) scale(1.01)":"none",transition:"transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease",cursor:c?"pointer":"default",opacity:o?.5:1,"&::before":{content:'""',position:"absolute",inset:"0 auto 0 0",width:4,bgcolor:f},"&:hover":c?{transform:"translateY(-1px)",boxShadow:`0 14px 32px ${styles.alpha(g.palette.common.black,g.palette.mode==="dark"?.28:.12)}`}:void 0}},...Array.isArray(n)?n:n?[n]:[]],children:jsxRuntime.jsxs(material.Stack,{spacing:1.1,children:[jsxRuntime.jsxs(material.Box,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:1},children:[jsxRuntime.jsxs(material.Box,{sx:{minWidth:0,flex:1},children:[(e.kicker||t?.title)&&jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.72rem",fontWeight:700,letterSpacing:.4,color:"text.secondary",textTransform:"uppercase"},children:e.kicker??t?.title}),jsxRuntime.jsx(material.Typography,{sx:{mt:.2,fontSize:"0.98rem",fontWeight:800,lineHeight:1.3},children:e.title})]}),e.priority&&jsxRuntime.jsx(material.Chip,{size:"small",color:l,label:nC(e.priority,i),variant:d==="default"?"outlined":"filled",sx:{height:22,fontWeight:700}})]}),e.summary&&jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.82rem",color:"text.secondary",lineHeight:1.5},children:e.summary}),e.metrics&&e.metrics.length>0&&jsxRuntime.jsx(material.Box,{sx:{display:"grid",gridTemplateColumns:`repeat(${Math.min(e.metrics.length,3)}, minmax(0, 1fr))`,gap:.9},children:e.metrics.slice(0,3).map(g=>jsxRuntime.jsxs(material.Box,{sx:f=>({borderRadius:2,px:1,py:.8,bgcolor:f.palette.mode==="dark"?styles.alpha(f.palette.common.white,.05):styles.alpha(f.palette.primary.main,.05)}),children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.68rem",color:"text.secondary",textTransform:"uppercase",letterSpacing:.35},children:g.label}),jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.86rem",fontWeight:700},children:g.value})]},g.id))}),typeof e.progress=="number"&&jsxRuntime.jsxs(material.Box,{children:[jsxRuntime.jsxs(material.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:.5},children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.72rem",color:"text.secondary"},children:i("kanban.card.progress")}),jsxRuntime.jsxs(material.Typography,{sx:{fontSize:"0.72rem",fontWeight:700},children:[Math.round(e.progress),"%"]})]}),jsxRuntime.jsx(material.LinearProgress,{variant:"determinate",value:Math.max(0,Math.min(100,e.progress)),color:l,sx:{height:8,borderRadius:999}})]}),(e.tags?.length||e.assignee||e.dueDate||e.footer||c)&&jsxRuntime.jsxs(material.Stack,{spacing:.9,children:[e.tags&&e.tags.length>0&&jsxRuntime.jsx(material.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.75},children:e.tags.map(g=>jsxRuntime.jsx(material.Chip,{size:"small",label:g.label,color:g.color??"default",variant:"outlined"},g.id))}),jsxRuntime.jsxs(material.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[jsxRuntime.jsxs(material.Box,{sx:{display:"flex",alignItems:"center",gap:.8,minWidth:0},children:[e.assignee&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(material.Avatar,{src:e.assignee.avatarSrc,sx:{width:28,height:28,fontSize:"0.75rem"},children:e.assignee.initials??iC(e.assignee.name)}),jsxRuntime.jsxs(material.Box,{sx:{minWidth:0},children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.78rem",fontWeight:700,lineHeight:1.2},noWrap:true,children:e.assignee.name}),e.dueDate&&jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.7rem",color:"text.secondary",lineHeight:1.2},noWrap:true,children:e.dueDate})]})]}),!e.assignee&&e.dueDate&&jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.76rem",color:"text.secondary"},children:e.dueDate})]}),c&&jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.72rem",color:"primary.main",fontWeight:700,whiteSpace:"nowrap"},children:i("kanban.card.openDetail")})]}),e.footer]})]})})};var sC=(e,t)=>Number.isNaN(e)||e<0?0:e>t?t:e,Dm=({buckets:e,cards:t})=>{let o=new Map;return t.forEach((r,a)=>{let n=o.get(r.bucketId)??[];n.push({card:r,sourceIndex:a}),o.set(r.bucketId,n);}),{buckets:e.map(r=>{let a=[...o.get(r.id)??[]].sort((n,i)=>n.card.position===void 0&&i.card.position===void 0?n.sourceIndex-i.sourceIndex:n.card.position===void 0?1:i.card.position===void 0?-1:n.card.position-i.card.position||n.sourceIndex-i.sourceIndex).map(({card:n},i)=>({...n,bucketId:r.id,position:i}));return {...r,cards:a}})}},yr=(e,t)=>{for(let o=0;o<e.buckets.length;o+=1){let r=e.buckets[o],a=r.cards.findIndex(n=>n.id===t);if(a>=0)return {card:r.cards[a],bucket:r,bucketIndex:o,cardIndex:a}}},as=(e,t)=>{let o=yr(e,t.cardId);if(!o)return e;let r=e.buckets.findIndex(l=>l.id===t.toBucketId);if(r<0)return e;let a=e.buckets.map(l=>({...l,cards:l.cards.map(s=>({...s}))})),n=a[o.bucketIndex],[i]=n.cards.splice(o.cardIndex,1);if(!i)return e;let c=a[r],d=sC(t.targetIndex??c.cards.length,c.cards.length);return c.cards.splice(d,0,{...i,bucketId:t.toBucketId}),{buckets:a.map(l=>({...l,cards:l.cards.map((s,g)=>({...s,bucketId:l.id,position:g}))}))}};var pd="kanban-card|",md="kanban-bucket|",Fm=e=>`${pd}${e}`,CC=e=>`${md}${e}`,ns=e=>e?.startsWith(pd)?e.slice(pd.length):void 0,Em=e=>e?.startsWith(md)?e.slice(md.length):void 0,SC=({card:e,bucket:t,onCardClick:o})=>{let{setNodeRef:r,attributes:a,listeners:n,transform:i,transition:c,isDragging:d}=sortable.useSortable({id:Fm(e.id)}),l={transform:i?`translate3d(${i.x}px, ${i.y}px, 0)`:void 0,transition:c,zIndex:d?2:1,touchAction:"none",cursor:d?"grabbing":"grab"};return jsxRuntime.jsx(material.Box,{ref:r,style:l,...a,...n,children:jsxRuntime.jsx(ud,{card:e,bucket:t,dragging:d,onClick:o})})},kC=({bucket:e,highlighted:t,bucketMaxHeight:o,emptyBucketLabel:r,onCardClick:a})=>{let{isOver:n,setNodeRef:i}=core.useDroppable({id:CC(e.id)});return jsxRuntime.jsx(material.Box,{ref:i,sx:{minWidth:0},children:jsxRuntime.jsx(Pm,{bucket:e,cardCount:e.cards.length,highlighted:t||n,emptyLabel:r,maxHeight:o,children:jsxRuntime.jsx(sortable.SortableContext,{items:e.cards.map(c=>Fm(c.id)),strategy:sortable.verticalListSortingStrategy,children:jsxRuntime.jsx(material.Stack,{spacing:1,children:e.cards.map(c=>jsxRuntime.jsx(SC,{card:c,bucket:e,onCardClick:a},c.id))})})})})},gE=({model:e,onCardMove:t,onCardClick:o,minBucketWidth:r=320,bucketMaxHeight:a,emptyBucketLabel:n,sx:i})=>{let[c,d]=Qt.useState(null),[l,s]=Qt.useState(),g=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:6}}),core.useSensor(core.TouchSensor,{activationConstraint:{delay:120,tolerance:8}})),f=Qt.useMemo(()=>c?yr(e,c):void 0,[c,e]),p=Qt.useCallback(()=>{d(null),s(void 0);},[]),b=Qt.useCallback(m=>{if(!m)return;let h=ns(m);return h?yr(e,h)?.bucket.id:Em(m)},[e]),y=Qt.useCallback(m=>{d(ns(String(m.active.id))??null);},[]),u=Qt.useCallback(m=>{s(b(m.over?String(m.over.id):void 0));},[b]),C=Qt.useCallback(m=>{let h=ns(String(m.active.id)),x=m.over?String(m.over.id):void 0;if(!h||!x){p();return}let w=yr(e,h);if(!w){p();return}let E=w.bucket.id,R=w.cardIndex,T=ns(x);if(T){let S=yr(e,T);if(!S){p();return}E=S.bucket.id,R=S.cardIndex;}else {let S=Em(x),D=e.buckets.find(P=>P.id===S);if(!S||!D){p();return}E=S,R=D.cards.length;}if(w.bucket.id===E&&w.cardIndex===R){p();return}let I=as(e,{cardId:h,fromBucketId:w.bucket.id,toBucketId:E,targetIndex:R}),k=yr(I,h);k&&!(k.bucket.id===w.bucket.id&&k.cardIndex===w.cardIndex)&&t?.({cardId:h,fromBucketId:w.bucket.id,toBucketId:k.bucket.id,targetIndex:k.cardIndex,card:k.card,model:I}),p();},[e,t,p]);return jsxRuntime.jsxs(core.DndContext,{sensors:g,collisionDetection:core.closestCorners,onDragStart:y,onDragOver:u,onDragEnd:C,onDragCancel:p,children:[jsxRuntime.jsx(material.Box,{sx:[{display:"grid",gridAutoFlow:"column",gridAutoColumns:`minmax(${r}px, 1fr)`,gap:2,alignItems:"start",overflowX:"auto",pb:.5},...Array.isArray(i)?i:i?[i]:[]],children:e.buckets.map(m=>jsxRuntime.jsx(kC,{bucket:m,highlighted:m.id===l,bucketMaxHeight:a,emptyBucketLabel:n,onCardClick:o},m.id))}),jsxRuntime.jsx(core.DragOverlay,{children:f?jsxRuntime.jsx(material.Box,{sx:{width:Math.max(r-24,260)},children:jsxRuntime.jsx(ud,{card:f.card,bucket:f.bucket,overlay:true})}):null})]})};var PC=({initialModel:e,initialBuckets:t,initialCards:o})=>e||Dm({buckets:t??[],cards:o??[]}),xE=e=>{let{onCardMove:t,onCardClick:o}=e,[r,a]=Qt.useState(()=>PC(e)),n=Qt.useCallback(s=>{a(g=>typeof s=="function"?s(g):s);},[]),i=Qt.useCallback(s=>yr(r,s),[r]),c=Qt.useCallback((s,g,f)=>{let p=yr(r,s);if(!p)return;let b=as(r,{cardId:s,fromBucketId:p.bucket.id,toBucketId:g,targetIndex:f}),y=yr(b,s);if(!y||y.bucket.id===p.bucket.id&&y.cardIndex===p.cardIndex)return;a(b);let u={cardId:s,fromBucketId:p.bucket.id,toBucketId:y.bucket.id,targetIndex:y.cardIndex,card:y.card,model:b};return t?.(u),u},[r,t]),d=Qt.useCallback((s,g)=>{a(f=>({buckets:f.buckets.map(p=>({...p,cards:p.cards.map(b=>b.id!==s?b:typeof g=="function"?g(b):{...b,...g})}))}));},[]),l=Qt.useMemo(()=>({model:r,onCardMove:s=>{c(s.cardId,s.toBucketId,s.targetIndex);},onCardClick:o}),[r,c,o]);return {model:r,actions:{replaceModel:n,moveCard:c,updateCard:d,getCard:i},boardProps:l}};function Rn({onTextUpdate:e,onComplete:t,onError:o,wsUrl:r="ws://localhost:8765",silenceThresholdMs:a=2e3,minVolumeRms:n=.015}){let[i,c]=Qt.useState(false),d=Qt.useRef(null),l=Qt.useRef(null),s=Qt.useRef(null),g=Qt.useRef(null),f=Qt.useRef(null),p=Qt.useRef(0),b=Qt.useRef(false),y=Qt.useRef(false),u=Qt.useCallback(()=>{d.current&&(d.current.close(),d.current=null),g.current&&(g.current.disconnect(),g.current=null),f.current&&(f.current.disconnect(),f.current=null),l.current&&(l.current.getTracks().forEach(h=>h.stop()),l.current=null),s.current&&(s.current.close(),s.current=null),y.current=false,c(false);},[]),C=Qt.useCallback(()=>{b.current||(b.current=true,d.current?.readyState===WebSocket.OPEN&&d.current.send(JSON.stringify({type:"stop"})),setTimeout(u,500));},[u]),m=Qt.useCallback(async()=>{if(!(i||y.current)){y.current=true,b.current=false,p.current=Date.now();try{let h=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,sampleRate:16e3,echoCancellation:!0,noiseSuppression:!0}});l.current=h;let x=new WebSocket(r);d.current=x,x.onopen=()=>{c(!0),y.current=!1;},x.onmessage=I=>{try{let k=JSON.parse(I.data);if(k.type==="recognition")k.is_final?t(k.text):e?.(k.text);else if(k.type==="error"){let S=k.message||"Voice recognition error";o?.(S),C();}}catch{o?.("Failed to parse voice message");}},x.onerror=()=>{o?.("Voice service connection failed"),u();},x.onclose=()=>{u();};let w=window.AudioContext||window.webkitAudioContext;if(!w)throw new Error("AudioContext is not supported in this browser");let E=new w({sampleRate:16e3});s.current=E;let R=E.createMediaStreamSource(h);f.current=R;let T=E.createScriptProcessor(4096,1,1);g.current=T,T.onaudioprocess=I=>{if(d.current?.readyState!==WebSocket.OPEN)return;let k=I.inputBuffer.getChannelData(0),S=0;for(let M=0;M<k.length;M+=1)S+=k[M]*k[M];if(Math.sqrt(S/k.length)>n)p.current=Date.now();else if(Date.now()-p.current>a&&!b.current){C();return}let P=new Int16Array(k.length);for(let M=0;M<k.length;M+=1){let B=Math.max(-1,Math.min(1,k[M]));P[M]=B<0?B*32768:B*32767;}d.current.send(P.buffer);},R.connect(T),T.connect(E.destination);}catch{o?.("Cannot access microphone"),u();}}},[u,i,n,t,o,e,a,C,r]);return Qt.useEffect(()=>u,[u]),{isRecording:i,startRecording:m,stopRecording:C}}var Wm=64,_C="#E9EDF2",KC="linear-gradient(90deg, #F5F7FA 0%, #E9EDF2 50%, #F5F7FA 100%)",qC=["en","zh","fr","de","ja","ko"],Hm={en:"EN",zh:"\u4E2D\u6587",fr:"FR",de:"DE",ja:"\u65E5\u672C\u8A9E",ko:"\uD55C\uAD6D\uC5B4"},hd=({searchPlaceholder:e,onSearch:t,onSearchAdd:o,maxWidth:r=540,sx:a})=>{let{t:n}=ne(),i=material.useTheme(),c=i.palette.mode==="dark",[d,l]=Qt.useState(""),s=Qt.useCallback((h=d)=>{let x=h.trim();x&&(l(""),t?.(x));},[t,d]),g=h=>{h.preventDefault(),s();},{isRecording:f,startRecording:p,stopRecording:b}=Rn({onTextUpdate:l,onComplete:h=>{l(h),s(h);},onError:h=>{console.error("Header voice input error:",h);}}),y=Qt.useCallback(async()=>{if(f){b();return}await p();},[f,p,b]),u=e||n("header.searchPlaceholder"),C=d.trim().length>0,m={width:28,height:28,p:0,color:c?"rgba(255,255,255,0.72)":"rgba(15,23,42,0.56)","&:hover":{bgcolor:c?"rgba(255,255,255,0.1)":"rgba(15,23,42,0.06)"},"&.Mui-disabled":{color:c?"rgba(255,255,255,0.28)":"rgba(15,23,42,0.24)"}};return jsxRuntime.jsx(material.Box,{component:"form",onSubmit:g,sx:[{width:"100%",maxWidth:r},...Array.isArray(a)?a:a?[a]:[]],children:jsxRuntime.jsx(material.TextField,{size:"small",fullWidth:true,value:d,onChange:h=>l(h.target.value),placeholder:u,InputProps:{startAdornment:jsxRuntime.jsx(material.InputAdornment,{position:"start",sx:{ml:.25,mr:.5},children:jsxRuntime.jsx(material.IconButton,{size:"small",type:"button",onClick:o,"aria-label":n("header.searchAddFeature"),title:n("header.searchAddFeature"),sx:m,children:jsxRuntime.jsx(VC__default.default,{sx:{fontSize:20}})})}),endAdornment:jsxRuntime.jsx(material.InputAdornment,{position:"end",sx:{ml:.5,mr:.25},children:jsxRuntime.jsxs(material.Stack,{direction:"row",alignItems:"center",spacing:.15,children:[jsxRuntime.jsx(material.IconButton,{size:"small",type:"button",onClick:()=>{y();},"aria-label":n(f?"header.searchStopVoice":"header.searchStartVoice"),title:n(f?"header.searchStopVoice":"header.searchStartVoice"),sx:{...m,color:f?i.palette.error.main:m.color,bgcolor:f?c?"rgba(239,68,68,0.18)":"rgba(239,68,68,0.1)":"transparent"},children:f?jsxRuntime.jsx(lucideReact.MicOff,{size:17,strokeWidth:2.35}):jsxRuntime.jsx(lucideReact.Mic,{size:17,strokeWidth:2.35})}),jsxRuntime.jsx(material.IconButton,{size:"small",type:"submit",disabled:!C,"aria-label":n("header.searchSend"),title:n("header.searchSend"),sx:{...m,color:C?i.palette.primary.main:m.color},children:jsxRuntime.jsx(lucideReact.SendHorizontal,{size:17,strokeWidth:2.35})})]})}),sx:{color:c?"common.white":"rgba(17,24,39,0.9)",bgcolor:c?"rgba(255,255,255,0.08)":"#ffffff",borderRadius:999,pr:.5,"& .MuiInputBase-input":{py:1.1},"& .MuiOutlinedInput-notchedOutline":{borderColor:c?"rgba(255,255,255,0.15)":"rgba(15,23,42,0.2)"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:c?"rgba(255,255,255,0.35)":"rgba(15,23,42,0.35)"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:c?"rgba(255,255,255,0.5)":"rgba(15,23,42,0.55)"}}},inputProps:{style:{color:c?"white":"#111827"}}})})},cs=({appTitle:e,logo:t,mode:o="dark",onToggleMode:r,locale:a,localeLabel:n,localeOptions:i,onLocaleChange:c,searchPlaceholder:d,showSearch:l=false,onSearch:s,onSearchAdd:g,user:f,onUserSetting:p,onUserLogout:b,userMenuItems:y,leftSlot:u,rightSlot:C})=>{let{t:m,locale:h}=ne(),w=material.useTheme().palette.mode==="dark",[E,R]=Qt.useState(null),[T,I]=Qt.useState(null),k=o==="system"?jsxRuntime.jsx(WC__default.default,{fontSize:"small"}):o==="dark"?jsxRuntime.jsx(HC__default.default,{fontSize:"small"}):jsxRuntime.jsx($C__default.default,{fontSize:"small"}),S=m(o==="system"?"header.theme.system":o==="dark"?"header.theme.dark":"header.theme.light"),D=a||h,P=i&&i.length>0?i:qC,M=n||Hm[D]||D.toUpperCase(),B=!!E,X=!!T,L=[{key:"setting",label:m("header.menu.setting"),icon:jsxRuntime.jsx(p0__default.default,{sx:{fontSize:18}}),onClick:p},{key:"logout",label:m("header.menu.logout"),icon:jsxRuntime.jsx(UC__default.default,{sx:{fontSize:18}}),onClick:b}],Z=y&&y.length>0?y:L,$=q=>{I(null),q?.();};return jsxRuntime.jsxs(material.AppBar,{position:"sticky",elevation:0,sx:q=>({top:0,zIndex:q.zIndex.drawer+10,height:Wm,backgroundColor:q.palette.mode==="dark"?"#0D0D0D":_C,backgroundImage:q.palette.mode==="dark"?["radial-gradient(circle at 18% 22%, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 45%)","radial-gradient(circle at 78% 32%, rgba(144,202,249,0.14) 0%, rgba(144,202,249,0) 42%)","linear-gradient(90deg, #0A0A0A 0%, #151515 50%, #0A0A0A 100%)","linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px)","linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px)"].join(","):["radial-gradient(circle at 22% 22%, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0) 48%)","radial-gradient(circle at 76% 24%, rgba(203,213,225,0.45) 0%, rgba(203,213,225,0) 42%)",KC,"linear-gradient(rgba(15,23,42,0.05) 1px, transparent 1px)","linear-gradient(90deg, rgba(15,23,42,0.04) 1px, transparent 1px)"].join(","),backgroundSize:"auto, auto, auto, 24px 24px, 24px 24px",borderBottom:"1px solid",borderColor:q.palette.mode==="dark"?"rgba(255,255,255,0.12)":"rgba(15,23,42,0.12)"}),children:[jsxRuntime.jsxs(material.Toolbar,{sx:{minHeight:`${Wm}px !important`,px:2,gap:2},children:[jsxRuntime.jsxs(material.Stack,{direction:"row",alignItems:"center",spacing:1.5,sx:{minWidth:220},children:[u,t===null?null:t||jsxRuntime.jsx(material.Box,{component:"img",src:"/orbcafe.png",alt:"ORBCAFE Logo",sx:{width:44,height:44,display:"block",objectFit:"contain",flexShrink:0}}),e&&jsxRuntime.jsx(material.Typography,{variant:"h6",sx:{fontWeight:700,color:w?"common.white":"#111827"},children:e})]}),jsxRuntime.jsx(material.Box,{sx:{flex:1,display:"flex",justifyContent:"center",minWidth:0},children:l&&jsxRuntime.jsx(hd,{searchPlaceholder:d,onSearch:s,onSearchAdd:g})}),jsxRuntime.jsxs(material.Stack,{direction:"row",alignItems:"center",spacing:1.5,children:[c?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(material.IconButton,{size:"small",onClick:q=>R(q.currentTarget),sx:{color:w?"common.white":"#111827",borderRadius:1,px:.5},children:jsxRuntime.jsxs(material.Stack,{direction:"row",alignItems:"center",spacing:.45,children:[jsxRuntime.jsx(Vm__default.default,{sx:{fontSize:18}}),jsxRuntime.jsx(material.Typography,{variant:"caption",sx:{fontWeight:500},children:M})]})}),jsxRuntime.jsx(material.Menu,{anchorEl:E,open:B,onClose:()=>R(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:P.map(q=>jsxRuntime.jsx(material.MenuItem,{selected:q===D,onClick:()=>{c(q),R(null);},sx:{fontSize:"0.82rem"},children:Hm[q]},q))})]}):jsxRuntime.jsxs(material.Stack,{direction:"row",alignItems:"center",spacing:.5,children:[jsxRuntime.jsx(Vm__default.default,{sx:{color:w?"common.white":"#111827",fontSize:18}}),jsxRuntime.jsx(material.Typography,{variant:"caption",sx:{color:w?"common.white":"#111827",fontWeight:500},children:M})]}),jsxRuntime.jsx(material.IconButton,{size:"small",sx:{color:w?"common.white":"#111827"},onClick:r,title:S,children:k}),f&&jsxRuntime.jsxs(material.Stack,{direction:"row",alignItems:"center",spacing:1,children:[jsxRuntime.jsxs(material.Box,{sx:{textAlign:"right",minWidth:0},children:[jsxRuntime.jsx(material.Typography,{variant:"body2",sx:{color:w?"common.white":"#111827",fontWeight:700,lineHeight:1.15},children:f.name}),f.subtitle&&jsxRuntime.jsx(material.Typography,{variant:"caption",sx:{display:"block",mt:.25,color:w?"rgba(255,255,255,0.72)":"rgba(17,24,39,0.62)",fontSize:"0.72rem",lineHeight:1.1,letterSpacing:"0.01em",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:220},title:f.subtitle,children:f.subtitle})]}),jsxRuntime.jsx(material.IconButton,{size:"small",onClick:q=>I(q.currentTarget),sx:{p:0},children:jsxRuntime.jsx(material.Avatar,{src:f.avatarSrc,imgProps:{style:{objectFit:"cover"}},sx:{width:34,height:34,bgcolor:"grey.100",color:"grey.700",fontSize:"0.85rem"},children:f.avatarText||f.name.slice(0,1).toUpperCase()})})]}),C]})]}),f&&jsxRuntime.jsx(material.Menu,{anchorEl:T,open:X,onClose:()=>I(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},slotProps:{paper:{sx:{minWidth:160,"& .MuiMenuItem-root":{minHeight:34,py:.5,px:1.25}}}},children:Z.map(q=>jsxRuntime.jsxs(material.MenuItem,{disabled:q.disabled,onClick:()=>$(q.onClick),children:[q.icon&&jsxRuntime.jsx(material.ListItemIcon,{children:q.icon}),jsxRuntime.jsx(material.ListItemText,{primary:q.label,slotProps:{primary:{sx:{fontSize:"0.86rem",fontWeight:500}}}})]},q.key))})]})};var Gm=({menuData:e=[],initialNavigationCollapsed:t=false,initialNavigationMode:o="fixed"}={})=>{let{navigationIslandProps:r}=wu({initialCollapsed:t,initialDisplayMode:o,content:e}),[a,n]=Qt.useState(900);Qt.useEffect(()=>{let c=()=>n(window.innerHeight);return c(),window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[]);let i=Qt.useMemo(()=>Math.max(280,a-100),[a]);return {navigationIslandProps:r,navigationMaxHeight:i}};var nr=12,Km=56,qm=234,ds=(e,t,o)=>Math.min(Math.max(e,t),Math.max(t,o)),eS=e=>e instanceof HTMLElement?!!e.closest('button,input,a,textarea,select,[role="button"],[contenteditable="true"]'):false,qE=({appTitle:e,menuData:t=[],children:o,showNavigation:r=true,locale:a="en",localeLabel:n,localeOptions:i,onLocaleChange:c,user:d,onUserSetting:l,onUserLogout:s,userMenuItems:g,logo:f,searchPlaceholder:p,searchPlacement:b="hidden",floatingSearchSx:y,onSearch:u,onSearchAdd:C,rightHeaderSlot:m,leftHeaderSlot:h,contentSx:x,navigationMode:w,defaultNavigationMode:E="fixed",onNavigationModeChange:R,showNavigationModeToggle:T=true})=>{let I="orbcafe:page-layout-mode",k="orbcafe:page-layout-navigation-mode",[S,D]=Qt.useState("system"),[P,M]=Qt.useState("light"),[B,X]=Qt.useState(false),[L,Z]=Qt.useState(false),[$,q]=Qt.useState(E),[H,re]=Qt.useState({x:nr,y:nr}),[de,Ce]=Qt.useState("left"),[ve,le]=Qt.useState(false),oe=Qt.useRef(null),Ie=Qt.useRef(null),Ze=w!==void 0,Ge=w??$,ce=Ge==="floating",Ve=b==="header",et=S==="system"?B?P:"light":S;Qt.useEffect(()=>{try{let je=window.localStorage.getItem(I);(je==="light"||je==="dark"||je==="system")&&D(je);}catch{}X(true);let ae=window.matchMedia("(prefers-color-scheme: dark)"),fe=()=>{M(ae.matches?"dark":"light");};return fe(),ae.addEventListener("change",fe),()=>ae.removeEventListener("change",fe)},[]),Qt.useEffect(()=>{if(B)try{window.localStorage.setItem(I,S);}catch{}},[B,S]),Qt.useEffect(()=>{if(Ze){Z(true);return}try{let ae=window.localStorage.getItem(k);(ae==="fixed"||ae==="floating")&&q(ae);}catch{}finally{Z(true);}},[Ze]),Qt.useEffect(()=>{if(L)try{window.localStorage.setItem(k,Ge);}catch{}},[Ge,L]),Qt.useEffect(()=>{et==="dark"?(document.documentElement.classList.add("dark"),document.documentElement.style.colorScheme="dark"):(document.documentElement.classList.remove("dark"),document.documentElement.style.colorScheme="light");},[et]);let ye=Qt.useMemo(()=>material.createTheme({palette:{mode:et}}),[et]),We=Qt.useCallback(ae=>{Ze||q(ae),R?.(ae);},[Ze,R]),{navigationIslandProps:qe,navigationMaxHeight:st}=Gm({menuData:t,initialNavigationCollapsed:false,initialNavigationMode:Ge}),Pe=qe.collapsed,K=Qt.useCallback(ae=>{let fe=oe.current,je=fe?.parentElement;if(!fe||!je)return ae;let It=je.getBoundingClientRect(),_=fe.getBoundingClientRect(),ze=nr,xe=nr,Y=Math.max(ze,It.width-_.width-nr),N=Math.max(xe,It.height-_.height-nr);return {x:ds(ae.x,ze,Y),y:ds(ae.y,xe,N)}},[]),Ee=Qt.useCallback(ae=>{let fe=oe.current,je=fe?.parentElement;if(!fe||!je)return ae;let It=je.getBoundingClientRect(),_=fe.getBoundingClientRect(),ze=nr,xe=nr,Y=Math.max(ze,It.width-_.width-nr),N=Math.max(xe,It.height-_.height-nr),J={x:ds(ae.x,ze,Y),y:ds(ae.y,xe,N)},Me=[{distance:Math.abs(J.x-ze),position:{x:ze,y:J.y}},{distance:Math.abs(J.x-Y),position:{x:Y,y:J.y}},{distance:Math.abs(J.y-xe),position:{x:J.x,y:xe}},{distance:Math.abs(J.y-N),position:{x:J.x,y:N}}].reduce((tt,bt)=>bt.distance<tt.distance?bt:tt).position;return Ce(Me.x>=(ze+Y)/2?"right":"left"),Me},[]),ge=Qt.useMemo(()=>{if(!ce||ve)return H.x;if(de==="right"){let je=oe.current?.parentElement?.getBoundingClientRect().width,It=Pe?Km:qm;return je?Math.max(nr,je-It-nr):Pe?H.x:H.x-(qm-Km)}return H.x},[de,H.x,ve,ce,Pe]),ke=Qt.useCallback(ae=>{if(!ce||!Pe||eS(ae.target))return;ae.preventDefault(),ae.currentTarget.setPointerCapture(ae.pointerId);let fe=K({x:ge,y:H.y});Ce("left"),re(fe),Ie.current={pointerId:ae.pointerId,startClientX:ae.clientX,startClientY:ae.clientY,startX:fe.x,startY:fe.y,currentX:fe.x,currentY:fe.y},le(true);},[K,ge,H.y,ce,Pe]),rt=Qt.useCallback(ae=>{let fe=Ie.current;if(!fe||fe.pointerId!==ae.pointerId)return;let je=K({x:fe.startX+ae.clientX-fe.startClientX,y:fe.startY+ae.clientY-fe.startClientY});fe.currentX=je.x,fe.currentY=je.y,re(je);},[K]),Ue=Qt.useCallback(ae=>{let fe=Ie.current;if(!(!fe||fe.pointerId!==ae.pointerId)){try{ae.currentTarget.releasePointerCapture(ae.pointerId);}catch{}Ie.current=null,re(Ee({x:fe.currentX,y:fe.currentY})),le(false);}},[Ee]);return Qt.useEffect(()=>{if(!ce)return;let ae=()=>{re(It=>K(It));},fe=window.requestAnimationFrame(ae),je=window.setTimeout(ae,430);return ()=>{window.cancelAnimationFrame(fe),window.clearTimeout(je);}},[K,ce,Pe,st]),jsxRuntime.jsx(material.ThemeProvider,{theme:ye,children:jsxRuntime.jsx(cl,{locale:a,children:jsxRuntime.jsxs(material.Box,{sx:ae=>({minHeight:"100vh",width:"100%",display:"flex",flexDirection:"column",overflowX:"hidden",background:ae.palette.mode==="dark"?"linear-gradient(180deg, #0A0A0A 0%, #141414 55%, #1A1A1A 100%)":ae.palette.background.default}),children:[jsxRuntime.jsx(cs,{appTitle:e,logo:f,mode:S,onToggleMode:()=>D(ae=>ae==="system"?"dark":ae==="dark"?"light":"system"),locale:a,localeLabel:n,localeOptions:i,onLocaleChange:c,user:d,onUserSetting:l,onUserLogout:s,userMenuItems:g,searchPlaceholder:p,showSearch:Ve,onSearch:u,onSearchAdd:C,leftSlot:h,rightSlot:m}),b==="floating"&&jsxRuntime.jsx(material.Box,{sx:[ae=>({position:"fixed",left:{xs:12,sm:"auto"},right:{xs:12,md:24},bottom:{xs:12,md:24},width:{xs:"auto",sm:540},maxWidth:"calc(100vw - 24px)",zIndex:ae.zIndex.modal+30,pointerEvents:"auto",filter:ae.palette.mode==="dark"?"drop-shadow(0 18px 42px rgba(0,0,0,0.58))":"drop-shadow(0 18px 36px rgba(15,23,42,0.18))"}),...Array.isArray(y)?y:y?[y]:[]],children:jsxRuntime.jsx(hd,{searchPlaceholder:p,onSearch:u,onSearchAdd:C,maxWidth:"100%"})}),jsxRuntime.jsxs(material.Box,{sx:{flex:1,minHeight:0,minWidth:0,display:"flex",overflowX:"hidden",position:"relative"},children:[r&&!ce&&jsxRuntime.jsx(material.Box,{sx:{pt:1.5,pb:1.5,pl:1.5,pr:Pe?.5:1.5,display:"flex",alignItems:"flex-start",flexShrink:0},children:jsxRuntime.jsx(dc,{...qe,maxHeight:st,colorMode:et,displayMode:Ge,onDisplayModeChange:We,showDisplayModeToggle:T&&Pe})}),r&&ce&&jsxRuntime.jsx(material.Box,{ref:oe,onPointerDown:ke,onPointerMove:rt,onPointerUp:Ue,onPointerCancel:Ue,sx:ae=>({position:"absolute",top:H.y,left:ge,zIndex:ae.zIndex.drawer+5,display:"flex",alignItems:"flex-start",cursor:Pe?ve?"grabbing":"grab":"default",touchAction:Pe?"none":"auto",userSelect:ve?"none":void 0,transition:ve?"none":"left 180ms ease-out, top 180ms ease-out"}),children:jsxRuntime.jsx(dc,{...qe,maxHeight:st,colorMode:et,displayMode:Ge,onDisplayModeChange:We,showDisplayModeToggle:T&&Pe})}),jsxRuntime.jsx(material.Box,{sx:{flex:1,minWidth:0,minHeight:0,overflow:"auto",pt:1.5,pb:1.5,pr:1.5,pl:r&&!ce&&Pe?.5:1.5,...x},children:o})]})]})})})};var us="(blank)",Xm="Result",Zm="Grand Total",Ym={sum:"Sum",count:"Count",avg:"Average",min:"Min",max:"Max"},Qm=["sum","count","avg","min","max"];var Jm=["palette","rows","columns","filters","values"];var eg=e=>Jm.includes(e),tg=e=>e==="rows"||e==="columns"||e==="filters",ps=e=>{let t=e.split("|");return t.length===2&&t[0]==="container"&&eg(t[1])?{kind:"container",zone:t[1]}:t.length===3&&t[0]==="item"&&eg(t[1])&&t[2]?{kind:"item",zone:t[1],key:t[2]}:null},jr=e=>e==null||e===""?us:e instanceof Date?e.toISOString().slice(0,10):String(e),Ua=e=>JSON.stringify(e),og=(e,t)=>{let o=e.join(""),r=t.join("");return o.localeCompare(r,void 0,{sensitivity:"base"})},tS=e=>{if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"&&e.trim()!==""){let t=Number(e);return Number.isFinite(t)?t:null}return null},Fn=(e,t,o)=>{if(o==="count")return e.length;let r=e.map(a=>tS(a[t])).filter(a=>a!==null);return r.length===0?0:o==="sum"?r.reduce((a,n)=>a+n,0):o==="avg"?r.reduce((a,n)=>a+n,0)/r.length:o==="min"?Math.min(...r):Math.max(...r)},no=(e,t)=>{if(!e||e.length===0)return [];let o=new Set,r=[];return e.forEach(a=>{!t.has(a)||o.has(a)||(o.add(a),r.push(a));}),r},Xr=(e,t)=>e.length!==t.length?false:e.every((o,r)=>o===t[r]),rg=(e,t)=>{let o=Object.keys(e),r=Object.keys(t);return o.length!==r.length?false:o.every(a=>{let n=e[a]??[],i=t[a]??[];return Xr(n,i)})},ms=(e,t)=>e.length!==t.length?false:e.every((o,r)=>{let a=t[r];return o.tokenId===a.tokenId&&o.fieldId===a.fieldId&&o.aggregation===a.aggregation}),bd=e=>!e?.aggregations||e.aggregations.length===0?Qm:e.aggregations,Po=(e,t)=>{let o=bd(t);return e&&o.includes(e)?e:t?.type==="number"&&o.includes("sum")?"sum":o.includes("count")?"count":o[0]},Wi=(e,t,o)=>{let r=o.get(t.fieldId);return r?.formatValue?r.formatValue(e):t.aggregation==="count"?Math.round(e).toLocaleString():e.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:2})};var ig=({options:e,selectedValues:t,onChange:o,minWidth:r=96})=>{let{t:a}=ne(),[n,i]=Qt.useState(""),c=Qt.useMemo(()=>{let l=n.trim().toLowerCase();return l?e.filter(s=>s.toLowerCase().includes(l)):e},[e,n]),d=e.length>0&&t.length===e.length;return jsxRuntime.jsx(material.FormControl,{size:"small",sx:{minWidth:r},children:jsxRuntime.jsxs(material.Select,{multiple:true,value:t,onChange:l=>{let s=l.target.value,g=typeof s=="string"?s.split(","):s;o(g);},onClick:l=>l.stopPropagation(),onMouseDown:l=>l.stopPropagation(),renderValue:l=>{let s=l;return e.length===0?a("pivot.filter.na"):s.length===0?a("common.none"):s.length===e.length?a("common.all"):`${s.length}/${e.length}`},MenuProps:{PaperProps:{sx:{maxHeight:320,bgcolor:"background.paper"}}},sx:{fontSize:"0.72rem",height:26,"& .MuiSelect-select":{py:.35}},children:[jsxRuntime.jsx(material.ListSubheader,{disableSticky:true,sx:l=>({bgcolor:"background.paper",py:.8,lineHeight:"normal",borderBottom:`1px solid ${l.palette.divider}`}),children:jsxRuntime.jsx(material.TextField,{size:"small",placeholder:`${a("common.search")}...`,fullWidth:true,value:n,onChange:l=>i(l.target.value),onKeyDown:l=>l.stopPropagation(),onClick:l=>l.stopPropagation(),sx:{m:0,"& .MuiInputBase-input":{fontSize:"0.75rem",py:.7}}})}),jsxRuntime.jsx(material.Box,{sx:l=>({px:1.5,py:.5,borderBottom:`1px solid ${l.palette.divider}`,bgcolor:"background.paper"}),onMouseDown:l=>{l.preventDefault(),l.stopPropagation();},onClick:l=>{l.preventDefault(),l.stopPropagation();},children:jsxRuntime.jsx(material.Button,{variant:"text",size:"small",onClick:l=>{l.preventDefault(),l.stopPropagation(),o(d?[]:e);},sx:{minWidth:"auto",px:0,py:.2,fontSize:"0.76rem",fontWeight:700,textTransform:"none"},children:a(d?"pivot.filter.deselectAll":"pivot.filter.selectAll")})}),c.length===0&&jsxRuntime.jsx(material.MenuItem,{disabled:true,sx:{fontSize:"0.75rem"},children:a("pivot.filter.noResults")}),c.map(l=>{let s=t.includes(l);return jsxRuntime.jsxs(material.MenuItem,{value:l,sx:{fontSize:"0.75rem",py:.25},children:[jsxRuntime.jsx(material.Checkbox,{size:"small",checked:s,sx:{p:.5,mr:.5}}),jsxRuntime.jsx(material.ListItemText,{primary:l,primaryTypographyProps:{sx:{fontSize:"0.75rem",lineHeight:1.2}}})]},l)})]})})};var xd=({label:e,subtitle:t,isDragging:o,dragRef:r,listeners:a,attributes:n,style:i})=>jsxRuntime.jsx(material.Paper,{ref:r,...a,...n,sx:c=>({p:1,borderRadius:2,border:"1px solid",borderColor:"divider",bgcolor:c.palette.mode==="dark"?"#111111":"background.paper",touchAction:"none"}),style:{...i,opacity:o?.3:1,cursor:o?"grabbing":"grab"},children:jsxRuntime.jsxs(material.Box,{sx:{display:"flex",alignItems:"center",gap:.8},children:[jsxRuntime.jsx(material.Box,{sx:c=>({display:"inline-flex",alignItems:"center",justifyContent:"center",p:.3,borderRadius:1,bgcolor:c.palette.mode==="dark"?"rgba(255,255,255,0.12)":"rgba(17, 24, 39, 0.08)"}),children:jsxRuntime.jsx(mS__default.default,{sx:{fontSize:16,color:"text.secondary"}})}),jsxRuntime.jsxs(material.Box,{sx:{minWidth:0},children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.82rem",fontWeight:700,lineHeight:1.2},children:e}),t&&jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.72rem",color:"text.secondary",lineHeight:1.2},children:t})]})]})}),cg=({id:e,label:t,subtitle:o})=>{let{setNodeRef:r,listeners:a,attributes:n,isDragging:i}=core.useDraggable({id:e});return jsxRuntime.jsx(xd,{label:t,subtitle:o,isDragging:i,dragRef:r,listeners:a,attributes:n})};var zn=({zone:e,title:t,hint:o,icon:r,children:a,itemCount:n,onClear:i})=>{let c=`container|${e}`,{isOver:d,setNodeRef:l}=core.useDroppable({id:c}),{t:s}=ne();return jsxRuntime.jsxs(material.Paper,{ref:l,sx:g=>({p:1.1,borderRadius:3,border:"1px dashed",borderColor:d?"primary.main":g.palette.divider,bgcolor:d?g.palette.mode==="dark"?"rgba(25, 118, 210, 0.16)":"rgba(47, 91, 255, 0.06)":g.palette.mode==="dark"?"rgba(255,255,255,0.02)":"rgba(245, 248, 255, 0.86)",transition:"all 120ms ease",minHeight:120,display:"flex",flexDirection:"column"}),children:[jsxRuntime.jsxs(material.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[jsxRuntime.jsxs(material.Box,{sx:{display:"flex",alignItems:"center",gap:.8},children:[r,jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.79rem",fontWeight:800,letterSpacing:.2},children:t}),jsxRuntime.jsxs(material.Typography,{sx:{fontSize:"0.72rem",color:"text.secondary"},children:["(",n,")"]})]}),n>0&&i&&jsxRuntime.jsx(material.Tooltip,{title:s("pivot.clearArea"),children:jsxRuntime.jsx(material.IconButton,{size:"small",onClick:i,sx:{p:.25},children:jsxRuntime.jsx(yS__default.default,{sx:{fontSize:16}})})})]}),jsxRuntime.jsx(material.Typography,{sx:{mt:.5,mb:.9,fontSize:"0.7rem",color:"text.secondary"},children:o}),jsxRuntime.jsx(material.Box,{sx:{flex:1},children:a})]})};var ug={xs:1.2,md:1.6},Vn=({title:e,subtitle:t,collapsed:o,onToggleCollapse:r,expandAriaLabel:a,collapseAriaLabel:n,children:i,bodySx:c,unmountOnExit:d=false,headerActions:l})=>jsxRuntime.jsxs(material.Paper,{sx:s=>({borderRadius:3,border:`1px solid ${s.palette.divider}`,overflow:"hidden",bgcolor:styles.alpha(s.palette.background.paper,.95)}),children:[jsxRuntime.jsxs(material.Box,{sx:s=>({px:ug,py:1,display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,borderBottom:o?"none":`1px solid ${s.palette.divider}`}),children:[jsxRuntime.jsxs(material.Box,{sx:{minWidth:0,flex:1},children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.9rem",fontWeight:800},children:e}),jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.74rem",color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t})]}),jsxRuntime.jsxs(material.Box,{sx:{display:"flex",alignItems:"center",gap:.75,flexShrink:0},children:[l,jsxRuntime.jsx(material.IconButton,{size:"small","aria-label":o?a:n,onClick:r,sx:s=>({border:`1px solid ${s.palette.divider}`,bgcolor:styles.alpha(s.palette.background.paper,.88),width:28,height:28,borderRadius:999,flexShrink:0,"&:hover":{bgcolor:s.palette.mode==="dark"?styles.alpha(s.palette.primary.main,.18):styles.alpha(s.palette.primary.main,.08)}}),children:jsxRuntime.jsx(m0__default.default,{sx:{fontSize:16,transition:"transform 220ms cubic-bezier(0.2, 0, 0, 1)",transform:o?"rotate(180deg)":"rotate(0deg)"}})})]})]}),jsxRuntime.jsx(material.Collapse,{in:!o,timeout:260,easing:"cubic-bezier(0.2, 0, 0, 1)",unmountOnExit:d,children:jsxRuntime.jsx(material.Box,{sx:[{px:ug,py:{xs:1.2,md:1.6}},...Array.isArray(c)?c:c?[c]:[]],children:i})})]});var ys=({label:e,caption:t,onRemove:o,trailing:r,isDragging:a,dragRef:n,listeners:i,attributes:c,style:d})=>jsxRuntime.jsx(material.Paper,{ref:n,style:d,sx:l=>({p:1,borderRadius:2,border:"1px solid",borderColor:"divider",bgcolor:l.palette.mode==="dark"?"#111111":"background.paper",touchAction:"none",opacity:a?0:1}),children:jsxRuntime.jsxs(material.Box,{sx:{display:"flex",alignItems:"center",gap:.8},children:[jsxRuntime.jsx(material.Box,{...c,...i,sx:l=>({display:"inline-flex",alignItems:"center",justifyContent:"center",p:.25,borderRadius:1,bgcolor:l.palette.mode==="dark"?"rgba(255,255,255,0.12)":"rgba(17, 24, 39, 0.08)",cursor:"grab"}),children:jsxRuntime.jsx(mS__default.default,{sx:{fontSize:15,color:"text.secondary"}})}),jsxRuntime.jsxs(material.Box,{sx:{minWidth:0,flex:1},children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.8rem",fontWeight:700,lineHeight:1.2},children:e}),t&&jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.7rem",color:"text.secondary",lineHeight:1.2},children:t})]}),r,o&&jsxRuntime.jsx(material.IconButton,{size:"small",onClick:l=>{l.stopPropagation(),o();},sx:{p:.2},children:jsxRuntime.jsx(Sb__default.default,{sx:{fontSize:16}})})]})}),Hi=({id:e,label:t,caption:o,onRemove:r,trailing:a})=>{let{setNodeRef:n,attributes:i,listeners:c,transform:d,transition:l,isDragging:s}=sortable.useSortable({id:e}),g={transform:d?`translate3d(${d.x}px, ${d.y}px, 0)`:void 0,transition:l,zIndex:s?999:"auto"};return jsxRuntime.jsx(ys,{label:t,caption:o,onRemove:r,trailing:a,isDragging:s,dragRef:n,listeners:c,attributes:i,style:g})};var Cs={rows:jsxRuntime.jsx(BS__default.default,{fontSize:"small"}),columns:jsxRuntime.jsx(zb__default.default,{fontSize:"small"}),filters:jsxRuntime.jsx(AS__default.default,{fontSize:"small"}),values:jsxRuntime.jsx(Hb__default.default,{fontSize:"small"})},gg=({isConfiguratorCollapsed:e,onToggleCollapse:t,availableFields:o,fieldMap:r,filterFields:a,columnFields:n,rowFields:i,valueFields:c,clearZone:d,removeFieldFromZone:l,getFilterSelectionSummary:s,renderDimensionFilterSelect:g,renderAggregationSelect:f,getAggregationLabel:p})=>{let{t:b}=ne(),y=[`${b("pivot.zone.rows")} ${i.length}`,`${b("pivot.zone.columns")} ${n.length}`,`${b("pivot.zone.filters")} ${a.length}`,`${b("pivot.zone.values")} ${c.length}`].join(" \xB7 ");return jsxRuntime.jsx(Vn,{title:b("pivot.config.title"),subtitle:y,collapsed:e,onToggleCollapse:t,expandAriaLabel:b("pivot.collapse.ariaExpand"),collapseAriaLabel:b("pivot.collapse.ariaCollapse"),unmountOnExit:true,children:jsxRuntime.jsxs(material.Box,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",lg:"260px 1fr"},gap:2},children:[jsxRuntime.jsx(zn,{zone:"palette",title:b("pivot.fieldList"),hint:b("pivot.availableDimensions"),itemCount:o.length,icon:jsxRuntime.jsx(mS__default.default,{sx:{fontSize:16,color:"text.secondary"}}),children:jsxRuntime.jsxs(material.Stack,{spacing:.8,sx:{maxHeight:400,overflowY:"auto",pr:.5},children:[o.length===0&&jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.74rem",color:"text.secondary",py:1},children:b("pivot.allFieldsInUse")}),o.map(u=>jsxRuntime.jsx(cg,{id:`item|palette|${u.id}`,label:u.label,subtitle:u.type??"string"},u.id))]})}),jsxRuntime.jsxs(material.Stack,{spacing:2,children:[jsxRuntime.jsxs(material.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[jsxRuntime.jsx(zn,{zone:"filters",title:b("pivot.zone.filters"),hint:b("pivot.hint.filters"),icon:Cs.filters,itemCount:a.length,onClear:()=>d("filters"),children:jsxRuntime.jsx(sortable.SortableContext,{items:a.map(u=>`item|filters|${u}`),strategy:sortable.verticalListSortingStrategy,children:jsxRuntime.jsx(material.Stack,{spacing:.7,children:a.map(u=>jsxRuntime.jsx(Hi,{id:`item|filters|${u}`,label:r.get(u)?.label??u,caption:s(u),trailing:g(u),onRemove:()=>l("filters",u)},u))})})}),jsxRuntime.jsx(zn,{zone:"columns",title:b("pivot.zone.columns"),hint:b("pivot.hint.columns"),icon:Cs.columns,itemCount:n.length,onClear:()=>d("columns"),children:jsxRuntime.jsx(sortable.SortableContext,{items:n.map(u=>`item|columns|${u}`),strategy:sortable.verticalListSortingStrategy,children:jsxRuntime.jsx(material.Stack,{spacing:.7,children:n.map(u=>jsxRuntime.jsx(Hi,{id:`item|columns|${u}`,label:r.get(u)?.label??u,caption:`${r.get(u)?.type??"dimension"} \u2022 ${s(u)}`,trailing:g(u),onRemove:()=>l("columns",u)},u))})})})]}),jsxRuntime.jsxs(material.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[jsxRuntime.jsx(zn,{zone:"rows",title:b("pivot.zone.rows"),hint:b("pivot.hint.rows"),icon:Cs.rows,itemCount:i.length,onClear:()=>d("rows"),children:jsxRuntime.jsx(sortable.SortableContext,{items:i.map(u=>`item|rows|${u}`),strategy:sortable.verticalListSortingStrategy,children:jsxRuntime.jsx(material.Stack,{spacing:.7,children:i.map(u=>jsxRuntime.jsx(Hi,{id:`item|rows|${u}`,label:r.get(u)?.label??u,caption:`${r.get(u)?.type??"dimension"} \u2022 ${s(u)}`,trailing:g(u),onRemove:()=>l("rows",u)},u))})})}),jsxRuntime.jsx(zn,{zone:"values",title:b("pivot.zone.values"),hint:b("pivot.hint.values"),icon:Cs.values,itemCount:c.length,onClear:()=>d("values"),children:jsxRuntime.jsx(sortable.SortableContext,{items:c.map(u=>`item|values|${u.tokenId}`),strategy:sortable.verticalListSortingStrategy,children:jsxRuntime.jsx(material.Stack,{spacing:.7,children:c.map(u=>{let C=r.get(u.fieldId)?.label??u.fieldId,m=`${p(u.aggregation)}(${C})`;return jsxRuntime.jsx(Hi,{id:`item|values|${u.tokenId}`,label:C,caption:m,trailing:f(u),onRemove:()=>l("values",u.tokenId)},u.tokenId)})})})})]})]})]})})};var fg=e=>e.toLocaleString(void 0,{maximumFractionDigits:1}),hg=({data:e,primaryLabel:t,secondaryLabel:o,formatPrimaryValue:r,formatSecondaryValue:a})=>{let n=styles.useTheme();if(e.length===0)return null;let i=720,c=250,d={top:20,right:24,bottom:40,left:52},l=o?e.map(u=>u.primaryValue):e.map((u,C)=>C+1),s=o?e.map(u=>u.secondaryValue??0):e.map(u=>u.primaryValue),g=Math.max(...l,1),f=Math.max(...s,1),p=i-d.left-d.right,b=c-d.top-d.bottom,y=e.map((u,C)=>{let m=o?u.primaryValue:C+1,h=o?u.secondaryValue??0:u.primaryValue,x=d.left+m/g*p,w=c-d.bottom-h/f*b;return {...u,x,y:w,rawX:m,rawY:h}});return jsxRuntime.jsxs(material.Box,{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[jsxRuntime.jsx(material.Box,{sx:{overflowX:"auto"},children:jsxRuntime.jsxs(material.Box,{component:"svg",viewBox:`0 0 ${i} ${c}`,sx:{width:"100%",minWidth:i,height:c},children:[jsxRuntime.jsx("line",{x1:d.left,y1:c-d.bottom,x2:i-d.right,y2:c-d.bottom,stroke:styles.alpha(n.palette.text.secondary,.35)}),jsxRuntime.jsx("line",{x1:d.left,y1:d.top,x2:d.left,y2:c-d.bottom,stroke:styles.alpha(n.palette.text.secondary,.35)}),y.map(u=>jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("circle",{cx:u.x,cy:u.y,r:7,fill:styles.alpha(n.palette.primary.main,.18)}),jsxRuntime.jsx("circle",{cx:u.x,cy:u.y,r:4.5,fill:n.palette.primary.main,children:jsxRuntime.jsxs("title",{children:[u.name,`
|
|
195
|
-
`,
|
|
196
|
-
${
|
|
197
|
-
`,
|
|
198
|
-
`,r,": ",(n??a)(m.item.secondaryValue??0)]})},`secondary-${m.item.name}`))]})]})}),jsxRuntime.jsx(material.Box,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(2, minmax(0, 1fr))",xl:"repeat(4, minmax(0, 1fr))"},gap:1},children:e.map(m=>jsxRuntime.jsxs(material.Box,{sx:h=>({borderRadius:2,px:1.1,py:.9,border:`1px solid ${styles.alpha(h.palette.divider,.7)}`,bgcolor:styles.alpha(h.palette.background.default,.35)}),children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.76rem",fontWeight:700},noWrap:true,title:m.name,children:m.name}),jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.71rem",color:"text.secondary"},children:a(m.primaryValue)}),r&&jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.71rem",color:"text.secondary"},children:(n??a)(m.secondaryValue??0)})]},m.name))})]})};var xg=(e,t,o)=>{let r=new Set,a=[];return e.forEach(n=>{r.has(n)||(r.add(n),a.push({fieldId:n,label:o.get(n)?.label??n,zone:"rows"}));}),t.forEach(n=>{r.has(n)||(r.add(n),a.push({fieldId:n,label:o.get(n)?.label??n,zone:"columns"}));}),a},vg=(e,t,o)=>e.map(r=>{let a=t.get(r.fieldId),n=a?.label??r.fieldId;return {fieldId:r.fieldId,label:`${o(r.aggregation)} \xB7 ${n}`,item:r,field:a}}),Cg=({rows:e,dimensionFieldId:t,primaryValue:o,secondaryValue:r})=>{if(!t)return [];let a=new Map;return e.forEach(n=>{let i=jr(n[t]),c=a.get(i);if(c){c.push(n);return}a.set(i,[n]);}),Array.from(a.entries()).sort((n,i)=>n[0].localeCompare(i[0],void 0,{sensitivity:"base"})).map(([n,i])=>({name:n,primaryValue:Fn(i,o.fieldId,o.aggregation),secondaryValue:r?Fn(i,r.fieldId,r.aggregation):void 0}))};var Sg=({rows:e,fieldMap:t,rowFields:o,columnFields:r,valueFields:a,chartDimensionFieldId:n,chartPrimaryValueFieldId:i,chartSecondaryValueFieldId:c,chartType:d,isCollapsed:l,onChartDimensionFieldIdChange:s,onChartPrimaryValueFieldIdChange:g,onChartSecondaryValueFieldIdChange:f,onChartTypeChange:p,onToggleCollapse:b,getAggregationLabel:y})=>{let{t:u}=ne(),C=Qt.useMemo(()=>xg(o,r,t),[r,t,o]),m=Qt.useMemo(()=>vg(a,t,y),[t,y,a]),h=m.find(S=>S.fieldId===i)??m[0],x=m.find(S=>S.fieldId===c&&S.fieldId!==h?.fieldId)??null,w=C.find(S=>S.fieldId===n)??C[0],E=w&&h?u("pivot.chart.subtitleReady",{dimension:w.label,measure:x?`${h.label} / ${x.label}`:h.label}):u("pivot.chart.subtitle"),R=Qt.useMemo(()=>!w||!h?[]:Cg({rows:e,dimensionFieldId:w.fieldId,primaryValue:h.item,secondaryValue:x?.item}),[h,e,x,w]),T=S=>h?Wi(S,h.item,t):S.toLocaleString(),I=S=>x?Wi(S,x.item,t):S.toLocaleString(),k=C.length>1||m.length>1;return jsxRuntime.jsxs(Vn,{title:u("pivot.chart.title"),subtitle:E,collapsed:l,onToggleCollapse:b,expandAriaLabel:u("pivot.chart.collapse.ariaExpand"),collapseAriaLabel:u("pivot.chart.collapse.ariaCollapse"),bodySx:{display:"flex",flexDirection:"column",gap:1.1},children:[k&&jsxRuntime.jsxs(material.Box,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(2, minmax(0, 1fr))",xl:"repeat(4, minmax(0, 1fr))"},gap:1,alignItems:"start"},children:[jsxRuntime.jsxs(material.FormControl,{size:"small",sx:{minWidth:0,width:"100%"},children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.68rem",color:"text.secondary",mb:.45},children:u("pivot.chart.dimension")}),jsxRuntime.jsx(material.Select,{value:w?.fieldId??"",onChange:S=>s(String(S.target.value)),sx:{fontSize:"0.75rem",height:32},children:C.map(S=>jsxRuntime.jsx(material.MenuItem,{value:S.fieldId,sx:{fontSize:"0.75rem"},children:S.label},S.fieldId))})]}),jsxRuntime.jsxs(material.FormControl,{size:"small",sx:{minWidth:0,width:"100%"},children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.68rem",color:"text.secondary",mb:.45},children:u("pivot.chart.primaryMeasure")}),jsxRuntime.jsx(material.Select,{value:h?.fieldId??"",onChange:S=>g(String(S.target.value)),sx:{fontSize:"0.75rem",height:32},children:m.map(S=>jsxRuntime.jsx(material.MenuItem,{value:S.fieldId,sx:{fontSize:"0.75rem"},children:S.label},S.fieldId))})]}),jsxRuntime.jsxs(material.FormControl,{size:"small",sx:{minWidth:0,width:"100%"},children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.68rem",color:"text.secondary",mb:.45},children:u("pivot.chart.secondaryMeasure")}),jsxRuntime.jsxs(material.Select,{value:x?.fieldId??"",onChange:S=>f(String(S.target.value)),sx:{fontSize:"0.75rem",height:32},children:[jsxRuntime.jsx(material.MenuItem,{value:"",sx:{fontSize:"0.75rem",color:"text.secondary"},children:u("common.none")}),m.filter(S=>S.fieldId!==h?.fieldId).map(S=>jsxRuntime.jsx(material.MenuItem,{value:S.fieldId,sx:{fontSize:"0.75rem"},children:S.label},S.fieldId))]})]}),jsxRuntime.jsxs(material.FormControl,{size:"small",sx:{minWidth:0,width:"100%"},children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.68rem",color:"text.secondary",mb:.45},children:u("pivot.chart.chartType")}),jsxRuntime.jsxs(material.Select,{value:d,onChange:S=>p(S.target.value),sx:{fontSize:"0.75rem",height:32},children:[jsxRuntime.jsx(material.MenuItem,{value:"bar-vertical",sx:{fontSize:"0.75rem"},children:u("pivot.chart.style.barVertical")}),jsxRuntime.jsx(material.MenuItem,{value:"bar-horizontal",sx:{fontSize:"0.75rem"},children:u("pivot.chart.style.barHorizontal")}),jsxRuntime.jsx(material.MenuItem,{value:"line",sx:{fontSize:"0.75rem"},children:u("pivot.chart.style.line")}),jsxRuntime.jsx(material.MenuItem,{value:"scatter",sx:{fontSize:"0.75rem"},children:u("pivot.chart.style.scatter")})]})]})]}),jsxRuntime.jsx(material.Box,{children:w?h?R.length===0?jsxRuntime.jsx(material.Box,{sx:{py:5,textAlign:"center"},children:jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.86rem",color:"text.secondary"},children:u("pivot.chart.emptyNoData")})}):d==="scatter"?jsxRuntime.jsx(hg,{data:R,primaryLabel:h.label,secondaryLabel:x?.label,formatPrimaryValue:T,formatSecondaryValue:I}):jsxRuntime.jsx(yg,{data:R,chartType:d,primaryLabel:h.label,secondaryLabel:x?.label,formatPrimaryValue:T,formatSecondaryValue:I}):jsxRuntime.jsx(material.Box,{sx:{py:5,textAlign:"center"},children:jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.86rem",color:"text.secondary"},children:u("pivot.chart.emptyNoValue")})}):jsxRuntime.jsx(material.Box,{sx:{py:5,textAlign:"center"},children:jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.86rem",color:"text.secondary"},children:u("pivot.chart.emptyNoDimension")})})})]})};var ws=({node:e,dataColumns:t,fieldMap:o,level:r,expandedKeys:a,onToggle:n,getValue:i})=>{let c=a.has(e.key),d=e.children.length>0,l=e.isGrandTotal;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(material.TableRow,{sx:s=>({bgcolor:l?s.palette.mode==="dark"?"rgba(25, 118, 210, 0.22)":"rgba(47, 91, 255, 0.08)":s.palette.mode==="dark"?"#111111":"background.paper","&:hover":{bgcolor:l?s.palette.mode==="dark"?"rgba(25, 118, 210, 0.28)":"rgba(47, 91, 255, 0.12)":s.palette.mode==="dark"?"#181818":"rgba(0, 0, 0, 0.02)"}}),children:[jsxRuntime.jsxs(material.TableCell,{sx:s=>({fontSize:"0.76rem",fontWeight:l?800:600,borderBottom:`1px solid ${s.palette.divider}`,whiteSpace:"nowrap",pl:r*2+1,display:"flex",alignItems:"center",height:40}),children:[d&&!l&&jsxRuntime.jsx(material.IconButton,{size:"small",onClick:()=>n(e.key),sx:{p:.2,mr:.5,ml:-1},children:c?jsxRuntime.jsx(gy__default.default,{sx:{fontSize:16}}):jsxRuntime.jsx(ch__default.default,{sx:{fontSize:16}})}),!d&&!l&&r>0&&jsxRuntime.jsx(material.Box,{sx:{width:20}}),e.value]}),t.map(s=>jsxRuntime.jsx(material.TableCell,{align:"right",sx:{fontSize:"0.76rem",fontWeight:l?800:500,borderBottom:g=>`1px solid ${g.palette.divider}`,whiteSpace:"nowrap"},children:Wi(i?i(e,s.id):e.aggregatedValues[s.id]??0,s.valueItem,o)},`${e.key}-${s.id}`))]}),c&&e.children.map(s=>jsxRuntime.jsx(ws,{node:s,dataColumns:t,fieldMap:o,level:r+1,expandedKeys:a,onToggle:n,getValue:i},s.key))]})};var Dd=(e,t,o)=>{let r=[...e,...t];return o&&r.includes(o)?o:r[0]??""},Ps=(e,t)=>t&&e.some(o=>o.fieldId===t)?t:e[0]?.fieldId??"",Ad=(e,t,o)=>o===""?"":o&&o!==t&&e.some(r=>r.fieldId===o)?o:e.find(r=>r.fieldId!==t)?.fieldId??"",Mg=e=>{let t=new Set,o=r=>{r.forEach(a=>{a.children.length>0&&(t.add(a.key),o(a.children));});};return o(e),t},Ag=(e,t,o=0)=>e.length===0?o:e.reduce((r,a)=>a.children.length===0||!t.has(a.key)?Math.max(r,o+1):Math.max(r,Ag(a.children,t,o+1)),o),gk=(e,t)=>{let o=[],r=a=>{a.forEach(n=>{if(n.children.length>0&&t.has(n.key)){r(n.children);return}o.push(n);});};return r(e),o},LL=({title:e,rows:t,fields:o,initialLayout:r,initialChart:a,emptyText:n,maxPreviewHeight:i=520,initialChartCollapsed:c=false,initialTableCollapsed:d=false,model:l,enablePresetManagement:s=false,presets:g,defaultPresets:f,onPresetsChange:p,initialPresetId:b,onPresetApplied:y})=>{let{t:u}=ne(),C=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:8}})),m=Qt.useRef(0),h=Qt.useRef(false),x=e??u("pivot.title.default"),w=n??u("pivot.empty"),E=Qt.useMemo(()=>({sum:u("pivot.agg.sum"),count:u("pivot.agg.count"),avg:u("pivot.agg.avg"),min:u("pivot.agg.min"),max:u("pivot.agg.max")}),[u]),R=Qt.useCallback(v=>E[v]??Ym[v],[E]),T=Qt.useMemo(()=>new Set(o.map(v=>v.id)),[o]),I=Qt.useMemo(()=>new Map(o.map(v=>[v.id,v])),[o]),[k,S]=Qt.useState(()=>no(r?.rows,T)),[D,P]=Qt.useState(()=>no(r?.columns,T)),[M,B]=Qt.useState(()=>no(r?.filters,T)),[X,L]=Qt.useState(()=>{let v=r?.values??[],F=new Set,z=[];return v.forEach(Q=>{if(!T.has(Q.fieldId)||F.has(Q.fieldId))return;F.add(Q.fieldId),m.current+=1;let he=I.get(Q.fieldId);z.push({tokenId:`v${m.current}`,fieldId:Q.fieldId,aggregation:Po(Q.aggregation,he)});}),z}),[Z,$]=Qt.useState({}),[q,H]=Qt.useState(true),[re,de]=Qt.useState(false),[Ce,ve]=Qt.useState(()=>Dd(no(r?.rows,T),no(r?.columns,T),a?.dimensionFieldId)),[le,oe]=Qt.useState(()=>{let v=(r?.values??[]).filter((F,z,Q)=>T.has(F.fieldId)&&Q.findIndex(he=>he.fieldId===F.fieldId)===z).map(F=>({tokenId:F.fieldId,fieldId:F.fieldId,aggregation:Po(F.aggregation,I.get(F.fieldId))}));return Ps(v,a?.primaryValueFieldId)}),[Ie,Ze]=Qt.useState(()=>{let v=(r?.values??[]).filter((z,Q,he)=>T.has(z.fieldId)&&he.findIndex(Ke=>Ke.fieldId===z.fieldId)===Q).map(z=>({tokenId:z.fieldId,fieldId:z.fieldId,aggregation:Po(z.aggregation,I.get(z.fieldId))})),F=Ps(v,a?.primaryValueFieldId);return Ad(v,F,a?.secondaryValueFieldId)}),[Ge,ce]=Qt.useState(a?.chartType??"bar-vertical"),[Ve,et]=Qt.useState(c),[ye,We]=Qt.useState(d),[qe,st]=Qt.useState(()=>f??[]),[Pe,K]=Qt.useState(""),[Ee,ge]=Qt.useState(false),[ke,rt]=Qt.useState(""),[Ue,ae]=Qt.useState(null),[fe,je]=Qt.useState(new Set(["__grand_total__"])),[It,_]=Qt.useState(new Set),ze=l?.rowFields??k,xe=l?.columnFields??D,Y=l?.filterFields??M,N=l?.valueFields??X,J=l?.filterSelections??Z,we=l?.showGrandTotal??q,Me=l?.isConfiguratorCollapsed??re,tt=l?.chartDimensionFieldId??Ce,bt=l?.chartPrimaryValueFieldId??le,dt=l?.chartSecondaryValueFieldId??Ie,Vt=l?.chartType??Ge,vt=l?.isChartCollapsed??Ve,ko=l?.isTableCollapsed??ye,Ct=g??qe,sr=s||Ct.length>0||!!p,lo=Qt.useCallback(v=>{if(l?.setRowFields){l.setRowFields(v);return}S(v);},[l]),Et=Qt.useCallback(v=>{if(l?.setColumnFields){l.setColumnFields(v);return}P(v);},[l]),Gt=Qt.useCallback(v=>{if(l?.setFilterFields){l.setFilterFields(v);return}B(v);},[l]),yt=Qt.useCallback(v=>{if(l?.setValueFields){l.setValueFields(v);return}L(v);},[l]),ao=Qt.useCallback(v=>{if(l?.setFilterSelections){l.setFilterSelections(v);return}$(v);},[l]),O=Qt.useCallback(v=>{if(l?.setShowGrandTotal){l.setShowGrandTotal(v);return}H(v);},[l]),W=Qt.useCallback(v=>{if(l?.setIsConfiguratorCollapsed){l.setIsConfiguratorCollapsed(v);return}de(v);},[l]),U=Qt.useCallback(v=>{if(l?.setChartDimensionFieldId){l.setChartDimensionFieldId(v);return}ve(v);},[l]),me=Qt.useCallback(v=>{if(l?.setChartPrimaryValueFieldId){l.setChartPrimaryValueFieldId(v);return}oe(v);},[l]),pe=Qt.useCallback(v=>{if(l?.setChartSecondaryValueFieldId){l.setChartSecondaryValueFieldId(v);return}Ze(v);},[l]),Fe=Qt.useCallback(v=>{if(l?.setChartType){l.setChartType(v);return}ce(v);},[l]),Xe=Qt.useCallback(v=>{if(l?.setIsChartCollapsed){l.setIsChartCollapsed(v);return}et(v);},[l]),Ye=Qt.useCallback(v=>{if(l?.setIsTableCollapsed){l.setIsTableCollapsed(v);return}We(v);},[l]),ot=Qt.useCallback(v=>{let F=typeof v=="function"?v(Ct):v;g||st(F),p?.(F);},[p,Ct,g]),Dt=Qt.useMemo(()=>new Set([...ze,...xe,...Y]),[ze,xe,Y]),pt=Qt.useMemo(()=>o.filter(v=>!Dt.has(v.id)),[o,Dt]),mt=Qt.useMemo(()=>{let v=[...ze,...xe,...Y],F=new Set,z=[];return v.forEach(Q=>{F.has(Q)||(F.add(Q),z.push(Q));}),z},[xe,Y,ze]);Qt.useEffect(()=>{lo(v=>{let F=v.filter(z=>T.has(z));return Xr(v,F)?v:F}),Et(v=>{let F=v.filter(z=>T.has(z));return Xr(v,F)?v:F}),Gt(v=>{let F=v.filter(z=>T.has(z));return Xr(v,F)?v:F}),yt(v=>{let F=v.filter(z=>T.has(z.fieldId)).map(z=>({...z,aggregation:Po(z.aggregation,I.get(z.fieldId))}));return ms(v,F)?v:F});},[I,T]);let St=Qt.useMemo(()=>{let v={};return mt.forEach(F=>{let z=new Set;t.forEach(Q=>{z.add(jr(Q[F]));}),v[F]=Array.from(z).sort((Q,he)=>Q.localeCompare(he));}),v},[mt,t]);Qt.useEffect(()=>{ao(v=>{let F={};return mt.forEach(z=>{let Q=St[z]??[],Ke=(v[z]??[]).filter(He=>Q.includes(He)),De=Object.prototype.hasOwnProperty.call(v,z);F[z]=De?Ke:Q;}),rg(v,F)?v:F});},[mt,St]),Qt.useEffect(()=>{U(v=>Dd(ze,xe,v));},[xe,ze,U]),Qt.useEffect(()=>{me(v=>Ps(N,v));},[me,N]),Qt.useEffect(()=>{pe(v=>Ad(N,bt,v));},[bt,pe,N]);let Wt=Qt.useMemo(()=>t.filter(v=>mt.every(F=>{let z=J[F]??[],Q=St[F]??[];if(z.length===Q.length)return true;if(z.length===0)return false;let he=jr(v[F]);return z.includes(he)})),[mt,St,J,t]),ct=Qt.useMemo(()=>{if(N.length===0)return null;let v=new Map;if(Wt.forEach(De=>{let He=xe.length>0?xe.map(Ne=>jr(De[Ne])):[u("pivot.valueLabel")],G=Ua(He);v.set(G,He);}),v.size===0){let De=xe.length>0?xe.map(()=>us):[u("pivot.valueLabel")];v.set(Ua(De),De);}let F=Array.from(v.entries()).sort((De,He)=>og(De[1],He[1])),z=F.flatMap(([De,He])=>N.map(G=>{let Ne=I.get(G.fieldId),V=`${R(G.aggregation)} ${Ne?.label??G.fieldId}`,ue=xe.length===0||N.length>1?`${He.join(" / ")} \u2022 ${V}`:He.join(" / ");return {id:`${De}::${G.tokenId}`,colKey:De,valueItem:G,label:ue}})),Q=[];xe.length>0&&F.forEach(([De,He])=>{let G=z.filter(ue=>ue.colKey===De),Ne=Q,V=[];He.forEach((ue,te)=>{V.push(`d${te}:${ue}`);let Ae=`col::${Ua(V)}`,kt=Ne.find(wr=>wr.key===Ae);kt||(kt={key:Ae,label:ue,children:[],leafColumnIds:[],path:He.slice(0,te+1),depth:te},Ne.push(kt)),G.forEach(wr=>{kt.leafColumnIds.includes(wr.id)||kt.leafColumnIds.push(wr.id);}),Ne=kt.children;});});let he=De=>{let He={};return z.forEach(G=>{let Ne=De.filter(V=>{let ue=xe.length>0?xe.map(te=>jr(V[te])):[u("pivot.valueLabel")];return Ua(ue)===G.colKey});He[G.id]=Fn(Ne,G.valueItem.fieldId,G.valueItem.aggregation);}),He},Ke=[];if(ze.length===0)Ke.push({key:"root",value:u("pivot.resultLabel")||Xm,children:[],isLeaf:true,aggregatedValues:he(Wt),path:[],depth:0});else {let De=(He,G,Ne)=>{if(G>=ze.length)return [];let V=ze[G],ue=new Map;return He.forEach(te=>{let Ae=jr(te[V]);ue.has(Ae)||ue.set(Ae,[]),ue.get(Ae).push(te);}),Array.from(ue.keys()).sort().map(te=>{let Ae=ue.get(te),kt=[...Ne,te];return {key:Ua(kt),value:te,fieldId:V,aggregatedValues:he(Ae),children:De(Ae,G+1,kt),isLeaf:G===ze.length-1,path:kt,depth:G}})};Ke.push(...De(Wt,0,[]));}return {dataColumns:z,columnTree:Q,rowTree:Ke}},[xe,I,Wt,R,ze,u,N]),Ao=Qt.useCallback((v,F)=>(m.current+=1,{tokenId:`v${m.current}`,fieldId:v,aggregation:Po(F,I.get(v))}),[I]),wo=Qt.useCallback(v=>{if(v==="rows")return lo([]);if(v==="columns")return Et([]);if(v==="filters")return Gt([]);yt([]);},[]),Yo=Qt.useCallback((v,F)=>{if(v==="rows")return lo(z=>z.filter(Q=>Q!==F));if(v==="columns")return Et(z=>z.filter(Q=>Q!==F));if(v==="filters")return Gt(z=>z.filter(Q=>Q!==F));yt(z=>z.filter(Q=>Q.tokenId!==F));},[]),A=Qt.useCallback((v,F)=>{yt(z=>z.map(Q=>Q.tokenId===v?{...Q,aggregation:Po(F,I.get(Q.fieldId))}:Q));},[I]),j=Qt.useCallback(v=>{ae(String(v.active.id));},[]),ee=Qt.useCallback(v=>{if(ae(null),!v.over)return;let F=ps(String(v.active.id)),z=ps(String(v.over.id));if(!F||!z||F.kind!=="item"||!F.key)return;if(F.zone===z.zone&&z.kind==="item"){if(F.zone==="rows"){let te=ze.indexOf(F.key),Ae=ze.indexOf(z.key??"");te!==-1&&Ae!==-1&&te!==Ae&&lo(kt=>sortable.arrayMove(kt,te,Ae));return}if(F.zone==="columns"){let te=xe.indexOf(F.key),Ae=xe.indexOf(z.key??"");te!==-1&&Ae!==-1&&te!==Ae&&Et(kt=>sortable.arrayMove(kt,te,Ae));return}if(F.zone==="filters"){let te=Y.indexOf(F.key),Ae=Y.indexOf(z.key??"");te!==-1&&Ae!==-1&&te!==Ae&&Gt(kt=>sortable.arrayMove(kt,te,Ae));return}if(F.zone==="values"){let te=N.findIndex(kt=>kt.tokenId===F.key),Ae=N.findIndex(kt=>kt.tokenId===(z.key??""));te!==-1&&Ae!==-1&&te!==Ae&&yt(kt=>sortable.arrayMove(kt,te,Ae));}return}let Q=z.zone,he=[...ze],Ke=[...xe],De=[...Y],He=[...N],G="",Ne=null;if(F.zone==="palette")G=F.key;else if(F.zone==="values"){let te=He.find(Ae=>Ae.tokenId===F.key);if(!te)return;G=te.fieldId,Ne=te,He=He.filter(Ae=>Ae.tokenId!==F.key);}else F.zone==="rows"?(G=F.key,he=he.filter(te=>te!==G)):F.zone==="columns"?(G=F.key,Ke=Ke.filter(te=>te!==G)):F.zone==="filters"&&(G=F.key,De=De.filter(te=>te!==G));if(!G)return;let V=()=>{he=he.filter(te=>te!==G),Ke=Ke.filter(te=>te!==G),De=De.filter(te=>te!==G);},ue=te=>{if(z.kind!=="item"||!z.key)return te==="rows"?he.length:te==="columns"?Ke.length:te==="filters"?De.length:te==="values"?He.length:0;if(te==="rows"){let Ae=he.indexOf(z.key);return Ae>=0?Ae:he.length}if(te==="columns"){let Ae=Ke.indexOf(z.key);return Ae>=0?Ae:Ke.length}if(te==="filters"){let Ae=De.indexOf(z.key);return Ae>=0?Ae:De.length}if(te==="values"){let Ae=He.findIndex(kt=>kt.tokenId===z.key);return Ae>=0?Ae:He.length}return 0};if(Q==="palette"){lo(he),Et(Ke),Gt(De),yt(He);return}if(Q==="values"){let te=ue("values"),Ae=Ne??Ao(G);He.splice(te,0,Ae),lo(he),Et(Ke),Gt(De),yt(He);return}if(tg(Q)){V();let te=ue(Q);Q==="rows"?he.splice(te,0,G):Q==="columns"?Ke.splice(te,0,G):De.splice(te,0,G),lo(he),Et(Ke),Gt(De),yt(He);}},[xe,Ao,Y,ze,N]),se=Qt.useCallback((v,F)=>{ao(z=>({...z,[v]:F}));},[]),Le=Qt.useCallback(v=>{je(F=>{let z=new Set(F);return z.has(v)?z.delete(v):z.add(v),z});},[]),_e=Qt.useCallback(v=>{_(F=>{let z=new Set(F);return z.has(v)?z.delete(v):z.add(v),z});},[]),gt=Qt.useCallback(v=>{let F=I.get(v.fieldId),z=bd(F);return jsxRuntime.jsx(material.FormControl,{size:"small",sx:{minWidth:98},children:jsxRuntime.jsx(material.Select,{value:v.aggregation,onChange:Q=>A(v.tokenId,Q.target.value),onClick:Q=>Q.stopPropagation(),onMouseDown:Q=>Q.stopPropagation(),sx:{fontSize:"0.72rem",height:26,"& .MuiSelect-select":{py:.35}},children:z.map(Q=>jsxRuntime.jsx(material.MenuItem,{value:Q,sx:{fontSize:"0.75rem"},children:R(Q)},Q))})})},[I,R,A]),Re=Qt.useCallback(v=>{let F=St[v]??[],z=J[v]??F;return F.length===0?u("pivot.filter.noValues"):z.length===0?u("pivot.filter.noneSelected"):z.length===F.length?u("pivot.filter.allValues"):u("pivot.filter.selectedCount",{selected:z.length,total:F.length})},[St,J,u]),ut=Qt.useCallback(v=>{let F=St[v]??[],z=J[v]??F;return jsxRuntime.jsx(ig,{options:F,selectedValues:z,onChange:Q=>se(v,Q)})},[St,J,se]),nt=Qt.useCallback(()=>`pivot-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,[]),Pt=Qt.useCallback(()=>{let v={};return new Set([...mt,...Object.keys(J)]).forEach(z=>{if(!T.has(z))return;let Q=J[z]??[];v[z]=[...Q];}),{layout:{rows:[...ze],columns:[...xe],filters:[...Y],values:N.map(z=>({fieldId:z.fieldId,aggregation:z.aggregation}))},filterSelections:v,showGrandTotal:we,chart:{dimensionFieldId:tt,primaryValueFieldId:bt,secondaryValueFieldId:dt,chartType:Vt}}},[mt,tt,bt,dt,Vt,xe,Y,J,ze,we,T,N]),ht=Qt.useCallback(v=>{let F=no(v.layout.rows,T),z=no(v.layout.columns,T),Q=no(v.layout.filters,T),he=new Set,Ke=(v.layout.values??[]).filter(G=>!T.has(G.fieldId)||he.has(G.fieldId)?false:(he.add(G.fieldId),true)).map(G=>Ao(G.fieldId,G.aggregation)),De={};Object.entries(v.filterSelections??{}).forEach(([G,Ne])=>{!T.has(G)||!Array.isArray(Ne)||(De[G]=Array.from(new Set(Ne.map(V=>String(V)))));}),lo(F),Et(z),Gt(Q),yt(Ke),ao(De),typeof v.showGrandTotal=="boolean"&&O(v.showGrandTotal),U(Dd(F,z,v.chart?.dimensionFieldId));let He=Ps(Ke,v.chart?.primaryValueFieldId);me(He),pe(Ad(Ke,He,v.chart?.secondaryValueFieldId)),Fe(v.chart?.chartType??"bar-vertical"),K(v.id),y?.(v);},[Ao,y,U,me,pe,Fe,Et,Gt,ao,lo,O,yt,T]),eo=Qt.useCallback(v=>{if(!v){K("");return}let F=Ct.find(z=>z.id===v);if(!F){K("");return}ht(F);},[ht,Ct]),so=Qt.useCallback(()=>{let v=u("pivot.preset.defaultName",{index:Ct.length+1});rt(v),ge(true);},[Ct.length,u]),To=Qt.useCallback(()=>{let v=ke.trim();if(!v)return;let F={id:nt(),name:v,...Pt()};ot(z=>[...z,F]),K(F.id),ge(false);},[Pt,nt,ke,ot]),Xt=Qt.useCallback(()=>{Pe&&(ot(v=>v.filter(F=>F.id!==Pe)),K(""));},[Pe,ot]);Qt.useEffect(()=>{if(!b||h.current)return;let v=Ct.find(F=>F.id===b);v&&(h.current=true,ht(v));},[ht,b,Ct]),Qt.useEffect(()=>{Pe&&(Ct.some(v=>v.id===Pe)||K(""));},[Pe,Ct]);let xo=Qt.useMemo(()=>{if(!we||!ct||!ze.length)return null;let v={};return ct.dataColumns.forEach(F=>{let z=Wt.filter(Q=>{let he=xe.length>0?xe.map(Ke=>jr(Q[Ke])):[u("pivot.valueLabel")];return Ua(he)===F.colKey});v[F.id]=Fn(z,F.valueItem.fieldId,F.valueItem.aggregation);}),{key:"__grand_total__",value:u("pivot.grandTotal")||Zm,children:[],isLeaf:false,isGrandTotal:true,aggregatedValues:v,path:[],depth:-1}},[we,ct,Wt,xe,ze.length,u]),Rt=Qt.useMemo(()=>Mg(ct?.rowTree??[]),[ct]),Ut=Qt.useMemo(()=>Mg(ct?.columnTree??[]),[ct]);Qt.useEffect(()=>{je(v=>{let F=new Set;return v.has("__grand_total__")&&F.add("__grand_total__"),Rt.forEach(z=>{v.has(z)&&F.add(z);}),F});},[Rt]),Qt.useEffect(()=>{_(v=>{let F=new Set;return Ut.forEach(z=>{v.has(z)&&F.add(z);}),F});},[Ut]);let cr=Qt.useCallback(()=>{je(v=>{let F=new Set(v);return Rt.forEach(z=>F.add(z)),F});},[Rt]),dr=Qt.useCallback(()=>{je(v=>{let F=new Set;return v.has("__grand_total__")&&F.add("__grand_total__"),F});},[]),rn=Qt.useCallback(()=>{_(new Set(Ut));},[Ut]),wa=Qt.useCallback(()=>{_(new Set);},[]),an=Qt.useMemo(()=>!ct||xe.length===0?[]:gk(ct.columnTree,It),[xe.length,It,ct]),Qo=Qt.useMemo(()=>{if(!ct)return [];if(xe.length===0)return ct.dataColumns.map(F=>({id:F.id,label:F.label,leafColumnIds:[F.id],valueItem:F.valueItem}));let v=new Map(ct.dataColumns.map(F=>[F.id,F]));return an.flatMap(F=>{let z=new Map;return F.leafColumnIds.forEach(Q=>{let he=v.get(Q);if(!he)return;let Ke=he.valueItem.tokenId,De=`${R(he.valueItem.aggregation)} ${I.get(he.valueItem.fieldId)?.label??he.valueItem.fieldId}`,He=z.get(Ke);if(He){He.leafColumnIds.push(Q);return}z.set(Ke,{id:`${F.key}::${Ke}`,label:N.length>1?De:F.label,leafColumnIds:[Q],valueItem:he.valueItem});}),Array.from(z.values())})},[xe.length,I,R,ct,N.length,an]),nn=Qt.useMemo(()=>new Map(Qo.map(v=>[v.id,v])),[Qo]),Ta=Qt.useMemo(()=>Qo.map(v=>({id:v.id,colKey:v.id,valueItem:v.valueItem,label:v.label})),[Qo]),Ia=Qt.useMemo(()=>{if(!ct||xe.length===0)return [];let v=[],F=Ag(ct.columnTree,It),z=F+(N.length>1?1:0),Q=(he,Ke)=>{v[Ke]??(v[Ke]=[]),he.forEach(De=>{let He=De.children.length>0&&It.has(De.key),G=Qo.filter(V=>De.leafColumnIds.some(ue=>V.leafColumnIds.includes(ue))).length,Ne=He||N.length>1?1:z-Ke;v[Ke].push({key:De.key,label:De.label,colSpan:G,rowSpan:Ne,expandable:De.children.length>0,expanded:He}),He&&Q(De.children,Ke+1);});};return Q(ct.columnTree,0),N.length>1&&(v[F]=Qo.map(he=>({key:he.id,label:he.label,colSpan:1,rowSpan:1,expandable:false,expanded:false}))),v},[xe.length,It,ct,N.length,Qo]),Or=Qt.useCallback((v,F)=>F.leafColumnIds.reduce((z,Q)=>z+(v.aggregatedValues[Q]??0),0),[]),ra=Qt.useMemo(()=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(material.Button,{size:"small",variant:"text",onClick:cr,disabled:Rt.size===0,sx:{minWidth:"auto",px:.8,fontSize:"0.72rem"},children:u("pivot.table.expandRowsAll")}),jsxRuntime.jsx(material.Button,{size:"small",variant:"text",onClick:dr,disabled:Rt.size===0,sx:{minWidth:"auto",px:.8,fontSize:"0.72rem"},children:u("pivot.table.collapseRowsAll")}),jsxRuntime.jsx(material.Divider,{orientation:"vertical",flexItem:true}),jsxRuntime.jsx(material.Button,{size:"small",variant:"text",onClick:rn,disabled:Ut.size===0,sx:{minWidth:"auto",px:.8,fontSize:"0.72rem"},children:u("pivot.table.expandColumnsAll")}),jsxRuntime.jsx(material.Button,{size:"small",variant:"text",onClick:wa,disabled:xe.length===0,sx:{minWidth:"auto",px:.8,fontSize:"0.72rem"},children:u("pivot.table.collapseColumnsAll")})]}),[xe.length,Ut.size,Rt.size,wa,dr,rn,cr,u]),ni=()=>{if(!Ue)return null;let v=ps(Ue);if(!v||v.kind!=="item"||!v.key)return null;if(v.zone==="palette"){let he=I.get(v.key);return he?jsxRuntime.jsx(xd,{label:he.label,subtitle:he.type}):null}if(v.zone==="values"){let he=N.find(G=>G.tokenId===v.key);if(!he)return null;let De=I.get(he.fieldId)?.label??he.fieldId,He=`${R(he.aggregation)}(${De})`;return jsxRuntime.jsx(ys,{label:De,caption:He})}let z=I.get(v.key)?.label??v.key,Q=Re(v.key);return jsxRuntime.jsx(ys,{label:z,caption:Q})};return jsxRuntime.jsxs(material.Paper,{sx:v=>({p:{xs:1.2,md:2},borderRadius:4,border:`1px solid ${v.palette.divider}`,bgcolor:"background.paper",boxShadow:v.palette.mode==="dark"?"none":"0 12px 28px rgba(15, 23, 42, 0.08)",display:"flex",flexDirection:"column",gap:2}),children:[jsxRuntime.jsxs(material.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1.5,flexWrap:"wrap"},children:[jsxRuntime.jsxs(material.Box,{children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:"1.05rem",fontWeight:800},children:x}),jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.78rem",color:"text.secondary"},children:u("pivot.subtitle.default")})]}),jsxRuntime.jsxs(material.Stack,{direction:"row",spacing:1.5,alignItems:"center",children:[sr&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(material.FormControl,{size:"small",sx:{minWidth:200},children:jsxRuntime.jsxs(material.Select,{value:Pe,displayEmpty:true,onChange:v=>eo(String(v.target.value)),sx:{fontSize:"0.75rem",height:32},children:[jsxRuntime.jsx(material.MenuItem,{value:"",sx:{fontSize:"0.75rem",color:"text.secondary"},children:u("pivot.preset.selectPlaceholder")}),Ct.map(v=>jsxRuntime.jsx(material.MenuItem,{value:v.id,sx:{fontSize:"0.75rem"},children:v.name},v.id))]})}),jsxRuntime.jsx(material.Tooltip,{title:u("pivot.preset.save"),children:jsxRuntime.jsx(material.IconButton,{size:"small",onClick:so,"aria-label":u("pivot.preset.save"),children:jsxRuntime.jsx(jp__default.default,{sx:{fontSize:18}})})}),jsxRuntime.jsx(material.Tooltip,{title:u("pivot.preset.delete"),children:jsxRuntime.jsx("span",{children:jsxRuntime.jsx(material.IconButton,{size:"small",onClick:Xt,disabled:!Pe,"aria-label":u("pivot.preset.delete"),children:jsxRuntime.jsx(By__default.default,{sx:{fontSize:18}})})})}),jsxRuntime.jsx(material.Divider,{flexItem:true,orientation:"vertical"})]}),jsxRuntime.jsxs(material.Typography,{sx:{fontSize:"0.74rem",color:"text.secondary"},children:[u("pivot.records"),": ",jsxRuntime.jsx("strong",{children:t.length.toLocaleString()})," / ",u("pivot.afterFilter"),":"," ",jsxRuntime.jsx("strong",{children:Wt.length.toLocaleString()})]}),jsxRuntime.jsx(material.Divider,{flexItem:true,orientation:"vertical"}),jsxRuntime.jsxs(material.Box,{sx:{display:"flex",alignItems:"center",gap:.6},children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.74rem"},children:u("pivot.grandTotal")}),jsxRuntime.jsx(material.Switch,{size:"small",checked:we,onChange:v=>O(v.target.checked)})]})]})]}),jsxRuntime.jsx(material.Divider,{}),jsxRuntime.jsxs(core.DndContext,{sensors:C,collisionDetection:core.closestCenter,onDragStart:j,onDragEnd:ee,children:[jsxRuntime.jsx(gg,{isConfiguratorCollapsed:Me,onToggleCollapse:()=>W(v=>!v),availableFields:pt,fieldMap:I,filterFields:Y,columnFields:xe,rowFields:ze,valueFields:N,clearZone:wo,removeFieldFromZone:Yo,getFilterSelectionSummary:Re,renderDimensionFilterSelect:ut,renderAggregationSelect:gt,getAggregationLabel:R}),jsxRuntime.jsx(material.Portal,{children:jsxRuntime.jsx(core.DragOverlay,{dropAnimation:{duration:250,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:ni()})})]}),jsxRuntime.jsx(Sg,{rows:Wt,fieldMap:I,rowFields:ze,columnFields:xe,valueFields:N,chartDimensionFieldId:tt,chartPrimaryValueFieldId:bt,chartSecondaryValueFieldId:dt,chartType:Vt,isCollapsed:vt,onChartDimensionFieldIdChange:v=>U(v),onChartPrimaryValueFieldIdChange:v=>me(v),onChartSecondaryValueFieldIdChange:v=>pe(v),onChartTypeChange:v=>Fe(v),onToggleCollapse:()=>Xe(v=>!v),getAggregationLabel:R}),jsxRuntime.jsx(Vn,{title:u("pivot.table.sectionTitle"),subtitle:ze.length>0?ze.map(v=>I.get(v)?.label??v).join(" > "):u("pivot.table.dimensions"),collapsed:ko,onToggleCollapse:()=>Ye(v=>!v),expandAriaLabel:u("pivot.table.collapse.ariaExpand"),collapseAriaLabel:u("pivot.table.collapse.ariaCollapse"),bodySx:{p:0},headerActions:ra,children:ct===null?jsxRuntime.jsx(material.Box,{sx:{py:5,px:{xs:1.2,md:1.6},textAlign:"center"},children:jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.86rem",color:"text.secondary"},children:w})}):jsxRuntime.jsx(material.TableContainer,{sx:{maxHeight:i},children:jsxRuntime.jsxs(material.Table,{size:"small",stickyHeader:true,children:[jsxRuntime.jsx(material.TableHead,{children:(Ia.length>0?Ia:[[]]).map((v,F)=>jsxRuntime.jsxs(material.TableRow,{children:[F===0&&jsxRuntime.jsx(material.TableCell,{rowSpan:Math.max(Ia.length,1),sx:z=>({fontWeight:800,fontSize:"0.76rem",color:"text.primary",bgcolor:z.palette.mode==="dark"?"#000000":"#f5f5f5",borderBottom:`1px solid ${z.palette.divider}`,pl:2,minWidth:220,verticalAlign:"middle"}),children:ze.length>0?ze.map(z=>I.get(z)?.label).join(" > "):u("pivot.table.dimensions")}),(v.length>0?v:Qo.map(z=>({key:z.id,label:z.label,colSpan:1,rowSpan:1,expandable:false,expanded:false}))).map(z=>jsxRuntime.jsx(material.TableCell,{align:"center",colSpan:z.colSpan,rowSpan:z.rowSpan,sx:Q=>({fontWeight:800,fontSize:"0.75rem",color:"text.primary",bgcolor:Q.palette.mode==="dark"?"#000000":"#f5f5f5",borderBottom:`1px solid ${Q.palette.divider}`,minWidth:148,verticalAlign:"middle"}),children:jsxRuntime.jsxs(material.Box,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:.4},children:[z.expandable&&jsxRuntime.jsx(material.IconButton,{size:"small",onClick:()=>_e(z.key),sx:{p:.1,ml:-0.3},children:z.expanded?jsxRuntime.jsx(gy__default.default,{sx:{fontSize:16}}):jsxRuntime.jsx(ch__default.default,{sx:{fontSize:16}})}),jsxRuntime.jsx(material.Box,{component:"span",children:z.label})]})},z.key))]},`pivot-header-row-${F}`))}),jsxRuntime.jsxs(material.TableBody,{children:[ct.rowTree.map(v=>jsxRuntime.jsx(ws,{node:v,dataColumns:Ta,fieldMap:I,level:0,expandedKeys:fe,onToggle:Le,getValue:(F,z)=>{let Q=nn.get(z);return Q?Or(F,Q):0}},v.key)),xo&&jsxRuntime.jsx(ws,{node:xo,dataColumns:Ta,fieldMap:I,level:0,expandedKeys:fe,onToggle:Le,getValue:(v,F)=>{let z=nn.get(F);return z?Or(v,z):0}})]})]})})}),jsxRuntime.jsxs(material.Dialog,{open:Ee,onClose:()=>ge(false),maxWidth:"xs",fullWidth:true,children:[jsxRuntime.jsx(material.DialogTitle,{children:u("pivot.preset.saveDialogTitle")}),jsxRuntime.jsx(material.DialogContent,{children:jsxRuntime.jsx(material.TextField,{autoFocus:true,fullWidth:true,margin:"dense",label:u("pivot.preset.nameLabel"),value:ke,onChange:v=>rt(v.target.value),onKeyDown:v=>{v.key==="Enter"&&(v.preventDefault(),To());}})}),jsxRuntime.jsxs(material.DialogActions,{children:[jsxRuntime.jsx(material.Button,{onClick:()=>ge(false),children:u("common.cancel")}),jsxRuntime.jsx(material.Button,{variant:"contained",onClick:To,disabled:!ke.trim(),children:u("common.save")})]})]})]})};var Bg=(e,t,o)=>{let r=[...e,...t];return o&&r.includes(o)?o:r[0]??""},Ed=(e,t)=>t&&e.some(o=>o.fieldId===t)?t:e[0]?.fieldId??"",Eg=(e,t,o)=>o===""?"":o&&o!==t&&e.some(r=>r.fieldId===o)?o:e.find(r=>r.fieldId!==t)?.fieldId??"",WL=({fields:e,initialLayout:t,initialFilterSelections:o={},initialShowGrandTotal:r=true,initialConfiguratorCollapsed:a=false,initialChart:n,initialChartCollapsed:i=false,initialTableCollapsed:c=false})=>{let d=Qt.useRef(0),l=Qt.useMemo(()=>new Set(e.map(K=>K.id)),[e]),s=Qt.useMemo(()=>new Map(e.map(K=>[K.id,K])),[e]),[g,f]=Qt.useState(()=>no(t?.rows,l)),[p,b]=Qt.useState(()=>no(t?.columns,l)),[y,u]=Qt.useState(()=>no(t?.filters,l)),[C,m]=Qt.useState(()=>{let K=t?.values??[],Ee=new Set,ge=[];return K.forEach(ke=>{!l.has(ke.fieldId)||Ee.has(ke.fieldId)||(Ee.add(ke.fieldId),d.current+=1,ge.push({tokenId:`v${d.current}`,fieldId:ke.fieldId,aggregation:Po(ke.aggregation,s.get(ke.fieldId))}));}),ge}),[h,x]=Qt.useState(o),[w,E]=Qt.useState(r),[R,T]=Qt.useState(a),[I,k]=Qt.useState(()=>Bg(no(t?.rows,l),no(t?.columns,l),n?.dimensionFieldId)),[S,D]=Qt.useState(()=>{let K=(()=>{let Ee=t?.values??[],ge=new Set,ke=[];return Ee.forEach(rt=>{!l.has(rt.fieldId)||ge.has(rt.fieldId)||(ge.add(rt.fieldId),ke.push({tokenId:rt.fieldId,fieldId:rt.fieldId,aggregation:Po(rt.aggregation,s.get(rt.fieldId))}));}),ke})();return Ed(K,n?.primaryValueFieldId)}),[P,M]=Qt.useState(()=>{let K=(()=>{let ge=t?.values??[],ke=new Set,rt=[];return ge.forEach(Ue=>{!l.has(Ue.fieldId)||ke.has(Ue.fieldId)||(ke.add(Ue.fieldId),rt.push({tokenId:Ue.fieldId,fieldId:Ue.fieldId,aggregation:Po(Ue.aggregation,s.get(Ue.fieldId))}));}),rt})(),Ee=Ed(K,n?.primaryValueFieldId);return Eg(K,Ee,n?.secondaryValueFieldId)}),[B,X]=Qt.useState(n?.chartType??"bar-vertical"),[L,Z]=Qt.useState(i),[$,q]=Qt.useState(c);Qt.useEffect(()=>{f(K=>{let Ee=K.filter(ge=>l.has(ge));return Xr(K,Ee)?K:Ee}),b(K=>{let Ee=K.filter(ge=>l.has(ge));return Xr(K,Ee)?K:Ee}),u(K=>{let Ee=K.filter(ge=>l.has(ge));return Xr(K,Ee)?K:Ee}),m(K=>{let Ee=K.filter(ge=>l.has(ge.fieldId)).map(ge=>({...ge,aggregation:Po(ge.aggregation,s.get(ge.fieldId))}));return ms(K,Ee)?K:Ee});},[s,l]),Qt.useEffect(()=>{k(K=>Bg(g,p,K));},[p,g]),Qt.useEffect(()=>{D(K=>Ed(C,K));},[C]),Qt.useEffect(()=>{M(K=>Eg(C,S,K));},[S,C]);let H=Qt.useCallback(K=>{f(no(K,l));},[l]),re=Qt.useCallback(K=>{b(no(K,l));},[l]),de=Qt.useCallback(K=>{u(no(K,l));},[l]),Ce=Qt.useCallback(K=>{m(Ee=>{let ge=K??[],ke=new Set,rt=[];return ge.forEach(Ue=>{if(!l.has(Ue.fieldId)||ke.has(Ue.fieldId))return;ke.add(Ue.fieldId);let ae=Ee.find(fe=>fe.fieldId===Ue.fieldId);if(ae){rt.push({...ae,aggregation:Po(Ue.aggregation??ae.aggregation,s.get(Ue.fieldId))});return}d.current+=1,rt.push({tokenId:`v${d.current}`,fieldId:Ue.fieldId,aggregation:Po(Ue.aggregation,s.get(Ue.fieldId))});}),rt});},[s,l]),ve=Qt.useCallback(K=>{H(K.rows??[]),re(K.columns??[]),de(K.filters??[]),Ce(K.values??[]);},[re,de,H,Ce]),le=Qt.useCallback(K=>{if(K==="rows")return f([]);if(K==="columns")return b([]);if(K==="filters")return u([]);m([]);},[]),oe=Qt.useCallback((K,Ee)=>{if(K==="rows")return f(ge=>ge.filter(ke=>ke!==Ee));if(K==="columns")return b(ge=>ge.filter(ke=>ke!==Ee));if(K==="filters")return u(ge=>ge.filter(ke=>ke!==Ee));m(ge=>ge.filter(ke=>ke.tokenId!==Ee));},[]),Ie=Qt.useCallback((K,Ee)=>{m(ge=>ge.map(ke=>ke.tokenId===K?{...ke,aggregation:Po(Ee,s.get(ke.fieldId))}:ke));},[s]),Ze=Qt.useCallback((K,Ee)=>{x(ge=>({...ge,[K]:Ee}));},[]),Ge=Qt.useCallback(()=>{x({});},[]),ce=Qt.useCallback(()=>{E(K=>!K);},[]),Ve=Qt.useCallback(()=>{T(K=>!K);},[]),et=Qt.useCallback(K=>{k(K);},[]),ye=Qt.useCallback(K=>{D(K);},[]),We=Qt.useCallback(K=>{M(K);},[]),qe=Qt.useCallback(()=>{Z(K=>!K);},[]),st=Qt.useCallback(()=>{q(K=>!K);},[]);return {model:Qt.useMemo(()=>({rowFields:g,setRowFields:f,columnFields:p,setColumnFields:b,filterFields:y,setFilterFields:u,valueFields:C,setValueFields:m,filterSelections:h,setFilterSelections:x,showGrandTotal:w,setShowGrandTotal:E,isConfiguratorCollapsed:R,setIsConfiguratorCollapsed:T,chartDimensionFieldId:I,setChartDimensionFieldId:k,chartPrimaryValueFieldId:S,setChartPrimaryValueFieldId:D,chartSecondaryValueFieldId:P,setChartSecondaryValueFieldId:M,chartType:B,setChartType:X,isChartCollapsed:L,setIsChartCollapsed:Z,isTableCollapsed:$,setIsTableCollapsed:q}),[I,S,P,B,p,y,h,L,R,$,g,w,C]),actions:{setRows:H,setColumns:re,setFilters:de,setValues:Ce,setLayout:ve,clearZone:le,removeFieldFromZone:oe,setAggregationForValue:Ie,setFilterSelection:Ze,resetFilterSelections:Ge,toggleGrandTotal:ce,toggleConfigurator:Ve,setChartDimension:et,setChartPrimaryValue:ye,setChartSecondaryValue:We,setChartType:X,toggleChart:qe,toggleTable:st}}};var _L=({orientation:e="auto",defaultNavigationOpen:t,onNavOpenChange:o}={})=>{let r=styles.useTheme(),a=material.useMediaQuery("(orientation: portrait)",{noSsr:true}),n=material.useMediaQuery(r.breakpoints.down("md"),{noSsr:true}),i=Qt.useMemo(()=>e==="auto"?a||n?"portrait":"landscape":e,[n,a,e]),[c,d]=Qt.useState(t??i==="landscape");Qt.useEffect(()=>{d(t??i==="landscape");},[t,i]);let l=g=>{d(g),o?.(g);};return {resolvedOrientation:i,isPortraitViewport:a,isCompactViewport:n,navigationOpen:c,setNavigationOpen:l,toggleNavigationOpen:()=>l(!c)}};var Ck=e=>{let t=Number(e||0);return Number.isFinite(t)?t:0},jL=({rows:e,rowKey:t="id",numericField:o,defaultSelectedId:r})=>{let n=e[0]?.[t],[i,c]=Qt.useState(r??n),d=Qt.useMemo(()=>e.find(p=>p[t]===i)||e[0],[t,e,i]),[l,s]=Qt.useState(()=>{let p=d?.[o];return p==null?"0":String(p)});return {selectedId:i,selectedRecord:d,editorValue:l,setEditorValue:s,selectRecord:p=>{let b=p[t];c(b);let y=p[o];s(y==null?"0":String(y));},applyEditorValue:p=>{if(i===void 0)return;let b=Ck(l),y=e.map(u=>u[t]===i?{...u,[o]:b}:u);p(y);}}};var Bk=["code_128","ean_13","ean_8","qr_code","upc_a","upc_e"],Vg=(e,t,o,r)=>{t?.(e),r&&o?.();},eN=({open:e,onClose:t,title:o="Scan barcode",subtitle:r="Use the rear camera on the device. If scanning is unavailable, enter the code manually.",formats:a=Bk,facingMode:n="environment",manualEntry:i=true,autoCloseOnDetect:c=true,scanIntervalMs:d=600,confirmLabel:l="Use code",cancelLabel:s="Close",manualPlaceholder:g="Enter barcode manually",onDetected:f,onError:p,sx:b})=>{let y=Qt__namespace.default.useRef(null),u=Qt__namespace.default.useRef(null),C=Qt__namespace.default.useRef(null),m=Qt__namespace.default.useRef(null),[h,x]=Qt__namespace.default.useState("idle"),[w,E]=Qt__namespace.default.useState(""),[R,T]=Qt__namespace.default.useState(null),[I,k]=Qt__namespace.default.useState(null),S=Qt__namespace.default.useCallback(()=>{C.current!==null&&(window.clearInterval(C.current),C.current=null),u.current&&(u.current.getTracks().forEach(M=>M.stop()),u.current=null),y.current&&(y.current.srcObject=null);},[]),D=Qt__namespace.default.useCallback(M=>{k(M),x("error"),p?.(M);},[p]);Qt__namespace.default.useEffect(()=>{if(!e){S(),x("idle"),k(null),E("");return}let M=false;return (async()=>{if(!(typeof window>"u"||typeof navigator>"u")){if(!navigator.mediaDevices?.getUserMedia){x("unsupported"),k("Camera access is not supported in this browser.");return}x("starting"),k(null);try{let X=await navigator.mediaDevices.getUserMedia({audio:!1,video:{facingMode:{ideal:n}}});if(M){X.getTracks().forEach(L=>L.stop());return}if(u.current=X,y.current&&(y.current.srcObject=X,await y.current.play()),!window.BarcodeDetector){x("unsupported"),k("BarcodeDetector is not available. Camera preview is ready and manual entry is enabled.");return}m.current=new window.BarcodeDetector({formats:a}),x("ready"),C.current=window.setInterval(async()=>{if(!(!y.current||!m.current)&&!(y.current.readyState<HTMLMediaElement.HAVE_CURRENT_DATA))try{let Z=(await m.current.detect(y.current)).find(q=>q.rawValue);if(!Z?.rawValue)return;let $={rawValue:Z.rawValue,format:Z.format};T($),S(),Vg($,f,t,c);}catch(L){D(L instanceof Error?L.message:"Failed to detect barcode.");}},d);}catch(X){D(X instanceof Error?X.message:"Unable to start camera.");}}})(),()=>{M=true,S();}},[c,n,a,t,f,e,D,d,S]);let P=()=>{let M=w.trim();if(!M)return;let B={rawValue:M,format:"manual"};T(B),Vg(B,f,t,c);};return jsxRuntime.jsxs(material.Dialog,{open:e,onClose:t,fullWidth:true,maxWidth:"sm",children:[jsxRuntime.jsx(material.DialogTitle,{sx:{fontSize:"1rem",fontWeight:900},children:o}),jsxRuntime.jsx(material.DialogContent,{sx:{pt:"8px !important"},children:jsxRuntime.jsxs(material.Stack,{spacing:2,sx:b,children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.88rem",color:"text.secondary",lineHeight:1.55},children:r}),jsxRuntime.jsxs(material.Paper,{elevation:0,sx:M=>({position:"relative",overflow:"hidden",borderRadius:4,border:"1px solid",borderColor:"divider",minHeight:280,background:M.palette.mode==="dark"?"linear-gradient(180deg, rgba(15,23,42,0.92), rgba(2,6,23,0.96))":"linear-gradient(180deg, rgba(241,245,249,1), rgba(226,232,240,0.92))"}),children:[jsxRuntime.jsx("video",{ref:y,muted:true,playsInline:true,autoPlay:true,style:{width:"100%",height:280,objectFit:"cover",display:"block"}}),jsxRuntime.jsx(material.Box,{sx:{pointerEvents:"none",position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:jsxRuntime.jsx(material.Box,{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:jsxRuntime.jsx(material.Box,{sx:{position:"absolute",top:"50%",left:0,right:0,height:2,bgcolor:"#38bdf8",boxShadow:"0 0 18px rgba(56,189,248,0.85)"}})})}),jsxRuntime.jsxs(material.Box,{sx:{position:"absolute",top:12,left:12,display:"flex",gap:1,flexWrap:"wrap"},children:[jsxRuntime.jsx(material.Chip,{icon:jsxRuntime.jsx(Dk__default.default,{}),label:h==="ready"?"Camera ready":h==="starting"?"Starting camera":h==="unsupported"?"Preview only":h==="error"?"Scanner error":"Idle",size:"small",color:h==="error"?"error":"primary",variant:"filled"}),R?jsxRuntime.jsx(material.Chip,{icon:jsxRuntime.jsx(Ak__default.default,{}),label:`${R.format||"barcode"}: ${R.rawValue}`,size:"small",color:"success",variant:"filled"}):null]})]}),I?jsxRuntime.jsx(material.Alert,{severity:h==="unsupported"?"info":"warning",children:I}):null,i?jsxRuntime.jsxs(material.Stack,{direction:{xs:"column",sm:"row"},spacing:1.25,children:[jsxRuntime.jsx(material.TextField,{fullWidth:true,label:"Barcode",placeholder:g,value:w,onChange:M=>E(M.target.value)}),jsxRuntime.jsx(material.Button,{variant:"contained",onClick:P,sx:{minHeight:56,px:2.5},children:l})]}):null]})}),jsxRuntime.jsx(material.DialogActions,{sx:{px:3,pb:2},children:jsxRuntime.jsx(material.Button,{onClick:t,children:s})})]})};var Nk={default:"#475569",primary:"#1d4ed8",success:"#047857",warning:"#b45309",error:"#b91c1c",info:"#0369a1"},iN=({title:e,description:t,kicker:o,icon:r,badges:a=[],metrics:n=[],footer:i,children:c,selected:d=false,draggable:l=false,isDragging:s=false,swipeThreshold:g=88,startAction:f,endAction:p,dragHandleProps:b,onClick:y,onSwipe:u,sx:C})=>{let[m,h]=Qt.useState(0),[x,w]=Qt.useState(false),E=Qt.useRef(null),R=Qt.useRef(0),T=Qt.useRef(0),I=!!(f||p),k=132,S=()=>{h(0),w(false),E.current=null,R.current=0,T.current=0;},D=L=>{(L==="start"?f:p)?.onTrigger?.(),u?.(L),S();},P=L=>{!I||L.target.closest('button, a, input, textarea, [data-no-swipe="true"]')||(E.current=L.pointerId,R.current=L.clientX,T.current=L.clientX,w(true),L.currentTarget.setPointerCapture(L.pointerId));},M=L=>{if(!x||E.current!==L.pointerId)return;T.current=L.clientX;let Z=T.current-R.current,$=Math.max(-k,Math.min(k,Z));h($);},B=L=>{if(!x||E.current!==L.pointerId)return;let Z=T.current-R.current;if(Z>=g&&f){D("start");return}if(Z<=-g&&p){D("end");return}Math.abs(Z)<12&&y?.(),S();},X=(L,Z)=>{if(!L)return null;let $=L.backgroundColor||Nk[L.tone||"default"];return jsxRuntime.jsx(material.Box,{sx:{position:"absolute",top:0,bottom:0,[Z]:0,width:k,px:2,display:"flex",alignItems:"center",justifyContent:Z==="left"?"flex-start":"flex-end",color:"#fff",background:`linear-gradient(135deg, ${$}, rgba(15,23,42,0.92))`},children:jsxRuntime.jsxs(material.Stack,{direction:"row",spacing:1,alignItems:"center",children:[L.icon,jsxRuntime.jsx(material.Typography,{sx:{fontWeight:700,fontSize:"0.95rem"},children:L.label})]})})};return jsxRuntime.jsxs(material.Box,{sx:{position:"relative",overflow:"hidden",borderRadius:4,...C},children:[X(f,"left"),X(p,"right"),jsxRuntime.jsx(material.Paper,{elevation:0,onPointerDown:P,onPointerMove:M,onPointerUp:B,onPointerCancel:S,sx:L=>({position:"relative",zIndex:1,p:2,borderRadius:4,border:"1px solid",borderColor:d?"primary.main":"divider",background:L.palette.mode==="dark"?"linear-gradient(180deg, rgba(30,41,59,0.96), rgba(15,23,42,0.92))":"linear-gradient(180deg, #ffffff, #f8fafc)",color:"text.primary",boxShadow:d?"0 18px 42px rgba(37, 99, 235, 0.18)":"0 12px 28px rgba(15, 23, 42, 0.08)",transform:`translate3d(${m}px, 0, 0) scale(${s?.985:1})`,transition:x?"none":"transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease",touchAction:"pan-y",cursor:y?"pointer":"default",opacity:s?.9:1}),children:jsxRuntime.jsxs(material.Stack,{spacing:1.5,children:[jsxRuntime.jsxs(material.Stack,{direction:"row",spacing:1.5,alignItems:"flex-start",children:[r?jsxRuntime.jsx(material.Box,{sx:{mt:.25},children:r}):null,jsxRuntime.jsxs(material.Box,{sx:{flex:1,minWidth:0},children:[o?jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.72rem",fontWeight:700,letterSpacing:"0.08em",color:"text.secondary"},children:o}):null,jsxRuntime.jsx(material.Typography,{sx:{fontSize:"1.05rem",fontWeight:800,lineHeight:1.25},children:e}),t?jsxRuntime.jsx(material.Typography,{sx:{mt:.5,fontSize:"0.9rem",color:"text.secondary",lineHeight:1.45},children:t}):null]}),l?jsxRuntime.jsx(material.Box,{"data-no-swipe":"true",...b,sx:{alignSelf:"center",display:"inline-flex",touchAction:"none"},children:jsxRuntime.jsx(material.IconButton,{size:"small",children:jsxRuntime.jsx(Lk__default.default,{})})}):null]}),a.length>0?jsxRuntime.jsx(material.Stack,{direction:"row",spacing:1,useFlexGap:true,flexWrap:"wrap",children:a.map((L,Z)=>jsxRuntime.jsx(material.Chip,{label:L,size:"small",sx:{borderRadius:999,fontWeight:700,bgcolor:"action.hover",color:"text.primary"}},Z))}):null,n.length>0?jsxRuntime.jsx(material.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(110px, 1fr))",gap:1},children:n.map(L=>jsxRuntime.jsxs(material.Paper,{elevation:0,sx:{p:1.25,borderRadius:3,bgcolor:"action.hover",border:"1px solid",borderColor:"divider",color:"text.primary"},children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.72rem",color:"text.secondary"},children:L.label}),jsxRuntime.jsx(material.Typography,{sx:{fontSize:"1rem",fontWeight:800,lineHeight:1.2},children:L.value})]},L.id))}):null,c,i]})})]})};var Zi=({label:e,onPress:t,emphasis:o="default"})=>jsxRuntime.jsx(material.Box,{component:"button",type:"button",onClick:t,sx:r=>({minHeight:72,borderRadius:3,border:"1px solid",borderColor:o==="primary"?"primary.main":"divider",background:o==="primary"?r.palette.primary.main:o==="danger"?r.palette.mode==="dark"?"rgba(239,68,68,0.18)":"rgba(239,68,68,0.10)":r.palette.mode==="dark"?"rgba(255,255,255,0.04)":"#fff",color:o==="primary"?"#fff":"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:e}),fN=({value:e,defaultValue:t="",title:o,subtitle:r,placeholder:a="0",allowDecimal:n=false,allowNegative:i=false,maxLength:c,confirmLabel:d,clearLabel:l,backspaceLabel:s,onChange:g,onSubmit:f,onClose:p,sx:b})=>{let{t:y}=ne(),[u,C]=Qt.useState(t),m=e??u,h=S=>{e===void 0&&C(S),g?.(S);},x=S=>{c&&m.length>=c||h(`${m}${S}`);},w=S=>{if(S==="00"){if(!m){h("0");return}x("00");return}x(S);},E=()=>{!n||m.includes(".")||h(m?`${m}.`:"0.");},R=()=>{if(i){if(m.startsWith("-")){h(m.slice(1));return}h(m?`-${m}`:"-");}},T=()=>{h(m.slice(0,-1));},I=()=>{h("");},k=()=>{f?.(m);};return jsxRuntime.jsx(material.Paper,{elevation:0,sx:{p:2,borderRadius:4,border:"1px solid",borderColor:"divider",bgcolor:"background.paper",...b},children:jsxRuntime.jsxs(material.Stack,{spacing:2,children:[jsxRuntime.jsxs(material.Stack,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",children:[jsxRuntime.jsxs(material.Box,{sx:{minWidth:0},children:[o?jsxRuntime.jsx(material.Typography,{sx:{fontSize:"1rem",fontWeight:800},children:o}):null,r?jsxRuntime.jsx(material.Typography,{sx:{mt:.5,fontSize:"0.86rem",color:"text.secondary"},children:r}):null]}),p?jsxRuntime.jsx(material.IconButton,{onClick:p,size:"small",children:jsxRuntime.jsx(Wk__default.default,{})}):null]}),jsxRuntime.jsx(material.Paper,{elevation:0,sx:{p:2,borderRadius:3,border:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:jsxRuntime.jsx(material.Typography,{sx:{minHeight:38,fontSize:m?"1.9rem":"1.25rem",fontWeight:900,letterSpacing:"0.06em",color:m?"text.primary":"text.disabled"},children:m||a})}),jsxRuntime.jsxs(material.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(3, minmax(0, 1fr))",gap:1.25},children:[["1","2","3","4","5","6","7","8","9"].map(S=>jsxRuntime.jsx(Zi,{label:S,onPress:()=>w(S)},S)),jsxRuntime.jsx(Zi,{label:i?"+/-":"00",onPress:i?R:()=>w("00")}),jsxRuntime.jsx(Zi,{label:"0",onPress:()=>w("0")}),jsxRuntime.jsx(Zi,{label:n?".":s?String(s):"DEL",onPress:n?E:T})]}),jsxRuntime.jsxs(material.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(3, minmax(0, 1fr))",gap:1.25},children:[jsxRuntime.jsx(material.Box,{component:"button",type:"button",onClick:T,sx:{minHeight:64,borderRadius:3,border:"1px solid",borderColor:"divider",bgcolor:"background.paper",cursor:"pointer",appearance:"none",WebkitAppearance:"none",WebkitTapHighlightColor:"transparent"},children:jsxRuntime.jsxs(material.Stack,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:[jsxRuntime.jsx(Vk__default.default,{}),jsxRuntime.jsx(material.Typography,{sx:{fontWeight:700},children:s||"DEL"})]})}),jsxRuntime.jsx(Zi,{label:String(l||"CLR"),onPress:I,emphasis:"danger"}),jsxRuntime.jsx(material.Box,{component:"button",type:"button",onClick:k,sx:S=>({minHeight:64,borderRadius:3,border:"1px solid",borderColor:"primary.main",background:S.palette.primary.main,color:"#fff",cursor:"pointer",appearance:"none",WebkitAppearance:"none",WebkitTapHighlightColor:"transparent"}),children:jsxRuntime.jsxs(material.Stack,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:[jsxRuntime.jsx(Hk__default.default,{}),jsxRuntime.jsx(material.Typography,{sx:{fontWeight:800},children:d||y("common.ok")})]})})]})]})})};var Ug=({touchMode:e="comfortable",sx:t,...o})=>{let r=e==="expanded";return jsxRuntime.jsx(material.Box,{sx:{"& .MuiPaper-root":{borderRadius:4},"& .MuiAutocomplete-root":{minWidth:{xs:"100%",md:260}},"& .MuiAutocomplete-root .MuiInputBase-root":{backgroundColor:"transparent !important"},"& .MuiInputBase-root":{minHeight:r?56:50,borderRadius:3,fontSize:r?"0.98rem":"0.92rem"},"& .MuiInputBase-input":{py:r?1.6:1.25,fontSize:r?"0.98rem":"0.92rem"},"& .MuiInputLabel-root":{fontSize:r?"0.95rem":"0.88rem"},"& .MuiButton-root":{minHeight:r?48:44,px:r?2.25:1.75,borderRadius:3,fontSize:r?"0.95rem":"0.88rem",fontWeight:700},"& .MuiIconButton-root":{width:r?40:36,height:r?40:36},"& .MuiMenuItem-root":{minHeight:r?44:38,fontSize:r?"0.95rem":"0.88rem"},"& .MuiListSubheader-root":{py:1},"& .MuiCheckbox-root":{p:r?1:.75},"& .MuiFormControlLabel-label":{fontSize:r?"0.95rem":"0.88rem"},"& .MuiDialog-paper":{borderRadius:4},"& .MuiDialogTitle-root":{fontSize:r?"1.05rem":"0.98rem",fontWeight:800},"& .MuiDialogContent-root .MuiInputBase-root":{minHeight:52},'& .MuiGrid-root > .MuiGrid-item, & .MuiGrid-root > .MuiGrid-sizeXs-1, & .MuiGrid-root > [class*="MuiGrid-grid-"]':{minWidth:0},...t},children:jsxRuntime.jsx($r,{...o})})};var jk=(e,t,o)=>{if(o?.(t),!!t.href){if(t.href.startsWith("http://")||t.href.startsWith("https://")){window.open(t.href,"_blank");return}e.push(t.href);}},qg=({items:e,selectedId:t,orientation:o="auto",onItemSelect:r,sx:a})=>{let n=styles.useTheme(),[i,c]=Qt.useState(false);Qt.useEffect(()=>{c(true);},[]);let d=material.useMediaQuery("(orientation: portrait)",{noSsr:true}),l=material.useMediaQuery(n.breakpoints.down("md"),{noSsr:true}),s=o==="auto"?d||l?"portrait":"landscape":o,g=navigation.useRouter();return jsxRuntime.jsx(material.Box,{sx:{display:"grid",gridTemplateColumns:!i||s==="portrait"?"repeat(2, minmax(0, 1fr))":"repeat(auto-fit, minmax(180px, 1fr))",gap:1.5,...a},children:e.map(f=>{let p=f.id===t,b=f.color||(p?n.palette.primary.main:n.palette.divider);return jsxRuntime.jsx(material.Paper,{elevation:0,sx:{overflow:"hidden",borderRadius:4,border:"1px solid",borderColor:p?"primary.main":"divider",boxShadow:p?"0 18px 40px rgba(37, 99, 235, 0.16)":"none",bgcolor:n.palette.mode==="dark"?"rgba(30,41,59,0.6)":"background.paper"},children:jsxRuntime.jsx(material.Box,{component:"button",type:"button",disabled:f.disabled,onClick:()=>jk(g,f,r),sx:{width:"100%",p:2,minHeight:s==="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:jsxRuntime.jsxs(material.Stack,{spacing:1.5,sx:{height:"100%"},children:[jsxRuntime.jsxs(material.Stack,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",children:[jsxRuntime.jsx(material.Box,{sx:{width:44,height:44,borderRadius:3,display:"grid",placeItems:"center",color:p?"#fff":"text.primary",background:p?b:"action.hover"},children:f.icon||jsxRuntime.jsx(material.Typography,{sx:{fontSize:"1rem",fontWeight:900},children:f.title.slice(0,1).toUpperCase()})}),f.badge!==void 0?jsxRuntime.jsx(material.Box,{sx:{minWidth:34,px:1,py:.4,borderRadius:999,bgcolor:p?"primary.main":"action.hover",color:p?"#fff":"text.secondary",textAlign:"center",fontWeight:800,fontSize:"0.8rem"},children:f.badge}):null]}),jsxRuntime.jsxs(material.Box,{sx:{flex:1,minWidth:0},children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:"1rem",fontWeight:800,lineHeight:1.25},children:f.title}),f.caption?jsxRuntime.jsx(material.Typography,{sx:{mt:.5,fontSize:"0.74rem",fontWeight:700,color:"text.secondary"},children:f.caption}):null,f.description?jsxRuntime.jsx(material.Typography,{sx:{mt:.75,fontSize:"0.84rem",lineHeight:1.45,color:"text.secondary"},children:f.description}):null]})]})})},f.id)})})};var Yg=(e,t)=>t.trim()?e.reduce((o,r)=>{let a=r.title?.toLowerCase().includes(t.toLowerCase())||r.label?.toLowerCase().includes(t.toLowerCase())||r.description?.toLowerCase().includes(t.toLowerCase()),n=r.children?Yg(r.children,t):[];return (a||n.length>0)&&o.push({...r,children:n.length>0?n:r.children}),o},[]):e,lw=e=>{let t=new Set,o=r=>{r.forEach(a=>{a.children?.length&&(t.add(a.id),o(a.children));});};return o(e),t},Qg=({collapsed:e=false,onToggle:t,className:o="",maxHeight:r,menuData:a=[],colorMode:n="light",orientation:i="auto",headerSlot:c,footerSlot:d,activeHref:l,onItemSelect:s})=>{let{t:g}=ne(),f=styles.useTheme(),p=material.useMediaQuery("(orientation: portrait)"),b=material.useMediaQuery(f.breakpoints.down("md")),y=i==="auto"?p||b?"portrait":"landscape":i,u=n==="dark",C=navigation.useRouter(),m=navigation.usePathname(),[h,x]=Qt.useState(""),[w,E]=Qt.useState(new Set),R=Qt.useMemo(()=>Yg(a,h),[a,h]),T=Qt.useMemo(()=>h.trim()?lw(R):w,[w,R,h]);Qt.useEffect(()=>{e&&E(new Set);},[e]);let I=M=>M.appurl||M.href||"",k=M=>{s?.(M);let B=I(M);if(B){if(B.startsWith("http://")||B.startsWith("https://")){window.open(B,"_blank");return}C.push(B);}},S=M=>{let B=!!M.children?.length;if(e&&B){t?.();return}if(B){E(X=>{let L=new Set(X);return L.has(M.id)?L.delete(M.id):L.add(M.id),L});return}k(M);},D=M=>{let B=l||m,X=I(M);return !!(X&&B===X)},P=(M,B=0)=>{let X=!!M.children?.length,L=T.has(M.id),Z=D(M);return jsxRuntime.jsx(material.Box,{sx:{pl:B===0?0:1.5},children:jsxRuntime.jsxs(material.Paper,{elevation:0,sx:{mb:1,overflow:"hidden",borderRadius:3,border:"1px solid",borderColor:Z?"primary.main":"divider",bgcolor:Z?"action.selected":"background.paper"},children:[jsxRuntime.jsxs(material.Box,{component:"button",type:"button",onClick:()=>S(M),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:[jsxRuntime.jsx(material.Avatar,{variant:"rounded",sx:{width:40,height:40,bgcolor:Z?"primary.main":"action.hover",color:Z?"#fff":"text.primary"},children:M.icon||(M.title||M.label||"?").slice(0,1).toUpperCase()}),jsxRuntime.jsxs(material.Box,{sx:{flex:1,minWidth:0},children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.95rem",fontWeight:800,lineHeight:1.2},children:M.title||M.label}),M.description?jsxRuntime.jsx(material.Typography,{sx:{mt:.4,fontSize:"0.78rem",color:"text.secondary",lineHeight:1.35},children:M.description}):null]}),X?jsxRuntime.jsx(nw__default.default,{sx:{transform:L?"rotate(180deg)":"rotate(0deg)",transition:"transform 180ms ease"}}):jsxRuntime.jsx(iw__default.default,{color:"action"})]}),X?jsxRuntime.jsx(material.Collapse,{in:L,children:jsxRuntime.jsx(material.Box,{sx:{px:1.25,pb:1.25},children:M.children?.map($=>P($,B+1))})}):null]})},M.id)};return e?jsxRuntime.jsx(material.Paper,{elevation:0,className:o,sx:{width:y==="portrait"?"100%":88,p:1,borderRadius:4,border:"1px solid",borderColor:"divider",bgcolor:u?"#101828":"rgba(255,255,255,0.88)",maxHeight:r?`${r}px`:void 0,overflowY:"auto"},children:jsxRuntime.jsxs(material.Stack,{spacing:1,children:[jsxRuntime.jsx(material.IconButton,{onClick:t,sx:{width:48,height:48,alignSelf:"center",bgcolor:"action.hover"},title:g("navigation.expand"),children:jsxRuntime.jsx(aw__default.default,{})}),a.map(M=>jsxRuntime.jsx(material.IconButton,{onClick:()=>S(M),sx:{width:56,height:56,alignSelf:"center",borderRadius:3,bgcolor:D(M)?"primary.main":"action.hover",color:D(M)?"#fff":"text.primary"},children:M.icon||(M.title||M.label||"?").slice(0,1).toUpperCase()},M.id))]})}):jsxRuntime.jsx(material.Paper,{elevation:0,className:o,sx:{width:y==="portrait"?"100%":320,p:1.25,borderRadius:5,border:"1px solid",borderColor:"divider",bgcolor:u?"#101828":"rgba(255,255,255,0.88)",maxHeight:r?`${r}px`:void 0,overflow:"hidden",display:"flex",flexDirection:"column"},children:jsxRuntime.jsxs(material.Stack,{spacing:1.25,sx:{flex:1,minHeight:0},children:[jsxRuntime.jsxs(material.Stack,{direction:"row",spacing:1,alignItems:"center",children:[jsxRuntime.jsx(material.TextField,{value:h,onChange:M=>x(M.target.value),placeholder:g("navigation.searchPlaceholder"),size:"small",fullWidth:true,InputProps:{startAdornment:jsxRuntime.jsx(ow__default.default,{fontSize:"small",color:"action"})}}),y==="landscape"&&!e?jsxRuntime.jsx(material.IconButton,{onClick:t,sx:{bgcolor:"action.hover"},children:jsxRuntime.jsx(rw__default.default,{})}):null]}),c,jsxRuntime.jsx(material.Box,{sx:{flex:1,minHeight:0,overflowY:"auto",pr:.25},children:R.length>0?R.map(M=>P(M)):jsxRuntime.jsx(material.Typography,{sx:{p:2,fontSize:"0.88rem",color:"text.secondary",textAlign:"center"},children:g("navigation.noMatch")})}),d]})})};var lf=(e,t)=>{let o=t[e.id];if(e.render)return e.render(o,t);if(o==null||o==="")return "--";if(e.numeric){if(typeof o=="number")return o.toLocaleString();if(typeof o=="string"&&o.trim()!==""&&!Number.isNaN(Number(o)))return Number(o).toLocaleString()}return String(o)},mw=e=>Qt__namespace.default.isValidElement(e)?jsxRuntime.jsx(material.Box,{sx:{display:"inline-flex",alignItems:"center"},children:e}):jsxRuntime.jsx(material.Typography,{sx:{mt:.2,fontSize:"0.88rem",fontWeight:800},children:e}),gw=(e,t)=>{let o=t[e.id];if(o==null||o==="")return "--";if(e.numeric){if(typeof o=="number")return o.toLocaleString();if(typeof o=="string"&&o.trim()!==""&&!Number.isNaN(Number(o)))return Number(o).toLocaleString()}return String(o)},fw=({summaryRow:e,visibleColumns:t,columns:o})=>{let r=o.filter(a=>t.includes(a.id)&&e[a.id]!=="");return r.length===0?null:jsxRuntime.jsx(material.Paper,{elevation:0,sx:{p:1.5,borderRadius:4,border:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:jsxRuntime.jsxs(material.Stack,{spacing:1,children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.82rem",fontWeight:800,color:"text.secondary"},children:"Summary"}),jsxRuntime.jsx(material.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(132px, 1fr))",gap:1},children:r.map(a=>jsxRuntime.jsxs(material.Paper,{elevation:0,sx:{p:1.1,borderRadius:3,border:"1px solid",borderColor:"divider"},children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.72rem",color:"text.secondary"},children:a.label}),jsxRuntime.jsx(material.Typography,{sx:{mt:.25,fontSize:"0.96rem",fontWeight:800},children:e[a.id]})]},`summary-${a.id}`))})]})})},hw=e=>{let{t}=ne(),o=styles.useTheme(),{title:r,showToolbar:a=true,selectionMode:n,selected:i=[],onSelectionChange:c,actions:d,extraTools:l,fitContainer:s=false,fullWidth:g=false,maxHeight:f,loading:p=false,rowsPerPageOptions:b=[20,50,100,-1],onLayoutSave:y,filterConfig:u,rowKey:C,tableKey:m="default",graphReport:h,quickCreate:x,quickEdit:w,quickDelete:E,serviceUrl:R,orientation:T="auto",cardTitleField:I,cardSubtitleFields:k,toolbarSlot:S,emptyState:D,rowHeight:P="comfortable",cardActionSlot:M,renderCardFooter:B,onRowClick:X}=e,L=r||t("table.title.default"),Z=material.useMediaQuery("(orientation: portrait)"),$=material.useMediaQuery(o.breakpoints.down("md")),q=T==="auto"?Z||$?"portrait":"landscape":T,{columns:H,filterText:re,setFilterText:de,visibleColumns:Ce,showSummary:ve,setShowSummary:le,summaryColumns:oe,grouping:Ie,setGrouping:Ze,expandedGroups:Ge,groupAnchorEl:ce,setGroupAnchorEl:Ve,summaryAnchorEl:et,setSummaryAnchorEl:ye,anchorEl:We,setAnchorEl:qe,contextMenu:st,sortedAndFilteredRows:Pe,summaryRow:K,visibleRows:Ee,page:ge,setPage:ke,rowsPerPage:rt,setRowsPerPage:Ue,totalDisplayCount:ae,setSelected:fe,handleClick:je,toggleSummaryColumn:It,handleExport:_,handleCloseContextMenu:ze,toggleColumnVisibility:xe,toggleGroupExpand:Y,toggleGroupField:N,handleExpandGroupRecursively:J,handleCollapseGroupRecursively:we,handleLayoutLoad:Me,handleVariantLoad:tt,handleLayoutSave:bt,effectiveAppId:dt,currentLayoutData:Vt,currentLayoutId:vt,layoutIdToLoad:ko,graphReportOpen:Ct,handleOpenGraphReport:sr,handleCloseGraphReport:lo}=Tn(e),Et=h?.enabled??false,Gt=Et&&(h?.interaction?.enabled??true),yt=Nl(),ao=C||"id",O=Qt__namespace.default.useMemo(()=>({borderRadius:999,fontWeight:700,borderColor:styles.alpha(o.palette.divider,o.palette.mode==="dark"?.55:.3),bgcolor:o.palette.mode==="dark"?styles.alpha(o.palette.common.white,.06):styles.alpha(o.palette.background.paper,.92),color:o.palette.text.primary,"& .MuiChip-label":{px:1.05}}),[o]),W=Qt__namespace.default.useMemo(()=>({...O,borderColor:styles.alpha(o.palette.primary.main,o.palette.mode==="dark"?.42:.24),bgcolor:o.palette.mode==="dark"?styles.alpha(o.palette.primary.main,.16):styles.alpha(o.palette.primary.main,.08)}),[O,o]),U=Qt__namespace.default.useMemo(()=>{let V=new Set(i);return Pe.filter(ue=>V.has(ue?.[ao]))},[ao,i,Pe]),me=U.length===1?U[0]:null,pe=!!x?.enabled,Fe=!!w?.enabled,Xe=!!E?.enabled,Ye=x?.fields,ot=x?.excludeFields||[],Dt=x?.initialValues||{},pt=w?.fields,mt=w?.excludeFields||[],St=w?.editableFields||[],Wt=w?.nonEditableFields||[],ct=w?.primaryKeys?.length?w.primaryKeys:[ao],[Ao,wo]=Qt__namespace.default.useState(false),[Yo,A]=Qt__namespace.default.useState(false),[j,ee]=Qt__namespace.default.useState({}),[se,Le]=Qt__namespace.default.useState(false),[_e,gt]=Qt__namespace.default.useState(false),[Re,ut]=Qt__namespace.default.useState({}),[nt,Pt]=Qt__namespace.default.useState(false),[ht,eo]=Qt__namespace.default.useState(false),so=p||Yo||_e||ht,To=Qt__namespace.default.useMemo(()=>{let V=[...H];if(Array.isArray(Ye)&&Ye.length>0){let ue=new Set(Ye);V=V.filter(te=>ue.has(te.id));}if(ot.length>0){let ue=new Set(ot);V=V.filter(te=>!ue.has(te.id));}return V.filter(ue=>!!ue?.id)},[H,ot,Ye]),Xt=Qt__namespace.default.useMemo(()=>{let V=[...H];if(Array.isArray(pt)&&pt.length>0){let ue=new Set(pt);V=V.filter(te=>ue.has(te.id));}if(mt.length>0){let ue=new Set(mt);V=V.filter(te=>!ue.has(te.id));}return V.filter(ue=>!!ue?.id)},[H,mt,pt]),xo=Qt__namespace.default.useMemo(()=>new Set(ct),[ct]),Rt=Qt__namespace.default.useMemo(()=>new Set(St),[St]),Ut=Qt__namespace.default.useMemo(()=>new Set(Wt),[Wt]),cr=Qt__namespace.default.useCallback(V=>Rt.size>0?Rt.has(V):!(Ut.has(V)||xo.has(V)),[Rt,Ut,xo]);Qt__namespace.default.useEffect(()=>{!Ct&&yt.hasActiveFilters&&yt.clearAll();},[yt,Ct]);let dr=()=>{let V={};To.forEach(ue=>{V[ue.id]=Dt[ue.id]??"";}),ee(V),wo(true);},rn=(V,ue)=>{ee(te=>({...te,[V]:ue}));},wa=async()=>{if(!x?.onSubmit){wo(false);return}try{A(!0),await x.onSubmit(j),wo(!1);}finally{A(false);}},an=()=>{if(!me)return;let V={};Xt.forEach(te=>{V[te.id]=me[te.id]??"";});let ue=w?.getInitialValues?{...V,...w.getInitialValues(me)}:V;ut(ue),Le(true);},Qo=(V,ue)=>{ut(te=>({...te,[V]:ue}));},nn=async()=>{if(me){if(!w?.onSubmit){Le(false);return}try{gt(!0),await w.onSubmit(Re,me),Le(!1);}finally{gt(false);}}},Ta=()=>{U.length!==0&&Pt(true);},Ia=async()=>{if(U.length===0){Pt(false);return}if(!E?.onConfirm){Pt(false),fe([]),c?.([]);return}try{eo(!0),await E.onConfirm(U),Pt(!1),fe([]),c?.([]);}finally{eo(false);}},Or=Pe,{fieldMapping:ra}=xn({rows:Or,config:{...h,title:h?.title||`${L} ${t("graph.reportTitle")}`}}),ni=Qt__namespace.default.useMemo(()=>Gt?yt.applyRows(Or,ra):Or,[ra,yt,Gt,Or]),{model:v}=xn({rows:ni,config:{...h,title:h?.title||`${L} ${t("graph.reportTitle")}`,fieldMapping:ra}}),F=v.table.columns.map(V=>({id:V.id,label:V.label,align:V.align||"left",minWidth:120,numeric:V.align==="right"})),z=dt?jsxRuntime.jsx(wn,{appId:dt,tableKey:m,currentLayoutData:Vt,onLayoutLoad:Me,targetLayoutId:ko,activeLayoutId:vt,serviceUrl:R??u?.serviceUrl}):null,Q=H.filter(V=>Ce.includes(V.id)),he=Q.find(V=>V.id===I)||Q[0],Ke=k?.map(V=>Q.find(ue=>ue.id===V)).filter(Boolean)||Q.filter(V=>V.id!==he?.id).slice(0,q==="portrait"?2:3),De=Q.filter(V=>V.id!==he?.id&&!Ke.some(ue=>ue.id===V.id)),He=[S,l].filter(Boolean),G=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(sn,{groupAnchorEl:ce,setGroupAnchorEl:Ve,grouping:Ie,setGrouping:Ze,columns:H,toggleGroupField:N}),jsxRuntime.jsx(cn,{anchorEl:We,setAnchorEl:qe,columns:H,visibleColumns:Ce,toggleColumnVisibility:xe}),jsxRuntime.jsx(bl,{anchorEl:et,setAnchorEl:ye,showSummary:ve,setShowSummary:le,columns:H,summaryColumns:oe,toggleSummaryColumn:It}),jsxRuntime.jsx(yl,{contextMenu:st,handleCloseContextMenu:ze,columns:H,visibleColumns:Ce,toggleColumnVisibility:xe})]}),Ne=(V,ue,te)=>{let Ae=i.includes(ue),kt=q==="portrait"?"repeat(2, minmax(0, 1fr))":"repeat(auto-fit, minmax(140px, 1fr))",wr=te%2===0?styles.alpha(o.palette.primary.main,o.palette.mode==="dark"?.09:.04):styles.alpha(o.palette.primary.main,o.palette.mode==="dark"?.05:.022),Sh=styles.alpha(o.palette.divider,.22);return jsxRuntime.jsx(material.Paper,{elevation:0,onClick:()=>{je({},V),X?.(V);},sx:{p:P==="compact"?1.25:1.5,borderRadius:4,border:"0.5px solid",borderColor:Ae?styles.alpha(o.palette.primary.main,.38):Sh,background:Ae?`linear-gradient(135deg, ${styles.alpha(o.palette.primary.main,.13)}, ${styles.alpha(o.palette.primary.main,.06)})`:`linear-gradient(135deg, ${wr}, ${styles.alpha(o.palette.primary.main,.015)})`,boxShadow:Ae?`0 12px 30px ${styles.alpha(o.palette.primary.main,.2)}`:`0 3px 10px ${styles.alpha(o.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:Ae?o.palette.primary.main:te%2===0?styles.alpha(o.palette.primary.main,.26):styles.alpha(o.palette.text.primary,.16)},"&:hover":{boxShadow:`0 10px 20px ${styles.alpha(o.palette.primary.main,.12)}`,transform:"translateY(-1px)"},"&:active":{transform:"scale(0.995)"}},children:jsxRuntime.jsxs(material.Stack,{spacing:1.25,children:[jsxRuntime.jsxs(material.Stack,{direction:"row",spacing:1.25,alignItems:"flex-start",children:[n?jsxRuntime.jsx(material.Checkbox,{checked:Ae,onClick:Wo=>Wo.stopPropagation(),onChange:()=>je({},V),sx:{mt:-0.6,ml:-0.6}}):null,jsxRuntime.jsxs(material.Box,{sx:{flex:1,minWidth:0},children:[he?jsxRuntime.jsx(material.Typography,{sx:{fontSize:"1rem",fontWeight:900,lineHeight:1.25},children:lf(he,V)}):null,Ke.length>0?jsxRuntime.jsx(material.Stack,{direction:"row",spacing:.75,useFlexGap:true,flexWrap:"wrap",sx:{mt:.75},children:Ke.map(Wo=>jsxRuntime.jsx(material.Chip,{label:`${Wo.label}: ${gw(Wo,V)}`,size:"small",variant:"outlined",sx:O},`${ue}-${Wo.id}`))}):null]}),M?jsxRuntime.jsx(material.Box,{onClick:Wo=>Wo.stopPropagation(),children:M(V)}):null]}),De.length>0?jsxRuntime.jsx(material.Box,{sx:{display:"grid",gridTemplateColumns:kt,gap:1},children:De.map(Wo=>jsxRuntime.jsxs(material.Paper,{elevation:0,sx:{p:1,borderRadius:3,bgcolor:o.palette.mode==="dark"?styles.alpha(o.palette.background.default,.7):styles.alpha(o.palette.background.paper,.92),border:"0.1px solid",borderColor:styles.alpha(o.palette.divider,.24)},children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.72rem",color:"text.secondary"},children:Wo.label}),mw(lf(Wo,V))]},`${ue}-${Wo.id}-detail`))}):null,B?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(material.Divider,{}),jsxRuntime.jsx(material.Box,{onClick:Wo=>Wo.stopPropagation(),children:B(V)})]}):null]})},ue)};return jsxRuntime.jsxs(material.Box,{sx:{width:g?"100%":"auto",mb:s?0:2,...s?{flex:1,display:"flex",flexDirection:"column",minHeight:0,height:"100%",overflow:"hidden"}:{}},children:[u?jsxRuntime.jsx(material.Box,{sx:{mb:2},children:jsxRuntime.jsx(Ug,{...u,onVariantLoad:V=>{tt(V),u.onVariantLoad?.(V);},appId:u.appId,tableKey:m,currentLayout:[{tableKey:m,layoutData:Vt}],currentLayoutId:vt,layoutRefs:[{tableKey:m,layoutId:vt}],variantService:u.variantService,serviceUrl:R??u.serviceUrl,touchMode:q==="portrait"?"expanded":"comfortable"})}):null,jsxRuntime.jsxs(material.Paper,{sx:{width:g?"100%":"auto",mb:s?0:2,display:"flex",flexDirection:"column",overflow:"hidden",position:"relative",bgcolor:"transparent",backgroundImage:"none",boxShadow:"none","&::before":so?{content:'""',position:"absolute",top:0,left:0,width:"100%",height:"3px",background:"linear-gradient(90deg, rgba(25, 118, 210, 0) 0%, rgba(25, 118, 210, 0.25) 25%, rgba(25, 118, 210, 1) 50%, rgba(25, 118, 210, 0.25) 75%, rgba(25, 118, 210, 0) 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}:s?{flex:1,minHeight:0,height:"100%"}:{}},children:[a?jsxRuntime.jsx(material.Box,{sx:{"& .MuiToolbar-root":{minHeight:60,alignItems:{xs:"flex-start",md:"center"},flexWrap:"wrap",rowGap:1,columnGap:1},"& .MuiToolbar-root > :nth-of-type(1)":{width:{xs:"100%",md:"auto"},"& .MuiTextField-root":{width:{xs:"100%",md:300}}},"& .MuiToolbar-root > :nth-of-type(2)":{flexShrink:0},"& .MuiToolbar-root > :nth-of-type(3)":{display:{xs:"none",md:"block"}},"& .MuiToolbar-root > :nth-of-type(4)":{ml:"auto",justifyContent:"flex-end",flexWrap:"wrap"},"& .MuiInputBase-root":{minHeight:46},"& .MuiIconButton-root":{width:40,height:40},"& .MuiTypography-root":{fontSize:"0.9rem"},"& .MuiButtonBase-root":{borderRadius:2.5}},children:jsxRuntime.jsx(ul,{filterText:re,setFilterText:de,onRowsPerPageChange:Ue,rowsPerPage:rt,rowsPerPageOptions:b,page:ge,count:ae,onPageChange:ke,actions:d,extraTools:He,grouping:Ie,setGroupAnchorEl:Ve,showSummary:ve,setShowSummary:le,setAnchorEl:qe,setSummaryAnchorEl:ye,handleExport:_,showCreateButton:pe,onOpenCreateDialog:dr,showEditButton:Fe,onOpenEditDialog:an,editDisabled:U.length!==1,showDeleteButton:Xe,onOpenDeleteConfirm:Ta,deleteDisabled:U.length===0,onLayoutSave:y||u?.variantService&&u?.appId?bt:void 0,loading:p,layoutManager:z,onOpenGraphReport:Et?sr:void 0})}):null,jsxRuntime.jsx(material.Box,{sx:{flex:1,minHeight:0,overflow:"auto",p:1.5},children:jsxRuntime.jsxs(material.Stack,{spacing:1.25,children:[Ee.length===0&&!p?D||jsxRuntime.jsx(material.Paper,{elevation:0,sx:{p:4,borderRadius:4,border:"1px dashed",borderColor:"divider",textAlign:"center"},children:jsxRuntime.jsx(material.Typography,{sx:{fontSize:"0.92rem",color:"text.secondary"},children:t("common.noData")})}):null,Ee.map((V,ue)=>{if(V.type==="group"){let kt=Ge.has(V.id);return jsxRuntime.jsx(material.Paper,{elevation:0,sx:{borderRadius:4,border:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:jsxRuntime.jsxs(material.Box,{component:"button",type:"button",onClick:()=>Y(V.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:[kt?jsxRuntime.jsx(nw__default.default,{}):jsxRuntime.jsx(iw__default.default,{}),jsxRuntime.jsxs(material.Box,{sx:{flex:1,minWidth:0},children:[jsxRuntime.jsxs(material.Typography,{sx:{fontSize:"0.94rem",fontWeight:800},children:[V.field,": ",V.value]}),jsxRuntime.jsxs(material.Typography,{sx:{mt:.2,fontSize:"0.76rem",color:"text.secondary"},children:[V.count," records"]})]}),Ie.length>1&&V.level<Ie.length-1?jsxRuntime.jsxs(material.Stack,{direction:"row",spacing:.5,children:[jsxRuntime.jsx(material.Chip,{size:"small",label:t("table.group.expandAll"),onClick:wr=>{wr.stopPropagation(),J(V.id);},sx:W}),jsxRuntime.jsx(material.Chip,{size:"small",label:t("table.group.collapseAll"),onClick:wr=>{wr.stopPropagation(),we(V.id);},sx:W})]}):null]})},V.id)}let te=V.data||V,Ae=V.id||te[ao]||ue;return Ne(te,Ae,ue)}),ve?jsxRuntime.jsx(fw,{summaryRow:K,visibleColumns:Ce,columns:H}):null,p?jsxRuntime.jsx(material.Typography,{sx:{py:1,fontSize:"0.84rem",color:"text.secondary",textAlign:"center"},children:t("common.loading")}):null]})})]}),pe?jsxRuntime.jsxs(material.Dialog,{open:Ao,onClose:()=>!Yo&&wo(false),fullWidth:true,maxWidth:"sm",children:[jsxRuntime.jsx(material.DialogTitle,{sx:{fontSize:"1rem",fontWeight:800},children:x?.title||t("quickCreate.createWithTitle",{title:L})}),jsxRuntime.jsx(material.DialogContent,{sx:{pt:"8px !important"},children:jsxRuntime.jsxs(material.Box,{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[To.map(V=>{let ue=V.type==="number"||V.numeric?"number":V.type==="date"?"date":"text";return jsxRuntime.jsx(material.TextField,{label:V.label||V.id,value:j[V.id]??"",onChange:te=>rn(V.id,te.target.value),type:ue,fullWidth:true,InputLabelProps:{shrink:ue==="date"?true:void 0}},`quick-create-${V.id}`)}),x?.description?jsxRuntime.jsx(material.Alert,{severity:"info",children:x.description}):null]})}),jsxRuntime.jsxs(material.DialogActions,{sx:{px:3,pb:2},children:[jsxRuntime.jsx(material.Button,{onClick:()=>wo(false),disabled:Yo,children:x?.cancelLabel||t("common.cancel")}),jsxRuntime.jsx(material.Button,{onClick:wa,variant:"contained",disabled:Yo,children:x?.submitLabel||t("common.save")})]})]}):null,Fe?jsxRuntime.jsxs(material.Dialog,{open:se,onClose:()=>!_e&&Le(false),fullWidth:true,maxWidth:"sm",children:[jsxRuntime.jsx(material.DialogTitle,{sx:{fontSize:"1rem",fontWeight:800},children:w?.title||t("quickEdit.editWithTitle",{title:L})}),jsxRuntime.jsx(material.DialogContent,{sx:{pt:"8px !important"},children:jsxRuntime.jsxs(material.Box,{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[Xt.map(V=>{let ue=V.type==="number"||V.numeric?"number":V.type==="date"?"date":"text";return jsxRuntime.jsx(material.TextField,{label:V.label||V.id,value:Re[V.id]??"",onChange:te=>Qo(V.id,te.target.value),type:ue,disabled:!cr(V.id),fullWidth:true,InputLabelProps:{shrink:ue==="date"?true:void 0}},`quick-edit-${V.id}`)}),w?.description?jsxRuntime.jsx(material.Alert,{severity:"info",children:w.description}):null]})}),jsxRuntime.jsxs(material.DialogActions,{sx:{px:3,pb:2},children:[jsxRuntime.jsx(material.Button,{onClick:()=>Le(false),disabled:_e,children:w?.cancelLabel||t("common.cancel")}),jsxRuntime.jsx(material.Button,{onClick:nn,variant:"contained",disabled:_e||!me,children:w?.submitLabel||t("common.save")})]})]}):null,Xe?jsxRuntime.jsx(si,{open:nt,type:"warning",title:E?.title||t("quickDelete.confirmTitle"),message:E?.message||(U.length>1?t("quickDelete.confirmMessageMultiple",{count:U.length}):t("quickDelete.confirmMessageSingle")),confirmText:E?.confirmText||t("common.delete"),cancelText:E?.cancelText||t("common.cancel"),onClose:()=>!ht&&Pt(false),onConfirm:Ia}):null,G,Et?jsxRuntime.jsx(Fl,{open:Ct,onClose:lo,model:v,aiAssistant:h?.aiAssistant,interaction:Gt?{enabled:true,filters:yt.filters,fieldMapping:ra,onPrimaryDimensionClick:V=>yt.setFilter("primaryDimension",V),onSecondaryDimensionClick:V=>yt.setFilter("secondaryDimension",V),onStatusClick:V=>yt.setFilter("status",V),onClearFilter:yt.clearFilter,onClearAll:yt.clearAll}:void 0,tableContent:jsxRuntime.jsx(hw,{appId:dt||"graph-report-internal",title:t("graph.dataBody"),columns:F,rows:v.table.rows,rowKey:"id",fullWidth:true,maxHeight:"420px",rowsPerPage:20,rowsPerPageOptions:[20,50,100],graphReport:{enabled:false},showSummary:false})}):null]})};var uz=({appTitle:e,children:t,menuData:o=[],workloadItems:r=[],workloadSelectedId:a,showNavigation:n=true,showWorkloadNav:i=true,orientation:c="auto",logo:d,headerSlot:l,actionSlot:s,portraitBottomSlot:g,contentSx:f,containerSx:p,user:b,onSearch:y,onSearchAdd:u,defaultNavigationOpen:C,navOpen:m,onNavOpenChange:h,onWorkloadSelect:x,locale:w="en",localeLabel:E,localeOptions:R,onLocaleChange:T,onUserSetting:I,onUserLogout:k,userMenuItems:S,leftHeaderSlot:D,rightHeaderSlot:P})=>{let M="orbcafe:page-layout-mode",[B,X]=Qt.useState("system"),[L,Z]=Qt.useState("light"),[$,q]=Qt.useState(false),[H,re]=Qt.useState(false),de=B==="system"?H?L:"light":B;Qt.useEffect(()=>{q(true);},[]),Qt.useEffect(()=>{try{let Pe=window.localStorage.getItem(M);(Pe==="light"||Pe==="dark"||Pe==="system")&&X(Pe);}catch{}re(true);let qe=window.matchMedia("(prefers-color-scheme: dark)"),st=()=>{Z(qe.matches?"dark":"light");};return st(),qe.addEventListener("change",st),()=>qe.removeEventListener("change",st)},[]),Qt.useEffect(()=>{if(H)try{window.localStorage.setItem(M,B);}catch{}},[H,B]),Qt.useEffect(()=>{de==="dark"?(document.documentElement.classList.add("dark"),document.documentElement.style.colorScheme="dark"):(document.documentElement.classList.remove("dark"),document.documentElement.style.colorScheme="light");},[de]);let Ce=Qt.useMemo(()=>styles.createTheme({palette:de==="dark"?{mode:"dark",primary:{main:"#93c5fd"},background:{default:"#060913",paper:"#101826"},text:{primary:"#f8fafc",secondary:"rgba(226,232,240,0.74)"},divider:"rgba(148,163,184,0.18)",action:{hover:"rgba(148,163,184,0.10)",selected:"rgba(59,130,246,0.18)"}}:{mode:"light",background:{default:"#eef3f8",paper:"#ffffff"}},components:{MuiCssBaseline:{styleOverrides:{body:{backgroundColor:de==="dark"?"#060913":"#eef3f8"}}},MuiPaper:{styleOverrides:{root:{backgroundImage:"none"}}}}}),[de]),ve=material.useMediaQuery("(orientation: portrait)"),le=material.useMediaQuery(Ce.breakpoints.down("md")),oe=c==="auto"?!$||ve||le?"portrait":"landscape":c,[Ie,Ze]=Qt.useState({landscape:C??true,portrait:false}),Ge=Ie[oe],ce=m??Ge,Ve=qe=>{m===void 0&&Ze(st=>({...st,[oe]:qe})),h?.(qe);},et=jsxRuntime.jsxs(material.Stack,{direction:"row",spacing:1,alignItems:"center",children:[!$||n&&oe==="portrait"?jsxRuntime.jsx(material.IconButton,{onClick:()=>Ve(!ce),sx:{bgcolor:"action.hover"},children:jsxRuntime.jsx(aw__default.default,{})}):null,D]}),ye=jsxRuntime.jsxs(material.Stack,{direction:"row",spacing:1,alignItems:"center",children:[s,P]}),We=jsxRuntime.jsx(Qg,{collapsed:oe==="landscape"?!ce:false,onToggle:()=>Ve(!ce),menuData:o,orientation:oe,colorMode:de,maxHeight:oe==="landscape"?900:void 0});return jsxRuntime.jsx(styles.ThemeProvider,{theme:Ce,children:jsxRuntime.jsx(cl,{locale:w,children:jsxRuntime.jsxs(material.Box,{sx:[qe=>({minHeight:"100vh",display:"flex",flexDirection:"column",background:qe.palette.mode==="dark"?"linear-gradient(180deg, #0A0A0A 0%, #141414 55%, #1A1A1A 100%)":qe.palette.background.default}),...Array.isArray(p)?p:[p]],children:[jsxRuntime.jsx(cs,{appTitle:e,logo:d===void 0?null:d,mode:B,onToggleMode:()=>X(qe=>qe==="system"?"dark":qe==="dark"?"light":"system"),locale:w,localeLabel:E,localeOptions:R,onLocaleChange:T,user:b,onUserSetting:I,onUserLogout:k,userMenuItems:S,onSearch:y,onSearchAdd:u,leftSlot:et,rightSlot:ye}),l?jsxRuntime.jsx(material.Box,{sx:{px:{xs:2,md:3},py:1.5,borderBottom:"1px solid",borderColor:"divider"},children:l}):null,jsxRuntime.jsxs(material.Box,{sx:{flex:1,minHeight:0,display:"flex",position:"relative"},children:[$&&n&&oe==="landscape"?jsxRuntime.jsx(material.Box,{sx:{p:1.5,pr:0,flexShrink:0},children:We}):null,!$||n&&oe==="portrait"?jsxRuntime.jsx(material.Drawer,{open:ce,onClose:()=>Ve(false),PaperProps:{sx:{width:"min(88vw, 360px)",p:1.25,bgcolor:"transparent",boxShadow:"none"}},children:We}):null,jsxRuntime.jsx(material.Box,{sx:{flex:1,minWidth:0,minHeight:0,overflow:"auto",p:1.5,...f},children:jsxRuntime.jsxs(material.Stack,{spacing:1.5,children:[i&&r.length>0?jsxRuntime.jsx(qg,{items:r,selectedId:a,orientation:oe,onItemSelect:x}):null,jsxRuntime.jsx(material.Paper,{elevation:0,sx:{flex:1,minHeight:oe==="portrait"?420:560,p:{xs:1.25,md:1.5},borderRadius:5,border:"1px solid",borderColor:"divider",bgcolor:Ce.palette.mode==="dark"?"rgba(15,23,42,0.72)":"rgba(255,255,255,0.72)",backdropFilter:"blur(12px)",color:"text.primary"},children:t})]})})]}),oe==="portrait"&&g?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(material.Divider,{}),jsxRuntime.jsx(material.Box,{sx:{p:1.5},children:g})]}):null]})})})};var mf=Lw__default.default(()=>Promise.resolve().then(()=>(pf(),uf)).then(e=>e.COrbCanvas),{ssr:false,loading:()=>jsxRuntime.jsx("div",{className:"h-full w-full bg-transparent"})});function $d({isRecording:e}){return jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&jsxRuntime.jsx(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:jsxRuntime.jsxs("div",{className:"relative flex h-full w-full items-center justify-center",children:[jsxRuntime.jsx("div",{className:"absolute inset-0",children:jsxRuntime.jsx(mf,{hue:0,hoverIntensity:.5,rotateOnHover:true,forceHoverState:true,backgroundColor:"transparent"})}),jsxRuntime.jsx("div",{className:"relative z-10 h-full w-1/3 mix-blend-overlay opacity-80",children:jsxRuntime.jsx(mf,{hue:10,hoverIntensity:.8,rotateOnHover:true,forceHoverState:true,backgroundColor:"transparent"})})]})})})}var xz=$d;var ff=Qt.createContext(null);function Gw(e){if(!e||!(e instanceof HTMLElement))return false;let t=e.tagName;return !!(t==="INPUT"||t==="TEXTAREA"||t==="SELECT"||e.isContentEditable||e.closest('[data-voice-hotkey-ignore="true"]'))}function Uw({children:e,onVoiceSubmit:t,onVoicePartial:o,onVoiceError:r,longPressMs:a=200,disableSpaceTrigger:n=false,ignoreWhenFocusedInput:i=true,renderOverlay:c=true,wsUrl:d,silenceThresholdMs:l,minVolumeRms:s}){let[g,f]=Qt.useState(false),[p,b]=Qt.useState(false),y=Qt.useRef(null),u=Qt.useRef(false),C=Qt.useRef(false),m=Qt.useCallback(()=>{C.current=false,f(false);},[]),{isRecording:h,startRecording:x,stopRecording:w}=Rn({wsUrl:d,silenceThresholdMs:l,minVolumeRms:s,onTextUpdate:I=>{o?.(I);},onComplete:async I=>{try{I.trim()&&(b(!0),await t(I.trim()));}catch(k){let S=k instanceof Error?k.message:"Failed to process voice command";r?.(S);}finally{b(!1),m();}},onError:I=>{r?.(I),b(!1),u.current||m();}}),E=Qt.useCallback(async()=>{C.current=false,await x();},[x]),R=Qt.useCallback(()=>{w();},[w]);Qt.useEffect(()=>{if(n)return;let I=S=>{S.isComposing||(S.code==="Space"||S.key===" ")&&(u.current||S.repeat||i&&Gw(document.activeElement)||(u.current=true,S.preventDefault(),y.current=setTimeout(()=>{C.current=true,f(true),x();},a)));},k=S=>{(S.code==="Space"||S.key===" ")&&(y.current&&(clearTimeout(y.current),y.current=null),u.current=false,C.current&&(S.preventDefault(),f(false),w()));};return window.addEventListener("keydown",I),window.addEventListener("keyup",k),()=>{window.removeEventListener("keydown",I),window.removeEventListener("keyup",k),y.current&&(clearTimeout(y.current),y.current=null);}},[n,i,a,x,w]);let T=Qt.useMemo(()=>({isRecording:h,isHotkeyRecording:g,isSubmitting:p,startRecording:E,stopRecording:R}),[g,h,p,E,R]);return jsxRuntime.jsxs(ff.Provider,{value:T,children:[c?jsxRuntime.jsx($d,{isRecording:g}):null,e]})}function _w(){let e=Qt.useContext(ff);if(!e)throw new Error("useAINav must be used within CAINavProvider");return e}var Tz=Uw,Iz=_w;function Je(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var Qw=({content:e,theme:t="light",size:o="base",defaultExpanded:r=false})=>{let[a,n]=Qt.useState(r),i=Qt.useMemo(()=>`${(o==="sm"?14:o==="lg"?18:16)-2}px`,[o]);return jsxRuntime.jsxs("div",{className:`my-6 rounded-lg overflow-hidden transition-all duration-200 ${t==="dark"?"bg-gray-800":"bg-white"}`,style:{border:`0.5px solid ${t==="dark"?"#4b5563":"#d1d5db"}`},children:[jsxRuntime.jsxs("div",{className:`px-4 py-3 cursor-pointer flex items-center justify-between transition-colors duration-200 ${t==="dark"?"bg-gray-700 hover:bg-gray-650":"bg-gray-50 hover:bg-gray-100"}`,style:{borderBottom:`0.5px solid ${t==="dark"?"#4b5563":"#e5e7eb"}`},onClick:()=>n(!a),children:[jsxRuntime.jsxs("span",{className:"flex items-center",children:[jsxRuntime.jsx("span",{className:"mr-2",children:"\u{1F914}"}),jsxRuntime.jsx("span",{className:`font-medium ${t==="dark"?"text-gray-300":"text-gray-700"}`,style:{fontSize:o==="sm"?"14px":o==="lg"?"18px":"16px"},children:"\u601D\u8003\u8FC7\u7A0B"})]}),jsxRuntime.jsx("svg",{className:`w-4 h-4 transition-transform duration-200 ${a?"rotate-180":""} ${t==="dark"?"text-gray-400":"text-gray-500"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),a&&jsxRuntime.jsx("div",{className:`p-4 whitespace-pre-wrap italic font-light ${t==="dark"?"text-gray-400":"text-gray-600"}`,style:{fontSize:i,lineHeight:"1.3 !important"},children:e})]})},hf=Qw;var i1=({content:e,language:t="text",isStreaming:o=false,className:r=""})=>{let{theme:a}=nextThemes.useTheme(),[n,i]=Qt.useState(false),c=async()=>{try{await navigator.clipboard.writeText(e),i(!0),setTimeout(()=>i(!1),2e3);}catch(l){console.error("\u590D\u5236\u5931\u8D25:",l);}},d=a==="dark"?prism.oneDark:prism.oneLight;return jsxRuntime.jsxs("div",{className:Je("rounded-lg overflow-hidden border border-gray-200 dark:border-gray-700 my-4",r),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between px-4 py-2 bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:[jsxRuntime.jsx("span",{className:"text-xs font-medium text-gray-600 dark:text-gray-300 uppercase",children:t}),jsxRuntime.jsx("button",{onClick:c,className:"p-1 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",disabled:o,title:n?"Copied":"Copy code",children:n?jsxRuntime.jsx(lucideReact.Check,{size:14,className:"text-green-500"}):jsxRuntime.jsx(lucideReact.Clipboard,{size:14,className:"text-gray-500 dark:text-gray-400"})})]}),jsxRuntime.jsx("div",{className:"text-sm",children:jsxRuntime.jsx(reactSyntaxHighlighter.Prism,{language:t,style:d,customStyle:{margin:0,padding:"16px",fontSize:"14px",lineHeight:"1.5",backgroundColor:a==="dark"?"#1f2937":"#ffffff"},wrapLongLines:true,children:e})})]})},yf=i1;var d1=({content:e,isLoading:t,className:o="",style:r})=>{let a=Qt.useRef(null),[n,i]=Qt.useState(false),[c,d]=Qt.useState(null),{theme:l}=nextThemes.useTheme();return Qt.useEffect(()=>{let s=async()=>{if(!(!e.trim()||!a.current)){i(true),d(null);try{vf__default.default.initialize({startOnLoad:!1,theme:l==="dark"?"dark":"default",securityLevel:"loose",fontFamily:"inherit"});let f=`mermaid-${Math.random().toString(36).substr(2,9)}`,p=e.replace(/```mermaid\n?|\n?```/g,"").trim(),{svg:b}=await vf__default.default.render(f,p);a.current&&(a.current.innerHTML=b);}catch(f){console.error("Mermaid render failed:",f),d(f instanceof Error?f.message:"Render failed"),a.current&&(a.current.innerText=e);}finally{i(false);}}},g=setTimeout(()=>{s();},100);return ()=>clearTimeout(g)},[e,l]),t||n?jsxRuntime.jsx("div",{className:`mermaid-block loading ${o}`,style:r,children:jsxRuntime.jsxs("div",{className:"flex items-center justify-center p-4 bg-gray-50 dark:bg-gray-800 rounded border border-gray-200 dark:border-gray-700",children:[jsxRuntime.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-blue-500 mr-2"}),jsxRuntime.jsx("span",{className:"text-sm text-gray-500",children:"Generating Diagram..."})]})}):c?jsxRuntime.jsxs("div",{className:"p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded text-red-600 dark:text-red-400 text-sm overflow-auto",children:[jsxRuntime.jsx("p",{className:"font-semibold mb-2",children:"Mermaid Error:"}),jsxRuntime.jsx("pre",{children:c}),jsxRuntime.jsx("pre",{className:"mt-4 text-xs text-gray-500",children:e})]}):jsxRuntime.jsx("div",{className:`mermaid-block overflow-x-auto ${o}`,style:r,ref:a})},Sf=d1;var h1=({title:e="\u53D1\u751F\u9519\u8BEF",content:t,errorCode:o,stack:r,icon:a,closable:n=true,onClose:i,onRetry:c,className:d="",...l})=>{let[s,g]=Qt.useState(false),[f,p]=Qt.useState(false),b=async()=>{if(c){p(true);try{await c();}catch(y){console.error("\u91CD\u8BD5\u5931\u8D25:",y);}finally{p(false);}}};return jsxRuntime.jsxs("div",{className:`relative w-full overflow-hidden rounded-lg border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 shadow-sm transition-all hover:shadow-md ${d}`,...l,children:[jsxRuntime.jsxs("div",{className:"flex p-4 border-l-4 border-l-red-500 bg-red-50 dark:bg-red-900/10",children:[jsxRuntime.jsx("div",{className:"flex-shrink-0 mr-3 text-red-500 mt-0.5",children:a||jsxRuntime.jsx(lucideReact.AlertCircle,{className:"w-5 h-5"})}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsxs("div",{className:"flex items-center space-x-2 mb-1",children:[jsxRuntime.jsx("h4",{className:"text-base font-semibold text-gray-900 dark:text-gray-100",children:e}),o&&jsxRuntime.jsx("span",{className:"text-xs font-mono px-1.5 py-0.5 rounded bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300",children:o})]}),t&&jsxRuntime.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-300 mb-3 leading-relaxed",children:typeof t=="string"?jsxRuntime.jsx("p",{className:"whitespace-pre-wrap",children:t}):t}),(c||r)&&jsxRuntime.jsxs("div",{className:"flex items-center space-x-4 mt-2",children:[c&&jsxRuntime.jsxs("button",{onClick:b,disabled:f,className:"flex items-center text-xs font-medium text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300 transition-colors disabled:opacity-50",children:[jsxRuntime.jsx(lucideReact.RotateCw,{className:`w-3.5 h-3.5 mr-1.5 ${f?"animate-spin":""}`}),f?"\u91CD\u8BD5\u4E2D...":"\u91CD\u8BD5"]}),r&&jsxRuntime.jsxs("button",{onClick:()=>g(!s),className:"flex items-center text-xs font-medium text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 transition-colors",children:[s?jsxRuntime.jsx(lucideReact.ChevronDown,{className:"w-3.5 h-3.5 mr-1"}):jsxRuntime.jsx(lucideReact.ChevronRight,{className:"w-3.5 h-3.5 mr-1"}),s?"\u9690\u85CF\u8BE6\u60C5":"\u67E5\u770B\u8BE6\u60C5"]})]})]}),n&&i&&jsxRuntime.jsx("button",{onClick:i,className:"flex-shrink-0 ml-3 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors self-start",children:jsxRuntime.jsx(lucideReact.X,{className:"w-4 h-4"})})]}),r&&s&&jsxRuntime.jsx("div",{className:"bg-gray-50 dark:bg-gray-950 p-3 border-t border-gray-100 dark:border-gray-800",children:jsxRuntime.jsx("pre",{className:"text-xs font-mono text-gray-600 dark:text-gray-400 overflow-x-auto whitespace-pre-wrap p-2 bg-white dark:bg-gray-900 rounded border border-gray-200 dark:border-gray-800",children:r})})]})},Ls=h1;var S1=({title:e="\u8B66\u544A",content:t,warningType:o,severity:r="warning",warnings:a=[],icon:n,closable:i=true,onClose:c,onConfirm:d,actionText:l,className:s="",...g})=>{let f=()=>{switch(r){case "info":return {borderLeftColor:"border-l-blue-500",iconColor:"text-blue-500",bgColor:"bg-blue-50 dark:bg-blue-900/10"};case "error":return {borderLeftColor:"border-l-red-500",iconColor:"text-red-500",bgColor:"bg-red-50 dark:bg-red-900/10"};case "success":return {borderLeftColor:"border-l-green-500",iconColor:"text-green-500",bgColor:"bg-green-50 dark:bg-green-900/10"};default:return {borderLeftColor:"border-l-yellow-500",iconColor:"text-yellow-500",bgColor:"bg-yellow-50 dark:bg-yellow-900/10"}}},p=()=>{switch(r){case "info":return jsxRuntime.jsx(lucideReact.Info,{className:"w-5 h-5"});case "error":return jsxRuntime.jsx(lucideReact.XCircle,{className:"w-5 h-5"});case "success":return jsxRuntime.jsx(lucideReact.CheckCircle,{className:"w-5 h-5"});default:return jsxRuntime.jsx(lucideReact.AlertTriangle,{className:"w-5 h-5"})}},b=f();return jsxRuntime.jsxs("div",{className:`relative w-full overflow-hidden rounded-lg border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 shadow-sm transition-all hover:shadow-md ${s}`,...g,children:[jsxRuntime.jsxs("div",{className:`flex p-4 border-l-4 ${b.borderLeftColor} ${b.bgColor}`,children:[jsxRuntime.jsx("div",{className:`flex-shrink-0 mr-3 ${b.iconColor}`,children:n||p()}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-1",children:[jsxRuntime.jsx("h4",{className:"text-base font-semibold text-gray-900 dark:text-gray-100",children:e}),o&&jsxRuntime.jsx("span",{className:"text-xs font-medium px-2 py-0.5 rounded-full bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400",children:o})]}),t&&jsxRuntime.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-300 mb-2",children:t}),a&&a.length>0&&jsxRuntime.jsx("ul",{className:"mt-2 space-y-1",children:a.map((y,u)=>jsxRuntime.jsxs("li",{className:"flex items-start text-sm text-gray-600 dark:text-gray-300",children:[jsxRuntime.jsx("span",{className:"mr-2 mt-1.5 w-1 h-1 rounded-full bg-gray-400 dark:bg-gray-500 flex-shrink-0"}),jsxRuntime.jsx("span",{children:y})]},u))})]}),i&&c&&jsxRuntime.jsx("button",{onClick:c,className:"flex-shrink-0 ml-3 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors",children:jsxRuntime.jsx(lucideReact.X,{className:"w-4 h-4"})})]}),d&&jsxRuntime.jsx("div",{className:"bg-gray-50 dark:bg-gray-800/50 px-4 py-3 flex justify-end border-t border-gray-100 dark:border-gray-800",children:jsxRuntime.jsx("button",{onClick:d,className:"px-4 py-1.5 text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-gray-900",children:l||"\u786E\u8BA4"})})]})},Ns=S1;var I1=({title:e="\u76F8\u5173\u63A8\u8350",content:t,suggestions:o,onSuggestionClick:r,maxDisplay:a=5,icon:n,closable:i=false,onClose:c,className:d="",...l})=>{let[s,g]=Qt.useState(false),[f,p]=Qt.useState(""),[b,y]=Qt.useState(false),u=Qt.useMemo(()=>f.trim()?o.filter(h=>h.toLowerCase().includes(f.toLowerCase())):o,[o,f]),C=Qt.useMemo(()=>s?u:u.slice(0,a),[u,s,a]),m=h=>{r?.(h);};return !o||o.length===0?null:jsxRuntime.jsxs("div",{className:`w-full overflow-hidden rounded-lg border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 shadow-sm transition-all hover:shadow-md ${d}`,...l,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-100 dark:border-gray-800 bg-blue-50/30 dark:bg-blue-900/10",children:[jsxRuntime.jsxs("div",{className:"flex items-center space-x-2.5",children:[jsxRuntime.jsx("div",{className:"text-blue-500 flex-shrink-0",children:n||jsxRuntime.jsx(lucideReact.Lightbulb,{className:"w-5 h-5"})}),jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("h4",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100 leading-tight",children:e}),t&&jsxRuntime.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:t})]})]}),jsxRuntime.jsxs("div",{className:"flex items-center space-x-1",children:[o.length>3&&jsxRuntime.jsx("button",{onClick:()=>y(!b),className:`p-1.5 rounded-md transition-colors ${b?"bg-blue-100 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400":"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800"}`,title:b?"\u5173\u95ED\u641C\u7D22":"\u641C\u7D22\u95EE\u9898",children:jsxRuntime.jsx(lucideReact.Search,{className:"w-4 h-4"})}),i&&c&&jsxRuntime.jsx("button",{onClick:c,className:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 p-1.5 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors",title:"\u5173\u95ED",children:jsxRuntime.jsx(lucideReact.X,{className:"w-4 h-4"})})]})]}),b&&jsxRuntime.jsx("div",{className:"px-4 py-2 border-b border-gray-100 dark:border-gray-800 bg-gray-50 dark:bg-gray-900/50",children:jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx("input",{type:"text",placeholder:"\u641C\u7D22\u76F8\u5173\u95EE\u9898...",value:f,onChange:h=>p(h.target.value),className:"w-full text-sm px-3 py-1.5 pl-8 rounded border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 focus:ring-1 focus:ring-blue-500 focus:border-blue-500 outline-none transition-shadow",autoFocus:true}),jsxRuntime.jsx(lucideReact.Search,{className:"absolute left-2.5 top-2 w-3.5 h-3.5 text-gray-400"})]})}),jsxRuntime.jsxs("div",{className:"p-2",children:[jsxRuntime.jsx("ul",{className:"space-y-1",children:C.map((h,x)=>jsxRuntime.jsx("li",{children:jsxRuntime.jsxs("button",{onClick:()=>m(h),className:"w-full text-left px-3 py-2 rounded-md text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-blue-600 dark:hover:text-blue-400 transition-colors group flex items-start justify-between",children:[jsxRuntime.jsx("span",{children:h}),jsxRuntime.jsx(lucideReact.ChevronRight,{className:"w-4 h-4 text-gray-300 group-hover:text-blue-400 opacity-0 group-hover:opacity-100 transition-all transform group-hover:translate-x-0.5"})]})},x))}),u.length>a&&jsxRuntime.jsx("button",{onClick:()=>g(!s),className:"w-full text-center py-2 text-xs font-medium text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 transition-colors border-t border-gray-50 dark:border-gray-800/50 mt-1",children:s?"\u6536\u8D77":`\u67E5\u770B\u5168\u90E8 (${u.length})`}),u.length===0&&f&&jsxRuntime.jsx("div",{className:"text-center py-4 text-sm text-gray-500 dark:text-gray-400",children:"\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u5EFA\u8BAE"})]})]})},zs=I1;var E1=({title:e,content:t,toolName:o,parameters:r,result:a,status:n,duration:i,icon:c,closable:d=false,onClose:l,onAction:s,actionText:g,className:f="",...p})=>{let[b,y]=Qt.useState(false),[u,C]=Qt.useState(true),m=()=>{switch(n){case "pending":return {iconColor:"text-blue-500",badgeBg:"bg-blue-50 dark:bg-blue-900/30",badgeText:"text-blue-600 dark:text-blue-400",label:"\u6267\u884C\u4E2D"};case "error":return {iconColor:"text-red-500",badgeBg:"bg-red-50 dark:bg-red-900/30",badgeText:"text-red-600 dark:text-red-400",label:"\u5931\u8D25"};default:return {iconColor:"text-green-500",badgeBg:"bg-green-50 dark:bg-green-900/30",badgeText:"text-green-600 dark:text-green-400",label:"\u6210\u529F"}}},h=()=>{switch(n){case "pending":return jsxRuntime.jsx(lucideReact.Loader2,{className:"w-5 h-5 animate-spin"});case "error":return jsxRuntime.jsx(lucideReact.XCircle,{className:"w-5 h-5"});default:return jsxRuntime.jsx(lucideReact.CheckCircle,{className:"w-5 h-5"})}},x=R=>R?R<1e3?`${R}ms`:`${(R/1e3).toFixed(2)}s`:"",w=m(),E=e||o||"\u5DE5\u5177\u8C03\u7528";return jsxRuntime.jsxs("div",{className:`w-full overflow-hidden rounded-lg border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 shadow-sm transition-all hover:shadow-md ${f}`,...p,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-100 dark:border-gray-800 bg-gray-50/50 dark:bg-gray-800/50",children:[jsxRuntime.jsxs("div",{className:"flex items-center space-x-3",children:[jsxRuntime.jsx("div",{className:`flex-shrink-0 ${w.iconColor}`,children:c||h()}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"flex items-center space-x-2",children:[jsxRuntime.jsx("h4",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100",children:E}),jsxRuntime.jsx("span",{className:`text-[10px] font-medium px-1.5 py-0.5 rounded ${w.badgeBg} ${w.badgeText}`,children:w.label})]}),o&&e&&jsxRuntime.jsxs("div",{className:"text-xs text-gray-500 dark:text-gray-400 flex items-center mt-0.5",children:[jsxRuntime.jsx(lucideReact.Terminal,{className:"w-3 h-3 mr-1"}),o]})]})]}),jsxRuntime.jsxs("div",{className:"flex items-center space-x-2 text-xs text-gray-500 dark:text-gray-400",children:[i&&jsxRuntime.jsxs("div",{className:"flex items-center bg-gray-100 dark:bg-gray-800 px-2 py-1 rounded",children:[jsxRuntime.jsx(lucideReact.Clock,{className:"w-3 h-3 mr-1"}),x(i)]}),d&&l&&jsxRuntime.jsx("button",{onClick:l,className:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors p-1 rounded",children:jsxRuntime.jsx(lucideReact.X,{className:"w-4 h-4"})})]})]}),jsxRuntime.jsxs("div",{className:"p-4",children:[t&&jsxRuntime.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-300 mb-4 leading-relaxed",children:t}),r&&jsxRuntime.jsxs("div",{className:"mb-3",children:[jsxRuntime.jsxs("button",{onClick:()=>y(!b),className:"flex items-center text-xs font-medium text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 mb-2",children:[b?jsxRuntime.jsx(lucideReact.ChevronDown,{className:"w-3.5 h-3.5 mr-1"}):jsxRuntime.jsx(lucideReact.ChevronRight,{className:"w-3.5 h-3.5 mr-1"}),jsxRuntime.jsx(lucideReact.Box,{className:"w-3.5 h-3.5 mr-1.5"}),"\u8F93\u5165\u53C2\u6570"]}),b&&jsxRuntime.jsx("div",{className:"bg-gray-50 dark:bg-gray-950 rounded border border-gray-100 dark:border-gray-800 overflow-hidden",children:jsxRuntime.jsx("pre",{className:"p-3 text-xs font-mono text-gray-600 dark:text-gray-400 overflow-x-auto",children:JSON.stringify(r,null,2)})})]}),a&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("button",{onClick:()=>C(!u),className:"flex items-center text-xs font-medium text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 mb-2",children:[u?jsxRuntime.jsx(lucideReact.ChevronDown,{className:"w-3.5 h-3.5 mr-1"}):jsxRuntime.jsx(lucideReact.ChevronRight,{className:"w-3.5 h-3.5 mr-1"}),jsxRuntime.jsx(lucideReact.Terminal,{className:"w-3.5 h-3.5 mr-1.5"}),"\u6267\u884C\u7ED3\u679C"]}),u&&jsxRuntime.jsx("div",{className:"bg-gray-50 dark:bg-gray-950 rounded border border-gray-100 dark:border-gray-800 overflow-hidden",children:jsxRuntime.jsx("pre",{className:"p-3 text-xs font-mono text-gray-600 dark:text-gray-400 overflow-x-auto",children:typeof a=="string"?a:JSON.stringify(a,null,2)})})]}),s&&jsxRuntime.jsx("div",{className:"mt-3 pt-3 border-t border-gray-100 dark:border-gray-800 flex justify-end",children:jsxRuntime.jsx("button",{onClick:s,className:"px-4 py-1.5 text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-gray-900",children:g||"\u6267\u884C\u64CD\u4F5C"})})]})]})},Os=E1;var L1=({data:e})=>{if(!e)return null;let t=Qt.useMemo(()=>{let o=[],r=[],a="\u6570\u636E\u8868\u683C";return Array.isArray(e)?(o=e,o.length>0&&(r=Object.keys(o[0]).map(n=>({id:n,label:n.charAt(0).toUpperCase()+n.slice(1),numeric:typeof o[0][n]=="number"})))):typeof e=="object"&&(a=e.title||a,o=Array.isArray(e.rows)?e.rows:Array.isArray(e.data)?e.data:[],Array.isArray(e.columns)?r=e.columns.map(i=>({id:i.key||i.id,label:i.title||i.label,numeric:i.dataType==="number"||i.numeric})):o.length>0&&(r=Object.keys(o[0]).map(i=>({id:i,label:i,numeric:typeof o[0][i]=="number"})))),o=o.map((n,i)=>({...n,id:n.id||`row_${i}`})),{title:a,columns:r,rows:o}},[e]);return t.rows.length===0?jsxRuntime.jsx("div",{className:"w-full my-4 p-4 border border-dashed border-gray-300 rounded text-center text-gray-500",children:"\u6682\u65E0\u8868\u683C\u6570\u636E"}):jsxRuntime.jsx("div",{className:"w-full my-4",children:jsxRuntime.jsx(Dr,{appId:"agent-ui-table-card",title:t.title,columns:t.columns,rows:t.rows,count:t.rows.length,rowKey:"id",fitContainer:false,maxHeight:"500px",rowsPerPage:10,rowsPerPageOptions:[5,10,20,50]})})},Vs=L1;var U1=({title:e,subtitle:t,data:o,type:r,config:a={}})=>{let n=()=>{switch(r){case "bar-chart-card":return jsxRuntime.jsx(lucideReact.BarChart,{className:"w-4 h-4 text-blue-500"});case "line-chart-card":return jsxRuntime.jsx(lucideReact.LineChart,{className:"w-4 h-4 text-green-500"});case "pie-chart-card":return jsxRuntime.jsx(lucideReact.PieChart,{className:"w-4 h-4 text-purple-500"});case "combo-chart-card":return jsxRuntime.jsx(lucideReact.Activity,{className:"w-4 h-4 text-orange-500"});case "heatmap-chart-card":return jsxRuntime.jsx(lucideReact.Grid,{className:"w-4 h-4 text-red-500"});case "fishbone-chart-card":return jsxRuntime.jsx(lucideReact.GitBranch,{className:"w-4 h-4 text-indigo-500"});case "waterfall-chart-card":return jsxRuntime.jsx(lucideReact.TrendingDown,{className:"w-4 h-4 text-teal-500"});case "google-map-card":return jsxRuntime.jsx(lucideReact.Globe,{className:"w-4 h-4 text-blue-600"});case "amap-card":return jsxRuntime.jsx(lucideReact.MapPin,{className:"w-4 h-4 text-blue-600"});default:return jsxRuntime.jsx(lucideReact.BarChart,{className:"w-4 h-4"})}},i=()=>{if(!o&&r!=="google-map-card"&&r!=="amap-card")return jsxRuntime.jsx("div",{className:"text-gray-500 text-sm p-4 text-center",children:"No data available"});try{switch(r){case "bar-chart-card":return jsxRuntime.jsx(yi,{data:o,orientation:a.orientation||"horizontal",valueSuffix:a.valueSuffix||"",minHeight:a.minHeight});case "line-chart-card":return jsxRuntime.jsx(ip,{data:o,color:a.color,valueSuffix:a.valueSuffix||"",height:a.height});case "pie-chart-card":let c=o.reduce((l,s)=>l+(Number(s.value)||0),0),d=o.map(l=>({name:l.name,value:Number(l.value)||0,percent:typeof l.percent=="number"?l.percent:c>0?(Number(l.value)||0)/c*100:0}));return jsxRuntime.jsx(Il,{data:d,variant:a.variant||"donut",size:a.size,colors:a.colors});case "combo-chart-card":return jsxRuntime.jsx(lp,{data:o,barColor:a.barColor,lineColor:a.lineColor});case "heatmap-chart-card":return jsxRuntime.jsx(cp,{data:o});case "fishbone-chart-card":return jsxRuntime.jsx(up,{branches:o,effect:a.effect||e||"Problem"});case "waterfall-chart-card":return jsxRuntime.jsx(mp,{data:o,height:a.height});case "google-map-card":return jsxRuntime.jsx(hp,{embedUrl:a.embedUrl||o&&o[0]?.embedUrl,apiKey:a.apiKey,query:a.query||o&&o[0]?.query||e,height:a.height});case "amap-card":return jsxRuntime.jsx(vp,{embedUrl:a.embedUrl||o&&o[0]?.embedUrl,keyword:a.keyword||o&&o[0]?.keyword||e,height:a.height});default:return jsxRuntime.jsxs("div",{className:"text-gray-500 text-sm p-4 text-center",children:["Unsupported chart type: ",r]})}}catch(c){return console.error("Error rendering chart:",c),jsxRuntime.jsx("div",{className:"text-red-500 text-sm p-4 text-center",children:"Error rendering chart"})}};return jsxRuntime.jsxs("div",{className:"w-full overflow-hidden rounded-lg border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 shadow-sm transition-all hover:shadow-md",children:[jsxRuntime.jsxs("div",{className:"flex items-center px-4 py-3 border-b border-gray-100 dark:border-gray-800 bg-gray-50/50 dark:bg-gray-800/50",children:[jsxRuntime.jsx("div",{className:"mr-2 flex-shrink-0",children:n()}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100 truncate",children:e}),t&&jsxRuntime.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5 truncate",children:t})]})]}),jsxRuntime.jsxs("div",{className:"p-4",children:[jsxRuntime.jsx("div",{className:"overflow-x-auto",children:i()}),jsxRuntime.jsx("div",{className:"mt-3",children:jsxRuntime.jsxs("details",{className:"text-xs text-gray-500 dark:text-gray-400",children:[jsxRuntime.jsx("summary",{className:"cursor-pointer hover:text-gray-700 dark:hover:text-gray-300 transition-colors select-none font-medium opacity-60 hover:opacity-100",children:"View Raw Data"}),jsxRuntime.jsx("pre",{className:"mt-2 p-2 bg-gray-50 dark:bg-gray-950 rounded border border-gray-100 dark:border-gray-800 overflow-x-auto max-h-40",children:JSON.stringify(o,null,2)})]})})]})]})},Ws=U1;var K1=({type:e,manifest:t})=>jsxRuntime.jsxs("div",{className:"w-full overflow-hidden rounded-lg border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 shadow-sm transition-all hover:shadow-md",children:[jsxRuntime.jsxs("div",{className:"flex items-center px-4 py-3 border-b border-gray-100 dark:border-gray-800 bg-blue-50/50 dark:bg-blue-900/10",children:[jsxRuntime.jsx(lucideReact.Box,{className:"w-4 h-4 mr-2 text-blue-600 dark:text-blue-400"}),jsxRuntime.jsxs("h3",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100",children:["SAP Card: ",e]})]}),jsxRuntime.jsx("div",{className:"p-4",children:jsxRuntime.jsx("div",{className:"bg-gray-50 dark:bg-gray-950 p-3 rounded border border-gray-100 dark:border-gray-800 overflow-x-auto",children:jsxRuntime.jsx("pre",{className:"text-xs font-mono text-gray-600 dark:text-gray-400 whitespace-pre-wrap",children:JSON.stringify(t,null,2)})})})]}),$s=K1;var Gs=e=>{let t;try{t=JSON.parse(e);}catch{return null}return t&&typeof t=="object"&&((t.type==="bar-chart-card"||t.type==="line-chart-card"||t.type==="pie-chart-card"||t.type==="combo-chart-card"||t.type==="heatmap-chart-card"||t.type==="fishbone-chart-card"||t.type==="waterfall-chart-card"||t.type==="google-map-card"||t.type==="amap-card")&&t.title||(t.type==="sap-analytical-card"||t.type==="sap-list-card"||t.type==="sap-object-card"||t.type==="sap-component-card")&&t.manifest||t.type==="error-card"||t.type==="warning-card"||t.type==="suggestions-card"||t.type==="tool-result-card"||t.type==="table"&&t.data)?t:null};var Q1=({content:e,theme:t,size:o="base",className:r,enableCodeHighlight:a=true,enableMermaid:n=true,messageId:i,cardHooks:c})=>{let d=Qt.useMemo(()=>e?e.replace(/<think>([\s\S]*?)<\/think>/g,(f,p)=>`<div data-component="thinkbox" data-think-content="${encodeURIComponent(p.trim())}"></div>`):"",[e]),l=(f,p,b,y,u)=>{c?.onCardEvent?.({messageId:i,cardType:f,action:p,title:b,payload:y,rawData:u});},s=(f,p,b,y,u,C)=>{if(!(!u&&!c?.onCardEvent))return (...m)=>{let h=u?.(...m),x=C?C(...m):void 0;return l(f,p,b,x,y),h}},g=Qt.useMemo(()=>({div(f){let{"data-component":p,"data-think-content":b,...y}=f;return p==="thinkbox"&&b?jsxRuntime.jsx(hf,{content:decodeURIComponent(b),theme:t,size:o,defaultExpanded:false}):jsxRuntime.jsx("div",{...y})},table({children:f}){return jsxRuntime.jsx("div",{className:"my-4 w-full overflow-x-auto rounded-lg border border-gray-200 dark:border-gray-800",children:jsxRuntime.jsx("table",{className:"w-full min-w-[520px] border-collapse text-sm",children:f})})},thead({children:f}){return jsxRuntime.jsx("thead",{className:"bg-gray-50 dark:bg-gray-900/60",children:f})},tbody({children:f}){return jsxRuntime.jsx("tbody",{className:"bg-white dark:bg-gray-950",children:f})},tr({children:f}){return jsxRuntime.jsx("tr",{className:"border-b border-gray-200 dark:border-gray-800 last:border-b-0",children:f})},th({children:f,align:p}){return jsxRuntime.jsx("th",{className:`px-3 py-2 font-semibold text-gray-800 dark:text-gray-100 ${p==="center"?"text-center":p==="right"?"text-right":"text-left"}`,children:f})},td({children:f,align:p}){return jsxRuntime.jsx("td",{className:`px-3 py-2 text-gray-700 dark:text-gray-200 align-top ${p==="center"?"text-center":p==="right"?"text-right":"text-left"}`,children:f})},code({inline:f,className:p,children:b,...y}){let u=/language-([\w-]+)/.exec(p||""),C=u?u[1]:"";if(f)return jsxRuntime.jsx("code",{className:"font-mono text-sm bg-gray-100 dark:bg-gray-800 px-1 py-0.5 rounded text-red-600 dark:text-red-400",...y,children:b});let m=String(b).replace(/\n$/,"");if(n&&C==="mermaid")return jsxRuntime.jsx(Sf,{content:m});if(C==="json"){let h=Gs(m);if(h)switch(h.type){case "table":return jsxRuntime.jsx(Vs,{data:h.data});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 jsxRuntime.jsx(Ws,{...h});case "sap-analytical-card":case "sap-list-card":case "sap-object-card":case "sap-component-card":return jsxRuntime.jsx($s,{...h});case "error-card":{let x=h;return jsxRuntime.jsx(Ls,{...x,onClose:s("error-card","close",x.title,x,x.onClose),onRetry:s("error-card","retry",x.title,x,x.onRetry)})}case "warning-card":{let x=h,w=x.onConfirm?s("warning-card","confirm",x.title,x,x.onConfirm):x.actionText&&c?.onCardEvent?s("warning-card","confirm",x.title,x):void 0;return jsxRuntime.jsx(Ns,{...x,onClose:s("warning-card","close",x.title,x,x.onClose),onConfirm:w})}case "suggestions-card":{let x=h;return jsxRuntime.jsx(zs,{...x,onClose:s("suggestions-card","close",x.title,x,x.onClose),onSuggestionClick:s("suggestions-card","suggestion-click",x.title,x,x.onSuggestionClick,w=>({suggestion:w}))})}case "tool-result-card":{let x=h;return jsxRuntime.jsx(Os,{...x,onClose:s("tool-result-card","close",x.title,x,x.onClose),onAction:s("tool-result-card","action",x.title,x,x.onAction)})}}}return a?jsxRuntime.jsx(yf,{content:m,language:C,className:"not-prose"}):jsxRuntime.jsx("code",{className:p,...y,children:b})}}),[t,o,n,a,c,i]);return jsxRuntime.jsx("div",{className:Je("markdown-body prose dark:prose-invert max-w-none",r),children:jsxRuntime.jsx(q1__default.default,{remarkPlugins:[j1__default.default,X1__default.default],rehypePlugins:[Z1__default.default,Y1__default.default],components:g,children:d})})},Us=Q1;var J1=({content:e,messageId:t,cardHooks:o})=>{let r=(i,c,d,l,s)=>{o?.onCardEvent?.({messageId:t,cardType:i,action:c,title:d,payload:l,rawData:s});},a=(i,c,d,l,s,g)=>{if(!(!s&&!o?.onCardEvent))return (...f)=>{let p=s?.(...f),b=g?g(...f):void 0;return r(i,c,d,b,l),p}},n=Gs(e);if(n)switch(n.type){case "table":return jsxRuntime.jsx(Vs,{data:n.data});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 jsxRuntime.jsx(Ws,{...n});case "sap-analytical-card":case "sap-list-card":case "sap-object-card":case "sap-component-card":return jsxRuntime.jsx($s,{...n});case "error-card":{let i=n;return jsxRuntime.jsx(Ls,{...i,onClose:a("error-card","close",i.title,i,i.onClose),onRetry:a("error-card","retry",i.title,i,i.onRetry)})}case "warning-card":{let i=n,c=i.onConfirm?a("warning-card","confirm",i.title,i,i.onConfirm):i.actionText&&o?.onCardEvent?a("warning-card","confirm",i.title,i):void 0;return jsxRuntime.jsx(Ns,{...i,onClose:a("warning-card","close",i.title,i,i.onClose),onConfirm:c})}case "suggestions-card":{let i=n;return jsxRuntime.jsx(zs,{...i,onClose:a("suggestions-card","close",i.title,i,i.onClose),onSuggestionClick:a("suggestions-card","suggestion-click",i.title,i,i.onSuggestionClick,c=>({suggestion:c}))})}case "tool-result-card":{let i=n;return jsxRuntime.jsx(Os,{...i,onClose:a("tool-result-card","close",i.title,i,i.onClose),onAction:a("tool-result-card","action",i.title,i,i.onAction)})}}return jsxRuntime.jsx("div",{className:"dynamic-card-fallback",children:jsxRuntime.jsx(Us,{content:e,enableCodeHighlight:true,enableMath:true,enableMermaid:true,messageId:t,cardHooks:o})})},Bf=J1;var Zd=class{static analyze(t){if(!t.trim())return {blocks:[],hasComplexContent:false,overallType:"simple"};let r=/```json\s*\{\s*"type":\s*"[^"]+"/g.test(t),a=/<[^>]+>[\s\S]*?<\/[^>]+>/.test(t),n=t.includes("NQ#")||t.includes("data-component");return r||a||n?{blocks:[{type:"mixed",content:t,startIndex:0,endIndex:t.length}],hasComplexContent:true,overallType:"complex"}:{blocks:[{type:"markdown",content:t,startIndex:0,endIndex:t.length}],hasComplexContent:false,overallType:"simple"}}},tT=({content:e,className:t="",messageId:o,cardHooks:r})=>{let a=Qt__namespace.default.useMemo(()=>Zd.analyze(e),[e]);return jsxRuntime.jsx("div",{className:`universal-content-renderer ${t}`,children:a.blocks.map((n,i)=>n.type==="mixed"||n.type==="json-card"?jsxRuntime.jsx(Bf,{content:n.content,messageId:o,cardHooks:r},`block-${i}`):jsxRuntime.jsx(Us,{content:n.content,enableCodeHighlight:true,enableMath:true,enableMermaid:true,messageId:o,cardHooks:r},`block-${i}`))})},Ef=tT;var oT=({content:e,isStreaming:t=true,onComplete:o,className:r="",streamIntervalMs:a=24,streamChunkSize:n=3,messageId:i,cardHooks:c})=>{let[d,l]=Qt.useState(t?0:e.length),[s,g]=Qt.useState(!t);Qt.useEffect(()=>{if(t){l(0),g(false);return}l(e.length),g(true);},[e,t]),Qt.useEffect(()=>{if(!t||s)return;if(d>=e.length){g(true),o?.();return}let u=window.setTimeout(()=>{l(C=>Math.min(C+n,e.length));},a);return ()=>{window.clearTimeout(u);}},[e.length,s,t,o,n,a,d]);let f=()=>{t&&!s&&(l(e.length),g(true),o?.());},p=t?e.slice(0,d):e,b=t&&!s,y=t&&!s;return jsxRuntime.jsxs("div",{className:`streaming-markdown ${r}`,onClick:f,style:{cursor:t?"pointer":"default"},children:[jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(Ef,{content:p,messageId:i,cardHooks:c}),b&&jsxRuntime.jsx("span",{className:"inline-block w-0.5 h-5 bg-blue-500 ml-1 animate-pulse",style:{verticalAlign:"text-bottom"}})]}),y&&jsxRuntime.jsx("div",{className:"streaming-hint",style:{fontSize:"9px",color:"#999",marginTop:"8px",fontStyle:"italic",opacity:.7},children:"\u70B9\u51FB\u6B64\u5904\u663E\u793A\u5B8C\u6574\u5185\u5BB9"})]})},zf=oT;var Of=({buttons:e,className:t})=>{let o=r=>{switch(r){case "copy":return jsxRuntime.jsx(lucideReact.Copy,{size:14});case "refresh":return jsxRuntime.jsx(lucideReact.RefreshCw,{size:14});case "volume":return jsxRuntime.jsx(lucideReact.Volume2,{size:14});case "like":return jsxRuntime.jsx(lucideReact.ThumbsUp,{size:14});case "dislike":return jsxRuntime.jsx(lucideReact.ThumbsDown,{size:14});default:return null}};return jsxRuntime.jsx("div",{className:Je("flex items-center gap-1",t),children:e.map((r,a)=>jsxRuntime.jsx("button",{onClick:r.onClick,disabled:r.disabled,"aria-busy":r.loading||void 0,className:Je("p-1.5 rounded-md transition-colors","text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-100","hover:bg-gray-100 dark:hover:bg-gray-800","disabled:opacity-50 disabled:cursor-not-allowed",r.active&&"text-blue-600 bg-blue-50 dark:text-blue-400 dark:bg-blue-900/20",r.type==="refresh"&&r.loading&&"animate-spin"),title:r.type,type:"button",children:o(r.type)},`${r.type}-${a}`))})};var _s=({message:e,onStreamingComplete:t,assistantActions:o,streamIntervalMs:r,streamChunkSize:a,cardHooks:n})=>{if(e.type==="assistant"){let i=!!(o?.isResponding||e.isStreaming);return jsxRuntime.jsx("div",{className:"flex justify-start mb-4",children:jsxRuntime.jsxs("div",{className:"w-full bg-transparent text-black dark:text-gray-100 rounded-2xl px-4 py-3 mr-auto",style:{lineHeight:"1.5",fontSize:"16px",fontWeight:"280",fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},children:[jsxRuntime.jsx(zf,{content:e.content,isStreaming:e.isStreaming??false,onComplete:t,streamIntervalMs:r,streamChunkSize:a,messageId:e.id,cardHooks:n}),e.content&&o?.isLatestAssistant&&jsxRuntime.jsx("div",{className:"flex flex-row justify-start gap-2 mt-3 pt-2 border-t border-gray-100 dark:border-gray-700",children:jsxRuntime.jsx(Of,{buttons:[{type:"refresh",onClick:()=>{o?.onRegenerate?.();},disabled:i||!o?.onRegenerate,loading:i},{type:"copy",onClick:()=>navigator.clipboard.writeText(e.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"})}),jsxRuntime.jsx("div",{className:"text-xs mt-2 text-gray-500 dark:text-gray-400",children:e.timestamp.toLocaleTimeString()})]})})}return jsxRuntime.jsx("div",{className:"flex justify-end",children:jsxRuntime.jsxs("div",{className:"max-w-[80%] bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-100 rounded-2xl px-4 py-3 ml-auto",style:{lineHeight:"1.5",fontSize:"16px",fontWeight:"280",fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},children:[jsxRuntime.jsx("div",{className:"whitespace-pre-wrap",style:{lineHeight:"1.5",fontSize:"16px",fontWeight:"280",fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},children:e.content}),jsxRuntime.jsx("div",{className:"text-xs mt-2 text-gray-500 dark:text-gray-400",children:e.timestamp.toLocaleTimeString()})]})})};var Wf=({onTextUpdate:e,onComplete:t,onCancel:o,disabled:r,className:a})=>{let{isRecording:n,startRecording:i,stopRecording:c}=Rn({onTextUpdate:e,onComplete:l=>{t?.(l);},onError:l=>{console.error("Voice input error:",l),o?.();}});return jsxRuntime.jsx("button",{onClick:async()=>{n?c():await i();},disabled:r,className:Je("transition-all duration-200 flex items-center justify-center rounded-full",n?"bg-red-100 text-red-600 hover:bg-red-200 animate-pulse":"bg-transparent hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-500 dark:text-gray-400 active:scale-95",r&&"opacity-50 cursor-not-allowed",a),title:n?"Stop recording":"Start recording",type:"button",children:n?jsxRuntime.jsx(cT__default.default,{sx:{fontSize:24}}):jsxRuntime.jsx(sT__default.default,{sx:{fontSize:24}})})};var Jt={container:"w-full max-w-4xl mx-auto",inputContainer:Je("w-full border backdrop-blur-xl transition-all duration-300 shadow-2xl flex flex-col","bg-white/80 dark:bg-gray-900/80","border-gray-200/60 dark:border-gray-600/40","shadow-gray-900/5","hover:border-blue-300/80 hover:shadow-blue-500/10 hover:shadow-2xl","focus-within:border-blue-400/90 focus-within:shadow-blue-500/20 focus-within:shadow-3xl focus-within:scale-[1.005] transform-gpu"),dragActive:"border-blue-500 bg-blue-50/50 dark:bg-blue-900/20",textareaWrapper:"flex-1 relative flex items-center",textarea:Je("w-full outline-none appearance-none resize-none bg-transparent border-none text-sm font-normal py-3 px-2","placeholder:text-gray-400/70 dark:placeholder:text-gray-500/60 placeholder:font-normal","text-gray-800 dark:text-gray-100 selection:bg-blue-200/50 dark:selection:bg-blue-500/30","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-gray-300 dark:scrollbar-thumb-gray-600"),filePreviewArea:"px-6 pt-3 pb-1 flex flex-wrap gap-2",fileTag:Je("flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs font-medium","bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300","border border-gray-200 dark:border-gray-700","transition-all hover:bg-gray-200 dark:hover:bg-gray-700"),buttonBase:"flex items-center justify-center transition-all duration-200 rounded-full",buttonSmall:"w-10 h-10",buttonNormal:Je("bg-transparent hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-500 dark:text-gray-400","cursor-pointer active:scale-95"),sendButton:Je("cursor-pointer bg-transparent hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-500 dark:text-gray-400 shadow-none active:scale-95"),sendButtonDisabled:Je("cursor-not-allowed opacity-40 bg-transparent text-gray-400"),stopButton:Je("cursor-pointer bg-red-500 hover:bg-red-600 text-white shadow-sm active:scale-95")},bT={padding:0,lineHeight:"1.5",border:"none !important",boxShadow:"none !important",backgroundColor:"transparent",height:"auto",fontFeatureSettings:'"liga" 1, "kern" 1',WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},yT=({enabled:e,onClick:t})=>jsxRuntime.jsx("button",{className:Je(Jt.buttonBase,Jt.buttonSmall,Jt.buttonNormal),onClick:t,disabled:!e,"aria-label":"Upload file",type:"button",children:jsxRuntime.jsx(VC__default.default,{sx:{fontSize:24}})}),xT=()=>jsxRuntime.jsxs("button",{className:Je(Jt.buttonBase,"h-10 px-3 py-2 gap-1.5 rounded-full",Jt.buttonNormal),"aria-label":"Tools",type:"button",children:[jsxRuntime.jsx(hT__default.default,{sx:{fontSize:20}}),jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"Tools"})]}),vT=({canSend:e,isResponding:t,onSend:o,onStop:r})=>t?jsxRuntime.jsx("button",{className:Je(Jt.buttonBase,Jt.buttonSmall,Jt.stopButton),onClick:r,"aria-label":"Stop generating",type:"button",children:jsxRuntime.jsx(iconsMaterial.Stop,{sx:{fontSize:20}})}):jsxRuntime.jsx("button",{className:Je(Jt.buttonBase,Jt.buttonSmall,e?Jt.sendButton:Jt.sendButtonDisabled),onClick:o,disabled:!e,"aria-label":"Send message",type:"button",children:jsxRuntime.jsx(gT__default.default,{sx:{fontSize:24},className:e?"text-gray-500 dark:text-gray-400":"text-gray-300 dark:text-gray-600"})}),Hf=({onSend:e,onStop:t,isResponding:o=false,placeholder:r,getText:a})=>{let[n,i]=Qt.useState(""),[c,d]=Qt.useState([]),[l,s]=Qt.useState(false),[g,f]=Qt.useState(false),p=Qt.useRef(null),b=r||(a?a("00019","Type a message..."):"Type a message..."),y=(n.trim().length>0||c.length>0)&&!o,u={enabled:true},C=Qt.useCallback(B=>{i(B.target.value),B.target.style.height="auto",B.target.style.height=`${Math.min(B.target.scrollHeight,200)}px`;},[]),m=Qt.useCallback(B=>{if(B.target.files&&B.target.files.length>0){let X=Array.from(B.target.files);d(L=>{let Z=X.filter(q=>L.some(H=>H.name===q.name&&H.size===q.size));Z.length>0&&console.warn("Duplicate files ignored:",Z.map(q=>q.name));let $=X.filter(q=>!L.some(H=>H.name===q.name&&H.size===q.size));return [...L,...$]}),p.current&&(p.current.value="");}},[]),h=Qt.useCallback(B=>{d(X=>X.filter((L,Z)=>Z!==B));},[]),x=Qt.useCallback(()=>{p.current?.click();},[]),w=Qt.useCallback(async()=>{if(!y)return;let B=n,X=[...c];i(""),d([]),p.current&&(p.current.value="");try{await e(B,X);}catch(L){console.error("Failed to send message:",L),i(B),d(X);}},[n,y,e,c]),E=Qt.useCallback(B=>{B.key==="Enter"&&!B.shiftKey&&!l&&(B.preventDefault(),w());},[w,l]),R=Qt.useCallback(()=>{s(true);},[]),T=Qt.useCallback(()=>{s(false);},[]),I=Qt.useCallback(B=>{i(B);},[]),k=Qt.useCallback(B=>{i(B);},[]),S=Qt.useCallback(()=>{},[]),D=Qt.useCallback(B=>{B.preventDefault(),f(true);},[]),P=Qt.useCallback(B=>{B.preventDefault(),f(false);},[]),M=Qt.useCallback(B=>{if(B.preventDefault(),f(false),B.dataTransfer.files&&B.dataTransfer.files.length>0){let X=Array.from(B.dataTransfer.files);d(L=>[...L,...X]);}},[]);return jsxRuntime.jsx("div",{className:Jt.container,children:jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx("input",{type:"file",multiple:true,className:"hidden",ref:p,onChange:m}),jsxRuntime.jsxs("div",{className:Je(Jt.inputContainer,g&&Jt.dragActive),style:{borderRadius:"32px"},onDragOver:D,onDragLeave:P,onDrop:M,children:[c.length>0&&jsxRuntime.jsx("div",{className:Jt.filePreviewArea,children:c.map((B,X)=>jsxRuntime.jsxs("div",{className:Jt.fileTag,children:[jsxRuntime.jsx(iconsMaterial.InsertDriveFile,{sx:{fontSize:16},className:"text-blue-500"}),jsxRuntime.jsx("span",{className:"truncate max-w-[150px]",children:B.name}),jsxRuntime.jsx("button",{onClick:()=>h(X),className:"ml-1 hover:text-red-500 focus:outline-none",type:"button",children:jsxRuntime.jsx(iconsMaterial.Close,{sx:{fontSize:16}})})]},`${B.name}-${X}`))}),jsxRuntime.jsxs("div",{className:"flex flex-col w-full p-2",children:[jsxRuntime.jsx("div",{className:Je(Jt.textareaWrapper,"px-3 pt-2 pb-3 min-h-[60px]"),children:jsxRuntime.jsx("textarea",{className:Je(Jt.textarea,"min-h-[24px] py-0 px-0"),placeholder:b,value:n,onChange:C,onKeyDown:E,onCompositionStart:R,onCompositionEnd:T,style:bT,"aria-label":"Message input",spellCheck:false,rows:1})}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between px-1 pb-1",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1",role:"toolbar","aria-label":"Input tools",children:[jsxRuntime.jsx(yT,{enabled:u.enabled,onClick:x}),jsxRuntime.jsx(xT,{})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(Wf,{onTextUpdate:I,onComplete:k,onCancel:S,disabled:o,className:Jt.buttonSmall}),jsxRuntime.jsx(vT,{canSend:y,isResponding:o,onSend:w,onStop:t})]})]})]})]})]})})};var Uf=({messages:e,onSend:t,onStop:o,onRegenerate:r,isResponding:a=false,className:n,placeholder:i,streamIntervalMs:c,streamChunkSize:d,onMessageStreamingComplete:l,cardHooks:s,showInput:g=true})=>{let f=Qt.useRef(null),p=Qt.useRef(e.length);return Qt.useEffect(()=>{e.length>p.current&&f.current?.scrollIntoView({behavior:"smooth"}),p.current=e.length;},[e]),jsxRuntime.jsxs("div",{className:Je("flex flex-col h-full w-full relative",n),children:[jsxRuntime.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-4 space-y-6 scrollbar-thin scrollbar-thumb-gray-300 dark:scrollbar-thumb-gray-600",children:[e.map((b,y)=>{let u=b.type==="assistant"&&y===e.length-1,C=b.type==="assistant"?{isLatestAssistant:u,isResponding:a,onRegenerate:r?()=>r(b.id):void 0}:void 0;return jsxRuntime.jsx(_s,{message:b,assistantActions:C,onStreamingComplete:()=>l?.(b.id),streamIntervalMs:c,streamChunkSize:d,cardHooks:s},b.id)}),jsxRuntime.jsx("div",{ref:f})]}),g&&jsxRuntime.jsx("div",{className:"p-4 bg-gradient-to-t from-white via-white to-transparent dark:from-gray-900 dark:via-gray-900 pb-8 z-10",children:jsxRuntime.jsx(Hf,{onSend:t||(async()=>{}),onStop:o||(()=>{}),isResponding:a,placeholder:i})})]})};var Xo={};var kT={idle:"Idle",running:"Running",success:"Success",error:"Error",pending:"Pending"},_f=({title:e="AI Agent",description:t,headerActions:o,className:r,agentStatus:a,onHeaderPointerDown:n,showInput:i=false,...c})=>{let d=a??(c.isResponding?"running":"idle");return jsxRuntime.jsxs("div",{className:Je("relative flex h-full w-full",Xo.agentPanel,r),"data-status":d,children:[jsxRuntime.jsx("div",{className:Xo.colorHalo,"data-status":d,"aria-hidden":"true"}),jsxRuntime.jsxs("div",{className:Xo.marqueeBorder,"data-status":d,"aria-hidden":"true",children:[jsxRuntime.jsx("span",{className:Je(Xo.edge,Xo.top)}),jsxRuntime.jsx("span",{className:Je(Xo.edge,Xo.right)}),jsxRuntime.jsx("span",{className:Je(Xo.edge,Xo.bottom)}),jsxRuntime.jsx("span",{className:Je(Xo.edge,Xo.left)})]}),jsxRuntime.jsxs("div",{className:"relative z-10 flex h-full w-full flex-col rounded-xl border border-slate-200/70 bg-white shadow-sm overflow-hidden dark:border-slate-800 dark:bg-gray-950",children:[jsxRuntime.jsxs("div",{className:Je("flex items-center justify-between px-6 py-4 border-b border-gray-100 dark:border-gray-800 bg-white/50 dark:bg-gray-900/50 backdrop-blur-sm z-20",n&&"cursor-grab active:cursor-grabbing"),onPointerDown:n,children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:e}),t&&jsxRuntime.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:t})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("div",{className:"inline-flex items-center gap-1.5 px-2 py-1 rounded-full bg-gray-100/80 dark:bg-gray-800/70",children:[jsxRuntime.jsx("span",{className:Xo.statusDot,"data-status":d}),jsxRuntime.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wide text-gray-600 dark:text-gray-300",children:kT[d]})]}),o]})]}),jsxRuntime.jsx("div",{className:"flex-1 min-h-0 relative z-10",children:jsxRuntime.jsx(Uf,{...c,showInput:i})})]})]})};var jf=520,IT=88,PT=88,RT=24,js=640,Xf=(e,t,o)=>Math.min(Math.max(e,t),Math.max(t,o)),Jd=e=>typeof e=="number"?`${e}px`:e,MT=e=>e instanceof HTMLElement?!!e.closest('button,input,a,textarea,select,[role="button"],[contenteditable="true"]'):false,r8=({anchor:e,defaultAnchor:t="right",onAnchorChange:o,width:r=jf,top:a=IT,bottom:n=PT,inset:i=RT,zIndex:c=1300,shellClassName:d,shellStyle:l,className:s,onHeaderPointerDown:g,...f})=>{let p=Qt.useRef(null),b=Qt.useRef(null),[y,u]=Qt.useState(t),[C,m]=Qt.useState(0),[h,x]=Qt.useState(typeof r=="number"?r:jf),[w,E]=Qt.useState(0),[R,T]=Qt.useState(false),I=e??y;Qt.useEffect(()=>{let L=()=>m(window.innerWidth);return L(),window.addEventListener("resize",L),()=>window.removeEventListener("resize",L)},[]),Qt.useLayoutEffect(()=>{let L=()=>{let $=p.current?.getBoundingClientRect();$?.width?x($.width):typeof r=="number"&&x(r);};if(L(),!p.current||typeof ResizeObserver>"u")return;let Z=new ResizeObserver(L);return Z.observe(p.current),()=>Z.disconnect()},[r]);let k=Qt.useCallback(L=>{if(!C)return i;let Z=C<js?12:i,$=Math.max(Z,C-h-Z);return C<js||L==="left"?Z:L==="center"?Xf((C-h)/2,Z,$):$},[i,h,C]),S=Qt.useCallback(L=>["left","center","right"].reduce(($,q)=>{let H=Math.abs(L-k($));return Math.abs(L-k(q))<H?q:$},"right"),[k]),D=Qt.useCallback(L=>{e===void 0&&u(L),o?.(L);},[e,o]);Qt.useEffect(()=>{R||E(k(I));},[k,R,I]);let P=Qt.useCallback(L=>{g?.(L),!(L.defaultPrevented||MT(L.target))&&(L.preventDefault(),L.currentTarget.setPointerCapture(L.pointerId),b.current={pointerId:L.pointerId,startClientX:L.clientX,startX:w,currentX:w,captureElement:L.currentTarget},T(true));},[g,w]),M=Qt.useCallback(L=>{let Z=b.current;if(!Z||Z.pointerId!==L.pointerId)return;let $=C<js?12:i,q=Math.max($,C-h-$),H=Xf(Z.startX+L.clientX-Z.startClientX,$,q);Z.currentX=H,E(H);},[i,h,C]),B=Qt.useCallback(L=>{let Z=b.current;if(!Z||Z.pointerId!==L.pointerId)return;try{Z.captureElement.releasePointerCapture(L.pointerId);}catch{}let $=S(Z.currentX);b.current=null,T(false),D($),E(k($));},[k,D,S]),X=Qt.useMemo(()=>({position:"fixed",top:Jd(a),bottom:Jd(n),left:w,width:Jd(r),maxWidth:`calc(100vw - ${C<js?24:i*2}px)`,zIndex:c,pointerEvents:"auto",transition:R?"none":"left 180ms ease-out",touchAction:"none",...l}),[n,i,R,w,l,a,C,r,c]);return jsxRuntime.jsx("div",{ref:p,className:Je("orbcafe-floating-agent-panel min-w-0",d),"data-anchor":I,"data-dragging":R?"true":"false",style:X,onPointerMove:M,onPointerUp:B,onPointerCancel:B,children:jsxRuntime.jsx(_f,{...f,className:s,onHeaderPointerDown:P})})};var FT={"top-left":"bottom-right","top-right":"bottom-left","bottom-left":"top-right","bottom-right":"top-left"},u8=({messages:e,onSend:t,onRegenerate:o,isResponding:r=false,className:a,placeholder:n,title:i="Copilot",corner:c="bottom-right",onCollapse:d,onHeaderPointerDown:l,onPlusClick:s,onMicClick:g,streamIntervalMs:f,streamChunkSize:p,onMessageStreamingComplete:b,cardHooks:y})=>{let[u,C]=Qt.useState(""),[m,h]=Qt.useState(false),x=Qt.useRef(null),w=FT[c];Qt.useEffect(()=>{x.current?.scrollIntoView({behavior:"smooth"});},[e,r]);let E=Qt.useCallback(async()=>{let T=u.trim();!T||r||(C(""),await t(T));},[r,t,u]),R=Qt.useCallback(async T=>{T.key==="Enter"&&!m&&(T.preventDefault(),await E());},[E,m]);return jsxRuntime.jsxs("div",{className:Je("relative flex h-full w-full min-h-[460px] min-w-[340px] flex-col overflow-hidden rounded-3xl border border-gray-200 bg-white shadow-none dark:border-gray-800 dark:bg-gray-900",a),children:[d&&jsxRuntime.jsx("button",{onClick:d,className:Je("absolute z-20 flex h-10 w-10 items-center justify-center rounded-full transition-colors hover:bg-transparent dark:hover:bg-transparent",w==="top-left"&&"-left-2 -top-2",w==="top-right"&&"-right-2 -top-2",w==="bottom-left"&&"-bottom-2 -left-2",w==="bottom-right"&&"-bottom-2 -right-2"),type:"button","aria-label":"Collapse Copilot",children:jsxRuntime.jsx("span",{className:Je("block h-4 w-4 border-[#21BCFF]",w==="top-left"&&"rounded-tl-full border-l-[3px] border-t-[3px]",w==="top-right"&&"rounded-tr-full border-r-[3px] border-t-[3px]",w==="bottom-left"&&"rounded-bl-full border-b-[3px] border-l-[3px]",w==="bottom-right"&&"rounded-br-full border-b-[3px] border-r-[3px]")})}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between border-b border-gray-100 px-4 py-3 dark:border-gray-800",onPointerDown:l,children:[jsxRuntime.jsx("div",{className:"flex items-center",children:jsxRuntime.jsx("h3",{className:"text-base font-semibold tracking-tight text-gray-900 dark:text-gray-100",children:i})}),jsxRuntime.jsx("div",{})]}),jsxRuntime.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-3 space-y-5 scrollbar-thin scrollbar-thumb-gray-300 dark:scrollbar-thumb-gray-600",children:[e.map((T,I)=>{let k=T.type==="assistant"&&I===e.length-1,S=T.type==="assistant"?{isLatestAssistant:k,isResponding:r,onRegenerate:o?()=>o(T.id):void 0}:void 0;return jsxRuntime.jsx(_s,{message:T,assistantActions:S,onStreamingComplete:()=>b?.(T.id),streamIntervalMs:f,streamChunkSize:p,cardHooks:y},T.id)}),jsxRuntime.jsx("div",{ref:x})]}),jsxRuntime.jsx("div",{className:"border-t border-gray-100 px-3 py-3 dark:border-gray-800",children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2 rounded-xl border border-blue-300/80 bg-white px-2 py-1.5 dark:bg-gray-900",children:[jsxRuntime.jsx("button",{className:"flex h-8 w-8 items-center justify-center rounded-full text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200",onClick:s,type:"button","aria-label":"Add",children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4"})}),jsxRuntime.jsx("input",{className:"h-7 flex-1 border-none bg-transparent text-sm text-gray-800 outline-none placeholder:text-gray-400 dark:text-gray-100 dark:placeholder:text-gray-500",placeholder:n||"Ask Copilot...",value:u,onChange:T=>C(T.target.value),onCompositionStart:()=>h(true),onCompositionEnd:()=>h(false),onKeyDown:R,"aria-label":"Copilot input",spellCheck:false}),jsxRuntime.jsx("button",{className:"flex h-8 w-8 items-center justify-center rounded-full text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200",onClick:g,type:"button","aria-label":"Microphone",children:jsxRuntime.jsx(lucideReact.Mic,{className:"h-4 w-4"})})]})})]})};var LT=["#ff3860","#24e070","#3090ff"],NT=`
|
|
189
|
+
`),h={enableMath:n},m=0;for(;m<f.length;){let y=f[m],v=y.trim();if(!v){m+=1;continue}if(i&&tp(y)){if(v.startsWith("<think>")){let b=[],C=y;for(;;){let k=C.indexOf("<think>"),x=k>=0?C.slice(k+7):C,E=x.indexOf("</think>");if(E>=0){b.push(x.slice(0,E)),m+=1;break}if(b.push(x),m+=1,m>=f.length)break;C=f[m];}d.push(e(di,{content:b.join(`
|
|
190
|
+
`).trim()},`think-tag-${m}`));continue}m+=1;let S=[];for(;m<f.length&&f[m].trim()!==":::";)S.push(f[m]),m+=1;m<f.length&&f[m].trim()===":::"&&(m+=1),d.push(e(di,{content:S.join(`
|
|
191
|
+
`).trim()},`think-fence-${m}`));continue}if(pi(y)){let S=v.slice(3).trim().toLowerCase(),b=[];for(m+=1;m<f.length&&!pi(f[m]);)b.push(f[m]),m+=1;m<f.length&&pi(f[m])&&(m+=1);let C=b.join(`
|
|
192
|
+
`);if(a&&S==="mermaid"){d.push(e(Is,{code:C},`mermaid-${m}`));continue}if(n&&["math","latex","katex"].includes(S)){d.push(e(Gn,{expression:C,allowKatex:true},`math-fence-${m}`));continue}d.push(e($n,{code:C,language:S||"text",copyable:s,showLineNumbers:c,wrapLongLines:true},`code-${m}`));continue}if(n&&v.startsWith("$$")){let S=[];if(v.endsWith("$$")&&v!=="$$")S.push(v.slice(2,-2)),m+=1;else {let C=y.slice(y.indexOf("$$")+2);for(C.trim()&&S.push(C),m+=1;m<f.length;){let k=f[m],x=k.indexOf("$$");if(x>=0){S.push(k.slice(0,x)),m+=1;break}S.push(k),m+=1;}}d.push(e(Gn,{expression:S.join(`
|
|
193
|
+
`).trim(),allowKatex:true},`math-${m}`));continue}if(jd(y)){let S=Math.min(6,y.match(/^#{1,6}/)?.[0]?.length||1),b=y.replace(/^#{1,6}\s+/,""),C=S===1?"h5":S===2?"h6":"subtitle1";d.push(e(fo,{variant:C,sx:{mt:S===1?1.2:.8,mb:.5,fontWeight:700},children:Un(b,h,`h-${m}`)},`heading-${m}`)),m+=1;continue}if(Jd(y)){d.push(e(gc,{sx:{my:1.2}},`hr-${m}`)),m+=1;continue}if(ep(f,m)){let S=m+2;for(;S<f.length&&f[S].trim()&&f[S].includes("|");)S+=1;let b=f.slice(m,S).join(`
|
|
194
|
+
`),C=ci(b);if(C){d.push(e(Ms,{table:C},`table-${m}`)),m=S;continue}}if(Es(y)){let S=[];for(;m<f.length&&Es(f[m]);)S.push(f[m].replace(/^\s*>\s?/,"")),m+=1;d.push(e(Pr,{variant:"outlined",sx:{px:1,py:.8,my:.9,borderLeftWidth:3,borderLeftStyle:"solid",borderLeftColor:"primary.main",bgcolor:"action.hover"},children:e(fo,{variant:"body2",sx:{whiteSpace:"pre-wrap"},children:S.map((b,C)=>l(jt.Fragment,{children:[C>0&&e("br",{}),Un(b,h,`q-${m}-${C}`)]},`quote-line-${C}`))})},`quote-${m}`));continue}if(As(y)){let S=[];for(;m<f.length&&As(f[m]);)S.push(f[m].trim().replace(/^[-*+]\s+/,"")),m+=1;d.push(e(dt,{component:"ul",sx:{my:.8,pl:2.5},children:S.map((b,C)=>e(dt,{component:"li",sx:{mb:.45},children:e(fo,{variant:"body2",children:Un(b,h,`ul-${m}-${C}`)})},`ul-item-${C}`))},`ul-${m}`));continue}if(Ns(y)){let S=[];for(;m<f.length&&Ns(f[m]);)S.push(f[m].trim().replace(/^\d+\.\s+/,"")),m+=1;d.push(e(dt,{component:"ol",sx:{my:.8,pl:2.7},children:S.map((b,C)=>e(dt,{component:"li",sx:{mb:.45},children:e(fo,{variant:"body2",children:Un(b,h,`ol-${m}-${C}`)})},`ol-item-${C}`))},`ol-${m}`));continue}let g=[];for(;m<f.length;){let S=f[m],b=S.trim();if(!b||pi(S)||jd(S)||Jd(S)||As(S)||Ns(S)||Es(S)||ep(f,m)||i&&tp(S)||n&&b.startsWith("$$"))break;g.push(S),m+=1;}g.length>0?d.push(e(fo,{variant:"body2",sx:{my:.65,lineHeight:1.65},children:g.map((S,b)=>l(jt.Fragment,{children:[b>0&&e("br",{}),Un(S,h,`p-${m}-${b}`)]},`p-line-${b}`))},`p-${m}`)):m+=1;}return d},[p,n,a,i,s,c]);return e(dt,{className:r,sx:{"& strong":{fontWeight:700},"& em":{fontStyle:"italic"},"& a":{wordBreak:"break-all"}},children:u})};w();var iR=(t,o)=>e(_n,{markdown:t,...o});w();var op=({value:t,onChange:o,onSubmit:r,onVoiceInput:n,onClear:a,placeholder:i,statusText:s,loading:c=false,compact:p=false,showStatusText:u=true})=>l(ae,{spacing:.75,children:[l("div",{sx:{display:"flex",alignItems:"center",gap:1,px:1.2,py:p?.25:.4,borderRadius:999,border:"1px solid",borderColor:"divider",bgcolor:"background.paper",minHeight:p?38:44},children:[e(Rr,{sx:{fontSize:p?16:18,color:"text.secondary"}}),e(Cc,{fullWidth:true,value:t,onChange:d=>o(d.target.value),onKeyDown:d=>{d.key==="Enter"&&(d.preventDefault(),r());},placeholder:i,sx:{fontSize:p?"0.84rem":"0.9rem"}}),t&&a&&e(ie,{size:"small",onClick:a,children:e(ur,{sx:{fontSize:p?16:18}})}),n&&e(ie,{size:"small",onClick:n,children:e(jc,{sx:{fontSize:p?16:18}})}),e(ie,{size:"small",onClick:r,disabled:c||!t.trim(),children:e(rd,{sx:{fontSize:p?16:18}})})]}),u&&s&&e(L,{variant:"caption",color:"text.secondary",children:s})]});w();var rp=(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:l(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)]})},ui=({section:t,highlightQuery:o=""})=>{let r=t.columns||2;return l(Le,{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 l("div",{sx:{minWidth:0},children:[e(L,{variant:"caption",color:"text.secondary",sx:{display:"block"},children:rp(n.label,o)}),e(L,{component:"div",variant:"body2",sx:{mt:.2,fontWeight:500,wordBreak:"break-word"},children:a?rp(a,o):n.value})]},n.id)})})]})};var Ls=t=>t==null?"":typeof t=="string"||typeof t=="number"||typeof t=="boolean"?String(t):"",gi=t=>t.trim().toLowerCase(),rh=(t,o)=>{let r=[];return t.forEach(n=>{n.fields.forEach(a=>{let i=a.searchableText||Ls(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||Ls(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||Ls(i.value),c={source:"tab",sourceId:n.id,sourceSectionId:a.id,sourceTitle:`${n.label} / ${a.title}`,fieldId:i.id,fieldLabel:i.label,fieldValue:s};r.push({hit:c,text:gi(`${n.label} ${a.title} ${i.label} ${s}`)});});});}),r},np=({sections:t,tabs:o=[],defaultTabId:r,ai:n})=>{let{t:a}=ue(),[i,s]=jt.useState(""),[c,p]=jt.useState(r||o[0]?.id),[u,d]=jt.useState("idle"),[f,h]=jt.useState([]),[m,y]=jt.useState(""),[v,g]=jt.useState(""),[S,b]=jt.useState(false),C=jt.useMemo(()=>rh(t,o),[t,o]);jt.useEffect(()=>{if(o.length===0){p(void 0);return}o.some(N=>N.id===c)||p(r||o[0]?.id);},[o,c,r]);let k=jt.useCallback(()=>{d("idle"),h([]),y(""),g("");},[]),x=jt.useCallback(I=>{s(I),I.trim()||(d("idle"),h([]),y(""),g(""));},[]),E=jt.useCallback(I=>{let N=gi(I);return N?C.filter(A=>A.text.includes(N)).map(A=>A.hit):[]},[C]),M=jt.useCallback(async()=>{let I=i.trim();if(!I)return;b(true);let N=E(I);if(h(N),N.length>0){d("search"),g(""),y(a("detail.searchAi.matches",{count:N.length})),b(false);return}if(n?.enabled!==false&&n?.onSubmit){d("ai"),y(a("detail.searchAi.autoAiFallback"));try{let T=await n.onSubmit(I,{query:I,hits:N,activeTabId:c,sections:t,tabs:o});g(typeof T=="string"?T:"");}finally{b(false);}return}d("search"),g(""),y(a("detail.searchAi.noMatch")),b(false);},[i,E,a,n,c,t,o]);return {query:i,setQuery:x,activeTabId:c,setActiveTabId:p,searchMode:u,hits:f,statusText:m,aiResponse:v,searching:S,handleSubmit:M,clearResult:k}};w();var LR=({title:t,subtitle:o,sections:r,tabs:n=[],defaultTabId:a,table:i,ai:s,rightHeaderSlot:c,searchBarWidth:p=460,onClose:u,closeLabel:d="Close"})=>{let{t:f}=ue(),{query:h,setQuery:m,activeTabId:y,setActiveTabId:v,searchMode:g,hits:S,statusText:b,aiResponse:C,searching:k,handleSubmit:x,clearResult:E}=np({sections:r,tabs:n,defaultTabId:a,ai:s}),M=jt.useMemo(()=>n.find(A=>A.id===y)||n[0],[n,y]),I=jt.useCallback(A=>{let T=D=>{let R=document.getElementById(A);if(R){R.scrollIntoView({behavior:"smooth",block:"center"});return}D<4&&setTimeout(()=>T(D+1),60);};requestAnimationFrame(()=>T(0));},[]),N=jt.useCallback((A,T)=>{if(n.some(D=>D.id===A)){v(A),I(T?`detail-tab-${A}-section-${T}`:`detail-tab-${A}`);return}I(`detail-section-${A}`);},[n,v,I]);return l("div",{sx:{display:"flex",flexDirection:"column",gap:1.5,minHeight:"100%"},children:[l(ae,{direction:{xs:"column",md:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",md:"center"},spacing:1,children:[l("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})]}),l(ae,{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:p},maxWidth:"100%",minWidth:{md:320}},children:e(op,{value:h,onChange:m,onSubmit:x,onVoiceInput:s?.onVoiceInput,onClear:()=>{m(""),E();},placeholder:s?.placeholder||f("detail.searchAi.placeholder"),statusText:b,loading:k,compact:true,showStatusText:false})}),u&&e(st,{title:d,children:e(ie,{size:"small",onClick:u,children:e(Hc,{fontSize:"small"})})}),c]})]}),b&&e(L,{variant:"caption",color:"text.secondary",sx:{mt:-0.7},children:b}),g==="search"&&S.length>0&&l(Le,{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:S.length})}),e(ae,{spacing:.35,children:S.slice(0,8).map(A=>e("div",{component:"button",type:"button",onClick:()=>N(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:l(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&&l(Le,{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(_n,{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(ui,{section:A,highlightQuery:h})},A.id))}),n.length>0&&l(Le,{variant:"outlined",sx:{borderRadius:2,overflow:"hidden"},children:[e(Pc,{value:M?.id||false,onChange:(A,T)=>v(String(T)),variant:"scrollable",scrollButtons:"auto",sx:{borderBottom:"1px solid",borderColor:"divider"},children:n.map(A=>e(Ic,{value:A.id,label:A.label,sx:{textTransform:"none"}},A.id))}),l("div",{sx:{p:1.5},children:[e("div",{id:`detail-tab-${M?.id||""}`}),M?.description&&e(L,{variant:"body2",color:"text.secondary",sx:{mb:1.2},children:M.description}),M?.content?M.content:l(ae,{spacing:1.5,children:[(M?.sections||[]).map(A=>e("div",{id:`detail-tab-${M?.id}-section-${A.id}`,children:e(ui,{section:A,highlightQuery:h})},A.id)),M?.fields&&M.fields.length>0&&e(ui,{section:{id:`${M.id}-fields`,title:M.label,fields:M.fields,columns:2},highlightQuery:h})]})]})]}),i&&e(_o,{title:i.title||f("detail.table.title"),...i.tableProps,filterConfig:void 0,fitContainer:false})]})};w();var ip=({bucket:t,cardCount:o,highlighted:r=false,children:n,emptyLabel:a,maxHeight:i,sx:s})=>{let{t:c}=ue();return e(Le,{sx:[p=>{let u=t.accentColor??p.palette.primary.main;return {position:"relative",minWidth:0,borderRadius:"var(--orb-r-container)",overflow:"hidden",border:`1px solid ${Ee(u,r?.58:Ne()==="dark"?.28:.18)}`,bgcolor:Ee(p.palette.background.paper,Ne()==="dark"?.92:.97),boxShadow:r?`0 18px 40px ${Ee(u,.22)}`:`0 10px 28px ${Ee(p.palette.common.black,Ne()==="dark"?.18:.08)}`,transition:"border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease","&::before":{content:'""',display:"block",height:4,bgcolor:u}}},...Array.isArray(s)?s:s?[s]:[]],children:l(ae,{spacing:1.2,sx:{p:1.5},children:[l("div",{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:1},children:[l("div",{sx:{minWidth:0},children:[l("div",{sx:{display:"flex",alignItems:"center",gap:.8},children:[t.icon,e(L,{sx:{fontSize:"0.96rem",fontWeight:800},children:t.title})]}),t.description&&e(L,{sx:{mt:.45,fontSize:"0.76rem",color:"text.secondary",lineHeight:1.45},children:t.description})]}),l(ae,{direction:"row",spacing:.8,sx:{flexShrink:0},children:[e(Tt,{size:"small",label:o,sx:{fontWeight:700}}),typeof t.limit=="number"&&e(Tt,{size:"small",label:`${c("kanban.bucket.limit")} ${t.limit}`,color:o>t.limit?"warning":"default",variant:"outlined"})]})]}),r&&e(L,{sx:{fontSize:"0.72rem",color:"primary.main",fontWeight:700},children:c("kanban.bucket.dropHere")}),e("div",{sx:{minHeight:220,maxHeight:i,overflowY:i?"auto":"visible",pr:i?.4:0},children:o>0?n:e("div",{sx:p=>({minHeight:160,borderRadius:"var(--orb-r-container)",border:`1px dashed ${Ee(p.palette.divider,.9)}`,bgcolor:Ne()==="dark"?Ee(p.palette.common.white,.02):Ee(p.palette.primary.main,.03),display:"grid",placeItems:"center",px:2,textAlign:"center"}),children:e(L,{sx:{fontSize:"0.78rem",color:"text.secondary"},children:a??t.emptyLabel??c("kanban.empty")})})})]})})};w();var ah={success:"success",warning:"warning",info:"info",error:"error"},ih={critical:"error",high:"warning",medium:"info",low:"success"},sh=(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}},lh=t=>t?t.split(/\s+/).map(o=>o.charAt(0).toUpperCase()).slice(0,2).join(""):"NA",Fs=({card:t,bucket:o,dragging:r=false,overlay:n=false,onClick:a,sx:i})=>{let{t:s}=ue(),c=!!(a&&o),p=t.tone??(t.priority?ih[t.priority]:"default"),u=p==="default"?"primary":ah[p],d=o?{card:t,bucket:o}:void 0;return e(Le,{onClick:c?()=>d&&a?.(d):void 0,onKeyDown:c?f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),d&&a?.(d));}:void 0,role:c?"button":void 0,tabIndex:c?0:void 0,sx:[f=>{let h=p==="default"?f.palette.primary.main:f.palette[u].main;return {position:"relative",overflow:"hidden",p:1.4,borderRadius:"var(--orb-r-container)",border:`1px solid ${Ee(h,Ne()==="dark"?.42:.2)}`,bgcolor:Ee(f.palette.background.paper,Ne()==="dark"?.96:.98),boxShadow:n?`0 20px 45px ${Ee(f.palette.common.black,.24)}`:r?"none":`0 8px 24px ${Ee(f.palette.common.black,Ne()==="dark"?.18:.08)}`,transform:n?"rotate(1deg) scale(1.01)":"none",transition:"transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease",cursor:c?"pointer":"default",opacity:r?.5:1,"&::before":{content:'""',position:"absolute",inset:"0 auto 0 0",width:4,bgcolor:h},"&:hover":c?{transform:"translateY(-1px)",boxShadow:`0 14px 32px ${Ee(f.palette.common.black,Ne()==="dark"?.28:.12)}`}:void 0}},...Array.isArray(i)?i:i?[i]:[]],children:l(ae,{spacing:1.1,children:[l("div",{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:1},children:[l("div",{sx:{minWidth:0,flex:1},children:[(t.kicker||o?.title)&&e(L,{sx:{fontSize:"0.72rem",fontWeight:700,letterSpacing:.4,color:"text.secondary",textTransform:"uppercase"},children:t.kicker??o?.title}),e(L,{sx:{mt:.2,fontSize:"0.98rem",fontWeight:800,lineHeight:1.3},children:t.title})]}),t.priority&&e(Tt,{size:"small",color:u,label:sh(t.priority,s),variant:p==="default"?"outlined":"filled",sx:{height:22,fontWeight:700}})]}),t.summary&&e(L,{sx:{fontSize:"0.82rem",color:"text.secondary",lineHeight:1.5},children:t.summary}),t.metrics&&t.metrics.length>0&&e("div",{sx:{display:"grid",gridTemplateColumns:`repeat(${Math.min(t.metrics.length,3)}, minmax(0, 1fr))`,gap:.9},children:t.metrics.slice(0,3).map(f=>l("div",{sx:h=>({borderRadius:2,px:1,py:.8,bgcolor:Ne()==="dark"?Ee(h.palette.common.white,.05):Ee(h.palette.primary.main,.05)}),children:[e(L,{sx:{fontSize:"0.68rem",color:"text.secondary",textTransform:"uppercase",letterSpacing:.35},children:f.label}),e(L,{sx:{fontSize:"0.86rem",fontWeight:700},children:f.value})]},f.id))}),typeof t.progress=="number"&&l("div",{children:[l("div",{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:.5},children:[e(L,{sx:{fontSize:"0.72rem",color:"text.secondary"},children:s("kanban.card.progress")}),l(L,{sx:{fontSize:"0.72rem",fontWeight:700},children:[Math.round(t.progress),"%"]})]}),e(hc,{variant:"determinate",value:Math.max(0,Math.min(100,t.progress)),color:u,sx:{height:8,borderRadius:999}})]}),(t.tags?.length||t.assignee||t.dueDate||t.footer||c)&&l(ae,{spacing:.9,children:[t.tags&&t.tags.length>0&&e("div",{sx:{display:"flex",flexWrap:"wrap",gap:.75},children:t.tags.map(f=>e(Tt,{size:"small",label:f.label,color:f.color??"default",variant:"outlined"},f.id))}),l("div",{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[l("div",{sx:{display:"flex",alignItems:"center",gap:.8,minWidth:0},children:[t.assignee&&l(jsxRuntime.Fragment,{children:[e(Ma,{src:t.assignee.avatarSrc,sx:{width:28,height:28,fontSize:"0.75rem"},children:t.assignee.initials??lh(t.assignee.name)}),l("div",{sx:{minWidth:0},children:[e(L,{sx:{fontSize:"0.78rem",fontWeight:700,lineHeight:1.2},noWrap:true,children:t.assignee.name}),t.dueDate&&e(L,{sx:{fontSize:"0.7rem",color:"text.secondary",lineHeight:1.2},noWrap:true,children:t.dueDate})]})]}),!t.assignee&&t.dueDate&&e(L,{sx:{fontSize:"0.76rem",color:"text.secondary"},children:t.dueDate})]}),c&&e(L,{sx:{fontSize:"0.72rem",color:"primary.main",fontWeight:700,whiteSpace:"nowrap"},children:s("kanban.card.openDetail")})]}),t.footer]})]})})};var ch=(t,o)=>Number.isNaN(t)||t<0?0:t>o?o:t,sp=({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}})}},zo=(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}}},fi=(t,o)=>{let r=zo(t,o.cardId);if(!r)return t;let n=t.buckets.findIndex(u=>u.id===o.toBucketId);if(n<0)return t;let a=t.buckets.map(u=>({...u,cards:u.cards.map(d=>({...d}))})),i=a[r.bucketIndex],[s]=i.cards.splice(r.cardIndex,1);if(!s)return t;let c=a[n],p=ch(o.targetIndex??c.cards.length,c.cards.length);return c.cards.splice(p,0,{...s,bucketId:o.toBucketId}),{buckets:a.map(u=>({...u,cards:u.cards.map((d,f)=>({...d,bucketId:u.id,position:f}))}))}};w();var Os="kanban-card|",Bs="kanban-bucket|",pp=t=>`${Os}${t}`,Ch=t=>`${Bs}${t}`,hi=t=>t?.startsWith(Os)?t.slice(Os.length):void 0,dp=t=>t?.startsWith(Bs)?t.slice(Bs.length):void 0,Sh=({card:t,bucket:o,onCardClick:r})=>{let{setNodeRef:n,attributes:a,listeners:i,transform:s,transition:c,isDragging:p}=sortable.useSortable({id:pp(t.id)}),u={transform:s?`translate3d(${s.x}px, ${s.y}px, 0)`:void 0,transition:c,zIndex:p?2:1,touchAction:"none",cursor:p?"grabbing":"grab"};return e("div",{ref:n,style:u,...a,...i,children:e(Fs,{card:t,bucket:o,dragging:p,onClick:r})})},wh=({bucket:t,highlighted:o,bucketMaxHeight:r,emptyBucketLabel:n,onCardClick:a})=>{let{isOver:i,setNodeRef:s}=core.useDroppable({id:Ch(t.id)});return e("div",{ref:s,sx:{minWidth:0},children:e(ip,{bucket:t,cardCount:t.cards.length,highlighted:o||i,emptyLabel:n,maxHeight:r,children:e(sortable.SortableContext,{items:t.cards.map(c=>pp(c.id)),strategy:sortable.verticalListSortingStrategy,children:e(ae,{spacing:1,children:t.cards.map(c=>e(Sh,{card:c,bucket:t,onCardClick:a},c.id))})})})})},nM=({model:t,onCardMove:o,onCardClick:r,minBucketWidth:n=320,bucketMaxHeight:a,emptyBucketLabel:i,sx:s})=>{let[c,p]=jt.useState(null),[u,d]=jt.useState(),f=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:6}}),core.useSensor(core.TouchSensor,{activationConstraint:{delay:120,tolerance:8}})),h=jt.useMemo(()=>c?zo(t,c):void 0,[c,t]),m=jt.useCallback(()=>{p(null),d(void 0);},[]),y=jt.useCallback(b=>{if(!b)return;let C=hi(b);return C?zo(t,C)?.bucket.id:dp(b)},[t]),v=jt.useCallback(b=>{p(hi(String(b.active.id))??null);},[]),g=jt.useCallback(b=>{d(y(b.over?String(b.over.id):void 0));},[y]),S=jt.useCallback(b=>{let C=hi(String(b.active.id)),k=b.over?String(b.over.id):void 0;if(!C||!k){m();return}let x=zo(t,C);if(!x){m();return}let E=x.bucket.id,M=x.cardIndex,I=hi(k);if(I){let T=zo(t,I);if(!T){m();return}E=T.bucket.id,M=T.cardIndex;}else {let T=dp(k),D=t.buckets.find(R=>R.id===T);if(!T||!D){m();return}E=T,M=D.cards.length;}if(x.bucket.id===E&&x.cardIndex===M){m();return}let N=fi(t,{cardId:C,fromBucketId:x.bucket.id,toBucketId:E,targetIndex:M}),A=zo(N,C);A&&!(A.bucket.id===x.bucket.id&&A.cardIndex===x.cardIndex)&&o?.({cardId:C,fromBucketId:x.bucket.id,toBucketId:A.bucket.id,targetIndex:A.cardIndex,card:A.card,model:N}),m();},[t,o,m]);return l(core.DndContext,{sensors:f,collisionDetection:core.closestCorners,onDragStart:v,onDragOver:g,onDragEnd:S,onDragCancel:m,children:[e("div",{sx:[{display:"grid",gridAutoFlow:"column",gridAutoColumns:`minmax(${n}px, 1fr)`,gap:2,alignItems:"start",overflowX:"auto",pb:.5},...Array.isArray(s)?s:s?[s]:[]],children:t.buckets.map(b=>e(wh,{bucket:b,highlighted:b.id===u,bucketMaxHeight:a,emptyBucketLabel:i,onCardClick:r},b.id))}),e(core.DragOverlay,{children:h?e("div",{sx:{width:Math.max(n-24,260)},children:e(Fs,{card:h.card,bucket:h.bucket,overlay:true})}):null})]})};var Ph=({initialModel:t,initialBuckets:o,initialCards:r})=>t||sp({buckets:o??[],cards:r??[]}),cM=t=>{let{onCardMove:o,onCardClick:r}=t,[n,a]=jt.useState(()=>Ph(t)),i=jt.useCallback(d=>{a(f=>typeof d=="function"?d(f):d);},[]),s=jt.useCallback(d=>zo(n,d),[n]),c=jt.useCallback((d,f,h)=>{let m=zo(n,d);if(!m)return;let y=fi(n,{cardId:d,fromBucketId:m.bucket.id,toBucketId:f,targetIndex:h}),v=zo(y,d);if(!v||v.bucket.id===m.bucket.id&&v.cardIndex===m.cardIndex)return;a(y);let g={cardId:d,fromBucketId:m.bucket.id,toBucketId:v.bucket.id,targetIndex:v.cardIndex,card:v.card,model:y};return o?.(g),g},[n,o]),p=jt.useCallback((d,f)=>{a(h=>({buckets:h.buckets.map(m=>({...m,cards:m.cards.map(y=>y.id!==d?y:typeof f=="function"?f(y):{...y,...f})}))}));},[]),u=jt.useMemo(()=>({model:n,onCardMove:d=>{c(d.cardId,d.toBucketId,d.targetIndex);},onCardClick:r}),[n,c,r]);return {model:n,actions:{replaceModel:i,moveCard:c,updateCard:p,getCard:s},boardProps:u}};function ln({onTextUpdate:t,onComplete:o,onError:r,wsUrl:n="ws://localhost:8765",silenceThresholdMs:a=2e3,minVolumeRms:i=.015}){let[s,c]=jt.useState(false),p=jt.useRef(null),u=jt.useRef(null),d=jt.useRef(null),f=jt.useRef(null),h=jt.useRef(null),m=jt.useRef(0),y=jt.useRef(false),v=jt.useRef(false),g=jt.useCallback(()=>{p.current&&(p.current.close(),p.current=null),f.current&&(f.current.disconnect(),f.current=null),h.current&&(h.current.disconnect(),h.current=null),u.current&&(u.current.getTracks().forEach(C=>C.stop()),u.current=null),d.current&&(d.current.close(),d.current=null),v.current=false,c(false);},[]),S=jt.useCallback(()=>{y.current||(y.current=true,p.current?.readyState===WebSocket.OPEN&&p.current.send(JSON.stringify({type:"stop"})),setTimeout(g,500));},[g]),b=jt.useCallback(async()=>{if(!(s||v.current)){v.current=true,y.current=false,m.current=Date.now();try{let C=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,sampleRate:16e3,echoCancellation:!0,noiseSuppression:!0}});u.current=C;let k=new WebSocket(n);p.current=k,k.onopen=()=>{c(!0),v.current=!1;},k.onmessage=N=>{try{let A=JSON.parse(N.data);if(A.type==="recognition")A.is_final?o(A.text):t?.(A.text);else if(A.type==="error"){let T=A.message||"Voice recognition error";r?.(T),S();}}catch{r?.("Failed to parse voice message");}},k.onerror=()=>{r?.("Voice service connection failed"),g();},k.onclose=()=>{g();};let x=window.AudioContext||window.webkitAudioContext;if(!x)throw new Error("AudioContext is not supported in this browser");let E=new x({sampleRate:16e3});d.current=E;let M=E.createMediaStreamSource(C);h.current=M;let I=E.createScriptProcessor(4096,1,1);f.current=I,I.onaudioprocess=N=>{if(p.current?.readyState!==WebSocket.OPEN)return;let A=N.inputBuffer.getChannelData(0),T=0;for(let F=0;F<A.length;F+=1)T+=A[F]*A[F];if(Math.sqrt(T/A.length)>i)m.current=Date.now();else if(Date.now()-m.current>a&&!y.current){S();return}let R=new Int16Array(A.length);for(let F=0;F<A.length;F+=1){let z=Math.max(-1,Math.min(1,A[F]));R[F]=z<0?z*32768:z*32767;}p.current.send(R.buffer);},M.connect(I),I.connect(E.destination);}catch{r?.("Cannot access microphone"),g();}}},[g,s,i,o,r,t,a,S,n]);return jt.useEffect(()=>g,[g]),{isRecording:s,startRecording:b,stopRecording:S}}w();var Dh=["en","zh","fr","de","ja","ko"],mp={en:"EN",zh:"\u4E2D\u6587",fr:"FR",de:"DE",ja:"\u65E5\u672C\u8A9E",ko:"\uD55C\uAD6D\uC5B4"},Vs=({searchPlaceholder:t,onSearch:o,onSearchAdd:r,maxWidth:n=540,sx:a})=>{let{t:i}=ue(),[s,c]=jt.useState(""),p=jt.useCallback((g=s)=>{let S=g.trim();S&&(c(""),o?.(S));},[o,s]),u=g=>{g.preventDefault(),p();},{isRecording:d,startRecording:f,stopRecording:h}=ln({onTextUpdate:c,onComplete:g=>{c(g),p(g);},onError:g=>{console.error("Header voice input error:",g);}}),m=jt.useCallback(async()=>{if(d){h();return}await f();},[d,f,h]),y=t||i("header.searchPlaceholder"),v=s.trim().length>0;return e("form",{className:"orb-app-header-search",onSubmit:u,style:{width:"100%",maxWidth:typeof n=="number"?`${n}px`:n,...a},children:l("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:i("header.searchAddFeature"),children:e(Kt,{name:"add",size:16})})}),e("input",{className:"orb-inp orb-inp-dense orb-app-header-ai-input",value:s,onChange:g=>c(g.target.value),placeholder:y,style:{border:"none",background:"transparent",flex:1,minWidth:0}}),l("div",{className:"orb-inp-adornment orb-inp-adornment-end",children:[e(ie,{className:"orb-app-header-ai-action",size:"small",onClick:()=>{m();},tooltip:i(d?"header.searchStopVoice":"header.searchStartVoice"),sx:{color:d?"var(--orb-err)":void 0},children:e(Kt,{name:"microphone",size:16})}),e(ie,{className:"orb-app-header-ai-action",size:"small",type:"submit",disabled:!v,tooltip:i("header.searchSend"),children:e(Kt,{name:"paperPlane",size:16})})]})]})})},yi=({appTitle:t,logo:o,onToggleMode:r,locale:n,localeLabel:a,localeOptions:i,onLocaleChange:s,searchPlaceholder:c,showSearch:p=false,onSearch:u,onSearchAdd:d,user:f,onUserRefresh:h,onUserSetting:m,onUserLogout:y,userMenuItems:v,leftSlot:g,rightSlot:S})=>{let{t:b,locale:C}=ue(),k=$r(),x=n||C,E=a||mp[x],M=i||Dh,I=k==="dark"?e(Ol,{size:15}):e(Wl,{size:15}),N=b(k==="dark"?"header.theme.dark":"header.theme.light"),A=[...h?[{key:"refresh",label:b("header.menu.refresh"),icon:e(ma,{size:15}),onClick:h}]:[],...m?[{key:"settings",label:b("header.menu.setting"),icon:e(ga,{size:16}),onClick:m}]:[],...y?[{key:"logout",label:b("header.menu.logout"),icon:e(Ll,{size:16}),onClick:y}]:[]],T=v||A,D=M.map(R=>({label:mp[R],onClick:()=>{s?.(R),window.requestAnimationFrame(()=>{document.activeElement instanceof HTMLElement&&document.activeElement.blur();});},disabled:R===x}));return l("header",{className:"orb-app-header",children:[l("div",{className:"orb-app-header-brand",children:[g,o===null?null:o||e("div",{className:"orb-logo-slot",children:e("img",{src:"/orbcafe.png",alt:"ORBCAFE Logo",style:{width:44,height:44,display:"block",objectFit:"contain",flexShrink:0}})}),t&&e(L,{variant:"h4",sx:{fontWeight:700},children:t})]}),e("div",{className:"orb-app-header-center",children:p&&e(Vs,{searchPlaceholder:c,onSearch:u,onSearchAdd:d})}),l("div",{className:"orb-app-header-actions",children:[l("div",{className:"orb-app-header-utilities",children:[s?e(Yt,{triggerLabel:E,trigger:l("button",{type:"button",className:"orb-icon-btn orb-app-header-locale",children:[e(xn,{size:15}),e("span",{className:"orb-label",children:E})]}),items:D,align:"end"}):l("div",{className:"orb-app-header-locale","aria-label":E,children:[e(xn,{size:15}),e("span",{className:"orb-label",children:E})]}),e(ie,{className:"orb-app-header-theme",size:"small",onClick:r,tooltip:N,children:I})]}),f&&e("span",{className:"orb-app-header-divider","aria-hidden":"true"}),f&&e(Yt,{triggerLabel:f.name,trigger:l("button",{type:"button",className:"orb-app-header-user-trigger",children:[l("span",{className:"orb-app-header-user-copy",children:[e(L,{variant:"body2",className:"orb-app-header-user-name",children:f.name}),f.subtitle&&e(L,{variant:"caption",muted:true,className:"orb-app-header-user-subtitle",title:f.subtitle,children:f.subtitle})]}),e(Ur,{src:f.avatarSrc,alt:f.name,size:32,children:f.avatarText||f.name.slice(0,1).toUpperCase()})]}),items:T.map(R=>({label:R.label,onClick:R.onClick,disabled:R.disabled,icon:R.icon})),align:"end"}),S]})]})};var gp=({menuData:t=[],initialNavigationCollapsed:o=false,initialNavigationMode:r="fixed",enableNavigationPinning:n,navigationPinStorageKey:a,pinnedNavigationItemIds:i,defaultPinnedNavigationItemIds:s,onPinnedNavigationItemIdsChange:c,pinnedNavigationSectionTitle:p}={})=>{let{navigationIslandProps:u}=cc({initialCollapsed:o,initialDisplayMode:r,content:t,enablePinning:n,pinStorageKey:a,pinnedItemIds:i,defaultPinnedItemIds:s,onPinnedItemIdsChange:c,pinnedSectionTitle:p}),[d,f]=jt.useState(900);jt.useEffect(()=>{let m=()=>f(window.innerHeight);return m(),window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[]);let h=jt.useMemo(()=>Math.max(280,d-100),[d]);return {navigationIslandProps:u,navigationMaxHeight:h}};w();var No=12,hp=56,bp=234,yp="orbcafe:page-layout-locale",vp=["en","zh","fr","de","ja","ko"],Fh=t=>`orbcafe:page-layout:${t.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-")||"app"}:pinned-navigation-items`,vi=(t,o,r)=>Math.min(Math.max(t,o),Math.max(o,r)),Oh=t=>t instanceof HTMLElement?!!t.closest('button,input,a,textarea,select,[role="button"],[contenteditable="true"]'):false,NM=({appTitle:t,menuData:o=[],children:r,showNavigation:n=true,locale:a="en",localeLabel:i,localeOptions:s,onLocaleChange:c,user:p,onUserRefresh:u,onUserSetting:d,onUserLogout:f,userMenuItems:h,logo:m,searchPlaceholder:y,searchPlacement:v="hidden",floatingSearchSx:g,onSearch:S,onSearchAdd:b,rightHeaderSlot:C,leftHeaderSlot:k,contentSx:x,navigationVariant:E="classic",navigationMode:M,defaultNavigationMode:I="fixed",onNavigationModeChange:N,showNavigationModeToggle:A=true,enableNavigationPinning:T=true,navigationPinStorageKey:D,pinnedNavigationItemIds:R,defaultPinnedNavigationItemIds:F,onPinnedNavigationItemIdsChange:z,pinnedNavigationSectionTitle:Z})=>{let B="orbcafe:page-layout-mode",_="orbcafe:page-layout-navigation-mode",[V,K]=jt.useState("system"),[Y,G]=jt.useState("light"),[Q,ne]=jt.useState(false),[be,le]=jt.useState(a),[me,Ie]=jt.useState(false),[nt,Xe]=jt.useState(false),[De,Ge]=jt.useState(I),[xe,ye]=jt.useState({x:No,y:No}),[We,tt]=jt.useState("left"),[gt,ct]=jt.useState(false),ee=jt.useRef(null),Ve=jt.useRef(null),Te=c!==void 0,Ae=Te?a:be,pt=s?.join("|")??"",Qe=M!==void 0,vt=M??De,xt=vt==="floating",Vt=E==="v2"?ps:rc,_t=v==="header",J=V==="system"?Q?Y:"light":V;jt.useEffect(()=>{try{let Ze=window.localStorage.getItem(B);(Ze==="light"||Ze==="dark"||Ze==="system")&&K(Ze);}catch{}ne(true);let Ce=window.matchMedia("(prefers-color-scheme: dark)"),Oe=()=>{G(Ce.matches?"dark":"light");};return Oe(),Ce.addEventListener("change",Oe),()=>Ce.removeEventListener("change",Oe)},[]),jt.useEffect(()=>{if(Q)try{window.localStorage.setItem(B,V);}catch{}},[Q,V]),jt.useEffect(()=>{if(Te){Ie(true);return}try{let Ce=window.localStorage.getItem(yp),Oe=s??vp;Ce&&vp.includes(Ce)&&Oe.includes(Ce)&&le(Ce);}catch{}finally{Ie(true);}},[Te,pt]),jt.useEffect(()=>{if(!(Te||!me))try{window.localStorage.setItem(yp,Ae);}catch{}},[Ae,Te,me]),jt.useEffect(()=>{if(Qe){Xe(true);return}try{let Ce=window.localStorage.getItem(_);(Ce==="fixed"||Ce==="floating")&&Ge(Ce);}catch{}finally{Xe(true);}},[Qe]),jt.useEffect(()=>{if(nt)try{window.localStorage.setItem(_,vt);}catch{}},[vt,nt]),jt.useEffect(()=>{J==="dark"?(document.documentElement.classList.add("dark"),document.documentElement.style.colorScheme="dark"):(document.documentElement.classList.remove("dark"),document.documentElement.style.colorScheme="light");},[J]);let Je=jt.useCallback(Ce=>{Qe||Ge(Ce),N?.(Ce);},[Qe,N]),Be=jt.useCallback(Ce=>{Te||le(Ce),c?.(Ce);},[Te,c]),{navigationIslandProps:se,navigationMaxHeight:ge}=gp({menuData:o,initialNavigationCollapsed:false,initialNavigationMode:vt,enableNavigationPinning:T,navigationPinStorageKey:D??Fh(t),pinnedNavigationItemIds:R,defaultPinnedNavigationItemIds:F,onPinnedNavigationItemIdsChange:z,pinnedNavigationSectionTitle:Z}),U=se.collapsed,fe=jt.useCallback(Ce=>{let Oe=ee.current,Ze=Oe?.parentElement;if(!Oe||!Ze)return Ce;let Xt=Ze.getBoundingClientRect(),St=Oe.getBoundingClientRect(),Ct=No,et=No,Pt=Math.max(Ct,Xt.width-St.width-No),Bt=Math.max(et,Xt.height-St.height-No);return {x:vi(Ce.x,Ct,Pt),y:vi(Ce.y,et,Bt)}},[]),Pe=jt.useCallback(Ce=>{let Oe=ee.current,Ze=Oe?.parentElement;if(!Oe||!Ze)return Ce;let Xt=Ze.getBoundingClientRect(),St=Oe.getBoundingClientRect(),Ct=No,et=No,Pt=Math.max(Ct,Xt.width-St.width-No),Bt=Math.max(et,Xt.height-St.height-No),W={x:vi(Ce.x,Ct,Pt),y:vi(Ce.y,et,Bt)},te=[{distance:Math.abs(W.x-Ct),position:{x:Ct,y:W.y}},{distance:Math.abs(W.x-Pt),position:{x:Pt,y:W.y}},{distance:Math.abs(W.y-et),position:{x:W.x,y:et}},{distance:Math.abs(W.y-Bt),position:{x:W.x,y:Bt}}].reduce((Re,ke)=>ke.distance<Re.distance?ke:Re).position;return tt(te.x>=(Ct+Pt)/2?"right":"left"),te},[]),_e=jt.useMemo(()=>{if(!xt||gt)return xe.x;if(We==="right"){let Ze=ee.current?.parentElement?.getBoundingClientRect().width,Xt=U?hp:bp;return Ze?Math.max(No,Ze-Xt-No):U?xe.x:xe.x-(bp-hp)}return xe.x},[We,xe.x,gt,xt,U]),ft=jt.useCallback(Ce=>{if(!xt||!U||Oh(Ce.target))return;Ce.preventDefault(),Ce.currentTarget.setPointerCapture(Ce.pointerId);let Oe=fe({x:_e,y:xe.y});tt("left"),ye(Oe),Ve.current={pointerId:Ce.pointerId,startClientX:Ce.clientX,startClientY:Ce.clientY,startX:Oe.x,startY:Oe.y,currentX:Oe.x,currentY:Oe.y},ct(true);},[fe,_e,xe.y,xt,U]),ut=jt.useCallback(Ce=>{let Oe=Ve.current;if(!Oe||Oe.pointerId!==Ce.pointerId)return;let Ze=fe({x:Oe.startX+Ce.clientX-Oe.startClientX,y:Oe.startY+Ce.clientY-Oe.startClientY});Oe.currentX=Ze.x,Oe.currentY=Ze.y,ye(Ze);},[fe]),Ot=jt.useCallback(Ce=>{let Oe=Ve.current;if(!(!Oe||Oe.pointerId!==Ce.pointerId)){try{Ce.currentTarget.releasePointerCapture(Ce.pointerId);}catch{}Ve.current=null,ye(Pe({x:Oe.currentX,y:Oe.currentY})),ct(false);}},[Pe]);return jt.useEffect(()=>{if(!xt)return;let Ce=()=>{ye(Xt=>fe(Xt));},Oe=window.requestAnimationFrame(Ce),Ze=window.setTimeout(Ce,430);return ()=>{window.cancelAnimationFrame(Oe),window.clearTimeout(Ze);}},[fe,xt,U,ge]),e(Qi,{mode:V,children:e(Ca,{locale:Ae,children:l("div",{className:"orb-root",style:{minHeight:"100vh",width:"100%",display:"flex",flexDirection:"column",overflowX:"hidden",background:"var(--orb-canvas)"},children:[e(yi,{appTitle:t,logo:m,mode:V,onToggleMode:()=>K(Ce=>Ce==="system"?"dark":Ce==="dark"?"light":"system"),locale:Ae,localeLabel:Te||Ae===a?i:void 0,localeOptions:s,onLocaleChange:Be,user:p,onUserRefresh:u,onUserSetting:d,onUserLogout:f,userMenuItems:h,searchPlaceholder:y,showSearch:_t,onSearch:S,onSearchAdd:b,leftSlot:k,rightSlot:C}),v==="floating"&&e("div",{className:"orb-float-search",style:g,children:e(Vs,{searchPlaceholder:y,onSearch:S,onSearchAdd:b,maxWidth:"100%"})}),l("div",{style:{flex:1,minHeight:0,minWidth:0,display:"flex",overflowX:"hidden",position:"relative"},children:[n&&!xt&&e("div",{style:{paddingTop:12,paddingBottom:12,paddingLeft:12,paddingRight:U?4:12,display:"flex",alignItems:"flex-start",flexShrink:0},children:e(Vt,{...se,maxHeight:ge,colorMode:J,displayMode:vt,onDisplayModeChange:Je,showDisplayModeToggle:A&&U})}),n&&xt&&e("div",{ref:ee,onPointerDown:ft,onPointerMove:ut,onPointerUp:Ot,onPointerCancel:Ot,style:{position:"absolute",top:xe.y,left:_e,zIndex:1205,display:"flex",alignItems:"flex-start",cursor:U?gt?"grabbing":"grab":"default",touchAction:U?"none":"auto",userSelect:gt?"none":void 0,transition:gt?"none":"left 180ms ease-out, top 180ms ease-out"},children:e(Vt,{...se,maxHeight:ge,colorMode:J,displayMode:vt,onDisplayModeChange:Je,showDisplayModeToggle:A&&U})}),e("div",{style:{flex:1,minWidth:0,minHeight:0,overflow:"auto",paddingTop:12,paddingBottom:12,paddingRight:12,paddingLeft:n&&!xt&&U?4:12,...x},children:r})]})]})})})};var xi="(blank)",xp="Result",Cp="Grand Total",Sp={sum:"Sum",count:"Count",avg:"Average",min:"Min",max:"Max"},wp=["sum","count","avg","min","max"];var kp=["palette","rows","columns","filters","values"];var Tp=t=>kp.includes(t),Pp=t=>t==="rows"||t==="columns"||t==="filters",Ci=t=>{let o=t.split("|");return o.length===2&&o[0]==="container"&&Tp(o[1])?{kind:"container",zone:o[1]}:o.length===3&&o[0]==="item"&&Tp(o[1])&&o[2]?{kind:"item",zone:o[1],key:o[2]}:null},rr=t=>t==null||t===""?xi:t instanceof Date?t.toISOString().slice(0,10):String(t),Er=t=>JSON.stringify(t),Ip=(t,o)=>{let r=t.join(""),n=o.join("");return r.localeCompare(n,void 0,{sensitivity:"base"})},Bh=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},cn=(t,o,r)=>{if(r==="count")return t.length;let n=t.map(a=>Bh(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)},io=(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},nr=(t,o)=>t.length!==o.length?false:t.every((r,n)=>r===o[n]),Rp=(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 nr(i,s)})},Si=(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}),Hs=t=>!t?.aggregations||t.aggregations.length===0?wp:t.aggregations,ho=(t,o)=>{let r=Hs(o);return t&&r.includes(t)?t:o?.type==="number"&&r.includes("sum")?"sum":r.includes("count")?"count":r[0]},qn=(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})};w();var Dp=({options:t,selectedValues:o,onChange:r,minWidth:n=96})=>{let{t:a}=ue(),[i,s]=jt.useState(""),[c,p]=jt.useState(null),u=jt.useMemo(()=>{let m=i.trim().toLowerCase();return m?t.filter(y=>y.toLowerCase().includes(m)):t},[t,i]),d=t.length>0&&o.length===t.length,f=t.length===0?a("pivot.filter.na"):o.length===0?a("common.none"):d?a("common.all"):`${o.length}/${t.length}`,h=m=>{r(o.includes(m)?o.filter(y=>y!==m):[...o,m]);};return l("div",{sx:{minWidth:n},onClick:m=>m.stopPropagation(),onMouseDown:m=>m.stopPropagation(),children:[e(we,{variant:"outlined",size:"small",onClick:m=>p(m.currentTarget),sx:{minWidth:n,height:26,px:1,py:.35,fontSize:"0.72rem",justifyContent:"space-between"},children:f}),e(Yt,{anchorEl:c,open:!!c,onClose:()=>p(null),PaperProps:{sx:{width:Math.max(n,220),maxHeight:320,overflowY:"auto",p:.5}},children:l("div",{onClick:m=>m.stopPropagation(),sx:{display:"grid",gap:.4},children:[e(He,{size:"small",placeholder:`${a("common.search")}...`,fullWidth:true,value:i,onChange:m=>s(m.target.value),onKeyDown:m=>m.stopPropagation(),onClick:m=>m.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(we,{variant:"text",size:"small",onClick:m=>{m.preventDefault(),m.stopPropagation(),r(d?[]:t);},sx:{minWidth:"auto",px:0,py:.2,fontSize:"0.76rem",fontWeight:700,textTransform:"none"},children:a(d?"pivot.filter.deselectAll":"pivot.filter.selectAll")})}),u.length===0&&e("div",{className:"orb-menu-item","aria-disabled":"true",sx:{fontSize:"0.75rem"},children:a("pivot.filter.noResults")}),u.map(m=>{let y=o.includes(m);return l("div",{role:"option","aria-selected":y,tabIndex:0,className:`orb-menu-item ${y?"orb-selected":""}`,onClick:()=>h(m),onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),h(m));},sx:{display:"flex",alignItems:"center",fontSize:"0.75rem",py:.4},children:[e(Mt,{size:"small",checked:y,inputProps:{tabIndex:-1},sx:{p:.5,mr:.5,pointerEvents:"none"}}),e("span",{children:m})]},m)})]})})]})};w();var Ws=({label:t,subtitle:o,isDragging:r,dragRef:n,listeners:a,attributes:i,style:s})=>e(Le,{ref:n,...a,...i,sx:{p:1,borderRadius:"var(--orb-r-container)",border:"1px solid",borderColor:"divider",bgcolor:Ne()==="dark"?"#111111":"background.paper",touchAction:"none"},style:{...s,opacity:r?.3:1,cursor:r?"grabbing":"grab"},children:l("div",{sx:{display:"flex",alignItems:"center",gap:.8},children:[e("div",{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",p:.3,borderRadius:1,bgcolor:Ne()==="dark"?"rgba(255,255,255,0.12)":"rgba(17, 24, 39, 0.08)"},children:e(qr,{sx:{fontSize:16,color:"text.secondary"}})}),l("div",{sx:{minWidth:0},children:[e(L,{sx:{fontSize:"0.82rem",fontWeight:700,lineHeight:1.2},children:t}),o&&e(L,{sx:{fontSize:"0.72rem",color:"text.secondary",lineHeight:1.2},children:o})]})]})}),Ap=({id:t,label:o,subtitle:r})=>{let{setNodeRef:n,listeners:a,attributes:i,isDragging:s}=core.useDraggable({id:t});return e(Ws,{label:o,subtitle:r,isDragging:s,dragRef:n,listeners:a,attributes:i})};w();var dn=({zone:t,title:o,hint:r,icon:n,children:a,itemCount:i,onClear:s})=>{let c=`container|${t}`,{isOver:p,setNodeRef:u}=core.useDroppable({id:c}),{t:d}=ue();return l(Le,{ref:u,sx:f=>({p:1.1,borderRadius:"var(--orb-r-container)",border:"1px dashed",borderColor:p?"primary.main":f.palette.divider,bgcolor:p?Ne()==="dark"?"rgba(25, 118, 210, 0.16)":"rgba(47, 91, 255, 0.06)":Ne()==="dark"?"rgba(255,255,255,0.02)":"rgba(245, 248, 255, 0.86)",transition:"all 120ms ease",minHeight:120,display:"flex",flexDirection:"column"}),children:[l("div",{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[l("div",{sx:{display:"flex",alignItems:"center",gap:.8},children:[n,e(L,{sx:{fontSize:"0.79rem",fontWeight:800,letterSpacing:.2},children:o}),l(L,{sx:{fontSize:"0.72rem",color:"text.secondary"},children:["(",i,")"]})]}),i>0&&s&&e(st,{title:d("pivot.clearArea"),children:e(ie,{size:"small",onClick:s,sx:{p:.25},children:e(Yc,{sx:{fontSize:16}})})})]}),e(L,{sx:{mt:.5,mb:.9,fontSize:"0.7rem",color:"text.secondary"},children:r}),e("div",{sx:{flex:1},children:a})]})};w();var Np={xs:1.2,md:1.6},pn=({title:t,subtitle:o,collapsed:r,onToggleCollapse:n,expandAriaLabel:a,collapseAriaLabel:i,children:s,bodySx:c,unmountOnExit:p=false,headerActions:u})=>l(Le,{sx:d=>({borderRadius:"var(--orb-r-container)",border:`1px solid ${d.palette.divider}`,overflow:"hidden",bgcolor:Ee(d.palette.background.paper,.95)}),children:[l("div",{sx:d=>({px:Np,py:1,display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,borderBottom:r?"none":`1px solid ${d.palette.divider}`}),children:[l("div",{sx:{minWidth:0,flex:1},children:[e(L,{sx:{fontSize:"0.9rem",fontWeight:800},children:t}),e(L,{sx:{fontSize:"0.74rem",color:"text.secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:o})]}),l("div",{sx:{display:"flex",alignItems:"center",gap:.75,flexShrink:0},children:[u,e(ie,{size:"small","aria-label":r?a:i,onClick:n,sx:d=>({border:`1px solid ${d.palette.divider}`,bgcolor:Ee(d.palette.background.paper,.88),width:28,height:28,borderRadius:999,flexShrink:0,"&:hover":{bgcolor:Ne()==="dark"?Ee(d.palette.primary.main,.18):Ee(d.palette.primary.main,.08)}}),children:e(Oa,{sx:{fontSize:16,transition:"transform 220ms cubic-bezier(0.2, 0, 0, 1)",transform:r?"rotate(180deg)":"rotate(0deg)"}})})]})]}),e(Kr,{in:!r,timeout:260,easing:"cubic-bezier(0.2, 0, 0, 1)",unmountOnExit:p,children:e("div",{sx:[{px:Np,py:{xs:1.2,md:1.6}},...Array.isArray(c)?c:c?[c]:[]],children:s})})]});w();var wi=({label:t,caption:o,onRemove:r,trailing:n,isDragging:a,dragRef:i,listeners:s,attributes:c,style:p})=>e(Le,{ref:i,style:p,sx:{p:1,borderRadius:"var(--orb-r-container)",border:"1px solid",borderColor:"divider",bgcolor:Ne()==="dark"?"#111111":"background.paper",touchAction:"none",opacity:a?0:1},children:l("div",{sx:{display:"flex",alignItems:"center",gap:.8},children:[e("div",{...c,...s,sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",p:.25,borderRadius:1,bgcolor:Ne()==="dark"?"rgba(255,255,255,0.12)":"rgba(17, 24, 39, 0.08)",cursor:"grab"},children:e(qr,{sx:{fontSize:15,color:"text.secondary"}})}),l("div",{sx:{minWidth:0,flex:1},children:[e(L,{sx:{fontSize:"0.8rem",fontWeight:700,lineHeight:1.2},children:t}),o&&e(L,{sx:{fontSize:"0.7rem",color:"text.secondary",lineHeight:1.2},children:o})]}),n,r&&e(ie,{size:"small",onClick:u=>{u.stopPropagation(),r();},sx:{p:.2},children:e(ur,{sx:{fontSize:16}})})]})}),Xn=({id:t,label:o,caption:r,onRemove:n,trailing:a})=>{let{setNodeRef:i,attributes:s,listeners:c,transform:p,transition:u,isDragging:d}=sortable.useSortable({id:t}),f={transform:p?`translate3d(${p.x}px, ${p.y}px, 0)`:void 0,transition:u,zIndex:d?999:"auto"};return e(wi,{label:o,caption:r,onRemove:n,trailing:a,isDragging:d,dragRef:i,listeners:c,attributes:s,style:f})};w();var Pi={rows:e(dd,{fontSize:"small"}),columns:e(Yr,{fontSize:"small"}),filters:e(_c,{fontSize:"small"}),values:e(Zr,{fontSize:"small"})},Ep=({isConfiguratorCollapsed:t,onToggleCollapse:o,availableFields:r,fieldMap:n,filterFields:a,columnFields:i,rowFields:s,valueFields:c,clearZone:p,removeFieldFromZone:u,getFilterSelectionSummary:d,renderDimensionFilterSelect:f,renderAggregationSelect:h,getAggregationLabel:m})=>{let{t:y}=ue(),v=[`${y("pivot.zone.rows")} ${s.length}`,`${y("pivot.zone.columns")} ${i.length}`,`${y("pivot.zone.filters")} ${a.length}`,`${y("pivot.zone.values")} ${c.length}`].join(" \xB7 ");return e(pn,{title:y("pivot.config.title"),subtitle:v,collapsed:t,onToggleCollapse:o,expandAriaLabel:y("pivot.collapse.ariaExpand"),collapseAriaLabel:y("pivot.collapse.ariaCollapse"),unmountOnExit:true,children:l("div",{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",lg:"260px 1fr"},gap:2},children:[e(dn,{zone:"palette",title:y("pivot.fieldList"),hint:y("pivot.availableDimensions"),itemCount:r.length,icon:e(qr,{sx:{fontSize:16,color:"text.secondary"}}),children:l(ae,{spacing:.8,sx:{maxHeight:400,overflowY:"auto",pr:.5},children:[r.length===0&&e(L,{sx:{fontSize:"0.74rem",color:"text.secondary",py:1},children:y("pivot.allFieldsInUse")}),r.map(g=>e(Ap,{id:`item|palette|${g.id}`,label:g.label,subtitle:g.type??"string"},g.id))]})}),l(ae,{spacing:2,children:[l("div",{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[e(dn,{zone:"filters",title:y("pivot.zone.filters"),hint:y("pivot.hint.filters"),icon:Pi.filters,itemCount:a.length,onClear:()=>p("filters"),children:e(sortable.SortableContext,{items:a.map(g=>`item|filters|${g}`),strategy:sortable.verticalListSortingStrategy,children:e(ae,{spacing:.7,children:a.map(g=>e(Xn,{id:`item|filters|${g}`,label:n.get(g)?.label??g,caption:d(g),trailing:f(g),onRemove:()=>u("filters",g)},g))})})}),e(dn,{zone:"columns",title:y("pivot.zone.columns"),hint:y("pivot.hint.columns"),icon:Pi.columns,itemCount:i.length,onClear:()=>p("columns"),children:e(sortable.SortableContext,{items:i.map(g=>`item|columns|${g}`),strategy:sortable.verticalListSortingStrategy,children:e(ae,{spacing:.7,children:i.map(g=>e(Xn,{id:`item|columns|${g}`,label:n.get(g)?.label??g,caption:`${n.get(g)?.type??"dimension"} \u2022 ${d(g)}`,trailing:f(g),onRemove:()=>u("columns",g)},g))})})})]}),l("div",{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[e(dn,{zone:"rows",title:y("pivot.zone.rows"),hint:y("pivot.hint.rows"),icon:Pi.rows,itemCount:s.length,onClear:()=>p("rows"),children:e(sortable.SortableContext,{items:s.map(g=>`item|rows|${g}`),strategy:sortable.verticalListSortingStrategy,children:e(ae,{spacing:.7,children:s.map(g=>e(Xn,{id:`item|rows|${g}`,label:n.get(g)?.label??g,caption:`${n.get(g)?.type??"dimension"} \u2022 ${d(g)}`,trailing:f(g),onRemove:()=>u("rows",g)},g))})})}),e(dn,{zone:"values",title:y("pivot.zone.values"),hint:y("pivot.hint.values"),icon:Pi.values,itemCount:c.length,onClear:()=>p("values"),children:e(sortable.SortableContext,{items:c.map(g=>`item|values|${g.tokenId}`),strategy:sortable.verticalListSortingStrategy,children:e(ae,{spacing:.7,children:c.map(g=>{let S=n.get(g.fieldId)?.label??g.fieldId,b=`${m(g.aggregation)}(${S})`;return e(Xn,{id:`item|values|${g.tokenId}`,label:S,caption:b,trailing:h(g),onRemove:()=>u("values",g.tokenId)},g.tokenId)})})})})]})]})]})})};w();var Lp=t=>t.toLocaleString(void 0,{maximumFractionDigits:1}),Fp=({data:t,primaryLabel:o,secondaryLabel:r,formatPrimaryValue:n,formatSecondaryValue:a})=>{let i=ao();if(t.length===0)return null;let s=720,c=250,p={top:20,right:24,bottom:40,left:52},u=r?t.map(g=>g.primaryValue):t.map((g,S)=>S+1),d=r?t.map(g=>g.secondaryValue??0):t.map(g=>g.primaryValue),f=Math.max(...u,1),h=Math.max(...d,1),m=s-p.left-p.right,y=c-p.top-p.bottom,v=t.map((g,S)=>{let b=r?g.primaryValue:S+1,C=r?g.secondaryValue??0:g.primaryValue,k=p.left+b/f*m,x=c-p.bottom-C/h*y;return {...g,x:k,y:x,rawX:b,rawY:C}});return l("div",{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[e("div",{sx:{overflowX:"auto"},children:l("div",{component:"svg",viewBox:`0 0 ${s} ${c}`,sx:{width:"100%",minWidth:s,height:c},children:[e("line",{x1:p.left,y1:c-p.bottom,x2:s-p.right,y2:c-p.bottom,stroke:Do(i.palette.text.secondary,.35)}),e("line",{x1:p.left,y1:p.top,x2:p.left,y2:c-p.bottom,stroke:Do(i.palette.text.secondary,.35)}),v.map(g=>l("g",{children:[e("circle",{cx:g.x,cy:g.y,r:7,fill:Do(i.palette.primary.main,.18)}),e("circle",{cx:g.x,cy:g.y,r:4.5,fill:i.palette.primary.main,children:l("title",{children:[g.name,`
|
|
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,p.top+8),textAnchor:"middle",fontSize:"10",fill:i.palette.text.secondary,children:g.name})]},g.name)),e("text",{x:s/2,y:c-10,textAnchor:"middle",fontSize:"11",fill:i.palette.text.secondary,children:r?o:"Index"}),e("text",{x:16,y:c/2,textAnchor:"middle",transform:`rotate(-90 16 ${c/2})`,fontSize:"11",fill:i.palette.text.secondary,children:r??o}),e("text",{x:p.left,y:p.top-4,fontSize:"10",fill:i.palette.text.secondary,children:Lp(h)}),e("text",{x:s-p.right,y:c-p.bottom+16,textAnchor:"end",fontSize:"10",fill:i.palette.text.secondary,children:Lp(f)})]})}),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=>l("div",{sx:S=>({borderRadius:"var(--orb-r-container)",px:1.25,py:1,border:`1px solid ${Do(S.palette.divider,.7)}`,bgcolor:Do(S.palette.background.default,.35)}),children:[e(L,{sx:{fontSize:"0.78rem",fontWeight:700},noWrap:true,title:g.name,children:g.name}),l(L,{sx:{fontSize:"0.72rem",color:"text.secondary"},children:[o,": ",n(g.primaryValue)]}),r&&l(L,{sx:{fontSize:"0.72rem",color:"text.secondary"},children:[r,": ",(a??n)(g.secondaryValue??0)]})]},g.name))})]})};w();var $s=t=>Math.max(...t,1),Op=({data:t,chartType:o,primaryLabel:r,secondaryLabel:n,formatPrimaryValue:a,formatSecondaryValue:i})=>{let s=ao(),c=s.palette.primary.main,p=s.palette.warning.main;if(t.length===0)return null;if(o==="bar-horizontal"){let b=$s(t.flatMap(C=>[C.primaryValue,C.secondaryValue??0]));return e(ae,{spacing:1.1,children:t.map(C=>l("div",{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",md:"160px 1fr 128px"},gap:1.25,alignItems:"center"},children:[e(L,{sx:{fontSize:"0.78rem",fontWeight:700},noWrap:true,title:C.name,children:C.name}),l(ae,{spacing:.65,children:[e("div",{sx:{height:10,borderRadius:999,overflow:"hidden",bgcolor:Do(s.palette.action.active,.08)},children:e("div",{sx:{width:`${C.primaryValue/b*100}%`,height:"100%",bgcolor:c}})}),n&&e("div",{sx:{height:8,borderRadius:999,overflow:"hidden",bgcolor:Do(s.palette.action.active,.08)},children:e("div",{sx:{width:`${(C.secondaryValue??0)/b*100}%`,height:"100%",bgcolor:p}})})]}),l("div",{sx:{minWidth:0},children:[e(L,{sx:{fontSize:"0.72rem",textAlign:{xs:"left",md:"right"},fontWeight:700},children:a(C.primaryValue)}),n&&e(L,{sx:{fontSize:"0.72rem",textAlign:{xs:"left",md:"right"},color:"text.secondary"},children:(i??a)(C.secondaryValue??0)})]})]},C.name))})}if(o==="bar-vertical"){let b=$s(t.flatMap(k=>[k.primaryValue,k.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(k=>l("div",{sx:{minWidth:0},children:[l("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(k.primaryValue/b*188,8)}px`,borderRadius:"10px 10px 2px 2px",bgcolor:c},title:`${r}: ${a(k.primaryValue)}`}),n&&e("div",{sx:{width:16,minHeight:8,height:`${Math.max((k.secondaryValue??0)/b*188,8)}px`,borderRadius:"10px 10px 2px 2px",bgcolor:p},title:`${n}: ${(i??a)(k.secondaryValue??0)}`})]}),e(L,{sx:{fontSize:"0.76rem",fontWeight:700},noWrap:true,title:k.name,children:k.name}),e(L,{sx:{fontSize:"0.7rem",color:"text.secondary"},noWrap:true,title:a(k.primaryValue),children:a(k.primaryValue)}),n&&e(L,{sx:{fontSize:"0.7rem",color:"text.secondary"},noWrap:true,title:(i??a)(k.secondaryValue??0),children:(i??a)(k.secondaryValue??0)})]},k.name))})})}let u=Math.max(680,t.length*74),d=240,f={top:20,right:18,bottom:36,left:18},h=$s(t.flatMap(b=>[b.primaryValue,b.secondaryValue??0])),m=u-f.left-f.right,y=d-f.top-f.bottom,v=b=>t.map((C,k)=>{let x=f.left+k*m/Math.max(t.length-1,1),E=d-f.bottom-b(C)/h*y;return {x,y:E,item:C}}),g=v(b=>b.primaryValue),S=n?v(b=>b.secondaryValue??0):[];return l("div",{sx:{display:"flex",flexDirection:"column",gap:1.1},children:[e("div",{sx:{overflowX:"auto"},children:l("div",{component:"svg",viewBox:`0 0 ${u} ${d}`,sx:{width:"100%",minWidth:u,height:d},children:[e("line",{x1:f.left,y1:d-f.bottom,x2:u-f.right,y2:d-f.bottom,stroke:Do(s.palette.text.secondary,.35)}),e("polyline",{fill:"none",stroke:c,strokeWidth:3,points:g.map(b=>`${b.x},${b.y}`).join(" ")}),g.map(b=>e("circle",{cx:b.x,cy:b.y,r:4,fill:c,children:l("title",{children:[b.item.name,`
|
|
197
|
+
`,r,": ",a(b.item.primaryValue)]})},`primary-${b.item.name}`)),n&&l(jsxRuntime.Fragment,{children:[e("polyline",{fill:"none",stroke:p,strokeWidth:2.5,strokeDasharray:"5 5",points:S.map(b=>`${b.x},${b.y}`).join(" ")}),S.map(b=>e("circle",{cx:b.x,cy:b.y,r:3.5,fill:p,children:l("title",{children:[b.item.name,`
|
|
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=>l("div",{sx:C=>({borderRadius:"var(--orb-r-container)",px:1.1,py:.9,border:`1px solid ${Do(C.palette.divider,.7)}`,bgcolor:Do(C.palette.background.default,.35)}),children:[e(L,{sx:{fontSize:"0.76rem",fontWeight:700},noWrap:true,title:b.name,children:b.name}),e(L,{sx:{fontSize:"0.71rem",color:"text.secondary"},children:a(b.primaryValue)}),n&&e(L,{sx:{fontSize:"0.71rem",color:"text.secondary"},children:(i??a)(b.secondaryValue??0)})]},b.name))})]})};var Bp=(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},zp=(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}}),Vp=({rows:t,dimensionFieldId:o,primaryValue:r,secondaryValue:n})=>{if(!o)return [];let a=new Map;return t.forEach(i=>{let s=rr(i[o]),c=a.get(s);if(c){c.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:cn(s,r.fieldId,r.aggregation),secondaryValue:n?cn(s,n.fieldId,n.aggregation):void 0}))};w();var Hp=({rows:t,fieldMap:o,rowFields:r,columnFields:n,valueFields:a,chartDimensionFieldId:i,chartPrimaryValueFieldId:s,chartSecondaryValueFieldId:c,chartType:p,isCollapsed:u,onChartDimensionFieldIdChange:d,onChartPrimaryValueFieldIdChange:f,onChartSecondaryValueFieldIdChange:h,onChartTypeChange:m,onToggleCollapse:y,getAggregationLabel:v})=>{let{t:g}=ue(),S=jt.useMemo(()=>Bp(r,n,o),[n,o,r]),b=jt.useMemo(()=>zp(a,o,v),[o,v,a]),C=b.find(T=>T.fieldId===s)??b[0],k=b.find(T=>T.fieldId===c&&T.fieldId!==C?.fieldId)??null,x=S.find(T=>T.fieldId===i)??S[0],E=x&&C?g("pivot.chart.subtitleReady",{dimension:x.label,measure:k?`${C.label} / ${k.label}`:C.label}):g("pivot.chart.subtitle"),M=jt.useMemo(()=>!x||!C?[]:Vp({rows:t,dimensionFieldId:x.fieldId,primaryValue:C.item,secondaryValue:k?.item}),[C,t,k,x]),I=T=>C?qn(T,C.item,o):T.toLocaleString(),N=T=>k?qn(T,k.item,o):T.toLocaleString(),A=S.length>1||b.length>1;return l(pn,{title:g("pivot.chart.title"),subtitle:E,collapsed:u,onToggleCollapse:y,expandAriaLabel:g("pivot.chart.collapse.ariaExpand"),collapseAriaLabel:g("pivot.chart.collapse.ariaCollapse"),bodySx:{display:"flex",flexDirection:"column",gap:1.1},children:[A&&l("div",{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(2, minmax(0, 1fr))",xl:"repeat(4, minmax(0, 1fr))"},gap:1,alignItems:"start"},children:[l(cr,{size:"small",sx:{minWidth:0,width:"100%"},children:[e(L,{sx:{fontSize:"0.68rem",color:"text.secondary",mb:.45},children:g("pivot.chart.dimension")}),e(Ut,{value:x?.fieldId??"",onChange:T=>d(String(T.target.value)),sx:{fontSize:"0.75rem",height:32},children:S.map(T=>e("option",{value:T.fieldId,sx:{fontSize:"0.75rem"},children:T.label},T.fieldId))})]}),l(cr,{size:"small",sx:{minWidth:0,width:"100%"},children:[e(L,{sx:{fontSize:"0.68rem",color:"text.secondary",mb:.45},children:g("pivot.chart.primaryMeasure")}),e(Ut,{value:C?.fieldId??"",onChange:T=>f(String(T.target.value)),sx:{fontSize:"0.75rem",height:32},children:b.map(T=>e("option",{value:T.fieldId,sx:{fontSize:"0.75rem"},children:T.label},T.fieldId))})]}),l(cr,{size:"small",sx:{minWidth:0,width:"100%"},children:[e(L,{sx:{fontSize:"0.68rem",color:"text.secondary",mb:.45},children:g("pivot.chart.secondaryMeasure")}),l(Ut,{value:k?.fieldId??"",onChange:T=>h(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")}),b.filter(T=>T.fieldId!==C?.fieldId).map(T=>e("option",{value:T.fieldId,sx:{fontSize:"0.75rem"},children:T.label},T.fieldId))]})]}),l(cr,{size:"small",sx:{minWidth:0,width:"100%"},children:[e(L,{sx:{fontSize:"0.68rem",color:"text.secondary",mb:.45},children:g("pivot.chart.chartType")}),l(Ut,{value:p,onChange:T=>m(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:x?C?M.length===0?e("div",{sx:{py:5,textAlign:"center"},children:e(L,{sx:{fontSize:"0.86rem",color:"text.secondary"},children:g("pivot.chart.emptyNoData")})}):p==="scatter"?e(Fp,{data:M,primaryLabel:C.label,secondaryLabel:k?.label,formatPrimaryValue:I,formatSecondaryValue:N}):e(Op,{data:M,chartType:p,primaryLabel:C.label,secondaryLabel:k?.label,formatPrimaryValue:I,formatSecondaryValue:N}):e("div",{sx:{py:5,textAlign:"center"},children:e(L,{sx:{fontSize:"0.86rem",color:"text.secondary"},children:g("pivot.chart.emptyNoValue")})}):e("div",{sx:{py:5,textAlign:"center"},children:e(L,{sx:{fontSize:"0.86rem",color:"text.secondary"},children:g("pivot.chart.emptyNoDimension")})})})]})};w();var Ii=({node:t,dataColumns:o,fieldMap:r,level:n,expandedKeys:a,onToggle:i,getValue:s})=>{let c=a.has(t.key),p=t.children.length>0,u=t.isGrandTotal;return l(jsxRuntime.Fragment,{children:[l("tr",{sx:{bgcolor:u?Ne()==="dark"?"rgba(25, 118, 210, 0.22)":"rgba(47, 91, 255, 0.08)":Ne()==="dark"?"#111111":"background.paper","&:hover":{bgcolor:u?Ne()==="dark"?"rgba(25, 118, 210, 0.28)":"rgba(47, 91, 255, 0.12)":Ne()==="dark"?"#181818":"rgba(0, 0, 0, 0.02)"}},children:[l("td",{sx:d=>({fontSize:"0.76rem",fontWeight:u?800:600,borderBottom:`1px solid ${d.palette.divider}`,whiteSpace:"nowrap",pl:n*2+1,display:"flex",alignItems:"center",height:40}),children:[p&&!u&&e(ie,{size:"small",onClick:()=>i(t.key),sx:{p:.2,mr:.5,ml:-1},children:c?e(Oo,{sx:{fontSize:16}}):e(mr,{sx:{fontSize:16}})}),!p&&!u&&n>0&&e("div",{sx:{width:20}}),t.value]}),o.map(d=>e("td",{align:"right",sx:{fontSize:"0.76rem",fontWeight:u?800:500,borderBottom:f=>`1px solid ${f.palette.divider}`,whiteSpace:"nowrap"},children:qn(s?s(t,d.id):t.aggregatedValues[d.id]??0,d.valueItem,r)},`${t.key}-${d.id}`))]}),c&&t.children.map(d=>e(Ii,{node:d,dataColumns:o,fieldMap:r,level:n+1,expandedKeys:a,onToggle:i,getValue:s},d.key))]})};w();var Us=(t,o,r)=>{let n=[...t,...o];return r&&n.includes(r)?r:n[0]??""},Mi=(t,o)=>o&&t.some(r=>r.fieldId===o)?o:t[0]?.fieldId??"",_s=(t,o,r)=>r===""?"":r&&r!==o&&t.some(n=>n.fieldId===r)?r:t.find(n=>n.fieldId!==o)?.fieldId??"",$p=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},Gp=(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,Gp(a.children,o,r+1)),r),Xh=(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},xA=({title:t,rows:o,fields:r,initialLayout:n,initialChart:a,emptyText:i,maxPreviewHeight:s=520,initialChartCollapsed:c=false,initialTableCollapsed:p=false,model:u,enablePresetManagement:d=false,presets:f,defaultPresets:h,onPresetsChange:m,initialPresetId:y,onPresetApplied:v})=>{let{t:g}=ue(),S=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:8}})),b=jt.useRef(0),C=jt.useRef(false),k=t??g("pivot.title.default"),x=i??g("pivot.empty"),E=jt.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]),M=jt.useCallback(P=>E[P]??Sp[P],[E]),I=jt.useMemo(()=>new Set(r.map(P=>P.id)),[r]),N=jt.useMemo(()=>new Map(r.map(P=>[P.id,P])),[r]),[A,T]=jt.useState(()=>io(n?.rows,I)),[D,R]=jt.useState(()=>io(n?.columns,I)),[F,z]=jt.useState(()=>io(n?.filters,I)),[Z,B]=jt.useState(()=>{let P=n?.values??[],H=new Set,$=[];return P.forEach(ce=>{if(!I.has(ce.fieldId)||H.has(ce.fieldId))return;H.add(ce.fieldId),b.current+=1;let Fe=N.get(ce.fieldId);$.push({tokenId:`v${b.current}`,fieldId:ce.fieldId,aggregation:ho(ce.aggregation,Fe)});}),$}),[_,V]=jt.useState({}),[K,Y]=jt.useState(true),[G,Q]=jt.useState(false),[ne,be]=jt.useState(()=>Us(io(n?.rows,I),io(n?.columns,I),a?.dimensionFieldId)),[le,me]=jt.useState(()=>{let P=(n?.values??[]).filter((H,$,ce)=>I.has(H.fieldId)&&ce.findIndex(Fe=>Fe.fieldId===H.fieldId)===$).map(H=>({tokenId:H.fieldId,fieldId:H.fieldId,aggregation:ho(H.aggregation,N.get(H.fieldId))}));return Mi(P,a?.primaryValueFieldId)}),[Ie,nt]=jt.useState(()=>{let P=(n?.values??[]).filter(($,ce,Fe)=>I.has($.fieldId)&&Fe.findIndex(rt=>rt.fieldId===$.fieldId)===ce).map($=>({tokenId:$.fieldId,fieldId:$.fieldId,aggregation:ho($.aggregation,N.get($.fieldId))})),H=Mi(P,a?.primaryValueFieldId);return _s(P,H,a?.secondaryValueFieldId)}),[Xe,De]=jt.useState(a?.chartType??"bar-vertical"),[Ge,xe]=jt.useState(c),[ye,We]=jt.useState(p),[tt,gt]=jt.useState(()=>h??[]),[ct,ee]=jt.useState(""),[Ve,Te]=jt.useState(false),[Ae,pt]=jt.useState(""),[Qe,vt]=jt.useState(null),[xt,Vt]=jt.useState(new Set(["__grand_total__"])),[_t,J]=jt.useState(new Set),Je=u?.rowFields??A,Be=u?.columnFields??D,se=u?.filterFields??F,ge=u?.valueFields??Z,U=u?.filterSelections??_,fe=u?.showGrandTotal??K,Pe=u?.isConfiguratorCollapsed??G,_e=u?.chartDimensionFieldId??ne,ft=u?.chartPrimaryValueFieldId??le,ut=u?.chartSecondaryValueFieldId??Ie,Ot=u?.chartType??Xe,Ce=u?.isChartCollapsed??Ge,Oe=u?.isTableCollapsed??ye,Ze=f??tt,Xt=d||Ze.length>0||!!m,St=jt.useCallback(P=>{if(u?.setRowFields){u.setRowFields(P);return}T(P);},[u]),Ct=jt.useCallback(P=>{if(u?.setColumnFields){u.setColumnFields(P);return}R(P);},[u]),et=jt.useCallback(P=>{if(u?.setFilterFields){u.setFilterFields(P);return}z(P);},[u]),Pt=jt.useCallback(P=>{if(u?.setValueFields){u.setValueFields(P);return}B(P);},[u]),Bt=jt.useCallback(P=>{if(u?.setFilterSelections){u.setFilterSelections(P);return}V(P);},[u]),W=jt.useCallback(P=>{if(u?.setShowGrandTotal){u.setShowGrandTotal(P);return}Y(P);},[u]),j=jt.useCallback(P=>{if(u?.setIsConfiguratorCollapsed){u.setIsConfiguratorCollapsed(P);return}Q(P);},[u]),te=jt.useCallback(P=>{if(u?.setChartDimensionFieldId){u.setChartDimensionFieldId(P);return}be(P);},[u]),Re=jt.useCallback(P=>{if(u?.setChartPrimaryValueFieldId){u.setChartPrimaryValueFieldId(P);return}me(P);},[u]),ke=jt.useCallback(P=>{if(u?.setChartSecondaryValueFieldId){u.setChartSecondaryValueFieldId(P);return}nt(P);},[u]),ze=jt.useCallback(P=>{if(u?.setChartType){u.setChartType(P);return}De(P);},[u]),ot=jt.useCallback(P=>{if(u?.setIsChartCollapsed){u.setIsChartCollapsed(P);return}xe(P);},[u]),at=jt.useCallback(P=>{if(u?.setIsTableCollapsed){u.setIsTableCollapsed(P);return}We(P);},[u]),it=jt.useCallback(P=>{let H=typeof P=="function"?P(Ze):P;f||gt(H),m?.(H);},[m,Ze,f]),wt=jt.useMemo(()=>new Set([...Je,...Be,...se]),[Je,Be,se]),Et=jt.useMemo(()=>r.filter(P=>!wt.has(P.id)),[r,wt]),Nt=jt.useMemo(()=>{let P=[...Je,...Be,...se],H=new Set,$=[];return P.forEach(ce=>{H.has(ce)||(H.add(ce),$.push(ce));}),$},[Be,se,Je]);jt.useEffect(()=>{St(P=>{let H=P.filter($=>I.has($));return nr(P,H)?P:H}),Ct(P=>{let H=P.filter($=>I.has($));return nr(P,H)?P:H}),et(P=>{let H=P.filter($=>I.has($));return nr(P,H)?P:H}),Pt(P=>{let H=P.filter($=>I.has($.fieldId)).map($=>({...$,aggregation:ho($.aggregation,N.get($.fieldId))}));return Si(P,H)?P:H});},[N,I]);let Dt=jt.useMemo(()=>{let P={};return Nt.forEach(H=>{let $=new Set;o.forEach(ce=>{$.add(rr(ce[H]));}),P[H]=Array.from($).sort((ce,Fe)=>ce.localeCompare(Fe));}),P},[Nt,o]);jt.useEffect(()=>{Bt(P=>{let H={};return Nt.forEach($=>{let ce=Dt[$]??[],rt=(P[$]??[]).filter(oe=>ce.includes(oe)),$e=Object.prototype.hasOwnProperty.call(P,$);H[$]=$e?rt:ce;}),Rp(P,H)?P:H});},[Nt,Dt]),jt.useEffect(()=>{te(P=>Us(Je,Be,P));},[Be,Je,te]),jt.useEffect(()=>{Re(P=>Mi(ge,P));},[Re,ge]),jt.useEffect(()=>{ke(P=>_s(ge,ft,P));},[ft,ke,ge]);let O=jt.useMemo(()=>o.filter(P=>Nt.every(H=>{let $=U[H]??[],ce=Dt[H]??[];if($.length===ce.length)return true;if($.length===0)return false;let Fe=rr(P[H]);return $.includes(Fe)})),[Nt,Dt,U,o]),q=jt.useMemo(()=>{if(ge.length===0)return null;let P=new Map;if(O.forEach($e=>{let oe=Be.length>0?Be.map(X=>rr($e[X])):[g("pivot.valueLabel")],de=Er(oe);P.set(de,oe);}),P.size===0){let $e=Be.length>0?Be.map(()=>xi):[g("pivot.valueLabel")];P.set(Er($e),$e);}let H=Array.from(P.entries()).sort(($e,oe)=>Ip($e[1],oe[1])),$=H.flatMap(([$e,oe])=>ge.map(de=>{let X=N.get(de.fieldId),Me=`${M(de.aggregation)} ${X?.label??de.fieldId}`,Ye=Be.length===0||ge.length>1?`${oe.join(" / ")} \u2022 ${Me}`:oe.join(" / ");return {id:`${$e}::${de.tokenId}`,colKey:$e,valueItem:de,label:Ye}})),ce=[];Be.length>0&&H.forEach(([$e,oe])=>{let de=$.filter(Ye=>Ye.colKey===$e),X=ce,Me=[];oe.forEach((Ye,Se)=>{Me.push(`d${Se}:${Ye}`);let qe=`col::${Er(Me)}`,Rt=X.find(Wr=>Wr.key===qe);Rt||(Rt={key:qe,label:Ye,children:[],leafColumnIds:[],path:oe.slice(0,Se+1),depth:Se},X.push(Rt)),de.forEach(Wr=>{Rt.leafColumnIds.includes(Wr.id)||Rt.leafColumnIds.push(Wr.id);}),X=Rt.children;});});let Fe=$e=>{let oe={};return $.forEach(de=>{let X=$e.filter(Me=>{let Ye=Be.length>0?Be.map(Se=>rr(Me[Se])):[g("pivot.valueLabel")];return Er(Ye)===de.colKey});oe[de.id]=cn(X,de.valueItem.fieldId,de.valueItem.aggregation);}),oe},rt=[];if(Je.length===0)rt.push({key:"root",value:g("pivot.resultLabel")||xp,children:[],isLeaf:true,aggregatedValues:Fe(O),path:[],depth:0});else {let $e=(oe,de,X)=>{if(de>=Je.length)return [];let Me=Je[de],Ye=new Map;return oe.forEach(Se=>{let qe=rr(Se[Me]);Ye.has(qe)||Ye.set(qe,[]),Ye.get(qe).push(Se);}),Array.from(Ye.keys()).sort().map(Se=>{let qe=Ye.get(Se),Rt=[...X,Se];return {key:Er(Rt),value:Se,fieldId:Me,aggregatedValues:Fe(qe),children:$e(qe,de+1,Rt),isLeaf:de===Je.length-1,path:Rt,depth:de}})};rt.push(...$e(O,0,[]));}return {dataColumns:$,columnTree:ce,rowTree:rt}},[Be,N,O,M,Je,g,ge]),pe=jt.useCallback((P,H)=>(b.current+=1,{tokenId:`v${b.current}`,fieldId:P,aggregation:ho(H,N.get(P))}),[N]),ve=jt.useCallback(P=>{if(P==="rows")return St([]);if(P==="columns")return Ct([]);if(P==="filters")return et([]);Pt([]);},[]),je=jt.useCallback((P,H)=>{if(P==="rows")return St($=>$.filter(ce=>ce!==H));if(P==="columns")return Ct($=>$.filter(ce=>ce!==H));if(P==="filters")return et($=>$.filter(ce=>ce!==H));Pt($=>$.filter(ce=>ce.tokenId!==H));},[]),Ke=jt.useCallback((P,H)=>{Pt($=>$.map(ce=>ce.tokenId===P?{...ce,aggregation:ho(H,N.get(ce.fieldId))}:ce));},[N]),It=jt.useCallback(P=>{vt(String(P.active.id));},[]),yt=jt.useCallback(P=>{if(vt(null),!P.over)return;let H=Ci(String(P.active.id)),$=Ci(String(P.over.id));if(!H||!$||H.kind!=="item"||!H.key)return;if(H.zone===$.zone&&$.kind==="item"){if(H.zone==="rows"){let Se=Je.indexOf(H.key),qe=Je.indexOf($.key??"");Se!==-1&&qe!==-1&&Se!==qe&&St(Rt=>sortable.arrayMove(Rt,Se,qe));return}if(H.zone==="columns"){let Se=Be.indexOf(H.key),qe=Be.indexOf($.key??"");Se!==-1&&qe!==-1&&Se!==qe&&Ct(Rt=>sortable.arrayMove(Rt,Se,qe));return}if(H.zone==="filters"){let Se=se.indexOf(H.key),qe=se.indexOf($.key??"");Se!==-1&&qe!==-1&&Se!==qe&&et(Rt=>sortable.arrayMove(Rt,Se,qe));return}if(H.zone==="values"){let Se=ge.findIndex(Rt=>Rt.tokenId===H.key),qe=ge.findIndex(Rt=>Rt.tokenId===($.key??""));Se!==-1&&qe!==-1&&Se!==qe&&Pt(Rt=>sortable.arrayMove(Rt,Se,qe));}return}let ce=$.zone,Fe=[...Je],rt=[...Be],$e=[...se],oe=[...ge],de="",X=null;if(H.zone==="palette")de=H.key;else if(H.zone==="values"){let Se=oe.find(qe=>qe.tokenId===H.key);if(!Se)return;de=Se.fieldId,X=Se,oe=oe.filter(qe=>qe.tokenId!==H.key);}else H.zone==="rows"?(de=H.key,Fe=Fe.filter(Se=>Se!==de)):H.zone==="columns"?(de=H.key,rt=rt.filter(Se=>Se!==de)):H.zone==="filters"&&(de=H.key,$e=$e.filter(Se=>Se!==de));if(!de)return;let Me=()=>{Fe=Fe.filter(Se=>Se!==de),rt=rt.filter(Se=>Se!==de),$e=$e.filter(Se=>Se!==de);},Ye=Se=>{if($.kind!=="item"||!$.key)return Se==="rows"?Fe.length:Se==="columns"?rt.length:Se==="filters"?$e.length:Se==="values"?oe.length:0;if(Se==="rows"){let qe=Fe.indexOf($.key);return qe>=0?qe:Fe.length}if(Se==="columns"){let qe=rt.indexOf($.key);return qe>=0?qe:rt.length}if(Se==="filters"){let qe=$e.indexOf($.key);return qe>=0?qe:$e.length}if(Se==="values"){let qe=oe.findIndex(Rt=>Rt.tokenId===$.key);return qe>=0?qe:oe.length}return 0};if(ce==="palette"){St(Fe),Ct(rt),et($e),Pt(oe);return}if(ce==="values"){let Se=Ye("values"),qe=X??pe(de);oe.splice(Se,0,qe),St(Fe),Ct(rt),et($e),Pt(oe);return}if(Pp(ce)){Me();let Se=Ye(ce);ce==="rows"?Fe.splice(Se,0,de):ce==="columns"?rt.splice(Se,0,de):$e.splice(Se,0,de),St(Fe),Ct(rt),et($e),Pt(oe);}},[Be,pe,se,Je,ge]),ht=jt.useCallback((P,H)=>{Bt($=>({...$,[P]:H}));},[]),kt=jt.useCallback(P=>{Vt(H=>{let $=new Set(H);return $.has(P)?$.delete(P):$.add(P),$});},[]),oo=jt.useCallback(P=>{J(H=>{let $=new Set(H);return $.has(P)?$.delete(P):$.add(P),$});},[]),Lt=jt.useCallback(P=>{let H=N.get(P.fieldId),$=Hs(H);return e(cr,{size:"small",sx:{minWidth:98},children:e(Ut,{value:P.aggregation,onChange:ce=>Ke(P.tokenId,ce.target.value),onClick:ce=>ce.stopPropagation(),onMouseDown:ce=>ce.stopPropagation(),sx:{fontSize:"0.72rem",height:26,"& select.orb-inp":{py:.35}},children:$.map(ce=>e("option",{value:ce,sx:{fontSize:"0.75rem"},children:M(ce)},ce))})})},[N,M,Ke]),Zt=jt.useCallback(P=>{let H=Dt[P]??[],$=U[P]??H;return H.length===0?g("pivot.filter.noValues"):$.length===0?g("pivot.filter.noneSelected"):$.length===H.length?g("pivot.filter.allValues"):g("pivot.filter.selectedCount",{selected:$.length,total:H.length})},[Dt,U,g]),zt=jt.useCallback(P=>{let H=Dt[P]??[],$=U[P]??H;return e(Dp,{options:H,selectedValues:$,onChange:ce=>ht(P,ce)})},[Dt,U,ht]),Gt=jt.useCallback(()=>`pivot-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,[]),Ht=jt.useCallback(()=>{let P={};return new Set([...Nt,...Object.keys(U)]).forEach($=>{if(!I.has($))return;let ce=U[$]??[];P[$]=[...ce];}),{layout:{rows:[...Je],columns:[...Be],filters:[...se],values:ge.map($=>({fieldId:$.fieldId,aggregation:$.aggregation}))},filterSelections:P,showGrandTotal:fe,chart:{dimensionFieldId:_e,primaryValueFieldId:ft,secondaryValueFieldId:ut,chartType:Ot}}},[Nt,_e,ft,ut,Ot,Be,se,U,Je,fe,I,ge]),eo=jt.useCallback(P=>{let H=io(P.layout.rows,I),$=io(P.layout.columns,I),ce=io(P.layout.filters,I),Fe=new Set,rt=(P.layout.values??[]).filter(de=>!I.has(de.fieldId)||Fe.has(de.fieldId)?false:(Fe.add(de.fieldId),true)).map(de=>pe(de.fieldId,de.aggregation)),$e={};Object.entries(P.filterSelections??{}).forEach(([de,X])=>{!I.has(de)||!Array.isArray(X)||($e[de]=Array.from(new Set(X.map(Me=>String(Me)))));}),St(H),Ct($),et(ce),Pt(rt),Bt($e),typeof P.showGrandTotal=="boolean"&&W(P.showGrandTotal),te(Us(H,$,P.chart?.dimensionFieldId));let oe=Mi(rt,P.chart?.primaryValueFieldId);Re(oe),ke(_s(rt,oe,P.chart?.secondaryValueFieldId)),ze(P.chart?.chartType??"bar-vertical"),ee(P.id),v?.(P);},[pe,v,te,Re,ke,ze,Ct,et,Bt,St,W,Pt,I]),ro=jt.useCallback(P=>{if(!P){ee("");return}let H=Ze.find($=>$.id===P);if(!H){ee("");return}eo(H);},[eo,Ze]),mo=jt.useCallback(()=>{let P=g("pivot.preset.defaultName",{index:Ze.length+1});pt(P),Te(true);},[Ze.length,g]),To=jt.useCallback(()=>{let P=Ae.trim();if(!P)return;let H={id:Gt(),name:P,...Ht()};it($=>[...$,H]),ee(H.id),Te(false);},[Ht,Gt,Ae,it]),Po=jt.useCallback(()=>{ct&&(it(P=>P.filter(H=>H.id!==ct)),ee(""));},[ct,it]);jt.useEffect(()=>{if(!y||C.current)return;let P=Ze.find(H=>H.id===y);P&&(C.current=true,eo(P));},[eo,y,Ze]),jt.useEffect(()=>{ct&&(Ze.some(P=>P.id===ct)||ee(""));},[ct,Ze]);let Zo=jt.useMemo(()=>{if(!fe||!q||!Je.length)return null;let P={};return q.dataColumns.forEach(H=>{let $=O.filter(ce=>{let Fe=Be.length>0?Be.map(rt=>rr(ce[rt])):[g("pivot.valueLabel")];return Er(Fe)===H.colKey});P[H.id]=cn($,H.valueItem.fieldId,H.valueItem.aggregation);}),{key:"__grand_total__",value:g("pivot.grandTotal")||Cp,children:[],isLeaf:false,isGrandTotal:true,aggregatedValues:P,path:[],depth:-1}},[fe,q,O,Be,Je.length,g]),bo=jt.useMemo(()=>$p(q?.rowTree??[]),[q]),Eo=jt.useMemo(()=>$p(q?.columnTree??[]),[q]);jt.useEffect(()=>{Vt(P=>{let H=new Set;return P.has("__grand_total__")&&H.add("__grand_total__"),bo.forEach($=>{P.has($)&&H.add($);}),H});},[bo]),jt.useEffect(()=>{J(P=>{let H=new Set;return Eo.forEach($=>{P.has($)&&H.add($);}),H});},[Eo]);let Or=jt.useCallback(()=>{Vt(P=>{let H=new Set(P);return bo.forEach($=>H.add($)),H});},[bo]),Br=jt.useCallback(()=>{Vt(P=>{let H=new Set;return P.has("__grand_total__")&&H.add("__grand_total__"),H});},[]),Sr=jt.useCallback(()=>{J(new Set(Eo));},[Eo]),zr=jt.useCallback(()=>{J(new Set);},[]),Vr=jt.useMemo(()=>!q||Be.length===0?[]:Xh(q.columnTree,_t),[Be.length,_t,q]),Io=jt.useMemo(()=>{if(!q)return [];if(Be.length===0)return q.dataColumns.map(H=>({id:H.id,label:H.label,leafColumnIds:[H.id],valueItem:H.valueItem}));let P=new Map(q.dataColumns.map(H=>[H.id,H]));return Vr.flatMap(H=>{let $=new Map;return H.leafColumnIds.forEach(ce=>{let Fe=P.get(ce);if(!Fe)return;let rt=Fe.valueItem.tokenId,$e=`${M(Fe.valueItem.aggregation)} ${N.get(Fe.valueItem.fieldId)?.label??Fe.valueItem.fieldId}`,oe=$.get(rt);if(oe){oe.leafColumnIds.push(ce);return}$.set(rt,{id:`${H.key}::${rt}`,label:ge.length>1?$e:H.label,leafColumnIds:[ce],valueItem:Fe.valueItem});}),Array.from($.values())})},[Be.length,N,M,q,ge.length,Vr]),wr=jt.useMemo(()=>new Map(Io.map(P=>[P.id,P])),[Io]),Hr=jt.useMemo(()=>Io.map(P=>({id:P.id,colKey:P.id,valueItem:P.valueItem,label:P.label})),[Io]),Ho=jt.useMemo(()=>{if(!q||Be.length===0)return [];let P=[],H=Gp(q.columnTree,_t),$=H+(ge.length>1?1:0),ce=(Fe,rt)=>{P[rt]??(P[rt]=[]),Fe.forEach($e=>{let oe=$e.children.length>0&&_t.has($e.key),de=Io.filter(Me=>$e.leafColumnIds.some(Ye=>Me.leafColumnIds.includes(Ye))).length,X=oe||ge.length>1?1:$-rt;P[rt].push({key:$e.key,label:$e.label,colSpan:de,rowSpan:X,expandable:$e.children.length>0,expanded:oe}),oe&&ce($e.children,rt+1);});};return ce(q.columnTree,0),ge.length>1&&(P[H]=Io.map(Fe=>({key:Fe.id,label:Fe.label,colSpan:1,rowSpan:1,expandable:false,expanded:false}))),P},[Be.length,_t,q,ge.length,Io]),Yo=jt.useCallback((P,H)=>H.leafColumnIds.reduce(($,ce)=>$+(P.aggregatedValues[ce]??0),0),[]),hn=jt.useMemo(()=>l(jsxRuntime.Fragment,{children:[e(we,{size:"small",variant:"text",onClick:Or,disabled:bo.size===0,sx:{minWidth:"auto",px:.8,fontSize:"0.72rem"},children:g("pivot.table.expandRowsAll")}),e(we,{size:"small",variant:"text",onClick:Br,disabled:bo.size===0,sx:{minWidth:"auto",px:.8,fontSize:"0.72rem"},children:g("pivot.table.collapseRowsAll")}),e(At,{orientation:"vertical",flexItem:true}),e(we,{size:"small",variant:"text",onClick:Sr,disabled:Eo.size===0,sx:{minWidth:"auto",px:.8,fontSize:"0.72rem"},children:g("pivot.table.expandColumnsAll")}),e(we,{size:"small",variant:"text",onClick:zr,disabled:Be.length===0,sx:{minWidth:"auto",px:.8,fontSize:"0.72rem"},children:g("pivot.table.collapseColumnsAll")})]}),[Be.length,Eo.size,bo.size,zr,Br,Sr,Or,g]),kr=()=>{if(!Qe)return null;let P=Ci(Qe);if(!P||P.kind!=="item"||!P.key)return null;if(P.zone==="palette"){let Fe=N.get(P.key);return Fe?e(Ws,{label:Fe.label,subtitle:Fe.type}):null}if(P.zone==="values"){let Fe=ge.find(de=>de.tokenId===P.key);if(!Fe)return null;let $e=N.get(Fe.fieldId)?.label??Fe.fieldId,oe=`${M(Fe.aggregation)}(${$e})`;return e(wi,{label:$e,caption:oe})}let $=N.get(P.key)?.label??P.key,ce=Zt(P.key);return e(wi,{label:$,caption:ce})};return l(Le,{sx:P=>({p:{xs:1.2,md:2},borderRadius:"var(--orb-r-container)",border:`1px solid ${P.palette.divider}`,bgcolor:"background.paper",boxShadow:Ne()==="dark"?"none":"0 12px 28px rgba(15, 23, 42, 0.08)",display:"flex",flexDirection:"column",gap:2}),children:[l("div",{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1.5,flexWrap:"wrap"},children:[l("div",{children:[e(L,{sx:{fontSize:"1.05rem",fontWeight:800},children:k}),e(L,{sx:{fontSize:"0.78rem",color:"text.secondary"},children:g("pivot.subtitle.default")})]}),l(ae,{direction:"row",spacing:1.5,alignItems:"center",children:[Xt&&l(jsxRuntime.Fragment,{children:[e(cr,{size:"small",sx:{minWidth:200},children:l(Ut,{value:ct,displayEmpty:true,onChange:P=>ro(String(P.target.value)),sx:{fontSize:"0.75rem",height:32},children:[e("option",{value:"",sx:{fontSize:"0.75rem",color:"text.secondary"},children:g("pivot.preset.selectPlaceholder")}),Ze.map(P=>e("option",{value:P.id,sx:{fontSize:"0.75rem"},children:P.name},P.id))]})}),e(st,{title:g("pivot.preset.save"),children:e(ie,{size:"small",onClick:mo,"aria-label":g("pivot.preset.save"),children:e(gr,{sx:{fontSize:18}})})}),e(st,{title:g("pivot.preset.delete"),children:e("span",{children:e(ie,{size:"small",onClick:Po,disabled:!ct,"aria-label":g("pivot.preset.delete"),children:e(Fa,{sx:{fontSize:18}})})})}),e(At,{flexItem:true,orientation:"vertical"})]}),l(L,{sx:{fontSize:"0.74rem",color:"text.secondary"},children:[g("pivot.records"),": ",e("strong",{children:o.length.toLocaleString()})," / ",g("pivot.afterFilter"),":"," ",e("strong",{children:O.length.toLocaleString()})]}),e(At,{flexItem:true,orientation:"vertical"}),l("div",{sx:{display:"flex",alignItems:"center",gap:.6},children:[e(L,{sx:{fontSize:"0.74rem"},children:g("pivot.grandTotal")}),e(Aa,{size:"small",checked:fe,onChange:P=>W(P.target.checked)})]})]})]}),e(At,{}),l(core.DndContext,{sensors:S,collisionDetection:core.closestCenter,onDragStart:It,onDragEnd:yt,children:[e(Ep,{isConfiguratorCollapsed:Pe,onToggleCollapse:()=>j(P=>!P),availableFields:Et,fieldMap:N,filterFields:se,columnFields:Be,rowFields:Je,valueFields:ge,clearZone:ve,removeFieldFromZone:je,getFilterSelectionSummary:Zt,renderDimensionFilterSelect:zt,renderAggregationSelect:Lt,getAggregationLabel:M}),e(Sc,{children:e(core.DragOverlay,{dropAnimation:{duration:250,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:kr()})})]}),e(Hp,{rows:O,fieldMap:N,rowFields:Je,columnFields:Be,valueFields:ge,chartDimensionFieldId:_e,chartPrimaryValueFieldId:ft,chartSecondaryValueFieldId:ut,chartType:Ot,isCollapsed:Ce,onChartDimensionFieldIdChange:P=>te(P),onChartPrimaryValueFieldIdChange:P=>Re(P),onChartSecondaryValueFieldIdChange:P=>ke(P),onChartTypeChange:P=>ze(P),onToggleCollapse:()=>ot(P=>!P),getAggregationLabel:M}),e(pn,{title:g("pivot.table.sectionTitle"),subtitle:Je.length>0?Je.map(P=>N.get(P)?.label??P).join(" > "):g("pivot.table.dimensions"),collapsed:Oe,onToggleCollapse:()=>at(P=>!P),expandAriaLabel:g("pivot.table.collapse.ariaExpand"),collapseAriaLabel:g("pivot.table.collapse.ariaCollapse"),bodySx:{p:0},headerActions:hn,children:q===null?e("div",{sx:{py:5,px:{xs:1.2,md:1.6},textAlign:"center"},children:e(L,{sx:{fontSize:"0.86rem",color:"text.secondary"},children:x})}):e("div",{sx:{maxHeight:s},children:l("table",{className:"orb-tbl",size:"small",stickyHeader:true,children:[e("thead",{children:(Ho.length>0?Ho:[[]]).map((P,H)=>l("tr",{children:[H===0&&e("td",{rowSpan:Math.max(Ho.length,1),sx:$=>({fontWeight:800,fontSize:"0.76rem",color:"text.primary",bgcolor:Ne()==="dark"?"#000000":"#f5f5f5",borderBottom:`1px solid ${$.palette.divider}`,pl:2,minWidth:220,verticalAlign:"middle"}),children:Je.length>0?Je.map($=>N.get($)?.label).join(" > "):g("pivot.table.dimensions")}),(P.length>0?P:Io.map($=>({key:$.id,label:$.label,colSpan:1,rowSpan:1,expandable:false,expanded:false}))).map($=>e("td",{align:"center",colSpan:$.colSpan,rowSpan:$.rowSpan,sx:ce=>({fontWeight:800,fontSize:"0.75rem",color:"text.primary",bgcolor:Ne()==="dark"?"#000000":"#f5f5f5",borderBottom:`1px solid ${ce.palette.divider}`,minWidth:148,verticalAlign:"middle"}),children:l("div",{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:.4},children:[$.expandable&&e(ie,{size:"small",onClick:()=>oo($.key),sx:{p:.1,ml:-0.3},children:$.expanded?e(Oo,{sx:{fontSize:16}}):e(mr,{sx:{fontSize:16}})}),e("div",{component:"span",children:$.label})]})},$.key))]},`pivot-header-row-${H}`))}),l("tbody",{children:[q.rowTree.map(P=>e(Ii,{node:P,dataColumns:Hr,fieldMap:N,level:0,expandedKeys:xt,onToggle:kt,getValue:(H,$)=>{let ce=wr.get($);return ce?Yo(H,ce):0}},P.key)),Zo&&e(Ii,{node:Zo,dataColumns:Hr,fieldMap:N,level:0,expandedKeys:xt,onToggle:kt,getValue:(P,H)=>{let $=wr.get(H);return $?Yo(P,$):0}})]})]})})}),l(Ft,{open:Ve,onClose:()=>Te(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(He,{autoFocus:true,fullWidth:true,margin:"dense",label:g("pivot.preset.nameLabel"),value:Ae,onChange:P=>pt(P.target.value),onKeyDown:P=>{P.key==="Enter"&&(P.preventDefault(),To());}})}),l("div",{className:"orb-dialog-actions",children:[e(we,{onClick:()=>Te(false),children:g("common.cancel")}),e(we,{variant:"contained",onClick:To,disabled:!Ae.trim(),children:g("common.save")})]})]})]})};var Up=(t,o,r)=>{let n=[...t,...o];return r&&n.includes(r)?r:n[0]??""},qs=(t,o)=>o&&t.some(r=>r.fieldId===o)?o:t[0]?.fieldId??"",_p=(t,o,r)=>r===""?"":r&&r!==o&&t.some(n=>n.fieldId===r)?r:t.find(n=>n.fieldId!==o)?.fieldId??"",TA=({fields:t,initialLayout:o,initialFilterSelections:r={},initialShowGrandTotal:n=true,initialConfiguratorCollapsed:a=false,initialChart:i,initialChartCollapsed:s=false,initialTableCollapsed:c=false})=>{let p=jt.useRef(0),u=jt.useMemo(()=>new Set(t.map(ee=>ee.id)),[t]),d=jt.useMemo(()=>new Map(t.map(ee=>[ee.id,ee])),[t]),[f,h]=jt.useState(()=>io(o?.rows,u)),[m,y]=jt.useState(()=>io(o?.columns,u)),[v,g]=jt.useState(()=>io(o?.filters,u)),[S,b]=jt.useState(()=>{let ee=o?.values??[],Ve=new Set,Te=[];return ee.forEach(Ae=>{!u.has(Ae.fieldId)||Ve.has(Ae.fieldId)||(Ve.add(Ae.fieldId),p.current+=1,Te.push({tokenId:`v${p.current}`,fieldId:Ae.fieldId,aggregation:ho(Ae.aggregation,d.get(Ae.fieldId))}));}),Te}),[C,k]=jt.useState(r),[x,E]=jt.useState(n),[M,I]=jt.useState(a),[N,A]=jt.useState(()=>Up(io(o?.rows,u),io(o?.columns,u),i?.dimensionFieldId)),[T,D]=jt.useState(()=>{let ee=(()=>{let Ve=o?.values??[],Te=new Set,Ae=[];return Ve.forEach(pt=>{!u.has(pt.fieldId)||Te.has(pt.fieldId)||(Te.add(pt.fieldId),Ae.push({tokenId:pt.fieldId,fieldId:pt.fieldId,aggregation:ho(pt.aggregation,d.get(pt.fieldId))}));}),Ae})();return qs(ee,i?.primaryValueFieldId)}),[R,F]=jt.useState(()=>{let ee=(()=>{let Te=o?.values??[],Ae=new Set,pt=[];return Te.forEach(Qe=>{!u.has(Qe.fieldId)||Ae.has(Qe.fieldId)||(Ae.add(Qe.fieldId),pt.push({tokenId:Qe.fieldId,fieldId:Qe.fieldId,aggregation:ho(Qe.aggregation,d.get(Qe.fieldId))}));}),pt})(),Ve=qs(ee,i?.primaryValueFieldId);return _p(ee,Ve,i?.secondaryValueFieldId)}),[z,Z]=jt.useState(i?.chartType??"bar-vertical"),[B,_]=jt.useState(s),[V,K]=jt.useState(c);jt.useEffect(()=>{h(ee=>{let Ve=ee.filter(Te=>u.has(Te));return nr(ee,Ve)?ee:Ve}),y(ee=>{let Ve=ee.filter(Te=>u.has(Te));return nr(ee,Ve)?ee:Ve}),g(ee=>{let Ve=ee.filter(Te=>u.has(Te));return nr(ee,Ve)?ee:Ve}),b(ee=>{let Ve=ee.filter(Te=>u.has(Te.fieldId)).map(Te=>({...Te,aggregation:ho(Te.aggregation,d.get(Te.fieldId))}));return Si(ee,Ve)?ee:Ve});},[d,u]),jt.useEffect(()=>{A(ee=>Up(f,m,ee));},[m,f]),jt.useEffect(()=>{D(ee=>qs(S,ee));},[S]),jt.useEffect(()=>{F(ee=>_p(S,T,ee));},[T,S]);let Y=jt.useCallback(ee=>{h(io(ee,u));},[u]),G=jt.useCallback(ee=>{y(io(ee,u));},[u]),Q=jt.useCallback(ee=>{g(io(ee,u));},[u]),ne=jt.useCallback(ee=>{b(Ve=>{let Te=ee??[],Ae=new Set,pt=[];return Te.forEach(Qe=>{if(!u.has(Qe.fieldId)||Ae.has(Qe.fieldId))return;Ae.add(Qe.fieldId);let vt=Ve.find(xt=>xt.fieldId===Qe.fieldId);if(vt){pt.push({...vt,aggregation:ho(Qe.aggregation??vt.aggregation,d.get(Qe.fieldId))});return}p.current+=1,pt.push({tokenId:`v${p.current}`,fieldId:Qe.fieldId,aggregation:ho(Qe.aggregation,d.get(Qe.fieldId))});}),pt});},[d,u]),be=jt.useCallback(ee=>{Y(ee.rows??[]),G(ee.columns??[]),Q(ee.filters??[]),ne(ee.values??[]);},[G,Q,Y,ne]),le=jt.useCallback(ee=>{if(ee==="rows")return h([]);if(ee==="columns")return y([]);if(ee==="filters")return g([]);b([]);},[]),me=jt.useCallback((ee,Ve)=>{if(ee==="rows")return h(Te=>Te.filter(Ae=>Ae!==Ve));if(ee==="columns")return y(Te=>Te.filter(Ae=>Ae!==Ve));if(ee==="filters")return g(Te=>Te.filter(Ae=>Ae!==Ve));b(Te=>Te.filter(Ae=>Ae.tokenId!==Ve));},[]),Ie=jt.useCallback((ee,Ve)=>{b(Te=>Te.map(Ae=>Ae.tokenId===ee?{...Ae,aggregation:ho(Ve,d.get(Ae.fieldId))}:Ae));},[d]),nt=jt.useCallback((ee,Ve)=>{k(Te=>({...Te,[ee]:Ve}));},[]),Xe=jt.useCallback(()=>{k({});},[]),De=jt.useCallback(()=>{E(ee=>!ee);},[]),Ge=jt.useCallback(()=>{I(ee=>!ee);},[]),xe=jt.useCallback(ee=>{A(ee);},[]),ye=jt.useCallback(ee=>{D(ee);},[]),We=jt.useCallback(ee=>{F(ee);},[]),tt=jt.useCallback(()=>{_(ee=>!ee);},[]),gt=jt.useCallback(()=>{K(ee=>!ee);},[]);return {model:jt.useMemo(()=>({rowFields:f,setRowFields:h,columnFields:m,setColumnFields:y,filterFields:v,setFilterFields:g,valueFields:S,setValueFields:b,filterSelections:C,setFilterSelections:k,showGrandTotal:x,setShowGrandTotal:E,isConfiguratorCollapsed:M,setIsConfiguratorCollapsed:I,chartDimensionFieldId:N,setChartDimensionFieldId:A,chartPrimaryValueFieldId:T,setChartPrimaryValueFieldId:D,chartSecondaryValueFieldId:R,setChartSecondaryValueFieldId:F,chartType:z,setChartType:Z,isChartCollapsed:B,setIsChartCollapsed:_,isTableCollapsed:V,setIsTableCollapsed:K}),[N,T,R,z,m,v,C,B,M,V,f,x,S]),actions:{setRows:Y,setColumns:G,setFilters:Q,setValues:ne,setLayout:be,clearZone:le,removeFieldFromZone:me,setAggregationForValue:Ie,setFilterSelection:nt,resetFilterSelections:Xe,toggleGrandTotal:De,toggleConfigurator:Ge,setChartDimension:xe,setChartPrimaryValue:ye,setChartSecondaryValue:We,setChartType:Z,toggleChart:tt,toggleTable:gt}}};var MA=({orientation:t="auto",defaultNavigationOpen:o,onNavOpenChange:r}={})=>{let n=ao(),a=dr("(orientation: portrait)"),i=dr(n.breakpoints.down("md")),s=jt.useMemo(()=>t==="auto"?a||i?"portrait":"landscape":t,[i,a,t]),[c,p]=jt.useState(o??s==="landscape");jt.useEffect(()=>{p(o??s==="landscape");},[o,s]);let u=f=>{p(f),r?.(f);};return {resolvedOrientation:s,isPortraitViewport:a,isCompactViewport:i,navigationOpen:c,setNavigationOpen:u,toggleNavigationOpen:()=>u(!c)}};var eb=t=>{let o=Number(t||0);return Number.isFinite(o)?o:0},NA=({rows:t,rowKey:o="id",numericField:r,defaultSelectedId:n})=>{let i=t[0]?.[o],[s,c]=jt.useState(n??i),p=jt.useMemo(()=>t.find(m=>m[o]===s)||t[0],[o,t,s]),[u,d]=jt.useState(()=>{let m=p?.[r];return m==null?"0":String(m)});return {selectedId:s,selectedRecord:p,editorValue:u,setEditorValue:d,selectRecord:m=>{let y=m[o];c(y);let v=m[r];d(v==null?"0":String(v));},applyEditorValue:m=>{if(s===void 0)return;let y=eb(u),v=t.map(g=>g[o]===s?{...g,[r]:y}:g);m(v);}}};w();var tb=["code_128","ean_13","ean_8","qr_code","upc_a","upc_e"],qp=(t,o,r,n)=>{o?.(t),n&&r?.();},zA=({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=tb,facingMode:i="environment",manualEntry:s=true,autoCloseOnDetect:c=true,scanIntervalMs:p=600,confirmLabel:u="Use code",cancelLabel:d="Close",manualPlaceholder:f="Enter barcode manually",onDetected:h,onError:m,sx:y})=>{let v=jt__namespace.default.useRef(null),g=jt__namespace.default.useRef(null),S=jt__namespace.default.useRef(null),b=jt__namespace.default.useRef(null),[C,k]=jt__namespace.default.useState("idle"),[x,E]=jt__namespace.default.useState(""),[M,I]=jt__namespace.default.useState(null),[N,A]=jt__namespace.default.useState(null),T=jt__namespace.default.useCallback(()=>{S.current!==null&&(window.clearInterval(S.current),S.current=null),g.current&&(g.current.getTracks().forEach(F=>F.stop()),g.current=null),v.current&&(v.current.srcObject=null);},[]),D=jt__namespace.default.useCallback(F=>{A(F),k("error"),m?.(F);},[m]);jt__namespace.default.useEffect(()=>{if(!t){T(),k("idle"),A(null),E("");return}let F=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 Z=await navigator.mediaDevices.getUserMedia({audio:!1,video:{facingMode:{ideal:i}}});if(F){Z.getTracks().forEach(B=>B.stop());return}if(g.current=Z,v.current&&(v.current.srcObject=Z,await v.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"),S.current=window.setInterval(async()=>{if(!(!v.current||!b.current)&&!(v.current.readyState<HTMLMediaElement.HAVE_CURRENT_DATA))try{let _=(await b.current.detect(v.current)).find(K=>K.rawValue);if(!_?.rawValue)return;let V={rawValue:_.rawValue,format:_.format};I(V),T(),qp(V,h,o,c);}catch(B){D(B instanceof Error?B.message:"Failed to detect barcode.");}},p);}catch(Z){D(Z instanceof Error?Z.message:"Unable to start camera.");}}})(),()=>{F=true,T();}},[c,i,a,o,h,t,D,p,T]);let R=()=>{let F=x.trim();if(!F)return;let z={rawValue:F,format:"manual"};I(z),qp(z,h,o,c);};return l(Ft,{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:l(ae,{spacing:2,sx:y,children:[e(L,{sx:{fontSize:"0.88rem",color:"text.secondary",lineHeight:1.55},children:n}),l(Le,{elevation:0,sx:{position:"relative",overflow:"hidden",borderRadius:4,border:"1px solid",borderColor:"divider",minHeight:280,background:Ne()==="dark"?"linear-gradient(180deg, rgba(15,23,42,0.92), rgba(2,6,23,0.96))":"linear-gradient(180deg, rgba(241,245,249,1), rgba(226,232,240,0.92))"},children:[e("video",{ref:v,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:"#38bdf8",boxShadow:"0 0 18px rgba(56,189,248,0.85)"}})})}),l("div",{sx:{position:"absolute",top:12,left:12,display:"flex",gap:1,flexWrap:"wrap"},children:[e(Tt,{icon:e(Fc,{}),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"}),M?e(Tt,{icon:e(td,{}),label:`${M.format||"barcode"}: ${M.rawValue}`,size:"small",color:"success",variant:"filled"}):null]})]}),N?e(Go,{severity:C==="unsupported"?"info":"warning",children:N}):null,s?l(ae,{direction:{xs:"column",sm:"row"},spacing:1.25,children:[e(He,{fullWidth:true,label:"Barcode",placeholder:f,value:x,onChange:F=>E(F.target.value)}),e(we,{variant:"contained",onClick:R,sx:{minHeight:56,px:2.5},children:u})]}):null]})}),e("div",{className:"orb-dialog-actions",sx:{px:3,pb:2},children:e(we,{onClick:o,children:d})})]})};w();var ob={default:"#475569",primary:"#1d4ed8",success:"#047857",warning:"#b45309",error:"#b91c1c",info:"#0369a1"},_A=({title:t,description:o,kicker:r,icon:n,badges:a=[],metrics:i=[],footer:s,children:c,selected:p=false,draggable:u=false,isDragging:d=false,swipeThreshold:f=88,startAction:h,endAction:m,dragHandleProps:y,onClick:v,onSwipe:g,sx:S})=>{let[b,C]=jt.useState(0),[k,x]=jt.useState(false),E=jt.useRef(null),M=jt.useRef(0),I=jt.useRef(0),N=!!(h||m),A=132,T=()=>{C(0),x(false),E.current=null,M.current=0,I.current=0;},D=B=>{(B==="start"?h:m)?.onTrigger?.(),g?.(B),T();},R=B=>{!N||B.target.closest('button, a, input, textarea, [data-no-swipe="true"]')||(E.current=B.pointerId,M.current=B.clientX,I.current=B.clientX,x(true),B.currentTarget.setPointerCapture(B.pointerId));},F=B=>{if(!k||E.current!==B.pointerId)return;I.current=B.clientX;let _=I.current-M.current,V=Math.max(-A,Math.min(A,_));C(V);},z=B=>{if(!k||E.current!==B.pointerId)return;let _=I.current-M.current;if(_>=f&&h){D("start");return}if(_<=-f&&m){D("end");return}Math.abs(_)<12&&v?.(),T();},Z=(B,_)=>{if(!B)return null;let V=B.backgroundColor||ob[B.tone||"default"];return e("div",{sx:{position:"absolute",top:0,bottom:0,[_]:0,width:A,px:2,display:"flex",alignItems:"center",justifyContent:_==="left"?"flex-start":"flex-end",color:"#fff",background:`linear-gradient(135deg, ${V}, rgba(15,23,42,0.92))`},children:l(ae,{direction:"row",spacing:1,alignItems:"center",children:[B.icon,e(L,{sx:{fontWeight:700,fontSize:"0.95rem"},children:B.label})]})})};return l("div",{sx:{position:"relative",overflow:"hidden",borderRadius:4,...S},children:[Z(h,"left"),Z(m,"right"),e(Le,{elevation:0,onPointerDown:R,onPointerMove:F,onPointerUp:z,onPointerCancel:T,sx:{position:"relative",zIndex:1,p:2,borderRadius:4,border:"1px solid",borderColor:p?"primary.main":"divider",background:Ne()==="dark"?"linear-gradient(180deg, rgba(30,41,59,0.96), rgba(15,23,42,0.92))":"linear-gradient(180deg, #ffffff, #f8fafc)",color:"text.primary",boxShadow:p?"0 18px 42px rgba(37, 99, 235, 0.18)":"0 12px 28px rgba(15, 23, 42, 0.08)",transform:`translate3d(${b}px, 0, 0) scale(${d?.985:1})`,transition:k?"none":"transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease",touchAction:"pan-y",cursor:v?"pointer":"default",opacity:d?.9:1},children:l(ae,{spacing:1.5,children:[l(ae,{direction:"row",spacing:1.5,alignItems:"flex-start",children:[n?e("div",{sx:{mt:.25},children:n}):null,l("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]}),u?e("div",{"data-no-swipe":"true",...y,sx:{alignSelf:"center",display:"inline-flex",touchAction:"none"},children:e(ie,{size:"small",children:e(Gc,{})})}):null]}),a.length>0?e(ae,{direction:"row",spacing:1,useFlexGap:true,flexWrap:"wrap",children:a.map((B,_)=>e(Tt,{label:B,size:"small",sx:{borderRadius:999,fontWeight:700,bgcolor:"action.hover",color:"text.primary"}},_))}):null,i.length>0?e("div",{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(110px, 1fr))",gap:1},children:i.map(B=>l(Le,{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:B.label}),e(L,{sx:{fontSize:"1rem",fontWeight:800,lineHeight:1.2},children:B.value})]},B.id))}):null,c,s]})})]})};w();var Zn=({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"?Ne()==="dark"?"rgba(239,68,68,0.18)":"rgba(239,68,68,0.10)":Ne()==="dark"?"rgba(255,255,255,0.04)":"#fff",color:r==="primary"?"#fff":"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}),JA=({value:t,defaultValue:o="",title:r,subtitle:n,placeholder:a="0",allowDecimal:i=false,allowNegative:s=false,maxLength:c,confirmLabel:p,clearLabel:u,backspaceLabel:d,onChange:f,onSubmit:h,onClose:m,sx:y})=>{let{t:v}=ue(),[g,S]=jt.useState(o),b=t??g,C=T=>{t===void 0&&S(T),f?.(T);},k=T=>{c&&b.length>=c||C(`${b}${T}`);},x=T=>{if(T==="00"){if(!b){C("0");return}k("00");return}k(T);},E=()=>{!i||b.includes(".")||C(b?`${b}.`:"0.");},M=()=>{if(s){if(b.startsWith("-")){C(b.slice(1));return}C(b?`-${b}`:"-");}},I=()=>{C(b.slice(0,-1));},N=()=>{C("");},A=()=>{h?.(b);};return e(Le,{elevation:0,sx:{p:2,borderRadius:4,border:"1px solid",borderColor:"divider",bgcolor:"background.paper",...y},children:l(ae,{spacing:2,children:[l(ae,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",children:[l("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]}),m?e(ie,{onClick:m,size:"small",children:e(Wc,{})}):null]}),e(Le,{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})}),l("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(Zn,{label:T,onPress:()=>x(T)},T)),e(Zn,{label:s?"+/-":"00",onPress:s?M:()=>x("00")}),e(Zn,{label:"0",onPress:()=>x("0")}),e(Zn,{label:i?".":d?String(d):"DEL",onPress:i?E:I})]}),l("div",{sx:{display:"grid",gridTemplateColumns:"repeat(3, minmax(0, 1fr))",gap:1.25},children:[e("div",{component:"button",type:"button",onClick:I,sx:{minHeight:64,borderRadius:3,border:"1px solid",borderColor:"divider",bgcolor:"background.paper",cursor:"pointer",appearance:"none",WebkitAppearance:"none",WebkitTapHighlightColor:"transparent"},children:l(ae,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:[e(Lc,{}),e(L,{sx:{fontWeight:700},children:d||"DEL"})]})}),e(Zn,{label:String(u||"CLR"),onPress:N,emphasis:"danger"}),e("div",{component:"button",type:"button",onClick:A,sx:T=>({minHeight:64,borderRadius:3,border:"1px solid",borderColor:"primary.main",background:T.palette.primary.main,color:"#fff",cursor:"pointer",appearance:"none",WebkitAppearance:"none",WebkitTapHighlightColor:"transparent"}),children:l(ae,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:[e(Bc,{}),e(L,{sx:{fontWeight:800},children:p||v("common.ok")})]})})]})]})})};w();var Zp=({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(tr,{...r})})};w();var sb=(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);}},Yp=({items:t,selectedId:o,orientation:r="auto",onItemSelect:n,sx:a})=>{let i=ao(),[s,c]=jt.useState(false);jt.useEffect(()=>{c(true);},[]);let p=dr("(orientation: portrait)"),u=dr(i.breakpoints.down("md")),d=r==="auto"?p||u?"portrait":"landscape":r,f=navigation.useRouter();return e("div",{sx:{display:"grid",gridTemplateColumns:!s||d==="portrait"?"repeat(2, minmax(0, 1fr))":"repeat(auto-fit, minmax(180px, 1fr))",gap:1.5,...a},children:t.map(h=>{let m=h.id===o,y=h.color||(m?i.palette.primary.main:i.palette.divider);return e(Le,{elevation:0,sx:{overflow:"hidden",borderRadius:4,border:"1px solid",borderColor:m?"primary.main":"divider",boxShadow:m?"0 18px 40px rgba(37, 99, 235, 0.16)":"none",bgcolor:Ne()==="dark"?"rgba(30,41,59,0.6)":"background.paper"},children:e("div",{component:"button",type:"button",disabled:h.disabled,onClick:()=>sb(f,h,n),sx:{width:"100%",p:2,minHeight:d==="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:l(ae,{spacing:1.5,sx:{height:"100%"},children:[l(ae,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",children:[e("div",{sx:{width:44,height:44,borderRadius:3,display:"grid",placeItems:"center",color:m?"#fff":"text.primary",background:m?y:"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:m?"primary.main":"action.hover",color:m?"#fff":"text.secondary",textAlign:"center",fontWeight:800,fontSize:"0.8rem"},children:h.badge}):null]}),l("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)})})};w();var Jp=(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?Jp(n.children,o):[];return (a||i.length>0)&&r.push({...n,children:i.length>0?i:n.children}),r},[]):t,pb=t=>{let o=new Set,r=n=>{n.forEach(a=>{a.children?.length&&(o.add(a.id),r(a.children));});};return r(t),o},eu=({collapsed:t=false,onToggle:o,className:r="",maxHeight:n,menuData:a=[],colorMode:i="light",orientation:s="auto",headerSlot:c,footerSlot:p,activeHref:u,onItemSelect:d})=>{let{t:f}=ue(),h=ao(),m=Ro("(orientation: portrait)"),y=Ro(h.breakpoints.down("md")),v=s==="auto"?m||y?"portrait":"landscape":s,g=i==="dark",S=navigation.useRouter(),b=navigation.usePathname(),[C,k]=jt.useState(""),[x,E]=jt.useState(new Set),M=jt.useMemo(()=>Jp(a,C),[a,C]),I=jt.useMemo(()=>C.trim()?pb(M):x,[x,M,C]);jt.useEffect(()=>{t&&E(new Set);},[t]);let N=F=>F.appurl||F.href||"",A=F=>{d?.(F);let z=N(F);if(z){if(z.startsWith("http://")||z.startsWith("https://")){window.open(z,"_blank");return}S.push(z);}},T=F=>{let z=!!F.children?.length;if(t&&z){o?.();return}if(z){E(Z=>{let B=new Set(Z);return B.has(F.id)?B.delete(F.id):B.add(F.id),B});return}A(F);},D=F=>{let z=u||b,Z=N(F);return !!(Z&&z===Z)},R=(F,z=0)=>{let Z=!!F.children?.length,B=I.has(F.id),_=D(F);return e("div",{sx:{pl:z===0?0:1.5},children:l(Le,{elevation:0,sx:{mb:1,overflow:"hidden",borderRadius:3,border:"1px solid",borderColor:_?"primary.main":"divider",bgcolor:_?"action.selected":"background.paper"},children:[l("div",{component:"button",type:"button",onClick:()=>T(F),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(Ma,{variant:"rounded",sx:{width:40,height:40,bgcolor:_?"primary.main":"action.hover",color:_?"#fff":"text.primary"},children:F.icon||(F.title||F.label||"?").slice(0,1).toUpperCase()}),l("div",{sx:{flex:1,minWidth:0},children:[e(L,{sx:{fontSize:"0.95rem",fontWeight:800,lineHeight:1.2},children:F.title||F.label}),F.description?e(L,{sx:{mt:.4,fontSize:"0.78rem",color:"text.secondary",lineHeight:1.35},children:F.description}):null]}),Z?e(Xr,{sx:{transform:B?"rotate(180deg)":"rotate(0deg)",transition:"transform 180ms ease"}}):e(Ea,{color:"action"})]}),Z?e(Kr,{in:B,children:e("div",{sx:{px:1.25,pb:1.25},children:F.children?.map(V=>R(V,z+1))})}):null]})},F.id)};return t?e(Le,{elevation:0,className:r,sx:{width:v==="portrait"?"100%":88,p:1,borderRadius:4,border:"1px solid",borderColor:"divider",bgcolor:g?"#101828":"rgba(255,255,255,0.88)",maxHeight:n?`${n}px`:void 0,overflowY:"auto"},children:l(ae,{spacing:1,children:[e(ie,{onClick:o,sx:{width:48,height:48,alignSelf:"center",bgcolor:"action.hover"},title:f("navigation.expand"),children:e(Va,{})}),a.map(F=>e(ie,{onClick:()=>T(F),sx:{width:56,height:56,alignSelf:"center",borderRadius:3,bgcolor:D(F)?"primary.main":"action.hover",color:D(F)?"#fff":"text.primary"},children:F.icon||(F.title||F.label||"?").slice(0,1).toUpperCase()},F.id))]})}):e(Le,{elevation:0,className:r,sx:{width:v==="portrait"?"100%":320,p:1.25,borderRadius:5,border:"1px solid",borderColor:"divider",bgcolor:g?"#101828":"rgba(255,255,255,0.88)",maxHeight:n?`${n}px`:void 0,overflow:"hidden",display:"flex",flexDirection:"column"},children:l(ae,{spacing:1.25,sx:{flex:1,minHeight:0},children:[l(ae,{direction:"row",spacing:1,alignItems:"center",children:[e(He,{value:C,onChange:F=>k(F.target.value),placeholder:f("navigation.searchPlaceholder"),size:"small",fullWidth:true,InputProps:{startAdornment:e(od,{fontSize:"small",color:"action"})}}),v==="landscape"&&!t?e(ie,{onClick:o,sx:{bgcolor:"action.hover"},children:e(Qc,{})}):null]}),c,e("div",{sx:{flex:1,minHeight:0,overflowY:"auto",pr:.25},children:M.length>0?M.map(F=>R(F)):e(L,{sx:{p:2,fontSize:"0.88rem",color:"text.secondary",textAlign:"center"},children:f("navigation.noMatch")})}),p]})})};w();var tu=(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)},ub=t=>jt__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}),mb=(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)},gb=({summaryRow:t,visibleColumns:o,columns:r})=>{let n=r.filter(a=>o.includes(a.id)&&t[a.id]!=="");return n.length===0?null:e(Le,{elevation:0,sx:{p:1.5,borderRadius:4,border:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:l(ae,{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=>l(Le,{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}`))})]})})},fb=t=>{let{t:o}=ue(),r=ao(),{title:n,showToolbar:a=true,selectionMode:i,selected:s=[],onSelectionChange:c,actions:p,extraTools:u,fitContainer:d=false,fullWidth:f=false,maxHeight:h,loading:m=false,rowsPerPageOptions:y=[20,50,100,-1],onLayoutSave:v,filterConfig:g,rowKey:S,tableKey:b="default",graphReport:C,quickCreate:k,quickEdit:x,quickDelete:E,serviceUrl:M,orientation:I="auto",cardTitleField:N,cardSubtitleFields:A,toolbarSlot:T,emptyState:D,rowHeight:R="comfortable",cardActionSlot:F,renderCardFooter:z,onRowClick:Z}=t,B=n||o("table.title.default"),_=Ro("(orientation: portrait)"),V=Ro(r.breakpoints.down("md")),K=I==="auto"?_||V?"portrait":"landscape":I,{columns:Y,filterText:G,setFilterText:Q,visibleColumns:ne,showSummary:be,setShowSummary:le,summaryColumns:me,grouping:Ie,setGrouping:nt,expandedGroups:Xe,groupAnchorEl:De,setGroupAnchorEl:Ge,summaryAnchorEl:xe,setSummaryAnchorEl:ye,anchorEl:We,setAnchorEl:tt,contextMenu:gt,sortedAndFilteredRows:ct,summaryRow:ee,visibleRows:Ve,page:Te,setPage:Ae,rowsPerPage:pt,setRowsPerPage:Qe,totalDisplayCount:vt,setSelected:xt,handleClick:Vt,toggleSummaryColumn:_t,handleExport:J,handleCloseContextMenu:Je,toggleColumnVisibility:Be,toggleGroupExpand:se,handleExpandGroupRecursively:ge,handleCollapseGroupRecursively:U,handleLayoutLoad:fe,handleVariantLoad:Pe,handleLayoutSave:_e,effectiveAppId:ft,currentLayoutData:ut,currentLayoutId:Ot,layoutIdToLoad:Ce,graphReportOpen:Oe,handleOpenGraphReport:Ze,handleCloseGraphReport:Xt}=an(t),St=C?.enabled??false,Ct=St&&(C?.interaction?.enabled??true),et=ri(),Pt=S||"id",Bt=jt__namespace.default.useMemo(()=>({borderRadius:999,fontWeight:700,borderColor:Ee(r.palette.divider,Ne()==="dark"?.55:.3),bgcolor:Ne()==="dark"?Ee(r.palette.common.white,.06):Ee(r.palette.background.paper,.92),color:r.palette.text.primary,"& .orb-chip-label":{px:1.05}}),[r]),W=jt__namespace.default.useMemo(()=>({...Bt,borderColor:Ee(r.palette.primary.main,Ne()==="dark"?.42:.24),bgcolor:Ne()==="dark"?Ee(r.palette.primary.main,.16):Ee(r.palette.primary.main,.08)}),[Bt,r]),j=jt__namespace.default.useMemo(()=>{let X=new Set(s);return ct.filter(Me=>X.has(Me?.[Pt]))},[Pt,s,ct]),te=j.length===1?j[0]:null,Re=!!k?.enabled,ke=!!x?.enabled,ze=!!E?.enabled,ot=k?.fields,at=k?.excludeFields||[],it=k?.initialValues||{},wt=x?.fields,Et=x?.excludeFields||[],Nt=x?.editableFields||[],Dt=x?.nonEditableFields||[],O=x?.primaryKeys?.length?x.primaryKeys:[Pt],[q,pe]=jt__namespace.default.useState(false),[ve,je]=jt__namespace.default.useState(false),[Ke,It]=jt__namespace.default.useState({}),[yt,ht]=jt__namespace.default.useState(false),[kt,oo]=jt__namespace.default.useState(false),[Lt,Zt]=jt__namespace.default.useState({}),[zt,Gt]=jt__namespace.default.useState(false),[Ht,eo]=jt__namespace.default.useState(false),ro=m||ve||kt||Ht,mo=jt__namespace.default.useMemo(()=>{let X=[...Y];if(Array.isArray(ot)&&ot.length>0){let Me=new Set(ot);X=X.filter(Ye=>Me.has(Ye.id));}if(at.length>0){let Me=new Set(at);X=X.filter(Ye=>!Me.has(Ye.id));}return X.filter(Me=>!!Me?.id)},[Y,at,ot]),To=jt__namespace.default.useMemo(()=>{let X=[...Y];if(Array.isArray(wt)&&wt.length>0){let Me=new Set(wt);X=X.filter(Ye=>Me.has(Ye.id));}if(Et.length>0){let Me=new Set(Et);X=X.filter(Ye=>!Me.has(Ye.id));}return X.filter(Me=>!!Me?.id)},[Y,Et,wt]),Po=jt__namespace.default.useMemo(()=>new Set(O),[O]),Zo=jt__namespace.default.useMemo(()=>new Set(Nt),[Nt]),bo=jt__namespace.default.useMemo(()=>new Set(Dt),[Dt]),Eo=jt__namespace.default.useCallback(X=>Zo.size>0?Zo.has(X):!(bo.has(X)||Po.has(X)),[Zo,bo,Po]);jt__namespace.default.useEffect(()=>{!Oe&&et.hasActiveFilters&&et.clearAll();},[et,Oe]);let Or=()=>{let X={};mo.forEach(Me=>{X[Me.id]=it[Me.id]??"";}),It(X),pe(true);},Br=(X,Me)=>{It(Ye=>({...Ye,[X]:Me}));},Sr=async()=>{if(!k?.onSubmit){pe(false);return}try{je(!0),await k.onSubmit(Ke),pe(!1);}finally{je(false);}},zr=()=>{if(!te)return;let X={};To.forEach(Ye=>{X[Ye.id]=te[Ye.id]??"";});let Me=x?.getInitialValues?{...X,...x.getInitialValues(te)}:X;Zt(Me),ht(true);},Vr=(X,Me)=>{Zt(Ye=>({...Ye,[X]:Me}));},Io=async()=>{if(te){if(!x?.onSubmit){ht(false);return}try{oo(!0),await x.onSubmit(Lt,te),ht(!1);}finally{oo(false);}}},wr=()=>{j.length!==0&&Gt(true);},Hr=async()=>{if(j.length===0){Gt(false);return}if(!E?.onConfirm){Gt(false),xt([]),c?.([]);return}try{eo(!0),await E.onConfirm(j),Gt(!1),xt([]),c?.([]);}finally{eo(false);}},Ho=ct,{fieldMapping:Yo}=tn({rows:Ho,config:{...C,title:C?.title||`${B} ${o("graph.reportTitle")}`}}),hn=jt__namespace.default.useMemo(()=>Ct?et.applyRows(Ho,Yo):Ho,[Yo,et,Ct,Ho]),{model:kr}=tn({rows:hn,config:{...C,title:C?.title||`${B} ${o("graph.reportTitle")}`,fieldMapping:Yo}}),P=kr.table.columns.map(X=>({id:X.id,label:X.label,align:X.align||"left",minWidth:120,numeric:X.align==="right"})),H=ft?e(nn,{appId:ft,tableKey:b,currentLayoutData:ut,onLayoutLoad:fe,targetLayoutId:Ce,activeLayoutId:Ot,serviceUrl:M??g?.serviceUrl}):null,$=Y.filter(X=>ne.includes(X.id)),ce=$.find(X=>X.id===N)||$[0],Fe=A?.map(X=>$.find(Me=>Me.id===X)).filter(Boolean)||$.filter(X=>X.id!==ce?.id).slice(0,K==="portrait"?2:3),rt=$.filter(X=>X.id!==ce?.id&&!Fe.some(Me=>Me.id===X.id)),$e=[T,u].filter(Boolean),oe=l(jsxRuntime.Fragment,{children:[e(Jr,{groupAnchorEl:De,setGroupAnchorEl:Ge,grouping:Ie,setGrouping:nt,columns:Y}),e(en,{anchorEl:We,setAnchorEl:tt,columns:Y,visibleColumns:ne,toggleColumnVisibility:Be}),e(Za,{anchorEl:xe,setAnchorEl:ye,showSummary:be,setShowSummary:le,columns:Y,summaryColumns:me,toggleSummaryColumn:_t}),e(Ya,{contextMenu:gt,handleCloseContextMenu:Je,columns:Y,visibleColumns:ne,toggleColumnVisibility:Be})]}),de=(X,Me,Ye)=>{let Se=s.includes(Me),qe=K==="portrait"?"repeat(2, minmax(0, 1fr))":"repeat(auto-fit, minmax(140px, 1fr))",Rt=Ye%2===0?Ee(r.palette.primary.main,Ne()==="dark"?.09:.04):Ee(r.palette.primary.main,Ne()==="dark"?.05:.022),Wr=Ee(r.palette.divider,.22);return e(Le,{elevation:0,onClick:()=>{Vt({},X),Z?.(X);},sx:{p:R==="compact"?1.25:1.5,borderRadius:4,border:"0.5px solid",borderColor:Se?Ee(r.palette.primary.main,.38):Wr,background:Se?`linear-gradient(135deg, ${Ee(r.palette.primary.main,.13)}, ${Ee(r.palette.primary.main,.06)})`:`linear-gradient(135deg, ${Rt}, ${Ee(r.palette.primary.main,.015)})`,boxShadow:Se?`0 12px 30px ${Ee(r.palette.primary.main,.2)}`:`0 3px 10px ${Ee(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:Se?r.palette.primary.main:Ye%2===0?Ee(r.palette.primary.main,.26):Ee(r.palette.text.primary,.16)},"&:hover":{boxShadow:`0 10px 20px ${Ee(r.palette.primary.main,.12)}`,transform:"translateY(-1px)"},"&:active":{transform:"scale(0.995)"}},children:l(ae,{spacing:1.25,children:[l(ae,{direction:"row",spacing:1.25,alignItems:"flex-start",children:[i?e(Mt,{checked:Se,onClick:xo=>xo.stopPropagation(),onChange:()=>Vt({},X),sx:{mt:-0.6,ml:-0.6}}):null,l("div",{sx:{flex:1,minWidth:0},children:[ce?e(L,{sx:{fontSize:"1rem",fontWeight:900,lineHeight:1.25},children:tu(ce,X)}):null,Fe.length>0?e(ae,{direction:"row",spacing:.75,useFlexGap:true,flexWrap:"wrap",sx:{mt:.75},children:Fe.map(xo=>e(Tt,{label:`${xo.label}: ${mb(xo,X)}`,size:"small",variant:"outlined",sx:Bt},`${Me}-${xo.id}`))}):null]}),F?e("div",{onClick:xo=>xo.stopPropagation(),children:F(X)}):null]}),rt.length>0?e("div",{sx:{display:"grid",gridTemplateColumns:qe,gap:1},children:rt.map(xo=>l(Le,{elevation:0,sx:{p:1,borderRadius:3,bgcolor:Ne()==="dark"?Ee(r.palette.background.default,.7):Ee(r.palette.background.paper,.92),border:"0.1px solid",borderColor:Ee(r.palette.divider,.24)},children:[e(L,{sx:{fontSize:"0.72rem",color:"text.secondary"},children:xo.label}),ub(tu(xo,X))]},`${Me}-${xo.id}-detail`))}):null,z?l(jsxRuntime.Fragment,{children:[e(At,{}),e("div",{onClick:xo=>xo.stopPropagation(),children:z(X)})]}):null]})},Me)};return l("div",{sx:{width:f?"100%":"auto",mb:d?0:2,...d?{flex:1,display:"flex",flexDirection:"column",minHeight:0,height:"100%",overflow:"hidden"}:{}},children:[g?e("div",{sx:{mb:2},children:e(Zp,{...g,onVariantLoad:X=>{Pe(X),g.onVariantLoad?.(X);},appId:g.appId,tableKey:b,currentLayout:[{tableKey:b,layoutData:ut}],currentLayoutId:Ot,layoutRefs:[{tableKey:b,layoutId:Ot}],variantService:g.variantService,serviceUrl:M??g.serviceUrl,touchMode:K==="portrait"?"expanded":"comfortable"})}):null,l(Le,{sx:{width:f?"100%":"auto",mb:d?0:2,display:"flex",flexDirection:"column",overflow:"hidden",position:"relative",bgcolor:"transparent",backgroundImage:"none",boxShadow:"none","&::before":ro?{content:'""',position:"absolute",top:0,left:0,width:"100%",height:"3px",background:"linear-gradient(90deg, rgba(25, 118, 210, 0) 0%, rgba(25, 118, 210, 0.25) 25%, rgba(25, 118, 210, 1) 50%, rgba(25, 118, 210, 0.25) 75%, rgba(25, 118, 210, 0) 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}:d?{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(_a,{filterText:G,setFilterText:Q,onRowsPerPageChange:Qe,rowsPerPage:pt,rowsPerPageOptions:y,page:Te,count:vt,onPageChange:Ae,actions:p,extraTools:$e,grouping:Ie,setGroupAnchorEl:Ge,showSummary:be,setShowSummary:le,setAnchorEl:tt,setSummaryAnchorEl:ye,handleExport:J,showCreateButton:Re,onOpenCreateDialog:Or,showEditButton:ke,onOpenEditDialog:zr,editDisabled:j.length!==1,showDeleteButton:ze,onOpenDeleteConfirm:wr,deleteDisabled:j.length===0,onLayoutSave:v||g?.variantService&&g?.appId?_e:void 0,loading:m,layoutManager:H,onOpenGraphReport:St?Ze:void 0})}):null,e("div",{sx:{flex:1,minHeight:0,overflow:"auto",p:1.5},children:l(ae,{spacing:1.25,children:[Ve.length===0&&!m?D||e(Le,{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,Ve.map((X,Me)=>{if(X.type==="group"){let qe=Xe.has(X.id);return e(Le,{elevation:0,sx:{borderRadius:4,border:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:l("div",{component:"button",type:"button",onClick:()=>se(X.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:[qe?e(Xr,{}):e(Ea,{}),l("div",{sx:{flex:1,minWidth:0},children:[l(L,{sx:{fontSize:"0.94rem",fontWeight:800},children:[X.field,": ",X.value]}),l(L,{sx:{mt:.2,fontSize:"0.76rem",color:"text.secondary"},children:[X.count," records"]})]}),Ie.length>1&&X.level<Ie.length-1?l(ae,{direction:"row",spacing:.5,children:[e(Tt,{size:"small",label:o("table.group.expandAll"),onClick:Rt=>{Rt.stopPropagation(),ge(X.id);},sx:W}),e(Tt,{size:"small",label:o("table.group.collapseAll"),onClick:Rt=>{Rt.stopPropagation(),U(X.id);},sx:W})]}):null]})},X.id)}let Ye=X.data||X,Se=X.id||Ye[Pt]||Me;return de(Ye,Se,Me)}),be?e(gb,{summaryRow:ee,visibleColumns:ne,columns:Y}):null,m?e(L,{sx:{py:1,fontSize:"0.84rem",color:"text.secondary",textAlign:"center"},children:o("common.loading")}):null]})})]}),Re?l(Ft,{open:q,onClose:()=>!ve&&pe(false),fullWidth:true,maxWidth:"sm",children:[e("div",{className:"orb-dialog-title",sx:{fontSize:"1rem",fontWeight:800},children:k?.title||o("quickCreate.createWithTitle",{title:B})}),e("div",{className:"orb-dialog-content",sx:{pt:"8px !important"},children:l("div",{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[mo.map(X=>{let Me=X.type==="number"||X.numeric?"number":X.type==="date"?"date":"text";return e(He,{label:X.label||X.id,value:Ke[X.id]??"",onChange:Ye=>Br(X.id,Ye.target.value),type:Me,fullWidth:true,InputLabelProps:{shrink:Me==="date"?true:void 0}},`quick-create-${X.id}`)}),k?.description?e(Go,{severity:"info",children:k.description}):null]})}),l("div",{className:"orb-dialog-actions",sx:{px:3,pb:2},children:[e(we,{onClick:()=>pe(false),disabled:ve,children:k?.cancelLabel||o("common.cancel")}),e(we,{onClick:Sr,variant:"contained",disabled:ve,children:k?.submitLabel||o("common.save")})]})]}):null,ke?l(Ft,{open:yt,onClose:()=>!kt&&ht(false),fullWidth:true,maxWidth:"sm",children:[e("div",{className:"orb-dialog-title",sx:{fontSize:"1rem",fontWeight:800},children:x?.title||o("quickEdit.editWithTitle",{title:B})}),e("div",{className:"orb-dialog-content",sx:{pt:"8px !important"},children:l("div",{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[To.map(X=>{let Me=X.type==="number"||X.numeric?"number":X.type==="date"?"date":"text";return e(He,{label:X.label||X.id,value:Lt[X.id]??"",onChange:Ye=>Vr(X.id,Ye.target.value),type:Me,disabled:!Eo(X.id),fullWidth:true,InputLabelProps:{shrink:Me==="date"?true:void 0}},`quick-edit-${X.id}`)}),x?.description?e(Go,{severity:"info",children:x.description}):null]})}),l("div",{className:"orb-dialog-actions",sx:{px:3,pb:2},children:[e(we,{onClick:()=>ht(false),disabled:kt,children:x?.cancelLabel||o("common.cancel")}),e(we,{onClick:Io,variant:"contained",disabled:kt||!te,children:x?.submitLabel||o("common.save")})]})]}):null,ze?e(An,{open:zt,type:"warning",title:E?.title||o("quickDelete.confirmTitle"),message:E?.message||(j.length>1?o("quickDelete.confirmMessageMultiple",{count:j.length}):o("quickDelete.confirmMessageSingle")),confirmText:E?.confirmText||o("common.delete"),cancelText:E?.cancelText||o("common.cancel"),onClose:()=>!Ht&&Gt(false),onConfirm:Hr}):null,oe,St?e(ti,{open:Oe,onClose:Xt,model:kr,aiAssistant:C?.aiAssistant,interaction:Ct?{enabled:true,filters:et.filters,fieldMapping:Yo,onPrimaryDimensionClick:X=>et.setFilter("primaryDimension",X),onSecondaryDimensionClick:X=>et.setFilter("secondaryDimension",X),onStatusClick:X=>et.setFilter("status",X),onClearFilter:et.clearFilter,onClearAll:et.clearAll}:void 0,tableContent:e(fb,{appId:ft||"graph-report-internal",title:o("graph.dataBody"),columns:P,rows:kr.table.rows,rowKey:"id",fullWidth:true,maxHeight:"420px",rowsPerPage:20,rowsPerPageOptions:[20,50,100],graphReport:{enabled:false},showSummary:false})}):null]})};w();var KN=({appTitle:t,children:o,menuData:r=[],workloadItems:n=[],workloadSelectedId:a,showNavigation:i=true,showWorkloadNav:s=true,orientation:c="auto",logo:p,headerSlot:u,actionSlot:d,portraitBottomSlot:f,contentSx:h,containerSx:m,user:y,onSearch:v,onSearchAdd:g,defaultNavigationOpen:S,navOpen:b,onNavOpenChange:C,onWorkloadSelect:k,locale:x="en",localeLabel:E,localeOptions:M,onLocaleChange:I,onUserSetting:N,onUserLogout:A,userMenuItems:T,leftHeaderSlot:D,rightHeaderSlot:R})=>{let F="orbcafe:page-layout-mode",[z,Z]=jt.useState("system"),[B,_]=jt.useState("light"),[V,K]=jt.useState(false),[Y,G]=jt.useState(false),Q=z==="system"?Y?B:"light":z;jt.useEffect(()=>{K(true);},[]),jt.useEffect(()=>{try{let gt=window.localStorage.getItem(F);(gt==="light"||gt==="dark"||gt==="system")&&Z(gt);}catch{}G(true);let We=window.matchMedia("(prefers-color-scheme: dark)"),tt=()=>{_(We.matches?"dark":"light");};return tt(),We.addEventListener("change",tt),()=>We.removeEventListener("change",tt)},[]),jt.useEffect(()=>{if(Y)try{window.localStorage.setItem(F,z);}catch{}},[Y,z]),jt.useEffect(()=>{Q==="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");},[Q]);let ne=Ro("(orientation: portrait)"),be=Ro("(max-width: 899.95px)"),le=c==="auto"?!V||ne||be?"portrait":"landscape":c,[me,Ie]=jt.useState({landscape:S??true,portrait:false}),nt=me[le],Xe=b??nt,De=We=>{b===void 0&&Ie(tt=>({...tt,[le]:We})),C?.(We);},Ge=l(ae,{direction:"row",spacing:1,alignItems:"center",children:[!V||i&&le==="portrait"?e(ie,{onClick:()=>De(!Xe),sx:{bgcolor:"action.hover"},children:e(Va,{})}):null,D]}),xe=l(ae,{direction:"row",spacing:1,alignItems:"center",children:[d,R]}),ye=e(eu,{collapsed:le==="landscape"?!Xe:false,onToggle:()=>De(!Xe),menuData:r,orientation:le,colorMode:Q,maxHeight:le==="landscape"?900:void 0});return e(Ca,{locale:x,children:l("div",{sx:[We=>({minHeight:"100vh",display:"flex",flexDirection:"column",background:We.palette.mode==="dark"?"linear-gradient(180deg, #0A0A0A 0%, #141414 55%, #1A1A1A 100%)":We.palette.background.default}),...Array.isArray(m)?m:[m]],children:[e(yi,{appTitle:t,logo:p===void 0?null:p,mode:z,onToggleMode:()=>Z(We=>We==="system"?"dark":We==="dark"?"light":"system"),locale:x,localeLabel:E,localeOptions:M,onLocaleChange:I,user:y,onUserSetting:N,onUserLogout:A,userMenuItems:T,onSearch:v,onSearchAdd:g,leftSlot:Ge,rightSlot:xe}),u?e("div",{sx:{px:{xs:2,md:3},py:1.5,borderBottom:"1px solid",borderColor:"divider"},children:u}):null,l("div",{sx:{flex:1,minHeight:0,display:"flex",position:"relative"},children:[V&&i&&le==="landscape"?e("div",{sx:{p:1.5,pr:0,flexShrink:0},children:ye}):null,!V||i&&le==="portrait"?e(Tc,{open:Xe,onClose:()=>De(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,...h},children:l(ae,{spacing:1.5,children:[s&&n.length>0?e(Yp,{items:n,selectedId:a,orientation:le,onItemSelect:k}):null,e(Le,{elevation:0,sx:{flex:1,minHeight:le==="portrait"?420:560,p:{xs:1.25,md:1.5},borderRadius:5,border:"1px solid",borderColor:"divider",bgcolor:z==="dark"?"rgba(15,23,42,0.72)":"rgba(255,255,255,0.72)",backdropFilter:"blur(12px)",color:"text.primary"},children:o})]})})]}),le==="portrait"&&f?l(jsxRuntime.Fragment,{children:[e(At,{}),e("div",{sx:{p:1.5},children:f})]}):null]})})};w();var au=kb__default.default(()=>Promise.resolve().then(()=>(nu(),ru)).then(t=>t.COrbCanvas),{ssr:false,loading:()=>e("div",{className:"h-full w-full bg-transparent"})});function Zs({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:l("div",{className:"relative flex h-full w-full items-center justify-center",children:[e("div",{className:"absolute inset-0",children:e(au,{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(au,{hue:10,hoverIntensity:.8,rotateOnHover:true,forceHoverState:true,backgroundColor:"transparent"})})]})})})}var eE=Zs;w();var su=jt.createContext(null);function Ab(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 Nb({children:t,onVoiceSubmit:o,onVoicePartial:r,onVoiceError:n,longPressMs:a=200,disableSpaceTrigger:i=false,ignoreWhenFocusedInput:s=true,renderOverlay:c=true,wsUrl:p,silenceThresholdMs:u,minVolumeRms:d}){let[f,h]=jt.useState(false),[m,y]=jt.useState(false),v=jt.useRef(null),g=jt.useRef(false),S=jt.useRef(false),b=jt.useCallback(()=>{S.current=false,h(false);},[]),{isRecording:C,startRecording:k,stopRecording:x}=ln({wsUrl:p,silenceThresholdMs:u,minVolumeRms:d,onTextUpdate:N=>{r?.(N);},onComplete:async N=>{try{N.trim()&&(y(!0),await o(N.trim()));}catch(A){let T=A instanceof Error?A.message:"Failed to process voice command";n?.(T);}finally{y(!1),b();}},onError:N=>{n?.(N),y(!1),g.current||b();}}),E=jt.useCallback(async()=>{S.current=false,await k();},[k]),M=jt.useCallback(()=>{x();},[x]);jt.useEffect(()=>{if(i)return;let N=T=>{T.isComposing||(T.code==="Space"||T.key===" ")&&(g.current||T.repeat||s&&Ab(document.activeElement)||(g.current=true,T.preventDefault(),v.current=setTimeout(()=>{S.current=true,h(true),k();},a)));},A=T=>{(T.code==="Space"||T.key===" ")&&(v.current&&(clearTimeout(v.current),v.current=null),g.current=false,S.current&&(T.preventDefault(),h(false),x()));};return window.addEventListener("keydown",N),window.addEventListener("keyup",A),()=>{window.removeEventListener("keydown",N),window.removeEventListener("keyup",A),v.current&&(clearTimeout(v.current),v.current=null);}},[i,s,a,k,x]);let I=jt.useMemo(()=>({isRecording:C,isHotkeyRecording:f,isSubmitting:m,startRecording:E,stopRecording:M}),[f,C,m,E,M]);return l(su.Provider,{value:I,children:[c?e(Zs,{isRecording:f}):null,t]})}function Eb(){let t=jt.useContext(su);if(!t)throw new Error("useAINav must be used within CAINavProvider");return t}var iE=Nb,sE=Eb;function bt(...t){return tailwindMerge.twMerge(clsx.clsx(t))}w();var zb=({content:t,theme:o="light",size:r="base",defaultExpanded:n=false})=>{let[a,i]=jt.useState(n),s=jt.useMemo(()=>`${(r==="sm"?14:r==="lg"?18:16)-2}px`,[r]);return l("div",{className:`my-6 rounded-lg overflow-hidden transition-all duration-200 ${o==="dark"?"bg-gray-800":"bg-white"}`,style:{border:`0.5px solid ${o==="dark"?"#4b5563":"#d1d5db"}`},children:[l("div",{className:`px-4 py-3 cursor-pointer flex items-center justify-between transition-colors duration-200 ${o==="dark"?"bg-gray-700 hover:bg-gray-650":"bg-gray-50 hover:bg-gray-100"}`,style:{borderBottom:`0.5px solid ${o==="dark"?"#4b5563":"#e5e7eb"}`},onClick:()=>i(!a),children:[l("span",{className:"flex items-center",children:[e(la,{className:"mr-2 h-4 w-4"}),e("span",{className:`font-medium ${o==="dark"?"text-gray-300":"text-gray-700"}`,style:{fontSize:r==="sm"?"14px":r==="lg"?"18px":"16px"},children:"\u601D\u8003\u8FC7\u7A0B"})]}),e(Tr,{className:`w-4 h-4 transition-transform duration-200 ${a?"rotate-180":""} ${o==="dark"?"text-gray-400":"text-gray-500"}`})]}),a&&e("div",{className:`p-4 whitespace-pre-wrap italic font-light ${o==="dark"?"text-gray-400":"text-gray-600"}`,style:{fontSize:s,lineHeight:"1.3 !important"},children:t})]})},lu=zb;w();var Ub=({content:t,language:o="text",isStreaming:r=false,className:n=""})=>{let{theme:a}=nextThemes.useTheme(),[i,s]=jt.useState(false),c=async()=>{try{await navigator.clipboard.writeText(t),s(!0),setTimeout(()=>s(!1),2e3);}catch(u){console.error("\u590D\u5236\u5931\u8D25:",u);}},p=a==="dark"?prism.oneDark:prism.oneLight;return l("div",{className:bt("rounded-lg overflow-hidden border border-gray-200 dark:border-gray-700 my-4",n),children:[l("div",{className:"flex items-center justify-between px-4 py-2 bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:[e("span",{className:"text-xs font-medium text-gray-600 dark:text-gray-300 uppercase",children:o}),e("button",{onClick:c,className:"p-1 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",disabled:r,title:i?"Copied":"Copy code",children:i?e(ra,{size:14,className:"text-green-500"}):e(Il,{size:14,className:"text-gray-500 dark:text-gray-400"})})]}),e("div",{className:"text-sm",children:e(reactSyntaxHighlighter.Prism,{language:o,style:p,customStyle:{margin:0,padding:"16px",fontSize:"14px",lineHeight:"1.5",backgroundColor:a==="dark"?"#1f2937":"#ffffff"},wrapLongLines:true,children:t})})]})},cu=Ub;w();var Xb=({content:t,isLoading:o,className:r="",style:n})=>{let a=jt.useRef(null),[i,s]=jt.useState(false),[c,p]=jt.useState(null),{theme:u}=nextThemes.useTheme();return jt.useEffect(()=>{let d=false,f=async()=>{if(!(!t.trim()||!a.current)){s(true),p(null);try{pu__default.default.initialize({startOnLoad:!1,theme:u==="dark"?"dark":"default",securityLevel:"loose",fontFamily:"inherit",flowchart:{htmlLabels:!1}});let m=`mermaid-${Math.random().toString(36).substr(2,9)}`,y=t.replace(/```mermaid\n?|\n?```/g,"").trim(),{svg:v,bindFunctions:g}=await pu__default.default.render(m,y);!d&&a.current&&(a.current.innerHTML=v,g?.(a.current));}catch(m){if(d)return;console.error("Mermaid render failed:",m),p(m instanceof Error?m.message:"Render failed");}finally{d||s(false);}}},h=setTimeout(()=>{f();},100);return ()=>{d=true,clearTimeout(h);}},[t,u]),l("div",{className:`mermaid-block ${r}`,style:n,children:[(o||i)&&l("div",{className:"flex items-center justify-center rounded border border-gray-200 bg-gray-50 p-4 dark:border-gray-700 dark:bg-gray-800",children:[e("div",{className:"mr-2 h-4 w-4 animate-spin rounded-full border-b-2 border-blue-500"}),e("span",{className:"text-sm text-gray-500",children:"Generating Diagram..."})]}),c&&l("div",{className:"overflow-auto rounded border border-red-200 bg-red-50 p-4 text-sm text-red-600 dark:border-red-800 dark:bg-red-900/20 dark:text-red-400",children:[e("p",{className:"mb-2 font-semibold",children:"Mermaid Error:"}),e("pre",{children:c}),e("pre",{className:"mt-4 text-xs text-gray-500",children:t})]}),e("div",{ref:a,className:`overflow-x-auto ${o||i||c?"hidden":""}`})]})},uu=Xb;w();var Zb=({title:t="\u53D1\u751F\u9519\u8BEF",content:o,errorCode:r,stack:n,icon:a,closable:i=true,onClose:s,onRetry:c,className:p="",...u})=>{let[d,f]=jt.useState(false),[h,m]=jt.useState(false),y=async()=>{if(c){m(true);try{await c();}catch(v){console.error("\u91CD\u8BD5\u5931\u8D25:",v);}finally{m(false);}}};return l("div",{className:`relative w-full overflow-hidden rounded-lg border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 shadow-sm transition-all hover:shadow-md ${p}`,...u,children:[l("div",{className:"flex p-4 border-l-4 border-l-red-500 bg-red-50 dark:bg-red-900/10",children:[e("div",{className:"flex-shrink-0 mr-3 text-red-500 mt-0.5",children:a||e(kl,{className:"w-5 h-5"})}),l("div",{className:"flex-1 min-w-0",children:[l("div",{className:"flex items-center space-x-2 mb-1",children:[e("h4",{className:"text-base font-semibold text-gray-900 dark:text-gray-100",children:t}),r&&e("span",{className:"text-xs font-mono px-1.5 py-0.5 rounded bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300",children:r})]}),o&&e("div",{className:"text-sm text-gray-600 dark:text-gray-300 mb-3 leading-relaxed",children:typeof o=="string"?e("p",{className:"whitespace-pre-wrap",children:o}):o}),(c||n)&&l("div",{className:"flex items-center space-x-4 mt-2",children:[c&&l("button",{onClick:y,disabled:h,className:"flex items-center text-xs font-medium text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300 transition-colors disabled:opacity-50",children:[e(Vl,{className:`w-3.5 h-3.5 mr-1.5 ${h?"animate-spin":""}`}),h?"\u91CD\u8BD5\u4E2D...":"\u91CD\u8BD5"]}),n&&l("button",{onClick:()=>f(!d),className:"flex items-center text-xs font-medium text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 transition-colors",children:[d?e(Tr,{className:"w-3.5 h-3.5 mr-1"}):e(Lo,{className:"w-3.5 h-3.5 mr-1"}),d?"\u9690\u85CF\u8BE6\u60C5":"\u67E5\u770B\u8BE6\u60C5"]})]})]}),i&&s&&e("button",{onClick:s,className:"flex-shrink-0 ml-3 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors self-start",children:e(yo,{className:"w-4 h-4"})})]}),n&&d&&e("div",{className:"bg-gray-50 dark:bg-gray-950 p-3 border-t border-gray-100 dark:border-gray-800",children:e("pre",{className:"text-xs font-mono text-gray-600 dark:text-gray-400 overflow-x-auto whitespace-pre-wrap p-2 bg-white dark:bg-gray-900 rounded border border-gray-200 dark:border-gray-800",children:n})})]})},Ni=Zb;w();var Yb=({title:t="\u8B66\u544A",content:o,warningType:r,severity:n="warning",warnings:a=[],icon:i,closable:s=true,onClose:c,onConfirm:p,actionText:u,className:d="",...f})=>{let h=()=>{switch(n){case "info":return {borderLeftColor:"border-l-blue-500",iconColor:"text-blue-500",bgColor:"bg-blue-50 dark:bg-blue-900/10"};case "error":return {borderLeftColor:"border-l-red-500",iconColor:"text-red-500",bgColor:"bg-red-50 dark:bg-red-900/10"};case "success":return {borderLeftColor:"border-l-green-500",iconColor:"text-green-500",bgColor:"bg-green-50 dark:bg-green-900/10"};default:return {borderLeftColor:"border-l-yellow-500",iconColor:"text-yellow-500",bgColor:"bg-yellow-50 dark:bg-yellow-900/10"}}},m=()=>{switch(n){case "info":return e(sa,{className:"w-5 h-5"});case "error":return e(ha,{className:"w-5 h-5"});case "success":return e(na,{className:"w-5 h-5"});default:return e(Tl,{className:"w-5 h-5"})}},y=h();return l("div",{className:`relative w-full overflow-hidden rounded-lg border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 shadow-sm transition-all hover:shadow-md ${d}`,...f,children:[l("div",{className:`flex p-4 border-l-4 ${y.borderLeftColor} ${y.bgColor}`,children:[e("div",{className:`flex-shrink-0 mr-3 ${y.iconColor}`,children:i||m()}),l("div",{className:"flex-1 min-w-0",children:[l("div",{className:"flex items-center justify-between mb-1",children:[e("h4",{className:"text-base font-semibold text-gray-900 dark:text-gray-100",children:t}),r&&e("span",{className:"text-xs font-medium px-2 py-0.5 rounded-full bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400",children:r})]}),o&&e("div",{className:"text-sm text-gray-600 dark:text-gray-300 mb-2",children:o}),a&&a.length>0&&e("ul",{className:"mt-2 space-y-1",children:a.map((v,g)=>l("li",{className:"flex items-start text-sm text-gray-600 dark:text-gray-300",children:[e("span",{className:"mr-2 mt-1.5 w-1 h-1 rounded-full bg-gray-400 dark:bg-gray-500 flex-shrink-0"}),e("span",{children:v})]},g))})]}),s&&c&&e("button",{onClick:c,className:"flex-shrink-0 ml-3 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors",children:e(yo,{className:"w-4 h-4"})})]}),p&&e("div",{className:"bg-gray-50 dark:bg-gray-800/50 px-4 py-3 flex justify-end border-t border-gray-100 dark:border-gray-800",children:e("button",{onClick:p,className:"px-4 py-1.5 text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-gray-900",children:u||"\u786E\u8BA4"})})]})},Ei=Yb;w();var Qb=({title:t="\u76F8\u5173\u63A8\u8350",content:o,suggestions:r,onSuggestionClick:n,maxDisplay:a=5,icon:i,closable:s=false,onClose:c,className:p="",...u})=>{let[d,f]=jt.useState(false),[h,m]=jt.useState(""),[y,v]=jt.useState(false),g=jt.useMemo(()=>h.trim()?r.filter(C=>C.toLowerCase().includes(h.toLowerCase())):r,[r,h]),S=jt.useMemo(()=>d?g:g.slice(0,a),[g,d,a]),b=C=>{n?.(C);};return !r||r.length===0?null:l("div",{className:`w-full overflow-hidden rounded-lg border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 shadow-sm transition-all hover:shadow-md ${p}`,...u,children:[l("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-100 dark:border-gray-800 bg-blue-50/30 dark:bg-blue-900/10",children:[l("div",{className:"flex items-center space-x-2.5",children:[e("div",{className:"text-blue-500 flex-shrink-0",children:i||e(la,{className:"w-5 h-5"})}),l("div",{className:"flex flex-col",children:[e("h4",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100 leading-tight",children:t}),o&&e("span",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:o})]})]}),l("div",{className:"flex items-center space-x-1",children:[r.length>3&&e("button",{onClick:()=>v(!y),className:`p-1.5 rounded-md transition-colors ${y?"bg-blue-100 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400":"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800"}`,title:y?"\u5173\u95ED\u641C\u7D22":"\u641C\u7D22\u95EE\u9898",children:e(Qo,{className:"w-4 h-4"})}),s&&c&&e("button",{onClick:c,className:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 p-1.5 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors",title:"\u5173\u95ED",children:e(yo,{className:"w-4 h-4"})})]})]}),y&&e("div",{className:"px-4 py-2 border-b border-gray-100 dark:border-gray-800 bg-gray-50 dark:bg-gray-900/50",children:l("div",{className:"relative",children:[e("input",{type:"text",placeholder:"\u641C\u7D22\u76F8\u5173\u95EE\u9898...",value:h,onChange:C=>m(C.target.value),className:"w-full text-sm px-3 py-1.5 pl-8 rounded border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 focus:ring-1 focus:ring-blue-500 focus:border-blue-500 outline-none transition-shadow",autoFocus:true}),e(Qo,{className:"absolute left-2.5 top-2 w-3.5 h-3.5 text-gray-400"})]})}),l("div",{className:"p-2",children:[e("ul",{className:"space-y-1",children:S.map((C,k)=>e("li",{children:l("button",{onClick:()=>b(C),className:"w-full text-left px-3 py-2 rounded-md text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-blue-600 dark:hover:text-blue-400 transition-colors group flex items-start justify-between",children:[e("span",{children:C}),e(Lo,{className:"w-4 h-4 text-gray-300 group-hover:text-blue-400 opacity-0 group-hover:opacity-100 transition-all transform group-hover:translate-x-0.5"})]})},k))}),g.length>a&&e("button",{onClick:()=>f(!d),className:"w-full text-center py-2 text-xs font-medium text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 transition-colors border-t border-gray-50 dark:border-gray-800/50 mt-1",children:d?"\u6536\u8D77":`\u67E5\u770B\u5168\u90E8 (${g.length})`}),g.length===0&&h&&e("div",{className:"text-center py-4 text-sm text-gray-500 dark:text-gray-400",children:"\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u5EFA\u8BAE"})]})]})},Li=Qb;w();var jb=({title:t,content:o,toolName:r,parameters:n,result:a,status:i,duration:s,icon:c,closable:p=false,onClose:u,onAction:d,actionText:f,className:h="",...m})=>{let[y,v]=jt.useState(false),[g,S]=jt.useState(true),b=()=>{switch(i){case "pending":return {iconColor:"text-blue-500",badgeBg:"bg-blue-50 dark:bg-blue-900/30",badgeText:"text-blue-600 dark:text-blue-400",label:"\u6267\u884C\u4E2D"};case "error":return {iconColor:"text-red-500",badgeBg:"bg-red-50 dark:bg-red-900/30",badgeText:"text-red-600 dark:text-red-400",label:"\u5931\u8D25"};default:return {iconColor:"text-green-500",badgeBg:"bg-green-50 dark:bg-green-900/30",badgeText:"text-green-600 dark:text-green-400",label:"\u6210\u529F"}}},C=()=>{switch(i){case "pending":return e(El,{className:"w-5 h-5 animate-spin"});case "error":return e(ha,{className:"w-5 h-5"});default:return e(na,{className:"w-5 h-5"})}},k=M=>M?M<1e3?`${M}ms`:`${(M/1e3).toFixed(2)}s`:"",x=b(),E=t||r||"\u5DE5\u5177\u8C03\u7528";return l("div",{className:`w-full overflow-hidden rounded-lg border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 shadow-sm transition-all hover:shadow-md ${h}`,...m,children:[l("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-100 dark:border-gray-800 bg-gray-50/50 dark:bg-gray-800/50",children:[l("div",{className:"flex items-center space-x-3",children:[e("div",{className:`flex-shrink-0 ${x.iconColor}`,children:c||C()}),l("div",{children:[l("div",{className:"flex items-center space-x-2",children:[e("h4",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100",children:E}),e("span",{className:`text-[10px] font-medium px-1.5 py-0.5 rounded ${x.badgeBg} ${x.badgeText}`,children:x.label})]}),r&&t&&l("div",{className:"text-xs text-gray-500 dark:text-gray-400 flex items-center mt-0.5",children:[e(ts,{className:"w-3 h-3 mr-1"}),r]})]})]}),l("div",{className:"flex items-center space-x-2 text-xs text-gray-500 dark:text-gray-400",children:[s&&l("div",{className:"flex items-center bg-gray-100 dark:bg-gray-800 px-2 py-1 rounded",children:[e(Rl,{className:"w-3 h-3 mr-1"}),k(s)]}),p&&u&&e("button",{onClick:u,className:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors p-1 rounded",children:e(yo,{className:"w-4 h-4"})})]})]}),l("div",{className:"p-4",children:[o&&e("div",{className:"text-sm text-gray-600 dark:text-gray-300 mb-4 leading-relaxed",children:o}),n&&l("div",{className:"mb-3",children:[l("button",{onClick:()=>v(!y),className:"flex items-center text-xs font-medium text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 mb-2",children:[y?e(Tr,{className:"w-3.5 h-3.5 mr-1"}):e(Lo,{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"]}),y&&e("div",{className:"bg-gray-50 dark:bg-gray-950 rounded border border-gray-100 dark:border-gray-800 overflow-hidden",children:e("pre",{className:"p-3 text-xs font-mono text-gray-600 dark:text-gray-400 overflow-x-auto",children:JSON.stringify(n,null,2)})})]}),a&&l("div",{children:[l("button",{onClick:()=>S(!g),className:"flex items-center text-xs font-medium text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 mb-2",children:[g?e(Tr,{className:"w-3.5 h-3.5 mr-1"}):e(Lo,{className:"w-3.5 h-3.5 mr-1"}),e(ts,{className:"w-3.5 h-3.5 mr-1.5"}),"\u6267\u884C\u7ED3\u679C"]}),g&&e("div",{className:"bg-gray-50 dark:bg-gray-950 rounded border border-gray-100 dark:border-gray-800 overflow-hidden",children:e("pre",{className:"p-3 text-xs font-mono text-gray-600 dark:text-gray-400 overflow-x-auto",children:typeof a=="string"?a:JSON.stringify(a,null,2)})})]}),d&&e("div",{className:"mt-3 pt-3 border-t border-gray-100 dark:border-gray-800 flex justify-end",children:e("button",{onClick:d,className:"px-4 py-1.5 text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-gray-900",children:f||"\u6267\u884C\u64CD\u4F5C"})})]})]})},Fi=jb;w();var ey=({data:t})=>{if(!t)return null;let o=jt.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-gray-300 rounded text-center text-gray-500",children:"\u6682\u65E0\u8868\u683C\u6570\u636E"}):e("div",{className:"w-full my-4",children:e(_o,{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]})})},Oi=ey;w();var ty=({title:t,subtitle:o,data:r,type:n,config:a={}})=>{let i=()=>{switch(n){case "bar-chart-card":return e(ji,{className:"w-4 h-4 text-blue-500"});case "line-chart-card":return e(Nl,{className:"w-4 h-4 text-green-500"});case "pie-chart-card":return e(Bl,{className:"w-4 h-4 text-purple-500"});case "combo-chart-card":return e(wl,{className:"w-4 h-4 text-orange-500"});case "heatmap-chart-card":return e(Al,{className:"w-4 h-4 text-red-500"});case "fishbone-chart-card":return e(Dl,{className:"w-4 h-4 text-indigo-500"});case "waterfall-chart-card":return e(_l,{className:"w-4 h-4 text-teal-500"});case "google-map-card":return e(xn,{className:"w-4 h-4 text-blue-600"});case "amap-card":return e(Fl,{className:"w-4 h-4 text-blue-600"});default:return e(ji,{className:"w-4 h-4"})}},s=()=>{if(!r&&n!=="google-map-card"&&n!=="amap-card")return e("div",{className:"text-gray-500 text-sm p-4 text-center",children:"No data available"});try{switch(n){case "bar-chart-card":return e(On,{data:r,orientation:a.orientation||"horizontal",valueSuffix:a.valueSuffix||"",minHeight:a.minHeight});case "line-chart-card":return e(Rd,{data:r,color:a.color,valueSuffix:a.valueSuffix||"",height:a.height});case "pie-chart-card":let c=r.reduce((u,d)=>u+(Number(d.value)||0),0),p=r.map(u=>({name:u.name,value:Number(u.value)||0,percent:typeof u.percent=="number"?u.percent:c>0?(Number(u.value)||0)/c*100:0}));return e(ja,{data:p,variant:a.variant||"donut",size:a.size,colors:a.colors});case "combo-chart-card":return e(Md,{data:r,barColor:a.barColor,lineColor:a.lineColor});case "heatmap-chart-card":return e(Dd,{data:r});case "fishbone-chart-card":return e(Ad,{branches:r,effect:a.effect||t||"Problem"});case "waterfall-chart-card":return e(Nd,{data:r,height:a.height});case "google-map-card":return e(Ed,{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(Ld,{embedUrl:a.embedUrl||r&&r[0]?.embedUrl,keyword:a.keyword||r&&r[0]?.keyword||t,height:a.height});default:return l("div",{className:"text-gray-500 text-sm p-4 text-center",children:["Unsupported chart type: ",n]})}}catch(c){return console.error("Error rendering chart:",c),e("div",{className:"text-red-500 text-sm p-4 text-center",children:"Error rendering chart"})}};return l("div",{className:"w-full overflow-hidden rounded-lg border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 shadow-sm transition-all hover:shadow-md",children:[l("div",{className:"flex items-center px-4 py-3 border-b border-gray-100 dark:border-gray-800 bg-gray-50/50 dark:bg-gray-800/50",children:[e("div",{className:"mr-2 flex-shrink-0",children:i()}),l("div",{className:"flex-1 min-w-0",children:[e("h3",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100 truncate",children:t}),o&&e("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5 truncate",children:o})]})]}),l("div",{className:"p-4",children:[e("div",{className:"overflow-x-auto",children:s()}),e("div",{className:"mt-3",children:l("details",{className:"text-xs text-gray-500 dark:text-gray-400",children:[e("summary",{className:"cursor-pointer hover:text-gray-700 dark:hover:text-gray-300 transition-colors select-none font-medium opacity-60 hover:opacity-100",children:"View Raw Data"}),e("pre",{className:"mt-2 p-2 bg-gray-50 dark:bg-gray-950 rounded border border-gray-100 dark:border-gray-800 overflow-x-auto max-h-40",children:JSON.stringify(r,null,2)})]})})]})]})},Bi=ty;w();var oy=({type:t,manifest:o})=>l("div",{className:"w-full overflow-hidden rounded-lg border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 shadow-sm transition-all hover:shadow-md",children:[l("div",{className:"flex items-center px-4 py-3 border-b border-gray-100 dark:border-gray-800 bg-blue-50/50 dark:bg-blue-900/10",children:[e("div",{className:"w-4 h-4 mr-2 text-blue-600 dark:text-blue-400"}),l("h3",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100",children:["SAP Card: ",t]})]}),e("div",{className:"p-4",children:e("div",{className:"bg-gray-50 dark:bg-gray-950 p-3 rounded border border-gray-100 dark:border-gray-800 overflow-x-auto",children:e("pre",{className:"text-xs font-mono text-gray-600 dark:text-gray-400 whitespace-pre-wrap",children:JSON.stringify(o,null,2)})})})]}),zi=oy;var Vi=t=>{let o;try{o=JSON.parse(t);}catch{return null}return o&&typeof o=="object"&&((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)?o:null};w();var ly=({content:t,theme:o,size:r="base",className:n,enableCodeHighlight:a=true,enableMermaid:i=true,messageId:s,cardHooks:c})=>{let p=jt.useMemo(()=>t?t.replace(/<think>([\s\S]*?)<\/think>/g,(h,m)=>`<div data-component="thinkbox" data-think-content="${encodeURIComponent(m.trim())}"></div>`):"",[t]),u=(h,m,y,v,g)=>{c?.onCardEvent?.({messageId:s,cardType:h,action:m,title:y,payload:v,rawData:g});},d=(h,m,y,v,g,S)=>{if(!(!g&&!c?.onCardEvent))return (...b)=>{let C=g?.(...b),k=S?S(...b):void 0;return u(h,m,y,k,v),C}},f=jt.useMemo(()=>({div(h){let{"data-component":m,"data-think-content":y,...v}=h;return m==="thinkbox"&&y?e(lu,{content:decodeURIComponent(y),theme:o,size:r,defaultExpanded:false}):e("div",{...v})},table({children:h}){return e("div",{className:"my-4 w-full overflow-x-auto rounded-lg border border-gray-200 dark:border-gray-800",children:e("table",{className:"w-full min-w-[520px] border-collapse text-sm",children:h})})},thead({children:h}){return e("thead",{className:"bg-gray-50 dark:bg-gray-900/60",children:h})},tbody({children:h}){return e("tbody",{className:"bg-white dark:bg-gray-950",children:h})},tr({children:h}){return e("tr",{className:"border-b border-gray-200 dark:border-gray-800 last:border-b-0",children:h})},th({children:h,align:m}){return e("th",{className:`px-3 py-2 font-semibold text-gray-800 dark:text-gray-100 ${m==="center"?"text-center":m==="right"?"text-right":"text-left"}`,children:h})},td({children:h,align:m}){return e("td",{className:`px-3 py-2 text-gray-700 dark:text-gray-200 align-top ${m==="center"?"text-center":m==="right"?"text-right":"text-left"}`,children:h})},code({className:h,children:m,...y}){let v=/language-([\w-]+)/.exec(h||""),g=v?v[1]:"",S=String(m);if(!v&&!S.includes(`
|
|
199
|
+
`))return e("code",{children:m});let C=S.replace(/\n$/,"");if(i&&g==="mermaid")return e(uu,{content:C});if(g==="json"){let k=Vi(C);if(k)switch(k.type){case "table":return e(Oi,{data:k.data});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(Bi,{...k});case "sap-analytical-card":case "sap-list-card":case "sap-object-card":case "sap-component-card":return e(zi,{...k});case "error-card":{let x=k;return e(Ni,{...x,onClose:d("error-card","close",x.title,x,x.onClose),onRetry:d("error-card","retry",x.title,x,x.onRetry)})}case "warning-card":{let x=k,E=x.onConfirm?d("warning-card","confirm",x.title,x,x.onConfirm):x.actionText&&c?.onCardEvent?d("warning-card","confirm",x.title,x):void 0;return e(Ei,{...x,onClose:d("warning-card","close",x.title,x,x.onClose),onConfirm:E})}case "suggestions-card":{let x=k;return e(Li,{...x,onClose:d("suggestions-card","close",x.title,x,x.onClose),onSuggestionClick:d("suggestions-card","suggestion-click",x.title,x,x.onSuggestionClick,E=>({suggestion:E}))})}case "tool-result-card":{let x=k;return e(Fi,{...x,onClose:d("tool-result-card","close",x.title,x,x.onClose),onAction:d("tool-result-card","action",x.title,x,x.onAction)})}}}return a?e(cu,{content:C,language:g,className:"not-prose"}):e("code",{className:h,...y,children:m})}}),[o,r,i,a,c,s]);return e("div",{className:bt("markdown-body max-w-none",n),children:e(ry__default.default,{remarkPlugins:[ny__default.default,ay__default.default],rehypePlugins:[iy__default.default,sy__default.default],components:f,children:p})})},Hi=ly;w();var cy=({content:t,messageId:o,cardHooks:r})=>{let n=(s,c,p,u,d)=>{r?.onCardEvent?.({messageId:o,cardType:s,action:c,title:p,payload:u,rawData:d});},a=(s,c,p,u,d,f)=>{if(!(!d&&!r?.onCardEvent))return (...h)=>{let m=d?.(...h),y=f?f(...h):void 0;return n(s,c,p,y,u),m}},i=Vi(t);if(i)switch(i.type){case "table":return e(Oi,{data:i.data});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(Bi,{...i});case "sap-analytical-card":case "sap-list-card":case "sap-object-card":case "sap-component-card":return e(zi,{...i});case "error-card":{let s=i;return e(Ni,{...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,c=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(Ei,{...s,onClose:a("warning-card","close",s.title,s,s.onClose),onConfirm:c})}case "suggestions-card":{let s=i;return e(Li,{...s,onClose:a("suggestions-card","close",s.title,s,s.onClose),onSuggestionClick:a("suggestions-card","suggestion-click",s.title,s,s.onSuggestionClick,c=>({suggestion:c}))})}case "tool-result-card":{let s=i;return e(Fi,{...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(Hi,{content:t,enableCodeHighlight:true,enableMath:true,enableMermaid:true,messageId:o,cardHooks:r})})},bu=cy;w();var Js=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"}}},py=({content:t,className:o="",messageId:r,cardHooks:n})=>{let a=jt__namespace.default.useMemo(()=>Js.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(bu,{content:i.content,messageId:r,cardHooks:n},`block-${s}`):e(Hi,{content:i.content,enableCodeHighlight:true,enableMath:true,enableMermaid:true,messageId:r,cardHooks:n},`block-${s}`))})},yu=py;w();var uy=({content:t,isStreaming:o=true,onComplete:r,className:n="",streamIntervalMs:a=24,streamChunkSize:i=3,messageId:s,cardHooks:c})=>{let[p,u]=jt.useState(o?0:t.length),[d,f]=jt.useState(!o);jt.useEffect(()=>{if(o){u(0),f(false);return}u(t.length),f(true);},[t,o]),jt.useEffect(()=>{if(!o||d)return;if(p>=t.length){f(true),r?.();return}let g=window.setTimeout(()=>{u(S=>Math.min(S+i,t.length));},a);return ()=>{window.clearTimeout(g);}},[t.length,d,o,r,i,a,p]);let h=()=>{o&&!d&&(u(t.length),f(true),r?.());},m=o?t.slice(0,p):t,y=o&&!d,v=o&&!d;return l("div",{className:`streaming-markdown ${n}`,onClick:h,style:{cursor:o?"pointer":"default"},children:[l("div",{className:"relative",children:[e(yu,{content:m,messageId:s,cardHooks:c}),y&&e("span",{className:"inline-block w-[2px] h-[13px] ml-0.5 animate-pulse",style:{verticalAlign:"text-bottom",backgroundColor:"var(--orb-primary, #154194)"}})]}),v&&e("div",{className:"streaming-hint",style:{fontSize:"9px",color:"#999",marginTop:"8px",fontStyle:"italic",opacity:.7},children:"\u70B9\u51FB\u6B64\u5904\u663E\u793A\u5B8C\u6574\u5185\u5BB9"})]})},Cu=uy;w();var Su=({buttons:t,className:o})=>{let r=n=>{switch(n){case "copy":return e(ia,{size:14});case "refresh":return e(ma,{size:14});case "volume":return e(ql,{size:14});case "like":return e(Gl,{size:14});case "dislike":return e($l,{size:14});default:return null}};return e("div",{className:bt("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:bt("p-1.5 rounded-md transition-colors","text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-100","hover:bg-gray-100 dark:hover:bg-gray-800","disabled:opacity-50 disabled:cursor-not-allowed",n.active&&"text-blue-600 bg-blue-50 dark:text-blue-400 dark:bg-blue-900/20",n.type==="refresh"&&n.loading&&"animate-spin"),title:n.type,type:"button",children:r(n.type)},`${n.type}-${a}`))})};w();var Wi=({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"},c={marginTop:6,fontSize:11,color:"var(--orb-muted, #8c8c8c)"};if(t.type==="assistant"){let p=!!(r?.isResponding||t.isStreaming);return e("div",{className:"mb-4 flex justify-start",children:l("div",{className:"mr-auto w-full",style:{...s,background:"var(--orb-surface, #f5f5f5)",border:"1px solid var(--orb-border, #dbdbdb)"},children:[e(Cu,{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(Su,{buttons:[{type:"refresh",onClick:()=>{r?.onRegenerate?.();},disabled:p||!r?.onRegenerate,loading:p},{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:c,children:t.timestamp.toLocaleTimeString()})]})})}return e("div",{className:"mb-4 flex justify-end",children:l("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:c,children:t.timestamp.toLocaleTimeString()})]})})};w();var wu=({onTextUpdate:t,onComplete:o,onCancel:r,disabled:n,className:a})=>{let{isRecording:i,startRecording:s,stopRecording:c}=ln({onTextUpdate:t,onComplete:u=>{o?.(u);},onError:u=>{console.error("Voice input error:",u),r?.();}});return e("button",{onClick:async()=>{i?c():await s();},disabled:n,className:bt("transition-all duration-200 flex items-center justify-center rounded-full",i?"bg-red-100 text-red-600 hover:bg-red-200 animate-pulse":"bg-transparent hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-500 dark:text-gray-400 active:scale-95",n&&"opacity-50 cursor-not-allowed",a),title:i?"Stop recording":"Start recording",type:"button",children:i?e(Jc,{size:16}):e(ed,{size:16})})};w();var Jt={container:"w-full max-w-4xl mx-auto",inputContainer:bt("w-full flex flex-col border border-[var(--orb-border,#dbdbdb)] bg-[var(--orb-canvas,#ffffff)] transition-colors duration-200","rounded-[var(--orb-r,10px)]","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:bt("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-gray-300 dark:scrollbar-thumb-gray-600"),filePreviewArea:"px-4 pt-3 pb-1 flex flex-wrap gap-2",fileTag:bt("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:bt("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:bt("cursor-pointer bg-[var(--orb-primary,#154194)] hover:bg-[var(--orb-p600,#0e2d63)] text-white shadow-none active:scale-95"),sendButtonDisabled:bt("cursor-not-allowed opacity-40 bg-[var(--orb-disabled-bg,#f5f5f5)] text-[var(--orb-disabled-fg,#8c8c8c)]"),stopButton:bt("cursor-pointer bg-[var(--orb-err,#c43f02)] hover:opacity-90 text-white shadow-none active:scale-95")},gy={padding:0,lineHeight:"1.5",border:"none !important",boxShadow:"none !important",backgroundColor:"transparent",height:"auto",fontFeatureSettings:'"liga" 1, "kern" 1',WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},fy=({enabled:t,onClick:o})=>e("button",{className:bt(Jt.buttonBase,Jt.buttonSmall,Jt.buttonNormal),onClick:o,disabled:!t,"aria-label":"Upload file",type:"button",children:e(Ac,{size:16})}),hy=()=>l("button",{className:bt(Jt.buttonBase,"h-[38px] gap-1 rounded-full px-2.5 md:h-8 md:px-2",Jt.buttonNormal),"aria-label":"Tools",type:"button",children:[e(Kc,{size:15}),e("span",{className:"text-xs font-medium",children:"Tools"})]}),by=({canSend:t,isResponding:o,onSend:r,onStop:n})=>o?e("button",{className:bt(Jt.buttonBase,Jt.buttonSmall,Jt.stopButton),onClick:n,"aria-label":"Stop generating",type:"button",children:e(cd,{size:15})}):e("button",{className:bt(Jt.buttonBase,Jt.buttonSmall,t?Jt.sendButton:Jt.sendButtonDisabled),onClick:r,disabled:!t,"aria-label":"Send message",type:"button",children:e(nd,{size:16,className:t?"text-[var(--orb-on-primary,#ffffff)]":"text-[var(--orb-disabled-fg,#8c8c8c)]"})}),ku=({onSend:t,onStop:o,isResponding:r=false,placeholder:n,getText:a})=>{let[i,s]=jt.useState(""),[c,p]=jt.useState([]),[u,d]=jt.useState(false),[f,h]=jt.useState(false),m=jt.useRef(null),y=n||(a?a("00019","Type a message..."):"Type a message..."),v=(i.trim().length>0||c.length>0)&&!r,g={enabled:true},S=jt.useCallback(z=>{s(z.target.value),z.target.style.height="auto",z.target.style.height=`${Math.min(z.target.scrollHeight,200)}px`;},[]),b=jt.useCallback(z=>{if(z.target.files&&z.target.files.length>0){let Z=Array.from(z.target.files);p(B=>{let _=Z.filter(K=>B.some(Y=>Y.name===K.name&&Y.size===K.size));_.length>0&&console.warn("Duplicate files ignored:",_.map(K=>K.name));let V=Z.filter(K=>!B.some(Y=>Y.name===K.name&&Y.size===K.size));return [...B,...V]}),m.current&&(m.current.value="");}},[]),C=jt.useCallback(z=>{p(Z=>Z.filter((B,_)=>_!==z));},[]),k=jt.useCallback(()=>{m.current?.click();},[]),x=jt.useCallback(async()=>{if(!v)return;let z=i,Z=[...c];s(""),p([]),m.current&&(m.current.value="");try{await t(z,Z);}catch(B){console.error("Failed to send message:",B),s(z),p(Z);}},[i,v,t,c]),E=jt.useCallback(z=>{z.key==="Enter"&&!z.shiftKey&&!u&&(z.preventDefault(),x());},[x,u]),M=jt.useCallback(()=>{d(true);},[]),I=jt.useCallback(()=>{d(false);},[]),N=jt.useCallback(z=>{s(z);},[]),A=jt.useCallback(z=>{s(z);},[]),T=jt.useCallback(()=>{},[]),D=jt.useCallback(z=>{z.preventDefault(),h(true);},[]),R=jt.useCallback(z=>{z.preventDefault(),h(false);},[]),F=jt.useCallback(z=>{if(z.preventDefault(),h(false),z.dataTransfer.files&&z.dataTransfer.files.length>0){let Z=Array.from(z.dataTransfer.files);p(B=>[...B,...Z]);}},[]);return e("div",{className:Jt.container,children:l("div",{className:"relative",children:[e("input",{type:"file",multiple:true,className:"hidden",ref:m,onChange:b}),l("div",{className:bt(Jt.inputContainer,f&&Jt.dragActive),style:{borderRadius:"24px"},onDragOver:D,onDragLeave:R,onDrop:F,children:[c.length>0&&e("div",{className:Jt.filePreviewArea,children:c.map((z,Z)=>l("div",{className:Jt.fileTag,children:[e(Xc,{sx:{fontSize:16},className:"text-blue-500"}),e("span",{className:"truncate max-w-[150px]",children:z.name}),e("button",{onClick:()=>C(Z),className:"ml-1 hover:text-red-500 focus:outline-none",type:"button",children:e(Vc,{sx:{fontSize:16}})})]},`${z.name}-${Z}`))}),l("div",{className:"flex w-full flex-col p-2",children:[e("div",{className:bt(Jt.textareaWrapper,"min-h-[52px] px-2 pb-2 pt-1.5 md:min-h-[44px]"),children:e("textarea",{className:bt(Jt.textarea,"min-h-[24px] py-0 px-0"),placeholder:y,value:i,onChange:S,onKeyDown:E,onCompositionStart:M,onCompositionEnd:I,style:gy,"aria-label":"Message input",spellCheck:false,rows:1})}),l("div",{className:"flex items-center justify-between px-1 pb-0.5",children:[l("div",{className:"flex items-center gap-1",role:"toolbar","aria-label":"Input tools",children:[e(fy,{enabled:g.enabled,onClick:k}),e(hy,{})]}),l("div",{className:"flex items-center gap-1",children:[e(wu,{onTextUpdate:N,onComplete:A,onCancel:T,disabled:r,className:Jt.buttonSmall}),e(by,{canSend:v,isResponding:r,onSend:x,onStop:o})]})]})]})]})]})})};w();var Pu=({messages:t,onSend:o,onStop:r,onRegenerate:n,isResponding:a=false,className:i,placeholder:s,streamIntervalMs:c,streamChunkSize:p,onMessageStreamingComplete:u,cardHooks:d,showInput:f=true,statusLine:h})=>{let m=jt.useRef(null),y=jt.useRef(t.length);return jt.useEffect(()=>{t.length>y.current&&m.current?.scrollIntoView({behavior:"smooth"}),y.current=t.length;},[t]),l("div",{className:bt("flex flex-col h-full w-full relative",i),children:[l("div",{className:"flex-1 overflow-y-auto px-4 py-4 space-y-6 scrollbar-thin scrollbar-thumb-gray-300 dark:scrollbar-thumb-gray-600",children:[t.map((v,g)=>{let S=v.type==="assistant"&&g===t.length-1,b=v.type==="assistant"?{isLatestAssistant:S,isResponding:a,onRegenerate:n?()=>n(v.id):void 0}:void 0;return e(Wi,{message:v,assistantActions:b,onStreamingComplete:()=>u?.(v.id),streamIntervalMs:c,streamChunkSize:p,cardHooks:d},v.id)}),h,e("div",{ref:m})]}),f&&e("div",{className:"border-t border-[var(--orb-border,#dbdbdb)] bg-[var(--orb-canvas,#ffffff)] p-4 z-10",children:e(ku,{onSend:o||(async()=>{}),onStop:r||(()=>{}),isResponding:a,placeholder:s})})]})};w();var Iu={idle:"Idle",running:"Working",success:"Success",error:"Error",pending:"Pending"},Ru=({title:t="AI Agent",description:o,headerActions:r,className:n,agentStatus:a,statusText:i,onHeaderPointerDown:s,showInput:c=false,...p})=>{let u=a??(p.isResponding?"running":"idle"),d=u==="running"||u==="pending",f=[Iu[u],o].filter(Boolean).join(" \xB7 ");return l("div",{className:bt("orb-agent-panel",n),children:[l("div",{className:bt("orb-agent-header",s&&"cursor-grab active:cursor-grabbing"),onPointerDown:s,children:[e("span",{className:"orb-agent-avatar","aria-hidden":"true",children:"AI"}),l("div",{className:"min-w-0 flex-1",children:[e("div",{className:"orb-agent-title",children:t}),l("div",{className:"orb-agent-subtitle",children:[e("span",{className:"orb-agent-dot","data-active":d||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(Pu,{...p,showInput:c,statusLine:d?l("div",{className:bt("orb-agent-status-line","mb-1"),children:[e("span",{className:"orb-agent-spinner","aria-hidden":"true"}),e("span",{children:i??`${Iu[u]}\u2026`})]}):void 0})})]})};w();var Au=520,Cy=88,Sy=88,wy=24,Gi=640,Nu=(t,o,r)=>Math.min(Math.max(t,o),Math.max(o,r)),el=t=>typeof t=="number"?`${t}px`:t,ky=t=>t instanceof HTMLElement?!!t.closest('button,input,a,textarea,select,[role="button"],[contenteditable="true"]'):false,N2=({anchor:t,defaultAnchor:o="right",onAnchorChange:r,width:n=Au,top:a=Cy,bottom:i=Sy,inset:s=wy,zIndex:c=1300,shellClassName:p,shellStyle:u,className:d,onHeaderPointerDown:f,...h})=>{let m=jt.useRef(null),y=jt.useRef(null),[v,g]=jt.useState(o),[S,b]=jt.useState(0),[C,k]=jt.useState(typeof n=="number"?n:Au),[x,E]=jt.useState(0),[M,I]=jt.useState(false),N=t??v;jt.useEffect(()=>{let B=()=>b(window.innerWidth);return B(),window.addEventListener("resize",B),()=>window.removeEventListener("resize",B)},[]),jt.useLayoutEffect(()=>{let B=()=>{let V=m.current?.getBoundingClientRect();V?.width?k(V.width):typeof n=="number"&&k(n);};if(B(),!m.current||typeof ResizeObserver>"u")return;let _=new ResizeObserver(B);return _.observe(m.current),()=>_.disconnect()},[n]);let A=jt.useCallback(B=>{if(!S)return s;let _=S<Gi?12:s,V=Math.max(_,S-C-_);return S<Gi||B==="left"?_:B==="center"?Nu((S-C)/2,_,V):V},[s,C,S]),T=jt.useCallback(B=>["left","center","right"].reduce((V,K)=>{let Y=Math.abs(B-A(V));return Math.abs(B-A(K))<Y?K:V},"right"),[A]),D=jt.useCallback(B=>{t===void 0&&g(B),r?.(B);},[t,r]);jt.useEffect(()=>{M||E(A(N));},[A,M,N]);let R=jt.useCallback(B=>{f?.(B),!(B.defaultPrevented||ky(B.target))&&(B.preventDefault(),B.currentTarget.setPointerCapture(B.pointerId),y.current={pointerId:B.pointerId,startClientX:B.clientX,startX:x,currentX:x,captureElement:B.currentTarget},I(true));},[f,x]),F=jt.useCallback(B=>{let _=y.current;if(!_||_.pointerId!==B.pointerId)return;let V=S<Gi?12:s,K=Math.max(V,S-C-V),Y=Nu(_.startX+B.clientX-_.startClientX,V,K);_.currentX=Y,E(Y);},[s,C,S]),z=jt.useCallback(B=>{let _=y.current;if(!_||_.pointerId!==B.pointerId)return;try{_.captureElement.releasePointerCapture(B.pointerId);}catch{}let V=T(_.currentX);y.current=null,I(false),D(V),E(A(V));},[A,D,T]),Z=jt.useMemo(()=>({position:"fixed",top:el(a),bottom:el(i),left:x,width:el(n),maxWidth:`calc(100vw - ${S<Gi?24:s*2}px)`,zIndex:c,pointerEvents:"auto",transition:M?"none":"left 180ms ease-out",touchAction:"none",...u}),[i,s,M,x,u,a,S,n,c]);return e("div",{ref:m,className:bt("orbcafe-floating-agent-panel min-w-0",p),"data-anchor":N,"data-dragging":M?"true":"false",style:Z,onPointerMove:F,onPointerUp:z,onPointerCancel:z,children:e(Ru,{...h,className:d,onHeaderPointerDown:R})})};w();var Iy={"top-left":"bottom-right","top-right":"bottom-left","bottom-left":"top-right","bottom-right":"top-left"},H2=({messages:t,onSend:o,onRegenerate:r,isResponding:n=false,className:a,placeholder:i,title:s="Copilot",corner:c="bottom-right",onCollapse:p,onHeaderPointerDown:u,onPlusClick:d,onMicClick:f,streamIntervalMs:h,streamChunkSize:m,onMessageStreamingComplete:y,cardHooks:v})=>{let[g,S]=jt.useState(""),[b,C]=jt.useState(false),k=jt.useRef(null),x=Iy[c];jt.useEffect(()=>{k.current?.scrollIntoView({behavior:"smooth"});},[t,n]);let E=jt.useCallback(async()=>{let I=g.trim();!I||n||(S(""),await o(I));},[n,o,g]),M=jt.useCallback(async I=>{I.key==="Enter"&&!b&&(I.preventDefault(),await E());},[E,b]);return l("div",{className:bt("relative flex h-full w-full min-h-[460px] min-w-[340px] flex-col overflow-hidden rounded-3xl border border-gray-200 bg-white shadow-none dark:border-gray-800 dark:bg-gray-900",a),children:[p&&e("button",{onClick:p,className:bt("absolute z-20 flex h-10 w-10 items-center justify-center rounded-full transition-colors hover:bg-transparent dark:hover:bg-transparent",x==="top-left"&&"-left-2 -top-2",x==="top-right"&&"-right-2 -top-2",x==="bottom-left"&&"-bottom-2 -left-2",x==="bottom-right"&&"-bottom-2 -right-2"),type:"button","aria-label":"Collapse Copilot",children:e("span",{className:bt("block h-4 w-4 border-[#21BCFF]",x==="top-left"&&"rounded-tl-full border-l-[3px] border-t-[3px]",x==="top-right"&&"rounded-tr-full border-r-[3px] border-t-[3px]",x==="bottom-left"&&"rounded-bl-full border-b-[3px] border-l-[3px]",x==="bottom-right"&&"rounded-br-full border-b-[3px] border-r-[3px]")})}),l("div",{className:"flex items-center justify-between border-b border-gray-100 px-4 py-3 dark:border-gray-800",onPointerDown:u,children:[e("div",{className:"flex items-center",children:e("h3",{className:"text-base font-semibold tracking-tight text-gray-900 dark:text-gray-100",children:s})}),e("div",{})]}),l("div",{className:"flex-1 overflow-y-auto px-3 py-3 space-y-5 scrollbar-thin scrollbar-thumb-gray-300 dark:scrollbar-thumb-gray-600",children:[t.map((I,N)=>{let A=I.type==="assistant"&&N===t.length-1,T=I.type==="assistant"?{isLatestAssistant:A,isResponding:n,onRegenerate:r?()=>r(I.id):void 0}:void 0;return e(Wi,{message:I,assistantActions:T,onStreamingComplete:()=>y?.(I.id),streamIntervalMs:h,streamChunkSize:m,cardHooks:v},I.id)}),e("div",{ref:k})]}),e("div",{className:"border-t border-gray-100 px-3 py-3 dark:border-gray-800",children:l("div",{className:"flex items-center gap-2 rounded-xl border border-blue-300/80 bg-white px-2 py-1.5 dark:bg-gray-900",children:[e("button",{className:"flex h-8 w-8 items-center justify-center rounded-full text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200",onClick:d,type:"button","aria-label":"Add",children:e(zl,{className:"h-4 w-4"})}),e("input",{className:"h-7 flex-1 border-none bg-transparent text-sm text-gray-800 outline-none placeholder:text-gray-400 dark:text-gray-100 dark:placeholder:text-gray-500",placeholder:i||"Ask Copilot...",value:g,onChange:I=>S(I.target.value),onCompositionStart:()=>C(true),onCompositionEnd:()=>C(false),onKeyDown:M,"aria-label":"Copilot input",spellCheck:false}),e("button",{className:"flex h-8 w-8 items-center justify-center rounded-full text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200",onClick:f,type:"button","aria-label":"Microphone",children:e(da,{className:"h-4 w-4"})})]})})]})};w();var Ry=["#154194","#154194","#154194"],My=`
|
|
199
200
|
.orbcafe-ai-browser-glow {
|
|
200
201
|
position: fixed;
|
|
201
202
|
inset: 0;
|
|
@@ -205,48 +206,26 @@ ${o}: ${(a??r)(u.secondaryValue??0)}`:""]})}),jsxRuntime.jsx("text",{x:u.x,y:Mat
|
|
|
205
206
|
pointer-events: none;
|
|
206
207
|
overflow: hidden;
|
|
207
208
|
contain: paint;
|
|
208
|
-
clip-path: inset(0);
|
|
209
209
|
opacity: 0;
|
|
210
210
|
transition: opacity 260ms ease;
|
|
211
|
-
--orbcafe-ai-glow-
|
|
212
|
-
--orbcafe-ai-glow-b: #24e070;
|
|
213
|
-
--orbcafe-ai-glow-c: #3090ff;
|
|
211
|
+
--orbcafe-ai-glow-line: var(--orb-primary, #154194);
|
|
214
212
|
}
|
|
215
213
|
|
|
216
214
|
.orbcafe-ai-browser-glow[data-active='true'] {
|
|
217
215
|
opacity: 1;
|
|
218
216
|
}
|
|
219
217
|
|
|
220
|
-
.orbcafe-ai-browser-glow::before
|
|
221
|
-
.orbcafe-ai-browser-glow::after {
|
|
218
|
+
.orbcafe-ai-browser-glow::before {
|
|
222
219
|
content: '';
|
|
223
220
|
position: absolute;
|
|
224
221
|
inset: 0;
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
.orbcafe-ai-browser-glow::before {
|
|
229
|
-
border: 1px solid color-mix(in srgb, var(--orbcafe-ai-glow-c) 54%, transparent);
|
|
230
|
-
box-shadow:
|
|
231
|
-
inset 0 0 18px color-mix(in srgb, var(--orbcafe-ai-glow-a) 56%, transparent),
|
|
232
|
-
inset 0 0 38px color-mix(in srgb, var(--orbcafe-ai-glow-b) 44%, transparent),
|
|
233
|
-
inset 0 0 74px color-mix(in srgb, var(--orbcafe-ai-glow-c) 36%, transparent),
|
|
234
|
-
0 0 22px color-mix(in srgb, var(--orbcafe-ai-glow-a) 42%, transparent);
|
|
235
|
-
animation: orbcafeAIBrowserGlowPulse 2.2s ease-in-out infinite;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.orbcafe-ai-browser-glow::after {
|
|
239
|
-
background:
|
|
240
|
-
linear-gradient(90deg, var(--orbcafe-ai-glow-a), var(--orbcafe-ai-glow-b), var(--orbcafe-ai-glow-c)) top / 100% 5px no-repeat,
|
|
241
|
-
linear-gradient(90deg, var(--orbcafe-ai-glow-c), var(--orbcafe-ai-glow-b), var(--orbcafe-ai-glow-a)) bottom / 100% 5px no-repeat,
|
|
242
|
-
linear-gradient(180deg, var(--orbcafe-ai-glow-a), var(--orbcafe-ai-glow-b), var(--orbcafe-ai-glow-c)) left / 5px 100% no-repeat,
|
|
243
|
-
linear-gradient(180deg, var(--orbcafe-ai-glow-c), var(--orbcafe-ai-glow-b), var(--orbcafe-ai-glow-a)) right / 5px 100% no-repeat;
|
|
244
|
-
filter: blur(9px) saturate(1.35);
|
|
245
|
-
opacity: 0.78;
|
|
222
|
+
border: 2px solid var(--orbcafe-ai-glow-line);
|
|
223
|
+
box-shadow: 0 0 0 1px color-mix(in srgb, var(--orbcafe-ai-glow-line) 14%, transparent);
|
|
224
|
+
animation: orbcafeAiGlowBreath 2.4s ease-in-out infinite;
|
|
246
225
|
}
|
|
247
226
|
|
|
248
|
-
@keyframes
|
|
249
|
-
0%, 100% { opacity: 0.
|
|
250
|
-
50% { opacity:
|
|
227
|
+
@keyframes orbcafeAiGlowBreath {
|
|
228
|
+
0%, 100% { opacity: 0.5; }
|
|
229
|
+
50% { opacity: 1; }
|
|
251
230
|
}
|
|
252
|
-
`,g8=({active:e=false,colors:t=LT,zIndex:o=2147483e3})=>{let r={"--orbcafe-ai-glow-a":t[0],"--orbcafe-ai-glow-b":t[1],"--orbcafe-ai-glow-c":t[2],"--orbcafe-ai-glow-z-index":o};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("style",{children:NT}),jsxRuntime.jsx("div",{className:"orbcafe-ai-browser-glow","data-active":e?"true":"false",style:r,"aria-hidden":"true"})]})};var y8=({defaultMode:e="login",onLogin:t,onRegister:o,onForgotPassword:r}={})=>{let[a,n]=Qt.useState(e),[i,c]=Qt.useState(false),d=Qt.useCallback(async p=>{c(true);try{await p?.();}finally{c(false);}},[]),l=Qt.useCallback(p=>d(()=>t?.(p)),[t,d]),s=Qt.useCallback(p=>d(()=>o?.(p)),[o,d]),g=Qt.useCallback(p=>d(()=>r?.(p)),[r,d]),f=Qt.useMemo(()=>({mode:a,loading:i,onModeChange:n,onLogin:l,onRegister:s,onForgotPassword:g}),[g,l,s,i,a]);return {mode:a,loading:i,setMode:n,authPageProps:f}};var eu=({label:e,...t})=>jsxRuntime.jsx(material.FormControlLabel,{control:jsxRuntime.jsx(material.Checkbox,{...t}),label:e});var rl=Qt.forwardRef((e,t)=>jsxRuntime.jsx(material.Paper,{ref:t,...e,elevation:e.elevation||1,sx:{p:2,mb:2,...e.sx}}));rl.displayName="CPaper";var YT={productName:"ORBCAFE",headline:"Operational workbench",subheadline:"A focused entry point for reports, planning, agent workflows, and enterprise operations.",loginTitle:"Sign in",loginSubtitle:"Use your workspace 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."},O8=({mode:e,defaultMode:t="login",onModeChange:o,onLogin:r,onRegister:a,onForgotPassword:n,loading:i=false,logo:c,copy:d,sx:l})=>{let s=material.useTheme(),g=e!==void 0,[f,p]=Qt.useState(t),b=e??f,y=Qt.useMemo(()=>({...YT,...d}),[d]),[u,C]=Qt.useState({username:"demo@orbcafe.local",password:"orbcafe-demo",remember:true}),[m,h]=Qt.useState({name:"",email:"",password:"",confirmPassword:"",acceptedTerms:false}),[x,w]=Qt.useState({email:""}),[E,R]=Qt.useState(""),T=M=>{g||p(M),R(""),o?.(M);},I=async M=>{M.preventDefault(),await r?.(u),R("Demo login accepted. No real authentication request was sent.");},k=async M=>{M.preventDefault(),await a?.(m),R("Demo registration saved locally for this screen.");},S=async M=>{M.preventDefault(),await n?.(x),R("Demo reset link request created. No email was sent.");},D=b==="login"?y.loginTitle:b==="register"?y.registerTitle:y.forgotTitle,P=b==="login"?y.loginSubtitle:b==="register"?y.registerSubtitle:y.forgotSubtitle;return jsxRuntime.jsxs(material.Box,{sx:{minHeight:"100vh",display:"grid",gridTemplateColumns:{xs:"1fr",md:"minmax(320px, 0.9fr) minmax(420px, 1.1fr)"},background:s.palette.mode==="dark"?"linear-gradient(135deg, #071018 0%, #151515 48%, #101827 100%)":"linear-gradient(135deg, #eef3f8 0%, #ffffff 52%, #e8f2f0 100%)",...l},children:[jsxRuntime.jsxs(material.Box,{sx:{display:{xs:"none",md:"flex"},flexDirection:"column",justifyContent:"space-between",p:{md:6,lg:8},borderRight:`1px solid ${s.palette.divider}`},children:[jsxRuntime.jsxs(material.Stack,{spacing:4,children:[jsxRuntime.jsx(material.Box,{children:c}),jsxRuntime.jsxs(material.Stack,{spacing:2,children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:14,fontWeight:700,color:"primary.main",textTransform:"uppercase"},children:y.productName}),jsxRuntime.jsx(material.Typography,{sx:{fontSize:{md:34,lg:42},lineHeight:1.06,fontWeight:800},children:y.headline}),jsxRuntime.jsx(material.Typography,{sx:{maxWidth:460,color:"text.secondary",fontSize:16,lineHeight:1.7},children:y.subheadline})]})]}),jsxRuntime.jsxs(material.Stack,{direction:"row",spacing:2,sx:{color:"text.secondary",fontSize:13},children:[jsxRuntime.jsx(material.Typography,{variant:"caption",children:"Reports"}),jsxRuntime.jsx(material.Typography,{variant:"caption",children:"Planning"}),jsxRuntime.jsx(material.Typography,{variant:"caption",children:"Agent UI"})]})]}),jsxRuntime.jsx(material.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",p:{xs:2,sm:4,md:6}},children:jsxRuntime.jsx(rl,{elevation:0,sx:{width:"100%",maxWidth:460,m:0,p:{xs:2.5,sm:4},borderRadius:3,border:`1px solid ${s.palette.divider}`,backgroundColor:s.palette.mode==="dark"?"rgba(15, 23, 42, 0.86)":"rgba(255, 255, 255, 0.88)",backdropFilter:"blur(18px)",boxShadow:s.palette.mode==="dark"?"0 24px 80px rgba(0,0,0,0.34)":"0 24px 80px rgba(15,23,42,0.10)"},children:jsxRuntime.jsxs(material.Stack,{spacing:3,children:[jsxRuntime.jsxs(material.Stack,{spacing:1,children:[jsxRuntime.jsx(material.Box,{sx:{display:{xs:"block",md:"none"},mb:1},children:c}),jsxRuntime.jsx(material.Typography,{sx:{fontSize:28,fontWeight:800},children:D}),jsxRuntime.jsx(material.Typography,{sx:{color:"text.secondary"},children:P})]}),E&&jsxRuntime.jsx(material.Alert,{severity:"success",children:E}),b==="login"&&jsxRuntime.jsx(material.Box,{component:"form",onSubmit:I,children:jsxRuntime.jsxs(material.Stack,{spacing:2,children:[jsxRuntime.jsx(Io,{label:"Email or user ID",value:u.username,onChange:M=>C(B=>({...B,username:M.target.value})),InputProps:{startAdornment:jsxRuntime.jsx(material.InputAdornment,{position:"start",children:jsxRuntime.jsx(rh__default.default,{fontSize:"small"})})}}),jsxRuntime.jsx(Io,{label:"Password",type:"password",value:u.password,onChange:M=>C(B=>({...B,password:M.target.value})),InputProps:{startAdornment:jsxRuntime.jsx(material.InputAdornment,{position:"start",children:jsxRuntime.jsx(XT__default.default,{fontSize:"small"})})}}),jsxRuntime.jsxs(material.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:2},children:[jsxRuntime.jsx(eu,{label:"Remember me",checked:u.remember,onChange:M=>C(B=>({...B,remember:M.target.checked}))}),jsxRuntime.jsx(ur,{type:"button",variant:"text",size:"small",onClick:()=>T("forgot"),children:"Forgot?"})]}),jsxRuntime.jsx(ur,{type:"submit",size:"large",disabled:i,children:"Sign in"}),jsxRuntime.jsxs(material.Typography,{variant:"body2",sx:{color:"text.secondary",textAlign:"center"},children:["New user?"," ",jsxRuntime.jsx(ur,{type:"button",variant:"text",size:"small",onClick:()=>T("register"),sx:{minWidth:0,p:0},children:"Register"})]})]})}),b==="register"&&jsxRuntime.jsx(material.Box,{component:"form",onSubmit:k,children:jsxRuntime.jsxs(material.Stack,{spacing:2,children:[jsxRuntime.jsx(Io,{label:"Full name",value:m.name,onChange:M=>h(B=>({...B,name:M.target.value})),InputProps:{startAdornment:jsxRuntime.jsx(material.InputAdornment,{position:"start",children:jsxRuntime.jsx(rh__default.default,{fontSize:"small"})})}}),jsxRuntime.jsx(Io,{label:"Work email",type:"email",value:m.email,onChange:M=>h(B=>({...B,email:M.target.value})),InputProps:{startAdornment:jsxRuntime.jsx(material.InputAdornment,{position:"start",children:jsxRuntime.jsx(oh__default.default,{fontSize:"small"})})}}),jsxRuntime.jsx(Io,{label:"Password",type:"password",value:m.password,onChange:M=>h(B=>({...B,password:M.target.value})),InputProps:{startAdornment:jsxRuntime.jsx(material.InputAdornment,{position:"start",children:jsxRuntime.jsx(ZT__default.default,{fontSize:"small"})})}}),jsxRuntime.jsx(Io,{label:"Confirm password",type:"password",value:m.confirmPassword,onChange:M=>h(B=>({...B,confirmPassword:M.target.value}))}),jsxRuntime.jsx(eu,{label:"I accept the demo workspace terms",checked:m.acceptedTerms,onChange:M=>h(B=>({...B,acceptedTerms:M.target.checked}))}),jsxRuntime.jsx(ur,{type:"submit",size:"large",disabled:i,children:"Create demo account"}),jsxRuntime.jsxs(material.Typography,{variant:"body2",sx:{color:"text.secondary",textAlign:"center"},children:["Already have an account?"," ",jsxRuntime.jsx(ur,{type:"button",variant:"text",size:"small",onClick:()=>T("login"),sx:{minWidth:0,p:0},children:"Sign in"})]})]})}),b==="forgot"&&jsxRuntime.jsx(material.Box,{component:"form",onSubmit:S,children:jsxRuntime.jsxs(material.Stack,{spacing:2,children:[jsxRuntime.jsx(Io,{label:"Work email",type:"email",value:x.email,onChange:M=>w({email:M.target.value}),InputProps:{startAdornment:jsxRuntime.jsx(material.InputAdornment,{position:"start",children:jsxRuntime.jsx(oh__default.default,{fontSize:"small"})})}}),jsxRuntime.jsx(ur,{type:"submit",size:"large",disabled:i,children:"Send reset request"}),jsxRuntime.jsxs(material.Typography,{variant:"body2",sx:{color:"text.secondary",textAlign:"center"},children:["Remember your password?"," ",jsxRuntime.jsx(ur,{type:"button",variant:"text",size:"small",onClick:()=>T("login"),sx:{minWidth:0,p:0},children:"Back to sign in"})]})]})}),jsxRuntime.jsx(material.Divider,{}),jsxRuntime.jsx(material.Typography,{variant:"caption",sx:{color:"text.secondary"},children:"Demo credentials: demo@orbcafe.local / orbcafe-demo"})]})})})]})};var JT={keyword:{value:"",operator:"contains"},status:{value:"",operator:"equals"},owner:{value:"",operator:"contains"},workCenter:{value:"",operator:"contains"}},eI=[{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"}],ah=({tasks:e,appId:t,tableKey:o,defaultScale:r="week",defaultSelectedTaskId:a,initialFilters:n,filterFields:i,filterAppId:c,filterTableKey:d,serviceUrl:l,variantService:s,layout:g,columns:f,page:p,rowsPerPage:b,rowsPerPageOptions:y,count:u,onPageChange:C,onRowsPerPageChange:m,onFilterSearch:h,onFilterVariantLoad:x,enableRowReorder:w,onTaskReorder:E,onLayoutIdChange:R,onLayoutSave:T})=>{let I=t??c??"planning-gantt",k=o??d??"planning",[S,D]=Qt.useState(r),[P,M]=Qt.useState(a??e[0]?.id??""),[B,X]=Qt.useState(""),[L,Z]=Qt.useState(null),[$,q]=Qt.useState({...JT,...n}),H=Qt.useMemo(()=>{let oe=String($.keyword?.value??"").trim().toLowerCase(),Ie=String($.status?.value??"").trim(),Ze=String($.owner?.value??"").trim().toLowerCase(),Ge=String($.workCenter?.value??"").trim().toLowerCase(),ce=$.dateRange?.value,Ve=ce?.[0]?zr__default.default(ce[0]):null,et=ce?.[1]?zr__default.default(ce[1]):null;return e.filter(ye=>{if(oe&&![ye.id,ye.code,ye.title,ye.project,ye.workCenter,ye.owner?.name].join(" ").toLowerCase().includes(oe)||Ie&&ye.status!==Ie||Ze&&!String(ye.owner?.name??"").toLowerCase().includes(Ze)||Ge&&!String(ye.workCenter??"").toLowerCase().includes(Ge))return false;if(Ve||et){let We=zr__default.default(ye.startDate),qe=zr__default.default(ye.endDate),st=Ve?qe.isAfter(Ve)||qe.isSame(Ve,"day"):true,Pe=et?We.isBefore(et)||We.isSame(et,"day"):true;if(!st||!Pe)return false}return true})},[$,e]);Qt.useEffect(()=>{H.length!==0&&(H.some(oe=>oe.id===P)||M(H[0].id));},[H,P]);let re=Qt.useCallback(oe=>{M(oe.id);},[]),de=Qt.useCallback(oe=>{X(oe),R?.(oe);},[R]),Ce=Qt.useCallback(oe=>{Z(Ie=>({key:(Ie?.key??0)+1,variant:oe})),x?.(oe);},[x]),ve=Qt.useMemo(()=>({appId:I,tableKey:k,fields:i??eI,filters:$,onFilterChange:q,onVariantLoad:Ce,onSearch:h??(()=>{}),currentLayoutId:B,layoutRefs:[{tableKey:k,layoutId:B||null}],variantService:s,serviceUrl:l}),[B,i,$,Ce,h,I,k,l,s]),le=Qt.useMemo(()=>({appId:I,tableKey:k,serviceUrl:l,tasks:H,columns:f,scale:S,onScaleChange:D,page:p,rowsPerPage:b,rowsPerPageOptions:y,count:u,onPageChange:C,onRowsPerPageChange:m,selectedTaskId:P,onTaskSelect:re,enableRowReorder:w,onTaskReorder:E,layout:g,layoutVariant:L?.variant,layoutVariantLoadKey:L?.key,onLayoutIdChange:de,onLayoutSave:T}),[f,u,w,H,de,g,L?.key,L?.variant,C,m,T,E,re,p,I,k,b,y,S,l,P]);return {scale:S,setScale:D,selectedTaskId:P,setSelectedTaskId:M,filters:$,setFilters:q,filteredTasks:H,smartFilterProps:ve,planningGanttProps:le}};var K8=e=>{let t=ah(e),o=Qt.useMemo(()=>({filterProps:t.smartFilterProps,ganttProps:t.planningGanttProps}),[t.planningGanttProps,t.smartFilterProps]);return {...t,layoutProps:o}};var nh=e=>jsxRuntime.jsx(material.Chip,{...e,size:e.size||"small",variant:e.variant||"outlined"});var Oo=Qt.forwardRef(({tooltip:e,...t},o)=>{let r=jsxRuntime.jsx(material.IconButton,{ref:o,...t,size:t.size||"small"});return e?jsxRuntime.jsx(material.Tooltip,{title:e,children:r}):r});Oo.displayName="CIconButton";var lh=({label:e,options:t,minWidth:o=120,...r})=>jsxRuntime.jsxs(material.FormControl,{fullWidth:true,size:"small",sx:{minWidth:o},children:[e&&jsxRuntime.jsx(material.InputLabel,{children:e}),jsxRuntime.jsx(material.Select,{label:e,...r,children:t.map(a=>jsxRuntime.jsx(material.MenuItem,{value:a.value,children:a.label},a.value))})]});zr__default.default.extend(mI__default.default);var iu=[{value:"hour",label:"Hour",width:56},{value:"day",label:"Day",width:46},{value:"week",label:"Week",width:78},{value:"month",label:"Month",width:104}],lu=56,en=58,il=8,su=260,NI=320,ec="0.85rem",tn="220ms cubic-bezier(0.2, 0, 0, 1)",dh={"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"}},zI=e=>e?dh[e]?.label??e:"Planned",OI=e=>e?dh[e]?.color??"default":"info",uh=e=>Math.min(100,Math.max(0,e??0)),ph=(e,t=0)=>e.flatMap(o=>[{...o,level:t},...ph(o.children??[],t+1)]),VI=e=>({id:e.id,code:e.code??e.id,title:e.title,titleSub:e.project??e.workCenter??"General",project:e.project??"",workCenter:e.workCenter??"",owner:e.owner?.name??"Unassigned",status:zI(e.status),statusTone:e.status??"planned",progress:uh(e.progress),startDate:e.startDate,endDate:e.endDate,color:e.color,reorderable:e.reorderable!==false}),mh=(e,t)=>t==="month"?e.startOf("month"):t==="week"?e.startOf("week"):t==="day"?e.startOf("day"):e.startOf("hour"),gh=(e,t)=>t==="month"?e.endOf("month"):t==="week"?e.endOf("week"):t==="day"?e.endOf("day"):e.endOf("hour"),WI=(e,t,o)=>{let r=[],a=mh(e,o),n=gh(t,o);for(;a.isBefore(n)||a.isSame(n);){let i=o==="month"?a.add(1,"month"):o==="week"?a.add(1,"week"):o==="day"?a.add(1,"day"):a.add(1,"hour");r.push({key:`${o}-${a.valueOf()}`,label:o==="month"?a.format("MMM YYYY"):o==="week"?a.format("MMM D"):o==="day"?a.format("D"):a.format("HH:mm"),contextLabel:o==="hour"?a.format("MMM D"):o==="day"?a.format("MMM"):o==="week"?`W${a.isoWeek()}`:void 0,title:o==="hour"?a.format("MMM D, YYYY HH:mm"):o==="day"?a.format("MMM D, YYYY"):o==="week"?`${a.format("MMM D, YYYY")} - Week ${a.isoWeek()}`:void 0,start:a,end:i}),a=i;}return r},cu=(e,t,o)=>{let r=0;for(let a of t){if(e.isBefore(a.start))return r;if(e.isBefore(a.end)){let n=Math.max(1,a.end.valueOf()-a.start.valueOf()),i=Math.max(0,e.valueOf()-a.start.valueOf());return r+i/n*o}r+=o;}return r},fh=({appId:e="planning-gantt",tableKey:t="planning",serviceUrl:o,title:r="Project Plan",extraTools:a,bodyHeight:n=560,tasks:i,columns:c,scale:d="week",onScaleChange:l,page:s,rowsPerPage:g=20,rowsPerPageOptions:f=[20,50,100,-1],count:p,onPageChange:b,onRowsPerPageChange:y,timelineStart:u,timelineEnd:C,selectedTaskId:m,onTaskSelect:h,enableRowReorder:x=true,onTaskReorder:w,layout:E,layoutVariant:R,layoutVariantLoadKey:T,onLayoutIdChange:I,onLayoutSave:k,emptyLabel:S="No planning tasks available.",sx:D})=>{let P=material.useTheme(),{t:M}=ne(),B=Qt.useRef(null),X=Qt.useRef(null),L=Qt.useRef(null),Z=Qt.useRef(false),[$,q]=Qt.useState(null),[H,re]=Qt.useState("content"),[de,Ce]=Qt.useState(null),[ve,le]=Qt.useState(0),[oe,Ie]=Qt.useState({}),[Ze,Ge]=Qt.useState(lu),[ce,Ve]=Qt.useState([]),et=Qt.useRef(void 0),[ye,We]=Qt.useState({activeId:null,overId:null}),[qe,st]=Qt.useState(null),[Pe,K]=Qt.useState(false),Ee=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:4}})),ge=Qt.useRef(null),ke=Qt.useMemo(()=>ph(i),[i]),rt=Qt.useMemo(()=>{if(ce.length===0)return ke;let A=new Map(ke.map(se=>[se.id,se])),j=ce.map(se=>A.get(se)).filter(se=>!!se),ee=new Set(j.map(se=>se.id));return [...j,...ke.filter(se=>!ee.has(se.id))]},[ke,ce]),Ue=Qt.useMemo(()=>new Map(rt.map(A=>[A.id,A])),[rt]),ae=Qt.useMemo(()=>rt.map(A=>VI(A)),[rt]),fe=Qt.useMemo(()=>new Map(ae.map(A=>[A.id,A])),[ae]),je=Qt.useMemo(()=>[{id:"code",label:"ID",minWidth:90},{id:"title",label:"Task",minWidth:260,render:(A,j)=>jsxRuntime.jsxs(material.Stack,{spacing:.2,children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:15,fontWeight:700,lineHeight:1.2},children:j.title}),jsxRuntime.jsx(material.Typography,{sx:{fontSize:13,color:"text.secondary"},children:j.titleSub})]})},{id:"owner",label:"Owner",minWidth:170},{id:"status",label:"Status",minWidth:130,render:(A,j)=>jsxRuntime.jsx(nh,{label:j.status,color:OI(j.statusTone),size:"small"})},{id:"progress",label:"Progress",minWidth:140,numeric:true,render:A=>jsxRuntime.jsxs(material.Stack,{spacing:.6,children:[jsxRuntime.jsxs(material.Typography,{variant:"caption",sx:{color:"text.secondary"},children:[A,"%"]}),jsxRuntime.jsx(material.LinearProgress,{variant:"determinate",value:A,sx:{height:6,borderRadius:999}})]})},{id:"startDate",label:"Start",minWidth:120},{id:"endDate",label:"End",minWidth:120}],[]),It=Qt.useMemo(()=>{if(!c||c.length===0)return je;let A=new Map(je.map(j=>[j.id,j]));return c.map(j=>{let ee=A.get(j.id),se=j.width??ee?.minWidth??120,Le={id:j.id,label:j.label,minWidth:se};if(ee?.numeric&&(Le.numeric=true),j.render){let _e=j.render;return Le.render=(gt,Re)=>{let ut=Ue.get(Re.id);return _e(ut||Re)},Le}return ee?.render?(Le.render=ee.render,Le):(Le.render=(_e,gt)=>{let Re=gt[j.id];if(Re!=null&&String(Re).length>0)return String(Re);let nt=Ue.get(gt.id)?.[j.id];return nt!=null&&String(nt).length>0?String(nt):"-"},Le)})},[c,je,Ue]),_=Tn({appId:e,tableKey:t,title:r,columns:It,rows:ae,rowKey:"id",page:s,rowsPerPage:g,rowsPerPageOptions:f,count:p??ae.length,onPageChange:b,onRowsPerPageChange:y,showSummary:false,layout:E,onLayoutSave:k}),ze=e?jsxRuntime.jsx(wn,{appId:e,tableKey:t,currentLayoutData:_.currentLayoutData,onLayoutLoad:_.handleLayoutLoad,targetLayoutId:_.layoutIdToLoad,activeLayoutId:_.currentLayoutId,serviceUrl:o}):null,xe=_.visibleRows,Y=_.rowsPerPage===-1?1:Math.max(1,Math.ceil(_.totalDisplayCount/_.rowsPerPage)),N=Math.max(0,Math.min(_.page,Y-1)),J=Math.min(N+1,Y),we=N>0,Me=N<Y-1&&_.rowsPerPage!==-1;Qt.useEffect(()=>{let A=ke.map(j=>j.id);Ve(j=>{let ee=new Set(A),se=j.filter(Re=>ee.has(Re)),Le=new Set(se),_e=A.filter(Re=>!Le.has(Re)),gt=[...se,..._e];return gt.length===j.length&>.every((Re,ut)=>Re===j[ut])?j:gt});},[ke]),Qt.useEffect(()=>{T===void 0||!R||et.current!==T&&(et.current=T,_.handleVariantLoad(R));},[_,R,T]),Qt.useEffect(()=>{I?.(_.currentLayoutId);},[_.currentLayoutId,I]);let tt=A=>A.type==="group"?`group-${A.id}`:`row-${(A.data||A)?.id}`,bt=Qt.useMemo(()=>{let A=ae.map(ut=>zr__default.default(ut.startDate)),j=ae.map(ut=>zr__default.default(ut.endDate)),ee=u?zr__default.default(u):A.reduce((ut,nt)=>nt.isBefore(ut)?nt:ut,A[0]??zr__default.default()),se=C?zr__default.default(C):j.reduce((ut,nt)=>nt.isAfter(ut)?nt:ut,j[0]??zr__default.default().add(30,"day")),Le=d==="month"?"month":d==="week"?"week":d==="day"?"day":"hour",_e=d==="month"?"month":d==="week"?"week":d==="day"?"day":"hour",gt=d==="hour"?12:1,Re=d==="hour"?12:1;return {start:mh(ee.subtract(gt,Le),d),end:gh(se.add(Re,_e),d)}},[ae,d,C,u]),dt=iu.find(A=>A.value===d)??iu[1],Vt=Array.isArray(a)?a:a?[a]:[],vt=Qt.useMemo(()=>WI(bt.start,bt.end,d),[bt.end,bt.start,d]),ko=vt.length*dt.width,Ct=vt.length>0?100/vt.length:100,sr=vt.length>0?`repeat(${vt.length}, minmax(${dt.width}px, 1fr))`:"1fr",lo=vt.length>0?`calc(100% / ${vt.length}) 100%`:"100% 100%",Et=(_.columns||[]).filter(A=>_.visibleColumns.includes(A.id)).reduce((A,j)=>A+(_.columnWidths?.[j.id]||j.minWidth||100),0)+(_.grouping.length>0?72:0),Gt=H==="manual"&&$!==null?$:Et,yt=de==="table",ao=de==="timeline",O=de==="timeline",W=de==="table",U=!O&&!W,me=()=>{let A=ve||B.current?.clientWidth||0;return A>0?Math.max(su,A-il-NI):Math.max(su,Et)},pe=A=>Math.min(Math.max(A,su),me()),Xe=(()=>{if(ve<=0)return null;let A=U?il:0;if(yt)return {tableWidth:ve,splitterWidth:A,timelineWidth:0};if(ao)return {tableWidth:0,splitterWidth:A,timelineWidth:ve};if(H==="even"){let ee=Math.max(0,(ve-A)/2);return {tableWidth:ee,splitterWidth:A,timelineWidth:Math.max(0,ve-A-ee)}}let j=pe(Gt);return {tableWidth:j,splitterWidth:A,timelineWidth:Math.max(0,ve-A-j)}})(),Ye=Xe?`${Xe.tableWidth}px ${Xe.splitterWidth}px ${Xe.timelineWidth}px`:yt?"minmax(0, 1fr) 0px 0px":ao?"0px 0px minmax(0, 1fr)":H==="even"?`minmax(0, 1fr) ${il}px minmax(0, 1fr)`:`${Gt}px ${il}px minmax(0, 1fr)`;Qt.useEffect(()=>{H==="manual"&&q(A=>A===null?null:pe(A));},[H,Et,ve]);let ot=A=>{A.preventDefault(),A.currentTarget.setPointerCapture(A.pointerId),Ce(null),re("manual"),ge.current={startX:A.clientX,startWidth:X.current?.getBoundingClientRect().width??Gt};let j=se=>{let Le=ge.current;if(!Le)return;let _e=pe(Le.startWidth+se.clientX-Le.startX);q(_e);},ee=()=>{ge.current=null,window.removeEventListener("pointermove",j),window.removeEventListener("pointerup",ee),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",ee);},Dt=()=>{Ce(null),re("even"),q(null);},pt=A=>!x||!A?false:fe.get(A)?.reorderable!==false,mt=(A,j)=>{if(!A||!j||A===j||!pt(A)||!pt(j))return false;if(_.grouping.length===0)return true;let ee=fe.get(A),se=fe.get(j);return !ee||!se?false:_.grouping.every(Le=>ee[Le]===se[Le])},St=(A,j)=>{if(!mt(A,j))return;let ee=xe.filter(ht=>ht.type!=="group").map(ht=>String((ht.data||ht)?.id)),se=ee.indexOf(A),Le=ee.indexOf(j);if(se<0||Le<0)return;let _e=[...ee];[_e[se],_e[Le]]=[_e[Le],_e[se]];let gt=new Set(ee),Re=rt.map(ht=>ht.id),ut=[..._e,...Re.filter(ht=>!gt.has(ht))],nt=Ue.get(A),Pt=Ue.get(j);if(_.setOrder("asc"),_.setOrderBy(""),Ve(ut),nt&&Pt){let{level:ht,...eo}=nt,{level:so,...To}=Pt,Xt=ut.reduce((xo,Rt)=>{let Ut=Ue.get(Rt);if(Ut){let{level:cr,...dr}=Ut;xo.push(dr);}return xo},[]);w?.(Xt,{activeTask:eo,targetTask:To});}},Wt=(A,j)=>{if(!pt(j.id)){A.preventDefault();return}A.stopPropagation(),A.dataTransfer.effectAllowed="move",A.dataTransfer.setData("text/plain",j.id),We({activeId:j.id,overId:null}),h?.(Ue.get(j.id)||j);},ct=(A,j)=>{if(!mt(ye.activeId,j)){We(ee=>ee.overId===null?ee:{...ee,overId:null});return}A.preventDefault(),A.stopPropagation(),A.dataTransfer.dropEffect="move",We(ee=>ee.overId===j?ee:{...ee,overId:j});},Ao=(A,j)=>{let ee=ye.activeId||A.dataTransfer.getData("text/plain");if(!mt(ee,j)){We({activeId:null,overId:null});return}A.preventDefault(),A.stopPropagation(),St(ee,j),We({activeId:null,overId:null});},wo=()=>{We({activeId:null,overId:null});},Yo=A=>{if(Z.current)return;let j=A==="table"?X.current:L.current,ee=A==="table"?L.current:X.current;!j||!ee||(Z.current=true,ee.scrollTop=j.scrollTop,window.requestAnimationFrame(()=>{Z.current=false;}));};return Qt.useLayoutEffect(()=>{let A=B.current;if(!A){le(0);return}let j=0,ee=()=>{window.cancelAnimationFrame(j),j=window.requestAnimationFrame(()=>{let Le=A.clientWidth;le(_e=>Math.abs(_e-Le)<.5?_e:Le);});};if(ee(),typeof ResizeObserver>"u")return window.addEventListener("resize",ee),()=>{window.cancelAnimationFrame(j),window.removeEventListener("resize",ee);};let se=new ResizeObserver(ee);return se.observe(A),window.addEventListener("resize",ee),()=>{window.cancelAnimationFrame(j),se.disconnect(),window.removeEventListener("resize",ee);}},[ae.length]),Qt.useLayoutEffect(()=>{if(!m||W)return;let A=L.current,j=X.current;if(!A)return;let ee=`row-${m}`,se=Array.from(A.querySelectorAll("[data-planning-timeline-row-key]")).find(gt=>gt.dataset.planningTimelineRowKey===ee),Le=fe.get(m);if(!se||!Le)return;let _e=window.requestAnimationFrame(()=>{let gt=A.getBoundingClientRect(),Re=se.getBoundingClientRect(),ut=Math.max(1,A.clientHeight-Ze),nt=A.scrollTop+Re.top-gt.top-Ze-(ut-Re.height)/2;Z.current=true,A.scrollTop=Math.max(0,nt),j&&!O&&(j.scrollTop=A.scrollTop);let Pt=Math.max(1,A.scrollWidth),ht=vt.length>0?Pt/vt.length:dt.width,eo=cu(zr__default.default(Le.startDate),vt,ht),so=Math.max(0,eo-ht);A.scrollLeft=Math.min(so,Math.max(0,Pt-A.clientWidth)),window.requestAnimationFrame(()=>{Z.current=false;});});return ()=>window.cancelAnimationFrame(_e)},[dt.width,Ze,m,O,fe,W,xe,vt]),Qt.useLayoutEffect(()=>{let A=X.current;if(!A)return;let j=0,ee=0,se=false,Le=()=>{if(se)return;let so=A.querySelector("thead"),To=Array.from(A.querySelectorAll("tbody tr[data-planning-row-key]"));if(To.length===0)return;let Xt=so?.getBoundingClientRect().height||lu,xo={};To.forEach(Rt=>{let Ut=Rt.dataset.planningRowKey;Ut&&(xo[Ut]=Rt.getBoundingClientRect().height);}),Ge(Rt=>Math.abs(Rt-Xt)<.01?Rt:Xt),Ie(Rt=>{let Ut=Object.keys(Rt),cr=Object.keys(xo);return Ut.length===cr.length&&cr.every(dr=>Math.abs((Rt[dr]??0)-xo[dr])<.01)?Rt:xo});},_e=()=>{window.cancelAnimationFrame(j),j=window.requestAnimationFrame(Le);};if(Le(),window.cancelAnimationFrame(ee),ee=window.requestAnimationFrame(()=>{ee=window.requestAnimationFrame(Le);}),typeof document<"u"&&document.fonts?.ready&&document.fonts.ready.then(()=>{se||_e();}).catch(()=>{}),typeof ResizeObserver>"u")return window.addEventListener("resize",_e),()=>{se=true,window.cancelAnimationFrame(j),window.cancelAnimationFrame(ee),window.removeEventListener("resize",_e);};let gt=new ResizeObserver(_e),Re=A.querySelector("table"),ut=A.querySelector("tbody"),nt=A.querySelector("thead");Re&>.observe(Re),nt&>.observe(nt);let Pt=new WeakSet,ht=()=>{A.querySelectorAll("tbody tr[data-planning-row-key]").forEach(so=>{Pt.has(so)||(gt.observe(so),Pt.add(so));});};ht();let eo=null;return ut&&typeof MutationObserver<"u"&&(eo=new MutationObserver(()=>{ht(),_e();}),eo.observe(ut,{childList:true,subtree:true,characterData:true})),window.addEventListener("resize",_e),()=>{se=true,window.cancelAnimationFrame(j),window.cancelAnimationFrame(ee),gt.disconnect(),eo?.disconnect(),window.removeEventListener("resize",_e);}},[xe,_.visibleColumns,_.grouping,_.columnWidths]),jsxRuntime.jsxs(rl,{elevation:0,sx:{m:0,p:0,display:"flex",flexDirection:"column",minHeight:0,overflow:"hidden",borderRadius:3,border:`1px solid ${P.palette.divider}`,backgroundColor:P.palette.background.paper,...D},children:[jsxRuntime.jsxs(material.Stack,{direction:{xs:"column",md:"row"},justifyContent:"space-between",alignItems:{xs:"stretch",md:"center"},spacing:2,sx:{px:2,py:1.75,borderBottom:`1px solid ${P.palette.divider}`},children:[jsxRuntime.jsxs(material.Stack,{direction:"row",spacing:.75,alignItems:"center",sx:{p:.5,borderRadius:2,backgroundColor:"action.hover",minHeight:38},children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:ec,color:"text.secondary",whiteSpace:"nowrap"},children:M("table.toolbar.itemsPerPage")}),jsxRuntime.jsx(material.Select,{size:"small",variant:"standard",value:_.rowsPerPage,disableUnderline:true,onChange:A=>_.setRowsPerPage(Number(A.target.value)),sx:{fontSize:ec,fontWeight:600,color:"text.primary",minWidth:64,height:30,display:"flex",alignItems:"center","& .MuiSelect-select":{py:0,pl:.75,pr:"22px !important",minHeight:`${30}px !important`,height:30,display:"flex",alignItems:"center",boxSizing:"border-box"},"& .MuiSelect-icon":{right:0,fontSize:20,color:"text.primary"}},children:f.map(A=>jsxRuntime.jsx(material.MenuItem,{value:A,sx:{fontSize:ec},children:A===-1?M("common.all"):A},`planning-rows-per-page-${A}`))}),jsxRuntime.jsx(material.IconButton,{size:"small",onClick:()=>_.setPage(Math.max(N-1,0)),disabled:!we,sx:{...Ir,color:"text.primary"},children:jsxRuntime.jsx(Kb__default.default,{})}),jsxRuntime.jsx(material.Typography,{sx:{fontSize:ec,fontWeight:600,minWidth:88,textAlign:"center",color:"text.primary"},children:M("table.toolbar.pageOf",{current:J,total:Y})}),jsxRuntime.jsx(material.IconButton,{size:"small",onClick:()=>_.setPage(Math.min(N+1,Y-1)),disabled:!Me,sx:{...Ir,color:"text.primary"},children:jsxRuntime.jsx(ch__default.default,{})})]}),jsxRuntime.jsxs(material.Stack,{direction:"row",spacing:1,alignItems:"center",sx:{flexWrap:"wrap"},children:[Vt.length>0&&jsxRuntime.jsx(material.Stack,{direction:"row",spacing:.75,alignItems:"center",children:Vt.map((A,j)=>jsxRuntime.jsx(material.Box,{sx:{display:"flex",alignItems:"center"},children:A},`planning-extra-tool-${j}`))}),jsxRuntime.jsxs(material.Stack,{direction:"row",spacing:.25,sx:{p:.5,borderRadius:2,backgroundColor:"action.hover"},children:[jsxRuntime.jsx(Oo,{tooltip:"Column visibility",onClick:A=>_.setAnchorEl(A.currentTarget),color:"default",children:jsxRuntime.jsx(zb__default.default,{fontSize:"small"})}),jsxRuntime.jsx(Oo,{tooltip:"Group by",onClick:A=>_.setGroupAnchorEl(A.currentTarget),color:"default",children:jsxRuntime.jsx(Wb__default.default,{fontSize:"small"})}),jsxRuntime.jsx(Oo,{tooltip:"Sort by...",onClick:()=>K(true),color:_.sortBy.length>0||_.orderBy?"primary":"default",children:jsxRuntime.jsx(FI__default.default,{fontSize:"small"})})]}),ze&&jsxRuntime.jsx(material.Stack,{direction:"row",spacing:.25,sx:{p:.5,borderRadius:2,backgroundColor:"action.hover"},children:ze}),jsxRuntime.jsxs(material.Stack,{direction:"row",spacing:.25,sx:{p:.5,borderRadius:2,backgroundColor:"action.hover"},children:[jsxRuntime.jsx(Oo,{tooltip:"Expand task table",onClick:()=>Ce("table"),color:de==="table"?"primary":"default",children:jsxRuntime.jsx(BI__default.default,{fontSize:"small"})}),jsxRuntime.jsx(Oo,{tooltip:"Split evenly",onClick:Dt,color:de===null&&H==="even"?"primary":"default",children:jsxRuntime.jsx(EI__default.default,{fontSize:"small"})}),jsxRuntime.jsx(Oo,{tooltip:"Expand timeline",onClick:()=>Ce("timeline"),color:de==="timeline"?"primary":"default",children:jsxRuntime.jsx(AI__default.default,{fontSize:"small"})})]}),jsxRuntime.jsx(material.Box,{sx:{minWidth:120},children:jsxRuntime.jsx(lh,{label:"",value:d,options:iu.map(A=>({value:A.value,label:A.label})),onChange:A=>l?.(A.target.value),sx:{"& .MuiSelect-select":{fontSize:"0.92rem",py:.65},"& .MuiSvgIcon-root":{fontSize:20}}})})]})]}),ae.length===0?jsxRuntime.jsx(material.Box,{sx:{minHeight:240,display:"grid",placeItems:"center",color:"text.secondary"},children:S}):jsxRuntime.jsx(material.Box,{sx:{overflow:"hidden",flex:1,minHeight:0},children:jsxRuntime.jsxs(material.Box,{ref:B,sx:{height:"100%",display:"grid",gridTemplateColumns:Ye,minWidth:0,transition:`grid-template-columns ${tn}`},children:[jsxRuntime.jsx(material.TableContainer,{"data-planning-scroll-pane":"table",ref:X,onScroll:()=>Yo("table"),sx:{width:"100%",minWidth:0,maxWidth:"100%",height:n,overflowX:"auto",overflowY:"auto",opacity:O?0:1,transform:O?"translateX(-10px)":"translateX(0)",pointerEvents:O?"none":"auto",transition:`opacity ${tn}, transform ${tn}`},children:jsxRuntime.jsx(core.DndContext,{sensors:Ee,collisionDetection:core.closestCenter,modifiers:[modifiers.restrictToHorizontalAxis],onDragEnd:A=>{let j=A?.active?.id,ee=A?.over?.id;typeof j=="string"&&typeof ee=="string"&&_.handleColumnReorder(j,ee);},children:jsxRuntime.jsxs(material.Table,{size:"small",stickyHeader:true,sx:{tableLayout:"fixed",width:Et,"& thead .MuiTableCell-root":{height:lu,py:0,lineHeight:1.15,boxSizing:"border-box"}},children:[jsxRuntime.jsx(gl,{columns:_.columns,visibleColumns:_.visibleColumns,order:_.order,orderBy:_.orderBy,sortBy:_.sortBy,onRequestSort:_.handleRequestSort,onContextMenu:(A,j)=>{A.preventDefault(),A.stopPropagation(),st({mouseX:A.clientX+2,mouseY:A.clientY-6,columnId:j});},grouping:_.grouping,isAllExpanded:_.isAllExpanded,handleToggleAll:_.handleToggleAll,columnWidths:_.columnWidths,onColumnResize:_.handleColumnResize,enableColumnReorder:true}),jsxRuntime.jsx(material.TableBody,{children:xe.map(A=>{let j=tt(A);if(A.type==="group")return jsxRuntime.jsxs(material.TableRow,{"data-planning-row-key":j,sx:{height:en,backgroundColor:P.palette.action.hover},children:[_.grouping.length>0&&jsxRuntime.jsx(material.TableCell,{sx:{...Tr,height:en,borderBottom:`1px solid ${P.palette.divider}`},children:jsxRuntime.jsx(material.IconButton,{size:"small",onClick:()=>_.toggleGroupExpand(A.id),sx:Ir,children:A.isExpanded?jsxRuntime.jsx(gy__default.default,{}):jsxRuntime.jsx(ch__default.default,{})})}),jsxRuntime.jsx(material.TableCell,{colSpan:_.visibleColumns.length,sx:{height:en,py:0,borderBottom:`1px solid ${P.palette.divider}`},children:jsxRuntime.jsxs(material.Typography,{sx:{fontSize:13,fontWeight:700},children:[A.field,": ",A.value," (",A.count,")"]})})]},A.id);let ee=A.data||A,se=ee.id===m,Le=pt(ee.id),_e=ye.activeId===ee.id,gt=ye.overId===ee.id&&mt(ye.activeId,ee.id);return jsxRuntime.jsxs(material.TableRow,{"data-planning-row-key":j,draggable:Le,hover:true,selected:se,onDragStart:Re=>Wt(Re,ee),onDragOver:Re=>ct(Re,ee.id),onDragEnter:Re=>ct(Re,ee.id),onDrop:Re=>Ao(Re,ee.id),onDragEnd:wo,onClick:()=>h?.(Ue.get(ee.id)||ee),sx:{cursor:_e?"grabbing":Le?"grab":h?"pointer":"default",height:en,opacity:_e?.56:1,"& .MuiTableCell-root":gt?{borderTop:`2px solid ${P.palette.primary.main}`}:void 0,transition:"background-color 120ms ease, opacity 120ms ease"},children:[_.grouping.length>0&&jsxRuntime.jsx(material.TableCell,{sx:{...Tr,height:en,borderBottom:`1px solid ${P.palette.divider}`}}),(_.columns||[]).filter(Re=>_.visibleColumns.includes(Re.id)).map(Re=>jsxRuntime.jsx(material.TableCell,{sx:{width:_.columnWidths?.[Re.id]||Re.minWidth||100,height:en,py:0,overflow:"hidden",borderBottom:`1px solid ${P.palette.divider}`},children:Re.render?Re.render(ee[Re.id],ee):String(ee[Re.id]??"-")},`${ee.id}-${Re.id}`))]},ee.id)})})]})})}),jsxRuntime.jsx(material.Box,{onPointerDown:U?ot:void 0,role:"separator","aria-orientation":"vertical",sx:{width:U?il:0,cursor:U?"col-resize":"default",opacity:U?1:0,pointerEvents:U?"auto":"none",borderLeft:U?`1px solid ${P.palette.divider}`:"0 solid transparent",borderRight:U?`1px solid ${P.palette.divider}`:"0 solid transparent",backgroundColor:P.palette.mode==="dark"?"rgba(148,163,184,0.10)":"rgba(15,23,42,0.04)",transition:`width ${tn}, opacity ${tn}, background-color 120ms ease`,position:"relative","&:hover":{backgroundColor:P.palette.action.selected},"&::before":{content:'""',position:"absolute",top:0,bottom:0,left:-6,right:-6,cursor:U?"col-resize":"default"}}}),jsxRuntime.jsx(material.Box,{sx:{minWidth:0,overflow:"hidden",opacity:W?0:1,transform:W?"translateX(10px)":"translateX(0)",pointerEvents:W?"none":"auto",transition:`opacity ${tn}, transform ${tn}`},children:jsxRuntime.jsx(material.Box,{"data-planning-scroll-pane":"timeline",ref:L,onScroll:()=>Yo("timeline"),sx:{width:"100%",height:n,overflowX:"auto",overflowY:"auto"},children:jsxRuntime.jsxs(material.Box,{sx:{width:"100%",minWidth:ko||"100%"},children:[jsxRuntime.jsx(material.Box,{sx:{display:"grid",gridTemplateColumns:sr,height:Ze,boxSizing:"border-box",borderBottom:`1px solid ${P.palette.divider}`,position:"sticky",top:0,zIndex:2,backgroundColor:P.palette.background.paper},children:vt.map(A=>jsxRuntime.jsxs(material.Box,{title:A.title,sx:{px:.75,display:"flex",flexDirection:A.contextLabel?"column":"row",alignItems:"center",justifyContent:"center",gap:A.contextLabel?.15:0,borderRight:`1px solid ${P.palette.divider}`,color:A.contextLabel?"text.primary":"text.secondary",overflow:"hidden"},children:[A.contextLabel&&jsxRuntime.jsx(material.Typography,{component:"span",sx:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"text.secondary",fontSize:11,fontWeight:700,lineHeight:1.1},children:A.contextLabel}),jsxRuntime.jsx(material.Typography,{component:"span",sx:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:12,fontWeight:700,lineHeight:1.15},children:A.label})]},A.key))}),jsxRuntime.jsx(material.Stack,{sx:{position:"relative"},children:xe.map(A=>{let j=tt(A),ee=oe[j]??en;if(A.type==="group")return jsxRuntime.jsx(material.Box,{"data-planning-timeline-row-key":j,sx:{position:"relative",height:ee,boxSizing:"border-box",borderBottom:`1px solid ${P.palette.divider}`,backgroundColor:P.palette.action.hover}},A.id);let se=A.data||A,Le=zr__default.default(se.startDate),_e=zr__default.default(se.endDate),gt=cu(Le,vt,Ct),Re=cu(_e,vt,Ct),ut=Math.max(0,Re-gt),nt=uh(se.progress),Pt=se.id===m,ht=pt(se.id),eo=ye.activeId===se.id,so=ye.overId===se.id&&mt(ye.activeId,se.id),To=se.color??(se.statusTone==="blocked"?P.palette.error.main:P.palette.primary.main);return jsxRuntime.jsx(material.Box,{"data-planning-timeline-row-key":j,draggable:ht,onDragStart:Xt=>Wt(Xt,se),onDragOver:Xt=>ct(Xt,se.id),onDragEnter:Xt=>ct(Xt,se.id),onDrop:Xt=>Ao(Xt,se.id),onDragEnd:wo,onClick:()=>h?.(Ue.get(se.id)||se),sx:{position:"relative",height:ee,boxSizing:"border-box",borderBottom:`1px solid ${P.palette.divider}`,opacity:eo?.56:1,"&::before":{content:'""',position:"absolute",top:0,left:0,right:0,height:2,backgroundColor:P.palette.primary.main,opacity:so?1:0,transition:"opacity 120ms ease",pointerEvents:"none",zIndex:3},backgroundImage:P.palette.mode==="dark"?"linear-gradient(90deg, rgba(148,163,184,0.08) 1px, transparent 1px)":"linear-gradient(90deg, rgba(15,23,42,0.06) 1px, transparent 1px)",backgroundSize:lo,cursor:eo?"grabbing":ht?"grab":h?"pointer":"default",transition:"opacity 120ms ease"},children:jsxRuntime.jsx(material.Tooltip,{title:`${se.title}: ${Le.format("MMM D HH:mm")} - ${_e.format("MMM D HH:mm")}`,children:jsxRuntime.jsxs(material.Box,{sx:{position:"absolute",left:`${gt}%`,top:Math.max(8,(ee-24)/2),width:`max(18px, ${ut}%)`,height:24,borderRadius:999,overflow:"hidden",backgroundColor:P.palette.mode==="dark"?"rgba(148,163,184,0.18)":"rgba(15,23,42,0.10)",outline:Pt?`2px solid ${P.palette.warning.main}`:"none",outlineOffset:2},children:[jsxRuntime.jsx(material.Box,{sx:{height:"100%",width:`${nt}%`,backgroundColor:To}}),jsxRuntime.jsx(material.Typography,{sx:{position:"absolute",inset:0,px:1,display:"flex",alignItems:"center",color:"#fff",fontSize:11,fontWeight:800,textShadow:"0 1px 4px rgba(0,0,0,0.45)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:se.code})]})})},se.id)})})]})})})]})}),jsxRuntime.jsx(sn,{groupAnchorEl:_.groupAnchorEl,setGroupAnchorEl:_.setGroupAnchorEl,grouping:_.grouping,setGrouping:_.setGrouping,columns:_.columns,toggleGroupField:_.toggleGroupField}),jsxRuntime.jsx(cn,{anchorEl:_.anchorEl,setAnchorEl:_.setAnchorEl,columns:_.columns,visibleColumns:_.visibleColumns,toggleColumnVisibility:_.toggleColumnVisibility}),jsxRuntime.jsx(ep,{contextMenu:qe,handleClose:()=>st(null),columns:_.columns,visibleColumns:_.visibleColumns,grouping:_.grouping,summaryColumns:_.summaryColumns,showSummary:_.showSummary,sortBy:_.sortBy,orderBy:_.orderBy,order:_.order,onSortAsc:A=>{_.applyMultiSort([{field:A,direction:"asc"}]);},onSortDesc:A=>{_.applyMultiSort([{field:A,direction:"desc"}]);},onClearSort:A=>{let j=_.sortBy.filter(ee=>ee.field!==A);j.length>0?_.applyMultiSort(j):(_.clearMultiSort(),_.orderBy===A&&_.setOrderBy(""));},onHideColumn:A=>{_.visibleColumns.includes(A)&&_.toggleColumnVisibility(A);},onToggleGroup:A=>_.toggleGroupField(A),onToggleSummary:A=>_.toggleSummaryColumn(A),onOpenSortDialog:()=>K(true)}),jsxRuntime.jsx(tp,{open:Pe,onClose:()=>K(false),columns:_.columns,initialRules:_.sortBy.length>0?_.sortBy:_.orderBy?[{field:_.orderBy,direction:_.order}]:[],onApply:A=>_.applyMultiSort(A),onClear:()=>{_.clearMultiSort(),_.setOrderBy("");}})]})};var L4=({filterProps:e,ganttProps:t,spacing:o=2,sx:r,children:a})=>{let n=r?[{height:"100%",overflow:"hidden"},r]:{height:"100%",overflow:"hidden"},i=t.sx?[{height:"100%"},t.sx]:{height:"100%"};return jsxRuntime.jsxs(material.Stack,{spacing:o,sx:n,children:[jsxRuntime.jsx(material.Box,{sx:{flexShrink:0},children:jsxRuntime.jsx($r,{...e})}),jsxRuntime.jsx(material.Box,{sx:{flex:1,minHeight:0,overflow:"hidden"},children:jsxRuntime.jsx(fh,{...t,bodyHeight:t.bodyHeight??"100%",sx:i})}),a]})};var bh=640,YI=360,QI=360,ac=8,ai="220ms cubic-bezier(0.2, 0, 0, 1)",pu=(e,t,o=0,r=[])=>e.flatMap(a=>{let n=a.children??[],i=[{node:a,level:o,hasChildren:n.length>0,parentIds:r}];return t.has(a.id)?[...i,...pu(n,t,o+1,[...r,a.id])]:i}),xh=e=>e.flatMap(t=>[t,...xh(t.children??[])]),vh=(e,t=0,o=[])=>e.flatMap(r=>{let a=r.children??[];return [{node:r,level:t,hasChildren:a.length>0,parentIds:o},...vh(a,t+1,[...o,r.id])]}),Ch=e=>e.flatMap(t=>{let o=t.children??[];return o.length===0?[]:[t.id,...Ch(o)]}),yh=e=>Object.entries(e).filter(([t])=>t!=="children").map(([,t])=>t==null?"":typeof t=="string"||typeof t=="number"||typeof t=="boolean"?String(t):"").join(" ").toLowerCase(),j4=({title:e,subtitle:t,nodes:o,columns:r,detail:a,selectedNodeId:n,defaultSelectedNodeId:i,onNodeSelect:c,expandedNodeIds:d,defaultExpandedNodeIds:l,onExpandedNodeIdsChange:s,defaultPaneMode:g="split",minTreePaneWidth:f=YI,minDetailPaneWidth:p=QI,tableAppId:b="ctree-comp",tableKey:y="default",tableTitle:u,filterConfig:C,searchQuery:m,searchToken:h,defaultRowsPerPage:x=-1,rowsPerPageOptions:w=[20,50,100,-1],serviceUrl:E,emptyLabel:R="No tree items available.",headerAction:T,sx:I,className:k})=>{let S=material.useTheme(),D=Qt.useRef(null),P=Qt.useRef(null),M=Qt.useRef(null),[B,X]=Qt.useState(i??o[0]?.id??null),[L,Z]=Qt.useState(l??Ch(o).slice(0,3)),[$,q]=Qt.useState(g),[H,re]=Qt.useState(bh),[de,Ce]=Qt.useState(0),[ve,le]=Qt.useState(0),[oe,Ie]=Qt.useState(x),Ze=Qt.useMemo(()=>r&&r.length>0?r:[{id:"label",label:"Name",render:Y=>jsxRuntime.jsxs(material.Stack,{spacing:.3,children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:15,fontWeight:700,lineHeight:1.15},children:Y.label}),Y.subtitle&&jsxRuntime.jsx(material.Typography,{sx:{fontSize:13,color:"text.secondary",lineHeight:1.2},children:Y.subtitle})]})}],[r]),Ge=Qt.useMemo(()=>new Set(d??L),[d,L]),ce=Qt.useMemo(()=>pu(o,Ge),[o,Ge]),Ve=Qt.useMemo(()=>xh(o),[o]),et=Qt.useMemo(()=>vh(o),[o]),ye=n===void 0?B:n,We=Qt.useMemo(()=>Ve.find(Y=>Y.id===ye)??null,[ye,Ve]),qe=Y=>{let N=P.current?.clientWidth??0,J=N>0?Math.max(f,N-ac-p):Math.max(f,Y);return Math.min(Math.max(Y,f),J)},st=$==="detail",Pe=$==="tree"||!a,K=$==="split"&&!!a,ge=(()=>{if(de<=0)return null;if($==="tree"||!a)return {treeWidth:de,splitterWidth:0,detailWidth:0};if($==="detail")return {treeWidth:0,splitterWidth:0,detailWidth:de};let Y=K?ac:0,N=qe(H);return {treeWidth:N,splitterWidth:Y,detailWidth:Math.max(0,de-Y-N)}})(),ke=ge?`${ge.treeWidth}px ${ge.splitterWidth}px ${ge.detailWidth}px`:$==="tree"||!a?"minmax(0, 1fr) 0px 0px":$==="detail"?"0px 0px minmax(0, 1fr)":`minmax(${f}px, ${H}px) ${ac}px minmax(${p}px, 1fr)`;Qt.useEffect(()=>{let Y=P.current;if(!Y){Ce(0);return}let N=0,J=()=>{window.cancelAnimationFrame(N),N=window.requestAnimationFrame(()=>{let Me=Y.clientWidth;Ce(tt=>Math.abs(tt-Me)<.5?tt:Me);});};if(J(),typeof ResizeObserver>"u")return window.addEventListener("resize",J),()=>{window.cancelAnimationFrame(N),window.removeEventListener("resize",J);};let we=new ResizeObserver(J);return we.observe(Y),window.addEventListener("resize",J),()=>{window.cancelAnimationFrame(N),we.disconnect(),window.removeEventListener("resize",J);}},[]);let rt=Y=>{d===void 0&&Z(Y),s?.(Y);},Ue=Y=>{let N=new Set(Ge);N.has(Y)?N.delete(Y):N.add(Y),rt(Array.from(N));},ae=Y=>{n===void 0&&X(Y.id),c?.(Y);};Qt.useEffect(()=>{le(0);},[o]),Qt.useEffect(()=>{let Y=m?.trim().toLowerCase();if(!Y)return;let N=et.find(({node:dt})=>yh(dt).includes(Y));if(!N)return;let J=new Set(Ge);N.parentIds.forEach(dt=>J.add(dt)),rt(Array.from(J)),ae(N.node);let Me=pu(o,J).findIndex(({node:dt})=>dt.id===N.node.id);Me>=0&&oe>0&&le(Math.floor(Me/oe));let tt=0,bt=0;return tt=window.requestAnimationFrame(()=>{bt=window.requestAnimationFrame(()=>{let dt=D.current?.querySelector(".MuiTableRow-root.Mui-selected"),Vt=dt?.closest(".MuiTableContainer-root");if(dt&&Vt){let vt=Vt.getBoundingClientRect(),ko=dt.getBoundingClientRect(),Ct=ko.top-vt.top+Vt.scrollTop;Vt.scrollTo({top:Ct-Vt.clientHeight/2+ko.height/2,behavior:"smooth"});return}dt?.scrollIntoView({block:"center",behavior:"smooth"});});}),()=>{window.cancelAnimationFrame(tt),window.cancelAnimationFrame(bt);}},[m,h,et,o,oe]);let fe=Qt.useMemo(()=>ce.map(({node:Y,level:N,hasChildren:J})=>({...Y,id:Y.id,__node:Y,__level:N,__hasChildren:J,__expanded:Ge.has(Y.id),__searchText:yh(Y)})),[Ge,ce]),je=Qt.useMemo(()=>Ze.map((Y,N)=>({id:Y.id,label:Y.label,minWidth:typeof Y.width=="number"?Y.width:Y.minWidth??(N===0?320:120),numeric:Y.numeric??Y.align==="right",render:(J,we)=>{let Me=we.__node,tt=Y.render?Y.render(Me):Me[Y.id];if(N!==0)return jsxRuntime.jsx(material.Box,{sx:{minWidth:0,color:Y.align==="right"?"text.primary":"text.secondary",fontWeight:Y.align==="right"?750:500,textAlign:Y.align??"left"},children:tt});let bt=Number(we.__level??0),dt=!!we.__hasChildren,Vt=!!we.__expanded;return jsxRuntime.jsxs(material.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0,pl:`${bt*24}px`},children:[jsxRuntime.jsx(Oo,{tooltip:dt?Vt?"Collapse":"Expand":"",onClick:vt=>{vt.stopPropagation(),dt&&Ue(Me.id);},disabled:!dt,sx:{width:24,height:24,visibility:dt?"visible":"hidden",transform:Vt?"rotate(0deg)":"rotate(-90deg)",transition:"transform 160ms ease"},children:jsxRuntime.jsx(gy__default.default,{sx:{fontSize:20}})}),jsxRuntime.jsx(material.Box,{sx:{width:10,height:10,borderRadius:"50%",flexShrink:0,backgroundColor:Me.markerColor??S.palette.primary.main}}),jsxRuntime.jsx(material.Box,{sx:{minWidth:0},children:tt})]})}})),[Ze,Ge,S.palette.primary.main]),It=Y=>{if(!K)return;Y.preventDefault(),Y.currentTarget.setPointerCapture(Y.pointerId),M.current={startX:Y.clientX,startWidth:H};let N=we=>{let Me=M.current;Me&&re(qe(Me.startWidth+we.clientX-Me.startX));},J=()=>{M.current=null,window.removeEventListener("pointermove",N),window.removeEventListener("pointerup",J),document.body.style.cursor="",document.body.style.userSelect="";};document.body.style.cursor="col-resize",document.body.style.userSelect="none",window.addEventListener("pointermove",N),window.addEventListener("pointerup",J);},_=()=>{let Y=P.current?.clientWidth??0,N=Y>0?Math.max(f,(Y-ac)/2):bh;q("split"),re(qe(N));},ze=()=>a?typeof a=="function"?a(We):a:null,xe=a?jsxRuntime.jsxs(material.Box,{sx:{position:"absolute",top:13,right:56,zIndex:3,display:"flex",gap:.25,p:.5,borderRadius:2,backgroundColor:material.alpha(S.palette.background.paper,.9),border:`1px solid ${S.palette.divider}`,boxShadow:`0 8px 22px ${material.alpha(S.palette.common.black,S.palette.mode==="dark"?.28:.1)}`,backdropFilter:"blur(10px)"},children:[jsxRuntime.jsx(Oo,{tooltip:"Expand tree",onClick:()=>q("tree"),color:$==="tree"?"primary":"default",children:jsxRuntime.jsx(BI__default.default,{fontSize:"small"})}),jsxRuntime.jsx(Oo,{tooltip:"Split evenly",onClick:_,color:$==="split"?"primary":"default",children:jsxRuntime.jsx(EI__default.default,{fontSize:"small"})}),jsxRuntime.jsx(Oo,{tooltip:"Expand detail",onClick:()=>q("detail"),color:$==="detail"?"primary":"default",children:jsxRuntime.jsx(AI__default.default,{fontSize:"small"})})]}):null;return jsxRuntime.jsxs(material.Box,{ref:D,className:["ctree_comp",k].filter(Boolean).join(" "),sx:{position:"relative",height:"100%",minHeight:0,border:`1px solid ${S.palette.divider}`,borderRadius:2,overflow:"hidden",backgroundColor:"background.paper",boxShadow:`0 18px 42px ${material.alpha(S.palette.common.black,S.palette.mode==="dark"?.24:.08)}`,...I},children:[xe,jsxRuntime.jsxs(material.Box,{ref:P,sx:{height:"100%",display:"grid",gridTemplateColumns:ke,transition:`grid-template-columns ${ai}`,minWidth:0},children:[jsxRuntime.jsxs(material.Box,{"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 ${ai}, transform ${ai}`,willChange:"opacity, transform"},children:[jsxRuntime.jsxs(material.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:2,sx:{px:2,py:1.5,minHeight:74,borderBottom:`1px solid ${S.palette.divider}`},children:[jsxRuntime.jsxs(material.Stack,{direction:"row",alignItems:"center",spacing:1.4,sx:{minWidth:0},children:[jsxRuntime.jsx(Wb__default.default,{sx:{color:"primary.main",fontSize:28}}),jsxRuntime.jsxs(material.Box,{sx:{minWidth:0},children:[jsxRuntime.jsx(material.Typography,{sx:{fontSize:20,fontWeight:750,lineHeight:1.12},noWrap:true,children:e}),t&&jsxRuntime.jsx(material.Typography,{sx:{fontSize:14,color:"text.secondary",mt:.3},noWrap:true,children:t})]})]}),T!==void 0?T:jsxRuntime.jsx(Oo,{tooltip:"Add node",color:"default",children:jsxRuntime.jsx(Ju__default.default,{fontSize:"small"})})]}),jsxRuntime.jsxs(material.Box,{sx:{flex:1,minHeight:0,overflow:"hidden"},children:[jsxRuntime.jsx(Dr,{appId:b,tableKey:y,title:u??(typeof e=="string"?e:"Tree"),columns:je,rows:fe,rowKey:"id",fitContainer:true,fullWidth:true,showSummary:false,selectionMode:"single",selected:ye?[ye]:[],onSelectionChange:Y=>{let N=Y[Y.length-1],J=Ve.find(we=>we.id===N);J&&ae(J);},page:ve,rowsPerPage:oe,rowsPerPageOptions:w,count:fe.length,onPageChange:le,onRowsPerPageChange:Y=>{le(0),Ie(Y);},filterConfig:C,serviceUrl:E,graphReport:{enabled:false},disableGrouping:true,disableSorting:true,maxHeight:"100%"}),fe.length===0&&jsxRuntime.jsx(material.Box,{sx:{minHeight:220,display:"grid",placeItems:"center",color:"text.secondary"},children:R})]})]}),jsxRuntime.jsx(material.Box,{"data-ctree-splitter":"true",role:"separator","aria-orientation":"vertical",onPointerDown:K?It:void 0,sx:{width:"100%",cursor:K?"col-resize":"default",backgroundColor:K?material.alpha(S.palette.text.primary,S.palette.mode==="dark"?.16:.08):"transparent",opacity:K?1:0,pointerEvents:K?"auto":"none",position:"relative",transition:`opacity ${ai}, background-color 120ms ease`,"&:hover":{backgroundColor:K?material.alpha(S.palette.primary.main,S.palette.mode==="dark"?.35:.18):"transparent"}}}),jsxRuntime.jsxs(material.Box,{"aria-hidden":Pe?true:void 0,sx:{minWidth:0,overflow:"hidden",display:"flex",flexDirection:"column",opacity:Pe?0:1,transform:Pe?"translateX(12px)":"translateX(0)",pointerEvents:Pe?"none":"auto",transition:`opacity ${ai}, transform ${ai}`,willChange:"opacity, transform"},children:[jsxRuntime.jsx(material.Box,{sx:{p:2,pb:1.25,minHeight:74,display:"flex",alignItems:"flex-end"},children:jsxRuntime.jsx(material.Divider,{sx:{width:"100%"}})}),jsxRuntime.jsx(material.Box,{sx:{flex:1,minHeight:0,overflow:"auto",px:2,pb:2},children:ze()})]})]})]})};var aP={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)"}}},J4=({children:e,transitionKey:t,variant:o="fade",durationMs:r=220,delayMs:a=0,easing:n="cubic-bezier(0.22, 1, 0.36, 1)",disabled:i=false,sx:c})=>{let d=material.useMediaQuery("(prefers-reduced-motion: reduce)"),[l,s]=Qt.useState("to"),g=!i&&!d&&o!=="none";Qt.useEffect(()=>{if(!g){s("to");return}s("from");let b=requestAnimationFrame(()=>{b=requestAnimationFrame(()=>{s("to");});});return ()=>cancelAnimationFrame(b)},[t,g]);let f=aP[o],p=Qt.useMemo(()=>g?l==="from"?f.from:f.to:{opacity:1,transform:"none"},[g,l,f.from,f.to]);return jsxRuntime.jsx(material.Box,{sx:{willChange:g?"opacity, transform":"auto",transition:g?`opacity ${r}ms ${n} ${a}ms, transform ${r}ms ${n} ${a}ms`:"none",backfaceVisibility:"hidden",...p,...c},children:e})},eW={subtle:{variant:"fade",durationMs:180},smooth:{variant:"slide-up",durationMs:220},snappy:{variant:"scale",durationMs:160}};exports.AIBrowserGlow=g8;exports.AgentPanel=_f;exports.Button=ic;exports.CAINavProvider=Uw;exports.CAmapChart=vp;exports.CAppHeader=cs;exports.CAppHeaderSearch=hd;exports.CAppPageLayout=qE;exports.CAuthPage=O8;exports.CBarChart=yi;exports.CChartCard=xl;exports.CComboChart=lp;exports.CCustomizeAgent=wp;exports.CDetailInfoPage=q5;exports.CDetailSearchAiBar=Cm;exports.CDetailSectionCard=Jl;exports.CFishboneChart=up;exports.CGoogleMapChart=hp;exports.CGraphCharts=Cp;exports.CGraphKpiCards=rp;exports.CGraphReport=Fl;exports.CHeatmapChart=cp;exports.CKanbanBoard=gE;exports.CKanbanBucket=Pm;exports.CKanbanCard=ud;exports.CLayoutManagement=Xp;exports.CLayoutManager=wn;exports.CLineChart=ip;exports.CMessageBox=si;exports.COrbCanvas=Bw;exports.CPageLayout=zu;exports.CPageTransition=J4;exports.CPieChart=Il;exports.CPivotTable=LL;exports.CPlanningGantt=fh;exports.CPlanningLayout=L4;exports.CSmartFilter=$r;exports.CSmartTable=pB;exports.CStandardPage=xB;exports.CTable=Dr;exports.CTableBody=lB;exports.CTableCell=sB;exports.CTableContainer=cB;exports.CTableHead=dB;exports.CTableRow=uB;exports.CTreeComp=j4;exports.CValueHelp=Nu;exports.CVariantManagement=Ol;exports.CVariantManager=Fp;exports.CVoiceWaveOverlay=$d;exports.CWaterfallChart=mp;exports.CodeBlock=Mi;exports.CopilotChat=u8;exports.FloatingAgentPanel=r8;exports.GlobalMessage=sR;exports.MarkdownRenderer=Fi;exports.MathBlock=Di;exports.MermaidBlock=Yc;exports.NavigationIsland=dc;exports.ORBCAFE_I18N_MESSAGES=li;exports.OrbcafeI18nProvider=cl;exports.PAGE_TRANSITION_PRESETS=eW;exports.PAppPageLayout=uz;exports.PBarcodeScanner=eN;exports.PNavIsland=Qg;exports.PNumericKeypad=fN;exports.PSmartFilter=Ug;exports.PTable=hw;exports.PTouchCard=iN;exports.PWorkloadNav=qg;exports.PivotChartPanel=Sg;exports.StdChat=Uf;exports.TableBlock=Jc;exports.ThinkBlock=Yl;exports.TreeMenu=sc;exports.VoiceNavigatorProvider=Tz;exports.VoiceWaveOverlay=xz;exports.buildAmapEmbedUrl=Ml;exports.buildGoogleMapEmbedUrl=Ci;exports.buildGoogleMapIframe=yD;exports.buttonVariants=Dh;exports.createKanbanBoardModel=Dm;exports.findKanbanCard=yr;exports.message=_P;exports.messageManager=Vr;exports.moveKanbanCard=as;exports.parseMarkdownTable=Xl;exports.renderMarkdown=h5;exports.resolveVariantFilters=Yp;exports.resolveVariantLayout=_l;exports.useAINav=_w;exports.useAmapEmbedUrl=FB;exports.useAuthPage=y8;exports.useDetailInfo=km;exports.useGoogleMapEmbedUrl=EB;exports.useGraphChartData=RB;exports.useGraphInteraction=Nl;exports.useGraphReport=xn;exports.useKanbanBoard=xE;exports.useNavigationIsland=wu;exports.useOrbcafeI18n=ne;exports.usePadLayout=_L;exports.usePadRecordEditor=jL;exports.usePageLayout=Gm;exports.usePivotTable=WL;exports.usePlanningGantt=ah;exports.usePlanningLayout=K8;exports.useStandardReport=TB;exports.useVoiceInput=Rn;exports.useVoiceNavigator=Iz;
|
|
231
|
+
`,G2=({active:t=false,colors:o=Ry,zIndex:r=2147483e3})=>{let n={"--orbcafe-ai-glow-line":o[0],"--orbcafe-ai-glow-z-index":r};return l(jsxRuntime.Fragment,{children:[e("style",{children:My}),e("div",{className:"orbcafe-ai-browser-glow","data-active":t?"true":"false",style:n,"aria-hidden":"true"})]})};var q2=({defaultMode:t="login",onLogin:o,onRegister:r,onForgotPassword:n}={})=>{let[a,i]=jt.useState(t),[s,c]=jt.useState(false),p=jt.useCallback(async m=>{c(true);try{await m?.();}finally{c(false);}},[]),u=jt.useCallback(m=>p(()=>o?.(m)),[o,p]),d=jt.useCallback(m=>p(()=>r?.(m)),[r,p]),f=jt.useCallback(m=>p(()=>n?.(m)),[n,p]),h=jt.useMemo(()=>({mode:a,loading:s,onModeChange:i,onLogin:u,onRegister:d,onForgotPassword:f}),[f,u,d,s,a]);return {mode:a,loading:s,setMode:i,authPageProps:h}};w();var Ny={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."},oF=({mode:t,defaultMode:o="login",onModeChange:r,onLogin:n,onRegister:a,onForgotPassword:i,loading:s=false,logo:c,copy:p,sx:u})=>{let d=t!==void 0,[f,h]=jt.useState(o),m=t??f,y=jt.useMemo(()=>({...Ny,...p}),[p]),[v,g]=jt.useState({username:"demo@orbcafe.local",password:"orbcafe-demo",remember:true}),[S,b]=jt.useState({name:"",email:"",password:"",confirmPassword:"",acceptedTerms:false}),[C,k]=jt.useState({email:""}),[x,E]=jt.useState(""),M=R=>{d||h(R),E(""),r?.(R);},I=async R=>{R.preventDefault(),await n?.(v),E("Demo login accepted. No real authentication request was sent.");},N=async R=>{R.preventDefault(),await a?.(S),E("Demo registration saved locally for this screen.");},A=async R=>{R.preventDefault(),await i?.(C),E("Demo reset link request created. No email was sent.");},T=m==="login"?y.loginTitle:m==="register"?y.registerTitle:y.forgotTitle,D=m==="login"?y.loginSubtitle:m==="register"?y.registerSubtitle:y.forgotSubtitle;return l("div",{className:"orb-auth-frame orb-root",style:u,children:[l("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:"rgba(21,65,148,.35)",borderColor:"rgba(255,255,255,.2)"}}),c?e("span",{style:{alignSelf:"flex-start",position:"relative"},children:c}):e("span",{className:"orb-logo-slot",children:"Host logo"}),l("div",{className:"orb-auth-claim",children:[e("div",{className:"orb-auth-rule"}),e("h2",{children:y.headline}),e("p",{children:y.subheadline})]}),e("div",{className:"orb-auth-meta",children:y.brandMeta})]}),e("div",{className:"orb-auth-form",children:l("div",{className:"orb-auth-card",children:[e("span",{className:"orb-overline",style:{letterSpacing:"0.12em"},children:y.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:D}),x&&e(_r,{severity:"success",children:x}),m==="login"&&l("form",{onSubmit:I,style:{display:"flex",flexDirection:"column",gap:16},children:[e(He,{label:"Email",type:"email",autoComplete:"username",value:v.username,onChange:R=>g(F=>({...F,username:R.target.value})),startAdornment:e(os,{size:15,strokeWidth:1.8})}),e(He,{label:"Password",type:"password",autoComplete:"current-password",value:v.password,onChange:R=>g(F=>({...F,password:R.target.value})),startAdornment:e(ca,{size:15,strokeWidth:1.8})}),l("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12},children:[e(Mt,{label:"Remember me",checked:v.remember,onChange:R=>g(F=>({...F,remember:R.target.checked}))}),e("button",{type:"button",className:"orb-link",onClick:()=>M("forgot"),children:"Forgot password?"})]}),e(we,{type:"submit",size:"large",block:true,loading:s,children:s?"Signing in\u2026":"Sign in"}),l("p",{className:"orb-meta",style:{textAlign:"center",margin:0},children:["New user?"," ",e("button",{type:"button",className:"orb-link",onClick:()=>M("register"),children:"Register"})]})]}),m==="register"&&l("form",{onSubmit:N,style:{display:"flex",flexDirection:"column",gap:16},children:[e(He,{label:"Full name",value:S.name,onChange:R=>b(F=>({...F,name:R.target.value})),startAdornment:e(os,{size:15,strokeWidth:1.8})}),e(He,{label:"Work email",type:"email",autoComplete:"username",value:S.email,onChange:R=>b(F=>({...F,email:R.target.value})),startAdornment:e(es,{size:15,strokeWidth:1.8})}),e(He,{label:"Password",type:"password",autoComplete:"new-password",value:S.password,onChange:R=>b(F=>({...F,password:R.target.value})),startAdornment:e(ca,{size:15,strokeWidth:1.8})}),e(He,{label:"Confirm password",type:"password",autoComplete:"new-password",value:S.confirmPassword,onChange:R=>b(F=>({...F,confirmPassword:R.target.value}))}),e(Mt,{label:"I accept the demo workspace terms",checked:S.acceptedTerms,onChange:R=>b(F=>({...F,acceptedTerms:R.target.checked}))}),e(we,{type:"submit",size:"large",block:true,loading:s,children:"Create demo account"}),l("p",{className:"orb-meta",style:{textAlign:"center",margin:0},children:["Already have an account?"," ",e("button",{type:"button",className:"orb-link",onClick:()=>M("login"),children:"Sign in"})]})]}),m==="forgot"&&l("form",{onSubmit:A,style:{display:"flex",flexDirection:"column",gap:16},children:[e(He,{label:"Work email",type:"email",autoComplete:"username",value:C.email,onChange:R=>k({email:R.target.value}),startAdornment:e(es,{size:15,strokeWidth:1.8})}),e(we,{type:"submit",size:"large",block:true,loading:s,children:"Send reset request"}),l("p",{className:"orb-meta",style:{textAlign:"center",margin:0},children:["Remember your password?"," ",e("button",{type:"button",className:"orb-link",onClick:()=>M("login"),children:"Back to sign in"})]})]}),l("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(we,{variant:"neutral",size:"large",block:true,children:"Continue with corporate SSO"}),l("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 Ly={keyword:{value:"",operator:"contains"},status:{value:"",operator:"equals"},owner:{value:"",operator:"contains"},workCenter:{value:"",operator:"contains"}},Fy=[{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"}],Ou=({tasks:t,appId:o,tableKey:r,defaultScale:n="week",defaultSelectedTaskId:a,initialFilters:i,filterFields:s,filterAppId:c,filterTableKey:p,serviceUrl:u,variantService:d,layout:f,columns:h,page:m,rowsPerPage:y,rowsPerPageOptions:v,count:g,onPageChange:S,onRowsPerPageChange:b,onFilterSearch:C,onFilterVariantLoad:k,enableRowReorder:x,onTaskReorder:E,onLayoutIdChange:M,onLayoutSave:I})=>{let N=o??c??"planning-gantt",A=r??p??"planning",[T,D]=jt.useState(n),[R,F]=jt.useState(a??t[0]?.id??""),[z,Z]=jt.useState(""),[B,_]=jt.useState(null),[V,K]=jt.useState({...Ly,...i}),Y=jt.useMemo(()=>{let me=String(V.keyword?.value??"").trim().toLowerCase(),Ie=String(V.status?.value??"").trim(),nt=String(V.owner?.value??"").trim().toLowerCase(),Xe=String(V.workCenter?.value??"").trim().toLowerCase(),De=V.dateRange?.value,Ge=De?.[0]?Xo__default.default(De[0]):null,xe=De?.[1]?Xo__default.default(De[1]):null;return t.filter(ye=>{if(me&&![ye.id,ye.code,ye.title,ye.project,ye.workCenter,ye.owner?.name].join(" ").toLowerCase().includes(me)||Ie&&ye.status!==Ie||nt&&!String(ye.owner?.name??"").toLowerCase().includes(nt)||Xe&&!String(ye.workCenter??"").toLowerCase().includes(Xe))return false;if(Ge||xe){let We=Xo__default.default(ye.startDate),tt=Xo__default.default(ye.endDate),gt=Ge?tt.isAfter(Ge)||tt.isSame(Ge,"day"):true,ct=xe?We.isBefore(xe)||We.isSame(xe,"day"):true;if(!gt||!ct)return false}return true})},[V,t]);jt.useEffect(()=>{Y.length!==0&&(Y.some(me=>me.id===R)||F(Y[0].id));},[Y,R]);let G=jt.useCallback(me=>{F(me.id);},[]),Q=jt.useCallback(me=>{Z(me),M?.(me);},[M]),ne=jt.useCallback(me=>{_(Ie=>({key:(Ie?.key??0)+1,variant:me})),k?.(me);},[k]),be=jt.useMemo(()=>({appId:N,tableKey:A,fields:s??Fy,filters:V,onFilterChange:K,onVariantLoad:ne,onSearch:C??(()=>{}),currentLayoutId:z,layoutRefs:[{tableKey:A,layoutId:z||null}],variantService:d,serviceUrl:u}),[z,s,V,ne,C,N,A,u,d]),le=jt.useMemo(()=>({appId:N,tableKey:A,serviceUrl:u,tasks:Y,columns:h,scale:T,onScaleChange:D,page:m,rowsPerPage:y,rowsPerPageOptions:v,count:g,onPageChange:S,onRowsPerPageChange:b,selectedTaskId:R,onTaskSelect:G,enableRowReorder:x,onTaskReorder:E,layout:f,layoutVariant:B?.variant,layoutVariantLoadKey:B?.key,onLayoutIdChange:Q,onLayoutSave:I}),[h,g,x,Y,Q,f,B?.key,B?.variant,S,b,I,E,G,m,N,A,y,v,T,u,R]);return {scale:T,setScale:D,selectedTaskId:R,setSelectedTaskId:F,filters:V,setFilters:K,filteredTasks:Y,smartFilterProps:be,planningGanttProps:le}};var dF=t=>{let o=Ou(t),r=jt.useMemo(()=>({filterProps:o.smartFilterProps,ganttProps:o.planningGanttProps}),[o.planningGanttProps,o.smartFilterProps]);return {...o,layoutProps:r}};w();Xo__default.default.extend(By__default.default);var nl=[{value:"hour",label:"Hour",width:56},{value:"day",label:"Day",width:46},{value:"week",label:"Week",width:78},{value:"month",label:"Month",width:104}],al=36,il=58,ea=8,sl=260,Uy=320,Lr="220ms cubic-bezier(0.2, 0, 0, 1)",Bu={"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"}},_y=t=>t?Bu[t]?.label??t:"Planned",Ky=t=>t?Bu[t]?.color??"default":"info",zu=t=>Math.min(100,Math.max(0,t??0)),Vu=(t,o=0)=>t.flatMap(r=>[{...r,level:o},...Vu(r.children??[],o+1)]),qy=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:_y(t.status),statusTone:t.status??"planned",progress:zu(t.progress),startDate:t.startDate,endDate:t.endDate,color:t.color,reorderable:t.reorderable!==false}),Hu=(t,o)=>o==="month"?t.startOf("month"):o==="week"?t.startOf("week"):o==="day"?t.startOf("day"):t.startOf("hour"),Wu=(t,o)=>o==="month"?t.endOf("month"):o==="week"?t.endOf("week"):o==="day"?t.endOf("day"):t.endOf("hour"),Xy=(t,o,r)=>{let n=[],a=Hu(t,r),i=Wu(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},ll=(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},$u=({appId:t="planning-gantt",tableKey:o="planning",serviceUrl:r,title:n="Project Plan",extraTools:a,bodyHeight:i=560,tasks:s,columns:c,scale:p="week",onScaleChange:u,page:d,rowsPerPage:f=20,rowsPerPageOptions:h=[20,50,100,-1],count:m,onPageChange:y,onRowsPerPageChange:v,timelineStart:g,timelineEnd:S,selectedTaskId:b,onTaskSelect:C,enableRowReorder:k=true,onTaskReorder:x,layout:E,layoutVariant:M,layoutVariantLoadKey:I,onLayoutIdChange:N,onLayoutSave:A,emptyLabel:T="No planning tasks available.",sx:D})=>{let R=ao(),{t:F}=ue(),z=jt.useRef(null),Z=jt.useRef(null),B=jt.useRef(null),_=jt.useRef(false),[V,K]=jt.useState(null),[Y,G]=jt.useState("content"),[Q,ne]=jt.useState(null),[be,le]=jt.useState(0),[me,Ie]=jt.useState({}),[nt,Xe]=jt.useState(al),[De,Ge]=jt.useState([]),xe=jt.useRef(void 0),[ye,We]=jt.useState({activeId:null,overId:null}),[tt,gt]=jt.useState(null),[ct,ee]=jt.useState(false),Ve=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:4}})),Te=jt.useRef(null),Ae=jt.useMemo(()=>Vu(s),[s]),pt=jt.useMemo(()=>{if(De.length===0)return Ae;let O=new Map(Ae.map(ve=>[ve.id,ve])),q=De.map(ve=>O.get(ve)).filter(ve=>!!ve),pe=new Set(q.map(ve=>ve.id));return [...q,...Ae.filter(ve=>!pe.has(ve.id))]},[Ae,De]),Qe=jt.useMemo(()=>new Map(pt.map(O=>[O.id,O])),[pt]),vt=jt.useMemo(()=>pt.map(O=>qy(O)),[pt]),xt=jt.useMemo(()=>new Map(vt.map(O=>[O.id,O])),[vt]),Vt=jt.useMemo(()=>[{id:"code",label:"ID",minWidth:90},{id:"title",label:"Task",minWidth:260,render:(O,q)=>l(ae,{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:(O,q)=>e(Tt,{label:q.status,color:Ky(q.statusTone),size:"small"})},{id:"progress",label:"Progress",minWidth:140,numeric:true,render:O=>l(ae,{spacing:.6,children:[l(L,{variant:"caption",sx:{color:"text.secondary"},children:[O,"%"]}),e(Sn,{variant:"determinate",value:O,sx:{height:6,borderRadius:999}})]})},{id:"startDate",label:"Start",minWidth:120},{id:"endDate",label:"End",minWidth:120}],[]),_t=jt.useMemo(()=>{if(!c||c.length===0)return Vt;let O=new Map(Vt.map(q=>[q.id,q]));return c.map(q=>{let pe=O.get(q.id),ve=q.width??pe?.minWidth??120,je={id:q.id,label:q.label,minWidth:ve};if(pe?.numeric&&(je.numeric=true),q.render){let Ke=q.render;return je.render=(It,yt)=>{let ht=Qe.get(yt.id);return Ke(ht||yt)},je}return pe?.render?(je.render=pe.render,je):(je.render=(Ke,It)=>{let yt=It[q.id];if(yt!=null&&String(yt).length>0)return String(yt);let kt=Qe.get(It.id)?.[q.id];return kt!=null&&String(kt).length>0?String(kt):"-"},je)})},[c,Vt,Qe]),J=an({appId:t,tableKey:o,title:n,columns:_t,rows:vt,rowKey:"id",page:d,rowsPerPage:f,rowsPerPageOptions:h,count:m??vt.length,onPageChange:y,onRowsPerPageChange:v,showSummary:false,layout:E,onLayoutSave:A}),Je=t?e(nn,{appId:t,tableKey:o,currentLayoutData:J.currentLayoutData,onLayoutLoad:J.handleLayoutLoad,targetLayoutId:J.layoutIdToLoad,activeLayoutId:J.currentLayoutId,serviceUrl:r}):null,Be=J.visibleRows;jt.useEffect(()=>{let O=Ae.map(q=>q.id);Ge(q=>{let pe=new Set(O),ve=q.filter(yt=>pe.has(yt)),je=new Set(ve),Ke=O.filter(yt=>!je.has(yt)),It=[...ve,...Ke];return It.length===q.length&&It.every((yt,ht)=>yt===q[ht])?q:It});},[Ae]),jt.useEffect(()=>{I===void 0||!M||xe.current!==I&&(xe.current=I,J.handleVariantLoad(M));},[J,M,I]),jt.useEffect(()=>{N?.(J.currentLayoutId);},[J.currentLayoutId,N]);let se=O=>O.type==="group"?`group-${O.id}`:`row-${(O.data||O)?.id}`,ge=jt.useMemo(()=>{let O=vt.map(ht=>Xo__default.default(ht.startDate)),q=vt.map(ht=>Xo__default.default(ht.endDate)),pe=g?Xo__default.default(g):O.reduce((ht,kt)=>kt.isBefore(ht)?kt:ht,O[0]??Xo__default.default()),ve=S?Xo__default.default(S):q.reduce((ht,kt)=>kt.isAfter(ht)?kt:ht,q[0]??Xo__default.default().add(30,"day")),je=p==="month"?"month":p==="week"?"week":p==="day"?"day":"hour",Ke=p==="month"?"month":p==="week"?"week":p==="day"?"day":"hour",It=p==="hour"?12:1,yt=p==="hour"?12:1;return {start:Hu(pe.subtract(It,je),p),end:Wu(ve.add(yt,Ke),p)}},[vt,p,S,g]),U=nl.find(O=>O.value===p)??nl[1],fe=Array.isArray(a)?a:a?[a]:[],Pe=jt.useMemo(()=>Xy(ge.start,ge.end,p),[ge.end,ge.start,p]),_e=Pe.length*U.width,ft=Pe.length>0?100/Pe.length:100,ut=Pe.length>0?`repeat(${Pe.length}, minmax(${U.width}px, 1fr))`:"1fr",Ot=Pe.length>0?`calc(100% / ${Pe.length}) 100%`:"100% 100%",Ce=(J.columns||[]).filter(O=>J.visibleColumns.includes(O.id)).reduce((O,q)=>O+(J.columnWidths?.[q.id]||q.minWidth||100),0)+(J.grouping.length>0?72:0),Oe=Y==="manual"&&V!==null?V:Ce,Ze=Q==="table",Xt=Q==="timeline",St=Q==="timeline",Ct=Q==="table",et=!St&&!Ct,Pt=()=>{let O=be||z.current?.clientWidth||0;return O>0?Math.max(sl,O-ea-Uy):Math.max(sl,Ce)},Bt=O=>Math.min(Math.max(O,sl),Pt()),j=(()=>{if(be<=0)return null;let O=et?ea:0;if(Ze)return {tableWidth:be,splitterWidth:O,timelineWidth:0};if(Xt)return {tableWidth:0,splitterWidth:O,timelineWidth:be};if(Y==="even"){let pe=Math.max(0,(be-O)/2);return {tableWidth:pe,splitterWidth:O,timelineWidth:Math.max(0,be-O-pe)}}let q=Bt(Oe);return {tableWidth:q,splitterWidth:O,timelineWidth:Math.max(0,be-O-q)}})(),te=j?`${j.tableWidth}px ${j.splitterWidth}px ${j.timelineWidth}px`:Ze?"minmax(0, 1fr) 0px 0px":Xt?"0px 0px minmax(0, 1fr)":Y==="even"?`minmax(0, 1fr) ${ea}px minmax(0, 1fr)`:`${Oe}px ${ea}px minmax(0, 1fr)`;jt.useEffect(()=>{Y==="manual"&&K(O=>O===null?null:Bt(O));},[Y,Ce,be]);let Re=O=>{O.preventDefault(),O.currentTarget.setPointerCapture(O.pointerId),ne(null),G("manual"),Te.current={startX:O.clientX,startWidth:Z.current?.getBoundingClientRect().width??Oe};let q=ve=>{let je=Te.current;if(!je)return;let Ke=Bt(je.startWidth+ve.clientX-je.startX);K(Ke);},pe=()=>{Te.current=null,window.removeEventListener("pointermove",q),window.removeEventListener("pointerup",pe),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",pe);},ke=()=>{ne(null),G("even"),K(null);},ze=O=>!k||!O?false:xt.get(O)?.reorderable!==false,ot=(O,q)=>{if(!O||!q||O===q||!ze(O)||!ze(q))return false;if(J.grouping.length===0)return true;let pe=xt.get(O),ve=xt.get(q);return !pe||!ve?false:J.grouping.every(je=>pe[je]===ve[je])},at=(O,q)=>{if(!ot(O,q))return;let pe=Be.filter(Lt=>Lt.type!=="group").map(Lt=>String((Lt.data||Lt)?.id)),ve=pe.indexOf(O),je=pe.indexOf(q);if(ve<0||je<0)return;let Ke=[...pe];[Ke[ve],Ke[je]]=[Ke[je],Ke[ve]];let It=new Set(pe),yt=pt.map(Lt=>Lt.id),ht=[...Ke,...yt.filter(Lt=>!It.has(Lt))],kt=Qe.get(O),oo=Qe.get(q);if(J.setOrder("asc"),J.setOrderBy(""),Ge(ht),kt&&oo){let{level:Lt,...Zt}=kt,{level:zt,...Gt}=oo,Ht=ht.reduce((eo,ro)=>{let mo=Qe.get(ro);if(mo){let{level:To,...Po}=mo;eo.push(Po);}return eo},[]);x?.(Ht,{activeTask:Zt,targetTask:Gt});}},it=(O,q)=>{if(!ze(q.id)){O.preventDefault();return}O.stopPropagation(),O.dataTransfer.effectAllowed="move",O.dataTransfer.setData("text/plain",q.id),We({activeId:q.id,overId:null}),C?.(Qe.get(q.id)||q);},wt=(O,q)=>{if(!ot(ye.activeId,q)){We(pe=>pe.overId===null?pe:{...pe,overId:null});return}O.preventDefault(),O.stopPropagation(),O.dataTransfer.dropEffect="move",We(pe=>pe.overId===q?pe:{...pe,overId:q});},Et=(O,q)=>{let pe=ye.activeId||O.dataTransfer.getData("text/plain");if(!ot(pe,q)){We({activeId:null,overId:null});return}O.preventDefault(),O.stopPropagation(),at(pe,q),We({activeId:null,overId:null});},Nt=()=>{We({activeId:null,overId:null});},Dt=O=>{if(_.current)return;let q=O==="table"?Z.current:B.current,pe=O==="table"?B.current:Z.current;!q||!pe||(_.current=true,pe.scrollTop=q.scrollTop,window.requestAnimationFrame(()=>{_.current=false;}));};return jt.useLayoutEffect(()=>{let O=z.current;if(!O){le(0);return}let q=0,pe=()=>{window.cancelAnimationFrame(q),q=window.requestAnimationFrame(()=>{let je=O.clientWidth;le(Ke=>Math.abs(Ke-je)<.5?Ke:je);});};if(pe(),typeof ResizeObserver>"u")return window.addEventListener("resize",pe),()=>{window.cancelAnimationFrame(q),window.removeEventListener("resize",pe);};let ve=new ResizeObserver(pe);return ve.observe(O),window.addEventListener("resize",pe),()=>{window.cancelAnimationFrame(q),ve.disconnect(),window.removeEventListener("resize",pe);}},[vt.length]),jt.useLayoutEffect(()=>{if(!b||Ct)return;let O=B.current,q=Z.current;if(!O)return;let pe=`row-${b}`,ve=Array.from(O.querySelectorAll("[data-planning-timeline-row-key]")).find(It=>It.dataset.planningTimelineRowKey===pe),je=xt.get(b);if(!ve||!je)return;let Ke=window.requestAnimationFrame(()=>{let It=O.getBoundingClientRect(),yt=ve.getBoundingClientRect(),ht=Math.max(1,O.clientHeight-nt),kt=O.scrollTop+yt.top-It.top-nt-(ht-yt.height)/2;_.current=true,O.scrollTop=Math.max(0,kt),q&&!St&&(q.scrollTop=O.scrollTop);let oo=Math.max(1,O.scrollWidth),Lt=Pe.length>0?oo/Pe.length:U.width,Zt=ll(Xo__default.default(je.startDate),Pe,Lt),zt=Math.max(0,Zt-Lt);O.scrollLeft=Math.min(zt,Math.max(0,oo-O.clientWidth)),window.requestAnimationFrame(()=>{_.current=false;});});return ()=>window.cancelAnimationFrame(Ke)},[U.width,nt,b,St,xt,Ct,Be,Pe]),jt.useLayoutEffect(()=>{let O=Z.current;if(!O)return;let q=0,pe=0,ve=false,je=()=>{if(ve)return;let zt=O.querySelector("thead"),Gt=Array.from(O.querySelectorAll("tbody tr[data-ctable-row-key]"));if(Gt.length===0)return;let Ht=zt?.getBoundingClientRect().height||al,eo={};Gt.forEach(ro=>{let mo=ro.dataset.ctableRowKey;mo&&(eo[mo]=ro.getBoundingClientRect().height);}),Xe(ro=>Math.abs(ro-Ht)<.01?ro:Ht),Ie(ro=>{let mo=Object.keys(ro),To=Object.keys(eo);return mo.length===To.length&&To.every(Po=>Math.abs((ro[Po]??0)-eo[Po])<.01)?ro:eo});},Ke=()=>{window.cancelAnimationFrame(q),q=window.requestAnimationFrame(je);};if(je(),window.cancelAnimationFrame(pe),pe=window.requestAnimationFrame(()=>{pe=window.requestAnimationFrame(je);}),typeof document<"u"&&document.fonts?.ready&&document.fonts.ready.then(()=>{ve||Ke();}).catch(()=>{}),typeof ResizeObserver>"u")return window.addEventListener("resize",Ke),()=>{ve=true,window.cancelAnimationFrame(q),window.cancelAnimationFrame(pe),window.removeEventListener("resize",Ke);};let It=new ResizeObserver(Ke),yt=O.querySelector("table"),ht=O.querySelector("tbody"),kt=O.querySelector("thead");yt&&It.observe(yt),kt&&It.observe(kt);let oo=new WeakSet,Lt=()=>{O.querySelectorAll("tbody tr[data-ctable-row-key]").forEach(zt=>{oo.has(zt)||(It.observe(zt),oo.add(zt));});};Lt();let Zt=null;return ht&&typeof MutationObserver<"u"&&(Zt=new MutationObserver(()=>{Lt(),Ke();}),Zt.observe(ht,{childList:true,subtree:true,characterData:true})),window.addEventListener("resize",Ke),()=>{ve=true,window.cancelAnimationFrame(q),window.cancelAnimationFrame(pe),It.disconnect(),Zt?.disconnect(),window.removeEventListener("resize",Ke);}},[Be,J.visibleColumns,J.grouping,J.columnWidths]),l(Le,{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 ${R.palette.divider}`,...D},children:[e("div",{className:"orb-table-toolbar orb-planning-table-toolbar",role:"toolbar","aria-label":F("table.title.default"),children:l("div",{className:"orb-table-toolbar-primary",children:[e(Ua,{value:J.filterText,onChange:O=>{J.setFilterText(O),J.setPage(0);}}),e(Ga,{rowsPerPage:J.rowsPerPage,rowsPerPageOptions:h,page:J.page,count:J.totalDisplayCount,onRowsPerPageChange:J.setRowsPerPage,onPageChange:J.setPage}),fe.length>0&&e("div",{className:"orb-table-toolbar-custom",children:fe.map((O,q)=>e("div",{className:"orb-planning-extra-tool",children:O},`planning-extra-tool-${q}`))}),e("span",{className:"orb-table-toolbar-spacer"}),l("div",{className:"orb-table-toolbar-actions",children:[l("div",{className:"orb-table-tool-group",children:[e(ie,{className:"orb-table-tool-button",tooltip:"Column visibility",onClick:O=>J.setAnchorEl(O.currentTarget),sx:lo,children:e(Yr,{fontSize:"small"})}),e(ie,{className:"orb-table-tool-button",tooltip:"Group by",onClick:O=>J.setGroupAnchorEl(O.currentTarget),sx:lo,children:e(pr,{fontSize:"small"})}),e(ie,{className:`orb-table-tool-button ${J.sortBy.length>0||J.orderBy?"orb-is-active":""}`,tooltip:"Sort by...",active:J.sortBy.length>0||!!J.orderBy,onClick:()=>ee(true),sx:lo,children:e(id,{fontSize:"small"})})]}),Je&&e("div",{className:"orb-table-tool-group",children:Je}),e("div",{className:"orb-table-tool-group orb-planning-pane-controls",children:e(wn,{"aria-label":"Planning pane layout",size:"small",value:Q??(Y==="even"?"split":null),options:[{value:"table",label:"Expand task table",icon:e(za,{fontSize:"small"})},{value:"split",label:"Split evenly",icon:e(Ha,{fontSize:"small"})},{value:"timeline",label:"Expand timeline",icon:e(Ba,{fontSize:"small"})}],onValueChange:O=>{O==="split"?ke():ne(O);}})}),e("div",{className:"orb-table-tool-group orb-planning-scale-control",children:e(Ut,{label:"",value:p,options:nl.map(O=>({value:O.value,label:O.label})),onChange:O=>u?.(O.target.value)})})]})]})}),vt.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:l("div",{ref:z,sx:{height:"100%",display:"grid",gridTemplateColumns:te,minWidth:0,transition:`grid-template-columns ${Lr}`},children:[e("div",{"data-planning-scroll-pane":"table",ref:Z,onScroll:()=>Dt("table"),sx:{width:"100%",minWidth:0,maxWidth:"100%",height:i,overflowX:"auto",overflowY:"auto",opacity:St?0:1,transform:St?"translateX(-10px)":"translateX(0)",pointerEvents:St?"none":"auto",transition:`opacity ${Lr}, transform ${Lr}`},children:e(core.DndContext,{sensors:Ve,collisionDetection:core.closestCenter,modifiers:[modifiers.restrictToHorizontalAxis],onDragEnd:O=>{let q=O?.active?.id,pe=O?.over?.id;typeof q=="string"&&typeof pe=="string"&&J.handleColumnReorder(q,pe);},children:l("table",{className:"orb-tbl orb-ctable orb-planning-table",sx:{tableLayout:"fixed",width:Ce,"& thead th":{height:al,py:0,lineHeight:1.15,boxSizing:"border-box"}},children:[e(qa,{columns:J.columns,visibleColumns:J.visibleColumns,order:J.order,orderBy:J.orderBy,sortBy:J.sortBy,onRequestSort:J.handleRequestSort,onContextMenu:(O,q)=>{O.preventDefault(),O.stopPropagation(),gt({mouseX:O.clientX+2,mouseY:O.clientY-6,columnId:q});},grouping:J.grouping,isAllExpanded:J.isAllExpanded,handleToggleAll:J.handleToggleAll,columnWidths:J.columnWidths,onColumnResize:J.handleColumnResize,enableColumnReorder:true}),e(Xa,{visibleRows:Be,columns:J.columns,visibleColumns:J.visibleColumns,selected:b?[b]:[],expandedGroups:J.expandedGroups,toggleGroupExpand:J.toggleGroupExpand,handleExpandGroupRecursively:J.handleExpandGroupRecursively,handleCollapseGroupRecursively:J.handleCollapseGroupRecursively,isGroupFullyExpanded:J.isGroupFullyExpanded,grouping:J.grouping,rowKeyProp:"id",page:J.page,rowsPerPage:J.rowsPerPage,emptyLabel:T,handleClick:(O,q)=>{C?.(Qe.get(q.id)||q);},getRowDataKey:({entry:O})=>se(O),getGroupRowProps:()=>({style:{height:il}}),getRowProps:({data:O})=>{let q=O,pe=ze(q.id),ve=ye.activeId===q.id,je=ye.overId===q.id&&ot(ye.activeId,q.id);return {draggable:pe,className:je?"orb-is-drop-target":void 0,style:{cursor:ve?"grabbing":pe?"grab":C?"pointer":"default",height:il,opacity:ve?.56:1,transition:"background-color 120ms ease, opacity 120ms ease"},onDragStart:Ke=>it(Ke,q),onDragOver:Ke=>wt(Ke,q.id),onDragEnter:Ke=>wt(Ke,q.id),onDrop:Ke=>Et(Ke,q.id),onDragEnd:Nt}}})]})})}),e("div",{onPointerDown:et?Re:void 0,role:"separator","aria-orientation":"vertical",sx:{width:et?ea:0,cursor:et?"col-resize":"default",opacity:et?1:0,pointerEvents:et?"auto":"none",borderLeft:et?`1px solid ${R.palette.divider}`:"0 solid transparent",borderRight:et?`1px solid ${R.palette.divider}`:"0 solid transparent",backgroundColor:Ne()==="dark"?"rgba(148,163,184,0.10)":"rgba(15,23,42,0.04)",transition:`width ${Lr}, opacity ${Lr}, background-color 120ms ease`,position:"relative","&:hover":{backgroundColor:R.palette.action.selected},"&::before":{content:'""',position:"absolute",top:0,bottom:0,left:-6,right:-6,cursor:et?"col-resize":"default"}}}),e("div",{sx:{minWidth:0,overflow:"hidden",opacity:Ct?0:1,transform:Ct?"translateX(10px)":"translateX(0)",pointerEvents:Ct?"none":"auto",transition:`opacity ${Lr}, transform ${Lr}`},children:e("div",{"data-planning-scroll-pane":"timeline",ref:B,onScroll:()=>Dt("timeline"),sx:{width:"100%",height:i,overflowX:"auto",overflowY:"auto"},children:l("div",{sx:{width:"100%",minWidth:_e||"100%"},children:[e("div",{className:"orb-planning-timeline-header",sx:{display:"grid",gridTemplateColumns:ut,height:nt,boxSizing:"border-box",borderBottom:`1px solid ${R.palette.divider}`,position:"sticky",top:0,zIndex:2},children:Pe.map(O=>l("div",{title:O.title,sx:{px:.75,display:"flex",flexDirection:O.contextLabel?"column":"row",alignItems:"center",justifyContent:"center",gap:O.contextLabel?.15:0,borderRight:`1px solid ${R.palette.divider}`,color:O.contextLabel?"text.primary":"text.secondary",overflow:"hidden"},children:[O.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:O.contextLabel}),e(L,{component:"span",sx:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:12,fontWeight:700,lineHeight:1.15},children:O.label})]},O.key))}),e(ae,{sx:{position:"relative"},children:Be.map(O=>{let q=se(O),pe=me[q]??il;if(O.type==="group")return e("div",{className:"orb-planning-timeline-row orb-table-group-row","data-planning-timeline-row-key":q,sx:{position:"relative",height:pe,boxSizing:"border-box",borderBottom:`1px solid ${R.palette.divider}`}},O.id);let ve=O.data||O,je=Xo__default.default(ve.startDate),Ke=Xo__default.default(ve.endDate),It=ll(je,Pe,ft),yt=ll(Ke,Pe,ft),ht=Math.max(0,yt-It),kt=zu(ve.progress),oo=ve.id===b,Lt=ze(ve.id),Zt=ye.activeId===ve.id,zt=ye.overId===ve.id&&ot(ye.activeId,ve.id),Gt=ve.color??(ve.statusTone==="blocked"?R.palette.error.main:R.palette.primary.main);return e("div",{className:`orb-planning-timeline-row ${oo?"orb-is-selected":""}`,"data-planning-timeline-row-key":q,draggable:Lt,onDragStart:Ht=>it(Ht,ve),onDragOver:Ht=>wt(Ht,ve.id),onDragEnter:Ht=>wt(Ht,ve.id),onDrop:Ht=>Et(Ht,ve.id),onDragEnd:Nt,onClick:()=>C?.(Qe.get(ve.id)||ve),sx:{position:"relative",height:pe,boxSizing:"border-box",borderBottom:`1px solid ${R.palette.divider}`,opacity:Zt?.56:1,"&::before":{content:'""',position:"absolute",top:0,left:0,right:0,height:2,backgroundColor:R.palette.primary.main,opacity:zt?1:0,transition:"opacity 120ms ease",pointerEvents:"none",zIndex:3},backgroundImage:Ne()==="dark"?"linear-gradient(90deg, rgba(148,163,184,0.08) 1px, transparent 1px)":"linear-gradient(90deg, rgba(15,23,42,0.06) 1px, transparent 1px)",backgroundSize:Ot,cursor:Zt?"grabbing":Lt?"grab":C?"pointer":"default",transition:"opacity 120ms ease"},children:e(st,{title:`${ve.title}: ${je.format("MMM D HH:mm")} - ${Ke.format("MMM D HH:mm")}`,children:l("div",{sx:{position:"absolute",left:`${It}%`,top:Math.max(8,(pe-24)/2),width:`max(18px, ${ht}%)`,height:24,borderRadius:999,overflow:"hidden",backgroundColor:Ne()==="dark"?"rgba(148,163,184,0.18)":"rgba(15,23,42,0.10)",outline:oo?`2px solid ${R.palette.warning.main}`:"none",outlineOffset:2},children:[e("div",{sx:{height:"100%",width:`${kt}%`,backgroundColor:Gt}}),e(L,{sx:{position:"absolute",inset:0,px:1,display:"flex",alignItems:"center",color:"#fff",fontSize:11,fontWeight:800,textShadow:"0 1px 4px rgba(0,0,0,0.45)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:ve.code})]})})},ve.id)})})]})})})]})}),e(Jr,{groupAnchorEl:J.groupAnchorEl,setGroupAnchorEl:J.setGroupAnchorEl,grouping:J.grouping,setGrouping:J.setGrouping,columns:J.columns}),e(en,{anchorEl:J.anchorEl,setAnchorEl:J.setAnchorEl,columns:J.columns,visibleColumns:J.visibleColumns,toggleColumnVisibility:J.toggleColumnVisibility}),e(Td,{contextMenu:tt,handleClose:()=>gt(null),columns:J.columns,visibleColumns:J.visibleColumns,grouping:J.grouping,summaryColumns:J.summaryColumns,showSummary:J.showSummary,sortBy:J.sortBy,orderBy:J.orderBy,order:J.order,onSortAsc:O=>{J.applyMultiSort([{field:O,direction:"asc"}]);},onSortDesc:O=>{J.applyMultiSort([{field:O,direction:"desc"}]);},onClearSort:O=>{let q=J.sortBy.filter(pe=>pe.field!==O);q.length>0?J.applyMultiSort(q):(J.clearMultiSort(),J.orderBy===O&&J.setOrderBy(""));},onHideColumn:O=>{J.visibleColumns.includes(O)&&J.toggleColumnVisibility(O);},onToggleGroup:O=>J.toggleGroupField(O),onToggleSummary:O=>J.toggleSummaryColumn(O),onOpenSortDialog:()=>ee(true)}),e(Pd,{open:ct,onClose:()=>ee(false),columns:J.columns,initialRules:J.sortBy.length>0?J.sortBy:J.orderBy?[{field:J.orderBy,direction:J.order}]:[],onApply:O=>J.applyMultiSort(O),onClear:()=>{J.clearMultiSort(),J.setOrderBy("");}})]})};w();var GF=({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 l(ae,{spacing:r,sx:i,children:[e("div",{sx:{flexShrink:0},children:e(tr,{...t})}),e("div",{sx:{flex:1,minHeight:0,overflow:"hidden"},children:e($u,{...o,bodyHeight:o.bodyHeight??"100%",sx:s})}),a]})};w();var Gu=640,Zy=360,Yy=360,qi=8,fn="220ms cubic-bezier(0.2, 0, 0, 1)",pl=(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,...pl(i,o,r+1,[...n,a.id])]:s}),_u=t=>t.flatMap(o=>[o,..._u(o.children??[])]),Ku=(t,o=0,r=[])=>t.flatMap(n=>{let a=n.children??[];return [{node:n,level:o,hasChildren:a.length>0,parentIds:r},...Ku(a,o+1,[...r,n.id])]}),qu=t=>t.flatMap(o=>{let r=o.children??[];return r.length===0?[]:[o.id,...qu(r)]}),Uu=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(),eO=({title:t,subtitle:o,nodes:r,columns:n,detail:a,selectedNodeId:i,defaultSelectedNodeId:s,onNodeSelect:c,expandedNodeIds:p,defaultExpandedNodeIds:u,onExpandedNodeIdsChange:d,defaultPaneMode:f="split",minTreePaneWidth:h=Zy,minDetailPaneWidth:m=Yy,tableAppId:y="ctree-comp",tableKey:v="default",tableTitle:g,filterConfig:S,searchQuery:b,searchToken:C,defaultRowsPerPage:k=-1,rowsPerPageOptions:x=[20,50,100,-1],serviceUrl:E,emptyLabel:M="No tree items available.",headerAction:I,sx:N,className:A})=>{let T=ao(),D=jt.useRef(null),R=jt.useRef(null),F=jt.useRef(null),[z,Z]=jt.useState(s??r[0]?.id??null),[B,_]=jt.useState(u??qu(r).slice(0,3)),[V,K]=jt.useState(f),[Y,G]=jt.useState(Gu),[Q,ne]=jt.useState(0),[be,le]=jt.useState(0),[me,Ie]=jt.useState(k),nt=jt.useMemo(()=>n&&n.length>0?n:[{id:"label",label:"Name",render:se=>l(ae,{spacing:.3,children:[e(L,{sx:{fontSize:15,fontWeight:700,lineHeight:1.15},children:se.label}),se.subtitle&&e(L,{sx:{fontSize:13,color:"text.secondary",lineHeight:1.2},children:se.subtitle})]})}],[n]),Xe=jt.useMemo(()=>new Set(p??B),[p,B]),De=jt.useMemo(()=>pl(r,Xe),[r,Xe]),Ge=jt.useMemo(()=>_u(r),[r]),xe=jt.useMemo(()=>Ku(r),[r]),ye=i===void 0?z:i,We=jt.useMemo(()=>Ge.find(se=>se.id===ye)??null,[ye,Ge]),tt=se=>{let ge=R.current?.clientWidth??0,U=ge>0?Math.max(h,ge-qi-m):Math.max(h,se);return Math.min(Math.max(se,h),U)},gt=V==="detail",ct=V==="tree"||!a,ee=V==="split"&&!!a,Te=(()=>{if(Q<=0)return null;if(V==="tree"||!a)return {treeWidth:Q,splitterWidth:0,detailWidth:0};if(V==="detail")return {treeWidth:0,splitterWidth:0,detailWidth:Q};let se=ee?qi:0,ge=tt(Y);return {treeWidth:ge,splitterWidth:se,detailWidth:Math.max(0,Q-se-ge)}})(),Ae=Te?`${Te.treeWidth}px ${Te.splitterWidth}px ${Te.detailWidth}px`:V==="tree"||!a?"minmax(0, 1fr) 0px 0px":V==="detail"?"0px 0px minmax(0, 1fr)":`minmax(${h}px, ${Y}px) ${qi}px minmax(${m}px, 1fr)`;jt.useEffect(()=>{let se=R.current;if(!se){ne(0);return}let ge=0,U=()=>{window.cancelAnimationFrame(ge),ge=window.requestAnimationFrame(()=>{let Pe=se.clientWidth;ne(_e=>Math.abs(_e-Pe)<.5?_e:Pe);});};if(U(),typeof ResizeObserver>"u")return window.addEventListener("resize",U),()=>{window.cancelAnimationFrame(ge),window.removeEventListener("resize",U);};let fe=new ResizeObserver(U);return fe.observe(se),window.addEventListener("resize",U),()=>{window.cancelAnimationFrame(ge),fe.disconnect(),window.removeEventListener("resize",U);}},[]);let pt=se=>{p===void 0&&_(se),d?.(se);},Qe=se=>{let ge=new Set(Xe);ge.has(se)?ge.delete(se):ge.add(se),pt(Array.from(ge));},vt=se=>{i===void 0&&Z(se.id),c?.(se);};jt.useEffect(()=>{le(0);},[r]),jt.useEffect(()=>{let se=b?.trim().toLowerCase();if(!se)return;let ge=xe.find(({node:ut})=>Uu(ut).includes(se));if(!ge)return;let U=new Set(Xe);ge.parentIds.forEach(ut=>U.add(ut)),pt(Array.from(U)),vt(ge.node);let Pe=pl(r,U).findIndex(({node:ut})=>ut.id===ge.node.id);Pe>=0&&me>0&&le(Math.floor(Pe/me));let _e=0,ft=0;return _e=window.requestAnimationFrame(()=>{ft=window.requestAnimationFrame(()=>{let ut=D.current?.querySelector("tr.orb-selected"),Ot=ut?.closest(".orb-table-container");if(ut&&Ot){let Ce=Ot.getBoundingClientRect(),Oe=ut.getBoundingClientRect(),Ze=Oe.top-Ce.top+Ot.scrollTop;Ot.scrollTo({top:Ze-Ot.clientHeight/2+Oe.height/2,behavior:"smooth"});return}ut?.scrollIntoView({block:"center",behavior:"smooth"});});}),()=>{window.cancelAnimationFrame(_e),window.cancelAnimationFrame(ft);}},[b,C,xe,r,me]);let xt=jt.useMemo(()=>De.map(({node:se,level:ge,hasChildren:U})=>({...se,id:se.id,__node:se,__level:ge,__hasChildren:U,__expanded:Xe.has(se.id),__searchText:Uu(se)})),[Xe,De]),Vt=jt.useMemo(()=>nt.map((se,ge)=>({id:se.id,label:se.label,minWidth:typeof se.width=="number"?se.width:se.minWidth??(ge===0?320:120),numeric:se.numeric??se.align==="right",render:(U,fe)=>{let Pe=fe.__node,_e=se.render?se.render(Pe):Pe[se.id];if(ge!==0)return e(dt,{sx:{minWidth:0,color:se.align==="right"?"text.primary":"text.secondary",fontWeight:se.align==="right"?750:500,textAlign:se.align??"left"},children:_e});let ft=Number(fe.__level??0),ut=!!fe.__hasChildren,Ot=!!fe.__expanded;return l(ae,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0,pl:`${ft*24}px`},children:[e(ie,{tooltip:ut?Ot?"Collapse":"Expand":"",onClick:Ce=>{Ce.stopPropagation(),ut&&Qe(Pe.id);},disabled:!ut,sx:{width:24,height:24,visibility:ut?"visible":"hidden",transform:Ot?"rotate(0deg)":"rotate(-90deg)",transition:"transform 160ms ease"},children:e(Oo,{sx:{fontSize:20}})}),e(dt,{sx:{width:10,height:10,borderRadius:"50%",flexShrink:0,backgroundColor:Pe.markerColor??T.palette.primary.main}}),e(dt,{sx:{minWidth:0},children:_e})]})}})),[nt,Xe,T.palette.primary.main]),_t=se=>{if(!ee)return;se.preventDefault(),se.currentTarget.setPointerCapture(se.pointerId),F.current={startX:se.clientX,startWidth:Y};let ge=fe=>{let Pe=F.current;Pe&&G(tt(Pe.startWidth+fe.clientX-Pe.startX));},U=()=>{F.current=null,window.removeEventListener("pointermove",ge),window.removeEventListener("pointerup",U),document.body.style.cursor="",document.body.style.userSelect="";};document.body.style.cursor="col-resize",document.body.style.userSelect="none",window.addEventListener("pointermove",ge),window.addEventListener("pointerup",U);},J=()=>{let se=R.current?.clientWidth??0,ge=se>0?Math.max(h,(se-qi)/2):Gu;K("split"),G(tt(ge));},Je=()=>a?typeof a=="function"?a(We):a:null,Be=a?e(wn,{"aria-label":"Tree pane layout",value:V,options:[{value:"tree",label:"Expand tree",icon:e(za,{fontSize:"small"})},{value:"split",label:"Split evenly",icon:e(Ha,{fontSize:"small"})},{value:"detail",label:"Expand detail",icon:e(Ba,{fontSize:"small"})}],onValueChange:se=>{se==="split"?J():K(se);},sx:{position:"absolute",top:13,right:56,zIndex:3,backdropFilter:"blur(10px)"}}):null;return l(dt,{ref:D,className:["ctree_comp",A].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 ${Ee(T.palette.common.black,Ne()==="dark"?.24:.08)}`,...N},children:[Be,l(dt,{ref:R,sx:{height:"100%",display:"grid",gridTemplateColumns:Ae,transition:`grid-template-columns ${fn}`,minWidth:0},children:[l(dt,{"aria-hidden":gt?true:void 0,sx:{minWidth:0,overflow:"hidden",display:"flex",flexDirection:"column",opacity:gt?0:1,transform:gt?"translateX(-12px)":"translateX(0)",pointerEvents:gt?"none":"auto",transition:`opacity ${fn}, transform ${fn}`,willChange:"opacity, transform"},children:[l(ae,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:2,sx:{px:2,py:1.5,minHeight:74,borderBottom:`1px solid ${T.palette.divider}`},children:[l(ae,{direction:"row",alignItems:"center",spacing:1.4,sx:{minWidth:0},children:[e(pr,{sx:{color:"primary.main",fontSize:28}}),l(dt,{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})]})]}),I!==void 0?I:e(ie,{tooltip:"Add node",color:"default",children:e(Ir,{fontSize:"small"})})]}),l(dt,{sx:{flex:1,minHeight:0,overflow:"hidden"},children:[e(_o,{appId:y,tableKey:v,title:g??(typeof t=="string"?t:"Tree"),columns:Vt,rows:xt,rowKey:"id",fitContainer:true,fullWidth:true,showSummary:false,selectionMode:"single",selected:ye?[ye]:[],onSelectionChange:se=>{let ge=se[se.length-1],U=Ge.find(fe=>fe.id===ge);U&&vt(U);},page:be,rowsPerPage:me,rowsPerPageOptions:x,count:xt.length,onPageChange:le,onRowsPerPageChange:se=>{le(0),Ie(se);},filterConfig:S,serviceUrl:E,graphReport:{enabled:false},disableGrouping:true,disableSorting:true,maxHeight:"100%"}),xt.length===0&&e(dt,{sx:{minHeight:220,display:"grid",placeItems:"center",color:"text.secondary"},children:M})]})]}),e(dt,{"data-ctree-splitter":"true",role:"separator","aria-orientation":"vertical",onPointerDown:ee?_t:void 0,sx:{width:"100%",cursor:ee?"col-resize":"default",backgroundColor:ee?Ee(T.palette.text.primary,Ne()==="dark"?.16:.08):"transparent",opacity:ee?1:0,pointerEvents:ee?"auto":"none",position:"relative",transition:`opacity ${fn}, background-color 120ms ease`,"&:hover":{backgroundColor:ee?Ee(T.palette.primary.main,Ne()==="dark"?.35:.18):"transparent"}}}),l(dt,{"aria-hidden":ct?true:void 0,sx:{minWidth:0,overflow:"hidden",display:"flex",flexDirection:"column",opacity:ct?0:1,transform:ct?"translateX(12px)":"translateX(0)",pointerEvents:ct?"none":"auto",transition:`opacity ${fn}, transform ${fn}`,willChange:"opacity, transform"},children:[e(dt,{sx:{px:2,pt:2,minHeight:74,display:"flex",alignItems:"flex-end"},children:e(At,{sx:{width:"100%"}})}),e(dt,{sx:{flex:1,minHeight:0,overflow:"auto",px:2,pb:2},children:Je()})]})]})]})};w();var ev={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)"}}},aO=({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:c})=>{let p=dr("(prefers-reduced-motion: reduce)"),[u,d]=jt.useState("to"),f=!s&&!p&&r!=="none";jt.useEffect(()=>{if(!f){d("to");return}d("from");let y=requestAnimationFrame(()=>{y=requestAnimationFrame(()=>{d("to");});});return ()=>cancelAnimationFrame(y)},[o,f]);let h=ev[r],m=jt.useMemo(()=>f?u==="from"?h.from:h.to:{opacity:1,transform:"none"},[f,u,h.from,h.to]);return e(dt,{sx:{willChange:f?"opacity, transform":"auto",transition:f?`opacity ${n}ms ${i} ${a}ms, transform ${n}ms ${i} ${a}ms`:"none",backfaceVisibility:"hidden",...m,...c},children:t})},iO={subtle:{variant:"fade",durationMs:180},smooth:{variant:"slide-up",durationMs:220},snappy:{variant:"scale",durationMs:160}};exports.AIBrowserGlow=G2;exports.Activity=wl;exports.AgentPanel=Ru;exports.AlertCircle=kl;exports.AlertTriangle=Tl;exports.ArrowDown=Iv;exports.ArrowRight=Rv;exports.ArrowUp=Mv;exports.BarChart=ji;exports.Bot=Dv;exports.Button=ls;exports.CAINavProvider=Nb;exports.CAlert=_r;exports.CAmapChart=Ld;exports.CAppHeader=yi;exports.CAppHeaderSearch=Vs;exports.CAppPageLayout=NM;exports.CAuthPage=oF;exports.CAvatar=Ur;exports.CBadge=ya;exports.CBarChart=On;exports.CButton=we;exports.CCalendar=Tn;exports.CChartCard=Qa;exports.CCheckbox=Mt;exports.CChip=Tt;exports.CComboChart=Md;exports.CCustomizeAgent=Od;exports.CDatePicker=lg;exports.CDetailInfoPage=LR;exports.CDetailSearchAiBar=op;exports.CDetailSectionCard=ui;exports.CDialog=Ft;exports.CDivider=At;exports.CFileUpload=dg;exports.CFilterField=Cw;exports.CFishboneChart=Ad;exports.CGoogleMapChart=Ed;exports.CGraphCharts=Fd;exports.CGraphKpiCards=Id;exports.CGraphReport=ti;exports.CHeatmapChart=Dd;exports.CIconButton=ie;exports.CKanbanBoard=nM;exports.CKanbanBucket=ip;exports.CKanbanCard=Fs;exports.CLayoutManagement=_d;exports.CLayoutManager=nn;exports.CLineChart=Rd;exports.CList=uw;exports.CListItem=mw;exports.CListItemAvatar=yw;exports.CListItemButton=gw;exports.CListItemIcon=fw;exports.CListItemText=hw;exports.CListSubheader=bw;exports.CMenu=Yt;exports.CMessageBox=An;exports.COrbCanvas=Sb;exports.CPageLayout=yd;exports.CPageTransition=aO;exports.CPaper=Le;exports.CPieChart=ja;exports.CPivotTable=xA;exports.CPlanningGantt=$u;exports.CPlanningLayout=GF;exports.CPopover=ns;exports.CProgress=Sn;exports.CRadioGroup=Lm;exports.CSegmentedControl=wn;exports.CSelect=Ut;exports.CSkeleton=Wm;exports.CSmartFilter=tr;exports.CSmartTable=nI;exports.CSpinner=sr;exports.CStack=ae;exports.CStandardPage=pI;exports.CStatusBadge=cw;exports.CSwitch=ba;exports.CTable=_o;exports.CTableBody=J1;exports.CTableCell=eI;exports.CTableContainer=tI;exports.CTableHead=oI;exports.CTableRow=rI;exports.CTabs=ng;exports.CTextArea=Cn;exports.CTextField=He;exports.CTooltip=st;exports.CTreeComp=eO;exports.CTypography=L;exports.CValueHelp=bd;exports.CVariantManagement=ai;exports.CVariantManager=Hd;exports.CVoiceWaveOverlay=Zs;exports.CWaterfallChart=Nd;exports.Calendar=Ji;exports.CalendarDays=Av;exports.Camera=Nv;exports.ChartNoAxesCombined=Ev;exports.Check=ra;exports.CheckCircle=na;exports.ChevronDown=Tr;exports.ChevronLeft=Pl;exports.ChevronRight=Lo;exports.ChevronUp=Lv;exports.ChevronsDown=Fv;exports.ChevronsUp=Ov;exports.CircleAlert=aa;exports.CircleCheck=yn;exports.CircleCheckBig=Bv;exports.CircleStop=zv;exports.Clipboard=Il;exports.ClipboardCheck=Vv;exports.ClipboardList=Hv;exports.Clock=Rl;exports.CodeBlock=$n;exports.Columns3=Wv;exports.CopilotChat=H2;exports.Copy=ia;exports.CopyPlus=$v;exports.Delete=Gv;exports.Download=Uv;exports.Edit=_v;exports.Expand=Kv;exports.Eye=qv;exports.EyeOff=Xv;exports.File=Zv;exports.FileText=Ml;exports.Filter=Yv;exports.FloatingAgentPanel=N2;exports.FolderTree=vn;exports.GitBranch=Dl;exports.GlobalMessage=nw;exports.Globe=xn;exports.Grid=Al;exports.GripVertical=Qv;exports.Hammer=jv;exports.Image=Jv;exports.Info=sa;exports.Languages=ex;exports.Layers=tx;exports.LayoutDashboard=ox;exports.Lightbulb=la;exports.LineChart=Nl;exports.Loader2=El;exports.Lock=ca;exports.LockKeyhole=rx;exports.LogOut=Ll;exports.Mail=es;exports.MapPin=Fl;exports.MarkdownRenderer=_n;exports.MathBlock=Gn;exports.Menu=nx;exports.MermaidBlock=Is;exports.MessageCircle=bm;exports.MessageSquare=ax;exports.Mic=da;exports.MicOff=ix;exports.Moon=Ol;exports.MoreHorizontal=sx;exports.NavigationIsland=rc;exports.NavigationIsland2=ps;exports.ORBCAFE_I18N_MESSAGES=In;exports.ORB_DARK=Qu;exports.ORB_FONT_STACK=ov;exports.ORB_LIGHT=Yu;exports.ORB_RADIUS=nv;exports.ORB_TOKENS=Zi;exports.ORB_TRANSITION_FAST=av;exports.OrbcafeI18nProvider=Ca;exports.OrbisModeProvider=Qi;exports.PAGE_TRANSITION_PRESETS=iO;exports.PAppPageLayout=KN;exports.PBarcodeScanner=zA;exports.PNavIsland=eu;exports.PNumericKeypad=JA;exports.PSmartFilter=Zp;exports.PTable=fb;exports.PTouchCard=_A;exports.PWorkloadNav=Yp;exports.PackageCheck=lx;exports.PackageSearch=cx;exports.PanelLeftOpen=pa;exports.PanelRight=ua;exports.PanelsTopLeft=dx;exports.PieChart=Bl;exports.Pin=Gr;exports.PivotChartPanel=Hp;exports.Play=px;exports.Plus=zl;exports.QrCode=ux;exports.ReceiptText=mx;exports.RefreshCw=ma;exports.Rocket=gx;exports.RotateCcw=fx;exports.RotateCw=Vl;exports.Rows3=hx;exports.SapIcon=Kt;exports.Save=bx;exports.ScanLine=yx;exports.Search=Qo;exports.Send=ym;exports.SendHorizontal=Hl;exports.Settings=ga;exports.ShieldCheck=vx;exports.Sigma=xx;exports.SortAsc=Cx;exports.SquareSplitHorizontal=Sx;exports.Star=wx;exports.StdChat=Pu;exports.Sun=Wl;exports.Table2=kx;exports.TableBlock=Ms;exports.TabletSmartphone=Tx;exports.Terminal=ts;exports.ThinkBlock=di;exports.ThumbsDown=$l;exports.ThumbsUp=Gl;exports.Trash2=Ul;exports.TreeMenu=Rn;exports.TreePine=Px;exports.TrendingDown=_l;exports.TriangleAlert=fa;exports.Truck=Ix;exports.UploadCloud=Kl;exports.User=os;exports.VoiceNavigatorProvider=iE;exports.VoiceWaveOverlay=eE;exports.Volume2=ql;exports.Warehouse=Rx;exports.Workflow=Mx;exports.X=yo;exports.XCircle=ha;exports.buildAmapEmbedUrl=Ja;exports.buildGoogleMapEmbedUrl=Bn;exports.buildGoogleMapIframe=ZT;exports.buttonVariants=fg;exports.createKanbanBoardModel=sp;exports.createSapIcon=re;exports.findKanbanCard=zo;exports.message=YS;exports.messageManager=jo;exports.moveKanbanCard=fi;exports.orbAlpha=Ee;exports.orbChartSeries=rv;exports.parseMarkdownTable=ci;exports.renderMarkdown=iR;exports.resolveVariantFilters=qd;exports.resolveVariantLayout=li;exports.useAINav=Eb;exports.useAmapEmbedUrl=PI;exports.useAuthPage=q2;exports.useDetailInfo=np;exports.useGoogleMapEmbedUrl=TI;exports.useGraphChartData=xI;exports.useGraphInteraction=ri;exports.useGraphReport=tn;exports.useKanbanBoard=cM;exports.useMediaQuery=Ro;exports.useNavigationIsland=cc;exports.useOrbMode=$r;exports.useOrbTokens=dm;exports.useOrbcafeI18n=ue;exports.usePadLayout=MA;exports.usePadRecordEditor=NA;exports.usePageLayout=gp;exports.usePivotTable=TA;exports.usePlanningGantt=Ou;exports.usePlanningLayout=dF;exports.useStandardReport=bI;exports.useVoiceInput=ln;exports.useVoiceNavigator=sE;
|