orbcafe-ui 3.1.3 → 3.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- 'use strict';var jsxRuntime=require('react/jsx-runtime'),ogl=require('ogl'),er=require('react'),Nr=require('@radix-ui/react-dropdown-menu'),Yr=require('@radix-ui/react-tooltip'),reactDom=require('react-dom'),wr=require('@radix-ui/react-dialog'),yo=require('@radix-ui/react-popover'),ro=require('dayjs'),eb=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'),gh=require('dayjs/plugin/isBetween'),fh=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 My=require('next/dynamic'),framerMotion=require('framer-motion'),NC=require('react-markdown'),AC=require('remark-gfm'),EC=require('remark-math'),LC=require('rehype-katex'),OC=require('rehype-raw'),reactSyntaxHighlighter=require('react-syntax-highlighter'),prism=require('react-syntax-highlighter/dist/esm/styles/prism'),Sm=require('mermaid'),a0=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 er__namespace=/*#__PURE__*/_interopNamespace(er);var Nr__namespace=/*#__PURE__*/_interopNamespace(Nr);var Yr__namespace=/*#__PURE__*/_interopNamespace(Yr);var wr__namespace=/*#__PURE__*/_interopNamespace(wr);var yo__namespace=/*#__PURE__*/_interopNamespace(yo);var ro__default=/*#__PURE__*/_interopDefault(ro);var eb__default=/*#__PURE__*/_interopDefault(eb);var gh__default=/*#__PURE__*/_interopDefault(gh);var fh__default=/*#__PURE__*/_interopDefault(fh);var My__default=/*#__PURE__*/_interopDefault(My);var NC__default=/*#__PURE__*/_interopDefault(NC);var AC__default=/*#__PURE__*/_interopDefault(AC);var EC__default=/*#__PURE__*/_interopDefault(EC);var LC__default=/*#__PURE__*/_interopDefault(LC);var OC__default=/*#__PURE__*/_interopDefault(OC);var Sm__default=/*#__PURE__*/_interopDefault(Sm);var a0__default=/*#__PURE__*/_interopDefault(a0);var gc=Object.defineProperty;var Wg=(t,r,o)=>r in t?gc(t,r,{enumerable:true,configurable:true,writable:true,value:o}):t[r]=o;var As=(t,r,o)=>()=>{if(o)throw o[0];try{return t&&(r=t(t=0)),r}catch(n){throw o=[n],n}};var $g=(t,r)=>{for(var o in r)gc(t,o,{get:r[o],enumerable:true});};var fc=(t,r,o)=>Wg(t,r+"",o);var ka,Ug,vt,Pa,bc,Kg,qg,hc,vc,Xg,Ls,Yg,yc,Zg,On,Ue,_t=As(()=>{"use strict";ka={xs:0,sm:600,md:900,lg:1200,xl:1536},Ug=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:r=>`@media (min-width:${ka[r]}px)`,down:r=>`@media (max-width:${Math.max(0,ka[r]-.05)}px)`},spacing:(...r)=>r.map(o=>`${o*8}px`).join(" "),transitions:{create:(r="all",o={})=>(Array.isArray(r)?r:[r]).map(a=>`${a} ${o.duration??200}ms ${o.easing??"ease"}`).join(", "),duration:{shortest:150,shorter:180,short:200,standard:300}},zIndex:{modal:1300,drawer:1200,appBar:1100,tooltip:1500}}),vt=()=>typeof document>"u"?"light":document.documentElement.dataset.orbMode==="dark"||document.documentElement.classList.contains("orb-dark")?"dark":"light",Pa=()=>Ug(vt()),bc={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"]},Kg=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"]),qg=(t,r)=>{if(typeof r!="string")return r;let o={"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 o[r]?o[r]:r},hc=t=>t.startsWith("--")?t:t.replace(/[A-Z]/g,r=>`-${r.toLowerCase()}`),vc=(t,r)=>{if(r==null||r===!1)return null;let o=qg(t,r);return typeof o=="number"&&o!==0&&!Kg.has(t)?["margin","marginTop","marginRight","marginBottom","marginLeft","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","gap","rowGap","columnGap"].includes(t)?`${o*8}px`:`${o}px`:String(o)},Xg=t=>t?(Array.isArray(t)?t:[t]).reduce((o,n)=>{if(!n)return o;let a=typeof n=="function"?n(Pa()):n;return {...o,...a}},{}):{},Ls=t=>!t||typeof t!="object"?JSON.stringify(t):Array.isArray(t)?`[${t.map(Ls).join(",")}]`:`{${Object.keys(t).sort().map(r=>`${JSON.stringify(r)}:${Ls(t[r])}`).join(",")}}`,Yg=t=>{let r=2166136261;for(let o=0;o<t.length;o+=1)r^=t.charCodeAt(o),r=Math.imul(r,16777619);return (r>>>0).toString(36)},yc=new Set,Zg=t=>{if(typeof document>"u"||yc.has(t))return;yc.add(t);let r=document.querySelector("style[data-orb-sx]");r||(r=document.createElement("style"),r.dataset.orbSx="true",document.head.appendChild(r)),r.appendChild(document.createTextNode(t));},On=(t,r)=>{let o=[],n=[];return Object.entries(r).forEach(([a,i])=>{let s=typeof i=="function"?i(Pa()):i;if(s==null||s===!1)return;if(a.startsWith("@media")&&typeof s=="object"){n.push(`${a}{${On(t,s)}}`);return}if(a.startsWith("&")&&typeof s=="object"){n.push(On(a.split("&").join(t),s));return}if((a.startsWith(":")||a.startsWith(">")||a.startsWith("["))&&typeof s=="object"){n.push(On(`${t}${a}`,s));return}if(typeof s=="object"){let d=s,u=Object.keys(d).filter(p=>p in ka);u.length>0?u.forEach(p=>{let b=(bc[a]??[a]).map(m=>{let v=vc(m,d[p]);return v===null?"":`${hc(m)}:${v};`}).join("");b&&(p==="xs"?n.push(`${t}{${b}}`):n.push(`@media (min-width:${ka[p]}px){${t}{${b}}}`));}):n.push(On(`${t} ${a}`,d));return}(bc[a]??[a]).forEach(d=>{let u=vc(d,s);u!==null&&o.push(`${hc(d)}:${u};`);});}),`${o.length?`${t}{${o.join("")}}`:""}${n.join("")}`},Ue=(t,r,o)=>{let n=Xg(t);if(Object.keys(n).length===0)return {className:r,style:o};let a=`orb-sx-${Yg(Ls(n))}`;return Zg(On(`.${a}`,n)),{className:[a,r].filter(Boolean).join(" "),style:o}};});var Cc,e,c,P=As(()=>{"use strict";_t();Cc=(t,r)=>{if(!r||typeof t!="string")return [t,r];let o={...r},n=o.component??t;delete o.component;let a=o.sx;delete o.sx;let i=Ue(a,o.className,o.style);return o.className=[i.className,o.hover?"orb-hoverable":void 0,o.selected?"orb-selected":void 0,o.noWrap?"orb-nowrap":void 0,o.padding==="checkbox"?"orb-cell-checkbox":void 0].filter(Boolean).join(" ")||void 0,o.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 o[s]),[n,o]},e=(t,r,o)=>{let[n,a]=Cc(t,r);return jsxRuntime.jsx(n,a,o)},c=(t,r,o)=>{let[n,a]=Cc(t,r);return jsxRuntime.jsxs(n,a,o)};});var um={};$g(um,{COrbCanvas:()=>Ty});function Ty({hue:t=0,hoverIntensity:r=.2,rotateOnHover:o=true,forceHoverState:n=false,backgroundColor:a="transparent"}){let i=er.useRef(null),s=`
1
+ 'use strict';var jsxRuntime=require('react/jsx-runtime'),ogl=require('ogl'),er=require('react'),Nr=require('@radix-ui/react-dropdown-menu'),Yr=require('@radix-ui/react-tooltip'),reactDom=require('react-dom'),wr=require('@radix-ui/react-dialog'),yo=require('@radix-ui/react-popover'),oo=require('dayjs'),rb=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'),bh=require('dayjs/plugin/isBetween'),hh=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 Dy=require('next/dynamic'),framerMotion=require('framer-motion'),EC=require('react-markdown'),LC=require('remark-gfm'),OC=require('remark-math'),FC=require('rehype-katex'),BC=require('rehype-raw'),reactSyntaxHighlighter=require('react-syntax-highlighter'),prism=require('react-syntax-highlighter/dist/esm/styles/prism'),wm=require('mermaid'),l0=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 er__namespace=/*#__PURE__*/_interopNamespace(er);var Nr__namespace=/*#__PURE__*/_interopNamespace(Nr);var Yr__namespace=/*#__PURE__*/_interopNamespace(Yr);var wr__namespace=/*#__PURE__*/_interopNamespace(wr);var yo__namespace=/*#__PURE__*/_interopNamespace(yo);var oo__default=/*#__PURE__*/_interopDefault(oo);var rb__default=/*#__PURE__*/_interopDefault(rb);var bh__default=/*#__PURE__*/_interopDefault(bh);var hh__default=/*#__PURE__*/_interopDefault(hh);var Dy__default=/*#__PURE__*/_interopDefault(Dy);var EC__default=/*#__PURE__*/_interopDefault(EC);var LC__default=/*#__PURE__*/_interopDefault(LC);var OC__default=/*#__PURE__*/_interopDefault(OC);var FC__default=/*#__PURE__*/_interopDefault(FC);var BC__default=/*#__PURE__*/_interopDefault(BC);var wm__default=/*#__PURE__*/_interopDefault(wm);var l0__default=/*#__PURE__*/_interopDefault(l0);var gc=Object.defineProperty;var _g=(t,r,o)=>r in t?gc(t,r,{enumerable:true,configurable:true,writable:true,value:o}):t[r]=o;var Es=(t,r,o)=>()=>{if(o)throw o[0];try{return t&&(r=t(t=0)),r}catch(n){throw o=[n],n}};var Gg=(t,r)=>{for(var o in r)gc(t,o,{get:r[o],enumerable:true});};var fc=(t,r,o)=>_g(t,r+"",o);var ka,qg,vt,Pa,bc,Xg,Yg,hc,vc,Zg,Os,jg,yc,Qg,On,Ue,_t=Es(()=>{"use strict";ka={xs:0,sm:600,md:900,lg:1200,xl:1536},qg=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:r=>`@media (min-width:${ka[r]}px)`,down:r=>`@media (max-width:${Math.max(0,ka[r]-.05)}px)`},spacing:(...r)=>r.map(o=>`${o*8}px`).join(" "),transitions:{create:(r="all",o={})=>(Array.isArray(r)?r:[r]).map(a=>`${a} ${o.duration??200}ms ${o.easing??"ease"}`).join(", "),duration:{shortest:150,shorter:180,short:200,standard:300}},zIndex:{modal:1300,drawer:1200,appBar:1100,tooltip:1500}}),vt=()=>typeof document>"u"?"light":document.documentElement.dataset.orbMode==="dark"||document.documentElement.classList.contains("orb-dark")?"dark":"light",Pa=()=>qg(vt()),bc={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"]},Xg=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"]),Yg=(t,r)=>{if(typeof r!="string")return r;let o={"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 o[r]?o[r]:r},hc=t=>t.startsWith("--")?t:t.replace(/[A-Z]/g,r=>`-${r.toLowerCase()}`),vc=(t,r)=>{if(r==null||r===!1)return null;let o=Yg(t,r);return typeof o=="number"&&o!==0&&!Xg.has(t)?["margin","marginTop","marginRight","marginBottom","marginLeft","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","gap","rowGap","columnGap"].includes(t)?`${o*8}px`:`${o}px`:String(o)},Zg=t=>t?(Array.isArray(t)?t:[t]).reduce((o,n)=>{if(!n)return o;let a=typeof n=="function"?n(Pa()):n;return {...o,...a}},{}):{},Os=t=>!t||typeof t!="object"?JSON.stringify(t):Array.isArray(t)?`[${t.map(Os).join(",")}]`:`{${Object.keys(t).sort().map(r=>`${JSON.stringify(r)}:${Os(t[r])}`).join(",")}}`,jg=t=>{let r=2166136261;for(let o=0;o<t.length;o+=1)r^=t.charCodeAt(o),r=Math.imul(r,16777619);return (r>>>0).toString(36)},yc=new Set,Qg=t=>{if(typeof document>"u"||yc.has(t))return;yc.add(t);let r=document.querySelector("style[data-orb-sx]");r||(r=document.createElement("style"),r.dataset.orbSx="true",document.head.appendChild(r)),r.appendChild(document.createTextNode(t));},On=(t,r)=>{let o=[],n=[];return Object.entries(r).forEach(([a,i])=>{let s=typeof i=="function"?i(Pa()):i;if(s==null||s===!1)return;if(a.startsWith("@media")&&typeof s=="object"){n.push(`${a}{${On(t,s)}}`);return}if(a.startsWith("&")&&typeof s=="object"){n.push(On(a.split("&").join(t),s));return}if((a.startsWith(":")||a.startsWith(">")||a.startsWith("["))&&typeof s=="object"){n.push(On(`${t}${a}`,s));return}if(typeof s=="object"){let d=s,u=Object.keys(d).filter(p=>p in ka);u.length>0?u.forEach(p=>{let b=(bc[a]??[a]).map(m=>{let v=vc(m,d[p]);return v===null?"":`${hc(m)}:${v};`}).join("");b&&(p==="xs"?n.push(`${t}{${b}}`):n.push(`@media (min-width:${ka[p]}px){${t}{${b}}}`));}):n.push(On(`${t} ${a}`,d));return}(bc[a]??[a]).forEach(d=>{let u=vc(d,s);u!==null&&o.push(`${hc(d)}:${u};`);});}),`${o.length?`${t}{${o.join("")}}`:""}${n.join("")}`},Ue=(t,r,o)=>{let n=Zg(t);if(Object.keys(n).length===0)return {className:r,style:o};let a=`orb-sx-${jg(Os(n))}`;return Qg(On(`.${a}`,n)),{className:[a,r].filter(Boolean).join(" "),style:o}};});var Cc,e,c,P=Es(()=>{"use strict";_t();Cc=(t,r)=>{if(!r||typeof t!="string")return [t,r];let o={...r},n=o.component??t;delete o.component;let a=o.sx;delete o.sx;let i=Ue(a,o.className,o.style);return o.className=[i.className,o.hover?"orb-hoverable":void 0,o.selected?"orb-selected":void 0,o.noWrap?"orb-nowrap":void 0,o.padding==="checkbox"?"orb-cell-checkbox":void 0].filter(Boolean).join(" ")||void 0,o.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 o[s]),[n,o]},e=(t,r,o)=>{let[n,a]=Cc(t,r);return jsxRuntime.jsx(n,a,o)},c=(t,r,o)=>{let[n,a]=Cc(t,r);return jsxRuntime.jsxs(n,a,o)};});var mm={};Gg(mm,{COrbCanvas:()=>My});function My({hue:t=0,hoverIntensity:r=.2,rotateOnHover:o=true,forceHoverState:n=false,backgroundColor:a="transparent"}){let i=er.useRef(null),s=`
2
2
  precision highp float;
3
3
  attribute vec2 position;
4
4
  attribute vec2 uv;
@@ -180,26 +180,26 @@
180
180
  vec4 col = mainImage(fragCoord);
181
181
  gl_FragColor = vec4(col.rgb * col.a, col.a);
182
182
  }
183
- `;return er.useEffect(()=>{let d=i.current;if(!d)return;let u=new ogl.Renderer({alpha:true,premultipliedAlpha:false}),p=u.gl;p.clearColor(0,0,0,0),d.appendChild(p.canvas);let f=new ogl.Triangle(p),b=new ogl.Program(p,{vertex:s,fragment:l,uniforms:{iTime:{value:0},iResolution:{value:new ogl.Vec3(p.canvas.width,p.canvas.height,p.canvas.width/p.canvas.height)},hue:{value:t},hover:{value:0},rot:{value:0},hoverIntensity:{value:r},backgroundColor:{value:pm(a)}}}),m=new ogl.Mesh(p,{geometry:f,program:b});function v(){if(!d)return;let I=window.devicePixelRatio||1,S=d.clientWidth,A=d.clientHeight;u.setSize(S*I,A*I),p.canvas.style.width=S+"px",p.canvas.style.height=A+"px",b.uniforms.iResolution.value.set(p.canvas.width,p.canvas.height,p.canvas.width/p.canvas.height);}window.addEventListener("resize",v),v();let y=0,g=0,x=0,h=.3,C=I=>{let S=d.getBoundingClientRect(),A=I.clientX-S.left,D=I.clientY-S.top,M=S.width,N=S.height,E=Math.min(M,N),O=M/2,F=N/2,X=(A-O)/E*2,H=(D-F)/E*2;Math.sqrt(X*X+H*H)<.8?y=1:y=0;},k=()=>{y=0;};d.addEventListener("mousemove",C),d.addEventListener("mouseleave",k);let w,T=I=>{w=requestAnimationFrame(T);let S=(I-g)*.001;g=I,b.uniforms.iTime.value=I*.001,b.uniforms.hue.value=t,b.uniforms.hoverIntensity.value=r,b.uniforms.backgroundColor.value=pm(a);let A=n?1:y;b.uniforms.hover.value+=(A-b.uniforms.hover.value)*.1,o&&A>.5&&(x+=S*h),b.uniforms.rot.value=x,u.render({scene:m});};return w=requestAnimationFrame(T),()=>{cancelAnimationFrame(w),window.removeEventListener("resize",v),d.removeEventListener("mousemove",C),d.removeEventListener("mouseleave",k),p.canvas.parentNode===d&&d.removeChild(p.canvas),p.getExtension("WEBGL_lose_context")?.loseContext();}},[t,r,o,n,a]),e("div",{ref:i,className:"w-full h-full"})}function Iy(t,r,o){let n,a,i;if(r===0)n=a=i=o;else {let s=(u,p,f)=>(f<0&&(f+=1),f>1&&(f-=1),f<.16666666666666666?u+(p-u)*6*f:f<.5?p:f<.6666666666666666?u+(p-u)*(.6666666666666666-f)*6:u),l=o<.5?o*(1+r):o+r-o*r,d=2*o-l;n=s(d,l,t+1/3),a=s(d,l,t),i=s(d,l,t-1/3);}return new ogl.Vec3(n,a,i)}function pm(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 r=t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(r)return new ogl.Vec3(parseInt(r[1])/255,parseInt(r[2])/255,parseInt(r[3])/255);let o=t.match(/hsla?\((\d+),\s*(\d+)%,\s*(\d+)%/);if(o){let n=parseInt(o[1])/360,a=parseInt(o[2])/100,i=parseInt(o[3])/100;return Iy(n,a,i)}return new ogl.Vec3(0,0,0)}var mm=As(()=>{"use strict";"use client";P();});var _g={canvas:"#ffffff",surface:"#f5f5f5",surface2:"#f5f5f5",surface3:"#f5f5f5",fg:"#555555",muted:"#8c8c8c",border:"#dbdbdb",primary:"#154194",onPrimary:"#ffffff",link:"#154194",p50:"#f0f3f9",p100:"#dce4f1",p200:"#bac9e3",p300:"#91a8d1",p600:"#0f3276",p700:"#08255a",accent:"#fc4c02",err:"#ac3101",errBg:"#fff4f0",warnBg:"#fff2ee",hover:"rgba(21, 65, 148, 0.06)",selected:"rgba(21, 65, 148, 0.10)",focusRing:"rgba(21, 65, 148, 0.18)",focusSolid:"#154194",disabledFg:"#aeaeae",disabledBg:"#f0f0f0",chartGrid:"#dbdbdb",chartText:"#8c8c8c",track:"#f5f5f5",shadow1:"0 1px 2px rgba(1,9,26,.05),0 2px 6px rgba(1,9,26,.06)",shadow2:"0 4px 14px rgba(1,9,26,.10)",shadow3:"0 12px 32px rgba(1,9,26,.16)",fontBrand:"Montserrat",inverseSurface:"#01091a",inverseFg:"#ffffff",inverseLink:"#91a8d1",aiAccent:"#21bcff",statusFg:"#475569",statusPrimary:"#1d4ed8",statusSuccess:"#047857",statusWarning:"#b45309",statusError:"#b91c1c",statusInfo:"#0369a1",chart1:"#154194",chart2:"#91a8d1",chart3:"#8c8c8c",chart4:"#08255a",chart5:"#fc4c02",chart6:"#bac9e3",chartPositive:"#66bb6a",chartNegative:"#ef5350"},Gg={canvas:"#01091a",surface:"#0a1526",surface2:"#061324",surface3:"#0e1b2b",fg:"#ffffff",muted:"rgba(255,255,255,0.7)",border:"rgba(255,255,255,0.12)",primary:"#154194",onPrimary:"#ffffff",link:"#91a8d1",p50:"#021432",p100:"#021a3d",p200:"#bac9e3",p300:"#91a8d1",p600:"#375ea5",p700:"#6e8cc1",accent:"#fc4c02",err:"#d53f01",errBg:"#16163b",warnBg:"#19173f",hover:"rgba(255,255,255,0.08)",selected:"rgba(21, 65, 148, 0.45)",focusRing:"rgba(145, 168, 209, 0.45)",focusSolid:"#91a8d1",disabledFg:"rgba(255,255,255,0.38)",disabledBg:"rgba(255,255,255,0.07)",chartGrid:"rgba(255,255,255,0.12)",chartText:"rgba(255,255,255,0.7)",track:"rgba(255,255,255,0.1)",shadow1:"0 1px 2px rgba(0,0,0,.4),0 2px 8px rgba(0,0,0,.35)",shadow2:"0 4px 16px rgba(0,0,0,.5)",shadow3:"0 12px 32px rgba(0,0,0,.55)",fontBrand:"Montserrat",inverseSurface:"#01091a",inverseFg:"#ffffff",inverseLink:"#91a8d1",aiAccent:"#21bcff",statusFg:"#94a3b8",statusPrimary:"#60a5fa",statusSuccess:"#34d399",statusWarning:"#fbbf24",statusError:"#f87171",statusInfo:"#38bdf8",chart1:"#154194",chart2:"#91a8d1",chart3:"rgba(255,255,255,0.7)",chart4:"#a4b8dd",chart5:"#fc4c02",chart6:"#bac9e3",chartPositive:"#66bb6a",chartNegative:"#ef5350"},Es={light:_g,dark:Gg},k0='"Montserrat", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif',P0=t=>{let r=Es[t];return [r.primary,r.p300,r.muted,r.p700]},T0=10,I0="0.2s ease";P();var wc=er.createContext({mode:"light",setting:"light"}),rf=t=>{if(typeof document>"u")return;let r=document.documentElement;r.classList.toggle("orb-dark",t==="dark"),r.dataset.orbMode=t,r.style.colorScheme=t;},Fn=({mode:t,defaultMode:r="light",children:o})=>{let n=t??r,[a,i]=er.useState("light"),[s,l]=er.useState(false);er.useEffect(()=>{l(true);let p=window.matchMedia("(prefers-color-scheme: dark)"),f=()=>i(p.matches?"dark":"light");return f(),p.addEventListener("change",f),()=>p.removeEventListener("change",f)},[]);let d=n==="system"?s?a:"light":n;er.useEffect(()=>{rf(d);},[d]);let u=er.useMemo(()=>({mode:d,setting:n}),[d,n]);return e(wc.Provider,{value:u,children:o})},Cr=()=>er.useContext(wc).mode,Os=()=>Es[Cr()];var rt=(t,r)=>{let o=Math.min(1,Math.max(0,r)),n=t.trim(),a=d=>d.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 d=parseInt(s.slice(0,2),16),u=parseInt(s.slice(2,4),16),p=parseInt(s.slice(4,6),16);return `rgba(${d}, ${u}, ${p}, ${o})`}let l=`${Math.round(o*100)}%`;return `color-mix(in oklch, ${t} ${l}, transparent)`};var Dr=t=>{let r=t.startsWith("up:")?`(min-width:${t.slice(3)}px)`:t.startsWith("down:")?`(max-width:${t.slice(5)}px)`:t,[o,n]=er.useState(()=>typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia(r).matches);return er.useEffect(()=>{if(typeof window.matchMedia!="function")return;let a=window.matchMedia(r),i=()=>n(a.matches);return i(),a.addEventListener("change",i),()=>a.removeEventListener("change",i)},[r]),o};P();var af={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},sf=t=>typeof t=="number"?`${t}px`:t,lf={"2.5":10,3:12,"3.5":14,4:16,5:20,6:24,7:28,8:32,10:40,12:48},cf=t=>{if(!t)return;let r=t.match(/(?:^|\s)(?:h|w)-(2\.5|3(?:\.5)?|4|5|6|7|8|10|12)(?:\s|$)/);return r?lf[r[1]]:void 0},Tt=er.forwardRef(({name:t,size:r,title:o,className:n,style:a,strokeWidth:i,fill:s,...l},d)=>{let u=l["aria-label"]??o,p=sf(r??cf(n)??"1em"),f={fontFamily:"SAP-icons",fontSize:p,fontStyle:"normal",fontWeight:"normal",lineHeight:1,width:p,height:p,display:"inline-flex",alignItems:"center",justifyContent:"center",flex:"0 0 auto",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...a};return e("span",{ref:d,role:u?"img":void 0,"aria-hidden":u?void 0:true,title:o,className:n,"data-sap-icon":t,style:f,...l,children:String.fromCodePoint(af[t])})});Tt.displayName="SapIcon";var ne=(t,r)=>{let o=er.forwardRef((n,a)=>e(Tt,{ref:a,name:t,...n}));return o.displayName=r??`SapIcon(${t})`,o};var Pc=ne("activity","Activity"),Ta=ne("error","AlertCircle"),Tc=ne("warning","AlertTriangle"),Y0=ne("down","ArrowDown"),Z0=ne("navigationRight","ArrowRight"),Ic=ne("up","ArrowUp"),Fs=ne("barChart","BarChart"),j0=ne("activate","Bot"),Bs=ne("calendar","Calendar"),Q0=Bs,J0=ne("camera","Camera"),eS=ne("lineChart","ChartNoAxesCombined"),qr=ne("accept","Check"),Ia=ne("accept","CheckCircle"),Fr=ne("slimDown","ChevronDown"),Ma=ne("navigationLeft","ChevronLeft"),Br=ne("navigationRight","ChevronRight"),tS=ne("slimUp","ChevronUp"),rS=ne("expandAll","ChevronsDown"),oS=ne("collapseAll","ChevronsUp"),Ra=ne("error","CircleAlert"),Bn=ne("accept","CircleCheck"),nS=Bn,Mc=ne("stop","CircleStop"),Rc=ne("copy","Clipboard"),aS=ne("checklist","ClipboardCheck"),iS=ne("checklist","ClipboardList"),Dc=ne("time","Clock"),sS=ne("tableColumn","Columns3"),vo=ne("copy","Copy"),lS=ne("duplicate","CopyPlus"),cS=ne("delete","Delete"),dS=ne("download","Download"),Nc=ne("edit","Edit"),Ac=ne("fullScreen","Expand"),pS=ne("show","Eye"),uS=ne("hide","EyeOff"),Da=ne("document","File"),Ec=ne("document","FileText"),mS=ne("filter","Filter"),Hn=ne("tree","FolderTree"),Lc=ne("process","GitBranch"),zn=ne("world","Globe"),Oc=ne("grid","Grid"),gS=ne("move","GripVertical"),fS=ne("wrench","Hammer"),Fc=ne("picture","Image"),Na=ne("information","Info"),bS=ne("translate","Languages"),hS=ne("dimension","Layers"),vS=ne("home","LayoutDashboard"),Aa=ne("lightbulb","Lightbulb"),Bc=ne("lineChart","LineChart"),Hc=ne("synchronize","Loader2"),Ea=ne("locked","Lock"),yS=Ea,zc=ne("log","LogOut"),Hs=ne("email","Mail"),Vc=ne("map","MapPin"),Wc=ne("menu","Menu"),df=ne("message","MessageCircle"),$c=df,La=ne("microphone","Mic"),CS=ne("microphone","MicOff"),_c=ne("darkMode","Moon"),xS=ne("overflow","MoreHorizontal"),SS=ne("accept","PackageCheck"),wS=ne("product","PackageSearch"),Oa=ne("splitOne","PanelLeftOpen"),Fa=ne("splitTwo","PanelRight"),kS=ne("overview","PanelsTopLeft"),Gc=ne("pieChart","PieChart"),Jo=ne("pushpin","Pin"),PS=ne("play","Play"),en=ne("add","Plus"),TS=ne("qrCode","QrCode"),IS=ne("receipt","ReceiptText"),Ba=ne("refresh","RefreshCw"),MS=ne("activate","Rocket"),RS=ne("refresh","RotateCcw"),Uc=ne("refresh","RotateCw"),DS=ne("tableRow","Rows3"),NS=ne("save","Save"),AS=ne("qrCode","ScanLine"),Hr=ne("search","Search"),pf=ne("paperPlane","Send"),Kc=pf,tn=ne("wrench","Settings"),ES=ne("accept","ShieldCheck"),LS=ne("sum","Sigma"),OS=ne("sort","SortAsc"),FS=ne("splitTwo","SquareSplitHorizontal"),BS=ne("favorite","Star"),qc=ne("lightMode","Sun"),HS=ne("table","Table2"),zS=ne("ipad","TabletSmartphone"),Vn=ne("command","Terminal"),Xc=ne("thumbDown","ThumbsDown"),Yc=ne("thumbUp","ThumbsUp"),Zc=ne("delete","Trash2"),VS=ne("tree","TreePine"),jc=ne("trendDown","TrendingDown"),Ha=ne("warning","TriangleAlert"),WS=ne("shipping","Truck"),Qc=ne("upload","UploadCloud"),zs=ne("employee","User"),Jc=ne("sound","Volume2"),$S=ne("factory","Warehouse"),_S=ne("process","Workflow"),jt=ne("decline","X"),za=ne("error","XCircle");_t();P();var mf={contained:"primary",outlined:"secondary",text:"ghost"},gf={small:"orb-btn-sm",medium:void 0,large:"orb-btn-lg"},we=er.forwardRef(({variant:t="primary",size:r="medium",block:o=false,loading:n=false,startIcon:a,endIcon:i,component:s,href:l,sx:d,className:u,children:p,disabled:f,type:b="button",...m},v)=>{let y=mf[t]??t,g=["orb-btn",`orb-btn-${y}`,gf[r],o?"orb-btn-block":void 0,n?"orb-is-loading":void 0,u].filter(Boolean).join(" "),x=Ue(d,g),h=s??(l?"a":"button");return c(h,{ref:v,type:h==="button"?b:void 0,href:l,className:x.className,style:x.style,disabled:h==="button"?f||n:void 0,"aria-disabled":h!=="button"&&(f||n)?true:void 0,...m,children:[n&&e("span",{className:`orb-spin ${y==="primary"?"orb-spin-light":""}`,"aria-hidden":true}),!n&&a,p,!n&&i]})});we.displayName="CButton";_t();P();var ze=er.forwardRef(({label:t,value:r,defaultValue:o,onChange:n,onFocus:a,onBlur:i,onKeyDown:s,type:l="text",placeholder:d,disabled:u,readOnly:p,required:f,autoFocus:b,autoComplete:m,name:v,id:y,error:g,helperText:x,dense:h=false,size:C,fullWidth:k=true,select:w=false,multiline:T=false,rows:I,children:S,variant:A,margin:D,onClick:M,startAdornment:N,endAdornment:E,InputProps:O,inputProps:F,InputLabelProps:X,SelectProps:H,sx:Y,className:W},j)=>{let V=er.useId(),z=y??`orb-tf-${V}`,U=N??O?.startAdornment,K=E??O?.endAdornment,se=(typeof g=="string"?g:void 0)??x,Se={id:z,className:`orb-inp ${h||C==="small"?"orb-inp-dense":""}`,style:k?void 0:{width:"auto"},value:r,defaultValue:o,onChange:n,onFocus:a,onBlur:i,onKeyDown:s,placeholder:d,disabled:u,required:f,autoFocus:b,autoComplete:m,name:v,onClick:M,"aria-invalid":!!g},$e=w?e("select",{...Se,ref:j,onChange:n,children:S}):T?e("textarea",{...Se,ref:j,onChange:n,rows:I,readOnly:p||O?.readOnly}):e("input",{...Se,ref:j,onChange:n,type:l,readOnly:p||O?.readOnly,...F}),ke=Ue(Y,`orb-fld ${g?"orb-is-error":""} ${W??""}`,{width:k?"100%":void 0});return c("div",{className:ke.className,style:ke.style,children:[t&&e("label",{htmlFor:z,children:t}),U||K?c("div",{className:"orb-inp-adornment-wrap",children:[U&&e("span",{className:"orb-inp-adornment",children:U}),K&&e("span",{className:"orb-inp-adornment orb-inp-adornment-end",children:K}),$e]}):$e,se&&e("span",{className:"orb-fld-msg",children:se})]})});ze.displayName="CTextField";_t();P();var Wn=er.forwardRef(({label:t,value:r,defaultValue:o,onChange:n,placeholder:a,disabled:i,readOnly:s,rows:l,minRows:d=3,multiline:u,error:p,helperText:f,fullWidth:b=true,name:m,id:v,inputProps:y,sx:g,className:x},h)=>{let C=er.useId(),k=v??`orb-ta-${C}`,T=(typeof p=="string"?p:void 0)??f,I=Ue(g,`orb-fld ${p?"orb-is-error":""} ${x??""}`,{width:b?"100%":void 0});return c("div",{className:I.className,style:I.style,children:[t&&e("label",{htmlFor:k,children:t}),e("textarea",{ref:h,id:k,className:"orb-inp",value:r,defaultValue:o,onChange:n,placeholder:a,disabled:i,readOnly:s,rows:l??d,name:m,"aria-invalid":!!p,...y}),T&&e("span",{className:"orb-fld-msg",children:T})]})});Wn.displayName="CTextArea";_t();P();var zt=er.forwardRef(({label:t,options:r,children:o,value:n,defaultValue:a,onChange:i,disabled:s,size:l,dense:d=true,fullWidth:u=true,minWidth:p,placeholder:f,displayEmpty:b,renderValue:m,multiple:v,MenuProps:y,variant:g,disableUnderline:x,onClick:h,onMouseDown:C,error:k,helperText:w,name:T,id:I,"aria-label":S,sx:A,className:D},M)=>{let N=er.useId(),E=I??`orb-sel-${N}`,F=(typeof k=="string"?k:void 0)??w,X=er.useRef(null),H=er.useRef(null),[Y,W]=er.useState(false),[j,V]=er.useState(180),[z,U]=er.useState(a??"");er.useImperativeHandle(M,()=>X.current);let K=er.useMemo(()=>er.Children.toArray(o).flatMap(Me=>{if(!er.isValidElement(Me)||Me.type!=="option")return [];let Pe=Me;return [{value:Array.isArray(Pe.props.value)?Pe.props.value[0]??"":Pe.props.value??"",label:Pe.props.children,disabled:Pe.props.disabled}]}),[o]),fe=r??K,se=n??z,ue=Array.isArray(se)?se[0]??"":se,Se=String(ue??""),$e=fe.find(Me=>String(Me.value)===Se),ke=m?m(se):$e?.label??(Se||(f??"")),le=Ue(A,`orb-fld ${k?"orb-is-error":""} ${D??""}`,{width:u?"100%":void 0,minWidth:typeof p=="number"?`${p}px`:p});if(v)return c("div",{className:le.className,style:le.style,children:[t&&e("label",{htmlFor:E,children:t}),c("select",{ref:M,id:E,className:`orb-inp ${d||l==="small"?"orb-inp-dense":""}`,value:n,defaultValue:a,onChange:i,disabled:s,name:T,multiple:true,onClick:h,onMouseDown:C,"aria-invalid":!!k,"aria-label":S,children:[f!==void 0&&e("option",{value:"",children:f}),r?r.map(Me=>e("option",{value:Me.value,disabled:Me.disabled,children:Me.label},Me.value)):o]}),F&&e("span",{className:"orb-fld-msg",children:F})]});let Ee=Me=>{n===void 0&&U(Me);let Pe=X.current;Pe&&(Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,"value")?.set?.call(Pe,Me),i?.({target:Pe,currentTarget:Pe}));};return c("div",{className:le.className,style:le.style,children:[t&&e("label",{htmlFor:E,children:t}),e("select",{ref:X,className:"orb-visually-hidden",tabIndex:-1,"aria-hidden":"true",name:T,value:Se,disabled:s,onChange:()=>{},children:fe.map(Me=>e("option",{value:Me.value,disabled:Me.disabled,children:Me.label},String(Me.value)))}),c(Nr__namespace.Root,{open:Y,onOpenChange:Me=>{Me&&V(H.current?.getBoundingClientRect().width??180),W(Me);},children:[e(Nr__namespace.Trigger,{asChild:true,children:c("button",{ref:H,id:E,type:"button",className:`orb-inp orb-select-trigger ${d||l==="small"?"orb-inp-dense":""}`,disabled:s,"aria-invalid":!!k,"aria-label":S,"aria-haspopup":"listbox","data-placeholder":!$e&&!Se?"":void 0,onClick:h,onMouseDown:C,children:[e("span",{className:"orb-select-value",children:ke}),e(Tt,{className:"orb-select-chevron",name:"slimDown",size:12})]})}),e(Nr__namespace.Portal,{children:e(Nr__namespace.Content,{className:"orb-pop orb-select-menu",align:"start",sideOffset:5,collisionPadding:8,style:{minWidth:j},children:e(Nr__namespace.RadioGroup,{value:Se,onValueChange:Ee,children:fe.map(Me=>c(Nr__namespace.RadioItem,{className:"orb-select-option",value:String(Me.value),disabled:Me.disabled,children:[e("span",{className:"orb-select-check","aria-hidden":"true",children:String(Me.value)===Se?e(Tt,{name:"accept",size:13}):null}),e("span",{children:Me.label})]},String(Me.value)))})})})]}),F&&e("span",{className:"orb-fld-msg",children:F})]})});zt.displayName="CSelect";_t();P();var It=er.forwardRef(({label:t,checked:r,defaultChecked:o,onChange:n,disabled:a,indeterminate:i,name:s,value:l,id:d,size:u,color:p,onClick:f,inputProps:b,sx:m,className:v},y)=>{let g=Ue([{...u==="small"?{fontSize:13}:void 0,...p?{color:p}:void 0},...Array.isArray(m)?m:m?[m]:[]],`orb-chk ${v??""}`),x=e("input",{ref:h=>{h&&(h.indeterminate=!!i),typeof y=="function"?y(h):y&&(y.current=h);},type:"checkbox",id:d,checked:r,defaultChecked:o,onChange:n,readOnly:r!==void 0&&n===void 0,disabled:a,name:s,value:l,onClick:f,...b});return t==null?e("span",{className:g.className,style:g.style,children:x}):c("label",{className:g.className,style:g.style,children:[x,e("span",{children:t})]})});It.displayName="CCheckbox";P();var If=({label:t,options:r,value:o,defaultValue:n,onChange:a,name:i,row:s=false,disabled:l,sx:d,className:u})=>{let p=er.useId(),f=i??`orb-rdo-${p}`;return c("div",{className:`orb-fld ${u??""}`,style:d,role:"radiogroup",children:[t&&e("span",{className:"orb-fld-label",children:t}),e("div",{style:{display:"flex",flexDirection:s?"row":"column",gap:s?24:8,flexWrap:"wrap"},children:r.map(b=>c("label",{className:"orb-rdo",children:[e("input",{type:"radio",name:f,value:b.value,checked:o!==void 0?o===b.value:void 0,defaultChecked:n!==void 0?n===b.value:void 0,onChange:a?m=>a(m,b.value):void 0,disabled:l||b.disabled}),e("span",{children:b.label})]},b.value))})]})};_t();P();var Va=er.forwardRef(({label:t,checked:r,defaultChecked:o,onChange:n,disabled:a,name:i,id:s,size:l,sx:d,className:u},p)=>{let f=Ue([{...l==="small"?{transform:"scale(.86)",transformOrigin:"center"}:void 0},...Array.isArray(d)?d:d?[d]:[]],`orb-sw ${u??""}`),b=e("input",{ref:p,type:"checkbox",role:"switch",id:s,checked:r,defaultChecked:o,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:b}):c("label",{className:f.className,style:f.style,children:[b,e("span",{children:t})]})});Va.displayName="CSwitch";_t();P();var Df={default:"gray",primary:"blue",success:"blue",info:"blue",warning:"orange",error:"orange"},xt=er.forwardRef(({label:t,children:r,tone:o,color:n="default",variant:a,size:i="medium",clickable:s,avatar:l,icon:d,onDelete:u,onClick:p,sx:f,className:b},m)=>{let v=o??(a==="outlined"&&n==="default"?"outline":Df[n]??"gray"),y=s??!!p,g=Ue([{cursor:y?"pointer":void 0,...i==="small"?{height:24,fontSize:11,px:1}:void 0},...Array.isArray(f)?f:f?[f]:[]],`orb-chip orb-chip-${v} ${b??""}`);return c("span",{ref:m,className:g.className,style:g.style,onClick:p,role:y?"button":void 0,tabIndex:y?0:void 0,onKeyDown:y?x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),p?.(x));}:void 0,children:[l??d,e("span",{className:"orb-chip-label",children:r??t}),u&&e("button",{type:"button","aria-label":"Remove",onClick:x=>{x.stopPropagation(),u(x);},style:{background:"none",border:"none",padding:0,display:"inline-flex",cursor:"pointer",color:"inherit"},children:e(jt,{size:13,strokeWidth:2})})]})});xt.displayName="CChip";_t();P();var Wa=er.forwardRef(({badgeContent:t,color:r="primary",children:o,invisible:n=false,sx:a,className:i},s)=>{let l=Ue(a,i,{display:"inline-flex",position:o?"relative":void 0}),d=!n&&t!==void 0&&t!==null&&e("span",{className:`orb-badge ${r==="error"?"orb-badge-err":r==="muted"?"orb-badge-muted":""}`,style:o?{position:"absolute",top:-6,right:-6,zIndex:1}:void 0,children:t});return o?c("span",{ref:s,className:l.className,style:l.style,children:[o,d]}):e("span",{ref:s,className:l.className,style:l.style,children:d})});Wa.displayName="CBadge";_t();P();var rn=er.forwardRef(({children:t,src:r,alt:o,size:n=28,sx:a,className:i},s)=>{let l=Ue([{width:n,height:n,fontSize:n*.4},...Array.isArray(a)?a:a?[a]:[]],`orb-avatar ${i??""}`);return e("span",{ref:s,className:l.className,style:l.style,children:r?e("img",{src:r,alt:o??"",style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"cover"}}):t})});rn.displayName="CAvatar";_t();P();var on=er.forwardRef(({severity:t="info",title:r,children:o,onClose:n,sx:a,className:i},s)=>{let l=Ue(a,`orb-alert orb-alert-${t} ${i??""}`);return c("div",{ref:s,role:"alert",className:l.className,style:l.style,children:[c("div",{style:{flex:1,minWidth:0},children:[r&&e("b",{children:r}),o&&e("span",{children:o})]}),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"})]})});on.displayName="CAlert";_t();P();var $n=({value:t,variant:r,color:o,sx:n,className:a})=>{let i=r==="indeterminate"||t===void 0,s=Ue(n,`orb-prog ${a??""}`);return c("div",{className:s.className,role:"progressbar","aria-valuenow":i?void 0:Math.round(t),"aria-valuemin":i?void 0:0,"aria-valuemax":i?void 0:100,style:s.style,children:[e("i",{style:i?{width:"40%",animation:"orb-prog-ind 1.2s ease-in-out infinite"}:{width:`${Math.min(100,Math.max(0,t))}%`,background:o}}),i&&e("style",{children:"@keyframes orb-prog-ind { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }"})]})},Lf=({width:t,height:r=14,variant:o="rectangular",sx:n,className:a})=>e("div",{className:`orb-skel ${a??""}`,style:{width:t,height:r,borderRadius:o==="circular"?"50%":o==="text"?6:"var(--orb-r)",...n}}),Xr=({size:t=12,onPrimary:r=false,sx:o,className:n})=>e("span",{className:`orb-spin ${r?"orb-spin-light":""} ${n??""}`,style:{width:t,height:t,...o},role:"status","aria-label":"Loading"});P();var ct=({title:t,children:r,enterDelay:o=300,side:n="top",align:a="center",disabled:i})=>!t||i?e(jsxRuntime.Fragment,{children:r}):e(Yr__namespace.Provider,{delayDuration:o,skipDelayDuration:200,children:c(Yr__namespace.Root,{children:[e(Yr__namespace.Trigger,{asChild:true,children:r}),e(Yr__namespace.Portal,{children:e(Yr__namespace.Content,{className:"orb-tooltip",side:n,align:a,sideOffset:6,children:t})})]})});_t();P();var ae=er.forwardRef(({tooltip:t,size:r="small",active:o=false,edge:n,color:a,sx:i,className:s,children:l,type:d="button",...u},p)=>{let f=Ue([{color:o?"var(--orb-primary)":a,...n==="start"?{marginLeft:-8}:n==="end"?{marginRight:-8}:void 0},...Array.isArray(i)?i:i?[i]:[]],`orb-icon-btn ${r==="small"?"orb-icon-btn-sm":""} ${s??""}`),b=e("button",{ref:p,type:d,className:f.className,style:f.style,...u,children:l});return t?e(ct,{title:t,children:b}):b});ae.displayName="CIconButton";_t();P();var _n=({value:t,options:r,onValueChange:o,size:n="medium",sx:a,className:i,...s})=>{let l=er.useRef([]),d=r.findIndex(m=>!m.disabled),u=r.findIndex(m=>m.value===t),p=(m,v)=>{let y=r.map((h,C)=>h.disabled?-1:C).filter(h=>h>=0);if(y.length===0)return;let g=y.indexOf(v),x;m.key==="Home"&&(x=y[0]),m.key==="End"&&(x=y[y.length-1]),(m.key==="ArrowRight"||m.key==="ArrowDown")&&(x=y[(g+1+y.length)%y.length]),(m.key==="ArrowLeft"||m.key==="ArrowUp")&&(x=y[(g-1+y.length)%y.length]),x!==void 0&&(m.preventDefault(),l.current[x]?.focus(),o(r[x].value));},f=Ue(a,["orb-segmented-control",n==="small"?"orb-segmented-control-sm":"",i].filter(Boolean).join(" ")),b={...f.style,"--orb-segmented-count":Math.max(r.length,1),"--orb-segmented-index":Math.max(u,0)};return c("div",{role:"radiogroup",className:f.className,style:b,"data-has-selection":u>=0?"true":"false",...s,children:[e("span",{className:"orb-segmented-control-thumb","aria-hidden":"true"}),r.map((m,v)=>{let y=m.value===t;return e(ae,{ref:g=>{l.current[v]=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":y,"data-selected":y?"true":void 0,disabled:m.disabled,tabIndex:y||t==null&&v===d?0:-1,onClick:()=>o(m.value),onKeyDown:g=>p(g,v),children:m.icon??e("span",{className:"orb-segmented-control-label",children:m.label})},m.value)})]})};_t();P();var Qt=({triggerLabel:t,items:r=[],trigger:o,align:n="start",anchorEl:a,open:i,onClose:s,children:l,slotProps:d,PaperProps:u,anchorPosition:p,sx:f})=>{let b=er.useRef(null);if(er.useEffect(()=>{if(i!==true)return;let m=y=>{let g=y.composedPath();b.current&&g.includes(b.current)||a&&g.includes(a)||s?.();},v=y=>{y.key==="Escape"&&s?.();};return document.addEventListener("pointerdown",m,true),document.addEventListener("keydown",v,true),()=>{document.removeEventListener("pointerdown",m,true),document.removeEventListener("keydown",v,true);}},[a,s,i]),i!==void 0){if(!i||typeof document>"u")return null;let m=a?.getBoundingClientRect(),v=window.innerWidth,y=m?.left??16,g=m?.right??y,x=d?.paper?.sx??u?.sx,h=Ue([...Array.isArray(x)?x:x?[x]:[],...Array.isArray(f)?f:f?[f]:[]],"orb-pop orb-menu",d?.paper?.style??u?.style),C=er.Children.map(l,k=>{if(!er.isValidElement(k)||k.type!=="option")return k;let w=k.props,{children:T,disabled:I,selected:S}=w,A=Ue(w.sx,`orb-menu-item ${S?"orb-selected":""} ${w.className??""}`,w.style);return e("div",{role:"menuitem","aria-disabled":I||void 0,"aria-selected":S||void 0,tabIndex:I?-1:0,id:w.id,title:w.title,className:A.className,style:A.style,onClick:I?void 0:w.onClick,onKeyDown:D=>{!I&&(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),w.onClick?.(D));},children:T})});return reactDom.createPortal(e("div",{ref:b,role:"menu",className:h.className,style:{...h.style,position:"fixed",left:n==="end"&&!p?void 0:p?.left??y,right:n==="end"&&!p?Math.max(16,v-g):void 0,top:p?.top??(m?.bottom??16)+6,maxWidth:"calc(100vw - 32px)",zIndex:1301},children:C}),document.body)}return c(Nr__namespace.Root,{children:[e(Nr__namespace.Trigger,{asChild:true,children:o??e(we,{variant:"primary",children:t})}),e(Nr__namespace.Portal,{children:e(Nr__namespace.Content,{className:"orb-pop orb-menu",align:n,sideOffset:6,children:r.map((m,v)=>c(Nr__namespace.Item,{className:"orb-menu-item",disabled:m.disabled,onSelect:()=>m.onClick?.(),children:[m.icon,m.label]},v))})})]})};_t();P();var Ae=er.forwardRef(({elevation:t=1,variant:r,component:o,sx:n,style:a,className:i,children:s,...l},d)=>{let u=o??"div",p=Ue(n,`orb-card ${t>0&&r!=="outlined"?"orb-card-raised":""} ${i??""}`,a);return e(u,{ref:d,className:p.className,style:p.style,...l,children:s})});Ae.displayName="CPaper";_t();P();var Dt=er.forwardRef(({orientation:t="horizontal",flexItem:r,sx:o,className:n},a)=>{let i=Ue([{...t==="vertical"?{alignSelf:"stretch",height:"auto"}:{width:"100%"},...r?{alignSelf:"stretch"}:void 0},...Array.isArray(o)?o:o?[o]:[]],`${t==="vertical"?"orb-divider-v":"orb-divider"} ${n??""}`);return e("hr",{ref:a,"aria-orientation":t,className:i.className,style:i.style})});Dt.displayName="CDivider";_t();P();var Uf={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"},Kf={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6"},L=er.forwardRef(({variant:t="body1",component:r,muted:o=false,numeric:n=false,color:a,noWrap:i=false,fontWeight:s,sx:l,className:d,children:u,...p},f)=>{let b=r??Kf[t]??"span",v=[t==="inherit"?void 0:Uf[t],d].filter(Boolean).join(" "),y=Ue([{...o?{color:"var(--orb-muted)"}:void 0,...a?{color:a}:void 0,...n?{fontVariantNumeric:"tabular-nums"}:void 0,...s?{fontWeight:s}:void 0,...i?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:void 0},...Array.isArray(l)?l:l?[l]:[]],v);return e(b,{ref:f,className:y.className,style:y.style,...p,children:u})});L.displayName="CTypography";_t();P();var Xf=t=>{if(t!==void 0)return typeof t=="number"?`${t*8}px`:t},ie=er.forwardRef(({direction:t="column",spacing:r,alignItems:o,justifyContent:n,flexWrap:a,flex:i,useFlexGap:s,sx:l,className:d,children:u,...p},f)=>{let b=Ue([{display:"flex",flexDirection:t,gap:Xf(r),alignItems:o,justifyContent:n,flexWrap:a,flex:i},...Array.isArray(l)?l:l?[l]:[]],d);return e("div",{ref:f,className:b.className,style:b.style,...p,children:u})});ie.displayName="CStack";_t();P();var Lt=({open:t,onClose:r,title:o,children:n,actions:a,maxWidth:i=560,fullWidth:s=false,fullScreen:l=false,PaperProps:d,slotProps:u,disableRestoreFocus:p,keepMounted:f,hideCloseButton:b=false,sx:m,className:v})=>{let y=Ue([{width:l?"100vw":s?"min(920px, calc(100vw - 32px))":void 0,height:l?"100vh":void 0,maxWidth:l?"none":typeof i=="number"?`${i}px`:i},...Array.isArray(d?.sx??u?.paper?.sx)?d?.sx??u?.paper?.sx:d?.sx??u?.paper?.sx?[d?.sx??u?.paper?.sx]:[],...Array.isArray(m)?m:m?[m]:[]],`orb-dialog ${v??""}`);return e(wr__namespace.Root,{open:t,onOpenChange:g=>{g||r?.();},children:c(wr__namespace.Portal,{children:[e(wr__namespace.Overlay,{className:"orb-overlay"}),c(wr__namespace.Content,{className:y.className,style:y.style,children:[(o||!b)&&c("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:16},children:[o?e(wr__namespace.Title,{className:"orb-dialog-title",children:o}):e(wr__namespace.Title,{className:"orb-visually-hidden",children:"Dialog"}),!b&&e(wr__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(jt,{size:16,strokeWidth:2})})})]}),e("div",{style:{minWidth:0},children:n}),a&&e("div",{className:"orb-dialog-actions",children:a})]})]})})};P();var Ws=({open:t,defaultOpen:r,onOpenChange:o,trigger:n,children:a,align:i="start",side:s="bottom",sideOffset:l=6,matchTriggerWidth:d=false,sx:u,className:p})=>c(yo__namespace.Root,{open:t,defaultOpen:r,onOpenChange:o,children:[e(yo__namespace.Trigger,{asChild:true,children:n}),e(yo__namespace.Portal,{children:e(yo__namespace.Content,{className:`orb-pop ${p??""}`,align:i,side:s,sideOffset:l,style:{minWidth:d?"var(--radix-popover-trigger-width)":void 0,...u},onOpenAutoFocus:f=>f.preventDefault(),children:a})})]});P();var jf=({items:t,value:r,defaultValue:o,onChange:n,sx:a,className:i})=>{let s=r!==void 0,[l,d]=er.useState(o??t[0]?.value),u=s?r:l,p=er.useRef([]),f=m=>{s||d(m),n?.(m);},b=m=>{if(m.key!=="ArrowRight"&&m.key!=="ArrowLeft")return;m.preventDefault();let v=t.filter(h=>!h.disabled),y=v.findIndex(h=>h.value===u),g=m.key==="ArrowRight"?1:-1,x=v[(y+g+v.length)%v.length];if(x){f(x.value);let h=t.findIndex(C=>C.value===x.value);p.current[h]?.focus();}};return e("div",{className:`orb-tabs ${i??""}`,role:"tablist",style:a,onKeyDown:b,children:t.map((m,v)=>{let y=m.value===u;return c("button",{ref:g=>{p.current[v]=g;},type:"button",role:"tab","aria-selected":y,disabled:m.disabled,className:`orb-tab ${y?"orb-is-active":""}`,style:{display:"inline-flex",alignItems:"center",gap:6},onClick:()=>f(m.value),children:[m.icon,m.label]},m.value)})})};P();var Jf=["su","mo","tu","we","th","fr","sa"],Gn=(t,r)=>!!(t&&r&&t.isSame(r,"day")),Un=({value:t,rangeStart:r,rangeEnd:o,onChange:n,month:a,defaultMonth:i,onMonthChange:s,minDate:l,maxDate:d,locale:u,renderDay:p})=>{let f=a!==void 0,[b,m]=er.useState(()=>i??t??r??ro__default.default()),v=(f?a:b).startOf("month"),y=w=>{f||m(w),s?.(w);},g=er.useMemo(()=>u?v.locale(u):v,[v,u]),x=er.useMemo(()=>{let T=v.startOf("month").startOf("week"),I=[],S=T;for(let A=0;A<6;A+=1){let D=[];for(let M=0;M<7;M+=1)D.push(S),S=S.add(1,"day");if(I.push(D),S.isAfter(v.endOf("month"))&&A>=3)break}return I},[v]),h=er.useMemo(()=>{let w=u?ro__default.default().locale(u):ro__default.default();return Jf.map((T,I)=>w.startOf("week").add(I,"day").format("dd"))},[u]),C=w=>!!(l&&w.isBefore(l.startOf("day"))||d&&w.isAfter(d.startOf("day"))),k=r!==void 0||o!==void 0;return c("div",{className:"orb-cal",children:[c("div",{className:"orb-cal-head",children:[e("button",{type:"button",className:"orb-icon-btn orb-icon-btn-sm","aria-label":"Previous month",onClick:()=>y(v.subtract(1,"month")),children:e(Ma,{size:16,strokeWidth:2})}),e("span",{className:"orb-cal-title","aria-live":"polite",children:g.format("MMMM YYYY")}),e("button",{type:"button",className:"orb-icon-btn orb-icon-btn-sm","aria-label":"Next month",onClick:()=>y(v.add(1,"month")),children:e(Br,{size:16,strokeWidth:2})})]}),c("div",{className:"orb-cal-grid",role:"grid",children:[h.map((w,T)=>e("span",{className:"orb-cal-dow",children:w},`${w}-${T}`)),x.flat().map(w=>{let T=!w.isSame(v,"month"),I=C(w),S=k?Gn(w,r)||Gn(w,o):Gn(w,t),A=w.isSame(ro__default.default(),"day"),D=k&&r&&o&&w.isAfter(r.startOf("day"))&&w.isBefore(o.startOf("day")),M=k&&Gn(w,r)&&!!o,N=k&&Gn(w,o)&&!!r,E=["orb-cal-day",T?"orb-is-outside":void 0,A?"orb-is-today":void 0,S?"orb-is-selected":void 0,D?"orb-is-in-range":void 0,M?"orb-is-range-start":void 0,N?"orb-is-range-end":void 0].filter(Boolean).join(" ");return p?e("span",{className:"orb-cal-day-slot",children:p(w,{outsideCurrentMonth:T,selected:S,today:A,disabled:I})},w.format("YYYY-MM-DD")):e("button",{type:"button",role:"gridcell","aria-selected":S,"aria-current":A?"date":void 0,className:E,disabled:I,onClick:()=>n?.(w),children:w.date()},w.format("YYYY-MM-DD"))})]})]})};P();ro__default.default.extend(eb__default.default);var tb=({label:t,value:r,defaultValue:o,onChange:n,minDate:a,maxDate:i,disabled:s,format:l="YYYY-MM-DD",placeholder:d,locale:u,dense:p=false,error:f,helperText:b,sx:m,className:v})=>{let y=r!==void 0,[g,x]=er.useState(o??null),h=y?r:g,[C,k]=er.useState(false),[w,T]=er.useState(null),I=N=>{y||x(N),n?.(N);},S=w??(h?(u?h.locale(u):h).format(l):""),A=()=>{if(w===null)return;let N=w.trim();if(!N)I(null);else {let E=ro__default.default(N,l,true);E.isValid()&&!(a&&E.isBefore(a.startOf("day")))&&!(i&&E.isAfter(i.startOf("day")))&&I(E);}T(null);},M=(typeof f=="string"?f:void 0)??b;return c("div",{className:`orb-fld ${f?"orb-is-error":""} ${v??""}`,style:m,children:[t&&e("label",{children:t}),e(Ws,{open:C,onOpenChange:k,trigger:c("div",{className:"orb-inp-adornment-wrap",style:{width:"100%"},children:[e("span",{className:"orb-inp-adornment",children:e(Bs,{size:15,strokeWidth:1.8})}),e("input",{className:`orb-inp ${p?"orb-inp-dense":""}`,value:S,placeholder:d??l,disabled:s,onFocus:()=>k(true),onChange:N=>T(N.target.value),onBlur:A,onKeyDown:N=>{N.key==="Enter"&&(A(),k(false)),N.key==="Escape"&&k(false);}})]}),children:e(Un,{value:h,onChange:N=>{I(N),T(null),k(false);},minDate:a,maxDate:i,locale:u,defaultMonth:h??void 0})}),M&&e("span",{className:"orb-fld-msg",children:M})]})};P();var ob=({onFilesSelected:t,multiple:r=false,accept:o="*",maxSize:n,title:a="Drag and drop files here or click to upload",subtitle:i="Support for bulk upload",sx:s})=>{let[l,d]=er.useState(false),[u,p]=er.useState([]),f=er.useRef(null),b=h=>{h.preventDefault(),d(true);},m=h=>{h.preventDefault(),d(false);},v=h=>{h.preventDefault(),d(false),g(Array.from(h.dataTransfer.files));},y=h=>{h.target.files&&g(Array.from(h.target.files));},g=h=>{let C=n?h.filter(w=>w.size<=n):h;C.length<h.length&&console.warn(`Some files were rejected because they exceed the maximum size of ${n} bytes.`);let k=r?[...u,...C]:C;r&&(k=k.filter((w,T,I)=>T===I.findIndex(S=>S.name===w.name&&S.size===w.size&&S.lastModified===w.lastModified))),p(k),t?.(k),f.current&&(f.current.value="");},x=h=>{let C=u.filter((k,w)=>w!==h);p(C),t?.(C);};return c("div",{style:{width:"100%",...s},children:[c("div",{onClick:()=>f.current?.click(),onDragOver:b,onDragLeave:m,onDrop:v,role:"button",tabIndex:0,onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),f.current?.click());},style:{border:`2px dashed ${l?"var(--orb-primary)":"var(--orb-border)"}`,borderRadius:"var(--orb-r)",padding:32,textAlign:"center",cursor:"pointer",backgroundColor:l?"var(--orb-hover)":"var(--orb-canvas)",transition:"border-color var(--orb-t-fast), background-color var(--orb-t-fast)"},children:[e("input",{type:"file",ref:f,style:{display:"none"},multiple:r,accept:o,onChange:y}),c("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"center"},children:[e(Qc,{size:40,strokeWidth:1.5,color:l?"var(--orb-primary)":"var(--orb-muted)"}),e("span",{className:"orb-subtitle",children:a}),e("span",{className:"orb-meta",children:i})]})]}),u.length>0&&e("div",{style:{display:"flex",flexDirection:"column",gap:8,marginTop:16},children:u.map((h,C)=>c("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",border:"1px solid var(--orb-border)",borderRadius:"var(--orb-r)",backgroundColor:"var(--orb-surface)"},children:[c("div",{style:{display:"flex",alignItems:"center",gap:8,overflow:"hidden"},children:[e(Ec,{size:16,strokeWidth:1.8,color:"var(--orb-muted)"}),e("span",{className:"orb-body-dense",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.name}),c("span",{className:"orb-meta",children:["(",(h.size/1024).toFixed(1)," KB)"]})]}),e(ae,{"aria-label":`Remove ${h.name}`,onClick:()=>x(C),children:e(Zc,{size:15,strokeWidth:1.8})})]},`${h.name}-${C}`))})]})};function br(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var _a={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"},Kn={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",full:"rounded-full"},od=()=>"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50";P();var lb=classVarianceAuthority.cva(od(),{variants:{variant:{default:`${_a.primary} shadow-sm`,destructive:"bg-[var(--orb-status-error)] text-[var(--orb-on-primary)] hover:opacity-90 active:opacity-80 shadow-sm",outline:`${_a.outline} shadow-sm`,secondary:"bg-[var(--orb-surface-2)] text-[var(--orb-fg)] hover:bg-[var(--orb-hover)] active:bg-[var(--orb-selected)] shadow-sm",ghost:_a.ghost,link:"text-[var(--orb-status-primary)] underline-offset-4 hover:underline hover:text-[var(--orb-status-primary)] active:text-[var(--orb-p700)]","chat-tool":"bg-[var(--orbai-surface-2)] border border-[var(--orbai-border-soft)] text-[var(--orbai-text-2)] hover:bg-[var(--orbai-surface-3)] hover:border-[var(--orbai-border-strong)] hover:text-[var(--orbai-text-1)] active:scale-95 transition-all duration-200","chat-send":"bg-[var(--orb-primary)] hover:bg-[var(--orb-p600)] text-[var(--orb-on-primary)] border border-[var(--orbai-border-strong)] shadow-[var(--orbai-shadow-soft-sm)] hover:shadow-[var(--orbai-shadow-soft-md)] active:scale-95 transition-all duration-200","chat-stop":"bg-[var(--orb-status-error)] hover:opacity-90 border border-[var(--orbai-border-strong)] shadow-[var(--orbai-shadow-soft-sm)] hover:shadow-[var(--orbai-shadow-soft-md)] active:scale-95 text-[var(--orb-on-primary)] transition-all duration-200","chat-disabled":"cursor-not-allowed opacity-50 bg-[var(--orbai-surface-2)] border border-[var(--orbai-border-soft)] text-[var(--orbai-muted)]"},size:{default:"h-10 px-4 py-2",sm:"h-9 px-3",lg:"h-11 px-8",icon:"h-10 w-10","chat-sm":"h-8 w-8 rounded-full","chat-md":"h-10 w-10 rounded-full","chat-lg":"h-12 w-12 rounded-full"},rounded:{none:Kn.none,sm:Kn.sm,md:Kn.md,full:Kn.full}},defaultVariants:{variant:"default",size:"default",rounded:"md"}}),Gs=er__namespace.forwardRef(({className:t,variant:r,size:o,asChild:n=false,...a},i)=>e(n?reactSlot.Slot:"button",{className:br(lb({variant:r,size:o,className:t})),ref:i,...a}));Gs.displayName="Button";var cb={"common.cancel":"Cancel","common.save":"Save","common.ok":"OK","common.done":"Done","common.search":"Search","common.none":"None","common.all":"All","common.noData":"No data","common.copy":"Copy","common.delete":"Delete","common.loading":"Loading...","header.searchPlaceholder":"Ask me...","header.searchAddFeature":"Add feature","header.searchStartVoice":"Start voice input","header.searchStopVoice":"Stop voice input","header.searchOpenPanel":"Open conversation","header.theme.system":"Theme: System","header.theme.dark":"Theme: Dark","header.theme.light":"Theme: Light","header.menu.setting":"Setting","header.menu.refresh":"Refresh","header.menu.logout":"Logout","navigation.expand":"Expand navigation","navigation.collapse":"Collapse navigation","navigation.searchPlaceholder":"Search menu...","navigation.noMatch":"No matching menu items","navigation.noAccessibleApp":"No accessible applications","navigation.noItems":"No items to display","navigation.expandView":"Expand {title}","navigation.mode.switchToFixed":"Switch to fixed navigation","navigation.mode.switchToFloating":"Switch to floating navigation","navigation.pinned":"Pinned","navigation.pin.add":"Pin to top","navigation.pin.remove":"Unpin","table.toolbar.searchPlaceholder":"Search...","table.title.default":"Data Table","table.toolbar.groupBy":"Group By","table.toolbar.summary":"Summary","table.toolbar.columns":"Columns","table.toolbar.export":"Export","table.toolbar.itemsPerPage":"Items per page:","table.toolbar.pageOf":"Page {current} of {total}","table.toolbar.newItem":"New Item","table.toolbar.editItem":"Edit Item","table.toolbar.deleteItem":"Delete Item","table.toolbar.graphicReport":"Graphic Report","table.toolbar.saveLayout":"Save Layout","table.menu.groupBy":"Group By","table.menu.clearAll":"Clear All","table.menu.visibleColumns":"Visible Columns","table.menu.showSummaryRow":"Show Summary Row","table.menu.noNumericColumns":"No numeric columns","table.group.expandAll":"Expand All Groups","table.group.collapseAll":"Collapse All Groups","table.mobile.notImplemented":"Mobile View Not Implemented","table.headerMenu.sortAsc":"Sort Ascending","table.headerMenu.sortDesc":"Sort Descending","table.headerMenu.clearSort":"Clear Sort","table.headerMenu.configureSort":"Configure Sort...","table.headerMenu.group":"Group by this column","table.headerMenu.ungroup":"Remove from grouping","table.headerMenu.addSummary":"Include in Summary","table.headerMenu.removeSummary":"Remove from Summary","table.headerMenu.hideColumn":"Hide Column","table.sortDialog.title":"Sort Settings","table.sortDialog.empty":"No sort rules. Add one to start ordering rows.","table.sortDialog.addRule":"Add Sort Rule","table.sortDialog.clearAll":"Clear All","table.sortDialog.asc":"Ascending","table.sortDialog.desc":"Descending","pivot.title.default":"Pivot Table Builder","pivot.subtitle.default":"Drag fields to configure the pivot table.","pivot.empty":"Drag at least one field into Values to render the pivot result.","pivot.records":"Records","pivot.afterFilter":"After filter","pivot.grandTotal":"Grand Total","pivot.resultLabel":"Result","pivot.valueLabel":"Value","pivot.table.dimensions":"Dimensions","pivot.config.title":"Configuration","pivot.fieldList":"Field List","pivot.availableDimensions":"Available dimensions","pivot.allFieldsInUse":"All fields are in use.","pivot.zone.rows":"Rows","pivot.zone.columns":"Columns","pivot.zone.filters":"Filters","pivot.zone.values":"Values","pivot.hint.rows":"Drag fields here to build row hierarchy","pivot.hint.columns":"Drag fields here to build column hierarchy","pivot.hint.filters":"Drag fields here for report filters","pivot.hint.values":"Drag numeric fields here for aggregation","pivot.clearArea":"Clear area","pivot.filter.na":"N/A","pivot.filter.noValues":"No values","pivot.filter.noneSelected":"None selected","pivot.filter.allValues":"All values","pivot.filter.selectedCount":"{selected} / {total} selected","pivot.filter.selectAll":"Select All","pivot.filter.deselectAll":"Deselect All","pivot.filter.noResults":"No results","pivot.collapse.ariaExpand":"Expand configuration area","pivot.collapse.ariaCollapse":"Collapse configuration area","pivot.agg.sum":"Sum","pivot.agg.count":"Count","pivot.agg.avg":"Average","pivot.agg.min":"Min","pivot.agg.max":"Max","pivot.preset.selectPlaceholder":"Select preset","pivot.preset.save":"Save preset","pivot.preset.delete":"Delete preset","pivot.preset.saveDialogTitle":"Save current preset","pivot.preset.nameLabel":"Preset name","pivot.preset.defaultName":"Preset {index}","pivot.table.sectionTitle":"Pivot Result","pivot.table.expandRowsAll":"Expand rows","pivot.table.collapseRowsAll":"Collapse rows","pivot.table.expandColumnsAll":"Expand columns","pivot.table.collapseColumnsAll":"Collapse columns","pivot.table.collapse.ariaExpand":"Expand pivot result","pivot.table.collapse.ariaCollapse":"Collapse pivot result","pivot.chart.title":"Pivot Chart","pivot.chart.subtitle":"Map one dimension and up to two measures into a compact chart.","pivot.chart.subtitleReady":"{dimension} by {measure}","pivot.chart.emptyNoDimension":"Add at least one row or column field to render the chart.","pivot.chart.emptyNoValue":"Add at least one value field to render the chart.","pivot.chart.emptyNoData":"No data available for the current chart selection.","pivot.chart.dimension":"Dimension","pivot.chart.primaryMeasure":"Measure","pivot.chart.secondaryMeasure":"Compare measure","pivot.chart.chartType":"Chart type","pivot.chart.style.barVertical":"Vertical bars","pivot.chart.style.barHorizontal":"Horizontal bars","pivot.chart.style.line":"Line","pivot.chart.style.scatter":"Scatter","pivot.chart.collapse.ariaExpand":"Expand chart area","pivot.chart.collapse.ariaCollapse":"Collapse chart area","smartFilter.adaptFilters":"Adapt Filters","smartFilter.addFilters":"Add Filters","smartFilter.go":"Go","smartFilter.visibleFilters":"Visible Filters","smartFilter.searchPlaceholder":"Search...","smartFilter.noOptionsFound":"No options found","smartFilter.min":"Min","smartFilter.max":"Max","smartFilter.minMaxPlaceholder":"Min - Max","smartFilter.operator.equals":"Equals","smartFilter.operator.contains":"Contains","smartFilter.operator.notContains":"Does Not Contain","smartFilter.operator.wildcard":"Wildcard Search","smartFilter.operator.notEquals":"Not Equals","smartFilter.operator.greaterThan":"Greater Than","smartFilter.operator.lessThan":"Less Than","smartFilter.operator.greaterOrEqual":"Greater Than or Equal","smartFilter.operator.lessOrEqual":"Less Than or Equal","smartFilter.operator.between":"Between","variant.noOptions":"No options","variant.defaultSuffix":"Default","variant.selectVariant":"Select Variant","variant.saveView":"Save View","variant.newVariant":"New Variant","variant.viewName":"View Name","variant.setDefault":"Set as Default","variant.publicAllUsers":"Public (All Users)","variant.toast.fetchFailed":"Failed to load variants","variant.toast.saveFailed":"Failed to save variant","variant.toast.saveSuccess":"Variant saved successfully","variant.toast.deleteFailed":"Failed to delete variant","variant.toast.deleteSuccess":"Variant deleted successfully","variant.toast.defaultFailed":"Failed to update default variant","variant.toast.defaultSuccess":"Default variant updated","layout.saveLayout":"Save Layout","layout.layoutOptions":"Layout Options","layout.selectLayout":"Select Layout","layout.saveCurrentLayout":"Save Current Layout...","layout.noSavedLayouts":"No saved layouts","layout.removeDefault":"Remove Default","layout.setAsDefault":"Set as Default","layout.layoutName":"Layout Name","layout.layoutDescription":"Description","layout.layoutNameHelper":"e.g., 'Compact View'","layout.warningOverwrite":"Warning: Existing layout will be overwritten","layout.useAsDefault":"Use as Default Layout","layout.publicAllUsers":"Public (Visible to all users)","layout.toast.loadFallback":"Failed to load layouts from backend, fallback to local storage","layout.toast.saveSuccess":"Layout saved successfully","layout.toast.saveLocalSuccess":"Layout saved to local storage","layout.toast.backendUnavailableSavedLocal":"Backend unavailable, saved to local storage","layout.toast.deleteSuccess":"Layout deleted successfully","layout.toast.deleteLocalSuccess":"Layout deleted from local storage","layout.toast.backendUnavailableDeletedLocal":"Backend unavailable, deleted from local storage","layout.toast.defaultSuccess":"Default layout set","layout.toast.defaultLocalSuccess":"Default layout set in local storage","layout.toast.backendUnavailableDefaultLocal":"Backend unavailable, default saved to local storage","dateRange.label":"Date Range","dateRange.startDate":"Start Date","dateRange.endDate":"End Date","dateRange.select":"Select...","dateRange.today":"Today","dateRange.thisWeek":"This Week","dateRange.thisMonth":"This Month","graph.records":"{count} records","graph.kpi.totalRecords":"Total Records","graph.kpi.totalReport":"Total Report","graph.kpi.totalBillable":"Total Billable","graph.kpi.efficiency":"Efficiency","graph.kpi.amount":"Amount","graph.kpi.flagged":"Flagged","graph.chart.billable.title":"Billable by Dimension","graph.chart.billable.subtitle":"Top values by billable hours","graph.chart.efficiency.title":"Efficiency by Person","graph.chart.efficiency.subtitle":"Lowest efficiency first","graph.chart.status.title":"Status Distribution","graph.chart.status.subtitle":"Record ratio by status","graph.dataBody":"Data Body","graph.reportTitle":"Graphic Report","graph.unassigned":"Unassigned","graph.column.reportHours":"Report Hours","graph.column.billableHours":"Billable Hours","detail.searchAi.placeholder":"Search fields, or ask AI if no match...","detail.searchAi.matches":"{count} matches found","detail.searchAi.noMatch":"No matching field found.","detail.searchAi.autoAiFallback":"No direct match. Triggering AI analysis...","detail.searchAi.aiResultTitle":"AI Insight","detail.table.title":"Related Records","kanban.empty":"Drop cards here","kanban.bucket.limit":"Limit","kanban.bucket.dropHere":"Release to move into this bucket","kanban.bucket.add":"Add bucket","kanban.bucket.rename":"Rename bucket","kanban.bucket.saveRename":"Save bucket name","kanban.bucket.cancelRename":"Cancel renaming","kanban.search.placeholder":"Search cards and buckets","kanban.search.clear":"Clear search","kanban.search.results":"{count} matching cards","kanban.search.noMatch":"No matching cards","kanban.card.progress":"Progress","kanban.card.openDetail":"Open Detail","kanban.priority.critical":"Critical","kanban.priority.high":"High","kanban.priority.medium":"Medium","kanban.priority.low":"Low","quickCreate.newItem":"New Item","quickCreate.createWithTitle":"Create {title}","quickEdit.editWithTitle":"Edit {title}","quickDelete.confirmTitle":"Confirm Delete","quickDelete.confirmMessageSingle":"Are you sure you want to delete the selected record?","quickDelete.confirmMessageMultiple":"Are you sure you want to delete {count} selected records?","cardPage.viewDetails":"View Details","cardPage.download":"Download","cardPage.close":"Close","cardPage.empty":"No items found","messageBox.confirm":"OK","messageBox.cancel":"Cancel"},db={"common.cancel":"\u53D6\u6D88","common.save":"\u4FDD\u5B58","common.ok":"\u786E\u5B9A","common.done":"\u5B8C\u6210","common.search":"\u641C\u7D22","common.none":"\u65E0","common.all":"\u5168\u90E8","common.noData":"\u6682\u65E0\u6570\u636E","common.copy":"\u590D\u5236","common.delete":"\u5220\u9664","common.loading":"\u52A0\u8F7D\u4E2D...","header.searchPlaceholder":"\u95EE\u6211\u70B9\u4EC0\u4E48...","header.searchAddFeature":"\u589E\u52A0\u529F\u80FD","header.searchStartVoice":"\u5F00\u59CB\u8BED\u97F3\u8F93\u5165","header.searchStopVoice":"\u505C\u6B62\u8BED\u97F3\u8F93\u5165","header.searchOpenPanel":"\u6253\u5F00\u5BF9\u8BDD","header.theme.system":"\u4E3B\u9898\uFF1A\u8DDF\u968F\u7CFB\u7EDF","header.theme.dark":"\u4E3B\u9898\uFF1A\u6DF1\u8272","header.theme.light":"\u4E3B\u9898\uFF1A\u6D45\u8272","header.menu.setting":"\u8BBE\u7F6E","header.menu.refresh":"\u5237\u65B0","header.menu.logout":"\u6CE8\u9500","navigation.expand":"\u5C55\u5F00\u5BFC\u822A","navigation.collapse":"\u6298\u53E0\u5BFC\u822A","navigation.searchPlaceholder":"\u641C\u7D22\u83DC\u5355...","navigation.noMatch":"\u672A\u627E\u5230\u5339\u914D\u7684\u83DC\u5355\u9879","navigation.noAccessibleApp":"\u6682\u65E0\u53EF\u8BBF\u95EE\u7684\u5E94\u7528","navigation.noItems":"\u6682\u65E0\u53EF\u663E\u793A\u9879","navigation.expandView":"\u5C55\u5F00\u67E5\u770B {title}","navigation.mode.switchToFixed":"\u5207\u6362\u4E3A\u56FA\u5B9A\u5BFC\u822A","navigation.mode.switchToFloating":"\u5207\u6362\u4E3A\u60AC\u6D6E\u5BFC\u822A","navigation.pinned":"\u5DF2\u56FA\u5B9A","navigation.pin.add":"\u56FA\u5B9A\u5230\u9876\u90E8","navigation.pin.remove":"\u53D6\u6D88\u56FA\u5B9A","table.toolbar.searchPlaceholder":"\u641C\u7D22...","table.title.default":"\u6570\u636E\u8868","table.toolbar.groupBy":"\u5206\u7EC4","table.toolbar.summary":"\u6C47\u603B","table.toolbar.columns":"\u5217","table.toolbar.export":"\u5BFC\u51FA","table.toolbar.itemsPerPage":"\u6BCF\u9875\u6761\u6570\uFF1A","table.toolbar.pageOf":"\u7B2C {current} / {total} \u9875","table.toolbar.newItem":"\u65B0\u5EFA\u6761\u76EE","table.toolbar.editItem":"\u7F16\u8F91\u6761\u76EE","table.toolbar.deleteItem":"\u5220\u9664\u6761\u76EE","table.toolbar.graphicReport":"\u56FE\u8868\u62A5\u8868","table.toolbar.saveLayout":"\u4FDD\u5B58\u5E03\u5C40","table.menu.groupBy":"\u5206\u7EC4","table.menu.clearAll":"\u6E05\u7A7A","table.menu.visibleColumns":"\u53EF\u89C1\u5217","table.menu.showSummaryRow":"\u663E\u793A\u6C47\u603B\u884C","table.menu.noNumericColumns":"\u6CA1\u6709\u6570\u503C\u5217","table.group.expandAll":"\u5C55\u5F00\u5168\u90E8\u5206\u7EC4","table.group.collapseAll":"\u6298\u53E0\u5168\u90E8\u5206\u7EC4","table.mobile.notImplemented":"\u79FB\u52A8\u7AEF\u89C6\u56FE\u6682\u672A\u5B9E\u73B0","table.headerMenu.sortAsc":"\u5347\u5E8F\u6392\u5217","table.headerMenu.sortDesc":"\u964D\u5E8F\u6392\u5217","table.headerMenu.clearSort":"\u6E05\u9664\u6392\u5E8F","table.headerMenu.configureSort":"\u6392\u5E8F\u8BBE\u7F6E...","table.headerMenu.group":"\u6309\u6B64\u5217\u5206\u7EC4","table.headerMenu.ungroup":"\u53D6\u6D88\u5206\u7EC4","table.headerMenu.addSummary":"\u52A0\u5165\u6C47\u603B","table.headerMenu.removeSummary":"\u4ECE\u6C47\u603B\u4E2D\u79FB\u9664","table.headerMenu.hideColumn":"\u9690\u85CF\u8BE5\u5217","table.sortDialog.title":"\u6392\u5E8F\u8BBE\u7F6E","table.sortDialog.empty":"\u6682\u65E0\u6392\u5E8F\u89C4\u5219\uFF0C\u8BF7\u6DFB\u52A0\u89C4\u5219\u8FDB\u884C\u6392\u5E8F\u3002","table.sortDialog.addRule":"\u6DFB\u52A0\u6392\u5E8F\u89C4\u5219","table.sortDialog.clearAll":"\u6E05\u7A7A\u89C4\u5219","table.sortDialog.asc":"\u5347\u5E8F","table.sortDialog.desc":"\u964D\u5E8F","pivot.title.default":"\u6570\u636E\u900F\u89C6\u8868","pivot.subtitle.default":"\u62D6\u62FD\u5B57\u6BB5\u4EE5\u914D\u7F6E\u900F\u89C6\u8868\u3002","pivot.empty":"\u8BF7\u81F3\u5C11\u62D6\u5165\u4E00\u4E2A\u503C\u5B57\u6BB5\u540E\u518D\u67E5\u770B\u900F\u89C6\u7ED3\u679C\u3002","pivot.records":"\u8BB0\u5F55\u6570","pivot.afterFilter":"\u7B5B\u9009\u540E","pivot.grandTotal":"\u603B\u8BA1","pivot.resultLabel":"\u7ED3\u679C","pivot.valueLabel":"\u503C","pivot.table.dimensions":"\u7EF4\u5EA6","pivot.config.title":"\u5E03\u5C40\u914D\u7F6E","pivot.fieldList":"\u5B57\u6BB5\u5217\u8868","pivot.availableDimensions":"\u53EF\u7528\u7EF4\u5EA6","pivot.allFieldsInUse":"\u6240\u6709\u5B57\u6BB5\u90FD\u5DF2\u4F7F\u7528\u3002","pivot.zone.rows":"\u884C","pivot.zone.columns":"\u5217","pivot.zone.filters":"\u7B5B\u9009","pivot.zone.values":"\u503C","pivot.hint.rows":"\u5C06\u5B57\u6BB5\u62D6\u5230\u8FD9\u91CC\u6784\u5EFA\u884C\u5C42\u7EA7","pivot.hint.columns":"\u5C06\u5B57\u6BB5\u62D6\u5230\u8FD9\u91CC\u6784\u5EFA\u5217\u5C42\u7EA7","pivot.hint.filters":"\u5C06\u5B57\u6BB5\u62D6\u5230\u8FD9\u91CC\u4F5C\u4E3A\u62A5\u8868\u7B5B\u9009","pivot.hint.values":"\u5C06\u6570\u503C\u5B57\u6BB5\u62D6\u5230\u8FD9\u91CC\u8FDB\u884C\u805A\u5408","pivot.clearArea":"\u6E05\u7A7A\u533A\u57DF","pivot.filter.na":"\u4E0D\u53EF\u7528","pivot.filter.noValues":"\u65E0\u53EF\u9009\u503C","pivot.filter.noneSelected":"\u672A\u9009\u62E9","pivot.filter.allValues":"\u5168\u90E8\u503C","pivot.filter.selectedCount":"\u5DF2\u9009 {selected} / {total}","pivot.filter.selectAll":"\u5168\u9009","pivot.filter.deselectAll":"\u53D6\u6D88\u5168\u9009","pivot.filter.noResults":"\u65E0\u5339\u914D\u7ED3\u679C","pivot.collapse.ariaExpand":"\u5C55\u5F00\u914D\u7F6E\u533A\u57DF","pivot.collapse.ariaCollapse":"\u6298\u53E0\u914D\u7F6E\u533A\u57DF","pivot.agg.sum":"\u6C42\u548C","pivot.agg.count":"\u8BA1\u6570","pivot.agg.avg":"\u5E73\u5747\u503C","pivot.agg.min":"\u6700\u5C0F\u503C","pivot.agg.max":"\u6700\u5927\u503C","pivot.preset.selectPlaceholder":"\u9009\u62E9\u65B9\u6848","pivot.preset.save":"\u4FDD\u5B58\u65B9\u6848","pivot.preset.delete":"\u5220\u9664\u65B9\u6848","pivot.preset.saveDialogTitle":"\u4FDD\u5B58\u5F53\u524D\u65B9\u6848","pivot.preset.nameLabel":"\u65B9\u6848\u540D\u79F0","pivot.preset.defaultName":"\u65B9\u6848 {index}","pivot.table.sectionTitle":"\u900F\u89C6\u7ED3\u679C","pivot.table.expandRowsAll":"\u884C\u5168\u90E8\u6253\u5F00","pivot.table.collapseRowsAll":"\u884C\u5168\u90E8\u6298\u53E0","pivot.table.expandColumnsAll":"\u5217\u5168\u90E8\u6253\u5F00","pivot.table.collapseColumnsAll":"\u5217\u5168\u90E8\u6298\u53E0","pivot.table.collapse.ariaExpand":"\u5C55\u5F00\u900F\u89C6\u7ED3\u679C","pivot.table.collapse.ariaCollapse":"\u6298\u53E0\u900F\u89C6\u7ED3\u679C","pivot.chart.title":"\u900F\u89C6\u56FE\u8868","pivot.chart.subtitle":"\u5C06\u4E00\u4E2A\u7EF4\u5EA6\u4E0E\u6700\u591A\u4E24\u4E2A\u5EA6\u91CF\u6620\u5C04\u4E3A\u7D27\u51D1\u56FE\u8868\u3002","pivot.chart.subtitleReady":"{dimension} \xB7 {measure}","pivot.chart.emptyNoDimension":"\u8BF7\u81F3\u5C11\u653E\u5165\u4E00\u4E2A\u884C\u6216\u5217\u5B57\u6BB5\u540E\u518D\u67E5\u770B\u56FE\u8868\u3002","pivot.chart.emptyNoValue":"\u8BF7\u81F3\u5C11\u653E\u5165\u4E00\u4E2A\u503C\u5B57\u6BB5\u540E\u518D\u67E5\u770B\u56FE\u8868\u3002","pivot.chart.emptyNoData":"\u5F53\u524D\u56FE\u8868\u9009\u62E9\u4E0B\u6682\u65E0\u53EF\u5C55\u793A\u6570\u636E\u3002","pivot.chart.dimension":"\u56FE\u8868\u7EF4\u5EA6","pivot.chart.primaryMeasure":"\u4E3B\u5EA6\u91CF","pivot.chart.secondaryMeasure":"\u5BF9\u6BD4\u5EA6\u91CF","pivot.chart.chartType":"\u56FE\u8868\u7C7B\u578B","pivot.chart.style.barVertical":"\u7EB5\u5411\u67F1\u72B6\u56FE","pivot.chart.style.barHorizontal":"\u6A2A\u5411\u67F1\u72B6\u56FE","pivot.chart.style.line":"\u6298\u7EBF\u56FE","pivot.chart.style.scatter":"\u6563\u70B9\u56FE","pivot.chart.collapse.ariaExpand":"\u5C55\u5F00\u56FE\u8868\u533A\u57DF","pivot.chart.collapse.ariaCollapse":"\u6298\u53E0\u56FE\u8868\u533A\u57DF","smartFilter.adaptFilters":"\u7B5B\u9009\u8BBE\u7F6E","smartFilter.addFilters":"\u6DFB\u52A0\u7B5B\u9009","smartFilter.go":"\u6267\u884C","smartFilter.visibleFilters":"\u53EF\u89C1\u7B5B\u9009\u9879","smartFilter.searchPlaceholder":"\u641C\u7D22...","smartFilter.noOptionsFound":"\u672A\u627E\u5230\u9009\u9879","smartFilter.min":"\u6700\u5C0F\u503C","smartFilter.max":"\u6700\u5927\u503C","smartFilter.minMaxPlaceholder":"\u6700\u5C0F\u503C - \u6700\u5927\u503C","smartFilter.operator.equals":"\u7B49\u4E8E","smartFilter.operator.contains":"\u5305\u542B","smartFilter.operator.notContains":"\u4E0D\u5305\u542B","smartFilter.operator.wildcard":"\u901A\u914D\u7B26\u641C\u7D22","smartFilter.operator.notEquals":"\u4E0D\u7B49\u4E8E","smartFilter.operator.greaterThan":"\u5927\u4E8E","smartFilter.operator.lessThan":"\u5C0F\u4E8E","smartFilter.operator.greaterOrEqual":"\u5927\u4E8E\u7B49\u4E8E","smartFilter.operator.lessOrEqual":"\u5C0F\u4E8E\u7B49\u4E8E","smartFilter.operator.between":"\u533A\u95F4","variant.noOptions":"\u65E0\u9009\u9879","variant.defaultSuffix":"\u9ED8\u8BA4","variant.selectVariant":"\u9009\u62E9\u89C6\u56FE","variant.saveView":"\u4FDD\u5B58\u89C6\u56FE","variant.newVariant":"\u65B0\u89C6\u56FE","variant.viewName":"\u89C6\u56FE\u540D\u79F0","variant.setDefault":"\u8BBE\u4E3A\u9ED8\u8BA4","variant.publicAllUsers":"\u516C\u5F00\uFF08\u6240\u6709\u7528\u6237\uFF09","variant.toast.fetchFailed":"\u52A0\u8F7D\u89C6\u56FE\u5931\u8D25","variant.toast.saveFailed":"\u4FDD\u5B58\u89C6\u56FE\u5931\u8D25","variant.toast.saveSuccess":"\u89C6\u56FE\u4FDD\u5B58\u6210\u529F","variant.toast.deleteFailed":"\u5220\u9664\u89C6\u56FE\u5931\u8D25","variant.toast.deleteSuccess":"\u89C6\u56FE\u5220\u9664\u6210\u529F","variant.toast.defaultFailed":"\u66F4\u65B0\u9ED8\u8BA4\u89C6\u56FE\u5931\u8D25","variant.toast.defaultSuccess":"\u9ED8\u8BA4\u89C6\u56FE\u5DF2\u66F4\u65B0","layout.saveLayout":"\u4FDD\u5B58\u5E03\u5C40","layout.layoutOptions":"\u5E03\u5C40\u9009\u9879","layout.selectLayout":"\u9009\u62E9\u5E03\u5C40","layout.saveCurrentLayout":"\u4FDD\u5B58\u5F53\u524D\u5E03\u5C40...","layout.noSavedLayouts":"\u6682\u65E0\u5DF2\u4FDD\u5B58\u5E03\u5C40","layout.removeDefault":"\u53D6\u6D88\u9ED8\u8BA4","layout.setAsDefault":"\u8BBE\u4E3A\u9ED8\u8BA4","layout.layoutName":"\u5E03\u5C40\u540D\u79F0","layout.layoutDescription":"\u63CF\u8FF0","layout.layoutNameHelper":"\u4F8B\u5982\uFF1A\u7D27\u51D1\u89C6\u56FE","layout.warningOverwrite":"\u8B66\u544A\uFF1A\u5C06\u8986\u76D6\u540C\u540D\u5E03\u5C40","layout.useAsDefault":"\u7528\u4F5C\u9ED8\u8BA4\u5E03\u5C40","layout.publicAllUsers":"\u516C\u5F00\uFF08\u6240\u6709\u7528\u6237\u53EF\u89C1\uFF09","layout.toast.loadFallback":"\u540E\u7AEF\u52A0\u8F7D\u5E03\u5C40\u5931\u8D25\uFF0C\u5DF2\u56DE\u9000\u5230\u672C\u5730\u5B58\u50A8","layout.toast.saveSuccess":"\u5E03\u5C40\u4FDD\u5B58\u6210\u529F","layout.toast.saveLocalSuccess":"\u5E03\u5C40\u5DF2\u4FDD\u5B58\u5230\u672C\u5730\u5B58\u50A8","layout.toast.backendUnavailableSavedLocal":"\u540E\u7AEF\u4E0D\u53EF\u7528\uFF0C\u5DF2\u4FDD\u5B58\u5230\u672C\u5730\u5B58\u50A8","layout.toast.deleteSuccess":"\u5E03\u5C40\u5220\u9664\u6210\u529F","layout.toast.deleteLocalSuccess":"\u5E03\u5C40\u5DF2\u4ECE\u672C\u5730\u5B58\u50A8\u5220\u9664","layout.toast.backendUnavailableDeletedLocal":"\u540E\u7AEF\u4E0D\u53EF\u7528\uFF0C\u5DF2\u4ECE\u672C\u5730\u5B58\u50A8\u5220\u9664","layout.toast.defaultSuccess":"\u9ED8\u8BA4\u5E03\u5C40\u5DF2\u8BBE\u7F6E","layout.toast.defaultLocalSuccess":"\u9ED8\u8BA4\u5E03\u5C40\u5DF2\u5728\u672C\u5730\u5B58\u50A8\u8BBE\u7F6E","layout.toast.backendUnavailableDefaultLocal":"\u540E\u7AEF\u4E0D\u53EF\u7528\uFF0C\u9ED8\u8BA4\u5E03\u5C40\u5DF2\u4FDD\u5B58\u5230\u672C\u5730\u5B58\u50A8","dateRange.label":"\u65E5\u671F\u8303\u56F4","dateRange.startDate":"\u5F00\u59CB\u65E5\u671F","dateRange.endDate":"\u7ED3\u675F\u65E5\u671F","dateRange.select":"\u8BF7\u9009\u62E9...","dateRange.today":"\u4ECA\u5929","dateRange.thisWeek":"\u672C\u5468","dateRange.thisMonth":"\u672C\u6708","graph.records":"{count} \u6761\u8BB0\u5F55","graph.kpi.totalRecords":"\u603B\u8BB0\u5F55\u6570","graph.kpi.totalReport":"\u603B\u7533\u62A5\u5DE5\u65F6","graph.kpi.totalBillable":"\u603B\u53EF\u8BA1\u8D39\u5DE5\u65F6","graph.kpi.efficiency":"\u6548\u7387","graph.kpi.amount":"\u91D1\u989D","graph.kpi.flagged":"\u6807\u8BB0","graph.chart.billable.title":"\u7EF4\u5EA6\u8BA1\u8D39\u5DE5\u65F6","graph.chart.billable.subtitle":"\u6309\u53EF\u8BA1\u8D39\u5DE5\u65F6\u6392\u5E8F\u524D\u5217","graph.chart.efficiency.title":"\u4EBA\u5458\u6548\u7387","graph.chart.efficiency.subtitle":"\u6309\u6700\u4F4E\u6548\u7387\u4F18\u5148","graph.chart.status.title":"\u72B6\u6001\u5206\u5E03","graph.chart.status.subtitle":"\u6309\u72B6\u6001\u8BB0\u5F55\u5360\u6BD4","graph.dataBody":"\u6570\u636E\u660E\u7EC6","graph.reportTitle":"\u56FE\u8868\u62A5\u8868","graph.unassigned":"\u672A\u5206\u914D","graph.column.reportHours":"\u7533\u62A5\u5DE5\u65F6","graph.column.billableHours":"\u53EF\u8BA1\u8D39\u5DE5\u65F6","detail.searchAi.placeholder":"\u641C\u7D22\u5B57\u6BB5\uFF1B\u5982\u65E0\u7ED3\u679C\u5219\u81EA\u52A8\u89E6\u53D1 AI...","detail.searchAi.matches":"{count} \u6761\u5339\u914D\u7ED3\u679C","detail.searchAi.noMatch":"\u672A\u627E\u5230\u5339\u914D\u5B57\u6BB5\u3002","detail.searchAi.autoAiFallback":"\u672A\u547D\u4E2D\u5B57\u6BB5\uFF0C\u6B63\u5728\u89E6\u53D1 AI \u5206\u6790...","detail.searchAi.aiResultTitle":"AI \u5206\u6790\u7ED3\u679C","detail.table.title":"\u5173\u8054\u8BB0\u5F55","kanban.empty":"\u5C06\u5361\u7247\u62D6\u5230\u8FD9\u91CC","kanban.bucket.limit":"\u4E0A\u9650","kanban.bucket.dropHere":"\u91CA\u653E\u540E\u79FB\u52A8\u5230\u8BE5 bucket","kanban.bucket.add":"\u65B0\u589E bucket","kanban.bucket.rename":"\u91CD\u547D\u540D bucket","kanban.bucket.saveRename":"\u4FDD\u5B58 bucket \u540D\u79F0","kanban.bucket.cancelRename":"\u53D6\u6D88\u91CD\u547D\u540D","kanban.search.placeholder":"\u641C\u7D22\u5361\u7247\u548C bucket","kanban.search.clear":"\u6E05\u9664\u641C\u7D22","kanban.search.results":"{count} \u5F20\u5339\u914D\u5361\u7247","kanban.search.noMatch":"\u6CA1\u6709\u5339\u914D\u7684\u5361\u7247","kanban.card.progress":"\u8FDB\u5EA6","kanban.card.openDetail":"\u6253\u5F00\u8BE6\u60C5","kanban.priority.critical":"\u7D27\u6025","kanban.priority.high":"\u9AD8","kanban.priority.medium":"\u4E2D","kanban.priority.low":"\u4F4E","quickCreate.newItem":"\u65B0\u5EFA\u6761\u76EE","quickCreate.createWithTitle":"\u521B\u5EFA{title}","quickEdit.editWithTitle":"\u7F16\u8F91{title}","quickDelete.confirmTitle":"\u786E\u8BA4\u5220\u9664","quickDelete.confirmMessageSingle":"\u786E\u8BA4\u5220\u9664\u5F53\u524D\u9009\u4E2D\u8BB0\u5F55\u5417\uFF1F","quickDelete.confirmMessageMultiple":"\u786E\u8BA4\u5220\u9664\u5DF2\u9009\u4E2D\u7684 {count} \u6761\u8BB0\u5F55\u5417\uFF1F","cardPage.viewDetails":"\u67E5\u770B\u8BE6\u60C5","cardPage.download":"\u4E0B\u8F7D","cardPage.close":"\u5173\u95ED","cardPage.empty":"\u672A\u627E\u5230\u6761\u76EE","messageBox.confirm":"\u786E\u5B9A","messageBox.cancel":"\u53D6\u6D88"},pb={"common.cancel":"Annuler","common.save":"Enregistrer","common.ok":"OK","common.done":"Terminer","common.search":"Rechercher","common.none":"Aucun","common.all":"Tout","common.noData":"Aucune donn\xE9e","common.copy":"Copier","common.delete":"Supprimer","common.loading":"Chargement...","header.searchPlaceholder":"Demandez-moi...","header.searchAddFeature":"Ajouter une fonction","header.searchStartVoice":"D\xE9marrer la saisie vocale","header.searchStopVoice":"Arr\xEAter la saisie vocale","header.searchOpenPanel":"Ouvrir la conversation","header.theme.system":"Th\xE8me : Syst\xE8me","header.theme.dark":"Th\xE8me : Sombre","header.theme.light":"Th\xE8me : Clair","header.menu.setting":"Param\xE8tres","header.menu.refresh":"Actualiser","header.menu.logout":"Se d\xE9connecter","navigation.expand":"D\xE9velopper la navigation","navigation.collapse":"R\xE9duire la navigation","navigation.searchPlaceholder":"Rechercher dans le menu...","navigation.noMatch":"Aucun \xE9l\xE9ment correspondant","navigation.noAccessibleApp":"Aucune application accessible","navigation.noItems":"Aucun \xE9l\xE9ment \xE0 afficher","navigation.expandView":"D\xE9velopper {title}","navigation.mode.switchToFixed":"Basculer vers la navigation fixe","navigation.mode.switchToFloating":"Basculer vers la navigation flottante","navigation.pinned":"\xC9pingl\xE9s","navigation.pin.add":"\xC9pingler en haut","navigation.pin.remove":"D\xE9s\xE9pingler","table.toolbar.searchPlaceholder":"Rechercher...","table.title.default":"Tableau de donn\xE9es","table.toolbar.groupBy":"Grouper","table.toolbar.summary":"R\xE9sum\xE9","table.toolbar.columns":"Colonnes","table.toolbar.export":"Exporter","table.toolbar.itemsPerPage":"Lignes par page :","table.toolbar.pageOf":"Page {current} sur {total}","table.toolbar.newItem":"Nouvel \xE9l\xE9ment","table.toolbar.editItem":"Modifier l'\xE9l\xE9ment","table.toolbar.deleteItem":"Supprimer l'\xE9l\xE9ment","table.toolbar.graphicReport":"Rapport graphique","table.toolbar.saveLayout":"Enregistrer la vue","table.menu.groupBy":"Grouper","table.menu.clearAll":"Tout effacer","table.menu.visibleColumns":"Colonnes visibles","table.menu.showSummaryRow":"Afficher la ligne de r\xE9sum\xE9","table.menu.noNumericColumns":"Aucune colonne num\xE9rique","table.group.expandAll":"D\xE9velopper tous les groupes","table.group.collapseAll":"R\xE9duire tous les groupes","table.mobile.notImplemented":"Vue mobile non impl\xE9ment\xE9e","table.headerMenu.sortAsc":"Trier ascendant","table.headerMenu.sortDesc":"Trier descendant","table.headerMenu.clearSort":"Effacer le tri","table.headerMenu.configureSort":"Configurer le tri...","table.headerMenu.group":"Grouper par cette colonne","table.headerMenu.ungroup":"Retirer du groupement","table.headerMenu.addSummary":"Inclure dans le r\xE9sum\xE9","table.headerMenu.removeSummary":"Retirer du r\xE9sum\xE9","table.headerMenu.hideColumn":"Masquer la colonne","table.sortDialog.title":"Param\xE8tres de tri","table.sortDialog.empty":"Aucune r\xE8gle de tri. Ajoutez-en une pour commencer.","table.sortDialog.addRule":"Ajouter une r\xE8gle","table.sortDialog.clearAll":"Tout effacer","table.sortDialog.asc":"Ascendant","table.sortDialog.desc":"Descendant","pivot.title.default":"Tableau crois\xE9 dynamique","pivot.subtitle.default":"Faites glisser les champs pour configurer le tableau crois\xE9.","pivot.empty":"Ajoutez au moins un champ de valeur pour afficher le r\xE9sultat.","pivot.records":"Enregistrements","pivot.afterFilter":"Apr\xE8s filtre","pivot.grandTotal":"Total g\xE9n\xE9ral","pivot.resultLabel":"R\xE9sultat","pivot.valueLabel":"Valeur","pivot.table.dimensions":"Dimensions","pivot.config.title":"Configuration","pivot.fieldList":"Liste des champs","pivot.availableDimensions":"Dimensions disponibles","pivot.allFieldsInUse":"Tous les champs sont d\xE9j\xE0 utilis\xE9s.","pivot.zone.rows":"Lignes","pivot.zone.columns":"Colonnes","pivot.zone.filters":"Filtres","pivot.zone.values":"Valeurs","pivot.hint.rows":"D\xE9posez les champs ici pour construire la hi\xE9rarchie des lignes","pivot.hint.columns":"D\xE9posez les champs ici pour construire la hi\xE9rarchie des colonnes","pivot.hint.filters":"D\xE9posez les champs ici pour les filtres du rapport","pivot.hint.values":"D\xE9posez les champs num\xE9riques ici pour les agr\xE9gations","pivot.clearArea":"Vider la zone","pivot.filter.na":"N/A","pivot.filter.noValues":"Aucune valeur","pivot.filter.noneSelected":"Aucune s\xE9lection","pivot.filter.allValues":"Toutes les valeurs","pivot.filter.selectedCount":"{selected} / {total} s\xE9lectionn\xE9es","pivot.filter.selectAll":"Tout s\xE9lectionner","pivot.filter.deselectAll":"Tout d\xE9s\xE9lectionner","pivot.filter.noResults":"Aucun r\xE9sultat","pivot.collapse.ariaExpand":"D\xE9velopper la zone de configuration","pivot.collapse.ariaCollapse":"R\xE9duire la zone de configuration","pivot.agg.sum":"Somme","pivot.agg.count":"Compte","pivot.agg.avg":"Moyenne","pivot.agg.min":"Min","pivot.agg.max":"Max","pivot.preset.selectPlaceholder":"S\xE9lectionner un preset","pivot.preset.save":"Enregistrer le preset","pivot.preset.delete":"Supprimer le preset","pivot.preset.saveDialogTitle":"Enregistrer le preset actuel","pivot.preset.nameLabel":"Nom du preset","pivot.preset.defaultName":"Preset {index}","pivot.table.sectionTitle":"R\xE9sultat du pivot","pivot.table.expandRowsAll":"Expand rows","pivot.table.collapseRowsAll":"Collapse rows","pivot.table.expandColumnsAll":"Expand columns","pivot.table.collapseColumnsAll":"Collapse columns","pivot.table.collapse.ariaExpand":"D\xE9velopper le r\xE9sultat du pivot","pivot.table.collapse.ariaCollapse":"R\xE9duire le r\xE9sultat du pivot","pivot.chart.title":"Graphique pivot","pivot.chart.subtitle":"Associez une dimension et jusqu\u2019\xE0 deux mesures dans un graphique compact.","pivot.chart.subtitleReady":"{dimension} par {measure}","pivot.chart.emptyNoDimension":"Ajoutez au moins un champ de ligne ou de colonne pour afficher le graphique.","pivot.chart.emptyNoValue":"Ajoutez au moins un champ de valeur pour afficher le graphique.","pivot.chart.emptyNoData":"Aucune donn\xE9e disponible pour la s\xE9lection actuelle du graphique.","pivot.chart.dimension":"Dimension","pivot.chart.primaryMeasure":"Mesure","pivot.chart.secondaryMeasure":"Mesure de comparaison","pivot.chart.chartType":"Type de graphique","pivot.chart.style.barVertical":"Barres verticales","pivot.chart.style.barHorizontal":"Barres horizontales","pivot.chart.style.line":"Ligne","pivot.chart.style.scatter":"Nuage de points","pivot.chart.collapse.ariaExpand":"D\xE9velopper la zone du graphique","pivot.chart.collapse.ariaCollapse":"R\xE9duire la zone du graphique","smartFilter.adaptFilters":"Adapter les filtres","smartFilter.addFilters":"Ajouter des filtres","smartFilter.go":"Ex\xE9cuter","smartFilter.visibleFilters":"Filtres visibles","smartFilter.searchPlaceholder":"Rechercher...","smartFilter.noOptionsFound":"Aucune option trouv\xE9e","smartFilter.min":"Min","smartFilter.max":"Max","smartFilter.minMaxPlaceholder":"Min - Max","smartFilter.operator.equals":"\xC9gal \xE0","smartFilter.operator.contains":"Contient","smartFilter.operator.notContains":"Ne contient pas","smartFilter.operator.wildcard":"Recherche g\xE9n\xE9rique","smartFilter.operator.notEquals":"Diff\xE9rent de","smartFilter.operator.greaterThan":"Sup\xE9rieur \xE0","smartFilter.operator.lessThan":"Inf\xE9rieur \xE0","smartFilter.operator.greaterOrEqual":"Sup\xE9rieur ou \xE9gal","smartFilter.operator.lessOrEqual":"Inf\xE9rieur ou \xE9gal","smartFilter.operator.between":"Entre","variant.noOptions":"Aucune option","variant.defaultSuffix":"Par d\xE9faut","variant.selectVariant":"S\xE9lectionner une vue","variant.saveView":"Enregistrer la vue","variant.newVariant":"Nouvelle vue","variant.viewName":"Nom de la vue","variant.setDefault":"D\xE9finir par d\xE9faut","variant.publicAllUsers":"Public (tous les utilisateurs)","variant.toast.fetchFailed":"\xC9chec du chargement des vues","variant.toast.saveFailed":"\xC9chec de l'enregistrement de la vue","variant.toast.saveSuccess":"Vue enregistr\xE9e avec succ\xE8s","variant.toast.deleteFailed":"\xC9chec de la suppression de la vue","variant.toast.deleteSuccess":"Vue supprim\xE9e avec succ\xE8s","variant.toast.defaultFailed":"\xC9chec de la mise \xE0 jour de la vue par d\xE9faut","variant.toast.defaultSuccess":"Vue par d\xE9faut mise \xE0 jour","layout.saveLayout":"Enregistrer la vue","layout.layoutOptions":"Options de vue","layout.selectLayout":"S\xE9lectionner une vue","layout.saveCurrentLayout":"Enregistrer la vue actuelle...","layout.noSavedLayouts":"Aucune vue enregistr\xE9e","layout.removeDefault":"Retirer le d\xE9faut","layout.setAsDefault":"D\xE9finir par d\xE9faut","layout.layoutName":"Nom de la vue","layout.layoutDescription":"Description","layout.layoutNameHelper":"ex. : Vue compacte","layout.warningOverwrite":"Attention : la vue existante sera \xE9cras\xE9e","layout.useAsDefault":"Utiliser comme vue par d\xE9faut","layout.publicAllUsers":"Public (visible par tous les utilisateurs)","layout.toast.loadFallback":"\xC9chec du chargement depuis le backend, bascule vers le stockage local","layout.toast.saveSuccess":"Vue enregistr\xE9e avec succ\xE8s","layout.toast.saveLocalSuccess":"Vue enregistr\xE9e dans le stockage local","layout.toast.backendUnavailableSavedLocal":"Backend indisponible, enregistr\xE9 en local","layout.toast.deleteSuccess":"Vue supprim\xE9e avec succ\xE8s","layout.toast.deleteLocalSuccess":"Vue supprim\xE9e du stockage local","layout.toast.backendUnavailableDeletedLocal":"Backend indisponible, supprim\xE9 en local","layout.toast.defaultSuccess":"Vue par d\xE9faut d\xE9finie","layout.toast.defaultLocalSuccess":"Vue par d\xE9faut d\xE9finie en local","layout.toast.backendUnavailableDefaultLocal":"Backend indisponible, d\xE9faut enregistr\xE9 en local","dateRange.label":"Plage de dates","dateRange.startDate":"Date de d\xE9but","dateRange.endDate":"Date de fin","dateRange.select":"S\xE9lectionner...","dateRange.today":"Aujourd'hui","dateRange.thisWeek":"Cette semaine","dateRange.thisMonth":"Ce mois-ci","graph.records":"{count} enregistrements","graph.kpi.totalRecords":"Total des enregistrements","graph.kpi.totalReport":"Total d\xE9clar\xE9","graph.kpi.totalBillable":"Total facturable","graph.kpi.efficiency":"Efficacit\xE9","graph.kpi.amount":"Montant","graph.kpi.flagged":"Signal\xE9","graph.chart.billable.title":"Facturable par dimension","graph.chart.billable.subtitle":"Top valeurs par heures facturables","graph.chart.efficiency.title":"Efficacit\xE9 par personne","graph.chart.efficiency.subtitle":"Efficacit\xE9 la plus faible en premier","graph.chart.status.title":"R\xE9partition des statuts","graph.chart.status.subtitle":"Ratio des enregistrements par statut","graph.dataBody":"Donn\xE9es","graph.reportTitle":"Rapport graphique","graph.unassigned":"Non attribu\xE9","graph.column.reportHours":"Heures d\xE9clar\xE9es","graph.column.billableHours":"Heures facturables","detail.searchAi.placeholder":"Rechercher des champs, ou interroger l\u2019IA en cas d\u2019absence de r\xE9sultat...","detail.searchAi.matches":"{count} correspondances trouv\xE9es","detail.searchAi.noMatch":"Aucun champ correspondant trouv\xE9.","detail.searchAi.autoAiFallback":"Aucune correspondance directe. Analyse IA en cours...","detail.searchAi.aiResultTitle":"Analyse IA","detail.table.title":"Enregistrements li\xE9s","kanban.empty":"D\xE9posez les cartes ici","kanban.bucket.limit":"Limite","kanban.bucket.dropHere":"Rel\xE2chez pour d\xE9placer dans cette colonne","kanban.bucket.add":"Ajouter une colonne","kanban.bucket.rename":"Renommer la colonne","kanban.bucket.saveRename":"Enregistrer le nom","kanban.bucket.cancelRename":"Annuler le renommage","kanban.search.placeholder":"Rechercher des cartes et colonnes","kanban.search.clear":"Effacer la recherche","kanban.search.results":"{count} cartes correspondantes","kanban.search.noMatch":"Aucune carte correspondante","kanban.card.progress":"Progression","kanban.card.openDetail":"Ouvrir le d\xE9tail","kanban.priority.critical":"Critique","kanban.priority.high":"\xC9lev\xE9e","kanban.priority.medium":"Moyenne","kanban.priority.low":"Faible","quickCreate.newItem":"Nouvel \xE9l\xE9ment","quickCreate.createWithTitle":"Cr\xE9er {title}","quickEdit.editWithTitle":"Modifier {title}","quickDelete.confirmTitle":"Confirmer la suppression","quickDelete.confirmMessageSingle":"Voulez-vous vraiment supprimer l\u2019enregistrement s\xE9lectionn\xE9 ?","quickDelete.confirmMessageMultiple":"Voulez-vous vraiment supprimer les {count} enregistrements s\xE9lectionn\xE9s ?","cardPage.viewDetails":"Voir les d\xE9tails","cardPage.download":"T\xE9l\xE9charger","cardPage.close":"Fermer","cardPage.empty":"Aucun \xE9l\xE9ment trouv\xE9","messageBox.confirm":"OK","messageBox.cancel":"Annuler"},ub={"common.cancel":"Abbrechen","common.save":"Speichern","common.ok":"OK","common.done":"Fertig","common.search":"Suchen","common.none":"Keine","common.all":"Alle","common.noData":"Keine Daten","common.copy":"Kopieren","common.delete":"L\xF6schen","common.loading":"Wird geladen...","header.searchPlaceholder":"Frag mich...","header.searchAddFeature":"Funktion hinzuf\xFCgen","header.searchStartVoice":"Spracheingabe starten","header.searchStopVoice":"Spracheingabe stoppen","header.searchOpenPanel":"Unterhaltung \xF6ffnen","header.theme.system":"Theme: System","header.theme.dark":"Theme: Dunkel","header.theme.light":"Theme: Hell","header.menu.setting":"Einstellungen","header.menu.refresh":"Aktualisieren","header.menu.logout":"Abmelden","navigation.expand":"Navigation erweitern","navigation.collapse":"Navigation einklappen","navigation.searchPlaceholder":"Men\xFC suchen...","navigation.noMatch":"Keine passenden Men\xFCeintr\xE4ge","navigation.noAccessibleApp":"Keine verf\xFCgbaren Anwendungen","navigation.noItems":"Keine Eintr\xE4ge vorhanden","navigation.expandView":"{title} aufklappen","navigation.mode.switchToFixed":"Zu fester Navigation wechseln","navigation.mode.switchToFloating":"Zu schwebender Navigation wechseln","navigation.pinned":"Angeheftet","navigation.pin.add":"Oben anheften","navigation.pin.remove":"L\xF6sen","table.toolbar.searchPlaceholder":"Suchen...","table.title.default":"Datentabelle","table.toolbar.groupBy":"Gruppieren","table.toolbar.summary":"Zusammenfassung","table.toolbar.columns":"Spalten","table.toolbar.export":"Export","table.toolbar.itemsPerPage":"Zeilen pro Seite:","table.toolbar.pageOf":"Seite {current} von {total}","table.toolbar.newItem":"Neuer Eintrag","table.toolbar.editItem":"Eintrag bearbeiten","table.toolbar.deleteItem":"Eintrag l\xF6schen","table.toolbar.graphicReport":"Grafikbericht","table.toolbar.saveLayout":"Layout speichern","table.menu.groupBy":"Gruppieren","table.menu.clearAll":"Alles l\xF6schen","table.menu.visibleColumns":"Sichtbare Spalten","table.menu.showSummaryRow":"Summenzeile anzeigen","table.menu.noNumericColumns":"Keine numerischen Spalten","table.group.expandAll":"Alle Gruppen aufklappen","table.group.collapseAll":"Alle Gruppen zuklappen","table.mobile.notImplemented":"Mobile Ansicht nicht implementiert","table.headerMenu.sortAsc":"Aufsteigend sortieren","table.headerMenu.sortDesc":"Absteigend sortieren","table.headerMenu.clearSort":"Sortierung entfernen","table.headerMenu.configureSort":"Sortierung konfigurieren...","table.headerMenu.group":"Nach dieser Spalte gruppieren","table.headerMenu.ungroup":"Aus Gruppierung entfernen","table.headerMenu.addSummary":"In Summe einbeziehen","table.headerMenu.removeSummary":"Aus Summe entfernen","table.headerMenu.hideColumn":"Spalte ausblenden","table.sortDialog.title":"Sortiereinstellungen","table.sortDialog.empty":"Keine Sortierregeln. F\xFCgen Sie eine hinzu, um zu sortieren.","table.sortDialog.addRule":"Regel hinzuf\xFCgen","table.sortDialog.clearAll":"Alle l\xF6schen","table.sortDialog.asc":"Aufsteigend","table.sortDialog.desc":"Absteigend","pivot.title.default":"Pivot-Tabelle","pivot.subtitle.default":"Ziehen Sie Felder, um die Pivot-Tabelle zu konfigurieren.","pivot.empty":"Ziehen Sie mindestens ein Wertefeld, um das Ergebnis anzuzeigen.","pivot.records":"Datens\xE4tze","pivot.afterFilter":"Nach Filter","pivot.grandTotal":"Gesamtsumme","pivot.resultLabel":"Ergebnis","pivot.valueLabel":"Wert","pivot.table.dimensions":"Dimensionen","pivot.config.title":"Konfiguration","pivot.fieldList":"Feldliste","pivot.availableDimensions":"Verf\xFCgbare Dimensionen","pivot.allFieldsInUse":"Alle Felder sind bereits verwendet.","pivot.zone.rows":"Zeilen","pivot.zone.columns":"Spalten","pivot.zone.filters":"Filter","pivot.zone.values":"Werte","pivot.hint.rows":"Felder hierhin ziehen, um die Zeilenhierarchie zu erstellen","pivot.hint.columns":"Felder hierhin ziehen, um die Spaltenhierarchie zu erstellen","pivot.hint.filters":"Felder hierhin ziehen f\xFCr Berichtsfilter","pivot.hint.values":"Numerische Felder hierhin ziehen f\xFCr Aggregation","pivot.clearArea":"Bereich leeren","pivot.filter.na":"N/V","pivot.filter.noValues":"Keine Werte","pivot.filter.noneSelected":"Nichts ausgew\xE4hlt","pivot.filter.allValues":"Alle Werte","pivot.filter.selectedCount":"{selected} / {total} ausgew\xE4hlt","pivot.filter.selectAll":"Alle ausw\xE4hlen","pivot.filter.deselectAll":"Alle abw\xE4hlen","pivot.filter.noResults":"Keine Ergebnisse","pivot.collapse.ariaExpand":"Konfigurationsbereich erweitern","pivot.collapse.ariaCollapse":"Konfigurationsbereich reduzieren","pivot.agg.sum":"Summe","pivot.agg.count":"Anzahl","pivot.agg.avg":"Durchschnitt","pivot.agg.min":"Min","pivot.agg.max":"Max","pivot.preset.selectPlaceholder":"Preset w\xE4hlen","pivot.preset.save":"Preset speichern","pivot.preset.delete":"Preset l\xF6schen","pivot.preset.saveDialogTitle":"Aktuelles Preset speichern","pivot.preset.nameLabel":"Preset-Name","pivot.preset.defaultName":"Preset {index}","pivot.table.sectionTitle":"Pivot-Ergebnis","pivot.table.expandRowsAll":"Expand rows","pivot.table.collapseRowsAll":"Collapse rows","pivot.table.expandColumnsAll":"Expand columns","pivot.table.collapseColumnsAll":"Collapse columns","pivot.table.collapse.ariaExpand":"Pivot-Ergebnis erweitern","pivot.table.collapse.ariaCollapse":"Pivot-Ergebnis reduzieren","pivot.chart.title":"Pivot-Diagramm","pivot.chart.subtitle":"Eine Dimension und bis zu zwei Kennzahlen in einem kompakten Diagramm abbilden.","pivot.chart.subtitleReady":"{dimension} nach {measure}","pivot.chart.emptyNoDimension":"F\xFCgen Sie mindestens ein Zeilen- oder Spaltenfeld hinzu, um das Diagramm anzuzeigen.","pivot.chart.emptyNoValue":"F\xFCgen Sie mindestens ein Wertefeld hinzu, um das Diagramm anzuzeigen.","pivot.chart.emptyNoData":"F\xFCr die aktuelle Diagrammauswahl sind keine Daten verf\xFCgbar.","pivot.chart.dimension":"Dimension","pivot.chart.primaryMeasure":"Kennzahl","pivot.chart.secondaryMeasure":"Vergleichskennzahl","pivot.chart.chartType":"Diagrammtyp","pivot.chart.style.barVertical":"Vertikale Balken","pivot.chart.style.barHorizontal":"Horizontale Balken","pivot.chart.style.line":"Linie","pivot.chart.style.scatter":"Streudiagramm","pivot.chart.collapse.ariaExpand":"Diagrammbereich erweitern","pivot.chart.collapse.ariaCollapse":"Diagrammbereich reduzieren","smartFilter.adaptFilters":"Filter anpassen","smartFilter.addFilters":"Filter hinzuf\xFCgen","smartFilter.go":"Los","smartFilter.visibleFilters":"Sichtbare Filter","smartFilter.searchPlaceholder":"Suchen...","smartFilter.noOptionsFound":"Keine Optionen gefunden","smartFilter.min":"Min","smartFilter.max":"Max","smartFilter.minMaxPlaceholder":"Min - Max","smartFilter.operator.equals":"Gleich","smartFilter.operator.contains":"Enth\xE4lt","smartFilter.operator.notContains":"Enth\xE4lt nicht","smartFilter.operator.wildcard":"Wildcard-Suche","smartFilter.operator.notEquals":"Ungleich","smartFilter.operator.greaterThan":"Gr\xF6\xDFer als","smartFilter.operator.lessThan":"Kleiner als","smartFilter.operator.greaterOrEqual":"Gr\xF6\xDFer gleich","smartFilter.operator.lessOrEqual":"Kleiner gleich","smartFilter.operator.between":"Zwischen","variant.noOptions":"Keine Optionen","variant.defaultSuffix":"Standard","variant.selectVariant":"Variante w\xE4hlen","variant.saveView":"Ansicht speichern","variant.newVariant":"Neue Variante","variant.viewName":"Ansichtsname","variant.setDefault":"Als Standard setzen","variant.publicAllUsers":"\xD6ffentlich (alle Benutzer)","variant.toast.fetchFailed":"Varianten konnten nicht geladen werden","variant.toast.saveFailed":"Variante konnte nicht gespeichert werden","variant.toast.saveSuccess":"Variante erfolgreich gespeichert","variant.toast.deleteFailed":"Variante konnte nicht gel\xF6scht werden","variant.toast.deleteSuccess":"Variante erfolgreich gel\xF6scht","variant.toast.defaultFailed":"Standardvariante konnte nicht aktualisiert werden","variant.toast.defaultSuccess":"Standardvariante aktualisiert","layout.saveLayout":"Layout speichern","layout.layoutOptions":"Layout-Optionen","layout.selectLayout":"Layout w\xE4hlen","layout.saveCurrentLayout":"Aktuelles Layout speichern...","layout.noSavedLayouts":"Keine gespeicherten Layouts","layout.removeDefault":"Standard entfernen","layout.setAsDefault":"Als Standard setzen","layout.layoutName":"Layoutname","layout.layoutDescription":"Beschreibung","layout.layoutNameHelper":"z. B. Kompaktansicht","layout.warningOverwrite":"Warnung: Vorhandenes Layout wird \xFCberschrieben","layout.useAsDefault":"Als Standardlayout verwenden","layout.publicAllUsers":"\xD6ffentlich (f\xFCr alle sichtbar)","layout.toast.loadFallback":"Layouts konnten nicht vom Backend geladen werden, Wechsel zu lokalem Speicher","layout.toast.saveSuccess":"Layout erfolgreich gespeichert","layout.toast.saveLocalSuccess":"Layout im lokalen Speicher gespeichert","layout.toast.backendUnavailableSavedLocal":"Backend nicht verf\xFCgbar, lokal gespeichert","layout.toast.deleteSuccess":"Layout erfolgreich gel\xF6scht","layout.toast.deleteLocalSuccess":"Layout aus lokalem Speicher gel\xF6scht","layout.toast.backendUnavailableDeletedLocal":"Backend nicht verf\xFCgbar, lokal gel\xF6scht","layout.toast.defaultSuccess":"Standardlayout gesetzt","layout.toast.defaultLocalSuccess":"Standardlayout lokal gesetzt","layout.toast.backendUnavailableDefaultLocal":"Backend nicht verf\xFCgbar, Standard lokal gespeichert","dateRange.label":"Datumsbereich","dateRange.startDate":"Startdatum","dateRange.endDate":"Enddatum","dateRange.select":"Ausw\xE4hlen...","dateRange.today":"Heute","dateRange.thisWeek":"Diese Woche","dateRange.thisMonth":"Diesen Monat","graph.records":"{count} Datens\xE4tze","graph.kpi.totalRecords":"Gesamt Datens\xE4tze","graph.kpi.totalReport":"Gesamt Report","graph.kpi.totalBillable":"Gesamt abrechenbar","graph.kpi.efficiency":"Effizienz","graph.kpi.amount":"Betrag","graph.kpi.flagged":"Markiert","graph.chart.billable.title":"Abrechenbar nach Dimension","graph.chart.billable.subtitle":"Top-Werte nach abrechenbaren Stunden","graph.chart.efficiency.title":"Effizienz pro Person","graph.chart.efficiency.subtitle":"Niedrigste Effizienz zuerst","graph.chart.status.title":"Statusverteilung","graph.chart.status.subtitle":"Anteil je Status","graph.dataBody":"Datentabelle","graph.reportTitle":"Grafikbericht","graph.unassigned":"Nicht zugewiesen","graph.column.reportHours":"Melde-Stunden","graph.column.billableHours":"Abrechenbare Stunden","detail.searchAi.placeholder":"Felder suchen, oder bei keinem Treffer die KI fragen...","detail.searchAi.matches":"{count} Treffer gefunden","detail.searchAi.noMatch":"Kein passendes Feld gefunden.","detail.searchAi.autoAiFallback":"Keine direkte \xDCbereinstimmung. KI-Analyse wird gestartet...","detail.searchAi.aiResultTitle":"KI-Ergebnis","detail.table.title":"Verkn\xFCpfte Eintr\xE4ge","kanban.empty":"Karten hier ablegen","kanban.bucket.limit":"Limit","kanban.bucket.dropHere":"Loslassen, um in diese Spalte zu verschieben","kanban.bucket.add":"Spalte hinzuf\xFCgen","kanban.bucket.rename":"Spalte umbenennen","kanban.bucket.saveRename":"Spaltennamen speichern","kanban.bucket.cancelRename":"Umbenennen abbrechen","kanban.search.placeholder":"Karten und Spalten durchsuchen","kanban.search.clear":"Suche l\xF6schen","kanban.search.results":"{count} passende Karten","kanban.search.noMatch":"Keine passenden Karten","kanban.card.progress":"Fortschritt","kanban.card.openDetail":"Detail \xF6ffnen","kanban.priority.critical":"Kritisch","kanban.priority.high":"Hoch","kanban.priority.medium":"Mittel","kanban.priority.low":"Niedrig","quickCreate.newItem":"Neuer Eintrag","quickCreate.createWithTitle":"{title} erstellen","quickEdit.editWithTitle":"{title} bearbeiten","quickDelete.confirmTitle":"L\xF6schen best\xE4tigen","quickDelete.confirmMessageSingle":"M\xF6chten Sie den ausgew\xE4hlten Datensatz wirklich l\xF6schen?","quickDelete.confirmMessageMultiple":"M\xF6chten Sie die {count} ausgew\xE4hlten Datens\xE4tze wirklich l\xF6schen?","cardPage.viewDetails":"Details anzeigen","cardPage.download":"Herunterladen","cardPage.close":"Schlie\xDFen","cardPage.empty":"Keine Eintr\xE4ge gefunden","messageBox.confirm":"OK","messageBox.cancel":"Abbrechen"},mb={"common.cancel":"\u30AD\u30E3\u30F3\u30BB\u30EB","common.save":"\u4FDD\u5B58","common.ok":"OK","common.done":"\u5B8C\u4E86","common.search":"\u691C\u7D22","common.none":"\u306A\u3057","common.all":"\u3059\u3079\u3066","common.noData":"\u30C7\u30FC\u30BF\u306A\u3057","common.copy":"\u30B3\u30D4\u30FC","common.delete":"\u524A\u9664","common.loading":"\u8AAD\u307F\u8FBC\u307F\u4E2D...","header.searchPlaceholder":"\u4F55\u304B\u805E\u3044\u3066\u304F\u3060\u3055\u3044...","header.searchAddFeature":"\u6A5F\u80FD\u3092\u8FFD\u52A0","header.searchStartVoice":"\u97F3\u58F0\u5165\u529B\u3092\u958B\u59CB","header.searchStopVoice":"\u97F3\u58F0\u5165\u529B\u3092\u505C\u6B62","header.searchOpenPanel":"\u4F1A\u8A71\u3092\u958B\u304F","header.theme.system":"\u30C6\u30FC\u30DE\uFF1A\u30B7\u30B9\u30C6\u30E0","header.theme.dark":"\u30C6\u30FC\u30DE\uFF1A\u30C0\u30FC\u30AF","header.theme.light":"\u30C6\u30FC\u30DE\uFF1A\u30E9\u30A4\u30C8","header.menu.setting":"\u8A2D\u5B9A","header.menu.refresh":"\u518D\u8AAD\u307F\u8FBC\u307F","header.menu.logout":"\u30ED\u30B0\u30A2\u30A6\u30C8","navigation.expand":"\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u3092\u5C55\u958B","navigation.collapse":"\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u3092\u6298\u308A\u305F\u305F\u3080","navigation.searchPlaceholder":"\u30E1\u30CB\u30E5\u30FC\u3092\u691C\u7D22...","navigation.noMatch":"\u4E00\u81F4\u3059\u308B\u30E1\u30CB\u30E5\u30FC\u304C\u3042\u308A\u307E\u305B\u3093","navigation.noAccessibleApp":"\u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u306A\u30A2\u30D7\u30EA\u304C\u3042\u308A\u307E\u305B\u3093","navigation.noItems":"\u8868\u793A\u3067\u304D\u308B\u9805\u76EE\u304C\u3042\u308A\u307E\u305B\u3093","navigation.expandView":"{title} \u3092\u5C55\u958B","navigation.mode.switchToFixed":"\u56FA\u5B9A\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u306B\u5207\u308A\u66FF\u3048","navigation.mode.switchToFloating":"\u30D5\u30ED\u30FC\u30C6\u30A3\u30F3\u30B0\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u306B\u5207\u308A\u66FF\u3048","navigation.pinned":"\u30D4\u30F3\u7559\u3081","navigation.pin.add":"\u4E0A\u90E8\u306B\u30D4\u30F3\u7559\u3081","navigation.pin.remove":"\u30D4\u30F3\u7559\u3081\u3092\u89E3\u9664","table.toolbar.searchPlaceholder":"\u691C\u7D22...","table.title.default":"\u30C7\u30FC\u30BF\u30C6\u30FC\u30D6\u30EB","table.toolbar.groupBy":"\u30B0\u30EB\u30FC\u30D7\u5316","table.toolbar.summary":"\u96C6\u8A08","table.toolbar.columns":"\u5217","table.toolbar.export":"\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8","table.toolbar.itemsPerPage":"1\u30DA\u30FC\u30B8\u306E\u4EF6\u6570\uFF1A","table.toolbar.pageOf":"{current} / {total} \u30DA\u30FC\u30B8","table.toolbar.newItem":"\u65B0\u898F\u4F5C\u6210","table.toolbar.editItem":"\u7DE8\u96C6","table.toolbar.deleteItem":"\u524A\u9664","table.toolbar.graphicReport":"\u30B0\u30E9\u30D5\u30A3\u30C3\u30AF\u30EC\u30DD\u30FC\u30C8","table.toolbar.saveLayout":"\u30EC\u30A4\u30A2\u30A6\u30C8\u4FDD\u5B58","table.menu.groupBy":"\u30B0\u30EB\u30FC\u30D7\u5316","table.menu.clearAll":"\u3059\u3079\u3066\u30AF\u30EA\u30A2","table.menu.visibleColumns":"\u8868\u793A\u5217","table.menu.showSummaryRow":"\u96C6\u8A08\u884C\u3092\u8868\u793A","table.menu.noNumericColumns":"\u6570\u5024\u5217\u304C\u3042\u308A\u307E\u305B\u3093","table.group.expandAll":"\u3059\u3079\u3066\u306E\u30B0\u30EB\u30FC\u30D7\u3092\u5C55\u958B","table.group.collapseAll":"\u3059\u3079\u3066\u306E\u30B0\u30EB\u30FC\u30D7\u3092\u6298\u308A\u305F\u305F\u3080","table.mobile.notImplemented":"\u30E2\u30D0\u30A4\u30EB\u8868\u793A\u306F\u672A\u5B9F\u88C5\u3067\u3059","table.headerMenu.sortAsc":"\u6607\u9806\u3067\u4E26\u3079\u66FF\u3048","table.headerMenu.sortDesc":"\u964D\u9806\u3067\u4E26\u3079\u66FF\u3048","table.headerMenu.clearSort":"\u4E26\u3079\u66FF\u3048\u3092\u89E3\u9664","table.headerMenu.configureSort":"\u4E26\u3079\u66FF\u3048\u3092\u8A2D\u5B9A...","table.headerMenu.group":"\u3053\u306E\u5217\u3067\u30B0\u30EB\u30FC\u30D7\u5316","table.headerMenu.ungroup":"\u30B0\u30EB\u30FC\u30D7\u304B\u3089\u5916\u3059","table.headerMenu.addSummary":"\u96C6\u8A08\u306B\u8FFD\u52A0","table.headerMenu.removeSummary":"\u96C6\u8A08\u304B\u3089\u524A\u9664","table.headerMenu.hideColumn":"\u5217\u3092\u975E\u8868\u793A","table.sortDialog.title":"\u4E26\u3079\u66FF\u3048\u8A2D\u5B9A","table.sortDialog.empty":"\u4E26\u3079\u66FF\u3048\u30EB\u30FC\u30EB\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002","table.sortDialog.addRule":"\u30EB\u30FC\u30EB\u3092\u8FFD\u52A0","table.sortDialog.clearAll":"\u3059\u3079\u3066\u30AF\u30EA\u30A2","table.sortDialog.asc":"\u6607\u9806","table.sortDialog.desc":"\u964D\u9806","pivot.title.default":"\u30D4\u30DC\u30C3\u30C8\u30C6\u30FC\u30D6\u30EB","pivot.subtitle.default":"\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u30D4\u30DC\u30C3\u30C8\u30C6\u30FC\u30D6\u30EB\u3092\u8A2D\u5B9A\u3057\u307E\u3059\u3002","pivot.empty":"\u7D50\u679C\u3092\u8868\u793A\u3059\u308B\u306B\u306F\u3001\u5024\u30A8\u30EA\u30A2\u306B\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002","pivot.records":"\u30EC\u30B3\u30FC\u30C9","pivot.afterFilter":"\u30D5\u30A3\u30EB\u30BF\u30FC\u5F8C","pivot.grandTotal":"\u7DCF\u8A08","pivot.resultLabel":"\u7D50\u679C","pivot.valueLabel":"\u5024","pivot.table.dimensions":"\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3","pivot.config.title":"\u8A2D\u5B9A","pivot.fieldList":"\u30D5\u30A3\u30FC\u30EB\u30C9\u4E00\u89A7","pivot.availableDimensions":"\u5229\u7528\u53EF\u80FD\u306A\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3","pivot.allFieldsInUse":"\u3059\u3079\u3066\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u304C\u4F7F\u7528\u4E2D\u3067\u3059\u3002","pivot.zone.rows":"\u884C","pivot.zone.columns":"\u5217","pivot.zone.filters":"\u30D5\u30A3\u30EB\u30BF\u30FC","pivot.zone.values":"\u5024","pivot.hint.rows":"\u3053\u3053\u306B\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u884C\u968E\u5C64\u3092\u4F5C\u6210","pivot.hint.columns":"\u3053\u3053\u306B\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u5217\u968E\u5C64\u3092\u4F5C\u6210","pivot.hint.filters":"\u3053\u3053\u306B\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u30EC\u30DD\u30FC\u30C8\u30D5\u30A3\u30EB\u30BF\u30FC\u3092\u8A2D\u5B9A","pivot.hint.values":"\u3053\u3053\u306B\u6570\u5024\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u96C6\u8A08","pivot.clearArea":"\u30A8\u30EA\u30A2\u3092\u30AF\u30EA\u30A2","pivot.filter.na":"N/A","pivot.filter.noValues":"\u5024\u304C\u3042\u308A\u307E\u305B\u3093","pivot.filter.noneSelected":"\u672A\u9078\u629E","pivot.filter.allValues":"\u3059\u3079\u3066\u306E\u5024","pivot.filter.selectedCount":"{selected} / {total} \u3092\u9078\u629E","pivot.filter.selectAll":"\u3059\u3079\u3066\u9078\u629E","pivot.filter.deselectAll":"\u3059\u3079\u3066\u89E3\u9664","pivot.filter.noResults":"\u7D50\u679C\u304C\u3042\u308A\u307E\u305B\u3093","pivot.collapse.ariaExpand":"\u8A2D\u5B9A\u30A8\u30EA\u30A2\u3092\u5C55\u958B","pivot.collapse.ariaCollapse":"\u8A2D\u5B9A\u30A8\u30EA\u30A2\u3092\u6298\u308A\u305F\u305F\u3080","pivot.agg.sum":"\u5408\u8A08","pivot.agg.count":"\u4EF6\u6570","pivot.agg.avg":"\u5E73\u5747","pivot.agg.min":"\u6700\u5C0F","pivot.agg.max":"\u6700\u5927","pivot.preset.selectPlaceholder":"\u30D7\u30EA\u30BB\u30C3\u30C8\u3092\u9078\u629E","pivot.preset.save":"\u30D7\u30EA\u30BB\u30C3\u30C8\u3092\u4FDD\u5B58","pivot.preset.delete":"\u30D7\u30EA\u30BB\u30C3\u30C8\u3092\u524A\u9664","pivot.preset.saveDialogTitle":"\u73FE\u5728\u306E\u30D7\u30EA\u30BB\u30C3\u30C8\u3092\u4FDD\u5B58","pivot.preset.nameLabel":"\u30D7\u30EA\u30BB\u30C3\u30C8\u540D","pivot.preset.defaultName":"\u30D7\u30EA\u30BB\u30C3\u30C8 {index}","pivot.table.sectionTitle":"\u30D4\u30DC\u30C3\u30C8\u7D50\u679C","pivot.table.expandRowsAll":"Expand rows","pivot.table.collapseRowsAll":"Collapse rows","pivot.table.expandColumnsAll":"Expand columns","pivot.table.collapseColumnsAll":"Collapse columns","pivot.table.collapse.ariaExpand":"\u30D4\u30DC\u30C3\u30C8\u7D50\u679C\u3092\u5C55\u958B","pivot.table.collapse.ariaCollapse":"\u30D4\u30DC\u30C3\u30C8\u7D50\u679C\u3092\u6298\u308A\u305F\u305F\u3080","pivot.chart.title":"\u30D4\u30DC\u30C3\u30C8\u30C1\u30E3\u30FC\u30C8","pivot.chart.subtitle":"1\u3064\u306E\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3\u3068\u6700\u59272\u3064\u306E\u6307\u6A19\u3092\u30B3\u30F3\u30D1\u30AF\u30C8\u306A\u30C1\u30E3\u30FC\u30C8\u306B\u307E\u3068\u3081\u307E\u3059\u3002","pivot.chart.subtitleReady":"{dimension} \u3054\u3068\u306E {measure}","pivot.chart.emptyNoDimension":"\u30C1\u30E3\u30FC\u30C8\u3092\u8868\u793A\u3059\u308B\u306B\u306F\u3001\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u884C\u307E\u305F\u306F\u5217\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002","pivot.chart.emptyNoValue":"\u30C1\u30E3\u30FC\u30C8\u3092\u8868\u793A\u3059\u308B\u306B\u306F\u3001\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u5024\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002","pivot.chart.emptyNoData":"\u73FE\u5728\u306E\u30C1\u30E3\u30FC\u30C8\u9078\u629E\u3067\u306F\u8868\u793A\u3067\u304D\u308B\u30C7\u30FC\u30BF\u304C\u3042\u308A\u307E\u305B\u3093\u3002","pivot.chart.dimension":"\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3","pivot.chart.primaryMeasure":"\u6307\u6A19","pivot.chart.secondaryMeasure":"\u6BD4\u8F03\u6307\u6A19","pivot.chart.chartType":"\u30C1\u30E3\u30FC\u30C8\u7A2E\u5225","pivot.chart.style.barVertical":"\u7E26\u68D2\u30B0\u30E9\u30D5","pivot.chart.style.barHorizontal":"\u6A2A\u68D2\u30B0\u30E9\u30D5","pivot.chart.style.line":"\u6298\u308C\u7DDA\u30B0\u30E9\u30D5","pivot.chart.style.scatter":"\u6563\u5E03\u56F3","pivot.chart.collapse.ariaExpand":"\u30C1\u30E3\u30FC\u30C8\u9818\u57DF\u3092\u5C55\u958B","pivot.chart.collapse.ariaCollapse":"\u30C1\u30E3\u30FC\u30C8\u9818\u57DF\u3092\u6298\u308A\u305F\u305F\u3080","smartFilter.adaptFilters":"\u30D5\u30A3\u30EB\u30BF\u30FC\u8ABF\u6574","smartFilter.addFilters":"\u30D5\u30A3\u30EB\u30BF\u30FC\u8FFD\u52A0","smartFilter.go":"\u5B9F\u884C","smartFilter.visibleFilters":"\u8868\u793A\u30D5\u30A3\u30EB\u30BF\u30FC","smartFilter.searchPlaceholder":"\u691C\u7D22...","smartFilter.noOptionsFound":"\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093","smartFilter.min":"\u6700\u5C0F","smartFilter.max":"\u6700\u5927","smartFilter.minMaxPlaceholder":"\u6700\u5C0F - \u6700\u5927","smartFilter.operator.equals":"\u7B49\u3057\u3044","smartFilter.operator.contains":"\u542B\u3080","smartFilter.operator.notContains":"\u542B\u307E\u306A\u3044","smartFilter.operator.wildcard":"\u30EF\u30A4\u30EB\u30C9\u30AB\u30FC\u30C9\u691C\u7D22","smartFilter.operator.notEquals":"\u7B49\u3057\u304F\u306A\u3044","smartFilter.operator.greaterThan":"\u3088\u308A\u5927\u304D\u3044","smartFilter.operator.lessThan":"\u3088\u308A\u5C0F\u3055\u3044","smartFilter.operator.greaterOrEqual":"\u4EE5\u4E0A","smartFilter.operator.lessOrEqual":"\u4EE5\u4E0B","smartFilter.operator.between":"\u7BC4\u56F2","variant.noOptions":"\u30AA\u30D7\u30B7\u30E7\u30F3\u306A\u3057","variant.defaultSuffix":"\u30C7\u30D5\u30A9\u30EB\u30C8","variant.selectVariant":"\u30D3\u30E5\u30FC\u3092\u9078\u629E","variant.saveView":"\u30D3\u30E5\u30FC\u4FDD\u5B58","variant.newVariant":"\u65B0\u3057\u3044\u30D3\u30E5\u30FC","variant.viewName":"\u30D3\u30E5\u30FC\u540D","variant.setDefault":"\u30C7\u30D5\u30A9\u30EB\u30C8\u306B\u8A2D\u5B9A","variant.publicAllUsers":"\u516C\u958B\uFF08\u5168\u30E6\u30FC\u30B6\u30FC\uFF09","variant.toast.fetchFailed":"\u30D3\u30E5\u30FC\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F","variant.toast.saveFailed":"\u30D3\u30E5\u30FC\u306E\u4FDD\u5B58\u306B\u5931\u6557\u3057\u307E\u3057\u305F","variant.toast.saveSuccess":"\u30D3\u30E5\u30FC\u3092\u4FDD\u5B58\u3057\u307E\u3057\u305F","variant.toast.deleteFailed":"\u30D3\u30E5\u30FC\u306E\u524A\u9664\u306B\u5931\u6557\u3057\u307E\u3057\u305F","variant.toast.deleteSuccess":"\u30D3\u30E5\u30FC\u3092\u524A\u9664\u3057\u307E\u3057\u305F","variant.toast.defaultFailed":"\u30C7\u30D5\u30A9\u30EB\u30C8\u30D3\u30E5\u30FC\u306E\u66F4\u65B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F","variant.toast.defaultSuccess":"\u30C7\u30D5\u30A9\u30EB\u30C8\u30D3\u30E5\u30FC\u3092\u66F4\u65B0\u3057\u307E\u3057\u305F","layout.saveLayout":"\u30EC\u30A4\u30A2\u30A6\u30C8\u4FDD\u5B58","layout.layoutOptions":"\u30EC\u30A4\u30A2\u30A6\u30C8\u30AA\u30D7\u30B7\u30E7\u30F3","layout.selectLayout":"\u30EC\u30A4\u30A2\u30A6\u30C8\u9078\u629E","layout.saveCurrentLayout":"\u73FE\u5728\u306E\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u4FDD\u5B58...","layout.noSavedLayouts":"\u4FDD\u5B58\u6E08\u307F\u30EC\u30A4\u30A2\u30A6\u30C8\u306A\u3057","layout.removeDefault":"\u30C7\u30D5\u30A9\u30EB\u30C8\u89E3\u9664","layout.setAsDefault":"\u30C7\u30D5\u30A9\u30EB\u30C8\u306B\u8A2D\u5B9A","layout.layoutName":"\u30EC\u30A4\u30A2\u30A6\u30C8\u540D","layout.layoutDescription":"\u8AAC\u660E","layout.layoutNameHelper":"\u4F8B\uFF1A\u30B3\u30F3\u30D1\u30AF\u30C8\u8868\u793A","layout.warningOverwrite":"\u8B66\u544A\uFF1A\u65E2\u5B58\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u4E0A\u66F8\u304D\u3057\u307E\u3059","layout.useAsDefault":"\u30C7\u30D5\u30A9\u30EB\u30C8\u30EC\u30A4\u30A2\u30A6\u30C8\u3068\u3057\u3066\u4F7F\u7528","layout.publicAllUsers":"\u516C\u958B\uFF08\u5168\u30E6\u30FC\u30B6\u30FC\u306B\u8868\u793A\uFF09","layout.toast.loadFallback":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9\u304B\u3089\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u3001\u30ED\u30FC\u30AB\u30EB\u4FDD\u5B58\u306B\u5207\u308A\u66FF\u3048\u307E\u3057\u305F","layout.toast.saveSuccess":"\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u4FDD\u5B58\u3057\u307E\u3057\u305F","layout.toast.saveLocalSuccess":"\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u30ED\u30FC\u30AB\u30EB\u4FDD\u5B58\u3057\u307E\u3057\u305F","layout.toast.backendUnavailableSavedLocal":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9\u672A\u63A5\u7D9A\u306E\u305F\u3081\u30ED\u30FC\u30AB\u30EB\u306B\u4FDD\u5B58\u3057\u307E\u3057\u305F","layout.toast.deleteSuccess":"\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u524A\u9664\u3057\u307E\u3057\u305F","layout.toast.deleteLocalSuccess":"\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u30ED\u30FC\u30AB\u30EB\u304B\u3089\u524A\u9664\u3057\u307E\u3057\u305F","layout.toast.backendUnavailableDeletedLocal":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9\u672A\u63A5\u7D9A\u306E\u305F\u3081\u30ED\u30FC\u30AB\u30EB\u304B\u3089\u524A\u9664\u3057\u307E\u3057\u305F","layout.toast.defaultSuccess":"\u30C7\u30D5\u30A9\u30EB\u30C8\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u8A2D\u5B9A\u3057\u307E\u3057\u305F","layout.toast.defaultLocalSuccess":"\u30C7\u30D5\u30A9\u30EB\u30C8\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u30ED\u30FC\u30AB\u30EB\u306B\u8A2D\u5B9A\u3057\u307E\u3057\u305F","layout.toast.backendUnavailableDefaultLocal":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9\u672A\u63A5\u7D9A\u306E\u305F\u3081\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u30ED\u30FC\u30AB\u30EB\u4FDD\u5B58\u3057\u307E\u3057\u305F","dateRange.label":"\u65E5\u4ED8\u7BC4\u56F2","dateRange.startDate":"\u958B\u59CB\u65E5","dateRange.endDate":"\u7D42\u4E86\u65E5","dateRange.select":"\u9078\u629E...","dateRange.today":"\u4ECA\u65E5","dateRange.thisWeek":"\u4ECA\u9031","dateRange.thisMonth":"\u4ECA\u6708","graph.records":"{count} \u4EF6","graph.kpi.totalRecords":"\u7DCF\u30EC\u30B3\u30FC\u30C9","graph.kpi.totalReport":"\u7DCF\u5831\u544A\u6642\u9593","graph.kpi.totalBillable":"\u7DCF\u8ACB\u6C42\u53EF\u80FD\u6642\u9593","graph.kpi.efficiency":"\u52B9\u7387","graph.kpi.amount":"\u91D1\u984D","graph.kpi.flagged":"\u8981\u78BA\u8A8D","graph.chart.billable.title":"\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3\u5225\u8ACB\u6C42\u53EF\u80FD\u6642\u9593","graph.chart.billable.subtitle":"\u8ACB\u6C42\u53EF\u80FD\u6642\u9593\u306E\u4E0A\u4F4D","graph.chart.efficiency.title":"\u62C5\u5F53\u8005\u5225\u52B9\u7387","graph.chart.efficiency.subtitle":"\u52B9\u7387\u306E\u4F4E\u3044\u9806","graph.chart.status.title":"\u30B9\u30C6\u30FC\u30BF\u30B9\u5206\u5E03","graph.chart.status.subtitle":"\u30B9\u30C6\u30FC\u30BF\u30B9\u5225\u6BD4\u7387","graph.dataBody":"\u30C7\u30FC\u30BF\u672C\u4F53","graph.reportTitle":"\u30B0\u30E9\u30D5\u30A3\u30C3\u30AF\u30EC\u30DD\u30FC\u30C8","graph.unassigned":"\u672A\u5272\u308A\u5F53\u3066","graph.column.reportHours":"\u5831\u544A\u6642\u9593","graph.column.billableHours":"\u8ACB\u6C42\u53EF\u80FD\u6642\u9593","detail.searchAi.placeholder":"\u9805\u76EE\u3092\u691C\u7D22\u3002\u898B\u3064\u304B\u3089\u306A\u3044\u5834\u5408\u306FAI\u306B\u8CEA\u554F\u3057\u307E\u3059...","detail.searchAi.matches":"{count} \u4EF6\u306E\u4E00\u81F4","detail.searchAi.noMatch":"\u4E00\u81F4\u3059\u308B\u9805\u76EE\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002","detail.searchAi.autoAiFallback":"\u4E00\u81F4\u306A\u3057\u3002AI\u5206\u6790\u3092\u5B9F\u884C\u3057\u307E\u3059...","detail.searchAi.aiResultTitle":"AI\u5206\u6790\u7D50\u679C","detail.table.title":"\u95A2\u9023\u30EC\u30B3\u30FC\u30C9","kanban.empty":"\u3053\u3053\u306B\u30AB\u30FC\u30C9\u3092\u30C9\u30ED\u30C3\u30D7","kanban.bucket.limit":"\u4E0A\u9650","kanban.bucket.dropHere":"\u96E2\u3059\u3068\u3053\u306E bucket \u306B\u79FB\u52D5\u3057\u307E\u3059","kanban.bucket.add":"bucket \u3092\u8FFD\u52A0","kanban.bucket.rename":"bucket \u540D\u3092\u5909\u66F4","kanban.bucket.saveRename":"bucket \u540D\u3092\u4FDD\u5B58","kanban.bucket.cancelRename":"\u540D\u524D\u5909\u66F4\u3092\u30AD\u30E3\u30F3\u30BB\u30EB","kanban.search.placeholder":"\u30AB\u30FC\u30C9\u3068 bucket \u3092\u691C\u7D22","kanban.search.clear":"\u691C\u7D22\u3092\u30AF\u30EA\u30A2","kanban.search.results":"{count} \u4EF6\u306E\u30AB\u30FC\u30C9\u304C\u4E00\u81F4","kanban.search.noMatch":"\u4E00\u81F4\u3059\u308B\u30AB\u30FC\u30C9\u306F\u3042\u308A\u307E\u305B\u3093","kanban.card.progress":"\u9032\u6357","kanban.card.openDetail":"\u8A73\u7D30\u3092\u958B\u304F","kanban.priority.critical":"\u7DCA\u6025","kanban.priority.high":"\u9AD8","kanban.priority.medium":"\u4E2D","kanban.priority.low":"\u4F4E","quickCreate.newItem":"\u65B0\u898F\u4F5C\u6210","quickCreate.createWithTitle":"{title} \u3092\u4F5C\u6210","quickEdit.editWithTitle":"{title} \u3092\u7DE8\u96C6","quickDelete.confirmTitle":"\u524A\u9664\u306E\u78BA\u8A8D","quickDelete.confirmMessageSingle":"\u9078\u629E\u3057\u305F\u30EC\u30B3\u30FC\u30C9\u3092\u524A\u9664\u3057\u3066\u3082\u3088\u308D\u3057\u3044\u3067\u3059\u304B\uFF1F","quickDelete.confirmMessageMultiple":"\u9078\u629E\u3057\u305F {count} \u4EF6\u306E\u30EC\u30B3\u30FC\u30C9\u3092\u524A\u9664\u3057\u3066\u3082\u3088\u308D\u3057\u3044\u3067\u3059\u304B\uFF1F","cardPage.viewDetails":"\u8A73\u7D30\u3092\u8868\u793A","cardPage.download":"\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9","cardPage.close":"\u9589\u3058\u308B","cardPage.empty":"\u9805\u76EE\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093","messageBox.confirm":"OK","messageBox.cancel":"\u30AD\u30E3\u30F3\u30BB\u30EB"},gb={"common.cancel":"\uCDE8\uC18C","common.save":"\uC800\uC7A5","common.ok":"\uD655\uC778","common.done":"\uC644\uB8CC","common.search":"\uAC80\uC0C9","common.none":"\uC5C6\uC74C","common.all":"\uC804\uCCB4","common.noData":"\uB370\uC774\uD130 \uC5C6\uC74C","common.copy":"\uBCF5\uC0AC","common.delete":"\uC0AD\uC81C","common.loading":"\uB85C\uB529 \uC911...","header.searchPlaceholder":"\uBB34\uC5C7\uC774\uB4E0 \uBB3C\uC5B4\uBCF4\uC138\uC694...","header.searchAddFeature":"\uAE30\uB2A5 \uCD94\uAC00","header.searchStartVoice":"\uC74C\uC131 \uC785\uB825 \uC2DC\uC791","header.searchStopVoice":"\uC74C\uC131 \uC785\uB825 \uC911\uC9C0","header.searchOpenPanel":"\uB300\uD654 \uC5F4\uAE30","header.theme.system":"\uD14C\uB9C8: \uC2DC\uC2A4\uD15C","header.theme.dark":"\uD14C\uB9C8: \uB2E4\uD06C","header.theme.light":"\uD14C\uB9C8: \uB77C\uC774\uD2B8","header.menu.setting":"\uC124\uC815","header.menu.refresh":"\uC0C8\uB85C \uACE0\uCE68","header.menu.logout":"\uB85C\uADF8\uC544\uC6C3","navigation.expand":"\uD0D0\uC0C9 \uD3BC\uCE58\uAE30","navigation.collapse":"\uD0D0\uC0C9 \uC811\uAE30","navigation.searchPlaceholder":"\uBA54\uB274 \uAC80\uC0C9...","navigation.noMatch":"\uC77C\uCE58\uD558\uB294 \uBA54\uB274\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4","navigation.noAccessibleApp":"\uC811\uADFC \uAC00\uB2A5\uD55C \uC571\uC774 \uC5C6\uC2B5\uB2C8\uB2E4","navigation.noItems":"\uD45C\uC2DC\uD560 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4","navigation.expandView":"{title} \uD3BC\uCE58\uAE30","navigation.mode.switchToFixed":"\uACE0\uC815 \uD0D0\uC0C9\uC73C\uB85C \uC804\uD658","navigation.mode.switchToFloating":"\uD50C\uB85C\uD305 \uD0D0\uC0C9\uC73C\uB85C \uC804\uD658","navigation.pinned":"\uACE0\uC815\uB428","navigation.pin.add":"\uC0C1\uB2E8\uC5D0 \uACE0\uC815","navigation.pin.remove":"\uACE0\uC815 \uD574\uC81C","table.toolbar.searchPlaceholder":"\uAC80\uC0C9...","table.title.default":"\uB370\uC774\uD130 \uD14C\uC774\uBE14","table.toolbar.groupBy":"\uADF8\uB8F9","table.toolbar.summary":"\uC694\uC57D","table.toolbar.columns":"\uC5F4","table.toolbar.export":"\uB0B4\uBCF4\uB0B4\uAE30","table.toolbar.itemsPerPage":"\uD398\uC774\uC9C0\uB2F9 \uD589 \uC218:","table.toolbar.pageOf":"{current} / {total} \uD398\uC774\uC9C0","table.toolbar.newItem":"\uC2E0\uADDC \uD56D\uBAA9","table.toolbar.editItem":"\uD56D\uBAA9 \uC218\uC815","table.toolbar.deleteItem":"\uD56D\uBAA9 \uC0AD\uC81C","table.toolbar.graphicReport":"\uADF8\uB798\uD504 \uB9AC\uD3EC\uD2B8","table.toolbar.saveLayout":"\uB808\uC774\uC544\uC6C3 \uC800\uC7A5","table.menu.groupBy":"\uADF8\uB8F9","table.menu.clearAll":"\uBAA8\uB450 \uC9C0\uC6B0\uAE30","table.menu.visibleColumns":"\uD45C\uC2DC \uC5F4","table.menu.showSummaryRow":"\uC694\uC57D \uD589 \uD45C\uC2DC","table.menu.noNumericColumns":"\uC22B\uC790 \uC5F4 \uC5C6\uC74C","table.group.expandAll":"\uBAA8\uB4E0 \uADF8\uB8F9 \uD3BC\uCE58\uAE30","table.group.collapseAll":"\uBAA8\uB4E0 \uADF8\uB8F9 \uC811\uAE30","table.mobile.notImplemented":"\uBAA8\uBC14\uC77C \uBDF0\uB294 \uC544\uC9C1 \uAD6C\uD604\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4","table.headerMenu.sortAsc":"\uC624\uB984\uCC28\uC21C \uC815\uB82C","table.headerMenu.sortDesc":"\uB0B4\uB9BC\uCC28\uC21C \uC815\uB82C","table.headerMenu.clearSort":"\uC815\uB82C \uD574\uC81C","table.headerMenu.configureSort":"\uC815\uB82C \uC124\uC815...","table.headerMenu.group":"\uC774 \uC5F4\uB85C \uADF8\uB8F9\uD654","table.headerMenu.ungroup":"\uADF8\uB8F9\uC5D0\uC11C \uC81C\uAC70","table.headerMenu.addSummary":"\uC694\uC57D\uC5D0 \uCD94\uAC00","table.headerMenu.removeSummary":"\uC694\uC57D\uC5D0\uC11C \uC81C\uAC70","table.headerMenu.hideColumn":"\uC5F4 \uC228\uAE30\uAE30","table.sortDialog.title":"\uC815\uB82C \uC124\uC815","table.sortDialog.empty":"\uC815\uB82C \uADDC\uCE59\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. \uCD94\uAC00\uD558\uC138\uC694.","table.sortDialog.addRule":"\uADDC\uCE59 \uCD94\uAC00","table.sortDialog.clearAll":"\uBAA8\uB450 \uC9C0\uC6B0\uAE30","table.sortDialog.asc":"\uC624\uB984\uCC28\uC21C","table.sortDialog.desc":"\uB0B4\uB9BC\uCC28\uC21C","pivot.title.default":"\uD53C\uBC97 \uD14C\uC774\uBE14","pivot.subtitle.default":"\uD544\uB4DC\uB97C \uB4DC\uB798\uADF8\uD558\uC5EC \uD53C\uBC97 \uD14C\uC774\uBE14\uC744 \uAD6C\uC131\uD558\uC138\uC694.","pivot.empty":"\uACB0\uACFC\uB97C \uBCF4\uB824\uBA74 \uAC12 \uC601\uC5ED\uC5D0 \uCD5C\uC18C \uD55C \uAC1C\uC758 \uD544\uB4DC\uB97C \uCD94\uAC00\uD558\uC138\uC694.","pivot.records":"\uB808\uCF54\uB4DC","pivot.afterFilter":"\uD544\uD130 \uD6C4","pivot.grandTotal":"\uCD1D\uD569","pivot.resultLabel":"\uACB0\uACFC","pivot.valueLabel":"\uAC12","pivot.table.dimensions":"\uCC28\uC6D0","pivot.config.title":"\uAD6C\uC131","pivot.fieldList":"\uD544\uB4DC \uBAA9\uB85D","pivot.availableDimensions":"\uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uCC28\uC6D0","pivot.allFieldsInUse":"\uBAA8\uB4E0 \uD544\uB4DC\uAC00 \uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC785\uB2C8\uB2E4.","pivot.zone.rows":"\uD589","pivot.zone.columns":"\uC5F4","pivot.zone.filters":"\uD544\uD130","pivot.zone.values":"\uAC12","pivot.hint.rows":"\uC5EC\uAE30\uC5D0 \uD544\uB4DC\uB97C \uB4DC\uB798\uADF8\uD558\uC5EC \uD589 \uACC4\uCE35\uC744 \uAD6C\uC131","pivot.hint.columns":"\uC5EC\uAE30\uC5D0 \uD544\uB4DC\uB97C \uB4DC\uB798\uADF8\uD558\uC5EC \uC5F4 \uACC4\uCE35\uC744 \uAD6C\uC131","pivot.hint.filters":"\uC5EC\uAE30\uC5D0 \uD544\uB4DC\uB97C \uB4DC\uB798\uADF8\uD558\uC5EC \uBCF4\uACE0\uC11C \uD544\uD130\uB85C \uC0AC\uC6A9","pivot.hint.values":"\uC22B\uC790 \uD544\uB4DC\uB97C \uC5EC\uAE30\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC9D1\uACC4","pivot.clearArea":"\uC601\uC5ED \uBE44\uC6B0\uAE30","pivot.filter.na":"\uD574\uB2F9 \uC5C6\uC74C","pivot.filter.noValues":"\uAC12 \uC5C6\uC74C","pivot.filter.noneSelected":"\uC120\uD0DD \uC5C6\uC74C","pivot.filter.allValues":"\uBAA8\uB4E0 \uAC12","pivot.filter.selectedCount":"{selected} / {total} \uC120\uD0DD\uB428","pivot.filter.selectAll":"\uC804\uCCB4 \uC120\uD0DD","pivot.filter.deselectAll":"\uC804\uCCB4 \uD574\uC81C","pivot.filter.noResults":"\uAC80\uC0C9 \uACB0\uACFC \uC5C6\uC74C","pivot.collapse.ariaExpand":"\uAD6C\uC131 \uC601\uC5ED \uD3BC\uCE58\uAE30","pivot.collapse.ariaCollapse":"\uAD6C\uC131 \uC601\uC5ED \uC811\uAE30","pivot.agg.sum":"\uD569\uACC4","pivot.agg.count":"\uAC1C\uC218","pivot.agg.avg":"\uD3C9\uADE0","pivot.agg.min":"\uCD5C\uC18C","pivot.agg.max":"\uCD5C\uB300","pivot.preset.selectPlaceholder":"\uD504\uB9AC\uC14B \uC120\uD0DD","pivot.preset.save":"\uD504\uB9AC\uC14B \uC800\uC7A5","pivot.preset.delete":"\uD504\uB9AC\uC14B \uC0AD\uC81C","pivot.preset.saveDialogTitle":"\uD604\uC7AC \uD504\uB9AC\uC14B \uC800\uC7A5","pivot.preset.nameLabel":"\uD504\uB9AC\uC14B \uC774\uB984","pivot.preset.defaultName":"\uD504\uB9AC\uC14B {index}","pivot.table.sectionTitle":"\uD53C\uBC97 \uACB0\uACFC","pivot.table.expandRowsAll":"Expand rows","pivot.table.collapseRowsAll":"Collapse rows","pivot.table.expandColumnsAll":"Expand columns","pivot.table.collapseColumnsAll":"Collapse columns","pivot.table.collapse.ariaExpand":"\uD53C\uBC97 \uACB0\uACFC \uD3BC\uCE58\uAE30","pivot.table.collapse.ariaCollapse":"\uD53C\uBC97 \uACB0\uACFC \uC811\uAE30","pivot.chart.title":"\uD53C\uBC97 \uCC28\uD2B8","pivot.chart.subtitle":"\uD558\uB098\uC758 \uCC28\uC6D0\uACFC \uCD5C\uB300 \uB450 \uAC1C\uC758 \uCE21\uC815\uAC12\uC744 \uAC04\uACB0\uD55C \uCC28\uD2B8\uB85C \uD45C\uC2DC\uD569\uB2C8\uB2E4.","pivot.chart.subtitleReady":"{dimension}\uBCC4 {measure}","pivot.chart.emptyNoDimension":"\uCC28\uD2B8\uB97C \uBCF4\uB824\uBA74 \uCD5C\uC18C \uD55C \uAC1C\uC758 \uD589 \uB610\uB294 \uC5F4 \uD544\uB4DC\uB97C \uCD94\uAC00\uD558\uC138\uC694.","pivot.chart.emptyNoValue":"\uCC28\uD2B8\uB97C \uBCF4\uB824\uBA74 \uCD5C\uC18C \uD55C \uAC1C\uC758 \uAC12 \uD544\uB4DC\uB97C \uCD94\uAC00\uD558\uC138\uC694.","pivot.chart.emptyNoData":"\uD604\uC7AC \uCC28\uD2B8 \uC120\uD0DD\uC5D0 \uD45C\uC2DC\uD560 \uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.","pivot.chart.dimension":"\uCC28\uD2B8 \uCC28\uC6D0","pivot.chart.primaryMeasure":"\uC8FC \uCE21\uC815\uAC12","pivot.chart.secondaryMeasure":"\uBE44\uAD50 \uCE21\uC815\uAC12","pivot.chart.chartType":"\uCC28\uD2B8 \uC720\uD615","pivot.chart.style.barVertical":"\uC138\uB85C \uB9C9\uB300","pivot.chart.style.barHorizontal":"\uAC00\uB85C \uB9C9\uB300","pivot.chart.style.line":"\uC120\uD615 \uCC28\uD2B8","pivot.chart.style.scatter":"\uC0B0\uC810\uB3C4","pivot.chart.collapse.ariaExpand":"\uCC28\uD2B8 \uC601\uC5ED \uD3BC\uCE58\uAE30","pivot.chart.collapse.ariaCollapse":"\uCC28\uD2B8 \uC601\uC5ED \uC811\uAE30","smartFilter.adaptFilters":"\uD544\uD130 \uC870\uC815","smartFilter.addFilters":"\uD544\uD130 \uCD94\uAC00","smartFilter.go":"\uC2E4\uD589","smartFilter.visibleFilters":"\uD45C\uC2DC \uD544\uD130","smartFilter.searchPlaceholder":"\uAC80\uC0C9...","smartFilter.noOptionsFound":"\uC635\uC158\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4","smartFilter.min":"\uCD5C\uC18C","smartFilter.max":"\uCD5C\uB300","smartFilter.minMaxPlaceholder":"\uCD5C\uC18C - \uCD5C\uB300","smartFilter.operator.equals":"\uAC19\uC74C","smartFilter.operator.contains":"\uD3EC\uD568","smartFilter.operator.notContains":"\uBBF8\uD3EC\uD568","smartFilter.operator.wildcard":"\uC640\uC77C\uB4DC\uCE74\uB4DC \uAC80\uC0C9","smartFilter.operator.notEquals":"\uAC19\uC9C0 \uC54A\uC74C","smartFilter.operator.greaterThan":"\uBCF4\uB2E4 \uD07C","smartFilter.operator.lessThan":"\uBCF4\uB2E4 \uC791\uC74C","smartFilter.operator.greaterOrEqual":"\uC774\uC0C1","smartFilter.operator.lessOrEqual":"\uC774\uD558","smartFilter.operator.between":"\uBC94\uC704","variant.noOptions":"\uC635\uC158 \uC5C6\uC74C","variant.defaultSuffix":"\uAE30\uBCF8","variant.selectVariant":"\uBDF0 \uC120\uD0DD","variant.saveView":"\uBDF0 \uC800\uC7A5","variant.newVariant":"\uC0C8 \uBDF0","variant.viewName":"\uBDF0 \uC774\uB984","variant.setDefault":"\uAE30\uBCF8\uC73C\uB85C \uC124\uC815","variant.publicAllUsers":"\uACF5\uAC1C(\uC804\uCCB4 \uC0AC\uC6A9\uC790)","variant.toast.fetchFailed":"\uBDF0\uB97C \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4","variant.toast.saveFailed":"\uBDF0\uB97C \uC800\uC7A5\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4","variant.toast.saveSuccess":"\uBDF0\uAC00 \uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4","variant.toast.deleteFailed":"\uBDF0\uB97C \uC0AD\uC81C\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4","variant.toast.deleteSuccess":"\uBDF0\uAC00 \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4","variant.toast.defaultFailed":"\uAE30\uBCF8 \uBDF0\uB97C \uC5C5\uB370\uC774\uD2B8\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4","variant.toast.defaultSuccess":"\uAE30\uBCF8 \uBDF0\uAC00 \uC5C5\uB370\uC774\uD2B8\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.saveLayout":"\uB808\uC774\uC544\uC6C3 \uC800\uC7A5","layout.layoutOptions":"\uB808\uC774\uC544\uC6C3 \uC635\uC158","layout.selectLayout":"\uB808\uC774\uC544\uC6C3 \uC120\uD0DD","layout.saveCurrentLayout":"\uD604\uC7AC \uB808\uC774\uC544\uC6C3 \uC800\uC7A5...","layout.noSavedLayouts":"\uC800\uC7A5\uB41C \uB808\uC774\uC544\uC6C3 \uC5C6\uC74C","layout.removeDefault":"\uAE30\uBCF8 \uD574\uC81C","layout.setAsDefault":"\uAE30\uBCF8\uC73C\uB85C \uC124\uC815","layout.layoutName":"\uB808\uC774\uC544\uC6C3 \uC774\uB984","layout.layoutDescription":"\uC124\uBA85","layout.layoutNameHelper":"\uC608: \uCEF4\uD329\uD2B8 \uBDF0","layout.warningOverwrite":"\uACBD\uACE0: \uAE30\uC874 \uB808\uC774\uC544\uC6C3\uC774 \uB36E\uC5B4\uC4F0\uAE30 \uB429\uB2C8\uB2E4","layout.useAsDefault":"\uAE30\uBCF8 \uB808\uC774\uC544\uC6C3\uC73C\uB85C \uC0AC\uC6A9","layout.publicAllUsers":"\uACF5\uAC1C(\uBAA8\uB4E0 \uC0AC\uC6A9\uC790\uC5D0\uAC8C \uD45C\uC2DC)","layout.toast.loadFallback":"\uBC31\uC5D4\uB4DC\uC5D0\uC11C \uB808\uC774\uC544\uC6C3\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD574 \uB85C\uCEEC \uC800\uC7A5\uC18C\uB85C \uC804\uD658\uD588\uC2B5\uB2C8\uB2E4","layout.toast.saveSuccess":"\uB808\uC774\uC544\uC6C3\uC774 \uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.toast.saveLocalSuccess":"\uB808\uC774\uC544\uC6C3\uC774 \uB85C\uCEEC \uC800\uC7A5\uC18C\uC5D0 \uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.toast.backendUnavailableSavedLocal":"\uBC31\uC5D4\uB4DC\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC5B4 \uB85C\uCEEC\uC5D0 \uC800\uC7A5\uD588\uC2B5\uB2C8\uB2E4","layout.toast.deleteSuccess":"\uB808\uC774\uC544\uC6C3\uC774 \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.toast.deleteLocalSuccess":"\uB808\uC774\uC544\uC6C3\uC774 \uB85C\uCEEC \uC800\uC7A5\uC18C\uC5D0\uC11C \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.toast.backendUnavailableDeletedLocal":"\uBC31\uC5D4\uB4DC\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC5B4 \uB85C\uCEEC\uC5D0\uC11C \uC0AD\uC81C\uD588\uC2B5\uB2C8\uB2E4","layout.toast.defaultSuccess":"\uAE30\uBCF8 \uB808\uC774\uC544\uC6C3\uC774 \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.toast.defaultLocalSuccess":"\uAE30\uBCF8 \uB808\uC774\uC544\uC6C3\uC774 \uB85C\uCEEC\uC5D0 \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.toast.backendUnavailableDefaultLocal":"\uBC31\uC5D4\uB4DC\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC5B4 \uAE30\uBCF8\uAC12\uC744 \uB85C\uCEEC\uC5D0 \uC800\uC7A5\uD588\uC2B5\uB2C8\uB2E4","dateRange.label":"\uB0A0\uC9DC \uBC94\uC704","dateRange.startDate":"\uC2DC\uC791\uC77C","dateRange.endDate":"\uC885\uB8CC\uC77C","dateRange.select":"\uC120\uD0DD...","dateRange.today":"\uC624\uB298","dateRange.thisWeek":"\uC774\uBC88 \uC8FC","dateRange.thisMonth":"\uC774\uBC88 \uB2EC","graph.records":"{count}\uAC74","graph.kpi.totalRecords":"\uCD1D \uB808\uCF54\uB4DC","graph.kpi.totalReport":"\uCD1D \uBCF4\uACE0 \uC2DC\uAC04","graph.kpi.totalBillable":"\uCD1D \uCCAD\uAD6C \uAC00\uB2A5 \uC2DC\uAC04","graph.kpi.efficiency":"\uD6A8\uC728","graph.kpi.amount":"\uAE08\uC561","graph.kpi.flagged":"\uD50C\uB798\uADF8","graph.chart.billable.title":"\uCC28\uC6D0\uBCC4 \uCCAD\uAD6C \uAC00\uB2A5 \uC2DC\uAC04","graph.chart.billable.subtitle":"\uCCAD\uAD6C \uAC00\uB2A5 \uC2DC\uAC04 \uC0C1\uC704 \uAC12","graph.chart.efficiency.title":"\uB2F4\uB2F9\uC790\uBCC4 \uD6A8\uC728","graph.chart.efficiency.subtitle":"\uB0AE\uC740 \uD6A8\uC728 \uC6B0\uC120","graph.chart.status.title":"\uC0C1\uD0DC \uBD84\uD3EC","graph.chart.status.subtitle":"\uC0C1\uD0DC\uBCC4 \uBE44\uC728","graph.dataBody":"\uB370\uC774\uD130 \uBCF8\uBB38","graph.reportTitle":"\uADF8\uB798\uD504 \uB9AC\uD3EC\uD2B8","graph.unassigned":"\uBBF8\uC9C0\uC815","graph.column.reportHours":"\uBCF4\uACE0 \uC2DC\uAC04","graph.column.billableHours":"\uCCAD\uAD6C \uAC00\uB2A5 \uC2DC\uAC04","detail.searchAi.placeholder":"\uD544\uB4DC\uB97C \uAC80\uC0C9\uD558\uACE0, \uACB0\uACFC\uAC00 \uC5C6\uC73C\uBA74 AI\uC5D0 \uC9C8\uBB38\uD558\uC138\uC694...","detail.searchAi.matches":"{count}\uAC1C \uC77C\uCE58 \uD56D\uBAA9","detail.searchAi.noMatch":"\uC77C\uCE58\uD558\uB294 \uD544\uB4DC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.","detail.searchAi.autoAiFallback":"\uC77C\uCE58 \uD56D\uBAA9\uC774 \uC5C6\uC5B4 AI \uBD84\uC11D\uC744 \uC2E4\uD589\uD569\uB2C8\uB2E4...","detail.searchAi.aiResultTitle":"AI \uBD84\uC11D \uACB0\uACFC","detail.table.title":"\uAD00\uB828 \uB808\uCF54\uB4DC","kanban.empty":"\uC5EC\uAE30\uC5D0 \uCE74\uB4DC\uB97C \uB193\uC73C\uC138\uC694","kanban.bucket.limit":"\uD55C\uB3C4","kanban.bucket.dropHere":"\uB193\uC73C\uBA74 \uC774 \uBC84\uD0B7\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4","kanban.bucket.add":"\uBC84\uD0B7 \uCD94\uAC00","kanban.bucket.rename":"\uBC84\uD0B7 \uC774\uB984 \uBCC0\uACBD","kanban.bucket.saveRename":"\uBC84\uD0B7 \uC774\uB984 \uC800\uC7A5","kanban.bucket.cancelRename":"\uC774\uB984 \uBCC0\uACBD \uCDE8\uC18C","kanban.search.placeholder":"\uCE74\uB4DC \uBC0F \uBC84\uD0B7 \uAC80\uC0C9","kanban.search.clear":"\uAC80\uC0C9 \uC9C0\uC6B0\uAE30","kanban.search.results":"\uC77C\uCE58\uD558\uB294 \uCE74\uB4DC {count}\uAC1C","kanban.search.noMatch":"\uC77C\uCE58\uD558\uB294 \uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4","kanban.card.progress":"\uC9C4\uD589\uB960","kanban.card.openDetail":"\uC0C1\uC138 \uC5F4\uAE30","kanban.priority.critical":"\uAE34\uAE09","kanban.priority.high":"\uB192\uC74C","kanban.priority.medium":"\uBCF4\uD1B5","kanban.priority.low":"\uB0AE\uC74C","quickCreate.newItem":"\uC2E0\uADDC \uD56D\uBAA9","quickCreate.createWithTitle":"{title} \uC0DD\uC131","quickEdit.editWithTitle":"{title} \uC218\uC815","quickDelete.confirmTitle":"\uC0AD\uC81C \uD655\uC778","quickDelete.confirmMessageSingle":"\uC120\uD0DD\uD55C \uD56D\uBAA9\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?","quickDelete.confirmMessageMultiple":"\uC120\uD0DD\uD55C {count}\uAC1C \uD56D\uBAA9\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?","cardPage.viewDetails":"\uC0C1\uC138 \uBCF4\uAE30","cardPage.download":"\uB2E4\uC6B4\uB85C\uB4DC","cardPage.close":"\uB2EB\uAE30","cardPage.empty":"\uD56D\uBAA9\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4","messageBox.confirm":"\uD655\uC778","messageBox.cancel":"\uCDE8\uC18C"},qn={en:cb,zh:db,fr:pb,de:ub,ja:mb,ko:gb};P();var ad=(t,r)=>r?t.replace(/\{(\w+)\}/g,(o,n)=>{let a=r[n];return a==null?"":String(a)}):t,vb={locale:"en",t:(t,r)=>ad(qn.en[t]||t,r)},id=er.createContext(vb),Ga=({locale:t="en",messages:r,children:o})=>{let n=er.useMemo(()=>{let a=qn[t]||qn.en,i=r?.[t]||{},s={...qn.en,...a,...i};return {locale:t,t:(l,d)=>ad(s[l]||l,d)}},[t,r]);return e(id.Provider,{value:n,children:o})},pe=()=>er.useContext(id);P();function Xn({items:t,onItemClick:r,className:o="",level:n=0,expandedIds:a,onToggleExpand:i,colorMode:s="light",enablePinning:l=false,pinnedIds:d,onTogglePin:u}){let{t:p}=pe(),f=s==="dark",b=navigation.usePathname(),[m,v]=er.useState(false),[y,g]=er.useState(new Set),x=a!==void 0&&i!==void 0,h=x?a:y;er.useEffect(()=>{v(true);},[]);let C=w=>{if(x)i(w);else {let T=new Set(y);T.has(w)?T.delete(w):T.add(w),g(T);}},k=w=>{w.children&&w.children.length>0&&C(w.id),r&&r(w);};return !t||!Array.isArray(t)?e("div",{className:br("tree-menu",o),children:e("div",{className:"text-sm text-[var(--orb-muted)] p-2",children:p("navigation.noItems")})}):e("div",{className:br("tree-menu",o),children:t.map(w=>{let T=h.has(w.id)||w.isExpanded,I=w.children&&w.children.length>0,A=56+Math.max(0,n-1)*8,D=n===0?12:I?A-24:A,M=w.appurl||w.href,N=m&&M?b===M:false,E=d?.has(w.id)??false,O=l&&w.pinnable!==false&&!!M&&!I;return c("div",{className:"tree-menu-item relative",children:[N&&e("div",{className:br("absolute left-0 top-2 bottom-2 w-[3px] rounded-r-full z-10","bg-[var(--orb-nav-active-fg)]")}),c(Gs,{variant:"ghost",className:br("w-full justify-start h-auto py-2 relative overflow-hidden group",n>0?"gap-1":"gap-2",I&&T&&!N?f?"bg-[color-mix(in_oklch,var(--orb-inverse-fg)_5%,transparent)] text-[var(--orb-fg)] hover:bg-[color-mix(in_oklch,var(--orb-inverse-fg)_8%,transparent)]":"bg-[color-mix(in_oklch,var(--orb-surface)_70%,transparent)] text-[var(--orb-fg)] hover:bg-[var(--orb-surface)]":"",n>=2?"min-h-9 py-1.5 rounded-md":n>0?"min-h-10 rounded-lg":"rounded-lg",N?f?"bg-transparent text-[var(--orb-nav-active-fg)] hover:bg-[color-mix(in_oklch,var(--orb-surface-2)_35%,transparent)]":"bg-transparent text-[var(--orb-nav-active-fg)] hover:bg-[color-mix(in_oklch,var(--orb-surface)_60%,transparent)]":f?"hover:bg-[color-mix(in_oklch,var(--orb-surface-2)_50%,transparent)] text-[var(--orb-fg)]":"hover:bg-[color-mix(in_oklch,var(--orb-surface)_50%,transparent)] text-[var(--orb-fg)]"),style:{paddingLeft:`${D}px`,paddingRight:O?"34px":"10px"},onClick:()=>k(w),children:[I&&e("div",{className:br("flex-shrink-0 transition-transform duration-200",T&&"rotate-90",N?"text-[var(--orb-nav-active-fg)]":f?"text-[var(--orb-muted)] group-hover:text-[var(--orb-fg)]":"text-[var(--orb-muted)] group-hover:text-[var(--orb-muted)]"),children:e(Br,{className:"h-4 w-4"})}),w.icon&&e("div",{className:br("flex h-4 w-4 flex-shrink-0 items-center justify-center transition-colors duration-200",N?"text-[var(--orb-nav-active-fg)]":f?"text-[var(--orb-muted)] group-hover:text-[var(--orb-fg)]":"text-[var(--orb-muted)] group-hover:text-[var(--orb-muted)]"),children:w.icon}),c("div",{className:"flex-1 text-left overflow-hidden z-10",children:[e("div",{className:br("text-sm truncate transition-colors duration-200",N?"font-semibold":"font-medium"),children:w.title||w.label}),w.description&&e("div",{className:br("text-xs truncate transition-colors duration-200",N?f?"text-[color-mix(in_oklch,var(--orb-nav-active-fg)_70%,transparent)]":"text-[color-mix(in_oklch,var(--orb-nav-active-fg)_75%,transparent)]":"text-[var(--orb-muted)]"),title:w.description,children:w.description})]})]}),O&&u&&e("button",{type:"button","aria-label":p(E?"navigation.pin.remove":"navigation.pin.add"),"aria-pressed":E,title:p(E?"navigation.pin.remove":"navigation.pin.add"),onClick:F=>{F.preventDefault(),F.stopPropagation(),u(w);},className:br("orb-navigation-pin-button absolute right-1 top-1/2 z-20 flex h-7 w-7 -translate-y-1/2 items-center justify-center rounded-md transition-colors duration-150",E&&"orb-is-pinned"),children:e(Jo,{className:br("h-3.5 w-3.5",E&&"fill-current")})}),I&&e("div",{className:br("grid transition-[grid-template-rows] duration-300 ease-in-out",T?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:e("div",{className:br("overflow-hidden",T&&"pt-1"),children:e(Xn,{items:w.children,onItemClick:r,level:n+1,expandedIds:a,onToggleExpand:i,colorMode:s,enablePinning:l,pinnedIds:d,onTogglePin:u})})})]},w.id)})})}P();var Sb="orbcafe:navigation-island:pinned-items",Us="orbcafe-navigation-pinned",wb=t=>t.appurl||t.href,ld=t=>{let r=[];return t.forEach(o=>{let n=!!o.children?.length;o.pinnable!==false&&wb(o)&&!n&&r.push({...o,children:void 0}),o.children?.length&&r.push(...ld(o.children));}),r},cd=({collapsed:t,onToggle:r,className:o="",maxHeight:n,menuData:a=[],colorMode:i="light",displayMode:s="fixed",onDisplayModeChange:l,showDisplayModeToggle:d=true,enablePinning:u=true,pinStorageKey:p=Sb,pinnedItemIds:f,defaultPinnedItemIds:b=[],onPinnedItemIdsChange:m,pinnedSectionTitle:v})=>{let{t:y}=pe(),g=i==="dark",x=s==="floating",h=navigation.useRouter(),[C,k]=er.useState(""),[w,T]=er.useState(new Set),[I,S]=er.useState(b),[A,D]=er.useState(false),M=f!==void 0,N=er.useMemo(()=>f??I,[f,I]),E=er.useMemo(()=>new Set(N),[N]);er.useEffect(()=>{t&&T(new Set);},[t]),er.useEffect(()=>{if(!u||M){D(true);return}try{let z=window.localStorage.getItem(p);if(z){let U=JSON.parse(z);Array.isArray(U)&&S(U.filter(K=>typeof K=="string"));}}catch{}finally{D(true);}},[u,M,p]),er.useEffect(()=>{if(!(!u||M||!A))try{window.localStorage.setItem(p,JSON.stringify(N));}catch{}},[N,u,M,p,A]),er.useEffect(()=>{!u||t||N.length===0||T(z=>{if(z.has(Us))return z;let U=new Set(z);return U.add(Us),U});},[t,N.length,u]);let O=er.useCallback(z=>{let U=Array.from(new Set(z));M||S(U),m?.(U);},[M,m]),F=er.useCallback(z=>{let U=z.id,K=E.has(U)?N.filter(fe=>fe!==U):[...N,U];O(K);},[N,E,O]),X=er.useMemo(()=>{if(!u||N.length===0)return a;let z=new Map(ld(a).map(K=>[K.id,K])),U=N.map(K=>z.get(K)).filter(K=>!!K);return U.length===0?a:[{id:Us,title:v||y("navigation.pinned"),icon:e(Jo,{className:"w-4 h-4"}),children:U,pinnable:false},...a]},[N,u,a,v,y]),H=er.useCallback(z=>{let U=[],K=fe=>{fe.forEach(se=>{U.push(se.id),se.children&&K(se.children);});};return K(z),U},[]),Y=er.useMemo(()=>{if(!C.trim())return X;let z=U=>U.reduce((K,fe)=>{let se=fe.title?.toLowerCase().includes(C.toLowerCase())||fe.description?.toLowerCase().includes(C.toLowerCase()),ue=fe.children?z(fe.children):[];return (se||ue.length>0)&&K.push({...fe,children:ue.length>0?ue:fe.children}),K},[]);return z(X)},[C,X]),W=er.useMemo(()=>C.trim()?new Set(H(X)):w,[C,X,w,H]),j=er.useCallback(async z=>{if(console.log("\u{1F5B1}\uFE0F \u5BFC\u822A\u83DC\u5355\u9879\u70B9\u51FB:",z),z.id==="chat"||z.appurl==="/chat"){console.log("\u{1F4AC} \u68C0\u6D4B\u5230chat\u83DC\u5355\u70B9\u51FB\uFF0C\u8DF3\u8F6C\u5230\u65B0\u7684\u804A\u5929\u89C6\u56FE");try{h.push("/chat?new=true");}catch(K){console.error("\u274C \u65E0\u6CD5\u8DF3\u8F6C\u5230\u65B0\u804A\u5929\u89C6\u56FE:",K),h.push("/chat");}return}let U=z.appurl||z.href;U&&(U.startsWith("http://")||U.startsWith("https://")?window.open(U,"_blank"):h.push(U));},[h]),V=er.useCallback(()=>{l?.(s==="fixed"?"floating":"fixed");},[s,l]);return c("div",{className:`flex flex-col backdrop-blur-xl border ${x?"shadow-[0_28px_80px_rgba(15,23,42,0.34)]":"shadow-[0_4px_8px_0_rgba(31,38,135,0.1)]"} ${t?"w-14 rounded-full":"w-[234px] rounded-2xl"} relative ${o} ${g?x?"border-white/25":"bg-[var(--orb-nav-bg)] border-white/10":x?"border-white/70":"bg-[color-mix(in_oklch,var(--orb-canvas)_70%,transparent)] border-white/30"}`,style:{backdropFilter:x?"blur(34px) saturate(230%) contrast(1.12)":"blur(16px) saturate(180%)",WebkitBackdropFilter:x?"blur(34px) saturate(230%) contrast(1.12)":"blur(16px) saturate(180%)",backgroundColor:x?g?"rgba(8, 12, 18, 0.34)":"rgba(255, 255, 255, 0.24)":void 0,backgroundImage:x?g?"radial-gradient(circle at 28% 8%, rgba(255,255,255,0.14), rgba(255,255,255,0) 44%), linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.015) 50%, color-mix(in oklch, var(--orb-ai-accent) 5%, transparent))":"radial-gradient(circle at 28% 8%, rgba(255,255,255,0.42), rgba(255,255,255,0) 46%), linear-gradient(145deg, rgba(255,255,255,0.22), rgba(255,255,255,0.07) 50%, color-mix(in oklch, var(--orb-ai-accent) 8%, transparent))":void 0,boxShadow:x?g?"inset 0 1px 0 rgba(255,255,255,0.20), inset 0 -1px 0 rgba(255,255,255,0.08), 0 26px 90px rgba(0,0,0,0.52), 0 0 0 1px rgba(255,255,255,0.06)":"inset 0 1px 0 rgba(255,255,255,0.88), inset 0 -1px 0 rgba(255,255,255,0.34), 0 26px 90px rgba(15,23,42,0.24), 0 0 0 1px rgba(255,255,255,0.35)":void 0,transition:"width 400ms cubic-bezier(0.4, 0.0, 0.2, 1), border-radius 0ms cubic-bezier(0.4, 0.0, 0.2, 1), box-shadow 400ms ease-out, background-color 220ms ease-out, backdrop-filter 220ms ease-out",maxHeight:n?`${n}px`:void 0},children:[e("div",{className:`pt-4 pb-2 transition-all duration-500 ease-in-out ${t?"px-1":"px-2"}`,children:t?e("div",{className:"flex justify-center",children:e("button",{onClick:r,className:`w-10 h-10 flex items-center justify-center rounded-lg transition-colors duration-200 ${g?"text-[var(--orb-fg)] hover:bg-[var(--orb-surface-2)]":"text-[var(--orb-muted)] hover:bg-[var(--orb-surface)]"}`,title:y("navigation.expand"),children:e(Hr,{className:"h-5 w-5"})})}):c("div",{className:`relative transition-opacity duration-300 ${t?"opacity-0":"opacity-100 delay-200"}`,children:[e("input",{type:"text",placeholder:y("navigation.searchPlaceholder"),value:C,onChange:z=>k(z.target.value),className:`w-full pl-10 pr-4 py-2 text-sm border rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--orb-primary)] focus:border-transparent ${g?"border-[var(--orb-border)] bg-[var(--orb-surface-2)] text-[var(--orb-fg)] placeholder-[var(--orb-muted)]":"border-[var(--orb-border)] bg-[var(--orb-canvas)] text-[var(--orb-fg)] placeholder-[var(--orb-muted)]"}`}),e("div",{className:"absolute left-3 top-1/2 transform -translate-y-1/2 pointer-events-none",children:e(Hr,{className:"h-4 w-4 text-[var(--orb-muted)]"})})]})}),e("nav",{className:`flex-1 pb-4 transition-all duration-500 ease-in-out overflow-y-auto min-h-0 ${t?"px-1":"px-2"}`,children:Y.length===0?e("div",{className:"flex items-center justify-center py-8 text-[var(--orb-muted)] text-sm",children:t?e(Hn,{className:"h-5 w-5"}):y(C?"navigation.noMatch":"navigation.noAccessibleApp")}):c(jsxRuntime.Fragment,{children:[!t&&e("div",{className:`transition-opacity duration-300 ${t?"opacity-0":"opacity-100 delay-200"}`,children:e(Xn,{items:Y,onItemClick:j,className:"space-y-1",expandedIds:W,colorMode:i,enablePinning:u,pinnedIds:E,onTogglePin:F,onToggleExpand:z=>{let U=new Set(w);Y.some(fe=>fe.id===z)?U.has(z)?U.delete(z):(Y.forEach(fe=>{fe.id!==z&&U.has(fe.id)&&U.delete(fe.id);}),U.add(z)):U.has(z)?U.delete(z):U.add(z),T(U);}})}),t&&e("div",{className:"space-y-2",children:X.map(z=>e("div",{className:"space-y-1",children:e("button",{onClick:()=>{r();let U=new Set([z.id]);T(U);},className:`w-full flex items-center justify-center p-2 rounded-lg cursor-pointer transition-colors duration-200 ${g?"text-[var(--orb-muted)] hover:bg-[var(--orb-surface-2)]":"text-[var(--orb-muted)] hover:bg-[var(--orb-surface)]"}`,title:y("navigation.expandView",{title:z.title||""}),children:z.icon||e("div",{className:`w-6 h-6 rounded text-xs flex items-center justify-center font-medium ${g?"bg-[var(--orb-nav-active-fg)] text-[#0b0b0b]":"bg-[var(--orb-primary)] text-[var(--orb-on-primary)]"}`,children:z.title?.charAt(0)||"?"})})},z.id))})]})}),!t&&e("button",{onClick:r,className:`absolute -bottom-1 -right-1 w-6 h-6 bg-transparent rounded-full flex items-center justify-center transition-all duration-300 ease-in-out z-20 ${g?"hover:bg-[color-mix(in_oklch,var(--orb-surface-2)_50%,transparent)]":"hover:bg-[color-mix(in_oklch,var(--orb-canvas)_20%,transparent)]"}`,title:y("navigation.collapse"),children:e("div",{className:"absolute",style:{bottom:"0px",right:"0px",width:"16px",height:"16px",overflow:"hidden"},children:e("div",{className:g?"border-[var(--orb-status-warning)]":"",style:{width:"32px",height:"32px",borderRadius:"16px",border:"3px solid var(--orb-ai-accent)",backgroundColor:"transparent",position:"absolute",top:"-16px",left:"-16px"}})})}),d&&t&&e("button",{type:"button",onClick:V,className:`absolute -bottom-4 left-1/2 z-30 flex h-9 w-9 -translate-x-1/2 items-center justify-center rounded-full border shadow-md transition-colors focus:outline-none focus:ring-2 focus:ring-[color-mix(in_oklch,var(--orb-primary)_45%,transparent)] ${g?"border-[var(--orb-border)] bg-[var(--orb-surface-2)] text-[var(--orb-fg)] hover:bg-[var(--orb-hover)]":"border-[var(--orb-border)] bg-[var(--orb-canvas)] text-[var(--orb-status-fg)] hover:bg-[var(--orb-p50)] hover:text-[var(--orb-status-primary)]"}`,style:{touchAction:"manipulation"},title:y(x?"navigation.mode.switchToFixed":"navigation.mode.switchToFloating"),"aria-label":y(x?"navigation.mode.switchToFixed":"navigation.mode.switchToFloating"),children:x?e(Oa,{className:"h-4 w-4"}):e(Fa,{className:"h-4 w-4"})})]})};P();var Pb="orbcafe:navigation-island:pinned-items",Ks="orbcafe-navigation-pinned",dd=t=>t.appurl||t.href,pd=t=>t.flatMap(r=>{let o=!!r.children?.length,n=r.pinnable!==false&&dd(r)&&!o?[{...r,children:void 0}]:[];return r.children?.length?[...n,...pd(r.children)]:n}),ud=t=>t.flatMap(r=>[r.id,...r.children?ud(r.children):[]]),md=(t,r)=>t.reduce((o,n)=>{let a=n.children?md(n.children,r):[];return ([n.title,n.label,n.description].some(s=>s?.toLocaleLowerCase().includes(r))||a.length>0)&&o.push({...n,children:a.length>0?a:n.children}),o},[]),qs=({collapsed:t,onToggle:r,className:o="",maxHeight:n,menuData:a=[],colorMode:i="light",displayMode:s="fixed",onDisplayModeChange:l,showDisplayModeToggle:d=true,enablePinning:u=true,pinStorageKey:p=Pb,pinnedItemIds:f,defaultPinnedItemIds:b=[],onPinnedItemIdsChange:m,pinnedSectionTitle:v})=>{let{t:y}=pe(),g=navigation.useRouter(),x=s==="floating",[h,C]=er.useState(""),[k,w]=er.useState(new Set),[T,I]=er.useState(b),[S,A]=er.useState(false),D=f!==void 0,M=f??T,N=er.useMemo(()=>new Set(M),[M]);er.useEffect(()=>{t&&w(new Set);},[t]),er.useEffect(()=>{if(!u||D){A(true);return}try{let z=window.localStorage.getItem(p);if(z){let U=JSON.parse(z);Array.isArray(U)&&I(U.filter(K=>typeof K=="string"));}}catch{}finally{A(true);}},[u,D,p]),er.useEffect(()=>{if(!(!u||D||!S))try{window.localStorage.setItem(p,JSON.stringify(M));}catch{}},[M,u,D,p,S]),er.useEffect(()=>{!u||t||M.length===0||w(z=>{if(z.has(Ks))return z;let U=new Set(z);return U.add(Ks),U});},[t,M.length,u]);let E=er.useCallback(z=>{let U=Array.from(new Set(z));D||I(U),m?.(U);},[D,m]),O=er.useCallback(z=>{E(N.has(z.id)?M.filter(U=>U!==z.id):[...M,z.id]);},[M,N,E]),F=er.useMemo(()=>{if(!u||M.length===0)return a;let z=new Map(pd(a).map(K=>[K.id,K])),U=M.map(K=>z.get(K)).filter(K=>!!K);return U.length===0?a:[{id:Ks,title:v||y("navigation.pinned"),icon:e(Jo,{className:"h-4 w-4"}),children:U,pinnable:false},...a]},[M,u,a,v,y]),X=h.trim().toLocaleLowerCase(),H=er.useMemo(()=>X?md(F,X):F,[F,X]),Y=er.useMemo(()=>X?new Set(ud(H)):k,[k,H,X]),W=er.useCallback(z=>{w(U=>{let K=new Set(U),fe=H.some(se=>se.id===z);return K.has(z)?K.delete(z):(fe&&H.forEach(se=>K.delete(se.id)),K.add(z)),K});},[H]),j=er.useCallback(z=>{let U=dd(z);U&&(z.id==="chat"||z.appurl==="/chat"?g.push("/chat?new=true"):/^https?:\/\//.test(U)?window.open(U,"_blank","noopener,noreferrer"):g.push(U));},[g]),V=z=>{r(),w(new Set([z.id]));};return c("aside",{"data-navigation-island":"v2","data-collapsed":t||void 0,className:`orb-navigation-island-v2 relative flex flex-col border ${t?"w-14":"w-[234px]"} ${o}`,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:r,className:"mx-auto flex h-10 w-10 items-center justify-center rounded-lg text-[var(--orb-muted)] transition-colors hover:bg-[var(--orb-p50)] hover:text-[var(--orb-status-primary)]",title:y("navigation.expand"),"aria-label":y("navigation.expand"),children:e(Hr,{className:"h-5 w-5"})}):c("label",{className:"relative block",children:[e("span",{className:"orb-visually-hidden",children:y("navigation.searchPlaceholder")}),e(Hr,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[var(--orb-muted)]"}),e("input",{type:"search",value:h,onChange:z=>C(z.target.value),placeholder:y("navigation.searchPlaceholder"),className:"w-full py-2 pl-10 pr-3 text-sm outline-none"})]})}),e("nav",{className:`min-h-0 flex-1 overflow-y-auto pb-2 ${t?"px-1":"px-2"}`,children:H.length===0?e("div",{className:"flex items-center justify-center py-8 text-sm text-[var(--orb-muted)]",children:t?e(Hn,{className:"h-5 w-5"}):y(X?"navigation.noMatch":"navigation.noAccessibleApp")}):t?e("div",{className:"space-y-1",children:F.map(z=>e("button",{type:"button",onClick:()=>V(z),className:"flex h-10 w-full items-center justify-center rounded-lg text-[var(--orb-muted)] transition-colors hover:bg-[var(--orb-p50)] hover:text-[var(--orb-status-primary)]",title:y("navigation.expandView",{title:z.title||z.label||""}),children:z.icon||e(Hn,{className:"h-5 w-5"})},z.id))}):e(Xn,{items:H,onItemClick:j,className:"space-y-1",expandedIds:Y,onToggleExpand:W,colorMode:i,enablePinning:u,pinnedIds:N,onTogglePin:O})}),d&&t&&e("div",{className:"orb-navigation-island-v2-footer flex flex-col items-center gap-1 border-t px-1 py-2",children:e("button",{type:"button",onClick:()=>l?.(x?"fixed":"floating"),className:"flex h-9 w-9 items-center justify-center rounded-lg text-[var(--orb-muted)] transition-colors hover:bg-[var(--orb-p50)] hover:text-[var(--orb-status-primary)]",title:y(x?"navigation.mode.switchToFixed":"navigation.mode.switchToFloating"),"aria-label":y(x?"navigation.mode.switchToFixed":"navigation.mode.switchToFloating"),children:x?e(Oa,{className:"h-4 w-4"}):e(Fa,{className:"h-4 w-4"})})}),!t&&e("button",{type:"button",onClick:r,className:"absolute -bottom-1 -right-1 z-20 flex h-6 w-6 items-center justify-center rounded-full bg-transparent transition-all duration-300 ease-in-out",title:y("navigation.collapse"),"aria-label":y("navigation.collapse"),children:e("span",{"aria-hidden":"true",className:"absolute overflow-hidden",style:{bottom:0,right:0,width:16,height:16},children:e("span",{className:"absolute rounded-full border-[3px] border-[var(--orb-ai-accent)]",style:{width:32,height:32,top:-16,left:-16}})})})]})};qs.displayName="NavigationIsland2";var fd=(t={})=>{let{initialCollapsed:r=false,initialDisplayMode:o="fixed",content:n=[],enablePinning:a,pinStorageKey:i,pinnedItemIds:s,defaultPinnedItemIds:l,onPinnedItemIdsChange:d,pinnedSectionTitle:u}=t,[p,f]=er.useState(r),[b,m]=er.useState(o),[v,y]=er.useState(n),g=er.useCallback(()=>{f(C=>!C);},[]),x=er.useCallback(()=>{m(C=>C==="fixed"?"floating":"fixed");},[]),h=er.useMemo(()=>({collapsed:p,onToggle:g,menuData:v,displayMode:b,onDisplayModeChange:m,enablePinning:a,pinStorageKey:i,pinnedItemIds:s,defaultPinnedItemIds:l,onPinnedItemIdsChange:d,pinnedSectionTitle:u}),[p,g,v,b,m,a,i,s,l,d,u]);return {collapsed:p,setCollapsed:f,toggleCollapsed:g,displayMode:b,setDisplayMode:m,toggleDisplayMode:x,menuData:v,setMenuData:y,navigationIslandProps:h}};var Ys=class{constructor(){fc(this,"listener",null);}register(r){this.listener=r;}unregister(){this.listener=null;}show(r,o,n){this.listener&&this.listener({type:r,content:o,options:n});}hide(){this.listener&&this.listener(null);}},ao=new Ys,dT={success:(t,r)=>ao.show("success",t,r),error:(t,r)=>ao.show("error",t,r),warning:(t,r)=>ao.show("warning",t,r),info:(t,r)=>ao.show("info",t,r),show:(t,r,o)=>ao.show(t,r,o),hide:()=>ao.hide()};P();var Ib={success:{icon:e(Bn,{size:40}),color:"var(--orb-success-bg)",iconColor:"var(--orb-success)"},warning:{icon:e(Ha,{size:40}),color:"var(--orb-warn-bg)",iconColor:"var(--orb-warn)"},error:{icon:e(Ra,{size:40}),color:"var(--orb-err-bg)",iconColor:"var(--orb-err)"},info:{icon:e(Na,{size:40}),color:"var(--orb-info-bg)",iconColor:"var(--orb-info)"},default:{icon:null,color:"transparent",iconColor:"inherit"}},jn=({open:t,title:r,message:o,onClose:n,onConfirm:a,confirmText:i,cancelText:s,showCancel:l=true,maxWidth:d="xs",type:u="default"})=>{let{t:p}=pe(),f=i||p("messageBox.confirm"),b=s||p("messageBox.cancel"),m=()=>{a?a():n();},v=Ib[u],y=u!=="default";return c(Lt,{open:t,onClose:n,maxWidth:d,sx:y?{borderTop:`6px solid ${v.iconColor}`}:void 0,children:[y&&e("div",{style:{display:"flex",justifyContent:"center",paddingTop:24,color:v.iconColor},children:v.icon}),r&&e("div",{className:"orb-dialog-title",style:{textAlign:y?"center":"left",paddingTop:y?8:16},children:r}),e("div",{className:"orb-dialog-content",style:{textAlign:y?"center":"left"},children:typeof o=="string"?e("p",{style:{margin:0,color:"var(--orb-muted)"},children:o}):o}),c("div",{className:"orb-dialog-actions",style:{display:"flex",justifyContent:y?"center":"flex-end",gap:8,paddingBottom:24,paddingLeft:24,paddingRight:24},children:[l&&e(we,{onClick:n,variant:"text",children:b}),e(we,{onClick:m,variant:"contained",color:y&&u==="error"?"error":"primary",autoFocus:true,children:f})]})]})},vT=()=>{let[t,r]=er__namespace.default.useState(null),[o,n]=er__namespace.default.useState(false);er__namespace.default.useEffect(()=>{let s=l=>{l?(r(l),n(true)):(n(false),r(null));};return ao.register(s),()=>ao.unregister()},[]);let a=()=>{n(false),t?.options?.onClose&&t.options.onClose(),r(null);},i=()=>{t?.options?.onConfirm&&t.options.onConfirm(),n(false),r(null);};return t?e(jn,{open:o,type:t.type,message:t.content,title:t.options?.title,onClose:a,onConfirm:i,confirmText:t.options?.confirmText,cancelText:t.options?.cancelText,showCancel:t.options?.showCancel,maxWidth:t.options?.maxWidth}):null};P();var wT=({status:t,showIcon:r=true})=>{let o="gray",n,a=t;return t==="OK"?(o="blue",n=e(Bn,{size:14,strokeWidth:2}),a="Success"):t==="Error"?(o="orange",n=e(Ra,{size:14,strokeWidth:2}),a="Error"):t==="Warning"&&(o="orange",n=e(Ha,{size:14,strokeWidth:2}),a="Warning"),e(xt,{label:a,tone:o,icon:r&&n?n:void 0})};P();var TT=({dense:t,sx:r,className:o,children:n,...a})=>e("ul",{...a,className:o,style:{listStyle:"none",margin:0,padding:0,...r},children:n}),IT=({button:t,divider:r,sx:o,className:n,children:a,...i})=>e("li",{...i,className:n,style:{display:"flex",alignItems:"center",padding:"8px 16px",minHeight:40,borderBottom:r?"1px solid var(--orb-border)":void 0,cursor:t?"pointer":void 0,transition:"var(--orb-t-fast)",...o},onMouseEnter:t?s=>{s.currentTarget.style.background="var(--orb-hover)";}:void 0,onMouseLeave:t?s=>{s.currentTarget.style.background="";}:void 0,children:a}),MT=({sx:t,className:r,children:o,...n})=>e("button",{...n,type:"button",className:r,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:o}),RT=({children:t,sx:r})=>e("div",{style:{marginRight:16,display:"flex",alignItems:"center",minWidth:40,...r},children:t}),DT=({primary:t,secondary:r,sx:o})=>c("div",{style:{flex:1,minWidth:0,...o},children:[e("div",{className:"orb-body",style:{fontWeight:500},children:t}),r&&e("div",{className:"orb-meta",style:{marginTop:2},children:r})]}),NT=({sx:t,className:r,children:o,...n})=>e("li",{...n,className:r,style:{padding:"8px 16px",fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.06em",color:"var(--orb-muted)",...t},children:o}),AT=({children:t,sx:r})=>e("div",{style:{marginRight:12,display:"flex",alignItems:"center",...r},children:t});P();var OT=({xs:t,md:r,lg:o,sx:n,children:a,className:i,...s})=>{let l=o?`span ${o}`:r?`span ${r}`:t?`span ${t}`:"span 12";return e("div",{...s,className:i,style:{gridColumn:l,minWidth:0,...n},children:a})};_t();P();var Ar=rt,ir=(t,r)=>er.forwardRef(({component:o,sx:n,className:a,style:i,children:s,...l},d)=>{let u=o??t,p=Ue(n,[r,a].filter(Boolean).join(" "),i);return e(u,{ref:d,className:p.className,style:p.style,...l,children:s})}),Ie=ir("div"),hd=ir("a","orb-link"),Bo=Ae,vd=ie,hr=L;var yd=ae;var Cd=Dt,jr=on,Qa=rn,Ja=Wa;var ei=Va,xd=Xr,Sd=({value:t,variant:r,color:o,sx:n})=>e($n,{value:r==="determinate"?t:void 0,color:o,sx:n}),wd=ir("table","orb-tbl"),kd=ir("tbody"),Qs=ir("td"),Pd=ir("div","orb-table-container"),Td=ir("thead"),Js=ir("tr");ir("tfoot");ir("div","orb-dialog-title");ir("div","orb-dialog-content");ir("div","orb-dialog-actions");ir("p","orb-body-dense");var io=ir("span","orb-input-adornment"),Id=er.forwardRef(({sx:t,fullWidth:r,className:o,style:n,...a},i)=>{let s=Ue(t,["orb-input-base",o].filter(Boolean).join(" "),n);return e("input",{ref:i,className:s.className,style:{width:r?"100%":void 0,...s.style},...a})});var Co=ir("div","orb-form-control"),Qn=({control:t,label:r,...o})=>c("label",{className:"orb-form-control-label",...o,children:[t,e("span",{children:r})]}),Eb=({primary:t,secondary:r,children:o,primaryTypographyProps:n,secondaryTypographyProps:a,...i})=>c("span",{className:"orb-list-item-text",...i,children:[t??o,r?e("small",{children:r}):null]}),Lb=ir("span","orb-list-item-icon"),Gt=Eb,zr=Lb;ir("div","orb-list-subheader");var el=({container:t,item:r,spacing:o,xs:n,sm:a,md:i,lg:s,xl:l,sx:d,...u})=>{let p={},f=b=>typeof b=="number"?`${b/12*100}%`:b?"100%":void 0;return n!==void 0&&(p.xs=f(n)),a!==void 0&&(p.sm=f(a)),i!==void 0&&(p.md=f(i)),s!==void 0&&(p.lg=f(s)),l!==void 0&&(p.xl=f(l)),e(Ie,{...u,sx:{display:t?"flex":void 0,flexWrap:t?"wrap":void 0,gap:t&&o?o:void 0,width:r?p:void 0,...d??{}}})},nn=({in:t,children:r,unmountOnExit:o,...n})=>!t&&o?null:e("div",{hidden:!t,...n,children:r}),Md=({children:t,container:r})=>typeof document>"u"?null:reactDom.createPortal(t,r??document.body),Rd=ir("div","orb-toolbar"),Dd=({active:t,direction:r="asc",children:o,sx:n,className:a,style:i,...s})=>{let l=Ue(n,["orb-table-sort-label",t?"orb-is-active":"",a].filter(Boolean).join(" "),i);return c("button",{type:"button",className:l.className,style:l.style,"data-direction":r,...s,children:[e("span",{className:"orb-table-sort-content",children:o}),e(Tt,{className:"orb-table-sort-icon",name:r==="desc"?"down":"up",size:11})]})},ti=({open:t,anchorEl:r,onClose:o,children:n,anchorOrigin:a,transformOrigin:i,slotProps:s,PaperProps:l,sx:d,className:u,style:p,...f})=>{let b=er.useRef(null);if(er.useEffect(()=>{if(!t)return;let x=C=>{let k=C.composedPath();b.current&&k.includes(b.current)||r&&k.includes(r)||o?.();},h=C=>{C.key==="Escape"&&o?.();};return document.addEventListener("pointerdown",x,true),document.addEventListener("keydown",h,true),()=>{document.removeEventListener("pointerdown",x,true),document.removeEventListener("keydown",h,true);}},[r,o,t]),!t||typeof document>"u")return null;let m=r?.getBoundingClientRect(),v=s?.paper??l,y=[...Array.isArray(v?.sx)?v.sx:v?.sx?[v.sx]:[],...Array.isArray(d)?d:d?[d]:[]],g=Ue(y,["orb-pop",v?.className,u].filter(Boolean).join(" "),{...v?.style,...p});return reactDom.createPortal(e("div",{...f,ref:b,className:g.className,style:{position:"fixed",left:m?.left??16,top:(m?.bottom??16)+6,zIndex:1301,...g.style},children:n}),document.body)},Nd=({open:t,onClose:r,anchor:o="left",children:n,PaperProps:a})=>{if(!t||typeof document>"u")return null;let i=o==="right"?{right:0,top:0,bottom:0}:o==="top"?{left:0,right:0,top:0}:o==="bottom"?{left:0,right:0,bottom:0}:{left:0,top:0,bottom:0},s=Ue(a?.sx,"orb-drawer");return reactDom.createPortal(c(jsxRuntime.Fragment,{children:[e("button",{type:"button",className:"orb-overlay","aria-label":"Close drawer",onClick:r}),e("aside",{className:s.className,style:{position:"fixed",zIndex:1201,...i},children:n})]}),document.body)},Ad=({value:t,onChange:r,children:o,variant:n,scrollButtons:a,...i})=>e("div",{role:"tablist",className:"orb-tabs",...i,children:er.Children.map(o,s=>er.isValidElement(s)?er.cloneElement(s,{selected:s.props.value===t,onSelect:l=>r?.(null,l)}):s)}),Ed=({value:t,label:r,children:o,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:r??o});var sr=()=>Pa(),xo=(t,r)=>Dr(t);var Ld=({day:t,onDaySelect:r,selected:o,outsideCurrentMonth:n,disableMargin:a,sx:i,className:s,...l})=>{let d=Ue(i,`orb-cal-day ${o?"orb-is-selected":""} ${n?"orb-is-outside":""} ${s??""}`);return e("button",{type:"button",className:d.className,style:d.style,onClick:()=>r?.(t),...l,children:t.date()})},Od=({value:t,referenceDate:r,onChange:o,onMonthChange:n,onYearChange:a,minDate:i,maxDate:s,slots:l,...d})=>e(Un,{value:t,month:r,onChange:u=>o?.(u),onMonthChange:u=>{n?.(u),a?.(u);},minDate:i,maxDate:s,renderDay:l?.day?(u,p)=>l.day?.({day:u,selected:p.selected,outsideCurrentMonth:p.outsideCurrentMonth,onDaySelect:f=>o?.(f)}):void 0,...d}),Fd=({children:t})=>e(jsxRuntime.Fragment,{children:t}),ja=class{};_t();P();var Ob=(t,r)=>r!==void 0?r:typeof t=="number"?t:t==="small"?18:t==="large"?30:t==="inherit"?"1em":22,xe=t=>({fontSize:o,size:n,sx:a,className:i,style:s,titleAccess:l,...d})=>{let u=Ue(a,i,s);return e(Tt,{name:t,size:Ob(o,n),className:u.className,style:u.style,"aria-label":d["aria-label"]??l,...d})},So=xe("tree"),Ho=xe("add"),Bd=xe("duplicate"),tl=xe("down"),Hd=xe("navigationRight"),zd=xe("navigationRight"),rl=xe("up"),Vd=xe("delete"),Wd=xe("camera"),$d=xe("accept"),_d=xe("accept"),ri=xe("navigationRight"),Gd=xe("dimension"),Ud=xe("decline"),wo=xe("decline"),Kd=xe("decline"),qd=xe("decline"),oi=xe("delete"),ni=xe("delete"),Xd=xe("download"),Yd=xe("move"),Zd=xe("edit"),an=xe("slimDown"),jd=xe("filter"),sn=xe("sum"),Qd=xe("lineChart"),Jd=xe("document"),Vr=xe("slimDown"),ep=xe("navigationLeft"),ko=xe("navigationRight"),ai=xe("slimUp"),ii=xe("navigationLeft"),si=xe("navigationRight"),tp=xe("dimension"),rp=xe("splitOne"),li=xe("menu"),op=xe("microphone"),np=xe("microphone"),ap=xe("microphone"),ip=xe("qrCode"),Po=xe("save"),zo=xe("search"),sp=xe("search"),lp=xe("paperPlane"),cp=xe("paperPlane"),dp=xe("wrench"),pp=xe("sort"),ci=xe("splitTwo"),up=xe("favorite"),mp=xe("favorite"),gp=xe("stop"),fp=xe("tableRow"),di=xe("collapseAll"),pi=xe("expandAll"),ln=xe("tableColumn"),bp=xe("overview"),hp=xe("hide");P();var Bb=[{field:"value",label:"Value",minWidth:120},{field:"label",label:"Description",minWidth:180}],yp=t=>Array.isArray(t)?t:t==null||t===""?[]:[t],kr=t=>String(t),Cp=(t,r)=>t[r],xp=t=>{let r=t.value??t.id??t.key??t.code;return typeof r=="number"||typeof r=="string"?r:""},Hb=t=>{let r=t.label??t.description??t.name??t.title;return String(typeof r=="number"||typeof r=="string"?r:xp(t))},zb=t=>{let r=t.description??t.subtitle;return typeof r=="number"||typeof r=="string"?String(r):void 0},Sp=({value:t=null,items:r=[],columns:o,mode:n="single",dialogTitle:a="Value Help",searchPlaceholder:i="Search values...",selectLabel:s="Select",clearLabel:l="Clear",cancelLabel:d="Cancel",valueHelpLabel:u="Open value help",noResultsText:p="No matching values",loading:f=false,clearable:b=true,allowManualInput:m=true,validateManualInput:v=true,manualInputErrorText:y="Enter a valid value.",selectedItems:g=[],displayValue:x,getOptionValue:h=xp,getOptionLabel:C=Hb,getOptionDescription:k=zb,onChange:w,onSearch:T,disabled:I,InputProps:S,onFocus:A,onBlur:D,onKeyDown:M,error:N,helperText:E,...O})=>{let F=Cr(),X=n==="multiple",[H,Y]=er.useState(false),[W,j]=er.useState(false),[V,z]=er.useState(""),[U,K]=er.useState(null),[fe,se]=er.useState(false),[ue,Se]=er.useState(()=>yp(t)),[$e,ke]=er.useState(""),[le,Ee]=er.useState(""),Me=er.useMemo(()=>o&&o.length>0?o:Bb,[o]),Pe=U??r,Ve=er.useMemo(()=>{let te=[...g,...r,...U??[]],he=new Map;return te.forEach(Ne=>{he.set(kr(h(Ne)),Ne);}),he},[h,r,U,g]),tt=er.useMemo(()=>yp(t),[t]),nt=er.useMemo(()=>tt.map(String).join(", "),[tt]);er.useEffect(()=>{H||Se(tt);},[H,tt]),er.useEffect(()=>{!W&&!le&&ke(nt);},[W,nt,le]);let it=er.useMemo(()=>{let te=V.trim().toLowerCase();if(!te||T)return Pe;let he=Me.filter(Ne=>Ne.searchable!==false);return Pe.filter(Ne=>[h(Ne),C(Ne),k(Ne),...he.map(st=>Cp(Ne,st.field))].some(st=>String(st??"").toLowerCase().includes(te)))},[Pe,k,C,h,T,V,Me]),q=er.useMemo(()=>{if(x!==void 0)return x;if(tt.length===0)return "";let te=he=>{let Ne=Ve.get(kr(he));if(!Ne)return String(he);let Je=C(Ne);return Je&&Je!==String(he)?`${he} - ${Je}`:String(he)};return X?tt.length>2?`${tt.length} selected`:tt.map(te).join(", "):te(tt[0])},[x,C,X,Ve,tt]),De=er.useCallback(async()=>{if(T){se(true);try{let te=await T(V);Array.isArray(te)&&K(te);}finally{se(false);}}},[T,V]),ye=()=>{I||(Se(tt),Y(true));},Be=()=>{Y(false);},at=()=>{w?.(X?[]:null,X?[]:null),Se([]),ke(""),Ee("");},Ze=te=>{let he=h(te);if(X){Se(Ne=>Ne.some(st=>kr(st)===kr(he))?Ne.filter(st=>kr(st)!==kr(he)):[...Ne,he]);return}Se([he]);},St=()=>{let te=ue.map(he=>Ve.get(kr(he))).filter(he=>!!he);X?w?.(ue,te):w?.(ue[0]??null,te[0]??null),Ee(""),Y(false);},Mt=te=>{if(te.key==="F4"){te.preventDefault(),ye();return}if(te.key==="Enter"&&m&&!At($e,true)){te.preventDefault();return}M?.(te);},Ot=te=>v?te.every(he=>Ve.has(kr(he))):true,At=(te,he)=>{if(X){let Je=te.split(/[,;\n]/).map(pt=>pt.trim()).filter(Boolean);if(Je.length===0)return Ee(""),w?.([],[]),true;if(!Ot(Je))return he&&Ee(y),false;Ee("");let st=Je.map(pt=>Ve.get(kr(pt))).filter(pt=>!!pt);return w?.(Je,st),true}let Ne=te.trim();return Ne?Ot([Ne])?(Ee(""),w?.(Ne,Ve.get(kr(Ne))??null),true):(he&&Ee(y),false):(Ee(""),w?.(null,null),true)},re=te=>{if(!m)return;let he=te.target.value;ke(he),Ee(""),At(he,false);},Ke=f||fe,Fe=tt.length>0,ve=m&&(W||!!le)?$e:q;return c(jsxRuntime.Fragment,{children:[e(ze,{...O,className:["orb-value-help-field",b&&Fe&&!I?"orb-value-help-has-clear":"",O.className??""].filter(Boolean).join(" "),disabled:I,value:ve,error:!!le||N,helperText:le||E,onChange:re,onFocus:te=>{j(true),ke(nt),A?.(te);},onBlur:te=>{m&&At($e,true),j(false),D?.(te);},onKeyDown:Mt,InputProps:{...S,readOnly:!m,endAdornment:c("span",{className:"orb-value-help-actions",children:[Ke?e(Xr,{size:18}):null,b&&Fe&&!I?e(ae,{className:"orb-value-help-clear-trigger",size:"small",tooltip:l,"aria-label":l,onMouseDown:te=>te.preventDefault(),onClick:te=>{te.stopPropagation(),at();},children:e(Tt,{name:"decline",size:14})}):null,e(ae,{className:"orb-value-help-search-trigger",size:"small",tooltip:u,"aria-label":u,onMouseDown:te=>te.preventDefault(),onClick:te=>{te.stopPropagation(),ye();},disabled:I,children:e(Tt,{name:"search",size:16})})]})}}),c(Lt,{open:H,onClose:Be,fullWidth:true,maxWidth:820,hideCloseButton:true,PaperProps:{sx:te=>({borderRadius:2,overflow:"hidden",border:`1px solid ${te.palette.divider}`,boxShadow:F==="dark"?`0 24px 80px ${rt(te.palette.common.black,.72)}`:`0 24px 80px ${rt(te.palette.common.black,.18)}`})},children:[c("div",{className:"orb-dialog-title",sx:te=>({display:"flex",alignItems:"center",justifyContent:"space-between",gap:2,px:2.5,py:2,pr:1.5,borderBottom:`1px solid ${te.palette.divider}`,bgcolor:te.palette.background.paper}),children:[c("div",{children:[e(L,{sx:{fontSize:"1.05rem",fontWeight:800,lineHeight:1.25},children:a}),X?e(L,{variant:"body2",color:"text.secondary",sx:{mt:.25},children:`${ue.length} selected`}):null]}),e(ae,{"aria-label":"Close",onClick:Be,size:"small",children:e(wo,{fontSize:"small"})})]}),c("div",{className:"orb-dialog-content",sx:{p:0},children:[c(ie,{direction:{xs:"column",sm:"row"},spacing:1,sx:te=>({px:2.5,py:1.5,borderBottom:`1px solid ${te.palette.divider}`,bgcolor:F==="dark"?rt(te.palette.common.white,.025):rt(te.palette.primary.main,.035)}),children:[e(ze,{size:"small",fullWidth:true,autoFocus:true,value:V,placeholder:i,onChange:te=>z(te.target.value),onKeyDown:te=>{te.key==="Enter"&&(te.preventDefault(),De());},InputProps:{startAdornment:e(io,{position:"start",children:e(Tt,{name:"search",size:16})}),sx:te=>({borderRadius:1,bgcolor:te.palette.background.paper,"& fieldset":{borderColor:rt(te.palette.text.primary,F==="dark"?.2:.16)},"&:hover fieldset":{borderColor:rt(te.palette.primary.main,.52)},"&:focus-within fieldset":{borderColor:te.palette.primary.main}})}}),T?e(we,{variant:"outlined",onClick:()=>{De();},disabled:Ke,sx:{minWidth:96,textTransform:"none",fontWeight:700},children:Ke?e(Xr,{size:18}):"Search"}):null]}),e("div",{sx:{maxHeight:420},children:c("table",{className:"orb-tbl",stickyHeader:true,size:"small",children:[e("thead",{children:c("tr",{children:[e("td",{padding:"checkbox",sx:te=>({bgcolor:F==="dark"?"var(--orb-canvas)":te.palette.background.paper,borderBottom:`1px solid ${te.palette.divider}`})}),Me.map(te=>e("td",{align:te.align==="inherit"?void 0:te.align,sx:he=>({minWidth:te.minWidth,width:te.width,fontSize:"0.78rem",fontWeight:800,bgcolor:F==="dark"?"var(--orb-canvas)":he.palette.background.paper,borderBottom:`1px solid ${he.palette.divider}`}),children:te.label},String(te.field)))]})}),c("tbody",{children:[it.map(te=>{let he=h(te),Ne=ue.some(Je=>kr(Je)===kr(he));return c("tr",{hover:true,selected:Ne,onClick:()=>Ze(te),onDoubleClick:()=>{X||(Se([he]),w?.(he,te),Y(false));},sx:Je=>({cursor:"pointer","&.orb-selected":{bgcolor:rt(Je.palette.primary.main,F==="dark"?.22:.12)},"&.orb-selected:hover":{bgcolor:rt(Je.palette.primary.main,F==="dark"?.28:.18)}}),children:[e("td",{padding:"checkbox",children:e(It,{size:"small",checked:Ne})}),Me.map(Je=>{let st=Cp(te,Je.field);return e("td",{align:Je.align==="inherit"?void 0:Je.align,sx:{fontSize:"0.82rem",py:1},children:Je.render?Je.render(st,te):String(st??"")},String(Je.field))})]},kr(he))}),it.length===0?e("tr",{children:e("td",{colSpan:Me.length+1,children:e("div",{sx:{py:5,textAlign:"center",color:"text.secondary"},children:p})})}):null]})]})})]}),c("div",{className:"orb-dialog-actions",sx:te=>({px:2.5,py:1.5,borderTop:`1px solid ${te.palette.divider}`,bgcolor:te.palette.background.paper,"& .orb-btn":{textTransform:"none",fontWeight:700}}),children:[b&&(Fe||ue.length>0)?e(we,{onClick:at,children:l}):null,e("div",{sx:{flex:1}}),e(we,{onClick:Be,children:d}),e(we,{variant:"contained",onClick:St,disabled:!X&&ue.length===0,children:s})]})]})]})};P();var ui=({title:t,hideHeader:r,children:o})=>c("div",{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[!r&&e("div",{sx:{mb:2},children:e(L,{variant:"h4",children:t})}),e("div",{sx:{flex:1,overflow:"hidden"},children:o})]});var ol={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"},nl={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"},Jn={width:30,height:30,p:.25,flex:"0 0 auto","& svg":{fontSize:20}},ea={width:30,height:30,minWidth:30,minHeight:30,p:.25,flex:"0 0 auto","& svg":{fontSize:20}},wp={display:"flex",alignItems:"center",justifyContent:"center",gap:.25,width:"100%",minWidth:0},pr={width:32,height:32,minWidth:32,minHeight:32,p:0,flex:"0 0 auto",borderRadius:1,color:"text.secondary","& svg, & [data-sap-icon]":{width:16,height:16,fontSize:16,strokeWidth:1.8}};P();var Vb={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"}},mi=({rowsPerPage:t=20,rowsPerPageOptions:r=[20,50,100,-1],page:o=0,count:n=0,onRowsPerPageChange:a,onPageChange:i})=>{let{t:s}=pe(),l=r.length>0?r:[20,50,100,-1],d=Math.max(0,o),u=t===-1?1:Math.max(1,Math.ceil(n/t)),p=Math.min(d+1,u),f=d>0,b=d<u-1&&t!==-1;return c("div",{className:"orb-table-pager",children:[e(L,{className:"orb-table-pager-label",children:s("table.toolbar.itemsPerPage")}),e(ct,{title:s("table.toolbar.itemsPerPage"),children:e(zt,{size:"small",variant:"standard",value:t,"aria-label":s("table.toolbar.itemsPerPage"),fullWidth:false,disableUnderline:true,onChange:m=>a?.(Number(m.target.value)),sx:Vb,children:l.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(ae,{className:"orb-table-pager-button","aria-label":"Previous page",size:"small",onClick:()=>i?.(Math.max(d-1,0)),disabled:!f,sx:pr,children:e(ep,{})}),c(L,{className:"orb-table-pager-page",title:s("table.toolbar.pageOf",{current:p,total:u}),children:[p," / ",u]}),e(ae,{className:"orb-table-pager-button","aria-label":"Next page",size:"small",onClick:()=>i?.(Math.min(d+1,u-1)),disabled:!b,sx:pr,children:e(ko,{})})]})};P();var gi=({value:t="",onChange:r})=>{let{t:o}=pe();return e("div",{className:"orb-table-toolbar-search",children:e(ze,{className:"orb-table-toolbar-search-field",size:"small",placeholder:o("table.toolbar.searchPlaceholder"),value:t,onChange:n=>r?.(n.target.value),InputProps:{startAdornment:e(io,{position:"start",children:e(zo,{size:16})})}})})};P();var fi=t=>{let{t:r}=pe(),o=Array.isArray(t.actions)?t.actions:t.actions?[t.actions]:[],n=Array.isArray(t.extraTools)?t.extraTools:t.extraTools?[t.extraTools]:[],a=[...o,...n],i=!!(t.showCreateButton||t.showEditButton||t.showDeleteButton),s=!!(t.onOpenGraphReport||t.onLayoutSave&&!t.layoutManager||t.layoutManager);return e(Rd,{className:"orb-table-toolbar",role:"toolbar","aria-label":r("table.title.default"),children:c("div",{className:"orb-table-toolbar-primary",children:[e(gi,{value:t.filterText,onChange:l=>{t.setFilterText(l),t.onPageChange?.(0);}}),e(mi,{rowsPerPage:t.rowsPerPage,rowsPerPageOptions:t.rowsPerPageOptions,page:t.page,count:t.count,onRowsPerPageChange:t.onRowsPerPageChange,onPageChange:t.onPageChange}),a.length>0?e("div",{className:"orb-table-toolbar-custom",children:a.map((l,d)=>e(er__namespace.default.Fragment,{children:l},`toolbar-custom-${d}`))}):null,e("span",{className:"orb-table-toolbar-spacer"}),c("div",{className:"orb-table-toolbar-actions",children:[c("div",{className:"orb-table-tool-group",children:[!t.disableGrouping&&e(ct,{title:r("table.toolbar.groupBy"),children:e(ae,{className:"orb-table-tool-button",sx:pr,onClick:l=>t.setGroupAnchorEl(t.groupAnchorEl?null:l.currentTarget),children:e(Ja,{badgeContent:t.grouping?.length,color:"primary",invisible:!t.grouping?.length,children:e(So,{})})})}),e(ct,{title:r("table.toolbar.summary"),children:e(ae,{className:`orb-table-tool-button ${t.showSummary?"orb-is-active":""}`,active:!!t.showSummary,sx:pr,onClick:l=>t.setSummaryAnchorEl(t.summaryAnchorEl?null:l.currentTarget),children:e(sn,{})})}),e(ct,{title:r("table.toolbar.columns"),children:e(ae,{className:"orb-table-tool-button",sx:pr,onClick:l=>t.setAnchorEl(t.anchorEl?null:l.currentTarget),children:e(ln,{})})}),e(ct,{title:r("table.toolbar.export"),children:e(ae,{className:"orb-table-tool-button",sx:pr,onClick:t.handleExport,children:e(Xd,{})})})]}),i&&c("div",{className:"orb-table-tool-group",children:[t.showCreateButton&&e(ct,{title:r("table.toolbar.newItem"),children:e(ae,{className:"orb-table-tool-button",onClick:t.onOpenCreateDialog,color:"primary.main",sx:pr,children:e(Ho,{})})}),t.showEditButton&&e(ct,{title:r("table.toolbar.editItem"),children:e("span",{children:e(ae,{className:"orb-table-tool-button",onClick:t.onOpenEditDialog,color:"primary.main",disabled:!!t.editDisabled,sx:pr,children:e(Zd,{})})})}),t.showDeleteButton&&e(ct,{title:r("table.toolbar.deleteItem"),children:e("span",{children:e(ae,{className:"orb-table-tool-button",onClick:t.onOpenDeleteConfirm,disabled:!!t.deleteDisabled,sx:{...pr,color:"error.main"},children:e(oi,{})})})})]}),s&&c("div",{className:"orb-table-tool-group",children:[t.onOpenGraphReport&&e(ct,{title:r("table.toolbar.graphicReport"),children:e(ae,{className:"orb-table-tool-button",sx:pr,onClick:t.onOpenGraphReport,children:e(Qd,{})})}),t.onLayoutSave&&!t.layoutManager&&e(ct,{title:r("table.toolbar.saveLayout"),children:e(ae,{className:"orb-table-tool-button",sx:pr,onClick:l=>t.onLayoutSave(l),children:e(Po,{})})}),t.layoutManager]})]})]})})};var bi=Object.freeze({Translate:{toString(t){if(!t)return;let{x:r,y:o}=t;return "translate3d("+(r?Math.round(r):0)+"px, "+(o?Math.round(o):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;let{scaleX:r,scaleY:o}=t;return "scaleX("+r+") scaleY("+o+")"}},Transform:{toString(t){if(t)return [bi.Translate.toString(t),bi.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:r,duration:o,easing:n}=t;return r+" "+o+"ms "+n}}});P();var hi=t=>{let{t:r}=pe(),{onSelectAllClick:o,order:n,orderBy:a,sortBy:i=[],numSelected:s=0,rowCount:l=0,onRequestSort:d,onContextMenu:u,columns:p,visibleColumns:f,selectionMode:b,grouping:m=[],isAllExpanded:v=false,handleToggleAll:y,onColumnResize:g,columnWidths:x,enableColumnReorder:h=false,disableSorting:C=false}=t,[k,w]=er.useState(null),T=er.useRef(null),I=W=>j=>{C||k||d(W);},S=(W,j,V)=>{W.preventDefault(),W.stopPropagation(),w(j),T.current={startX:W.clientX,startWidth:V,colId:j},document.addEventListener("mousemove",A),document.addEventListener("mouseup",D),document.body.style.cursor="col-resize";},A=W=>{if(!T.current)return;let{startX:j,startWidth:V,colId:z}=T.current,U=W.clientX-j,K=Math.max(50,V+U);g&&g(z,K);},D=()=>{w(null),T.current=null,document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",D),document.body.style.cursor="";};er.useEffect(()=>()=>{document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",D);},[]);let M=b==="multiple"||b==="single",N=m.length>0&&!!y,E=r(v?"table.group.collapseAll":"table.group.expandAll"),O=p.filter(W=>f.includes(W.id)),F=new Map(i.map((W,j)=>[W.field,{...W,priority:j+1}])),X=O.map(W=>{let j=x?.[W.id]||W.minWidth||100,V=F.get(W.id);return e(Xb,{headCell:W,width:typeof j=="number"?j:100,order:n,orderBy:a,multiSortInfo:C?void 0:V,onRequestSort:I(W.id),onContextMenu:u,onResizeMouseDown:z=>S(z,W.id,typeof j=="number"?j:100),enableColumnReorder:h,disableSorting:C},W.id)}),H=O.map(W=>W.id),Y=c("tr",{children:[M&&e("th",{className:"orb-table-control-head",style:{width:56,minWidth:56,maxWidth:56},children:e(It,{color:"primary",indeterminate:s>0&&s<l,checked:l>0&&s===l,onChange:o,disabled:b==="single",sx:Jn})}),N&&e("th",{className:"orb-table-control-head",style:{width:72,minWidth:72,maxWidth:72},children:e(ct,{title:E,children:e(ae,{size:"small",onClick:W=>{W.stopPropagation(),y?.(!v);},sx:ea,children:v?e(di,{}):e(pi,{})})})}),h?e(sortable.SortableContext,{items:H,strategy:sortable.horizontalListSortingStrategy,children:X}):X]});return e("thead",{children:Y})},Xb=({headCell:t,width:r,order:o,orderBy:n,multiSortInfo:a,onRequestSort:i,onContextMenu:s,onResizeMouseDown:l,enableColumnReorder:d,disableSorting:u})=>{let{setNodeRef:p,attributes:f,listeners:b,transform:m,transition:v,isDragging:y}=sortable.useSortable({id:t.id,disabled:!d}),g=d?{transform:bi.Transform.toString(m),transition:v,opacity:y?.6:1}:{},x=u?"asc":a?.direction??(n===t.id?o:"asc"),h=!u&&(!!a||n===t.id);return c("th",{ref:d?p:void 0,className:`orb-table-head-cell ${t.numeric?"orb-num":""} ${d?"orb-is-reorderable":""} ${y?"orb-is-dragging":""}`,"aria-sort":h?x==="asc"?"ascending":"descending":"none",onContextMenu:s?C=>s(C,t.id):void 0,style:{width:r,minWidth:r,maxWidth:r,...g},...d?f:{},...d?b:{},children:[u?e("span",{className:"orb-table-head-label",children:t.label}):e(Dd,{className:"orb-table-head-sort",active:h,direction:x,onClick:i,children:c("span",{className:"orb-table-head-label",children:[t.label,a&&e("span",{className:"orb-table-sort-priority",children:a.priority})]})}),e("div",{className:"orb-table-resize-handle",onMouseDown:l,onPointerDown:C=>C.stopPropagation(),onClick:C=>C.stopPropagation()})]})};P();var vi=t=>{let{t:r}=pe(),{visibleRows:o,visibleColumns:n,selected:a=[],handleClick:i,columns:s,toggleGroupExpand:l,expandedGroups:d=new Set,selectionMode:u,grouping:p=[],isGroupFullyExpanded:f,handleExpandGroupRecursively:b,handleCollapseGroupRecursively:m,emptyLabel:v,getRowDataKey:y,getRowProps:g,getGroupRowProps:x}=t,h=T=>a.indexOf(T)!==-1,C=u==="multiple"||u==="single",k=p.length>0,w=n.length+(C?1:0)+(k?1:0);return c("tbody",{children:[o.map((T,I)=>{if(T.type==="group"){let S=d.has(T.id),A=T.childIds||[],D=A.filter(W=>h(W)).length,M=A.length>0&&D===A.length,N=D>0&&D<A.length,E={entry:T,data:T,id:T.id,index:I,selected:M,group:true},O=x?.(E)||{},{className:F,onClick:X,...H}=O,Y=W=>{if(W.stopPropagation(),!!t.onSelectionChange)if(M){let j=a.filter(V=>!A.includes(V));t.onSelectionChange(j);}else {let j=Array.from(new Set([...a,...A]));t.onSelectionChange(j);}};return c("tr",{...H,"data-ctable-row-key":y?.(E),className:["orb-table-group-row",F].filter(Boolean).join(" "),onClick:X,sx:W=>({backgroundColor:"var(--orb-surface)","& th, & td":{color:W.palette.text.primary,borderBottomColor:W.palette.divider},"& .orb-icon-btn":{color:W.palette.text.primary},"& .orb-chk":{color:W.palette.text.secondary},"& .orb-chk:has(input:checked), & .orb-chk:has(input:indeterminate)":{color:W.palette.primary.main}}),children:[C&&e("td",{padding:"checkbox",sx:ol,children:e(It,{size:"small",checked:M,indeterminate:N,onChange:Y,onClick:W=>W.stopPropagation(),sx:Jn})}),k&&e("td",{padding:"checkbox",sx:nl,children:c("div",{sx:wp,children:[p.length>1&&T.level<p.length-1&&e(ct,{title:f?.(T.id)?r("table.group.collapseAll"):r("table.group.expandAll"),children:e(ae,{size:"small",onClick:()=>{f?.(T.id)?m?.(T.id):b?.(T.id);},sx:ea,children:f?.(T.id)?e(di,{}):e(pi,{})})}),e(ae,{size:"small",onClick:()=>l&&l(T.id),sx:ea,children:S?e(Vr,{}):e(ko,{})})]})}),e("td",{colSpan:n.length,sx:{py:1,pl:T.level*3+1},children:c(L,{variant:"body2",fontWeight:"bold",color:"text.primary",sx:{fontSize:"0.85rem"},children:[T.field,": ",T.value," (",T.count,")"]})})]},T.id)}else {let S=T.data||T,A=T.id||S.id||I,D=h(A),M=`enhanced-table-checkbox-${I}`,N={entry:T,data:S,id:A,index:I,selected:D,group:false},E=g?.(N)||{},{className:O,onClick:F,...X}=E,Y=(T.level!==void 0?T.level:0)*4;return c("tr",{...X,"data-ctable-row-key":y?.(N),className:[D?"orb-is-selected":"",O].filter(Boolean).join(" "),onClick:W=>{F?.(W),W.defaultPrevented||i?.(W,S);},role:C?"checkbox":X.role,"aria-checked":C?D:X["aria-checked"],tabIndex:X.tabIndex??-1,children:[C&&e("td",{padding:"checkbox",sx:ol,children:e(It,{color:"primary",checked:D,inputProps:{"aria-labelledby":M},sx:Jn})}),k&&e("td",{padding:"checkbox",sx:nl}),s.filter(W=>n.includes(W.id)).map((W,j)=>{let z=j===0&&Y>0?{pl:Y+2}:{};return e("td",{className:W.numeric?"orb-num":void 0,align:W.numeric?"right":"left",sx:z,children:W.render?W.render(S[W.id],S):(function(){let K=S[W.id];if(W.numeric){if(typeof K=="number")return K.toLocaleString();if(typeof K=="string"&&K.trim()!==""&&!isNaN(Number(K)))return Number(K).toLocaleString()}return K})()},W.id)})]},A)}}),o.length===0&&e("tr",{children:e("td",{colSpan:w,align:"center",children:v??r("common.noData")})})]})};P();var kp=t=>{let{columns:r=[],visibleColumns:o,summaryRow:n,selectionMode:a,grouping:i=[],columnWidths:s={}}=t;if(!t.showSummary)return null;let l=a==="multiple"||a==="single",d=i.length>0,u=r.filter(p=>o.includes(p.id));return e("tfoot",{className:"orb-table-footer",style:{zIndex:t.zIndex},children:c("tr",{children:[l&&e("td",{className:"orb-table-footer-control",style:{width:56,minWidth:56,maxWidth:56}}),d&&e("td",{className:"orb-table-footer-control",style:{width:72,minWidth:72,maxWidth:72}}),u.map(p=>e("td",{className:`orb-table-footer-cell ${p.numeric?"orb-num":""}`,style:{width:s[p.id]||p.minWidth||100,minWidth:s[p.id]||p.minWidth||100,maxWidth:s[p.id]||p.minWidth||100},children:(function(){let b=n[p.id];return b==null||b===""?"":typeof b=="number"?b.toLocaleString():typeof b=="string"&&b.trim()!==""&&!isNaN(Number(b))?Number(b).toLocaleString():b})()},p.id))]})})};P();var Pp=t=>{let{t:r}=pe();return e("div",{sx:{p:2},children:e(L,{children:r("table.mobile.notImplemented")})})};P();var pn=({groupAnchorEl:t,setGroupAnchorEl:r,grouping:o,setGrouping:n,columns:a})=>{let{t:i}=pe(),[s,l]=er.useState(o);er.useEffect(()=>{t&&l(o);},[t,o]);let d=()=>{l(o),r(null);},u=f=>{l(b=>b.includes(f)?b.filter(m=>m!==f):[...b,f]);},p=()=>{n(s),r(null);};return c(Qt,{anchorEl:t,open:!!t,onClose:d,sx:{width:224,minWidth:224,maxHeight:360,overflowY:"auto"},children:[c("div",{className:"orb-table-group-menu-header",onClick:f=>f.stopPropagation(),children:[e(L,{className:"orb-table-group-menu-title",variant:"subtitle2",children:i("table.menu.groupBy")}),s.length>0&&e(we,{className:"orb-table-group-menu-clear",size:"small",color:"error",onClick:f=>{f.stopPropagation(),l([]);},children:i("table.menu.clearAll")})]}),e(Dt,{className:"orb-table-group-menu-divider"}),a.map(f=>{let b=s.includes(f.id),m=s.indexOf(f.id)+1;return e("option",{className:"orb-table-group-menu-option",selected:b,onClick:v=>{v.stopPropagation(),u(f.id);},children:c("div",{className:"orb-table-group-menu-option-content",children:[e(It,{className:"orb-table-group-menu-checkbox",checked:b,size:"small"}),e(Gt,{className:"orb-table-group-menu-label",primary:f.label}),b&&e("span",{className:"orb-table-group-menu-order","aria-label":`${i("table.menu.groupBy")} ${m}`,children:m})]})},f.id)}),c("div",{className:"orb-table-group-menu-footer",children:[e(we,{size:"small",variant:"ghost",onClick:d,children:i("common.cancel")}),e(we,{size:"small",variant:"primary",onClick:p,children:i("common.ok")})]})]})},un=({anchorEl:t,setAnchorEl:r,columns:o,visibleColumns:n,toggleColumnVisibility:a})=>{let{t:i}=pe();return c(Qt,{anchorEl:t,open:!!t,onClose:()=>r(null),children:[e("option",{disabled:true,children:e(Gt,{primary:i("table.menu.visibleColumns")})}),e(Dt,{}),o.map(s=>c("option",{onClick:()=>a(s.id),children:[e(It,{checked:n.includes(s.id),size:"small"}),e(Gt,{primary:s.label})]},s.id))]})},yi=({anchorEl:t,setAnchorEl:r,showSummary:o,setShowSummary:n,columns:a,summaryColumns:i,toggleSummaryColumn:s})=>{let{t:l}=pe();return c(Qt,{anchorEl:t,open:!!t,onClose:()=>r(null),children:[e("option",{children:e(Qn,{control:e(ei,{checked:o,onChange:d=>n(d.target.checked),size:"small"}),label:l("table.menu.showSummaryRow")})}),e(Dt,{}),a.filter(d=>d.numeric).map(d=>c("option",{onClick:()=>s(d.id),disabled:!o,children:[e(It,{checked:i.includes(d.id),size:"small"}),e(Gt,{primary:d.label})]},d.id)),a.filter(d=>d.numeric).length===0&&e("option",{disabled:true,children:e(Gt,{primary:l("table.menu.noNumericColumns")})})]})},Ci=({contextMenu:t,handleCloseContextMenu:r,columns:o,visibleColumns:n,toggleColumnVisibility:a})=>{let{t:i}=pe();return c(Qt,{open:t!==null,onClose:r,anchorReference:"anchorPosition",anchorPosition:t!==null?{top:t.mouseY,left:t.mouseX}:void 0,children:[e("option",{onClick:r,children:i("common.copy")}),e(Dt,{}),e("option",{disabled:true,children:i("table.menu.visibleColumns")}),o.map(s=>c("option",{onClick:()=>a(s.id),children:[e(zr,{children:n.includes(s.id)&&e($d,{fontSize:"small"})}),e(Gt,{children:s.label})]},s.id))]})},Rp=({contextMenu:t,handleClose:r,columns:o,visibleColumns:n,grouping:a,summaryColumns:i,showSummary:s,sortBy:l,orderBy:d,order:u,onSortAsc:p,onSortDesc:f,onClearSort:b,onHideColumn:m,onToggleGroup:v,onToggleSummary:y,onOpenSortDialog:g})=>{let{t:x}=pe(),h=t?.columnId??"",C=o.find(M=>M.id===h),k=a.includes(h),w=i.includes(h),T=!!C?.numeric,I=l.find(M=>M.field===h),S=I?I.direction==="asc":d===h&&u==="asc",A=I?I.direction==="desc":d===h&&u==="desc",D=S||A;return c(Qt,{open:t!==null,onClose:r,anchorReference:"anchorPosition",anchorPosition:t!==null?{top:t.mouseY,left:t.mouseX}:void 0,children:[e("option",{disabled:true,sx:{opacity:"1 !important",fontWeight:700},children:e(Gt,{primary:C?.label??h})}),e(Dt,{}),c("option",{onClick:()=>{p(h),r();},selected:S,children:[e(zr,{children:e(rl,{fontSize:"small"})}),e(Gt,{primary:x("table.headerMenu.sortAsc")})]}),c("option",{onClick:()=>{f(h),r();},selected:A,children:[e(zr,{children:e(tl,{fontSize:"small"})}),e(Gt,{primary:x("table.headerMenu.sortDesc")})]}),D&&c("option",{onClick:()=>{b(h),r();},children:[e(zr,{children:e(Gd,{fontSize:"small"})}),e(Gt,{primary:x("table.headerMenu.clearSort")})]}),c("option",{onClick:()=>{g(),r();},children:[e(zr,{children:e(Ho,{fontSize:"small"})}),e(Gt,{primary:x("table.headerMenu.configureSort")})]}),e(Dt,{}),c("option",{onClick:()=>{v(h),r();},selected:k,children:[e(zr,{children:e(So,{fontSize:"small"})}),e(Gt,{primary:x(k?"table.headerMenu.ungroup":"table.headerMenu.group")})]}),T&&s&&c("option",{onClick:()=>{y(h),r();},selected:w,children:[e(zr,{children:e(sn,{fontSize:"small"})}),e(Gt,{primary:x(w?"table.headerMenu.removeSummary":"table.headerMenu.addSummary")})]}),e(Dt,{}),c("option",{onClick:()=>{m(h),r();},children:[e(zr,{children:e(hp,{fontSize:"small"})}),e(Gt,{primary:x("table.headerMenu.hideColumn")})]})]})},Dp=({open:t,onClose:r,columns:o,initialRules:n,onApply:a,onClear:i})=>{let{t:s}=pe(),[l,d]=er.useState([]);er.useEffect(()=>{t&&d(n.length>0?n.map(y=>({...y})):[]);},[t,n]);let u=er.useMemo(()=>new Set(l.map(y=>y.field)),[l]),p=er.useMemo(()=>o.filter(y=>!u.has(y.id)),[o,u]),f=()=>{let y=p[0];y&&d(g=>[...g,{field:y.id,direction:"asc"}]);},b=y=>{d(g=>g.filter((x,h)=>h!==y));},m=(y,g)=>{d(x=>x.map((h,C)=>C===y?{...h,...g}:h));},v=(y,g)=>{d(x=>{let h=y+g;if(h<0||h>=x.length)return x;let C=[...x],[k]=C.splice(y,1);return C.splice(h,0,k),C});};return e(Lt,{open:t,onClose:r,maxWidth:620,fullWidth:true,className:"orb-table-sort-dialog",title:s("table.sortDialog.title"),actions:c(jsxRuntime.Fragment,{children:[e(we,{className:"orb-table-sort-clear",variant:"neutral",disabled:l.length===0&&n.length===0,onClick:()=>{i(),r();},children:s("table.sortDialog.clearAll")}),e("span",{className:"orb-table-sort-action-spacer"}),e(we,{variant:"neutral",onClick:r,children:s("common.cancel")}),e(we,{variant:"primary",onClick:()=>{a(l),r();},children:s("common.ok")})]}),children:c("div",{className:"orb-table-sort-dialog-content",children:[l.length===0?e(L,{className:"orb-table-sort-empty",variant:"body2",children:s("table.sortDialog.empty")}):e(ie,{className:"orb-table-sort-rules",spacing:1,children:l.map((y,g)=>{let x=new Set(l.filter((C,k)=>k!==g).map(C=>C.field)),h=o.filter(C=>!x.has(C.id));return c("div",{className:"orb-table-sort-rule",children:[e(Ja,{className:"orb-table-sort-order",badgeContent:g+1,color:"primary"}),e(zt,{size:"small",value:y.field,onChange:C=>m(g,{field:C.target.value}),options:h.map(C=>({value:C.id,label:C.label}))}),e(zt,{size:"small",value:y.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(ae,{className:"orb-table-sort-icon-button",size:"small",onClick:()=>v(g,-1),disabled:g===0,children:e(rl,{fontSize:"small"})}),e(ae,{className:"orb-table-sort-icon-button",size:"small",onClick:()=>v(g,1),disabled:g===l.length-1,children:e(tl,{fontSize:"small"})}),e(ae,{className:"orb-table-sort-icon-button orb-table-sort-delete",size:"small",onClick:()=>b(g),children:e(ni,{fontSize:"small"})})]},`sort-rule-${g}`)})}),e(we,{size:"small",onClick:f,disabled:p.length===0,startIcon:e(Ho,{}),variant:"secondary",className:"orb-table-sort-add",children:s("table.sortDialog.addRule")})]})})};P();var ta=(t,r=2)=>t.toLocaleString(void 0,{maximumFractionDigits:r}),Np=({kpis:t})=>{let{t:r}=pe(),o=[{label:r("graph.kpi.totalRecords"),value:ta(t.totalRecords,0),color:"var(--orb-fg)"},{label:r("graph.kpi.totalReport"),value:ta(t.totalReportHours),color:"var(--orb-fg)"},{label:r("graph.kpi.totalBillable"),value:ta(t.totalBillableHours),color:"var(--orb-primary)"},{label:r("graph.kpi.efficiency"),value:`${t.efficiency.toFixed(2)}%`,color:"var(--orb-accent)"},{label:r("graph.kpi.amount"),value:ta(t.totalAmount),color:"var(--orb-primary)"},{label:r("graph.kpi.flagged"),value:ta(t.flaggedCount,0),color:"var(--orb-err)"}];return e("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(140px, 1fr))",gap:12},children:o.map(n=>c(Ae,{elevation:0,sx:{padding:12,minHeight:96,display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[e(L,{variant:"caption",muted:true,children:n.label}),e(L,{variant:"h3",sx:{fontWeight:800,color:n.color,fontVariantNumeric:"tabular-nums"},children:n.value})]},n.label))})};P();var xi=({title:t,subtitle:r,children:o})=>c(Ae,{elevation:0,sx:{padding:16},children:[e(L,{variant:"h4",sx:{fontWeight:700},children:t}),r&&e(L,{variant:"body2",muted:true,sx:{marginBottom:16},children:r}),o]});P();var ra=({data:t,orientation:r="horizontal",valueSuffix:o="",minHeight:n=210,activeName:a,onItemClick:i})=>{if(t.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let s=Math.max(...t.map(l=>l.value),1);return r==="vertical"?e("div",{style:{display:"flex",gap:1,alignItems:"flex-end",minHeight:n},children:t.map(l=>c("div",{style:{flex:1,minWidth:0},children:[e("div",{onClick:()=>i?.(l),sx:{height:`${Math.max(l.value/s*180,6)}px`,background:l.name===a?"primary.dark":"primary.main",borderRadius:"8px 8px 0 0",cursor:i?"pointer":"default",opacity:a&&l.name!==a?.45:1}}),e(L,{variant:"caption",title:l.name,sx:{display:"block",mt:.5},children:l.name}),c(L,{variant:"caption",muted:true,children:[l.value.toFixed(1),o]})]},l.name))}):e(ie,{spacing:1,children:t.map(l=>c("div",{style:{display:"grid",gridTemplateColumns:"140px 1fr 64px",gap:1},children:[e(L,{variant:"caption",muted:true,title:l.name,children:l.name}),e("div",{onClick:()=>i?.(l),sx:{alignSelf:"center",background:"action.hover",height:10,borderRadius:999,overflow:"hidden",cursor:i?"pointer":"default",opacity:a&&l.name!==a?.45:1},children:e("div",{style:{width:`${l.value/s*100}%`,height:"100%",background:l.name===a?"primary.dark":"primary.main"}})}),c(L,{variant:"caption",sx:{textAlign:"right",fontWeight:600},children:[l.value.toFixed(1),o]})]},l.name))})};P();var Ap=({data:t,color:r="var(--orb-chart-1)",valueSuffix:o="",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(b=>b.value),l=Math.min(...s,0),u=Math.max(...s,1)-l||1,p=t.map((b,m)=>{let v=i+m*(a-i*2)/Math.max(t.length-1,1),y=n-i-(b.value-l)/u*(n-i*2);return {x:v,y,...b}}),f=p.map(b=>`${b.x},${b.y}`).join(" ");return c("div",{children:[c("div",{component:"svg",viewBox:`0 0 ${a} ${n}`,style:{width:"100%",height:n},children:[e("line",{x1:i,y1:n-i,x2:a-i,y2:n-i,style:{stroke:"var(--orb-chart-grid)"}}),e("polyline",{fill:"none",style:{stroke:r},strokeWidth:3,points:f}),p.map(b=>e("circle",{cx:b.x,cy:b.y,r:4,style:{fill:r}},b.name))]}),e("div",{sx:{mt:1,display:"grid",gridTemplateColumns:`repeat(${t.length}, minmax(0, 1fr))`,gap:1},children:t.map(b=>c("div",{style:{minWidth:0},children:[e(L,{variant:"caption",title:b.name,sx:{display:"block"},children:b.name}),c(L,{variant:"caption",muted:true,children:[b.value.toFixed(1),o]})]},b.name))})]})};P();var Ep=({data:t,barColor:r="var(--orb-chart-1)",lineColor:o="var(--orb-chart-5)",height:n=220})=>{if(t.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let a=640,i=28,s=Math.max(...t.map(p=>p.barValue),1),l=Math.max(...t.map(p=>p.lineValue),1),d=t.map((p,f)=>{let b=(a-i*2)/t.length,m=Math.max(b*.5,8),v=i+f*b+(b-m)/2,y=p.barValue/s*(n-i*2),g=n-i-y;return {x:v,y:g,barHeight:y,barWidth:m,item:p}}),u=t.map((p,f)=>{let b=(a-i*2)/t.length,m=i+f*b+b/2,v=n-i-p.lineValue/l*(n-i*2);return {x:m,y:v,item:p}});return c(ie,{spacing:1.25,children:[c("div",{component:"svg",viewBox:`0 0 ${a} ${n}`,style:{width:"100%",height:n},children:[e("line",{x1:i,y1:n-i,x2:a-i,y2:n-i,style:{stroke:"var(--orb-chart-grid)"}}),d.map(p=>e("rect",{x:p.x,y:p.y,width:p.barWidth,height:Math.max(p.barHeight,4),rx:6,style:{fill:r}},p.item.name)),e("polyline",{fill:"none",style:{stroke:o},strokeWidth:3,points:u.map(p=>`${p.x},${p.y}`).join(" ")}),u.map(p=>e("circle",{cx:p.x,cy:p.y,r:3.5,style:{fill:o}},`${p.item.name}-line`))]}),e("div",{style:{display:"grid",gridTemplateColumns:`repeat(${t.length}, minmax(0, 1fr))`,gap:1},children:t.map(p=>c("div",{style:{minWidth:0},children:[e(L,{variant:"caption",title:p.name,sx:{display:"block"},children:p.name}),c(L,{variant:"caption",muted:true,sx:{display:"block"},children:["Bar: ",p.barValue.toFixed(1)]}),c(L,{variant:"caption",muted:true,sx:{display:"block"},children:["Line: ",p.lineValue.toFixed(1)]})]},p.name))})]})};P();var Yb=t=>{let o=.2+Math.max(0,Math.min(1,t))*.8;return `color-mix(in oklch, var(--orb-chart-1) ${Math.round(o*100)}%, transparent)`},Lp=({data:t})=>{if(t.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let r=Array.from(new Set(t.map(i=>i.x))),o=Array.from(new Set(t.map(i=>i.y))),n=Math.max(...t.map(i=>i.value),1),a=new Map(t.map(i=>[`${i.y}__${i.x}`,i.value]));return e("div",{style:{overflowX:"auto"},children:c("div",{style:{display:"grid",gridTemplateColumns:`120px repeat(${r.length}, minmax(64px, 1fr))`,gap:1,minWidth:120+r.length*64},children:[e("div",{}),r.map(i=>e(L,{variant:"caption",sx:{textAlign:"center",fontWeight:600},children:i},i)),o.map(i=>c("div",{style:{display:"contents"},children:[e(L,{variant:"caption",sx:{alignSelf:"center"},children:i}),r.map(s=>{let l=a.get(`${i}__${s}`)||0,d=l/n;return e("div",{sx:{height:36,borderRadius:1,background:Yb(d),border:"1px solid color-mix(in oklch, var(--orb-muted) 20%, transparent)",display:"flex",alignItems:"center",justifyContent:"center"},children:e(L,{variant:"caption",sx:{fontWeight:700},children:l.toFixed(1)})},`${i}-${s}`)})]},i))]})})};P();var Zb=["var(--orb-chart-1)","var(--orb-chart-2)","var(--orb-chart-5)","var(--orb-chart-negative)","var(--orb-chart-4)","var(--orb-chart-3)"],Si=({data:t,variant:r="donut",colors:o=Zb,size:n=180,activeName:a,onItemClick:i})=>{if(t.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let s=0,l=t.map((d,u)=>{let p=s;return s+=d.percent,`${o[u%o.length]} ${p}% ${s}%`});return c(ie,{direction:{xs:"column",sm:"row"},spacing:2,alignItems:"center",children:[e("div",{style:{width:n,height:n,borderRadius:"50%",background:`conic-gradient(${l.join(", ")})`,position:"relative",flexShrink:0},children:r==="donut"&&e("div",{style:{position:"absolute",inset:Math.round(n*.18),background:"background.paper",borderRadius:"50%"}})}),e(ie,{spacing:1,sx:{minWidth:180},children:t.map((d,u)=>c("div",{onClick:()=>i?.(d),sx:{display:"flex",alignItems:"center",gap:1,cursor:i?"pointer":"default",opacity:a&&d.name!==a?.45:1},children:[e("div",{style:{width:10,height:10,borderRadius:"50%",background:o[u%o.length]}}),e(L,{variant:"caption",sx:{flex:1},children:d.name}),c(L,{variant:"caption",sx:{fontWeight:700},children:[d.percent.toFixed(0),"%"]})]},d.name))})]})};P();var Op=({effect:t,branches:r})=>{if(r.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let o=r.filter((a,i)=>i%2===0),n=r.filter((a,i)=>i%2===1);return c(ie,{spacing:1.5,children:[e("div",{style:{display:"grid",gridTemplateColumns:`repeat(${Math.max(o.length,1)}, minmax(0, 1fr))`,gap:1},children:o.map(a=>c("div",{sx:{borderLeft:"2px solid",borderColor:"divider",pl:1},children:[e(L,{variant:"caption",sx:{fontWeight:700},children:a.title}),a.causes.map(i=>e(L,{variant:"caption",muted:true,sx:{display:"block"},children:i},i))]},a.title))}),c("div",{style:{position:"relative",height:32},children:[e("div",{style:{position:"absolute",inset:"50% 0 auto 0",borderTop:"2px solid",borderColor:"primary.main"}}),e("div",{sx:{position:"absolute",right:0,top:"calc(50% - 12px)",px:1,py:.25,borderRadius:1,background:"primary.main",color:"primary.contrastText"},children:e(L,{variant:"caption",sx:{fontWeight:700},children:t})})]}),e("div",{style:{display:"grid",gridTemplateColumns:`repeat(${Math.max(n.length,1)}, minmax(0, 1fr))`,gap:1},children:n.map(a=>c("div",{sx:{borderLeft:"2px solid",borderColor:"divider",pl:1},children:[e(L,{variant:"caption",sx:{fontWeight:700},children:a.title}),a.causes.map(i=>e(L,{variant:"caption",muted:true,sx:{display:"block"},children:i},i))]},a.title))})]})};P();var Fp=({data:t,height:r=240})=>{if(t.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let o=0,n=t.map(f=>{let b=f.type==="total"?0:o,m=f.type==="total"?f.value:o+f.value;return f.type!=="total"&&(o=m),{...f,start:b,end:m,delta:m-b}}),a=n.flatMap(f=>[f.start,f.end]),i=Math.min(...a,0),s=Math.max(...a,1),l=680,d=30,u=s-i||1,p=f=>r-d-(f-i)/u*(r-d*2);return c("div",{children:[c("div",{component:"svg",viewBox:`0 0 ${l} ${r}`,style:{width:"100%",height:r},children:[e("line",{x1:d,y1:p(0),x2:l-d,y2:p(0),style:{stroke:"var(--orb-chart-grid)"}}),n.map((f,b)=>{let m=(l-d*2)/n.length,v=Math.max(m*.55,8),y=d+b*m+(m-v)/2,g=p(Math.max(f.start,f.end)),x=p(Math.min(f.start,f.end)),h=f.type==="total"?"var(--orb-chart-1)":f.delta>=0?"var(--orb-chart-positive)":"var(--orb-chart-negative)";return c("g",{children:[e("rect",{x:y,y:g,width:v,height:Math.max(x-g,4),rx:6,style:{fill:h}}),e("text",{x:y+v/2,y:g-6,textAnchor:"middle",fill:"currentColor",fontSize:"11",children:f.end.toFixed(1)})]},f.name)})]}),e("div",{sx:{mt:1,display:"grid",gridTemplateColumns:`repeat(${n.length}, minmax(0, 1fr))`,gap:1},children:n.map(f=>e(L,{variant:"caption",title:f.name,children:f.name},f.name))})]})};var oa=({apiKey:t,query:r,zoom:o=14,mapType:n="roadmap"})=>{let a=encodeURIComponent(r);return `https://www.google.com/maps/embed/v1/place?key=${encodeURIComponent(t)}&q=${a}&zoom=${o}&maptype=${n}`},dR=(t,r=360)=>{let o=oa(t);return `<iframe width="100%" height="${r}" style="border:0" loading="lazy" allowfullscreen referrerpolicy="no-referrer-when-downgrade" src="${o}"></iframe>`};P();var Bp=({apiKey:t,query:r,embedUrl:o,zoom:n=14,mapType:a="roadmap",height:i=320})=>{let s=o||(t&&r?oa({apiKey:t,query:r,zoom:n,mapType:a}):"");return s?c("div",{children:[e("div",{component:"iframe",src:s,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",sx:{width:"100%",height:i,border:0,borderRadius:2}}),c(L,{variant:"caption",muted:true,sx:{mt:.75,display:"block"},children:["If iframe is blocked, open directly: ",e("a",{href:s,target:"_blank",rel:"noreferrer",children:"Google Maps"})]})]}):e("div",{children:e(L,{variant:"body2",muted:true,children:"Google Map requires `embedUrl` or (`apiKey` + `query`)."})})};var wi=({keyword:t,location:r,src:o="orbcafe-ui"})=>{if(r){let n=encodeURIComponent(r.name||t||"Location");return `https://uri.amap.com/marker?position=${r.lng},${r.lat}&name=${n}&src=${encodeURIComponent(o)}&coordinate=gaode&callnative=0`}return t?`https://uri.amap.com/search?keyword=${encodeURIComponent(t)}&src=${encodeURIComponent(o)}&callnative=0`:"https://uri.amap.com/search?keyword=%E5%8C%97%E4%BA%AC&src=orbcafe-ui&callnative=0"};P();var Hp=({keyword:t,location:r,embedUrl:o,height:n=320})=>{let a=o||wi({keyword:t,location:r?{lng:r.lng,lat:r.lat,name:r.name}:void 0});return c("div",{children:[e("div",{component:"iframe",src:a,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",sx:{width:"100%",height:n,border:0,borderRadius:2}}),c(L,{variant:"caption",muted:true,sx:{mt:.75,display:"block"},children:["If iframe is blocked, open directly: ",e("a",{href:a,target:"_blank",rel:"noreferrer",children:"AMap"})]})]})};P();var zp=({billableByPrimary:t,efficiencyBySecondary:r,statusDistribution:o,interaction:n})=>{let{t:a}=pe();return c("div",{style:{display:"grid",gap:12,gridTemplateColumns:"repeat(auto-fit, minmax(320px, 1fr))"},children:[e(xi,{title:a("graph.chart.billable.title"),subtitle:a("graph.chart.billable.subtitle"),children:e(ra,{data:t,orientation:"horizontal",activeName:n?.filters?.primaryDimension,onItemClick:i=>n?.onPrimaryDimensionClick?.(i.name)})}),e(xi,{title:a("graph.chart.efficiency.title"),subtitle:a("graph.chart.efficiency.subtitle"),children:e(ra,{data:r,orientation:"vertical",valueSuffix:"%",activeName:n?.filters?.secondaryDimension,onItemClick:i=>n?.onSecondaryDimensionClick?.(i.name)})}),e(xi,{title:a("graph.chart.status.title"),subtitle:a("graph.chart.status.subtitle"),children:e(Si,{data:o,variant:"donut",activeName:n?.filters?.status,onItemClick:i=>n?.onStatusClick?.(i.name)})})]})};P();var Qb=["doubao-lite","gpt-4o-mini","gpt-4.1-mini","claude-3.5-sonnet"],Jb=["zh","en","de","fr","ja","ko"],Vp=({open:t,onClose:r,value:o,onSaveAll:n,modelOptions:a=Qb,promptLangOptions:i=Jb,analysisTemplateOptions:s=[],responseTemplateOptions:l=[],defaultAnalysisTemplateId:d,defaultResponseTemplateId:u})=>{let[p,f]=er.useState(o),[b,m]=er.useState(d||""),[v,y]=er.useState(u||""),[g,x]=er.useState(false);er.useEffect(()=>{t&&(f(o),m(d||""),y(u||""));},[t,o,d,u]);let h=(k,w)=>{f(T=>({...T,[k]:w}));},C=async()=>{if(n)try{x(!0),await n({settings:p,analysisTemplateId:b||void 0,responseTemplateId:v||void 0});}finally{x(false);}};return c(Lt,{open:t,onClose:r,fullWidth:true,maxWidth:"lg",children:[c("div",{className:"orb-dialog-title",sx:{pr:7,pb:2.2},children:[e(L,{variant:"h5",sx:{fontWeight:800},children:"AI Settings"}),e(L,{variant:"body2",color:"text.secondary",sx:{mt:.5},children:"Configure LLM settings and editable agent prompts by language."}),e(ae,{onClick:r,sx:{position:"absolute",right:12,top:12},children:e(wo,{})})]}),e("div",{className:"orb-dialog-content",sx:{pt:"18px !important"},children:c(ie,{spacing:2.2,children:[c("div",{sx:{mt:.8,display:"grid",gap:1.5,gridTemplateColumns:{xs:"1fr",md:"repeat(2, minmax(0, 1fr))"}},children:[e("div",{children:e(ze,{size:"small",value:p.baseUrl,onChange:k=>h("baseUrl",k.target.value),fullWidth:true,label:"Base URL"})}),e("div",{children:e(ze,{size:"small",type:"password",value:p.apiKey,onChange:k=>h("apiKey",k.target.value),fullWidth:true,label:"API Key"})}),e("div",{children:e(ze,{size:"small",value:p.model,onChange:k=>h("model",k.target.value),fullWidth:true,select:true,label:"Model",children:a.map(k=>e("option",{value:k,children:k},k))})}),e("div",{children:e(ze,{size:"small",value:p.promptLang,onChange:k=>h("promptLang",k.target.value),fullWidth:true,select:true,label:"Prompt Lang",children:i.map(k=>e("option",{value:k,children:k},k))})})]}),c("div",{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[c(ze,{size:"small",value:b,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(Wn,{multiline:true,minRows:8,value:p.analysisPrompt,onChange:k=>h("analysisPrompt",k.target.value),fullWidth:true,label:"Analysis Prompt",sx:{"& textarea":{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"}}}),c(ze,{size:"small",value:v,onChange:k=>y(k.target.value),fullWidth:true,select:true,label:"Response Template",children:[e("option",{value:"",children:"Default"}),l.map(k=>e("option",{value:k.id,children:k.label},k.id))]}),e(Wn,{multiline:true,minRows:8,value:p.responsePrompt,onChange:k=>h("responsePrompt",k.target.value),fullWidth:true,label:"Response Prompt",sx:{"& textarea":{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"}}})]})]})}),c("div",{className:"orb-dialog-actions",sx:{px:3,pb:2.5,pt:1.2,gap:1},children:[e(we,{variant:"outlined",onClick:r,children:"Cancel"}),e(we,{variant:"contained",onClick:C,disabled:!n||g,children:"Save"})]})]})};P();var Pi=({open:t,onClose:r,model:o,tableContent:n,extraCharts:a,interaction:i,aiAssistant:s})=>{let{t:l}=pe(),[d,u]=er.useState(s?.defaultPrompt||""),[p,f]=er.useState(false),[b,m]=er.useState(false),v=i?.enabled!==false&&!!i,y=s?.enabled!==false,g=i?.filters||{},x=!!(g.primaryDimension||g.secondaryDimension||g.status),h=s?.placeholder||"Ask AI to analyze data, create charts, or find insights...";er.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 w=d.trim();if(!(!w||!s?.onSubmit))try{f(!0),await s.onSubmit(w,{filters:g,model:o});}finally{f(false);}};return e(Lt,{open:t,onClose:r,fullWidth:true,maxWidth:1400,hideCloseButton:true,children:c("div",{style:{height:"80vh",display:"flex",flexDirection:"column",background:"var(--orb-canvas)"},children:[e("div",{style:{padding:16,borderBottom:"1px solid var(--orb-border)"},children:c(ie,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:12,children:[c(ie,{direction:"row",spacing:10,alignItems:"center",sx:{flexWrap:"wrap"},children:[e(L,{variant:"h3",sx:{fontWeight:800},children:o.title}),e(xt,{label:l("graph.records",{count:o.kpis.totalRecords})}),v&&g.primaryDimension&&e(xt,{tone:"outline",label:`${i?.fieldMapping.primaryDimension}: ${g.primaryDimension}`,onDelete:()=>i?.onClearFilter("primaryDimension")}),v&&g.secondaryDimension&&e(xt,{tone:"outline",label:`${i?.fieldMapping.secondaryDimension}: ${g.secondaryDimension}`,onDelete:()=>i?.onClearFilter("secondaryDimension")}),v&&g.status&&e(xt,{tone:"outline",label:`${i?.fieldMapping.status}: ${g.status}`,onDelete:()=>i?.onClearFilter("status")}),v&&x&&e(we,{size:"small",variant:"ghost",onClick:()=>i?.onClearAll(),children:"Clear"})]}),c(ie,{direction:"row",spacing:10,alignItems:"center",children:[y&&c("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 10px",borderRadius:999,border:"1px solid var(--orb-border)",background:"var(--orb-surface)",minWidth:320},children:[e(ae,{size:"small",onClick:s?.onVoiceInput,children:e(La,{size:16,strokeWidth:1.8})}),e("input",{className:"orb-inp orb-inp-dense",value:d,onChange:w=>u(w.target.value),onKeyDown:w=>{w.key==="Enter"&&(w.preventDefault(),k());},placeholder:h,style:{fontSize:14,border:"none",background:"transparent",flex:1,minWidth:0}}),e(ae,{size:"small",onClick:k,disabled:p||!d.trim(),children:e(Kc,{size:16,strokeWidth:1.8})}),e(ae,{size:"small",onClick:()=>m(true),children:e(tn,{size:16,strokeWidth:1.8})})]}),e(ae,{onClick:r,children:e(jt,{size:18,strokeWidth:2})})]})]})}),c("div",{style:{padding:16,display:"flex",flexDirection:"column",gap:12,overflow:"auto",minHeight:0},children:[e(Np,{kpis:o.kpis}),e(zp,{billableByPrimary:o.charts.billableByPrimary,efficiencyBySecondary:o.charts.efficiencyBySecondary,statusDistribution:o.charts.statusDistribution,interaction:v?{filters:g,onPrimaryDimensionClick:w=>i?.onPrimaryDimensionClick(w),onSecondaryDimensionClick:w=>i?.onSecondaryDimensionClick(w),onStatusClick:w=>i?.onStatusClick(w)}:void 0}),a,n]}),e(Vp,{open:b,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 Mo={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"]},th=5,Wp=t=>t.toLowerCase().replace(/[\s_-]/g,""),Ro=(t,r,o,n)=>{if(r)return r;if(t.length===0)return n;let a=Object.keys(t[0]),i=new Map(a.map(s=>[Wp(s),s]));for(let s of o){let l=i.get(Wp(s));if(l)return l}return a[0]||n},Pr=t=>{if(typeof t=="number")return Number.isFinite(t)?t:0;if(typeof t=="string"){let r=Number(t.replace(/,/g,"").trim());return Number.isFinite(r)?r:0}return 0},gr=(t,r)=>t==null||t===""?r:String(t),rh=(t,r,o,n,a)=>{let i=new Map;return t.forEach(s=>{let l=gr(s[r],a);i.set(l,(i.get(l)||0)+Pr(s[o]));}),Array.from(i.entries()).map(([s,l])=>({name:s,value:l})).sort((s,l)=>l.value-s.value).slice(0,n)},oh=(t,r,o,n,a,i)=>{let s=new Map;return t.forEach(l=>{let d=gr(l[r],i),u=s.get(d)||{report:0,billable:0};u.report+=Pr(l[o]),u.billable+=Pr(l[n]),s.set(d,u);}),Array.from(s.entries()).map(([l,d])=>({name:l,value:d.report>0?d.billable/d.report*100:0})).sort((l,d)=>l.value-d.value).slice(0,a)},nh=(t,r,o)=>{let n=t.length;if(n===0)return [];let a=new Map;return t.forEach(i=>{let s=gr(i[r],o);a.set(s,(a.get(s)||0)+1);}),Array.from(a.entries()).map(([i,s])=>({name:i,value:s,percent:s/n*100}))},$p=(t,r,o)=>{let n=new Map;return t.forEach(a=>{let i=gr(a[r],"N/A");n.set(i,(n.get(i)||0)+Pr(a[o]));}),Array.from(n.entries()).sort(([a],[i])=>a.localeCompare(i)).map(([a,i])=>({name:a,value:i}))},ah=(t,r,o,n,a,i)=>{let s=new Map;return t.forEach(l=>{let d=gr(l[r],i),u=s.get(d)||{report:0,billable:0};u.report+=Pr(l[o]),u.billable+=Pr(l[n]),s.set(d,u);}),Array.from(s.entries()).map(([l,d])=>({name:l,barValue:d.billable,lineValue:d.report>0?d.billable/d.report*100:0})).sort((l,d)=>d.barValue-l.barValue).slice(0,a)},ih=(t,r,o,n,a)=>{let i=new Map;return t.forEach(s=>{let l=gr(s[r],a),d=gr(s[o],a),u=`${l}__${d}`;i.set(u,(i.get(u)||0)+Pr(s[n]));}),Array.from(i.entries()).map(([s,l])=>{let[d,u]=s.split("__");return {x:d,y:u,value:l}})},sh=(t,r,o)=>{let n=$p(t,r,o),a=n.map(s=>({name:s.name,value:s.value,type:"delta"})),i=n.reduce((s,l)=>s+l.value,0);return [...a,{name:"Total",value:i,type:"total"}]},lh=(t,r,o,n,a,i)=>{let s=new Map;return t.forEach(l=>{let d=gr(l[r],i),u=`${gr(l[o],i)} / ${gr(l[n],i)}`,p=s.get(d)||new Map;p.set(u,(p.get(u)||0)+1),s.set(d,p);}),Array.from(s.entries()).map(([l,d])=>({title:l,causes:Array.from(d.entries()).sort((u,p)=>p[1]-u[1]).slice(0,a).map(([u,p])=>`${u} (${p})`)})).slice(0,6)},mn=({rows:t,config:r})=>{let{t:o}=pe(),n=o("graph.unassigned"),a=er.useMemo(()=>{let p=r?.fieldMapping;return {primaryDimension:Ro(t,p?.primaryDimension,Mo.primaryDimension,"Category"),secondaryDimension:Ro(t,p?.secondaryDimension,Mo.secondaryDimension,"Owner"),status:Ro(t,p?.status,Mo.status,"Status"),date:Ro(t,p?.date,Mo.date,"Date"),description:Ro(t,p?.description,Mo.description,"Description"),reportHours:Ro(t,p?.reportHours,Mo.reportHours,"ReportHours"),billableHours:Ro(t,p?.billableHours,Mo.billableHours,"BillableHours"),amount:Ro(t,p?.amount,Mo.amount,"Amount")}},[t,r?.fieldMapping]),i=er.useMemo(()=>t.map((p,f)=>{let b=Pr(p[a.reportHours]),m=Pr(p[a.billableHours]),v=Pr(p[a.amount]),y=b>0?m/b*100:0;return {id:`graph-row-${f}`,Date:gr(p[a.date],""),Primary:gr(p[a.primaryDimension],n),Secondary:gr(p[a.secondaryDimension],n),Description:gr(p[a.description],""),ReportHours:b,BillableHours:m,Amount:v,Efficiency:y,Status:gr(p[a.status],n)}}),[t,a,n]),s=er.useMemo(()=>{let p=i.length,f=i.reduce((x,h)=>x+Pr(h.ReportHours),0),b=i.reduce((x,h)=>x+Pr(h.BillableHours),0),m=i.reduce((x,h)=>x+Pr(h.Amount),0),v=f>0?b/f*100:0,y=r?.statusFlagValues||["flag","flagged","warning","risk"],g=i.filter(x=>y.includes(gr(x.Status,"").toLowerCase())).length;return {totalRecords:p,totalReportHours:f,totalBillableHours:b,efficiency:v,totalAmount:m,flaggedCount:g}},[i,r?.statusFlagValues]),l=r?.topN||th,d=er.useMemo(()=>({billableByPrimary:rh(i,"Primary","BillableHours",l,n),efficiencyBySecondary:oh(i,"Secondary","ReportHours","BillableHours",l,n),statusDistribution:nh(i,"Status",n),lineByDate:$p(i,"Date","BillableHours"),comboByPrimary:ah(i,"Primary","ReportHours","BillableHours",l,n),heatmapPrimarySecondary:ih(i,"Primary","Secondary","BillableHours",n),waterfallBillable:sh(i,"Date","BillableHours"),fishboneStatusCauses:lh(i,"Status","Primary","Secondary",3,n)}),[i,l,n]),u=er.useMemo(()=>({title:r?.title||o("graph.reportTitle"),kpis:s,charts:d,table:{columns:[{id:"Date",label:a.date},{id:"Primary",label:a.primaryDimension},{id:"Secondary",label:a.secondaryDimension},{id:"Description",label:a.description},{id:"ReportHours",label: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:i}}),[d,r?.title,a,s,i,o]);return {fieldMapping:a,model:u}};var gn=t=>String(t??"").trim(),Ii=(t={})=>{let[r,o]=er.useState(t),n=er.useCallback((d,u)=>{o(p=>{let f=u?.trim();if(!f){let b={...p};return delete b[d],b}if(p[d]===f){let b={...p};return delete b[d],b}return {...p,[d]:f}});},[]),a=er.useCallback(d=>{o(u=>{if(!u[d])return u;let p={...u};return delete p[d],p});},[]),i=er.useCallback(()=>{o({});},[]),s=er.useMemo(()=>!!(r.primaryDimension||r.secondaryDimension||r.status),[r]),l=er.useCallback((d,u)=>d.filter(p=>!(r.primaryDimension&&gn(p[u.primaryDimension])!==gn(r.primaryDimension)||r.secondaryDimension&&gn(p[u.secondaryDimension])!==gn(r.secondaryDimension)||r.status&&gn(p[u.status])!==gn(r.status))),[r]);return {filters:r,setFilter:n,clearFilter:a,clearAll:i,hasActiveFilters:s,applyRows:l}};P();var Ri=({variants:t,currentVariantId:r,onLoad:o,onSave:n,onDelete:a,onSetDefault:i})=>{let{t:s}=pe(),[l,d]=er.useState(false),[u,p]=er.useState(""),[f,b]=er.useState(false),[m,v]=er.useState(false),y=t.find(h=>h.id===r),g=()=>{p(y?.name||s("variant.newVariant")),b(y?.isDefault||false),v(y?.isPublic||false),d(true);},x=()=>{n({name:u,isDefault:f,isPublic:m,description:""}),d(false);};return c("div",{className:"orb-variant-management",children:[e(zt,{size:"small",fullWidth:false,sx:{width:"min(240px, 100%)","& .orb-inp":{fontSize:"0.85rem",backgroundColor:"var(--orb-p50)",borderColor:"color-mix(in oklch, var(--orb-primary) 30%, var(--orb-border))"}},value:r||"",options:[{value:"",label:s("variant.selectVariant"),disabled:true},...t.map(h=>({value:h.id,label:h.name+(h.isDefault?` (${s("variant.defaultSuffix")})`:"")}))],onChange:h=>{let C=t.find(k=>k.id===h.target.value);C&&o(C);}}),e(ct,{title:s("variant.saveView"),children:e(ae,{className:"orb-variant-save-button",onClick:g,size:"small",color:"primary",children:e(Po,{fontSize:"small"})})}),c(Lt,{open:l,onClose:()=>d(false),children:[e("div",{className:"orb-dialog-title",children:s("variant.saveView")}),c("div",{className:"orb-dialog-content",children:[e(ze,{autoFocus:true,margin:"dense",label:s("variant.viewName"),fullWidth:true,variant:"outlined",value:u,onChange:h=>p(h.target.value)}),e(Qn,{control:e(It,{checked:f,onChange:h=>b(h.target.checked)}),label:s("variant.setDefault")}),e(Qn,{control:e(It,{checked:m,onChange:h=>v(h.target.checked)}),label:s("variant.publicAllUsers")})]}),c("div",{className:"orb-dialog-actions",children:[e(we,{onClick:()=>d(false),children:s("common.cancel")}),e(we,{onClick:x,variant:"contained",children:s("common.save")})]})]})]})};P();var Gp=({appId:t,tableKey:r="default",currentFilters:o,currentLayoutId:n,layoutRefs:a,onLoad:i,variantService:s,serviceUrl:l,onError:d,onSuccess:u,currentVariantId:p,onVariantChange:f})=>{let{t:b}=pe(),[m,v]=er.useState([]),[y,g]=er.useState(""),x=`orbcafe.variants.${t}.${r}`,h=p!==void 0?p:y,C=N=>{p===void 0&&g(N),f&&f(N);},k=er.useCallback(()=>{try{let N=localStorage.getItem(x);if(!N)return [];let E=JSON.parse(N);return Array.isArray(E)?E:[]}catch{return []}},[x]),w=er.useCallback(N=>{try{localStorage.setItem(x,JSON.stringify(N));}catch{}},[x]),T=er.useCallback(N=>{v(N);let E=N.find(O=>O.isDefault);E&&!h&&(C(E.id),i(E));},[h,i,C]),I=er.useCallback(async()=>{if(!t)return [];try{let N=[];if(s)N=await s.getVariants(t,r);else if(l){let E=await fetch(`${l}/api/variants?appId=${encodeURIComponent(t)}&tableKey=${encodeURIComponent(r)}`);if(!E.ok)throw new Error(b("variant.toast.fetchFailed"));N=await E.json();}else N=k();return T(N),N}catch(N){console.error("Error fetching variants",N);let E=k();return T(E),d&&d(b("variant.toast.fetchFailed")),E}},[t,r,s,l,k,T,d,b]);return er.useEffect(()=>{I();},[t,r]),e(Ri,{variants:m,currentVariantId:h,onLoad:N=>{C(N.id),i(N);},onSave:async N=>{let E=Date.now().toString(),O;try{let F=N.scope||"Both",X=m.find(j=>j.name===N.name);E=X?X.id:Date.now().toString();let H=[];if(X&&(Array.isArray(X.filters)?H=[...X.filters]:X.filters&&(H=[{scope:"default",filters:X.filters}])),F==="Search"||F==="Both"){let j=(Array.isArray(o),o);if(j)if(Array.isArray(j)&&j.length>0&&j[0].scope)j.forEach(V=>{let z=H.findIndex(U=>U.scope===V.scope);z>=0?H[z]=V:H.push(V);});else {let V={scope:r,filters:j},z=H.findIndex(U=>U.scope===r);z>=0?H[z]=V:H.push(V);}}let Y=X?.layout||{},W=[];if(X&&Array.isArray(X.layoutRefs)&&(W=[...X.layoutRefs]),F==="Layout"||F==="Both")if(a&&a.length>0)a.forEach(j=>{let V=W.findIndex(z=>z.tableKey===j.tableKey);V>=0?W[V]=j:W.push(j);});else {let j={tableKey:r,layoutId:n||null},V=W.findIndex(z=>z.tableKey===r);V>=0?W[V]=j:W.push(j);}if(O={appId:t,tableKey:r,...N,scope:F,id:E,createdAt:new Date().toISOString(),filters:H,layout:Y,layoutRefs:W},s)await s.saveVariant(O,t,r);else if(l){if(!(await fetch(`${l}/api/variants`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(O)})).ok)throw new Error(b("variant.toast.saveFailed"))}else {let V=m.some(z=>z.id===E)?m.map(z=>z.id===E?O:z):[...m,O];v(V),w(V);}u&&u(b("variant.toast.saveSuccess")),(s||l)&&await I(),C(E),i(O);}catch(F){console.error("Error saving variant",F);let H=m.some(Y=>Y.id===E)?m.map(Y=>Y.id===E?O:Y):[...m,O];v(H),w(H),C(E),i(O),d&&d(b("variant.toast.saveFailed"));}},onDelete:async N=>{try{if(s)await s.deleteVariant(N);else if(l){if(!(await fetch(`${l}/api/variants/${N}`,{method:"DELETE"})).ok)throw new Error(b("variant.toast.deleteFailed"))}else {let E=m.filter(O=>O.id!==N);v(E),w(E);}h===N&&C(""),(s||l)&&I(),u&&u(b("variant.toast.deleteSuccess"));}catch(E){console.error("Error deleting variant",E);let O=m.filter(F=>F.id!==N);v(O),w(O),h===N&&C(""),d&&d(b("variant.toast.deleteFailed"));}},onSetDefault:async N=>{try{let E=m.find(F=>F.id===N);if(!E)return;let O={appId:t,tableKey:r,...E,isDefault:!0};if(s)await s.setDefaultVariant(N,t,r);else if(l){if(!(await fetch(`${l}/api/variants`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(O)})).ok)throw new Error(b("variant.toast.defaultFailed"))}else {let F=m.map(X=>({...X,isDefault:X.id===N}));v(F),w(F);}(s||l)&&await I(),u&&u(b("variant.toast.defaultSuccess"));}catch(E){console.error("Error setting default variant",E);let O=m.map(F=>({...F,isDefault:F.id===N}));v(O),w(O),d&&d(b("variant.toast.defaultFailed"));}}})};P();ro__default.default.extend(gh__default.default);ro__default.default.extend(fh__default.default);ro__default.default.extend(eb__default.default);var aa="YYYY-MM-DD",hh=[null,null],Vo="0.85rem",vh={en:"en",zh:"zh-cn",fr:"fr",de:"de",ja:"ja",ko:"ko"},yh=({isInRange:t,isStart:r,isEnd:o,isHovered:n,disableMargin:a,sx:i,...s})=>{let l=sr();return e(Ld,{...s,sx:[...Array.isArray(i)?i:i?[i]:[],t?{borderRadius:0,backgroundColor:l.palette.primary.light,color:l.palette.primary.contrastText}:{},n&&!t&&!r&&!o?{borderRadius:0,backgroundColor:l.palette.action.hover,border:`1px dashed ${l.palette.primary.main}`}:{},r?{borderRadius:"50% 0 0 50%",backgroundColor:l.palette.primary.main,color:l.palette.primary.contrastText}:{},o?{borderRadius:"0 50% 50% 0",backgroundColor:l.palette.primary.main,color:l.palette.primary.contrastText}:{},r&&o?{borderRadius:"50%"}:{}]})},Kp=({label:t,value:r=hh,onChange:o})=>{let{t:n,locale:a}=pe(),i=vh[a]||"en",s=t||n("dateRange.label"),[l,d]=er.useState(null),[u,p]=er.useState(r),[f,b]=er.useState("start"),[m,v]=er.useState(null),[y,g]=er.useState((r[0]||ro__default.default()).locale(i)),[x,h]=er.useState(""),[C,k]=er.useState(""),[w,T]=er.useState(false),[I,S]=er.useState(false),A=er__namespace.default.useRef(r);er.useEffect(()=>{let[j,V]=r,[z,U]=A.current,K=ue=>ue&&typeof ue.isSame=="function",fe=!(j===null&&z===null||K(j)&&K(z)&&j.isSame(z,"day")),se=!(V===null&&U===null||K(V)&&K(U)&&V.isSame(U,"day"));(fe||se)&&(p(r),r[0]&&K(r[0])&&g(r[0].locale(i))),A.current=r;},[r,i]),er.useEffect(()=>{h(u[0]?u[0].locale(i).format(aa):""),k(u[1]?u[1].locale(i).format(aa):""),T(false),S(false);},[u,i]);let D=(j,V)=>{let z=V.trim(),U=j==="start"?T:S;if(!z){let se=j==="start"?[null,u[1]]:[u[0],null];U(false),p(se);return}let K=ro__default.default(z,aa,true).locale(i);if(!K.isValid()){U(true);return}U(false);let fe=[...u];if(j==="start")fe[0]=K,fe[1]&&K.isAfter(fe[1],"day")&&(fe[1]=null),b(fe[1]?"start":"end");else {let se=fe[0];se&&K.isBefore(se,"day")?(fe=[K,null],b("end")):(fe[1]=K,b("start"));}p(fe),g(K);},M=j=>{d(j.currentTarget);},N=()=>{d(null),b("start"),v(null);},E=!!l,O=j=>{if(!j)return;let V=[...u];if(f==="start")V=[j,null],b("end");else {let z=V[0];z&&j.isBefore(z)?(V=[j,null],b("end")):(V=[z,j],b("start"));}p(V);},F=j=>{let V=ro__default.default().locale(i),z=[null,null];switch(j){case "today":z=[V,V];break;case "week":z=[V.startOf("week"),V.endOf("week")];break;case "month":z=[V.startOf("month"),V.endOf("month")];break}p(z),b("start"),g(V);},X=()=>{o&&o(u),N();},H=()=>{p(r),b("start"),N();},Y=er.useCallback(j=>{let{day:V,...z}=j,[U,K]=u,fe=U?V.isSame(U,"day"):false,se=K?V.isSame(K,"day"):false,ue=U&&K?V.isBetween(U,K,"day","()"):false,Se=false;return f==="end"&&U&&!K&&m&&V.isAfter(U,"day")&&V.isBefore(m.add(1,"day"),"day")&&(Se=true),e(yh,{...z,day:V,disableMargin:true,isStart:fe,isEnd:se,isInRange:ue||Se,onMouseEnter:()=>v(V)})},[u,f,m]),W=j=>j?j.locale(i).format("YYYY-MM-DD"):"";return c("div",{className:"orb-date-range-picker",children:[e(ze,{className:"orb-date-range-field",label:s,value:u[0]?`${W(u[0])} - ${W(u[1])}`:"",onClick:M,fullWidth:true,size:"small",InputLabelProps:{sx:{fontSize:Vo}},InputProps:{readOnly:true,sx:{fontSize:Vo,"& .orb-inp":{fontSize:Vo},paddingRight:"4px"},endAdornment:e(ae,{className:"orb-date-range-calendar-trigger",size:"small",onClick:M,tooltip:s,children:e(Tt,{name:"calendar",size:16})})}}),c(ti,{open:E,anchorEl:l,onClose:N,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},className:"orb-date-range-popover",children:[e("div",{className:"orb-date-range-inputs",children:c(ie,{className:"orb-date-range-input-row",direction:"row",alignItems:"center",spacing:1.5,justifyContent:"space-between",children:[e(ze,{className:"orb-date-range-manual-field",label:n("dateRange.startDate"),placeholder:aa,value:x,error:w,size:"small",onFocus:()=>b("start"),onChange:j=>{h(j.target.value),w&&T(false);},onBlur:()=>D("start",x),onKeyDown:j=>{j.key==="Enter"&&(j.preventDefault(),D("start",x));},sx:{"& .orb-inp":{fontSize:Vo,py:.75},"& label":{fontSize:Vo}}}),e(Hd,{color:"action",fontSize:"small"}),e(ze,{className:"orb-date-range-manual-field",label:n("dateRange.endDate"),placeholder:aa,value:C,error:I,size:"small",onFocus:()=>{u[0]&&b("end");},onChange:j=>{k(j.target.value),I&&S(false);},onBlur:()=>D("end",C),onKeyDown:j=>{j.key==="Enter"&&(j.preventDefault(),D("end",C));},sx:{"& .orb-inp":{fontSize:Vo,py:.75},"& label":{fontSize:Vo}}})]})}),e("div",{className:"orb-date-range-shortcuts",children:c(ie,{direction:"row",spacing:1,justifyContent:"center",children:[e(xt,{label:n("dateRange.today"),onClick:()=>F("today"),clickable:true,size:"small",variant:"outlined"}),e(xt,{label:n("dateRange.thisWeek"),onClick:()=>F("week"),clickable:true,size:"small",variant:"outlined"}),e(xt,{label:n("dateRange.thisMonth"),onClick:()=>F("month"),clickable:true,size:"small",variant:"outlined"})]})}),e("div",{className:"orb-date-range-calendar",children:e(Fd,{dateAdapter:ja,adapterLocale:i,children:e(Od,{value:null,referenceDate:y,onMonthChange:g,onYearChange:g,onChange:O,slots:{day:Y},views:["year","month","day"],openTo:"day",showDaysOutsideCurrentMonth:true})})}),e(Dt,{}),c(ie,{direction:"row",justifyContent:"flex-end",spacing:1,sx:{p:2},children:[e(we,{size:"small",onClick:H,color:"inherit",children:n("common.cancel")}),e(we,{size:"small",variant:"contained",onClick:X,children:n("common.done")})]})]})]})};P();var Ni={equals:"=",contains:"\u2287",notContains:"\u2285",wildcard:"*","=":"=","!=":"!=",">":">","<":"<",">=":"\u2265","<=":"\u2264",between:"\u2194"},Sh={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"},wh=["contains","notContains",">",">=","<","<=","equals"],Xp=["=","!=",">","<",">=","<=","between"],or="0.85rem",kh=({field:t,value:r,onChange:o})=>{let{t:n}=pe(),[a,i]=er.useState(null),[s,l]=er.useState(null),[d,u]=er.useState(null),[p,f]=er.useState(""),[b,m]=er.useState(""),[v,y]=er.useState(""),[g,x]=er.useState("");er.useEffect(()=>{let M=setTimeout(()=>{x(v);},1e3);return ()=>clearTimeout(M)},[v]);let h=r?.operator||(t.type==="number"?"=":"equals"),C=r?.value,k=M=>{let N=Sh[M];return N?n(N):M},w=M=>{i(a?null:M.currentTarget);},T=M=>{o({...r,operator:M,value:C}),i(null);},I={size:"small",fullWidth:true,variant:"outlined",InputLabelProps:{sx:{fontSize:or}},InputProps:{sx:{fontSize:or}},SelectProps:{MenuProps:{PaperProps:{sx:{"& .orb-menu-item, & option":{fontSize:or,paddingTop:"4px",paddingBottom:"4px",minHeight:"auto"}}}}}},S=t.type||"text";if(S==="date"){let N=(E=>{if(!E)return [null,null];if(Array.isArray(E)&&E.length===2){let O=E[0]?ro__default.default.isDayjs(E[0])?E[0]:ro__default.default(E[0]):null,F=E[1]?ro__default.default.isDayjs(E[1])?E[1]:ro__default.default(E[1]):null;return [O,F]}return ro__default.default.isDayjs(E)||typeof E=="string"?[ro__default.default.isDayjs(E)?E:ro__default.default(E),null]:[null,null]})(C);return e(Kp,{label:t.label,value:N,onChange:E=>o({value:E,operator:"between"})})}if(S==="number"&&h==="between"){let M=()=>{o({value:[p,b],operator:"between"}),l(null);},N=Array.isArray(C)?`${C[0]||""} - ${C[1]||""}`:"";return c(jsxRuntime.Fragment,{children:[e(ze,{...I,label:t.label,value:N,placeholder:n("smartFilter.minMaxPlaceholder"),InputProps:{...I.InputProps,startAdornment:e(io,{position:"start",children:e(ct,{title:k("between"),children:e(ae,{size:"small",onClick:w,sx:{width:24,height:24,fontSize:or},children:Ni.between})})}),readOnly:true},onClick:E=>l(s?null:E.currentTarget)}),e(Qt,{anchorEl:a,open:!!a,onClose:()=>i(null),PaperProps:{sx:{"& .orb-menu-item, & option":{fontSize:or,minHeight:"auto",py:.5}}},children:Xp.map(E=>c("option",{selected:E===h,onClick:()=>T(E),children:[e("div",{sx:{width:24,display:"inline-block",fontWeight:"bold"},children:Ni[E]}),e(Gt,{primary:k(E),primaryTypographyProps:{fontSize:or}})]},E))}),e(ti,{open:!!s,anchorEl:s,onClose:()=>l(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},children:c("div",{sx:{p:2,display:"flex",gap:1,alignItems:"center"},children:[e(ze,{size:"small",label:n("smartFilter.min"),type:"number",value:p,onChange:E=>f(E.target.value),sx:{width:100},InputLabelProps:{sx:{fontSize:or}},InputProps:{sx:{fontSize:or}}}),e(zd,{color:"action"}),e(ze,{size:"small",label:n("smartFilter.max"),type:"number",value:b,onChange:E=>m(E.target.value),sx:{width:100},InputLabelProps:{sx:{fontSize:or}},InputProps:{sx:{fontSize:or}}}),e(we,{variant:"contained",size:"small",onClick:M,children:n("common.ok")})]})})]})}if(t.isValueHelp||S==="value-help"){let M=t.valueHelp?.mode||"single";return e(Sp,{...I,...t.valueHelp,label:t.label,placeholder:t.placeholder||t.valueHelp?.placeholder,value:C??(M==="multiple"?[]:null),mode:M,onChange:N=>o({value:N,operator:M==="multiple"?"anyOf":"equals"})})}if(S==="select")return c(zt,{size:"small",fullWidth:true,label:t.label,value:C||"",onChange:M=>o({...r,value:M.target.value,operator:"equals"}),children:[e("option",{value:"",children:n("common.none")}),t.options?.map(M=>e("option",{value:M.value,children:M.label},M.value))]});if(S==="multi-select"){let M=Array.isArray(C)?C:[],N=t.options?.filter(Y=>Y.label.toLowerCase().includes(g.toLowerCase()))||[],E=Y=>t.options?.find(W=>W.value===Y)?.label||Y,O=M.map(E),F=O.length===0?n("common.none"):O.length>2?`${O.slice(0,2).join(", ")} +${O.length-2}`:O.join(", "),X=()=>{u(null),y(""),x("");},H=Y=>{let W=M.includes(Y)?M.filter(j=>j!==Y):[...M,Y];o({...r,value:W,operator:"anyOf"});};return c("div",{className:"orb-fld",children:[e("label",{children:t.label}),c(we,{variant:"outlined",size:"small",onClick:Y=>u(d?null:Y.currentTarget),sx:{width:"100%",minHeight:36,justifyContent:"space-between",fontSize:or,fontWeight:400},children:[e("span",{sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:F}),e(Vr,{fontSize:"small"})]}),e(Qt,{anchorEl:d,open:!!d,onClose:X,PaperProps:{sx:{width:280,maxHeight:340,overflowY:"auto",p:.5}},children:c("div",{onClick:Y=>Y.stopPropagation(),sx:{display:"grid",gap:.35},children:[e(ze,{size:"small",autoFocus:true,placeholder:n("smartFilter.searchPlaceholder"),fullWidth:true,InputProps:{startAdornment:e(io,{position:"start",children:e(zo,{fontSize:"small"})}),sx:{fontSize:or}},value:v,onChange:Y=>y(Y.target.value),onKeyDown:Y=>Y.stopPropagation()}),N.length>0?N.map(Y=>{let W=M.includes(Y.value);return c("div",{role:"option","aria-selected":W,tabIndex:0,className:`orb-menu-item ${W?"orb-selected":""}`,onClick:()=>H(Y.value),onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),H(Y.value));},children:[e(It,{checked:W,size:"small",inputProps:{tabIndex:-1},sx:{pointerEvents:"none"}}),e(Gt,{primary:Y.label})]},String(Y.value))}):e("div",{className:"orb-menu-item","aria-disabled":"true",children:n("smartFilter.noOptionsFound")})]})})]})}let A=S==="number"?Xp:wh;return c(jsxRuntime.Fragment,{children:[e(ze,{...I,className:"orb-filter-operator-field",label:t.label,sx:{minWidth:"120px"},value:C||"",type:S==="number"?"number":"text",onChange:M=>o({...r,value:M.target.value,operator:h}),InputProps:{...I.InputProps,startAdornment:e(io,{position:"start",children:e(ct,{title:k(h),children:e(ae,{className:"orb-filter-operator-trigger",size:"small",onClick:w,onMouseDown:M=>M.preventDefault(),sx:{width:24,height:24,fontSize:or,fontWeight:"bold",color:"primary.main",bgcolor:"action.hover"},children:Ni[h]})})}),endAdornment:t.hasSearchIcon?e(io,{position:"end",children:e(zo,{color:"action"})}):void 0}}),e(Qt,{anchorEl:a,open:!!a,onClose:()=>i(null),PaperProps:{sx:{"& .orb-menu-item, & option":{fontSize:or,minHeight:"auto",py:.5}}},children:A.map(M=>c("option",{selected:M===h,onClick:()=>T(M),children:[e("span",{className:"orb-filter-operator-symbol",children:Ni[M]}),e(Gt,{primary:k(M),primaryTypographyProps:{fontSize:or}})]},M))})]})},Wr=({fields:t,filters:r,onFilterChange:o,variants:n=[],currentVariantId:a,onVariantLoad:i,onVariantSave:s,onVariantDelete:l,onVariantSetDefault:d,onSearch:u,loading:p=false,appId:f,tableKey:b,currentLayout:m,currentLayoutId:v,layoutRefs:y,variantService:g,serviceUrl:x})=>{let{t:h}=pe(),[C,k]=er.useState(true),[w,T]=er.useState(null),[I,S]=er.useState(t.filter(N=>!N.hidden).map(N=>N.id)),A=(N,E)=>{o({...r,[N]:E});},D=N=>{I.includes(N)?S(I.filter(E=>E!==N)):S([...I,N]);};return c(Ae,{className:`orb-smart-filter ${C?"orb-smart-filter-expanded":"orb-smart-filter-collapsed"}`,sx:{mb:0,display:"flex",flexDirection:"column",overflow:"visible",position:"relative"},children:[C?c(jsxRuntime.Fragment,{children:[c("div",{className:"orb-smart-filter-header",children:[f?e(Gp,{appId:f,tableKey:b,currentFilters:{values:r,visibleFields:I},currentLayout:m,currentLayoutId:v,layoutRefs:y,onLoad:N=>{if(!N.filters)return;let E=null;if(Array.isArray(N.filters)){let O=b||"default",F=N.filters.find(X=>X.scope===O);E=F?F.filters:null;}else E=N.filters;E&&(E.values||E.visibleFields?(E.visibleFields&&Array.isArray(E.visibleFields)&&S(E.visibleFields),E.values&&o(E.values)):o(E)),i&&i(N);},variantService:g,serviceUrl:x,currentVariantId:a}):e(Ri,{variants:n,currentVariantId:a,onLoad:i,onSave:N=>{s&&s({...N,filters:{values:r,visibleFields:I}});},onDelete:l,onSetDefault:d}),c("div",{className:"orb-smart-filter-actions",children:[e(ct,{title:h("smartFilter.addFilters"),children:e(we,{className:"orb-smart-filter-adapt",onClick:N=>T(w?null:N.currentTarget),size:"small",color:"primary",startIcon:e(dp,{fontSize:"small"}),sx:{textTransform:"none",fontSize:or,whiteSpace:"nowrap",minWidth:"fit-content"},children:h("smartFilter.adaptFilters")})}),e(ae,{className:"orb-smart-filter-go",tooltip:h("smartFilter.go"),"aria-label":h("smartFilter.go"),onClick:u,disabled:p,children:p?e(Xr,{size:16}):e(Tt,{name:"play",size:16})}),c(Qt,{anchorEl:w,open:!!w,onClose:()=>T(null),slotProps:{paper:{style:{maxHeight:400,width:"25ch"},sx:{"& .orb-menu-item, & option":{fontSize:or,minHeight:32}}}},children:[e("option",{disabled:true,children:e(Gt,{primary:h("smartFilter.visibleFilters"),primaryTypographyProps:{fontSize:or}})}),e(Dt,{}),t.map(N=>c("option",{onClick:()=>D(N.id),children:[e(It,{checked:I.includes(N.id),size:"small"}),e(Gt,{primary:N.label,primaryTypographyProps:{fontSize:or}})]},N.id))]})]})]}),e("div",{className:"orb-smart-filter-grid",children:e(el,{container:true,spacing:2,columns:{xs:2,sm:3,md:4,lg:6},children:t.filter(N=>I.includes(N.id)).map(N=>e(el,{size:1,children:e(kh,{field:N,value:r[N.id]||{value:"",operator:N.type==="number"?"=":"equals"},onChange:E=>A(N.id,E)})},N.id))})})]}):null,e("div",{className:"orb-smart-filter-toggle",children:e(ae,{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(ai,{className:"orb-smart-filter-toggle-icon",sx:{fontSize:20},color:"action"}):e(Vr,{className:"orb-smart-filter-toggle-icon",sx:{fontSize:20},color:"action"})})})]})};P();var Yp=({layouts:t,currentLayoutId:r,onLoad:o,onSave:n,onDelete:a,onSetDefault:i})=>{let{t:s}=pe(),[l,d]=er.useState(null),[u,p]=er.useState(false),[f,b]=er.useState(""),[m,v]=er.useState(""),[y,g]=er.useState({isDefault:false,isPublic:false}),x=t.find(I=>I.id===r),h=I=>{d(I.currentTarget);},C=()=>{d(null);},k=I=>{o(I),C();},w=()=>{b(""),v(""),g({isDefault:false,isPublic:false}),p(true),C();},T=()=>{f.trim()&&(n({name:f,description:m,...y}),p(false));};return c("div",{className:"orb-layout-actions",sx:{display:"flex",alignItems:"center",gap:.25},children:[e(ct,{title:s("layout.layoutOptions"),children:e(ae,{onClick:h,color:x?"primary":"default",size:"small",children:e(bp,{fontSize:"small"})})}),c(Qt,{anchorEl:l,open:!!l,onClose:C,align:"end",PaperProps:{sx:{width:320,maxHeight:400}},children:[e("option",{disabled:true,children:e(L,{variant:"caption",children:s("layout.selectLayout")})}),c("option",{onClick:w,children:[e(zr,{children:e(Po,{fontSize:"small"})}),e(Gt,{children:s("layout.saveCurrentLayout")})]}),e(Dt,{}),t.length===0&&e("option",{disabled:true,children:e(L,{variant:"body2",color:"text.secondary",children:s("layout.noSavedLayouts")})}),t.map((I,S)=>e("option",{onClick:()=>k(I),selected:I.id===r,children:c("div",{sx:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"},children:[c("div",{sx:{display:"flex",flexDirection:"column",overflow:"hidden",mr:1},children:[e("div",{sx:{display:"flex",alignItems:"center",gap:1},children:e(L,{variant:"body2",fontWeight:I.id===r?"bold":"normal",noWrap:true,children:I.name})}),I.description&&e(L,{variant:"caption",color:"text.secondary",noWrap:true,children:I.description})]}),c("div",{sx:{display:"flex",alignItems:"center"},onClick:A=>A.stopPropagation(),children:[e(ct,{title:I.isDefault?s("layout.removeDefault"):s("layout.setAsDefault"),children:e(ae,{size:"small",onClick:A=>{A.stopPropagation(),i(I.id);},children:I.isDefault?e(mp,{fontSize:"small",color:"warning"}):e(up,{fontSize:"small"})})}),e(ct,{title:s("common.delete"),children:e(ae,{size:"small",color:"error",onClick:A=>{A.stopPropagation(),a(I.id);},children:e(oi,{fontSize:"small"})})})]})]})},I.id||S))]}),e(Lt,{open:u,onClose:()=>p(false),maxWidth:"xs",fullWidth:true,className:"orb-layout-save-dialog",title:s("layout.saveLayout"),actions:c(jsxRuntime.Fragment,{children:[e(we,{variant:"ghost",onClick:()=>p(false),children:s("common.cancel")}),e(we,{onClick:T,variant:"primary",disabled:!f.trim(),children:s("common.save")})]}),children:c("div",{className:"orb-layout-save-form",children:[e(ze,{label:s("layout.layoutName"),value:f,onChange:I=>b(I.target.value),fullWidth:true,autoFocus:true,size:"small",helperText:s("layout.layoutNameHelper")}),t.some(I=>I.name===f)&&e(L,{className:"orb-layout-save-warning",variant:"caption",color:"warning.main",children:s("layout.warningOverwrite")}),e(ze,{label:s("layout.layoutDescription"),value:m,onChange:I=>v(I.target.value),fullWidth:true,size:"small"}),e(It,{className:"orb-layout-save-option",checked:y.isDefault,onChange:I=>g({...y,isDefault:I.target.checked}),label:s("layout.useAsDefault")}),e(It,{className:"orb-layout-save-option",checked:y.isPublic,onChange:I=>g({...y,isPublic:I.target.checked}),label:s("layout.publicAllUsers")})]})})]})};P();var bn=({appId:t,tableKey:r="default",currentLayoutData:o,onLayoutLoad:n,targetLayoutId:a,activeLayoutId:i,serviceUrl:s,onError:l,onSuccess:d})=>{let{t:u}=pe(),[p,f]=er.useState([]),[b,m]=er.useState(""),v=`orbcafe.layouts.${t}.${r}`,y=S=>({id:S.layoutId,name:S.name,description:S.description??"",isDefault:!!S.isDefault,isPublic:!!S.isPublic,createdAt:S.createdAt??new Date().toISOString(),layoutData:S.layout??{}}),g=S=>({appId:t,tableKey:r,layoutId:S.id,name:S.name,description:S.description??"",isDefault:!!S.isDefault,isPublic:!!S.isPublic,createdAt:S.createdAt,layout:S.layoutData}),x=er.useCallback(()=>{try{let S=localStorage.getItem(v);if(!S)return [];let A=JSON.parse(S);return Array.isArray(A)?A:[]}catch{return []}},[v]),h=er.useCallback(S=>{try{localStorage.setItem(v,JSON.stringify(S));}catch{}},[v]);er.useEffect(()=>{i!==void 0&&m(i);},[i]),er.useEffect(()=>{if(a&&p.length>0){let S=p.find(A=>A.id===a);S&&(m(S.id),n(S));}},[a,p,n]);let C=er.useCallback(async()=>{if(t){if(!s){let S=x();f(S);let A=S.find(D=>D.isDefault);A&&!b&&!a&&(m(A.id),n(A));return}try{let S=await fetch(`${s}/api/layouts?appId=${encodeURIComponent(t)}&tableKey=${encodeURIComponent(r)}`);if(!S.ok)throw new Error("LAYOUT_FETCH_FAILED");let D=(await S.json()).map(y);f(D);let M=D.find(N=>N.isDefault);M&&!b&&!a&&(m(M.id),n(M));}catch(S){console.error("Error fetching layouts",S);let A=x();f(A);let D=A.find(M=>M.isDefault);D&&!b&&!a&&(m(D.id),n(D)),l&&l(u("layout.toast.loadFallback"));}}},[t,r,s,l,b,n,a,x,u]);return er.useEffect(()=>{C();},[t,r]),e(Yp,{layouts:p,currentLayoutId:b,onLoad:S=>{m(S.id),n(S);},onSave:async S=>{let A=p.find(N=>N.name===S.name),D=A?A.id:Date.now().toString(),M={id:D,...S,createdAt:new Date().toISOString(),layoutData:o,isDefault:S.isDefault??false,isPublic:S.isPublic??false};if(!s){let E=p.some(O=>O.id===D)?p.map(O=>O.id===D?M:O):[...p,M];f(E),h(E),m(D),n(M),d&&d(u("layout.toast.saveLocalSuccess"));return}try{if(!(await fetch(`${s}/api/layouts`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g(M))})).ok)throw new Error("LAYOUT_SAVE_FAILED");d&&d(u("layout.toast.saveSuccess")),await C(),m(D),n(M);}catch(N){console.error("Error saving layout",N);let O=p.some(F=>F.id===D)?p.map(F=>F.id===D?M:F):[...p,M];f(O),h(O),m(D),n(M),d&&d(u("layout.toast.saveLocalSuccess")),l&&l(u("layout.toast.backendUnavailableSavedLocal"));}},onDelete:async S=>{if(!s){let A=p.filter(D=>D.id!==S);f(A),h(A),b===S&&m(""),d&&d(u("layout.toast.deleteLocalSuccess"));return}try{if(!(await fetch(`${s}/api/layouts/${encodeURIComponent(S)}`,{method:"DELETE"})).ok)throw new Error("LAYOUT_DELETE_FAILED");b===S&&m(""),d&&d(u("layout.toast.deleteSuccess")),await C();}catch(A){console.error("Error deleting layout",A);let D=p.filter(M=>M.id!==S);f(D),h(D),b===S&&m(""),d&&d(u("layout.toast.deleteLocalSuccess")),l&&l(u("layout.toast.backendUnavailableDeletedLocal"));}},onSetDefault:async S=>{if(!s){let A=p.map(D=>({...D,isDefault:D.id===S}));f(A),h(A),d&&d(u("layout.toast.defaultLocalSuccess"));return}try{let A=p.find(M=>M.id===S);if(!A)return;if(!(await fetch(`${s}/api/layouts`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g({...A,isDefault:!0}))})).ok)throw new Error("LAYOUT_DEFAULT_FAILED");d&&d(u("layout.toast.defaultSuccess")),await C();}catch(A){console.error("Error setting default",A);let D=p.map(M=>({...M,isDefault:M.id===S}));f(D),h(D),d&&d(u("layout.toast.defaultLocalSuccess")),l&&l(u("layout.toast.backendUnavailableDefaultLocal"));}}})};var Ai=(t,r)=>{if(!t||!t.filters)return null;if(Array.isArray(t.filters)){let o=t.filters.find(a=>a.scope===r);if(o)return o.filters;let n=t.filters.find(a=>a.scope==="default");return n?n.filters:null}return typeof t.filters=="object"?t.filters:null},Ei=(t,r)=>{if(!t)return {layout:null,layoutId:null};let o=null,n=null;if(Array.isArray(t.layoutRefs)){let a=t.layoutRefs.find(i=>i.tableKey===r);a&&(o=a.layoutId);}return !o&&t.layoutId&&(o=t.layoutId),t.layout&&typeof t.layout=="object"&&!Array.isArray(t.layout)&&(n=t.layout),{layoutId:o,layout:n}};function jp(t,r,o){return r[o]<t[o]?-1:r[o]>t[o]?1:0}function Ph(t,r){return t==="desc"?(o,n)=>jp(o,n,r):(o,n)=>-jp(o,n,r)}function Th(t,r){let o=t.map((n,a)=>[n,a]);return o.sort((n,a)=>{let i=r(n[0],a[0]);return i!==0?i:n[1]-a[1]}),o.map(n=>n[0])}var hn=t=>{let r=!!t.disableGrouping,o=!!t.disableSorting,n=er.useCallback(Z=>{let Q=String(Z?.label??Z?.id??"").length*9+64,be=typeof Z?.minWidth=="number"?Z.minWidth:0;return Math.max(100,be,Q)},[]),a=er.useCallback(()=>(t.columns||[]).filter(Z=>!!Z?.numeric).map(Z=>Z.id),[t.columns]),[i,s]=er.useState(""),[l,d]=er.useState(t.order||"asc"),[u,p]=er.useState(t.orderBy||""),[f,b]=er.useState([]),[m,v]=er.useState(t.page||0),[y,g]=er.useState(t.rowsPerPage||20),[x,h]=er.useState(t.selected||[]),[C,k]=er.useState(t.columns?t.columns.map(Z=>Z.id):[]),[w,T]=er.useState(t.columns?t.columns.map(Z=>Z.id):[]),[I,S]=er.useState(t.showSummary||false),[A,D]=er.useState(()=>a()),[M,N]=er.useState([]),[E,O]=er.useState(new Set),[F,X]=er.useState(()=>{let Z={};return (t.columns||[]).forEach($=>{Z[$.id]=n($);}),Z}),[H,Y]=er.useState(null),[W,j]=er.useState(null),[V,z]=er.useState(null),[U,K]=er.useState(null),[fe,se]=er.useState(false),[ue,Se]=er.useState(""),[$e,ke]=er.useState(""),le=r?[]:M,Ee=er.useCallback(Z=>{if(r){N([]),O(new Set),j(null);return}N(Z);},[r]);er.useEffect(()=>{r&&(N([]),O(new Set),j(null));},[r]),er.useEffect(()=>{o&&(d("asc"),p(""),b([]));},[o]),er.useEffect(()=>{t.layout&&wt(t.layout);},[t.layout]),er.useEffect(()=>{if(o){d("asc"),p("");return}t.order!==void 0&&d(t.order),t.orderBy!==void 0&&p(t.orderBy);},[t.order,t.orderBy,o]),er.useEffect(()=>{t.selected!==void 0&&h(t.selected);},[t.selected]),er.useEffect(()=>{t.page!==void 0&&v(t.page);},[t.page]),er.useEffect(()=>{t.rowsPerPage!==void 0&&g(t.rowsPerPage);},[t.rowsPerPage]),er.useEffect(()=>{let Z=a();D($=>$.filter(be=>Z.includes(be)));},[a]),er.useEffect(()=>{X(Z=>{let $={...Z};return (t.columns||[]).forEach(Q=>{$[Q.id]===void 0&&($[Q.id]=n(Q));}),$});},[t.columns,n]),er.useEffect(()=>{T(Z=>{let $=(t.columns||[]).map(qe=>qe.id),Q=new Set($),be=Z.filter(qe=>Q.has(qe)),Ce=new Set(be),Le=$.filter(qe=>!Ce.has(qe)),_e=[...be,...Le];return _e.length===Z.length&&_e.every((qe,je)=>qe===Z[je])?Z:_e});},[t.columns]);let Me=er.useMemo(()=>{let Z=t.columns||[];if(w.length===0)return Z;let $=new Map(Z.map(Ce=>[Ce.id,Ce])),Q=[],be=new Set;return w.forEach(Ce=>{let Le=$.get(Ce);Le&&(Q.push(Le),be.add(Ce));}),Z.forEach(Ce=>{be.has(Ce.id)||Q.push(Ce);}),Q},[t.columns,w]),Pe=er.useMemo(()=>{let Z=t.rows||[];return i&&(Z=Z.filter($=>Object.keys($).some(Q=>String($[Q]).toLowerCase().includes(i.toLowerCase())))),Z},[t.rows,i]),Ve=er.useMemo(()=>{if(o||t.onSortChange)return Pe;if(f.length>0){let Z=[...Pe];return Z.sort(($,Q)=>{for(let be of f){let Ce=$?.[be.field],Le=Q?.[be.field];if(!(Ce==null&&Le==null)){if(Ce==null)return be.direction==="asc"?-1:1;if(Le==null)return be.direction==="asc"?1:-1;if(Ce<Le)return be.direction==="asc"?-1:1;if(Ce>Le)return be.direction==="asc"?1:-1}}return 0}),Z}return u?Th(Pe,Ph(l,u)):Pe},[Pe,l,u,f,t.onSortChange,o]),tt=er.useCallback(Z=>{if(le.length===0)return Z.map(Le=>({type:"row",data:Le,id:Le[t.rowKey||"id"]}));let $=[...Z].sort((Le,_e)=>{for(let qe of le){if(Le[qe]<_e[qe])return -1;if(Le[qe]>_e[qe])return 1}return 0}),Q=(Le,_e=0)=>{if(_e>=le.length)return Le;let qe=le[_e],je={},mt=[];return Le.forEach(ft=>{let Rt=ft[qe],yt=`${qe}:${Rt}`;je[yt]||(je[yt]={key:yt,field:qe,value:Rt,children:[],count:0,level:_e},mt.push(je[yt])),je[yt].children.push(ft),je[yt].count++;}),mt.forEach(ft=>{ft.children&&(ft.children=Q(ft.children,_e+1));}),mt},be=Q($),Ce=(Le,_e="")=>{let qe=[];return Le.forEach(je=>{if(je.children){let mt=_e?`${_e}>${je.key}`:je.key,ft=E.has(mt);qe.push({type:"group",id:mt,field:je.field,value:je.value,level:je.level,count:je.count,isExpanded:ft,childIds:(function Rt(yt){let B=[];return yt.children.forEach(J=>{J.children?B=B.concat(Rt(J)):B.push(J[t.rowKey||"id"]);}),B})(je)}),ft&&(qe=qe.concat(Ce(je.children,mt)));}else qe.push({type:"row",data:je,id:je[t.rowKey||"id"],level:le.length});}),qe};return Ce(be)},[le,E,t.rowKey]),nt=er.useCallback(Z=>{if(le.length===0)return [];let $=[...Z].sort((Ce,Le)=>{for(let _e of le){if(Ce[_e]<Le[_e])return -1;if(Ce[_e]>Le[_e])return 1}return 0}),Q=[],be=(Ce,Le,_e)=>{if(Le>=le.length)return;let qe=le[Le],je=new Map;Ce.forEach(mt=>{let ft=mt[qe],Rt=je.get(ft);Rt?Rt.push(mt):je.set(ft,[mt]);}),je.forEach((mt,ft)=>{let Rt=`${qe}:${ft}`,yt=_e?`${_e}>${Rt}`:Rt;Q.push(yt),be(mt,Le+1,yt);});};return be($,0,""),Q},[le]),it=er.useMemo(()=>tt(Ve),[Ve,tt]),q=er.useMemo(()=>nt(Ve),[Ve,nt]),De=er.useMemo(()=>{let Z=(t.rows||[]).length;return typeof t.count=="number"&&t.count>Z},[t.count,t.rows]),ye=er.useMemo(()=>De?it:y>0?it.slice(m*y,m*y+y):it,[it,m,y,De]),Be=er.useMemo(()=>De&&typeof t.count=="number"?t.count:it.length,[it.length,De,t.count]),at=Z=>{O($=>{let Q=new Set($);return Q.has(Z)?Q.delete(Z):Q.add(Z),Q});},Ze=Z=>{let $=q.filter(Q=>Q===Z||Q.startsWith(`${Z}>`));O(Q=>{let be=new Set(Q);return $.forEach(Ce=>be.add(Ce)),be});},St=Z=>{O($=>{let Q=new Set($);return Array.from(Q).forEach(be=>{(be===Z||be.startsWith(`${Z}>`))&&Q.delete(be);}),Q});},Mt=Z=>{if(!Z){O(new Set);return}O(new Set(q));},Ot=Z=>{let $=q.filter(Q=>Q.startsWith(`${Z}>`));return $.length===0?E.has(Z):E.has(Z)&&$.every(Q=>E.has(Q))},At=Z=>{if(o)return;f.length>0&&b([]);let $=u===Z&&l==="asc",Q=u===Z&&l==="desc";if(t.onSortChange){$?t.onSortChange(Z,"desc"):Q?t.onSortChange("","asc"):t.onSortChange(Z,"asc");return}$?(d("desc"),p(Z)):Q?(d("asc"),p("")):(d("asc"),p(Z));},re=Z=>{if(o){d("asc"),p(""),b([]);return}let $=Z.filter(Q=>Q&&Q.field);b($),$.length>0&&p("");},Ke=()=>{b([]);},Fe=(Z,$)=>{X(Q=>({...Q,[Z]:$}));},ce=Z=>{if(Z.target.checked){let $=Pe.map(Q=>Q[t.rowKey||"id"]);h($),t.onSelectionChange&&t.onSelectionChange($);return}h([]),t.onSelectionChange&&t.onSelectionChange([]);},ve=(Z,$)=>{let Q=$[t.rowKey||"id"],be=x.indexOf(Q),Ce=[];be===-1?Ce=Ce.concat(x,Q):be===0?Ce=Ce.concat(x.slice(1)):be===x.length-1?Ce=Ce.concat(x.slice(0,-1)):be>0&&(Ce=Ce.concat(x.slice(0,be),x.slice(be+1))),h(Ce),t.onSelectionChange&&t.onSelectionChange(Ce);},te=Z=>{v(Z),t.onPageChange&&t.onPageChange(Z);},he=Z=>{g(Z),v(0),t.onPageChange&&t.onPageChange(0),t.onRowsPerPageChange&&t.onRowsPerPageChange(Z);},Ne=Z=>{let $=C.indexOf(Z),Q=[...C];$===-1?Q.push(Z):Q.splice($,1),k(Q);},Je=Z=>{if(r)return;let $=le.indexOf(Z),Q=[...le];$===-1?Q.push(Z):Q.splice($,1),Ee(Q);},st=Z=>{a().includes(Z)&&D(Q=>Q.includes(Z)?Q.filter(be=>be!==Z):[...Q,Z]);},pt=(Z,$)=>{!Z||!$||Z===$||T(Q=>{let be=Q.indexOf(Z),Ce=Q.indexOf($);if(be===-1||Ce===-1)return Q;let Le=[...Q];return Le.splice(be,1),Le.splice(Ce,0,Z),Le});},Bt=Z=>{let $=Z?.active?.id,Q=Z?.over?.id;typeof $=="string"&&typeof Q=="string"&&pt($,Q);},Xt=Z=>{t.onLayoutSave&&t.onLayoutSave({visibleColumns:C,columnOrder:w,order:o?"asc":l,orderBy:o?"":u,sortBy:o?[]:f,grouping:le,columnWidths:F,showSummary:I,summaryColumns:A});},Vt=Z=>{let{layout:$,layoutId:Q}=Ei(Z,t.tableKey||"default");Q?(ke(Q),Se(Q)):(ke(""),Se("")),$&&($.visibleColumns&&k($.visibleColumns),Array.isArray($.columnOrder)&&T($.columnOrder),o?(d("asc"),p(""),b([])):($.order&&d($.order),$.orderBy&&p($.orderBy),Array.isArray($.sortBy)&&b($.sortBy)),$.grouping&&Ee($.grouping),$.columnWidths&&X($.columnWidths),$.showSummary!==void 0&&S(!!$.showSummary),Array.isArray($.summaryColumns)&&D($.summaryColumns));},wt=Z=>{let $=Z?.layoutData||Z?.layout||Z||{};$.visibleColumns&&k($.visibleColumns),Array.isArray($.columnOrder)&&T($.columnOrder),o?(d("asc"),p(""),b([])):($.order&&d($.order),$.orderBy!==void 0&&p($.orderBy),Array.isArray($.sortBy)&&b($.sortBy)),$.grouping&&Ee($.grouping),$.columnWidths&&X($.columnWidths),$.showSummary!==void 0&&S(!!$.showSummary),Array.isArray($.summaryColumns)&&D($.summaryColumns),O(new Set),v(0),Z?.id&&Se(Z.id),ke("");};er.useEffect(()=>{t.layout&&Vt({layout:t.layout});},[t.layout]);let Wt=Z=>{Z.preventDefault(),K(U===null?{mouseX:Z.clientX+2,mouseY:Z.clientY-6}:null);},ht=()=>{K(null);},Nt=er.useMemo(()=>{if(!I)return {};let Z={};t.columns.forEach(Q=>{if(Q.numeric&&A.includes(Q.id)){let be=Pe.reduce((Ce,Le)=>{let _e=parseFloat(Le[Q.id]);return Ce+(isNaN(_e)?0:_e)},0);Z[Q.id]=be.toFixed(2);}else Z[Q.id]="";});let $=t.columns.find(Q=>C.includes(Q.id)&&!Q.numeric);return $&&!$.numeric&&(Z[$.id]="Total"),Z},[Pe,t.columns,I,A,C]),lt=()=>{if(!t.columns||!Pe)return;let Z=t.columns.map(Le=>Le.label).join(","),$=Pe.map(Le=>t.columns.map(_e=>{let qe=Le[_e.id];return `"${(qe==null?"":String(qe)).replace(/"/g,'""')}"`}).join(",")).join(`
183
+ `;return er.useEffect(()=>{let d=i.current;if(!d)return;let u=new ogl.Renderer({alpha:true,premultipliedAlpha:false}),p=u.gl;p.clearColor(0,0,0,0),d.appendChild(p.canvas);let f=new ogl.Triangle(p),b=new ogl.Program(p,{vertex:s,fragment:l,uniforms:{iTime:{value:0},iResolution:{value:new ogl.Vec3(p.canvas.width,p.canvas.height,p.canvas.width/p.canvas.height)},hue:{value:t},hover:{value:0},rot:{value:0},hoverIntensity:{value:r},backgroundColor:{value:um(a)}}}),m=new ogl.Mesh(p,{geometry:f,program:b});function v(){if(!d)return;let I=window.devicePixelRatio||1,S=d.clientWidth,A=d.clientHeight;u.setSize(S*I,A*I),p.canvas.style.width=S+"px",p.canvas.style.height=A+"px",b.uniforms.iResolution.value.set(p.canvas.width,p.canvas.height,p.canvas.width/p.canvas.height);}window.addEventListener("resize",v),v();let y=0,g=0,x=0,h=.3,C=I=>{let S=d.getBoundingClientRect(),A=I.clientX-S.left,R=I.clientY-S.top,M=S.width,N=S.height,E=Math.min(M,N),O=M/2,F=N/2,_=(A-O)/E*2,B=(R-F)/E*2;Math.sqrt(_*_+B*B)<.8?y=1:y=0;},k=()=>{y=0;};d.addEventListener("mousemove",C),d.addEventListener("mouseleave",k);let w,T=I=>{w=requestAnimationFrame(T);let S=(I-g)*.001;g=I,b.uniforms.iTime.value=I*.001,b.uniforms.hue.value=t,b.uniforms.hoverIntensity.value=r,b.uniforms.backgroundColor.value=um(a);let A=n?1:y;b.uniforms.hover.value+=(A-b.uniforms.hover.value)*.1,o&&A>.5&&(x+=S*h),b.uniforms.rot.value=x,u.render({scene:m});};return w=requestAnimationFrame(T),()=>{cancelAnimationFrame(w),window.removeEventListener("resize",v),d.removeEventListener("mousemove",C),d.removeEventListener("mouseleave",k),p.canvas.parentNode===d&&d.removeChild(p.canvas),p.getExtension("WEBGL_lose_context")?.loseContext();}},[t,r,o,n,a]),e("div",{ref:i,className:"w-full h-full"})}function Ry(t,r,o){let n,a,i;if(r===0)n=a=i=o;else {let s=(u,p,f)=>(f<0&&(f+=1),f>1&&(f-=1),f<.16666666666666666?u+(p-u)*6*f:f<.5?p:f<.6666666666666666?u+(p-u)*(.6666666666666666-f)*6:u),l=o<.5?o*(1+r):o+r-o*r,d=2*o-l;n=s(d,l,t+1/3),a=s(d,l,t),i=s(d,l,t-1/3);}return new ogl.Vec3(n,a,i)}function um(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 r=t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(r)return new ogl.Vec3(parseInt(r[1])/255,parseInt(r[2])/255,parseInt(r[3])/255);let o=t.match(/hsla?\((\d+),\s*(\d+)%,\s*(\d+)%/);if(o){let n=parseInt(o[1])/360,a=parseInt(o[2])/100,i=parseInt(o[3])/100;return Ry(n,a,i)}return new ogl.Vec3(0,0,0)}var gm=Es(()=>{"use strict";"use client";P();});var Ug={canvas:"#ffffff",surface:"#f5f5f5",surface2:"#f5f5f5",surface3:"#f5f5f5",fg:"#555555",muted:"#8c8c8c",border:"#dbdbdb",primary:"#154194",onPrimary:"#ffffff",link:"#154194",p50:"#f0f3f9",p100:"#dce4f1",p200:"#bac9e3",p300:"#91a8d1",p600:"#0f3276",p700:"#08255a",accent:"#fc4c02",err:"#ac3101",errBg:"#fff4f0",warnBg:"#fff2ee",hover:"rgba(21, 65, 148, 0.06)",selected:"rgba(21, 65, 148, 0.10)",focusRing:"rgba(21, 65, 148, 0.18)",focusSolid:"#154194",disabledFg:"#aeaeae",disabledBg:"#f0f0f0",chartGrid:"#dbdbdb",chartText:"#8c8c8c",track:"#f5f5f5",shadow1:"0 1px 2px rgba(1,9,26,.05),0 2px 6px rgba(1,9,26,.06)",shadow2:"0 4px 14px rgba(1,9,26,.10)",shadow3:"0 12px 32px rgba(1,9,26,.16)",fontBrand:"Montserrat",inverseSurface:"#01091a",inverseFg:"#ffffff",inverseLink:"#91a8d1",aiAccent:"#21bcff",statusFg:"#475569",statusPrimary:"#1d4ed8",statusSuccess:"#047857",statusWarning:"#b45309",statusError:"#b91c1c",statusInfo:"#0369a1",chart1:"#154194",chart2:"#91a8d1",chart3:"#8c8c8c",chart4:"#08255a",chart5:"#fc4c02",chart6:"#bac9e3",chartPositive:"#66bb6a",chartNegative:"#ef5350"},Kg={canvas:"#01091a",surface:"#0a1526",surface2:"#061324",surface3:"#0e1b2b",fg:"#ffffff",muted:"rgba(255,255,255,0.7)",border:"rgba(255,255,255,0.12)",primary:"#154194",onPrimary:"#ffffff",link:"#91a8d1",p50:"#021432",p100:"#021a3d",p200:"#bac9e3",p300:"#91a8d1",p600:"#375ea5",p700:"#6e8cc1",accent:"#fc4c02",err:"#d53f01",errBg:"#16163b",warnBg:"#19173f",hover:"rgba(255,255,255,0.08)",selected:"rgba(21, 65, 148, 0.45)",focusRing:"rgba(145, 168, 209, 0.45)",focusSolid:"#91a8d1",disabledFg:"rgba(255,255,255,0.38)",disabledBg:"rgba(255,255,255,0.07)",chartGrid:"rgba(255,255,255,0.12)",chartText:"rgba(255,255,255,0.7)",track:"rgba(255,255,255,0.1)",shadow1:"0 1px 2px rgba(0,0,0,.4),0 2px 8px rgba(0,0,0,.35)",shadow2:"0 4px 16px rgba(0,0,0,.5)",shadow3:"0 12px 32px rgba(0,0,0,.55)",fontBrand:"Montserrat",inverseSurface:"#01091a",inverseFg:"#ffffff",inverseLink:"#91a8d1",aiAccent:"#21bcff",statusFg:"#94a3b8",statusPrimary:"#60a5fa",statusSuccess:"#34d399",statusWarning:"#fbbf24",statusError:"#f87171",statusInfo:"#38bdf8",chart1:"#154194",chart2:"#91a8d1",chart3:"rgba(255,255,255,0.7)",chart4:"#a4b8dd",chart5:"#fc4c02",chart6:"#bac9e3",chartPositive:"#66bb6a",chartNegative:"#ef5350"},Ls={light:Ug,dark:Kg},I0='"Montserrat", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif',M0=t=>{let r=Ls[t];return [r.primary,r.p300,r.muted,r.p700]},R0=10,D0="0.2s ease";P();var wc=er.createContext({mode:"light",setting:"light"}),nf=t=>{if(typeof document>"u")return;let r=document.documentElement;r.classList.toggle("orb-dark",t==="dark"),r.dataset.orbMode=t,r.style.colorScheme=t;},Fn=({mode:t,defaultMode:r="light",children:o})=>{let n=t??r,[a,i]=er.useState("light"),[s,l]=er.useState(false);er.useEffect(()=>{l(true);let p=window.matchMedia("(prefers-color-scheme: dark)"),f=()=>i(p.matches?"dark":"light");return f(),p.addEventListener("change",f),()=>p.removeEventListener("change",f)},[]);let d=n==="system"?s?a:"light":n;er.useEffect(()=>{nf(d);},[d]);let u=er.useMemo(()=>({mode:d,setting:n}),[d,n]);return e(wc.Provider,{value:u,children:o})},Cr=()=>er.useContext(wc).mode,Fs=()=>Ls[Cr()];var rt=(t,r)=>{let o=Math.min(1,Math.max(0,r)),n=t.trim(),a=d=>d.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 d=parseInt(s.slice(0,2),16),u=parseInt(s.slice(2,4),16),p=parseInt(s.slice(4,6),16);return `rgba(${d}, ${u}, ${p}, ${o})`}let l=`${Math.round(o*100)}%`;return `color-mix(in oklch, ${t} ${l}, transparent)`};var Dr=t=>{let r=t.startsWith("up:")?`(min-width:${t.slice(3)}px)`:t.startsWith("down:")?`(max-width:${t.slice(5)}px)`:t,[o,n]=er.useState(()=>typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia(r).matches);return er.useEffect(()=>{if(typeof window.matchMedia!="function")return;let a=window.matchMedia(r),i=()=>n(a.matches);return i(),a.addEventListener("change",i),()=>a.removeEventListener("change",i)},[r]),o};P();var lf={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},cf=t=>typeof t=="number"?`${t}px`:t,df={"2.5":10,3:12,"3.5":14,4:16,5:20,6:24,7:28,8:32,10:40,12:48},pf=t=>{if(!t)return;let r=t.match(/(?:^|\s)(?:h|w)-(2\.5|3(?:\.5)?|4|5|6|7|8|10|12)(?:\s|$)/);return r?df[r[1]]:void 0},Tt=er.forwardRef(({name:t,size:r,title:o,className:n,style:a,strokeWidth:i,fill:s,...l},d)=>{let u=l["aria-label"]??o,p=cf(r??pf(n)??"1em"),f={fontFamily:"SAP-icons",fontSize:p,fontStyle:"normal",fontWeight:"normal",lineHeight:1,width:p,height:p,display:"inline-flex",alignItems:"center",justifyContent:"center",flex:"0 0 auto",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...a};return e("span",{ref:d,role:u?"img":void 0,"aria-hidden":u?void 0:true,title:o,className:n,"data-sap-icon":t,style:f,...l,children:String.fromCodePoint(lf[t])})});Tt.displayName="SapIcon";var ne=(t,r)=>{let o=er.forwardRef((n,a)=>e(Tt,{ref:a,name:t,...n}));return o.displayName=r??`SapIcon(${t})`,o};var Pc=ne("activity","Activity"),Ta=ne("error","AlertCircle"),Tc=ne("warning","AlertTriangle"),Q0=ne("down","ArrowDown"),J0=ne("navigationRight","ArrowRight"),Ic=ne("up","ArrowUp"),Bs=ne("barChart","BarChart"),eS=ne("activate","Bot"),Hs=ne("calendar","Calendar"),tS=Hs,rS=ne("camera","Camera"),oS=ne("lineChart","ChartNoAxesCombined"),qr=ne("accept","Check"),Ia=ne("accept","CheckCircle"),Fr=ne("slimDown","ChevronDown"),Ma=ne("navigationLeft","ChevronLeft"),Br=ne("navigationRight","ChevronRight"),nS=ne("slimUp","ChevronUp"),aS=ne("expandAll","ChevronsDown"),iS=ne("collapseAll","ChevronsUp"),Ra=ne("error","CircleAlert"),Bn=ne("accept","CircleCheck"),sS=Bn,Mc=ne("stop","CircleStop"),Rc=ne("copy","Clipboard"),lS=ne("checklist","ClipboardCheck"),cS=ne("checklist","ClipboardList"),Dc=ne("time","Clock"),dS=ne("tableColumn","Columns3"),vo=ne("copy","Copy"),pS=ne("duplicate","CopyPlus"),uS=ne("delete","Delete"),Nc=ne("download","Download"),Ac=ne("edit","Edit"),Ec=ne("fullScreen","Expand"),mS=ne("show","Eye"),gS=ne("hide","EyeOff"),Da=ne("document","File"),Lc=ne("document","FileText"),fS=ne("filter","Filter"),Hn=ne("tree","FolderTree"),Oc=ne("process","GitBranch"),zn=ne("world","Globe"),Fc=ne("grid","Grid"),bS=ne("move","GripVertical"),hS=ne("wrench","Hammer"),Bc=ne("picture","Image"),Na=ne("information","Info"),vS=ne("translate","Languages"),yS=ne("dimension","Layers"),CS=ne("home","LayoutDashboard"),Aa=ne("lightbulb","Lightbulb"),Hc=ne("lineChart","LineChart"),zc=ne("synchronize","Loader2"),Ea=ne("locked","Lock"),xS=Ea,Vc=ne("log","LogOut"),zs=ne("email","Mail"),Wc=ne("map","MapPin"),$c=ne("menu","Menu"),uf=ne("message","MessageCircle"),_c=uf,La=ne("microphone","Mic"),SS=ne("microphone","MicOff"),Gc=ne("darkMode","Moon"),wS=ne("overflow","MoreHorizontal"),kS=ne("accept","PackageCheck"),PS=ne("product","PackageSearch"),Oa=ne("splitOne","PanelLeftOpen"),Fa=ne("splitTwo","PanelRight"),TS=ne("overview","PanelsTopLeft"),Uc=ne("pieChart","PieChart"),Jo=ne("pushpin","Pin"),IS=ne("play","Play"),en=ne("add","Plus"),MS=ne("qrCode","QrCode"),RS=ne("receipt","ReceiptText"),Ba=ne("refresh","RefreshCw"),DS=ne("activate","Rocket"),NS=ne("refresh","RotateCcw"),Kc=ne("refresh","RotateCw"),AS=ne("tableRow","Rows3"),ES=ne("save","Save"),LS=ne("qrCode","ScanLine"),Hr=ne("search","Search"),mf=ne("paperPlane","Send"),qc=mf,tn=ne("wrench","Settings"),OS=ne("accept","ShieldCheck"),FS=ne("sum","Sigma"),BS=ne("sort","SortAsc"),HS=ne("splitTwo","SquareSplitHorizontal"),zS=ne("favorite","Star"),Xc=ne("lightMode","Sun"),VS=ne("table","Table2"),WS=ne("ipad","TabletSmartphone"),Vn=ne("command","Terminal"),Yc=ne("thumbDown","ThumbsDown"),Zc=ne("thumbUp","ThumbsUp"),jc=ne("delete","Trash2"),$S=ne("tree","TreePine"),Qc=ne("trendDown","TrendingDown"),Ha=ne("warning","TriangleAlert"),_S=ne("shipping","Truck"),Jc=ne("upload","UploadCloud"),Vs=ne("employee","User"),ed=ne("sound","Volume2"),GS=ne("factory","Warehouse"),US=ne("process","Workflow"),jt=ne("decline","X"),za=ne("error","XCircle");_t();P();var ff={contained:"primary",outlined:"secondary",text:"ghost"},bf={small:"orb-btn-sm",medium:void 0,large:"orb-btn-lg"},we=er.forwardRef(({variant:t="primary",size:r="medium",block:o=false,loading:n=false,startIcon:a,endIcon:i,component:s,href:l,sx:d,className:u,children:p,disabled:f,type:b="button",...m},v)=>{let y=ff[t]??t,g=["orb-btn",`orb-btn-${y}`,bf[r],o?"orb-btn-block":void 0,n?"orb-is-loading":void 0,u].filter(Boolean).join(" "),x=Ue(d,g),h=s??(l?"a":"button");return c(h,{ref:v,type:h==="button"?b:void 0,href:l,className:x.className,style:x.style,disabled:h==="button"?f||n:void 0,"aria-disabled":h!=="button"&&(f||n)?true:void 0,...m,children:[n&&e("span",{className:`orb-spin ${y==="primary"?"orb-spin-light":""}`,"aria-hidden":true}),!n&&a,p,!n&&i]})});we.displayName="CButton";_t();P();var ze=er.forwardRef(({label:t,value:r,defaultValue:o,onChange:n,onFocus:a,onBlur:i,onKeyDown:s,type:l="text",placeholder:d,disabled:u,readOnly:p,required:f,autoFocus:b,autoComplete:m,name:v,id:y,error:g,helperText:x,dense:h=false,size:C,fullWidth:k=true,select:w=false,multiline:T=false,rows:I,children:S,variant:A,margin:R,onClick:M,startAdornment:N,endAdornment:E,InputProps:O,inputProps:F,InputLabelProps:_,SelectProps:B,sx:Y,className:W},j)=>{let V=er.useId(),z=y??`orb-tf-${V}`,K=N??O?.startAdornment,q=E??O?.endAdornment,se=(typeof g=="string"?g:void 0)??x,Se={id:z,className:`orb-inp ${h||C==="small"?"orb-inp-dense":""}`,style:k?void 0:{width:"auto"},value:r,defaultValue:o,onChange:n,onFocus:a,onBlur:i,onKeyDown:s,placeholder:d,disabled:u,required:f,autoFocus:b,autoComplete:m,name:v,onClick:M,"aria-invalid":!!g},$e=w?e("select",{...Se,ref:j,onChange:n,children:S}):T?e("textarea",{...Se,ref:j,onChange:n,rows:I,readOnly:p||O?.readOnly}):e("input",{...Se,ref:j,onChange:n,type:l,readOnly:p||O?.readOnly,...F}),ke=Ue(Y,`orb-fld ${g?"orb-is-error":""} ${W??""}`,{width:k?"100%":void 0});return c("div",{className:ke.className,style:ke.style,children:[t&&e("label",{htmlFor:z,children:t}),K||q?c("div",{className:"orb-inp-adornment-wrap",children:[K&&e("span",{className:"orb-inp-adornment",children:K}),q&&e("span",{className:"orb-inp-adornment orb-inp-adornment-end",children:q}),$e]}):$e,se&&e("span",{className:"orb-fld-msg",children:se})]})});ze.displayName="CTextField";_t();P();var Wn=er.forwardRef(({label:t,value:r,defaultValue:o,onChange:n,placeholder:a,disabled:i,readOnly:s,rows:l,minRows:d=3,multiline:u,error:p,helperText:f,fullWidth:b=true,name:m,id:v,inputProps:y,sx:g,className:x},h)=>{let C=er.useId(),k=v??`orb-ta-${C}`,T=(typeof p=="string"?p:void 0)??f,I=Ue(g,`orb-fld ${p?"orb-is-error":""} ${x??""}`,{width:b?"100%":void 0});return c("div",{className:I.className,style:I.style,children:[t&&e("label",{htmlFor:k,children:t}),e("textarea",{ref:h,id:k,className:"orb-inp",value:r,defaultValue:o,onChange:n,placeholder:a,disabled:i,readOnly:s,rows:l??d,name:m,"aria-invalid":!!p,...y}),T&&e("span",{className:"orb-fld-msg",children:T})]})});Wn.displayName="CTextArea";_t();P();var zt=er.forwardRef(({label:t,options:r,children:o,value:n,defaultValue:a,onChange:i,disabled:s,size:l,dense:d=true,fullWidth:u=true,minWidth:p,placeholder:f,displayEmpty:b,renderValue:m,multiple:v,MenuProps:y,variant:g,disableUnderline:x,onClick:h,onMouseDown:C,error:k,helperText:w,name:T,id:I,"aria-label":S,sx:A,className:R},M)=>{let N=er.useId(),E=I??`orb-sel-${N}`,F=(typeof k=="string"?k:void 0)??w,_=er.useRef(null),B=er.useRef(null),[Y,W]=er.useState(false),[j,V]=er.useState(180),[z,K]=er.useState(a??"");er.useImperativeHandle(M,()=>_.current);let q=er.useMemo(()=>er.Children.toArray(o).flatMap(Me=>{if(!er.isValidElement(Me)||Me.type!=="option")return [];let Pe=Me;return [{value:Array.isArray(Pe.props.value)?Pe.props.value[0]??"":Pe.props.value??"",label:Pe.props.children,disabled:Pe.props.disabled}]}),[o]),fe=r??q,se=n??z,ue=Array.isArray(se)?se[0]??"":se,Se=String(ue??""),$e=fe.find(Me=>String(Me.value)===Se),ke=m?m(se):$e?.label??(Se||(f??"")),le=Ue(A,`orb-fld ${k?"orb-is-error":""} ${R??""}`,{width:u?"100%":void 0,minWidth:typeof p=="number"?`${p}px`:p});if(v)return c("div",{className:le.className,style:le.style,children:[t&&e("label",{htmlFor:E,children:t}),c("select",{ref:M,id:E,className:`orb-inp ${d||l==="small"?"orb-inp-dense":""}`,value:n,defaultValue:a,onChange:i,disabled:s,name:T,multiple:true,onClick:h,onMouseDown:C,"aria-invalid":!!k,"aria-label":S,children:[f!==void 0&&e("option",{value:"",children:f}),r?r.map(Me=>e("option",{value:Me.value,disabled:Me.disabled,children:Me.label},Me.value)):o]}),F&&e("span",{className:"orb-fld-msg",children:F})]});let Ee=Me=>{n===void 0&&K(Me);let Pe=_.current;Pe&&(Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,"value")?.set?.call(Pe,Me),i?.({target:Pe,currentTarget:Pe}));};return c("div",{className:le.className,style:le.style,children:[t&&e("label",{htmlFor:E,children:t}),e("select",{ref:_,className:"orb-visually-hidden",tabIndex:-1,"aria-hidden":"true",name:T,value:Se,disabled:s,onChange:()=>{},children:fe.map(Me=>e("option",{value:Me.value,disabled:Me.disabled,children:Me.label},String(Me.value)))}),c(Nr__namespace.Root,{open:Y,onOpenChange:Me=>{Me&&V(B.current?.getBoundingClientRect().width??180),W(Me);},children:[e(Nr__namespace.Trigger,{asChild:true,children:c("button",{ref:B,id:E,type:"button",className:`orb-inp orb-select-trigger ${d||l==="small"?"orb-inp-dense":""}`,disabled:s,"aria-invalid":!!k,"aria-label":S,"aria-haspopup":"listbox","data-placeholder":!$e&&!Se?"":void 0,onClick:h,onMouseDown:C,children:[e("span",{className:"orb-select-value",children:ke}),e(Tt,{className:"orb-select-chevron",name:"slimDown",size:12})]})}),e(Nr__namespace.Portal,{children:e(Nr__namespace.Content,{className:"orb-pop orb-select-menu",align:"start",sideOffset:5,collisionPadding:8,style:{minWidth:j},children:e(Nr__namespace.RadioGroup,{value:Se,onValueChange:Ee,children:fe.map(Me=>c(Nr__namespace.RadioItem,{className:"orb-select-option",value:String(Me.value),disabled:Me.disabled,children:[e("span",{className:"orb-select-check","aria-hidden":"true",children:String(Me.value)===Se?e(Tt,{name:"accept",size:13}):null}),e("span",{children:Me.label})]},String(Me.value)))})})})]}),F&&e("span",{className:"orb-fld-msg",children:F})]})});zt.displayName="CSelect";_t();P();var It=er.forwardRef(({label:t,checked:r,defaultChecked:o,onChange:n,disabled:a,indeterminate:i,name:s,value:l,id:d,size:u,color:p,onClick:f,inputProps:b,sx:m,className:v},y)=>{let g=Ue([{...u==="small"?{fontSize:13}:void 0,...p?{color:p}:void 0},...Array.isArray(m)?m:m?[m]:[]],`orb-chk ${v??""}`),x=e("input",{ref:h=>{h&&(h.indeterminate=!!i),typeof y=="function"?y(h):y&&(y.current=h);},type:"checkbox",id:d,checked:r,defaultChecked:o,onChange:n,readOnly:r!==void 0&&n===void 0,disabled:a,name:s,value:l,onClick:f,...b});return t==null?e("span",{className:g.className,style:g.style,children:x}):c("label",{className:g.className,style:g.style,children:[x,e("span",{children:t})]})});It.displayName="CCheckbox";P();var Rf=({label:t,options:r,value:o,defaultValue:n,onChange:a,name:i,row:s=false,disabled:l,sx:d,className:u})=>{let p=er.useId(),f=i??`orb-rdo-${p}`;return c("div",{className:`orb-fld ${u??""}`,style:d,role:"radiogroup",children:[t&&e("span",{className:"orb-fld-label",children:t}),e("div",{style:{display:"flex",flexDirection:s?"row":"column",gap:s?24:8,flexWrap:"wrap"},children:r.map(b=>c("label",{className:"orb-rdo",children:[e("input",{type:"radio",name:f,value:b.value,checked:o!==void 0?o===b.value:void 0,defaultChecked:n!==void 0?n===b.value:void 0,onChange:a?m=>a(m,b.value):void 0,disabled:l||b.disabled}),e("span",{children:b.label})]},b.value))})]})};_t();P();var Va=er.forwardRef(({label:t,checked:r,defaultChecked:o,onChange:n,disabled:a,name:i,id:s,size:l,sx:d,className:u},p)=>{let f=Ue([{...l==="small"?{transform:"scale(.86)",transformOrigin:"center"}:void 0},...Array.isArray(d)?d:d?[d]:[]],`orb-sw ${u??""}`),b=e("input",{ref:p,type:"checkbox",role:"switch",id:s,checked:r,defaultChecked:o,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:b}):c("label",{className:f.className,style:f.style,children:[b,e("span",{children:t})]})});Va.displayName="CSwitch";_t();P();var Af={default:"gray",primary:"blue",success:"blue",info:"blue",warning:"orange",error:"orange"},xt=er.forwardRef(({label:t,children:r,tone:o,color:n="default",variant:a,size:i="medium",clickable:s,avatar:l,icon:d,onDelete:u,onClick:p,sx:f,className:b},m)=>{let v=o??(a==="outlined"&&n==="default"?"outline":Af[n]??"gray"),y=s??!!p,g=Ue([{cursor:y?"pointer":void 0,...i==="small"?{height:24,fontSize:11,px:1}:void 0},...Array.isArray(f)?f:f?[f]:[]],`orb-chip orb-chip-${v} ${b??""}`);return c("span",{ref:m,className:g.className,style:g.style,onClick:p,role:y?"button":void 0,tabIndex:y?0:void 0,onKeyDown:y?x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),p?.(x));}:void 0,children:[l??d,e("span",{className:"orb-chip-label",children:r??t}),u&&e("button",{type:"button","aria-label":"Remove",onClick:x=>{x.stopPropagation(),u(x);},style:{background:"none",border:"none",padding:0,display:"inline-flex",cursor:"pointer",color:"inherit"},children:e(jt,{size:13,strokeWidth:2})})]})});xt.displayName="CChip";_t();P();var Wa=er.forwardRef(({badgeContent:t,color:r="primary",children:o,invisible:n=false,sx:a,className:i},s)=>{let l=Ue(a,i,{display:"inline-flex",position:o?"relative":void 0}),d=!n&&t!==void 0&&t!==null&&e("span",{className:`orb-badge ${r==="error"?"orb-badge-err":r==="muted"?"orb-badge-muted":""}`,style:o?{position:"absolute",top:-6,right:-6,zIndex:1}:void 0,children:t});return o?c("span",{ref:s,className:l.className,style:l.style,children:[o,d]}):e("span",{ref:s,className:l.className,style:l.style,children:d})});Wa.displayName="CBadge";_t();P();var rn=er.forwardRef(({children:t,src:r,alt:o,size:n=28,sx:a,className:i},s)=>{let l=Ue([{width:n,height:n,fontSize:n*.4},...Array.isArray(a)?a:a?[a]:[]],`orb-avatar ${i??""}`);return e("span",{ref:s,className:l.className,style:l.style,children:r?e("img",{src:r,alt:o??"",style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"cover"}}):t})});rn.displayName="CAvatar";_t();P();var on=er.forwardRef(({severity:t="info",title:r,children:o,onClose:n,sx:a,className:i},s)=>{let l=Ue(a,`orb-alert orb-alert-${t} ${i??""}`);return c("div",{ref:s,role:"alert",className:l.className,style:l.style,children:[c("div",{style:{flex:1,minWidth:0},children:[r&&e("b",{children:r}),o&&e("span",{children:o})]}),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"})]})});on.displayName="CAlert";_t();P();var $n=({value:t,variant:r,color:o,sx:n,className:a})=>{let i=r==="indeterminate"||t===void 0,s=Ue(n,`orb-prog ${a??""}`);return c("div",{className:s.className,role:"progressbar","aria-valuenow":i?void 0:Math.round(t),"aria-valuemin":i?void 0:0,"aria-valuemax":i?void 0:100,style:s.style,children:[e("i",{style:i?{width:"40%",animation:"orb-prog-ind 1.2s ease-in-out infinite"}:{width:`${Math.min(100,Math.max(0,t))}%`,background:o}}),i&&e("style",{children:"@keyframes orb-prog-ind { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }"})]})},Ff=({width:t,height:r=14,variant:o="rectangular",sx:n,className:a})=>e("div",{className:`orb-skel ${a??""}`,style:{width:t,height:r,borderRadius:o==="circular"?"50%":o==="text"?6:"var(--orb-r)",...n}}),Xr=({size:t=12,onPrimary:r=false,sx:o,className:n})=>e("span",{className:`orb-spin ${r?"orb-spin-light":""} ${n??""}`,style:{width:t,height:t,...o},role:"status","aria-label":"Loading"});P();var ct=({title:t,children:r,enterDelay:o=300,side:n="top",align:a="center",disabled:i})=>!t||i?e(jsxRuntime.Fragment,{children:r}):e(Yr__namespace.Provider,{delayDuration:o,skipDelayDuration:200,children:c(Yr__namespace.Root,{children:[e(Yr__namespace.Trigger,{asChild:true,children:r}),e(Yr__namespace.Portal,{children:e(Yr__namespace.Content,{className:"orb-tooltip",side:n,align:a,sideOffset:6,children:t})})]})});_t();P();var ae=er.forwardRef(({tooltip:t,size:r="small",active:o=false,edge:n,color:a,sx:i,className:s,children:l,type:d="button",...u},p)=>{let f=Ue([{color:o?"var(--orb-primary)":a,...n==="start"?{marginLeft:-8}:n==="end"?{marginRight:-8}:void 0},...Array.isArray(i)?i:i?[i]:[]],`orb-icon-btn ${r==="small"?"orb-icon-btn-sm":""} ${s??""}`),b=e("button",{ref:p,type:d,className:f.className,style:f.style,...u,children:l});return t?e(ct,{title:t,children:b}):b});ae.displayName="CIconButton";_t();P();var _n=({value:t,options:r,onValueChange:o,size:n="medium",sx:a,className:i,...s})=>{let l=er.useRef([]),d=r.findIndex(m=>!m.disabled),u=r.findIndex(m=>m.value===t),p=(m,v)=>{let y=r.map((h,C)=>h.disabled?-1:C).filter(h=>h>=0);if(y.length===0)return;let g=y.indexOf(v),x;m.key==="Home"&&(x=y[0]),m.key==="End"&&(x=y[y.length-1]),(m.key==="ArrowRight"||m.key==="ArrowDown")&&(x=y[(g+1+y.length)%y.length]),(m.key==="ArrowLeft"||m.key==="ArrowUp")&&(x=y[(g-1+y.length)%y.length]),x!==void 0&&(m.preventDefault(),l.current[x]?.focus(),o(r[x].value));},f=Ue(a,["orb-segmented-control",n==="small"?"orb-segmented-control-sm":"",i].filter(Boolean).join(" ")),b={...f.style,"--orb-segmented-count":Math.max(r.length,1),"--orb-segmented-index":Math.max(u,0)};return c("div",{role:"radiogroup",className:f.className,style:b,"data-has-selection":u>=0?"true":"false",...s,children:[e("span",{className:"orb-segmented-control-thumb","aria-hidden":"true"}),r.map((m,v)=>{let y=m.value===t;return e(ae,{ref:g=>{l.current[v]=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":y,"data-selected":y?"true":void 0,disabled:m.disabled,tabIndex:y||t==null&&v===d?0:-1,onClick:()=>o(m.value),onKeyDown:g=>p(g,v),children:m.icon??e("span",{className:"orb-segmented-control-label",children:m.label})},m.value)})]})};_t();P();var Qt=({triggerLabel:t,items:r=[],trigger:o,align:n="start",anchorEl:a,open:i,onClose:s,children:l,slotProps:d,PaperProps:u,anchorPosition:p,sx:f})=>{let b=er.useRef(null);if(er.useEffect(()=>{if(i!==true)return;let m=y=>{let g=y.composedPath();b.current&&g.includes(b.current)||a&&g.includes(a)||s?.();},v=y=>{y.key==="Escape"&&s?.();};return document.addEventListener("pointerdown",m,true),document.addEventListener("keydown",v,true),()=>{document.removeEventListener("pointerdown",m,true),document.removeEventListener("keydown",v,true);}},[a,s,i]),i!==void 0){if(!i||typeof document>"u")return null;let m=a?.getBoundingClientRect(),v=window.innerWidth,y=m?.left??16,g=m?.right??y,x=d?.paper?.sx??u?.sx,h=Ue([...Array.isArray(x)?x:x?[x]:[],...Array.isArray(f)?f:f?[f]:[]],"orb-pop orb-menu",d?.paper?.style??u?.style),C=er.Children.map(l,k=>{if(!er.isValidElement(k)||k.type!=="option")return k;let w=k.props,{children:T,disabled:I,selected:S}=w,A=Ue(w.sx,`orb-menu-item ${S?"orb-selected":""} ${w.className??""}`,w.style);return e("div",{role:"menuitem","aria-disabled":I||void 0,"aria-selected":S||void 0,tabIndex:I?-1:0,id:w.id,title:w.title,className:A.className,style:A.style,onClick:I?void 0:w.onClick,onKeyDown:R=>{!I&&(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),w.onClick?.(R));},children:T})});return reactDom.createPortal(e("div",{ref:b,role:"menu",className:h.className,style:{...h.style,position:"fixed",left:n==="end"&&!p?void 0:p?.left??y,right:n==="end"&&!p?Math.max(16,v-g):void 0,top:p?.top??(m?.bottom??16)+6,maxWidth:"calc(100vw - 32px)",zIndex:1301},children:C}),document.body)}return c(Nr__namespace.Root,{children:[e(Nr__namespace.Trigger,{asChild:true,children:o??e(we,{variant:"primary",children:t})}),e(Nr__namespace.Portal,{children:e(Nr__namespace.Content,{className:"orb-pop orb-menu",align:n,sideOffset:6,children:r.map((m,v)=>c(Nr__namespace.Item,{className:"orb-menu-item",disabled:m.disabled,onSelect:()=>m.onClick?.(),children:[m.icon,m.label]},v))})})]})};_t();P();var Ae=er.forwardRef(({elevation:t=1,variant:r,component:o,sx:n,style:a,className:i,children:s,...l},d)=>{let u=o??"div",p=Ue(n,`orb-card ${t>0&&r!=="outlined"?"orb-card-raised":""} ${i??""}`,a);return e(u,{ref:d,className:p.className,style:p.style,...l,children:s})});Ae.displayName="CPaper";_t();P();var Dt=er.forwardRef(({orientation:t="horizontal",flexItem:r,sx:o,className:n},a)=>{let i=Ue([{...t==="vertical"?{alignSelf:"stretch",height:"auto"}:{width:"100%"},...r?{alignSelf:"stretch"}:void 0},...Array.isArray(o)?o:o?[o]:[]],`${t==="vertical"?"orb-divider-v":"orb-divider"} ${n??""}`);return e("hr",{ref:a,"aria-orientation":t,className:i.className,style:i.style})});Dt.displayName="CDivider";_t();P();var qf={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"},Xf={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6"},L=er.forwardRef(({variant:t="body1",component:r,muted:o=false,numeric:n=false,color:a,noWrap:i=false,fontWeight:s,sx:l,className:d,children:u,...p},f)=>{let b=r??Xf[t]??"span",v=[t==="inherit"?void 0:qf[t],d].filter(Boolean).join(" "),y=Ue([{...o?{color:"var(--orb-muted)"}:void 0,...a?{color:a}:void 0,...n?{fontVariantNumeric:"tabular-nums"}:void 0,...s?{fontWeight:s}:void 0,...i?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:void 0},...Array.isArray(l)?l:l?[l]:[]],v);return e(b,{ref:f,className:y.className,style:y.style,...p,children:u})});L.displayName="CTypography";_t();P();var Zf=t=>{if(t!==void 0)return typeof t=="number"?`${t*8}px`:t},ie=er.forwardRef(({direction:t="column",spacing:r,alignItems:o,justifyContent:n,flexWrap:a,flex:i,useFlexGap:s,sx:l,className:d,children:u,...p},f)=>{let b=Ue([{display:"flex",flexDirection:t,gap:Zf(r),alignItems:o,justifyContent:n,flexWrap:a,flex:i},...Array.isArray(l)?l:l?[l]:[]],d);return e("div",{ref:f,className:b.className,style:b.style,...p,children:u})});ie.displayName="CStack";_t();P();var Lt=({open:t,onClose:r,title:o,children:n,actions:a,maxWidth:i=560,fullWidth:s=false,fullScreen:l=false,PaperProps:d,slotProps:u,disableRestoreFocus:p,keepMounted:f,hideCloseButton:b=false,sx:m,className:v})=>{let y=Ue([{width:l?"100vw":s?"min(920px, calc(100vw - 32px))":void 0,height:l?"100vh":void 0,maxWidth:l?"none":typeof i=="number"?`${i}px`:i},...Array.isArray(d?.sx??u?.paper?.sx)?d?.sx??u?.paper?.sx:d?.sx??u?.paper?.sx?[d?.sx??u?.paper?.sx]:[],...Array.isArray(m)?m:m?[m]:[]],`orb-dialog ${v??""}`);return e(wr__namespace.Root,{open:t,onOpenChange:g=>{g||r?.();},children:c(wr__namespace.Portal,{children:[e(wr__namespace.Overlay,{className:"orb-overlay"}),c(wr__namespace.Content,{className:y.className,style:y.style,children:[(o||!b)&&c("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:16},children:[o?e(wr__namespace.Title,{className:"orb-dialog-title",children:o}):e(wr__namespace.Title,{className:"orb-visually-hidden",children:"Dialog"}),!b&&e(wr__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(jt,{size:16,strokeWidth:2})})})]}),e("div",{style:{minWidth:0},children:n}),a&&e("div",{className:"orb-dialog-actions",children:a})]})]})})};P();var $s=({open:t,defaultOpen:r,onOpenChange:o,trigger:n,children:a,align:i="start",side:s="bottom",sideOffset:l=6,matchTriggerWidth:d=false,sx:u,className:p})=>c(yo__namespace.Root,{open:t,defaultOpen:r,onOpenChange:o,children:[e(yo__namespace.Trigger,{asChild:true,children:n}),e(yo__namespace.Portal,{children:e(yo__namespace.Content,{className:`orb-pop ${p??""}`,align:i,side:s,sideOffset:l,style:{minWidth:d?"var(--radix-popover-trigger-width)":void 0,...u},onOpenAutoFocus:f=>f.preventDefault(),children:a})})]});P();var Jf=({items:t,value:r,defaultValue:o,onChange:n,sx:a,className:i})=>{let s=r!==void 0,[l,d]=er.useState(o??t[0]?.value),u=s?r:l,p=er.useRef([]),f=m=>{s||d(m),n?.(m);},b=m=>{if(m.key!=="ArrowRight"&&m.key!=="ArrowLeft")return;m.preventDefault();let v=t.filter(h=>!h.disabled),y=v.findIndex(h=>h.value===u),g=m.key==="ArrowRight"?1:-1,x=v[(y+g+v.length)%v.length];if(x){f(x.value);let h=t.findIndex(C=>C.value===x.value);p.current[h]?.focus();}};return e("div",{className:`orb-tabs ${i??""}`,role:"tablist",style:a,onKeyDown:b,children:t.map((m,v)=>{let y=m.value===u;return c("button",{ref:g=>{p.current[v]=g;},type:"button",role:"tab","aria-selected":y,disabled:m.disabled,className:`orb-tab ${y?"orb-is-active":""}`,style:{display:"inline-flex",alignItems:"center",gap:6},onClick:()=>f(m.value),children:[m.icon,m.label]},m.value)})})};P();var tb=["su","mo","tu","we","th","fr","sa"],Gn=(t,r)=>!!(t&&r&&t.isSame(r,"day")),Un=({value:t,rangeStart:r,rangeEnd:o,onChange:n,month:a,defaultMonth:i,onMonthChange:s,minDate:l,maxDate:d,locale:u,renderDay:p})=>{let f=a!==void 0,[b,m]=er.useState(()=>i??t??r??oo__default.default()),v=(f?a:b).startOf("month"),y=w=>{f||m(w),s?.(w);},g=er.useMemo(()=>u?v.locale(u):v,[v,u]),x=er.useMemo(()=>{let T=v.startOf("month").startOf("week"),I=[],S=T;for(let A=0;A<6;A+=1){let R=[];for(let M=0;M<7;M+=1)R.push(S),S=S.add(1,"day");if(I.push(R),S.isAfter(v.endOf("month"))&&A>=3)break}return I},[v]),h=er.useMemo(()=>{let w=u?oo__default.default().locale(u):oo__default.default();return tb.map((T,I)=>w.startOf("week").add(I,"day").format("dd"))},[u]),C=w=>!!(l&&w.isBefore(l.startOf("day"))||d&&w.isAfter(d.startOf("day"))),k=r!==void 0||o!==void 0;return c("div",{className:"orb-cal",children:[c("div",{className:"orb-cal-head",children:[e("button",{type:"button",className:"orb-icon-btn orb-icon-btn-sm","aria-label":"Previous month",onClick:()=>y(v.subtract(1,"month")),children:e(Ma,{size:16,strokeWidth:2})}),e("span",{className:"orb-cal-title","aria-live":"polite",children:g.format("MMMM YYYY")}),e("button",{type:"button",className:"orb-icon-btn orb-icon-btn-sm","aria-label":"Next month",onClick:()=>y(v.add(1,"month")),children:e(Br,{size:16,strokeWidth:2})})]}),c("div",{className:"orb-cal-grid",role:"grid",children:[h.map((w,T)=>e("span",{className:"orb-cal-dow",children:w},`${w}-${T}`)),x.flat().map(w=>{let T=!w.isSame(v,"month"),I=C(w),S=k?Gn(w,r)||Gn(w,o):Gn(w,t),A=w.isSame(oo__default.default(),"day"),R=k&&r&&o&&w.isAfter(r.startOf("day"))&&w.isBefore(o.startOf("day")),M=k&&Gn(w,r)&&!!o,N=k&&Gn(w,o)&&!!r,E=["orb-cal-day",T?"orb-is-outside":void 0,A?"orb-is-today":void 0,S?"orb-is-selected":void 0,R?"orb-is-in-range":void 0,M?"orb-is-range-start":void 0,N?"orb-is-range-end":void 0].filter(Boolean).join(" ");return p?e("span",{className:"orb-cal-day-slot",children:p(w,{outsideCurrentMonth:T,selected:S,today:A,disabled:I})},w.format("YYYY-MM-DD")):e("button",{type:"button",role:"gridcell","aria-selected":S,"aria-current":A?"date":void 0,className:E,disabled:I,onClick:()=>n?.(w),children:w.date()},w.format("YYYY-MM-DD"))})]})]})};P();oo__default.default.extend(rb__default.default);var ob=({label:t,value:r,defaultValue:o,onChange:n,minDate:a,maxDate:i,disabled:s,format:l="YYYY-MM-DD",placeholder:d,locale:u,dense:p=false,error:f,helperText:b,sx:m,className:v})=>{let y=r!==void 0,[g,x]=er.useState(o??null),h=y?r:g,[C,k]=er.useState(false),[w,T]=er.useState(null),I=N=>{y||x(N),n?.(N);},S=w??(h?(u?h.locale(u):h).format(l):""),A=()=>{if(w===null)return;let N=w.trim();if(!N)I(null);else {let E=oo__default.default(N,l,true);E.isValid()&&!(a&&E.isBefore(a.startOf("day")))&&!(i&&E.isAfter(i.startOf("day")))&&I(E);}T(null);},M=(typeof f=="string"?f:void 0)??b;return c("div",{className:`orb-fld ${f?"orb-is-error":""} ${v??""}`,style:m,children:[t&&e("label",{children:t}),e($s,{open:C,onOpenChange:k,trigger:c("div",{className:"orb-inp-adornment-wrap",style:{width:"100%"},children:[e("span",{className:"orb-inp-adornment",children:e(Hs,{size:15,strokeWidth:1.8})}),e("input",{className:`orb-inp ${p?"orb-inp-dense":""}`,value:S,placeholder:d??l,disabled:s,onFocus:()=>k(true),onChange:N=>T(N.target.value),onBlur:A,onKeyDown:N=>{N.key==="Enter"&&(A(),k(false)),N.key==="Escape"&&k(false);}})]}),children:e(Un,{value:h,onChange:N=>{I(N),T(null),k(false);},minDate:a,maxDate:i,locale:u,defaultMonth:h??void 0})}),M&&e("span",{className:"orb-fld-msg",children:M})]})};P();var ab=({onFilesSelected:t,multiple:r=false,accept:o="*",maxSize:n,title:a="Drag and drop files here or click to upload",subtitle:i="Support for bulk upload",sx:s})=>{let[l,d]=er.useState(false),[u,p]=er.useState([]),f=er.useRef(null),b=h=>{h.preventDefault(),d(true);},m=h=>{h.preventDefault(),d(false);},v=h=>{h.preventDefault(),d(false),g(Array.from(h.dataTransfer.files));},y=h=>{h.target.files&&g(Array.from(h.target.files));},g=h=>{let C=n?h.filter(w=>w.size<=n):h;C.length<h.length&&console.warn(`Some files were rejected because they exceed the maximum size of ${n} bytes.`);let k=r?[...u,...C]:C;r&&(k=k.filter((w,T,I)=>T===I.findIndex(S=>S.name===w.name&&S.size===w.size&&S.lastModified===w.lastModified))),p(k),t?.(k),f.current&&(f.current.value="");},x=h=>{let C=u.filter((k,w)=>w!==h);p(C),t?.(C);};return c("div",{style:{width:"100%",...s},children:[c("div",{onClick:()=>f.current?.click(),onDragOver:b,onDragLeave:m,onDrop:v,role:"button",tabIndex:0,onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),f.current?.click());},style:{border:`2px dashed ${l?"var(--orb-primary)":"var(--orb-border)"}`,borderRadius:"var(--orb-r)",padding:32,textAlign:"center",cursor:"pointer",backgroundColor:l?"var(--orb-hover)":"var(--orb-canvas)",transition:"border-color var(--orb-t-fast), background-color var(--orb-t-fast)"},children:[e("input",{type:"file",ref:f,style:{display:"none"},multiple:r,accept:o,onChange:y}),c("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"center"},children:[e(Jc,{size:40,strokeWidth:1.5,color:l?"var(--orb-primary)":"var(--orb-muted)"}),e("span",{className:"orb-subtitle",children:a}),e("span",{className:"orb-meta",children:i})]})]}),u.length>0&&e("div",{style:{display:"flex",flexDirection:"column",gap:8,marginTop:16},children:u.map((h,C)=>c("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",border:"1px solid var(--orb-border)",borderRadius:"var(--orb-r)",backgroundColor:"var(--orb-surface)"},children:[c("div",{style:{display:"flex",alignItems:"center",gap:8,overflow:"hidden"},children:[e(Lc,{size:16,strokeWidth:1.8,color:"var(--orb-muted)"}),e("span",{className:"orb-body-dense",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.name}),c("span",{className:"orb-meta",children:["(",(h.size/1024).toFixed(1)," KB)"]})]}),e(ae,{"aria-label":`Remove ${h.name}`,onClick:()=>x(C),children:e(jc,{size:15,strokeWidth:1.8})})]},`${h.name}-${C}`))})]})};function br(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var _a={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"},Kn={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",full:"rounded-full"},nd=()=>"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50";P();var db=classVarianceAuthority.cva(nd(),{variants:{variant:{default:`${_a.primary} shadow-sm`,destructive:"bg-[var(--orb-status-error)] text-[var(--orb-on-primary)] hover:opacity-90 active:opacity-80 shadow-sm",outline:`${_a.outline} shadow-sm`,secondary:"bg-[var(--orb-surface-2)] text-[var(--orb-fg)] hover:bg-[var(--orb-hover)] active:bg-[var(--orb-selected)] shadow-sm",ghost:_a.ghost,link:"text-[var(--orb-status-primary)] underline-offset-4 hover:underline hover:text-[var(--orb-status-primary)] active:text-[var(--orb-p700)]","chat-tool":"bg-[var(--orbai-surface-2)] border border-[var(--orbai-border-soft)] text-[var(--orbai-text-2)] hover:bg-[var(--orbai-surface-3)] hover:border-[var(--orbai-border-strong)] hover:text-[var(--orbai-text-1)] active:scale-95 transition-all duration-200","chat-send":"bg-[var(--orb-primary)] hover:bg-[var(--orb-p600)] text-[var(--orb-on-primary)] border border-[var(--orbai-border-strong)] shadow-[var(--orbai-shadow-soft-sm)] hover:shadow-[var(--orbai-shadow-soft-md)] active:scale-95 transition-all duration-200","chat-stop":"bg-[var(--orb-status-error)] hover:opacity-90 border border-[var(--orbai-border-strong)] shadow-[var(--orbai-shadow-soft-sm)] hover:shadow-[var(--orbai-shadow-soft-md)] active:scale-95 text-[var(--orb-on-primary)] transition-all duration-200","chat-disabled":"cursor-not-allowed opacity-50 bg-[var(--orbai-surface-2)] border border-[var(--orbai-border-soft)] text-[var(--orbai-muted)]"},size:{default:"h-10 px-4 py-2",sm:"h-9 px-3",lg:"h-11 px-8",icon:"h-10 w-10","chat-sm":"h-8 w-8 rounded-full","chat-md":"h-10 w-10 rounded-full","chat-lg":"h-12 w-12 rounded-full"},rounded:{none:Kn.none,sm:Kn.sm,md:Kn.md,full:Kn.full}},defaultVariants:{variant:"default",size:"default",rounded:"md"}}),Us=er__namespace.forwardRef(({className:t,variant:r,size:o,asChild:n=false,...a},i)=>e(n?reactSlot.Slot:"button",{className:br(db({variant:r,size:o,className:t})),ref:i,...a}));Us.displayName="Button";var pb={"common.cancel":"Cancel","common.save":"Save","common.ok":"OK","common.done":"Done","common.search":"Search","common.none":"None","common.all":"All","common.noData":"No data","common.copy":"Copy","common.delete":"Delete","common.loading":"Loading...","header.searchPlaceholder":"Ask me...","header.searchAddFeature":"Add feature","header.searchStartVoice":"Start voice input","header.searchStopVoice":"Stop voice input","header.searchOpenPanel":"Open conversation","header.theme.system":"Theme: System","header.theme.dark":"Theme: Dark","header.theme.light":"Theme: Light","header.menu.setting":"Setting","header.menu.refresh":"Refresh","header.menu.logout":"Logout","navigation.expand":"Expand navigation","navigation.collapse":"Collapse navigation","navigation.searchPlaceholder":"Search menu...","navigation.noMatch":"No matching menu items","navigation.noAccessibleApp":"No accessible applications","navigation.noItems":"No items to display","navigation.expandView":"Expand {title}","navigation.mode.switchToFixed":"Switch to fixed navigation","navigation.mode.switchToFloating":"Switch to floating navigation","navigation.pinned":"Pinned","navigation.pin.add":"Pin to top","navigation.pin.remove":"Unpin","table.toolbar.searchPlaceholder":"Search...","table.title.default":"Data Table","table.toolbar.groupBy":"Group By","table.toolbar.summary":"Summary","table.toolbar.columns":"Columns","table.toolbar.export":"Export","table.toolbar.itemsPerPage":"Items per page:","table.toolbar.pageOf":"Page {current} of {total}","table.toolbar.newItem":"New Item","table.toolbar.editItem":"Edit Item","table.toolbar.deleteItem":"Delete Item","table.toolbar.graphicReport":"Graphic Report","table.toolbar.saveLayout":"Save Layout","table.menu.groupBy":"Group By","table.menu.clearAll":"Clear All","table.menu.visibleColumns":"Visible Columns","table.menu.showSummaryRow":"Show Summary Row","table.menu.noNumericColumns":"No numeric columns","table.group.expandAll":"Expand All Groups","table.group.collapseAll":"Collapse All Groups","table.mobile.notImplemented":"Mobile View Not Implemented","table.headerMenu.sortAsc":"Sort Ascending","table.headerMenu.sortDesc":"Sort Descending","table.headerMenu.clearSort":"Clear Sort","table.headerMenu.configureSort":"Configure Sort...","table.headerMenu.group":"Group by this column","table.headerMenu.ungroup":"Remove from grouping","table.headerMenu.addSummary":"Include in Summary","table.headerMenu.removeSummary":"Remove from Summary","table.headerMenu.hideColumn":"Hide Column","table.sortDialog.title":"Sort Settings","table.sortDialog.empty":"No sort rules. Add one to start ordering rows.","table.sortDialog.addRule":"Add Sort Rule","table.sortDialog.clearAll":"Clear All","table.sortDialog.asc":"Ascending","table.sortDialog.desc":"Descending","pivot.title.default":"Pivot Table Builder","pivot.subtitle.default":"Drag fields to configure the pivot table.","pivot.empty":"Drag at least one field into Values to render the pivot result.","pivot.records":"Records","pivot.afterFilter":"After filter","pivot.grandTotal":"Grand Total","pivot.resultLabel":"Result","pivot.valueLabel":"Value","pivot.table.dimensions":"Dimensions","pivot.config.title":"Configuration","pivot.fieldList":"Field List","pivot.availableDimensions":"Available dimensions","pivot.allFieldsInUse":"All fields are in use.","pivot.zone.rows":"Rows","pivot.zone.columns":"Columns","pivot.zone.filters":"Filters","pivot.zone.values":"Values","pivot.hint.rows":"Drag fields here to build row hierarchy","pivot.hint.columns":"Drag fields here to build column hierarchy","pivot.hint.filters":"Drag fields here for report filters","pivot.hint.values":"Drag numeric fields here for aggregation","pivot.clearArea":"Clear area","pivot.filter.na":"N/A","pivot.filter.noValues":"No values","pivot.filter.noneSelected":"None selected","pivot.filter.allValues":"All values","pivot.filter.selectedCount":"{selected} / {total} selected","pivot.filter.selectAll":"Select All","pivot.filter.deselectAll":"Deselect All","pivot.filter.noResults":"No results","pivot.collapse.ariaExpand":"Expand configuration area","pivot.collapse.ariaCollapse":"Collapse configuration area","pivot.agg.sum":"Sum","pivot.agg.count":"Count","pivot.agg.avg":"Average","pivot.agg.min":"Min","pivot.agg.max":"Max","pivot.preset.selectPlaceholder":"Select preset","pivot.preset.save":"Save preset","pivot.preset.delete":"Delete preset","pivot.preset.saveDialogTitle":"Save current preset","pivot.preset.nameLabel":"Preset name","pivot.preset.defaultName":"Preset {index}","pivot.table.sectionTitle":"Pivot Result","pivot.table.expandRowsAll":"Expand rows","pivot.table.collapseRowsAll":"Collapse rows","pivot.table.expandColumnsAll":"Expand columns","pivot.table.collapseColumnsAll":"Collapse columns","pivot.table.collapse.ariaExpand":"Expand pivot result","pivot.table.collapse.ariaCollapse":"Collapse pivot result","pivot.chart.title":"Pivot Chart","pivot.chart.subtitle":"Map one dimension and up to two measures into a compact chart.","pivot.chart.subtitleReady":"{dimension} by {measure}","pivot.chart.emptyNoDimension":"Add at least one row or column field to render the chart.","pivot.chart.emptyNoValue":"Add at least one value field to render the chart.","pivot.chart.emptyNoData":"No data available for the current chart selection.","pivot.chart.dimension":"Dimension","pivot.chart.primaryMeasure":"Measure","pivot.chart.secondaryMeasure":"Compare measure","pivot.chart.chartType":"Chart type","pivot.chart.style.barVertical":"Vertical bars","pivot.chart.style.barHorizontal":"Horizontal bars","pivot.chart.style.line":"Line","pivot.chart.style.scatter":"Scatter","pivot.chart.collapse.ariaExpand":"Expand chart area","pivot.chart.collapse.ariaCollapse":"Collapse chart area","smartFilter.adaptFilters":"Adapt Filters","smartFilter.addFilters":"Add Filters","smartFilter.go":"Go","smartFilter.visibleFilters":"Visible Filters","smartFilter.searchPlaceholder":"Search...","smartFilter.noOptionsFound":"No options found","smartFilter.min":"Min","smartFilter.max":"Max","smartFilter.minMaxPlaceholder":"Min - Max","smartFilter.operator.equals":"Equals","smartFilter.operator.contains":"Contains","smartFilter.operator.notContains":"Does Not Contain","smartFilter.operator.wildcard":"Wildcard Search","smartFilter.operator.notEquals":"Not Equals","smartFilter.operator.greaterThan":"Greater Than","smartFilter.operator.lessThan":"Less Than","smartFilter.operator.greaterOrEqual":"Greater Than or Equal","smartFilter.operator.lessOrEqual":"Less Than or Equal","smartFilter.operator.between":"Between","variant.noOptions":"No options","variant.defaultSuffix":"Default","variant.selectVariant":"Select Variant","variant.saveView":"Save View","variant.newVariant":"New Variant","variant.viewName":"View Name","variant.setDefault":"Set as Default","variant.publicAllUsers":"Public (All Users)","variant.toast.fetchFailed":"Failed to load variants","variant.toast.saveFailed":"Failed to save variant","variant.toast.saveSuccess":"Variant saved successfully","variant.toast.deleteFailed":"Failed to delete variant","variant.toast.deleteSuccess":"Variant deleted successfully","variant.toast.defaultFailed":"Failed to update default variant","variant.toast.defaultSuccess":"Default variant updated","layout.saveLayout":"Save Layout","layout.layoutOptions":"Layout Options","layout.selectLayout":"Select Layout","layout.saveCurrentLayout":"Save Current Layout...","layout.noSavedLayouts":"No saved layouts","layout.removeDefault":"Remove Default","layout.setAsDefault":"Set as Default","layout.layoutName":"Layout Name","layout.layoutDescription":"Description","layout.layoutNameHelper":"e.g., 'Compact View'","layout.warningOverwrite":"Warning: Existing layout will be overwritten","layout.useAsDefault":"Use as Default Layout","layout.publicAllUsers":"Public (Visible to all users)","layout.toast.loadFallback":"Failed to load layouts from backend, fallback to local storage","layout.toast.saveSuccess":"Layout saved successfully","layout.toast.saveLocalSuccess":"Layout saved to local storage","layout.toast.backendUnavailableSavedLocal":"Backend unavailable, saved to local storage","layout.toast.deleteSuccess":"Layout deleted successfully","layout.toast.deleteLocalSuccess":"Layout deleted from local storage","layout.toast.backendUnavailableDeletedLocal":"Backend unavailable, deleted from local storage","layout.toast.defaultSuccess":"Default layout set","layout.toast.defaultLocalSuccess":"Default layout set in local storage","layout.toast.backendUnavailableDefaultLocal":"Backend unavailable, default saved to local storage","dateRange.label":"Date Range","dateRange.startDate":"Start Date","dateRange.endDate":"End Date","dateRange.select":"Select...","dateRange.today":"Today","dateRange.thisWeek":"This Week","dateRange.thisMonth":"This Month","graph.records":"{count} records","graph.kpi.totalRecords":"Total Records","graph.kpi.totalReport":"Total Report","graph.kpi.totalBillable":"Total Billable","graph.kpi.efficiency":"Efficiency","graph.kpi.amount":"Amount","graph.kpi.flagged":"Flagged","graph.chart.billable.title":"Billable by Dimension","graph.chart.billable.subtitle":"Top values by billable hours","graph.chart.efficiency.title":"Efficiency by Person","graph.chart.efficiency.subtitle":"Lowest efficiency first","graph.chart.status.title":"Status Distribution","graph.chart.status.subtitle":"Record ratio by status","graph.dataBody":"Data Body","graph.reportTitle":"Graphic Report","graph.unassigned":"Unassigned","graph.column.reportHours":"Report Hours","graph.column.billableHours":"Billable Hours","detail.searchAi.placeholder":"Search fields, or ask AI if no match...","detail.searchAi.matches":"{count} matches found","detail.searchAi.noMatch":"No matching field found.","detail.searchAi.autoAiFallback":"No direct match. Triggering AI analysis...","detail.searchAi.aiResultTitle":"AI Insight","detail.table.title":"Related Records","kanban.empty":"Drop cards here","kanban.bucket.limit":"Limit","kanban.bucket.dropHere":"Release to move into this bucket","kanban.bucket.add":"Add bucket","kanban.bucket.rename":"Rename bucket","kanban.bucket.saveRename":"Save bucket name","kanban.bucket.cancelRename":"Cancel renaming","kanban.search.placeholder":"Search cards and buckets","kanban.search.clear":"Clear search","kanban.search.results":"{count} matching cards","kanban.search.noMatch":"No matching cards","kanban.card.progress":"Progress","kanban.card.openDetail":"Open Detail","kanban.priority.critical":"Critical","kanban.priority.high":"High","kanban.priority.medium":"Medium","kanban.priority.low":"Low","quickCreate.newItem":"New Item","quickCreate.createWithTitle":"Create {title}","quickEdit.editWithTitle":"Edit {title}","quickDelete.confirmTitle":"Confirm Delete","quickDelete.confirmMessageSingle":"Are you sure you want to delete the selected record?","quickDelete.confirmMessageMultiple":"Are you sure you want to delete {count} selected records?","cardPage.viewDetails":"View Details","cardPage.download":"Download","cardPage.close":"Close","cardPage.empty":"No items found","messageBox.confirm":"OK","messageBox.cancel":"Cancel"},ub={"common.cancel":"\u53D6\u6D88","common.save":"\u4FDD\u5B58","common.ok":"\u786E\u5B9A","common.done":"\u5B8C\u6210","common.search":"\u641C\u7D22","common.none":"\u65E0","common.all":"\u5168\u90E8","common.noData":"\u6682\u65E0\u6570\u636E","common.copy":"\u590D\u5236","common.delete":"\u5220\u9664","common.loading":"\u52A0\u8F7D\u4E2D...","header.searchPlaceholder":"\u95EE\u6211\u70B9\u4EC0\u4E48...","header.searchAddFeature":"\u589E\u52A0\u529F\u80FD","header.searchStartVoice":"\u5F00\u59CB\u8BED\u97F3\u8F93\u5165","header.searchStopVoice":"\u505C\u6B62\u8BED\u97F3\u8F93\u5165","header.searchOpenPanel":"\u6253\u5F00\u5BF9\u8BDD","header.theme.system":"\u4E3B\u9898\uFF1A\u8DDF\u968F\u7CFB\u7EDF","header.theme.dark":"\u4E3B\u9898\uFF1A\u6DF1\u8272","header.theme.light":"\u4E3B\u9898\uFF1A\u6D45\u8272","header.menu.setting":"\u8BBE\u7F6E","header.menu.refresh":"\u5237\u65B0","header.menu.logout":"\u6CE8\u9500","navigation.expand":"\u5C55\u5F00\u5BFC\u822A","navigation.collapse":"\u6298\u53E0\u5BFC\u822A","navigation.searchPlaceholder":"\u641C\u7D22\u83DC\u5355...","navigation.noMatch":"\u672A\u627E\u5230\u5339\u914D\u7684\u83DC\u5355\u9879","navigation.noAccessibleApp":"\u6682\u65E0\u53EF\u8BBF\u95EE\u7684\u5E94\u7528","navigation.noItems":"\u6682\u65E0\u53EF\u663E\u793A\u9879","navigation.expandView":"\u5C55\u5F00\u67E5\u770B {title}","navigation.mode.switchToFixed":"\u5207\u6362\u4E3A\u56FA\u5B9A\u5BFC\u822A","navigation.mode.switchToFloating":"\u5207\u6362\u4E3A\u60AC\u6D6E\u5BFC\u822A","navigation.pinned":"\u5DF2\u56FA\u5B9A","navigation.pin.add":"\u56FA\u5B9A\u5230\u9876\u90E8","navigation.pin.remove":"\u53D6\u6D88\u56FA\u5B9A","table.toolbar.searchPlaceholder":"\u641C\u7D22...","table.title.default":"\u6570\u636E\u8868","table.toolbar.groupBy":"\u5206\u7EC4","table.toolbar.summary":"\u6C47\u603B","table.toolbar.columns":"\u5217","table.toolbar.export":"\u5BFC\u51FA","table.toolbar.itemsPerPage":"\u6BCF\u9875\u6761\u6570\uFF1A","table.toolbar.pageOf":"\u7B2C {current} / {total} \u9875","table.toolbar.newItem":"\u65B0\u5EFA\u6761\u76EE","table.toolbar.editItem":"\u7F16\u8F91\u6761\u76EE","table.toolbar.deleteItem":"\u5220\u9664\u6761\u76EE","table.toolbar.graphicReport":"\u56FE\u8868\u62A5\u8868","table.toolbar.saveLayout":"\u4FDD\u5B58\u5E03\u5C40","table.menu.groupBy":"\u5206\u7EC4","table.menu.clearAll":"\u6E05\u7A7A","table.menu.visibleColumns":"\u53EF\u89C1\u5217","table.menu.showSummaryRow":"\u663E\u793A\u6C47\u603B\u884C","table.menu.noNumericColumns":"\u6CA1\u6709\u6570\u503C\u5217","table.group.expandAll":"\u5C55\u5F00\u5168\u90E8\u5206\u7EC4","table.group.collapseAll":"\u6298\u53E0\u5168\u90E8\u5206\u7EC4","table.mobile.notImplemented":"\u79FB\u52A8\u7AEF\u89C6\u56FE\u6682\u672A\u5B9E\u73B0","table.headerMenu.sortAsc":"\u5347\u5E8F\u6392\u5217","table.headerMenu.sortDesc":"\u964D\u5E8F\u6392\u5217","table.headerMenu.clearSort":"\u6E05\u9664\u6392\u5E8F","table.headerMenu.configureSort":"\u6392\u5E8F\u8BBE\u7F6E...","table.headerMenu.group":"\u6309\u6B64\u5217\u5206\u7EC4","table.headerMenu.ungroup":"\u53D6\u6D88\u5206\u7EC4","table.headerMenu.addSummary":"\u52A0\u5165\u6C47\u603B","table.headerMenu.removeSummary":"\u4ECE\u6C47\u603B\u4E2D\u79FB\u9664","table.headerMenu.hideColumn":"\u9690\u85CF\u8BE5\u5217","table.sortDialog.title":"\u6392\u5E8F\u8BBE\u7F6E","table.sortDialog.empty":"\u6682\u65E0\u6392\u5E8F\u89C4\u5219\uFF0C\u8BF7\u6DFB\u52A0\u89C4\u5219\u8FDB\u884C\u6392\u5E8F\u3002","table.sortDialog.addRule":"\u6DFB\u52A0\u6392\u5E8F\u89C4\u5219","table.sortDialog.clearAll":"\u6E05\u7A7A\u89C4\u5219","table.sortDialog.asc":"\u5347\u5E8F","table.sortDialog.desc":"\u964D\u5E8F","pivot.title.default":"\u6570\u636E\u900F\u89C6\u8868","pivot.subtitle.default":"\u62D6\u62FD\u5B57\u6BB5\u4EE5\u914D\u7F6E\u900F\u89C6\u8868\u3002","pivot.empty":"\u8BF7\u81F3\u5C11\u62D6\u5165\u4E00\u4E2A\u503C\u5B57\u6BB5\u540E\u518D\u67E5\u770B\u900F\u89C6\u7ED3\u679C\u3002","pivot.records":"\u8BB0\u5F55\u6570","pivot.afterFilter":"\u7B5B\u9009\u540E","pivot.grandTotal":"\u603B\u8BA1","pivot.resultLabel":"\u7ED3\u679C","pivot.valueLabel":"\u503C","pivot.table.dimensions":"\u7EF4\u5EA6","pivot.config.title":"\u5E03\u5C40\u914D\u7F6E","pivot.fieldList":"\u5B57\u6BB5\u5217\u8868","pivot.availableDimensions":"\u53EF\u7528\u7EF4\u5EA6","pivot.allFieldsInUse":"\u6240\u6709\u5B57\u6BB5\u90FD\u5DF2\u4F7F\u7528\u3002","pivot.zone.rows":"\u884C","pivot.zone.columns":"\u5217","pivot.zone.filters":"\u7B5B\u9009","pivot.zone.values":"\u503C","pivot.hint.rows":"\u5C06\u5B57\u6BB5\u62D6\u5230\u8FD9\u91CC\u6784\u5EFA\u884C\u5C42\u7EA7","pivot.hint.columns":"\u5C06\u5B57\u6BB5\u62D6\u5230\u8FD9\u91CC\u6784\u5EFA\u5217\u5C42\u7EA7","pivot.hint.filters":"\u5C06\u5B57\u6BB5\u62D6\u5230\u8FD9\u91CC\u4F5C\u4E3A\u62A5\u8868\u7B5B\u9009","pivot.hint.values":"\u5C06\u6570\u503C\u5B57\u6BB5\u62D6\u5230\u8FD9\u91CC\u8FDB\u884C\u805A\u5408","pivot.clearArea":"\u6E05\u7A7A\u533A\u57DF","pivot.filter.na":"\u4E0D\u53EF\u7528","pivot.filter.noValues":"\u65E0\u53EF\u9009\u503C","pivot.filter.noneSelected":"\u672A\u9009\u62E9","pivot.filter.allValues":"\u5168\u90E8\u503C","pivot.filter.selectedCount":"\u5DF2\u9009 {selected} / {total}","pivot.filter.selectAll":"\u5168\u9009","pivot.filter.deselectAll":"\u53D6\u6D88\u5168\u9009","pivot.filter.noResults":"\u65E0\u5339\u914D\u7ED3\u679C","pivot.collapse.ariaExpand":"\u5C55\u5F00\u914D\u7F6E\u533A\u57DF","pivot.collapse.ariaCollapse":"\u6298\u53E0\u914D\u7F6E\u533A\u57DF","pivot.agg.sum":"\u6C42\u548C","pivot.agg.count":"\u8BA1\u6570","pivot.agg.avg":"\u5E73\u5747\u503C","pivot.agg.min":"\u6700\u5C0F\u503C","pivot.agg.max":"\u6700\u5927\u503C","pivot.preset.selectPlaceholder":"\u9009\u62E9\u65B9\u6848","pivot.preset.save":"\u4FDD\u5B58\u65B9\u6848","pivot.preset.delete":"\u5220\u9664\u65B9\u6848","pivot.preset.saveDialogTitle":"\u4FDD\u5B58\u5F53\u524D\u65B9\u6848","pivot.preset.nameLabel":"\u65B9\u6848\u540D\u79F0","pivot.preset.defaultName":"\u65B9\u6848 {index}","pivot.table.sectionTitle":"\u900F\u89C6\u7ED3\u679C","pivot.table.expandRowsAll":"\u884C\u5168\u90E8\u6253\u5F00","pivot.table.collapseRowsAll":"\u884C\u5168\u90E8\u6298\u53E0","pivot.table.expandColumnsAll":"\u5217\u5168\u90E8\u6253\u5F00","pivot.table.collapseColumnsAll":"\u5217\u5168\u90E8\u6298\u53E0","pivot.table.collapse.ariaExpand":"\u5C55\u5F00\u900F\u89C6\u7ED3\u679C","pivot.table.collapse.ariaCollapse":"\u6298\u53E0\u900F\u89C6\u7ED3\u679C","pivot.chart.title":"\u900F\u89C6\u56FE\u8868","pivot.chart.subtitle":"\u5C06\u4E00\u4E2A\u7EF4\u5EA6\u4E0E\u6700\u591A\u4E24\u4E2A\u5EA6\u91CF\u6620\u5C04\u4E3A\u7D27\u51D1\u56FE\u8868\u3002","pivot.chart.subtitleReady":"{dimension} \xB7 {measure}","pivot.chart.emptyNoDimension":"\u8BF7\u81F3\u5C11\u653E\u5165\u4E00\u4E2A\u884C\u6216\u5217\u5B57\u6BB5\u540E\u518D\u67E5\u770B\u56FE\u8868\u3002","pivot.chart.emptyNoValue":"\u8BF7\u81F3\u5C11\u653E\u5165\u4E00\u4E2A\u503C\u5B57\u6BB5\u540E\u518D\u67E5\u770B\u56FE\u8868\u3002","pivot.chart.emptyNoData":"\u5F53\u524D\u56FE\u8868\u9009\u62E9\u4E0B\u6682\u65E0\u53EF\u5C55\u793A\u6570\u636E\u3002","pivot.chart.dimension":"\u56FE\u8868\u7EF4\u5EA6","pivot.chart.primaryMeasure":"\u4E3B\u5EA6\u91CF","pivot.chart.secondaryMeasure":"\u5BF9\u6BD4\u5EA6\u91CF","pivot.chart.chartType":"\u56FE\u8868\u7C7B\u578B","pivot.chart.style.barVertical":"\u7EB5\u5411\u67F1\u72B6\u56FE","pivot.chart.style.barHorizontal":"\u6A2A\u5411\u67F1\u72B6\u56FE","pivot.chart.style.line":"\u6298\u7EBF\u56FE","pivot.chart.style.scatter":"\u6563\u70B9\u56FE","pivot.chart.collapse.ariaExpand":"\u5C55\u5F00\u56FE\u8868\u533A\u57DF","pivot.chart.collapse.ariaCollapse":"\u6298\u53E0\u56FE\u8868\u533A\u57DF","smartFilter.adaptFilters":"\u7B5B\u9009\u8BBE\u7F6E","smartFilter.addFilters":"\u6DFB\u52A0\u7B5B\u9009","smartFilter.go":"\u6267\u884C","smartFilter.visibleFilters":"\u53EF\u89C1\u7B5B\u9009\u9879","smartFilter.searchPlaceholder":"\u641C\u7D22...","smartFilter.noOptionsFound":"\u672A\u627E\u5230\u9009\u9879","smartFilter.min":"\u6700\u5C0F\u503C","smartFilter.max":"\u6700\u5927\u503C","smartFilter.minMaxPlaceholder":"\u6700\u5C0F\u503C - \u6700\u5927\u503C","smartFilter.operator.equals":"\u7B49\u4E8E","smartFilter.operator.contains":"\u5305\u542B","smartFilter.operator.notContains":"\u4E0D\u5305\u542B","smartFilter.operator.wildcard":"\u901A\u914D\u7B26\u641C\u7D22","smartFilter.operator.notEquals":"\u4E0D\u7B49\u4E8E","smartFilter.operator.greaterThan":"\u5927\u4E8E","smartFilter.operator.lessThan":"\u5C0F\u4E8E","smartFilter.operator.greaterOrEqual":"\u5927\u4E8E\u7B49\u4E8E","smartFilter.operator.lessOrEqual":"\u5C0F\u4E8E\u7B49\u4E8E","smartFilter.operator.between":"\u533A\u95F4","variant.noOptions":"\u65E0\u9009\u9879","variant.defaultSuffix":"\u9ED8\u8BA4","variant.selectVariant":"\u9009\u62E9\u89C6\u56FE","variant.saveView":"\u4FDD\u5B58\u89C6\u56FE","variant.newVariant":"\u65B0\u89C6\u56FE","variant.viewName":"\u89C6\u56FE\u540D\u79F0","variant.setDefault":"\u8BBE\u4E3A\u9ED8\u8BA4","variant.publicAllUsers":"\u516C\u5F00\uFF08\u6240\u6709\u7528\u6237\uFF09","variant.toast.fetchFailed":"\u52A0\u8F7D\u89C6\u56FE\u5931\u8D25","variant.toast.saveFailed":"\u4FDD\u5B58\u89C6\u56FE\u5931\u8D25","variant.toast.saveSuccess":"\u89C6\u56FE\u4FDD\u5B58\u6210\u529F","variant.toast.deleteFailed":"\u5220\u9664\u89C6\u56FE\u5931\u8D25","variant.toast.deleteSuccess":"\u89C6\u56FE\u5220\u9664\u6210\u529F","variant.toast.defaultFailed":"\u66F4\u65B0\u9ED8\u8BA4\u89C6\u56FE\u5931\u8D25","variant.toast.defaultSuccess":"\u9ED8\u8BA4\u89C6\u56FE\u5DF2\u66F4\u65B0","layout.saveLayout":"\u4FDD\u5B58\u5E03\u5C40","layout.layoutOptions":"\u5E03\u5C40\u9009\u9879","layout.selectLayout":"\u9009\u62E9\u5E03\u5C40","layout.saveCurrentLayout":"\u4FDD\u5B58\u5F53\u524D\u5E03\u5C40...","layout.noSavedLayouts":"\u6682\u65E0\u5DF2\u4FDD\u5B58\u5E03\u5C40","layout.removeDefault":"\u53D6\u6D88\u9ED8\u8BA4","layout.setAsDefault":"\u8BBE\u4E3A\u9ED8\u8BA4","layout.layoutName":"\u5E03\u5C40\u540D\u79F0","layout.layoutDescription":"\u63CF\u8FF0","layout.layoutNameHelper":"\u4F8B\u5982\uFF1A\u7D27\u51D1\u89C6\u56FE","layout.warningOverwrite":"\u8B66\u544A\uFF1A\u5C06\u8986\u76D6\u540C\u540D\u5E03\u5C40","layout.useAsDefault":"\u7528\u4F5C\u9ED8\u8BA4\u5E03\u5C40","layout.publicAllUsers":"\u516C\u5F00\uFF08\u6240\u6709\u7528\u6237\u53EF\u89C1\uFF09","layout.toast.loadFallback":"\u540E\u7AEF\u52A0\u8F7D\u5E03\u5C40\u5931\u8D25\uFF0C\u5DF2\u56DE\u9000\u5230\u672C\u5730\u5B58\u50A8","layout.toast.saveSuccess":"\u5E03\u5C40\u4FDD\u5B58\u6210\u529F","layout.toast.saveLocalSuccess":"\u5E03\u5C40\u5DF2\u4FDD\u5B58\u5230\u672C\u5730\u5B58\u50A8","layout.toast.backendUnavailableSavedLocal":"\u540E\u7AEF\u4E0D\u53EF\u7528\uFF0C\u5DF2\u4FDD\u5B58\u5230\u672C\u5730\u5B58\u50A8","layout.toast.deleteSuccess":"\u5E03\u5C40\u5220\u9664\u6210\u529F","layout.toast.deleteLocalSuccess":"\u5E03\u5C40\u5DF2\u4ECE\u672C\u5730\u5B58\u50A8\u5220\u9664","layout.toast.backendUnavailableDeletedLocal":"\u540E\u7AEF\u4E0D\u53EF\u7528\uFF0C\u5DF2\u4ECE\u672C\u5730\u5B58\u50A8\u5220\u9664","layout.toast.defaultSuccess":"\u9ED8\u8BA4\u5E03\u5C40\u5DF2\u8BBE\u7F6E","layout.toast.defaultLocalSuccess":"\u9ED8\u8BA4\u5E03\u5C40\u5DF2\u5728\u672C\u5730\u5B58\u50A8\u8BBE\u7F6E","layout.toast.backendUnavailableDefaultLocal":"\u540E\u7AEF\u4E0D\u53EF\u7528\uFF0C\u9ED8\u8BA4\u5E03\u5C40\u5DF2\u4FDD\u5B58\u5230\u672C\u5730\u5B58\u50A8","dateRange.label":"\u65E5\u671F\u8303\u56F4","dateRange.startDate":"\u5F00\u59CB\u65E5\u671F","dateRange.endDate":"\u7ED3\u675F\u65E5\u671F","dateRange.select":"\u8BF7\u9009\u62E9...","dateRange.today":"\u4ECA\u5929","dateRange.thisWeek":"\u672C\u5468","dateRange.thisMonth":"\u672C\u6708","graph.records":"{count} \u6761\u8BB0\u5F55","graph.kpi.totalRecords":"\u603B\u8BB0\u5F55\u6570","graph.kpi.totalReport":"\u603B\u7533\u62A5\u5DE5\u65F6","graph.kpi.totalBillable":"\u603B\u53EF\u8BA1\u8D39\u5DE5\u65F6","graph.kpi.efficiency":"\u6548\u7387","graph.kpi.amount":"\u91D1\u989D","graph.kpi.flagged":"\u6807\u8BB0","graph.chart.billable.title":"\u7EF4\u5EA6\u8BA1\u8D39\u5DE5\u65F6","graph.chart.billable.subtitle":"\u6309\u53EF\u8BA1\u8D39\u5DE5\u65F6\u6392\u5E8F\u524D\u5217","graph.chart.efficiency.title":"\u4EBA\u5458\u6548\u7387","graph.chart.efficiency.subtitle":"\u6309\u6700\u4F4E\u6548\u7387\u4F18\u5148","graph.chart.status.title":"\u72B6\u6001\u5206\u5E03","graph.chart.status.subtitle":"\u6309\u72B6\u6001\u8BB0\u5F55\u5360\u6BD4","graph.dataBody":"\u6570\u636E\u660E\u7EC6","graph.reportTitle":"\u56FE\u8868\u62A5\u8868","graph.unassigned":"\u672A\u5206\u914D","graph.column.reportHours":"\u7533\u62A5\u5DE5\u65F6","graph.column.billableHours":"\u53EF\u8BA1\u8D39\u5DE5\u65F6","detail.searchAi.placeholder":"\u641C\u7D22\u5B57\u6BB5\uFF1B\u5982\u65E0\u7ED3\u679C\u5219\u81EA\u52A8\u89E6\u53D1 AI...","detail.searchAi.matches":"{count} \u6761\u5339\u914D\u7ED3\u679C","detail.searchAi.noMatch":"\u672A\u627E\u5230\u5339\u914D\u5B57\u6BB5\u3002","detail.searchAi.autoAiFallback":"\u672A\u547D\u4E2D\u5B57\u6BB5\uFF0C\u6B63\u5728\u89E6\u53D1 AI \u5206\u6790...","detail.searchAi.aiResultTitle":"AI \u5206\u6790\u7ED3\u679C","detail.table.title":"\u5173\u8054\u8BB0\u5F55","kanban.empty":"\u5C06\u5361\u7247\u62D6\u5230\u8FD9\u91CC","kanban.bucket.limit":"\u4E0A\u9650","kanban.bucket.dropHere":"\u91CA\u653E\u540E\u79FB\u52A8\u5230\u8BE5 bucket","kanban.bucket.add":"\u65B0\u589E bucket","kanban.bucket.rename":"\u91CD\u547D\u540D bucket","kanban.bucket.saveRename":"\u4FDD\u5B58 bucket \u540D\u79F0","kanban.bucket.cancelRename":"\u53D6\u6D88\u91CD\u547D\u540D","kanban.search.placeholder":"\u641C\u7D22\u5361\u7247\u548C bucket","kanban.search.clear":"\u6E05\u9664\u641C\u7D22","kanban.search.results":"{count} \u5F20\u5339\u914D\u5361\u7247","kanban.search.noMatch":"\u6CA1\u6709\u5339\u914D\u7684\u5361\u7247","kanban.card.progress":"\u8FDB\u5EA6","kanban.card.openDetail":"\u6253\u5F00\u8BE6\u60C5","kanban.priority.critical":"\u7D27\u6025","kanban.priority.high":"\u9AD8","kanban.priority.medium":"\u4E2D","kanban.priority.low":"\u4F4E","quickCreate.newItem":"\u65B0\u5EFA\u6761\u76EE","quickCreate.createWithTitle":"\u521B\u5EFA{title}","quickEdit.editWithTitle":"\u7F16\u8F91{title}","quickDelete.confirmTitle":"\u786E\u8BA4\u5220\u9664","quickDelete.confirmMessageSingle":"\u786E\u8BA4\u5220\u9664\u5F53\u524D\u9009\u4E2D\u8BB0\u5F55\u5417\uFF1F","quickDelete.confirmMessageMultiple":"\u786E\u8BA4\u5220\u9664\u5DF2\u9009\u4E2D\u7684 {count} \u6761\u8BB0\u5F55\u5417\uFF1F","cardPage.viewDetails":"\u67E5\u770B\u8BE6\u60C5","cardPage.download":"\u4E0B\u8F7D","cardPage.close":"\u5173\u95ED","cardPage.empty":"\u672A\u627E\u5230\u6761\u76EE","messageBox.confirm":"\u786E\u5B9A","messageBox.cancel":"\u53D6\u6D88"},mb={"common.cancel":"Annuler","common.save":"Enregistrer","common.ok":"OK","common.done":"Terminer","common.search":"Rechercher","common.none":"Aucun","common.all":"Tout","common.noData":"Aucune donn\xE9e","common.copy":"Copier","common.delete":"Supprimer","common.loading":"Chargement...","header.searchPlaceholder":"Demandez-moi...","header.searchAddFeature":"Ajouter une fonction","header.searchStartVoice":"D\xE9marrer la saisie vocale","header.searchStopVoice":"Arr\xEAter la saisie vocale","header.searchOpenPanel":"Ouvrir la conversation","header.theme.system":"Th\xE8me : Syst\xE8me","header.theme.dark":"Th\xE8me : Sombre","header.theme.light":"Th\xE8me : Clair","header.menu.setting":"Param\xE8tres","header.menu.refresh":"Actualiser","header.menu.logout":"Se d\xE9connecter","navigation.expand":"D\xE9velopper la navigation","navigation.collapse":"R\xE9duire la navigation","navigation.searchPlaceholder":"Rechercher dans le menu...","navigation.noMatch":"Aucun \xE9l\xE9ment correspondant","navigation.noAccessibleApp":"Aucune application accessible","navigation.noItems":"Aucun \xE9l\xE9ment \xE0 afficher","navigation.expandView":"D\xE9velopper {title}","navigation.mode.switchToFixed":"Basculer vers la navigation fixe","navigation.mode.switchToFloating":"Basculer vers la navigation flottante","navigation.pinned":"\xC9pingl\xE9s","navigation.pin.add":"\xC9pingler en haut","navigation.pin.remove":"D\xE9s\xE9pingler","table.toolbar.searchPlaceholder":"Rechercher...","table.title.default":"Tableau de donn\xE9es","table.toolbar.groupBy":"Grouper","table.toolbar.summary":"R\xE9sum\xE9","table.toolbar.columns":"Colonnes","table.toolbar.export":"Exporter","table.toolbar.itemsPerPage":"Lignes par page :","table.toolbar.pageOf":"Page {current} sur {total}","table.toolbar.newItem":"Nouvel \xE9l\xE9ment","table.toolbar.editItem":"Modifier l'\xE9l\xE9ment","table.toolbar.deleteItem":"Supprimer l'\xE9l\xE9ment","table.toolbar.graphicReport":"Rapport graphique","table.toolbar.saveLayout":"Enregistrer la vue","table.menu.groupBy":"Grouper","table.menu.clearAll":"Tout effacer","table.menu.visibleColumns":"Colonnes visibles","table.menu.showSummaryRow":"Afficher la ligne de r\xE9sum\xE9","table.menu.noNumericColumns":"Aucune colonne num\xE9rique","table.group.expandAll":"D\xE9velopper tous les groupes","table.group.collapseAll":"R\xE9duire tous les groupes","table.mobile.notImplemented":"Vue mobile non impl\xE9ment\xE9e","table.headerMenu.sortAsc":"Trier ascendant","table.headerMenu.sortDesc":"Trier descendant","table.headerMenu.clearSort":"Effacer le tri","table.headerMenu.configureSort":"Configurer le tri...","table.headerMenu.group":"Grouper par cette colonne","table.headerMenu.ungroup":"Retirer du groupement","table.headerMenu.addSummary":"Inclure dans le r\xE9sum\xE9","table.headerMenu.removeSummary":"Retirer du r\xE9sum\xE9","table.headerMenu.hideColumn":"Masquer la colonne","table.sortDialog.title":"Param\xE8tres de tri","table.sortDialog.empty":"Aucune r\xE8gle de tri. Ajoutez-en une pour commencer.","table.sortDialog.addRule":"Ajouter une r\xE8gle","table.sortDialog.clearAll":"Tout effacer","table.sortDialog.asc":"Ascendant","table.sortDialog.desc":"Descendant","pivot.title.default":"Tableau crois\xE9 dynamique","pivot.subtitle.default":"Faites glisser les champs pour configurer le tableau crois\xE9.","pivot.empty":"Ajoutez au moins un champ de valeur pour afficher le r\xE9sultat.","pivot.records":"Enregistrements","pivot.afterFilter":"Apr\xE8s filtre","pivot.grandTotal":"Total g\xE9n\xE9ral","pivot.resultLabel":"R\xE9sultat","pivot.valueLabel":"Valeur","pivot.table.dimensions":"Dimensions","pivot.config.title":"Configuration","pivot.fieldList":"Liste des champs","pivot.availableDimensions":"Dimensions disponibles","pivot.allFieldsInUse":"Tous les champs sont d\xE9j\xE0 utilis\xE9s.","pivot.zone.rows":"Lignes","pivot.zone.columns":"Colonnes","pivot.zone.filters":"Filtres","pivot.zone.values":"Valeurs","pivot.hint.rows":"D\xE9posez les champs ici pour construire la hi\xE9rarchie des lignes","pivot.hint.columns":"D\xE9posez les champs ici pour construire la hi\xE9rarchie des colonnes","pivot.hint.filters":"D\xE9posez les champs ici pour les filtres du rapport","pivot.hint.values":"D\xE9posez les champs num\xE9riques ici pour les agr\xE9gations","pivot.clearArea":"Vider la zone","pivot.filter.na":"N/A","pivot.filter.noValues":"Aucune valeur","pivot.filter.noneSelected":"Aucune s\xE9lection","pivot.filter.allValues":"Toutes les valeurs","pivot.filter.selectedCount":"{selected} / {total} s\xE9lectionn\xE9es","pivot.filter.selectAll":"Tout s\xE9lectionner","pivot.filter.deselectAll":"Tout d\xE9s\xE9lectionner","pivot.filter.noResults":"Aucun r\xE9sultat","pivot.collapse.ariaExpand":"D\xE9velopper la zone de configuration","pivot.collapse.ariaCollapse":"R\xE9duire la zone de configuration","pivot.agg.sum":"Somme","pivot.agg.count":"Compte","pivot.agg.avg":"Moyenne","pivot.agg.min":"Min","pivot.agg.max":"Max","pivot.preset.selectPlaceholder":"S\xE9lectionner un preset","pivot.preset.save":"Enregistrer le preset","pivot.preset.delete":"Supprimer le preset","pivot.preset.saveDialogTitle":"Enregistrer le preset actuel","pivot.preset.nameLabel":"Nom du preset","pivot.preset.defaultName":"Preset {index}","pivot.table.sectionTitle":"R\xE9sultat du pivot","pivot.table.expandRowsAll":"Expand rows","pivot.table.collapseRowsAll":"Collapse rows","pivot.table.expandColumnsAll":"Expand columns","pivot.table.collapseColumnsAll":"Collapse columns","pivot.table.collapse.ariaExpand":"D\xE9velopper le r\xE9sultat du pivot","pivot.table.collapse.ariaCollapse":"R\xE9duire le r\xE9sultat du pivot","pivot.chart.title":"Graphique pivot","pivot.chart.subtitle":"Associez une dimension et jusqu\u2019\xE0 deux mesures dans un graphique compact.","pivot.chart.subtitleReady":"{dimension} par {measure}","pivot.chart.emptyNoDimension":"Ajoutez au moins un champ de ligne ou de colonne pour afficher le graphique.","pivot.chart.emptyNoValue":"Ajoutez au moins un champ de valeur pour afficher le graphique.","pivot.chart.emptyNoData":"Aucune donn\xE9e disponible pour la s\xE9lection actuelle du graphique.","pivot.chart.dimension":"Dimension","pivot.chart.primaryMeasure":"Mesure","pivot.chart.secondaryMeasure":"Mesure de comparaison","pivot.chart.chartType":"Type de graphique","pivot.chart.style.barVertical":"Barres verticales","pivot.chart.style.barHorizontal":"Barres horizontales","pivot.chart.style.line":"Ligne","pivot.chart.style.scatter":"Nuage de points","pivot.chart.collapse.ariaExpand":"D\xE9velopper la zone du graphique","pivot.chart.collapse.ariaCollapse":"R\xE9duire la zone du graphique","smartFilter.adaptFilters":"Adapter les filtres","smartFilter.addFilters":"Ajouter des filtres","smartFilter.go":"Ex\xE9cuter","smartFilter.visibleFilters":"Filtres visibles","smartFilter.searchPlaceholder":"Rechercher...","smartFilter.noOptionsFound":"Aucune option trouv\xE9e","smartFilter.min":"Min","smartFilter.max":"Max","smartFilter.minMaxPlaceholder":"Min - Max","smartFilter.operator.equals":"\xC9gal \xE0","smartFilter.operator.contains":"Contient","smartFilter.operator.notContains":"Ne contient pas","smartFilter.operator.wildcard":"Recherche g\xE9n\xE9rique","smartFilter.operator.notEquals":"Diff\xE9rent de","smartFilter.operator.greaterThan":"Sup\xE9rieur \xE0","smartFilter.operator.lessThan":"Inf\xE9rieur \xE0","smartFilter.operator.greaterOrEqual":"Sup\xE9rieur ou \xE9gal","smartFilter.operator.lessOrEqual":"Inf\xE9rieur ou \xE9gal","smartFilter.operator.between":"Entre","variant.noOptions":"Aucune option","variant.defaultSuffix":"Par d\xE9faut","variant.selectVariant":"S\xE9lectionner une vue","variant.saveView":"Enregistrer la vue","variant.newVariant":"Nouvelle vue","variant.viewName":"Nom de la vue","variant.setDefault":"D\xE9finir par d\xE9faut","variant.publicAllUsers":"Public (tous les utilisateurs)","variant.toast.fetchFailed":"\xC9chec du chargement des vues","variant.toast.saveFailed":"\xC9chec de l'enregistrement de la vue","variant.toast.saveSuccess":"Vue enregistr\xE9e avec succ\xE8s","variant.toast.deleteFailed":"\xC9chec de la suppression de la vue","variant.toast.deleteSuccess":"Vue supprim\xE9e avec succ\xE8s","variant.toast.defaultFailed":"\xC9chec de la mise \xE0 jour de la vue par d\xE9faut","variant.toast.defaultSuccess":"Vue par d\xE9faut mise \xE0 jour","layout.saveLayout":"Enregistrer la vue","layout.layoutOptions":"Options de vue","layout.selectLayout":"S\xE9lectionner une vue","layout.saveCurrentLayout":"Enregistrer la vue actuelle...","layout.noSavedLayouts":"Aucune vue enregistr\xE9e","layout.removeDefault":"Retirer le d\xE9faut","layout.setAsDefault":"D\xE9finir par d\xE9faut","layout.layoutName":"Nom de la vue","layout.layoutDescription":"Description","layout.layoutNameHelper":"ex. : Vue compacte","layout.warningOverwrite":"Attention : la vue existante sera \xE9cras\xE9e","layout.useAsDefault":"Utiliser comme vue par d\xE9faut","layout.publicAllUsers":"Public (visible par tous les utilisateurs)","layout.toast.loadFallback":"\xC9chec du chargement depuis le backend, bascule vers le stockage local","layout.toast.saveSuccess":"Vue enregistr\xE9e avec succ\xE8s","layout.toast.saveLocalSuccess":"Vue enregistr\xE9e dans le stockage local","layout.toast.backendUnavailableSavedLocal":"Backend indisponible, enregistr\xE9 en local","layout.toast.deleteSuccess":"Vue supprim\xE9e avec succ\xE8s","layout.toast.deleteLocalSuccess":"Vue supprim\xE9e du stockage local","layout.toast.backendUnavailableDeletedLocal":"Backend indisponible, supprim\xE9 en local","layout.toast.defaultSuccess":"Vue par d\xE9faut d\xE9finie","layout.toast.defaultLocalSuccess":"Vue par d\xE9faut d\xE9finie en local","layout.toast.backendUnavailableDefaultLocal":"Backend indisponible, d\xE9faut enregistr\xE9 en local","dateRange.label":"Plage de dates","dateRange.startDate":"Date de d\xE9but","dateRange.endDate":"Date de fin","dateRange.select":"S\xE9lectionner...","dateRange.today":"Aujourd'hui","dateRange.thisWeek":"Cette semaine","dateRange.thisMonth":"Ce mois-ci","graph.records":"{count} enregistrements","graph.kpi.totalRecords":"Total des enregistrements","graph.kpi.totalReport":"Total d\xE9clar\xE9","graph.kpi.totalBillable":"Total facturable","graph.kpi.efficiency":"Efficacit\xE9","graph.kpi.amount":"Montant","graph.kpi.flagged":"Signal\xE9","graph.chart.billable.title":"Facturable par dimension","graph.chart.billable.subtitle":"Top valeurs par heures facturables","graph.chart.efficiency.title":"Efficacit\xE9 par personne","graph.chart.efficiency.subtitle":"Efficacit\xE9 la plus faible en premier","graph.chart.status.title":"R\xE9partition des statuts","graph.chart.status.subtitle":"Ratio des enregistrements par statut","graph.dataBody":"Donn\xE9es","graph.reportTitle":"Rapport graphique","graph.unassigned":"Non attribu\xE9","graph.column.reportHours":"Heures d\xE9clar\xE9es","graph.column.billableHours":"Heures facturables","detail.searchAi.placeholder":"Rechercher des champs, ou interroger l\u2019IA en cas d\u2019absence de r\xE9sultat...","detail.searchAi.matches":"{count} correspondances trouv\xE9es","detail.searchAi.noMatch":"Aucun champ correspondant trouv\xE9.","detail.searchAi.autoAiFallback":"Aucune correspondance directe. Analyse IA en cours...","detail.searchAi.aiResultTitle":"Analyse IA","detail.table.title":"Enregistrements li\xE9s","kanban.empty":"D\xE9posez les cartes ici","kanban.bucket.limit":"Limite","kanban.bucket.dropHere":"Rel\xE2chez pour d\xE9placer dans cette colonne","kanban.bucket.add":"Ajouter une colonne","kanban.bucket.rename":"Renommer la colonne","kanban.bucket.saveRename":"Enregistrer le nom","kanban.bucket.cancelRename":"Annuler le renommage","kanban.search.placeholder":"Rechercher des cartes et colonnes","kanban.search.clear":"Effacer la recherche","kanban.search.results":"{count} cartes correspondantes","kanban.search.noMatch":"Aucune carte correspondante","kanban.card.progress":"Progression","kanban.card.openDetail":"Ouvrir le d\xE9tail","kanban.priority.critical":"Critique","kanban.priority.high":"\xC9lev\xE9e","kanban.priority.medium":"Moyenne","kanban.priority.low":"Faible","quickCreate.newItem":"Nouvel \xE9l\xE9ment","quickCreate.createWithTitle":"Cr\xE9er {title}","quickEdit.editWithTitle":"Modifier {title}","quickDelete.confirmTitle":"Confirmer la suppression","quickDelete.confirmMessageSingle":"Voulez-vous vraiment supprimer l\u2019enregistrement s\xE9lectionn\xE9 ?","quickDelete.confirmMessageMultiple":"Voulez-vous vraiment supprimer les {count} enregistrements s\xE9lectionn\xE9s ?","cardPage.viewDetails":"Voir les d\xE9tails","cardPage.download":"T\xE9l\xE9charger","cardPage.close":"Fermer","cardPage.empty":"Aucun \xE9l\xE9ment trouv\xE9","messageBox.confirm":"OK","messageBox.cancel":"Annuler"},gb={"common.cancel":"Abbrechen","common.save":"Speichern","common.ok":"OK","common.done":"Fertig","common.search":"Suchen","common.none":"Keine","common.all":"Alle","common.noData":"Keine Daten","common.copy":"Kopieren","common.delete":"L\xF6schen","common.loading":"Wird geladen...","header.searchPlaceholder":"Frag mich...","header.searchAddFeature":"Funktion hinzuf\xFCgen","header.searchStartVoice":"Spracheingabe starten","header.searchStopVoice":"Spracheingabe stoppen","header.searchOpenPanel":"Unterhaltung \xF6ffnen","header.theme.system":"Theme: System","header.theme.dark":"Theme: Dunkel","header.theme.light":"Theme: Hell","header.menu.setting":"Einstellungen","header.menu.refresh":"Aktualisieren","header.menu.logout":"Abmelden","navigation.expand":"Navigation erweitern","navigation.collapse":"Navigation einklappen","navigation.searchPlaceholder":"Men\xFC suchen...","navigation.noMatch":"Keine passenden Men\xFCeintr\xE4ge","navigation.noAccessibleApp":"Keine verf\xFCgbaren Anwendungen","navigation.noItems":"Keine Eintr\xE4ge vorhanden","navigation.expandView":"{title} aufklappen","navigation.mode.switchToFixed":"Zu fester Navigation wechseln","navigation.mode.switchToFloating":"Zu schwebender Navigation wechseln","navigation.pinned":"Angeheftet","navigation.pin.add":"Oben anheften","navigation.pin.remove":"L\xF6sen","table.toolbar.searchPlaceholder":"Suchen...","table.title.default":"Datentabelle","table.toolbar.groupBy":"Gruppieren","table.toolbar.summary":"Zusammenfassung","table.toolbar.columns":"Spalten","table.toolbar.export":"Export","table.toolbar.itemsPerPage":"Zeilen pro Seite:","table.toolbar.pageOf":"Seite {current} von {total}","table.toolbar.newItem":"Neuer Eintrag","table.toolbar.editItem":"Eintrag bearbeiten","table.toolbar.deleteItem":"Eintrag l\xF6schen","table.toolbar.graphicReport":"Grafikbericht","table.toolbar.saveLayout":"Layout speichern","table.menu.groupBy":"Gruppieren","table.menu.clearAll":"Alles l\xF6schen","table.menu.visibleColumns":"Sichtbare Spalten","table.menu.showSummaryRow":"Summenzeile anzeigen","table.menu.noNumericColumns":"Keine numerischen Spalten","table.group.expandAll":"Alle Gruppen aufklappen","table.group.collapseAll":"Alle Gruppen zuklappen","table.mobile.notImplemented":"Mobile Ansicht nicht implementiert","table.headerMenu.sortAsc":"Aufsteigend sortieren","table.headerMenu.sortDesc":"Absteigend sortieren","table.headerMenu.clearSort":"Sortierung entfernen","table.headerMenu.configureSort":"Sortierung konfigurieren...","table.headerMenu.group":"Nach dieser Spalte gruppieren","table.headerMenu.ungroup":"Aus Gruppierung entfernen","table.headerMenu.addSummary":"In Summe einbeziehen","table.headerMenu.removeSummary":"Aus Summe entfernen","table.headerMenu.hideColumn":"Spalte ausblenden","table.sortDialog.title":"Sortiereinstellungen","table.sortDialog.empty":"Keine Sortierregeln. F\xFCgen Sie eine hinzu, um zu sortieren.","table.sortDialog.addRule":"Regel hinzuf\xFCgen","table.sortDialog.clearAll":"Alle l\xF6schen","table.sortDialog.asc":"Aufsteigend","table.sortDialog.desc":"Absteigend","pivot.title.default":"Pivot-Tabelle","pivot.subtitle.default":"Ziehen Sie Felder, um die Pivot-Tabelle zu konfigurieren.","pivot.empty":"Ziehen Sie mindestens ein Wertefeld, um das Ergebnis anzuzeigen.","pivot.records":"Datens\xE4tze","pivot.afterFilter":"Nach Filter","pivot.grandTotal":"Gesamtsumme","pivot.resultLabel":"Ergebnis","pivot.valueLabel":"Wert","pivot.table.dimensions":"Dimensionen","pivot.config.title":"Konfiguration","pivot.fieldList":"Feldliste","pivot.availableDimensions":"Verf\xFCgbare Dimensionen","pivot.allFieldsInUse":"Alle Felder sind bereits verwendet.","pivot.zone.rows":"Zeilen","pivot.zone.columns":"Spalten","pivot.zone.filters":"Filter","pivot.zone.values":"Werte","pivot.hint.rows":"Felder hierhin ziehen, um die Zeilenhierarchie zu erstellen","pivot.hint.columns":"Felder hierhin ziehen, um die Spaltenhierarchie zu erstellen","pivot.hint.filters":"Felder hierhin ziehen f\xFCr Berichtsfilter","pivot.hint.values":"Numerische Felder hierhin ziehen f\xFCr Aggregation","pivot.clearArea":"Bereich leeren","pivot.filter.na":"N/V","pivot.filter.noValues":"Keine Werte","pivot.filter.noneSelected":"Nichts ausgew\xE4hlt","pivot.filter.allValues":"Alle Werte","pivot.filter.selectedCount":"{selected} / {total} ausgew\xE4hlt","pivot.filter.selectAll":"Alle ausw\xE4hlen","pivot.filter.deselectAll":"Alle abw\xE4hlen","pivot.filter.noResults":"Keine Ergebnisse","pivot.collapse.ariaExpand":"Konfigurationsbereich erweitern","pivot.collapse.ariaCollapse":"Konfigurationsbereich reduzieren","pivot.agg.sum":"Summe","pivot.agg.count":"Anzahl","pivot.agg.avg":"Durchschnitt","pivot.agg.min":"Min","pivot.agg.max":"Max","pivot.preset.selectPlaceholder":"Preset w\xE4hlen","pivot.preset.save":"Preset speichern","pivot.preset.delete":"Preset l\xF6schen","pivot.preset.saveDialogTitle":"Aktuelles Preset speichern","pivot.preset.nameLabel":"Preset-Name","pivot.preset.defaultName":"Preset {index}","pivot.table.sectionTitle":"Pivot-Ergebnis","pivot.table.expandRowsAll":"Expand rows","pivot.table.collapseRowsAll":"Collapse rows","pivot.table.expandColumnsAll":"Expand columns","pivot.table.collapseColumnsAll":"Collapse columns","pivot.table.collapse.ariaExpand":"Pivot-Ergebnis erweitern","pivot.table.collapse.ariaCollapse":"Pivot-Ergebnis reduzieren","pivot.chart.title":"Pivot-Diagramm","pivot.chart.subtitle":"Eine Dimension und bis zu zwei Kennzahlen in einem kompakten Diagramm abbilden.","pivot.chart.subtitleReady":"{dimension} nach {measure}","pivot.chart.emptyNoDimension":"F\xFCgen Sie mindestens ein Zeilen- oder Spaltenfeld hinzu, um das Diagramm anzuzeigen.","pivot.chart.emptyNoValue":"F\xFCgen Sie mindestens ein Wertefeld hinzu, um das Diagramm anzuzeigen.","pivot.chart.emptyNoData":"F\xFCr die aktuelle Diagrammauswahl sind keine Daten verf\xFCgbar.","pivot.chart.dimension":"Dimension","pivot.chart.primaryMeasure":"Kennzahl","pivot.chart.secondaryMeasure":"Vergleichskennzahl","pivot.chart.chartType":"Diagrammtyp","pivot.chart.style.barVertical":"Vertikale Balken","pivot.chart.style.barHorizontal":"Horizontale Balken","pivot.chart.style.line":"Linie","pivot.chart.style.scatter":"Streudiagramm","pivot.chart.collapse.ariaExpand":"Diagrammbereich erweitern","pivot.chart.collapse.ariaCollapse":"Diagrammbereich reduzieren","smartFilter.adaptFilters":"Filter anpassen","smartFilter.addFilters":"Filter hinzuf\xFCgen","smartFilter.go":"Los","smartFilter.visibleFilters":"Sichtbare Filter","smartFilter.searchPlaceholder":"Suchen...","smartFilter.noOptionsFound":"Keine Optionen gefunden","smartFilter.min":"Min","smartFilter.max":"Max","smartFilter.minMaxPlaceholder":"Min - Max","smartFilter.operator.equals":"Gleich","smartFilter.operator.contains":"Enth\xE4lt","smartFilter.operator.notContains":"Enth\xE4lt nicht","smartFilter.operator.wildcard":"Wildcard-Suche","smartFilter.operator.notEquals":"Ungleich","smartFilter.operator.greaterThan":"Gr\xF6\xDFer als","smartFilter.operator.lessThan":"Kleiner als","smartFilter.operator.greaterOrEqual":"Gr\xF6\xDFer gleich","smartFilter.operator.lessOrEqual":"Kleiner gleich","smartFilter.operator.between":"Zwischen","variant.noOptions":"Keine Optionen","variant.defaultSuffix":"Standard","variant.selectVariant":"Variante w\xE4hlen","variant.saveView":"Ansicht speichern","variant.newVariant":"Neue Variante","variant.viewName":"Ansichtsname","variant.setDefault":"Als Standard setzen","variant.publicAllUsers":"\xD6ffentlich (alle Benutzer)","variant.toast.fetchFailed":"Varianten konnten nicht geladen werden","variant.toast.saveFailed":"Variante konnte nicht gespeichert werden","variant.toast.saveSuccess":"Variante erfolgreich gespeichert","variant.toast.deleteFailed":"Variante konnte nicht gel\xF6scht werden","variant.toast.deleteSuccess":"Variante erfolgreich gel\xF6scht","variant.toast.defaultFailed":"Standardvariante konnte nicht aktualisiert werden","variant.toast.defaultSuccess":"Standardvariante aktualisiert","layout.saveLayout":"Layout speichern","layout.layoutOptions":"Layout-Optionen","layout.selectLayout":"Layout w\xE4hlen","layout.saveCurrentLayout":"Aktuelles Layout speichern...","layout.noSavedLayouts":"Keine gespeicherten Layouts","layout.removeDefault":"Standard entfernen","layout.setAsDefault":"Als Standard setzen","layout.layoutName":"Layoutname","layout.layoutDescription":"Beschreibung","layout.layoutNameHelper":"z. B. Kompaktansicht","layout.warningOverwrite":"Warnung: Vorhandenes Layout wird \xFCberschrieben","layout.useAsDefault":"Als Standardlayout verwenden","layout.publicAllUsers":"\xD6ffentlich (f\xFCr alle sichtbar)","layout.toast.loadFallback":"Layouts konnten nicht vom Backend geladen werden, Wechsel zu lokalem Speicher","layout.toast.saveSuccess":"Layout erfolgreich gespeichert","layout.toast.saveLocalSuccess":"Layout im lokalen Speicher gespeichert","layout.toast.backendUnavailableSavedLocal":"Backend nicht verf\xFCgbar, lokal gespeichert","layout.toast.deleteSuccess":"Layout erfolgreich gel\xF6scht","layout.toast.deleteLocalSuccess":"Layout aus lokalem Speicher gel\xF6scht","layout.toast.backendUnavailableDeletedLocal":"Backend nicht verf\xFCgbar, lokal gel\xF6scht","layout.toast.defaultSuccess":"Standardlayout gesetzt","layout.toast.defaultLocalSuccess":"Standardlayout lokal gesetzt","layout.toast.backendUnavailableDefaultLocal":"Backend nicht verf\xFCgbar, Standard lokal gespeichert","dateRange.label":"Datumsbereich","dateRange.startDate":"Startdatum","dateRange.endDate":"Enddatum","dateRange.select":"Ausw\xE4hlen...","dateRange.today":"Heute","dateRange.thisWeek":"Diese Woche","dateRange.thisMonth":"Diesen Monat","graph.records":"{count} Datens\xE4tze","graph.kpi.totalRecords":"Gesamt Datens\xE4tze","graph.kpi.totalReport":"Gesamt Report","graph.kpi.totalBillable":"Gesamt abrechenbar","graph.kpi.efficiency":"Effizienz","graph.kpi.amount":"Betrag","graph.kpi.flagged":"Markiert","graph.chart.billable.title":"Abrechenbar nach Dimension","graph.chart.billable.subtitle":"Top-Werte nach abrechenbaren Stunden","graph.chart.efficiency.title":"Effizienz pro Person","graph.chart.efficiency.subtitle":"Niedrigste Effizienz zuerst","graph.chart.status.title":"Statusverteilung","graph.chart.status.subtitle":"Anteil je Status","graph.dataBody":"Datentabelle","graph.reportTitle":"Grafikbericht","graph.unassigned":"Nicht zugewiesen","graph.column.reportHours":"Melde-Stunden","graph.column.billableHours":"Abrechenbare Stunden","detail.searchAi.placeholder":"Felder suchen, oder bei keinem Treffer die KI fragen...","detail.searchAi.matches":"{count} Treffer gefunden","detail.searchAi.noMatch":"Kein passendes Feld gefunden.","detail.searchAi.autoAiFallback":"Keine direkte \xDCbereinstimmung. KI-Analyse wird gestartet...","detail.searchAi.aiResultTitle":"KI-Ergebnis","detail.table.title":"Verkn\xFCpfte Eintr\xE4ge","kanban.empty":"Karten hier ablegen","kanban.bucket.limit":"Limit","kanban.bucket.dropHere":"Loslassen, um in diese Spalte zu verschieben","kanban.bucket.add":"Spalte hinzuf\xFCgen","kanban.bucket.rename":"Spalte umbenennen","kanban.bucket.saveRename":"Spaltennamen speichern","kanban.bucket.cancelRename":"Umbenennen abbrechen","kanban.search.placeholder":"Karten und Spalten durchsuchen","kanban.search.clear":"Suche l\xF6schen","kanban.search.results":"{count} passende Karten","kanban.search.noMatch":"Keine passenden Karten","kanban.card.progress":"Fortschritt","kanban.card.openDetail":"Detail \xF6ffnen","kanban.priority.critical":"Kritisch","kanban.priority.high":"Hoch","kanban.priority.medium":"Mittel","kanban.priority.low":"Niedrig","quickCreate.newItem":"Neuer Eintrag","quickCreate.createWithTitle":"{title} erstellen","quickEdit.editWithTitle":"{title} bearbeiten","quickDelete.confirmTitle":"L\xF6schen best\xE4tigen","quickDelete.confirmMessageSingle":"M\xF6chten Sie den ausgew\xE4hlten Datensatz wirklich l\xF6schen?","quickDelete.confirmMessageMultiple":"M\xF6chten Sie die {count} ausgew\xE4hlten Datens\xE4tze wirklich l\xF6schen?","cardPage.viewDetails":"Details anzeigen","cardPage.download":"Herunterladen","cardPage.close":"Schlie\xDFen","cardPage.empty":"Keine Eintr\xE4ge gefunden","messageBox.confirm":"OK","messageBox.cancel":"Abbrechen"},fb={"common.cancel":"\u30AD\u30E3\u30F3\u30BB\u30EB","common.save":"\u4FDD\u5B58","common.ok":"OK","common.done":"\u5B8C\u4E86","common.search":"\u691C\u7D22","common.none":"\u306A\u3057","common.all":"\u3059\u3079\u3066","common.noData":"\u30C7\u30FC\u30BF\u306A\u3057","common.copy":"\u30B3\u30D4\u30FC","common.delete":"\u524A\u9664","common.loading":"\u8AAD\u307F\u8FBC\u307F\u4E2D...","header.searchPlaceholder":"\u4F55\u304B\u805E\u3044\u3066\u304F\u3060\u3055\u3044...","header.searchAddFeature":"\u6A5F\u80FD\u3092\u8FFD\u52A0","header.searchStartVoice":"\u97F3\u58F0\u5165\u529B\u3092\u958B\u59CB","header.searchStopVoice":"\u97F3\u58F0\u5165\u529B\u3092\u505C\u6B62","header.searchOpenPanel":"\u4F1A\u8A71\u3092\u958B\u304F","header.theme.system":"\u30C6\u30FC\u30DE\uFF1A\u30B7\u30B9\u30C6\u30E0","header.theme.dark":"\u30C6\u30FC\u30DE\uFF1A\u30C0\u30FC\u30AF","header.theme.light":"\u30C6\u30FC\u30DE\uFF1A\u30E9\u30A4\u30C8","header.menu.setting":"\u8A2D\u5B9A","header.menu.refresh":"\u518D\u8AAD\u307F\u8FBC\u307F","header.menu.logout":"\u30ED\u30B0\u30A2\u30A6\u30C8","navigation.expand":"\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u3092\u5C55\u958B","navigation.collapse":"\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u3092\u6298\u308A\u305F\u305F\u3080","navigation.searchPlaceholder":"\u30E1\u30CB\u30E5\u30FC\u3092\u691C\u7D22...","navigation.noMatch":"\u4E00\u81F4\u3059\u308B\u30E1\u30CB\u30E5\u30FC\u304C\u3042\u308A\u307E\u305B\u3093","navigation.noAccessibleApp":"\u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u306A\u30A2\u30D7\u30EA\u304C\u3042\u308A\u307E\u305B\u3093","navigation.noItems":"\u8868\u793A\u3067\u304D\u308B\u9805\u76EE\u304C\u3042\u308A\u307E\u305B\u3093","navigation.expandView":"{title} \u3092\u5C55\u958B","navigation.mode.switchToFixed":"\u56FA\u5B9A\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u306B\u5207\u308A\u66FF\u3048","navigation.mode.switchToFloating":"\u30D5\u30ED\u30FC\u30C6\u30A3\u30F3\u30B0\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u306B\u5207\u308A\u66FF\u3048","navigation.pinned":"\u30D4\u30F3\u7559\u3081","navigation.pin.add":"\u4E0A\u90E8\u306B\u30D4\u30F3\u7559\u3081","navigation.pin.remove":"\u30D4\u30F3\u7559\u3081\u3092\u89E3\u9664","table.toolbar.searchPlaceholder":"\u691C\u7D22...","table.title.default":"\u30C7\u30FC\u30BF\u30C6\u30FC\u30D6\u30EB","table.toolbar.groupBy":"\u30B0\u30EB\u30FC\u30D7\u5316","table.toolbar.summary":"\u96C6\u8A08","table.toolbar.columns":"\u5217","table.toolbar.export":"\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8","table.toolbar.itemsPerPage":"1\u30DA\u30FC\u30B8\u306E\u4EF6\u6570\uFF1A","table.toolbar.pageOf":"{current} / {total} \u30DA\u30FC\u30B8","table.toolbar.newItem":"\u65B0\u898F\u4F5C\u6210","table.toolbar.editItem":"\u7DE8\u96C6","table.toolbar.deleteItem":"\u524A\u9664","table.toolbar.graphicReport":"\u30B0\u30E9\u30D5\u30A3\u30C3\u30AF\u30EC\u30DD\u30FC\u30C8","table.toolbar.saveLayout":"\u30EC\u30A4\u30A2\u30A6\u30C8\u4FDD\u5B58","table.menu.groupBy":"\u30B0\u30EB\u30FC\u30D7\u5316","table.menu.clearAll":"\u3059\u3079\u3066\u30AF\u30EA\u30A2","table.menu.visibleColumns":"\u8868\u793A\u5217","table.menu.showSummaryRow":"\u96C6\u8A08\u884C\u3092\u8868\u793A","table.menu.noNumericColumns":"\u6570\u5024\u5217\u304C\u3042\u308A\u307E\u305B\u3093","table.group.expandAll":"\u3059\u3079\u3066\u306E\u30B0\u30EB\u30FC\u30D7\u3092\u5C55\u958B","table.group.collapseAll":"\u3059\u3079\u3066\u306E\u30B0\u30EB\u30FC\u30D7\u3092\u6298\u308A\u305F\u305F\u3080","table.mobile.notImplemented":"\u30E2\u30D0\u30A4\u30EB\u8868\u793A\u306F\u672A\u5B9F\u88C5\u3067\u3059","table.headerMenu.sortAsc":"\u6607\u9806\u3067\u4E26\u3079\u66FF\u3048","table.headerMenu.sortDesc":"\u964D\u9806\u3067\u4E26\u3079\u66FF\u3048","table.headerMenu.clearSort":"\u4E26\u3079\u66FF\u3048\u3092\u89E3\u9664","table.headerMenu.configureSort":"\u4E26\u3079\u66FF\u3048\u3092\u8A2D\u5B9A...","table.headerMenu.group":"\u3053\u306E\u5217\u3067\u30B0\u30EB\u30FC\u30D7\u5316","table.headerMenu.ungroup":"\u30B0\u30EB\u30FC\u30D7\u304B\u3089\u5916\u3059","table.headerMenu.addSummary":"\u96C6\u8A08\u306B\u8FFD\u52A0","table.headerMenu.removeSummary":"\u96C6\u8A08\u304B\u3089\u524A\u9664","table.headerMenu.hideColumn":"\u5217\u3092\u975E\u8868\u793A","table.sortDialog.title":"\u4E26\u3079\u66FF\u3048\u8A2D\u5B9A","table.sortDialog.empty":"\u4E26\u3079\u66FF\u3048\u30EB\u30FC\u30EB\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002","table.sortDialog.addRule":"\u30EB\u30FC\u30EB\u3092\u8FFD\u52A0","table.sortDialog.clearAll":"\u3059\u3079\u3066\u30AF\u30EA\u30A2","table.sortDialog.asc":"\u6607\u9806","table.sortDialog.desc":"\u964D\u9806","pivot.title.default":"\u30D4\u30DC\u30C3\u30C8\u30C6\u30FC\u30D6\u30EB","pivot.subtitle.default":"\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u30D4\u30DC\u30C3\u30C8\u30C6\u30FC\u30D6\u30EB\u3092\u8A2D\u5B9A\u3057\u307E\u3059\u3002","pivot.empty":"\u7D50\u679C\u3092\u8868\u793A\u3059\u308B\u306B\u306F\u3001\u5024\u30A8\u30EA\u30A2\u306B\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002","pivot.records":"\u30EC\u30B3\u30FC\u30C9","pivot.afterFilter":"\u30D5\u30A3\u30EB\u30BF\u30FC\u5F8C","pivot.grandTotal":"\u7DCF\u8A08","pivot.resultLabel":"\u7D50\u679C","pivot.valueLabel":"\u5024","pivot.table.dimensions":"\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3","pivot.config.title":"\u8A2D\u5B9A","pivot.fieldList":"\u30D5\u30A3\u30FC\u30EB\u30C9\u4E00\u89A7","pivot.availableDimensions":"\u5229\u7528\u53EF\u80FD\u306A\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3","pivot.allFieldsInUse":"\u3059\u3079\u3066\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u304C\u4F7F\u7528\u4E2D\u3067\u3059\u3002","pivot.zone.rows":"\u884C","pivot.zone.columns":"\u5217","pivot.zone.filters":"\u30D5\u30A3\u30EB\u30BF\u30FC","pivot.zone.values":"\u5024","pivot.hint.rows":"\u3053\u3053\u306B\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u884C\u968E\u5C64\u3092\u4F5C\u6210","pivot.hint.columns":"\u3053\u3053\u306B\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u5217\u968E\u5C64\u3092\u4F5C\u6210","pivot.hint.filters":"\u3053\u3053\u306B\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u30EC\u30DD\u30FC\u30C8\u30D5\u30A3\u30EB\u30BF\u30FC\u3092\u8A2D\u5B9A","pivot.hint.values":"\u3053\u3053\u306B\u6570\u5024\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u96C6\u8A08","pivot.clearArea":"\u30A8\u30EA\u30A2\u3092\u30AF\u30EA\u30A2","pivot.filter.na":"N/A","pivot.filter.noValues":"\u5024\u304C\u3042\u308A\u307E\u305B\u3093","pivot.filter.noneSelected":"\u672A\u9078\u629E","pivot.filter.allValues":"\u3059\u3079\u3066\u306E\u5024","pivot.filter.selectedCount":"{selected} / {total} \u3092\u9078\u629E","pivot.filter.selectAll":"\u3059\u3079\u3066\u9078\u629E","pivot.filter.deselectAll":"\u3059\u3079\u3066\u89E3\u9664","pivot.filter.noResults":"\u7D50\u679C\u304C\u3042\u308A\u307E\u305B\u3093","pivot.collapse.ariaExpand":"\u8A2D\u5B9A\u30A8\u30EA\u30A2\u3092\u5C55\u958B","pivot.collapse.ariaCollapse":"\u8A2D\u5B9A\u30A8\u30EA\u30A2\u3092\u6298\u308A\u305F\u305F\u3080","pivot.agg.sum":"\u5408\u8A08","pivot.agg.count":"\u4EF6\u6570","pivot.agg.avg":"\u5E73\u5747","pivot.agg.min":"\u6700\u5C0F","pivot.agg.max":"\u6700\u5927","pivot.preset.selectPlaceholder":"\u30D7\u30EA\u30BB\u30C3\u30C8\u3092\u9078\u629E","pivot.preset.save":"\u30D7\u30EA\u30BB\u30C3\u30C8\u3092\u4FDD\u5B58","pivot.preset.delete":"\u30D7\u30EA\u30BB\u30C3\u30C8\u3092\u524A\u9664","pivot.preset.saveDialogTitle":"\u73FE\u5728\u306E\u30D7\u30EA\u30BB\u30C3\u30C8\u3092\u4FDD\u5B58","pivot.preset.nameLabel":"\u30D7\u30EA\u30BB\u30C3\u30C8\u540D","pivot.preset.defaultName":"\u30D7\u30EA\u30BB\u30C3\u30C8 {index}","pivot.table.sectionTitle":"\u30D4\u30DC\u30C3\u30C8\u7D50\u679C","pivot.table.expandRowsAll":"Expand rows","pivot.table.collapseRowsAll":"Collapse rows","pivot.table.expandColumnsAll":"Expand columns","pivot.table.collapseColumnsAll":"Collapse columns","pivot.table.collapse.ariaExpand":"\u30D4\u30DC\u30C3\u30C8\u7D50\u679C\u3092\u5C55\u958B","pivot.table.collapse.ariaCollapse":"\u30D4\u30DC\u30C3\u30C8\u7D50\u679C\u3092\u6298\u308A\u305F\u305F\u3080","pivot.chart.title":"\u30D4\u30DC\u30C3\u30C8\u30C1\u30E3\u30FC\u30C8","pivot.chart.subtitle":"1\u3064\u306E\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3\u3068\u6700\u59272\u3064\u306E\u6307\u6A19\u3092\u30B3\u30F3\u30D1\u30AF\u30C8\u306A\u30C1\u30E3\u30FC\u30C8\u306B\u307E\u3068\u3081\u307E\u3059\u3002","pivot.chart.subtitleReady":"{dimension} \u3054\u3068\u306E {measure}","pivot.chart.emptyNoDimension":"\u30C1\u30E3\u30FC\u30C8\u3092\u8868\u793A\u3059\u308B\u306B\u306F\u3001\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u884C\u307E\u305F\u306F\u5217\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002","pivot.chart.emptyNoValue":"\u30C1\u30E3\u30FC\u30C8\u3092\u8868\u793A\u3059\u308B\u306B\u306F\u3001\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u5024\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002","pivot.chart.emptyNoData":"\u73FE\u5728\u306E\u30C1\u30E3\u30FC\u30C8\u9078\u629E\u3067\u306F\u8868\u793A\u3067\u304D\u308B\u30C7\u30FC\u30BF\u304C\u3042\u308A\u307E\u305B\u3093\u3002","pivot.chart.dimension":"\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3","pivot.chart.primaryMeasure":"\u6307\u6A19","pivot.chart.secondaryMeasure":"\u6BD4\u8F03\u6307\u6A19","pivot.chart.chartType":"\u30C1\u30E3\u30FC\u30C8\u7A2E\u5225","pivot.chart.style.barVertical":"\u7E26\u68D2\u30B0\u30E9\u30D5","pivot.chart.style.barHorizontal":"\u6A2A\u68D2\u30B0\u30E9\u30D5","pivot.chart.style.line":"\u6298\u308C\u7DDA\u30B0\u30E9\u30D5","pivot.chart.style.scatter":"\u6563\u5E03\u56F3","pivot.chart.collapse.ariaExpand":"\u30C1\u30E3\u30FC\u30C8\u9818\u57DF\u3092\u5C55\u958B","pivot.chart.collapse.ariaCollapse":"\u30C1\u30E3\u30FC\u30C8\u9818\u57DF\u3092\u6298\u308A\u305F\u305F\u3080","smartFilter.adaptFilters":"\u30D5\u30A3\u30EB\u30BF\u30FC\u8ABF\u6574","smartFilter.addFilters":"\u30D5\u30A3\u30EB\u30BF\u30FC\u8FFD\u52A0","smartFilter.go":"\u5B9F\u884C","smartFilter.visibleFilters":"\u8868\u793A\u30D5\u30A3\u30EB\u30BF\u30FC","smartFilter.searchPlaceholder":"\u691C\u7D22...","smartFilter.noOptionsFound":"\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093","smartFilter.min":"\u6700\u5C0F","smartFilter.max":"\u6700\u5927","smartFilter.minMaxPlaceholder":"\u6700\u5C0F - \u6700\u5927","smartFilter.operator.equals":"\u7B49\u3057\u3044","smartFilter.operator.contains":"\u542B\u3080","smartFilter.operator.notContains":"\u542B\u307E\u306A\u3044","smartFilter.operator.wildcard":"\u30EF\u30A4\u30EB\u30C9\u30AB\u30FC\u30C9\u691C\u7D22","smartFilter.operator.notEquals":"\u7B49\u3057\u304F\u306A\u3044","smartFilter.operator.greaterThan":"\u3088\u308A\u5927\u304D\u3044","smartFilter.operator.lessThan":"\u3088\u308A\u5C0F\u3055\u3044","smartFilter.operator.greaterOrEqual":"\u4EE5\u4E0A","smartFilter.operator.lessOrEqual":"\u4EE5\u4E0B","smartFilter.operator.between":"\u7BC4\u56F2","variant.noOptions":"\u30AA\u30D7\u30B7\u30E7\u30F3\u306A\u3057","variant.defaultSuffix":"\u30C7\u30D5\u30A9\u30EB\u30C8","variant.selectVariant":"\u30D3\u30E5\u30FC\u3092\u9078\u629E","variant.saveView":"\u30D3\u30E5\u30FC\u4FDD\u5B58","variant.newVariant":"\u65B0\u3057\u3044\u30D3\u30E5\u30FC","variant.viewName":"\u30D3\u30E5\u30FC\u540D","variant.setDefault":"\u30C7\u30D5\u30A9\u30EB\u30C8\u306B\u8A2D\u5B9A","variant.publicAllUsers":"\u516C\u958B\uFF08\u5168\u30E6\u30FC\u30B6\u30FC\uFF09","variant.toast.fetchFailed":"\u30D3\u30E5\u30FC\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F","variant.toast.saveFailed":"\u30D3\u30E5\u30FC\u306E\u4FDD\u5B58\u306B\u5931\u6557\u3057\u307E\u3057\u305F","variant.toast.saveSuccess":"\u30D3\u30E5\u30FC\u3092\u4FDD\u5B58\u3057\u307E\u3057\u305F","variant.toast.deleteFailed":"\u30D3\u30E5\u30FC\u306E\u524A\u9664\u306B\u5931\u6557\u3057\u307E\u3057\u305F","variant.toast.deleteSuccess":"\u30D3\u30E5\u30FC\u3092\u524A\u9664\u3057\u307E\u3057\u305F","variant.toast.defaultFailed":"\u30C7\u30D5\u30A9\u30EB\u30C8\u30D3\u30E5\u30FC\u306E\u66F4\u65B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F","variant.toast.defaultSuccess":"\u30C7\u30D5\u30A9\u30EB\u30C8\u30D3\u30E5\u30FC\u3092\u66F4\u65B0\u3057\u307E\u3057\u305F","layout.saveLayout":"\u30EC\u30A4\u30A2\u30A6\u30C8\u4FDD\u5B58","layout.layoutOptions":"\u30EC\u30A4\u30A2\u30A6\u30C8\u30AA\u30D7\u30B7\u30E7\u30F3","layout.selectLayout":"\u30EC\u30A4\u30A2\u30A6\u30C8\u9078\u629E","layout.saveCurrentLayout":"\u73FE\u5728\u306E\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u4FDD\u5B58...","layout.noSavedLayouts":"\u4FDD\u5B58\u6E08\u307F\u30EC\u30A4\u30A2\u30A6\u30C8\u306A\u3057","layout.removeDefault":"\u30C7\u30D5\u30A9\u30EB\u30C8\u89E3\u9664","layout.setAsDefault":"\u30C7\u30D5\u30A9\u30EB\u30C8\u306B\u8A2D\u5B9A","layout.layoutName":"\u30EC\u30A4\u30A2\u30A6\u30C8\u540D","layout.layoutDescription":"\u8AAC\u660E","layout.layoutNameHelper":"\u4F8B\uFF1A\u30B3\u30F3\u30D1\u30AF\u30C8\u8868\u793A","layout.warningOverwrite":"\u8B66\u544A\uFF1A\u65E2\u5B58\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u4E0A\u66F8\u304D\u3057\u307E\u3059","layout.useAsDefault":"\u30C7\u30D5\u30A9\u30EB\u30C8\u30EC\u30A4\u30A2\u30A6\u30C8\u3068\u3057\u3066\u4F7F\u7528","layout.publicAllUsers":"\u516C\u958B\uFF08\u5168\u30E6\u30FC\u30B6\u30FC\u306B\u8868\u793A\uFF09","layout.toast.loadFallback":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9\u304B\u3089\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u3001\u30ED\u30FC\u30AB\u30EB\u4FDD\u5B58\u306B\u5207\u308A\u66FF\u3048\u307E\u3057\u305F","layout.toast.saveSuccess":"\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u4FDD\u5B58\u3057\u307E\u3057\u305F","layout.toast.saveLocalSuccess":"\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u30ED\u30FC\u30AB\u30EB\u4FDD\u5B58\u3057\u307E\u3057\u305F","layout.toast.backendUnavailableSavedLocal":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9\u672A\u63A5\u7D9A\u306E\u305F\u3081\u30ED\u30FC\u30AB\u30EB\u306B\u4FDD\u5B58\u3057\u307E\u3057\u305F","layout.toast.deleteSuccess":"\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u524A\u9664\u3057\u307E\u3057\u305F","layout.toast.deleteLocalSuccess":"\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u30ED\u30FC\u30AB\u30EB\u304B\u3089\u524A\u9664\u3057\u307E\u3057\u305F","layout.toast.backendUnavailableDeletedLocal":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9\u672A\u63A5\u7D9A\u306E\u305F\u3081\u30ED\u30FC\u30AB\u30EB\u304B\u3089\u524A\u9664\u3057\u307E\u3057\u305F","layout.toast.defaultSuccess":"\u30C7\u30D5\u30A9\u30EB\u30C8\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u8A2D\u5B9A\u3057\u307E\u3057\u305F","layout.toast.defaultLocalSuccess":"\u30C7\u30D5\u30A9\u30EB\u30C8\u30EC\u30A4\u30A2\u30A6\u30C8\u3092\u30ED\u30FC\u30AB\u30EB\u306B\u8A2D\u5B9A\u3057\u307E\u3057\u305F","layout.toast.backendUnavailableDefaultLocal":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9\u672A\u63A5\u7D9A\u306E\u305F\u3081\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u30ED\u30FC\u30AB\u30EB\u4FDD\u5B58\u3057\u307E\u3057\u305F","dateRange.label":"\u65E5\u4ED8\u7BC4\u56F2","dateRange.startDate":"\u958B\u59CB\u65E5","dateRange.endDate":"\u7D42\u4E86\u65E5","dateRange.select":"\u9078\u629E...","dateRange.today":"\u4ECA\u65E5","dateRange.thisWeek":"\u4ECA\u9031","dateRange.thisMonth":"\u4ECA\u6708","graph.records":"{count} \u4EF6","graph.kpi.totalRecords":"\u7DCF\u30EC\u30B3\u30FC\u30C9","graph.kpi.totalReport":"\u7DCF\u5831\u544A\u6642\u9593","graph.kpi.totalBillable":"\u7DCF\u8ACB\u6C42\u53EF\u80FD\u6642\u9593","graph.kpi.efficiency":"\u52B9\u7387","graph.kpi.amount":"\u91D1\u984D","graph.kpi.flagged":"\u8981\u78BA\u8A8D","graph.chart.billable.title":"\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3\u5225\u8ACB\u6C42\u53EF\u80FD\u6642\u9593","graph.chart.billable.subtitle":"\u8ACB\u6C42\u53EF\u80FD\u6642\u9593\u306E\u4E0A\u4F4D","graph.chart.efficiency.title":"\u62C5\u5F53\u8005\u5225\u52B9\u7387","graph.chart.efficiency.subtitle":"\u52B9\u7387\u306E\u4F4E\u3044\u9806","graph.chart.status.title":"\u30B9\u30C6\u30FC\u30BF\u30B9\u5206\u5E03","graph.chart.status.subtitle":"\u30B9\u30C6\u30FC\u30BF\u30B9\u5225\u6BD4\u7387","graph.dataBody":"\u30C7\u30FC\u30BF\u672C\u4F53","graph.reportTitle":"\u30B0\u30E9\u30D5\u30A3\u30C3\u30AF\u30EC\u30DD\u30FC\u30C8","graph.unassigned":"\u672A\u5272\u308A\u5F53\u3066","graph.column.reportHours":"\u5831\u544A\u6642\u9593","graph.column.billableHours":"\u8ACB\u6C42\u53EF\u80FD\u6642\u9593","detail.searchAi.placeholder":"\u9805\u76EE\u3092\u691C\u7D22\u3002\u898B\u3064\u304B\u3089\u306A\u3044\u5834\u5408\u306FAI\u306B\u8CEA\u554F\u3057\u307E\u3059...","detail.searchAi.matches":"{count} \u4EF6\u306E\u4E00\u81F4","detail.searchAi.noMatch":"\u4E00\u81F4\u3059\u308B\u9805\u76EE\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002","detail.searchAi.autoAiFallback":"\u4E00\u81F4\u306A\u3057\u3002AI\u5206\u6790\u3092\u5B9F\u884C\u3057\u307E\u3059...","detail.searchAi.aiResultTitle":"AI\u5206\u6790\u7D50\u679C","detail.table.title":"\u95A2\u9023\u30EC\u30B3\u30FC\u30C9","kanban.empty":"\u3053\u3053\u306B\u30AB\u30FC\u30C9\u3092\u30C9\u30ED\u30C3\u30D7","kanban.bucket.limit":"\u4E0A\u9650","kanban.bucket.dropHere":"\u96E2\u3059\u3068\u3053\u306E bucket \u306B\u79FB\u52D5\u3057\u307E\u3059","kanban.bucket.add":"bucket \u3092\u8FFD\u52A0","kanban.bucket.rename":"bucket \u540D\u3092\u5909\u66F4","kanban.bucket.saveRename":"bucket \u540D\u3092\u4FDD\u5B58","kanban.bucket.cancelRename":"\u540D\u524D\u5909\u66F4\u3092\u30AD\u30E3\u30F3\u30BB\u30EB","kanban.search.placeholder":"\u30AB\u30FC\u30C9\u3068 bucket \u3092\u691C\u7D22","kanban.search.clear":"\u691C\u7D22\u3092\u30AF\u30EA\u30A2","kanban.search.results":"{count} \u4EF6\u306E\u30AB\u30FC\u30C9\u304C\u4E00\u81F4","kanban.search.noMatch":"\u4E00\u81F4\u3059\u308B\u30AB\u30FC\u30C9\u306F\u3042\u308A\u307E\u305B\u3093","kanban.card.progress":"\u9032\u6357","kanban.card.openDetail":"\u8A73\u7D30\u3092\u958B\u304F","kanban.priority.critical":"\u7DCA\u6025","kanban.priority.high":"\u9AD8","kanban.priority.medium":"\u4E2D","kanban.priority.low":"\u4F4E","quickCreate.newItem":"\u65B0\u898F\u4F5C\u6210","quickCreate.createWithTitle":"{title} \u3092\u4F5C\u6210","quickEdit.editWithTitle":"{title} \u3092\u7DE8\u96C6","quickDelete.confirmTitle":"\u524A\u9664\u306E\u78BA\u8A8D","quickDelete.confirmMessageSingle":"\u9078\u629E\u3057\u305F\u30EC\u30B3\u30FC\u30C9\u3092\u524A\u9664\u3057\u3066\u3082\u3088\u308D\u3057\u3044\u3067\u3059\u304B\uFF1F","quickDelete.confirmMessageMultiple":"\u9078\u629E\u3057\u305F {count} \u4EF6\u306E\u30EC\u30B3\u30FC\u30C9\u3092\u524A\u9664\u3057\u3066\u3082\u3088\u308D\u3057\u3044\u3067\u3059\u304B\uFF1F","cardPage.viewDetails":"\u8A73\u7D30\u3092\u8868\u793A","cardPage.download":"\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9","cardPage.close":"\u9589\u3058\u308B","cardPage.empty":"\u9805\u76EE\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093","messageBox.confirm":"OK","messageBox.cancel":"\u30AD\u30E3\u30F3\u30BB\u30EB"},bb={"common.cancel":"\uCDE8\uC18C","common.save":"\uC800\uC7A5","common.ok":"\uD655\uC778","common.done":"\uC644\uB8CC","common.search":"\uAC80\uC0C9","common.none":"\uC5C6\uC74C","common.all":"\uC804\uCCB4","common.noData":"\uB370\uC774\uD130 \uC5C6\uC74C","common.copy":"\uBCF5\uC0AC","common.delete":"\uC0AD\uC81C","common.loading":"\uB85C\uB529 \uC911...","header.searchPlaceholder":"\uBB34\uC5C7\uC774\uB4E0 \uBB3C\uC5B4\uBCF4\uC138\uC694...","header.searchAddFeature":"\uAE30\uB2A5 \uCD94\uAC00","header.searchStartVoice":"\uC74C\uC131 \uC785\uB825 \uC2DC\uC791","header.searchStopVoice":"\uC74C\uC131 \uC785\uB825 \uC911\uC9C0","header.searchOpenPanel":"\uB300\uD654 \uC5F4\uAE30","header.theme.system":"\uD14C\uB9C8: \uC2DC\uC2A4\uD15C","header.theme.dark":"\uD14C\uB9C8: \uB2E4\uD06C","header.theme.light":"\uD14C\uB9C8: \uB77C\uC774\uD2B8","header.menu.setting":"\uC124\uC815","header.menu.refresh":"\uC0C8\uB85C \uACE0\uCE68","header.menu.logout":"\uB85C\uADF8\uC544\uC6C3","navigation.expand":"\uD0D0\uC0C9 \uD3BC\uCE58\uAE30","navigation.collapse":"\uD0D0\uC0C9 \uC811\uAE30","navigation.searchPlaceholder":"\uBA54\uB274 \uAC80\uC0C9...","navigation.noMatch":"\uC77C\uCE58\uD558\uB294 \uBA54\uB274\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4","navigation.noAccessibleApp":"\uC811\uADFC \uAC00\uB2A5\uD55C \uC571\uC774 \uC5C6\uC2B5\uB2C8\uB2E4","navigation.noItems":"\uD45C\uC2DC\uD560 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4","navigation.expandView":"{title} \uD3BC\uCE58\uAE30","navigation.mode.switchToFixed":"\uACE0\uC815 \uD0D0\uC0C9\uC73C\uB85C \uC804\uD658","navigation.mode.switchToFloating":"\uD50C\uB85C\uD305 \uD0D0\uC0C9\uC73C\uB85C \uC804\uD658","navigation.pinned":"\uACE0\uC815\uB428","navigation.pin.add":"\uC0C1\uB2E8\uC5D0 \uACE0\uC815","navigation.pin.remove":"\uACE0\uC815 \uD574\uC81C","table.toolbar.searchPlaceholder":"\uAC80\uC0C9...","table.title.default":"\uB370\uC774\uD130 \uD14C\uC774\uBE14","table.toolbar.groupBy":"\uADF8\uB8F9","table.toolbar.summary":"\uC694\uC57D","table.toolbar.columns":"\uC5F4","table.toolbar.export":"\uB0B4\uBCF4\uB0B4\uAE30","table.toolbar.itemsPerPage":"\uD398\uC774\uC9C0\uB2F9 \uD589 \uC218:","table.toolbar.pageOf":"{current} / {total} \uD398\uC774\uC9C0","table.toolbar.newItem":"\uC2E0\uADDC \uD56D\uBAA9","table.toolbar.editItem":"\uD56D\uBAA9 \uC218\uC815","table.toolbar.deleteItem":"\uD56D\uBAA9 \uC0AD\uC81C","table.toolbar.graphicReport":"\uADF8\uB798\uD504 \uB9AC\uD3EC\uD2B8","table.toolbar.saveLayout":"\uB808\uC774\uC544\uC6C3 \uC800\uC7A5","table.menu.groupBy":"\uADF8\uB8F9","table.menu.clearAll":"\uBAA8\uB450 \uC9C0\uC6B0\uAE30","table.menu.visibleColumns":"\uD45C\uC2DC \uC5F4","table.menu.showSummaryRow":"\uC694\uC57D \uD589 \uD45C\uC2DC","table.menu.noNumericColumns":"\uC22B\uC790 \uC5F4 \uC5C6\uC74C","table.group.expandAll":"\uBAA8\uB4E0 \uADF8\uB8F9 \uD3BC\uCE58\uAE30","table.group.collapseAll":"\uBAA8\uB4E0 \uADF8\uB8F9 \uC811\uAE30","table.mobile.notImplemented":"\uBAA8\uBC14\uC77C \uBDF0\uB294 \uC544\uC9C1 \uAD6C\uD604\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4","table.headerMenu.sortAsc":"\uC624\uB984\uCC28\uC21C \uC815\uB82C","table.headerMenu.sortDesc":"\uB0B4\uB9BC\uCC28\uC21C \uC815\uB82C","table.headerMenu.clearSort":"\uC815\uB82C \uD574\uC81C","table.headerMenu.configureSort":"\uC815\uB82C \uC124\uC815...","table.headerMenu.group":"\uC774 \uC5F4\uB85C \uADF8\uB8F9\uD654","table.headerMenu.ungroup":"\uADF8\uB8F9\uC5D0\uC11C \uC81C\uAC70","table.headerMenu.addSummary":"\uC694\uC57D\uC5D0 \uCD94\uAC00","table.headerMenu.removeSummary":"\uC694\uC57D\uC5D0\uC11C \uC81C\uAC70","table.headerMenu.hideColumn":"\uC5F4 \uC228\uAE30\uAE30","table.sortDialog.title":"\uC815\uB82C \uC124\uC815","table.sortDialog.empty":"\uC815\uB82C \uADDC\uCE59\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. \uCD94\uAC00\uD558\uC138\uC694.","table.sortDialog.addRule":"\uADDC\uCE59 \uCD94\uAC00","table.sortDialog.clearAll":"\uBAA8\uB450 \uC9C0\uC6B0\uAE30","table.sortDialog.asc":"\uC624\uB984\uCC28\uC21C","table.sortDialog.desc":"\uB0B4\uB9BC\uCC28\uC21C","pivot.title.default":"\uD53C\uBC97 \uD14C\uC774\uBE14","pivot.subtitle.default":"\uD544\uB4DC\uB97C \uB4DC\uB798\uADF8\uD558\uC5EC \uD53C\uBC97 \uD14C\uC774\uBE14\uC744 \uAD6C\uC131\uD558\uC138\uC694.","pivot.empty":"\uACB0\uACFC\uB97C \uBCF4\uB824\uBA74 \uAC12 \uC601\uC5ED\uC5D0 \uCD5C\uC18C \uD55C \uAC1C\uC758 \uD544\uB4DC\uB97C \uCD94\uAC00\uD558\uC138\uC694.","pivot.records":"\uB808\uCF54\uB4DC","pivot.afterFilter":"\uD544\uD130 \uD6C4","pivot.grandTotal":"\uCD1D\uD569","pivot.resultLabel":"\uACB0\uACFC","pivot.valueLabel":"\uAC12","pivot.table.dimensions":"\uCC28\uC6D0","pivot.config.title":"\uAD6C\uC131","pivot.fieldList":"\uD544\uB4DC \uBAA9\uB85D","pivot.availableDimensions":"\uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uCC28\uC6D0","pivot.allFieldsInUse":"\uBAA8\uB4E0 \uD544\uB4DC\uAC00 \uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC785\uB2C8\uB2E4.","pivot.zone.rows":"\uD589","pivot.zone.columns":"\uC5F4","pivot.zone.filters":"\uD544\uD130","pivot.zone.values":"\uAC12","pivot.hint.rows":"\uC5EC\uAE30\uC5D0 \uD544\uB4DC\uB97C \uB4DC\uB798\uADF8\uD558\uC5EC \uD589 \uACC4\uCE35\uC744 \uAD6C\uC131","pivot.hint.columns":"\uC5EC\uAE30\uC5D0 \uD544\uB4DC\uB97C \uB4DC\uB798\uADF8\uD558\uC5EC \uC5F4 \uACC4\uCE35\uC744 \uAD6C\uC131","pivot.hint.filters":"\uC5EC\uAE30\uC5D0 \uD544\uB4DC\uB97C \uB4DC\uB798\uADF8\uD558\uC5EC \uBCF4\uACE0\uC11C \uD544\uD130\uB85C \uC0AC\uC6A9","pivot.hint.values":"\uC22B\uC790 \uD544\uB4DC\uB97C \uC5EC\uAE30\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC9D1\uACC4","pivot.clearArea":"\uC601\uC5ED \uBE44\uC6B0\uAE30","pivot.filter.na":"\uD574\uB2F9 \uC5C6\uC74C","pivot.filter.noValues":"\uAC12 \uC5C6\uC74C","pivot.filter.noneSelected":"\uC120\uD0DD \uC5C6\uC74C","pivot.filter.allValues":"\uBAA8\uB4E0 \uAC12","pivot.filter.selectedCount":"{selected} / {total} \uC120\uD0DD\uB428","pivot.filter.selectAll":"\uC804\uCCB4 \uC120\uD0DD","pivot.filter.deselectAll":"\uC804\uCCB4 \uD574\uC81C","pivot.filter.noResults":"\uAC80\uC0C9 \uACB0\uACFC \uC5C6\uC74C","pivot.collapse.ariaExpand":"\uAD6C\uC131 \uC601\uC5ED \uD3BC\uCE58\uAE30","pivot.collapse.ariaCollapse":"\uAD6C\uC131 \uC601\uC5ED \uC811\uAE30","pivot.agg.sum":"\uD569\uACC4","pivot.agg.count":"\uAC1C\uC218","pivot.agg.avg":"\uD3C9\uADE0","pivot.agg.min":"\uCD5C\uC18C","pivot.agg.max":"\uCD5C\uB300","pivot.preset.selectPlaceholder":"\uD504\uB9AC\uC14B \uC120\uD0DD","pivot.preset.save":"\uD504\uB9AC\uC14B \uC800\uC7A5","pivot.preset.delete":"\uD504\uB9AC\uC14B \uC0AD\uC81C","pivot.preset.saveDialogTitle":"\uD604\uC7AC \uD504\uB9AC\uC14B \uC800\uC7A5","pivot.preset.nameLabel":"\uD504\uB9AC\uC14B \uC774\uB984","pivot.preset.defaultName":"\uD504\uB9AC\uC14B {index}","pivot.table.sectionTitle":"\uD53C\uBC97 \uACB0\uACFC","pivot.table.expandRowsAll":"Expand rows","pivot.table.collapseRowsAll":"Collapse rows","pivot.table.expandColumnsAll":"Expand columns","pivot.table.collapseColumnsAll":"Collapse columns","pivot.table.collapse.ariaExpand":"\uD53C\uBC97 \uACB0\uACFC \uD3BC\uCE58\uAE30","pivot.table.collapse.ariaCollapse":"\uD53C\uBC97 \uACB0\uACFC \uC811\uAE30","pivot.chart.title":"\uD53C\uBC97 \uCC28\uD2B8","pivot.chart.subtitle":"\uD558\uB098\uC758 \uCC28\uC6D0\uACFC \uCD5C\uB300 \uB450 \uAC1C\uC758 \uCE21\uC815\uAC12\uC744 \uAC04\uACB0\uD55C \uCC28\uD2B8\uB85C \uD45C\uC2DC\uD569\uB2C8\uB2E4.","pivot.chart.subtitleReady":"{dimension}\uBCC4 {measure}","pivot.chart.emptyNoDimension":"\uCC28\uD2B8\uB97C \uBCF4\uB824\uBA74 \uCD5C\uC18C \uD55C \uAC1C\uC758 \uD589 \uB610\uB294 \uC5F4 \uD544\uB4DC\uB97C \uCD94\uAC00\uD558\uC138\uC694.","pivot.chart.emptyNoValue":"\uCC28\uD2B8\uB97C \uBCF4\uB824\uBA74 \uCD5C\uC18C \uD55C \uAC1C\uC758 \uAC12 \uD544\uB4DC\uB97C \uCD94\uAC00\uD558\uC138\uC694.","pivot.chart.emptyNoData":"\uD604\uC7AC \uCC28\uD2B8 \uC120\uD0DD\uC5D0 \uD45C\uC2DC\uD560 \uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.","pivot.chart.dimension":"\uCC28\uD2B8 \uCC28\uC6D0","pivot.chart.primaryMeasure":"\uC8FC \uCE21\uC815\uAC12","pivot.chart.secondaryMeasure":"\uBE44\uAD50 \uCE21\uC815\uAC12","pivot.chart.chartType":"\uCC28\uD2B8 \uC720\uD615","pivot.chart.style.barVertical":"\uC138\uB85C \uB9C9\uB300","pivot.chart.style.barHorizontal":"\uAC00\uB85C \uB9C9\uB300","pivot.chart.style.line":"\uC120\uD615 \uCC28\uD2B8","pivot.chart.style.scatter":"\uC0B0\uC810\uB3C4","pivot.chart.collapse.ariaExpand":"\uCC28\uD2B8 \uC601\uC5ED \uD3BC\uCE58\uAE30","pivot.chart.collapse.ariaCollapse":"\uCC28\uD2B8 \uC601\uC5ED \uC811\uAE30","smartFilter.adaptFilters":"\uD544\uD130 \uC870\uC815","smartFilter.addFilters":"\uD544\uD130 \uCD94\uAC00","smartFilter.go":"\uC2E4\uD589","smartFilter.visibleFilters":"\uD45C\uC2DC \uD544\uD130","smartFilter.searchPlaceholder":"\uAC80\uC0C9...","smartFilter.noOptionsFound":"\uC635\uC158\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4","smartFilter.min":"\uCD5C\uC18C","smartFilter.max":"\uCD5C\uB300","smartFilter.minMaxPlaceholder":"\uCD5C\uC18C - \uCD5C\uB300","smartFilter.operator.equals":"\uAC19\uC74C","smartFilter.operator.contains":"\uD3EC\uD568","smartFilter.operator.notContains":"\uBBF8\uD3EC\uD568","smartFilter.operator.wildcard":"\uC640\uC77C\uB4DC\uCE74\uB4DC \uAC80\uC0C9","smartFilter.operator.notEquals":"\uAC19\uC9C0 \uC54A\uC74C","smartFilter.operator.greaterThan":"\uBCF4\uB2E4 \uD07C","smartFilter.operator.lessThan":"\uBCF4\uB2E4 \uC791\uC74C","smartFilter.operator.greaterOrEqual":"\uC774\uC0C1","smartFilter.operator.lessOrEqual":"\uC774\uD558","smartFilter.operator.between":"\uBC94\uC704","variant.noOptions":"\uC635\uC158 \uC5C6\uC74C","variant.defaultSuffix":"\uAE30\uBCF8","variant.selectVariant":"\uBDF0 \uC120\uD0DD","variant.saveView":"\uBDF0 \uC800\uC7A5","variant.newVariant":"\uC0C8 \uBDF0","variant.viewName":"\uBDF0 \uC774\uB984","variant.setDefault":"\uAE30\uBCF8\uC73C\uB85C \uC124\uC815","variant.publicAllUsers":"\uACF5\uAC1C(\uC804\uCCB4 \uC0AC\uC6A9\uC790)","variant.toast.fetchFailed":"\uBDF0\uB97C \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4","variant.toast.saveFailed":"\uBDF0\uB97C \uC800\uC7A5\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4","variant.toast.saveSuccess":"\uBDF0\uAC00 \uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4","variant.toast.deleteFailed":"\uBDF0\uB97C \uC0AD\uC81C\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4","variant.toast.deleteSuccess":"\uBDF0\uAC00 \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4","variant.toast.defaultFailed":"\uAE30\uBCF8 \uBDF0\uB97C \uC5C5\uB370\uC774\uD2B8\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4","variant.toast.defaultSuccess":"\uAE30\uBCF8 \uBDF0\uAC00 \uC5C5\uB370\uC774\uD2B8\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.saveLayout":"\uB808\uC774\uC544\uC6C3 \uC800\uC7A5","layout.layoutOptions":"\uB808\uC774\uC544\uC6C3 \uC635\uC158","layout.selectLayout":"\uB808\uC774\uC544\uC6C3 \uC120\uD0DD","layout.saveCurrentLayout":"\uD604\uC7AC \uB808\uC774\uC544\uC6C3 \uC800\uC7A5...","layout.noSavedLayouts":"\uC800\uC7A5\uB41C \uB808\uC774\uC544\uC6C3 \uC5C6\uC74C","layout.removeDefault":"\uAE30\uBCF8 \uD574\uC81C","layout.setAsDefault":"\uAE30\uBCF8\uC73C\uB85C \uC124\uC815","layout.layoutName":"\uB808\uC774\uC544\uC6C3 \uC774\uB984","layout.layoutDescription":"\uC124\uBA85","layout.layoutNameHelper":"\uC608: \uCEF4\uD329\uD2B8 \uBDF0","layout.warningOverwrite":"\uACBD\uACE0: \uAE30\uC874 \uB808\uC774\uC544\uC6C3\uC774 \uB36E\uC5B4\uC4F0\uAE30 \uB429\uB2C8\uB2E4","layout.useAsDefault":"\uAE30\uBCF8 \uB808\uC774\uC544\uC6C3\uC73C\uB85C \uC0AC\uC6A9","layout.publicAllUsers":"\uACF5\uAC1C(\uBAA8\uB4E0 \uC0AC\uC6A9\uC790\uC5D0\uAC8C \uD45C\uC2DC)","layout.toast.loadFallback":"\uBC31\uC5D4\uB4DC\uC5D0\uC11C \uB808\uC774\uC544\uC6C3\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD574 \uB85C\uCEEC \uC800\uC7A5\uC18C\uB85C \uC804\uD658\uD588\uC2B5\uB2C8\uB2E4","layout.toast.saveSuccess":"\uB808\uC774\uC544\uC6C3\uC774 \uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.toast.saveLocalSuccess":"\uB808\uC774\uC544\uC6C3\uC774 \uB85C\uCEEC \uC800\uC7A5\uC18C\uC5D0 \uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.toast.backendUnavailableSavedLocal":"\uBC31\uC5D4\uB4DC\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC5B4 \uB85C\uCEEC\uC5D0 \uC800\uC7A5\uD588\uC2B5\uB2C8\uB2E4","layout.toast.deleteSuccess":"\uB808\uC774\uC544\uC6C3\uC774 \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.toast.deleteLocalSuccess":"\uB808\uC774\uC544\uC6C3\uC774 \uB85C\uCEEC \uC800\uC7A5\uC18C\uC5D0\uC11C \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.toast.backendUnavailableDeletedLocal":"\uBC31\uC5D4\uB4DC\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC5B4 \uB85C\uCEEC\uC5D0\uC11C \uC0AD\uC81C\uD588\uC2B5\uB2C8\uB2E4","layout.toast.defaultSuccess":"\uAE30\uBCF8 \uB808\uC774\uC544\uC6C3\uC774 \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.toast.defaultLocalSuccess":"\uAE30\uBCF8 \uB808\uC774\uC544\uC6C3\uC774 \uB85C\uCEEC\uC5D0 \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4","layout.toast.backendUnavailableDefaultLocal":"\uBC31\uC5D4\uB4DC\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC5B4 \uAE30\uBCF8\uAC12\uC744 \uB85C\uCEEC\uC5D0 \uC800\uC7A5\uD588\uC2B5\uB2C8\uB2E4","dateRange.label":"\uB0A0\uC9DC \uBC94\uC704","dateRange.startDate":"\uC2DC\uC791\uC77C","dateRange.endDate":"\uC885\uB8CC\uC77C","dateRange.select":"\uC120\uD0DD...","dateRange.today":"\uC624\uB298","dateRange.thisWeek":"\uC774\uBC88 \uC8FC","dateRange.thisMonth":"\uC774\uBC88 \uB2EC","graph.records":"{count}\uAC74","graph.kpi.totalRecords":"\uCD1D \uB808\uCF54\uB4DC","graph.kpi.totalReport":"\uCD1D \uBCF4\uACE0 \uC2DC\uAC04","graph.kpi.totalBillable":"\uCD1D \uCCAD\uAD6C \uAC00\uB2A5 \uC2DC\uAC04","graph.kpi.efficiency":"\uD6A8\uC728","graph.kpi.amount":"\uAE08\uC561","graph.kpi.flagged":"\uD50C\uB798\uADF8","graph.chart.billable.title":"\uCC28\uC6D0\uBCC4 \uCCAD\uAD6C \uAC00\uB2A5 \uC2DC\uAC04","graph.chart.billable.subtitle":"\uCCAD\uAD6C \uAC00\uB2A5 \uC2DC\uAC04 \uC0C1\uC704 \uAC12","graph.chart.efficiency.title":"\uB2F4\uB2F9\uC790\uBCC4 \uD6A8\uC728","graph.chart.efficiency.subtitle":"\uB0AE\uC740 \uD6A8\uC728 \uC6B0\uC120","graph.chart.status.title":"\uC0C1\uD0DC \uBD84\uD3EC","graph.chart.status.subtitle":"\uC0C1\uD0DC\uBCC4 \uBE44\uC728","graph.dataBody":"\uB370\uC774\uD130 \uBCF8\uBB38","graph.reportTitle":"\uADF8\uB798\uD504 \uB9AC\uD3EC\uD2B8","graph.unassigned":"\uBBF8\uC9C0\uC815","graph.column.reportHours":"\uBCF4\uACE0 \uC2DC\uAC04","graph.column.billableHours":"\uCCAD\uAD6C \uAC00\uB2A5 \uC2DC\uAC04","detail.searchAi.placeholder":"\uD544\uB4DC\uB97C \uAC80\uC0C9\uD558\uACE0, \uACB0\uACFC\uAC00 \uC5C6\uC73C\uBA74 AI\uC5D0 \uC9C8\uBB38\uD558\uC138\uC694...","detail.searchAi.matches":"{count}\uAC1C \uC77C\uCE58 \uD56D\uBAA9","detail.searchAi.noMatch":"\uC77C\uCE58\uD558\uB294 \uD544\uB4DC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.","detail.searchAi.autoAiFallback":"\uC77C\uCE58 \uD56D\uBAA9\uC774 \uC5C6\uC5B4 AI \uBD84\uC11D\uC744 \uC2E4\uD589\uD569\uB2C8\uB2E4...","detail.searchAi.aiResultTitle":"AI \uBD84\uC11D \uACB0\uACFC","detail.table.title":"\uAD00\uB828 \uB808\uCF54\uB4DC","kanban.empty":"\uC5EC\uAE30\uC5D0 \uCE74\uB4DC\uB97C \uB193\uC73C\uC138\uC694","kanban.bucket.limit":"\uD55C\uB3C4","kanban.bucket.dropHere":"\uB193\uC73C\uBA74 \uC774 \uBC84\uD0B7\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4","kanban.bucket.add":"\uBC84\uD0B7 \uCD94\uAC00","kanban.bucket.rename":"\uBC84\uD0B7 \uC774\uB984 \uBCC0\uACBD","kanban.bucket.saveRename":"\uBC84\uD0B7 \uC774\uB984 \uC800\uC7A5","kanban.bucket.cancelRename":"\uC774\uB984 \uBCC0\uACBD \uCDE8\uC18C","kanban.search.placeholder":"\uCE74\uB4DC \uBC0F \uBC84\uD0B7 \uAC80\uC0C9","kanban.search.clear":"\uAC80\uC0C9 \uC9C0\uC6B0\uAE30","kanban.search.results":"\uC77C\uCE58\uD558\uB294 \uCE74\uB4DC {count}\uAC1C","kanban.search.noMatch":"\uC77C\uCE58\uD558\uB294 \uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4","kanban.card.progress":"\uC9C4\uD589\uB960","kanban.card.openDetail":"\uC0C1\uC138 \uC5F4\uAE30","kanban.priority.critical":"\uAE34\uAE09","kanban.priority.high":"\uB192\uC74C","kanban.priority.medium":"\uBCF4\uD1B5","kanban.priority.low":"\uB0AE\uC74C","quickCreate.newItem":"\uC2E0\uADDC \uD56D\uBAA9","quickCreate.createWithTitle":"{title} \uC0DD\uC131","quickEdit.editWithTitle":"{title} \uC218\uC815","quickDelete.confirmTitle":"\uC0AD\uC81C \uD655\uC778","quickDelete.confirmMessageSingle":"\uC120\uD0DD\uD55C \uD56D\uBAA9\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?","quickDelete.confirmMessageMultiple":"\uC120\uD0DD\uD55C {count}\uAC1C \uD56D\uBAA9\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?","cardPage.viewDetails":"\uC0C1\uC138 \uBCF4\uAE30","cardPage.download":"\uB2E4\uC6B4\uB85C\uB4DC","cardPage.close":"\uB2EB\uAE30","cardPage.empty":"\uD56D\uBAA9\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4","messageBox.confirm":"\uD655\uC778","messageBox.cancel":"\uCDE8\uC18C"},qn={en:pb,zh:ub,fr:mb,de:gb,ja:fb,ko:bb};P();var id=(t,r)=>r?t.replace(/\{(\w+)\}/g,(o,n)=>{let a=r[n];return a==null?"":String(a)}):t,Cb={locale:"en",t:(t,r)=>id(qn.en[t]||t,r)},sd=er.createContext(Cb),Ga=({locale:t="en",messages:r,children:o})=>{let n=er.useMemo(()=>{let a=qn[t]||qn.en,i=r?.[t]||{},s={...qn.en,...a,...i};return {locale:t,t:(l,d)=>id(s[l]||l,d)}},[t,r]);return e(sd.Provider,{value:n,children:o})},pe=()=>er.useContext(sd);P();function Xn({items:t,onItemClick:r,className:o="",level:n=0,expandedIds:a,onToggleExpand:i,colorMode:s="light",enablePinning:l=false,pinnedIds:d,onTogglePin:u}){let{t:p}=pe(),f=s==="dark",b=navigation.usePathname(),[m,v]=er.useState(false),[y,g]=er.useState(new Set),x=a!==void 0&&i!==void 0,h=x?a:y;er.useEffect(()=>{v(true);},[]);let C=w=>{if(x)i(w);else {let T=new Set(y);T.has(w)?T.delete(w):T.add(w),g(T);}},k=w=>{w.children&&w.children.length>0&&C(w.id),r&&r(w);};return !t||!Array.isArray(t)?e("div",{className:br("tree-menu",o),children:e("div",{className:"text-sm text-[var(--orb-muted)] p-2",children:p("navigation.noItems")})}):e("div",{className:br("tree-menu",o),children:t.map(w=>{let T=h.has(w.id)||w.isExpanded,I=w.children&&w.children.length>0,A=56+Math.max(0,n-1)*8,R=n===0?12:I?A-24:A,M=w.appurl||w.href,N=m&&M?b===M:false,E=d?.has(w.id)??false,O=l&&w.pinnable!==false&&!!M&&!I;return c("div",{className:"tree-menu-item relative",children:[N&&e("div",{className:br("absolute left-0 top-2 bottom-2 w-[3px] rounded-r-full z-10","bg-[var(--orb-nav-active-fg)]")}),c(Us,{variant:"ghost",className:br("w-full justify-start h-auto py-2 relative overflow-hidden group",n>0?"gap-1":"gap-2",I&&T&&!N?f?"bg-[color-mix(in_oklch,var(--orb-inverse-fg)_5%,transparent)] text-[var(--orb-fg)] hover:bg-[color-mix(in_oklch,var(--orb-inverse-fg)_8%,transparent)]":"bg-[color-mix(in_oklch,var(--orb-surface)_70%,transparent)] text-[var(--orb-fg)] hover:bg-[var(--orb-surface)]":"",n>=2?"min-h-9 py-1.5 rounded-md":n>0?"min-h-10 rounded-lg":"rounded-lg",N?f?"bg-transparent text-[var(--orb-nav-active-fg)] hover:bg-[color-mix(in_oklch,var(--orb-surface-2)_35%,transparent)]":"bg-transparent text-[var(--orb-nav-active-fg)] hover:bg-[color-mix(in_oklch,var(--orb-surface)_60%,transparent)]":f?"hover:bg-[color-mix(in_oklch,var(--orb-surface-2)_50%,transparent)] text-[var(--orb-fg)]":"hover:bg-[color-mix(in_oklch,var(--orb-surface)_50%,transparent)] text-[var(--orb-fg)]"),style:{paddingLeft:`${R}px`,paddingRight:O?"34px":"10px"},onClick:()=>k(w),children:[I&&e("div",{className:br("flex-shrink-0 transition-transform duration-200",T&&"rotate-90",N?"text-[var(--orb-nav-active-fg)]":f?"text-[var(--orb-muted)] group-hover:text-[var(--orb-fg)]":"text-[var(--orb-muted)] group-hover:text-[var(--orb-muted)]"),children:e(Br,{className:"h-4 w-4"})}),w.icon&&e("div",{className:br("flex h-4 w-4 flex-shrink-0 items-center justify-center transition-colors duration-200",N?"text-[var(--orb-nav-active-fg)]":f?"text-[var(--orb-muted)] group-hover:text-[var(--orb-fg)]":"text-[var(--orb-muted)] group-hover:text-[var(--orb-muted)]"),children:w.icon}),c("div",{className:"flex-1 text-left overflow-hidden z-10",children:[e("div",{className:br("text-sm truncate transition-colors duration-200",N?"font-semibold":"font-medium"),children:w.title||w.label}),w.description&&e("div",{className:br("text-xs truncate transition-colors duration-200",N?f?"text-[color-mix(in_oklch,var(--orb-nav-active-fg)_70%,transparent)]":"text-[color-mix(in_oklch,var(--orb-nav-active-fg)_75%,transparent)]":"text-[var(--orb-muted)]"),title:w.description,children:w.description})]})]}),O&&u&&e("button",{type:"button","aria-label":p(E?"navigation.pin.remove":"navigation.pin.add"),"aria-pressed":E,title:p(E?"navigation.pin.remove":"navigation.pin.add"),onClick:F=>{F.preventDefault(),F.stopPropagation(),u(w);},className:br("orb-navigation-pin-button absolute right-1 top-1/2 z-20 flex h-7 w-7 -translate-y-1/2 items-center justify-center rounded-md transition-colors duration-150",E&&"orb-is-pinned"),children:e(Jo,{className:br("h-3.5 w-3.5",E&&"fill-current")})}),I&&e("div",{className:br("grid transition-[grid-template-rows] duration-300 ease-in-out",T?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:e("div",{className:br("overflow-hidden",T&&"pt-1"),children:e(Xn,{items:w.children,onItemClick:r,level:n+1,expandedIds:a,onToggleExpand:i,colorMode:s,enablePinning:l,pinnedIds:d,onTogglePin:u})})})]},w.id)})})}P();var kb="orbcafe:navigation-island:pinned-items",Ks="orbcafe-navigation-pinned",Pb=t=>t.appurl||t.href,cd=t=>{let r=[];return t.forEach(o=>{let n=!!o.children?.length;o.pinnable!==false&&Pb(o)&&!n&&r.push({...o,children:void 0}),o.children?.length&&r.push(...cd(o.children));}),r},dd=({collapsed:t,onToggle:r,className:o="",maxHeight:n,menuData:a=[],colorMode:i="light",displayMode:s="fixed",onDisplayModeChange:l,showDisplayModeToggle:d=true,enablePinning:u=true,pinStorageKey:p=kb,pinnedItemIds:f,defaultPinnedItemIds:b=[],onPinnedItemIdsChange:m,pinnedSectionTitle:v})=>{let{t:y}=pe(),g=i==="dark",x=s==="floating",h=navigation.useRouter(),[C,k]=er.useState(""),[w,T]=er.useState(new Set),[I,S]=er.useState(b),[A,R]=er.useState(false),M=f!==void 0,N=er.useMemo(()=>f??I,[f,I]),E=er.useMemo(()=>new Set(N),[N]);er.useEffect(()=>{t&&T(new Set);},[t]),er.useEffect(()=>{if(!u||M){R(true);return}try{let z=window.localStorage.getItem(p);if(z){let K=JSON.parse(z);Array.isArray(K)&&S(K.filter(q=>typeof q=="string"));}}catch{}finally{R(true);}},[u,M,p]),er.useEffect(()=>{if(!(!u||M||!A))try{window.localStorage.setItem(p,JSON.stringify(N));}catch{}},[N,u,M,p,A]),er.useEffect(()=>{!u||t||N.length===0||T(z=>{if(z.has(Ks))return z;let K=new Set(z);return K.add(Ks),K});},[t,N.length,u]);let O=er.useCallback(z=>{let K=Array.from(new Set(z));M||S(K),m?.(K);},[M,m]),F=er.useCallback(z=>{let K=z.id,q=E.has(K)?N.filter(fe=>fe!==K):[...N,K];O(q);},[N,E,O]),_=er.useMemo(()=>{if(!u||N.length===0)return a;let z=new Map(cd(a).map(q=>[q.id,q])),K=N.map(q=>z.get(q)).filter(q=>!!q);return K.length===0?a:[{id:Ks,title:v||y("navigation.pinned"),icon:e(Jo,{className:"w-4 h-4"}),children:K,pinnable:false},...a]},[N,u,a,v,y]),B=er.useCallback(z=>{let K=[],q=fe=>{fe.forEach(se=>{K.push(se.id),se.children&&q(se.children);});};return q(z),K},[]),Y=er.useMemo(()=>{if(!C.trim())return _;let z=K=>K.reduce((q,fe)=>{let se=fe.title?.toLowerCase().includes(C.toLowerCase())||fe.description?.toLowerCase().includes(C.toLowerCase()),ue=fe.children?z(fe.children):[];return (se||ue.length>0)&&q.push({...fe,children:ue.length>0?ue:fe.children}),q},[]);return z(_)},[C,_]),W=er.useMemo(()=>C.trim()?new Set(B(_)):w,[C,_,w,B]),j=er.useCallback(async z=>{if(console.log("\u{1F5B1}\uFE0F \u5BFC\u822A\u83DC\u5355\u9879\u70B9\u51FB:",z),z.id==="chat"||z.appurl==="/chat"){console.log("\u{1F4AC} \u68C0\u6D4B\u5230chat\u83DC\u5355\u70B9\u51FB\uFF0C\u8DF3\u8F6C\u5230\u65B0\u7684\u804A\u5929\u89C6\u56FE");try{h.push("/chat?new=true");}catch(q){console.error("\u274C \u65E0\u6CD5\u8DF3\u8F6C\u5230\u65B0\u804A\u5929\u89C6\u56FE:",q),h.push("/chat");}return}let K=z.appurl||z.href;K&&(K.startsWith("http://")||K.startsWith("https://")?window.open(K,"_blank"):h.push(K));},[h]),V=er.useCallback(()=>{l?.(s==="fixed"?"floating":"fixed");},[s,l]);return c("div",{className:`flex flex-col backdrop-blur-xl border ${x?"shadow-[0_28px_80px_rgba(15,23,42,0.34)]":"shadow-[0_4px_8px_0_rgba(31,38,135,0.1)]"} ${t?"w-14 rounded-full":"w-[234px] rounded-2xl"} relative ${o} ${g?x?"border-white/25":"bg-[var(--orb-nav-bg)] border-white/10":x?"border-white/70":"bg-[color-mix(in_oklch,var(--orb-canvas)_70%,transparent)] border-white/30"}`,style:{backdropFilter:x?"blur(34px) saturate(230%) contrast(1.12)":"blur(16px) saturate(180%)",WebkitBackdropFilter:x?"blur(34px) saturate(230%) contrast(1.12)":"blur(16px) saturate(180%)",backgroundColor:x?g?"rgba(8, 12, 18, 0.34)":"rgba(255, 255, 255, 0.24)":void 0,backgroundImage:x?g?"radial-gradient(circle at 28% 8%, rgba(255,255,255,0.14), rgba(255,255,255,0) 44%), linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.015) 50%, color-mix(in oklch, var(--orb-ai-accent) 5%, transparent))":"radial-gradient(circle at 28% 8%, rgba(255,255,255,0.42), rgba(255,255,255,0) 46%), linear-gradient(145deg, rgba(255,255,255,0.22), rgba(255,255,255,0.07) 50%, color-mix(in oklch, var(--orb-ai-accent) 8%, transparent))":void 0,boxShadow:x?g?"inset 0 1px 0 rgba(255,255,255,0.20), inset 0 -1px 0 rgba(255,255,255,0.08), 0 26px 90px rgba(0,0,0,0.52), 0 0 0 1px rgba(255,255,255,0.06)":"inset 0 1px 0 rgba(255,255,255,0.88), inset 0 -1px 0 rgba(255,255,255,0.34), 0 26px 90px rgba(15,23,42,0.24), 0 0 0 1px rgba(255,255,255,0.35)":void 0,transition:"width 400ms cubic-bezier(0.4, 0.0, 0.2, 1), border-radius 0ms cubic-bezier(0.4, 0.0, 0.2, 1), box-shadow 400ms ease-out, background-color 220ms ease-out, backdrop-filter 220ms ease-out",maxHeight:n?`${n}px`:void 0},children:[e("div",{className:`pt-4 pb-2 transition-all duration-500 ease-in-out ${t?"px-1":"px-2"}`,children:t?e("div",{className:"flex justify-center",children:e("button",{onClick:r,className:`w-10 h-10 flex items-center justify-center rounded-lg transition-colors duration-200 ${g?"text-[var(--orb-fg)] hover:bg-[var(--orb-surface-2)]":"text-[var(--orb-muted)] hover:bg-[var(--orb-surface)]"}`,title:y("navigation.expand"),children:e(Hr,{className:"h-5 w-5"})})}):c("div",{className:`relative transition-opacity duration-300 ${t?"opacity-0":"opacity-100 delay-200"}`,children:[e("input",{type:"text",placeholder:y("navigation.searchPlaceholder"),value:C,onChange:z=>k(z.target.value),className:`w-full pl-10 pr-4 py-2 text-sm border rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--orb-primary)] focus:border-transparent ${g?"border-[var(--orb-border)] bg-[var(--orb-surface-2)] text-[var(--orb-fg)] placeholder-[var(--orb-muted)]":"border-[var(--orb-border)] bg-[var(--orb-canvas)] text-[var(--orb-fg)] placeholder-[var(--orb-muted)]"}`}),e("div",{className:"absolute left-3 top-1/2 transform -translate-y-1/2 pointer-events-none",children:e(Hr,{className:"h-4 w-4 text-[var(--orb-muted)]"})})]})}),e("nav",{className:`flex-1 pb-4 transition-all duration-500 ease-in-out overflow-y-auto min-h-0 ${t?"px-1":"px-2"}`,children:Y.length===0?e("div",{className:"flex items-center justify-center py-8 text-[var(--orb-muted)] text-sm",children:t?e(Hn,{className:"h-5 w-5"}):y(C?"navigation.noMatch":"navigation.noAccessibleApp")}):c(jsxRuntime.Fragment,{children:[!t&&e("div",{className:`transition-opacity duration-300 ${t?"opacity-0":"opacity-100 delay-200"}`,children:e(Xn,{items:Y,onItemClick:j,className:"space-y-1",expandedIds:W,colorMode:i,enablePinning:u,pinnedIds:E,onTogglePin:F,onToggleExpand:z=>{let K=new Set(w);Y.some(fe=>fe.id===z)?K.has(z)?K.delete(z):(Y.forEach(fe=>{fe.id!==z&&K.has(fe.id)&&K.delete(fe.id);}),K.add(z)):K.has(z)?K.delete(z):K.add(z),T(K);}})}),t&&e("div",{className:"space-y-2",children:_.map(z=>e("div",{className:"space-y-1",children:e("button",{onClick:()=>{r();let K=new Set([z.id]);T(K);},className:`w-full flex items-center justify-center p-2 rounded-lg cursor-pointer transition-colors duration-200 ${g?"text-[var(--orb-muted)] hover:bg-[var(--orb-surface-2)]":"text-[var(--orb-muted)] hover:bg-[var(--orb-surface)]"}`,title:y("navigation.expandView",{title:z.title||""}),children:z.icon||e("div",{className:`w-6 h-6 rounded text-xs flex items-center justify-center font-medium ${g?"bg-[var(--orb-nav-active-fg)] text-[#0b0b0b]":"bg-[var(--orb-primary)] text-[var(--orb-on-primary)]"}`,children:z.title?.charAt(0)||"?"})})},z.id))})]})}),!t&&e("button",{onClick:r,className:`absolute -bottom-1 -right-1 w-6 h-6 bg-transparent rounded-full flex items-center justify-center transition-all duration-300 ease-in-out z-20 ${g?"hover:bg-[color-mix(in_oklch,var(--orb-surface-2)_50%,transparent)]":"hover:bg-[color-mix(in_oklch,var(--orb-canvas)_20%,transparent)]"}`,title:y("navigation.collapse"),children:e("div",{className:"absolute",style:{bottom:"0px",right:"0px",width:"16px",height:"16px",overflow:"hidden"},children:e("div",{className:g?"border-[var(--orb-status-warning)]":"",style:{width:"32px",height:"32px",borderRadius:"16px",border:"3px solid var(--orb-ai-accent)",backgroundColor:"transparent",position:"absolute",top:"-16px",left:"-16px"}})})}),d&&t&&e("button",{type:"button",onClick:V,className:`absolute -bottom-4 left-1/2 z-30 flex h-9 w-9 -translate-x-1/2 items-center justify-center rounded-full border shadow-md transition-colors focus:outline-none focus:ring-2 focus:ring-[color-mix(in_oklch,var(--orb-primary)_45%,transparent)] ${g?"border-[var(--orb-border)] bg-[var(--orb-surface-2)] text-[var(--orb-fg)] hover:bg-[var(--orb-hover)]":"border-[var(--orb-border)] bg-[var(--orb-canvas)] text-[var(--orb-status-fg)] hover:bg-[var(--orb-p50)] hover:text-[var(--orb-status-primary)]"}`,style:{touchAction:"manipulation"},title:y(x?"navigation.mode.switchToFixed":"navigation.mode.switchToFloating"),"aria-label":y(x?"navigation.mode.switchToFixed":"navigation.mode.switchToFloating"),children:x?e(Oa,{className:"h-4 w-4"}):e(Fa,{className:"h-4 w-4"})})]})};P();var Ib="orbcafe:navigation-island:pinned-items",qs="orbcafe-navigation-pinned",pd=t=>t.appurl||t.href,ud=t=>t.flatMap(r=>{let o=!!r.children?.length,n=r.pinnable!==false&&pd(r)&&!o?[{...r,children:void 0}]:[];return r.children?.length?[...n,...ud(r.children)]:n}),md=t=>t.flatMap(r=>[r.id,...r.children?md(r.children):[]]),gd=(t,r)=>t.reduce((o,n)=>{let a=n.children?gd(n.children,r):[];return ([n.title,n.label,n.description].some(s=>s?.toLocaleLowerCase().includes(r))||a.length>0)&&o.push({...n,children:a.length>0?a:n.children}),o},[]),Xs=({collapsed:t,onToggle:r,className:o="",maxHeight:n,menuData:a=[],colorMode:i="light",displayMode:s="fixed",onDisplayModeChange:l,showDisplayModeToggle:d=true,enablePinning:u=true,pinStorageKey:p=Ib,pinnedItemIds:f,defaultPinnedItemIds:b=[],onPinnedItemIdsChange:m,pinnedSectionTitle:v})=>{let{t:y}=pe(),g=navigation.useRouter(),x=s==="floating",[h,C]=er.useState(""),[k,w]=er.useState(new Set),[T,I]=er.useState(b),[S,A]=er.useState(false),R=f!==void 0,M=f??T,N=er.useMemo(()=>new Set(M),[M]);er.useEffect(()=>{t&&w(new Set);},[t]),er.useEffect(()=>{if(!u||R){A(true);return}try{let z=window.localStorage.getItem(p);if(z){let K=JSON.parse(z);Array.isArray(K)&&I(K.filter(q=>typeof q=="string"));}}catch{}finally{A(true);}},[u,R,p]),er.useEffect(()=>{if(!(!u||R||!S))try{window.localStorage.setItem(p,JSON.stringify(M));}catch{}},[M,u,R,p,S]),er.useEffect(()=>{!u||t||M.length===0||w(z=>{if(z.has(qs))return z;let K=new Set(z);return K.add(qs),K});},[t,M.length,u]);let E=er.useCallback(z=>{let K=Array.from(new Set(z));R||I(K),m?.(K);},[R,m]),O=er.useCallback(z=>{E(N.has(z.id)?M.filter(K=>K!==z.id):[...M,z.id]);},[M,N,E]),F=er.useMemo(()=>{if(!u||M.length===0)return a;let z=new Map(ud(a).map(q=>[q.id,q])),K=M.map(q=>z.get(q)).filter(q=>!!q);return K.length===0?a:[{id:qs,title:v||y("navigation.pinned"),icon:e(Jo,{className:"h-4 w-4"}),children:K,pinnable:false},...a]},[M,u,a,v,y]),_=h.trim().toLocaleLowerCase(),B=er.useMemo(()=>_?gd(F,_):F,[F,_]),Y=er.useMemo(()=>_?new Set(md(B)):k,[k,B,_]),W=er.useCallback(z=>{w(K=>{let q=new Set(K),fe=B.some(se=>se.id===z);return q.has(z)?q.delete(z):(fe&&B.forEach(se=>q.delete(se.id)),q.add(z)),q});},[B]),j=er.useCallback(z=>{let K=pd(z);K&&(z.id==="chat"||z.appurl==="/chat"?g.push("/chat?new=true"):/^https?:\/\//.test(K)?window.open(K,"_blank","noopener,noreferrer"):g.push(K));},[g]),V=z=>{r(),w(new Set([z.id]));};return c("aside",{"data-navigation-island":"v2","data-collapsed":t||void 0,className:`orb-navigation-island-v2 relative flex flex-col border ${t?"w-14":"w-[234px]"} ${o}`,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:r,className:"mx-auto flex h-10 w-10 items-center justify-center rounded-lg text-[var(--orb-muted)] transition-colors hover:bg-[var(--orb-p50)] hover:text-[var(--orb-status-primary)]",title:y("navigation.expand"),"aria-label":y("navigation.expand"),children:e(Hr,{className:"h-5 w-5"})}):c("label",{className:"relative block",children:[e("span",{className:"orb-visually-hidden",children:y("navigation.searchPlaceholder")}),e(Hr,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[var(--orb-muted)]"}),e("input",{type:"search",value:h,onChange:z=>C(z.target.value),placeholder:y("navigation.searchPlaceholder"),className:"w-full py-2 pl-10 pr-3 text-sm outline-none"})]})}),e("nav",{className:`min-h-0 flex-1 overflow-y-auto pb-2 ${t?"px-1":"px-2"}`,children:B.length===0?e("div",{className:"flex items-center justify-center py-8 text-sm text-[var(--orb-muted)]",children:t?e(Hn,{className:"h-5 w-5"}):y(_?"navigation.noMatch":"navigation.noAccessibleApp")}):t?e("div",{className:"space-y-1",children:F.map(z=>e("button",{type:"button",onClick:()=>V(z),className:"flex h-10 w-full items-center justify-center rounded-lg text-[var(--orb-muted)] transition-colors hover:bg-[var(--orb-p50)] hover:text-[var(--orb-status-primary)]",title:y("navigation.expandView",{title:z.title||z.label||""}),children:z.icon||e(Hn,{className:"h-5 w-5"})},z.id))}):e(Xn,{items:B,onItemClick:j,className:"space-y-1",expandedIds:Y,onToggleExpand:W,colorMode:i,enablePinning:u,pinnedIds:N,onTogglePin:O})}),d&&t&&e("div",{className:"orb-navigation-island-v2-footer flex flex-col items-center gap-1 border-t px-1 py-2",children:e("button",{type:"button",onClick:()=>l?.(x?"fixed":"floating"),className:"flex h-9 w-9 items-center justify-center rounded-lg text-[var(--orb-muted)] transition-colors hover:bg-[var(--orb-p50)] hover:text-[var(--orb-status-primary)]",title:y(x?"navigation.mode.switchToFixed":"navigation.mode.switchToFloating"),"aria-label":y(x?"navigation.mode.switchToFixed":"navigation.mode.switchToFloating"),children:x?e(Oa,{className:"h-4 w-4"}):e(Fa,{className:"h-4 w-4"})})}),!t&&e("button",{type:"button",onClick:r,className:"absolute -bottom-1 -right-1 z-20 flex h-6 w-6 items-center justify-center rounded-full bg-transparent transition-all duration-300 ease-in-out",title:y("navigation.collapse"),"aria-label":y("navigation.collapse"),children:e("span",{"aria-hidden":"true",className:"absolute overflow-hidden",style:{bottom:0,right:0,width:16,height:16},children:e("span",{className:"absolute rounded-full border-[3px] border-[var(--orb-ai-accent)]",style:{width:32,height:32,top:-16,left:-16}})})})]})};Xs.displayName="NavigationIsland2";var bd=(t={})=>{let{initialCollapsed:r=false,initialDisplayMode:o="fixed",content:n=[],enablePinning:a,pinStorageKey:i,pinnedItemIds:s,defaultPinnedItemIds:l,onPinnedItemIdsChange:d,pinnedSectionTitle:u}=t,[p,f]=er.useState(r),[b,m]=er.useState(o),[v,y]=er.useState(n),g=er.useCallback(()=>{f(C=>!C);},[]),x=er.useCallback(()=>{m(C=>C==="fixed"?"floating":"fixed");},[]),h=er.useMemo(()=>({collapsed:p,onToggle:g,menuData:v,displayMode:b,onDisplayModeChange:m,enablePinning:a,pinStorageKey:i,pinnedItemIds:s,defaultPinnedItemIds:l,onPinnedItemIdsChange:d,pinnedSectionTitle:u}),[p,g,v,b,m,a,i,s,l,d,u]);return {collapsed:p,setCollapsed:f,toggleCollapsed:g,displayMode:b,setDisplayMode:m,toggleDisplayMode:x,menuData:v,setMenuData:y,navigationIslandProps:h}};var Zs=class{constructor(){fc(this,"listener",null);}register(r){this.listener=r;}unregister(){this.listener=null;}show(r,o,n){this.listener&&this.listener({type:r,content:o,options:n});}hide(){this.listener&&this.listener(null);}},io=new Zs,uT={success:(t,r)=>io.show("success",t,r),error:(t,r)=>io.show("error",t,r),warning:(t,r)=>io.show("warning",t,r),info:(t,r)=>io.show("info",t,r),show:(t,r,o)=>io.show(t,r,o),hide:()=>io.hide()};P();var Rb={success:{icon:e(Bn,{size:40}),color:"var(--orb-success-bg)",iconColor:"var(--orb-success)"},warning:{icon:e(Ha,{size:40}),color:"var(--orb-warn-bg)",iconColor:"var(--orb-warn)"},error:{icon:e(Ra,{size:40}),color:"var(--orb-err-bg)",iconColor:"var(--orb-err)"},info:{icon:e(Na,{size:40}),color:"var(--orb-info-bg)",iconColor:"var(--orb-info)"},default:{icon:null,color:"transparent",iconColor:"inherit"}},jn=({open:t,title:r,message:o,onClose:n,onConfirm:a,confirmText:i,cancelText:s,showCancel:l=true,maxWidth:d="xs",type:u="default"})=>{let{t:p}=pe(),f=i||p("messageBox.confirm"),b=s||p("messageBox.cancel"),m=()=>{a?a():n();},v=Rb[u],y=u!=="default";return c(Lt,{open:t,onClose:n,maxWidth:d,sx:y?{borderTop:`6px solid ${v.iconColor}`}:void 0,children:[y&&e("div",{style:{display:"flex",justifyContent:"center",paddingTop:24,color:v.iconColor},children:v.icon}),r&&e("div",{className:"orb-dialog-title",style:{textAlign:y?"center":"left",paddingTop:y?8:16},children:r}),e("div",{className:"orb-dialog-content",style:{textAlign:y?"center":"left"},children:typeof o=="string"?e("p",{style:{margin:0,color:"var(--orb-muted)"},children:o}):o}),c("div",{className:"orb-dialog-actions",style:{display:"flex",justifyContent:y?"center":"flex-end",gap:8,paddingBottom:24,paddingLeft:24,paddingRight:24},children:[l&&e(we,{onClick:n,variant:"text",children:b}),e(we,{onClick:m,variant:"contained",color:y&&u==="error"?"error":"primary",autoFocus:true,children:f})]})]})},CT=()=>{let[t,r]=er__namespace.default.useState(null),[o,n]=er__namespace.default.useState(false);er__namespace.default.useEffect(()=>{let s=l=>{l?(r(l),n(true)):(n(false),r(null));};return io.register(s),()=>io.unregister()},[]);let a=()=>{n(false),t?.options?.onClose&&t.options.onClose(),r(null);},i=()=>{t?.options?.onConfirm&&t.options.onConfirm(),n(false),r(null);};return t?e(jn,{open:o,type:t.type,message:t.content,title:t.options?.title,onClose:a,onConfirm:i,confirmText:t.options?.confirmText,cancelText:t.options?.cancelText,showCancel:t.options?.showCancel,maxWidth:t.options?.maxWidth}):null};P();var PT=({status:t,showIcon:r=true})=>{let o="gray",n,a=t;return t==="OK"?(o="blue",n=e(Bn,{size:14,strokeWidth:2}),a="Success"):t==="Error"?(o="orange",n=e(Ra,{size:14,strokeWidth:2}),a="Error"):t==="Warning"&&(o="orange",n=e(Ha,{size:14,strokeWidth:2}),a="Warning"),e(xt,{label:a,tone:o,icon:r&&n?n:void 0})};P();var MT=({dense:t,sx:r,className:o,children:n,...a})=>e("ul",{...a,className:o,style:{listStyle:"none",margin:0,padding:0,...r},children:n}),RT=({button:t,divider:r,sx:o,className:n,children:a,...i})=>e("li",{...i,className:n,style:{display:"flex",alignItems:"center",padding:"8px 16px",minHeight:40,borderBottom:r?"1px solid var(--orb-border)":void 0,cursor:t?"pointer":void 0,transition:"var(--orb-t-fast)",...o},onMouseEnter:t?s=>{s.currentTarget.style.background="var(--orb-hover)";}:void 0,onMouseLeave:t?s=>{s.currentTarget.style.background="";}:void 0,children:a}),DT=({sx:t,className:r,children:o,...n})=>e("button",{...n,type:"button",className:r,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:o}),NT=({children:t,sx:r})=>e("div",{style:{marginRight:16,display:"flex",alignItems:"center",minWidth:40,...r},children:t}),AT=({primary:t,secondary:r,sx:o})=>c("div",{style:{flex:1,minWidth:0,...o},children:[e("div",{className:"orb-body",style:{fontWeight:500},children:t}),r&&e("div",{className:"orb-meta",style:{marginTop:2},children:r})]}),ET=({sx:t,className:r,children:o,...n})=>e("li",{...n,className:r,style:{padding:"8px 16px",fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.06em",color:"var(--orb-muted)",...t},children:o}),LT=({children:t,sx:r})=>e("div",{style:{marginRight:12,display:"flex",alignItems:"center",...r},children:t});P();var BT=({xs:t,md:r,lg:o,sx:n,children:a,className:i,...s})=>{let l=o?`span ${o}`:r?`span ${r}`:t?`span ${t}`:"span 12";return e("div",{...s,className:i,style:{gridColumn:l,minWidth:0,...n},children:a})};_t();P();var Ar=rt,ir=(t,r)=>er.forwardRef(({component:o,sx:n,className:a,style:i,children:s,...l},d)=>{let u=o??t,p=Ue(n,[r,a].filter(Boolean).join(" "),i);return e(u,{ref:d,className:p.className,style:p.style,...l,children:s})}),Ie=ir("div"),vd=ir("a","orb-link"),Bo=Ae,yd=ie,hr=L;var Cd=ae;var xd=Dt,jr=on,Qa=rn,Ja=Wa;var ei=Va,Sd=Xr,wd=({value:t,variant:r,color:o,sx:n})=>e($n,{value:r==="determinate"?t:void 0,color:o,sx:n}),kd=ir("table","orb-tbl"),Pd=ir("tbody"),Js=ir("td"),Td=ir("div","orb-table-container"),Id=ir("thead"),el=ir("tr");ir("tfoot");ir("div","orb-dialog-title");ir("div","orb-dialog-content");ir("div","orb-dialog-actions");ir("p","orb-body-dense");var so=ir("span","orb-input-adornment"),Md=er.forwardRef(({sx:t,fullWidth:r,className:o,style:n,...a},i)=>{let s=Ue(t,["orb-input-base",o].filter(Boolean).join(" "),n);return e("input",{ref:i,className:s.className,style:{width:r?"100%":void 0,...s.style},...a})});var Co=ir("div","orb-form-control"),Qn=({control:t,label:r,...o})=>c("label",{className:"orb-form-control-label",...o,children:[t,e("span",{children:r})]}),Ob=({primary:t,secondary:r,children:o,primaryTypographyProps:n,secondaryTypographyProps:a,...i})=>c("span",{className:"orb-list-item-text",...i,children:[t??o,r?e("small",{children:r}):null]}),Fb=ir("span","orb-list-item-icon"),Gt=Ob,zr=Fb;ir("div","orb-list-subheader");var tl=({container:t,item:r,spacing:o,xs:n,sm:a,md:i,lg:s,xl:l,sx:d,...u})=>{let p={},f=b=>typeof b=="number"?`${b/12*100}%`:b?"100%":void 0;return n!==void 0&&(p.xs=f(n)),a!==void 0&&(p.sm=f(a)),i!==void 0&&(p.md=f(i)),s!==void 0&&(p.lg=f(s)),l!==void 0&&(p.xl=f(l)),e(Ie,{...u,sx:{display:t?"flex":void 0,flexWrap:t?"wrap":void 0,gap:t&&o?o:void 0,width:r?p:void 0,...d??{}}})},nn=({in:t,children:r,unmountOnExit:o,...n})=>!t&&o?null:e("div",{hidden:!t,...n,children:r}),Rd=({children:t,container:r})=>typeof document>"u"?null:reactDom.createPortal(t,r??document.body),Dd=ir("div","orb-toolbar"),Nd=({active:t,direction:r="asc",children:o,sx:n,className:a,style:i,...s})=>{let l=Ue(n,["orb-table-sort-label",t?"orb-is-active":"",a].filter(Boolean).join(" "),i);return c("button",{type:"button",className:l.className,style:l.style,"data-direction":r,...s,children:[e("span",{className:"orb-table-sort-content",children:o}),e(Tt,{className:"orb-table-sort-icon",name:r==="desc"?"down":"up",size:11})]})},ti=({open:t,anchorEl:r,onClose:o,children:n,anchorOrigin:a,transformOrigin:i,slotProps:s,PaperProps:l,sx:d,className:u,style:p,...f})=>{let b=er.useRef(null);if(er.useEffect(()=>{if(!t)return;let x=C=>{let k=C.composedPath();b.current&&k.includes(b.current)||r&&k.includes(r)||o?.();},h=C=>{C.key==="Escape"&&o?.();};return document.addEventListener("pointerdown",x,true),document.addEventListener("keydown",h,true),()=>{document.removeEventListener("pointerdown",x,true),document.removeEventListener("keydown",h,true);}},[r,o,t]),!t||typeof document>"u")return null;let m=r?.getBoundingClientRect(),v=s?.paper??l,y=[...Array.isArray(v?.sx)?v.sx:v?.sx?[v.sx]:[],...Array.isArray(d)?d:d?[d]:[]],g=Ue(y,["orb-pop",v?.className,u].filter(Boolean).join(" "),{...v?.style,...p});return reactDom.createPortal(e("div",{...f,ref:b,className:g.className,style:{position:"fixed",left:m?.left??16,top:(m?.bottom??16)+6,zIndex:1301,...g.style},children:n}),document.body)},Ad=({open:t,onClose:r,anchor:o="left",children:n,PaperProps:a})=>{if(!t||typeof document>"u")return null;let i=o==="right"?{right:0,top:0,bottom:0}:o==="top"?{left:0,right:0,top:0}:o==="bottom"?{left:0,right:0,bottom:0}:{left:0,top:0,bottom:0},s=Ue(a?.sx,"orb-drawer");return reactDom.createPortal(c(jsxRuntime.Fragment,{children:[e("button",{type:"button",className:"orb-overlay","aria-label":"Close drawer",onClick:r}),e("aside",{className:s.className,style:{position:"fixed",zIndex:1201,...i},children:n})]}),document.body)},Ed=({value:t,onChange:r,children:o,variant:n,scrollButtons:a,...i})=>e("div",{role:"tablist",className:"orb-tabs",...i,children:er.Children.map(o,s=>er.isValidElement(s)?er.cloneElement(s,{selected:s.props.value===t,onSelect:l=>r?.(null,l)}):s)}),Ld=({value:t,label:r,children:o,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:r??o});var sr=()=>Pa(),xo=(t,r)=>Dr(t);var Od=({day:t,onDaySelect:r,selected:o,outsideCurrentMonth:n,disableMargin:a,sx:i,className:s,...l})=>{let d=Ue(i,`orb-cal-day ${o?"orb-is-selected":""} ${n?"orb-is-outside":""} ${s??""}`);return e("button",{type:"button",className:d.className,style:d.style,onClick:()=>r?.(t),...l,children:t.date()})},Fd=({value:t,referenceDate:r,onChange:o,onMonthChange:n,onYearChange:a,minDate:i,maxDate:s,slots:l,...d})=>e(Un,{value:t,month:r,onChange:u=>o?.(u),onMonthChange:u=>{n?.(u),a?.(u);},minDate:i,maxDate:s,renderDay:l?.day?(u,p)=>l.day?.({day:u,selected:p.selected,outsideCurrentMonth:p.outsideCurrentMonth,onDaySelect:f=>o?.(f)}):void 0,...d}),Bd=({children:t})=>e(jsxRuntime.Fragment,{children:t}),ja=class{};_t();P();var Bb=(t,r)=>r!==void 0?r:typeof t=="number"?t:t==="small"?18:t==="large"?30:t==="inherit"?"1em":22,xe=t=>({fontSize:o,size:n,sx:a,className:i,style:s,titleAccess:l,...d})=>{let u=Ue(a,i,s);return e(Tt,{name:t,size:Bb(o,n),className:u.className,style:u.style,"aria-label":d["aria-label"]??l,...d})},So=xe("tree"),Ho=xe("add"),Hd=xe("duplicate"),rl=xe("down"),zd=xe("navigationRight"),Vd=xe("navigationRight"),ol=xe("up"),Wd=xe("delete"),$d=xe("camera"),_d=xe("accept"),Gd=xe("accept"),ri=xe("navigationRight"),Ud=xe("dimension"),Kd=xe("decline"),wo=xe("decline"),qd=xe("decline"),Xd=xe("decline"),oi=xe("delete"),ni=xe("delete"),Yd=xe("download"),Zd=xe("move"),jd=xe("edit"),an=xe("slimDown"),Qd=xe("filter"),sn=xe("sum"),Jd=xe("lineChart"),ep=xe("document"),Vr=xe("slimDown"),tp=xe("navigationLeft"),ko=xe("navigationRight"),ai=xe("slimUp"),ii=xe("navigationLeft"),si=xe("navigationRight"),rp=xe("dimension"),op=xe("splitOne"),li=xe("menu"),np=xe("microphone"),ap=xe("microphone"),ip=xe("microphone"),sp=xe("qrCode"),Po=xe("save"),zo=xe("search"),lp=xe("search"),cp=xe("paperPlane"),dp=xe("paperPlane"),pp=xe("wrench"),up=xe("sort"),ci=xe("splitTwo"),mp=xe("favorite"),gp=xe("favorite"),fp=xe("stop"),bp=xe("tableRow"),di=xe("collapseAll"),pi=xe("expandAll"),ln=xe("tableColumn"),hp=xe("overview"),vp=xe("hide");P();var zb=[{field:"value",label:"Value",minWidth:120},{field:"label",label:"Description",minWidth:180}],Cp=t=>Array.isArray(t)?t:t==null||t===""?[]:[t],kr=t=>String(t),xp=(t,r)=>t[r],Sp=t=>{let r=t.value??t.id??t.key??t.code;return typeof r=="number"||typeof r=="string"?r:""},Vb=t=>{let r=t.label??t.description??t.name??t.title;return String(typeof r=="number"||typeof r=="string"?r:Sp(t))},Wb=t=>{let r=t.description??t.subtitle;return typeof r=="number"||typeof r=="string"?String(r):void 0},wp=({value:t=null,items:r=[],columns:o,mode:n="single",dialogTitle:a="Value Help",searchPlaceholder:i="Search values...",selectLabel:s="Select",clearLabel:l="Clear",cancelLabel:d="Cancel",valueHelpLabel:u="Open value help",noResultsText:p="No matching values",loading:f=false,clearable:b=true,allowManualInput:m=true,validateManualInput:v=true,manualInputErrorText:y="Enter a valid value.",selectedItems:g=[],displayValue:x,getOptionValue:h=Sp,getOptionLabel:C=Vb,getOptionDescription:k=Wb,onChange:w,onSearch:T,disabled:I,InputProps:S,onFocus:A,onBlur:R,onKeyDown:M,error:N,helperText:E,...O})=>{let F=Cr(),_=n==="multiple",[B,Y]=er.useState(false),[W,j]=er.useState(false),[V,z]=er.useState(""),[K,q]=er.useState(null),[fe,se]=er.useState(false),[ue,Se]=er.useState(()=>Cp(t)),[$e,ke]=er.useState(""),[le,Ee]=er.useState(""),Me=er.useMemo(()=>o&&o.length>0?o:zb,[o]),Pe=K??r,Ve=er.useMemo(()=>{let te=[...g,...r,...K??[]],he=new Map;return te.forEach(Ne=>{he.set(kr(h(Ne)),Ne);}),he},[h,r,K,g]),tt=er.useMemo(()=>Cp(t),[t]),nt=er.useMemo(()=>tt.map(String).join(", "),[tt]);er.useEffect(()=>{B||Se(tt);},[B,tt]),er.useEffect(()=>{!W&&!le&&ke(nt);},[W,nt,le]);let it=er.useMemo(()=>{let te=V.trim().toLowerCase();if(!te||T)return Pe;let he=Me.filter(Ne=>Ne.searchable!==false);return Pe.filter(Ne=>[h(Ne),C(Ne),k(Ne),...he.map(st=>xp(Ne,st.field))].some(st=>String(st??"").toLowerCase().includes(te)))},[Pe,k,C,h,T,V,Me]),X=er.useMemo(()=>{if(x!==void 0)return x;if(tt.length===0)return "";let te=he=>{let Ne=Ve.get(kr(he));if(!Ne)return String(he);let Je=C(Ne);return Je&&Je!==String(he)?`${he} - ${Je}`:String(he)};return _?tt.length>2?`${tt.length} selected`:tt.map(te).join(", "):te(tt[0])},[x,C,_,Ve,tt]),De=er.useCallback(async()=>{if(T){se(true);try{let te=await T(V);Array.isArray(te)&&q(te);}finally{se(false);}}},[T,V]),ye=()=>{I||(Se(tt),Y(true));},Be=()=>{Y(false);},at=()=>{w?.(_?[]:null,_?[]:null),Se([]),ke(""),Ee("");},Ze=te=>{let he=h(te);if(_){Se(Ne=>Ne.some(st=>kr(st)===kr(he))?Ne.filter(st=>kr(st)!==kr(he)):[...Ne,he]);return}Se([he]);},St=()=>{let te=ue.map(he=>Ve.get(kr(he))).filter(he=>!!he);_?w?.(ue,te):w?.(ue[0]??null,te[0]??null),Ee(""),Y(false);},Mt=te=>{if(te.key==="F4"){te.preventDefault(),ye();return}if(te.key==="Enter"&&m&&!At($e,true)){te.preventDefault();return}M?.(te);},Ot=te=>v?te.every(he=>Ve.has(kr(he))):true,At=(te,he)=>{if(_){let Je=te.split(/[,;\n]/).map(pt=>pt.trim()).filter(Boolean);if(Je.length===0)return Ee(""),w?.([],[]),true;if(!Ot(Je))return he&&Ee(y),false;Ee("");let st=Je.map(pt=>Ve.get(kr(pt))).filter(pt=>!!pt);return w?.(Je,st),true}let Ne=te.trim();return Ne?Ot([Ne])?(Ee(""),w?.(Ne,Ve.get(kr(Ne))??null),true):(he&&Ee(y),false):(Ee(""),w?.(null,null),true)},re=te=>{if(!m)return;let he=te.target.value;ke(he),Ee(""),At(he,false);},Ke=f||fe,Fe=tt.length>0,ve=m&&(W||!!le)?$e:X;return c(jsxRuntime.Fragment,{children:[e(ze,{...O,className:["orb-value-help-field",b&&Fe&&!I?"orb-value-help-has-clear":"",O.className??""].filter(Boolean).join(" "),disabled:I,value:ve,error:!!le||N,helperText:le||E,onChange:re,onFocus:te=>{j(true),ke(nt),A?.(te);},onBlur:te=>{m&&At($e,true),j(false),R?.(te);},onKeyDown:Mt,InputProps:{...S,readOnly:!m,endAdornment:c("span",{className:"orb-value-help-actions",children:[Ke?e(Xr,{size:18}):null,b&&Fe&&!I?e(ae,{className:"orb-value-help-clear-trigger",size:"small",tooltip:l,"aria-label":l,onMouseDown:te=>te.preventDefault(),onClick:te=>{te.stopPropagation(),at();},children:e(Tt,{name:"decline",size:14})}):null,e(ae,{className:"orb-value-help-search-trigger",size:"small",tooltip:u,"aria-label":u,onMouseDown:te=>te.preventDefault(),onClick:te=>{te.stopPropagation(),ye();},disabled:I,children:e(Tt,{name:"search",size:16})})]})}}),c(Lt,{open:B,onClose:Be,fullWidth:true,maxWidth:820,hideCloseButton:true,PaperProps:{sx:te=>({borderRadius:2,overflow:"hidden",border:`1px solid ${te.palette.divider}`,boxShadow:F==="dark"?`0 24px 80px ${rt(te.palette.common.black,.72)}`:`0 24px 80px ${rt(te.palette.common.black,.18)}`})},children:[c("div",{className:"orb-dialog-title",sx:te=>({display:"flex",alignItems:"center",justifyContent:"space-between",gap:2,px:2.5,py:2,pr:1.5,borderBottom:`1px solid ${te.palette.divider}`,bgcolor:te.palette.background.paper}),children:[c("div",{children:[e(L,{sx:{fontSize:"1.05rem",fontWeight:800,lineHeight:1.25},children:a}),_?e(L,{variant:"body2",color:"text.secondary",sx:{mt:.25},children:`${ue.length} selected`}):null]}),e(ae,{"aria-label":"Close",onClick:Be,size:"small",children:e(wo,{fontSize:"small"})})]}),c("div",{className:"orb-dialog-content",sx:{p:0},children:[c(ie,{direction:{xs:"column",sm:"row"},spacing:1,sx:te=>({px:2.5,py:1.5,borderBottom:`1px solid ${te.palette.divider}`,bgcolor:F==="dark"?rt(te.palette.common.white,.025):rt(te.palette.primary.main,.035)}),children:[e(ze,{size:"small",fullWidth:true,autoFocus:true,value:V,placeholder:i,onChange:te=>z(te.target.value),onKeyDown:te=>{te.key==="Enter"&&(te.preventDefault(),De());},InputProps:{startAdornment:e(so,{position:"start",children:e(Tt,{name:"search",size:16})}),sx:te=>({borderRadius:1,bgcolor:te.palette.background.paper,"& fieldset":{borderColor:rt(te.palette.text.primary,F==="dark"?.2:.16)},"&:hover fieldset":{borderColor:rt(te.palette.primary.main,.52)},"&:focus-within fieldset":{borderColor:te.palette.primary.main}})}}),T?e(we,{variant:"outlined",onClick:()=>{De();},disabled:Ke,sx:{minWidth:96,textTransform:"none",fontWeight:700},children:Ke?e(Xr,{size:18}):"Search"}):null]}),e("div",{sx:{maxHeight:420},children:c("table",{className:"orb-tbl",stickyHeader:true,size:"small",children:[e("thead",{children:c("tr",{children:[e("td",{padding:"checkbox",sx:te=>({bgcolor:F==="dark"?"var(--orb-canvas)":te.palette.background.paper,borderBottom:`1px solid ${te.palette.divider}`})}),Me.map(te=>e("td",{align:te.align==="inherit"?void 0:te.align,sx:he=>({minWidth:te.minWidth,width:te.width,fontSize:"0.78rem",fontWeight:800,bgcolor:F==="dark"?"var(--orb-canvas)":he.palette.background.paper,borderBottom:`1px solid ${he.palette.divider}`}),children:te.label},String(te.field)))]})}),c("tbody",{children:[it.map(te=>{let he=h(te),Ne=ue.some(Je=>kr(Je)===kr(he));return c("tr",{hover:true,selected:Ne,onClick:()=>Ze(te),onDoubleClick:()=>{_||(Se([he]),w?.(he,te),Y(false));},sx:Je=>({cursor:"pointer","&.orb-selected":{bgcolor:rt(Je.palette.primary.main,F==="dark"?.22:.12)},"&.orb-selected:hover":{bgcolor:rt(Je.palette.primary.main,F==="dark"?.28:.18)}}),children:[e("td",{padding:"checkbox",children:e(It,{size:"small",checked:Ne})}),Me.map(Je=>{let st=xp(te,Je.field);return e("td",{align:Je.align==="inherit"?void 0:Je.align,sx:{fontSize:"0.82rem",py:1},children:Je.render?Je.render(st,te):String(st??"")},String(Je.field))})]},kr(he))}),it.length===0?e("tr",{children:e("td",{colSpan:Me.length+1,children:e("div",{sx:{py:5,textAlign:"center",color:"text.secondary"},children:p})})}):null]})]})})]}),c("div",{className:"orb-dialog-actions",sx:te=>({px:2.5,py:1.5,borderTop:`1px solid ${te.palette.divider}`,bgcolor:te.palette.background.paper,"& .orb-btn":{textTransform:"none",fontWeight:700}}),children:[b&&(Fe||ue.length>0)?e(we,{onClick:at,children:l}):null,e("div",{sx:{flex:1}}),e(we,{onClick:Be,children:d}),e(we,{variant:"contained",onClick:St,disabled:!_&&ue.length===0,children:s})]})]})]})};P();var ui=({title:t,hideHeader:r,children:o})=>c("div",{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[!r&&e("div",{sx:{mb:2},children:e(L,{variant:"h4",children:t})}),e("div",{sx:{flex:1,overflow:"hidden"},children:o})]});var nl={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"},al={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"},Jn={width:30,height:30,p:.25,flex:"0 0 auto","& svg":{fontSize:20}},ea={width:30,height:30,minWidth:30,minHeight:30,p:.25,flex:"0 0 auto","& svg":{fontSize:20}},kp={display:"flex",alignItems:"center",justifyContent:"center",gap:.25,width:"100%",minWidth:0},pr={width:32,height:32,minWidth:32,minHeight:32,p:0,flex:"0 0 auto",borderRadius:1,color:"text.secondary","& svg, & [data-sap-icon]":{width:16,height:16,fontSize:16,strokeWidth:1.8}};P();var $b={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"}},mi=({rowsPerPage:t=20,rowsPerPageOptions:r=[20,50,100,-1],page:o=0,count:n=0,onRowsPerPageChange:a,onPageChange:i})=>{let{t:s}=pe(),l=r.length>0?r:[20,50,100,-1],d=Math.max(0,o),u=t===-1?1:Math.max(1,Math.ceil(n/t)),p=Math.min(d+1,u),f=d>0,b=d<u-1&&t!==-1;return c("div",{className:"orb-table-pager",children:[e(L,{className:"orb-table-pager-label",children:s("table.toolbar.itemsPerPage")}),e(ct,{title:s("table.toolbar.itemsPerPage"),children:e(zt,{size:"small",variant:"standard",value:t,"aria-label":s("table.toolbar.itemsPerPage"),fullWidth:false,disableUnderline:true,onChange:m=>a?.(Number(m.target.value)),sx:$b,children:l.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(ae,{className:"orb-table-pager-button","aria-label":"Previous page",size:"small",onClick:()=>i?.(Math.max(d-1,0)),disabled:!f,sx:pr,children:e(tp,{})}),c(L,{className:"orb-table-pager-page",title:s("table.toolbar.pageOf",{current:p,total:u}),children:[p," / ",u]}),e(ae,{className:"orb-table-pager-button","aria-label":"Next page",size:"small",onClick:()=>i?.(Math.min(d+1,u-1)),disabled:!b,sx:pr,children:e(ko,{})})]})};P();var gi=({value:t="",onChange:r})=>{let{t:o}=pe();return e("div",{className:"orb-table-toolbar-search",children:e(ze,{className:"orb-table-toolbar-search-field",size:"small",placeholder:o("table.toolbar.searchPlaceholder"),value:t,onChange:n=>r?.(n.target.value),InputProps:{startAdornment:e(so,{position:"start",children:e(zo,{size:16})})}})})};P();var fi=t=>{let{t:r}=pe(),o=Array.isArray(t.actions)?t.actions:t.actions?[t.actions]:[],n=Array.isArray(t.extraTools)?t.extraTools:t.extraTools?[t.extraTools]:[],a=[...o,...n],i=!!(t.showCreateButton||t.showEditButton||t.showDeleteButton),s=!!(t.onOpenGraphReport||t.onLayoutSave&&!t.layoutManager||t.layoutManager);return e(Dd,{className:"orb-table-toolbar",role:"toolbar","aria-label":r("table.title.default"),children:c("div",{className:"orb-table-toolbar-primary",children:[e(gi,{value:t.filterText,onChange:l=>{t.setFilterText(l),t.onPageChange?.(0);}}),e(mi,{rowsPerPage:t.rowsPerPage,rowsPerPageOptions:t.rowsPerPageOptions,page:t.page,count:t.count,onRowsPerPageChange:t.onRowsPerPageChange,onPageChange:t.onPageChange}),a.length>0?e("div",{className:"orb-table-toolbar-custom",children:a.map((l,d)=>e(er__namespace.default.Fragment,{children:l},`toolbar-custom-${d}`))}):null,e("span",{className:"orb-table-toolbar-spacer"}),c("div",{className:"orb-table-toolbar-actions",children:[c("div",{className:"orb-table-tool-group",children:[!t.disableGrouping&&e(ct,{title:r("table.toolbar.groupBy"),children:e(ae,{className:"orb-table-tool-button",sx:pr,onClick:l=>t.setGroupAnchorEl(t.groupAnchorEl?null:l.currentTarget),children:e(Ja,{badgeContent:t.grouping?.length,color:"primary",invisible:!t.grouping?.length,children:e(So,{})})})}),e(ct,{title:r("table.toolbar.summary"),children:e(ae,{className:`orb-table-tool-button ${t.showSummary?"orb-is-active":""}`,active:!!t.showSummary,sx:pr,onClick:l=>t.setSummaryAnchorEl(t.summaryAnchorEl?null:l.currentTarget),children:e(sn,{})})}),e(ct,{title:r("table.toolbar.columns"),children:e(ae,{className:"orb-table-tool-button",sx:pr,onClick:l=>t.setAnchorEl(t.anchorEl?null:l.currentTarget),children:e(ln,{})})}),e(ct,{title:r("table.toolbar.export"),children:e(ae,{className:"orb-table-tool-button",sx:pr,onClick:t.handleExport,children:e(Yd,{})})})]}),i&&c("div",{className:"orb-table-tool-group",children:[t.showCreateButton&&e(ct,{title:r("table.toolbar.newItem"),children:e(ae,{className:"orb-table-tool-button",onClick:t.onOpenCreateDialog,color:"primary.main",sx:pr,children:e(Ho,{})})}),t.showEditButton&&e(ct,{title:r("table.toolbar.editItem"),children:e("span",{children:e(ae,{className:"orb-table-tool-button",onClick:t.onOpenEditDialog,color:"primary.main",disabled:!!t.editDisabled,sx:pr,children:e(jd,{})})})}),t.showDeleteButton&&e(ct,{title:r("table.toolbar.deleteItem"),children:e("span",{children:e(ae,{className:"orb-table-tool-button",onClick:t.onOpenDeleteConfirm,disabled:!!t.deleteDisabled,sx:{...pr,color:"error.main"},children:e(oi,{})})})})]}),s&&c("div",{className:"orb-table-tool-group",children:[t.onOpenGraphReport&&e(ct,{title:r("table.toolbar.graphicReport"),children:e(ae,{className:"orb-table-tool-button",sx:pr,onClick:t.onOpenGraphReport,children:e(Jd,{})})}),t.onLayoutSave&&!t.layoutManager&&e(ct,{title:r("table.toolbar.saveLayout"),children:e(ae,{className:"orb-table-tool-button",sx:pr,onClick:l=>t.onLayoutSave(l),children:e(Po,{})})}),t.layoutManager]})]})]})})};var bi=Object.freeze({Translate:{toString(t){if(!t)return;let{x:r,y:o}=t;return "translate3d("+(r?Math.round(r):0)+"px, "+(o?Math.round(o):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;let{scaleX:r,scaleY:o}=t;return "scaleX("+r+") scaleY("+o+")"}},Transform:{toString(t){if(t)return [bi.Translate.toString(t),bi.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:r,duration:o,easing:n}=t;return r+" "+o+"ms "+n}}});P();var hi=t=>{let{t:r}=pe(),{onSelectAllClick:o,order:n,orderBy:a,sortBy:i=[],numSelected:s=0,rowCount:l=0,onRequestSort:d,onContextMenu:u,columns:p,visibleColumns:f,selectionMode:b,grouping:m=[],isAllExpanded:v=false,handleToggleAll:y,onColumnResize:g,columnWidths:x,enableColumnReorder:h=false,disableSorting:C=false}=t,[k,w]=er.useState(null),T=er.useRef(null),I=W=>j=>{C||k||d(W);},S=(W,j,V)=>{W.preventDefault(),W.stopPropagation(),w(j),T.current={startX:W.clientX,startWidth:V,colId:j},document.addEventListener("mousemove",A),document.addEventListener("mouseup",R),document.body.style.cursor="col-resize";},A=W=>{if(!T.current)return;let{startX:j,startWidth:V,colId:z}=T.current,K=W.clientX-j,q=Math.max(50,V+K);g&&g(z,q);},R=()=>{w(null),T.current=null,document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",R),document.body.style.cursor="";};er.useEffect(()=>()=>{document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",R);},[]);let M=b==="multiple"||b==="single",N=m.length>0&&!!y,E=r(v?"table.group.collapseAll":"table.group.expandAll"),O=p.filter(W=>f.includes(W.id)),F=new Map(i.map((W,j)=>[W.field,{...W,priority:j+1}])),_=O.map(W=>{let j=x?.[W.id]||W.minWidth||100,V=F.get(W.id);return e(Zb,{headCell:W,width:typeof j=="number"?j:100,order:n,orderBy:a,multiSortInfo:C?void 0:V,onRequestSort:I(W.id),onContextMenu:u,onResizeMouseDown:z=>S(z,W.id,typeof j=="number"?j:100),enableColumnReorder:h,disableSorting:C},W.id)}),B=O.map(W=>W.id),Y=c("tr",{children:[M&&e("th",{className:"orb-table-control-head",style:{width:56,minWidth:56,maxWidth:56},children:e(It,{color:"primary",indeterminate:s>0&&s<l,checked:l>0&&s===l,onChange:o,disabled:b==="single",sx:Jn})}),N&&e("th",{className:"orb-table-control-head",style:{width:72,minWidth:72,maxWidth:72},children:e(ct,{title:E,children:e(ae,{size:"small",onClick:W=>{W.stopPropagation(),y?.(!v);},sx:ea,children:v?e(di,{}):e(pi,{})})})}),h?e(sortable.SortableContext,{items:B,strategy:sortable.horizontalListSortingStrategy,children:_}):_]});return e("thead",{children:Y})},Zb=({headCell:t,width:r,order:o,orderBy:n,multiSortInfo:a,onRequestSort:i,onContextMenu:s,onResizeMouseDown:l,enableColumnReorder:d,disableSorting:u})=>{let{setNodeRef:p,attributes:f,listeners:b,transform:m,transition:v,isDragging:y}=sortable.useSortable({id:t.id,disabled:!d}),g=d?{transform:bi.Transform.toString(m),transition:v,opacity:y?.6:1}:{},x=u?"asc":a?.direction??(n===t.id?o:"asc"),h=!u&&(!!a||n===t.id);return c("th",{ref:d?p:void 0,className:`orb-table-head-cell ${t.numeric?"orb-num":""} ${d?"orb-is-reorderable":""} ${y?"orb-is-dragging":""}`,"aria-sort":h?x==="asc"?"ascending":"descending":"none",onContextMenu:s?C=>s(C,t.id):void 0,style:{width:r,minWidth:r,maxWidth:r,...g},...d?f:{},...d?b:{},children:[u?e("span",{className:"orb-table-head-label",children:t.label}):e(Nd,{className:"orb-table-head-sort",active:h,direction:x,onClick:i,children:c("span",{className:"orb-table-head-label",children:[t.label,a&&e("span",{className:"orb-table-sort-priority",children:a.priority})]})}),e("div",{className:"orb-table-resize-handle",onMouseDown:l,onPointerDown:C=>C.stopPropagation(),onClick:C=>C.stopPropagation()})]})};P();var vi=t=>{let{t:r}=pe(),{visibleRows:o,visibleColumns:n,selected:a=[],handleClick:i,columns:s,toggleGroupExpand:l,expandedGroups:d=new Set,selectionMode:u,grouping:p=[],isGroupFullyExpanded:f,handleExpandGroupRecursively:b,handleCollapseGroupRecursively:m,emptyLabel:v,getRowDataKey:y,getRowProps:g,getGroupRowProps:x}=t,h=T=>a.indexOf(T)!==-1,C=u==="multiple"||u==="single",k=p.length>0,w=n.length+(C?1:0)+(k?1:0);return c("tbody",{children:[o.map((T,I)=>{if(T.type==="group"){let S=d.has(T.id),A=T.childIds||[],R=A.filter(W=>h(W)).length,M=A.length>0&&R===A.length,N=R>0&&R<A.length,E={entry:T,data:T,id:T.id,index:I,selected:M,group:true},O=x?.(E)||{},{className:F,onClick:_,...B}=O,Y=W=>{if(W.stopPropagation(),!!t.onSelectionChange)if(M){let j=a.filter(V=>!A.includes(V));t.onSelectionChange(j);}else {let j=Array.from(new Set([...a,...A]));t.onSelectionChange(j);}};return c("tr",{...B,"data-ctable-row-key":y?.(E),className:["orb-table-group-row",F].filter(Boolean).join(" "),onClick:_,sx:W=>({backgroundColor:"var(--orb-surface)","& th, & td":{color:W.palette.text.primary,borderBottomColor:W.palette.divider},"& .orb-icon-btn":{color:W.palette.text.primary},"& .orb-chk":{color:W.palette.text.secondary},"& .orb-chk:has(input:checked), & .orb-chk:has(input:indeterminate)":{color:W.palette.primary.main}}),children:[C&&e("td",{padding:"checkbox",sx:nl,children:e(It,{size:"small",checked:M,indeterminate:N,onChange:Y,onClick:W=>W.stopPropagation(),sx:Jn})}),k&&e("td",{padding:"checkbox",sx:al,children:c("div",{sx:kp,children:[p.length>1&&T.level<p.length-1&&e(ct,{title:f?.(T.id)?r("table.group.collapseAll"):r("table.group.expandAll"),children:e(ae,{size:"small",onClick:()=>{f?.(T.id)?m?.(T.id):b?.(T.id);},sx:ea,children:f?.(T.id)?e(di,{}):e(pi,{})})}),e(ae,{size:"small",onClick:()=>l&&l(T.id),sx:ea,children:S?e(Vr,{}):e(ko,{})})]})}),e("td",{colSpan:n.length,sx:{py:1,pl:T.level*3+1},children:c(L,{variant:"body2",fontWeight:"bold",color:"text.primary",sx:{fontSize:"0.85rem"},children:[T.field,": ",T.value," (",T.count,")"]})})]},T.id)}else {let S=T.data||T,A=T.id||S.id||I,R=h(A),M=`enhanced-table-checkbox-${I}`,N={entry:T,data:S,id:A,index:I,selected:R,group:false},E=g?.(N)||{},{className:O,onClick:F,..._}=E,Y=(T.level!==void 0?T.level:0)*4;return c("tr",{..._,"data-ctable-row-key":y?.(N),className:[R?"orb-is-selected":"",O].filter(Boolean).join(" "),onClick:W=>{F?.(W),W.defaultPrevented||i?.(W,S);},role:C?"checkbox":_.role,"aria-checked":C?R:_["aria-checked"],tabIndex:_.tabIndex??-1,children:[C&&e("td",{padding:"checkbox",sx:nl,children:e(It,{color:"primary",checked:R,inputProps:{"aria-labelledby":M},sx:Jn})}),k&&e("td",{padding:"checkbox",sx:al}),s.filter(W=>n.includes(W.id)).map((W,j)=>{let z=j===0&&Y>0?{pl:Y+2}:{};return e("td",{className:W.numeric?"orb-num":void 0,align:W.numeric?"right":"left",sx:z,children:W.render?W.render(S[W.id],S):(function(){let q=S[W.id];if(W.numeric){if(typeof q=="number")return q.toLocaleString();if(typeof q=="string"&&q.trim()!==""&&!isNaN(Number(q)))return Number(q).toLocaleString()}return q})()},W.id)})]},A)}}),o.length===0&&e("tr",{children:e("td",{colSpan:w,align:"center",children:v??r("common.noData")})})]})};P();var Pp=t=>{let{columns:r=[],visibleColumns:o,summaryRow:n,selectionMode:a,grouping:i=[],columnWidths:s={}}=t;if(!t.showSummary)return null;let l=a==="multiple"||a==="single",d=i.length>0,u=r.filter(p=>o.includes(p.id));return e("tfoot",{className:"orb-table-footer",style:{zIndex:t.zIndex},children:c("tr",{children:[l&&e("td",{className:"orb-table-footer-control",style:{width:56,minWidth:56,maxWidth:56}}),d&&e("td",{className:"orb-table-footer-control",style:{width:72,minWidth:72,maxWidth:72}}),u.map(p=>e("td",{className:`orb-table-footer-cell ${p.numeric?"orb-num":""}`,style:{width:s[p.id]||p.minWidth||100,minWidth:s[p.id]||p.minWidth||100,maxWidth:s[p.id]||p.minWidth||100},children:(function(){let b=n[p.id];return b==null||b===""?"":typeof b=="number"?b.toLocaleString():typeof b=="string"&&b.trim()!==""&&!isNaN(Number(b))?Number(b).toLocaleString():b})()},p.id))]})})};P();var Tp=t=>{let{t:r}=pe();return e("div",{sx:{p:2},children:e(L,{children:r("table.mobile.notImplemented")})})};P();var pn=({groupAnchorEl:t,setGroupAnchorEl:r,grouping:o,setGrouping:n,columns:a})=>{let{t:i}=pe(),[s,l]=er.useState(o);er.useEffect(()=>{t&&l(o);},[t,o]);let d=()=>{l(o),r(null);},u=f=>{l(b=>b.includes(f)?b.filter(m=>m!==f):[...b,f]);},p=()=>{n(s),r(null);};return c(Qt,{anchorEl:t,open:!!t,onClose:d,sx:{width:224,minWidth:224,maxHeight:360,overflowY:"auto"},children:[c("div",{className:"orb-table-group-menu-header",onClick:f=>f.stopPropagation(),children:[e(L,{className:"orb-table-group-menu-title",variant:"subtitle2",children:i("table.menu.groupBy")}),s.length>0&&e(we,{className:"orb-table-group-menu-clear",size:"small",color:"error",onClick:f=>{f.stopPropagation(),l([]);},children:i("table.menu.clearAll")})]}),e(Dt,{className:"orb-table-group-menu-divider"}),a.map(f=>{let b=s.includes(f.id),m=s.indexOf(f.id)+1;return e("option",{className:"orb-table-group-menu-option",selected:b,onClick:v=>{v.stopPropagation(),u(f.id);},children:c("div",{className:"orb-table-group-menu-option-content",children:[e(It,{className:"orb-table-group-menu-checkbox",checked:b,size:"small"}),e(Gt,{className:"orb-table-group-menu-label",primary:f.label}),b&&e("span",{className:"orb-table-group-menu-order","aria-label":`${i("table.menu.groupBy")} ${m}`,children:m})]})},f.id)}),c("div",{className:"orb-table-group-menu-footer",children:[e(we,{size:"small",variant:"ghost",onClick:d,children:i("common.cancel")}),e(we,{size:"small",variant:"primary",onClick:p,children:i("common.ok")})]})]})},un=({anchorEl:t,setAnchorEl:r,columns:o,visibleColumns:n,toggleColumnVisibility:a})=>{let{t:i}=pe();return c(Qt,{anchorEl:t,open:!!t,onClose:()=>r(null),children:[e("option",{disabled:true,children:e(Gt,{primary:i("table.menu.visibleColumns")})}),e(Dt,{}),o.map(s=>c("option",{onClick:()=>a(s.id),children:[e(It,{checked:n.includes(s.id),size:"small"}),e(Gt,{primary:s.label})]},s.id))]})},yi=({anchorEl:t,setAnchorEl:r,showSummary:o,setShowSummary:n,columns:a,summaryColumns:i,toggleSummaryColumn:s})=>{let{t:l}=pe();return c(Qt,{anchorEl:t,open:!!t,onClose:()=>r(null),children:[e("option",{children:e(Qn,{control:e(ei,{checked:o,onChange:d=>n(d.target.checked),size:"small"}),label:l("table.menu.showSummaryRow")})}),e(Dt,{}),a.filter(d=>d.numeric).map(d=>c("option",{onClick:()=>s(d.id),disabled:!o,children:[e(It,{checked:i.includes(d.id),size:"small"}),e(Gt,{primary:d.label})]},d.id)),a.filter(d=>d.numeric).length===0&&e("option",{disabled:true,children:e(Gt,{primary:l("table.menu.noNumericColumns")})})]})},Ci=({contextMenu:t,handleCloseContextMenu:r,columns:o,visibleColumns:n,toggleColumnVisibility:a})=>{let{t:i}=pe();return c(Qt,{open:t!==null,onClose:r,anchorReference:"anchorPosition",anchorPosition:t!==null?{top:t.mouseY,left:t.mouseX}:void 0,children:[e("option",{onClick:r,children:i("common.copy")}),e(Dt,{}),e("option",{disabled:true,children:i("table.menu.visibleColumns")}),o.map(s=>c("option",{onClick:()=>a(s.id),children:[e(zr,{children:n.includes(s.id)&&e(_d,{fontSize:"small"})}),e(Gt,{children:s.label})]},s.id))]})},Dp=({contextMenu:t,handleClose:r,columns:o,visibleColumns:n,grouping:a,summaryColumns:i,showSummary:s,sortBy:l,orderBy:d,order:u,onSortAsc:p,onSortDesc:f,onClearSort:b,onHideColumn:m,onToggleGroup:v,onToggleSummary:y,onOpenSortDialog:g})=>{let{t:x}=pe(),h=t?.columnId??"",C=o.find(M=>M.id===h),k=a.includes(h),w=i.includes(h),T=!!C?.numeric,I=l.find(M=>M.field===h),S=I?I.direction==="asc":d===h&&u==="asc",A=I?I.direction==="desc":d===h&&u==="desc",R=S||A;return c(Qt,{open:t!==null,onClose:r,anchorReference:"anchorPosition",anchorPosition:t!==null?{top:t.mouseY,left:t.mouseX}:void 0,children:[e("option",{disabled:true,sx:{opacity:"1 !important",fontWeight:700},children:e(Gt,{primary:C?.label??h})}),e(Dt,{}),c("option",{onClick:()=>{p(h),r();},selected:S,children:[e(zr,{children:e(ol,{fontSize:"small"})}),e(Gt,{primary:x("table.headerMenu.sortAsc")})]}),c("option",{onClick:()=>{f(h),r();},selected:A,children:[e(zr,{children:e(rl,{fontSize:"small"})}),e(Gt,{primary:x("table.headerMenu.sortDesc")})]}),R&&c("option",{onClick:()=>{b(h),r();},children:[e(zr,{children:e(Ud,{fontSize:"small"})}),e(Gt,{primary:x("table.headerMenu.clearSort")})]}),c("option",{onClick:()=>{g(),r();},children:[e(zr,{children:e(Ho,{fontSize:"small"})}),e(Gt,{primary:x("table.headerMenu.configureSort")})]}),e(Dt,{}),c("option",{onClick:()=>{v(h),r();},selected:k,children:[e(zr,{children:e(So,{fontSize:"small"})}),e(Gt,{primary:x(k?"table.headerMenu.ungroup":"table.headerMenu.group")})]}),T&&s&&c("option",{onClick:()=>{y(h),r();},selected:w,children:[e(zr,{children:e(sn,{fontSize:"small"})}),e(Gt,{primary:x(w?"table.headerMenu.removeSummary":"table.headerMenu.addSummary")})]}),e(Dt,{}),c("option",{onClick:()=>{m(h),r();},children:[e(zr,{children:e(vp,{fontSize:"small"})}),e(Gt,{primary:x("table.headerMenu.hideColumn")})]})]})},Np=({open:t,onClose:r,columns:o,initialRules:n,onApply:a,onClear:i})=>{let{t:s}=pe(),[l,d]=er.useState([]);er.useEffect(()=>{t&&d(n.length>0?n.map(y=>({...y})):[]);},[t,n]);let u=er.useMemo(()=>new Set(l.map(y=>y.field)),[l]),p=er.useMemo(()=>o.filter(y=>!u.has(y.id)),[o,u]),f=()=>{let y=p[0];y&&d(g=>[...g,{field:y.id,direction:"asc"}]);},b=y=>{d(g=>g.filter((x,h)=>h!==y));},m=(y,g)=>{d(x=>x.map((h,C)=>C===y?{...h,...g}:h));},v=(y,g)=>{d(x=>{let h=y+g;if(h<0||h>=x.length)return x;let C=[...x],[k]=C.splice(y,1);return C.splice(h,0,k),C});};return e(Lt,{open:t,onClose:r,maxWidth:620,fullWidth:true,className:"orb-table-sort-dialog",title:s("table.sortDialog.title"),actions:c(jsxRuntime.Fragment,{children:[e(we,{className:"orb-table-sort-clear",variant:"neutral",disabled:l.length===0&&n.length===0,onClick:()=>{i(),r();},children:s("table.sortDialog.clearAll")}),e("span",{className:"orb-table-sort-action-spacer"}),e(we,{variant:"neutral",onClick:r,children:s("common.cancel")}),e(we,{variant:"primary",onClick:()=>{a(l),r();},children:s("common.ok")})]}),children:c("div",{className:"orb-table-sort-dialog-content",children:[l.length===0?e(L,{className:"orb-table-sort-empty",variant:"body2",children:s("table.sortDialog.empty")}):e(ie,{className:"orb-table-sort-rules",spacing:1,children:l.map((y,g)=>{let x=new Set(l.filter((C,k)=>k!==g).map(C=>C.field)),h=o.filter(C=>!x.has(C.id));return c("div",{className:"orb-table-sort-rule",children:[e(Ja,{className:"orb-table-sort-order",badgeContent:g+1,color:"primary"}),e(zt,{size:"small",value:y.field,onChange:C=>m(g,{field:C.target.value}),options:h.map(C=>({value:C.id,label:C.label}))}),e(zt,{size:"small",value:y.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(ae,{className:"orb-table-sort-icon-button",size:"small",onClick:()=>v(g,-1),disabled:g===0,children:e(ol,{fontSize:"small"})}),e(ae,{className:"orb-table-sort-icon-button",size:"small",onClick:()=>v(g,1),disabled:g===l.length-1,children:e(rl,{fontSize:"small"})}),e(ae,{className:"orb-table-sort-icon-button orb-table-sort-delete",size:"small",onClick:()=>b(g),children:e(ni,{fontSize:"small"})})]},`sort-rule-${g}`)})}),e(we,{size:"small",onClick:f,disabled:p.length===0,startIcon:e(Ho,{}),variant:"secondary",className:"orb-table-sort-add",children:s("table.sortDialog.addRule")})]})})};P();var ta=(t,r=2)=>t.toLocaleString(void 0,{maximumFractionDigits:r}),Ap=({kpis:t})=>{let{t:r}=pe(),o=[{label:r("graph.kpi.totalRecords"),value:ta(t.totalRecords,0),color:"var(--orb-fg)"},{label:r("graph.kpi.totalReport"),value:ta(t.totalReportHours),color:"var(--orb-fg)"},{label:r("graph.kpi.totalBillable"),value:ta(t.totalBillableHours),color:"var(--orb-primary)"},{label:r("graph.kpi.efficiency"),value:`${t.efficiency.toFixed(2)}%`,color:"var(--orb-accent)"},{label:r("graph.kpi.amount"),value:ta(t.totalAmount),color:"var(--orb-primary)"},{label:r("graph.kpi.flagged"),value:ta(t.flaggedCount,0),color:"var(--orb-err)"}];return e("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(140px, 1fr))",gap:12},children:o.map(n=>c(Ae,{elevation:0,sx:{padding:12,minHeight:96,display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[e(L,{variant:"caption",muted:true,children:n.label}),e(L,{variant:"h3",sx:{fontWeight:800,color:n.color,fontVariantNumeric:"tabular-nums"},children:n.value})]},n.label))})};P();var xi=({title:t,subtitle:r,children:o})=>c(Ae,{elevation:0,sx:{padding:16},children:[e(L,{variant:"h4",sx:{fontWeight:700},children:t}),r&&e(L,{variant:"body2",muted:true,sx:{marginBottom:16},children:r}),o]});P();var ra=({data:t,orientation:r="horizontal",valueSuffix:o="",minHeight:n=210,activeName:a,onItemClick:i})=>{if(t.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let s=Math.max(...t.map(l=>l.value),1);return r==="vertical"?e("div",{style:{display:"flex",gap:1,alignItems:"flex-end",minHeight:n},children:t.map(l=>c("div",{style:{flex:1,minWidth:0},children:[e("div",{onClick:()=>i?.(l),sx:{height:`${Math.max(l.value/s*180,6)}px`,background:l.name===a?"primary.dark":"primary.main",borderRadius:"8px 8px 0 0",cursor:i?"pointer":"default",opacity:a&&l.name!==a?.45:1}}),e(L,{variant:"caption",title:l.name,sx:{display:"block",mt:.5},children:l.name}),c(L,{variant:"caption",muted:true,children:[l.value.toFixed(1),o]})]},l.name))}):e(ie,{spacing:1,children:t.map(l=>c("div",{style:{display:"grid",gridTemplateColumns:"140px 1fr 64px",gap:1},children:[e(L,{variant:"caption",muted:true,title:l.name,children:l.name}),e("div",{onClick:()=>i?.(l),sx:{alignSelf:"center",background:"action.hover",height:10,borderRadius:999,overflow:"hidden",cursor:i?"pointer":"default",opacity:a&&l.name!==a?.45:1},children:e("div",{style:{width:`${l.value/s*100}%`,height:"100%",background:l.name===a?"primary.dark":"primary.main"}})}),c(L,{variant:"caption",sx:{textAlign:"right",fontWeight:600},children:[l.value.toFixed(1),o]})]},l.name))})};P();var Ep=({data:t,color:r="var(--orb-chart-1)",valueSuffix:o="",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(b=>b.value),l=Math.min(...s,0),u=Math.max(...s,1)-l||1,p=t.map((b,m)=>{let v=i+m*(a-i*2)/Math.max(t.length-1,1),y=n-i-(b.value-l)/u*(n-i*2);return {x:v,y,...b}}),f=p.map(b=>`${b.x},${b.y}`).join(" ");return c("div",{children:[c("div",{component:"svg",viewBox:`0 0 ${a} ${n}`,style:{width:"100%",height:n},children:[e("line",{x1:i,y1:n-i,x2:a-i,y2:n-i,style:{stroke:"var(--orb-chart-grid)"}}),e("polyline",{fill:"none",style:{stroke:r},strokeWidth:3,points:f}),p.map(b=>e("circle",{cx:b.x,cy:b.y,r:4,style:{fill:r}},b.name))]}),e("div",{sx:{mt:1,display:"grid",gridTemplateColumns:`repeat(${t.length}, minmax(0, 1fr))`,gap:1},children:t.map(b=>c("div",{style:{minWidth:0},children:[e(L,{variant:"caption",title:b.name,sx:{display:"block"},children:b.name}),c(L,{variant:"caption",muted:true,children:[b.value.toFixed(1),o]})]},b.name))})]})};P();var Lp=({data:t,barColor:r="var(--orb-chart-1)",lineColor:o="var(--orb-chart-5)",height:n=220})=>{if(t.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let a=640,i=28,s=Math.max(...t.map(p=>p.barValue),1),l=Math.max(...t.map(p=>p.lineValue),1),d=t.map((p,f)=>{let b=(a-i*2)/t.length,m=Math.max(b*.5,8),v=i+f*b+(b-m)/2,y=p.barValue/s*(n-i*2),g=n-i-y;return {x:v,y:g,barHeight:y,barWidth:m,item:p}}),u=t.map((p,f)=>{let b=(a-i*2)/t.length,m=i+f*b+b/2,v=n-i-p.lineValue/l*(n-i*2);return {x:m,y:v,item:p}});return c(ie,{spacing:1.25,children:[c("div",{component:"svg",viewBox:`0 0 ${a} ${n}`,style:{width:"100%",height:n},children:[e("line",{x1:i,y1:n-i,x2:a-i,y2:n-i,style:{stroke:"var(--orb-chart-grid)"}}),d.map(p=>e("rect",{x:p.x,y:p.y,width:p.barWidth,height:Math.max(p.barHeight,4),rx:6,style:{fill:r}},p.item.name)),e("polyline",{fill:"none",style:{stroke:o},strokeWidth:3,points:u.map(p=>`${p.x},${p.y}`).join(" ")}),u.map(p=>e("circle",{cx:p.x,cy:p.y,r:3.5,style:{fill:o}},`${p.item.name}-line`))]}),e("div",{style:{display:"grid",gridTemplateColumns:`repeat(${t.length}, minmax(0, 1fr))`,gap:1},children:t.map(p=>c("div",{style:{minWidth:0},children:[e(L,{variant:"caption",title:p.name,sx:{display:"block"},children:p.name}),c(L,{variant:"caption",muted:true,sx:{display:"block"},children:["Bar: ",p.barValue.toFixed(1)]}),c(L,{variant:"caption",muted:true,sx:{display:"block"},children:["Line: ",p.lineValue.toFixed(1)]})]},p.name))})]})};P();var jb=t=>{let o=.2+Math.max(0,Math.min(1,t))*.8;return `color-mix(in oklch, var(--orb-chart-1) ${Math.round(o*100)}%, transparent)`},Op=({data:t})=>{if(t.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let r=Array.from(new Set(t.map(i=>i.x))),o=Array.from(new Set(t.map(i=>i.y))),n=Math.max(...t.map(i=>i.value),1),a=new Map(t.map(i=>[`${i.y}__${i.x}`,i.value]));return e("div",{style:{overflowX:"auto"},children:c("div",{style:{display:"grid",gridTemplateColumns:`120px repeat(${r.length}, minmax(64px, 1fr))`,gap:1,minWidth:120+r.length*64},children:[e("div",{}),r.map(i=>e(L,{variant:"caption",sx:{textAlign:"center",fontWeight:600},children:i},i)),o.map(i=>c("div",{style:{display:"contents"},children:[e(L,{variant:"caption",sx:{alignSelf:"center"},children:i}),r.map(s=>{let l=a.get(`${i}__${s}`)||0,d=l/n;return e("div",{sx:{height:36,borderRadius:1,background:jb(d),border:"1px solid color-mix(in oklch, var(--orb-muted) 20%, transparent)",display:"flex",alignItems:"center",justifyContent:"center"},children:e(L,{variant:"caption",sx:{fontWeight:700},children:l.toFixed(1)})},`${i}-${s}`)})]},i))]})})};P();var Qb=["var(--orb-chart-1)","var(--orb-chart-2)","var(--orb-chart-5)","var(--orb-chart-negative)","var(--orb-chart-4)","var(--orb-chart-3)"],Si=({data:t,variant:r="donut",colors:o=Qb,size:n=180,activeName:a,onItemClick:i})=>{if(t.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let s=0,l=t.map((d,u)=>{let p=s;return s+=d.percent,`${o[u%o.length]} ${p}% ${s}%`});return c(ie,{direction:{xs:"column",sm:"row"},spacing:2,alignItems:"center",children:[e("div",{style:{width:n,height:n,borderRadius:"50%",background:`conic-gradient(${l.join(", ")})`,position:"relative",flexShrink:0},children:r==="donut"&&e("div",{style:{position:"absolute",inset:Math.round(n*.18),background:"background.paper",borderRadius:"50%"}})}),e(ie,{spacing:1,sx:{minWidth:180},children:t.map((d,u)=>c("div",{onClick:()=>i?.(d),sx:{display:"flex",alignItems:"center",gap:1,cursor:i?"pointer":"default",opacity:a&&d.name!==a?.45:1},children:[e("div",{style:{width:10,height:10,borderRadius:"50%",background:o[u%o.length]}}),e(L,{variant:"caption",sx:{flex:1},children:d.name}),c(L,{variant:"caption",sx:{fontWeight:700},children:[d.percent.toFixed(0),"%"]})]},d.name))})]})};P();var Fp=({effect:t,branches:r})=>{if(r.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let o=r.filter((a,i)=>i%2===0),n=r.filter((a,i)=>i%2===1);return c(ie,{spacing:1.5,children:[e("div",{style:{display:"grid",gridTemplateColumns:`repeat(${Math.max(o.length,1)}, minmax(0, 1fr))`,gap:1},children:o.map(a=>c("div",{sx:{borderLeft:"2px solid",borderColor:"divider",pl:1},children:[e(L,{variant:"caption",sx:{fontWeight:700},children:a.title}),a.causes.map(i=>e(L,{variant:"caption",muted:true,sx:{display:"block"},children:i},i))]},a.title))}),c("div",{style:{position:"relative",height:32},children:[e("div",{style:{position:"absolute",inset:"50% 0 auto 0",borderTop:"2px solid",borderColor:"primary.main"}}),e("div",{sx:{position:"absolute",right:0,top:"calc(50% - 12px)",px:1,py:.25,borderRadius:1,background:"primary.main",color:"primary.contrastText"},children:e(L,{variant:"caption",sx:{fontWeight:700},children:t})})]}),e("div",{style:{display:"grid",gridTemplateColumns:`repeat(${Math.max(n.length,1)}, minmax(0, 1fr))`,gap:1},children:n.map(a=>c("div",{sx:{borderLeft:"2px solid",borderColor:"divider",pl:1},children:[e(L,{variant:"caption",sx:{fontWeight:700},children:a.title}),a.causes.map(i=>e(L,{variant:"caption",muted:true,sx:{display:"block"},children:i},i))]},a.title))})]})};P();var Bp=({data:t,height:r=240})=>{if(t.length===0)return e(L,{variant:"body2",muted:true,children:"No data"});let o=0,n=t.map(f=>{let b=f.type==="total"?0:o,m=f.type==="total"?f.value:o+f.value;return f.type!=="total"&&(o=m),{...f,start:b,end:m,delta:m-b}}),a=n.flatMap(f=>[f.start,f.end]),i=Math.min(...a,0),s=Math.max(...a,1),l=680,d=30,u=s-i||1,p=f=>r-d-(f-i)/u*(r-d*2);return c("div",{children:[c("div",{component:"svg",viewBox:`0 0 ${l} ${r}`,style:{width:"100%",height:r},children:[e("line",{x1:d,y1:p(0),x2:l-d,y2:p(0),style:{stroke:"var(--orb-chart-grid)"}}),n.map((f,b)=>{let m=(l-d*2)/n.length,v=Math.max(m*.55,8),y=d+b*m+(m-v)/2,g=p(Math.max(f.start,f.end)),x=p(Math.min(f.start,f.end)),h=f.type==="total"?"var(--orb-chart-1)":f.delta>=0?"var(--orb-chart-positive)":"var(--orb-chart-negative)";return c("g",{children:[e("rect",{x:y,y:g,width:v,height:Math.max(x-g,4),rx:6,style:{fill:h}}),e("text",{x:y+v/2,y:g-6,textAnchor:"middle",fill:"currentColor",fontSize:"11",children:f.end.toFixed(1)})]},f.name)})]}),e("div",{sx:{mt:1,display:"grid",gridTemplateColumns:`repeat(${n.length}, minmax(0, 1fr))`,gap:1},children:n.map(f=>e(L,{variant:"caption",title:f.name,children:f.name},f.name))})]})};var oa=({apiKey:t,query:r,zoom:o=14,mapType:n="roadmap"})=>{let a=encodeURIComponent(r);return `https://www.google.com/maps/embed/v1/place?key=${encodeURIComponent(t)}&q=${a}&zoom=${o}&maptype=${n}`},uR=(t,r=360)=>{let o=oa(t);return `<iframe width="100%" height="${r}" style="border:0" loading="lazy" allowfullscreen referrerpolicy="no-referrer-when-downgrade" src="${o}"></iframe>`};P();var Hp=({apiKey:t,query:r,embedUrl:o,zoom:n=14,mapType:a="roadmap",height:i=320})=>{let s=o||(t&&r?oa({apiKey:t,query:r,zoom:n,mapType:a}):"");return s?c("div",{children:[e("div",{component:"iframe",src:s,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",sx:{width:"100%",height:i,border:0,borderRadius:2}}),c(L,{variant:"caption",muted:true,sx:{mt:.75,display:"block"},children:["If iframe is blocked, open directly: ",e("a",{href:s,target:"_blank",rel:"noreferrer",children:"Google Maps"})]})]}):e("div",{children:e(L,{variant:"body2",muted:true,children:"Google Map requires `embedUrl` or (`apiKey` + `query`)."})})};var wi=({keyword:t,location:r,src:o="orbcafe-ui"})=>{if(r){let n=encodeURIComponent(r.name||t||"Location");return `https://uri.amap.com/marker?position=${r.lng},${r.lat}&name=${n}&src=${encodeURIComponent(o)}&coordinate=gaode&callnative=0`}return t?`https://uri.amap.com/search?keyword=${encodeURIComponent(t)}&src=${encodeURIComponent(o)}&callnative=0`:"https://uri.amap.com/search?keyword=%E5%8C%97%E4%BA%AC&src=orbcafe-ui&callnative=0"};P();var zp=({keyword:t,location:r,embedUrl:o,height:n=320})=>{let a=o||wi({keyword:t,location:r?{lng:r.lng,lat:r.lat,name:r.name}:void 0});return c("div",{children:[e("div",{component:"iframe",src:a,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",sx:{width:"100%",height:n,border:0,borderRadius:2}}),c(L,{variant:"caption",muted:true,sx:{mt:.75,display:"block"},children:["If iframe is blocked, open directly: ",e("a",{href:a,target:"_blank",rel:"noreferrer",children:"AMap"})]})]})};P();var Vp=({billableByPrimary:t,efficiencyBySecondary:r,statusDistribution:o,interaction:n})=>{let{t:a}=pe();return c("div",{style:{display:"grid",gap:12,gridTemplateColumns:"repeat(auto-fit, minmax(320px, 1fr))"},children:[e(xi,{title:a("graph.chart.billable.title"),subtitle:a("graph.chart.billable.subtitle"),children:e(ra,{data:t,orientation:"horizontal",activeName:n?.filters?.primaryDimension,onItemClick:i=>n?.onPrimaryDimensionClick?.(i.name)})}),e(xi,{title:a("graph.chart.efficiency.title"),subtitle:a("graph.chart.efficiency.subtitle"),children:e(ra,{data:r,orientation:"vertical",valueSuffix:"%",activeName:n?.filters?.secondaryDimension,onItemClick:i=>n?.onSecondaryDimensionClick?.(i.name)})}),e(xi,{title:a("graph.chart.status.title"),subtitle:a("graph.chart.status.subtitle"),children:e(Si,{data:o,variant:"donut",activeName:n?.filters?.status,onItemClick:i=>n?.onStatusClick?.(i.name)})})]})};P();var eh=["doubao-lite","gpt-4o-mini","gpt-4.1-mini","claude-3.5-sonnet"],th=["zh","en","de","fr","ja","ko"],Wp=({open:t,onClose:r,value:o,onSaveAll:n,modelOptions:a=eh,promptLangOptions:i=th,analysisTemplateOptions:s=[],responseTemplateOptions:l=[],defaultAnalysisTemplateId:d,defaultResponseTemplateId:u})=>{let[p,f]=er.useState(o),[b,m]=er.useState(d||""),[v,y]=er.useState(u||""),[g,x]=er.useState(false);er.useEffect(()=>{t&&(f(o),m(d||""),y(u||""));},[t,o,d,u]);let h=(k,w)=>{f(T=>({...T,[k]:w}));},C=async()=>{if(n)try{x(!0),await n({settings:p,analysisTemplateId:b||void 0,responseTemplateId:v||void 0});}finally{x(false);}};return c(Lt,{open:t,onClose:r,fullWidth:true,maxWidth:"lg",children:[c("div",{className:"orb-dialog-title",sx:{pr:7,pb:2.2},children:[e(L,{variant:"h5",sx:{fontWeight:800},children:"AI Settings"}),e(L,{variant:"body2",color:"text.secondary",sx:{mt:.5},children:"Configure LLM settings and editable agent prompts by language."}),e(ae,{onClick:r,sx:{position:"absolute",right:12,top:12},children:e(wo,{})})]}),e("div",{className:"orb-dialog-content",sx:{pt:"18px !important"},children:c(ie,{spacing:2.2,children:[c("div",{sx:{mt:.8,display:"grid",gap:1.5,gridTemplateColumns:{xs:"1fr",md:"repeat(2, minmax(0, 1fr))"}},children:[e("div",{children:e(ze,{size:"small",value:p.baseUrl,onChange:k=>h("baseUrl",k.target.value),fullWidth:true,label:"Base URL"})}),e("div",{children:e(ze,{size:"small",type:"password",value:p.apiKey,onChange:k=>h("apiKey",k.target.value),fullWidth:true,label:"API Key"})}),e("div",{children:e(ze,{size:"small",value:p.model,onChange:k=>h("model",k.target.value),fullWidth:true,select:true,label:"Model",children:a.map(k=>e("option",{value:k,children:k},k))})}),e("div",{children:e(ze,{size:"small",value:p.promptLang,onChange:k=>h("promptLang",k.target.value),fullWidth:true,select:true,label:"Prompt Lang",children:i.map(k=>e("option",{value:k,children:k},k))})})]}),c("div",{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[c(ze,{size:"small",value:b,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(Wn,{multiline:true,minRows:8,value:p.analysisPrompt,onChange:k=>h("analysisPrompt",k.target.value),fullWidth:true,label:"Analysis Prompt",sx:{"& textarea":{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"}}}),c(ze,{size:"small",value:v,onChange:k=>y(k.target.value),fullWidth:true,select:true,label:"Response Template",children:[e("option",{value:"",children:"Default"}),l.map(k=>e("option",{value:k.id,children:k.label},k.id))]}),e(Wn,{multiline:true,minRows:8,value:p.responsePrompt,onChange:k=>h("responsePrompt",k.target.value),fullWidth:true,label:"Response Prompt",sx:{"& textarea":{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"}}})]})]})}),c("div",{className:"orb-dialog-actions",sx:{px:3,pb:2.5,pt:1.2,gap:1},children:[e(we,{variant:"outlined",onClick:r,children:"Cancel"}),e(we,{variant:"contained",onClick:C,disabled:!n||g,children:"Save"})]})]})};P();var Pi=({open:t,onClose:r,model:o,tableContent:n,extraCharts:a,interaction:i,aiAssistant:s})=>{let{t:l}=pe(),[d,u]=er.useState(s?.defaultPrompt||""),[p,f]=er.useState(false),[b,m]=er.useState(false),v=i?.enabled!==false&&!!i,y=s?.enabled!==false,g=i?.filters||{},x=!!(g.primaryDimension||g.secondaryDimension||g.status),h=s?.placeholder||"Ask AI to analyze data, create charts, or find insights...";er.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 w=d.trim();if(!(!w||!s?.onSubmit))try{f(!0),await s.onSubmit(w,{filters:g,model:o});}finally{f(false);}};return e(Lt,{open:t,onClose:r,fullWidth:true,maxWidth:1400,hideCloseButton:true,children:c("div",{style:{height:"80vh",display:"flex",flexDirection:"column",background:"var(--orb-canvas)"},children:[e("div",{style:{padding:16,borderBottom:"1px solid var(--orb-border)"},children:c(ie,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:12,children:[c(ie,{direction:"row",spacing:10,alignItems:"center",sx:{flexWrap:"wrap"},children:[e(L,{variant:"h3",sx:{fontWeight:800},children:o.title}),e(xt,{label:l("graph.records",{count:o.kpis.totalRecords})}),v&&g.primaryDimension&&e(xt,{tone:"outline",label:`${i?.fieldMapping.primaryDimension}: ${g.primaryDimension}`,onDelete:()=>i?.onClearFilter("primaryDimension")}),v&&g.secondaryDimension&&e(xt,{tone:"outline",label:`${i?.fieldMapping.secondaryDimension}: ${g.secondaryDimension}`,onDelete:()=>i?.onClearFilter("secondaryDimension")}),v&&g.status&&e(xt,{tone:"outline",label:`${i?.fieldMapping.status}: ${g.status}`,onDelete:()=>i?.onClearFilter("status")}),v&&x&&e(we,{size:"small",variant:"ghost",onClick:()=>i?.onClearAll(),children:"Clear"})]}),c(ie,{direction:"row",spacing:10,alignItems:"center",children:[y&&c("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 10px",borderRadius:999,border:"1px solid var(--orb-border)",background:"var(--orb-surface)",minWidth:320},children:[e(ae,{size:"small",onClick:s?.onVoiceInput,children:e(La,{size:16,strokeWidth:1.8})}),e("input",{className:"orb-inp orb-inp-dense",value:d,onChange:w=>u(w.target.value),onKeyDown:w=>{w.key==="Enter"&&(w.preventDefault(),k());},placeholder:h,style:{fontSize:14,border:"none",background:"transparent",flex:1,minWidth:0}}),e(ae,{size:"small",onClick:k,disabled:p||!d.trim(),children:e(qc,{size:16,strokeWidth:1.8})}),e(ae,{size:"small",onClick:()=>m(true),children:e(tn,{size:16,strokeWidth:1.8})})]}),e(ae,{onClick:r,children:e(jt,{size:18,strokeWidth:2})})]})]})}),c("div",{style:{padding:16,display:"flex",flexDirection:"column",gap:12,overflow:"auto",minHeight:0},children:[e(Ap,{kpis:o.kpis}),e(Vp,{billableByPrimary:o.charts.billableByPrimary,efficiencyBySecondary:o.charts.efficiencyBySecondary,statusDistribution:o.charts.statusDistribution,interaction:v?{filters:g,onPrimaryDimensionClick:w=>i?.onPrimaryDimensionClick(w),onSecondaryDimensionClick:w=>i?.onSecondaryDimensionClick(w),onStatusClick:w=>i?.onStatusClick(w)}:void 0}),a,n]}),e(Wp,{open:b,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 Mo={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"]},oh=5,$p=t=>t.toLowerCase().replace(/[\s_-]/g,""),Ro=(t,r,o,n)=>{if(r)return r;if(t.length===0)return n;let a=Object.keys(t[0]),i=new Map(a.map(s=>[$p(s),s]));for(let s of o){let l=i.get($p(s));if(l)return l}return a[0]||n},Pr=t=>{if(typeof t=="number")return Number.isFinite(t)?t:0;if(typeof t=="string"){let r=Number(t.replace(/,/g,"").trim());return Number.isFinite(r)?r:0}return 0},gr=(t,r)=>t==null||t===""?r:String(t),nh=(t,r,o,n,a)=>{let i=new Map;return t.forEach(s=>{let l=gr(s[r],a);i.set(l,(i.get(l)||0)+Pr(s[o]));}),Array.from(i.entries()).map(([s,l])=>({name:s,value:l})).sort((s,l)=>l.value-s.value).slice(0,n)},ah=(t,r,o,n,a,i)=>{let s=new Map;return t.forEach(l=>{let d=gr(l[r],i),u=s.get(d)||{report:0,billable:0};u.report+=Pr(l[o]),u.billable+=Pr(l[n]),s.set(d,u);}),Array.from(s.entries()).map(([l,d])=>({name:l,value:d.report>0?d.billable/d.report*100:0})).sort((l,d)=>l.value-d.value).slice(0,a)},ih=(t,r,o)=>{let n=t.length;if(n===0)return [];let a=new Map;return t.forEach(i=>{let s=gr(i[r],o);a.set(s,(a.get(s)||0)+1);}),Array.from(a.entries()).map(([i,s])=>({name:i,value:s,percent:s/n*100}))},_p=(t,r,o)=>{let n=new Map;return t.forEach(a=>{let i=gr(a[r],"N/A");n.set(i,(n.get(i)||0)+Pr(a[o]));}),Array.from(n.entries()).sort(([a],[i])=>a.localeCompare(i)).map(([a,i])=>({name:a,value:i}))},sh=(t,r,o,n,a,i)=>{let s=new Map;return t.forEach(l=>{let d=gr(l[r],i),u=s.get(d)||{report:0,billable:0};u.report+=Pr(l[o]),u.billable+=Pr(l[n]),s.set(d,u);}),Array.from(s.entries()).map(([l,d])=>({name:l,barValue:d.billable,lineValue:d.report>0?d.billable/d.report*100:0})).sort((l,d)=>d.barValue-l.barValue).slice(0,a)},lh=(t,r,o,n,a)=>{let i=new Map;return t.forEach(s=>{let l=gr(s[r],a),d=gr(s[o],a),u=`${l}__${d}`;i.set(u,(i.get(u)||0)+Pr(s[n]));}),Array.from(i.entries()).map(([s,l])=>{let[d,u]=s.split("__");return {x:d,y:u,value:l}})},ch=(t,r,o)=>{let n=_p(t,r,o),a=n.map(s=>({name:s.name,value:s.value,type:"delta"})),i=n.reduce((s,l)=>s+l.value,0);return [...a,{name:"Total",value:i,type:"total"}]},dh=(t,r,o,n,a,i)=>{let s=new Map;return t.forEach(l=>{let d=gr(l[r],i),u=`${gr(l[o],i)} / ${gr(l[n],i)}`,p=s.get(d)||new Map;p.set(u,(p.get(u)||0)+1),s.set(d,p);}),Array.from(s.entries()).map(([l,d])=>({title:l,causes:Array.from(d.entries()).sort((u,p)=>p[1]-u[1]).slice(0,a).map(([u,p])=>`${u} (${p})`)})).slice(0,6)},mn=({rows:t,config:r})=>{let{t:o}=pe(),n=o("graph.unassigned"),a=er.useMemo(()=>{let p=r?.fieldMapping;return {primaryDimension:Ro(t,p?.primaryDimension,Mo.primaryDimension,"Category"),secondaryDimension:Ro(t,p?.secondaryDimension,Mo.secondaryDimension,"Owner"),status:Ro(t,p?.status,Mo.status,"Status"),date:Ro(t,p?.date,Mo.date,"Date"),description:Ro(t,p?.description,Mo.description,"Description"),reportHours:Ro(t,p?.reportHours,Mo.reportHours,"ReportHours"),billableHours:Ro(t,p?.billableHours,Mo.billableHours,"BillableHours"),amount:Ro(t,p?.amount,Mo.amount,"Amount")}},[t,r?.fieldMapping]),i=er.useMemo(()=>t.map((p,f)=>{let b=Pr(p[a.reportHours]),m=Pr(p[a.billableHours]),v=Pr(p[a.amount]),y=b>0?m/b*100:0;return {id:`graph-row-${f}`,Date:gr(p[a.date],""),Primary:gr(p[a.primaryDimension],n),Secondary:gr(p[a.secondaryDimension],n),Description:gr(p[a.description],""),ReportHours:b,BillableHours:m,Amount:v,Efficiency:y,Status:gr(p[a.status],n)}}),[t,a,n]),s=er.useMemo(()=>{let p=i.length,f=i.reduce((x,h)=>x+Pr(h.ReportHours),0),b=i.reduce((x,h)=>x+Pr(h.BillableHours),0),m=i.reduce((x,h)=>x+Pr(h.Amount),0),v=f>0?b/f*100:0,y=r?.statusFlagValues||["flag","flagged","warning","risk"],g=i.filter(x=>y.includes(gr(x.Status,"").toLowerCase())).length;return {totalRecords:p,totalReportHours:f,totalBillableHours:b,efficiency:v,totalAmount:m,flaggedCount:g}},[i,r?.statusFlagValues]),l=r?.topN||oh,d=er.useMemo(()=>({billableByPrimary:nh(i,"Primary","BillableHours",l,n),efficiencyBySecondary:ah(i,"Secondary","ReportHours","BillableHours",l,n),statusDistribution:ih(i,"Status",n),lineByDate:_p(i,"Date","BillableHours"),comboByPrimary:sh(i,"Primary","ReportHours","BillableHours",l,n),heatmapPrimarySecondary:lh(i,"Primary","Secondary","BillableHours",n),waterfallBillable:ch(i,"Date","BillableHours"),fishboneStatusCauses:dh(i,"Status","Primary","Secondary",3,n)}),[i,l,n]),u=er.useMemo(()=>({title:r?.title||o("graph.reportTitle"),kpis:s,charts:d,table:{columns:[{id:"Date",label:a.date},{id:"Primary",label:a.primaryDimension},{id:"Secondary",label:a.secondaryDimension},{id:"Description",label:a.description},{id:"ReportHours",label: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:i}}),[d,r?.title,a,s,i,o]);return {fieldMapping:a,model:u}};var gn=t=>String(t??"").trim(),Ii=(t={})=>{let[r,o]=er.useState(t),n=er.useCallback((d,u)=>{o(p=>{let f=u?.trim();if(!f){let b={...p};return delete b[d],b}if(p[d]===f){let b={...p};return delete b[d],b}return {...p,[d]:f}});},[]),a=er.useCallback(d=>{o(u=>{if(!u[d])return u;let p={...u};return delete p[d],p});},[]),i=er.useCallback(()=>{o({});},[]),s=er.useMemo(()=>!!(r.primaryDimension||r.secondaryDimension||r.status),[r]),l=er.useCallback((d,u)=>d.filter(p=>!(r.primaryDimension&&gn(p[u.primaryDimension])!==gn(r.primaryDimension)||r.secondaryDimension&&gn(p[u.secondaryDimension])!==gn(r.secondaryDimension)||r.status&&gn(p[u.status])!==gn(r.status))),[r]);return {filters:r,setFilter:n,clearFilter:a,clearAll:i,hasActiveFilters:s,applyRows:l}};P();var Ri=({variants:t,currentVariantId:r,onLoad:o,onSave:n,onDelete:a,onSetDefault:i})=>{let{t:s}=pe(),[l,d]=er.useState(false),[u,p]=er.useState(""),[f,b]=er.useState(false),[m,v]=er.useState(false),y=t.find(h=>h.id===r),g=()=>{p(y?.name||s("variant.newVariant")),b(y?.isDefault||false),v(y?.isPublic||false),d(true);},x=()=>{n({name:u,isDefault:f,isPublic:m,description:""}),d(false);};return c("div",{className:"orb-variant-management",children:[e(zt,{size:"small",fullWidth:false,sx:{width:"min(240px, 100%)","& .orb-inp":{fontSize:"0.85rem",backgroundColor:"var(--orb-p50)",borderColor:"color-mix(in oklch, var(--orb-primary) 30%, var(--orb-border))"}},value:r||"",options:[{value:"",label:s("variant.selectVariant"),disabled:true},...t.map(h=>({value:h.id,label:h.name+(h.isDefault?` (${s("variant.defaultSuffix")})`:"")}))],onChange:h=>{let C=t.find(k=>k.id===h.target.value);C&&o(C);}}),e(ct,{title:s("variant.saveView"),children:e(ae,{className:"orb-variant-save-button",onClick:g,size:"small",color:"primary",children:e(Po,{fontSize:"small"})})}),c(Lt,{open:l,onClose:()=>d(false),children:[e("div",{className:"orb-dialog-title",children:s("variant.saveView")}),c("div",{className:"orb-dialog-content",children:[e(ze,{autoFocus:true,margin:"dense",label:s("variant.viewName"),fullWidth:true,variant:"outlined",value:u,onChange:h=>p(h.target.value)}),e(Qn,{control:e(It,{checked:f,onChange:h=>b(h.target.checked)}),label:s("variant.setDefault")}),e(Qn,{control:e(It,{checked:m,onChange:h=>v(h.target.checked)}),label:s("variant.publicAllUsers")})]}),c("div",{className:"orb-dialog-actions",children:[e(we,{onClick:()=>d(false),children:s("common.cancel")}),e(we,{onClick:x,variant:"contained",children:s("common.save")})]})]})]})};P();var Up=({appId:t,tableKey:r="default",currentFilters:o,currentLayoutId:n,layoutRefs:a,onLoad:i,variantService:s,serviceUrl:l,onError:d,onSuccess:u,currentVariantId:p,onVariantChange:f})=>{let{t:b}=pe(),[m,v]=er.useState([]),[y,g]=er.useState(""),x=`orbcafe.variants.${t}.${r}`,h=p!==void 0?p:y,C=N=>{p===void 0&&g(N),f&&f(N);},k=er.useCallback(()=>{try{let N=localStorage.getItem(x);if(!N)return [];let E=JSON.parse(N);return Array.isArray(E)?E:[]}catch{return []}},[x]),w=er.useCallback(N=>{try{localStorage.setItem(x,JSON.stringify(N));}catch{}},[x]),T=er.useCallback(N=>{v(N);let E=N.find(O=>O.isDefault);E&&!h&&(C(E.id),i(E));},[h,i,C]),I=er.useCallback(async()=>{if(!t)return [];try{let N=[];if(s)N=await s.getVariants(t,r);else if(l){let E=await fetch(`${l}/api/variants?appId=${encodeURIComponent(t)}&tableKey=${encodeURIComponent(r)}`);if(!E.ok)throw new Error(b("variant.toast.fetchFailed"));N=await E.json();}else N=k();return T(N),N}catch(N){console.error("Error fetching variants",N);let E=k();return T(E),d&&d(b("variant.toast.fetchFailed")),E}},[t,r,s,l,k,T,d,b]);return er.useEffect(()=>{I();},[t,r]),e(Ri,{variants:m,currentVariantId:h,onLoad:N=>{C(N.id),i(N);},onSave:async N=>{let E=Date.now().toString(),O;try{let F=N.scope||"Both",_=m.find(j=>j.name===N.name);E=_?_.id:Date.now().toString();let B=[];if(_&&(Array.isArray(_.filters)?B=[..._.filters]:_.filters&&(B=[{scope:"default",filters:_.filters}])),F==="Search"||F==="Both"){let j=(Array.isArray(o),o);if(j)if(Array.isArray(j)&&j.length>0&&j[0].scope)j.forEach(V=>{let z=B.findIndex(K=>K.scope===V.scope);z>=0?B[z]=V:B.push(V);});else {let V={scope:r,filters:j},z=B.findIndex(K=>K.scope===r);z>=0?B[z]=V:B.push(V);}}let Y=_?.layout||{},W=[];if(_&&Array.isArray(_.layoutRefs)&&(W=[..._.layoutRefs]),F==="Layout"||F==="Both")if(a&&a.length>0)a.forEach(j=>{let V=W.findIndex(z=>z.tableKey===j.tableKey);V>=0?W[V]=j:W.push(j);});else {let j={tableKey:r,layoutId:n||null},V=W.findIndex(z=>z.tableKey===r);V>=0?W[V]=j:W.push(j);}if(O={appId:t,tableKey:r,...N,scope:F,id:E,createdAt:new Date().toISOString(),filters:B,layout:Y,layoutRefs:W},s)await s.saveVariant(O,t,r);else if(l){if(!(await fetch(`${l}/api/variants`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(O)})).ok)throw new Error(b("variant.toast.saveFailed"))}else {let V=m.some(z=>z.id===E)?m.map(z=>z.id===E?O:z):[...m,O];v(V),w(V);}u&&u(b("variant.toast.saveSuccess")),(s||l)&&await I(),C(E),i(O);}catch(F){console.error("Error saving variant",F);let B=m.some(Y=>Y.id===E)?m.map(Y=>Y.id===E?O:Y):[...m,O];v(B),w(B),C(E),i(O),d&&d(b("variant.toast.saveFailed"));}},onDelete:async N=>{try{if(s)await s.deleteVariant(N);else if(l){if(!(await fetch(`${l}/api/variants/${N}`,{method:"DELETE"})).ok)throw new Error(b("variant.toast.deleteFailed"))}else {let E=m.filter(O=>O.id!==N);v(E),w(E);}h===N&&C(""),(s||l)&&I(),u&&u(b("variant.toast.deleteSuccess"));}catch(E){console.error("Error deleting variant",E);let O=m.filter(F=>F.id!==N);v(O),w(O),h===N&&C(""),d&&d(b("variant.toast.deleteFailed"));}},onSetDefault:async N=>{try{let E=m.find(F=>F.id===N);if(!E)return;let O={appId:t,tableKey:r,...E,isDefault:!0};if(s)await s.setDefaultVariant(N,t,r);else if(l){if(!(await fetch(`${l}/api/variants`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(O)})).ok)throw new Error(b("variant.toast.defaultFailed"))}else {let F=m.map(_=>({..._,isDefault:_.id===N}));v(F),w(F);}(s||l)&&await I(),u&&u(b("variant.toast.defaultSuccess"));}catch(E){console.error("Error setting default variant",E);let O=m.map(F=>({...F,isDefault:F.id===N}));v(O),w(O),d&&d(b("variant.toast.defaultFailed"));}}})};P();oo__default.default.extend(bh__default.default);oo__default.default.extend(hh__default.default);oo__default.default.extend(rb__default.default);var aa="YYYY-MM-DD",yh=[null,null],Vo="0.85rem",Ch={en:"en",zh:"zh-cn",fr:"fr",de:"de",ja:"ja",ko:"ko"},xh=({isInRange:t,isStart:r,isEnd:o,isHovered:n,disableMargin:a,sx:i,...s})=>{let l=sr();return e(Od,{...s,sx:[...Array.isArray(i)?i:i?[i]:[],t?{borderRadius:0,backgroundColor:l.palette.primary.light,color:l.palette.primary.contrastText}:{},n&&!t&&!r&&!o?{borderRadius:0,backgroundColor:l.palette.action.hover,border:`1px dashed ${l.palette.primary.main}`}:{},r?{borderRadius:"50% 0 0 50%",backgroundColor:l.palette.primary.main,color:l.palette.primary.contrastText}:{},o?{borderRadius:"0 50% 50% 0",backgroundColor:l.palette.primary.main,color:l.palette.primary.contrastText}:{},r&&o?{borderRadius:"50%"}:{}]})},qp=({label:t,value:r=yh,onChange:o})=>{let{t:n,locale:a}=pe(),i=Ch[a]||"en",s=t||n("dateRange.label"),[l,d]=er.useState(null),[u,p]=er.useState(r),[f,b]=er.useState("start"),[m,v]=er.useState(null),[y,g]=er.useState((r[0]||oo__default.default()).locale(i)),[x,h]=er.useState(""),[C,k]=er.useState(""),[w,T]=er.useState(false),[I,S]=er.useState(false),A=er__namespace.default.useRef(r);er.useEffect(()=>{let[j,V]=r,[z,K]=A.current,q=ue=>ue&&typeof ue.isSame=="function",fe=!(j===null&&z===null||q(j)&&q(z)&&j.isSame(z,"day")),se=!(V===null&&K===null||q(V)&&q(K)&&V.isSame(K,"day"));(fe||se)&&(p(r),r[0]&&q(r[0])&&g(r[0].locale(i))),A.current=r;},[r,i]),er.useEffect(()=>{h(u[0]?u[0].locale(i).format(aa):""),k(u[1]?u[1].locale(i).format(aa):""),T(false),S(false);},[u,i]);let R=(j,V)=>{let z=V.trim(),K=j==="start"?T:S;if(!z){let se=j==="start"?[null,u[1]]:[u[0],null];K(false),p(se);return}let q=oo__default.default(z,aa,true).locale(i);if(!q.isValid()){K(true);return}K(false);let fe=[...u];if(j==="start")fe[0]=q,fe[1]&&q.isAfter(fe[1],"day")&&(fe[1]=null),b(fe[1]?"start":"end");else {let se=fe[0];se&&q.isBefore(se,"day")?(fe=[q,null],b("end")):(fe[1]=q,b("start"));}p(fe),g(q);},M=j=>{d(j.currentTarget);},N=()=>{d(null),b("start"),v(null);},E=!!l,O=j=>{if(!j)return;let V=[...u];if(f==="start")V=[j,null],b("end");else {let z=V[0];z&&j.isBefore(z)?(V=[j,null],b("end")):(V=[z,j],b("start"));}p(V);},F=j=>{let V=oo__default.default().locale(i),z=[null,null];switch(j){case "today":z=[V,V];break;case "week":z=[V.startOf("week"),V.endOf("week")];break;case "month":z=[V.startOf("month"),V.endOf("month")];break}p(z),b("start"),g(V);},_=()=>{o&&o(u),N();},B=()=>{p(r),b("start"),N();},Y=er.useCallback(j=>{let{day:V,...z}=j,[K,q]=u,fe=K?V.isSame(K,"day"):false,se=q?V.isSame(q,"day"):false,ue=K&&q?V.isBetween(K,q,"day","()"):false,Se=false;return f==="end"&&K&&!q&&m&&V.isAfter(K,"day")&&V.isBefore(m.add(1,"day"),"day")&&(Se=true),e(xh,{...z,day:V,disableMargin:true,isStart:fe,isEnd:se,isInRange:ue||Se,onMouseEnter:()=>v(V)})},[u,f,m]),W=j=>j?j.locale(i).format("YYYY-MM-DD"):"";return c("div",{className:"orb-date-range-picker",children:[e(ze,{className:"orb-date-range-field",label:s,value:u[0]?`${W(u[0])} - ${W(u[1])}`:"",onClick:M,fullWidth:true,size:"small",InputLabelProps:{sx:{fontSize:Vo}},InputProps:{readOnly:true,sx:{fontSize:Vo,"& .orb-inp":{fontSize:Vo},paddingRight:"4px"},endAdornment:e(ae,{className:"orb-date-range-calendar-trigger",size:"small",onClick:M,tooltip:s,children:e(Tt,{name:"calendar",size:16})})}}),c(ti,{open:E,anchorEl:l,onClose:N,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},className:"orb-date-range-popover",children:[e("div",{className:"orb-date-range-inputs",children:c(ie,{className:"orb-date-range-input-row",direction:"row",alignItems:"center",spacing:1.5,justifyContent:"space-between",children:[e(ze,{className:"orb-date-range-manual-field",label:n("dateRange.startDate"),placeholder:aa,value:x,error:w,size:"small",onFocus:()=>b("start"),onChange:j=>{h(j.target.value),w&&T(false);},onBlur:()=>R("start",x),onKeyDown:j=>{j.key==="Enter"&&(j.preventDefault(),R("start",x));},sx:{"& .orb-inp":{fontSize:Vo,py:.75},"& label":{fontSize:Vo}}}),e(zd,{color:"action",fontSize:"small"}),e(ze,{className:"orb-date-range-manual-field",label:n("dateRange.endDate"),placeholder:aa,value:C,error:I,size:"small",onFocus:()=>{u[0]&&b("end");},onChange:j=>{k(j.target.value),I&&S(false);},onBlur:()=>R("end",C),onKeyDown:j=>{j.key==="Enter"&&(j.preventDefault(),R("end",C));},sx:{"& .orb-inp":{fontSize:Vo,py:.75},"& label":{fontSize:Vo}}})]})}),e("div",{className:"orb-date-range-shortcuts",children:c(ie,{direction:"row",spacing:1,justifyContent:"center",children:[e(xt,{label:n("dateRange.today"),onClick:()=>F("today"),clickable:true,size:"small",variant:"outlined"}),e(xt,{label:n("dateRange.thisWeek"),onClick:()=>F("week"),clickable:true,size:"small",variant:"outlined"}),e(xt,{label:n("dateRange.thisMonth"),onClick:()=>F("month"),clickable:true,size:"small",variant:"outlined"})]})}),e("div",{className:"orb-date-range-calendar",children:e(Bd,{dateAdapter:ja,adapterLocale:i,children:e(Fd,{value:null,referenceDate:y,onMonthChange:g,onYearChange:g,onChange:O,slots:{day:Y},views:["year","month","day"],openTo:"day",showDaysOutsideCurrentMonth:true})})}),e(Dt,{}),c(ie,{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:_,children:n("common.done")})]})]})]})};P();var Ni={equals:"=",contains:"\u2287",notContains:"\u2285",wildcard:"*","=":"=","!=":"!=",">":">","<":"<",">=":"\u2265","<=":"\u2264",between:"\u2194"},kh={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"},Ph=["contains","notContains",">",">=","<","<=","equals"],Yp=["=","!=",">","<",">=","<=","between"],or="0.85rem",Th=({field:t,value:r,onChange:o})=>{let{t:n}=pe(),[a,i]=er.useState(null),[s,l]=er.useState(null),[d,u]=er.useState(null),[p,f]=er.useState(""),[b,m]=er.useState(""),[v,y]=er.useState(""),[g,x]=er.useState("");er.useEffect(()=>{let M=setTimeout(()=>{x(v);},1e3);return ()=>clearTimeout(M)},[v]);let h=r?.operator||(t.type==="number"?"=":"equals"),C=r?.value,k=M=>{let N=kh[M];return N?n(N):M},w=M=>{i(a?null:M.currentTarget);},T=M=>{o({...r,operator:M,value:C}),i(null);},I={size:"small",fullWidth:true,variant:"outlined",InputLabelProps:{sx:{fontSize:or}},InputProps:{sx:{fontSize:or}},SelectProps:{MenuProps:{PaperProps:{sx:{"& .orb-menu-item, & option":{fontSize:or,paddingTop:"4px",paddingBottom:"4px",minHeight:"auto"}}}}}},S=t.type||"text";if(S==="date"){let N=(E=>{if(!E)return [null,null];if(Array.isArray(E)&&E.length===2){let O=E[0]?oo__default.default.isDayjs(E[0])?E[0]:oo__default.default(E[0]):null,F=E[1]?oo__default.default.isDayjs(E[1])?E[1]:oo__default.default(E[1]):null;return [O,F]}return oo__default.default.isDayjs(E)||typeof E=="string"?[oo__default.default.isDayjs(E)?E:oo__default.default(E),null]:[null,null]})(C);return e(qp,{label:t.label,value:N,onChange:E=>o({value:E,operator:"between"})})}if(S==="number"&&h==="between"){let M=()=>{o({value:[p,b],operator:"between"}),l(null);},N=Array.isArray(C)?`${C[0]||""} - ${C[1]||""}`:"";return c(jsxRuntime.Fragment,{children:[e(ze,{...I,label:t.label,value:N,placeholder:n("smartFilter.minMaxPlaceholder"),InputProps:{...I.InputProps,startAdornment:e(so,{position:"start",children:e(ct,{title:k("between"),children:e(ae,{size:"small",onClick:w,sx:{width:24,height:24,fontSize:or},children:Ni.between})})}),readOnly:true},onClick:E=>l(s?null:E.currentTarget)}),e(Qt,{anchorEl:a,open:!!a,onClose:()=>i(null),PaperProps:{sx:{"& .orb-menu-item, & option":{fontSize:or,minHeight:"auto",py:.5}}},children:Yp.map(E=>c("option",{selected:E===h,onClick:()=>T(E),children:[e("div",{sx:{width:24,display:"inline-block",fontWeight:"bold"},children:Ni[E]}),e(Gt,{primary:k(E),primaryTypographyProps:{fontSize:or}})]},E))}),e(ti,{open:!!s,anchorEl:s,onClose:()=>l(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},children:c("div",{sx:{p:2,display:"flex",gap:1,alignItems:"center"},children:[e(ze,{size:"small",label:n("smartFilter.min"),type:"number",value:p,onChange:E=>f(E.target.value),sx:{width:100},InputLabelProps:{sx:{fontSize:or}},InputProps:{sx:{fontSize:or}}}),e(Vd,{color:"action"}),e(ze,{size:"small",label:n("smartFilter.max"),type:"number",value:b,onChange:E=>m(E.target.value),sx:{width:100},InputLabelProps:{sx:{fontSize:or}},InputProps:{sx:{fontSize:or}}}),e(we,{variant:"contained",size:"small",onClick:M,children:n("common.ok")})]})})]})}if(t.isValueHelp||S==="value-help"){let M=t.valueHelp?.mode||"single";return e(wp,{...I,...t.valueHelp,label:t.label,placeholder:t.placeholder||t.valueHelp?.placeholder,value:C??(M==="multiple"?[]:null),mode:M,onChange:N=>o({value:N,operator:M==="multiple"?"anyOf":"equals"})})}if(S==="select")return c(zt,{size:"small",fullWidth:true,label:t.label,value:C||"",onChange:M=>o({...r,value:M.target.value,operator:"equals"}),children:[e("option",{value:"",children:n("common.none")}),t.options?.map(M=>e("option",{value:M.value,children:M.label},M.value))]});if(S==="multi-select"){let M=Array.isArray(C)?C:[],N=t.options?.filter(Y=>Y.label.toLowerCase().includes(g.toLowerCase()))||[],E=Y=>t.options?.find(W=>W.value===Y)?.label||Y,O=M.map(E),F=O.length===0?n("common.none"):O.length>2?`${O.slice(0,2).join(", ")} +${O.length-2}`:O.join(", "),_=()=>{u(null),y(""),x("");},B=Y=>{let W=M.includes(Y)?M.filter(j=>j!==Y):[...M,Y];o({...r,value:W,operator:"anyOf"});};return c("div",{className:"orb-fld",children:[e("label",{children:t.label}),c(we,{variant:"outlined",size:"small",onClick:Y=>u(d?null:Y.currentTarget),sx:{width:"100%",minHeight:36,justifyContent:"space-between",fontSize:or,fontWeight:400},children:[e("span",{sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:F}),e(Vr,{fontSize:"small"})]}),e(Qt,{anchorEl:d,open:!!d,onClose:_,PaperProps:{sx:{width:280,maxHeight:340,overflowY:"auto",p:.5}},children:c("div",{onClick:Y=>Y.stopPropagation(),sx:{display:"grid",gap:.35},children:[e(ze,{size:"small",autoFocus:true,placeholder:n("smartFilter.searchPlaceholder"),fullWidth:true,InputProps:{startAdornment:e(so,{position:"start",children:e(zo,{fontSize:"small"})}),sx:{fontSize:or}},value:v,onChange:Y=>y(Y.target.value),onKeyDown:Y=>Y.stopPropagation()}),N.length>0?N.map(Y=>{let W=M.includes(Y.value);return c("div",{role:"option","aria-selected":W,tabIndex:0,className:`orb-menu-item ${W?"orb-selected":""}`,onClick:()=>B(Y.value),onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),B(Y.value));},children:[e(It,{checked:W,size:"small",inputProps:{tabIndex:-1},sx:{pointerEvents:"none"}}),e(Gt,{primary:Y.label})]},String(Y.value))}):e("div",{className:"orb-menu-item","aria-disabled":"true",children:n("smartFilter.noOptionsFound")})]})})]})}let A=S==="number"?Yp:Ph;return c(jsxRuntime.Fragment,{children:[e(ze,{...I,className:"orb-filter-operator-field",label:t.label,sx:{minWidth:"120px"},value:C||"",type:S==="number"?"number":"text",onChange:M=>o({...r,value:M.target.value,operator:h}),InputProps:{...I.InputProps,startAdornment:e(so,{position:"start",children:e(ct,{title:k(h),children:e(ae,{className:"orb-filter-operator-trigger",size:"small",onClick:w,onMouseDown:M=>M.preventDefault(),sx:{width:24,height:24,fontSize:or,fontWeight:"bold",color:"primary.main",bgcolor:"action.hover"},children:Ni[h]})})}),endAdornment:t.hasSearchIcon?e(so,{position:"end",children:e(zo,{color:"action"})}):void 0}}),e(Qt,{anchorEl:a,open:!!a,onClose:()=>i(null),PaperProps:{sx:{"& .orb-menu-item, & option":{fontSize:or,minHeight:"auto",py:.5}}},children:A.map(M=>c("option",{selected:M===h,onClick:()=>T(M),children:[e("span",{className:"orb-filter-operator-symbol",children:Ni[M]}),e(Gt,{primary:k(M),primaryTypographyProps:{fontSize:or}})]},M))})]})},Wr=({fields:t,filters:r,onFilterChange:o,variants:n=[],currentVariantId:a,onVariantLoad:i,onVariantSave:s,onVariantDelete:l,onVariantSetDefault:d,onSearch:u,loading:p=false,appId:f,tableKey:b,currentLayout:m,currentLayoutId:v,layoutRefs:y,variantService:g,serviceUrl:x})=>{let{t:h}=pe(),[C,k]=er.useState(true),[w,T]=er.useState(null),[I,S]=er.useState(t.filter(N=>!N.hidden).map(N=>N.id)),A=(N,E)=>{o({...r,[N]:E});},R=N=>{I.includes(N)?S(I.filter(E=>E!==N)):S([...I,N]);};return c(Ae,{className:`orb-smart-filter ${C?"orb-smart-filter-expanded":"orb-smart-filter-collapsed"}`,sx:{mb:0,display:"flex",flexDirection:"column",overflow:"visible",position:"relative"},children:[C?c(jsxRuntime.Fragment,{children:[c("div",{className:"orb-smart-filter-header",children:[f?e(Up,{appId:f,tableKey:b,currentFilters:{values:r,visibleFields:I},currentLayout:m,currentLayoutId:v,layoutRefs:y,onLoad:N=>{if(!N.filters)return;let E=null;if(Array.isArray(N.filters)){let O=b||"default",F=N.filters.find(_=>_.scope===O);E=F?F.filters:null;}else E=N.filters;E&&(E.values||E.visibleFields?(E.visibleFields&&Array.isArray(E.visibleFields)&&S(E.visibleFields),E.values&&o(E.values)):o(E)),i&&i(N);},variantService:g,serviceUrl:x,currentVariantId:a}):e(Ri,{variants:n,currentVariantId:a,onLoad:i,onSave:N=>{s&&s({...N,filters:{values:r,visibleFields:I}});},onDelete:l,onSetDefault:d}),c("div",{className:"orb-smart-filter-actions",children:[e(ct,{title:h("smartFilter.addFilters"),children:e(we,{className:"orb-smart-filter-adapt",onClick:N=>T(w?null:N.currentTarget),size:"small",color:"primary",startIcon:e(pp,{fontSize:"small"}),sx:{textTransform:"none",fontSize:or,whiteSpace:"nowrap",minWidth:"fit-content"},children:h("smartFilter.adaptFilters")})}),e(ae,{className:"orb-smart-filter-go",tooltip:h("smartFilter.go"),"aria-label":h("smartFilter.go"),onClick:u,disabled:p,children:p?e(Xr,{size:16}):e(Tt,{name:"play",size:16})}),c(Qt,{anchorEl:w,open:!!w,onClose:()=>T(null),slotProps:{paper:{style:{maxHeight:400,width:"25ch"},sx:{"& .orb-menu-item, & option":{fontSize:or,minHeight:32}}}},children:[e("option",{disabled:true,children:e(Gt,{primary:h("smartFilter.visibleFilters"),primaryTypographyProps:{fontSize:or}})}),e(Dt,{}),t.map(N=>c("option",{onClick:()=>R(N.id),children:[e(It,{checked:I.includes(N.id),size:"small"}),e(Gt,{primary:N.label,primaryTypographyProps:{fontSize:or}})]},N.id))]})]})]}),e("div",{className:"orb-smart-filter-grid",children:e(tl,{container:true,spacing:2,columns:{xs:2,sm:3,md:4,lg:6},children:t.filter(N=>I.includes(N.id)).map(N=>e(tl,{size:1,children:e(Th,{field:N,value:r[N.id]||{value:"",operator:N.type==="number"?"=":"equals"},onChange:E=>A(N.id,E)})},N.id))})})]}):null,e("div",{className:"orb-smart-filter-toggle",children:e(ae,{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(ai,{className:"orb-smart-filter-toggle-icon",sx:{fontSize:20},color:"action"}):e(Vr,{className:"orb-smart-filter-toggle-icon",sx:{fontSize:20},color:"action"})})})]})};P();var Zp=({layouts:t,currentLayoutId:r,onLoad:o,onSave:n,onDelete:a,onSetDefault:i})=>{let{t:s}=pe(),[l,d]=er.useState(null),[u,p]=er.useState(false),[f,b]=er.useState(""),[m,v]=er.useState(""),[y,g]=er.useState({isDefault:false,isPublic:false}),x=t.find(I=>I.id===r),h=I=>{d(I.currentTarget);},C=()=>{d(null);},k=I=>{o(I),C();},w=()=>{b(""),v(""),g({isDefault:false,isPublic:false}),p(true),C();},T=()=>{f.trim()&&(n({name:f,description:m,...y}),p(false));};return c("div",{className:"orb-layout-actions",sx:{display:"flex",alignItems:"center",gap:.25},children:[e(ct,{title:s("layout.layoutOptions"),children:e(ae,{onClick:h,color:x?"primary":"default",size:"small",children:e(hp,{fontSize:"small"})})}),c(Qt,{anchorEl:l,open:!!l,onClose:C,align:"end",PaperProps:{sx:{width:320,maxHeight:400}},children:[e("option",{disabled:true,children:e(L,{variant:"caption",children:s("layout.selectLayout")})}),c("option",{onClick:w,children:[e(zr,{children:e(Po,{fontSize:"small"})}),e(Gt,{children:s("layout.saveCurrentLayout")})]}),e(Dt,{}),t.length===0&&e("option",{disabled:true,children:e(L,{variant:"body2",color:"text.secondary",children:s("layout.noSavedLayouts")})}),t.map((I,S)=>e("option",{onClick:()=>k(I),selected:I.id===r,children:c("div",{sx:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"},children:[c("div",{sx:{display:"flex",flexDirection:"column",overflow:"hidden",mr:1},children:[e("div",{sx:{display:"flex",alignItems:"center",gap:1},children:e(L,{variant:"body2",fontWeight:I.id===r?"bold":"normal",noWrap:true,children:I.name})}),I.description&&e(L,{variant:"caption",color:"text.secondary",noWrap:true,children:I.description})]}),c("div",{sx:{display:"flex",alignItems:"center"},onClick:A=>A.stopPropagation(),children:[e(ct,{title:I.isDefault?s("layout.removeDefault"):s("layout.setAsDefault"),children:e(ae,{size:"small",onClick:A=>{A.stopPropagation(),i(I.id);},children:I.isDefault?e(gp,{fontSize:"small",color:"warning"}):e(mp,{fontSize:"small"})})}),e(ct,{title:s("common.delete"),children:e(ae,{size:"small",color:"error",onClick:A=>{A.stopPropagation(),a(I.id);},children:e(oi,{fontSize:"small"})})})]})]})},I.id||S))]}),e(Lt,{open:u,onClose:()=>p(false),maxWidth:"xs",fullWidth:true,className:"orb-layout-save-dialog",title:s("layout.saveLayout"),actions:c(jsxRuntime.Fragment,{children:[e(we,{variant:"ghost",onClick:()=>p(false),children:s("common.cancel")}),e(we,{onClick:T,variant:"primary",disabled:!f.trim(),children:s("common.save")})]}),children:c("div",{className:"orb-layout-save-form",children:[e(ze,{label:s("layout.layoutName"),value:f,onChange:I=>b(I.target.value),fullWidth:true,autoFocus:true,size:"small",helperText:s("layout.layoutNameHelper")}),t.some(I=>I.name===f)&&e(L,{className:"orb-layout-save-warning",variant:"caption",color:"warning.main",children:s("layout.warningOverwrite")}),e(ze,{label:s("layout.layoutDescription"),value:m,onChange:I=>v(I.target.value),fullWidth:true,size:"small"}),e(It,{className:"orb-layout-save-option",checked:y.isDefault,onChange:I=>g({...y,isDefault:I.target.checked}),label:s("layout.useAsDefault")}),e(It,{className:"orb-layout-save-option",checked:y.isPublic,onChange:I=>g({...y,isPublic:I.target.checked}),label:s("layout.publicAllUsers")})]})})]})};P();var bn=({appId:t,tableKey:r="default",currentLayoutData:o,onLayoutLoad:n,targetLayoutId:a,activeLayoutId:i,serviceUrl:s,onError:l,onSuccess:d})=>{let{t:u}=pe(),[p,f]=er.useState([]),[b,m]=er.useState(""),v=`orbcafe.layouts.${t}.${r}`,y=S=>({id:S.layoutId,name:S.name,description:S.description??"",isDefault:!!S.isDefault,isPublic:!!S.isPublic,createdAt:S.createdAt??new Date().toISOString(),layoutData:S.layout??{}}),g=S=>({appId:t,tableKey:r,layoutId:S.id,name:S.name,description:S.description??"",isDefault:!!S.isDefault,isPublic:!!S.isPublic,createdAt:S.createdAt,layout:S.layoutData}),x=er.useCallback(()=>{try{let S=localStorage.getItem(v);if(!S)return [];let A=JSON.parse(S);return Array.isArray(A)?A:[]}catch{return []}},[v]),h=er.useCallback(S=>{try{localStorage.setItem(v,JSON.stringify(S));}catch{}},[v]);er.useEffect(()=>{i!==void 0&&m(i);},[i]),er.useEffect(()=>{if(a&&p.length>0){let S=p.find(A=>A.id===a);S&&(m(S.id),n(S));}},[a,p,n]);let C=er.useCallback(async()=>{if(t){if(!s){let S=x();f(S);let A=S.find(R=>R.isDefault);A&&!b&&!a&&(m(A.id),n(A));return}try{let S=await fetch(`${s}/api/layouts?appId=${encodeURIComponent(t)}&tableKey=${encodeURIComponent(r)}`);if(!S.ok)throw new Error("LAYOUT_FETCH_FAILED");let R=(await S.json()).map(y);f(R);let M=R.find(N=>N.isDefault);M&&!b&&!a&&(m(M.id),n(M));}catch(S){console.error("Error fetching layouts",S);let A=x();f(A);let R=A.find(M=>M.isDefault);R&&!b&&!a&&(m(R.id),n(R)),l&&l(u("layout.toast.loadFallback"));}}},[t,r,s,l,b,n,a,x,u]);return er.useEffect(()=>{C();},[t,r]),e(Zp,{layouts:p,currentLayoutId:b,onLoad:S=>{m(S.id),n(S);},onSave:async S=>{let A=p.find(N=>N.name===S.name),R=A?A.id:Date.now().toString(),M={id:R,...S,createdAt:new Date().toISOString(),layoutData:o,isDefault:S.isDefault??false,isPublic:S.isPublic??false};if(!s){let E=p.some(O=>O.id===R)?p.map(O=>O.id===R?M:O):[...p,M];f(E),h(E),m(R),n(M),d&&d(u("layout.toast.saveLocalSuccess"));return}try{if(!(await fetch(`${s}/api/layouts`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g(M))})).ok)throw new Error("LAYOUT_SAVE_FAILED");d&&d(u("layout.toast.saveSuccess")),await C(),m(R),n(M);}catch(N){console.error("Error saving layout",N);let O=p.some(F=>F.id===R)?p.map(F=>F.id===R?M:F):[...p,M];f(O),h(O),m(R),n(M),d&&d(u("layout.toast.saveLocalSuccess")),l&&l(u("layout.toast.backendUnavailableSavedLocal"));}},onDelete:async S=>{if(!s){let A=p.filter(R=>R.id!==S);f(A),h(A),b===S&&m(""),d&&d(u("layout.toast.deleteLocalSuccess"));return}try{if(!(await fetch(`${s}/api/layouts/${encodeURIComponent(S)}`,{method:"DELETE"})).ok)throw new Error("LAYOUT_DELETE_FAILED");b===S&&m(""),d&&d(u("layout.toast.deleteSuccess")),await C();}catch(A){console.error("Error deleting layout",A);let R=p.filter(M=>M.id!==S);f(R),h(R),b===S&&m(""),d&&d(u("layout.toast.deleteLocalSuccess")),l&&l(u("layout.toast.backendUnavailableDeletedLocal"));}},onSetDefault:async S=>{if(!s){let A=p.map(R=>({...R,isDefault:R.id===S}));f(A),h(A),d&&d(u("layout.toast.defaultLocalSuccess"));return}try{let A=p.find(M=>M.id===S);if(!A)return;if(!(await fetch(`${s}/api/layouts`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g({...A,isDefault:!0}))})).ok)throw new Error("LAYOUT_DEFAULT_FAILED");d&&d(u("layout.toast.defaultSuccess")),await C();}catch(A){console.error("Error setting default",A);let R=p.map(M=>({...M,isDefault:M.id===S}));f(R),h(R),d&&d(u("layout.toast.defaultLocalSuccess")),l&&l(u("layout.toast.backendUnavailableDefaultLocal"));}}})};var Ai=(t,r)=>{if(!t||!t.filters)return null;if(Array.isArray(t.filters)){let o=t.filters.find(a=>a.scope===r);if(o)return o.filters;let n=t.filters.find(a=>a.scope==="default");return n?n.filters:null}return typeof t.filters=="object"?t.filters:null},Ei=(t,r)=>{if(!t)return {layout:null,layoutId:null};let o=null,n=null;if(Array.isArray(t.layoutRefs)){let a=t.layoutRefs.find(i=>i.tableKey===r);a&&(o=a.layoutId);}return !o&&t.layoutId&&(o=t.layoutId),t.layout&&typeof t.layout=="object"&&!Array.isArray(t.layout)&&(n=t.layout),{layoutId:o,layout:n}};function Qp(t,r,o){return r[o]<t[o]?-1:r[o]>t[o]?1:0}function Ih(t,r){return t==="desc"?(o,n)=>Qp(o,n,r):(o,n)=>-Qp(o,n,r)}function Mh(t,r){let o=t.map((n,a)=>[n,a]);return o.sort((n,a)=>{let i=r(n[0],a[0]);return i!==0?i:n[1]-a[1]}),o.map(n=>n[0])}var hn=t=>{let r=!!t.disableGrouping,o=!!t.disableSorting,n=er.useCallback(Z=>{let Q=String(Z?.label??Z?.id??"").length*9+64,be=typeof Z?.minWidth=="number"?Z.minWidth:0;return Math.max(100,be,Q)},[]),a=er.useCallback(()=>(t.columns||[]).filter(Z=>!!Z?.numeric).map(Z=>Z.id),[t.columns]),[i,s]=er.useState(""),[l,d]=er.useState(t.order||"asc"),[u,p]=er.useState(t.orderBy||""),[f,b]=er.useState([]),[m,v]=er.useState(t.page||0),[y,g]=er.useState(t.rowsPerPage||20),[x,h]=er.useState(t.selected||[]),[C,k]=er.useState(t.columns?t.columns.map(Z=>Z.id):[]),[w,T]=er.useState(t.columns?t.columns.map(Z=>Z.id):[]),[I,S]=er.useState(t.showSummary||false),[A,R]=er.useState(()=>a()),[M,N]=er.useState([]),[E,O]=er.useState(new Set),[F,_]=er.useState(()=>{let Z={};return (t.columns||[]).forEach($=>{Z[$.id]=n($);}),Z}),[B,Y]=er.useState(null),[W,j]=er.useState(null),[V,z]=er.useState(null),[K,q]=er.useState(null),[fe,se]=er.useState(false),[ue,Se]=er.useState(""),[$e,ke]=er.useState(""),le=r?[]:M,Ee=er.useCallback(Z=>{if(r){N([]),O(new Set),j(null);return}N(Z);},[r]);er.useEffect(()=>{r&&(N([]),O(new Set),j(null));},[r]),er.useEffect(()=>{o&&(d("asc"),p(""),b([]));},[o]),er.useEffect(()=>{t.layout&&wt(t.layout);},[t.layout]),er.useEffect(()=>{if(o){d("asc"),p("");return}t.order!==void 0&&d(t.order),t.orderBy!==void 0&&p(t.orderBy);},[t.order,t.orderBy,o]),er.useEffect(()=>{t.selected!==void 0&&h(t.selected);},[t.selected]),er.useEffect(()=>{t.page!==void 0&&v(t.page);},[t.page]),er.useEffect(()=>{t.rowsPerPage!==void 0&&g(t.rowsPerPage);},[t.rowsPerPage]),er.useEffect(()=>{let Z=a();R($=>$.filter(be=>Z.includes(be)));},[a]),er.useEffect(()=>{_(Z=>{let $={...Z};return (t.columns||[]).forEach(Q=>{$[Q.id]===void 0&&($[Q.id]=n(Q));}),$});},[t.columns,n]),er.useEffect(()=>{T(Z=>{let $=(t.columns||[]).map(qe=>qe.id),Q=new Set($),be=Z.filter(qe=>Q.has(qe)),Ce=new Set(be),Le=$.filter(qe=>!Ce.has(qe)),_e=[...be,...Le];return _e.length===Z.length&&_e.every((qe,je)=>qe===Z[je])?Z:_e});},[t.columns]);let Me=er.useMemo(()=>{let Z=t.columns||[];if(w.length===0)return Z;let $=new Map(Z.map(Ce=>[Ce.id,Ce])),Q=[],be=new Set;return w.forEach(Ce=>{let Le=$.get(Ce);Le&&(Q.push(Le),be.add(Ce));}),Z.forEach(Ce=>{be.has(Ce.id)||Q.push(Ce);}),Q},[t.columns,w]),Pe=er.useMemo(()=>{let Z=t.rows||[];return i&&(Z=Z.filter($=>Object.keys($).some(Q=>String($[Q]).toLowerCase().includes(i.toLowerCase())))),Z},[t.rows,i]),Ve=er.useMemo(()=>{if(o||t.onSortChange)return Pe;if(f.length>0){let Z=[...Pe];return Z.sort(($,Q)=>{for(let be of f){let Ce=$?.[be.field],Le=Q?.[be.field];if(!(Ce==null&&Le==null)){if(Ce==null)return be.direction==="asc"?-1:1;if(Le==null)return be.direction==="asc"?1:-1;if(Ce<Le)return be.direction==="asc"?-1:1;if(Ce>Le)return be.direction==="asc"?1:-1}}return 0}),Z}return u?Mh(Pe,Ih(l,u)):Pe},[Pe,l,u,f,t.onSortChange,o]),tt=er.useCallback(Z=>{if(le.length===0)return Z.map(Le=>({type:"row",data:Le,id:Le[t.rowKey||"id"]}));let $=[...Z].sort((Le,_e)=>{for(let qe of le){if(Le[qe]<_e[qe])return -1;if(Le[qe]>_e[qe])return 1}return 0}),Q=(Le,_e=0)=>{if(_e>=le.length)return Le;let qe=le[_e],je={},mt=[];return Le.forEach(ft=>{let Rt=ft[qe],yt=`${qe}:${Rt}`;je[yt]||(je[yt]={key:yt,field:qe,value:Rt,children:[],count:0,level:_e},mt.push(je[yt])),je[yt].children.push(ft),je[yt].count++;}),mt.forEach(ft=>{ft.children&&(ft.children=Q(ft.children,_e+1));}),mt},be=Q($),Ce=(Le,_e="")=>{let qe=[];return Le.forEach(je=>{if(je.children){let mt=_e?`${_e}>${je.key}`:je.key,ft=E.has(mt);qe.push({type:"group",id:mt,field:je.field,value:je.value,level:je.level,count:je.count,isExpanded:ft,childIds:(function Rt(yt){let H=[];return yt.children.forEach(J=>{J.children?H=H.concat(Rt(J)):H.push(J[t.rowKey||"id"]);}),H})(je)}),ft&&(qe=qe.concat(Ce(je.children,mt)));}else qe.push({type:"row",data:je,id:je[t.rowKey||"id"],level:le.length});}),qe};return Ce(be)},[le,E,t.rowKey]),nt=er.useCallback(Z=>{if(le.length===0)return [];let $=[...Z].sort((Ce,Le)=>{for(let _e of le){if(Ce[_e]<Le[_e])return -1;if(Ce[_e]>Le[_e])return 1}return 0}),Q=[],be=(Ce,Le,_e)=>{if(Le>=le.length)return;let qe=le[Le],je=new Map;Ce.forEach(mt=>{let ft=mt[qe],Rt=je.get(ft);Rt?Rt.push(mt):je.set(ft,[mt]);}),je.forEach((mt,ft)=>{let Rt=`${qe}:${ft}`,yt=_e?`${_e}>${Rt}`:Rt;Q.push(yt),be(mt,Le+1,yt);});};return be($,0,""),Q},[le]),it=er.useMemo(()=>tt(Ve),[Ve,tt]),X=er.useMemo(()=>nt(Ve),[Ve,nt]),De=er.useMemo(()=>{let Z=(t.rows||[]).length;return typeof t.count=="number"&&t.count>Z},[t.count,t.rows]),ye=er.useMemo(()=>De?it:y>0?it.slice(m*y,m*y+y):it,[it,m,y,De]),Be=er.useMemo(()=>De&&typeof t.count=="number"?t.count:it.length,[it.length,De,t.count]),at=Z=>{O($=>{let Q=new Set($);return Q.has(Z)?Q.delete(Z):Q.add(Z),Q});},Ze=Z=>{let $=X.filter(Q=>Q===Z||Q.startsWith(`${Z}>`));O(Q=>{let be=new Set(Q);return $.forEach(Ce=>be.add(Ce)),be});},St=Z=>{O($=>{let Q=new Set($);return Array.from(Q).forEach(be=>{(be===Z||be.startsWith(`${Z}>`))&&Q.delete(be);}),Q});},Mt=Z=>{if(!Z){O(new Set);return}O(new Set(X));},Ot=Z=>{let $=X.filter(Q=>Q.startsWith(`${Z}>`));return $.length===0?E.has(Z):E.has(Z)&&$.every(Q=>E.has(Q))},At=Z=>{if(o)return;f.length>0&&b([]);let $=u===Z&&l==="asc",Q=u===Z&&l==="desc";if(t.onSortChange){$?t.onSortChange(Z,"desc"):Q?t.onSortChange("","asc"):t.onSortChange(Z,"asc");return}$?(d("desc"),p(Z)):Q?(d("asc"),p("")):(d("asc"),p(Z));},re=Z=>{if(o){d("asc"),p(""),b([]);return}let $=Z.filter(Q=>Q&&Q.field);b($),$.length>0&&p("");},Ke=()=>{b([]);},Fe=(Z,$)=>{_(Q=>({...Q,[Z]:$}));},ce=Z=>{if(Z.target.checked){let $=Pe.map(Q=>Q[t.rowKey||"id"]);h($),t.onSelectionChange&&t.onSelectionChange($);return}h([]),t.onSelectionChange&&t.onSelectionChange([]);},ve=(Z,$)=>{let Q=$[t.rowKey||"id"],be=x.indexOf(Q),Ce=[];be===-1?Ce=Ce.concat(x,Q):be===0?Ce=Ce.concat(x.slice(1)):be===x.length-1?Ce=Ce.concat(x.slice(0,-1)):be>0&&(Ce=Ce.concat(x.slice(0,be),x.slice(be+1))),h(Ce),t.onSelectionChange&&t.onSelectionChange(Ce);},te=Z=>{v(Z),t.onPageChange&&t.onPageChange(Z);},he=Z=>{g(Z),v(0),t.onPageChange&&t.onPageChange(0),t.onRowsPerPageChange&&t.onRowsPerPageChange(Z);},Ne=Z=>{let $=C.indexOf(Z),Q=[...C];$===-1?Q.push(Z):Q.splice($,1),k(Q);},Je=Z=>{if(r)return;let $=le.indexOf(Z),Q=[...le];$===-1?Q.push(Z):Q.splice($,1),Ee(Q);},st=Z=>{a().includes(Z)&&R(Q=>Q.includes(Z)?Q.filter(be=>be!==Z):[...Q,Z]);},pt=(Z,$)=>{!Z||!$||Z===$||T(Q=>{let be=Q.indexOf(Z),Ce=Q.indexOf($);if(be===-1||Ce===-1)return Q;let Le=[...Q];return Le.splice(be,1),Le.splice(Ce,0,Z),Le});},Bt=Z=>{let $=Z?.active?.id,Q=Z?.over?.id;typeof $=="string"&&typeof Q=="string"&&pt($,Q);},Xt=Z=>{t.onLayoutSave&&t.onLayoutSave({visibleColumns:C,columnOrder:w,order:o?"asc":l,orderBy:o?"":u,sortBy:o?[]:f,grouping:le,columnWidths:F,showSummary:I,summaryColumns:A});},Vt=Z=>{let{layout:$,layoutId:Q}=Ei(Z,t.tableKey||"default");Q?(ke(Q),Se(Q)):(ke(""),Se("")),$&&($.visibleColumns&&k($.visibleColumns),Array.isArray($.columnOrder)&&T($.columnOrder),o?(d("asc"),p(""),b([])):($.order&&d($.order),$.orderBy&&p($.orderBy),Array.isArray($.sortBy)&&b($.sortBy)),$.grouping&&Ee($.grouping),$.columnWidths&&_($.columnWidths),$.showSummary!==void 0&&S(!!$.showSummary),Array.isArray($.summaryColumns)&&R($.summaryColumns));},wt=Z=>{let $=Z?.layoutData||Z?.layout||Z||{};$.visibleColumns&&k($.visibleColumns),Array.isArray($.columnOrder)&&T($.columnOrder),o?(d("asc"),p(""),b([])):($.order&&d($.order),$.orderBy!==void 0&&p($.orderBy),Array.isArray($.sortBy)&&b($.sortBy)),$.grouping&&Ee($.grouping),$.columnWidths&&_($.columnWidths),$.showSummary!==void 0&&S(!!$.showSummary),Array.isArray($.summaryColumns)&&R($.summaryColumns),O(new Set),v(0),Z?.id&&Se(Z.id),ke("");};er.useEffect(()=>{t.layout&&Vt({layout:t.layout});},[t.layout]);let Wt=Z=>{Z.preventDefault(),q(K===null?{mouseX:Z.clientX+2,mouseY:Z.clientY-6}:null);},ht=()=>{q(null);},Nt=er.useMemo(()=>{if(!I)return {};let Z={};t.columns.forEach(Q=>{if(Q.numeric&&A.includes(Q.id)){let be=Pe.reduce((Ce,Le)=>{let _e=parseFloat(Le[Q.id]);return Ce+(isNaN(_e)?0:_e)},0);Z[Q.id]=be.toFixed(2);}else Z[Q.id]="";});let $=t.columns.find(Q=>C.includes(Q.id)&&!Q.numeric);return $&&!$.numeric&&(Z[$.id]="Total"),Z},[Pe,t.columns,I,A,C]),lt=()=>{if(!t.columns||!Pe)return;let Z=t.columns.map(Le=>Le.label).join(","),$=Pe.map(Le=>t.columns.map(_e=>{let qe=Le[_e.id];return `"${(qe==null?"":String(qe)).replace(/"/g,'""')}"`}).join(",")).join(`
184
184
  `),Q=`data:text/csv;charset=utf-8,${Z}
185
- ${$}`,be=encodeURI(Q),Ce=document.createElement("a");Ce.setAttribute("href",be),Ce.setAttribute("download",`${t.title||"export"}.csv`),document.body.appendChild(Ce),Ce.click(),document.body.removeChild(Ce);},Ft=()=>{se(true);},Yt=()=>{se(false);};return {isMobile:false,columns:Me,order:l,setOrder:d,orderBy:u,setOrderBy:p,sortBy:f,setSortBy:b,applyMultiSort:re,clearMultiSort:Ke,columnOrder:w,setColumnOrder:T,filterText:i,setFilterText:s,visibleColumns:C,setVisibleColumns:k,showSummary:I,setShowSummary:S,summaryColumns:A,grouping:le,setGrouping:Ee,expandedGroups:E,setExpandedGroups:O,groupAnchorEl:W,setGroupAnchorEl:j,summaryAnchorEl:V,setSummaryAnchorEl:z,columnWidths:F,setColumnWidths:X,anchorEl:H,setAnchorEl:Y,contextMenu:U,setContextMenu:K,sensors:void 0,sortedAndFilteredRows:Ve,visibleRows:ye,summaryRow:Nt,page:m,setPage:te,rowsPerPage:y,setRowsPerPage:he,totalDisplayCount:Be,selected:x,setSelected:h,isAllExpanded:q.length>0&&q.every(Z=>E.has(Z)),handleColumnResize:Fe,handleRequestSort:At,handleSelectAllClick:ce,handleClick:ve,toggleSummaryColumn:st,handleDragEnd:Bt,handleColumnReorder:pt,handleExport:lt,handleContextMenu:Wt,handleCloseContextMenu:ht,toggleColumnVisibility:Ne,toggleGroupExpand:at,toggleGroupField:Je,handleToggleAll:Mt,handleExpandGroupRecursively:Ze,handleCollapseGroupRecursively:St,isGroupFullyExpanded:Ot,handleLayoutLoad:wt,handleVariantLoad:Vt,handleLayoutSave:Xt,effectiveAppId:t.appId||"",currentLayoutData:{visibleColumns:C,order:o?"asc":l,orderBy:o?"":u,sortBy:o?[]:f,columnOrder:w,grouping:le,columnWidths:F,showSummary:I,summaryColumns:A},currentLayoutId:ue,layoutIdToLoad:$e,onPageChange:te,onRowsPerPageChange:he,graphReportOpen:fe,handleOpenGraphReport:Ft,handleCloseGraphReport:Yt}};P();var gD=t=>e("tbody",{...t}),fD=({align:t,...r})=>e("td",{align:t==="inherit"?void 0:t,...r}),bD=t=>e("div",{...t}),hD=t=>e("thead",{...t}),vD=t=>e("tr",{...t}),Jr=t=>{let{t:r}=pe(),o="0.85rem",{title:n,showToolbar:a=true,selectionMode:i,selected:s=[],onSelectionChange:l,actions:d,extraTools:u,fitContainer:p=false,fullWidth:f=false,maxHeight:b,loading:m=false,rowsPerPageOptions:v=[20,50,100,-1],onLayoutSave:y,filterConfig:g,rowKey:x,tableKey:h="default",graphReport:C,quickCreate:k,quickEdit:w,quickDelete:T,serviceUrl:I,disableGrouping:S=false,disableSorting:A=false}=t,D=n||r("table.title.default"),{isMobile:M,columns:N,order:E,orderBy:O,filterText:F,setFilterText:X,visibleColumns:H,showSummary:Y,setShowSummary:W,summaryColumns:j,grouping:V,setGrouping:z,expandedGroups:U,groupAnchorEl:K,setGroupAnchorEl:fe,summaryAnchorEl:se,setSummaryAnchorEl:ue,columnWidths:Se,anchorEl:$e,setAnchorEl:ke,contextMenu:le,sensors:Ee,sortedAndFilteredRows:Me,summaryRow:Pe,visibleRows:Ve,isAllExpanded:tt,page:nt,setPage:it,rowsPerPage:q,setRowsPerPage:De,totalDisplayCount:ye,setSelected:Be,handleColumnResize:at,handleRequestSort:Ze,handleSelectAllClick:St,handleClick:Mt,toggleSummaryColumn:Ot,handleDragEnd:At,handleExport:re,handleContextMenu:Ke,handleCloseContextMenu:Fe,toggleColumnVisibility:ce,toggleGroupExpand:ve,handleToggleAll:te,handleExpandGroupRecursively:he,handleCollapseGroupRecursively:Ne,isGroupFullyExpanded:Je,handleLayoutLoad:st,handleVariantLoad:pt,handleLayoutSave:Bt,effectiveAppId:Xt,currentLayoutData:Vt,currentLayoutId:wt,layoutIdToLoad:Wt,graphReportOpen:ht,handleOpenGraphReport:Nt,handleCloseGraphReport:lt}=hn(t),Ft=C?.enabled??false,Yt=Ft&&(C?.interaction?.enabled??true),Z=Ii(),$=!!k?.enabled,Q=!!w?.enabled,be=!!T?.enabled,Ce=k?.fields,Le=k?.excludeFields||[],_e=k?.initialValues||{},[qe,je]=er__namespace.default.useState(false),[mt,ft]=er__namespace.default.useState(false),[Rt,yt]=er__namespace.default.useState({}),[B,J]=er__namespace.default.useState(false),[ge,Te]=er__namespace.default.useState(false),[et,Xe]=er__namespace.default.useState({}),[kt,bt]=er__namespace.default.useState(false),[gt,Ct]=er__namespace.default.useState(false),nr=m||mt||ge||gt,Et=er__namespace.default.useMemo(()=>{let oe=[...N];if(Array.isArray(Ce)&&Ce.length>0){let me=new Set(Ce);oe=oe.filter(ee=>me.has(ee.id));}if(Le.length>0){let me=new Set(Le);oe=oe.filter(ee=>!me.has(ee.id));}return oe.filter(me=>!!me?.id)},[N,Le,Ce]),Zt=x||"id",Ht=er__namespace.default.useMemo(()=>{let oe=new Set(s);return Me.filter(me=>oe.has(me?.[Zt]))},[s,Me,Zt]),Kt=Ht.length===1?Ht[0]:null,$t=w?.fields,rr=w?.excludeFields||[],ar=w?.editableFields||[],fr=w?.nonEditableFields||[],Ir=w?.primaryKeys?.length?w.primaryKeys:[Zt],Mr=er__namespace.default.useMemo(()=>{let oe=[...N];if(Array.isArray($t)&&$t.length>0){let me=new Set($t);oe=oe.filter(ee=>me.has(ee.id));}if(rr.length>0){let me=new Set(rr);oe=oe.filter(ee=>!me.has(ee.id));}return oe.filter(me=>!!me?.id)},[N,rr,$t]),oo=er__namespace.default.useMemo(()=>new Set(Ir),[Ir]),yr=er__namespace.default.useMemo(()=>new Set(ar),[ar]),Or=er__namespace.default.useMemo(()=>new Set(fr),[fr]),qo=er__namespace.default.useCallback(oe=>yr.size>0?yr.has(oe):!(Or.has(oe)||oo.has(oe)),[yr,Or,oo]);er__namespace.default.useEffect(()=>{!ht&&Z.hasActiveFilters&&Z.clearAll();},[ht,Z.hasActiveFilters,Z.clearAll]);let Xo=()=>{let oe={};Et.forEach(me=>{oe[me.id]=_e[me.id]??"";}),yt(oe),je(true);},Lo=()=>{mt||je(false);},Yo=(oe,me)=>{yt(ee=>({...ee,[oe]:me}));},Zo=async()=>{if(!k?.onSubmit){je(false);return}try{ft(!0),await k.onSubmit(Rt),je(!1);}finally{ft(false);}},Rr=()=>{if(!Kt)return;let oe={};Mr.forEach(ee=>{oe[ee.id]=Kt[ee.id]??"";});let me=w?.getInitialValues?{...oe,...w.getInitialValues(Kt)}:oe;Xe(me),J(true);},Oo=()=>{ge||J(false);},jo=(oe,me)=>{Xe(ee=>({...ee,[oe]:me}));},Kr=async()=>{if(Kt){if(!w?.onSubmit){J(false);return}try{Te(!0),await w.onSubmit(et,Kt),J(!1);}finally{Te(false);}}},no=()=>{Ht.length!==0&&bt(true);},Ln=()=>{gt||bt(false);},Fo=async()=>{if(Ht.length===0){bt(false);return}if(!T?.onConfirm){bt(false),Be([]),l?.([]);return}try{Ct(!0),await T.onConfirm(Ht),bt(!1),Be([]),l?.([]);}finally{Ct(false);}},R=Me,{fieldMapping:_}=mn({rows:R,config:{...C,title:C?.title||`${D} ${r("graph.reportTitle")}`}}),G=er__namespace.default.useMemo(()=>Yt?Z.applyRows(R,_):R,[Yt,Z.applyRows,R,_]),{model:de}=mn({rows:G,config:{...C,title:C?.title||`${D} ${r("graph.reportTitle")}`,fieldMapping:_}}),He=de.table.columns.map(oe=>({id:oe.id,label:oe.label,align:oe.align||"left",minWidth:120,numeric:oe.align==="right"})),ot=Xt?e(bn,{appId:Xt,tableKey:h,currentLayoutData:Vt,onLayoutLoad:st,targetLayoutId:Wt,activeLayoutId:wt,serviceUrl:I??g?.serviceUrl}):null,Ge=c(jsxRuntime.Fragment,{children:[!S&&e(pn,{groupAnchorEl:K,setGroupAnchorEl:fe,grouping:V,setGrouping:z,columns:N}),e(un,{anchorEl:$e,setAnchorEl:ke,columns:N,visibleColumns:H,toggleColumnVisibility:ce}),e(yi,{anchorEl:se,setAnchorEl:ue,showSummary:Y,setShowSummary:W,columns:N,summaryColumns:j,toggleSummaryColumn:Ot}),e(Ci,{contextMenu:le,handleCloseContextMenu:Fe,columns:N,visibleColumns:H,toggleColumnVisibility:ce})]});return M?c("div",{sx:{display:"flex",flexDirection:"column",gap:2,height:"100%"},children:[g&&e(Wr,{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:h,currentLayout:[{tableKey:h,layoutData:Vt}],variantService:g.variantService,serviceUrl:I??g.serviceUrl}),e(Pp,{title:D,loading:m,showSummary:Y,setShowSummary:W,setAnchorEl:ke,setSummaryAnchorEl:ue,filterText:F,setFilterText:X,sortedAndFilteredRows:Me,selected:s,columns:N,visibleColumns:H,summaryRow:Pe,handleClick:Mt,selectionMode:i}),Ge]}):c("div",{sx:{width:f?"100%":"auto",mb:p?0:2,...p?{flex:1,display:"flex",flexDirection:"column",minHeight:0,height:"100%",overflow:"hidden"}:{}},children:[g&&e("div",{sx:{mb:2},children:e(Wr,{fields:g.fields,filters:g.filters,onFilterChange:g.onFilterChange,onSearch:g.onSearch,variants:g.variants||[],currentVariantId:g.currentVariantId,onVariantLoad:oe=>{pt(oe),g.onVariantLoad&&g.onVariantLoad(oe);},onVariantSave:g.onVariantSave,onVariantDelete:g.onVariantDelete,onVariantSetDefault:g.onVariantSetDefault,loading:m,appId:g.appId,tableKey:h,currentLayout:[{tableKey:h,layoutData:Vt}],currentLayoutId:wt,layoutRefs:[{tableKey:h,layoutId:wt}],variantService:g.variantService,serviceUrl:I??g.serviceUrl})}),c(Ae,{className:"orb-ctable-surface",sx:{width:f?"100%":"auto",mb:p?0:2,display:"flex",flexDirection:"column",overflow:"hidden",position:"relative","&::before":nr?{content:'""',position:"absolute",top:0,left:0,width:"100%",height:"3px",background:"linear-gradient(90deg, color-mix(in oklch, var(--orb-primary) 0%, transparent) 0%, color-mix(in oklch, var(--orb-primary) 25%, transparent) 25%, var(--orb-primary) 50%, color-mix(in oklch, var(--orb-primary) 25%, transparent) 75%, color-mix(in oklch, var(--orb-primary) 0%, transparent) 100%)",backgroundSize:"220% 100%",animation:"cTableTopMarquee 1.2s linear infinite",zIndex:6,pointerEvents:"none"}:{},"@keyframes cTableTopMarquee":{"0%":{backgroundPosition:"220% 0"},"100%":{backgroundPosition:"-120% 0"}},...b?{height:b}:p?{flex:1,minHeight:0,height:"100%"}:{}},children:[a&&e(fi,{filterText:F,setFilterText:X,onRowsPerPageChange:De,rowsPerPage:q,rowsPerPageOptions:v,page:nt,count:ye,onPageChange:it,actions:d,extraTools:u,grouping:V,disableGrouping:S,groupAnchorEl:K,setGroupAnchorEl:fe,showSummary:Y,setShowSummary:W,anchorEl:$e,setAnchorEl:ke,summaryAnchorEl:se,setSummaryAnchorEl:ue,handleExport:re,showCreateButton:$,onOpenCreateDialog:Xo,showEditButton:Q,onOpenEditDialog:Rr,editDisabled:Ht.length!==1,showDeleteButton:be,onOpenDeleteConfirm:no,deleteDisabled:Ht.length===0,onLayoutSave:y||g?.variantService&&g?.appId?Bt:void 0,loading:m,layoutManager:ot,onOpenGraphReport:Ft?Nt:void 0}),e("div",{sx:{flex:1,...b?{maxHeight:b,height:b}:p?{height:0,maxHeight:"none"}:{maxHeight:"calc(100vh - 320px)"},overflowY:"auto",overflowX:"auto",position:"relative",minHeight:0},children:e(core.DndContext,{sensors:Ee,collisionDetection:core.closestCenter,onDragEnd:At,modifiers:[modifiers.restrictToHorizontalAxis],children:c("table",{className:"orb-tbl orb-ctable",style:{minWidth:f?750:void 0,width:f?"100%":"auto",tableLayout:Object.keys(Se).length>0?"fixed":"auto",borderCollapse:"separate",borderSpacing:0,fontSize:o},"aria-labelledby":"tableTitle",children:[e(hi,{columns:N,visibleColumns:H,order:E,orderBy:O,onRequestSort:Ze,disableSorting:A,onContextMenu:Ke,selectionMode:i,grouping:V,isAllExpanded:tt,handleToggleAll:te,rowCount:Me.length,numSelected:s.length,onSelectAllClick:St,columnWidths:Se,onColumnResize:at}),e(vi,{visibleRows:Ve,columns:N,visibleColumns:H,selectionMode:i,selected:s,orderBy:O,loading:m,expandedGroups:U,toggleGroupExpand:ve,handleExpandGroupRecursively:he,handleCollapseGroupRecursively:Ne,isGroupFullyExpanded:Je,handleClick:Mt,onSelectionChange:l,grouping:V,rowKeyProp:x,page:nt,rowsPerPage:q}),Y&&e(kp,{showSummary:Y,columns:N,visibleColumns:H,summaryRow:Pe,selectionMode:i?.toString(),grouping:V,columnWidths:Se,orderBy:O,zIndex:3})]})})})]}),$&&c(Lt,{open:qe,onClose:Lo,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||r("quickCreate.createWithTitle",{title:D})}),e("div",{className:"orb-dialog-content",sx:{pt:"8px !important"},children:c("div",{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[Et.map(oe=>{let me=oe.type==="number"||oe.numeric?"number":oe.type==="date"?"date":"text",ee=oe.label||oe.id;return e(ze,{label:ee,value:Rt[oe.id]??"",onChange:Oe=>Yo(oe.id,Oe.target.value),type:me,size:"small",fullWidth:true,InputLabelProps:{shrink:me==="date"?true:void 0,sx:{fontSize:"0.85rem"}},InputProps:{sx:{fontSize:"0.85rem"}}},`quick-create-${oe.id}`)}),k?.description&&e(jr,{severity:"info",sx:{fontSize:"0.85rem","& span":{fontSize:"0.85rem"}},children:k.description})]})}),c("div",{className:"orb-dialog-actions",sx:{px:3,pb:2},children:[e(we,{onClick:Lo,sx:{fontSize:"0.85rem"},disabled:mt,children:k?.cancelLabel||r("common.cancel")}),e(we,{onClick:Zo,variant:"contained",sx:{fontSize:"0.85rem",fontWeight:700},disabled:mt,children:k?.submitLabel||r("common.save")})]})]}),Q&&c(Lt,{open:B,onClose:Oo,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:w?.title||r("quickEdit.editWithTitle",{title:D})}),e("div",{className:"orb-dialog-content",sx:{pt:"8px !important"},children:c("div",{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[Mr.map(oe=>{let me=oe.type==="number"||oe.numeric?"number":oe.type==="date"?"date":"text",ee=oe.label||oe.id,Oe=qo(oe.id);return e(ze,{label:ee,value:et[oe.id]??"",onChange:Qe=>jo(oe.id,Qe.target.value),type:me,size:"small",fullWidth:true,disabled:!Oe,InputLabelProps:{shrink:me==="date"?true:void 0,sx:{fontSize:"0.85rem"}},InputProps:{sx:{fontSize:"0.85rem"}}},`quick-edit-${oe.id}`)}),w?.description&&e(jr,{severity:"info",sx:{fontSize:"0.85rem","& span":{fontSize:"0.85rem"}},children:w.description})]})}),c("div",{className:"orb-dialog-actions",sx:{px:3,pb:2},children:[e(we,{onClick:Oo,sx:{fontSize:"0.85rem"},disabled:ge,children:w?.cancelLabel||r("common.cancel")}),e(we,{onClick:Kr,variant:"contained",sx:{fontSize:"0.85rem",fontWeight:700},disabled:ge||!Kt,children:w?.submitLabel||r("common.save")})]})]}),be&&e(jn,{open:kt,type:"warning",title:T?.title||r("quickDelete.confirmTitle"),message:T?.message||(Ht.length>1?r("quickDelete.confirmMessageMultiple",{count:Ht.length}):r("quickDelete.confirmMessageSingle")),confirmText:T?.confirmText||r("common.delete"),cancelText:T?.cancelText||r("common.cancel"),onClose:Ln,onConfirm:Fo}),Ge,Ft&&e(Pi,{open:ht,onClose:lt,model:de,aiAssistant:C?.aiAssistant,interaction:Yt?{enabled:true,filters:Z.filters,fieldMapping:_,onPrimaryDimensionClick:oe=>Z.setFilter("primaryDimension",oe),onSecondaryDimensionClick:oe=>Z.setFilter("secondaryDimension",oe),onStatusClick:oe=>Z.setFilter("status",oe),onClearFilter:Z.clearFilter,onClearAll:Z.clearAll}:void 0,tableContent:e(Jr,{appId:Xt||"graph-report-internal",title:r("graph.dataBody"),columns:He,rows:de.table.rows,rowKey:"id",fullWidth:true,maxHeight:"420px",rowsPerPage:20,rowsPerPageOptions:[20,50,100],graphReport:{enabled:false}})})]})},yD=Jr;P();var TD=({id:t,title:r,hideHeader:o=true,filterConfig:n,tableProps:a,children:i,spacing:s=1,mode:l="separated"})=>{let d=n?{...n,appId:n.appId||t}:void 0,u={...a,appId:a.appId||t};return c(ui,{title:r,hideHeader:o,children:[c(ie,{spacing:s,sx:{height:"100%",overflow:"hidden"},children:[l==="separated"&&d&&e("div",{sx:{flexShrink:0},children:e(Wr,{...d})}),e("div",{sx:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:e(Jr,{...u,fitContainer:true,filterConfig:l==="integrated"?d:void 0})})]}),i]})};var AD=({metadata:t,fetchData:r,initialRowsPerPage:o=20,rowsPerPageOptions:n=[20,50,100,-1],tableKey:a="default",mode:i="integrated",serviceUrl:s,variantService:l})=>{let{t:d}=pe(),[u,p]=er.useState(false),[f,b]=er.useState([]),[m,v]=er.useState({}),[y,g]=er.useState(t.variants||[]),[x,h]=er.useState(t.layout||null),[C,k]=er.useState(""),[w,T]=er.useState(0),[I,S]=er.useState(0),[A,D]=er.useState(o),[M,N]=er.useState([]),[E,O]=er.useState("asc"),[F,X]=er.useState("");er.useEffect(()=>{let se={};t.filters.forEach(ue=>{ue.defaultValue!==void 0&&(se[ue.id]=ue.defaultValue);}),v(se);},[t.filters]);let H=er.useCallback(async(se,ue,Se,$e,ke)=>{p(true);try{let le={...se,page:ue+1,limit:Se,sort:ke,order:$e},Ee;r?Ee=await r(le):typeof t.api=="function"?Ee=await t.api(le):t.api&&typeof t.api=="object"?(console.log("Fetching from URL:",t.api.url,le),Ee={rows:[],total:0}):(console.warn("No API configured for report"),Ee={rows:[],total:0}),Ee&&(b(Ee.rows||[]),T(Ee.total||0));}catch(le){console.error("Failed to fetch report data",le);}finally{p(false);}},[t.api,r]);er.useEffect(()=>{H(m,I,A,E,F);},[H,I,A,E,F]);let Y=()=>{S(0),H(m,0,A,E,F);},W=se=>{S(0),D(se);},j=(se,ue)=>{O(ue),X(se);},V=se=>{v(se);},z=se=>{k(se?.id||"");let ue=Ai(se,a);if(ue){let $e=ue.values??ue;v($e),H($e,0,A,E,F),S(0);}let{layout:Se}=Ei(se,a);Se&&h(Se);},U=se=>{let ue={...se,id:Date.now().toString(),createdAt:new Date().toISOString()};g(Se=>[...Se,ue]);},K=se=>{h(se);};return {pageProps:{id:t.id,title:t.title,mode:i,filterConfig:{appId:t.id,tableKey:a,fields:t.filters,filters:m,onFilterChange:V,onSearch:Y,onVariantLoad:z,onVariantSave:U,onVariantDelete:se=>g(ue=>ue.filter(Se=>Se.id!==se)),onVariantSetDefault:se=>{g(ue=>ue.map(Se=>({...Se,isDefault:Se.id===se})));},variants:y,currentVariantId:C,variantService:l,serviceUrl:s},tableProps:{appId:t.id,tableKey:a,columns:t.columns,rows:f,loading:u,rowKey:"id",count:w,page:I,rowsPerPage:A,rowsPerPageOptions:n,onPageChange:S,onRowsPerPageChange:W,selectionMode:"multiple",selected:M,onSelectionChange:N,onLayoutSave:K,layout:x,title:t.title,showSummary:true,order:E,orderBy:F,serviceUrl:s,onSortChange:j,graphReport:t.graphReport||{enabled:true,title:`${t.title} ${d("graph.reportTitle")}`}}},filters:m,rows:f,loading:u,refresh:Y}};P();var Eh=new Set(["id","title","description","icon","iconNode","meta"]),Lh=t=>t.replace(/([A-Z])/g," $1").replace(/[._-]+/g," ").replace(/^\w/,r=>r.toUpperCase()).trim(),Oh=t=>Object.entries(t).filter(([r,o])=>!Eh.has(r)&&o!==null&&o!==void 0&&["string","number","boolean"].includes(typeof o)).map(([r,o])=>({key:r,label:Lh(r),value:String(o)})),Jp=({item:t,open:r,onClose:o,onDownloadClick:n,renderContent:a,downloadTooltip:i,closeTooltip:s})=>{let{t:l}=pe(),u=Cr()==="dark"?"var(--orb-p300)":"var(--orb-primary)";er__namespace.default.useEffect(()=>{if(!r)return;let f=b=>{b.key==="Escape"&&o();};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[r,o]);let p=Oh(t);return typeof document>"u"?null:reactDom.createPortal(c(jsxRuntime.Fragment,{children:[e("div",{"aria-hidden":"true",onClick:o,sx:{position:"fixed",inset:0,zIndex:1299,backgroundColor:"rgba(1, 9, 26, 0.4)",opacity:r?1:0,pointerEvents:r?"auto":"none",transition:"opacity 200ms ease"}}),c("div",{role:"dialog","aria-modal":"true","aria-label":t.title,sx:{position:"fixed",top:"50%",left:"50%",zIndex:1300,width:"min(520px, 92vw)",maxHeight:"82vh",display:"flex",flexDirection:"column",bgcolor:"background.paper",border:"1px solid",borderColor:"divider",borderRadius:3,boxShadow:"0 24px 64px rgba(1, 9, 26, 0.3)",transform:r?"translate(-50%, -50%) scale(1)":"translate(-50%, -47%) scale(0.96)",opacity:r?1:0,transition:"transform 200ms ease, opacity 180ms ease"},children:[c(ie,{direction:"row",spacing:1.5,alignItems:"center",sx:{p:2.5,pb:2,borderBottom:"1px solid",borderColor:"divider",flexShrink:0},children:[e("div",{sx:{width:56,height:56,flex:"0 0 auto",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:3,border:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:t.iconNode??e(Tt,{name:t.icon??"product",size:30,style:{color:u}})}),c("div",{sx:{flex:1,minWidth:0},children:[e(L,{component:"div",sx:{fontWeight:700,fontSize:"1.1rem",lineHeight:1.3,wordBreak:"break-word"},children:t.title}),t.meta?e(L,{component:"div",sx:{fontSize:"0.8rem",color:"text.secondary"},children:t.meta}):null]}),e(ae,{tooltip:s??l("cardPage.close"),"aria-label":s??l("cardPage.close"),onClick:o,children:e(Tt,{name:"decline",size:18})})]}),e("div",{sx:{flex:1,minHeight:0,overflowY:"auto",p:2.5},children:a?a(t):c(jsxRuntime.Fragment,{children:[t.description?e(L,{component:"div",sx:{fontSize:"0.9rem",lineHeight:1.6,color:"text.primary"},children:t.description}):null,p.length>0?e("div",{sx:{mt:t.description?2.5:0,display:"grid",gap:1.5},children:p.map(f=>c("div",{children:[e(L,{component:"div",sx:{fontSize:"0.72rem",fontWeight:600,color:"text.secondary",textTransform:"uppercase",letterSpacing:"0.04em"},children:f.label}),e(L,{component:"div",sx:{fontSize:"0.88rem",color:"text.primary",wordBreak:"break-word"},children:f.value})]},f.key))}):null]})}),n?e("div",{sx:{p:2.5,pt:2,borderTop:"1px solid",borderColor:"divider",flexShrink:0},children:e(we,{variant:"contained",sx:{width:"100%"},startIcon:e(Tt,{name:"download",size:16}),onClick:()=>n(t),children:i??l("cardPage.download")})}):null]})]}),document.body)};P();var Fh={display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"3",overflow:"hidden"},Bh=({item:t,onDetailClick:r,onDownloadClick:o,detailTooltip:n,downloadTooltip:a})=>{let{t:i}=pe(),l=Cr()==="dark"?"var(--orb-p300)":"var(--orb-primary)",d=t.iconNode??e(Tt,{name:t.icon??"product",size:26,style:{color:l}});return c(Ae,{elevation:0,sx:{p:2,height:"100%",display:"flex",flexDirection:"column",borderRadius:3,border:"1px solid",borderColor:"divider",bgcolor:"background.paper",boxShadow:"0 8px 20px rgba(15, 23, 42, 0.06)",transition:"transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease","&:hover":{transform:"translateY(-2px)",borderColor:"primary.main",boxShadow:"0 14px 32px rgba(15, 23, 42, 0.12)"}},children:[c(ie,{direction:"row",spacing:1.5,alignItems:"center",children:[e("div",{sx:{width:48,height:48,flex:"0 0 auto",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:2.5,border:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:d}),c("div",{sx:{flex:1,minWidth:0},children:[e(L,{component:"div",noWrap:true,sx:{fontWeight:700,fontSize:"0.98rem",lineHeight:1.3},children:t.title}),t.meta?e(L,{component:"div",noWrap:true,sx:{fontSize:"0.75rem",color:"text.secondary"},children:t.meta}):null]})]}),e("div",{sx:{mt:1.5,flex:1,minHeight:0},children:e(L,{component:"div",sx:{fontSize:"0.84rem",lineHeight:1.45,color:"text.primary",...Fh},children:t.description||"\xA0"})}),c(ie,{direction:"row",spacing:.5,justifyContent:"flex-end",sx:{mt:1.5},children:[e(ae,{tooltip:n??i("cardPage.viewDetails"),"aria-label":n??i("cardPage.viewDetails"),onClick:()=>r?.(t),children:e(Tt,{name:"show",size:18})}),e(ae,{tooltip:a??i("cardPage.download"),"aria-label":a??i("cardPage.download"),onClick:()=>o?.(t),children:e(Tt,{name:"download",size:18})})]})]})},tu=({items:t,loading:r=false,onDetailClick:o,onDownloadClick:n,minCardWidth:a=260,detailTooltip:i,downloadTooltip:s,emptyText:l,detailPanel:d=true,renderDetailContent:u})=>{let{t:p}=pe(),[f,b]=er__namespace.default.useState(null),[m,v]=er__namespace.default.useState(false),y=x=>{o?.(x),d&&(b(x),requestAnimationFrame(()=>requestAnimationFrame(()=>v(true))));},g=()=>{v(false),setTimeout(()=>b(null),260);};return r?e("div",{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",minHeight:240},children:e(Xr,{})}):t.length?c(jsxRuntime.Fragment,{children:[e("div",{sx:{flex:1,minHeight:0,overflowY:"auto",display:"grid",gridTemplateColumns:`repeat(auto-fill, minmax(${a}px, 1fr))`,gap:2,alignContent:"start",p:.5},children:t.map(x=>e(Bh,{item:x,onDetailClick:y,onDownloadClick:n,detailTooltip:i,downloadTooltip:s},x.id))}),d&&f?e(Jp,{item:f,open:m,onClose:g,onDownloadClick:n,renderContent:u,downloadTooltip:s}):null]}):e("div",{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",minHeight:240},children:e(L,{sx:{color:"text.secondary"},children:l??p("cardPage.empty")})})};P();var eN=({id:t,title:r,hideHeader:o=true,filterConfig:n,gridProps:a,children:i,spacing:s=1})=>{let l=n?{...n,appId:n.appId||t}:void 0;return c(ui,{title:r,hideHeader:o,children:[c(ie,{spacing:s,sx:{height:"100%",overflow:"hidden"},children:[l&&e("div",{sx:{flexShrink:0},children:e(Wr,{...l})}),e("div",{sx:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:e(tu,{...a})})]}),i]})};var aN=({metadata:t,fetchData:r,tableKey:o="default",variantService:n,serviceUrl:a,onDetailClick:i,onDownloadClick:s,minCardWidth:l})=>{let[d,u]=er.useState(false),[p,f]=er.useState([]),[b,m]=er.useState(0),[v,y]=er.useState({}),[g,x]=er.useState(t.variants||[]),[h,C]=er.useState("");er.useEffect(()=>{let D={};t.filters.forEach(M=>{M.defaultValue!==void 0&&(D[M.id]=M.defaultValue);}),y(D);},[t.filters]);let k=er.useCallback(async D=>{u(true);try{let M=r?await r({...D}):{rows:[],total:0};f(M?.rows||[]),m(M?.total||0);}catch(M){console.error("Failed to fetch card page data",M);}finally{u(false);}},[r]);er.useEffect(()=>{k(v);},[k]);let w=()=>{k(v);},T=D=>{y(D);},I=D=>{C(D?.id||"");let M=Ai(D,o);if(M){let N=M.values??M;y(N),k(N);}},S=D=>{let M={...D,id:Date.now().toString(),createdAt:new Date().toISOString()};x(N=>[...N,M]);};return {pageProps:{id:t.id,title:t.title,filterConfig:{appId:t.id,tableKey:o,fields:t.filters,filters:v,onFilterChange:T,onSearch:w,onVariantLoad:I,onVariantSave:S,onVariantDelete:D=>x(M=>M.filter(N=>N.id!==D)),onVariantSetDefault:D=>{x(M=>M.map(N=>({...N,isDefault:N.id===D})));},variants:g,currentVariantId:h,variantService:n,serviceUrl:a},gridProps:{items:p,loading:d,onDetailClick:i,onDownloadClick:s,minCardWidth:l}},items:p,total:b,filters:v,loading:d,refresh:w}};var zh=t=>[...t].sort((r,o)=>o.value-r.value),lN=({bars:t=[],lines:r=[],combos:o=[],heatmap:n=[],pies:a=[],waterfalls:i=[]})=>{let s=er.useMemo(()=>zh(t),[t]),l=er.useMemo(()=>[...r],[r]),d=er.useMemo(()=>[...o],[o]),u=er.useMemo(()=>[...n],[n]),p=er.useMemo(()=>{let b=a.reduce((m,v)=>m+v.value,0);return a.map(m=>({...m,percent:b>0?m.value/b*100:m.percent}))},[a]),f=er.useMemo(()=>[...i],[i]);return {bars:s,lines:l,combos:d,heatmap:u,pies:p,waterfalls:f}};var mN=({apiKey:t,query:r,zoom:o=14,mapType:n="roadmap"})=>er.useMemo(()=>!t||!r?"":oa({apiKey:t,query:r,zoom:o,mapType:n}),[t,r,o,n]),gN=({keyword:t,location:r})=>er.useMemo(()=>wi({keyword:t,location:r?{lng:r.lng,lat:r.lat,name:r.name}:void 0}),[t,r]);P();var la=({code:t,language:r="text",copyable:o=true,showLineNumbers:n=false,wrapLongLines:a=false,maxHeight:i})=>{let[s,l]=er.useState(false),d=er.useMemo(()=>t.replace(/\n$/,"").split(`
186
- `),[t]);return c("div",{style:{border:"1px solid var(--orb-border)",borderRadius:12,overflow:"hidden",background:"var(--orb-canvas)"},children:[c("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"4.8px 8px",background:"var(--orb-hover)",borderBottom:"1px solid var(--orb-border)"},children:[e("span",{style:{fontSize:12,fontWeight:500,textTransform:"uppercase",letterSpacing:.5,color:"var(--orb-muted)",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},children:r}),o&&e(ae,{size:"small",tooltip:s?"Copied":"Copy",onClick:async()=>{try{await navigator.clipboard.writeText(t),l(!0),window.setTimeout(()=>l(!1),1400);}catch{l(false);}},children:s?e(qr,{size:14,strokeWidth:1.8}):e(vo,{size:14,strokeWidth:1.8})})]}),e("pre",{style:{margin:0,padding:10,fontSize:"0.82rem",lineHeight:1.55,overflow:"auto",maxHeight:i,background:"var(--orb-surface)",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},children:n?d.map((p,f)=>c("div",{style:{display:"flex"},children:[e("span",{style:{width:34,flexShrink:0,textAlign:"right",paddingRight:8,color:"var(--orb-disabled-fg)",userSelect:"none"},children:f+1}),e("span",{style:{whiteSpace:a?"pre-wrap":"pre",wordBreak:a?"break-word":"normal"},children:p})]},`${f}-${p}`)):e("code",{style:{display:"block",whiteSpace:a?"pre-wrap":"pre",wordBreak:a?"break-word":"normal"},children:t})})]})};P();var Uh=t=>{let r=t.trim();return r.startsWith("$$")&&r.endsWith("$$")&&r.length>=4&&(r=r.slice(2,-2).trim()),r.startsWith("$")&&r.endsWith("$")&&r.length>=2&&(r=r.slice(1,-1).trim()),r},Kh=async t=>new Function("m","return import(m)")(t),ca=({expression:t,inline:r=false,allowKatex:o=false})=>{let n=er.useMemo(()=>Uh(t),[t]),[a,i]=er.useState("");return er.useEffect(()=>{let s=true;return (async()=>{if(!o||!n){i("");return}try{let d=await Kh("katex"),p=(d?.default||d)?.renderToString?.(n,{displayMode:!r,throwOnError:!1,strict:"warn"});s&&typeof p=="string"&&i(p);}catch{s&&i("");}})(),()=>{s=false;}},[o,n,r]),n?a?e(Ie,{component:r?"span":"div",sx:{display:r?"inline-flex":"block",my:r?0:.5,overflowX:"auto"},dangerouslySetInnerHTML:{__html:a}}):r?e(Ie,{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(Ie,{sx:{my:1,p:1,borderRadius:1.2,border:"1px dashed",borderColor:"divider",bgcolor:"background.paper"},children:e(hr,{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};P();var Yh=async t=>new Function("m","return import(m)")(t),cl=({code:t,title:r="Mermaid Diagram",height:o=320,enabled:n=true})=>{let[a,i]=er.useState(""),[s,l]=er.useState(""),[d,u]=er.useState(false),p=er.useMemo(()=>t.trim(),[t]);return er.useEffect(()=>{let f=true;return (async()=>{if(!n||!p){i(""),l("");return}u(true),l(""),i("");try{let m=await Yh("mermaid"),v=m?.default||m;if(!v||typeof v.render!="function")throw new Error("Mermaid runtime is not available");v.initialize?.({startOnLoad:!1,securityLevel:"loose",theme:"default"});let y=await v.render(`orbcafe-mermaid-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,p),g=typeof y=="string"?y:y?.svg;f&&typeof g=="string"&&i(g);}catch(m){if(f){let v=m instanceof Error?m.message:"Failed to render Mermaid diagram";l(v);}}finally{f&&u(false);}})(),()=>{f=false;}},[n,p]),c(Bo,{variant:"outlined",sx:{borderRadius:1.5,overflow:"hidden",my:1},children:[e(Ie,{sx:{px:1,py:.6,borderBottom:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:e(hr,{variant:"caption",color:"text.secondary",sx:{letterSpacing:.4,textTransform:"uppercase"},children:r})}),c(Ie,{sx:{p:1},children:[d&&e(Ie,{sx:{minHeight:120,display:"flex",alignItems:"center",justifyContent:"center"},children:e(xd,{size:20})}),!d&&a&&e(Ie,{sx:{maxHeight:o,overflow:"auto","& svg":{display:"block",mx:"auto",maxWidth:"100%",height:"auto"}},dangerouslySetInnerHTML:{__html:a}}),!d&&!a&&c(Ie,{children:[s&&e(jr,{severity:"info",sx:{mb:1},children:s}),e(la,{code:p,language:"mermaid",copyable:true,showLineNumbers:true,wrapLongLines:true})]})]})]})};P();var dl=t=>t.trim().replace(/^\|/,"").replace(/\|$/,"").split("|").map(o=>o.trim()),jh=t=>/^:?-{3,}:?$/.test(t.trim()),Qh=t=>{let r=t.trim(),o=r.startsWith(":"),n=r.endsWith(":");return o&&n?"center":n?"right":"left"},Li=t=>{let r=t.split(`
187
- `).map(s=>s.trim()).filter(Boolean);if(r.length<2)return null;let o=dl(r[0]),n=dl(r[1]);if(o.length===0||n.length!==o.length||!n.every(jh))return null;let a=n.map(Qh),i=r.slice(2).filter(s=>s.includes("|")).map(s=>{let l=dl(s);return l.length<o.length?[...l,...Array.from({length:o.length-l.length},()=>"")]:l.slice(0,o.length)});return {headers:o,aligns:a,rows:i}},pl=({markdown:t,table:r,maxHeight:o=360})=>{let n=er.useMemo(()=>r||(t?Li(t):null),[r,t]);return !n||n.headers.length===0?e(Bo,{variant:"outlined",sx:{p:1.2,borderRadius:1.5},children:e(hr,{variant:"body2",color:"text.secondary",children:"Invalid table block"})}):e(Bo,{variant:"outlined",sx:{borderRadius:1.5,overflow:"hidden",my:1},children:e(Pd,{sx:{maxHeight:o},children:c(wd,{size:"small",stickyHeader:true,children:[e(Td,{children:e(Js,{children:n.headers.map((a,i)=>e(Qs,{align:n.aligns[i],sx:{fontWeight:700,bgcolor:"background.paper"},children:a},`${a}-${i}`))})}),e(kd,{children:n.rows.map((a,i)=>e(Js,{hover:true,children:a.map((s,l)=>e(Qs,{align:n.aligns[l],sx:{whiteSpace:"pre-wrap",wordBreak:"break-word"},children:s||e(Ie,{component:"span",sx:{color:"text.disabled"},children:"-"})},`cell-${i}-${l}`))},`row-${i}`))})]})})})};P();var Oi=({content:t,title:r="Thinking",defaultExpanded:o=false,isStreaming:n=false})=>{let[a,i]=er.useState(o);return c(Ie,{sx:{borderLeft:"2px solid",borderColor:"divider",pl:1,my:.8},children:[c(vd,{direction:"row",alignItems:"center",spacing:.6,children:[e(yd,{size:"small",onClick:()=>i(s=>!s),sx:{transform:a?"rotate(180deg)":"rotate(0deg)",transition:"transform .15s ease"},children:e(an,{fontSize:"inherit"})}),c(hr,{variant:"caption",color:"text.secondary",sx:{fontStyle:"italic"},children:[r,n?" ...":""]})]}),e(nn,{in:a,children:e(hr,{variant:"body2",sx:{pl:4,pt:.4,whiteSpace:"pre-wrap",color:"text.secondary",fontStyle:"italic",lineHeight:1.55},children:t})})]})};P();var ul=/(\*\*[^*]+\*\*|`[^`]+`|\[[^\]]+\]\([^)]+\)|\*[^*]+\*|\$[^$\n]+\$)/g,Fi=t=>t.trim().startsWith("```"),au=t=>/^#{1,6}\s+/.test(t.trim()),ml=t=>/^[-*+]\s+/.test(t.trim()),gl=t=>/^\d+\.\s+/.test(t.trim()),iu=t=>/^(?:-{3,}|\*{3,}|_{3,})$/.test(t.trim()),fl=t=>t.trim().startsWith(">"),su=(t,r)=>{if(r+1>=t.length)return false;let o=t[r],n=t[r+1];return !o.includes("|")||!n.includes("|")?false:/^\s*\|?\s*:?-{3,}:?\s*(\|\s*:?-{3,}:?\s*)+\|?\s*$/.test(n.trim())},lu=t=>t.trim().startsWith("<think>")||t.trim()===":::think",da=(t,r,o)=>{let n=[],a=0,i=0;ul.lastIndex=0;let s=ul.exec(t);for(;s;){s.index>a&&n.push(t.slice(a,s.index));let l=s[0],d=`${o}-${i}`;if(l.startsWith("**")&&l.endsWith("**"))n.push(e("strong",{children:l.slice(2,-2)},d));else if(l.startsWith("*")&&l.endsWith("*"))n.push(e("em",{children:l.slice(1,-1)},d));else if(l.startsWith("`")&&l.endsWith("`"))n.push(e(Ie,{component:"code",sx:{px:.45,py:.08,borderRadius:.8,bgcolor:"action.hover",fontSize:"0.82em",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},children:l.slice(1,-1)},d));else if(l.startsWith("[")&&l.includes("](")&&l.endsWith(")")){let u=l.match(/^\[([^\]]+)\]\(([^)]+)\)$/);u?n.push(e(hd,{href:u[2],target:"_blank",rel:"noreferrer",children:u[1]},d)):n.push(l);}else l.startsWith("$")&&l.endsWith("$")&&r.enableMath?n.push(e(ca,{expression:l,inline:true,allowKatex:true},d)):n.push(l);a=s.index+l.length,i+=1,s=ul.exec(t);}return a<t.length&&n.push(t.slice(a)),n.length>0?n:[t]},pa=({markdown:t,content:r,className:o,enableMath:n=true,enableMermaid:a=true,enableThinkBlock:i=true,codeCopyable:s=true,codeLineNumbers:l=false})=>{let d=t??r??"",u=er.useMemo(()=>{let p=[],f=d.replace(/\r\n/g,`
185
+ ${$}`,be=encodeURI(Q),Ce=document.createElement("a");Ce.setAttribute("href",be),Ce.setAttribute("download",`${t.title||"export"}.csv`),document.body.appendChild(Ce),Ce.click(),document.body.removeChild(Ce);},Ft=()=>{se(true);},Yt=()=>{se(false);};return {isMobile:false,columns:Me,order:l,setOrder:d,orderBy:u,setOrderBy:p,sortBy:f,setSortBy:b,applyMultiSort:re,clearMultiSort:Ke,columnOrder:w,setColumnOrder:T,filterText:i,setFilterText:s,visibleColumns:C,setVisibleColumns:k,showSummary:I,setShowSummary:S,summaryColumns:A,grouping:le,setGrouping:Ee,expandedGroups:E,setExpandedGroups:O,groupAnchorEl:W,setGroupAnchorEl:j,summaryAnchorEl:V,setSummaryAnchorEl:z,columnWidths:F,setColumnWidths:_,anchorEl:B,setAnchorEl:Y,contextMenu:K,setContextMenu:q,sensors:void 0,sortedAndFilteredRows:Ve,visibleRows:ye,summaryRow:Nt,page:m,setPage:te,rowsPerPage:y,setRowsPerPage:he,totalDisplayCount:Be,selected:x,setSelected:h,isAllExpanded:X.length>0&&X.every(Z=>E.has(Z)),handleColumnResize:Fe,handleRequestSort:At,handleSelectAllClick:ce,handleClick:ve,toggleSummaryColumn:st,handleDragEnd:Bt,handleColumnReorder:pt,handleExport:lt,handleContextMenu:Wt,handleCloseContextMenu:ht,toggleColumnVisibility:Ne,toggleGroupExpand:at,toggleGroupField:Je,handleToggleAll:Mt,handleExpandGroupRecursively:Ze,handleCollapseGroupRecursively:St,isGroupFullyExpanded:Ot,handleLayoutLoad:wt,handleVariantLoad:Vt,handleLayoutSave:Xt,effectiveAppId:t.appId||"",currentLayoutData:{visibleColumns:C,order:o?"asc":l,orderBy:o?"":u,sortBy:o?[]:f,columnOrder:w,grouping:le,columnWidths:F,showSummary:I,summaryColumns:A},currentLayoutId:ue,layoutIdToLoad:$e,onPageChange:te,onRowsPerPageChange:he,graphReportOpen:fe,handleOpenGraphReport:Ft,handleCloseGraphReport:Yt}};P();var bD=t=>e("tbody",{...t}),hD=({align:t,...r})=>e("td",{align:t==="inherit"?void 0:t,...r}),vD=t=>e("div",{...t}),yD=t=>e("thead",{...t}),CD=t=>e("tr",{...t}),Jr=t=>{let{t:r}=pe(),o="0.85rem",{title:n,showToolbar:a=true,selectionMode:i,selected:s=[],onSelectionChange:l,actions:d,extraTools:u,fitContainer:p=false,fullWidth:f=false,maxHeight:b,loading:m=false,rowsPerPageOptions:v=[20,50,100,-1],onLayoutSave:y,filterConfig:g,rowKey:x,tableKey:h="default",graphReport:C,quickCreate:k,quickEdit:w,quickDelete:T,serviceUrl:I,disableGrouping:S=false,disableSorting:A=false}=t,R=n||r("table.title.default"),{isMobile:M,columns:N,order:E,orderBy:O,filterText:F,setFilterText:_,visibleColumns:B,showSummary:Y,setShowSummary:W,summaryColumns:j,grouping:V,setGrouping:z,expandedGroups:K,groupAnchorEl:q,setGroupAnchorEl:fe,summaryAnchorEl:se,setSummaryAnchorEl:ue,columnWidths:Se,anchorEl:$e,setAnchorEl:ke,contextMenu:le,sensors:Ee,sortedAndFilteredRows:Me,summaryRow:Pe,visibleRows:Ve,isAllExpanded:tt,page:nt,setPage:it,rowsPerPage:X,setRowsPerPage:De,totalDisplayCount:ye,setSelected:Be,handleColumnResize:at,handleRequestSort:Ze,handleSelectAllClick:St,handleClick:Mt,toggleSummaryColumn:Ot,handleDragEnd:At,handleExport:re,handleContextMenu:Ke,handleCloseContextMenu:Fe,toggleColumnVisibility:ce,toggleGroupExpand:ve,handleToggleAll:te,handleExpandGroupRecursively:he,handleCollapseGroupRecursively:Ne,isGroupFullyExpanded:Je,handleLayoutLoad:st,handleVariantLoad:pt,handleLayoutSave:Bt,effectiveAppId:Xt,currentLayoutData:Vt,currentLayoutId:wt,layoutIdToLoad:Wt,graphReportOpen:ht,handleOpenGraphReport:Nt,handleCloseGraphReport:lt}=hn(t),Ft=C?.enabled??false,Yt=Ft&&(C?.interaction?.enabled??true),Z=Ii(),$=!!k?.enabled,Q=!!w?.enabled,be=!!T?.enabled,Ce=k?.fields,Le=k?.excludeFields||[],_e=k?.initialValues||{},[qe,je]=er__namespace.default.useState(false),[mt,ft]=er__namespace.default.useState(false),[Rt,yt]=er__namespace.default.useState({}),[H,J]=er__namespace.default.useState(false),[ge,Te]=er__namespace.default.useState(false),[et,Xe]=er__namespace.default.useState({}),[kt,bt]=er__namespace.default.useState(false),[gt,Ct]=er__namespace.default.useState(false),nr=m||mt||ge||gt,Et=er__namespace.default.useMemo(()=>{let oe=[...N];if(Array.isArray(Ce)&&Ce.length>0){let me=new Set(Ce);oe=oe.filter(ee=>me.has(ee.id));}if(Le.length>0){let me=new Set(Le);oe=oe.filter(ee=>!me.has(ee.id));}return oe.filter(me=>!!me?.id)},[N,Le,Ce]),Zt=x||"id",Ht=er__namespace.default.useMemo(()=>{let oe=new Set(s);return Me.filter(me=>oe.has(me?.[Zt]))},[s,Me,Zt]),Kt=Ht.length===1?Ht[0]:null,$t=w?.fields,rr=w?.excludeFields||[],ar=w?.editableFields||[],fr=w?.nonEditableFields||[],Ir=w?.primaryKeys?.length?w.primaryKeys:[Zt],Mr=er__namespace.default.useMemo(()=>{let oe=[...N];if(Array.isArray($t)&&$t.length>0){let me=new Set($t);oe=oe.filter(ee=>me.has(ee.id));}if(rr.length>0){let me=new Set(rr);oe=oe.filter(ee=>!me.has(ee.id));}return oe.filter(me=>!!me?.id)},[N,rr,$t]),no=er__namespace.default.useMemo(()=>new Set(Ir),[Ir]),yr=er__namespace.default.useMemo(()=>new Set(ar),[ar]),Or=er__namespace.default.useMemo(()=>new Set(fr),[fr]),qo=er__namespace.default.useCallback(oe=>yr.size>0?yr.has(oe):!(Or.has(oe)||no.has(oe)),[yr,Or,no]);er__namespace.default.useEffect(()=>{!ht&&Z.hasActiveFilters&&Z.clearAll();},[ht,Z.hasActiveFilters,Z.clearAll]);let Xo=()=>{let oe={};Et.forEach(me=>{oe[me.id]=_e[me.id]??"";}),yt(oe),je(true);},Lo=()=>{mt||je(false);},Yo=(oe,me)=>{yt(ee=>({...ee,[oe]:me}));},Zo=async()=>{if(!k?.onSubmit){je(false);return}try{ft(!0),await k.onSubmit(Rt),je(!1);}finally{ft(false);}},Rr=()=>{if(!Kt)return;let oe={};Mr.forEach(ee=>{oe[ee.id]=Kt[ee.id]??"";});let me=w?.getInitialValues?{...oe,...w.getInitialValues(Kt)}:oe;Xe(me),J(true);},Oo=()=>{ge||J(false);},jo=(oe,me)=>{Xe(ee=>({...ee,[oe]:me}));},Kr=async()=>{if(Kt){if(!w?.onSubmit){J(false);return}try{Te(!0),await w.onSubmit(et,Kt),J(!1);}finally{Te(false);}}},ao=()=>{Ht.length!==0&&bt(true);},Ln=()=>{gt||bt(false);},Fo=async()=>{if(Ht.length===0){bt(false);return}if(!T?.onConfirm){bt(false),Be([]),l?.([]);return}try{Ct(!0),await T.onConfirm(Ht),bt(!1),Be([]),l?.([]);}finally{Ct(false);}},D=Me,{fieldMapping:G}=mn({rows:D,config:{...C,title:C?.title||`${R} ${r("graph.reportTitle")}`}}),U=er__namespace.default.useMemo(()=>Yt?Z.applyRows(D,G):D,[Yt,Z.applyRows,D,G]),{model:de}=mn({rows:U,config:{...C,title:C?.title||`${R} ${r("graph.reportTitle")}`,fieldMapping:G}}),He=de.table.columns.map(oe=>({id:oe.id,label:oe.label,align:oe.align||"left",minWidth:120,numeric:oe.align==="right"})),ot=Xt?e(bn,{appId:Xt,tableKey:h,currentLayoutData:Vt,onLayoutLoad:st,targetLayoutId:Wt,activeLayoutId:wt,serviceUrl:I??g?.serviceUrl}):null,Ge=c(jsxRuntime.Fragment,{children:[!S&&e(pn,{groupAnchorEl:q,setGroupAnchorEl:fe,grouping:V,setGrouping:z,columns:N}),e(un,{anchorEl:$e,setAnchorEl:ke,columns:N,visibleColumns:B,toggleColumnVisibility:ce}),e(yi,{anchorEl:se,setAnchorEl:ue,showSummary:Y,setShowSummary:W,columns:N,summaryColumns:j,toggleSummaryColumn:Ot}),e(Ci,{contextMenu:le,handleCloseContextMenu:Fe,columns:N,visibleColumns:B,toggleColumnVisibility:ce})]});return M?c("div",{sx:{display:"flex",flexDirection:"column",gap:2,height:"100%"},children:[g&&e(Wr,{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:h,currentLayout:[{tableKey:h,layoutData:Vt}],variantService:g.variantService,serviceUrl:I??g.serviceUrl}),e(Tp,{title:R,loading:m,showSummary:Y,setShowSummary:W,setAnchorEl:ke,setSummaryAnchorEl:ue,filterText:F,setFilterText:_,sortedAndFilteredRows:Me,selected:s,columns:N,visibleColumns:B,summaryRow:Pe,handleClick:Mt,selectionMode:i}),Ge]}):c("div",{sx:{width:f?"100%":"auto",mb:p?0:2,...p?{flex:1,display:"flex",flexDirection:"column",minHeight:0,height:"100%",overflow:"hidden"}:{}},children:[g&&e("div",{sx:{mb:2},children:e(Wr,{fields:g.fields,filters:g.filters,onFilterChange:g.onFilterChange,onSearch:g.onSearch,variants:g.variants||[],currentVariantId:g.currentVariantId,onVariantLoad:oe=>{pt(oe),g.onVariantLoad&&g.onVariantLoad(oe);},onVariantSave:g.onVariantSave,onVariantDelete:g.onVariantDelete,onVariantSetDefault:g.onVariantSetDefault,loading:m,appId:g.appId,tableKey:h,currentLayout:[{tableKey:h,layoutData:Vt}],currentLayoutId:wt,layoutRefs:[{tableKey:h,layoutId:wt}],variantService:g.variantService,serviceUrl:I??g.serviceUrl})}),c(Ae,{className:"orb-ctable-surface",sx:{width:f?"100%":"auto",mb:p?0:2,display:"flex",flexDirection:"column",overflow:"hidden",position:"relative","&::before":nr?{content:'""',position:"absolute",top:0,left:0,width:"100%",height:"3px",background:"linear-gradient(90deg, color-mix(in oklch, var(--orb-primary) 0%, transparent) 0%, color-mix(in oklch, var(--orb-primary) 25%, transparent) 25%, var(--orb-primary) 50%, color-mix(in oklch, var(--orb-primary) 25%, transparent) 75%, color-mix(in oklch, var(--orb-primary) 0%, transparent) 100%)",backgroundSize:"220% 100%",animation:"cTableTopMarquee 1.2s linear infinite",zIndex:6,pointerEvents:"none"}:{},"@keyframes cTableTopMarquee":{"0%":{backgroundPosition:"220% 0"},"100%":{backgroundPosition:"-120% 0"}},...b?{height:b}:p?{flex:1,minHeight:0,height:"100%"}:{}},children:[a&&e(fi,{filterText:F,setFilterText:_,onRowsPerPageChange:De,rowsPerPage:X,rowsPerPageOptions:v,page:nt,count:ye,onPageChange:it,actions:d,extraTools:u,grouping:V,disableGrouping:S,groupAnchorEl:q,setGroupAnchorEl:fe,showSummary:Y,setShowSummary:W,anchorEl:$e,setAnchorEl:ke,summaryAnchorEl:se,setSummaryAnchorEl:ue,handleExport:re,showCreateButton:$,onOpenCreateDialog:Xo,showEditButton:Q,onOpenEditDialog:Rr,editDisabled:Ht.length!==1,showDeleteButton:be,onOpenDeleteConfirm:ao,deleteDisabled:Ht.length===0,onLayoutSave:y||g?.variantService&&g?.appId?Bt:void 0,loading:m,layoutManager:ot,onOpenGraphReport:Ft?Nt:void 0}),e("div",{sx:{flex:1,...b?{maxHeight:b,height:b}:p?{height:0,maxHeight:"none"}:{maxHeight:"calc(100vh - 320px)"},overflowY:"auto",overflowX:"auto",position:"relative",minHeight:0},children:e(core.DndContext,{sensors:Ee,collisionDetection:core.closestCenter,onDragEnd:At,modifiers:[modifiers.restrictToHorizontalAxis],children:c("table",{className:"orb-tbl orb-ctable",style:{minWidth:f?750:void 0,width:f?"100%":"auto",tableLayout:Object.keys(Se).length>0?"fixed":"auto",borderCollapse:"separate",borderSpacing:0,fontSize:o},"aria-labelledby":"tableTitle",children:[e(hi,{columns:N,visibleColumns:B,order:E,orderBy:O,onRequestSort:Ze,disableSorting:A,onContextMenu:Ke,selectionMode:i,grouping:V,isAllExpanded:tt,handleToggleAll:te,rowCount:Me.length,numSelected:s.length,onSelectAllClick:St,columnWidths:Se,onColumnResize:at}),e(vi,{visibleRows:Ve,columns:N,visibleColumns:B,selectionMode:i,selected:s,orderBy:O,loading:m,expandedGroups:K,toggleGroupExpand:ve,handleExpandGroupRecursively:he,handleCollapseGroupRecursively:Ne,isGroupFullyExpanded:Je,handleClick:Mt,onSelectionChange:l,grouping:V,rowKeyProp:x,page:nt,rowsPerPage:X}),Y&&e(Pp,{showSummary:Y,columns:N,visibleColumns:B,summaryRow:Pe,selectionMode:i?.toString(),grouping:V,columnWidths:Se,orderBy:O,zIndex:3})]})})})]}),$&&c(Lt,{open:qe,onClose:Lo,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||r("quickCreate.createWithTitle",{title:R})}),e("div",{className:"orb-dialog-content",sx:{pt:"8px !important"},children:c("div",{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[Et.map(oe=>{let me=oe.type==="number"||oe.numeric?"number":oe.type==="date"?"date":"text",ee=oe.label||oe.id;return e(ze,{label:ee,value:Rt[oe.id]??"",onChange:Oe=>Yo(oe.id,Oe.target.value),type:me,size:"small",fullWidth:true,InputLabelProps:{shrink:me==="date"?true:void 0,sx:{fontSize:"0.85rem"}},InputProps:{sx:{fontSize:"0.85rem"}}},`quick-create-${oe.id}`)}),k?.description&&e(jr,{severity:"info",sx:{fontSize:"0.85rem","& span":{fontSize:"0.85rem"}},children:k.description})]})}),c("div",{className:"orb-dialog-actions",sx:{px:3,pb:2},children:[e(we,{onClick:Lo,sx:{fontSize:"0.85rem"},disabled:mt,children:k?.cancelLabel||r("common.cancel")}),e(we,{onClick:Zo,variant:"contained",sx:{fontSize:"0.85rem",fontWeight:700},disabled:mt,children:k?.submitLabel||r("common.save")})]})]}),Q&&c(Lt,{open:H,onClose:Oo,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:w?.title||r("quickEdit.editWithTitle",{title:R})}),e("div",{className:"orb-dialog-content",sx:{pt:"8px !important"},children:c("div",{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[Mr.map(oe=>{let me=oe.type==="number"||oe.numeric?"number":oe.type==="date"?"date":"text",ee=oe.label||oe.id,Oe=qo(oe.id);return e(ze,{label:ee,value:et[oe.id]??"",onChange:Qe=>jo(oe.id,Qe.target.value),type:me,size:"small",fullWidth:true,disabled:!Oe,InputLabelProps:{shrink:me==="date"?true:void 0,sx:{fontSize:"0.85rem"}},InputProps:{sx:{fontSize:"0.85rem"}}},`quick-edit-${oe.id}`)}),w?.description&&e(jr,{severity:"info",sx:{fontSize:"0.85rem","& span":{fontSize:"0.85rem"}},children:w.description})]})}),c("div",{className:"orb-dialog-actions",sx:{px:3,pb:2},children:[e(we,{onClick:Oo,sx:{fontSize:"0.85rem"},disabled:ge,children:w?.cancelLabel||r("common.cancel")}),e(we,{onClick:Kr,variant:"contained",sx:{fontSize:"0.85rem",fontWeight:700},disabled:ge||!Kt,children:w?.submitLabel||r("common.save")})]})]}),be&&e(jn,{open:kt,type:"warning",title:T?.title||r("quickDelete.confirmTitle"),message:T?.message||(Ht.length>1?r("quickDelete.confirmMessageMultiple",{count:Ht.length}):r("quickDelete.confirmMessageSingle")),confirmText:T?.confirmText||r("common.delete"),cancelText:T?.cancelText||r("common.cancel"),onClose:Ln,onConfirm:Fo}),Ge,Ft&&e(Pi,{open:ht,onClose:lt,model:de,aiAssistant:C?.aiAssistant,interaction:Yt?{enabled:true,filters:Z.filters,fieldMapping:G,onPrimaryDimensionClick:oe=>Z.setFilter("primaryDimension",oe),onSecondaryDimensionClick:oe=>Z.setFilter("secondaryDimension",oe),onStatusClick:oe=>Z.setFilter("status",oe),onClearFilter:Z.clearFilter,onClearAll:Z.clearAll}:void 0,tableContent:e(Jr,{appId:Xt||"graph-report-internal",title:r("graph.dataBody"),columns:He,rows:de.table.rows,rowKey:"id",fullWidth:true,maxHeight:"420px",rowsPerPage:20,rowsPerPageOptions:[20,50,100],graphReport:{enabled:false}})})]})},xD=Jr;P();var MD=({id:t,title:r,hideHeader:o=true,filterConfig:n,tableProps:a,children:i,spacing:s=1,mode:l="separated"})=>{let d=n?{...n,appId:n.appId||t}:void 0,u={...a,appId:a.appId||t};return c(ui,{title:r,hideHeader:o,children:[c(ie,{spacing:s,sx:{height:"100%",overflow:"hidden"},children:[l==="separated"&&d&&e("div",{sx:{flexShrink:0},children:e(Wr,{...d})}),e("div",{sx:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:e(Jr,{...u,fitContainer:true,filterConfig:l==="integrated"?d:void 0})})]}),i]})};var LD=({metadata:t,fetchData:r,initialRowsPerPage:o=20,rowsPerPageOptions:n=[20,50,100,-1],tableKey:a="default",mode:i="integrated",serviceUrl:s,variantService:l})=>{let{t:d}=pe(),[u,p]=er.useState(false),[f,b]=er.useState([]),[m,v]=er.useState({}),[y,g]=er.useState(t.variants||[]),[x,h]=er.useState(t.layout||null),[C,k]=er.useState(""),[w,T]=er.useState(0),[I,S]=er.useState(0),[A,R]=er.useState(o),[M,N]=er.useState([]),[E,O]=er.useState("asc"),[F,_]=er.useState("");er.useEffect(()=>{let se={};t.filters.forEach(ue=>{ue.defaultValue!==void 0&&(se[ue.id]=ue.defaultValue);}),v(se);},[t.filters]);let B=er.useCallback(async(se,ue,Se,$e,ke)=>{p(true);try{let le={...se,page:ue+1,limit:Se,sort:ke,order:$e},Ee;r?Ee=await r(le):typeof t.api=="function"?Ee=await t.api(le):t.api&&typeof t.api=="object"?(console.log("Fetching from URL:",t.api.url,le),Ee={rows:[],total:0}):(console.warn("No API configured for report"),Ee={rows:[],total:0}),Ee&&(b(Ee.rows||[]),T(Ee.total||0));}catch(le){console.error("Failed to fetch report data",le);}finally{p(false);}},[t.api,r]);er.useEffect(()=>{B(m,I,A,E,F);},[B,I,A,E,F]);let Y=()=>{S(0),B(m,0,A,E,F);},W=se=>{S(0),R(se);},j=(se,ue)=>{O(ue),_(se);},V=se=>{v(se);},z=se=>{k(se?.id||"");let ue=Ai(se,a);if(ue){let $e=ue.values??ue;v($e),B($e,0,A,E,F),S(0);}let{layout:Se}=Ei(se,a);Se&&h(Se);},K=se=>{let ue={...se,id:Date.now().toString(),createdAt:new Date().toISOString()};g(Se=>[...Se,ue]);},q=se=>{h(se);};return {pageProps:{id:t.id,title:t.title,mode:i,filterConfig:{appId:t.id,tableKey:a,fields:t.filters,filters:m,onFilterChange:V,onSearch:Y,onVariantLoad:z,onVariantSave:K,onVariantDelete:se=>g(ue=>ue.filter(Se=>Se.id!==se)),onVariantSetDefault:se=>{g(ue=>ue.map(Se=>({...Se,isDefault:Se.id===se})));},variants:y,currentVariantId:C,variantService:l,serviceUrl:s},tableProps:{appId:t.id,tableKey:a,columns:t.columns,rows:f,loading:u,rowKey:"id",count:w,page:I,rowsPerPage:A,rowsPerPageOptions:n,onPageChange:S,onRowsPerPageChange:W,selectionMode:"multiple",selected:M,onSelectionChange:N,onLayoutSave:q,layout:x,title:t.title,showSummary:true,order:E,orderBy:F,serviceUrl:s,onSortChange:j,graphReport:t.graphReport||{enabled:true,title:`${t.title} ${d("graph.reportTitle")}`}}},filters:m,rows:f,loading:u,refresh:Y}};P();var Oh=new Set(["id","title","description","icon","iconNode","meta"]),Fh=t=>t.replace(/([A-Z])/g," $1").replace(/[._-]+/g," ").replace(/^\w/,r=>r.toUpperCase()).trim(),Bh=t=>Object.entries(t).filter(([r,o])=>!Oh.has(r)&&o!==null&&o!==void 0&&["string","number","boolean"].includes(typeof o)).map(([r,o])=>({key:r,label:Fh(r),value:String(o)})),eu=({item:t,open:r,onClose:o,onDownloadClick:n,renderContent:a,downloadTooltip:i,closeTooltip:s})=>{let{t:l}=pe(),u=Cr()==="dark"?"var(--orb-p300)":"var(--orb-primary)";er__namespace.default.useEffect(()=>{if(!r)return;let f=b=>{b.key==="Escape"&&o();};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[r,o]);let p=Bh(t);return typeof document>"u"?null:reactDom.createPortal(c(jsxRuntime.Fragment,{children:[e("div",{"aria-hidden":"true",onClick:o,sx:{position:"fixed",inset:0,zIndex:1299,backgroundColor:"rgba(1, 9, 26, 0.4)",opacity:r?1:0,pointerEvents:r?"auto":"none",transition:"opacity 200ms ease"}}),c("div",{role:"dialog","aria-modal":"true","aria-label":t.title,sx:{position:"fixed",top:"50%",left:"50%",zIndex:1300,width:"min(520px, 92vw)",maxHeight:"82vh",display:"flex",flexDirection:"column",bgcolor:"background.paper",border:"1px solid",borderColor:"divider",borderRadius:3,boxShadow:"0 24px 64px rgba(1, 9, 26, 0.3)",transform:r?"translate(-50%, -50%) scale(1)":"translate(-50%, -47%) scale(0.96)",opacity:r?1:0,transition:"transform 200ms ease, opacity 180ms ease"},children:[c(ie,{direction:"row",spacing:1.5,alignItems:"center",sx:{p:2.5,pb:2,borderBottom:"1px solid",borderColor:"divider",flexShrink:0},children:[e("div",{sx:{width:56,height:56,flex:"0 0 auto",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:3,border:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:t.iconNode??e(Tt,{name:t.icon??"product",size:30,style:{color:u}})}),c("div",{sx:{flex:1,minWidth:0},children:[e(L,{component:"div",sx:{fontWeight:700,fontSize:"1.1rem",lineHeight:1.3,wordBreak:"break-word"},children:t.title}),t.meta?e(L,{component:"div",sx:{fontSize:"0.8rem",color:"text.secondary"},children:t.meta}):null]}),e(ae,{tooltip:s??l("cardPage.close"),"aria-label":s??l("cardPage.close"),onClick:o,children:e(Tt,{name:"decline",size:18})})]}),e("div",{sx:{flex:1,minHeight:0,overflowY:"auto",p:2.5},children:a?a(t):c(jsxRuntime.Fragment,{children:[t.description?e(L,{component:"div",sx:{fontSize:"0.9rem",lineHeight:1.6,color:"text.primary"},children:t.description}):null,p.length>0?e("div",{sx:{mt:t.description?2.5:0,display:"grid",gap:1.5},children:p.map(f=>c("div",{children:[e(L,{component:"div",sx:{fontSize:"0.72rem",fontWeight:600,color:"text.secondary",textTransform:"uppercase",letterSpacing:"0.04em"},children:f.label}),e(L,{component:"div",sx:{fontSize:"0.88rem",color:"text.primary",wordBreak:"break-word"},children:f.value})]},f.key))}):null]})}),n?e("div",{sx:{p:2.5,pt:2,borderTop:"1px solid",borderColor:"divider",flexShrink:0},children:e(we,{variant:"contained",sx:{width:"100%"},startIcon:e(Tt,{name:"download",size:16}),onClick:()=>n(t),children:i??l("cardPage.download")})}):null]})]}),document.body)};P();var Hh={display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"3",overflow:"hidden"},zh=({item:t,onDetailClick:r,onDownloadClick:o,detailTooltip:n,downloadTooltip:a})=>{let{t:i}=pe(),l=Cr()==="dark"?"var(--orb-p300)":"var(--orb-primary)",d=t.iconNode??e(Tt,{name:t.icon??"product",size:26,style:{color:l}});return c(Ae,{elevation:0,sx:{p:2,height:"100%",display:"flex",flexDirection:"column",borderRadius:3,border:"1px solid",borderColor:"divider",bgcolor:"background.paper",boxShadow:"0 8px 20px rgba(15, 23, 42, 0.06)",transition:"transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease","&:hover":{transform:"translateY(-2px)",borderColor:"primary.main",boxShadow:"0 14px 32px rgba(15, 23, 42, 0.12)"}},children:[c(ie,{direction:"row",spacing:1.5,alignItems:"center",children:[e("div",{sx:{width:48,height:48,flex:"0 0 auto",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:2.5,border:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:d}),c("div",{sx:{flex:1,minWidth:0},children:[e(L,{component:"div",noWrap:true,sx:{fontWeight:700,fontSize:"0.98rem",lineHeight:1.3},children:t.title}),t.meta?e(L,{component:"div",noWrap:true,sx:{fontSize:"0.75rem",color:"text.secondary"},children:t.meta}):null]})]}),e("div",{sx:{mt:1.5,flex:1,minHeight:0},children:e(L,{component:"div",sx:{fontSize:"0.84rem",lineHeight:1.45,color:"text.primary",...Hh},children:t.description||"\xA0"})}),c(ie,{direction:"row",spacing:.5,justifyContent:"flex-end",sx:{mt:1.5},children:[e(ae,{tooltip:n??i("cardPage.viewDetails"),"aria-label":n??i("cardPage.viewDetails"),onClick:()=>r?.(t),children:e(Tt,{name:"show",size:18})}),e(ae,{tooltip:a??i("cardPage.download"),"aria-label":a??i("cardPage.download"),onClick:()=>o?.(t),children:e(Tt,{name:"download",size:18})})]})]})},ru=({items:t,loading:r=false,onDetailClick:o,onDownloadClick:n,minCardWidth:a=260,detailTooltip:i,downloadTooltip:s,emptyText:l,detailPanel:d=true,renderDetailContent:u})=>{let{t:p}=pe(),[f,b]=er__namespace.default.useState(null),[m,v]=er__namespace.default.useState(false),y=x=>{o?.(x),d&&(b(x),requestAnimationFrame(()=>requestAnimationFrame(()=>v(true))));},g=()=>{v(false),setTimeout(()=>b(null),260);};return r?e("div",{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",minHeight:240},children:e(Xr,{})}):t.length?c(jsxRuntime.Fragment,{children:[e("div",{sx:{flex:1,minHeight:0,overflowY:"auto",display:"grid",gridTemplateColumns:`repeat(auto-fill, minmax(${a}px, 1fr))`,gap:2,alignContent:"start",p:.5},children:t.map(x=>e(zh,{item:x,onDetailClick:y,onDownloadClick:n,detailTooltip:i,downloadTooltip:s},x.id))}),d&&f?e(eu,{item:f,open:m,onClose:g,onDownloadClick:n,renderContent:u,downloadTooltip:s}):null]}):e("div",{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",minHeight:240},children:e(L,{sx:{color:"text.secondary"},children:l??p("cardPage.empty")})})};P();var rN=({id:t,title:r,hideHeader:o=true,filterConfig:n,gridProps:a,children:i,spacing:s=1})=>{let l=n?{...n,appId:n.appId||t}:void 0;return c(ui,{title:r,hideHeader:o,children:[c(ie,{spacing:s,sx:{height:"100%",overflow:"hidden"},children:[l&&e("div",{sx:{flexShrink:0},children:e(Wr,{...l})}),e("div",{sx:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:e(ru,{...a})})]}),i]})};var sN=({metadata:t,fetchData:r,tableKey:o="default",variantService:n,serviceUrl:a,onDetailClick:i,onDownloadClick:s,minCardWidth:l})=>{let[d,u]=er.useState(false),[p,f]=er.useState([]),[b,m]=er.useState(0),[v,y]=er.useState({}),[g,x]=er.useState(t.variants||[]),[h,C]=er.useState("");er.useEffect(()=>{let R={};t.filters.forEach(M=>{M.defaultValue!==void 0&&(R[M.id]=M.defaultValue);}),y(R);},[t.filters]);let k=er.useCallback(async R=>{u(true);try{let M=r?await r({...R}):{rows:[],total:0};f(M?.rows||[]),m(M?.total||0);}catch(M){console.error("Failed to fetch card page data",M);}finally{u(false);}},[r]);er.useEffect(()=>{k(v);},[k]);let w=()=>{k(v);},T=R=>{y(R);},I=R=>{C(R?.id||"");let M=Ai(R,o);if(M){let N=M.values??M;y(N),k(N);}},S=R=>{let M={...R,id:Date.now().toString(),createdAt:new Date().toISOString()};x(N=>[...N,M]);};return {pageProps:{id:t.id,title:t.title,filterConfig:{appId:t.id,tableKey:o,fields:t.filters,filters:v,onFilterChange:T,onSearch:w,onVariantLoad:I,onVariantSave:S,onVariantDelete:R=>x(M=>M.filter(N=>N.id!==R)),onVariantSetDefault:R=>{x(M=>M.map(N=>({...N,isDefault:N.id===R})));},variants:g,currentVariantId:h,variantService:n,serviceUrl:a},gridProps:{items:p,loading:d,onDetailClick:i,onDownloadClick:s,minCardWidth:l}},items:p,total:b,filters:v,loading:d,refresh:w}};var Wh=t=>[...t].sort((r,o)=>o.value-r.value),dN=({bars:t=[],lines:r=[],combos:o=[],heatmap:n=[],pies:a=[],waterfalls:i=[]})=>{let s=er.useMemo(()=>Wh(t),[t]),l=er.useMemo(()=>[...r],[r]),d=er.useMemo(()=>[...o],[o]),u=er.useMemo(()=>[...n],[n]),p=er.useMemo(()=>{let b=a.reduce((m,v)=>m+v.value,0);return a.map(m=>({...m,percent:b>0?m.value/b*100:m.percent}))},[a]),f=er.useMemo(()=>[...i],[i]);return {bars:s,lines:l,combos:d,heatmap:u,pies:p,waterfalls:f}};var fN=({apiKey:t,query:r,zoom:o=14,mapType:n="roadmap"})=>er.useMemo(()=>!t||!r?"":oa({apiKey:t,query:r,zoom:o,mapType:n}),[t,r,o,n]),bN=({keyword:t,location:r})=>er.useMemo(()=>wi({keyword:t,location:r?{lng:r.lng,lat:r.lat,name:r.name}:void 0}),[t,r]);P();var la=({code:t,language:r="text",copyable:o=true,showLineNumbers:n=false,wrapLongLines:a=false,maxHeight:i})=>{let[s,l]=er.useState(false),d=er.useMemo(()=>t.replace(/\n$/,"").split(`
186
+ `),[t]);return c("div",{style:{border:"1px solid var(--orb-border)",borderRadius:12,overflow:"hidden",background:"var(--orb-canvas)"},children:[c("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"4.8px 8px",background:"var(--orb-hover)",borderBottom:"1px solid var(--orb-border)"},children:[e("span",{style:{fontSize:12,fontWeight:500,textTransform:"uppercase",letterSpacing:.5,color:"var(--orb-muted)",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},children:r}),o&&e(ae,{size:"small",tooltip:s?"Copied":"Copy",onClick:async()=>{try{await navigator.clipboard.writeText(t),l(!0),window.setTimeout(()=>l(!1),1400);}catch{l(false);}},children:s?e(qr,{size:14,strokeWidth:1.8}):e(vo,{size:14,strokeWidth:1.8})})]}),e("pre",{style:{margin:0,padding:10,fontSize:"0.82rem",lineHeight:1.55,overflow:"auto",maxHeight:i,background:"var(--orb-surface)",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},children:n?d.map((p,f)=>c("div",{style:{display:"flex"},children:[e("span",{style:{width:34,flexShrink:0,textAlign:"right",paddingRight:8,color:"var(--orb-disabled-fg)",userSelect:"none"},children:f+1}),e("span",{style:{whiteSpace:a?"pre-wrap":"pre",wordBreak:a?"break-word":"normal"},children:p})]},`${f}-${p}`)):e("code",{style:{display:"block",whiteSpace:a?"pre-wrap":"pre",wordBreak:a?"break-word":"normal"},children:t})})]})};P();var qh=t=>{let r=t.trim();return r.startsWith("$$")&&r.endsWith("$$")&&r.length>=4&&(r=r.slice(2,-2).trim()),r.startsWith("$")&&r.endsWith("$")&&r.length>=2&&(r=r.slice(1,-1).trim()),r},Xh=async t=>new Function("m","return import(m)")(t),ca=({expression:t,inline:r=false,allowKatex:o=false})=>{let n=er.useMemo(()=>qh(t),[t]),[a,i]=er.useState("");return er.useEffect(()=>{let s=true;return (async()=>{if(!o||!n){i("");return}try{let d=await Xh("katex"),p=(d?.default||d)?.renderToString?.(n,{displayMode:!r,throwOnError:!1,strict:"warn"});s&&typeof p=="string"&&i(p);}catch{s&&i("");}})(),()=>{s=false;}},[o,n,r]),n?a?e(Ie,{component:r?"span":"div",sx:{display:r?"inline-flex":"block",my:r?0:.5,overflowX:"auto"},dangerouslySetInnerHTML:{__html:a}}):r?e(Ie,{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(Ie,{sx:{my:1,p:1,borderRadius:1.2,border:"1px dashed",borderColor:"divider",bgcolor:"background.paper"},children:e(hr,{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};P();var jh=async t=>new Function("m","return import(m)")(t),dl=({code:t,title:r="Mermaid Diagram",height:o=320,enabled:n=true})=>{let[a,i]=er.useState(""),[s,l]=er.useState(""),[d,u]=er.useState(false),p=er.useMemo(()=>t.trim(),[t]);return er.useEffect(()=>{let f=true;return (async()=>{if(!n||!p){i(""),l("");return}u(true),l(""),i("");try{let m=await jh("mermaid"),v=m?.default||m;if(!v||typeof v.render!="function")throw new Error("Mermaid runtime is not available");v.initialize?.({startOnLoad:!1,securityLevel:"loose",theme:"default"});let y=await v.render(`orbcafe-mermaid-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,p),g=typeof y=="string"?y:y?.svg;f&&typeof g=="string"&&i(g);}catch(m){if(f){let v=m instanceof Error?m.message:"Failed to render Mermaid diagram";l(v);}}finally{f&&u(false);}})(),()=>{f=false;}},[n,p]),c(Bo,{variant:"outlined",sx:{borderRadius:1.5,overflow:"hidden",my:1},children:[e(Ie,{sx:{px:1,py:.6,borderBottom:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:e(hr,{variant:"caption",color:"text.secondary",sx:{letterSpacing:.4,textTransform:"uppercase"},children:r})}),c(Ie,{sx:{p:1},children:[d&&e(Ie,{sx:{minHeight:120,display:"flex",alignItems:"center",justifyContent:"center"},children:e(Sd,{size:20})}),!d&&a&&e(Ie,{sx:{maxHeight:o,overflow:"auto","& svg":{display:"block",mx:"auto",maxWidth:"100%",height:"auto"}},dangerouslySetInnerHTML:{__html:a}}),!d&&!a&&c(Ie,{children:[s&&e(jr,{severity:"info",sx:{mb:1},children:s}),e(la,{code:p,language:"mermaid",copyable:true,showLineNumbers:true,wrapLongLines:true})]})]})]})};P();var pl=t=>t.trim().replace(/^\|/,"").replace(/\|$/,"").split("|").map(o=>o.trim()),Jh=t=>/^:?-{3,}:?$/.test(t.trim()),ev=t=>{let r=t.trim(),o=r.startsWith(":"),n=r.endsWith(":");return o&&n?"center":n?"right":"left"},Li=t=>{let r=t.split(`
187
+ `).map(s=>s.trim()).filter(Boolean);if(r.length<2)return null;let o=pl(r[0]),n=pl(r[1]);if(o.length===0||n.length!==o.length||!n.every(Jh))return null;let a=n.map(ev),i=r.slice(2).filter(s=>s.includes("|")).map(s=>{let l=pl(s);return l.length<o.length?[...l,...Array.from({length:o.length-l.length},()=>"")]:l.slice(0,o.length)});return {headers:o,aligns:a,rows:i}},ul=({markdown:t,table:r,maxHeight:o=360})=>{let n=er.useMemo(()=>r||(t?Li(t):null),[r,t]);return !n||n.headers.length===0?e(Bo,{variant:"outlined",sx:{p:1.2,borderRadius:1.5},children:e(hr,{variant:"body2",color:"text.secondary",children:"Invalid table block"})}):e(Bo,{variant:"outlined",sx:{borderRadius:1.5,overflow:"hidden",my:1},children:e(Td,{sx:{maxHeight:o},children:c(kd,{size:"small",stickyHeader:true,children:[e(Id,{children:e(el,{children:n.headers.map((a,i)=>e(Js,{align:n.aligns[i],sx:{fontWeight:700,bgcolor:"background.paper"},children:a},`${a}-${i}`))})}),e(Pd,{children:n.rows.map((a,i)=>e(el,{hover:true,children:a.map((s,l)=>e(Js,{align:n.aligns[l],sx:{whiteSpace:"pre-wrap",wordBreak:"break-word"},children:s||e(Ie,{component:"span",sx:{color:"text.disabled"},children:"-"})},`cell-${i}-${l}`))},`row-${i}`))})]})})})};P();var Oi=({content:t,title:r="Thinking",defaultExpanded:o=false,isStreaming:n=false})=>{let[a,i]=er.useState(o);return c(Ie,{sx:{borderLeft:"2px solid",borderColor:"divider",pl:1,my:.8},children:[c(yd,{direction:"row",alignItems:"center",spacing:.6,children:[e(Cd,{size:"small",onClick:()=>i(s=>!s),sx:{transform:a?"rotate(180deg)":"rotate(0deg)",transition:"transform .15s ease"},children:e(an,{fontSize:"inherit"})}),c(hr,{variant:"caption",color:"text.secondary",sx:{fontStyle:"italic"},children:[r,n?" ...":""]})]}),e(nn,{in:a,children:e(hr,{variant:"body2",sx:{pl:4,pt:.4,whiteSpace:"pre-wrap",color:"text.secondary",fontStyle:"italic",lineHeight:1.55},children:t})})]})};P();var ml=/(\*\*[^*]+\*\*|`[^`]+`|\[[^\]]+\]\([^)]+\)|\*[^*]+\*|\$[^$\n]+\$)/g,Fi=t=>t.trim().startsWith("```"),iu=t=>/^#{1,6}\s+/.test(t.trim()),gl=t=>/^[-*+]\s+/.test(t.trim()),fl=t=>/^\d+\.\s+/.test(t.trim()),su=t=>/^(?:-{3,}|\*{3,}|_{3,})$/.test(t.trim()),bl=t=>t.trim().startsWith(">"),lu=(t,r)=>{if(r+1>=t.length)return false;let o=t[r],n=t[r+1];return !o.includes("|")||!n.includes("|")?false:/^\s*\|?\s*:?-{3,}:?\s*(\|\s*:?-{3,}:?\s*)+\|?\s*$/.test(n.trim())},cu=t=>t.trim().startsWith("<think>")||t.trim()===":::think",da=(t,r,o)=>{let n=[],a=0,i=0;ml.lastIndex=0;let s=ml.exec(t);for(;s;){s.index>a&&n.push(t.slice(a,s.index));let l=s[0],d=`${o}-${i}`;if(l.startsWith("**")&&l.endsWith("**"))n.push(e("strong",{children:l.slice(2,-2)},d));else if(l.startsWith("*")&&l.endsWith("*"))n.push(e("em",{children:l.slice(1,-1)},d));else if(l.startsWith("`")&&l.endsWith("`"))n.push(e(Ie,{component:"code",sx:{px:.45,py:.08,borderRadius:.8,bgcolor:"action.hover",fontSize:"0.82em",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},children:l.slice(1,-1)},d));else if(l.startsWith("[")&&l.includes("](")&&l.endsWith(")")){let u=l.match(/^\[([^\]]+)\]\(([^)]+)\)$/);u?n.push(e(vd,{href:u[2],target:"_blank",rel:"noreferrer",children:u[1]},d)):n.push(l);}else l.startsWith("$")&&l.endsWith("$")&&r.enableMath?n.push(e(ca,{expression:l,inline:true,allowKatex:true},d)):n.push(l);a=s.index+l.length,i+=1,s=ml.exec(t);}return a<t.length&&n.push(t.slice(a)),n.length>0?n:[t]},pa=({markdown:t,content:r,className:o,enableMath:n=true,enableMermaid:a=true,enableThinkBlock:i=true,codeCopyable:s=true,codeLineNumbers:l=false})=>{let d=t??r??"",u=er.useMemo(()=>{let p=[],f=d.replace(/\r\n/g,`
188
188
  `).split(`
189
- `),b={enableMath:n},m=0;for(;m<f.length;){let v=f[m],y=v.trim();if(!y){m+=1;continue}if(i&&lu(v)){if(y.startsWith("<think>")){let h=[],C=v;for(;;){let k=C.indexOf("<think>"),w=k>=0?C.slice(k+7):C,T=w.indexOf("</think>");if(T>=0){h.push(w.slice(0,T)),m+=1;break}if(h.push(w),m+=1,m>=f.length)break;C=f[m];}p.push(e(Oi,{content:h.join(`
189
+ `),b={enableMath:n},m=0;for(;m<f.length;){let v=f[m],y=v.trim();if(!y){m+=1;continue}if(i&&cu(v)){if(y.startsWith("<think>")){let h=[],C=v;for(;;){let k=C.indexOf("<think>"),w=k>=0?C.slice(k+7):C,T=w.indexOf("</think>");if(T>=0){h.push(w.slice(0,T)),m+=1;break}if(h.push(w),m+=1,m>=f.length)break;C=f[m];}p.push(e(Oi,{content:h.join(`
190
190
  `).trim()},`think-tag-${m}`));continue}m+=1;let x=[];for(;m<f.length&&f[m].trim()!==":::";)x.push(f[m]),m+=1;m<f.length&&f[m].trim()===":::"&&(m+=1),p.push(e(Oi,{content:x.join(`
191
191
  `).trim()},`think-fence-${m}`));continue}if(Fi(v)){let x=y.slice(3).trim().toLowerCase(),h=[];for(m+=1;m<f.length&&!Fi(f[m]);)h.push(f[m]),m+=1;m<f.length&&Fi(f[m])&&(m+=1);let C=h.join(`
192
- `);if(a&&x==="mermaid"){p.push(e(cl,{code:C},`mermaid-${m}`));continue}if(n&&["math","latex","katex"].includes(x)){p.push(e(ca,{expression:C,allowKatex:true},`math-fence-${m}`));continue}p.push(e(la,{code:C,language:x||"text",copyable:s,showLineNumbers:l,wrapLongLines:true},`code-${m}`));continue}if(n&&y.startsWith("$$")){let x=[];if(y.endsWith("$$")&&y!=="$$")x.push(y.slice(2,-2)),m+=1;else {let C=v.slice(v.indexOf("$$")+2);for(C.trim()&&x.push(C),m+=1;m<f.length;){let k=f[m],w=k.indexOf("$$");if(w>=0){x.push(k.slice(0,w)),m+=1;break}x.push(k),m+=1;}}p.push(e(ca,{expression:x.join(`
193
- `).trim(),allowKatex:true},`math-${m}`));continue}if(au(v)){let x=Math.min(6,v.match(/^#{1,6}/)?.[0]?.length||1),h=v.replace(/^#{1,6}\s+/,""),C=x===1?"h5":x===2?"h6":"subtitle1";p.push(e(hr,{variant:C,sx:{mt:x===1?1.2:.8,mb:.5,fontWeight:700},children:da(h,b,`h-${m}`)},`heading-${m}`)),m+=1;continue}if(iu(v)){p.push(e(Cd,{sx:{my:1.2}},`hr-${m}`)),m+=1;continue}if(su(f,m)){let x=m+2;for(;x<f.length&&f[x].trim()&&f[x].includes("|");)x+=1;let h=f.slice(m,x).join(`
194
- `),C=Li(h);if(C){p.push(e(pl,{table:C},`table-${m}`)),m=x;continue}}if(fl(v)){let x=[];for(;m<f.length&&fl(f[m]);)x.push(f[m].replace(/^\s*>\s?/,"")),m+=1;p.push(e(Bo,{variant:"outlined",sx:{px:1,py:.8,my:.9,borderLeftWidth:3,borderLeftStyle:"solid",borderLeftColor:"primary.main",bgcolor:"action.hover"},children:e(hr,{variant:"body2",sx:{whiteSpace:"pre-wrap"},children:x.map((h,C)=>c(er.Fragment,{children:[C>0&&e("br",{}),da(h,b,`q-${m}-${C}`)]},`quote-line-${C}`))})},`quote-${m}`));continue}if(ml(v)){let x=[];for(;m<f.length&&ml(f[m]);)x.push(f[m].trim().replace(/^[-*+]\s+/,"")),m+=1;p.push(e(Ie,{component:"ul",sx:{my:.8,pl:2.5},children:x.map((h,C)=>e(Ie,{component:"li",sx:{mb:.45},children:e(hr,{variant:"body2",children:da(h,b,`ul-${m}-${C}`)})},`ul-item-${C}`))},`ul-${m}`));continue}if(gl(v)){let x=[];for(;m<f.length&&gl(f[m]);)x.push(f[m].trim().replace(/^\d+\.\s+/,"")),m+=1;p.push(e(Ie,{component:"ol",sx:{my:.8,pl:2.7},children:x.map((h,C)=>e(Ie,{component:"li",sx:{mb:.45},children:e(hr,{variant:"body2",children:da(h,b,`ol-${m}-${C}`)})},`ol-item-${C}`))},`ol-${m}`));continue}let g=[];for(;m<f.length;){let x=f[m],h=x.trim();if(!h||Fi(x)||au(x)||iu(x)||ml(x)||gl(x)||fl(x)||su(f,m)||i&&lu(x)||n&&h.startsWith("$$"))break;g.push(x),m+=1;}g.length>0?p.push(e(hr,{variant:"body2",sx:{my:.65,lineHeight:1.65},children:g.map((x,h)=>c(er.Fragment,{children:[h>0&&e("br",{}),da(x,b,`p-${m}-${h}`)]},`p-line-${h}`))},`p-${m}`)):m+=1;}return p},[d,n,a,i,s,l]);return e(Ie,{className:o,sx:{"& strong":{fontWeight:700},"& em":{fontStyle:"italic"},"& a":{wordBreak:"break-all"}},children:u})};P();var XN=(t,r)=>e(pa,{markdown:t,...r});P();var cu=({value:t,onChange:r,onSubmit:o,onVoiceInput:n,onClear:a,placeholder:i,statusText:s,loading:l=false,compact:d=false,showStatusText:u=true})=>c(ie,{spacing:.75,children:[c("div",{sx:{display:"flex",alignItems:"center",gap:1,px:1.2,py:d?.25:.4,borderRadius:999,border:"1px solid",borderColor:"divider",bgcolor:"background.paper",minHeight:d?38:44},children:[e(zo,{sx:{fontSize:d?16:18,color:"text.secondary"}}),e(Id,{fullWidth:true,value:t,onChange:p=>r(p.target.value),onKeyDown:p=>{p.key==="Enter"&&(p.preventDefault(),o());},placeholder:i,sx:{fontSize:d?"0.84rem":"0.9rem"}}),t&&a&&e(ae,{size:"small",onClick:a,children:e(wo,{sx:{fontSize:d?16:18}})}),n&&e(ae,{size:"small",onClick:n,children:e(op,{sx:{fontSize:d?16:18}})}),e(ae,{size:"small",onClick:o,disabled:l||!t.trim(),children:e(lp,{sx:{fontSize:d?16:18}})})]}),u&&s&&e(L,{variant:"caption",color:"text.secondary",children:s})]});P();var du=(t,r)=>{let o=r.trim();if(!o)return t;let n=t.toLowerCase(),a=o.toLowerCase(),i=n.indexOf(a);return i<0?t:c(jsxRuntime.Fragment,{children:[t.slice(0,i),e("div",{component:"mark",sx:{bgcolor:"warning.light",color:"warning.contrastText",px:.15,borderRadius:.4},children:t.slice(i,i+o.length)}),t.slice(i+o.length)]})},Bi=({section:t,highlightQuery:r=""})=>{let o=t.columns||2;return c(Ae,{variant:"outlined",sx:{p:1.8,borderRadius:2},children:[e(L,{variant:"subtitle1",sx:{fontWeight:700,mb:1.4},children:t.title}),e("div",{sx:{display:"grid",gap:1.15,gridTemplateColumns:{xs:"1fr",md:o===3?"repeat(3, minmax(0, 1fr))":o===1?"1fr":"repeat(2, minmax(0, 1fr))"}},children:t.fields.map(n=>{let a=typeof n.value=="string"||typeof n.value=="number"?String(n.value):null;return c("div",{sx:{minWidth:0},children:[e(L,{variant:"caption",color:"text.secondary",sx:{display:"block"},children:du(n.label,r)}),e(L,{component:"div",variant:"body2",sx:{mt:.2,fontWeight:500,wordBreak:"break-word"},children:a?du(a,r):n.value})]},n.id)})})]})};var bl=t=>t==null?"":typeof t=="string"||typeof t=="number"||typeof t=="boolean"?String(t):"",zi=t=>t.trim().toLowerCase(),ov=(t,r)=>{let o=[];return t.forEach(n=>{n.fields.forEach(a=>{let i=a.searchableText||bl(a.value),s={source:"section",sourceId:n.id,sourceSectionId:n.id,sourceTitle:n.title,fieldId:a.id,fieldLabel:a.label,fieldValue:i};o.push({hit:s,text:zi(`${n.title} ${a.label} ${i}`)});});}),r.forEach(n=>{(n.fields||[]).forEach(a=>{let i=a.searchableText||bl(a.value),s={source:"tab",sourceId:n.id,sourceTitle:n.label,fieldId:a.id,fieldLabel:a.label,fieldValue:i};o.push({hit:s,text:zi(`${n.label} ${a.label} ${i}`)});}),(n.sections||[]).forEach(a=>{a.fields.forEach(i=>{let s=i.searchableText||bl(i.value),l={source:"tab",sourceId:n.id,sourceSectionId:a.id,sourceTitle:`${n.label} / ${a.title}`,fieldId:i.id,fieldLabel:i.label,fieldValue:s};o.push({hit:l,text:zi(`${n.label} ${a.title} ${i.label} ${s}`)});});});}),o},pu=({sections:t,tabs:r=[],defaultTabId:o,ai:n})=>{let{t:a}=pe(),[i,s]=er.useState(""),[l,d]=er.useState(o||r[0]?.id),[u,p]=er.useState("idle"),[f,b]=er.useState([]),[m,v]=er.useState(""),[y,g]=er.useState(""),[x,h]=er.useState(false),C=er.useMemo(()=>ov(t,r),[t,r]);er.useEffect(()=>{if(r.length===0){d(void 0);return}r.some(A=>A.id===l)||d(o||r[0]?.id);},[r,l,o]);let k=er.useCallback(()=>{p("idle"),b([]),v(""),g("");},[]),w=er.useCallback(S=>{s(S),S.trim()||(p("idle"),b([]),v(""),g(""));},[]),T=er.useCallback(S=>{let A=zi(S);return A?C.filter(D=>D.text.includes(A)).map(D=>D.hit):[]},[C]),I=er.useCallback(async()=>{let S=i.trim();if(!S)return;h(true);let A=T(S);if(b(A),A.length>0){p("search"),g(""),v(a("detail.searchAi.matches",{count:A.length})),h(false);return}if(n?.enabled!==false&&n?.onSubmit){p("ai"),v(a("detail.searchAi.autoAiFallback"));try{let M=await n.onSubmit(S,{query:S,hits:A,activeTabId:l,sections:t,tabs:r});g(typeof M=="string"?M:"");}finally{h(false);}return}p("search"),g(""),v(a("detail.searchAi.noMatch")),h(false);},[i,T,a,n,l,t,r]);return {query:i,setQuery:w,activeTabId:l,setActiveTabId:d,searchMode:u,hits:f,statusText:m,aiResponse:y,searching:x,handleSubmit:I,clearResult:k}};P();var SA=({title:t,subtitle:r,sections:o,tabs:n=[],defaultTabId:a,table:i,ai:s,rightHeaderSlot:l,searchBarWidth:d=460,onClose:u,closeLabel:p="Close"})=>{let{t:f}=pe(),{query:b,setQuery:m,activeTabId:v,setActiveTabId:y,searchMode:g,hits:x,statusText:h,aiResponse:C,searching:k,handleSubmit:w,clearResult:T}=pu({sections:o,tabs:n,defaultTabId:a,ai:s}),I=er.useMemo(()=>n.find(D=>D.id===v)||n[0],[n,v]),S=er.useCallback(D=>{let M=N=>{let E=document.getElementById(D);if(E){E.scrollIntoView({behavior:"smooth",block:"center"});return}N<4&&setTimeout(()=>M(N+1),60);};requestAnimationFrame(()=>M(0));},[]),A=er.useCallback((D,M)=>{if(n.some(N=>N.id===D)){y(D),S(M?`detail-tab-${D}-section-${M}`:`detail-tab-${D}`);return}S(`detail-section-${D}`);},[n,y,S]);return c("div",{sx:{display:"flex",flexDirection:"column",gap:1.5,minHeight:"100%"},children:[c(ie,{direction:{xs:"column",md:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",md:"center"},spacing:1,children:[c("div",{sx:{minWidth:0},children:[e(L,{variant:"h5",sx:{fontWeight:800,color:"text.primary"},children:t}),r&&e(L,{variant:"body2",color:"text.secondary",sx:{mt:.35},children:r})]}),c(ie,{direction:"row",spacing:.6,alignItems:"center",sx:{width:{xs:"100%",md:"auto"},ml:{xs:0,md:"auto"}},children:[e("div",{sx:{width:{xs:"100%",md:d},maxWidth:"100%",minWidth:{md:320}},children:e(cu,{value:b,onChange:m,onSubmit:w,onVoiceInput:s?.onVoiceInput,onClear:()=>{m(""),T();},placeholder:s?.placeholder||f("detail.searchAi.placeholder"),statusText:h,loading:k,compact:true,showStatusText:false})}),u&&e(ct,{title:p,children:e(ae,{size:"small",onClick:u,children:e(Kd,{fontSize:"small"})})}),l]})]}),h&&e(L,{variant:"caption",color:"text.secondary",sx:{mt:-0.7},children:h}),g==="search"&&x.length>0&&c(Ae,{variant:"outlined",sx:{p:1.5,borderRadius:2},children:[e(L,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.6},children:f("detail.searchAi.matches",{count:x.length})}),e(ie,{spacing:.35,children:x.slice(0,8).map(D=>e("div",{component:"button",type:"button",onClick:()=>A(D.sourceId,D.sourceSectionId),sx:{textAlign:"left",border:0,bgcolor:"transparent",p:.2,cursor:"pointer",color:"text.primary",borderRadius:1,"&:hover":{bgcolor:"action.hover"}},children:c(L,{variant:"body2",sx:{fontSize:"0.84rem"},children:[e("div",{component:"span",sx:{color:"text.secondary"},children:D.sourceTitle})," \xB7 ",e("div",{component:"span",sx:{fontWeight:700},children:D.fieldLabel})," = ",e("div",{component:"span",children:D.fieldValue||"-"})]})},`${D.source}|${D.sourceId}|${D.fieldId}`))})]}),g==="ai"&&C&&c(Ae,{variant:"outlined",sx:{p:1.5,borderRadius:2},children:[e(L,{variant:"subtitle2",sx:{fontWeight:700,mb:.7},children: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(pa,{markdown:C})})]}),e("div",{sx:{display:"grid",gap:1.5,gridTemplateColumns:{xs:"1fr",lg:"repeat(2, minmax(0, 1fr))"}},children:o.map(D=>e("div",{id:`detail-section-${D.id}`,children:e(Bi,{section:D,highlightQuery:b})},D.id))}),n.length>0&&c(Ae,{variant:"outlined",sx:{borderRadius:2,overflow:"hidden"},children:[e(Ad,{value:I?.id||false,onChange:(D,M)=>y(String(M)),variant:"scrollable",scrollButtons:"auto",sx:{borderBottom:"1px solid",borderColor:"divider"},children:n.map(D=>e(Ed,{value:D.id,label:D.label,sx:{textTransform:"none"}},D.id))}),c("div",{sx:{p:1.5},children:[e("div",{id:`detail-tab-${I?.id||""}`}),I?.description&&e(L,{variant:"body2",color:"text.secondary",sx:{mb:1.2},children:I.description}),I?.content?I.content:c(ie,{spacing:1.5,children:[(I?.sections||[]).map(D=>e("div",{id:`detail-tab-${I?.id}-section-${D.id}`,children:e(Bi,{section:D,highlightQuery:b})},D.id)),I?.fields&&I.fields.length>0&&e(Bi,{section:{id:`${I.id}-fields`,title:I.label,fields:I.fields,columns:2},highlightQuery:b})]})]})]}),i&&e(Jr,{title:i.title||f("detail.table.title"),...i.tableProps,filterConfig:void 0,fitContainer:false})]})};P();var gu=({bucket:t,cardCount:r,highlighted:o=false,children:n,emptyLabel:a,height:i,maxHeight:s,onRename:l,renameLabel:d,sx:u})=>{let{t:p}=pe(),[f,b]=er.useState(false),[m,v]=er.useState(t.title),y=()=>{v(t.title),b(false);},g=x=>{x.preventDefault();let h=m.trim();h&&(h!==t.title&&l?.(h),v(h),b(false));};return e(Ae,{elevation:0,sx:[x=>{let h=t.accentColor??x.palette.primary.main;return {position:"relative",display:"flex",flexDirection:"column",minWidth:0,minHeight:0,height:i??s??560,maxHeight:s,borderRadius:"var(--orb-r-container)",overflow:"hidden",border:o?`1px solid ${rt(h,.65)}`:"1px solid var(--orb-border)",bgcolor:"var(--orb-canvas)",boxShadow:o?`0 0 0 2px ${rt(h,.16)}, var(--orb-shadow-2)`:"none",transition:"border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease","&::before":{content:'""',display:"block",flexShrink:0,height:3,bgcolor:h}}},...Array.isArray(u)?u:u?[u]:[]],children:c(ie,{spacing:1.25,sx:{flex:1,minHeight:0,overflow:"hidden",p:1.5},children:[c(Ie,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:1.25},children:[e(Ie,{sx:{minWidth:0,flex:1},children:c(Ie,{sx:{display:"flex",alignItems:"center",gap:.75,minHeight:28},children:[t.icon&&e(Ie,{sx:{display:"inline-flex",flexShrink:0,color:t.accentColor??"var(--orb-primary)"},children:t.icon}),f?c(Ie,{component:"form",onSubmit:g,sx:{display:"flex",alignItems:"center",gap:.5,flex:1,minWidth:0},children:[e(ze,{dense:true,autoFocus:true,value:m,onChange:x=>v(x.target.value),onKeyDown:x=>{x.key==="Escape"&&(x.preventDefault(),y());},inputProps:{"aria-label":d??p("kanban.bucket.rename")},error:!m.trim(),sx:{flex:1,minWidth:0}}),e(ae,{type:"submit",size:"small",tooltip:p("kanban.bucket.saveRename"),"aria-label":p("kanban.bucket.saveRename"),disabled:!m.trim(),children:e(qr,{size:14})}),e(ae,{size:"small",tooltip:p("kanban.bucket.cancelRename"),"aria-label":p("kanban.bucket.cancelRename"),onClick:y,children:e(jt,{size:14})})]}):e(L,{component:"div",sx:{fontSize:15,fontWeight:600,lineHeight:1.35,color:"text.primary"},children:t.title})]})}),!f&&c(ie,{direction:"row",spacing:.75,sx:{flexShrink:0},children:[e(xt,{size:"small",label:r,sx:{minWidth:24,justifyContent:"center",fontWeight:600}}),typeof t.limit=="number"&&e(xt,{size:"small",label:`${p("kanban.bucket.limit")} ${t.limit}`,color:r>t.limit?"warning":"default",variant:"outlined"}),l&&e(ae,{size:"small",tooltip:d??p("kanban.bucket.rename"),"aria-label":d??p("kanban.bucket.rename"),onClick:()=>{v(t.title),b(true);},sx:{width:26,height:26},children:e(Nc,{size:14})})]})]}),o&&e(L,{component:"div",sx:{fontSize:12,color:t.accentColor??"var(--orb-primary)",fontWeight:500},children:p("kanban.bucket.dropHere")}),e(Ie,{sx:{flex:1,height:0,minHeight:0,overflowY:"auto",overscrollBehavior:"contain",pr:.4,scrollbarGutter:"stable"},children:r>0?n:e(Ie,{sx:{minHeight:"100%",borderRadius:"var(--orb-r-container)",border:"1px dashed var(--orb-border)",bgcolor:"transparent",display:"grid",placeItems:"center",px:2,textAlign:"center"},children:e(L,{sx:{fontSize:13,color:"text.secondary"},children:a??t.emptyLabel??p("kanban.empty")})})})]})})};P();var av={success:"success",warning:"warning",info:"info",error:"error"},iv={critical:"error",high:"warning",medium:"info",low:"success"},sv={default:"var(--orb-primary)",success:"var(--orb-primary)",warning:"var(--orb-accent)",info:"var(--orb-primary)",error:"var(--orb-err)"},lv=(t,r)=>{switch(t){case "critical":return r("kanban.priority.critical");case "high":return r("kanban.priority.high");case "medium":return r("kanban.priority.medium");case "low":return r("kanban.priority.low");default:return t}},cv=t=>t?t.split(/\s+/).map(r=>r.charAt(0).toUpperCase()).slice(0,2).join(""):"NA",hl=({card:t,bucket:r,dragging:o=false,overlay:n=false,onClick:a,sx:i})=>{let{t:s}=pe(),l=!!(a&&r),d=t.tone??(t.priority?iv[t.priority]:"default"),u=d==="default"?"primary":av[d],p=sv[d],f=r?{card:t,bucket:r}:void 0;return e(Ae,{onClick:l?()=>f&&a?.(f):void 0,onKeyDown:l?b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),f&&a?.(f));}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,sx:[{position:"relative",minWidth:0,overflow:"hidden",p:1.5,pl:1.75,borderRadius:"var(--orb-r-container)",border:`1px solid ${rt(p,.24)}`,bgcolor:"var(--orb-canvas)",boxShadow:n?"var(--orb-shadow-3)":o?"none":"var(--orb-shadow-1)",transform:n?"rotate(1deg) scale(1.01)":"none",transition:"transform var(--orb-t-fast), box-shadow var(--orb-t-fast), border-color var(--orb-t-fast)",cursor:l?"pointer":"default",opacity:o?.5:1,"&::before":{content:'""',position:"absolute",inset:"0 auto 0 0",width:3,bgcolor:p},"&:hover":l?{transform:"translateY(-1px)",borderColor:rt(p,.48),boxShadow:"var(--orb-shadow-2)"}:void 0,"&:focus-visible":l?{outline:"2px solid var(--orb-focus-solid)",outlineOffset:2}:void 0},...Array.isArray(i)?i:i?[i]:[]],elevation:0,children:c(ie,{spacing:1.25,children:[c(Ie,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:1},children:[c(Ie,{sx:{minWidth:0,flex:1},children:[(t.kicker||r?.title)&&e(L,{component:"div",sx:{fontSize:11,fontWeight:500,color:"text.secondary",textTransform:"uppercase"},children:t.kicker??r?.title}),e(L,{component:"div",sx:{mt:.25,fontSize:14,fontWeight:600,lineHeight:1.4,color:"text.primary"},children:t.title})]}),t.priority&&e(xt,{size:"small",color:u,label:lv(t.priority,s),variant:d==="default"?"outlined":"filled",sx:{height:22,flexShrink:0,fontWeight:500}})]}),t.summary&&e(L,{component:"div",sx:{fontSize:13,fontWeight:300,color:"text.secondary",lineHeight:1.5},children:t.summary}),t.metrics&&t.metrics.length>0&&e(Ie,{sx:{display:"grid",gridTemplateColumns:`repeat(${Math.min(t.metrics.length,3)}, minmax(0, 1fr))`,gap:.75},children:t.metrics.slice(0,3).map(b=>c(Ie,{sx:{minWidth:0,borderRadius:"var(--orb-r)",px:1,py:.75,bgcolor:"var(--orb-surface)",border:"1px solid var(--orb-border)"},children:[e(L,{component:"div",noWrap:true,sx:{fontSize:11,fontWeight:500,color:"text.secondary",textTransform:"uppercase"},children:b.label}),e(L,{component:"div",noWrap:true,numeric:true,sx:{mt:.25,fontSize:13,fontWeight:600},children:b.value})]},b.id))}),typeof t.progress=="number"&&c(Ie,{children:[c(Ie,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:.5},children:[e(L,{sx:{fontSize:12,color:"text.secondary"},children:s("kanban.card.progress")}),c(L,{numeric:true,sx:{fontSize:12,fontWeight:600},children:[Math.round(t.progress),"%"]})]}),e(Sd,{variant:"determinate",value:Math.max(0,Math.min(100,t.progress)),color:p,sx:{height:4,borderRadius:2}})]}),(t.tags?.length||t.assignee||t.dueDate||t.footer||l)&&c(ie,{spacing:.9,children:[t.tags&&t.tags.length>0&&e(Ie,{sx:{display:"flex",flexWrap:"wrap",gap:.75},children:t.tags.map(b=>e(xt,{size:"small",label:b.label,color:b.color??"default",variant:"outlined"},b.id))}),c(Ie,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,flexWrap:"wrap"},children:[c(Ie,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0},children:[t.assignee&&c(jsxRuntime.Fragment,{children:[e(Qa,{src:t.assignee.avatarSrc,sx:{width:28,height:28,fontSize:11},children:t.assignee.initials??cv(t.assignee.name)}),c(Ie,{sx:{minWidth:0},children:[e(L,{component:"div",sx:{fontSize:13,fontWeight:500,lineHeight:1.3},noWrap:true,children:t.assignee.name}),t.dueDate&&e(L,{component:"div",sx:{fontSize:11,color:"text.secondary",lineHeight:1.35},noWrap:true,children:t.dueDate})]})]}),!t.assignee&&t.dueDate&&e(L,{sx:{fontSize:12,color:"text.secondary"},children:t.dueDate})]}),l&&e(L,{sx:{fontSize:12,color:"var(--orb-link)",fontWeight:500,whiteSpace:"nowrap"},children:s("kanban.card.openDetail")})]}),t.footer]})]})})};var fu=(t,r)=>{let o=r.title.trim();return !r.id||!o||t.buckets.some(n=>n.id===r.id)?t:{buckets:[...t.buckets,{...r,title:o,cards:[]}]}},bu=(t,r,o)=>{let n=o.trim();if(!n)return t;let a=t.buckets.find(i=>i.id===r);return !a||a.title===n?t:{buckets:t.buckets.map(i=>i.id===r?{...i,title:n}:i)}},dv=(t,r)=>Number.isNaN(t)||t<0?0:t>r?r:t,hu=({buckets:t,cards:r})=>{let o=new Map;return r.forEach((n,a)=>{let i=o.get(n.bucketId)??[];i.push({card:n,sourceIndex:a}),o.set(n.bucketId,i);}),{buckets:t.map(n=>{let a=[...o.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}})}},_r=(t,r)=>{for(let o=0;o<t.buckets.length;o+=1){let n=t.buckets[o],a=n.cards.findIndex(i=>i.id===r);if(a>=0)return {card:n.cards[a],bucket:n,bucketIndex:o,cardIndex:a}}},Vi=(t,r)=>{let o=_r(t,r.cardId);if(!o)return t;let n=t.buckets.findIndex(u=>u.id===r.toBucketId);if(n<0)return t;let a=t.buckets.map(u=>({...u,cards:u.cards.map(p=>({...p}))})),i=a[o.bucketIndex],[s]=i.cards.splice(o.cardIndex,1);if(!s)return t;let l=a[n],d=dv(r.targetIndex??l.cards.length,l.cards.length);return l.cards.splice(d,0,{...s,bucketId:r.toBucketId}),{buckets:a.map(u=>({...u,cards:u.cards.map((p,f)=>({...p,bucketId:u.id,position:f}))}))}};P();var Cl="kanban-card|",xl="kanban-bucket|",Cu=t=>`${Cl}${t}`,xv=t=>`${xl}${t}`,Wi=t=>t?.startsWith(Cl)?t.slice(Cl.length):void 0,yu=t=>t?.startsWith(xl)?t.slice(xl.length):void 0,Sv=({card:t,bucket:r,onCardClick:o})=>{let{setNodeRef:n,attributes:a,listeners:i,transform:s,transition:l,isDragging:d}=sortable.useSortable({id:Cu(t.id)}),u={transform:s?`translate3d(${s.x}px, ${s.y}px, 0)`:void 0,transition:l,zIndex:d?2:1,touchAction:"none",cursor:d?"grabbing":"grab"};return e("div",{ref:n,style:u,...a,...i,children:e(hl,{card:t,bucket:r,dragging:d,onClick:o})})},wv=({bucket:t,highlighted:r,bucketHeight:o,emptyBucketLabel:n,onBucketRename:a,onCardClick:i})=>{let{isOver:s,setNodeRef:l}=core.useDroppable({id:xv(t.id)});return e(Ie,{ref:l,sx:{minWidth:0,minHeight:0,height:o},children:e(gu,{bucket:t,cardCount:t.cards.length,highlighted:r||s,emptyLabel:n,height:o,onRename:a,children:e(sortable.SortableContext,{items:t.cards.map(d=>Cu(d.id)),strategy:sortable.verticalListSortingStrategy,children:e(ie,{spacing:1,children:t.cards.map(d=>e(Sv,{card:d,bucket:t,onCardClick:i},d.id))})})})})},xu=t=>String(t??"").toLocaleLowerCase(),kv=(t,r)=>[t.id,t.title,t.summary,t.kicker,t.priority,t.tone,t.progress,t.dueDate,t.assignee?.id,t.assignee?.name,...t.tags?.flatMap(n=>[n.id,n.label])??[],...t.metrics?.flatMap(n=>[n.label,n.value])??[]].some(n=>xu(n).includes(r)),ZA=({model:t,onCardMove:r,onCardClick:o,cardFilter:n,onBucketAdd:a,onBucketRename:i,addBucketLabel:s,minBucketWidth:l=320,bucketHeight:d,bucketMaxHeight:u,searchable:p=false,searchValue:f,defaultSearchValue:b="",onSearchValueChange:m,searchPlaceholder:v,emptyBucketLabel:y,sx:g})=>{let{t:x}=pe(),[h,C]=er.useState(null),[k,w]=er.useState(),[T,I]=er.useState(b),S=f??T,A=S.trim().toLocaleLowerCase(),D=d??u??560,M=er.useMemo(()=>({buckets:t.buckets.map(V=>{let z=n?V.cards.filter(K=>n(K,V)):V.cards;if(!A)return {...V,cards:z};let U=[V.id,V.title,V.description].some(K=>xu(K).includes(A));return {...V,cards:U?z:z.filter(K=>kv(K,A))}})}),[n,t,A]),N=er.useMemo(()=>M.buckets.reduce((V,z)=>V+z.cards.length,0),[M]),E=er.useCallback(V=>{f===void 0&&I(V),m?.(V);},[m,f]),O=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:6}}),core.useSensor(core.TouchSensor,{activationConstraint:{delay:120,tolerance:8}})),F=er.useMemo(()=>h?_r(t,h):void 0,[h,t]),X=er.useCallback(()=>{C(null),w(void 0);},[]),H=er.useCallback(V=>{if(!V)return;let z=Wi(V);return z?_r(t,z)?.bucket.id:yu(V)},[t]),Y=er.useCallback(V=>{C(Wi(String(V.active.id))??null);},[]),W=er.useCallback(V=>{w(H(V.over?String(V.over.id):void 0));},[H]),j=er.useCallback(V=>{let z=Wi(String(V.active.id)),U=V.over?String(V.over.id):void 0;if(!z||!U){X();return}let K=_r(t,z);if(!K){X();return}let fe=K.bucket.id,se=K.cardIndex,ue=Wi(U);if(ue){let ke=_r(t,ue);if(!ke){X();return}fe=ke.bucket.id,se=ke.cardIndex;}else {let ke=yu(U),le=t.buckets.find(Ee=>Ee.id===ke);if(!ke||!le){X();return}fe=ke,se=le.cards.length;}if(K.bucket.id===fe&&K.cardIndex===se){X();return}let Se=Vi(t,{cardId:z,fromBucketId:K.bucket.id,toBucketId:fe,targetIndex:se}),$e=_r(Se,z);$e&&!($e.bucket.id===K.bucket.id&&$e.cardIndex===K.cardIndex)&&r?.({cardId:z,fromBucketId:K.bucket.id,toBucketId:$e.bucket.id,targetIndex:$e.cardIndex,card:$e.card,model:Se}),X();},[t,r,X]);return c(core.DndContext,{sensors:O,collisionDetection:core.closestCorners,onDragStart:Y,onDragOver:W,onDragEnd:j,onDragCancel:X,children:[c(Ie,{sx:{display:"flex",flexDirection:"column",minWidth:0,minHeight:0,height:"100%",overflow:"hidden"},children:[(p||a)&&c(Ie,{role:p?"search":void 0,sx:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:1.5,mb:1.25,minWidth:0},children:[p&&e(Ie,{sx:{width:"100%",maxWidth:360,flex:"1 1 240px"},children:e(ze,{dense:true,value:S,onChange:V=>E(V.target.value),placeholder:v??x("kanban.search.placeholder"),autoComplete:"off",sx:{"& .orb-inp":{paddingLeft:"38px",paddingRight:S?"42px":"12px"},"& .orb-inp-adornment-end":{pointerEvents:"auto"}},startAdornment:e(Hr,{size:16,"aria-hidden":"true"}),endAdornment:S?e(ae,{size:"small",tooltip:x("kanban.search.clear"),"aria-label":x("kanban.search.clear"),onClick:()=>E(""),sx:{width:26,height:26},children:e(jt,{size:15})}):void 0})}),c(Ie,{sx:{display:"flex",alignItems:"center",gap:1,ml:"auto"},children:[A&&e(L,{component:"div","aria-live":"polite",sx:{flexShrink:0,fontSize:12,fontWeight:500,color:"text.secondary"},children:N>0?x("kanban.search.results",{count:N}):x("kanban.search.noMatch")}),a&&e(we,{size:"small",variant:"secondary",startIcon:e(en,{size:15}),onClick:a,children:s??x("kanban.bucket.add")})]})]}),e(Ie,{sx:[{display:"grid",gridAutoFlow:"column",gridAutoColumns:`minmax(${l}px, ${Math.max(l,360)}px)`,gap:1.5,gridAutoRows:D==="100%"?"minmax(0, 1fr)":void 0,alignItems:"stretch",justifyContent:"start",flex:"1 1 0",height:"100%",minHeight:0,overflowX:"auto",overflowY:"hidden",overscrollBehavior:"contain",scrollbarGutter:"stable both-edges",pb:.5},...Array.isArray(g)?g:g?[g]:[]],children:M.buckets.map(V=>e(wv,{bucket:V,highlighted:V.id===k,bucketHeight:D,emptyBucketLabel:A?x("kanban.search.noMatch"):y,onBucketRename:i?z=>i(V.id,z):void 0,onCardClick:o},V.id))})]}),e(core.DragOverlay,{children:F?e(Ie,{sx:{width:Math.max(l-24,260)},children:e(hl,{card:F.card,bucket:F.bucket,overlay:true})}):null})]})};var Iv=({initialModel:t,initialBuckets:r,initialCards:o})=>t||hu({buckets:r??[],cards:o??[]}),tE=t=>{let{onCardMove:r,onCardClick:o}=t,[n,a]=er.useState(()=>Iv(t)),i=er.useCallback(b=>{a(m=>typeof b=="function"?b(m):b);},[]),s=er.useCallback(b=>_r(n,b),[n]),l=er.useCallback((b,m,v)=>{let y=_r(n,b);if(!y)return;let g=Vi(n,{cardId:b,fromBucketId:y.bucket.id,toBucketId:m,targetIndex:v}),x=_r(g,b);if(!x||x.bucket.id===y.bucket.id&&x.cardIndex===y.cardIndex)return;a(g);let h={cardId:b,fromBucketId:y.bucket.id,toBucketId:x.bucket.id,targetIndex:x.cardIndex,card:x.card,model:g};return r?.(h),h},[n,r]),d=er.useCallback((b,m)=>{a(v=>({buckets:v.buckets.map(y=>({...y,cards:y.cards.map(g=>g.id!==b?g:typeof m=="function"?m(g):{...g,...m})}))}));},[]),u=er.useCallback(b=>{let m=fu(n,b);return m===n?false:(a(m),true)},[n]),p=er.useCallback((b,m)=>{let v=bu(n,b,m);return v===n?false:(a(v),true)},[n]),f=er.useMemo(()=>({model:n,onCardMove:b=>{l(b.cardId,b.toBucketId,b.targetIndex);},onCardClick:o}),[n,l,o]);return {model:n,actions:{replaceModel:i,moveCard:l,updateCard:d,addBucket:u,renameBucket:p,getCard:s},boardProps:f}};function Sn({onTextUpdate:t,onComplete:r,onError:o,wsUrl:n="ws://localhost:8765",silenceThresholdMs:a=2e3,minVolumeRms:i=.015}){let[s,l]=er.useState(false),d=er.useRef(null),u=er.useRef(null),p=er.useRef(null),f=er.useRef(null),b=er.useRef(null),m=er.useRef(0),v=er.useRef(false),y=er.useRef(false),g=er.useCallback(()=>{d.current&&(d.current.close(),d.current=null),f.current&&(f.current.disconnect(),f.current=null),b.current&&(b.current.disconnect(),b.current=null),u.current&&(u.current.getTracks().forEach(C=>C.stop()),u.current=null),p.current&&(p.current.close(),p.current=null),y.current=false,l(false);},[]),x=er.useCallback(()=>{v.current||(v.current=true,d.current?.readyState===WebSocket.OPEN&&d.current.send(JSON.stringify({type:"stop"})),setTimeout(g,500));},[g]),h=er.useCallback(async()=>{if(!(s||y.current)){y.current=true,v.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);d.current=k,k.onopen=()=>{l(!0),y.current=!1;},k.onmessage=A=>{try{let D=JSON.parse(A.data);if(D.type==="recognition")D.is_final?r(D.text):t?.(D.text);else if(D.type==="error"){let M=D.message||"Voice recognition error";o?.(M),x();}}catch{o?.("Failed to parse voice message");}},k.onerror=()=>{o?.("Voice service connection failed"),g();},k.onclose=()=>{g();};let w=window.AudioContext||window.webkitAudioContext;if(!w)throw new Error("AudioContext is not supported in this browser");let T=new w({sampleRate:16e3});p.current=T;let I=T.createMediaStreamSource(C);b.current=I;let S=T.createScriptProcessor(4096,1,1);f.current=S,S.onaudioprocess=A=>{if(d.current?.readyState!==WebSocket.OPEN)return;let D=A.inputBuffer.getChannelData(0),M=0;for(let O=0;O<D.length;O+=1)M+=D[O]*D[O];if(Math.sqrt(M/D.length)>i)m.current=Date.now();else if(Date.now()-m.current>a&&!v.current){x();return}let E=new Int16Array(D.length);for(let O=0;O<D.length;O+=1){let F=Math.max(-1,Math.min(1,D[O]));E[O]=F<0?F*32768:F*32767;}d.current.send(E.buffer);},I.connect(S),S.connect(T.destination);}catch{o?.("Cannot access microphone"),g();}}},[g,s,i,r,o,t,a,x,n]);return er.useEffect(()=>g,[g]),{isRecording:s,startRecording:h,stopRecording:x}}P();var Nv=["en","zh","fr","de","ja","ko"],wu={en:"EN",zh:"\u4E2D\u6587",fr:"FR",de:"DE",ja:"\u65E5\u672C\u8A9E",ko:"\uD55C\uAD6D\uC5B4"},wl=({searchPlaceholder:t,onSearch:r,onSearchAdd:o,onOpenPanel:n,panelOpen:a=false,maxWidth:i=540,sx:s})=>{let{t:l}=pe(),[d,u]=er.useState(""),p=er.useCallback((x=d)=>{let h=x.trim();h&&(u(""),r?.(h));},[r,d]),f=x=>{x.preventDefault(),p();},{isRecording:b,startRecording:m,stopRecording:v}=Sn({onTextUpdate:u,onComplete:x=>{u(x),p(x);},onError:x=>{console.error("Header voice input error:",x);}}),y=er.useCallback(async()=>{if(b){v();return}await m();},[b,m,v]),g=t||l("header.searchPlaceholder");return e("form",{className:"orb-app-header-search",onSubmit:f,style:{width:"100%",maxWidth:typeof i=="number"?`${i}px`:i,...s},children:c("div",{className:"orb-inp-adornment-wrap orb-app-header-search-shell",style:{background:"var(--orb-surface)",border:"1px solid var(--orb-border)",borderRadius:999,paddingRight:4},children:[e("div",{className:"orb-inp-adornment",children:e(ae,{className:"orb-app-header-ai-action",size:"small",onClick:o,tooltip:l("header.searchAddFeature"),children:e(Tt,{name:"add",size:16})})}),e("input",{className:"orb-inp orb-inp-dense orb-app-header-ai-input",value:d,onChange:x=>u(x.target.value),placeholder:g,style:{border:"none",background:"transparent",flex:1,minWidth:0}}),c("div",{className:"orb-inp-adornment orb-inp-adornment-end",children:[n&&!a&&e(ae,{className:"orb-app-header-ai-action",size:"small","aria-label":l("header.searchOpenPanel"),tooltip:l("header.searchOpenPanel"),onClick:n,children:e(Tt,{name:"message",size:16})}),e(ae,{className:"orb-app-header-ai-action",size:"small",onClick:()=>{y();},tooltip:l(b?"header.searchStopVoice":"header.searchStartVoice"),sx:{color:b?"var(--orb-err)":void 0},children:e(Tt,{name:"microphone",size:16})})]})]})})},$i=({appTitle:t,logo:r,onToggleMode:o,locale:n,localeLabel:a,localeOptions:i,onLocaleChange:s,searchPlaceholder:l,showSearch:d=false,onSearch:u,onSearchAdd:p,onOpenPanel:f,panelOpen:b,user:m,onUserRefresh:v,onUserSetting:y,onUserLogout:g,userMenuItems:x,leftSlot:h,rightSlot:C})=>{let{t:k,locale:w}=pe(),T=Cr(),I=n||w,S=a||wu[I],A=i||Nv,D=T==="dark"?e(_c,{size:15}):e(qc,{size:15}),M=k(T==="dark"?"header.theme.dark":"header.theme.light"),N=[...v?[{key:"refresh",label:k("header.menu.refresh"),icon:e(Ba,{size:15}),onClick:v}]:[],...y?[{key:"settings",label:k("header.menu.setting"),icon:e(tn,{size:16}),onClick:y}]:[],...g?[{key:"logout",label:k("header.menu.logout"),icon:e(zc,{size:16}),onClick:g}]:[]],E=x||N,O=A.map(F=>({label:wu[F],onClick:()=>{s?.(F),window.requestAnimationFrame(()=>{document.activeElement instanceof HTMLElement&&document.activeElement.blur();});},disabled:F===I}));return c("header",{className:"orb-app-header",children:[c("div",{className:"orb-app-header-brand",children:[h,r===null?null:r||e("div",{className:"orb-app-header-default-logo","aria-label":"ORBCAFE",children:e(Tt,{name:"product",size:20})}),t&&e(L,{variant:"h4",sx:{fontWeight:700},children:t})]}),e("div",{className:"orb-app-header-center",children:d&&e(wl,{searchPlaceholder:l,onSearch:u,onSearchAdd:p,onOpenPanel:f,panelOpen:b})}),c("div",{className:"orb-app-header-actions",children:[c("div",{className:"orb-app-header-utilities",children:[s?e(Qt,{triggerLabel:S,trigger:c("button",{type:"button",className:"orb-icon-btn orb-app-header-locale",children:[e(zn,{size:15}),e("span",{className:"orb-label",children:S})]}),items:O,align:"end"}):c("div",{className:"orb-app-header-locale","aria-label":S,children:[e(zn,{size:15}),e("span",{className:"orb-label",children:S})]}),e(ae,{className:"orb-app-header-theme",size:"small",onClick:o,tooltip:M,children:D})]}),m&&e("span",{className:"orb-app-header-divider","aria-hidden":"true"}),m&&e(Qt,{triggerLabel:m.name,trigger:c("button",{type:"button",className:"orb-app-header-user-trigger",children:[c("span",{className:"orb-app-header-user-copy",children:[e(L,{variant:"body2",className:"orb-app-header-user-name",children:m.name}),m.subtitle&&e(L,{variant:"caption",muted:true,className:"orb-app-header-user-subtitle",title:m.subtitle,children:m.subtitle})]}),e(rn,{src:m.avatarSrc,alt:m.name,size:32,children:m.avatarText||m.name.slice(0,1).toUpperCase()})]}),items:E.map(F=>({label:F.label,onClick:F.onClick,disabled:F.disabled,icon:F.icon})),align:"end"}),C]})]})};var ku=({menuData:t=[],initialNavigationCollapsed:r=false,initialNavigationMode:o="fixed",enableNavigationPinning:n,navigationPinStorageKey:a,pinnedNavigationItemIds:i,defaultPinnedNavigationItemIds:s,onPinnedNavigationItemIdsChange:l,pinnedNavigationSectionTitle:d}={})=>{let{navigationIslandProps:u}=fd({initialCollapsed:r,initialDisplayMode:o,content:t,enablePinning:n,pinStorageKey:a,pinnedItemIds:i,defaultPinnedItemIds:s,onPinnedItemIdsChange:l,pinnedSectionTitle:d}),[p,f]=er.useState(900);er.useEffect(()=>{let m=()=>f(window.innerHeight);return m(),window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[]);let b=er.useMemo(()=>Math.max(280,p-100),[p]);return {navigationIslandProps:u,navigationMaxHeight:b}};P();var Lr=12,Tu=56,Iu=234,Fv="orbcafe:page-layout-locale",Mu=["en","zh","fr","de","ja","ko"],Bv=t=>encodeURIComponent(t.trim().toLowerCase()).replace(/%/g,"").replace(/[^a-z0-9._~-]+/g,"-")||"app",_i=(t,r)=>`orbcafe:page-layout:${Bv(t)}:${r}`,Hv=t=>`orbcafe:page-layout:${t.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-")||"app"}:pinned-navigation-items`,zv=t=>t==="system"?"dark":t==="dark"?"light":"system",Gi=(t,r,o)=>Math.min(Math.max(t,r),Math.max(r,o)),Vv=t=>t instanceof HTMLElement?!!t.closest('button,input,a,textarea,select,[role="button"],[contenteditable="true"]'):false,kE=({appId:t,appTitle:r,menuData:o=[],children:n,showNavigation:a=true,locale:i="en",localeLabel:s,localeOptions:l,onLocaleChange:d,mode:u,defaultMode:p="system",onModeChange:f,user:b,onUserRefresh:m,onUserSetting:v,onUserLogout:y,userMenuItems:g,logo:x,searchPlaceholder:h,searchPlacement:C="hidden",floatingSearchSx:k,onSearch:w,onSearchAdd:T,onOpenPanel:I,panelOpen:S,rightHeaderSlot:A,leftHeaderSlot:D,contentSx:M,navigationVariant:N="classic",navigationMode:E,defaultNavigationMode:O="fixed",onNavigationModeChange:F,showNavigationModeToggle:X=true,enableNavigationPinning:H=true,navigationPinStorageKey:Y,pinnedNavigationItemIds:W,defaultPinnedNavigationItemIds:j,onPinnedNavigationItemIdsChange:V,pinnedNavigationSectionTitle:z})=>{let U=t?_i(t,"mode"):"orbcafe:page-layout-mode",K=t?_i(t,"locale"):Fv,fe=t?_i(t,"navigation-mode"):"orbcafe:page-layout-navigation-mode",[se,ue]=er.useState(p),[Se,$e]=er.useState("light"),[ke,le]=er.useState(false),[Ee,Me]=er.useState(i),[Pe,Ve]=er.useState(false),[tt,nt]=er.useState(false),[it,q]=er.useState(O),[De,ye]=er.useState({x:Lr,y:Lr}),[Be,at]=er.useState("left"),[Ze,St]=er.useState(false),Mt=er.useRef(null),Ot=er.useRef(null),At=u!==void 0,re=u??se,Ke=d!==void 0,Fe=Ke?i:Ee,ce=l?.join("|")??"",ve=E!==void 0,te=E??it,he=te==="floating",Ne=N==="v2"?qs:cd,Je=C==="header",st=re==="system"?ke?Se:"light":re;er.useEffect(()=>{if(!At)try{let be=window.localStorage.getItem(U);(be==="light"||be==="dark"||be==="system")&&ue(be);}catch{}le(true);let $=window.matchMedia("(prefers-color-scheme: dark)"),Q=()=>{$e($.matches?"dark":"light");};return Q(),$.addEventListener("change",Q),()=>$.removeEventListener("change",Q)},[At,U]),er.useEffect(()=>{if(!(At||!ke))try{window.localStorage.setItem(U,re);}catch{}},[ke,At,re,U]),er.useEffect(()=>{if(Ke){Ve(true);return}try{let $=window.localStorage.getItem(K),Q=l??Mu;$&&Mu.includes($)&&Q.includes($)&&Me($);}catch{}finally{Ve(true);}},[Ke,ce,K]),er.useEffect(()=>{if(!(Ke||!Pe))try{window.localStorage.setItem(K,Fe);}catch{}},[Fe,Ke,Pe,K]),er.useEffect(()=>{if(ve){nt(true);return}try{let $=window.localStorage.getItem(fe);($==="fixed"||$==="floating")&&q($);}catch{}finally{nt(true);}},[ve]),er.useEffect(()=>{if(tt)try{window.localStorage.setItem(fe,te);}catch{}},[te,tt]),er.useEffect(()=>{st==="dark"?(document.documentElement.classList.add("dark"),document.documentElement.style.colorScheme="dark"):(document.documentElement.classList.remove("dark"),document.documentElement.style.colorScheme="light");},[st]);let pt=er.useCallback($=>{ve||q($),F?.($);},[ve,F]),Bt=er.useCallback($=>{At||ue($),f?.($);},[At,f]),Xt=er.useCallback($=>{Ke||Me($),d?.($);},[Ke,d]),{navigationIslandProps:Vt,navigationMaxHeight:wt}=ku({menuData:o,initialNavigationCollapsed:false,initialNavigationMode:te,enableNavigationPinning:H,navigationPinStorageKey:Y??(t?_i(t,"pinned-navigation-items"):Hv(r)),pinnedNavigationItemIds:W,defaultPinnedNavigationItemIds:j,onPinnedNavigationItemIdsChange:V,pinnedNavigationSectionTitle:z}),Wt=Vt.collapsed,ht=er.useCallback($=>{let Q=Mt.current,be=Q?.parentElement;if(!Q||!be)return $;let Ce=be.getBoundingClientRect(),Le=Q.getBoundingClientRect(),_e=Lr,qe=Lr,je=Math.max(_e,Ce.width-Le.width-Lr),mt=Math.max(qe,Ce.height-Le.height-Lr);return {x:Gi($.x,_e,je),y:Gi($.y,qe,mt)}},[]),Nt=er.useCallback($=>{let Q=Mt.current,be=Q?.parentElement;if(!Q||!be)return $;let Ce=be.getBoundingClientRect(),Le=Q.getBoundingClientRect(),_e=Lr,qe=Lr,je=Math.max(_e,Ce.width-Le.width-Lr),mt=Math.max(qe,Ce.height-Le.height-Lr),ft={x:Gi($.x,_e,je),y:Gi($.y,qe,mt)},yt=[{distance:Math.abs(ft.x-_e),position:{x:_e,y:ft.y}},{distance:Math.abs(ft.x-je),position:{x:je,y:ft.y}},{distance:Math.abs(ft.y-qe),position:{x:ft.x,y:qe}},{distance:Math.abs(ft.y-mt),position:{x:ft.x,y:mt}}].reduce((B,J)=>J.distance<B.distance?J:B).position;return at(yt.x>=(_e+je)/2?"right":"left"),yt},[]),lt=er.useMemo(()=>{if(!he||Ze)return De.x;if(Be==="right"){let be=Mt.current?.parentElement?.getBoundingClientRect().width,Ce=Wt?Tu:Iu;return be?Math.max(Lr,be-Ce-Lr):Wt?De.x:De.x-(Iu-Tu)}return De.x},[Be,De.x,Ze,he,Wt]),Ft=er.useCallback($=>{if(!he||!Wt||Vv($.target))return;$.preventDefault(),$.currentTarget.setPointerCapture($.pointerId);let Q=ht({x:lt,y:De.y});at("left"),ye(Q),Ot.current={pointerId:$.pointerId,startClientX:$.clientX,startClientY:$.clientY,startX:Q.x,startY:Q.y,currentX:Q.x,currentY:Q.y},St(true);},[ht,lt,De.y,he,Wt]),Yt=er.useCallback($=>{let Q=Ot.current;if(!Q||Q.pointerId!==$.pointerId)return;let be=ht({x:Q.startX+$.clientX-Q.startClientX,y:Q.startY+$.clientY-Q.startClientY});Q.currentX=be.x,Q.currentY=be.y,ye(be);},[ht]),Z=er.useCallback($=>{let Q=Ot.current;if(!(!Q||Q.pointerId!==$.pointerId)){try{$.currentTarget.releasePointerCapture($.pointerId);}catch{}Ot.current=null,ye(Nt({x:Q.currentX,y:Q.currentY})),St(false);}},[Nt]);return er.useEffect(()=>{if(!he)return;let $=()=>{ye(Ce=>ht(Ce));},Q=window.requestAnimationFrame($),be=window.setTimeout($,430);return ()=>{window.cancelAnimationFrame(Q),window.clearTimeout(be);}},[ht,he,Wt,wt]),e(Fn,{mode:re,children:e(Ga,{locale:Fe,children:c("div",{className:"orb-root",style:{minHeight:"100vh",width:"100%",display:"flex",flexDirection:"column",overflowX:"hidden",background:"var(--orb-canvas)"},children:[e($i,{appTitle:r,logo:x,mode:re,onToggleMode:()=>Bt(zv(re)),locale:Fe,localeLabel:Ke||Fe===i?s:void 0,localeOptions:l,onLocaleChange:Xt,user:b,onUserRefresh:m,onUserSetting:v,onUserLogout:y,userMenuItems:g,searchPlaceholder:h,showSearch:Je,onSearch:w,onSearchAdd:T,onOpenPanel:I,panelOpen:S,leftSlot:D,rightSlot:A}),C==="floating"&&e("div",{className:"orb-float-search",style:k,children:e(wl,{searchPlaceholder:h,onSearch:w,onSearchAdd:T,onOpenPanel:I,panelOpen:S,maxWidth:"100%"})}),c("div",{style:{flex:1,minHeight:0,minWidth:0,display:"flex",overflowX:"hidden",position:"relative"},children:[a&&!he&&e("div",{style:{paddingTop:12,paddingBottom:12,paddingLeft:12,paddingRight:Wt?4:12,display:"flex",alignItems:"flex-start",flexShrink:0},children:e(Ne,{...Vt,maxHeight:wt,colorMode:st,displayMode:te,onDisplayModeChange:pt,showDisplayModeToggle:X&&Wt})}),a&&he&&e("div",{ref:Mt,onPointerDown:Ft,onPointerMove:Yt,onPointerUp:Z,onPointerCancel:Z,style:{position:"absolute",top:De.y,left:lt,zIndex:1205,display:"flex",alignItems:"flex-start",cursor:Wt?Ze?"grabbing":"grab":"default",touchAction:Wt?"none":"auto",userSelect:Ze?"none":void 0,transition:Ze?"none":"left 180ms ease-out, top 180ms ease-out"},children:e(Ne,{...Vt,maxHeight:wt,colorMode:st,displayMode:te,onDisplayModeChange:pt,showDisplayModeToggle:X&&Wt})}),e("div",{style:{flex:1,minWidth:0,minHeight:0,overflow:"auto",paddingTop:12,paddingBottom:12,paddingRight:12,paddingLeft:a&&!he&&Wt?4:12,...M},children:n})]})]})})})};var Ui="(blank)",Ru="Result",Du="Grand Total",Nu={sum:"Sum",count:"Count",avg:"Average",min:"Min",max:"Max"},Au=["sum","count","avg","min","max"];var Eu=["palette","rows","columns","filters","values"];var Lu=t=>Eu.includes(t),Ou=t=>t==="rows"||t==="columns"||t==="filters",Ki=t=>{let r=t.split("|");return r.length===2&&r[0]==="container"&&Lu(r[1])?{kind:"container",zone:r[1]}:r.length===3&&r[0]==="item"&&Lu(r[1])&&r[2]?{kind:"item",zone:r[1],key:r[2]}:null},co=t=>t==null||t===""?Ui:t instanceof Date?t.toISOString().slice(0,10):String(t),_o=t=>JSON.stringify(t),Fu=(t,r)=>{let o=t.join(""),n=r.join("");return o.localeCompare(n,void 0,{sensitivity:"base"})},Wv=t=>{if(typeof t=="number"&&Number.isFinite(t))return t;if(typeof t=="string"&&t.trim()!==""){let r=Number(t);return Number.isFinite(r)?r:null}return null},wn=(t,r,o)=>{if(o==="count")return t.length;let n=t.map(a=>Wv(a[r])).filter(a=>a!==null);return n.length===0?0:o==="sum"?n.reduce((a,i)=>a+i,0):o==="avg"?n.reduce((a,i)=>a+i,0)/n.length:o==="min"?Math.min(...n):Math.max(...n)},lr=(t,r)=>{if(!t||t.length===0)return [];let o=new Set,n=[];return t.forEach(a=>{!r.has(a)||o.has(a)||(o.add(a),n.push(a));}),n},po=(t,r)=>t.length!==r.length?false:t.every((o,n)=>o===r[n]),Bu=(t,r)=>{let o=Object.keys(t),n=Object.keys(r);return o.length!==n.length?false:o.every(a=>{let i=t[a]??[],s=r[a]??[];return po(i,s)})},qi=(t,r)=>t.length!==r.length?false:t.every((o,n)=>{let a=r[n];return o.tokenId===a.tokenId&&o.fieldId===a.fieldId&&o.aggregation===a.aggregation}),kl=t=>!t?.aggregations||t.aggregations.length===0?Au:t.aggregations,vr=(t,r)=>{let o=kl(r);return t&&o.includes(t)?t:r?.type==="number"&&o.includes("sum")?"sum":o.includes("count")?"count":o[0]},ua=(t,r,o)=>{let n=o.get(r.fieldId);return n?.formatValue?n.formatValue(t):r.aggregation==="count"?Math.round(t).toLocaleString():t.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:2})};P();var zu=({options:t,selectedValues:r,onChange:o,minWidth:n=96})=>{let{t:a}=pe(),[i,s]=er.useState(""),[l,d]=er.useState(null),u=er.useMemo(()=>{let m=i.trim().toLowerCase();return m?t.filter(v=>v.toLowerCase().includes(m)):t},[t,i]),p=t.length>0&&r.length===t.length,f=t.length===0?a("pivot.filter.na"):r.length===0?a("common.none"):p?a("common.all"):`${r.length}/${t.length}`,b=m=>{o(r.includes(m)?r.filter(v=>v!==m):[...r,m]);};return c("div",{sx:{minWidth:n},onClick:m=>m.stopPropagation(),onMouseDown:m=>m.stopPropagation(),children:[e(we,{variant:"outlined",size:"small",onClick:m=>d(m.currentTarget),sx:{minWidth:n,height:26,px:1,py:.35,fontSize:"0.72rem",justifyContent:"space-between"},children:f}),e(Qt,{anchorEl:l,open:!!l,onClose:()=>d(null),PaperProps:{sx:{width:Math.max(n,220),maxHeight:320,overflowY:"auto",p:.5}},children:c("div",{onClick:m=>m.stopPropagation(),sx:{display:"grid",gap:.4},children:[e(ze,{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(),o(p?[]:t);},sx:{minWidth:"auto",px:0,py:.2,fontSize:"0.76rem",fontWeight:700,textTransform:"none"},children:a(p?"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 v=r.includes(m);return c("div",{role:"option","aria-selected":v,tabIndex:0,className:`orb-menu-item ${v?"orb-selected":""}`,onClick:()=>b(m),onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),b(m));},sx:{display:"flex",alignItems:"center",fontSize:"0.75rem",py:.4},children:[e(It,{size:"small",checked:v,inputProps:{tabIndex:-1},sx:{p:.5,mr:.5,pointerEvents:"none"}}),e("span",{children:m})]},m)})]})})]})};P();var kn=({size:t=18,subtle:r=false})=>{let o=Math.max(2,Math.round(t/6));return e(Ie,{"aria-hidden":"true",sx:{display:"grid",gridTemplateColumns:`repeat(2, ${o}px)`,gridAutoRows:`${o}px`,gap:`${Math.max(2,Math.round(o/1.5))}px`,placeItems:"center",width:t,height:t,flexShrink:0,color:r?"var(--orb-muted)":"var(--orb-primary)"},children:Array.from({length:6},(n,a)=>e(Ie,{sx:{width:o,height:o,borderRadius:999,bgcolor:"currentColor"}},a))})};P();var Pl=({label:t,subtitle:r,isDragging:o,dragRef:n,listeners:a,attributes:i,style:s})=>e(Ae,{ref:n,...a,...i,sx:{p:1,borderRadius:"var(--orb-r-container)",border:"1px solid",borderColor:"var(--orb-border)",bgcolor:"var(--orb-canvas)",boxShadow:"var(--orb-shadow-1)",touchAction:"none",transition:"border-color 140ms ease, background-color 140ms ease, transform 140ms ease","&:hover":{borderColor:"var(--orb-p200)",bgcolor:"var(--orb-p50)",transform:"translateY(-1px)"}},style:{...s,opacity:o?.3:1,cursor:o?"grabbing":"grab"},children:c("div",{sx:{display:"flex",alignItems:"center",gap:.9},children:[e("div",{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:"var(--orb-r)",bgcolor:"var(--orb-p50)",border:"1px solid var(--orb-p100)"},children:e(kn,{size:13,subtle:true})}),c("div",{sx:{minWidth:0,display:"flex",flexDirection:"column",gap:.15},children:[e(L,{component:"div",sx:{fontSize:"0.84rem",fontWeight:700,lineHeight:1.2,color:"var(--orb-fg-strong)"},children:t}),r&&e(L,{component:"div",sx:{fontSize:"0.73rem",fontWeight:400,color:"var(--orb-fg)",lineHeight:1.2},children:r})]})]})}),Vu=({id:t,label:r,subtitle:o})=>{let{setNodeRef:n,listeners:a,attributes:i,isDragging:s}=core.useDraggable({id:t});return e(Pl,{label:r,subtitle:o,isDragging:s,dragRef:n,listeners:a,attributes:i})};P();var Pn=({zone:t,title:r,hint:o,icon:n,children:a,itemCount:i,onClear:s})=>{let l=`container|${t}`,{isOver:d,setNodeRef:u}=core.useDroppable({id:l}),{t:p}=pe();return c(Ae,{ref:u,sx:f=>({p:1.1,borderRadius:"var(--orb-r-container)",border:"1px dashed",borderColor:d?"var(--orb-primary)":"var(--orb-p200)",bgcolor:d?"var(--orb-p100)":f.palette.mode==="dark"?"var(--orb-surface-2)":"var(--orb-p50)",transition:"border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease",boxShadow:d?"0 0 0 3px var(--orb-focus-ring)":"none",minHeight:120,display:"flex",flexDirection:"column"}),children:[c("div",{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[c("div",{sx:{display:"flex",alignItems:"center",gap:.8},children:[n,e(L,{component:"div",sx:{fontSize:"0.8rem",fontWeight:700,letterSpacing:.1,color:"var(--orb-fg-strong)"},children:r}),c(L,{component:"div",sx:{fontSize:"0.73rem",fontWeight:500,color:"var(--orb-fg)"},children:["(",i,")"]})]}),i>0&&s&&e(ct,{title:p("pivot.clearArea"),children:e(ae,{size:"small",onClick:s,sx:{width:24,height:24,p:0},children:e(tp,{size:13})})})]}),e(L,{component:"div",sx:{mt:.5,mb:.9,fontSize:"0.72rem",fontWeight:400,color:"var(--orb-fg)"},children:o}),e("div",{sx:{flex:1},children:a})]})};P();var Wu={xs:1.2,md:1.6},Tn=({title:t,subtitle:r,collapsed:o,onToggleCollapse:n,expandAriaLabel:a,collapseAriaLabel:i,children:s,bodySx:l,unmountOnExit:d=false,headerActions:u})=>c(Ae,{sx:p=>({borderRadius:"var(--orb-r-container)",border:`1px solid ${p.palette.divider}`,overflow:"hidden",bgcolor:"var(--orb-surface)",boxShadow:"var(--orb-shadow-1)"}),children:[c("div",{sx:p=>({px:Wu,py:1.15,display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,bgcolor:"var(--orb-canvas)",borderBottom:o?"none":`1px solid ${p.palette.divider}`}),children:[c("div",{sx:{minWidth:0,flex:1},children:[e(L,{component:"div",sx:{fontSize:"0.92rem",fontWeight:700,color:"var(--orb-fg-strong)"},children:t}),e(L,{component:"div",sx:{fontSize:"0.75rem",fontWeight:400,color:"var(--orb-fg)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r})]}),c("div",{sx:{display:"flex",alignItems:"center",gap:.75,flexShrink:0},children:[u,e(ae,{size:"small","aria-label":o?a:i,onClick:n,sx:p=>({border:`1px solid ${p.palette.divider}`,bgcolor:"var(--orb-canvas)",color:"var(--orb-primary)",width:24,height:24,padding:0,borderRadius:999,flexShrink:0,"&:hover":{bgcolor:"var(--orb-p50)",borderColor:"var(--orb-p200)"}}),children:e(ai,{size:13,sx:{transition:"transform 220ms cubic-bezier(0.2, 0, 0, 1)",transform:o?"rotate(180deg)":"rotate(0deg)"}})})]})]}),e(nn,{in:!o,timeout:260,easing:"cubic-bezier(0.2, 0, 0, 1)",unmountOnExit:d,children:e("div",{sx:[{px:Wu,py:{xs:1.2,md:1.6}},...Array.isArray(l)?l:l?[l]:[]],children:s})})]});P();var Xi=({label:t,caption:r,onRemove:o,trailing:n,isDragging:a,dragRef:i,listeners:s,attributes:l,style:d})=>e(Ae,{ref:i,style:d,sx:{p:1,borderRadius:"var(--orb-r-container)",border:"1px solid",borderColor:"var(--orb-border)",bgcolor:"var(--orb-canvas)",boxShadow:"var(--orb-shadow-1)",touchAction:"none",opacity:a?0:1,transition:"border-color 140ms ease, background-color 140ms ease, transform 140ms ease","&:hover":{borderColor:"var(--orb-p200)",bgcolor:"var(--orb-p50)"}},children:c("div",{sx:{display:"flex",alignItems:"center",gap:.9},children:[e("div",{...l,...s,sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:"var(--orb-r)",bgcolor:"var(--orb-p50)",border:"1px solid var(--orb-p100)",cursor:"grab"},children:e(kn,{size:13,subtle:true})}),c("div",{sx:{minWidth:0,flex:1,display:"flex",flexDirection:"column",gap:.15},children:[e(L,{component:"div",sx:{fontSize:"0.82rem",fontWeight:700,lineHeight:1.2,color:"var(--orb-fg-strong)"},children:t}),r&&e(L,{component:"div",sx:{fontSize:"0.72rem",fontWeight:400,color:"var(--orb-fg)",lineHeight:1.2},children:r})]}),n,o&&e(ae,{size:"small",onClick:u=>{u.stopPropagation(),o();},sx:{width:24,height:24,p:0},children:e(wo,{size:13})})]})}),ma=({id:t,label:r,caption:o,onRemove:n,trailing:a})=>{let{setNodeRef:i,attributes:s,listeners:l,transform:d,transition:u,isDragging:p}=sortable.useSortable({id:t}),f={transform:d?`translate3d(${d.x}px, ${d.y}px, 0)`:void 0,transition:u,zIndex:p?999:"auto"};return e(Xi,{label:r,caption:o,onRemove:n,trailing:a,isDragging:p,dragRef:i,listeners:l,attributes:s,style:f})};P();var ji={rows:e(fp,{size:16,sx:{color:"var(--orb-primary)"}}),columns:e(ln,{size:16,sx:{color:"var(--orb-primary)"}}),filters:e(jd,{size:16,sx:{color:"var(--orb-primary)"}}),values:e(sn,{size:16,sx:{color:"var(--orb-accent)"}})},$u=({isConfiguratorCollapsed:t,onToggleCollapse:r,availableFields:o,fieldMap:n,filterFields:a,columnFields:i,rowFields:s,valueFields:l,clearZone:d,removeFieldFromZone:u,getFilterSelectionSummary:p,renderDimensionFilterSelect:f,renderAggregationSelect:b,getAggregationLabel:m})=>{let{t:v}=pe(),y=[`${v("pivot.zone.rows")} ${s.length}`,`${v("pivot.zone.columns")} ${i.length}`,`${v("pivot.zone.filters")} ${a.length}`,`${v("pivot.zone.values")} ${l.length}`].join(" \xB7 ");return e(Tn,{title:v("pivot.config.title"),subtitle:y,collapsed:t,onToggleCollapse:r,expandAriaLabel:v("pivot.collapse.ariaExpand"),collapseAriaLabel:v("pivot.collapse.ariaCollapse"),unmountOnExit:true,children:c("div",{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",lg:"260px 1fr"},gap:2},children:[e(Pn,{zone:"palette",title:v("pivot.fieldList"),hint:v("pivot.availableDimensions"),itemCount:o.length,icon:e(kn,{size:18,subtle:true}),children:c(ie,{spacing:.8,sx:{maxHeight:400,overflowY:"auto",pr:.5},children:[o.length===0&&e(L,{component:"div",sx:{fontSize:"0.74rem",fontWeight:400,color:"var(--orb-fg)",py:1},children:v("pivot.allFieldsInUse")}),o.map(g=>e(Vu,{id:`item|palette|${g.id}`,label:g.label,subtitle:g.type??"string"},g.id))]})}),c(ie,{spacing:2,children:[c("div",{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[e(Pn,{zone:"filters",title:v("pivot.zone.filters"),hint:v("pivot.hint.filters"),icon:ji.filters,itemCount:a.length,onClear:()=>d("filters"),children:e(sortable.SortableContext,{items:a.map(g=>`item|filters|${g}`),strategy:sortable.verticalListSortingStrategy,children:e(ie,{spacing:.7,children:a.map(g=>e(ma,{id:`item|filters|${g}`,label:n.get(g)?.label??g,caption:p(g),trailing:f(g),onRemove:()=>u("filters",g)},g))})})}),e(Pn,{zone:"columns",title:v("pivot.zone.columns"),hint:v("pivot.hint.columns"),icon:ji.columns,itemCount:i.length,onClear:()=>d("columns"),children:e(sortable.SortableContext,{items:i.map(g=>`item|columns|${g}`),strategy:sortable.verticalListSortingStrategy,children:e(ie,{spacing:.7,children:i.map(g=>e(ma,{id:`item|columns|${g}`,label:n.get(g)?.label??g,caption:`${n.get(g)?.type??"dimension"} \u2022 ${p(g)}`,trailing:f(g),onRemove:()=>u("columns",g)},g))})})})]}),c("div",{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[e(Pn,{zone:"rows",title:v("pivot.zone.rows"),hint:v("pivot.hint.rows"),icon:ji.rows,itemCount:s.length,onClear:()=>d("rows"),children:e(sortable.SortableContext,{items:s.map(g=>`item|rows|${g}`),strategy:sortable.verticalListSortingStrategy,children:e(ie,{spacing:.7,children:s.map(g=>e(ma,{id:`item|rows|${g}`,label:n.get(g)?.label??g,caption:`${n.get(g)?.type??"dimension"} \u2022 ${p(g)}`,trailing:f(g),onRemove:()=>u("rows",g)},g))})})}),e(Pn,{zone:"values",title:v("pivot.zone.values"),hint:v("pivot.hint.values"),icon:ji.values,itemCount:l.length,onClear:()=>d("values"),children:e(sortable.SortableContext,{items:l.map(g=>`item|values|${g.tokenId}`),strategy:sortable.verticalListSortingStrategy,children:e(ie,{spacing:.7,children:l.map(g=>{let x=n.get(g.fieldId)?.label??g.fieldId,h=`${m(g.aggregation)}(${x})`;return e(ma,{id:`item|values|${g.tokenId}`,label:x,caption:h,trailing:b(g),onRemove:()=>u("values",g.tokenId)},g.tokenId)})})})})]})]})]})})};P();var _u=t=>t.toLocaleString(void 0,{maximumFractionDigits:1}),Gu=({data:t,primaryLabel:r,secondaryLabel:o,formatPrimaryValue:n,formatSecondaryValue:a})=>{let i=sr();if(t.length===0)return null;let s=720,l=250,d={top:20,right:24,bottom:40,left:52},u=o?t.map(g=>g.primaryValue):t.map((g,x)=>x+1),p=o?t.map(g=>g.secondaryValue??0):t.map(g=>g.primaryValue),f=Math.max(...u,1),b=Math.max(...p,1),m=s-d.left-d.right,v=l-d.top-d.bottom,y=t.map((g,x)=>{let h=o?g.primaryValue:x+1,C=o?g.secondaryValue??0:g.primaryValue,k=d.left+h/f*m,w=l-d.bottom-C/b*v;return {...g,x:k,y:w,rawX:h,rawY:C}});return c("div",{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[e("div",{sx:{overflowX:"auto"},children:c("div",{component:"svg",viewBox:`0 0 ${s} ${l}`,sx:{width:"100%",minWidth:s,height:l},children:[e("line",{x1:d.left,y1:l-d.bottom,x2:s-d.right,y2:l-d.bottom,stroke:Ar(i.palette.text.secondary,.35)}),e("line",{x1:d.left,y1:d.top,x2:d.left,y2:l-d.bottom,stroke:Ar(i.palette.text.secondary,.35)}),y.map(g=>c("g",{children:[e("circle",{cx:g.x,cy:g.y,r:7,fill:Ar(i.palette.primary.main,.18)}),e("circle",{cx:g.x,cy:g.y,r:4.5,fill:i.palette.primary.main,children:c("title",{children:[g.name,`
192
+ `);if(a&&x==="mermaid"){p.push(e(dl,{code:C},`mermaid-${m}`));continue}if(n&&["math","latex","katex"].includes(x)){p.push(e(ca,{expression:C,allowKatex:true},`math-fence-${m}`));continue}p.push(e(la,{code:C,language:x||"text",copyable:s,showLineNumbers:l,wrapLongLines:true},`code-${m}`));continue}if(n&&y.startsWith("$$")){let x=[];if(y.endsWith("$$")&&y!=="$$")x.push(y.slice(2,-2)),m+=1;else {let C=v.slice(v.indexOf("$$")+2);for(C.trim()&&x.push(C),m+=1;m<f.length;){let k=f[m],w=k.indexOf("$$");if(w>=0){x.push(k.slice(0,w)),m+=1;break}x.push(k),m+=1;}}p.push(e(ca,{expression:x.join(`
193
+ `).trim(),allowKatex:true},`math-${m}`));continue}if(iu(v)){let x=Math.min(6,v.match(/^#{1,6}/)?.[0]?.length||1),h=v.replace(/^#{1,6}\s+/,""),C=x===1?"h5":x===2?"h6":"subtitle1";p.push(e(hr,{variant:C,sx:{mt:x===1?1.2:.8,mb:.5,fontWeight:700},children:da(h,b,`h-${m}`)},`heading-${m}`)),m+=1;continue}if(su(v)){p.push(e(xd,{sx:{my:1.2}},`hr-${m}`)),m+=1;continue}if(lu(f,m)){let x=m+2;for(;x<f.length&&f[x].trim()&&f[x].includes("|");)x+=1;let h=f.slice(m,x).join(`
194
+ `),C=Li(h);if(C){p.push(e(ul,{table:C},`table-${m}`)),m=x;continue}}if(bl(v)){let x=[];for(;m<f.length&&bl(f[m]);)x.push(f[m].replace(/^\s*>\s?/,"")),m+=1;p.push(e(Bo,{variant:"outlined",sx:{px:1,py:.8,my:.9,borderLeftWidth:3,borderLeftStyle:"solid",borderLeftColor:"primary.main",bgcolor:"action.hover"},children:e(hr,{variant:"body2",sx:{whiteSpace:"pre-wrap"},children:x.map((h,C)=>c(er.Fragment,{children:[C>0&&e("br",{}),da(h,b,`q-${m}-${C}`)]},`quote-line-${C}`))})},`quote-${m}`));continue}if(gl(v)){let x=[];for(;m<f.length&&gl(f[m]);)x.push(f[m].trim().replace(/^[-*+]\s+/,"")),m+=1;p.push(e(Ie,{component:"ul",sx:{my:.8,pl:2.5},children:x.map((h,C)=>e(Ie,{component:"li",sx:{mb:.45},children:e(hr,{variant:"body2",children:da(h,b,`ul-${m}-${C}`)})},`ul-item-${C}`))},`ul-${m}`));continue}if(fl(v)){let x=[];for(;m<f.length&&fl(f[m]);)x.push(f[m].trim().replace(/^\d+\.\s+/,"")),m+=1;p.push(e(Ie,{component:"ol",sx:{my:.8,pl:2.7},children:x.map((h,C)=>e(Ie,{component:"li",sx:{mb:.45},children:e(hr,{variant:"body2",children:da(h,b,`ol-${m}-${C}`)})},`ol-item-${C}`))},`ol-${m}`));continue}let g=[];for(;m<f.length;){let x=f[m],h=x.trim();if(!h||Fi(x)||iu(x)||su(x)||gl(x)||fl(x)||bl(x)||lu(f,m)||i&&cu(x)||n&&h.startsWith("$$"))break;g.push(x),m+=1;}g.length>0?p.push(e(hr,{variant:"body2",sx:{my:.65,lineHeight:1.65},children:g.map((x,h)=>c(er.Fragment,{children:[h>0&&e("br",{}),da(x,b,`p-${m}-${h}`)]},`p-line-${h}`))},`p-${m}`)):m+=1;}return p},[d,n,a,i,s,l]);return e(Ie,{className:o,sx:{"& strong":{fontWeight:700},"& em":{fontStyle:"italic"},"& a":{wordBreak:"break-all"}},children:u})};P();var ZN=(t,r)=>e(pa,{markdown:t,...r});P();var du=({value:t,onChange:r,onSubmit:o,onVoiceInput:n,onClear:a,placeholder:i,statusText:s,loading:l=false,compact:d=false,showStatusText:u=true})=>c(ie,{spacing:.75,children:[c("div",{sx:{display:"flex",alignItems:"center",gap:1,px:1.2,py:d?.25:.4,borderRadius:999,border:"1px solid",borderColor:"divider",bgcolor:"background.paper",minHeight:d?38:44},children:[e(zo,{sx:{fontSize:d?16:18,color:"text.secondary"}}),e(Md,{fullWidth:true,value:t,onChange:p=>r(p.target.value),onKeyDown:p=>{p.key==="Enter"&&(p.preventDefault(),o());},placeholder:i,sx:{fontSize:d?"0.84rem":"0.9rem"}}),t&&a&&e(ae,{size:"small",onClick:a,children:e(wo,{sx:{fontSize:d?16:18}})}),n&&e(ae,{size:"small",onClick:n,children:e(np,{sx:{fontSize:d?16:18}})}),e(ae,{size:"small",onClick:o,disabled:l||!t.trim(),children:e(cp,{sx:{fontSize:d?16:18}})})]}),u&&s&&e(L,{variant:"caption",color:"text.secondary",children:s})]});P();var pu=(t,r)=>{let o=r.trim();if(!o)return t;let n=t.toLowerCase(),a=o.toLowerCase(),i=n.indexOf(a);return i<0?t:c(jsxRuntime.Fragment,{children:[t.slice(0,i),e("div",{component:"mark",sx:{bgcolor:"warning.light",color:"warning.contrastText",px:.15,borderRadius:.4},children:t.slice(i,i+o.length)}),t.slice(i+o.length)]})},Bi=({section:t,highlightQuery:r=""})=>{let o=t.columns||2;return c(Ae,{variant:"outlined",sx:{p:1.8,borderRadius:2},children:[e(L,{variant:"subtitle1",sx:{fontWeight:700,mb:1.4},children:t.title}),e("div",{sx:{display:"grid",gap:1.15,gridTemplateColumns:{xs:"1fr",md:o===3?"repeat(3, minmax(0, 1fr))":o===1?"1fr":"repeat(2, minmax(0, 1fr))"}},children:t.fields.map(n=>{let a=typeof n.value=="string"||typeof n.value=="number"?String(n.value):null;return c("div",{sx:{minWidth:0},children:[e(L,{variant:"caption",color:"text.secondary",sx:{display:"block"},children:pu(n.label,r)}),e(L,{component:"div",variant:"body2",sx:{mt:.2,fontWeight:500,wordBreak:"break-word"},children:a?pu(a,r):n.value})]},n.id)})})]})};var hl=t=>t==null?"":typeof t=="string"||typeof t=="number"||typeof t=="boolean"?String(t):"",zi=t=>t.trim().toLowerCase(),av=(t,r)=>{let o=[];return t.forEach(n=>{n.fields.forEach(a=>{let i=a.searchableText||hl(a.value),s={source:"section",sourceId:n.id,sourceSectionId:n.id,sourceTitle:n.title,fieldId:a.id,fieldLabel:a.label,fieldValue:i};o.push({hit:s,text:zi(`${n.title} ${a.label} ${i}`)});});}),r.forEach(n=>{(n.fields||[]).forEach(a=>{let i=a.searchableText||hl(a.value),s={source:"tab",sourceId:n.id,sourceTitle:n.label,fieldId:a.id,fieldLabel:a.label,fieldValue:i};o.push({hit:s,text:zi(`${n.label} ${a.label} ${i}`)});}),(n.sections||[]).forEach(a=>{a.fields.forEach(i=>{let s=i.searchableText||hl(i.value),l={source:"tab",sourceId:n.id,sourceSectionId:a.id,sourceTitle:`${n.label} / ${a.title}`,fieldId:i.id,fieldLabel:i.label,fieldValue:s};o.push({hit:l,text:zi(`${n.label} ${a.title} ${i.label} ${s}`)});});});}),o},uu=({sections:t,tabs:r=[],defaultTabId:o,ai:n})=>{let{t:a}=pe(),[i,s]=er.useState(""),[l,d]=er.useState(o||r[0]?.id),[u,p]=er.useState("idle"),[f,b]=er.useState([]),[m,v]=er.useState(""),[y,g]=er.useState(""),[x,h]=er.useState(false),C=er.useMemo(()=>av(t,r),[t,r]);er.useEffect(()=>{if(r.length===0){d(void 0);return}r.some(A=>A.id===l)||d(o||r[0]?.id);},[r,l,o]);let k=er.useCallback(()=>{p("idle"),b([]),v(""),g("");},[]),w=er.useCallback(S=>{s(S),S.trim()||(p("idle"),b([]),v(""),g(""));},[]),T=er.useCallback(S=>{let A=zi(S);return A?C.filter(R=>R.text.includes(A)).map(R=>R.hit):[]},[C]),I=er.useCallback(async()=>{let S=i.trim();if(!S)return;h(true);let A=T(S);if(b(A),A.length>0){p("search"),g(""),v(a("detail.searchAi.matches",{count:A.length})),h(false);return}if(n?.enabled!==false&&n?.onSubmit){p("ai"),v(a("detail.searchAi.autoAiFallback"));try{let M=await n.onSubmit(S,{query:S,hits:A,activeTabId:l,sections:t,tabs:r});g(typeof M=="string"?M:"");}finally{h(false);}return}p("search"),g(""),v(a("detail.searchAi.noMatch")),h(false);},[i,T,a,n,l,t,r]);return {query:i,setQuery:w,activeTabId:l,setActiveTabId:d,searchMode:u,hits:f,statusText:m,aiResponse:y,searching:x,handleSubmit:I,clearResult:k}};P();var kA=({title:t,subtitle:r,sections:o,tabs:n=[],defaultTabId:a,table:i,ai:s,rightHeaderSlot:l,searchBarWidth:d=460,onClose:u,closeLabel:p="Close"})=>{let{t:f}=pe(),{query:b,setQuery:m,activeTabId:v,setActiveTabId:y,searchMode:g,hits:x,statusText:h,aiResponse:C,searching:k,handleSubmit:w,clearResult:T}=uu({sections:o,tabs:n,defaultTabId:a,ai:s}),I=er.useMemo(()=>n.find(R=>R.id===v)||n[0],[n,v]),S=er.useCallback(R=>{let M=N=>{let E=document.getElementById(R);if(E){E.scrollIntoView({behavior:"smooth",block:"center"});return}N<4&&setTimeout(()=>M(N+1),60);};requestAnimationFrame(()=>M(0));},[]),A=er.useCallback((R,M)=>{if(n.some(N=>N.id===R)){y(R),S(M?`detail-tab-${R}-section-${M}`:`detail-tab-${R}`);return}S(`detail-section-${R}`);},[n,y,S]);return c("div",{sx:{display:"flex",flexDirection:"column",gap:1.5,minHeight:"100%"},children:[c(ie,{direction:{xs:"column",md:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",md:"center"},spacing:1,children:[c("div",{sx:{minWidth:0},children:[e(L,{variant:"h5",sx:{fontWeight:800,color:"text.primary"},children:t}),r&&e(L,{variant:"body2",color:"text.secondary",sx:{mt:.35},children:r})]}),c(ie,{direction:"row",spacing:.6,alignItems:"center",sx:{width:{xs:"100%",md:"auto"},ml:{xs:0,md:"auto"}},children:[e("div",{sx:{width:{xs:"100%",md:d},maxWidth:"100%",minWidth:{md:320}},children:e(du,{value:b,onChange:m,onSubmit:w,onVoiceInput:s?.onVoiceInput,onClear:()=>{m(""),T();},placeholder:s?.placeholder||f("detail.searchAi.placeholder"),statusText:h,loading:k,compact:true,showStatusText:false})}),u&&e(ct,{title:p,children:e(ae,{size:"small",onClick:u,children:e(qd,{fontSize:"small"})})}),l]})]}),h&&e(L,{variant:"caption",color:"text.secondary",sx:{mt:-0.7},children:h}),g==="search"&&x.length>0&&c(Ae,{variant:"outlined",sx:{p:1.5,borderRadius:2},children:[e(L,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:.6},children:f("detail.searchAi.matches",{count:x.length})}),e(ie,{spacing:.35,children:x.slice(0,8).map(R=>e("div",{component:"button",type:"button",onClick:()=>A(R.sourceId,R.sourceSectionId),sx:{textAlign:"left",border:0,bgcolor:"transparent",p:.2,cursor:"pointer",color:"text.primary",borderRadius:1,"&:hover":{bgcolor:"action.hover"}},children:c(L,{variant:"body2",sx:{fontSize:"0.84rem"},children:[e("div",{component:"span",sx:{color:"text.secondary"},children:R.sourceTitle})," \xB7 ",e("div",{component:"span",sx:{fontWeight:700},children:R.fieldLabel})," = ",e("div",{component:"span",children:R.fieldValue||"-"})]})},`${R.source}|${R.sourceId}|${R.fieldId}`))})]}),g==="ai"&&C&&c(Ae,{variant:"outlined",sx:{p:1.5,borderRadius:2},children:[e(L,{variant:"subtitle2",sx:{fontWeight:700,mb:.7},children:f("detail.searchAi.aiResultTitle")}),e("div",{sx:{fontSize:"0.9rem",lineHeight:1.6,"& p":{m:0,mb:.8},"& h1, & h2, & h3, & h4":{mt:1.2,mb:.6,lineHeight:1.3},"& ul, & ol":{mt:.4,mb:.8,pl:2.6},"& code":{px:.5,py:.1,borderRadius:.8,bgcolor:"action.hover",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},"& pre":{m:0,mt:.8,mb:.8,p:1.1,borderRadius:1.2,bgcolor:"action.hover",overflowX:"auto"},"& pre code":{p:0,bgcolor:"transparent"}},children:e(pa,{markdown:C})})]}),e("div",{sx:{display:"grid",gap:1.5,gridTemplateColumns:{xs:"1fr",lg:"repeat(2, minmax(0, 1fr))"}},children:o.map(R=>e("div",{id:`detail-section-${R.id}`,children:e(Bi,{section:R,highlightQuery:b})},R.id))}),n.length>0&&c(Ae,{variant:"outlined",sx:{borderRadius:2,overflow:"hidden"},children:[e(Ed,{value:I?.id||false,onChange:(R,M)=>y(String(M)),variant:"scrollable",scrollButtons:"auto",sx:{borderBottom:"1px solid",borderColor:"divider"},children:n.map(R=>e(Ld,{value:R.id,label:R.label,sx:{textTransform:"none"}},R.id))}),c("div",{sx:{p:1.5},children:[e("div",{id:`detail-tab-${I?.id||""}`}),I?.description&&e(L,{variant:"body2",color:"text.secondary",sx:{mb:1.2},children:I.description}),I?.content?I.content:c(ie,{spacing:1.5,children:[(I?.sections||[]).map(R=>e("div",{id:`detail-tab-${I?.id}-section-${R.id}`,children:e(Bi,{section:R,highlightQuery:b})},R.id)),I?.fields&&I.fields.length>0&&e(Bi,{section:{id:`${I.id}-fields`,title:I.label,fields:I.fields,columns:2},highlightQuery:b})]})]})]}),i&&e(Jr,{title:i.title||f("detail.table.title"),...i.tableProps,filterConfig:void 0,fitContainer:false})]})};P();var fu=({bucket:t,cardCount:r,highlighted:o=false,children:n,emptyLabel:a,height:i,maxHeight:s,onRename:l,renameLabel:d,sx:u})=>{let{t:p}=pe(),[f,b]=er.useState(false),[m,v]=er.useState(t.title),y=()=>{v(t.title),b(false);},g=x=>{x.preventDefault();let h=m.trim();h&&(h!==t.title&&l?.(h),v(h),b(false));};return e(Ae,{elevation:0,sx:[x=>{let h=t.accentColor??x.palette.primary.main;return {position:"relative",display:"flex",flexDirection:"column",minWidth:0,minHeight:0,height:i??s??560,maxHeight:s,borderRadius:"var(--orb-r-container)",overflow:"hidden",border:o?`1px solid ${rt(h,.65)}`:"1px solid var(--orb-border)",bgcolor:"var(--orb-canvas)",boxShadow:o?`0 0 0 2px ${rt(h,.16)}, var(--orb-shadow-2)`:"none",transition:"border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease","&::before":{content:'""',display:"block",flexShrink:0,height:3,bgcolor:h}}},...Array.isArray(u)?u:u?[u]:[]],children:c(ie,{spacing:1.25,sx:{flex:1,minHeight:0,overflow:"hidden",p:1.5},children:[c(Ie,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:1.25},children:[e(Ie,{sx:{minWidth:0,flex:1},children:c(Ie,{sx:{display:"flex",alignItems:"center",gap:.75,minHeight:28},children:[t.icon&&e(Ie,{sx:{display:"inline-flex",flexShrink:0,color:t.accentColor??"var(--orb-primary)"},children:t.icon}),f?c(Ie,{component:"form",onSubmit:g,sx:{display:"flex",alignItems:"center",gap:.5,flex:1,minWidth:0},children:[e(ze,{dense:true,autoFocus:true,value:m,onChange:x=>v(x.target.value),onKeyDown:x=>{x.key==="Escape"&&(x.preventDefault(),y());},inputProps:{"aria-label":d??p("kanban.bucket.rename")},error:!m.trim(),sx:{flex:1,minWidth:0}}),e(ae,{type:"submit",size:"small",tooltip:p("kanban.bucket.saveRename"),"aria-label":p("kanban.bucket.saveRename"),disabled:!m.trim(),children:e(qr,{size:14})}),e(ae,{size:"small",tooltip:p("kanban.bucket.cancelRename"),"aria-label":p("kanban.bucket.cancelRename"),onClick:y,children:e(jt,{size:14})})]}):e(L,{component:"div",sx:{fontSize:15,fontWeight:600,lineHeight:1.35,color:"text.primary"},children:t.title})]})}),!f&&c(ie,{direction:"row",spacing:.75,sx:{flexShrink:0},children:[e(xt,{size:"small",label:r,sx:{minWidth:24,justifyContent:"center",fontWeight:600}}),typeof t.limit=="number"&&e(xt,{size:"small",label:`${p("kanban.bucket.limit")} ${t.limit}`,color:r>t.limit?"warning":"default",variant:"outlined"}),l&&e(ae,{size:"small",tooltip:d??p("kanban.bucket.rename"),"aria-label":d??p("kanban.bucket.rename"),onClick:()=>{v(t.title),b(true);},sx:{width:26,height:26},children:e(Ac,{size:14})})]})]}),o&&e(L,{component:"div",sx:{fontSize:12,color:t.accentColor??"var(--orb-primary)",fontWeight:500},children:p("kanban.bucket.dropHere")}),e(Ie,{sx:{flex:1,height:0,minHeight:0,overflowY:"auto",overscrollBehavior:"contain",pr:.4,scrollbarGutter:"stable"},children:r>0?n:e(Ie,{sx:{minHeight:"100%",borderRadius:"var(--orb-r-container)",border:"1px dashed var(--orb-border)",bgcolor:"transparent",display:"grid",placeItems:"center",px:2,textAlign:"center"},children:e(L,{sx:{fontSize:13,color:"text.secondary"},children:a??t.emptyLabel??p("kanban.empty")})})})]})})};P();var sv={success:"success",warning:"warning",info:"info",error:"error"},lv={critical:"error",high:"warning",medium:"info",low:"success"},cv={default:"var(--orb-primary)",success:"var(--orb-primary)",warning:"var(--orb-accent)",info:"var(--orb-primary)",error:"var(--orb-err)"},dv=(t,r)=>{switch(t){case "critical":return r("kanban.priority.critical");case "high":return r("kanban.priority.high");case "medium":return r("kanban.priority.medium");case "low":return r("kanban.priority.low");default:return t}},pv=t=>t?t.split(/\s+/).map(r=>r.charAt(0).toUpperCase()).slice(0,2).join(""):"NA",vl=({card:t,bucket:r,dragging:o=false,overlay:n=false,onClick:a,sx:i})=>{let{t:s}=pe(),l=!!(a&&r),d=t.tone??(t.priority?lv[t.priority]:"default"),u=d==="default"?"primary":sv[d],p=cv[d],f=r?{card:t,bucket:r}:void 0;return e(Ae,{onClick:l?()=>f&&a?.(f):void 0,onKeyDown:l?b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),f&&a?.(f));}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,sx:[{position:"relative",minWidth:0,overflow:"hidden",p:1.5,pl:1.75,borderRadius:"var(--orb-r-container)",border:`1px solid ${rt(p,.24)}`,bgcolor:"var(--orb-canvas)",boxShadow:n?"var(--orb-shadow-3)":o?"none":"var(--orb-shadow-1)",transform:n?"rotate(1deg) scale(1.01)":"none",transition:"transform var(--orb-t-fast), box-shadow var(--orb-t-fast), border-color var(--orb-t-fast)",cursor:l?"pointer":"default",opacity:o?.5:1,"&::before":{content:'""',position:"absolute",inset:"0 auto 0 0",width:3,bgcolor:p},"&:hover":l?{transform:"translateY(-1px)",borderColor:rt(p,.48),boxShadow:"var(--orb-shadow-2)"}:void 0,"&:focus-visible":l?{outline:"2px solid var(--orb-focus-solid)",outlineOffset:2}:void 0},...Array.isArray(i)?i:i?[i]:[]],elevation:0,children:c(ie,{spacing:1.25,children:[c(Ie,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:1},children:[c(Ie,{sx:{minWidth:0,flex:1},children:[(t.kicker||r?.title)&&e(L,{component:"div",sx:{fontSize:11,fontWeight:500,color:"text.secondary",textTransform:"uppercase"},children:t.kicker??r?.title}),e(L,{component:"div",sx:{mt:.25,fontSize:14,fontWeight:600,lineHeight:1.4,color:"text.primary"},children:t.title})]}),t.priority&&e(xt,{size:"small",color:u,label:dv(t.priority,s),variant:d==="default"?"outlined":"filled",sx:{height:22,flexShrink:0,fontWeight:500}})]}),t.summary&&e(L,{component:"div",sx:{fontSize:13,fontWeight:300,color:"text.secondary",lineHeight:1.5},children:t.summary}),t.metrics&&t.metrics.length>0&&e(Ie,{sx:{display:"grid",gridTemplateColumns:`repeat(${Math.min(t.metrics.length,3)}, minmax(0, 1fr))`,gap:.75},children:t.metrics.slice(0,3).map(b=>c(Ie,{sx:{minWidth:0,borderRadius:"var(--orb-r)",px:1,py:.75,bgcolor:"var(--orb-surface)",border:"1px solid var(--orb-border)"},children:[e(L,{component:"div",noWrap:true,sx:{fontSize:11,fontWeight:500,color:"text.secondary",textTransform:"uppercase"},children:b.label}),e(L,{component:"div",noWrap:true,numeric:true,sx:{mt:.25,fontSize:13,fontWeight:600},children:b.value})]},b.id))}),typeof t.progress=="number"&&c(Ie,{children:[c(Ie,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:.5},children:[e(L,{sx:{fontSize:12,color:"text.secondary"},children:s("kanban.card.progress")}),c(L,{numeric:true,sx:{fontSize:12,fontWeight:600},children:[Math.round(t.progress),"%"]})]}),e(wd,{variant:"determinate",value:Math.max(0,Math.min(100,t.progress)),color:p,sx:{height:4,borderRadius:2}})]}),(t.tags?.length||t.assignee||t.dueDate||t.footer||l)&&c(ie,{spacing:.9,children:[t.tags&&t.tags.length>0&&e(Ie,{sx:{display:"flex",flexWrap:"wrap",gap:.75},children:t.tags.map(b=>e(xt,{size:"small",label:b.label,color:b.color??"default",variant:"outlined"},b.id))}),c(Ie,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,flexWrap:"wrap"},children:[c(Ie,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0},children:[t.assignee&&c(jsxRuntime.Fragment,{children:[e(Qa,{src:t.assignee.avatarSrc,sx:{width:28,height:28,fontSize:11},children:t.assignee.initials??pv(t.assignee.name)}),c(Ie,{sx:{minWidth:0},children:[e(L,{component:"div",sx:{fontSize:13,fontWeight:500,lineHeight:1.3},noWrap:true,children:t.assignee.name}),t.dueDate&&e(L,{component:"div",sx:{fontSize:11,color:"text.secondary",lineHeight:1.35},noWrap:true,children:t.dueDate})]})]}),!t.assignee&&t.dueDate&&e(L,{sx:{fontSize:12,color:"text.secondary"},children:t.dueDate})]}),l&&e(L,{sx:{fontSize:12,color:"var(--orb-link)",fontWeight:500,whiteSpace:"nowrap"},children:s("kanban.card.openDetail")})]}),t.footer]})]})})};var bu=(t,r)=>{let o=r.title.trim();return !r.id||!o||t.buckets.some(n=>n.id===r.id)?t:{buckets:[...t.buckets,{...r,title:o,cards:[]}]}},hu=(t,r,o)=>{let n=o.trim();if(!n)return t;let a=t.buckets.find(i=>i.id===r);return !a||a.title===n?t:{buckets:t.buckets.map(i=>i.id===r?{...i,title:n}:i)}},uv=(t,r)=>Number.isNaN(t)||t<0?0:t>r?r:t,vu=({buckets:t,cards:r})=>{let o=new Map;return r.forEach((n,a)=>{let i=o.get(n.bucketId)??[];i.push({card:n,sourceIndex:a}),o.set(n.bucketId,i);}),{buckets:t.map(n=>{let a=[...o.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}})}},_r=(t,r)=>{for(let o=0;o<t.buckets.length;o+=1){let n=t.buckets[o],a=n.cards.findIndex(i=>i.id===r);if(a>=0)return {card:n.cards[a],bucket:n,bucketIndex:o,cardIndex:a}}},Vi=(t,r)=>{let o=_r(t,r.cardId);if(!o)return t;let n=t.buckets.findIndex(u=>u.id===r.toBucketId);if(n<0)return t;let a=t.buckets.map(u=>({...u,cards:u.cards.map(p=>({...p}))})),i=a[o.bucketIndex],[s]=i.cards.splice(o.cardIndex,1);if(!s)return t;let l=a[n],d=uv(r.targetIndex??l.cards.length,l.cards.length);return l.cards.splice(d,0,{...s,bucketId:r.toBucketId}),{buckets:a.map(u=>({...u,cards:u.cards.map((p,f)=>({...p,bucketId:u.id,position:f}))}))}};P();var xl="kanban-card|",Sl="kanban-bucket|",xu=t=>`${xl}${t}`,wv=t=>`${Sl}${t}`,Wi=t=>t?.startsWith(xl)?t.slice(xl.length):void 0,Cu=t=>t?.startsWith(Sl)?t.slice(Sl.length):void 0,kv=({card:t,bucket:r,onCardClick:o})=>{let{setNodeRef:n,attributes:a,listeners:i,transform:s,transition:l,isDragging:d}=sortable.useSortable({id:xu(t.id)}),u={transform:s?`translate3d(${s.x}px, ${s.y}px, 0)`:void 0,transition:l,zIndex:d?2:1,touchAction:"none",cursor:d?"grabbing":"grab"};return e("div",{ref:n,style:u,...a,...i,children:e(vl,{card:t,bucket:r,dragging:d,onClick:o})})},Pv=({bucket:t,highlighted:r,bucketHeight:o,emptyBucketLabel:n,onBucketRename:a,onCardClick:i})=>{let{isOver:s,setNodeRef:l}=core.useDroppable({id:wv(t.id)});return e(Ie,{ref:l,sx:{minWidth:0,minHeight:0,height:o},children:e(fu,{bucket:t,cardCount:t.cards.length,highlighted:r||s,emptyLabel:n,height:o,onRename:a,children:e(sortable.SortableContext,{items:t.cards.map(d=>xu(d.id)),strategy:sortable.verticalListSortingStrategy,children:e(ie,{spacing:1,children:t.cards.map(d=>e(kv,{card:d,bucket:t,onCardClick:i},d.id))})})})})},Su=t=>String(t??"").toLocaleLowerCase(),Tv=(t,r)=>[t.id,t.title,t.summary,t.kicker,t.priority,t.tone,t.progress,t.dueDate,t.assignee?.id,t.assignee?.name,...t.tags?.flatMap(n=>[n.id,n.label])??[],...t.metrics?.flatMap(n=>[n.label,n.value])??[]].some(n=>Su(n).includes(r)),QA=({model:t,onCardMove:r,onCardClick:o,cardFilter:n,onBucketAdd:a,onBucketRename:i,addBucketLabel:s,minBucketWidth:l=320,bucketHeight:d,bucketMaxHeight:u,searchable:p=false,searchValue:f,defaultSearchValue:b="",onSearchValueChange:m,searchPlaceholder:v,emptyBucketLabel:y,sx:g})=>{let{t:x}=pe(),[h,C]=er.useState(null),[k,w]=er.useState(),[T,I]=er.useState(b),S=f??T,A=S.trim().toLocaleLowerCase(),R=d??u??560,M=er.useMemo(()=>({buckets:t.buckets.map(V=>{let z=n?V.cards.filter(q=>n(q,V)):V.cards;if(!A)return {...V,cards:z};let K=[V.id,V.title,V.description].some(q=>Su(q).includes(A));return {...V,cards:K?z:z.filter(q=>Tv(q,A))}})}),[n,t,A]),N=er.useMemo(()=>M.buckets.reduce((V,z)=>V+z.cards.length,0),[M]),E=er.useCallback(V=>{f===void 0&&I(V),m?.(V);},[m,f]),O=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:6}}),core.useSensor(core.TouchSensor,{activationConstraint:{delay:120,tolerance:8}})),F=er.useMemo(()=>h?_r(t,h):void 0,[h,t]),_=er.useCallback(()=>{C(null),w(void 0);},[]),B=er.useCallback(V=>{if(!V)return;let z=Wi(V);return z?_r(t,z)?.bucket.id:Cu(V)},[t]),Y=er.useCallback(V=>{C(Wi(String(V.active.id))??null);},[]),W=er.useCallback(V=>{w(B(V.over?String(V.over.id):void 0));},[B]),j=er.useCallback(V=>{let z=Wi(String(V.active.id)),K=V.over?String(V.over.id):void 0;if(!z||!K){_();return}let q=_r(t,z);if(!q){_();return}let fe=q.bucket.id,se=q.cardIndex,ue=Wi(K);if(ue){let ke=_r(t,ue);if(!ke){_();return}fe=ke.bucket.id,se=ke.cardIndex;}else {let ke=Cu(K),le=t.buckets.find(Ee=>Ee.id===ke);if(!ke||!le){_();return}fe=ke,se=le.cards.length;}if(q.bucket.id===fe&&q.cardIndex===se){_();return}let Se=Vi(t,{cardId:z,fromBucketId:q.bucket.id,toBucketId:fe,targetIndex:se}),$e=_r(Se,z);$e&&!($e.bucket.id===q.bucket.id&&$e.cardIndex===q.cardIndex)&&r?.({cardId:z,fromBucketId:q.bucket.id,toBucketId:$e.bucket.id,targetIndex:$e.cardIndex,card:$e.card,model:Se}),_();},[t,r,_]);return c(core.DndContext,{sensors:O,collisionDetection:core.closestCorners,onDragStart:Y,onDragOver:W,onDragEnd:j,onDragCancel:_,children:[c(Ie,{sx:{display:"flex",flexDirection:"column",minWidth:0,minHeight:0,height:"100%",overflow:"hidden"},children:[(p||a)&&c(Ie,{role:p?"search":void 0,sx:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:1.5,mb:1.25,minWidth:0},children:[p&&e(Ie,{sx:{width:"100%",maxWidth:360,flex:"1 1 240px"},children:e(ze,{dense:true,value:S,onChange:V=>E(V.target.value),placeholder:v??x("kanban.search.placeholder"),autoComplete:"off",sx:{"& .orb-inp":{paddingLeft:"38px",paddingRight:S?"42px":"12px"},"& .orb-inp-adornment-end":{pointerEvents:"auto"}},startAdornment:e(Hr,{size:16,"aria-hidden":"true"}),endAdornment:S?e(ae,{size:"small",tooltip:x("kanban.search.clear"),"aria-label":x("kanban.search.clear"),onClick:()=>E(""),sx:{width:26,height:26},children:e(jt,{size:15})}):void 0})}),c(Ie,{sx:{display:"flex",alignItems:"center",gap:1,ml:"auto"},children:[A&&e(L,{component:"div","aria-live":"polite",sx:{flexShrink:0,fontSize:12,fontWeight:500,color:"text.secondary"},children:N>0?x("kanban.search.results",{count:N}):x("kanban.search.noMatch")}),a&&e(we,{size:"small",variant:"secondary",startIcon:e(en,{size:15}),onClick:a,children:s??x("kanban.bucket.add")})]})]}),e(Ie,{sx:[{display:"grid",gridAutoFlow:"column",gridAutoColumns:`minmax(${l}px, ${Math.max(l,360)}px)`,gap:1.5,gridAutoRows:R==="100%"?"minmax(0, 1fr)":void 0,alignItems:"stretch",justifyContent:"start",flex:"1 1 0",height:"100%",minHeight:0,overflowX:"auto",overflowY:"hidden",overscrollBehavior:"contain",scrollbarGutter:"stable both-edges",pb:.5},...Array.isArray(g)?g:g?[g]:[]],children:M.buckets.map(V=>e(Pv,{bucket:V,highlighted:V.id===k,bucketHeight:R,emptyBucketLabel:A?x("kanban.search.noMatch"):y,onBucketRename:i?z=>i(V.id,z):void 0,onCardClick:o},V.id))})]}),e(core.DragOverlay,{children:F?e(Ie,{sx:{width:Math.max(l-24,260)},children:e(vl,{card:F.card,bucket:F.bucket,overlay:true})}):null})]})};var Rv=({initialModel:t,initialBuckets:r,initialCards:o})=>t||vu({buckets:r??[],cards:o??[]}),oE=t=>{let{onCardMove:r,onCardClick:o}=t,[n,a]=er.useState(()=>Rv(t)),i=er.useCallback(b=>{a(m=>typeof b=="function"?b(m):b);},[]),s=er.useCallback(b=>_r(n,b),[n]),l=er.useCallback((b,m,v)=>{let y=_r(n,b);if(!y)return;let g=Vi(n,{cardId:b,fromBucketId:y.bucket.id,toBucketId:m,targetIndex:v}),x=_r(g,b);if(!x||x.bucket.id===y.bucket.id&&x.cardIndex===y.cardIndex)return;a(g);let h={cardId:b,fromBucketId:y.bucket.id,toBucketId:x.bucket.id,targetIndex:x.cardIndex,card:x.card,model:g};return r?.(h),h},[n,r]),d=er.useCallback((b,m)=>{a(v=>({buckets:v.buckets.map(y=>({...y,cards:y.cards.map(g=>g.id!==b?g:typeof m=="function"?m(g):{...g,...m})}))}));},[]),u=er.useCallback(b=>{let m=bu(n,b);return m===n?false:(a(m),true)},[n]),p=er.useCallback((b,m)=>{let v=hu(n,b,m);return v===n?false:(a(v),true)},[n]),f=er.useMemo(()=>({model:n,onCardMove:b=>{l(b.cardId,b.toBucketId,b.targetIndex);},onCardClick:o}),[n,l,o]);return {model:n,actions:{replaceModel:i,moveCard:l,updateCard:d,addBucket:u,renameBucket:p,getCard:s},boardProps:f}};function Sn({onTextUpdate:t,onComplete:r,onError:o,wsUrl:n="ws://localhost:8765",silenceThresholdMs:a=2e3,minVolumeRms:i=.015}){let[s,l]=er.useState(false),d=er.useRef(null),u=er.useRef(null),p=er.useRef(null),f=er.useRef(null),b=er.useRef(null),m=er.useRef(0),v=er.useRef(false),y=er.useRef(false),g=er.useCallback(()=>{d.current&&(d.current.close(),d.current=null),f.current&&(f.current.disconnect(),f.current=null),b.current&&(b.current.disconnect(),b.current=null),u.current&&(u.current.getTracks().forEach(C=>C.stop()),u.current=null),p.current&&(p.current.close(),p.current=null),y.current=false,l(false);},[]),x=er.useCallback(()=>{v.current||(v.current=true,d.current?.readyState===WebSocket.OPEN&&d.current.send(JSON.stringify({type:"stop"})),setTimeout(g,500));},[g]),h=er.useCallback(async()=>{if(!(s||y.current)){y.current=true,v.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);d.current=k,k.onopen=()=>{l(!0),y.current=!1;},k.onmessage=A=>{try{let R=JSON.parse(A.data);if(R.type==="recognition")R.is_final?r(R.text):t?.(R.text);else if(R.type==="error"){let M=R.message||"Voice recognition error";o?.(M),x();}}catch{o?.("Failed to parse voice message");}},k.onerror=()=>{o?.("Voice service connection failed"),g();},k.onclose=()=>{g();};let w=window.AudioContext||window.webkitAudioContext;if(!w)throw new Error("AudioContext is not supported in this browser");let T=new w({sampleRate:16e3});p.current=T;let I=T.createMediaStreamSource(C);b.current=I;let S=T.createScriptProcessor(4096,1,1);f.current=S,S.onaudioprocess=A=>{if(d.current?.readyState!==WebSocket.OPEN)return;let R=A.inputBuffer.getChannelData(0),M=0;for(let O=0;O<R.length;O+=1)M+=R[O]*R[O];if(Math.sqrt(M/R.length)>i)m.current=Date.now();else if(Date.now()-m.current>a&&!v.current){x();return}let E=new Int16Array(R.length);for(let O=0;O<R.length;O+=1){let F=Math.max(-1,Math.min(1,R[O]));E[O]=F<0?F*32768:F*32767;}d.current.send(E.buffer);},I.connect(S),S.connect(T.destination);}catch{o?.("Cannot access microphone"),g();}}},[g,s,i,r,o,t,a,x,n]);return er.useEffect(()=>g,[g]),{isRecording:s,startRecording:h,stopRecording:x}}P();var Ev=["en","zh","fr","de","ja","ko"],ku={en:"EN",zh:"\u4E2D\u6587",fr:"FR",de:"DE",ja:"\u65E5\u672C\u8A9E",ko:"\uD55C\uAD6D\uC5B4"},kl=({searchPlaceholder:t,onSearch:r,onSearchAdd:o,onOpenPanel:n,panelOpen:a=false,maxWidth:i=540,sx:s})=>{let{t:l}=pe(),[d,u]=er.useState(""),p=er.useCallback((x=d)=>{let h=x.trim();h&&(u(""),r?.(h));},[r,d]),f=x=>{x.preventDefault(),p();},{isRecording:b,startRecording:m,stopRecording:v}=Sn({onTextUpdate:u,onComplete:x=>{u(x),p(x);},onError:x=>{console.error("Header voice input error:",x);}}),y=er.useCallback(async()=>{if(b){v();return}await m();},[b,m,v]),g=t||l("header.searchPlaceholder");return e("form",{className:"orb-app-header-search",onSubmit:f,style:{width:"100%",maxWidth:typeof i=="number"?`${i}px`:i,...s},children:c("div",{className:"orb-inp-adornment-wrap orb-app-header-search-shell",style:{background:"var(--orb-surface)",border:"1px solid var(--orb-border)",borderRadius:999,paddingRight:4},children:[e("div",{className:"orb-inp-adornment",children:e(ae,{className:"orb-app-header-ai-action",size:"small",onClick:o,tooltip:l("header.searchAddFeature"),children:e(Tt,{name:"add",size:16})})}),e("input",{className:"orb-inp orb-inp-dense orb-app-header-ai-input",value:d,onChange:x=>u(x.target.value),placeholder:g,style:{border:"none",background:"transparent",flex:1,minWidth:0}}),c("div",{className:"orb-inp-adornment orb-inp-adornment-end",children:[n&&!a&&e(ae,{className:"orb-app-header-ai-action",size:"small","aria-label":l("header.searchOpenPanel"),tooltip:l("header.searchOpenPanel"),onClick:n,children:e(Tt,{name:"message",size:16})}),e(ae,{className:"orb-app-header-ai-action",size:"small",onClick:()=>{y();},tooltip:l(b?"header.searchStopVoice":"header.searchStartVoice"),sx:{color:b?"var(--orb-err)":void 0},children:e(Tt,{name:"microphone",size:16})})]})]})})},$i=({appTitle:t,logo:r,onToggleMode:o,locale:n,localeLabel:a,localeOptions:i,onLocaleChange:s,searchPlaceholder:l,showSearch:d=false,onSearch:u,onSearchAdd:p,onOpenPanel:f,panelOpen:b,user:m,onUserRefresh:v,onUserSetting:y,onUserLogout:g,userMenuItems:x,leftSlot:h,rightSlot:C})=>{let{t:k,locale:w}=pe(),T=Cr(),I=n||w,S=a||ku[I],A=i||Ev,R=T==="dark"?e(Gc,{size:15}):e(Xc,{size:15}),M=k(T==="dark"?"header.theme.dark":"header.theme.light"),N=[...v?[{key:"refresh",label:k("header.menu.refresh"),icon:e(Ba,{size:15}),onClick:v}]:[],...y?[{key:"settings",label:k("header.menu.setting"),icon:e(tn,{size:16}),onClick:y}]:[],...g?[{key:"logout",label:k("header.menu.logout"),icon:e(Vc,{size:16}),onClick:g}]:[]],E=x||N,O=A.map(F=>({label:ku[F],onClick:()=>{s?.(F),window.requestAnimationFrame(()=>{document.activeElement instanceof HTMLElement&&document.activeElement.blur();});},disabled:F===I}));return c("header",{className:"orb-app-header",children:[c("div",{className:"orb-app-header-brand",children:[h,r===null?null:r||e("div",{className:"orb-app-header-default-logo","aria-label":"ORBCAFE",children:e(Tt,{name:"product",size:20})}),t&&e(L,{variant:"h4",sx:{fontWeight:700},children:t})]}),e("div",{className:"orb-app-header-center",children:d&&e(kl,{searchPlaceholder:l,onSearch:u,onSearchAdd:p,onOpenPanel:f,panelOpen:b})}),c("div",{className:"orb-app-header-actions",children:[c("div",{className:"orb-app-header-utilities",children:[s?e(Qt,{triggerLabel:S,trigger:c("button",{type:"button",className:"orb-icon-btn orb-app-header-locale",children:[e(zn,{size:15}),e("span",{className:"orb-label",children:S})]}),items:O,align:"end"}):c("div",{className:"orb-app-header-locale","aria-label":S,children:[e(zn,{size:15}),e("span",{className:"orb-label",children:S})]}),e(ae,{className:"orb-app-header-theme",size:"small",onClick:o,tooltip:M,children:R})]}),m&&e("span",{className:"orb-app-header-divider","aria-hidden":"true"}),m&&e(Qt,{triggerLabel:m.name,trigger:c("button",{type:"button",className:"orb-app-header-user-trigger",children:[c("span",{className:"orb-app-header-user-copy",children:[e(L,{variant:"body2",className:"orb-app-header-user-name",children:m.name}),m.subtitle&&e(L,{variant:"caption",muted:true,className:"orb-app-header-user-subtitle",title:m.subtitle,children:m.subtitle})]}),e(rn,{src:m.avatarSrc,alt:m.name,size:32,children:m.avatarText||m.name.slice(0,1).toUpperCase()})]}),items:E.map(F=>({label:F.label,onClick:F.onClick,disabled:F.disabled,icon:F.icon})),align:"end"}),C]})]})};var Pu=({menuData:t=[],initialNavigationCollapsed:r=false,initialNavigationMode:o="fixed",enableNavigationPinning:n,navigationPinStorageKey:a,pinnedNavigationItemIds:i,defaultPinnedNavigationItemIds:s,onPinnedNavigationItemIdsChange:l,pinnedNavigationSectionTitle:d}={})=>{let{navigationIslandProps:u}=bd({initialCollapsed:r,initialDisplayMode:o,content:t,enablePinning:n,pinStorageKey:a,pinnedItemIds:i,defaultPinnedItemIds:s,onPinnedItemIdsChange:l,pinnedSectionTitle:d}),[p,f]=er.useState(900);er.useEffect(()=>{let m=()=>f(window.innerHeight);return m(),window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[]);let b=er.useMemo(()=>Math.max(280,p-100),[p]);return {navigationIslandProps:u,navigationMaxHeight:b}};P();var Lr=12,Iu=56,Mu=234,Hv="orbcafe:page-layout-locale",Ru=["en","zh","fr","de","ja","ko"],zv=t=>encodeURIComponent(t.trim().toLowerCase()).replace(/%/g,"").replace(/[^a-z0-9._~-]+/g,"-")||"app",_i=(t,r)=>`orbcafe:page-layout:${zv(t)}:${r}`,Vv=t=>`orbcafe:page-layout:${t.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-")||"app"}:pinned-navigation-items`,Wv=t=>t==="system"?"dark":t==="dark"?"light":"system",Gi=(t,r,o)=>Math.min(Math.max(t,r),Math.max(r,o)),$v=t=>t instanceof HTMLElement?!!t.closest('button,input,a,textarea,select,[role="button"],[contenteditable="true"]'):false,TE=({appId:t,appTitle:r,menuData:o=[],children:n,showNavigation:a=true,locale:i="en",localeLabel:s,localeOptions:l,onLocaleChange:d,mode:u,defaultMode:p="system",onModeChange:f,user:b,onUserRefresh:m,onUserSetting:v,onUserLogout:y,userMenuItems:g,logo:x,searchPlaceholder:h,searchPlacement:C="hidden",floatingSearchSx:k,onSearch:w,onSearchAdd:T,onOpenPanel:I,panelOpen:S,rightHeaderSlot:A,leftHeaderSlot:R,contentSx:M,navigationVariant:N="classic",navigationMode:E,defaultNavigationMode:O="fixed",onNavigationModeChange:F,showNavigationModeToggle:_=true,enableNavigationPinning:B=true,navigationPinStorageKey:Y,pinnedNavigationItemIds:W,defaultPinnedNavigationItemIds:j,onPinnedNavigationItemIdsChange:V,pinnedNavigationSectionTitle:z})=>{let K=t?_i(t,"mode"):"orbcafe:page-layout-mode",q=t?_i(t,"locale"):Hv,fe=t?_i(t,"navigation-mode"):"orbcafe:page-layout-navigation-mode",[se,ue]=er.useState(p),[Se,$e]=er.useState("light"),[ke,le]=er.useState(false),[Ee,Me]=er.useState(i),[Pe,Ve]=er.useState(false),[tt,nt]=er.useState(false),[it,X]=er.useState(O),[De,ye]=er.useState({x:Lr,y:Lr}),[Be,at]=er.useState("left"),[Ze,St]=er.useState(false),Mt=er.useRef(null),Ot=er.useRef(null),At=u!==void 0,re=u??se,Ke=d!==void 0,Fe=Ke?i:Ee,ce=l?.join("|")??"",ve=E!==void 0,te=E??it,he=te==="floating",Ne=N==="v2"?Xs:dd,Je=C==="header",st=re==="system"?ke?Se:"light":re;er.useEffect(()=>{if(!At)try{let be=window.localStorage.getItem(K);(be==="light"||be==="dark"||be==="system")&&ue(be);}catch{}le(true);let $=window.matchMedia("(prefers-color-scheme: dark)"),Q=()=>{$e($.matches?"dark":"light");};return Q(),$.addEventListener("change",Q),()=>$.removeEventListener("change",Q)},[At,K]),er.useEffect(()=>{if(!(At||!ke))try{window.localStorage.setItem(K,re);}catch{}},[ke,At,re,K]),er.useEffect(()=>{if(Ke){Ve(true);return}try{let $=window.localStorage.getItem(q),Q=l??Ru;$&&Ru.includes($)&&Q.includes($)&&Me($);}catch{}finally{Ve(true);}},[Ke,ce,q]),er.useEffect(()=>{if(!(Ke||!Pe))try{window.localStorage.setItem(q,Fe);}catch{}},[Fe,Ke,Pe,q]),er.useEffect(()=>{if(ve){nt(true);return}try{let $=window.localStorage.getItem(fe);($==="fixed"||$==="floating")&&X($);}catch{}finally{nt(true);}},[ve]),er.useEffect(()=>{if(tt)try{window.localStorage.setItem(fe,te);}catch{}},[te,tt]),er.useEffect(()=>{st==="dark"?(document.documentElement.classList.add("dark"),document.documentElement.style.colorScheme="dark"):(document.documentElement.classList.remove("dark"),document.documentElement.style.colorScheme="light");},[st]);let pt=er.useCallback($=>{ve||X($),F?.($);},[ve,F]),Bt=er.useCallback($=>{At||ue($),f?.($);},[At,f]),Xt=er.useCallback($=>{Ke||Me($),d?.($);},[Ke,d]),{navigationIslandProps:Vt,navigationMaxHeight:wt}=Pu({menuData:o,initialNavigationCollapsed:false,initialNavigationMode:te,enableNavigationPinning:B,navigationPinStorageKey:Y??(t?_i(t,"pinned-navigation-items"):Vv(r)),pinnedNavigationItemIds:W,defaultPinnedNavigationItemIds:j,onPinnedNavigationItemIdsChange:V,pinnedNavigationSectionTitle:z}),Wt=Vt.collapsed,ht=er.useCallback($=>{let Q=Mt.current,be=Q?.parentElement;if(!Q||!be)return $;let Ce=be.getBoundingClientRect(),Le=Q.getBoundingClientRect(),_e=Lr,qe=Lr,je=Math.max(_e,Ce.width-Le.width-Lr),mt=Math.max(qe,Ce.height-Le.height-Lr);return {x:Gi($.x,_e,je),y:Gi($.y,qe,mt)}},[]),Nt=er.useCallback($=>{let Q=Mt.current,be=Q?.parentElement;if(!Q||!be)return $;let Ce=be.getBoundingClientRect(),Le=Q.getBoundingClientRect(),_e=Lr,qe=Lr,je=Math.max(_e,Ce.width-Le.width-Lr),mt=Math.max(qe,Ce.height-Le.height-Lr),ft={x:Gi($.x,_e,je),y:Gi($.y,qe,mt)},yt=[{distance:Math.abs(ft.x-_e),position:{x:_e,y:ft.y}},{distance:Math.abs(ft.x-je),position:{x:je,y:ft.y}},{distance:Math.abs(ft.y-qe),position:{x:ft.x,y:qe}},{distance:Math.abs(ft.y-mt),position:{x:ft.x,y:mt}}].reduce((H,J)=>J.distance<H.distance?J:H).position;return at(yt.x>=(_e+je)/2?"right":"left"),yt},[]),lt=er.useMemo(()=>{if(!he||Ze)return De.x;if(Be==="right"){let be=Mt.current?.parentElement?.getBoundingClientRect().width,Ce=Wt?Iu:Mu;return be?Math.max(Lr,be-Ce-Lr):Wt?De.x:De.x-(Mu-Iu)}return De.x},[Be,De.x,Ze,he,Wt]),Ft=er.useCallback($=>{if(!he||!Wt||$v($.target))return;$.preventDefault(),$.currentTarget.setPointerCapture($.pointerId);let Q=ht({x:lt,y:De.y});at("left"),ye(Q),Ot.current={pointerId:$.pointerId,startClientX:$.clientX,startClientY:$.clientY,startX:Q.x,startY:Q.y,currentX:Q.x,currentY:Q.y},St(true);},[ht,lt,De.y,he,Wt]),Yt=er.useCallback($=>{let Q=Ot.current;if(!Q||Q.pointerId!==$.pointerId)return;let be=ht({x:Q.startX+$.clientX-Q.startClientX,y:Q.startY+$.clientY-Q.startClientY});Q.currentX=be.x,Q.currentY=be.y,ye(be);},[ht]),Z=er.useCallback($=>{let Q=Ot.current;if(!(!Q||Q.pointerId!==$.pointerId)){try{$.currentTarget.releasePointerCapture($.pointerId);}catch{}Ot.current=null,ye(Nt({x:Q.currentX,y:Q.currentY})),St(false);}},[Nt]);return er.useEffect(()=>{if(!he)return;let $=()=>{ye(Ce=>ht(Ce));},Q=window.requestAnimationFrame($),be=window.setTimeout($,430);return ()=>{window.cancelAnimationFrame(Q),window.clearTimeout(be);}},[ht,he,Wt,wt]),e(Fn,{mode:re,children:e(Ga,{locale:Fe,children:c("div",{className:"orb-root",style:{minHeight:"100vh",width:"100%",display:"flex",flexDirection:"column",overflowX:"hidden",background:"var(--orb-canvas)"},children:[e($i,{appTitle:r,logo:x,mode:re,onToggleMode:()=>Bt(Wv(re)),locale:Fe,localeLabel:Ke||Fe===i?s:void 0,localeOptions:l,onLocaleChange:Xt,user:b,onUserRefresh:m,onUserSetting:v,onUserLogout:y,userMenuItems:g,searchPlaceholder:h,showSearch:Je,onSearch:w,onSearchAdd:T,onOpenPanel:I,panelOpen:S,leftSlot:R,rightSlot:A}),C==="floating"&&e("div",{className:"orb-float-search",style:k,children:e(kl,{searchPlaceholder:h,onSearch:w,onSearchAdd:T,onOpenPanel:I,panelOpen:S,maxWidth:"100%"})}),c("div",{style:{flex:1,minHeight:0,minWidth:0,display:"flex",overflowX:"hidden",position:"relative"},children:[a&&!he&&e("div",{style:{paddingTop:12,paddingBottom:12,paddingLeft:12,paddingRight:Wt?4:12,display:"flex",alignItems:"flex-start",flexShrink:0},children:e(Ne,{...Vt,maxHeight:wt,colorMode:st,displayMode:te,onDisplayModeChange:pt,showDisplayModeToggle:_&&Wt})}),a&&he&&e("div",{ref:Mt,onPointerDown:Ft,onPointerMove:Yt,onPointerUp:Z,onPointerCancel:Z,style:{position:"absolute",top:De.y,left:lt,zIndex:1205,display:"flex",alignItems:"flex-start",cursor:Wt?Ze?"grabbing":"grab":"default",touchAction:Wt?"none":"auto",userSelect:Ze?"none":void 0,transition:Ze?"none":"left 180ms ease-out, top 180ms ease-out"},children:e(Ne,{...Vt,maxHeight:wt,colorMode:st,displayMode:te,onDisplayModeChange:pt,showDisplayModeToggle:_&&Wt})}),e("div",{style:{flex:1,minWidth:0,minHeight:0,overflow:"auto",paddingTop:12,paddingBottom:12,paddingRight:12,paddingLeft:a&&!he&&Wt?4:12,...M},children:n})]})]})})})};var Ui="(blank)",Du="Result",Nu="Grand Total",Au={sum:"Sum",count:"Count",avg:"Average",min:"Min",max:"Max"},Eu=["sum","count","avg","min","max"];var Lu=["palette","rows","columns","filters","values"];var Ou=t=>Lu.includes(t),Fu=t=>t==="rows"||t==="columns"||t==="filters",Ki=t=>{let r=t.split("|");return r.length===2&&r[0]==="container"&&Ou(r[1])?{kind:"container",zone:r[1]}:r.length===3&&r[0]==="item"&&Ou(r[1])&&r[2]?{kind:"item",zone:r[1],key:r[2]}:null},po=t=>t==null||t===""?Ui:t instanceof Date?t.toISOString().slice(0,10):String(t),_o=t=>JSON.stringify(t),Bu=(t,r)=>{let o=t.join(""),n=r.join("");return o.localeCompare(n,void 0,{sensitivity:"base"})},_v=t=>{if(typeof t=="number"&&Number.isFinite(t))return t;if(typeof t=="string"&&t.trim()!==""){let r=Number(t);return Number.isFinite(r)?r:null}return null},wn=(t,r,o)=>{if(o==="count")return t.length;let n=t.map(a=>_v(a[r])).filter(a=>a!==null);return n.length===0?0:o==="sum"?n.reduce((a,i)=>a+i,0):o==="avg"?n.reduce((a,i)=>a+i,0)/n.length:o==="min"?Math.min(...n):Math.max(...n)},lr=(t,r)=>{if(!t||t.length===0)return [];let o=new Set,n=[];return t.forEach(a=>{!r.has(a)||o.has(a)||(o.add(a),n.push(a));}),n},uo=(t,r)=>t.length!==r.length?false:t.every((o,n)=>o===r[n]),Hu=(t,r)=>{let o=Object.keys(t),n=Object.keys(r);return o.length!==n.length?false:o.every(a=>{let i=t[a]??[],s=r[a]??[];return uo(i,s)})},qi=(t,r)=>t.length!==r.length?false:t.every((o,n)=>{let a=r[n];return o.tokenId===a.tokenId&&o.fieldId===a.fieldId&&o.aggregation===a.aggregation}),Pl=t=>!t?.aggregations||t.aggregations.length===0?Eu:t.aggregations,vr=(t,r)=>{let o=Pl(r);return t&&o.includes(t)?t:r?.type==="number"&&o.includes("sum")?"sum":o.includes("count")?"count":o[0]},ua=(t,r,o)=>{let n=o.get(r.fieldId);return n?.formatValue?n.formatValue(t):r.aggregation==="count"?Math.round(t).toLocaleString():t.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:2})};P();var Vu=({options:t,selectedValues:r,onChange:o,minWidth:n=96})=>{let{t:a}=pe(),[i,s]=er.useState(""),[l,d]=er.useState(null),u=er.useMemo(()=>{let m=i.trim().toLowerCase();return m?t.filter(v=>v.toLowerCase().includes(m)):t},[t,i]),p=t.length>0&&r.length===t.length,f=t.length===0?a("pivot.filter.na"):r.length===0?a("common.none"):p?a("common.all"):`${r.length}/${t.length}`,b=m=>{o(r.includes(m)?r.filter(v=>v!==m):[...r,m]);};return c("div",{sx:{minWidth:n},onClick:m=>m.stopPropagation(),onMouseDown:m=>m.stopPropagation(),children:[e(we,{variant:"outlined",size:"small",onClick:m=>d(m.currentTarget),sx:{minWidth:n,height:26,px:1,py:.35,fontSize:"0.72rem",justifyContent:"space-between"},children:f}),e(Qt,{anchorEl:l,open:!!l,onClose:()=>d(null),PaperProps:{sx:{width:Math.max(n,220),maxHeight:320,overflowY:"auto",p:.5}},children:c("div",{onClick:m=>m.stopPropagation(),sx:{display:"grid",gap:.4},children:[e(ze,{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(),o(p?[]:t);},sx:{minWidth:"auto",px:0,py:.2,fontSize:"0.76rem",fontWeight:700,textTransform:"none"},children:a(p?"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 v=r.includes(m);return c("div",{role:"option","aria-selected":v,tabIndex:0,className:`orb-menu-item ${v?"orb-selected":""}`,onClick:()=>b(m),onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),b(m));},sx:{display:"flex",alignItems:"center",fontSize:"0.75rem",py:.4},children:[e(It,{size:"small",checked:v,inputProps:{tabIndex:-1},sx:{p:.5,mr:.5,pointerEvents:"none"}}),e("span",{children:m})]},m)})]})})]})};P();var kn=({size:t=18,subtle:r=false})=>{let o=Math.max(2,Math.round(t/6));return e(Ie,{"aria-hidden":"true",sx:{display:"grid",gridTemplateColumns:`repeat(2, ${o}px)`,gridAutoRows:`${o}px`,gap:`${Math.max(2,Math.round(o/1.5))}px`,placeItems:"center",width:t,height:t,flexShrink:0,color:r?"var(--orb-muted)":"var(--orb-primary)"},children:Array.from({length:6},(n,a)=>e(Ie,{sx:{width:o,height:o,borderRadius:999,bgcolor:"currentColor"}},a))})};P();var Tl=({label:t,subtitle:r,isDragging:o,dragRef:n,listeners:a,attributes:i,style:s})=>e(Ae,{ref:n,...a,...i,sx:{p:1,borderRadius:"var(--orb-r-container)",border:"1px solid",borderColor:"var(--orb-border)",bgcolor:"var(--orb-canvas)",boxShadow:"var(--orb-shadow-1)",touchAction:"none",transition:"border-color 140ms ease, background-color 140ms ease, transform 140ms ease","&:hover":{borderColor:"var(--orb-p200)",bgcolor:"var(--orb-p50)",transform:"translateY(-1px)"}},style:{...s,opacity:o?.3:1,cursor:o?"grabbing":"grab"},children:c("div",{sx:{display:"flex",alignItems:"center",gap:.9},children:[e("div",{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:"var(--orb-r)",bgcolor:"var(--orb-p50)",border:"1px solid var(--orb-p100)"},children:e(kn,{size:13,subtle:true})}),c("div",{sx:{minWidth:0,display:"flex",flexDirection:"column",gap:.15},children:[e(L,{component:"div",sx:{fontSize:"0.84rem",fontWeight:700,lineHeight:1.2,color:"var(--orb-fg-strong)"},children:t}),r&&e(L,{component:"div",sx:{fontSize:"0.73rem",fontWeight:400,color:"var(--orb-fg)",lineHeight:1.2},children:r})]})]})}),Wu=({id:t,label:r,subtitle:o})=>{let{setNodeRef:n,listeners:a,attributes:i,isDragging:s}=core.useDraggable({id:t});return e(Tl,{label:r,subtitle:o,isDragging:s,dragRef:n,listeners:a,attributes:i})};P();var Pn=({zone:t,title:r,hint:o,icon:n,children:a,itemCount:i,onClear:s})=>{let l=`container|${t}`,{isOver:d,setNodeRef:u}=core.useDroppable({id:l}),{t:p}=pe();return c(Ae,{ref:u,sx:f=>({p:1.1,borderRadius:"var(--orb-r-container)",border:"1px dashed",borderColor:d?"var(--orb-primary)":"var(--orb-p200)",bgcolor:d?"var(--orb-p100)":f.palette.mode==="dark"?"var(--orb-surface-2)":"var(--orb-p50)",transition:"border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease",boxShadow:d?"0 0 0 3px var(--orb-focus-ring)":"none",minHeight:120,display:"flex",flexDirection:"column"}),children:[c("div",{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[c("div",{sx:{display:"flex",alignItems:"center",gap:.8},children:[n,e(L,{component:"div",sx:{fontSize:"0.8rem",fontWeight:700,letterSpacing:.1,color:"var(--orb-fg-strong)"},children:r}),c(L,{component:"div",sx:{fontSize:"0.73rem",fontWeight:500,color:"var(--orb-fg)"},children:["(",i,")"]})]}),i>0&&s&&e(ct,{title:p("pivot.clearArea"),children:e(ae,{size:"small",onClick:s,sx:{width:24,height:24,p:0},children:e(rp,{size:13})})})]}),e(L,{component:"div",sx:{mt:.5,mb:.9,fontSize:"0.72rem",fontWeight:400,color:"var(--orb-fg)"},children:o}),e("div",{sx:{flex:1},children:a})]})};P();var $u={xs:1.2,md:1.6},Tn=({title:t,subtitle:r,collapsed:o,onToggleCollapse:n,expandAriaLabel:a,collapseAriaLabel:i,children:s,bodySx:l,unmountOnExit:d=false,headerActions:u})=>c(Ae,{sx:p=>({borderRadius:"var(--orb-r-container)",border:`1px solid ${p.palette.divider}`,overflow:"hidden",bgcolor:"var(--orb-surface)",boxShadow:"var(--orb-shadow-1)"}),children:[c("div",{sx:p=>({px:$u,py:1.15,display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,bgcolor:"var(--orb-canvas)",borderBottom:o?"none":`1px solid ${p.palette.divider}`}),children:[c("div",{sx:{minWidth:0,flex:1},children:[e(L,{component:"div",sx:{fontSize:"0.92rem",fontWeight:700,color:"var(--orb-fg-strong)"},children:t}),e(L,{component:"div",sx:{fontSize:"0.75rem",fontWeight:400,color:"var(--orb-fg)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r})]}),c("div",{sx:{display:"flex",alignItems:"center",gap:.75,flexShrink:0},children:[u,e(ae,{size:"small","aria-label":o?a:i,onClick:n,sx:p=>({border:`1px solid ${p.palette.divider}`,bgcolor:"var(--orb-canvas)",color:"var(--orb-primary)",width:24,height:24,padding:0,borderRadius:999,flexShrink:0,"&:hover":{bgcolor:"var(--orb-p50)",borderColor:"var(--orb-p200)"}}),children:e(ai,{size:13,sx:{transition:"transform 220ms cubic-bezier(0.2, 0, 0, 1)",transform:o?"rotate(180deg)":"rotate(0deg)"}})})]})]}),e(nn,{in:!o,timeout:260,easing:"cubic-bezier(0.2, 0, 0, 1)",unmountOnExit:d,children:e("div",{sx:[{px:$u,py:{xs:1.2,md:1.6}},...Array.isArray(l)?l:l?[l]:[]],children:s})})]});P();var Xi=({label:t,caption:r,onRemove:o,trailing:n,isDragging:a,dragRef:i,listeners:s,attributes:l,style:d})=>e(Ae,{ref:i,style:d,sx:{p:1,borderRadius:"var(--orb-r-container)",border:"1px solid",borderColor:"var(--orb-border)",bgcolor:"var(--orb-canvas)",boxShadow:"var(--orb-shadow-1)",touchAction:"none",opacity:a?0:1,transition:"border-color 140ms ease, background-color 140ms ease, transform 140ms ease","&:hover":{borderColor:"var(--orb-p200)",bgcolor:"var(--orb-p50)"}},children:c("div",{sx:{display:"flex",alignItems:"center",gap:.9},children:[e("div",{...l,...s,sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:"var(--orb-r)",bgcolor:"var(--orb-p50)",border:"1px solid var(--orb-p100)",cursor:"grab"},children:e(kn,{size:13,subtle:true})}),c("div",{sx:{minWidth:0,flex:1,display:"flex",flexDirection:"column",gap:.15},children:[e(L,{component:"div",sx:{fontSize:"0.82rem",fontWeight:700,lineHeight:1.2,color:"var(--orb-fg-strong)"},children:t}),r&&e(L,{component:"div",sx:{fontSize:"0.72rem",fontWeight:400,color:"var(--orb-fg)",lineHeight:1.2},children:r})]}),n,o&&e(ae,{size:"small",onClick:u=>{u.stopPropagation(),o();},sx:{width:24,height:24,p:0},children:e(wo,{size:13})})]})}),ma=({id:t,label:r,caption:o,onRemove:n,trailing:a})=>{let{setNodeRef:i,attributes:s,listeners:l,transform:d,transition:u,isDragging:p}=sortable.useSortable({id:t}),f={transform:d?`translate3d(${d.x}px, ${d.y}px, 0)`:void 0,transition:u,zIndex:p?999:"auto"};return e(Xi,{label:r,caption:o,onRemove:n,trailing:a,isDragging:p,dragRef:i,listeners:l,attributes:s,style:f})};P();var ji={rows:e(bp,{size:16,sx:{color:"var(--orb-primary)"}}),columns:e(ln,{size:16,sx:{color:"var(--orb-primary)"}}),filters:e(Qd,{size:16,sx:{color:"var(--orb-primary)"}}),values:e(sn,{size:16,sx:{color:"var(--orb-accent)"}})},_u=({isConfiguratorCollapsed:t,onToggleCollapse:r,availableFields:o,fieldMap:n,filterFields:a,columnFields:i,rowFields:s,valueFields:l,clearZone:d,removeFieldFromZone:u,getFilterSelectionSummary:p,renderDimensionFilterSelect:f,renderAggregationSelect:b,getAggregationLabel:m})=>{let{t:v}=pe(),y=[`${v("pivot.zone.rows")} ${s.length}`,`${v("pivot.zone.columns")} ${i.length}`,`${v("pivot.zone.filters")} ${a.length}`,`${v("pivot.zone.values")} ${l.length}`].join(" \xB7 ");return e(Tn,{title:v("pivot.config.title"),subtitle:y,collapsed:t,onToggleCollapse:r,expandAriaLabel:v("pivot.collapse.ariaExpand"),collapseAriaLabel:v("pivot.collapse.ariaCollapse"),unmountOnExit:true,children:c("div",{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",lg:"260px 1fr"},gap:2},children:[e(Pn,{zone:"palette",title:v("pivot.fieldList"),hint:v("pivot.availableDimensions"),itemCount:o.length,icon:e(kn,{size:18,subtle:true}),children:c(ie,{spacing:.8,sx:{maxHeight:400,overflowY:"auto",pr:.5},children:[o.length===0&&e(L,{component:"div",sx:{fontSize:"0.74rem",fontWeight:400,color:"var(--orb-fg)",py:1},children:v("pivot.allFieldsInUse")}),o.map(g=>e(Wu,{id:`item|palette|${g.id}`,label:g.label,subtitle:g.type??"string"},g.id))]})}),c(ie,{spacing:2,children:[c("div",{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[e(Pn,{zone:"filters",title:v("pivot.zone.filters"),hint:v("pivot.hint.filters"),icon:ji.filters,itemCount:a.length,onClear:()=>d("filters"),children:e(sortable.SortableContext,{items:a.map(g=>`item|filters|${g}`),strategy:sortable.verticalListSortingStrategy,children:e(ie,{spacing:.7,children:a.map(g=>e(ma,{id:`item|filters|${g}`,label:n.get(g)?.label??g,caption:p(g),trailing:f(g),onRemove:()=>u("filters",g)},g))})})}),e(Pn,{zone:"columns",title:v("pivot.zone.columns"),hint:v("pivot.hint.columns"),icon:ji.columns,itemCount:i.length,onClear:()=>d("columns"),children:e(sortable.SortableContext,{items:i.map(g=>`item|columns|${g}`),strategy:sortable.verticalListSortingStrategy,children:e(ie,{spacing:.7,children:i.map(g=>e(ma,{id:`item|columns|${g}`,label:n.get(g)?.label??g,caption:`${n.get(g)?.type??"dimension"} \u2022 ${p(g)}`,trailing:f(g),onRemove:()=>u("columns",g)},g))})})})]}),c("div",{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[e(Pn,{zone:"rows",title:v("pivot.zone.rows"),hint:v("pivot.hint.rows"),icon:ji.rows,itemCount:s.length,onClear:()=>d("rows"),children:e(sortable.SortableContext,{items:s.map(g=>`item|rows|${g}`),strategy:sortable.verticalListSortingStrategy,children:e(ie,{spacing:.7,children:s.map(g=>e(ma,{id:`item|rows|${g}`,label:n.get(g)?.label??g,caption:`${n.get(g)?.type??"dimension"} \u2022 ${p(g)}`,trailing:f(g),onRemove:()=>u("rows",g)},g))})})}),e(Pn,{zone:"values",title:v("pivot.zone.values"),hint:v("pivot.hint.values"),icon:ji.values,itemCount:l.length,onClear:()=>d("values"),children:e(sortable.SortableContext,{items:l.map(g=>`item|values|${g.tokenId}`),strategy:sortable.verticalListSortingStrategy,children:e(ie,{spacing:.7,children:l.map(g=>{let x=n.get(g.fieldId)?.label??g.fieldId,h=`${m(g.aggregation)}(${x})`;return e(ma,{id:`item|values|${g.tokenId}`,label:x,caption:h,trailing:b(g),onRemove:()=>u("values",g.tokenId)},g.tokenId)})})})})]})]})]})})};P();var Gu=t=>t.toLocaleString(void 0,{maximumFractionDigits:1}),Uu=({data:t,primaryLabel:r,secondaryLabel:o,formatPrimaryValue:n,formatSecondaryValue:a})=>{let i=sr();if(t.length===0)return null;let s=720,l=250,d={top:20,right:24,bottom:40,left:52},u=o?t.map(g=>g.primaryValue):t.map((g,x)=>x+1),p=o?t.map(g=>g.secondaryValue??0):t.map(g=>g.primaryValue),f=Math.max(...u,1),b=Math.max(...p,1),m=s-d.left-d.right,v=l-d.top-d.bottom,y=t.map((g,x)=>{let h=o?g.primaryValue:x+1,C=o?g.secondaryValue??0:g.primaryValue,k=d.left+h/f*m,w=l-d.bottom-C/b*v;return {...g,x:k,y:w,rawX:h,rawY:C}});return c("div",{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[e("div",{sx:{overflowX:"auto"},children:c("div",{component:"svg",viewBox:`0 0 ${s} ${l}`,sx:{width:"100%",minWidth:s,height:l},children:[e("line",{x1:d.left,y1:l-d.bottom,x2:s-d.right,y2:l-d.bottom,stroke:Ar(i.palette.text.secondary,.35)}),e("line",{x1:d.left,y1:d.top,x2:d.left,y2:l-d.bottom,stroke:Ar(i.palette.text.secondary,.35)}),y.map(g=>c("g",{children:[e("circle",{cx:g.x,cy:g.y,r:7,fill:Ar(i.palette.primary.main,.18)}),e("circle",{cx:g.x,cy:g.y,r:4.5,fill:i.palette.primary.main,children:c("title",{children:[g.name,`
195
195
  `,o?`${r}: ${n(g.primaryValue)}`:`${r}: ${n(g.primaryValue)}`,o?`
196
- ${o}: ${(a??n)(g.secondaryValue??0)}`:""]})}),e("text",{x:g.x,y:Math.max(g.y-12,d.top+8),textAnchor:"middle",fontSize:"10",fill:i.palette.text.secondary,children:g.name})]},g.name)),e("text",{x:s/2,y:l-10,textAnchor:"middle",fontSize:"11",fill:i.palette.text.secondary,children:o?r:"Index"}),e("text",{x:16,y:l/2,textAnchor:"middle",transform:`rotate(-90 16 ${l/2})`,fontSize:"11",fill:i.palette.text.secondary,children:o??r}),e("text",{x:d.left,y:d.top-4,fontSize:"10",fill:i.palette.text.secondary,children:_u(b)}),e("text",{x:s-d.right,y:l-d.bottom+16,textAnchor:"end",fontSize:"10",fill:i.palette.text.secondary,children:_u(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=>c("div",{sx:x=>({borderRadius:"var(--orb-r-container)",px:1.25,py:1,border:`1px solid ${Ar(x.palette.divider,.7)}`,bgcolor:Ar(x.palette.background.default,.35)}),children:[e(L,{component:"div",sx:{fontSize:"0.78rem",fontWeight:700,color:"var(--orb-fg-strong)"},noWrap:true,title:g.name,children:g.name}),c(L,{component:"div",sx:{fontSize:"0.72rem",color:"var(--orb-fg)"},children:[r,": ",n(g.primaryValue)]}),o&&c(L,{component:"div",sx:{fontSize:"0.72rem",color:"var(--orb-fg)"},children:[o,": ",(a??n)(g.secondaryValue??0)]})]},g.name))})]})};P();var Tl=t=>Math.max(...t,1),Uu=({data:t,chartType:r,primaryLabel:o,secondaryLabel:n,formatPrimaryValue:a,formatSecondaryValue:i})=>{let s=sr(),l=s.palette.primary.main,d=s.palette.warning.main;if(t.length===0)return null;if(r==="bar-horizontal"){let h=Tl(t.flatMap(C=>[C.primaryValue,C.secondaryValue??0]));return e(ie,{spacing:1.1,children:t.map(C=>c("div",{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",md:"160px 1fr 128px"},gap:1.25,alignItems:"center"},children:[e(L,{component:"div",sx:{fontSize:"0.78rem",fontWeight:700,color:"var(--orb-fg-strong)"},noWrap:true,title:C.name,children:C.name}),c(ie,{spacing:.65,children:[e("div",{sx:{height:10,borderRadius:999,overflow:"hidden",bgcolor:Ar(s.palette.action.active,.08)},children:e("div",{sx:{width:`${C.primaryValue/h*100}%`,height:"100%",bgcolor:l}})}),n&&e("div",{sx:{height:8,borderRadius:999,overflow:"hidden",bgcolor:Ar(s.palette.action.active,.08)},children:e("div",{sx:{width:`${(C.secondaryValue??0)/h*100}%`,height:"100%",bgcolor:d}})})]}),c("div",{sx:{minWidth:0},children:[e(L,{component:"div",sx:{fontSize:"0.72rem",textAlign:{xs:"left",md:"right"},fontWeight:700,color:"var(--orb-fg-strong)"},children:a(C.primaryValue)}),n&&e(L,{component:"div",sx:{fontSize:"0.72rem",textAlign:{xs:"left",md:"right"},color:"var(--orb-fg)"},children:(i??a)(C.secondaryValue??0)})]})]},C.name))})}if(r==="bar-vertical"){let h=Tl(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=>c("div",{sx:{minWidth:0},children:[c("div",{sx:{height:210,display:"flex",alignItems:"flex-end",justifyContent:"center",gap:.8},children:[e("div",{sx:{width:n?16:26,minHeight:8,height:`${Math.max(k.primaryValue/h*188,8)}px`,borderRadius:"10px 10px 2px 2px",bgcolor:l},title:`${o}: ${a(k.primaryValue)}`}),n&&e("div",{sx:{width:16,minHeight:8,height:`${Math.max((k.secondaryValue??0)/h*188,8)}px`,borderRadius:"10px 10px 2px 2px",bgcolor:d},title:`${n}: ${(i??a)(k.secondaryValue??0)}`})]}),e(L,{component:"div",sx:{fontSize:"0.76rem",fontWeight:700,color:"var(--orb-fg-strong)"},noWrap:true,title:k.name,children:k.name}),e(L,{component:"div",sx:{fontSize:"0.7rem",color:"var(--orb-fg)"},noWrap:true,title:a(k.primaryValue),children:a(k.primaryValue)}),n&&e(L,{component:"div",sx:{fontSize:"0.7rem",color:"var(--orb-fg)"},noWrap:true,title:(i??a)(k.secondaryValue??0),children:(i??a)(k.secondaryValue??0)})]},k.name))})})}let u=Math.max(680,t.length*74),p=240,f={top:20,right:18,bottom:36,left:18},b=Tl(t.flatMap(h=>[h.primaryValue,h.secondaryValue??0])),m=u-f.left-f.right,v=p-f.top-f.bottom,y=h=>t.map((C,k)=>{let w=f.left+k*m/Math.max(t.length-1,1),T=p-f.bottom-h(C)/b*v;return {x:w,y:T,item:C}}),g=y(h=>h.primaryValue),x=n?y(h=>h.secondaryValue??0):[];return c("div",{sx:{display:"flex",flexDirection:"column",gap:1.1},children:[e("div",{sx:{overflowX:"auto"},children:c("div",{component:"svg",viewBox:`0 0 ${u} ${p}`,sx:{width:"100%",minWidth:u,height:p},children:[e("line",{x1:f.left,y1:p-f.bottom,x2:u-f.right,y2:p-f.bottom,stroke:Ar(s.palette.text.secondary,.35)}),e("polyline",{fill:"none",stroke:l,strokeWidth:3,points:g.map(h=>`${h.x},${h.y}`).join(" ")}),g.map(h=>e("circle",{cx:h.x,cy:h.y,r:4,fill:l,children:c("title",{children:[h.item.name,`
196
+ ${o}: ${(a??n)(g.secondaryValue??0)}`:""]})}),e("text",{x:g.x,y:Math.max(g.y-12,d.top+8),textAnchor:"middle",fontSize:"10",fill:i.palette.text.secondary,children:g.name})]},g.name)),e("text",{x:s/2,y:l-10,textAnchor:"middle",fontSize:"11",fill:i.palette.text.secondary,children:o?r:"Index"}),e("text",{x:16,y:l/2,textAnchor:"middle",transform:`rotate(-90 16 ${l/2})`,fontSize:"11",fill:i.palette.text.secondary,children:o??r}),e("text",{x:d.left,y:d.top-4,fontSize:"10",fill:i.palette.text.secondary,children:Gu(b)}),e("text",{x:s-d.right,y:l-d.bottom+16,textAnchor:"end",fontSize:"10",fill:i.palette.text.secondary,children:Gu(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=>c("div",{sx:x=>({borderRadius:"var(--orb-r-container)",px:1.25,py:1,border:`1px solid ${Ar(x.palette.divider,.7)}`,bgcolor:Ar(x.palette.background.default,.35)}),children:[e(L,{component:"div",sx:{fontSize:"0.78rem",fontWeight:700,color:"var(--orb-fg-strong)"},noWrap:true,title:g.name,children:g.name}),c(L,{component:"div",sx:{fontSize:"0.72rem",color:"var(--orb-fg)"},children:[r,": ",n(g.primaryValue)]}),o&&c(L,{component:"div",sx:{fontSize:"0.72rem",color:"var(--orb-fg)"},children:[o,": ",(a??n)(g.secondaryValue??0)]})]},g.name))})]})};P();var Il=t=>Math.max(...t,1),Ku=({data:t,chartType:r,primaryLabel:o,secondaryLabel:n,formatPrimaryValue:a,formatSecondaryValue:i})=>{let s=sr(),l=s.palette.primary.main,d=s.palette.warning.main;if(t.length===0)return null;if(r==="bar-horizontal"){let h=Il(t.flatMap(C=>[C.primaryValue,C.secondaryValue??0]));return e(ie,{spacing:1.1,children:t.map(C=>c("div",{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",md:"160px 1fr 128px"},gap:1.25,alignItems:"center"},children:[e(L,{component:"div",sx:{fontSize:"0.78rem",fontWeight:700,color:"var(--orb-fg-strong)"},noWrap:true,title:C.name,children:C.name}),c(ie,{spacing:.65,children:[e("div",{sx:{height:10,borderRadius:999,overflow:"hidden",bgcolor:Ar(s.palette.action.active,.08)},children:e("div",{sx:{width:`${C.primaryValue/h*100}%`,height:"100%",bgcolor:l}})}),n&&e("div",{sx:{height:8,borderRadius:999,overflow:"hidden",bgcolor:Ar(s.palette.action.active,.08)},children:e("div",{sx:{width:`${(C.secondaryValue??0)/h*100}%`,height:"100%",bgcolor:d}})})]}),c("div",{sx:{minWidth:0},children:[e(L,{component:"div",sx:{fontSize:"0.72rem",textAlign:{xs:"left",md:"right"},fontWeight:700,color:"var(--orb-fg-strong)"},children:a(C.primaryValue)}),n&&e(L,{component:"div",sx:{fontSize:"0.72rem",textAlign:{xs:"left",md:"right"},color:"var(--orb-fg)"},children:(i??a)(C.secondaryValue??0)})]})]},C.name))})}if(r==="bar-vertical"){let h=Il(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=>c("div",{sx:{minWidth:0},children:[c("div",{sx:{height:210,display:"flex",alignItems:"flex-end",justifyContent:"center",gap:.8},children:[e("div",{sx:{width:n?16:26,minHeight:8,height:`${Math.max(k.primaryValue/h*188,8)}px`,borderRadius:"10px 10px 2px 2px",bgcolor:l},title:`${o}: ${a(k.primaryValue)}`}),n&&e("div",{sx:{width:16,minHeight:8,height:`${Math.max((k.secondaryValue??0)/h*188,8)}px`,borderRadius:"10px 10px 2px 2px",bgcolor:d},title:`${n}: ${(i??a)(k.secondaryValue??0)}`})]}),e(L,{component:"div",sx:{fontSize:"0.76rem",fontWeight:700,color:"var(--orb-fg-strong)"},noWrap:true,title:k.name,children:k.name}),e(L,{component:"div",sx:{fontSize:"0.7rem",color:"var(--orb-fg)"},noWrap:true,title:a(k.primaryValue),children:a(k.primaryValue)}),n&&e(L,{component:"div",sx:{fontSize:"0.7rem",color:"var(--orb-fg)"},noWrap:true,title:(i??a)(k.secondaryValue??0),children:(i??a)(k.secondaryValue??0)})]},k.name))})})}let u=Math.max(680,t.length*74),p=240,f={top:20,right:18,bottom:36,left:18},b=Il(t.flatMap(h=>[h.primaryValue,h.secondaryValue??0])),m=u-f.left-f.right,v=p-f.top-f.bottom,y=h=>t.map((C,k)=>{let w=f.left+k*m/Math.max(t.length-1,1),T=p-f.bottom-h(C)/b*v;return {x:w,y:T,item:C}}),g=y(h=>h.primaryValue),x=n?y(h=>h.secondaryValue??0):[];return c("div",{sx:{display:"flex",flexDirection:"column",gap:1.1},children:[e("div",{sx:{overflowX:"auto"},children:c("div",{component:"svg",viewBox:`0 0 ${u} ${p}`,sx:{width:"100%",minWidth:u,height:p},children:[e("line",{x1:f.left,y1:p-f.bottom,x2:u-f.right,y2:p-f.bottom,stroke:Ar(s.palette.text.secondary,.35)}),e("polyline",{fill:"none",stroke:l,strokeWidth:3,points:g.map(h=>`${h.x},${h.y}`).join(" ")}),g.map(h=>e("circle",{cx:h.x,cy:h.y,r:4,fill:l,children:c("title",{children:[h.item.name,`
197
197
  `,o,": ",a(h.item.primaryValue)]})},`primary-${h.item.name}`)),n&&c(jsxRuntime.Fragment,{children:[e("polyline",{fill:"none",stroke:d,strokeWidth:2.5,strokeDasharray:"5 5",points:x.map(h=>`${h.x},${h.y}`).join(" ")}),x.map(h=>e("circle",{cx:h.x,cy:h.y,r:3.5,fill:d,children:c("title",{children:[h.item.name,`
198
- `,n,": ",(i??a)(h.item.secondaryValue??0)]})},`secondary-${h.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(h=>c("div",{sx:C=>({borderRadius:"var(--orb-r-container)",px:1.1,py:.9,border:`1px solid ${Ar(C.palette.divider,.7)}`,bgcolor:Ar(C.palette.background.default,.35)}),children:[e(L,{component:"div",sx:{fontSize:"0.76rem",fontWeight:700,color:"var(--orb-fg-strong)"},noWrap:true,title:h.name,children:h.name}),e(L,{component:"div",sx:{fontSize:"0.71rem",color:"var(--orb-fg)"},children:a(h.primaryValue)}),n&&e(L,{component:"div",sx:{fontSize:"0.71rem",color:"var(--orb-fg)"},children:(i??a)(h.secondaryValue??0)})]},h.name))})]})};var Ku=(t,r,o)=>{let n=new Set,a=[];return t.forEach(i=>{n.has(i)||(n.add(i),a.push({fieldId:i,label:o.get(i)?.label??i,zone:"rows"}));}),r.forEach(i=>{n.has(i)||(n.add(i),a.push({fieldId:i,label:o.get(i)?.label??i,zone:"columns"}));}),a},qu=(t,r,o)=>t.map(n=>{let a=r.get(n.fieldId),i=a?.label??n.fieldId;return {fieldId:n.fieldId,label:`${o(n.aggregation)} \xB7 ${i}`,item:n,field:a}}),Xu=({rows:t,dimensionFieldId:r,primaryValue:o,secondaryValue:n})=>{if(!r)return [];let a=new Map;return t.forEach(i=>{let s=co(i[r]),l=a.get(s);if(l){l.push(i);return}a.set(s,[i]);}),Array.from(a.entries()).sort((i,s)=>i[0].localeCompare(s[0],void 0,{sensitivity:"base"})).map(([i,s])=>({name:i,primaryValue:wn(s,o.fieldId,o.aggregation),secondaryValue:n?wn(s,n.fieldId,n.aggregation):void 0}))};P();var Yu=({rows:t,fieldMap:r,rowFields:o,columnFields:n,valueFields:a,chartDimensionFieldId:i,chartPrimaryValueFieldId:s,chartSecondaryValueFieldId:l,chartType:d,isCollapsed:u,onChartDimensionFieldIdChange:p,onChartPrimaryValueFieldIdChange:f,onChartSecondaryValueFieldIdChange:b,onChartTypeChange:m,onToggleCollapse:v,getAggregationLabel:y})=>{let{t:g}=pe(),x=er.useMemo(()=>Ku(o,n,r),[n,r,o]),h=er.useMemo(()=>qu(a,r,y),[r,y,a]),C=h.find(M=>M.fieldId===s)??h[0],k=h.find(M=>M.fieldId===l&&M.fieldId!==C?.fieldId)??null,w=x.find(M=>M.fieldId===i)??x[0],T=w&&C?g("pivot.chart.subtitleReady",{dimension:w.label,measure:k?`${C.label} / ${k.label}`:C.label}):g("pivot.chart.subtitle"),I=er.useMemo(()=>!w||!C?[]:Xu({rows:t,dimensionFieldId:w.fieldId,primaryValue:C.item,secondaryValue:k?.item}),[C,t,k,w]),S=M=>C?ua(M,C.item,r):M.toLocaleString(),A=M=>k?ua(M,k.item,r):M.toLocaleString(),D=x.length>1||h.length>1;return c(Tn,{title:g("pivot.chart.title"),subtitle:T,collapsed:u,onToggleCollapse:v,expandAriaLabel:g("pivot.chart.collapse.ariaExpand"),collapseAriaLabel:g("pivot.chart.collapse.ariaCollapse"),bodySx:{display:"flex",flexDirection:"column",gap:1.1},children:[D&&c("div",{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(2, minmax(0, 1fr))",xl:"repeat(4, minmax(0, 1fr))"},gap:1,alignItems:"start"},children:[c(Co,{size:"small",sx:{minWidth:0,width:"100%"},children:[e(L,{component:"div",sx:{fontSize:"0.7rem",fontWeight:500,color:"var(--orb-fg)",mb:.45},children:g("pivot.chart.dimension")}),e(zt,{value:w?.fieldId??"",onChange:M=>p(String(M.target.value)),sx:{fontSize:"0.75rem",height:32},children:x.map(M=>e("option",{value:M.fieldId,sx:{fontSize:"0.75rem"},children:M.label},M.fieldId))})]}),c(Co,{size:"small",sx:{minWidth:0,width:"100%"},children:[e(L,{component:"div",sx:{fontSize:"0.7rem",fontWeight:500,color:"var(--orb-fg)",mb:.45},children:g("pivot.chart.primaryMeasure")}),e(zt,{value:C?.fieldId??"",onChange:M=>f(String(M.target.value)),sx:{fontSize:"0.75rem",height:32},children:h.map(M=>e("option",{value:M.fieldId,sx:{fontSize:"0.75rem"},children:M.label},M.fieldId))})]}),c(Co,{size:"small",sx:{minWidth:0,width:"100%"},children:[e(L,{component:"div",sx:{fontSize:"0.7rem",fontWeight:500,color:"var(--orb-fg)",mb:.45},children:g("pivot.chart.secondaryMeasure")}),c(zt,{value:k?.fieldId??"",onChange:M=>b(String(M.target.value)),sx:{fontSize:"0.75rem",height:32},children:[e("option",{value:"",sx:{fontSize:"0.75rem",color:"text.secondary"},children:g("common.none")}),h.filter(M=>M.fieldId!==C?.fieldId).map(M=>e("option",{value:M.fieldId,sx:{fontSize:"0.75rem"},children:M.label},M.fieldId))]})]}),c(Co,{size:"small",sx:{minWidth:0,width:"100%"},children:[e(L,{component:"div",sx:{fontSize:"0.7rem",fontWeight:500,color:"var(--orb-fg)",mb:.45},children:g("pivot.chart.chartType")}),c(zt,{value:d,onChange:M=>m(M.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:w?C?I.length===0?e("div",{sx:{py:5,textAlign:"center"},children:e(L,{component:"div",sx:{fontSize:"0.86rem",fontWeight:400,color:"var(--orb-fg)"},children:g("pivot.chart.emptyNoData")})}):d==="scatter"?e(Gu,{data:I,primaryLabel:C.label,secondaryLabel:k?.label,formatPrimaryValue:S,formatSecondaryValue:A}):e(Uu,{data:I,chartType:d,primaryLabel:C.label,secondaryLabel:k?.label,formatPrimaryValue:S,formatSecondaryValue:A}):e("div",{sx:{py:5,textAlign:"center"},children:e(L,{component:"div",sx:{fontSize:"0.86rem",fontWeight:400,color:"var(--orb-fg)"},children:g("pivot.chart.emptyNoValue")})}):e("div",{sx:{py:5,textAlign:"center"},children:e(L,{component:"div",sx:{fontSize:"0.86rem",fontWeight:400,color:"var(--orb-fg)"},children:g("pivot.chart.emptyNoDimension")})})})]})};P();var Qi=({node:t,dataColumns:r,fieldMap:o,level:n,expandedKeys:a,onToggle:i,getValue:s})=>{let l=a.has(t.key),d=t.children.length>0,u=t.isGrandTotal,p=d&&!l&&!u,f=u?800:p?700:d?600:500,b=u?800:p?600:500;return c(jsxRuntime.Fragment,{children:[c("tr",{sx:{bgcolor:u?vt()==="dark"?"color-mix(in oklch, var(--orb-primary) 22%, transparent)":"color-mix(in oklch, var(--orb-primary) 8%, transparent)":vt()==="dark"?"var(--orb-surface)":"background.paper","&:hover":{bgcolor:u?vt()==="dark"?"color-mix(in oklch, var(--orb-primary) 28%, transparent)":"color-mix(in oklch, var(--orb-primary) 12%, transparent)":"var(--orb-hover)"}},children:[c("td",{style:{fontWeight:f},sx:m=>({fontSize:"0.76rem",borderBottom:`1px solid ${m.palette.divider}`,whiteSpace:"nowrap",pl:n*2+1,display:"flex",alignItems:"center",height:40}),children:[d&&!u&&e(ae,{size:"small",onClick:()=>i(t.key),sx:{width:22,height:22,p:0,mr:.35,ml:-0.8},children:l?e(Vr,{size:12}):e(ko,{size:12})}),!d&&!u&&n>0&&e("div",{sx:{width:18}}),t.value]}),r.map(m=>e("td",{align:"right",style:{fontWeight:b},sx:{fontSize:"0.76rem",borderBottom:v=>`1px solid ${v.palette.divider}`,whiteSpace:"nowrap"},children:ua(s?s(t,m.id):t.aggregatedValues[m.id]??0,m.valueItem,o)},`${t.key}-${m.id}`))]}),l&&t.children.map(m=>e(Qi,{node:m,dataColumns:r,fieldMap:o,level:n+1,expandedKeys:a,onToggle:i,getValue:s},m.key))]})};P();var Ml=(t,r,o)=>{let n=[...t,...r];return o&&n.includes(o)?o:n[0]??""},es=(t,r)=>r&&t.some(o=>o.fieldId===r)?r:t[0]?.fieldId??"",Rl=(t,r,o)=>o===""?"":o&&o!==r&&t.some(n=>n.fieldId===o)?o:t.find(n=>n.fieldId!==r)?.fieldId??"",ju=t=>{let r=new Set,o=n=>{n.forEach(a=>{a.children.length>0&&(r.add(a.key),o(a.children));});};return o(t),r},Qu=(t,r,o=0)=>t.length===0?o:t.reduce((n,a)=>a.children.length===0||!r.has(a.key)?Math.max(n,o+1):Math.max(n,Qu(a.children,r,o+1)),o),Qv=(t,r)=>{let o=[],n=a=>{a.forEach(i=>{if(i.children.length>0&&r.has(i.key)){n(i.children);return}o.push(i);});};return n(t),o},uO=({title:t,rows:r,fields:o,initialLayout:n,initialChart:a,emptyText:i,maxPreviewHeight:s=520,initialChartCollapsed:l=false,initialTableCollapsed:d=false,model:u,enablePresetManagement:p=false,presets:f,defaultPresets:b,onPresetsChange:m,initialPresetId:v,onPresetApplied:y})=>{let{t:g}=pe(),x=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:8}})),h=er.useRef(0),C=er.useRef(false),k=t??g("pivot.title.default"),w=i??g("pivot.empty"),T=er.useMemo(()=>({sum:g("pivot.agg.sum"),count:g("pivot.agg.count"),avg:g("pivot.agg.avg"),min:g("pivot.agg.min"),max:g("pivot.agg.max")}),[g]),I=er.useCallback(R=>T[R]??Nu[R],[T]),S=er.useMemo(()=>new Set(o.map(R=>R.id)),[o]),A=er.useMemo(()=>new Map(o.map(R=>[R.id,R])),[o]),[D,M]=er.useState(()=>lr(n?.rows,S)),[N,E]=er.useState(()=>lr(n?.columns,S)),[O,F]=er.useState(()=>lr(n?.filters,S)),[X,H]=er.useState(()=>{let R=n?.values??[],_=new Set,G=[];return R.forEach(de=>{if(!S.has(de.fieldId)||_.has(de.fieldId))return;_.add(de.fieldId),h.current+=1;let He=A.get(de.fieldId);G.push({tokenId:`v${h.current}`,fieldId:de.fieldId,aggregation:vr(de.aggregation,He)});}),G}),[Y,W]=er.useState({}),[j,V]=er.useState(true),[z,U]=er.useState(false),[K,fe]=er.useState(()=>Ml(lr(n?.rows,S),lr(n?.columns,S),a?.dimensionFieldId)),[se,ue]=er.useState(()=>{let R=(n?.values??[]).filter((_,G,de)=>S.has(_.fieldId)&&de.findIndex(He=>He.fieldId===_.fieldId)===G).map(_=>({tokenId:_.fieldId,fieldId:_.fieldId,aggregation:vr(_.aggregation,A.get(_.fieldId))}));return es(R,a?.primaryValueFieldId)}),[Se,$e]=er.useState(()=>{let R=(n?.values??[]).filter((G,de,He)=>S.has(G.fieldId)&&He.findIndex(ot=>ot.fieldId===G.fieldId)===de).map(G=>({tokenId:G.fieldId,fieldId:G.fieldId,aggregation:vr(G.aggregation,A.get(G.fieldId))})),_=es(R,a?.primaryValueFieldId);return Rl(R,_,a?.secondaryValueFieldId)}),[ke,le]=er.useState(a?.chartType??"bar-vertical"),[Ee,Me]=er.useState(l),[Pe,Ve]=er.useState(d),[tt,nt]=er.useState(()=>b??[]),[it,q]=er.useState(""),[De,ye]=er.useState(false),[Be,at]=er.useState(""),[Ze,St]=er.useState(null),[Mt,Ot]=er.useState(new Set(["__grand_total__"])),[At,re]=er.useState(new Set),Ke=u?.rowFields??D,Fe=u?.columnFields??N,ce=u?.filterFields??O,ve=u?.valueFields??X,te=u?.filterSelections??Y,he=u?.showGrandTotal??j,Ne=u?.isConfiguratorCollapsed??z,Je=u?.chartDimensionFieldId??K,st=u?.chartPrimaryValueFieldId??se,pt=u?.chartSecondaryValueFieldId??Se,Bt=u?.chartType??ke,Xt=u?.isChartCollapsed??Ee,Vt=u?.isTableCollapsed??Pe,wt=f??tt,Wt=p||wt.length>0||!!m,ht=er.useCallback(R=>{if(u?.setRowFields){u.setRowFields(R);return}M(R);},[u]),Nt=er.useCallback(R=>{if(u?.setColumnFields){u.setColumnFields(R);return}E(R);},[u]),lt=er.useCallback(R=>{if(u?.setFilterFields){u.setFilterFields(R);return}F(R);},[u]),Ft=er.useCallback(R=>{if(u?.setValueFields){u.setValueFields(R);return}H(R);},[u]),Yt=er.useCallback(R=>{if(u?.setFilterSelections){u.setFilterSelections(R);return}W(R);},[u]),Z=er.useCallback(R=>{if(u?.setShowGrandTotal){u.setShowGrandTotal(R);return}V(R);},[u]),$=er.useCallback(R=>{if(u?.setIsConfiguratorCollapsed){u.setIsConfiguratorCollapsed(R);return}U(R);},[u]),Q=er.useCallback(R=>{if(u?.setChartDimensionFieldId){u.setChartDimensionFieldId(R);return}fe(R);},[u]),be=er.useCallback(R=>{if(u?.setChartPrimaryValueFieldId){u.setChartPrimaryValueFieldId(R);return}ue(R);},[u]),Ce=er.useCallback(R=>{if(u?.setChartSecondaryValueFieldId){u.setChartSecondaryValueFieldId(R);return}$e(R);},[u]),Le=er.useCallback(R=>{if(u?.setChartType){u.setChartType(R);return}le(R);},[u]),_e=er.useCallback(R=>{if(u?.setIsChartCollapsed){u.setIsChartCollapsed(R);return}Me(R);},[u]),qe=er.useCallback(R=>{if(u?.setIsTableCollapsed){u.setIsTableCollapsed(R);return}Ve(R);},[u]),je=er.useCallback(R=>{let _=typeof R=="function"?R(wt):R;f||nt(_),m?.(_);},[m,wt,f]),mt=er.useMemo(()=>new Set([...Ke,...Fe,...ce]),[Ke,Fe,ce]),ft=er.useMemo(()=>o.filter(R=>!mt.has(R.id)),[o,mt]),Rt=er.useMemo(()=>{let R=[...Ke,...Fe,...ce],_=new Set,G=[];return R.forEach(de=>{_.has(de)||(_.add(de),G.push(de));}),G},[Fe,ce,Ke]);er.useEffect(()=>{ht(R=>{let _=R.filter(G=>S.has(G));return po(R,_)?R:_}),Nt(R=>{let _=R.filter(G=>S.has(G));return po(R,_)?R:_}),lt(R=>{let _=R.filter(G=>S.has(G));return po(R,_)?R:_}),Ft(R=>{let _=R.filter(G=>S.has(G.fieldId)).map(G=>({...G,aggregation:vr(G.aggregation,A.get(G.fieldId))}));return qi(R,_)?R:_});},[A,S]);let yt=er.useMemo(()=>{let R={};return Rt.forEach(_=>{let G=new Set;r.forEach(de=>{G.add(co(de[_]));}),R[_]=Array.from(G).sort((de,He)=>de.localeCompare(He));}),R},[Rt,r]);er.useEffect(()=>{Yt(R=>{let _={};return Rt.forEach(G=>{let de=yt[G]??[],ot=(R[G]??[]).filter(oe=>de.includes(oe)),Ge=Object.prototype.hasOwnProperty.call(R,G);_[G]=Ge?ot:de;}),Bu(R,_)?R:_});},[Rt,yt]),er.useEffect(()=>{Q(R=>Ml(Ke,Fe,R));},[Fe,Ke,Q]),er.useEffect(()=>{be(R=>es(ve,R));},[be,ve]),er.useEffect(()=>{Ce(R=>Rl(ve,st,R));},[st,Ce,ve]);let B=er.useMemo(()=>r.filter(R=>Rt.every(_=>{let G=te[_]??[],de=yt[_]??[];if(G.length===de.length)return true;if(G.length===0)return false;let He=co(R[_]);return G.includes(He)})),[Rt,yt,te,r]),J=er.useMemo(()=>{if(ve.length===0)return null;let R=new Map;if(B.forEach(Ge=>{let oe=Fe.length>0?Fe.map(ee=>co(Ge[ee])):[g("pivot.valueLabel")],me=_o(oe);R.set(me,oe);}),R.size===0){let Ge=Fe.length>0?Fe.map(()=>Ui):[g("pivot.valueLabel")];R.set(_o(Ge),Ge);}let _=Array.from(R.entries()).sort((Ge,oe)=>Fu(Ge[1],oe[1])),G=_.flatMap(([Ge,oe])=>ve.map(me=>{let ee=A.get(me.fieldId),Oe=`${I(me.aggregation)} ${ee?.label??me.fieldId}`,Qe=Fe.length===0||ve.length>1?`${oe.join(" / ")} \u2022 ${Oe}`:oe.join(" / ");return {id:`${Ge}::${me.tokenId}`,colKey:Ge,valueItem:me,label:Qe}})),de=[];Fe.length>0&&_.forEach(([Ge,oe])=>{let me=G.filter(Qe=>Qe.colKey===Ge),ee=de,Oe=[];oe.forEach((Qe,Re)=>{Oe.push(`d${Re}:${Qe}`);let Ye=`col::${_o(Oe)}`,Pt=ee.find(Qo=>Qo.key===Ye);Pt||(Pt={key:Ye,label:Qe,children:[],leafColumnIds:[],path:oe.slice(0,Re+1),depth:Re},ee.push(Pt)),me.forEach(Qo=>{Pt.leafColumnIds.includes(Qo.id)||Pt.leafColumnIds.push(Qo.id);}),ee=Pt.children;});});let He=Ge=>{let oe={};return G.forEach(me=>{let ee=Ge.filter(Oe=>{let Qe=Fe.length>0?Fe.map(Re=>co(Oe[Re])):[g("pivot.valueLabel")];return _o(Qe)===me.colKey});oe[me.id]=wn(ee,me.valueItem.fieldId,me.valueItem.aggregation);}),oe},ot=[];if(Ke.length===0)ot.push({key:"root",value:g("pivot.resultLabel")||Ru,children:[],isLeaf:true,aggregatedValues:He(B),path:[],depth:0});else {let Ge=(oe,me,ee)=>{if(me>=Ke.length)return [];let Oe=Ke[me],Qe=new Map;return oe.forEach(Re=>{let Ye=co(Re[Oe]);Qe.has(Ye)||Qe.set(Ye,[]),Qe.get(Ye).push(Re);}),Array.from(Qe.keys()).sort().map(Re=>{let Ye=Qe.get(Re),Pt=[...ee,Re];return {key:_o(Pt),value:Re,fieldId:Oe,aggregatedValues:He(Ye),children:Ge(Ye,me+1,Pt),isLeaf:me===Ke.length-1,path:Pt,depth:me}})};ot.push(...Ge(B,0,[]));}return {dataColumns:G,columnTree:de,rowTree:ot}},[Fe,A,B,I,Ke,g,ve]),ge=er.useCallback((R,_)=>(h.current+=1,{tokenId:`v${h.current}`,fieldId:R,aggregation:vr(_,A.get(R))}),[A]),Te=er.useCallback(R=>{if(R==="rows")return ht([]);if(R==="columns")return Nt([]);if(R==="filters")return lt([]);Ft([]);},[]),et=er.useCallback((R,_)=>{if(R==="rows")return ht(G=>G.filter(de=>de!==_));if(R==="columns")return Nt(G=>G.filter(de=>de!==_));if(R==="filters")return lt(G=>G.filter(de=>de!==_));Ft(G=>G.filter(de=>de.tokenId!==_));},[]),Xe=er.useCallback((R,_)=>{Ft(G=>G.map(de=>de.tokenId===R?{...de,aggregation:vr(_,A.get(de.fieldId))}:de));},[A]),kt=er.useCallback(R=>{St(String(R.active.id));},[]),bt=er.useCallback(R=>{if(St(null),!R.over)return;let _=Ki(String(R.active.id)),G=Ki(String(R.over.id));if(!_||!G||_.kind!=="item"||!_.key)return;if(_.zone===G.zone&&G.kind==="item"){if(_.zone==="rows"){let Re=Ke.indexOf(_.key),Ye=Ke.indexOf(G.key??"");Re!==-1&&Ye!==-1&&Re!==Ye&&ht(Pt=>sortable.arrayMove(Pt,Re,Ye));return}if(_.zone==="columns"){let Re=Fe.indexOf(_.key),Ye=Fe.indexOf(G.key??"");Re!==-1&&Ye!==-1&&Re!==Ye&&Nt(Pt=>sortable.arrayMove(Pt,Re,Ye));return}if(_.zone==="filters"){let Re=ce.indexOf(_.key),Ye=ce.indexOf(G.key??"");Re!==-1&&Ye!==-1&&Re!==Ye&&lt(Pt=>sortable.arrayMove(Pt,Re,Ye));return}if(_.zone==="values"){let Re=ve.findIndex(Pt=>Pt.tokenId===_.key),Ye=ve.findIndex(Pt=>Pt.tokenId===(G.key??""));Re!==-1&&Ye!==-1&&Re!==Ye&&Ft(Pt=>sortable.arrayMove(Pt,Re,Ye));}return}let de=G.zone,He=[...Ke],ot=[...Fe],Ge=[...ce],oe=[...ve],me="",ee=null;if(_.zone==="palette")me=_.key;else if(_.zone==="values"){let Re=oe.find(Ye=>Ye.tokenId===_.key);if(!Re)return;me=Re.fieldId,ee=Re,oe=oe.filter(Ye=>Ye.tokenId!==_.key);}else _.zone==="rows"?(me=_.key,He=He.filter(Re=>Re!==me)):_.zone==="columns"?(me=_.key,ot=ot.filter(Re=>Re!==me)):_.zone==="filters"&&(me=_.key,Ge=Ge.filter(Re=>Re!==me));if(!me)return;let Oe=()=>{He=He.filter(Re=>Re!==me),ot=ot.filter(Re=>Re!==me),Ge=Ge.filter(Re=>Re!==me);},Qe=Re=>{if(G.kind!=="item"||!G.key)return Re==="rows"?He.length:Re==="columns"?ot.length:Re==="filters"?Ge.length:Re==="values"?oe.length:0;if(Re==="rows"){let Ye=He.indexOf(G.key);return Ye>=0?Ye:He.length}if(Re==="columns"){let Ye=ot.indexOf(G.key);return Ye>=0?Ye:ot.length}if(Re==="filters"){let Ye=Ge.indexOf(G.key);return Ye>=0?Ye:Ge.length}if(Re==="values"){let Ye=oe.findIndex(Pt=>Pt.tokenId===G.key);return Ye>=0?Ye:oe.length}return 0};if(de==="palette"){ht(He),Nt(ot),lt(Ge),Ft(oe);return}if(de==="values"){let Re=Qe("values"),Ye=ee??ge(me);oe.splice(Re,0,Ye),ht(He),Nt(ot),lt(Ge),Ft(oe);return}if(Ou(de)){Oe();let Re=Qe(de);de==="rows"?He.splice(Re,0,me):de==="columns"?ot.splice(Re,0,me):Ge.splice(Re,0,me),ht(He),Nt(ot),lt(Ge),Ft(oe);}},[Fe,ge,ce,Ke,ve]),gt=er.useCallback((R,_)=>{Yt(G=>({...G,[R]:_}));},[]),Ct=er.useCallback(R=>{Ot(_=>{let G=new Set(_);return G.has(R)?G.delete(R):G.add(R),G});},[]),nr=er.useCallback(R=>{re(_=>{let G=new Set(_);return G.has(R)?G.delete(R):G.add(R),G});},[]),Et=er.useCallback(R=>{let _=A.get(R.fieldId),G=kl(_);return e(Co,{size:"small",sx:{minWidth:98},children:e(zt,{value:R.aggregation,onChange:de=>Xe(R.tokenId,de.target.value),onClick:de=>de.stopPropagation(),onMouseDown:de=>de.stopPropagation(),sx:{fontSize:"0.72rem",height:26,"& select.orb-inp":{py:.35}},children:G.map(de=>e("option",{value:de,sx:{fontSize:"0.75rem"},children:I(de)},de))})})},[A,I,Xe]),Zt=er.useCallback(R=>{let _=yt[R]??[],G=te[R]??_;return _.length===0?g("pivot.filter.noValues"):G.length===0?g("pivot.filter.noneSelected"):G.length===_.length?g("pivot.filter.allValues"):g("pivot.filter.selectedCount",{selected:G.length,total:_.length})},[yt,te,g]),Ht=er.useCallback(R=>{let _=yt[R]??[],G=te[R]??_;return e(zu,{options:_,selectedValues:G,onChange:de=>gt(R,de)})},[yt,te,gt]),Kt=er.useCallback(()=>`pivot-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,[]),$t=er.useCallback(()=>{let R={};return new Set([...Rt,...Object.keys(te)]).forEach(G=>{if(!S.has(G))return;let de=te[G]??[];R[G]=[...de];}),{layout:{rows:[...Ke],columns:[...Fe],filters:[...ce],values:ve.map(G=>({fieldId:G.fieldId,aggregation:G.aggregation}))},filterSelections:R,showGrandTotal:he,chart:{dimensionFieldId:Je,primaryValueFieldId:st,secondaryValueFieldId:pt,chartType:Bt}}},[Rt,Je,st,pt,Bt,Fe,ce,te,Ke,he,S,ve]),rr=er.useCallback(R=>{let _=lr(R.layout.rows,S),G=lr(R.layout.columns,S),de=lr(R.layout.filters,S),He=new Set,ot=(R.layout.values??[]).filter(me=>!S.has(me.fieldId)||He.has(me.fieldId)?false:(He.add(me.fieldId),true)).map(me=>ge(me.fieldId,me.aggregation)),Ge={};Object.entries(R.filterSelections??{}).forEach(([me,ee])=>{!S.has(me)||!Array.isArray(ee)||(Ge[me]=Array.from(new Set(ee.map(Oe=>String(Oe)))));}),ht(_),Nt(G),lt(de),Ft(ot),Yt(Ge),typeof R.showGrandTotal=="boolean"&&Z(R.showGrandTotal),Q(Ml(_,G,R.chart?.dimensionFieldId));let oe=es(ot,R.chart?.primaryValueFieldId);be(oe),Ce(Rl(ot,oe,R.chart?.secondaryValueFieldId)),Le(R.chart?.chartType??"bar-vertical"),q(R.id),y?.(R);},[ge,y,Q,be,Ce,Le,Nt,lt,Yt,ht,Z,Ft,S]),ar=er.useCallback(R=>{if(!R){q("");return}let _=wt.find(G=>G.id===R);if(!_){q("");return}rr(_);},[rr,wt]),fr=er.useCallback(()=>{let R=g("pivot.preset.defaultName",{index:wt.length+1});at(R),ye(true);},[wt.length,g]),Ir=er.useCallback(()=>{let R=Be.trim();if(!R)return;let _={id:Kt(),name:R,...$t()};je(G=>[...G,_]),q(_.id),ye(false);},[$t,Kt,Be,je]),Mr=er.useCallback(()=>{it&&(je(R=>R.filter(_=>_.id!==it)),q(""));},[it,je]);er.useEffect(()=>{if(!v||C.current)return;let R=wt.find(_=>_.id===v);R&&(C.current=true,rr(R));},[rr,v,wt]),er.useEffect(()=>{it&&(wt.some(R=>R.id===it)||q(""));},[it,wt]);let oo=er.useMemo(()=>{if(!he||!J||!Ke.length)return null;let R={};return J.dataColumns.forEach(_=>{let G=B.filter(de=>{let He=Fe.length>0?Fe.map(ot=>co(de[ot])):[g("pivot.valueLabel")];return _o(He)===_.colKey});R[_.id]=wn(G,_.valueItem.fieldId,_.valueItem.aggregation);}),{key:"__grand_total__",value:g("pivot.grandTotal")||Du,children:[],isLeaf:false,isGrandTotal:true,aggregatedValues:R,path:[],depth:-1}},[he,J,B,Fe,Ke.length,g]),yr=er.useMemo(()=>ju(J?.rowTree??[]),[J]),Or=er.useMemo(()=>ju(J?.columnTree??[]),[J]);er.useEffect(()=>{Ot(R=>{let _=new Set;return R.has("__grand_total__")&&_.add("__grand_total__"),yr.forEach(G=>{R.has(G)&&_.add(G);}),_});},[yr]),er.useEffect(()=>{re(R=>{let _=new Set;return Or.forEach(G=>{R.has(G)&&_.add(G);}),_});},[Or]);let qo=er.useCallback(()=>{Ot(R=>{let _=new Set(R);return yr.forEach(G=>_.add(G)),_});},[yr]),Xo=er.useCallback(()=>{Ot(R=>{let _=new Set;return R.has("__grand_total__")&&_.add("__grand_total__"),_});},[]),Lo=er.useCallback(()=>{re(new Set(Or));},[Or]),Yo=er.useCallback(()=>{re(new Set);},[]),Zo=er.useMemo(()=>!J||Fe.length===0?[]:Qv(J.columnTree,At),[Fe.length,At,J]),Rr=er.useMemo(()=>{if(!J)return [];if(Fe.length===0)return J.dataColumns.map(_=>({id:_.id,label:_.label,leafColumnIds:[_.id],valueItem:_.valueItem}));let R=new Map(J.dataColumns.map(_=>[_.id,_]));return Zo.flatMap(_=>{let G=new Map;return _.leafColumnIds.forEach(de=>{let He=R.get(de);if(!He)return;let ot=He.valueItem.tokenId,Ge=`${I(He.valueItem.aggregation)} ${A.get(He.valueItem.fieldId)?.label??He.valueItem.fieldId}`,oe=G.get(ot);if(oe){oe.leafColumnIds.push(de);return}G.set(ot,{id:`${_.key}::${ot}`,label:ve.length>1?Ge:_.label,leafColumnIds:[de],valueItem:He.valueItem});}),Array.from(G.values())})},[Fe.length,A,I,J,ve.length,Zo]),Oo=er.useMemo(()=>new Map(Rr.map(R=>[R.id,R])),[Rr]),jo=er.useMemo(()=>Rr.map(R=>({id:R.id,colKey:R.id,valueItem:R.valueItem,label:R.label})),[Rr]),Kr=er.useMemo(()=>{if(!J||Fe.length===0)return [];let R=[],_=Qu(J.columnTree,At),G=_+(ve.length>1?1:0),de=(He,ot)=>{R[ot]??(R[ot]=[]),He.forEach(Ge=>{let oe=Ge.children.length>0&&At.has(Ge.key),me=Rr.filter(Oe=>Ge.leafColumnIds.some(Qe=>Oe.leafColumnIds.includes(Qe))).length,ee=oe||ve.length>1?1:G-ot;R[ot].push({key:Ge.key,label:Ge.label,colSpan:me,rowSpan:ee,expandable:Ge.children.length>0,expanded:oe}),oe&&de(Ge.children,ot+1);});};return de(J.columnTree,0),ve.length>1&&(R[_]=Rr.map(He=>({key:He.id,label:He.label,colSpan:1,rowSpan:1,expandable:false,expanded:false}))),R},[Fe.length,At,J,ve.length,Rr]),no=er.useCallback((R,_)=>_.leafColumnIds.reduce((G,de)=>G+(R.aggregatedValues[de]??0),0),[]),Ln=er.useMemo(()=>c(jsxRuntime.Fragment,{children:[e(we,{size:"small",variant:"text",onClick:qo,disabled:yr.size===0,sx:{minWidth:"auto",px:.8,fontSize:"0.72rem"},children:g("pivot.table.expandRowsAll")}),e(we,{size:"small",variant:"text",onClick:Xo,disabled:yr.size===0,sx:{minWidth:"auto",px:.8,fontSize:"0.72rem"},children:g("pivot.table.collapseRowsAll")}),e(Dt,{orientation:"vertical",flexItem:true}),e(we,{size:"small",variant:"text",onClick:Lo,disabled:Or.size===0,sx:{minWidth:"auto",px:.8,fontSize:"0.72rem"},children:g("pivot.table.expandColumnsAll")}),e(we,{size:"small",variant:"text",onClick:Yo,disabled:Fe.length===0,sx:{minWidth:"auto",px:.8,fontSize:"0.72rem"},children:g("pivot.table.collapseColumnsAll")})]}),[Fe.length,Or.size,yr.size,Yo,Xo,Lo,qo,g]),Fo=()=>{if(!Ze)return null;let R=Ki(Ze);if(!R||R.kind!=="item"||!R.key)return null;if(R.zone==="palette"){let He=A.get(R.key);return He?e(Pl,{label:He.label,subtitle:He.type}):null}if(R.zone==="values"){let He=ve.find(me=>me.tokenId===R.key);if(!He)return null;let Ge=A.get(He.fieldId)?.label??He.fieldId,oe=`${I(He.aggregation)}(${Ge})`;return e(Xi,{label:Ge,caption:oe})}let G=A.get(R.key)?.label??R.key,de=Zt(R.key);return e(Xi,{label:G,caption:de})};return c(Ae,{sx:R=>({p:{xs:1.2,md:2},borderRadius:"var(--orb-r-container)",border:`1px solid ${R.palette.divider}`,bgcolor:"var(--orb-canvas)",boxShadow:"var(--orb-shadow-2)",display:"flex",flexDirection:"column",gap:2.25}),children:[c("div",{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1.5,flexWrap:"wrap"},children:[c("div",{sx:{minWidth:0,display:"flex",flexDirection:"column",gap:.35},children:[e(L,{component:"div",sx:{fontSize:"1.08rem",fontWeight:700,lineHeight:1.25,color:"var(--orb-fg-strong)"},children:k}),e(L,{component:"div",sx:{fontSize:"0.8rem",fontWeight:400,color:"var(--orb-fg)"},children:g("pivot.subtitle.default")})]}),c(ie,{direction:"row",spacing:1.5,alignItems:"center",children:[Wt&&c(jsxRuntime.Fragment,{children:[e(Co,{size:"small",sx:{minWidth:200},children:c(zt,{value:it,displayEmpty:true,onChange:R=>ar(String(R.target.value)),sx:{fontSize:"0.75rem",height:32},children:[e("option",{value:"",sx:{fontSize:"0.75rem",color:"text.secondary"},children:g("pivot.preset.selectPlaceholder")}),wt.map(R=>e("option",{value:R.id,sx:{fontSize:"0.75rem"},children:R.name},R.id))]})}),e(ct,{title:g("pivot.preset.save"),children:e(ae,{size:"small",onClick:fr,"aria-label":g("pivot.preset.save"),sx:{width:28,height:28,p:0},children:e(Po,{size:15})})}),e(ct,{title:g("pivot.preset.delete"),children:e("span",{children:e(ae,{size:"small",onClick:Mr,disabled:!it,"aria-label":g("pivot.preset.delete"),sx:{width:28,height:28,p:0},children:e(ni,{size:15})})})}),e(Dt,{flexItem:true,orientation:"vertical"})]}),c(L,{component:"div",sx:{fontSize:"0.75rem",fontWeight:400,color:"var(--orb-fg)"},children:[g("pivot.records"),": ",e("strong",{children:r.length.toLocaleString()})," / ",g("pivot.afterFilter"),":"," ",e("strong",{children:B.length.toLocaleString()})]}),e(Dt,{flexItem:true,orientation:"vertical"}),c("div",{sx:{display:"flex",alignItems:"center",gap:.6},children:[e(L,{component:"div",sx:{fontSize:"0.75rem",fontWeight:500,color:"var(--orb-fg-strong)"},children:g("pivot.grandTotal")}),e(ei,{size:"small",checked:he,onChange:R=>Z(R.target.checked)})]})]})]}),e(Dt,{}),c(core.DndContext,{sensors:x,collisionDetection:core.closestCenter,onDragStart:kt,onDragEnd:bt,children:[e($u,{isConfiguratorCollapsed:Ne,onToggleCollapse:()=>$(R=>!R),availableFields:ft,fieldMap:A,filterFields:ce,columnFields:Fe,rowFields:Ke,valueFields:ve,clearZone:Te,removeFieldFromZone:et,getFilterSelectionSummary:Zt,renderDimensionFilterSelect:Ht,renderAggregationSelect:Et,getAggregationLabel:I}),e(Md,{children:e(core.DragOverlay,{dropAnimation:{duration:250,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:Fo()})})]}),e(Yu,{rows:B,fieldMap:A,rowFields:Ke,columnFields:Fe,valueFields:ve,chartDimensionFieldId:Je,chartPrimaryValueFieldId:st,chartSecondaryValueFieldId:pt,chartType:Bt,isCollapsed:Xt,onChartDimensionFieldIdChange:R=>Q(R),onChartPrimaryValueFieldIdChange:R=>be(R),onChartSecondaryValueFieldIdChange:R=>Ce(R),onChartTypeChange:R=>Le(R),onToggleCollapse:()=>_e(R=>!R),getAggregationLabel:I}),e(Tn,{title:g("pivot.table.sectionTitle"),subtitle:Ke.length>0?Ke.map(R=>A.get(R)?.label??R).join(" > "):g("pivot.table.dimensions"),collapsed:Vt,onToggleCollapse:()=>qe(R=>!R),expandAriaLabel:g("pivot.table.collapse.ariaExpand"),collapseAriaLabel:g("pivot.table.collapse.ariaCollapse"),bodySx:{p:0},headerActions:Ln,children:J===null?e("div",{sx:{py:5,px:{xs:1.2,md:1.6},textAlign:"center"},children:e(L,{component:"div",sx:{fontSize:"0.86rem",fontWeight:400,color:"var(--orb-fg)"},children:w})}):e("div",{sx:{maxHeight:s},children:c("table",{className:"orb-tbl",size:"small",stickyHeader:true,children:[e("thead",{children:(Kr.length>0?Kr:[[]]).map((R,_)=>c("tr",{children:[_===0&&e("td",{rowSpan:Math.max(Kr.length,1),sx:G=>({fontWeight:800,fontSize:"0.76rem",color:"text.primary",bgcolor:vt()==="dark"?"var(--orb-canvas)":"var(--orb-surface)",borderBottom:`1px solid ${G.palette.divider}`,pl:2,minWidth:220,verticalAlign:"middle"}),children:Ke.length>0?Ke.map(G=>A.get(G)?.label).join(" > "):g("pivot.table.dimensions")}),(R.length>0?R:Rr.map(G=>({key:G.id,label:G.label,colSpan:1,rowSpan:1,expandable:false,expanded:false}))).map(G=>e("td",{align:"center",colSpan:G.colSpan,rowSpan:G.rowSpan,sx:de=>({fontWeight:800,fontSize:"0.75rem",color:"text.primary",bgcolor:vt()==="dark"?"var(--orb-canvas)":"var(--orb-surface)",borderBottom:`1px solid ${de.palette.divider}`,minWidth:148,verticalAlign:"middle"}),children:c("div",{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:.4},children:[G.expandable&&e(ae,{size:"small",onClick:()=>nr(G.key),sx:{width:22,height:22,p:0,ml:-0.2},children:G.expanded?e(Vr,{size:12}):e(ko,{size:12})}),e("div",{component:"span",children:G.label})]})},G.key))]},`pivot-header-row-${_}`))}),c("tbody",{children:[J.rowTree.map(R=>e(Qi,{node:R,dataColumns:jo,fieldMap:A,level:0,expandedKeys:Mt,onToggle:Ct,getValue:(_,G)=>{let de=Oo.get(G);return de?no(_,de):0}},R.key)),oo&&e(Qi,{node:oo,dataColumns:jo,fieldMap:A,level:0,expandedKeys:Mt,onToggle:Ct,getValue:(R,_)=>{let G=Oo.get(_);return G?no(R,G):0}})]})]})})}),c(Lt,{open:De,onClose:()=>ye(false),maxWidth:"xs",fullWidth:true,children:[e("div",{className:"orb-dialog-title",children:g("pivot.preset.saveDialogTitle")}),e("div",{className:"orb-dialog-content",children:e(ze,{autoFocus:true,fullWidth:true,margin:"dense",label:g("pivot.preset.nameLabel"),value:Be,onChange:R=>at(R.target.value),onKeyDown:R=>{R.key==="Enter"&&(R.preventDefault(),Ir());}})}),c("div",{className:"orb-dialog-actions",children:[e(we,{onClick:()=>ye(false),children:g("common.cancel")}),e(we,{variant:"contained",onClick:Ir,disabled:!Be.trim(),children:g("common.save")})]})]})]})};var Ju=(t,r,o)=>{let n=[...t,...r];return o&&n.includes(o)?o:n[0]??""},Nl=(t,r)=>r&&t.some(o=>o.fieldId===r)?r:t[0]?.fieldId??"",em=(t,r,o)=>o===""?"":o&&o!==r&&t.some(n=>n.fieldId===o)?o:t.find(n=>n.fieldId!==r)?.fieldId??"",hO=({fields:t,initialLayout:r,initialFilterSelections:o={},initialShowGrandTotal:n=true,initialConfiguratorCollapsed:a=false,initialChart:i,initialChartCollapsed:s=false,initialTableCollapsed:l=false})=>{let d=er.useRef(0),u=er.useMemo(()=>new Set(t.map(q=>q.id)),[t]),p=er.useMemo(()=>new Map(t.map(q=>[q.id,q])),[t]),[f,b]=er.useState(()=>lr(r?.rows,u)),[m,v]=er.useState(()=>lr(r?.columns,u)),[y,g]=er.useState(()=>lr(r?.filters,u)),[x,h]=er.useState(()=>{let q=r?.values??[],De=new Set,ye=[];return q.forEach(Be=>{!u.has(Be.fieldId)||De.has(Be.fieldId)||(De.add(Be.fieldId),d.current+=1,ye.push({tokenId:`v${d.current}`,fieldId:Be.fieldId,aggregation:vr(Be.aggregation,p.get(Be.fieldId))}));}),ye}),[C,k]=er.useState(o),[w,T]=er.useState(n),[I,S]=er.useState(a),[A,D]=er.useState(()=>Ju(lr(r?.rows,u),lr(r?.columns,u),i?.dimensionFieldId)),[M,N]=er.useState(()=>{let q=(()=>{let De=r?.values??[],ye=new Set,Be=[];return De.forEach(at=>{!u.has(at.fieldId)||ye.has(at.fieldId)||(ye.add(at.fieldId),Be.push({tokenId:at.fieldId,fieldId:at.fieldId,aggregation:vr(at.aggregation,p.get(at.fieldId))}));}),Be})();return Nl(q,i?.primaryValueFieldId)}),[E,O]=er.useState(()=>{let q=(()=>{let ye=r?.values??[],Be=new Set,at=[];return ye.forEach(Ze=>{!u.has(Ze.fieldId)||Be.has(Ze.fieldId)||(Be.add(Ze.fieldId),at.push({tokenId:Ze.fieldId,fieldId:Ze.fieldId,aggregation:vr(Ze.aggregation,p.get(Ze.fieldId))}));}),at})(),De=Nl(q,i?.primaryValueFieldId);return em(q,De,i?.secondaryValueFieldId)}),[F,X]=er.useState(i?.chartType??"bar-vertical"),[H,Y]=er.useState(s),[W,j]=er.useState(l);er.useEffect(()=>{b(q=>{let De=q.filter(ye=>u.has(ye));return po(q,De)?q:De}),v(q=>{let De=q.filter(ye=>u.has(ye));return po(q,De)?q:De}),g(q=>{let De=q.filter(ye=>u.has(ye));return po(q,De)?q:De}),h(q=>{let De=q.filter(ye=>u.has(ye.fieldId)).map(ye=>({...ye,aggregation:vr(ye.aggregation,p.get(ye.fieldId))}));return qi(q,De)?q:De});},[p,u]),er.useEffect(()=>{D(q=>Ju(f,m,q));},[m,f]),er.useEffect(()=>{N(q=>Nl(x,q));},[x]),er.useEffect(()=>{O(q=>em(x,M,q));},[M,x]);let V=er.useCallback(q=>{b(lr(q,u));},[u]),z=er.useCallback(q=>{v(lr(q,u));},[u]),U=er.useCallback(q=>{g(lr(q,u));},[u]),K=er.useCallback(q=>{h(De=>{let ye=q??[],Be=new Set,at=[];return ye.forEach(Ze=>{if(!u.has(Ze.fieldId)||Be.has(Ze.fieldId))return;Be.add(Ze.fieldId);let St=De.find(Mt=>Mt.fieldId===Ze.fieldId);if(St){at.push({...St,aggregation:vr(Ze.aggregation??St.aggregation,p.get(Ze.fieldId))});return}d.current+=1,at.push({tokenId:`v${d.current}`,fieldId:Ze.fieldId,aggregation:vr(Ze.aggregation,p.get(Ze.fieldId))});}),at});},[p,u]),fe=er.useCallback(q=>{V(q.rows??[]),z(q.columns??[]),U(q.filters??[]),K(q.values??[]);},[z,U,V,K]),se=er.useCallback(q=>{if(q==="rows")return b([]);if(q==="columns")return v([]);if(q==="filters")return g([]);h([]);},[]),ue=er.useCallback((q,De)=>{if(q==="rows")return b(ye=>ye.filter(Be=>Be!==De));if(q==="columns")return v(ye=>ye.filter(Be=>Be!==De));if(q==="filters")return g(ye=>ye.filter(Be=>Be!==De));h(ye=>ye.filter(Be=>Be.tokenId!==De));},[]),Se=er.useCallback((q,De)=>{h(ye=>ye.map(Be=>Be.tokenId===q?{...Be,aggregation:vr(De,p.get(Be.fieldId))}:Be));},[p]),$e=er.useCallback((q,De)=>{k(ye=>({...ye,[q]:De}));},[]),ke=er.useCallback(()=>{k({});},[]),le=er.useCallback(()=>{T(q=>!q);},[]),Ee=er.useCallback(()=>{S(q=>!q);},[]),Me=er.useCallback(q=>{D(q);},[]),Pe=er.useCallback(q=>{N(q);},[]),Ve=er.useCallback(q=>{O(q);},[]),tt=er.useCallback(()=>{Y(q=>!q);},[]),nt=er.useCallback(()=>{j(q=>!q);},[]);return {model:er.useMemo(()=>({rowFields:f,setRowFields:b,columnFields:m,setColumnFields:v,filterFields:y,setFilterFields:g,valueFields:x,setValueFields:h,filterSelections:C,setFilterSelections:k,showGrandTotal:w,setShowGrandTotal:T,isConfiguratorCollapsed:I,setIsConfiguratorCollapsed:S,chartDimensionFieldId:A,setChartDimensionFieldId:D,chartPrimaryValueFieldId:M,setChartPrimaryValueFieldId:N,chartSecondaryValueFieldId:E,setChartSecondaryValueFieldId:O,chartType:F,setChartType:X,isChartCollapsed:H,setIsChartCollapsed:Y,isTableCollapsed:W,setIsTableCollapsed:j}),[A,M,E,F,m,y,C,H,I,W,f,w,x]),actions:{setRows:V,setColumns:z,setFilters:U,setValues:K,setLayout:fe,clearZone:se,removeFieldFromZone:ue,setAggregationForValue:Se,setFilterSelection:$e,resetFilterSelections:ke,toggleGrandTotal:le,toggleConfigurator:Ee,setChartDimension:Me,setChartPrimaryValue:Pe,setChartSecondaryValue:Ve,setChartType:X,toggleChart:tt,toggleTable:nt}}};var xO=({orientation:t="auto",defaultNavigationOpen:r,onNavOpenChange:o}={})=>{let n=sr(),a=xo("(orientation: portrait)"),i=xo(n.breakpoints.down("md")),s=er.useMemo(()=>t==="auto"?a||i?"portrait":"landscape":t,[i,a,t]),[l,d]=er.useState(r??s==="landscape");er.useEffect(()=>{d(r??s==="landscape");},[r,s]);let u=f=>{d(f),o?.(f);};return {resolvedOrientation:s,isPortraitViewport:a,isCompactViewport:i,navigationOpen:l,setNavigationOpen:u,toggleNavigationOpen:()=>u(!l)}};var ny=t=>{let r=Number(t||0);return Number.isFinite(r)?r:0},kO=({rows:t,rowKey:r="id",numericField:o,defaultSelectedId:n})=>{let i=t[0]?.[r],[s,l]=er.useState(n??i),d=er.useMemo(()=>t.find(m=>m[r]===s)||t[0],[r,t,s]),[u,p]=er.useState(()=>{let m=d?.[o];return m==null?"0":String(m)});return {selectedId:s,selectedRecord:d,editorValue:u,setEditorValue:p,selectRecord:m=>{let v=m[r];l(v);let y=m[o];p(y==null?"0":String(y));},applyEditorValue:m=>{if(s===void 0)return;let v=ny(u),y=t.map(g=>g[r]===s?{...g,[o]:v}:g);m(y);}}};P();var ay=["code_128","ean_13","ean_8","qr_code","upc_a","upc_e"],rm=(t,r,o,n)=>{r?.(t),n&&o?.();},DO=({open:t,onClose:r,title:o="Scan barcode",subtitle:n="Use the rear camera on the device. If scanning is unavailable, enter the code manually.",formats:a=ay,facingMode:i="environment",manualEntry:s=true,autoCloseOnDetect:l=true,scanIntervalMs:d=600,confirmLabel:u="Use code",cancelLabel:p="Close",manualPlaceholder:f="Enter barcode manually",onDetected:b,onError:m,sx:v})=>{let y=er__namespace.default.useRef(null),g=er__namespace.default.useRef(null),x=er__namespace.default.useRef(null),h=er__namespace.default.useRef(null),[C,k]=er__namespace.default.useState("idle"),[w,T]=er__namespace.default.useState(""),[I,S]=er__namespace.default.useState(null),[A,D]=er__namespace.default.useState(null),M=er__namespace.default.useCallback(()=>{x.current!==null&&(window.clearInterval(x.current),x.current=null),g.current&&(g.current.getTracks().forEach(O=>O.stop()),g.current=null),y.current&&(y.current.srcObject=null);},[]),N=er__namespace.default.useCallback(O=>{D(O),k("error"),m?.(O);},[m]);er__namespace.default.useEffect(()=>{if(!t){M(),k("idle"),D(null),T("");return}let O=false;return (async()=>{if(!(typeof window>"u"||typeof navigator>"u")){if(!navigator.mediaDevices?.getUserMedia){k("unsupported"),D("Camera access is not supported in this browser.");return}k("starting"),D(null);try{let X=await navigator.mediaDevices.getUserMedia({audio:!1,video:{facingMode:{ideal:i}}});if(O){X.getTracks().forEach(H=>H.stop());return}if(g.current=X,y.current&&(y.current.srcObject=X,await y.current.play()),!window.BarcodeDetector){k("unsupported"),D("BarcodeDetector is not available. Camera preview is ready and manual entry is enabled.");return}h.current=new window.BarcodeDetector({formats:a}),k("ready"),x.current=window.setInterval(async()=>{if(!(!y.current||!h.current)&&!(y.current.readyState<HTMLMediaElement.HAVE_CURRENT_DATA))try{let Y=(await h.current.detect(y.current)).find(j=>j.rawValue);if(!Y?.rawValue)return;let W={rawValue:Y.rawValue,format:Y.format};S(W),M(),rm(W,b,r,l);}catch(H){N(H instanceof Error?H.message:"Failed to detect barcode.");}},d);}catch(X){N(X instanceof Error?X.message:"Unable to start camera.");}}})(),()=>{O=true,M();}},[l,i,a,r,b,t,N,d,M]);let E=()=>{let O=w.trim();if(!O)return;let F={rawValue:O,format:"manual"};S(F),rm(F,b,r,l);};return c(Lt,{open:t,onClose:r,fullWidth:true,maxWidth:"sm",children:[e("div",{className:"orb-dialog-title",sx:{fontSize:"1rem",fontWeight:900},children:o}),e("div",{className:"orb-dialog-content",sx:{pt:"8px !important"},children:c(ie,{spacing:2,sx:v,children:[e(L,{sx:{fontSize:"0.88rem",color:"text.secondary",lineHeight:1.55},children:n}),c(Ae,{elevation:0,sx:{position:"relative",overflow:"hidden",borderRadius:4,border:"1px solid",borderColor:"divider",minHeight:280,background:vt()==="dark"?"linear-gradient(180deg, color-mix(in oklch, var(--orb-canvas) 92%, transparent), color-mix(in oklch, var(--orb-canvas) 96%, transparent))":"linear-gradient(180deg, var(--orb-surface), color-mix(in oklch, var(--orb-border) 92%, transparent))"},children:[e("video",{ref:y,muted:true,playsInline:true,autoPlay:true,style:{width:"100%",height:280,objectFit:"cover",display:"block"}}),e("div",{sx:{pointerEvents:"none",position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:e("div",{sx:{width:"72%",maxWidth:320,aspectRatio:"1.7 / 1",borderRadius:3,border:"2px solid rgba(255,255,255,0.95)",boxShadow:"0 0 0 999px rgba(15,23,42,0.24)",position:"relative"},children:e("div",{sx:{position:"absolute",top:"50%",left:0,right:0,height:2,bgcolor:"var(--orb-ai-accent)",boxShadow:"0 0 18px color-mix(in oklch, var(--orb-ai-accent) 85%, transparent)"}})})}),c("div",{sx:{position:"absolute",top:12,left:12,display:"flex",gap:1,flexWrap:"wrap"},children:[e(xt,{icon:e(Wd,{}),label:C==="ready"?"Camera ready":C==="starting"?"Starting camera":C==="unsupported"?"Preview only":C==="error"?"Scanner error":"Idle",size:"small",color:C==="error"?"error":"primary",variant:"filled"}),I?e(xt,{icon:e(ip,{}),label:`${I.format||"barcode"}: ${I.rawValue}`,size:"small",color:"success",variant:"filled"}):null]})]}),A?e(jr,{severity:C==="unsupported"?"info":"warning",children:A}):null,s?c(ie,{direction:{xs:"column",sm:"row"},spacing:1.25,children:[e(ze,{fullWidth:true,label:"Barcode",placeholder:f,value:w,onChange:O=>T(O.target.value)}),e(we,{variant:"contained",onClick:E,sx:{minHeight:56,px:2.5},children:u})]}):null]})}),e("div",{className:"orb-dialog-actions",sx:{px:3,pb:2},children:e(we,{onClick:r,children:p})})]})};P();var iy={default:"var(--orb-status-fg)",primary:"var(--orb-status-primary)",success:"var(--orb-status-success)",warning:"var(--orb-status-warning)",error:"var(--orb-status-error)",info:"var(--orb-status-info)"},BO=({title:t,description:r,kicker:o,icon:n,badges:a=[],metrics:i=[],footer:s,children:l,selected:d=false,draggable:u=false,isDragging:p=false,swipeThreshold:f=88,startAction:b,endAction:m,dragHandleProps:v,onClick:y,onSwipe:g,sx:x})=>{let[h,C]=er.useState(0),[k,w]=er.useState(false),T=er.useRef(null),I=er.useRef(0),S=er.useRef(0),A=!!(b||m),D=132,M=()=>{C(0),w(false),T.current=null,I.current=0,S.current=0;},N=H=>{(H==="start"?b:m)?.onTrigger?.(),g?.(H),M();},E=H=>{!A||H.target.closest('button, a, input, textarea, [data-no-swipe="true"]')||(T.current=H.pointerId,I.current=H.clientX,S.current=H.clientX,w(true),H.currentTarget.setPointerCapture(H.pointerId));},O=H=>{if(!k||T.current!==H.pointerId)return;S.current=H.clientX;let Y=S.current-I.current,W=Math.max(-D,Math.min(D,Y));C(W);},F=H=>{if(!k||T.current!==H.pointerId)return;let Y=S.current-I.current;if(Y>=f&&b){N("start");return}if(Y<=-f&&m){N("end");return}Math.abs(Y)<12&&y?.(),M();},X=(H,Y)=>{if(!H)return null;let W=H.backgroundColor||iy[H.tone||"default"];return e("div",{sx:{position:"absolute",top:0,bottom:0,[Y]:0,width:D,px:2,display:"flex",alignItems:"center",justifyContent:Y==="left"?"flex-start":"flex-end",color:"var(--orb-on-primary)",background:`linear-gradient(135deg, ${W}, rgba(15,23,42,0.92))`},children:c(ie,{direction:"row",spacing:1,alignItems:"center",children:[H.icon,e(L,{sx:{fontWeight:700,fontSize:"0.95rem"},children:H.label})]})})};return c("div",{sx:{position:"relative",overflow:"hidden",borderRadius:4,...x},children:[X(b,"left"),X(m,"right"),e(Ae,{elevation:0,onPointerDown:E,onPointerMove:O,onPointerUp:F,onPointerCancel:M,sx:{position:"relative",zIndex:1,p:2,borderRadius:4,border:"1px solid",borderColor:d?"primary.main":"divider",background:vt()==="dark"?"linear-gradient(180deg, color-mix(in oklch, var(--orb-surface-3) 96%, transparent), color-mix(in oklch, var(--orb-canvas) 92%, transparent))":"linear-gradient(180deg, var(--orb-canvas), var(--orb-surface))",color:"text.primary",boxShadow:d?"0 18px 42px color-mix(in oklch, var(--orb-primary) 18%, transparent)":"0 12px 28px rgba(15, 23, 42, 0.08)",transform:`translate3d(${h}px, 0, 0) scale(${p?.985:1})`,transition:k?"none":"transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease",touchAction:"pan-y",cursor:y?"pointer":"default",opacity:p?.9:1},children:c(ie,{spacing:1.5,children:[c(ie,{direction:"row",spacing:1.5,alignItems:"flex-start",children:[n?e("div",{sx:{mt:.25},children:n}):null,c("div",{sx:{flex:1,minWidth:0},children:[o?e(L,{sx:{fontSize:"0.72rem",fontWeight:700,letterSpacing:"0.08em",color:"text.secondary"},children:o}):null,e(L,{sx:{fontSize:"1.05rem",fontWeight:800,lineHeight:1.25},children:t}),r?e(L,{sx:{mt:.5,fontSize:"0.9rem",color:"text.secondary",lineHeight:1.45},children:r}):null]}),u?e("div",{"data-no-swipe":"true",...v,sx:{alignSelf:"center",display:"inline-flex",touchAction:"none"},children:e(ae,{size:"small",children:e(Yd,{})})}):null]}),a.length>0?e(ie,{direction:"row",spacing:1,useFlexGap:true,flexWrap:"wrap",children:a.map((H,Y)=>e(xt,{label:H,size:"small",sx:{borderRadius:999,fontWeight:700,bgcolor:"action.hover",color:"text.primary"}},Y))}):null,i.length>0?e("div",{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(110px, 1fr))",gap:1},children:i.map(H=>c(Ae,{elevation:0,sx:{p:1.25,borderRadius:3,bgcolor:"action.hover",border:"1px solid",borderColor:"divider",color:"text.primary"},children:[e(L,{sx:{fontSize:"0.72rem",color:"text.secondary"},children:H.label}),e(L,{sx:{fontSize:"1rem",fontWeight:800,lineHeight:1.2},children:H.value})]},H.id))}):null,l,s]})})]})};P();var ga=({label:t,onPress:r,emphasis:o="default"})=>e("div",{component:"button",type:"button",onClick:r,sx:n=>({minHeight:72,borderRadius:3,border:"1px solid",borderColor:o==="primary"?"primary.main":"divider",background:o==="primary"?n.palette.primary.main:o==="danger"?vt()==="dark"?"color-mix(in oklch, var(--orb-status-error) 18%, transparent)":"color-mix(in oklch, var(--orb-status-error) 10%, transparent)":vt()==="dark"?"rgba(255,255,255,0.04)":"var(--orb-canvas)",color:o==="primary"?"var(--orb-on-primary)":"text.primary",fontSize:"1.25rem",fontWeight:800,transition:"transform 120ms ease, box-shadow 160ms ease, background-color 160ms ease",cursor:"pointer",appearance:"none",WebkitAppearance:"none",WebkitTapHighlightColor:"transparent","&:active":{transform:"scale(0.98)"}}),children:t}),UO=({value:t,defaultValue:r="",title:o,subtitle:n,placeholder:a="0",allowDecimal:i=false,allowNegative:s=false,maxLength:l,confirmLabel:d,clearLabel:u,backspaceLabel:p,onChange:f,onSubmit:b,onClose:m,sx:v})=>{let{t:y}=pe(),[g,x]=er.useState(r),h=t??g,C=M=>{t===void 0&&x(M),f?.(M);},k=M=>{l&&h.length>=l||C(`${h}${M}`);},w=M=>{if(M==="00"){if(!h){C("0");return}k("00");return}k(M);},T=()=>{!i||h.includes(".")||C(h?`${h}.`:"0.");},I=()=>{if(s){if(h.startsWith("-")){C(h.slice(1));return}C(h?`-${h}`:"-");}},S=()=>{C(h.slice(0,-1));},A=()=>{C("");},D=()=>{b?.(h);};return e(Ae,{elevation:0,sx:{p:2,borderRadius:4,border:"1px solid",borderColor:"divider",bgcolor:"background.paper",...v},children:c(ie,{spacing:2,children:[c(ie,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",children:[c("div",{sx:{minWidth:0},children:[o?e(L,{sx:{fontSize:"1rem",fontWeight:800},children:o}):null,n?e(L,{sx:{mt:.5,fontSize:"0.86rem",color:"text.secondary"},children:n}):null]}),m?e(ae,{onClick:m,size:"small",children:e(qd,{})}):null]}),e(Ae,{elevation:0,sx:{p:2,borderRadius:3,border:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:e(L,{sx:{minHeight:38,fontSize:h?"1.9rem":"1.25rem",fontWeight:900,letterSpacing:"0.06em",color:h?"text.primary":"text.disabled"},children:h||a})}),c("div",{sx:{display:"grid",gridTemplateColumns:"repeat(3, minmax(0, 1fr))",gap:1.25},children:[["1","2","3","4","5","6","7","8","9"].map(M=>e(ga,{label:M,onPress:()=>w(M)},M)),e(ga,{label:s?"+/-":"00",onPress:s?I:()=>w("00")}),e(ga,{label:"0",onPress:()=>w("0")}),e(ga,{label:i?".":p?String(p):"DEL",onPress:i?T:S})]}),c("div",{sx:{display:"grid",gridTemplateColumns:"repeat(3, minmax(0, 1fr))",gap:1.25},children:[e("div",{component:"button",type:"button",onClick:S,sx:{minHeight:64,borderRadius:3,border:"1px solid",borderColor:"divider",bgcolor:"background.paper",cursor:"pointer",appearance:"none",WebkitAppearance:"none",WebkitTapHighlightColor:"transparent"},children:c(ie,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:[e(Vd,{}),e(L,{sx:{fontWeight:700},children:p||"DEL"})]})}),e(ga,{label:String(u||"CLR"),onPress:A,emphasis:"danger"}),e("div",{component:"button",type:"button",onClick:D,sx:M=>({minHeight:64,borderRadius:3,border:"1px solid",borderColor:"primary.main",background:M.palette.primary.main,color:"var(--orb-on-primary)",cursor:"pointer",appearance:"none",WebkitAppearance:"none",WebkitTapHighlightColor:"transparent"}),children:c(ie,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:[e(_d,{}),e(L,{sx:{fontWeight:800},children:d||y("common.ok")})]})})]})]})})};P();var nm=({touchMode:t="comfortable",sx:r,...o})=>{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},...r},children:e(Wr,{...o})})};P();var py=(t,r,o)=>{if(o?.(r),!!r.href){if(r.href.startsWith("http://")||r.href.startsWith("https://")){window.open(r.href,"_blank");return}t.push(r.href);}},am=({items:t,selectedId:r,orientation:o="auto",onItemSelect:n,sx:a})=>{let i=sr(),[s,l]=er.useState(false);er.useEffect(()=>{l(true);},[]);let d=xo("(orientation: portrait)"),u=xo(i.breakpoints.down("md")),p=o==="auto"?d||u?"portrait":"landscape":o,f=navigation.useRouter();return e("div",{sx:{display:"grid",gridTemplateColumns:!s||p==="portrait"?"repeat(2, minmax(0, 1fr))":"repeat(auto-fit, minmax(180px, 1fr))",gap:1.5,...a},children:t.map(b=>{let m=b.id===r,v=b.color||(m?i.palette.primary.main:i.palette.divider);return e(Ae,{elevation:0,sx:{overflow:"hidden",borderRadius:4,border:"1px solid",borderColor:m?"primary.main":"divider",boxShadow:m?"0 18px 40px color-mix(in oklch, var(--orb-primary) 16%, transparent)":"none",bgcolor:vt()==="dark"?"color-mix(in oklch, var(--orb-surface-3) 60%, transparent)":"background.paper"},children:e("div",{component:"button",type:"button",disabled:b.disabled,onClick:()=>py(f,b,n),sx:{width:"100%",p:2,minHeight:p==="portrait"?156:148,display:"block",border:0,background:"transparent",textAlign:"left",cursor:b.disabled?"not-allowed":"pointer",appearance:"none",WebkitAppearance:"none",WebkitTapHighlightColor:"transparent",color:"text.primary"},children:c(ie,{spacing:1.5,sx:{height:"100%"},children:[c(ie,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",children:[e("div",{sx:{width:44,height:44,borderRadius:3,display:"grid",placeItems:"center",color:m?"var(--orb-on-primary)":"text.primary",background:m?v:"action.hover"},children:b.icon||e(L,{sx:{fontSize:"1rem",fontWeight:900},children:b.title.slice(0,1).toUpperCase()})}),b.badge!==void 0?e("div",{sx:{minWidth:34,px:1,py:.4,borderRadius:999,bgcolor:m?"primary.main":"action.hover",color:m?"var(--orb-on-primary)":"text.secondary",textAlign:"center",fontWeight:800,fontSize:"0.8rem"},children:b.badge}):null]}),c("div",{sx:{flex:1,minWidth:0},children:[e(L,{sx:{fontSize:"1rem",fontWeight:800,lineHeight:1.25},children:b.title}),b.caption?e(L,{sx:{mt:.5,fontSize:"0.74rem",fontWeight:700,color:"text.secondary"},children:b.caption}):null,b.description?e(L,{sx:{mt:.75,fontSize:"0.84rem",lineHeight:1.45,color:"text.secondary"},children:b.description}):null]})]})})},b.id)})})};P();var lm=(t,r)=>r.trim()?t.reduce((o,n)=>{let a=n.title?.toLowerCase().includes(r.toLowerCase())||n.label?.toLowerCase().includes(r.toLowerCase())||n.description?.toLowerCase().includes(r.toLowerCase()),i=n.children?lm(n.children,r):[];return (a||i.length>0)&&o.push({...n,children:i.length>0?i:n.children}),o},[]):t,fy=t=>{let r=new Set,o=n=>{n.forEach(a=>{a.children?.length&&(r.add(a.id),o(a.children));});};return o(t),r},cm=({collapsed:t=false,onToggle:r,className:o="",maxHeight:n,menuData:a=[],colorMode:i="light",orientation:s="auto",headerSlot:l,footerSlot:d,activeHref:u,onItemSelect:p})=>{let{t:f}=pe(),b=sr(),m=Dr("(orientation: portrait)"),v=Dr(b.breakpoints.down("md")),y=s==="auto"?m||v?"portrait":"landscape":s,g=i==="dark",x=navigation.useRouter(),h=navigation.usePathname(),[C,k]=er.useState(""),[w,T]=er.useState(new Set),I=er.useMemo(()=>lm(a,C),[a,C]),S=er.useMemo(()=>C.trim()?fy(I):w,[w,I,C]);er.useEffect(()=>{t&&T(new Set);},[t]);let A=O=>O.appurl||O.href||"",D=O=>{p?.(O);let F=A(O);if(F){if(F.startsWith("http://")||F.startsWith("https://")){window.open(F,"_blank");return}x.push(F);}},M=O=>{let F=!!O.children?.length;if(t&&F){r?.();return}if(F){T(X=>{let H=new Set(X);return H.has(O.id)?H.delete(O.id):H.add(O.id),H});return}D(O);},N=O=>{let F=u||h,X=A(O);return !!(X&&F===X)},E=(O,F=0)=>{let X=!!O.children?.length,H=S.has(O.id),Y=N(O);return e("div",{sx:{pl:F===0?0:1.5},children:c(Ae,{elevation:0,sx:{mb:1,overflow:"hidden",borderRadius:3,border:"1px solid",borderColor:Y?"primary.main":"divider",bgcolor:Y?"action.selected":"background.paper"},children:[c("div",{component:"button",type:"button",onClick:()=>M(O),sx:{width:"100%",px:1.5,py:1.4,display:"flex",alignItems:"center",gap:1.25,border:0,background:"transparent",textAlign:"left",cursor:"pointer",appearance:"none",WebkitAppearance:"none",WebkitTapHighlightColor:"transparent"},children:[e(Qa,{variant:"rounded",sx:{width:40,height:40,bgcolor:Y?"primary.main":"action.hover",color:Y?"var(--orb-on-primary)":"text.primary"},children:O.icon||(O.title||O.label||"?").slice(0,1).toUpperCase()}),c("div",{sx:{flex:1,minWidth:0},children:[e(L,{sx:{fontSize:"0.95rem",fontWeight:800,lineHeight:1.2},children:O.title||O.label}),O.description?e(L,{sx:{mt:.4,fontSize:"0.78rem",color:"text.secondary",lineHeight:1.35},children:O.description}):null]}),X?e(an,{sx:{transform:H?"rotate(180deg)":"rotate(0deg)",transition:"transform 180ms ease"}}):e(ri,{color:"action"})]}),X?e(nn,{in:H,children:e("div",{sx:{px:1.25,pb:1.25},children:O.children?.map(W=>E(W,F+1))})}):null]})},O.id)};return t?e(Ae,{elevation:0,className:o,sx:{width:y==="portrait"?"100%":88,p:1,borderRadius:4,border:"1px solid",borderColor:"divider",bgcolor:g?"var(--orb-surface)":"color-mix(in oklch, var(--orb-canvas) 88%, transparent)",maxHeight:n?`${n}px`:void 0,overflowY:"auto"},children:c(ie,{spacing:1,children:[e(ae,{onClick:r,sx:{width:48,height:48,alignSelf:"center",bgcolor:"action.hover"},title:f("navigation.expand"),children:e(li,{})}),a.map(O=>e(ae,{onClick:()=>M(O),sx:{width:56,height:56,alignSelf:"center",borderRadius:3,bgcolor:N(O)?"primary.main":"action.hover",color:N(O)?"var(--orb-on-primary)":"text.primary"},children:O.icon||(O.title||O.label||"?").slice(0,1).toUpperCase()},O.id))]})}):e(Ae,{elevation:0,className:o,sx:{width:y==="portrait"?"100%":320,p:1.25,borderRadius:5,border:"1px solid",borderColor:"divider",bgcolor:g?"var(--orb-surface)":"color-mix(in oklch, var(--orb-canvas) 88%, transparent)",maxHeight:n?`${n}px`:void 0,overflow:"hidden",display:"flex",flexDirection:"column"},children:c(ie,{spacing:1.25,sx:{flex:1,minHeight:0},children:[c(ie,{direction:"row",spacing:1,alignItems:"center",children:[e(ze,{value:C,onChange:O=>k(O.target.value),placeholder:f("navigation.searchPlaceholder"),size:"small",fullWidth:true,InputProps:{startAdornment:e(sp,{fontSize:"small",color:"action"})}}),y==="landscape"&&!t?e(ae,{onClick:r,sx:{bgcolor:"action.hover"},children:e(rp,{})}):null]}),l,e("div",{sx:{flex:1,minHeight:0,overflowY:"auto",pr:.25},children:I.length>0?I.map(O=>E(O)):e(L,{sx:{p:2,fontSize:"0.88rem",color:"text.secondary",textAlign:"center"},children:f("navigation.noMatch")})}),d]})})};P();var dm=(t,r)=>{let o=r[t.id];if(t.render)return t.render(o,r);if(o==null||o==="")return "--";if(t.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)},by=t=>er__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}),hy=(t,r)=>{let o=r[t.id];if(o==null||o==="")return "--";if(t.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)},vy=({summaryRow:t,visibleColumns:r,columns:o})=>{let n=o.filter(a=>r.includes(a.id)&&t[a.id]!=="");return n.length===0?null:e(Ae,{elevation:0,sx:{p:1.5,borderRadius:4,border:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:c(ie,{spacing:1,children:[e(L,{sx:{fontSize:"0.82rem",fontWeight:800,color:"text.secondary"},children:"Summary"}),e("div",{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(132px, 1fr))",gap:1},children:n.map(a=>c(Ae,{elevation:0,sx:{p:1.1,borderRadius:3,border:"1px solid",borderColor:"divider"},children:[e(L,{sx:{fontSize:"0.72rem",color:"text.secondary"},children:a.label}),e(L,{sx:{mt:.25,fontSize:"0.96rem",fontWeight:800},children:t[a.id]})]},`summary-${a.id}`))})]})})},yy=t=>{let{t:r}=pe(),o=sr(),{title:n,showToolbar:a=true,selectionMode:i,selected:s=[],onSelectionChange:l,actions:d,extraTools:u,fitContainer:p=false,fullWidth:f=false,maxHeight:b,loading:m=false,rowsPerPageOptions:v=[20,50,100,-1],onLayoutSave:y,filterConfig:g,rowKey:x,tableKey:h="default",graphReport:C,quickCreate:k,quickEdit:w,quickDelete:T,serviceUrl:I,orientation:S="auto",cardTitleField:A,cardSubtitleFields:D,toolbarSlot:M,emptyState:N,rowHeight:E="comfortable",cardActionSlot:O,renderCardFooter:F,onRowClick:X}=t,H=n||r("table.title.default"),Y=Dr("(orientation: portrait)"),W=Dr(o.breakpoints.down("md")),j=S==="auto"?Y||W?"portrait":"landscape":S,{columns:V,filterText:z,setFilterText:U,visibleColumns:K,showSummary:fe,setShowSummary:se,summaryColumns:ue,grouping:Se,setGrouping:$e,expandedGroups:ke,groupAnchorEl:le,setGroupAnchorEl:Ee,summaryAnchorEl:Me,setSummaryAnchorEl:Pe,anchorEl:Ve,setAnchorEl:tt,contextMenu:nt,sortedAndFilteredRows:it,summaryRow:q,visibleRows:De,page:ye,setPage:Be,rowsPerPage:at,setRowsPerPage:Ze,totalDisplayCount:St,setSelected:Mt,handleClick:Ot,toggleSummaryColumn:At,handleExport:re,handleCloseContextMenu:Ke,toggleColumnVisibility:Fe,toggleGroupExpand:ce,handleExpandGroupRecursively:ve,handleCollapseGroupRecursively:te,handleLayoutLoad:he,handleVariantLoad:Ne,handleLayoutSave:Je,effectiveAppId:st,currentLayoutData:pt,currentLayoutId:Bt,layoutIdToLoad:Xt,graphReportOpen:Vt,handleOpenGraphReport:wt,handleCloseGraphReport:Wt}=hn(t),ht=C?.enabled??false,Nt=ht&&(C?.interaction?.enabled??true),lt=Ii(),Ft=x||"id",Yt=er__namespace.default.useMemo(()=>({borderRadius:999,fontWeight:700,borderColor:rt(o.palette.divider,vt()==="dark"?.55:.3),bgcolor:vt()==="dark"?rt(o.palette.common.white,.06):rt(o.palette.background.paper,.92),color:o.palette.text.primary,"& .orb-chip-label":{px:1.05}}),[o]),Z=er__namespace.default.useMemo(()=>({...Yt,borderColor:rt(o.palette.primary.main,vt()==="dark"?.42:.24),bgcolor:vt()==="dark"?rt(o.palette.primary.main,.16):rt(o.palette.primary.main,.08)}),[Yt,o]),$=er__namespace.default.useMemo(()=>{let ee=new Set(s);return it.filter(Oe=>ee.has(Oe?.[Ft]))},[Ft,s,it]),Q=$.length===1?$[0]:null,be=!!k?.enabled,Ce=!!w?.enabled,Le=!!T?.enabled,_e=k?.fields,qe=k?.excludeFields||[],je=k?.initialValues||{},mt=w?.fields,ft=w?.excludeFields||[],Rt=w?.editableFields||[],yt=w?.nonEditableFields||[],B=w?.primaryKeys?.length?w.primaryKeys:[Ft],[J,ge]=er__namespace.default.useState(false),[Te,et]=er__namespace.default.useState(false),[Xe,kt]=er__namespace.default.useState({}),[bt,gt]=er__namespace.default.useState(false),[Ct,nr]=er__namespace.default.useState(false),[Et,Zt]=er__namespace.default.useState({}),[Ht,Kt]=er__namespace.default.useState(false),[$t,rr]=er__namespace.default.useState(false),ar=m||Te||Ct||$t,fr=er__namespace.default.useMemo(()=>{let ee=[...V];if(Array.isArray(_e)&&_e.length>0){let Oe=new Set(_e);ee=ee.filter(Qe=>Oe.has(Qe.id));}if(qe.length>0){let Oe=new Set(qe);ee=ee.filter(Qe=>!Oe.has(Qe.id));}return ee.filter(Oe=>!!Oe?.id)},[V,qe,_e]),Ir=er__namespace.default.useMemo(()=>{let ee=[...V];if(Array.isArray(mt)&&mt.length>0){let Oe=new Set(mt);ee=ee.filter(Qe=>Oe.has(Qe.id));}if(ft.length>0){let Oe=new Set(ft);ee=ee.filter(Qe=>!Oe.has(Qe.id));}return ee.filter(Oe=>!!Oe?.id)},[V,ft,mt]),Mr=er__namespace.default.useMemo(()=>new Set(B),[B]),oo=er__namespace.default.useMemo(()=>new Set(Rt),[Rt]),yr=er__namespace.default.useMemo(()=>new Set(yt),[yt]),Or=er__namespace.default.useCallback(ee=>oo.size>0?oo.has(ee):!(yr.has(ee)||Mr.has(ee)),[oo,yr,Mr]);er__namespace.default.useEffect(()=>{!Vt&&lt.hasActiveFilters&&lt.clearAll();},[lt,Vt]);let qo=()=>{let ee={};fr.forEach(Oe=>{ee[Oe.id]=je[Oe.id]??"";}),kt(ee),ge(true);},Xo=(ee,Oe)=>{kt(Qe=>({...Qe,[ee]:Oe}));},Lo=async()=>{if(!k?.onSubmit){ge(false);return}try{et(!0),await k.onSubmit(Xe),ge(!1);}finally{et(false);}},Yo=()=>{if(!Q)return;let ee={};Ir.forEach(Qe=>{ee[Qe.id]=Q[Qe.id]??"";});let Oe=w?.getInitialValues?{...ee,...w.getInitialValues(Q)}:ee;Zt(Oe),gt(true);},Zo=(ee,Oe)=>{Zt(Qe=>({...Qe,[ee]:Oe}));},Rr=async()=>{if(Q){if(!w?.onSubmit){gt(false);return}try{nr(!0),await w.onSubmit(Et,Q),gt(!1);}finally{nr(false);}}},Oo=()=>{$.length!==0&&Kt(true);},jo=async()=>{if($.length===0){Kt(false);return}if(!T?.onConfirm){Kt(false),Mt([]),l?.([]);return}try{rr(!0),await T.onConfirm($),Kt(!1),Mt([]),l?.([]);}finally{rr(false);}},Kr=it,{fieldMapping:no}=mn({rows:Kr,config:{...C,title:C?.title||`${H} ${r("graph.reportTitle")}`}}),Ln=er__namespace.default.useMemo(()=>Nt?lt.applyRows(Kr,no):Kr,[no,lt,Nt,Kr]),{model:Fo}=mn({rows:Ln,config:{...C,title:C?.title||`${H} ${r("graph.reportTitle")}`,fieldMapping:no}}),R=Fo.table.columns.map(ee=>({id:ee.id,label:ee.label,align:ee.align||"left",minWidth:120,numeric:ee.align==="right"})),_=st?e(bn,{appId:st,tableKey:h,currentLayoutData:pt,onLayoutLoad:he,targetLayoutId:Xt,activeLayoutId:Bt,serviceUrl:I??g?.serviceUrl}):null,G=V.filter(ee=>K.includes(ee.id)),de=G.find(ee=>ee.id===A)||G[0],He=D?.map(ee=>G.find(Oe=>Oe.id===ee)).filter(Boolean)||G.filter(ee=>ee.id!==de?.id).slice(0,j==="portrait"?2:3),ot=G.filter(ee=>ee.id!==de?.id&&!He.some(Oe=>Oe.id===ee.id)),Ge=[M,u].filter(Boolean),oe=c(jsxRuntime.Fragment,{children:[e(pn,{groupAnchorEl:le,setGroupAnchorEl:Ee,grouping:Se,setGrouping:$e,columns:V}),e(un,{anchorEl:Ve,setAnchorEl:tt,columns:V,visibleColumns:K,toggleColumnVisibility:Fe}),e(yi,{anchorEl:Me,setAnchorEl:Pe,showSummary:fe,setShowSummary:se,columns:V,summaryColumns:ue,toggleSummaryColumn:At}),e(Ci,{contextMenu:nt,handleCloseContextMenu:Ke,columns:V,visibleColumns:K,toggleColumnVisibility:Fe})]}),me=(ee,Oe,Qe)=>{let Re=s.includes(Oe),Ye=j==="portrait"?"repeat(2, minmax(0, 1fr))":"repeat(auto-fit, minmax(140px, 1fr))",Pt=Qe%2===0?rt(o.palette.primary.main,vt()==="dark"?.09:.04):rt(o.palette.primary.main,vt()==="dark"?.05:.022),Qo=rt(o.palette.divider,.22);return e(Ae,{elevation:0,onClick:()=>{Ot({},ee),X?.(ee);},sx:{p:E==="compact"?1.25:1.5,borderRadius:4,border:"0.5px solid",borderColor:Re?rt(o.palette.primary.main,.38):Qo,background:Re?`linear-gradient(135deg, ${rt(o.palette.primary.main,.13)}, ${rt(o.palette.primary.main,.06)})`:`linear-gradient(135deg, ${Pt}, ${rt(o.palette.primary.main,.015)})`,boxShadow:Re?`0 12px 30px ${rt(o.palette.primary.main,.2)}`:`0 3px 10px ${rt(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:Re?o.palette.primary.main:Qe%2===0?rt(o.palette.primary.main,.26):rt(o.palette.text.primary,.16)},"&:hover":{boxShadow:`0 10px 20px ${rt(o.palette.primary.main,.12)}`,transform:"translateY(-1px)"},"&:active":{transform:"scale(0.995)"}},children:c(ie,{spacing:1.25,children:[c(ie,{direction:"row",spacing:1.25,alignItems:"flex-start",children:[i?e(It,{checked:Re,onClick:Sr=>Sr.stopPropagation(),onChange:()=>Ot({},ee),sx:{mt:-0.6,ml:-0.6}}):null,c("div",{sx:{flex:1,minWidth:0},children:[de?e(L,{sx:{fontSize:"1rem",fontWeight:900,lineHeight:1.25},children:dm(de,ee)}):null,He.length>0?e(ie,{direction:"row",spacing:.75,useFlexGap:true,flexWrap:"wrap",sx:{mt:.75},children:He.map(Sr=>e(xt,{label:`${Sr.label}: ${hy(Sr,ee)}`,size:"small",variant:"outlined",sx:Yt},`${Oe}-${Sr.id}`))}):null]}),O?e("div",{onClick:Sr=>Sr.stopPropagation(),children:O(ee)}):null]}),ot.length>0?e("div",{sx:{display:"grid",gridTemplateColumns:Ye,gap:1},children:ot.map(Sr=>c(Ae,{elevation:0,sx:{p:1,borderRadius:3,bgcolor:vt()==="dark"?rt(o.palette.background.default,.7):rt(o.palette.background.paper,.92),border:"0.1px solid",borderColor:rt(o.palette.divider,.24)},children:[e(L,{sx:{fontSize:"0.72rem",color:"text.secondary"},children:Sr.label}),by(dm(Sr,ee))]},`${Oe}-${Sr.id}-detail`))}):null,F?c(jsxRuntime.Fragment,{children:[e(Dt,{}),e("div",{onClick:Sr=>Sr.stopPropagation(),children:F(ee)})]}):null]})},Oe)};return c("div",{sx:{width:f?"100%":"auto",mb:p?0:2,...p?{flex:1,display:"flex",flexDirection:"column",minHeight:0,height:"100%",overflow:"hidden"}:{}},children:[g?e("div",{sx:{mb:2},children:e(nm,{...g,onVariantLoad:ee=>{Ne(ee),g.onVariantLoad?.(ee);},appId:g.appId,tableKey:h,currentLayout:[{tableKey:h,layoutData:pt}],currentLayoutId:Bt,layoutRefs:[{tableKey:h,layoutId:Bt}],variantService:g.variantService,serviceUrl:I??g.serviceUrl,touchMode:j==="portrait"?"expanded":"comfortable"})}):null,c(Ae,{sx:{width:f?"100%":"auto",mb:p?0:2,display:"flex",flexDirection:"column",overflow:"hidden",position:"relative",bgcolor:"transparent",backgroundImage:"none",boxShadow:"none","&::before":ar?{content:'""',position:"absolute",top:0,left:0,width:"100%",height:"3px",background:"linear-gradient(90deg, color-mix(in oklch, var(--orb-primary) 0%, transparent) 0%, color-mix(in oklch, var(--orb-primary) 25%, transparent) 25%, var(--orb-primary) 50%, color-mix(in oklch, var(--orb-primary) 25%, transparent) 75%, color-mix(in oklch, var(--orb-primary) 0%, transparent) 100%)",backgroundSize:"220% 100%",animation:"cTableTopMarquee 1.2s linear infinite",zIndex:6,pointerEvents:"none"}:{},"@keyframes cTableTopMarquee":{"0%":{backgroundPosition:"220% 0"},"100%":{backgroundPosition:"-120% 0"}},...b?{height:b}:p?{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(fi,{filterText:z,setFilterText:U,onRowsPerPageChange:Ze,rowsPerPage:at,rowsPerPageOptions:v,page:ye,count:St,onPageChange:Be,actions:d,extraTools:Ge,grouping:Se,setGroupAnchorEl:Ee,showSummary:fe,setShowSummary:se,setAnchorEl:tt,setSummaryAnchorEl:Pe,handleExport:re,showCreateButton:be,onOpenCreateDialog:qo,showEditButton:Ce,onOpenEditDialog:Yo,editDisabled:$.length!==1,showDeleteButton:Le,onOpenDeleteConfirm:Oo,deleteDisabled:$.length===0,onLayoutSave:y||g?.variantService&&g?.appId?Je:void 0,loading:m,layoutManager:_,onOpenGraphReport:ht?wt:void 0})}):null,e("div",{sx:{flex:1,minHeight:0,overflow:"auto",p:1.5},children:c(ie,{spacing:1.25,children:[De.length===0&&!m?N||e(Ae,{elevation:0,sx:{p:4,borderRadius:4,border:"1px dashed",borderColor:"divider",textAlign:"center"},children:e(L,{sx:{fontSize:"0.92rem",color:"text.secondary"},children:r("common.noData")})}):null,De.map((ee,Oe)=>{if(ee.type==="group"){let Ye=ke.has(ee.id);return e(Ae,{elevation:0,sx:{borderRadius:4,border:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:c("div",{component:"button",type:"button",onClick:()=>ce(ee.id),sx:{width:"100%",px:1.5,py:1.3,border:0,background:"transparent",display:"flex",alignItems:"center",gap:1,textAlign:"left",cursor:"pointer",appearance:"none",WebkitAppearance:"none",color:"text.primary"},children:[Ye?e(an,{}):e(ri,{}),c("div",{sx:{flex:1,minWidth:0},children:[c(L,{sx:{fontSize:"0.94rem",fontWeight:800},children:[ee.field,": ",ee.value]}),c(L,{sx:{mt:.2,fontSize:"0.76rem",color:"text.secondary"},children:[ee.count," records"]})]}),Se.length>1&&ee.level<Se.length-1?c(ie,{direction:"row",spacing:.5,children:[e(xt,{size:"small",label:r("table.group.expandAll"),onClick:Pt=>{Pt.stopPropagation(),ve(ee.id);},sx:Z}),e(xt,{size:"small",label:r("table.group.collapseAll"),onClick:Pt=>{Pt.stopPropagation(),te(ee.id);},sx:Z})]}):null]})},ee.id)}let Qe=ee.data||ee,Re=ee.id||Qe[Ft]||Oe;return me(Qe,Re,Oe)}),fe?e(vy,{summaryRow:q,visibleColumns:K,columns:V}):null,m?e(L,{sx:{py:1,fontSize:"0.84rem",color:"text.secondary",textAlign:"center"},children:r("common.loading")}):null]})})]}),be?c(Lt,{open:J,onClose:()=>!Te&&ge(false),fullWidth:true,maxWidth:"sm",children:[e("div",{className:"orb-dialog-title",sx:{fontSize:"1rem",fontWeight:800},children:k?.title||r("quickCreate.createWithTitle",{title:H})}),e("div",{className:"orb-dialog-content",sx:{pt:"8px !important"},children:c("div",{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[fr.map(ee=>{let Oe=ee.type==="number"||ee.numeric?"number":ee.type==="date"?"date":"text";return e(ze,{label:ee.label||ee.id,value:Xe[ee.id]??"",onChange:Qe=>Xo(ee.id,Qe.target.value),type:Oe,fullWidth:true,InputLabelProps:{shrink:Oe==="date"?true:void 0}},`quick-create-${ee.id}`)}),k?.description?e(jr,{severity:"info",children:k.description}):null]})}),c("div",{className:"orb-dialog-actions",sx:{px:3,pb:2},children:[e(we,{onClick:()=>ge(false),disabled:Te,children:k?.cancelLabel||r("common.cancel")}),e(we,{onClick:Lo,variant:"contained",disabled:Te,children:k?.submitLabel||r("common.save")})]})]}):null,Ce?c(Lt,{open:bt,onClose:()=>!Ct&&gt(false),fullWidth:true,maxWidth:"sm",children:[e("div",{className:"orb-dialog-title",sx:{fontSize:"1rem",fontWeight:800},children:w?.title||r("quickEdit.editWithTitle",{title:H})}),e("div",{className:"orb-dialog-content",sx:{pt:"8px !important"},children:c("div",{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[Ir.map(ee=>{let Oe=ee.type==="number"||ee.numeric?"number":ee.type==="date"?"date":"text";return e(ze,{label:ee.label||ee.id,value:Et[ee.id]??"",onChange:Qe=>Zo(ee.id,Qe.target.value),type:Oe,disabled:!Or(ee.id),fullWidth:true,InputLabelProps:{shrink:Oe==="date"?true:void 0}},`quick-edit-${ee.id}`)}),w?.description?e(jr,{severity:"info",children:w.description}):null]})}),c("div",{className:"orb-dialog-actions",sx:{px:3,pb:2},children:[e(we,{onClick:()=>gt(false),disabled:Ct,children:w?.cancelLabel||r("common.cancel")}),e(we,{onClick:Rr,variant:"contained",disabled:Ct||!Q,children:w?.submitLabel||r("common.save")})]})]}):null,Le?e(jn,{open:Ht,type:"warning",title:T?.title||r("quickDelete.confirmTitle"),message:T?.message||($.length>1?r("quickDelete.confirmMessageMultiple",{count:$.length}):r("quickDelete.confirmMessageSingle")),confirmText:T?.confirmText||r("common.delete"),cancelText:T?.cancelText||r("common.cancel"),onClose:()=>!$t&&Kt(false),onConfirm:jo}):null,oe,ht?e(Pi,{open:Vt,onClose:Wt,model:Fo,aiAssistant:C?.aiAssistant,interaction:Nt?{enabled:true,filters:lt.filters,fieldMapping:no,onPrimaryDimensionClick:ee=>lt.setFilter("primaryDimension",ee),onSecondaryDimensionClick:ee=>lt.setFilter("secondaryDimension",ee),onStatusClick:ee=>lt.setFilter("status",ee),onClearFilter:lt.clearFilter,onClearAll:lt.clearAll}:void 0,tableContent:e(yy,{appId:st||"graph-report-internal",title:r("graph.dataBody"),columns:R,rows:Fo.table.rows,rowKey:"id",fullWidth:true,maxHeight:"420px",rowsPerPage:20,rowsPerPageOptions:[20,50,100],graphReport:{enabled:false},showSummary:false})}):null]})};P();var zF=({appTitle:t,children:r,menuData:o=[],workloadItems:n=[],workloadSelectedId:a,showNavigation:i=true,showWorkloadNav:s=true,orientation:l="auto",logo:d,headerSlot:u,actionSlot:p,portraitBottomSlot:f,contentSx:b,containerSx:m,user:v,onSearch:y,onSearchAdd:g,defaultNavigationOpen:x,navOpen:h,onNavOpenChange:C,onWorkloadSelect:k,locale:w="en",localeLabel:T,localeOptions:I,onLocaleChange:S,onUserSetting:A,onUserLogout:D,userMenuItems:M,leftHeaderSlot:N,rightHeaderSlot:E})=>{let O="orbcafe:page-layout-mode",[F,X]=er.useState("system"),[H,Y]=er.useState("light"),[W,j]=er.useState(false),[V,z]=er.useState(false),U=F==="system"?V?H:"light":F;er.useEffect(()=>{j(true);},[]),er.useEffect(()=>{try{let nt=window.localStorage.getItem(O);(nt==="light"||nt==="dark"||nt==="system")&&X(nt);}catch{}z(true);let Ve=window.matchMedia("(prefers-color-scheme: dark)"),tt=()=>{Y(Ve.matches?"dark":"light");};return tt(),Ve.addEventListener("change",tt),()=>Ve.removeEventListener("change",tt)},[]),er.useEffect(()=>{if(V)try{window.localStorage.setItem(O,F);}catch{}},[V,F]),er.useEffect(()=>{U==="dark"?(document.documentElement.classList.add("dark"),document.documentElement.classList.add("orb-dark"),document.documentElement.dataset.orbMode="dark",document.documentElement.style.colorScheme="dark"):(document.documentElement.classList.remove("dark"),document.documentElement.classList.remove("orb-dark"),document.documentElement.dataset.orbMode="light",document.documentElement.style.colorScheme="light");},[U]);let K=Dr("(orientation: portrait)"),fe=Dr("(max-width: 899.95px)"),se=l==="auto"?!W||K||fe?"portrait":"landscape":l,[ue,Se]=er.useState({landscape:x??true,portrait:false}),$e=ue[se],ke=h??$e,le=Ve=>{h===void 0&&Se(tt=>({...tt,[se]:Ve})),C?.(Ve);},Ee=c(ie,{direction:"row",spacing:1,alignItems:"center",children:[!W||i&&se==="portrait"?e(ae,{onClick:()=>le(!ke),sx:{bgcolor:"action.hover"},children:e(li,{})}):null,N]}),Me=c(ie,{direction:"row",spacing:1,alignItems:"center",children:[p,E]}),Pe=e(cm,{collapsed:se==="landscape"?!ke:false,onToggle:()=>le(!ke),menuData:o,orientation:se,colorMode:U,maxHeight:se==="landscape"?900:void 0});return e(Fn,{mode:F,children:e(Ga,{locale:w,children:c("div",{sx:[Ve=>({minHeight:"100vh",display:"flex",flexDirection:"column",background:Ve.palette.mode==="dark"?"linear-gradient(180deg, var(--orb-canvas) 0%, var(--orb-surface) 55%, var(--orb-surface-2) 100%)":Ve.palette.background.default}),...Array.isArray(m)?m:[m]],children:[e($i,{appTitle:t,logo:d===void 0?null:d,mode:F,onToggleMode:()=>X(Ve=>Ve==="system"?"dark":Ve==="dark"?"light":"system"),locale:w,localeLabel:T,localeOptions:I,onLocaleChange:S,user:v,onUserSetting:A,onUserLogout:D,userMenuItems:M,onSearch:y,onSearchAdd:g,leftSlot:Ee,rightSlot:Me}),u?e("div",{sx:{px:{xs:2,md:3},py:1.5,borderBottom:"1px solid",borderColor:"divider"},children:u}):null,c("div",{sx:{flex:1,minHeight:0,display:"flex",position:"relative"},children:[W&&i&&se==="landscape"?e("div",{sx:{p:1.5,pr:0,flexShrink:0},children:Pe}):null,!W||i&&se==="portrait"?e(Nd,{open:ke,onClose:()=>le(false),PaperProps:{sx:{width:"min(88vw, 360px)",p:1.25,bgcolor:"transparent",boxShadow:"none"}},children:Pe}):null,e("div",{sx:{flex:1,minWidth:0,minHeight:0,overflow:"auto",p:1.5,...b},children:c(ie,{spacing:1.5,children:[s&&n.length>0?e(am,{items:n,selectedId:a,orientation:se,onItemSelect:k}):null,e(Ae,{elevation:0,sx:{flex:1,minHeight:se==="portrait"?420:560,p:{xs:1.25,md:1.5},borderRadius:5,border:"1px solid",borderColor:"divider",bgcolor:"color-mix(in oklch, var(--orb-canvas) 72%, transparent)",backdropFilter:"blur(12px)",color:"text.primary"},children:r})]})})]}),se==="portrait"&&f?c(jsxRuntime.Fragment,{children:[e(Dt,{}),e("div",{sx:{p:1.5},children:f})]}):null]})})})};P();var gm=My__default.default(()=>Promise.resolve().then(()=>(mm(),um)).then(t=>t.COrbCanvas),{ssr:false,loading:()=>e("div",{className:"h-full w-full bg-transparent"})});function El({isRecording:t}){return e(framerMotion.AnimatePresence,{children:t&&e(framerMotion.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.5},className:"pointer-events-none absolute inset-0 z-0 overflow-hidden",children:c("div",{className:"relative flex h-full w-full items-center justify-center",children:[e("div",{className:"absolute inset-0",children:e(gm,{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(gm,{hue:10,hoverIntensity:.8,rotateOnHover:true,forceHoverState:true,backgroundColor:"transparent"})})]})})})}var qF=El;P();var bm=er.createContext(null);function Oy(t){if(!t||!(t instanceof HTMLElement))return false;let r=t.tagName;return !!(r==="INPUT"||r==="TEXTAREA"||r==="SELECT"||t.isContentEditable||t.closest('[data-voice-hotkey-ignore="true"]'))}function Fy({children:t,onVoiceSubmit:r,onVoicePartial:o,onVoiceError:n,longPressMs:a=200,disableSpaceTrigger:i=false,ignoreWhenFocusedInput:s=true,renderOverlay:l=true,wsUrl:d,silenceThresholdMs:u,minVolumeRms:p}){let[f,b]=er.useState(false),[m,v]=er.useState(false),y=er.useRef(null),g=er.useRef(false),x=er.useRef(false),h=er.useCallback(()=>{x.current=false,b(false);},[]),{isRecording:C,startRecording:k,stopRecording:w}=Sn({wsUrl:d,silenceThresholdMs:u,minVolumeRms:p,onTextUpdate:A=>{o?.(A);},onComplete:async A=>{try{A.trim()&&(v(!0),await r(A.trim()));}catch(D){let M=D instanceof Error?D.message:"Failed to process voice command";n?.(M);}finally{v(!1),h();}},onError:A=>{n?.(A),v(!1),g.current||h();}}),T=er.useCallback(async()=>{x.current=false,await k();},[k]),I=er.useCallback(()=>{w();},[w]);er.useEffect(()=>{if(i)return;let A=M=>{M.isComposing||(M.code==="Space"||M.key===" ")&&(g.current||M.repeat||s&&Oy(document.activeElement)||(g.current=true,M.preventDefault(),y.current=setTimeout(()=>{x.current=true,b(true),k();},a)));},D=M=>{(M.code==="Space"||M.key===" ")&&(y.current&&(clearTimeout(y.current),y.current=null),g.current=false,x.current&&(M.preventDefault(),b(false),w()));};return window.addEventListener("keydown",A),window.addEventListener("keyup",D),()=>{window.removeEventListener("keydown",A),window.removeEventListener("keyup",D),y.current&&(clearTimeout(y.current),y.current=null);}},[i,s,a,k,w]);let S=er.useMemo(()=>({isRecording:C,isHotkeyRecording:f,isSubmitting:m,startRecording:T,stopRecording:I}),[f,C,m,T,I]);return c(bm.Provider,{value:S,children:[l?e(El,{isRecording:f}):null,t]})}function By(){let t=er.useContext(bm);if(!t)throw new Error("useAINav must be used within CAINavProvider");return t}var JF=Fy,e2=By;function ut(...t){return tailwindMerge.twMerge(clsx.clsx(t))}P();var $y=({content:t,theme:r="light",size:o="base",defaultExpanded:n=false})=>{let[a,i]=er.useState(n),s=er.useMemo(()=>`${(o==="sm"?14:o==="lg"?18:16)-2}px`,[o]);return c("div",{className:`my-6 rounded-lg overflow-hidden transition-all duration-200 ${r==="dark"?"bg-[var(--orb-surface-2)]":"bg-[var(--orb-canvas)]"}`,style:{border:"0.5px solid var(--orb-border)"},children:[c("div",{className:"px-4 py-3 cursor-pointer flex items-center justify-between transition-colors duration-200 bg-[var(--orb-surface)] hover:bg-[var(--orb-hover)]",style:{borderBottom:"0.5px solid var(--orb-border)"},onClick:()=>i(!a),children:[c("span",{className:"flex items-center",children:[e(Aa,{className:"mr-2 h-4 w-4"}),e("span",{className:"font-medium text-[var(--orb-fg)]",style:{fontSize:o==="sm"?"14px":o==="lg"?"18px":"16px"},children:"\u601D\u8003\u8FC7\u7A0B"})]}),e(Fr,{className:`w-4 h-4 transition-transform duration-200 ${a?"rotate-180":""} text-[var(--orb-muted)]`})]}),a&&e("div",{className:"p-4 whitespace-pre-wrap italic font-light text-[var(--orb-muted)]",style:{fontSize:s,lineHeight:"1.3 !important"},children:t})]})},hm=$y;P();var qy=({content:t,language:r="text",isStreaming:o=false,className:n=""})=>{let a=Cr(),[i,s]=er.useState(false),l=async()=>{try{await navigator.clipboard.writeText(t),s(!0),setTimeout(()=>s(!1),2e3);}catch(u){console.error("\u590D\u5236\u5931\u8D25:",u);}},d=a==="dark"?prism.oneDark:prism.oneLight;return c("div",{className:ut("rounded-lg overflow-hidden border border-[var(--orb-border)] my-4",n),children:[c("div",{className:"flex items-center justify-between px-4 py-2 bg-[var(--orb-surface)] border-b border-[var(--orb-border)]",children:[e("span",{className:"text-xs font-medium text-[var(--orb-muted)] uppercase",children:r}),e("button",{onClick:l,className:"p-1 hover:bg-[var(--orb-hover)] rounded transition-colors",disabled:o,title:i?"Copied":"Copy code",children:i?e(qr,{size:14,className:"text-[var(--orb-status-success)]"}):e(Rc,{size:14,className:"text-[var(--orb-muted)]"})})]}),e("div",{className:"text-sm",children:e(reactSyntaxHighlighter.Prism,{language:r,style:d,customStyle:{margin:0,padding:"16px",fontSize:"14px",lineHeight:"1.5",backgroundColor:a==="dark"?"var(--orb-surface-2)":"var(--orb-canvas)"},wrapLongLines:true,children:t})})]})},vm=qy;P();var ym="orb-html-demo",Qy=160,Jy=560,eC=220,Fl=`<script>(function(){var post=function(){var height=Math.ceil(document.documentElement.scrollHeight);parent.postMessage({source:${JSON.stringify(ym)},height:height},'*')};addEventListener('load',post);addEventListener('resize',post);new MutationObserver(post).observe(document.documentElement,{subtree:true,childList:true,attributes:true,characterData:true});post()})()</script>`,tC="html,body{margin:0;padding:12px;font:14px/1.5 system-ui,sans-serif;}",rC=t=>/<html[\s>]/i.test(t),oC=t=>{let r=t.trim();return rC(r)?/<\/body>/i.test(r)?r.replace(/<\/body>/i,`${Fl}</body>`):`${r}${Fl}`:`<!DOCTYPE html><html><head><meta charset="utf-8"><style>${tC}</style></head><body>${r}${Fl}</body></html>`},nC=({content:t,title:r="Interactive HTML"})=>{let o=er.useRef(null),[n,a]=er.useState(eC),i=er.useMemo(()=>oC(t),[t]);return er.useEffect(()=>{let s=l=>{if(l.source!==o.current?.contentWindow)return;let d=l.data;!d||d.source!==ym||typeof d.height!="number"||!Number.isFinite(d.height)||a(Math.min(Jy,Math.max(Qy,Math.ceil(d.height))));};return window.addEventListener("message",s),()=>window.removeEventListener("message",s)},[]),c("figure",{className:"orb-html-demo-frame",children:[e("figcaption",{className:"orb-html-demo-caption",children:r}),e("iframe",{ref:o,className:"orb-html-demo",title:r,sandbox:"allow-scripts",srcDoc:i,style:{height:n}})]})},Cm=nC;P();var sC=t=>{let r=/line (\d+)/i.exec(t)?.[1];return r?`Mermaid syntax error around line ${r} \u2014 expand for details`:"Mermaid syntax error \u2014 expand for details"},lC=({content:t,isLoading:r,className:o="",style:n})=>{let a=er.useRef(null),[i,s]=er.useState(false),[l,d]=er.useState(null),u=Cr();return er.useEffect(()=>{let p=false,f=async()=>{if(!(!t.trim()||!a.current)){s(true),d(null);try{Sm__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)}`,v=t.replace(/```mermaid\n?|\n?```/g,"").trim(),{svg:y,bindFunctions:g}=await Sm__default.default.render(m,v);!p&&a.current&&(a.current.innerHTML=y,g?.(a.current));}catch(m){if(p)return;console.error("Mermaid render failed:",m),d(m instanceof Error?m.message:"Render failed");}finally{p||s(false);}}},b=setTimeout(()=>{f();},100);return ()=>{p=true,clearTimeout(b);}},[t,u]),c("div",{className:`mermaid-block ${o}`,style:n,children:[(r||i)&&c("div",{className:"flex items-center justify-center rounded border border-[var(--orb-border)] bg-[var(--orb-surface)] p-4 dark:bg-[var(--orb-surface-2)]",children:[e("div",{className:"mr-2 h-4 w-4 animate-spin rounded-full border-b-2 border-[var(--orb-primary)]"}),e("span",{className:"text-sm text-[var(--orb-muted)]",children:"Generating Diagram..."})]}),l&&c("div",{className:"rounded border border-[color-mix(in_oklch,var(--orb-status-error)_30%,transparent)] bg-[color-mix(in_oklch,var(--orb-status-error)_8%,transparent)] p-3 text-sm text-[var(--orb-status-error)]",children:[e("p",{className:"font-medium",children:sC(l)}),c("details",{className:"mt-1",children:[e("summary",{className:"cursor-pointer text-xs text-[var(--orb-muted)]",children:"Details & source"}),e("pre",{className:"mt-2 max-h-40 overflow-auto whitespace-pre-wrap break-words",children:l}),e("pre",{className:"mt-2 max-h-40 overflow-auto text-xs text-[var(--orb-muted)]",children:t})]})]}),e("div",{ref:a,className:`overflow-x-auto ${r||i||l?"hidden":""}`})]})},wm=lC;P();var cC=({title:t="\u53D1\u751F\u9519\u8BEF",content:r,errorCode:o,stack:n,icon:a,closable:i=true,onClose:s,onRetry:l,className:d="",...u})=>{let[p,f]=er.useState(false),[b,m]=er.useState(false),v=async()=>{if(l){m(true);try{await l();}catch(y){console.error("\u91CD\u8BD5\u5931\u8D25:",y);}finally{m(false);}}};return c("div",{className:`relative w-full overflow-hidden rounded-lg border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-sm transition-all hover:shadow-md ${d}`,...u,children:[c("div",{className:"flex p-4 border-l-4 border-l-[var(--orb-status-error)] bg-[color-mix(in_oklch,var(--orb-status-error)_8%,transparent)]",children:[e("div",{className:"flex-shrink-0 mr-3 text-[var(--orb-status-error)] mt-0.5",children:a||e(Ta,{className:"w-5 h-5"})}),c("div",{className:"flex-1 min-w-0",children:[c("div",{className:"flex items-center space-x-2 mb-1",children:[e("h4",{className:"text-base font-semibold text-[var(--orb-fg)]",children:t}),o&&e("span",{className:"text-xs font-mono px-1.5 py-0.5 rounded bg-[color-mix(in_oklch,var(--orb-status-error)_14%,transparent)] text-[var(--orb-status-error)]",children:o})]}),r&&e("div",{className:"text-sm text-[var(--orb-muted)] mb-3 leading-relaxed",children:typeof r=="string"?e("p",{className:"whitespace-pre-wrap",children:r}):r}),(l||n)&&c("div",{className:"flex items-center space-x-4 mt-2",children:[l&&c("button",{onClick:v,disabled:b,className:"flex items-center text-xs font-medium text-[var(--orb-status-error)] hover:opacity-80 transition-colors disabled:opacity-50",children:[e(Uc,{className:`w-3.5 h-3.5 mr-1.5 ${b?"animate-spin":""}`}),b?"\u91CD\u8BD5\u4E2D...":"\u91CD\u8BD5"]}),n&&c("button",{onClick:()=>f(!p),className:"flex items-center text-xs font-medium text-[var(--orb-muted)] hover:text-[var(--orb-fg)] dark:text-[var(--orb-muted)] transition-colors",children:[p?e(Fr,{className:"w-3.5 h-3.5 mr-1"}):e(Br,{className:"w-3.5 h-3.5 mr-1"}),p?"\u9690\u85CF\u8BE6\u60C5":"\u67E5\u770B\u8BE6\u60C5"]})]})]}),i&&s&&e("button",{onClick:s,className:"flex-shrink-0 ml-3 text-[var(--orb-muted)] hover:text-[var(--orb-fg)] transition-colors self-start",children:e(jt,{className:"w-4 h-4"})})]}),n&&p&&e("div",{className:"bg-[var(--orb-surface)] dark:bg-[var(--orb-canvas)] p-3 border-t border-[var(--orb-border)]",children:e("pre",{className:"text-xs font-mono text-[var(--orb-muted)] overflow-x-auto whitespace-pre-wrap p-2 bg-[var(--orb-canvas)] rounded border border-[var(--orb-border)]",children:n})})]})},os=cC;P();var dC=({title:t="\u8B66\u544A",content:r,warningType:o,severity:n="warning",warnings:a=[],icon:i,closable:s=true,onClose:l,onConfirm:d,actionText:u,className:p="",...f})=>{let b=()=>{switch(n){case "info":return {borderLeftColor:"border-l-blue-500",iconColor:"text-[var(--orb-primary)]",bgColor:"bg-[var(--orb-p50)]"};case "error":return {borderLeftColor:"border-l-[var(--orb-status-error)]",iconColor:"text-[var(--orb-status-error)]",bgColor:"bg-[color-mix(in_oklch,var(--orb-status-error)_8%,transparent)]"};case "success":return {borderLeftColor:"border-l-green-500",iconColor:"text-[var(--orb-status-success)]",bgColor:"bg-[color-mix(in_oklch,var(--orb-status-success)_8%,transparent)]"};default:return {borderLeftColor:"border-l-yellow-500",iconColor:"text-[var(--orb-status-warning)]",bgColor:"bg-[color-mix(in_oklch,var(--orb-status-warning)_8%,transparent)]"}}},m=()=>{switch(n){case "info":return e(Na,{className:"w-5 h-5"});case "error":return e(za,{className:"w-5 h-5"});case "success":return e(Ia,{className:"w-5 h-5"});default:return e(Tc,{className:"w-5 h-5"})}},v=b();return c("div",{className:`relative w-full overflow-hidden rounded-lg border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-sm transition-all hover:shadow-md ${p}`,...f,children:[c("div",{className:`flex p-4 border-l-4 ${v.borderLeftColor} ${v.bgColor}`,children:[e("div",{className:`flex-shrink-0 mr-3 ${v.iconColor}`,children:i||m()}),c("div",{className:"flex-1 min-w-0",children:[c("div",{className:"flex items-center justify-between mb-1",children:[e("h4",{className:"text-base font-semibold text-[var(--orb-fg)]",children:t}),o&&e("span",{className:"text-xs font-medium px-2 py-0.5 rounded-full bg-[var(--orb-surface)] text-[var(--orb-muted)]",children:o})]}),r&&e("div",{className:"text-sm text-[var(--orb-muted)] mb-2",children:r}),a&&a.length>0&&e("ul",{className:"mt-2 space-y-1",children:a.map((y,g)=>c("li",{className:"flex items-start text-sm text-[var(--orb-muted)]",children:[e("span",{className:"mr-2 mt-1.5 w-1 h-1 rounded-full bg-[var(--orb-muted)] flex-shrink-0"}),e("span",{children:y})]},g))})]}),s&&l&&e("button",{onClick:l,className:"flex-shrink-0 ml-3 text-[var(--orb-muted)] hover:text-[var(--orb-fg)] transition-colors",children:e(jt,{className:"w-4 h-4"})})]}),d&&e("div",{className:"bg-[color-mix(in_oklch,var(--orb-surface)_50%,transparent)] px-4 py-3 flex justify-end border-t border-[var(--orb-border)]",children:e("button",{onClick:d,className:"px-4 py-1.5 text-sm font-medium text-[var(--orb-on-primary)] bg-[var(--orb-primary)] hover:bg-[var(--orb-p600)] rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-[var(--orb-primary)] focus:ring-offset-2 dark:focus:ring-offset-gray-900",children:u||"\u786E\u8BA4"})})]})},ns=dC;P();var pC=({title:t="\u76F8\u5173\u63A8\u8350",content:r,suggestions:o,onSuggestionClick:n,maxDisplay:a=5,icon:i,closable:s=false,onClose:l,className:d="",...u})=>{let[p,f]=er.useState(false),[b,m]=er.useState(""),[v,y]=er.useState(false),g=er.useMemo(()=>b.trim()?o.filter(C=>C.toLowerCase().includes(b.toLowerCase())):o,[o,b]),x=er.useMemo(()=>p?g:g.slice(0,a),[g,p,a]),h=C=>{n?.(C);};return !o||o.length===0?null:c("div",{className:`w-full overflow-hidden rounded-lg border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-sm transition-all hover:shadow-md ${d}`,...u,children:[c("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--orb-border)] bg-[var(--orb-p50)]",children:[c("div",{className:"flex items-center space-x-2.5",children:[e("div",{className:"text-[var(--orb-primary)] flex-shrink-0",children:i||e(Aa,{className:"w-5 h-5"})}),c("div",{className:"flex flex-col",children:[e("h4",{className:"text-sm font-semibold text-[var(--orb-fg)] leading-tight",children:t}),r&&e("span",{className:"text-xs text-[var(--orb-muted)] mt-0.5",children:r})]})]}),c("div",{className:"flex items-center space-x-1",children:[o.length>3&&e("button",{onClick:()=>y(!v),className:`p-1.5 rounded-md transition-colors ${v?"bg-[var(--orb-p100)] text-[var(--orb-status-primary)]":"text-[var(--orb-muted)] hover:text-[var(--orb-fg)] hover:bg-[var(--orb-hover)]"}`,title:v?"\u5173\u95ED\u641C\u7D22":"\u641C\u7D22\u95EE\u9898",children:e(Hr,{className:"w-4 h-4"})}),s&&l&&e("button",{onClick:l,className:"text-[var(--orb-muted)] hover:text-[var(--orb-fg)] p-1.5 rounded-md hover:bg-[var(--orb-hover)] transition-colors",title:"\u5173\u95ED",children:e(jt,{className:"w-4 h-4"})})]})]}),v&&e("div",{className:"px-4 py-2 border-b border-[var(--orb-border)] bg-[color-mix(in_oklch,var(--orb-surface)_50%,transparent)]",children:c("div",{className:"relative",children:[e("input",{type:"text",placeholder:"\u641C\u7D22\u76F8\u5173\u95EE\u9898...",value:b,onChange:C=>m(C.target.value),className:"w-full text-sm px-3 py-1.5 pl-8 rounded border border-[var(--orb-border)] bg-[var(--orb-canvas)] text-[var(--orb-fg)] focus:ring-1 focus:ring-[var(--orb-primary)] focus:border-[var(--orb-primary)] outline-none transition-shadow",autoFocus:true}),e(Hr,{className:"absolute left-2.5 top-2 w-3.5 h-3.5 text-[var(--orb-muted)]"})]})}),c("div",{className:"p-2",children:[e("ul",{className:"space-y-1",children:x.map((C,k)=>e("li",{children:c("button",{onClick:()=>h(C),className:"w-full text-left px-3 py-2 rounded-md text-sm text-[var(--orb-fg)] hover:bg-[var(--orb-hover)] hover:text-[var(--orb-status-primary)] transition-colors group flex items-start justify-between",children:[e("span",{children:C}),e(Br,{className:"w-4 h-4 text-[var(--orb-muted)] group-hover:text-[var(--orb-status-primary)] opacity-0 group-hover:opacity-100 transition-all transform group-hover:translate-x-0.5"})]})},k))}),g.length>a&&e("button",{onClick:()=>f(!p),className:"w-full text-center py-2 text-xs font-medium text-[var(--orb-muted)] hover:text-[var(--orb-fg)] transition-colors border-t border-[var(--orb-border)] mt-1",children:p?"\u6536\u8D77":`\u67E5\u770B\u5168\u90E8 (${g.length})`}),g.length===0&&b&&e("div",{className:"text-center py-4 text-sm text-[var(--orb-muted)]",children:"\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u5EFA\u8BAE"})]})]})},as=pC;P();var uC=({title:t,content:r,toolName:o,parameters:n,result:a,status:i,duration:s,icon:l,closable:d=false,onClose:u,onAction:p,actionText:f,className:b="",...m})=>{let[v,y]=er.useState(false),[g,x]=er.useState(true),h=()=>{switch(i){case "pending":return {iconColor:"text-[var(--orb-primary)]",badgeBg:"bg-[var(--orb-p50)]",badgeText:"text-[var(--orb-status-primary)]",label:"\u6267\u884C\u4E2D"};case "error":return {iconColor:"text-[var(--orb-status-error)]",badgeBg:"bg-[color-mix(in_oklch,var(--orb-status-error)_10%,transparent)]",badgeText:"text-[var(--orb-status-error)]",label:"\u5931\u8D25"};default:return {iconColor:"text-[var(--orb-status-success)]",badgeBg:"bg-[color-mix(in_oklch,var(--orb-status-success)_8%,transparent)]",badgeText:"text-[var(--orb-status-success)]",label:"\u6210\u529F"}}},C=()=>{switch(i){case "pending":return e(Hc,{className:"w-5 h-5 animate-spin"});case "error":return e(za,{className:"w-5 h-5"});default:return e(Ia,{className:"w-5 h-5"})}},k=I=>I?I<1e3?`${I}ms`:`${(I/1e3).toFixed(2)}s`:"",w=h(),T=t||o||"\u5DE5\u5177\u8C03\u7528";return c("div",{className:`w-full overflow-hidden rounded-lg border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-sm transition-all hover:shadow-md ${b}`,...m,children:[c("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--orb-border)] bg-[color-mix(in_oklch,var(--orb-surface)_50%,transparent)]",children:[c("div",{className:"flex items-center space-x-3",children:[e("div",{className:`flex-shrink-0 ${w.iconColor}`,children:l||C()}),c("div",{children:[c("div",{className:"flex items-center space-x-2",children:[e("h4",{className:"text-sm font-semibold text-[var(--orb-fg)]",children:T}),e("span",{className:`text-[10px] font-medium px-1.5 py-0.5 rounded ${w.badgeBg} ${w.badgeText}`,children:w.label})]}),o&&t&&c("div",{className:"text-xs text-[var(--orb-muted)] flex items-center mt-0.5",children:[e(Vn,{className:"w-3 h-3 mr-1"}),o]})]})]}),c("div",{className:"flex items-center space-x-2 text-xs text-[var(--orb-muted)]",children:[s&&c("div",{className:"flex items-center bg-[var(--orb-surface)] px-2 py-1 rounded",children:[e(Dc,{className:"w-3 h-3 mr-1"}),k(s)]}),d&&u&&e("button",{onClick:u,className:"text-[var(--orb-muted)] hover:text-[var(--orb-fg)] transition-colors p-1 rounded",children:e(jt,{className:"w-4 h-4"})})]})]}),c("div",{className:"p-4",children:[r&&e("div",{className:"text-sm text-[var(--orb-muted)] mb-4 leading-relaxed",children:r}),n&&c("div",{className:"mb-3",children:[c("button",{onClick:()=>y(!v),className:"flex items-center text-xs font-medium text-[var(--orb-muted)] hover:text-[var(--orb-fg)] dark:text-[var(--orb-muted)] mb-2",children:[v?e(Fr,{className:"w-3.5 h-3.5 mr-1"}):e(Br,{className:"w-3.5 h-3.5 mr-1"}),e("div",{className:"w-3.5 h-3.5 mr-1.5"}),"\u8F93\u5165\u53C2\u6570"]}),v&&e("div",{className:"bg-[var(--orb-surface)] dark:bg-[var(--orb-canvas)] rounded border border-[var(--orb-border)] overflow-hidden",children:e("pre",{className:"p-3 text-xs font-mono text-[var(--orb-muted)] overflow-x-auto",children:JSON.stringify(n,null,2)})})]}),a&&c("div",{children:[c("button",{onClick:()=>x(!g),className:"flex items-center text-xs font-medium text-[var(--orb-muted)] hover:text-[var(--orb-fg)] dark:text-[var(--orb-muted)] mb-2",children:[g?e(Fr,{className:"w-3.5 h-3.5 mr-1"}):e(Br,{className:"w-3.5 h-3.5 mr-1"}),e(Vn,{className:"w-3.5 h-3.5 mr-1.5"}),"\u6267\u884C\u7ED3\u679C"]}),g&&e("div",{className:"bg-[var(--orb-surface)] dark:bg-[var(--orb-canvas)] rounded border border-[var(--orb-border)] overflow-hidden",children:e("pre",{className:"p-3 text-xs font-mono text-[var(--orb-muted)] overflow-x-auto",children:typeof a=="string"?a:JSON.stringify(a,null,2)})})]}),p&&e("div",{className:"mt-3 pt-3 border-t border-[var(--orb-border)] flex justify-end",children:e("button",{onClick:p,className:"px-4 py-1.5 text-sm font-medium text-[var(--orb-on-primary)] bg-[var(--orb-primary)] hover:bg-[var(--orb-p600)] rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-[var(--orb-primary)] focus:ring-offset-2 dark:focus:ring-offset-gray-900",children:f||"\u6267\u884C\u64CD\u4F5C"})})]})]})},is=uC;P();var gC=({data:t})=>{if(!t)return null;let r=er.useMemo(()=>{let o=[],n=[],a="\u6570\u636E\u8868\u683C";return Array.isArray(t)?(o=t,o.length>0&&(n=Object.keys(o[0]).map(i=>({id:i,label:i.charAt(0).toUpperCase()+i.slice(1),numeric:typeof o[0][i]=="number"})))):typeof t=="object"&&(a=t.title||a,o=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})):o.length>0&&(n=Object.keys(o[0]).map(s=>({id:s,label:s,numeric:typeof o[0][s]=="number"})))),o=o.map((i,s)=>({...i,id:i.id||`row_${s}`})),{title:a,columns:n,rows:o}},[t]);return r.rows.length===0?e("div",{className:"w-full my-4 p-4 border border-dashed border-[var(--orb-border)] rounded text-center text-[var(--orb-muted)]",children:"\u6682\u65E0\u8868\u683C\u6570\u636E"}):e("div",{className:"w-full my-4",children:e(Jr,{appId:"agent-ui-table-card",title:r.title,columns:r.columns,rows:r.rows,count:r.rows.length,rowKey:"id",fitContainer:false,maxHeight:"500px",rowsPerPage:10,rowsPerPageOptions:[5,10,20,50]})})},ss=gC;P();var fC=({title:t,subtitle:r,data:o,type:n,config:a={}})=>{let i=()=>{switch(n){case "bar-chart-card":return e(Fs,{className:"w-4 h-4 text-[var(--orb-chart-1)]"});case "line-chart-card":return e(Bc,{className:"w-4 h-4 text-[var(--orb-chart-positive)]"});case "pie-chart-card":return e(Gc,{className:"w-4 h-4 text-[var(--orb-chart-2)]"});case "combo-chart-card":return e(Pc,{className:"w-4 h-4 text-[var(--orb-chart-5)]"});case "heatmap-chart-card":return e(Oc,{className:"w-4 h-4 text-[var(--orb-chart-negative)]"});case "fishbone-chart-card":return e(Lc,{className:"w-4 h-4 text-[var(--orb-chart-4)]"});case "waterfall-chart-card":return e(jc,{className:"w-4 h-4 text-[var(--orb-chart-6)]"});case "google-map-card":return e(zn,{className:"w-4 h-4 text-[var(--orb-status-primary)]"});case "amap-card":return e(Vc,{className:"w-4 h-4 text-[var(--orb-status-primary)]"});default:return e(Fs,{className:"w-4 h-4"})}},s=()=>{if(!o&&n!=="google-map-card"&&n!=="amap-card")return e("div",{className:"text-[var(--orb-muted)] text-sm p-4 text-center",children:"No data available"});try{switch(n){case "bar-chart-card":return e(ra,{data:o,orientation:a.orientation||"horizontal",valueSuffix:a.valueSuffix||"",minHeight:a.minHeight});case "line-chart-card":return e(Ap,{data:o,color:a.color,valueSuffix:a.valueSuffix||"",height:a.height});case "pie-chart-card":let l=o.reduce((u,p)=>u+(Number(p.value)||0),0),d=o.map(u=>({name:u.name,value:Number(u.value)||0,percent:typeof u.percent=="number"?u.percent:l>0?(Number(u.value)||0)/l*100:0}));return e(Si,{data:d,variant:a.variant||"donut",size:a.size,colors:a.colors});case "combo-chart-card":return e(Ep,{data:o,barColor:a.barColor,lineColor:a.lineColor});case "heatmap-chart-card":return e(Lp,{data:o});case "fishbone-chart-card":return e(Op,{branches:o,effect:a.effect||t||"Problem"});case "waterfall-chart-card":return e(Fp,{data:o,height:a.height});case "google-map-card":return e(Bp,{embedUrl:a.embedUrl||o&&o[0]?.embedUrl,apiKey:a.apiKey,query:a.query||o&&o[0]?.query||t,height:a.height});case "amap-card":return e(Hp,{embedUrl:a.embedUrl||o&&o[0]?.embedUrl,keyword:a.keyword||o&&o[0]?.keyword||t,height:a.height});default:return c("div",{className:"text-[var(--orb-muted)] text-sm p-4 text-center",children:["Unsupported chart type: ",n]})}}catch(l){return console.error("Error rendering chart:",l),e("div",{className:"text-[var(--orb-status-error)] text-sm p-4 text-center",children:"Error rendering chart"})}};return c("div",{className:"w-full overflow-hidden rounded-lg border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-sm transition-all hover:shadow-md",children:[c("div",{className:"flex items-center px-4 py-3 border-b border-[var(--orb-border)] bg-[color-mix(in_oklch,var(--orb-surface)_50%,transparent)]",children:[e("div",{className:"mr-2 flex-shrink-0",children:i()}),c("div",{className:"flex-1 min-w-0",children:[e("h3",{className:"text-sm font-semibold text-[var(--orb-fg)] truncate",children:t}),r&&e("p",{className:"text-xs text-[var(--orb-muted)] mt-0.5 truncate",children:r})]})]}),c("div",{className:"p-4",children:[e("div",{className:"overflow-x-auto",children:s()}),e("div",{className:"mt-3",children:c("details",{className:"text-xs text-[var(--orb-muted)]",children:[e("summary",{className:"cursor-pointer hover:text-[var(--orb-fg)] transition-colors select-none font-medium opacity-60 hover:opacity-100",children:"View Raw Data"}),e("pre",{className:"mt-2 p-2 bg-[var(--orb-surface)] dark:bg-[var(--orb-canvas)] rounded border border-[var(--orb-border)] overflow-x-auto max-h-40",children:JSON.stringify(o,null,2)})]})})]})]})},ls=fC;P();var ms=["bar","column","line","pie","donut","scatter","bubble","list","metric","progress"],bC={bar:"Bars",column:"Columns",line:"Line",pie:"Pie",donut:"Donut",scatter:"Scatter",bubble:"Bubble",list:"List",metric:"Metric",progress:"Progress"},ps=480,Mn=214,Ut={top:18,right:16,bottom:38,left:30},tr=t=>typeof t=="number"&&Number.isFinite(t)?t:0,Rm=t=>t.toLocaleString(void 0,{maximumFractionDigits:1}),Ur=(t,r)=>`${t.id||t.label}-${r}`,Dm=(t,r=13)=>t.length>r?`${t.slice(0,Math.max(1,r-1))}\u2026`:t,us=(t,r,o)=>Math.min(o,Math.max(r,t)),mo=(t,r,o)=>t.color??o[r%o.length],go=(t,r)=>r?{onMouseEnter:()=>r.onItemHoverStart?.(t),onMouseMove:()=>r.onItemHoverStart?.(t),onMouseLeave:()=>r.onItemHoverEnd?.(t),onContextMenu:o=>r.onItemContextMenu?.(o,t)}:{},Nm=t=>{let r=t.map(a=>tr(a.value)),o=Math.min(0,...r),n=Math.max(0,...r);return {min:o,max:n===o?o+1:n,range:n===o?1:n-o}},hC=(t,r,o)=>{let n=ps-Ut.left-Ut.right,a=Mn-Ut.top-Ut.bottom,{max:i,range:s}=Nm(o),l=Ut.left+t*n/Math.max(o.length-1,1),d=Ut.top+(i-tr(r.value))/s*a,u=Ut.top+i/s*a;return {x:l,y:d,zeroY:u}},ds=(t,r,o,n)=>{let a=(n-90)*Math.PI/180;return {x:t+o*Math.cos(a),y:r+o*Math.sin(a)}},vC=(t,r,o,n,a,i)=>{let s=ds(t,r,o,i),l=ds(t,r,o,a),d=i-a>180?1:0;if(n===0)return `M ${t} ${r} L ${s.x} ${s.y} A ${o} ${o} 0 ${d} 0 ${l.x} ${l.y} Z`;let u=ds(t,r,n,i),p=ds(t,r,n,a);return `M ${s.x} ${s.y} A ${o} ${o} 0 ${d} 0 ${l.x} ${l.y} L ${p.x} ${p.y} A ${n} ${n} 0 ${d} 1 ${u.x} ${u.y} Z`},yC=({children:t})=>c("div",{className:"orb-metric-empty",role:"status",children:[e("span",{className:"orb-metric-empty-mark","aria-hidden":"true",children:"\u2014"}),e(L,{variant:"body2",muted:true,children:t})]}),CC=()=>c("div",{className:"orb-metric-loading",role:"status","aria-label":"Loading chart",children:[e("span",{className:"orb-metric-skeleton orb-metric-skeleton-wide"}),e("span",{className:"orb-metric-skeleton"}),e("span",{className:"orb-metric-skeleton orb-metric-skeleton-short"}),e("span",{className:"orb-metric-skeleton orb-metric-skeleton-wide"})]}),zl=({item:t,onItemClick:r,interactions:o})=>{let n=()=>r?.(t);return {...r?{role:"button",tabIndex:0,onClick:n,onKeyDown:i=>{r&&(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),n());}}:{},...go(t,o),style:{cursor:r||o?"pointer":"default"}}},xC=({loading:t,error:r,hasData:o,emptyState:n,children:a})=>t?e(CC,{}):r?e("div",{className:"orb-metric-error",role:"alert",children:r}):o?e(jsxRuntime.Fragment,{children:a}):e(yC,{children:n??"No data for the current selection."}),SC=({data:t,activeId:r,onItemClick:o,interactions:n,valueFormatter:a,colors:i})=>{let s=Math.max(...t.map(l=>Math.abs(tr(l.value))),1);return e("div",{className:"orb-metric-bars",role:"list","aria-label":"Chart data",children:t.map((l,d)=>{let u=tr(l.value),p=`${us(Math.abs(u)/s*100,0,100)}%`,f=r===l.id,b=c(jsxRuntime.Fragment,{children:[e("span",{className:"orb-metric-bar-label",title:l.label,children:l.label}),e("span",{className:"orb-metric-bar-track","aria-hidden":"true",children:e("span",{className:`orb-metric-bar-fill${f?" is-active":""}`,style:{width:p,backgroundColor:mo(l,d,i)}})}),e("span",{className:"orb-metric-bar-value",children:a(u)})]});return o?e("button",{type:"button",className:`orb-metric-bar-row${f?" is-active":""}`,onClick:()=>o(l),title:`${l.label}: ${a(u)}`,"aria-pressed":f,...go(l,n),children:b},Ur(l,d)):e("div",{className:`orb-metric-bar-row${f?" is-active":""}`,role:"listitem",...go(l,n),children:b},Ur(l,d))})})},wC=({data:t,activeId:r,onItemClick:o,interactions:n,valueFormatter:a,colors:i})=>{let s=Math.max(t.reduce((l,d)=>l+Math.max(tr(d.value),0),0),1);return e("div",{className:"orb-metric-progress",role:"list","aria-label":"Chart data",children:t.map((l,d)=>{let u=Math.max(tr(l.value),0),p=us(u/s*100,0,100),f=r===l.id,b=c(jsxRuntime.Fragment,{children:[c("span",{className:"orb-metric-progress-heading",children:[e("span",{title:l.label,children:l.label}),e("strong",{children:a(u)})]}),e("span",{className:"orb-metric-bar-track","aria-hidden":"true",children:e("span",{className:"orb-metric-bar-fill",style:{width:`${p}%`,backgroundColor:mo(l,d,i)}})})]});return o?e("button",{type:"button",className:`orb-metric-progress-row${f?" is-active":""}`,onClick:()=>o(l),"aria-pressed":f,...go(l,n),children:b},Ur(l,d)):e("div",{className:`orb-metric-progress-row${f?" is-active":""}`,role:"listitem",...go(l,n),children:b},Ur(l,d))})})},kC=({type:t,data:r,activeId:o,onItemClick:n,interactions:a,valueFormatter:i,secondaryValueFormatter:s,colors:l,ariaLabel:d})=>{let{min:u,max:p,range:f}=Nm(r),b=ps-Ut.left-Ut.right,m=Mn-Ut.top-Ut.bottom,v=Ut.top+p/f*m,y=Math.max(1,Math.ceil(r.length/6)),g=r.map((C,k)=>hC(k,C,r)),x=g.map(C=>`${C.x},${C.y}`).join(" "),h=Math.max(...r.map(C=>Math.max(tr(C.secondaryValue),0)),1);return e("div",{className:"orb-metric-svg-wrap",children:c("svg",{className:"orb-metric-svg",viewBox:`0 0 ${ps} ${Mn}`,role:"img","aria-label":d,children:[e("line",{className:"orb-metric-axis",x1:Ut.left,y1:v,x2:ps-Ut.right,y2:v}),e("line",{className:"orb-metric-grid",x1:Ut.left,y1:Ut.top,x2:Ut.left,y2:Mn-Ut.bottom}),t==="column"&&r.map((C,k)=>{let w=g[k],T=tr(C.value),I=Math.max(Math.abs(w.y-v),T===0?2:0),S=w.x-Math.min(18,b/Math.max(r.length*2,1)),A=Math.min(36,Math.max(10,b/Math.max(r.length*1.8,1))),D=o===C.id;return c("g",{...zl({item:C,onItemClick:n,interactions:a}),"aria-label":`${C.label}: ${i(T)}`,children:[e("rect",{className:`orb-metric-column${D?" is-active":""}`,x:S,y:Math.min(w.y,v),width:A,height:I,rx:4,fill:mo(C,k,l)}),c("title",{children:[C.label,": ",i(T)]}),(k%y===0||r.length<=6)&&e("text",{className:"orb-metric-svg-label",x:w.x,y:Mn-14,textAnchor:"middle",children:Dm(C.label)})]},Ur(C,k))}),(t==="line"||t==="scatter"||t==="bubble")&&c(jsxRuntime.Fragment,{children:[t==="line"&&e("polyline",{className:"orb-metric-line",fill:"none",points:x,stroke:l[0]}),r.map((C,k)=>{let w=g[k],T=o===C.id,I=t==="bubble"?7+Math.max(tr(C.secondaryValue),0)/h*12:t==="scatter"?5:4;return c("g",{...zl({item:C,onItemClick:n,interactions:a}),"aria-label":`${C.label}: ${i(tr(C.value))}`,children:[t==="line"&&e("circle",{className:`orb-metric-point${T?" is-active":""}`,cx:w.x,cy:w.y,r:T?6:4,fill:mo(C,k,l)}),t!=="line"&&e("circle",{className:`orb-metric-point${T?" is-active":""}`,cx:w.x,cy:w.y,r:I,fill:mo(C,k,l),opacity:t==="bubble"?.82:.9}),c("title",{children:[C.label,": ",i(tr(C.value)),t==="bubble"&&C.secondaryValue!==void 0?` \xB7 Size: ${s(tr(C.secondaryValue))}`:""]}),(k%y===0||r.length<=6)&&e("text",{className:"orb-metric-svg-label",x:w.x,y:Math.max(Ut.top+8,w.y-I-7),textAnchor:"middle",children:Dm(C.label)})]},Ur(C,k))})]}),e("text",{className:"orb-metric-axis-label",x:Ut.left,y:Ut.top-5,children:i(p)}),u<0&&e("text",{className:"orb-metric-axis-label",x:Ut.left,y:Mn-Ut.bottom+14,children:i(u)})]})})},PC=({type:t,data:r,activeId:o,onItemClick:n,interactions:a,valueFormatter:i,colors:s,ariaLabel:l})=>{let d=r.map(m=>({...m,value:Math.max(tr(m.value),0)})),u=d.reduce((m,v)=>m+v.value,0),p=72,f=92,b=0;return c("div",{className:"orb-metric-circular",children:[c("svg",{className:"orb-metric-donut",viewBox:"0 0 184 184",role:"img","aria-label":l,children:[d.map((m,v)=>{let y=m.value/u*360,g=b;b+=y;let x=o===m.id,h=y>=359.9?void 0:vC(f,f,p,t==="donut"?46:0,g,g+y),C=zl({item:m,onItemClick:n,interactions:a});return h?e("path",{className:`orb-metric-slice${x?" is-active":""}`,d:h,fill:mo(m,v,s),...C,children:c("title",{children:[m.label,": ",i(m.value)," (",(m.value/u*100).toFixed(1),"%)"]})},Ur(m,v)):e("circle",{className:`orb-metric-slice${x?" is-active":""}`,cx:f,cy:f,r:t==="donut"?60:p,fill:t==="donut"?"none":mo(m,v,s),stroke:t==="donut"?mo(m,v,s):void 0,strokeWidth:28,...C,children:c("title",{children:[m.label,": ",i(m.value)," (100%)"]})},Ur(m,v))}),t==="donut"&&e("circle",{cx:f,cy:f,r:44,fill:"var(--orb-surface)"}),t==="donut"&&e("text",{className:"orb-metric-donut-total",x:f,y:f+5,textAnchor:"middle",children:i(u)})]}),e("div",{className:"orb-metric-legend",role:"list","aria-label":"Chart legend",children:d.map((m,v)=>{let y=o===m.id;return c("button",{type:"button",className:`orb-metric-legend-item${y?" is-active":""}`,onClick:()=>n?.(m),disabled:!n,title:m.label,...go(m,a),children:[e("span",{className:"orb-metric-legend-dot",style:{backgroundColor:mo(m,v,s)}}),e("span",{className:"orb-metric-legend-label",children:m.label}),c("strong",{children:[(m.value/u*100).toFixed(0),"%"]})]},Ur(m,v))})})]})},TC=({data:t,activeId:r,onItemClick:o,interactions:n,valueFormatter:a,secondaryValueFormatter:i})=>e("div",{className:"orb-metric-list",role:"list","aria-label":"Chart data",children:t.map((s,l)=>{let d=c(jsxRuntime.Fragment,{children:[e("span",{className:"orb-metric-list-label",title:s.label,children:s.label}),e("span",{className:"orb-metric-list-value",children:a(tr(s.value))}),s.secondaryValue!==void 0&&e("span",{className:"orb-metric-list-secondary",children:i(tr(s.secondaryValue))})]});return o?e("button",{type:"button",className:`orb-metric-list-row${r===s.id?" is-active":""}`,onClick:()=>o(s),"aria-pressed":r===s.id,...go(s,n),children:d},Ur(s,l)):e("div",{className:`orb-metric-list-row${r===s.id?" is-active":""}`,role:"listitem",...go(s,n),children:d},Ur(s,l))})}),gs=({title:t,subtitle:r,data:o=[],chartType:n="bar",onChartTypeChange:a,onItemClick:i,onDataDetails:s,activeId:l,valueFormatter:d=Rm,secondaryValueFormatter:u=Rm,valueLabel:p,secondaryValueLabel:f,emptyState:b,loading:m=false,error:v,maxItems:y=8,showChartTypeControl:g=true,showDataDetails:x=true,dataRevealDelayMs:h=1e3,chartTypeOptions:C,chartTypeLabels:k,footer:w,ariaLabel:T,className:I,style:S,sx:A})=>{let D=Os(),M=er.useRef(null),N=er.useRef(null),[E,O]=er.useState(n),[F,X]=er.useState(false),[H,Y]=er.useState(null),[W,j]=er.useState(null);er.useEffect(()=>O(n),[n]);let V=er.useCallback(()=>{N.current!==null&&(window.clearTimeout(N.current),N.current=null);},[]);er.useEffect(()=>V,[V]),er.useEffect(()=>{if(!W)return;let q=De=>{let ye=De.target;ye instanceof HTMLElement&&ye.closest(".orb-metric-context-menu")||j(null);};return document.addEventListener("pointerdown",q),()=>document.removeEventListener("pointerdown",q)},[W]);let z=E,U=er.useMemo(()=>[D.chart1,D.chart2,D.chart3,D.chart4,D.chart5,D.chart6],[D]),K=er.useMemo(()=>F?o:o.slice(0,Math.max(1,y)),[o,y,F]),fe=Math.max(0,o.length-K.length),se=K.some(q=>tr(q.value)>0),ue=K.length>0&&(z!=="pie"&&z!=="donut"?true:se),Se=(C??[z,"bar","column","line","pie","donut","scatter","bubble","list"]).filter((q,De,ye)=>ms.includes(q)&&ye.indexOf(q)===De),$e={...bC,...k},ke=K[0],le=T??`${t} ${$e[z]} chart`,Ee=q=>{O(q),a?.(q);},Me=er.useCallback((q,De)=>{Y({item:q,source:De}),j(null),s?.(q,De);},[s]),Pe=er.useCallback(q=>{V(),!(!x||W)&&(N.current=window.setTimeout(()=>{Me(q,"hover"),N.current=null;},Math.max(0,h)));},[V,W,h,Me,x]),Ve=er.useCallback(()=>{V();},[V]),tt=er.useCallback((q,De)=>{if(!x)return;q.preventDefault(),V();let ye=M.current?.getBoundingClientRect(),Be=ye?us(q.clientX-ye.left,8,Math.max(8,ye.width-164)):8,at=ye?us(q.clientY-ye.top,8,Math.max(8,ye.height-72)):8;j({item:De,left:Be,top:at});},[V,x]),nt=x?{onItemHoverStart:Pe,onItemHoverEnd:Ve,onItemContextMenu:tt}:void 0,it=z==="metric"?c("div",{className:"orb-metric-kpi",role:i?"button":"img",tabIndex:i?0:void 0,onClick:()=>ke&&i?.(ke),onKeyDown:q=>{ke&&i&&(q.key==="Enter"||q.key===" ")&&(q.preventDefault(),i(ke));},"aria-label":le,...ke?go(ke,nt):{},children:[e("span",{className:"orb-metric-kpi-label",children:ke?.label??p??"Value"}),e("strong",{children:ke?d(tr(ke.value)):"\u2014"}),ke?.secondaryValue!==void 0&&c("span",{className:"orb-metric-kpi-secondary",children:[f??"Compared with"," \xB7 ",u(tr(ke.secondaryValue))]})]}):z==="progress"?e(wC,{data:K,activeId:l,onItemClick:i,interactions:nt,valueFormatter:d,colors:U}):z==="bar"?e(SC,{data:K,activeId:l,onItemClick:i,interactions:nt,valueFormatter:d,colors:U}):z==="list"?e(TC,{data:K,activeId:l,onItemClick:i,interactions:nt,valueFormatter:d,secondaryValueFormatter:u}):z==="pie"||z==="donut"?e(PC,{type:z,data:K,activeId:l,onItemClick:i,interactions:nt,valueFormatter:d,colors:U,ariaLabel:le}):e(kC,{type:z,data:K,activeId:l,onItemClick:i,interactions:nt,valueFormatter:d,secondaryValueFormatter:u,colors:U,ariaLabel:le});return c("div",{ref:M,className:"orb-metric-chart-shell",onMouseLeave:()=>{V(),H?.source==="hover"&&Y(null);},children:[c(Ae,{elevation:1,variant:"outlined",className:`orb-metric-chart-card ${I??""}`,style:S,sx:A,children:[c("div",{className:"orb-metric-chart-header",children:[c("div",{className:"orb-metric-chart-heading",children:[e(L,{variant:"subtitle1",component:"h3",noWrap:true,title:t,children:t}),r&&e(L,{variant:"caption",muted:true,component:"div",noWrap:true,children:r})]}),g&&Se.length>1&&e(zt,{"aria-label":`${t} chart type`,className:"orb-metric-chart-select",value:z,options:Se.map(q=>({value:q,label:$e[q]})),onChange:q=>Ee(q.target.value),minWidth:108,fullWidth:false,size:"small"})]}),c("div",{className:"orb-metric-chart-body",children:[e(xC,{loading:m,error:v,hasData:ue,emptyState:b,children:it}),fe>0&&!m&&!v&&e("button",{type:"button",className:"orb-metric-more",onClick:()=>X(q=>!q),children:F?"Show fewer":`Show all ${o.length}`})]}),w&&e("div",{className:"orb-metric-chart-footer",children:w})]}),W&&c("div",{className:"orb-metric-context-menu",role:"menu",onMouseEnter:V,onKeyDown:q=>{q.key==="Escape"&&j(null);},style:{left:W.left,top:W.top},onPointerDown:q=>q.stopPropagation(),children:[e("div",{className:"orb-metric-context-label",children:W.item.label}),e("button",{type:"button",role:"menuitem",onClick:q=>{q.preventDefault(),q.stopPropagation(),Me(W.item,"contextmenu");},children:"Show data"})]}),H&&c("div",{className:"orb-metric-data-details",role:"dialog","aria-label":`${H.item.label} data details`,onPointerDown:q=>q.stopPropagation(),children:[c("div",{className:"orb-metric-data-details-header",children:[e("strong",{children:H.item.label}),e("button",{type:"button","aria-label":"Close data details",onClick:()=>Y(null),children:"\xD7"})]}),c("div",{className:"orb-metric-data-details-row",children:[e("span",{children:p??"Value"}),e("strong",{children:d(tr(H.item.value))})]}),H.item.secondaryValue!==void 0&&c("div",{className:"orb-metric-data-details-row",children:[e("span",{children:f??"Secondary value"}),e("strong",{children:u(tr(H.item.secondaryValue))})]}),e("span",{className:"orb-metric-data-details-hint",children:H.source==="hover"?`Shown after ${Math.max(0,h)/1e3} seconds of stillness`:"Shown from the context menu"})]})]})};gs.displayName="CMetricChartCard";P();var IC=({messageId:t,cardHooks:r,valueSuffix:o,secondaryValueSuffix:n,...a})=>{let i=(l,d)=>{r?.onCardEvent?.({messageId:t,cardType:"metric-chart-card",action:l,title:a.title,payload:d,rawData:a});},s=(l,d)=>`${l.toLocaleString()}${d??""}`;return e(gs,{...a,valueFormatter:l=>s(l,o),secondaryValueFormatter:l=>s(l,n),onChartTypeChange:l=>i("action",{chartType:l}),onItemClick:l=>i("action",{item:l}),onDataDetails:(l,d)=>i("show-data",{item:l,source:d})})},fs=IC;P();var MC=({type:t,manifest:r})=>c("div",{className:"w-full overflow-hidden rounded-lg border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-sm transition-all hover:shadow-md",children:[c("div",{className:"flex items-center px-4 py-3 border-b border-[var(--orb-border)] bg-[var(--orb-p50)]",children:[e("div",{className:"w-4 h-4 mr-2 text-[var(--orb-status-primary)]"}),c("h3",{className:"text-sm font-semibold text-[var(--orb-fg)]",children:["SAP Card: ",t]})]}),e("div",{className:"p-4",children:e("div",{className:"bg-[var(--orb-surface)] dark:bg-[var(--orb-canvas)] p-3 rounded border border-[var(--orb-border)] overflow-x-auto",children:e("pre",{className:"text-xs font-mono text-[var(--orb-muted)] whitespace-pre-wrap",children:JSON.stringify(r,null,2)})})})]}),bs=MC;var RC=t=>Array.isArray(t)?t.flatMap((r,o)=>{if(!r||typeof r!="object")return [];let n=r,a=String(n.label??n.name??n.id??`Item ${o+1}`),i=Number(n.value),s=Number.isFinite(i)?i:0,l=n.secondaryValue===void 0?void 0:Number(n.secondaryValue);return [{id:String(n.id??n.name??n.label??o),label:a,value:s,...l!==void 0&&Number.isFinite(l)?{secondaryValue:l}:{},...typeof n.color=="string"?{color:n.color}:{}}]}):[],hs=t=>{let r;try{r=JSON.parse(t);}catch{return null}if(r&&typeof r=="object"){if(r.type==="metric-chart-card"&&r.title&&Array.isArray(r.data)){let o=ms.includes(r.chartType)?r.chartType:"bar";return {...r,type:"metric-chart-card",chartType:o,data:RC(r.data)}}if((r.type==="bar-chart-card"||r.type==="line-chart-card"||r.type==="pie-chart-card"||r.type==="combo-chart-card"||r.type==="heatmap-chart-card"||r.type==="fishbone-chart-card"||r.type==="waterfall-chart-card"||r.type==="google-map-card"||r.type==="amap-card")&&r.title||(r.type==="sap-analytical-card"||r.type==="sap-list-card"||r.type==="sap-object-card"||r.type==="sap-component-card")&&r.manifest||r.type==="error-card"||r.type==="warning-card"||r.type==="suggestions-card"||r.type==="tool-result-card"||r.type==="table"&&r.data)return r}return null};P();var FC=({content:t,theme:r,size:o="base",className:n,enableCodeHighlight:a=true,enableMermaid:i=true,messageId:s,cardHooks:l})=>{let d=er.useRef(l);d.current=l;let u=!!l?.onCardEvent,p=er.useMemo(()=>u?{onCardEvent:y=>d.current?.onCardEvent?.(y)}:void 0,[u]),f=er.useMemo(()=>t?t.replace(/<think>([\s\S]*?)<\/think>/g,(y,g)=>`<div data-component="thinkbox" data-think-content="${encodeURIComponent(g.trim())}"></div>`):"",[t]),b=(y,g,x,h,C)=>{p?.onCardEvent?.({messageId:s,cardType:y,action:g,title:x,payload:h,rawData:C});},m=(y,g,x,h,C,k)=>{if(!(!C&&!p?.onCardEvent))return (...w)=>{let T=C?.(...w),I=k?k(...w):void 0;return b(y,g,x,I,h),T}},v=er.useMemo(()=>({div(y){let{"data-component":g,"data-think-content":x,...h}=y;return g==="thinkbox"&&x?e(hm,{content:decodeURIComponent(x),theme:r,size:o,defaultExpanded:false}):e("div",{...h})},table({children:y}){return e("div",{className:"my-4 w-full overflow-x-auto rounded-lg border border-[var(--orb-border)]",children:e("table",{className:"w-full min-w-[520px] border-collapse text-sm",children:y})})},thead({children:y}){return e("thead",{className:"bg-[color-mix(in_oklch,var(--orb-surface)_60%,transparent)]",children:y})},tbody({children:y}){return e("tbody",{className:"bg-[var(--orb-canvas)] dark:bg-[var(--orb-canvas)]",children:y})},tr({children:y}){return e("tr",{className:"border-b border-[var(--orb-border)] last:border-b-0",children:y})},th({children:y,align:g}){return e("th",{className:`px-3 py-2 font-semibold text-[var(--orb-fg)] ${g==="center"?"text-center":g==="right"?"text-right":"text-left"}`,children:y})},td({children:y,align:g}){return e("td",{className:`px-3 py-2 text-[var(--orb-fg)] align-top ${g==="center"?"text-center":g==="right"?"text-right":"text-left"}`,children:y})},code({className:y,children:g,...x}){let h=/language-([\w-]+)/.exec(y||""),C=h?h[1]:"",k=String(g);if(!h&&!k.includes(`
199
- `))return e("code",{children:g});let T=k.replace(/\n$/,"");if(i&&C==="mermaid")return e(wm,{content:T});if(C==="html"||C==="htm")return e(Cm,{content:T});if(C==="json"){let I=hs(T);if(I)switch(I.type){case "table":return e(ss,{data:I.data});case "metric-chart-card":return e(fs,{...I,messageId:s,cardHooks:p});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(ls,{...I});case "sap-analytical-card":case "sap-list-card":case "sap-object-card":case "sap-component-card":return e(bs,{...I});case "error-card":{let S=I;return e(os,{...S,onClose:m("error-card","close",S.title,S,S.onClose),onRetry:m("error-card","retry",S.title,S,S.onRetry)})}case "warning-card":{let S=I,A=S.onConfirm?m("warning-card","confirm",S.title,S,S.onConfirm):S.actionText&&p?.onCardEvent?m("warning-card","confirm",S.title,S):void 0;return e(ns,{...S,onClose:m("warning-card","close",S.title,S,S.onClose),onConfirm:A})}case "suggestions-card":{let S=I;return e(as,{...S,onClose:m("suggestions-card","close",S.title,S,S.onClose),onSuggestionClick:m("suggestions-card","suggestion-click",S.title,S,S.onSuggestionClick,A=>({suggestion:A}))})}case "tool-result-card":{let S=I;return e(is,{...S,onClose:m("tool-result-card","close",S.title,S,S.onClose),onAction:m("tool-result-card","action",S.title,S,S.onAction)})}}}return a?e(vm,{content:T,language:C,className:"not-prose"}):e("code",{className:y,...x,children:g})}}),[r,o,i,a,p,s]);return e("div",{className:ut("markdown-body max-w-none",n),children:e(NC__default.default,{remarkPlugins:[AC__default.default,EC__default.default],rehypePlugins:[LC__default.default,OC__default.default],components:v,children:f})})},Rn=FC;P();var BC=({content:t,messageId:r,cardHooks:o})=>{let n=(s,l,d,u,p)=>{o?.onCardEvent?.({messageId:r,cardType:s,action:l,title:d,payload:u,rawData:p});},a=(s,l,d,u,p,f)=>{if(!(!p&&!o?.onCardEvent))return (...b)=>{let m=p?.(...b),v=f?f(...b):void 0;return n(s,l,d,v,u),m}},i=hs(t);if(i)switch(i.type){case "table":return e(ss,{data:i.data});case "metric-chart-card":return e(fs,{...i,messageId:r,cardHooks:o});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(ls,{...i});case "sap-analytical-card":case "sap-list-card":case "sap-object-card":case "sap-component-card":return e(bs,{...i});case "error-card":{let s=i;return e(os,{...s,onClose:a("error-card","close",s.title,s,s.onClose),onRetry:a("error-card","retry",s.title,s,s.onRetry)})}case "warning-card":{let s=i,l=s.onConfirm?a("warning-card","confirm",s.title,s,s.onConfirm):s.actionText&&o?.onCardEvent?a("warning-card","confirm",s.title,s):void 0;return e(ns,{...s,onClose:a("warning-card","close",s.title,s,s.onClose),onConfirm:l})}case "suggestions-card":{let s=i;return e(as,{...s,onClose:a("suggestions-card","close",s.title,s,s.onClose),onSuggestionClick:a("suggestions-card","suggestion-click",s.title,s,s.onSuggestionClick,l=>({suggestion:l}))})}case "tool-result-card":{let s=i;return e(is,{...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(Rn,{content:t,enableCodeHighlight:true,enableMath:true,enableMermaid:true,messageId:r,cardHooks:o})})},Am=BC;P();var Wl=class{static analyze(r){if(!r.trim())return {blocks:[],hasComplexContent:false,overallType:"simple"};let n=/```json\s*\{\s*"type":\s*"[^"]+"/g.test(r),a=/<[^>]+>[\s\S]*?<\/[^>]+>/.test(r),i=r.includes("NQ#")||r.includes("data-component");return n||a||i?{blocks:[{type:"mixed",content:r,startIndex:0,endIndex:r.length}],hasComplexContent:true,overallType:"complex"}:{blocks:[{type:"markdown",content:r,startIndex:0,endIndex:r.length}],hasComplexContent:false,overallType:"simple"}}},zC=({content:t,className:r="",messageId:o,cardHooks:n})=>{let a=er__namespace.default.useMemo(()=>Wl.analyze(t),[t]);return e("div",{className:`universal-content-renderer ${r}`,children:a.blocks.map((i,s)=>i.type==="mixed"||i.type==="json-card"?e(Am,{content:i.content,messageId:o,cardHooks:n},`block-${s}`):e(Rn,{content:i.content,enableCodeHighlight:true,enableMath:true,enableMermaid:true,messageId:o,cardHooks:n},`block-${s}`))})},vs=zC;P();var VC=({content:t,isStreaming:r=true,onComplete:o,className:n="",streamIntervalMs:a=24,streamChunkSize:i=3,messageId:s,cardHooks:l})=>{let[d,u]=er.useState(r?0:t.length),[p,f]=er.useState(!r);er.useEffect(()=>{if(r){u(0),f(false);return}u(t.length),f(true);},[t,r]),er.useEffect(()=>{if(!r||p)return;if(d>=t.length){f(true),o?.();return}let g=window.setTimeout(()=>{u(x=>Math.min(x+i,t.length));},a);return ()=>{window.clearTimeout(g);}},[t.length,p,r,o,i,a,d]);let b=()=>{r&&!p&&(u(t.length),f(true),o?.());},m=r?t.slice(0,d):t,v=r&&!p,y=r&&!p;return c("div",{className:`streaming-markdown ${n}`,onClick:b,style:{cursor:r?"pointer":"default"},children:[c("div",{className:"relative",children:[e(vs,{content:m,messageId:s,cardHooks:l}),v&&e("span",{className:"inline-block w-[2px] h-[13px] ml-0.5 animate-pulse",style:{verticalAlign:"text-bottom",backgroundColor:"var(--orb-primary, #154194)"}})]}),y&&e("div",{className:"streaming-hint",style:{fontSize:"9px",color:"var(--orb-muted)",marginTop:"8px",fontStyle:"italic",opacity:.7},children:"\u70B9\u51FB\u6B64\u5904\u663E\u793A\u5B8C\u6574\u5185\u5BB9"})]})},Om=VC;P();var Fm=({buttons:t,className:r})=>{let o=n=>{switch(n){case "copy":return e(vo,{size:14});case "refresh":return e(Ba,{size:14});case "volume":return e(Jc,{size:14});case "like":return e(Yc,{size:14});case "dislike":return e(Xc,{size:14});default:return null}};return e("div",{className:ut("flex items-center gap-1",r),children:t.map((n,a)=>e("button",{onClick:n.onClick,disabled:n.disabled,"aria-busy":n.loading||void 0,className:ut("p-1.5 rounded-md transition-colors","text-[var(--orb-muted)] hover:text-[var(--orb-fg)] dark:text-[var(--orb-muted)] dark:hover:text-[var(--orb-fg)]","hover:bg-[var(--orb-hover)]","disabled:opacity-50 disabled:cursor-not-allowed",n.active&&"text-[var(--orb-primary)] bg-[var(--orb-p50)]",n.type==="refresh"&&n.loading&&"animate-spin"),title:n.type,type:"button",children:o(n.type)},`${n.type}-${a}`))})};P();var ys=({message:t,onStreamingComplete:r,assistantActions:o,streamIntervalMs:n,streamChunkSize:a,cardHooks:i})=>{let s={lineHeight:1.55,fontSize:13,fontWeight:300,fontFamily:'var(--orb-font, "Montserrat", system-ui, sans-serif)',color:"var(--orb-fg, #555555)",borderRadius:"var(--orb-r, 10px)",padding:"10px 14px"},l={marginTop:6,fontSize:11,color:"var(--orb-muted, #8c8c8c)"};if(t.type==="assistant"){let d=!!(o?.isResponding||t.isStreaming);return e("div",{className:"mb-4 flex justify-start",children:c("div",{className:"mr-auto w-full",style:{...s,background:"var(--orb-surface, #f5f5f5)",border:"1px solid var(--orb-border, #dbdbdb)"},children:[e(Om,{content:t.content,isStreaming:t.isStreaming??false,onComplete:r,streamIntervalMs:n,streamChunkSize:a,messageId:t.id,cardHooks:i}),t.content&&o?.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(Fm,{buttons:[{type:"refresh",onClick:()=>{o?.onRegenerate?.();},disabled:d||!o?.onRegenerate,loading:d},{type:"copy",onClick:()=>navigator.clipboard.writeText(t.content),disabled:false},{type:"volume",onClick:()=>console.log("\u8BED\u97F3\u64AD\u653E"),disabled:false},{type:"like",onClick:()=>console.log("\u70B9\u8D5E"),disabled:false},{type:"dislike",onClick:()=>console.log("\u70B9\u8E29"),disabled:false}],size:"sm",variant:"default"})}),e("div",{style:l,children:t.timestamp.toLocaleTimeString()})]})})}return e("div",{className:"mb-4 flex justify-end",children:c("div",{className:"ml-auto max-w-[80%]",style:{...s,background:"var(--orb-p50, #eef2f9)",border:"1px solid var(--orb-p100, #e4e9f5)"},children:[e("div",{className:"whitespace-pre-wrap",children:t.content}),e("div",{style:l,children:t.timestamp.toLocaleTimeString()})]})})};P();var Bm=({onTextUpdate:t,onComplete:r,onCancel:o,disabled:n,className:a})=>{let{isRecording:i,startRecording:s,stopRecording:l}=Sn({onTextUpdate:t,onComplete:u=>{r?.(u);},onError:u=>{console.error("Voice input error:",u),o?.();}});return e("button",{onClick:async()=>{i?l():await s();},disabled:n,className:ut("transition-all duration-200 flex items-center justify-center rounded-full",i?"bg-[color-mix(in_oklch,var(--orb-status-error)_12%,transparent)] text-[var(--orb-status-error)] hover:bg-[color-mix(in_oklch,var(--orb-status-error)_20%,transparent)] animate-pulse":"bg-transparent hover:bg-[var(--orb-hover)] text-[var(--orb-muted)] active:scale-95",n&&"opacity-50 cursor-not-allowed",a),title:i?"Stop recording":"Start recording",type:"button",children:i?e(np,{size:16}):e(ap,{size:16})})};P();var dr={container:"w-full max-w-4xl mx-auto",inputContainer:ut("w-full flex flex-col border border-[var(--orb-border,#dbdbdb)] bg-[color-mix(in_oklch,var(--orb-canvas)_64%,transparent)] backdrop-blur-[28px] transition-colors duration-200","orb-agent-input","focus-within:border-[var(--orb-primary,#154194)] focus-within:ring-1 focus-within:ring-[var(--orb-focus-ring,#e4e9f5)]"),dragActive:"border-[var(--orb-primary,#154194)] bg-[var(--orb-p50,#eef2f9)]",textareaWrapper:"flex-1 relative flex items-center",textarea:ut("w-full outline-none appearance-none resize-none bg-transparent border-none text-sm font-normal py-3 px-3","placeholder:text-[var(--orb-muted,#8c8c8c)] placeholder:font-normal","text-[var(--orb-fg,#555555)] selection:bg-[var(--orb-p100,#e4e9f5)]","focus:ring-0 focus:outline-none focus:border-none focus:shadow-none","min-h-[44px] max-h-[12em] overflow-y-auto scrollbar-thin scrollbar-thumb-[var(--orb-border)]"),filePreviewArea:"px-4 pt-3 pb-1 flex flex-wrap gap-2",fileTag:ut("flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs font-medium","bg-[var(--orb-surface,#f5f5f5)] text-[var(--orb-fg,#555555)]","border border-[var(--orb-border,#dbdbdb)]","transition-all hover:bg-[var(--orb-hover,#eef2f9)]"),buttonBase:"flex items-center justify-center transition-all duration-200 rounded-full",buttonSmall:"h-[38px] w-[38px] shrink-0 md:h-8 md:w-8",buttonNormal:ut("bg-transparent hover:bg-[var(--orb-hover,#eef2f9)] text-[var(--orb-muted,#8c8c8c)] hover:text-[var(--orb-fg,#555555)]","cursor-pointer active:scale-95"),sendButton:ut("cursor-pointer bg-[var(--orb-primary,#154194)] hover:bg-[var(--orb-p600,#0e2d63)] text-[var(--orb-on-primary)] shadow-none active:scale-95"),sendButtonDisabled:ut("cursor-not-allowed opacity-40 bg-[var(--orb-disabled-bg,#f5f5f5)] text-[var(--orb-disabled-fg,#8c8c8c)]"),stopButton:ut("cursor-pointer bg-[var(--orb-err,#c43f02)] hover:opacity-90 text-[var(--orb-on-primary)] shadow-none active:scale-95")},$C={padding:0,lineHeight:"1.5",border:"none !important",boxShadow:"none !important",backgroundColor:"transparent",height:"auto",fontFeatureSettings:'"liga" 1, "kern" 1',WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},_C=({enabled:t,onClick:r})=>e("button",{className:ut(dr.buttonBase,dr.buttonSmall,dr.buttonNormal),onClick:r,disabled:!t,"aria-label":"Upload file",type:"button",children:e(Bd,{size:16})}),GC=({canSend:t,isResponding:r,onSend:o,onStop:n})=>r?e("button",{className:ut(dr.buttonBase,dr.buttonSmall,dr.stopButton),onClick:n,"aria-label":"Stop generating",type:"button",children:e(gp,{size:15})}):e("button",{className:ut(dr.buttonBase,dr.buttonSmall,t?dr.sendButton:dr.sendButtonDisabled),onClick:o,disabled:!t,"aria-label":"Send message",type:"button",children:e(cp,{size:16,className:t?"text-[var(--orb-on-primary,#ffffff)]":"text-[var(--orb-disabled-fg,#8c8c8c)]"})}),$l=({onSend:t,onStop:r,isResponding:o=false,placeholder:n,getText:a})=>{let[i,s]=er.useState(""),[l,d]=er.useState([]),[u,p]=er.useState(false),[f,b]=er.useState(false),m=er.useRef(null),v=n||(a?a("00019","Type a message..."):"Type a message..."),y=(i.trim().length>0||l.length>0)&&!o,g={enabled:true},x=er.useCallback(F=>{s(F.target.value),F.target.style.height="auto",F.target.style.height=`${Math.min(F.target.scrollHeight,200)}px`;},[]),h=er.useCallback(F=>{if(F.target.files&&F.target.files.length>0){let X=Array.from(F.target.files);d(H=>{let Y=X.filter(j=>H.some(V=>V.name===j.name&&V.size===j.size));Y.length>0&&console.warn("Duplicate files ignored:",Y.map(j=>j.name));let W=X.filter(j=>!H.some(V=>V.name===j.name&&V.size===j.size));return [...H,...W]}),m.current&&(m.current.value="");}},[]),C=er.useCallback(F=>{d(X=>X.filter((H,Y)=>Y!==F));},[]),k=er.useCallback(()=>{m.current?.click();},[]),w=er.useCallback(async()=>{if(!y)return;let F=i,X=[...l];s(""),d([]),m.current&&(m.current.value="");try{await t(F,X);}catch(H){console.error("Failed to send message:",H),s(F),d(X);}},[i,y,t,l]),T=er.useCallback(F=>{F.key==="Enter"&&!F.shiftKey&&!u&&(F.preventDefault(),w());},[w,u]),I=er.useCallback(()=>{p(true);},[]),S=er.useCallback(()=>{p(false);},[]),A=er.useCallback(F=>{s(F);},[]),D=er.useCallback(F=>{s(F);},[]),M=er.useCallback(()=>{},[]),N=er.useCallback(F=>{F.preventDefault(),b(true);},[]),E=er.useCallback(F=>{F.preventDefault(),b(false);},[]),O=er.useCallback(F=>{if(F.preventDefault(),b(false),F.dataTransfer.files&&F.dataTransfer.files.length>0){let X=Array.from(F.dataTransfer.files);d(H=>[...H,...X]);}},[]);return e("div",{className:dr.container,children:c("div",{className:"relative",children:[e("input",{type:"file",multiple:true,className:"hidden",ref:m,onChange:h}),c("div",{className:ut(dr.inputContainer,f&&dr.dragActive),onDragOver:N,onDragLeave:E,onDrop:O,children:[l.length>0&&e("div",{className:dr.filePreviewArea,children:l.map((F,X)=>c("div",{className:dr.fileTag,children:[e(Jd,{sx:{fontSize:16},className:"text-[var(--orb-primary)]"}),e("span",{className:"truncate max-w-[150px]",children:F.name}),e("button",{onClick:()=>C(X),className:"ml-1 hover:text-[var(--orb-status-error)] focus:outline-none",type:"button",children:e(Ud,{sx:{fontSize:16}})})]},`${F.name}-${X}`))}),c("div",{className:"flex w-full flex-col p-2",children:[e("div",{className:ut(dr.textareaWrapper,"min-h-[52px] px-2 pb-2 pt-1.5 md:min-h-[44px]"),children:e("textarea",{className:ut(dr.textarea,"min-h-[24px] py-0 px-0"),placeholder:v,value:i,onChange:x,onKeyDown:T,onCompositionStart:I,onCompositionEnd:S,style:$C,"aria-label":"Message input",spellCheck:false,rows:1})}),c("div",{className:"flex items-center justify-between px-1 pb-0.5",children:[e("div",{className:"flex items-center gap-1",role:"toolbar","aria-label":"Input tools",children:e(_C,{enabled:g.enabled,onClick:k})}),c("div",{className:"flex items-center gap-1",children:[e(Bm,{onTextUpdate:A,onComplete:D,onCancel:M,disabled:o,className:dr.buttonSmall}),e(GC,{canSend:y,isResponding:o,onSend:w,onStop:r})]})]})]})]})]})})};P();var zm=({messages:t,onSend:r,onStop:o,onRegenerate:n,isResponding:a=false,className:i,placeholder:s,streamIntervalMs:l,streamChunkSize:d,onMessageStreamingComplete:u,cardHooks:p,showInput:f=true,statusLine:b})=>{let m=er.useRef(null),v=er.useRef(t.length);return er.useEffect(()=>{t.length>v.current&&m.current?.scrollIntoView({behavior:"smooth"}),v.current=t.length;},[t]),c("div",{className:ut("flex flex-col h-full w-full relative",i),children:[c("div",{className:"flex-1 overflow-y-auto px-4 py-4 space-y-6 scrollbar-thin scrollbar-thumb-[var(--orb-border)]",children:[t.map((y,g)=>{let x=y.type==="assistant"&&g===t.length-1,h=y.type==="assistant"?{isLatestAssistant:x,isResponding:a,onRegenerate:n?()=>n(y.id):void 0}:void 0;return e(ys,{message:y,assistantActions:h,onStreamingComplete:()=>u?.(y.id),streamIntervalMs:l,streamChunkSize:d,cardHooks:p},y.id)}),b,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($l,{onSend:r||(async()=>{}),onStop:o||(()=>{}),isResponding:a,placeholder:s})})]})};P();var Vm={idle:"Idle",running:"Working",success:"Success",error:"Error",pending:"Pending"},Wm=({title:t="AI Agent",description:r,headerActions:o,className:n,agentStatus:a,statusText:i,onHeaderPointerDown:s,showInput:l=false,...d})=>{let u=a??(d.isResponding?"running":"idle"),p=u==="running"||u==="pending",f=[Vm[u],r].filter(Boolean).join(" \xB7 ");return c("div",{className:ut("orb-agent-panel",n),children:[c("div",{className:ut("orb-agent-header",s&&"cursor-grab active:cursor-grabbing"),onPointerDown:s,children:[e("span",{className:"orb-agent-avatar","aria-hidden":"true",children:"AI"}),c("div",{className:"min-w-0 flex-1",children:[e("div",{className:"orb-agent-title",children:t}),c("div",{className:"orb-agent-subtitle",children:[e("span",{className:"orb-agent-dot","data-active":p||void 0}),e("span",{className:"truncate",children:f||"Agent"})]})]}),o&&e("div",{className:"ml-auto flex flex-none items-center gap-1",children:o})]}),e("div",{className:"relative min-h-0 flex-1",children:e(zm,{...d,showInput:l,statusLine:p?c("div",{className:ut("orb-agent-status-line","mb-1"),children:[e("span",{className:"orb-agent-spinner","aria-hidden":"true"}),e("span",{children:i??`${Vm[u]}\u2026`})]}):void 0})})]})};P();var XC=t=>Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(t),_m=({conversations:t,activeConversationId:r,labels:o,onNewConversation:n,onSelectConversation:a})=>{let[i,s]=er.useState(false),l=er.useRef(null),d=er.useRef(null),u=er.useRef(null),p=er.useId(),f=!!a;er.useEffect(()=>{if(!i)return;let m=y=>{l.current?.contains(y.target)||s(false);},v=y=>{y.key==="Escape"&&(y.stopPropagation(),s(false),u.current?.focus());};return document.addEventListener("pointerdown",m),document.addEventListener("keydown",v),()=>{document.removeEventListener("pointerdown",m),document.removeEventListener("keydown",v);}},[i]),er.useEffect(()=>{if(!i)return;let m=d.current?.querySelector('[aria-selected="true"]'),v=d.current?.querySelector('[role="option"]');(m??v)?.focus();},[i]);let b=m=>{let v=Array.from(d.current?.querySelectorAll('[role="option"]')??[]);if(v.length===0)return;let y=v.findIndex(x=>x===document.activeElement),g=y<0?m===1?0:v.length-1:(y+m+v.length)%v.length;v[g]?.focus();};return !n&&!f?null:c(jsxRuntime.Fragment,{children:[n&&e("button",{type:"button",className:"orb-omph-icon-btn","aria-label":o.newConversation,onClick:()=>{s(false),n();},children:e(en,{size:16})}),f&&a&&c("div",{className:"orb-omph-conversation-anchor",ref:l,children:[e("button",{ref:u,type:"button",className:"orb-omph-icon-btn","aria-label":o.conversationList,"aria-expanded":i,"aria-controls":p,onClick:()=>s(m=>!m),children:e(Wc,{size:16})}),i&&e("div",{ref:d,id:p,className:"orb-omph-conversations",role:"listbox","aria-label":o.conversations,onKeyDown:m=>{m.key==="ArrowDown"?(m.preventDefault(),b(1)):m.key==="ArrowUp"&&(m.preventDefault(),b(-1));},children:t.length===0?e("p",{className:"orb-omph-conversation-empty",children:o.noConversations}):t.map(m=>{let v=m.updatedAt?XC(m.updatedAt):"",y=[m.preview,v].filter(x=>x&&x.length>0).join(" \xB7 "),g=m.id===r;return c("button",{type:"button",role:"option",className:"orb-omph-conversation","aria-selected":g,"data-active":g||void 0,onClick:()=>{a(m.id),s(false);},children:[e("span",{className:"orb-omph-conversation-title",children:m.title}),y&&e("span",{className:"orb-omph-conversation-meta",children:y})]},m.id)})})]})]})};P();var ex=2e3,tx=1/3,xs=[.25,.5,.75,1,1.5,2,3,4],rx=100,Gm={color:"inherit",background:"transparent",textShadow:"none",fontFamily:"inherit",fontSize:"inherit",lineHeight:"inherit",textAlign:"left",wordSpacing:"normal",wordBreak:"normal",overflowWrap:"normal",tabSize:"inherit",hyphens:"none"},Um=({text:t,language:r,startLine:o,endLine:n,wrap:a,labels:i})=>{let s=er.useRef(null),l=er.useMemo(()=>{let p=t.split(`
200
- `);p.length>1&&p[p.length-1]===""&&p.pop();let f=Math.min(p.length,ex);return {shown:p.slice(0,f).join(`
201
- `),shownCount:f,total:p.length}},[t]),d=er.useCallback(p=>{let f=n??o,b=o!==void 0&&f!==void 0&&p>=o&&p<=f;return {className:"orb-omph-code-line","data-line":p,...b?{"data-hit":"true"}:{}}},[n,o]);er.useEffect(()=>{let p=s.current,f=p?.closest(".orb-omph-pv-body");if(!p||!f)return;if(o===void 0){f.scrollTop=0;return}let b=p.querySelector(`[data-line="${o}"]`);if(!b)return;let m=b.getBoundingClientRect().top-f.getBoundingClientRect().top+f.scrollTop;f.scrollTop=Math.max(0,m-f.clientHeight*tx);},[o,l.shown]);let u={"--orb-omph-digits":String(l.shownCount).length};return c("div",{ref:s,className:"orb-omph-code","data-wrap":a||void 0,style:u,children:[e(reactSyntaxHighlighter.Prism,{language:r,useInlineStyles:false,PreTag:"div",CodeTag:"div",showLineNumbers:true,wrapLines:true,lineProps:d,customStyle:Gm,codeTagProps:{className:`language-${r}`,style:Gm},children:l.shown}),l.total>l.shownCount&&e("div",{className:"orb-omph-pv-note",children:i.previewTruncated(l.shownCount,l.total)})]})},Km=({text:t})=>e("div",{className:"orb-omph-pv-doc",children:e(Rn,{content:t})}),qm=({url:t,alt:r,labels:o})=>{let[n,a]=er.useState("fit"),[i,s]=er.useState(null),[l,d]=er.useState(false),u=n==="fit"?1:n,p=xs.some(v=>v>u),f=xs.some(v=>v<u),b=v=>a(y=>{let g=y==="fit"?1:y;return (v>0?xs.find(h=>h>g):[...xs].reverse().find(h=>h<g))??y}),m=n==="fit"||i===null?{maxWidth:"100%",height:"auto"}:{width:i*n,maxWidth:"none",height:"auto"};return l?e("div",{className:"orb-omph-pv-note",role:"alert",children:r?`${o.imageFailed} \xB7 ${r}`:o.imageFailed}):c("div",{className:"orb-omph-img",children:[e("div",{className:"orb-omph-img-stage",children:e("img",{src:t,alt:r??"",draggable:false,style:m,onLoad:v=>s(v.currentTarget.naturalWidth),onError:()=>d(true)})}),c("div",{className:"orb-omph-img-zoom",role:"group","aria-label":o.zoomFit,children:[e("button",{type:"button","aria-label":o.zoomOut,disabled:!f,onClick:()=>b(-1),children:"\u2212"}),e("button",{type:"button","aria-label":o.zoomFit,"data-active":n==="fit"||void 0,onClick:()=>a("fit"),children:n==="fit"?o.zoomFit:`${Math.round(n*rx)}%`}),e("button",{type:"button","aria-label":o.zoomIn,disabled:!p,onClick:()=>b(1),children:"+"})]})]})};var ox=/^[a-z][a-z0-9+.-]*:/i,nx=/^L(\d+)(?:-L?(\d+))?$/i;var Xm=["B","KB","MB","GB"];var ax=t=>{try{return decodeURIComponent(t)}catch{return t}},Ul=t=>{let r=t.trim();if(!r||r.startsWith("#")||r.startsWith("//")||ox.test(r))return null;let o=r.indexOf("#"),n=o>=0?r.slice(0,o):r,a=o>=0?r.slice(o+1):"",i=n.indexOf("?"),s=ax(i>=0?n.slice(0,i):n);if(!s||s.endsWith("/"))return null;let l=nx.exec(a);if(!l)return {path:s};let d=Number(l[1]);if(d<1)return {path:s};let u=l[2]?Number(l[2]):d;return {path:s,startLine:d,endLine:Math.max(d,u)}},Kl=t=>t.split("/").filter(Boolean).pop()??t,Zm=t=>{let r=t.split("/");return r.pop(),r.join("/")},ql=t=>{let r=Kl(t),o=r.lastIndexOf(".");return o>0?r.slice(o+1).toLowerCase():""},jm={prism:"text",label:"Text"},Ym={ts:{prism:"typescript",label:"TypeScript"},tsx:{prism:"tsx",label:"TSX"},js:{prism:"javascript",label:"JavaScript"},mjs:{prism:"javascript",label:"JavaScript"},cjs:{prism:"javascript",label:"JavaScript"},jsx:{prism:"jsx",label:"JSX"},json:{prism:"json",label:"JSON"},py:{prism:"python",label:"Python"},java:{prism:"java",label:"Java"},go:{prism:"go",label:"Go"},rs:{prism:"rust",label:"Rust"},c:{prism:"c",label:"C"},h:{prism:"c",label:"C"},cpp:{prism:"cpp",label:"C++"},cs:{prism:"csharp",label:"C#"},sql:{prism:"sql",label:"SQL"},sh:{prism:"bash",label:"Shell"},bash:{prism:"bash",label:"Shell"},yml:{prism:"yaml",label:"YAML"},yaml:{prism:"yaml",label:"YAML"},xml:{prism:"markup",label:"XML"},html:{prism:"markup",label:"HTML"},css:{prism:"css",label:"CSS"},scss:{prism:"scss",label:"SCSS"},abap:{prism:"abap",label:"ABAP"},toml:{prism:"toml",label:"TOML"},ini:{prism:"ini",label:"INI"},md:{prism:"markdown",label:"Markdown"},csv:{prism:"text",label:"CSV"},log:{prism:"text",label:"Log"},txt:jm},Xl=(t,r)=>r?Object.values(Ym).find(n=>n.prism===r)??{prism:r,label:r}:Ym[ql(t)]??jm,Qm=t=>{let r=t,o=0;for(;r>=1024&&o<Xm.length-1;)r/=1024,o+=1;return `${o>0&&r<10?r.toFixed(1):Math.round(r).toString()} ${Xm[o]}`};P();var ix=1e3,sx=9,fo=16,Yl=({tone:t,icon:r,title:o,text:n,action:a})=>c("div",{className:"orb-omph-pv-notice","data-tone":t,role:t==="error"?"alert":void 0,children:[e("span",{className:"orb-omph-pv-notice-icon","aria-hidden":"true",children:r}),e("div",{className:"orb-omph-pv-notice-title",children:o}),n&&e("p",{className:"orb-omph-pv-notice-text",children:n}),a]}),tg=({state:t,placement:r,expanded:o,canExpand:n,labels:a,gripProps:i,paneRef:s,onClose:l,onRetry:d,onToggleExpand:u,onOpenExternally:p})=>{let[f,b]=er.useState(true),[m,v]=er.useState(false),{open:y,ref:g,phase:x,data:h}=t,C=h?.body;er.useEffect(()=>{if(!m)return;let O=window.setTimeout(()=>v(false),ix);return ()=>window.clearTimeout(O)},[m]),er.useEffect(()=>{y&&s.current?.focus({preventScroll:true});},[y,s,g?.path]);let k=h?.absolutePath??g?.path??"",w=C&&(C.kind==="markdown"||C.kind==="code")?C.text:k,T=w===k?a.previewCopyPath:a.previewCopyContent,I=C?.kind==="code"&&g?Xl(g.path,C.language):null,S=[];I&&S.push(I.label),C?.kind==="markdown"&&S.push("Markdown"),C?.kind==="image"&&g&&S.push(ql(g.path).toUpperCase()),h?.size!==void 0&&S.push(Qm(h.size)),C?.kind==="code"&&g?.startLine!==void 0&&S.push(a.previewLines(g.startLine,g.endLine??g.startLine));let A=O=>{O.key==="Escape"&&(O.stopPropagation(),l(true));},D=e("button",{type:"button",className:"orb-omph-pv-action",onClick:d,children:a.previewRetry}),M=()=>{if(!g)return null;if(x==="loading")return e("div",{className:"orb-omph-pv-skel",role:"status","aria-label":a.previewLoading,children:Array.from({length:sx},(O,F)=>e("span",{},F))});if(x==="error"||!C)return e(Yl,{tone:"error",icon:e(Ta,{size:fo}),title:a.previewFailed,text:k,action:D});switch(C.kind){case "missing":return e(Yl,{tone:"neutral",icon:e(Da,{size:fo}),title:a.previewMissing,text:C.message??k});case "unsupported":return e(Yl,{tone:"neutral",icon:e(Da,{size:fo}),title:a.previewUnsupported,text:C.message??k,action:p&&e("button",{type:"button",className:"orb-omph-pv-action",onClick:()=>p(g),children:a.previewOpenExternal})});case "markdown":return e(Km,{text:C.text},g.path);case "code":return e(Um,{text:C.text,language:Xl(g.path,C.language).prism,startLine:g.startLine,endLine:g.endLine,wrap:f,labels:a},g.path);case "image":return e(qm,{url:C.url,alt:C.alt,labels:a},C.url);case "embed":return e("iframe",{src:C.url,title:C.caption??"Embedded document",className:"orb-omph-pv-embed"},C.url);default:return null}},N=r==="overlay",E=C?.kind==="image"?Fc:Da;return c("aside",{ref:s,className:"orb-omph-preview","data-open":y||void 0,"data-placement":r,role:N?"dialog":"complementary","aria-label":a.previewTitle,"aria-hidden":!y||void 0,tabIndex:-1,onKeyDown:A,children:[!N&&y&&e("div",{className:"orb-omph-pv-grip","aria-label":a.previewResize,...i}),c("div",{className:"orb-omph-pv",children:[c("header",{className:"orb-omph-pv-head",children:[N&&e("button",{type:"button",className:"orb-omph-icon-button","aria-label":a.previewBack,onClick:()=>l(true),children:e(Ma,{size:fo})}),e("span",{className:"orb-omph-pv-glyph","aria-hidden":"true",children:e(E,{size:fo})}),c("div",{className:"orb-omph-pv-titles",children:[e("div",{className:"orb-omph-pv-name",title:k,children:g?Kl(g.path):""}),e("div",{className:"orb-omph-pv-path",title:k,children:e("bdi",{children:Zm(k)})})]}),c("div",{className:"orb-omph-pv-actions",children:[C?.kind==="code"&&e("button",{type:"button",className:"orb-omph-text-button","aria-pressed":f,onClick:()=>b(O=>!O),children:a.previewWrap}),g&&e("button",{type:"button",className:"orb-omph-icon-button","aria-label":m?a.copied:T,title:m?a.copied:T,onClick:()=>{navigator.clipboard.writeText(w).then(()=>v(true));},children:m?e(qr,{size:fo}):e(vo,{size:fo})}),n&&e("button",{type:"button",className:"orb-omph-icon-button","aria-pressed":o,"aria-label":o?a.previewCollapse:a.previewExpand,title:o?a.previewCollapse:a.previewExpand,onClick:u,children:e(Ac,{size:fo})}),!N&&e("button",{type:"button",className:"orb-omph-icon-button","aria-label":a.previewClose,onClick:()=>l(true),children:e(jt,{size:fo})})]})]}),e("div",{className:"orb-omph-pv-meta",children:S.join(" \xB7 ")}),e("div",{className:"orb-omph-pv-body","data-kind":x==="ready"?C?.kind:void 0,children:M()})]})]})};P();var cx=1e3,rg=50,dx=1e3,px=t=>t==="tool"?tn:t==="command"?Vn:$c,ng=t=>!!t.streaming||t.status==="running"||t.status==="pending",ux=(t,r)=>r==="expanded"?true:ng(t),mx=t=>t!==void 0&&(t.inputTokens!==void 0||t.outputTokens!==void 0||t.durationMs!==void 0),gx=(t,r)=>`${Math.max(1,Math.round(t/dx))}${r.secondUnit}`,fx=({content:t})=>{let r=er.useRef(null),[o,n]=er.useState(false);return er.useEffect(()=>{let a=r.current;if(!a)return;let i=()=>n(a.scrollHeight>a.clientHeight+1);i();let s=new ResizeObserver(i);return s.observe(a),()=>s.disconnect()},[t]),e("div",{ref:r,className:"orb-omph-process-body","data-overflow":o||void 0,children:t})},bx=({turn:t,labels:r})=>{let[o,n]=er.useState(false),[a,i]=er.useState(false),s=t.assistant?.content??"",l=t.usage;return er.useEffect(()=>{if(!o)return;let d=window.setTimeout(()=>n(false),cx);return ()=>window.clearTimeout(d)},[o]),c("div",{className:"orb-omph-turn-actions",role:"group","aria-label":r.turnActions,children:[e("span",{className:"orb-omph-actions-time",children:t.assistant?.timestamp.toLocaleTimeString()}),mx(l)&&c(jsxRuntime.Fragment,{children:[e("span",{className:"orb-omph-actions-divider","aria-hidden":"true"}),e("button",{type:"button",className:"orb-omph-text-button","aria-expanded":a,onClick:()=>i(d=>!d),children:r.usage})]}),e("button",{type:"button",className:"orb-omph-icon-button orb-omph-actions-end","aria-label":o?r.copied:r.copy,onClick:()=>{navigator.clipboard.writeText(s).then(()=>n(true));},children:o?e(qr,{size:14}):e(vo,{size:14})}),a&&l&&c("div",{className:"orb-omph-usage",children:[l.inputTokens!==void 0&&c("span",{children:[r.inputTokens," ",l.inputTokens.toLocaleString()]}),l.outputTokens!==void 0&&c("span",{children:[r.outputTokens," ",l.outputTokens.toLocaleString()]}),l.durationMs!==void 0&&c("span",{children:[r.duration," ",gx(l.durationMs,r)]})]})]})},hx=({item:t,display:r,open:o,onToggle:n})=>{let a=px(t.kind),i=ng(t),s=r!=="compact"&&!!t.summary,l=o&&!!t.content;return c("div",{className:"orb-omph-process","data-status":t.status,"data-open":o||void 0,children:[c("button",{type:"button",className:"orb-omph-process-toggle","aria-expanded":o,onClick:n,children:[e(Fr,{size:12,className:"orb-omph-process-chevron"}),e(a,{size:14}),e("span",{className:i?"orb-omph-shimmer":void 0,children:t.title}),s&&e("span",{className:"orb-omph-process-summary",children:t.summary})]}),l&&t.content&&e(fx,{content:t.content}),o&&t.streaming&&e("span",{className:"orb-omph-caret","aria-hidden":"true"})]})},Zl=t=>{let r=t.user?.content||t.assistant?.content||t.id,o=r.split(`
202
- `).find(n=>n.trim())??r;return o.length>rg?`${o.slice(0,rg)}\u2026`:o},vx=0,ag=({turns:t,labels:r,processDisplay:o,cardHooks:n,resolveFileLink:a,onOpenFile:i})=>{let[s,l]=er.useState({}),d=u=>{if(!i||u.defaultPrevented||u.button!==vx||u.metaKey||u.ctrlKey||u.shiftKey||u.altKey)return;let p=u.target.closest("a[href]");if(!p)return;let f=a(p.getAttribute("href")??"");f&&(u.preventDefault(),i(f,p));};return e(jsxRuntime.Fragment,{children:t.map((u,p)=>{let f=!!(u.assistant&&!u.assistant.streaming),m=p===t.length-1&&f?"always":"hover";return c("article",{className:"orb-omph-turn","data-omph-turn":u.id,"data-actions-reveal":m,children:[u.user&&c("div",{className:"orb-omph-user",children:[e("div",{className:"orb-omph-user-bubble",children:u.user.content}),e("div",{className:"orb-omph-clock",children:u.user.timestamp.toLocaleTimeString()})]}),u.process&&u.process.length>0&&e("div",{className:"orb-omph-process-list",children:u.process.map(v=>{let y=v.id in s?s[v.id]:ux(v,o);return e(hx,{item:v,display:o,open:y,onToggle:()=>l(g=>({...g,[v.id]:!y}))},v.id)})}),u.assistant&&c("div",{className:"orb-omph-assistant","data-file-links":i?"true":void 0,onClick:d,children:[e(vs,{content:u.assistant.content,messageId:u.assistant.id,cardHooks:n}),u.assistant.streaming&&e("span",{className:"orb-omph-caret","aria-hidden":"true"})]}),u.failure&&e("div",{className:"orb-omph-failure","data-severity":u.failure.severity,children:u.failure.content}),f&&e(bx,{turn:u,labels:r})]},u.id)})})};var yx={idle:"Idle",pending:"Pending",running:"Working",success:"Success",error:"Error",working:"Working",workingFor:t=>`Working for ${t}`,loadOlder:"Load earlier",loadingOlder:"Loading earlier\u2026",toBottom:"Back to bottom",copy:"Copy",copied:"Copied",turnActions:"Reply actions",usage:"Usage",inputTokens:"Input",outputTokens:"Output",duration:"Duration",send:"Send",stop:"Stop",turnRail:"Turns",secondUnit:"s",minuteUnit:"m",previewTitle:"File preview",previewClose:"Close preview",previewBack:"Back to conversation",previewExpand:"Expand preview",previewCollapse:"Restore preview size",previewCopyContent:"Copy content",previewCopyPath:"Copy path",previewOpenExternal:"Open externally",previewWrap:"Wrap",previewLoading:"Loading file",previewMissing:"File not found",previewFailed:"Could not load this file",previewUnsupported:"No preview for this file type",previewRetry:"Try again",previewResize:"Resize preview",previewLines:(t,r)=>t===r?`Line ${t}`:`Lines ${t}\u2013${r}`,previewTruncated:(t,r)=>`Showing the first ${t.toLocaleString()} of ${r.toLocaleString()} lines`,imageFailed:"The image could not be displayed",zoomIn:"Zoom in",zoomOut:"Zoom out",zoomFit:"Fit to width",newConversation:"New conversation",conversationList:"Conversation list",conversations:"Conversations",noConversations:"No conversations yet"},sg=t=>({...yx,...t}),Cx={waiting:"Waiting for approval",choose:"Choose an action",details:"Approval details",choices:"Actions",reject:"Reject",allowOnce:"Allow once",confirm:"Continue",other:"Other",otherPlaceholder:"Describe the action to take",escalation:t=>`Tool ${t} requests privileged execution`},lg=t=>({...Cx,...t}),xx=1e3,ig=60,Sx=1e3,cg=(t,r)=>{let o=Math.max(1,Math.round(Math.max(t,Sx)/xx)),n=Math.floor(o/ig),a=o%ig;return n<=0?`${o}${r.secondUnit}`:`${n}${r.minuteUnit} ${a}${r.secondUnit}`};var Px={open:false,ref:null,phase:"loading",data:null},dg=t=>{let[r,o]=er.useState(Px),n=er.useRef(r);n.current=r;let a=er.useRef(t);a.current=t;let i=er.useRef(null),s=er.useRef(0),l=er.useRef(null),d=er.useCallback(b=>{let m=a.current;if(!m)return;i.current?.abort();let v=new AbortController;i.current=v,s.current+=1;let y=s.current;o({open:true,ref:b,phase:"loading",data:null}),m(b,v.signal).then(g=>{y===s.current&&o(x=>({...x,phase:"ready",data:g}));},()=>{y!==s.current||v.signal.aborted||o(g=>({...g,phase:"error",data:null}));});},[]),u=er.useCallback((b,m)=>{l.current=m??null;let v=n.current;if(v.ref?.path===b.path&&v.phase==="ready"){o({...v,open:true,ref:b});return}d(b);},[d]),p=er.useCallback((b=false)=>{s.current+=1,i.current?.abort(),o(v=>({...v,open:false}));let m=l.current;b&&m?.isConnected&&m.focus({preventScroll:true});},[]),f=er.useCallback(()=>{let{ref:b}=n.current;b&&d(b);},[d]);return er.useEffect(()=>()=>{i.current?.abort();},[]),{state:r,open:u,close:p,reload:f}};var Ql="--orb-omph-pv-w",Jl="--orb-omph-pv-pref",Mx=880,Rx=560,ug=400,Go=320,Dx=.45,Nx=.7,mg=24,jl=(t,r,o)=>Math.min(Math.max(t,r),Math.max(r,o)),gg=({open:t,layout:r})=>{let o=er.useRef(null),n=er.useRef(null),[a,i]=er.useState(0),[s,l]=er.useState(null),[d,u]=er.useState(false),[p,f]=er.useState(false);er.useLayoutEffect(()=>{let T=o.current;if(!T)return;let I=()=>i(T.getBoundingClientRect().width);I();let S=new ResizeObserver(I);return S.observe(T),()=>S.disconnect()},[]),er.useEffect(()=>{t||u(false);},[t]);let b=r==="overlay"?false:r==="split"?a>=ug+Go:a>=Mx,m=b&&!d?"split":"overlay",v=Math.max(Go,Math.min(a*Nx,a-ug)),y=jl(s??a*Dx,Go,v),g=a>0&&a<Rx,x=er.useCallback(T=>{let I=o.current;I&&(I.style.setProperty(Jl,`${T}px`),I.dataset.placement==="split"&&I.dataset.open==="true"&&I.style.setProperty(Ql,`${T}px`));},[]),h=er.useCallback(T=>{T.button===0&&(T.preventDefault(),T.currentTarget.setPointerCapture(T.pointerId),n.current={pointerId:T.pointerId,startX:T.clientX,startWidth:y,latest:y},f(true));},[y]),C=er.useCallback(T=>{let I=n.current;!I||I.pointerId!==T.pointerId||(I.latest=jl(I.startWidth+(I.startX-T.clientX),Go,v),x(I.latest));},[v,x]),k=er.useCallback(T=>{let I=n.current;!I||I.pointerId!==T.pointerId||(n.current=null,T.currentTarget.hasPointerCapture(T.pointerId)&&T.currentTarget.releasePointerCapture(T.pointerId),l(I.latest),f(false));},[]),w=er.useCallback(T=>{let I={ArrowLeft:y+mg,ArrowRight:y-mg,Home:Go,End:v};T.key in I&&(T.preventDefault(),l(jl(I[T.key],Go,v)));},[v,y]);return {mainRef:o,placement:m,width:y,compact:g,dragging:p,expanded:d,canExpand:b,toggleExpanded:()=>u(T=>!T),gripProps:{role:"separator","aria-orientation":"vertical","aria-valuemin":Go,"aria-valuemax":Math.round(v),"aria-valuenow":Math.round(y),tabIndex:0,onPointerDown:h,onPointerMove:C,onPointerUp:k,onPointerCancel:k,onKeyDown:w}}};var Ps=48,Ex=900,bg=()=>typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,hg=({turns:t,contentVersion:r,hasOlder:o=false,loadingOlder:n=false,onLoadOlder:a})=>{let i=er.useRef(null),s=er.useRef(null),l=er.useRef(true),d=er.useRef({height:0,top:0}),u=er.useRef(void 0),p=er.useRef(false),[f,b]=er.useState(true),[m,v]=er.useState(false),[y,g]=er.useState(t[0]?.id),x=er.useCallback(()=>{let T=i.current;T&&(d.current={height:T.scrollHeight,top:T.scrollTop});},[]),h=er.useCallback(()=>{let T=i.current;if(!T)return;let I=T.getBoundingClientRect().top,S=T.querySelector("[data-omph-turn]")?.dataset.omphTurn;T.querySelectorAll("[data-omph-turn]").forEach(A=>{A.getBoundingClientRect().top-I<=Ps&&(S=A.dataset.omphTurn);}),g(S);},[]);er.useEffect(()=>{let T=i.current,I=s.current;if(!T||!I)return;let S=()=>{v(T.clientWidth>Ex),l.current&&(T.scrollTop=T.scrollHeight),x();};S();let A=new ResizeObserver(S);return A.observe(T),A.observe(I),()=>A.disconnect()},[x]),er.useLayoutEffect(()=>{let T=i.current;if(!T)return;let I=t[0]?.id,S=u.current,A=S!==void 0&&t.some(N=>N.id===S),D=A&&I!==void 0&&I!==S,M=S!==void 0&&!A;if(u.current=I,M){l.current=true,b(true),T.scrollTop=T.scrollHeight,x(),h();return}if(D){l.current=false,b(false);let N=T.scrollHeight-d.current.height;T.scrollTop=d.current.top+Math.max(0,N),x(),h();return}l.current&&(T.scrollTop=T.scrollHeight),x(),h();},[r,x,t,h]),er.useEffect(()=>{n||(p.current=false);},[n]);let C=er.useCallback(()=>{let T=i.current;if(!T)return;let S=T.scrollHeight-T.scrollTop-T.clientHeight<=Ps;S!==l.current&&(l.current=S,b(S)),x(),h();let A=T.scrollHeight-T.clientHeight>Ps,D=T.scrollTop<=Ps;!A||!D||S||!o||n||!a||p.current||(p.current=true,a());},[o,n,a,x,h]),k=er.useCallback(()=>{let T=i.current;T&&(l.current=true,b(true),T.scrollTo({top:T.scrollHeight,behavior:bg()?"auto":"smooth"}));},[]),w=er.useCallback(T=>{let S=i.current?.querySelector(`[data-omph-turn="${CSS.escape(T)}"]`);S&&(l.current=false,b(false),S.scrollIntoView({block:"start",behavior:bg()?"auto":"smooth"}));},[]);return {scrollerRef:i,contentRef:s,following:f,railVisible:m,activeTurnId:y,onScroll:C,returnToBottom:k,scrollToTurn:w}};P();var Ox=1e3,Fx=(t,r)=>r[t],Bx=t=>t.map(r=>[r.id,r.user?.content.length??0,r.assistant?.content.length??0,r.assistant?.streaming?"1":"0",r.failure?.id??"",(r.process??[]).map(o=>`${o.id}:${o.status}:${o.content?.length??0}`).join(",")].join(":")).join("|"),Hx=({startedAt:t,labels:r})=>{let[o,n]=er.useState(()=>Date.now());er.useEffect(()=>{n(Date.now());let i=window.setInterval(()=>n(Date.now()),Ox);return ()=>window.clearInterval(i)},[t]);let a=t===void 0?r.working:r.workingFor(cg(Math.max(0,o-t),r));return c("div",{className:"orb-omph-running","data-omph-running":"true",children:[e("span",{className:"orb-visually-hidden",role:"status","aria-live":"polite",children:r.working}),e("span",{className:"orb-omph-running-rule","aria-hidden":"true"}),c("span",{className:"orb-omph-running-body",children:[e("span",{className:"orb-omph-spinner","aria-hidden":"true"}),e("span",{className:"orb-omph-shimmer",children:a})]})]})},wz=({turns:t,title:r="OMPH Agent",description:o,headerActions:n,agentStatus:a,isResponding:i=false,labels:s,processDisplay:l="standard",showInput:d=false,placeholder:u,className:p,cardHooks:f,hasOlder:b=false,loadingOlder:m=false,onLoadOlder:v,onSend:y,onStop:g,onHeaderPointerDown:x,conversations:h=[],activeConversationId:C,onNewConversation:k,onSelectConversation:w,loadFilePreview:T,resolveFileLink:I=Ul,filePreviewLayout:S="auto",onOpenFileExternally:A})=>{let D=sg(s),M=a??(i?"running":"idle"),N=M==="running"||M==="pending",E=[Fx(M,D),o].filter(Boolean).join(" \xB7 "),O=er.useMemo(()=>Bx(t),[t]),F=hg({turns:t,contentVersion:O,hasOlder:b,loadingOlder:m,onLoadOlder:v}),[X,H]=er.useState(""),Y=X.trim(),W=i&&Y.length===0,j=[...t].reverse().find(le=>!!le.assistant?.streaming||le.process?.some(Ee=>Ee.streaming||Ee.status==="running"||Ee.status==="pending")),V=N?j?.startedAt:void 0,z=!!T,U=dg(T),K=gg({open:U.state.open,layout:S}),fe=er.useRef(null),se=er.useRef(null),ue=z&&U.state.open&&K.placement==="overlay",Se=K.placement==="split"&&U.state.open,$e={[Jl]:`${K.width}px`,[Ql]:Se?`${K.width}px`:"0px"};er.useEffect(()=>{se.current?.toggleAttribute("inert",ue);},[ue]);let ke=async()=>{if(!Y||!y)return;let le=Y;H("");try{await y(le);}catch{H(Ee=>Ee.trim().length===0?le:Ee);}};return c("div",{className:ut("orb-omph-panel",p),"data-omph-panel":"","data-status":M,"data-compact":K.compact||void 0,children:[c("div",{className:ut("orb-omph-header",x&&"cursor-grab active:cursor-grabbing"),onPointerDown:x,children:[e("span",{className:"orb-omph-avatar","aria-hidden":"true",children:"AI"}),c("div",{className:"min-w-0 flex-1",children:[e("div",{className:"orb-omph-title",children:r}),c("div",{className:"orb-omph-subtitle",children:[e("span",{className:"orb-omph-dot","data-active":N||void 0}),e("span",{className:"truncate",children:E||D.idle})]})]}),(k||w||n)&&c("div",{className:"orb-omph-header-actions",onPointerDown:le=>le.stopPropagation(),children:[e(_m,{conversations:h,activeConversationId:C,labels:D,onNewConversation:k,onSelectConversation:w}),n]})]}),c("div",{ref:K.mainRef,className:"orb-omph-main","data-placement":K.placement,"data-open":String(U.state.open),"data-dragging":K.dragging||void 0,style:$e,children:[c("div",{ref:se,className:"orb-omph-center",children:[c("div",{className:"orb-omph-stage","data-rail":F.railVisible||void 0,children:[e("div",{ref:F.scrollerRef,className:"orb-omph-scroll",onScroll:F.onScroll,children:c("div",{ref:F.contentRef,className:"orb-omph-column",children:[b&&v&&e("button",{type:"button",className:"orb-omph-older",disabled:m,onClick:v,children:m?D.loadingOlder:D.loadOlder}),e(ag,{turns:t,labels:D,processDisplay:l,cardHooks:f,resolveFileLink:I,onOpenFile:z?U.open:void 0}),N&&e(Hx,{startedAt:V,labels:D})]})}),F.railVisible&&t.length>0&&e("nav",{className:"orb-omph-rail","aria-label":D.turnRail,children:t.map(le=>e("button",{type:"button",className:"orb-omph-rail-mark","data-active":F.activeTurnId===le.id||void 0,"aria-label":Zl(le),title:Zl(le),onClick:()=>F.scrollToTurn(le.id)},le.id))}),!F.following&&e("button",{type:"button",className:"orb-omph-to-bottom","aria-label":D.toBottom,onClick:F.returnToBottom,children:e(Fr,{size:16})})]}),d&&c("form",{className:"orb-omph-composer",onSubmit:le=>{le.preventDefault(),W?g?.():ke();},children:[e("textarea",{className:"orb-omph-input",value:X,placeholder:u,rows:1,onChange:le=>H(le.target.value),onKeyDown:le=>{le.key!=="Enter"||le.shiftKey||le.nativeEvent.isComposing||(le.preventDefault(),W?g?.():ke());}}),e("button",{type:"submit",className:W?"orb-omph-stop":"orb-omph-send","aria-label":W?D.stop:D.send,disabled:!W&&Y.length===0,children:W?e(Mc,{size:16}):e(Ic,{size:16})})]})]}),z&&e(tg,{state:U.state,placement:K.placement,expanded:K.expanded,canExpand:K.canExpand,labels:D,gripProps:K.gripProps,paneRef:fe,onClose:U.close,onRetry:U.reload,onToggleExpand:K.toggleExpanded,onOpenExternally:A})]})]})};P();var bo="other",zx=t=>t instanceof HTMLElement&&t.closest('input, textarea, select, [contenteditable="true"], [contenteditable=""]')!==null,Vx=({request:t,onDecide:r,labels:o})=>{let n=lg(o),a=er.useRef(null),i=er.useRef(null),s=er.useRef(false),l=er.useRef(false),[d,u]=er.useState(false),[p,f]=er.useState(null),[b,m]=er.useState(""),v=t.choices??[],y=t.allowOther??v.length>0,g=v.length>0||y,x=t.reason?.trim()||n.escalation(t.toolName),h=t.detail?.trim(),C=p===bo&&b.trim().length>0,k=!g||p!==null&&p!==bo||C;er.useEffect(()=>{u(false),f(null),m(""),a.current?.focus();},[t.id]),er.useEffect(()=>{p===bo&&i.current?.focus();},[p]);let w=S=>{d||(u(true),r(S,t));},T=()=>{if(k){if(!g){w({kind:"allowed-once"});return}if(p===bo){let S=b.trim();if(!S)return;w({kind:"other",text:S});return}p&&w({kind:"choice",choiceId:p});}},I=S=>{if(!(d||zx(S.target))&&!(S.key!=="Enter"&&S.key!=="Escape")&&!(S.key==="Enter"&&S.target instanceof HTMLElement&&S.target.closest('button, a[href], [role="button"]'))&&!(S.ctrlKey||S.metaKey||S.altKey||S.shiftKey)&&(S.preventDefault(),S.stopPropagation(),!(S.repeat||s.current||l.current||S.nativeEvent.isComposing))){if(S.key==="Escape"){w({kind:"rejected"});return}T();}};return e("div",{className:"orb-omph-approval","data-omph-approval":t.id,"aria-busy":d,onKeyDown:I,onKeyUpCapture:()=>{l.current=false;},onCompositionStartCapture:()=>{s.current=true;},onCompositionEndCapture:()=>{s.current=false,l.current=true;},children:c("div",{className:"orb-omph-approval-card",children:[c("div",{className:"orb-omph-approval-strip",children:[e("span",{className:"orb-omph-approval-dot","aria-hidden":"true"}),g?n.choose:n.waiting]}),c("div",{ref:a,className:"orb-omph-approval-body",tabIndex:0,role:"group","aria-label":n.details,children:[e("div",{className:"orb-omph-approval-headline",children:x}),h&&e("div",{className:"orb-omph-approval-detail",children:h}),g&&c("fieldset",{className:"orb-omph-approval-choices",disabled:d,children:[e("legend",{className:"orb-visually-hidden",children:n.choices}),v.map(S=>{let A=p===S.id;return c("label",{className:"orb-omph-approval-choice","data-selected":A,children:[e("input",{type:"radio",name:`omph-approval-${t.id}`,value:S.id,checked:A,onChange:()=>f(S.id)}),c("span",{className:"orb-omph-approval-choice-copy",children:[e("span",{children:S.label}),S.description&&e("span",{className:"orb-omph-approval-choice-description",children:S.description})]})]},S.id)}),y&&c("label",{className:"orb-omph-approval-choice","data-selected":p===bo,children:[e("input",{type:"radio",name:`omph-approval-${t.id}`,value:bo,checked:p===bo,onChange:()=>f(bo)}),e("span",{className:"orb-omph-approval-choice-copy",children:e("span",{children:n.other})})]}),y&&p===bo&&e("textarea",{ref:i,className:"orb-omph-approval-other",value:b,placeholder:n.otherPlaceholder,rows:3,"aria-label":n.other,onChange:S=>m(S.target.value)})]})]}),c("div",{className:"orb-omph-approval-actions",children:[e("button",{type:"button",className:"orb-btn orb-btn-neutral orb-omph-approval-reject",disabled:d,onClick:()=>w({kind:"rejected"}),children:n.reject}),e("button",{type:"button",className:"orb-btn orb-btn-primary",disabled:d||!k,onClick:T,children:g?n.confirm:n.allowOnce})]})]})})};P();var kg=520,_x=88,Gx=88,Ux=24,Is=640,Pg=(t,r,o)=>Math.min(Math.max(t,r),Math.max(r,o)),rc=t=>typeof t=="number"?`${t}px`:t,Kx=t=>t instanceof HTMLElement?!!t.closest('button,input,a,textarea,select,[role="button"],[contenteditable="true"]'):false,Lz=({anchor:t,defaultAnchor:r="right",onAnchorChange:o,width:n=kg,top:a=_x,bottom:i=Gx,inset:s=Ux,zIndex:l=1300,shellClassName:d,shellStyle:u,className:p,onHeaderPointerDown:f,...b})=>{let m=er.useRef(null),v=er.useRef(null),[y,g]=er.useState(r),[x,h]=er.useState(0),[C,k]=er.useState(typeof n=="number"?n:kg),[w,T]=er.useState(0),[I,S]=er.useState(false),A=t??y;er.useEffect(()=>{let H=()=>h(window.innerWidth);return H(),window.addEventListener("resize",H),()=>window.removeEventListener("resize",H)},[]),er.useLayoutEffect(()=>{let H=()=>{let W=m.current?.getBoundingClientRect();W?.width?k(W.width):typeof n=="number"&&k(n);};if(H(),!m.current||typeof ResizeObserver>"u")return;let Y=new ResizeObserver(H);return Y.observe(m.current),()=>Y.disconnect()},[n]);let D=er.useCallback(H=>{if(!x)return s;let Y=x<Is?12:s,W=Math.max(Y,x-C-Y);return x<Is||H==="left"?Y:H==="center"?Pg((x-C)/2,Y,W):W},[s,C,x]),M=er.useCallback(H=>["left","center","right"].reduce((W,j)=>{let V=Math.abs(H-D(W));return Math.abs(H-D(j))<V?j:W},"right"),[D]),N=er.useCallback(H=>{t===void 0&&g(H),o?.(H);},[t,o]);er.useEffect(()=>{I||T(D(A));},[D,I,A]);let E=er.useCallback(H=>{f?.(H),!(H.defaultPrevented||Kx(H.target))&&(H.preventDefault(),H.currentTarget.setPointerCapture(H.pointerId),v.current={pointerId:H.pointerId,startClientX:H.clientX,startX:w,currentX:w,captureElement:H.currentTarget},S(true));},[f,w]),O=er.useCallback(H=>{let Y=v.current;if(!Y||Y.pointerId!==H.pointerId)return;let W=x<Is?12:s,j=Math.max(W,x-C-W),V=Pg(Y.startX+H.clientX-Y.startClientX,W,j);Y.currentX=V,T(V);},[s,C,x]),F=er.useCallback(H=>{let Y=v.current;if(!Y||Y.pointerId!==H.pointerId)return;try{Y.captureElement.releasePointerCapture(H.pointerId);}catch{}let W=M(Y.currentX);v.current=null,S(false),N(W),T(D(W));},[D,N,M]),X=er.useMemo(()=>({position:"fixed",top:rc(a),bottom:rc(i),left:w,width:rc(n),maxWidth:`calc(100vw - ${x<Is?24:s*2}px)`,zIndex:l,pointerEvents:"auto",transition:I?"none":"left 180ms ease-out",touchAction:"none",...u}),[i,s,I,w,u,a,x,n,l]);return e("div",{ref:m,className:ut("orbcafe-floating-agent-panel min-w-0",d),"data-anchor":A,"data-dragging":I?"true":"false",style:X,onPointerMove:O,onPointerUp:F,onPointerCancel:F,children:e(Wm,{...b,className:p,onHeaderPointerDown:E})})};P();var Yx={"top-left":"bottom-right","top-right":"bottom-left","bottom-left":"top-right","bottom-right":"top-left"},$z=({messages:t,onSend:r,onRegenerate:o,isResponding:n=false,className:a,placeholder:i,title:s="Copilot",corner:l="bottom-right",onCollapse:d,onHeaderPointerDown:u,onPlusClick:p,onMicClick:f,streamIntervalMs:b,streamChunkSize:m,onMessageStreamingComplete:v,cardHooks:y})=>{let[g,x]=er.useState(""),[h,C]=er.useState(false),k=er.useRef(null),w=Yx[l];er.useEffect(()=>{k.current?.scrollIntoView({behavior:"smooth"});},[t,n]);let T=er.useCallback(async()=>{let S=g.trim();!S||n||(x(""),await r(S));},[n,r,g]),I=er.useCallback(async S=>{S.key==="Enter"&&!h&&(S.preventDefault(),await T());},[T,h]);return c("div",{className:ut("relative flex h-full w-full min-h-[460px] min-w-[340px] flex-col overflow-hidden rounded-3xl border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-none dark:bg-[var(--orb-surface-2)]",a),children:[d&&e("button",{onClick:d,className:ut("absolute z-20 flex h-10 w-10 items-center justify-center rounded-full transition-colors hover:bg-transparent dark:hover:bg-transparent",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:e("span",{className:ut("block h-4 w-4 border-[var(--orb-ai-accent)]",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]")})}),c("div",{className:"flex items-center justify-between border-b border-[var(--orb-border)] px-4 py-3",onPointerDown:u,children:[e("div",{className:"flex items-center",children:e("h3",{className:"text-base font-semibold tracking-tight text-[var(--orb-fg)]",children:s})}),e("div",{})]}),c("div",{className:"flex-1 overflow-y-auto px-3 py-3 space-y-5 scrollbar-thin scrollbar-thumb-[var(--orb-border)]",children:[t.map((S,A)=>{let D=S.type==="assistant"&&A===t.length-1,M=S.type==="assistant"?{isLatestAssistant:D,isResponding:n,onRegenerate:o?()=>o(S.id):void 0}:void 0;return e(ys,{message:S,assistantActions:M,onStreamingComplete:()=>v?.(S.id),streamIntervalMs:b,streamChunkSize:m,cardHooks:y},S.id)}),e("div",{ref:k})]}),e("div",{className:"border-t border-[var(--orb-border)] px-3 py-3",children:c("div",{className:"flex items-center gap-2 rounded-xl border border-[var(--orb-p300)] bg-[var(--orb-canvas)] px-2 py-1.5 dark:bg-[var(--orb-surface-2)]",children:[e("button",{className:"flex h-8 w-8 items-center justify-center rounded-full text-[var(--orb-muted)] transition-colors hover:bg-[var(--orb-surface)] hover:text-[var(--orb-fg)] dark:text-[var(--orb-muted)] dark:hover:bg-[var(--orb-surface-2)]",onClick:p,type:"button","aria-label":"Add",children:e(en,{className:"h-4 w-4"})}),e("input",{className:"h-7 flex-1 border-none bg-transparent text-sm text-[var(--orb-fg)] outline-none placeholder:text-[var(--orb-muted)] dark:text-[var(--orb-fg)] dark:placeholder:text-[var(--orb-muted)]",placeholder:i||"Ask Copilot...",value:g,onChange:S=>x(S.target.value),onCompositionStart:()=>C(true),onCompositionEnd:()=>C(false),onKeyDown:I,"aria-label":"Copilot input",spellCheck:false}),e("button",{className:"flex h-8 w-8 items-center justify-center rounded-full text-[var(--orb-muted)] transition-colors hover:bg-[var(--orb-surface)] hover:text-[var(--orb-fg)] dark:text-[var(--orb-muted)] dark:hover:bg-[var(--orb-surface-2)]",onClick:f,type:"button","aria-label":"Microphone",children:e(La,{className:"h-4 w-4"})})]})})]})};P();var Zx=["var(--orb-primary)","var(--orb-primary)","var(--orb-primary)"],jx=`
198
+ `,n,": ",(i??a)(h.item.secondaryValue??0)]})},`secondary-${h.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(h=>c("div",{sx:C=>({borderRadius:"var(--orb-r-container)",px:1.1,py:.9,border:`1px solid ${Ar(C.palette.divider,.7)}`,bgcolor:Ar(C.palette.background.default,.35)}),children:[e(L,{component:"div",sx:{fontSize:"0.76rem",fontWeight:700,color:"var(--orb-fg-strong)"},noWrap:true,title:h.name,children:h.name}),e(L,{component:"div",sx:{fontSize:"0.71rem",color:"var(--orb-fg)"},children:a(h.primaryValue)}),n&&e(L,{component:"div",sx:{fontSize:"0.71rem",color:"var(--orb-fg)"},children:(i??a)(h.secondaryValue??0)})]},h.name))})]})};var qu=(t,r,o)=>{let n=new Set,a=[];return t.forEach(i=>{n.has(i)||(n.add(i),a.push({fieldId:i,label:o.get(i)?.label??i,zone:"rows"}));}),r.forEach(i=>{n.has(i)||(n.add(i),a.push({fieldId:i,label:o.get(i)?.label??i,zone:"columns"}));}),a},Xu=(t,r,o)=>t.map(n=>{let a=r.get(n.fieldId),i=a?.label??n.fieldId;return {fieldId:n.fieldId,label:`${o(n.aggregation)} \xB7 ${i}`,item:n,field:a}}),Yu=({rows:t,dimensionFieldId:r,primaryValue:o,secondaryValue:n})=>{if(!r)return [];let a=new Map;return t.forEach(i=>{let s=po(i[r]),l=a.get(s);if(l){l.push(i);return}a.set(s,[i]);}),Array.from(a.entries()).sort((i,s)=>i[0].localeCompare(s[0],void 0,{sensitivity:"base"})).map(([i,s])=>({name:i,primaryValue:wn(s,o.fieldId,o.aggregation),secondaryValue:n?wn(s,n.fieldId,n.aggregation):void 0}))};P();var Zu=({rows:t,fieldMap:r,rowFields:o,columnFields:n,valueFields:a,chartDimensionFieldId:i,chartPrimaryValueFieldId:s,chartSecondaryValueFieldId:l,chartType:d,isCollapsed:u,onChartDimensionFieldIdChange:p,onChartPrimaryValueFieldIdChange:f,onChartSecondaryValueFieldIdChange:b,onChartTypeChange:m,onToggleCollapse:v,getAggregationLabel:y})=>{let{t:g}=pe(),x=er.useMemo(()=>qu(o,n,r),[n,r,o]),h=er.useMemo(()=>Xu(a,r,y),[r,y,a]),C=h.find(M=>M.fieldId===s)??h[0],k=h.find(M=>M.fieldId===l&&M.fieldId!==C?.fieldId)??null,w=x.find(M=>M.fieldId===i)??x[0],T=w&&C?g("pivot.chart.subtitleReady",{dimension:w.label,measure:k?`${C.label} / ${k.label}`:C.label}):g("pivot.chart.subtitle"),I=er.useMemo(()=>!w||!C?[]:Yu({rows:t,dimensionFieldId:w.fieldId,primaryValue:C.item,secondaryValue:k?.item}),[C,t,k,w]),S=M=>C?ua(M,C.item,r):M.toLocaleString(),A=M=>k?ua(M,k.item,r):M.toLocaleString(),R=x.length>1||h.length>1;return c(Tn,{title:g("pivot.chart.title"),subtitle:T,collapsed:u,onToggleCollapse:v,expandAriaLabel:g("pivot.chart.collapse.ariaExpand"),collapseAriaLabel:g("pivot.chart.collapse.ariaCollapse"),bodySx:{display:"flex",flexDirection:"column",gap:1.1},children:[R&&c("div",{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(2, minmax(0, 1fr))",xl:"repeat(4, minmax(0, 1fr))"},gap:1,alignItems:"start"},children:[c(Co,{size:"small",sx:{minWidth:0,width:"100%"},children:[e(L,{component:"div",sx:{fontSize:"0.7rem",fontWeight:500,color:"var(--orb-fg)",mb:.45},children:g("pivot.chart.dimension")}),e(zt,{value:w?.fieldId??"",onChange:M=>p(String(M.target.value)),sx:{fontSize:"0.75rem",height:32},children:x.map(M=>e("option",{value:M.fieldId,sx:{fontSize:"0.75rem"},children:M.label},M.fieldId))})]}),c(Co,{size:"small",sx:{minWidth:0,width:"100%"},children:[e(L,{component:"div",sx:{fontSize:"0.7rem",fontWeight:500,color:"var(--orb-fg)",mb:.45},children:g("pivot.chart.primaryMeasure")}),e(zt,{value:C?.fieldId??"",onChange:M=>f(String(M.target.value)),sx:{fontSize:"0.75rem",height:32},children:h.map(M=>e("option",{value:M.fieldId,sx:{fontSize:"0.75rem"},children:M.label},M.fieldId))})]}),c(Co,{size:"small",sx:{minWidth:0,width:"100%"},children:[e(L,{component:"div",sx:{fontSize:"0.7rem",fontWeight:500,color:"var(--orb-fg)",mb:.45},children:g("pivot.chart.secondaryMeasure")}),c(zt,{value:k?.fieldId??"",onChange:M=>b(String(M.target.value)),sx:{fontSize:"0.75rem",height:32},children:[e("option",{value:"",sx:{fontSize:"0.75rem",color:"text.secondary"},children:g("common.none")}),h.filter(M=>M.fieldId!==C?.fieldId).map(M=>e("option",{value:M.fieldId,sx:{fontSize:"0.75rem"},children:M.label},M.fieldId))]})]}),c(Co,{size:"small",sx:{minWidth:0,width:"100%"},children:[e(L,{component:"div",sx:{fontSize:"0.7rem",fontWeight:500,color:"var(--orb-fg)",mb:.45},children:g("pivot.chart.chartType")}),c(zt,{value:d,onChange:M=>m(M.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:w?C?I.length===0?e("div",{sx:{py:5,textAlign:"center"},children:e(L,{component:"div",sx:{fontSize:"0.86rem",fontWeight:400,color:"var(--orb-fg)"},children:g("pivot.chart.emptyNoData")})}):d==="scatter"?e(Uu,{data:I,primaryLabel:C.label,secondaryLabel:k?.label,formatPrimaryValue:S,formatSecondaryValue:A}):e(Ku,{data:I,chartType:d,primaryLabel:C.label,secondaryLabel:k?.label,formatPrimaryValue:S,formatSecondaryValue:A}):e("div",{sx:{py:5,textAlign:"center"},children:e(L,{component:"div",sx:{fontSize:"0.86rem",fontWeight:400,color:"var(--orb-fg)"},children:g("pivot.chart.emptyNoValue")})}):e("div",{sx:{py:5,textAlign:"center"},children:e(L,{component:"div",sx:{fontSize:"0.86rem",fontWeight:400,color:"var(--orb-fg)"},children:g("pivot.chart.emptyNoDimension")})})})]})};P();var Qi=({node:t,dataColumns:r,fieldMap:o,level:n,expandedKeys:a,onToggle:i,getValue:s})=>{let l=a.has(t.key),d=t.children.length>0,u=t.isGrandTotal,p=d&&!l&&!u,f=u?800:p?700:d?600:500,b=u?800:p?600:500;return c(jsxRuntime.Fragment,{children:[c("tr",{sx:{bgcolor:u?vt()==="dark"?"color-mix(in oklch, var(--orb-primary) 22%, transparent)":"color-mix(in oklch, var(--orb-primary) 8%, transparent)":vt()==="dark"?"var(--orb-surface)":"background.paper","&:hover":{bgcolor:u?vt()==="dark"?"color-mix(in oklch, var(--orb-primary) 28%, transparent)":"color-mix(in oklch, var(--orb-primary) 12%, transparent)":"var(--orb-hover)"}},children:[c("td",{style:{fontWeight:f},sx:m=>({fontSize:"0.76rem",borderBottom:`1px solid ${m.palette.divider}`,whiteSpace:"nowrap",pl:n*2+1,display:"flex",alignItems:"center",height:40}),children:[d&&!u&&e(ae,{size:"small",onClick:()=>i(t.key),sx:{width:22,height:22,p:0,mr:.35,ml:-0.8},children:l?e(Vr,{size:12}):e(ko,{size:12})}),!d&&!u&&n>0&&e("div",{sx:{width:18}}),t.value]}),r.map(m=>e("td",{align:"right",style:{fontWeight:b},sx:{fontSize:"0.76rem",borderBottom:v=>`1px solid ${v.palette.divider}`,whiteSpace:"nowrap"},children:ua(s?s(t,m.id):t.aggregatedValues[m.id]??0,m.valueItem,o)},`${t.key}-${m.id}`))]}),l&&t.children.map(m=>e(Qi,{node:m,dataColumns:r,fieldMap:o,level:n+1,expandedKeys:a,onToggle:i,getValue:s},m.key))]})};P();var Rl=(t,r,o)=>{let n=[...t,...r];return o&&n.includes(o)?o:n[0]??""},es=(t,r)=>r&&t.some(o=>o.fieldId===r)?r:t[0]?.fieldId??"",Dl=(t,r,o)=>o===""?"":o&&o!==r&&t.some(n=>n.fieldId===o)?o:t.find(n=>n.fieldId!==r)?.fieldId??"",Qu=t=>{let r=new Set,o=n=>{n.forEach(a=>{a.children.length>0&&(r.add(a.key),o(a.children));});};return o(t),r},Ju=(t,r,o=0)=>t.length===0?o:t.reduce((n,a)=>a.children.length===0||!r.has(a.key)?Math.max(n,o+1):Math.max(n,Ju(a.children,r,o+1)),o),ey=(t,r)=>{let o=[],n=a=>{a.forEach(i=>{if(i.children.length>0&&r.has(i.key)){n(i.children);return}o.push(i);});};return n(t),o},gO=({title:t,rows:r,fields:o,initialLayout:n,initialChart:a,emptyText:i,maxPreviewHeight:s=520,initialChartCollapsed:l=false,initialTableCollapsed:d=false,model:u,enablePresetManagement:p=false,presets:f,defaultPresets:b,onPresetsChange:m,initialPresetId:v,onPresetApplied:y})=>{let{t:g}=pe(),x=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:8}})),h=er.useRef(0),C=er.useRef(false),k=t??g("pivot.title.default"),w=i??g("pivot.empty"),T=er.useMemo(()=>({sum:g("pivot.agg.sum"),count:g("pivot.agg.count"),avg:g("pivot.agg.avg"),min:g("pivot.agg.min"),max:g("pivot.agg.max")}),[g]),I=er.useCallback(D=>T[D]??Au[D],[T]),S=er.useMemo(()=>new Set(o.map(D=>D.id)),[o]),A=er.useMemo(()=>new Map(o.map(D=>[D.id,D])),[o]),[R,M]=er.useState(()=>lr(n?.rows,S)),[N,E]=er.useState(()=>lr(n?.columns,S)),[O,F]=er.useState(()=>lr(n?.filters,S)),[_,B]=er.useState(()=>{let D=n?.values??[],G=new Set,U=[];return D.forEach(de=>{if(!S.has(de.fieldId)||G.has(de.fieldId))return;G.add(de.fieldId),h.current+=1;let He=A.get(de.fieldId);U.push({tokenId:`v${h.current}`,fieldId:de.fieldId,aggregation:vr(de.aggregation,He)});}),U}),[Y,W]=er.useState({}),[j,V]=er.useState(true),[z,K]=er.useState(false),[q,fe]=er.useState(()=>Rl(lr(n?.rows,S),lr(n?.columns,S),a?.dimensionFieldId)),[se,ue]=er.useState(()=>{let D=(n?.values??[]).filter((G,U,de)=>S.has(G.fieldId)&&de.findIndex(He=>He.fieldId===G.fieldId)===U).map(G=>({tokenId:G.fieldId,fieldId:G.fieldId,aggregation:vr(G.aggregation,A.get(G.fieldId))}));return es(D,a?.primaryValueFieldId)}),[Se,$e]=er.useState(()=>{let D=(n?.values??[]).filter((U,de,He)=>S.has(U.fieldId)&&He.findIndex(ot=>ot.fieldId===U.fieldId)===de).map(U=>({tokenId:U.fieldId,fieldId:U.fieldId,aggregation:vr(U.aggregation,A.get(U.fieldId))})),G=es(D,a?.primaryValueFieldId);return Dl(D,G,a?.secondaryValueFieldId)}),[ke,le]=er.useState(a?.chartType??"bar-vertical"),[Ee,Me]=er.useState(l),[Pe,Ve]=er.useState(d),[tt,nt]=er.useState(()=>b??[]),[it,X]=er.useState(""),[De,ye]=er.useState(false),[Be,at]=er.useState(""),[Ze,St]=er.useState(null),[Mt,Ot]=er.useState(new Set(["__grand_total__"])),[At,re]=er.useState(new Set),Ke=u?.rowFields??R,Fe=u?.columnFields??N,ce=u?.filterFields??O,ve=u?.valueFields??_,te=u?.filterSelections??Y,he=u?.showGrandTotal??j,Ne=u?.isConfiguratorCollapsed??z,Je=u?.chartDimensionFieldId??q,st=u?.chartPrimaryValueFieldId??se,pt=u?.chartSecondaryValueFieldId??Se,Bt=u?.chartType??ke,Xt=u?.isChartCollapsed??Ee,Vt=u?.isTableCollapsed??Pe,wt=f??tt,Wt=p||wt.length>0||!!m,ht=er.useCallback(D=>{if(u?.setRowFields){u.setRowFields(D);return}M(D);},[u]),Nt=er.useCallback(D=>{if(u?.setColumnFields){u.setColumnFields(D);return}E(D);},[u]),lt=er.useCallback(D=>{if(u?.setFilterFields){u.setFilterFields(D);return}F(D);},[u]),Ft=er.useCallback(D=>{if(u?.setValueFields){u.setValueFields(D);return}B(D);},[u]),Yt=er.useCallback(D=>{if(u?.setFilterSelections){u.setFilterSelections(D);return}W(D);},[u]),Z=er.useCallback(D=>{if(u?.setShowGrandTotal){u.setShowGrandTotal(D);return}V(D);},[u]),$=er.useCallback(D=>{if(u?.setIsConfiguratorCollapsed){u.setIsConfiguratorCollapsed(D);return}K(D);},[u]),Q=er.useCallback(D=>{if(u?.setChartDimensionFieldId){u.setChartDimensionFieldId(D);return}fe(D);},[u]),be=er.useCallback(D=>{if(u?.setChartPrimaryValueFieldId){u.setChartPrimaryValueFieldId(D);return}ue(D);},[u]),Ce=er.useCallback(D=>{if(u?.setChartSecondaryValueFieldId){u.setChartSecondaryValueFieldId(D);return}$e(D);},[u]),Le=er.useCallback(D=>{if(u?.setChartType){u.setChartType(D);return}le(D);},[u]),_e=er.useCallback(D=>{if(u?.setIsChartCollapsed){u.setIsChartCollapsed(D);return}Me(D);},[u]),qe=er.useCallback(D=>{if(u?.setIsTableCollapsed){u.setIsTableCollapsed(D);return}Ve(D);},[u]),je=er.useCallback(D=>{let G=typeof D=="function"?D(wt):D;f||nt(G),m?.(G);},[m,wt,f]),mt=er.useMemo(()=>new Set([...Ke,...Fe,...ce]),[Ke,Fe,ce]),ft=er.useMemo(()=>o.filter(D=>!mt.has(D.id)),[o,mt]),Rt=er.useMemo(()=>{let D=[...Ke,...Fe,...ce],G=new Set,U=[];return D.forEach(de=>{G.has(de)||(G.add(de),U.push(de));}),U},[Fe,ce,Ke]);er.useEffect(()=>{ht(D=>{let G=D.filter(U=>S.has(U));return uo(D,G)?D:G}),Nt(D=>{let G=D.filter(U=>S.has(U));return uo(D,G)?D:G}),lt(D=>{let G=D.filter(U=>S.has(U));return uo(D,G)?D:G}),Ft(D=>{let G=D.filter(U=>S.has(U.fieldId)).map(U=>({...U,aggregation:vr(U.aggregation,A.get(U.fieldId))}));return qi(D,G)?D:G});},[A,S]);let yt=er.useMemo(()=>{let D={};return Rt.forEach(G=>{let U=new Set;r.forEach(de=>{U.add(po(de[G]));}),D[G]=Array.from(U).sort((de,He)=>de.localeCompare(He));}),D},[Rt,r]);er.useEffect(()=>{Yt(D=>{let G={};return Rt.forEach(U=>{let de=yt[U]??[],ot=(D[U]??[]).filter(oe=>de.includes(oe)),Ge=Object.prototype.hasOwnProperty.call(D,U);G[U]=Ge?ot:de;}),Hu(D,G)?D:G});},[Rt,yt]),er.useEffect(()=>{Q(D=>Rl(Ke,Fe,D));},[Fe,Ke,Q]),er.useEffect(()=>{be(D=>es(ve,D));},[be,ve]),er.useEffect(()=>{Ce(D=>Dl(ve,st,D));},[st,Ce,ve]);let H=er.useMemo(()=>r.filter(D=>Rt.every(G=>{let U=te[G]??[],de=yt[G]??[];if(U.length===de.length)return true;if(U.length===0)return false;let He=po(D[G]);return U.includes(He)})),[Rt,yt,te,r]),J=er.useMemo(()=>{if(ve.length===0)return null;let D=new Map;if(H.forEach(Ge=>{let oe=Fe.length>0?Fe.map(ee=>po(Ge[ee])):[g("pivot.valueLabel")],me=_o(oe);D.set(me,oe);}),D.size===0){let Ge=Fe.length>0?Fe.map(()=>Ui):[g("pivot.valueLabel")];D.set(_o(Ge),Ge);}let G=Array.from(D.entries()).sort((Ge,oe)=>Bu(Ge[1],oe[1])),U=G.flatMap(([Ge,oe])=>ve.map(me=>{let ee=A.get(me.fieldId),Oe=`${I(me.aggregation)} ${ee?.label??me.fieldId}`,Qe=Fe.length===0||ve.length>1?`${oe.join(" / ")} \u2022 ${Oe}`:oe.join(" / ");return {id:`${Ge}::${me.tokenId}`,colKey:Ge,valueItem:me,label:Qe}})),de=[];Fe.length>0&&G.forEach(([Ge,oe])=>{let me=U.filter(Qe=>Qe.colKey===Ge),ee=de,Oe=[];oe.forEach((Qe,Re)=>{Oe.push(`d${Re}:${Qe}`);let Ye=`col::${_o(Oe)}`,Pt=ee.find(Qo=>Qo.key===Ye);Pt||(Pt={key:Ye,label:Qe,children:[],leafColumnIds:[],path:oe.slice(0,Re+1),depth:Re},ee.push(Pt)),me.forEach(Qo=>{Pt.leafColumnIds.includes(Qo.id)||Pt.leafColumnIds.push(Qo.id);}),ee=Pt.children;});});let He=Ge=>{let oe={};return U.forEach(me=>{let ee=Ge.filter(Oe=>{let Qe=Fe.length>0?Fe.map(Re=>po(Oe[Re])):[g("pivot.valueLabel")];return _o(Qe)===me.colKey});oe[me.id]=wn(ee,me.valueItem.fieldId,me.valueItem.aggregation);}),oe},ot=[];if(Ke.length===0)ot.push({key:"root",value:g("pivot.resultLabel")||Du,children:[],isLeaf:true,aggregatedValues:He(H),path:[],depth:0});else {let Ge=(oe,me,ee)=>{if(me>=Ke.length)return [];let Oe=Ke[me],Qe=new Map;return oe.forEach(Re=>{let Ye=po(Re[Oe]);Qe.has(Ye)||Qe.set(Ye,[]),Qe.get(Ye).push(Re);}),Array.from(Qe.keys()).sort().map(Re=>{let Ye=Qe.get(Re),Pt=[...ee,Re];return {key:_o(Pt),value:Re,fieldId:Oe,aggregatedValues:He(Ye),children:Ge(Ye,me+1,Pt),isLeaf:me===Ke.length-1,path:Pt,depth:me}})};ot.push(...Ge(H,0,[]));}return {dataColumns:U,columnTree:de,rowTree:ot}},[Fe,A,H,I,Ke,g,ve]),ge=er.useCallback((D,G)=>(h.current+=1,{tokenId:`v${h.current}`,fieldId:D,aggregation:vr(G,A.get(D))}),[A]),Te=er.useCallback(D=>{if(D==="rows")return ht([]);if(D==="columns")return Nt([]);if(D==="filters")return lt([]);Ft([]);},[]),et=er.useCallback((D,G)=>{if(D==="rows")return ht(U=>U.filter(de=>de!==G));if(D==="columns")return Nt(U=>U.filter(de=>de!==G));if(D==="filters")return lt(U=>U.filter(de=>de!==G));Ft(U=>U.filter(de=>de.tokenId!==G));},[]),Xe=er.useCallback((D,G)=>{Ft(U=>U.map(de=>de.tokenId===D?{...de,aggregation:vr(G,A.get(de.fieldId))}:de));},[A]),kt=er.useCallback(D=>{St(String(D.active.id));},[]),bt=er.useCallback(D=>{if(St(null),!D.over)return;let G=Ki(String(D.active.id)),U=Ki(String(D.over.id));if(!G||!U||G.kind!=="item"||!G.key)return;if(G.zone===U.zone&&U.kind==="item"){if(G.zone==="rows"){let Re=Ke.indexOf(G.key),Ye=Ke.indexOf(U.key??"");Re!==-1&&Ye!==-1&&Re!==Ye&&ht(Pt=>sortable.arrayMove(Pt,Re,Ye));return}if(G.zone==="columns"){let Re=Fe.indexOf(G.key),Ye=Fe.indexOf(U.key??"");Re!==-1&&Ye!==-1&&Re!==Ye&&Nt(Pt=>sortable.arrayMove(Pt,Re,Ye));return}if(G.zone==="filters"){let Re=ce.indexOf(G.key),Ye=ce.indexOf(U.key??"");Re!==-1&&Ye!==-1&&Re!==Ye&&lt(Pt=>sortable.arrayMove(Pt,Re,Ye));return}if(G.zone==="values"){let Re=ve.findIndex(Pt=>Pt.tokenId===G.key),Ye=ve.findIndex(Pt=>Pt.tokenId===(U.key??""));Re!==-1&&Ye!==-1&&Re!==Ye&&Ft(Pt=>sortable.arrayMove(Pt,Re,Ye));}return}let de=U.zone,He=[...Ke],ot=[...Fe],Ge=[...ce],oe=[...ve],me="",ee=null;if(G.zone==="palette")me=G.key;else if(G.zone==="values"){let Re=oe.find(Ye=>Ye.tokenId===G.key);if(!Re)return;me=Re.fieldId,ee=Re,oe=oe.filter(Ye=>Ye.tokenId!==G.key);}else G.zone==="rows"?(me=G.key,He=He.filter(Re=>Re!==me)):G.zone==="columns"?(me=G.key,ot=ot.filter(Re=>Re!==me)):G.zone==="filters"&&(me=G.key,Ge=Ge.filter(Re=>Re!==me));if(!me)return;let Oe=()=>{He=He.filter(Re=>Re!==me),ot=ot.filter(Re=>Re!==me),Ge=Ge.filter(Re=>Re!==me);},Qe=Re=>{if(U.kind!=="item"||!U.key)return Re==="rows"?He.length:Re==="columns"?ot.length:Re==="filters"?Ge.length:Re==="values"?oe.length:0;if(Re==="rows"){let Ye=He.indexOf(U.key);return Ye>=0?Ye:He.length}if(Re==="columns"){let Ye=ot.indexOf(U.key);return Ye>=0?Ye:ot.length}if(Re==="filters"){let Ye=Ge.indexOf(U.key);return Ye>=0?Ye:Ge.length}if(Re==="values"){let Ye=oe.findIndex(Pt=>Pt.tokenId===U.key);return Ye>=0?Ye:oe.length}return 0};if(de==="palette"){ht(He),Nt(ot),lt(Ge),Ft(oe);return}if(de==="values"){let Re=Qe("values"),Ye=ee??ge(me);oe.splice(Re,0,Ye),ht(He),Nt(ot),lt(Ge),Ft(oe);return}if(Fu(de)){Oe();let Re=Qe(de);de==="rows"?He.splice(Re,0,me):de==="columns"?ot.splice(Re,0,me):Ge.splice(Re,0,me),ht(He),Nt(ot),lt(Ge),Ft(oe);}},[Fe,ge,ce,Ke,ve]),gt=er.useCallback((D,G)=>{Yt(U=>({...U,[D]:G}));},[]),Ct=er.useCallback(D=>{Ot(G=>{let U=new Set(G);return U.has(D)?U.delete(D):U.add(D),U});},[]),nr=er.useCallback(D=>{re(G=>{let U=new Set(G);return U.has(D)?U.delete(D):U.add(D),U});},[]),Et=er.useCallback(D=>{let G=A.get(D.fieldId),U=Pl(G);return e(Co,{size:"small",sx:{minWidth:98},children:e(zt,{value:D.aggregation,onChange:de=>Xe(D.tokenId,de.target.value),onClick:de=>de.stopPropagation(),onMouseDown:de=>de.stopPropagation(),sx:{fontSize:"0.72rem",height:26,"& select.orb-inp":{py:.35}},children:U.map(de=>e("option",{value:de,sx:{fontSize:"0.75rem"},children:I(de)},de))})})},[A,I,Xe]),Zt=er.useCallback(D=>{let G=yt[D]??[],U=te[D]??G;return G.length===0?g("pivot.filter.noValues"):U.length===0?g("pivot.filter.noneSelected"):U.length===G.length?g("pivot.filter.allValues"):g("pivot.filter.selectedCount",{selected:U.length,total:G.length})},[yt,te,g]),Ht=er.useCallback(D=>{let G=yt[D]??[],U=te[D]??G;return e(Vu,{options:G,selectedValues:U,onChange:de=>gt(D,de)})},[yt,te,gt]),Kt=er.useCallback(()=>`pivot-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,[]),$t=er.useCallback(()=>{let D={};return new Set([...Rt,...Object.keys(te)]).forEach(U=>{if(!S.has(U))return;let de=te[U]??[];D[U]=[...de];}),{layout:{rows:[...Ke],columns:[...Fe],filters:[...ce],values:ve.map(U=>({fieldId:U.fieldId,aggregation:U.aggregation}))},filterSelections:D,showGrandTotal:he,chart:{dimensionFieldId:Je,primaryValueFieldId:st,secondaryValueFieldId:pt,chartType:Bt}}},[Rt,Je,st,pt,Bt,Fe,ce,te,Ke,he,S,ve]),rr=er.useCallback(D=>{let G=lr(D.layout.rows,S),U=lr(D.layout.columns,S),de=lr(D.layout.filters,S),He=new Set,ot=(D.layout.values??[]).filter(me=>!S.has(me.fieldId)||He.has(me.fieldId)?false:(He.add(me.fieldId),true)).map(me=>ge(me.fieldId,me.aggregation)),Ge={};Object.entries(D.filterSelections??{}).forEach(([me,ee])=>{!S.has(me)||!Array.isArray(ee)||(Ge[me]=Array.from(new Set(ee.map(Oe=>String(Oe)))));}),ht(G),Nt(U),lt(de),Ft(ot),Yt(Ge),typeof D.showGrandTotal=="boolean"&&Z(D.showGrandTotal),Q(Rl(G,U,D.chart?.dimensionFieldId));let oe=es(ot,D.chart?.primaryValueFieldId);be(oe),Ce(Dl(ot,oe,D.chart?.secondaryValueFieldId)),Le(D.chart?.chartType??"bar-vertical"),X(D.id),y?.(D);},[ge,y,Q,be,Ce,Le,Nt,lt,Yt,ht,Z,Ft,S]),ar=er.useCallback(D=>{if(!D){X("");return}let G=wt.find(U=>U.id===D);if(!G){X("");return}rr(G);},[rr,wt]),fr=er.useCallback(()=>{let D=g("pivot.preset.defaultName",{index:wt.length+1});at(D),ye(true);},[wt.length,g]),Ir=er.useCallback(()=>{let D=Be.trim();if(!D)return;let G={id:Kt(),name:D,...$t()};je(U=>[...U,G]),X(G.id),ye(false);},[$t,Kt,Be,je]),Mr=er.useCallback(()=>{it&&(je(D=>D.filter(G=>G.id!==it)),X(""));},[it,je]);er.useEffect(()=>{if(!v||C.current)return;let D=wt.find(G=>G.id===v);D&&(C.current=true,rr(D));},[rr,v,wt]),er.useEffect(()=>{it&&(wt.some(D=>D.id===it)||X(""));},[it,wt]);let no=er.useMemo(()=>{if(!he||!J||!Ke.length)return null;let D={};return J.dataColumns.forEach(G=>{let U=H.filter(de=>{let He=Fe.length>0?Fe.map(ot=>po(de[ot])):[g("pivot.valueLabel")];return _o(He)===G.colKey});D[G.id]=wn(U,G.valueItem.fieldId,G.valueItem.aggregation);}),{key:"__grand_total__",value:g("pivot.grandTotal")||Nu,children:[],isLeaf:false,isGrandTotal:true,aggregatedValues:D,path:[],depth:-1}},[he,J,H,Fe,Ke.length,g]),yr=er.useMemo(()=>Qu(J?.rowTree??[]),[J]),Or=er.useMemo(()=>Qu(J?.columnTree??[]),[J]);er.useEffect(()=>{Ot(D=>{let G=new Set;return D.has("__grand_total__")&&G.add("__grand_total__"),yr.forEach(U=>{D.has(U)&&G.add(U);}),G});},[yr]),er.useEffect(()=>{re(D=>{let G=new Set;return Or.forEach(U=>{D.has(U)&&G.add(U);}),G});},[Or]);let qo=er.useCallback(()=>{Ot(D=>{let G=new Set(D);return yr.forEach(U=>G.add(U)),G});},[yr]),Xo=er.useCallback(()=>{Ot(D=>{let G=new Set;return D.has("__grand_total__")&&G.add("__grand_total__"),G});},[]),Lo=er.useCallback(()=>{re(new Set(Or));},[Or]),Yo=er.useCallback(()=>{re(new Set);},[]),Zo=er.useMemo(()=>!J||Fe.length===0?[]:ey(J.columnTree,At),[Fe.length,At,J]),Rr=er.useMemo(()=>{if(!J)return [];if(Fe.length===0)return J.dataColumns.map(G=>({id:G.id,label:G.label,leafColumnIds:[G.id],valueItem:G.valueItem}));let D=new Map(J.dataColumns.map(G=>[G.id,G]));return Zo.flatMap(G=>{let U=new Map;return G.leafColumnIds.forEach(de=>{let He=D.get(de);if(!He)return;let ot=He.valueItem.tokenId,Ge=`${I(He.valueItem.aggregation)} ${A.get(He.valueItem.fieldId)?.label??He.valueItem.fieldId}`,oe=U.get(ot);if(oe){oe.leafColumnIds.push(de);return}U.set(ot,{id:`${G.key}::${ot}`,label:ve.length>1?Ge:G.label,leafColumnIds:[de],valueItem:He.valueItem});}),Array.from(U.values())})},[Fe.length,A,I,J,ve.length,Zo]),Oo=er.useMemo(()=>new Map(Rr.map(D=>[D.id,D])),[Rr]),jo=er.useMemo(()=>Rr.map(D=>({id:D.id,colKey:D.id,valueItem:D.valueItem,label:D.label})),[Rr]),Kr=er.useMemo(()=>{if(!J||Fe.length===0)return [];let D=[],G=Ju(J.columnTree,At),U=G+(ve.length>1?1:0),de=(He,ot)=>{D[ot]??(D[ot]=[]),He.forEach(Ge=>{let oe=Ge.children.length>0&&At.has(Ge.key),me=Rr.filter(Oe=>Ge.leafColumnIds.some(Qe=>Oe.leafColumnIds.includes(Qe))).length,ee=oe||ve.length>1?1:U-ot;D[ot].push({key:Ge.key,label:Ge.label,colSpan:me,rowSpan:ee,expandable:Ge.children.length>0,expanded:oe}),oe&&de(Ge.children,ot+1);});};return de(J.columnTree,0),ve.length>1&&(D[G]=Rr.map(He=>({key:He.id,label:He.label,colSpan:1,rowSpan:1,expandable:false,expanded:false}))),D},[Fe.length,At,J,ve.length,Rr]),ao=er.useCallback((D,G)=>G.leafColumnIds.reduce((U,de)=>U+(D.aggregatedValues[de]??0),0),[]),Ln=er.useMemo(()=>c(jsxRuntime.Fragment,{children:[e(we,{size:"small",variant:"text",onClick:qo,disabled:yr.size===0,sx:{minWidth:"auto",px:.8,fontSize:"0.72rem"},children:g("pivot.table.expandRowsAll")}),e(we,{size:"small",variant:"text",onClick:Xo,disabled:yr.size===0,sx:{minWidth:"auto",px:.8,fontSize:"0.72rem"},children:g("pivot.table.collapseRowsAll")}),e(Dt,{orientation:"vertical",flexItem:true}),e(we,{size:"small",variant:"text",onClick:Lo,disabled:Or.size===0,sx:{minWidth:"auto",px:.8,fontSize:"0.72rem"},children:g("pivot.table.expandColumnsAll")}),e(we,{size:"small",variant:"text",onClick:Yo,disabled:Fe.length===0,sx:{minWidth:"auto",px:.8,fontSize:"0.72rem"},children:g("pivot.table.collapseColumnsAll")})]}),[Fe.length,Or.size,yr.size,Yo,Xo,Lo,qo,g]),Fo=()=>{if(!Ze)return null;let D=Ki(Ze);if(!D||D.kind!=="item"||!D.key)return null;if(D.zone==="palette"){let He=A.get(D.key);return He?e(Tl,{label:He.label,subtitle:He.type}):null}if(D.zone==="values"){let He=ve.find(me=>me.tokenId===D.key);if(!He)return null;let Ge=A.get(He.fieldId)?.label??He.fieldId,oe=`${I(He.aggregation)}(${Ge})`;return e(Xi,{label:Ge,caption:oe})}let U=A.get(D.key)?.label??D.key,de=Zt(D.key);return e(Xi,{label:U,caption:de})};return c(Ae,{sx:D=>({p:{xs:1.2,md:2},borderRadius:"var(--orb-r-container)",border:`1px solid ${D.palette.divider}`,bgcolor:"var(--orb-canvas)",boxShadow:"var(--orb-shadow-2)",display:"flex",flexDirection:"column",gap:2.25}),children:[c("div",{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1.5,flexWrap:"wrap"},children:[c("div",{sx:{minWidth:0,display:"flex",flexDirection:"column",gap:.35},children:[e(L,{component:"div",sx:{fontSize:"1.08rem",fontWeight:700,lineHeight:1.25,color:"var(--orb-fg-strong)"},children:k}),e(L,{component:"div",sx:{fontSize:"0.8rem",fontWeight:400,color:"var(--orb-fg)"},children:g("pivot.subtitle.default")})]}),c(ie,{direction:"row",spacing:1.5,alignItems:"center",children:[Wt&&c(jsxRuntime.Fragment,{children:[e(Co,{size:"small",sx:{minWidth:200},children:c(zt,{value:it,displayEmpty:true,onChange:D=>ar(String(D.target.value)),sx:{fontSize:"0.75rem",height:32},children:[e("option",{value:"",sx:{fontSize:"0.75rem",color:"text.secondary"},children:g("pivot.preset.selectPlaceholder")}),wt.map(D=>e("option",{value:D.id,sx:{fontSize:"0.75rem"},children:D.name},D.id))]})}),e(ct,{title:g("pivot.preset.save"),children:e(ae,{size:"small",onClick:fr,"aria-label":g("pivot.preset.save"),sx:{width:28,height:28,p:0},children:e(Po,{size:15})})}),e(ct,{title:g("pivot.preset.delete"),children:e("span",{children:e(ae,{size:"small",onClick:Mr,disabled:!it,"aria-label":g("pivot.preset.delete"),sx:{width:28,height:28,p:0},children:e(ni,{size:15})})})}),e(Dt,{flexItem:true,orientation:"vertical"})]}),c(L,{component:"div",sx:{fontSize:"0.75rem",fontWeight:400,color:"var(--orb-fg)"},children:[g("pivot.records"),": ",e("strong",{children:r.length.toLocaleString()})," / ",g("pivot.afterFilter"),":"," ",e("strong",{children:H.length.toLocaleString()})]}),e(Dt,{flexItem:true,orientation:"vertical"}),c("div",{sx:{display:"flex",alignItems:"center",gap:.6},children:[e(L,{component:"div",sx:{fontSize:"0.75rem",fontWeight:500,color:"var(--orb-fg-strong)"},children:g("pivot.grandTotal")}),e(ei,{size:"small",checked:he,onChange:D=>Z(D.target.checked)})]})]})]}),e(Dt,{}),c(core.DndContext,{sensors:x,collisionDetection:core.closestCenter,onDragStart:kt,onDragEnd:bt,children:[e(_u,{isConfiguratorCollapsed:Ne,onToggleCollapse:()=>$(D=>!D),availableFields:ft,fieldMap:A,filterFields:ce,columnFields:Fe,rowFields:Ke,valueFields:ve,clearZone:Te,removeFieldFromZone:et,getFilterSelectionSummary:Zt,renderDimensionFilterSelect:Ht,renderAggregationSelect:Et,getAggregationLabel:I}),e(Rd,{children:e(core.DragOverlay,{dropAnimation:{duration:250,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:Fo()})})]}),e(Zu,{rows:H,fieldMap:A,rowFields:Ke,columnFields:Fe,valueFields:ve,chartDimensionFieldId:Je,chartPrimaryValueFieldId:st,chartSecondaryValueFieldId:pt,chartType:Bt,isCollapsed:Xt,onChartDimensionFieldIdChange:D=>Q(D),onChartPrimaryValueFieldIdChange:D=>be(D),onChartSecondaryValueFieldIdChange:D=>Ce(D),onChartTypeChange:D=>Le(D),onToggleCollapse:()=>_e(D=>!D),getAggregationLabel:I}),e(Tn,{title:g("pivot.table.sectionTitle"),subtitle:Ke.length>0?Ke.map(D=>A.get(D)?.label??D).join(" > "):g("pivot.table.dimensions"),collapsed:Vt,onToggleCollapse:()=>qe(D=>!D),expandAriaLabel:g("pivot.table.collapse.ariaExpand"),collapseAriaLabel:g("pivot.table.collapse.ariaCollapse"),bodySx:{p:0},headerActions:Ln,children:J===null?e("div",{sx:{py:5,px:{xs:1.2,md:1.6},textAlign:"center"},children:e(L,{component:"div",sx:{fontSize:"0.86rem",fontWeight:400,color:"var(--orb-fg)"},children:w})}):e("div",{sx:{maxHeight:s},children:c("table",{className:"orb-tbl",size:"small",stickyHeader:true,children:[e("thead",{children:(Kr.length>0?Kr:[[]]).map((D,G)=>c("tr",{children:[G===0&&e("td",{rowSpan:Math.max(Kr.length,1),sx:U=>({fontWeight:800,fontSize:"0.76rem",color:"text.primary",bgcolor:vt()==="dark"?"var(--orb-canvas)":"var(--orb-surface)",borderBottom:`1px solid ${U.palette.divider}`,pl:2,minWidth:220,verticalAlign:"middle"}),children:Ke.length>0?Ke.map(U=>A.get(U)?.label).join(" > "):g("pivot.table.dimensions")}),(D.length>0?D:Rr.map(U=>({key:U.id,label:U.label,colSpan:1,rowSpan:1,expandable:false,expanded:false}))).map(U=>e("td",{align:"center",colSpan:U.colSpan,rowSpan:U.rowSpan,sx:de=>({fontWeight:800,fontSize:"0.75rem",color:"text.primary",bgcolor:vt()==="dark"?"var(--orb-canvas)":"var(--orb-surface)",borderBottom:`1px solid ${de.palette.divider}`,minWidth:148,verticalAlign:"middle"}),children:c("div",{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:.4},children:[U.expandable&&e(ae,{size:"small",onClick:()=>nr(U.key),sx:{width:22,height:22,p:0,ml:-0.2},children:U.expanded?e(Vr,{size:12}):e(ko,{size:12})}),e("div",{component:"span",children:U.label})]})},U.key))]},`pivot-header-row-${G}`))}),c("tbody",{children:[J.rowTree.map(D=>e(Qi,{node:D,dataColumns:jo,fieldMap:A,level:0,expandedKeys:Mt,onToggle:Ct,getValue:(G,U)=>{let de=Oo.get(U);return de?ao(G,de):0}},D.key)),no&&e(Qi,{node:no,dataColumns:jo,fieldMap:A,level:0,expandedKeys:Mt,onToggle:Ct,getValue:(D,G)=>{let U=Oo.get(G);return U?ao(D,U):0}})]})]})})}),c(Lt,{open:De,onClose:()=>ye(false),maxWidth:"xs",fullWidth:true,children:[e("div",{className:"orb-dialog-title",children:g("pivot.preset.saveDialogTitle")}),e("div",{className:"orb-dialog-content",children:e(ze,{autoFocus:true,fullWidth:true,margin:"dense",label:g("pivot.preset.nameLabel"),value:Be,onChange:D=>at(D.target.value),onKeyDown:D=>{D.key==="Enter"&&(D.preventDefault(),Ir());}})}),c("div",{className:"orb-dialog-actions",children:[e(we,{onClick:()=>ye(false),children:g("common.cancel")}),e(we,{variant:"contained",onClick:Ir,disabled:!Be.trim(),children:g("common.save")})]})]})]})};var em=(t,r,o)=>{let n=[...t,...r];return o&&n.includes(o)?o:n[0]??""},Al=(t,r)=>r&&t.some(o=>o.fieldId===r)?r:t[0]?.fieldId??"",tm=(t,r,o)=>o===""?"":o&&o!==r&&t.some(n=>n.fieldId===o)?o:t.find(n=>n.fieldId!==r)?.fieldId??"",yO=({fields:t,initialLayout:r,initialFilterSelections:o={},initialShowGrandTotal:n=true,initialConfiguratorCollapsed:a=false,initialChart:i,initialChartCollapsed:s=false,initialTableCollapsed:l=false})=>{let d=er.useRef(0),u=er.useMemo(()=>new Set(t.map(X=>X.id)),[t]),p=er.useMemo(()=>new Map(t.map(X=>[X.id,X])),[t]),[f,b]=er.useState(()=>lr(r?.rows,u)),[m,v]=er.useState(()=>lr(r?.columns,u)),[y,g]=er.useState(()=>lr(r?.filters,u)),[x,h]=er.useState(()=>{let X=r?.values??[],De=new Set,ye=[];return X.forEach(Be=>{!u.has(Be.fieldId)||De.has(Be.fieldId)||(De.add(Be.fieldId),d.current+=1,ye.push({tokenId:`v${d.current}`,fieldId:Be.fieldId,aggregation:vr(Be.aggregation,p.get(Be.fieldId))}));}),ye}),[C,k]=er.useState(o),[w,T]=er.useState(n),[I,S]=er.useState(a),[A,R]=er.useState(()=>em(lr(r?.rows,u),lr(r?.columns,u),i?.dimensionFieldId)),[M,N]=er.useState(()=>{let X=(()=>{let De=r?.values??[],ye=new Set,Be=[];return De.forEach(at=>{!u.has(at.fieldId)||ye.has(at.fieldId)||(ye.add(at.fieldId),Be.push({tokenId:at.fieldId,fieldId:at.fieldId,aggregation:vr(at.aggregation,p.get(at.fieldId))}));}),Be})();return Al(X,i?.primaryValueFieldId)}),[E,O]=er.useState(()=>{let X=(()=>{let ye=r?.values??[],Be=new Set,at=[];return ye.forEach(Ze=>{!u.has(Ze.fieldId)||Be.has(Ze.fieldId)||(Be.add(Ze.fieldId),at.push({tokenId:Ze.fieldId,fieldId:Ze.fieldId,aggregation:vr(Ze.aggregation,p.get(Ze.fieldId))}));}),at})(),De=Al(X,i?.primaryValueFieldId);return tm(X,De,i?.secondaryValueFieldId)}),[F,_]=er.useState(i?.chartType??"bar-vertical"),[B,Y]=er.useState(s),[W,j]=er.useState(l);er.useEffect(()=>{b(X=>{let De=X.filter(ye=>u.has(ye));return uo(X,De)?X:De}),v(X=>{let De=X.filter(ye=>u.has(ye));return uo(X,De)?X:De}),g(X=>{let De=X.filter(ye=>u.has(ye));return uo(X,De)?X:De}),h(X=>{let De=X.filter(ye=>u.has(ye.fieldId)).map(ye=>({...ye,aggregation:vr(ye.aggregation,p.get(ye.fieldId))}));return qi(X,De)?X:De});},[p,u]),er.useEffect(()=>{R(X=>em(f,m,X));},[m,f]),er.useEffect(()=>{N(X=>Al(x,X));},[x]),er.useEffect(()=>{O(X=>tm(x,M,X));},[M,x]);let V=er.useCallback(X=>{b(lr(X,u));},[u]),z=er.useCallback(X=>{v(lr(X,u));},[u]),K=er.useCallback(X=>{g(lr(X,u));},[u]),q=er.useCallback(X=>{h(De=>{let ye=X??[],Be=new Set,at=[];return ye.forEach(Ze=>{if(!u.has(Ze.fieldId)||Be.has(Ze.fieldId))return;Be.add(Ze.fieldId);let St=De.find(Mt=>Mt.fieldId===Ze.fieldId);if(St){at.push({...St,aggregation:vr(Ze.aggregation??St.aggregation,p.get(Ze.fieldId))});return}d.current+=1,at.push({tokenId:`v${d.current}`,fieldId:Ze.fieldId,aggregation:vr(Ze.aggregation,p.get(Ze.fieldId))});}),at});},[p,u]),fe=er.useCallback(X=>{V(X.rows??[]),z(X.columns??[]),K(X.filters??[]),q(X.values??[]);},[z,K,V,q]),se=er.useCallback(X=>{if(X==="rows")return b([]);if(X==="columns")return v([]);if(X==="filters")return g([]);h([]);},[]),ue=er.useCallback((X,De)=>{if(X==="rows")return b(ye=>ye.filter(Be=>Be!==De));if(X==="columns")return v(ye=>ye.filter(Be=>Be!==De));if(X==="filters")return g(ye=>ye.filter(Be=>Be!==De));h(ye=>ye.filter(Be=>Be.tokenId!==De));},[]),Se=er.useCallback((X,De)=>{h(ye=>ye.map(Be=>Be.tokenId===X?{...Be,aggregation:vr(De,p.get(Be.fieldId))}:Be));},[p]),$e=er.useCallback((X,De)=>{k(ye=>({...ye,[X]:De}));},[]),ke=er.useCallback(()=>{k({});},[]),le=er.useCallback(()=>{T(X=>!X);},[]),Ee=er.useCallback(()=>{S(X=>!X);},[]),Me=er.useCallback(X=>{R(X);},[]),Pe=er.useCallback(X=>{N(X);},[]),Ve=er.useCallback(X=>{O(X);},[]),tt=er.useCallback(()=>{Y(X=>!X);},[]),nt=er.useCallback(()=>{j(X=>!X);},[]);return {model:er.useMemo(()=>({rowFields:f,setRowFields:b,columnFields:m,setColumnFields:v,filterFields:y,setFilterFields:g,valueFields:x,setValueFields:h,filterSelections:C,setFilterSelections:k,showGrandTotal:w,setShowGrandTotal:T,isConfiguratorCollapsed:I,setIsConfiguratorCollapsed:S,chartDimensionFieldId:A,setChartDimensionFieldId:R,chartPrimaryValueFieldId:M,setChartPrimaryValueFieldId:N,chartSecondaryValueFieldId:E,setChartSecondaryValueFieldId:O,chartType:F,setChartType:_,isChartCollapsed:B,setIsChartCollapsed:Y,isTableCollapsed:W,setIsTableCollapsed:j}),[A,M,E,F,m,y,C,B,I,W,f,w,x]),actions:{setRows:V,setColumns:z,setFilters:K,setValues:q,setLayout:fe,clearZone:se,removeFieldFromZone:ue,setAggregationForValue:Se,setFilterSelection:$e,resetFilterSelections:ke,toggleGrandTotal:le,toggleConfigurator:Ee,setChartDimension:Me,setChartPrimaryValue:Pe,setChartSecondaryValue:Ve,setChartType:_,toggleChart:tt,toggleTable:nt}}};var wO=({orientation:t="auto",defaultNavigationOpen:r,onNavOpenChange:o}={})=>{let n=sr(),a=xo("(orientation: portrait)"),i=xo(n.breakpoints.down("md")),s=er.useMemo(()=>t==="auto"?a||i?"portrait":"landscape":t,[i,a,t]),[l,d]=er.useState(r??s==="landscape");er.useEffect(()=>{d(r??s==="landscape");},[r,s]);let u=f=>{d(f),o?.(f);};return {resolvedOrientation:s,isPortraitViewport:a,isCompactViewport:i,navigationOpen:l,setNavigationOpen:u,toggleNavigationOpen:()=>u(!l)}};var iy=t=>{let r=Number(t||0);return Number.isFinite(r)?r:0},TO=({rows:t,rowKey:r="id",numericField:o,defaultSelectedId:n})=>{let i=t[0]?.[r],[s,l]=er.useState(n??i),d=er.useMemo(()=>t.find(m=>m[r]===s)||t[0],[r,t,s]),[u,p]=er.useState(()=>{let m=d?.[o];return m==null?"0":String(m)});return {selectedId:s,selectedRecord:d,editorValue:u,setEditorValue:p,selectRecord:m=>{let v=m[r];l(v);let y=m[o];p(y==null?"0":String(y));},applyEditorValue:m=>{if(s===void 0)return;let v=iy(u),y=t.map(g=>g[r]===s?{...g,[o]:v}:g);m(y);}}};P();var sy=["code_128","ean_13","ean_8","qr_code","upc_a","upc_e"],om=(t,r,o,n)=>{r?.(t),n&&o?.();},AO=({open:t,onClose:r,title:o="Scan barcode",subtitle:n="Use the rear camera on the device. If scanning is unavailable, enter the code manually.",formats:a=sy,facingMode:i="environment",manualEntry:s=true,autoCloseOnDetect:l=true,scanIntervalMs:d=600,confirmLabel:u="Use code",cancelLabel:p="Close",manualPlaceholder:f="Enter barcode manually",onDetected:b,onError:m,sx:v})=>{let y=er__namespace.default.useRef(null),g=er__namespace.default.useRef(null),x=er__namespace.default.useRef(null),h=er__namespace.default.useRef(null),[C,k]=er__namespace.default.useState("idle"),[w,T]=er__namespace.default.useState(""),[I,S]=er__namespace.default.useState(null),[A,R]=er__namespace.default.useState(null),M=er__namespace.default.useCallback(()=>{x.current!==null&&(window.clearInterval(x.current),x.current=null),g.current&&(g.current.getTracks().forEach(O=>O.stop()),g.current=null),y.current&&(y.current.srcObject=null);},[]),N=er__namespace.default.useCallback(O=>{R(O),k("error"),m?.(O);},[m]);er__namespace.default.useEffect(()=>{if(!t){M(),k("idle"),R(null),T("");return}let O=false;return (async()=>{if(!(typeof window>"u"||typeof navigator>"u")){if(!navigator.mediaDevices?.getUserMedia){k("unsupported"),R("Camera access is not supported in this browser.");return}k("starting"),R(null);try{let _=await navigator.mediaDevices.getUserMedia({audio:!1,video:{facingMode:{ideal:i}}});if(O){_.getTracks().forEach(B=>B.stop());return}if(g.current=_,y.current&&(y.current.srcObject=_,await y.current.play()),!window.BarcodeDetector){k("unsupported"),R("BarcodeDetector is not available. Camera preview is ready and manual entry is enabled.");return}h.current=new window.BarcodeDetector({formats:a}),k("ready"),x.current=window.setInterval(async()=>{if(!(!y.current||!h.current)&&!(y.current.readyState<HTMLMediaElement.HAVE_CURRENT_DATA))try{let Y=(await h.current.detect(y.current)).find(j=>j.rawValue);if(!Y?.rawValue)return;let W={rawValue:Y.rawValue,format:Y.format};S(W),M(),om(W,b,r,l);}catch(B){N(B instanceof Error?B.message:"Failed to detect barcode.");}},d);}catch(_){N(_ instanceof Error?_.message:"Unable to start camera.");}}})(),()=>{O=true,M();}},[l,i,a,r,b,t,N,d,M]);let E=()=>{let O=w.trim();if(!O)return;let F={rawValue:O,format:"manual"};S(F),om(F,b,r,l);};return c(Lt,{open:t,onClose:r,fullWidth:true,maxWidth:"sm",children:[e("div",{className:"orb-dialog-title",sx:{fontSize:"1rem",fontWeight:900},children:o}),e("div",{className:"orb-dialog-content",sx:{pt:"8px !important"},children:c(ie,{spacing:2,sx:v,children:[e(L,{sx:{fontSize:"0.88rem",color:"text.secondary",lineHeight:1.55},children:n}),c(Ae,{elevation:0,sx:{position:"relative",overflow:"hidden",borderRadius:4,border:"1px solid",borderColor:"divider",minHeight:280,background:vt()==="dark"?"linear-gradient(180deg, color-mix(in oklch, var(--orb-canvas) 92%, transparent), color-mix(in oklch, var(--orb-canvas) 96%, transparent))":"linear-gradient(180deg, var(--orb-surface), color-mix(in oklch, var(--orb-border) 92%, transparent))"},children:[e("video",{ref:y,muted:true,playsInline:true,autoPlay:true,style:{width:"100%",height:280,objectFit:"cover",display:"block"}}),e("div",{sx:{pointerEvents:"none",position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:e("div",{sx:{width:"72%",maxWidth:320,aspectRatio:"1.7 / 1",borderRadius:3,border:"2px solid rgba(255,255,255,0.95)",boxShadow:"0 0 0 999px rgba(15,23,42,0.24)",position:"relative"},children:e("div",{sx:{position:"absolute",top:"50%",left:0,right:0,height:2,bgcolor:"var(--orb-ai-accent)",boxShadow:"0 0 18px color-mix(in oklch, var(--orb-ai-accent) 85%, transparent)"}})})}),c("div",{sx:{position:"absolute",top:12,left:12,display:"flex",gap:1,flexWrap:"wrap"},children:[e(xt,{icon:e($d,{}),label:C==="ready"?"Camera ready":C==="starting"?"Starting camera":C==="unsupported"?"Preview only":C==="error"?"Scanner error":"Idle",size:"small",color:C==="error"?"error":"primary",variant:"filled"}),I?e(xt,{icon:e(sp,{}),label:`${I.format||"barcode"}: ${I.rawValue}`,size:"small",color:"success",variant:"filled"}):null]})]}),A?e(jr,{severity:C==="unsupported"?"info":"warning",children:A}):null,s?c(ie,{direction:{xs:"column",sm:"row"},spacing:1.25,children:[e(ze,{fullWidth:true,label:"Barcode",placeholder:f,value:w,onChange:O=>T(O.target.value)}),e(we,{variant:"contained",onClick:E,sx:{minHeight:56,px:2.5},children:u})]}):null]})}),e("div",{className:"orb-dialog-actions",sx:{px:3,pb:2},children:e(we,{onClick:r,children:p})})]})};P();var ly={default:"var(--orb-status-fg)",primary:"var(--orb-status-primary)",success:"var(--orb-status-success)",warning:"var(--orb-status-warning)",error:"var(--orb-status-error)",info:"var(--orb-status-info)"},zO=({title:t,description:r,kicker:o,icon:n,badges:a=[],metrics:i=[],footer:s,children:l,selected:d=false,draggable:u=false,isDragging:p=false,swipeThreshold:f=88,startAction:b,endAction:m,dragHandleProps:v,onClick:y,onSwipe:g,sx:x})=>{let[h,C]=er.useState(0),[k,w]=er.useState(false),T=er.useRef(null),I=er.useRef(0),S=er.useRef(0),A=!!(b||m),R=132,M=()=>{C(0),w(false),T.current=null,I.current=0,S.current=0;},N=B=>{(B==="start"?b:m)?.onTrigger?.(),g?.(B),M();},E=B=>{!A||B.target.closest('button, a, input, textarea, [data-no-swipe="true"]')||(T.current=B.pointerId,I.current=B.clientX,S.current=B.clientX,w(true),B.currentTarget.setPointerCapture(B.pointerId));},O=B=>{if(!k||T.current!==B.pointerId)return;S.current=B.clientX;let Y=S.current-I.current,W=Math.max(-R,Math.min(R,Y));C(W);},F=B=>{if(!k||T.current!==B.pointerId)return;let Y=S.current-I.current;if(Y>=f&&b){N("start");return}if(Y<=-f&&m){N("end");return}Math.abs(Y)<12&&y?.(),M();},_=(B,Y)=>{if(!B)return null;let W=B.backgroundColor||ly[B.tone||"default"];return e("div",{sx:{position:"absolute",top:0,bottom:0,[Y]:0,width:R,px:2,display:"flex",alignItems:"center",justifyContent:Y==="left"?"flex-start":"flex-end",color:"var(--orb-on-primary)",background:`linear-gradient(135deg, ${W}, rgba(15,23,42,0.92))`},children:c(ie,{direction:"row",spacing:1,alignItems:"center",children:[B.icon,e(L,{sx:{fontWeight:700,fontSize:"0.95rem"},children:B.label})]})})};return c("div",{sx:{position:"relative",overflow:"hidden",borderRadius:4,...x},children:[_(b,"left"),_(m,"right"),e(Ae,{elevation:0,onPointerDown:E,onPointerMove:O,onPointerUp:F,onPointerCancel:M,sx:{position:"relative",zIndex:1,p:2,borderRadius:4,border:"1px solid",borderColor:d?"primary.main":"divider",background:vt()==="dark"?"linear-gradient(180deg, color-mix(in oklch, var(--orb-surface-3) 96%, transparent), color-mix(in oklch, var(--orb-canvas) 92%, transparent))":"linear-gradient(180deg, var(--orb-canvas), var(--orb-surface))",color:"text.primary",boxShadow:d?"0 18px 42px color-mix(in oklch, var(--orb-primary) 18%, transparent)":"0 12px 28px rgba(15, 23, 42, 0.08)",transform:`translate3d(${h}px, 0, 0) scale(${p?.985:1})`,transition:k?"none":"transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease",touchAction:"pan-y",cursor:y?"pointer":"default",opacity:p?.9:1},children:c(ie,{spacing:1.5,children:[c(ie,{direction:"row",spacing:1.5,alignItems:"flex-start",children:[n?e("div",{sx:{mt:.25},children:n}):null,c("div",{sx:{flex:1,minWidth:0},children:[o?e(L,{sx:{fontSize:"0.72rem",fontWeight:700,letterSpacing:"0.08em",color:"text.secondary"},children:o}):null,e(L,{sx:{fontSize:"1.05rem",fontWeight:800,lineHeight:1.25},children:t}),r?e(L,{sx:{mt:.5,fontSize:"0.9rem",color:"text.secondary",lineHeight:1.45},children:r}):null]}),u?e("div",{"data-no-swipe":"true",...v,sx:{alignSelf:"center",display:"inline-flex",touchAction:"none"},children:e(ae,{size:"small",children:e(Zd,{})})}):null]}),a.length>0?e(ie,{direction:"row",spacing:1,useFlexGap:true,flexWrap:"wrap",children:a.map((B,Y)=>e(xt,{label:B,size:"small",sx:{borderRadius:999,fontWeight:700,bgcolor:"action.hover",color:"text.primary"}},Y))}):null,i.length>0?e("div",{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(110px, 1fr))",gap:1},children:i.map(B=>c(Ae,{elevation:0,sx:{p:1.25,borderRadius:3,bgcolor:"action.hover",border:"1px solid",borderColor:"divider",color:"text.primary"},children:[e(L,{sx:{fontSize:"0.72rem",color:"text.secondary"},children:B.label}),e(L,{sx:{fontSize:"1rem",fontWeight:800,lineHeight:1.2},children:B.value})]},B.id))}):null,l,s]})})]})};P();var ga=({label:t,onPress:r,emphasis:o="default"})=>e("div",{component:"button",type:"button",onClick:r,sx:n=>({minHeight:72,borderRadius:3,border:"1px solid",borderColor:o==="primary"?"primary.main":"divider",background:o==="primary"?n.palette.primary.main:o==="danger"?vt()==="dark"?"color-mix(in oklch, var(--orb-status-error) 18%, transparent)":"color-mix(in oklch, var(--orb-status-error) 10%, transparent)":vt()==="dark"?"rgba(255,255,255,0.04)":"var(--orb-canvas)",color:o==="primary"?"var(--orb-on-primary)":"text.primary",fontSize:"1.25rem",fontWeight:800,transition:"transform 120ms ease, box-shadow 160ms ease, background-color 160ms ease",cursor:"pointer",appearance:"none",WebkitAppearance:"none",WebkitTapHighlightColor:"transparent","&:active":{transform:"scale(0.98)"}}),children:t}),qO=({value:t,defaultValue:r="",title:o,subtitle:n,placeholder:a="0",allowDecimal:i=false,allowNegative:s=false,maxLength:l,confirmLabel:d,clearLabel:u,backspaceLabel:p,onChange:f,onSubmit:b,onClose:m,sx:v})=>{let{t:y}=pe(),[g,x]=er.useState(r),h=t??g,C=M=>{t===void 0&&x(M),f?.(M);},k=M=>{l&&h.length>=l||C(`${h}${M}`);},w=M=>{if(M==="00"){if(!h){C("0");return}k("00");return}k(M);},T=()=>{!i||h.includes(".")||C(h?`${h}.`:"0.");},I=()=>{if(s){if(h.startsWith("-")){C(h.slice(1));return}C(h?`-${h}`:"-");}},S=()=>{C(h.slice(0,-1));},A=()=>{C("");},R=()=>{b?.(h);};return e(Ae,{elevation:0,sx:{p:2,borderRadius:4,border:"1px solid",borderColor:"divider",bgcolor:"background.paper",...v},children:c(ie,{spacing:2,children:[c(ie,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",children:[c("div",{sx:{minWidth:0},children:[o?e(L,{sx:{fontSize:"1rem",fontWeight:800},children:o}):null,n?e(L,{sx:{mt:.5,fontSize:"0.86rem",color:"text.secondary"},children:n}):null]}),m?e(ae,{onClick:m,size:"small",children:e(Xd,{})}):null]}),e(Ae,{elevation:0,sx:{p:2,borderRadius:3,border:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:e(L,{sx:{minHeight:38,fontSize:h?"1.9rem":"1.25rem",fontWeight:900,letterSpacing:"0.06em",color:h?"text.primary":"text.disabled"},children:h||a})}),c("div",{sx:{display:"grid",gridTemplateColumns:"repeat(3, minmax(0, 1fr))",gap:1.25},children:[["1","2","3","4","5","6","7","8","9"].map(M=>e(ga,{label:M,onPress:()=>w(M)},M)),e(ga,{label:s?"+/-":"00",onPress:s?I:()=>w("00")}),e(ga,{label:"0",onPress:()=>w("0")}),e(ga,{label:i?".":p?String(p):"DEL",onPress:i?T:S})]}),c("div",{sx:{display:"grid",gridTemplateColumns:"repeat(3, minmax(0, 1fr))",gap:1.25},children:[e("div",{component:"button",type:"button",onClick:S,sx:{minHeight:64,borderRadius:3,border:"1px solid",borderColor:"divider",bgcolor:"background.paper",cursor:"pointer",appearance:"none",WebkitAppearance:"none",WebkitTapHighlightColor:"transparent"},children:c(ie,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:[e(Wd,{}),e(L,{sx:{fontWeight:700},children:p||"DEL"})]})}),e(ga,{label:String(u||"CLR"),onPress:A,emphasis:"danger"}),e("div",{component:"button",type:"button",onClick:R,sx:M=>({minHeight:64,borderRadius:3,border:"1px solid",borderColor:"primary.main",background:M.palette.primary.main,color:"var(--orb-on-primary)",cursor:"pointer",appearance:"none",WebkitAppearance:"none",WebkitTapHighlightColor:"transparent"}),children:c(ie,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:[e(Gd,{}),e(L,{sx:{fontWeight:800},children:d||y("common.ok")})]})})]})]})})};P();var am=({touchMode:t="comfortable",sx:r,...o})=>{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},...r},children:e(Wr,{...o})})};P();var my=(t,r,o)=>{if(o?.(r),!!r.href){if(r.href.startsWith("http://")||r.href.startsWith("https://")){window.open(r.href,"_blank");return}t.push(r.href);}},im=({items:t,selectedId:r,orientation:o="auto",onItemSelect:n,sx:a})=>{let i=sr(),[s,l]=er.useState(false);er.useEffect(()=>{l(true);},[]);let d=xo("(orientation: portrait)"),u=xo(i.breakpoints.down("md")),p=o==="auto"?d||u?"portrait":"landscape":o,f=navigation.useRouter();return e("div",{sx:{display:"grid",gridTemplateColumns:!s||p==="portrait"?"repeat(2, minmax(0, 1fr))":"repeat(auto-fit, minmax(180px, 1fr))",gap:1.5,...a},children:t.map(b=>{let m=b.id===r,v=b.color||(m?i.palette.primary.main:i.palette.divider);return e(Ae,{elevation:0,sx:{overflow:"hidden",borderRadius:4,border:"1px solid",borderColor:m?"primary.main":"divider",boxShadow:m?"0 18px 40px color-mix(in oklch, var(--orb-primary) 16%, transparent)":"none",bgcolor:vt()==="dark"?"color-mix(in oklch, var(--orb-surface-3) 60%, transparent)":"background.paper"},children:e("div",{component:"button",type:"button",disabled:b.disabled,onClick:()=>my(f,b,n),sx:{width:"100%",p:2,minHeight:p==="portrait"?156:148,display:"block",border:0,background:"transparent",textAlign:"left",cursor:b.disabled?"not-allowed":"pointer",appearance:"none",WebkitAppearance:"none",WebkitTapHighlightColor:"transparent",color:"text.primary"},children:c(ie,{spacing:1.5,sx:{height:"100%"},children:[c(ie,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",children:[e("div",{sx:{width:44,height:44,borderRadius:3,display:"grid",placeItems:"center",color:m?"var(--orb-on-primary)":"text.primary",background:m?v:"action.hover"},children:b.icon||e(L,{sx:{fontSize:"1rem",fontWeight:900},children:b.title.slice(0,1).toUpperCase()})}),b.badge!==void 0?e("div",{sx:{minWidth:34,px:1,py:.4,borderRadius:999,bgcolor:m?"primary.main":"action.hover",color:m?"var(--orb-on-primary)":"text.secondary",textAlign:"center",fontWeight:800,fontSize:"0.8rem"},children:b.badge}):null]}),c("div",{sx:{flex:1,minWidth:0},children:[e(L,{sx:{fontSize:"1rem",fontWeight:800,lineHeight:1.25},children:b.title}),b.caption?e(L,{sx:{mt:.5,fontSize:"0.74rem",fontWeight:700,color:"text.secondary"},children:b.caption}):null,b.description?e(L,{sx:{mt:.75,fontSize:"0.84rem",lineHeight:1.45,color:"text.secondary"},children:b.description}):null]})]})})},b.id)})})};P();var cm=(t,r)=>r.trim()?t.reduce((o,n)=>{let a=n.title?.toLowerCase().includes(r.toLowerCase())||n.label?.toLowerCase().includes(r.toLowerCase())||n.description?.toLowerCase().includes(r.toLowerCase()),i=n.children?cm(n.children,r):[];return (a||i.length>0)&&o.push({...n,children:i.length>0?i:n.children}),o},[]):t,hy=t=>{let r=new Set,o=n=>{n.forEach(a=>{a.children?.length&&(r.add(a.id),o(a.children));});};return o(t),r},dm=({collapsed:t=false,onToggle:r,className:o="",maxHeight:n,menuData:a=[],colorMode:i="light",orientation:s="auto",headerSlot:l,footerSlot:d,activeHref:u,onItemSelect:p})=>{let{t:f}=pe(),b=sr(),m=Dr("(orientation: portrait)"),v=Dr(b.breakpoints.down("md")),y=s==="auto"?m||v?"portrait":"landscape":s,g=i==="dark",x=navigation.useRouter(),h=navigation.usePathname(),[C,k]=er.useState(""),[w,T]=er.useState(new Set),I=er.useMemo(()=>cm(a,C),[a,C]),S=er.useMemo(()=>C.trim()?hy(I):w,[w,I,C]);er.useEffect(()=>{t&&T(new Set);},[t]);let A=O=>O.appurl||O.href||"",R=O=>{p?.(O);let F=A(O);if(F){if(F.startsWith("http://")||F.startsWith("https://")){window.open(F,"_blank");return}x.push(F);}},M=O=>{let F=!!O.children?.length;if(t&&F){r?.();return}if(F){T(_=>{let B=new Set(_);return B.has(O.id)?B.delete(O.id):B.add(O.id),B});return}R(O);},N=O=>{let F=u||h,_=A(O);return !!(_&&F===_)},E=(O,F=0)=>{let _=!!O.children?.length,B=S.has(O.id),Y=N(O);return e("div",{sx:{pl:F===0?0:1.5},children:c(Ae,{elevation:0,sx:{mb:1,overflow:"hidden",borderRadius:3,border:"1px solid",borderColor:Y?"primary.main":"divider",bgcolor:Y?"action.selected":"background.paper"},children:[c("div",{component:"button",type:"button",onClick:()=>M(O),sx:{width:"100%",px:1.5,py:1.4,display:"flex",alignItems:"center",gap:1.25,border:0,background:"transparent",textAlign:"left",cursor:"pointer",appearance:"none",WebkitAppearance:"none",WebkitTapHighlightColor:"transparent"},children:[e(Qa,{variant:"rounded",sx:{width:40,height:40,bgcolor:Y?"primary.main":"action.hover",color:Y?"var(--orb-on-primary)":"text.primary"},children:O.icon||(O.title||O.label||"?").slice(0,1).toUpperCase()}),c("div",{sx:{flex:1,minWidth:0},children:[e(L,{sx:{fontSize:"0.95rem",fontWeight:800,lineHeight:1.2},children:O.title||O.label}),O.description?e(L,{sx:{mt:.4,fontSize:"0.78rem",color:"text.secondary",lineHeight:1.35},children:O.description}):null]}),_?e(an,{sx:{transform:B?"rotate(180deg)":"rotate(0deg)",transition:"transform 180ms ease"}}):e(ri,{color:"action"})]}),_?e(nn,{in:B,children:e("div",{sx:{px:1.25,pb:1.25},children:O.children?.map(W=>E(W,F+1))})}):null]})},O.id)};return t?e(Ae,{elevation:0,className:o,sx:{width:y==="portrait"?"100%":88,p:1,borderRadius:4,border:"1px solid",borderColor:"divider",bgcolor:g?"var(--orb-surface)":"color-mix(in oklch, var(--orb-canvas) 88%, transparent)",maxHeight:n?`${n}px`:void 0,overflowY:"auto"},children:c(ie,{spacing:1,children:[e(ae,{onClick:r,sx:{width:48,height:48,alignSelf:"center",bgcolor:"action.hover"},title:f("navigation.expand"),children:e(li,{})}),a.map(O=>e(ae,{onClick:()=>M(O),sx:{width:56,height:56,alignSelf:"center",borderRadius:3,bgcolor:N(O)?"primary.main":"action.hover",color:N(O)?"var(--orb-on-primary)":"text.primary"},children:O.icon||(O.title||O.label||"?").slice(0,1).toUpperCase()},O.id))]})}):e(Ae,{elevation:0,className:o,sx:{width:y==="portrait"?"100%":320,p:1.25,borderRadius:5,border:"1px solid",borderColor:"divider",bgcolor:g?"var(--orb-surface)":"color-mix(in oklch, var(--orb-canvas) 88%, transparent)",maxHeight:n?`${n}px`:void 0,overflow:"hidden",display:"flex",flexDirection:"column"},children:c(ie,{spacing:1.25,sx:{flex:1,minHeight:0},children:[c(ie,{direction:"row",spacing:1,alignItems:"center",children:[e(ze,{value:C,onChange:O=>k(O.target.value),placeholder:f("navigation.searchPlaceholder"),size:"small",fullWidth:true,InputProps:{startAdornment:e(lp,{fontSize:"small",color:"action"})}}),y==="landscape"&&!t?e(ae,{onClick:r,sx:{bgcolor:"action.hover"},children:e(op,{})}):null]}),l,e("div",{sx:{flex:1,minHeight:0,overflowY:"auto",pr:.25},children:I.length>0?I.map(O=>E(O)):e(L,{sx:{p:2,fontSize:"0.88rem",color:"text.secondary",textAlign:"center"},children:f("navigation.noMatch")})}),d]})})};P();var pm=(t,r)=>{let o=r[t.id];if(t.render)return t.render(o,r);if(o==null||o==="")return "--";if(t.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)},vy=t=>er__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}),yy=(t,r)=>{let o=r[t.id];if(o==null||o==="")return "--";if(t.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)},Cy=({summaryRow:t,visibleColumns:r,columns:o})=>{let n=o.filter(a=>r.includes(a.id)&&t[a.id]!=="");return n.length===0?null:e(Ae,{elevation:0,sx:{p:1.5,borderRadius:4,border:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:c(ie,{spacing:1,children:[e(L,{sx:{fontSize:"0.82rem",fontWeight:800,color:"text.secondary"},children:"Summary"}),e("div",{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(132px, 1fr))",gap:1},children:n.map(a=>c(Ae,{elevation:0,sx:{p:1.1,borderRadius:3,border:"1px solid",borderColor:"divider"},children:[e(L,{sx:{fontSize:"0.72rem",color:"text.secondary"},children:a.label}),e(L,{sx:{mt:.25,fontSize:"0.96rem",fontWeight:800},children:t[a.id]})]},`summary-${a.id}`))})]})})},xy=t=>{let{t:r}=pe(),o=sr(),{title:n,showToolbar:a=true,selectionMode:i,selected:s=[],onSelectionChange:l,actions:d,extraTools:u,fitContainer:p=false,fullWidth:f=false,maxHeight:b,loading:m=false,rowsPerPageOptions:v=[20,50,100,-1],onLayoutSave:y,filterConfig:g,rowKey:x,tableKey:h="default",graphReport:C,quickCreate:k,quickEdit:w,quickDelete:T,serviceUrl:I,orientation:S="auto",cardTitleField:A,cardSubtitleFields:R,toolbarSlot:M,emptyState:N,rowHeight:E="comfortable",cardActionSlot:O,renderCardFooter:F,onRowClick:_}=t,B=n||r("table.title.default"),Y=Dr("(orientation: portrait)"),W=Dr(o.breakpoints.down("md")),j=S==="auto"?Y||W?"portrait":"landscape":S,{columns:V,filterText:z,setFilterText:K,visibleColumns:q,showSummary:fe,setShowSummary:se,summaryColumns:ue,grouping:Se,setGrouping:$e,expandedGroups:ke,groupAnchorEl:le,setGroupAnchorEl:Ee,summaryAnchorEl:Me,setSummaryAnchorEl:Pe,anchorEl:Ve,setAnchorEl:tt,contextMenu:nt,sortedAndFilteredRows:it,summaryRow:X,visibleRows:De,page:ye,setPage:Be,rowsPerPage:at,setRowsPerPage:Ze,totalDisplayCount:St,setSelected:Mt,handleClick:Ot,toggleSummaryColumn:At,handleExport:re,handleCloseContextMenu:Ke,toggleColumnVisibility:Fe,toggleGroupExpand:ce,handleExpandGroupRecursively:ve,handleCollapseGroupRecursively:te,handleLayoutLoad:he,handleVariantLoad:Ne,handleLayoutSave:Je,effectiveAppId:st,currentLayoutData:pt,currentLayoutId:Bt,layoutIdToLoad:Xt,graphReportOpen:Vt,handleOpenGraphReport:wt,handleCloseGraphReport:Wt}=hn(t),ht=C?.enabled??false,Nt=ht&&(C?.interaction?.enabled??true),lt=Ii(),Ft=x||"id",Yt=er__namespace.default.useMemo(()=>({borderRadius:999,fontWeight:700,borderColor:rt(o.palette.divider,vt()==="dark"?.55:.3),bgcolor:vt()==="dark"?rt(o.palette.common.white,.06):rt(o.palette.background.paper,.92),color:o.palette.text.primary,"& .orb-chip-label":{px:1.05}}),[o]),Z=er__namespace.default.useMemo(()=>({...Yt,borderColor:rt(o.palette.primary.main,vt()==="dark"?.42:.24),bgcolor:vt()==="dark"?rt(o.palette.primary.main,.16):rt(o.palette.primary.main,.08)}),[Yt,o]),$=er__namespace.default.useMemo(()=>{let ee=new Set(s);return it.filter(Oe=>ee.has(Oe?.[Ft]))},[Ft,s,it]),Q=$.length===1?$[0]:null,be=!!k?.enabled,Ce=!!w?.enabled,Le=!!T?.enabled,_e=k?.fields,qe=k?.excludeFields||[],je=k?.initialValues||{},mt=w?.fields,ft=w?.excludeFields||[],Rt=w?.editableFields||[],yt=w?.nonEditableFields||[],H=w?.primaryKeys?.length?w.primaryKeys:[Ft],[J,ge]=er__namespace.default.useState(false),[Te,et]=er__namespace.default.useState(false),[Xe,kt]=er__namespace.default.useState({}),[bt,gt]=er__namespace.default.useState(false),[Ct,nr]=er__namespace.default.useState(false),[Et,Zt]=er__namespace.default.useState({}),[Ht,Kt]=er__namespace.default.useState(false),[$t,rr]=er__namespace.default.useState(false),ar=m||Te||Ct||$t,fr=er__namespace.default.useMemo(()=>{let ee=[...V];if(Array.isArray(_e)&&_e.length>0){let Oe=new Set(_e);ee=ee.filter(Qe=>Oe.has(Qe.id));}if(qe.length>0){let Oe=new Set(qe);ee=ee.filter(Qe=>!Oe.has(Qe.id));}return ee.filter(Oe=>!!Oe?.id)},[V,qe,_e]),Ir=er__namespace.default.useMemo(()=>{let ee=[...V];if(Array.isArray(mt)&&mt.length>0){let Oe=new Set(mt);ee=ee.filter(Qe=>Oe.has(Qe.id));}if(ft.length>0){let Oe=new Set(ft);ee=ee.filter(Qe=>!Oe.has(Qe.id));}return ee.filter(Oe=>!!Oe?.id)},[V,ft,mt]),Mr=er__namespace.default.useMemo(()=>new Set(H),[H]),no=er__namespace.default.useMemo(()=>new Set(Rt),[Rt]),yr=er__namespace.default.useMemo(()=>new Set(yt),[yt]),Or=er__namespace.default.useCallback(ee=>no.size>0?no.has(ee):!(yr.has(ee)||Mr.has(ee)),[no,yr,Mr]);er__namespace.default.useEffect(()=>{!Vt&&lt.hasActiveFilters&&lt.clearAll();},[lt,Vt]);let qo=()=>{let ee={};fr.forEach(Oe=>{ee[Oe.id]=je[Oe.id]??"";}),kt(ee),ge(true);},Xo=(ee,Oe)=>{kt(Qe=>({...Qe,[ee]:Oe}));},Lo=async()=>{if(!k?.onSubmit){ge(false);return}try{et(!0),await k.onSubmit(Xe),ge(!1);}finally{et(false);}},Yo=()=>{if(!Q)return;let ee={};Ir.forEach(Qe=>{ee[Qe.id]=Q[Qe.id]??"";});let Oe=w?.getInitialValues?{...ee,...w.getInitialValues(Q)}:ee;Zt(Oe),gt(true);},Zo=(ee,Oe)=>{Zt(Qe=>({...Qe,[ee]:Oe}));},Rr=async()=>{if(Q){if(!w?.onSubmit){gt(false);return}try{nr(!0),await w.onSubmit(Et,Q),gt(!1);}finally{nr(false);}}},Oo=()=>{$.length!==0&&Kt(true);},jo=async()=>{if($.length===0){Kt(false);return}if(!T?.onConfirm){Kt(false),Mt([]),l?.([]);return}try{rr(!0),await T.onConfirm($),Kt(!1),Mt([]),l?.([]);}finally{rr(false);}},Kr=it,{fieldMapping:ao}=mn({rows:Kr,config:{...C,title:C?.title||`${B} ${r("graph.reportTitle")}`}}),Ln=er__namespace.default.useMemo(()=>Nt?lt.applyRows(Kr,ao):Kr,[ao,lt,Nt,Kr]),{model:Fo}=mn({rows:Ln,config:{...C,title:C?.title||`${B} ${r("graph.reportTitle")}`,fieldMapping:ao}}),D=Fo.table.columns.map(ee=>({id:ee.id,label:ee.label,align:ee.align||"left",minWidth:120,numeric:ee.align==="right"})),G=st?e(bn,{appId:st,tableKey:h,currentLayoutData:pt,onLayoutLoad:he,targetLayoutId:Xt,activeLayoutId:Bt,serviceUrl:I??g?.serviceUrl}):null,U=V.filter(ee=>q.includes(ee.id)),de=U.find(ee=>ee.id===A)||U[0],He=R?.map(ee=>U.find(Oe=>Oe.id===ee)).filter(Boolean)||U.filter(ee=>ee.id!==de?.id).slice(0,j==="portrait"?2:3),ot=U.filter(ee=>ee.id!==de?.id&&!He.some(Oe=>Oe.id===ee.id)),Ge=[M,u].filter(Boolean),oe=c(jsxRuntime.Fragment,{children:[e(pn,{groupAnchorEl:le,setGroupAnchorEl:Ee,grouping:Se,setGrouping:$e,columns:V}),e(un,{anchorEl:Ve,setAnchorEl:tt,columns:V,visibleColumns:q,toggleColumnVisibility:Fe}),e(yi,{anchorEl:Me,setAnchorEl:Pe,showSummary:fe,setShowSummary:se,columns:V,summaryColumns:ue,toggleSummaryColumn:At}),e(Ci,{contextMenu:nt,handleCloseContextMenu:Ke,columns:V,visibleColumns:q,toggleColumnVisibility:Fe})]}),me=(ee,Oe,Qe)=>{let Re=s.includes(Oe),Ye=j==="portrait"?"repeat(2, minmax(0, 1fr))":"repeat(auto-fit, minmax(140px, 1fr))",Pt=Qe%2===0?rt(o.palette.primary.main,vt()==="dark"?.09:.04):rt(o.palette.primary.main,vt()==="dark"?.05:.022),Qo=rt(o.palette.divider,.22);return e(Ae,{elevation:0,onClick:()=>{Ot({},ee),_?.(ee);},sx:{p:E==="compact"?1.25:1.5,borderRadius:4,border:"0.5px solid",borderColor:Re?rt(o.palette.primary.main,.38):Qo,background:Re?`linear-gradient(135deg, ${rt(o.palette.primary.main,.13)}, ${rt(o.palette.primary.main,.06)})`:`linear-gradient(135deg, ${Pt}, ${rt(o.palette.primary.main,.015)})`,boxShadow:Re?`0 12px 30px ${rt(o.palette.primary.main,.2)}`:`0 3px 10px ${rt(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:Re?o.palette.primary.main:Qe%2===0?rt(o.palette.primary.main,.26):rt(o.palette.text.primary,.16)},"&:hover":{boxShadow:`0 10px 20px ${rt(o.palette.primary.main,.12)}`,transform:"translateY(-1px)"},"&:active":{transform:"scale(0.995)"}},children:c(ie,{spacing:1.25,children:[c(ie,{direction:"row",spacing:1.25,alignItems:"flex-start",children:[i?e(It,{checked:Re,onClick:Sr=>Sr.stopPropagation(),onChange:()=>Ot({},ee),sx:{mt:-0.6,ml:-0.6}}):null,c("div",{sx:{flex:1,minWidth:0},children:[de?e(L,{sx:{fontSize:"1rem",fontWeight:900,lineHeight:1.25},children:pm(de,ee)}):null,He.length>0?e(ie,{direction:"row",spacing:.75,useFlexGap:true,flexWrap:"wrap",sx:{mt:.75},children:He.map(Sr=>e(xt,{label:`${Sr.label}: ${yy(Sr,ee)}`,size:"small",variant:"outlined",sx:Yt},`${Oe}-${Sr.id}`))}):null]}),O?e("div",{onClick:Sr=>Sr.stopPropagation(),children:O(ee)}):null]}),ot.length>0?e("div",{sx:{display:"grid",gridTemplateColumns:Ye,gap:1},children:ot.map(Sr=>c(Ae,{elevation:0,sx:{p:1,borderRadius:3,bgcolor:vt()==="dark"?rt(o.palette.background.default,.7):rt(o.palette.background.paper,.92),border:"0.1px solid",borderColor:rt(o.palette.divider,.24)},children:[e(L,{sx:{fontSize:"0.72rem",color:"text.secondary"},children:Sr.label}),vy(pm(Sr,ee))]},`${Oe}-${Sr.id}-detail`))}):null,F?c(jsxRuntime.Fragment,{children:[e(Dt,{}),e("div",{onClick:Sr=>Sr.stopPropagation(),children:F(ee)})]}):null]})},Oe)};return c("div",{sx:{width:f?"100%":"auto",mb:p?0:2,...p?{flex:1,display:"flex",flexDirection:"column",minHeight:0,height:"100%",overflow:"hidden"}:{}},children:[g?e("div",{sx:{mb:2},children:e(am,{...g,onVariantLoad:ee=>{Ne(ee),g.onVariantLoad?.(ee);},appId:g.appId,tableKey:h,currentLayout:[{tableKey:h,layoutData:pt}],currentLayoutId:Bt,layoutRefs:[{tableKey:h,layoutId:Bt}],variantService:g.variantService,serviceUrl:I??g.serviceUrl,touchMode:j==="portrait"?"expanded":"comfortable"})}):null,c(Ae,{sx:{width:f?"100%":"auto",mb:p?0:2,display:"flex",flexDirection:"column",overflow:"hidden",position:"relative",bgcolor:"transparent",backgroundImage:"none",boxShadow:"none","&::before":ar?{content:'""',position:"absolute",top:0,left:0,width:"100%",height:"3px",background:"linear-gradient(90deg, color-mix(in oklch, var(--orb-primary) 0%, transparent) 0%, color-mix(in oklch, var(--orb-primary) 25%, transparent) 25%, var(--orb-primary) 50%, color-mix(in oklch, var(--orb-primary) 25%, transparent) 75%, color-mix(in oklch, var(--orb-primary) 0%, transparent) 100%)",backgroundSize:"220% 100%",animation:"cTableTopMarquee 1.2s linear infinite",zIndex:6,pointerEvents:"none"}:{},"@keyframes cTableTopMarquee":{"0%":{backgroundPosition:"220% 0"},"100%":{backgroundPosition:"-120% 0"}},...b?{height:b}:p?{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(fi,{filterText:z,setFilterText:K,onRowsPerPageChange:Ze,rowsPerPage:at,rowsPerPageOptions:v,page:ye,count:St,onPageChange:Be,actions:d,extraTools:Ge,grouping:Se,setGroupAnchorEl:Ee,showSummary:fe,setShowSummary:se,setAnchorEl:tt,setSummaryAnchorEl:Pe,handleExport:re,showCreateButton:be,onOpenCreateDialog:qo,showEditButton:Ce,onOpenEditDialog:Yo,editDisabled:$.length!==1,showDeleteButton:Le,onOpenDeleteConfirm:Oo,deleteDisabled:$.length===0,onLayoutSave:y||g?.variantService&&g?.appId?Je:void 0,loading:m,layoutManager:G,onOpenGraphReport:ht?wt:void 0})}):null,e("div",{sx:{flex:1,minHeight:0,overflow:"auto",p:1.5},children:c(ie,{spacing:1.25,children:[De.length===0&&!m?N||e(Ae,{elevation:0,sx:{p:4,borderRadius:4,border:"1px dashed",borderColor:"divider",textAlign:"center"},children:e(L,{sx:{fontSize:"0.92rem",color:"text.secondary"},children:r("common.noData")})}):null,De.map((ee,Oe)=>{if(ee.type==="group"){let Ye=ke.has(ee.id);return e(Ae,{elevation:0,sx:{borderRadius:4,border:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:c("div",{component:"button",type:"button",onClick:()=>ce(ee.id),sx:{width:"100%",px:1.5,py:1.3,border:0,background:"transparent",display:"flex",alignItems:"center",gap:1,textAlign:"left",cursor:"pointer",appearance:"none",WebkitAppearance:"none",color:"text.primary"},children:[Ye?e(an,{}):e(ri,{}),c("div",{sx:{flex:1,minWidth:0},children:[c(L,{sx:{fontSize:"0.94rem",fontWeight:800},children:[ee.field,": ",ee.value]}),c(L,{sx:{mt:.2,fontSize:"0.76rem",color:"text.secondary"},children:[ee.count," records"]})]}),Se.length>1&&ee.level<Se.length-1?c(ie,{direction:"row",spacing:.5,children:[e(xt,{size:"small",label:r("table.group.expandAll"),onClick:Pt=>{Pt.stopPropagation(),ve(ee.id);},sx:Z}),e(xt,{size:"small",label:r("table.group.collapseAll"),onClick:Pt=>{Pt.stopPropagation(),te(ee.id);},sx:Z})]}):null]})},ee.id)}let Qe=ee.data||ee,Re=ee.id||Qe[Ft]||Oe;return me(Qe,Re,Oe)}),fe?e(Cy,{summaryRow:X,visibleColumns:q,columns:V}):null,m?e(L,{sx:{py:1,fontSize:"0.84rem",color:"text.secondary",textAlign:"center"},children:r("common.loading")}):null]})})]}),be?c(Lt,{open:J,onClose:()=>!Te&&ge(false),fullWidth:true,maxWidth:"sm",children:[e("div",{className:"orb-dialog-title",sx:{fontSize:"1rem",fontWeight:800},children:k?.title||r("quickCreate.createWithTitle",{title:B})}),e("div",{className:"orb-dialog-content",sx:{pt:"8px !important"},children:c("div",{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[fr.map(ee=>{let Oe=ee.type==="number"||ee.numeric?"number":ee.type==="date"?"date":"text";return e(ze,{label:ee.label||ee.id,value:Xe[ee.id]??"",onChange:Qe=>Xo(ee.id,Qe.target.value),type:Oe,fullWidth:true,InputLabelProps:{shrink:Oe==="date"?true:void 0}},`quick-create-${ee.id}`)}),k?.description?e(jr,{severity:"info",children:k.description}):null]})}),c("div",{className:"orb-dialog-actions",sx:{px:3,pb:2},children:[e(we,{onClick:()=>ge(false),disabled:Te,children:k?.cancelLabel||r("common.cancel")}),e(we,{onClick:Lo,variant:"contained",disabled:Te,children:k?.submitLabel||r("common.save")})]})]}):null,Ce?c(Lt,{open:bt,onClose:()=>!Ct&&gt(false),fullWidth:true,maxWidth:"sm",children:[e("div",{className:"orb-dialog-title",sx:{fontSize:"1rem",fontWeight:800},children:w?.title||r("quickEdit.editWithTitle",{title:B})}),e("div",{className:"orb-dialog-content",sx:{pt:"8px !important"},children:c("div",{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[Ir.map(ee=>{let Oe=ee.type==="number"||ee.numeric?"number":ee.type==="date"?"date":"text";return e(ze,{label:ee.label||ee.id,value:Et[ee.id]??"",onChange:Qe=>Zo(ee.id,Qe.target.value),type:Oe,disabled:!Or(ee.id),fullWidth:true,InputLabelProps:{shrink:Oe==="date"?true:void 0}},`quick-edit-${ee.id}`)}),w?.description?e(jr,{severity:"info",children:w.description}):null]})}),c("div",{className:"orb-dialog-actions",sx:{px:3,pb:2},children:[e(we,{onClick:()=>gt(false),disabled:Ct,children:w?.cancelLabel||r("common.cancel")}),e(we,{onClick:Rr,variant:"contained",disabled:Ct||!Q,children:w?.submitLabel||r("common.save")})]})]}):null,Le?e(jn,{open:Ht,type:"warning",title:T?.title||r("quickDelete.confirmTitle"),message:T?.message||($.length>1?r("quickDelete.confirmMessageMultiple",{count:$.length}):r("quickDelete.confirmMessageSingle")),confirmText:T?.confirmText||r("common.delete"),cancelText:T?.cancelText||r("common.cancel"),onClose:()=>!$t&&Kt(false),onConfirm:jo}):null,oe,ht?e(Pi,{open:Vt,onClose:Wt,model:Fo,aiAssistant:C?.aiAssistant,interaction:Nt?{enabled:true,filters:lt.filters,fieldMapping:ao,onPrimaryDimensionClick:ee=>lt.setFilter("primaryDimension",ee),onSecondaryDimensionClick:ee=>lt.setFilter("secondaryDimension",ee),onStatusClick:ee=>lt.setFilter("status",ee),onClearFilter:lt.clearFilter,onClearAll:lt.clearAll}:void 0,tableContent:e(xy,{appId:st||"graph-report-internal",title:r("graph.dataBody"),columns:D,rows:Fo.table.rows,rowKey:"id",fullWidth:true,maxHeight:"420px",rowsPerPage:20,rowsPerPageOptions:[20,50,100],graphReport:{enabled:false},showSummary:false})}):null]})};P();var WF=({appTitle:t,children:r,menuData:o=[],workloadItems:n=[],workloadSelectedId:a,showNavigation:i=true,showWorkloadNav:s=true,orientation:l="auto",logo:d,headerSlot:u,actionSlot:p,portraitBottomSlot:f,contentSx:b,containerSx:m,user:v,onSearch:y,onSearchAdd:g,defaultNavigationOpen:x,navOpen:h,onNavOpenChange:C,onWorkloadSelect:k,locale:w="en",localeLabel:T,localeOptions:I,onLocaleChange:S,onUserSetting:A,onUserLogout:R,userMenuItems:M,leftHeaderSlot:N,rightHeaderSlot:E})=>{let O="orbcafe:page-layout-mode",[F,_]=er.useState("system"),[B,Y]=er.useState("light"),[W,j]=er.useState(false),[V,z]=er.useState(false),K=F==="system"?V?B:"light":F;er.useEffect(()=>{j(true);},[]),er.useEffect(()=>{try{let nt=window.localStorage.getItem(O);(nt==="light"||nt==="dark"||nt==="system")&&_(nt);}catch{}z(true);let Ve=window.matchMedia("(prefers-color-scheme: dark)"),tt=()=>{Y(Ve.matches?"dark":"light");};return tt(),Ve.addEventListener("change",tt),()=>Ve.removeEventListener("change",tt)},[]),er.useEffect(()=>{if(V)try{window.localStorage.setItem(O,F);}catch{}},[V,F]),er.useEffect(()=>{K==="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");},[K]);let q=Dr("(orientation: portrait)"),fe=Dr("(max-width: 899.95px)"),se=l==="auto"?!W||q||fe?"portrait":"landscape":l,[ue,Se]=er.useState({landscape:x??true,portrait:false}),$e=ue[se],ke=h??$e,le=Ve=>{h===void 0&&Se(tt=>({...tt,[se]:Ve})),C?.(Ve);},Ee=c(ie,{direction:"row",spacing:1,alignItems:"center",children:[!W||i&&se==="portrait"?e(ae,{onClick:()=>le(!ke),sx:{bgcolor:"action.hover"},children:e(li,{})}):null,N]}),Me=c(ie,{direction:"row",spacing:1,alignItems:"center",children:[p,E]}),Pe=e(dm,{collapsed:se==="landscape"?!ke:false,onToggle:()=>le(!ke),menuData:o,orientation:se,colorMode:K,maxHeight:se==="landscape"?900:void 0});return e(Fn,{mode:F,children:e(Ga,{locale:w,children:c("div",{sx:[Ve=>({minHeight:"100vh",display:"flex",flexDirection:"column",background:Ve.palette.mode==="dark"?"linear-gradient(180deg, var(--orb-canvas) 0%, var(--orb-surface) 55%, var(--orb-surface-2) 100%)":Ve.palette.background.default}),...Array.isArray(m)?m:[m]],children:[e($i,{appTitle:t,logo:d===void 0?null:d,mode:F,onToggleMode:()=>_(Ve=>Ve==="system"?"dark":Ve==="dark"?"light":"system"),locale:w,localeLabel:T,localeOptions:I,onLocaleChange:S,user:v,onUserSetting:A,onUserLogout:R,userMenuItems:M,onSearch:y,onSearchAdd:g,leftSlot:Ee,rightSlot:Me}),u?e("div",{sx:{px:{xs:2,md:3},py:1.5,borderBottom:"1px solid",borderColor:"divider"},children:u}):null,c("div",{sx:{flex:1,minHeight:0,display:"flex",position:"relative"},children:[W&&i&&se==="landscape"?e("div",{sx:{p:1.5,pr:0,flexShrink:0},children:Pe}):null,!W||i&&se==="portrait"?e(Ad,{open:ke,onClose:()=>le(false),PaperProps:{sx:{width:"min(88vw, 360px)",p:1.25,bgcolor:"transparent",boxShadow:"none"}},children:Pe}):null,e("div",{sx:{flex:1,minWidth:0,minHeight:0,overflow:"auto",p:1.5,...b},children:c(ie,{spacing:1.5,children:[s&&n.length>0?e(im,{items:n,selectedId:a,orientation:se,onItemSelect:k}):null,e(Ae,{elevation:0,sx:{flex:1,minHeight:se==="portrait"?420:560,p:{xs:1.25,md:1.5},borderRadius:5,border:"1px solid",borderColor:"divider",bgcolor:"color-mix(in oklch, var(--orb-canvas) 72%, transparent)",backdropFilter:"blur(12px)",color:"text.primary"},children:r})]})})]}),se==="portrait"&&f?c(jsxRuntime.Fragment,{children:[e(Dt,{}),e("div",{sx:{p:1.5},children:f})]}):null]})})})};P();var fm=Dy__default.default(()=>Promise.resolve().then(()=>(gm(),mm)).then(t=>t.COrbCanvas),{ssr:false,loading:()=>e("div",{className:"h-full w-full bg-transparent"})});function Ll({isRecording:t}){return e(framerMotion.AnimatePresence,{children:t&&e(framerMotion.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.5},className:"pointer-events-none absolute inset-0 z-0 overflow-hidden",children:c("div",{className:"relative flex h-full w-full items-center justify-center",children:[e("div",{className:"absolute inset-0",children:e(fm,{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(fm,{hue:10,hoverIntensity:.8,rotateOnHover:true,forceHoverState:true,backgroundColor:"transparent"})})]})})})}var YF=Ll;P();var hm=er.createContext(null);function By(t){if(!t||!(t instanceof HTMLElement))return false;let r=t.tagName;return !!(r==="INPUT"||r==="TEXTAREA"||r==="SELECT"||t.isContentEditable||t.closest('[data-voice-hotkey-ignore="true"]'))}function Hy({children:t,onVoiceSubmit:r,onVoicePartial:o,onVoiceError:n,longPressMs:a=200,disableSpaceTrigger:i=false,ignoreWhenFocusedInput:s=true,renderOverlay:l=true,wsUrl:d,silenceThresholdMs:u,minVolumeRms:p}){let[f,b]=er.useState(false),[m,v]=er.useState(false),y=er.useRef(null),g=er.useRef(false),x=er.useRef(false),h=er.useCallback(()=>{x.current=false,b(false);},[]),{isRecording:C,startRecording:k,stopRecording:w}=Sn({wsUrl:d,silenceThresholdMs:u,minVolumeRms:p,onTextUpdate:A=>{o?.(A);},onComplete:async A=>{try{A.trim()&&(v(!0),await r(A.trim()));}catch(R){let M=R instanceof Error?R.message:"Failed to process voice command";n?.(M);}finally{v(!1),h();}},onError:A=>{n?.(A),v(!1),g.current||h();}}),T=er.useCallback(async()=>{x.current=false,await k();},[k]),I=er.useCallback(()=>{w();},[w]);er.useEffect(()=>{if(i)return;let A=M=>{M.isComposing||(M.code==="Space"||M.key===" ")&&(g.current||M.repeat||s&&By(document.activeElement)||(g.current=true,M.preventDefault(),y.current=setTimeout(()=>{x.current=true,b(true),k();},a)));},R=M=>{(M.code==="Space"||M.key===" ")&&(y.current&&(clearTimeout(y.current),y.current=null),g.current=false,x.current&&(M.preventDefault(),b(false),w()));};return window.addEventListener("keydown",A),window.addEventListener("keyup",R),()=>{window.removeEventListener("keydown",A),window.removeEventListener("keyup",R),y.current&&(clearTimeout(y.current),y.current=null);}},[i,s,a,k,w]);let S=er.useMemo(()=>({isRecording:C,isHotkeyRecording:f,isSubmitting:m,startRecording:T,stopRecording:I}),[f,C,m,T,I]);return c(hm.Provider,{value:S,children:[l?e(Ll,{isRecording:f}):null,t]})}function zy(){let t=er.useContext(hm);if(!t)throw new Error("useAINav must be used within CAINavProvider");return t}var t2=Hy,r2=zy;function ut(...t){return tailwindMerge.twMerge(clsx.clsx(t))}P();var Gy=({content:t,theme:r="light",size:o="base",defaultExpanded:n=false})=>{let[a,i]=er.useState(n),s=er.useMemo(()=>`${(o==="sm"?14:o==="lg"?18:16)-2}px`,[o]);return c("div",{className:`my-6 rounded-lg overflow-hidden transition-all duration-200 ${r==="dark"?"bg-[var(--orb-surface-2)]":"bg-[var(--orb-canvas)]"}`,style:{border:"0.5px solid var(--orb-border)"},children:[c("div",{className:"px-4 py-3 cursor-pointer flex items-center justify-between transition-colors duration-200 bg-[var(--orb-surface)] hover:bg-[var(--orb-hover)]",style:{borderBottom:"0.5px solid var(--orb-border)"},onClick:()=>i(!a),children:[c("span",{className:"flex items-center",children:[e(Aa,{className:"mr-2 h-4 w-4"}),e("span",{className:"font-medium text-[var(--orb-fg)]",style:{fontSize:o==="sm"?"14px":o==="lg"?"18px":"16px"},children:"\u601D\u8003\u8FC7\u7A0B"})]}),e(Fr,{className:`w-4 h-4 transition-transform duration-200 ${a?"rotate-180":""} text-[var(--orb-muted)]`})]}),a&&e("div",{className:"p-4 whitespace-pre-wrap italic font-light text-[var(--orb-muted)]",style:{fontSize:s,lineHeight:"1.3 !important"},children:t})]})},vm=Gy;P();var Yy=({content:t,language:r="text",isStreaming:o=false,className:n=""})=>{let a=Cr(),[i,s]=er.useState(false),l=async()=>{try{await navigator.clipboard.writeText(t),s(!0),setTimeout(()=>s(!1),2e3);}catch(u){console.error("\u590D\u5236\u5931\u8D25:",u);}},d=a==="dark"?prism.oneDark:prism.oneLight;return c("div",{className:ut("rounded-lg overflow-hidden border border-[var(--orb-border)] my-4",n),children:[c("div",{className:"flex items-center justify-between px-4 py-2 bg-[var(--orb-surface)] border-b border-[var(--orb-border)]",children:[e("span",{className:"text-xs font-medium text-[var(--orb-muted)] uppercase",children:r}),e("button",{onClick:l,className:"p-1 hover:bg-[var(--orb-hover)] rounded transition-colors",disabled:o,title:i?"Copied":"Copy code",children:i?e(qr,{size:14,className:"text-[var(--orb-status-success)]"}):e(Rc,{size:14,className:"text-[var(--orb-muted)]"})})]}),e("div",{className:"text-sm",children:e(reactSyntaxHighlighter.Prism,{language:r,style:d,customStyle:{margin:0,padding:"16px",fontSize:"14px",lineHeight:"1.5",backgroundColor:a==="dark"?"var(--orb-surface-2)":"var(--orb-canvas)"},wrapLongLines:true,children:t})})]})},ym=Yy;P();var Cm="orb-html-demo",eC=160,tC=560,rC=220,Bl=`<script>(function(){var post=function(){var height=Math.ceil(document.documentElement.scrollHeight);parent.postMessage({source:${JSON.stringify(Cm)},height:height},'*')};addEventListener('load',post);addEventListener('resize',post);new MutationObserver(post).observe(document.documentElement,{subtree:true,childList:true,attributes:true,characterData:true});post()})()</script>`,oC="html,body{margin:0;padding:12px;font:14px/1.5 system-ui,sans-serif;}",nC=t=>/<html[\s>]/i.test(t),aC=t=>{let r=t.trim();return nC(r)?/<\/body>/i.test(r)?r.replace(/<\/body>/i,`${Bl}</body>`):`${r}${Bl}`:`<!DOCTYPE html><html><head><meta charset="utf-8"><style>${oC}</style></head><body>${r}${Bl}</body></html>`},iC=({content:t,title:r="Interactive HTML"})=>{let o=er.useRef(null),[n,a]=er.useState(rC),i=er.useMemo(()=>aC(t),[t]);return er.useEffect(()=>{let s=l=>{if(l.source!==o.current?.contentWindow)return;let d=l.data;!d||d.source!==Cm||typeof d.height!="number"||!Number.isFinite(d.height)||a(Math.min(tC,Math.max(eC,Math.ceil(d.height))));};return window.addEventListener("message",s),()=>window.removeEventListener("message",s)},[]),c("figure",{className:"orb-html-demo-frame",children:[e("figcaption",{className:"orb-html-demo-caption",children:r}),e("iframe",{ref:o,className:"orb-html-demo",title:r,sandbox:"allow-scripts",srcDoc:i,style:{height:n}})]})},xm=iC;P();var cC=t=>{let r=/line (\d+)/i.exec(t)?.[1];return r?`Mermaid syntax error around line ${r} \u2014 expand for details`:"Mermaid syntax error \u2014 expand for details"},dC=({content:t,isLoading:r,className:o="",style:n})=>{let a=er.useRef(null),[i,s]=er.useState(false),[l,d]=er.useState(null),u=Cr();return er.useEffect(()=>{let p=false,f=async()=>{if(!(!t.trim()||!a.current)){s(true),d(null);try{wm__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)}`,v=t.replace(/```mermaid\n?|\n?```/g,"").trim(),{svg:y,bindFunctions:g}=await wm__default.default.render(m,v);!p&&a.current&&(a.current.innerHTML=y,g?.(a.current));}catch(m){if(p)return;console.error("Mermaid render failed:",m),d(m instanceof Error?m.message:"Render failed");}finally{p||s(false);}}},b=setTimeout(()=>{f();},100);return ()=>{p=true,clearTimeout(b);}},[t,u]),c("div",{className:`mermaid-block ${o}`,style:n,children:[(r||i)&&c("div",{className:"flex items-center justify-center rounded border border-[var(--orb-border)] bg-[var(--orb-surface)] p-4 dark:bg-[var(--orb-surface-2)]",children:[e("div",{className:"mr-2 h-4 w-4 animate-spin rounded-full border-b-2 border-[var(--orb-primary)]"}),e("span",{className:"text-sm text-[var(--orb-muted)]",children:"Generating Diagram..."})]}),l&&c("div",{className:"rounded border border-[color-mix(in_oklch,var(--orb-status-error)_30%,transparent)] bg-[color-mix(in_oklch,var(--orb-status-error)_8%,transparent)] p-3 text-sm text-[var(--orb-status-error)]",children:[e("p",{className:"font-medium",children:cC(l)}),c("details",{className:"mt-1",children:[e("summary",{className:"cursor-pointer text-xs text-[var(--orb-muted)]",children:"Details & source"}),e("pre",{className:"mt-2 max-h-40 overflow-auto whitespace-pre-wrap break-words",children:l}),e("pre",{className:"mt-2 max-h-40 overflow-auto text-xs text-[var(--orb-muted)]",children:t})]})]}),e("div",{ref:a,className:`overflow-x-auto ${r||i||l?"hidden":""}`})]})},km=dC;P();var pC=({title:t="\u53D1\u751F\u9519\u8BEF",content:r,errorCode:o,stack:n,icon:a,closable:i=true,onClose:s,onRetry:l,className:d="",...u})=>{let[p,f]=er.useState(false),[b,m]=er.useState(false),v=async()=>{if(l){m(true);try{await l();}catch(y){console.error("\u91CD\u8BD5\u5931\u8D25:",y);}finally{m(false);}}};return c("div",{className:`relative w-full overflow-hidden rounded-lg border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-sm transition-all hover:shadow-md ${d}`,...u,children:[c("div",{className:"flex p-4 border-l-4 border-l-[var(--orb-status-error)] bg-[color-mix(in_oklch,var(--orb-status-error)_8%,transparent)]",children:[e("div",{className:"flex-shrink-0 mr-3 text-[var(--orb-status-error)] mt-0.5",children:a||e(Ta,{className:"w-5 h-5"})}),c("div",{className:"flex-1 min-w-0",children:[c("div",{className:"flex items-center space-x-2 mb-1",children:[e("h4",{className:"text-base font-semibold text-[var(--orb-fg)]",children:t}),o&&e("span",{className:"text-xs font-mono px-1.5 py-0.5 rounded bg-[color-mix(in_oklch,var(--orb-status-error)_14%,transparent)] text-[var(--orb-status-error)]",children:o})]}),r&&e("div",{className:"text-sm text-[var(--orb-muted)] mb-3 leading-relaxed",children:typeof r=="string"?e("p",{className:"whitespace-pre-wrap",children:r}):r}),(l||n)&&c("div",{className:"flex items-center space-x-4 mt-2",children:[l&&c("button",{onClick:v,disabled:b,className:"flex items-center text-xs font-medium text-[var(--orb-status-error)] hover:opacity-80 transition-colors disabled:opacity-50",children:[e(Kc,{className:`w-3.5 h-3.5 mr-1.5 ${b?"animate-spin":""}`}),b?"\u91CD\u8BD5\u4E2D...":"\u91CD\u8BD5"]}),n&&c("button",{onClick:()=>f(!p),className:"flex items-center text-xs font-medium text-[var(--orb-muted)] hover:text-[var(--orb-fg)] dark:text-[var(--orb-muted)] transition-colors",children:[p?e(Fr,{className:"w-3.5 h-3.5 mr-1"}):e(Br,{className:"w-3.5 h-3.5 mr-1"}),p?"\u9690\u85CF\u8BE6\u60C5":"\u67E5\u770B\u8BE6\u60C5"]})]})]}),i&&s&&e("button",{onClick:s,className:"flex-shrink-0 ml-3 text-[var(--orb-muted)] hover:text-[var(--orb-fg)] transition-colors self-start",children:e(jt,{className:"w-4 h-4"})})]}),n&&p&&e("div",{className:"bg-[var(--orb-surface)] dark:bg-[var(--orb-canvas)] p-3 border-t border-[var(--orb-border)]",children:e("pre",{className:"text-xs font-mono text-[var(--orb-muted)] overflow-x-auto whitespace-pre-wrap p-2 bg-[var(--orb-canvas)] rounded border border-[var(--orb-border)]",children:n})})]})},os=pC;P();var uC=({title:t="\u8B66\u544A",content:r,warningType:o,severity:n="warning",warnings:a=[],icon:i,closable:s=true,onClose:l,onConfirm:d,actionText:u,className:p="",...f})=>{let b=()=>{switch(n){case "info":return {borderLeftColor:"border-l-blue-500",iconColor:"text-[var(--orb-primary)]",bgColor:"bg-[var(--orb-p50)]"};case "error":return {borderLeftColor:"border-l-[var(--orb-status-error)]",iconColor:"text-[var(--orb-status-error)]",bgColor:"bg-[color-mix(in_oklch,var(--orb-status-error)_8%,transparent)]"};case "success":return {borderLeftColor:"border-l-green-500",iconColor:"text-[var(--orb-status-success)]",bgColor:"bg-[color-mix(in_oklch,var(--orb-status-success)_8%,transparent)]"};default:return {borderLeftColor:"border-l-yellow-500",iconColor:"text-[var(--orb-status-warning)]",bgColor:"bg-[color-mix(in_oklch,var(--orb-status-warning)_8%,transparent)]"}}},m=()=>{switch(n){case "info":return e(Na,{className:"w-5 h-5"});case "error":return e(za,{className:"w-5 h-5"});case "success":return e(Ia,{className:"w-5 h-5"});default:return e(Tc,{className:"w-5 h-5"})}},v=b();return c("div",{className:`relative w-full overflow-hidden rounded-lg border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-sm transition-all hover:shadow-md ${p}`,...f,children:[c("div",{className:`flex p-4 border-l-4 ${v.borderLeftColor} ${v.bgColor}`,children:[e("div",{className:`flex-shrink-0 mr-3 ${v.iconColor}`,children:i||m()}),c("div",{className:"flex-1 min-w-0",children:[c("div",{className:"flex items-center justify-between mb-1",children:[e("h4",{className:"text-base font-semibold text-[var(--orb-fg)]",children:t}),o&&e("span",{className:"text-xs font-medium px-2 py-0.5 rounded-full bg-[var(--orb-surface)] text-[var(--orb-muted)]",children:o})]}),r&&e("div",{className:"text-sm text-[var(--orb-muted)] mb-2",children:r}),a&&a.length>0&&e("ul",{className:"mt-2 space-y-1",children:a.map((y,g)=>c("li",{className:"flex items-start text-sm text-[var(--orb-muted)]",children:[e("span",{className:"mr-2 mt-1.5 w-1 h-1 rounded-full bg-[var(--orb-muted)] flex-shrink-0"}),e("span",{children:y})]},g))})]}),s&&l&&e("button",{onClick:l,className:"flex-shrink-0 ml-3 text-[var(--orb-muted)] hover:text-[var(--orb-fg)] transition-colors",children:e(jt,{className:"w-4 h-4"})})]}),d&&e("div",{className:"bg-[color-mix(in_oklch,var(--orb-surface)_50%,transparent)] px-4 py-3 flex justify-end border-t border-[var(--orb-border)]",children:e("button",{onClick:d,className:"px-4 py-1.5 text-sm font-medium text-[var(--orb-on-primary)] bg-[var(--orb-primary)] hover:bg-[var(--orb-p600)] rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-[var(--orb-primary)] focus:ring-offset-2 dark:focus:ring-offset-gray-900",children:u||"\u786E\u8BA4"})})]})},ns=uC;P();var mC=({title:t="\u76F8\u5173\u63A8\u8350",content:r,suggestions:o,onSuggestionClick:n,maxDisplay:a=5,icon:i,closable:s=false,onClose:l,className:d="",...u})=>{let[p,f]=er.useState(false),[b,m]=er.useState(""),[v,y]=er.useState(false),g=er.useMemo(()=>b.trim()?o.filter(C=>C.toLowerCase().includes(b.toLowerCase())):o,[o,b]),x=er.useMemo(()=>p?g:g.slice(0,a),[g,p,a]),h=C=>{n?.(C);};return !o||o.length===0?null:c("div",{className:`w-full overflow-hidden rounded-lg border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-sm transition-all hover:shadow-md ${d}`,...u,children:[c("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--orb-border)] bg-[var(--orb-p50)]",children:[c("div",{className:"flex items-center space-x-2.5",children:[e("div",{className:"text-[var(--orb-primary)] flex-shrink-0",children:i||e(Aa,{className:"w-5 h-5"})}),c("div",{className:"flex flex-col",children:[e("h4",{className:"text-sm font-semibold text-[var(--orb-fg)] leading-tight",children:t}),r&&e("span",{className:"text-xs text-[var(--orb-muted)] mt-0.5",children:r})]})]}),c("div",{className:"flex items-center space-x-1",children:[o.length>3&&e("button",{onClick:()=>y(!v),className:`p-1.5 rounded-md transition-colors ${v?"bg-[var(--orb-p100)] text-[var(--orb-status-primary)]":"text-[var(--orb-muted)] hover:text-[var(--orb-fg)] hover:bg-[var(--orb-hover)]"}`,title:v?"\u5173\u95ED\u641C\u7D22":"\u641C\u7D22\u95EE\u9898",children:e(Hr,{className:"w-4 h-4"})}),s&&l&&e("button",{onClick:l,className:"text-[var(--orb-muted)] hover:text-[var(--orb-fg)] p-1.5 rounded-md hover:bg-[var(--orb-hover)] transition-colors",title:"\u5173\u95ED",children:e(jt,{className:"w-4 h-4"})})]})]}),v&&e("div",{className:"px-4 py-2 border-b border-[var(--orb-border)] bg-[color-mix(in_oklch,var(--orb-surface)_50%,transparent)]",children:c("div",{className:"relative",children:[e("input",{type:"text",placeholder:"\u641C\u7D22\u76F8\u5173\u95EE\u9898...",value:b,onChange:C=>m(C.target.value),className:"w-full text-sm px-3 py-1.5 pl-8 rounded border border-[var(--orb-border)] bg-[var(--orb-canvas)] text-[var(--orb-fg)] focus:ring-1 focus:ring-[var(--orb-primary)] focus:border-[var(--orb-primary)] outline-none transition-shadow",autoFocus:true}),e(Hr,{className:"absolute left-2.5 top-2 w-3.5 h-3.5 text-[var(--orb-muted)]"})]})}),c("div",{className:"p-2",children:[e("ul",{className:"space-y-1",children:x.map((C,k)=>e("li",{children:c("button",{onClick:()=>h(C),className:"w-full text-left px-3 py-2 rounded-md text-sm text-[var(--orb-fg)] hover:bg-[var(--orb-hover)] hover:text-[var(--orb-status-primary)] transition-colors group flex items-start justify-between",children:[e("span",{children:C}),e(Br,{className:"w-4 h-4 text-[var(--orb-muted)] group-hover:text-[var(--orb-status-primary)] opacity-0 group-hover:opacity-100 transition-all transform group-hover:translate-x-0.5"})]})},k))}),g.length>a&&e("button",{onClick:()=>f(!p),className:"w-full text-center py-2 text-xs font-medium text-[var(--orb-muted)] hover:text-[var(--orb-fg)] transition-colors border-t border-[var(--orb-border)] mt-1",children:p?"\u6536\u8D77":`\u67E5\u770B\u5168\u90E8 (${g.length})`}),g.length===0&&b&&e("div",{className:"text-center py-4 text-sm text-[var(--orb-muted)]",children:"\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u5EFA\u8BAE"})]})]})},as=mC;P();var gC=({title:t,content:r,toolName:o,parameters:n,result:a,status:i,duration:s,icon:l,closable:d=false,onClose:u,onAction:p,actionText:f,className:b="",...m})=>{let[v,y]=er.useState(false),[g,x]=er.useState(true),h=()=>{switch(i){case "pending":return {iconColor:"text-[var(--orb-primary)]",badgeBg:"bg-[var(--orb-p50)]",badgeText:"text-[var(--orb-status-primary)]",label:"\u6267\u884C\u4E2D"};case "error":return {iconColor:"text-[var(--orb-status-error)]",badgeBg:"bg-[color-mix(in_oklch,var(--orb-status-error)_10%,transparent)]",badgeText:"text-[var(--orb-status-error)]",label:"\u5931\u8D25"};default:return {iconColor:"text-[var(--orb-status-success)]",badgeBg:"bg-[color-mix(in_oklch,var(--orb-status-success)_8%,transparent)]",badgeText:"text-[var(--orb-status-success)]",label:"\u6210\u529F"}}},C=()=>{switch(i){case "pending":return e(zc,{className:"w-5 h-5 animate-spin"});case "error":return e(za,{className:"w-5 h-5"});default:return e(Ia,{className:"w-5 h-5"})}},k=I=>I?I<1e3?`${I}ms`:`${(I/1e3).toFixed(2)}s`:"",w=h(),T=t||o||"\u5DE5\u5177\u8C03\u7528";return c("div",{className:`w-full overflow-hidden rounded-lg border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-sm transition-all hover:shadow-md ${b}`,...m,children:[c("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--orb-border)] bg-[color-mix(in_oklch,var(--orb-surface)_50%,transparent)]",children:[c("div",{className:"flex items-center space-x-3",children:[e("div",{className:`flex-shrink-0 ${w.iconColor}`,children:l||C()}),c("div",{children:[c("div",{className:"flex items-center space-x-2",children:[e("h4",{className:"text-sm font-semibold text-[var(--orb-fg)]",children:T}),e("span",{className:`text-[10px] font-medium px-1.5 py-0.5 rounded ${w.badgeBg} ${w.badgeText}`,children:w.label})]}),o&&t&&c("div",{className:"text-xs text-[var(--orb-muted)] flex items-center mt-0.5",children:[e(Vn,{className:"w-3 h-3 mr-1"}),o]})]})]}),c("div",{className:"flex items-center space-x-2 text-xs text-[var(--orb-muted)]",children:[s&&c("div",{className:"flex items-center bg-[var(--orb-surface)] px-2 py-1 rounded",children:[e(Dc,{className:"w-3 h-3 mr-1"}),k(s)]}),d&&u&&e("button",{onClick:u,className:"text-[var(--orb-muted)] hover:text-[var(--orb-fg)] transition-colors p-1 rounded",children:e(jt,{className:"w-4 h-4"})})]})]}),c("div",{className:"p-4",children:[r&&e("div",{className:"text-sm text-[var(--orb-muted)] mb-4 leading-relaxed",children:r}),n&&c("div",{className:"mb-3",children:[c("button",{onClick:()=>y(!v),className:"flex items-center text-xs font-medium text-[var(--orb-muted)] hover:text-[var(--orb-fg)] dark:text-[var(--orb-muted)] mb-2",children:[v?e(Fr,{className:"w-3.5 h-3.5 mr-1"}):e(Br,{className:"w-3.5 h-3.5 mr-1"}),e("div",{className:"w-3.5 h-3.5 mr-1.5"}),"\u8F93\u5165\u53C2\u6570"]}),v&&e("div",{className:"bg-[var(--orb-surface)] dark:bg-[var(--orb-canvas)] rounded border border-[var(--orb-border)] overflow-hidden",children:e("pre",{className:"p-3 text-xs font-mono text-[var(--orb-muted)] overflow-x-auto",children:JSON.stringify(n,null,2)})})]}),a&&c("div",{children:[c("button",{onClick:()=>x(!g),className:"flex items-center text-xs font-medium text-[var(--orb-muted)] hover:text-[var(--orb-fg)] dark:text-[var(--orb-muted)] mb-2",children:[g?e(Fr,{className:"w-3.5 h-3.5 mr-1"}):e(Br,{className:"w-3.5 h-3.5 mr-1"}),e(Vn,{className:"w-3.5 h-3.5 mr-1.5"}),"\u6267\u884C\u7ED3\u679C"]}),g&&e("div",{className:"bg-[var(--orb-surface)] dark:bg-[var(--orb-canvas)] rounded border border-[var(--orb-border)] overflow-hidden",children:e("pre",{className:"p-3 text-xs font-mono text-[var(--orb-muted)] overflow-x-auto",children:typeof a=="string"?a:JSON.stringify(a,null,2)})})]}),p&&e("div",{className:"mt-3 pt-3 border-t border-[var(--orb-border)] flex justify-end",children:e("button",{onClick:p,className:"px-4 py-1.5 text-sm font-medium text-[var(--orb-on-primary)] bg-[var(--orb-primary)] hover:bg-[var(--orb-p600)] rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-[var(--orb-primary)] focus:ring-offset-2 dark:focus:ring-offset-gray-900",children:f||"\u6267\u884C\u64CD\u4F5C"})})]})]})},is=gC;P();var bC=({data:t})=>{if(!t)return null;let r=er.useMemo(()=>{let o=[],n=[],a="\u6570\u636E\u8868\u683C";return Array.isArray(t)?(o=t,o.length>0&&(n=Object.keys(o[0]).map(i=>({id:i,label:i.charAt(0).toUpperCase()+i.slice(1),numeric:typeof o[0][i]=="number"})))):typeof t=="object"&&(a=t.title||a,o=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})):o.length>0&&(n=Object.keys(o[0]).map(s=>({id:s,label:s,numeric:typeof o[0][s]=="number"})))),o=o.map((i,s)=>({...i,id:i.id||`row_${s}`})),{title:a,columns:n,rows:o}},[t]);return r.rows.length===0?e("div",{className:"w-full my-4 p-4 border border-dashed border-[var(--orb-border)] rounded text-center text-[var(--orb-muted)]",children:"\u6682\u65E0\u8868\u683C\u6570\u636E"}):e("div",{className:"w-full my-4",children:e(Jr,{appId:"agent-ui-table-card",title:r.title,columns:r.columns,rows:r.rows,count:r.rows.length,rowKey:"id",fitContainer:false,maxHeight:"500px",rowsPerPage:10,rowsPerPageOptions:[5,10,20,50]})})},ss=bC;P();var hC=({title:t,subtitle:r,data:o,type:n,config:a={}})=>{let i=()=>{switch(n){case "bar-chart-card":return e(Bs,{className:"w-4 h-4 text-[var(--orb-chart-1)]"});case "line-chart-card":return e(Hc,{className:"w-4 h-4 text-[var(--orb-chart-positive)]"});case "pie-chart-card":return e(Uc,{className:"w-4 h-4 text-[var(--orb-chart-2)]"});case "combo-chart-card":return e(Pc,{className:"w-4 h-4 text-[var(--orb-chart-5)]"});case "heatmap-chart-card":return e(Fc,{className:"w-4 h-4 text-[var(--orb-chart-negative)]"});case "fishbone-chart-card":return e(Oc,{className:"w-4 h-4 text-[var(--orb-chart-4)]"});case "waterfall-chart-card":return e(Qc,{className:"w-4 h-4 text-[var(--orb-chart-6)]"});case "google-map-card":return e(zn,{className:"w-4 h-4 text-[var(--orb-status-primary)]"});case "amap-card":return e(Wc,{className:"w-4 h-4 text-[var(--orb-status-primary)]"});default:return e(Bs,{className:"w-4 h-4"})}},s=()=>{if(!o&&n!=="google-map-card"&&n!=="amap-card")return e("div",{className:"text-[var(--orb-muted)] text-sm p-4 text-center",children:"No data available"});try{switch(n){case "bar-chart-card":return e(ra,{data:o,orientation:a.orientation||"horizontal",valueSuffix:a.valueSuffix||"",minHeight:a.minHeight});case "line-chart-card":return e(Ep,{data:o,color:a.color,valueSuffix:a.valueSuffix||"",height:a.height});case "pie-chart-card":let l=o.reduce((u,p)=>u+(Number(p.value)||0),0),d=o.map(u=>({name:u.name,value:Number(u.value)||0,percent:typeof u.percent=="number"?u.percent:l>0?(Number(u.value)||0)/l*100:0}));return e(Si,{data:d,variant:a.variant||"donut",size:a.size,colors:a.colors});case "combo-chart-card":return e(Lp,{data:o,barColor:a.barColor,lineColor:a.lineColor});case "heatmap-chart-card":return e(Op,{data:o});case "fishbone-chart-card":return e(Fp,{branches:o,effect:a.effect||t||"Problem"});case "waterfall-chart-card":return e(Bp,{data:o,height:a.height});case "google-map-card":return e(Hp,{embedUrl:a.embedUrl||o&&o[0]?.embedUrl,apiKey:a.apiKey,query:a.query||o&&o[0]?.query||t,height:a.height});case "amap-card":return e(zp,{embedUrl:a.embedUrl||o&&o[0]?.embedUrl,keyword:a.keyword||o&&o[0]?.keyword||t,height:a.height});default:return c("div",{className:"text-[var(--orb-muted)] text-sm p-4 text-center",children:["Unsupported chart type: ",n]})}}catch(l){return console.error("Error rendering chart:",l),e("div",{className:"text-[var(--orb-status-error)] text-sm p-4 text-center",children:"Error rendering chart"})}};return c("div",{className:"w-full overflow-hidden rounded-lg border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-sm transition-all hover:shadow-md",children:[c("div",{className:"flex items-center px-4 py-3 border-b border-[var(--orb-border)] bg-[color-mix(in_oklch,var(--orb-surface)_50%,transparent)]",children:[e("div",{className:"mr-2 flex-shrink-0",children:i()}),c("div",{className:"flex-1 min-w-0",children:[e("h3",{className:"text-sm font-semibold text-[var(--orb-fg)] truncate",children:t}),r&&e("p",{className:"text-xs text-[var(--orb-muted)] mt-0.5 truncate",children:r})]})]}),c("div",{className:"p-4",children:[e("div",{className:"overflow-x-auto",children:s()}),e("div",{className:"mt-3",children:c("details",{className:"text-xs text-[var(--orb-muted)]",children:[e("summary",{className:"cursor-pointer hover:text-[var(--orb-fg)] transition-colors select-none font-medium opacity-60 hover:opacity-100",children:"View Raw Data"}),e("pre",{className:"mt-2 p-2 bg-[var(--orb-surface)] dark:bg-[var(--orb-canvas)] rounded border border-[var(--orb-border)] overflow-x-auto max-h-40",children:JSON.stringify(o,null,2)})]})})]})]})},ls=hC;P();var ms=["bar","column","line","pie","donut","scatter","bubble","list","metric","progress"],vC={bar:"Bars",column:"Columns",line:"Line",pie:"Pie",donut:"Donut",scatter:"Scatter",bubble:"Bubble",list:"List",metric:"Metric",progress:"Progress"},ps=480,Mn=214,Ut={top:18,right:16,bottom:38,left:30},tr=t=>typeof t=="number"&&Number.isFinite(t)?t:0,Dm=t=>t.toLocaleString(void 0,{maximumFractionDigits:1}),Ur=(t,r)=>`${t.id||t.label}-${r}`,Nm=(t,r=13)=>t.length>r?`${t.slice(0,Math.max(1,r-1))}\u2026`:t,us=(t,r,o)=>Math.min(o,Math.max(r,t)),go=(t,r,o)=>t.color??o[r%o.length],fo=(t,r)=>r?{onMouseEnter:()=>r.onItemHoverStart?.(t),onMouseMove:()=>r.onItemHoverStart?.(t),onMouseLeave:()=>r.onItemHoverEnd?.(t),onContextMenu:o=>r.onItemContextMenu?.(o,t)}:{},Am=t=>{let r=t.map(a=>tr(a.value)),o=Math.min(0,...r),n=Math.max(0,...r);return {min:o,max:n===o?o+1:n,range:n===o?1:n-o}},yC=(t,r,o)=>{let n=ps-Ut.left-Ut.right,a=Mn-Ut.top-Ut.bottom,{max:i,range:s}=Am(o),l=Ut.left+t*n/Math.max(o.length-1,1),d=Ut.top+(i-tr(r.value))/s*a,u=Ut.top+i/s*a;return {x:l,y:d,zeroY:u}},ds=(t,r,o,n)=>{let a=(n-90)*Math.PI/180;return {x:t+o*Math.cos(a),y:r+o*Math.sin(a)}},CC=(t,r,o,n,a,i)=>{let s=ds(t,r,o,i),l=ds(t,r,o,a),d=i-a>180?1:0;if(n===0)return `M ${t} ${r} L ${s.x} ${s.y} A ${o} ${o} 0 ${d} 0 ${l.x} ${l.y} Z`;let u=ds(t,r,n,i),p=ds(t,r,n,a);return `M ${s.x} ${s.y} A ${o} ${o} 0 ${d} 0 ${l.x} ${l.y} L ${p.x} ${p.y} A ${n} ${n} 0 ${d} 1 ${u.x} ${u.y} Z`},xC=({children:t})=>c("div",{className:"orb-metric-empty",role:"status",children:[e("span",{className:"orb-metric-empty-mark","aria-hidden":"true",children:"\u2014"}),e(L,{variant:"body2",muted:true,children:t})]}),SC=()=>c("div",{className:"orb-metric-loading",role:"status","aria-label":"Loading chart",children:[e("span",{className:"orb-metric-skeleton orb-metric-skeleton-wide"}),e("span",{className:"orb-metric-skeleton"}),e("span",{className:"orb-metric-skeleton orb-metric-skeleton-short"}),e("span",{className:"orb-metric-skeleton orb-metric-skeleton-wide"})]}),Vl=({item:t,onItemClick:r,interactions:o})=>{let n=()=>r?.(t);return {...r?{role:"button",tabIndex:0,onClick:n,onKeyDown:i=>{r&&(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),n());}}:{},...fo(t,o),style:{cursor:r||o?"pointer":"default"}}},wC=({loading:t,error:r,hasData:o,emptyState:n,children:a})=>t?e(SC,{}):r?e("div",{className:"orb-metric-error",role:"alert",children:r}):o?e(jsxRuntime.Fragment,{children:a}):e(xC,{children:n??"No data for the current selection."}),kC=({data:t,activeId:r,onItemClick:o,interactions:n,valueFormatter:a,colors:i})=>{let s=Math.max(...t.map(l=>Math.abs(tr(l.value))),1);return e("div",{className:"orb-metric-bars",role:"list","aria-label":"Chart data",children:t.map((l,d)=>{let u=tr(l.value),p=`${us(Math.abs(u)/s*100,0,100)}%`,f=r===l.id,b=c(jsxRuntime.Fragment,{children:[e("span",{className:"orb-metric-bar-label",title:l.label,children:l.label}),e("span",{className:"orb-metric-bar-track","aria-hidden":"true",children:e("span",{className:`orb-metric-bar-fill${f?" is-active":""}`,style:{width:p,backgroundColor:go(l,d,i)}})}),e("span",{className:"orb-metric-bar-value",children:a(u)})]});return o?e("button",{type:"button",className:`orb-metric-bar-row${f?" is-active":""}`,onClick:()=>o(l),title:`${l.label}: ${a(u)}`,"aria-pressed":f,...fo(l,n),children:b},Ur(l,d)):e("div",{className:`orb-metric-bar-row${f?" is-active":""}`,role:"listitem",...fo(l,n),children:b},Ur(l,d))})})},PC=({data:t,activeId:r,onItemClick:o,interactions:n,valueFormatter:a,colors:i})=>{let s=Math.max(t.reduce((l,d)=>l+Math.max(tr(d.value),0),0),1);return e("div",{className:"orb-metric-progress",role:"list","aria-label":"Chart data",children:t.map((l,d)=>{let u=Math.max(tr(l.value),0),p=us(u/s*100,0,100),f=r===l.id,b=c(jsxRuntime.Fragment,{children:[c("span",{className:"orb-metric-progress-heading",children:[e("span",{title:l.label,children:l.label}),e("strong",{children:a(u)})]}),e("span",{className:"orb-metric-bar-track","aria-hidden":"true",children:e("span",{className:"orb-metric-bar-fill",style:{width:`${p}%`,backgroundColor:go(l,d,i)}})})]});return o?e("button",{type:"button",className:`orb-metric-progress-row${f?" is-active":""}`,onClick:()=>o(l),"aria-pressed":f,...fo(l,n),children:b},Ur(l,d)):e("div",{className:`orb-metric-progress-row${f?" is-active":""}`,role:"listitem",...fo(l,n),children:b},Ur(l,d))})})},TC=({type:t,data:r,activeId:o,onItemClick:n,interactions:a,valueFormatter:i,secondaryValueFormatter:s,colors:l,ariaLabel:d})=>{let{min:u,max:p,range:f}=Am(r),b=ps-Ut.left-Ut.right,m=Mn-Ut.top-Ut.bottom,v=Ut.top+p/f*m,y=Math.max(1,Math.ceil(r.length/6)),g=r.map((C,k)=>yC(k,C,r)),x=g.map(C=>`${C.x},${C.y}`).join(" "),h=Math.max(...r.map(C=>Math.max(tr(C.secondaryValue),0)),1);return e("div",{className:"orb-metric-svg-wrap",children:c("svg",{className:"orb-metric-svg",viewBox:`0 0 ${ps} ${Mn}`,role:"img","aria-label":d,children:[e("line",{className:"orb-metric-axis",x1:Ut.left,y1:v,x2:ps-Ut.right,y2:v}),e("line",{className:"orb-metric-grid",x1:Ut.left,y1:Ut.top,x2:Ut.left,y2:Mn-Ut.bottom}),t==="column"&&r.map((C,k)=>{let w=g[k],T=tr(C.value),I=Math.max(Math.abs(w.y-v),T===0?2:0),S=w.x-Math.min(18,b/Math.max(r.length*2,1)),A=Math.min(36,Math.max(10,b/Math.max(r.length*1.8,1))),R=o===C.id;return c("g",{...Vl({item:C,onItemClick:n,interactions:a}),"aria-label":`${C.label}: ${i(T)}`,children:[e("rect",{className:`orb-metric-column${R?" is-active":""}`,x:S,y:Math.min(w.y,v),width:A,height:I,rx:4,fill:go(C,k,l)}),c("title",{children:[C.label,": ",i(T)]}),(k%y===0||r.length<=6)&&e("text",{className:"orb-metric-svg-label",x:w.x,y:Mn-14,textAnchor:"middle",children:Nm(C.label)})]},Ur(C,k))}),(t==="line"||t==="scatter"||t==="bubble")&&c(jsxRuntime.Fragment,{children:[t==="line"&&e("polyline",{className:"orb-metric-line",fill:"none",points:x,stroke:l[0]}),r.map((C,k)=>{let w=g[k],T=o===C.id,I=t==="bubble"?7+Math.max(tr(C.secondaryValue),0)/h*12:t==="scatter"?5:4;return c("g",{...Vl({item:C,onItemClick:n,interactions:a}),"aria-label":`${C.label}: ${i(tr(C.value))}`,children:[t==="line"&&e("circle",{className:`orb-metric-point${T?" is-active":""}`,cx:w.x,cy:w.y,r:T?6:4,fill:go(C,k,l)}),t!=="line"&&e("circle",{className:`orb-metric-point${T?" is-active":""}`,cx:w.x,cy:w.y,r:I,fill:go(C,k,l),opacity:t==="bubble"?.82:.9}),c("title",{children:[C.label,": ",i(tr(C.value)),t==="bubble"&&C.secondaryValue!==void 0?` \xB7 Size: ${s(tr(C.secondaryValue))}`:""]}),(k%y===0||r.length<=6)&&e("text",{className:"orb-metric-svg-label",x:w.x,y:Math.max(Ut.top+8,w.y-I-7),textAnchor:"middle",children:Nm(C.label)})]},Ur(C,k))})]}),e("text",{className:"orb-metric-axis-label",x:Ut.left,y:Ut.top-5,children:i(p)}),u<0&&e("text",{className:"orb-metric-axis-label",x:Ut.left,y:Mn-Ut.bottom+14,children:i(u)})]})})},IC=({type:t,data:r,activeId:o,onItemClick:n,interactions:a,valueFormatter:i,colors:s,ariaLabel:l})=>{let d=r.map(m=>({...m,value:Math.max(tr(m.value),0)})),u=d.reduce((m,v)=>m+v.value,0),p=72,f=92,b=0;return c("div",{className:"orb-metric-circular",children:[c("svg",{className:"orb-metric-donut",viewBox:"0 0 184 184",role:"img","aria-label":l,children:[d.map((m,v)=>{let y=m.value/u*360,g=b;b+=y;let x=o===m.id,h=y>=359.9?void 0:CC(f,f,p,t==="donut"?46:0,g,g+y),C=Vl({item:m,onItemClick:n,interactions:a});return h?e("path",{className:`orb-metric-slice${x?" is-active":""}`,d:h,fill:go(m,v,s),...C,children:c("title",{children:[m.label,": ",i(m.value)," (",(m.value/u*100).toFixed(1),"%)"]})},Ur(m,v)):e("circle",{className:`orb-metric-slice${x?" is-active":""}`,cx:f,cy:f,r:t==="donut"?60:p,fill:t==="donut"?"none":go(m,v,s),stroke:t==="donut"?go(m,v,s):void 0,strokeWidth:28,...C,children:c("title",{children:[m.label,": ",i(m.value)," (100%)"]})},Ur(m,v))}),t==="donut"&&e("circle",{cx:f,cy:f,r:44,fill:"var(--orb-surface)"}),t==="donut"&&e("text",{className:"orb-metric-donut-total",x:f,y:f+5,textAnchor:"middle",children:i(u)})]}),e("div",{className:"orb-metric-legend",role:"list","aria-label":"Chart legend",children:d.map((m,v)=>{let y=o===m.id;return c("button",{type:"button",className:`orb-metric-legend-item${y?" is-active":""}`,onClick:()=>n?.(m),disabled:!n,title:m.label,...fo(m,a),children:[e("span",{className:"orb-metric-legend-dot",style:{backgroundColor:go(m,v,s)}}),e("span",{className:"orb-metric-legend-label",children:m.label}),c("strong",{children:[(m.value/u*100).toFixed(0),"%"]})]},Ur(m,v))})})]})},MC=({data:t,activeId:r,onItemClick:o,interactions:n,valueFormatter:a,secondaryValueFormatter:i})=>e("div",{className:"orb-metric-list",role:"list","aria-label":"Chart data",children:t.map((s,l)=>{let d=c(jsxRuntime.Fragment,{children:[e("span",{className:"orb-metric-list-label",title:s.label,children:s.label}),e("span",{className:"orb-metric-list-value",children:a(tr(s.value))}),s.secondaryValue!==void 0&&e("span",{className:"orb-metric-list-secondary",children:i(tr(s.secondaryValue))})]});return o?e("button",{type:"button",className:`orb-metric-list-row${r===s.id?" is-active":""}`,onClick:()=>o(s),"aria-pressed":r===s.id,...fo(s,n),children:d},Ur(s,l)):e("div",{className:`orb-metric-list-row${r===s.id?" is-active":""}`,role:"listitem",...fo(s,n),children:d},Ur(s,l))})}),gs=({title:t,subtitle:r,data:o=[],chartType:n="bar",onChartTypeChange:a,onItemClick:i,onDataDetails:s,activeId:l,valueFormatter:d=Dm,secondaryValueFormatter:u=Dm,valueLabel:p,secondaryValueLabel:f,emptyState:b,loading:m=false,error:v,maxItems:y=8,showChartTypeControl:g=true,showDataDetails:x=true,dataRevealDelayMs:h=1e3,chartTypeOptions:C,chartTypeLabels:k,footer:w,ariaLabel:T,className:I,style:S,sx:A})=>{let R=Fs(),M=er.useRef(null),N=er.useRef(null),[E,O]=er.useState(n),[F,_]=er.useState(false),[B,Y]=er.useState(null),[W,j]=er.useState(null);er.useEffect(()=>O(n),[n]);let V=er.useCallback(()=>{N.current!==null&&(window.clearTimeout(N.current),N.current=null);},[]);er.useEffect(()=>V,[V]),er.useEffect(()=>{if(!W)return;let X=De=>{let ye=De.target;ye instanceof HTMLElement&&ye.closest(".orb-metric-context-menu")||j(null);};return document.addEventListener("pointerdown",X),()=>document.removeEventListener("pointerdown",X)},[W]);let z=E,K=er.useMemo(()=>[R.chart1,R.chart2,R.chart3,R.chart4,R.chart5,R.chart6],[R]),q=er.useMemo(()=>F?o:o.slice(0,Math.max(1,y)),[o,y,F]),fe=Math.max(0,o.length-q.length),se=q.some(X=>tr(X.value)>0),ue=q.length>0&&(z!=="pie"&&z!=="donut"?true:se),Se=(C??[z,"bar","column","line","pie","donut","scatter","bubble","list"]).filter((X,De,ye)=>ms.includes(X)&&ye.indexOf(X)===De),$e={...vC,...k},ke=q[0],le=T??`${t} ${$e[z]} chart`,Ee=X=>{O(X),a?.(X);},Me=er.useCallback((X,De)=>{Y({item:X,source:De}),j(null),s?.(X,De);},[s]),Pe=er.useCallback(X=>{V(),!(!x||W)&&(N.current=window.setTimeout(()=>{Me(X,"hover"),N.current=null;},Math.max(0,h)));},[V,W,h,Me,x]),Ve=er.useCallback(()=>{V();},[V]),tt=er.useCallback((X,De)=>{if(!x)return;X.preventDefault(),V();let ye=M.current?.getBoundingClientRect(),Be=ye?us(X.clientX-ye.left,8,Math.max(8,ye.width-164)):8,at=ye?us(X.clientY-ye.top,8,Math.max(8,ye.height-72)):8;j({item:De,left:Be,top:at});},[V,x]),nt=x?{onItemHoverStart:Pe,onItemHoverEnd:Ve,onItemContextMenu:tt}:void 0,it=z==="metric"?c("div",{className:"orb-metric-kpi",role:i?"button":"img",tabIndex:i?0:void 0,onClick:()=>ke&&i?.(ke),onKeyDown:X=>{ke&&i&&(X.key==="Enter"||X.key===" ")&&(X.preventDefault(),i(ke));},"aria-label":le,...ke?fo(ke,nt):{},children:[e("span",{className:"orb-metric-kpi-label",children:ke?.label??p??"Value"}),e("strong",{children:ke?d(tr(ke.value)):"\u2014"}),ke?.secondaryValue!==void 0&&c("span",{className:"orb-metric-kpi-secondary",children:[f??"Compared with"," \xB7 ",u(tr(ke.secondaryValue))]})]}):z==="progress"?e(PC,{data:q,activeId:l,onItemClick:i,interactions:nt,valueFormatter:d,colors:K}):z==="bar"?e(kC,{data:q,activeId:l,onItemClick:i,interactions:nt,valueFormatter:d,colors:K}):z==="list"?e(MC,{data:q,activeId:l,onItemClick:i,interactions:nt,valueFormatter:d,secondaryValueFormatter:u}):z==="pie"||z==="donut"?e(IC,{type:z,data:q,activeId:l,onItemClick:i,interactions:nt,valueFormatter:d,colors:K,ariaLabel:le}):e(TC,{type:z,data:q,activeId:l,onItemClick:i,interactions:nt,valueFormatter:d,secondaryValueFormatter:u,colors:K,ariaLabel:le});return c("div",{ref:M,className:"orb-metric-chart-shell",onMouseLeave:()=>{V(),B?.source==="hover"&&Y(null);},children:[c(Ae,{elevation:1,variant:"outlined",className:`orb-metric-chart-card ${I??""}`,style:S,sx:A,children:[c("div",{className:"orb-metric-chart-header",children:[c("div",{className:"orb-metric-chart-heading",children:[e(L,{variant:"subtitle1",component:"h3",noWrap:true,title:t,children:t}),r&&e(L,{variant:"caption",muted:true,component:"div",noWrap:true,children:r})]}),g&&Se.length>1&&e(zt,{"aria-label":`${t} chart type`,className:"orb-metric-chart-select",value:z,options:Se.map(X=>({value:X,label:$e[X]})),onChange:X=>Ee(X.target.value),minWidth:108,fullWidth:false,size:"small"})]}),c("div",{className:"orb-metric-chart-body",children:[e(wC,{loading:m,error:v,hasData:ue,emptyState:b,children:it}),fe>0&&!m&&!v&&e("button",{type:"button",className:"orb-metric-more",onClick:()=>_(X=>!X),children:F?"Show fewer":`Show all ${o.length}`})]}),w&&e("div",{className:"orb-metric-chart-footer",children:w})]}),W&&c("div",{className:"orb-metric-context-menu",role:"menu",onMouseEnter:V,onKeyDown:X=>{X.key==="Escape"&&j(null);},style:{left:W.left,top:W.top},onPointerDown:X=>X.stopPropagation(),children:[e("div",{className:"orb-metric-context-label",children:W.item.label}),e("button",{type:"button",role:"menuitem",onClick:X=>{X.preventDefault(),X.stopPropagation(),Me(W.item,"contextmenu");},children:"Show data"})]}),B&&c("div",{className:"orb-metric-data-details",role:"dialog","aria-label":`${B.item.label} data details`,onPointerDown:X=>X.stopPropagation(),children:[c("div",{className:"orb-metric-data-details-header",children:[e("strong",{children:B.item.label}),e("button",{type:"button","aria-label":"Close data details",onClick:()=>Y(null),children:"\xD7"})]}),c("div",{className:"orb-metric-data-details-row",children:[e("span",{children:p??"Value"}),e("strong",{children:d(tr(B.item.value))})]}),B.item.secondaryValue!==void 0&&c("div",{className:"orb-metric-data-details-row",children:[e("span",{children:f??"Secondary value"}),e("strong",{children:u(tr(B.item.secondaryValue))})]}),e("span",{className:"orb-metric-data-details-hint",children:B.source==="hover"?`Shown after ${Math.max(0,h)/1e3} seconds of stillness`:"Shown from the context menu"})]})]})};gs.displayName="CMetricChartCard";P();var RC=({messageId:t,cardHooks:r,valueSuffix:o,secondaryValueSuffix:n,...a})=>{let i=(l,d)=>{r?.onCardEvent?.({messageId:t,cardType:"metric-chart-card",action:l,title:a.title,payload:d,rawData:a});},s=(l,d)=>`${l.toLocaleString()}${d??""}`;return e(gs,{...a,valueFormatter:l=>s(l,o),secondaryValueFormatter:l=>s(l,n),onChartTypeChange:l=>i("action",{chartType:l}),onItemClick:l=>i("action",{item:l}),onDataDetails:(l,d)=>i("show-data",{item:l,source:d})})},fs=RC;P();var DC=({type:t,manifest:r})=>c("div",{className:"w-full overflow-hidden rounded-lg border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-sm transition-all hover:shadow-md",children:[c("div",{className:"flex items-center px-4 py-3 border-b border-[var(--orb-border)] bg-[var(--orb-p50)]",children:[e("div",{className:"w-4 h-4 mr-2 text-[var(--orb-status-primary)]"}),c("h3",{className:"text-sm font-semibold text-[var(--orb-fg)]",children:["SAP Card: ",t]})]}),e("div",{className:"p-4",children:e("div",{className:"bg-[var(--orb-surface)] dark:bg-[var(--orb-canvas)] p-3 rounded border border-[var(--orb-border)] overflow-x-auto",children:e("pre",{className:"text-xs font-mono text-[var(--orb-muted)] whitespace-pre-wrap",children:JSON.stringify(r,null,2)})})})]}),bs=DC;var NC=t=>Array.isArray(t)?t.flatMap((r,o)=>{if(!r||typeof r!="object")return [];let n=r,a=String(n.label??n.name??n.id??`Item ${o+1}`),i=Number(n.value),s=Number.isFinite(i)?i:0,l=n.secondaryValue===void 0?void 0:Number(n.secondaryValue);return [{id:String(n.id??n.name??n.label??o),label:a,value:s,...l!==void 0&&Number.isFinite(l)?{secondaryValue:l}:{},...typeof n.color=="string"?{color:n.color}:{}}]}):[],hs=t=>{let r;try{r=JSON.parse(t);}catch{return null}if(r&&typeof r=="object"){if(r.type==="metric-chart-card"&&r.title&&Array.isArray(r.data)){let o=ms.includes(r.chartType)?r.chartType:"bar";return {...r,type:"metric-chart-card",chartType:o,data:NC(r.data)}}if((r.type==="bar-chart-card"||r.type==="line-chart-card"||r.type==="pie-chart-card"||r.type==="combo-chart-card"||r.type==="heatmap-chart-card"||r.type==="fishbone-chart-card"||r.type==="waterfall-chart-card"||r.type==="google-map-card"||r.type==="amap-card")&&r.title||(r.type==="sap-analytical-card"||r.type==="sap-list-card"||r.type==="sap-object-card"||r.type==="sap-component-card")&&r.manifest||r.type==="error-card"||r.type==="warning-card"||r.type==="suggestions-card"||r.type==="tool-result-card"||r.type==="table"&&r.data)return r}return null};P();var HC=({content:t,theme:r,size:o="base",className:n,enableCodeHighlight:a=true,enableMermaid:i=true,messageId:s,cardHooks:l})=>{let d=er.useRef(l);d.current=l;let u=!!l?.onCardEvent,p=er.useMemo(()=>u?{onCardEvent:y=>d.current?.onCardEvent?.(y)}:void 0,[u]),f=er.useMemo(()=>t?t.replace(/<think>([\s\S]*?)<\/think>/g,(y,g)=>`<div data-component="thinkbox" data-think-content="${encodeURIComponent(g.trim())}"></div>`):"",[t]),b=(y,g,x,h,C)=>{p?.onCardEvent?.({messageId:s,cardType:y,action:g,title:x,payload:h,rawData:C});},m=(y,g,x,h,C,k)=>{if(!(!C&&!p?.onCardEvent))return (...w)=>{let T=C?.(...w),I=k?k(...w):void 0;return b(y,g,x,I,h),T}},v=er.useMemo(()=>({div(y){let{"data-component":g,"data-think-content":x,...h}=y;return g==="thinkbox"&&x?e(vm,{content:decodeURIComponent(x),theme:r,size:o,defaultExpanded:false}):e("div",{...h})},table({children:y}){return e("div",{className:"my-4 w-full overflow-x-auto rounded-lg border border-[var(--orb-border)]",children:e("table",{className:"w-full min-w-[520px] border-collapse text-sm",children:y})})},thead({children:y}){return e("thead",{className:"bg-[color-mix(in_oklch,var(--orb-surface)_60%,transparent)]",children:y})},tbody({children:y}){return e("tbody",{className:"bg-[var(--orb-canvas)] dark:bg-[var(--orb-canvas)]",children:y})},tr({children:y}){return e("tr",{className:"border-b border-[var(--orb-border)] last:border-b-0",children:y})},th({children:y,align:g}){return e("th",{className:`px-3 py-2 font-semibold text-[var(--orb-fg)] ${g==="center"?"text-center":g==="right"?"text-right":"text-left"}`,children:y})},td({children:y,align:g}){return e("td",{className:`px-3 py-2 text-[var(--orb-fg)] align-top ${g==="center"?"text-center":g==="right"?"text-right":"text-left"}`,children:y})},code({className:y,children:g,...x}){let h=/language-([\w-]+)/.exec(y||""),C=h?h[1]:"",k=String(g);if(!h&&!k.includes(`
199
+ `))return e("code",{children:g});let T=k.replace(/\n$/,"");if(i&&C==="mermaid")return e(km,{content:T});if(C==="html"||C==="htm")return e(xm,{content:T});if(C==="json"){let I=hs(T);if(I)switch(I.type){case "table":return e(ss,{data:I.data});case "metric-chart-card":return e(fs,{...I,messageId:s,cardHooks:p});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(ls,{...I});case "sap-analytical-card":case "sap-list-card":case "sap-object-card":case "sap-component-card":return e(bs,{...I});case "error-card":{let S=I;return e(os,{...S,onClose:m("error-card","close",S.title,S,S.onClose),onRetry:m("error-card","retry",S.title,S,S.onRetry)})}case "warning-card":{let S=I,A=S.onConfirm?m("warning-card","confirm",S.title,S,S.onConfirm):S.actionText&&p?.onCardEvent?m("warning-card","confirm",S.title,S):void 0;return e(ns,{...S,onClose:m("warning-card","close",S.title,S,S.onClose),onConfirm:A})}case "suggestions-card":{let S=I;return e(as,{...S,onClose:m("suggestions-card","close",S.title,S,S.onClose),onSuggestionClick:m("suggestions-card","suggestion-click",S.title,S,S.onSuggestionClick,A=>({suggestion:A}))})}case "tool-result-card":{let S=I;return e(is,{...S,onClose:m("tool-result-card","close",S.title,S,S.onClose),onAction:m("tool-result-card","action",S.title,S,S.onAction)})}}}return a?e(ym,{content:T,language:C,className:"not-prose"}):e("code",{className:y,...x,children:g})}}),[r,o,i,a,p,s]);return e("div",{className:ut("markdown-body max-w-none",n),children:e(EC__default.default,{remarkPlugins:[LC__default.default,OC__default.default],rehypePlugins:[FC__default.default,BC__default.default],components:v,children:f})})},Rn=HC;P();var zC=({content:t,messageId:r,cardHooks:o})=>{let n=(s,l,d,u,p)=>{o?.onCardEvent?.({messageId:r,cardType:s,action:l,title:d,payload:u,rawData:p});},a=(s,l,d,u,p,f)=>{if(!(!p&&!o?.onCardEvent))return (...b)=>{let m=p?.(...b),v=f?f(...b):void 0;return n(s,l,d,v,u),m}},i=hs(t);if(i)switch(i.type){case "table":return e(ss,{data:i.data});case "metric-chart-card":return e(fs,{...i,messageId:r,cardHooks:o});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(ls,{...i});case "sap-analytical-card":case "sap-list-card":case "sap-object-card":case "sap-component-card":return e(bs,{...i});case "error-card":{let s=i;return e(os,{...s,onClose:a("error-card","close",s.title,s,s.onClose),onRetry:a("error-card","retry",s.title,s,s.onRetry)})}case "warning-card":{let s=i,l=s.onConfirm?a("warning-card","confirm",s.title,s,s.onConfirm):s.actionText&&o?.onCardEvent?a("warning-card","confirm",s.title,s):void 0;return e(ns,{...s,onClose:a("warning-card","close",s.title,s,s.onClose),onConfirm:l})}case "suggestions-card":{let s=i;return e(as,{...s,onClose:a("suggestions-card","close",s.title,s,s.onClose),onSuggestionClick:a("suggestions-card","suggestion-click",s.title,s,s.onSuggestionClick,l=>({suggestion:l}))})}case "tool-result-card":{let s=i;return e(is,{...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(Rn,{content:t,enableCodeHighlight:true,enableMath:true,enableMermaid:true,messageId:r,cardHooks:o})})},Em=zC;P();var $l=class{static analyze(r){if(!r.trim())return {blocks:[],hasComplexContent:false,overallType:"simple"};let n=/```json\s*\{\s*"type":\s*"[^"]+"/g.test(r),a=/<[^>]+>[\s\S]*?<\/[^>]+>/.test(r),i=r.includes("NQ#")||r.includes("data-component");return n||a||i?{blocks:[{type:"mixed",content:r,startIndex:0,endIndex:r.length}],hasComplexContent:true,overallType:"complex"}:{blocks:[{type:"markdown",content:r,startIndex:0,endIndex:r.length}],hasComplexContent:false,overallType:"simple"}}},WC=({content:t,className:r="",messageId:o,cardHooks:n})=>{let a=er__namespace.default.useMemo(()=>$l.analyze(t),[t]);return e("div",{className:`universal-content-renderer ${r}`,children:a.blocks.map((i,s)=>i.type==="mixed"||i.type==="json-card"?e(Em,{content:i.content,messageId:o,cardHooks:n},`block-${s}`):e(Rn,{content:i.content,enableCodeHighlight:true,enableMath:true,enableMermaid:true,messageId:o,cardHooks:n},`block-${s}`))})},vs=WC;P();var $C=({content:t,isStreaming:r=true,onComplete:o,className:n="",streamIntervalMs:a=24,streamChunkSize:i=3,messageId:s,cardHooks:l})=>{let[d,u]=er.useState(r?0:t.length),[p,f]=er.useState(!r);er.useEffect(()=>{if(r){u(0),f(false);return}u(t.length),f(true);},[t,r]),er.useEffect(()=>{if(!r||p)return;if(d>=t.length){f(true),o?.();return}let g=window.setTimeout(()=>{u(x=>Math.min(x+i,t.length));},a);return ()=>{window.clearTimeout(g);}},[t.length,p,r,o,i,a,d]);let b=()=>{r&&!p&&(u(t.length),f(true),o?.());},m=r?t.slice(0,d):t,v=r&&!p,y=r&&!p;return c("div",{className:`streaming-markdown ${n}`,onClick:b,style:{cursor:r?"pointer":"default"},children:[c("div",{className:"relative",children:[e(vs,{content:m,messageId:s,cardHooks:l}),v&&e("span",{className:"inline-block w-[2px] h-[13px] ml-0.5 animate-pulse",style:{verticalAlign:"text-bottom",backgroundColor:"var(--orb-primary, #154194)"}})]}),y&&e("div",{className:"streaming-hint",style:{fontSize:"9px",color:"var(--orb-muted)",marginTop:"8px",fontStyle:"italic",opacity:.7},children:"\u70B9\u51FB\u6B64\u5904\u663E\u793A\u5B8C\u6574\u5185\u5BB9"})]})},Fm=$C;P();var Bm=({buttons:t,className:r})=>{let o=n=>{switch(n){case "copy":return e(vo,{size:14});case "refresh":return e(Ba,{size:14});case "volume":return e(ed,{size:14});case "like":return e(Zc,{size:14});case "dislike":return e(Yc,{size:14});default:return null}};return e("div",{className:ut("flex items-center gap-1",r),children:t.map((n,a)=>e("button",{onClick:n.onClick,disabled:n.disabled,"aria-busy":n.loading||void 0,className:ut("p-1.5 rounded-md transition-colors","text-[var(--orb-muted)] hover:text-[var(--orb-fg)] dark:text-[var(--orb-muted)] dark:hover:text-[var(--orb-fg)]","hover:bg-[var(--orb-hover)]","disabled:opacity-50 disabled:cursor-not-allowed",n.active&&"text-[var(--orb-primary)] bg-[var(--orb-p50)]",n.type==="refresh"&&n.loading&&"animate-spin"),title:n.type,type:"button",children:o(n.type)},`${n.type}-${a}`))})};P();var ys=({message:t,onStreamingComplete:r,assistantActions:o,streamIntervalMs:n,streamChunkSize:a,cardHooks:i})=>{let s={lineHeight:1.55,fontSize:13,fontWeight:300,fontFamily:'var(--orb-font, "Montserrat", system-ui, sans-serif)',color:"var(--orb-fg, #555555)",borderRadius:"var(--orb-r, 10px)",padding:"10px 14px"},l={marginTop:6,fontSize:11,color:"var(--orb-muted, #8c8c8c)"};if(t.type==="assistant"){let d=!!(o?.isResponding||t.isStreaming);return e("div",{className:"mb-4 flex justify-start",children:c("div",{className:"mr-auto w-full",style:{...s,background:"var(--orb-surface, #f5f5f5)",border:"1px solid var(--orb-border, #dbdbdb)"},children:[e(Fm,{content:t.content,isStreaming:t.isStreaming??false,onComplete:r,streamIntervalMs:n,streamChunkSize:a,messageId:t.id,cardHooks:i}),t.content&&o?.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(Bm,{buttons:[{type:"refresh",onClick:()=>{o?.onRegenerate?.();},disabled:d||!o?.onRegenerate,loading:d},{type:"copy",onClick:()=>navigator.clipboard.writeText(t.content),disabled:false},{type:"volume",onClick:()=>console.log("\u8BED\u97F3\u64AD\u653E"),disabled:false},{type:"like",onClick:()=>console.log("\u70B9\u8D5E"),disabled:false},{type:"dislike",onClick:()=>console.log("\u70B9\u8E29"),disabled:false}],size:"sm",variant:"default"})}),e("div",{style:l,children:t.timestamp.toLocaleTimeString()})]})})}return e("div",{className:"mb-4 flex justify-end",children:c("div",{className:"ml-auto max-w-[80%]",style:{...s,background:"var(--orb-p50, #eef2f9)",border:"1px solid var(--orb-p100, #e4e9f5)"},children:[e("div",{className:"whitespace-pre-wrap",children:t.content}),e("div",{style:l,children:t.timestamp.toLocaleTimeString()})]})})};P();var Hm=({onTextUpdate:t,onComplete:r,onCancel:o,disabled:n,className:a})=>{let{isRecording:i,startRecording:s,stopRecording:l}=Sn({onTextUpdate:t,onComplete:u=>{r?.(u);},onError:u=>{console.error("Voice input error:",u),o?.();}});return e("button",{onClick:async()=>{i?l():await s();},disabled:n,className:ut("transition-all duration-200 flex items-center justify-center rounded-full",i?"bg-[color-mix(in_oklch,var(--orb-status-error)_12%,transparent)] text-[var(--orb-status-error)] hover:bg-[color-mix(in_oklch,var(--orb-status-error)_20%,transparent)] animate-pulse":"bg-transparent hover:bg-[var(--orb-hover)] text-[var(--orb-muted)] active:scale-95",n&&"opacity-50 cursor-not-allowed",a),title:i?"Stop recording":"Start recording",type:"button",children:i?e(ap,{size:16}):e(ip,{size:16})})};P();var dr={container:"w-full max-w-4xl mx-auto",inputContainer:ut("w-full flex flex-col border border-[var(--orb-border,#dbdbdb)] bg-[color-mix(in_oklch,var(--orb-canvas)_64%,transparent)] backdrop-blur-[28px] transition-colors duration-200","orb-agent-input","focus-within:border-[var(--orb-primary,#154194)] focus-within:ring-1 focus-within:ring-[var(--orb-focus-ring,#e4e9f5)]"),dragActive:"border-[var(--orb-primary,#154194)] bg-[var(--orb-p50,#eef2f9)]",textareaWrapper:"flex-1 relative flex items-center",textarea:ut("w-full outline-none appearance-none resize-none bg-transparent border-none text-sm font-normal py-3 px-3","placeholder:text-[var(--orb-muted,#8c8c8c)] placeholder:font-normal","text-[var(--orb-fg,#555555)] selection:bg-[var(--orb-p100,#e4e9f5)]","focus:ring-0 focus:outline-none focus:border-none focus:shadow-none","min-h-[44px] max-h-[12em] overflow-y-auto scrollbar-thin scrollbar-thumb-[var(--orb-border)]"),filePreviewArea:"px-4 pt-3 pb-1 flex flex-wrap gap-2",fileTag:ut("flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs font-medium","bg-[var(--orb-surface,#f5f5f5)] text-[var(--orb-fg,#555555)]","border border-[var(--orb-border,#dbdbdb)]","transition-all hover:bg-[var(--orb-hover,#eef2f9)]"),buttonBase:"flex items-center justify-center transition-all duration-200 rounded-full",buttonSmall:"h-[38px] w-[38px] shrink-0 md:h-8 md:w-8",buttonNormal:ut("bg-transparent hover:bg-[var(--orb-hover,#eef2f9)] text-[var(--orb-muted,#8c8c8c)] hover:text-[var(--orb-fg,#555555)]","cursor-pointer active:scale-95"),sendButton:ut("cursor-pointer bg-[var(--orb-primary,#154194)] hover:bg-[var(--orb-p600,#0e2d63)] text-[var(--orb-on-primary)] shadow-none active:scale-95"),sendButtonDisabled:ut("cursor-not-allowed opacity-40 bg-[var(--orb-disabled-bg,#f5f5f5)] text-[var(--orb-disabled-fg,#8c8c8c)]"),stopButton:ut("cursor-pointer bg-[var(--orb-err,#c43f02)] hover:opacity-90 text-[var(--orb-on-primary)] shadow-none active:scale-95")},GC={padding:0,lineHeight:"1.5",border:"none !important",boxShadow:"none !important",backgroundColor:"transparent",height:"auto",fontFeatureSettings:'"liga" 1, "kern" 1',WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},UC=({enabled:t,onClick:r})=>e("button",{className:ut(dr.buttonBase,dr.buttonSmall,dr.buttonNormal),onClick:r,disabled:!t,"aria-label":"Upload file",type:"button",children:e(Hd,{size:16})}),KC=({canSend:t,isResponding:r,onSend:o,onStop:n})=>r?e("button",{className:ut(dr.buttonBase,dr.buttonSmall,dr.stopButton),onClick:n,"aria-label":"Stop generating",type:"button",children:e(fp,{size:15})}):e("button",{className:ut(dr.buttonBase,dr.buttonSmall,t?dr.sendButton:dr.sendButtonDisabled),onClick:o,disabled:!t,"aria-label":"Send message",type:"button",children:e(dp,{size:16,className:t?"text-[var(--orb-on-primary,#ffffff)]":"text-[var(--orb-disabled-fg,#8c8c8c)]"})}),_l=({onSend:t,onStop:r,isResponding:o=false,placeholder:n,getText:a})=>{let[i,s]=er.useState(""),[l,d]=er.useState([]),[u,p]=er.useState(false),[f,b]=er.useState(false),m=er.useRef(null),v=n||(a?a("00019","Type a message..."):"Type a message..."),y=(i.trim().length>0||l.length>0)&&!o,g={enabled:true},x=er.useCallback(F=>{s(F.target.value),F.target.style.height="auto",F.target.style.height=`${Math.min(F.target.scrollHeight,200)}px`;},[]),h=er.useCallback(F=>{if(F.target.files&&F.target.files.length>0){let _=Array.from(F.target.files);d(B=>{let Y=_.filter(j=>B.some(V=>V.name===j.name&&V.size===j.size));Y.length>0&&console.warn("Duplicate files ignored:",Y.map(j=>j.name));let W=_.filter(j=>!B.some(V=>V.name===j.name&&V.size===j.size));return [...B,...W]}),m.current&&(m.current.value="");}},[]),C=er.useCallback(F=>{d(_=>_.filter((B,Y)=>Y!==F));},[]),k=er.useCallback(()=>{m.current?.click();},[]),w=er.useCallback(async()=>{if(!y)return;let F=i,_=[...l];s(""),d([]),m.current&&(m.current.value="");try{await t(F,_);}catch(B){console.error("Failed to send message:",B),s(F),d(_);}},[i,y,t,l]),T=er.useCallback(F=>{F.key==="Enter"&&!F.shiftKey&&!u&&(F.preventDefault(),w());},[w,u]),I=er.useCallback(()=>{p(true);},[]),S=er.useCallback(()=>{p(false);},[]),A=er.useCallback(F=>{s(F);},[]),R=er.useCallback(F=>{s(F);},[]),M=er.useCallback(()=>{},[]),N=er.useCallback(F=>{F.preventDefault(),b(true);},[]),E=er.useCallback(F=>{F.preventDefault(),b(false);},[]),O=er.useCallback(F=>{if(F.preventDefault(),b(false),F.dataTransfer.files&&F.dataTransfer.files.length>0){let _=Array.from(F.dataTransfer.files);d(B=>[...B,..._]);}},[]);return e("div",{className:dr.container,children:c("div",{className:"relative",children:[e("input",{type:"file",multiple:true,className:"hidden",ref:m,onChange:h}),c("div",{className:ut(dr.inputContainer,f&&dr.dragActive),onDragOver:N,onDragLeave:E,onDrop:O,children:[l.length>0&&e("div",{className:dr.filePreviewArea,children:l.map((F,_)=>c("div",{className:dr.fileTag,children:[e(ep,{sx:{fontSize:16},className:"text-[var(--orb-primary)]"}),e("span",{className:"truncate max-w-[150px]",children:F.name}),e("button",{onClick:()=>C(_),className:"ml-1 hover:text-[var(--orb-status-error)] focus:outline-none",type:"button",children:e(Kd,{sx:{fontSize:16}})})]},`${F.name}-${_}`))}),c("div",{className:"flex w-full flex-col p-2",children:[e("div",{className:ut(dr.textareaWrapper,"min-h-[52px] px-2 pb-2 pt-1.5 md:min-h-[44px]"),children:e("textarea",{className:ut(dr.textarea,"min-h-[24px] py-0 px-0"),placeholder:v,value:i,onChange:x,onKeyDown:T,onCompositionStart:I,onCompositionEnd:S,style:GC,"aria-label":"Message input",spellCheck:false,rows:1})}),c("div",{className:"flex items-center justify-between px-1 pb-0.5",children:[e("div",{className:"flex items-center gap-1",role:"toolbar","aria-label":"Input tools",children:e(UC,{enabled:g.enabled,onClick:k})}),c("div",{className:"flex items-center gap-1",children:[e(Hm,{onTextUpdate:A,onComplete:R,onCancel:M,disabled:o,className:dr.buttonSmall}),e(KC,{canSend:y,isResponding:o,onSend:w,onStop:r})]})]})]})]})]})})};P();var Vm=({messages:t,onSend:r,onStop:o,onRegenerate:n,isResponding:a=false,className:i,placeholder:s,streamIntervalMs:l,streamChunkSize:d,onMessageStreamingComplete:u,cardHooks:p,showInput:f=true,statusLine:b})=>{let m=er.useRef(null),v=er.useRef(t.length);return er.useEffect(()=>{t.length>v.current&&m.current?.scrollIntoView({behavior:"smooth"}),v.current=t.length;},[t]),c("div",{className:ut("flex flex-col h-full w-full relative",i),children:[c("div",{className:"flex-1 overflow-y-auto px-4 py-4 space-y-6 scrollbar-thin scrollbar-thumb-[var(--orb-border)]",children:[t.map((y,g)=>{let x=y.type==="assistant"&&g===t.length-1,h=y.type==="assistant"?{isLatestAssistant:x,isResponding:a,onRegenerate:n?()=>n(y.id):void 0}:void 0;return e(ys,{message:y,assistantActions:h,onStreamingComplete:()=>u?.(y.id),streamIntervalMs:l,streamChunkSize:d,cardHooks:p},y.id)}),b,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(_l,{onSend:r||(async()=>{}),onStop:o||(()=>{}),isResponding:a,placeholder:s})})]})};P();var Wm={idle:"Idle",running:"Working",success:"Success",error:"Error",pending:"Pending"},$m=({title:t="AI Agent",description:r,headerActions:o,className:n,agentStatus:a,statusText:i,onHeaderPointerDown:s,showInput:l=false,...d})=>{let u=a??(d.isResponding?"running":"idle"),p=u==="running"||u==="pending",f=[Wm[u],r].filter(Boolean).join(" \xB7 ");return c("div",{className:ut("orb-agent-panel",n),children:[c("div",{className:ut("orb-agent-header",s&&"cursor-grab active:cursor-grabbing"),onPointerDown:s,children:[e("span",{className:"orb-agent-avatar","aria-hidden":"true",children:"AI"}),c("div",{className:"min-w-0 flex-1",children:[e("div",{className:"orb-agent-title",children:t}),c("div",{className:"orb-agent-subtitle",children:[e("span",{className:"orb-agent-dot","data-active":p||void 0}),e("span",{className:"truncate",children:f||"Agent"})]})]}),o&&e("div",{className:"ml-auto flex flex-none items-center gap-1",children:o})]}),e("div",{className:"relative min-h-0 flex-1",children:e(Vm,{...d,showInput:l,statusLine:p?c("div",{className:ut("orb-agent-status-line","mb-1"),children:[e("span",{className:"orb-agent-spinner","aria-hidden":"true"}),e("span",{children:i??`${Wm[u]}\u2026`})]}):void 0})})]})};P();var ZC=t=>Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(t),Gm=({conversations:t,activeConversationId:r,labels:o,onNewConversation:n,onSelectConversation:a})=>{let[i,s]=er.useState(false),l=er.useRef(null),d=er.useRef(null),u=er.useRef(null),p=er.useId(),f=!!a;er.useEffect(()=>{if(!i)return;let m=y=>{l.current?.contains(y.target)||s(false);},v=y=>{y.key==="Escape"&&(y.stopPropagation(),s(false),u.current?.focus());};return document.addEventListener("pointerdown",m),document.addEventListener("keydown",v),()=>{document.removeEventListener("pointerdown",m),document.removeEventListener("keydown",v);}},[i]),er.useEffect(()=>{if(!i)return;let m=d.current?.querySelector('[aria-selected="true"]'),v=d.current?.querySelector('[role="option"]');(m??v)?.focus();},[i]);let b=m=>{let v=Array.from(d.current?.querySelectorAll('[role="option"]')??[]);if(v.length===0)return;let y=v.findIndex(x=>x===document.activeElement),g=y<0?m===1?0:v.length-1:(y+m+v.length)%v.length;v[g]?.focus();};return !n&&!f?null:c(jsxRuntime.Fragment,{children:[n&&e("button",{type:"button",className:"orb-omph-icon-btn","aria-label":o.newConversation,onClick:()=>{s(false),n();},children:e(en,{size:16})}),f&&a&&c("div",{className:"orb-omph-conversation-anchor",ref:l,children:[e("button",{ref:u,type:"button",className:"orb-omph-icon-btn","aria-label":o.conversationList,"aria-expanded":i,"aria-controls":p,onClick:()=>s(m=>!m),children:e($c,{size:16})}),i&&e("div",{ref:d,id:p,className:"orb-omph-conversations",role:"listbox","aria-label":o.conversations,onKeyDown:m=>{m.key==="ArrowDown"?(m.preventDefault(),b(1)):m.key==="ArrowUp"&&(m.preventDefault(),b(-1));},children:t.length===0?e("p",{className:"orb-omph-conversation-empty",children:o.noConversations}):t.map(m=>{let v=m.updatedAt?ZC(m.updatedAt):"",y=[m.preview,v].filter(x=>x&&x.length>0).join(" \xB7 "),g=m.id===r;return c("button",{type:"button",role:"option",className:"orb-omph-conversation","aria-selected":g,"data-active":g||void 0,onClick:()=>{a(m.id),s(false);},children:[e("span",{className:"orb-omph-conversation-title",children:m.title}),y&&e("span",{className:"orb-omph-conversation-meta",children:y})]},m.id)})})]})]})};P();var rx=2e3,ox=1/3,xs=[.25,.5,.75,1,1.5,2,3,4],nx=100,Um={color:"inherit",background:"transparent",textShadow:"none",fontFamily:"inherit",fontSize:"inherit",lineHeight:"inherit",textAlign:"left",wordSpacing:"normal",wordBreak:"normal",overflowWrap:"normal",tabSize:"inherit",hyphens:"none"},Km=({text:t,language:r,startLine:o,endLine:n,wrap:a,labels:i})=>{let s=er.useRef(null),l=er.useMemo(()=>{let p=t.split(`
200
+ `);p.length>1&&p[p.length-1]===""&&p.pop();let f=Math.min(p.length,rx);return {shown:p.slice(0,f).join(`
201
+ `),shownCount:f,total:p.length}},[t]),d=er.useCallback(p=>{let f=n??o,b=o!==void 0&&f!==void 0&&p>=o&&p<=f;return {className:"orb-omph-code-line","data-line":p,...b?{"data-hit":"true"}:{}}},[n,o]);er.useEffect(()=>{let p=s.current,f=p?.closest(".orb-omph-pv-body");if(!p||!f)return;if(o===void 0){f.scrollTop=0;return}let b=p.querySelector(`[data-line="${o}"]`);if(!b)return;let m=b.getBoundingClientRect().top-f.getBoundingClientRect().top+f.scrollTop;f.scrollTop=Math.max(0,m-f.clientHeight*ox);},[o,l.shown]);let u={"--orb-omph-digits":String(l.shownCount).length};return c("div",{ref:s,className:"orb-omph-code","data-wrap":a||void 0,style:u,children:[e(reactSyntaxHighlighter.Prism,{language:r,useInlineStyles:false,PreTag:"div",CodeTag:"div",showLineNumbers:true,wrapLines:true,lineProps:d,customStyle:Um,codeTagProps:{className:`language-${r}`,style:Um},children:l.shown}),l.total>l.shownCount&&e("div",{className:"orb-omph-pv-note",children:i.previewTruncated(l.shownCount,l.total)})]})},qm=({text:t})=>e("div",{className:"orb-omph-pv-doc",children:e(Rn,{content:t})}),Xm=({url:t,alt:r,labels:o})=>{let[n,a]=er.useState("fit"),[i,s]=er.useState(null),[l,d]=er.useState(false),u=n==="fit"?1:n,p=xs.some(v=>v>u),f=xs.some(v=>v<u),b=v=>a(y=>{let g=y==="fit"?1:y;return (v>0?xs.find(h=>h>g):[...xs].reverse().find(h=>h<g))??y}),m=n==="fit"||i===null?{maxWidth:"100%",height:"auto"}:{width:i*n,maxWidth:"none",height:"auto"};return l?e("div",{className:"orb-omph-pv-note",role:"alert",children:r?`${o.imageFailed} \xB7 ${r}`:o.imageFailed}):c("div",{className:"orb-omph-img",children:[e("div",{className:"orb-omph-img-stage",children:e("img",{src:t,alt:r??"",draggable:false,style:m,onLoad:v=>s(v.currentTarget.naturalWidth),onError:()=>d(true)})}),c("div",{className:"orb-omph-img-zoom",role:"group","aria-label":o.zoomFit,children:[e("button",{type:"button","aria-label":o.zoomOut,disabled:!f,onClick:()=>b(-1),children:"\u2212"}),e("button",{type:"button","aria-label":o.zoomFit,"data-active":n==="fit"||void 0,onClick:()=>a("fit"),children:n==="fit"?o.zoomFit:`${Math.round(n*nx)}%`}),e("button",{type:"button","aria-label":o.zoomIn,disabled:!p,onClick:()=>b(1),children:"+"})]})]})};var ax=/^[a-z][a-z0-9+.-]*:/i,ix=/^L(\d+)(?:-L?(\d+))?$/i;var Ym=["B","KB","MB","GB"];var sx=t=>{try{return decodeURIComponent(t)}catch{return t}},Kl=t=>{let r=t.trim();if(!r||r.startsWith("#")||r.startsWith("//")||ax.test(r))return null;let o=r.indexOf("#"),n=o>=0?r.slice(0,o):r,a=o>=0?r.slice(o+1):"",i=n.indexOf("?"),s=sx(i>=0?n.slice(0,i):n);if(!s||s.endsWith("/"))return null;let l=ix.exec(a);if(!l)return {path:s};let d=Number(l[1]);if(d<1)return {path:s};let u=l[2]?Number(l[2]):d;return {path:s,startLine:d,endLine:Math.max(d,u)}},Ss=t=>t.split("/").filter(Boolean).pop()??t,jm=t=>{let r=t.split("/");return r.pop(),r.join("/")},ql=t=>{let r=Ss(t),o=r.lastIndexOf(".");return o>0?r.slice(o+1).toLowerCase():""},Qm={prism:"text",label:"Text"},Zm={ts:{prism:"typescript",label:"TypeScript"},tsx:{prism:"tsx",label:"TSX"},js:{prism:"javascript",label:"JavaScript"},mjs:{prism:"javascript",label:"JavaScript"},cjs:{prism:"javascript",label:"JavaScript"},jsx:{prism:"jsx",label:"JSX"},json:{prism:"json",label:"JSON"},py:{prism:"python",label:"Python"},java:{prism:"java",label:"Java"},go:{prism:"go",label:"Go"},rs:{prism:"rust",label:"Rust"},c:{prism:"c",label:"C"},h:{prism:"c",label:"C"},cpp:{prism:"cpp",label:"C++"},cs:{prism:"csharp",label:"C#"},sql:{prism:"sql",label:"SQL"},sh:{prism:"bash",label:"Shell"},bash:{prism:"bash",label:"Shell"},yml:{prism:"yaml",label:"YAML"},yaml:{prism:"yaml",label:"YAML"},xml:{prism:"markup",label:"XML"},html:{prism:"markup",label:"HTML"},css:{prism:"css",label:"CSS"},scss:{prism:"scss",label:"SCSS"},abap:{prism:"abap",label:"ABAP"},toml:{prism:"toml",label:"TOML"},ini:{prism:"ini",label:"INI"},md:{prism:"markdown",label:"Markdown"},csv:{prism:"text",label:"CSV"},log:{prism:"text",label:"Log"},txt:Qm},Xl=(t,r)=>r?Object.values(Zm).find(n=>n.prism===r)??{prism:r,label:r}:Zm[ql(t)]??Qm,Jm=t=>{let r=t,o=0;for(;r>=1024&&o<Ym.length-1;)r/=1024,o+=1;return `${o>0&&r<10?r.toFixed(1):Math.round(r).toString()} ${Ym[o]}`};P();var lx=1e3,cx=9,to=16,dx={markdown:"text/markdown;charset=utf-8",code:"text/plain;charset=utf-8"},rg=(t,r)=>{let o=URL.createObjectURL(t),n=document.createElement("a");n.href=o,n.download=r,n.click(),window.setTimeout(()=>URL.revokeObjectURL(o),1e3);},Yl=({tone:t,icon:r,title:o,text:n,action:a})=>c("div",{className:"orb-omph-pv-notice","data-tone":t,role:t==="error"?"alert":void 0,children:[e("span",{className:"orb-omph-pv-notice-icon","aria-hidden":"true",children:r}),e("div",{className:"orb-omph-pv-notice-title",children:o}),n&&e("p",{className:"orb-omph-pv-notice-text",children:n}),a]}),og=({state:t,placement:r,expanded:o,canExpand:n,labels:a,gripProps:i,paneRef:s,onClose:l,onRetry:d,onToggleExpand:u,onOpenExternally:p})=>{let[f,b]=er.useState(true),[m,v]=er.useState(false),{open:y,ref:g,phase:x,data:h}=t,C=h?.body;er.useEffect(()=>{if(!m)return;let _=window.setTimeout(()=>v(false),lx);return ()=>window.clearTimeout(_)},[m]),er.useEffect(()=>{y&&s.current?.focus({preventScroll:true});},[y,s,g?.path]);let k=h?.absolutePath??g?.path??"",w=C&&(C.kind==="markdown"||C.kind==="code")?C.text:k,T=w===k?a.previewCopyPath:a.previewCopyContent,I=C?.kind==="code"&&g?Xl(g.path,C.language):null,S=!!(g&&C&&(C.kind==="markdown"||C.kind==="code"||C.kind==="image"||C.kind==="embed")),A=()=>{if(!C||!g)return;let _=Ss(g.path);if(C.kind==="markdown"||C.kind==="code"){rg(new Blob([C.text],{type:dx[C.kind]}),_);return}(C.kind==="image"||C.kind==="embed")&&fetch(C.url).then(B=>{if(!B.ok)throw new Error(`HTTP ${B.status}`);return B.blob()}).then(B=>rg(B,_)).catch(()=>window.open(C.url,"_blank","noopener"));},R=[];I&&R.push(I.label),C?.kind==="markdown"&&R.push("Markdown"),C?.kind==="image"&&g&&R.push(ql(g.path).toUpperCase()),h?.size!==void 0&&R.push(Jm(h.size)),C?.kind==="code"&&g?.startLine!==void 0&&R.push(a.previewLines(g.startLine,g.endLine??g.startLine));let M=_=>{_.key==="Escape"&&(_.stopPropagation(),l(true));},N=e("button",{type:"button",className:"orb-omph-pv-action",onClick:d,children:a.previewRetry}),E=()=>{if(!g)return null;if(x==="loading")return e("div",{className:"orb-omph-pv-skel",role:"status","aria-label":a.previewLoading,children:Array.from({length:cx},(_,B)=>e("span",{},B))});if(x==="error"||!C)return e(Yl,{tone:"error",icon:e(Ta,{size:to}),title:a.previewFailed,text:k,action:N});switch(C.kind){case "missing":return e(Yl,{tone:"neutral",icon:e(Da,{size:to}),title:a.previewMissing,text:C.message??k});case "unsupported":return e(Yl,{tone:"neutral",icon:e(Da,{size:to}),title:a.previewUnsupported,text:C.message??k,action:p&&e("button",{type:"button",className:"orb-omph-pv-action",onClick:()=>p(g),children:a.previewOpenExternal})});case "markdown":return e(qm,{text:C.text},g.path);case "code":return e(Km,{text:C.text,language:Xl(g.path,C.language).prism,startLine:g.startLine,endLine:g.endLine,wrap:f,labels:a},g.path);case "image":return e(Xm,{url:C.url,alt:C.alt,labels:a},C.url);case "embed":return e("iframe",{src:C.url,title:C.caption??"Embedded document",className:"orb-omph-pv-embed"},C.url);default:return null}},O=r==="overlay",F=C?.kind==="image"?Bc:Da;return c("aside",{ref:s,className:"orb-omph-preview","data-open":y||void 0,"data-placement":r,role:O?"dialog":"complementary","aria-label":a.previewTitle,"aria-hidden":!y||void 0,tabIndex:-1,onKeyDown:M,children:[!O&&y&&e("div",{className:"orb-omph-pv-grip","aria-label":a.previewResize,...i}),c("div",{className:"orb-omph-pv",children:[c("header",{className:"orb-omph-pv-head",children:[O&&e("button",{type:"button",className:"orb-omph-icon-button","aria-label":a.previewBack,onClick:()=>l(true),children:e(Ma,{size:to})}),e("span",{className:"orb-omph-pv-glyph","aria-hidden":"true",children:e(F,{size:to})}),c("div",{className:"orb-omph-pv-titles",children:[e("div",{className:"orb-omph-pv-name",title:k,children:g?Ss(g.path):""}),e("div",{className:"orb-omph-pv-path",title:k,children:e("bdi",{children:jm(k)})})]}),c("div",{className:"orb-omph-pv-actions",children:[C?.kind==="code"&&e("button",{type:"button",className:"orb-omph-text-button","aria-pressed":f,onClick:()=>b(_=>!_),children:a.previewWrap}),S&&e("button",{type:"button",className:"orb-omph-icon-button","aria-label":a.previewDownload,title:a.previewDownload,onClick:A,children:e(Nc,{size:to})}),g&&e("button",{type:"button",className:"orb-omph-icon-button","aria-label":m?a.copied:T,title:m?a.copied:T,onClick:()=>{navigator.clipboard.writeText(w).then(()=>v(true));},children:m?e(qr,{size:to}):e(vo,{size:to})}),n&&e("button",{type:"button",className:"orb-omph-icon-button","aria-pressed":o,"aria-label":o?a.previewCollapse:a.previewExpand,title:o?a.previewCollapse:a.previewExpand,onClick:u,children:e(Ec,{size:to})}),!O&&e("button",{type:"button",className:"orb-omph-icon-button","aria-label":a.previewClose,onClick:()=>l(true),children:e(jt,{size:to})})]})]}),e("div",{className:"orb-omph-pv-meta",children:R.join(" \xB7 ")}),e("div",{className:"orb-omph-pv-body","data-kind":x==="ready"?C?.kind:void 0,children:E()})]})]})};P();var ux=1e3,ng=50,mx=1e3,gx=t=>t==="tool"?tn:t==="command"?Vn:_c,ig=t=>!!t.streaming||t.status==="running"||t.status==="pending",fx=(t,r)=>r==="expanded"?true:ig(t),bx=t=>t!==void 0&&(t.inputTokens!==void 0||t.outputTokens!==void 0||t.durationMs!==void 0),hx=(t,r)=>`${Math.max(1,Math.round(t/mx))}${r.secondUnit}`,vx=({content:t})=>{let r=er.useRef(null),[o,n]=er.useState(false);return er.useEffect(()=>{let a=r.current;if(!a)return;let i=()=>n(a.scrollHeight>a.clientHeight+1);i();let s=new ResizeObserver(i);return s.observe(a),()=>s.disconnect()},[t]),e("div",{ref:r,className:"orb-omph-process-body","data-overflow":o||void 0,children:t})},yx=({turn:t,labels:r})=>{let[o,n]=er.useState(false),[a,i]=er.useState(false),s=t.assistant?.content??"",l=t.usage;return er.useEffect(()=>{if(!o)return;let d=window.setTimeout(()=>n(false),ux);return ()=>window.clearTimeout(d)},[o]),c("div",{className:"orb-omph-turn-actions",role:"group","aria-label":r.turnActions,children:[e("span",{className:"orb-omph-actions-time",children:t.assistant?.timestamp.toLocaleTimeString()}),bx(l)&&c(jsxRuntime.Fragment,{children:[e("span",{className:"orb-omph-actions-divider","aria-hidden":"true"}),e("button",{type:"button",className:"orb-omph-text-button","aria-expanded":a,onClick:()=>i(d=>!d),children:r.usage})]}),e("button",{type:"button",className:"orb-omph-icon-button orb-omph-actions-end","aria-label":o?r.copied:r.copy,onClick:()=>{navigator.clipboard.writeText(s).then(()=>n(true));},children:o?e(qr,{size:14}):e(vo,{size:14})}),a&&l&&c("div",{className:"orb-omph-usage",children:[l.inputTokens!==void 0&&c("span",{children:[r.inputTokens," ",l.inputTokens.toLocaleString()]}),l.outputTokens!==void 0&&c("span",{children:[r.outputTokens," ",l.outputTokens.toLocaleString()]}),l.durationMs!==void 0&&c("span",{children:[r.duration," ",hx(l.durationMs,r)]})]})]})},Cx=({item:t,display:r,open:o,onToggle:n})=>{let a=gx(t.kind),i=ig(t),s=r!=="compact"&&!!t.summary,l=o&&!!t.content;return c("div",{className:"orb-omph-process","data-status":t.status,"data-open":o||void 0,children:[c("button",{type:"button",className:"orb-omph-process-toggle","aria-expanded":o,onClick:n,children:[e(Fr,{size:12,className:"orb-omph-process-chevron"}),e(a,{size:14}),e("span",{className:i?"orb-omph-shimmer":void 0,children:t.title}),s&&e("span",{className:"orb-omph-process-summary",children:t.summary})]}),l&&t.content&&e(vx,{content:t.content}),o&&t.streaming&&e("span",{className:"orb-omph-caret","aria-hidden":"true"})]})},Zl=t=>{let r=t.user?.content||t.assistant?.content||t.id,o=r.split(`
202
+ `).find(n=>n.trim())??r;return o.length>ng?`${o.slice(0,ng)}\u2026`:o},xx=0,sg=({turns:t,labels:r,processDisplay:o,cardHooks:n,resolveFileLink:a,onOpenFile:i})=>{let[s,l]=er.useState({}),d=u=>{if(!i||u.defaultPrevented||u.button!==xx||u.metaKey||u.ctrlKey||u.shiftKey||u.altKey)return;let p=u.target.closest("a[href]");if(!p)return;let f=a(p.getAttribute("href")??"");f&&(u.preventDefault(),i(f,p));};return e(jsxRuntime.Fragment,{children:t.map((u,p)=>{let f=!!(u.assistant&&!u.assistant.streaming),m=p===t.length-1&&f?"always":"hover";return c("article",{className:"orb-omph-turn","data-omph-turn":u.id,"data-actions-reveal":m,children:[u.user&&c("div",{className:"orb-omph-user",children:[e("div",{className:"orb-omph-user-bubble",children:u.user.content}),e("div",{className:"orb-omph-clock",children:u.user.timestamp.toLocaleTimeString()})]}),u.process&&u.process.length>0&&e("div",{className:"orb-omph-process-list",children:u.process.map(v=>{let y=v.id in s?s[v.id]:fx(v,o);return e(Cx,{item:v,display:o,open:y,onToggle:()=>l(g=>({...g,[v.id]:!y}))},v.id)})}),u.assistant&&c("div",{className:"orb-omph-assistant","data-file-links":i?"true":void 0,onClick:d,children:[e(vs,{content:u.assistant.content,messageId:u.assistant.id,cardHooks:n}),u.assistant.streaming&&e("span",{className:"orb-omph-caret","aria-hidden":"true"})]}),u.failure&&e("div",{className:"orb-omph-failure","data-severity":u.failure.severity,children:u.failure.content}),f&&e(yx,{turn:u,labels:r})]},u.id)})})};var Sx={idle:"Idle",pending:"Pending",running:"Working",success:"Success",error:"Error",working:"Working",workingFor:t=>`Working for ${t}`,loadOlder:"Load earlier",loadingOlder:"Loading earlier\u2026",toBottom:"Back to bottom",copy:"Copy",copied:"Copied",turnActions:"Reply actions",usage:"Usage",inputTokens:"Input",outputTokens:"Output",duration:"Duration",send:"Send",stop:"Stop",turnRail:"Turns",secondUnit:"s",minuteUnit:"m",previewTitle:"File preview",previewClose:"Close preview",previewBack:"Back to conversation",previewExpand:"Expand preview",previewCollapse:"Restore preview size",previewCopyContent:"Copy content",previewCopyPath:"Copy path",previewDownload:"Download",previewOpenExternal:"Open externally",previewWrap:"Wrap",previewLoading:"Loading file",previewMissing:"File not found",previewFailed:"Could not load this file",previewUnsupported:"No preview for this file type",previewRetry:"Try again",previewResize:"Resize preview",previewLines:(t,r)=>t===r?`Line ${t}`:`Lines ${t}\u2013${r}`,previewTruncated:(t,r)=>`Showing the first ${t.toLocaleString()} of ${r.toLocaleString()} lines`,imageFailed:"The image could not be displayed",zoomIn:"Zoom in",zoomOut:"Zoom out",zoomFit:"Fit to width",newConversation:"New conversation",conversationList:"Conversation list",conversations:"Conversations",noConversations:"No conversations yet"},cg=t=>({...Sx,...t}),wx={waiting:"Waiting for approval",choose:"Choose an action",details:"Approval details",choices:"Actions",reject:"Reject",allowOnce:"Allow once",confirm:"Continue",other:"Other",otherPlaceholder:"Describe the action to take",escalation:t=>`Tool ${t} requests privileged execution`},dg=t=>({...wx,...t}),kx=1e3,lg=60,Px=1e3,pg=(t,r)=>{let o=Math.max(1,Math.round(Math.max(t,Px)/kx)),n=Math.floor(o/lg),a=o%lg;return n<=0?`${o}${r.secondUnit}`:`${n}${r.minuteUnit} ${a}${r.secondUnit}`};var Mx={open:false,ref:null,phase:"loading",data:null},ug=t=>{let[r,o]=er.useState(Mx),n=er.useRef(r);n.current=r;let a=er.useRef(t);a.current=t;let i=er.useRef(null),s=er.useRef(0),l=er.useRef(null),d=er.useCallback(b=>{let m=a.current;if(!m)return;i.current?.abort();let v=new AbortController;i.current=v,s.current+=1;let y=s.current;o({open:true,ref:b,phase:"loading",data:null}),m(b,v.signal).then(g=>{y===s.current&&o(x=>({...x,phase:"ready",data:g}));},()=>{y!==s.current||v.signal.aborted||o(g=>({...g,phase:"error",data:null}));});},[]),u=er.useCallback((b,m)=>{l.current=m??null;let v=n.current;if(v.ref?.path===b.path&&v.phase==="ready"){o({...v,open:true,ref:b});return}d(b);},[d]),p=er.useCallback((b=false)=>{s.current+=1,i.current?.abort(),o(v=>({...v,open:false}));let m=l.current;b&&m?.isConnected&&m.focus({preventScroll:true});},[]),f=er.useCallback(()=>{let{ref:b}=n.current;b&&d(b);},[d]);return er.useEffect(()=>()=>{i.current?.abort();},[]),{state:r,open:u,close:p,reload:f}};var Ql="--orb-omph-pv-w",Jl="--orb-omph-pv-pref",Nx=880,Ax=560,gg=400,Go=320,Ex=.45,Lx=.7,fg=24,jl=(t,r,o)=>Math.min(Math.max(t,r),Math.max(r,o)),bg=({open:t,layout:r})=>{let o=er.useRef(null),n=er.useRef(null),[a,i]=er.useState(0),[s,l]=er.useState(null),[d,u]=er.useState(false),[p,f]=er.useState(false);er.useLayoutEffect(()=>{let T=o.current;if(!T)return;let I=()=>i(T.getBoundingClientRect().width);I();let S=new ResizeObserver(I);return S.observe(T),()=>S.disconnect()},[]),er.useEffect(()=>{t||u(false);},[t]);let b=r==="overlay"?false:r==="split"?a>=gg+Go:a>=Nx,m=b&&!d?"split":"overlay",v=Math.max(Go,Math.min(a*Lx,a-gg)),y=jl(s??a*Ex,Go,v),g=a>0&&a<Ax,x=er.useCallback(T=>{let I=o.current;I&&(I.style.setProperty(Jl,`${T}px`),I.dataset.placement==="split"&&I.dataset.open==="true"&&I.style.setProperty(Ql,`${T}px`));},[]),h=er.useCallback(T=>{T.button===0&&(T.preventDefault(),T.currentTarget.setPointerCapture(T.pointerId),n.current={pointerId:T.pointerId,startX:T.clientX,startWidth:y,latest:y},f(true));},[y]),C=er.useCallback(T=>{let I=n.current;!I||I.pointerId!==T.pointerId||(I.latest=jl(I.startWidth+(I.startX-T.clientX),Go,v),x(I.latest));},[v,x]),k=er.useCallback(T=>{let I=n.current;!I||I.pointerId!==T.pointerId||(n.current=null,T.currentTarget.hasPointerCapture(T.pointerId)&&T.currentTarget.releasePointerCapture(T.pointerId),l(I.latest),f(false));},[]),w=er.useCallback(T=>{let I={ArrowLeft:y+fg,ArrowRight:y-fg,Home:Go,End:v};T.key in I&&(T.preventDefault(),l(jl(I[T.key],Go,v)));},[v,y]);return {mainRef:o,placement:m,width:y,compact:g,dragging:p,expanded:d,canExpand:b,toggleExpanded:()=>u(T=>!T),gripProps:{role:"separator","aria-orientation":"vertical","aria-valuemin":Go,"aria-valuemax":Math.round(v),"aria-valuenow":Math.round(y),tabIndex:0,onPointerDown:h,onPointerMove:C,onPointerUp:k,onPointerCancel:k,onKeyDown:w}}};var Ts=48,Fx=900,vg=()=>typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,yg=({turns:t,contentVersion:r,hasOlder:o=false,loadingOlder:n=false,onLoadOlder:a})=>{let i=er.useRef(null),s=er.useRef(null),l=er.useRef(true),d=er.useRef({height:0,top:0}),u=er.useRef(void 0),p=er.useRef(false),[f,b]=er.useState(true),[m,v]=er.useState(false),[y,g]=er.useState(t[0]?.id),x=er.useCallback(()=>{let T=i.current;T&&(d.current={height:T.scrollHeight,top:T.scrollTop});},[]),h=er.useCallback(()=>{let T=i.current;if(!T)return;let I=T.getBoundingClientRect().top,S=T.querySelector("[data-omph-turn]")?.dataset.omphTurn;T.querySelectorAll("[data-omph-turn]").forEach(A=>{A.getBoundingClientRect().top-I<=Ts&&(S=A.dataset.omphTurn);}),g(S);},[]);er.useEffect(()=>{let T=i.current,I=s.current;if(!T||!I)return;let S=()=>{v(T.clientWidth>Fx),l.current&&(T.scrollTop=T.scrollHeight),x();};S();let A=new ResizeObserver(S);return A.observe(T),A.observe(I),()=>A.disconnect()},[x]),er.useLayoutEffect(()=>{let T=i.current;if(!T)return;let I=t[0]?.id,S=u.current,A=S!==void 0&&t.some(N=>N.id===S),R=A&&I!==void 0&&I!==S,M=S!==void 0&&!A;if(u.current=I,M){l.current=true,b(true),T.scrollTop=T.scrollHeight,x(),h();return}if(R){l.current=false,b(false);let N=T.scrollHeight-d.current.height;T.scrollTop=d.current.top+Math.max(0,N),x(),h();return}l.current&&(T.scrollTop=T.scrollHeight),x(),h();},[r,x,t,h]),er.useEffect(()=>{n||(p.current=false);},[n]);let C=er.useCallback(()=>{let T=i.current;if(!T)return;let S=T.scrollHeight-T.scrollTop-T.clientHeight<=Ts;S!==l.current&&(l.current=S,b(S)),x(),h();let A=T.scrollHeight-T.clientHeight>Ts,R=T.scrollTop<=Ts;!A||!R||S||!o||n||!a||p.current||(p.current=true,a());},[o,n,a,x,h]),k=er.useCallback(()=>{let T=i.current;T&&(l.current=true,b(true),T.scrollTo({top:T.scrollHeight,behavior:vg()?"auto":"smooth"}));},[]),w=er.useCallback(T=>{let S=i.current?.querySelector(`[data-omph-turn="${CSS.escape(T)}"]`);S&&(l.current=false,b(false),S.scrollIntoView({block:"start",behavior:vg()?"auto":"smooth"}));},[]);return {scrollerRef:i,contentRef:s,following:f,railVisible:m,activeTurnId:y,onScroll:C,returnToBottom:k,scrollToTurn:w}};P();var Hx=1e3,zx=(t,r)=>r[t],Vx=t=>t.map(r=>[r.id,r.user?.content.length??0,r.assistant?.content.length??0,r.assistant?.streaming?"1":"0",r.failure?.id??"",(r.process??[]).map(o=>`${o.id}:${o.status}:${o.content?.length??0}`).join(",")].join(":")).join("|"),Wx=({startedAt:t,labels:r})=>{let[o,n]=er.useState(()=>Date.now());er.useEffect(()=>{n(Date.now());let i=window.setInterval(()=>n(Date.now()),Hx);return ()=>window.clearInterval(i)},[t]);let a=t===void 0?r.working:r.workingFor(pg(Math.max(0,o-t),r));return c("div",{className:"orb-omph-running","data-omph-running":"true",children:[e("span",{className:"orb-visually-hidden",role:"status","aria-live":"polite",children:r.working}),e("span",{className:"orb-omph-running-rule","aria-hidden":"true"}),c("span",{className:"orb-omph-running-body",children:[e("span",{className:"orb-omph-spinner","aria-hidden":"true"}),e("span",{className:"orb-omph-shimmer",children:a})]})]})},Pz=({turns:t,title:r="OMPH Agent",description:o,headerActions:n,agentStatus:a,isResponding:i=false,labels:s,processDisplay:l="standard",showInput:d=false,placeholder:u,className:p,cardHooks:f,hasOlder:b=false,loadingOlder:m=false,onLoadOlder:v,onSend:y,onStop:g,onHeaderPointerDown:x,conversations:h=[],activeConversationId:C,onNewConversation:k,onSelectConversation:w,loadFilePreview:T,resolveFileLink:I=Kl,filePreviewLayout:S="auto",onOpenFileExternally:A})=>{let R=cg(s),M=a??(i?"running":"idle"),N=M==="running"||M==="pending",E=[zx(M,R),o].filter(Boolean).join(" \xB7 "),O=er.useMemo(()=>Vx(t),[t]),F=yg({turns:t,contentVersion:O,hasOlder:b,loadingOlder:m,onLoadOlder:v}),[_,B]=er.useState(""),Y=_.trim(),W=i&&Y.length===0,j=[...t].reverse().find(le=>!!le.assistant?.streaming||le.process?.some(Ee=>Ee.streaming||Ee.status==="running"||Ee.status==="pending")),V=N?j?.startedAt:void 0,z=!!T,K=ug(T),q=bg({open:K.state.open,layout:S}),fe=er.useRef(null),se=er.useRef(null),ue=z&&K.state.open&&q.placement==="overlay",Se=q.placement==="split"&&K.state.open,$e={[Jl]:`${q.width}px`,[Ql]:Se?`${q.width}px`:"0px"};er.useEffect(()=>{se.current?.toggleAttribute("inert",ue);},[ue]);let ke=async()=>{if(!Y||!y)return;let le=Y;B("");try{await y(le);}catch{B(Ee=>Ee.trim().length===0?le:Ee);}};return c("div",{className:ut("orb-omph-panel",p),"data-omph-panel":"","data-status":M,"data-compact":q.compact||void 0,children:[c("div",{className:ut("orb-omph-header",x&&"cursor-grab active:cursor-grabbing"),onPointerDown:x,children:[e("span",{className:"orb-omph-avatar","aria-hidden":"true",children:"AI"}),c("div",{className:"min-w-0 flex-1",children:[e("div",{className:"orb-omph-title",children:r}),c("div",{className:"orb-omph-subtitle",children:[e("span",{className:"orb-omph-dot","data-active":N||void 0}),e("span",{className:"truncate",children:E||R.idle})]})]}),(k||w||n)&&c("div",{className:"orb-omph-header-actions",onPointerDown:le=>le.stopPropagation(),children:[e(Gm,{conversations:h,activeConversationId:C,labels:R,onNewConversation:k,onSelectConversation:w}),n]})]}),c("div",{ref:q.mainRef,className:"orb-omph-main","data-placement":q.placement,"data-open":String(K.state.open),"data-dragging":q.dragging||void 0,style:$e,children:[c("div",{ref:se,className:"orb-omph-center",children:[c("div",{className:"orb-omph-stage","data-rail":F.railVisible||void 0,children:[e("div",{ref:F.scrollerRef,className:"orb-omph-scroll",onScroll:F.onScroll,children:c("div",{ref:F.contentRef,className:"orb-omph-column",children:[b&&v&&e("button",{type:"button",className:"orb-omph-older",disabled:m,onClick:v,children:m?R.loadingOlder:R.loadOlder}),e(sg,{turns:t,labels:R,processDisplay:l,cardHooks:f,resolveFileLink:I,onOpenFile:z?K.open:void 0}),N&&e(Wx,{startedAt:V,labels:R})]})}),F.railVisible&&t.length>0&&e("nav",{className:"orb-omph-rail","aria-label":R.turnRail,children:t.map(le=>e("button",{type:"button",className:"orb-omph-rail-mark","data-active":F.activeTurnId===le.id||void 0,"aria-label":Zl(le),title:Zl(le),onClick:()=>F.scrollToTurn(le.id)},le.id))}),!F.following&&e("button",{type:"button",className:"orb-omph-to-bottom","aria-label":R.toBottom,onClick:F.returnToBottom,children:e(Fr,{size:16})})]}),d&&c("form",{className:"orb-omph-composer",onSubmit:le=>{le.preventDefault(),W?g?.():ke();},children:[e("textarea",{className:"orb-omph-input",value:_,placeholder:u,rows:1,onChange:le=>B(le.target.value),onKeyDown:le=>{le.key!=="Enter"||le.shiftKey||le.nativeEvent.isComposing||(le.preventDefault(),W?g?.():ke());}}),e("button",{type:"submit",className:W?"orb-omph-stop":"orb-omph-send","aria-label":W?R.stop:R.send,disabled:!W&&Y.length===0,children:W?e(Mc,{size:16}):e(Ic,{size:16})})]})]}),z&&e(og,{state:K.state,placement:q.placement,expanded:q.expanded,canExpand:q.canExpand,labels:R,gripProps:q.gripProps,paneRef:fe,onClose:K.close,onRetry:K.reload,onToggleExpand:q.toggleExpanded,onOpenExternally:A})]})]})};P();var bo="other",$x=t=>t instanceof HTMLElement&&t.closest('input, textarea, select, [contenteditable="true"], [contenteditable=""]')!==null,_x=({request:t,onDecide:r,labels:o})=>{let n=dg(o),a=er.useRef(null),i=er.useRef(null),s=er.useRef(false),l=er.useRef(false),[d,u]=er.useState(false),[p,f]=er.useState(null),[b,m]=er.useState(""),v=t.choices??[],y=t.allowOther??v.length>0,g=v.length>0||y,x=t.reason?.trim()||n.escalation(t.toolName),h=t.detail?.trim(),C=p===bo&&b.trim().length>0,k=!g||p!==null&&p!==bo||C;er.useEffect(()=>{u(false),f(null),m(""),a.current?.focus();},[t.id]),er.useEffect(()=>{p===bo&&i.current?.focus();},[p]);let w=S=>{d||(u(true),r(S,t));},T=()=>{if(k){if(!g){w({kind:"allowed-once"});return}if(p===bo){let S=b.trim();if(!S)return;w({kind:"other",text:S});return}p&&w({kind:"choice",choiceId:p});}},I=S=>{if(!(d||$x(S.target))&&!(S.key!=="Enter"&&S.key!=="Escape")&&!(S.key==="Enter"&&S.target instanceof HTMLElement&&S.target.closest('button, a[href], [role="button"]'))&&!(S.ctrlKey||S.metaKey||S.altKey||S.shiftKey)&&(S.preventDefault(),S.stopPropagation(),!(S.repeat||s.current||l.current||S.nativeEvent.isComposing))){if(S.key==="Escape"){w({kind:"rejected"});return}T();}};return e("div",{className:"orb-omph-approval","data-omph-approval":t.id,"aria-busy":d,onKeyDown:I,onKeyUpCapture:()=>{l.current=false;},onCompositionStartCapture:()=>{s.current=true;},onCompositionEndCapture:()=>{s.current=false,l.current=true;},children:c("div",{className:"orb-omph-approval-card",children:[c("div",{className:"orb-omph-approval-strip",children:[e("span",{className:"orb-omph-approval-dot","aria-hidden":"true"}),g?n.choose:n.waiting]}),c("div",{ref:a,className:"orb-omph-approval-body",tabIndex:0,role:"group","aria-label":n.details,children:[e("div",{className:"orb-omph-approval-headline",children:x}),h&&e("div",{className:"orb-omph-approval-detail",children:h}),g&&c("fieldset",{className:"orb-omph-approval-choices",disabled:d,children:[e("legend",{className:"orb-visually-hidden",children:n.choices}),v.map(S=>{let A=p===S.id;return c("label",{className:"orb-omph-approval-choice","data-selected":A,children:[e("input",{type:"radio",name:`omph-approval-${t.id}`,value:S.id,checked:A,onChange:()=>f(S.id)}),c("span",{className:"orb-omph-approval-choice-copy",children:[e("span",{children:S.label}),S.description&&e("span",{className:"orb-omph-approval-choice-description",children:S.description})]})]},S.id)}),y&&c("label",{className:"orb-omph-approval-choice","data-selected":p===bo,children:[e("input",{type:"radio",name:`omph-approval-${t.id}`,value:bo,checked:p===bo,onChange:()=>f(bo)}),e("span",{className:"orb-omph-approval-choice-copy",children:e("span",{children:n.other})})]}),y&&p===bo&&e("textarea",{ref:i,className:"orb-omph-approval-other",value:b,placeholder:n.otherPlaceholder,rows:3,"aria-label":n.other,onChange:S=>m(S.target.value)})]})]}),c("div",{className:"orb-omph-approval-actions",children:[e("button",{type:"button",className:"orb-btn orb-btn-neutral orb-omph-approval-reject",disabled:d,onClick:()=>w({kind:"rejected"}),children:n.reject}),e("button",{type:"button",className:"orb-btn orb-btn-primary",disabled:d||!k,onClick:T,children:g?n.confirm:n.allowOnce})]})]})})};P();var Tg=520,Kx=88,qx=88,Xx=24,Ms=640,Ig=(t,r,o)=>Math.min(Math.max(t,r),Math.max(r,o)),rc=t=>typeof t=="number"?`${t}px`:t,Yx=t=>t instanceof HTMLElement?!!t.closest('button,input,a,textarea,select,[role="button"],[contenteditable="true"]'):false,Fz=({anchor:t,defaultAnchor:r="right",onAnchorChange:o,width:n=Tg,top:a=Kx,bottom:i=qx,inset:s=Xx,zIndex:l=1300,shellClassName:d,shellStyle:u,className:p,onHeaderPointerDown:f,...b})=>{let m=er.useRef(null),v=er.useRef(null),[y,g]=er.useState(r),[x,h]=er.useState(0),[C,k]=er.useState(typeof n=="number"?n:Tg),[w,T]=er.useState(0),[I,S]=er.useState(false),A=t??y;er.useEffect(()=>{let B=()=>h(window.innerWidth);return B(),window.addEventListener("resize",B),()=>window.removeEventListener("resize",B)},[]),er.useLayoutEffect(()=>{let B=()=>{let W=m.current?.getBoundingClientRect();W?.width?k(W.width):typeof n=="number"&&k(n);};if(B(),!m.current||typeof ResizeObserver>"u")return;let Y=new ResizeObserver(B);return Y.observe(m.current),()=>Y.disconnect()},[n]);let R=er.useCallback(B=>{if(!x)return s;let Y=x<Ms?12:s,W=Math.max(Y,x-C-Y);return x<Ms||B==="left"?Y:B==="center"?Ig((x-C)/2,Y,W):W},[s,C,x]),M=er.useCallback(B=>["left","center","right"].reduce((W,j)=>{let V=Math.abs(B-R(W));return Math.abs(B-R(j))<V?j:W},"right"),[R]),N=er.useCallback(B=>{t===void 0&&g(B),o?.(B);},[t,o]);er.useEffect(()=>{I||T(R(A));},[R,I,A]);let E=er.useCallback(B=>{f?.(B),!(B.defaultPrevented||Yx(B.target))&&(B.preventDefault(),B.currentTarget.setPointerCapture(B.pointerId),v.current={pointerId:B.pointerId,startClientX:B.clientX,startX:w,currentX:w,captureElement:B.currentTarget},S(true));},[f,w]),O=er.useCallback(B=>{let Y=v.current;if(!Y||Y.pointerId!==B.pointerId)return;let W=x<Ms?12:s,j=Math.max(W,x-C-W),V=Ig(Y.startX+B.clientX-Y.startClientX,W,j);Y.currentX=V,T(V);},[s,C,x]),F=er.useCallback(B=>{let Y=v.current;if(!Y||Y.pointerId!==B.pointerId)return;try{Y.captureElement.releasePointerCapture(B.pointerId);}catch{}let W=M(Y.currentX);v.current=null,S(false),N(W),T(R(W));},[R,N,M]),_=er.useMemo(()=>({position:"fixed",top:rc(a),bottom:rc(i),left:w,width:rc(n),maxWidth:`calc(100vw - ${x<Ms?24:s*2}px)`,zIndex:l,pointerEvents:"auto",transition:I?"none":"left 180ms ease-out",touchAction:"none",...u}),[i,s,I,w,u,a,x,n,l]);return e("div",{ref:m,className:ut("orbcafe-floating-agent-panel min-w-0",d),"data-anchor":A,"data-dragging":I?"true":"false",style:_,onPointerMove:O,onPointerUp:F,onPointerCancel:F,children:e($m,{...b,className:p,onHeaderPointerDown:E})})};P();var Qx={"top-left":"bottom-right","top-right":"bottom-left","bottom-left":"top-right","bottom-right":"top-left"},Gz=({messages:t,onSend:r,onRegenerate:o,isResponding:n=false,className:a,placeholder:i,title:s="Copilot",corner:l="bottom-right",onCollapse:d,onHeaderPointerDown:u,onPlusClick:p,onMicClick:f,streamIntervalMs:b,streamChunkSize:m,onMessageStreamingComplete:v,cardHooks:y})=>{let[g,x]=er.useState(""),[h,C]=er.useState(false),k=er.useRef(null),w=Qx[l];er.useEffect(()=>{k.current?.scrollIntoView({behavior:"smooth"});},[t,n]);let T=er.useCallback(async()=>{let S=g.trim();!S||n||(x(""),await r(S));},[n,r,g]),I=er.useCallback(async S=>{S.key==="Enter"&&!h&&(S.preventDefault(),await T());},[T,h]);return c("div",{className:ut("relative flex h-full w-full min-h-[460px] min-w-[340px] flex-col overflow-hidden rounded-3xl border border-[var(--orb-border)] bg-[var(--orb-canvas)] shadow-none dark:bg-[var(--orb-surface-2)]",a),children:[d&&e("button",{onClick:d,className:ut("absolute z-20 flex h-10 w-10 items-center justify-center rounded-full transition-colors hover:bg-transparent dark:hover:bg-transparent",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:e("span",{className:ut("block h-4 w-4 border-[var(--orb-ai-accent)]",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]")})}),c("div",{className:"flex items-center justify-between border-b border-[var(--orb-border)] px-4 py-3",onPointerDown:u,children:[e("div",{className:"flex items-center",children:e("h3",{className:"text-base font-semibold tracking-tight text-[var(--orb-fg)]",children:s})}),e("div",{})]}),c("div",{className:"flex-1 overflow-y-auto px-3 py-3 space-y-5 scrollbar-thin scrollbar-thumb-[var(--orb-border)]",children:[t.map((S,A)=>{let R=S.type==="assistant"&&A===t.length-1,M=S.type==="assistant"?{isLatestAssistant:R,isResponding:n,onRegenerate:o?()=>o(S.id):void 0}:void 0;return e(ys,{message:S,assistantActions:M,onStreamingComplete:()=>v?.(S.id),streamIntervalMs:b,streamChunkSize:m,cardHooks:y},S.id)}),e("div",{ref:k})]}),e("div",{className:"border-t border-[var(--orb-border)] px-3 py-3",children:c("div",{className:"flex items-center gap-2 rounded-xl border border-[var(--orb-p300)] bg-[var(--orb-canvas)] px-2 py-1.5 dark:bg-[var(--orb-surface-2)]",children:[e("button",{className:"flex h-8 w-8 items-center justify-center rounded-full text-[var(--orb-muted)] transition-colors hover:bg-[var(--orb-surface)] hover:text-[var(--orb-fg)] dark:text-[var(--orb-muted)] dark:hover:bg-[var(--orb-surface-2)]",onClick:p,type:"button","aria-label":"Add",children:e(en,{className:"h-4 w-4"})}),e("input",{className:"h-7 flex-1 border-none bg-transparent text-sm text-[var(--orb-fg)] outline-none placeholder:text-[var(--orb-muted)] dark:text-[var(--orb-fg)] dark:placeholder:text-[var(--orb-muted)]",placeholder:i||"Ask Copilot...",value:g,onChange:S=>x(S.target.value),onCompositionStart:()=>C(true),onCompositionEnd:()=>C(false),onKeyDown:I,"aria-label":"Copilot input",spellCheck:false}),e("button",{className:"flex h-8 w-8 items-center justify-center rounded-full text-[var(--orb-muted)] transition-colors hover:bg-[var(--orb-surface)] hover:text-[var(--orb-fg)] dark:text-[var(--orb-muted)] dark:hover:bg-[var(--orb-surface-2)]",onClick:f,type:"button","aria-label":"Microphone",children:e(La,{className:"h-4 w-4"})})]})})]})};P();var Jx=["var(--orb-primary)","var(--orb-primary)","var(--orb-primary)"],e0=`
203
203
  .orbcafe-ai-browser-glow {
204
204
  position: fixed;
205
205
  inset: 0;
@@ -231,4 +231,4 @@ ${o}: ${(a??n)(g.secondaryValue??0)}`:""]})}),e("text",{x:g.x,y:Math.max(g.y-12,
231
231
  0%, 100% { opacity: 0.5; }
232
232
  50% { opacity: 1; }
233
233
  }
234
- `,Uz=({active:t=false,colors:r=Zx,zIndex:o=2147483e3})=>{let n={"--orbcafe-ai-glow-line":r[0],"--orbcafe-ai-glow-z-index":o};return c(jsxRuntime.Fragment,{children:[e("style",{children:jx}),e("div",{className:"orbcafe-ai-browser-glow","data-active":t?"true":"false",style:n,"aria-hidden":"true"})]})};var a5=({defaultMode:t="login",onLogin:r,onRegister:o,onForgotPassword:n}={})=>{let[a,i]=er.useState(t),[s,l]=er.useState(false),d=er.useCallback(async m=>{l(true);try{await m?.();}finally{l(false);}},[]),u=er.useCallback(m=>d(()=>r?.(m)),[r,d]),p=er.useCallback(m=>d(()=>o?.(m)),[o,d]),f=er.useCallback(m=>d(()=>n?.(m)),[n,d]),b=er.useMemo(()=>({mode:a,loading:s,onModeChange:i,onLogin:u,onRegister:p,onForgotPassword:f}),[f,u,p,s,a]);return {mode:a,loading:s,setMode:i,authPageProps:b}};P();var e0={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."},g5=({mode:t,defaultMode:r="login",onModeChange:o,onLogin:n,onRegister:a,onForgotPassword:i,loading:s=false,logo:l,copy:d,sx:u})=>{let p=t!==void 0,[f,b]=er.useState(r),m=t??f,v=er.useMemo(()=>({...e0,...d}),[d]),[y,g]=er.useState({username:"demo@orbcafe.local",password:"orbcafe-demo",remember:true}),[x,h]=er.useState({name:"",email:"",password:"",confirmPassword:"",acceptedTerms:false}),[C,k]=er.useState({email:""}),[w,T]=er.useState(""),I=E=>{p||b(E),T(""),o?.(E);},S=async E=>{E.preventDefault(),await n?.(y),T("Demo login accepted. No real authentication request was sent.");},A=async E=>{E.preventDefault(),await a?.(x),T("Demo registration saved locally for this screen.");},D=async E=>{E.preventDefault(),await i?.(C),T("Demo reset link request created. No email was sent.");},M=m==="login"?v.loginTitle:m==="register"?v.registerTitle:v.forgotTitle,N=m==="login"?v.loginSubtitle:m==="register"?v.registerSubtitle:v.forgotSubtitle;return c("div",{className:"orb-auth-frame orb-root",style:u,children:[c("div",{className:"orb-auth-brand",children:[e("span",{className:"orb-auth-dia",style:{width:230,height:230,right:-70,bottom:-60}}),e("span",{className:"orb-auth-dia orb-auth-dia-sm-hide",style:{width:140,height:140,right:120,bottom:80,borderColor:"rgba(255,255,255,.09)"}}),e("span",{className:"orb-auth-dia orb-auth-dia-sm-hide",style:{width:76,height:76,right:60,bottom:170,background:"color-mix(in oklch, var(--orb-primary) 35%, transparent)",borderColor:"rgba(255,255,255,.2)"}}),l?e("span",{style:{alignSelf:"flex-start",position:"relative"},children:l}):e("span",{className:"orb-logo-slot",children:"Host logo"}),c("div",{className:"orb-auth-claim",children:[e("div",{className:"orb-auth-rule"}),e("h2",{children:v.headline}),e("p",{children:v.subheadline})]}),e("div",{className:"orb-auth-meta",children:v.brandMeta})]}),e("div",{className:"orb-auth-form",children:c("div",{className:"orb-auth-card",children:[e("span",{className:"orb-overline",style:{letterSpacing:"0.12em"},children:v.productName}),e("h1",{className:"orb-h2",style:{margin:0},children:M}),e("p",{className:"orb-body-dense",style:{color:"var(--orb-muted)",margin:"-10px 0 0"},children:N}),w&&e(on,{severity:"success",children:w}),m==="login"&&c("form",{onSubmit:S,style:{display:"flex",flexDirection:"column",gap:16},children:[e(ze,{label:"Email",type:"email",autoComplete:"username",value:y.username,onChange:E=>g(O=>({...O,username:E.target.value})),startAdornment:e(zs,{size:15,strokeWidth:1.8})}),e(ze,{label:"Password",type:"password",autoComplete:"current-password",value:y.password,onChange:E=>g(O=>({...O,password:E.target.value})),startAdornment:e(Ea,{size:15,strokeWidth:1.8})}),c("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12},children:[e(It,{label:"Remember me",checked:y.remember,onChange:E=>g(O=>({...O,remember:E.target.checked}))}),e("button",{type:"button",className:"orb-link",onClick:()=>I("forgot"),children:"Forgot password?"})]}),e(we,{type:"submit",size:"large",block:true,loading:s,children:s?"Signing in\u2026":"Sign in"}),c("p",{className:"orb-meta",style:{textAlign:"center",margin:0},children:["New user?"," ",e("button",{type:"button",className:"orb-link",onClick:()=>I("register"),children:"Register"})]})]}),m==="register"&&c("form",{onSubmit:A,style:{display:"flex",flexDirection:"column",gap:16},children:[e(ze,{label:"Full name",value:x.name,onChange:E=>h(O=>({...O,name:E.target.value})),startAdornment:e(zs,{size:15,strokeWidth:1.8})}),e(ze,{label:"Work email",type:"email",autoComplete:"username",value:x.email,onChange:E=>h(O=>({...O,email:E.target.value})),startAdornment:e(Hs,{size:15,strokeWidth:1.8})}),e(ze,{label:"Password",type:"password",autoComplete:"new-password",value:x.password,onChange:E=>h(O=>({...O,password:E.target.value})),startAdornment:e(Ea,{size:15,strokeWidth:1.8})}),e(ze,{label:"Confirm password",type:"password",autoComplete:"new-password",value:x.confirmPassword,onChange:E=>h(O=>({...O,confirmPassword:E.target.value}))}),e(It,{label:"I accept the demo workspace terms",checked:x.acceptedTerms,onChange:E=>h(O=>({...O,acceptedTerms:E.target.checked}))}),e(we,{type:"submit",size:"large",block:true,loading:s,children:"Create demo account"}),c("p",{className:"orb-meta",style:{textAlign:"center",margin:0},children:["Already have an account?"," ",e("button",{type:"button",className:"orb-link",onClick:()=>I("login"),children:"Sign in"})]})]}),m==="forgot"&&c("form",{onSubmit:D,style:{display:"flex",flexDirection:"column",gap:16},children:[e(ze,{label:"Work email",type:"email",autoComplete:"username",value:C.email,onChange:E=>k({email:E.target.value}),startAdornment:e(Hs,{size:15,strokeWidth:1.8})}),e(we,{type:"submit",size:"large",block:true,loading:s,children:"Send reset request"}),c("p",{className:"orb-meta",style:{textAlign:"center",margin:0},children:["Remember your password?"," ",e("button",{type:"button",className:"orb-link",onClick:()=>I("login"),children:"Back to sign in"})]})]}),c("div",{style:{display:"flex",alignItems:"center",gap:12,font:"500 10px/1 var(--orb-font)",letterSpacing:"0.1em",textTransform:"uppercase",color:"var(--orb-muted)"},children:[e("span",{style:{flex:1,height:1,background:"var(--orb-border)"}}),"or",e("span",{style:{flex:1,height:1,background:"var(--orb-border)"}})]}),e(we,{variant:"neutral",size:"large",block:true,children:"Continue with corporate SSO"}),c("p",{className:"orb-meta",style:{textAlign:"center",fontWeight:300,margin:0},children:["Protected by corporate single sign-on.",e("br",{}),"Demo credentials: demo@orbcafe.local / orbcafe-demo"]})]})})]})};var r0={keyword:{value:"",operator:"contains"},status:{value:"",operator:"equals"},owner:{value:"",operator:"contains"},workCenter:{value:"",operator:"contains"}},o0=[{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"}],Rg=({tasks:t,appId:r,tableKey:o,defaultScale:n="week",defaultSelectedTaskId:a,initialFilters:i,filterFields:s,filterAppId:l,filterTableKey:d,serviceUrl:u,variantService:p,layout:f,columns:b,page:m,rowsPerPage:v,rowsPerPageOptions:y,count:g,onPageChange:x,onRowsPerPageChange:h,onFilterSearch:C,onFilterVariantLoad:k,enableRowReorder:w,onTaskReorder:T,onLayoutIdChange:I,onLayoutSave:S})=>{let A=r??l??"planning-gantt",D=o??d??"planning",[M,N]=er.useState(n),[E,O]=er.useState(a??t[0]?.id??""),[F,X]=er.useState(""),[H,Y]=er.useState(null),[W,j]=er.useState({...r0,...i}),V=er.useMemo(()=>{let ue=String(W.keyword?.value??"").trim().toLowerCase(),Se=String(W.status?.value??"").trim(),$e=String(W.owner?.value??"").trim().toLowerCase(),ke=String(W.workCenter?.value??"").trim().toLowerCase(),le=W.dateRange?.value,Ee=le?.[0]?ro__default.default(le[0]):null,Me=le?.[1]?ro__default.default(le[1]):null;return t.filter(Pe=>{if(ue&&![Pe.id,Pe.code,Pe.title,Pe.project,Pe.workCenter,Pe.owner?.name].join(" ").toLowerCase().includes(ue)||Se&&Pe.status!==Se||$e&&!String(Pe.owner?.name??"").toLowerCase().includes($e)||ke&&!String(Pe.workCenter??"").toLowerCase().includes(ke))return false;if(Ee||Me){let Ve=ro__default.default(Pe.startDate),tt=ro__default.default(Pe.endDate),nt=Ee?tt.isAfter(Ee)||tt.isSame(Ee,"day"):true,it=Me?Ve.isBefore(Me)||Ve.isSame(Me,"day"):true;if(!nt||!it)return false}return true})},[W,t]);er.useEffect(()=>{V.length!==0&&(V.some(ue=>ue.id===E)||O(V[0].id));},[V,E]);let z=er.useCallback(ue=>{O(ue.id);},[]),U=er.useCallback(ue=>{X(ue),I?.(ue);},[I]),K=er.useCallback(ue=>{Y(Se=>({key:(Se?.key??0)+1,variant:ue})),k?.(ue);},[k]),fe=er.useMemo(()=>({appId:A,tableKey:D,fields:s??o0,filters:W,onFilterChange:j,onVariantLoad:K,onSearch:C??(()=>{}),currentLayoutId:F,layoutRefs:[{tableKey:D,layoutId:F||null}],variantService:p,serviceUrl:u}),[F,s,W,K,C,A,D,u,p]),se=er.useMemo(()=>({appId:A,tableKey:D,serviceUrl:u,tasks:V,columns:b,scale:M,onScaleChange:N,page:m,rowsPerPage:v,rowsPerPageOptions:y,count:g,onPageChange:x,onRowsPerPageChange:h,selectedTaskId:E,onTaskSelect:z,enableRowReorder:w,onTaskReorder:T,layout:f,layoutVariant:H?.variant,layoutVariantLoadKey:H?.key,onLayoutIdChange:U,onLayoutSave:S}),[b,g,w,V,U,f,H?.key,H?.variant,x,h,S,T,z,m,A,D,v,y,M,u,E]);return {scale:M,setScale:N,selectedTaskId:E,setSelectedTaskId:O,filters:W,setFilters:j,filteredTasks:V,smartFilterProps:fe,planningGanttProps:se}};var S5=t=>{let r=Rg(t),o=er.useMemo(()=>({filterProps:r.smartFilterProps,ganttProps:r.planningGanttProps}),[r.planningGanttProps,r.smartFilterProps]);return {...r,layoutProps:o}};P();ro__default.default.extend(a0__default.default);var ic=[{value:"hour",label:"Hour",width:56},{value:"day",label:"Day",width:46},{value:"week",label:"Week",width:78},{value:"month",label:"Month",width:104}],sc=36,lc=58,wa=8,cc=260,u0=320,Uo="220ms cubic-bezier(0.2, 0, 0, 1)",Dg={"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"}},m0=t=>t?Dg[t]?.label??t:"Planned",g0=t=>t?Dg[t]?.color??"default":"info",Ng=t=>Math.min(100,Math.max(0,t??0)),Ag=(t,r=0)=>t.flatMap(o=>[{...o,level:r},...Ag(o.children??[],r+1)]),f0=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:m0(t.status),statusTone:t.status??"planned",progress:Ng(t.progress),startDate:t.startDate,endDate:t.endDate,color:t.color,reorderable:t.reorderable!==false}),Eg=(t,r)=>r==="month"?t.startOf("month"):r==="week"?t.startOf("week"):r==="day"?t.startOf("day"):t.startOf("hour"),Lg=(t,r)=>r==="month"?t.endOf("month"):r==="week"?t.endOf("week"):r==="day"?t.endOf("day"):t.endOf("hour"),b0=(t,r,o)=>{let n=[],a=Eg(t,o),i=Lg(r,o);for(;a.isBefore(i)||a.isSame(i);){let s=o==="month"?a.add(1,"month"):o==="week"?a.add(1,"week"):o==="day"?a.add(1,"day"):a.add(1,"hour");n.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:s}),a=s;}return n},dc=(t,r,o)=>{let n=0;for(let a of r){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*o}n+=o;}return n},Og=({appId:t="planning-gantt",tableKey:r="planning",serviceUrl:o,title:n="Project Plan",extraTools:a,bodyHeight:i=560,tasks:s,columns:l,scale:d="week",onScaleChange:u,page:p,rowsPerPage:f=20,rowsPerPageOptions:b=[20,50,100,-1],count:m,onPageChange:v,onRowsPerPageChange:y,timelineStart:g,timelineEnd:x,selectedTaskId:h,onTaskSelect:C,enableRowReorder:k=true,onTaskReorder:w,layout:T,layoutVariant:I,layoutVariantLoadKey:S,onLayoutIdChange:A,onLayoutSave:D,emptyLabel:M="No planning tasks available.",sx:N})=>{let E=sr(),{t:O}=pe(),F=er.useRef(null),X=er.useRef(null),H=er.useRef(null),Y=er.useRef(false),[W,j]=er.useState(null),[V,z]=er.useState("content"),[U,K]=er.useState(null),[fe,se]=er.useState(0),[ue,Se]=er.useState({}),[$e,ke]=er.useState(sc),[le,Ee]=er.useState([]),Me=er.useRef(void 0),[Pe,Ve]=er.useState({activeId:null,overId:null}),[tt,nt]=er.useState(null),[it,q]=er.useState(false),De=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:4}})),ye=er.useRef(null),Be=er.useMemo(()=>Ag(s),[s]),at=er.useMemo(()=>{if(le.length===0)return Be;let B=new Map(Be.map(Te=>[Te.id,Te])),J=le.map(Te=>B.get(Te)).filter(Te=>!!Te),ge=new Set(J.map(Te=>Te.id));return [...J,...Be.filter(Te=>!ge.has(Te.id))]},[Be,le]),Ze=er.useMemo(()=>new Map(at.map(B=>[B.id,B])),[at]),St=er.useMemo(()=>at.map(B=>f0(B)),[at]),Mt=er.useMemo(()=>new Map(St.map(B=>[B.id,B])),[St]),Ot=er.useMemo(()=>[{id:"code",label:"ID",minWidth:90},{id:"title",label:"Task",minWidth:260,render:(B,J)=>c(ie,{spacing:.2,children:[e(L,{sx:{fontSize:15,fontWeight:700,lineHeight:1.2},children:J.title}),e(L,{sx:{fontSize:13,color:"text.secondary"},children:J.titleSub})]})},{id:"owner",label:"Owner",minWidth:170},{id:"status",label:"Status",minWidth:130,render:(B,J)=>e(xt,{label:J.status,color:g0(J.statusTone),size:"small"})},{id:"progress",label:"Progress",minWidth:140,numeric:true,render:B=>c(ie,{spacing:.6,children:[c(L,{variant:"caption",sx:{color:"text.secondary"},children:[B,"%"]}),e($n,{variant:"determinate",value:B,sx:{height:6,borderRadius:999}})]})},{id:"startDate",label:"Start",minWidth:120},{id:"endDate",label:"End",minWidth:120}],[]),At=er.useMemo(()=>{if(!l||l.length===0)return Ot;let B=new Map(Ot.map(J=>[J.id,J]));return l.map(J=>{let ge=B.get(J.id),Te=J.width??ge?.minWidth??120,et={id:J.id,label:J.label,minWidth:Te};if(ge?.numeric&&(et.numeric=true),J.render){let Xe=J.render;return et.render=(kt,bt)=>{let gt=Ze.get(bt.id);return Xe(gt||bt)},et}return ge?.render?(et.render=ge.render,et):(et.render=(Xe,kt)=>{let bt=kt[J.id];if(bt!=null&&String(bt).length>0)return String(bt);let Ct=Ze.get(kt.id)?.[J.id];return Ct!=null&&String(Ct).length>0?String(Ct):"-"},et)})},[l,Ot,Ze]),re=hn({appId:t,tableKey:r,title:n,columns:At,rows:St,rowKey:"id",page:p,rowsPerPage:f,rowsPerPageOptions:b,count:m??St.length,onPageChange:v,onRowsPerPageChange:y,showSummary:false,layout:T,onLayoutSave:D}),Ke=t?e(bn,{appId:t,tableKey:r,currentLayoutData:re.currentLayoutData,onLayoutLoad:re.handleLayoutLoad,targetLayoutId:re.layoutIdToLoad,activeLayoutId:re.currentLayoutId,serviceUrl:o}):null,Fe=re.visibleRows;er.useEffect(()=>{let B=Be.map(J=>J.id);Ee(J=>{let ge=new Set(B),Te=J.filter(bt=>ge.has(bt)),et=new Set(Te),Xe=B.filter(bt=>!et.has(bt)),kt=[...Te,...Xe];return kt.length===J.length&&kt.every((bt,gt)=>bt===J[gt])?J:kt});},[Be]),er.useEffect(()=>{S===void 0||!I||Me.current!==S&&(Me.current=S,re.handleVariantLoad(I));},[re,I,S]),er.useEffect(()=>{A?.(re.currentLayoutId);},[re.currentLayoutId,A]);let ce=B=>B.type==="group"?`group-${B.id}`:`row-${(B.data||B)?.id}`,ve=er.useMemo(()=>{let B=St.map(gt=>ro__default.default(gt.startDate)),J=St.map(gt=>ro__default.default(gt.endDate)),ge=g?ro__default.default(g):B.reduce((gt,Ct)=>Ct.isBefore(gt)?Ct:gt,B[0]??ro__default.default()),Te=x?ro__default.default(x):J.reduce((gt,Ct)=>Ct.isAfter(gt)?Ct:gt,J[0]??ro__default.default().add(30,"day")),et=d==="month"?"month":d==="week"?"week":d==="day"?"day":"hour",Xe=d==="month"?"month":d==="week"?"week":d==="day"?"day":"hour",kt=d==="hour"?12:1,bt=d==="hour"?12:1;return {start:Eg(ge.subtract(kt,et),d),end:Lg(Te.add(bt,Xe),d)}},[St,d,x,g]),te=ic.find(B=>B.value===d)??ic[1],he=Array.isArray(a)?a:a?[a]:[],Ne=er.useMemo(()=>b0(ve.start,ve.end,d),[ve.end,ve.start,d]),Je=Ne.length*te.width,st=Ne.length>0?100/Ne.length:100,pt=Ne.length>0?`repeat(${Ne.length}, minmax(${te.width}px, 1fr))`:"1fr",Bt=Ne.length>0?`calc(100% / ${Ne.length}) 100%`:"100% 100%",Xt=(re.columns||[]).filter(B=>re.visibleColumns.includes(B.id)).reduce((B,J)=>B+(re.columnWidths?.[J.id]||J.minWidth||100),0)+(re.grouping.length>0?72:0),Vt=V==="manual"&&W!==null?W:Xt,wt=U==="table",Wt=U==="timeline",ht=U==="timeline",Nt=U==="table",lt=!ht&&!Nt,Ft=()=>{let B=fe||F.current?.clientWidth||0;return B>0?Math.max(cc,B-wa-u0):Math.max(cc,Xt)},Yt=B=>Math.min(Math.max(B,cc),Ft()),$=(()=>{if(fe<=0)return null;let B=lt?wa:0;if(wt)return {tableWidth:fe,splitterWidth:B,timelineWidth:0};if(Wt)return {tableWidth:0,splitterWidth:B,timelineWidth:fe};if(V==="even"){let ge=Math.max(0,(fe-B)/2);return {tableWidth:ge,splitterWidth:B,timelineWidth:Math.max(0,fe-B-ge)}}let J=Yt(Vt);return {tableWidth:J,splitterWidth:B,timelineWidth:Math.max(0,fe-B-J)}})(),Q=$?`${$.tableWidth}px ${$.splitterWidth}px ${$.timelineWidth}px`:wt?"minmax(0, 1fr) 0px 0px":Wt?"0px 0px minmax(0, 1fr)":V==="even"?`minmax(0, 1fr) ${wa}px minmax(0, 1fr)`:`${Vt}px ${wa}px minmax(0, 1fr)`;er.useEffect(()=>{V==="manual"&&j(B=>B===null?null:Yt(B));},[V,Xt,fe]);let be=B=>{B.preventDefault(),B.currentTarget.setPointerCapture(B.pointerId),K(null),z("manual"),ye.current={startX:B.clientX,startWidth:X.current?.getBoundingClientRect().width??Vt};let J=Te=>{let et=ye.current;if(!et)return;let Xe=Yt(et.startWidth+Te.clientX-et.startX);j(Xe);},ge=()=>{ye.current=null,window.removeEventListener("pointermove",J),window.removeEventListener("pointerup",ge),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",ge);},Ce=()=>{K(null),z("even"),j(null);},Le=B=>!k||!B?false:Mt.get(B)?.reorderable!==false,_e=(B,J)=>{if(!B||!J||B===J||!Le(B)||!Le(J))return false;if(re.grouping.length===0)return true;let ge=Mt.get(B),Te=Mt.get(J);return !ge||!Te?false:re.grouping.every(et=>ge[et]===Te[et])},qe=(B,J)=>{if(!_e(B,J))return;let ge=Fe.filter(Et=>Et.type!=="group").map(Et=>String((Et.data||Et)?.id)),Te=ge.indexOf(B),et=ge.indexOf(J);if(Te<0||et<0)return;let Xe=[...ge];[Xe[Te],Xe[et]]=[Xe[et],Xe[Te]];let kt=new Set(ge),bt=at.map(Et=>Et.id),gt=[...Xe,...bt.filter(Et=>!kt.has(Et))],Ct=Ze.get(B),nr=Ze.get(J);if(re.setOrder("asc"),re.setOrderBy(""),Ee(gt),Ct&&nr){let{level:Et,...Zt}=Ct,{level:Ht,...Kt}=nr,$t=gt.reduce((rr,ar)=>{let fr=Ze.get(ar);if(fr){let{level:Ir,...Mr}=fr;rr.push(Mr);}return rr},[]);w?.($t,{activeTask:Zt,targetTask:Kt});}},je=(B,J)=>{if(!Le(J.id)){B.preventDefault();return}B.stopPropagation(),B.dataTransfer.effectAllowed="move",B.dataTransfer.setData("text/plain",J.id),Ve({activeId:J.id,overId:null}),C?.(Ze.get(J.id)||J);},mt=(B,J)=>{if(!_e(Pe.activeId,J)){Ve(ge=>ge.overId===null?ge:{...ge,overId:null});return}B.preventDefault(),B.stopPropagation(),B.dataTransfer.dropEffect="move",Ve(ge=>ge.overId===J?ge:{...ge,overId:J});},ft=(B,J)=>{let ge=Pe.activeId||B.dataTransfer.getData("text/plain");if(!_e(ge,J)){Ve({activeId:null,overId:null});return}B.preventDefault(),B.stopPropagation(),qe(ge,J),Ve({activeId:null,overId:null});},Rt=()=>{Ve({activeId:null,overId:null});},yt=B=>{if(Y.current)return;let J=B==="table"?X.current:H.current,ge=B==="table"?H.current:X.current;!J||!ge||(Y.current=true,ge.scrollTop=J.scrollTop,window.requestAnimationFrame(()=>{Y.current=false;}));};return er.useLayoutEffect(()=>{let B=F.current;if(!B){se(0);return}let J=0,ge=()=>{window.cancelAnimationFrame(J),J=window.requestAnimationFrame(()=>{let et=B.clientWidth;se(Xe=>Math.abs(Xe-et)<.5?Xe:et);});};if(ge(),typeof ResizeObserver>"u")return window.addEventListener("resize",ge),()=>{window.cancelAnimationFrame(J),window.removeEventListener("resize",ge);};let Te=new ResizeObserver(ge);return Te.observe(B),window.addEventListener("resize",ge),()=>{window.cancelAnimationFrame(J),Te.disconnect(),window.removeEventListener("resize",ge);}},[St.length]),er.useLayoutEffect(()=>{if(!h||Nt)return;let B=H.current,J=X.current;if(!B)return;let ge=`row-${h}`,Te=Array.from(B.querySelectorAll("[data-planning-timeline-row-key]")).find(kt=>kt.dataset.planningTimelineRowKey===ge),et=Mt.get(h);if(!Te||!et)return;let Xe=window.requestAnimationFrame(()=>{let kt=B.getBoundingClientRect(),bt=Te.getBoundingClientRect(),gt=Math.max(1,B.clientHeight-$e),Ct=B.scrollTop+bt.top-kt.top-$e-(gt-bt.height)/2;Y.current=true,B.scrollTop=Math.max(0,Ct),J&&!ht&&(J.scrollTop=B.scrollTop);let nr=Math.max(1,B.scrollWidth),Et=Ne.length>0?nr/Ne.length:te.width,Zt=dc(ro__default.default(et.startDate),Ne,Et),Ht=Math.max(0,Zt-Et);B.scrollLeft=Math.min(Ht,Math.max(0,nr-B.clientWidth)),window.requestAnimationFrame(()=>{Y.current=false;});});return ()=>window.cancelAnimationFrame(Xe)},[te.width,$e,h,ht,Mt,Nt,Fe,Ne]),er.useLayoutEffect(()=>{let B=X.current;if(!B)return;let J=0,ge=0,Te=false,et=()=>{if(Te)return;let Ht=B.querySelector("thead"),Kt=Array.from(B.querySelectorAll("tbody tr[data-ctable-row-key]"));if(Kt.length===0)return;let $t=Ht?.getBoundingClientRect().height||sc,rr={};Kt.forEach(ar=>{let fr=ar.dataset.ctableRowKey;fr&&(rr[fr]=ar.getBoundingClientRect().height);}),ke(ar=>Math.abs(ar-$t)<.01?ar:$t),Se(ar=>{let fr=Object.keys(ar),Ir=Object.keys(rr);return fr.length===Ir.length&&Ir.every(Mr=>Math.abs((ar[Mr]??0)-rr[Mr])<.01)?ar:rr});},Xe=()=>{window.cancelAnimationFrame(J),J=window.requestAnimationFrame(et);};if(et(),window.cancelAnimationFrame(ge),ge=window.requestAnimationFrame(()=>{ge=window.requestAnimationFrame(et);}),typeof document<"u"&&document.fonts?.ready&&document.fonts.ready.then(()=>{Te||Xe();}).catch(()=>{}),typeof ResizeObserver>"u")return window.addEventListener("resize",Xe),()=>{Te=true,window.cancelAnimationFrame(J),window.cancelAnimationFrame(ge),window.removeEventListener("resize",Xe);};let kt=new ResizeObserver(Xe),bt=B.querySelector("table"),gt=B.querySelector("tbody"),Ct=B.querySelector("thead");bt&&kt.observe(bt),Ct&&kt.observe(Ct);let nr=new WeakSet,Et=()=>{B.querySelectorAll("tbody tr[data-ctable-row-key]").forEach(Ht=>{nr.has(Ht)||(kt.observe(Ht),nr.add(Ht));});};Et();let Zt=null;return gt&&typeof MutationObserver<"u"&&(Zt=new MutationObserver(()=>{Et(),Xe();}),Zt.observe(gt,{childList:true,subtree:true,characterData:true})),window.addEventListener("resize",Xe),()=>{Te=true,window.cancelAnimationFrame(J),window.cancelAnimationFrame(ge),kt.disconnect(),Zt?.disconnect(),window.removeEventListener("resize",Xe);}},[Fe,re.visibleColumns,re.grouping,re.columnWidths]),c(Ae,{className:"orb-ctable-surface orb-planning-gantt",elevation:0,sx:{m:0,p:0,display:"flex",flexDirection:"column",minHeight:0,overflow:"hidden",borderRadius:"var(--orb-r-container)",border:`1px solid ${E.palette.divider}`,...N},children:[e("div",{className:"orb-table-toolbar orb-planning-table-toolbar",role:"toolbar","aria-label":O("table.title.default"),children:c("div",{className:"orb-table-toolbar-primary",children:[e(gi,{value:re.filterText,onChange:B=>{re.setFilterText(B),re.setPage(0);}}),e(mi,{rowsPerPage:re.rowsPerPage,rowsPerPageOptions:b,page:re.page,count:re.totalDisplayCount,onRowsPerPageChange:re.setRowsPerPage,onPageChange:re.setPage}),he.length>0&&e("div",{className:"orb-table-toolbar-custom",children:he.map((B,J)=>e("div",{className:"orb-planning-extra-tool",children:B},`planning-extra-tool-${J}`))}),e("span",{className:"orb-table-toolbar-spacer"}),c("div",{className:"orb-table-toolbar-actions",children:[c("div",{className:"orb-table-tool-group",children:[e(ae,{className:"orb-table-tool-button",tooltip:"Column visibility",onClick:B=>re.setAnchorEl(B.currentTarget),sx:pr,children:e(ln,{fontSize:"small"})}),e(ae,{className:"orb-table-tool-button",tooltip:"Group by",onClick:B=>re.setGroupAnchorEl(B.currentTarget),sx:pr,children:e(So,{fontSize:"small"})}),e(ae,{className:`orb-table-tool-button ${re.sortBy.length>0||re.orderBy?"orb-is-active":""}`,tooltip:"Sort by...",active:re.sortBy.length>0||!!re.orderBy,onClick:()=>q(true),sx:pr,children:e(pp,{fontSize:"small"})})]}),Ke&&e("div",{className:"orb-table-tool-group",children:Ke}),e("div",{className:"orb-table-tool-group orb-planning-pane-controls",children:e(_n,{"aria-label":"Planning pane layout",size:"small",value:U??(V==="even"?"split":null),options:[{value:"table",label:"Expand task table",icon:e(si,{fontSize:"small"})},{value:"split",label:"Split evenly",icon:e(ci,{fontSize:"small"})},{value:"timeline",label:"Expand timeline",icon:e(ii,{fontSize:"small"})}],onValueChange:B=>{B==="split"?Ce():K(B);}})}),e("div",{className:"orb-table-tool-group orb-planning-scale-control",children:e(zt,{label:"",value:d,options:ic.map(B=>({value:B.value,label:B.label})),onChange:B=>u?.(B.target.value)})})]})]})}),St.length===0?e("div",{sx:{minHeight:240,display:"grid",placeItems:"center",color:"text.secondary"},children:M}):e("div",{sx:{overflow:"hidden",flex:1,minHeight:0},children:c("div",{ref:F,sx:{height:"100%",display:"grid",gridTemplateColumns:Q,minWidth:0,transition:`grid-template-columns ${Uo}`},children:[e("div",{"data-planning-scroll-pane":"table",ref:X,onScroll:()=>yt("table"),sx:{width:"100%",minWidth:0,maxWidth:"100%",height:i,overflowX:"auto",overflowY:"auto",opacity:ht?0:1,transform:ht?"translateX(-10px)":"translateX(0)",pointerEvents:ht?"none":"auto",transition:`opacity ${Uo}, transform ${Uo}`},children:e(core.DndContext,{sensors:De,collisionDetection:core.closestCenter,modifiers:[modifiers.restrictToHorizontalAxis],onDragEnd:B=>{let J=B?.active?.id,ge=B?.over?.id;typeof J=="string"&&typeof ge=="string"&&re.handleColumnReorder(J,ge);},children:c("table",{className:"orb-tbl orb-ctable orb-planning-table",sx:{tableLayout:"fixed",width:Xt,"& thead th":{height:sc,py:0,lineHeight:1.15,boxSizing:"border-box"}},children:[e(hi,{columns:re.columns,visibleColumns:re.visibleColumns,order:re.order,orderBy:re.orderBy,sortBy:re.sortBy,onRequestSort:re.handleRequestSort,onContextMenu:(B,J)=>{B.preventDefault(),B.stopPropagation(),nt({mouseX:B.clientX+2,mouseY:B.clientY-6,columnId:J});},grouping:re.grouping,isAllExpanded:re.isAllExpanded,handleToggleAll:re.handleToggleAll,columnWidths:re.columnWidths,onColumnResize:re.handleColumnResize,enableColumnReorder:true}),e(vi,{visibleRows:Fe,columns:re.columns,visibleColumns:re.visibleColumns,selected:h?[h]:[],expandedGroups:re.expandedGroups,toggleGroupExpand:re.toggleGroupExpand,handleExpandGroupRecursively:re.handleExpandGroupRecursively,handleCollapseGroupRecursively:re.handleCollapseGroupRecursively,isGroupFullyExpanded:re.isGroupFullyExpanded,grouping:re.grouping,rowKeyProp:"id",page:re.page,rowsPerPage:re.rowsPerPage,emptyLabel:M,handleClick:(B,J)=>{C?.(Ze.get(J.id)||J);},getRowDataKey:({entry:B})=>ce(B),getGroupRowProps:()=>({style:{height:lc}}),getRowProps:({data:B})=>{let J=B,ge=Le(J.id),Te=Pe.activeId===J.id,et=Pe.overId===J.id&&_e(Pe.activeId,J.id);return {draggable:ge,className:et?"orb-is-drop-target":void 0,style:{cursor:Te?"grabbing":ge?"grab":C?"pointer":"default",height:lc,opacity:Te?.56:1,transition:"background-color 120ms ease, opacity 120ms ease"},onDragStart:Xe=>je(Xe,J),onDragOver:Xe=>mt(Xe,J.id),onDragEnter:Xe=>mt(Xe,J.id),onDrop:Xe=>ft(Xe,J.id),onDragEnd:Rt}}})]})})}),e("div",{onPointerDown:lt?be:void 0,role:"separator","aria-orientation":"vertical",sx:{width:lt?wa:0,cursor:lt?"col-resize":"default",opacity:lt?1:0,pointerEvents:lt?"auto":"none",borderLeft:lt?`1px solid ${E.palette.divider}`:"0 solid transparent",borderRight:lt?`1px solid ${E.palette.divider}`:"0 solid transparent",backgroundColor:vt()==="dark"?"color-mix(in oklch, var(--orb-muted) 10%, transparent)":"color-mix(in oklch, var(--orb-fg) 4%, transparent)",transition:`width ${Uo}, opacity ${Uo}, background-color 120ms ease`,position:"relative","&:hover":{backgroundColor:E.palette.action.selected},"&::before":{content:'""',position:"absolute",top:0,bottom:0,left:-6,right:-6,cursor:lt?"col-resize":"default"}}}),e("div",{sx:{minWidth:0,overflow:"hidden",opacity:Nt?0:1,transform:Nt?"translateX(10px)":"translateX(0)",pointerEvents:Nt?"none":"auto",transition:`opacity ${Uo}, transform ${Uo}`},children:e("div",{"data-planning-scroll-pane":"timeline",ref:H,onScroll:()=>yt("timeline"),sx:{width:"100%",height:i,overflowX:"auto",overflowY:"auto"},children:c("div",{sx:{width:"100%",minWidth:Je||"100%"},children:[e("div",{className:"orb-planning-timeline-header",sx:{display:"grid",gridTemplateColumns:pt,height:$e,boxSizing:"border-box",borderBottom:`1px solid ${E.palette.divider}`,position:"sticky",top:0,zIndex:2},children:Ne.map(B=>c("div",{title:B.title,sx:{px:.75,display:"flex",flexDirection:B.contextLabel?"column":"row",alignItems:"center",justifyContent:"center",gap:B.contextLabel?.15:0,borderRight:`1px solid ${E.palette.divider}`,color:B.contextLabel?"text.primary":"text.secondary",overflow:"hidden"},children:[B.contextLabel&&e(L,{component:"span",sx:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"text.secondary",fontSize:11,fontWeight:700,lineHeight:1.1},children:B.contextLabel}),e(L,{component:"span",sx:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:12,fontWeight:700,lineHeight:1.15},children:B.label})]},B.key))}),e(ie,{sx:{position:"relative"},children:Fe.map(B=>{let J=ce(B),ge=ue[J]??lc;if(B.type==="group")return e("div",{className:"orb-planning-timeline-row orb-table-group-row","data-planning-timeline-row-key":J,sx:{position:"relative",height:ge,boxSizing:"border-box",borderBottom:`1px solid ${E.palette.divider}`}},B.id);let Te=B.data||B,et=ro__default.default(Te.startDate),Xe=ro__default.default(Te.endDate),kt=dc(et,Ne,st),bt=dc(Xe,Ne,st),gt=Math.max(0,bt-kt),Ct=Ng(Te.progress),nr=Te.id===h,Et=Le(Te.id),Zt=Pe.activeId===Te.id,Ht=Pe.overId===Te.id&&_e(Pe.activeId,Te.id),Kt=Te.color??(Te.statusTone==="blocked"?E.palette.error.main:E.palette.primary.main);return e("div",{className:`orb-planning-timeline-row ${nr?"orb-is-selected":""}`,"data-planning-timeline-row-key":J,draggable:Et,onDragStart:$t=>je($t,Te),onDragOver:$t=>mt($t,Te.id),onDragEnter:$t=>mt($t,Te.id),onDrop:$t=>ft($t,Te.id),onDragEnd:Rt,onClick:()=>C?.(Ze.get(Te.id)||Te),sx:{position:"relative",height:ge,boxSizing:"border-box",borderBottom:`1px solid ${E.palette.divider}`,opacity:Zt?.56:1,"&::before":{content:'""',position:"absolute",top:0,left:0,right:0,height:2,backgroundColor:E.palette.primary.main,opacity:Ht?1:0,transition:"opacity 120ms ease",pointerEvents:"none",zIndex:3},backgroundImage:vt()==="dark"?"linear-gradient(90deg, color-mix(in oklch, var(--orb-muted) 8%, transparent) 1px, transparent 1px)":"linear-gradient(90deg, color-mix(in oklch, var(--orb-fg) 6%, transparent) 1px, transparent 1px)",backgroundSize:Bt,cursor:Zt?"grabbing":Et?"grab":C?"pointer":"default",transition:"opacity 120ms ease"},children:e(ct,{title:`${Te.title}: ${et.format("MMM D HH:mm")} - ${Xe.format("MMM D HH:mm")}`,children:c("div",{sx:{position:"absolute",left:`${kt}%`,top:Math.max(8,(ge-24)/2),width:`max(18px, ${gt}%)`,height:24,borderRadius:999,overflow:"hidden",backgroundColor:vt()==="dark"?"color-mix(in oklch, var(--orb-muted) 18%, transparent)":"color-mix(in oklch, var(--orb-fg) 10%, transparent)",outline:nr?`2px solid ${E.palette.warning.main}`:"none",outlineOffset:2},children:[e("div",{sx:{height:"100%",width:`${Ct}%`,backgroundColor:Kt}}),e(L,{sx:{position:"absolute",inset:0,px:1,display:"flex",alignItems:"center",color:"var(--orb-on-primary)",fontSize:11,fontWeight:800,textShadow:"0 1px 4px rgba(0,0,0,0.45)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:Te.code})]})})},Te.id)})})]})})})]})}),e(pn,{groupAnchorEl:re.groupAnchorEl,setGroupAnchorEl:re.setGroupAnchorEl,grouping:re.grouping,setGrouping:re.setGrouping,columns:re.columns}),e(un,{anchorEl:re.anchorEl,setAnchorEl:re.setAnchorEl,columns:re.columns,visibleColumns:re.visibleColumns,toggleColumnVisibility:re.toggleColumnVisibility}),e(Rp,{contextMenu:tt,handleClose:()=>nt(null),columns:re.columns,visibleColumns:re.visibleColumns,grouping:re.grouping,summaryColumns:re.summaryColumns,showSummary:re.showSummary,sortBy:re.sortBy,orderBy:re.orderBy,order:re.order,onSortAsc:B=>{re.applyMultiSort([{field:B,direction:"asc"}]);},onSortDesc:B=>{re.applyMultiSort([{field:B,direction:"desc"}]);},onClearSort:B=>{let J=re.sortBy.filter(ge=>ge.field!==B);J.length>0?re.applyMultiSort(J):(re.clearMultiSort(),re.orderBy===B&&re.setOrderBy(""));},onHideColumn:B=>{re.visibleColumns.includes(B)&&re.toggleColumnVisibility(B);},onToggleGroup:B=>re.toggleGroupField(B),onToggleSummary:B=>re.toggleSummaryColumn(B),onOpenSortDialog:()=>q(true)}),e(Dp,{open:it,onClose:()=>q(false),columns:re.columns,initialRules:re.sortBy.length>0?re.sortBy:re.orderBy?[{field:re.orderBy,direction:re.order}]:[],onApply:B=>re.applyMultiSort(B),onClear:()=>{re.clearMultiSort(),re.setOrderBy("");}})]})};P();var tV=({filterProps:t,ganttProps:r,spacing:o=2,sx:n,children:a})=>{let i=n?[{height:"100%",overflow:"hidden"},n]:{height:"100%",overflow:"hidden"},s=r.sx?[{height:"100%"},r.sx]:{height:"100%"};return c(ie,{spacing:o,sx:i,children:[e("div",{sx:{flexShrink:0},children:e(Wr,{...t})}),e("div",{sx:{flex:1,minHeight:0,overflow:"hidden"},children:e(Og,{...r,bodyHeight:r.bodyHeight??"100%",sx:s})}),a]})};P();var Fg=640,h0=360,v0=360,Ns=8,En="220ms cubic-bezier(0.2, 0, 0, 1)",mc=(t,r,o=0,n=[])=>t.flatMap(a=>{let i=a.children??[],s=[{node:a,level:o,hasChildren:i.length>0,parentIds:n}];return r.has(a.id)?[...s,...mc(i,r,o+1,[...n,a.id])]:s}),Hg=t=>t.flatMap(r=>[r,...Hg(r.children??[])]),zg=(t,r=0,o=[])=>t.flatMap(n=>{let a=n.children??[];return [{node:n,level:r,hasChildren:a.length>0,parentIds:o},...zg(a,r+1,[...o,n.id])]}),Vg=t=>t.flatMap(r=>{let o=r.children??[];return o.length===0?[]:[r.id,...Vg(o)]}),Bg=t=>Object.entries(t).filter(([r])=>r!=="children").map(([,r])=>r==null?"":typeof r=="string"||typeof r=="number"||typeof r=="boolean"?String(r):"").join(" ").toLowerCase(),uV=({title:t,subtitle:r,nodes:o,columns:n,detail:a,selectedNodeId:i,defaultSelectedNodeId:s,onNodeSelect:l,expandedNodeIds:d,defaultExpandedNodeIds:u,onExpandedNodeIdsChange:p,defaultPaneMode:f="split",minTreePaneWidth:b=h0,minDetailPaneWidth:m=v0,tableAppId:v="ctree-comp",tableKey:y="default",tableTitle:g,filterConfig:x,searchQuery:h,searchToken:C,defaultRowsPerPage:k=-1,rowsPerPageOptions:w=[20,50,100,-1],serviceUrl:T,emptyLabel:I="No tree items available.",headerAction:S,sx:A,className:D})=>{let M=sr(),N=er.useRef(null),E=er.useRef(null),O=er.useRef(null),[F,X]=er.useState(s??o[0]?.id??null),[H,Y]=er.useState(u??Vg(o).slice(0,3)),[W,j]=er.useState(f),[V,z]=er.useState(Fg),[U,K]=er.useState(0),[fe,se]=er.useState(0),[ue,Se]=er.useState(k),$e=er.useMemo(()=>n&&n.length>0?n:[{id:"label",label:"Name",render:ce=>c(ie,{spacing:.3,children:[e(L,{sx:{fontSize:15,fontWeight:700,lineHeight:1.15},children:ce.label}),ce.subtitle&&e(L,{sx:{fontSize:13,color:"text.secondary",lineHeight:1.2},children:ce.subtitle})]})}],[n]),ke=er.useMemo(()=>new Set(d??H),[d,H]),le=er.useMemo(()=>mc(o,ke),[o,ke]),Ee=er.useMemo(()=>Hg(o),[o]),Me=er.useMemo(()=>zg(o),[o]),Pe=i===void 0?F:i,Ve=er.useMemo(()=>Ee.find(ce=>ce.id===Pe)??null,[Pe,Ee]),tt=ce=>{let ve=E.current?.clientWidth??0,te=ve>0?Math.max(b,ve-Ns-m):Math.max(b,ce);return Math.min(Math.max(ce,b),te)},nt=W==="detail",it=W==="tree"||!a,q=W==="split"&&!!a,ye=(()=>{if(U<=0)return null;if(W==="tree"||!a)return {treeWidth:U,splitterWidth:0,detailWidth:0};if(W==="detail")return {treeWidth:0,splitterWidth:0,detailWidth:U};let ce=q?Ns:0,ve=tt(V);return {treeWidth:ve,splitterWidth:ce,detailWidth:Math.max(0,U-ce-ve)}})(),Be=ye?`${ye.treeWidth}px ${ye.splitterWidth}px ${ye.detailWidth}px`:W==="tree"||!a?"minmax(0, 1fr) 0px 0px":W==="detail"?"0px 0px minmax(0, 1fr)":`minmax(${b}px, ${V}px) ${Ns}px minmax(${m}px, 1fr)`;er.useEffect(()=>{let ce=E.current;if(!ce){K(0);return}let ve=0,te=()=>{window.cancelAnimationFrame(ve),ve=window.requestAnimationFrame(()=>{let Ne=ce.clientWidth;K(Je=>Math.abs(Je-Ne)<.5?Je:Ne);});};if(te(),typeof ResizeObserver>"u")return window.addEventListener("resize",te),()=>{window.cancelAnimationFrame(ve),window.removeEventListener("resize",te);};let he=new ResizeObserver(te);return he.observe(ce),window.addEventListener("resize",te),()=>{window.cancelAnimationFrame(ve),he.disconnect(),window.removeEventListener("resize",te);}},[]);let at=ce=>{d===void 0&&Y(ce),p?.(ce);},Ze=ce=>{let ve=new Set(ke);ve.has(ce)?ve.delete(ce):ve.add(ce),at(Array.from(ve));},St=ce=>{i===void 0&&X(ce.id),l?.(ce);};er.useEffect(()=>{se(0);},[o]),er.useEffect(()=>{let ce=h?.trim().toLowerCase();if(!ce)return;let ve=Me.find(({node:pt})=>Bg(pt).includes(ce));if(!ve)return;let te=new Set(ke);ve.parentIds.forEach(pt=>te.add(pt)),at(Array.from(te)),St(ve.node);let Ne=mc(o,te).findIndex(({node:pt})=>pt.id===ve.node.id);Ne>=0&&ue>0&&se(Math.floor(Ne/ue));let Je=0,st=0;return Je=window.requestAnimationFrame(()=>{st=window.requestAnimationFrame(()=>{let pt=N.current?.querySelector("tr.orb-selected"),Bt=pt?.closest(".orb-table-container");if(pt&&Bt){let Xt=Bt.getBoundingClientRect(),Vt=pt.getBoundingClientRect(),wt=Vt.top-Xt.top+Bt.scrollTop;Bt.scrollTo({top:wt-Bt.clientHeight/2+Vt.height/2,behavior:"smooth"});return}pt?.scrollIntoView({block:"center",behavior:"smooth"});});}),()=>{window.cancelAnimationFrame(Je),window.cancelAnimationFrame(st);}},[h,C,Me,o,ue]);let Mt=er.useMemo(()=>le.map(({node:ce,level:ve,hasChildren:te})=>({...ce,id:ce.id,__node:ce,__level:ve,__hasChildren:te,__expanded:ke.has(ce.id),__searchText:Bg(ce)})),[ke,le]),Ot=er.useMemo(()=>$e.map((ce,ve)=>({id:ce.id,label:ce.label,minWidth:typeof ce.width=="number"?ce.width:ce.minWidth??(ve===0?320:120),numeric:ce.numeric??ce.align==="right",render:(te,he)=>{let Ne=he.__node,Je=ce.render?ce.render(Ne):Ne[ce.id];if(ve!==0)return e(Ie,{sx:{minWidth:0,color:ce.align==="right"?"text.primary":"text.secondary",fontWeight:ce.align==="right"?750:500,textAlign:ce.align??"left"},children:Je});let st=Number(he.__level??0),pt=!!he.__hasChildren,Bt=!!he.__expanded;return c(ie,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0,pl:`${st*24}px`},children:[e(ae,{tooltip:pt?Bt?"Collapse":"Expand":"",onClick:Xt=>{Xt.stopPropagation(),pt&&Ze(Ne.id);},disabled:!pt,sx:{width:24,height:24,visibility:pt?"visible":"hidden",transform:Bt?"rotate(0deg)":"rotate(-90deg)",transition:"transform 160ms ease"},children:e(Vr,{sx:{fontSize:20}})}),e(Ie,{sx:{width:10,height:10,borderRadius:"50%",flexShrink:0,backgroundColor:Ne.markerColor??M.palette.primary.main}}),e(Ie,{sx:{minWidth:0},children:Je})]})}})),[$e,ke,M.palette.primary.main]),At=ce=>{if(!q)return;ce.preventDefault(),ce.currentTarget.setPointerCapture(ce.pointerId),O.current={startX:ce.clientX,startWidth:V};let ve=he=>{let Ne=O.current;Ne&&z(tt(Ne.startWidth+he.clientX-Ne.startX));},te=()=>{O.current=null,window.removeEventListener("pointermove",ve),window.removeEventListener("pointerup",te),document.body.style.cursor="",document.body.style.userSelect="";};document.body.style.cursor="col-resize",document.body.style.userSelect="none",window.addEventListener("pointermove",ve),window.addEventListener("pointerup",te);},re=()=>{let ce=E.current?.clientWidth??0,ve=ce>0?Math.max(b,(ce-Ns)/2):Fg;j("split"),z(tt(ve));},Ke=()=>a?typeof a=="function"?a(Ve):a:null,Fe=a?e(_n,{"aria-label":"Tree pane layout",value:W,options:[{value:"tree",label:"Expand tree",icon:e(si,{fontSize:"small"})},{value:"split",label:"Split evenly",icon:e(ci,{fontSize:"small"})},{value:"detail",label:"Expand detail",icon:e(ii,{fontSize:"small"})}],onValueChange:ce=>{ce==="split"?re():j(ce);},sx:{position:"absolute",top:13,right:56,zIndex:3,backdropFilter:"blur(10px)"}}):null;return c(Ie,{ref:N,className:["ctree_comp",D].filter(Boolean).join(" "),sx:{position:"relative",height:"100%",minHeight:0,border:`1px solid ${M.palette.divider}`,borderRadius:"var(--orb-r-container)",overflow:"hidden",backgroundColor:"background.paper",boxShadow:`0 18px 42px ${rt(M.palette.common.black,vt()==="dark"?.24:.08)}`,...A},children:[Fe,c(Ie,{ref:E,sx:{height:"100%",display:"grid",gridTemplateColumns:Be,transition:`grid-template-columns ${En}`,minWidth:0},children:[c(Ie,{"aria-hidden":nt?true:void 0,sx:{minWidth:0,overflow:"hidden",display:"flex",flexDirection:"column",opacity:nt?0:1,transform:nt?"translateX(-12px)":"translateX(0)",pointerEvents:nt?"none":"auto",transition:`opacity ${En}, transform ${En}`,willChange:"opacity, transform"},children:[c(ie,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:2,sx:{px:2,py:1.5,minHeight:74,borderBottom:`1px solid ${M.palette.divider}`},children:[c(ie,{direction:"row",alignItems:"center",spacing:1.4,sx:{minWidth:0},children:[e(So,{sx:{color:"primary.main",fontSize:28}}),c(Ie,{sx:{minWidth:0},children:[e(L,{sx:{fontSize:20,fontWeight:750,lineHeight:1.12},noWrap:true,children:t}),r&&e(L,{sx:{fontSize:14,color:"text.secondary",mt:.3},noWrap:true,children:r})]})]}),S!==void 0?S:e(ae,{tooltip:"Add node",color:"default",children:e(Ho,{fontSize:"small"})})]}),c(Ie,{sx:{flex:1,minHeight:0,overflow:"hidden"},children:[e(Jr,{appId:v,tableKey:y,title:g??(typeof t=="string"?t:"Tree"),columns:Ot,rows:Mt,rowKey:"id",fitContainer:true,fullWidth:true,showSummary:false,selectionMode:"single",selected:Pe?[Pe]:[],onSelectionChange:ce=>{let ve=ce[ce.length-1],te=Ee.find(he=>he.id===ve);te&&St(te);},page:fe,rowsPerPage:ue,rowsPerPageOptions:w,count:Mt.length,onPageChange:se,onRowsPerPageChange:ce=>{se(0),Se(ce);},filterConfig:x,serviceUrl:T,graphReport:{enabled:false},disableGrouping:true,disableSorting:true,maxHeight:"100%"}),Mt.length===0&&e(Ie,{sx:{minHeight:220,display:"grid",placeItems:"center",color:"text.secondary"},children:I})]})]}),e(Ie,{"data-ctree-splitter":"true",role:"separator","aria-orientation":"vertical",onPointerDown:q?At:void 0,sx:{width:"100%",cursor:q?"col-resize":"default",backgroundColor:q?rt(M.palette.text.primary,vt()==="dark"?.16:.08):"transparent",opacity:q?1:0,pointerEvents:q?"auto":"none",position:"relative",transition:`opacity ${En}, background-color 120ms ease`,"&:hover":{backgroundColor:q?rt(M.palette.primary.main,vt()==="dark"?.35:.18):"transparent"}}}),c(Ie,{"aria-hidden":it?true:void 0,sx:{minWidth:0,overflow:"hidden",display:"flex",flexDirection:"column",opacity:it?0:1,transform:it?"translateX(12px)":"translateX(0)",pointerEvents:it?"none":"auto",transition:`opacity ${En}, transform ${En}`,willChange:"opacity, transform"},children:[e(Ie,{sx:{px:2,pt:2,minHeight:74,display:"flex",alignItems:"flex-end"},children:e(Dt,{sx:{width:"100%"}})}),e(Ie,{sx:{flex:1,minHeight:0,overflow:"auto",px:2,pb:2},children:Ke()})]})]})]})};P();var S0={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)"}}},hV=({children:t,transitionKey:r,variant:o="fade",durationMs:n=220,delayMs:a=0,easing:i="cubic-bezier(0.22, 1, 0.36, 1)",disabled:s=false,sx:l})=>{let d=xo("(prefers-reduced-motion: reduce)"),[u,p]=er.useState("to"),f=!s&&!d&&o!=="none";er.useEffect(()=>{if(!f){p("to");return}p("from");let v=requestAnimationFrame(()=>{v=requestAnimationFrame(()=>{p("to");});});return ()=>cancelAnimationFrame(v)},[r,f]);let b=S0[o],m=er.useMemo(()=>f?u==="from"?b.from:b.to:{opacity:1,transform:"none"},[f,u,b.from,b.to]);return e(Ie,{sx:{willChange:f?"opacity, transform":"auto",transition:f?`opacity ${n}ms ${i} ${a}ms, transform ${n}ms ${i} ${a}ms`:"none",backfaceVisibility:"hidden",...m,...l},children:t})},vV={subtle:{variant:"fade",durationMs:180},smooth:{variant:"slide-up",durationMs:220},snappy:{variant:"scale",durationMs:160}};exports.AIBrowserGlow=Uz;exports.Activity=Pc;exports.AgentPanel=Wm;exports.AlertCircle=Ta;exports.AlertTriangle=Tc;exports.ArrowDown=Y0;exports.ArrowRight=Z0;exports.ArrowUp=Ic;exports.BarChart=Fs;exports.Bot=j0;exports.Button=Gs;exports.CAINavProvider=Fy;exports.CAlert=on;exports.CAmapChart=Hp;exports.CAppHeader=$i;exports.CAppHeaderSearch=wl;exports.CAppPageLayout=kE;exports.CAuthPage=g5;exports.CAvatar=rn;exports.CBadge=Wa;exports.CBarChart=ra;exports.CButton=we;exports.CCalendar=Un;exports.CCardDetailPanel=Jp;exports.CCardGrid=tu;exports.CCardGridCard=Bh;exports.CCardPage=eN;exports.CChartCard=xi;exports.CCheckbox=It;exports.CChip=xt;exports.CComboChart=Ep;exports.CCustomizeAgent=Vp;exports.CDatePicker=tb;exports.CDetailInfoPage=SA;exports.CDetailSearchAiBar=cu;exports.CDetailSectionCard=Bi;exports.CDialog=Lt;exports.CDivider=Dt;exports.CFileUpload=ob;exports.CFilterField=OT;exports.CFishboneChart=Op;exports.CGoogleMapChart=Bp;exports.CGraphCharts=zp;exports.CGraphKpiCards=Np;exports.CGraphReport=Pi;exports.CHeatmapChart=Lp;exports.CIconButton=ae;exports.CKanbanBoard=ZA;exports.CKanbanBucket=gu;exports.CKanbanCard=hl;exports.CLayoutManagement=Yp;exports.CLayoutManager=bn;exports.CLineChart=Ap;exports.CList=TT;exports.CListItem=IT;exports.CListItemAvatar=AT;exports.CListItemButton=MT;exports.CListItemIcon=RT;exports.CListItemText=DT;exports.CListSubheader=NT;exports.CMenu=Qt;exports.CMessageBox=jn;exports.CMetricChartCard=gs;exports.COrbCanvas=Ty;exports.CPageLayout=ui;exports.CPageTransition=hV;exports.CPaper=Ae;exports.CPieChart=Si;exports.CPivotTable=uO;exports.CPlanningGantt=Og;exports.CPlanningLayout=tV;exports.CPopover=Ws;exports.CProgress=$n;exports.CRadioGroup=If;exports.CSegmentedControl=_n;exports.CSelect=zt;exports.CSkeleton=Lf;exports.CSmartFilter=Wr;exports.CSmartTable=yD;exports.CSpinner=Xr;exports.CStack=ie;exports.CStandardPage=TD;exports.CStatusBadge=wT;exports.CSwitch=Va;exports.CTable=Jr;exports.CTableBody=gD;exports.CTableCell=fD;exports.CTableContainer=bD;exports.CTableHead=hD;exports.CTableRow=vD;exports.CTabs=jf;exports.CTextArea=Wn;exports.CTextField=ze;exports.CTooltip=ct;exports.CTreeComp=uV;exports.CTypography=L;exports.CValueHelp=Sp;exports.CVariantManagement=Ri;exports.CVariantManager=Gp;exports.CVoiceWaveOverlay=El;exports.CWaterfallChart=Fp;exports.Calendar=Bs;exports.CalendarDays=Q0;exports.Camera=J0;exports.ChartNoAxesCombined=eS;exports.Check=qr;exports.CheckCircle=Ia;exports.ChevronDown=Fr;exports.ChevronLeft=Ma;exports.ChevronRight=Br;exports.ChevronUp=tS;exports.ChevronsDown=rS;exports.ChevronsUp=oS;exports.CircleAlert=Ra;exports.CircleCheck=Bn;exports.CircleCheckBig=nS;exports.CircleStop=Mc;exports.Clipboard=Rc;exports.ClipboardCheck=aS;exports.ClipboardList=iS;exports.Clock=Dc;exports.CodeBlock=la;exports.Columns3=sS;exports.CopilotChat=$z;exports.Copy=vo;exports.CopyPlus=lS;exports.Delete=cS;exports.Download=dS;exports.Edit=Nc;exports.Expand=Ac;exports.Eye=pS;exports.EyeOff=uS;exports.File=Da;exports.FileText=Ec;exports.Filter=mS;exports.FloatingAgentPanel=Lz;exports.FolderTree=Hn;exports.GitBranch=Lc;exports.GlobalMessage=vT;exports.Globe=zn;exports.Grid=Oc;exports.GripVertical=gS;exports.Hammer=fS;exports.Image=Fc;exports.Info=Na;exports.InputArea=$l;exports.Languages=bS;exports.Layers=hS;exports.LayoutDashboard=vS;exports.Lightbulb=Aa;exports.LineChart=Bc;exports.Loader2=Hc;exports.Lock=Ea;exports.LockKeyhole=yS;exports.LogOut=zc;exports.METRIC_CHART_TYPES=ms;exports.Mail=Hs;exports.MapPin=Vc;exports.MarkdownRenderer=pa;exports.MathBlock=ca;exports.Menu=Wc;exports.MermaidBlock=cl;exports.MessageCircle=df;exports.MessageSquare=$c;exports.Mic=La;exports.MicOff=CS;exports.Moon=_c;exports.MoreHorizontal=xS;exports.NavigationIsland=cd;exports.NavigationIsland2=qs;exports.OMPHApprovalCard=Vx;exports.OMPHPanel=wz;exports.ORBCAFE_I18N_MESSAGES=qn;exports.ORB_DARK=Gg;exports.ORB_FONT_STACK=k0;exports.ORB_LIGHT=_g;exports.ORB_RADIUS=T0;exports.ORB_TOKENS=Es;exports.ORB_TRANSITION_FAST=I0;exports.OrbcafeI18nProvider=Ga;exports.OrbisModeProvider=Fn;exports.PAGE_TRANSITION_PRESETS=vV;exports.PAppPageLayout=zF;exports.PBarcodeScanner=DO;exports.PNavIsland=cm;exports.PNumericKeypad=UO;exports.PSmartFilter=nm;exports.PTable=yy;exports.PTouchCard=BO;exports.PWorkloadNav=am;exports.PackageCheck=SS;exports.PackageSearch=wS;exports.PanelLeftOpen=Oa;exports.PanelRight=Fa;exports.PanelsTopLeft=kS;exports.PieChart=Gc;exports.Pin=Jo;exports.PivotChartPanel=Yu;exports.Play=PS;exports.Plus=en;exports.QrCode=TS;exports.ReceiptText=IS;exports.RefreshCw=Ba;exports.Rocket=MS;exports.RotateCcw=RS;exports.RotateCw=Uc;exports.Rows3=DS;exports.SapIcon=Tt;exports.Save=NS;exports.ScanLine=AS;exports.Search=Hr;exports.Send=pf;exports.SendHorizontal=Kc;exports.Settings=tn;exports.ShieldCheck=ES;exports.Sigma=LS;exports.SortAsc=OS;exports.SquareSplitHorizontal=FS;exports.Star=BS;exports.StdChat=zm;exports.Sun=qc;exports.Table2=HS;exports.TableBlock=pl;exports.TabletSmartphone=zS;exports.Terminal=Vn;exports.ThinkBlock=Oi;exports.ThumbsDown=Xc;exports.ThumbsUp=Yc;exports.Trash2=Zc;exports.TreeMenu=Xn;exports.TreePine=VS;exports.TrendingDown=jc;exports.TriangleAlert=Ha;exports.Truck=WS;exports.UploadCloud=Qc;exports.User=zs;exports.VoiceNavigatorProvider=JF;exports.VoiceWaveOverlay=qF;exports.Volume2=Jc;exports.Warehouse=$S;exports.Workflow=_S;exports.X=jt;exports.XCircle=za;exports.addKanbanBucket=fu;exports.buildAmapEmbedUrl=wi;exports.buildGoogleMapEmbedUrl=oa;exports.buildGoogleMapIframe=dR;exports.buttonVariants=lb;exports.createKanbanBoardModel=hu;exports.createSapIcon=ne;exports.findKanbanCard=_r;exports.message=dT;exports.messageManager=ao;exports.moveKanbanCard=Vi;exports.orbAlpha=rt;exports.orbChartSeries=P0;exports.parseMarkdownTable=Li;exports.parseOmphFileHref=Ul;exports.renameKanbanBucket=bu;exports.renderMarkdown=XN;exports.resolveVariantFilters=Ai;exports.resolveVariantLayout=Ei;exports.useAINav=By;exports.useAmapEmbedUrl=gN;exports.useAuthPage=a5;exports.useCardPage=aN;exports.useDetailInfo=pu;exports.useGoogleMapEmbedUrl=mN;exports.useGraphChartData=lN;exports.useGraphInteraction=Ii;exports.useGraphReport=mn;exports.useKanbanBoard=tE;exports.useMediaQuery=Dr;exports.useNavigationIsland=fd;exports.useOrbMode=Cr;exports.useOrbTokens=Os;exports.useOrbcafeI18n=pe;exports.usePadLayout=xO;exports.usePadRecordEditor=kO;exports.usePageLayout=ku;exports.usePivotTable=hO;exports.usePlanningGantt=Rg;exports.usePlanningLayout=S5;exports.useStandardReport=AD;exports.useVoiceInput=Sn;exports.useVoiceNavigator=e2;
234
+ `,qz=({active:t=false,colors:r=Jx,zIndex:o=2147483e3})=>{let n={"--orbcafe-ai-glow-line":r[0],"--orbcafe-ai-glow-z-index":o};return c(jsxRuntime.Fragment,{children:[e("style",{children:e0}),e("div",{className:"orbcafe-ai-browser-glow","data-active":t?"true":"false",style:n,"aria-hidden":"true"})]})};var s5=({defaultMode:t="login",onLogin:r,onRegister:o,onForgotPassword:n}={})=>{let[a,i]=er.useState(t),[s,l]=er.useState(false),d=er.useCallback(async m=>{l(true);try{await m?.();}finally{l(false);}},[]),u=er.useCallback(m=>d(()=>r?.(m)),[r,d]),p=er.useCallback(m=>d(()=>o?.(m)),[o,d]),f=er.useCallback(m=>d(()=>n?.(m)),[n,d]),b=er.useMemo(()=>({mode:a,loading:s,onModeChange:i,onLogin:u,onRegister:p,onForgotPassword:f}),[f,u,p,s,a]);return {mode:a,loading:s,setMode:i,authPageProps:b}};P();var o0={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."},b5=({mode:t,defaultMode:r="login",onModeChange:o,onLogin:n,onRegister:a,onForgotPassword:i,loading:s=false,logo:l,copy:d,sx:u})=>{let p=t!==void 0,[f,b]=er.useState(r),m=t??f,v=er.useMemo(()=>({...o0,...d}),[d]),[y,g]=er.useState({username:"demo@orbcafe.local",password:"orbcafe-demo",remember:true}),[x,h]=er.useState({name:"",email:"",password:"",confirmPassword:"",acceptedTerms:false}),[C,k]=er.useState({email:""}),[w,T]=er.useState(""),I=E=>{p||b(E),T(""),o?.(E);},S=async E=>{E.preventDefault(),await n?.(y),T("Demo login accepted. No real authentication request was sent.");},A=async E=>{E.preventDefault(),await a?.(x),T("Demo registration saved locally for this screen.");},R=async E=>{E.preventDefault(),await i?.(C),T("Demo reset link request created. No email was sent.");},M=m==="login"?v.loginTitle:m==="register"?v.registerTitle:v.forgotTitle,N=m==="login"?v.loginSubtitle:m==="register"?v.registerSubtitle:v.forgotSubtitle;return c("div",{className:"orb-auth-frame orb-root",style:u,children:[c("div",{className:"orb-auth-brand",children:[e("span",{className:"orb-auth-dia",style:{width:230,height:230,right:-70,bottom:-60}}),e("span",{className:"orb-auth-dia orb-auth-dia-sm-hide",style:{width:140,height:140,right:120,bottom:80,borderColor:"rgba(255,255,255,.09)"}}),e("span",{className:"orb-auth-dia orb-auth-dia-sm-hide",style:{width:76,height:76,right:60,bottom:170,background:"color-mix(in oklch, var(--orb-primary) 35%, transparent)",borderColor:"rgba(255,255,255,.2)"}}),l?e("span",{style:{alignSelf:"flex-start",position:"relative"},children:l}):e("span",{className:"orb-logo-slot",children:"Host logo"}),c("div",{className:"orb-auth-claim",children:[e("div",{className:"orb-auth-rule"}),e("h2",{children:v.headline}),e("p",{children:v.subheadline})]}),e("div",{className:"orb-auth-meta",children:v.brandMeta})]}),e("div",{className:"orb-auth-form",children:c("div",{className:"orb-auth-card",children:[e("span",{className:"orb-overline",style:{letterSpacing:"0.12em"},children:v.productName}),e("h1",{className:"orb-h2",style:{margin:0},children:M}),e("p",{className:"orb-body-dense",style:{color:"var(--orb-muted)",margin:"-10px 0 0"},children:N}),w&&e(on,{severity:"success",children:w}),m==="login"&&c("form",{onSubmit:S,style:{display:"flex",flexDirection:"column",gap:16},children:[e(ze,{label:"Email",type:"email",autoComplete:"username",value:y.username,onChange:E=>g(O=>({...O,username:E.target.value})),startAdornment:e(Vs,{size:15,strokeWidth:1.8})}),e(ze,{label:"Password",type:"password",autoComplete:"current-password",value:y.password,onChange:E=>g(O=>({...O,password:E.target.value})),startAdornment:e(Ea,{size:15,strokeWidth:1.8})}),c("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12},children:[e(It,{label:"Remember me",checked:y.remember,onChange:E=>g(O=>({...O,remember:E.target.checked}))}),e("button",{type:"button",className:"orb-link",onClick:()=>I("forgot"),children:"Forgot password?"})]}),e(we,{type:"submit",size:"large",block:true,loading:s,children:s?"Signing in\u2026":"Sign in"}),c("p",{className:"orb-meta",style:{textAlign:"center",margin:0},children:["New user?"," ",e("button",{type:"button",className:"orb-link",onClick:()=>I("register"),children:"Register"})]})]}),m==="register"&&c("form",{onSubmit:A,style:{display:"flex",flexDirection:"column",gap:16},children:[e(ze,{label:"Full name",value:x.name,onChange:E=>h(O=>({...O,name:E.target.value})),startAdornment:e(Vs,{size:15,strokeWidth:1.8})}),e(ze,{label:"Work email",type:"email",autoComplete:"username",value:x.email,onChange:E=>h(O=>({...O,email:E.target.value})),startAdornment:e(zs,{size:15,strokeWidth:1.8})}),e(ze,{label:"Password",type:"password",autoComplete:"new-password",value:x.password,onChange:E=>h(O=>({...O,password:E.target.value})),startAdornment:e(Ea,{size:15,strokeWidth:1.8})}),e(ze,{label:"Confirm password",type:"password",autoComplete:"new-password",value:x.confirmPassword,onChange:E=>h(O=>({...O,confirmPassword:E.target.value}))}),e(It,{label:"I accept the demo workspace terms",checked:x.acceptedTerms,onChange:E=>h(O=>({...O,acceptedTerms:E.target.checked}))}),e(we,{type:"submit",size:"large",block:true,loading:s,children:"Create demo account"}),c("p",{className:"orb-meta",style:{textAlign:"center",margin:0},children:["Already have an account?"," ",e("button",{type:"button",className:"orb-link",onClick:()=>I("login"),children:"Sign in"})]})]}),m==="forgot"&&c("form",{onSubmit:R,style:{display:"flex",flexDirection:"column",gap:16},children:[e(ze,{label:"Work email",type:"email",autoComplete:"username",value:C.email,onChange:E=>k({email:E.target.value}),startAdornment:e(zs,{size:15,strokeWidth:1.8})}),e(we,{type:"submit",size:"large",block:true,loading:s,children:"Send reset request"}),c("p",{className:"orb-meta",style:{textAlign:"center",margin:0},children:["Remember your password?"," ",e("button",{type:"button",className:"orb-link",onClick:()=>I("login"),children:"Back to sign in"})]})]}),c("div",{style:{display:"flex",alignItems:"center",gap:12,font:"500 10px/1 var(--orb-font)",letterSpacing:"0.1em",textTransform:"uppercase",color:"var(--orb-muted)"},children:[e("span",{style:{flex:1,height:1,background:"var(--orb-border)"}}),"or",e("span",{style:{flex:1,height:1,background:"var(--orb-border)"}})]}),e(we,{variant:"neutral",size:"large",block:true,children:"Continue with corporate SSO"}),c("p",{className:"orb-meta",style:{textAlign:"center",fontWeight:300,margin:0},children:["Protected by corporate single sign-on.",e("br",{}),"Demo credentials: demo@orbcafe.local / orbcafe-demo"]})]})})]})};var a0={keyword:{value:"",operator:"contains"},status:{value:"",operator:"equals"},owner:{value:"",operator:"contains"},workCenter:{value:"",operator:"contains"}},i0=[{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"}],Ng=({tasks:t,appId:r,tableKey:o,defaultScale:n="week",defaultSelectedTaskId:a,initialFilters:i,filterFields:s,filterAppId:l,filterTableKey:d,serviceUrl:u,variantService:p,layout:f,columns:b,page:m,rowsPerPage:v,rowsPerPageOptions:y,count:g,onPageChange:x,onRowsPerPageChange:h,onFilterSearch:C,onFilterVariantLoad:k,enableRowReorder:w,onTaskReorder:T,onLayoutIdChange:I,onLayoutSave:S})=>{let A=r??l??"planning-gantt",R=o??d??"planning",[M,N]=er.useState(n),[E,O]=er.useState(a??t[0]?.id??""),[F,_]=er.useState(""),[B,Y]=er.useState(null),[W,j]=er.useState({...a0,...i}),V=er.useMemo(()=>{let ue=String(W.keyword?.value??"").trim().toLowerCase(),Se=String(W.status?.value??"").trim(),$e=String(W.owner?.value??"").trim().toLowerCase(),ke=String(W.workCenter?.value??"").trim().toLowerCase(),le=W.dateRange?.value,Ee=le?.[0]?oo__default.default(le[0]):null,Me=le?.[1]?oo__default.default(le[1]):null;return t.filter(Pe=>{if(ue&&![Pe.id,Pe.code,Pe.title,Pe.project,Pe.workCenter,Pe.owner?.name].join(" ").toLowerCase().includes(ue)||Se&&Pe.status!==Se||$e&&!String(Pe.owner?.name??"").toLowerCase().includes($e)||ke&&!String(Pe.workCenter??"").toLowerCase().includes(ke))return false;if(Ee||Me){let Ve=oo__default.default(Pe.startDate),tt=oo__default.default(Pe.endDate),nt=Ee?tt.isAfter(Ee)||tt.isSame(Ee,"day"):true,it=Me?Ve.isBefore(Me)||Ve.isSame(Me,"day"):true;if(!nt||!it)return false}return true})},[W,t]);er.useEffect(()=>{V.length!==0&&(V.some(ue=>ue.id===E)||O(V[0].id));},[V,E]);let z=er.useCallback(ue=>{O(ue.id);},[]),K=er.useCallback(ue=>{_(ue),I?.(ue);},[I]),q=er.useCallback(ue=>{Y(Se=>({key:(Se?.key??0)+1,variant:ue})),k?.(ue);},[k]),fe=er.useMemo(()=>({appId:A,tableKey:R,fields:s??i0,filters:W,onFilterChange:j,onVariantLoad:q,onSearch:C??(()=>{}),currentLayoutId:F,layoutRefs:[{tableKey:R,layoutId:F||null}],variantService:p,serviceUrl:u}),[F,s,W,q,C,A,R,u,p]),se=er.useMemo(()=>({appId:A,tableKey:R,serviceUrl:u,tasks:V,columns:b,scale:M,onScaleChange:N,page:m,rowsPerPage:v,rowsPerPageOptions:y,count:g,onPageChange:x,onRowsPerPageChange:h,selectedTaskId:E,onTaskSelect:z,enableRowReorder:w,onTaskReorder:T,layout:f,layoutVariant:B?.variant,layoutVariantLoadKey:B?.key,onLayoutIdChange:K,onLayoutSave:S}),[b,g,w,V,K,f,B?.key,B?.variant,x,h,S,T,z,m,A,R,v,y,M,u,E]);return {scale:M,setScale:N,selectedTaskId:E,setSelectedTaskId:O,filters:W,setFilters:j,filteredTasks:V,smartFilterProps:fe,planningGanttProps:se}};var k5=t=>{let r=Ng(t),o=er.useMemo(()=>({filterProps:r.smartFilterProps,ganttProps:r.planningGanttProps}),[r.planningGanttProps,r.smartFilterProps]);return {...r,layoutProps:o}};P();oo__default.default.extend(l0__default.default);var ic=[{value:"hour",label:"Hour",width:56},{value:"day",label:"Day",width:46},{value:"week",label:"Week",width:78},{value:"month",label:"Month",width:104}],sc=36,lc=58,wa=8,cc=260,f0=320,Uo="220ms cubic-bezier(0.2, 0, 0, 1)",Ag={"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"}},b0=t=>t?Ag[t]?.label??t:"Planned",h0=t=>t?Ag[t]?.color??"default":"info",Eg=t=>Math.min(100,Math.max(0,t??0)),Lg=(t,r=0)=>t.flatMap(o=>[{...o,level:r},...Lg(o.children??[],r+1)]),v0=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:b0(t.status),statusTone:t.status??"planned",progress:Eg(t.progress),startDate:t.startDate,endDate:t.endDate,color:t.color,reorderable:t.reorderable!==false}),Og=(t,r)=>r==="month"?t.startOf("month"):r==="week"?t.startOf("week"):r==="day"?t.startOf("day"):t.startOf("hour"),Fg=(t,r)=>r==="month"?t.endOf("month"):r==="week"?t.endOf("week"):r==="day"?t.endOf("day"):t.endOf("hour"),y0=(t,r,o)=>{let n=[],a=Og(t,o),i=Fg(r,o);for(;a.isBefore(i)||a.isSame(i);){let s=o==="month"?a.add(1,"month"):o==="week"?a.add(1,"week"):o==="day"?a.add(1,"day"):a.add(1,"hour");n.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:s}),a=s;}return n},dc=(t,r,o)=>{let n=0;for(let a of r){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*o}n+=o;}return n},Bg=({appId:t="planning-gantt",tableKey:r="planning",serviceUrl:o,title:n="Project Plan",extraTools:a,bodyHeight:i=560,tasks:s,columns:l,scale:d="week",onScaleChange:u,page:p,rowsPerPage:f=20,rowsPerPageOptions:b=[20,50,100,-1],count:m,onPageChange:v,onRowsPerPageChange:y,timelineStart:g,timelineEnd:x,selectedTaskId:h,onTaskSelect:C,enableRowReorder:k=true,onTaskReorder:w,layout:T,layoutVariant:I,layoutVariantLoadKey:S,onLayoutIdChange:A,onLayoutSave:R,emptyLabel:M="No planning tasks available.",sx:N})=>{let E=sr(),{t:O}=pe(),F=er.useRef(null),_=er.useRef(null),B=er.useRef(null),Y=er.useRef(false),[W,j]=er.useState(null),[V,z]=er.useState("content"),[K,q]=er.useState(null),[fe,se]=er.useState(0),[ue,Se]=er.useState({}),[$e,ke]=er.useState(sc),[le,Ee]=er.useState([]),Me=er.useRef(void 0),[Pe,Ve]=er.useState({activeId:null,overId:null}),[tt,nt]=er.useState(null),[it,X]=er.useState(false),De=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:4}})),ye=er.useRef(null),Be=er.useMemo(()=>Lg(s),[s]),at=er.useMemo(()=>{if(le.length===0)return Be;let H=new Map(Be.map(Te=>[Te.id,Te])),J=le.map(Te=>H.get(Te)).filter(Te=>!!Te),ge=new Set(J.map(Te=>Te.id));return [...J,...Be.filter(Te=>!ge.has(Te.id))]},[Be,le]),Ze=er.useMemo(()=>new Map(at.map(H=>[H.id,H])),[at]),St=er.useMemo(()=>at.map(H=>v0(H)),[at]),Mt=er.useMemo(()=>new Map(St.map(H=>[H.id,H])),[St]),Ot=er.useMemo(()=>[{id:"code",label:"ID",minWidth:90},{id:"title",label:"Task",minWidth:260,render:(H,J)=>c(ie,{spacing:.2,children:[e(L,{sx:{fontSize:15,fontWeight:700,lineHeight:1.2},children:J.title}),e(L,{sx:{fontSize:13,color:"text.secondary"},children:J.titleSub})]})},{id:"owner",label:"Owner",minWidth:170},{id:"status",label:"Status",minWidth:130,render:(H,J)=>e(xt,{label:J.status,color:h0(J.statusTone),size:"small"})},{id:"progress",label:"Progress",minWidth:140,numeric:true,render:H=>c(ie,{spacing:.6,children:[c(L,{variant:"caption",sx:{color:"text.secondary"},children:[H,"%"]}),e($n,{variant:"determinate",value:H,sx:{height:6,borderRadius:999}})]})},{id:"startDate",label:"Start",minWidth:120},{id:"endDate",label:"End",minWidth:120}],[]),At=er.useMemo(()=>{if(!l||l.length===0)return Ot;let H=new Map(Ot.map(J=>[J.id,J]));return l.map(J=>{let ge=H.get(J.id),Te=J.width??ge?.minWidth??120,et={id:J.id,label:J.label,minWidth:Te};if(ge?.numeric&&(et.numeric=true),J.render){let Xe=J.render;return et.render=(kt,bt)=>{let gt=Ze.get(bt.id);return Xe(gt||bt)},et}return ge?.render?(et.render=ge.render,et):(et.render=(Xe,kt)=>{let bt=kt[J.id];if(bt!=null&&String(bt).length>0)return String(bt);let Ct=Ze.get(kt.id)?.[J.id];return Ct!=null&&String(Ct).length>0?String(Ct):"-"},et)})},[l,Ot,Ze]),re=hn({appId:t,tableKey:r,title:n,columns:At,rows:St,rowKey:"id",page:p,rowsPerPage:f,rowsPerPageOptions:b,count:m??St.length,onPageChange:v,onRowsPerPageChange:y,showSummary:false,layout:T,onLayoutSave:R}),Ke=t?e(bn,{appId:t,tableKey:r,currentLayoutData:re.currentLayoutData,onLayoutLoad:re.handleLayoutLoad,targetLayoutId:re.layoutIdToLoad,activeLayoutId:re.currentLayoutId,serviceUrl:o}):null,Fe=re.visibleRows;er.useEffect(()=>{let H=Be.map(J=>J.id);Ee(J=>{let ge=new Set(H),Te=J.filter(bt=>ge.has(bt)),et=new Set(Te),Xe=H.filter(bt=>!et.has(bt)),kt=[...Te,...Xe];return kt.length===J.length&&kt.every((bt,gt)=>bt===J[gt])?J:kt});},[Be]),er.useEffect(()=>{S===void 0||!I||Me.current!==S&&(Me.current=S,re.handleVariantLoad(I));},[re,I,S]),er.useEffect(()=>{A?.(re.currentLayoutId);},[re.currentLayoutId,A]);let ce=H=>H.type==="group"?`group-${H.id}`:`row-${(H.data||H)?.id}`,ve=er.useMemo(()=>{let H=St.map(gt=>oo__default.default(gt.startDate)),J=St.map(gt=>oo__default.default(gt.endDate)),ge=g?oo__default.default(g):H.reduce((gt,Ct)=>Ct.isBefore(gt)?Ct:gt,H[0]??oo__default.default()),Te=x?oo__default.default(x):J.reduce((gt,Ct)=>Ct.isAfter(gt)?Ct:gt,J[0]??oo__default.default().add(30,"day")),et=d==="month"?"month":d==="week"?"week":d==="day"?"day":"hour",Xe=d==="month"?"month":d==="week"?"week":d==="day"?"day":"hour",kt=d==="hour"?12:1,bt=d==="hour"?12:1;return {start:Og(ge.subtract(kt,et),d),end:Fg(Te.add(bt,Xe),d)}},[St,d,x,g]),te=ic.find(H=>H.value===d)??ic[1],he=Array.isArray(a)?a:a?[a]:[],Ne=er.useMemo(()=>y0(ve.start,ve.end,d),[ve.end,ve.start,d]),Je=Ne.length*te.width,st=Ne.length>0?100/Ne.length:100,pt=Ne.length>0?`repeat(${Ne.length}, minmax(${te.width}px, 1fr))`:"1fr",Bt=Ne.length>0?`calc(100% / ${Ne.length}) 100%`:"100% 100%",Xt=(re.columns||[]).filter(H=>re.visibleColumns.includes(H.id)).reduce((H,J)=>H+(re.columnWidths?.[J.id]||J.minWidth||100),0)+(re.grouping.length>0?72:0),Vt=V==="manual"&&W!==null?W:Xt,wt=K==="table",Wt=K==="timeline",ht=K==="timeline",Nt=K==="table",lt=!ht&&!Nt,Ft=()=>{let H=fe||F.current?.clientWidth||0;return H>0?Math.max(cc,H-wa-f0):Math.max(cc,Xt)},Yt=H=>Math.min(Math.max(H,cc),Ft()),$=(()=>{if(fe<=0)return null;let H=lt?wa:0;if(wt)return {tableWidth:fe,splitterWidth:H,timelineWidth:0};if(Wt)return {tableWidth:0,splitterWidth:H,timelineWidth:fe};if(V==="even"){let ge=Math.max(0,(fe-H)/2);return {tableWidth:ge,splitterWidth:H,timelineWidth:Math.max(0,fe-H-ge)}}let J=Yt(Vt);return {tableWidth:J,splitterWidth:H,timelineWidth:Math.max(0,fe-H-J)}})(),Q=$?`${$.tableWidth}px ${$.splitterWidth}px ${$.timelineWidth}px`:wt?"minmax(0, 1fr) 0px 0px":Wt?"0px 0px minmax(0, 1fr)":V==="even"?`minmax(0, 1fr) ${wa}px minmax(0, 1fr)`:`${Vt}px ${wa}px minmax(0, 1fr)`;er.useEffect(()=>{V==="manual"&&j(H=>H===null?null:Yt(H));},[V,Xt,fe]);let be=H=>{H.preventDefault(),H.currentTarget.setPointerCapture(H.pointerId),q(null),z("manual"),ye.current={startX:H.clientX,startWidth:_.current?.getBoundingClientRect().width??Vt};let J=Te=>{let et=ye.current;if(!et)return;let Xe=Yt(et.startWidth+Te.clientX-et.startX);j(Xe);},ge=()=>{ye.current=null,window.removeEventListener("pointermove",J),window.removeEventListener("pointerup",ge),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",ge);},Ce=()=>{q(null),z("even"),j(null);},Le=H=>!k||!H?false:Mt.get(H)?.reorderable!==false,_e=(H,J)=>{if(!H||!J||H===J||!Le(H)||!Le(J))return false;if(re.grouping.length===0)return true;let ge=Mt.get(H),Te=Mt.get(J);return !ge||!Te?false:re.grouping.every(et=>ge[et]===Te[et])},qe=(H,J)=>{if(!_e(H,J))return;let ge=Fe.filter(Et=>Et.type!=="group").map(Et=>String((Et.data||Et)?.id)),Te=ge.indexOf(H),et=ge.indexOf(J);if(Te<0||et<0)return;let Xe=[...ge];[Xe[Te],Xe[et]]=[Xe[et],Xe[Te]];let kt=new Set(ge),bt=at.map(Et=>Et.id),gt=[...Xe,...bt.filter(Et=>!kt.has(Et))],Ct=Ze.get(H),nr=Ze.get(J);if(re.setOrder("asc"),re.setOrderBy(""),Ee(gt),Ct&&nr){let{level:Et,...Zt}=Ct,{level:Ht,...Kt}=nr,$t=gt.reduce((rr,ar)=>{let fr=Ze.get(ar);if(fr){let{level:Ir,...Mr}=fr;rr.push(Mr);}return rr},[]);w?.($t,{activeTask:Zt,targetTask:Kt});}},je=(H,J)=>{if(!Le(J.id)){H.preventDefault();return}H.stopPropagation(),H.dataTransfer.effectAllowed="move",H.dataTransfer.setData("text/plain",J.id),Ve({activeId:J.id,overId:null}),C?.(Ze.get(J.id)||J);},mt=(H,J)=>{if(!_e(Pe.activeId,J)){Ve(ge=>ge.overId===null?ge:{...ge,overId:null});return}H.preventDefault(),H.stopPropagation(),H.dataTransfer.dropEffect="move",Ve(ge=>ge.overId===J?ge:{...ge,overId:J});},ft=(H,J)=>{let ge=Pe.activeId||H.dataTransfer.getData("text/plain");if(!_e(ge,J)){Ve({activeId:null,overId:null});return}H.preventDefault(),H.stopPropagation(),qe(ge,J),Ve({activeId:null,overId:null});},Rt=()=>{Ve({activeId:null,overId:null});},yt=H=>{if(Y.current)return;let J=H==="table"?_.current:B.current,ge=H==="table"?B.current:_.current;!J||!ge||(Y.current=true,ge.scrollTop=J.scrollTop,window.requestAnimationFrame(()=>{Y.current=false;}));};return er.useLayoutEffect(()=>{let H=F.current;if(!H){se(0);return}let J=0,ge=()=>{window.cancelAnimationFrame(J),J=window.requestAnimationFrame(()=>{let et=H.clientWidth;se(Xe=>Math.abs(Xe-et)<.5?Xe:et);});};if(ge(),typeof ResizeObserver>"u")return window.addEventListener("resize",ge),()=>{window.cancelAnimationFrame(J),window.removeEventListener("resize",ge);};let Te=new ResizeObserver(ge);return Te.observe(H),window.addEventListener("resize",ge),()=>{window.cancelAnimationFrame(J),Te.disconnect(),window.removeEventListener("resize",ge);}},[St.length]),er.useLayoutEffect(()=>{if(!h||Nt)return;let H=B.current,J=_.current;if(!H)return;let ge=`row-${h}`,Te=Array.from(H.querySelectorAll("[data-planning-timeline-row-key]")).find(kt=>kt.dataset.planningTimelineRowKey===ge),et=Mt.get(h);if(!Te||!et)return;let Xe=window.requestAnimationFrame(()=>{let kt=H.getBoundingClientRect(),bt=Te.getBoundingClientRect(),gt=Math.max(1,H.clientHeight-$e),Ct=H.scrollTop+bt.top-kt.top-$e-(gt-bt.height)/2;Y.current=true,H.scrollTop=Math.max(0,Ct),J&&!ht&&(J.scrollTop=H.scrollTop);let nr=Math.max(1,H.scrollWidth),Et=Ne.length>0?nr/Ne.length:te.width,Zt=dc(oo__default.default(et.startDate),Ne,Et),Ht=Math.max(0,Zt-Et);H.scrollLeft=Math.min(Ht,Math.max(0,nr-H.clientWidth)),window.requestAnimationFrame(()=>{Y.current=false;});});return ()=>window.cancelAnimationFrame(Xe)},[te.width,$e,h,ht,Mt,Nt,Fe,Ne]),er.useLayoutEffect(()=>{let H=_.current;if(!H)return;let J=0,ge=0,Te=false,et=()=>{if(Te)return;let Ht=H.querySelector("thead"),Kt=Array.from(H.querySelectorAll("tbody tr[data-ctable-row-key]"));if(Kt.length===0)return;let $t=Ht?.getBoundingClientRect().height||sc,rr={};Kt.forEach(ar=>{let fr=ar.dataset.ctableRowKey;fr&&(rr[fr]=ar.getBoundingClientRect().height);}),ke(ar=>Math.abs(ar-$t)<.01?ar:$t),Se(ar=>{let fr=Object.keys(ar),Ir=Object.keys(rr);return fr.length===Ir.length&&Ir.every(Mr=>Math.abs((ar[Mr]??0)-rr[Mr])<.01)?ar:rr});},Xe=()=>{window.cancelAnimationFrame(J),J=window.requestAnimationFrame(et);};if(et(),window.cancelAnimationFrame(ge),ge=window.requestAnimationFrame(()=>{ge=window.requestAnimationFrame(et);}),typeof document<"u"&&document.fonts?.ready&&document.fonts.ready.then(()=>{Te||Xe();}).catch(()=>{}),typeof ResizeObserver>"u")return window.addEventListener("resize",Xe),()=>{Te=true,window.cancelAnimationFrame(J),window.cancelAnimationFrame(ge),window.removeEventListener("resize",Xe);};let kt=new ResizeObserver(Xe),bt=H.querySelector("table"),gt=H.querySelector("tbody"),Ct=H.querySelector("thead");bt&&kt.observe(bt),Ct&&kt.observe(Ct);let nr=new WeakSet,Et=()=>{H.querySelectorAll("tbody tr[data-ctable-row-key]").forEach(Ht=>{nr.has(Ht)||(kt.observe(Ht),nr.add(Ht));});};Et();let Zt=null;return gt&&typeof MutationObserver<"u"&&(Zt=new MutationObserver(()=>{Et(),Xe();}),Zt.observe(gt,{childList:true,subtree:true,characterData:true})),window.addEventListener("resize",Xe),()=>{Te=true,window.cancelAnimationFrame(J),window.cancelAnimationFrame(ge),kt.disconnect(),Zt?.disconnect(),window.removeEventListener("resize",Xe);}},[Fe,re.visibleColumns,re.grouping,re.columnWidths]),c(Ae,{className:"orb-ctable-surface orb-planning-gantt",elevation:0,sx:{m:0,p:0,display:"flex",flexDirection:"column",minHeight:0,overflow:"hidden",borderRadius:"var(--orb-r-container)",border:`1px solid ${E.palette.divider}`,...N},children:[e("div",{className:"orb-table-toolbar orb-planning-table-toolbar",role:"toolbar","aria-label":O("table.title.default"),children:c("div",{className:"orb-table-toolbar-primary",children:[e(gi,{value:re.filterText,onChange:H=>{re.setFilterText(H),re.setPage(0);}}),e(mi,{rowsPerPage:re.rowsPerPage,rowsPerPageOptions:b,page:re.page,count:re.totalDisplayCount,onRowsPerPageChange:re.setRowsPerPage,onPageChange:re.setPage}),he.length>0&&e("div",{className:"orb-table-toolbar-custom",children:he.map((H,J)=>e("div",{className:"orb-planning-extra-tool",children:H},`planning-extra-tool-${J}`))}),e("span",{className:"orb-table-toolbar-spacer"}),c("div",{className:"orb-table-toolbar-actions",children:[c("div",{className:"orb-table-tool-group",children:[e(ae,{className:"orb-table-tool-button",tooltip:"Column visibility",onClick:H=>re.setAnchorEl(H.currentTarget),sx:pr,children:e(ln,{fontSize:"small"})}),e(ae,{className:"orb-table-tool-button",tooltip:"Group by",onClick:H=>re.setGroupAnchorEl(H.currentTarget),sx:pr,children:e(So,{fontSize:"small"})}),e(ae,{className:`orb-table-tool-button ${re.sortBy.length>0||re.orderBy?"orb-is-active":""}`,tooltip:"Sort by...",active:re.sortBy.length>0||!!re.orderBy,onClick:()=>X(true),sx:pr,children:e(up,{fontSize:"small"})})]}),Ke&&e("div",{className:"orb-table-tool-group",children:Ke}),e("div",{className:"orb-table-tool-group orb-planning-pane-controls",children:e(_n,{"aria-label":"Planning pane layout",size:"small",value:K??(V==="even"?"split":null),options:[{value:"table",label:"Expand task table",icon:e(si,{fontSize:"small"})},{value:"split",label:"Split evenly",icon:e(ci,{fontSize:"small"})},{value:"timeline",label:"Expand timeline",icon:e(ii,{fontSize:"small"})}],onValueChange:H=>{H==="split"?Ce():q(H);}})}),e("div",{className:"orb-table-tool-group orb-planning-scale-control",children:e(zt,{label:"",value:d,options:ic.map(H=>({value:H.value,label:H.label})),onChange:H=>u?.(H.target.value)})})]})]})}),St.length===0?e("div",{sx:{minHeight:240,display:"grid",placeItems:"center",color:"text.secondary"},children:M}):e("div",{sx:{overflow:"hidden",flex:1,minHeight:0},children:c("div",{ref:F,sx:{height:"100%",display:"grid",gridTemplateColumns:Q,minWidth:0,transition:`grid-template-columns ${Uo}`},children:[e("div",{"data-planning-scroll-pane":"table",ref:_,onScroll:()=>yt("table"),sx:{width:"100%",minWidth:0,maxWidth:"100%",height:i,overflowX:"auto",overflowY:"auto",opacity:ht?0:1,transform:ht?"translateX(-10px)":"translateX(0)",pointerEvents:ht?"none":"auto",transition:`opacity ${Uo}, transform ${Uo}`},children:e(core.DndContext,{sensors:De,collisionDetection:core.closestCenter,modifiers:[modifiers.restrictToHorizontalAxis],onDragEnd:H=>{let J=H?.active?.id,ge=H?.over?.id;typeof J=="string"&&typeof ge=="string"&&re.handleColumnReorder(J,ge);},children:c("table",{className:"orb-tbl orb-ctable orb-planning-table",sx:{tableLayout:"fixed",width:Xt,"& thead th":{height:sc,py:0,lineHeight:1.15,boxSizing:"border-box"}},children:[e(hi,{columns:re.columns,visibleColumns:re.visibleColumns,order:re.order,orderBy:re.orderBy,sortBy:re.sortBy,onRequestSort:re.handleRequestSort,onContextMenu:(H,J)=>{H.preventDefault(),H.stopPropagation(),nt({mouseX:H.clientX+2,mouseY:H.clientY-6,columnId:J});},grouping:re.grouping,isAllExpanded:re.isAllExpanded,handleToggleAll:re.handleToggleAll,columnWidths:re.columnWidths,onColumnResize:re.handleColumnResize,enableColumnReorder:true}),e(vi,{visibleRows:Fe,columns:re.columns,visibleColumns:re.visibleColumns,selected:h?[h]:[],expandedGroups:re.expandedGroups,toggleGroupExpand:re.toggleGroupExpand,handleExpandGroupRecursively:re.handleExpandGroupRecursively,handleCollapseGroupRecursively:re.handleCollapseGroupRecursively,isGroupFullyExpanded:re.isGroupFullyExpanded,grouping:re.grouping,rowKeyProp:"id",page:re.page,rowsPerPage:re.rowsPerPage,emptyLabel:M,handleClick:(H,J)=>{C?.(Ze.get(J.id)||J);},getRowDataKey:({entry:H})=>ce(H),getGroupRowProps:()=>({style:{height:lc}}),getRowProps:({data:H})=>{let J=H,ge=Le(J.id),Te=Pe.activeId===J.id,et=Pe.overId===J.id&&_e(Pe.activeId,J.id);return {draggable:ge,className:et?"orb-is-drop-target":void 0,style:{cursor:Te?"grabbing":ge?"grab":C?"pointer":"default",height:lc,opacity:Te?.56:1,transition:"background-color 120ms ease, opacity 120ms ease"},onDragStart:Xe=>je(Xe,J),onDragOver:Xe=>mt(Xe,J.id),onDragEnter:Xe=>mt(Xe,J.id),onDrop:Xe=>ft(Xe,J.id),onDragEnd:Rt}}})]})})}),e("div",{onPointerDown:lt?be:void 0,role:"separator","aria-orientation":"vertical",sx:{width:lt?wa:0,cursor:lt?"col-resize":"default",opacity:lt?1:0,pointerEvents:lt?"auto":"none",borderLeft:lt?`1px solid ${E.palette.divider}`:"0 solid transparent",borderRight:lt?`1px solid ${E.palette.divider}`:"0 solid transparent",backgroundColor:vt()==="dark"?"color-mix(in oklch, var(--orb-muted) 10%, transparent)":"color-mix(in oklch, var(--orb-fg) 4%, transparent)",transition:`width ${Uo}, opacity ${Uo}, background-color 120ms ease`,position:"relative","&:hover":{backgroundColor:E.palette.action.selected},"&::before":{content:'""',position:"absolute",top:0,bottom:0,left:-6,right:-6,cursor:lt?"col-resize":"default"}}}),e("div",{sx:{minWidth:0,overflow:"hidden",opacity:Nt?0:1,transform:Nt?"translateX(10px)":"translateX(0)",pointerEvents:Nt?"none":"auto",transition:`opacity ${Uo}, transform ${Uo}`},children:e("div",{"data-planning-scroll-pane":"timeline",ref:B,onScroll:()=>yt("timeline"),sx:{width:"100%",height:i,overflowX:"auto",overflowY:"auto"},children:c("div",{sx:{width:"100%",minWidth:Je||"100%"},children:[e("div",{className:"orb-planning-timeline-header",sx:{display:"grid",gridTemplateColumns:pt,height:$e,boxSizing:"border-box",borderBottom:`1px solid ${E.palette.divider}`,position:"sticky",top:0,zIndex:2},children:Ne.map(H=>c("div",{title:H.title,sx:{px:.75,display:"flex",flexDirection:H.contextLabel?"column":"row",alignItems:"center",justifyContent:"center",gap:H.contextLabel?.15:0,borderRight:`1px solid ${E.palette.divider}`,color:H.contextLabel?"text.primary":"text.secondary",overflow:"hidden"},children:[H.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:H.contextLabel}),e(L,{component:"span",sx:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:12,fontWeight:700,lineHeight:1.15},children:H.label})]},H.key))}),e(ie,{sx:{position:"relative"},children:Fe.map(H=>{let J=ce(H),ge=ue[J]??lc;if(H.type==="group")return e("div",{className:"orb-planning-timeline-row orb-table-group-row","data-planning-timeline-row-key":J,sx:{position:"relative",height:ge,boxSizing:"border-box",borderBottom:`1px solid ${E.palette.divider}`}},H.id);let Te=H.data||H,et=oo__default.default(Te.startDate),Xe=oo__default.default(Te.endDate),kt=dc(et,Ne,st),bt=dc(Xe,Ne,st),gt=Math.max(0,bt-kt),Ct=Eg(Te.progress),nr=Te.id===h,Et=Le(Te.id),Zt=Pe.activeId===Te.id,Ht=Pe.overId===Te.id&&_e(Pe.activeId,Te.id),Kt=Te.color??(Te.statusTone==="blocked"?E.palette.error.main:E.palette.primary.main);return e("div",{className:`orb-planning-timeline-row ${nr?"orb-is-selected":""}`,"data-planning-timeline-row-key":J,draggable:Et,onDragStart:$t=>je($t,Te),onDragOver:$t=>mt($t,Te.id),onDragEnter:$t=>mt($t,Te.id),onDrop:$t=>ft($t,Te.id),onDragEnd:Rt,onClick:()=>C?.(Ze.get(Te.id)||Te),sx:{position:"relative",height:ge,boxSizing:"border-box",borderBottom:`1px solid ${E.palette.divider}`,opacity:Zt?.56:1,"&::before":{content:'""',position:"absolute",top:0,left:0,right:0,height:2,backgroundColor:E.palette.primary.main,opacity:Ht?1:0,transition:"opacity 120ms ease",pointerEvents:"none",zIndex:3},backgroundImage:vt()==="dark"?"linear-gradient(90deg, color-mix(in oklch, var(--orb-muted) 8%, transparent) 1px, transparent 1px)":"linear-gradient(90deg, color-mix(in oklch, var(--orb-fg) 6%, transparent) 1px, transparent 1px)",backgroundSize:Bt,cursor:Zt?"grabbing":Et?"grab":C?"pointer":"default",transition:"opacity 120ms ease"},children:e(ct,{title:`${Te.title}: ${et.format("MMM D HH:mm")} - ${Xe.format("MMM D HH:mm")}`,children:c("div",{sx:{position:"absolute",left:`${kt}%`,top:Math.max(8,(ge-24)/2),width:`max(18px, ${gt}%)`,height:24,borderRadius:999,overflow:"hidden",backgroundColor:vt()==="dark"?"color-mix(in oklch, var(--orb-muted) 18%, transparent)":"color-mix(in oklch, var(--orb-fg) 10%, transparent)",outline:nr?`2px solid ${E.palette.warning.main}`:"none",outlineOffset:2},children:[e("div",{sx:{height:"100%",width:`${Ct}%`,backgroundColor:Kt}}),e(L,{sx:{position:"absolute",inset:0,px:1,display:"flex",alignItems:"center",color:"var(--orb-on-primary)",fontSize:11,fontWeight:800,textShadow:"0 1px 4px rgba(0,0,0,0.45)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:Te.code})]})})},Te.id)})})]})})})]})}),e(pn,{groupAnchorEl:re.groupAnchorEl,setGroupAnchorEl:re.setGroupAnchorEl,grouping:re.grouping,setGrouping:re.setGrouping,columns:re.columns}),e(un,{anchorEl:re.anchorEl,setAnchorEl:re.setAnchorEl,columns:re.columns,visibleColumns:re.visibleColumns,toggleColumnVisibility:re.toggleColumnVisibility}),e(Dp,{contextMenu:tt,handleClose:()=>nt(null),columns:re.columns,visibleColumns:re.visibleColumns,grouping:re.grouping,summaryColumns:re.summaryColumns,showSummary:re.showSummary,sortBy:re.sortBy,orderBy:re.orderBy,order:re.order,onSortAsc:H=>{re.applyMultiSort([{field:H,direction:"asc"}]);},onSortDesc:H=>{re.applyMultiSort([{field:H,direction:"desc"}]);},onClearSort:H=>{let J=re.sortBy.filter(ge=>ge.field!==H);J.length>0?re.applyMultiSort(J):(re.clearMultiSort(),re.orderBy===H&&re.setOrderBy(""));},onHideColumn:H=>{re.visibleColumns.includes(H)&&re.toggleColumnVisibility(H);},onToggleGroup:H=>re.toggleGroupField(H),onToggleSummary:H=>re.toggleSummaryColumn(H),onOpenSortDialog:()=>X(true)}),e(Np,{open:it,onClose:()=>X(false),columns:re.columns,initialRules:re.sortBy.length>0?re.sortBy:re.orderBy?[{field:re.orderBy,direction:re.order}]:[],onApply:H=>re.applyMultiSort(H),onClear:()=>{re.clearMultiSort(),re.setOrderBy("");}})]})};P();var oV=({filterProps:t,ganttProps:r,spacing:o=2,sx:n,children:a})=>{let i=n?[{height:"100%",overflow:"hidden"},n]:{height:"100%",overflow:"hidden"},s=r.sx?[{height:"100%"},r.sx]:{height:"100%"};return c(ie,{spacing:o,sx:i,children:[e("div",{sx:{flexShrink:0},children:e(Wr,{...t})}),e("div",{sx:{flex:1,minHeight:0,overflow:"hidden"},children:e(Bg,{...r,bodyHeight:r.bodyHeight??"100%",sx:s})}),a]})};P();var Hg=640,C0=360,x0=360,As=8,En="220ms cubic-bezier(0.2, 0, 0, 1)",mc=(t,r,o=0,n=[])=>t.flatMap(a=>{let i=a.children??[],s=[{node:a,level:o,hasChildren:i.length>0,parentIds:n}];return r.has(a.id)?[...s,...mc(i,r,o+1,[...n,a.id])]:s}),Vg=t=>t.flatMap(r=>[r,...Vg(r.children??[])]),Wg=(t,r=0,o=[])=>t.flatMap(n=>{let a=n.children??[];return [{node:n,level:r,hasChildren:a.length>0,parentIds:o},...Wg(a,r+1,[...o,n.id])]}),$g=t=>t.flatMap(r=>{let o=r.children??[];return o.length===0?[]:[r.id,...$g(o)]}),zg=t=>Object.entries(t).filter(([r])=>r!=="children").map(([,r])=>r==null?"":typeof r=="string"||typeof r=="number"||typeof r=="boolean"?String(r):"").join(" ").toLowerCase(),gV=({title:t,subtitle:r,nodes:o,columns:n,detail:a,selectedNodeId:i,defaultSelectedNodeId:s,onNodeSelect:l,expandedNodeIds:d,defaultExpandedNodeIds:u,onExpandedNodeIdsChange:p,defaultPaneMode:f="split",minTreePaneWidth:b=C0,minDetailPaneWidth:m=x0,tableAppId:v="ctree-comp",tableKey:y="default",tableTitle:g,filterConfig:x,searchQuery:h,searchToken:C,defaultRowsPerPage:k=-1,rowsPerPageOptions:w=[20,50,100,-1],serviceUrl:T,emptyLabel:I="No tree items available.",headerAction:S,sx:A,className:R})=>{let M=sr(),N=er.useRef(null),E=er.useRef(null),O=er.useRef(null),[F,_]=er.useState(s??o[0]?.id??null),[B,Y]=er.useState(u??$g(o).slice(0,3)),[W,j]=er.useState(f),[V,z]=er.useState(Hg),[K,q]=er.useState(0),[fe,se]=er.useState(0),[ue,Se]=er.useState(k),$e=er.useMemo(()=>n&&n.length>0?n:[{id:"label",label:"Name",render:ce=>c(ie,{spacing:.3,children:[e(L,{sx:{fontSize:15,fontWeight:700,lineHeight:1.15},children:ce.label}),ce.subtitle&&e(L,{sx:{fontSize:13,color:"text.secondary",lineHeight:1.2},children:ce.subtitle})]})}],[n]),ke=er.useMemo(()=>new Set(d??B),[d,B]),le=er.useMemo(()=>mc(o,ke),[o,ke]),Ee=er.useMemo(()=>Vg(o),[o]),Me=er.useMemo(()=>Wg(o),[o]),Pe=i===void 0?F:i,Ve=er.useMemo(()=>Ee.find(ce=>ce.id===Pe)??null,[Pe,Ee]),tt=ce=>{let ve=E.current?.clientWidth??0,te=ve>0?Math.max(b,ve-As-m):Math.max(b,ce);return Math.min(Math.max(ce,b),te)},nt=W==="detail",it=W==="tree"||!a,X=W==="split"&&!!a,ye=(()=>{if(K<=0)return null;if(W==="tree"||!a)return {treeWidth:K,splitterWidth:0,detailWidth:0};if(W==="detail")return {treeWidth:0,splitterWidth:0,detailWidth:K};let ce=X?As:0,ve=tt(V);return {treeWidth:ve,splitterWidth:ce,detailWidth:Math.max(0,K-ce-ve)}})(),Be=ye?`${ye.treeWidth}px ${ye.splitterWidth}px ${ye.detailWidth}px`:W==="tree"||!a?"minmax(0, 1fr) 0px 0px":W==="detail"?"0px 0px minmax(0, 1fr)":`minmax(${b}px, ${V}px) ${As}px minmax(${m}px, 1fr)`;er.useEffect(()=>{let ce=E.current;if(!ce){q(0);return}let ve=0,te=()=>{window.cancelAnimationFrame(ve),ve=window.requestAnimationFrame(()=>{let Ne=ce.clientWidth;q(Je=>Math.abs(Je-Ne)<.5?Je:Ne);});};if(te(),typeof ResizeObserver>"u")return window.addEventListener("resize",te),()=>{window.cancelAnimationFrame(ve),window.removeEventListener("resize",te);};let he=new ResizeObserver(te);return he.observe(ce),window.addEventListener("resize",te),()=>{window.cancelAnimationFrame(ve),he.disconnect(),window.removeEventListener("resize",te);}},[]);let at=ce=>{d===void 0&&Y(ce),p?.(ce);},Ze=ce=>{let ve=new Set(ke);ve.has(ce)?ve.delete(ce):ve.add(ce),at(Array.from(ve));},St=ce=>{i===void 0&&_(ce.id),l?.(ce);};er.useEffect(()=>{se(0);},[o]),er.useEffect(()=>{let ce=h?.trim().toLowerCase();if(!ce)return;let ve=Me.find(({node:pt})=>zg(pt).includes(ce));if(!ve)return;let te=new Set(ke);ve.parentIds.forEach(pt=>te.add(pt)),at(Array.from(te)),St(ve.node);let Ne=mc(o,te).findIndex(({node:pt})=>pt.id===ve.node.id);Ne>=0&&ue>0&&se(Math.floor(Ne/ue));let Je=0,st=0;return Je=window.requestAnimationFrame(()=>{st=window.requestAnimationFrame(()=>{let pt=N.current?.querySelector("tr.orb-selected"),Bt=pt?.closest(".orb-table-container");if(pt&&Bt){let Xt=Bt.getBoundingClientRect(),Vt=pt.getBoundingClientRect(),wt=Vt.top-Xt.top+Bt.scrollTop;Bt.scrollTo({top:wt-Bt.clientHeight/2+Vt.height/2,behavior:"smooth"});return}pt?.scrollIntoView({block:"center",behavior:"smooth"});});}),()=>{window.cancelAnimationFrame(Je),window.cancelAnimationFrame(st);}},[h,C,Me,o,ue]);let Mt=er.useMemo(()=>le.map(({node:ce,level:ve,hasChildren:te})=>({...ce,id:ce.id,__node:ce,__level:ve,__hasChildren:te,__expanded:ke.has(ce.id),__searchText:zg(ce)})),[ke,le]),Ot=er.useMemo(()=>$e.map((ce,ve)=>({id:ce.id,label:ce.label,minWidth:typeof ce.width=="number"?ce.width:ce.minWidth??(ve===0?320:120),numeric:ce.numeric??ce.align==="right",render:(te,he)=>{let Ne=he.__node,Je=ce.render?ce.render(Ne):Ne[ce.id];if(ve!==0)return e(Ie,{sx:{minWidth:0,color:ce.align==="right"?"text.primary":"text.secondary",fontWeight:ce.align==="right"?750:500,textAlign:ce.align??"left"},children:Je});let st=Number(he.__level??0),pt=!!he.__hasChildren,Bt=!!he.__expanded;return c(ie,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0,pl:`${st*24}px`},children:[e(ae,{tooltip:pt?Bt?"Collapse":"Expand":"",onClick:Xt=>{Xt.stopPropagation(),pt&&Ze(Ne.id);},disabled:!pt,sx:{width:24,height:24,visibility:pt?"visible":"hidden",transform:Bt?"rotate(0deg)":"rotate(-90deg)",transition:"transform 160ms ease"},children:e(Vr,{sx:{fontSize:20}})}),e(Ie,{sx:{width:10,height:10,borderRadius:"50%",flexShrink:0,backgroundColor:Ne.markerColor??M.palette.primary.main}}),e(Ie,{sx:{minWidth:0},children:Je})]})}})),[$e,ke,M.palette.primary.main]),At=ce=>{if(!X)return;ce.preventDefault(),ce.currentTarget.setPointerCapture(ce.pointerId),O.current={startX:ce.clientX,startWidth:V};let ve=he=>{let Ne=O.current;Ne&&z(tt(Ne.startWidth+he.clientX-Ne.startX));},te=()=>{O.current=null,window.removeEventListener("pointermove",ve),window.removeEventListener("pointerup",te),document.body.style.cursor="",document.body.style.userSelect="";};document.body.style.cursor="col-resize",document.body.style.userSelect="none",window.addEventListener("pointermove",ve),window.addEventListener("pointerup",te);},re=()=>{let ce=E.current?.clientWidth??0,ve=ce>0?Math.max(b,(ce-As)/2):Hg;j("split"),z(tt(ve));},Ke=()=>a?typeof a=="function"?a(Ve):a:null,Fe=a?e(_n,{"aria-label":"Tree pane layout",value:W,options:[{value:"tree",label:"Expand tree",icon:e(si,{fontSize:"small"})},{value:"split",label:"Split evenly",icon:e(ci,{fontSize:"small"})},{value:"detail",label:"Expand detail",icon:e(ii,{fontSize:"small"})}],onValueChange:ce=>{ce==="split"?re():j(ce);},sx:{position:"absolute",top:13,right:56,zIndex:3,backdropFilter:"blur(10px)"}}):null;return c(Ie,{ref:N,className:["ctree_comp",R].filter(Boolean).join(" "),sx:{position:"relative",height:"100%",minHeight:0,border:`1px solid ${M.palette.divider}`,borderRadius:"var(--orb-r-container)",overflow:"hidden",backgroundColor:"background.paper",boxShadow:`0 18px 42px ${rt(M.palette.common.black,vt()==="dark"?.24:.08)}`,...A},children:[Fe,c(Ie,{ref:E,sx:{height:"100%",display:"grid",gridTemplateColumns:Be,transition:`grid-template-columns ${En}`,minWidth:0},children:[c(Ie,{"aria-hidden":nt?true:void 0,sx:{minWidth:0,overflow:"hidden",display:"flex",flexDirection:"column",opacity:nt?0:1,transform:nt?"translateX(-12px)":"translateX(0)",pointerEvents:nt?"none":"auto",transition:`opacity ${En}, transform ${En}`,willChange:"opacity, transform"},children:[c(ie,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:2,sx:{px:2,py:1.5,minHeight:74,borderBottom:`1px solid ${M.palette.divider}`},children:[c(ie,{direction:"row",alignItems:"center",spacing:1.4,sx:{minWidth:0},children:[e(So,{sx:{color:"primary.main",fontSize:28}}),c(Ie,{sx:{minWidth:0},children:[e(L,{sx:{fontSize:20,fontWeight:750,lineHeight:1.12},noWrap:true,children:t}),r&&e(L,{sx:{fontSize:14,color:"text.secondary",mt:.3},noWrap:true,children:r})]})]}),S!==void 0?S:e(ae,{tooltip:"Add node",color:"default",children:e(Ho,{fontSize:"small"})})]}),c(Ie,{sx:{flex:1,minHeight:0,overflow:"hidden"},children:[e(Jr,{appId:v,tableKey:y,title:g??(typeof t=="string"?t:"Tree"),columns:Ot,rows:Mt,rowKey:"id",fitContainer:true,fullWidth:true,showSummary:false,selectionMode:"single",selected:Pe?[Pe]:[],onSelectionChange:ce=>{let ve=ce[ce.length-1],te=Ee.find(he=>he.id===ve);te&&St(te);},page:fe,rowsPerPage:ue,rowsPerPageOptions:w,count:Mt.length,onPageChange:se,onRowsPerPageChange:ce=>{se(0),Se(ce);},filterConfig:x,serviceUrl:T,graphReport:{enabled:false},disableGrouping:true,disableSorting:true,maxHeight:"100%"}),Mt.length===0&&e(Ie,{sx:{minHeight:220,display:"grid",placeItems:"center",color:"text.secondary"},children:I})]})]}),e(Ie,{"data-ctree-splitter":"true",role:"separator","aria-orientation":"vertical",onPointerDown:X?At:void 0,sx:{width:"100%",cursor:X?"col-resize":"default",backgroundColor:X?rt(M.palette.text.primary,vt()==="dark"?.16:.08):"transparent",opacity:X?1:0,pointerEvents:X?"auto":"none",position:"relative",transition:`opacity ${En}, background-color 120ms ease`,"&:hover":{backgroundColor:X?rt(M.palette.primary.main,vt()==="dark"?.35:.18):"transparent"}}}),c(Ie,{"aria-hidden":it?true:void 0,sx:{minWidth:0,overflow:"hidden",display:"flex",flexDirection:"column",opacity:it?0:1,transform:it?"translateX(12px)":"translateX(0)",pointerEvents:it?"none":"auto",transition:`opacity ${En}, transform ${En}`,willChange:"opacity, transform"},children:[e(Ie,{sx:{px:2,pt:2,minHeight:74,display:"flex",alignItems:"flex-end"},children:e(Dt,{sx:{width:"100%"}})}),e(Ie,{sx:{flex:1,minHeight:0,overflow:"auto",px:2,pb:2},children:Ke()})]})]})]})};P();var P0={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)"}}},yV=({children:t,transitionKey:r,variant:o="fade",durationMs:n=220,delayMs:a=0,easing:i="cubic-bezier(0.22, 1, 0.36, 1)",disabled:s=false,sx:l})=>{let d=xo("(prefers-reduced-motion: reduce)"),[u,p]=er.useState("to"),f=!s&&!d&&o!=="none";er.useEffect(()=>{if(!f){p("to");return}p("from");let v=requestAnimationFrame(()=>{v=requestAnimationFrame(()=>{p("to");});});return ()=>cancelAnimationFrame(v)},[r,f]);let b=P0[o],m=er.useMemo(()=>f?u==="from"?b.from:b.to:{opacity:1,transform:"none"},[f,u,b.from,b.to]);return e(Ie,{sx:{willChange:f?"opacity, transform":"auto",transition:f?`opacity ${n}ms ${i} ${a}ms, transform ${n}ms ${i} ${a}ms`:"none",backfaceVisibility:"hidden",...m,...l},children:t})},CV={subtle:{variant:"fade",durationMs:180},smooth:{variant:"slide-up",durationMs:220},snappy:{variant:"scale",durationMs:160}};exports.AIBrowserGlow=qz;exports.Activity=Pc;exports.AgentPanel=$m;exports.AlertCircle=Ta;exports.AlertTriangle=Tc;exports.ArrowDown=Q0;exports.ArrowRight=J0;exports.ArrowUp=Ic;exports.BarChart=Bs;exports.Bot=eS;exports.Button=Us;exports.CAINavProvider=Hy;exports.CAlert=on;exports.CAmapChart=zp;exports.CAppHeader=$i;exports.CAppHeaderSearch=kl;exports.CAppPageLayout=TE;exports.CAuthPage=b5;exports.CAvatar=rn;exports.CBadge=Wa;exports.CBarChart=ra;exports.CButton=we;exports.CCalendar=Un;exports.CCardDetailPanel=eu;exports.CCardGrid=ru;exports.CCardGridCard=zh;exports.CCardPage=rN;exports.CChartCard=xi;exports.CCheckbox=It;exports.CChip=xt;exports.CComboChart=Lp;exports.CCustomizeAgent=Wp;exports.CDatePicker=ob;exports.CDetailInfoPage=kA;exports.CDetailSearchAiBar=du;exports.CDetailSectionCard=Bi;exports.CDialog=Lt;exports.CDivider=Dt;exports.CFileUpload=ab;exports.CFilterField=BT;exports.CFishboneChart=Fp;exports.CGoogleMapChart=Hp;exports.CGraphCharts=Vp;exports.CGraphKpiCards=Ap;exports.CGraphReport=Pi;exports.CHeatmapChart=Op;exports.CIconButton=ae;exports.CKanbanBoard=QA;exports.CKanbanBucket=fu;exports.CKanbanCard=vl;exports.CLayoutManagement=Zp;exports.CLayoutManager=bn;exports.CLineChart=Ep;exports.CList=MT;exports.CListItem=RT;exports.CListItemAvatar=LT;exports.CListItemButton=DT;exports.CListItemIcon=NT;exports.CListItemText=AT;exports.CListSubheader=ET;exports.CMenu=Qt;exports.CMessageBox=jn;exports.CMetricChartCard=gs;exports.COrbCanvas=My;exports.CPageLayout=ui;exports.CPageTransition=yV;exports.CPaper=Ae;exports.CPieChart=Si;exports.CPivotTable=gO;exports.CPlanningGantt=Bg;exports.CPlanningLayout=oV;exports.CPopover=$s;exports.CProgress=$n;exports.CRadioGroup=Rf;exports.CSegmentedControl=_n;exports.CSelect=zt;exports.CSkeleton=Ff;exports.CSmartFilter=Wr;exports.CSmartTable=xD;exports.CSpinner=Xr;exports.CStack=ie;exports.CStandardPage=MD;exports.CStatusBadge=PT;exports.CSwitch=Va;exports.CTable=Jr;exports.CTableBody=bD;exports.CTableCell=hD;exports.CTableContainer=vD;exports.CTableHead=yD;exports.CTableRow=CD;exports.CTabs=Jf;exports.CTextArea=Wn;exports.CTextField=ze;exports.CTooltip=ct;exports.CTreeComp=gV;exports.CTypography=L;exports.CValueHelp=wp;exports.CVariantManagement=Ri;exports.CVariantManager=Up;exports.CVoiceWaveOverlay=Ll;exports.CWaterfallChart=Bp;exports.Calendar=Hs;exports.CalendarDays=tS;exports.Camera=rS;exports.ChartNoAxesCombined=oS;exports.Check=qr;exports.CheckCircle=Ia;exports.ChevronDown=Fr;exports.ChevronLeft=Ma;exports.ChevronRight=Br;exports.ChevronUp=nS;exports.ChevronsDown=aS;exports.ChevronsUp=iS;exports.CircleAlert=Ra;exports.CircleCheck=Bn;exports.CircleCheckBig=sS;exports.CircleStop=Mc;exports.Clipboard=Rc;exports.ClipboardCheck=lS;exports.ClipboardList=cS;exports.Clock=Dc;exports.CodeBlock=la;exports.Columns3=dS;exports.CopilotChat=Gz;exports.Copy=vo;exports.CopyPlus=pS;exports.Delete=uS;exports.Download=Nc;exports.Edit=Ac;exports.Expand=Ec;exports.Eye=mS;exports.EyeOff=gS;exports.File=Da;exports.FileText=Lc;exports.Filter=fS;exports.FloatingAgentPanel=Fz;exports.FolderTree=Hn;exports.GitBranch=Oc;exports.GlobalMessage=CT;exports.Globe=zn;exports.Grid=Fc;exports.GripVertical=bS;exports.Hammer=hS;exports.Image=Bc;exports.Info=Na;exports.InputArea=_l;exports.Languages=vS;exports.Layers=yS;exports.LayoutDashboard=CS;exports.Lightbulb=Aa;exports.LineChart=Hc;exports.Loader2=zc;exports.Lock=Ea;exports.LockKeyhole=xS;exports.LogOut=Vc;exports.METRIC_CHART_TYPES=ms;exports.Mail=zs;exports.MapPin=Wc;exports.MarkdownRenderer=pa;exports.MathBlock=ca;exports.Menu=$c;exports.MermaidBlock=dl;exports.MessageCircle=uf;exports.MessageSquare=_c;exports.Mic=La;exports.MicOff=SS;exports.Moon=Gc;exports.MoreHorizontal=wS;exports.NavigationIsland=dd;exports.NavigationIsland2=Xs;exports.OMPHApprovalCard=_x;exports.OMPHPanel=Pz;exports.ORBCAFE_I18N_MESSAGES=qn;exports.ORB_DARK=Kg;exports.ORB_FONT_STACK=I0;exports.ORB_LIGHT=Ug;exports.ORB_RADIUS=R0;exports.ORB_TOKENS=Ls;exports.ORB_TRANSITION_FAST=D0;exports.OrbcafeI18nProvider=Ga;exports.OrbisModeProvider=Fn;exports.PAGE_TRANSITION_PRESETS=CV;exports.PAppPageLayout=WF;exports.PBarcodeScanner=AO;exports.PNavIsland=dm;exports.PNumericKeypad=qO;exports.PSmartFilter=am;exports.PTable=xy;exports.PTouchCard=zO;exports.PWorkloadNav=im;exports.PackageCheck=kS;exports.PackageSearch=PS;exports.PanelLeftOpen=Oa;exports.PanelRight=Fa;exports.PanelsTopLeft=TS;exports.PieChart=Uc;exports.Pin=Jo;exports.PivotChartPanel=Zu;exports.Play=IS;exports.Plus=en;exports.QrCode=MS;exports.ReceiptText=RS;exports.RefreshCw=Ba;exports.Rocket=DS;exports.RotateCcw=NS;exports.RotateCw=Kc;exports.Rows3=AS;exports.SapIcon=Tt;exports.Save=ES;exports.ScanLine=LS;exports.Search=Hr;exports.Send=mf;exports.SendHorizontal=qc;exports.Settings=tn;exports.ShieldCheck=OS;exports.Sigma=FS;exports.SortAsc=BS;exports.SquareSplitHorizontal=HS;exports.Star=zS;exports.StdChat=Vm;exports.Sun=Xc;exports.Table2=VS;exports.TableBlock=ul;exports.TabletSmartphone=WS;exports.Terminal=Vn;exports.ThinkBlock=Oi;exports.ThumbsDown=Yc;exports.ThumbsUp=Zc;exports.Trash2=jc;exports.TreeMenu=Xn;exports.TreePine=$S;exports.TrendingDown=Qc;exports.TriangleAlert=Ha;exports.Truck=_S;exports.UploadCloud=Jc;exports.User=Vs;exports.VoiceNavigatorProvider=t2;exports.VoiceWaveOverlay=YF;exports.Volume2=ed;exports.Warehouse=GS;exports.Workflow=US;exports.X=jt;exports.XCircle=za;exports.addKanbanBucket=bu;exports.buildAmapEmbedUrl=wi;exports.buildGoogleMapEmbedUrl=oa;exports.buildGoogleMapIframe=uR;exports.buttonVariants=db;exports.createKanbanBoardModel=vu;exports.createSapIcon=ne;exports.findKanbanCard=_r;exports.message=uT;exports.messageManager=io;exports.moveKanbanCard=Vi;exports.orbAlpha=rt;exports.orbChartSeries=M0;exports.parseMarkdownTable=Li;exports.parseOmphFileHref=Kl;exports.renameKanbanBucket=hu;exports.renderMarkdown=ZN;exports.resolveVariantFilters=Ai;exports.resolveVariantLayout=Ei;exports.useAINav=zy;exports.useAmapEmbedUrl=bN;exports.useAuthPage=s5;exports.useCardPage=sN;exports.useDetailInfo=uu;exports.useGoogleMapEmbedUrl=fN;exports.useGraphChartData=dN;exports.useGraphInteraction=Ii;exports.useGraphReport=mn;exports.useKanbanBoard=oE;exports.useMediaQuery=Dr;exports.useNavigationIsland=bd;exports.useOrbMode=Cr;exports.useOrbTokens=Fs;exports.useOrbcafeI18n=pe;exports.usePadLayout=wO;exports.usePadRecordEditor=TO;exports.usePageLayout=Pu;exports.usePivotTable=yO;exports.usePlanningGantt=Ng;exports.usePlanningLayout=k5;exports.useStandardReport=LD;exports.useVoiceInput=Sn;exports.useVoiceNavigator=r2;